maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kevin J. Price (JIRA)" <>
Subject [jira] [Commented] (MNG-4565) Requiring multiple profile activation conditions to be true does not work
Date Mon, 20 May 2019 16:41:00 GMT


Kevin J. Price commented on MNG-4565:

So I gather that having activations use AND instead of OR is true for Maven now and there's
no way to get the OR behavior that used to be standard.

So... why has the POM reference still not been updated to match this reality? []
still states quite clearly:
"Activation occurs when one or more of the specified criteria have been met. When the first
positive result is encountered, processing stops and the profile is marked as active."

> Requiring multiple profile activation conditions to be true does not work
> -------------------------------------------------------------------------
>                 Key: MNG-4565
>                 URL:
>             Project: Maven
>          Issue Type: Bug
>          Components: Profiles
>    Affects Versions: 2.2.1, 3.2.1
>         Environment: All platforms.
>            Reporter: Nicholas Allen
>            Assignee: Jason van Zyl
>            Priority: Major
>             Fix For: 3.2.2
> 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:
> {code:xml}         <activation>
>             <activeByDefault>false</activeByDefault>
>             <os>
>                <name>linux</name>
>             </os>
>          </activation>{code}
> and another profile that is activated like this:
> {code:xml}        <activation>
>             <activeByDefault>false</activeByDefault>
>             <os>
>                <name>linux</name>
>             </os>
>             <property>
>                 <name>release</name>
>                 <value>true</value>
>             </property>
>          </activation>{code}
> 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 was sent by Atlassian JIRA

View raw message