Bug 35653 - PropertySet defined as a nested element in antcall does not work as <param> entries
Summary: PropertySet defined as a nested element in antcall does not work as <param> e...
Status: NEW
Alias: None
Product: Ant
Classification: Unclassified
Component: Core (show other bugs)
Version: 1.6.2
Hardware: All other
: P2 normal (vote)
Target Milestone: ---
Assignee: Ant Notifications List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-07-07 22:43 UTC by P Hale
Modified: 2008-02-22 12:18 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description P Hale 2005-07-07 22:43:38 UTC
One of the options available for antcall / ant is to provide a PropertySet from
the current environment to the called target. I am using the ability to provide
a mapper to alter the property names in the property set. Some of the resulting
proerty names collide with existing properties in the environment, so the
property is not set via the mapper/propertyset.

When providing a <param> entry in an antcall the property name given is assigned
whatever value that is specified, even if the named property already exists.

<property name="y" value="a"/>
<property name="z" value="b"/>
<property name="x.y" value="boo"/>
<property name="x.z" value="hoo"/>

<!-- in this case the value stored in "y" is set to "new a" for the call 
     I realize that this value scoped to the life of the call -->
<antcall target="k" inheritAll="true">
   <param name="y" value="new a"/>
</antcall>

<!-- in this case all properties with a prefix of "x." are selected and
     are mapped to names without the "x." giving two proeprties of "y" and "z"
     but the values in "y" and "z" remain unchanged in the called target -->
<antcall target="k" inheritAll="true">
   <propertyset id="foo"/>
      <propertyref prefix="x."/>
      <mapper type="glob" from="x.*" to="*"/>
   </propertyset>
</antcall>

It would be useful if those properties selected and mapped by a propertyset be
made available to the antcall in the same manner as the properties specified
with a <param> entry.