Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
79 lines (66 sloc) 2.8 KB
<project name="guestbook-clj" basedir="." default="test">
<property environment="env" />
<property name="sdk.dir" location="../appengine-java-sdk-1.2.0" />
<property name="classes.dir" value="war/WEB-INF/classes" />
<property name="lib.dir" value="war/WEB-INF/lib" />
<property name="src.dir" value="src" />
<property name="test.dir" value="test" />
<property name="compojure.dir" value="/Users/hume/dev/compojure" />
<import file="${sdk.dir}/config/user/ant-macros.xml"/>
<path id="project.classpath">
<pathelement path="${classes.dir}" />
<fileset dir="${lib.dir}">
<include name="**/*.jar" />
</fileset>
<fileset dir="${sdk.dir}/lib">
<include name="**/*.jar" />
</fileset>
</path>
<target name="clean">
<delete dir="${classes.dir}" />
</target>
<target name="init">
<mkdir dir="${classes.dir}" />
</target>
<target name="copyjars">
<copy file="${sdk.dir}/lib/user/appengine-api-1.0-sdk-1.2.0.jar" todir="${lib.dir}" />
<copy file="${compojure.dir}/compojure.jar" todir="${lib.dir}" />
<copy file="/Users/hume/dev/tw/g/appengine-clj/appengine-clj.jar" todir="${lib.dir}" />
<copy todir="${lib.dir}">
<filelist dir="${compojure.dir}/deps" files="clojure.jar clojure-contrib.jar commons-io-1.4.jar commons-codec-1.3.jar" />
</copy>
</target>
<target name="compile" depends="clean,init,copyjars">
<java classname="clojure.lang.Compile" classpathref="project.classpath" failonerror="true">
<classpath path="${src.dir}" />
<sysproperty key="clojure.compile.path" value="${classes.dir}" />
<arg value="guestbook.servlet" />
</java>
</target>
<target name="test" description="compile and test" depends="compile">
<java classname="clojure.main" classpathref="project.classpath" fork="true" failonerror="true" dir="${test.dir}">
<classpath path="${test.dir}" />
<arg value="-e" />
<arg value="(use 'clojure.contrib.test-is)
(require 'guestbook.greetings-test)
(run-tests 'guestbook.greetings-test)" />
</java>
</target>
<target name="vim" description="Run ng server for VimClojure">
<java classname="com.martiansoftware.nailgun.NGServer" dir="${src.dir}" fork="true">
<arg value="127.0.0.1" />
<classpath>
<pathelement path="${src.dir}" />
<pathelement path="${test.dir}" />
<pathelement location="${env.HOME}/.vim/vimclojure.jar" />
<path refid="project.classpath" />
</classpath>
</java>
</target>
<target name="devserver" description="run local dev appserver" depends="compile,test">
<dev_appserver war="war" />
</target>
<target name="deploy" description="deploy to appspot" depends="compile,test">
<appcfg action="update" war="war" />
</target>
</project>