added source generator and builder
authorjprocter <jprocter@compbio.dundee.ac.uk>
Tue, 20 Sep 2005 09:42:13 +0000 (09:42 +0000)
committerjprocter <jprocter@compbio.dundee.ac.uk>
Tue, 20 Sep 2005 09:42:13 +0000 (09:42 +0000)
git-svn-id: https://svn.lifesci.dundee.ac.uk/svn/repository/trunk@32 be28352e-c001-0410-b1a7-c7978e42abec

build.xml

index e2e4887..51aeaff 100644 (file)
--- a/build.xml
+++ b/build.xml
@@ -3,12 +3,14 @@
 
        <target name="init">
                <property name="libDir" value="lib"/>
+               <property name="toolsDir" value="tools"/>
                <property name="resourceDir" value="resources"/>
                <property name="sourceDir" value="src" />
                <property name="outputDir" value="classes" />
                <property name="packageDir" value="packages" />
                <property name="vamsas.schema" value="schemas/vamsas15_9.xsd" />
                <property name="vamsas.schema.package" value="org.vamsas.objects.core" />
+               <property name="vamsas.schema.package.src" value="org/vamsas/objects/core" />
                <property name="vamsas.schema.sourcegen.properties" value="schemas/castorbuilder.properties"/>
                <path id="castor.classpath">
                        <fileset dir="tools">
@@ -25,7 +27,7 @@
                Build classpath
                -->
                <path id="build.classpath">
-                       <fileset dir="utils">
+                       <fileset dir="${toolsDir}">
                                <include name="*.jar"/>
                                <include name="**/*.jar"/>
                        </fileset>
                        <!--            path refid="axis.classpath"  -->
                </path>
        </target>
-       <target name="makecoresource" depends="init" description="Generate Java source files from XSD.">
+       <target name="cleancoresource" depends="init" description="Clean automatically generated packages">
+               <delete>
+                       <fileset dir="${sourceDir}/${vamsas.schema.package.src}">
+                               <include name="*.java"/>
+                       </fileset>
+               </delete>
+       </target>
+       <target name="makecoresource" depends="init, cleancoresource" description="Generate Java source files from XSD.">
        <taskdef name="castor-srcgen"
                  classname="org.exolab.castor.tools.ant.taskdefs.CastorSourceGenTask"
              classpathref="castor.classpath" />