update_version revision 182
#!/bin/sh
#
# update version number in pom files, e.g., to change to release
# version number in preparation for release, or to change back to
# snapshot version number after release.
#
# Usage: update_version old-version new-version
#
for file in `find . -name 'pom.xml' `
do
ed - "$file" <<-EOF
g:<version>$1</version>:s::<version>$2</version>:
w
q
EOF
done
zip1=`echo "$1" | sed -e 's/\\./_/g'`
zip2=`echo "$2" | sed -e 's/\\./_/g'`
ed - pom.xml <<-EOF
g:<mail.version>$1</mail.version>:s::<mail.version>$2</mail.version>:
g:<mail.zipversion>$zip1</mail.zipversion>:s::<mail.zipversion>$zip2</mail.zipversion>:
w
q
EOF