• Skip to main content
  • Skip to secondary menu
  • Skip to primary sidebar
Online Java Training-Online Java Tutor-Private Java Classes

Online Java Training-Online Java Tutor-Private Java Classes

Personal Online Java Training through Skype

  • Home
  • Courses
  • Tutorials
    • Java
    • Servlets
    • Struts
    • Spring
    • Webservice
  • FAQ
  • Testimonials
  • Blog
  • Contact Us

Ant Java Build Tool

Ant is a Java build tool. It is an open source program designed to help develop, and build big programs by automating the work tasks of compiling code, running tests, and Packaging the results for redistribution.

It is written completely in Java there by it is platform independent, easy to use, extensible, and scalable. It can be used in a small personal project, or it can be used in a large, project. It automates the entire build process.

In Ant build files are used to describe how to build a project. In the build file

developers list the high-level goals called the targets and actions to take to achieve each goal called the tasks. Each project contains multiple targets. Targets can depend on other targets. Targets contain tasks and Tasks do the work

Working with ANT

First ANT has to be downloaded and installed in the developers machine. Then the Path of the computer should be set to point to the bin directory of ANT. An environment variable called ANT_HOME should also be made in the System variables pointing to the installation directory of ANT.

A build.xml file should be created that will contain several targets that will further contain different tasks.

1) Target containing Tasks for creating build/classes directory to contain compiled files and creating a dist folder to contain the jar or war file of the project.

2) A Target to compile the java files in the source folder and put it into the build/classes folder.

3) A Target that will package the project to a jar or war file.

4) A Target to create the java docs of the project.

5) A Target to run all the tests on the project.

6) A Target to run the class file containing the main method.

After following the steps the user can simply type ant on the command line and ANT will read the “build.xml” and execute all the targets.

Some of the very important benefits of ANT are as follows:

Ant is free and Open Source. Ant makes it easy to bring developers into a project. It is widely supported. It integrates testing into the build processes and enables continuous integration. It runs inside Integrated Development Environments

Filed Under: Java

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

Mr Chinmay

Chinmay Patel

Phone & Whatsapp +919853166385
[email protected]
Skype id: p.chinmay

Recent Posts

  • How to Learn Java in One day ? | JavaTutorOnline
  • Simple Jsp Servlet Jdbc User Registration using Tomcat Mysql and Eclipse
  • How to learn Java Programming Language the Best way ? | JavaTutorOnline
  • Recursion in Java Example Program | Understanding Java Recursion
  • Important Core Java Interview Questions and Answers
  • How to Create Threads in Java | Multithreading in Java | JavaTutorOnline
  • Why Multiple Inheritance in Java not supported?
  • A Simple Spring Mvc Hello World Example | Spring Mvc Tutorial
  • How to become a good Teacher |Ideal Teacher | Perfect Teacher
  • OGNL in Struts 2 Tutorial | JavaTutorOnline
Copyright © 2022 JavaTutorOnline