Announcement Announcement Module
Collapse
No announcement yet.
Grape Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Grape

    How do I get Grape to work in STS?

    I have the groovy plugin; 2.1.0; 2.1.0.xx-20101020-1000-e36-release and groovy 1.7.5.xx (which came with the plugin as a dependency, right?)

    My ultimate goal was to get http-builder as seen here: http://groovy.codehaus.org/modules/h.../download.html
    Last edited by finneycanhelp; Jan 28th, 2011, 07:31 PM. Reason: getting to the core of the issue

  • #2
    Hi,

    There are issues with using Grab in STS, some very simple things work, but anything more elaborate may have problems due to it wanting to mess with the classpath.

    If you run the thing doing the Grab'ing as a Groovy Script, it will probably work but if you try to run it as an application, it probably won't. Code assist also breaks down with Grab'd dependencies on occasion. You will also likely see reconciling errors - errors in the editor gutter that don't appear in the problems view - those are covered by this jira http://jira.codehaus.org/browse/GRECLIPSE-411. As an example of these issues, from the page you reference I can define the snippet that creates a http builder and run it as a script, not as an app and I get a reconcile error on the def line.

    When building Grab'd code, especially the first time, there are likely to be delays as jars are pulled down the background. It may look like eclipse has frozen but in fact it is because the groovy compiler gives us no indication of progress with what it is doing related to grab.

    I'd recommend raising issues for any specific issues that you hit. I don't think we have one open for the 'wrong classloader found' issue that you get when running a Grab'd script as an application. Anything you do hit is probably a groovy-eclipse limitation, so I'd recommend raising it on http://jira.codehaus.org/browse/GRECLIPSE .

    cheers
    Andy
    ---
    Andy Clement
    SpringSource Tool Suite Team

    Comment


    • #3
      Originally posted by Andy Clement View Post
      Hi,

      There are issues with using Grab in STS, some very simple things work, but anything more elaborate may have problems due to it wanting to mess with the classpath.

      ...
      OK. That helps! In the short run, I just mavenized the project and threw a POM in there.

      Just to make sure I am on the same page as the world. Grab/Grape comes with Groovy 7+ and command line would work just fine. In general, I would not have to manually install anything for Grab/Grape to work. Things download from what is available in the maven repo and away we go. Right?

      Comment


      • #4
        No, there is nothing you manually have to install. With Groovy-Eclipse installed in Eclipse/STS you can write @Grab'ing code, and run it as a groovy script (and as it runs it will download whatever you have grabbed). But code assist will be unreliable and it won't run as a java application. Grab on the command line with just plain groovy will work just fine.

        Andy

        Comment


        • #5
          Great! Thanks!

          Comment

          Working...
          X