ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Diane Holt <>
Subject Re: wildcarding dir in fileset?
Date Fri, 04 May 2001 02:24:53 GMT
--- John Fisher <> wrote:
> My probably is that for any Apex view, this
> list is arbitrary. In other words, my list of "dir" values that I need
> to process are
> /classes" (you can see I've created n fileset entries to match this
> pattern). How the heck can I generate these n filesets automatically,
> without some sort of XML generation preprocessor?

Unless you have some kind of inclusion and/or exclusion pattern for the
subdirs to include/exclude, I can't think of any way to do it without
explicitly listing the dirs you want/don't want. But you could at least
shrink down the way you've currently got it:

<property name="top.dir" value="/nif/code/Framework_Templates/"/>
<property name="work.dir" value="${top.dir}/fisher_java.wrk"/>

<property name="links.dir" value="${work.dir}/Links/Imported_View"/>

<patternset id="jarable"

 <target name="main">
   <delete file="${work.dir}/classes/myapp.jar"/>
   <jar jarfile="${work.dir}/classes/myapp.jar">
      <fileset dir="${work.dir}">
          <patternset refid="jarable" />
          <include name="${links.dir}/Application/classes"/>
          <include name="${links.dir}/Configuration/classes"/>
          <include name="${links.dir}/GUI/classes"/>
          <include name="${links.dir}/GUI_Images/classes"/>
          <include name="${links.dir}/Hardware/classes"/>
          <include name="${links.dir}/ICCS_Types/classes"/>
          <include name="${links.dir}/Oracle/classes"/>
          <include name="${links.dir}/Reservation/classes"/>
          <include name="${links.dir}/Status_Monitor/classes"/>
          <include name="${links.dir}/System_Manager/classes"/>
          <include name="${links.dir}/Utilities/classes"/>

If you could say "${links.dir}/*/classes" (with an excludes, if you need
to exclude stuff), all the better -- then all you'd need is:
      <fileset dir="${work.dir}">
          <patternset refid="jarable" />
          <include name="${links.dir}/*/classes"/>
          <exclude name="whatever_you_need_excluded"/>



Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices

View raw message