added castor sourcegenerator task.
authorjprocter <jprocter@compbio.dundee.ac.uk>
Mon, 19 Sep 2005 16:19:41 +0000 (16:19 +0000)
committerjprocter <jprocter@compbio.dundee.ac.uk>
Mon, 19 Sep 2005 16:19:41 +0000 (16:19 +0000)
git-svn-id: https://svn.lifesci.dundee.ac.uk/svn/repository/trunk@22 be28352e-c001-0410-b1a7-c7978e42abec

build.xml

index 10f8e49..3cb48c6 100644 (file)
--- a/build.xml
+++ b/build.xml
@@ -1,12 +1,27 @@
 <?xml version="1.0"?>
 <project name="vamsas-client" default="build" basedir=".">
+
        <target name="init">
                <property name="libDir" value="lib"/>
                <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.sourcegen.properties" value="schemas/castorbuilder.properties"/>
+                                               
+               <path id="castor.classpath">
+                       <fileset dir="tools">
+                               <include name="*.jar"/>
+                               <include name="**/*.jar"/>
+                       </fileset>
+                       <fileset dir="lib">
+                               <include name="*.jar"/>
+                               <include name="**/*.jar"/>
+                       </fileset>
+               </path>
+                       
                <!--
                Build classpath
                -->
                        <!--            path refid="axis.classpath"  -->
                </path>
        </target>
-
+       <target name="makecoresource" depends="init" description="Generate Java source files from XSD.">
+       <taskdef name="castor-srcgen"
+                 classname="org.exolab.castor.tools.ant.taskdefs.CastorSourceGenTask"
+             classpathref="castor.classpath" />
+       <castor-srcgen file="${vamsas.schema}"
+             todir="${sourceDir}"
+             package="${vamsas.schema.package}"
+             warnings="false" 
+                 nodesc="true"
+               properties="${vamsas.schema.sourcegen.properties}"
+       />
+       
+       </target>
        <target name="prepare" depends="init">
                <mkdir dir="${packageDir}"/>
                <mkdir dir="${outputDir}"/>