A bit of confusion with grapes

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

A bit of confusion with grapes

Neil Cherry-3
I was testing the Database features of Groovy and followed the directions
here:

http://groovy.codehaus.org/Database+features

Of course I received an error:

ERROR java.lang.ClassNotFoundException:
com.mysql.jdbc.Driver

because I don't have the mysql installed. I searched and found this
solution:

@Grapes([
  @Grab('mysql:mysql-connector-java:5.1.12'),
  @GrabConfig(systemClassLoader = true)
])

which works fine.

Now my questions, how do I install the connector and associated
files? How does Grapes work? I'm not actually looking for the
answers as much as where to begin so I can understand what's going
on. I may have a machine that will not have internet access so I
may need to install these files locally. I will begin (later) by
looking at the grapes related page.

Thanks

--
Linux Home Automation         Neil Cherry       [hidden email]
http://www.linuxha.com/                         Main site
http://linuxha.blogspot.com/                    My HA Blog
Author of:     Linux Smart Homes For Dummies

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: A bit of confusion with grapes

Guillaume Laforge-4
Hi Neil,

If a machine doesn't have internet access, it won't be able to download the dependencies from internet, obviously.
You can have a look at your $GROOVY_HOME/.grape directory, that's where the cache is situated.
So if you setup your machine to have the right dependencies in that local cache, you should be fine even without an internet connection.

Guillaume

On Thu, Mar 17, 2011 at 17:27, Neil Cherry <[hidden email]> wrote:
I was testing the Database features of Groovy and followed the directions
here:

http://groovy.codehaus.org/Database+features

Of course I received an error:

ERROR java.lang.ClassNotFoundException:
com.mysql.jdbc.Driver

because I don't have the mysql installed. I searched and found this
solution:

@Grapes([
 @Grab('mysql:mysql-connector-java:5.1.12'),
 @GrabConfig(systemClassLoader = true)
])

which works fine.

Now my questions, how do I install the connector and associated
files? How does Grapes work? I'm not actually looking for the
answers as much as where to begin so I can understand what's going
on. I may have a machine that will not have internet access so I
may need to install these files locally. I will begin (later) by
looking at the grapes related page.

Thanks

--
Linux Home Automation         Neil Cherry       [hidden email]
http://www.linuxha.com/                         Main site
http://linuxha.blogspot.com/                    My HA Blog
Author of:      Linux Smart Homes For Dummies

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email





--
Guillaume Laforge
Groovy Project Manager
Head of Groovy Development at SpringSource
http://www.springsource.com/g2one
Reply | Threaded
Open this post in threaded view
|

Re: A bit of confusion with grapes

Neil Cherry-3
On 03/17/2011 12:40 PM, Guillaume Laforge wrote:
> Hi Neil,
>
> If a machine doesn't have internet access, it won't be able to download the dependencies
> from internet, obviously.
> You can have a look at your $GROOVY_HOME/.grape directory, that's where the cache is situated.
> So if you setup your machine to have the right dependencies in that local cache, you
> should be fine even without an internet connection.
>
> Guillaume

Thanks, I'm now beginning to understand Grapes a little better. :-)
I've been able to put the correct files in the correct places so
I can use the machine that is not connected to the net. :-)

--
Linux Home Automation         Neil Cherry       [hidden email]
http://www.linuxha.com/                         Main site
http://linuxha.blogspot.com/                    My HA Blog
Author of:     Linux Smart Homes For Dummies

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email