On Tue, Jul 17, 2007 at 04:57:58PM -0700, Dan Tran spake thus:
> mvn release:prepare -B
Thanks for that, Dan. I didn't realize that "batch mode" implied that
release:prepare would do The Right Thing.
I was playing around with this a bit (I just happen to be performing a
release tonight), and ended up with the following Bourne shell script
that works for our environment. Maybe this illustration will serve as
documentation to help others, as well.
-Al
---------------------------8<-------------------------------------------------
#! /bin/sh
# mvn-release-prepare: Invoke 'mvn release:prepare' in such a way that it will
# not prompt you for version numbers and SCM tags.
#
# Assumes:
# * You are working with CVS (so you must specify the SCM release tag to be
# something CVS accepts as a tag; the default guessed by the maven
# release plugin is not valid for CVS)
#
# * You want the release version number to be the same as the value
# specified in xpath:/project/version in the paremt pom.xml (minus the
# "-SNAPSHOT" suffix, of course)
#
# * You want to "auto-version" subprojects with the same version as the
# parent pom.xml
#
# * You want the default successive *-SNAPSHOT version number
#
# Usage:
# $ mvn-release-prepare <CVS-TAG> [ mvn-args ... ]
PROG="$(basename "$0")"
if test $# -lt 1; then
printf "Usage: ${PROG} <CVS-TAG>\n" 1>&2
exit 1
fi
SCM_TAG="$1"
shift
set -x
mvn --batch-mode "-Dtag=${SCM_TAG}" -DautoVersionSubmodules "$@" release:prepare
---------------------------8<-------------------------------------------------
--
:: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: ::
::
Alan D. Salewski
Software Developer
Health Market Science, Inc.
:: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: ::
::
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]