Maven - How to generate source code and Javadoc May 20, 2020 Here is how to generate java sources and javadoc, both packaged as a JAR file. mvn source:jar javadoc:jar The files will be placed under target folder.