source: trunk/abcl/examples/google-app-engine/build.xml @ 13265

Last change on this file since 13265 was 13265, checked in by Mark Evenson, 11 years ago

Further corrections to GAE example.

File size: 3.0 KB
Line 
1<project default="compile">
2  <!--
3       'sdk.dir' contains the location of the Google AppEngine for Java SDK
4       http://googleappengine.googlecode.com/files/appengine-java-sdk-1.4.3.zip
5  -->
6  <property name="sdk.dir" 
7            location="${user.home}/work/appengine-java-sdk-1.4.3/" />
8  <import file="${sdk.dir}/config/user/ant-macros.xml" />
9
10  <path id="project.classpath">
11    <pathelement path="war/WEB-INF/classes" />
12    <fileset dir="war/WEB-INF/lib">
13      <include name="**/*.jar" />
14    </fileset>
15    <fileset dir="${sdk.dir}/lib">
16      <include name="shared/**/*.jar" />
17    </fileset>
18  </path>
19
20  <property name="abcl.dir"
21            location="${basedir}/../.."/>
22
23  <target name="resources.copy"
24          depends="compile.lisp,abcl.jar"
25    description="Copies the necessary resources to the WAR.">
26    <copy
27        todir="war/WEB-INF/lib"
28        flatten="true">
29      <fileset dir="${sdk.dir}/lib/user">
30        <include name="**/*.jar" />
31      </fileset>
32      <fileset dir="${abcl.dir}">
33        <include name="dist/*.jar" />
34      </fileset>
35    </copy>
36    <copy
37        todir="war/fasls">
38      <fileset dir="src">
39        <include name="*.abcl" />
40      </fileset>
41    </copy>
42  </target>
43 
44  <target name="compile"
45          depends="compile.java,compile.lisp"/>
46
47  <target name="compile.java" depends="resources.copy,abcl.jar"
48    description="Compiles Java source and copies other source files to the WAR.">
49    <mkdir dir="war/WEB-INF/classes" />
50    <copy todir="war/WEB-INF/classes">
51      <fileset dir="src">
52        <exclude name="**/*.java" />
53      </fileset>
54    </copy>
55    <javac srcdir="src"
56           destdir="war/WEB-INF/classes"
57           classpathref="project.classpath"
58           includeantruntime="false"
59           debug="on" />
60  </target>
61 
62  <property name="abcl.jar" value="${abcl.dir}/dist/abcl.jar"/>
63  <target name="compile.lisp" depends="abcl.jar">
64    <java fork="true"
65          classpath="${abcl.jar}"
66          classname="org.armedbear.lisp.Main"
67          inputstring="(compile-file &quot;${basedir}/src/first-servlet.lisp&quot;)">
68      <arg value="--noinit"/>
69    </java>
70  </target>
71
72  <available file="${abcl.jar}" property="abcl.jar.p"/>
73  <target name="abcl.jar" unless="abcl.jar.p">
74    <ant dir="${abcl.dir}" target="abcl.jar"/>
75  </target>
76
77  <target name="clean" description="Cleans all the jars, classes, and FASLs.">
78    <delete>
79      <fileset dir="${basedir}">
80        <include name="**/*.jar" />
81        <include name="**/*.class" />
82        <include name="**/*.abcl" />
83      </fileset>
84    </delete>
85  </target>
86
87  <target name="runserver" 
88          depends="compile,resources.copy"
89    description="Starts the development server.">
90    <dev_appserver war="war" />
91  </target>
92
93  <target name="runserver-debug" depends="compile,resources.copy"
94    description="Starts the development server.">
95    <dev_appserver war="war" port="8888"/>
96  </target>
97</project>
Note: See TracBrowser for help on using the repository browser.