GroovyStarter conf file: Is grab still supported?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

GroovyStarter conf file: Is grab still supported?

Milles, Eric (TR Tech, Content & Ops)
I have been using org.codehaus.groovy.tools.GroovyStarter to launch the Groovy Console.  Now that groovy-all has been removed in Groovy 2.5+, I was looking to use the --conf option of GroovyStarter to try and bootstrap the Groovy Console's dependencies.  It looks like the "load" keyword can be used to specify an individual jar.  However, I'm looking for something like @Grab provides for scripts.  The "grab" keyword is mentioned: https://groovy.apache.org/wiki/GEP-9.html (see Configuring a Groovy Installation).

Looking at org.codehaus.groovy.tools.RootLoader, it seems that the "grab" keyword is supported only in very basic terms.  Given a directive like "grab org.codehaus.groovy:groovy-ui:2.5.7", it builds a file URL like "file://${groovy.home}/repo/org.codehaus.groovy/groovy-ui/jars/groovy-ui-2.5.7.jar" and adds it to the classpath.  There is no actual grabbing of the dependency or any of its transitive dependencies.

Is this feature in use by anyone?  Is it incomplete or abandoned?
Reply | Threaded
Open this post in threaded view
|

Re: GroovyStarter conf file: Is grab still supported?

Milles, Eric (TR Tech, Content & Ops)

Also, http://docs.groovy-lang.org/docs/latest/html/api/org/codehaus/groovy/tools/LoaderConfiguration.html does not mention the "grab" keyword.



From: Milles, Eric (TR Tech, Content & Ops) <[hidden email]>
Sent: Wednesday, May 15, 2019 2:53 PM
To: [hidden email]
Subject: GroovyStarter conf file: Is grab still supported?
 
I have been using org.codehaus.groovy.tools.GroovyStarter to launch the Groovy Console.  Now that groovy-all has been removed in Groovy 2.5+, I was looking to use the --conf option of GroovyStarter to try and bootstrap the Groovy Console's dependencies.  It looks like the "load" keyword can be used to specify an individual jar.  However, I'm looking for something like @Grab provides for scripts.  The "grab" keyword is mentioned: https://groovy.apache.org/wiki/GEP-9.html (see Configuring a Groovy Installation).

Looking at org.codehaus.groovy.tools.RootLoader, it seems that the "grab" keyword is supported only in very basic terms.  Given a directive like "grab org.codehaus.groovy:groovy-ui:2.5.7", it builds a file URL like "file://${groovy.home}/repo/org.codehaus.groovy/groovy-ui/jars/groovy-ui-2.5.7.jar" and adds it to the classpath.  There is no actual grabbing of the dependency or any of its transitive dependencies.

Is this feature in use by anyone?  Is it incomplete or abandoned?