You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "David J. M. Karlsen (JIRA)" <ji...@codehaus.org> on 2006/04/30 17:01:19 UTC

[jira] Laget: (MNG-2258) Wrong execution order of plugins in same phase

Wrong execution order of plugins in same phase
----------------------------------------------

         Key: MNG-2258
         URL: http://jira.codehaus.org/browse/MNG-2258
     Project: Maven 2
        Type: Bug

    Versions: 2.0.4    
 Environment: N/A
    Reporter: David J. M. Karlsen


AFAIK plugins should be execute in the same order as they are listed in the POM, when bound to the same phase. This does not happen, the execution order is arbitrary.

-- 
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-2258) Wrong execution order of plugins in same phase

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

Benson Margulies closed MNG-2258.
---------------------------------

       Resolution: Fixed
    Fix Version/s:     (was: Issues to be reviewed for 3.x)
                   3.0.3
         Assignee: Benson Margulies

The original problem reported in the original test case is fixed in 3.0.3. There is much other material in here, but if someone claims that it amounts to a defect, they can make a distinct JIRA with a test case to that effect.

> Wrong execution order of plugins in same phase
> ----------------------------------------------
>
>                 Key: MNG-2258
>                 URL: http://jira.codehaus.org/browse/MNG-2258
>             Project: Maven 2 & 3
>          Issue Type: Bug
>    Affects Versions: 2.0.4
>         Environment: N/A
>            Reporter: David J. M. Karlsen
>            Assignee: Benson Margulies
>            Priority: Blocker
>             Fix For: 3.0.3
>
>         Attachments: mavenTest.zip
>
>
> AFAIK plugins should be execute in the same order as they are listed in the POM, when bound to the same phase. This does not happen, the execution order is arbitrary.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MNG-2258) Wrong execution order of plugins in same phase

Posted by "Scott Glajch (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MNG-2258?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=299149#comment-299149 ] 

Scott Glajch edited comment on MNG-2258 at 5/18/12 9:55 AM:
------------------------------------------------------------

I'm not sure if this warrants reopening this bug or a new bug (or hopefully I'm missing something and just doing it wrong), but I think a slightly more complicated version of this use case is failing for us.

We are using 3.0.3 and in general, the ordering of plugins with the same lifecycle phase is consistent to the order they were declared in the pom.  However it appears that once we add another plugin execution for the same plugin type and the same lifecycle in a parent pom, the ordering gets screwed up.

Our pom has 3 plugins executing during the "prepare-package" lifecycle currently.  They are (in order of declaration in the pom):
maven-war-plugin:2.2.rsa3:exploded (default)
maven-rsa-generate-resource-bundles-plugin:1.21:process-product-conditional-files (default)
gmaven-plugin:1.3:execute (perform xslt transformation)

They execute in the correct order.  Then, in the parent pom for our projects we added this to the "prepare-package" lifecycle:
gmaven-plugin:1.3:execute (add-p4-variable-to-rebel-xml)

Now when our project runs, the plugins get executed in this order:

maven-rsa-generate-resource-bundles-plugin:1.21:process-product-conditional-files (default)
gmaven-plugin:1.3:execute (add-p4-variable-to-rebel-xml)
gmaven-plugin:1.3:execute (perform xslt transformation)

I don't know if the fourth goal (the war plugin goal) ever gets executed because the build fails during "perform xslt transformation" because it is relying on the war goal to run first.

I would hazard a guess that the problem has to do with either inserting plugin executions from a parent project, or the combination of that and the fact that the same plugin was defined in both the current and parent project.  The ordering logic might never have taken this into account because you're not allowed to define the same plugin twice within the same pom file.
                
      was (Author: glajchs):
    I'm not sure if this warrants reopening this bug or a new bug (or hopefully I'm missing something and just doing it wrong), but I think a slightly more complicated version of this use case is failing for us.

We are using 3.0.3, and in general, the ordering of plugins with the same lifecycle phase is consistent to the order they were declared in the pom.  However it appears that once we add another plugin execution for the same plugin type and the same lifecycle in a parent pom, the ordering gets screwed up.

Our pom has 3 plugins executing during the "prepare-package" lifecycle currently.  They are (in order of declaration in the pom):
maven-war-plugin:2.2.rsa3:exploded (default)
maven-rsa-generate-resource-bundles-plugin:1.21:process-product-conditional-files (default)
gmaven-plugin:1.3:execute (perform xslt transformation)

Just like they, they execute in the correct order.  Then, in the parent pom for our projects we added this to the "prepare-package" lifecycle:
gmaven-plugin:1.3:execute (add-p4-variable-to-rebel-xml)

Now when our project runs, the plugins get executed in this order:

maven-rsa-generate-resource-bundles-plugin:1.21:process-product-conditional-files (default)
gmaven-plugin:1.3:execute (add-p4-variable-to-rebel-xml)
gmaven-plugin:1.3:execute (perform xslt transformation)

I don't know if the fourth goal (the war plugin goal) ever gets executed because the build fails during "perform xslt transformation" because it is relying on the war goal to run first.

I would hazard a guess that the problem has to do with either inserting plugin executions from a parent project, or the combination of that and the fact that the same plugin was defined in both the current and parent project.  The ordering logic might never have taken this into account because you're not allowed to define the same plugin twice within the same pom file.
                  
> Wrong execution order of plugins in same phase
> ----------------------------------------------
>
>                 Key: MNG-2258
>                 URL: https://jira.codehaus.org/browse/MNG-2258
>             Project: Maven 2 & 3
>          Issue Type: Bug
>    Affects Versions: 2.0.4
>         Environment: N/A
>            Reporter: David J. M. Karlsen
>            Assignee: Benson Margulies
>            Priority: Blocker
>             Fix For: 3.0.3
>
>         Attachments: mavenTest.zip
>
>
> AFAIK plugins should be execute in the same order as they are listed in the POM, when bound to the same phase. This does not happen, the execution order is arbitrary.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MNG-2258) Wrong execution order of plugins in same phase

Posted by "David Haccoun (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-2258?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=178662#action_178662 ] 

David Haccoun commented on MNG-2258:
------------------------------------

Hi, 

This bug is always present in the 2.1 version.
On the state of this issue, we can see that is closed. The reason : Duplicate.
But where is the reference of the duplicated issue ?

Cheers,
David

> Wrong execution order of plugins in same phase
> ----------------------------------------------
>
>                 Key: MNG-2258
>                 URL: http://jira.codehaus.org/browse/MNG-2258
>             Project: Maven 2
>          Issue Type: Bug
>    Affects Versions: 2.0.4
>         Environment: N/A
>            Reporter: David J. M. Karlsen
>            Assignee: John Casey
>
> AFAIK plugins should be execute in the same order as they are listed in the POM, when bound to the same phase. This does not happen, the execution order is arbitrary.

-- 
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-2258) Wrong execution order of plugins in same phase

Posted by "Jayesh Lalwani (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-2258?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=183118#action_183118 ] 

Jayesh Lalwani commented on MNG-2258:
-------------------------------------

Just tried this issue in with 2.2 and doesn't look like it's fixed. The pom has a profile with 4 plugins in the following order
a) SQL-maven plugin. This plugin drops the database
b) hibernate3-maven-plugin :- this creates the database schema
c) dbunit-maven-plugin: populates the data with some test data
d) SQL-maven plugin:- Adds some more test data to the database

All ther executions are tied to process-test-resources phase.

Maven executes the plugins in order a, d, b, c, instead of a, b, c, d

