[ http://jira.codehaus.org/browse/MNG-4946?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=249250#action_249250 ]
Benjamin Bentmann commented on MNG-4946: ---------------------------------------- bq. The use case is any case when the user needs to have the profiles precedence under control. I fail to see how this answers my question for a practical usage scenario that would require this. bq. [..] the user should be able to specify the order in which this operation happens for the same-level "entities", e.g. two profiles in settings.xml. Which he can be adjusting their declaration order in the settings or POM. bq. Do you really think that CLI param order is something unstable? Whether documented or not, it's defacto behavior that "-Pfoo,bar" and "-Pbar,foo" yield the same effective POM. So users are not used to pay attention to the profile order on the CLI. bq. Plus, this would apply only when the profiles actually overlap. What are overlapping profiles? For instance, two profiles could configure two different plugins (no overlap), bound to the same phase. What you suggest would effect the order of plugin executions, likely breaking builds. > Let the order of profiles in `mvn -P...` determine their order in effective > POM > ------------------------------------------------------------------------------- > > Key: MNG-4946 > URL: http://jira.codehaus.org/browse/MNG-4946 > Project: Maven 2 & 3 > Issue Type: Improvement > Components: Artifacts and Repositories > Affects Versions: 2.2.1 > Reporter: Ondrej Zizka > > Currently, the order of profile references on the command line does not > affect the order in which they are merged to the effective POM. > Easy test: > 1) Create two profiles in settings-test.xml, say profA and profB > 2) add a repository to each, say repoA, repoB > 3) run `mvn -s settings-test.xml -PprofA,profB help:effective-pom` > 4) run `mvn -s settings-test.xml -PprofB,profA help:effective-pom` > You will see that the order of repositories is not affected by the order of > profiles after -P. > This behavior is not documented, AFAICT, so changing it shouldn't be > considered as breaking backward compatibility. > A possibility to determine the order in which profiles are applied would be a > great improvement since it would allow changing the build dramatically just > by slightly changing the command. -- 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