I am finding that the sourcepath for javadoc:jar (when run as part of the
release profile) is different from the sourcepath for javadoc:javadoc in my
project that involves (protoc-) generated sources.

(The net effect is that at release time, everything works fine up until
release:perform, which fails (!) during the attach-javadocs execution I've
configured following the documentation (

I have a <pluginManagement> stanza centralizing my maven-javadoc-plugin
configuration that does not mention sourcepath in any way.

mvn help:effective-pom -Prelease shows exactly what I would expect, and no
additional maven-javadoc-plugin configuration.

Somehow, the sourcepath for javadoc:javadoc has the generated-sources
directory in it; the sourcepath for javadoc:jar does not.

Here is the pluginManagement section (it's quite ordinary):


When I run mvn -X javadoc:javadoc and inspect the options file, I see this:


When I run mvn -X javadoc:jar and inspect the options file, I see only this:


The javadoc:jar goal outputs a bunch of warnings.  When I run it locally
(mvn javadoc:jar), they show up as warnings.  When it is run as part of the
maven-release-plugin's perform goal, it fails the build.

I'm at a loss as to how to go about fixing this.  Is it, perhaps, the job
of the plugin in charge of generating the sources to do something here?


Reply via email to