You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Erik Hatcher <li...@ehatchersolutions.com> on 2002/07/10 13:04:22 UTC

Ant task

I've finally found some time to get the task I've built for Ant committed to
the jakarta-lucene-sandbox area.  Its under projects/ant.

Its definitely in need of some refactoring and critique by more
knowledgeable Lucene API folks in order to make it a truly great thing.  My
use case: create an index of documentation (mostly consisting of HTML
files - Ant's own documentation, in fact) at build time and bundle the index
with a distribution (a WAR in my case). It worked beautifully for my use
case, and very rapidly scans a directory and only indexes new documents when
indexing incrementally.

Syntax:

    <index index="${index.dir}"
           overwrite="true" mergeFactor="20"

documentHandler="org.apache.lucene.ant.FileExtensionDocumentHandler">
      <fileset dir="${docs.dir}"/>
    </index>

overwrite, mergeFactor, and documentHandler are optional.  The default
(shown) document handler simply delegates to an appropriate class depending
on the extension (only .txt and .html supported currently).

I'll eventually get around to adding documentation for this and assisting in
folks making it more generically useful for other extensions or creating
some other type of document handler.  This could even evolve or spawn
another Ant task for crawling sites at build time to index - at least having
a crawler launched from an Ant build file would be a good way to launch
rather than running java with some arguments.

Feedback, criticism, suggestions - all welcome!

    Erik




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Ant task

Posted by Erik Hatcher <li...@ehatchersolutions.com>.
Ok, its been relocated to contributions/ant in the the sandbox, and the
<jar> task fixed to work with pre-Ant 1.5 (sorry, I'm always running a
self-built latest greatest version of Ant :)


----- Original Message -----
From: "Erik Hatcher" <li...@ehatchersolutions.com>
To: "Lucene Users List" <lu...@jakarta.apache.org>
Sent: Wednesday, July 10, 2002 8:56 PM
Subject: Re: Ant <index> task


> Oops... yes.  Although to be backwards compatible I'll change it to be
> jarfile.
>
> I'll relocate it to contributions/ant too, per Otis' request.
>
> ----- Original Message -----
> From: "Otis Gospodnetic" <ot...@yahoo.com>
> To: "Lucene Users List" <lu...@jakarta.apache.org>
> Sent: Wednesday, July 10, 2002 11:09 AM
> Subject: Re: Ant <index> task
>
>
> > Erik,
> >
> > Does this require the latest and greatest Ant 1.5*?  I've got 1.4.1.
> >
> > BUILD FAILED
> >
> >
>
/home/otis/cvs-repositories/jakarta/jakarta-lucene-sandbox/projects/ant/buil
> d.xml:72:
> > The <jar> task doesn't support the "destfile" attribute.
> >
> > Thanks,
> > Otis
> >
> >
> > --- Erik Hatcher <li...@ehatchersolutions.com> wrote:
> > > I've finally found some time to get the task I've built for Ant
> > > committed to
> > > the jakarta-lucene-sandbox area.  Its under projects/ant.
> > >
> > > Its definitely in need of some refactoring and critique by more
> > > knowledgeable Lucene API folks in order to make it a truly great
> > > thing.  My
> > > use case: create an index of documentation (mostly consisting of HTML
> > > files - Ant's own documentation, in fact) at build time and bundle
> > > the index
> > > with a distribution (a WAR in my case). It worked beautifully for my
> > > use
> > > case, and very rapidly scans a directory and only indexes new
> > > documents when
> > > indexing incrementally.
> > >
> > > Syntax:
> > >
> > >     <index index="${index.dir}"
> > >            overwrite="true" mergeFactor="20"
> > >
> > > documentHandler="org.apache.lucene.ant.FileExtensionDocumentHandler">
> > >       <fileset dir="${docs.dir}"/>
> > >     </index>
> > >
> > > overwrite, mergeFactor, and documentHandler are optional.  The
> > > default
> > > (shown) document handler simply delegates to an appropriate class
> > > depending
> > > on the extension (only .txt and .html supported currently).
> > >
> > > I'll eventually get around to adding documentation for this and
> > > assisting in
> > > folks making it more generically useful for other extensions or
> > > creating
> > > some other type of document handler.  This could even evolve or spawn
> > > another Ant task for crawling sites at build time to index - at least
> > > having
> > > a crawler launched from an Ant build file would be a good way to
> > > launch
> > > rather than running java with some arguments.
> > >
> > > Feedback, criticism, suggestions - all welcome!
> > >
> > >     Erik
> > >
> > >
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> > > <ma...@jakarta.apache.org>
> > > For additional commands, e-mail:
> > > <ma...@jakarta.apache.org>
> > >
> >
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Sign up for SBC Yahoo! Dial - First Month Free
> > http://sbc.yahoo.com
> >
> > --
> > To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> > For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> >
> >
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Ant task

Posted by Erik Hatcher <li...@ehatchersolutions.com>.
Oops... yes.  Although to be backwards compatible I'll change it to be
jarfile.

I'll relocate it to contributions/ant too, per Otis' request.

----- Original Message -----
From: "Otis Gospodnetic" <ot...@yahoo.com>
To: "Lucene Users List" <lu...@jakarta.apache.org>
Sent: Wednesday, July 10, 2002 11:09 AM
Subject: Re: Ant <index> task


> Erik,
>
> Does this require the latest and greatest Ant 1.5*?  I've got 1.4.1.
>
> BUILD FAILED
>
>
/home/otis/cvs-repositories/jakarta/jakarta-lucene-sandbox/projects/ant/buil
d.xml:72:
> The <jar> task doesn't support the "destfile" attribute.
>
> Thanks,
> Otis
>
>
> --- Erik Hatcher <li...@ehatchersolutions.com> wrote:
> > I've finally found some time to get the task I've built for Ant
> > committed to
> > the jakarta-lucene-sandbox area.  Its under projects/ant.
> >
> > Its definitely in need of some refactoring and critique by more
> > knowledgeable Lucene API folks in order to make it a truly great
> > thing.  My
> > use case: create an index of documentation (mostly consisting of HTML
> > files - Ant's own documentation, in fact) at build time and bundle
> > the index
> > with a distribution (a WAR in my case). It worked beautifully for my
> > use
> > case, and very rapidly scans a directory and only indexes new
> > documents when
> > indexing incrementally.
> >
> > Syntax:
> >
> >     <index index="${index.dir}"
> >            overwrite="true" mergeFactor="20"
> >
> > documentHandler="org.apache.lucene.ant.FileExtensionDocumentHandler">
> >       <fileset dir="${docs.dir}"/>
> >     </index>
> >
> > overwrite, mergeFactor, and documentHandler are optional.  The
> > default
> > (shown) document handler simply delegates to an appropriate class
> > depending
> > on the extension (only .txt and .html supported currently).
> >
> > I'll eventually get around to adding documentation for this and
> > assisting in
> > folks making it more generically useful for other extensions or
> > creating
> > some other type of document handler.  This could even evolve or spawn
> > another Ant task for crawling sites at build time to index - at least
> > having
> > a crawler launched from an Ant build file would be a good way to
> > launch
> > rather than running java with some arguments.
> >
> > Feedback, criticism, suggestions - all welcome!
> >
> >     Erik
> >
> >
> >
> >
> > --
> > To unsubscribe, e-mail:
> > <ma...@jakarta.apache.org>
> > For additional commands, e-mail:
> > <ma...@jakarta.apache.org>
> >
>
>
> __________________________________________________
> Do You Yahoo!?
> Sign up for SBC Yahoo! Dial - First Month Free
> http://sbc.yahoo.com
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Ant task

Posted by Otis Gospodnetic <ot...@yahoo.com>.
Erik,

Does this require the latest and greatest Ant 1.5*?  I've got 1.4.1.

BUILD FAILED

/home/otis/cvs-repositories/jakarta/jakarta-lucene-sandbox/projects/ant/build.xml:72:
The <jar> task doesn't support the "destfile" attribute.

Thanks,
Otis


--- Erik Hatcher <li...@ehatchersolutions.com> wrote:
> I've finally found some time to get the task I've built for Ant
> committed to
> the jakarta-lucene-sandbox area.  Its under projects/ant.
> 
> Its definitely in need of some refactoring and critique by more
> knowledgeable Lucene API folks in order to make it a truly great
> thing.  My
> use case: create an index of documentation (mostly consisting of HTML
> files - Ant's own documentation, in fact) at build time and bundle
> the index
> with a distribution (a WAR in my case). It worked beautifully for my
> use
> case, and very rapidly scans a directory and only indexes new
> documents when
> indexing incrementally.
> 
> Syntax:
> 
>     <index index="${index.dir}"
>            overwrite="true" mergeFactor="20"
> 
> documentHandler="org.apache.lucene.ant.FileExtensionDocumentHandler">
>       <fileset dir="${docs.dir}"/>
>     </index>
> 
> overwrite, mergeFactor, and documentHandler are optional.  The
> default
> (shown) document handler simply delegates to an appropriate class
> depending
> on the extension (only .txt and .html supported currently).
> 
> I'll eventually get around to adding documentation for this and
> assisting in
> folks making it more generically useful for other extensions or
> creating
> some other type of document handler.  This could even evolve or spawn
> another Ant task for crawling sites at build time to index - at least
> having
> a crawler launched from an Ant build file would be a good way to
> launch
> rather than running java with some arguments.
> 
> Feedback, criticism, suggestions - all welcome!
> 
>     Erik
> 
> 
> 
> 
> --
> To unsubscribe, e-mail:  
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> 


__________________________________________________
Do You Yahoo!?
Sign up for SBC Yahoo! Dial - First Month Free
http://sbc.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>