2 <project name="vamsas-client" default="build" basedir=".">
5 <property name="libDir" value="lib"/>
6 <property name="toolsDir" value="tools"/>
7 <property name="resourceDir" value="resources"/>
8 <property name="sourceDir" value="src" />
9 <property name="outputDir" value="classes" />
10 <property name="packageDir" value="packages" />
11 <property name="vamsas.schema" value="schemas/vamsas.xsd" />
12 <property name="vamsas.doc.schema" value="schemas/vamsasDocument.xsd" />
13 <property name="vamsas.schema.package" value="org.vamsas.objects.core" />
14 <property name="vamsas.schema.package.src" value="org/vamsas/objects/core" />
15 <property name="vamsas.schema.sourcegen.properties" value="schemas/castorbuilder.properties"/>
16 <path id="castor.classpath">
18 <include name="*.jar"/>
19 <include name="**/*.jar"/>
22 <include name="*.jar"/>
23 <include name="**/*.jar"/>
30 <path id="build.classpath">
31 <fileset dir="${toolsDir}">
32 <include name="*.jar"/>
33 <include name="**/*.jar"/>
36 <fileset dir="${libDir}">
37 <include name="*.jar"/>
38 <include name="**/*.jar"/>
40 <!-- path refid="axis.classpath" -->
43 <target name="cleancoresource" depends="init" description="Clean automatically generated packages">
45 <fileset dir="${sourceDir}/${vamsas.schema.package.src}">
46 <include name="*.java"/>
50 <target name="makecoresource" depends="init, cleancoresource" description="Generate Java source files from XSD.">
51 <taskdef name="castor-srcgen"
52 classname="org.exolab.castor.tools.ant.taskdefs.CastorSourceGenTask"
53 classpathref="castor.classpath" />
54 <!-- Should apply this to every schema file in ${vamsas.schemas} directory -->
55 <castor-srcgen file="${vamsas.schema}"
57 package="${vamsas.schema.package}"
60 properties="${vamsas.schema.sourcegen.properties}"
62 <castor-srcgen file="${vamsas.doc.schema}"
64 package="${vamsas.schema.package}"
67 properties="${vamsas.schema.sourcegen.properties}"
70 <target name="prepare" depends="init">
71 <mkdir dir="${packageDir}"/>
72 <mkdir dir="${outputDir}"/>
73 <copy todir="${outputDir}">
74 <fileset dir="${resourceDir}" />
77 <target name="clean" depends="init">
79 <fileset dir="${outputDir}">
82 <include name="**/*"/>
83 <include name="**/*.*"/>
86 <delete dir="${axisbuild}"/>
87 <!-- <ant dir="test" antfile="build.xml" target="clean"
88 inheritRefs="true"/> -->
90 <target name="realclean" depends="init, clean">
91 <delete dir="${packageDir}"/>
93 <target name="distclean" depends="init, realclean">
94 <echo message="REMOVING ALL BACKUP/AUTOSAVES!"/>
98 <include name="#*.*#"/>
99 <include name="**/#*#"/>
100 <include name="**/#*.*#"/>
102 <include name="*.*~"/>
103 <include name="**/*~"/>
104 <include name="**/*.*~"/>
109 <target name="build" depends="init, prepare">
110 <!-- not efficient yet. : use excludes="*/localtest/*.java" if local tests are not building -->
111 <javac classpathref="build.classpath" debug="on" srcdir="${sourceDir}" destdir="${outputDir}" />