blob: d2bfc3e1c37b19d9755c17c1e66d768ab879b600 [file] [log] [blame]
<?xml version="1.0"?>
<project name="Simple Dev Environment" default="compile">
<!-- This should point to where you have Tapestry installed -->
<property name="tapestry.install.dir" value="../../"/>
<!-- This property is only required if you wish to deploy to -->
<!-- your favorite web container. Ignore otherwise -->
<property name="deployment.dir" value="./deploy"/>
<!-- NO NEED TO CHANGE ANYTHING FROM HERE DOWN -->
<property name="classes.dir" value="./web/WEB-INF/classes"/>
<property name="src.dir" value="./src"/>
<property name="war.dir" value="./webapps"/>
<property name="war.name" value="learn-tapestry.war"/>
<property name="root.dir" value="${tapestry.install.dir}"/>
<property file="${root.dir}/config/Version.properties"/>
<property file="${root.dir}/config/build.properties"/>
<property file="${root.dir}/config/common.properties"/>
<property name="private.dir" value="private"/>
<path id="tutorial.classpath">
<pathelement location="${lib.ext.dir}/javax.servlet.jar"/>
<pathelement location="${lib.ext.dir}/${log4j.jar}"/>
<pathelement location="${lib.ext.dir}/javax.xml.jaxp.jar"/>
<pathelement location="${lib.ext.dir}/org.apache.crimson.jar"/>
<pathelement location="${lib.ext.dir}/org.mortbay.jetty.jar"/>
<pathelement location="${lib.ext.dir}/${jakarta-oro.jar}"/>
<pathelement location="${lib.ext.dir}/${ognl.jar}"/>
<pathelement location="config"/>
</path>
<path id="libs">
<fileset dir="${tapestry.install.dir}/lib">
<include name="net.sf.*.jar"/>
</fileset>
<fileset dir="${tapestry.install.dir}/lib/ext">
<include name="*.jar"/>
</fileset>
</path>
<target name="prepare">
<mkdir dir="${deployment.dir}"/>
<mkdir dir="${war.dir}"/>
<mkdir dir="${src.dir}"/>
<mkdir dir="${classes.dir}"/>
<mkdir dir="web/WEB-INF/lib"/>
<copy todir="${classes.dir}">
<fileset dir="${src.dir}">
<include name="**/*.page"/>
<include name="**/*.html"/>
<include name="**/*.application"/>
</fileset>
</copy>
<copy todir="web/WEB-INF/lib">
<fileset dir="${tapestry.install.dir}/lib">
<include name="net.sf.*"/>
</fileset>
</copy>
</target>
<target name="compile" depends="prepare">
<javac srcdir="${src.dir}"
destdir="${classes.dir}" target="1.1" source="1.3">
<classpath refid="libs"/>
</javac>
</target>
<!-- Run your code within the standard Jetty Web Container -->
<target name="run" depends="war">
<delete dir="${private.dir}" quiet="true"/>
<mkdir dir="${private.dir}"/>
<echo>Running you example code on port 8081 ...</echo>
<java
classname="org.mortbay.jetty.Server"
classpathref="tutorial.classpath"
fork="true"
maxmemory="128MB">
<arg value="config/jetty-dev-env.xml"/>
<!-- Enable debugging when running the tutorial -->
<jvmarg line="-showversion -Xdebug -Xnoagent"/>
<jvmarg line="-Xrunjdwp:transport=dt_socket,suspend=n,server=y,address=20150"/>
<!-- Jetty can get easily confused (under NT) unless this is turned off. -->
<sysproperty key="org.mortbay.util.FileResource.checkAliases" value="false"/>
<sysproperty key="net.sf.tapestry.asset.dir" value="${private.dir}"/>
<sysproperty key="net.sf.tapestry.asset.URL" value="/private"/>
</java>
</target>
<target name="war" depends="compile">
<jar destfile="${war.dir}/${war.name}"
basedir="./web"/>
</target>
<target name="deploy" depends="war">
<copy todir="${deployment.dir}">
<fileset dir="${war.dir}"/>
</copy>
</target>
<target name="clean">
<delete dir="${war.dir}"/>
<delete dir="${classes.dir}"/>
<delete dir="${private.dir}"/>
<delete dir="${deployment.dir}"/>
</target>
</project>