Saturday, May 12, 2012

Apache Continuum

This is aimed at installing and configuring Apache Continuum. The reason is that I already have some (awful and disgusting) experience with CruisControl. I ended up writing an Eclipse integration plug-in and a LOT of Ant scripting and I'm not very keen of repeating this experience. I also have had some experience with Hudson/Jenkins which was not that great (even though a LOT better than CruiseControl). Therefore I'm willing to take Continuum for a ride and see how it goes. Since I didn't documented the previous experiences I'm doing it for Continuum.

This documentation was tested with version 1.3.8(GA) available at http://continuum.apache.org/download.html and based on the official documentation available at http://continuum.apache.org/docs/1.3.8/

 

1. Get Apache Continuum (it is not distributed in RPM).

 

1.1. Get version 1.3.8 GA in bin.tar.gz from http://continuum.apache.org/download.html

#---
wget http://www.apache.org/dyn/closer.cgi/continuum/binaries/apache-continuum-1.3.8-bin.tar.gz
tar -vxzf apache-continuum-1.3.8-bin.tar.gz -C /opt/
#---


2. Get Java environment right:

 

2.1. Check your environment variables:

#---

env | grep JAVA_HOME
#---

 

2.2. Install Java (openjdk will do):

#---

yum -y install \
java-1.6.0-openjdk
#---


2.3. Check your Java version:

#---

java -version
#---


OpenJDK:
java version "1.6.0_24"
OpenJDK Runtime Environment (IcedTea6 1.11.1) (fedora-65.1.11.1.fc16-x86_64)
OpenJDK 64-Bit Server VM (build 20.0-b12, mixed mode)


Sun:
java version "1.6.0_31"
Java(TM) SE Runtime Environment (build 1.6.0_31-b04)
Java HotSpot(TM) 64-Bit Server VM (build 20.6-b01, mixed mode)

 

2.4. Set JAVA_HOME variable correctly:

 

2.4.1. For OpenJDK:

#--- 

cat >> /etc/environment <<__END__

JAVA_HOME=/usr/lib/jvm/jre-1.6.0-openjdk.x86_64
__END__
#---

 

2.4.2. For Sun's Java:

#---
cat >> /etc/environment <<__END__
JAVA_HOME=/usr/java/default/
__END__
#---


NOTE: It will take effect on the next login

3. Run Continuum for the first time to check it out:

#---

/opt/apache-continuum-1.3.8/bin/continuum start
#---


3.1. Track startup through its log file: /opt/apache-continuum-1.3.8/logs/continuum.log

#---

tail -f /opt/apache-continuum-1.3.8/logs/continuum.log
#---


NOTE: It should yield an exception complaining about security configurations:

org.apache.commons.configuration.ConfigurationException: Cannot locate configuration source ./conf/security.properties


3.2. It goes up nonetheless and you can open it: 3.3. Go through the admin setup and try to create a remote project.

http://localhost:8080/continuum/

My setup is the default (I didn't changed it)


4. Try it with a remote project. I chose the Continuum project (~15MB):

 

4.1. Go to Continuum and add two Maven 2 project: 

http://localhost:8080/continuum/

Add Project -> Maven 2.0.x Project

Parent (must be the first to be added):
http://svn.apache.org/repos/asf/continuum/parent/trunk/pom.xml
Continuum:
http://svn.apache.org/repos/asf/continuum/trunk/pom.xml


5. For local repositories you need to enable the file protocol. Check the procedures on the FAQ page:



URLs and instructions from:
http://continuum.apache.org/development/building.html

http://continuum.apache.org/faqs.html

Particularly at:
http://continuum.apache.org/faqs.html#can-i-use-file-protocol-in-add-project-view