ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wendy Smoak <>
Subject RE: zip instead of war
Date Wed, 03 Nov 2004 22:55:07 GMT
> From: Scott Purcell [] 
> Should I create the above structure before I compile? and 
> then put the compile there. I am trying to come up with a 
> workflow and could use a hand from someone who has possibly 
> been through this:

That's what works for me, though I do one additional thing-- I compile
the .java to .class in a different directory, and then I make a .jar
file of all the classes.  That keeps the deployed .war file nice and
clean, there's nothing in 'classes' except some .properties files.

  <target name="compile" depends="init">
    <javac srcdir="src" destdir="classes" deprecation="on" debug="on">
      <classpath refid="compile.classpath"/>
    <zip destfile="${lib}/benauth.jar">
      <zipfileset dir="classes"/>

Then it comes down to:

  <target name="war" depends="init,compile,copy-props,props-war">
     <delete dir="${dist}"/>
     <mkdir dir="${dist}"/>
     <zip destfile="${dist}/${context}.war" compress="false">
       <zipfileset dir="webapp"     prefix=""/>

Wendy Smoak

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message