Maven 2.x Javadoc Plugin

Aggregated Javadoc does not use module-level dependencies

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 2.0
  • Fix Version/s: 2.0
  • Component/s: None
  • Labels:
    None
  • Environment:
    WinXP, Maven 2.0.4, maven-javadoc-plugin from source
  • Number of attachments :
    1

Description

The 'mvn javadoc:javadoc' command works fine with the latest plugin built from source and this in struts/action/trunk/pom.xml:

<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
</plugin>
</plugins>
</reporting>

It drops into each module and builds the javadoc there. However, if I add configuration and try to get aggregated Javadoc at the top level:

<configuration>
<aggregate>true</aggregate>
</configuration>

It seems to build the aggregated Javadoc okay, but then when starts descending into each module it fails complaining "Cannot find
symbol..." about things like commons-logging and the Servlet api. These are declared as dependencies at the module level.

Issue Links

Activity

Hide
Jesse McConnell added a comment -

issue here is that the aggregate option will force javadoc generation to only occur at the top lvl execution root of the project, and it does this by putting adding all of the source roots of the reactor projects into the list of source paths to process. However the dependencies of the subjects are not added into the mix so those symbols will indeed not be found.

one potential approach to this would be walk through the dependencies of the subprojects and add those into the classpath of the report, but that probably will break on windows since there is a max length of the commandline and this plugin builds out a plexus commandline object which would have huge potential if this were a larger project using the aggregate.

another might be to get this plugin to not be using the commandline? have to look into it I suppose

Show
Jesse McConnell added a comment - issue here is that the aggregate option will force javadoc generation to only occur at the top lvl execution root of the project, and it does this by putting adding all of the source roots of the reactor projects into the list of source paths to process. However the dependencies of the subjects are not added into the mix so those symbols will indeed not be found. one potential approach to this would be walk through the dependencies of the subprojects and add those into the classpath of the report, but that probably will break on windows since there is a max length of the commandline and this plugin builds out a plexus commandline object which would have huge potential if this were a larger project using the aggregate. another might be to get this plugin to not be using the commandline? have to look into it I suppose
Hide
Jesse McConnell added a comment -

I'll attach the patch in a moment, pending commit until svn is back up though

Show
Jesse McConnell added a comment - I'll attach the patch in a moment, pending commit until svn is back up though
Hide
Martin Desruisseaux added a comment -

Is this bug really fixed in maven-javadoc-plugin version 2.0? Aggregated javadoc still fail to find module-level dependencies when building the Geotools project for example.

Show
Martin Desruisseaux added a comment - Is this bug really fixed in maven-javadoc-plugin version 2.0? Aggregated javadoc still fail to find module-level dependencies when building the Geotools project for example.

People

Vote (1)
Watch (2)

Dates

  • Created:
    Updated:
    Resolved: