build.xml如下:
我常用的ant配置文件<?xml version="1.0" encoding="UTF-8"?>
我常用的ant配置文件
<project name="yybar" basedir="." default="build">
我常用的ant配置文件    
<!--Load properties file
我常用的ant配置文件    <property file="build.properties" />
我常用的ant配置文件    
-->
我常用的ant配置文件
我常用的ant配置文件    
<!-- App name-dependent settings. -->
我常用的ant配置文件    
<property name="appname" value="${ant.project.name}" />
我常用的ant配置文件    
<property name="deploy.resin" value="D:/resin3.0.19/webapps" />
我常用的ant配置文件    
<property name="deploy.tomcat" value="D:/Program Files/Apache Software Foundation/Tomcat 6.0/webapps" />
我常用的ant配置文件
我常用的ant配置文件    
<property name="src.dir" value="${basedir}/src" />
我常用的ant配置文件    
<property name="data.dir" value="${basedir}/data" />
我常用的ant配置文件    
<property name="lib.dir" value="${basedir}/lib" />
我常用的ant配置文件    
<property name="web.dir" value="${src.dir}/web" />
我常用的ant配置文件    
<property name="build.dir" value="${basedir}/build" />
我常用的ant配置文件    
<property name="dist.dir" value="${basedir}/dist" />
我常用的ant配置文件    
<property name="war.dir" value="${build.dir}/${appname}" />
我常用的ant配置文件    
<property name="webinf.dir" value="${war.dir}/WEB-INF" />
我常用的ant配置文件    
<property name="class.dir" value="${war.dir}/WEB-INF/classes" />
我常用的ant配置文件    
<property name="conf.dir" value="${src.dir}/conf" />
我常用的ant配置文件    
<property name="conf.classes" value="${src.dir}/conf/classes" />
我常用的ant配置文件    
<property name="conf.webinf" value="${src.dir}/conf/WEB-INF" />
我常用的ant配置文件
我常用的ant配置文件    
<property name="warlib.dir" value="${war.dir}/WEB-INF/lib" />
我常用的ant配置文件    
<property name="war.file" value="${dist.dir}/${appname}.war" />
我常用的ant配置文件
我常用的ant配置文件    
<property name="views.dir" value="${src.dir}/java/com/easou/${appname}/views" />
我常用的ant配置文件    
<property name="controller.dir" value="${src.dir}/java/com/easou/${appname}/controller" />
我常用的ant配置文件    
<property name="model.dir" value="${src.dir}/java/com/easou/${appname}/model" />
我常用的ant配置文件    
<property name="util.dir" value="${src.dir}/java/com/easou/${appname}/util" />
我常用的ant配置文件    
<property name="exception.dir" value="${src.dir}/java/com/easou/${appname}/exception" />
我常用的ant配置文件
我常用的ant配置文件    
<property name="test" value="${basedir}/test" />
我常用的ant配置文件    
<property name="test.src" value="${test}/java" />
我常用的ant配置文件    
<property name="test.classesdir" value="${build.dir}/test/classes" />
我常用的ant配置文件    
<property name="test.libpath" value="${test}/lib" />
我常用的ant配置文件    
<property name="test.confdir" value="${test}/etc" />
我常用的ant配置文件    
<property name="test.reportdir" value="${test}/report" />
我常用的ant配置文件
我常用的ant配置文件    
<tstamp>
我常用的ant配置文件        
<format property="build.date" pattern="yyyy-MM-dd HH:mm" />
我常用的ant配置文件    
</tstamp>
我常用的ant配置文件
我常用的ant配置文件    
<path id="master-classpath" description="Master CLASSPATH for this script">
我常用的ant配置文件        
<fileset dir="${lib.dir}">
我常用的ant配置文件            
<include name="*.jar" />
我常用的ant配置文件        
</fileset>
我常用的ant配置文件        
<pathelement path="${class.dir}" />
我常用的ant配置文件    
</path>
我常用的ant配置文件
我常用的ant配置文件    
<path id="test.lib">
我常用的ant配置文件        
<fileset dir="${test.libpath}">
我常用的ant配置文件            
<include name="**/*.jar" />
我常用的ant配置文件        
</fileset>
我常用的ant配置文件    
</path>
我常用的ant配置文件
我常用的ant配置文件    
<path id="lib.total">
我常用的ant配置文件        
<path refid="master-classpath" />
我常用的ant配置文件        
<path refid="test.lib" />
我常用的ant配置文件    
</path>
我常用的ant配置文件
我常用的ant配置文件    
<target name="init" description="Setup for build script">
我常用的ant配置文件        
<mkdir dir="${class.dir}" />
我常用的ant配置文件        
<mkdir dir="${warlib.dir}" />
我常用的ant配置文件        
<mkdir dir="${conf.dir}" />
我常用的ant配置文件        
<mkdir dir="${conf.classes}" />
我常用的ant配置文件        
<mkdir dir="${conf.webinf}" />
我常用的ant配置文件        
<mkdir dir="${web.dir}" />
我常用的ant配置文件        
<mkdir dir="${lib.dir}" />
我常用的ant配置文件        
<mkdir dir="${data.dir}" />
我常用的ant配置文件        
<mkdir dir="${views.dir}" />
我常用的ant配置文件        
<mkdir dir="${model.dir}" />
我常用的ant配置文件        
<mkdir dir="${controller.dir}" />
我常用的ant配置文件        
<mkdir dir="${util.dir}" />
我常用的ant配置文件        
<mkdir dir="${exception.dir}" />
我常用的ant配置文件        
<mkdir dir="${dist.dir}" />
我常用的ant配置文件    
</target>
我常用的ant配置文件
我常用的ant配置文件    
<!-- ======================================================= -->
我常用的ant配置文件    
<!-- Convert native properties files to ascii format.       -->
我常用的ant配置文件    
<!-- ======================================================= -->
我常用的ant配置文件    
<target name="unicode">
我常用的ant配置文件        
<delete>
我常用的ant配置文件            
<fileset dir="${conf.classes}" includes="resources*.properties" />
我常用的ant配置文件        
</delete>
我常用的ant配置文件        
<native2ascii encoding="gb2312" src="${conf.classes}" dest="${conf.classes}" includes="resources*.src" ext=".properties" />
我常用的ant配置文件    
</target>
我常用的ant配置文件
我常用的ant配置文件    
<target name="updateweb" depends="init" description="Copies web related files to WAR directory">
我常用的ant配置文件        
<copy todir="${war.dir}">
我常用的ant配置文件            
<fileset dir="${web.dir}">
我常用的ant配置文件                
<include name="**/*" />
我常用的ant配置文件            
</fileset>
我常用的ant配置文件        
</copy>
我常用的ant配置文件        
<copy todir="${war.dir}">
我常用的ant配置文件            
<fileset dir="${views.dir}" />
我常用的ant配置文件        
</copy>
我常用的ant配置文件    
</target>
我常用的ant配置文件
我常用的ant配置文件    
<target name="updatelib" depends="init" description="Copies JAR files to WAR directory">
我常用的ant配置文件        
<copy todir="${warlib.dir}">
我常用的ant配置文件            
<fileset dir="${lib.dir}">
我常用的ant配置文件                
<exclude name="*junit*.jar" />
我常用的ant配置文件                
<exclude name="*spring-mock*.jar" />
我常用的ant配置文件            
</fileset>
我常用的ant配置文件        
</copy>
我常用的ant配置文件    
</target>
我常用的ant配置文件
我常用的ant配置文件    
<target name="deleteconfig" depends="init" description="Deletes config files from WAR directory">
我常用的ant配置文件        
<delete failonerror="false">
我常用的ant配置文件            
<fileset dir="${war.dir}">
我常用的ant配置文件                
<include name="**/*.properties" />
我常用的ant配置文件                
<include name="**/*.xml" />
我常用的ant配置文件            
</fileset>
我常用的ant配置文件        
</delete>
我常用的ant配置文件    
</target>
我常用的ant配置文件
我常用的ant配置文件    
<target name="updateconfig" depends="init,unicode" description="Copies configuration files to WAR directory">
我常用的ant配置文件        
<copy todir="${class.dir}">
我常用的ant配置文件            
<fileset dir="${conf.classes}">
我常用的ant配置文件                
<include name="**/*.xml" />
我常用的ant配置文件                
<include name="**/*.properties" />
我常用的ant配置文件                
<include name="**/*.src" />
我常用的ant配置文件            
</fileset>
我常用的ant配置文件        
</copy>
我常用的ant配置文件        
<copy todir="${webinf.dir}" preservelastmodified="true">
我常用的ant配置文件            
<fileset dir="${conf.webinf}">
我常用的ant配置文件                
<include name="**/*.xml" />
我常用的ant配置文件                
<include name="**/*.tld" />
我常用的ant配置文件            
</fileset>
我常用的ant配置文件        
</copy>
我常用的ant配置文件    
</target>
我常用的ant配置文件
我常用的ant配置文件    
<!-- ======================================================= -->
我常用的ant配置文件    
<!-- Compile all classes.                                    -->
我常用的ant配置文件    
<!-- ======================================================= -->
我常用的ant配置文件    
<target name="compile" depends="init" description="Compiles .java files to WAR directory">
我常用的ant配置文件        
<javac srcdir="${src.dir}" destdir="${class.dir}" encoding="utf-8" debug="on" deprecation="yes" includes="**" optimize="on" failonerror="true">
我常用的ant配置文件            
<classpath refid="master-classpath" />
我常用的ant配置文件        
</javac>
我常用的ant配置文件    
</target>
我常用的ant配置文件
我常用的ant配置文件    
<target name="build" depends="compile,updateweb,updateconfig,updatelib" />
我常用的ant配置文件
我常用的ant配置文件    
<target name="rebuild" depends="clean,compile,updateweb,updateconfig,updatelib" />
我常用的ant配置文件
我常用的ant配置文件    
<target name="dist" depends="rebuild" description="Assembles WAR file">
我常用的ant配置文件        
<war destfile="${war.file}" webxml="${conf.webinf}/web.xml">
我常用的ant配置文件            
<fileset dir="${war.dir}">
我常用的ant配置文件                
<include name="**/*.*" />
我常用的ant配置文件                
<exclude name="**/web.xml" />
我常用的ant配置文件                
<exclude name="**/test/*.class" />
我常用的ant配置文件            
</fileset>
我常用的ant配置文件        
</war>
我常用的ant配置文件    
</target>
我常用的ant配置文件
我常用的ant配置文件    
<target name="deploy" depends="dist" description="Deploys WAR file to deploy.dir">
我常用的ant配置文件        
<delete failonerror="true" dir="${deploy.resin}/${appname}" />
我常用的ant配置文件        
<copy file="${war.file}" todir="${deploy.resin}" />
我常用的ant配置文件    
</target>
我常用的ant配置文件
我常用的ant配置文件    
<!-- ======================================================= -->
我常用的ant配置文件    
<!-- Install targets.                                                                               -->
我常用的ant配置文件    
<!-- ======================================================= -->
我常用的ant配置文件    
<target name="resininstall">
我常用的ant配置文件        
<copy todir="${deploy.resin}/${appname}">
我常用的ant配置文件            
<fileset dir="${war.dir}" />
我常用的ant配置文件        
</copy>
我常用的ant配置文件    
</target>
我常用的ant配置文件
我常用的ant配置文件    
<target name="resin" depends="updateweb, updatelib, updateconfig, resininstall" />
我常用的ant配置文件
我常用的ant配置文件    
<target name="tomcatinstall">
我常用的ant配置文件        
<copy todir="${deploy.tomcat}/${appname}">
我常用的ant配置文件            
<fileset dir="${war.dir}" />
我常用的ant配置文件        
</copy>
我常用的ant配置文件    
</target>
我常用的ant配置文件
我常用的ant配置文件    
<target name="tomcat" depends="updateweb, updatelib, updateconfig, tomcatinstall" />
我常用的ant配置文件
我常用的ant配置文件    
<!-- ======================================================= -->
我常用的ant配置文件    
<!-- Clean up various files and directories.                 -->
我常用的ant配置文件    
<!-- ======================================================= -->
我常用的ant配置文件
我常用的ant配置文件    
<target name="clean" description="Deletes files from WAR directory">
我常用的ant配置文件        
<delete failonerror="false">
我常用的ant配置文件            
<fileset dir="${war.dir}">
我常用的ant配置文件                
<include name="**/*.*" />
我常用的ant配置文件            
</fileset>
我常用的ant配置文件        
</delete>
我常用的ant配置文件        
<delete failonerror="false">
我常用的ant配置文件            
<fileset dir="${dist.dir}">
我常用的ant配置文件                
<include name="**/*" />
我常用的ant配置文件            
</fileset>
我常用的ant配置文件        
</delete>
我常用的ant配置文件        
<delete failonerror="false">
我常用的ant配置文件            
<fileset dir="${dist.dir}">
我常用的ant配置文件                
<include name="**/*" />
我常用的ant配置文件            
</fileset>
我常用的ant配置文件        
</delete>
我常用的ant配置文件    
</target>
我常用的ant配置文件
我常用的ant配置文件    
<!-- ======================================================= -->
我常用的ant配置文件    
<!-- Assemble WAR module.                                    -->
我常用的ant配置文件    
<!-- ======================================================= -->
我常用的ant配置文件    
<target name="unpackwar" depends="compile, unicode, updateweb, updatelib, updateconfig" />
我常用的ant配置文件
我常用的ant配置文件    
<!-- 
我常用的ant配置文件    <target name="test" depends="unpackwar">
我常用的ant配置文件        printsummary属性为true会将测试的结果简单的显示出来 
我常用的ant配置文件        <junit printsummary="true" showoutput="yes" filtertrace="false">
我常用的ant配置文件            <classpath ref>


其目录结构如下:

我常用的ant配置文件

相关文章: