简体   繁体   中英

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?

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.

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> 

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM