From b0158fd84f619651a6373e8a5706e3907659dc7f Mon Sep 17 00:00:00 2001 From: Stefan Bodewig Date: Tue, 7 Oct 2003 14:28:25 +0000 Subject: [PATCH] Update the delegating-classloader FAQ git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@275424 13f79535-47bb-0310-9956-ffa450edef68 --- docs/faq.html | 20 +++++++++++++++++++- xdocs/faq.xml | 24 +++++++++++++++++++++++- 2 files changed, 42 insertions(+), 2 deletions(-) diff --git a/docs/faq.html b/docs/faq.html index 818d71f0f..7a19f0404 100644 --- a/docs/faq.html +++ b/docs/faq.html @@ -1319,6 +1319,10 @@ mv /tmp/foo $ANT_HOME/bin/antRun CLASSPATH environment variable or ANT_HOME/lib" for the rest of this answer.

+

Technically the sentence above isn't true for Ant 1.6 + and later anymore, but the result is the same. For the sake + of this discussion, CLASSPATH and + ANT_HOME/lib are identical.

This question collects a common type of problem: A task needs an external library and it has a nested classpath element so that you can point it to this external library, but @@ -1371,6 +1375,8 @@ mv /tmp/foo $ANT_HOME/bin/antRun

  • remove the class that loads the external library from the CLASSPATH.
  • +

    Using The Second Option with Ant 1.5.4 and + Earlier:

    The easiest way to do this is to remove optional.jar from ANT_HOME/lib. If you do so, you will have to <taskdef> all @@ -1397,8 +1403,20 @@ mv /tmp/foo $ANT_HOME/bin/antRun directory, in the <style> case it is one of the *Liaison classes in org/apache/tools/ant/taskdefs/optional.

    +

    Using The Second Option with Ant 1.6 and + later:

    +

    In Ant 1.6 optional.jar has been split into + multiple jars, each one containing classes with the same + dependencies on external libraries. You can move the + "offending" jar out of ANT_HOME/lib. For the + <junit> task it would be + ant-junit.jar and for <style> + it would be ant-trax.jar, + ant-xalan1.jar or ant-xslp.jar - + depending on the processor you use.

    If you use the option to break up optional.jar - for <junit>, you still have to use a + for <junit> or remove + ant-junit.jar, you still have to use a <taskdef> with a nested <classpath> to define the junit task.

    diff --git a/xdocs/faq.xml b/xdocs/faq.xml index 2072a9ef6..a23ea03cd 100644 --- a/xdocs/faq.xml +++ b/xdocs/faq.xml @@ -1090,6 +1090,11 @@ mv /tmp/foo $ANT_HOME/bin/antRun ANT_HOME/lib" for the rest of this answer.

    +

    Technically the sentence above isn't true for Ant 1.6 + and later anymore, but the result is the same. For the sake + of this discussion, CLASSPATH and + ANT_HOME/lib are identical.

    +

    This question collects a common type of problem: A task needs an external library and it has a nested classpath element so that you can point it to this external library, but @@ -1154,6 +1159,9 @@ mv /tmp/foo $ANT_HOME/bin/antRun the CLASSPATH. +

    Using The Second Option with Ant 1.5.4 and + Earlier:

    +

    The easiest way to do this is to remove optional.jar from ANT_HOME/lib. If you do so, you will have to <taskdef> all @@ -1183,8 +1191,22 @@ mv /tmp/foo $ANT_HOME/bin/antRun the *Liaison classes in org/apache/tools/ant/taskdefs/optional.

    +

    Using The Second Option with Ant 1.6 and + later:

    + +

    In Ant 1.6 optional.jar has been split into + multiple jars, each one containing classes with the same + dependencies on external libraries. You can move the + "offending" jar out of ANT_HOME/lib. For the + <junit> task it would be + ant-junit.jar and for <style> + it would be ant-trax.jar, + ant-xalan1.jar or ant-xslp.jar - + depending on the processor you use.

    +

    If you use the option to break up optional.jar - for <junit>, you still have to use a + for <junit> or remove + ant-junit.jar, you still have to use a <taskdef> with a nested <classpath> to define the junit task.