I've got a module (MyModule) and want to produce 2 jars:
1. MyModule.jar - containing the executables for a library
2. MyModule-javadocs.jar - containing the javadoc for the library
How do I do this?
The nearest I've got is creating an artifact for both jars above and for (2) having an ant target "doc" which is run from the "pre-processing" action - this runs javadoc on my module and writes the output to a directory (javadoc_out). The main part of artifact (2) just includes this javadoc_out directory.
This does not work the first time I build - I only get jar (1). The second time I build, both jars (1) and (2) are produced. So it never works from a clean build.
I can't figure out why. I think it may be something to do with artifact (2) not having the javadoc output directory existing until the pre-process step is run or something.