ant(build.xml)

 

<project basedir="." default="all" name="paas_dev">
    <target name="init" description="init var">
        <property name="src" value="${basedir}/src"/>
        <property name="resource" value="${basedir}/resource"/>
		<property name="webapp" value="${basedir}/webapp"/>
			
		<property name="build" value="${basedir}/build"/>
		<property name="build.portal" value="${build}/portal"/>
        <property name="build.portal.WEB-INF" value="${build.portal}/WEB-INF"/>
		<property name="classes" value="${build.portal.WEB-INF}/classes"/>
		 		
        <path id="classpath">    
            <fileset dir="${webapp}/WEB-INF/lib">   
                <include name="**/*.jar"/>   
            </fileset>   
        </path> 
    </target>
    
    <target name="clean" description="Remove all the temp files and directories">
		<delete dir="${build}"/>
	</target>
	
    <target name="prepare" description="">
		<mkdir dir="${classes}"/>
    </target>
    
    <target name="build" description="">
        <javac srcdir="${src}" destdir="${classes}" debug="true" deprecation="on" encoding="UTF-8">
            <classpath refid="classpath"/>
        </javac>
		
		<copy todir="${classes}/">
            <fileset dir="${src}">
			  <include name="**/sqlmap/*.xml"/>
			 </fileset> 
        </copy>
		
		<copy todir="${classes}">
            <fileset dir="${resource}"/>
        </copy>
		
		<copy todir="${build.portal}/">
            <fileset dir="${webapp}"/>
        </copy>
    </target>
    
	<target name="all" depends="init,clean,prepare,build">
	</target>
</project>

你可能感兴趣的:(build.xml)