In my opinion, ANT is doing exactly what ANT should do. The param attribute is used to overwrite selected properties in the called target. Param is not a datatype like properties. Param is just used to set properties for a called task.
So, when you use antcall with param, it should always set the property to the value you provide. But only in the called task and not in the calling task. So, when you give out foo in the second task, you receive bar, no matte when Foo in the third task is bar2, no matter when you ask. -- Jürgen Knuplesch -----Ursprüngliche Nachricht----- Von: Dieter König [mailto:[EMAIL PROTECTED] Gesendet: Mittwoch, 12. November 2008 14:25 An: [email protected] Betreff: param hierarchy inverse to property hierarchy Hello list, i have encountered a strange behaviour of ant scripts as property and param elements are using incompatible overwrite rules. Please let me explain in a small diagram. - set some property - use antcall with inheritall=true - the called target tries to set the property again ==> first property is used - use antcall with some param (e.g. <param name="foo" value="bar"/>) - the called target uses antcall with param providing a new value (e.g. <param name="foo" value="bar2"/>) ==> called target uses second value (in the example foo would be "bar2") This means that if in a script an <antcall> using <param> is used there is no chance to overwrite that setting/property when calling that script. Am i right? Or is there a way to set such a parameter? Is this the desired behaviour of ant? In my opinion the same overwrite-behaviour for <param> elements as for <property> elements would be better. The user of an ant script would then always be able to set all the parameters or propertys. Best regards Dieter König --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
