Maven profile activation with multiple conditions

Maven <activation> block is a list of OR -- the profile will be activated as soon as the first criteria is met. So, it is less likely that your problem has a solution at least until this bug-report gets fixed https://issues.apache.org/jira/browse/MNG-4565


Update:

it's fixed in 3.2.2 now – sfussenegger (via comment)


And worst you can mix condition of different type for example file, jdk and property as described here http://www.sonatype.com/books/mvnref-book/reference/profiles-sect-activation.html, but you can't even put two condition of same type, for example two properties

<activation>
    <property>
           <name>integrationTest</name>
    </property>
    <property>
        <name>packaging</name>
        <value>swf</value>
    </property>
 </activation>

This won't work as only one <property> tag will be allowed. Associated JIRA : https://issues.apache.org/jira/browse/MNG-3328

And the bug described above is still open... 5 years it's just a shame !


Just fixed by me :)

Starting from 3.2.2 it will work as expected: multiple conditions will be ANDed

Reference - https://github.com/apache/maven/commits/master, search by MNG-4565

Commit URL - https://github.com/apache/maven/commit/c6529932f9e3efdfc86ed73f59a307a8f8b6ea5f