You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jackrabbit.apache.org by kw...@apache.org on 2023/02/14 08:53:49 UTC
[jackrabbit-filevault-package-maven-plugin] 01/01: JCRVLT-686 Improve error message on how to reformat files
This is an automated email from the ASF dual-hosted git repository.
kwin pushed a commit to branch feature/format-xml-help
in repository https://gitbox.apache.org/repos/asf/jackrabbit-filevault-package-maven-plugin.git
commit 9b0a07a484a542f172ba47e23b1717fc254ccf71
Author: Konrad Windszus <kw...@apache.org>
AuthorDate: Tue Feb 14 09:53:41 2023 +0100
JCRVLT-686 Improve error message on how to reformat files
---
.../filevault/maven/packaging/mojo/FormatDocviewXmlMojo.java | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/src/main/java/org/apache/jackrabbit/filevault/maven/packaging/mojo/FormatDocviewXmlMojo.java b/src/main/java/org/apache/jackrabbit/filevault/maven/packaging/mojo/FormatDocviewXmlMojo.java
index e5f965f..94eb37b 100644
--- a/src/main/java/org/apache/jackrabbit/filevault/maven/packaging/mojo/FormatDocviewXmlMojo.java
+++ b/src/main/java/org/apache/jackrabbit/filevault/maven/packaging/mojo/FormatDocviewXmlMojo.java
@@ -84,13 +84,13 @@ public class FormatDocviewXmlMojo extends AbstractMojo {
*/
@Parameter
protected Set<String> excludes = new HashSet<>();
-
+
/**
* If set to {@code true} then fails the build if it encounters XML files which don't follow the
* formatting rules for XML Docview files.
* If set to {@code false} will reformat all XML Docview files.
*/
- @Parameter(defaultValue = "false")
+ @Parameter(defaultValue = "false", property = "vault.validateOnly")
private boolean validateOnly;
/**
@@ -104,8 +104,7 @@ public class FormatDocviewXmlMojo extends AbstractMojo {
protected BuildContext buildContext;
private static final String MSG_MALFORMED_FILE = "Malformed according to DocView format";
- private static final String MSG_COUNTERMEASURE = "Use either your IDE with JCR-VLT integration to sync files with the repository or use vlt-cli to apply the docview format " +
- "(http://jackrabbit.apache.org/filevault/usage.html).";
+ private static final String MSG_COUNTERMEASURE = "Use \"mvn filevault-package:format-xml\" to reformat the malformed files.";
public void execute() throws MojoExecutionException, MojoFailureException {
if (buildContext.isIncremental() && !enableForIncrementalBuild) {
@@ -122,7 +121,7 @@ public class FormatDocviewXmlMojo extends AbstractMojo {
}
}
}
-
+
protected void executeInternal(@NotNull File sourceDirectory)
throws MojoExecutionException, MojoFailureException {