Search code examples
maven-2mavenmaven-release-pluginmaven-cargo

Maven Cargo Deploy During Release Perform


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?


Solution

  • 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).