source: branches/3.15-stable/build.xml @ 7746

Last change on this file since 7746 was 7746, checked in by Nicklas Nordborg, 2 years ago

Changes for future release 3.15.3

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