samples/incompatibilities/build.xml
author Jaroslav Tulach <jtulach@netbeans.org>
Sat, 14 Jun 2008 09:57:08 +0200
changeset 141 9ae8488379e0
parent 136 324d01de8a3a
child 263 7e8e995065c5
permissions -rw-r--r--
Build needs to succeed
jtulach@136
     1
<?xml version="1.0" encoding="UTF-8"?>
jtulach@136
     2
<project name="incompatibilities" default="run" basedir=".">
jtulach@136
     3
    <target name="clean">
jtulach@136
     4
        <delete dir="build"/>
jtulach@136
     5
    </target>
jtulach@136
     6
    
jtulach@136
     7
    <target name="compile" depends="build"/>
jtulach@136
     8
    <target name="build" depends="clean">
jtulach@136
     9
        <echo level="info" message="Compiles correctly with JDK 1.5, and also 1.3, but that is hard to demonstrate"/>
jtulach@136
    10
        <antcall target="-build-one">
jtulach@136
    11
            <param name="version" value="io"/>
jtulach@136
    12
            <param name="source" value="1.5"/>
jtulach@136
    13
        </antcall>
jtulach@136
    14
        <echo level="info" message="Does not compile in 1.4 mode"/>
jtulach@136
    15
        <antcall target="-build-one">
jtulach@136
    16
            <param name="version" value="io"/>
jtulach@136
    17
            <param name="source" value="1.4"/>
jtulach@136
    18
        </antcall>
jtulach@136
    19
    </target>
jtulach@136
    20
    
jtulach@136
    21
    <!-- support methods -->
jtulach@136
    22
    
jtulach@136
    23
    <target name="-build-one">
jtulach@136
    24
        <fail message="You need to specify version number" unless="version"/>
jtulach@136
    25
        <fail message="You need to specify source number" unless="source"/>
jtulach@136
    26
        
jtulach@136
    27
        <property name="target" value="${source}"/>
jtulach@136
    28
        <mkdir dir="build/${target}/classes"/>
jtulach@136
    29
        <javac 
jtulach@136
    30
            srcdir="src-io" 
jtulach@136
    31
            destdir="build/${target}/classes" 
jtulach@136
    32
            source="${source}" target="${source}"
jtulach@136
    33
            classpath="${cp}"
jtulach@141
    34
            failonerror="false"
jtulach@136
    35
        />
jtulach@136
    36
    </target>
jtulach@136
    37
</project>