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
Jenkins dashboard > manage jenkins > tool>
Search for ANT
add credentials
opt/apache-ant-1.10.12
apply + save.
STEP 3: Build
Jenkins dashboard > new item > freestyle-project + ok
Add description > Add SCM
https://github.com/prakashk0301/Ant-WebProject
build step > add steps build > invoke ANT
select Ant version > target = init > apply + save > build
Click on console output
done.
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