Files
samskivert/runtime/twodue/build.xml
T
mdb 30a86c5211 Put the build directory in pages where it is conceptually in the same
place that the webapp is.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@1350 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2003-12-12 01:14:57 +00:00

72 lines
2.5 KiB
XML

<!-- build configuration for 'Two Due' project -->
<project name="Two Due" default="compile" basedir=".">
<!-- the base directory from which we get our bundles and jar files -->
<property name="base.dir" value="../.."/>
<!-- import properties -->
<property file="build.properties"/>
<!-- configuration parameters -->
<property name="app.name" value="twodue"/>
<property name="install.dir" value="${base.dir}/webapps"/>
<property name="deploy.dir" value="${base.dir}/pages/${app.name}"/>
<property name="dist.war" value="${app.name}.war"/>
<!-- we want to access the environment -->
<property environment="env"/>
<property name="java.libraries" value="${env.JAVA_LIBS}"/>
<!-- prepares the application directories -->
<target name="prepare">
<mkdir dir="${deploy.dir}"/>
<copy todir="${deploy.dir}">
<fileset dir="web"/>
</copy>
<mkdir dir="${deploy.dir}/WEB-INF"/>
<copy file="etc/web.xml" tofile="${deploy.dir}/WEB-INF/web.xml"/>
<copy todir="${deploy.dir}/WEB-INF/classes">
<fileset dir="etc" includes="**/*.properties"/>
</copy>
<mkdir dir="${deploy.dir}/WEB-INF/classes"/>
<mkdir dir="${deploy.dir}/WEB-INF/lib"/>
<!-- copy the library jar files -->
<copy todir="${deploy.dir}/WEB-INF/lib">
<fileset dir="${java.libraries}" includesfile="lib/REQUIRED_LIBS"/>
</copy>
</target>
<!-- cleans out the installed application -->
<target name="clean">
<delete dir="${deploy.dir}"/>
</target>
<!-- build the java class files -->
<target name="compile" depends="prepare">
<javac srcdir="src" destdir="${deploy.dir}/WEB-INF/classes"
debug="on" optimize="off" deprecation="on">
<classpath>
<pathelement location="${deploy.dir}/WEB-INF/classes"/>
<fileset dir="${java.libraries}" includes="**/*.jar"/>
<fileset dir="lib" includes="**/*.jar"/>
</classpath>
</javac>
<copy todir="${deploy.dir}/WEB-INF/classes">
<fileset dir="src" includes="**/*.properties"/>
</copy>
</target>
<!-- the default target is to rebuild everything -->
<target name="all" depends="clean,prepare,compile"/>
<!-- builds our distribution files (war and jar) -->
<target name="dist" depends="prepare,compile">
<jar file="${dist.war}" basedir="${deploy.dir}"/>
</target>
<!-- builds the .war file and installs it into the webapp directory -->
<target name="install" depends="dist">
<copy file="${dist.war}" todir="${install.dir}"/>
</target>
</project>