You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Da...@ny.frb.org on 2003/04/03 01:29:04 UTC

ANT and paths

I cannot figure out how to set the paths in the war file.

Here is a snippet from my build.xml


<target name="war"
description="Make the war file.">
  <war destfile="${build.dir}/dev.war" webxml="
${build.dir}/WEB-INF/web.xml">
    <fileset dir="${build.dir}/css"/>
    <zipfileset dir="${build.dir}/doc" prefix="doc\"/>
    <zipfileset dir="${build.dir}/html" prefix="html\"/>
    <zipfileset dir="${build.dir}/images" prefix="images\"/>
    <zipfileset dir="${build.dir}/js" prefix="js\"/>
    <zipfileset dir="${build.dir}/pdf" prefix="pdf\"/>
    <zipfileset dir="${build.dir}/WEB-INF/conf" prefix="\WEB-INF\conf\"/>
    <zipfileset dir="${build.dir}/WEB-INF/docs" prefix="\WEB-INF\docs\"/>
    <classes dir="${build.dir}/WEB-INF/classes" prefix="
\WEB-INF\classes\"/>
    <lib  dir="${build.dir}/WEB-INF/lib" prefix="\WEB-INF\lib\"/>
  </war>
</target>

when I use zipfileset with the prefix, it doesn't add the files at all.
If I use the regular fileset, some of the files are added with a blank
path.

The other issue is I am trying to add the classes into the war file.  They
aren't going into the war file.  Does anyone see anything wrong the way I
coded this?

I am run ANT 1.5.2 on WIN2K using IBM jdk 1.3.1.