[MOBY-guts] biomoby commit

Martin Senger senger at pub.open-bio.org
Mon Apr 18 23:57:45 UTC 2005


senger
Mon Apr 18 19:57:44 EDT 2005
Update of /home/repository/moby/moby-live/Java
In directory pub.open-bio.org:/tmp/cvs-serv12755

Modified Files:
	build.xml 
Log Message:
build.xml changed to accomodate sources in Java 1.5

moby-live/Java build.xml,1.13,1.14
===================================================================
RCS file: /home/repository/moby/moby-live/Java/build.xml,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- /home/repository/moby/moby-live/Java/build.xml	2005/04/07 21:24:18	1.13
+++ /home/repository/moby/moby-live/Java/build.xml	2005/04/18 23:57:44	1.14
@@ -75,6 +75,9 @@
    <!-- Excludes for compilation and API documentation -->
    <property name="project.excludes" value="**/notyet/*"/>
 
+   <!-- Excludes for compilation under older JDK than 1.5 -->
+   <property name="version.excludes" value="**/MobyObjectDecompositionImpl.java,**/MobyObjectDecomposition.java"/>
+
    <!-- Names of the used third-parties libraries -->
    <property name="alltools"          value="alltools.jar"/>
    <property name="xercesImpl"        value="xercesImpl.jar"/>
@@ -302,35 +305,57 @@
         <filter token="PROJECT_HOME" value="${basedir}"/>
       </filterset>
 
+      <!-- conditions about Java version -->
+      <condition property="real.java.version.latest" value="true">
+        <and>
+          <contains string="${java.version}" substring="1.5."/>
+          <or>
+            <not><isset property="java.version.latest"/></not>
+            <istrue value="${java.version.latest}"/>
+          </or>
+        </and>
+      </condition>
+
    </target>
 
    <!-- ================================================================== -->
    <!-- Compiles everything                                                -->
    <!-- ================================================================== -->
-   <target name="compile" depends="init,config"
-           description="Compile all source code (default).">
+   <target name="compile" depends="compile-normal,compile-latest"
+     description="Compile all source code (default).">
+      <copy todir="${build.clients}/help">
+         <fileset dir="${src.clients}/help"/>
+      </copy>
+    </target>
+
+    <target name="compile-normal" depends="init,config">
       <fail unless="libs.present">
-      Missing one or more third-party libraries.
-      Try to run build.sh or build.bat to fetch them from the net.
+        Missing one or more third-party libraries.
+        Try to run build.sh or build.bat to fetch them from the net.
       </fail>
       <javac srcdir="${src.main}"
-             destdir="${build.classes}"
-             excludes="${project.excludes}">
-         <classpath refid="build.classpath"/>
+        destdir="${build.classes}"
+        excludes="${project.excludes},${version.excludes}">
+        <classpath refid="build.classpath"/>
       </javac>
       <javac srcdir="${src.clients}"
-             destdir="${build.clients}"
-             excludes="${project.excludes}">
-         <classpath refid="build.classpath"/>
+        destdir="${build.clients}"
+        excludes="${project.excludes}">
+        <classpath refid="build.classpath"/>
       </javac>
       <javac srcdir="${src.services}"
-             destdir="${build.services}"
-             excludes="${project.excludes}">
-         <classpath refid="build.classpath"/>
+        destdir="${build.services}"
+        excludes="${project.excludes}">
+        <classpath refid="build.classpath"/>
       </javac>
-      <copy todir="${build.clients}/help">
-         <fileset dir="${src.clients}/help"/>
-      </copy>
+    </target>
+
+   <target name="compile-latest" depends="compile-normal" if="real.java.version.latest">
+     <javac srcdir="${src.main}"
+       destdir="${build.classes}"
+       includes="${version.excludes}">
+       <classpath refid="build.classpath"/>
+     </javac>
    </target>
 
    <!-- ================================================================== -->
@@ -634,6 +659,20 @@
    <target name="testing" depends="init">
       <echo message="${TODAY_LONG}"/>
       <echo message="${TODAY_SHORT}"/>
+      <echo message="${ant.java.version}"/>
+      <echo message="${java.version}"/>
+
+      <condition property="real.java.version.latest" value="true">
+        <and>
+          <contains string="${java.version}" substring="1.5."/>
+          <or>
+            <not><isset property="java.version.latest"/></not>
+            <istrue value="${java.version.latest}"/>
+          </or>
+        </and>
+      </condition>
+      <echo message="${real.java.version.latest}"/>
+
    </target>
 
    <!-- work in progress -->




More information about the MOBY-guts mailing list