pron
pron

Reputation: 13

How do I exclude a specific package from Javadoc in NetBeans?

NetBeans generates Javadoc for all packages in the project. Adding the "-exclude" Javadoc option in the documentation form of the project properties under "Additional Javadoc Options" does not seem to work. How do I tell netBeans to exclude a specific package from the Javadoc?

Upvotes: 1

Views: 5904

Answers (2)

Jose Lamas Ríos
Jose Lamas Ríos

Reputation: 466

Faced this for a Maven project (a Jenkins plugin) for which I imported a WSDL service.

The wsimport in JDK8 generates code that is not compatible with the JDK8 javadoc compiler.

Until this problem is fixed, one possible work-around is to generate these files to a separate package (which is good in any case), and exclude it from the javadoc generation. The way to do this for a Maven project is by adding the following to the pom.xml.

    <plugins>

        <!-- ... -->

        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <configuration>
                <excludePackageNames>your.package.name</excludePackageNames>
            </configuration>
        </plugin>
    </plugins> 

Upvotes: 0

Daniel Kec
Daniel Kec

Reputation: 549

I would try edit -javadoc-build target in the ant build script. On the Files tab browse your project and find nbproject/build-impl.xml, in this file find -javadoc-build target and replace ${excludes} variable in the fileset attribute called excludes with your desired package.

Ant fileset spec.

Upvotes: 1

Related Questions