Using Doclava with Ant and Android

I am trying to use Doclava with ant for an Android project, but I cannot find any good instructions on the Internet.

I have the following code:

<javadoc destdir="${local.svn.dir}/@{projectname}/${doc.dir}/" 
      sourcepath="${local.svn.dir}/@{projectname}"
      docletpath="/home/martyn/build/jars/doclava-1.0.2.jar"
      bootclasspath="${java.home}/lib/rt.jar">
   <doclet name="com.google.doclava.Doclava">
      <param name="-hdf"/> <param name="project.name"/> <param name="Doclava"/>
   </doclet>                           
</javadoc>

but this gives me an error:

[javadoc] javadoc: error - In doclet
class com.google.doclava.Doclava, 
method start has thrown an exception
java.lang.reflect.InvocationTargetException
[javadoc]
java.lang.NullPointerException  
[javadoc]   at com.google.doclava.Hierarchy.recurse(Hierarchy.java:102)
[javadoc]   at com.google.doclava.Hierarchy.makeHierarchy(Hierarchy.java:61)
[javadoc]   at com.google.doclava.Doclava.writeHierarchy(Doclava.java:1000)
[javadoc]   at com.google.doclava.Doclava.start(Doclava.java:346)
[javadoc]   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[javadoc]   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[javadoc]   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[javadoc]   at java.lang.reflect.Method.invoke(Method.java:597)
[javadoc]   at com.sun.tools.javadoc.DocletInvoker.invoke(DocletInvoker.java:269)
[javadoc]   at com.sun.tools.javadoc.DocletInvoker.start(DocletInvoker.java:143)
[javadoc]   at com.sun.tools.javadoc.Start.parseAndExecute(Start.java:340)
[javadoc]   at com.sun.tools.javadoc.Start.begin(Start.java:128)
[javadoc]   at com.sun.tools.javadoc.Main.execute(Main.java:41)
[javadoc]   at com.sun.tools.javadoc.Main.main(Main.java:31)

Does anyone know how I can fix this?

EDIT:
I get this problem with doclava 1.0.2 and 1.0.3

java.home = / USR / Library / JVM / Java-6-BC-1.6.0.24 / JRE

+3
source share
1 answer

I had a similar problem. While the doclava wiki emphasizes whether the JAVA_HOME environment variable is set correctly, I added the path to the bootclasspath without the environment variable, for example:

= boot path to classes "/USR/Library/JVM/Java-6--1.6.0.24/JRE/Library/rt.jar"

( , , ). , , build.xml?

0

All Articles