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


##########
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:
   Yes, _received_ session works (like in a plugin I show or like in versions 
plugin), but _creating a session from the scratch does not_.



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