Ant build file

Ant build file: Apache ant uses an xml file for the configuration. Default name is build.xml and should be put into the project base directory. Commonly used elements of ant build file: 1. Project: It is the root element of the build.xml file. A project element has the following attributes: a. name: It specifies the … Read more

Categories Ant

Ant overview

What is build tool? A build tool is utility program to automate the process of repetitive tasks like compiling source code and creating files etc. A build tool can be executed from the command line. Note: Apache Ant, Maven and Gradle are the commonly used building tools in java. Why build tools are used? Build … Read more

Categories Ant

how to run ant script from eclipse?

To run ant script from eclipse: 1. Right click on the build.xml 2. Click on Run As. 3. Click on Ant Build.   Previous Topic: How to run junit test case using ant with example?  

Categories Ant

How to run junit test case using ant?

JUnit: JUnit is an open-source unit testing framework for java programmers. It is only used for unit testing. Integration testing is done by TestNG. How to run junit test case using ant? As we discussed all basic concepts of Apache ant, let us see the below example to run junit test case using ant. Example … Read more

Categories Ant

How to create war file using ant?

What is war file? WAR stands for Web application Archive. WAR is a compressed file format like the ZIP file which includes jsp, servlet, jar and static web resources etc in a specific hierarchical directory structure called WEB-INF. It is like jar file but follow a specific hierarchical directory structure. WAR files are deployed to … Read more

Categories Ant

How to create jar file using ant?

What is JAR file? JAR stands for the Java ARchive. Before discussing on JAR files let us discuss about ZIP file first. A ZIP file is file format which can store one or more files in the compressed format. ZIP files are most commonly used formats. JAR is also a compressed file format which normally … Read more

Categories Ant

How to use classpath in ant?

Ant provides the facility to create the classpath container which can be used later in a task. Let us understand it with the below example. In below example, we set classpath to “build.classpath” using path element. This classpath is used in the javac task of the compile target. In build.xml file: 1. src.dir: It specify … Read more

Categories Ant

how to create java document using ant in eclipse?

As we discussed all basic concepts of Apache ant, let us see the below example to create java project document using ant. In build.xml file: 1. src.dir: It specify the project source folder. 2. build.dir: It specify the project compilation output folder. 3. docs.dir: It specify the project document output folder. Example explanation: When we … Read more

Categories Ant

how to build java project using ant in eclipse?

As we discussed all basic concepts of Apache ant, let us see the below example to build java project using ant. In build.xml file: 1. src.dir: It specify the project source folder. 2. build.dir: It specify the project compilation output folder. Example explanation: When we run the build.xml file, control first go on the project … Read more

Categories Ant