|
@@ -1319,6 +1319,10 @@ mv /tmp/foo $ANT_HOME/bin/antRun |
|
|
<code>CLASSPATH</code> environment variable or |
|
|
<code>CLASSPATH</code> environment variable or |
|
|
<code>ANT_HOME/lib</code>" for the rest of this |
|
|
<code>ANT_HOME/lib</code>" for the rest of this |
|
|
answer.</p> |
|
|
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 |
|
|
<p>This question collects a common type of problem: A task |
|
|
needs an external library and it has a nested classpath |
|
|
needs an external library and it has a nested classpath |
|
|
element so that you can point it to this external library, but |
|
|
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 |
|
|
<li>remove the class that loads the external library from |
|
|
the <code>CLASSPATH</code>.</li> |
|
|
the <code>CLASSPATH</code>.</li> |
|
|
</ol> |
|
|
</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 |
|
|
<p>The easiest way to do this is to remove |
|
|
<code>optional.jar</code> from <code>ANT_HOME/lib</code>. If |
|
|
<code>optional.jar</code> from <code>ANT_HOME/lib</code>. If |
|
|
you do so, you will have to <code><taskdef></code> all |
|
|
you do so, you will have to <code><taskdef></code> all |
|
@@ -1397,8 +1403,20 @@ mv /tmp/foo $ANT_HOME/bin/antRun |
|
|
directory, in the <code><style></code> case it is one of |
|
|
directory, in the <code><style></code> case it is one of |
|
|
the <code>*Liaison</code> classes in |
|
|
the <code>*Liaison</code> classes in |
|
|
<code>org/apache/tools/ant/taskdefs/optional</code>.</p> |
|
|
<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><junit></code> task it would be |
|
|
|
|
|
<code>ant-junit.jar</code> and for <code><style></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> |
|
|
<p>If you use the option to break up <code>optional.jar</code> |
|
|
for <code><junit></code>, you still have to use a |
|
|
|
|
|
|
|
|
for <code><junit></code> or remove |
|
|
|
|
|
<code>ant-junit.jar</code>, you still have to use a |
|
|
<code><taskdef></code> with a nested |
|
|
<code><taskdef></code> with a nested |
|
|
<code><classpath></code> to define the junit task.</p> |
|
|
<code><classpath></code> to define the junit task.</p> |
|
|
<p class="faq"> |
|
|
<p class="faq"> |
|
|