antファイル

2825 ワード


<?xml version="1.0" encoding="UTF-8"?>
<project name="Packaging Generator for SFG" default="_packaging_generation_">

	<path id="project.classpath">
		<fileset dir="webapp/WEB-INF/lib" >
			<include name="*.jar"/>
		</fileset>
        <fileset dir="setup/ide" >
			<include name="*.jar"/>
		</fileset>
	</path>

    <target name="_packaging_generation_" depends="clean,init,build,N65591,copy" />

	<target name="build" depends="init">
		<javac debug="on" 
			debuglevel="lines,vars,source"
			source="1.5"
			target="1.5" 
			destdir="webapp/WEB-INF/classes">
			<src path="java/au/com" />
			<src path="java/au/gov" />
			<classpath refid="project.classpath" />
			<compilerarg value="-Xlint:unchecked"/>			
		</javac>
	</target>

   <target name="N65591" description="SkillsForGrowth.war">
		<mkdir dir="deploy" />
		<jar destfile="deploy/SkillsForGrowth.war" manifest="webapp/META-INF/MANIFEST.MF">
            <zipfileset dir="webapp"/>
            <!--<zipfileset dir="lib" prefix="WEB-INF/lib"/>-->
            <zipfileset dir="resources" prefix="WEB-INF/classes"/>
		</jar>
	</target>

    <target name="init">
        <mkdir dir="webapp/WEB-INF/classes"/>
    </target>
	
	<property name="tomcat.dir" value="D:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps">
	</property>
	
    <target name="clean">
        <delete dir="webapp/WEB-INF/classes"/>
        <delete dir="deploy"/>
    	<delete dir="${tomcat.dir}\SkillsForGrowth"/>
    </target>
	

	<target name="copy">
			<delete>
					<fileset dir="${tomcat.dir}">
						<include name="SkillsForGrowth.war" />
					</fileset>
			</delete>
			<copy todir="${tomcat.dir}">
				<fileset dir="deploy">
					<include name="SkillsForGrowth.war" />
				</fileset>
			</copy>
	</target>
	
	
</project>