If you’re running a Jenkins Continous Integration System as descriped in this guide, you most likely need Ant and/or Maven to build your applications.

The next two HowTos are about the installation of those tools and the required setup in Jenkins. As Maven requires Ant, we start with that. The guide about the installation of Maven can be found here.

You can find the current version of ant on any Apache Mirror near you.

Setup

First we have to download the current Ant version and put it into /opt/ant/current. Afterwards we can setup Jenkins to use this installation.

root@test:~# cd /opt
root@test:/opt# mkdir ant
root@test:/opt# cd ant/
root@test:/opt/ant# wget http://apache.openmirror.de//ant/binaries/apache-ant-1.8.2-bin.tar.gz
--2011-07-31 21:25:34--  http://apache.openmirror.de//ant/binaries/apache-ant-1.8.2-bin.tar.gz
Connecting to apache.openmirror.de|83.246.74.136|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 8324124 (7.9M) [application/x-gzip]
Saving to: `apache-ant-1.8.2-bin.tar.gz'

100%[==========================================================>] 8,324,124    668K/s   in 12s

2011-07-31 21:25:46 (679 KB/s) - `apache-ant-1.8.2-bin.tar.gz' saved [8324124/8324124]

root@test:/opt/ant# tar xvf apache-ant-1.8.2-bin.tar.gz
Decompressing 'apache-ant-1.8.2-bin.tar.gz' with '/usr/bin/gzcat'...
x apache-ant-1.8.2/bin/ant, 9997 bytes, 20 tape blocks
x apache-ant-1.8.2/bin/antRun, 861 bytes, 2 tape blocks
x apache-ant-1.8.2/bin/antRun.pl, 2199 bytes, 5 tape blocks
...

root@test:/opt/ant# ln -s apache-ant-1.8.2 current
root@test:/opt/ant# ln -s /opt/ant/current/bin/ant /opt/local/bin/
root@test:/opt/ant# rm apache-ant-1.8.2-bin.tar.gz

Jenkins Setup

To tell Jenkins which Ant installation should be used, you need to enter the Jenkins-Website and click on Manage Jenkins.

Jenkins02 300x129 Ant on OpenSolaris

Now enter Configure System and set the Ant settings according to this screenshot.
Jenkins03 Ant 300x83 Ant on OpenSolaris


Related Posts



Eine Antwort schreiben