views:

16

answers:

1

Is it possible to have maven do a cargo:redeploy while I am doing a release:perform?

Currently, we do a release:perform which removes -SNAPSHOT from the version, builds, commits, and then increments the version. This places the final version WAR in the target/ directory but running cargo:redeploy sees the new version number in the pom.xml and fails.

Is there a way to tell the cargo plugin to use the old version number or target the execution to occur after the final WAR is built but before the version is incremented?

+1  A: 

Is there a way to tell the cargo plugin to use the old version number or target the execution to occur after the final WAR is built but before the version is incremented?

I don't see how to do this and, personally, I would decouple the cargo deployment from the release (and perform the deployment from the tagged version after the facts).

Pascal Thivent
Even though we are a very small shop and this is an internal-only project where tagging a release and production deployment go hand-in-hand, this makes sense. Better to adopt good habits now even if it means having to run a whole two commands instead of one. Thanks.
Jake Wharton