简体   繁体   English

如何强制 IntelliJ 使用 Maven 下载 javadocs?

[英]How to force IntelliJ to download javadocs with Maven?

I have the following descriptions for some Maven entries in Project Structure:我对项目结构中的一些 Maven 条目有以下描述:

在此处输入图片说明

Javadoc file is really absent in filesystem.文件系统中确实不存在 Javadoc 文件。 Simultaneously, it is present in central repository.同时,它存在于中央存储库中。 Why it was not downloaded and how to download it by force?为什么没有下载,如何强制下载?

UPDATE更新

These options are ON already:这些选项已经开启:

在此处输入图片说明

Have tried to recompile, close/open etc after setting them...设置后尝试重新编译,关闭/打开等...

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 -> 导入 -> 标记“文档”复选框并应用设置

Maven Projects panel Maven 项目面板

Maven Projects tool window > Icon with green arrow and a box > Download Documentation : Maven 项目工具窗口 > 带有绿色箭头和一个框的图标 >下载文档

在此处输入图片说明

See IntelliJ IDEA documentation for Version 14.1 or current version .请参阅版本 14.1当前版本的IntelliJ IDEA 文档。

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

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.顺便说一句,如果您遇到与我相同的情况(使用公司 Maven 存储库),Maven 可能会忽略进一步下载 javadoc 的机会,如果它曾经不存在的话。 And to make it request it one more time, you have to remove <artifactId>-<version>-javadoc.jar.lastUpdated file from .m2/repository/<groupId>/<artifactId>/<version> , then try again.为了让它再次请求它,您必须从.m2/repository/<groupId>/<artifactId>/<version>删除<artifactId>-<version>-javadoc.jar.lastUpdated文件,然后再试一次。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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