Grim
Grim

Reputation: 2040

Deploy on Release

I recenly released a new final version of a XaaS framework. One part of the framework is a webapplication for translation issues.

The idea is to keep the webapplication compatible to the framework. That means on every new release the released webapplication must be deployed.

To release a version i am using

mvn release:prepare release:perform

What works great.

In this command we have 3 differernt versions,

How to deploy the xxx-1.9-FINAL.war and xxx-2.0-SNAPSHOT.war using scp?

Some important benefits:

  1. If the war could not be scped the release shall fail.
  2. If the release fail, the war should not be deployed.
  3. The pom.xml must contain a container-version.

Upvotes: 1

Views: 155

Answers (2)

Grim
Grim

Reputation: 2040

This is not possible by design

There is no way to yield failed deployments to webcontainers.

Upvotes: 0

Alexandru Marina
Alexandru Marina

Reputation: 906

release:perform would also deploy the released version (1.9-FINAL in your case). How exactly is the artefact deployed is controlled by the settings of the maven deploy plugin (the transport can be set to scp). A detailed explanation can be found here: http://maven.apache.org/plugins/maven-deploy-plugin/examples/deploy-ssh-external.html

Hope that answers your question. As for the points in your question:

If the war could not be scped the release shall fail. In this situation only the perform part of the command will fail.

If the release fail, the war should not be deployed. This is somehow out of the box.

The pom.xml must contain a container-version. Not sure i understand what you mean.

Upvotes: 1

Related Questions