Details
-
Type:
Improvement
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 2.2.1
-
Fix Version/s: None
-
Component/s: Artifacts and Repositories
-
Labels:None
-
Complexity:Intermediate
-
Number of attachments :
Description
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.
Issue Links
- is related to
-
MNG-2309
Profile activation order is random
-
-
MNG-4741
Priority for profiles activated by property or -P unclear
-
-
MNGSITE-124
Better documentation related to repository order
-
This idea was suggested when discussing MNGSITE-124.