Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.2.1
-
None
Description
Here is the configuration:
root 1.0-SNAPSHOT - aggregate project, not a parent one
- maven-bug1 1.1-SNAPSHOT - no parent
- maven-bug2 1.0-SNAPSHOT - no parent - depends on maven-bug1 1.1-SNAPSHOT
run mvn clean -am -pl maven-bug2
observe that the project reactor builds maven-bug1 then maven-bug2 as expected based on the dependency graph
navigate to maven-bug1-to-install
run mvn install to install a maven-bug1 version 1.0 in the local repo
navigate back to the parent folder
run mvn clean -am -pl maven-bug2
observe that the project reactor builds maven-bug1 then maven-bug2 as expected based on the dependency graph
update the maven-bug2 pom to depend on maven-bug1 1.0
run mvn clean -am -pl maven-bug2
observe that the project reactor still builds maven-bug1 then maven-bug2 although maven-bug2 doesn't depend on maven-bug1 within this aggregate configuration (different version).
I think the version is never considered when the reactor builds the list of project to build and should.
This issue relates to MNG-4237
The problem with this behaviour is that artifacts get build within the reactor for nothing typically when releasing as some of the artifacts within the reactor get released for no reason.