1 | <?xml version="1.0" encoding="UTF-8"?> |
---|
2 | <!-- |
---|
3 | $Id: build.xml 3739 2007-09-17 07:29:41Z jari $ |
---|
4 | |
---|
5 | Copyright (C) 2005 Samuel Andersson, Johan Enell, Jari Hakkinen, Nicklas Nordborg, Gregory Vincic |
---|
6 | Copyright (C) 2006, 2007 Johan Enell, Jari Hakkinen, Nicklas Nordborg, Martin Svensson |
---|
7 | |
---|
8 | This file is part of BASE - BioArray Software Environment. |
---|
9 | Available at http://base.thep.lu.se/ |
---|
10 | |
---|
11 | BASE is free software; you can redistribute it and/or modify it |
---|
12 | under the terms of the GNU General Public License as published by |
---|
13 | the Free Software Foundation; either version 2 of the License, or |
---|
14 | (at your option) any later version. |
---|
15 | |
---|
16 | BASE is distributed in the hope that it will be useful, but |
---|
17 | WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
18 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
---|
19 | General Public License for more details. |
---|
20 | |
---|
21 | You should have received a copy of the GNU General Public License |
---|
22 | along with this program; if not, write to the Free Software |
---|
23 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
---|
24 | 02111-1307, USA. |
---|
25 | --> |
---|
26 | |
---|
27 | <project |
---|
28 | name="BASE2" |
---|
29 | default="dev" |
---|
30 | basedir="." |
---|
31 | > |
---|
32 | <description> |
---|
33 | Build file for BASE 2. The main targets are ('dev' is default): |
---|
34 | |
---|
35 | Clean up: |
---|
36 | clean: Remove all generated files |
---|
37 | |
---|
38 | Compiling code |
---|
39 | core: Build core for local use |
---|
40 | coreplugins: Build core plugins for local use |
---|
41 | dev: Build everything for local use |
---|
42 | dist: Build everything (except test) for distribution (put in 'dist' |
---|
43 | subdirectory) |
---|
44 | installprg: Build installation programs for local use |
---|
45 | jobagent: Build jobagent for local use |
---|
46 | migrate: Build migration tool for local use |
---|
47 | test: Build test programs |
---|
48 | web: Build web client application for local use |
---|
49 | |
---|
50 | Documentation: |
---|
51 | doc: Build all documentation for local use |
---|
52 | docbook: Build only html and pdf from docbook |
---|
53 | helptext: Generate help text import file from the docbook documentation |
---|
54 | |
---|
55 | Packaging: |
---|
56 | package: Create *.tar.gz files with binary and source distributions |
---|
57 | </description> |
---|
58 | |
---|
59 | <!-- set BASE version |
---|
60 | Use numerical versions for bugix (maintenance) releases starting |
---|
61 | with "1". Use "0" for the first release of a new trunk version. Add |
---|
62 | "pre" to unreleased versions. Examples: 2.1.1pre, 2.1.1, |
---|
63 | 2.1.2pre, 2.2.2, 2.2.0pre, 2.2.0, 2.2.1pre, 2.2.1 |
---|
64 | --> |
---|
65 | <property name="base.majorversion" value="2" /> |
---|
66 | <property name="base.minorversion" value="4" /> |
---|
67 | <property name="base.maintenanceversion" value="2pre" /> |
---|
68 | <property name="base.version" |
---|
69 | value="${base.majorversion}.${base.minorversion}.${base.maintenanceversion}" /> |
---|
70 | |
---|
71 | <!-- set other global properties for this build --> |
---|
72 | <property name="javac.arg" value="-Xlint:unchecked" |
---|
73 | description="Extra arguments sent to Java compiler" /> |
---|
74 | <property name="src" location="src" description="Location of source files" /> |
---|
75 | <property name="build" location="build" description="Location of compiled files" /> |
---|
76 | <property name="dist" location="dist" description="Directory where distribution should be created" /> |
---|
77 | <property name="lib" location="lib" description="Location of 3rd-party JAR files" /> |
---|
78 | <property name="config.dist" location="config/dist" |
---|
79 | description="Location of default configuration files" /> |
---|
80 | <property name="config.local" location="config/local" |
---|
81 | description="Location of local configuration files" /> |
---|
82 | |
---|
83 | <!-- main class path for compilation --> |
---|
84 | <path id="core.classpath" |
---|
85 | description="Main classpath to all 3rd-party JAR files required for compilation"> |
---|
86 | <fileset dir="${lib}/dist"> |
---|
87 | <include name="**/*.jar"/> |
---|
88 | </fileset> |
---|
89 | </path> |
---|
90 | |
---|
91 | <!-- pattern for configuration files use by copy.config --> |
---|
92 | <patternset id="config.files"> |
---|
93 | <include name="*.*" /> |
---|
94 | <exclude name="web.xml" /> |
---|
95 | <exclude name="readme.txt" /> |
---|
96 | </patternset> |
---|
97 | |
---|
98 | <!-- task definitions --> |
---|
99 | <taskdef |
---|
100 | name="hibernatedoclet" |
---|
101 | classname="xdoclet.modules.hibernate.HibernateDocletTask" |
---|
102 | description="Task for generating Hibernate mapping files from XDoclet tags" |
---|
103 | > |
---|
104 | <classpath> |
---|
105 | <fileset dir="${lib}/hibernatedoclet"> |
---|
106 | <include name="**/*.jar"/> |
---|
107 | </fileset> |
---|
108 | </classpath> |
---|
109 | </taskdef> |
---|
110 | |
---|
111 | <taskdef |
---|
112 | name="svn" |
---|
113 | classname="org.tigris.subversion.svnant.SvnTask" |
---|
114 | description="Task for interacting with subversion" |
---|
115 | > |
---|
116 | <classpath> |
---|
117 | <fileset dir="${lib}/svn"> |
---|
118 | <include name="**/*.jar"/> |
---|
119 | </fileset> |
---|
120 | </classpath> |
---|
121 | </taskdef> |
---|
122 | |
---|
123 | <!-- main targets --> |
---|
124 | <target |
---|
125 | name="clean" |
---|
126 | description="Remove all generated files and backup files" > |
---|
127 | <delete failonerror="false" includeemptydirs="true"> |
---|
128 | <fileset dir="${build}" defaultexcludes="no" /> |
---|
129 | <fileset dir="${dist}" defaultexcludes="no" /> |
---|
130 | <fileset dir="bin/jar" defaultexcludes="no" /> |
---|
131 | <fileset dir="www/WEB-INF/lib" defaultexcludes="no" /> |
---|
132 | <fileset dir="www/WEB-INF/classes" defaultexcludes="no" /> |
---|
133 | <fileset dir="www/WEB-INF" includes="web.xml" defaultexcludes="no" /> |
---|
134 | <fileset dir="doc/api" defaultexcludes="no" /> |
---|
135 | <fileset dir="doc/html" defaultexcludes="no" /> |
---|
136 | <fileset file="doc/base.pdf" /> |
---|
137 | <fileset file="doc/download/exampleplugins.tar.gz" /> |
---|
138 | </delete> |
---|
139 | </target> |
---|
140 | |
---|
141 | <target |
---|
142 | name="dist" |
---|
143 | depends="clean,dist.init,core.jar,coreplugins.jar,web.jar,installprg.jar, |
---|
144 | jobagent.jar,migrate.jar,copy.config,copy.jar,doc,doc.dist" |
---|
145 | description="Create everything needed for distribution" |
---|
146 | > |
---|
147 | <copy file="${config.dist}/web.xml" todir="${config}/.." description="Default web.xml" /> |
---|
148 | <copy todir="${dist}/www" description="JSP files, etc."> |
---|
149 | <fileset dir="www" /> |
---|
150 | </copy> |
---|
151 | <copy todir="${dist}/data" description="Additional data files"> |
---|
152 | <fileset dir="data" /> |
---|
153 | </copy> |
---|
154 | <copy todir="${dist}/bin" description="Scripts, etc."> |
---|
155 | <fileset dir="bin" /> |
---|
156 | </copy> |
---|
157 | <copy todir="${dist}/misc" description="Other files"> |
---|
158 | <fileset dir="misc"> |
---|
159 | <include name="sql/**/*" /> |
---|
160 | <include name="config/**/*" /> |
---|
161 | </fileset> |
---|
162 | </copy> |
---|
163 | <copy todir="${dist}" description="License and creadits"> |
---|
164 | <fileset file="base2.license.txt" /> |
---|
165 | <fileset file="credits.txt" /> |
---|
166 | </copy> |
---|
167 | <chmod dir="." includes="**/*.sh" perm="a+x" description="Make all scripts executable" /> |
---|
168 | </target> |
---|
169 | |
---|
170 | <target |
---|
171 | name="package" |
---|
172 | depends="package.bin,package.src" |
---|
173 | description="Generate tar.gz files for the binary and source distribution" |
---|
174 | > |
---|
175 | </target> |
---|
176 | |
---|
177 | <target |
---|
178 | name="dev" |
---|
179 | depends="dev.init,core,coreplugins,web,installprg,jobagent,migrate,test" |
---|
180 | description="Create a runnable local installation" |
---|
181 | /> |
---|
182 | |
---|
183 | <target |
---|
184 | name="core" |
---|
185 | depends="dev.init,core.jar" |
---|
186 | description="Build the core for local use" |
---|
187 | /> |
---|
188 | |
---|
189 | <target |
---|
190 | name="coreplugins" |
---|
191 | depends="core,coreplugins.jar" |
---|
192 | description="Build the core plugins for local use" |
---|
193 | /> |
---|
194 | |
---|
195 | <target |
---|
196 | name="exampleplugins" |
---|
197 | depends="core,exampleplugins.jar" |
---|
198 | description="Build the example plugins for local use" |
---|
199 | /> |
---|
200 | |
---|
201 | <target |
---|
202 | name="test" |
---|
203 | depends="test.jar,core.hibernate" |
---|
204 | description="Compile the test programs for local use" |
---|
205 | > |
---|
206 | <mkdir dir="${test.build}/data" /> |
---|
207 | <copy todir="${test.build}/data" description="Test-data files"> |
---|
208 | <fileset dir="${test.src}/data"> |
---|
209 | <include name="**/*" /> |
---|
210 | </fileset> |
---|
211 | </copy> |
---|
212 | <copy todir="${test.build}" description="Script files, etc."> |
---|
213 | <fileset dir="${test.src}"> |
---|
214 | <include name="**/*" /> |
---|
215 | <exclude name="**/*.java" /> |
---|
216 | </fileset> |
---|
217 | </copy> |
---|
218 | <chmod dir="${test.build}" includes="*.sh" perm="a+x"/> |
---|
219 | </target> |
---|
220 | |
---|
221 | <target |
---|
222 | name="web" |
---|
223 | depends="core,coreplugins,web.jar,copy.config,copy.jar" |
---|
224 | description="Build web client application for local use" |
---|
225 | > |
---|
226 | </target> |
---|
227 | |
---|
228 | <target |
---|
229 | name="installprg" |
---|
230 | depends="web,installprg.jar" |
---|
231 | description="Build installation programs for local use" |
---|
232 | /> |
---|
233 | |
---|
234 | <target |
---|
235 | name="jobagent" |
---|
236 | depends="web,jobagent.jar" |
---|
237 | description="Build job agent for local use" |
---|
238 | /> |
---|
239 | |
---|
240 | <target |
---|
241 | name="migrate" |
---|
242 | depends="web,migrate.jar" |
---|
243 | description="Build migration tool for local use" |
---|
244 | /> |
---|
245 | |
---|
246 | <target |
---|
247 | name="doc" |
---|
248 | depends="doc.javadoc,exampleplugins.tar,doc.docbook" |
---|
249 | description="Generate documentation for local use" |
---|
250 | /> |
---|
251 | |
---|
252 | <target |
---|
253 | name="docbook" |
---|
254 | depends="doc.docbook" |
---|
255 | description="Generate docbook documentation. This target is temporary. |
---|
256 | It will be included in the 'doc' target in the future." |
---|
257 | /> |
---|
258 | |
---|
259 | <!-- init targets --> |
---|
260 | <target |
---|
261 | name="init" |
---|
262 | depends="svn.revision" |
---|
263 | description="Initialise things" |
---|
264 | > |
---|
265 | </target> |
---|
266 | |
---|
267 | <target |
---|
268 | name="dist.init" |
---|
269 | depends="init" |
---|
270 | unless="isDev" |
---|
271 | > |
---|
272 | <property name="isDist" value="1" /> |
---|
273 | <property name="jar" location="${dist}/www/WEB-INF/lib" /> |
---|
274 | <property name="config" location="${dist}/www/WEB-INF/classes" /> |
---|
275 | <property name="bin" location="${dist}/bin" /> |
---|
276 | <property name="doc" location="${dist}/doc" /> |
---|
277 | <mkdir dir="${jar}" /> |
---|
278 | <mkdir dir="${config}" /> |
---|
279 | <mkdir dir="${bin}" /> |
---|
280 | <mkdir dir="${bin}/jar" /> |
---|
281 | <mkdir dir="${dist}/data" /> |
---|
282 | <mkdir dir="${dist}/doc" /> |
---|
283 | <mkdir dir="${dist}/misc" /> |
---|
284 | </target> |
---|
285 | |
---|
286 | <target |
---|
287 | name="dev.init" |
---|
288 | depends="init" |
---|
289 | unless="isDist" |
---|
290 | > |
---|
291 | <property name="isDev" value="1" /> |
---|
292 | <property name="jar" location="www/WEB-INF/lib" /> |
---|
293 | <property name="config" location="www/WEB-INF/classes" /> |
---|
294 | <property name="bin" location="bin" /> |
---|
295 | <property name="doc" location="doc" /> |
---|
296 | <mkdir dir="${bin}/jar" /> |
---|
297 | <mkdir dir="${jar}" /> |
---|
298 | <mkdir dir="${config}" /> |
---|
299 | </target> |
---|
300 | |
---|
301 | <target |
---|
302 | name="svn.revision" |
---|
303 | description="Get the current revision number in the subversion and put the |
---|
304 | value into the base.build property; replaced by constant expression in source distributions" |
---|
305 | > |
---|
306 | <svn> |
---|
307 | <status path="." lastChangedRevisionProperty="base.build" /> |
---|
308 | </svn> |
---|
309 | <echo message="Build #${base.build}" /> |
---|
310 | </target> |
---|
311 | |
---|
312 | <!-- configuration targets --> |
---|
313 | <target |
---|
314 | name="copy.config" |
---|
315 | depends="copy.config.local,copy.config.dist" |
---|
316 | description="Copies configuration files to the appropriate folder" |
---|
317 | > |
---|
318 | </target> |
---|
319 | |
---|
320 | <target |
---|
321 | name="copy.config.dist" |
---|
322 | > |
---|
323 | <copy todir="${config}" description="Default configuration files"> |
---|
324 | <fileset dir="${config.dist}"> |
---|
325 | <patternset refid="config.files" /> |
---|
326 | <present present="srconly" targetdir="${config}" /> |
---|
327 | </fileset> |
---|
328 | </copy> |
---|
329 | <copy todir="${config}/.." description="Default web.xml"> |
---|
330 | <fileset dir="${config.dist}"> |
---|
331 | <include name="web.xml" /> |
---|
332 | <present present="srconly" targetdir="${config}/.." /> |
---|
333 | </fileset> |
---|
334 | </copy> |
---|
335 | </target> |
---|
336 | |
---|
337 | <target |
---|
338 | name="copy.config.local" |
---|
339 | if="isDev" |
---|
340 | unless="isDist" |
---|
341 | > |
---|
342 | <copy todir="${config}" description="Local configuration files"> |
---|
343 | <fileset dir="${config.local}"> |
---|
344 | <patternset refid="config.files" /> |
---|
345 | </fileset> |
---|
346 | </copy> |
---|
347 | <copy todir="${config}/.." description="Local web.xml"> |
---|
348 | <fileset dir="${config.local}"> |
---|
349 | <include name="web.xml" /> |
---|
350 | </fileset> |
---|
351 | </copy> |
---|
352 | </target> |
---|
353 | |
---|
354 | <target |
---|
355 | name="copy.jar" |
---|
356 | description="Copy required jar files to the appropriate folder" |
---|
357 | > |
---|
358 | <copy todir="${jar}" description="3rd-party JAR files"> |
---|
359 | <fileset dir="${lib}/dist"> |
---|
360 | <include name="**/*" /> |
---|
361 | </fileset> |
---|
362 | </copy> |
---|
363 | </target> |
---|
364 | |
---|
365 | <!-- core targets --> |
---|
366 | <target |
---|
367 | name="core.init" |
---|
368 | depends="dev.init" |
---|
369 | > |
---|
370 | <property name="core.src" location="${src}/core" |
---|
371 | description="Location of core source files" /> |
---|
372 | <property name="core.build" location="${build}/core" |
---|
373 | description="Location of compiled core files" /> |
---|
374 | </target> |
---|
375 | |
---|
376 | <target |
---|
377 | name="core.compile" |
---|
378 | depends="core.init" |
---|
379 | description="Compile the core" |
---|
380 | > |
---|
381 | <mkdir dir="${core.build}"/> |
---|
382 | <javac |
---|
383 | srcdir="${core.src}" |
---|
384 | destdir="${core.build}" |
---|
385 | classpathref="core.classpath" |
---|
386 | encoding="ISO-8859-1" |
---|
387 | debug="true" |
---|
388 | deprecation="true" |
---|
389 | > |
---|
390 | <compilerarg value="${javac.arg}" /> |
---|
391 | </javac> |
---|
392 | <copy todir="${core.build}" |
---|
393 | description="Resource files needed by the core; excludes documentation and source files"> |
---|
394 | <fileset dir="${core.src}"> |
---|
395 | <include name="**/*" /> |
---|
396 | <exclude name="**/*.java" /> |
---|
397 | <exclude name="**/doc-files/" /> |
---|
398 | <exclude name="**/package.html" /> |
---|
399 | </fileset> |
---|
400 | </copy> |
---|
401 | <replace file="${core.build}/base.version"> |
---|
402 | <replacefilter |
---|
403 | token="@MAJOR@" |
---|
404 | value="${base.majorversion}" |
---|
405 | /> |
---|
406 | <replacefilter |
---|
407 | token="@MINOR@" |
---|
408 | value="${base.minorversion}" |
---|
409 | /> |
---|
410 | <replacefilter |
---|
411 | token="@MAINTENANCE@" |
---|
412 | value="${base.maintenanceversion}" |
---|
413 | /> |
---|
414 | <replacefilter |
---|
415 | token="@BUILD@" |
---|
416 | value="${base.build}" |
---|
417 | /> |
---|
418 | </replace> |
---|
419 | </target> |
---|
420 | |
---|
421 | <target |
---|
422 | name="check.hibernate" |
---|
423 | depends="core.init" |
---|
424 | > |
---|
425 | <uptodate |
---|
426 | property="nohibernate" |
---|
427 | > |
---|
428 | <srcfiles dir="${core.src}/net/sf/basedb/core/data" includes="**/*.java"> |
---|
429 | <contains text="@hibernate.class" /> |
---|
430 | </srcfiles> |
---|
431 | <mapper type="glob" from="*.java" to="${core.build}/net/sf/basedb/core/data/*.hbm.xml" /> |
---|
432 | </uptodate> |
---|
433 | <condition property="hibernate.message" |
---|
434 | value="up to date; skipping" |
---|
435 | > |
---|
436 | <istrue value="${nohibernate}" /> |
---|
437 | </condition> |
---|
438 | <condition property="hibernate.message" |
---|
439 | value="not up to date; generating new" |
---|
440 | > |
---|
441 | <isfalse value="${nohibernate}" /> |
---|
442 | </condition> |
---|
443 | <echo>Hibernate mapping files are ${hibernate.message}</echo> |
---|
444 | </target> |
---|
445 | |
---|
446 | <target |
---|
447 | name="core.hibernate" |
---|
448 | depends="core.init,core.compile,check.hibernate" |
---|
449 | description="Generates Hibernate mapping files from the source code" |
---|
450 | unless="nohibernate" |
---|
451 | > |
---|
452 | <delete> |
---|
453 | <fileset dir="${core.build}" includes="**/*.hbm.xml" /> |
---|
454 | </delete> |
---|
455 | <copy todir="${core.build}" |
---|
456 | description="Hardcoded *.hbm.xml files"> |
---|
457 | <fileset dir="${core.src}" includes="**/*.hbm.xml" /> |
---|
458 | </copy> |
---|
459 | <hibernatedoclet |
---|
460 | destdir="${core.build}" |
---|
461 | excludedtags="@version,@author,@todo" |
---|
462 | mergedir="${core.build}" |
---|
463 | verbose="${xdoclet.verbose}"> |
---|
464 | <fileset dir="${core.src}"> |
---|
465 | <include name="**/*.java"/> |
---|
466 | </fileset> |
---|
467 | <hibernate version="2.0"/> |
---|
468 | </hibernatedoclet> |
---|
469 | |
---|
470 | <replace |
---|
471 | dir="${core.build}" |
---|
472 | > |
---|
473 | <include name="**/*.hbm.xml"/> |
---|
474 | <replacefilter |
---|
475 | token="2.0//EN" |
---|
476 | value="3.0//EN" |
---|
477 | /> |
---|
478 | <replacefilter |
---|
479 | token="2.0.dtd" |
---|
480 | value="3.0.dtd" |
---|
481 | /> |
---|
482 | <replacefilter |
---|
483 | token="outer-join="false"" |
---|
484 | value="fetch="select"" |
---|
485 | /> |
---|
486 | <replacefilter |
---|
487 | token="outer-join="true"" |
---|
488 | value="fetch="join"" |
---|
489 | /> |
---|
490 | <replacefilter |
---|
491 | token="index-many-to-many" |
---|
492 | value="map-key-many-to-many" |
---|
493 | /> |
---|
494 | <replacefilter |
---|
495 | token="<index>" |
---|
496 | value="<list-index>" |
---|
497 | /> |
---|
498 | <replacefilter |
---|
499 | token="</index>" |
---|
500 | value="</list-index>" |
---|
501 | /> |
---|
502 | <replacefilter |
---|
503 | token="composite-index" |
---|
504 | value="composite-map-key" |
---|
505 | /> |
---|
506 | </replace> |
---|
507 | </target> |
---|
508 | |
---|
509 | <target |
---|
510 | name="core.jar" |
---|
511 | depends="core.init,core.compile,core.hibernate" |
---|
512 | description="Create the core jar file: BASE2Core.jar" |
---|
513 | > |
---|
514 | <jar |
---|
515 | basedir="${core.build}" |
---|
516 | jarfile="${jar}/BASE2Core.jar" |
---|
517 | /> |
---|
518 | </target> |
---|
519 | |
---|
520 | <!-- core plugin targets --> |
---|
521 | <target |
---|
522 | name="coreplugins.init" |
---|
523 | depends="core.init" |
---|
524 | > |
---|
525 | <property name="coreplugins.src" location="${src}/plugins/core" |
---|
526 | description="Location of source files" /> |
---|
527 | <property name="coreplugins.build" location="${build}/plugins/core" |
---|
528 | description="Location of compiled files" /> |
---|
529 | <path id="coreplugins.classpath" description="Class path for compiling plugins"> |
---|
530 | <path refid="core.classpath"/> |
---|
531 | <pathelement location="${core.build}"/> |
---|
532 | </path> |
---|
533 | </target> |
---|
534 | |
---|
535 | <target |
---|
536 | name="coreplugins.compile" |
---|
537 | depends="core.compile,coreplugins.init" |
---|
538 | description="Compile the core plugins" |
---|
539 | > |
---|
540 | <mkdir dir="${coreplugins.build}" /> |
---|
541 | <javac |
---|
542 | srcdir="${coreplugins.src}" |
---|
543 | destdir="${coreplugins.build}" |
---|
544 | classpathref="coreplugins.classpath" |
---|
545 | encoding="ISO-8859-1" |
---|
546 | debug="true" |
---|
547 | deprecation="true" |
---|
548 | > |
---|
549 | <compilerarg value="${javac.arg}" /> |
---|
550 | </javac> |
---|
551 | </target> |
---|
552 | |
---|
553 | <target |
---|
554 | name="coreplugins.jar" |
---|
555 | depends="coreplugins.compile" |
---|
556 | description="Create the plugin jar file: BASE2CorePlugins.jar" |
---|
557 | > |
---|
558 | <jar |
---|
559 | basedir="${coreplugins.build}" |
---|
560 | jarfile="${jar}/BASE2CorePlugins.jar" |
---|
561 | /> |
---|
562 | </target> |
---|
563 | |
---|
564 | <!-- example plugin targets --> |
---|
565 | <target |
---|
566 | name="exampleplugins.init" |
---|
567 | depends="core.init" |
---|
568 | > |
---|
569 | <property name="exampledir" location="${src}/examples/plugins" /> |
---|
570 | <property name="exampleplugins.src" location="${exampledir}/src" |
---|
571 | description="Location of source files" /> |
---|
572 | <property name="exampleplugins.build" location="${build}/plugins/example" |
---|
573 | description="Location of compiled files" /> |
---|
574 | <path id="exampleplugins.classpath" description="Class path for compiling plugins"> |
---|
575 | <path refid="core.classpath"/> |
---|
576 | <pathelement location="${core.build}"/> |
---|
577 | </path> |
---|
578 | </target> |
---|
579 | |
---|
580 | <target |
---|
581 | name="exampleplugins.compile" |
---|
582 | depends="core.compile,exampleplugins.init" |
---|
583 | description="Compile the example plugins" |
---|
584 | > |
---|
585 | <mkdir dir="${exampleplugins.build}" /> |
---|
586 | <javac |
---|
587 | srcdir="${exampleplugins.src}" |
---|
588 | destdir="${exampleplugins.build}" |
---|
589 | classpathref="exampleplugins.classpath" |
---|
590 | encoding="ISO-8859-1" |
---|
591 | debug="true" |
---|
592 | deprecation="true" |
---|
593 | > |
---|
594 | <compilerarg value="${javac.arg}" /> |
---|
595 | </javac> |
---|
596 | </target> |
---|
597 | |
---|
598 | <target |
---|
599 | name="exampleplugins.jar" |
---|
600 | depends="exampleplugins.compile" |
---|
601 | description="Create the example plugins jar file: ExamplePlugins.jar" |
---|
602 | > |
---|
603 | <jar |
---|
604 | basedir="${exampleplugins.build}" |
---|
605 | jarfile="${jar}/ExamplePlugins.jar" |
---|
606 | manifest="${exampledir}/MANIFEST.MF" |
---|
607 | /> |
---|
608 | </target> |
---|
609 | |
---|
610 | <target |
---|
611 | name="exampleplugins.tar" |
---|
612 | depends="exampleplugins.jar" |
---|
613 | description="Create a downloadable tar file with the example plugins" |
---|
614 | > |
---|
615 | <mkdir dir="${doc}/download" /> |
---|
616 | <tar |
---|
617 | destfile="${doc}/download/exampleplugins.tar.gz" |
---|
618 | compression="gzip" |
---|
619 | > |
---|
620 | <tarfileset |
---|
621 | dir="${exampledir}" |
---|
622 | preserveLeadingSlashes="true" |
---|
623 | /> |
---|
624 | <tarfileset |
---|
625 | dir="${exampleplugins.build}" |
---|
626 | prefix="bin" |
---|
627 | preserveLeadingSlashes="true" |
---|
628 | /> |
---|
629 | </tar> |
---|
630 | </target> |
---|
631 | |
---|
632 | <!-- test targets --> |
---|
633 | <target |
---|
634 | name="test.init" |
---|
635 | depends="core.init,coreplugins.init,jobagent.init" |
---|
636 | > |
---|
637 | <property name="test.src" location="${src}/test" |
---|
638 | description="Location of source files" /> |
---|
639 | <property name="test.build" location="${build}/test" |
---|
640 | description="Location of compiled files" /> |
---|
641 | <path id="test.classpath" description="Class path for compiling"> |
---|
642 | <path refid="core.classpath"/> |
---|
643 | <pathelement location="${core.build}" /> |
---|
644 | <pathelement location="${coreplugins.build}" /> |
---|
645 | <pathelement location="${jobagent.build}" /> |
---|
646 | </path> |
---|
647 | </target> |
---|
648 | |
---|
649 | <target |
---|
650 | name="test.compile" |
---|
651 | depends="test.init,core.compile,coreplugins.compile,jobagent.compile" |
---|
652 | description="Compile the test programs" |
---|
653 | > |
---|
654 | <mkdir dir="${test.build}" /> |
---|
655 | <javac |
---|
656 | srcdir="${test.src}" |
---|
657 | destdir="${test.build}" |
---|
658 | classpathref="test.classpath" |
---|
659 | encoding="ISO-8859-1" |
---|
660 | debug="true" |
---|
661 | deprecation="true" |
---|
662 | > |
---|
663 | <compilerarg value="${javac.arg}" /> |
---|
664 | </javac> |
---|
665 | </target> |
---|
666 | |
---|
667 | <target |
---|
668 | name="test.jar" |
---|
669 | depends="test.compile" |
---|
670 | description="Create a JAR file used by the test programs; Delete corresponding .class files" |
---|
671 | > |
---|
672 | <jar |
---|
673 | jarfile="${test.build}/JarPluginAbout.jar" |
---|
674 | basedir="${test.build}" |
---|
675 | includes="JarPluginAbout.class" |
---|
676 | /> |
---|
677 | <jar |
---|
678 | jarfile="${test.build}/JarPlugin.jar" |
---|
679 | basedir="${test.build}" |
---|
680 | includes="JarPlugin*,NullPlugin*,Base1NullPlugin*" |
---|
681 | excludes="JarPlugin.jar,JarPluginAbout.*" |
---|
682 | manifest="${test.src}/data/JarPluginManifest.txt" |
---|
683 | /> |
---|
684 | <delete> |
---|
685 | <fileset dir="${test.build}" includes="JarPlugin*.class" /> |
---|
686 | </delete> |
---|
687 | </target> |
---|
688 | |
---|
689 | <!-- web targets --> |
---|
690 | <target |
---|
691 | name="web.init" |
---|
692 | depends="core.init,coreplugins.init" |
---|
693 | > |
---|
694 | <property name="web.src" location="${src}/clients/web" |
---|
695 | description="Location of source files" /> |
---|
696 | <property name="web.build" location="${build}/clients/web" |
---|
697 | description="Location of compiled files" /> |
---|
698 | <property name="web.inf" location="www/WEB-INF" |
---|
699 | description="Location of the WEB-INF folder" /> |
---|
700 | <path id="web.classpath" description="Class path for compiling web client"> |
---|
701 | <path refid="core.classpath"/> |
---|
702 | <pathelement location="${core.build}"/> |
---|
703 | <pathelement location="${coreplugins.build}" /> |
---|
704 | <fileset dir="${lib}/servlet"> |
---|
705 | <include name="**/*.jar"/> |
---|
706 | </fileset> |
---|
707 | </path> |
---|
708 | </target> |
---|
709 | |
---|
710 | <target |
---|
711 | name="web.compile" |
---|
712 | depends="web.init,core.compile" |
---|
713 | description="Compile the web client application" |
---|
714 | > |
---|
715 | <mkdir dir="${web.build}" /> |
---|
716 | <javac |
---|
717 | srcdir="${web.src}" |
---|
718 | destdir="${web.build}" |
---|
719 | classpathref="web.classpath" |
---|
720 | encoding="ISO-8859-1" |
---|
721 | debug="true" |
---|
722 | deprecation="true" |
---|
723 | > |
---|
724 | <compilerarg value="${javac.arg}" /> |
---|
725 | </javac> |
---|
726 | </target> |
---|
727 | |
---|
728 | <target |
---|
729 | name="web.jar" |
---|
730 | depends="web.compile" |
---|
731 | description="Create the web client jar file: BASE2Webclient.jar" |
---|
732 | > |
---|
733 | <jar |
---|
734 | basedir="${web.build}" |
---|
735 | jarfile="${jar}/BASE2Webclient.jar" |
---|
736 | /> |
---|
737 | </target> |
---|
738 | |
---|
739 | <target |
---|
740 | name="web.jsp" |
---|
741 | depends="web" |
---|
742 | description="Compile all JSP pages to a temporary directory; used for checking only" |
---|
743 | > |
---|
744 | <property name="jsp.build" location="${build}/jsp" /> |
---|
745 | <property environment="env" /> |
---|
746 | <mkdir dir="${jsp.build}/src" /> |
---|
747 | <mkdir dir="${jsp.build}/classes" /> |
---|
748 | |
---|
749 | <path id="jsp.precompile.classpath"> |
---|
750 | <pathelement location="${java.home}/../lib/tools.jar" /> |
---|
751 | <fileset dir="${env.CATALINA_HOME}/server/lib"> |
---|
752 | <include name="*.jar" /> |
---|
753 | </fileset> |
---|
754 | <fileset dir="${env.CATALINA_HOME}/common/lib"> |
---|
755 | <include name="*.jar" /> |
---|
756 | </fileset> |
---|
757 | <fileset dir="${env.CATALINA_HOME}/bin"> |
---|
758 | <include name="*.jar" /> |
---|
759 | </fileset> |
---|
760 | </path> |
---|
761 | |
---|
762 | <path id="jsp.compile.classpath"> |
---|
763 | <path refid="web.classpath" /> |
---|
764 | <pathelement location="${java.home}/../lib/tools.jar" /> |
---|
765 | <fileset dir="${env.CATALINA_HOME}/common/lib"> |
---|
766 | <include name="*.jar" /> |
---|
767 | </fileset> |
---|
768 | <fileset dir="${env.CATALINA_HOME}/shared/lib"> |
---|
769 | <include name="*.jar" /> |
---|
770 | </fileset> |
---|
771 | <fileset dir="${web.inf}/lib"> |
---|
772 | <include name="*.jar" /> |
---|
773 | </fileset> |
---|
774 | </path> |
---|
775 | |
---|
776 | <taskdef |
---|
777 | classname="org.apache.jasper.JspC" |
---|
778 | name="jasper2" |
---|
779 | classpathref="jsp.precompile.classpath" |
---|
780 | /> |
---|
781 | <jasper2 |
---|
782 | validateXml="false" |
---|
783 | uriroot="www" |
---|
784 | webXmlFragment="${jsp.build}/generated_web.xml" |
---|
785 | outputdir="${jsp.build}/src" |
---|
786 | /> |
---|
787 | <javac |
---|
788 | destdir="${jsp.build}/classes" |
---|
789 | srcdir="${jsp.build}/src" |
---|
790 | debug="true" |
---|
791 | classpathref="jsp.compile.classpath" |
---|
792 | memoryinitialsize="256m" |
---|
793 | memorymaximumsize="512m" |
---|
794 | fork="true" |
---|
795 | > |
---|
796 | </javac> |
---|
797 | </target> |
---|
798 | |
---|
799 | <!-- installprg targets --> |
---|
800 | <target |
---|
801 | name="installprg.init" |
---|
802 | depends="core.init,coreplugins.init,web.init" |
---|
803 | > |
---|
804 | <property name="installprg.src" location="${src}/install" |
---|
805 | description="Location of source files" /> |
---|
806 | <property name="installprg.build" location="${build}/install" |
---|
807 | description="Location of compiled files" /> |
---|
808 | <path id="installprg.classpath" description="Class path for compiling installation programs"> |
---|
809 | <path refid="core.classpath"/> |
---|
810 | <pathelement location="${core.build}"/> |
---|
811 | <pathelement location="${coreplugins.build}"/> |
---|
812 | <pathelement location="${web.build}"/> |
---|
813 | </path> |
---|
814 | </target> |
---|
815 | <target |
---|
816 | name="installprg.compile" |
---|
817 | depends="installprg.init,core.compile" |
---|
818 | description="Compile the installation programs" |
---|
819 | > |
---|
820 | <mkdir dir="${installprg.build}" /> |
---|
821 | <javac |
---|
822 | srcdir="${installprg.src}" |
---|
823 | destdir="${installprg.build}" |
---|
824 | classpathref="installprg.classpath" |
---|
825 | encoding="ISO-8859-1" |
---|
826 | debug="true" |
---|
827 | deprecation="true" |
---|
828 | > |
---|
829 | <compilerarg value="${javac.arg}" /> |
---|
830 | </javac> |
---|
831 | </target> |
---|
832 | |
---|
833 | <target |
---|
834 | name="installprg.jar" |
---|
835 | depends="installprg.compile" |
---|
836 | description="Create the installation jar file: BASE2Install.jar" |
---|
837 | > |
---|
838 | <jar |
---|
839 | basedir="${installprg.build}" |
---|
840 | jarfile="${bin}/jar/BASE2Install.jar" |
---|
841 | /> |
---|
842 | </target> |
---|
843 | |
---|
844 | <!-- jobagent targets --> |
---|
845 | <target |
---|
846 | name="jobagent.init" |
---|
847 | depends="core.init,coreplugins.init,web.init" |
---|
848 | > |
---|
849 | <property name="jobagent.src" location="${src}/clients/jobagent" |
---|
850 | description="Location of source files" /> |
---|
851 | <property name="jobagent.build" location="${build}/clients/jobagent" |
---|
852 | description="Location of compiled files" /> |
---|
853 | <path id="jobagent.classpath" description="Class path for compiling jobagent"> |
---|
854 | <path refid="core.classpath"/> |
---|
855 | <pathelement location="${core.build}"/> |
---|
856 | </path> |
---|
857 | </target> |
---|
858 | <target |
---|
859 | name="jobagent.compile" |
---|
860 | depends="jobagent.init,core.compile" |
---|
861 | description="Compile the job agent application" |
---|
862 | > |
---|
863 | <mkdir dir="${jobagent.build}" /> |
---|
864 | <javac |
---|
865 | srcdir="${jobagent.src}" |
---|
866 | destdir="${jobagent.build}" |
---|
867 | classpathref="jobagent.classpath" |
---|
868 | encoding="ISO-8859-1" |
---|
869 | debug="true" |
---|
870 | deprecation="true" |
---|
871 | > |
---|
872 | <compilerarg value="${javac.arg}" /> |
---|
873 | </javac> |
---|
874 | </target> |
---|
875 | |
---|
876 | <target |
---|
877 | name="jobagent.jar" |
---|
878 | depends="jobagent.compile" |
---|
879 | description="Create the job agent jar file: JobAgent.jar" |
---|
880 | > |
---|
881 | <jar |
---|
882 | basedir="${jobagent.build}" |
---|
883 | jarfile="${bin}/jar/JobAgent.jar" |
---|
884 | /> |
---|
885 | </target> |
---|
886 | |
---|
887 | <!-- migrate targets --> |
---|
888 | <target |
---|
889 | name="migrate.init" |
---|
890 | depends="core.init,coreplugins.init,web.init" |
---|
891 | > |
---|
892 | <property name="migrate.src" location="${src}/clients/migrate" |
---|
893 | description="Location of source files" /> |
---|
894 | <property name="migrate.build" location="${build}/clients/migrate" |
---|
895 | description="Location of compiled files" /> |
---|
896 | <path id="migrate.classpath" description="Class path for compiling migration tool"> |
---|
897 | <path refid="core.classpath"/> |
---|
898 | <pathelement location="${core.build}"/> |
---|
899 | </path> |
---|
900 | </target> |
---|
901 | <target |
---|
902 | name="migrate.compile" |
---|
903 | depends="migrate.init,core.compile" |
---|
904 | description="Compile the migration tool" |
---|
905 | > |
---|
906 | <mkdir dir="${migrate.build}" /> |
---|
907 | <javac |
---|
908 | srcdir="${migrate.src}" |
---|
909 | destdir="${migrate.build}" |
---|
910 | classpathref="migrate.classpath" |
---|
911 | encoding="ISO-8859-1" |
---|
912 | debug="true" |
---|
913 | deprecation="true" |
---|
914 | > |
---|
915 | <compilerarg value="${javac.arg}" /> |
---|
916 | </javac> |
---|
917 | </target> |
---|
918 | |
---|
919 | <target |
---|
920 | name="migrate.jar" |
---|
921 | depends="migrate.compile" |
---|
922 | description="Create the migration tool jar file: Migrate.jar" |
---|
923 | > |
---|
924 | <jar |
---|
925 | basedir="${migrate.build}" |
---|
926 | jarfile="${bin}/jar/Migrate.jar" |
---|
927 | /> |
---|
928 | </target> |
---|
929 | |
---|
930 | <!-- documentation targets --> |
---|
931 | <target |
---|
932 | name="doc.init" |
---|
933 | depends="core.init" |
---|
934 | > |
---|
935 | <property name="javadoc.src" location="doc/src/javadoc" |
---|
936 | description="Location of javadoc source files" /> |
---|
937 | <property name="docbook.src" location="doc/src/docbook" |
---|
938 | description="Location of docbook source XML files" /> |
---|
939 | <path id="javadoc.classpath" description="Class path for generating javadoc"> |
---|
940 | <path refid="core.classpath" /> |
---|
941 | <fileset dir="${lib}/servlet"> |
---|
942 | <include name="**/*.jar"/> |
---|
943 | </fileset> |
---|
944 | </path> |
---|
945 | <property name="docbook.html.out" location="${doc}/html" /> |
---|
946 | <property name="docbook.pdf.out" location="${doc}" /> |
---|
947 | </target> |
---|
948 | |
---|
949 | <target |
---|
950 | name="doc.javadoc" |
---|
951 | depends="doc.init,core.init,coreplugins.init,web.init,migrate.init,jobagent.init" |
---|
952 | description="Generate JavaDoc of entire API" |
---|
953 | > |
---|
954 | <!-- Create the time stamp --> |
---|
955 | <tstamp> |
---|
956 | <format property="TODAY" pattern="yyyy-MM-dd"/> |
---|
957 | </tstamp> |
---|
958 | <delete dir="${doc}/api" /> |
---|
959 | <mkdir dir="${doc}/api"/> |
---|
960 | |
---|
961 | <javadoc |
---|
962 | packagenames="net.sf.basedb.*" |
---|
963 | sourcepath="${core.src}:${coreplugins.src}:${web.src}:${migrate.src}:${jobagent.src}" |
---|
964 | destdir="${doc}/api" |
---|
965 | author="true" |
---|
966 | version="true" |
---|
967 | use="false" |
---|
968 | private="true" |
---|
969 | windowtitle="BASE ${base.version} API documentation" |
---|
970 | stylesheetfile="${javadoc.src}/javadoc.css" |
---|
971 | classpathref="javadoc.classpath" |
---|
972 | linksource="false" |
---|
973 | breakiterator="yes" |
---|
974 | encoding="iso-8859-1" |
---|
975 | overview="${javadoc.src}/overview.html" |
---|
976 | > |
---|
977 | <group title="Public API" |
---|
978 | packages="net.sf.basedb.core:net.sf.basedb.core.plugin:net.sf.basedb.core.query:net.sf.basedb.util*:net.sf.basedb.clients.web.taglib*:net.sf.basedb.plugins:net.sf.basedb.core.authentication" |
---|
979 | /> |
---|
980 | <group title="Mixed Public and Internal API" |
---|
981 | packages="net.sf.basedb.core.data:net.sf.basedb.clients.web:net.sf.basedb.clients.web.util" |
---|
982 | /> |
---|
983 | <group title="Extension API" |
---|
984 | packages="net.sf.basedb.core.dbengine:net.sf.basedb.clients.jobagent" |
---|
985 | /> |
---|
986 | <group title="Internal API" |
---|
987 | packages="net.sf.basedb.core.data.keyring:net.sf.basedb.clients.jobagent.*:net.sf.basedb.clients.migrate*:net.sf.basedb.clients.web.*" |
---|
988 | /> |
---|
989 | |
---|
990 | <header><![CDATA[${base.version}: ${TODAY}]]></header> |
---|
991 | <link href="http://java.sun.com/j2se/1.5/docs/api"/> |
---|
992 | <link href="http://www.hibernate.org/hib_docs/v3/api"/> |
---|
993 | <link href="http://www.jdom.org/docs/apidocs/" /> |
---|
994 | <link href="http://java.sun.com/products/servlet/2.2/javadoc/" /> |
---|
995 | <link href="http://www.singularsys.com/jep/doc/javadoc/" /> |
---|
996 | <link href="http://www.jfree.org/jfreechart/api/gjdoc/" /> |
---|
997 | <link href="http://logging.apache.org/log4j/docs/api/" /> |
---|
998 | <link href="http://java.sun.com/products/java-media/jai/forDevelopers/jai-apidocs/" /> |
---|
999 | <tag name="base.developer" description="Developer info" /> |
---|
1000 | <tag name="base.internal" description="This class/package is not part of the Public API" scope="overview,packages,types" /> |
---|
1001 | <tag name="base.modified" description="Last modified" /> |
---|
1002 | <tag name="hibernate.class" description="Hibernate: class" scope="types" /> |
---|
1003 | <tag name="hibernate.subclass" description="Hibernate: subclass" scope="types" /> |
---|
1004 | <tag name="hibernate.discriminator" description="Hibernate: discriminator" scope="types" /> |
---|
1005 | <tag name="hibernate.id" description="Hibernate: id" scope="methods" /> |
---|
1006 | <tag name="hibernate.generator-param" description="Hibernate: generator-param" scope="methods" /> |
---|
1007 | <tag name="hibernate.version" description="Hibernate: version" scope="methods" /> |
---|
1008 | <tag name="hibernate.property" description="Hibernate: property" scope="methods" /> |
---|
1009 | <tag name="hibernate.column" description="Hibernate: column" scope="methods" /> |
---|
1010 | <tag name="hibernate.map" description="Hibernate: map" scope="methods" /> |
---|
1011 | <tag name="hibernate.set" description="Hibernate: set" scope="methods" /> |
---|
1012 | <tag name="hibernate.list" description="Hibernate: list" scope="methods" /> |
---|
1013 | <tag name="hibernate.array" description="Hibernate: array" scope="methods" /> |
---|
1014 | <tag name="hibernate.one-to-one" description="Hibernate: one-to-one" scope="methods" /> |
---|
1015 | <tag name="hibernate.many-to-one" description="Hibernate: many-to-one" scope="methods" /> |
---|
1016 | <tag name="hibernate.many-to-many" description="Hibernate: many-to-many" scope="methods" /> |
---|
1017 | <tag name="hibernate.index-many-to-many" description="Hibernate: index-many-to-many" scope="methods" /> |
---|
1018 | <tag name="hibernate.collection-key" description="Hibernate: collection-key" scope="methods" /> |
---|
1019 | <tag name="hibernate.collection-index" description="Hibernate: collection-index" scope="methods" /> |
---|
1020 | <tag name="hibernate.collection-composite-index" description="Hibernate: collection-composite-index" scope="methods" /> |
---|
1021 | <tag name="hibernate.collection-element" description="Hibernate: collection-element" scope="methods" /> |
---|
1022 | <tag name="hibernate.collection-composite-element" description="Hibernate: collection-composite-element" scope="methods" /> |
---|
1023 | <tag name="hibernate.collection-one-to-many" description="Hibernate: collection-one-to-many" scope="methods" /> |
---|
1024 | <tag name="hibernate.collection-many-to-many" description="Hibernate: collection-many-to-many" scope="methods" /> |
---|
1025 | <tag name="hibernate.bag" description="Hibernate: bag" scope="methods" /> |
---|
1026 | <tag name="hibernate.many-to-any" description="Hibernate: many-to-any" scope="methods" /> |
---|
1027 | <tag name="hibernate.many-to-any-column" description="Hibernate: many-to-any-column" scope="methods" /> |
---|
1028 | <tag name="hibernate.component" description="Hibernate: component" scope="methods" /> |
---|
1029 | </javadoc> |
---|
1030 | </target> |
---|
1031 | |
---|
1032 | <target |
---|
1033 | name="doc.docbook" |
---|
1034 | depends="doc.init,doc.docbook.html,doc.docbook.pdf" |
---|
1035 | description="Generate docbook user and admin documentation." |
---|
1036 | > |
---|
1037 | </target> |
---|
1038 | |
---|
1039 | <target |
---|
1040 | name="doc.docbook.html" |
---|
1041 | depends="dev.init,doc.init,xsltprocessor" |
---|
1042 | > |
---|
1043 | <mkdir dir="${docbook.html.out}" /> |
---|
1044 | <!--Create subdirectories to store the chunked files in--> |
---|
1045 | <mkdir dir="${docbook.html.out}/admindoc"/> |
---|
1046 | <mkdir dir="${docbook.html.out}/admindoc/user_administration"/> |
---|
1047 | <mkdir dir="${docbook.html.out}/admindoc/installation_upgrade"/> |
---|
1048 | <mkdir dir="${docbook.html.out}/admindoc/plugin_installation"/> |
---|
1049 | <mkdir dir="${docbook.html.out}/admindoc/coreplugin_configuration"/> |
---|
1050 | <mkdir dir="${docbook.html.out}/developerdoc"/> |
---|
1051 | <mkdir dir="${docbook.html.out}/developerdoc/api"/> |
---|
1052 | <mkdir dir="${docbook.html.out}/developerdoc/develop_overview"/> |
---|
1053 | <mkdir dir="${docbook.html.out}/developerdoc/core_ref"/> |
---|
1054 | <mkdir dir="${docbook.html.out}/developerdoc/javadoc"/> |
---|
1055 | <mkdir dir="${docbook.html.out}/developerdoc/plugin_developer"/> |
---|
1056 | <mkdir dir="${docbook.html.out}/developerdoc/write_doc"/> |
---|
1057 | <mkdir dir="${docbook.html.out}/overviewdoc/overview"/> |
---|
1058 | <mkdir dir="${docbook.html.out}/overviewdoc"/> |
---|
1059 | <mkdir dir="${docbook.html.out}/overviewdoc/why_base"/> |
---|
1060 | <mkdir dir="${docbook.html.out}/overviewdoc/resources"/> |
---|
1061 | <mkdir dir="${docbook.html.out}/userdoc"/> |
---|
1062 | <mkdir dir="${docbook.html.out}/userdoc/about"/> |
---|
1063 | <mkdir dir="${docbook.html.out}/userdoc/annotations"/> |
---|
1064 | <mkdir dir="${docbook.html.out}/userdoc/array_lims"/> |
---|
1065 | <mkdir dir="${docbook.html.out}/userdoc/biomaterials"/> |
---|
1066 | <mkdir dir="${docbook.html.out}/userdoc/analysis"/> |
---|
1067 | <mkdir dir="${docbook.html.out}/userdoc/filesystem"/> |
---|
1068 | <mkdir dir="${docbook.html.out}/userdoc/hardware"/> |
---|
1069 | <mkdir dir="${docbook.html.out}/userdoc/import_export"/> |
---|
1070 | <mkdir dir="${docbook.html.out}/userdoc/jobs"/> |
---|
1071 | <mkdir dir="${docbook.html.out}/userdoc/project_permission"/> |
---|
1072 | <mkdir dir="${docbook.html.out}/userdoc/protocols"/> |
---|
1073 | <mkdir dir="${docbook.html.out}/userdoc/reporters"/> |
---|
1074 | <mkdir dir="${docbook.html.out}/userdoc/software"/> |
---|
1075 | <mkdir dir="${docbook.html.out}/userdoc/trashcan"/> |
---|
1076 | <mkdir dir="${docbook.html.out}/userdoc/webclient"/> |
---|
1077 | <mkdir dir="${docbook.html.out}/faqs" /> |
---|
1078 | <mkdir dir="${docbook.html.out}/appendix" /> |
---|
1079 | |
---|
1080 | <mkdir dir="${build}/docbook/html" /> |
---|
1081 | <delete description="Delete existing documents"> |
---|
1082 | <fileset dir="${build}/docbook" defaultexcludes="no" /> |
---|
1083 | <fileset dir="${docbook.html.out}" defaultexcludes="no" /> |
---|
1084 | </delete> |
---|
1085 | <delete file="data/helptexts.xml" /> |
---|
1086 | <ant antfile="${lib}/docbook/ant-build-docbook.xml" inheritall="false" target="html.chunked"> |
---|
1087 | <property name="ant.docbook.styler.dir" location="${lib}/docbook" /> |
---|
1088 | <property name="docbook.xml.dir" location="${docbook.src}" /> |
---|
1089 | <property name="docbook.resources.dir" location="${docbook.src}/figures" /> |
---|
1090 | <property name="distribution.dir" location="${docbook.html.out}" /> |
---|
1091 | <property name="build.dir" location="${build}/docbook/html" /> |
---|
1092 | <property name="base.version" value="${base.version}"/> |
---|
1093 | </ant> |
---|
1094 | |
---|
1095 | <property name="catalog.location" location="${lib}/docbook/preprocess/catalog.xml" /> |
---|
1096 | <path id="ant-extensions"> |
---|
1097 | <fileset dir="${lib}/docbook/ant-extensions" includes="**/*.jar" /> |
---|
1098 | <pathelement path="${lib}/docbook/ant-extensions" /> |
---|
1099 | </path> |
---|
1100 | |
---|
1101 | <xmlcatalog id="dtdcatalog"> |
---|
1102 | <catalogpath> |
---|
1103 | <fileset file="${catalog.location}"/> |
---|
1104 | </catalogpath> |
---|
1105 | </xmlcatalog> |
---|
1106 | |
---|
1107 | <xslt |
---|
1108 | in = "${build}/docbook/html/docbook-ready-file.tmp" |
---|
1109 | style = "${lib}/docbook/preprocess/webclient_helptext.xsl" |
---|
1110 | out = "data/helptexts.xml" |
---|
1111 | processor = "${xslt.processor}" |
---|
1112 | > |
---|
1113 | <xmlcatalog refid="dtdcatalog"/> |
---|
1114 | <classpath refid="ant-extensions" /> |
---|
1115 | |
---|
1116 | <param name="xsltproc.catalog" expression="${catalog.location}" /> |
---|
1117 | <param name="xsltproc.option.--nonet" expression="" /> |
---|
1118 | </xslt> |
---|
1119 | |
---|
1120 | <replaceregexp |
---|
1121 | file="data/helptexts.xml" |
---|
1122 | match="<(?!/?name|/?description|/?helpitem|/?helptexts)(/?([a-z]+)[^>]*)>" |
---|
1123 | replace="&lt;\$1&gt;" |
---|
1124 | flags="sg" |
---|
1125 | /> |
---|
1126 | </target> |
---|
1127 | |
---|
1128 | <target |
---|
1129 | name="doc.docbook.pdf" |
---|
1130 | depends="dev.init,doc.init" |
---|
1131 | > |
---|
1132 | <!-- Generate a pdf file from the documentation source --> |
---|
1133 | <mkdir dir="${build}/docbook/pdf" /> |
---|
1134 | <echo>Generate pdf file</echo> |
---|
1135 | <ant antfile="${lib}/docbook/ant-build-docbook.xml" inheritall="false" target="pdf.fop"> |
---|
1136 | <property name="ant.docbook.styler.dir" location="${lib}/docbook" /> |
---|
1137 | <property name="docbook.xml.dir" location="${docbook.src}" /> |
---|
1138 | <property name="docbook.resources.dir" location="${docbook.src}/figures" /> |
---|
1139 | <property name="distribution.dir" location="${docbook.pdf.out}" /> |
---|
1140 | <property name="build.dir" location="${build}/docbook/pdf" /> |
---|
1141 | <property name="pdf.name" value="base.pdf" /> |
---|
1142 | <property name="base.version" value="${base.version}"/> |
---|
1143 | </ant> |
---|
1144 | </target> |
---|
1145 | |
---|
1146 | <target |
---|
1147 | name="doc.dist" |
---|
1148 | description="Copy documentation to the binary distribution" |
---|
1149 | > |
---|
1150 | <mkdir dir="dist/doc" /> |
---|
1151 | <copy todir="dist/doc"> |
---|
1152 | <!--fileset dir="doc" includes="admin/**/*" /--> |
---|
1153 | <!--fileset dir="doc" includes="development/**/*" /--> |
---|
1154 | <fileset dir="doc" includes="licenses/**/*" /> |
---|
1155 | <fileset dir="doc" includes="specifications/**/*" /> |
---|
1156 | <!--fileset dir="doc" includes="user/**/*" /--> |
---|
1157 | <fileset dir="doc" includes="*.*" /> |
---|
1158 | </copy> |
---|
1159 | </target> |
---|
1160 | |
---|
1161 | <target name="xsltprocessor"> |
---|
1162 | <property environment="env"/> |
---|
1163 | |
---|
1164 | <condition property="executable.file.extension" |
---|
1165 | value=".exe"> |
---|
1166 | <os family="windows"/> |
---|
1167 | </condition> |
---|
1168 | <condition property="executable.file.extension" |
---|
1169 | value=""> |
---|
1170 | <os family="unix"/> |
---|
1171 | </condition> |
---|
1172 | |
---|
1173 | <condition property="tmp:xsltproc.available" |
---|
1174 | value="xsltproc${executable.file.extension}"> |
---|
1175 | <or> |
---|
1176 | <and> |
---|
1177 | <os family="windows"/> |
---|
1178 | <available file="xsltproc${executable.file.extension}" filepath="${env.Path}" /> |
---|
1179 | </and> |
---|
1180 | <and> |
---|
1181 | <os family="unix"/> |
---|
1182 | <available file="xsltproc${executable.file.extension}" filepath="${env.PATH}" /> |
---|
1183 | </and> |
---|
1184 | </or> |
---|
1185 | </condition> |
---|
1186 | |
---|
1187 | <condition property="xslt.processor" value="com.dawidweiss.ant.taskdefs.XsltProcLiaison"> |
---|
1188 | <and> |
---|
1189 | <isset property="tmp:xsltproc.available" /> |
---|
1190 | <not> |
---|
1191 | <isset property="disable.xsltproc" /> |
---|
1192 | </not> |
---|
1193 | </and> |
---|
1194 | </condition> |
---|
1195 | |
---|
1196 | <condition property="xslt.processor" value="com.dawidweiss.ant.taskdefs.SaxonLiaison"> |
---|
1197 | <not> |
---|
1198 | <isset property="disable.saxon" /> |
---|
1199 | </not> |
---|
1200 | </condition> |
---|
1201 | |
---|
1202 | <condition property="xslt.processor" value="trax"> |
---|
1203 | <not> |
---|
1204 | <and> |
---|
1205 | <isset property="tmp:xsltproc.available" /> |
---|
1206 | <not> |
---|
1207 | <isset property="disable.xsltproc" /> |
---|
1208 | </not> |
---|
1209 | </and> |
---|
1210 | </not> |
---|
1211 | </condition> |
---|
1212 | |
---|
1213 | </target> |
---|
1214 | |
---|
1215 | <!--package targets --> |
---|
1216 | <target |
---|
1217 | name="package.bin" |
---|
1218 | depends="dist" |
---|
1219 | description="Create binary distribution package" |
---|
1220 | > |
---|
1221 | <tar |
---|
1222 | destfile="base-${base.version}.tar.gz" |
---|
1223 | longfile="gnu" |
---|
1224 | compression="gzip" |
---|
1225 | > |
---|
1226 | <tarfileset |
---|
1227 | dir="${dist}" |
---|
1228 | mode="755" |
---|
1229 | prefix="base-${base.version}" |
---|
1230 | preserveLeadingSlashes="true" |
---|
1231 | > |
---|
1232 | <include name="**/*.sh" /> |
---|
1233 | </tarfileset> |
---|
1234 | <tarfileset |
---|
1235 | dir="${dist}" |
---|
1236 | prefix="base-${base.version}" |
---|
1237 | preserveLeadingSlashes="true" |
---|
1238 | > |
---|
1239 | <exclude name="**/*.sh" /> |
---|
1240 | </tarfileset> |
---|
1241 | </tar> |
---|
1242 | <checksum file="base-${base.version}.tar.gz" /> |
---|
1243 | </target> |
---|
1244 | |
---|
1245 | <target |
---|
1246 | name="package.src" |
---|
1247 | depends="svn.revision" |
---|
1248 | description="Create source distribution package" |
---|
1249 | > |
---|
1250 | <property name="tempdir" location="base-${base.version}-src" /> |
---|
1251 | <delete dir="${tempdir}" failonerror="false"/> |
---|
1252 | <svn> |
---|
1253 | <export srcPath="." destPath="${tempdir}" /> |
---|
1254 | </svn> |
---|
1255 | <replaceregexp |
---|
1256 | file="${tempdir}/build.xml" |
---|
1257 | match="<svn>.*<status.*?</svn>" |
---|
1258 | replace="<property name="base.build" value="${base.build}" />" |
---|
1259 | flags="s" |
---|
1260 | /> |
---|
1261 | <replace file="${tempdir}/build.xml" |
---|
1262 | description="Remove references to package.src"> |
---|
1263 | <replacefilter |
---|
1264 | token="package.bin,package.src" |
---|
1265 | value="package.bin" |
---|
1266 | /> |
---|
1267 | </replace> |
---|
1268 | <replaceregexp |
---|
1269 | file="${tempdir}/build.xml" |
---|
1270 | match="<target\s*?name="package.src".*?</target>" |
---|
1271 | replace="" |
---|
1272 | flags="s" |
---|
1273 | description="Remove package.src target" |
---|
1274 | /> |
---|
1275 | <tar |
---|
1276 | destfile="base-${base.version}-src.tar.gz" |
---|
1277 | longfile="gnu" |
---|
1278 | compression="gzip" |
---|
1279 | > |
---|
1280 | <tarfileset |
---|
1281 | dir="${tempdir}" |
---|
1282 | mode="755" |
---|
1283 | prefix="base-${base.version}-src" |
---|
1284 | preserveLeadingSlashes="true" |
---|
1285 | > |
---|
1286 | <include name="**/*.sh" /> |
---|
1287 | </tarfileset> |
---|
1288 | <tarfileset |
---|
1289 | dir="${tempdir}" |
---|
1290 | prefix="base-${base.version}-src" |
---|
1291 | preserveLeadingSlashes="true" |
---|
1292 | > |
---|
1293 | <exclude name="**/*.sh" /> |
---|
1294 | </tarfileset> |
---|
1295 | </tar> |
---|
1296 | <checksum file="base-${base.version}-src.tar.gz"/> |
---|
1297 | <delete dir="${tempdir}" /> |
---|
1298 | </target> |
---|
1299 | |
---|
1300 | </project> |
---|