[maven-javadoc-plugin] Aggregating Javadocs from Dependency Sources
Hello, I followed the guide https://maven.apache.org/plugins/maven-javadoc-plugin/examples/aggregate-dependency-sources.html to generate an aggregated javadoc for a multi-module project. I think, it should be mentioned in this guide that the distribution project (Named 'project-distro' in the example) generating the aggregated javadoc should be of packaging type 'jar' and not 'pom'. Even though the latter is the usual packaging type for this kind of project (in my experience), since there are no sources to compile. As a feature request I would like this example to also work on a distribution project with packaging type 'pom'. Currently nothing is being generated, because the project is not a 'Java classpath-capable package'. [INFO] --- maven-javadoc-plugin:2.10.4:jar (module-javadoc-jar) @ distribution --- [INFO] Not executing Javadoc as the project is not a Java classpath-capable package Is this the right mail list or should I post this in the 'Maven Issues List'?
Re: Aggregating Javadocs from Dependency Sources
Is this best practice of avoiding the javadoc:aggregate target still the case? I find it a bit surprising as I've been combing the web for solutions to javadoc aggregation problems and this is the first I've heard of such a convention. There is also no mention of this in the maven docs. In any case, I concur with the OP that the includeDependencySources/excludeDependencySources is truly broken. -- View this message in context: http://maven.40175.n5.nabble.com/Aggregating-Javadocs-from-Dependency-Sources-tp126034p5522496.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Aggregating Javadocs from Dependency Sources
I am trying to generate Javadocs for a project that is conceptually an aggregate of several other projects. I am using the information from this page as a guide: http://maven.apache.org/plugins/maven-javadoc-plugin/examples/aggregate-dependency-sources.html That page indicates that you can use the includeDependencySources option to have the Javadoc plugin download the source JARs for dependencies and include them in the sources against which Javadocs are generated. However, I am unable to get it to work. The Javadoc plugin does indeed recognize this option, which I can ascertain by the fact that if source JARs for any dependencies are not available it fails with an error. I have tried using both dependencySourceExcludes and dependencySourceIncludes, but no matter how I craft these options the Javadocs for dependencies are never included. When I execute mvn javadoc:jar, for example, I receive a bunch of messages on the terminal indicating that Maven is trying to download javadoc resources but source JARs for dependencies are not downloaded and the generate Javadoc does not include dependency sources. Here is how I have configured the Javadoc plugin in my POM: plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-javadoc-plugin/artifactId version2.7/version configuration includeDependencySourcestrue/includeDependencySources includeTransitiveDependencySourcesfalse/includeTransitiveDependencySources dependencySourceIncludes dependencySourceIncludeorg.terracotta.toolkit:*/dependencySourceInclude /dependencySourceIncludes /configuration /plugin I've attached the complete POM for your perusal, in case you might find that information helpful, and the output of the mvn javadoc:jar command is also available here: http://paste.ubuntu.com/432246/ Is this a bug in the Javadoc plugin, or am I somehow using it incorrectly? Thanks for any help you can provide. -- Jason Voegele No matter who you are, some scholar can show you the great idea you had was had by someone before you. pom.xml Description: XML document - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Aggregating Javadocs from Dependency Sources
There is something of a best practice of avoiding the aggregation feature of the javadoc plugin, in favor of: 1) create source artifacts for each dependency 2) use dependency plugin to unpack the source artifacts into 'one big tree' 3) run the javadoc plugin on the result tree to produce aggregate javadoc. This is used at Apache CXF, amongst other places. On Wed, May 12, 2010 at 10:03 AM, Jason Voegele ja...@jvoegele.com wrote: I am trying to generate Javadocs for a project that is conceptually an aggregate of several other projects. I am using the information from this page as a guide: http://maven.apache.org/plugins/maven-javadoc-plugin/examples/aggregate-dependency-sources.html That page indicates that you can use the includeDependencySources option to have the Javadoc plugin download the source JARs for dependencies and include them in the sources against which Javadocs are generated. However, I am unable to get it to work. The Javadoc plugin does indeed recognize this option, which I can ascertain by the fact that if source JARs for any dependencies are not available it fails with an error. I have tried using both dependencySourceExcludes and dependencySourceIncludes, but no matter how I craft these options the Javadocs for dependencies are never included. When I execute mvn javadoc:jar, for example, I receive a bunch of messages on the terminal indicating that Maven is trying to download javadoc resources but source JARs for dependencies are not downloaded and the generate Javadoc does not include dependency sources. Here is how I have configured the Javadoc plugin in my POM: plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-javadoc-plugin/artifactId version2.7/version configuration includeDependencySourcestrue/includeDependencySources includeTransitiveDependencySourcesfalse/includeTransitiveDependencySources dependencySourceIncludes dependencySourceIncludeorg.terracotta.toolkit:*/dependencySourceInclude /dependencySourceIncludes /configuration /plugin I've attached the complete POM for your perusal, in case you might find that information helpful, and the output of the mvn javadoc:jar command is also available here: http://paste.ubuntu.com/432246/ Is this a bug in the Javadoc plugin, or am I somehow using it incorrectly? Thanks for any help you can provide. -- Jason Voegele No matter who you are, some scholar can show you the great idea you had was had by someone before you. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Aggregating Javadocs from Dependency Sources
On Wed, 2010-05-12 at 10:07 -0400, Benson Margulies wrote: There is something of a best practice of avoiding the aggregation feature of the javadoc plugin, in favor of: 1) create source artifacts for each dependency 2) use dependency plugin to unpack the source artifacts into 'one big tree' 3) run the javadoc plugin on the result tree to produce aggregate javadoc. This is used at Apache CXF, amongst other places. Thank you, Benson. This approach seems to work just fine. -- Jason Voegele If you want to get rich from writing, write the sort of thing that's read by persons who move their lips when the're reading to themselves. -- Don Marquis - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org