forked from philgooch/WordNet_Suggester
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
175 lines (135 loc) · 5.22 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
<!--======================================================================
Build file for WordNet Suggester
=======================================================================-->
<project name="WordNetSuggester" basedir="." default="all">
<property file="build.properties" />
<!-- Plugin name -->
<property name="plugin.name" value="WordNetSuggester"/>
<!-- location of the top-level GATE installation directory -->
<property name="gate.home" location="../gate-6.1-snapshot-build3926-ALL" />
<!-- location of GATE lib directory - should be inferred from gate.home -->
<property name="gate.lib" location="${gate.home}/lib" />
<!-- location of gate.jar - should be inferred from gate.home -->
<property name="gate.jar" location="${gate.home}/bin/gate.jar" />
<!-- Source directory - contains the Java source files for this plugin -->
<property name="src.dir" location="src" />
<!-- Test directory -->
<property name="test.dir" location="test" />
<!-- directory to contain the compiled classes -->
<property name="classes.dir" location="classes" />
<!-- documentation directory -->
<property name="doc.dir" location="doc" />
<!-- JavaDoc documentation directory -->
<property name="javadoc.dir" location="${doc.dir}/javadoc" />
<property name="junit.lib" location="${user.home}/junit_4" />
<!-- Test classes -->
<property name="test.class.name" value="org.philgooch.WordNetSuggesterSuite" />
<!-- location for the generated JAR file -->
<property name="jar.location" location="${plugin.name}.jar" />
<!-- Complilation classpath -->
<path id="compile.classpath">
<pathelement location="${gate.jar}" />
</path>
<!-- Test classpath containing GATE/lib/*.jar and JUnit jars -->
<path id="test.classpath">
<pathelement location="${gate.home}" />
<pathelement location="${test.dir}" />
<pathelement location="${classes.dir}" />
<pathelement location="${gate.jar}" />
<fileset dir="${junit.lib}">
<include name="**/*.jar" />
<include name="**/*.zip" />
</fileset>
<fileset dir="${gate.lib}">
<include name="**/*.jar" />
<include name="**/*.zip" />
</fileset>
</path>
<!--====================== Targets ============================-->
<!-- create build directory structure -->
<target name="prepare">
<mkdir dir="${classes.dir}" />
</target>
<!-- compile the source -->
<target name="compile" depends="prepare">
<javac classpathref="compile.classpath"
srcdir="${src.dir}"
destdir="${classes.dir}"
debug="true"
debuglevel="lines,source"
source="1.5" />
</target>
<!-- copy resources (anything non-.java) from src to classes -->
<target name="copy.resources" depends="prepare">
<copy todir="${classes.dir}">
<fileset dir="${src.dir}" excludes="**/*.java" />
</copy>
</target>
<!-- create the JAR file -->
<target name="jar" depends="compile, copy.resources" >
<jar destfile="${jar.location}"
update="false"
basedir="${classes.dir}" />
</target>
<!-- remove the generated .class files -->
<target name="clean.classes" >
<delete dir="${classes.dir}" />
</target>
<!-- Clean up - remove .class and .jar files -->
<target name="clean" depends="clean.classes" >
<delete file="${jar.location}" />
</target>
<!-- Clean up everything, including Javadoc -->
<target name="docclean" depends="clean, clean.javadoc" >
</target>
<!-- Build JavaDoc documentation -->
<target name="doc.prepare">
<mkdir dir="${javadoc.dir}" />
</target>
<!-- Clean JavaDoc documentation -->
<target name="clean.javadoc">
<delete dir="${javadoc.dir}" />
</target>
<target name="javadoc" depends="doc.prepare">
<javadoc destdir="${javadoc.dir}" packagenames="*"
classpathref="compile.classpath"
encoding="UTF-8"
windowtitle="${plugin.name} JavaDoc"
source="1.5">
<sourcepath>
<pathelement location="${src.dir}" />
</sourcepath>
<link href="http://java.sun.com/j2se/1.5.0/docs/api/" />
</javadoc>
</target>
<!-- Build everything - the code and JavaDoc -->
<target name="all" depends="jar, javadoc" />
<!-- Other targets used by the main GATE build file:
build: build the plugin - just calls "jar" target
test : run the unit tests
distro.prepare: remove intermediate files that shouldn't be in the
distribution
-->
<target name="build" depends="jar" />
<!-- compile the tests -->
<target name="test.compile" depends="build">
<javac classpathref="test.classpath"
srcdir="${test.dir}"
destdir="${classes.dir}"
debug="true"
debuglevel="lines,source"
source="1.5" />
</target>
<target name="test" depends="test.compile">
<junit fork="yes" haltonfailure="yes">
<jvmarg value="-Dgate.home=${gate.home}"/>
<jvmarg value="-Dgate.plugins.home==${gate.home}/plugins"/>
<test name="${test.class.name}" />
<formatter type="plain" usefile="false" />
<classpath>
<path refid="test.classpath"/>
</classpath>
</junit>
</target>
<target name="distro.prepare" depends="clean.classes" />
</project>