如何从 NetBeans 中的 Javadoc 中排除特定包?
NetBeans 为项目中的所有包生成 Javadoc。在“其他 Javadoc 选项”下的项目属性的文档形式中添加“-exclude”Javadoc 选项似乎不起作用。如何告诉 netBeans 从 Javadoc 中排除特定包?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我会尝试在 ant 构建脚本中编辑 -javadoc-build 目标。在“文件”选项卡上浏览您的项目并找到 nbproject/build-impl.xml,在此文件中找到 -javadoc-build 目标并替换 <一个 href="http://ant.apache.org/manual/Types/fileset.html" rel="nofollow noreferrer">文件集 属性,名为排除,包含您所需的包。
Ant 文件集规范。
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.
我在 Maven 项目(Jenkins 插件)中遇到了这个问题,我为其导入了 WSDL 服务。
JDK8 中的 wsimport 生成的代码与 JDK8 javadoc 编译器不兼容。
在解决此问题之前,一种可能的解决方法是将这些文件生成到单独的包中(这在任何情况下都很好),并将其从 javadoc 生成中排除。对于 Maven 项目执行此操作的方法是将以下内容添加到 pom.xml。
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.