> Wrong execution order of plugins in same phase
> ----------------------------------------------
>
>                 Key: MNG-2258
>                 URL: http://jira.codehaus.org/browse/MNG-2258
>             Project: Maven 2
>          Issue Type: Bug
>    Affects Versions: 2.0.4
>         Environment: N/A
>            Reporter: David J. M. Karlsen
>            Assignee: John Casey
>            Priority: Blocker
>             Fix For: 2.2.0
>
>
> AFAIK plugins should be execute in the same order as they are listed in the POM, when bound to the same phase. This does not happen, the execution order is arbitrary.

-- 
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-2258) Wrong execution order of plugins in same phase

Posted by "wargre (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-2258?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=205140#action_205140 ] 

wargre commented on MNG-2258:
-----------------------------


funny thing is adding an execution in pre-site made another reporting plugin ordering.



> Wrong execution order of plugins in same phase
> ----------------------------------------------
>
>                 Key: MNG-2258
>                 URL: http://jira.codehaus.org/browse/MNG-2258
>             Project: Maven 2 & 3
>          Issue Type: Bug
>    Affects Versions: 2.0.4
>         Environment: N/A
>            Reporter: David J. M. Karlsen
>            Priority: Blocker
>         Attachments: mavenTest.zip
>
>
> AFAIK plugins should be execute in the same order as they are listed in the POM, when bound to the same phase. This does not happen, the execution order is arbitrary.

-- 
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-2258) Wrong execution order of plugins in same phase

Posted by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-2258?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=227561#action_227561 ] 

Benjamin Bentmann commented on MNG-2258:
----------------------------------------

I just got aware of the fact that inheritance (and probably profile injection) has a rather counterintuitive effect on the plugin order in the POM. The plugin order given by a parent POM is dominant over the plugin order in a child POM. This circumstance might add to the observation that the POM order (as given in the current child project) is not respected.

> Wrong execution order of plugins in same phase
> ----------------------------------------------
>
>                 Key: MNG-2258
>                 URL: http://jira.codehaus.org/browse/MNG-2258
>             Project: Maven 2 & 3
>          Issue Type: Bug
>    Affects Versions: 2.0.4
>         Environment: N/A
>            Reporter: David J. M. Karlsen
>            Priority: Blocker
>         Attachments: mavenTest.zip
>
>
> AFAIK plugins should be execute in the same order as they are listed in the POM, when bound to the same phase. This does not happen, the execution order is arbitrary.

-- 
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-2258) Wrong execution order of plugins in same phase

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

John Casey updated MNG-2258:
----------------------------

         Priority: Blocker
    Fix Version/s: 2.2.0

> Wrong execution order of plugins in same phase
> ----------------------------------------------
>
>                 Key: MNG-2258
>                 URL: http://jira.codehaus.org/browse/MNG-2258
>             Project: Maven 2
>          Issue Type: Bug
>    Affects Versions: 2.0.4
>         Environment: N/A
>            Reporter: David J. M. Karlsen
>            Assignee: John Casey
>            Priority: Blocker
>             Fix For: 2.2.0
>
>
> AFAIK plugins should be execute in the same order as they are listed in the POM, when bound to the same phase. This does not happen, the execution order is arbitrary.

-- 
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-2258) Wrong execution order of plugins in same phase

Posted by "Justin K (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-2258?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=183762#action_183762 ] 

Justin K commented on MNG-2258:
-------------------------------

I Agree. This bug is not fixed in 2.2.0. 

> Wrong execution order of plugins in same phase
> ----------------------------------------------
>
>                 Key: MNG-2258
>                 URL: http://jira.codehaus.org/browse/MNG-2258
>             Project: Maven 2
>          Issue Type: Bug
>    Affects Versions: 2.0.4
>         Environment: N/A
>            Reporter: David J. M. Karlsen
>            Assignee: John Casey
>            Priority: Blocker
>             Fix For: 2.2.0
>
>
> AFAIK plugins should be execute in the same order as they are listed in the POM, when bound to the same phase. This does not happen, the execution order is arbitrary.

-- 
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-2258) Wrong execution order of plugins in same phase

Posted by "Hrotkó Gábor (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-2258?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=188803#action_188803 ] 

Hrotkó Gábor commented on MNG-2258:
-----------------------------------

I am not a big maven guru, but we have this problem now with 2.2.1

My breaf description is this:
the first transitive dependency version will win

{code:xml}
...
<dependency> <!-- has a dependency on myModul_X-1.0 -->
    <groupId>myCompany.myType</groupId>
    <artifactId>myModul_B</artifactId>
    <version>1.0</version>
    <type>myType</type>
</dependency>
<dependency> <!-- has a dependency on myModul_X-1.2 -->
    <groupId>myCompany.myType</groupId>
    <artifactId>myModul_A</artifactId>
    <version>1.0</version>
    <type>myType</type>
</dependency>   
...
{code}

after the build, myModul_X-1.0 will be included
...
[DEBUG]   myCompany.myType:myModul_A:myType:1.0:compile (selected for compile)
[DEBUG]     myCompany.myType:myModul_X:myType:1.2:compile (removed - nearer found: 1.0)
...


but when myModul_A is the first in the pom:

{code:xml}
...
<dependency> <!-- has a dependency on myModul_X-1.2 -->
    <groupId>myCompany.myType</groupId>
    <artifactId>myModul_A</artifactId>
    <version>1.0</version>
    <type>myType</type>
</dependency>  
<dependency> <!-- has a dependency on myModul_X-1.0 -->
    <groupId>myCompany.myType</groupId>
    <artifactId>myModul_B</artifactId>
    <version>1.0</version>
    <type>myType</type>
</dependency>
...
{code}

after the build, myModul_X-1.2 will be included

...
[DEBUG]     myCompany.myType:myModul_X:myType:1.0:compile (removed - nearer found: 1.2)
...


> Wrong execution order of plugins in same phase
> ----------------------------------------------
>
>                 Key: MNG-2258
>                 URL: http://jira.codehaus.org/browse/MNG-2258
>             Project: Maven 2
>          Issue Type: Bug
>    Affects Versions: 2.0.4
>         Environment: N/A
>            Reporter: David J. M. Karlsen
>            Priority: Blocker
>         Attachments: mavenTest.zip
>
>
> AFAIK plugins should be execute in the same order as they are listed in the POM, when bound to the same phase. This does not happen, the execution order is arbitrary.

-- 
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-2258) Wrong execution order of plugins in same phase

Posted by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-2258?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=183906#action_183906 ] 

Benjamin Bentmann commented on MNG-2258:
----------------------------------------

Could one of the reporters attach a working example POM to reproduce this?

> Wrong execution order of plugins in same phase
> ----------------------------------------------
>
>                 Key: MNG-2258
>                 URL: http://jira.codehaus.org/browse/MNG-2258
>             Project: Maven 2
>          Issue Type: Bug
>    Affects Versions: 2.0.4
>         Environment: N/A
>            Reporter: David J. M. Karlsen
>            Priority: Blocker
>
> AFAIK plugins should be execute in the same order as they are listed in the POM, when bound to the same phase. This does not happen, the execution order is arbitrary.

-- 
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-2258) Wrong execution order of plugins in same phase

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

John Casey updated MNG-2258:
----------------------------

           Priority:     (was: Major)
           Assignee: John Casey
    Patch Submitted:   (was: [Yes])

> Wrong execution order of plugins in same phase
> ----------------------------------------------
>
>                 Key: MNG-2258
>                 URL: http://jira.codehaus.org/browse/MNG-2258
>             Project: Maven 2
>          Issue Type: Bug
>    Affects Versions: 2.0.4
>         Environment: N/A
>            Reporter: David J. M. Karlsen
>            Assignee: John Casey
>             Fix For: 2.1.x
>
>
> AFAIK plugins should be execute in the same order as they are listed in the POM, when bound to the same phase. This does not happen, the execution order is arbitrary.

