Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
junit-3.8.1 and ant's lib path
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
kelvin
n00b
n00b


Joined: 08 Jun 2003
Posts: 8

PostPosted: Sun Jun 08, 2003 9:02 am    Post subject: junit-3.8.1 and ant's lib path Reply with quote

I ran into this problem and I wanted to post the answer, just in case somebody runs into the same problem.

junit-3.8.1 doesn't seem to add itself to the ant classpath in /usr/share/ant/package.env. So if you run ant expecting junit.jar to be on the classpath, it won't be until you fix the package.env file.

It does add a symlink to junit.jar at /usr/share/ant/lib, which is the correct behavior. However, gentoo's /usr/bin/ant looks at `java-config --classpath=ant` for the libraries to add to the classpath.

oro is in the CLASSPATH specified in package.env. So I looked at the oro ebuild file to see if I could figure out what might be added to junit to "fix" this. However, a quick look over by someone not familiar with all of the ebuild commands didn't reveal much.

-Kelvin
Back to top
View user's profile Send private message
cdmstro
Tux's lil' helper
Tux's lil' helper


Joined: 26 Apr 2003
Posts: 93

PostPosted: Sun Jun 08, 2003 2:50 pm    Post subject: Reply with quote

Looking at the ant ebuild, I saw that this is where the additional packages you have installed are actually added to the package.env for ant. If you had previously installed oro, then the oro.jar is added to your classpath.

You can use java-config to set the user classpath to add the junit, oro, or other jar files to your user classpath
Code:
java-config --set-user-classpath=junit,oro,regexp

then the ant script will source the .gentoo/java-env file (where java-config stores your configuration) to pick up any CLASSPATH setting you already have, prior to being run.
Back to top
View user's profile Send private message
kelvin
n00b
n00b


Joined: 08 Jun 2003
Posts: 8

PostPosted: Sun Jun 08, 2003 5:19 pm    Post subject: Reply with quote

Thanks for the information.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum