You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ss...@apache.org on 2016/09/30 14:35:15 UTC

svn commit: r1762917 - /sling/trunk/tooling/maven/htl-maven-plugin/src/main/java/org/apache/sling/maven/htl/ValidateMojo.java

Author: sseifert
Date: Fri Sep 30 14:35:14 2016
New Revision: 1762917

URL: http://svn.apache.org/viewvc?rev=1762917&view=rev
Log:
SLING-6083 htl-maven-plugin should not fail when source directory not found

Modified:
    sling/trunk/tooling/maven/htl-maven-plugin/src/main/java/org/apache/sling/maven/htl/ValidateMojo.java

Modified: sling/trunk/tooling/maven/htl-maven-plugin/src/main/java/org/apache/sling/maven/htl/ValidateMojo.java
URL: http://svn.apache.org/viewvc/sling/trunk/tooling/maven/htl-maven-plugin/src/main/java/org/apache/sling/maven/htl/ValidateMojo.java?rev=1762917&r1=1762916&r2=1762917&view=diff
==============================================================================
--- sling/trunk/tooling/maven/htl-maven-plugin/src/main/java/org/apache/sling/maven/htl/ValidateMojo.java (original)
+++ sling/trunk/tooling/maven/htl-maven-plugin/src/main/java/org/apache/sling/maven/htl/ValidateMojo.java Fri Sep 30 14:35:14 2016
@@ -104,8 +104,8 @@ public class ValidateMojo extends Abstra
             sourceDirectory = new File(project.getBasedir(), sourceDirectory.getPath());
         }
         if (!sourceDirectory.exists()) {
-            throw new MojoExecutionException(
-                    String.format("Configured sourceDirectory={%s} does not exist.", sourceDirectory.getAbsolutePath()));
+            getLog().info("Source directory does not exist, skipping.");
+            return;
         }
         if (!sourceDirectory.isDirectory()) {
             throw new MojoExecutionException(
@@ -113,7 +113,7 @@ public class ValidateMojo extends Abstra
         }
 
         if ( !buildContext.hasDelta(sourceDirectory )) {
-            getLog().info("No files found to validate, skipping");
+            getLog().info("No files found to validate, skipping.");
             return;
         }