-- 
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-2258) Wrong execution order of plugins in same phase

Posted by "Daniel Zardi Fernandes (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-2258?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=217593#action_217593 ] 

Daniel Zardi Fernandes commented on MNG-2258:
---------------------------------------------

I found this bug while looking for a solution to the taglist-maven-plugin issue with the maven-jxr-plugin, so I have no knowledge about the execution order bug, but I managed to get the taglist plugin working without a second run of jxr.

I noticed that when running jxr in the pre-site phase the output where generated in the reports directory, not in the site directory, so it's probably an issue of the taglist-maven-plugin.

Try adding the following to the taglist-maven-plugin configuration, it worked for me (don't forget to change the directories to match your configuration if needed).
{code:xml}
<xrefLocation>target/site/xref</xrefLocation>
<testXrefLocation>target/site/xref-test</testXrefLocation>
{code}

Probably it won't help with this bug, but it's a better workaround than running jxr twice.

By the way, I'm using Maven 2.2.1 too and got the "Taglist plugin MUST be executed after the JXR plugin." message too.

> Wrong execution order of plugins in same phase
> ----------------------------------------------
>
>                 Key: MNG-2258
>                 URL: http://jira.codehaus.org/browse/MNG-2258
>             Project: Maven 2 & 3
>          Issue Type: Bug
>    Affects Versions: 2.0.4
>         Environment: N/A
>            Reporter: David J. M. Karlsen
>            Priority: Blocker
>         Attachments: mavenTest.zip
>
>
> AFAIK plugins should be execute in the same order as they are listed in the POM, when bound to the same phase. This does not happen, the execution order is arbitrary.

-- 
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-2258) Wrong execution order of plugins in same phase

Posted by "Martin Zeltner (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-2258?page=comments#action_70136 ] 
            
Martin Zeltner commented on MNG-2258:
-------------------------------------

I'd rate this issue much higher too. I've already solved the order problem with dependencies (see MNG-1412) and this issue can be solved equivalently.

> Wrong execution order of plugins in same phase
> ----------------------------------------------
>
>                 Key: MNG-2258
>                 URL: http://jira.codehaus.org/browse/MNG-2258
>             Project: Maven 2
>          Issue Type: Bug
>    Affects Versions: 2.0.4
>         Environment: N/A
>            Reporter: David J. M. Karlsen
>             Fix For: 2.1
>
>
> AFAIK plugins should be execute in the same order as they are listed in the POM, when bound to the same phase. This does not happen, the execution order is arbitrary.

-- 
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-2258) Wrong execution order of plugins in same phase

Posted by "Pablo (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-2258?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=204741#action_204741 ] 

Pablo commented on MNG-2258:
----------------------------

@wargre: My workaround is to run JXR twice:
* first time in the pre-site phase (with the POM snippet below), so you're sure it's done before the rest.
* second time in the standard reporting section, so you get the XREF links in the site menu.

{code}
<build>
  <plugins>
    <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-jxr-plugin</artifactId>
      <executions>
        <execution>
          <id>jxr-pre-site</id>
          <phase>pre-site</phase>
          <goals>
            <goal>jxr</goal>
            <goal>test-jxr</goal>
          </goals>
        </execution>
      </executions>
    </plugin>
  </plugins>
</build>
{code}

> Wrong execution order of plugins in same phase
> ----------------------------------------------
>
>                 Key: MNG-2258
>                 URL: http://jira.codehaus.org/browse/MNG-2258
>             Project: Maven 2 & 3
>          Issue Type: Bug
>    Affects Versions: 2.0.4
>         Environment: N/A
>            Reporter: David J. M. Karlsen
>            Priority: Blocker
>         Attachments: mavenTest.zip
>
>
> AFAIK plugins should be execute in the same order as they are listed in the POM, when bound to the same phase. This does not happen, the execution order is arbitrary.

-- 
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-2258) Wrong execution order of plugins in same phase

Posted by "Andrew Robinson (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-2258?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_125804 ] 

Andrew Robinson commented on MNG-2258:
--------------------------------------

This is a blocking issue, why is it being left to 2.1?

> Wrong execution order of plugins in same phase
> ----------------------------------------------
>
>                 Key: MNG-2258
>                 URL: http://jira.codehaus.org/browse/MNG-2258
>             Project: Maven 2
>          Issue Type: Bug
>    Affects Versions: 2.0.4
>         Environment: N/A
>            Reporter: David J. M. Karlsen
>            Assignee: John Casey
>             Fix For: 2.1
>
>
> AFAIK plugins should be execute in the same order as they are listed in the POM, when bound to the same phase. This does not happen, the execution order is arbitrary.

-- 
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] Reopened: (MNG-2258) Wrong execution order of plugins in same phase

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

John Casey reopened MNG-2258:
-----------------------------


possible lingering problem with this issue, which (hopefully) will be different from MNG-3719. I'll re-close as duplicate if we can't tease out some more details and a test case for this issue, since there is no hope of reliably fixing the issue if we can't reproduce it.

> Wrong execution order of plugins in same phase
> ----------------------------------------------
>
>                 Key: MNG-2258
>                 URL: http://jira.codehaus.org/browse/MNG-2258
>             Project: Maven 2
>          Issue Type: Bug
>    Affects Versions: 2.0.4
>         Environment: N/A
>            Reporter: David J. M. Karlsen
>            Assignee: John Casey
>             Fix For: 2.2.0
>
>
> AFAIK plugins should be execute in the same order as they are listed in the POM, when bound to the same phase. This does not happen, the execution order is arbitrary.

-- 
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] (MNG-2258) Wrong execution order of plugins in same phase

Posted by "Barrie Treloar (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MNG-2258?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=304859#comment-304859 ] 

Barrie Treloar commented on MNG-2258:
-------------------------------------

@Scott
I'd suggest filing a new bug and reference this one.
Test cases (and a patch) will make your chances of getting this fixed a lot higher.

@Hendy
See comment to Scott.

                
> Wrong execution order of plugins in same phase
> ----------------------------------------------
>
>                 Key: MNG-2258
>                 URL: https://jira.codehaus.org/browse/MNG-2258
>             Project: Maven 2 & 3
>          Issue Type: Bug
>    Affects Versions: 2.0.4
>         Environment: N/A
>            Reporter: David J. M. Karlsen
>            Assignee: Benson Margulies
>            Priority: Blocker
>             Fix For: 3.0.3
>
>         Attachments: mavenTest.zip
>
>
> AFAIK plugins should be execute in the same order as they are listed in the POM, when bound to the same phase. This does not happen, the execution order is arbitrary.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MNG-2258) Wrong execution order of plugins in same phase

Posted by "Martin Zeltner (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-2258?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=200336#action_200336 ] 

Martin Zeltner commented on MNG-2258:
-------------------------------------

Hi Julien

Are you sure that you're using Maven 2.2.1, the newest one? All previous version where for trash, when you where going into "details", like the execution order in one phase. Also the current version needs still some fine tuning, that I'm currently working out.

Cheers
Martin

> Wrong execution order of plugins in same phase
> ----------------------------------------------
>
>                 Key: MNG-2258
>                 URL: http://jira.codehaus.org/browse/MNG-2258
>             Project: Maven 2
>          Issue Type: Bug
>    Affects Versions: 2.0.4
>         Environment: N/A
>            Reporter: David J. M. Karlsen
>            Priority: Blocker
>         Attachments: mavenTest.zip
>
>
> AFAIK plugins should be execute in the same order as they are listed in the POM, when bound to the same phase. This does not happen, the execution order is arbitrary.

-- 
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] (MNG-2258) Wrong execution order of plugins in same phase

