lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ian Lea <ian....@blackwell.co.uk>
Subject Re: Lucene Build Instructions
Date Fri, 15 Feb 2002 21:57:50 GMT
"Steven J. Owens" wrote:
> 
> Ian Lea (ian.lea@blackwell.co.uk) writes:
> > Today I built lucene-1.2-rc3 from the source distribution
> > for the first time.  On the whole it was easy enough but
> > a couple of points:
> >
> > BUILD.txt says "Install JDK 1.3".  Might it be better to say
> > "Install JDK 1.3 or later"?. Lots of people are probably
> > running 1.4 already.
> 
>      It also says:
> 
> "Lucene runs with JDK 1.1 and later.  However, if you're going to work
>  with the development version of Lucene, we recommend you stick with
>  the most current version of Java (at the time of this writing, JDK
>  1.3).  Also, note that if you're working with the Lucene source,
>  you'll need to use Ant (see below) and Ant requires at least JDK 1.1
>  (and in the future will likely move to requiring JDK 1.2, according to
>  the Ant install docs)."

True.  My vote still goes the way I suggest but it is only a
very gentle suggestion and now I'll shut up about it.

 
> > BUILD.txt makes no mention of javaCC.  You find out soon enough when
> > run ant, but would be better to have it mentioned up front.
> 
>      Hm, this was something that Doug specifically said to leave out
> of the readme.  At the time, javaCC was included in the lucene lib
> directory.

In which case I might have built lucene without even knowing
that javaCC existed, which would have been fine.  Now I need
to know!


> > Also I couldn't get the .ant.properties method mentioned in
> > build.xml to work (probably finger trouble) but copying javaCC.zip
> > to the lucene-1.2-rc3-src/lib/ directory worked fine.
> 
>      Can you clarify what problems you had with build.properties?

$ pwd
/work/lucene-1.2-rc3-src
$ cat .ant.properties
javacc.home=/work/javacc2.1/bin/lib 
$ ls  /work/javacc2.1/bin/lib/JavaCC.zip
/work/javacc2.1/bin/lib/JavaCC.zip 
$ ant
Buildfile: build.xml

init:

javacc_check:
     [echo]
      ##################################################################
      JavaCC not found.
      JavaCC Home: ./
      JavaCC Zip: .//lib/JavaCC.zip

      Please download and install JavaCC 2.0 from:

      <http://www.webgain.com/products/metamata/java_doc.html>

      Then, create a .ant.properties file either in your home
      directory, or within the Lucene directory and set the javacc.home
      property to the path where JavaCC.zip is located. For example,
      if you installed JavaCC in /usr/local/java/javacc2.0, then set the
      javacc.home property to:

      javacc.home=/usr/local/java/javacc2.0/bin/lib

      If you get an error like the one below, then you have not installed
      things correctly. Please check all your paths and try again.

      java.lang.NoClassDefFoundError: COM/sun/labs/javacc/Main
      ##################################################################

$ cp .ant.properties ~/
$ ant
[no change from above]
$ cp /work/javacc2.1/bin/lib/JavaCC.zip lib/
$ ant
Buildfile: build.xml
 
init:
 
javacc_check:
 
compile:
 
jar:
 
BUILD SUCCESSFUL


So perhaps it wasn't finger trouble but something else.

Still being picky about versions I didn't notice last week
that build.xml said to install JavaCC 2.0 whereas I seem to
have picked up version 2.1.  Probably just grabbed the
current version.  Very minor point certainly, but perhaps a
simple change now might avoid some confusion or questions
later on.



--
Ian.

--
To unsubscribe, e-mail:   <mailto:lucene-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-user-help@jakarta.apache.org>


Mime
View raw message