Results 1 to 9 of 9

Thread: Adding Groovy support to existing simple project in STS

Hybrid View

  1. #1

    Default Adding Groovy support to existing simple project in STS

    I have a simple project that a number of people are sharing, and want to add Groovy and JUnit4 support to it. Is there an easy way to do that?

    Brian Gardner

  2. #2
    Join Date
    Aug 2008
    Location
    Vancouver, BC
    Posts
    747

    Default

    Have yo uinstalled the Groovy-Eclipse plugin from the extensions page? We have a simple getting started tutorial here:
    http://groovy.codehaus.org/Eclipse+P...roovyEclipsev2

    Once you create a groovy project, you can share it via scm and other people can use it as well.

    To get JUnitr support, all you need to do is add the JUnit4 classpath container:

    1. Select rpoject
    2. Right click -> Build Path -> Configure Build path...
    3. Libraries
    4. Add library... -> Junit -> Version 4

    Hope this helps.
    Andrew Eisenberg, Ph.D.
    SpringSource, a division of VMware
    SpringSource Tools Team
    More about AJDT, Groovy-Eclipse, and Grails tooling

  3. #3

    Default

    Andrew,

    Thanks for the quick response. Perhaps I was unclear though - I have created many Groovy projects with JUnit; that's easy. This is an existing project that is simple - nothing more than a directory structure, really. I need to add the ability to run Groovy JUnit tests to that one.

    Brian

  4. #4
    Join Date
    Aug 2008
    Location
    Vancouver, BC
    Posts
    747

    Default

    Have you tried:

    Select project -> Right click -> Configure -> Convert to Groovy project?
    Andrew Eisenberg, Ph.D.
    SpringSource, a division of VMware
    SpringSource Tools Team
    More about AJDT, Groovy-Eclipse, and Grails tooling

  5. #5

    Default

    Yeah, that option does not appear for me, even though all sorts of other Groovy things work well. I do have "Convert to Grails Project" however. Not useful in this case. Is there a way to add that feature? I may have missed a setup issue when I moved machines recently...

    Brian

  6. #6
    Join Date
    Aug 2008
    Location
    Vancouver, BC
    Posts
    747

    Default

    Are you sure that your project is not already a groovy project? When you right click on the project, do you see a "Groovy" menu item?

    Is the problem that you don't have the groovy libraries on the project's build path? Right-click -> Groovy -> AddGroovy Libraries to classpath.
    Andrew Eisenberg, Ph.D.
    SpringSource, a division of VMware
    SpringSource Tools Team
    More about AJDT, Groovy-Eclipse, and Grails tooling

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •