forked from rnewman/clj-conneg
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
56 lines (43 loc) · 1.68 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
<project name="clj-conneg" default="jar">
<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}"/>
<property name="src" location="src"/>
<property name="base.build" location="classes"/>
<!-- One jar. Invoke in different ways to reflect different roles. -->
<property name="base.jarfile" location="clj-conneg.jar"/>
<!-- Include dependencies. -->
<property name="solitary.jarfile" location="clj-conneg-full.jar"/>
<path id="baselibs.path">
<!-- Clojure. -->
<path location="${clojure.jar}"/>
<path location="${clojure.contrib.jar}"/>
</path>
<path id="compile.path">
<path location="${base.build}"/>
<path location="${src}"/>
<path refid="baselibs.path"/>
</path>
<target name="init">
<tstamp/>
<mkdir dir="${base.build}"/>
</target>
<target name="clean" description="Remove generated files and directories.">
<delete dir="${base.build}"/>
<delete file="${base.jarfile}"/>
</target>
<target name="compile_clojure" depends="init"
description="Compile Clojure sources."
if="hasclojure">
<java classname="clojure.lang.Compile">
<classpath refid="compile.path"/>
<sysproperty key="clojure.compile.path" value="${base.build}"/>
<arg value="com.twinql.clojure.conneg"/>
</java>
</target>
<target name="jar" description="Create plain jar file." depends="compile_clojure">
<jar index="false" jarfile="${base.jarfile}">
<fileset dir="${base.build}" includes="**/*.class"/>
</jar>
</target>
</project>