Maven Multiproject Profile activation via property

泪湿孤枕 提交于 2019-12-12 03:05:41

问题


I have a problem to activate a profile. There is a master pom with the profile:

<profile>
    <id>EntityUpdater</id>
    <activation>
        <property>
            <name>entityupdater.start</name>
    <value>true</value>
        </property>
</activation>
    ....

In my childpom (jar package) I specify the property:

<properties>
    <!-- ENTITY UPDATER CONFIG -->
    <entityupdater.start>true</entityupdater.start>
    ....

But in the build process the profile does not start.

I would be very happy if anyone could help me.

Best regards, Daniel


回答1:


Unfortunately, Maven can only trigger property based profiles, if you are passing them in from the command-line as JVM args:

mvn clean package -Dentityupdater.start



来源:https://stackoverflow.com/questions/8984343/maven-multiproject-profile-activation-via-property

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!