Logic seems to go like this (early in the script): If ~/.gentoo/java-env is there, source it... else set CLASSPATH=`java-config --classpath` So, ant will never have access to anything inside the ${CLASSPATH} since it overwrites it. The real problem might be with java-config. Should 'java-config --classpath' return the system classpath? 'java-config --set-system-classpath=package' does not change the output of 'java-config --classpath'.
To clarify if needed: I cant seem to find a way to make a package available to ant aside from editing ant's package file and adding it to the CLASSPATH in there. the env's CLASSPATH has no effect because it is overwritten. Removing the CLASSPATH=`java-config --classpath` line fixes this issue. I may not be doing something right. If that is the case, please inform me.
This, afaict, is fixed in ant-1.5.1 and later; I just marked it as "stable", so yo u probably want to upgrade.
I dont believe so (I've been using 1.5.1 anyways). The CLASSPATH in the env is ignored as far as I can tell, which is the problem....either that or 'java-config --classpath' should return the system classpath and not just the path to rt.jar. Also see bug #10061 (dupe).