【问题标题】:Maven Multiproject Profile activation via property通过属性激活 Maven 多项目配置文件
【发布时间】:2012-02-17 13:15:57
【问题描述】:

我在激活个人资料时遇到问题。有一个带有配置文件的主 pom:

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

在我的 childpom(jar 包)中,我指定了属性:

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

但是在构建过程中配置文件没有启动。

如果有人可以帮助我,我会很高兴。

最好的问候,丹尼尔

【问题讨论】:

标签: maven properties profile pom.xml activation


【解决方案1】:

不幸的是,Maven 只能触发基于属性的配置文件,如果您从命令行将它们作为 JVM 参数传递:

mvn clean package -Dentityupdater.start

【讨论】:

    猜你喜欢
    • 2013-09-24
    • 1970-01-01
    • 2011-07-22
    • 2010-12-03
    • 2011-11-11
    • 2017-10-11
    • 2012-04-16
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多