From 3273f48218dcfc173058aa17afea3d679bec47f8 Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Mon, 17 Feb 2025 13:34:03 -0500 Subject: [PATCH 1/2] Minor doc fixes --- .../apache/maven/plugins/changes/ChangesReport.java | 2 +- .../maven/plugins/changes/ChangesValidatorMojo.java | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) 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..66606867 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,7 +95,7 @@ public void execute() throws MojoExecutionException { } catch (SchemaValidatorException e) { if (failOnError) { throw new MojoExecutionException( - "failed to validate changes.xml file " + xmlPath.getAbsolutePath() + ": " + e.getMessage(), + "changes.xml file is not valid: " + xmlPath.getAbsolutePath() + ": " + e.getMessage(), e); } } @@ -103,7 +103,7 @@ public void execute() throws MojoExecutionException { } 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()); From 985f56eedaf2f20dd0e5bb1c97beff3ba1a92c18 Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Mon, 17 Feb 2025 13:35:54 -0500 Subject: [PATCH 2/2] spotless --- .../org/apache/maven/plugins/changes/ChangesValidatorMojo.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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 66606867..df448f08 100644 --- a/src/main/java/org/apache/maven/plugins/changes/ChangesValidatorMojo.java +++ b/src/main/java/org/apache/maven/plugins/changes/ChangesValidatorMojo.java @@ -95,8 +95,7 @@ public void execute() throws MojoExecutionException { } catch (SchemaValidatorException e) { if (failOnError) { throw new MojoExecutionException( - "changes.xml file is not valid: " + xmlPath.getAbsolutePath() + ": " + e.getMessage(), - e); + "changes.xml file is not valid: " + xmlPath.getAbsolutePath() + ": " + e.getMessage(), e); } } }