-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
321 lines (291 loc) · 14.9 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
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
<project name="Ajavt" default="dist" basedir=".">
<description>
Ajavaljendite tuvastaja ehitusskript
</description>
<condition property="isWindows">
<os family="windows" />
</condition>
<condition property="isUNIX">
<os family="unix" />
</condition>
<!-- lokaalne konfiguratsioon failist -->
<property file="build.properties"/>
<!-- globaalsed vaartused -->
<property name="src" location="src"/>
<property name="build" location="build"/>
<property name="dist" location="dist"/>
<property name="lib" location="lib"/>
<!-- ressursside kausta asukoht -->
<property name="resdir" location="res"/>
<property name="jdoc" location="javadoc"/>
<!-- kaust, kuhu laheb testimisk6lbulik rakendus -->
<property name="deploydir" location="test"/>
<target name="tasks">
<!-- Kuvame k6igi kaskude nimekirja -->
<echo/>
<echo message=" Ajavt"/>
<echo/>
<echo message=" Most important tasks:${line.separator}"/>
<echo message=" compile - compiles the source and places into the build-dir;${line.separator}"/>
<echo message=" dist - creates a distribution of program${line.separator}"/>
<echo message=" (JAR + necessary files) (under Windows);${line.separator}"/>
<echo message=" dist-unix - creates the distribution under UNIX;"/>
<echo message=" deploy - deploys the distribution into test-dir;${line.separator}"/>
<echo message=" test-all - executes automatic tests on corpora,${line.separator}"/>
<echo message=" reports results (precision, recall);"/>
<echo message=" clean - deletes build-dir, dist-dir and javadoc-dir;${line.separator}"/>
<echo/>
<echo message=" Other important tasks:${line.separator}"/>
<echo message=" tasks - displays this overview;${line.separator}"/>
<echo message=" init - creates timestamp and build-dir;${line.separator}"/>
<echo message=" javadoc - generates javadoc (incomplete);${line.separator}"/>
<echo/>
</target>
<target name="init">
<!-- Loome ajatempli -->
<tstamp/>
<!-- Loome kataloogistruktuuri, kuhu paigutatakse
kompileeritud java klassid -->
<mkdir dir="${build}"/>
</target>
<!-- ====================================================================== -->
<!-- K o m p i l e e r i m i n e -->
<!-- ====================================================================== -->
<target name="compile" depends="init"
description="kompileeri l2htekood" >
<!-- Kompileerime ${src} kaustas paikneva l2htekoodi, paigutame
tulemuse kausta ${build} -->
<!-- reanumbrid erindis: debug="on" debuglevel="lines,vars,source" -->
<javac includeantruntime="false" target="1.8" source="1.8" srcdir="${src}" destdir="${build}"
fork="yes" executable="${java.home.location}/bin/javac" >
<classpath>
<pathelement location="lib/joda-time-2.9.4.jar"/>
<pathelement location="lib/javax.json-1.0.4.jar"/>
</classpath>
</javac>
</target>
<target name="compile-test-src" depends="deploy"
description="kompileeri automaattestide l2htekood" >
<!-- Kompileerime kokku testklassid -->
<!-- reanumbrid erindis: debug="on" debuglevel="lines,vars,source" -->
<javac includeantruntime="false" target="1.8" source="1.8" srcdir="test-src" destdir="${build}" fork="yes"
executable="${java.home.location}/bin/javac"
excludes="**/MorphStatistics.java,**/TestJodaTime.java,**/TestJodaTimeLocal.java" >
<classpath>
<pathelement location="lib/joda-time-2.9.4.jar"/>
<pathelement location="lib/javax.json-1.0.4.jar"/>
<pathelement location="lib/diffutils-1.2.1.jar"/>
</classpath>
</javac>
</target>
<target name="javadoc" depends="init"
description="loo javadoc dokumentatsioon" >
<javadoc sourcepath="${src}" destdir="${jdoc}"/>
</target>
<!-- ====================================================================== -->
<!-- D i s t r i b u t e e r i m i n e -->
<!-- ====================================================================== -->
<target name="dist" depends="compile"
description="genereeri programmi distributsioon (win)"
if="isWindows" >
<!-- Loome distributsiooni kataloogi -->
<mkdir dir="${dist}"/>
<!-- Loome .JAR faili tarvis manifesti -->
<manifest file="${dist}/MANIFEST.MF">
<attribute name="Main-Class" value="ee.ut.soras.ajavtV2.Main"/>
<attribute name="Class-Path" value="joda-time-2.9.4.jar javax.json-1.0.4.jar"/>
</manifest>
<!-- Paigutame k6ik kaustas ${build} asuva .JAR faili -->
<jar jarfile="${dist}/Ajavt.jar" manifest="${dist}/MANIFEST.MF">
<fileset dir="${build}">
<exclude name="**/ajavt/**"/>
<exclude name="**/ajavtV2profile/**"/>
</fileset>
</jar>
<!-- anname .JAR failiga kaasa vajaminevad ressurssfailid -->
<copy todir="${dist}" overwrite="true">
<fileset dir="${lib}">
<include name="*.jar"/>
<exclude name="junit-*.jar"/>
<exclude name="diffutils-*.jar"/>
<exclude name="hamcrest-core-*.jar"/>
</fileset>
<fileset dir="${resdir}" includes="*.xml"/>
</copy>
<!-- Kustutame manifesti kaustast ${dist} -
seal me seda enam ei vaja -->
<delete file="${dist}/MANIFEST.MF"/>
</target>
<target name="dist-unix" depends="compile"
description="genereeri programmi distributsioon (unix)"
if="isUNIX" >
<!-- Loome distributsiooni kataloogi -->
<mkdir dir="${dist}"/>
<!-- Loome .JAR faili tarvis manifesti -->
<manifest file="${dist}/MANIFEST.MF">
<attribute name="Main-Class" value="ee.ut.soras.ajavtV2.Main"/>
<attribute name="Class-Path" value="joda-time-2.9.4.jar javax.json-1.0.4.jar"/>
</manifest>
<!-- Paigutame k6ik kaustas ${build} asuva .JAR faili -->
<jar jarfile="${dist}/Ajavt.jar" manifest="${dist}/MANIFEST.MF">
<fileset dir="${build}">
<exclude name="**/ajavt/**"/>
<exclude name="**/ajavtV2profile/**"/>
</fileset>
</jar>
<!-- anname .JAR failiga kaasa vajaminevad ressurssfailid -->
<copy todir="${dist}" overwrite="true">
<fileset dir="${lib}">
<include name="*.jar"/>
<exclude name="junit-*.jar"/>
<exclude name="diffutils-*.jar"/>
<exclude name="hamcrest-core-*.jar"/>
</fileset>
<fileset dir="${resdir}" includes="*.xml"/>
</copy>
<!-- Kustutame manifesti kaustast ${dist} -
seal me seda enam ei vaja -->
<delete file="${dist}/MANIFEST.MF"/>
</target>
<target name="deploy" depends="dist, dist-unix"
description="paigalda distributsioon testkataloogi" >
<copy todir="${deploydir}" overwrite="true">
<fileset dir="${dist}" includes="*.*"/>
</copy>
</target>
<!-- ====================================================================== -->
<!-- T e s t i m i n e k o r p u s e v a s t u -->
<!-- ====================================================================== -->
<target name="test-all" depends="test-tml, test-t3-olp"
description="testimine: sooritab koik automaattestid" />
<!-- Eemalda kommentaari alt muutujad, mis viitavad olemasolevatele korpustele: -->
<!-- Uncomment variables pointing to available corpora: -->
<!-- <property name="use.tml.corpus.01" value="true" /> -->
<!-- <property name="use.tml.corpus.02" value="true" /> -->
<!-- <property name="use.tml.corpus.03" value="true" /> -->
<property name="use.tml.corpus.04" value="true" />
<!-- <property name="use.t3o.corpus.01" value="true" /> -->
<!-- <property name="use.t3o.corpus.02" value="true" /> -->
<property name="use.t3o.corpus.03" value="true" />
<target name="test-tml" depends="test-tml-01, test-tml-02, test-tml-03, test-tml-04" />
<target name="test-tml-01" depends="deploy, compile-test-src" if="${use.tml.corpus.01}" >
<java fork="true" classname="ee.ut.soras.test_ajavt.TestMain" jvm="${java.home.location}/bin/java" >
<env key="JAVA_HOME" value="${java.home.location}" />
<arg value="-compareToLast"/>
<arg line="-ajaVTLoc ${deploydir}"/>
<arg line="-corpusLoc ${test.root}/MSc_thesis_2010_tml/tml"/>
<arg line="-morfLoc ${test.root}/MSc_thesis_2010_tml/mrf"/>
<arg line="-resultsLoc ${test.root}/MSc_thesis_2010_tml/testlog"/>
<classpath>
<pathelement location="lib/joda-time-2.9.4.jar"/>
<pathelement location="lib/javax.json-1.0.4.jar"/>
<pathelement location="lib/diffutils-1.2.1.jar"/>
<pathelement location="${build}"/>
</classpath>
</java>
</target>
<target name="test-tml-02" depends="deploy, compile-test-src" if="${use.tml.corpus.02}" >
<java fork="true" classname="ee.ut.soras.test_ajavt.TestMain" jvm="${java.home.location}/bin/java" >
<env key="JAVA_HOME" value="${java.home.location}" />
<arg value="-compareToLast"/>
<arg line="-ajaVTLoc ${deploydir}"/>
<arg line="-corpusLoc ${test.root}/MSc_thesis_other_tml/tml"/>
<arg line="-morfLoc ${test.root}/MSc_thesis_other_tml/mrf"/>
<arg line="-resultsLoc ${test.root}/MSc_thesis_other_tml/testlog"/>
<classpath>
<pathelement location="lib/joda-time-2.9.4.jar"/>
<pathelement location="lib/javax.json-1.0.4.jar"/>
<pathelement location="lib/diffutils-1.2.1.jar"/>
<pathelement location="${build}"/>
</classpath>
</java>
</target>
<target name="test-tml-03" depends="deploy, compile-test-src" if="${use.tml.corpus.03}" >
<java fork="true" classname="ee.ut.soras.test_ajavt.TestMain" jvm="${java.home.location}/bin/java" >
<env key="JAVA_HOME" value="${java.home.location}" />
<arg value="-compareToLast"/>
<arg line="-ajaVTLoc ${deploydir}"/>
<arg line="-corpusLoc ${test.root}/MSc_thesis_2010_cleaned/tml"/>
<arg line="-morfLoc ${test.root}/MSc_thesis_2010_cleaned/mrf"/>
<arg line="-resultsLoc ${test.root}/MSc_thesis_2010_cleaned/testlog"/>
<classpath>
<pathelement location="lib/joda-time-2.9.4.jar"/>
<pathelement location="lib/javax.json-1.0.4.jar"/>
<pathelement location="lib/diffutils-1.2.1.jar"/>
<pathelement location="${build}"/>
</classpath>
</java>
</target>
<target name="test-tml-04" depends="deploy, compile-test-src" if="${use.tml.corpus.04}" >
<java fork="true" classname="ee.ut.soras.test_ajavt.TestMain" jvm="${java.home.location}/bin/java" >
<env key="JAVA_HOME" value="${java.home.location}" />
<arg value="-compareToLast"/>
<arg line="-ajaVTLoc ${deploydir}"/>
<arg line="-corpusLoc ${test.root}/MThesis_2010_tml_mod_2/tml"/>
<arg line="-morfLoc ${test.root}/MThesis_2010_tml_mod_2/mrf"/>
<arg line="-resultsLoc ${test.root}/MThesis_2010_tml_mod_2/testlog"/>
<classpath>
<pathelement location="lib/joda-time-2.9.4.jar"/>
<pathelement location="lib/javax.json-1.0.4.jar"/>
<pathelement location="lib/diffutils-1.2.1.jar"/>
<pathelement location="${build}"/>
</classpath>
</java>
</target>
<target name="test-t3-olp" depends="test-t3-olp-01, test-t3-olp-02, test-t3-olp-03" />
<target name="test-t3-olp-01" depends="deploy, compile-test-src" if="${use.t3o.corpus.01}" >
<java fork="true" classname="ee.ut.soras.test_ajavt.TestMainT3OLP" jvm="${java.home.location}/bin/java">
<env key="JAVA_HOME" value="${java.home.location}" />
<arg value="-compareToLast"/>
<arg line="-ajaVTLoc ${deploydir}"/>
<arg line="-corpusLoc ${test.root}/ERY2012_t3-olp-tmx_dev/t3-olp-tmx"/>
<arg line="-resultsLoc ${test.root}/ERY2012_t3-olp-tmx_dev/testlog"/>
<classpath>
<pathelement location="lib/joda-time-2.9.4.jar"/>
<pathelement location="lib/javax.json-1.0.4.jar"/>
<pathelement location="lib/diffutils-1.2.1.jar"/>
<pathelement location="${build}"/>
</classpath>
</java>
</target>
<target name="test-t3-olp-02" depends="deploy, compile-test-src" if="${use.t3o.corpus.02}" >
<java fork="true" classname="ee.ut.soras.test_ajavt.TestMainT3OLP" jvm="${java.home.location}/bin/java">
<env key="JAVA_HOME" value="${java.home.location}" />
<arg value="-compareToLast"/>
<arg line="-ajaVTLoc ${deploydir}"/>
<arg line="-corpusLoc ${test.root}/ERY2012_t3-olp-ajav/t3-olp-ajav"/>
<arg line="-resultsLoc ${test.root}/ERY2012_t3-olp-ajav/testlog"/>
<classpath>
<pathelement location="lib/joda-time-2.9.4.jar"/>
<pathelement location="lib/javax.json-1.0.4.jar"/>
<pathelement location="lib/diffutils-1.2.1.jar"/>
<pathelement location="${build}"/>
</classpath>
</java>
</target>
<target name="test-t3-olp-03" depends="deploy, compile-test-src" if="${use.t3o.corpus.03}" >
<java fork="true" classname="ee.ut.soras.test_ajavt.TestMainT3OLP" jvm="${java.home.location}/bin/java">
<env key="JAVA_HOME" value="${java.home.location}" />
<arg value="-compareToLast"/>
<arg line="-ajaVTLoc ${deploydir}"/>
<arg line="-corpusLoc ${test.root}/ERY2012_t3-olp-ajav_modified/t3-olp-ajav"/>
<arg line="-resultsLoc ${test.root}/ERY2012_t3-olp-ajav_modified/testlog"/>
<classpath>
<pathelement location="lib/joda-time-2.9.4.jar"/>
<pathelement location="lib/javax.json-1.0.4.jar"/>
<pathelement location="lib/diffutils-1.2.1.jar"/>
<pathelement location="${build}"/>
</classpath>
</java>
</target>
<!-- ====================================================================== -->
<!-- P u h a s t u s -->
<!-- ====================================================================== -->
<target name="clean"
description="kustuta genereeritud distributsioon" >
<!-- Kustutame ${build}, ${dist} ning ${jdoc} kataloogid -->
<delete dir="${build}"/>
<delete dir="${dist}"/>
<delete dir="${jdoc}"/>
</target>
</project>