Jenkins Ant Job Configuration

Ant is a build tool. Ant tasks like build and deployment that include -Compiling the code, Packaging the binaries, Deploying the binaries to the test server, Testing the changes, Copying the code from one location to another. Ant uses build.xml to describe the build process and its dependencies

You can find more details about Apache Ant Here


1. Prerequisites

  • Start the Jenkins java -jar jenkins.war and open the homepage localhost:8080 for example
  • Go to Manage Jenkins →Manage Plugins → Add Ant Plugin & Enable it


  • Go to Manage Jenkins →Global Tool Configuration→ Add JDK & Ant


Now we are ready to move on



2. Steps to create Ant Build Job in Jenkins

1.Select New Item on the left side menu


2.Choose Free Style Project& provide item name then click on OK


3.Next window it will show the Job properties. On the General tab →Advanced []Check Custom workspace & provide project root directory location details then APPLY


4.On the Build Triggers tab →Add Build Step →Invoke Ant


5.Provide following details & Apply


6.Now we setup everything. Just click on Build Now. We can check the status of the build by clicking Status



7.we can see the Console output by clicking Console Output menu item