Uploaded image for project: 'Maven'
  1. Maven
  2. MNG-4350

[regression] Multiple goals bound to the same phase in a lifecycle mapping get executed out of order

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.0-alpha-3
    • 3.0-alpha-3
    • Plugins and Lifecycle
    • None

    Description

      Given a lifecycle mapping (say from a plugin) like

      <component>
        <role>org.apache.maven.lifecycle.mapping.LifecycleMapping</role>
        <role-hint>jbi-component</role-hint>
        <implementation>org.apache.maven.lifecycle.mapping.DefaultLifecycleMapping</implementation>
        <configuration>
          <phases>
            <package>
              org.apache.maven.plugins:maven-jar-plugin:jar, 
              org.apache.servicemix.tooling:jbi-maven-plugin:jbi-component
            </package>
          </phases>
        </configuration>
      </component>
      

      and some POM with

      <groupId>org.apache.servicemix</groupId>
      <artifactId>servicemix-lwcontainer</artifactId>
      <version>3.3.2-SNAPSHOT</version>
      <packaging>jbi-component</packaging>
      
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.servicemix.tooling</groupId>
            <artifactId>jbi-maven-plugin</artifactId>
            <version>4.1</version>
            <extensions>true</extensions>
          </plugin>
          <plugin>
            <artifactId>maven-jar-plugin</artifactId>
            <version>2.1</version>
          </plugin>
        </plugins>
      </build>
      

      i.e. where the POM order of the plugins doesn't match the order of their executions according to the lifecycle mapping, trunk executes
      1. jbi-maven-plugin:jbi-component
      2. maven-jar-plugin:jar
      instead of the other way round.

      Attachments

        Activity

          People

            bentmann Benjamin Bentmann
            bentmann Benjamin Bentmann
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: