]> source.dussan.org Git - vaadin-framework.git/commitdiff
Don't compile with other than Java 1.5 compilers. For #2367.
authorMarko Grönroos <magi@iki.fi>
Tue, 30 Dec 2008 21:34:36 +0000 (21:34 +0000)
committerMarko Grönroos <magi@iki.fi>
Tue, 30 Dec 2008 21:34:36 +0000 (21:34 +0000)
svn changeset:6374/svn branch:trunk

build/build.xml

index 0ff57ace820eb6272d6ec320f3c8970506a92e81..7a2c1ecfe73e858c77ce0b9437bf6eb271495dd1 100644 (file)
        <target name="init-oophm-platform"><property name="platform" value="oophm" /></target>
        <target name="init-oophm" depends="init-oophm-platform,init"></target>
 
-       <!-- Initialization - - - - - - - - - - - - - - - - - - - - - - - - -->
-       <target name="init" depends="init-platform">
+    <!-- ================================================================== -->
+    <!-- Check that Java version is 1.5.                                    -->
+    <!-- ================================================================== -->
+    <target name="check-java-version">
+      <condition property="java.version.matches">
+        <equals arg1="${ant.java.version}" arg2="1.5"/>
+      </condition>
+      <fail unless="java.version.matches" message="IT Mill Toolkit must be compiled with genuine Java 1.5 compiler."/>
+      <echo>Java version is ${ant.java.version} as required.</echo>
+    </target>
+
+    <!-- Check that we use the old Servlet API to catch incompatibilities.. -->
+    <!-- This is unused at the moment. -->
+    <target name="check-servlet-version">
+      <available classname="javax.servlet.ServletRequestListener" property="servlet.version.is-2.4" />
+      <fail if="servlet.version.is-2.4" message="IT Mill Toolkit must be compiled with exactly Java Servlet 2.3."/>
+      <echo>Java Servlet 2.3 used.</echo>
+    </target>
+
+    <!-- ================================================================== -->
+       <!-- Initialization - - - - - - - - - - - - - - - - - - - - - - - - - - -->
+    <!-- ================================================================== -->
+       <target name="init" depends="check-java-version, init-platform">
 
                <property file="build/build.properties" />
                <property file="build/VERSION.properties" />