HomeHome  FAQFAQ  SearchSearch  RegisterRegister  MemberlistMemberlist  UsergroupsUsergroups  Log in  

Share | 


Go down 


Number of posts : 29
Age : 34
Registration date : 2007-03-04

PostSubject: ANT   Thu Mar 08, 2007 4:35 pm

Automate your build process using Java and Ant

Introducing the powerful XML-based scripting tool,

defined process is one of the most necessary but often least-used tools in software development. It is by nature an overhead task that accompanies a development effort. A defined build process ensures that the software in your development project is built in the exact same manner each time a build is executed. As the build process becomes more complex -- for example, with EJB builds or additional tasks -- it becomes more necessary to achieve such standardization. You should establish, document, and automate the exact series of steps as much as possible.

Why do I need a defined build process?
A defined build process is an essential part of any development cycle because it helps close the gap between the development, integration, test, and production environments. A build process alone will speed the migration of software from one environment to another. It also removes many issues related to compilation, classpath, or properties that cost many projects time and money.

What is Ant?
Ant is a platform-independent scripting tool that lets you construct your build scripts in much the same fashion as the "make" tool in C or C++. You can use a large number of built-in tasks in Ant without any customization. Some of the most important tasks are shown in the following table but explained in more detail in the example that follows.
Here are some useful commands that are built in the Ant distribution.


Used to execute another ant process from within the current one.

Used to copy an entire directory.

Used to copy a single file.

Handles packages/modules retrieved from a CVS repository.

Deletes either a single file or all files in a specified directory and its sub-directories.

Deletes a directory with all its files and subdirectories.

Executes a system command. When the os attribute is specified, then the command is only executed when Ant is run on one of the specified operating systems.

Gets a file from an URL.

Jars a set of files.

Executes a Java class within the running (Ant) VM or forks another VM if specified.

Compiles a source tree within the running (Ant) VM.

Generates code documentation using the javadoc tool.

Makes a directory.

Sets a property (by name and value), or set of properties (from file or resource) in the project.

Runs the rmic compiler for a certain class.

Sets the DSTAMP, TSTAMP, and TODAY properties in the current project.

Processes a set of documents via XSLT.
Back to top Go down
View user profile http://sojanctherakom.googlepages.com
Back to top 
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
 :: Programming Languages :: JAVA-
Jump to: