Build Maven Based Java Application Using Jenkins from CVS

Jenkins is a popular tool for performing continuous integration of software projects.Let’s see how to build maven based java application in jenkins automation tool from CVS repository.  Jenkins,the  leading open source automation server. Built with Java, it provides  lots  of plugins to support building, testing, deploying and automation for virtually any project.

I assumed that Openssh and maven is already installed in your system where you installed jenkins.

How to Start Jenkins

First you need to download the jenkins.war file from Jenkins Homepage.

You can start Jenkins directly via the command line with java -jar jenkins.war. If you start it locally, you access the jenkins using URL: http://localhost:8080/.

Next Install the CVS Plugin from the Manage Plugins section which is inside the Manage Jenkins.

If you want to communicate with cvs using ssh authentication, then you need generate SSH keys in linux using below command.

  • Go to  OpenSSH in the linux using putty

Following steps needs to be done.

  • Configure the New Job(Build Maven Project)
  • Configure Job Name
  • Configure the Java Locations.
  • Apache Maven locations.
  • Configuration CVS Root ,Branch and Module.

Go to Jenkins Global configuration by clicking Manage Jenkin

  1. Configure  CVS_RSH.
  2. Need to configure CVS_SERVER.
  3. Need to configure CVS_ROOT.
  4. Authentication section  CVS_ROOT,username and Password.
  5. Set environmental variables(CVS_RSH, CVS_SERVER ,CVS_ROOT ) in Jenkins as well as in your system.
  6. Configure the Private Key and Known hosts.

Once you completed all the above steps then you can start the build the by clicking Build now link.

How to Deploy a war in the Server

You can also deploy the war/ear file in below server using Deploy Plugin.

This plugin takes a war/ear file and deploys that to a running remote application server at the end of a build. The implementation is based on Cargo. The list of currently supported containers include:

  • Tomcat 4.x/5.x/6.x/7.x
  • JBoss 3.x/4.x
  • Glassfish 2.x/3.x

Also check Weblogic Deploy Plugin and Websphere Deploy Plugin.

About mohan

This is Mohan Jayapalan author of TechPages Blog.I am a part time blogger and Currently working for private Software Concern.

Speak Your Mind

*

© Copyright 2010-2016 www.techpages.org · All Rights Reserved · Powered by WordPress ·