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:
hostname=gold material=gold While the keys are unique values arent. So your task would return a list <searchKeys list="list" file="name.properties" value="gold" separator=","/> <antunit:assertEquals> <equals arg1="${list}" arg2="hostname,material"/> </antunit:assertEquals> For implementing <searchKeys> see the tutorial http://ant.apache.org//manual/tutorial-writing-tasks.html http://ant.apache.org//manual/tutorial-tasks-filesets-properties.html For using <antunit:*> see http://ant.apache.org/antlibs/antunit/index.html Jan >-----Ursprüngliche Nachricht----- >Von: Jan [mailto:raghure...@gmail.com] >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 "name.properties" and in it i >have entry >like "hostname=gold", now i want to parse "name.properties" >get the key of >value "gold" means reverse read of property, is this possible >using ant? > >Any ideas? > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@ant.apache.org For additional commands, e-mail: user-h...@ant.apache.org