kwin commented on code in PR #2147:
URL: https://github.com/apache/maven/pull/2147#discussion_r1982039875


##########
impl/maven-cli/src/main/java/org/apache/maven/cling/invoker/PlexusContainerCapsuleFactory.java:
##########
@@ -122,15 +123,19 @@ protected void configure() {
                             try {
                                 
container.lookup(Injector.class).discover(extension.getClassRealm());
                             } catch (Throwable e) {
-                                context.logger.warn("Maven DI failure", e);
+                                throwables.add(e);
                             }
                         }
                     },
                     new 
SessionScopeModule(container.lookup(SessionScope.class)),
                     new 
MojoExecutionScopeModule(container.lookup(MojoExecutionScope.class)),
                     new ExtensionConfigurationModule(extension, 
extensionSource));
         }
-
+        if (!throwables.isEmpty()) {
+            IllegalStateException mavenDiFailed = new 
IllegalStateException("Maven DI failed");

Review Comment:
   ```suggestion
               IllegalStateException mavenDiFailed = new 
IllegalStateException("Maven dependency injection failed for at least one of 
the registered core extension");
   ```



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