joshua
joshua

Reputation: 4198

Automatic deployement with Jenkins/jetty

I would like to setup a continuous integration environment whereby after committing the source code, it triggers a build process that checks out the code, runs tests, constructs a war file and deploys the same to jetty server such that the users/testers can access the application on the browser.

Is this possible ?

Am using maven and jetty (I am not willing to change this. I use jetty both for development and in production). For CI, I am exploring Jenkins but am open to other opensource solutions.

If possible, how do I setup the environment.

Upvotes: 5

Views: 5472

Answers (3)

joshua
joshua

Reputation: 4198

I found a maven plugin named cargo. It has everything that I needed. I added it into my pom so that I could deploy and undeploy using mvn cargo:deploy/mvn cargo:undeploy. I created a new jenkins job and added undeploy, package deploy maven goals as build steps. Everything is working perfectly.

Upvotes: 5

Grzegorz Gajos
Grzegorz Gajos

Reputation: 2363

I reviewed a lot of posts like this but I want something that is maven independent. Look here, this is selfcontained runner in on hudson/jenkins. You only need 'war', even manual jetty installation is not needed. Deploy war on jetty in Jenkins or Hudson job

Upvotes: 1

Augusto
Augusto

Reputation: 30007

it's definitely possible. In a previous project, the build server (teamcity) copied the war to a shared nfs location between the build server and the application server and run a little shell script that connected to the application server and restarted jetty.

We used ant inside maven to manage the deployment, I remember we used the copy and sshexec tasks.

I'm sure that there are many other solutions, but that one worked for us.

Upvotes: 3

Related Questions