ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kevin Jackson" <foamd...@gmail.com>
Subject Re: svn commit: r537344 - /ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/condition/ResourceContains.java
Date Tue, 22 May 2007 02:12:56 GMT
Hi Matt,

> > > we already had this covered, e.g.:
> > >
> > > <resourcecount count="1">
> > >   <restrict>
> > >     <file file="${file}" />
> > >     <contains text="text" casesensitive="false"
> > >
> > >
> >
> xmlns="antlib:org.apache.tools.ant.types.resources.selectors"
> > > />
> > >   </restrict>
> > > </resourcecount>
> > >
> > > Note that this approach supports any resource type
> > > right off the bat.  Actually with the suggested
> > "add"
> > > idiom, <resourcecontains> should be rewritten as a
> > > macrodef.  :|

I think that using a macrodef makes more sense than using Java in this case

> Back to this... do we plan to replace
> au:assertResourceContains with some usage of the
> <contains> selector as I demonstrated, then remove the
> ResourceContains java condition?

Putting the macrodef in the antunit antlib.xml is trivial, but how do
we make resourcecontains available beyond the scope of antunit?
Should we make resourcecontains a general condition (as it is right
now)?

me:
+1 use a macrodef (less code to maintain)
+1 make it available in ant core, not just in the antunit antlib

Kev

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message