lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Otis Gospodnetic <otis_gospodne...@yahoo.com>
Subject RE: [build.xml] Lucene Ant building and Eclipse.
Date Wed, 16 Apr 2003 05:21:54 GMT
Hello Gregor,

I don't use Eclipse, so I can't tell whether there is a workaround that
is possible with Eclipse or not.  However, I do recall that directories
like the 'bin' directory that you mention _can_ be renamed in Eclipse. 
Lucene's build.xml happens to use a directory called bin that seems to
conflict with Eclipse's default settings, but can't you change the name
of bin directory in Eclipse to something else?

If this is not possible, I would like to try your patch.  If it doesn't
break non-Eclipse builds we could patch build.xml.  However, I cannot
apply the patch you sent.
Could you please do cvs diff -u build.xml > build.xml.patch and then
attach build.xml.patch?  The same for default.properties.

Oh, I just looked at default.properties.  Have you tried just changing
build.dir in your copy of default.properties of your own
build.properties to point to a different directory?

Thanks,
Otis


--- Gregor Heinrich <heinrich@igd.fhg.de> wrote:
> Hi Eric,
> 
> please find the patches for build.xml and default.properties below.
> (I
> didn't bother to make a build.properties because I changed the
> build.xml,
> anyway, and  at this point don't distribute sources. The *.0 args to
> diff(3)
> are the ones from Apache CVS synced today).
> 
> BTW, out of curiousity, I just tested the Russian analyzer tests and
> ran a
> couple of other tests from Eclipse. It works fine with my
> installation. Did
> you try the latest version of the distribution (1.3rc2-dev)? And
> Eclipse
> (2.1 final)?
> 
> (The Ant "test-unit" target doesn't create reports, though. Did I
> oversee
> something?)
> 
> Ciao, 
> 
> Gregor
> 
> ===========================================================
> diff build.xml.0 build.xml > build.xml.diff
> =8<========================================================
> 
> 226a227,254
> >   <!-- B U I L D  P A R S E R S
> -->
> >   <!--
> ==================================================================
> -->
> >   <!--  added by gregh to work with Eclipse
> -->
> >   <!--
> ==================================================================
> -->
> >   <target name="generate-parser-src" depends="init"
> if="javacc.present">
> >     <mkdir dir="${build.src}/org/apache/lucene/analysis/standard"/>
> >     <javacc
> >
>
target="${src.dir}/org/apache/lucene/analysis/standard/StandardTokenizer.jj"
> >       javacchome="${javacc.zip.dir}"
> >      
> outputdirectory="${build.src}/org/apache/lucene/analysis/standard"
> >     />
> >     <delete
>
file="${build.src}/org/apache/lucene/analysis/standard/ParseException.java"/
> >
> >     <mkdir dir="${build.src}/org/apache/lucene/queryParser"/>
> >     <javacc
> >      
> target="${src.dir}/org/apache/lucene/queryParser/QueryParser.jj"
> >       javacchome="${javacc.zip.dir}"
> >       outputdirectory="${build.src}/org/apache/lucene/queryParser"
> >     />
> >     <mkdir dir="${build.demo.src}/org/apache/lucene/demo" />
> >     <mkdir dir="${build.demo.src}/org/apache/lucene/demo/html" />
> >     <javacc
> >      
> target="${demo.src}/org/apache/lucene/demo/html/HTMLParser.jj"
> >       javacchome="${javacc.zip.dir}"
> >      
> outputdirectory="${build.demo.src}/org/apache/lucene/demo/html"
> >     />
> >   </target>
> >   
> >   <!--
> ==================================================================
> -->
> 232,241c260,261
> <     <mkdir dir="${build.demo}"/>
> <     <mkdir dir="${build.demo.src}" />
> < 
> <     <copy todir="${build.demo.src}">
> <       <fileset dir="${demo.src}">
> <         <include name="**/*.java"/>
> <         <include name="**/*.jj"/>
> <       </fileset>
> <     </copy>
> < 
> ---
> >     <mkdir dir="${build.demo.src}/org/apache/lucene/demo" />
> >     <mkdir dir="${build.demo.src}/org/apache/lucene/demo/html" />
> 243c263
> <      
> target="${build.demo.src}/org/apache/lucene/demo/html/HTMLParser.jj"
> ---
> >      
> target="${demo.src}/org/apache/lucene/demo/html/HTMLParser.jj"
> 246a267
> >     <mkdir dir="${build.demo}"/>
> 248d268
> < 
> 251c271
> <       srcdir="${build.demo.src}"
> ---
> >       srcdir="${build.demo.src}:${demo.src}"
> 567a588
> >     <delete dir="${src.build.dir}"/>
> 
> =>8========================================================
> 
> 
> ===========================================================
> diff default.properties.0 default.properties >
> default.properties.diff
> =8<========================================================
> 
> 19a20
> > src.build.dir = ./src/build
> 39c40
> < build.src = ${build.dir}/src
> ---
> > build.src = ${src.build.dir}/java
> 44c45
> < build.demo.src = ${build.demo}/src
> ---
> > build.demo.src = ${src.build.dir}/demo
> 
> =>8========================================================
> 
> 
> 
> -----Original Message-----
> From: Eric Isakson [mailto:Eric.Isakson@sas.com]
> Sent: Friday, April 11, 2003 7:57 PM
> To: Lucene Developers List
> Subject: RE: [build.xml] Lucene Ant building and Eclipse.
> 
> 
> Gregor,
> 
> Could you do right click on your lucene eclipse project and do
> Team->Create
> Patch and attach a patch file to a post to this list?
> 
> I've been working around this for a while and hadn't gotten around to
> proposing anything to "fix" it. You also have to make a few tweaks to
> get
> the unit tests to run under Eclipse and I noticed that the Russian
> tests
> fail under Eclipse but don't fail if I run from the command line
> (probably
> an encoding problem somewhere in my Eclipse setup).
> 
> Thanks,
> Eric
> 
> -----Original Message-----
> From: Gregor Heinrich [mailto:heinrich@igd.fhg.de] 
> Sent: Friday, April 11, 2003 1:43 PM
> To: lucene-dev@jakarta.apache.org
> Cc: Heinrich, Gregor
> Subject: [build.xml] Lucene Ant building and Eclipse.
> 
> 
> Hi there,
> 
> I am building Lucene 1.3-rc2dev using Eclipse for partial builds and
> Ant
> scipts for (1) full builds and (2) to create parsers. This turned out
> to be
> very convenient.
> 
> However, there have to be some minor changes made to the Lucene
> distribution
> structure and build scripts in order seamlessly work with this
> "hybrid"
> approach. I wonder if this isn't also interesting for future
> distributions
> of Lucene because I don't see any disadvantages in the modified
> structure if
> someone uses Ant exclusively.
> 
> This posting is to suggest changes or find out I'm wrong from someone
> more
> experienced...
> 
> So here the facts:
> 
> The way the distributed build.xml is done and Eclipse (R2.1final)
> works
> causes two conflicts:
> 
> 1 - Eclipse does not accept any source folder below
> ${project_root}/bin.
> (Source folders are automatically synchronised with Output folders by
> Eclipse's project builder.)
> 
> 2 - The Ant target "demo" copies the java javaCC sources completely
> to the
> ${proj_root}/bin/src and builds the demo app from there. I didn't
> understand
> why it is necessary to create duplicate files in the build structure,
> and
> Eclipse complains about exactly these duplications (any other IDE
> would
> probably).
> 
> The solution I suggest is (with respect to above items):
> 
> 1 - Keep the built sources (generated parsers) in a directory outside
> the
> build directory tree, e.g., in ${project_root}/src/build/java and
> ${project_root}/src/build/demo (for the two parsers generated).
> 
> 2 - Adjust the build.xml to generate the parsers in place, i.e., from
> the
> original source directories. The snippet for javacc in the "demo"
> target
> would then be:
> 
>     <mkdir dir="${build.demo.src}/org/apache/lucene/demo" />
>     <mkdir dir="${build.demo.src}/org/apache/lucene/demo/html" />
>     <javacc
>       target="${demo.src}/org/apache/lucene/demo/html/HTMLParser.jj"
>       javacchome="${javacc.zip.dir}"
>       outputdirectory="${build.demo.src}/org/apache/lucene/demo/html"
>     />
> 
> So, an already long debut on this list for me. But maybe it helps
> some of
> us.
> 
> Cheers,
> 
> Gregor
> 
> 
> p.s. If anyone is interested in the complete setup, I am happy to
> share the
> modified build.xml and default.properties or the complete Eclipse
> project.
> 
> p.p.s. Actually, there's also a javaCC plugin for Eclipse, but Ant
> building
> seems just more convenient.
> 
> Dipl.-Ing. Gregor Heinrich
> Fraunhofer Institut für Graphische Datenverarbeitung
> Fraunhoferstrasse 5
> 64283 Darmstadt Germany
> Tel: ++49.6151.155x209
> Fax: ++49.6151.155x559
> PGP: public key on request.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-dev-help@jakarta.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-dev-help@jakarta.apache.org
> 
> >
---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-dev-help@jakarta.apache.org


__________________________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo
http://search.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-dev-help@jakarta.apache.org


Mime
View raw message