<?xml version="1.0" encoding="UTF-8"?>
<project name="Test" default="copyFile" basedir=".">
<!--
Two workspace
-->
<property name="src.dir" value="C:/workspace"/>
<property name="dest.dir" value="C:/dest"/>
<!--day property -->
<property name="day_offset" value="-5"/>
<property name="unit_value" value="day"/>
<!--copy java file -->
<property name="java_src.dir" value="${src.dir}/JavaSource"/>
<property name="java_dest.dir" value="${dest.dir}/src/"/>
<!--copy jsp file-->
<property name="jsp_src.dir" value="${src.dir}/WebContent"/>
<property name="jsp_dest.dir" value="${dest.dir}/WebContent"/>
<!--copy config file , config files -->
<property name="config_src.dir" value="${src.dir}/WebContent/WEB-INF"/>
<property name="config_dest.dir" value="${dest.dir}/config/"/>
<!--create a time stamp -->
<tstamp>
<format property="copy_day" pattern="MM/dd/yyyy"
offset="${day_offset}" unit="${unit_value}"/>
</tstamp>
<target name="copyFile">
<echo>copy date is ::${copy_day}</echo>
<!--copy java file -->
<copy toDir="${java_dest.dir}" verbose="true" overwrite="true">
<fileset dir="${java_src.dir}">
<include name="**/*.java"/>
<date pattern="MM/dd/yyyy" datetime="${copy_day}" when="after"/>
</fileset>
</copy>
<!--copy jsp ,js, images, css, files -->
<copy toDir="${jsp_dest.dir}" verbose="true" overwrite="true">
<fileset dir="${jsp_src.dir}">
<include name="**/*.jsp"/>
<include name="**/*.js"/>
<include name="**/*.gif"/>
<include name="**/*.jpg"/>
<include name="**/*.css"/>
<date pattern="MM/dd/yyyy" datetime="${copy_day}" when="after"/>
</fileset>
</copy>
<!--copy xml, tld files -->
<copy toDir="${config_dest.dir}" verbose="true" overwrite="true">
<fileset dir="${config_src.dir}">
<include name="**/*.xml"/>
<include name="**/*.tld"/>
<date pattern="MM/dd/yyyy" datetime="${copy_day}" when="after"/>
</fileset>
</copy>
</target>
</project>
posted on 2011-03-29 15:22
fly 阅读(494)
评论(0) 编辑 收藏 所属分类:
工作日志