Bug 55472 - Second java task resultproperty lost
Summary: Second java task resultproperty lost
Status: NEEDINFO
Alias: None
Product: Ant
Classification: Unclassified
Component: Core tasks (show other bugs)
Version: 1.8.4
Hardware: PC Linux
: P2 normal (vote)
Target Milestone: ---
Assignee: Ant Notifications List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-08-23 18:09 UTC by Matias Blasi
Modified: 2013-09-20 17:49 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matias Blasi 2013-08-23 18:09:58 UTC
I have a macro defined to call a maven build from my ant build.
The macro uses a java task to execute maven, and I am using the 'resultproperty' for getting the result of the maven process.
If I use the macro once, works as expected, the resultproperty has the correct value.
If I use the macro twice, the second one doesn't work, the resultproperty value is allways 0, despite of the result of the maven java process.
Comment 1 Stefan Bodewig 2013-08-24 05:44:19 UTC
Are you using the same property as resultproperty of both invocations?

If so you get bitten by property immutability - the first task sets the property to 0 and the second one won't override it.  You'd need to  modify your macro definition to use a different resultproperty on each usage - for example by constructing its name based on an attribute of the task.