Issue Details (XML | Word | Printable)

Key: MJAVADOC-72
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Vincent Siveton
Reporter: Bugittaa Pahasti
Votes: 7
Watchers: 7
Operations

If you were logged in you would be able to see more operations.
Maven 2.x Javadoc Plugin

Aggregating javadocs doesn't work

Created: 18/May/06 04:56 AM   Updated: 24/Aug/06 06:32 PM
Component/s: None
Affects Version/s: 2.0
Fix Version/s: 2.1

Time Tracking:
Not Specified

File Attachments: 1. Text File MJAVADOC-72.patch (5 kB)

Environment: WinXP SP2
cygwin 1.5.19
maven 2.0.4
jdk 1.5.0_06
javadoc-plugin 2.0 final
latest released plugins


 Description  « Hide
When I define <aggregate>true</aggregate> to javadoc plugin configuration in parent pom, javadoc generation doesn't work from the parent (all other configuration options are default). If run under individual components, javadoc is generated without problems. It seems that the child dependencies aren't resolved:

Embedded error: Exit code: 1 - c:/code/apps/project/common/src/main/java/com/company/AbstractLogEnabled.java:3: package org.apache.log4j does not exist
import org.apache.log4j.Logger;

c:/code/apps/component/common-test/src/main/java/com/company/unittest/AbstractDatasourceEnabledTestCase.java:11: package org.apache.commons.dbcp does not exist
import org.apache.commons.dbcp.BasicDataSource;

And lot more similar errors.

Additionally, there are a huge number of ClassCastExceptions from javadoc.

java.lang.ClassCastException: com.sun.tools.javadoc.ClassDocImpl
at com.sun.tools.javadoc.AnnotationDescImpl.annotationType(AnnotationDescImpl.java:46)
at com.sun.tools.doclets.internal.toolkit.util.Util.isDeprecated(Util.java:804)
at com.sun.tools.doclets.formats.html.TagletWriterImpl.deprecatedTagOutput(TagletWriterImpl.java:85)
at com.sun.tools.doclets.internal.toolkit.taglets.DeprecatedTaglet.getTagletOutput(DeprecatedTaglet.java:40)
at com.sun.tools.doclets.formats.html.MethodWriterImpl.writeDeprecated(MethodWriterImpl.java:166)
at com.sun.tools.doclets.internal.toolkit.builders.MethodBuilder.buildDeprecationInfo(MethodBuilder.java:183)
at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.sun.tools.doclets.internal.toolkit.builders.MethodBuilder.invokeMethod(MethodBuilder.java:109)
at com.sun.tools.doclets.internal.toolkit.builders.AbstractBuilder.build(AbstractBuilder.java:90)
at com.sun.tools.doclets.internal.toolkit.builders.AbstractMemberBuilder.build(AbstractMemberBuilder.java:56)
at com.sun.tools.doclets.internal.toolkit.builders.MethodBuilder.buildMethodDoc(MethodBuilder.java:150)
at sun.reflect.GeneratedMethodAccessor36.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.sun.tools.doclets.internal.toolkit.builders.MethodBuilder.invokeMethod(MethodBuilder.java:109)
at com.sun.tools.doclets.internal.toolkit.builders.AbstractBuilder.build(AbstractBuilder.java:90)
at com.sun.tools.doclets.internal.toolkit.builders.AbstractMemberBuilder.build(AbstractMemberBuilder.java:56)
at com.sun.tools.doclets.internal.toolkit.builders.ClassBuilder.buildMethodDetails(ClassBuilder.java:322)
at sun.reflect.GeneratedMethodAccessor33.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.sun.tools.doclets.internal.toolkit.builders.ClassBuilder.invokeMethod(ClassBuilder.java:101)
at com.sun.tools.doclets.internal.toolkit.builders.AbstractBuilder.build(AbstractBuilder.java:90)
at com.sun.tools.doclets.internal.toolkit.builders.ClassBuilder.buildClassDoc(ClassBuilder.java:124)
at sun.reflect.GeneratedMethodAccessor7.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.sun.tools.doclets.internal.toolkit.builders.ClassBuilder.invokeMethod(ClassBuilder.java:101)
at com.sun.tools.doclets.internal.toolkit.builders.AbstractBuilder.build(AbstractBuilder.java:90)
at com.sun.tools.doclets.internal.toolkit.builders.ClassBuilder.build(ClassBuilder.java:108)
at com.sun.tools.doclets.formats.html.HtmlDoclet.generateClassFiles(HtmlDoclet.java:155)
at com.sun.tools.doclets.internal.toolkit.AbstractDoclet.generateClassFiles(AbstractDoclet.java:177)
at com.sun.tools.doclets.internal.toolkit.AbstractDoclet.generateClassFiles(AbstractDoclet.java:161)
at com.sun.tools.doclets.internal.toolkit.AbstractDoclet.startGeneration(AbstractDoclet.java:106)
at com.sun.tools.doclets.internal.toolkit.AbstractDoclet.start(AbstractDoclet.java:64)
at com.sun.tools.doclets.formats.html.HtmlDoclet.start(HtmlDoclet.java:42)
at com.sun.tools.doclets.standard.Standard.start(Standard.java:23)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.sun.tools.javadoc.DocletInvoker.invoke(DocletInvoker.java:269)
at com.sun.tools.javadoc.DocletInvoker.start(DocletInvoker.java:143)
at com.sun.tools.javadoc.Start.parseAndExecute(Start.java:340)
at com.sun.tools.javadoc.Start.begin(Start.java:128)
at com.sun.tools.javadoc.Main.execute(Main.java:41)
at com.sun.tools.javadoc.Main.main(Main.java:31)



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Olivier Lamy added a comment - 18/May/06 07:10 AM
Hi,
I have the same trouble.
Does it works with add dependencies in the top pom ?
Just to test.
  • Olivier

