add --shared
[pylucene.git] / lucene-java-3.4.0 / lucene / BUILD.txt
1 Lucene Build Instructions
2
3 Basic steps:
4   0) Install JDK 1.5 (or greater), Ant 1.7.x (not 1.6.x, not 1.8.x)
5   1) Download Lucene from Apache and unpack it
6   2) Connect to the top-level of your Lucene installation
7   3) Install JavaCC (optional)
8   4) Run ant
9
10 Step 0) Set up your development environment (JDK 1.5 or greater,
11 Ant 1.7.x)
12
13 We'll assume that you know how to get and set up the JDK - if you
14 don't, then we suggest starting at http://java.sun.com and learning
15 more about Java, before returning to this README. Lucene runs with
16 JDK 1.5 and later.
17
18 Like many Open Source java projects, Lucene uses Apache Ant for build
19 control.  Specifically, you MUST use Ant version 1.7.x
20
21 Ant is "kind of like make without make's wrinkles".  Ant is
22 implemented in java and uses XML-based configuration files.  You can
23 get it at:
24
25   http://ant.apache.org
26
27 You'll need to download the Ant binary distribution.  Install it
28 according to the instructions at:
29
30   http://ant.apache.org/manual
31
32 Step 1) Download Lucene from Apache
33
34 We'll assume you already did this, or you wouldn't be reading this
35 file.  However, you might have received this file by some alternate
36 route, or you might have an incomplete copy of the Lucene, so: Lucene
37 releases are available for download at:
38
39   http://www.apache.org/dyn/closer.cgi/lucene/java/
40
41 Download either a zip or a tarred/gzipped version of the archive, and
42 uncompress it into a directory of your choice.
43
44 Step 2) From the command line, change (cd) into the top-level directory of your Lucene installation
45
46 Lucene's top-level directory contains the build.xml file. By default,
47 you do not need to change any of the settings in this file, but you do
48 need to run ant from this location so it knows where to find build.xml.
49
50 If you would like to change settings you can do so by creating one 
51 or more of the following files and placing your own property settings
52 in there:
53
54     ~/lucene.build.properties
55     ~/build.properties
56     lucene-x.y/build.properties
57
58 The first property which is found in the order with which the files are
59 loaded becomes the property setting which is used by the Ant build
60 system.
61
62 NOTE: the ~ character represents your user account home directory.
63
64 Step 3) Install JavaCC
65
66 Building the Lucene distribution from the source does not require the JavaCC
67 parser generator, but if you wish to regenerate any of the pre-generated
68 parser pieces, you will need to install JavaCC. Version 4.1 is tested to
69 work correctly.
70
71   http://javacc.dev.java.net
72
73 Follow the download links and download the zip file to a temporary
74 location on your file system.
75
76 After JavaCC is installed, create a build.properties file
77 (as in step 2), and add the line
78
79   javacc.home=/javacc
80
81 where this points to the root directory of your javacc installation
82 (the directory that contains bin/lib/javacc.jar).
83
84 Step 4) Run ant
85
86 Assuming you have ant in your PATH and have set ANT_HOME to the
87 location of your ant installation, typing "ant" at the shell prompt
88 and command prompt should run ant.  Ant will by default look for the
89 "build.xml" file in your current directory, and compile Lucene.
90
91 To rebuild any of the JavaCC-based parsers, run "ant javacc".
92
93 For further information on Lucene, go to:
94   http://lucene.apache.org/
95
96 Please join the Lucene-User mailing list by visiting this site:
97   http://lucene.apache.org/java/docs/mailinglists.html
98
99 Please post suggestions, questions, corrections or additions to this
100 document to the lucene-user mailing list.
101
102 This file was originally written by Steven J. Owens <puff@darksleep.com>.
103 This file was modified by Jon S. Stevens <jon@latchkey.com>.
104
105 Copyright (c) 2001-2005 The Apache Software Foundation.  All rights reserved.