2001-11-04 12:23:04 -05:00
|
|
|
Lucene Build Instructions
|
|
|
|
|
|
|
|
$Id$
|
|
|
|
|
|
|
|
Basic steps:
|
2005-05-05 09:38:34 -04:00
|
|
|
0) Install JDK 1.4 (or greater), Ant 1.6.2 (or greater)
|
2003-01-25 23:38:44 -05:00
|
|
|
1) Download Lucene from Apache and unpack it
|
|
|
|
2) Connect to the top-level of your Lucene installation
|
2003-09-10 21:51:33 -04:00
|
|
|
3) Install JavaCC (optional)
|
2003-01-25 23:38:44 -05:00
|
|
|
4) Run ant
|
2001-11-04 12:23:04 -05:00
|
|
|
|
2005-05-05 09:38:34 -04:00
|
|
|
Step 0) Set up your development environment (JDK 1.4 or greater,
|
|
|
|
Ant 1.6.2 or greater)
|
2001-11-04 12:23:04 -05:00
|
|
|
|
|
|
|
We'll assume that you know how to get and set up the JDK - if you
|
|
|
|
don't, then we suggest starting at http://java.sun.com and learning
|
2005-05-05 09:38:34 -04:00
|
|
|
more about Java, before returning to this README. Lucene runs with
|
|
|
|
JDK 1.4 and later.
|
2001-11-04 12:23:04 -05:00
|
|
|
|
2005-05-05 09:38:34 -04:00
|
|
|
Like many Open Source java projects, Lucene uses Apache Ant for build
|
|
|
|
control. Specifically, you MUST use Ant version 1.6.2 or greater.
|
2001-11-04 12:23:04 -05:00
|
|
|
|
|
|
|
Ant is "kind of like make without make's wrinkles". Ant is
|
|
|
|
implemented in java and uses XML-based configuration files. You can
|
|
|
|
get it at:
|
|
|
|
|
2003-09-10 21:51:33 -04:00
|
|
|
http://ant.apache.org
|
2001-11-04 12:23:04 -05:00
|
|
|
|
2005-05-05 09:38:34 -04:00
|
|
|
You'll need to download the Ant binary distribution. Install it
|
|
|
|
according to the instructions at:
|
2001-11-04 12:23:04 -05:00
|
|
|
|
2003-09-10 21:51:33 -04:00
|
|
|
http://ant.apache.org/manual
|
2001-11-04 12:23:04 -05:00
|
|
|
|
2002-05-06 23:38:34 -04:00
|
|
|
Step 1) Download Lucene from Apache
|
2001-11-04 12:23:04 -05:00
|
|
|
|
|
|
|
We'll assume you already did this, or you wouldn't be reading this
|
|
|
|
file. However, you might have received this file by some alternate
|
|
|
|
route, or you might have an incomplete copy of the Lucene, so: Lucene
|
|
|
|
releases are available for download at:
|
|
|
|
|
2005-05-05 09:38:34 -04:00
|
|
|
http://www.apache.org/dyn/closer.cgi/jakarta/lucene/
|
2001-11-04 12:23:04 -05:00
|
|
|
|
|
|
|
Download either a zip or a tarred/gzipped version of the archive, and
|
|
|
|
uncompress it into a directory of your choice.
|
|
|
|
|
2002-01-26 10:01:32 -05:00
|
|
|
Step 2) Connect to the top-level of your Lucene installation
|
2001-11-04 12:23:04 -05:00
|
|
|
|
2005-05-05 09:38:34 -04:00
|
|
|
Lucene's top-level directory contains the build.xml file. By default,
|
|
|
|
you do not need to change any of the settings in this file, but you do
|
|
|
|
need to run ant from this location so it knows where to find build.xml.
|
2002-02-27 17:18:28 -05:00
|
|
|
|
2005-05-05 09:38:34 -04:00
|
|
|
If you would like to change settings you can do so by creating one
|
|
|
|
or more of the following files and placing your own property settings
|
|
|
|
in there:
|
2002-02-27 17:18:28 -05:00
|
|
|
|
|
|
|
~/lucene.build.properties
|
|
|
|
~/build.properties
|
2005-05-05 09:38:34 -04:00
|
|
|
lucene-x.y/build.properties
|
2002-02-27 17:18:28 -05:00
|
|
|
|
|
|
|
The first property which is found in the order with which the files are
|
|
|
|
loaded becomes the property setting which is used by the Ant build
|
|
|
|
system.
|
|
|
|
|
|
|
|
NOTE: the ~ character represents your user account home directory.
|
2001-11-04 12:23:04 -05:00
|
|
|
|
2003-01-25 23:38:44 -05:00
|
|
|
Step 3) Install JavaCC
|
|
|
|
|
2003-09-10 21:51:33 -04:00
|
|
|
Building the Lucene distribution from the source does not require the JavaCC
|
|
|
|
parser generator, but if you wish to regenerate any of the pre-generated
|
|
|
|
parser pieces, you will need to install JavaCC.
|
2003-01-25 23:38:44 -05:00
|
|
|
|
2003-09-10 21:51:33 -04:00
|
|
|
http://javacc.dev.java.net
|
2003-01-25 23:38:44 -05:00
|
|
|
|
|
|
|
Follow the download links and download the zip file to a temporary
|
2003-09-10 21:51:33 -04:00
|
|
|
location on your file system.
|
2003-01-25 23:38:44 -05:00
|
|
|
|
2005-05-05 09:38:34 -04:00
|
|
|
After JavaCC is installed, create a build.properties file
|
2003-01-25 23:38:44 -05:00
|
|
|
(as in step 2), and add the line
|
|
|
|
|
|
|
|
javacc.home=/javacc/bin
|
|
|
|
|
|
|
|
where this points to the bin directory of your javacc installation.
|
|
|
|
|
|
|
|
Step 4) Run ant
|
2001-11-04 12:23:04 -05:00
|
|
|
|
|
|
|
Assuming you have ant in your PATH and have set ANT_HOME to the
|
|
|
|
location of your ant installation, typing "ant" at the shell prompt
|
|
|
|
and command prompt should run ant. Ant will by default look for the
|
|
|
|
"build.xml" file in your current directory, and compile Lucene.
|
|
|
|
|
2003-09-10 21:51:33 -04:00
|
|
|
To rebuild any of the JavaCC-based parsers, run "ant javacc".
|
|
|
|
|
2001-11-04 12:23:04 -05:00
|
|
|
For further information on Lucene, go to:
|
2005-05-05 09:38:34 -04:00
|
|
|
http://lucene.apache.org/
|
2001-11-04 12:23:04 -05:00
|
|
|
|
2002-02-27 17:18:28 -05:00
|
|
|
Please join the Lucene-User mailing list by visiting this site:
|
2005-05-05 09:38:34 -04:00
|
|
|
http://lucene.apache.org/java/docs/mailinglists.html
|
2003-09-10 21:51:33 -04:00
|
|
|
|
2001-11-04 12:23:04 -05:00
|
|
|
Please post suggestions, questions, corrections or additions to this
|
2003-09-10 21:51:33 -04:00
|
|
|
document to the lucene-user mailing list.
|
2001-11-04 12:23:04 -05:00
|
|
|
|
|
|
|
This file was originally written by Steven J. Owens <puff@darksleep.com>.
|
2002-02-27 17:18:28 -05:00
|
|
|
This file was modified by Jon S. Stevens <jon@latchkey.com>.
|
2001-11-04 12:23:04 -05:00
|
|
|
|
2005-05-05 09:38:34 -04:00
|
|
|
Copyright (c) 2001-2005 The Apache Software Foundation. All rights reserved.
|