Posted by "Derrick Isaacson (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MNG-2258?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=301931#comment-301931 ] 

Derrick Isaacson commented on MNG-2258:
---------------------------------------

I'm seeing the same issue as Scott in a project.
                
> Wrong execution order of plugins in same phase
> ----------------------------------------------
>
>                 Key: MNG-2258
>                 URL: https://jira.codehaus.org/browse/MNG-2258
>             Project: Maven 2 & 3
>          Issue Type: Bug
>    Affects Versions: 2.0.4
>         Environment: N/A
>            Reporter: David J. M. Karlsen
>            Assignee: Benson Margulies
>            Priority: Blocker
>             Fix For: 3.0.3
>
>         Attachments: mavenTest.zip
>
>
> AFAIK plugins should be execute in the same order as they are listed in the POM, when bound to the same phase. This does not happen, the execution order is arbitrary.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Closed: (MNG-2258) Wrong execution order of plugins in same phase

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

John Casey closed MNG-2258.
---------------------------

    Resolution: Duplicate

See MNG-2784

> Wrong execution order of plugins in same phase
> ----------------------------------------------
>
>                 Key: MNG-2258
>                 URL: http://jira.codehaus.org/browse/MNG-2258
>             Project: Maven 2
>          Issue Type: Bug
>    Affects Versions: 2.0.4
>         Environment: N/A
>            Reporter: David J. M. Karlsen
>            Assignee: John Casey
>             Fix For: 2.1.x
>
>
> AFAIK plugins should be execute in the same order as they are listed in the POM, when bound to the same phase. This does not happen, the execution order is arbitrary.

-- 
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-2258) Wrong execution order of plugins in same phase

Posted by "John Casey (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-2258?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=187501#action_187501 ] 

John Casey commented on MNG-2258:
---------------------------------

Re-specifying the same plugin in two different XML blocks of the build section within the same POM (without using profiles) is NOT valid. This is a recipe for disaster. If users must replicate any new configurations across multiple plugin sections just to get consistent behavior for all mojos in a plugin, this will cause massive confusion.

I do agree that we should detect this scenario and fail with a validation error, so I'm not going to close this issue yet. But if you want two mojo executions from the same plugin to happen before and after another mojo from another plugin, you must assign them to different phases to arrange this.

> Wrong execution order of plugins in same phase
> ----------------------------------------------
>
>                 Key: MNG-2258
>                 URL: http://jira.codehaus.org/browse/MNG-2258
>             Project: Maven 2
>          Issue Type: Bug
>    Affects Versions: 2.0.4
>         Environment: N/A
>            Reporter: David J. M. Karlsen
>            Priority: Blocker
>         Attachments: mavenTest.zip
>
>
> AFAIK plugins should be execute in the same order as they are listed in the POM, when bound to the same phase. This does not happen, the execution order is arbitrary.

-- 
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-2258) Wrong execution order of plugins in same phase

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

Benson Margulies updated MNG-2258:
----------------------------------

    Labels: maven-messy  (was: )

> Wrong execution order of plugins in same phase
> ----------------------------------------------
>
>                 Key: MNG-2258
>                 URL: http://jira.codehaus.org/browse/MNG-2258
>             Project: Maven 2 & 3
>          Issue Type: Bug
>    Affects Versions: 2.0.4
>         Environment: N/A
>            Reporter: David J. M. Karlsen
>            Priority: Blocker
>              Labels: maven-messy
>             Fix For: Issues to be reviewed for 3.x
>
>         Attachments: mavenTest.zip
>
>
> AFAIK plugins should be execute in the same order as they are listed in the POM, when bound to the same phase. This does not happen, the execution order is arbitrary.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MNG-2258) Wrong execution order of plugins in same phase

Posted by "Scott Glajch (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MNG-2258?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=299149#comment-299149 ] 

Scott Glajch commented on MNG-2258:
-----------------------------------

I'm not sure if this warrants reopening this bug or a new bug (or hopefully I'm missing something and just doing it wrong), but I think a slightly more complicated version of this use case is failing for us.

We are using 3.0.3, and in general, the ordering of plugins with the same lifecycle phase is consistent to the order they were declared in the pom.  However it appears that once we add another plugin execution for the same plugin type and the same lifecycle in a parent pom, the ordering gets screwed up.

Our pom has 3 plugins executing during the "prepare-package" lifecycle currently.  They are (in order of declaration in the pom):
maven-war-plugin:2.2.rsa3:exploded (default)
maven-rsa-generate-resource-bundles-plugin:1.21:process-product-conditional-files (default)
gmaven-plugin:1.3:execute (perform xslt transformation)

Just like they, they execute in the correct order.  Then, in the parent pom for our projects we added this to the "prepare-package" lifecycle:
gmaven-plugin:1.3:execute (add-p4-variable-to-rebel-xml)

Now when our project runs, the plugins get executed in this order:

maven-rsa-generate-resource-bundles-plugin:1.21:process-product-conditional-files (default)
gmaven-plugin:1.3:execute (add-p4-variable-to-rebel-xml)
gmaven-plugin:1.3:execute (perform xslt transformation)

I don't know if the fourth goal (the war plugin goal) ever gets executed because the build fails during "perform xslt transformation" because it is relying on the war goal to run first.

I would hazard a guess that the problem has to do with either inserting plugin executions from a parent project, or the combination of that and the fact that the same plugin was defined in both the current and parent project.  The ordering logic might never have taken this into account because you're not allowed to define the same plugin twice within the same pom file.
                
> Wrong execution order of plugins in same phase
> ----------------------------------------------
>
>                 Key: MNG-2258
>                 URL: https://jira.codehaus.org/browse/MNG-2258
>             Project: Maven 2 & 3
>          Issue Type: Bug
>    Affects Versions: 2.0.4
>         Environment: N/A
>            Reporter: David J. M. Karlsen
>            Assignee: Benson Margulies
>            Priority: Blocker
>             Fix For: 3.0.3
>
>         Attachments: mavenTest.zip
>
>
> AFAIK plugins should be execute in the same order as they are listed in the POM, when bound to the same phase. This does not happen, the execution order is arbitrary.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MNG-2258) Wrong execution order of plugins in same phase

Posted by "Fredrik Vraalsen (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-2258?page=comments#action_65019 ] 

Fredrik Vraalsen commented on MNG-2258:
---------------------------------------

I'm having the same problem.  I need to run two plugins in the generate-sources phase, where one depends on the output of the other.

For more information, please see http://www.nabble.com/Plugin-execution-order-within-lifecycle-phase-t1541372.html#a4187121


> Wrong execution order of plugins in same phase
> ----------------------------------------------
>
>          Key: MNG-2258
>          URL: http://jira.codehaus.org/browse/MNG-2258
>      Project: Maven 2
>         Type: Bug

>     Versions: 2.0.4
>  Environment: N/A
>     Reporter: David J. M. Karlsen

>
>
> AFAIK plugins should be execute in the same order as they are listed in the POM, when bound to the same phase. This does not happen, the execution order is arbitrary.

-- 
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-2258) Wrong execution order of plugins in same phase

Posted by "Viktor Nordling (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-2258?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_113918 ] 

Viktor Nordling commented on MNG-2258:
--------------------------------------

It seems that this issue is not actually resolved. The fix version is set to 2.1, but if I am not mistaken, 2.1 has not been released yet?

Since we need this issue to be fixed for our project, I would be happy if it could be reopened.

> Wrong execution order of plugins in same phase
> ----------------------------------------------
>
>                 Key: MNG-2258
>                 URL: http://jira.codehaus.org/browse/MNG-2258
>             Project: Maven 2
>          Issue Type: Bug
>    Affects Versions: 2.0.4
>         Environment: N/A
>            Reporter: David J. M. Karlsen
>            Assignee: John Casey
>             Fix For: 2.1
>
>
> AFAIK plugins should be execute in the same order as they are listed in the POM, when bound to the same phase. This does not happen, the execution order is arbitrary.

