diff --git a/docs/manual/install.html b/docs/manual/install.html index 342a4665a..cf029e2d5 100644 --- a/docs/manual/install.html +++ b/docs/manual/install.html @@ -34,7 +34,10 @@ Ant CVS repository on-line.
To build and use Ant, you must have a JAXP-compliant XML parser installed and available on your classpath.
@@ -49,13 +52,15 @@ If you wish to use a different JAXP-compliant parser, you should remove from Ant'slib
directory.
You can then either put the jars from 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.
+
+Tip: "ant -diagnostics" will list the XML parser used and its location.
For the current version of Ant, you will also need a JDK installed on your system, version 1.2 or later. -
-Note: The Microsoft JVM/JDK is not supported.
Note #2: If a JDK is not present, only the JRE runtime, then many tasks will not work. @@ -65,6 +70,7 @@ your system, version 1.2 or later.
The binary distribution of Ant consists of the following directory layout:
ant + +--- README, LICENSE, fetch.xml, other text files. //basic information +--- bin // contains launcher scripts | +--- lib // contains Ant jars plus necessary dependencies @@ -121,7 +127,7 @@ installed in a short, 8.3 path, such as C:\Ant.Setup
-Before you can run ant there is some additional set up you +Before you can run Ant there is some additional set up you will need to do unless you are installing the RPM version from jpackage.org:
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, or made available on the system CLASSPATH environment variable. +automatically. +
+ ++ +The CLASSPATH environment variable is a source of many Ant support queries. As +the round trip time for diagnosis on the Ant user mailing list can be slow, and +because filing bug reports complaining about 'ant.bat' not working will be +rejected by the developers as WORKSFORME "this is a configuration problem, not a +bug", you can save yourself a lot of time and frustration by following some +simple steps. + +
+-noclasspath
option on the command line.
+
+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
+quotes/backslashes wrong, some very wierd Java startup error. To see if this is
+the case, run ant -noclasspath
or unset the CLASSPATH environment
+variable.
+
+
Many Ant built-in and third-party tasks use network connections to retrieve +files from HTTP servers. If you are behind a firewall with a proxy server, then +Ant needs to be configured with the proxy. Here are the different ways to do +this.
+ +-noproxy
option.
+
+ANT_OPTS
environment variable. This is the best option
+for a non-mobile system. For a laptop, you have to change these settings as you
+roam.
+
+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 +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: +
-ant -Dhttp.proxyHost=proxy -Dhttp.proxyPort=81+ +
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 +configuring the JVM properties until they are happy.
+ + +Assume Ant is installed in c:\ant\
. The following sets up the
environment:
set ANT_HOME=c:\ant -set JAVA_HOME=c:\jdk1.2.2 +set JAVA_HOME=c:\jdk-1.5.0.05 set PATH=%PATH%;%ANT_HOME%\bin-
Assume Ant is installed in /usr/local/ant
. The following sets up
the environment:
export ANT_HOME=/usr/local/ant -export JAVA_HOME=/usr/local/jdk-1.2.2 +export JAVA_HOME=/usr/local/jdk-1.5.0.05 export PATH=${PATH}:${ANT_HOME}/bin-
setenv ANT_HOME /usr/local/ant -setenv JAVA_HOME /usr/local/jdk-1.2.2 +setenv JAVA_HOME /usr/local/jdk/jdk-1.5.0.05 set path=( $path $ANT_HOME/bin )+
+Having a symbolic link set up to point to the JVM/JSK version makes updates more seamless.
@@ -206,6 +313,7 @@ Finally, if for some reason you are running on a system with both the JPackage a
available, if you should want to run the Apache version (which will have to be specified with an absolute file name,
not found on the path), you should use Ant's --noconfig
command-line switch to avoid JPackage's classpath mechanism.
+
There are lots of variants that can be used to run Ant. What you need is at @@ -215,8 +323,7 @@ least the following:
needed for your chosen JAXP-compliant XML parser.classes.zip
-file of the JDK must be added to the classpath; for JDK 1.2 or JDK 1.3, tools.jar
+rmic task), then tools.jar
must be added. The scripts supplied with Ant,
in the bin
directory, will add
the required JDK classes automatically, if the JAVA_HOME
@@ -308,8 +415,8 @@ the current Ant version in ANT_HOME
.
The following libraries are needed in your CLASSPATH or in the
-install directory's lib
directory if you are using the
+
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 (and Java 1.4 and higher includes a regexp implementation which @@ -329,12 +436,10 @@ Installing Ant / Optional Tasks section above.
Ant has a built in diagnostics feature. If you run ant
+-diagnostics
ant will look at its internal state and print it out. This
+code will check and print the following things.
+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. +
+ +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.
+ ++ +Please only file a bug report against Ant for a configuration/startup problem if +there really is a fixable bug in Ant related to configuration, such as it not +working on a particular platform, with a certain JVM version, etc, or if you are +advised to do it by the user mailing list. +
+ +Copyright © 2000-2005 The Apache Software Foundation. All rights Reserved.