ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Womack <mwom...@bevocal.com>
Subject [PATCH] PatternSet - includesfile/excludesfile
Date Tue, 17 Jul 2001 22:41:35 GMT
Enclosed is a patched version of PatternSet.java (cvs version 1.6).

Breaking patch: no, should be compatible with existing ant build files.

Changes:

1) This version of PatternSet supports 2 new elements: <includesfile> and
<excludesfile>.  This allows a patternset to support more than just one
includes or excludes file, and also allows if/unless attributes to control
the inclusion of those files.  For example:

<patternset>
  <include name="**/test/**"/>
  <excludesfile name="${build.dir}/excludes.txt" />
  <excludesfile name="${build.dir}/optional_excludes.txt" if="optional"/>
</patternset>

Same would apply to includesfile elements.  The includesfile and
excludesfile attributes for <patternset> are still supported, as before.

2) Delays the File exists() check for the include/exclude file until the
file is actually used.  This allows the if/unless attribute to be used to
exclude non-existent files.  So, in the above example, if the file
"optional_excludes.txt" does not exist, and the property "optional" is not
defined, the build will continue without any problems, and the file will not
be used.  But if the "optional" property is defined, a build exception will
be thrown if the file does not exist.

Please consider these changes for the next version of Ant on the current
code base (1.4?).  If you have any questions or comments, please contact me.

Thanks,
-Mark

Supercharge your telephone! -- write your VoiceXML Application for free at
http://cafe.bevocal.com
BeVocal Cafe - Rated #1 VoiceXML development environment and voice hosting
service by CT Labs!

 <<PatternSet.java>> 




Mime
View raw message