JavaRanch Home    
 
This page:         last edited 11 June 2009         What's Changed?         Edit

Ant Svn Cruise Control   

Setting up Cruise Control with SVN and Ant

Software Required:

  • apache_2.0.59-win32-x86-no_ssl.msi
  • svn-1.4.4-setup.exe
  • TortoiseSVN-1.4.4.9706-win32-svn-1.4.4.msi
  • cruisecontrol-bin-2.8
  • svnant-1.2.1
  • jdk-1_5_0_01-windows-i586-p.exe
  • junit-4.6.jar

(Does it have to be these exact versions? For which ones of those can other versions be substituted? --Ulf)

Installation Guide:

Installing jdk-1_5 Install jdk-1_5.

Installing Apache

1. Install Apache 2.0. Most of the installation screens should be self explanatory. But, when you get to "Server Information" screen (Unless you are installing this for a server that has a domain name attached to it), you can just put in localhost for both Network Domain and Server Name. For Administrator's Email Address, enter an appropriate email address.

2. If you already have a web server (IIS) running on port 80, then to run apache on a different port, open the httpd.conf file that is located in C:\Program Files\Apache Group\Apache2\conf (assuming you did a standard install) and change the line that says:Listen 80 to Listen 81. You can use a port other than 81.

3. Save the file and restart the Apache2 service.

4. If Apache is running correctly, you should be able to navigate to http://localhost:81 and a web page should display

Installing Subversion

1. Download and install Subversion (Use the windows installer version).

2. When you reach the "Select Additional Task"screen, make sure that you have the "Install and configure Subversion modules..." checkbox checked.

Installing TortoiseSVN

1. Download and install TortoiseSVN. TortoiseSVN is a shell extension for Windows that will make managing the Subversion server much easier.

Installing CruiseControl?

1. Download the binary version of cruisecontrol-bin-2.8 and unzip it.

2. Create the following directory C:\cc-sandbox. Copy the unzipped cruisecontrol-bin-2.8 to the directory.

3. Run CruiseControl? from the installation directory. For example, c:\cc-sanbox\cruisecontrol-bin-2.8.2\cruisecontrol.bat.

4. The Set-up is complete, you should now be able to access the following links: http://localhost:8080/dashboard, http://localhost:8080/cruisecontrol

5. Setup for Cruise Control is complete, for your reference CruiseContol? provides with a sample project connectfour.

Configuration Guide

Creating your first Subversion Repository

1. Subversion will let you create repositories in any directory of your server that you want. You should create a top level directory that all of the other repositories will live under. You will see why in a few more instructions. We will be creating our repositories under the c:\svn directory. You should use either svn or subversion as your top level directory name so that you can recognize it easily when you are navigating your hard drive. So, your first step should be to create the svn directory off of the root of the c: drive.

2. Using File Explorer, navigate into c:\svn and create a subdirectory under it called test. This will be the location of our test repository.

3. Once you've created the test directory, right click the directory and select "TortoiseSVN" > "Create Repository Here..." from the menu.

4. When the dialog box appears asking about FSFS or BDB, select FSFS and press the "OK" button.

Configure Apache to see your Subversion repository

1. Open the httpd.conf file that is located in c:\program files\Apache Group\Apache2\conf (assuming you did a standard install) and scroll to the bottom of the file. Add the following lines:

<Location /svn >

 DAV svn

 SVNParentPath c:\svn

</Location>

2. Save the httpd.conf file and restart the Apache2 service.

3. At this point, you should be able to access http://localhost:81/svn/test using your web browser, but anyone can access the files. What you need to do next is add in basic authentication. To do that you will need to add usernames and passwords to an .htaccess file and then you will need to attach that file to the svn directory.

4. To create usernames and passwords, you will need to run the htpasswd.exe program in the bin directory of the Apach2 program files. The first time you run this file, you should use the -cm flags to create the file and use MD5 hashing. Every other time you run it, you will use the -m flag ONLY. htpasswd -cm c:\svn\htaccess abhi will prompt for a password and create a file named htaccess in the c:\svn directory with the username and password for the user "abhi". I like to keep the password file in the root directory of where my subversion repositories live.

5. Open the httpd.conf file that is located in c:\program files\Apache Group\Apache2\conf (assuming you did a standard install) and scroll to the bottom of the file. Make the following changes to the lines added above:

<Location /svn>

 DAV svn

 SVNParentPath c:\svn

 AuthType? Basic

 AuthName? "Subversion Repository"

 AuthUserFile? c:\svn\htaccess

 Require valid-user

 SVNAutoversioning on

</Location>

Save the httpd.conf file and restart the Apache2 service.

6. If everything has been configured correctly, you should be prompted for a username and password when you access http://localhost:81/svn/test. Once you supply one of the username/password combinations that you provided via the htpasswd utility, you should see the same page you saw when all we had enabled was anonymous access.

Integrating a simple HelloWorld project with Subversion and CruiseControl.

http://www.coderanch.com/t/446303/Ant-Maven-Other-Build-Tools/Setting-up-Cruise-Control-with

http://www.coderanch.com/t/446308/Ant-Maven-Other-Build-Tools/Integrating-simple-HelloWorld-project-with


BuildToolsFaq

JavaRanchContact us — Copyright © 1998-2014 Paul Wheaton