-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.xml
88 lines (73 loc) · 3.38 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
<?xml version="1.0" encoding="UTF-8"?>
<!--+
|
| GOKb Utilities extension build file for OpenRefine.
| This Ant file will build the gokb utilities extension from within a pre-built version of OpenRefine.
|
+-->
<project name="refine-gokbutils-extension" default="build" basedir=".">
<tstamp/>
<property name="name" value="gokbutils"/>
<property name="version" value="0.1"/>
<property name="revision" value="${DSTAMP}${TSTAMP}"/>
<property name="fullname" value="${name}-${version}-${revision}" />
<property name="refine.dir" value="${basedir}/../../" />
<property name="main.dir" value="${refine.dir}/main" />
<property name="dist.dir" value="${refine.dir}/dist"/>
<property name="ext.dir" value="${dist.dir}/${name}"/>
<property name="server.lib.dir" value="${refine.dir}/server/lib" />
<property name="refine.webinf.dir" value="${main.dir}/webapp/WEB-INF" />
<property name="refine.modinf.dir" value="${main.dir}/webapp/modules/core/MOD-INF" />
<property name="refine.classes.dir" value="${refine.webinf.dir}/classes" />
<property name="refine.lib.dir" value="${refine.webinf.dir}/lib" />
<property name="src.dir" value="${basedir}/src" />
<property name="module.dir" value="${basedir}/module" />
<property name="modinf.dir" value="${module.dir}/MOD-INF" />
<property name="lib.dir" value="${modinf.dir}/lib" />
<property name="classes.dir" value="${modinf.dir}/classes" />
<property name="java.specification.version" value="1.7" />
<path id="class.path">
<fileset dir="${lib.dir}">
<include name="**/*.jar" />
</fileset>
<fileset dir="${refine.lib.dir}">
<include name="**/*.jar" />
</fileset>
<fileset dir="${server.lib.dir}">
<include name="**/*.jar" />
</fileset>
<pathelement path="${refine.classes.dir}"/>
</path>
<target name="build_java">
<mkdir dir="${classes.dir}" />
<mkdir dir="${lib.dir}" />
<javac source="${java.specification.version}" target="${java.specification.version}" encoding="utf-8" destdir="${classes.dir}" debug="true" includeAntRuntime="no">
<src path="${src.dir}"/>
<classpath refid="class.path" />
</javac>
</target>
<target name="build" depends="build_java"/>
<target name="dist" depends="build">
<mkdir dir="${dist.dir}"/>
<mkdir dir="${ext.dir}"/>
<copy todir="${ext.dir}/module">
<fileset dir="module">
<include name="**/*"/>
<exclude name="**/lib-src/*"/>
<exclude name="**/src/*"/>
</fileset>
</copy>
<zip destfile="${dist.dir}/${fullname}.zip">
<zipfileset dir="${dist.dir}">
<include name="${name}/**"/>
</zipfileset>
</zip>
<delete dir="${ext.dir}"/>
</target>
<target name="clean">
<delete dir="${classes.dir}" />
</target>
<target name="distclean">
<delete dir="${dist.dir}" />
</target>
</project>