Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to toggle between one maven profile and another?

If I have a maven profile activated by the presence of a property, how can I define another profile that is only activated when the other profile is not activated?

e.g.

    <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>
like image 844
izb Avatar asked Dec 12 '25 03:12

izb


1 Answers

It seems the answer is

<value>!value</value>
like image 55
izb Avatar answered Dec 14 '25 19:12

izb