ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <>
Subject AW: Getting Property Key from Value
Date Tue, 11 May 2010 05:31:16 GMT
Not with built-in tasks.
You could write your own task for that.

But dont forget that you can retrieve multiple keys for one value:


While the keys are unique values arent.
So your task would return a list

<searchKeys list="list" file="" value="gold" separator=","/>
  <equals arg1="${list}" arg2="hostname,material"/>

For implementing <searchKeys> see the tutorial

For using <antunit:*> see


>-----Urspr√ľngliche Nachricht-----
>Von: Jan [] 
>Gesendet: Montag, 10. Mai 2010 21:53
>An: Ant Users List
>Betreff: Getting Property Key from Value
>Hi All,
>Is there any way using ant to get the Property Key from value ?
>For examble lets say i have file "" and in it i 
>have entry
>like "hostname=gold", now i want to parse "" 
>get the key of
>value "gold" means reverse read of property, is this possible 
>using ant?
>Any ideas?

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message