-
Notifications
You must be signed in to change notification settings - Fork 21
/
build.xml
115 lines (100 loc) · 3.5 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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
<project default="compile">
<property name="sdk.dir" location="lib/appengine-java-sdk-1.9.60" />
<property name="oauth.dir" location="lib/google-oauth-java-client" />
<import file="${sdk.dir}/config/user/ant-macros.xml" />
<path id="project.classpath">
<pathelement path="war/WEB-INF/classes" />
<fileset dir="war/WEB-INF/lib">
<include name="**/*.jar" />
</fileset>
<fileset dir="${sdk.dir}/lib">
<include name="shared/**/*.jar" />
</fileset>
</path>
<target name="copyjars"
description="Copies the App Engine JARs to the WAR.">
<copy
todir="war/WEB-INF/lib"
flatten="true">
<fileset dir="${sdk.dir}/lib/user">
<include name="**/*.jar" />
</fileset>
</copy>
<copy
todir="war/WEB-INF/lib"
flatten="true">
<fileset dir="${oauth.dir}/libs">
<include name="**/*.jar" />
</fileset>
</copy>
</target>
<target name="compile" depends="copyjars"
description="Compiles Java source and copies other source files to the WAR.">
<mkdir dir="war/WEB-INF/classes" />
<copy todir="war/WEB-INF/classes">
<fileset dir="src">
<exclude name="**/*.java" />
</fileset>
</copy>
<javac
srcdir="src"
destdir="war/WEB-INF/classes"
classpathref="project.classpath"
includeantruntime="false"
debug="on" />
</target>
<!-- Runs junit test suite -->
<target name="test" depends="datanucleusenhance">
<mkdir dir="test-build"/>
<javac srcdir="test-src"
destdir="test-build"
classpathref="project.classpath"
includeantruntime="false"
debug="on"/>
<junit>
<classpath refid="project.classpath"/>
<classpath path="test-build"/>
<batchtest fork="false">
<fileset dir="test-src">
<include name="**/*Test*.java"/>
</fileset>
<!-- FIXME: I don't know how to deal with java class exceptions here. -->
<!-- Something is truly screwed up with the classloader, and I don't know why yet. -->
<!-- Uncommenting the formatting tags below will raise an exception. -->
<!-- <formatter type="failure"/> -->
<!-- <formatter type="plain" usefile="false"/> -->
</batchtest>
</junit>
</target>
<target name="datanucleusenhance" depends="compile"
description="Performs JDO enhancement on compiled data classes.">
<enhance_war war="war" />
</target>
<target name="runserver" depends="datanucleusenhance"
description="Starts the development server.">
<dev_appserver war="war" address="0.0.0.0" port="8081"/>
</target>
<target name="update" depends="datanucleusenhance"
description="Uploads the application to App Engine.">
<appcfg action="update" war="war" />
</target>
<target name="update_indexes" depends="datanucleusenhance"
description="Uploads just the datastore index configuration to App Engine.">
<appcfg action="update_indexes" war="war" />
</target>
<target name="rollback" depends="datanucleusenhance"
description="Rolls back an interrupted application update.">
<appcfg action="rollback" war="war" />
</target>
<target name="request_logs"
description="Downloads log data from App Engine for the application.">
<appcfg action="request_logs" war="war">
<options>
<arg value="--num_days=5"/>
</options>
<args>
<arg value="logs.txt"/>
</args>
</appcfg>
</target>
</project>