4062 |
25 Aug 16 |
nicklas |
1 |
<?xml version="1.0" encoding="UTF-8"?> |
4062 |
25 Aug 16 |
nicklas |
2 |
<project |
4062 |
25 Aug 16 |
nicklas |
3 |
name="OpenGridSchedulerService" |
4062 |
25 Aug 16 |
nicklas |
4 |
default="build" |
4062 |
25 Aug 16 |
nicklas |
5 |
basedir="."> |
4062 |
25 Aug 16 |
nicklas |
6 |
|
4062 |
25 Aug 16 |
nicklas |
<!--create this file if you need to override values from properties below --> |
4062 |
25 Aug 16 |
nicklas |
8 |
<property file="build.properties" /> |
4062 |
25 Aug 16 |
nicklas |
9 |
|
4062 |
25 Aug 16 |
nicklas |
<!-- variables used --> |
4062 |
25 Aug 16 |
nicklas |
11 |
<property name="name" value="opengrid" /> |
7385 |
24 Oct 23 |
nicklas |
12 |
<property name="version" value="1.13-dev" /> |
4062 |
25 Aug 16 |
nicklas |
13 |
<property name="src" location="src" description="Location of source files" /> |
4062 |
25 Aug 16 |
nicklas |
14 |
<property name="build" location="build" description="Location of compiled files" /> |
4062 |
25 Aug 16 |
nicklas |
15 |
<property name="dist" location="dist" description="Directory where distribution should be created" /> |
4062 |
25 Aug 16 |
nicklas |
16 |
<property name="jar.name" value="${name}.jar" description="Name of JAR file with the extensions." /> |
4062 |
25 Aug 16 |
nicklas |
17 |
<property name="tar.prefix" value="${name}-${version}" description="Prefix of .tar.gz file for download." /> |
4062 |
25 Aug 16 |
nicklas |
18 |
<property name="tar.name" value="${tar.prefix}.tar.gz" description="Full name of .tar.gz file for download." /> |
4062 |
25 Aug 16 |
nicklas |
19 |
<property name="javac.arg" value="-Xlint:unchecked" /> |
5505 |
17 Jun 19 |
nicklas |
20 |
<property name="javac.release" value="11" /> |
4062 |
25 Aug 16 |
nicklas |
21 |
<property name="javac.encoding" value="UTF-8" /> |
4062 |
25 Aug 16 |
nicklas |
22 |
<property name="depend.base-version" |
7058 |
13 Mar 23 |
nicklas |
23 |
value="3.19.8" |
4062 |
25 Aug 16 |
nicklas |
24 |
description="The BASE version that this project depends on." |
4062 |
25 Aug 16 |
nicklas |
25 |
/> |
4062 |
25 Aug 16 |
nicklas |
26 |
<property name="depend.jars" |
6293 |
11 Jun 21 |
nicklas |
27 |
value="https://base.thep.lu.se/chrome/site/files/base/jars/${depend.base-version}" |
4062 |
25 Aug 16 |
nicklas |
28 |
description="The location of the BASE core JARs that this project depends on." |
4062 |
25 Aug 16 |
nicklas |
29 |
/> |
4062 |
25 Aug 16 |
nicklas |
30 |
|
4062 |
25 Aug 16 |
nicklas |
<!-- set up classpath for compiling --> |
4062 |
25 Aug 16 |
nicklas |
32 |
<path id="classpath"> |
4062 |
25 Aug 16 |
nicklas |
33 |
<fileset dir="lib"> |
4062 |
25 Aug 16 |
nicklas |
34 |
<include name="**/*.jar" /> |
4062 |
25 Aug 16 |
nicklas |
35 |
</fileset> |
4062 |
25 Aug 16 |
nicklas |
36 |
<fileset dir="META-INF/lib"> |
4062 |
25 Aug 16 |
nicklas |
37 |
<include name="**/*.jar" /> |
4062 |
25 Aug 16 |
nicklas |
38 |
</fileset> |
4062 |
25 Aug 16 |
nicklas |
39 |
</path> |
4062 |
25 Aug 16 |
nicklas |
40 |
|
4062 |
25 Aug 16 |
nicklas |
41 |
<target name="init"> |
4062 |
25 Aug 16 |
nicklas |
42 |
<mkdir dir="${build}" /> |
4062 |
25 Aug 16 |
nicklas |
43 |
<mkdir dir="${dist}" /> |
4062 |
25 Aug 16 |
nicklas |
44 |
</target> |
4062 |
25 Aug 16 |
nicklas |
45 |
|
4062 |
25 Aug 16 |
nicklas |
46 |
<target name="clean"> |
4062 |
25 Aug 16 |
nicklas |
47 |
<delete failonerror="false" includeemptydirs="true"> |
4062 |
25 Aug 16 |
nicklas |
48 |
<fileset dir="${build}" defaultexcludes="no" /> |
4062 |
25 Aug 16 |
nicklas |
49 |
<fileset dir="${dist}" defaultexcludes="no" /> |
5564 |
14 Aug 19 |
nicklas |
50 |
<fileset dir="lib" includes="base-*.jar" /> |
4062 |
25 Aug 16 |
nicklas |
51 |
<fileset file="${jar.name}" /> |
4062 |
25 Aug 16 |
nicklas |
52 |
<fileset file="${tar.name}" /> |
4062 |
25 Aug 16 |
nicklas |
53 |
</delete> |
4062 |
25 Aug 16 |
nicklas |
54 |
</target> |
4062 |
25 Aug 16 |
nicklas |
55 |
|
4062 |
25 Aug 16 |
nicklas |
56 |
<target |
4062 |
25 Aug 16 |
nicklas |
57 |
name="dist" |
4298 |
13 Jan 17 |
nicklas |
58 |
depends="clean,download-lib,build,doc" |
4062 |
25 Aug 16 |
nicklas |
59 |
> |
4062 |
25 Aug 16 |
nicklas |
60 |
<copy todir="${dist}"> |
4298 |
13 Jan 17 |
nicklas |
61 |
<fileset dir="." includes="README,LICENSE,opengrid-config.xml" /> |
4062 |
25 Aug 16 |
nicklas |
62 |
<fileset file="${jar.name}" /> |
4062 |
25 Aug 16 |
nicklas |
63 |
</copy> |
4062 |
25 Aug 16 |
nicklas |
64 |
</target> |
4062 |
25 Aug 16 |
nicklas |
65 |
|
4062 |
25 Aug 16 |
nicklas |
66 |
<target |
4062 |
25 Aug 16 |
nicklas |
67 |
name="package" |
4062 |
25 Aug 16 |
nicklas |
68 |
depends="dist" |
4062 |
25 Aug 16 |
nicklas |
69 |
description="Create binary distribution package" |
4062 |
25 Aug 16 |
nicklas |
70 |
> |
4062 |
25 Aug 16 |
nicklas |
71 |
<tar |
4062 |
25 Aug 16 |
nicklas |
72 |
destfile="${tar.name}" |
4062 |
25 Aug 16 |
nicklas |
73 |
longfile="gnu" |
4062 |
25 Aug 16 |
nicklas |
74 |
compression="gzip" |
4062 |
25 Aug 16 |
nicklas |
75 |
> |
4062 |
25 Aug 16 |
nicklas |
76 |
<tarfileset |
4062 |
25 Aug 16 |
nicklas |
77 |
dir="${dist}" |
4062 |
25 Aug 16 |
nicklas |
78 |
mode="755" |
4062 |
25 Aug 16 |
nicklas |
79 |
prefix="${tar.prefix}" |
4062 |
25 Aug 16 |
nicklas |
80 |
preserveLeadingSlashes="true" |
4062 |
25 Aug 16 |
nicklas |
81 |
> |
4062 |
25 Aug 16 |
nicklas |
82 |
<include name="**/*.sh" /> |
4062 |
25 Aug 16 |
nicklas |
83 |
</tarfileset> |
4062 |
25 Aug 16 |
nicklas |
84 |
<tarfileset |
4062 |
25 Aug 16 |
nicklas |
85 |
dir="${dist}" |
4062 |
25 Aug 16 |
nicklas |
86 |
prefix="${tar.prefix}" |
4062 |
25 Aug 16 |
nicklas |
87 |
preserveLeadingSlashes="true" |
4062 |
25 Aug 16 |
nicklas |
88 |
> |
4062 |
25 Aug 16 |
nicklas |
89 |
<exclude name="**/*.sh" /> |
4062 |
25 Aug 16 |
nicklas |
90 |
</tarfileset> |
4062 |
25 Aug 16 |
nicklas |
91 |
</tar> |
4062 |
25 Aug 16 |
nicklas |
92 |
</target> |
4062 |
25 Aug 16 |
nicklas |
93 |
|
4062 |
25 Aug 16 |
nicklas |
94 |
<target |
4062 |
25 Aug 16 |
nicklas |
95 |
name="install" |
4062 |
25 Aug 16 |
nicklas |
96 |
depends="build" |
4062 |
25 Aug 16 |
nicklas |
97 |
> |
4062 |
25 Aug 16 |
nicklas |
98 |
<fail unless="base.plugins" message="base.plugins is not set to the path of BASE plug-ins directory." /> |
4062 |
25 Aug 16 |
nicklas |
99 |
<copy todir="${base.plugins}"> |
4062 |
25 Aug 16 |
nicklas |
100 |
<fileset file="${jar.name}" /> |
4062 |
25 Aug 16 |
nicklas |
101 |
</copy> |
4062 |
25 Aug 16 |
nicklas |
102 |
<echo>Copied '${jar.name}' to '${base.plugins}'.</echo> |
4062 |
25 Aug 16 |
nicklas |
103 |
</target> |
4062 |
25 Aug 16 |
nicklas |
104 |
|
4062 |
25 Aug 16 |
nicklas |
105 |
|
4062 |
25 Aug 16 |
nicklas |
106 |
<target |
4062 |
25 Aug 16 |
nicklas |
107 |
name="build" |
4062 |
25 Aug 16 |
nicklas |
108 |
depends="init,checkjar" |
4062 |
25 Aug 16 |
nicklas |
109 |
description="Compiles the plugin and put in jar" |
4062 |
25 Aug 16 |
nicklas |
110 |
> |
4062 |
25 Aug 16 |
nicklas |
111 |
<mkdir dir="${build}" /> |
4062 |
25 Aug 16 |
nicklas |
112 |
<javac |
4062 |
25 Aug 16 |
nicklas |
113 |
encoding="${javac.encoding}" |
4062 |
25 Aug 16 |
nicklas |
114 |
srcdir="${src}" |
4062 |
25 Aug 16 |
nicklas |
115 |
destdir="${build}" |
4062 |
25 Aug 16 |
nicklas |
116 |
debug="true" |
4062 |
25 Aug 16 |
nicklas |
117 |
includeantruntime="false" |
4062 |
25 Aug 16 |
nicklas |
118 |
classpathref="classpath" |
5505 |
17 Jun 19 |
nicklas |
119 |
release="${javac.release}" |
4062 |
25 Aug 16 |
nicklas |
120 |
> |
4062 |
25 Aug 16 |
nicklas |
121 |
<compilerarg value="${javac.arg}" /> |
4062 |
25 Aug 16 |
nicklas |
122 |
</javac> |
6614 |
28 Feb 22 |
nicklas |
123 |
<copy todir="${build}"> |
6614 |
28 Feb 22 |
nicklas |
124 |
<fileset dir="${src}"> |
6614 |
28 Feb 22 |
nicklas |
125 |
<include name="**/*" /> |
6614 |
28 Feb 22 |
nicklas |
126 |
<exclude name="**/*.java" /> |
6614 |
28 Feb 22 |
nicklas |
127 |
</fileset> |
6614 |
28 Feb 22 |
nicklas |
128 |
</copy> |
4062 |
25 Aug 16 |
nicklas |
129 |
<jar |
4062 |
25 Aug 16 |
nicklas |
130 |
jarfile="${jar.name}" |
4062 |
25 Aug 16 |
nicklas |
131 |
manifest="META-INF/MANIFEST.MF" |
4062 |
25 Aug 16 |
nicklas |
132 |
> |
4062 |
25 Aug 16 |
nicklas |
133 |
<fileset dir="${build}" /> |
4062 |
25 Aug 16 |
nicklas |
134 |
<fileset dir="." includes="META-INF/**" /> |
4062 |
25 Aug 16 |
nicklas |
135 |
<fileset dir="." includes="resources/**" /> |
4062 |
25 Aug 16 |
nicklas |
136 |
</jar> |
4062 |
25 Aug 16 |
nicklas |
137 |
</target> |
4062 |
25 Aug 16 |
nicklas |
138 |
|
4062 |
25 Aug 16 |
nicklas |
139 |
<target |
4062 |
25 Aug 16 |
nicklas |
140 |
name="checkjar" |
4062 |
25 Aug 16 |
nicklas |
141 |
description="Checks that required BASE JAR files exists" |
4062 |
25 Aug 16 |
nicklas |
142 |
> |
4062 |
25 Aug 16 |
nicklas |
143 |
<available classname="net.sf.basedb.core.Application" |
4062 |
25 Aug 16 |
nicklas |
144 |
classpathref="classpath" property="base-core" /> |
4067 |
02 Sep 16 |
nicklas |
145 |
<available classname="net.sf.basedb.clients.web.Base" |
4067 |
02 Sep 16 |
nicklas |
146 |
classpathref="classpath" property="base-web" /> |
4062 |
25 Aug 16 |
nicklas |
147 |
<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." /> |
4067 |
02 Sep 16 |
nicklas |
148 |
<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." /> |
4062 |
25 Aug 16 |
nicklas |
149 |
<echo>Found all requried BASE core JAR files.</echo> |
4062 |
25 Aug 16 |
nicklas |
150 |
</target> |
4062 |
25 Aug 16 |
nicklas |
151 |
|
4298 |
13 Jan 17 |
nicklas |
152 |
<target |
4298 |
13 Jan 17 |
nicklas |
153 |
name="doc" |
4298 |
13 Jan 17 |
nicklas |
154 |
depends="init" |
4298 |
13 Jan 17 |
nicklas |
155 |
description="Generate JavaDoc of entire API" |
4298 |
13 Jan 17 |
nicklas |
156 |
> |
4298 |
13 Jan 17 |
nicklas |
<!-- Create the time stamp --> |
4298 |
13 Jan 17 |
nicklas |
158 |
<tstamp> |
4298 |
13 Jan 17 |
nicklas |
159 |
<format property="TODAY" pattern="yyyy-MM-dd"/> |
4298 |
13 Jan 17 |
nicklas |
160 |
</tstamp> |
4298 |
13 Jan 17 |
nicklas |
161 |
<delete dir="${dist}/doc/api" /> |
4298 |
13 Jan 17 |
nicklas |
162 |
<sleep milliseconds="1000"/> |
4298 |
13 Jan 17 |
nicklas |
163 |
<mkdir dir="${dist}/doc/api" /> |
4298 |
13 Jan 17 |
nicklas |
164 |
|
4298 |
13 Jan 17 |
nicklas |
165 |
<javadoc |
4298 |
13 Jan 17 |
nicklas |
166 |
packagenames="net.sf.basedb.*" |
4298 |
13 Jan 17 |
nicklas |
167 |
sourcepath="${src}" |
4298 |
13 Jan 17 |
nicklas |
168 |
destdir="${dist}/doc/api" |
4298 |
13 Jan 17 |
nicklas |
169 |
author="true" |
4298 |
13 Jan 17 |
nicklas |
170 |
version="true" |
4298 |
13 Jan 17 |
nicklas |
171 |
use="false" |
4298 |
13 Jan 17 |
nicklas |
172 |
private="true" |
5994 |
20 Aug 20 |
nicklas |
173 |
windowtitle="Job Scheduler extension for BASE ${version} API documentation" |
4298 |
13 Jan 17 |
nicklas |
174 |
classpathref="classpath" |
4298 |
13 Jan 17 |
nicklas |
175 |
linksource="false" |
4298 |
13 Jan 17 |
nicklas |
176 |
breakiterator="yes" |
4298 |
13 Jan 17 |
nicklas |
177 |
encoding="${javac.encoding}" |
4298 |
13 Jan 17 |
nicklas |
178 |
additionalparam="-Xdoclint:all,-missing" |
4298 |
13 Jan 17 |
nicklas |
179 |
> |
5994 |
20 Aug 20 |
nicklas |
180 |
<header><![CDATA[Job Scheduler extension for BASE ${version}: ${TODAY}]]></header> |
5505 |
17 Jun 19 |
nicklas |
181 |
<link href="https://docs.oracle.com/en/java/javase/11/docs/api/"/> |
6305 |
11 Jun 21 |
nicklas |
182 |
<link href="https://base.thep.lu.se/chrome/site/latest/api/" /> |
4298 |
13 Jan 17 |
nicklas |
183 |
</javadoc> |
4298 |
13 Jan 17 |
nicklas |
184 |
</target> |
4298 |
13 Jan 17 |
nicklas |
185 |
|
4298 |
13 Jan 17 |
nicklas |
186 |
|
4062 |
25 Aug 16 |
nicklas |
187 |
<target |
4062 |
25 Aug 16 |
nicklas |
188 |
name="download-lib" |
4062 |
25 Aug 16 |
nicklas |
189 |
description="Download required BASE core jar files" |
4062 |
25 Aug 16 |
nicklas |
190 |
> |
4062 |
25 Aug 16 |
nicklas |
191 |
<echo> |
4062 |
25 Aug 16 |
nicklas |
192 |
------------------------------------------------------- |
4062 |
25 Aug 16 |
nicklas |
193 |
NOTE! You may specifiy a different download location by |
4062 |
25 Aug 16 |
nicklas |
194 |
creating the file './build.properties' and |
4062 |
25 Aug 16 |
nicklas |
195 |
setting 'depend.jars' to the URL to download from. |
4062 |
25 Aug 16 |
nicklas |
196 |
------------------------------------------------------- |
4062 |
25 Aug 16 |
nicklas |
197 |
</echo> |
4062 |
25 Aug 16 |
nicklas |
198 |
<download-lib file="base-core-${depend.base-version}.jar" /> |
4067 |
02 Sep 16 |
nicklas |
199 |
<download-lib file="base-webclient-${depend.base-version}.jar" /> |
4062 |
25 Aug 16 |
nicklas |
200 |
</target> |
4062 |
25 Aug 16 |
nicklas |
201 |
|
4062 |
25 Aug 16 |
nicklas |
202 |
<macrodef name="download-lib" description="Download BASE core JAR files"> |
4062 |
25 Aug 16 |
nicklas |
203 |
<attribute name="file" /> |
4062 |
25 Aug 16 |
nicklas |
204 |
<sequential> |
4062 |
25 Aug 16 |
nicklas |
205 |
<get |
4067 |
02 Sep 16 |
nicklas |
206 |
dest="lib/@{file}" |
4062 |
25 Aug 16 |
nicklas |
207 |
src="${depend.jars}/@{file}" |
4062 |
25 Aug 16 |
nicklas |
208 |
usetimestamp="true" |
4062 |
25 Aug 16 |
nicklas |
209 |
verbose="true" |
4062 |
25 Aug 16 |
nicklas |
210 |
ignoreerrors="true" |
4062 |
25 Aug 16 |
nicklas |
211 |
/> |
4062 |
25 Aug 16 |
nicklas |
212 |
</sequential> |
4062 |
25 Aug 16 |
nicklas |
213 |
</macrodef> |
4062 |
25 Aug 16 |
nicklas |
214 |
|
4062 |
25 Aug 16 |
nicklas |
215 |
<target name="update-version"> |
4062 |
25 Aug 16 |
nicklas |
216 |
<echo>Setting version to: ${version}</echo> |
4062 |
25 Aug 16 |
nicklas |
217 |
|
4062 |
25 Aug 16 |
nicklas |
218 |
<echo>OpenGrid.java</echo> |
4062 |
25 Aug 16 |
nicklas |
219 |
<replaceregexp |
4062 |
25 Aug 16 |
nicklas |
220 |
file="${src}/net/sf/basedb/opengrid/OpenGrid.java" |
4062 |
25 Aug 16 |
nicklas |
221 |
match="public static final String VERSION = ".*";" |
4062 |
25 Aug 16 |
nicklas |
222 |
replace="public static final String VERSION = "${version}";" |
4062 |
25 Aug 16 |
nicklas |
223 |
encoding="UTF-8" |
4062 |
25 Aug 16 |
nicklas |
224 |
/> |
4062 |
25 Aug 16 |
nicklas |
225 |
|
4062 |
25 Aug 16 |
nicklas |
226 |
<echo>extensions.xml</echo> |
4062 |
25 Aug 16 |
nicklas |
227 |
<replaceregexp |
4062 |
25 Aug 16 |
nicklas |
228 |
file="META-INF/extensions.xml" |
4062 |
25 Aug 16 |
nicklas |
229 |
match="<version>.*</version>" |
4062 |
25 Aug 16 |
nicklas |
230 |
replace="<version>${version}</version>" |
4062 |
25 Aug 16 |
nicklas |
231 |
encoding="UTF-8" |
4062 |
25 Aug 16 |
nicklas |
232 |
/> |
4062 |
25 Aug 16 |
nicklas |
233 |
<replaceregexp |
4062 |
25 Aug 16 |
nicklas |
234 |
file="META-INF/extensions.xml" |
4062 |
25 Aug 16 |
nicklas |
235 |
match="<min-base-version>.*</min-base-version>" |
4062 |
25 Aug 16 |
nicklas |
236 |
replace="<min-base-version>${depend.base-version}</min-base-version>" |
4062 |
25 Aug 16 |
nicklas |
237 |
encoding="UTF-8" |
4062 |
25 Aug 16 |
nicklas |
238 |
/> |
6074 |
20 Nov 20 |
nicklas |
239 |
|
6074 |
20 Nov 20 |
nicklas |
240 |
<echo>.classpath</echo> |
6074 |
20 Nov 20 |
nicklas |
241 |
<replaceregexp |
6074 |
20 Nov 20 |
nicklas |
242 |
file=".classpath" |
6074 |
20 Nov 20 |
nicklas |
243 |
match="base-(\w+)-[0-9.]+jar" |
6074 |
20 Nov 20 |
nicklas |
244 |
replace="base-\1-${depend.base-version}.jar" |
6074 |
20 Nov 20 |
nicklas |
245 |
encoding="UTF-8" |
6074 |
20 Nov 20 |
nicklas |
246 |
byline="true" |
6074 |
20 Nov 20 |
nicklas |
247 |
/> |
4062 |
25 Aug 16 |
nicklas |
248 |
|
4062 |
25 Aug 16 |
nicklas |
249 |
<echo>Don't forget to commit the changes to the subversion repository!</echo> |
4062 |
25 Aug 16 |
nicklas |
250 |
</target> |
4062 |
25 Aug 16 |
nicklas |
251 |
|
4062 |
25 Aug 16 |
nicklas |
252 |
</project> |