码迷,mamicode.com
首页 > 其他好文 > 详细

编译Solr4.72 源码没有成功

时间:2014-09-04 18:41:39      阅读:295      评论:0      收藏:0      [点我收藏+]

标签:des   Lucene   style   blog   http   color   os   io   java   

最近需要用到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 eclipse
Buildfile: build.xml

BUILD FAILED
Target "eclipse" does not exist in the project "solr". 

Total time: 0 seconds
[hadoop@bogon solrcode]$ ant -version
Apache Ant version 1.7.1 compiled on August 24 2010
[hadoop@bogon solrcode]$ 

 执行 ant -p的时候没有找到eclispe

ant -p
Buildfile: build.xml

Main 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 instructions Default 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-bootstrap
Buildfile: build.xml

BUILD FAILED
Target "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 源码没有成功

标签:des   Lucene   style   blog   http   color   os   io   java   

原文地址:http://www.cnblogs.com/zhanggl/p/3956533.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!