JAL-3130 Some re-reorganisation for build process
[jalview.git] / build.xml
index 5ca105a..8eeaf7f 100755 (executable)
--- a/build.xml
+++ b/build.xml
     <condition property="java9">
       <equals arg1="${ant.java.version}" arg2="9"/>
     </condition>
+    <!-- Java 10 JVM args -->
+    <condition property="java10">
+      <equals arg1="${ant.java.version}" arg2="10"/>
+    </condition>
+    <!-- Java 11 JVM args -->
+    <condition property="java11">
+      <equals arg1="${ant.java.version}" arg2="11"/>
+    </condition>
+    <echo message="java version is ${ant.java.version}"/>
 
     <!-- Don't change anything below here unless you know what you are doing! -->
     <!-- Url path for WebStart in JNLP file -->
 
     <!-- build directory configuration -->
     <property name="libDir" value="lib" />
+    <property name="j11libDir" value="j11lib" />
     <property name="resourceDir" value="resources" />
     <property name="helpDir" value="help" />
     <property name="docDir" value="doc" />
         <include name="*.jar" />
         <include name="**/*.jar" />
       </fileset>
+      <fileset dir="${j11libDir}">
+        <include name="*.jar" />
+        <include name="**/*.jar" />
+      </fileset>
       <fileset dir="${libDir}">
         <include name="*.jar" />
         <include name="**/*.jar" />
         <pathelement location="${clover.jar}" if:set="clover.jar"/>
         <path refid="test.classpath" />
       </classpath>
+      <jvmarg value="--module-path=${j11libDir}" if:set="java11"/>
       <jvmarg value="--add-modules=java.se.ee" if:set="java9"/>
       <jvmarg value="--illegal-access=warn" if:set="java9"/>
       <classfileset dir="${testOutputDir}" includes="**/*.class" />
   <delete file="in.jar" />
 </target>
 
-<target name="castorbinding" depends="init" description="Generate Java bindings to supported Jalview XML models.">
-  <taskdef name="castor-srcgen" classname="org.castor.anttask.CastorCodeGenTask" classpathref="build.classpath" />
-  <delete>
-    <fileset dir="${sourceDir}/jalview/schemabinding/version2">
-      <include name="*.java" />
-      <include name="descriptors/*.java" />
-    </fileset>
-  </delete>
-  <castor-srcgen file="${schemaDir}/vamsas.xsd" todir="${sourceDir}" package="jalview.schemabinding.version2" warnings="false" nodesc="false" verbose="true" properties="${schemaDir}/jalview.properties" />
-  <castor-srcgen file="${schemaDir}/JalviewUserColours.xsd" todir="${sourceDir}" package="jalview.schemabinding.version2" warnings="false" nodesc="false" verbose="true" properties="${schemaDir}/jalview.properties" />
-  <castor-srcgen file="${schemaDir}/JalviewWsParamSet.xsd" todir="${sourceDir}" package="jalview.schemabinding.version2" warnings="false" nodesc="false" verbose="true" properties="${schemaDir}/jalview.properties" />
-  <castor-srcgen file="${schemaDir}/jalview.xsd" todir="${sourceDir}" package="jalview.schemabinding.version2" warnings="false" nodesc="false" verbose="true" properties="${schemaDir}/jalview.properties" />
-  <!-- 
-               now build the jalview.binding package with the old schema set
-               -->
-  <delete>
-    <fileset dir="${sourceDir}/jalview/binding/">
-      <include name="**" />
-    </fileset>
-  </delete>
-  <castor-srcgen file="${schemaDir}/vamsasJvV1.xsd" todir="${sourceDir}" package="jalview.binding" warnings="false" nodesc="true" verbose="true" properties="${schemaDir}/jalview.nodesc.properties" />
-  <castor-srcgen file="${schemaDir}/JalviewUserColours.xsd" todir="${sourceDir}" package="jalview.binding" warnings="false" nodesc="true" verbose="true" properties="${schemaDir}/jalview.nodesc.properties" />
-  <castor-srcgen file="${schemaDir}/jalviewJvV1.xsd" todir="${sourceDir}" package="jalview.binding" warnings="false" nodesc="true" verbose="true" properties="${schemaDir}/jalview.nodesc.properties" />
-</target>
 <target name="sourcedist" description="create jalview source distribution" depends="init">
   <delete file="${source.dist.name}" />
   <!-- temporary copy of source to update timestamps -->