diff --git a/maven-plugin-tools-model/src/main/java/org/apache/maven/plugin/tools/model/PluginMetadataParseException.java b/maven-plugin-tools-model/src/main/java/org/apache/maven/plugin/tools/model/PluginMetadataParseException.java index 5dbe492..74101bc 100644 --- a/maven-plugin-tools-model/src/main/java/org/apache/maven/plugin/tools/model/PluginMetadataParseException.java +++ b/maven-plugin-tools-model/src/main/java/org/apache/maven/plugin/tools/model/PluginMetadataParseException.java @@ -37,9 +37,9 @@ public class PluginMetadataParseException private final String originalMessage; /** - * @param metadataFile - * @param message - * @param cause + * @param metadataFile could be null + * @param message could be null + * @param cause could be null */ public PluginMetadataParseException( File metadataFile, String message, Throwable cause ) { @@ -50,8 +50,8 @@ public class PluginMetadataParseException } /** - * @param metadataFile - * @param message + * @param metadataFile could be null + * @param message could be null */ public PluginMetadataParseException( File metadataFile, String message ) { diff --git a/maven-plugin-tools-model/src/main/java/org/apache/maven/plugin/tools/model/PluginMetadataParser.java b/maven-plugin-tools-model/src/main/java/org/apache/maven/plugin/tools/model/PluginMetadataParser.java index 0d8d730..7b1d494 100644 --- a/maven-plugin-tools-model/src/main/java/org/apache/maven/plugin/tools/model/PluginMetadataParser.java +++ b/maven-plugin-tools-model/src/main/java/org/apache/maven/plugin/tools/model/PluginMetadataParser.java @@ -44,6 +44,8 @@ import java.util.Set; */ public class PluginMetadataParser { + /** Default implementation path which will be replaced in + * AbstractScriptedMojoDescriptorExtractor#extractMojoDescriptorsFromMetadata(Map, PluginDescriptor) */ public static final String IMPL_BASE_PLACEHOLDER = ""; /** @@ -96,6 +98,12 @@ public class PluginMetadataParser return descriptors; } + /** + * @param metadataFile not null + * @param mojo not null + * @return a mojo descriptor instance + * @throws PluginMetadataParseException if any + */ private MojoDescriptor asDescriptor( File metadataFile, Mojo mojo ) throws PluginMetadataParseException { @@ -151,8 +159,8 @@ public class PluginMetadataParser if ( StringUtils.isEmpty( dParam.getName() ) ) { - throw new PluginMetadataParseException( metadataFile, "Mojo: \'" + mojo.getGoal() + - "\' has a parameter without either property or name attributes. Please specify one." ); + throw new PluginMetadataParseException( metadataFile, "Mojo: \'" + mojo.getGoal() + + "\' has a parameter without either property or name attributes. Please specify one." ); } dParam.setRequired( param.isRequired() ); @@ -165,8 +173,8 @@ public class PluginMetadataParser catch ( DuplicateParameterException e ) { throw new PluginMetadataParseException( metadataFile, - "Duplicate parameters detected for mojo: " + mojo.getGoal(), - e ); + "Duplicate parameters detected for mojo: " + + mojo.getGoal(), e ); } } }