forked from mrFrosty/Dictionary
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
92 lines (72 loc) · 2.97 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
<project name="Dictionary" default="clean-build-all" basedir=".">
<description>
Build file for Dictionary project
</description>
<!-- set global properties for this build -->
<property name="main.src" location="src"/>
<property name="main.resources" location="resources"/>
<property name="main.scripts" location="scripts"/>
<property name="out" location="out"/>
<property name="out.prod" location="out/production"/>
<property name="testsamples" location="testpiem"/>
<property name="lib" location="lib"/>
<path id="project.class.path">
<fileset dir="lib">
<include name="**/*.jar"/>
</fileset>
</path>
<target name="init">
<!-- Create the time stamp -->
<tstamp/>
<!-- Create the build directory structure used by compile -->
<mkdir dir="${out.prod}"/>
</target>
<target name="compile" depends="init"
description="compile the source " >
<!-- Compile the java code from ${src} into ${out.build} -->
<javac encoding="UTF-8" verbose="false" debug="true" includeantruntime="false" srcdir="${main.src}" destdir="${out.prod}">
<classpath refid="project.class.path" />
</javac>
</target>
<target name="build" depends="compile"
description="generate the distribution" >
<!-- Create the distribution directory -->
<mkdir dir="${out.prod}"/>
<copy todir="${out.prod}">
<fileset dir="${main.resources}"/>
</copy>
<mkdir dir="${out.prod}/scripts"/>
<copy todir="${out.prod}/scripts">
<fileset dir="${main.scripts}"/>
</copy>
<mkdir dir="${out.prod}/dati"/>
<copy todir="${out.prod}/dati">
<fileset dir="${testsamples}"/>
</copy>
<mkdir dir="${out.prod}/lib"/>
<copy todir="${out.prod}/lib">
<fileset dir="${lib}"/>
</copy>
</target>
<target name="zip-all" depends="build" description="compress full distribution">
<zip destfile="Dictionary.zip" basedir="${out.prod}"
excludes="dati/*.doc,dati/*.klu,dati/*.etalons,dati/*.xls,dati/*.tmp,dati/*.xml"
whenempty="create"/>
</target>
<target name="zip-tezaurs-old" depends="build" description="compress Tēzaurs.lv distribution">
<zip destfile="Dictionary.zip" basedir="${out.prod}"
excludes="dati/mlvv/,dati/*.doc,dati/*.klu,dati/*.etalons,dati/*.xls,dati/*.tmp,dati/*.xml,lv/ailab/dict/mlvv/**,lv/ailab/dict/tezaurs/analyzer/**,lv/ailab/dict/tezaurs/DictionaryXmlToJsonUI.*,*TezaursXml2Json.bat,*MlvvTxt2Xml.bat"
whenempty="create"/>
</target>
<target name="clean"
description="clean up" >
<!-- Delete the ${out.build} and ${dist} directory trees -->
<delete dir="${out}"/>
</target>
<target name="clean-build-tezaurs-old" depends="clean,build,zip-tezaurs-old"
description="clean and generate the distribution of Tēzaurs.lv preprocessing tools" >
</target>
<target name="clean-build-all" depends="clean,build,zip-all"
description="clean and generate full distribution" >
</target>
</project>