ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From MCG QA <mc...@yahoo.com>
Subject Extracting key,value from a property
Date Fri, 02 Jul 2004 21:48:44 GMT
I have a property file env.txt which contains values
as under:

AuthorAddressEntityBean=c:/temp
AuthorDetailsSessionBean=c:/bea
AuthorEntityBean=c:/b-copy
AuthorXrefEntityBean=c:/WEB-INF
BindingXref=c:/PVCS
BiographiesSessionBean=c:/mhhe-build
CommonSessionBean=c:/qalogs
CompetCategorySessionBean=c:/qalogs/mhhe

I'm using <foreach> task and set it as a property  as
under:

<foreach list="${environments}" delimiter="&#x0A;"
param="CurEnv" target="loop-target"/>


And when I execute this task, which is basically an
echo at this moment, I would get the following values
for Curenv for each iteration/line:
Curenv:AuthorAddressEntityBean=c:/temp
Curenv:AuthorDetailsSessionBean=c:/bea
Curenv:AuthorEntityBean=c:/b-copy
etc...

What I would like to do is to extract each of the
above as both key and value, into two separate
variables.

for example, my <foreach> task would return me a
property "AuthorAddressEntityBean=c:/temp"

I would like to extract from this property the
following: 
"key" = AuthorAddressEntityBean
"value" = c:/temp 
in this case.

How can I do this?



		
__________________________________
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!
http://promotions.yahoo.com/new_mail

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


Mime
View raw message