cstamas commented on code in PR #1385:
URL: https://github.com/apache/maven/pull/1385#discussion_r1457256038
##########
maven-embedder/src/main/java/org/apache/maven/cli/internal/BootstrapCoreExtensionManager.java:
##########
@@ -77,24 +79,29 @@ public class BootstrapCoreExtensionManager {
private final ClassRealm parentRealm;
+ private final WorkspaceReader ideWorkspaceReader;
+
@Inject
public BootstrapCoreExtensionManager(
DefaultPluginDependenciesResolver pluginDependenciesResolver,
DefaultRepositorySystemSessionFactory
repositorySystemSessionFactory,
CoreExports coreExports,
- PlexusContainer container) {
+ PlexusContainer container,
+ @Nullable @Named("ide") WorkspaceReader ideWorkspaceReader) {
this.pluginDependenciesResolver = pluginDependenciesResolver;
this.repositorySystemSessionFactory = repositorySystemSessionFactory;
this.coreExports = coreExports;
this.classWorld = ((DefaultPlexusContainer) container).getClassWorld();
this.parentRealm = container.getContainerRealm();
+ this.ideWorkspaceReader = ideWorkspaceReader;
}
public List<CoreExtensionEntry> loadCoreExtensions(
MavenExecutionRequest request, Set<String> providedArtifacts,
List<CoreExtension> extensions)
throws Exception {
try (CloseableSession repoSession = repositorySystemSessionFactory
.newRepositorySessionBuilder(request)
+ .setWorkspaceReader(ideWorkspaceReader)
Review Comment:
Fixed.
But your comment is wrong: session factory _never used_ chained WSReader, it
was ONLY the default maven using it. Before this PR, the session could be
inited with request WS (if non null) OR the ide WS (that may be null).
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]