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


##########
impl/maven-core/src/main/java/org/apache/maven/plugin/internal/DefaultMavenPluginManager.java:
##########
@@ -314,15 +314,15 @@ public void checkPrerequisites(PluginDescriptor 
pluginDescriptor) throws PluginI
         });
         // aggregate all exceptions
         if (!prerequisiteExceptions.isEmpty()) {
+            String ln = System.lineSeparator();
             String messages = prerequisiteExceptions.stream()
                     .map(IllegalStateException::getMessage)
-                    .collect(Collectors.joining(", "));
+                    .collect(Collectors.joining(ln + '\t'));
             PluginIncompatibleException pie = new PluginIncompatibleException(
                     pluginDescriptor.getPlugin(),
-                    "The plugin " + pluginDescriptor.getId() + " has unmet 
prerequisites: " + messages,
-                    prerequisiteExceptions.get(0));
-            // the first exception is added as cause, all other ones as 
suppressed exceptions
-            
prerequisiteExceptions.stream().skip(1).forEach(pie::addSuppressed);
+                    ln + "The plugin " + pluginDescriptor.getId() + " has 
unmet prerequisites: " + ln + '\t'

Review Comment:
   ok, simplified. here we can be platform independent



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

Reply via email to