You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Arnaud Heritier (JIRA)" <ji...@codehaus.org> on 2011/01/13 11:00:59 UTC

[jira] Created: (MNG-4975) [REGRESSION] mojos execution order doesn't respect ids if profiles are used.

[REGRESSION] mojos execution order doesn't respect ids if profiles are used.
----------------------------------------------------------------------------

                 Key: MNG-4975
                 URL: http://jira.codehaus.org/browse/MNG-4975
             Project: Maven 2 & 3
          Issue Type: Bug
          Components: Plugins and Lifecycle
    Affects Versions: 3.0.2, 3.0.1, 3.0
         Environment: I reproduced the problem with maven 3.0, 3.0.1 and 3.0.2. It doesn't exist in 2.2.1
MacOS 1.6 JVM
            Reporter: Arnaud Heritier
         Attachments: pom.xml

Let's imagine we have a lifecycle phase where we want to bind several mojos. 
We want to force the order of execution of our mojos in this phase thus we use ordered execution IDs (00exec, 01exec, ...).
In project's build part we define 00exec, 01exec, 02exec
In a profile #1 we define 03exec,04exec
In a profile #2 we define 05exec,06exec
If I execute my build without profiles I want to see the execution of 00->01->02
If I activate profile #1 I want to see the execution of  00->01->02->03->04
If I activate profile #2 I want to see the execution of  00->01->02->03->04->05->06
This the behavior we have in Maven 2.X. Any combinaison of profiles will ensure executions are ordered following IDs order
In Maven 3.x it is no more the case.
Without profile we have 00->01->02 (GREAT)
With Profile 1 activate we have : 03->04->00->01->02
With Profile 1 & 2 activate we have : 05->06->03->04->00->01->02
I attach a simple testcase with an antrun to show the problem. Just play with {{mvn package}} and profiles {{profile1}} & {{profile2}}
Note that the order depends also of the order of profiles declaration in the POM in M3
If profile1 is defined before profile 2 I have 05->06->03->04->00->01->02
If profile2 is defined before profile 1 I have 03->04->05->06->00->01->02


-- 
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] Updated: (MNG-4975) [regression] plugin executions injected from profile run before instead of after existing executions in the POM

