From efac752f43f8f47c955cc08b2cca77b5cacd9770 Mon Sep 17 00:00:00 2001
From: Jan Materne
IDE's can invariably be pointed at different Ant installations. This lets - developers upgrade to a new release of Ant, and eliminate inconsistencies - between command-line and IDE Ant. + developers upgrade to a new release of Ant, and eliminate inconsistencies + between command-line and IDE Ant.
- Many Java applications, most particularly application servers, ship with + Many Java applications, most particularly application servers, ship with a version of Ant. These are primarily for internal use by the application, using the Java APIs to delegate tasks such as JSP page compilation to the Ant runtime. Such distributions are usually unsupported by everyone. Particularly troublesome are those products that non only ship with their own Ant release, - they add their own version of ANT.BAT or ant.sh to the PATH. If Ant starts - behaving wierdly after installing something, try the + they add their own version of ANT.BAT or ant.sh to the PATH. If Ant starts + behaving wierdly after installing something, try the diagnostics advice.
If you prefer the source edition, you can download the source for the latest -Ant release from +
If you prefer the source edition, you can download the source for the latest +Ant release from http://ant.apache.org/srcdownload.cgi. If you prefer the leading-edge code, you can access the code as it is being developed via SVN. The Ant website has details on -accessing SVN. +accessing SVN. All bug fixes will go in against the HEAD of the source tree, and the first -response to many bugreps will be "have you tried the latest version". +response to many bugreps will be "have you tried the latest version". Don't be afraid to download and build a prererelease edition, as everything other than new features are usually stable.
-
-
+
+
See the section Building Ant on how to
build Ant from the source code.
You can also access the
@@ -109,7 +109,7 @@ If you wish to use a different JAXP-compliant parser, you should remove
from Ant's lib
directory.
You can then either put the JARs of your preferred parser into Ant's
-lib
directory or put the jars on the system classpath.
+lib
directory or put the jars on the system classpath.
Some parts of Ant will fail if you use an old parser, especially one
that is not namespace-aware. In particular, avoid the Crimson parser.
For the current version of Ant, you will also need a JDK installed on -your system, version 1.2 or later required, 1.5 or later strongly recommended. +your system, version 1.2 or later required, 1.5 or later strongly recommended. The later the version of Java , the more Ant tasks you get.
@@ -128,8 +128,8 @@ The later the version of Java , the more Ant tasks you get.
The Ant team strongly supports users running Ant on Kaffe and other open source Java runtimes, and so strives to have a product that works - well on those platforms. What appears to work well is Kaffe with - Gnu Classpath and the Xerces and Xalan libraries. + well on those platforms. What appears to work well is Kaffe with + Gnu Classpath and the Xerces and Xalan libraries.
Before you can run Ant there is some additional set up you -will need to do unless you are installing the RPM +will need to do unless you are installing the RPM version from jpackage.org:
bin
directory to your path.The external libraries required by each of the optional tasks is detailed in the Library Dependencies section. These external -libraries must be added to Ant's classpath, in any of the following ways +libraries must be added to Ant's classpath, in any of the following ways
-lib
parameter. This lets
you add new JAR files on a case-by-case basis.
-noproxy
option.
+When you run Ant on Java1.5, you could try to use the automatic proxy setup
+mechanism with -autoproxy
.
ant -Dhttp.proxyHost=proxy -Dhttp.proxyPort=81-
All it does is set up two Ant properties.
+All it does is set up two Ant properties.
One other troublespot with proxies is with authenticating proxies. Ant cannot go beyond what the JVM does @@ -390,8 +388,8 @@ Having a symbolic link set up to point to the JVM/JSK version makes updates more
-The JPackage project distributes an RPM version of Ant.
-With this version, it is not necessary to set JAVA_HOME
or
+The JPackage project distributes an RPM version of Ant.
+With this version, it is not necessary to set JAVA_HOME
or
ANT_HOME
environment variables and the RPM installer will correctly
place the Ant executable on your path.
Optional jars for the JPackage version are handled in two ways. The easiest, and
-best way is to get these external libraries from JPackage if JPackage has them
-available. (Note: for each such library, you will have to get both the external
-package itself (e.g. oro-2.0.8-2jpp.noarch.rpm
) and the small library that links
+best way is to get these external libraries from JPackage if JPackage has them
+available. (Note: for each such library, you will have to get both the external
+package itself (e.g. oro-2.0.8-2jpp.noarch.rpm
) and the small library that links
ant and the external package (e.g. ant-apache-oro-1.6.2-3jpp.noarch.rpm
).
However, JPackage does not package proprietary software, and since some of the -optional packages depend on proprietary jars, they must be handled as follows. +optional packages depend on proprietary jars, they must be handled as follows. This may violate the spirit of JPackage, but it is necessary if you need these proprietary packages. -For example, suppose you want to install support for starteam, which jpackage does not +For example, suppose you want to install support for starteam, which jpackage does not support:
$ANT_HOME/lib
,
+$ANT_HOME/lib
,
which, for JPackage is usually /usr/share/ant/lib
. Another, less messy option
-is to create an .ant/lib
subdirectory of your home directory and place your
+is to create an .ant/lib
subdirectory of your home directory and place your
non-jpackage ant jars there, thereby avoiding mixing jpackage
libraries with non-jpacakge stuff in the same folder.
-More information on where Ant finds its libraries is available
+More information on where Ant finds its libraries is available
hereant-starteam.jar
, into the library directory you
+ant-starteam.jar
, into the library directory you
chose in step 1 above.build.xml
file.On most occasions you will not need to explicitly bootstrap Ant since the build
@@ -540,7 +538,7 @@ the current Ant version in ANT_HOME
.
The following libraries are needed in Ant's classpath +
The following libraries are needed in Ant's classpath if you are using the indicated feature. Note that only one of the regexp libraries is needed for use with the mappers @@ -701,7 +699,7 @@ you need jakarta-oro 2.0.8 or later, and commons-net<
- Running ant -diagnostics
is a good way to check that ant is
- installed. It is also a first step towards self-diagnosis of any problem.
- Any configuration problem reported to the user mailing list will probably
- result ins someone asking you to run the command and show the results, so
+ Running ant -diagnostics
is a good way to check that ant is
+ installed. It is also a first step towards self-diagnosis of any problem.
+ Any configuration problem reported to the user mailing list will probably
+ result ins someone asking you to run the command and show the results, so
save time by using it yourself.
- For under-IDE diagostics, use the <diagnostics> task to run the same - tests as an ant task. This can be added to a diagnostics target in a build - file to see what tasks are available under the IDE, what the XML parser and - classpath is, etc. + For under-IDE diagostics, use the <diagnostics> task to run the same + tests as an ant task. This can be added to a diagnostics target in a build + file to see what tasks are available under the IDE, what the XML parser and + classpath is, etc.
@@ -842,4 +840,4 @@ advised to do it by the user mailing list.