forked from jalian-systems/Marathon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
229 lines (208 loc) · 9.73 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
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
<project name='marathon' default='deploy' basedir='.'>
<property file="build.properties"/>
<property name="rsyntaxtextarea.jar" location="marathon-support/RSyntaxTextArea/dist/rsyntaxtextarea.jar"/>
<property name="ruby.dir.abs" location="${ruby.dir}"/>
<property name="ruby.parser.dir.abs" location="${ruby.parser.dir}"/>
<property name="python.dir.abs" location="${python.dir}"/>
<condition property="dependencies.exist">
<and>
<available file="${ruby.dir.abs}"/>
</and>
</condition>
<target name='clean' description="Cleans all intermediate files">
<delete dir='ant-target'/>
<delete file="marathon.jar"/>
<delete file="sampleapp.jar"/>
<delete file="marathon-unit-tests/test/net/sourceforge/marathon/AllTests.java"/>
</target>
<target name='clean-all' depends='clean' description="Cleans all intermediate files and distribution files">
<delete>
<fileset dir=".">
<include name="marathon-*.zip"/>
</fileset>
</delete>
<delete dir='testreports'/>
</target>
<property name="run-from-marathon-build-file" value="true"/>
<property name="class.dir" location="ant-target/classes"/>
<property name="example.dir" location="ant-target/example"/>
<property name="unittests.dir" location="ant-target/unittests"/>
<property name="reports.dir" location="reports"/>
<property name="jline.jar" location="marathon-support/jline-0.9.93.jar"/>
<property name="junit.jar" location="marathon-support/junit4.8.2/junit-4.8.2.jar"/>
<property name="osxutil.jar" location="marathon-support/osxutil/dist/osxutil.jar"/>
<property name="atunit.jar" location="marathon-support/atunit-1/atunit-1.0.1.jar"/>
<property name="easymock.jar" location="marathon-support/easymock-3.0/easymock-3.0.jar"/>
<property name="looks.jar" location="marathon-support/looks-2.2.0/looks-2.2.0.jar"/>
<property name="vldocking.jar" location="marathon-support/vldocking-3.0.0/src/jar/vldocking-3.0.0.jar"/>
<property name="forms.jar" location="marathon-support/forms-1.2.1/forms-1.2.1.jar"/>
<property name="guice.jar" location="marathon-support/guice-2.0/guice-2.0.jar"/>
<property name="aopalliance.jar" location="marathon-support/guice-2.0/aopalliance.jar"/>
<property name="cglib.jar" location="marathon-support/cglib-nodep-2.2.jar"/>
<property name="objenesis.jar" location="marathon-support/objenesis-1.2/objenesis-1.2.jar"/>
<property name="browserlauncher.jar" location="marathon-support/BrowserLauncher2-all-1_3.jar"/>
<property name="opencsv.jar" location="marathon-support/opencsv/deploy/opencsv-2.2.jar"/>
<property name="snakeyaml.jar" location="marathon-support/snakeyaml/target/snakeyaml-1.7.jar"/>
<target name='compile-all' description="Compiles all dependent modules">
<ant dir="marathon-rmilite" inheritAll='true'/>
<ant dir="marathon-runtime-api" inheritAll='true'/>
<ant dir="marathon-runtime" inheritAll='true'/>
<ant dir="marathon-runtime-server" inheritAll='true'/>
<ant dir="marathon-ruby" inheritAll='true'/>
<ant dir="marathon-python" inheritAll='true'/>
<ant dir="marathon-rsta-editor" inheritAll='true'/>
<ant dir="marathon-core" inheritAll='true'/>
</target>
<target name='build-jars' depends='compile-all' description="Builds all the dependent jars">
<jar jarfile='marathon.jar' basedir='ant-target/classes'/>
<jar jarfile='sampleapp.jar' basedir='ant-target/example'/>
</target>
<target name="ensure-test-name" unless="test">
<fail message="You must run this target with -Dtest=TestName"/>
</target>
<target name="runtest" description="Runs the test you specify on the command line with -Dtest=" depends="compile-all, ensure-test-name">
<mkdir dir='${unittests.dir}'/>
<javac destdir='${unittests.dir}' debug='on' optimize='off' deprecation='on' source="1.5" target="1.5">
<src path='marathon-unit-tests/ant-tool'/>
<include name='**/CreateTestSuite.java'/>
</javac>
<java classname="net.sourceforge.marathon.CreateTestSuite" dir="marathon-unit-tests/test" fork="true" failonerror="true" maxmemory="128m" >
<classpath>
<pathelement location="${unittests.dir}"/>
</classpath>
</java>
<ant dir="marathon-unit-tests" inheritAll='true'/>
<junit printsummary="withOutAndErr" fork="yes" dir="marathon-unit-tests">
<sysproperty key="marathon.WINDOW_TIMEOUT" value="1200"/>
<sysproperty key="marathon.home" value="."/>
<sysproperty key="marathon.project.script.model" value="net.sourceforge.marathon.mocks.MockScriptModel"/>
<sysproperty key="marathon.capture.dir" value="."/>
<sysproperty key="marathon.fixture.dir" value="."/>
<sysproperty key="marathon.test.dir" value="."/>
<sysproperty key="marathon.unittests" value="true"/>
<classpath>
<pathelement location="${forms.jar}"/>
<pathelement location="${looks.jar}"/>
<pathelement location="${rsyntaxtextarea.jar}"/>
<pathelement location="${jline.jar}"/>
<pathelement location="${junit.jar}"/>
<pathelement location="${osxutil.jar}"/>
<pathelement location="${atunit.jar}"/>
<pathelement location="${easymock.jar}"/>
<pathelement location="${vldocking.jar}"/>
<fileset dir="${ruby.dir.abs}">
<include name="lib/jruby.jar"/>
</fileset>
<pathelement location="${class.dir}"/>
<pathelement location="${unittests.dir}"/>
<pathelement location="${guice.jar}"/>
<pathelement location="${aopalliance.jar}"/>
<pathelement location="${cglib.jar}"/>
<pathelement location="${objenesis.jar}"/>
<pathelement location="${browserlauncher.jar}"/>
<pathelement location="${opencsv.jar}"/>
<pathelement location="${snakeyaml.jar}"/>
</classpath>
<batchtest>
<fileset dir="marathon-unit-tests/test">
<include name="**/${test}.java"/>
</fileset>
</batchtest>
</junit>
<junitreport todir="testreports">
<fileset dir="testreports">
<include name="TEST-*.xml"/>
</fileset>
<report format="frames" todir="./testreports/html"/>
</junitreport>
</target>
<target name='tests' depends='compile-all' description="Runs all Unit Tests">
<ant dir="marathon-unit-tests" inheritAll='true'/>
<delete dir='testreports'/>
<mkdir dir="testreports"/>
<junit printsummary="yes" haltonfailure="no" fork="yes" dir="marathon-unit-tests" forkmode='once'>
<sysproperty key="marathon.recorder.namingstrategy" value="net.sourceforge.marathon.component.MarathonNamingStrategy"/>
<classpath>
<pathelement location="${forms.jar}"/>
<pathelement location="${looks.jar}"/>
<pathelement location="${rsyntaxtextarea.jar}"/>
<pathelement location="${jline.jar}"/>
<pathelement location="${junit.jar}"/>
<pathelement location="${osxutil.jar}"/>
<pathelement location="${atunit.jar}"/>
<pathelement location="${easymock.jar}"/>
<pathelement location="${vldocking.jar}"/>
<fileset dir="${ruby.dir.abs}">
<include name="lib/jruby.jar"/>
</fileset>
<pathelement location="${class.dir}"/>
<pathelement location="${unittests.dir}"/>
<pathelement location="${guice.jar}"/>
<pathelement location="${aopalliance.jar}"/>
<pathelement location="${cglib.jar}"/>
<pathelement location="${objenesis.jar}"/>
<pathelement location="${browserlauncher.jar}"/>
<pathelement location="${opencsv.jar}"/>
<pathelement location="${snakeyaml.jar}"/>
</classpath>
<formatter type="xml"/>
<batchtest todir="testreports">
<fileset dir="marathon-unit-tests/test">
<include name="**/Test*.java"/>
</fileset>
</batchtest>
</junit>
</target>
<target name='testreport'>
<junitreport todir="testreports">
<fileset dir="testreports">
<include name="TEST-*.xml"/>
</fileset>
<report format="frames" todir="./testreports/html"/>
</junitreport>
</target>
<target name='zip' depends='build-jars' description="Creates the compressed distribution files">
<delete file="marathon-${marathon-version}.zip"/>
<zip destfile="marathon-${marathon-version}.zip">
<zipfileset dir='.' prefix='marathon'>
<include name="marathon.jar"/>
<include name="sampleapp.jar"/>
<include name="README.txt"/>
<include name="README.html"/>
<include name="README.textile"/>
<include name="ant-sample.xml"/>
</zipfileset>
<zipfileset dir='marathon-core' prefix='marathon' filemode="755">
<include name="marathon"/>
<include name="Marathon.app/**"/>
</zipfileset>
<zipfileset dir='marathon-core' prefix='marathon'>
<include name="marathon.bat"/>
<include name="ChangeLog"/>
<include name="LGPL.txt"/>
<include name="logging.properties"/>
</zipfileset>
<zipfileset dir='marathon-core' prefix='marathon'>
<include name="Checklists/**"/>
</zipfileset>
<zipfileset dir='marathon-support' prefix='marathon/support'>
<include name="**"/>
</zipfileset>
<zipfileset dir='${ruby.dir.abs}' prefix='marathon/jruby'>
<include name="**"/>
</zipfileset>
<zipfileset dir='${ruby.parser.dir.abs}' prefix='marathon/jruby-parser'>
<include name="**"/>
</zipfileset>
<zipfileset dir='${python.dir.abs}' prefix='marathon/jython'>
<include name="**"/>
</zipfileset>
</zip>
</target>
<target name='check_dep' description="Check for the existence of dependencies">
<fail unless="dependencies.exist"
message="ruby=${ruby.dir} does not exist. Check build.properties"/>
<echo>Ruby path: ${ruby.dir}</echo>
</target>
<target name='deploy' depends='check_dep, tests, testreport, zip, clean' description="Create files for deployment"/>
</project>