The purpose of the Groovy Eclipse plugin is to promote the Groovy platform and ecosystem as a viable and productive development environment for Java developers working in the Eclipse SDK.
The Groovy Eclipse Plugin allows you to edit, compile and run both groovy scripts and classes from the Eclipse SDK.
Groovy-Eclipse V2.0 is in alpha now!
For Eclipse 3.4:
Please read the FAQ on the new plugin. There are many changes between the upcoming V2.0 and the current release.
You can have your .02 considered as to where the Groovy Eclipse plugin goes next! Goto the following Wiki Page and have your say!
Eclipse version compatibility
Eclipse 3.5 : working for V2, working for V1
Eclipse 3.4 : working for V2, working for V1
Eclipse 3.3 : not available for Groovy Eclipse plugin V2, no longer supported for V1
Installation and Quick start
For installation of V2 of the plugin:
- Go to: Help -> Software Updates
- Change to the Available Software tab
- Click on Add Site
- Paste the update site URL appropriate for your version of Eclipse and click OK
- You should now see a Groovy Update Site entry in the list of update sites. Expand and select the Groovy-Eclipse plugin feature and the JDT Core Patch feature. Optionally, you can choose to include the sources.
- Click Install and follow the prompts
- Restart when asked
- Rejoice! You now have the Groovy-Eclipse plugin installed.
Archived snapshots of the plugin
Archived snapshots of the plugin are available as zip files. You can find them here:
These zip files are the compressed version of the update site. They are not plugins that you can just drop into your eclipse installation. Here's how to install an archive:
- Download the snapshot locally
- Do not unzip or move into your dropins directory
- Start eclipse
- Help -> Install new software -> Add...
- Select the location of the zip you just downloaded
- Install as you would from the regular update site
Important: this plugin will only install on Eclipse 3.4.2 or Eclipse 3.5. This is because a specific version of the JDT feature is required. See the Groovy Eclipse FAQ for more information on this.
For installation of V1 of the plugin:
The update site containing the most recent release is here:
The update site containing the most recent development releases is here:
Releases on this site are not official. Although they pass all of our unit tests, they may contain more experimental features and so use of the experimental features are at your own risk.
The head version of groovy-eclipse is build on a CI Server at the HSR (University of Applied Sciences Rapperswil). The update site is:
For the installation of the Groovy Eclipse Plugin follow this PDF presentation.
The "Hello World" screen cast shows you how to write a Groovy "Hello World" application using Eclipse.
Important: This version is no longer actively supported. We recommend migrating to V2 of the plugin above.
- Syntax Highlighting
- Compile and run Groovy files in Eclipse
- Outline view for Groovy files
- Auto completion
- Source code formatter
For an in depth discussion of the features and implementation of V2, see http://blog.springsource.com/2009/07/30/a-groovier-eclipse-experience/.
Create a Groovy Project
To create a basic Groovy project in Eclipse perform the following steps:
- Open the Java perspective
- Click on the new Groovy Project icon:
- The new project wizard for Groovy uses most of the same options as the new project wizard for Java.
- Fill in the appropriate details and create the project..
You should have a src folder, and several libraries. There is also a bin folder that was created by Eclipse, but is hidden.
From here, you can create a Groovy class or a Groovy test case using wizards similar to the Java class and JUnit test case wizards that Eclipse's Java tools provides. They are available by pressing CTRL-N.
Groovy-Eclipse V2 is fast moving. We expect a general release in October 2009. If you would like to contribute, please join the mailing list: http://firstname.lastname@example.org.
You can raise bugs on JIRA: http://jira.codehaus.org/browse/GRECLIPSE
Also, if you want to raise questions to a user's mailing list, please join: http://email@example.com.
More information is coming, but for now you can ask questions on our mailing list and join our weekly skype calls.
Access to the SVN repository is available here:
The plugin source contains Groovy source files. You will need to be able to compile Groovy in order to build the plugin. The easiest method is to download the released plugin from the update site http://dist.codehaus.org/groovy/distributions/greclipse/snapshot/e3.5/ or http://dist.codehaus.org/groovy/distributions/greclipse/snapshot/e3.4/.
We recommend using Subversive to check out the source code.
Testing the plugin
It might be useful to test the plugin before you use it in your main eclipse installation. The main test project is org.codehaus.groovy.alltests. To run the tests right-click on the project and select Run As->JUnit Plug-in Test.
Building the Update Site
Instructions to come later. If you are interested in doing this, please contact the mailing list.
Installing the update site that you built
The update site you just created can now be installed with the Eclipse update manager. You can install the Groovy feature by following the instructions in the Update Site section above, but using a Local Site pointing to the GroovySite directory that you just built, instead of a Remote Site.