-- 
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-2258) Wrong execution order of plugins in same phase

Posted by "Sandra Bogaert (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-2258?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=156957#action_156957 ] 

Sandra Bogaert commented on MNG-2258:
-------------------------------------

Hi, 
What about this issue ?
Do you have a release date ?
Thanks in advance

> Wrong execution order of plugins in same phase
> ----------------------------------------------
>
>                 Key: MNG-2258
>                 URL: http://jira.codehaus.org/browse/MNG-2258
>             Project: Maven 2
>          Issue Type: Bug
>    Affects Versions: 2.0.4
>         Environment: N/A
>            Reporter: David J. M. Karlsen
>            Assignee: John Casey
>
> AFAIK plugins should be execute in the same order as they are listed in the POM, when bound to the same phase. This does not happen, the execution order is arbitrary.

-- 
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-2258) Wrong execution order of plugins in same phase

Posted by "Julien HENRY (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-2258?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=200327#action_200327 ] 

Julien HENRY commented on MNG-2258:
-----------------------------------

In my corporate parent pom I have the following in reporting section:

{code:xml}
<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-jxr-plugin</artifactId>
    <version>2.1</version>
</plugin>
 ...
<plugin>
    <groupId>org.codehaus.mojo</groupId>
    <artifactId>taglist-maven-plugin</artifactId>
    <version>2.4</version>
</plugin>
{code}
(in this order)

Then I have create a sample test project from Maven quickstart archetype but:

{noformat}
>mvn clean install site dependency:tree
...
[INFO] Generating "Tag List" report.
[ERROR] Taglist plugin MUST be executed after the JXR plugin.  No links to xref were generated.
[WARNING] Unable to locate Source XRef to link to - DISABLED
{noformat}

Looking at the log I can see reporting plugins are generated in an order completely different of the reporting section order.

> Wrong execution order of plugins in same phase
> ----------------------------------------------
>
>                 Key: MNG-2258
>                 URL: http://jira.codehaus.org/browse/MNG-2258
>             Project: Maven 2
>          Issue Type: Bug
>    Affects Versions: 2.0.4
>         Environment: N/A
>            Reporter: David J. M. Karlsen
>            Priority: Blocker
>         Attachments: mavenTest.zip
>
>
> AFAIK plugins should be execute in the same order as they are listed in the POM, when bound to the same phase. This does not happen, the execution order is arbitrary.

-- 
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-2258) Wrong execution order of plugins in same phase

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

E K updated MNG-2258:
---------------------

    Attachment: mavenTest.zip

> Wrong execution order of plugins in same phase
> ----------------------------------------------
>
>                 Key: MNG-2258
>                 URL: http://jira.codehaus.org/browse/MNG-2258
>             Project: Maven 2
>          Issue Type: Bug
>    Affects Versions: 2.0.4
>         Environment: N/A
>            Reporter: David J. M. Karlsen
>            Priority: Blocker
>         Attachments: mavenTest.zip
>
>
> AFAIK plugins should be execute in the same order as they are listed in the POM, when bound to the same phase. This does not happen, the execution order is arbitrary.

-- 
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-2258) Wrong execution order of plugins in same phase

Posted by "David Hay (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-2258?page=comments#action_70086 ] 
            
David Hay commented on MNG-2258:
--------------------------------

I'd actually rate this much higher priority.  I've already run into this limitation several times during the development of my project.  In particular, I want to run the dependency-maven-plugin:copy followed by the assembly plugin.  But maven wants to run them in the opposite order, which doesn't work very well.

I've also wanted to run the hibernate3-plugin to generate my DDL followed by an antrun plugin to load some sample data, but I can't be assured that the plugins will run in that order.

> Wrong execution order of plugins in same phase
> ----------------------------------------------
>
>                 Key: MNG-2258
>                 URL: http://jira.codehaus.org/browse/MNG-2258
>             Project: Maven 2
>          Issue Type: Bug
>    Affects Versions: 2.0.4
>         Environment: N/A
>            Reporter: David J. M. Karlsen
>             Fix For: 2.1
>
>
> AFAIK plugins should be execute in the same order as they are listed in the POM, when bound to the same phase. This does not happen, the execution order is arbitrary.

-- 
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-2258) Wrong execution order of plugins in same phase

Posted by "Sebastian Paul (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-2258?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=221919#action_221919 ] 

Sebastian Paul commented on MNG-2258:
-------------------------------------

@Daniel: How did you work around this issue without running jxr twice? I am using Maven 2.2.1 too, and have the same issue. When jxr only runs once in pre-site, the report does not contain a link to the source (Reports section in the navigation area). Only the tag list plugin correctly links to the source...

> Wrong execution order of plugins in same phase
> ----------------------------------------------
>
>                 Key: MNG-2258
>                 URL: http://jira.codehaus.org/browse/MNG-2258
>             Project: Maven 2 & 3
>          Issue Type: Bug
>    Affects Versions: 2.0.4
>         Environment: N/A
>            Reporter: David J. M. Karlsen
>            Priority: Blocker
>         Attachments: mavenTest.zip
>
>
> AFAIK plugins should be execute in the same order as they are listed in the POM, when bound to the same phase. This does not happen, the execution order is arbitrary.

-- 
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-2258) Wrong execution order of plugins in same phase

Posted by "Graham Lea (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MNG-2258?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=270973#comment-270973 ] 

Graham Lea commented on MNG-2258:
---------------------------------

Please consider reviewing MNG-3522 and MNG-5090 as examples of distinct JIRAs with test cases that are not resovled in 3.0.3.

> Wrong execution order of plugins in same phase
> ----------------------------------------------
>
>                 Key: MNG-2258
>                 URL: https://jira.codehaus.org/browse/MNG-2258
>             Project: Maven 2 & 3
>          Issue Type: Bug
>    Affects Versions: 2.0.4
>         Environment: N/A
>            Reporter: David J. M. Karlsen
>            Assignee: Benson Margulies
>            Priority: Blocker
>             Fix For: 3.0.3
>
>         Attachments: mavenTest.zip
>
>
> AFAIK plugins should be execute in the same order as they are listed in the POM, when bound to the same phase. This does not happen, the execution order is arbitrary.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (MNG-2258) Wrong execution order of plugins in same phase

Posted by "John Casey (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-2258?page=all ]

John Casey updated MNG-2258:
----------------------------

    Fix Version: 2.1

> Wrong execution order of plugins in same phase
> ----------------------------------------------
>
>          Key: MNG-2258
>          URL: http://jira.codehaus.org/browse/MNG-2258
>      Project: Maven 2
>         Type: Bug

>     Versions: 2.0.4
>  Environment: N/A
>     Reporter: David J. M. Karlsen
>      Fix For: 2.1

>
>
> AFAIK plugins should be execute in the same order as they are listed in the POM, when bound to the same phase. This does not happen, the execution order is arbitrary.

-- 
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-2258) Wrong execution order of plugins in same phase

Posted by "Brian Topping (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-2258?page=comments#action_78361 ] 
            
Brian Topping commented on MNG-2258:
------------------------------------

Same problem here.  It's possible to make a new goal on a mojo so that one contains another, but there's no other way to get them to cleanly execute in order.

> Wrong execution order of plugins in same phase
> ----------------------------------------------
>
>                 Key: MNG-2258
>                 URL: http://jira.codehaus.org/browse/MNG-2258
>             Project: Maven 2
>          Issue Type: Bug
>    Affects Versions: 2.0.4
>         Environment: N/A
>            Reporter: David J. M. Karlsen
>             Fix For: 2.1
>
>
> AFAIK plugins should be execute in the same order as they are listed in the POM, when bound to the same phase. This does not happen, the execution order is arbitrary.

