Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Ant Task to Modify build.xml

843834Aug 17 2005 — edited Sep 18 2005
I want to create a custom ANT task that will find a build.xml file, find a specific property element, and change the value attribute. Is there existing ant tasks that do this? What Ant Tasks manipulate xml files, instead of just building files?

Example:
<property name="version" value="1.0.1.2">
I want to change the above value to something else, from 1.0.1.2 to something like 1.0.1.3. Is there a Ant Task that will take an XML element and change the attribute value?

If not, this is what I was thinking of doing:
1. Use a SAX parser to find original value
2. Then using the REPLACE anttask to replace that value as a token.

Any help would be appreciated! Thanks in advance.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 16 2005
Added on Aug 17 2005
4 comments
334 views