A Brief History of Ant Ant is a

A Brief History of Ant Ant is a Jakarta project created in early 1998 by James Duncan Davidson, who also wrote the original Tomcat servlet container. Initially, Ant was written as a utility to build Tomcat. Others quickly saw the benefits of Ant over make, and it was moved to its own CVS project and officially became a separate Jakarta project in 2000. 16.4.2 Installing and Configuring Ant You can download Ant from the Jakarta web site at http://jakarta.apache.org/ant/. The examples provided in this chapter were tested with Ant 1.4, but they should be compatible with at least Ant 1.3. Download the binary zip file (for Windows) or the .tar.gz file (for Unix) and uncompress the archive into your desired installation directory. You should also download the 1.4.1 optional.jar file and install it in the ANT_HOME/lib directory. While it’s not used in this project, the optional.jar file has many extra tasks that you may find useful in the future. Ensure that the ANT_HOME/bin directory is added to your system PATH. Your installation may also require you to add the ANT_HOME environment variable, which should be set to the Ant installation directory. The Ant binary typically can determine what ANT_HOME should be, but if you get an error when trying to run Ant, set this environment variable. There is also a caveat when running Ant under Windows 95/98 do not install it in a directory with a long pathname, because the batch file used to run the installation script may not be able to handle the pathname. See the Ant installation documentation for more information. 16.4.3 Getting Started Ant reads its build commands from an XML file. By default, it looks for a file called build.xml, but you can give the file any name by using the -buildfile option when running Ant. From a command prompt, change directories to the base project directory, which in our example is called storefront. In here, you should see the build.xml file. The Ant build file consists of a project that has zero or more targets, each of which consists of zero or more tasks. The project element is defined at the top of the build file:
The project is named storefront and the default target to execute is the wartarget. The default target is what gets executed if you type ant at the command line without specifying a target. Because the project root directory is the same directory that the build.xml file is located in, “.” is used to indicate the base directory property. The build directory structure for the Storefront application is shown in Figure 16-3. Figure 16-3. The build structure for the Storefront application
From our experience, we can recommend PHP Web Hosting services, if you need affordable webhost to host and run your web application.

Leave a Reply