[ https://issues.apache.org/jira/browse/MNG-6295?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16274056#comment-16274056 ]
Hervé Boutemy commented on MNG-6295: ------------------------------------ bq. Why it hasn`t assigned to somebody yet? because it's voluntary efforts: every contributor contributes on his free time, manages his own priority I linked MNG-5987, which is IMHO the most relevant issue to let you dig a little bit my first reaction is: execution order can't be "corrupted" since it is not expected to be manageable You did a reproducible case: I'll have a look at it this WE and will try to explain what happens. To be honest, I don't really expect to be able to "fix", since there is not much chance that anything is really broken. But at least, as noticed in MNG-5987, users need more explanations. And perhaps while digging once again on this topic (every year, I put efforts for a good number of hours on this topic), there will be a new idea based on your case analysis and the discussion on what could ideally be done for you (without breaking other cases for others) > Inherited plugins are not properly ordered after merging with profile plugins > in some special cases > --------------------------------------------------------------------------------------------------- > > Key: MNG-6295 > URL: https://issues.apache.org/jira/browse/MNG-6295 > Project: Maven > Issue Type: Bug > Components: Plugins and Lifecycle, Profiles > Affects Versions: 3.3.1 > Environment: -- OS name: "windows 7", version: "6.1", arch: "amd64", > family: "dos" > -- Default locale: ru_RU, platform encoding: Cp1251 > -- Java version: 1.8.0_77, vendor: Oracle Corporation > -- Apache Maven 3.3.1 (cab6659f9874fa96462afef40fcf6bc033d58c1c; > 2015-03-13T23:10:27+03:00) > Reporter: kostd > Labels: execution-order > Attachments: mng-4416-reproducer.zip > > Original Estimate: 48h > Remaining Estimate: 48h > > See attached repro: > In some specific cases inherited executions order (on single phase) is > corrupted after merge with executions from profile. > 1. Steps to reproduce: > 1.1. cd to > mng-4416-reproducer/server-app/env-modules/child-with-profile-disabled/ > 1.2. mvn initialize: > {code} > [INFO] > ------------------------------------------------------------------------ > [INFO] Building child-with-profile-disabled 3.20.0 > [INFO] > ------------------------------------------------------------------------ > [INFO] > [INFO] --- maven-antrun-plugin:1.3:run (first-execution-in-grandparent-pom) @ > child-with-profile-disabled --- > [INFO] Executing tasks > [echo] first-execution-in-grandparent-pom > [INFO] Executed tasks > [INFO] > [INFO] --- maven-antrun-plugin:1.3:run (second-execution-in-grandparent-pom) > @ child-with-profile-disabled --- > [INFO] Executing tasks > [echo] second-execution-in-grandparent-pom > [INFO] Executed tasks > [INFO] > [INFO] --- gmaven-plugin:1.5-jenkins-3:execute > (single-execution-in-parent-pom) @ child-with-profile-disabled --- > single-execution-in-parent-pom > [INFO] > ------------------------------------------------------------------------ > [INFO] BUILD SUCCESS > [INFO] > ------------------------------------------------------------------------ > {code} > U can see expected plugin execution ordering: grandparent executions first, > parent executions after. > 1.3. cd to > mng-4416-reproducer/server-app/env-modules/child-with-profile-enabled/ > 1.4. mvn initialize: > {code} > [INFO] > ------------------------------------------------------------------------ > [INFO] Building child-with-profile-enabled 3.20.0 > [INFO] > ------------------------------------------------------------------------ > [INFO] > [INFO] --- gmaven-plugin:1.5-jenkins-3:execute > (single-execution-in-parent-pom) @ child-with-profile-enabled --- > single-execution-in-parent-pom > [INFO] > [INFO] --- maven-antrun-plugin:1.3:run (first-execution-in-grandparent-pom) @ > child-with-profile-enabled --- > [INFO] Executing tasks > [echo] first-execution-in-grandparent-pom > [INFO] Executed tasks > [INFO] > [INFO] --- maven-antrun-plugin:1.3:run (second-execution-in-grandparent-pom) > @ child-with-profile-enabled --- > [INFO] Executing tasks > [echo] second-execution-in-grandparent-pom > [INFO] Executed tasks > [INFO] > ------------------------------------------------------------------------ > [INFO] BUILD SUCCESS > [INFO] > ------------------------------------------------------------------------ > {code} > As you see this is affected execution order: parent first, grandparent after. > It doesn`t metter, what grandparent-parent > order consider to correct, but order _must not_ be changed when profile > activated! > 2. Reproduced on environment: > -- OS name: "windows 7", version: "6.1", arch: "amd64", family: "dos" > -- Default locale: ru_RU, platform encoding: Cp1251 > -- Java version: 1.8.0_77, vendor: Oracle Corporation > -- Apache Maven 3.3.1 (cab6659f9874fa96462afef40fcf6bc033d58c1c; > 2015-03-13T23:10:27+03:00) > 3. Special conditions to reproduce: > 3.1. plugin in test-profile (parent/pom.xml) must be the same as plugin > defined before affected executions(grandparent/pom.xml). > That is, in our case maven-compiler-plugin and maven-compiler-plugin > 3.2. affected plugins must have different types: maven-antrun-plugin in > grandparent and gmaven-plugin in parent. Tried > with gmaven-plugin on grandparent -- cant reporduce. > 3.3. depends on directory structure. Tried in flat structure -- cant > reproduce. -- This message was sent by Atlassian JIRA (v6.4.14#64029)