ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steele, Richard" <r...@steelezone.net>
Subject Unexpected <augment> behavior
Date Wed, 27 Nov 2013 13:09:14 GMT
I've run into an odd behavior that I'm assuming is a defect but I'd like to
confirm.

With this build file:

<project name="augment-test">

    <target name="init">
        <path id="inner"/>

        <path id="outside">
            <path refid="inner"/>
        </path>
    </target>

    <target name="update-paths">
        <augment id="inner">
            <fileset dir="lib"/>
        </augment>
    </target>

    <target name="a" depends="init, update-paths">
        <echo message="${toString:inner}" />
    </target>

    <target name="b" depends="init, update-paths">
        <echo message="${toString:outside}" />
    </target>

</project>

If I invoke target "b" I get a response I expect:

C:\augment-test>ant b
Buildfile: C:\augment-test\build.xml

init:

update-paths:

b:
     [echo] C:\augment-test\lib\A.jar;C:\augment-test\lib\B.jar

However, if I call it with both "a" and "b" the value of the "outer" path
is empty:

C:\augment-test>ant a b
Buildfile: C:\augment-test\build.xml

init:

update-paths:

a:
     [echo] C:\augment-test\lib\A.jar;C:\augment-test\lib\B.jar

init:

update-paths:

b:
     [echo]

If I reverse the targets then I get a similar result, however now the inner
path is empty and outer is OK:

C:\augment-test>ant b a
Buildfile: C:\augment-test\build.xml

init:

update-paths:

b:
     [echo] C:\augment-test\lib\A.jar;C:\augment-test\lib\B.jar

init:

update-paths:

a:
     [echo]

This happens with both 1.8.4 and 1.9.2 on 64-bit Windows 7.

Thoughts?

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message