GithHub地址:ttps://github.com/apache/lucene-solr
这个地址下载到的是Lucene + solr的源码。Lucene主页下载的单独的Lucene_src.zip是不可以导入的。
2、必须软件安装
Lucene5.5 需要JDK8、ANT1.8.1以上、ivy。
如果网络需要代理的,需要执行
set ANT_OPTS=-Dhttp.proxyHost=myproxyhost -Dhttp.proxyPort=8080 -Dhttp.proxyUser=myproxyusername -Dhttp.proxyPassword=myproxypassword -Dhttps.proxyHost=myproxyhost -Dhttps.proxyPort=8080
3、进入lucene-solr目录下(Lucene和solr文件夹上一级),执行ant eclipse。(也可以执行'ant idea','ant netbeans')
如果网络状况差,下载依赖出现报错的情况。手动访问报错消息中的红色URL,将下载好的jar包拷贝到绿色本地仓库下
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
[ivy:retrieve] ==== shared: tried
[ivy:retrieve] C:\Users\zhaotiantian.G08\.ivy2\shared\org.carrot2\morfologik-polish\2.0.1\jars\morfologik-polish.jar
[ivy:retrieve] ==== public: tried
[ivy:retrieve] https://repo1.maven.org/maven2/org/carrot2/morfologik-polish/2.0.1/morfologik-polish-2.0.1.jar
[ivy:retrieve] ::::::::::::::::::::::::::::::::::::::::::::::
[ivy:retrieve] :: FAILED DOWNLOADS ::
[ivy:retrieve] :: ^ see resolution messages for details ^ ::
[ivy:retrieve] ::::::::::::::::::::::::::::::::::::::::::::::
[ivy:retrieve] :: org.carrot2#morfologik-polish;2.0.1!morfologik-polish
.jar
[ivy:retrieve] ::::::::::::::::::::::::::::::::::::::::::::::
[ivy:retrieve]
[ivy:retrieve]
[ivy:retrieve] :: USE VERBOSE OR DEBUG MESSAGE LEVEL FOR MORE DETAILS
BUILD FAILED
D:\OpenSource\lucene-5.5.0-src\build.xml:230: The following error occurred while
executing this line:
D:\OpenSource\lucene-5.5.0-src\lucene\build.xml:126: The following error occurre
d while executing this line:
D:\OpenSource\lucene-5.5.0-src\lucene\common-build.xml:2273: The following error
occurred while executing this line:
D:\OpenSource\lucene-5.5.0-src\lucene\analysis\build.xml:91: The following error
occurred while executing this line:
D:\OpenSource\lucene-5.5.0-src\lucene\analysis\build.xml:38: The following error
occurred while executing this line:
D:\OpenSource\lucene-5.5.0-src\lucene\common-build.xml:454: impossible to resolv
e dependencies:
resolve failed - see output for details
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
4、进入Eclipse 导入Java Project,路径为lucene-solr/Lucene和lucene-solr/solr