Trying to improve robustness in <subant> and <propertyfile>.
Observed a long-running build randomly failing with text like this:
[propertyfile] Updating property file: .../whatever.properties
[subant] Failure for target 'something' of: ...module1/build.xml
[subant] The following error occurred while executing this line:
[subant] .../something.xml:123: java.lang.OutOfMemoryError: GC overhead limit exceeded
[subant] Failure for target 'something' of: ...module2/build.xml
[subant] The following error occurred while executing this line:
[subant] ...module2/build.xml:12: The following error occurred while executing this line:
[subant] .../something.xml:123: Syntax error in property: ${some.prope
[subant] Failure for target 'something' of: ...module3/build.xml [etc., hundreds of times]
Turns out that whatever.properties had been truncated at exactly 24k characters, in the middle of a line.
Fixing <propertyfile> to therefore collect all of what it plans to write, then write it.
Also trying to make <subant> actually stop the build when it gets OOME, rather than continuing
(probably in vain) just because failonerror="false" (which is intended to catch "normal" problems).
ThreadDeath should also be rethrown, not logged as a subscript failure.
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@881624 13f79535-47bb-0310-9956-ffa450edef68