ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anthony Rodriguez <Anth...@WeddingChannel.com>
Subject matching a string in a property
Date Wed, 20 Mar 2002 00:56:30 GMT
Hi, I have a question regarding finding a string in a property.  Say I have
a property like this:

<property name="foo" value="a_very_short_string">

Now I want to search that property for a string, let's say "short".  If the
property has "short" in it then I want to do task A.  If not, then do not do
task A.  Something like this:

<condition property="doTaskA" value="true">
   <exists key="short" inproperty="foo"/>    #made this up for illustration
purposes
</condition>

<target name="A" depends="doTaskA">
....
</target>


That's the jist of it.  Is there any way for me to do this in ant?

-Anthony 
  

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message