Quantcast
Channel: Eureka! » Ant
Viewing all articles
Browse latest Browse all 26

Jenkins – Setup a simple Ant build project

$
0
0

Jenkins, previously named as Hudson, is a continuous integration tool just like CruiseControl. It has been almost 4 years since i started learning Maven which made me fall in love about best practice. Deployment and testing automation is really fun and finally i got a chance to play it again.

In this article, i would show you how to setup a simple Ant build project in Jenkins. Before we start, please refer to the simple Java project example in the post below.

 

1. Download and install Jenkins.

2. After the installation, you should be able to visit the Jenkins home page by visiting http://localhost:8080/.
jenkins-simple-ant-build-project-1
 

3. Configure Jenkins by clicking Manage Jenkins on the left sidebar and the go to the Configure System page.
jenkins-simple-ant-build-project-2
 

4. Setup at least one JDK installation and one Ant installation as well.
jenkins-simple-ant-build-project-3
 

5. Now we are ready to move on. On the left menu, add a new job and call it com-eureka. As we are working on a simple Ant build project, select Build a free-style software project.
jenkins-simple-ant-build-project-4
 

6. After the job is created, you will be on the job configuration page.
jenkins-simple-ant-build-project-5
 

7. Add a new Build step and select Invoke Ant.
jenkins-simple-ant-build-project-6
 

8. Select the Ant version which we have already configured it on the Configure System page. We could leave the target blank so it will run the default main target defined in the build.xml.
jenkins-simple-ant-build-project-7
 

9. Go the the job directory which is C:\Program Files (x86)\Jenkins\jobs\com-eureka in this example. Create a folder name called workspace.
jenkins-simple-ant-build-project-8
 

10. Now copy all the source code to this workspace folder.
jenkins-simple-ant-build-project-9
 

11. Now go to the com-eureka job index page and click Build Now.
jenkins-simple-ant-build-project-10
 

12. After the build, click the build details and you can also refer to the console output and check if there is any errors on the build script.

Done =)

Reference: Jenkins


Filed under: Ant, Java, Jenkins Tagged: Ant, Continuous Integration, CruiseControl, Java, Jenkins, Maven

Viewing all articles
Browse latest Browse all 26

Trending Articles