-
Aug 9th, 2011, 11:13 AM
#1
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
-
Aug 9th, 2011, 11:29 AM
#2
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.
-
Aug 9th, 2011, 11:48 AM
#3
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
-
Aug 9th, 2011, 02:35 PM
#4
Have you tried:
Select project -> Right click -> Configure -> Convert to Groovy project?
-
Aug 9th, 2011, 02:46 PM
#5
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
-
Aug 9th, 2011, 02:58 PM
#6
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.
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
-
Forum Rules