blob: a0fc2e8f578c3d5791a35100d5f3b041d00e3d06 [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!--
This script compiles using JDK 1.3 all classes except those that
use JDK 1.4 features.
Commons IO should be built as normal using the maven build and
JDK 1.4 or higher. This script should be run before a release to
check that the majority of Commons IO is still JDK 1.3 compatible.
Switch the default JDK to 1.3 and then run this script
(using "ant -f build-check-jdk13.xml") - it will fail if the JDK
version is not 1.3 or any of the classes use features from a later
JDK version.
-->
<project default="compile" name="commons-io-jdk13" basedir=".">
<!-- The base directory for compilation targets -->
<property name="build.home" value="target"/>
<property name="test.jdk13" value="${build.home}/test-classes-jdk13"/>
<target name="init">
<delete dir="${test.jdk13}"/>
<mkdir dir="${test.jdk13}"/>
</target>
<!-- Check JDK is 1.3 -->
<target name="check-jdk">
<echo message="*** JDK=${ant.java.version} ***" />
<fail message="switch to JDK 1.3">
<condition>
<not>
<equals arg1="${ant.java.version}" arg2="1.3" />
</not>
</condition>
</fail>
</target>
<!-- Compile JDK 1.3 compatible classes -->
<target name="compile" depends="init, check-jdk">
<javac srcdir="src/java"
destdir="${test.jdk13}"
sourcepath="">
<include name="**/*.java"/>
<exclude name="**/CharSequenceReader.java"/>
<exclude name="**/IOExceptionWithCause.java"/>
<exclude name="**/RegexFileFilter.java"/>
<exclude name="**/FileWriterWithEncoding.java"/>
</javac>
</target>
</project>