1282 |
25 Jan 11 |
nicklas |
1 |
<?xml version="1.0" encoding="UTF-8"?> |
1282 |
25 Jan 11 |
nicklas |
2 |
<project |
1282 |
25 Jan 11 |
nicklas |
3 |
name="Reggie" |
1282 |
25 Jan 11 |
nicklas |
4 |
default="build" |
1282 |
25 Jan 11 |
nicklas |
5 |
basedir="."> |
1282 |
25 Jan 11 |
nicklas |
6 |
|
1282 |
25 Jan 11 |
nicklas |
<!--create this file if you need to override values from properties below --> |
1282 |
25 Jan 11 |
nicklas |
8 |
<property file="build.properties" /> |
1282 |
25 Jan 11 |
nicklas |
9 |
|
1282 |
25 Jan 11 |
nicklas |
<!-- variables used --> |
1282 |
25 Jan 11 |
nicklas |
11 |
<property name="name" value="reggie" /> |
7446 |
20 Nov 23 |
nicklas |
12 |
<property name="version" value="4.51-dev" /> |
4185 |
28 Oct 16 |
nicklas |
13 |
<property name="delivery.version" value="1" /> |
1282 |
25 Jan 11 |
nicklas |
14 |
<property name="src" location="src" description="Location of source files" /> |
1282 |
25 Jan 11 |
nicklas |
15 |
<property name="build" location="build" description="Location of compiled files" /> |
1282 |
25 Jan 11 |
nicklas |
16 |
<property name="dist" location="dist" description="Directory where distribution should be created" /> |
1282 |
25 Jan 11 |
nicklas |
17 |
<property name="jar.name" value="${name}.jar" description="Name of JAR file with the extensions." /> |
1282 |
25 Jan 11 |
nicklas |
18 |
<property name="tar.prefix" value="${name}-${version}" description="Prefix of .tar.gz file for download." /> |
1282 |
25 Jan 11 |
nicklas |
19 |
<property name="tar.name" value="${tar.prefix}.tar.gz" description="Full name of .tar.gz file for download." /> |
5415 |
09 May 19 |
nicklas |
20 |
<property name="javac.arg" value="-Xlint:all,-path" /> |
5415 |
09 May 19 |
nicklas |
21 |
<property name="javac.source" value="11" /> |
5415 |
09 May 19 |
nicklas |
22 |
<property name="javac.target" value="11" /> |
1282 |
25 Jan 11 |
nicklas |
23 |
<property name="javac.encoding" value="UTF-8" /> |
1463 |
14 Nov 11 |
martin |
24 |
<property name="depend.base-version" |
7372 |
06 Oct 23 |
nicklas |
25 |
value="3.19.10" |
1463 |
14 Nov 11 |
martin |
26 |
description="The BASE version that this project depends on." |
1463 |
14 Nov 11 |
martin |
27 |
/> |
1282 |
25 Jan 11 |
nicklas |
28 |
<property name="depend.jars" |
6299 |
11 Jun 21 |
nicklas |
29 |
value="https://base.thep.lu.se/chrome/site/files/base/jars/${depend.base-version}" |
1463 |
14 Nov 11 |
martin |
30 |
description="The location of the BASE core JARs that this project depends on." |
1282 |
25 Jan 11 |
nicklas |
31 |
/> |
1282 |
25 Jan 11 |
nicklas |
32 |
|
1282 |
25 Jan 11 |
nicklas |
<!-- set up classpath for compiling --> |
1282 |
25 Jan 11 |
nicklas |
34 |
<path id="classpath"> |
1282 |
25 Jan 11 |
nicklas |
35 |
<fileset dir="lib"> |
1282 |
25 Jan 11 |
nicklas |
36 |
<include name="**/*.jar" /> |
1282 |
25 Jan 11 |
nicklas |
37 |
</fileset> |
2292 |
14 Mar 14 |
nicklas |
38 |
<fileset dir="META-INF/lib"> |
2292 |
14 Mar 14 |
nicklas |
39 |
<include name="**/*.jar" /> |
2292 |
14 Mar 14 |
nicklas |
40 |
</fileset> |
1282 |
25 Jan 11 |
nicklas |
41 |
</path> |
1282 |
25 Jan 11 |
nicklas |
42 |
|
1282 |
25 Jan 11 |
nicklas |
43 |
<target name="init"> |
1282 |
25 Jan 11 |
nicklas |
44 |
<mkdir dir="${build}" /> |
1282 |
25 Jan 11 |
nicklas |
45 |
<mkdir dir="${dist}" /> |
1282 |
25 Jan 11 |
nicklas |
46 |
</target> |
1282 |
25 Jan 11 |
nicklas |
47 |
|
1282 |
25 Jan 11 |
nicklas |
48 |
<target name="clean"> |
1282 |
25 Jan 11 |
nicklas |
49 |
<delete failonerror="false" includeemptydirs="true"> |
1282 |
25 Jan 11 |
nicklas |
50 |
<fileset dir="${build}" defaultexcludes="no" /> |
1282 |
25 Jan 11 |
nicklas |
51 |
<fileset dir="${dist}" defaultexcludes="no" /> |
2855 |
23 Oct 14 |
nicklas |
52 |
<fileset dir="lib/compile" includes="base-*.jar" /> |
1282 |
25 Jan 11 |
nicklas |
53 |
<fileset file="${jar.name}" /> |
1282 |
25 Jan 11 |
nicklas |
54 |
<fileset file="${tar.name}" /> |
1282 |
25 Jan 11 |
nicklas |
55 |
</delete> |
1282 |
25 Jan 11 |
nicklas |
56 |
</target> |
1282 |
25 Jan 11 |
nicklas |
57 |
|
1282 |
25 Jan 11 |
nicklas |
58 |
<target |
1282 |
25 Jan 11 |
nicklas |
59 |
name="dist" |
2855 |
23 Oct 14 |
nicklas |
60 |
depends="clean,download-lib,build" |
1282 |
25 Jan 11 |
nicklas |
61 |
> |
1282 |
25 Jan 11 |
nicklas |
62 |
<copy todir="${dist}"> |
2856 |
23 Oct 14 |
nicklas |
63 |
<fileset dir="." includes="README,LICENSE,config/*" /> |
1282 |
25 Jan 11 |
nicklas |
64 |
<fileset file="${jar.name}" /> |
1282 |
25 Jan 11 |
nicklas |
65 |
</copy> |
1282 |
25 Jan 11 |
nicklas |
66 |
</target> |
1282 |
25 Jan 11 |
nicklas |
67 |
|
1282 |
25 Jan 11 |
nicklas |
68 |
<target |
1282 |
25 Jan 11 |
nicklas |
69 |
name="package" |
1282 |
25 Jan 11 |
nicklas |
70 |
depends="dist" |
1282 |
25 Jan 11 |
nicklas |
71 |
description="Create binary distribution package" |
1282 |
25 Jan 11 |
nicklas |
72 |
> |
1282 |
25 Jan 11 |
nicklas |
73 |
<tar |
1282 |
25 Jan 11 |
nicklas |
74 |
destfile="${tar.name}" |
1282 |
25 Jan 11 |
nicklas |
75 |
longfile="gnu" |
1282 |
25 Jan 11 |
nicklas |
76 |
compression="gzip" |
1282 |
25 Jan 11 |
nicklas |
77 |
> |
1282 |
25 Jan 11 |
nicklas |
78 |
<tarfileset |
1282 |
25 Jan 11 |
nicklas |
79 |
dir="${dist}" |
1282 |
25 Jan 11 |
nicklas |
80 |
mode="755" |
1282 |
25 Jan 11 |
nicklas |
81 |
prefix="${tar.prefix}" |
1282 |
25 Jan 11 |
nicklas |
82 |
preserveLeadingSlashes="true" |
1282 |
25 Jan 11 |
nicklas |
83 |
> |
1282 |
25 Jan 11 |
nicklas |
84 |
<include name="**/*.sh" /> |
1282 |
25 Jan 11 |
nicklas |
85 |
</tarfileset> |
1282 |
25 Jan 11 |
nicklas |
86 |
<tarfileset |
1282 |
25 Jan 11 |
nicklas |
87 |
dir="${dist}" |
1282 |
25 Jan 11 |
nicklas |
88 |
prefix="${tar.prefix}" |
1282 |
25 Jan 11 |
nicklas |
89 |
preserveLeadingSlashes="true" |
1282 |
25 Jan 11 |
nicklas |
90 |
> |
1282 |
25 Jan 11 |
nicklas |
91 |
<exclude name="**/*.sh" /> |
1282 |
25 Jan 11 |
nicklas |
92 |
</tarfileset> |
1282 |
25 Jan 11 |
nicklas |
93 |
</tar> |
1282 |
25 Jan 11 |
nicklas |
94 |
</target> |
1282 |
25 Jan 11 |
nicklas |
95 |
|
1282 |
25 Jan 11 |
nicklas |
96 |
<target |
1282 |
25 Jan 11 |
nicklas |
97 |
name="install" |
1282 |
25 Jan 11 |
nicklas |
98 |
depends="build" |
1282 |
25 Jan 11 |
nicklas |
99 |
> |
1463 |
14 Nov 11 |
martin |
100 |
<fail unless="base.plugins" message="base.plugins is not set to the path of BASE plug-ins directory." /> |
1463 |
14 Nov 11 |
martin |
101 |
<copy todir="${base.plugins}"> |
1283 |
01 Feb 11 |
nicklas |
102 |
<fileset file="${jar.name}" /> |
1283 |
01 Feb 11 |
nicklas |
103 |
</copy> |
1463 |
14 Nov 11 |
martin |
104 |
<echo>Copied '${jar.name}' to '${base.plugins}'.</echo> |
1282 |
25 Jan 11 |
nicklas |
105 |
</target> |
1463 |
14 Nov 11 |
martin |
106 |
|
1282 |
25 Jan 11 |
nicklas |
107 |
|
1282 |
25 Jan 11 |
nicklas |
108 |
<target |
1282 |
25 Jan 11 |
nicklas |
109 |
name="build" |
1282 |
25 Jan 11 |
nicklas |
110 |
depends="init,checkjar" |
1282 |
25 Jan 11 |
nicklas |
111 |
description="Compiles the plugin and put in jar" |
1282 |
25 Jan 11 |
nicklas |
112 |
> |
1282 |
25 Jan 11 |
nicklas |
113 |
<mkdir dir="${build}" /> |
1282 |
25 Jan 11 |
nicklas |
114 |
<javac |
1282 |
25 Jan 11 |
nicklas |
115 |
encoding="${javac.encoding}" |
1282 |
25 Jan 11 |
nicklas |
116 |
srcdir="${src}" |
1282 |
25 Jan 11 |
nicklas |
117 |
destdir="${build}" |
1282 |
25 Jan 11 |
nicklas |
118 |
debug="true" |
1282 |
25 Jan 11 |
nicklas |
119 |
includeantruntime="false" |
1282 |
25 Jan 11 |
nicklas |
120 |
classpathref="classpath" |
1282 |
25 Jan 11 |
nicklas |
121 |
source="${javac.source}" |
1282 |
25 Jan 11 |
nicklas |
122 |
target="${javac.target}" |
1282 |
25 Jan 11 |
nicklas |
123 |
> |
1282 |
25 Jan 11 |
nicklas |
124 |
<compilerarg value="${javac.arg}" /> |
1282 |
25 Jan 11 |
nicklas |
125 |
</javac> |
4814 |
16 May 18 |
nicklas |
126 |
<copy todir="${build}"> |
4814 |
16 May 18 |
nicklas |
127 |
<fileset dir="${src}"> |
4814 |
16 May 18 |
nicklas |
128 |
<include name="**/*" /> |
4814 |
16 May 18 |
nicklas |
129 |
<exclude name="**/*.java" /> |
4814 |
16 May 18 |
nicklas |
130 |
</fileset> |
4814 |
16 May 18 |
nicklas |
131 |
</copy> |
1282 |
25 Jan 11 |
nicklas |
132 |
<jar |
1282 |
25 Jan 11 |
nicklas |
133 |
jarfile="${jar.name}" |
1283 |
01 Feb 11 |
nicklas |
134 |
manifest="META-INF/MANIFEST.MF" |
1282 |
25 Jan 11 |
nicklas |
135 |
> |
1283 |
01 Feb 11 |
nicklas |
136 |
<fileset dir="${build}" /> |
1283 |
01 Feb 11 |
nicklas |
137 |
<fileset dir="." includes="META-INF/**" /> |
1283 |
01 Feb 11 |
nicklas |
138 |
<fileset dir="." includes="resources/**" /> |
1282 |
25 Jan 11 |
nicklas |
139 |
</jar> |
1282 |
25 Jan 11 |
nicklas |
140 |
</target> |
1282 |
25 Jan 11 |
nicklas |
141 |
|
1282 |
25 Jan 11 |
nicklas |
142 |
<target |
1282 |
25 Jan 11 |
nicklas |
143 |
name="checkjar" |
1463 |
14 Nov 11 |
martin |
144 |
description="Checks that required BASE JAR files exists" |
1282 |
25 Jan 11 |
nicklas |
145 |
> |
1282 |
25 Jan 11 |
nicklas |
146 |
<available classname="net.sf.basedb.core.Application" |
1463 |
14 Nov 11 |
martin |
147 |
classpathref="classpath" property="base-core" /> |
5628 |
24 Sep 19 |
nicklas |
148 |
<available classname="net.sf.basedb.plugins.util.Parameters" |
5628 |
24 Sep 19 |
nicklas |
149 |
classpathref="classpath" property="base-coreplugins" /> |
1282 |
25 Jan 11 |
nicklas |
150 |
<available classname="net.sf.basedb.clients.web.Base" |
1463 |
14 Nov 11 |
martin |
151 |
classpathref="classpath" property="base-web" /> |
1463 |
14 Nov 11 |
martin |
152 |
<fail unless="base-core" message="Can't find base-core-${depend.base-version}.jar in ./lib/compile. Try 'ant download-lib' to download the missing file." /> |
5628 |
24 Sep 19 |
nicklas |
153 |
<fail unless="base-coreplugins" message="Can't find base-coreplugins-${depend.base-version}.jar in ./lib/compile. Try 'ant download-lib' to download the missing file." /> |
1463 |
14 Nov 11 |
martin |
154 |
<fail unless="base-web" message="Can't find base-webclient-${depend.base-version}.jar in ./lib/compile. Try 'ant download-lib' to download the missing file." /> |
1463 |
14 Nov 11 |
martin |
155 |
<echo>Found all requried BASE core JAR files.</echo> |
1282 |
25 Jan 11 |
nicklas |
156 |
</target> |
1282 |
25 Jan 11 |
nicklas |
157 |
|
1282 |
25 Jan 11 |
nicklas |
158 |
<target |
1282 |
25 Jan 11 |
nicklas |
159 |
name="download-lib" |
1463 |
14 Nov 11 |
martin |
160 |
description="Download required BASE core jar files" |
1282 |
25 Jan 11 |
nicklas |
161 |
> |
1282 |
25 Jan 11 |
nicklas |
162 |
<echo> |
1282 |
25 Jan 11 |
nicklas |
163 |
------------------------------------------------------- |
1282 |
25 Jan 11 |
nicklas |
164 |
NOTE! You may specifiy a different download location by |
1282 |
25 Jan 11 |
nicklas |
165 |
creating the file './build.properties' and |
1282 |
25 Jan 11 |
nicklas |
166 |
setting 'depend.jars' to the URL to download from. |
1282 |
25 Jan 11 |
nicklas |
167 |
------------------------------------------------------- |
1282 |
25 Jan 11 |
nicklas |
168 |
</echo> |
1463 |
14 Nov 11 |
martin |
169 |
<download-lib file="base-core-${depend.base-version}.jar" /> |
5628 |
24 Sep 19 |
nicklas |
170 |
<download-lib file="base-coreplugins-${depend.base-version}.jar" /> |
1463 |
14 Nov 11 |
martin |
171 |
<download-lib file="base-webclient-${depend.base-version}.jar" /> |
1282 |
25 Jan 11 |
nicklas |
172 |
</target> |
1282 |
25 Jan 11 |
nicklas |
173 |
|
1282 |
25 Jan 11 |
nicklas |
174 |
<macrodef name="download-lib" description="Download BASE core JAR files"> |
1282 |
25 Jan 11 |
nicklas |
175 |
<attribute name="file" /> |
1282 |
25 Jan 11 |
nicklas |
176 |
<sequential> |
1282 |
25 Jan 11 |
nicklas |
177 |
<get |
1282 |
25 Jan 11 |
nicklas |
178 |
dest="lib/compile/@{file}" |
1282 |
25 Jan 11 |
nicklas |
179 |
src="${depend.jars}/@{file}" |
1282 |
25 Jan 11 |
nicklas |
180 |
usetimestamp="true" |
1282 |
25 Jan 11 |
nicklas |
181 |
verbose="true" |
1282 |
25 Jan 11 |
nicklas |
182 |
ignoreerrors="true" |
1282 |
25 Jan 11 |
nicklas |
183 |
/> |
1282 |
25 Jan 11 |
nicklas |
184 |
</sequential> |
1282 |
25 Jan 11 |
nicklas |
185 |
</macrodef> |
1302 |
28 Feb 11 |
nicklas |
186 |
|
1302 |
28 Feb 11 |
nicklas |
187 |
<target name="update-version"> |
1302 |
28 Feb 11 |
nicklas |
188 |
<echo>Setting version to: ${version}</echo> |
1302 |
28 Feb 11 |
nicklas |
189 |
|
1302 |
28 Feb 11 |
nicklas |
190 |
<echo>Reggie.java</echo> |
1302 |
28 Feb 11 |
nicklas |
191 |
<replaceregexp |
1302 |
28 Feb 11 |
nicklas |
192 |
file="${src}/net/sf/basedb/reggie/Reggie.java" |
6837 |
05 Sep 22 |
nicklas |
193 |
match="String VERSION = ".*"" |
6837 |
05 Sep 22 |
nicklas |
194 |
replace="String VERSION = "${version}"" |
1302 |
28 Feb 11 |
nicklas |
195 |
encoding="UTF-8" |
1302 |
28 Feb 11 |
nicklas |
196 |
/> |
2801 |
13 Oct 14 |
nicklas |
197 |
|
2801 |
13 Oct 14 |
nicklas |
198 |
<echo>reggie-2.js</echo> |
2801 |
13 Oct 14 |
nicklas |
199 |
<replaceregexp |
2801 |
13 Oct 14 |
nicklas |
200 |
file="resources/reggie-2.js" |
2801 |
13 Oct 14 |
nicklas |
201 |
match="reggie.VERSION = '.*';" |
2801 |
13 Oct 14 |
nicklas |
202 |
replace="reggie.VERSION = '${version}';" |
2801 |
13 Oct 14 |
nicklas |
203 |
encoding="UTF-8" |
2801 |
13 Oct 14 |
nicklas |
204 |
/> |
1302 |
28 Feb 11 |
nicklas |
205 |
|
1302 |
28 Feb 11 |
nicklas |
206 |
<echo>extensions.xml</echo> |
1302 |
28 Feb 11 |
nicklas |
207 |
<replaceregexp |
1302 |
28 Feb 11 |
nicklas |
208 |
file="META-INF/extensions.xml" |
1302 |
28 Feb 11 |
nicklas |
209 |
match="<version>.*</version>" |
1302 |
28 Feb 11 |
nicklas |
210 |
replace="<version>${version}</version>" |
1302 |
28 Feb 11 |
nicklas |
211 |
encoding="UTF-8" |
1302 |
28 Feb 11 |
nicklas |
212 |
/> |
1463 |
14 Nov 11 |
martin |
213 |
<replaceregexp |
1463 |
14 Nov 11 |
martin |
214 |
file="META-INF/extensions.xml" |
1463 |
14 Nov 11 |
martin |
215 |
match="<min-base-version>.*</min-base-version>" |
1463 |
14 Nov 11 |
martin |
216 |
replace="<min-base-version>${depend.base-version}</min-base-version>" |
1463 |
14 Nov 11 |
martin |
217 |
encoding="UTF-8" |
1463 |
14 Nov 11 |
martin |
218 |
/> |
4185 |
28 Oct 16 |
nicklas |
219 |
|
5363 |
16 Apr 19 |
nicklas |
220 |
<echo>.classpath</echo> |
5363 |
16 Apr 19 |
nicklas |
221 |
<replaceregexp |
5363 |
16 Apr 19 |
nicklas |
222 |
file=".classpath" |
5363 |
16 Apr 19 |
nicklas |
223 |
match="base-(\w+)-[0-9.]+jar" |
5363 |
16 Apr 19 |
nicklas |
224 |
replace="base-\1-${depend.base-version}.jar" |
5363 |
16 Apr 19 |
nicklas |
225 |
encoding="UTF-8" |
5363 |
16 Apr 19 |
nicklas |
226 |
byline="true" |
5363 |
16 Apr 19 |
nicklas |
227 |
/> |
5363 |
16 Apr 19 |
nicklas |
228 |
|
4185 |
28 Oct 16 |
nicklas |
229 |
<echo>delivery.css</echo> |
4185 |
28 Oct 16 |
nicklas |
230 |
<replaceregexp |
4185 |
28 Oct 16 |
nicklas |
231 |
file="resources/delivery/delivery.css" |
4185 |
28 Oct 16 |
nicklas |
232 |
match="'SCAN-B Delivery Client v.*';" |
4185 |
28 Oct 16 |
nicklas |
233 |
replace="'SCAN-B Delivery Client v${delivery.version}';" |
4185 |
28 Oct 16 |
nicklas |
234 |
encoding="UTF-8" |
4185 |
28 Oct 16 |
nicklas |
235 |
/> |
1302 |
28 Feb 11 |
nicklas |
236 |
|
1302 |
28 Feb 11 |
nicklas |
237 |
<echo>Don't forget to commit the changes to the subversion repository!</echo> |
1302 |
28 Feb 11 |
nicklas |
238 |
</target> |
1302 |
28 Feb 11 |
nicklas |
239 |
|
1282 |
25 Jan 11 |
nicklas |
240 |
</project> |