Hi,

is it possible to use a properties value as a property name?
I'd like to specify a number of WAR-Directories in a list and read
properties for each of them from a properties file und use <foreach> to
build them.

    <target name="war">
        <taskdef name="foreach"
classname="net.sf.antcontrib.logic.ForEach"/>
        <foreach list="${webmodule.list}" target="testForEach"
param="webmodule.name" inheritAll="true"/>
    </target>
    
    <target name="testForEach">
        <echo message="${webmodule.name}"/>
==>     <echo message="${${webmodule.name}.dir}"/>
    </target>

build.properties:

webmodule.list = App1, App2
App1.dir = abc
App1.vhost = vhost1
App2.dir = xyz
App2.vhost = vhost2

Is there a better/other way to achieve what I need to do?

--MK


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to