-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.xml
98 lines (82 loc) · 3.39 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
<project name="clj-facebook" default="jar">
<property name="src" location="src"/>
<property name="clojure.jar" location="/opt/clojure/clojure.jar"/>
<property name="clojure.contrib.jar" location="/opt/clojure-contrib/clojure-contrib.jar"/>
<property name="build" location="classes"/>
<property name="tests" location="tests"/>
<available property="hasclojure" file="${clojure.jar}"/>
<!-- The JAR file to create. -->
<property name="jarfile" location="clj-facebook.jar"/>
<target name="init">
<tstamp/>
<mkdir dir="${build}"/>
</target>
<target name="clean" description="Remove generated files and directories.">
<delete file="${jarfile}"/>
<delete dir="${build}"/>
</target>
<path id="libs.path">
<path location="${build}"/>
<path location="${src}"/>
<path location="${clojure.jar}"/>
<path location="${clojure.contrib.jar}"/>
<path location="lib/clojure-json.jar"/>
<path location="lib/apache-mime4j-0.5.jar"/>
<path location="lib/commons-logging-1.1.1.jar"/>
<path location="lib/httpmime-4.0-beta2.jar"/>
<path location="lib/httpclient-4.0-beta2.jar"/>
<path location="lib/commons-codec-1.3.jar"/>
<path location="lib/httpcore-4.0-beta3.jar"/>
<path location="lib/clj-apache-http.jar"/>
<path location="lib/apache-mime4j-0.5.jar"/>
</path>
<target name="compile_clojure" depends="init"
description="Compile Clojure sources."
if="hasclojure">
<java classname="clojure.lang.Compile">
<classpath>
<path refid="libs.path"/>
</classpath>
<sysproperty key="clojure.compile.path" value="${build}"/>
<arg value="uk.co.holygoat.util.md5"/>
<arg value="com.twinql.clojure.facebook.sig"/>
<arg value="com.twinql.clojure.facebook.errors"/>
<arg value="com.twinql.clojure.facebook.auth"/>
<arg value="com.twinql.clojure.facebook.request"/>
<arg value="com.twinql.clojure.facebook.sessions"/>
<arg value="com.twinql.clojure.facebook.api"/>
<arg value="com.twinql.clojure.facebook.sessionless"/>
<arg value="com.twinql.clojure.facebook.session-optional"/>
<arg value="com.twinql.clojure.facebook.session-required"/>
<arg value="com.twinql.clojure.facebook.handlers"/>
<arg value="com.twinql.clojure.facebook"/>
</java>
</target>
<target name="test"
description="Run tests.">
<java classname="clojure.main" failonerror="true">
<classpath>
<path location="${tests}"/>
<path refid="libs.path"/>
<!-- The test suite needs Compojure. -->
<path location="lib/compojure.jar"/>
<path location="lib/commons-fileupload-1.2.1.jar"/>
<path location="lib/servlet-api-2.5-20081211.jar"/>
<!-- We use Grizzly. Quieter and better than Jetty. -->
<path location="lib/grizzly-http-servlet-1.9.10.jar"/>
<path location="lib/grizzly-http-webserver-1.9.10.jar"/>
</classpath>
<arg value="-e"/>
<arg value="(require 'test-facebook) (test-facebook/run-ant)"/>
</java>
</target>
<target name="jar" description="Create jar file." depends="compile_clojure">
<jar jarfile="${jarfile}">
<fileset dir="${src}" includes="**/*.clj"/>
<fileset dir="${build}" includes="**/*.class"/>
<manifest>
<attribute name="Class-Path" value="."/>
</manifest>
</jar>
</target>
</project>