diff --git a/maven-core/src/main/java/org/apache/maven/plugin/internal/DefaultPluginValidationManager.java b/maven-core/src/main/java/org/apache/maven/plugin/internal/DefaultPluginValidationManager.java index 31227a4e406e..a21228703595 100644 --- a/maven-core/src/main/java/org/apache/maven/plugin/internal/DefaultPluginValidationManager.java +++ b/maven-core/src/main/java/org/apache/maven/plugin/internal/DefaultPluginValidationManager.java @@ -23,6 +23,7 @@ import java.io.File; import java.nio.file.Path; +import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.Collections; @@ -222,7 +223,12 @@ private void reportSessionCollectedValidationIssues(MavenSession mavenSession) { logger.warn(""); logger.warn("Plugin {} validation issues were detected in following plugin(s)", issueLocalitiesToReport); logger.warn(""); - for (Map.Entry entry : issuesMap.entrySet()) { + + // Sorting the plugins + List> sortedEntries = new ArrayList<>(issuesMap.entrySet()); + sortedEntries.sort(Map.Entry.comparingByKey(String.CASE_INSENSITIVE_ORDER)); + + for (Map.Entry entry : sortedEntries) { PluginValidationIssues issues = entry.getValue(); if (!hasAnythingToReport(issues, issueLocalitiesToReport)) { continue;