gnodet commented on code in PR #1385:
URL: https://github.com/apache/maven/pull/1385#discussion_r1457247820
##########
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:
Yes, I don't question the change or responsibilities, but a possible change
in behaviour.
The caller is `BootstrapCoreExtensionManager` and now responsible to set the
workspace reader on the session. What I'm wondering is if this leads back to
the same behaviour... I think before this PR, the workspace reader is to set a
chained one, now, it's only the `ide` one...
--
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]