Uploaded image for project: 'Maven Javadoc Plugin'
  1. Maven Javadoc Plugin
  2. MJAVADOC-279

Javadoc plugin doesn't set dependencies correctly when pom uses classifiers

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Not A Problem
    • 2.6.1
    • None
    • None
    • None
    • Maven 2.2.1, Windows XP

    Description

      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)

      Attachments

        1. mazix.zip
          8 kB
          Benjamin Croizet
        2. mazix-mvn-logs.zip
          4 kB
          Benjamin Croizet

        Issue Links

          Activity

            People

              hboutemy Herve Boutemy
              zak_spede James Nichols
              Votes:
              2 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: