Reputation: 461
I created the javadocs in my Eclipse Project with the Export >> Java >> Java-doc. The directory structure is MyProject >> docs >> javadoc. I have two questions:
The second question is the more important, because I know how generate manually the javadoc, but I don't know how to create the *-javadoc.jar.
Upvotes: 3
Views: 3697
Reputation: 21223
When you configure Javadoc generation using wizard invoked from Project->Generate Javadoc...
you have an option to generate ant
script for your settings. You can then invoke (or copy to) the generated ant target from your main build script.
To generate the archive itself you can simply package the folder with generated documentation as a jar file. Add something similar to the following target to your ant scripts:
<target depends="javadoc" description="build javadoc jar" name="package-docs">
<jar compress="true" destfile="javadoc.jar" basedir="doc" />
</target>
Upvotes: 7