ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wendy Smoak <Wendy.Sm...@asu.edu>
Subject RE: zip instead of war
Date Wed, 03 Nov 2004 22:55:07 GMT
> From: Scott Purcell [mailto:spurcell@vertisinc.com] 
> 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"/>
    </javac>
    <zip destfile="${lib}/benauth.jar">
      <zipfileset dir="classes"/>
    </zip>
  </target>

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=""/>
    </zip>
  </target>

HTH,
Wendy Smoak


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message