ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From osvet...@ns.rvsnet.cz
Subject Adding elements to a path
Date Thu, 17 Nov 2005 10:23:44 GMT
Hello all,

I need to add elements to an existing path. I have this problem solved,
but it is not nice. I do it this way

<macrodef name="addToMyPath">
    <attribute name="newPath" />
    <sequential>
        <property name="temp" refid="myPath" />
        <path id="myPath">
            <pathelement path="@{newPath}" />
            <pathelement path="${temp}" />
        </path>
    </sequential>
</macrodef>

It works (with slight modifications also when called more times), but it
1) is a horrible hack
2) prints a warning each time about overriding myPath reference

Please, is there a better way to do this? I can't believe that such
powerfull tool as ant lacks such basic feature.

Best regards,

Ondrej Svetlik

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message