-
Notifications
You must be signed in to change notification settings - Fork 7
/
build.xml
78 lines (66 loc) · 2.8 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
<project name="guestbook-clj" basedir="." default="test">
<property environment="env" />
<property name="sdk.dir" location="../appengine-java-sdk-1.2.0" />
<property name="classes.dir" value="war/WEB-INF/classes" />
<property name="lib.dir" value="war/WEB-INF/lib" />
<property name="src.dir" value="src" />
<property name="test.dir" value="test" />
<property name="compojure.dir" value="/Users/hume/dev/compojure" />
<import file="${sdk.dir}/config/user/ant-macros.xml"/>
<path id="project.classpath">
<pathelement path="${classes.dir}" />
<fileset dir="${lib.dir}">
<include name="**/*.jar" />
</fileset>
<fileset dir="${sdk.dir}/lib">
<include name="**/*.jar" />
</fileset>
</path>
<target name="clean">
<delete dir="${classes.dir}" />
</target>
<target name="init">
<mkdir dir="${classes.dir}" />
</target>
<target name="copyjars">
<copy file="${sdk.dir}/lib/user/appengine-api-1.0-sdk-1.2.0.jar" todir="${lib.dir}" />
<copy file="${compojure.dir}/compojure.jar" todir="${lib.dir}" />
<copy file="/Users/hume/dev/tw/g/appengine-clj/appengine-clj.jar" todir="${lib.dir}" />
<copy todir="${lib.dir}">
<filelist dir="${compojure.dir}/deps" files="clojure.jar clojure-contrib.jar commons-io-1.4.jar commons-codec-1.3.jar" />
</copy>
</target>
<target name="compile" depends="clean,init,copyjars">
<java classname="clojure.lang.Compile" classpathref="project.classpath" failonerror="true">
<classpath path="${src.dir}" />
<sysproperty key="clojure.compile.path" value="${classes.dir}" />
<arg value="guestbook.servlet" />
</java>
</target>
<target name="test" description="compile and test" depends="compile">
<java classname="clojure.main" classpathref="project.classpath" fork="true" failonerror="true" dir="${test.dir}">
<classpath path="${test.dir}" />
<arg value="-e" />
<arg value="(use 'clojure.contrib.test-is)
(require 'guestbook.greetings-test)
(run-tests 'guestbook.greetings-test)" />
</java>
</target>
<target name="vim" description="Run ng server for VimClojure">
<java classname="com.martiansoftware.nailgun.NGServer" dir="${src.dir}" fork="true">
<arg value="127.0.0.1" />
<classpath>
<pathelement path="${src.dir}" />
<pathelement path="${test.dir}" />
<pathelement location="${env.HOME}/.vim/vimclojure.jar" />
<path refid="project.classpath" />
</classpath>
</java>
</target>
<target name="devserver" description="run local dev appserver" depends="compile,test">
<dev_appserver war="war" />
</target>
<target name="deploy" description="deploy to appspot" depends="compile,test">
<appcfg action="update" war="war" />
</target>
</project>