These instructions are meant for Eclipse 3.7 (Indigo).
Download and Install Eclipse
Download and unzip Eclipse for RCP/Plug-in Developers from http://eclipse.org/downloads. Choose the appropriate version for your architecture.
Groovy-Eclipse source code is stored in a subversion (SVN) repository. The best way to interact with the repository is through Eclipse's SVN tooling called subversive. Open up Help -> Install new software. Choose the Indigo update site and install:
- Subversive SVN Team Provider
- Subversive SVN JDT Ignore Extensions (Optional)
is available from github. To work with github, you need to have git installed on your machine. Github has some good documentation for a gentle introduction into git and it explains how to install the command line tools.
Install eGit (Optional)
eGit is the Eclipse tool support for working with git source code repositories. This tooling is helpful for running git operations inside of Eclipse. Things like viewing history and diffs are much more easily done than with command line tools. Also, having good integration with Eclipse makes simple operations like committing, pushing and, pulling possible without leaving the IDE. However, for more complex operations like rebasing and complex merges are typically more easily done on the command line.
To install eGit, use the following update site:
Eclipse 4.2 (Juno) - http://download.eclipse.org/releases/juno
Choose to install eGit (the visual tooling for git) and jGit (a java-based implementation of git),
No need to restart.
Install the subversive connector
You will be prompted to install a subversion connector in order for your subversive plugin to actually call subversion commands. If the dialog doesn't pop up automatically, then go to Preferences -> Team -> SVN.
When the discovery dialog appears, choose a connector. I'd recommend SVN Kit 1.3.5.
Checkout Source from SVN
Checkout Source from git
The canonical Groovy-Eclipse repository is located at github. Use this command to
If you are running git from the command line, use the following command to clone the repository:
Have a cup of coffee or a beer while the project is importedcloned.
After the dialog goes awaycloning is complete, you will most of the relevant Groovy-Eclipse projects in your workspace. There are two that are missing: org.codehaus.groovy.m2eclipse (provides the m2eclipse integration), and org.codehause.groovy.frameworkadapter (a bundle fragment that chooses which compiler version to start with, and not chosen because having this bundle in your workspace can make it hard to launch runtime workbenches).
The projects are organized into working sets. To see the working sets better, click on the down arrow in the package explorer -> Top Level elements -> Working sets. All projects should be compiling with no errors.
must import the projects into your Eclipse workspace. Click on File → Import → Existing projects into workspace. Choose the top-level git repository folder and search for all projects recursively. You will see something like this, with many, many projects available for import:
Or, you can clone from inside of eGit. Use the git repository url above and follow the directions on the eGit documentation.
You do not need to import all projects, and some projects conflict with each other. Here are some suggestions on what to import:
- IMPORTANT: there are multiple org.eclipse.jdt.core projects. These projects contain the patched Eclipse Java compiler and are specific to a single version of Eclipse. Only import the single project that matches your Eclipse level (e.g., E36, E37, or E42). To determine which project is appropriate for your eclipse level, look at the path to each of these projects, and you will see a segment like: jdt-patch/e42. Match your eclipse level to the path. If you do not follow this step, you will see compile errors in the imported projects.
- The projects org.codehaus.groovy16, org.codehaus.groovy18, and org.codehaus.groovy20 projects contain the groovy 1.6, 1.8, and 2.0 compilers respectively. The org.codehaus.groovy project contains the groovy 1.7 compiler. It is not necessary to import all of these projects. If you import more than one compiler project, then the latest one will take precedence over the earlier ones.
- The org.codehaus.groovy.m2eclipse project requires m2eclipse to be installed in your target Eclipse. If m2eclipse is not available, there will be compile errors. This project provides maven integration when running in an Eclipse workbench. You do not need to import this project unless you intend to work on maven integration.
- Any project that contains the word test contains unit tests. It is recommended to import these projects.
- Any project prefixed with Feature as well as the Site Groovy does not contain code and can be ignored unless you know that you need it.
- Any project prefixed with groovy-eclipse- is part of the maven compiler plugin for groovy-eclipse. You only need to import these projects if you plan on working on the maven support.
- The org.codehaus.groovy.eclipse.pluginbuilder project contains the releng code to build Groovy-Eclipse and publish the update site.
Run the tests
Optionally, you may want to run the tests. Do Run As->JUnit plugin test on org.codehause.groovy.alltests.