<?xmlversion="1.0"encoding="utf-8"?>
<projectname="myDeploy"default="all"basedir=".">
<propertyname="build.dir"value="${basedir}/build"/>
<propertyname="src"value="${basedir}/src"/>
<propertyname="build.webinf"value="${basedir}/build/WEB-INF"/>
<propertyname="build.weblib"value="${basedir}/build/WEB-INF/lib"/>
<propertyname="build.metainf"value="${basedir}/build/META-INF"/>
<propertyname="build.dest"value="${basedir}/build/WEB-INF/classes"/>
<propertyenvironment="env"/>
<targetname="init">
<tstamp/>
<mkdirdir="${build.dir}"/>
<mkdirdir="${build.webinf}"/>
<mkdirdir="${build.weblib}"/>
<mkdirdir="${build.metainf}"/>
<mkdirdir="${build.dest}"/>
<copytodir="${build.dir}">
<filesetdir="${basedir}/WebRoot">
<includename="**"/>
</fileset>
</copy>
</target>
<targetname="compile"depends="init">
<propertyname="servletapi"
value="${env.TOMCAT_HOME}/lib/*.jar"/>
<propertyname="locallib"
value="${build.weblib}/*.jar"/>
<javacsrcdir="${src}"destdir="${build.dest}" classpath="${servletapi};${locallib}"/>
</target>
<targetname="deploy"depends="compile">
<propertyname="deploy.dir" value="${env.TOMCAT_HOME}/webapps/${DSTAMP}${TSTAMP}"/>
<mkdirdir="${deploy.dir}"/>
<copytodir="${deploy.dir}">
<filesetdir="${build.dir}">
<includename="**"/>
</fileset>
</copy>
</target>
<targetname="clean"depends="init">
<deletedir="${build.dir}"/>
</target>
<targetname="all"depends="deploy,clean"
description="deploys the project to tomcat and cleans the build files."/>
</project>
posted on 2009-08-03 21:12
蓝剑 阅读(196)
评论(0) 编辑 收藏 所属分类:
Other