-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
198 lines (158 loc) · 6.78 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
<!--======================================================================
Multilingual Noun Phrase Extractor (MuNPEx)
http://www.semanticsoftware.info/munpex
Build file for MuNPEx
This file will allow you to build your plugin with Ant.
Copyright (c) 2012, 2015 Rene Witte (http://rene-witte.net)
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 3.0 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library. If not, see <http://www.gnu.org/licenses/>.
=======================================================================-->
<project name="MuNPEx" basedir="." default="all">
<!-- Prevent Ant from warning about includeantruntime not being set -->
<property name="build.sysclasspath" value="ignore" />
<property file="build.properties" />
<!-- software revision number -->
<property name="release.version" value="2.0"/>
<property file="version.properties"/>
<!--=======================================================
Property settings. You should not need to edit these
directly, if you need to set a different value for any
property you should edit build.properties and override
them there.
========================================================-->
<!-- Name of the plugin -->
<property name="plugin.name" value="MuNPEx"/>
<!-- Make environment variables available -->
<property environment="env" />
<!-- If environment variable GATE_HOME is set, use it for
gate.home (unless it was already set in build.properties -->
<condition property="gate.home" value="${env.GATE_HOME}">
<isset property="env.GATE_HOME"/>
</condition>
<!-- If gate.home is not set from build.properties or the
environment variable GATE_HOME, assume that this
plugin is in GATE Developer's plugin directory -->
<property name="gate.home" location="../.." />
<!-- 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" />
<!-- 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" />
<!-- location for the generated JAR file -->
<property name="jar.location" location="${plugin.name}.jar" />
<!-- Classpath to compile - includes gate.jar, GATE/lib/*.jar and any local
library JAR files. -->
<path id="compile.classpath">
<pathelement location="${gate.jar}" />
<fileset dir="${gate.lib}">
<include name="**/*.jar" />
<include name="**/*.zip" />
</fileset>
</path>
<!--====================== Targets ============================-->
<target name="buildprops">
<tstamp>
<format property="builtat" pattern="yyyy-MM-dd-HH-mm-ss" timezone="America/New_York"/>
</tstamp>
<exec executable="svnversion" outputproperty="svnversion"/>
<exec executable="whoami" outputproperty="whoami"/>
<propertyfile file="version.properties"
comment="This file is automatically generated - DO NOT EDIT">
<entry key="buildtime" value="${builtat}"/>
<!-- <entry key="buildrepo" value="${svnversion}"/> -->
<entry key="builder" value="${user.name}"/>
<entry key="release" value="${release.version}"/>
<!--<entry key="version" value="${release.version}"/> -->
</propertyfile>
</target>
<!-- create build directory structure -->
<target name="prepare" depends="buildprops">
<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"
encoding="UTF-8"
source="1.7" />
</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 resources generated by tests -->
<target name="clean.tests">
<delete>
<fileset dir="." includes="TEST*.xml" />
</delete>
</target>
<!-- Clean up - remove .class and .jar files -->
<target name="clean" depends="clean.classes, clean.tests" >
<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.7">
<sourcepath>
<pathelement location="${src.dir}" />
</sourcepath>
<link href="http://docs.oracle.com/javase/7/docs/api/" />
<link href="../../../../doc/javadoc/" />
</javadoc>
</target>
<!-- Build everything - the code and JavaDoc -->
<target name="all" depends="jar, javadoc" />
<!-- Other targets:
build: build the plugin - just calls "jar" target
test : run the unit tests - there aren't any
distro.prepare: remove intermediate files that shouldn't be in the
distribution
-->
<target name="build" depends="jar" />
<target name="test" />
<target name="distro.prepare" depends="clean.classes, clean.tests" />
</project>