Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 7732

Summary: ant 1.5.1: start-script broken
Product: Gentoo Linux Reporter: Stephan Wentz <stephan>
Component: [OLD] DevelopmentAssignee: Java team <java>
Status: RESOLVED FIXED    
Severity: major CC: aalmenar, bugzilla, kevin, mkennedy
Priority: High    
Version: 1.2   
Hardware: x86   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Stephan Wentz 2002-09-10 03:26:55 UTC
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 :-)
Comment 1 Karl Trygve Kalleberg (RETIRED) gentoo-dev 2002-09-11 10:28:27 UTC
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.
Comment 2 Stephan Wentz 2002-09-13 04:07:54 UTC
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... 
Comment 3 Dominik Westner 2002-09-27 05:35:25 UTC
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.
Comment 4 Karl Trygve Kalleberg (RETIRED) gentoo-dev 2002-10-14 13:23:48 UTC
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
Comment 5 Nathan Hollingsworth 2002-10-20 12:47:25 UTC
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`
Comment 6 Karl Trygve Kalleberg (RETIRED) gentoo-dev 2002-10-26 07:57:22 UTC
This is fixed in dev-java/ant-1.5.1
Comment 7 Adrian Almenar 2002-11-18 10:21:29 UTC
i downloaded an external package, and build.xml uses taskdef spec. 
CLASSPATH gets override on /usr/bin/ant. 
Comment 8 Adrian Almenar 2002-11-18 12:27:06 UTC
Ive checked it, sorry it has already been fixed, confused with bug 10061.