[MNG-7629] Improve resolution of modules within a multi-module build#912
[MNG-7629] Improve resolution of modules within a multi-module build#912gnodet wants to merge 1 commit intoapache:masterfrom
Conversation
|
Some ITs failures are caused by the changes in the new reactor reader. The current behaviour is to allow inter-module dependencies at the |
|
It's going to take me a bit of time to understand, but I definitely want to review this. |
I'll try to understand by end of next week. |
mthmulders
left a comment
There was a problem hiding this comment.
In a multimodule project, when I run mvn package on the root level, it correctly copies the JAR to target/project-local-repo. When I then run mvn package on a submodule, it fails with
Could not resolve dependencies for project <groupId>:<artifactId>:jar:0.1-SNAPSHOT: Could not find artifact <groupId>:<artifactId>:jar:0.1-SNAPSHOT
From the ticket and the conversation we had, I would expect mvn compile not to work anymore - which I still consider a big loss! But mvn package was supposed to work in this scenario, right?
I've tried to improve the PR to fully fix the while with this PR, all previously built artifacts can be reused in a subsequent build. |
|
I'm going to split the two issues as they can be handled separately: |
e5a965b to
f208668
Compare
… them across builds if needed
|
Closing this PR in favour of #954 |
|
Resolve #8824 |
JIRA issue: https://issues.apache.org/jira/browse/MNG-7629
PR with IT at apache/maven-integration-testing#219
================
As discussed in the JIRA, the fix for MNG-6118 has several problems:
This PR partially reverts MNG-6118 so that maven does not read the full reactor anymore and fixes the
ReactorReaderso that it keeps a copy of each artifact to be installed/deployed in the${multiModuleProjectDirectory}/target/project-local-repodirectory and uses them to resolve artifacts during build.