-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
106 lines (80 loc) · 3.83 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
<!--======================================================================
Build file for OpenSextantCRF
=======================================================================-->
<project name="OpenSextantCRF" basedir="." default="build" xmlns:ivy="antlib:org.apache.ivy.ant">
<!-- include properties -->
<property file="build.properties" />
<!--set the time stamps -->
<tstamp />
<!-- Project level properties -->
<property name="project.name" value="OpenSextantCRF" />
<property name="version" value="0.1" />
<property name="releaseStatus" value="integration" />
<property name="java_target_version" value="1.7" />
<!-- Source directory - contains the Java source files for this project -->
<property name="src.dir" location="src" />
<!-- directory to contain the created jars -->
<property name="build.dir" location="build" />
<!-- documentation directories -->
<property name="doc.dir" location="${basedir}/doc" />
<property name="javadoc.dir" location="${doc.dir}/javadoc" />
<!-- lib directories -->
<property name="lib.dir" location="lib" />
<!-- resources directories -->
<property name="resources.dir" location="resources" />
<!-- location for the generated JAR files -->
<property name="jar.location" location="${build.dir}/opensextantCRF.jar" />
<!-- location of the license file -->
<property name="license.location" location="LICENSE.txt" />
<!-- Classpath for compiling -->
<path id="compile.classpath">
<fileset dir="${lib.dir}" includes="**/*.jar" />
</path>
<!-- Properties for local GATE install -->
<property name="gate.plugin.dir" location="${gate.home}/plugins" />
<property name="plugin.dir" location="${gate.plugin.dir}/${project.name}" />
<!--====================== Targets ============================-->
<!-- delete created jars,retrieved dependencies,javadocs and previous releases-->
<target name="clean">
<delete dir="${build.dir}" />
<delete dir="${lib.dir}" />
<delete dir="${javadoc.dir}" />
<mkdir dir="${build.dir}" />
<mkdir dir="${lib.dir}" />
<mkdir dir="${javadoc.dir}" />
</target>
<!-- set the proxy if behind a firewall (needed for ivy) -->
<target name="setProxy">
<setproxy proxyhost="${proxy.host}" proxyport="${proxy.port}" />
</target>
<!-- get all the ivy defined dependencies -->
<target name="getDependencies" depends="setProxy,clean">
<ivy:retrieve pattern="${ivy.lib.dir}/[conf]/[artifact].[ext]" />
<ivy:report todir="${build.dir}/ivy-report" graph="false" />
</target>
<!-- compile the source -->
<target name="compile" depends="clean,getDependencies">
<javac classpathref="compile.classpath" srcdir="${src.dir}" destdir="${build.dir}" debug="true" debuglevel="lines,source" source="${java_target_version}" target="${java_target_version}" encoding="utf-8" />
</target>
<!-- create the JAR files -->
<target name="jar" depends="compile">
<jar destfile="${jar.location}" update="false" basedir="${build.dir}" />
</target>
<target name="plugin" depends="jar">
<!-- zip up the plugin jar and the creole.xml -->
<zip destfile="${build.dir}/${project.name}.zip">
<zipfileset file="${basedir}/creole.xml" prefix="${project.name}" />
<zipfileset file="${jar.location}" prefix="${project.name}" />
<zipfileset dir="${lib.dir}/runtime" prefix="${project.name}/lib" />
<zipfileset dir="${resources.dir}" prefix="${project.name}/resources" />
</zip>
</target>
<!-- Main target: Build the whole thing -->
<target name="build" depends="plugin" />
<!-- deploy OpenSextantCRF to a local GATE installation to test -->
<target name="deploy" depends="build">
<delete dir="${plugin.dir}" />
<!-- unzip the CRF plugin zip into GATE_HOME/plugins -->
<unzip src="${build.dir}/${project.name}.zip" dest="${gate.plugin.dir}" />
</target>
</project>