Ant-build Tool

Ant is a Java library and a software tool used to automate software build processes such as compiling, running, testing and assembling Java application

HOW TO BUILD WITH ANT TOOL

STEPS:

STEP 1: Add variables and packages on the server

Step 1.1:

cd /opt/ 
sudo wget https://dlcdn.apache.org//ant/binaries/apache-ant-1.10.12-bin.tar.gz

Step 1.2: unzip ant package

ls
sudo tar -xvzf apache-ant-1.10.12-bin.tar.gz
ll
cd apache-ant-1.10.12
pwd

Step 1.3: set a path

export ANT_HOME=/opt/apache-ant-1.10.12
export PATH=$PATH:$ANT_HOME/bin
echo $ANT_HOME

We just extract the ANT file and set the path of the variable, whenever its called echo $ANT_HOME it's going /opt/apache-ant-1.10.12 here.

STEP 2: configure ANT in jenkins

  1. Jenkins dashboard > manage jenkins > tool>

  2. Search for ANT

  3. add credentials

opt/apache-ant-1.10.12

apply + save.

STEP 3: Build

  1. Jenkins dashboard > new item > freestyle-project + ok

  2. Add description > Add SCM

      https://github.com/prakashk0301/Ant-WebProject
    
    1. build step > add steps build > invoke ANT

  3. select Ant version > target = init > apply + save > build

    Click on console output

done.

0
Subscribe to my newsletter

Read articles from Rizwan Ahmad Khan directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Rizwan Ahmad Khan
Rizwan Ahmad Khan