roycezhc / doclava

Automatically exported from code.google.com/p/doclava
Apache License 2.0
0 stars 0 forks source link

Problem generating Javadoc when class file is missing #49

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a Maven project using GWT 2.0.3 as a dependancy.
2. Use mvn javadoc:javadoc.
3. Javadoc fails with the following output:

[ERROR] Failed to execute goal 
org.apache.maven.plugins:maven-javadoc-plugin:2.8:aggregate (default-cli) on 
project ***: An error has occurred in JavaDocs report generation:
[ERROR] Exit code: 1 - javadoc: error - In doclet class 
com.google.doclava.Doclava,  method start has thrown an exception 
java.lang.reflect.InvocationTargetException
[ERROR] com.sun.tools.javac.code.Symbol$CompletionFailure: class file for 
com.google.gwt.core.ext.TreeLogger not found

The class file is actually missing, Eclipse does not find it. The following 
configuration gives the above output:
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>2.8</version>
                <configuration>
                    <docletArtifact>
                        <groupId>com.google.doclava</groupId>
                        <artifactId>doclava</artifactId>
                        <version>1.0.3</version>
                    </docletArtifact>
                    <doclet>com.google.doclava.Doclava</doclet>
                    <useStandardDocletOptions>false</useStandardDocletOptions>
                    <!-- | bootclasspath required by Sun's JVM -->
                    <bootclasspath>${sun.boot.class.path}</bootclasspath>
                    <additionalparam>
                        -quiet
                        -d ${project.reporting.outputDirectory}/apidocs
                        -hdf project.name "${project.name}"
                    </additionalparam>
                    <!-- | Apple's JVM sometimes requires more memory -->
                    <additionalJOption>-J-Xmx1024m</additionalJOption>
                </configuration>
            </plugin>

But switching it to the following works and generates a full Javadoc:

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>2.8</version>
                <configuration>
                    <!-- | bootclasspath required by Sun's JVM -->
                    <bootclasspath>${sun.boot.class.path}</bootclasspath>
                    <additionalparam>
                        -quiet
                        -d ${project.reporting.outputDirectory}/apidocs
                    </additionalparam>
                    <!-- | Apple's JVM sometimes requires more memory -->
                    <additionalJOption>-J-Xmx1024m</additionalJOption>
                </configuration>
            </plugin>

(running on Windows XP SP3)

Original issue reported on code.google.com by cyrille.chopelet on 23 Jan 2012 at 10:09

GoogleCodeExporter commented 9 years ago
Adding the gwt-dev dependency rules out the problem for this case, but I have 
other dependencies that raise the same problem up.

If normal Javadoc generation succeeds, I think doclava should too, shouldn't it?

Original comment by cyrille.chopelet on 23 Jan 2012 at 10:39

GoogleCodeExporter commented 9 years ago
A similar issue with JAXB generated artifacts is causing us significant grief.

Original comment by ssk...@qualys.com on 11 Sep 2012 at 3:30