java 如何强制 IntelliJ 使用 Maven 下载 javadoc?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/31072667/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-11-02 18:03:31  来源:igfitidea点击:

How to force IntelliJ to download javadocs with Maven?

javamavenintellij-idea

提问by Dims

I have the following descriptions for some Maven entries in Project Structure:

我对项目结构中的一些 Maven 条目有以下描述:

enter image description here

在此处输入图片说明

Javadoc file is really absent in filesystem. Simultaneously, it is present in central repository. Why it was not downloaded and how to download it by force?

文件系统中确实不存在 Javadoc 文件。同时,它存在于中央存储库中。为什么没有下载,如何强制下载?

UPDATE

更新

These options are ON already:

这些选项已经开启:

enter image description here

在此处输入图片说明

Have tried to recompile, close/open etc after setting them...

设置后尝试重新编译,关闭/打开等...

回答by user3207081

Click on the "maven projects" (make sure tool buttons are on) on the right side of intelij and then click on "Download Documentation".

单击 intelij 右侧的“maven 项目”(确保工具按钮已打开),然后单击“下载文档”。

Also, for future downloading you can go to the File -> Settings -> Build,execution, deployment, -> build tools -> Maven -> importing -> mark "Documentation" checkbox and apply settings

此外,为了将来下载,您可以转到文件 -> 设置 -> 构建、执行、部署,-> 构建工具 -> Maven -> 导入 -> 标记“文档”复选框并应用设置

回答by Lu55

Maven Projectspanel

Maven 项目面板

Maven Projectstool window > Icon with green arrow and a box > Download Documentation:

Maven 项目工具窗口 > 带有绿色箭头和框的图标 >下载文档

enter image description here

在此处输入图片说明

See IntelliJ IDEA documentation for Version 14.1or current version.

请参阅版本 14.1当前版本的IntelliJ IDEA 文档。

回答by AH Developer

For me, it worked when I pressed on Download Source and Documentation.

对我来说,当我按下“下载源代码和文档”时它起作用了。

回答by vintproykt

By the way, if you experience same case with me (working with corporate Maven repository), Maven may be ignoring an opportunity to further download javadoc if it once wasn't there. And to make it request it one more time, you have to remove <artifactId>-<version>-javadoc.jar.lastUpdatedfile from .m2/repository/<groupId>/<artifactId>/<version>, then try again.

顺便说一句,如果您遇到与我相同的情况(使用公司 Maven 存储库),Maven 可能会忽略进一步下载 javadoc 的机会,如果它曾经不存在的话。为了让它再次请求它,您必须从 中删除<artifactId>-<version>-javadoc.jar.lastUpdated文件.m2/repository/<groupId>/<artifactId>/<version>,然后再试一次。