Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-5871

@Grapes/@Grab not working with GroovyConsole

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.8.6, 2.0.5
    • 2.2.0-beta-1
    • Grape, Groovy Console
    • None

    Description

      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:

      @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"));
      

      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.

      Attachments

        Issue Links

          Activity

            People

              pschumacher Pascal Schumacher
              mfortner Mark Fortner
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: