December 21, 2014

How to Deploy Sources and Javadoc Jar

When deploying a snapshot release or if you by some other reason want to generate sources or javadoc jar, you could always configure maven-source-plugin and maven-javadoc-plugin and hook them in maven life cycle.

But that is not necessary in maven uber pom is that already defined for release. You can reuse that by adding -DperformRelease=true

mvn -DperformRelease=true [goals]

Different example of usage:

Local build with sources and javadoc jar generation

mvn -DperformRelease=true clean install

Deploy target. Use only with snapshot version. Then deploy means snapshot publishing to defined snapshot repository.

mvn -DperformRelease=true clean install deploy

No comments: