Saturday, November 5, 2011
Ant The Build Tool
A 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
If you are developing Java-based Web applications and you're still manually building and dragging and dropping files from one place to another, now is a good time to consider automating. Ant is an open source Java-based build tool that is available from the Apache Jakarta Project Web site. Ant differs from other build tools in several ways.
Since Ant is not OS dependent, you can develop one standard build file for your projects and then re-use this code for any similar projects, regardless of the platform. Because the tool is not married to any one platform, you can capitalize on the "write once, run anywhere" philosophy.
Ant is free and open source build tool, written in Java, helps in automating the entire build process of a Java development project.
Ant uses XML build files.
By default, Ant looks for a build file named build.xml.
The build file contains information about how to build a particular project.
Each project contains multiple targets like creating directory, compiling source codes.
Target can depend on other targets.
Targets contain tasks.
Behind each task is a Java class that performs the described work.
