Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
3.0-alpha-3
-
None
Description
Basically the same as MNG-4415 just in the context of profiles. E.g. for a POM with
<build> <plugins> <plugin> <groupId>org.apache.maven.its.plugins</groupId> <artifactId>maven-it-plugin-b</artifactId> <version>2.1-SNAPSHOT</version> </plugin> </plugins> </build> <profiles> <profile> <id>test</id> <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> </profile> </profiles>
the effective model erroneously ends up with the wrong plugin order as shown below when the profile is activated:
<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>
In general, profile injection is expected to work like this when merging the plugin lists:
model: X -> A -> B -> D -> E profile: Y -> A -> C -> D -> F result: X -> Y -> A -> B -> C -> D -> E -> F