crazyboblee | efdb6f3 | 2007-02-26 02:54:11 +0000 | [diff] [blame] | 1 | <?xml version="1.0"?> |
| 2 | |
| 3 | <project name="common"> |
| 4 | |
| 5 | <property file="build.properties"/> |
kevinb9n | 3431e20 | 2007-03-08 21:25:20 +0000 | [diff] [blame] | 6 | <property name="version" value="1.0"/> |
crazyboblee | f739015 | 2007-03-02 23:44:34 +0000 | [diff] [blame] | 7 | |
crazyboblee | efdb6f3 | 2007-02-26 02:54:11 +0000 | [diff] [blame] | 8 | <target name="compile" description="Compile Java source."> |
| 9 | <mkdir dir="${build.dir}/classes"/> |
| 10 | <javac srcdir="${src.dir}" |
| 11 | debug="on" |
| 12 | destdir="${build.dir}/classes"> |
| 13 | <classpath refid="compile.classpath"/> |
| 14 | </javac> |
| 15 | <copy toDir="${build.dir}/classes"> |
| 16 | <fileset dir="${src.dir}" excludes="**/*.java"/> |
| 17 | </copy> |
| 18 | </target> |
| 19 | |
| 20 | <target name="test.compile" |
| 21 | depends="compile" |
| 22 | description="Compile test source."> |
| 23 | <mkdir dir="${build.dir}/test"/> |
| 24 | <javac srcdir="${test.dir}" |
| 25 | debug="on" |
| 26 | destdir="${build.dir}/test"> |
| 27 | <classpath path="${build.dir}/classes"/> |
| 28 | <classpath refid="compile.classpath"/> |
| 29 | </javac> |
| 30 | <copy toDir="${build.dir}/test"> |
| 31 | <fileset dir="${test.dir}" excludes="**/*.java"/> |
| 32 | </copy> |
| 33 | </target> |
| 34 | |
| 35 | <target name="test" |
| 36 | depends="test.compile" |
| 37 | description="Execute JUnit tests."> |
| 38 | <java fork="true" |
| 39 | classname="junit.textui.TestRunner" |
| 40 | failonerror="true" |
| 41 | taskname="junit"> |
| 42 | <classpath> |
| 43 | <pathelement location="${build.dir}/test"/> |
| 44 | <pathelement location="${build.dir}/classes"/> |
| 45 | <path refid="compile.classpath"/> |
| 46 | </classpath> |
| 47 | <arg value="${test.class}"/> |
| 48 | </java> |
| 49 | </target> |
| 50 | |
| 51 | <target name="clean" |
| 52 | description="Remove generated files."> |
| 53 | <delete dir="${build.dir}"/> |
| 54 | </target> |
| 55 | |
| 56 | </project> |