-- 
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-2258) Wrong execution order of plugins in same phase

Posted by "wargre (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-2258?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=204734#action_204734 ] 

wargre commented on MNG-2258:
-----------------------------

Hi, 

i've got same issue as Julien with 2.2.1 version. 

Does anyone have a workaround?



> Wrong execution order of plugins in same phase
> ----------------------------------------------
>
>                 Key: MNG-2258
>                 URL: http://jira.codehaus.org/browse/MNG-2258
>             Project: Maven 2 & 3
>          Issue Type: Bug
>    Affects Versions: 2.0.4
>         Environment: N/A
>            Reporter: David J. M. Karlsen
>            Priority: Blocker
>         Attachments: mavenTest.zip
>
>
> AFAIK plugins should be execute in the same order as they are listed in the POM, when bound to the same phase. This does not happen, the execution order is arbitrary.

-- 
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-2258) Wrong execution order of plugins in same phase

Posted by "Laird Nelson (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-2258?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=225995#action_225995 ] 

Laird Nelson commented on MNG-2258:
-----------------------------------

This bug is still present in Maven 2.2.1.

My project runs a goal from maven-dependency-plugin, maven-resources-plugin and maven-jar-plugin during the prepare-package phase.

These are listed in that order.

They are executed in an arbitrary order.

> Wrong execution order of plugins in same phase
> ----------------------------------------------
>
>                 Key: MNG-2258
>                 URL: http://jira.codehaus.org/browse/MNG-2258
>             Project: Maven 2 & 3
>          Issue Type: Bug
>    Affects Versions: 2.0.4
>         Environment: N/A
>            Reporter: David J. M. Karlsen
>            Priority: Blocker
>         Attachments: mavenTest.zip
>
>
> AFAIK plugins should be execute in the same order as they are listed in the POM, when bound to the same phase. This does not happen, the execution order is arbitrary.

-- 
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-2258) Wrong execution order of plugins in same phase

Posted by "Sebastian Davids (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-2258?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_96876 ] 

Sebastian Davids commented on MNG-2258:
---------------------------------------

This bug should be solved independent of MNG-1412.

This is a *serious* defect.

Considering the high number of votes and watchers it is important to a lot of people.

It should be backported to 2.0.x stream.

After that a new 2.0.x release should be made.

Having to wait over one year for a simple HashSet -> LinkedHashSet and HashMap -> LinkedHashMap replacement is ridiculous.

Even more so, considering that a patch has been supplied over half a year ago.

@@ Use Case @@

<project ...>
  ...
  <modules>
    <module>ejb</module>
    <module>war</module>
  </modules>
...
  <build>
...
    <plugins>
      <plugin>
        <artifactId>maven-antrun-plugin</artifactId>
        <inherited>false</inherited>
        <executions>
          <execution>
            <phase>install</phase>
            <configuration>
              <tasks>
... deploy to server ...
              </tasks>
            </configuration>
            <goals>
              <goal>run</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
...    
  </build>
...
</project>



Let's say "ejb" contains EJB stuff and "war" contains the web application; "war" depends on "ejb"; and both are children of a parent POM, so that the generated "ejb" JAR gets packaged into the WAR.

Now we want to be able to use "install" to deploy the created WAR to the server (yes, there's Cargo, but it does not support all JEE containers, yet.)

We have to set <inherited>false</inherited> so Maven won't run the deployment for "ejb" and "war".

But it does not work because "maven-antrun-plugin" is run before the children ("ejb" and "war") are run.

> Wrong execution order of plugins in same phase
> ----------------------------------------------
>
>                 Key: MNG-2258
>                 URL: http://jira.codehaus.org/browse/MNG-2258
>             Project: Maven 2
>          Issue Type: Bug
>    Affects Versions: 2.0.4
>         Environment: N/A
>            Reporter: David J. M. Karlsen
>             Fix For: 2.1.x
>
>
> AFAIK plugins should be execute in the same order as they are listed in the POM, when bound to the same phase. This does not happen, the execution order is arbitrary.

-- 
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-2258) Wrong execution order of plugins in same phase

Posted by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-2258?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=188804#action_188804 ] 

Benjamin Bentmann commented on MNG-2258:
----------------------------------------

Hrotkó, the dependency resolution works as designed, cf. [Introduction to the Dependency Mechanism|http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#Transitive_Dependencies]. If you don't want to rely on the nearest-/first-wins strategy for conflict resolution, you can use {{<dependencyManagement>}} to control the versions of the transitive dependencies.

> Wrong execution order of plugins in same phase
> ----------------------------------------------
>
>                 Key: MNG-2258
>                 URL: http://jira.codehaus.org/browse/MNG-2258
>             Project: Maven 2
>          Issue Type: Bug
>    Affects Versions: 2.0.4
>         Environment: N/A
>            Reporter: David J. M. Karlsen
>            Priority: Blocker
>         Attachments: mavenTest.zip
>
>
> AFAIK plugins should be execute in the same order as they are listed in the POM, when bound to the same phase. This does not happen, the execution order is arbitrary.

-- 
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-2258) Wrong execution order of plugins in same phase

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

Brett Porter updated MNG-2258:
------------------------------

    Fix Version/s:     (was: 2.1)

> Wrong execution order of plugins in same phase
> ----------------------------------------------
>
>                 Key: MNG-2258
>                 URL: http://jira.codehaus.org/browse/MNG-2258
>             Project: Maven 2
>          Issue Type: Bug
>    Affects Versions: 2.0.4
>         Environment: N/A
>            Reporter: David J. M. Karlsen
>            Assignee: John Casey
>
> AFAIK plugins should be execute in the same order as they are listed in the POM, when bound to the same phase. This does not happen, the execution order is arbitrary.

-- 
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-2258) Wrong execution order of plugins in same phase

Posted by "Daniel Zardi Fernandes (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-2258?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=217593#action_217593 ] 

Daniel Zardi Fernandes edited comment on MNG-2258 at 4/11/10 5:54 PM:
----------------------------------------------------------------------

I found this bug while looking for a solution to the taglist-maven-plugin issue with the maven-jxr-plugin, so I have no knowledge about the execution order bug, but I managed to get the taglist plugin working without a second run of jxr.

I noticed that when running jxr in the pre-site phase the output where generated in the reports directory, not in the site directory, so it's probably an issue of the taglist-maven-plugin.

