-
Notifications
You must be signed in to change notification settings - Fork 14
/
build.xml
67 lines (56 loc) · 2.21 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
<project name="clj-apache-http" 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="clj-apache-http.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}/commons-logging-1.1.1.jar"/>
<path location="${lib}/httpclient-4.0.1.jar"/>
<path location="${lib}/httpcore-4.0.1.jar"/>
<path location="${lib}/httpmime-4.0.1.jar"/>
<path location="${clojure.jar}"/>
<path location="${clojure.contrib.jar}"/>
</classpath>
<sysproperty key="clojure.compile.path" value="${build}"/>
<arg value="com.twinql.clojure.http"/>
</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="jar">
<copy todir="${deploy}" verbose="true" file="${jarfile}"/>
<copy todir="${deploy}" verbose="true">
<fileset dir="${lib}" includes="*.jar"/>
</copy>
</target>
</project>