You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Nicholas Allen (JIRA)" <ji...@codehaus.org> on 2010/02/19 12:55:55 UTC

[jira] Created: (MNG-4565) Multiple profile activation conditions does not work

Multiple profile activation conditions does not work
----------------------------------------------------

                 Key: MNG-4565
                 URL: http://jira.codehaus.org/browse/MNG-4565
             Project: Maven 2 & 3
          Issue Type: Bug
          Components: Profiles
    Affects Versions: 2.2.1
         Environment: All platforms.
            Reporter: Nicholas Allen


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.


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MNG-4565) Multiple profile activation conditions does not work

Posted by "Brian Fox (JIRA)" <ji...@codehaus.org>.
     [ https://jira.codehaus.org/browse/MNG-4565?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brian Fox reassigned MNG-4565:
------------------------------

    Assignee: Brian Fox
    
> Multiple profile activation conditions does not work
> ----------------------------------------------------
>
>                 Key: MNG-4565
>                 URL: https://jira.codehaus.org/browse/MNG-4565
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Profiles
>    Affects Versions: 2.2.1
>         Environment: All platforms.
>            Reporter: Nicholas Allen
>            Assignee: Brian Fox
>             Fix For: Issues to be reviewed for 3.x
>
>
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MNG-4565) Multiple profile activation conditions does not work

Posted by "Ronny Pscheidl (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MNG-4565?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=317477#comment-317477 ] 

Ronny Pscheidl commented on MNG-4565:
-------------------------------------

This extension should solve the problem when all activation conditions are met:

https://github.com/johnjcool/and-activation-profile-selector
                
> Multiple profile activation conditions does not work
> ----------------------------------------------------
>
>                 Key: MNG-4565
>                 URL: https://jira.codehaus.org/browse/MNG-4565
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Profiles
>    Affects Versions: 2.2.1
>         Environment: All platforms.
>            Reporter: Nicholas Allen
>            Assignee: Brian Fox
>             Fix For: Issues to be reviewed for 3.x
>
>
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MNG-4565) Multiple profile activation conditions does not work

Posted by "Ondrej Zizka (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MNG-4565?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=313329#comment-313329 ] 

Ondrej Zizka commented on MNG-4565:
-----------------------------------

Seems that Karel's extension solves MNG-5194.
                
> Multiple profile activation conditions does not work
> ----------------------------------------------------
>
>                 Key: MNG-4565
>                 URL: https://jira.codehaus.org/browse/MNG-4565
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Profiles
>    Affects Versions: 2.2.1
>         Environment: All platforms.
>            Reporter: Nicholas Allen
>            Assignee: Brian Fox
>             Fix For: Issues to be reviewed for 3.x
>
>
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MNG-4565) Multiple profile activation conditions does not work

Posted by "Clemens Fuchslocher (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-4565?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=222462#action_222462 ] 

Clemens Fuchslocher commented on MNG-4565:
------------------------------------------

[POM Reference|http://maven.apache.org/pom.html#Activation]:

{quote}
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.
{quote}

Not really useful.

> Multiple profile activation conditions does not work
> ----------------------------------------------------
>
>                 Key: MNG-4565
>                 URL: http://jira.codehaus.org/browse/MNG-4565
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Profiles
>    Affects Versions: 2.2.1
>         Environment: All platforms.
>            Reporter: Nicholas Allen
>
> 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.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MNG-4565) Multiple profile activation conditions does not work

Posted by "Ivan (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MNG-4565?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=305714#comment-305714 ] 

Ivan commented on MNG-4565:
---------------------------

What is the status of that fix ?
                
> Multiple profile activation conditions does not work
> ----------------------------------------------------
>
>                 Key: MNG-4565
>                 URL: https://jira.codehaus.org/browse/MNG-4565
>             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 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Issue Comment Edited: (MNG-4565) Multiple profile activation conditions does not work

Posted by "Eric Pabst (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-4565?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=264310#action_264310 ] 

Eric Pabst edited comment on MNG-4565 at 4/21/11 8:55 AM:
----------------------------------------------------------

I have a fix for this here that doesn't modify the pom schema at all and simply switches it from an OR to and AND:
https://github.com/epabst/maven-3/tree/MNG-4516

      was (Author: epabst):
    I have a fix for this here:
https://github.com/epabst/maven-3/tree/MNG-4516
  
> Multiple profile activation conditions does not work
> ----------------------------------------------------
>
>                 Key: MNG-4565
>                 URL: http://jira.codehaus.org/browse/MNG-4565
>             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 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.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MNG-4565) Multiple profile activation conditions does not work

Posted by "Peter Goodwine (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-4565?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=259703#action_259703 ] 

Peter Goodwine commented on MNG-4565:
-------------------------------------

