Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Combine Javadoc for multiple modules into a single collection

I have a Java application consisting of several modules. I'd like to generate Javadoc for all of them together: that is to say, from these several modules, I'd like a single collection of HTML files with a single index.html, a single allclasses-frame.html etc. and the various hyperlinks should work across modules.

I use Maven but I'm not necessarily constrained to Maven-specific solutions. This will be performed by a cron job so other tools could also be used.

What is the most straightforward way to auto-generate Javadoc in this case?

like image 498
Dan Avatar asked Jun 28 '11 16:06

Dan


People also ask

How do I create an automatic Javadoc?

In the Package Explorer view, select a Java project and click Project > Generate Javadoc with Diagrams > Automatically. In the Generate Javadoc wizard, under Javadoc command, select the Javadoc command (an executable file). Note: Only Oracle JDK Version 1.4.

How do I generate a Javadoc STS?

Step 1 − Open eclipse, select the option Project →Generate Javadoc. Step 2 − Select the javadoc.exe file from the bin folder of java installation directory, select the destination folder for the generated java doc and select Next. finish button.


1 Answers

If you can manage it, javadoc can generate the combined documentation provided that you combine the input sources. Perhaps there is a more elegant solution; but, why not copy all the sources into a combined tree and then run javadoc?

The other option is to use the -link option and have one site's documentation refer to another site's documentation. Note that if you choose this option, you may want to also look at the linkoffline option for flexibility in your javadoc builds (unless you manage to deploy documentation to the web servers in the correct order before it is needed by subsequent builds).

like image 61
Edwin Buck Avatar answered Oct 26 '22 23:10

Edwin Buck