Sunteți pe pagina 1din 3

vogella.

de

Home

Blog

Twitter

Java

Eclipse

Google

Web

Technology

Algorithms

Source Code

Browse

Printer Friendly Version

LabTech Free Trial Offer Powerful, Flexible, AND Affordable All-In-One RMM Tool. Get Trial Now! LabTechSoft.com/Trial Rational tools Consulting, Training, Automation ClearCase ClearQuest Build Forge www.releaseteam.com Application Management Improve Performance & Availability of Critical Web-Based Applications. www.ca.com

Continuous Integration with Hudson - Tutorial


Lars Vogel
Version 0.5 Copyright 2008 -2009 Lars Vogel 02.02.2010
Revision History
Revision 0.1 First draft of article Revision 0.2 Continued the work Revision 0.4 Continued the work Revision 0.5 Added SCM 27.12.2008 26.02.2009 01.02.2010 02.02.2010 Lars Vogel Lars Vogel Lars Vogel Lars Vogel

Hudson
This article describes how to build a continuous integration cycle for Java development. This article is currently in DRAFT.

Table of Contents
1. Continuous Integration with Hudson 1.1. Continuous Integration Overview 1.2. Hudson 1.3. Requirements for using Hudson 2. Installation 2.1. Apache Ant, Tomcat 2.2. Hudson 2.3. Configure Hudson 2.4. Using svn and Hudson behind a proxy 3. Version control systems 4. Setting up a Hudson job 5. Thank you 6. Questions and Discussion 7. Links and Literature 7.1. Source Code 7.2. Hudson links 7.3. PDE/Build links

1. Continuous Integration with Hudson


1.1. Continuous Integration Overview
Continuous integration is a process in which all development work is integrated at a predefined time or event and the resulting work is automatically tested and build. The idea is that development errors are identified very early in the process.

1.2. Hudson
Hudson is one open source tool to perform Continuous Integration. The basic functionality of Hudson is to monitor a SCM (Source Control System) and if changes occurs to start and monitor a build system (for example Apache Ant or Maven). Hudson will monitor the whole process and provide reporting functionality and notification functionality to report success or errors. Hudson can be extended by additional plugins.

1.3. Requirements for using Hudson


To use Hudson you need: An accessible source code repository, e.g. subversion, with your code checked in. A working build script, e.g. ant script, checked into the respository A webapplication server, e.g. Tomcat, to run Hudson

Hudson works also without webapplication server but I focus on the more common case.
Release Manager One click builds from Subversion. Select which issue items to build. www.DigitalTools.com

converted by Web2PDFConvert.com

Secure FTP Server Download WS_FTP Server For SSH, FTPS transfers. Free Eval. IpswitchFT.com/WindowsFTPServer Application Integration HL7, XML, web services, ftp, email, ODBC, serial, custom adapters. www.bridgeforwardsoftware.com

2. Installation
2.1. Apache Ant, Tomcat
Install Tomcat. See Apache Tomcat Tutorial . For the usage of Hudson you need to setup Apache Ant as a build tool. See Using Apache Ant for details.

2.2. Hudson
Download the "hudson.war" file from Hudson Homepage and put the it into your Tomcat "webapps" directory. If you start Tomcat your Hudson installation should be available under "http://localhost:8080/hudson/".

2.3. Configure Hudson


Before using hudson you need to tell it where your JDK and ant installation is. Go to Hudson under "http://localhost:8080/hudson/" and click "Manage Hudson" and then "Configure System"

Maintain the correct path to your JDK and Ant installation and press "Save" below.

2.4. Using svn and Hudson behind a proxy


See Hudson FAQ for a description how to configure the http proxy for svn in Hudson.

3. Version control systems


Hudson supports out of the box subversion and cvs but you find Hudson connectors for almost every SCM system. The following will use svn as an example. Y ou specify the svn URL during project setup.

4. Setting up a Hudson job


Select "New Job" and select "Freestyle Job".

converted by Web2PDFConvert.com

Select "subversion" and maintain your svn URL. The system will give an error message that you need to maintain the credential. Click on the link and maintain your user and password.

5. Thank you
Thank you for practicing with this tutorial. I maintain this tutorial in my private time. If you like the information please help me by using flattr or donating or by recommending this tutorial to other people.

6. Questions and Discussion


Before posting questions, please see the vogella FAQ . If you have questions or find an error in this article please use the www.vogella.de Google Group . I have created a short list how to create good questions which might also help you. .
JAVA Stack Install Project management, outsourcing, & support by Symmetry's Basis Experts www.Sym-Corp.com Secure FTP Server Download WS_FTP Server For SSH, FTPS transfers. Free Eval. IpswitchFT.com/WindowsFTPServer Application Integration HL7, XML, web services, ftp, email, ODBC, serial, custom adapters. www.bridgeforwardsoftware.com

7. Links and Literature


7.1. Source Code
http://www.vogella.de/code/codejava.html Source Code of Examples

7.2. Hudson links


https://hudson.dev.java.net/ Homepage of the Hudson continuous integration engine

7.3. PDE/Build links


https://www6.software.ibm.com/developerworks/education/j-junit4/index.html http://it-republik.de/jaxenter/artikel/Die-RCP-Anwendung-am-laufenden-Band-1306.html PDE Build description (German) www.eclipse.org/pde/pde-build Eclipse PDE/Build http://www.eclipse.org/articles/Article-PDE-Automation/automation.html Build and Test Automation for plugins and features http://rcpquickstart.com/2007/06/06/getting-started-with-pde-build/ Getting started with PDE/Build http://aniefer.blogspot.com/2008/06/example-headless-build-for-rcp-product.html

converted by Web2PDFConvert.com

S-ar putea să vă placă și