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

[regression] Managed executions of plugins introduced by default lifecycle bindings execute before explicitly defined plugins

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.0-alpha-3
    • Fix Version/s: 3.0-alpha-3
    • Component/s: Plugins and Lifecycle
    • Labels:
      None

      Description

      For this POM snippet

      <build>
        <pluginManagement>
          <plugins>
            <plugin>
              <!-- NOTE: It's essential that this plugin is also referenced by the default lifecycle bindings -->
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-resources-plugin</artifactId>
              <version>0.1-stub-SNAPSHOT</version>
              <executions>
                <execution>
                  <id>second</id>
                  <phase>validate</phase>
                  <goals>
                    <goal>resources</goal>
                  </goals>
                  <configuration>
                    <pathname>target/log.txt</pathname>
                    <message>second</message>
                  </configuration>
                </execution>
              </executions>
            </plugin>
          </plugins>
        </pluginManagement>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.its.plugins</groupId>
            <artifactId>maven-it-plugin-log-file</artifactId>
            <version>2.1-SNAPSHOT</version>
            <executions>
              <execution>
                <id>first</id>
                <phase>validate</phase>
                <goals>
                  <goal>log-string</goal>
                </goals>
                <configuration>
                  <logFile>target/log.txt</logFile>
                  <string>first</string>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
      

      and the invocation "mvn clean process-resources", the execution order is first, second with Maven 2 but second, first with Maven 3.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: