laeubi commented on a change in pull request #667:
URL: https://github.com/apache/maven/pull/667#discussion_r795408823



##########
File path: maven-core/src/main/java/org/apache/maven/DefaultMaven.java
##########
@@ -367,11 +354,37 @@ private MavenExecutionResult doExecute( 
MavenExecutionRequest request, MavenSess
         return result;
     }
 
-    private void afterSessionStart( MavenSession session )
+    private void finishRepositorySystemSession( MavenSession session, 
DefaultRepositorySystemSession repoSession )
+        throws ComponentLookupException
+    {
+        WorkspaceReader reactorWorkspace = container.lookup( 
WorkspaceReader.class, ReactorReader.HINT );
+        //
+        // Desired order of precedence for local artifact repositories
+        //
+        // Reactor
+        // Workspace
+        // User Local Repository
+        //
+
+        // we only lookup the project scoped ones here, lookup at system level 
will also find the system components
+        // (like ReactorReader) but that does not work well as these are 
special handled!
+        for ( WorkspaceReader workspaceReader : 
getProjectScopedExtensionComponents( session.getProjects(),
+                                                                               
      WorkspaceReader.class ) )
+        {
+            repoSession.setWorkspaceReader( 
ChainedWorkspaceReader.newInstance( repoSession.getWorkspaceReader(),

Review comment:
       Sure that is possible, I just adopted the "style" currently used, but 
ChainedWorkspaceReader accepts also an array,  I can  adjust 
ChainedWorkspaceReader to combine if any of the provided ones is already a 
chained one. Let me know if you think this should be done.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to