ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 18228] New: - I would like to have possibility to use property values as property names.
Date Fri, 21 Mar 2003 16:38:55 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18228>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18228

I would like to have possibility to use property values as property names.

           Summary: I would like to have possibility to use property values
                    as property names.
           Product: Ant
           Version: 1.5.2
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: Enhancement
          Priority: Other
         Component: Core
        AssignedTo: dev@ant.apache.org
        ReportedBy: mkazakov@yandex.ru


May be it is possible, but I don't understand - how to do it.
I wanna do something like this (see marked string):

<property name="variable1" value="value1"/>
<property name="variable2" value="value2"/>
<property name="variable3" value="value3"/>

<target name="main">
  <antcall target="outvalue>
    <param name="var" value="variable2"/>
  </antcall>
</target>

<target name="outvalue" if="var">
<!-- vvvvvvvvvvvvvvvvvvvvvvvvvvvv -->
  <echo message="${var}=${${var}}"/>
<!-- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -->
</target>

So I wanna use value of the property as name of other property.
Is it possible to implement this?

Mime
View raw message