-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
193 lines (169 loc) · 6.37 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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
<project >
<!-- Scala related tasks -->
<taskdef name="scalac" classname="scala.tools.ant.Scalac">
<classpath>
<pathelement path="war/WEB-INF/lib/scala-compiler.jar" />
<pathelement path="war/WEB-INF/lib/scala-library.jar" />
</classpath>
</taskdef>
<property name="appengine.sdk" location="../appengine-java-sdk" />
<property name="gwt.sdk" location="../gwt" />
<property name="srcfiles" value="**/*.java, **/*.scala" />
<property name="javafiles" value="**/*.java" />
<property name="scalafiles" value="**/*.scala" />
<property name="srcdir" value="src" />
<property name="testdir" value="test" />
<property name="dstdir" value="war/WEB-INF/classes" />
<property name="classname" value="" />
<import file="${appengine.sdk}/config/user/ant-macros.xml" />
<condition property="XstartOnFirstThread" value="-XstartOnFirstThread">
<os family="mac"/>
</condition>
<condition property="XstartOnFirstThread" value="">
<not><os family="mac"/></not>
</condition>
<path id="project.classpath">
<pathelement path="${dstdir}" />
<pathelement location="${gwt.sdk}/gwt-user.jar"/>
<fileset dir="${gwt.sdk}" includes="gwt-dev*.jar"/>
<fileset dir="war/WEB-INF/lib">
<include name="**/*.jar" />
</fileset>
<fileset dir="${appengine.sdk}/lib">
<include name="shared/**/*.jar" />
</fileset>
</path>
<path id="tools.class.path">
<path refid="project.classpath"/>
<pathelement location="${appengine.sdk}/lib/appengine-tools-api.jar"/>
<fileset dir="${appengine.sdk}/lib/tools">
<include name="**/asm-*.jar"/>
<include name="**/datanucleus-enhancer-*.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="${appengine.sdk}/lib/user">
<include name="**/*.jar" />
</fileset>
<fileset dir="${appengine.sdk}/lib/user" includes="**/*.jar"/>
</copy>
<copy todir="war/WEB-INF/lib" file="${gwt.sdk}/gwt-servlet.jar" />
<!-- Add any additional server libs that need to be copied -->
</target>
<target name="clean" depends="copyjars" description="cleans up the classes">
<delete dir="${dstdir}" />
</target>
<target name="test" depends="compile" description="run teh tests">
<junit printsummary="yes" haltonfailure="no">
<classpath refid="project.classpath"/>
<formatter type="plain" usefile="false"/>
<test name="${classname}" haltonfailure="no"/>
</junit>
</target>
<target name="gwtc" depends="compile" description="GWT compile to JavaScript">
<java failonerror="true" fork="true" classname="com.google.gwt.dev.Compiler">
<classpath>
<pathelement location="${srcdir}"/>
<path refid="project.classpath"/>
</classpath>
<!--jvmarg value="-Xss16M"/-->
<jvmarg value="-Xmx256M"/>
<jvmarg line="${XstartOnFirstThread}"/>
<!--arg line="-logLevel INFO"/>
<arg line="-style PRETTY"/-->
<arg value="com.newspipes.Newspipes"/>
</java>
</target>
<target name="compile" depends="copyjars" description="Compiles Java source and copies other source files to the WAR.">
<mkdir dir="${dstdir}" />
<copy todir="${dstdir}">
<fileset dir="${srcdir}">
<exclude name="${javafiles}" />
<exclude name="${scalafiles}" />
</fileset>
</copy>
<scalac
destdir="${dstdir}"
scalacdebugging="yes">
<src path="${srcdir}"/>
<classpath refid="project.classpath"/>
</scalac>
<javac srcdir="${srcdir}"
destdir="${dstdir}"
classpathref="project.classpath"
source="1.5"
target="1.5"
nowarn="true"
debuglevel="lines,vars,source"
debug="on" />
<scalac
destdir="${dstdir}"
scalacdebugging="yes">
<src path="${testdir}"/>
<classpath refid="project.classpath"/>
</scalac>
<javac srcdir="${testdir}"
destdir="${dstdir}"
classpathref="project.classpath"
debug="on" />
</target>
<target name="datanucleusenhance" depends="compile"
description="Performs JDO enhancement on compiled data classes.">
<enhance_war war="war" />
</target>
<target name="hosted" depends="gwtc, datanucleusenhance" description="Run hosted mode">
<java failonerror="true" fork="true" classname="com.google.gwt.dev.HostedMode">
<classpath>
<pathelement location="src"/>
<path refid="project.classpath"/>
<path refid="tools.class.path"/>
</classpath>
<jvmarg value="-Xms256m"/>
<jvmarg value="-Xmx512m"/>
<jvmarg line="${XstartOnFirstThread}"/>
<arg value="-startupUrl"/>
<!--arg line="-logLevel DEBUG"/-->
<!--arg line="-style PRETTY"/-->
<arg value="Newspipes.html"/>
<arg value="-server"/>
<arg value="com.google.appengine.tools.development.gwt.AppEngineLauncher"/>
<arg value="com.newspipes.Newspipes"/>
</java>
</target>
<target name="runserver-debug" depends="compile" description="Starts the development server.">
<dev_appserver war="war" port="8888" >
<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="runserver" depends="compile" description="Starts the development server.">
<dev_appserver war="war" port="8888" >
</dev_appserver>
</target>
<target name="update" depends="compile"
description="Uploads the application to App Engine.">
<appcfg action="update" war="war" />
</target>
<target name="update_indexes" depends="compile"
description="Uploads just the datastore index configuration to App Engine.">
<appcfg action="update_indexes" war="war" />
</target>
<target name="rollback" depends="compile"
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>