I'm not sure what doesn't work for you, I tried the code you posted (note that you never close the comment ) and it works fine for me.
I'm attaching here the two files I'm using (change the extension from .txt to .xml)
I'm running it from command-line:
ant -f build_orig.xml addVersion
and the output is:
Buildfile: build_orig.xml
main:
[echo]
[echo] Buliding the .jar file
[echo]
addVersion:
BUILD SUCCESSFUL
Total time: 0 seconds
My ant version is 1.7.0, but it should work with older versions as well
C:\Temp\xml>ant -version
Apache Ant version 1.7.0 compiled on December 13 2006
If you still have a problem can you please post exactly what is not working (do you get an error? Does it run but not do what you want?)