【问题标题】:How to toggle between one maven profile and another?如何在一个 Maven 配置文件和另一个配置文件之间切换?
【发布时间】:2010-09-18 02:08:59
【问题描述】:

如果我有一个因属性的存在而激活的 maven 配置文件,我如何定义另一个配置文件,该配置文件仅在另一个配置文件未激活时才被激活?

例如

    <profile>
        <activation>
            <property>
                <name>myproperty</name>
                <value>value</value>
            </property>
        </activation>
        ...
    </profile>


    <profile>
        <activation>
            <property>
                <name>myproperty</name>
                <value></value> <!-- Anything other than "value"  -->
            </property>
        </activation>
        ...
    </profile>

【问题讨论】:

    标签: java maven-2 build-process


    【解决方案1】:

    答案似乎是

    <value>!value</value>
    

    【讨论】:

      猜你喜欢
      • 2011-12-26
      • 2022-12-25
      • 2014-10-29
      • 1970-01-01
      • 2012-01-15
      • 1970-01-01
      • 2014-10-19
      • 2014-10-07
      • 2011-07-17
      相关资源
      最近更新 更多