DarVar
DarVar

Reputation: 18124

Running both default and production profile during release

My build is as follows:

The first is the normal build (mvn clean install) The other is a profile activated by property (mvn clean install -Dbuild=prod)

The first deploys to Nexus. The second profile deploys to a production server.

How can I run both builds during the Maven release cycle.

Upvotes: 1

Views: 81

Answers (2)

user626607
user626607

Reputation:

I would separate the nexus-deploy out to a different profile and use multiple target execution:

Create a different profile to cater for the normal build and execute both targets on the build server like so:

mvn clean install -Dbuild=prod -Pdeploy

Upvotes: 1

Yichz
Yichz

Reputation: 9681

mabe Cargo can to do this. look Appfuse for example, it use mvn jetty:run-war to deploy in jetty and mvn cargo:start start to deploy to tomcat

Upvotes: 0

Related Questions