This is an automated email from the ASF dual-hosted git repository.

cziegeler pushed a commit to branch master
in repository 
https://gitbox.apache.org/repos/asf/sling-slingfeature-maven-plugin.git


The following commit(s) were added to refs/heads/master by this push:
     new 84d2f1f  SLING-8796 : Continue with api generation even if javadoc 
reports errors
84d2f1f is described below

commit 84d2f1f24228d4302e4e4a13a2bff3d47e3fa26b
Author: Carsten Ziegeler <[email protected]>
AuthorDate: Fri Oct 25 10:15:57 2019 +0200

    SLING-8796 : Continue with api generation even if javadoc reports errors
---
 .../java/org/apache/sling/feature/maven/mojos/JavadocExecutor.java   | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git 
a/src/main/java/org/apache/sling/feature/maven/mojos/JavadocExecutor.java 
b/src/main/java/org/apache/sling/feature/maven/mojos/JavadocExecutor.java
index d5922a7..5f9cfef 100644
--- a/src/main/java/org/apache/sling/feature/maven/mojos/JavadocExecutor.java
+++ b/src/main/java/org/apache/sling/feature/maven/mojos/JavadocExecutor.java
@@ -105,6 +105,9 @@ final class JavadocExecutor {
 
         DefaultExecutor executor = new DefaultExecutor();
         executor.setWorkingDirectory(workingDir);
+        if (ignoreErrors) {
+            executor.setExitValues(new int[] { 1, 0, -1 });
+        }
         try {
             executor.getStreamHandler().setProcessInputStream(new 
LoggerOutputStream(logger));
             final int exitValue = executor.execute(javadocCommand);
@@ -112,7 +115,7 @@ final class JavadocExecutor {
                 throw new MojoExecutionException("Javadoc generation failed. 
See log for more details.");
             }
         } catch (IOException ioe) {
-            throw new MojoExecutionException("Javadoc tool cannot be invoked 
on that machine", ioe);
+            throw new MojoExecutionException("Javadoc generation failed. See 
log for more details.", ioe);
         }
     }
 

Reply via email to