You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@groovy.apache.org by "Milles, Eric (TR Tech, Content & Ops)" <er...@thomsonreuters.com> on 2019/05/15 19:53:49 UTC

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?

Re: GroovyStarter conf file: Is grab still supported?

Posted by "Milles, Eric (TR Tech, Content & Ops)" <er...@thomsonreuters.com>.
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) <er...@thomsonreuters.com>
Sent: Wednesday, May 15, 2019 2:53 PM
To: dev@groovy.apache.org
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<https://urldefense.proofpoint.com/v2/url?u=https-3A__groovy.apache.org_wiki_GEP-2D9.html&d=DwMFAw&c=4ZIZThykDLcoWk-GVjSLmy8-1Cr1I4FWIvbLFebwKgY&r=tPJuIuL_GkTEazjQW7vvl7mNWVGXn3yJD5LGBHYYHww&m=SeXkCj5gir0Iqo-xKivtFCXU00O-orVGwwBlkJl6xxo&s=55mH-tjqsLGNJnykpSH1R6EXLY7i6Dn1ph5qbIADho4&e=> (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?