在Eclipse中创建Lucene项目

1、下载Lucene代码。
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
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值