You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Burtsev Yuriy Gennad'evich (JIRA)" <ji...@apache.org> on 2017/09/19 18:10:00 UTC

[jira] [Commented] (GROOVY-5871) @Grapes/@Grab not working with GroovyConsole

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

Burtsev Yuriy Gennad'evich commented on GROOVY-5871:
----------------------------------------------------

The same issue in  groovy 2.4.8
If I set 

{code:java}
@GrabConfig(systemClassLoader=true)
{code}

issue have gone.
After one run with 

{code:java}
@GrabConfig(systemClassLoader=true)
{code}

I can remove and run without error.

> @Grapes/@Grab not working with GroovyConsole
> --------------------------------------------
>
>                 Key: GROOVY-5871
>                 URL: https://issues.apache.org/jira/browse/GROOVY-5871
>             Project: Groovy
>          Issue Type: Bug
>          Components: Grape, Groovy Console
>    Affects Versions: 1.8.6, 2.0.5
>            Reporter: Mark Fortner
>            Assignee: Pascal Schumacher
>             Fix For: 2.2.0-beta-1
>
>
> On the surface this seems like a duplicate of http://jira.codehaus.org/browse/GROOVY-3851  but it's not.  If the original issue was fixed, it's broken now in 1.8.6 and 2.0.5
> Here's my simple example:
> {code}
> @Grab(group='org.apache.commons', module='commons-vfs2',version='2.0')
> import org.apache.commons.vfs2.VFS
> println VFS.getManager().resolveFile(System.getProperty("user.home"));
> {code}
> This example throws a ClassNotFoundException when run through the GroovyConsole, but runs just fine when you run it from the command line.
> The console should read the grapesConfig.xml file on startup and use the settings there to resolve any grape references in the script.  That doesn't seem to be happening.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)