-
Notifications
You must be signed in to change notification settings - Fork 15
/
build.xml
63 lines (53 loc) · 2.1 KB
/
build.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<?xml version="1.0" encoding="utf-8"?>
<project name="configgen" default="dist">
<property name="src" value="src/"/>
<property name="build" value="classes/"/>
<property name="build.test" value="classes.test/"/>
<target name="clean">
<delete dir="${build}"/>
<delete dir="${build.test}"/>
</target>
<path id="classpath">
<fileset dir="lib" includes="*.jar" excludes="junit-4.12.jar,hamcrest-core-1.3.jar"/>
</path>
<target name="compile">
<mkdir dir="${build}"/>
<javac encoding="UTF-8" srcdir="${src}" destdir="${build}" includeantruntime="false" debug="true"
excludes="**/*Test.java" classpathref="classpath"
debuglevel="lines,source">
</javac>
</target>
<target name="dist" depends="compile">
<copy todir="${build}/support">
<fileset dir="${src}/support"/>
</copy>
<copy file="${src}/log4j2.component.properties" todir="${build}"/>
<jar jarfile="configgen.jar" basedir="${build}" excludes="**/*Test.java" manifest="${src}/MANIFEST.MF">
<zipgroupfileset dir="lib" includes="*.jar" excludes="junit-4.12.jar,hamcrest-core-1.3.jar"/>
</jar>
<delete dir="${build}"/>
</target>
<path id="classpath.test">
<fileset dir="lib" includes="*.jar"/>
</path>
<target name="test-compile">
<mkdir dir="${build.test}"/>
<javac encoding="UTF-8" srcdir="${src}" destdir="${build.test}" includeantruntime="false" debug="true"
includes="**/*Test.java" classpathref="classpath.test"
debuglevel="lines,source">
</javac>
</target>
<target name="test" depends="test-compile">
<junit>
<classpath>
<path refid="classpath.test"/>
<pathelement location="${build.test}"/>
</classpath>
<formatter type="brief" usefile="false"/>
<batchtest>
<fileset dir="${src}" includes="**/*Test.java"/>
</batchtest>
</junit>
<delete dir="${build.test}"/>
</target>
</project>