diff --git a/src/main/java/org/apache/maven/plugins/changes/ChangesReport.java b/src/main/java/org/apache/maven/plugins/changes/ChangesReport.java index ba98d6b3..6531dd4d 100644 --- a/src/main/java/org/apache/maven/plugins/changes/ChangesReport.java +++ b/src/main/java/org/apache/maven/plugins/changes/ChangesReport.java @@ -84,7 +84,7 @@ public class ChangesReport extends AbstractChangesReport { private File filteredOutputDirectory; /** - * applying filtering filtering "a la" resources plugin + * apply filtering "a la" resources plugin * * @since 2.2 */ diff --git a/src/main/java/org/apache/maven/plugins/changes/ChangesValidatorMojo.java b/src/main/java/org/apache/maven/plugins/changes/ChangesValidatorMojo.java index cb2849c0..df448f08 100644 --- a/src/main/java/org/apache/maven/plugins/changes/ChangesValidatorMojo.java +++ b/src/main/java/org/apache/maven/plugins/changes/ChangesValidatorMojo.java @@ -32,7 +32,7 @@ import org.xml.sax.SAXParseException; /** - * Goal which validate the changes.xml file. + * Goal which validates the changes.xml file. * * @author Olivier Lamy * @version $Id$ @@ -48,13 +48,13 @@ public class ChangesValidatorMojo extends AbstractChangesMojo { private String changesXsdVersion; /** - * Mojo failure if validation failed. If not and validation failed, only a warning will be logged. + * Mojo failure if validation failed. If false and validation failed, only a warning will be logged. */ @Parameter(property = "changes.validate.failed", defaultValue = "false") private boolean failOnError; /** - * The path of the changes.xml file that will be converted into an HTML report. + * The path of the changes.xml file that will be validated. */ @Parameter(property = "changes.xmlPath", defaultValue = "src/changes/changes.xml") private File xmlPath; @@ -87,7 +87,7 @@ public void execute() throws MojoExecutionException { logSchemaValidation(xmlValidationHandler.getErrors()); if (failOnError) { throw new MojoExecutionException("changes.xml file " + xmlPath.getAbsolutePath() - + " is not valid, see previous errors."); + + " is not valid. See previous errors."); } else { getLog().info(" skip previous validation errors due to failOnError=false."); } @@ -95,15 +95,14 @@ public void execute() throws MojoExecutionException { } catch (SchemaValidatorException e) { if (failOnError) { throw new MojoExecutionException( - "failed to validate changes.xml file " + xmlPath.getAbsolutePath() + ": " + e.getMessage(), - e); + "changes.xml file is not valid: " + xmlPath.getAbsolutePath() + ": " + e.getMessage(), e); } } } } private void logSchemaValidation(List errors) { - getLog().warn("failed to validate changes.xml file " + xmlPath.getAbsolutePath()); + getLog().warn("changes.xml file is not valid: " + xmlPath.getAbsolutePath()); getLog().warn("validation errors: "); for (SAXParseException error : errors) { getLog().warn(error.getMessage());