forked from stefanbirkner/junit3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
121 lines (110 loc) · 3.31 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
<!-- JUnit build script using ant 1.4 -->
<project name="junit" default="dist" basedir=".">
<property file="${user.home}/.junit.properties" />
<property name="build.compiler" value="classic" />
<property name="version" value="3.8.2" />
<property name="dist" value="junit${version}" />
<property name="versionfile" value="junit/runner/Version.java" />
<property name="zipfile" value="${dist}.zip" />
<target name="init">
<tstamp/>
</target>
<target name="versiontag" depends="init">
<filter token="version" value="${version}" />
<copy
file="${versionfile}"
tofile="${versionfile}tmp"
filtering="on"
/>
<move file="${versionfile}tmp" tofile="${versionfile}" />
</target>
<target name="build" depends="versiontag">
<javac
srcdir="."
destdir="."
debug="on"
/>
</target>
<target name="dist" depends="build">
<delete dir="${dist}" />
<mkdir dir="${dist}" />
<jar
jarfile="${dist}/src.jar"
basedir="."
excludes="**/*.jar, junit/tests/**, junit/samples/**, **/*.class, doc/**, README.html, stylesheet.css, build.xml, .classpath, .project, .settings/**, cpl-v10.html"
/>
<jar
jarfile="${dist}/junit.jar"
basedir="."
excludes="**/*.jar, junit/tests/**, junit/samples/**, **/*.java, doc/**, README.html, stylesheet.css, build.xml, jar-manifest.txt, .classpath, .project, .settings/**, cpl-v10.html"
/>
<copy todir="${dist}/junit/samples">
<fileset dir="junit/samples" />
</copy>
<copy todir="${dist}/junit/tests">
<fileset dir="junit/tests" />
</copy>
<delete file="${dist}/junit/tests/runner/test.jar"/>
<jar jarfile="${dist}/junit/tests/runner/test.jar"
basedir="."
includes="junit/tests/runner/LoadedFromJar.class"
/>
<mkdir dir="${dist}/javadoc" />
<javadoc
sourcepath="."
packagenames="junit.framework.*, junit.extensions.*"
destdir="${dist}/javadoc"
author="false"
version="false"
use="false"
windowtitle="JUnit API"
stylesheetfile="stylesheet.css"
/>
<copy todir="${dist}/doc">
<fileset dir="doc"/>
</copy>
<copy file="README.html" tofile="${dist}/README.html" />
<copy file="cpl-v10.html" tofile="${dist}/cpl-v10.html" />
<java classname="junit.textui.TestRunner" fork="yes">
<arg value="junit.samples.AllTests" />
<classpath>
<pathelement location="${dist}" />
<pathelement location="${dist}/junit.jar" />
</classpath>
</java>
</target>
<target name="zip" depends="dist">
<zip
zipfile="${zipfile}"
basedir="."
includes="${dist}/**"
/>
</target>
<target name="awtui" depends="dist">
<java classname="junit.awtui.TestRunner" fork="yes">
<arg value="-noloading" />
<arg value="junit.samples.AllTests" />
<classpath>
<pathelement location="${dist}" />
<pathelement location="${dist}/junit.jar" />
</classpath>
</java>
</target>
<target name="swingui" depends="dist">
<java classname="junit.swingui.TestRunner" fork="yes">
<arg value="-noloading" />
<arg value="junit.samples.AllTests" />
<classpath>
<pathelement location="${dist}" />
<pathelement location="${dist}/junit.jar" />
</classpath>
</java>
</target>
<target name="clean">
<delete dir="${dist}" quiet="true"/>
<delete file="${zipfile}" quiet="true"/>
<delete>
<fileset dir="${basedir}" includes="**/*.class" />
</delete>
</target>
</project>