You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org> on 2009/10/29 01:21:27 UTC

[jira] Updated: (MNG-4415) [regression] Plugins are not properly ordered after merging with inherited parent plugins

     [ http://jira.codehaus.org/browse/MNG-4415?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Benjamin Bentmann updated MNG-4415:
-----------------------------------

          Component/s:     (was: Profiles)
                       POM
                       Inheritance and Interpolation
          Description: 
For a parent POM with
{code:xml}
<build>
  <plugins>
    <plugin>
      <groupId>org.apache.maven.its.plugins</groupId>
      <artifactId>maven-it-plugin-b</artifactId>
      <version>2.1-SNAPSHOT</version>
    </plugin>
  </plugins>
</build>
{code}
and a child POM with
{code:xml}
<build>
  <plugins>
    <plugin>
      <groupId>org.apache.maven.its.plugins</groupId>
      <artifactId>maven-it-plugin-a</artifactId>
      <version>2.1-SNAPSHOT</version>
    </plugin>
    <plugin>
      <groupId>org.apache.maven.its.plugins</groupId>
      <artifactId>maven-it-plugin-b</artifactId>
      <version>2.1-SNAPSHOT</version>
    </plugin>
  </plugins>
</build>
{code}
the child's effective model will end up like this in 3.x:
{code:xml}
<build>
  <plugins>
    <plugin>
      <groupId>org.apache.maven.its.plugins</groupId>
      <artifactId>maven-it-plugin-b</artifactId>
      <version>2.1-SNAPSHOT</version>
    </plugin>
    <plugin>
      <groupId>org.apache.maven.its.plugins</groupId>
      <artifactId>maven-it-plugin-a</artifactId>
      <version>2.1-SNAPSHOT</version>
    </plugin>
  </plugins>
</build>
{code}
i.e. plugin-a comes after plugin-b although it should be the order declared in the POM.

In general, inheritance is expected to respect the following ordering during plugin merging:
{noformat}
parent: X -> A -> B -> D -> E
child:  Y -> A -> C -> D -> F
result: X -> Y -> A -> B -> C -> D -> E -> F
{noformat}

  was:
in maven 2.2.1 if a plugin execution defined in build section of pom had same phase as plugin execution defined in build section of a profile, the non-profile plugin execution would run first.  In maven 3.0-SNAPSHOT (latest as of oct 27th) the profile plugin execution runs first.

I have a pom setup as follows (pseudo code)

<project>
  <build>
    <plugins>
      <plugin>
        <gav>plugin1</gav>
        <executions>
          <execution>
            <id>some-id</id>
            <phase>package</phase>
            <goals>
              <goal>some-goal</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
<profiles>
    <profile>
      <id>some-id</id>
      <build>
        <plugins>
          <plugin>
            <gav>plugin2</gav>
            <executions>
              <execution>
                <id>some-id</id>
                <phase>package</phase>
                <goals>
                  <goal>some-goal</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profile>
</project>

    Affects Version/s:     (was: 3.0)
                       3.0-alpha-3
              Summary: [regression] Plugins are not properly ordered after merging with inherited parent plugins  (was: Plugin execution defined inside profile is running before other plugin executions defined in main project)

> [regression] Plugins are not properly ordered after merging with inherited parent plugins
> -----------------------------------------------------------------------------------------
>
>                 Key: MNG-4415
>                 URL: http://jira.codehaus.org/browse/MNG-4415
>             Project: Maven 2
>          Issue Type: Bug
>          Components: Inheritance and Interpolation, Plugins and Lifecycle, POM
>    Affects Versions: 3.0-alpha-3
>         Environment: windows
>            Reporter: Damian Bradicich
>
> For a parent POM with
> {code:xml}
> <build>
>   <plugins>
>     <plugin>
>       <groupId>org.apache.maven.its.plugins</groupId>
>       <artifactId>maven-it-plugin-b</artifactId>
>       <version>2.1-SNAPSHOT</version>
>     </plugin>
>   </plugins>
> </build>
> {code}
> and a child POM with
> {code:xml}
> <build>
>   <plugins>
>     <plugin>
>       <groupId>org.apache.maven.its.plugins</groupId>
>       <artifactId>maven-it-plugin-a</artifactId>
>       <version>2.1-SNAPSHOT</version>
>     </plugin>
>     <plugin>
>       <groupId>org.apache.maven.its.plugins</groupId>
>       <artifactId>maven-it-plugin-b</artifactId>
>       <version>2.1-SNAPSHOT</version>
>     </plugin>
>   </plugins>
> </build>
> {code}
> the child's effective model will end up like this in 3.x:
> {code:xml}
> <build>
>   <plugins>
>     <plugin>
>       <groupId>org.apache.maven.its.plugins</groupId>
>       <artifactId>maven-it-plugin-b</artifactId>
>       <version>2.1-SNAPSHOT</version>
>     </plugin>
>     <plugin>
>       <groupId>org.apache.maven.its.plugins</groupId>
>       <artifactId>maven-it-plugin-a</artifactId>
>       <version>2.1-SNAPSHOT</version>
>     </plugin>
>   </plugins>
> </build>
> {code}
> i.e. plugin-a comes after plugin-b although it should be the order declared in the POM.
> In general, inheritance is expected to respect the following ordering during plugin merging:
> {noformat}
> parent: X -> A -> B -> D -> E
> child:  Y -> A -> C -> D -> F
> result: X -> Y -> A -> B -> C -> D -> E -> F
> {noformat}

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira