From 5d38c8d3a8a99aa1e22f319f3100f7a32adec5d3 Mon Sep 17 00:00:00 2001 From: Vincent Siveton Date: Sat, 9 Aug 2008 12:16:04 +0000 Subject: [PATCH] o fixed checkstyle + updated javadoc git-svn-id: https://svn.apache.org/repos/asf/maven/plugin-tools/trunk@684241 13f79535-47bb-0310-9956-ffa450edef68 --- .../model/PluginMetadataParseException.java | 10 +++++----- .../plugin/tools/model/PluginMetadataParser.java | 16 ++++++++++++---- 2 files changed, 17 insertions(+), 9 deletions(-) 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 ); } } }