ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Cody <>
Subject RE: war task and webinf
Date Wed, 13 Mar 2002 03:49:58 GMT
> If I do this:
> <webinf>
>     <fileset dir="${conf.dir}">
>         <include name=""/>
>         <include name="intake.xml"/>
>     </fileset>
>     <fileset dir="path/to/custom/conf" includes=""/>
> </webinf>
> If I am correct this will copy everything in ${conf.dir} into WEB-INF
> (unless I am completely unclear on how the task works =) and the
> file into WEB-INF as well.
> Now if <webinf> treats <filesets> differently it should 
> really be mentioned
> in the docs. But regardless, how would I treat my custom 
> properties file and
> how would I tell the <war> task explicitly which folder to put it in?

No, the <webinf> *is* the fileset, it does not include them.  So try this:

<war warfile="..." webxml="..." manifest="...">
  <fileset dir="${jsp.dir}"/>
  <webinf dir="${conf.dir}">
    <include name=""/>
    <include name="intake.xml"/>
  <webinf dir="${custom.conf.dir}">
    <include name=""/>

But I see what you are getting at now:  nowhere in your source tree does
conf/ exist, and you want to create it.  I personally don't know how to both
select a fileset and map it to a new location at the same time, so if it
were my build.xml file, I would prepare a temporary webinf directory using
<copy> and then include everything in that with <webinf>.

<target name="war">
  <mkdir dir="${tmp.webinf}/conf"/>
  <copy todir="${tmp.webinf}/conf">
    <fileset dir="${conf.dir}">
      <include name=""/>
      <include name="intake.xml"/>
    <fileset dir="${custom.conf.dir}">
      <include name=""/>
  <war warfile="..." webxml="..." manifest="...">
    <fileset dir="${jsp.dir}"/>
    <webinf dir="${tmp.webinf}"/>
  <delete dir="${tmp.webinf}"/>


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

View raw message