Bug 797525 - ant task exec outputproperty completely broken
Summary: ant task exec outputproperty completely broken
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: ant
Version: 16
Hardware: x86_64
OS: Linux
unspecified
urgent
Target Milestone: ---
Assignee: Jaromír Cápík
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-02-26 13:37 UTC by Bill C. Riemers
Modified: 2016-02-01 01:56 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-02-26 14:56:18 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
simple example to reproduce the bug (594 bytes, text/xml)
2012-02-26 13:37 UTC, Bill C. Riemers
no flags Details
loop example that also reproduces the bug (837 bytes, text/xml)
2012-02-26 13:38 UTC, Bill C. Riemers
no flags Details

Description Bill C. Riemers 2012-02-26 13:37:18 UTC
Created attachment 565894 [details]
simple example to reproduce the bug

Description of problem:

When the exec outputproperty task is used twice with the same outputproperty name, the outputproperty keeps the value of the first execution.  This was not true in prior versions, and is badly breaking my ant scripts.   The obvious workaround not to use the same outputproperty name twice does not work, because there is no clear way to do that within a loop.

Version-Release number of selected component (if applicable):

ant-1.8.2-6.fc16.noarch

How reproducible:

100% 

Steps to Reproduce:
1. ant -f test.xml
2. ant -f test2.xml
3.
  
Actual results:

[briemers@briemersw ant]$ ant -f test.xml test
Buildfile: /autohome/docbill/workspace/reports.fte2/ant/test.xml

test:
     [echo] value = a
     [echo] value = a
     [echo] value = a

BUILD SUCCESSFUL
Total time: 1 second
[briemers@briemersw ant]$ ant -f test2.xml
Buildfile: /autohome/docbill/workspace/reports.fte2/ant/test2.xml

test:
     [echo] value = a
     [echo] value2 = a
     [echo] value = b
     [echo] value2 = a
     [echo] value = c
     [echo] value2 = a

BUILD SUCCESSFUL
Total time: 1 second


Expected results:

[briemers@briemersw ant]$ ant -f test.xml test
Buildfile: /autohome/docbill/workspace/reports.fte2/ant/test.xml

test:
     [echo] value = a
     [echo] value = b
     [echo] value = c

BUILD SUCCESSFUL
Total time: 1 second
[briemers@briemersw ant]$ ant -f test2.xml
Buildfile: /autohome/docbill/workspace/reports.fte2/ant/test2.xml

test:
     [echo] value = a
     [echo] value2 = a
     [echo] value = b
     [echo] value2 = b
     [echo] value = c
     [echo] value2 = c

BUILD SUCCESSFUL
Total time: 1 second


Additional info:

Comment 1 Bill C. Riemers 2012-02-26 13:38:25 UTC
Created attachment 565895 [details]
loop example that also reproduces the bug

Comment 2 Bill C. Riemers 2012-02-26 13:39:51 UTC
Note: The simple example is "test.xml", and the loop example is "test2.xml".

Comment 3 Bill C. Riemers 2012-02-26 14:32:27 UTC
It looks like this is more complicated than it appears.  I downgraded ant rpms to the fedora 15 versions, and ran into the same problem, even though it worked for me when I was still using fedora 15.   This suggest the problem is not ant itself but a change in a dependency it uses.

Comment 4 Bill C. Riemers 2012-02-26 14:56:18 UTC
OK.  I've been reading through various documentation.  It looks to me the bug is the older versions that where buggy.  In ant properties are suppose to be immutable, but somehow in Fedora 15 and prior the immutable aspect was not enforced.  I am guessing something was corrected in the openjdk to correct this.

I can update my ant scripts to use the local task, and that resolves the problem.  Sorry for taking your time with this.


Note You need to log in before you can comment on or make changes to this bug.