Is there any way I can generate a javadoc over all sources which are in different subdirectory of a rootpath. The problem is that the name of the subdirectories are not static. only the rootpath is static. Is there any way that javadoc seeks automaticly for all sources in the subdirectories???
Peter Kristensson
Ranch Hand
Joined: Jul 02, 2001
Posts: 118
posted
0
If you're in a unix environment you can do this with a little shell-magic. something like:
Mathias Andrae
Greenhorn
Joined: Feb 04, 2002
Posts: 23
posted
0
and any idea for win nt???
John Ryan
Ranch Hand
Joined: Mar 14, 2001
Posts: 124
posted
0
If your using the Apache Ant build tool this is a predefined task and is easy to build into your build file. Even if your using another build process it would be pretty quick to write a Ant file that would generate all your Javadocs. The ant javadoc facility will generate the javadocs for all source files beneath a root directory....... John
Mathias Andrae
Greenhorn
Joined: Feb 04, 2002
Posts: 23
posted
0
Thanks for this great idea. it works... ...but in some cases I got following exception: [javadoc] Building tree for all the packages and classes... [javadoc] Building index for all the packages and classes... [javadoc] Building index for all classes... [javadoc] javadoc: In doclet class com.sun.tools.doclets.standard.Standard, method start has thrown an exception java .lang.reflect.InvocationTargetException [javadoc] java.lang.NullPointerException [javadoc] at java.util.zip.ZipFile.getInputStream(ZipFile.java:176) [javadoc] at com.sun.tools.javadoc.PackageDocImpl.documentation(PackageDocImpl.java:76) [javadoc] at com.sun.tools.javadoc.DocImpl.comment(DocImpl.java:77) [javadoc] at com.sun.tools.javadoc.DocImpl.tags(DocImpl.java:107) [javadoc] at com.sun.tools.doclets.standard.HtmlStandardWriter.serialDocInclude(HtmlStandardWriter.java:1381) [javadoc] at com.sun.tools.doclets.standard.HtmlStandardWriter.serialInclude(HtmlStandardWriter.java:1362) [javadoc] at com.sun.tools.doclets.standard.tags.SeeTaglet.toString(SeeTaglet.java:105) [javadoc] at com.sun.tools.doclets.standard.HtmlStandardWriter.generateTagInfo(HtmlStandardWriter.java:1494) [javadoc] at com.sun.tools.doclets.standard.ClassWriter.generateClassFile(ClassWriter.java:234) [javadoc] at com.sun.tools.doclets.standard.ClassWriter.generate(ClassWriter.java:95) [javadoc] at com.sun.tools.doclets.standard.Standard.generateClassCycle(Standard.java:245) [javadoc] at com.sun.tools.doclets.standard.Standard.generateClassFiles(Standard.java:195) [javadoc] at com.sun.tools.doclets.standard.Standard.startGeneration(Standard.java:166) [javadoc] at com.sun.tools.doclets.standard.Standard.start(Standard.java:44) [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:324) [javadoc] at com.sun.tools.javadoc.DocletInvoker.invoke(DocletInvoker.java:196) [javadoc] Generating C:\andrae\destdir\_0002fnve_0002ejspnve_jsp_0.html... [javadoc] 1 error [javadoc] at com.sun.tools.javadoc.DocletInvoker.start(DocletInvoker.java:95) [javadoc] at com.sun.tools.javadoc.Start.parseAndExecute(Start.java:288) [javadoc] at com.sun.tools.javadoc.Start.begin(Start.java:114) [javadoc] 100 warnings [javadoc] at com.sun.tools.javadoc.Main.execute(Main.java:44) [javadoc] at com.sun.tools.javadoc.Main.main(Main.java:34) BUILD SUCCESSFUL ................ then I got only the tree but not the javadocs of the classes.
any idea why???
John Ryan
Ranch Hand
Joined: Mar 14, 2001
Posts: 124
posted
0
Mathias, I havent seen this before so i dont know. Given that its a null pointer exception is it possible that you have not set one of the necessary attributes in the javadoc task. Have you set a value for the destination directory attribute?? John
Mathias Andrae
Greenhorn
Joined: Feb 04, 2002
Posts: 23
posted
0
I think all necessary attributes are set. It is really confusing. the call runs perfectly on most directories. but on some I get this exception. And I can't find the difference. Do you know any naturally limits of javadoc? Here is my build.xml of ant. Maybe you see a mistake. The source and destination dir are set correct in the original version. <?xml version="1.0"?> <project name="tutorial" default="build" basedir="."> <target name="build">
Well rather than using the fileset option it might be worth trying out the sourcepath option to specify the location of your files. Im not sure if it will make a difference but give it a shot
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.