Try adding the following to the taglist-maven-plugin configuration, it worked for me (don't forget to change the directories to match your configuration if needed).
{code:xml}
<xrefLocation>target/site/xref</xrefLocation>
<testXrefLocation>target/site/xref-test</testXrefLocation>
{code}

Probably it won't help with this bug, but it's a better workaround than running jxr twice.

By the way, I'm using Maven 2.2.1 and got the "Taglist plugin MUST be executed after the JXR plugin." message too.

      was (Author: zardi):
    I found this bug while looking for a solution to the taglist-maven-plugin issue with the maven-jxr-plugin, so I have no knowledge about the execution order bug, but I managed to get the taglist plugin working without a second run of jxr.

I noticed that when running jxr in the pre-site phase the output where generated in the reports directory, not in the site directory, so it's probably an issue of the taglist-maven-plugin.

Try adding the following to the taglist-maven-plugin configuration, it worked for me (don't forget to change the directories to match your configuration if needed).
{code:xml}
<xrefLocation>target/site/xref</xrefLocation>
<testXrefLocation>target/site/xref-test</testXrefLocation>
{code}

Probably it won't help with this bug, but it's a better workaround than running jxr twice.

By the way, I'm using Maven 2.2.1 too and got the "Taglist plugin MUST be executed after the JXR plugin." message too.
  
> Wrong execution order of plugins in same phase
> ----------------------------------------------
>
>                 Key: MNG-2258
>                 URL: http://jira.codehaus.org/browse/MNG-2258
>             Project: Maven 2 & 3
>          Issue Type: Bug
>    Affects Versions: 2.0.4
>         Environment: N/A
>            Reporter: David J. M. Karlsen
>            Priority: Blocker
>         Attachments: mavenTest.zip
>
>
> AFAIK plugins should be execute in the same order as they are listed in the POM, when bound to the same phase. This does not happen, the execution order is arbitrary.

-- 
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] Reopened: (MNG-2258) Wrong execution order of plugins in same phase

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

Wendy Smoak reopened MNG-2258:
------------------------------

      Assignee:     (was: John Casey)

Reopening based on comments.   Can someone clarify the expected behavior and point to docs/tests which explain it?

> Wrong execution order of plugins in same phase
> ----------------------------------------------
>
>                 Key: MNG-2258
>                 URL: http://jira.codehaus.org/browse/MNG-2258
>             Project: Maven 2
>          Issue Type: Bug
>    Affects Versions: 2.0.4
>         Environment: N/A
>            Reporter: David J. M. Karlsen
>            Priority: Blocker
>             Fix For: 2.2.0
>
>
> AFAIK plugins should be execute in the same order as they are listed in the POM, when bound to the same phase. This does not happen, the execution order is arbitrary.

-- 
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] (MNG-2258) Wrong execution order of plugins in same phase

Posted by "Hendy Irawan (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MNG-2258?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=304874#comment-304874 ] 

Hendy Irawan commented on MNG-2258:
-----------------------------------

Thank you Barrie.

I tried to reproduce the problem but it seems Maven 3.0.4 is fine! (yaay :-)

The problem seems to be in a thirdparty plugin, org.apache.karaf.tooling : features-maven-plugin : generate-features-xml.

For those curious, or want to test, the testcase is in : https://github.com/ceefour/generate-features-xml-bug

Related bug : https://issues.apache.org/jira/browse/KARAF-1681
                
> Wrong execution order of plugins in same phase
> ----------------------------------------------
>
>                 Key: MNG-2258
>                 URL: https://jira.codehaus.org/browse/MNG-2258
>             Project: Maven 2 & 3
>          Issue Type: Bug
>    Affects Versions: 2.0.4
>         Environment: N/A
>            Reporter: David J. M. Karlsen
>            Assignee: Benson Margulies
>            Priority: Blocker
>             Fix For: 3.0.3
>
>         Attachments: mavenTest.zip
>
>
> AFAIK plugins should be execute in the same order as they are listed in the POM, when bound to the same phase. This does not happen, the execution order is arbitrary.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Closed: (MNG-2258) Wrong execution order of plugins in same phase

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

John Casey closed MNG-2258.
---------------------------

    Resolution: Duplicate

Re-closing as duplicate since there hasn't been any sort of update on the ongoing reports of problems. We can come back to this in the next release if there is still a problem (other than the problem of a limited lifecycle vocabulary, that is).

> Wrong execution order of plugins in same phase
> ----------------------------------------------
>
>                 Key: MNG-2258
>                 URL: http://jira.codehaus.org/browse/MNG-2258
>             Project: Maven 2
>          Issue Type: Bug
>    Affects Versions: 2.0.4
>         Environment: N/A
>            Reporter: David J. M. Karlsen
>            Assignee: John Casey
>            Priority: Blocker
>             Fix For: 2.2.0
>
>
> AFAIK plugins should be execute in the same order as they are listed in the POM, when bound to the same phase. This does not happen, the execution order is arbitrary.

-- 
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-2258) Wrong execution order of plugins in same phase

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

Wendy Smoak updated MNG-2258:
-----------------------------

    Fix Version/s:     (was: 2.2.0)

Un-setting fix version (was 2.2.0) as it was marked as a duplicate and it's not clear it was ever fixed...

> Wrong execution order of plugins in same phase
> ----------------------------------------------
>
>                 Key: MNG-2258
>                 URL: http://jira.codehaus.org/browse/MNG-2258
>             Project: Maven 2
>          Issue Type: Bug
>    Affects Versions: 2.0.4
>         Environment: N/A
>            Reporter: David J. M. Karlsen
>            Priority: Blocker
>
> AFAIK plugins should be execute in the same order as they are listed in the POM, when bound to the same phase. This does not happen, the execution order is arbitrary.

-- 
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] (MNG-2258) Wrong execution order of plugins in same phase

Posted by "Hendy Irawan (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MNG-2258?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=304856#comment-304856 ] 

Hendy Irawan commented on MNG-2258:
-----------------------------------

This bug isn't fixed yet. I'm using Maven 3.0.4 and the ordering is still arbitrary :(
                
> Wrong execution order of plugins in same phase
> ----------------------------------------------
>
>                 Key: MNG-2258
>                 URL: https://jira.codehaus.org/browse/MNG-2258
>             Project: Maven 2 & 3
>          Issue Type: Bug
>    Affects Versions: 2.0.4
>         Environment: N/A
>            Reporter: David J. M. Karlsen
>            Assignee: Benson Margulies
>            Priority: Blocker
>             Fix For: 3.0.3
>
>         Attachments: mavenTest.zip
>
>
> AFAIK plugins should be execute in the same order as they are listed in the POM, when bound to the same phase. This does not happen, the execution order is arbitrary.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MNG-2258) Wrong execution order of plugins in same phase

Posted by "Benson Margulies (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MNG-2258?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=270991#comment-270991 ] 

Benson Margulies commented on MNG-2258:
---------------------------------------

I ran the test case and it executed in the right order with 3.0.3. I don't know what to suggest if that's not happening for you.

> Wrong execution order of plugins in same phase
> ----------------------------------------------
>
>                 Key: MNG-2258
>                 URL: https://jira.codehaus.org/browse/MNG-2258
>             Project: Maven 2 & 3
>          Issue Type: Bug
>    Affects Versions: 2.0.4
>         Environment: N/A
>            Reporter: David J. M. Karlsen
>            Assignee: Benson Margulies
>            Priority: Blocker
>             Fix For: 3.0.3
>
>         Attachments: mavenTest.zip
>
>
> AFAIK plugins should be execute in the same order as they are listed in the POM, when bound to the same phase. This does not happen, the execution order is arbitrary.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Issue Comment Edited: (MNG-2258) Wrong execution order of plugins in same phase

Posted by "Hrotkó Gábor (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-2258?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=188803#action_188803 ] 

Hrotkó Gábor edited comment on MNG-2258 at 8/27/09 9:17 AM:
------------------------------------------------------------

I am not a big maven guru, but we have this problem now with 2.2.1

My breaf description is this:
the first transitive dependency version will win

{code:xml}
...
<dependency> <!-- has a dependency on myModul_X-1.0 -->
    <groupId>myCompany.myType</groupId>
    <artifactId>myModul_B</artifactId>
    <version>1.0</version>
    <type>myType</type>
</dependency>
<dependency> <!-- has a dependency on myModul_X-1.2 -->
    <groupId>myCompany.myType</groupId>
    <artifactId>myModul_A</artifactId>
    <version>1.0</version>
    <type>myType</type>
</dependency>   
...
{code}

after the build, myModul_X-1.0 will be included
...
[DEBUG]   myCompany.myType:myModul_A:myType:1.0:compile (selected for compile)
[DEBUG]     myCompany.myType:myModul_X:myType:1.2:compile (removed - nearer found: 1.0)
...


