unholysampler
unholysampler

Reputation: 17321

How to get Javadoc to include documentation for a sub-project?

I have two projects in Netbeans that are closely linked. They are separate projects because one of the projects is a util package that could be used in the future for another project. Is there a way to configure Netbeans so that the Javadoc generated for the main project will include links to the objects defined in the util project instead of listing the full package path?

Edit: I have found how to do it. In Project Properties > Build > Documenting you can set Additional Javadoc Options. The option to use is -link and then the URL of the documentation directory. However, I can only get it to work with an absolute link and am having trouble getting the relative link to work.

-link file:///A:\B\C\Util\dist\javadoc //this works
-link file: ..\..\..\Util\dist\javadoc //this doesn't works

Both project folders are in directory C, so I think that should be the correct relative path based on the documentation.

Upvotes: 3

Views: 703

Answers (1)

chb
chb

Reputation: 1995

I realize that this suggestion lies outside of the implied constraints of your question, but it might be better to use an SCM tool (and not your IDE) to publish javadoc that covers dependent projects. For example, Maven has a plugin specifically designed to publish javadoc for modular projects.

Upvotes: 3

Related Questions