Kevin A Burton wrote:
> It wouldn't be that hard to add a <javadoc> to Ant... Maybe I will hack > it this weekend. Does it do anything other than call > com.sun.tools.javadoc.Main? If so it should run on JDK 1.1 just > fine.... unless it adds other command line parameters. javadoc2 calls com.sun.tools.javadoc.Main, the original javadoc A few issues: 1) javadoc2 calls com.sun.tools.javadoc.Main. In JDK1.1, javadoc can be found at sun.tools.javadoc.Main. 2) javadoc2 has a lot more parameters than javadoc. In a test version of the code, I was able to get the javadoc2 taskdef to get into javadoc by simply omitting the javadoc2 parameters. 3) javadoc2 (and presumably javadoc) call System.exit. The original approach to solving this was to put in a security manager which would disallow exit calls, but this too is very JDK level specific. Stefano and I agree that the right fix for this it to convert the code to use Runtime.exec exec. Sure it is another JVM, but the code will be a lot cleaner, more portable, and the overhead shouldn't be significant compared to an entire JavaDoc run. I had actually gotten fairly far in addressing these problems (making ample use of project.getJavaVersion()), but silly me, I wanted to be able to test it. Since I had broken cocoon in my first attempt to address #3, I started there. As I said, I was able to get into javadoc, but no files were being passed as input. Taking a look at the way the build was set up, the list of generated class files were used as input, so I needed to compile Cocoon. At that point, Stefano was proposing me as a committer, so I opted to wait until that was done. To make a long story short - let's not both spend the same weekend duplicating each other's work. If you want it - it is yours, just don't make the same mistakes I did. If for some reason you can't get to it, let me know and I will.
