-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.xml
176 lines (149 loc) · 5.63 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
<?xml version="1.0"?>
<project name="JEQL Buildfile" default="all" basedir=".">
<description>
Ant build script for JEQL
</description>
<!-- ================================================================== -->
<!-- Properties -->
<!-- ================================================================== -->
<target name="props">
<property file="${basedir}/build.properties"/>
<property name="base.src" value="${basedir}/modules/jeql/src/main/java"/>
<property name="base.lib" value="${basedir}/java/lib"/>
<property name="base.lib-nodist" value="${basedir}/java/lib-nodist"/>
<property name="base.doc" value="${basedir}/doc"/>
<property name="base.bin" value="${basedir}/bin"/>
<property name="base.dist" value="${basedir}/dist"/>
<property name="base.script" value="${basedir}/script"/>
<property name="jeqlw.src" value="${basedir}/modules/jeqlw/src/main/java"/>
<property name="build" value="${basedir}/build"/>
<property name="build.classes" value="${build}/classes/jeql"/>
<property name="jeqlw.classes" value="${build}/classes/jeqlw"/>
<property name="test" value="test"/>
<property name="dist" value="${build}/dist"/>
<property name="dist.src" value="${dist}/src"/>
<property name="dist.lib" value="${dist}/lib"/>
<property name="dist.doc" value="${dist}/doc"/>
<property name="dist.javadoc" value="${dist}/doc/javadoc"/>
<!--property name="dist.jts-jar" value="${dist.lib}\jts-${jts.version}.jar" /-->
<property name="zipfile" value="jeql-${release.version}.zip"/>
<property name="doc-dir" value="doc"/>
</target>
<!-- ================================================================== -->
<!-- Targets -->
<!-- ================================================================== -->
<target name="copy-dist"
description="Copy the distro files">
<mkdir dir="${dist}"/>
<delete includeemptydirs="true">
<fileset dir="${dist}" includes="**/*"/>
</delete>
<mkdir dir="${dist.lib}"/>
<!--
<copy todir="${dist.src}">
<fileset dir="${base.src}"
excludes=""/>
</copy>
-->
<!-- clean & load the jars -->
<copy todir="${dist}\lib">
<fileset dir="${base.lib}" />
</copy>
<copy todir="${dist}\doc">
<fileset dir="${base.doc}" />
</copy>
<copy todir="${dist}\bin">
<fileset dir="${base.bin}" />
</copy>
<copy todir="${dist}\script">
<fileset dir="${base.script}" />
</copy>
<copy todir="${dist}">
<fileset dir="${base.dist}" />
</copy>
</target>
<target name="jar"
description="Builds main jar" depends="copy-dist">
<delete dir="${build.classes}"/>
<mkdir dir="${build.classes}"/>
<javac srcdir="${base.src}"
debug="yes"
includes="**/*.java"
excludes=""
destdir="${build.classes}">
<classpath>
<fileset dir="${base.lib}">
<include name="**/*.jar"/>
</fileset>
<fileset dir="${base.lib-nodist}">
<include name="**/*.jar"/>
</fileset>
</classpath>
</javac>
<delete file="${dist.lib}/jeql-*" failonerror="false"/>
<mkdir dir="${dist.lib}"/>
<jar jarfile="${dist.lib}\jeql-${release.version}.jar"
basedir="${build.classes}"/>
</target>
<target name="jeqlw-jar"
description="Builds jeqlw jar" depends="copy-dist, jar">
<delete dir="${jeqlw.classes}"/>
<mkdir dir="${jeqlw.classes}"/>
<javac srcdir="${jeqlw.src}"
debug="yes"
includes="**/*.java"
excludes=""
destdir="${jeqlw.classes}">
<classpath>
<pathelement location="${build.classes}"/>
<fileset dir="${base.lib}">
<include name="**/*.jar"/>
</fileset>
<fileset dir="${base.lib-nodist}">
<include name="**/*.jar"/>
</fileset>
</classpath>
</javac>
<copy todir="${jeqlw.classes}/jeql/workbench">
<fileset dir="${jeqlw.src}/jeql/workbench" includes="*.gif,*.png"/>
</copy>
<copy todir="${jeqlw.classes}/jeql/workbench/ui/data">
<fileset dir="${jeqlw.src}/jeql/workbench/ui/data" includes="*.gif,*.png"/>
</copy>
<copy todir="${jeqlw.classes}/jeql/workbench/images">
<fileset dir="${jeqlw.src}/jeql/workbench/images" includes="*.gif,*.png"/>
</copy>
<delete file="${dist.lib}/jeqlw-*" failonerror="false"/>
<mkdir dir="${dist.lib}"/>
<jar jarfile="${dist.lib}\jeqlw-${release.version}.jar"
basedir="${jeqlw.classes}"/>
</target>
<target name="javadoc" depends="copy-dist"
description="Generates the JavaDoc files">
<javadoc packagenames="jeql.api.*"
destdir="${dist.javadoc}">
<sourcepath location="${base.src}"/>
</javadoc>
</target>
<target name="make-dist" depends="props"
description="Zips all files into a distro archive">
<zip destfile="${build}/jeql-${release.version}.zip"
basedir="${dist}" />
</target>
<target name="zip-src" depends="props"
description="Zips src files into a backup archive">
<zip destfile="${build}/jeql-src-${release.version}.zip"
basedir="${base.src}"
includes="**/*" />
</target>
<target name="OLDzip-build" depends="props"
description="Zips src files into a backup archive">
<zip destfile="${build}/jeql-srcbuild-${release.version}.zip"
basedir="${base}" />
</target>
<target name="build" depends="copy-dist, jar, jeqlw-jar"
description="Cleans, compiles, builds jars, generates javadoc">
</target>
<target name="all" depends="props, build, make-dist, zip-src"
description="Compiles and builds the distro archive"/>
</project>