ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@bost.de>
Subject Re: <include> patterns
Date Wed, 18 Oct 2000 09:14:08 GMT
>>>>> "AP" == Alexander Pokahr <5pokahr@informatik.uni-hamburg.de> writes:

 AP> This causes much more problems for me, than i initially thought:

<fileset> has an includes attribute that still accepts multiple
patterns, can't you use this one?

 AP> The possibility to just specify such properties in a (single)
 AP> local property file was the most appreciated feature, when we
 AP> switched from make to ant. It would be a pity, if this where no
 AP> longer possible.

Take a look at patternset. If the number of includes/excludes you need
to specify is fixed, you can simply define a global patternset and
reuse it in your tasks (see Ant's own buildfile and the patterns used
in the <chmod> tasks for example).

<fileset dir="somedir" includes="${some.property}">
  <patternset refid="my.fixed.patterns" />
  <patternset>
     <include name="one.more.pattern" />
     <exclude name="and.one.more.pattern" />
  </patternset>
</fileset>

should provide a quite powerful combination.

Stefan

Mime
View raw message