From a78d1ddd4fd493742e9ef5fa4c52a4da7051c20a Mon Sep 17 00:00:00 2001
From: Steve Loughran
Date: Sun, 30 Apr 2006 22:41:33 +0000
Subject: [PATCH] edit doc to move from CVS to SVN, more stuff on IDE/app
server installs, more on how to install extra libraries.
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@398455 13f79535-47bb-0310-9956-ffa450edef68
---
docs/manual/install.html | 180 +++++++++++++++++++++++++++++----------
1 file changed, 134 insertions(+), 46 deletions(-)
diff --git a/docs/manual/install.html b/docs/manual/install.html
index 37950c11f..6d7e47fc0 100644
--- a/docs/manual/install.html
+++ b/docs/manual/install.html
@@ -13,22 +13,63 @@
The latest stable version of Ant is available from the Ant web page http://ant.apache.org/.
-If you like living on the edge, you can download the latest version from http://cvs.apache.org/builds/ant/nightly/.
-Source Edition
+As a binary in an RPM Package
+
+Consult the jpackage section below.
-If you prefer the source edition, you can download the source for the latest Ant release from http://ant.apache.org/srcdownload.cgi.
+
Bundled in IDEs
+
+ All the main Java IDEs ship with Ant, products such as Eclipse, NetBeans
+ and IntelliJ IDEA. If you install Ant this way you usually get the most recent
+ release of Ant at the time the IDE was released. Some of the IDEs (Eclipse
+ and NetBeans in particular) ship with extra tasks that only work if
+ IDE-specific tools are on Ant's path. To use these on command-line versions
+ of Ant, the relevant JARs need to be added to the command-line Ant as
+ extra libraries/tasks. Note that if it is an IDE task or extension that is
+ not behaving, the Ant team is unable to field bug reports. Try the IDE mailing
+ lists first, who will cross-file bugs if appropriate.
+
+
+ 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.
+
-Again, if you prefer the edge, you can access
-the code as it is being developed via CVS. The Jakarta website has details on
-accessing CVS. Please checkout the
-ant module.
+Bundled in Java applications
+
+
+ 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
+ diagnostics advice.
+
+
+Source Edition
+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.
+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".
+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
-
-Ant CVS repository on-line.
+
+Ant SVN repository on-line.
@@ -37,10 +78,10 @@ commercial flavours of Unix such as Solaris and HP-UX,
Windows 9x and NT, OS/2 Warp, Novell Netware 6, OpenVMS and MacOS X.
The platforms used most for development are, in no particular order,
Linux, MacOS X, Windows XP and Unix; these are therefore that platforms
-that work best.
+that tend to work best.
To build and use Ant, you must have a JAXP-compliant XML parser installed and
-available on your classpath.
+available on your classpath, such as Xerces.
The binary distribution of Ant includes the latest version of the
Apache Xerces2 XML parser.
@@ -50,8 +91,8 @@ for more information about JAXP.
If you wish to use a different JAXP-compliant parser, you should remove
xercesImpl.jar
and xml-apis.jar
from Ant's lib
directory.
-
-You can then either put the jars from your preferred parser into Ant's
+
+You can then either put the JARs of your preferred parser into Ant's
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.
@@ -60,7 +101,8 @@ 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.
+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.
Note #2: If a JDK is not present, only the JRE runtime, then many tasks will not work.
@@ -76,7 +118,6 @@ your system, version 1.2 or later.
+--- lib // contains Ant jars plus necessary dependencies
|
+--- docs // contains documentation
- | +--- ant2 // a brief description of ant2 requirements
| |
| +--- images // various logos for html documentation
| |
@@ -92,7 +133,7 @@ Only the bin
and lib
directories are
required to run Ant.
To install Ant, choose a directory and copy the distribution
-file there. This directory will be known as ANT_HOME.
+files there. This directory will be known as ANT_HOME.
@@ -133,8 +174,8 @@ version from jpackage.org:
- Add the
bin
directory to your path.
- Set the
ANT_HOME
environment variable to the
-directory where you installed Ant. On some operating systems the ant
-wrapper scripts can guess ANT_HOME
(Unix dialects and
+directory where you installed Ant. On some operating systems, Ant's
+startup scripts can guess ANT_HOME
(Unix dialects and
Windows NT/2000), but it is better to not rely on this behavior.
- Optionally, set the
JAVA_HOME
environment variable
(see the Advanced section below).
@@ -152,8 +193,33 @@ packaged together with the core Ant tasks.
The external libraries required by each of the optional tasks is detailed
in the Library Dependencies section. These external
-libraries may either be placed in Ant's lib directory, where they will be picked up
-automatically.
+libraries must be added to Ant's classpath, in any of the following ways
+
+
+ - In ANT_HOME/lib. This makes the JAR files available to all
+ Ant users and builds
+
+ -
+ In ${user.home}/.ant/lib . This is a new feature since Ant1.6,
+ and allows different users to add new libraries to Ant. All JAR files
+ added to this directory are available to command-line Ant.
+
+
+ -
+ On the command line with a
-lib
parameter. This lets
+ you add new JAR files on a case-by-case basis.
+
+
+ - In the CLASSPATH environment variable. Avoid this; it makes
+ the JAR files visible to all Java applications, and causes
+ no end of support calls.
+
+
+
+
+ IDEs have different ways of adding external JAR files and third-party tasks
+ to Ant. Usually it is done by some configuration dialog. Sometimes JAR files
+ added to a project are automatically added to ant's classpath.
@@ -184,14 +250,15 @@ not needed for the correct operation of the CLASSPATH environment variable, even
if a DOS directory is to be added to the path.
- You can stop Ant using the CLASSPATH environment variable by setting the
-
-noclasspath
option on the command line.
+-noclasspath
option on the command line. This is an easy way
+to test for classpath-related problems.
The usual symptom of CLASSPATH problems is that ant will not run with some error
-about not being able to find org.apache.tools.Ant.main, or, if you have got the
+about not being able to find org.apache.tools.Ant.main
, or, if you have got the
quotes/backslashes wrong, some very weird Java startup error. To see if this is
the case, run ant -noclasspath
or unset the CLASSPATH environment
variable.
@@ -212,7 +279,7 @@ this.
When you run Ant on Java1.5, it tries to use the automatic proxy setup
mechanism. If this works -and it is a big if, as we see little evidence of it
-doing so on Linux or WinXP, then your proxy is set up without you doing
+doing so on Linux or WinXP-, then your proxy is set up without you doing
anything. You can disable this feature with the -noproxy
option.
@@ -240,7 +307,7 @@ defaults.
The Ant team acknowledges that this is unsatisfactory. Until the JVM
automatic proxy setup works properly everywhere, explicit JVM options via
-ANT_ARGS are probably the best solution. Note that setting properties on Ant's
+ANT_ARGS are probably the best solution. Setting properties on Ant's
command line do not work, because those are Ant properties being set, not
JVM options. This means the following does not set up the command line:
@@ -248,7 +315,9 @@ JVM options. This means the following does not set up the command line:
ant -Dhttp.proxyHost=proxy -Dhttp.proxyPort=81
- All it does is set up two Ant properties.
One other troublespot with
+
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
here, and as it is very hard to remotely diagnose, test and fix proxy-related
problems, users who work behind a secure proxy will have to spend much time
@@ -279,7 +348,7 @@ Having a symbolic link set up to point to the JVM/JSK version makes updates more
RPM version from jpackage.org
-The JPackage project distributes an RPM version of Ant.
+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. The ANT_HOME
environment variable will
@@ -301,9 +370,11 @@ support:
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
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
+libraries with non-jpacakge stuff in the same folder.
+More information on where Ant finds its libraries is available
here
-
Download a non-jpackage binary distribution from the regular Apache Ant site
+Download a non-jpackage binary distribution from the regular
+ Apache Ant site
Unzip or untar the distribution into a temporary directory
Copy the linking jar, in this case ant-starteam.jar
, into the library directory you
chose in step 1 above.
@@ -345,7 +416,7 @@ at the source for your platform's invocation script for details.
To build Ant from source, you can either install the Ant source distribution
-or checkout the ant module from CVS.
+or checkout the ant module from SVN.
Once you have installed the source, change into the installation
directory.
@@ -359,21 +430,21 @@ compiler like Sun's javac or jikes. It does not work with gcj or
kjc.
Make sure you have downloaded any auxiliary jars required to
-build tasks you are interested in. These should either be available
-on the CLASSPATH or added to the lib/optional
+build tasks you are interested in. These should be
+added to the lib/optional
directory of the source tree.
See Library Dependencies
-for a list of jar requirements for various features.
-Note that this will make the auxiliary jars
+for a list of JAR requirements for various features.
+Note that this will make the auxiliary JAR
available for the building of Ant only. For running Ant you will
still need to
-make the jars available as described under
+make the JARs available as described under
Installing Ant.
Your are now ready to build Ant:
build -Ddist.dir=<directory_to_contain_Ant_distribution> dist
(Windows)
- build.sh -Ddist.dir=<directory_to_contain_Ant_distribution> dist
(Unix)
+ sh build.sh -Ddist.dir=<directory_to_contain_Ant_distribution> dist
(Unix)
This will create a binary distribution of Ant in the directory you specified.
@@ -388,6 +459,13 @@ used for the remainder of the build steps.
Invokes the bootstrapped Ant with the parameters passed to the build script. In
this case, these parameters define an Ant property value and specify the "dist" target
in Ant's own build.xml
file.
+
+Create the ant.jar and ant-launcher.jar JAR files
+
+Create optional JARs for which the build had the relevant libraries. If
+a particular library is missing from ANT_HOME/lib/optional, then the matching
+ant- JAR file will not be created. For example, ant-junit.jar is only built
+if there is a junit.jar in the optional directory.
On most occasions you will not need to explicitly bootstrap Ant since the build
@@ -400,13 +478,13 @@ If you wish to install the build into the current ANT_HOME
directory, you can use:
build install
(Windows)
- build.sh install
(Unix)
+ sh build.sh install
(Unix)
You can avoid the lengthy Javadoc step, if desired, with:
build install-lite
(Windows)
- build.sh install-lite
(Unix)
+ sh build.sh install-lite
(Unix)
This will only install the bin
and lib
directories.
Both the install
and
@@ -421,7 +499,7 @@ indicated feature. Note that only one of the regexp libraries is
needed for use with the mappers
(and Java 1.4 and higher includes a regexp implementation which
Ant will find automatically).
-You will also need to install the
+You will also need to install the particular
Ant optional jar containing the task definitions to make these
tasks available. Please refer to the
Installing Ant / Optional Tasks section above.
@@ -530,7 +608,7 @@ you need jakarta-oro 2.0.1 or later, and commons-net<
BeanShell JAR(s) |
BeanShell with script task.
- Note: Ant 1.6 and later require BeanShell version 1.3 or
+ Note: Ant requires BeanShell version 1.3 or
later |
http://www.beanshell.org/ |
@@ -586,7 +664,7 @@ you need jakarta-oro 2.0.1 or later, and commons-net<
Support for SMTP over TLS/SSL
in the Mail task
-Already included in jdk 1.4 |
+Already included Java 1.4+
http://java.sun.com/products/jsse/ |
@@ -633,6 +711,8 @@ code will check and print the following things.
+- Where Ant is running from. Sometimes you can be surprised.
+
- The version of ant.jar and of the ant-*.jar containing the optional tasks -
and whether they match
@@ -658,20 +738,28 @@ your location, then dependency logic may get confused.
-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.
+ 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.
If you cannot get Ant installed or working, the Ant user mailing list is the
best place to start with any problem. Please do your homework first, make sure
-that it is not a CLASSPATH problem, and run a diagnostics check to see what Ant thinks of its own
-state. Why the user list, and not the developer list? Because there are more users than developers, so more people who can help you.
+that it is not a CLASSPATH problem, and run a diagnostics check to see what Ant thinks of its own
+state. Why the user list, and not the developer list?
+Because there are more users than developers, so more people who can help you.