You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by eh...@apache.org on 2004/01/05 08:09:42 UTC
cvs commit: jakarta-lucene-sandbox/contributions/ant build.xml
ehatcher 2004/01/04 23:09:42
Modified: contributions/ant build.xml
Added: contributions build.xml common.xml
Log:
work in progress... creating infrastructure to build the sandbox in one go
Revision Changes Path
1.1 jakarta-lucene-sandbox/contributions/build.xml
Index: build.xml
===================================================================
<project name="sandbox" default="build-tree">
<target name="build-tree">
<subant target="">
<fileset dir="." includes="*/build.xml" excludes="./build.xml"/>
</subant>
</target>
</project>
1.1 jakarta-lucene-sandbox/contributions/common.xml
Index: common.xml
===================================================================
<?xml version="1.0"?>
<project name="common">
<property name="build.dir" location="build"/>
<property name="build.classes.dir" location="${build.dir}/classes"/>
<property name="test.dir" location="${build.dir}/test"/>
<property name="test.classes.dir" location="${test.dir}/classes"/>
<property name="dist.dir" location="dist"/>
<property name="junit.jar" location="${ant.home}/lib/junit.jar"/>
<dirname file="${ant.file.common}" property="common.dir"/>
<property name="lucene.dir" location="${common.dir}/../../jakarta-lucene"/>
<property name="build.debug" value="true"/>
<property name="junit.fork" value="true"/>
<!-- ========================================================== -->
<!-- Datatype declarations -->
<!-- ========================================================== -->
<path id="compile.classpath">
<fileset dir="${lucene.dir}" includes="build/lucene*.jar"/>
<pathelement path="${project.classpath}"/>
</path>
<path id="test.classpath">
<path refid="compile.classpath"/>
<pathelement location="${junit.jar}"/>
<pathelement location="${build.classes.dir}"/>
<pathelement location="${test.classes.dir}"/>
</path>
<target name="init">
<echo message="Building ${ant.project.name}"/>
<tstamp/>
<mkdir dir="${build.dir}"/>
<mkdir dir="${build.classes.dir}"/>
<mkdir dir="${dist.dir}"/>
<mkdir dir="${test.dir}"/>
<mkdir dir="${test.classes.dir}"/>
<echoproperties/>
</target>
<target name="clean"
description="Deletes all previous build artifacts">
<delete dir="${build.dir}"/>
<delete dir="${build.classes.dir}"/>
<delete dir="${dist.dir}"/>
<delete dir="${test.dir}"/>
<delete dir="${test.classes.dir}"/>
</target>
<target name="dist" depends="compile"
description="Create JAR">
<jar jarfile="${lucene-ant.jar}"
basedir="${build.classes.dir}"
/>
</target>
<target name="compile" depends="init">
<javac destdir="${build.classes.dir}"
debug="${build.debug}"
includeAntRuntime="yes"
deprecation="true"
srcdir="src/main"
classpathref="compile.classpath"
/>
</target>
<target name="test-compile" depends="compile">
<javac destdir="${test.classes.dir}"
debug="${build.debug}"
includeAntRuntime="yes"
srcdir="src/test"
classpathref="test.classpath"
/>
<copy todir="${test.classes.dir}">
<fileset dir="src/test" excludes="**/*.java"/>
</copy>
</target>
<target name="test" depends="test-compile">
<junit printsummary="no"
errorProperty="test.failed"
failureProperty="test.failed"
fork="${junit.fork}">
<classpath refid="test.classpath"/>
<sysproperty key="docs.dir" file="${test.classes.dir}"/>
<sysproperty key="index.dir" file="${test.dir}/index"/>
<formatter type="brief" usefile="false"/>
<test name="${testcase}" if="testcase"/>
<batchtest todir="${test.data.dir}" unless="testcase">
<fileset dir="${test.classes.dir}"
includes="**/*Test.class"
/>
</batchtest>
</junit>
<fail if="test.failed">
Unit tests failed. Check log or reports for details
</fail>
</target>
<target name="default" depends="test"/>
</project>
1.2 +7 -108 jakarta-lucene-sandbox/contributions/ant/build.xml
Index: build.xml
===================================================================
RCS file: /home/cvs/jakarta-lucene-sandbox/contributions/ant/build.xml,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- build.xml 11 Jul 2002 01:12:56 -0000 1.1
+++ build.xml 5 Jan 2004 07:09:42 -0000 1.2
@@ -6,116 +6,15 @@
Lucene Ant integration
</description>
- <property name="build.dir" location="build"/>
- <property name="build.classes.dir" location="${build.dir}/classes"/>
- <property name="test.dir" location="${build.dir}/test"/>
- <property name="test.classes.dir" location="${test.dir}/classes"/>
- <property name="dist.dir" location="dist"/>
- <property name="lucene-ant.jar" location="${dist.dir}/lucene-ant.jar"/>
-
- <property name="jtidy.jar" location="lib/Tidy.jar"/>
- <property name="junit.jar" location="${ant.home}/lib/junit.jar"/>
- <property name="lucene.bin.dir" location="../../../jakarta-lucene/bin"/>
-
- <property name="build.debug" value="true"/>
- <property name="junit.fork" value="true"/>
-
- <!-- ========================================================== -->
- <!-- Datatype declarations -->
- <!-- ========================================================== -->
- <path id="compile.classpath">
- <fileset dir="${lucene.bin.dir}" includes="lucene*.jar"/>
- <pathelement location="${jtidy.jar}"/>
- </path>
-
- <path id="test.classpath">
- <path refid="compile.classpath"/>
- <pathelement location="${junit.jar}"/>
- <pathelement location="${build.classes.dir}"/>
- <pathelement location="${test.classes.dir}"/>
+ <path id="additional.dependencies">
+ <!-- TODO: make ${tidy.jar} property -->
+ <pathelement location="lib/Tidy.jar"/>
</path>
-
- <target name="default" depends="test,dist"
- description="build everything"
+ <pathconvert property="project.classpath"
+ targetos="unix"
+ refid="additional.dependencies"
/>
- <target name="init">
- <echo message="Building ${ant.project.name}"/>
- <tstamp/>
-
- <mkdir dir="${build.dir}"/>
- <mkdir dir="${build.classes.dir}"/>
- <mkdir dir="${dist.dir}"/>
-
- <mkdir dir="${test.dir}"/>
- <mkdir dir="${test.classes.dir}"/>
- </target>
-
- <target name="clean"
- description="Deletes all previous build artifacts">
- <delete dir="${build.dir}"/>
- <delete dir="${build.classes.dir}"/>
- <delete dir="${dist.dir}"/>
-
- <delete dir="${test.dir}"/>
- <delete dir="${test.classes.dir}"/>
- </target>
-
- <target name="dist" depends="compile"
- description="Create JAR">
- <echo file="${build.classes.dir}/taskdef.properties">
- index=org.apache.lucene.ant.IndexTask
- </echo>
- <jar jarfile="${lucene-ant.jar}"
- basedir="${build.classes.dir}"
- />
- </target>
-
- <target name="compile" depends="init">
- <javac destdir="${build.classes.dir}"
- debug="${build.debug}"
- includeAntRuntime="yes"
- srcdir="src/main"
- classpathref="compile.classpath"
- />
- </target>
-
- <target name="test-compile" depends="compile">
- <javac destdir="${test.classes.dir}"
- debug="${build.debug}"
- includeAntRuntime="yes"
- srcdir="src/test"
- classpathref="test.classpath"
- />
-
- <copy todir="${test.classes.dir}">
- <fileset dir="src/test" excludes="**/*.java"/>
- </copy>
- </target>
-
- <target name="test" depends="test-compile">
- <junit printsummary="no"
- errorProperty="test.failed"
- failureProperty="test.failed"
- fork="${junit.fork}">
- <classpath refid="test.classpath"/>
- <sysproperty key="docs.dir" file="${test.classes.dir}"/>
- <sysproperty key="index.dir" file="${test.dir}/index"/>
- <formatter type="brief" usefile="false"/>
- <test name="${testcase}" if="testcase"/>
- <batchtest todir="${test.data.dir}" unless="testcase">
- <fileset dir="${test.classes.dir}"
- includes="**/*Test.class"
- />
- </batchtest>
- </junit>
-
- <fail if="test.failed">
- Unit tests failed. Check log or reports for details
- </fail>
-
- </target>
-
-
+ <import file="../common.xml"/>
</project>
---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-dev-help@jakarta.apache.org