diff --git a/pom.xml b/pom.xml index 9dad6e90..ab901a61 100644 --- a/pom.xml +++ b/pom.xml @@ -72,6 +72,7 @@ under the License. 1.7.4 2.4 1.13.1 + 1.0.3 3.3 2.7 @@ -274,7 +275,7 @@ under the License. org.codehaus.plexus plexus-java - 1.0.3 + ${plexus-java.version} org.codehaus.plexus @@ -429,6 +430,9 @@ under the License. ${maven.home} ${https.protocols} + + true + diff --git a/src/it/projects/MJAVADOC-320/verify.bsh b/src/it/projects/MJAVADOC-320/verify.bsh deleted file mode 100644 index 8274de9f..00000000 --- a/src/it/projects/MJAVADOC-320/verify.bsh +++ /dev/null @@ -1,80 +0,0 @@ - -/* - * 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. - */ - -import java.io.*; - -boolean result = true; - -try -{ - File target = new File( basedir, "module2/target" ); - if ( !target.exists() || !target.isDirectory() ) - { - System.err.println( "module2/target file is missing or not a directory." ); - return false; - } - - File apidocs = new File( target, "apidocs" ); - if ( !apidocs.exists() || !apidocs.isDirectory() ) - { - System.err.println( "module2/target/apidocs file is missing or not a directory." ); - return false; - } - - // module3 must be included - File module3File = new File( apidocs, "org/apache/maven/plugin/javadoc/it/Module3Class.html" ); - if ( !module3File.isFile() ) - { - System.err.println( "module2/target/apidocs/org/apache/maven/plugin/javadoc/it/Module3Class.html file is missing or not a file." ); - return false; - } - - // el-api must be included - File elApiFile = new File( apidocs, "javax/el/ValueExpression.html" ); - if ( !elApiFile.isFile() ) - { - System.err.println( "module2/target/apidocs/javax/el/ValueExpression.html file is missing or not a file." ); - return false; - } - - // module1 must NOT be included - File module1File = new File( apidocs, "org/apache/maven/plugin/javadoc/it/Module1Class.html" ); - if ( module1File.isFile() ) - { - System.err.println( "module2/target/apidocs/org/apache/maven/plugin/javadoc/it/Module1Class.html file exists, but should not." ); - return false; - } - - // servlet-api must NOT be included - File servletSpecFile = new File( apidocs, "javax/servlet/ServletContext.html" ); - if ( servletSpecFile.isFile() ) - { - System.err.println( "module2/target/apidocs/javax/servlet/ServletContext.html file exists, but should not." ); - return false; - } - -} -catch( IOException e ) -{ - e.printStackTrace(); - result = false; -} - -return result; diff --git a/src/it/projects/MJAVADOC-320/verify.groovy b/src/it/projects/MJAVADOC-320/verify.groovy new file mode 100644 index 00000000..d9375a34 --- /dev/null +++ b/src/it/projects/MJAVADOC-320/verify.groovy @@ -0,0 +1,48 @@ + +/* + * 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. + */ + +File target = new File( basedir, "module2/target" ); +assert target.exists() +assert target.isDirectory() + +File apidocs = new File( target, "apidocs" ); +assert apidocs.exists() +assert apidocs.isDirectory() + +// module3 must be included +File module3File = new File( apidocs, "org/apache/maven/plugin/javadoc/it/Module3Class.html" ); +assert module3File.exists() +assert module3File.isFile() + +// el-api must be included +File elApiFile = new File( apidocs, "javax/el/ValueExpression.html" ); +assert elApiFile.exists() +assert elApiFile.isFile() + +// module1 must NOT be included +File module1File = new File( apidocs, "org/apache/maven/plugin/javadoc/it/Module1Class.html" ); +assert !module1File.exists() +assert !module1File.isFile() + +// servlet-api must NOT be included +File servletSpecFile = new File( apidocs, "javax/servlet/ServletContext.html" ); +assert !servletSpecFile.exists() +assert !servletSpecFile.isFile() + diff --git a/src/it/projects/MJAVADOC-613-aggregate-exclude/b/c/d1/pom.xml b/src/it/projects/MJAVADOC-613-aggregate-exclude/b/c/d1/pom.xml new file mode 100644 index 00000000..3134b95d --- /dev/null +++ b/src/it/projects/MJAVADOC-613-aggregate-exclude/b/c/d1/pom.xml @@ -0,0 +1,33 @@ + + + + + 4.0.0 + + + org.apache.maven.plugins.javadoc.it + mjavadoc613c + 1.0-SNAPSHOT + + mjavadoc613d1 + + diff --git a/src/test/resources/unit/fix-jdk5-test/src/main/java/fix/test/SubClassWithJavadoc.java b/src/it/projects/MJAVADOC-613-aggregate-exclude/b/c/d1/src/main/java/a/b/c/d/D1.java similarity index 59% rename from src/test/resources/unit/fix-jdk5-test/src/main/java/fix/test/SubClassWithJavadoc.java rename to src/it/projects/MJAVADOC-613-aggregate-exclude/b/c/d1/src/main/java/a/b/c/d/D1.java index b0634834..36885525 100644 --- a/src/test/resources/unit/fix-jdk5-test/src/main/java/fix/test/SubClassWithJavadoc.java +++ b/src/it/projects/MJAVADOC-613-aggregate-exclude/b/c/d1/src/main/java/a/b/c/d/D1.java @@ -1,4 +1,4 @@ -package fix.test; +package a.b.c.d; /* * Licensed to the Apache Software Foundation (ASF) under one @@ -9,7 +9,7 @@ * "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 + * 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 @@ -19,21 +19,7 @@ * under the License. */ -import java.util.List; -import java.util.Map; - -/** - * To add default class tags. - */ -public class SubClassWithJavadoc - extends ClassWithJavadoc +public class D1 { - // ---------------------------------------------------------------------- - // Inheritance - // ---------------------------------------------------------------------- - @Override - public void withGenericParameters( List aList, Map>, List> aMap ) - { - } -} +} \ No newline at end of file diff --git a/src/it/projects/MJAVADOC-613-aggregate-exclude/b/c/d2/pom.xml b/src/it/projects/MJAVADOC-613-aggregate-exclude/b/c/d2/pom.xml new file mode 100644 index 00000000..b2204d4d --- /dev/null +++ b/src/it/projects/MJAVADOC-613-aggregate-exclude/b/c/d2/pom.xml @@ -0,0 +1,33 @@ + + + + + 4.0.0 + + + org.apache.maven.plugins.javadoc.it + mjavadoc613c + 1.0-SNAPSHOT + + mjavadoc613d2 + + diff --git a/src/test/resources/unit/fix-jdk5-test/expected/src/main/java/fix/test/SubClassWithJavadoc.java b/src/it/projects/MJAVADOC-613-aggregate-exclude/b/c/d2/src/main/java/a/b/c/d/D2.java similarity index 54% rename from src/test/resources/unit/fix-jdk5-test/expected/src/main/java/fix/test/SubClassWithJavadoc.java rename to src/it/projects/MJAVADOC-613-aggregate-exclude/b/c/d2/src/main/java/a/b/c/d/D2.java index 18566fa0..d588de3e 100644 --- a/src/test/resources/unit/fix-jdk5-test/expected/src/main/java/fix/test/SubClassWithJavadoc.java +++ b/src/it/projects/MJAVADOC-613-aggregate-exclude/b/c/d2/src/main/java/a/b/c/d/D2.java @@ -1,4 +1,4 @@ -package fix.test; +package a.b.c.d; /* * Licensed to the Apache Software Foundation (ASF) under one @@ -9,7 +9,7 @@ * "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 + * 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 @@ -19,25 +19,7 @@ * under the License. */ -import java.util.List; -import java.util.Map; - -/** - * To add default class tags. - * - * @author vsiveton@apache.org - * @version $Id: $ - */ -public class SubClassWithJavadoc - extends ClassWithJavadoc +public class D2 { - // ---------------------------------------------------------------------- - // Inheritance - // ---------------------------------------------------------------------- - /** {@inheritDoc} */ - @Override - public void withGenericParameters( List aList, Map>, List> aMap ) - { - } -} +} \ No newline at end of file diff --git a/src/it/projects/MJAVADOC-613-aggregate-exclude/b/c/pom.xml b/src/it/projects/MJAVADOC-613-aggregate-exclude/b/c/pom.xml new file mode 100644 index 00000000..50c69c7d --- /dev/null +++ b/src/it/projects/MJAVADOC-613-aggregate-exclude/b/c/pom.xml @@ -0,0 +1,53 @@ + + + + + 4.0.0 + + + org.apache.maven.plugins.javadoc.it + mjavadoc613b + 1.0-SNAPSHOT + + mjavadoc613c + pom + + + d1 + d2 + + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + + true + + + + + + + diff --git a/src/it/projects/MJAVADOC-613-aggregate-exclude/b/e/pom.xml b/src/it/projects/MJAVADOC-613-aggregate-exclude/b/e/pom.xml new file mode 100644 index 00000000..e7aae8b3 --- /dev/null +++ b/src/it/projects/MJAVADOC-613-aggregate-exclude/b/e/pom.xml @@ -0,0 +1,33 @@ + + + + + 4.0.0 + + + org.apache.maven.plugins.javadoc.it + mjavadoc613b + 1.0-SNAPSHOT + + mjavadoc613e + + diff --git a/src/test/resources/unit/fix-jdk6-test/src/main/java/fix/test/InterfaceWithJavadoc.java b/src/it/projects/MJAVADOC-613-aggregate-exclude/b/e/src/main/java/a/b/e/E.java similarity index 51% rename from src/test/resources/unit/fix-jdk6-test/src/main/java/fix/test/InterfaceWithJavadoc.java rename to src/it/projects/MJAVADOC-613-aggregate-exclude/b/e/src/main/java/a/b/e/E.java index 65240f1b..9b8dcb73 100644 --- a/src/test/resources/unit/fix-jdk6-test/src/main/java/fix/test/InterfaceWithJavadoc.java +++ b/src/it/projects/MJAVADOC-613-aggregate-exclude/b/e/src/main/java/a/b/e/E.java @@ -1,4 +1,4 @@ -package fix.test; +package a.b.e; /* * Licensed to the Apache Software Foundation (ASF) under one @@ -9,7 +9,7 @@ * "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 + * 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 @@ -19,29 +19,7 @@ * under the License. */ -import java.util.List; - -/** - * To add default interface tags. - */ -public interface InterfaceWithJavadoc +public interface E { - /** - * To add default method tags. - */ - public void withGenericParameters( List aList ); - - /** - * To take care of identifier. - */ - void withGenericParameters2( List aList ); - - // ---------------------------------------------------------------------- - // New methods to be found by Clirr. - // ---------------------------------------------------------------------- - - /** - * New interface method to be found by Clirr. - */ - public String newInterfaceMethod( String aString ); -} + +} \ No newline at end of file diff --git a/src/it/projects/MJAVADOC-613-aggregate-exclude/b/pom.xml b/src/it/projects/MJAVADOC-613-aggregate-exclude/b/pom.xml new file mode 100644 index 00000000..0a9a37f1 --- /dev/null +++ b/src/it/projects/MJAVADOC-613-aggregate-exclude/b/pom.xml @@ -0,0 +1,39 @@ + + + + + 4.0.0 + + + org.apache.maven.plugins.javadoc.it + mjavadoc613 + 1.0-SNAPSHOT + + mjavadoc613b + pom + + + c + e + + + diff --git a/src/it/projects/MJAVADOC-613-aggregate-exclude/f/pom.xml b/src/it/projects/MJAVADOC-613-aggregate-exclude/f/pom.xml new file mode 100644 index 00000000..3e4673dc --- /dev/null +++ b/src/it/projects/MJAVADOC-613-aggregate-exclude/f/pom.xml @@ -0,0 +1,45 @@ + + + + + 4.0.0 + + + org.apache.maven.plugins.javadoc.it + mjavadoc613 + 1.0-SNAPSHOT + + mjavadoc613f + + + + + org.apache.maven.plugins + maven-javadoc-plugin + + true + + + + + + diff --git a/src/it/projects/MJAVADOC-613-aggregate-exclude/f/src/main/java/a/f/F.java b/src/it/projects/MJAVADOC-613-aggregate-exclude/f/src/main/java/a/f/F.java new file mode 100644 index 00000000..1f726333 --- /dev/null +++ b/src/it/projects/MJAVADOC-613-aggregate-exclude/f/src/main/java/a/f/F.java @@ -0,0 +1,24 @@ +package a.f; + +/* + * 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 interface F +{ +} \ No newline at end of file diff --git a/src/it/projects/MJAVADOC-613-aggregate-exclude/invoker.properties b/src/it/projects/MJAVADOC-613-aggregate-exclude/invoker.properties new file mode 100644 index 00000000..233d924e --- /dev/null +++ b/src/it/projects/MJAVADOC-613-aggregate-exclude/invoker.properties @@ -0,0 +1,19 @@ +# 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 = javadoc:jar javadoc:aggregate-jar +invoker.goals = clean package javadoc:jar javadoc:aggregate-jar install diff --git a/src/it/projects/MJAVADOC-613-aggregate-exclude/pom.xml b/src/it/projects/MJAVADOC-613-aggregate-exclude/pom.xml new file mode 100644 index 00000000..0e0c3fc9 --- /dev/null +++ b/src/it/projects/MJAVADOC-613-aggregate-exclude/pom.xml @@ -0,0 +1,86 @@ + + + + + 4.0.0 + + org.apache.maven.plugins.javadoc.it + mjavadoc613 + 1.0-SNAPSHOT + pom + + https://issues.apache.org/jira/browse/MJAVADOC-134 + + + UTF-8 + + + + b + f + + + + + + + org.apache.maven.plugins + maven-site-plugin + @sitePluginVersion@ + + + org.apache.maven.plugins + maven-javadoc-plugin + @project.version@ + + + + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + + + + aggregate + + + + + + org.apache.maven.plugins + maven-project-info-reports-plugin + 2.9 + + + + index + + + + + + + diff --git a/src/it/projects/MJAVADOC-613-aggregate-exclude/verify.groovy b/src/it/projects/MJAVADOC-613-aggregate-exclude/verify.groovy new file mode 100644 index 00000000..10cacfb1 --- /dev/null +++ b/src/it/projects/MJAVADOC-613-aggregate-exclude/verify.groovy @@ -0,0 +1,45 @@ +/* + * 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. + */ + +import java.util.jar.* + +def aggregatedJavadoc = new File( basedir, 'target/mjavadoc613-1.0-SNAPSHOT-javadoc.jar'); + +assert aggregatedJavadoc.exists() +assert new File( basedir, 'b/c/d1/target/mjavadoc613d1-1.0-SNAPSHOT.jar').exists() +assert !(new File( basedir, 'b/c/d1/target/mjavadoc613d1-1.0-SNAPSHOT-javadoc.jar').exists()) +assert new File( basedir, 'b/c/d2/target/mjavadoc613d2-1.0-SNAPSHOT.jar').exists() +assert !(new File( basedir, 'b/c/d2/target/mjavadoc613d2-1.0-SNAPSHOT-javadoc.jar').exists()) +assert new File( basedir, 'b/e/target/mjavadoc613e-1.0-SNAPSHOT.jar').exists() +assert new File( basedir, 'b/e/target/mjavadoc613e-1.0-SNAPSHOT-javadoc.jar').exists() +assert new File( basedir, 'f/target/mjavadoc613f-1.0-SNAPSHOT.jar').exists() +assert !(new File( basedir, 'f/target/mjavadoc613f-1.0-SNAPSHOT-javadoc.jar').exists()) + +def jar = new JarFile(aggregatedJavadoc) + +def files = new ArrayList() + +for (JarEntry file in jar.entries()){ + files.add(file.getName()) +} + +assert files.contains("a/b/e/E.html") +assert !files.contains("a/b/c/d/D1.html") +assert !files.contains("a/b/c/d/D2.html") + 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 c0435319..c04c1f97 100644 --- a/src/main/java/org/apache/maven/plugins/javadoc/AbstractJavadocMojo.java +++ b/src/main/java/org/apache/maven/plugins/javadoc/AbstractJavadocMojo.java @@ -19,7 +19,9 @@ * under the License. */ +import org.apache.commons.lang3.BooleanUtils; import org.apache.commons.lang3.ClassUtils; +import org.apache.commons.lang3.StringUtils; import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.ArtifactUtils; import org.apache.maven.artifact.handler.ArtifactHandler; @@ -94,7 +96,6 @@ import org.codehaus.plexus.util.FileUtils; import org.codehaus.plexus.util.IOUtil; import org.codehaus.plexus.util.ReaderFactory; -import org.codehaus.plexus.util.StringUtils; import org.codehaus.plexus.util.WriterFactory; import org.codehaus.plexus.util.cli.CommandLineException; import org.codehaus.plexus.util.cli.CommandLineUtils; @@ -2229,7 +2230,7 @@ protected final Collection collect( Collection> sourcePaths * * @param sourcePaths a Collection that contains the paths to the source files * @return a List that contains the specific path for every source file - * @throws MavenReportException {@link MavenReportException} + * @throws MavenReportException {@link MavenReportException} issue while generating report */ protected Map> getFiles( Collection sourcePaths ) throws MavenReportException @@ -2263,7 +2264,7 @@ protected Map> getFiles( Collection sourcePaths ) * source roots of the project will be used. * * @return a Map of the project absolute source paths per projects key (G:A) - * @throws MavenReportException {@link MavenReportException} + * @throws MavenReportException {@link MavenReportException} issue while generating report * @see JavadocUtil#pruneDirs(MavenProject, Collection) */ protected Map> getSourcePaths() @@ -2371,23 +2372,11 @@ protected Map> getSourcePaths() return mappedSourcePaths; } - private Collection getAggregatedProjects() - { - Map reactorProjectsMap = new HashMap<>(); - for ( MavenProject reactorProject : this.reactorProjects ) - { - reactorProjectsMap.put( reactorProject.getBasedir().toPath(), reactorProject ); - } - - return modulesForAggregatedProject( project, reactorProjectsMap ); - } - /** * Recursively add the modules of the aggregatedProject to the set of aggregatedModules. * * @param aggregatedProject the project being aggregated * @param reactorProjectsMap map of (still) available reactor projects - * @throws MavenReportException if any */ private Set modulesForAggregatedProject( MavenProject aggregatedProject, Map reactorProjectsMap ) @@ -2522,8 +2511,9 @@ private SourceResolverConfig getDependencySourceResolverConfig() return configureDependencySourceResolution( new SourceResolverConfig( project, getProjectBuildingRequest( project ), - sourceDependencyCacheDir ).withReactorProjects( reactorProjects ) ) - .withFilter( new AndFilter( andFilters ) ); + sourceDependencyCacheDir ) + .withReactorProjects( this.reactorProjects ) ) + .withFilter( new AndFilter( andFilters ) ); } @@ -3617,7 +3607,7 @@ private List getArtifactsAbsolutePath( JavadocPathArtifact javadocArtifa * * @param javadocArtifact the {@link JavadocPathArtifact} to resolve * @return a resolved {@link Artifact} - * @throws ArtifactResolverException + * @throws ArtifactResolverException issue while resolving artifact */ private Artifact createAndResolveArtifact( JavadocPathArtifact javadocArtifact ) throws ArtifactResolverException @@ -4163,7 +4153,7 @@ private Set getLinkofflines() throws MavenReportException * * * @param arguments a list of arguments, not null - * @throws MavenReportException + * @throws MavenReportException issue while generating report * @see #detectLinks * @see #getDependenciesLinks() * @see package-list spec @@ -4932,8 +4922,9 @@ private void addJavadocOptions( File javadocOutputDirectory, addArgIf( arguments, breakiterator, "-breakiterator", SINCE_JAVADOC_1_5 ); } - Map reactorKeys = new HashMap<>( reactorProjects.size() ); - for ( MavenProject reactorProject : reactorProjects ) + List aggregatedProjects = reactorProjects; // getAggregatedProjects(); + Map reactorKeys = new HashMap<>( aggregatedProjects.size() ); + for ( MavenProject reactorProject : aggregatedProjects ) { reactorKeys.put( ArtifactUtils.versionlessKey( reactorProject.getGroupId(), reactorProject.getArtifactId() ), reactorProject ); @@ -5904,21 +5895,15 @@ private int fixFrameInjectionBug( File javadocOutputDirectory, String outputEnco throws IOException { final String fixData; - InputStream in = null; - try + + try ( InputStream in = this.getClass().getResourceAsStream( "frame-injection-fix.txt" ) ) { - in = this.getClass().getResourceAsStream( "frame-injection-fix.txt" ); if ( in == null ) { throw new FileNotFoundException( "Missing resource 'frame-injection-fix.txt' in classpath." ); } - fixData = StringUtils.unifyLineSeparators( IOUtil.toString( in, "US-ASCII" ) ).trim(); - in.close(); - in = null; - } - finally - { - IOUtil.close( in ); + fixData = org.codehaus.plexus.util.StringUtils + .unifyLineSeparators( IOUtil.toString( in, "US-ASCII" ) ).trim(); } final DirectoryScanner ds = new DirectoryScanner(); @@ -6143,7 +6128,8 @@ private String getFullJavadocGoal() private List getModulesLinks() throws MavenReportException { - if ( !detectOfflineLinks || isAggregator() || reactorProjects == null ) + List aggregatedProjects = reactorProjects; + if ( !detectOfflineLinks || isAggregator() || aggregatedProjects.isEmpty() ) { return Collections.emptyList(); } @@ -6159,7 +6145,7 @@ private List getModulesLinks() List modulesLinks = new ArrayList<>(); String javadocDirRelative = PathUtils.toRelative( project.getBasedir(), getOutputDirectory() ); - for ( MavenProject p : reactorProjects ) + for ( MavenProject p : aggregatedProjects ) { if ( !dependencyArtifactIds.contains( p.getArtifact().getId() ) || ( p.getUrl() == null ) ) { @@ -6802,7 +6788,7 @@ protected void logError( String message, Throwable t ) /** * @param prefix The prefix of the exception. * @param e The exception. - * @throws MojoExecutionException {@link MojoExecutionException} + * @throws MojoExecutionException {@link MojoExecutionException} issue while generating report */ protected void failOnError( String prefix, Exception e ) throws MojoExecutionException @@ -6818,4 +6804,49 @@ protected void failOnError( String prefix, Exception e ) getLog().error( prefix + ": " + e.getMessage(), e ); } + + + private List getAggregatedProjects() + { + if ( this.reactorProjects == null ) + { + return Collections.emptyList(); + } + Map reactorProjectsMap = new HashMap<>(); + for ( MavenProject reactorProject : this.reactorProjects ) + { + if ( !isSkippedJavadoc( reactorProject ) ) + { + reactorProjectsMap.put( reactorProject.getBasedir().toPath(), reactorProject ); + } + } + + return new ArrayList<>( modulesForAggregatedProject( project, reactorProjectsMap ) ); + } + + protected boolean isSkippedJavadoc( MavenProject mavenProject ) + { + String property = mavenProject.getProperties().getProperty( "maven.javadoc.skip" ); + if ( property != null ) + { + boolean skip = BooleanUtils.toBoolean( property ); + getLog().debug( "isSkippedJavadoc " + mavenProject + " " + skip ); + return skip; + } + final String pluginId = "org.apache.maven.plugins:maven-javadoc-plugin"; + property = getPluginParameter( mavenProject, pluginId, "skip" ); + if ( property != null ) + { + boolean skip = BooleanUtils.toBoolean( property ); + getLog().debug( "isSkippedJavadoc " + mavenProject + " " + skip ); + return skip; + } + if ( mavenProject.getParent() != null ) + { + return isSkippedJavadoc( mavenProject.getParent() ); + } + getLog().debug( "isSkippedJavadoc " + mavenProject + " " + false ); + return false; + } + } diff --git a/src/test/java/org/apache/maven/plugins/javadoc/FixJavadocMojoTest.java b/src/test/java/org/apache/maven/plugins/javadoc/FixJavadocMojoTest.java index 1db93391..2129e24c 100644 --- a/src/test/java/org/apache/maven/plugins/javadoc/FixJavadocMojoTest.java +++ b/src/test/java/org/apache/maven/plugins/javadoc/FixJavadocMojoTest.java @@ -90,21 +90,6 @@ private void createTestRepo() assertTrue( sourceDir.exists() ); FileUtils.copyDirectoryStructure( sourceDir, localRepo ); - // ---------------------------------------------------------------------- - // fix-jdk5-test-1.0.jar - // ---------------------------------------------------------------------- - - sourceDir = new File( getBasedir(), "src/test/resources/unit/fix-jdk5-test/repo/" ); - assertTrue( sourceDir.exists() ); - FileUtils.copyDirectoryStructure( sourceDir, localRepo ); - - // ---------------------------------------------------------------------- - // fix-jdk6-test-1.0.jar - // ---------------------------------------------------------------------- - - sourceDir = new File( getBasedir(), "src/test/resources/unit/fix-jdk6-test/repo/" ); - assertTrue( sourceDir.exists() ); - FileUtils.copyDirectoryStructure( sourceDir, localRepo ); // Remove SCM files List files = @@ -139,41 +124,6 @@ public void testFix() "InterfaceWithJavadoc.java", "InterfaceWithNoJavadoc.java" } ); } - /** - * @throws Exception if any - */ - public void testFixJdk5() - throws Exception - { - // Should be an assumption, but not supported by TestCase - // Java 5 not supported by Java 9 anymore - if ( JavaVersion.JAVA_SPECIFICATION_VERSION.isAtLeast( "9" ) ) - { - return; - } - - File testPomBasedir = new File( getBasedir(), "target/test/unit/fix-jdk5-test" ); - executeMojoAndTest( testPomBasedir, new String[] { "ClassWithJavadoc.java", "ClassWithNoJavadoc.java", - "InterfaceWithJavadoc.java", "InterfaceWithNoJavadoc.java", "SubClassWithJavadoc.java" } ); - } - - /** - * @throws Exception if any - */ - public void testFixJdk6() - throws Exception - { - // Should be an assumption, but not supported by TestCase - // Java 6 not supported by Java 12 anymore - if ( JavaVersion.JAVA_SPECIFICATION_VERSION.isAtLeast( "12" ) ) - { - return; - } - - File testPomBasedir = new File( getBasedir(), "target/test/unit/fix-jdk6-test" ); - executeMojoAndTest( testPomBasedir, new String[] { "ClassWithJavadoc.java", "InterfaceWithJavadoc.java" } ); - } - // ---------------------------------------------------------------------- // Test private static methods // ---------------------------------------------------------------------- diff --git a/src/test/java/org/apache/maven/plugins/javadoc/JavadocReportTest.java b/src/test/java/org/apache/maven/plugins/javadoc/JavadocReportTest.java index e6fc3d09..6311537f 100644 --- a/src/test/java/org/apache/maven/plugins/javadoc/JavadocReportTest.java +++ b/src/test/java/org/apache/maven/plugins/javadoc/JavadocReportTest.java @@ -1180,7 +1180,7 @@ public void testTagletArtifacts() assertTrue( optionsFile.exists() ); String options = readFile( optionsFile ); // count -taglet - assertEquals( 20, StringUtils.countMatches( options, LINE_SEPARATOR + "-taglet" + LINE_SEPARATOR ) ); + assertEquals( 22, StringUtils.countMatches( options, LINE_SEPARATOR + "-taglet" + LINE_SEPARATOR ) ); assertTrue( options.contains( "org.apache.maven.tools.plugin.javadoc.MojoAggregatorTypeTaglet" ) ); assertTrue( options.contains( "org.apache.maven.tools.plugin.javadoc.MojoComponentFieldTaglet" ) ); assertTrue( options.contains( "org.apache.maven.tools.plugin.javadoc.MojoConfiguratorTypeTaglet" ) ); diff --git a/src/test/java/org/apache/maven/plugins/javadoc/stubs/FixJdk5MavenProjectStub.java b/src/test/java/org/apache/maven/plugins/javadoc/stubs/FixJdk5MavenProjectStub.java deleted file mode 100644 index 04d6a4ba..00000000 --- a/src/test/java/org/apache/maven/plugins/javadoc/stubs/FixJdk5MavenProjectStub.java +++ /dev/null @@ -1,105 +0,0 @@ -package org.apache.maven.plugins.javadoc.stubs; - -/* - * 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. - */ - -import java.io.File; - -import org.apache.maven.model.Build; -import org.apache.maven.plugin.testing.stubs.MavenProjectStub; - -/** - * @author Vincent Siveton - */ -public class FixJdk5MavenProjectStub - extends MavenProjectStub -{ - public FixJdk5MavenProjectStub() - { - readModel( new File( getBasedir(), "pom.xml" ) ); - - addCompileSourceRoot( getBasedir().getAbsolutePath() + "/target/classes" ); - addCompileSourceRoot( getBasedir().getAbsolutePath() + "/src/main/java" ); - - Build build = new Build(); - build.setDirectory( getBasedir().getAbsolutePath() + "/target" ); - build.setSourceDirectory( getBasedir().getAbsolutePath() + "/src/main/java" ); - build.setOutputDirectory( getBasedir().getAbsolutePath() + "/target/classes" ); - build.setTestSourceDirectory( getBasedir().getAbsolutePath() + "/src/test/java" ); - build.setTestOutputDirectory( getBasedir().getAbsolutePath() + "/target/test-classes" ); - setBuild( build ); - } - - /** {@inheritDoc} */ - @Override - public String getArtifactId() - { - return getModel().getArtifactId(); - } - - /** {@inheritDoc} */ - @Override - public String getGroupId() - { - String groupId = getModel().getGroupId(); - - if ( ( groupId == null ) && ( getModel().getParent() != null ) ) - { - groupId = getModel().getParent().getGroupId(); - } - - return groupId; - } - - /** {@inheritDoc} */ - @Override - public String getVersion() - { - String version = getModel().getVersion(); - - if ( ( version == null ) && ( getModel().getParent() != null ) ) - { - version = getModel().getParent().getVersion(); - } - - return version; - } - - /** {@inheritDoc} */ - @Override - public String getPackaging() - { - return getModel().getPackaging(); - } - - /** {@inheritDoc} */ - @Override - public File getBasedir() - { - // Using unit test dir - return new File( super.getBasedir() + "/target/test/unit/fix-jdk5-test/" ); - } - - /** {@inheritDoc} */ - @Override - public File getFile() - { - return new File( getBasedir(), "pom.xml" ); - } -} diff --git a/src/test/java/org/apache/maven/plugins/javadoc/stubs/FixJdk6MavenProjectStub.java b/src/test/java/org/apache/maven/plugins/javadoc/stubs/FixJdk6MavenProjectStub.java deleted file mode 100644 index 79c11c3d..00000000 --- a/src/test/java/org/apache/maven/plugins/javadoc/stubs/FixJdk6MavenProjectStub.java +++ /dev/null @@ -1,105 +0,0 @@ -package org.apache.maven.plugins.javadoc.stubs; - -/* - * 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. - */ - -import java.io.File; - -import org.apache.maven.model.Build; -import org.apache.maven.plugin.testing.stubs.MavenProjectStub; - -/** - * @author Vincent Siveton - */ -public class FixJdk6MavenProjectStub - extends MavenProjectStub -{ - public FixJdk6MavenProjectStub() - { - readModel( new File( getBasedir(), "pom.xml" ) ); - - addCompileSourceRoot( getBasedir().getAbsolutePath() + "/target/classes" ); - addCompileSourceRoot( getBasedir().getAbsolutePath() + "/src/main/java" ); - - Build build = new Build(); - build.setDirectory( getBasedir().getAbsolutePath() + "/target" ); - build.setSourceDirectory( getBasedir().getAbsolutePath() + "/src/main/java" ); - build.setOutputDirectory( getBasedir().getAbsolutePath() + "/target/classes" ); - build.setTestSourceDirectory( getBasedir().getAbsolutePath() + "/src/test/java" ); - build.setTestOutputDirectory( getBasedir().getAbsolutePath() + "/target/test-classes" ); - setBuild( build ); - } - - /** {@inheritDoc} */ - @Override - public String getArtifactId() - { - return getModel().getArtifactId(); - } - - /** {@inheritDoc} */ - @Override - public String getGroupId() - { - String groupId = getModel().getGroupId(); - - if ( ( groupId == null ) && ( getModel().getParent() != null ) ) - { - groupId = getModel().getParent().getGroupId(); - } - - return groupId; - } - - /** {@inheritDoc} */ - @Override - public String getVersion() - { - String version = getModel().getVersion(); - - if ( ( version == null ) && ( getModel().getParent() != null ) ) - { - version = getModel().getParent().getVersion(); - } - - return version; - } - - /** {@inheritDoc} */ - @Override - public String getPackaging() - { - return getModel().getPackaging(); - } - - /** {@inheritDoc} */ - @Override - public File getBasedir() - { - // Using unit test dir - return new File( super.getBasedir() + "/target/test/unit/fix-jdk6-test/" ); - } - - /** {@inheritDoc} */ - @Override - public File getFile() - { - return new File( getBasedir(), "pom.xml" ); - } -} diff --git a/src/test/resources/unit/fix-jdk5-test/expected/src/main/java/fix/test/ClassWithJavadoc.java b/src/test/resources/unit/fix-jdk5-test/expected/src/main/java/fix/test/ClassWithJavadoc.java deleted file mode 100644 index 4abb045d..00000000 --- a/src/test/resources/unit/fix-jdk5-test/expected/src/main/java/fix/test/ClassWithJavadoc.java +++ /dev/null @@ -1,122 +0,0 @@ -package fix.test; - -/* - * 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. - */ - -import java.util.List; -import java.util.Map; - -/** - * To add default class tags. - * - * @author vsiveton@apache.org - * @version $Id: $ - */ -public class ClassWithJavadoc - implements InterfaceWithJavadoc -{ - /** - * Empty constructor. - */ - public ClassWithJavadoc() - { - } - - /** - * Constructor with generic param. - * - * @param list a {@link java.util.List} object. - */ - public ClassWithJavadoc( List list ) - { - } - - /** - * QDOX-155 - * - * @param request a T object. - * @return a {@link java.util.List} object. - * @throws java.lang.Exception if any. - */ - public List withGenericParameter( T request ) - throws Exception - { - return null; - } - - // ---------------------------------------------------------------------- - // New methods to be found by Clirr. - // ---------------------------------------------------------------------- - - /** - * Correct generic doclets. - * - * @param The Key type for the method - * @param The Value type for the method - * @param name The name. - * @return A map configured. - * @since 1.1 - */ - public Map withGenericDoclet( String name ) - { - return null; - } - - /** - * Wrong generic doclets. - * - * @param name The name. - * @return A map configured. - * @param a K object. - * @param a V object. - * @since 1.1 - */ - public Map withGenericDoclet2( String name ) - { - return null; - } - - /** - * New class method to be found by Clirr. - * - * @param aList a {@link java.util.List} object. - * @param aMap a {@link java.util.Map} object. - * @return a {@link java.util.Map} object. - * @since 1.1 - */ - public Map newClassMethod( List aList, Map>, List> aMap ) - { - return null; - } - - // ---------------------------------------------------------------------- - // Inheritance - // ---------------------------------------------------------------------- - - /** {@inheritDoc} */ - public void withGenericParameters( List aList, Map>, List> aMap ) - { - } - - /** {@inheritDoc} */ - public Map newInterfaceMethod( List aList, Map>, List> aMap ) - { - return null; - } -} diff --git a/src/test/resources/unit/fix-jdk5-test/expected/src/main/java/fix/test/ClassWithNoJavadoc.java b/src/test/resources/unit/fix-jdk5-test/expected/src/main/java/fix/test/ClassWithNoJavadoc.java deleted file mode 100644 index f029dab1..00000000 --- a/src/test/resources/unit/fix-jdk5-test/expected/src/main/java/fix/test/ClassWithNoJavadoc.java +++ /dev/null @@ -1,112 +0,0 @@ -package fix.test; - -/* - * 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. - */ - -import java.util.List; -import java.util.Map; - -/** - *

ClassWithNoJavadoc class.

- * - * @author vsiveton@apache.org - * @version $Id: $ - */ -public class ClassWithNoJavadoc - implements InterfaceWithNoJavadoc -{ - /** - *

Constructor for ClassWithNoJavadoc.

- */ - public ClassWithNoJavadoc() - { - } - - /** - *

Constructor for ClassWithNoJavadoc.

- * - * @param list a {@link java.util.List} object. - */ - public ClassWithNoJavadoc( List list ) - { - } - - // QDOX-155 - /** - *

withGenericParameter.

- * - * @param request a T object. - * @param a T object. - * @return a {@link java.util.List} object. - * @throws java.lang.Exception if any. - */ - public List withGenericParameter( T request ) - throws Exception - { - return null; - } - - // ---------------------------------------------------------------------- - // New methods to be found by Clirr. - // ---------------------------------------------------------------------- - - /** - *

withGenericParameter2.

- * - * @param name a {@link java.lang.String} object. - * @param a K object. - * @param a V object. - * @return a {@link java.util.Map} object. - * @since 1.1 - */ - public Map withGenericParameter2( String name ) - { - return null; - } - - /** - *

newClassMethod.

- * - * @param aList a {@link java.util.List} object. - * @param aMap a {@link java.util.Map} object. - * @param a K object. - * @param a V object. - * @return a {@link java.util.Map} object. - * @since 1.1 - */ - public Map newClassMethod( List aList, Map>, List> aMap ) - { - return null; - } - - // ---------------------------------------------------------------------- - // Inheritance - // ---------------------------------------------------------------------- - - /** {@inheritDoc} */ - public void withGenericParameters( List aList, Map>, List> aMap ) - { - } - - /** {@inheritDoc} */ - public Map newInterfaceMethod( List aList, Map>, List> aMap ) - { - return null; - } -} diff --git a/src/test/resources/unit/fix-jdk5-test/expected/src/main/java/fix/test/InterfaceWithJavadoc.java b/src/test/resources/unit/fix-jdk5-test/expected/src/main/java/fix/test/InterfaceWithJavadoc.java deleted file mode 100644 index a0a74b5c..00000000 --- a/src/test/resources/unit/fix-jdk5-test/expected/src/main/java/fix/test/InterfaceWithJavadoc.java +++ /dev/null @@ -1,58 +0,0 @@ -package fix.test; - -/* - * 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. - */ - -import java.util.Collections; -import java.util.List; -import java.util.Map; - -/** - * To add default interface tags. - * - * @author vsiveton@apache.org - * @version $Id: $ - */ -public interface InterfaceWithJavadoc -{ - /** default comment */ - Map MY_MAP_CONSTANT = Collections.singletonMap( "key", "value" ); - - /** - * To add default method tags. - * - * @param aList a {@link java.util.List} object. - * @param aMap a {@link java.util.Map} object. - */ - public void withGenericParameters( List aList, Map>, List> aMap ); - - // ---------------------------------------------------------------------- - // New methods to be found by Clirr. - // ---------------------------------------------------------------------- - - /** - * New interface method to be found by Clirr. - * - * @param aList a {@link java.util.List} object. - * @param aMap a {@link java.util.Map} object. - * @return a {@link java.util.Map} object. - * @since 1.1 - */ - public Map newInterfaceMethod( List aList, Map>, List> aMap ); -} diff --git a/src/test/resources/unit/fix-jdk5-test/expected/src/main/java/fix/test/InterfaceWithNoJavadoc.java b/src/test/resources/unit/fix-jdk5-test/expected/src/main/java/fix/test/InterfaceWithNoJavadoc.java deleted file mode 100644 index 686b9ac3..00000000 --- a/src/test/resources/unit/fix-jdk5-test/expected/src/main/java/fix/test/InterfaceWithNoJavadoc.java +++ /dev/null @@ -1,63 +0,0 @@ -package fix.test; - -/* - * 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. - */ - -import java.util.Collections; -import java.util.List; -import java.util.Map; - -/** - *

InterfaceWithNoJavadoc interface.

- * - * @author vsiveton@apache.org - * @version $Id: $ - */ -public interface InterfaceWithNoJavadoc -{ - /** Constant MY_LIST_CONSTANT */ - List MY_LIST_CONSTANT = Collections.singletonList( "value" ); - - /** Constant MY_MAP_CONSTANT */ - Map MY_MAP_CONSTANT = Collections.singletonMap( "key", "value" ); - - /** - *

withGenericParameters.

- * - * @param aList a {@link java.util.List} object. - * @param aMap a {@link java.util.Map} object. - */ - public void withGenericParameters( List aList, Map>, List> aMap ); - - // ---------------------------------------------------------------------- - // New methods to be found by Clirr. - // ---------------------------------------------------------------------- - - /** - *

newInterfaceMethod.

- * - * @param aList a {@link java.util.List} object. - * @param aMap a {@link java.util.Map} object. - * @param a K object. - * @param a V object. - * @return a {@link java.util.Map} object. - * @since 1.1 - */ - public Map newInterfaceMethod( List aList, Map>, List> aMap ); -} diff --git a/src/test/resources/unit/fix-jdk5-test/pom.xml b/src/test/resources/unit/fix-jdk5-test/pom.xml deleted file mode 100644 index f89c69c1..00000000 --- a/src/test/resources/unit/fix-jdk5-test/pom.xml +++ /dev/null @@ -1,63 +0,0 @@ - - - - 4.0.0 - - org.apache.maven.plugins.maven-javadoc-plugin.unit - fix-jdk5-test - 1.1-SNAPSHOT - Javadoc Test Project - jar - - - - - org.apache.maven.plugins - maven-compiler-plugin - 2.0.2 - - 1.5 - 1.5 - - - - org.apache.maven.plugins - maven-javadoc-plugin - - - ${localRepository} - ${basedir}/target/test/unit/fix-jdk5-test/target/generated - 1.1-SNAPSHOT - UTF-8 - all - true - true - true - true - false - 1.0 - **/*.java - protected - vsiveton@apache.org]]> - - - - - diff --git a/src/test/resources/unit/fix-jdk5-test/repo/org/apache/maven/plugins/maven-javadoc-plugin/unit/fix-jdk5-test/1.0/fix-jdk5-test-1.0.jar b/src/test/resources/unit/fix-jdk5-test/repo/org/apache/maven/plugins/maven-javadoc-plugin/unit/fix-jdk5-test/1.0/fix-jdk5-test-1.0.jar deleted file mode 100644 index 5362213a..00000000 Binary files a/src/test/resources/unit/fix-jdk5-test/repo/org/apache/maven/plugins/maven-javadoc-plugin/unit/fix-jdk5-test/1.0/fix-jdk5-test-1.0.jar and /dev/null differ diff --git a/src/test/resources/unit/fix-jdk5-test/repo/org/apache/maven/plugins/maven-javadoc-plugin/unit/fix-jdk5-test/1.0/fix-jdk5-test-1.0.pom b/src/test/resources/unit/fix-jdk5-test/repo/org/apache/maven/plugins/maven-javadoc-plugin/unit/fix-jdk5-test/1.0/fix-jdk5-test-1.0.pom deleted file mode 100644 index 43f567e3..00000000 --- a/src/test/resources/unit/fix-jdk5-test/repo/org/apache/maven/plugins/maven-javadoc-plugin/unit/fix-jdk5-test/1.0/fix-jdk5-test-1.0.pom +++ /dev/null @@ -1,61 +0,0 @@ - - - - 4.0.0 - - org.apache.maven.plugins.maven-javadoc-plugin.unit - fix-jdk5-test - 1.0 - Javadoc Test Project - jar - - - - - org.apache.maven.plugins - maven-compiler-plugin - 2.0.2 - - 1.5 - 1.5 - - - - org.apache.maven.plugins - maven-javadoc-plugin - - - ${basedir}/target/test/unit/fix-jdk5-test/target/generated - 1.0-SNAPSHOT - UTF-8 - all - true - true - true - true - true - **/*.java - protected - vsiveton@apache.org]]> - - - - - diff --git a/src/test/resources/unit/fix-jdk5-test/repo/org/apache/maven/plugins/maven-javadoc-plugin/unit/fix-jdk5-test/maven-metadata-local.xml b/src/test/resources/unit/fix-jdk5-test/repo/org/apache/maven/plugins/maven-javadoc-plugin/unit/fix-jdk5-test/maven-metadata-local.xml deleted file mode 100644 index 6cd34843..00000000 --- a/src/test/resources/unit/fix-jdk5-test/repo/org/apache/maven/plugins/maven-javadoc-plugin/unit/fix-jdk5-test/maven-metadata-local.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - org.apache.maven.plugins.maven-javadoc-plugin.unit - fix-jdk5-test - 1.0 - - - 1.0 - - 20090723104459 - - diff --git a/src/test/resources/unit/fix-jdk5-test/src/main/java/fix/test/ClassWithJavadoc.java b/src/test/resources/unit/fix-jdk5-test/src/main/java/fix/test/ClassWithJavadoc.java deleted file mode 100644 index a56a267d..00000000 --- a/src/test/resources/unit/fix-jdk5-test/src/main/java/fix/test/ClassWithJavadoc.java +++ /dev/null @@ -1,106 +0,0 @@ -package fix.test; - -/* - * 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. - */ - -import java.util.List; -import java.util.Map; - -/** - * To add default class tags. - */ -public class ClassWithJavadoc - implements InterfaceWithJavadoc -{ - /** - * Empty constructor. - */ - public ClassWithJavadoc() - { - } - - /** - * Constructor with generic param. - */ - public ClassWithJavadoc( List list ) - { - } - - /** - * QDOX-155 - */ - public List withGenericParameter( T request ) - throws Exception - { - return null; - } - - // ---------------------------------------------------------------------- - // New methods to be found by Clirr. - // ---------------------------------------------------------------------- - - /** - * Correct generic doclets. - * - * @param The Key type for the method - * @param The Value type for the method - * @param name The name. - * @return A map configured. - */ - public Map withGenericDoclet( String name ) - { - return null; - } - - /** - * Wrong generic doclets. - * - * @param The Key type for the method - * @param The Value type for the method - * @param name The name. - * @return A map configured. - */ - public Map withGenericDoclet2( String name ) - { - return null; - } - - /** - * New class method to be found by Clirr. - */ - public Map newClassMethod( List aList, Map>, List> aMap ) - { - return null; - } - - // ---------------------------------------------------------------------- - // Inheritance - // ---------------------------------------------------------------------- - - /** {@inheritDoc} */ - public void withGenericParameters( List aList, Map>, List> aMap ) - { - } - - /** {@inheritDoc} */ - public Map newInterfaceMethod( List aList, Map>, List> aMap ) - { - return null; - } -} diff --git a/src/test/resources/unit/fix-jdk5-test/src/main/java/fix/test/ClassWithNoJavadoc.java b/src/test/resources/unit/fix-jdk5-test/src/main/java/fix/test/ClassWithNoJavadoc.java deleted file mode 100644 index 412c713e..00000000 --- a/src/test/resources/unit/fix-jdk5-test/src/main/java/fix/test/ClassWithNoJavadoc.java +++ /dev/null @@ -1,69 +0,0 @@ -package fix.test; - -/* - * 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. - */ - -import java.util.List; -import java.util.Map; - -public class ClassWithNoJavadoc - implements InterfaceWithNoJavadoc -{ - public ClassWithNoJavadoc() - { - } - - public ClassWithNoJavadoc( List list ) - { - } - - // QDOX-155 - public List withGenericParameter( T request ) - throws Exception - { - return null; - } - - // ---------------------------------------------------------------------- - // New methods to be found by Clirr. - // ---------------------------------------------------------------------- - - public Map withGenericParameter2( String name ) - { - return null; - } - - public Map newClassMethod( List aList, Map>, List> aMap ) - { - return null; - } - - // ---------------------------------------------------------------------- - // Inheritance - // ---------------------------------------------------------------------- - - public void withGenericParameters( List aList, Map>, List> aMap ) - { - } - - public Map newInterfaceMethod( List aList, Map>, List> aMap ) - { - return null; - } -} diff --git a/src/test/resources/unit/fix-jdk5-test/src/main/java/fix/test/InterfaceWithJavadoc.java b/src/test/resources/unit/fix-jdk5-test/src/main/java/fix/test/InterfaceWithJavadoc.java deleted file mode 100644 index c24c5b54..00000000 --- a/src/test/resources/unit/fix-jdk5-test/src/main/java/fix/test/InterfaceWithJavadoc.java +++ /dev/null @@ -1,47 +0,0 @@ -package fix.test; - -/* - * 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. - */ - -import java.util.Collections; -import java.util.List; -import java.util.Map; - -/** - * To add default interface tags. - */ -public interface InterfaceWithJavadoc -{ - /** default comment */ - Map MY_MAP_CONSTANT = Collections.singletonMap( "key", "value" ); - - /** - * To add default method tags. - */ - public void withGenericParameters( List aList, Map>, List> aMap ); - - // ---------------------------------------------------------------------- - // New methods to be found by Clirr. - // ---------------------------------------------------------------------- - - /** - * New interface method to be found by Clirr. - */ - public Map newInterfaceMethod( List aList, Map>, List> aMap ); -} diff --git a/src/test/resources/unit/fix-jdk5-test/src/main/java/fix/test/InterfaceWithNoJavadoc.java b/src/test/resources/unit/fix-jdk5-test/src/main/java/fix/test/InterfaceWithNoJavadoc.java deleted file mode 100644 index 377714fd..00000000 --- a/src/test/resources/unit/fix-jdk5-test/src/main/java/fix/test/InterfaceWithNoJavadoc.java +++ /dev/null @@ -1,39 +0,0 @@ -package fix.test; - -/* - * 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. - */ - -import java.util.Collections; -import java.util.List; -import java.util.Map; - -public interface InterfaceWithNoJavadoc -{ - List MY_LIST_CONSTANT = Collections.singletonList( "value" ); - - Map MY_MAP_CONSTANT = Collections.singletonMap( "key", "value" ); - - public void withGenericParameters( List aList, Map>, List> aMap ); - - // ---------------------------------------------------------------------- - // New methods to be found by Clirr. - // ---------------------------------------------------------------------- - - public Map newInterfaceMethod( List aList, Map>, List> aMap ); -} diff --git a/src/test/resources/unit/fix-jdk6-test/expected/src/main/java/fix/test/ClassWithJavadoc.java b/src/test/resources/unit/fix-jdk6-test/expected/src/main/java/fix/test/ClassWithJavadoc.java deleted file mode 100644 index 928a1de3..00000000 --- a/src/test/resources/unit/fix-jdk6-test/expected/src/main/java/fix/test/ClassWithJavadoc.java +++ /dev/null @@ -1,79 +0,0 @@ -package fix.test; - -/* - * 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. - */ - -import java.util.List; - -/** - * To add default class tags. - * - * @author vsiveton@apache.org - * @version $Id: $ - */ -public class ClassWithJavadoc - implements InterfaceWithJavadoc -{ - /** - * Constructor with generic param. - * - * @param list a {@link java.util.List} object. - */ - public ClassWithJavadoc( List list ) - { - } - - // ---------------------------------------------------------------------- - // New methods to be found by Clirr. - // ---------------------------------------------------------------------- - - /** - * New class method to be found by Clirr. - * - * @param aString a {@link java.lang.String} object. - * @return a {@link java.lang.String} object. - * @since 1.1 - */ - public String newClassMethod( String aString ) - { - return null; - } - - // ---------------------------------------------------------------------- - // Inheritance - // ---------------------------------------------------------------------- - - /** {@inheritDoc} */ - @Override - public void withGenericParameters( List aList ) - { - } - - /** {@inheritDoc} */ - public void withGenericParameters2( List aList ) - { - } - - /** {@inheritDoc} */ - @Override - public String newInterfaceMethod( String aString ) - { - return null; - } -} diff --git a/src/test/resources/unit/fix-jdk6-test/expected/src/main/java/fix/test/InterfaceWithJavadoc.java b/src/test/resources/unit/fix-jdk6-test/expected/src/main/java/fix/test/InterfaceWithJavadoc.java deleted file mode 100644 index 6e6f8091..00000000 --- a/src/test/resources/unit/fix-jdk6-test/expected/src/main/java/fix/test/InterfaceWithJavadoc.java +++ /dev/null @@ -1,58 +0,0 @@ -package fix.test; - -/* - * 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. - */ - -import java.util.List; - -/** - * To add default interface tags. - * - * @author vsiveton@apache.org - * @version $Id: $ - */ -public interface InterfaceWithJavadoc -{ - /** - * To add default method tags. - * - * @param aList a {@link java.util.List} object. - */ - public void withGenericParameters( List aList ); - - /** - * To take care of identifier. - * - * @param aList a {@link java.util.List} object. - */ - void withGenericParameters2( List aList ); - - // ---------------------------------------------------------------------- - // New methods to be found by Clirr. - // ---------------------------------------------------------------------- - - /** - * New interface method to be found by Clirr. - * - * @param aString a {@link java.lang.String} object. - * @return a {@link java.lang.String} object. - * @since 1.1 - */ - public String newInterfaceMethod( String aString ); -} diff --git a/src/test/resources/unit/fix-jdk6-test/pom.xml b/src/test/resources/unit/fix-jdk6-test/pom.xml deleted file mode 100644 index fdaa1986..00000000 --- a/src/test/resources/unit/fix-jdk6-test/pom.xml +++ /dev/null @@ -1,63 +0,0 @@ - - - - 4.0.0 - - org.apache.maven.plugins.maven-javadoc-plugin.unit - fix-jdk6-test - 1.1-SNAPSHOT - Javadoc Test Project - jar - - - - - org.apache.maven.plugins - maven-compiler-plugin - 2.0.2 - - 1.6 - 1.6 - - - - org.apache.maven.plugins - maven-javadoc-plugin - - - ${localRepository} - ${basedir}/target/test/unit/fix-jdk6-test/target/generated - 1.1-SNAPSHOT - UTF-8 - all - true - true - true - true - false - 1.0 - **/*.java - protected - vsiveton@apache.org]]> - - - - - diff --git a/src/test/resources/unit/fix-jdk6-test/repo/org/apache/maven/plugins/maven-javadoc-plugin/unit/fix-jdk6-test/1.0/fix-jdk6-test-1.0.jar b/src/test/resources/unit/fix-jdk6-test/repo/org/apache/maven/plugins/maven-javadoc-plugin/unit/fix-jdk6-test/1.0/fix-jdk6-test-1.0.jar deleted file mode 100644 index 875e8861..00000000 Binary files a/src/test/resources/unit/fix-jdk6-test/repo/org/apache/maven/plugins/maven-javadoc-plugin/unit/fix-jdk6-test/1.0/fix-jdk6-test-1.0.jar and /dev/null differ diff --git a/src/test/resources/unit/fix-jdk6-test/repo/org/apache/maven/plugins/maven-javadoc-plugin/unit/fix-jdk6-test/1.0/fix-jdk6-test-1.0.pom b/src/test/resources/unit/fix-jdk6-test/repo/org/apache/maven/plugins/maven-javadoc-plugin/unit/fix-jdk6-test/1.0/fix-jdk6-test-1.0.pom deleted file mode 100644 index 40d268f1..00000000 --- a/src/test/resources/unit/fix-jdk6-test/repo/org/apache/maven/plugins/maven-javadoc-plugin/unit/fix-jdk6-test/1.0/fix-jdk6-test-1.0.pom +++ /dev/null @@ -1,61 +0,0 @@ - - - - 4.0.0 - - org.apache.maven.plugins.maven-javadoc-plugin.unit - fix-jdk6-test - 1.0 - Javadoc Test Project - jar - - - - - org.apache.maven.plugins - maven-compiler-plugin - 2.0.2 - - 1.6 - 1.6 - - - - org.apache.maven.plugins - maven-javadoc-plugin - - - ${basedir}/target/test/unit/fix-jdk6-test/target/generated - 1.0-SNAPSHOT - UTF-8 - all - true - true - true - true - true - **/*.java - protected - vsiveton@apache.org]]> - - - - - diff --git a/src/test/resources/unit/fix-jdk6-test/repo/org/apache/maven/plugins/maven-javadoc-plugin/unit/fix-jdk6-test/maven-metadata-local.xml b/src/test/resources/unit/fix-jdk6-test/repo/org/apache/maven/plugins/maven-javadoc-plugin/unit/fix-jdk6-test/maven-metadata-local.xml deleted file mode 100644 index 4967bea3..00000000 --- a/src/test/resources/unit/fix-jdk6-test/repo/org/apache/maven/plugins/maven-javadoc-plugin/unit/fix-jdk6-test/maven-metadata-local.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - org.apache.maven.plugins.maven-javadoc-plugin.unit - fix-jdk6-test - 1.0 - - - 1.0 - - 20090723104555 - - diff --git a/src/test/resources/unit/fix-jdk6-test/src/main/java/fix/test/ClassWithJavadoc.java b/src/test/resources/unit/fix-jdk6-test/src/main/java/fix/test/ClassWithJavadoc.java deleted file mode 100644 index 1e45000b..00000000 --- a/src/test/resources/unit/fix-jdk6-test/src/main/java/fix/test/ClassWithJavadoc.java +++ /dev/null @@ -1,70 +0,0 @@ -package fix.test; - -/* - * 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. - */ - -import java.util.List; - -/** - * To add default class tags. - */ -public class ClassWithJavadoc - implements InterfaceWithJavadoc -{ - /** - * Constructor with generic param. - */ - public ClassWithJavadoc( List list ) - { - } - - // ---------------------------------------------------------------------- - // New methods to be found by Clirr. - // ---------------------------------------------------------------------- - - /** - * New class method to be found by Clirr. - */ - public String newClassMethod( String aString ) - { - return null; - } - - // ---------------------------------------------------------------------- - // Inheritance - // ---------------------------------------------------------------------- - - @Override - public void withGenericParameters( List aList ) - { - } - - /** - * {@inheritDoc} - */ - public void withGenericParameters2( List aList ) - { - } - - @Override - public String newInterfaceMethod( String aString ) - { - return null; - } -} diff --git a/src/test/resources/unit/fix-test/pom.xml b/src/test/resources/unit/fix-test/pom.xml index 060f218f..e7bba6c5 100644 --- a/src/test/resources/unit/fix-test/pom.xml +++ b/src/test/resources/unit/fix-test/pom.xml @@ -36,7 +36,7 @@ org.apache.maven.plugins maven-compiler-plugin - 2.0.2 + 3.7.0 org.apache.maven.plugins diff --git a/src/test/resources/unit/tagletArtifacts-test/tagletArtifacts-test-plugin-config.xml b/src/test/resources/unit/tagletArtifacts-test/tagletArtifacts-test-plugin-config.xml index 14fcb342..0656dc06 100644 --- a/src/test/resources/unit/tagletArtifacts-test/tagletArtifacts-test-plugin-config.xml +++ b/src/test/resources/unit/tagletArtifacts-test/tagletArtifacts-test-plugin-config.xml @@ -68,7 +68,7 @@ under the License. org.apache.maven.plugin-tools maven-plugin-tools-javadoc - 2.4.2 + 3.5 org.codehaus.plexus