diff options
author | Marko Grönroos <magi@iki.fi> | 2008-12-30 21:34:36 +0000 |
---|---|---|
committer | Marko Grönroos <magi@iki.fi> | 2008-12-30 21:34:36 +0000 |
commit | 6e28a966f8ebacf43a2307f9168767c3f2fc497e (patch) | |
tree | 7235765a172a319b1bdbe5a48b3f6c0b95337fdb /build | |
parent | a17b38a3efb54de03a3e2100f9de06336d09471d (diff) | |
download | vaadin-framework-6e28a966f8ebacf43a2307f9168767c3f2fc497e.tar.gz vaadin-framework-6e28a966f8ebacf43a2307f9168767c3f2fc497e.zip |
Don't compile with other than Java 1.5 compilers. For #2367.
svn changeset:6374/svn branch:trunk
Diffstat (limited to 'build')
-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" /> |