Maven
  1. Maven
  2. MNG-2258

Wrong execution order of plugins in same phase

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.0.4
    • Fix Version/s: 3.0.3
    • Component/s: None
    • Labels:
      None
    • Environment:
      N/A
    • Complexity:
      Intermediate
    • Number of attachments :
      1

      Description

      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.

        Issue Links

          Activity

          Hide
          Hendy Irawan added a comment -

          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

          Show
          Hendy Irawan added a comment - 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
          Hide
          Hendy Irawan added a comment -

          MNG-2258 should already be fixed, tested with maven 3.0.4

          Show
          Hendy Irawan added a comment - MNG-2258 should already be fixed, tested with maven 3.0.4
          Hide
          Eric Sirianni added a comment -

          @Scott - I am observing the same behavior. Have you filed the new bug?

          Show
          Eric Sirianni added a comment - @Scott - I am observing the same behavior. Have you filed the new bug?
          Hide
          Karsten Gresch added a comment -

          As per my tests, this unpleasant bug still exists for 3.04 and 3.05. Tested with maven-jar-plugin, maven-assembly-plugin and copy-maven-plugin, all executed in phase 'package'.

          Perhaps it's a bug in the latter plugin though it seems to me that it is very well crafted (despite the artifact naming perhaps).

          I just don't have the time getting into Maven internal's to change the execution mechanism, but as per my opinion, Maven should control the execution order and no plugin should be able to break out from Maven's control.

          Anyway - very, very unpleasant. The only workaround I see when not creating pseudo-projects for dependent packaging executions is creating multiple profiles and calling them in the correct order.

          Could somebody please open this ticket again? From my point of view, specifying the execution order is quite important in the packaging phase and if Maven's goal is supporting the entire development lifecycle, it must support this.

          Cheers,

          Karsten

          Twitter: @gresch

          Show
          Karsten Gresch added a comment - As per my tests, this unpleasant bug still exists for 3.04 and 3.05. Tested with maven-jar-plugin, maven-assembly-plugin and copy-maven-plugin, all executed in phase 'package'. Perhaps it's a bug in the latter plugin though it seems to me that it is very well crafted (despite the artifact naming perhaps). I just don't have the time getting into Maven internal's to change the execution mechanism, but as per my opinion, Maven should control the execution order and no plugin should be able to break out from Maven's control. Anyway - very, very unpleasant. The only workaround I see when not creating pseudo-projects for dependent packaging executions is creating multiple profiles and calling them in the correct order. Could somebody please open this ticket again? From my point of view, specifying the execution order is quite important in the packaging phase and if Maven's goal is supporting the entire development lifecycle, it must support this. Cheers, Karsten Twitter: @gresch
          Hide
          Alessandro Dionisi added a comment -

          Yes I confirm that. It also happen for me in assembly-plugin.

          Show
          Alessandro Dionisi added a comment - Yes I confirm that. It also happen for me in assembly-plugin.

            People

            • Assignee:
              Benson Margulies
              Reporter:
              David J. M. Karlsen
            • Votes:
              83 Vote for this issue
              Watchers:
              75 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: