[jira] Issue Comment Edited: (MNG-4946) Let the order of profiles in `mvn -P...` determine their order in effective POM

2010-12-21 Thread Ondrej Zizka (JIRA)

[ 
http://jira.codehaus.org/browse/MNG-4946?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=249257#action_249257
 ] 

Ondrej Zizka edited comment on MNG-4946 at 12/21/10 6:33 AM:
-

 Which he can be adjusting their declaration order in the settings or POM.

That's my point - changing settings.xml everytime you need to change your build 
is not much user-friendly,
and when you need to do int programatically, it's kind of annoying.

And even when defining in XML, you can *not* set the order in all cases:
if some of the profiles are auto-activated. Those go first, no matter what.

One real use case:
settings.xml with two profiles, 1) profA, auto-activated, 2) profB, activated 
by -P profB.
They contain different repository definition.
I need Maven to query profB's repository first, but there's no way because 
Maven ignores the order of -P.
If this improvement was implemented, I could do mvn install -PprofB,profA, 
and voi-la - Maven would do what I need.

  was (Author: pekarna):
 Which he can be adjusting their declaration order in the settings or POM.

It can not if some of them are auto-activated. Those go first, no matter what.

One real use case:
settings.xml with two profiles, 1) profA, auto-activated, 2) profB, activated 
by -P profB.
They contain different repository definition.
I need Maven to query profB's repository first, but there's no way because 
Maven ignores the order of -P.
If this improvement was implemented, I could do mvn install -PprofB,profA, 
and voi-la - Maven would do what I need.


  
 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




[jira] Issue Comment Edited: (MNG-4946) Let the order of profiles in `mvn -P...` determine their order in effective POM

2010-12-20 Thread Ondrej Zizka (JIRA)

[ 
http://jira.codehaus.org/browse/MNG-4946?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=249217#action_249217
 ] 

Ondrej Zizka edited comment on MNG-4946 at 12/20/10 7:30 PM:
-

Hi Benjamin,

The use case is any case when you want to have the profiles precedence under 
control.

Since Maven builds customization is based on merging one POM into other, 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.

Do you really think that CLI param is something unstable? Usually the builds 
are run from some CI tool or at least script, anyway.
Plus, this would apply only when the profiles actually overlap. In that case, 
it's most probably intentional, and it's their author's responsibility to 
document the proper order in which they are to be applied.

  was (Author: pekarna):
The use case is any case when you want to have the profiles precedence 
under control.

Since Maven builds customization is based on merging one POM into other, 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.

Do you really think that CLI param is something unstable? Usually the builds 
are run from some CI tool or at least script, anyway.
Plus, this would apply only when the profiles actually overlap. In that case, 
it's most probably intentional, and it's their author's responsibility to 
document the proper order in which they are to be applied.
  
 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




[jira] Issue Comment Edited: (MNG-4946) Let the order of profiles in `mvn -P...` determine their order in effective POM

2010-12-20 Thread Ondrej Zizka (JIRA)

[ 
http://jira.codehaus.org/browse/MNG-4946?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=249217#action_249217
 ] 

Ondrej Zizka edited comment on MNG-4946 at 12/20/10 7:31 PM:
-

Hi Benjamin,

The use case is any case when the user needs to have the profiles precedence 
under control.

Since Maven builds customization is based on merging one POM into other, 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.

Do you really think that CLI param is something unstable? Usually the builds 
are run from some CI tool or at least script, anyway.
Plus, this would apply only when the profiles actually overlap. In that case, 
it's most probably intentional, and it's their author's responsibility to 
document the proper order in which they are to be applied.

  was (Author: pekarna):
Hi Benjamin,

The use case is any case when you want to have the profiles precedence under 
control.

Since Maven builds customization is based on merging one POM into other, 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.

Do you really think that CLI param is something unstable? Usually the builds 
are run from some CI tool or at least script, anyway.
Plus, this would apply only when the profiles actually overlap. In that case, 
it's most probably intentional, and it's their author's responsibility to 
document the proper order in which they are to be applied.
  
 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




[jira] Issue Comment Edited: (MNG-4946) Let the order of profiles in `mvn -P...` determine their order in effective POM

2010-12-20 Thread Ondrej Zizka (JIRA)

[ 
http://jira.codehaus.org/browse/MNG-4946?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=249217#action_249217
 ] 

Ondrej Zizka edited comment on MNG-4946 at 12/20/10 7:33 PM:
-

Hi Benjamin,

The use case is any case when the user needs to have the profiles precedence 
under control.

Since Maven builds customization is based on merging one POM into other, 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.

Do you really think that CLI param order is something unstable? Usually the 
builds are run from some CI tool or at least script, anyway.
Plus, this would apply only when the profiles actually overlap. In that case, 
it's most probably intentional, and it's their author's responsibility to 
document the proper order in which they are to be applied.

  was (Author: pekarna):
Hi Benjamin,

The use case is any case when the user needs to have the profiles precedence 
under control.

Since Maven builds customization is based on merging one POM into other, 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.

Do you really think that CLI param is something unstable? Usually the builds 
are run from some CI tool or at least script, anyway.
Plus, this would apply only when the profiles actually overlap. In that case, 
it's most probably intentional, and it's their author's responsibility to 
document the proper order in which they are to be applied.
  
 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




[jira] Issue Comment Edited: (MNG-4946) Let the order of profiles in `mvn -P...` determine their order in effective POM

2010-12-20 Thread Ondrej Zizka (JIRA)

[ 
http://jira.codehaus.org/browse/MNG-4946?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=249217#action_249217
 ] 

Ondrej Zizka edited comment on MNG-4946 at 12/20/10 7:51 PM:
-

Hi Benjamin,

The use case is any case when the user needs to have the profiles precedence 
under control.

Since Maven builds customization is based on merging one POM into other, 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.

Do you really think that CLI param order is something unstable? Usually the 
builds are run from some CI tool or at least a script, anyway.
Plus, this would apply only when the profiles actually overlap. In that case, 
it's most probably intentional, and it's their author's responsibility to 
document the proper order in which they are to be applied.

  was (Author: pekarna):
Hi Benjamin,

The use case is any case when the user needs to have the profiles precedence 
under control.

Since Maven builds customization is based on merging one POM into other, 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.

Do you really think that CLI param order is something unstable? Usually the 
builds are run from some CI tool or at least script, anyway.
Plus, this would apply only when the profiles actually overlap. In that case, 
it's most probably intentional, and it's their author's responsibility to 
document the proper order in which they are to be applied.
  
 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