Monthly Archives: September 2016

Lucene – Build Lucene and import to eclipse.

This is first article on Lucene source code analysis.
There are two ways to get source code, one of them are download directly form lucene’s WebSite http://www.apache.org/dyn/closer.lua/lucene/java/6.2.1

you could choose to download lucene-6.2.1-src.tgz and release binary build lucene-6.2.1.tgz .

However, lucene-6.2.1-src.tgz are not easy to import to eclipse.run “ant -p” to check all commands and “ant eclipse” command is not ready yet. you have to check out https://github.com/apache/lucene-solr. From readme you could find the following message
“To compile the sources run ‘ant compile’
To run all the tests run ‘ant test’
To setup your ide run ‘ant idea’, ‘ant netbeans’, or ‘ant eclipse’”

install ivy for ant.
Download ivy file such as “apache-ivy-2.4.0-bin.zip” and put to ant library file.

after git clone from https://github.com/apache/lucene-solr, run “ant eclipse” and then run eclipse , “Import” -> “Existing Projects into workspace”