maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peter Goodwine (JIRA)" <>
Subject [jira] Commented: (MNG-4565) Multiple profile activation conditions does not work
Date Fri, 11 Mar 2011 00:05:22 GMT


Peter Goodwine commented on MNG-4565:

[Settings Reference|]:

{quote}Activation occurs when all specified criteria have been met, though not all are required
at once.{quote}

Contradicts the POM reference, worse than "not really useful"

> Multiple profile activation conditions does not work
> ----------------------------------------------------
>                 Key: MNG-4565
>                 URL:
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Profiles
>    Affects Versions: 2.2.1
>         Environment: All platforms.
>            Reporter: Nicholas Allen
>             Fix For: Issues to be reviewed for 3.x
> According to the documentation at
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
> 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.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:


View raw message