You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org> on 2010/03/31 13:47:23 UTC

[jira] Closed: (MNG-2276) profile activation by property doesn't work with properties defined in settings.

     [ http://jira.codehaus.org/browse/MNG-2276?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Benjamin Bentmann closed MNG-2276.
----------------------------------

    Resolution: Fixed
      Assignee: Benjamin Bentmann

Supported in [r929483|http://svn.apache.org/viewvc?view=revision&revision=929483].

In more detail, the process is as follows:
# Determine active settings profiles
# Collect properties from above profiles
# Determine active POM profiles, considering properties collected in step 2

Hence, profiles within the settings.xml cannot activate each other just like profiles within the POM cannot activate each other.

Finally, system properties specified on the CLI take precedence over properties from the settings.

> profile activation by property doesn't work with properties defined in settings.
> --------------------------------------------------------------------------------
>
>                 Key: MNG-2276
>                 URL: http://jira.codehaus.org/browse/MNG-2276
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: POM, Profiles
>    Affects Versions: 2.0.4
>            Reporter: Brian Fox
>            Assignee: Benjamin Bentmann
>             Fix For: 3.0-beta-1
>
>         Attachments: mng-2276.zip
>
>
> Activating a profile like below doesn't get activated unless the property is set on the CLI. I need to have the property defined in the settings.xml so it's always set.
>     <profiles>
>      <profile>
>       <id>prod</id>
>       <activation>
>           <property>
>              <name>deploy-ct</name>
>           </property>
>       </activation>
> Further, I noticed that if I set it so that the activation is like:
>       <activation>
>           <property>
>              <name>deploy-ct</name><value>true</value>
>           </property>
>       </activation>
> The profile is triggered just by setting the cli like "mvn -Ddeploy-ct"  It is not active if I use "-Ddeploy-ct=false" but the settings descriptor says that the existence of the property is only used if value is not set.

-- 
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