-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
88 lines (74 loc) · 2.49 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
<?xml version="1.0"?>
<project name="my-best-mate" default="build">
<property name="bin.dir" location="bin" />
<property name="gae.app.dir" location="war/WEB-INF/lib" />
<property name="lib.dir" location="lib"/>
<property name="source.dir" location="clj/src"/>
<property name="my-best-mate.jar" location="my-best-mate.jar"/>
<property name="gae.sdk.dir" location="/Users/pcalcado/code/tw-lab/gae4j/appengine-java-sdk-1.2.0" />
<import file="${gae.sdk.dir}/config/user/ant-macros.xml" />
<path id="dependencies">
<fileset dir="${lib.dir}">
<include name="*.jar"/>
</fileset>
<fileset dir="${gae.sdk.dir}">
<include name="lib/**/*.jar" />
</fileset>
</path>
<target name="init">
<mkdir dir="${bin.dir}" />
<mkdir dir="${gae.app.dir}" />
</target>
<target name="clean" description="Remove generated files">
<delete file="${my-best-mate.jar}"/>
<delete dir="${bin.dir}"/>
<delete dir="${gae.app.dir}"/>
</target>
<target name="copy">
<copy todir="${gae.app.dir}">
<fileset dir="${lib.dir}" includes="**/*" />
</copy>
<copy todir="${gae.app.dir}" file="${my-best-mate.jar}" />
</target>
<target name="compile" description="Compile sources">
<java classname="clojure.lang.Compile" >
<classpath>
<path location="${bin.dir}"/>
<path location="${source.dir}"/>
<path refid="dependencies"/>
</classpath>
<sysproperty key="clojure.compile.path" value="${bin.dir}"/>
<arg value="my-best-mate"/>
</java>
</target>
<target name="jar">
<jar jarfile="${my-best-mate.jar}">
<fileset dir="${bin.dir}" includes="**/*.class"/>
</jar>
</target>
<target name="test"/>
<target name="run-dev-server">
<dev_appserver war="war" port="8080" >
<!--options>
<arg value="- -jvm_flag=-Xdebug"/>
<arg value="- -jvm_flag=-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=9999"/>
</options-->
</dev_appserver>
</target>
<target name="update-gae-server">
<appcfg action="update" war="war" />
</target>
<target name="build" depends="init, compile, test, jar, copy"/>
<target name="request-logs">
<appcfg action="request_logs" war="war">
<options>
<arg value="--num_days=5"/>
</options>
<args>
<arg value="logs.txt"/>
</args>
</appcfg>
</target>
<target name="local-deploy" depends="build, run-dev-server" />
<target name="gae-deploy" depends="build, update-gae-server" />
</project>