Andrea Aime added a comment - 15/Jun/06 05:23 AM
I do have the same problem, me too.
A quick search on the net releaved that we're not the only ones seeing this: http://jira.codehaus.org/browse/ANNOGEN-14

Jochen Wiedmann added a comment - 15/Jun/06 07:42 AM
This did not work for me too, initially. However, after I forced an upgrade to the 2.0-final version of the javadoc plugin (by specifiying a version in the reports section for this plugin) everything works fine. See the SVN version of the Apache XML-RPC package.

Andrea Aime added a comment - 21/Jun/06 03:44 AM
I already updated to 2.0 final, yet the problem is still there...

Eric Brown added a comment - 05/Jul/06 02:58 AM
I'm experiencing this issue as well. I'm not sure how to upgrade to 2.0-final. I tried adding <version>2.0-final</version> inside <plugin></plugin>, but it still fails. I get:
GroupId: org.apache.maven.plugins
ArtifactId: maven-javadoc-pluginVersion: 2.0-final
Reason: Unable to download the artifact from any repository
org.apache.maven.plugins:maven-javadoc-plugin:pom:2.0-final

Doesn't sound like the solution anyway.


Mathias Brökelmann added a comment - 20/Aug/06 03:41 AM
This patch should fix the problem.

The problem was that the compile artifacts of the modules in the reactor where not initialized.

The solution in this patch is now to resolve the artifacts of each reactor project and add the compile artifacts to the classpath for javadoc generation. I've tested it with a large project structure (spring-rich) with multiple nested projects and it was working perfectly.


Rohnny Moland (JIRA) added a comment - 24/Aug/06 04:31 AM
I tried the patch from 20 august, and that seems to fix the problem. So I think this bug could be closed now.

Vincent Siveton added a comment - 24/Aug/06 06:32 PM
Applied with small changes (codestyle)
Bump to 1.0-beta-2-SNAPSHOT for maven-plugin-testing-harness to prevent test failures.

Thanks Mathias!