需要Lucene 4.1.0源代码jar或javadoc jars(在Eclipse中使用Lucene 4.1.0开发可用) [英] Need Lucene 4.1.0 source jars or javadoc jars (to make developing with Lucene 4.1.0 in Eclipse usable)
问题描述
我刚刚下载并解压缩了最新版本的Lucene(Lucene 4.1.0)的源代码jar(或javadoc jars)从 http://www.apache。 org / dyn / nearest.cgi / lucene / java / 4.1.0 , lucene-4.1.0-src.tgz
和 lucene的-4.1.0.tgz
。我可以轻松地将后者中的42个jar添加到我的Eclipse项目中。
添加javadoc或源代码更令人烦恼。
在过去,我以某种方式得到了一个源代码jar(可以通过Project.right.click/Properties/Java_Build_Path/Libraries将每个jar附加到Eclipse中的相应字节编译的jar)。由于源码已经包含javadoc,所以我需要从Eclipse中获取提示,方法是调用类型和方法,并且生命是好的。 (加上我可以随时进入源码)。
现在,我把我的鼻子戳入lucene-4.1.0-src,只是为了看。当然没有罐子(src或其他)。但是尝试编译需要我先设置ivy(对不起?)由于我在Fedora上,在执行规定的 ant ivy-bootstrap
后,我遵循了一些额外的指示使常春藤工作(基本上归结为 echo rpm_mode = false>>〜/ .ant / ant.conf
)。仍然,顶级的 ant jar-src
失败(/ src / java不存在)。 ant clean compile
做得好一点,但是$ ant jar
失败(无效的清单)。
或者,$ code> lucene-4.1.0.tgz 附带95MB的文档;如何在Eclipse中连接42个Lucene jar,这些5458个文件总共为95MB?
我强烈建议使用 Maven 使用Eclipse构建工具集成,因为它不仅自动添加所有必需的库,而且还可以自动下载正在使用的库的所有源和javadoc。
小型生活我和我的团队使用maven的 pom.xml
即使在项目中,我们使用其他构建功能( ant
或IDE的具体)
如果你不想打扰maven,我想介绍非常有用的资源: http://search.maven.org/
在这里您可以搜索(并找到)几乎所有的maven图书馆,来源和javadocs。
Fe您可以搜索 lucene-core
,看看会发生什么:
http://search.maven.org/#search|ga|1|lucenecore?
在下载
选项卡上,您将看到 sources.jar
和 javadoc.jar
您可以下载并添加到您的项目。
How/where do I obtain the source jars (or javadoc jars) for Lucene 4.1.0?
I've just downloaded and untarred the latest version of Lucene from one of the mirrors listed at http://www.apache.org/dyn/closer.cgi/lucene/java/4.1.0, both lucene-4.1.0-src.tgz
and lucene-4.1.0.tgz
. I could easily add the 42 jars found in the latter to my Eclipse project.
Adding javadoc or sources is proving more vexing.
In the past, I somehow got a hold of source jars (each of which could be attached in Eclipse to the corresponding byte-compiled jar via Project.right.click/Properties/Java_Build_Path/Libraries). Since the sources already contain javadoc, that's all I needed to get hints from Eclipse upon hovering over types and method calls and life was good. (Plus I could always step into the source when needed).
Now, I poked my nose into lucene-4.1.0-src, just to see. No jars (src or otherwise), of course. But trying to compile requires me first to set up "ivy" (excuse me?) Since I'm on Fedora, after doing the prescribed ant ivy-bootstrap
I followed some extra instructions to make ivy sort of work (essentially it boils down to echo rpm_mode=false >> ~/.ant/ant.conf
). Still, ant jar-src
at the top level fails ("/src/java doesn't exist"). ant clean compile
does a bit better, but ant jar
fails (invalid manifest).
Alternatively, lucene-4.1.0.tgz
comes with 95MB of docs; How do I connect the 42 Lucene jars in Eclipse with these 5458 files totaling 95MB?
I would strongly recommend using Maven build tool with Eclipse integration because it not only adds all necessary libraries automatically, but also can automatically download all sources and javadocs of libraries being used.
Small lifehack: personally me and my team use maven's pom.xml
even in projects, where we use other build's capabilities (ant
or IDE's specific).
If you don't want to bother with maven, I'd like to introduce very helpful resources: http://search.maven.org/
Here you can search (and find) almost any maven's libraries, with sources and javadocs.
F.e. you can search for lucene-core
and see what happen:
http://search.maven.org/#search|ga|1|lucene-core
On the Download
tab you'll see sources.jar
and javadoc.jar
which you can download and add to your project.
这篇关于需要Lucene 4.1.0源代码jar或javadoc jars(在Eclipse中使用Lucene 4.1.0开发可用)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!