我可以在不明确命名软件包的情况下从命令行中使用Javadoc一个整个Java项目吗?
我有一个带有许多软件包的Java代码库,我不太熟悉。
我只想在While Thick上获得Javadoc-ing的概述。不必指定我要记录的包装的名称。我只想要“一切”
是否有一个简单的命令行选项?
更新:
我刚刚期望能够写一些类似的内容,
javadoc -d /home/html -sourcepath .
以获取Courtect目录下定义的所有软件包
,但似乎并没有这种方式。但是,要获得这一点是什么呢?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
基于GUI的答案,
一种简单而舒适的方式(需要 Intellijij ):
打开该项目。
打开
工具
菜单。单击
生成Javadoc ...
。在Javadoc范围中,选择
整个项目
radiobutton。GUI based answer, unrelated
An easy and cozy way (requires IntelliJ):
Open the project.

Open the

Tools
menu.Click on

Generate JavaDoc...
.In JavaDoc Scope, choose the

Whole project
radiobutton.并且源文件在
c:\ javaproject \ src
javaproject 中,
如果您的项目在
c: \
中:
如果此方法遇到不是软件包或源的子目录,则该方法将失败。
如果
src
中存在文件,或者目录是空的,如果消息错误 - 无需包装
,它将失败。这是 github repo 让您克隆并尝试一下。
If your project is in
C:\JavaProject
and the source files are inC:\JavaProject\src
,Use command:
followed by:
Warning:
This method will fail if it encounters a subdirectory that is not a package or source.
It will also fail if files are present in
src
or if a directory is empty with the messageerror - No source files for package
.Here's a GitHub repo for you to clone and try this out.
对于 maven项目,您可以在项目目录中使用
mvn javadoc:javadoc
命令:但是,为此,您需要添加
maven-javadoc-plugin
>在您的pom.xml
文件中:您可以检查最新的
maven-javadoc-plugin
:://mvnrepository.com/artifact/org.apache.maven.plugins/maven-javadoc-plugin“ rel =” nofollow noreferrer“> mvnrepository \ target \ site \ apidocs \ index.html
For Maven projects, you may use
mvn javadoc:javadoc
command in your project directory:But for that, you need to add
maven-javadoc-plugin
to yourpom.xml
file:You may check the latest
maven-javadoc-plugin
version on mvnrepositoryThe javadoc can then be found on
project\target\site\apidocs\index.html