[Settings Reference|http://maven.apache.org/settings.html#Activation]:

{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: http://jira.codehaus.org/browse/MNG-4565
>             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 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.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MNG-4565) Multiple profile activation conditions does not work

Posted by "Karel Piwko (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MNG-4565?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=311779#comment-311779 ] 

Karel Piwko commented on MNG-4565:
----------------------------------

Guys, you can check following Maven extension https://github.com/kpiwko/el-profile-activator-extension. 

You just drop two jars into $MAVEN_HOME/lib/ext and you'll get MVEL support in <property> value.


                
> Multiple profile activation conditions does not work
> ----------------------------------------------------
>
>                 Key: MNG-4565
>                 URL: https://jira.codehaus.org/browse/MNG-4565
>             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 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MNG-4565) Multiple profile activation conditions does not work

Posted by "Clemens Fuchslocher (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-4565?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=222465#action_222465 ] 

Clemens Fuchslocher commented on MNG-4565:
------------------------------------------

This was introduced by MNG-3106:

{quote}
The new behaviour is that the profile will be activated if any of the activators returns true (i.e. an "or" operation).
{quote}


> Multiple profile activation conditions does not work
> ----------------------------------------------------
>
>                 Key: MNG-4565
>                 URL: http://jira.codehaus.org/browse/MNG-4565
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Profiles
>    Affects Versions: 2.2.1
>         Environment: All platforms.
>            Reporter: Nicholas Allen
>
> 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.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MNG-4565) Multiple profile activation conditions does not work

Posted by "Eric Pabst (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-4565?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=264310#action_264310 ] 

Eric Pabst commented on MNG-4565:
---------------------------------

I have a fix for this here:
https://github.com/epabst/maven-3/tree/MNG-4516

> Multiple profile activation conditions does not work
> ----------------------------------------------------
>
>                 Key: MNG-4565
>                 URL: http://jira.codehaus.org/browse/MNG-4565
>             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 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.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MNG-4565) Multiple profile activation conditions does not work

Posted by "Clemens Fuchslocher (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-4565?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=222468#action_222468 ] 

Clemens Fuchslocher commented on MNG-4565:
------------------------------------------

An and element would be useful:

{noformat}
<activation>
	<activeByDefault>false</activeByDefault>
	<and/>
	<os>
		<name>linux</name>
	</os>
	<property>
		<name>release</name>
		<value>true</value>
	</property>
</activation>
{noformat}

> Multiple profile activation conditions does not work
> ----------------------------------------------------
>
>                 Key: MNG-4565
>                 URL: http://jira.codehaus.org/browse/MNG-4565
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Profiles
>    Affects Versions: 2.2.1
>         Environment: All platforms.
>            Reporter: Nicholas Allen
>
> 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.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MNG-4565) Multiple profile activation conditions does not work

Posted by "Tony Lampada (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MNG-4565?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=305721#comment-305721 ] 

Tony Lampada commented on MNG-4565:
-----------------------------------

>From the looks of the details (assignee, fix version), doesn't look very promising.
Maybe this issue needs some [sponsoring|http://www.freedomsponsors.org//core/issue/sponsor?trackerURL=http://jira.codehaus.org/browse/MNG-4565] :-)

Have anyone tried Eric's github fork?

                
> Multiple profile activation conditions does not work
> ----------------------------------------------------
>
>                 Key: MNG-4565
>                 URL: https://jira.codehaus.org/browse/MNG-4565
>             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 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MNG-4565) Multiple profile activation conditions does not work

Posted by "Brian Fox (JIRA)" <ji...@codehaus.org>.
     [ https://jira.codehaus.org/browse/MNG-4565?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brian Fox updated MNG-4565:
---------------------------

    Comment: was deleted

(was: From the looks of the details (assignee, fix version), doesn't look very promising.
Maybe this issue needs some [sponsoring|http://www.freedomsponsors.org//core/issue/sponsor?trackerURL=http://jira.codehaus.org/browse/MNG-4565] :-)

Have anyone tried Eric's github fork?
)
    
> Multiple profile activation conditions does not work
> ----------------------------------------------------
>
>                 Key: MNG-4565
>                 URL: https://jira.codehaus.org/browse/MNG-4565
>             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 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MNG-4565) Multiple profile activation conditions does not work

Posted by "Hung Huynh (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MNG-4565?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=275418#comment-275418 ] 

Hung Huynh commented on MNG-4565:
---------------------------------

supporting for both "AND" and "OR" logic would be greatly useful

> Multiple profile activation conditions does not work
> ----------------------------------------------------
>
>                 Key: MNG-4565
>                 URL: https://jira.codehaus.org/browse/MNG-4565
>             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 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.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira