yesterday i emerged ant 1.5 and now my own task-extensions don't work anymore... looked into /usr/bin/ant and found this strange code: [...] it builds the LOCALCLASSPATH out of env.d/20java and other things if [ -n "$CLASSPATH" ] ; then LOCALCLASSPATH="$CLASSPATH" fi # add in the dependency .jar files LOCALCLASSPATH=`java-config --classpath=ant` [...] now shouldn't the second LOCALCLASSPATH-line look like this? LOCALCLASSPATH=$LOCALCLASSPATH:`java-config --classpath=ant` we are overwriting the build LOCALCLASSPATH, and this shouldn't be, i have no chance to add other things to the classpath this way. and of course several lines of code would be superfluous :-)
If you provide me with a proper fix, I'll apply it, if not, it'll have to wait until after the upcoming Gentoo 1.4 release. We won't provide ant 1.5 with the 1.4 release.
the fix was in my initial posting ;-) it should read LOCALCLASSPATH=$LOCALCLASSPATH:`java-config --classpath=ant instead of LOCALCLASSPATH=`java-config --classpath=ant so that the $LOCALCLASSPATH which has been constructed before this line isn't overwritten...
I also hat to change /usr/bin/ant from JAVA_HOME=`grep "^JAVA_HOME" $envfile | sed "s/JAVA_HOME=//"` to JAVA_HOME=`java-config --jdk-home` Don't know if this is correct, but at least now it seems to work.
Updated this in the current ant-1.5, hopefully it fixes the worst problems. Reopen the bug if I'm a daft idiot and have overlooked something. Didn't bump revision on ant, so you'll have to remerge dev-java/ant-1.5
Whenever this bug was fixed /usr/bin/ant was changed to: LOCALCLASSPATH=`${LOCALCLASSPATH}:java-config --classpath=ant` This causes a file not found error and ant won't run. It should be: LOCALCLASSPATH="${LOCALCLASSPATH}:"`java-config --classpath=ant`
This is fixed in dev-java/ant-1.5.1
i downloaded an external package, and build.xml uses taskdef spec. CLASSPATH gets override on /usr/bin/ant.
Ive checked it, sorry it has already been fixed, confused with bug 10061.