APACHE ANT
Prerequisites:
Java should be install in the server.
Step 1: Update the Server
- ANT stands for another neat tools
- It is java based build tool from Apache Software Fundation
- Ant uses build.xml file
- Ant was created by james duncan davidson
Ant- Build Files:
- Ants build file is called build.xml should reside in base directory(base directory means where the source code will maintained) of the project
- In build.xml or any xml file it start with an xml tag project name and target a single project can have multiple targets
- There should be no blank lines or white spaces before the xml declaration
Installation:
We can install ANT in different ways, those are 1. Using "apt" command module
2. Using "distribution method"
Here, we will see both the ways how to install ANT.
Prerequisites:
Java should be install in the server.
Step 1: Update the Server
$ sudo apt update -y
Step 2: Install Java latest version, basically this command will install JAVA Runtime Environment
$ sudo apt install default-jre
Install Apache ANT in Ubuntu using "apt" command module
Step 3: Update the Server Install Ant
$ sudo apt update
$ sudo apt install ant -yTo verify the Ant installation$ ant -version
Install Apache Ant Using "Distribution Method"Step 1: Enter into the "opt" directory
$ cd /opt/
Step 2: Download the tar or zap source file from http://ant.apache.org/bindownload.cgi
$ sudo wget http://mirrors.estointernet.in/apache//ant/binaries/apache-ant-1.10.5-bin.zip
Step 3: Exatract the zip file or tar file
$ unzip apache-ant-1.10.5-bin.zip
Step 4: Add the ANT_HOME path.
$ sudo ANT_HOME=/opt/apache-ant-1.10.5
Step 5: Now export the PATH
$ sudo PATH=$PATH:${ANT_HOME}/bin
Step 6: Now enter into the apache-ant-1.10.5
$ cd apache-ant-1.10.5
Step 7: Now, Run the below command to start the "Build"
$ sudo ant -f fetch.xml -Ddest=system
No comments:
Post a Comment