Deploy sources and javadoc jars

A project may include a main jar and associated sources and javadoc jars.


The sources jar contains the Java sources, and the javadoc jar contains the generated javadocs. To include these files in your deployment, set the sources and javadoc parameters to the paths to the sources and javadoc jar files.

mvn deploy:deploy-file -Durl=file:///home/me/m2-repo \
                       -Dfile=./path/to/artifact-name-1.0.jar \
                       -DpomFile=./path/to/pom.xml \
                       -Dsources=./path/to/artifact-name-1.0-sources.jar \