maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Donald <pe...@realityforge.org>
Subject Evaluating properties
Date Thu, 10 Apr 2003 03:10:45 GMT
Hi,

Someone wanna tell me how to do the following. I have some property files that 
look like

property1.properties
--------------------
myProp=1

property2.properties
--------------------
mySecondProp=${myProp}


I want to load both property files and have the second one resolved so that it 
is "mySecondProp=1". I though the following would work but it doesn't. ANyone 
know why?

<util:properties var="_data" file="property1.properties" />
<j:forEach items="${_data.keySet().iterator()}" var="_key">
  <j:set var="${_key}"><j:expr value="${_data.get(_key)}"></j:set>
</j:forEach>

<util:properties var="_data" file="property2.properties" />
<j:forEach items="${_data.keySet().iterator()}" var="_key">
  <j:set var="${_key}"><j:expr value="${_data.get(_key)}"></j:set>
</j:forEach>

-- 
Cheers,

Peter Donald
-------------------------------------------------------
To fight and conquer in all your battles is not supreme 
excellence; supreme excellence consists in breaking the 
enemy's resistance without fighting. - Sun Tzu, 300 B.C.
-------------------------------------------------------


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Mime
View raw message