Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 303227 - groovy-1.6.7 doesn't honor CLASSPATH or ~/.groovy/lib
Summary: groovy-1.6.7 doesn't honor CLASSPATH or ~/.groovy/lib
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Java (show other bugs)
Hardware: All Linux
: High normal
Assignee: Java team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-02-02 15:51 UTC by Jean-Philippe Robichaud
Modified: 2010-12-09 11:46 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jean-Philippe Robichaud 2010-02-02 15:51:32 UTC
with a "regular" groovy installation, you can specify extra libs using the CLASSPATH shell variable.  You can also put jar files under ~/.groovy/lib and they get picked up automatically as needed.

Now with the current ebuild, that's not happening, I couldn't find a way to insert some extra dependencies in the classpath.

Reproducible: Always

Steps to Reproduce:
1. put mysql-connector-java-5.1.10-bin.jar under ~/.groovy/lib/
2. export CLASSPATH=~/.groovy/lib/mysql-connector-java-5.1.10-bin.jar
3. create a groovy script:

import groovy.sql.Sql                                                           
sql = Sql.newInstance('jdbc:mysql://localhost:3306/test', 'test', 'test', 'com.mysql.jdbc.Driver')  
sql.eachRow('show tables'){ row ->  println row[0]; }  

4. try to run the script: groovy test.groovy
Actual Results:  
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed, /tmp/test.groovy: 3: unable to resolve class com.mysql.jdbc.Driver
 @ line 3, column 1.                                                                              
 import com.mysql.jdbc.Driver;
 ^
 
1 error
Comment 1 Jean-Noël Rivasseau (RETIRED) gentoo-dev 2010-12-09 11:46:16 UTC
Seems to be fixed under Groovy-1.7.5, at least for the CLASSPATH thing.

See bug 347842 for other problems related to classpath; and if the ~/.groovy/lib thing is still not fixed add it there.

Closing WONTFIX as Groovy-1.7.5 is going to be stabilized.