source: branches/3.13-stable/build.xml @ 7561

Last change on this file since 7561 was 7561, checked in by Nicklas Nordborg, 3 years ago

Preparing to release BASE 3.13.1

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