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
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.