maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andreas Guther" <agut...@paymentone.com>
Subject Reading properties and re-using them as part of another key to read from a property file
Date Wed, 03 Nov 2004 02:28:28 GMT
 
Hi:
 
A colleague of mine has some problems with reading properties from a
property file and re-using them as part of another key.
  
The problem is basically that we first read a value from a property file
and then want to re-use this value as part of another key to read
another value from that property file.
 
This is his question, maybe someone can help.
 
Hi all,
 
My question involves a little explanation, so I hope it makes sense... 
I have a properties file that defines a property, which in turn form the
basis of extended property names:
name.switch=name-a
name-a.prop-1=true
name-b.prop-1=false
name-c.prop-1=false
Depending on what name.switch is, I need to read different properties
(name-1.prop-1 in this case).  So the kind of thing I need when
accessing the property is something like:
 
<j:set var="temp.db.username" value="${${name.switch}.prop-1"}/>
 
I found out that in ant, I could do it by using the ant-contrib library.
However, how do I do it in maven?
 
Thanks in advance for your help.
 
 
Andreas 
 
--------------------------------------------------------
 
This electronic mail message contains information belonging to PaymentOne, which may be confidential
and/or legal privileged. The information is intended only for the use of the individual or
entity named above. If you are not the intended recipient, you are hereby notified that any
disclosure, printing, copying, distribution, or the taking of any action in reliance on the
contents of this electronically mailed information is strictly prohibited. If you receive
this message in error, please immediately notify us by electronic mail and delete this message.

--------------------------------------------------------
 
 
  

Mime
  • Unnamed multipart/alternative (inline, 7-Bit, 0 bytes)
View raw message