From c05e8dc12410e0cf71b527360fd9e9e5c7579539 Mon Sep 17 00:00:00 2001 From: Kevin Risden Date: Tue, 13 Nov 2018 18:08:02 -0500 Subject: [PATCH] [MJAVADOC-538] Filter out 'Picked up' Signed-off-by: Kevin Risden --- pom.xml | 5 ++ .../projects/MJAVADOC-538/invoker.properties | 18 +++++++ src/it/projects/MJAVADOC-538/pom.xml | 48 +++++++++++++++++++ .../src/main/java/foo/bar/MyClass.java | 24 ++++++++++ .../plugins/javadoc/AbstractJavadocMojo.java | 4 +- .../maven/plugins/javadoc/JavadocUtil.java | 2 +- 6 files changed, 98 insertions(+), 3 deletions(-) create mode 100644 src/it/projects/MJAVADOC-538/invoker.properties create mode 100644 src/it/projects/MJAVADOC-538/pom.xml create mode 100644 src/it/projects/MJAVADOC-538/src/main/java/foo/bar/MyClass.java diff --git a/pom.xml b/pom.xml index fa19d3e4..cd6cc3b7 100644 --- a/pom.xml +++ b/pom.xml @@ -113,6 +113,9 @@ under the License. Anton Klarén + + Kevin Risden + @@ -441,6 +444,8 @@ under the License. true + + <_JAVA_OPTIONS>-Dabc=def diff --git a/src/it/projects/MJAVADOC-538/invoker.properties b/src/it/projects/MJAVADOC-538/invoker.properties new file mode 100644 index 00000000..a4e250da --- /dev/null +++ b/src/it/projects/MJAVADOC-538/invoker.properties @@ -0,0 +1,18 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +invoker.goals=clean javadoc:javadoc diff --git a/src/it/projects/MJAVADOC-538/pom.xml b/src/it/projects/MJAVADOC-538/pom.xml new file mode 100644 index 00000000..e7d3ae17 --- /dev/null +++ b/src/it/projects/MJAVADOC-538/pom.xml @@ -0,0 +1,48 @@ + + + + + + 4.0.0 + + org.apache.maven.plugins.maven-javadoc-plugin.it + mjavadoc-538 + 1.0-SNAPSHOT + https://issues.apache.org/jira/browse/MJAVADOC-538 + + + UTF-8 + + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + @project.version@ + + true + + + + + + diff --git a/src/it/projects/MJAVADOC-538/src/main/java/foo/bar/MyClass.java b/src/it/projects/MJAVADOC-538/src/main/java/foo/bar/MyClass.java new file mode 100644 index 00000000..e5960e38 --- /dev/null +++ b/src/it/projects/MJAVADOC-538/src/main/java/foo/bar/MyClass.java @@ -0,0 +1,24 @@ +package foo.bar; + +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +public class MyClass +{ +} diff --git a/src/main/java/org/apache/maven/plugins/javadoc/AbstractJavadocMojo.java b/src/main/java/org/apache/maven/plugins/javadoc/AbstractJavadocMojo.java index e19b68f2..5dc3fd63 100644 --- a/src/main/java/org/apache/maven/plugins/javadoc/AbstractJavadocMojo.java +++ b/src/main/java/org/apache/maven/plugins/javadoc/AbstractJavadocMojo.java @@ -5251,8 +5251,8 @@ private void executeJavadocCommandLine( Commandline cmd, File javadocOutputDirec writeDebugJavadocScript( cmdLine, javadocOutputDirectory ); } - CommandLineUtils.StringStreamConsumer err = new CommandLineUtils.StringStreamConsumer(); - CommandLineUtils.StringStreamConsumer out = new CommandLineUtils.StringStreamConsumer(); + CommandLineUtils.StringStreamConsumer err = new JavadocUtil.JavadocOutputStreamConsumer(); + CommandLineUtils.StringStreamConsumer out = new JavadocUtil.JavadocOutputStreamConsumer(); try { int exitCode = CommandLineUtils.executeCommandLine( cmd, out, err ); 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 da72cac6..380524ea 100644 --- a/src/main/java/org/apache/maven/plugins/javadoc/JavadocUtil.java +++ b/src/main/java/org/apache/maven/plugins/javadoc/JavadocUtil.java @@ -1501,7 +1501,7 @@ public String nextToken() * @author Robert Scholte * @since 3.0.1 */ - private static class JavadocOutputStreamConsumer + protected static class JavadocOutputStreamConsumer extends CommandLineUtils.StringStreamConsumer { @Override