Apache Ant is a Java-based build tool. In theory, it is kind of likemake, without make's wrinkles.
Why?
Why another build tool when there is alreadymake,gnumake,nmake,jam,andothers? Because all those tools have limitations that Ant's original authorcouldn't live with when developing software across multiple platforms.Make-liketools are inherently shell-based: they evaluate a set of dependencies,then execute commands not unlike what you would issue on a shell.This means that youcan easily extend these tools by using or writing any program for the OS thatyou are working on; however, this also means that you limit yourself to the OS,or at least the OS type, such as Unix, that you are working on.
Makefiles are inherently evil as well. Anybody who has worked on them for anytime has run into the dreaded tab problem. "Is my command not executingbecause I have a space in front of my tab?!!" said the original author ofAnt way too many times. Tools like Jam took care of this to a great degree, butstill have yet another format to use and remember.
Ant is different. Instead of a model where it is extended with shell-basedcommands, Ant is extended using Java classes. Instead of writing shell commands,the configuration files are XML-based, calling out a target tree where varioustasks get executed. Each task is run by an object that implements a particularTask interface.
Granted, this removes some of the expressive power that is inherent in beingable to construct a shell command such as`find . -name foo -exec rm {}`, but itgives you the ability to be cross-platform--to work anywhere andeverywhere. Andhey, if you really need to execute a shell command, Ant has an<exec> task thatallows different commands to be executed based on the OS it is executingon.
Writing Tasks A step by step tutorial for writing tasks.
Tasks using Properties, Filesets & Paths How to get and set properties and how to use nested filesets and paths while writing tasks. Finally it explains how to contribute tasks to Ant.
If things do not work, especially simple things like ant -version, then something is wrong with your configuration. Before filing bug reports and emailing all the Apache Ant mailing lists
Check your environment variables. Are ANT_HOME and JAVA_HOME correct? If they have quotes or trailing slashes, remove them.
Unset CLASSPATH; if that is wrong things go horribly wrong. Ant does not need the CLASSPATH variable defined to anything to work.
Make sure there are no versions of crimson.jar or other XML parsers in JRE/ext
Is your path correct? is Ant on it? What about JDK/bin? have you tested this? If you are using Jikes, is it on the path? A createProcess error (especially with ID=2 on windows) usually means executable not found on the path.
Which version of ant are you running? Other applications distribute a copy -it may be being picked up by accident.
If a task is failing to run is optional.jar in ANT_HOME/lib? Are there any libraries which it depends on missing?
If a task doesn't do what you expect, run ant -verbose or ant -debug to see what is happening
If you can't fix your problem, start with the Ant User Mailing List . These are other ant users who will help you learn to use ant. If they cannot fix it then someone may suggest filing a bug report, which will escalate the issue. Remember of course, that support, like all open source development tasks, is voluntary. If you haven't invested time in helping yourself by following the steps above, it is unlikely that anyone will invest the time in helping you.
Also, if you don't understand something, the Ant User Mailing List is the place to ask questions. Not the developer list, nor the individuals whose names appears in the source and documentation. If they answered all such emails, nobody would have any time to improve ant.
JDEE (Java Development Environment for Emacs) has built-in text ANT integration: selection of target through text field, execution, hyperlink to compilation errors. Installation: built-in JDEE 2.2.8 or later. Configuration: through customize menu "Jde Build Function"
IDEA has built-in GUI ANT integration: GUI selection of targets, execution, hyperlink to compilation errors
NetBeans NetBeans IDE uses Ant as the basis for its project system starting with the 4.0 release.
jEdit jEdit is an open source java IDE with some great plugins for Java dev, a good XML editor and the Antfarm plugin to execute targets in a build file.
Eclipse Eclipse is IBM's counterpoint to NetBeans; an open source IDE with Java and Ant support.
Virtual Ant GUI allows you to work on a Virtual File System without dealing with the XML. Plugs into Eclipse, Netbeans & Intellij.
JBuilder 9 Personal (pdf) JBuilder supports Ant with the following features. Add Ant nodes to projects and execute Ant targets from within JBuilder. Add custom Ant-based build tasks with custom Ant libraries to run Ant from within JBuilder. Rapid navigation from Ant build error messages to source files. Customize build menu and toolbar with custom build targets.
Tags: Table of Contents, Apache Ant API, 472, Apache Ant User Manual Daftar Isi Introduction Installing Apache Ant Using Apache Ant Running Apache Ant Apache Ant Tasks Concepts and Types Loggers, Listeners Developing with Apache Ant Tutorials Apache Ant API Hierarchy For All Packages (Overview Tree) Deprecated API Index All (A Z) A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z addC, add, Table of Contents, Bahasa Indonesia, Contoh Instruksi, Tutorial, Referensi, Buku, Petunjuk manual online, pts-ptn.net