Hi,

Only just joined the group so apologies if this is out of context.

My understanding is that the ANT properties are immutable and when
multiple targets are on the same command line (is that what you mean)
then the second target inherits the properties of the first.

I had that problem at any rate. I ended up using the contrib third party
library that has mutable properties.

Jim

-----Original Message-----
From: Arun Gupta [mailto:[EMAIL PROTECTED] 
Sent: Friday, March 24, 2006 2:16 PM
To: user@ant.apache.org
Subject: XmlProperty caching values

Here is an excerpt from my build script:

-- cut here --
    <target name="retailer-client">
        <xmlproperty file="etc/retailer-client-binding.xml"
validate="false" collapseattributes="true"/>
        <echo message="${bindings.wsdlLocation}"/>
    </target>

    <target name="warehouse-client">
        <xmlproperty file="etc/warehouse-client-binding.xml"
validate="false" collapseattributes="true"/>
        <echo message="${bindings.wsdlLocation}"/>
    </target>
-- cut here --

Depending upon the order of invocation of these targets, <echo> always
dumps the exact same value of ${bindings.wsdlLocation} in both the
targets.

The value, however, is different depending upon the invocation order.
So for instance, if the order is "retailer-client warehouse-client",
then the correct value from retailer-client-binding.xml is displayed
in both the targets. If the order is "warehouse-client
retailer-client", then the correct value from
warehouse-client-binding.xml is displayed in both the targets.

Seems like only the first invocation of xmlproperty is cached and
results are returned.

Any ideas what is wrong ?

-Arun

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to