首页 > 代码库 > 编译Solr4.72 源码没有成功
编译Solr4.72 源码没有成功
最近需要用到solr,查询Hbase里面的数据,编译Solr的时候遇到了点问题:
下了solr的源码后需要用ant自己编译:
源码下载地址:https://svn.apache.org/repos/asf/lucene/dev/trunk
第一种办法:
1、安装好ant 后进入到solr所在目录
2、执行 ant eclipse
我在执行 ant eclipse 的时候提示eclispe 不存在
[hadoop@bogon solrcode]$ ant eclipseBuildfile: build.xmlBUILD FAILEDTarget "eclipse" does not exist in the project "solr". Total time: 0 seconds[hadoop@bogon solrcode]$ ant -versionApache Ant version 1.7.1 compiled on August 24 2010[hadoop@bogon solrcode]$
执行 ant -p的时候没有找到eclispe
ant -pBuildfile: build.xmlMain targets: build-contrib Builds all contrib modules and their tests build-site Prototype Helper for Committers. Assumes SVN is in the path clean Cleans compiled files and other temporary artifacts. clean-contrib Cleans all contrib modules and their tests clean-dest Cleans out ${dest} but leaves ${dist} alone. This allows us to run nightly and clover together in Hudson clover Instrument the Unit tests using Clover. Requires a Clover license and clover.jar in the ANT classpath.
To use, specify -Drun.clover=true on the command line. compile Compile the source code. compile-common Compile the source code. compile-solrj Compile the java client. compile-solrj-core Compile the java client. compileTests Compile unit tests. create-package Packages the Solr Distribution files and Documentation. dist Creates the Solr distribution files. dist-contrib Make the contribs ready for distribution dist-jar Creates the Solr JAR Distribution file. dist-javadoc Creates the Solr javadoc distribution files dist-solrj Creates the Solr JAR Distribution file. dist-src Creates the Solr source distribution files dist-war Creates the Solr WAR Distribution file. example Creates a runnable example configuration. javadoc-all Generate javadoc for core, client and contrib javadoc-common Generates javadoc documentation for core. javadoc-contrib Generate javadoc for contrib classes javadoc-core Generates javadoc documentation for core. javadoc-solrj Generates solrj javadoc documentation. prepare-release Prototype helper for Committers. Assumes gpg is in the path rat-sources runs the tasks over src/java excluding the license directory stub-factories Generates stub factories as needed test Runs the core unit tests. test-core Runs the core unit tests. test-reports Generates HTML test reports. usage Prints out instructionsDefault target: usage
第二中方法:用ant ivy-bootstrap 需要自己下载 ivy-xxxx.jar 我的网盘地址: http://pan.baidu.com/s/1kTl3nRx
将apache-ivy-2.3.0-bin目录下的ivy-2.3.0.jar 放在ant lib目录下 然后在执行 ant ivy-bootstrap
[hadoop@bogon solrcode]$ ant ivy-bootstrapBuildfile: build.xmlBUILD FAILEDTarget "ivy-bootstrap" does not exist in the project "solr". Total time: 0 seconds[hadoop@bogon solrcode]$
以上2种方式网上都说可以成功,但是我的最后还是没有成功。有哪位有成功的说下。
参考地址:http://searchhub.org/2009/09/02/setting-up-apache-solr-in-eclipse/
编译Solr4.72 源码没有成功
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。