maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Laird Nelson <ljnel...@gmail.com>
Subject javadoc:jar and generated sources
Date Tue, 13 Mar 2018 17:56:45 GMT
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 (
https://maven.apache.org/plugin-developers/cookbook/attach-source-javadoc-artifacts.html#Configuring_Maven_Javadoc_Plugin)
).

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):

<plugin>
  <artifactId>maven-javadoc-plugin</artifactId>
  <version>3.0.0-M1</version>
  <configuration>
    <doclint>-missing</doclint>
  </configuration>
</plugin>

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

-sourcepath
'/Users/ljnelson/Projects/frob/src/main/java:
*/Users/ljnelson/Projects/frob/target/generated-sources/protobuf/java:/Users/ljnelson/Projects/frob/target/generated-sources/protobuf/grpc-java*
:/Users/ljnelson/Projects/frob/src/main/javadoc'

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

-sourcepath
'/Users/ljnelson/Projects/frob/src/main/java:/Users/ljnelson/Projects/frob/src/main/javadoc'

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?

Best,
Laird

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message