-
Notifications
You must be signed in to change notification settings - Fork 52
/
build.xml
70 lines (58 loc) · 2.32 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
<project name="clj-oauth" default="deploy">
<!-- Override these with -Dclojure.jar=... in your Ant invocation. -->
<property name="clojure.jar" location="/opt/clojure/clojure.jar"/>
<property name="clojure.contrib.jar" location="/opt/clojure-contrib/clojure-contrib.jar"/>
<available property="hasclojure" file="${clojure.jar}"/>
<!-- Library. -->
<property name="src" location="src"/>
<property name="lib" location="lib"/>
<property name="build" location="classes"/>
<property name="jarfile" location="${ant.project.name}.jar"/>
<property name="deploy" location="deploy"/>
<target name="init">
<tstamp/>
<mkdir dir="${build}"/>
<mkdir dir="${deploy}"/>
</target>
<target name="clean" description="Remove generated files and directories.">
<delete dir="${deploy}"/>
<delete dir="${build}"/>
<delete file="${jarfile}"/>
</target>
<target name="compile_clojure" depends="init"
description="Compile Clojure sources."
if="hasclojure">
<java classname="clojure.lang.Compile">
<classpath>
<path location="${src}"/>
<path location="${build}"/>
<path location="${lib}/clj-apache-http.jar"/>
<path location="${lib}/commons-logging-1.1.1.jar"/>
<path location="${lib}/httpclient-4.0-beta2.jar"/>
<path location="${lib}/httpcore-4.0-beta3.jar"/>
<path location="${lib}/httpmime-4.0-beta2.jar"/>
<path location="${lib}/commons-codec-1.3.jar"/>
<path location="${clojure.jar}"/>
<path location="${clojure.contrib.jar}"/>
</classpath>
<sysproperty key="clojure.compile.path" value="${build}"/>
<arg value="oauth"/>
</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>
<target name="deploy" description="Copy appropriate jar files to one place."
depends="clean,jar">
<copy todir="${deploy}" verbose="true" file="${jarfile}"/>
<copy todir="${deploy}" verbose="true">
<fileset dir="${lib}" includes="*.jar"/>
</copy>
</target>
</project>