1 | <project default="compile"> |
---|
2 | |
---|
3 | <property name="sdk.dir" |
---|
4 | location="../../../appengine-java-sdk" /> |
---|
5 | <import file="${sdk.dir}/config/user/ant-macros.xml" /> |
---|
6 | |
---|
7 | <path id="project.classpath"> |
---|
8 | <pathelement path="war/WEB-INF/classes" /> |
---|
9 | <fileset dir="war/WEB-INF/lib"> |
---|
10 | <include name="**/*.jar" /> |
---|
11 | </fileset> |
---|
12 | <fileset dir="${sdk.dir}/lib"> |
---|
13 | <include name="shared/**/*.jar" /> |
---|
14 | </fileset> |
---|
15 | </path> |
---|
16 | |
---|
17 | <target name="copyjars" |
---|
18 | description="Copies the App Engine and ABCL JARs to the WAR."> |
---|
19 | <copy |
---|
20 | todir="war/WEB-INF/lib" |
---|
21 | flatten="true"> |
---|
22 | <fileset dir="${sdk.dir}/lib/user"> |
---|
23 | <include name="**/*.jar" /> |
---|
24 | </fileset> |
---|
25 | <fileset dir="../.."> |
---|
26 | <include name="dist/*.jar" /> |
---|
27 | </fileset> |
---|
28 | </copy> |
---|
29 | <copy |
---|
30 | todir="war/fasls"> |
---|
31 | <fileset dir="src"> |
---|
32 | <include name="*.abcl" /> |
---|
33 | </fileset> |
---|
34 | </copy> |
---|
35 | </target> |
---|
36 | |
---|
37 | <target name="compile" depends="copyjars,abcl.jar" |
---|
38 | description="Compiles Java source and copies other source files to the WAR."> |
---|
39 | <mkdir dir="war/WEB-INF/classes" /> |
---|
40 | <copy todir="war/WEB-INF/classes"> |
---|
41 | <fileset dir="src"> |
---|
42 | <exclude name="**/*.java" /> |
---|
43 | </fileset> |
---|
44 | </copy> |
---|
45 | <javac |
---|
46 | srcdir="src" |
---|
47 | destdir="war/WEB-INF/classes" |
---|
48 | classpathref="project.classpath" |
---|
49 | includeantruntime="false" |
---|
50 | debug="on" /> |
---|
51 | </target> |
---|
52 | |
---|
53 | <target name="abcl.jar"> |
---|
54 | <ant dir="../.." target="abcl.jar"/> |
---|
55 | </target> |
---|
56 | |
---|
57 | <target name="clean" description="Cleans all the jars and fasls."> |
---|
58 | <delete> |
---|
59 | <fileset dir="." includes="**/*.jar" /> |
---|
60 | <fileset dir="." includes="**/*.class" /> |
---|
61 | <fileset dir="." includes="**/*.abcl" /> |
---|
62 | </delete> |
---|
63 | </target> |
---|
64 | <target name="runserver" depends="compile" |
---|
65 | description="Starts the development server."> |
---|
66 | <dev_appserver war="war" /> |
---|
67 | </target> |
---|
68 | <target name="runserver-debug" depends="compile" |
---|
69 | description="Starts the development server."> |
---|
70 | <dev_appserver war="war" port="8888"/> |
---|
71 | </target> |
---|
72 | </project> |
---|