laeubi commented on a change in pull request #667: URL: https://github.com/apache/maven/pull/667#discussion_r800201417
########## File path: maven-core/src/main/java/org/apache/maven/DefaultMaven.java ########## @@ -367,11 +354,39 @@ private MavenExecutionResult doExecute( MavenExecutionRequest request, MavenSess return result; } + private void setupWorkspaceReader( MavenSession session, DefaultRepositorySystemSession repoSession ) + throws ComponentLookupException + { + // Desired order of precedence for workspace reader before query the local artifact repositories + List<WorkspaceReader> workspaceReaders = new ArrayList<WorkspaceReader>(); + // 1) Reactor workspace reader + workspaceReaders.add( container.lookup( WorkspaceReader.class, ReactorReader.HINT ) ); + // 2) Repository system session scoped workspace reader + WorkspaceReader repoWorkspaceReader = repoSession.getWorkspaceReader(); + if ( repoWorkspaceReader != null ) + { + workspaceReaders.add( repoWorkspaceReader ); + } + // 3) .. n) project scoped workspace reader + for ( WorkspaceReader workspaceReader : getProjectScopedExtensionComponents( session.getProjects(), + WorkspaceReader.class ) ) + { + if (workspaceReaders.contains( workspaceReader )) { Review comment: I applied the Maven Formater and check style did not complain can you explain whats wrong with formatting here? -- 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