samples/build.xml
author Jaroslav Tulach <jtulach@netbeans.org>
Sat, 14 Jun 2008 16:40:49 +0200
changeset 262 e59755da1aa6
parent 260 e82f20a1130b
child 263 7e8e995065c5
permissions -rw-r--r--
Creating a master project for all examples
jtulach@119
     1
<?xml version="1.0" encoding="UTF-8"?>
jtulach@131
     2
<project name="samples" default="test" basedir=".">
jtulach@131
     3
    <property name="samples.dir" location="${ant.file.samples}/.."/>
jtulach@131
     4
    <dirset id="examples" dir="${samples.dir}">
jtulach@119
     5
        <include name="**/nbproject"/>
jtulach@262
     6
        <exclude name="nbproject"/>
jtulach@119
     7
        <exclude name="apifest1/day3-intermezzo/**"/>
jtulach@120
     8
        <exclude name="apifest1/infrastructure/testing-template/**"/>
jtulach@119
     9
    </dirset>
jtulach@119
    10
    
jtulach@119
    11
    
jtulach@119
    12
    <target name="clean">
jtulach@131
    13
        <delete dir="${samples.dir}/build"/>
jtulach@119
    14
        <subant target="clean" antfile="../build.xml">
jtulach@119
    15
            <dirset refid="examples"/>
jtulach@119
    16
        </subant>
jtulach@119
    17
    </target>
jtulach@119
    18
jtulach@119
    19
    <target name="build">
jtulach@131
    20
        <ant dir="${samples.dir}/libs"/>
jtulach@119
    21
        <subant target="compile" antfile="../build.xml">
jtulach@119
    22
            <dirset refid="examples"/>
jtulach@119
    23
        </subant>
jtulach@119
    24
    </target>
jtulach@126
    25
jtulach@126
    26
    <target name="test" depends="build">
jtulach@126
    27
        <subant target="test" antfile="../build.xml" failonerror="false">
jtulach@126
    28
            <dirset refid="examples"/>
jtulach@126
    29
        </subant>
jtulach@126
    30
    </target>
jtulach@119
    31
    
jtulach@126
    32
    <target name="-version" unless="version">
jtulach@131
    33
        <exec dir="${samples.dir}" outputproperty="version" executable="/bin/sh">
jtulach@131
    34
            <arg file="${samples.dir}/version.sh"/>
jtulach@126
    35
        </exec>
jtulach@126
    36
    </target>
jtulach@126
    37
jtulach@258
    38
    <target name="sources" depends="-version,clean">
jtulach@126
    39
        <fail unless="version"/>
jtulach@126
    40
        
jtulach@260
    41
        <loadfile srcfile="${samples.dir}/../.hgignore" property="hgignore"/>
jtulach@131
    42
        <mkdir dir="${samples.dir}/build"/>
jtulach@189
    43
        <zip basedir="${samples.dir}" destfile="${samples.dir}/build/apidesign-${version}.zip">
jtulach@126
    44
            <not>
jtulach@126
    45
                <containsregexp expression="${hgignore}"/>
jtulach@126
    46
            </not>
jtulach@126
    47
            <not>
jtulach@126
    48
                <filename name="version.sh"/>
jtulach@126
    49
            </not>
jtulach@126
    50
        </zip>
jtulach@126
    51
    </target>
jtulach@119
    52
</project>