Generates API documentation for a Maven project with the Javadoc tool of the JDK, packages it as the -javadoc.jar that Maven Central expects next to a release, and adds it to the project site as a report.
mvn javadoc:javadoc # one module, into target/reports/apidocs mvn javadoc:aggregate # all modules of a multi-module build mvn javadoc:jar # the -javadoc.jar
The plugin needs Maven 3.9.0 or later and Java 8 or later.
Build the plugin and install it into your local repository:
mvn install
The integration tests under src/it/projects run with the run-its profile. To run all of them, or one by its directory name:
mvn -Prun-its verify mvn -Prun-its verify -Dinvoker.test=MJAVADOC-137_jar
Before you push, check formatting and license headers:
mvn spotless:check apache-rat:check
mvn spotless:apply fixes the formatting. Run it with JDK 17 or 21.
Open a pull request against master on GitHub. Discuss larger changes on the developer mailing list or in an issue first. Add a unit test or an integration test for each fix, keep formatting changes out of functional pull requests, and see the guide to helping with Maven for more. Contributors who send more than the occasional patch are asked to file an Apache Individual Contributor License Agreement.