forked from darealmc/some_java
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
52 lines (45 loc) · 1.44 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
<project>
<property name="lib.dir" value="/usr/share/ant/lib" />
<path id="classpath">
<pathelement location="${lib.dir}/ant-junit4.jar"/>
<pathelement location="${lib.dir}/ant-junit"/>
</path>
<target name="clean">
<delete dir="build"/>
</target>
<target name="tcomp">
<javac srcdir="test" destdir="test"/>
</target>
<target name="compile">
<mkdir dir="build/classes"/>
<javac srcdir="src" destdir="build/classes"/>
</target>
<target name="tjar" depends="tcomp">
<jar destfile="test/hello.jar" basedir="test/hello">
<manifest>
<attribute name="Test-Class" value="hellotest"/>
</manifest>
</jar>
</target>
<target name="jar">
<mkdir dir="build/jar"/>
<jar destfile="build/jar/hello.jar" basedir="build/classes">
<manifest>
<attribute name="Main-Class" value="hello"/>
</manifest>
</jar>
</target>
<target name="run">
<java jar="build/jar/hello.jar" fork="true"/>
</target>
<target name="junit" depends="tjar">
<junit printsummary="yes">
<classpath refid="classpath" />
<classpath location="test"/>
<test name="hellotest" haltonfailure="no" todir="test/results">
<formatter type="plain"/>
<formatter type="xml"/>
</test>
</junit>
</target>
</project>