2933 |
14 Nov 14 |
olle |
1 |
<?xml version="1.0" encoding="UTF-8"?> |
2933 |
14 Nov 14 |
olle |
2 |
<project |
2933 |
14 Nov 14 |
olle |
3 |
name="MeLuDi" |
2933 |
14 Nov 14 |
olle |
4 |
default="build" |
2933 |
14 Nov 14 |
olle |
5 |
basedir="."> |
2933 |
14 Nov 14 |
olle |
6 |
|
2933 |
14 Nov 14 |
olle |
<!--create this file if you need to override values from properties below --> |
2933 |
14 Nov 14 |
olle |
8 |
<property file="build.properties" /> |
2933 |
14 Nov 14 |
olle |
9 |
|
2933 |
14 Nov 14 |
olle |
<!-- variables used --> |
2933 |
14 Nov 14 |
olle |
11 |
<property name="name" value="meludi" /> |
3210 |
26 Mar 15 |
olle |
12 |
<property name="title" value="MeLuDI" /> |
6805 |
24 Aug 22 |
olle |
13 |
<property name="version" value="1.6.0" /> |
2933 |
14 Nov 14 |
olle |
14 |
<property name="src" location="src" description="Location of source files" /> |
2933 |
14 Nov 14 |
olle |
15 |
<property name="build" location="build" description="Location of compiled files" /> |
2933 |
14 Nov 14 |
olle |
16 |
<property name="dist" location="dist" description="Directory where distribution should be created" /> |
2933 |
14 Nov 14 |
olle |
17 |
<property name="jar.name" value="${name}.jar" description="Name of JAR file with the extensions." /> |
2933 |
14 Nov 14 |
olle |
18 |
<property name="tar.prefix" value="${name}-${version}" description="Prefix of .tar.gz file for download." /> |
2933 |
14 Nov 14 |
olle |
19 |
<property name="tar.name" value="${tar.prefix}.tar.gz" description="Full name of .tar.gz file for download." /> |
2933 |
14 Nov 14 |
olle |
20 |
<property name="javac.arg" value="-Xlint:unchecked" /> |
5540 |
04 Jul 19 |
olle |
21 |
<property name="javac.release" value="11" /> |
2933 |
14 Nov 14 |
olle |
22 |
<property name="javac.encoding" value="UTF-8" /> |
2933 |
14 Nov 14 |
olle |
23 |
<property name="depend.base-version" |
5465 |
04 Jun 19 |
olle |
24 |
value="3.15.0" |
2933 |
14 Nov 14 |
olle |
25 |
description="The BASE version that this project depends on." |
2933 |
14 Nov 14 |
olle |
26 |
/> |
2933 |
14 Nov 14 |
olle |
27 |
<property name="depend.jars" |
6304 |
11 Jun 21 |
nicklas |
28 |
value="https://base.thep.lu.se/chrome/site/files/base/jars/${depend.base-version}" |
2933 |
14 Nov 14 |
olle |
29 |
description="The location of the BASE core JARs that this project depends on." |
2933 |
14 Nov 14 |
olle |
30 |
/> |
2933 |
14 Nov 14 |
olle |
31 |
|
2933 |
14 Nov 14 |
olle |
<!-- set up classpath for compiling --> |
2933 |
14 Nov 14 |
olle |
33 |
<path id="classpath"> |
2933 |
14 Nov 14 |
olle |
34 |
<fileset dir="lib"> |
2933 |
14 Nov 14 |
olle |
35 |
<include name="**/*.jar" /> |
2933 |
14 Nov 14 |
olle |
36 |
</fileset> |
4706 |
19 Mar 18 |
olle |
37 |
<fileset dir="META-INF/lib"> |
4706 |
19 Mar 18 |
olle |
38 |
<include name="**/*.jar" /> |
4706 |
19 Mar 18 |
olle |
39 |
</fileset> |
2933 |
14 Nov 14 |
olle |
40 |
</path> |
2933 |
14 Nov 14 |
olle |
41 |
|
2933 |
14 Nov 14 |
olle |
42 |
<target name="init"> |
2933 |
14 Nov 14 |
olle |
43 |
<mkdir dir="${build}" /> |
2933 |
14 Nov 14 |
olle |
44 |
<mkdir dir="${dist}" /> |
2933 |
14 Nov 14 |
olle |
45 |
</target> |
2933 |
14 Nov 14 |
olle |
46 |
|
2933 |
14 Nov 14 |
olle |
47 |
<target name="clean"> |
2933 |
14 Nov 14 |
olle |
48 |
<delete failonerror="false" includeemptydirs="true"> |
2933 |
14 Nov 14 |
olle |
49 |
<fileset dir="${build}" defaultexcludes="no" /> |
2933 |
14 Nov 14 |
olle |
50 |
<fileset dir="${dist}" defaultexcludes="no" /> |
2933 |
14 Nov 14 |
olle |
51 |
<fileset file="${jar.name}" /> |
2933 |
14 Nov 14 |
olle |
52 |
<fileset file="${tar.name}" /> |
2933 |
14 Nov 14 |
olle |
53 |
</delete> |
2933 |
14 Nov 14 |
olle |
54 |
</target> |
2933 |
14 Nov 14 |
olle |
55 |
|
2933 |
14 Nov 14 |
olle |
56 |
<target |
2933 |
14 Nov 14 |
olle |
57 |
name="dist" |
2933 |
14 Nov 14 |
olle |
58 |
depends="clean,build" |
2933 |
14 Nov 14 |
olle |
59 |
> |
2933 |
14 Nov 14 |
olle |
60 |
<copy todir="${dist}"> |
2933 |
14 Nov 14 |
olle |
61 |
<fileset dir="." includes="README,LICENSE,meludi-ogs-hosts.xml,config/*" /> |
2933 |
14 Nov 14 |
olle |
62 |
<fileset file="${jar.name}" /> |
2933 |
14 Nov 14 |
olle |
63 |
</copy> |
2933 |
14 Nov 14 |
olle |
64 |
</target> |
2933 |
14 Nov 14 |
olle |
65 |
|
2933 |
14 Nov 14 |
olle |
66 |
<target |
2933 |
14 Nov 14 |
olle |
67 |
name="package" |
2933 |
14 Nov 14 |
olle |
68 |
depends="dist" |
2933 |
14 Nov 14 |
olle |
69 |
description="Create binary distribution package" |
2933 |
14 Nov 14 |
olle |
70 |
> |
2933 |
14 Nov 14 |
olle |
71 |
<tar |
2933 |
14 Nov 14 |
olle |
72 |
destfile="${tar.name}" |
2933 |
14 Nov 14 |
olle |
73 |
longfile="gnu" |
2933 |
14 Nov 14 |
olle |
74 |
compression="gzip" |
2933 |
14 Nov 14 |
olle |
75 |
> |
2933 |
14 Nov 14 |
olle |
76 |
<tarfileset |
2933 |
14 Nov 14 |
olle |
77 |
dir="${dist}" |
2933 |
14 Nov 14 |
olle |
78 |
mode="755" |
2933 |
14 Nov 14 |
olle |
79 |
prefix="${tar.prefix}" |
2933 |
14 Nov 14 |
olle |
80 |
preserveLeadingSlashes="true" |
2933 |
14 Nov 14 |
olle |
81 |
> |
2933 |
14 Nov 14 |
olle |
82 |
<include name="**/*.sh" /> |
2933 |
14 Nov 14 |
olle |
83 |
</tarfileset> |
2933 |
14 Nov 14 |
olle |
84 |
<tarfileset |
2933 |
14 Nov 14 |
olle |
85 |
dir="${dist}" |
2933 |
14 Nov 14 |
olle |
86 |
prefix="${tar.prefix}" |
2933 |
14 Nov 14 |
olle |
87 |
preserveLeadingSlashes="true" |
2933 |
14 Nov 14 |
olle |
88 |
> |
2933 |
14 Nov 14 |
olle |
89 |
<exclude name="**/*.sh" /> |
2933 |
14 Nov 14 |
olle |
90 |
</tarfileset> |
2933 |
14 Nov 14 |
olle |
91 |
</tar> |
2933 |
14 Nov 14 |
olle |
92 |
</target> |
2933 |
14 Nov 14 |
olle |
93 |
|
2933 |
14 Nov 14 |
olle |
94 |
<target |
2933 |
14 Nov 14 |
olle |
95 |
name="install" |
2933 |
14 Nov 14 |
olle |
96 |
depends="build" |
2933 |
14 Nov 14 |
olle |
97 |
> |
2933 |
14 Nov 14 |
olle |
98 |
<fail unless="base.plugins" message="base.plugins is not set to the path of BASE plug-ins directory." /> |
2933 |
14 Nov 14 |
olle |
99 |
<copy todir="${base.plugins}"> |
2933 |
14 Nov 14 |
olle |
100 |
<fileset file="${jar.name}" /> |
2933 |
14 Nov 14 |
olle |
101 |
</copy> |
2933 |
14 Nov 14 |
olle |
102 |
<echo>Copied '${jar.name}' to '${base.plugins}'.</echo> |
2933 |
14 Nov 14 |
olle |
103 |
</target> |
2933 |
14 Nov 14 |
olle |
104 |
|
2933 |
14 Nov 14 |
olle |
105 |
|
2933 |
14 Nov 14 |
olle |
106 |
<target |
2933 |
14 Nov 14 |
olle |
107 |
name="build" |
2933 |
14 Nov 14 |
olle |
108 |
depends="init,checkjar" |
2933 |
14 Nov 14 |
olle |
109 |
description="Compiles the plugin and put in jar" |
2933 |
14 Nov 14 |
olle |
110 |
> |
2933 |
14 Nov 14 |
olle |
111 |
<mkdir dir="${build}" /> |
2933 |
14 Nov 14 |
olle |
112 |
<javac |
2933 |
14 Nov 14 |
olle |
113 |
encoding="${javac.encoding}" |
2933 |
14 Nov 14 |
olle |
114 |
srcdir="${src}" |
2933 |
14 Nov 14 |
olle |
115 |
destdir="${build}" |
2933 |
14 Nov 14 |
olle |
116 |
debug="true" |
2933 |
14 Nov 14 |
olle |
117 |
includeantruntime="false" |
2933 |
14 Nov 14 |
olle |
118 |
classpathref="classpath" |
5540 |
04 Jul 19 |
olle |
119 |
release="${javac.release}" |
2933 |
14 Nov 14 |
olle |
120 |
> |
2933 |
14 Nov 14 |
olle |
121 |
<compilerarg value="${javac.arg}" /> |
2933 |
14 Nov 14 |
olle |
122 |
</javac> |
2933 |
14 Nov 14 |
olle |
123 |
<jar |
2933 |
14 Nov 14 |
olle |
124 |
jarfile="${jar.name}" |
2933 |
14 Nov 14 |
olle |
125 |
manifest="META-INF/MANIFEST.MF" |
2933 |
14 Nov 14 |
olle |
126 |
> |
2933 |
14 Nov 14 |
olle |
127 |
<fileset dir="${build}" /> |
2933 |
14 Nov 14 |
olle |
128 |
<fileset dir="." includes="META-INF/**" /> |
2933 |
14 Nov 14 |
olle |
129 |
<fileset dir="." includes="resources/**" /> |
2933 |
14 Nov 14 |
olle |
130 |
</jar> |
2933 |
14 Nov 14 |
olle |
131 |
</target> |
2933 |
14 Nov 14 |
olle |
132 |
|
2933 |
14 Nov 14 |
olle |
133 |
<target |
2933 |
14 Nov 14 |
olle |
134 |
name="checkjar" |
2933 |
14 Nov 14 |
olle |
135 |
description="Checks that required BASE JAR files exists" |
2933 |
14 Nov 14 |
olle |
136 |
> |
2933 |
14 Nov 14 |
olle |
137 |
<available classname="net.sf.basedb.core.Application" |
2933 |
14 Nov 14 |
olle |
138 |
classpathref="classpath" property="base-core" /> |
2933 |
14 Nov 14 |
olle |
139 |
<available classname="net.sf.basedb.clients.web.Base" |
2933 |
14 Nov 14 |
olle |
140 |
classpathref="classpath" property="base-web" /> |
2933 |
14 Nov 14 |
olle |
141 |
<available classname="net.sf.basedb.info.BioAssaySetInfo" |
2933 |
14 Nov 14 |
olle |
142 |
classpathref="classpath" property="base-webservice" /> |
2933 |
14 Nov 14 |
olle |
143 |
<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." /> |
2933 |
14 Nov 14 |
olle |
144 |
<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." /> |
3122 |
06 Feb 15 |
olle |
145 |
<!-- |
2933 |
14 Nov 14 |
olle |
<fail unless="base-webservice" message="Can't find base-webservices-client-${depend.base-version}.jar in ./lib/compile. Try 'ant download-lib' to download the missing file." /> |
3122 |
06 Feb 15 |
olle |
147 |
--> |
2933 |
14 Nov 14 |
olle |
148 |
<echo>Found all requried BASE core JAR files.</echo> |
2933 |
14 Nov 14 |
olle |
149 |
</target> |
2933 |
14 Nov 14 |
olle |
150 |
|
2933 |
14 Nov 14 |
olle |
151 |
<target |
2933 |
14 Nov 14 |
olle |
152 |
name="download-lib" |
2933 |
14 Nov 14 |
olle |
153 |
description="Download required BASE core jar files" |
2933 |
14 Nov 14 |
olle |
154 |
> |
2933 |
14 Nov 14 |
olle |
155 |
<echo> |
2933 |
14 Nov 14 |
olle |
156 |
------------------------------------------------------- |
2933 |
14 Nov 14 |
olle |
157 |
NOTE! You may specifiy a different download location by |
2933 |
14 Nov 14 |
olle |
158 |
creating the file './build.properties' and |
2933 |
14 Nov 14 |
olle |
159 |
setting 'depend.jars' to the URL to download from. |
2933 |
14 Nov 14 |
olle |
160 |
------------------------------------------------------- |
2933 |
14 Nov 14 |
olle |
161 |
</echo> |
2933 |
14 Nov 14 |
olle |
162 |
<download-lib file="base-core-${depend.base-version}.jar" /> |
2933 |
14 Nov 14 |
olle |
163 |
<download-lib file="base-webclient-${depend.base-version}.jar" /> |
3122 |
06 Feb 15 |
olle |
164 |
<!-- |
2933 |
14 Nov 14 |
olle |
<download-lib file="base-webservices-client-${depend.base-version}.jar" /> |
3122 |
06 Feb 15 |
olle |
166 |
--> |
2933 |
14 Nov 14 |
olle |
167 |
</target> |
2933 |
14 Nov 14 |
olle |
168 |
|
2933 |
14 Nov 14 |
olle |
169 |
<macrodef name="download-lib" description="Download BASE core JAR files"> |
2933 |
14 Nov 14 |
olle |
170 |
<attribute name="file" /> |
2933 |
14 Nov 14 |
olle |
171 |
<sequential> |
2933 |
14 Nov 14 |
olle |
172 |
<get |
2933 |
14 Nov 14 |
olle |
173 |
dest="lib/compile/@{file}" |
2933 |
14 Nov 14 |
olle |
174 |
src="${depend.jars}/@{file}" |
2933 |
14 Nov 14 |
olle |
175 |
usetimestamp="true" |
2933 |
14 Nov 14 |
olle |
176 |
verbose="true" |
2933 |
14 Nov 14 |
olle |
177 |
ignoreerrors="true" |
2933 |
14 Nov 14 |
olle |
178 |
/> |
2933 |
14 Nov 14 |
olle |
179 |
</sequential> |
2933 |
14 Nov 14 |
olle |
180 |
</macrodef> |
2933 |
14 Nov 14 |
olle |
181 |
|
2933 |
14 Nov 14 |
olle |
182 |
<target name="update-title"> |
2933 |
14 Nov 14 |
olle |
183 |
<echo>Setting title to: ${title}</echo> |
2933 |
14 Nov 14 |
olle |
184 |
|
2933 |
14 Nov 14 |
olle |
185 |
<echo>Meludi.java</echo> |
2933 |
14 Nov 14 |
olle |
186 |
<replaceregexp |
2933 |
14 Nov 14 |
olle |
187 |
file="${src}/net/sf/basedb/meludi/Meludi.java" |
2933 |
14 Nov 14 |
olle |
188 |
match="public static final String TITLE = ".*";" |
2933 |
14 Nov 14 |
olle |
189 |
replace="public static final String TITLE = "${title}";" |
2933 |
14 Nov 14 |
olle |
190 |
encoding="UTF-8" |
2933 |
14 Nov 14 |
olle |
191 |
/> |
2933 |
14 Nov 14 |
olle |
192 |
|
2933 |
14 Nov 14 |
olle |
193 |
<echo>meludi-2.js</echo> |
2933 |
14 Nov 14 |
olle |
194 |
<replaceregexp |
2933 |
14 Nov 14 |
olle |
195 |
file="resources/meludi-2.js" |
2933 |
14 Nov 14 |
olle |
196 |
match="meludi.TITLE = '.*';" |
2933 |
14 Nov 14 |
olle |
197 |
replace="meludi.TITLE = '${title}';" |
2933 |
14 Nov 14 |
olle |
198 |
encoding="UTF-8" |
2933 |
14 Nov 14 |
olle |
199 |
/> |
2933 |
14 Nov 14 |
olle |
200 |
|
2933 |
14 Nov 14 |
olle |
201 |
<echo>samplereport.js</echo> |
2933 |
14 Nov 14 |
olle |
202 |
<replaceregexp |
2933 |
14 Nov 14 |
olle |
203 |
file="resources/reports/samplereportgenerator.js" |
2933 |
14 Nov 14 |
olle |
204 |
match="report.TITLE = '.*';" |
2933 |
14 Nov 14 |
olle |
205 |
replace="report.TITLE = '${title}';" |
2933 |
14 Nov 14 |
olle |
206 |
encoding="UTF-8" |
2933 |
14 Nov 14 |
olle |
207 |
/> |
2933 |
14 Nov 14 |
olle |
208 |
|
4175 |
24 Oct 16 |
olle |
209 |
<echo>meludi_quarter_month_report.js</echo> |
4175 |
24 Oct 16 |
olle |
210 |
<replaceregexp |
4175 |
24 Oct 16 |
olle |
211 |
file="resources/reports/meludi_quarter_month_report_generator.js" |
4175 |
24 Oct 16 |
olle |
212 |
match="report.TITLE = '.*';" |
4175 |
24 Oct 16 |
olle |
213 |
replace="report.TITLE = '${title}';" |
4175 |
24 Oct 16 |
olle |
214 |
encoding="UTF-8" |
4175 |
24 Oct 16 |
olle |
215 |
/> |
4175 |
24 Oct 16 |
olle |
216 |
|
3210 |
26 Mar 15 |
olle |
217 |
<echo>extraction_protocol.js</echo> |
3210 |
26 Mar 15 |
olle |
218 |
<replaceregexp |
3210 |
26 Mar 15 |
olle |
219 |
file="resources/sampleproc/extraction_protocol.js" |
3210 |
26 Mar 15 |
olle |
220 |
match="ep.TITLE = '.*';" |
3210 |
26 Mar 15 |
olle |
221 |
replace="ep.TITLE = '${title}';" |
3210 |
26 Mar 15 |
olle |
222 |
encoding="UTF-8" |
3210 |
26 Mar 15 |
olle |
223 |
/> |
3210 |
26 Mar 15 |
olle |
224 |
|
2933 |
14 Nov 14 |
olle |
225 |
<echo>Don't forget to commit the changes to the subversion repository!</echo> |
2933 |
14 Nov 14 |
olle |
226 |
</target> |
2933 |
14 Nov 14 |
olle |
227 |
|
2933 |
14 Nov 14 |
olle |
228 |
<target name="update-version"> |
2933 |
14 Nov 14 |
olle |
229 |
<echo>Setting version to: ${version}</echo> |
2933 |
14 Nov 14 |
olle |
230 |
|
2933 |
14 Nov 14 |
olle |
231 |
<echo>Meludi.java</echo> |
2933 |
14 Nov 14 |
olle |
232 |
<replaceregexp |
2933 |
14 Nov 14 |
olle |
233 |
file="${src}/net/sf/basedb/meludi/Meludi.java" |
2933 |
14 Nov 14 |
olle |
234 |
match="public static final String VERSION = ".*";" |
2933 |
14 Nov 14 |
olle |
235 |
replace="public static final String VERSION = "${version}";" |
2933 |
14 Nov 14 |
olle |
236 |
encoding="UTF-8" |
2933 |
14 Nov 14 |
olle |
237 |
/> |
2933 |
14 Nov 14 |
olle |
238 |
|
2933 |
14 Nov 14 |
olle |
239 |
<echo>meludi-2.js</echo> |
2933 |
14 Nov 14 |
olle |
240 |
<replaceregexp |
2933 |
14 Nov 14 |
olle |
241 |
file="resources/meludi-2.js" |
2933 |
14 Nov 14 |
olle |
242 |
match="meludi.VERSION = '.*';" |
2933 |
14 Nov 14 |
olle |
243 |
replace="meludi.VERSION = '${version}';" |
2933 |
14 Nov 14 |
olle |
244 |
encoding="UTF-8" |
2933 |
14 Nov 14 |
olle |
245 |
/> |
2933 |
14 Nov 14 |
olle |
246 |
|
2933 |
14 Nov 14 |
olle |
247 |
<echo>samplereport.js</echo> |
2933 |
14 Nov 14 |
olle |
248 |
<replaceregexp |
2933 |
14 Nov 14 |
olle |
249 |
file="resources/reports/samplereportgenerator.js" |
2933 |
14 Nov 14 |
olle |
250 |
match="report.VERSION = '.*';" |
2933 |
14 Nov 14 |
olle |
251 |
replace="report.VERSION = '${version}';" |
2933 |
14 Nov 14 |
olle |
252 |
encoding="UTF-8" |
2933 |
14 Nov 14 |
olle |
253 |
/> |
2933 |
14 Nov 14 |
olle |
254 |
|
4175 |
24 Oct 16 |
olle |
255 |
<echo>meludi_quarter_month_report.js</echo> |
4175 |
24 Oct 16 |
olle |
256 |
<replaceregexp |
4175 |
24 Oct 16 |
olle |
257 |
file="resources/reports/meludi_quarter_month_report_generator.js" |
4175 |
24 Oct 16 |
olle |
258 |
match="report.VERSION = '.*';" |
4175 |
24 Oct 16 |
olle |
259 |
replace="report.VERSION = '${version}';" |
4175 |
24 Oct 16 |
olle |
260 |
encoding="UTF-8" |
4175 |
24 Oct 16 |
olle |
261 |
/> |
4175 |
24 Oct 16 |
olle |
262 |
|
2933 |
14 Nov 14 |
olle |
263 |
<echo>extensions.xml</echo> |
2933 |
14 Nov 14 |
olle |
264 |
<replaceregexp |
2933 |
14 Nov 14 |
olle |
265 |
file="META-INF/extensions.xml" |
2933 |
14 Nov 14 |
olle |
266 |
match="<version>.*</version>" |
2933 |
14 Nov 14 |
olle |
267 |
replace="<version>${version}</version>" |
2933 |
14 Nov 14 |
olle |
268 |
encoding="UTF-8" |
2933 |
14 Nov 14 |
olle |
269 |
/> |
2933 |
14 Nov 14 |
olle |
270 |
<replaceregexp |
2933 |
14 Nov 14 |
olle |
271 |
file="META-INF/extensions.xml" |
2933 |
14 Nov 14 |
olle |
272 |
match="<min-base-version>.*</min-base-version>" |
2933 |
14 Nov 14 |
olle |
273 |
replace="<min-base-version>${depend.base-version}</min-base-version>" |
2933 |
14 Nov 14 |
olle |
274 |
encoding="UTF-8" |
2933 |
14 Nov 14 |
olle |
275 |
/> |
2933 |
14 Nov 14 |
olle |
276 |
|
2933 |
14 Nov 14 |
olle |
277 |
<echo>Don't forget to commit the changes to the subversion repository!</echo> |
2933 |
14 Nov 14 |
olle |
278 |
</target> |
2933 |
14 Nov 14 |
olle |
279 |
|
2933 |
14 Nov 14 |
olle |
280 |
</project> |