Bug 55831 - Augment task noop behavior after first invocation
Summary: Augment task noop behavior after first invocation
Status: NEW
Alias: None
Product: Ant
Classification: Unclassified
Component: Core tasks (show other bugs)
Version: 1.9.4
Hardware: PC All
: P2 critical (vote)
Target Milestone: ---
Assignee: Ant Notifications List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-01 12:58 UTC by rich
Modified: 2014-05-06 03:20 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description rich 2013-12-01 12:58:37 UTC
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.