[英]Adding sources and javadoc of external library to eclipse / gradle
I have an external library which is not in any maven repository, but is provided as a jar
file. 我有一个不在任何Maven存储库中的外部库,但以
jar
文件形式提供。 Therefore, I use the following line in the build.gradle
: 因此,我在
build.gradle
使用以下行:
compile files("/path/lib.jar")
I also have lib-sources.jar
and lib-javadoc.jar
, which I would like to include into the eclipse project as well, but using them as compile files in the same way as above does not work. 我也有
lib-sources.jar
和lib-javadoc.jar
,我也想将它们包括到eclipse项目中,但是不能像上面一样使用它们作为编译文件。
Edit: 编辑:
For now, I use the approach by Creatorsuperman in combination with manual external source attachment as described here ( https://stackoverflow.com/a/8042592 ). 现在,我将Creatorsuperman的方法与此处所述的手动外部源附件结合使用( https://stackoverflow.com/a/8042592 )。 Unfortunately, this does not work with gradle.
不幸的是,这不适用于gradle。
I also have lib-sources.jar and lib-javadoc.jar, which I would like to include into the eclipse project as well, but using them as compile files in the same way as above does not work.
我也有lib-sources.jar和lib-javadoc.jar,我也想将它们包括到eclipse项目中,但是不能像上面一样使用它们作为编译文件。
Go to project > properties > Build Path > Libraries >Add External Library 转到项目>属性>构建路径>库>添加外部库
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.