slawekjaranowski commented on code in PR #2285:
URL: https://github.com/apache/maven/pull/2285#discussion_r2072467286


##########
impl/maven-core/src/main/java/org/apache/maven/DefaultMaven.java:
##########
@@ -408,7 +408,10 @@ private void persistResumptionData(MavenExecutionResult 
result, MavenSession ses
      */
     @Deprecated
     public RepositorySystemSession newRepositorySession(MavenExecutionRequest 
request) {
-        return newCloseableSession(request, new MavenChainedWorkspaceReader());
+        RepositorySystemSession result = newCloseableSession(request, new 
MavenChainedWorkspaceReader());
+        MavenSession session = new MavenSession(result, request, new 
DefaultMavenExecutionResult());
+        session.setSession(defaultSessionFactory.newSession(session));

Review Comment:
   Looks like session is not used .... but magic is in 
`defaultSessionFactory.newSession` which assign MavenSession to 
RepositorySystemSession
   
   maybe a comment on it?



-- 
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