source: trunk/build.xml @ 2862

Last change on this file since 2862 was 2845, checked in by Jari Häkkinen, 16 years ago

Bumped version number in <description> tag.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 29.5 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
2
3<!--
4    $Id: build.xml 2845 2006-10-31 15:17:33Z jari $
5
6    Copyright (C) 2005-2006
7    Samuel Andersson, Jari H&auml;kkinen, Nicklas Nordborg, Gregory Vincic
8
9    This file is part of BASE - BioArray Software Environment.
10    Available at http://base.thep.lu.se/
11
12    BASE is free software; you can redistribute it and/or modify it
13    under the terms of the GNU General Public License as published by
14    the Free Software Foundation; either version 2 of the License, or
15    (at your option) any later version.
16
17    BASE is distributed in the hope that it will be useful, but
18    WITHOUT ANY WARRANTY; without even the implied warranty of
19    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
20    General Public License for more details.
21
22    You should have received a copy of the GNU General Public License
23    along with this program; if not, write to the Free Software
24    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
25    02111-1307, USA.
26-->
27
28<project
29  name="BASE2"
30  default="main"
31  basedir="."
32  >
33
34  <description>
35    Build file for BASE 2.1
36    Available main targets (target 'main' is default):
37
38    all        : core, clients, docs
39    clean      : clean up everything
40    core       : build the core and generate Hibernate mappings
41    coreplugins: build the core plugins
42    installprg : create the database installation and update program
43    javadoc    : generate documentation
44    jobagent   : build the job agent client
45    main       : (default) build the core, plugins and Hibernate mappings
46    migrate    : build the migration client
47    nohibernate: build the core, but do not regenerate the Hibernate mappings
48    package    : create binary distribution
49    test       : build the test programs
50    web        : build the web client
51  </description>
52
53  <!-- set global properties for this build -->
54  <property name="compilerarg" value="-Xlint:unchecked" />
55  <property name="base.version" value="2.1" />
56  <property environment="env" />
57 
58  <property name="src" location="src" />
59  <property name="build" location="build" />
60  <property name="dist" location="dist" />
61  <property name="dist.webinf" location="${dist}/www/WEB-INF" />
62  <property name="dist.lib" location="${dist}/www/WEB-INF/lib" />
63  <property name="dist.classes" location="${dist}/www/WEB-INF/classes" />
64  <property name="dist.bin" location="${dist}/bin" />
65  <property name="doc" location="doc" />
66  <property name="lib" location="lib" />
67  <property name="www" location="www" />
68
69  <property name="core.src" location="${src}/core" />
70  <property name="coreplugins.src" location="${src}/plugins/core" />
71  <property name="test.src" location="${src}/test" />
72  <property name="web.src" location="${src}/clients/web" />
73  <property name="migrate.src" location="${src}/clients/migrate" />
74  <property name="install.src" location="${src}/install" />
75  <property name="jobagent.src" location="${src}/clients/jobagent" />
76
77  <property name="core.build" location="${build}/core" />
78  <property name="coreplugins.build" location="${build}/plugins/core" />
79  <property name="test.build" location="${build}/test" />
80  <property name="migrate.build" location="${build}/clients/migrate" />
81  <property name="install.build" location="${build}/install" />
82  <property name="jobagent.build" location="${build}/clients/jobagent" />
83  <property name="web.build" location="${build}/clients/web" />
84  <property name="web.inf" location="${www}/WEB-INF" />
85  <property name="jsp.build" location="${build}/jsp" />
86
87  <property name="doc.develop" location="${doc}/api/develop" />
88  <property name="doc.public" location="${doc}/api/public" />
89
90  <path id="core.compile.classpath">
91    <fileset dir="${lib}/compile">
92      <include name="**/*.jar"/>
93    </fileset>
94  </path>
95
96  <path id="plugins.compile.classpath">
97    <path refid="core.compile.classpath"/>
98    <pathelement location="${core.build}"/>
99  </path>
100
101  <path id="test.compile.classpath">
102    <path refid="core.compile.classpath"/>
103    <pathelement location="${core.build}"/>
104    <pathelement location="${jobagent.build}"/>
105  </path>
106
107  <path id="migrate.compile.classpath">
108    <path refid="core.compile.classpath" />
109    <pathelement location="${core.build}" />
110  </path>
111
112  <path id="installprg.compile.classpath">
113    <path refid="core.compile.classpath" />
114    <pathelement location="${core.build}" />
115    <pathelement location="${coreplugins.build}" />
116  </path>
117
118  <path id="jobagent.compile.classpath">
119    <path refid="core.compile.classpath" />
120    <pathelement location="${core.build}" />
121  </path>
122
123  <path id="web.compile.classpath">
124    <path refid="core.compile.classpath"/>
125    <pathelement location="${core.build}"/>
126  </path>
127
128  <path id="hibernatedoclet.classpath">
129    <fileset dir="${lib}/hibernatedoclet">
130      <include name="**/*.jar"/>
131    </fileset>
132  </path>
133
134  <path id="subversion.classpath">
135    <fileset dir="${lib}/svn">
136      <include name="**/*.jar"/>
137    </fileset>
138  </path>
139 
140  <taskdef
141    name="hibernatedoclet"
142    classname="xdoclet.modules.hibernate.HibernateDocletTask"
143    classpathref="hibernatedoclet.classpath"
144    description="Task for generating Hibernate mapping files from XDoclet tags"
145  />
146
147  <taskdef
148    name="svn"
149    classname="org.tigris.subversion.svnant.SvnTask"
150    classpathref="subversion.classpath"
151    description="Task for doing subversion from ant"
152  />
153 
154  <target
155    name="all"
156    depends="core, test, web, javadoc"
157    description="Compile/create everything"
158  />
159
160  <target
161    name="main"
162    depends="core.compile,coreplugins.compile,core.hibernate"
163    description="Compile the core and plugins, generate Hibernate mappings"
164  />
165
166  <target
167    name="core"
168    depends="core.compile,core.hibernate"
169    description="Compile the core and plugins, generate Hibernate mappings"
170  />
171 
172  <target
173    name="coreplugins"
174    depends="coreplugins.compile,core"
175    description="Compile the core plugins"
176  />
177
178  <target
179    name="check.hibernate"
180    >
181    <uptodate
182      property="nohibernate"
183      srcfile="${core.src}/net/sf/basedb/core/data/UserData.java"
184      targetfile="${core.build}/net/sf/basedb/core/data/UserData.hbm.xml"
185      >
186    </uptodate>
187    <condition property="hibernate.message" 
188      value="up to date; skipping" 
189      >
190      <istrue value="${nohibernate}" />
191    </condition>
192    <condition property="hibernate.message" 
193      value="not up to date; generating new" 
194      >
195      <isfalse value="${nohibernate}" />
196    </condition>
197    <echo>Hibernate mapping files are ${hibernate.message}</echo>
198  </target>
199 
200  <target
201    name="core.hibernate"
202    depends="core.compile,check.hibernate"
203    description="Generates Hibernate mappings for the core."
204    unless="nohibernate"
205    >
206    <hibernatedoclet
207      destdir="${core.build}"
208      excludedtags="@version,@author,@todo"
209      mergedir="${core.build}"
210      verbose="${xdoclet.verbose}">
211      <fileset dir="${core.src}">
212        <include name="**/*.java"/>
213      </fileset>
214      <hibernate version="2.0"/>
215    </hibernatedoclet>
216   
217    <replace
218      dir="${core.build}"
219      >
220      <include name="**/*.hbm.xml"/>
221      <replacefilter 
222        token="2.0//EN"
223        value="3.0//EN"
224      />
225      <replacefilter 
226        token="2.0.dtd"
227        value="3.0.dtd"
228      />
229      <replacefilter
230        token="outer-join=&#34;false&#34;"
231        value="fetch=&#34;select&#34;"
232      />
233      <replacefilter
234        token="outer-join=&#34;true&#34;"
235        value="fetch=&#34;join&#34;"
236      />
237      <replacefilter
238        token="index-many-to-many"
239        value="map-key-many-to-many"
240      />
241      <replacefilter
242        token="&lt;index&gt;"
243        value="&lt;list-index&gt;"
244      />
245      <replacefilter
246        token="&lt;/index&gt;"
247        value="&lt;/list-index&gt;"
248      />
249      <replacefilter
250        token="composite-index"
251        value="composite-map-key"
252      />
253    </replace>
254  </target>
255
256  <target
257    name="core.compile"
258    depends=""
259    description="compile the core source code"
260    >
261    <mkdir dir="${core.build}"/>
262    <javac
263      encoding="ISO-8859-1"
264      srcdir="${core.src}"
265      destdir="${core.build}"
266      classpathref="core.compile.classpath"
267      debug="true"
268      deprecation="true"
269      >
270      <compilerarg value="${compilerarg}" />
271    </javac>
272    <copy todir="${core.build}">
273      <fileset dir="${core.src}">
274        <include name="**/*.xml" />
275        <include name="**/*.dtd" />
276        <include name="**/*.config" />
277        <include name="**/*.properties" />
278      </fileset>
279    </copy>
280  </target>
281
282  <target
283    name="coreplugins.compile"
284    depends="core.compile"
285    description="compile the core plugins"
286    >
287    <mkdir dir="${coreplugins.build}"/>
288    <javac
289      encoding="ISO-8859-1"
290      srcdir="${coreplugins.src}"
291      destdir="${coreplugins.build}"
292      classpathref="plugins.compile.classpath"
293      debug="true"
294      deprecation="true"
295      >
296      <compilerarg value="${compilerarg}" />
297    </javac>
298  </target>
299 
300  <target
301    name="test"
302    depends="main,jobagent,test.compile"
303    description="Compile the test programs"
304  />
305
306  <target name="test.compile"
307    depends=""
308    description="compile the source code for the test programs"
309    >
310    <mkdir dir="${test.build}"/>
311    <javac
312      srcdir="${test.src}"
313      destdir="${test.build}"
314      classpathref="test.compile.classpath"
315      debug="true"
316      deprecation="true"
317      encoding="ISO-8859-1"
318      >
319      <compilerarg value="${compilerarg}" />
320    </javac>
321    <copy todir="${test.build}">
322      <fileset dir="${test.src}">
323        <include name="**/*.*" />
324        <exclude name="**/*.java" />
325      </fileset>
326    </copy>
327    <chmod dir="${test.build}" includes="*.sh" perm="a+x"/>
328    <copy todir="${test.build}">
329      <fileset dir="${src}">
330        <include name="*.config" />
331        <include name="*.properties" />
332        <include name="*.xml" />
333      </fileset>
334    </copy>
335    <jar 
336      jarfile="${test.build}/JarPluginAbout.jar" 
337      basedir="${test.build}" 
338      includes="JarPluginAbout.class" 
339    />
340    <jar 
341      jarfile="${test.build}/JarPlugin.jar" 
342      basedir="${test.build}" 
343      includes="JarPlugin*,NullPlugin*"
344      excludes="JarPlugin.jar,JarPluginAbout.class"
345      manifest="${test.src}/JarPluginManifest.txt"
346    />
347    <delete>
348      <fileset dir="${test.build}" includes="JarPlugin*" excludes="*.jar" />
349    </delete>
350  </target>
351
352  <target
353    name="migrate"
354    depends="main,dist.migrate"
355    description="create the Migrate.jar"
356  >
357  </target>
358 
359  <target name="dist.migrate" depends="migrate.compile,dist.init" description="">
360
361    <jar basedir="${migrate.build}" jarfile="${dist.bin}/Migrate.jar" includes="**/*.class">
362    </jar>
363    <copy todir="${dist.bin}" file="${migrate.src}/migrate_from_1.2.sh" />
364    <chmod file="${dist.bin}/migrate_from_1.2.sh" perm="a+x"/>
365    <copy tofile="${dist.classes}/migrate.properties" file="${migrate.src}/migrate.properties.in" />
366    <chmod file="${dist.classes}/migrate.properties" perm="600"/>
367    <copy tofile="${dist.classes}/mysql-migration-queries.sql" file="${migrate.src}/sql/mysql-migration-queries.sql" />
368    <chmod file="${dist.classes}/mysql-migration-queries.sql" perm="600"/>
369
370  </target>
371
372  <target name="migrate.properties" if="migrate.newproperties">
373    <copy tofile="${migrate.build}/migrate.properties" file="${migrate.src}/migrate.properties.in" />
374    <chmod file="${migrate.build}/migrate.properties" perm="600"/>
375  </target>
376
377  <target name="migrate.compile" description="compile the source code for the migration program">
378
379    <mkdir dir="${migrate.build}" />
380    <javac
381      encoding="ISO-8859-1"
382      srcdir="${migrate.src}"
383      destdir="${migrate.build}"
384      classpathref="migrate.compile.classpath"
385      debug="true"
386      >
387      <compilerarg value="${compilerarg}" />
388    </javac>
389    <copy todir="${migrate.build}">
390      <fileset dir="${src}">
391        <include name="*.config" />
392        <include name="*.properties" />
393        <include name="*.xml" />
394      </fileset>
395    </copy>
396    <copy todir="${migrate.build}" file="${migrate.src}/migrate_from_1.2.sh" />
397    <chmod file="${migrate.build}/migrate_from_1.2.sh" perm="a+x"/>
398    <condition property="migrate.newproperties">
399      <not>
400        <available file="${migrate.build}/migrate.properties"/>
401      </not>
402    </condition>
403    <antcall target="migrate.properties"/>
404
405  </target>
406
407  <target
408     name="installprg"
409     depends="installprg.compile"
410     description="Generate the installation program jar file: BASE2Install.jar"
411     >
412    <jar
413       basedir="${install.build}"
414       jarfile="${install.src}/BASE2Install.jar"
415       />
416  </target>
417
418  <target name="installprg.compile"
419    description="Compile the source code for the installation program"
420    >
421    <mkdir dir="${install.build}" />
422    <javac
423      encoding="ISO-8859-1"
424      srcdir="${install.src}"
425      destdir="${install.build}"
426      classpathref="installprg.compile.classpath"
427      debug="true"
428      deprecation="true"
429      >
430      <compilerarg value="${compilerarg}" />
431    </javac>
432  </target>
433
434 
435  <target
436    name="jobagent"
437    depends="jobagent.compile"
438    description="Compile the job agent client"
439    >
440  </target>
441 
442  <target
443    name="jobagent.compile"
444    depends="core.compile"
445    >
446    <mkdir dir="${jobagent.build}" />
447    <javac
448      encoding="ISO-8859-1"
449      srcdir="${jobagent.src}"
450      destdir="${jobagent.build}"
451      classpathref="jobagent.compile.classpath"
452      debug="true"
453      deprecation="true"
454      >
455      <compilerarg value="${compilerarg}" />
456    </javac>
457  </target>
458 
459  <target
460    name="web"
461    depends="main,web.compile"
462    description="Compile the web client, and copy required files to the web-inf directory"
463  >
464    <mkdir dir="${web.inf}/lib"/>
465    <mkdir dir="${web.inf}/classes"/>
466    <jar
467      basedir="${core.build}"
468      jarfile="${web.inf}/lib/BASE2Core.jar"
469    />
470    <jar
471      basedir="${coreplugins.build}"
472      jarfile="${web.inf}/lib/BASE2CorePlugins.jar"
473    />
474    <jar
475      basedir="${web.build}"
476      jarfile="${web.inf}/lib/BASE2Webclient.jar"
477    />
478    <copy todir="${web.inf}/lib">
479      <fileset dir="${lib}/compile">
480        <include name="**/*.jar"/>
481        <exclude name="**/servlet-api.jar" />
482        <exclude name="**/jsp-api.jar" />
483      </fileset>
484      <fileset dir="${lib}/dist">
485        <include name="**/*.jar"/>
486      </fileset>
487    </copy>
488    <copy todir="${web.inf}/classes">
489      <fileset dir="${src}">
490        <include name="*.config"/>
491        <include name="*.properties"/>
492        <include name="*.xml"/>
493      </fileset>
494    </copy>
495  </target>
496
497  <target
498    name="web.compile"
499    depends=""
500    description="compile the source code for the web client"
501    >
502    <mkdir dir="${web.build}"/>
503    <javac
504      encoding="ISO-8859-1"
505      srcdir="${web.src}"
506      destdir="${web.build}"
507      classpathref="web.compile.classpath"
508      debug="true"
509      deprecation="true"
510      >
511      <compilerarg value="${compilerarg}" />
512    </javac>
513    <copy todir="${web.build}">
514      <fileset dir="${web.src}">
515        <include name="**/*.xml" />
516        <include name="**/*.dtd" />
517        <include name="**/*.config" />
518        <include name="**/*.properties" />
519      </fileset>
520    </copy>
521  </target>
522
523  <target 
524    name="jsp.compile"
525    depends="web"
526    description="Compile all JSP pages to a temporary directory"
527    >
528    <mkdir dir="${jsp.build}/src" />
529    <mkdir dir="${jsp.build}/classes" />
530   
531    <path id="jsp.precompile.classpath">
532      <pathelement location="${java.home}/../lib/tools.jar" />
533      <fileset dir="${env.CATALINA_HOME}/server/lib">
534        <include name="*.jar" />
535      </fileset>
536      <fileset dir="${env.CATALINA_HOME}/common/lib">
537        <include name="*.jar" />
538      </fileset>
539      <fileset dir="${env.CATALINA_HOME}/bin">
540        <include name="*.jar" />
541      </fileset>
542    </path>
543   
544    <path id="jsp.compile.classpath">
545      <path refid="web.compile.classpath" />
546      <pathelement location="${java.home}/../lib/tools.jar" />
547      <fileset dir="${env.CATALINA_HOME}/common/lib">
548        <include name="*.jar" />
549      </fileset>
550      <fileset dir="${env.CATALINA_HOME}/shared/lib">
551        <include name="*.jar" />
552      </fileset>
553      <fileset dir="${web.inf}/lib">
554        <include name="*.jar" />
555      </fileset>
556    </path>
557
558    <taskdef
559      classname="org.apache.jasper.JspC" 
560      name="jasper2"
561      classpathref="jsp.precompile.classpath"
562    />
563    <jasper2
564      validateXml="false"
565      uriroot="${www}"
566      webXmlFragment="${jsp.build}/generated_web.xml"
567      outputdir="${jsp.build}/src"
568    />
569    <javac
570      destdir="${jsp.build}/classes"
571      srcdir="${jsp.build}/src"
572      debug="true"
573      classpathref="jsp.compile.classpath"
574      memoryinitialsize="256m"
575      memorymaximumsize="512m"
576      fork="true"
577      >
578    </javac>
579  </target>
580 
581  <target
582    name="dist"
583    depends="clean,svn.revision,dist.init,dist.core,dist.coreplugins,dist.installprg,dist.web,dist.jobagent,dist.doc,dist.migrate"
584    description="Create the distribution and put all files in their correct places">
585    <move 
586      file="${core.src}/net/sf/basedb/core/Application.java.bak"
587      tofile="${core.src}/net/sf/basedb/core/Application.java"
588      overwrite="true"
589    />
590    <copy todir="${dist.lib}">
591      <fileset dir="${lib}/compile">
592        <include name="**/*.jar"/>
593        <!--exclude name="**/*jai*.jar" / -->
594        <exclude name="**/servlet-api.jar" />
595        <exclude name="**/jsp-api.jar" />
596      </fileset>
597      <fileset dir="${lib}/dist">
598        <include name="**/*.*"/>
599        <exclude name="**/ojdbc14.jar" />
600      </fileset>
601    </copy>
602    <copy tofile="${dist.webinf}/web.xml" file="${src}/web.xml.in" overwrite="true" />
603    <copy tofile="${dist.classes}/base.config" file="${src}/base.config.in" overwrite="true"/>
604    <chmod file="${dist.classes}/base.config" perm="600"/>
605    <copy tofile="${dist.classes}/log4j.properties" file="${src}/log4j.properties.in" overwrite="true"/>
606    <chmod file="${dist.classes}/log4j.properties" perm="600"/>
607  </target>
608
609  <target
610    name="dist.init"
611    description="Create the distribution directory structure"
612    >
613    <mkdir dir="${dist}"/>
614    <mkdir dir="${dist.bin}"/>
615    <mkdir dir="${dist}/doc"/>
616    <mkdir dir="${dist}/www"/>
617    <mkdir dir="${dist.lib}"/>
618    <copy 
619      file="${core.src}/net/sf/basedb/core/Application.java"
620      tofile="${core.src}/net/sf/basedb/core/Application.java.bak"
621      overwrite="false"
622    />
623    <replace
624      file="${core.src}/net/sf/basedb/core/Application.java"
625      token="@BUILD@"
626      value="${base.build}"
627    />
628  </target>
629
630  <target 
631    name="svn.revision"
632    description="Get the current revision number in the subversion and put the value into the base.build property"
633    >
634    <!--
635    <exec
636      executable="svnversion"
637      outputproperty="base.build"
638      failifexecutionfails="false"
639      >
640      <arg line="." />
641    </exec>
642    -->
643    <svn>
644      <status path="./credits.txt" revisionProperty="base.build" />
645    </svn>
646    <echo message="Build #${base.build}" />
647  </target>
648 
649  <target
650    name="dist.core"
651    depends="core.compile,core.hibernate"
652    description="Generate the core jar file: BASE2Core.jar"
653    >
654    <jar
655      basedir="${core.build}"
656      jarfile="${dist.lib}/BASE2Core.jar"
657    />
658  </target>
659 
660  <target
661    name="dist.coreplugins"
662    depends="coreplugins.compile"
663    description="Generate the core plugins jar file: BASE2CorePlugins.jar"
664    >
665    <jar
666      basedir="${coreplugins.build}"
667      jarfile="${dist.lib}/BASE2CorePlugins.jar"
668    />
669  </target>
670
671  <target 
672    name="dist.jobagent"
673    depends="jobagent.compile,dist.core"
674    >
675    <jar
676      basedir="${jobagent.build}"
677      jarfile="${dist.bin}/JobAgent.jar"
678    />
679    <copy todir="${dist.bin}">
680      <fileset dir="${jobagent.src}" includes="*.sh,*.bat" />
681    </copy>
682    <chmod dir="${dist.bin}" includes="*.sh" perm="a+x"/>
683    <copy tofile="${dist.bin}/jobagent.properties" file="${jobagent.src}/jobagent.properties.in" overwrite="true"/>
684    <chmod file="${dist.bin}/jobagent.properties" perm="600"/>
685  </target>
686 
687  <target
688    name="dist.installprg"
689    depends="installprg"
690    description="Copy installation files to proper location"
691    >
692    <copy todir="${dist.bin}">
693      <fileset dir="${install.src}" includes="BASE2Install.jar" />
694      <fileset dir="${install.src}" includes="*.sh,*.bat" />
695      <fileset dir="${install.src}" includes="includes" />
696      <fileset file="${web.src}/helptexts.xml" />
697    </copy>
698    <chmod dir="${dist.bin}" includes="*.sh" perm="a+x"/>
699  </target>
700  <target
701    name="dist.web"
702    depends="web"
703    description="Generate the web jar file: BASE2Webclient.jar
704      and copy all *.jsp files"
705    >
706    <jar
707      basedir="${web.build}"
708      jarfile="${dist.lib}/BASE2Webclient.jar"
709    />
710    <copy
711      todir="${dist}/www"
712      >
713      <fileset dir="${www}">
714        <include name="**/*"/>
715        <exclude name="**/*.jar" />
716      </fileset>
717    </copy>
718  </target>
719 
720  <target
721    name="dist.doc"
722    depends=""
723    description="Copy required documentation"
724    >
725    <copy todir="${dist}/doc/admin">
726      <fileset dir="${doc}/admin" />
727    </copy>
728    <copy todir="${dist}" file="${doc}/installation.html" />
729    <copy todir="${dist}" file="base2.license.txt" />
730    <copy todir="${dist}" file="credits.txt" />
731    <copy todir="${dist}/doc" file="${doc}/3rd-party-components.txt" />
732    <copy todir="${dist}/doc" file="${doc}/configure_unicode_support.txt" />
733    <copy todir="${dist}/doc" file="${doc}/tomcat_with_java_1.5.txt" />
734    <copy todir="${dist}/doc/licenses">
735      <fileset dir="${doc}/licenses" />
736    </copy>
737  </target>
738 
739  <target
740    name="package"
741    depends="dist,svn.revision"
742    description="Package the distribution"
743    >
744    <tar
745      destfile="base-${base.version}.${base.build}.tar.gz"
746      compression="gzip"
747      >
748      <tarfileset
749        dir="${dist}"
750        mode="755"
751        prefix="base-${base.version}"
752        preserveLeadingSlashes="true"
753        >
754        <include name="bin/*.sh"/>
755      </tarfileset>
756      <tarfileset
757        dir="${dist}"
758        prefix="base-${base.version}"
759        preserveLeadingSlashes="true"
760        >
761        <exclude name="bin/*.sh"/>
762      </tarfileset>
763    </tar>
764    <checksum
765      file="base-${base.version}.${base.build}.tar.gz"
766    />
767  </target>
768
769  <target
770    name="clean"
771    description="Remove all generated files and backup files" >
772    <delete dir="${build}"/>
773    <delete dir="${dist}"/>
774    <delete dir="${web.inf}/lib"/>
775    <delete dir="${web.inf}/classes"/>
776    <delete>
777      <fileset dir="." includes="**/base-*.tar.gz*" defaultexcludes="no"/>
778      <fileset dir="." includes="**/*~" defaultexcludes="no"/>
779      <fileset dir="." includes="**/.#*" defaultexcludes="no"/>
780      <fileset dir="${install.src}" includes="BASE2Install.jar" defaultexcludes="no"/>
781    </delete>
782  </target>
783
784  <target
785    name="exampleplugins"
786    description="Tar the code for example plugins"
787    >
788    <property name="exampledir" location="${src}/examples/plugins" />
789    <javac 
790      encoding="ISO-8859-1"
791      srcdir="${exampledir}/src"
792      destdir="${exampledir}/bin"
793      debug="true"
794      >
795      <classpath>
796        <fileset dir="${exampledir}/lib">
797          <include name="**/*.jar"/>
798        </fileset>
799        <pathelement path="${core.build}" />
800      </classpath>
801    </javac>
802    <jar 
803      jarfile="${exampledir}/ExamplePlugins.jar" 
804      basedir="${exampledir}/bin"
805      manifest="${exampledir}/MANIFEST.MF"
806    />
807    <tar
808      destfile="${doc}/development/plugins/exampleplugins.tar.gz"
809      compression="gzip"
810      >
811      <tarfileset
812        dir="${src}/examples/plugins"
813        preserveLeadingSlashes="true"
814      />
815    </tar>
816    <delete file="${exampledir}/ExamplePlugins.jar" />
817    <delete includeemptydirs="true">
818      <fileset dir="${exampledir}/bin" includes="**/*"/>
819    </delete>
820  </target>
821 
822  <target
823    name="javadoc"
824    depends="javadoc.develop,javadoc.public"
825  />
826
827  <target
828    name="javadoc.develop"
829    description="generate JavaDoc for developers of BASE, ie. include private and protecteed methods.">
830    <!-- Create the time stamp -->
831    <tstamp>
832      <format property="TODAY" pattern="yyyy-MM-dd"/>
833    </tstamp>
834    <mkdir dir="${doc}"/>
835
836    <javadoc
837      packagenames="net.sf.basedb.*"
838      sourcepath="${core.src}:${web.src}:${migrate.src}"
839      destdir="${doc.develop}"
840      author="true"
841      version="true"
842      use="true"
843      private="true"
844      windowtitle="BASE 2.0 Class documentation (developer edition)"
845      stylesheetfile="${doc}/javadoc.css"
846      classpathref="core.compile.classpath"
847      linksource="yes"
848      breakiterator="yes"
849      encoding="iso-8859-1"
850      >
851      <header><![CDATA[Last update: ${TODAY}]]></header>
852      <link href="http://java.sun.com/j2se/1.5/docs/api"/>
853      <link href="http://www.hibernate.org/hib_docs/v3/api"/>
854      <link href="http://www.jdom.org/docs/apidocs/" />
855      <link href="http://java.sun.com/products/servlet/2.2/javadoc/" />
856      <link href="http://www.singularsys.com/jep/doc/javadoc/" />
857      <tag name="base.internal" description="Developer info" />
858      <tag name="base.modified" description="Last modified" />
859      <tag name="hibernate.class" description="Hibernate: class" scope="types" />
860      <tag name="hibernate.subclass" description="Hibernate: subclass" scope="types" />
861      <tag name="hibernate.discriminator" description="Hibernate: discriminator" scope="types" />
862      <tag name="hibernate.id" description="Hibernate: id" scope="methods" />
863      <tag name="hibernate.generator-param" description="Hibernate: generator-param" scope="methods" />
864      <tag name="hibernate.version" description="Hibernate: version" scope="methods" />
865      <tag name="hibernate.property" description="Hibernate: property" scope="methods" />
866      <tag name="hibernate.column" description="Hibernate: column" scope="methods" />
867      <tag name="hibernate.map" description="Hibernate: map" scope="methods" />
868      <tag name="hibernate.set" description="Hibernate: set" scope="methods" />
869      <tag name="hibernate.list" description="Hibernate: list" scope="methods" />
870      <tag name="hibernate.array" description="Hibernate: array" scope="methods" />
871      <tag name="hibernate.one-to-one" description="Hibernate: one-to-one" scope="methods" />
872      <tag name="hibernate.many-to-one" description="Hibernate: many-to-one" scope="methods" />
873      <tag name="hibernate.many-to-many" description="Hibernate: many-to-many" scope="methods" />
874      <tag name="hibernate.index-many-to-many" description="Hibernate: index-many-to-many" scope="methods" />
875      <tag name="hibernate.collection-key" description="Hibernate: collection-key" scope="methods" />
876      <tag name="hibernate.collection-index" description="Hibernate: collection-index" scope="methods" />
877      <tag name="hibernate.collection-composite-index" description="Hibernate: collection-composite-index" scope="methods" />
878      <tag name="hibernate.collection-element" description="Hibernate: collection-element" scope="methods" />
879      <tag name="hibernate.collection-composite-element" description="Hibernate: collection-composite-element" scope="methods" />
880      <tag name="hibernate.collection-one-to-many" description="Hibernate: collection-one-to-many" scope="methods" />
881      <tag name="hibernate.collection-many-to-many" description="Hibernate: collection-many-to-many" scope="methods" />
882      <tag name="hibernate.bag" description="Hibernate: bag" scope="methods" />
883      <tag name="hibernate.many-to-any" description="Hibernate: many-to-any" scope="methods" />
884      <tag name="hibernate.many-to-any-column" description="Hibernate: many-to-any-column" scope="methods" />
885    </javadoc>
886  </target>
887
888  <target
889    name="javadoc.public"
890    description="generate public JavaDoc, ie. without private and protected methods">
891    <tstamp>
892      <format property="TODAY" pattern="yyyy-MM-dd"/>
893    </tstamp>
894    <mkdir dir="${doc}"/>
895    <javadoc
896      packagenames="net.sf.basedb.*"
897      sourcepath="${core.src}:${web.src}"
898      destdir="${doc.public}"
899      author="true"
900      version="true"
901      protected="true"
902      windowtitle="BASE 2.0 Class documentation"
903      stylesheetfile="${doc}/javadoc.css"
904      classpathref="core.compile.classpath"
905      breakiterator="yes"
906      encoding="iso-8859-1"
907      >
908      <header><![CDATA[Last update: ${TODAY}]]></header>
909      <link href="http://java.sun.com/j2se/1.5/docs/api"/>
910      <link href="http://www.hibernate.org/hib_docs/v3/api"/>
911      <link href="http://www.jdom.org/docs/apidocs/" />
912      <link href="http://java.sun.com/products/servlet/2.2/javadoc/" />
913      <link href="http://www.singularsys.com/jep/doc/javadoc/" />
914      <tag name="base.internal" description="Developer info" enabled="false" />
915      <tag name="base.modified" description="Last modified" enabled="false" />
916      <tag name="hibernate.class" description="Hibernate: class" scope="types" enabled="false" />
917      <tag name="hibernate.subclass" description="Hibernate: subclass" scope="types" enabled="false" />
918      <tag name="hibernate.discriminator" description="Hibernate: discriminator" scope="types" enabled="false" />
919      <tag name="hibernate.id" description="Hibernate: id" scope="methods" enabled="false" />
920      <tag name="hibernate.generator-param" description="Hibernate: generator-param" scope="methods" enabled="false" />
921      <tag name="hibernate.version" description="Hibernate: version" scope="methods" enabled="false" />
922      <tag name="hibernate.property" description="Hibernate: property" scope="methods" enabled="false" />
923      <tag name="hibernate.key-property" description="Hibernate: key-property" scope="methods" enabled="false" />
924      <tag name="hibernate.column" description="Hibernate: column" scope="methods" />
925      <tag name="hibernate.map" description="Hibernate: map" scope="methods" enabled="false" />
926      <tag name="hibernate.set" description="Hibernate: set" scope="methods" enabled="false" />
927      <tag name="hibernate.list" description="Hibernate: list" scope="methods" enabled="false" />
928      <tag name="hibernate.array" description="Hibernate: array" scope="methods" enabled="false" />
929      <tag name="hibernate.one-to-one" description="Hibernate: one-to-one" scope="methods" enabled="false" />
930      <tag name="hibernate.many-to-one" description="Hibernate: many-to-one" scope="methods" enabled="false" />
931      <tag name="hibernate.many-to-many" description="Hibernate: many-to-many" scope="methods" enabled="false" />
932      <tag name="hibernate.index-many-to-many" description="Hibernate: index-many-to-many" scope="methods" enabled="false" />
933      <tag name="hibernate.collection-key" description="Hibernate: collection-key" scope="methods" enabled="false" />
934      <tag name="hibernate.collection-index" description="Hibernate: collection-index" scope="methods" enabled="false" />
935      <tag name="hibernate.collection-composite-index" description="Hibernate: collection-composite-index" scope="methods" enabled="false" />
936      <tag name="hibernate.collection-element" description="Hibernate: collection-element" scope="methods" enabled="false" />
937      <tag name="hibernate.collection-composite-element" description="Hibernate: collection-composite-element" scope="methods" enabled="false" />
938      <tag name="hibernate.collection-one-to-many" description="Hibernate: collection-one-to-many" scope="methods" enabled="false" />
939      <tag name="hibernate.collection-many-to-many" description="Hibernate: collection-many-to-many" scope="methods" enabled="false" />
940      <tag name="hibernate.bag" description="Hibernate: bag" scope="methods" enabled="false" />
941      <tag name="hibernate.many-to-any" description="Hibernate: many-to-any" scope="methods" enabled="false" />
942      <tag name="hibernate.many-to-any-column" description="Hibernate: many-to-any-column" scope="methods" enabled="false" />
943    </javadoc>
944  </target>
945
946
947</project>
Note: See TracBrowser for help on using the repository browser.