-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathbuild.xml
114 lines (93 loc) · 3.55 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
<?xml version="1.0"?>
<!--
This file is vestigal from the old pre-maven build system. It should probably be removed.
-->
<project name="motomapia" default="update-objectify" basedir=".">
<property name="name" value="${ant.project.name}" />
<property file="user.properties" />
<property file="${user.home}/build.properties" />
<property file="build.properties" />
<property name="src.dir" location="src" />
<property name="war.dir" location="war" />
<property name="lib.dir" location="${war.dir}/WEB-INF/lib" />
<property name="lib.buildonly.dir" location="build-only" />
<property name="classes.dir" location="${war.dir}/WEB-INF/classes" />
<property name="build.dir" location="/tmp/motomapia" />
<property name="staging.dir" location="${build.dir}/staging" />
<property name="appengine.sdk.dir" location="../appengine-java-sdk" />
<import file="${appengine.sdk.dir}/config/user/ant-macros.xml" />
<target name="update-htmleasy" depends="">
<copy file="${m2.dir}/com/googlecode/htmleasy/htmleasy/0.7-SNAPSHOT/htmleasy-0.7-SNAPSHOT.jar" todir="${lib.dir}" />
</target>
<target name="update-objectify" depends="">
<copy todir="${lib.dir}">
<fileset dir="../objectify/build/libs">
<include name="objectify-*.jar" />
</fileset>
<regexpmapper from="objectify-[^-]*.jar" to="objectify.jar" />
</copy>
</target>
<target name="update-unsuck" depends="">
<copy file="../unsuck/target/unsuck.jar" todir="${lib.dir}" />
</target>
<target name="auth">
<java classname="com.google.appengine.tools.admin.AppCfg" inputstring="${appengine.pass}">
<sysproperty key="appengine.sdk.root" value="${appengine.sdk.dir}" />
<classpath>
<fileset dir="${appengine.sdk.dir}/lib" includes="**/*.jar" />
</classpath>
<arg value="--email=${appengine.email}" />
<arg value="resource_limits_info" />
<arg value="war" />
</java>
</target>
<!-- see https://developers.google.com/appengine/docs/java/tools/ant -->
<target name="run">
<dev_appserver war="war" port="8888">
<options>
<arg value="--address=0.0.0.0"/>
<arg value="--disable_update_check"/>
<arg value="--jvm_flag=-Xmx1G"/>
<arg value="--jvm_flag=-Djava.awt.headless=true"/>
<arg value="--jvm_flag=-Ddatastore.default_high_rep_job_policy_unapplied_job_pct=1"/>
</options>
</dev_appserver>
</target>
<target name="deploy">
<delete dir="${staging.dir}" />
<mkdir dir="${staging.dir}" />
<copy todir="${staging.dir}">
<fileset dir="war">
<exclude name="WEB-INF/classes/**" />
<exclude name="WEB-INF/appengine-generated/**" />
<!-- For now, don't try to use the optimizer
<exclude name="js/app/**" />
-->
</fileset>
</copy>
<jar destfile="${staging.dir}/WEB-INF/lib/classes.jar" basedir="${classes.dir}" />
<!-- Run the optimizer -->
<!-- Ant is truly hopeless
<apply executable="r.js" dir="war" dest="${staging.dir}" relative="true">
<arg value="-o"/>
<srcfile prefix="name=app/page/"/> the problem is no way to trim off the .js
<targetfile prefix="out=../target/staging/js/app/page/"/>
<arg value="baseUrl=js"/>
<fileset dir="war/js/app/page" casesensitive="yes">
<include name="**/*.js"/>
</fileset>
<mapper type="identity"/>
</apply>
-->
<!-- This is how the optimizer should work, but we're not using it at the moment
<apply executable="../optimize.sh" dir="war" relative="true">
<srcfile/>
<fileset dir="war/js/app/page" casesensitive="yes">
<include name="**/*.js"/>
</fileset>
<mapper type="flatten"/>
</apply>
-->
<appcfg action="update" war="${staging.dir}" />
</target>
</project>