Posted by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-4975?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Benjamin Bentmann updated MNG-4975:
-----------------------------------

    Summary: [regression] plugin executions injected from profile run before instead of after existing executions in the POM  (was: [REGRESSION] mojos execution order doesn't respect ids if profiles are used.)

Just to clarify, plugin executions are not ordered by their IDs, only the declaration order in the POM matters.

> [regression] plugin executions injected from profile run before instead of after existing executions in the POM
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: MNG-4975
>                 URL: http://jira.codehaus.org/browse/MNG-4975
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Plugins and Lifecycle
>    Affects Versions: 3.0, 3.0.1, 3.0.2
>         Environment: I reproduced the problem with maven 3.0, 3.0.1 and 3.0.2. It doesn't exist in 2.2.1
> MacOS 1.6 JVM
>            Reporter: Arnaud Heritier
>         Attachments: pom.xml
>
>
> Let's imagine we have a lifecycle phase where we want to bind several mojos. 
> We want to force the order of execution of our mojos in this phase thus we use ordered execution IDs (00exec, 01exec, ...).
> In project's build part we define 00exec, 01exec, 02exec
> In a profile #1 we define 03exec,04exec
> In a profile #2 we define 05exec,06exec
> If I execute my build without profiles I want to see the execution of 00->01->02
> If I activate profile #1 I want to see the execution of  00->01->02->03->04
> If I activate profile #2 I want to see the execution of  00->01->02->03->04->05->06
> This the behavior we have in Maven 2.X. Any combinaison of profiles will ensure executions are ordered following IDs order
> In Maven 3.x it is no more the case.
> Without profile we have 00->01->02 (GREAT)
> With Profile 1 activate we have : 03->04->00->01->02 ( :( )
> With Profile 1 & 2 activate we have : 05->06->03->04->00->01->02 ( :( )
> I attach a simple testcase with an antrun to show the problem. 
> Just play with {{mvn package}} and profiles {{profile1}} & {{profile2}}
> Note that the order depends also of the order of profiles declaration in the POM in M3
> If profile1 is defined before profile 2 I have 05->06->03->04->00->01->02
> If profile2 is defined before profile 1 I have 03->04->05->06->00->01->02

-- 
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] Closed: (MNG-4975) [regression] plugin executions injected from profile run before instead of after existing executions in the POM

Posted by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-4975?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Benjamin Bentmann closed MNG-4975.
----------------------------------

       Resolution: Fixed
    Fix Version/s: 3.0.3
         Assignee: Benjamin Bentmann

Fixed in [r1059192|http://svn.apache.org/viewvc?view=revision&revision=1059192].

> [regression] plugin executions injected from profile run before instead of after existing executions in the POM
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: MNG-4975
>                 URL: http://jira.codehaus.org/browse/MNG-4975
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Plugins and Lifecycle
>    Affects Versions: 3.0, 3.0.1, 3.0.2
>         Environment: I reproduced the problem with maven 3.0, 3.0.1 and 3.0.2. It doesn't exist in 2.2.1
> MacOS 1.6 JVM
>            Reporter: Arnaud Heritier
>            Assignee: Benjamin Bentmann
>             Fix For: 3.0.3
>
>         Attachments: pom.xml
>
>
> Let's imagine we have a lifecycle phase where we want to bind several mojos. 
> We want to force the order of execution of our mojos in this phase thus we use ordered execution IDs (00exec, 01exec, ...).
> In project's build part we define 00exec, 01exec, 02exec
> In a profile #1 we define 03exec,04exec
> In a profile #2 we define 05exec,06exec
> If I execute my build without profiles I want to see the execution of 00->01->02
> If I activate profile #1 I want to see the execution of  00->01->02->03->04
> If I activate profile #2 I want to see the execution of  00->01->02->03->04->05->06
> This the behavior we have in Maven 2.X. Any combinaison of profiles will ensure executions are ordered following IDs order
> In Maven 3.x it is no more the case.
> Without profile we have 00->01->02 (GREAT)
> With Profile 1 activate we have : 03->04->00->01->02 ( :( )
> With Profile 1 & 2 activate we have : 05->06->03->04->00->01->02 ( :( )
> I attach a simple testcase with an antrun to show the problem. 
> Just play with {{mvn package}} and profiles {{profile1}} & {{profile2}}
> Note that the order depends also of the order of profiles declaration in the POM in M3
> If profile1 is defined before profile 2 I have 05->06->03->04->00->01->02
> If profile2 is defined before profile 1 I have 03->04->05->06->00->01->02

-- 
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] Commented: (MNG-4975) [regression] plugin executions injected from profile run before instead of after existing executions in the POM

Posted by "Arnaud Heritier (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-4975?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=251653#action_251653 ] 

Arnaud Heritier commented on MNG-4975:
--------------------------------------

thus it is impossible with this rule to sort them across profiles ?
.. and it worked with maven2. Thus if consider it is  specification and note a bug we have to document this change. WDYT ?

> [regression] plugin executions injected from profile run before instead of after existing executions in the POM
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: MNG-4975
>                 URL: http://jira.codehaus.org/browse/MNG-4975
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Plugins and Lifecycle
>    Affects Versions: 3.0, 3.0.1, 3.0.2
>         Environment: I reproduced the problem with maven 3.0, 3.0.1 and 3.0.2. It doesn't exist in 2.2.1
> MacOS 1.6 JVM
>            Reporter: Arnaud Heritier
>         Attachments: pom.xml
>
>
> Let's imagine we have a lifecycle phase where we want to bind several mojos. 
> We want to force the order of execution of our mojos in this phase thus we use ordered execution IDs (00exec, 01exec, ...).
> In project's build part we define 00exec, 01exec, 02exec
> In a profile #1 we define 03exec,04exec
> In a profile #2 we define 05exec,06exec
> If I execute my build without profiles I want to see the execution of 00->01->02
> If I activate profile #1 I want to see the execution of  00->01->02->03->04
> If I activate profile #2 I want to see the execution of  00->01->02->03->04->05->06
> This the behavior we have in Maven 2.X. Any combinaison of profiles will ensure executions are ordered following IDs order
> In Maven 3.x it is no more the case.
> Without profile we have 00->01->02 (GREAT)
> With Profile 1 activate we have : 03->04->00->01->02 ( :( )
> With Profile 1 & 2 activate we have : 05->06->03->04->00->01->02 ( :( )
> I attach a simple testcase with an antrun to show the problem. 
> Just play with {{mvn package}} and profiles {{profile1}} & {{profile2}}
> Note that the order depends also of the order of profiles declaration in the POM in M3
> If profile1 is defined before profile 2 I have 05->06->03->04->00->01->02
> If profile2 is defined before profile 1 I have 03->04->05->06->00->01->02

-- 
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] Updated: (MNG-4975) [REGRESSION] mojos execution order doesn't respect ids if profiles are used.

Posted by "Arnaud Heritier (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-4975?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Arnaud Heritier updated MNG-4975:
---------------------------------

    Description: 
Let's imagine we have a lifecycle phase where we want to bind several mojos. 
We want to force the order of execution of our mojos in this phase thus we use ordered execution IDs (00exec, 01exec, ...).

In project's build part we define 00exec, 01exec, 02exec
In a profile #1 we define 03exec,04exec
In a profile #2 we define 05exec,06exec

If I execute my build without profiles I want to see the execution of 00->01->02
If I activate profile #1 I want to see the execution of  00->01->02->03->04
If I activate profile #2 I want to see the execution of  00->01->02->03->04->05->06

This the behavior we have in Maven 2.X. Any combinaison of profiles will ensure executions are ordered following IDs order

In Maven 3.x it is no more the case.
Without profile we have 00->01->02 (GREAT)
With Profile 1 activate we have : 03->04->00->01->02 ( :( )
With Profile 1 & 2 activate we have : 05->06->03->04->00->01->02 ( :( )

I attach a simple testcase with an antrun to show the problem. 
Just play with {{mvn package}} and profiles {{profile1}} & {{profile2}}

Note that the order depends also of the order of profiles declaration in the POM in M3
If profile1 is defined before profile 2 I have 05->06->03->04->00->01->02
If profile2 is defined before profile 1 I have 03->04->05->06->00->01->02


  was:
Let's imagine we have a lifecycle phase where we want to bind several mojos. 
We want to force the order of execution of our mojos in this phase thus we use ordered execution IDs (00exec, 01exec, ...).
In project's build part we define 00exec, 01exec, 02exec
In a profile #1 we define 03exec,04exec
In a profile #2 we define 05exec,06exec
If I execute my build without profiles I want to see the execution of 00->01->02
If I activate profile #1 I want to see the execution of  00->01->02->03->04
If I activate profile #2 I want to see the execution of  00->01->02->03->04->05->06
This the behavior we have in Maven 2.X. Any combinaison of profiles will ensure executions are ordered following IDs order
In Maven 3.x it is no more the case.
Without profile we have 00->01->02 (GREAT)
With Profile 1 activate we have : 03->04->00->01->02
With Profile 1 & 2 activate we have : 05->06->03->04->00->01->02
I attach a simple testcase with an antrun to show the problem. Just play with {{mvn package}} and profiles {{profile1}} & {{profile2}}
Note that the order depends also of the order of profiles declaration in the POM in M3
If profile1 is defined before profile 2 I have 05->06->03->04->00->01->02
If profile2 is defined before profile 1 I have 03->04->05->06->00->01->02



> [REGRESSION] mojos execution order doesn't respect ids if profiles are used.
> ----------------------------------------------------------------------------
>
>                 Key: MNG-4975
>                 URL: http://jira.codehaus.org/browse/MNG-4975
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Plugins and Lifecycle
>    Affects Versions: 3.0, 3.0.1, 3.0.2
>         Environment: I reproduced the problem with maven 3.0, 3.0.1 and 3.0.2. It doesn't exist in 2.2.1
> MacOS 1.6 JVM
>            Reporter: Arnaud Heritier
>         Attachments: pom.xml
>
>
> Let's imagine we have a lifecycle phase where we want to bind several mojos. 
> We want to force the order of execution of our mojos in this phase thus we use ordered execution IDs (00exec, 01exec, ...).
> In project's build part we define 00exec, 01exec, 02exec
> In a profile #1 we define 03exec,04exec
> In a profile #2 we define 05exec,06exec
> If I execute my build without profiles I want to see the execution of 00->01->02
> If I activate profile #1 I want to see the execution of  00->01->02->03->04
> If I activate profile #2 I want to see the execution of  00->01->02->03->04->05->06
> This the behavior we have in Maven 2.X. Any combinaison of profiles will ensure executions are ordered following IDs order
> In Maven 3.x it is no more the case.
> Without profile we have 00->01->02 (GREAT)
> With Profile 1 activate we have : 03->04->00->01->02 ( :( )
> With Profile 1 & 2 activate we have : 05->06->03->04->00->01->02 ( :( )
> I attach a simple testcase with an antrun to show the problem. 
> Just play with {{mvn package}} and profiles {{profile1}} & {{profile2}}
> Note that the order depends also of the order of profiles declaration in the POM in M3
> If profile1 is defined before profile 2 I have 05->06->03->04->00->01->02
> If profile2 is defined before profile 1 I have 03->04->05->06->00->01->02

-- 
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] Commented: (MNG-4975) [regression] plugin executions injected from profile run before instead of after existing executions in the POM

Posted by "Arnaud Heritier (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-4975?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=251657#action_251657 ] 

Arnaud Heritier commented on MNG-4975:
--------------------------------------

Ok, thus for readers I confirm Benjamin's assertion.
I misunderstood the order of plugin executions inside a phase : They have to follow the order in the POM. Thus if I put profile 2 before profile 1, with maven 2.X and both profiles activated I have 00->01->02->05->06->03->04
Thus there is a bug in Maven 3, in my sample build executions (00,01,02) should always be executed before profiles executions but it won't follow execution IDs (they could be 46, 32, 57)
Note that in an inheritance chain child executions are always done after parent executions

> [regression] plugin executions injected from profile run before instead of after existing executions in the POM
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: MNG-4975
>                 URL: http://jira.codehaus.org/browse/MNG-4975
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Plugins and Lifecycle
>    Affects Versions: 3.0, 3.0.1, 3.0.2
>         Environment: I reproduced the problem with maven 3.0, 3.0.1 and 3.0.2. It doesn't exist in 2.2.1
> MacOS 1.6 JVM
>            Reporter: Arnaud Heritier
>         Attachments: pom.xml
>
>
> Let's imagine we have a lifecycle phase where we want to bind several mojos. 
> We want to force the order of execution of our mojos in this phase thus we use ordered execution IDs (00exec, 01exec, ...).
> In project's build part we define 00exec, 01exec, 02exec
> In a profile #1 we define 03exec,04exec
> In a profile #2 we define 05exec,06exec
> If I execute my build without profiles I want to see the execution of 00->01->02
> If I activate profile #1 I want to see the execution of  00->01->02->03->04
> If I activate profile #2 I want to see the execution of  00->01->02->03->04->05->06
> This the behavior we have in Maven 2.X. Any combinaison of profiles will ensure executions are ordered following IDs order
> In Maven 3.x it is no more the case.
> Without profile we have 00->01->02 (GREAT)
> With Profile 1 activate we have : 03->04->00->01->02 ( :( )
> With Profile 1 & 2 activate we have : 05->06->03->04->00->01->02 ( :( )
> I attach a simple testcase with an antrun to show the problem. 
> Just play with {{mvn package}} and profiles {{profile1}} & {{profile2}}
> Note that the order depends also of the order of profiles declaration in the POM in M3
> If profile1 is defined before profile 2 I have 05->06->03->04->00->01->02
> If profile2 is defined before profile 1 I have 03->04->05->06->00->01->02

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