[
http://jira.codehaus.org/browse/MJAVADOC-279?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=217243#action_217243
]
Leonardo Uribe commented on MJAVADOC-279:
-----------------------------------------
I have a similar problem in myfaces core project. I'm using maven 2.0.10 but
this one can also be reproduced with maven 2.2.1:
http://svn.apache.org/repos/asf/myfaces/core/trunk/
we have two modules: api and impl. With maven site plugin 2.0-beta-6 everything
works fine, but when I try to change it to 2.0-beta-7 (on trunk/pom.xml) or
upper, the javadoc plugin report on impl cannot find myfaces api on the
classpath. I tried every maven javadoc plugin version from 2.3 without success.
It only can be reproduced when site is deployed. The command there is:
mvn clean install site -Pgenerate-site -Pgenerate-tlddoc
I think the reason behind that behavior is the classpath for maven javadoc
report plugin is not correctly set. Note when site goal runs, in theory the
classloader should not contains all compile or provided dependencies of the
module pom, but on 2.0-beta-6 this is not true. I think that all versions of
maven javadoc plugin assume the oposite, and that's the reason why it works
well on 2.0-beta-6 and not later.
One solution for use an upper site plugin version is do not generate the
javadoc as a report and do it directly. The javadoc report will not appear on
the project reports page but it is best than nothing.
> Javadoc plugin doesn't set dependencies correctly when pom uses classifiers
> ---------------------------------------------------------------------------
>
> Key: MJAVADOC-279
> URL: http://jira.codehaus.org/browse/MJAVADOC-279
> Project: Maven 2.x Javadoc Plugin
> Issue Type: Bug
> Affects Versions: 2.6.1
> Environment: Maven 2.2.1, Windows XP
> Reporter: James Nichols
>
> Create a project which has dependencies like:
> <dependencies>
> <dependency>
> <groupId>com.xxx</groupId>
> <artifactId>mydep</artifactId>
> <version>1.3.1</version>
> <classifier>core</classifier>
> </dependency>
> <dependency>
> <groupId>com.xxx</groupId>
> <artifactId>mydep</artifactId>
> <version>1.3.1</version>
> <classifier>util</classifier>
> </dependency>
> </dependencies>
> This will add dependencies to the javadoc options file something like this:
> classpath
> 'C:/dev/target/classes;c:/repository/com/xxx/mydep/1.3.1/mydep-1.3.1-core.jar;c:/repository/com/xxx/mydep/1.3.1/mydep-1.3.1-core.jar'
> where it should yield:
> classpath
> 'C:/dev/target/classes;c:/repository/com/xxx/mydep/1.3.1/mydep-1.3.1-core.jar;c:/repository/com/xxx/mydep/1.3.1/mydep-1.3.1-util.jar'
> i.e. the classifier for the artifacts is being ignored. This causes various
> dependencies to be missing from the javadoc task which will eventually fail
> with:
> java.lang.NullPointerException
> at com.sun.tools.javadoc.TypeMaker.getType(TypeMaker.java:67)
> at com.sun.tools.javadoc.TypeMaker.getType(TypeMaker.java:29)
> at
> com.sun.tools.javadoc.ClassDocImpl.superclassType(ClassDocImpl.java:441)
> at
> com.sun.tools.doclets.internal.toolkit.util.Util.getAllInterfaces(Util.java:386)
> at
> com.sun.tools.doclets.internal.toolkit.util.Util.getAllInterfaces(Util.java:424)
> at
> com.sun.tools.doclets.internal.toolkit.util.ClassTree.processType(ClassTree.java:162)
> at
> com.sun.tools.doclets.internal.toolkit.util.ClassTree.buildTree(ClassTree.java:114)
> at
> com.sun.tools.doclets.internal.toolkit.util.ClassTree.<init>(ClassTree.java:73)
> at
> com.sun.tools.doclets.internal.toolkit.AbstractDoclet.startGeneration(AbstractDoclet.java:104)
> 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(NativeMethodAccessorImpl.java:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at com.sun.tools.javadoc.DocletInvoker.invoke(DocletInvoker.java:215)
> at com.sun.tools.javadoc.DocletInvoker.start(DocletInvoker.java:91)
> 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)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira