Browse Source

Update the delegating-classloader FAQ

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@275424 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 21 years ago
parent
commit
b0158fd84f
2 changed files with 42 additions and 2 deletions
  1. +19
    -1
      docs/faq.html
  2. +23
    -1
      xdocs/faq.xml

+ 19
- 1
docs/faq.html View File

@@ -1319,6 +1319,10 @@ mv /tmp/foo $ANT_HOME/bin/antRun
<code>CLASSPATH</code> environment variable or
<code>ANT_HOME/lib</code>" for the rest of this
answer.</p>
<p>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, <code>CLASSPATH</code> and
<code>ANT_HOME/lib</code> are identical.</p>
<p>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
<li>remove the class that loads the external library from
the <code>CLASSPATH</code>.</li>
</ol>
<p><strong>Using The Second Option with Ant 1.5.4 and
Earlier:</strong></p>
<p>The easiest way to do this is to remove
<code>optional.jar</code> from <code>ANT_HOME/lib</code>. If
you do so, you will have to <code>&lt;taskdef&gt;</code> all
@@ -1397,8 +1403,20 @@ mv /tmp/foo $ANT_HOME/bin/antRun
directory, in the <code>&lt;style&gt;</code> case it is one of
the <code>*Liaison</code> classes in
<code>org/apache/tools/ant/taskdefs/optional</code>.</p>
<p><strong>Using The Second Option with Ant 1.6 and
later:</strong></p>
<p>In Ant 1.6 <code>optional.jar</code> 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
<code>&lt;junit&gt;</code> task it would be
<code>ant-junit.jar</code> and for <code>&lt;style&gt;</code>
it would be <code>ant-trax.jar</code>,
<code>ant-xalan1.jar</code> or <code>ant-xslp.jar</code> -
depending on the processor you use.</p>
<p>If you use the option to break up <code>optional.jar</code>
for <code>&lt;junit&gt;</code>, you still have to use a
for <code>&lt;junit&gt;</code> or remove
<code>ant-junit.jar</code>, you still have to use a
<code>&lt;taskdef&gt;</code> with a nested
<code>&lt;classpath&gt;</code> to define the junit task.</p>
<p class="faq">


+ 23
- 1
xdocs/faq.xml View File

@@ -1090,6 +1090,11 @@ mv /tmp/foo $ANT_HOME/bin/antRun
<code>ANT_HOME/lib</code>&quot; for the rest of this
answer.</p>

<p>Technically the sentence above isn&apos;t true for Ant 1.6
and later anymore, but the result is the same. For the sake
of this discussion, <code>CLASSPATH</code> and
<code>ANT_HOME/lib</code> are identical.</p>

<p>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 <code>CLASSPATH</code>.</li>
</ol>

<p><strong>Using The Second Option with Ant 1.5.4 and
Earlier:</strong></p>

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

<p><strong>Using The Second Option with Ant 1.6 and
later:</strong></p>

<p>In Ant 1.6 <code>optional.jar</code> 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
<code>&lt;junit&gt;</code> task it would be
<code>ant-junit.jar</code> and for <code>&lt;style&gt;</code>
it would be <code>ant-trax.jar</code>,
<code>ant-xalan1.jar</code> or <code>ant-xslp.jar</code> -
depending on the processor you use.</p>

<p>If you use the option to break up <code>optional.jar</code>
for <code>&lt;junit&gt;</code>, you still have to use a
for <code>&lt;junit&gt;</code> or remove
<code>ant-junit.jar</code>, you still have to use a
<code>&lt;taskdef&gt;</code> with a nested
<code>&lt;classpath&gt;</code> to define the junit task.</p>
</answer>


Loading…
Cancel
Save