Ophidian Ophidian - 5 months ago 20
Java Question

Why does ant ignore task jars in $HOME/.ant/lib/

Configuration: I'm running stock Fedora 12 with the ant that Fedora ships:

  • ant-1.7.1-12.fc12

  • java-1.6.0-openjdk-

I have
in my

I'm using the following

<project name="antlibtest" default="doEcho">
<taskdef resource="svntask.properties"/>

<target name="doEcho">
<echo message="Hello World!"/>
<echo message="ANT_HOME=${ant.home}"/>
<echo message="classpath=${java.class.path}"/>

When the build file is executed, I get the following error:
[taskdef] Could not load definitions from resource svntask.properties. It could not be found.

If I set ANT_HOME to
it works flawlessly.

In both cases, the jars from my home directory are clearly in the output of the classpath.

How do I make this work without resorting to my own copy of ant, ANT_HOME and ant --noconfig?

Answer Source

This seems to be the problem described in Bug 490542 (that applies to Fedora 12 too according to the last comment). Sadly, the bug is still in a NEW state so I don't think it will be solved in a near future.

Regarding ANT_HOME, doesn't /etc/ant.conf set it to /usr/share/ant as explained here? This may be outdated but I can't check it (and I don't really get how this should be setup on Fedora).