user1508419
user1508419

Reputation: 333

how to generate javadoc of only one package

I would generate through Netbeans javadoc for only one specific package.If I press on the panel "Generate Javadocs" I obtain Javadoc of all the project.Instead I would for only one package.

Upvotes: 5

Views: 3696

Answers (3)

mohamed didi
mohamed didi

Reputation: 11

Try to do this :

  1. Place the curser on the package you want to generate the javadoc for.
  2. Click on Tools -> Generate JavaDoc
  3. For JavaDoc Scop, you will see your package as choice, select it
  4. After specifying the ouput directory, click on Generate.

Upvotes: 0

rmuller
rmuller

Reputation: 12859

When using Netbeans 8.1:

  • [Right Click on Project] > Properties > Actions
  • Select Action "Generate JavaDoc"
  • At "Set Properties:", specify: subpackages=<your package(s)>
  • Click "OK"

Now for generating JavaDoc for this project, execute the maven javadoc:javadoc goal or run this goal directly from Netbeans:

  • [Right Click on Project] > Generate JavaDoc

Upvotes: 0

Francisco Spaeth
Francisco Spaeth

Reputation: 23903

You could use packagenames parameter for that. Syntax:

javadoc [ options ] [ packagenames ] [ sourcefilenames ] [ -subpackages pkg1:pkg2:... ] [ @argfiles ] 

Documentation:

packagenames - A series of names of packages, separated by spaces, such as java.lang java.lang.reflect java.awt. You must separately specify each package you want to document. Wildcards are not allowed; use -subpackages for recursion. The Javadoc tool uses -sourcepath to look for these package names. See Example - Documenting One or More Packages

This parameters you can apply to [Right Click on Project] > Properties > Build > Documenting you can provide additional parameters but when I needed it as you need now I just did it manually (command line), I conclude that netbeans provides the source package as already a parameter to javadoc.

Upvotes: 1

Related Questions