-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathbuild.xml
111 lines (97 loc) · 3.95 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
<project name="JCKANClient" default="dist" basedir=".">
<description>
Build file for JCKANClient
</description>
<property name="src" location="src"/>
<property name="build" location="build"/>
<property name="dist" location="dist"/>
<property name="lib" location="lib"/>
<property name="test_results" location="test_results"/>
<target name="init">
<!-- Create the time stamp -->
<tstamp/>
<!-- Create the build directory structure used by compile -->
<mkdir dir="${build}"/>
<mkdir dir="${test_results}"/>
</target>
<target name="deps">
<mkdir dir="${lib}"/>
<get src="http://apache.mirrors.timporter.net//httpcomponents/httpclient/binary/httpcomponents-client-4.1.3-bin.zip"
dest="${lib}/httpcomponents-client-4.1.3-bin.zip"
verbose="true"
usetimestamp="true"/>
<unzip src="${lib}/httpcomponents-client-4.1.3-bin.zip" dest="${lib}"/>
<copy file="${lib}/httpcomponents-client-4.1.3/lib/httpclient-4.1.3.jar" todir="${lib}"/>
<copy file="${lib}/httpcomponents-client-4.1.3/lib/httpcore-4.1.4.jar" todir="${lib}"/>
<get src="http://google-gson.googlecode.com/files/google-gson-2.2-release.zip"
dest="${lib}/google-gson-2.2-release.zip"
verbose="true"
usetimestamp="true"/>
<unzip src="${lib}/google-gson-2.2-release.zip" dest="${lib}"/>
<copy file="${lib}/google-gson-2.2/gson-2.2.jar" todir="${lib}"/>
<get src="http://cloud.github.com/downloads/KentBeck/junit/junit-4.10.jar"
dest="${lib}/junit-4.10.jar"
verbose="true"
usetimestamp="true"/>
</target>
<target name="compile" depends="init"
description="compile the source ">
<javac srcdir="${src}" destdir="${build}">
<classpath>
<pathelement path="${build}"/>
<pathelement path="${lib}/junit-4.10.jar"/>
<pathelement path="${lib}/gson-2.2.jar"/>
<pathelement path="${lib}/httpclient-4.1.3.jar"/>
<pathelement path="${lib}/httpcore-4.1.4.jar"/>
<pathelement path="${lib}/commons-logging-1.1.1.jar"/>
</classpath>
</javac>
</target>
<target name="docs" depends="compile"
description="compile the docs ">
<javadoc packagenames="org.ckan.*"
sourcepath="src"
defaultexcludes="yes"
destdir="docs/"
author="true"
version="true"
use="true"
classpath="${lib}/junit-4.10.jar"
windowtitle="JCKAN Client">
<doctitle><![CDATA[<h1>Java CKAN Client</h1>]]></doctitle>
<bottom><![CDATA[<i>Copyright © 2012 OKFN. All Rights Reserved.</i>]]></bottom>
<tag name="todo" scope="all" description="To do:"/>
<link offline="true" href="http://download.oracle.com/javase/6/docs/api/" packagelistLoc="C:\tmp"/>
<link href="http://developer.java.sun.com/developer/products/xml/docs/api/"/>
</javadoc>
</target>
<target name="test" depends="compile"
description="run the tests " >
<junit printsummary="yes" haltonfailure="yes" showoutput="yes" >
<classpath>
<pathelement path="${build}"/>
<pathelement path="${lib}/junit-4.10.jar"/>
<pathelement path="${lib}/gson-2.2.jar"/>
<pathelement path="${lib}/httpclient-4.1.3.jar"/>
<pathelement path="${lib}/httpcore-4.1.4.jar"/>
<pathelement path="${lib}/commons-logging-1.1.1.jar"/>
</classpath>
<batchtest fork="yes" todir="test_results/">
<formatter type="xml"/>
<fileset dir="${src}">
<include name="**/*TestCases.java"/>
</fileset>
</batchtest>
</junit>
</target>
<target name="dist" depends="compile"
description="generate the distribution" >
<mkdir dir="${dist}/lib"/>
<jar jarfile="${dist}/lib/JCKANClient-1.7.jar" basedir="${build}"/>
</target>
<target name="clean"
description="clean up" >
<delete dir="${build}"/>
<delete dir="${dist}"/>
</target>
</project>