aboutsummaryrefslogtreecommitdiffstats
path: root/build.xml
blob: eabd62dbbab3457e6d5646b13127a6396ede8ccb (plain)
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
<?xml version="1.0" encoding="UTF-8"?>
<project name="iciql" default="build" xmlns:mx="antlib:org.moxie">

	<!--
		~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
		Retrieve Moxie Toolkit

		documentation @ http://gitblit.github.io/moxie
		~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
	-->
	<property name="moxie.version" value="0.9.2" />
	<property name="moxie.url" value="http://gitblit.github.io/moxie/maven" />
	<property name="moxie.jar" value="moxie-toolkit-${moxie.version}.jar" />
	<property name="moxie.dir" value="${user.home}/.moxie" />

	<!-- Download Moxie from it's Maven repository to user.home -->
	<mkdir dir="${moxie.dir}" />
	<get src="${moxie.url}/com/gitblit/moxie/moxie-toolkit/${moxie.version}/${moxie.jar}"
		dest="${moxie.dir}" skipexisting="true" verbose="true" />

	<!-- Register Moxie tasks -->
	<taskdef uri="antlib:org.moxie">
		<classpath location="${moxie.dir}/${moxie.jar}" />
	</taskdef>


	<!--
		~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
		Initialize Moxie and setup build properties
		~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
	-->
	<target name="prepare"  description="Retrieves dependencies and sets up build properties">

		<mx:init mxroot="${moxie.dir}" />

	</target>


	<!--
		~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
		Clean
		~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
	-->
	<target name="clean" depends="prepare" description="Cleans build directory">

		<mx:clean />

	</target>


	<!--
		~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
		Compile
		~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
	-->
	<target name="compile" depends="prepare" description="Compiles iciql from source">

		<mx:javac />

	</target>


	<!--
		~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
		TestSuite
		~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
	-->
	<target name="testsuite" depends="compile" description="runs the benchmark test suite against all databases">
		<echo/>
		<echo>This will take a minute or two...</echo>
		<echo/>
		<mx:javac scope="test" />
		<mx:run scope="test" classname="com.iciql.test.IciqlSuite">
			<arg value="--dbFile" />
			<arg value="${project.outputDirectory}/performance_db.txt" />

			<arg value="--sqlFile" />
			<arg value="${project.outputDirectory}/performance_sql.txt" />
		</mx:run>
	</target>


	<!--
		~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
		Build
		~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
	-->
	<target name="build" depends="compile" description="Packages iciql for deployment">

		<!-- Package the jar, javadoc, sources, and zip distribution -->
		<mx:package />

		<!-- Deploy the artifacts into the version-controlled repository -->
		<mx:deploy basedir="${basedir}/maven" allowSnapshots="false" />

	</target>

</project>