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 2009/03/22 15:59:13 UTC

[jira] Updated: (MNG-2309) Profile activation order is random

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

Benjamin Bentmann updated MNG-2309:
-----------------------------------

    Fix Version/s:     (was: 3.0-alpha-1)
                   2.0.5

> Profile activation order is random
> ----------------------------------
>
>                 Key: MNG-2309
>                 URL: http://jira.codehaus.org/browse/MNG-2309
>             Project: Maven 2
>          Issue Type: Bug
>          Components: Reactor and workspace
>    Affects Versions: 2.0, 2.0.1, 2.0.2, 2.0.3, 2.0.4
>         Environment: all
>            Reporter: Kenney Westerhof
>            Assignee: Kenney Westerhof
>             Fix For: 2.0.5
>
>
> The order in which profiles are activated is currently random.
> Say you have two profiles:
> {noformat}
> <profile>
>   <id>default</id>
>   <properties>
>     <test>DEFAULT</test>
>   </properties>
> </profile>
> <profile>
>   <id>override</id>
>   <properties>
>     <test>OVERRIDE</test>
>   </properties>
> </profile>
> {noformat}
> and you run 
> {noformat}mvn projecthelp:effective-pom -Pdefault,override{noformat}
> on any pom, then then <properties> section at the bottom will
> probably show {noformat}<test>DEFAULT</test>{noformat}.
> The same happens if you specify '<activeProfiles><activeProfile>default</..></..>' and run with 'mvn -Poverride'.
> This breaks overriding settings since the merge order is random because DefaultProfileManager uses
> a HashMap to add active profiles, and HashMap iterators are random.
> Proposed fix is to use a LinkedHashMap.

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