You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2015/08/28 13:29:46 UTC

[jira] [Commented] (GROOVY-6514) groovysh should offer easier access to grapes

    [ https://issues.apache.org/jira/browse/GROOVY-6514?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14718371#comment-14718371 ] 

ASF GitHub Bot commented on GROOVY-6514:
----------------------------------------

GitHub user tkruse opened a pull request:

    https://github.com/apache/incubator-groovy/pull/104

    GROOVY-6514: GrapeIvy Classloader selection change, Groovysh :grab and rescan commands

    This PR allows to grab Grapes via a new ```:grab``` command. Classes from the new jar are available ia the import command completion. 
    
    To allow the completion to work, I had to change the selection of the classLoader in GrapeIvy. I do not know if that will break anything. Grabbing without completion is already possible in groovysh in a cumbersome way using the grapes code API. Merely adding a command to hide that would also be nice, but the real benefit would be to have import completion, as manually typing import commands is very tiring.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/tkruse/incubator-groovy groovysh-grab

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-groovy/pull/104.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #104
    
----
commit 9925b40f289500baf9e652f0b20398a114174896
Author: Thibault Kruse <th...@gmx.de>
Date:   2015-08-22T16:26:06Z

    GROOVY-6514: Grapes: Select higher-level classloader to add new URLs to.
    
    This makes it possible for Groovysh to offer tab completion
    for import statements.

commit e2096fdfcba220546e5f0d42cb35aa4ac8ff996e
Author: Thibault Kruse <th...@gmx.de>
Date:   2015-08-25T20:50:34Z

    GROOVY-6514: Groovysh: Rescan and Grab commands

----


> groovysh should offer easier access to grapes
> ---------------------------------------------
>
>                 Key: GROOVY-6514
>                 URL: https://issues.apache.org/jira/browse/GROOVY-6514
>             Project: Groovy
>          Issue Type: Improvement
>          Components: Groovysh
>            Reporter: Thibault Kruse
>            Priority: Minor
>
> groovysh can be started using a -cp option to use a given classpath. (BTW, the option is missing from the docs at http://groovy.codehaus.org/Groovy+Shell
> However it is rather cumbersome to use this mechanism to start groovysh to e.g. use a more convenient xml parser or such.
> So I can think of some solutions:
>  * add an option to use the latest of all libraries in ~/.groovy/grapes
>  * add an option to use specific grapes on startup, which would download those if necessary and then put them on the classpath
>  * provide a virtual environment tool that sets the classpath according to a definition file defining the grapes to be used.
> Thoughts?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)