diff --git a/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/MojoDescriptor.java b/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/MojoDescriptor.java index 2568975a3b..a692cbda40 100644 --- a/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/MojoDescriptor.java +++ b/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/MojoDescriptor.java @@ -43,7 +43,7 @@ public class MojoDescriptor implements Cloneable { /** The Plexus component type */ - public static String MAVEN_PLUGIN = "maven-plugin"; + public static final String MAVEN_PLUGIN = "maven-plugin"; /** "once-per-session" execution strategy */ public static final String SINGLE_PASS_EXEC_STRATEGY = "once-per-session"; @@ -57,7 +57,7 @@ public class MojoDescriptor private List parameters; - private Map parameterMap; + private Map parameterMap; /** By default, the execution strategy is "once-per-session" */ private String executionStrategy = SINGLE_PASS_EXEC_STRATEGY; @@ -192,9 +192,9 @@ public class MojoDescriptor { if ( parameters != null && parameters.contains( parameter ) ) { - throw new DuplicateParameterException( parameter.getName() + - " has been declared multiple times in mojo with goal: " + getGoal() + " (implementation: " + - getImplementation() + ")" ); + throw new DuplicateParameterException( parameter.getName() + + " has been declared multiple times in mojo with goal: " + getGoal() + " (implementation: " + + getImplementation() + ")" ); } if ( parameters == null ) @@ -208,11 +208,11 @@ public class MojoDescriptor /** * @return the list parameters as a Map */ - public Map getParameterMap() + public Map getParameterMap() { if ( parameterMap == null ) { - parameterMap = new HashMap(); + parameterMap = new HashMap(); if ( parameters != null ) { @@ -262,7 +262,7 @@ public class MojoDescriptor * Gets the scope of (transitive) dependencies that should be collected. Dependency collection refers to the process * of calculating the complete dependency tree in terms of artifact coordinates. In contrast to dependency * resolution, this does not include the download of the files for the dependency artifacts. - * + * * @return The scope of (transitive) dependencies that should be collected or {@code null} if none. */ public String getDependencyCollectionRequired() diff --git a/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/PluginDescriptor.java b/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/PluginDescriptor.java index d368af0b07..e6f78df6c1 100644 --- a/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/PluginDescriptor.java +++ b/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/PluginDescriptor.java @@ -232,7 +232,7 @@ public class PluginDescriptor /** * Gets the artifacts that make up the plugin's class realm, excluding artifacts shadowed by the Maven core realm * like {@code maven-project}. - * + * * @return The plugin artifacts, never {@code null}. */ public List getArtifacts() @@ -284,11 +284,11 @@ public class PluginDescriptor // changes above not being propogated to the map MojoDescriptor mojoDescriptor = null; - + for ( Iterator i = getMojos().iterator(); i.hasNext() && mojoDescriptor == null; ) { MojoDescriptor desc = (MojoDescriptor) i.next(); - + if ( goal.equals( desc.getGoal() ) ) { mojoDescriptor = desc; @@ -342,7 +342,7 @@ public class PluginDescriptor { this.plugin = plugin; } - + public Plugin getPlugin() { return plugin;