[fedora-java] Why does ant ignore tasks in ~/.ant/lib ?

Aaron Clark ophidian at ophidian.homeip.net
Tue Dec 15 19:29:36 UTC 2009


On 12/09/2009 03:30 PM, Aaron Clark wrote:
> So, I've been trying to track down why a simple taskdef in my build.xml
> fails to find the correct properties file when I don't have ANT_HOME set
> for my user.
>
> Here's the setup:
> 1. svnant.jar and svnClientAdapter.jar are both placed in $HOME/.ant/lib
> 2. I run the attached build.xml
>
> Without ANT_HOME variable set, I get the error message:
> "[taskdef] Could not load definitions from resource svntask.properties.
> It could not be found."
>
> Setting ANT_HOME to /usr/share/ant yields no error messages.
>

As a followup to this, "ANT_HOME=/usr/share/ant/ ant" works without 
errors, but "ANT_HOME=/usr/share/ant ant" triggers the error.  The 
former case has a significantly shorter classpath output (missing a lot 
of jars from /usr/share/java/) and somewhat interestingly begins with 
/usr/share/ant//lib/ant-launcher.jar followed by the jars in $HOME/.ant/lib/

Can anyone else reproduce this?

Aaron




More information about the java-devel mailing list