I use maven release plugin for generating release of my project. I do not want to generate Javadoc all time I build. On the other hand when I call release:perform I would like if maven would generate sources.jar and javadoc.jar and would deploy it to maven release repository. Just because I am curious how deploying source.jar can be disabled, since It looks like it is deployed by default.
Maven Release Plugin deployment of sources.jar and javadoc.jar
7.7k Views Asked by Gábor Lipták At
2
There are 2 best solutions below
1

From the documentation of Maven Release Plugin, there is a useReleaseProfile
parameter, which determines Whether to use the release profile that adds sources and javadocs to the released artifact, if appropriate
. This is true
by default. You can try changing this as appropriate to enable/disable source/javadocs.
Use the releaseProfiles parameter (example:
src,javadoc
) to turn on one or more profiles, and in these profiles, define the source and javadoc generation: