[ 
https://issues.apache.org/jira/browse/MNG-5799?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15168401#comment-15168401
 ] 

Christian Schulte commented on MNG-5799:
----------------------------------------

The cause for this is the way mojo executions from lifecycle mappings get 
prioritized. See [line 250 of 
DefaultLifecyclePluginAnalyzer|https://git-wip-us.apache.org/repos/asf?p=maven.git;a=blob;f=maven-core/src/main/java/org/apache/maven/lifecycle/internal/DefaultLifecyclePluginAnalyzer.java;h=b4f981d719cdb71fcd99b50b2563d20d09d662e5;hb=HEAD#l250].
 This leads to all executions coming from lifecycle mappings to have a negative 
priority. That makes those executions run before any other executions declared 
in the model. I think this has been done intentionally. If not, line 250 could 
be changed from

{code}
execution.setPriority( i - mojos.size() );
{code}

to

{code}
execution.setPriority( i );
{code}

I think it has been done intentionally. Can someone clarify?

> Incorrect execution order of plugins in the same phase
> ------------------------------------------------------
>
>                 Key: MNG-5799
>                 URL: https://issues.apache.org/jira/browse/MNG-5799
>             Project: Maven
>          Issue Type: Bug
>          Components: Plugins and Lifecycle
>    Affects Versions: 3.2.5
>         Environment: Apache Maven 3.2.5 
> (12a6b3acb947671f09b81f49094c53f426d8cea1; 2014-12-14T18:29:23+01:00)
>            Reporter: Gerhard Poul
>            Assignee: Christian Schulte
>
> When multiple plugins are used and assigned to the same phase they are not 
> executed in the order they're listed in the POM.
> Repro case: https://github.com/gpoul/arquillian-container-was/tree/MNG-5799
> Repro steps: Execute {{mvn test}} in folder {{wlp-managed-8.5}}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to