but when myModul_A is the first in the pom:

{code:xml}
...
<dependency> <!-- has a dependency on myModul_X-1.2 -->
    <groupId>myCompany.myType</groupId>
    <artifactId>myModul_A</artifactId>
    <version>1.0</version>
    <type>myType</type>
</dependency>  
<dependency> <!-- has a dependency on myModul_X-1.0 -->
    <groupId>myCompany.myType</groupId>
    <artifactId>myModul_B</artifactId>
    <version>1.0</version>
    <type>myType</type>
</dependency>
...
{code}

after the build, myModul_X-1.2 will be included

...
[DEBUG]     myCompany.myType:myModul_X:myType:1.0:compile (removed - nearer found: 1.2)
...

additional info:
it worked ok with 2.0.8 , but not since 2.0.9

      was (Author: roti):
    I am not a big maven guru, but we have this problem now with 2.2.1

My breaf description is this:
the first transitive dependency version will win

{code:xml}
...
<dependency> <!-- has a dependency on myModul_X-1.0 -->
    <groupId>myCompany.myType</groupId>
    <artifactId>myModul_B</artifactId>
    <version>1.0</version>
    <type>myType</type>
</dependency>
<dependency> <!-- has a dependency on myModul_X-1.2 -->
    <groupId>myCompany.myType</groupId>
    <artifactId>myModul_A</artifactId>
    <version>1.0</version>
    <type>myType</type>
</dependency>   
...
{code}

after the build, myModul_X-1.0 will be included
...
[DEBUG]   myCompany.myType:myModul_A:myType:1.0:compile (selected for compile)
[DEBUG]     myCompany.myType:myModul_X:myType:1.2:compile (removed - nearer found: 1.0)
...


but when myModul_A is the first in the pom:

{code:xml}
...
<dependency> <!-- has a dependency on myModul_X-1.2 -->
    <groupId>myCompany.myType</groupId>
    <artifactId>myModul_A</artifactId>
    <version>1.0</version>
    <type>myType</type>
</dependency>  
<dependency> <!-- has a dependency on myModul_X-1.0 -->
    <groupId>myCompany.myType</groupId>
    <artifactId>myModul_B</artifactId>
    <version>1.0</version>
    <type>myType</type>
</dependency>
...
{code}

after the build, myModul_X-1.2 will be included

...
[DEBUG]     myCompany.myType:myModul_X:myType:1.0:compile (removed - nearer found: 1.2)
...

  
> Wrong execution order of plugins in same phase
> ----------------------------------------------
>
>                 Key: MNG-2258
>                 URL: http://jira.codehaus.org/browse/MNG-2258
>             Project: Maven 2
>          Issue Type: Bug
>    Affects Versions: 2.0.4
>         Environment: N/A
>            Reporter: David J. M. Karlsen
>            Priority: Blocker
>         Attachments: mavenTest.zip
>
>
> AFAIK plugins should be execute in the same order as they are listed in the POM, when bound to the same phase. This does not happen, the execution order is arbitrary.

-- 
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-2258) Wrong execution order of plugins in same phase

Posted by "Julien HENRY (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-2258?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=200327#action_200327 ] 

Julien HENRY edited comment on MNG-2258 at 12/2/09 10:39 AM:
-------------------------------------------------------------

In my corporate parent pom I have the following in reporting section:

{code:xml}
<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-jxr-plugin</artifactId>
    <version>2.1</version>
</plugin>
 ...
<plugin>
    <groupId>org.codehaus.mojo</groupId>
    <artifactId>taglist-maven-plugin</artifactId>
    <version>2.4</version>
</plugin>
{code}
(in this order)

Then I have create a sample test project from Maven quickstart archetype but:

{noformat}
>mvn clean install site
...
[INFO] Generating "Tag List" report.
[ERROR] Taglist plugin MUST be executed after the JXR plugin.  No links to xref were generated.
[WARNING] Unable to locate Source XRef to link to - DISABLED
{noformat}

Looking at the log I can see reporting plugins are generated in an order completely different of the reporting section order.

      was (Author: henryju):
    In my corporate parent pom I have the following in reporting section:

{code:xml}
<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-jxr-plugin</artifactId>
    <version>2.1</version>
</plugin>
 ...
<plugin>
    <groupId>org.codehaus.mojo</groupId>
    <artifactId>taglist-maven-plugin</artifactId>
    <version>2.4</version>
</plugin>
{code}
(in this order)

Then I have create a sample test project from Maven quickstart archetype but:

{noformat}
>mvn clean install site dependency:tree
...
[INFO] Generating "Tag List" report.
[ERROR] Taglist plugin MUST be executed after the JXR plugin.  No links to xref were generated.
[WARNING] Unable to locate Source XRef to link to - DISABLED
{noformat}

Looking at the log I can see reporting plugins are generated in an order completely different of the reporting section order.
  
> Wrong execution order of plugins in same phase
> ----------------------------------------------
>
>                 Key: MNG-2258
>                 URL: http://jira.codehaus.org/browse/MNG-2258
>             Project: Maven 2
>          Issue Type: Bug
>    Affects Versions: 2.0.4
>         Environment: N/A
>            Reporter: David J. M. Karlsen
>            Priority: Blocker
>         Attachments: mavenTest.zip
>
>
> AFAIK plugins should be execute in the same order as they are listed in the POM, when bound to the same phase. This does not happen, the execution order is arbitrary.

-- 
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-2258) Wrong execution order of plugins in same phase

Posted by "Martin Zeltner (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-2258?page=comments#action_78375 ] 
            
Martin Zeltner commented on MNG-2258:
-------------------------------------

BTW the patches appended to MNG-1412 does also solve the execution order problem of plugins. It does solve the order problem for all artifacts! Until today the HashSets and HashMaps where not replaced by LinkedHashSets and LinkedHashMaps (see SVN repo). I don't understand why commiters from these Maven 2 components don't apply the patches for such an important issue. I would help if I had commit rights but right now i can just watch and claim.

Cheers,
Martin
http://el4j.sf.net

> Wrong execution order of plugins in same phase
> ----------------------------------------------
>
>                 Key: MNG-2258
>                 URL: http://jira.codehaus.org/browse/MNG-2258
>             Project: Maven 2
>          Issue Type: Bug
>    Affects Versions: 2.0.4
>         Environment: N/A
>            Reporter: David J. M. Karlsen
>             Fix For: 2.1
>
>
> AFAIK plugins should be execute in the same order as they are listed in the POM, when bound to the same phase. This does not happen, the execution order is arbitrary.

-- 
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-2258) Wrong execution order of plugins in same phase

Posted by "E K (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-2258?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=187475#action_187475 ] 

E K commented on MNG-2258:
--------------------------

Maven is grouping executions of same plugin at same phase  without checking whether there is/are execution(s) of another plugin(s) in between or not in the pom file.

And this cause the execution order specified by Jayesh Lalwani. A dummy project is attached if it is necessary to see the problem.
Suggested solution by John Casey on MNG-3719 is to use different phases for execution of same plug-in. 

Is this going to be fixed or should we follow suggested "cheating" ?

> Wrong execution order of plugins in same phase
> ----------------------------------------------
>
>                 Key: MNG-2258
>                 URL: http://jira.codehaus.org/browse/MNG-2258
>             Project: Maven 2
>          Issue Type: Bug
>    Affects Versions: 2.0.4
>         Environment: N/A
>            Reporter: David J. M. Karlsen
>            Priority: Blocker
>         Attachments: mavenTest.zip
>
>
> AFAIK plugins should be execute in the same order as they are listed in the POM, when bound to the same phase. This does not happen, the execution order is arbitrary.

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