kwin commented on a change in pull request #46:
URL:
https://github.com/apache/jackrabbit-filevault-package-maven-plugin/pull/46#discussion_r532694748
##########
File path:
src/main/java/org/apache/jackrabbit/filevault/maven/packaging/FormatDocviewXmlMojo.java
##########
@@ -109,7 +111,14 @@ public void execute() throws MojoExecutionException,
MojoFailureException {
getLog().info("Skip executing mojo 'format-xml' for incremental
builds as parameter 'enableForIncrementalBuilds' is set to 'false'");
} else {
File jcrSourceDirectory =
AbstractSourceAndMetadataPackageMojo.getFirstExistingDirectory(jcrRootSourceDirectory);
- executeInternal(jcrSourceDirectory);
+ if (jcrSourceDirectory != null) {
+ executeInternal(jcrSourceDirectory);
+ } else {
+ if (getLog().isDebugEnabled()) {
+ getLog().debug("None of the configured
jcrRootSourceDirectory directories exists, skipping: " +
Review comment:
I would issue a WARN because that may also hint at a misconfiguration.
Also please use SLF4J placeholders.
##########
File path:
src/main/java/org/apache/jackrabbit/filevault/maven/packaging/FormatDocviewXmlMojo.java
##########
@@ -109,7 +111,14 @@ public void execute() throws MojoExecutionException,
MojoFailureException {
getLog().info("Skip executing mojo 'format-xml' for incremental
builds as parameter 'enableForIncrementalBuilds' is set to 'false'");
} else {
File jcrSourceDirectory =
AbstractSourceAndMetadataPackageMojo.getFirstExistingDirectory(jcrRootSourceDirectory);
- executeInternal(jcrSourceDirectory);
+ if (jcrSourceDirectory != null) {
+ executeInternal(jcrSourceDirectory);
Review comment:
Let us add a null annotation to executeInternal to clearly state that
null is not accepted.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]