diff options
-rw-r--r-- | build/build.xml | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/build/build.xml b/build/build.xml index 0ff57ace82..7a2c1ecfe7 100644 --- a/build/build.xml +++ b/build/build.xml @@ -110,8 +110,29 @@ <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" /> |