https://issues.apache.org/bugzilla/show_bug.cgi?id=48825
Summary: Project.setProperty(String,String) no longer overrides
an existing definition
Product: Ant
Version: 1.8.0
Platform: All
OS/Version: All
Status: NEW
Severity: regression
Priority: P2
Component: Core
AssignedTo: [email protected]
ReportedBy: [email protected]
Probably this method should be deprecated and its usages in XMLProperty and the
P4 tasks cleaned up, but in 1.8.0 it still exists and claims that
"Any existing property of the same name is overwritten, unless it is a user
property."
This does not seem to be true:
<project basedir="." default="x">
<target name="x">
<echo file="Override.java">
public class Override extends org.apache.tools.ant.taskdefs.Property {
protected void addProperty(String n, String v) {
getProject().setProperty(n, v);
}
}
</echo>
<javac includeantruntime="true" srcdir="." destdir="."
includes="Override.java"/>
<taskdef name="override" classname="Override" classpath="."/>
<property name="p" value="1"/>
<override name="p" value="2"/>
<echo>${p}</echo>
</target>
</project>
prints 2 (as expected) in Ant 1.7.1, but 1 in Ant 1.8.0.
I did not see anything in WHATSNEW about this either.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.