jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [jackrabbit-filevault-package-maven-plugin] Buuhuu commented on a change in pull request #46: JCRVLT-481: Check if source directory exists, otherwise skip
Date Tue, 01 Dec 2020 09:49:01 GMT

Buuhuu commented on a change in pull request #46:
URL: https://github.com/apache/jackrabbit-filevault-package-maven-plugin/pull/46#discussion_r533243860



##########
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:
       `org.apache.maven.plugin.logging.Log` does not support placeholder replacement, thats
why the check if `isDebugEnabled()`
   
   Other Mojos may do the configuration validation. I don't see this being necessary in the
bounded context for "format xml". So said the debug log level is correct from my perspective
as "if the directory does not exist, do nothing". 
   
   This change addressees the execution of the `format-xml` goal from command line and even
if unlikely it may not run in a maven project at all. So I would rather not depend on the
packaging here.




----------------------------------------------------------------
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:
users@infra.apache.org



Mime
View raw message