Peter Kahn
Peter Kahn

Reputation: 13026

How do you use Maven release plugin when it forces declaration of the GA prior to building?

The maven release plugin creates a tag, updates the poms to remove snapshot, builds, deploys and sets the next dev version in the poms leaving us with

The problem is that when I run this I don't know that the build will be the GA release because it hasn't been tested and blessed by QA yet.

Do most people start using the release plugin for each release-candidate allowing re-deployment of the relase version multiple times in your repository?

Upvotes: 2

Views: 226

Answers (1)

Stefan Ferstl
Stefan Ferstl

Reputation: 5265

Re-deploying releases with the same version is not a good idea, since most maven installations are configured to download release versions only once to the local repository. But there are a few other options:

  • You can give your release candidate a version like 1.0.0.RC1. If your QA says the release candidate is OK, you can either
    • use the tag of your release candidate and create the GA release (e.g. 1.0.0.GA) with the maven-release-plugin
    • re-deploy the artifacts of 1.0.0.RC1 manually using mvn deploy:deploy-file with the GA version
  • There are commercial repository managers like Nexus Professional (I don't like advertising so I won't post a link to it), which have staging capabilities for releases. If the QA finds any issues with the release, you can simply throw away the release. If the release is OK you can promote it to your company repository.

Upvotes: 2

Related Questions