blob: 8079fefdd0e42d8eff138ed7241370a6d69d664f [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2004, 2010 BREDEX GmbH.
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License v1.0
which accompanies this distribution, and is available at
http://www.eclipse.org/legal/epl-v10.html
-->
<project name="com.bredexsw.guidancer.examples" default="build" xmlns:if="ant:if">
<property name="build.dir" value="build"/>
<property name="examples.aut.dir" value="${build.dir}/AUTs"/>
<property name="examples.projects.dir" value="${build.dir}/projects"/>
<property name="examples.scripts.dir" value="${build.dir}/scripts"/>
<property name="examples.library.dir" value="${build.dir}/testCaseLibrary"/>
<property name="examples.development.dir" value="${build.dir}/development"/>
<property name="examples.aut.simpleAdder.dir" value="${examples.aut.dir}/SimpleAdder"/>
<property name="SimpleAdder.Swing" value="org.eclipse.jubula.examples.aut.adder.swing"/>
<property name="SimpleAdder.JavaFX" value="org.eclipse.jubula.examples.aut.adder.javafx"/>
<property name="SimpleAdder.SWT" value="org.eclipse.jubula.examples.aut.adder.swt"/>
<property name="SimpleAdder.RCP" value="org.eclipse.jubula.examples.aut.adder.rcp.releng"/>
<property name="SimpleAdder.Web" value="org.eclipse.jubula.examples.aut.adder.html"/>
<property name="DvdTool" value="org.eclipse.jubula.examples.aut.dvdtool"/>
<property name="ExampleSwingExtensionAUT" value="org.eclipse.jubula.examples.extension.swing.aut"/>
<property name="ExampleJavaFXExtensionAUT" value="org.eclipse.jubula.examples.extension.javafx.aut"/>
<property name="ExampleGEFIdentifierExample" value="org.eclipse.jubula.examples.extension.rcp.gef.logic.identifier"/>
<target name="build" depends="clean,
createDirStructure,
releaseSimpleAdderSwing,
releaseSimpleAdderJavaFX,
releaseSimpleAdderSWT,
releaseSimpleAdderRCP,
releaseSimpleAdderWeb,
releaseDvdTool,
releaseProjects,
releaseLibrary,
releaseTemplate,
releaseScripts,
releaseWorkspace,
releaseDevelopment">
<antcall target="markAsExecutable" />
</target>
<target name="createDirStructure">
<mkdir dir="${build.dir}"/>
<mkdir dir="${examples.aut.dir}"/>
<mkdir dir="${examples.projects.dir}"/>
<mkdir dir="${examples.scripts.dir}"/>
<mkdir dir="${examples.library.dir}"/>
<mkdir dir="${examples.development.dir}"/>
</target>
<target name="releaseSimpleAdderSwing">
<ant dir="../${SimpleAdder.Swing}" antfile="buildScript.xml" target="build" inheritAll="false" />
<mkdir dir="${examples.aut.simpleAdder.dir}/swing"/>
<copy todir="${examples.aut.simpleAdder.dir}/swing">
<fileset dir="../${SimpleAdder.Swing}/build/jars/"/>
</copy>
<copy todir="${examples.aut.simpleAdder.dir}/swing">
<fileset dir="../${SimpleAdder.Swing}/resources/launcher"/>
</copy>
<antcall target="markAsExecutable" />
</target>
<target name="releaseSimpleAdderJavaFX">
<exec dir="../${SimpleAdder.JavaFX}" executable="ant" >
<arg value="-f"/>
<arg value="buildScript.xml"/>
<arg value="build"/>
</exec>
<mkdir dir="${examples.aut.simpleAdder.dir}/javafx"/>
<copy todir="${examples.aut.simpleAdder.dir}/javafx">
<fileset dir="../${SimpleAdder.JavaFX}/build/jars/"/>
</copy>
<copy todir="${examples.aut.simpleAdder.dir}/javafx">
<fileset dir="../${SimpleAdder.JavaFX}/resources/launcher"/>
</copy>
<antcall target="markAsExecutable" />
</target>
<target name="releaseExampleJavaFXExtensionAUT">
<exec dir="../${ExampleJavaFXExtensionAUT}" executable="ant" >
<arg value="-f"/>
<arg value="buildScript.xml"/>
<arg value="build"/>
</exec>
<mkdir dir="${examples.development.dir}/extension/AUT"/>
<copy todir="${examples.development.dir}/extension/AUT">
<fileset dir="../${ExampleJavaFXExtensionAUT}/build/jars/"/>
</copy>
<antcall target="markAsExecutable" />
</target>
<target name="releaseSimpleAdderSWT">
<ant dir="../${SimpleAdder.SWT}" antfile="buildScript.xml" target="build" inheritAll="false" />
<mkdir dir="${examples.aut.simpleAdder.dir}/swt"/>
<copy todir="${examples.aut.simpleAdder.dir}/swt">
<fileset dir="../${SimpleAdder.SWT}/build/jars/"/>
</copy>
<copy todir="${examples.aut.simpleAdder.dir}/swt">
<fileset dir="../${SimpleAdder.SWT}/resources/launcher"/>
</copy>
<antcall target="markAsExecutable" />
</target>
<target name="releaseSimpleAdderRCP">
<ant dir="../${SimpleAdder.RCP}" antfile="buildScript.xml" inheritAll="false">
<property name="offline" value="${offline}" />
</ant>
<mkdir dir="${examples.aut.simpleAdder.dir}/rcp"/>
<move todir="${examples.aut.simpleAdder.dir}/rcp">
<fileset dir="../org.eclipse.jubula.examples.aut.adder.rcp.product/target/products/org.eclipse.jubula.product.examples.aut.adder.rcp/"/>
</move>
</target>
<target name="releaseSimpleAdderWeb">
<mkdir dir="${examples.aut.simpleAdder.dir}/html"/>
<copy todir="${examples.aut.simpleAdder.dir}/html">
<fileset dir="../${SimpleAdder.Web}/resources/aut"/>
</copy>
</target>
<target name="releaseDvdTool">
<ant dir="../${DvdTool}" antfile="buildScript.xml" target="build" inheritAll="false" />
<mkdir dir="${examples.aut.dir}/DVDTool"/>
<copy todir="${examples.aut.dir}/DVDTool">
<fileset dir="../${DvdTool}/build/jars/"/>
</copy>
<copy todir="${examples.aut.dir}/DVDTool">
<fileset dir="../${DvdTool}/resources/launcher"/>
</copy>
<antcall target="markAsExecutable" />
</target>
<target name="clean">
<delete dir="${build.dir}" />
<ant dir="../${SimpleAdder.Swing}" antfile="buildScript.xml" target="clean" inheritAll="false" />
<ant dir="../${SimpleAdder.JavaFX}" antfile="buildScript.xml" target="clean" inheritAll="false" />
<ant dir="../${SimpleAdder.SWT}" antfile="buildScript.xml" target="clean" inheritAll="false" />
<ant dir="../${SimpleAdder.RCP}" antfile="buildScript.xml" target="clean" inheritAll="false" />
<ant dir="../${DvdTool}" antfile="buildScript.xml" target="clean" inheritAll="false" />
</target>
<target name="markAsExecutable">
<chmod dir="${build.dir}" perm="775" includes="**/*.sh"/>
</target>
<target name="releaseProjects">
<copy todir="${examples.projects.dir}">
<fileset dir="resources/projects/samples"/>
</copy>
</target>
<target name="releaseWorkspace">
<copy todir="${build.dir}">
<fileset dir="resources/workspace"/>
</copy>
</target>
<target name="releaseExampleSwingExtensionAUT">
<ant dir="../${ExampleSwingExtensionAUT}" antfile="buildScript.xml" target="build" inheritAll="false" />
<mkdir dir="${examples.development.dir}/extension/AUT"/>
<copy todir="${examples.development.dir}/extension/AUT">
<fileset dir="../${ExampleSwingExtensionAUT}/build/jars/"/>
</copy>
</target>
<target name="releaseDevelopment" depends="releaseExampleSwingExtensionAUT,
releaseExampleJavaFXExtensionAUT">
<mkdir dir="${examples.development.dir}/gef"/>
<zip destfile="${examples.development.dir}/gef/${ExampleGEFIdentifierExample}.zip">
<zipfileset dir="../${ExampleGEFIdentifierExample}" prefix="${ExampleGEFIdentifierExample}"/>
</zip>
</target>
<target name="releaseLibrary">
<copy todir="${examples.library.dir}">
<fileset dir="../org.eclipse.jubula.client.ui.rcp/resources/library"/>
</copy>
</target>
<target name="releaseTemplate">
<mkdir dir="${examples.projects.dir}/template"/>
<copy todir="${examples.projects.dir}/template">
<fileset dir="../org.eclipse.jubula.client.ui.rcp/resources/template"/>
</copy>
</target>
<target name="releaseScripts">
<copy todir="${examples.scripts.dir}">
<fileset dir="resources/scripts"/>
</copy>
</target>
</project>