<?xml version="1.0"?>
<project name="weblogic ant task" default="main" >
<!-- Eclipse工作空间路径 -->
<property name="source" value="D:/workspace myeclipse" />
<!-- Tomcat项目路径 -->
<property name="shshop" value="D:/apache-tomcat-6.0.35/webapps/shshop" />
<property name="besttone" value="D:/apache-tomcat-6.0.35/webapps/besttone" />
<target name="detect.file">
<condition property="shshopExist">
<and>
<available file="${shshop}" />
</and>
</condition>
<condition property="besttoneExist">
<and>
<available file="${besttone}" />
</and>
</condition>
</target>
<target name="build shshop" if="shshopExist" depends="detect.file">
<copy todir="${shshop}">
<fileset dir="${source}/Common/WebRoot" />
</copy>
<echo message="shshop success" />
</target>
<target name="build besttone" if="besttoneExist" depends="detect.file">
<copy todir="${besttone}">
<fileset dir="${source}/Common/WebRoot" />
</copy>
<echo message="besttone success" />
</target>
<target name="main">
<antcall target="build shshop" />
<antcall target="build besttone" />
</target>
</project>