maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rfscho...@apache.org
Subject [maven-javadoc-plugin] branch master updated: Introduce consumer to ignore lines starting with 'Picked up '
Date Sat, 06 Jan 2018 14:22:18 GMT
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
     new 12dbbde  Introduce consumer to ignore lines starting with 'Picked up '
12dbbde is described below

commit 12dbbde29cf6277ca311cb8afffdf02dbfe0c9b4
Author: rfscholte <rfscholte@apache.org>
AuthorDate: Sat Jan 6 15:22:11 2018 +0100

    Introduce consumer to ignore lines starting with 'Picked up '
---
 .../apache/maven/plugins/javadoc/JavadocUtil.java  | 22 ++++++++++++++++++++--
 1 file changed, 20 insertions(+), 2 deletions(-)

diff --git a/src/main/java/org/apache/maven/plugins/javadoc/JavadocUtil.java b/src/main/java/org/apache/maven/plugins/javadoc/JavadocUtil.java
index f575455..73ae0f2 100644
--- a/src/main/java/org/apache/maven/plugins/javadoc/JavadocUtil.java
+++ b/src/main/java/org/apache/maven/plugins/javadoc/JavadocUtil.java
@@ -525,8 +525,8 @@ public class JavadocUtil
         cmd.setWorkingDirectory( javadocExe.getParentFile() );
         cmd.createArg().setValue( "-J-version" );
 
-        CommandLineUtils.StringStreamConsumer out = new CommandLineUtils.StringStreamConsumer();
-        CommandLineUtils.StringStreamConsumer err = new CommandLineUtils.StringStreamConsumer();
+        CommandLineUtils.StringStreamConsumer out = new JavadocOutputStreamConsumer();
+        CommandLineUtils.StringStreamConsumer err = new JavadocOutputStreamConsumer();
 
         int exitCode = CommandLineUtils.executeCommandLine( cmd, out, err );
 
@@ -1512,6 +1512,24 @@ public class JavadocUtil
             return token;
         }
     }
+
+    /**
+     * Ignores line like 'Picked up JAVA_TOOL_OPTIONS: ...' as can happen on CI servers.
+     * 
+     * @author Robert Scholte
+     * @since 3.0.1
+     */
+    private static class JavadocOutputStreamConsumer extends CommandLineUtils.StringStreamConsumer
+    {
+        @Override
+        public void consumeLine( String line )
+        {
+            if ( !line.startsWith( "Picked up " ) )
+            {
+                super.consumeLine( line );
+            }
+        }
+    }
     
     static List<String> toList( String src )
     {

-- 
To stop receiving notification emails like this one, please contact
['"commits@maven.apache.org" <commits@maven.apache.org>'].

Mime
View raw message