ANT Installation Process


What is ANT?
Ant (Another Neat Tool) is a Java tool that performs tasks based on XML instructions.

What are the types of files involved in ANT usage?
To use ANT we need to be aware of 3 types of Files.
a. build.xml file
b. build. Properties
c. Package.xml file

~> "build.xml " file contains tasks that we might want Ant to perform for our project.
~> "build.properties" file contains org credentials.
~> "Package.xml" file contains metadata details. For all supported Metadata types, CLICK HERE
CLICK HERE for sample package.xml file.

ANT Setup:

ANT setup is just 6 steps process. Below are the steps to follow to set up and use ANT.

STEP 1: Install Java (CLICK HERE)

STEP 2: Install ANT  (CLICK HERE) 

Note: You will see 4 different file formats, among these you need to choose only ".zip archive" and download the latest version.

a) ".zip archive"
b) ".tar.gz archive"
c)  ".tar.bz2 archive"
d) ".tar.xz archive"

STEP 3:  Unzip the  ".zip archive" file which you downloaded in step-2.

STEP 4: Login to your Salesforce org
Setup => in the "Quick find/Quick search" type => Tools => Click on "Lightning Platform Tools and Toolkits"
=> Click on "Ant Migration Tool"

=>Logout from the Salesforce org and Click on "Download the .zip file of the Winter '19 Ant Migration Tool"
=> From the above step, it will download a zip file, open that Zip file and copy "ant-salesforce.jar" file and paste it in "Lib" folder of ANT (which you downloaded in Step-2). Also, from the same zip file, we will get sample "build.xml" and "build.properties" files under folder name "Samples".


STEP 5: Create Environment variables (we will create all the variables under System variables)
Follow the below images

a. Environment variable: Path

b. Environment variable: JAVA_HOME

c. Environment variable: ANT_HOME

STEP 6:
From Step 1, you will install JDK. Now go to lib folder in JDK and search for "tools.jar", copy this file. Goto JRE=>Lib folder and paste the "tools.jar" file.

Now, open command prompt and just type "ant -version" if there is no issue then out will display like below

Installation is now complete, it's time to play with the ANT.

tHiNk gooD and dO thE bEsT.........MANJU NATH 🌝

Comments

  1. @Manjunath, "Package.xml" is case sensitive. and it should be "package.xml".

    ReplyDelete
    Replies
    1. We can give any name to package.xml file. For example, pkg.xml is also valid.

      Delete

Post a Comment