Run this: <?xml version="1.0" encoding="UTF-8"?> <project name="test"> <target name="tst"> <local name="loc"/> <property name="loc" value="hello"/> <echoproperties> <propertyset> <propertyref name="loc"/> </propertyset> </echoproperties> </target> </project> You'd expect the property "loc" to be printed, but it doesn't. Comment-out the "local" task and it will work as expected. I'd consider setting severity here to "criticial" as it indeed looks like something insanely bad.
Anyone looking at this? It looks like it has been out there for 7 years and it is still not fixed.
I don't have the complete knowledge about the expected semantics of the propertyset task, however its documentation here[1] states: >> Selects properties from the current project to be included in the set. So it seems to be meant to only include the properties that are at project level and the "local" task just creates properties that are local to that block, so I don't think this current behaviour is a bug. But like I said, I don't have much background knowledge about the semantics of this task [1] https://ant.apache.org/manual/Types/propertyset.html
Local properties are supposed to work like regular properties, except that they disappear at the end of the block. So, why wouldn't propertyset take them into account?
fixed via https://github.com/apache/ant/pull/135