1<project> 2 <property name="appengine-sdk.dir" location="../../appengine-java-sdk" /> 3 4 <import file="${appengine-sdk.dir}/config/user/ant-macros.xml" /> 5 6 <path id="project.classpath"> 7 <pathelement path="war/WEB-INF/classes" /> 8 <fileset dir="war/WEB-INF/lib"> 9 <include name="**/*.jar" /> 10 </fileset> 11 <fileset dir="${appengine-sdk.dir}/lib"> 12 <include name="shared/**/*.jar" /> 13 </fileset> 14 </path> 15 16 <target name="copyjars" description="Copies the App Engine JARs to the WAR."> 17 <copy todir="war/WEB-INF/lib" flatten="true"> 18 <fileset dir="${appengine-sdk.dir}/lib/user"> 19 <include name="**/*.jar" /> 20 </fileset> 21 </copy> 22 </target> 23 24 <target name="compile" depends="copyjars" 25 description="Compiles Java source and copies other source files to the WAR."> 26 <mkdir dir="war/WEB-INF/classes" /> 27 <copy todir="war/WEB-INF/classes"> 28 <fileset dir="src"> 29 <exclude name="**/*.java" /> 30 </fileset> 31 </copy> 32 <javac srcdir="src" destdir="war/WEB-INF/classes" classpathref="project.classpath" debug="on" 33 includeAntRuntime="false"/> 34 </target> 35 36 <target name="runserver" depends="compile" description="Starts the development server."> 37 <dev_appserver war="war" /> 38 </target> 39 40 <target name="update" depends="compile" description="Uploads the application to App Engine."> 41 <appcfg action="update" war="war" /> 42 </target> 43 44 <target name="rollback" depends="compile" 45 description="Rolls back an interrupted application update."> 46 <appcfg action="rollback" war="war" /> 47 </target> 48 49 <target name="request_logs" description="Downloads log data from App Engine for the application."> 50 <appcfg action="request_logs" war="war"> 51 <options> 52 <arg value="--num_days=5"/> 53 </options> 54 <args> 55 <arg value="logs.txt"/> 56 </args> 57 </appcfg> 58 </target> 59</project> 60