Deploy sources and javadoc jars

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

  artifact-name-1.0.jar
  artifact-name-1.0-sources.jar
  artifact-name-1.0-javadoc.jar

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 \
                       -DrepositoryId=some.repo.id \
                       -Dfile=./path/to/artifact-name-1.0.jar \
                       -DpomFile=./path/to/pom.xml \
                       -Dsources=./path/to/artifact-name-1.0-sources.jar \
                       -Djavadoc=./path/to/artifact-name-1.0-javadoc.jar