如何自动附加Intellij中的依赖源代码? [英] How to automatically attach source code for dependency in Intellij?
问题描述
当使用Intellij进行调试时,我从这些依赖关系到达类,我想看到他们的源代码。 IDEA允许我选择下载源表单工件存储库(这仅适用于依赖关系A)或从本地文件夹附加它们。我有文件夹与源的依赖B和我总是设置该文件夹。
可以将Intellij设置为自动下载所有源(对于在存储库中具有源的依赖关系),或者如果不是,请将其附加到可配置的本地文件夹所有依赖项,何时加载项目?还是有插件?
我恐怕不可能自动进行这样的配置。考虑将所有来源保留在Maven存储库中,在这种情况下,您可以配置IDEA自动下载。
I have a project (built with Maven) which has many internal dependencies; some of these dependencies are built with Maven and sources can be deployed along with the binaries (and Javadoc) in the central repository; say these are dependencies A. But some dependencies do not have sources (as jar in repository) and cannot be set to be deployed with sources when built (huge Ant script and no one wants to break it); say these are dependencies B.
When debugging with Intellij, I reach classes from these dependencies and I want to see their source code. IDEA lets me choose to download the sources form artifacts repository (this only works for dependencies A) or to attach them from a local folder. I have the folder with the sources for dependencies B and I always set that folder.
Can Intellij be set to automatically download all the sources (for dependencies that have sources in repository) or, if not, to attach them from configurable local folder(s) for all the dependencies, when a project is loaded? Or is there a plug-in for this?
I'm afraid it's not possible to do such configuration automatically. Consider keeping all the sources in the Maven repository, in this case you can configure IDEA to download them automatically.
这篇关于如何自动附加Intellij中的依赖源代码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!