简体   繁体   English

如何修复IntelliJ IDEA错误库'Maven x的javadoc /源路径已损坏?

[英]How do I fix IntelliJ IDEA Error Library 'Maven x has broken javadoc/source path?

I have around 30 errors in my project structure window of IntelliJ. 我的IntelliJ项目结构窗口中出现大约30个错误。 I am using maven to build my project and manage dependencies. 我正在使用maven构建我的项目并管理依赖项。 Some of the dependencies have one of/both of the following errors: 一些依赖项具有以下两种错误之一:

Library 'Maven x' has broken javadoc path: <path to local repo>
Library 'Maven x' has broken source path: <path to local repo>

For instance I get both of these errors for commons-logging:commons-logging-api:1.1 例如,对于commons-logging:commons-logging-api:1.1,我同时遇到了这两个错误

I've tried running the following commands, but I still have errors: 我尝试运行以下命令,但仍然出现错误:

mvn dependency:resolve -Dclassifier=javadoc
mvn dependency:resolve -Dclassifier=sources 

Are these errors a result of the library not publishing its source and javadocs to the maven repo? 这些错误是由于库未将其源代码和javadocs发布到Maven存储库而导致的吗? Is there a way to get these errors to go away without manually installing the dependency into my local repo (I imaging this would become a maintenance issue ever time I update a library)? 有没有一种方法可以解决这些错误,而无需将依赖项手动安装到本地存储库中(每次更新库时,我都认为这将成为维护问题)?

Are these errors a result of the library not publishing its source and javadocs to the maven repo? 这些错误是由于库未将其源代码和javadocs发布到Maven存储库而导致的吗?

Yes, it's most likely the case. 是的,很可能是这种情况。

Is there a way to get these errors to go away without manually installing the dependency into my local repo 有没有一种方法可以解决这些错误,而无需手动将依赖项安装到本地存储库中

Global errors component at the bottom of the Project Structure dialog should no longer display such errors starting from IntelliJ IDEA 11.0.1, however they are still displayed in the library tool-tips. 从IntelliJ IDEA 11.0.1开始,“ 项目结构”对话框底部的“全局错误”组件不应再显示此类错误,但是仍会在库工具提示中显示这些错误。

There is an open request to not add links to the roots that do not exist when performing Maven import, please watch/vote. 有一个公开的请求 ,不要在执行Maven导入时不添加指向不存在的根的链接,请观看/投票。

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

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