App Engine Python SDK version 1.7.4 (2)
[gae.git] / java / demos / sticky / build.xml
blob6f792b68aecffb6573220806bfb02e3a8833575d
1 <project name="Sticky" default="compile">
2   <property file="build.properties" />
3   <property name="project.dir" location="." />
5   <macrodef name="compile.gwtc">
6     <attribute name="module" />
7     <attribute name="srcdir" default="src" />
8     <attribute name="wardir" />
9     <attribute name="classpathref" />
10     <sequential>
11       <java dir="@{srcdir}"
12           classname="com.google.gwt.dev.Compiler"
13           classpathref="@{classpathref}"
14           fork="yes"
15           failonerror="true">
16         <jvmarg value="-Xmx512M"/>
17         <arg value="-war" />
18         <arg file="@{wardir}" />
19         <arg value="@{module}" />
20       </java>
21     </sequential>
22   </macrodef>
24   <path id="backend.classpath">
25     <pathelement path="war/WEB-INF/classes" />
26     <fileset dir="war/WEB-INF/lib" includes="**/*.jar" />
27     <fileset dir="${appengine.sdk}/lib" includes="shared/**/*.jar" />
28   </path>
30   <path id="frontend.classpath">
31     <pathelement path="src" />
32     <fileset file="${gwt.sdk}/gwt-user.jar" />
33     <fileset file="${gwt.sdk}/gwt-dev.jar" />
34   </path>
36   <import file="${appengine.sdk}/config/user/ant-macros.xml" />
38   <target name="copyjars" >
39     <copy todir="war/WEB-INF/lib"
40         flatten="true">
41       <fileset dir="${appengine.sdk}/lib/user"
42           includes="**/*.jar" />
43     </copy>
44     <copy todir="war/WEB-INF/lib">
45       <fileset file="${gwt.sdk}/gwt-servlet.jar" />
46     </copy>
47   </target>
49   <target name="compile.init">
50     <mkdir dir="war/WEB-INF/classes" />
51   </target>
53   <path id="enhancer.classpath">
54     <pathelement path="war/WEB-INF/classes" />
55     <!-- The server side code instantiates client side objects, so the enhancer
56          will need gwt user to resolve all the imports it sees. -->
57     <fileset file="${gwt.sdk}/gwt-user.jar" />
58     <fileset dir="${appengine.sdk}/lib"
59         includes="shared/**/*.jar, tools/**/*.jar, user/*.jar" />
60   </path>
62   <target name="compile.backend" depends="compile.init, copyjars">
63     <!-- copy configs -->
64     <copy todir="war/WEB-INF/classes">
65       <fileset dir="src" includes="META-INF/**" />
66     </copy>
67     <!-- build backend classes -->
68     <javac srcdir="src"
69         destdir="war/WEB-INF/classes"
70         classpathref="backend.classpath">
71       <include name="com/google/appengine/demos/sticky/server/**" />
72     </javac>
73     <!-- enhance classes -->
74     <taskdef name="enhance"
75         classpathref="enhancer.classpath"
76         classname="org.datanucleus.enhancer.tools.EnhancerTask" />
77     <enhance classpathref="enhancer.classpath"
78         failonerror="true">
79       <fileset dir="war/WEB-INF/classes"
80           includes="com/google/appengine/demos/sticky/server/**" />
81     </enhance>
82   </target>
84   <target name="compile.frontend">
85     <compile.gwtc module="com.google.appengine.demos.sticky.Sticky"
86         srcdir="src"
87         wardir="war"
88         classpathref="frontend.classpath" />
89   </target>
91   <target name="compile" depends="compile.backend, compile.frontend"/>
93   <target name="runserver" depends="compile">
94     <dev_appserver war="${project.dir}/war" />
95   </target>
97   <target name="clean">
98     <delete dir="war/WEB-INF/classes" />
99     <delete dir="war/sticky" />
100     <delete>
101       <fileset dir="war/WEB-INF/lib" includes="*.jar" />
102     </delete>
103   </target>
104 </project>