ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject DO NOT REPLY [Bug 44849] New: ant does not load libraries from ~/.ant/ lib when ant.jar is on the classpath
Date Mon, 21 Apr 2008 20:25:26 GMT

           Summary: ant does not load libraries from ~/.ant/lib when ant.jar
                    is on the classpath
           Product: Ant
           Version: 1.7.0
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Core

I've been investigating a problem with loading 3rd-party tasks like ivy,
obfuscate, and jalopy from the ~/.ant/lib directory on a Fedora Core 6 system
with the vendor-provided ant-1.6.5 package.  When I upgraded to ant-1.7.0 from
FC8 it had the same problem, but the problem does not exist with ant-1.6.2 from
FC4.  When I build and install ant-1.7.0 in my home directory, it will work
only if the vendor ant package is not installed or I run ant with the
--noconfig option.

After trying to start the launcher directly with various configurations, I
discovered that while the following command works:

java -classpath /home/tbeattie/src/ant-1.7.0/lib/ant-launcher.jar
-Dant.library.dir=/home/tbeattie/src/ant-1.7.0/lib -cp ''

this command fails:

java -classpath
-Dant.library.dir=/home/tbeattie/src/ant-1.7.0/lib -cp ''

The only difference is adding ant.jar to the -classpath (and this is the
locally installed ant.jar, not the vendor ant.jar).  The error is:

Buildfile: build.xml


Problem: failed to create task or type antlib:org.apache.ivy.ant:retrieve
Cause: The name is undefined.
Action: Check the spelling.
Action: Check that any custom tasks/types have been declared.
Action: Check that any <presetdef>/<macrodef> declarations have taken place.

This appears to be an antlib declaration. 
Action: Check that the implementing library exists in one of:
        -a directory added on the command line with the -lib argument

Total time: 0 seconds

Note that the system-wide ant configuration file /etc/ant.conf installed by
Fedora sets rpm_mode=true by default, which causes the ant startup script to
set LOCALCLASSPATH to include ant.jar.  Since build-classpath only searches
system java directories, I don't think it's possible to test a local install of
the ant startup script with "rpm_mode=true" (it can't find ant-launcher).  You
can only test with a system install.

The converse cannot be directly tested on a vendor ant install because it
cannot find if ant.jar is not on the classpath.

I believe this is the same bug that was reported in 35060.  I am not certain
whether it is related to bug 41587.

Configure bugmail:
------- You are receiving this mail because: -------
You are the assignee for the bug.

View raw message