[ ant-contrib-Bugs-2100618 ] antcallback and antfetch does not recognize parameter

"SourceForge.net" <[email protected]> Mon, 08 Sep 2008 17:04:28 +0000
Newsgroups gmane.comp.java.ant-contrib.devel
Message-ID <[email protected]>
Bugs item #2100618, was opened at 2008-09-08 19:04
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=416920&aid=2100618&group_id=36177

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: property
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Xuetao Niu (xuetao_niu)
Assigned to: Nobody/Anonymous (nobody)
Summary: antcallback and antfetch does not recognize parameter

Initial Comment:
Hi,

The user manual of antcallback and antfetch describes as identical behavior as antcall and ant tasks except for that they support returning values. But they do not do the same as described -- the target-call perematers are overruled by the global properties with the same name, whereas antcall and ant do use the parameter property name as local scope properties to overrule any more global ones. 

To me it is a bug because if you define any global property with the same name as the parameter, your entire script logic will be destroyed!

Check the following code and run target "test":

	
	<target name="test1">
		
		<!-- expect to see 1 -->
		<property name="param" value="1" />
		<antcall target="callme" />
		
		<!-- expect to see 2 -->
		<antcall target="callme" >
			<param name="param" value="2" />
		</antcall>
		
		<!-- expect to see 1-->
		<antcallback target="callme" />
		
		<!-- expect to see 2, but 1 will be shown!!! -->
		<antcallback target="callme" >
			<param name="param" value="2"/>
		</antcallback>
		
	</target>

		
	<!--
		suppose to accept parameter named "param"
	-->	
	<target name="callme">
		<echo>${param}</echo>
	</target>	


Same goes for <antfetch> task.

Regards,

Xuetao


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=416920&aid=2100618&group_id=36177

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/