Cleanup mvn site javadoc warnings

Description

"mvn site" generates lots of warnings for incorrect javadoc.

It would be good to clean these up across the code-base so it's easier to see when there are actual issues (plus it will make the javadoc more sensible).

Activity

Show:
Stephen Marquard
April 19, 2017, 12:02 PM

I think you have to run a full build before you run javadocs:fix - other than that, I didn't do anything special to get this to work.

Greg Logan
April 18, 2017, 9:31 PM

I get the following stack trace when I try to run javadocs:fix. I can't figure out what the issue is, any advice?

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:52 min
[INFO] Finished at: 2017-04-18T15:32:09-06:00
[INFO] Final Memory: 134M/1207M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:2.10.4:fix (default-cli) on project matterhorn-inspection-workflowoperation: Execution default-cli of goal org.apache.maven.plugins:maven-javadoc-plugin:2.10.4:fix failed: A required class was missing while executing org.apache.maven.plugins:maven-javadoc-plugin:2.10.4:fix: org/osgi/service/component/ComponentContext
[ERROR] -----------------------------------------------------
[ERROR] realm = plugin>org.apache.maven.plugins:maven-javadoc-plugin:2.10.4--667308429
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/home/greg/.m2/repository/org/apache/maven/plugins/maven-javadoc-plugin/2.10.4/maven-javadoc-plugin-2.10.4.jar
[ERROR] urls[1] = file:/home/greg/.m2/repository/org/slf4j/slf4j-jdk14/1.5.6/slf4j-jdk14-1.5.6.jar
[ERROR] urls[2] = file:/home/greg/.m2/repository/org/slf4j/jcl-over-slf4j/1.5.6/jcl-over-slf4j-1.5.6.jar
[ERROR] urls[3] = file:/home/greg/.m2/repository/commons-cli/commons-cli/1.2/commons-cli-1.2.jar
[ERROR] urls[4] = file:/home/greg/.m2/repository/org/codehaus/plexus/plexus-interactivity-api/1.0-alpha-4/plexus-interactivity-api-1.0-alpha-4.jar
[ERROR] urls[5] = file:/home/greg/.m2/repository/org/sonatype/plexus/plexus-sec-dispatcher/1.3/plexus-sec-dispatcher-1.3.jar
[ERROR] urls[6] = file:/home/greg/.m2/repository/org/sonatype/plexus/plexus-cipher/1.4/plexus-cipher-1.4.jar
[ERROR] urls[7] = file:/home/greg/.m2/repository/org/codehaus/plexus/plexus-interpolation/1.11/plexus-interpolation-1.11.jar
[ERROR] urls[8] = file:/home/greg/.m2/repository/backport-util-concurrent/backport-util-concurrent/3.1/backport-util-concurrent-3.1.jar
[ERROR] urls[9] = file:/home/greg/.m2/repository/org/apache/maven/reporting/maven-reporting-api/3.0/maven-reporting-api-3.0.jar
[ERROR] urls[10] = file:/home/greg/.m2/repository/org/apache/maven/maven-archiver/2.5/maven-archiver-2.5.jar
[ERROR] urls[11] = file:/home/greg/.m2/repository/org/apache/maven/shared/maven-invoker/2.2/maven-invoker-2.2.jar
[ERROR] urls[12] = file:/home/greg/.m2/repository/org/codehaus/plexus/plexus-component-annotations/1.5.5/plexus-component-annotations-1.5.5.jar
[ERROR] urls[13] = file:/home/greg/.m2/repository/org/apache/maven/shared/maven-common-artifact-filters/1.3/maven-common-artifact-filters-1.3.jar
[ERROR] urls[14] = file:/home/greg/.m2/repository/org/apache/maven/doxia/doxia-sink-api/1.4/doxia-sink-api-1.4.jar
[ERROR] urls[15] = file:/home/greg/.m2/repository/org/apache/maven/doxia/doxia-logging-api/1.4/doxia-logging-api-1.4.jar
[ERROR] urls[16] = file:/home/greg/.m2/repository/org/apache/maven/doxia/doxia-site-renderer/1.4/doxia-site-renderer-1.4.jar
[ERROR] urls[17] = file:/home/greg/.m2/repository/org/apache/maven/doxia/doxia-core/1.4/doxia-core-1.4.jar
[ERROR] urls[18] = file:/home/greg/.m2/repository/xerces/xercesImpl/2.9.1/xercesImpl-2.9.1.jar
[ERROR] urls[19] = file:/home/greg/.m2/repository/xml-apis/xml-apis/1.3.04/xml-apis-1.3.04.jar
[ERROR] urls[20] = file:/home/greg/.m2/repository/org/apache/maven/doxia/doxia-decoration-model/1.4/doxia-decoration-model-1.4.jar
[ERROR] urls[21] = file:/home/greg/.m2/repository/org/apache/maven/doxia/doxia-module-xhtml/1.4/doxia-module-xhtml-1.4.jar
[ERROR] urls[22] = file:/home/greg/.m2/repository/org/apache/maven/doxia/doxia-module-fml/1.4/doxia-module-fml-1.4.jar
[ERROR] urls[23] = file:/home/greg/.m2/repository/org/codehaus/plexus/plexus-i18n/1.0-beta-7/plexus-i18n-1.0-beta-7.jar
[ERROR] urls[24] = file:/home/greg/.m2/repository/org/codehaus/plexus/plexus-velocity/1.1.7/plexus-velocity-1.1.7.jar
[ERROR] urls[25] = file:/home/greg/.m2/repository/org/apache/velocity/velocity/1.5/velocity-1.5.jar
[ERROR] urls[26] = file:/home/greg/.m2/repository/oro/oro/2.0.8/oro-2.0.8.jar
[ERROR] urls[27] = file:/home/greg/.m2/repository/org/apache/velocity/velocity-tools/2.0/velocity-tools-2.0.jar
[ERROR] urls[28] = file:/home/greg/.m2/repository/commons-beanutils/commons-beanutils/1.7.0/commons-beanutils-1.7.0.jar
[ERROR] urls[29] = file:/home/greg/.m2/repository/commons-digester/commons-digester/1.8/commons-digester-1.8.jar
[ERROR] urls[30] = file:/home/greg/.m2/repository/commons-chain/commons-chain/1.1/commons-chain-1.1.jar
[ERROR] urls[31] = file:/home/greg/.m2/repository/commons-validator/commons-validator/1.3.1/commons-validator-1.3.1.jar
[ERROR] urls[32] = file:/home/greg/.m2/repository/dom4j/dom4j/1.1/dom4j-1.1.jar
[ERROR] urls[33] = file:/home/greg/.m2/repository/sslext/sslext/1.2-0/sslext-1.2-0.jar
[ERROR] urls[34] = file:/home/greg/.m2/repository/org/apache/struts/struts-core/1.3.8/struts-core-1.3.8.jar
[ERROR] urls[35] = file:/home/greg/.m2/repository/antlr/antlr/2.7.2/antlr-2.7.2.jar
[ERROR] urls[36] = file:/home/greg/.m2/repository/org/apache/struts/struts-taglib/1.3.8/struts-taglib-1.3.8.jar
[ERROR] urls[37] = file:/home/greg/.m2/repository/org/apache/struts/struts-tiles/1.3.8/struts-tiles-1.3.8.jar
[ERROR] urls[38] = file:/home/greg/.m2/repository/commons-collections/commons-collections/3.2.1/commons-collections-3.2.1.jar
[ERROR] urls[39] = file:/home/greg/.m2/repository/commons-lang/commons-lang/2.4/commons-lang-2.4.jar
[ERROR] urls[40] = file:/home/greg/.m2/repository/commons-io/commons-io/2.5/commons-io-2.5.jar
[ERROR] urls[41] = file:/home/greg/.m2/repository/org/apache/httpcomponents/httpclient/4.2.3/httpclient-4.2.3.jar
[ERROR] urls[42] = file:/home/greg/.m2/repository/org/apache/httpcomponents/httpcore/4.2.2/httpcore-4.2.2.jar
[ERROR] urls[43] = file:/home/greg/.m2/repository/commons-codec/commons-codec/1.6/commons-codec-1.6.jar
[ERROR] urls[44] = file:/home/greg/.m2/repository/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar
[ERROR] urls[45] = file:/home/greg/.m2/repository/log4j/log4j/1.2.14/log4j-1.2.14.jar
[ERROR] urls[46] = file:/home/greg/.m2/repository/com/thoughtworks/qdox/qdox/1.12.1/qdox-1.12.1.jar
[ERROR] urls[47] = file:/home/greg/.m2/repository/junit/junit/3.8.1/junit-3.8.1.jar
[ERROR] urls[48] = file:/home/greg/.m2/repository/org/codehaus/plexus/plexus-archiver/3.3/plexus-archiver-3.3.jar
[ERROR] urls[49] = file:/home/greg/.m2/repository/org/codehaus/plexus/plexus-io/2.7.1/plexus-io-2.7.1.jar
[ERROR] urls[50] = file:/home/greg/.m2/repository/org/apache/commons/commons-compress/1.11/commons-compress-1.11.jar
[ERROR] urls[51] = file:/home/greg/.m2/repository/org/iq80/snappy/snappy/0.4/snappy-0.4.jar
[ERROR] urls[52] = file:/home/greg/.m2/repository/org/tukaani/xz/1.5/xz-1.5.jar
[ERROR] urls[53] = file:/home/greg/.m2/repository/org/codehaus/plexus/plexus-utils/3.0.24/plexus-utils-3.0.24.jar
[ERROR] Number of foreign imports: 1
[ERROR] import: Entry[import from realm ClassRealm[project>org.opencastproject:matterhorn-admin-ui-ng:4.0-SNAPSHOT, parent: ClassRealm[maven.api, parent: null]]]
[ERROR]
[ERROR] -----------------------------------------------------: org.osgi.service.component.ComponentContext
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginContainerException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :matterhorn-inspection-workflowoperation

Stephen Marquard
April 17, 2017, 2:18 PM

One way forward here would be to run mvn javadoc:fix against the whole code base:

https://maven.apache.org/plugins/maven-javadoc-plugin/fix-mojo.html

and then enforce correct javadoc in the checkstyle rules:

http://checkstyle.sourceforge.net/config_javadoc.html#JavadocMethod

Assignee

Greg Logan

Reporter

Stephen Marquard