forked from junit-team/junit4
/
build.xml
98 lines (89 loc) · 2.74 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
<project name="junit" default="dist" basedir=".">
<property file="${user.home}/.junit.properties" />
<property name="version" value="4.0rc3" />
<property name="dist" value="junit${version}" />
<property name="versionfile" value="junit/runner/Version.java" />
<property name="zipfile" value="${dist}.zip" />
<property name="unjarred" value="**/*.jar, **/junit/tests/**, **/junit/samples/**, doc/**, README.html, .classpath, .project, cpl-v10.html" />
<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="distributeTestsAndExamples">
<copy todir="${dist}/${dir}">
<fileset dir="${dir}" includes="junit/samples/**, junit/tests/**" />
</copy>
</target>
<target name="dist" depends="build">
<delete dir="${dist}" />
<mkdir dir="${dist}" />
<jar
jarfile="${dist}/src.jar"
basedir="."
excludes="${unjarred}, **/*.class"
/>
<jar
jarfile="${dist}/junit.jar"
basedir="."
excludes="${unjarred}, **/*.java, build.xml"
/>
<antcall target="distributeTestsAndExamples">
<param name="dir" value="." />
</antcall>
<antcall target="distributeTestsAndExamples">
<param name="dir" value="org" />
</antcall>
<mkdir dir="${dist}/javadoc" />
<javadoc
sourcepath="."
packagenames="org.junit, org.junit.runner, org.junit.runner.description, org.junit.runner.manipulation, org.junit.runner.notification, org.junit.runners"
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="org.junit.runner.JUnitCore" fork="yes">
<arg value="org.junit.tests.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="clean">
<delete dir="${dist}" quiet="true"/>
<delete file="${zipfile}" quiet="true"/>
<delete>
<fileset dir="${basedir}" includes="**/*.class" />
</delete>
</target>
</project>