JavaBeat
calling cards | international calling cards | phone card
Ant Home Articles Tutorials Java Interview Questions & FAQs Java QnA Code Junction

1. Introduction

2. Ant Defined

3. Java Application with Ant

4. Sample build script

5. Common ant tasks

6. Summary

Building a Java application with Ant

An Ant build scripts is an XML document, typically named build.xml. This XML build script contains a single project that represents your application and a set of one or more targets that Ant will perform. A target may tell Ant to compile your source code or build a JAR file. Common build targets are shown in table 1.

Table 1. Common Build Targets

Target

Description

init

Initializes the build environment

compile

Compiles source code

dist

Create distribution files such as JAR and WAR files

clean

Clean up the build environment by deleting all compiled source code and distribution files

test (or tests)

Execute unit tests

Targets are hierarchical in the sense that one target can depend on the successful completion of other targets. For example, the "dist" target probably depends on the "compile" target, which in turn depends on the "init" target. After all, you really want your source code compiled before you build a JAR file that contains it.


Favorites
AffiliatedAds.com
Buy movies
Access Control
Busby seo challenge contest
Sohbet
Chat
Webmaster Hosting Forum
Java Jobs
MyVideoLib
India News
Internet Advances
Sohbet
chat
Latest QnA
SCJD Tips
When we start a thread by applying start() method on it ,how does it knows that to execute run()method?
About Wrapper class in Java
How to configure weblogic 7.0 in MyEclipse?
Static Block and Static Initializer in Java

JavaBeat Website (2004-2008), India
javabeat | about us | planetoss
Copyright (2004 - 2008), JavaBeat