简体   繁体   English

使用IntelliJ IDEA 12无法轻松导航到Maven依赖项的源

[英]Can't navigate to sources for Maven dependencies easily with IntelliJ IDEA 12

I added a library to maven by searching from within IntelliJ, and I checked the boxes to download sources and javadoc, which Idea tells me it did. 我通过在IntelliJ中进行搜索来向maven添加了一个库,然后选中了复选框以下载源代码和javadoc,Idea告诉我这样做了。

However, in some of the library files I click into, it just says "/* compiled code */", even though the exact source code for those files is available in another jar which i can see right there in the project. 但是,在我单击的某些库文件中,它只是显示“ / *编译代码* /”,即使可以在项目中的另一个jar中找到这些文件的确切源代码。

Does anyone know how to fix this? 有谁知道如何解决这一问题?

If you check the libraries tab in the project settings you'll see that each library can have an entry for its sources jar. 如果您在项目设置中选中“库”选项卡,则会看到每个库都可以为其源jar添加一个条目。 If the one you're looking for doesn't have one, add it manually. 如果您要查找的没有一个,请手动添加。

This is all a lot easier if you use maven. 如果您使用Maven,这一切将变得容易得多。

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

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