-
Notifications
You must be signed in to change notification settings - Fork 11
/
build.xml
115 lines (93 loc) · 4.04 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
<project name="JdbcSlim" default="build" basedir="." xmlns:ivy="antlib:org.apache.ivy.ant">
<description>
JdbcSlim is a Slim framework for FitNesse to access and test data via jdbc driver.
Copyright (C) 2015 by six42, All rights reserved. Contact the author via http://github.com/six42
</description>
<property environment="env"/>
<property name="env.FITNESSE_TEST_PORT" value="8080"/>
<property name="src.dir" location="src/main/java"/>
<property name="test.src.dir" location="test"/>
<property name="classes.dir" location="classes"/>
<property name="test.classes.dir" location="test-classes"/>
<property name="fitnesseRoot" value="FitNesseRoot"/>
<property name="results.dir" location="test-results"/>
<property name="dist.dir" location="plugins/jdbcslim"/>
<property name="port" value="8001"/>
<path id="jdbcslim-classpath">
<fileset dir="${dist.dir}">
<include name="commons-codec-1.10.jar"/>
<include name="csvjdbc-*.jar"/>
<include name="fitnesse-standalone.jar"/>
<include name="dbfit-*.jar"/>
<include name="junit-4.12.jar"/>
</fileset>
</path>
<target name="build" depends="acceptance_tests" description="clean, compile and test"/>
<zipfileset id="wikipages.fileset" prefix="Resources/FitNesseRoot" dir="FitNesseRoot">
<include name="PlugIns/JdbcSlim/**"/>
<exclude name="**/*.zip"/>
</zipfileset>
<!--
Bundling
-->
<target name="jar" depends="clean, compile, post-compile" description="generate the jar file">
<defaultexcludes remove="**/.gitignore"/>
<delete file="${dist.dir}/jdbcslim.jar" />
<jar jarfile="${dist.dir}/jdbcslim.jar" basedir="${classes.dir}">
<include name="six42/fitnesse/jdbcslim/**"/>
<zipfileset refid="wikipages.fileset" />
<manifest>
<attribute name="Built-By" value="Six42" />
</manifest>
</jar>
</target>
<!--
Building
-->
<target name="compile" description="compile java sources">
<mkdir dir="${classes.dir}" />
<javac srcdir="${src.dir}" destdir="${classes.dir}" debug="true" source="1.6" target="1.6" includeantruntime="false">
<include name="six42/fitnesse/jdbcslim/**/*.java"/>
<classpath refid="jdbcslim-classpath"/>
</javac>
</target>
<target name="post-compile" depends="stamp-version" description="post-compile steps, use those in your IDE" />
<target name="acceptance_tests" depends="jar">
<java jar="${dist.dir}/fitnesse-standalone.jar" failonerror="true" fork="true">
<arg value="-c" />
<arg value="PlugIns.JdbcSlim.UserGuide?suite&format=text" />
</java>
</target>
<target name="acceptance_tests_xml" depends="jar">
<java jar="${dist.dir}/fitnesse-standalone.jar" failonerror="true" fork="true" output="fitnesse-results.xml">
<arg value="-c" />
<arg value="PlugIns.JdbcSlim.UserGuide?suite&format=xml" />
</java>
</target>
<target name="acceptance_tests_html" depends="jar">
<java jar="${dist.dir}/fitnesse-standalone.jar" failonerror="true" fork="true" output="fitnesse-results.html">
<arg value="-c" />
<arg value="PlugIns.JdbcSlim.UserGuide?suite&format=html" />
</java>
</target>
<target name="run" depends="jar">
<java jar="${dist.dir}/fitnesse-standalone.jar" failonerror="true" fork="true">
<arg value="-p" />
<arg value="${env.FITNESSE_TEST_PORT}"/>
</java>
</target>
<target name="set-version-if-not-manualy-set" unless="version">
<tstamp />
<property name="version" value="${DSTAMP}" />
</target>
<target name="stamp-version" depends="set-version-if-not-manualy-set" >
<echo message="Stamping fitnesse with version ${version}" />
<mkdir dir="${classes.dir}/META-INF" />
<echo message="v${version}" file="${classes.dir}/META-INF/JdbcSlimVersion.txt" />
</target>
<target name="clean" description="delete everything in the classes directory">
<delete dir="${classes.dir}" />
<delete dir="${test.classes.dir}" />
<delete dir="${results.dir}" />
</target>
</project>