Description
According to the documentation at http://www.sonatype.com/books/mvnref-book/reference/profiles-sect-activation.html a profile is activated when all activation conditions are met (which makes sense of course). But when I try to use this it does not work. It seems maven does an OR instead of an AND (which is not rearly as useful and is the opposite of what the documentation says at the previous link).
For example, if I have one profile that is activated like this:
<activation> <activeByDefault>false</activeByDefault> <os> <name>linux</name> </os> </activation>
and another profile that is activated like this:
<activation> <activeByDefault>false</activeByDefault> <os> <name>linux</name> </os> <property> <name>release</name> <value>true</value> </property> </activation>
Then I would expect the second profile to only be activated if the OS is linux and the release property is defined.
When I run 'mvn help:active-profiles' however, maven shows that both profiles are active even though the release property is not defined.
Attachments
Issue Links
- is duplicated by
-
MNG-5619 CLONE - Multiple profile activation conditions broken
- Closed
- is related to
-
MNG-5909 Activating a profile based on the existence of multiple files is not possible
- Closed
-
MNG-5673 Profile activation does not work if more than 1 type of activation is present
- Closed
-
MNG-4516 Contradiction between the documentation and Maven's behavior related to profile-activation with multiple criteria
- Closed
-
MNG-3106 Multiple profile activation conditions broken
- Closed
-
MNG-5685 Profile with multiple conditions gets activated incorrectly
- Closed
-
MNG-1753 support improved property based profile activation
- Closed
-
MNG-5194 Profile activation: Allow expressions in <activation>
- Closed
- relates to
-
MNG-7577 Ability to activate profile based on multiple property values
- Closed
-
MNG-3328 Allow multiple profile activation properties
- Closed