ANT war task


<!--  B U I L D    T H E    W A R    F I L E  -->
 <target name="war" depends="cleancache,compile" description="Build ${webapp.name}.war">
  <mkdir dir="${dist.dir}"/>
  <war destfile="${dist.dir}/${webapp.name}.war"
   webxml="WebContent/WEB-INF/web.xml"
   manifest="WebContent/META-INF/manifest.mf"
   compress="true">
   <classes dir="${build.dir}/classes"/>
   <zipfileset dir="${lib.dir}" prefix="WEB-INF/lib"/>
   <fileset dir="WebContent"  />
  </war>
  <copy todir="C:/appservers/apache-tomcat-5.5.27/webapps"
            file="${dist.dir}/${webapp.name}.war" />
  <delete dir="${build.dir}"/>
        <delete dir="${dist.dir}"/>
 </target>
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s