[ http://jira.codehaus.org/browse/MNG-2309?page=all ] Kenney Westerhof closed MNG-2309: ---------------------------------
Assign To: Kenney Westerhof Resolution: Fixed Fix Version: 2.1 2.0.5 Fixed in trunk revision 408021. Merged in 2.0.x branch in revision 408023. > Profile activation order is random > ---------------------------------- > > Key: MNG-2309 > URL: http://jira.codehaus.org/browse/MNG-2309 > Project: Maven 2 > Type: Bug > Components: Reactor and workspace > 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.1, 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