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


##########
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:
   hym ... versions plugins use a projectBuilder, like in 
https://github.com/mojohaus/versions/blob/master/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/DisplayPluginUpdatesMojo.java#L646
   
   and I can execute it by Maven 4 ...
   ```
   mvn versions:display-plugin-updates
   ```



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