This repository has been archived by the owner on Nov 1, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.xml
75 lines (61 loc) · 2.36 KB
/
build.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
<project xmlns:ivy="antlib:org.apache.ivy.ant" name="Beispiel Akzeptanztests" default="cucumber" basedir=".">
<property name="jruby.home" value="${basedir}/lib/.jruby" />
<target name="cucumber" depends="-compile-steps,-install-gems" description="Run Cucumber">
<cuke4duke />
</target>
<target name="help" depends="-compile-steps,-install-gems" description="Show Cucumber Help">
<cuke4duke profile="help"/>
</target>
<target name="html" depends="-compile-steps,-install-gems" description="Run Cucumber and create HTML">
<cuke4duke profile="html"/>
</target>
<target name="console" depends="-compile-steps,-install-gems" description="Run Cucumber on Console">
<cuke4duke profile="console"/>
</target>
<target name="current" depends="-compile-steps,-install-gems" description="Run current Cucumber-Tasks">
<cuke4duke profile="current"/>
</target>
<target name="-compile-steps" depends="-define-paths">
<mkdir dir="target/test-classes" />
<javac srcdir="src/test/java" destdir="target/test-classes" classpathref="compile.classpath" encoding="UTF-8" />
</target>
<target name="-download-jars" if="ivy">
<ivy:retrieve />
</target>
<target name="-install-gems" depends="-define-paths" if="gems">
<taskdef name="gem" classname="cuke4duke.ant.GemTask" classpathref="compile.classpath" />
<gem args="install cuke4duke --version 0.4.2 --source http://gemcutter.org/" />
</target>
<target name="-define-paths" depends="-download-jars">
<path id="jruby.classpath">
<fileset dir="lib">
<include name="**/*.jar" />
</fileset>
</path>
<path id="compile.classpath">
<fileset dir="lib">
<include name="**/*.jar" />
</fileset>
</path>
</target>
<target name="clean" description="Delete all generated artifacts">
<delete dir="${basedir}/target" />
</target>
<target name="clean-deps" description="Delete all dependencies">
<delete dir="${basedir}/lib/.jruby" />
<delete>
<fileset dir="${basedir}/lib" includes=".jar" />
</delete>
</target>
<macrodef name="cuke4duke">
<attribute name="profile" default="default" />
<sequential>
<taskdef name="cucumber" classname="cuke4duke.ant.CucumberTask" classpathref="compile.classpath" />
<cucumber objectFactory="pico" args="--profile @{profile}">
<classpath>
<pathelement location="target/test-classes" />
</classpath>
</cucumber>
</sequential>
</macrodef>
</project>