I am currently loading properties from an XML file in Ant. However, I would like to complete the current ant task inside the for loop when loading a new XML properties file for the same set of properties each time.
I am aware of the existence of the ant -contrib var task, which allows me to override properties. However, I'm not sure how to combine this with loading properties from an XML file. First, I thought about iterating over all the properties, and then set them to new values ββusing the propertyregex task. Unfortunately, when I started writing code for this, I realized that I did not know how to actually load property values, since they could not overwrite previously set properties. (Well, they can use the var task, but this cannot be used to load from an XML file, as far as I can tell.)
Any ideas? What I'm perfectly looking for is a task that will be called something like
<xmlvars file="myxmlpropertyfile.xml"/>
which will function just like
<xmlproperty file="myxmlpropertyfile.xml"/>
except that it overwrites the variables.
source share