diff --git a/docs/manual/install.html b/docs/manual/install.html index a2cb6db3d..cbf98bc47 100644 --- a/docs/manual/install.html +++ b/docs/manual/install.html @@ -227,33 +227,6 @@ restrictions on the classes which may be loaded by an extension.

- - - - - - - - -
- Linux Note: -
  - A jpackage rpm version of ant may be installed on your machine, - say as part of install of Fedora Core 3. If another version - of ant is installed, the rpm version will take - priority. This is due to the fact that ant bash script file - dot includes the /etc/ant.conf file from the jpackage distribution. - The current version of this file (sept 2006) overwrites the - ANT_HOME environment variable. If this happens, ant will - issue a warning. To fix this, modify the line in /etc/ant.conf -
- ANT_HOME=/usr/share/ant -
- to be -
- ANT_HOME=${ANT_HOME:-/usr/share/ant}. -
-

Optional Tasks

Ant supports a number of optional tasks. An optional task is a task which @@ -420,9 +393,14 @@ 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 ANT_HOME environment variables and the RPM installer will correctly -place the Ant executable on your path. The ANT_HOME environment variable will -be ignored, if set, when running the JPackage version of Ant. -

+place the Ant executable on your path. +

+

+ NOTE: Since Ant 1.7.0, if the ANT_HOME + environment variable is set, the jpackage distribution will be + ignored. +

+

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 diff --git a/src/script/ant b/src/script/ant index bad19c05d..eae54a7f2 100644 --- a/src/script/ant +++ b/src/script/ant @@ -44,18 +44,11 @@ if $no_config ; then rpm_mode=false usejikes=$use_jikes_default else - orig_ant_home=$ANT_HOME - # load system-wide ant configuration - if [ -f "/etc/ant.conf" ] ; then + # load system-wide ant configuration (ONLY if ANT_HOME has NOT been set) + if [ -z "$ANT_HOME" -a -f "/etc/ant.conf" ] ; then . /etc/ant.conf fi - # Normally users do not expect that /etc/ant.conf will override ANT_HOME - if [ -n "$orig_ant_home" -a "$orig_ant_home" != "$ANT_HOME" ] ; then - echo "Warning: ANT_HOME has been overridden by /etc/ant.conf from $orig_ant_home to $ANT_HOME" - echo " Use ant -noconfig if this is not desired." - fi - # load user ant configuration if [ -f "$HOME/.ant/ant.conf" ] ; then . $HOME/.ant/ant.conf @@ -168,6 +161,27 @@ if $rpm_mode && [ -f /usr/bin/build-classpath ] ; then fi fi + # If no optional jars have been specified then build the default list + if [ -z "$OPT_JAR_LIST" ] ; then + for file in /etc/ant.d/*; do + if [ -f "$file" ]; then + case "$file" in + *~) ;; + *#*) ;; + *.rpmsave) ;; + *.rpmnew) ;; + *) + for dep in `cat "$file"`; do + case "$OPT_JAR_LIST" in + *"$dep"*) ;; + *) OPT_JAR_LIST="$OPT_JAR_LIST${OPT_JAR_LIST:+ }$dep" + esac + done + esac + fi + done + fi + # Explicitly add javac path to classpath, assume JAVA_HOME set # properly in rpm mode if [ -f "$JAVA_HOME/lib/tools.jar" ] ; then