7

如果我在 Gradle 中有 maven 依赖项,那么 eclipse 插件将自动下载源 jar 文件(如果有的话)并将其附加到生成的 eclipse“.classpath”文件中。

是否有可能为本地文件依赖(我有源 jar)获得类似的行为?

4

1 回答 1

4

When using a flatDir repository, the Eclipse plugin should attach any source jars as long as they are in the same location as the dependency jar (with the same name followed by either -src or -sources).

Say you have a local jar called dependency.jar at location x/y/z. If you put the sources jar in the same location and call it dependency-sources or dependency-src, it will be attached.

Please note that this only works for flatDir repositories and not for plain file dependencies.

于 2013-08-01T08:23:41.377 回答