ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [Bug 53797] New: Path task does not expand properties in id attribute
Date Wed, 29 Aug 2012 12:37:06 GMT

          Priority: P2
            Bug ID: 53797
           Summary: Path task does not expand properties in id attribute
          Severity: normal
    Classification: Unclassified
                OS: Linux
          Hardware: PC
            Status: NEW
           Version: 1.8.4
         Component: Core
           Product: Ant

The following script fails to create the path with refid 'c'.

<?xml version="1.0" encoding="UTF-8"?>
    <!-- (a) Make a path without any expansion -->
    <path id="a">
        <pathelement location="${user.home}"/>
    <property name="aPath" refid="a"/>
    <echo message="aPath=${aPath}"/>

    <!-- (b) Make a path inside a macro using macro attribute expansion to get
the path id -->
    <macrodef name="make-path">
        <attribute name="pathId"/>

            <path id="@{pathId}">
                <pathelement location="${user.home}"/>

    <make-path pathId="b"/>
    <property name="bPath" refid="b"/>
    <echo message="bPath=${bPath}"/>

    <!-- (c) Make a path using property expansion to get the path id -->
    <property name="cName" value="c"/>
    <path id="${cName}">
        <pathelement location="${user.home}"/>
    <property name="cPath" refid="c"/>
    <echo message="cPath=${cPath}"/>

You are receiving this mail because:
You are the assignee for the bug.

View raw message