Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Lucene: Java-Dev

cvs commit: jakarta-lucene-sandbox/contributions/searchbean build.xml

 

 

Lucene java-dev RSS feed   Index | Next | Previous | View Threaded


carlson at apache

May 22, 2002, 5:44 PM

Post #1 of 4 (118 views)
Permalink
cvs commit: jakarta-lucene-sandbox/contributions/searchbean build.xml

carlson 02/05/22 17:44:44

Added: contributions/searchbean build.xml
Log:
Initial submit of SerachBean and related classes

Revision Changes Path
1.1 jakarta-lucene-sandbox/contributions/searchbean/build.xml

Index: build.xml
===================================================================
<?xml version="1.0"?>

<project name="SearchBean" default="jar" basedir=".">

<!-- Give user a chance to override without editing this file
(and without typing -D each time it compiles it -->
<property file="${user.home}/lucene.build.properties" />
<property file="${user.home}/build.properties" />
<property file="${basedir}/build.properties" />
<property file="${basedir}/default.properties" />

<!-- Build classpath -->
<path id="classpath">
<pathelement location="${build.classes}"/>
<pathelement location="${build.test.classes}"/>
<pathelement location="."/>
<fileset dir="lib">
<include name="*.jar" />
</fileset>
</path>

<path id="junit.classpath">
<pathelement location="${junit.classes}" />
<pathelement location="${build.classes}"/>
<fileset dir="lib">
<include name="*.jar" />
</fileset>
<pathelement path="${java.class.path}" />
</path>

<!-- ================================================================== -->
<!-- Prepares the build directory -->
<!-- ================================================================== -->
<target name="init">
<mkdir dir="${build.dir}"/>
<mkdir dir="${build.classes}"/>
<mkdir dir="${build.src}"/>

<available
property="junit.present"
classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTask"
/>
</target>



<!-- ================================================================== -->
<!-- C O M P I L E -->
<!-- ================================================================== -->
<!-- -->
<!-- ================================================================== -->
<target name="compile" depends="init" >

<javac
encoding="${build.encoding}"
srcdir="${src.dir}"
includes="org/**/*.java"
destdir="${build.classes}"
debug="${debug}">
<classpath refid="classpath"/>
</javac>
</target>

<!-- ================================================================== -->
<!-- J A R -->
<!-- ================================================================== -->
<!-- -->
<!-- ================================================================== -->
<target name="jar" depends="compile" >
<jar
jarfile="${build.dir}/${final.name}.jar"
basedir="${build.classes}"
excludes="**/*.java"
/>
</target>


<!-- ================================================================== -->
<!-- J A R S O U R C E -->
<!-- ================================================================== -->
<!-- -->
<!-- ================================================================== -->
<target name="jar-src" depends="init">
<jar jarfile="${build.dir}/${final.name}-src.jar">
<fileset dir="${build.dir}" includes="**/*.java"/>
</jar>
</target>


<!-- ================================================================== -->
<!-- B U I L D T E S T -->
<!-- ================================================================== -->
<!-- -->
<!-- ================================================================== -->
<target name="test" depends="compile">
<mkdir dir="${build.test}"/>

<copy todir="${build.test.src}">
<fileset dir="${test.src}">
<include name="**/*.java"/>
</fileset>
</copy>

<mkdir dir="${build.test.classes}"/>

<javac
encoding="${build.encoding}"
srcdir="${build.test.src}"
includes="**/*.java"
destdir="${build.test.classes}"
debug="${debug}">
<classpath refid="classpath"/>
</javac>
</target>

<!-- ================================================================== -->
<!-- R U N T E S T S -->
<!-- ================================================================== -->
<!-- -->
<!-- ================================================================== -->
<target name="test-unit" depends="compile,test" if="junit.present">
<!-- Import JUnit task -->
<taskdef
name="junit"
classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTask"
/>

<mkdir dir="${junit.classes}"/>
<mkdir dir="${junit.reports}"/>
<javac
encoding="${build.encoding}"
srcdir="${junit.src}"
includes="**/*.java"
destdir="${junit.classes}"
debug="${debug}">
<classpath refid="classpath"/>
</javac>

<junit printsummary="yes" haltonfailure="no" >
<classpath refid="junit.classpath"/>
<formatter type="plain" />
<batchtest fork="yes" todir="${junit.reports}">
<fileset dir="${junit.src}" includes="**/Test*.java" />
</batchtest>
</junit>
</target>

<!-- ================================================================== -->
<!-- J A V A D O C -->
<!-- ================================================================== -->
<!-- -->
<!-- ================================================================== -->
<target name="javadocs" depends="compile" >
<mkdir dir="${build.javadocs}"/>
<javadoc
sourcepath="${src.dir}"
overview="${src.dir}/overview.html"
packagenames="${packages}"
destdir="${build.javadocs}"
author="true"
version="true"
use="true"
link="${javadoc.link}"
windowtitle="${Name} ${version} API"
doctitle="${Name} ${version} API"
bottom="Copyright &amp;copy; ${year} Apache Software Foundation. All Rights Reserved."
>
<classpath refid="classpath"/>
</javadoc>
</target>

<!-- ================================================================== -->
<!-- D I S T R I B U T I O N -->
<!-- ================================================================== -->
<!-- -->
<!-- ================================================================== -->
<target name="package" depends="jar, javadocs">
<mkdir dir="${dist.dir}"/>
<mkdir dir="${dist.dir}/docs"/>
<mkdir dir="${dist.dir}/docs/api"/>
<mkdir dir="${dist.dir}/src/jsp"/>

<copy todir="${dist.dir}/docs">
<fileset dir="${docs.dir}"/>
</copy>
<copy todir="${dist.dir}/docs/api">
<fileset dir="${build.javadocs}"/>
</copy>

<copy todir="${dist.dir}/src/jsp">
<fileset dir="src/jsp"/>
</copy>
<copy todir="${dist.dir}/lib">
<fileset dir="lib"/>
</copy>
<copy todir="${dist.dir}">
<fileset dir=".">
<include name="*.txt" />
</fileset>
</copy>
<copy file="${build.dir}/${final.name}.jar" todir="${dist.dir}"/>
</target>

<!-- ================================================================== -->
<!-- Packages the distribution with zip -->
<!-- ================================================================== -->
<!-- -->
<!-- ================================================================== -->
<target name="package-zip" depends="package"
description="--> Generates the SearchBean distribution as .zip">

<delete file="${basedir}/${final.name}.zip"/>
<zip
zipfile="${basedir}/${final.name}.zip"
basedir="${basedir}/"
includes="**/${final.name}/**"
/>
</target>

<!-- ================================================================== -->
<!-- packages the distribution with tar-gzip -->
<!-- ================================================================== -->
<!-- -->
<!-- ================================================================== -->
<target name="package-tgz" depends="package"
description="--> generates the SearchBean distribution as .tar.gz">

<delete file="${basedir}/${final.name}.tar"/>
<delete file="${basedir}/${final.name}.tar.gz"/>
<tar
tarfile="${basedir}/${final.name}.tar"
basedir="${basedir}/"
includes="**/${final.name}/**"
/>

<gzip
zipfile="${basedir}/${final.name}.tar.gz"
src="${basedir}/${final.name}.tar"
/>
</target>

<!-- ================================================================== -->
<!-- packages the distribution with zip and tar-gzip -->
<!-- ================================================================== -->
<!-- -->
<!-- ================================================================== -->
<target name="package-all" depends="package-zip, package-tgz"
description="--> generates the .tar.gz and .zip distributions">
</target>

<!-- ================================================================== -->
<!-- same as package-all. it is just here for compatibility. -->
<!-- ================================================================== -->
<!-- -->
<!-- ================================================================== -->
<target name="dist" depends="package-all">
</target>

<!-- ================================================================== -->
<!-- S O U R C E D I S T R I B U T I O N -->
<!-- ================================================================== -->
<!-- -->
<!-- ================================================================== -->
<target name="package-src" depends="jar-src">
<mkdir dir="${dist-src.dir}"/>
<copy todir="${dist-src.dir}/src">
<fileset dir="src"/>
</copy>
<copy todir="${dist-src.dir}/lib">
<fileset dir="lib"/>
</copy>
<copy todir="${dist-src.dir}/" file="build.xml"/>
<copy todir="${dist-src.dir}/" file="default.properties"/>
<copy todir="${dist-src.dir}">
<fileset dir=".">
<include name="*.txt" />
</fileset>
</copy>
<copy file="${build.dir}/${final.name}-src.jar" todir="${dist-src.dir}"/>
</target>

<!-- ================================================================== -->
<!-- Packages the sources with zip -->
<!-- ================================================================== -->
<!-- -->
<!-- ================================================================== -->
<target name="package-zip-src" depends="package-src"
description="--> Generates the SearchBean sources as .zip">

<delete file="${basedir}/${final.name}-src.zip"/>
<zip
zipfile="${basedir}/${final.name}-src.zip"
basedir="${basedir}/"
includes="**/${final.name}-src/**"
/>
</target>

<!-- ================================================================== -->
<!-- Packages the sources with tar-gzip -->
<!-- ================================================================== -->
<!-- -->
<!-- ================================================================== -->
<target name="package-tgz-src" depends="package-src"
description="--> Generates the SearchBean distribution as .tar.gz">

<delete file="${basedir}/${final.name}-src.tar"/>
<delete file="${basedir}/${final.name}-src.tar.gz"/>
<tar
tarfile="${basedir}/${final.name}-src.tar"
basedir="${basedir}/"
includes="**/${final.name}-src/**"
/>

<gzip
zipfile="${basedir}/${final.name}-src.tar.gz"
src="${basedir}/${final.name}-src.tar"
/>
</target>

<!-- ================================================================== -->
<!-- Packages the sources with zip and tar-gzip -->
<!-- ================================================================== -->
<!-- -->
<!-- ================================================================== -->
<target name="package-all-src" depends="package-zip-src, package-tgz-src"
description="--> Generates the .tar.gz and .zip source distributions">
</target>

<!-- ================================================================== -->
<!-- same as package-all-src. it is just here for compatibility. -->
<!-- ================================================================== -->
<!-- -->
<!-- ================================================================== -->
<target name="dist-src" depends="package-all-src">
</target>

<!-- ================================================================== -->
<!-- C L E A N -->
<!-- ================================================================== -->
<!-- -->
<!-- ================================================================== -->
<target name="clean" depends="init">
<delete dir="${build.dir}"/>
<delete dir="${dist.dir}"/>
<delete file="${basedir}/${final.name}.tar"/>
<delete file="${basedir}/${final.name}.tar.gz"/>
<delete file="${basedir}/${final.name}.zip"/>
<delete dir="${dist.dir}-src"/>
<delete file="${basedir}/${final.name}-src.tar"/>
<delete file="${basedir}/${final.name}-src.tar.gz"/>
<delete file="${basedir}/${final.name}-src.zip"/>
</target>



<!-- ================================================================== -->
<!-- Build the DocWeb app -->
<!-- ================================================================== -->
<target name="docweb-init">
<!-- <mkdir dir="${}"/> -->
</target>

<!--
<target name="docweb-index" depends="javadocs,anttask-compile,docweb-init">
<taskdef name="index"
classname="org.apache.lucene.ant.IndexTask">
<classpath>
<pathelement location="${anttask.classes}"/>
<path refid="classpath"/>
</classpath>
</taskdef>

<index index="${build.docweb}/index"
overwrite="false">
<fileset dir="${docs.dir}"/>
<fileset dir="${build.javadocs}"/>
</index>

</target>

<target name="docweb-war" depends="jar,jardemo,docweb-index">
<war warfile="${build.docweb}/${build.docweb.war.name}.war"
webxml="${demo.jsp}/WEB-INF/web.xml">
<fileset dir="${demo.jsp}" excludes="WEB-INF/"/>
<lib dir="${build.demo}" includes="*.jar"/>
<lib dir="${build.dir}" includes="*.jar"/>
<webinf dir="${build.docweb}" includes="index/"/>
</war>
</target>
-->
</project>




--
To unsubscribe, e-mail: <mailto:lucene-dev-unsubscribe [at] jakarta>
For additional commands, e-mail: <mailto:lucene-dev-help [at] jakarta>


otis_gospodnetic at yahoo

May 12, 2003, 8:15 AM

Post #2 of 4 (108 views)
Permalink
Re: cvs commit: jakarta-lucene-sandbox/contributions/searchbean build.xml [In reply to]

It should have been ${lib.dir} instead of lib.dir, that is all.
Yeah, the dir should ideally be there, but the default.properties
refers to ./lib dir, which is not in CVS.

I see somebody fixed lib.dir references, thanks.

But now lib.dir is assigned a value in build.xml after
default.properties is read, which will confuse people who define their
lib.dir in default.properties. That assignment should probably be
removed.

Otis


--- Erik Hatcher <lists [at] ehatchersolutions> wrote:
> On Sunday, May 11, 2003, at 04:55 PM, otis [at] apache wrote:
> > otis 2003/05/11 13:55:32
> >
> > Modified: contributions/searchbean build.xml
> > Log:
> > - Made the build look in the lib.dir property for *.jar files.
>
> You said "property" here. But ....
>
> > <pathelement location="${build.classes}"/>
> > <pathelement location="${build.test.classes}"/>
> > <pathelement location="."/>
> > - <fileset dir="lib">
> > + <fileset dir="lib.dir">
>
> You should have used ${lib.dir} here, right?
>
> > + <fileset dir="lib.dir">
>
> And here.
>
> > + <mkdir dir="lib.dir"/>
>
> And here! Why are you making a lib directory though? Shouldn't the
> build presume its already there (I haven't looked at the details of
> this build file though - just a general comment).
>
> Erik
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-dev-unsubscribe [at] jakarta
> For additional commands, e-mail: lucene-dev-help [at] jakarta
>


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

---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-dev-unsubscribe [at] jakarta
For additional commands, e-mail: lucene-dev-help [at] jakarta


lists at ehatchersolutions

May 12, 2003, 11:24 AM

Post #3 of 4 (111 views)
Permalink
Re: cvs commit: jakarta-lucene-sandbox/contributions/searchbean build.xml [In reply to]

On Monday, May 12, 2003, at 11:15 AM, Otis Gospodnetic wrote:
> It should have been ${lib.dir} instead of lib.dir, that is all.
> Yeah, the dir should ideally be there, but the default.properties
> refers to ./lib dir, which is not in CVS.

Ah, ok. I must have created it locally in my environment and put the
Lucene JAR there. I could check that in, but feels wrong to do so.
For now, folks will just have to do that.

Is there a better way for the contribution build files to refer to a
Lucene JAR file?

>
> I see somebody fixed lib.dir references, thanks.

That was me. I'll now remove the setting of lib.dir from build.xml - I
forgot to check default.properties, which is where it is set.


> But now lib.dir is assigned a value in build.xml after
> default.properties is read, which will confuse people who define their
> lib.dir in default.properties. That assignment should probably be
> removed.
>

done.

Those folks that are using SearchBean likely will just copy that code
into their own project anyway. We certainly could go to the effort of
making each one of these builds work as standalone units to build a JAR
file, but that would require knowledge of a Lucene JAR file location.
Can we rely on where it will be? If so, I'll adjust the build
accordingly.

Erik


---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-dev-unsubscribe [at] jakarta
For additional commands, e-mail: lucene-dev-help [at] jakarta


otis_gospodnetic at yahoo

May 12, 2003, 1:30 PM

Post #4 of 4 (106 views)
Permalink
Re: cvs commit: jakarta-lucene-sandbox/contributions/searchbean build.xml [In reply to]

--- Erik Hatcher <lists [at] ehatchersolutions> wrote:
> On Monday, May 12, 2003, at 11:15 AM, Otis Gospodnetic wrote:
> > It should have been ${lib.dir} instead of lib.dir, that is all.
> > Yeah, the dir should ideally be there, but the default.properties
> > refers to ./lib dir, which is not in CVS.
>
> Ah, ok. I must have created it locally in my environment and put the
>
> Lucene JAR there. I could check that in, but feels wrong to do so.
> For now, folks will just have to do that.
>
> Is there a better way for the contribution build files to refer to a
> Lucene JAR file?

I think lib.dir property is fine. People can copy their own lucene Jar
file in the dir pointed to by lib.dir, or symlink it, or...

Otis


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

---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-dev-unsubscribe [at] jakarta
For additional commands, e-mail: lucene-dev-help [at] jakarta

Lucene java-dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.