You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Joshua Spiewak (JIRA)" <ji...@codehaus.org> on 2010/12/13 20:18:58 UTC

[jira] Commented: (MJAVADOC-279) Javadoc plugin doesn't set dependencies correctly when pom uses classifiers

    [ http://jira.codehaus.org/browse/MJAVADOC-279?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=247473#action_247473 ] 

Joshua Spiewak commented on MJAVADOC-279:
-----------------------------------------

I was seeing the symptoms of MJAVADOC-298 (javadoc failure due to annotations not being found on the classpath), and seem to have tracked the cause of that down to this issue.

When my module's dependencies are in this order: 

{code}
        <dependency>
            <groupId>com.brightcove.bumblebee</groupId>
            <artifactId>bumblebee-domain</artifactId>
            <version>1.24-SNAPSHOT</version>
        </dependency>
        <dependency>
            <groupId>com.brightcove.bumblebee</groupId>
            <artifactId>bumblebee-domain</artifactId>
            <version>1.24-SNAPSHOT</version>
            <classifier>tests</classifier>
            <scope>test</scope>
        </dependency>
{code}

I end up with bumblebee-domain-1.24-SNAPSHOT-tests.jar in the javadoc classpath (when running site, not javadoc:javadoc), but not the regular jar (I ran the plugin with debug true to preserve the options file which is where you can see the classpath).  If I swap the order, I end up, correctly, with bumblebee-domain-1.24-SNAPSHOT.jar.

This happens for both maven-javadoc-plugin 2.6.1 and 2.7

> 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
>         Attachments: mazix-mvn-logs.zip, mazix.zip
>
>
> 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