Using ant build script instead
This commit is contained in:
63
build.xml
Normal file
63
build.xml
Normal file
@@ -0,0 +1,63 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<project default="create_run_jar" name="Create Runnable Jar for Project CrossJeeves">
|
||||
|
||||
|
||||
<property name="src.dir" value="src" />
|
||||
<property name="testsrc.dir" value="src" />
|
||||
<property name="build.dir" value="bin" />
|
||||
<property name="test.dir" value="testbin" />
|
||||
<property name="junit.dir" value="/tool/junit4" />
|
||||
<property name="reports.dir" value="reports" />
|
||||
<property name="jar.name" value="CrossJeeves.jar" />
|
||||
|
||||
<!-- Create build directories -->
|
||||
<target name="init">
|
||||
<mkdir dir="${build.dir}" />
|
||||
<mkdir dir="${test.dir}" />
|
||||
<mkdir dir="${reports.dir}" />
|
||||
</target>
|
||||
|
||||
<!--this file was created by Eclipse Runnable JAR Export Wizard-->
|
||||
<!--ANT 1.7 is required -->
|
||||
<target name="compile" depends="init">
|
||||
<javac srcdir="${src.dir}" destdir="${build.dir}" target="1.5">
|
||||
<classpath>
|
||||
<pathelement location="${junit.dir}" />
|
||||
</classpath>
|
||||
</javac>
|
||||
</target>
|
||||
|
||||
<target name="create_run_jar" depends="compile">
|
||||
<jar destfile="${jar.name}" basedir="${build.dir}">
|
||||
<manifest file="${manifest.file}" />
|
||||
<fileset dir="${build.dir}">
|
||||
<include name="**/*.class" />
|
||||
</fileset>
|
||||
</jar>
|
||||
</target>
|
||||
|
||||
<target name="compile_tests" depends="compile">
|
||||
<javac srcdir="${testsrc.dir}" destdir="${test.dir}">
|
||||
<classpath>
|
||||
<pathelement location="${junit.dir}" />
|
||||
</classpath>
|
||||
</javac>
|
||||
</target>
|
||||
|
||||
|
||||
<target name="test" depends="compile_tests">
|
||||
<mkdir dir="reports" />
|
||||
<junit printsummary="yes" haltonfailure="no">
|
||||
<classpath>
|
||||
<pathelement location="bin" />
|
||||
<fileset dir="/tool/junit4" includes="*.jar" />
|
||||
</classpath>
|
||||
<batchtest fork="yes" todir="reports">
|
||||
<fileset dir="bin/test">
|
||||
<include name="**/*Test.class" />
|
||||
</fileset>
|
||||
</batchtest>
|
||||
<formatter type="xml" />
|
||||
</junit>
|
||||
</target>
|
||||
</project>
|
||||
Reference in New Issue
Block a user