forked from ePaul/stackoverflow-examples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
164 lines (143 loc) · 4.61 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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
<project name="stackoverflow-examples" basedir=".">
<presetdef name="compile" >
<javac srcdir="src"
debug="on"
encoding="utf-8"
deprecation="true"
includeantruntime="no"
>
<compilerarg value="-Xlint" />
</javac>
</presetdef>
<path id="tools.jar">
<pathelement location="${java.home}/../lib/tools.jar" />
</path>
<target name="echoproperties.prepare">
<available property="echoproperties.works"
classname="org.apache.tools.ant.taskdefs.optional.EchoProperties"
/>
</target>
<target name="echoproperties.init"
depends="echoproperties.prepare"
unless="echoproperties.works">
<taskdef name="echoproperties"
classname="org.apache.tools.ant.taskdefs.optional.EchoProperties"
classpath="${java.class.path}" />
</target>
<target name="properties"
depends="echoproperties.init"
>
<echoproperties/>
</target>
<target name="compile.doclet"
description="compiles the doccheck-doclet."
>
<mkdir dir="classes" />
<compile destdir="classes"
classpathref="tools.jar"
>
<filename name="de/fencing_game/paul/examples/doclet/*" />
</compile>
</target>
<target name="doccheck.doclet"
depends="compile.doclet"
description="runs the doccheck-doclet on itself."
>
<javadoc encoding="UTF-8"
classpathref="tools.jar"
access="private"
failonerror="true"
>
<fileset dir="src">
<include name="de/fencing_game/paul/examples/doclet/*" />
</fileset>
<doclet name="de.fencing_game.paul.examples.doclet.CheckingDoclet"
path="./classes">
</doclet>
</javadoc>
</target>
<target name="gentest.doclet"
depends="compile.doclet"
description="runs the generic-test-doclet on itself."
>
<javadoc encoding="UTF-8"
classpathref="tools.jar"
access="private"
failonerror="true"
source="1.5"
>
<fileset dir="src">
<include name="de/fencing_game/paul/examples/doclet/*" />
</fileset>
<doclet name="de.fencing_game.paul.examples.doclet.GenericTestDoclet"
path="./classes">
</doclet>
</javadoc>
</target>
<target name="compile.accessor">
<mkdir dir="classes.acc" />
<compile destdir="classes.acc" >
<filename name="de/fencing_game/paul/examples/accessible/*.java" />
</compile>
</target>
<target name="test.rome"
depends="compile.rome">
<java classname="de.fencing_game.paul.examples.rome.RomeTest"
classpathref="romepath">
</java>
</target>
<target name="compile.rome">
<mkdir dir="classes" />
<compile destdir="classes">
<classpath id="romepath">
<pathelement location="classes" />
<pathelement location="/usr/share/java/xercesImpl.jar" />
<pathelement location="../test/rome/target/rome-1.0.1-SNAPSHOT.jar" />
<pathelement location="../test/rome/target/lib/jdom-1.0.jar" />
</classpath>
<filename name="de/fencing_game/paul/examples/rome/*.java" />
</compile>
</target>
<target name="jars.accessor"
depends="compile.accessor">
<mkdir dir="jars" />
<jar destfile="jars/accessor-main.jar"
basedir="classes.acc">
<include name="de/fencing_game/paul/examples/accessible/*" />
<exclude name="**/*llowed*.*" />
</jar>
<jar destfile="jars/accessor-disallowed.jar"
basedir="classes.acc">
<include name="de/fencing_game/paul/examples/accessible/Disallowed*" />
</jar>
<jar destfile="jars/accessor-allowed.jar"
basedir="classes.acc">
<include name="de/fencing_game/paul/examples/accessible/Allowed*" />
</jar>
</target>
<target name="compile.examples">
<mkdir dir="classes" />
<compile destdir="classes" >
<or>
<filename name="de/fencing_game/paul/examples/*" />
<filename name="de/fencing_game/paul/examples/rmi/*" />
</or>
</compile>
</target>
<target name="test.example"
description="tests compiled examples - give class name (without package) as -Dclass=..., command line parameters with -Dparams=..."
depends="compile.examples">
<property name="params" value="" />
<java classpath="classes"
fork="true"
classname="de.fencing_game.paul.examples.${class}"
taskname="example"
>
<syspropertyset>
<propertyref prefix="javax.net.ssl" />
</syspropertyset>
<arg line="${params}" />
<assertions><enable/></assertions>
</java>
</target>
</project>