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

[regression] Default plugin executions contributed by packaging execute after executions from plugin management

    XMLWordPrintableJSON

Details

    Description

      Given this POM snippet

      <build>
        <pluginManagement>
          <plugins>
            <plugin>
              <artifactId>maven-resources-plugin</artifactId>
              <version>2.2</version>
              <executions>
                <execution>
                  <id>test-1</id>
                  <goals>
                    <goal>resources</goal>
                  </goals>
                </execution>
              </executions>
            </plugin>
          </plugins>
        </pluginManagement>
        <plugins>
          <plugin>
            <artifactId>maven-resources-plugin</artifactId>
            <version>2.2</version>
            <executions>
              <execution>
                <id>test-2</id>
                <goals>
                  <goal>resources</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
      

      the execution order with Maven 2.2.x is

      1. default-resources
      2. test-1
      3. test-2

      However, with Maven 3.x it is currently:

      1. test-1
      2. default-resources
      3. test-2

      This causes a compilation failure on maven-core from the 2.2.x branch when build with 3.x because the compiler executions happen in the wrong order.

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: