Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
public interface MavenPluginPrerequisitesChecker extends Consumer<PluginDescriptor> {
/**
*
* @param pluginDescriptor
* @param pluginDescriptor the plugin descriptor to check
* @throws IllegalStateException in case the checked prerequisites are not met
*/
@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -316,13 +316,11 @@ public void checkPrerequisites(PluginDescriptor pluginDescriptor) throws PluginI
if (!prerequisiteExceptions.isEmpty()) {
String messages = prerequisiteExceptions.stream()
.map(IllegalStateException::getMessage)
.collect(Collectors.joining(", "));
.collect(Collectors.joining("\n\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);
"\nThe plugin " + pluginDescriptor.getId() + " has unmet prerequisites: \n\t" + messages);
prerequisiteExceptions.forEach(pie::addSuppressed);
throw pie;
}
}
Expand Down