Below is a step-by-step list of instructions that takes you through the process of setting up an Eclipse environment for building the Groovy-Eclipse plugin. These instructions were written while going through the process on a Mac OS Lion machine. Except for choosing an Eclipse and installing git, the process is similar no matter which OS and architecture you are using
These instructions are meant for Eclipse 3.7 (Indigo) or Eclipse 4.2 (Juno).
Download and unzip Eclipse for RCP/Plug-in Developers from http://eclipse.org/downloads. Choose the appropriate version for your architecture.
Ubuntu note: Don't install Eclipse from the Ubuntu repositories download it manually from eclipse.org instead.
Groovy-Eclipse 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.
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:
Choose to install eGit (the visual tooling for git) and jGit (a java-based implementation of git),
No need to restart.
Some of the projects contain Groovy code, so we need to have Groovy support installed.
Preferably, the latest version of Groovy Eclipse should be installed, which can be obtained from the update site for the latest snapshot. Now, restart.
See getting a developer build for more information on where to get the development snapshots.
The canonical Groovy-Eclipse repository is located at github. The easiest way to import the source code into your workspace is to use the following Groovy-Eclipse team project set groovy-eclipse-e42-project-set.psf for Eclipse Juno, or groovy-eclipse-e43-project-set.psf for Eclipse Kepler. To use, go to File -> Import... -> Team project set and paste the URL. Importing the team project set will take a long time since the entire repository needs to be cloned.
You can ignore this section if you imported the source code the simple way. This section provides a more detailed description of which projects to import and how to do it if you are not using the psf file above.
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 cloned.
After cloning is complete, you 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:
Optionally, you may want to run the tests. Do Run As->JUnit plugin test on org.codehause.groovy.alltests.
Note: There are two separate sets of tests in alltests plugin:
At the time when I wrote this, *running both test suites at once resulted in a number of test failures* in the GroovyJDTTests suite. Running both the suites separately I got no such failures.
Note: If you get an Out of Memory Error like this:
You can increase the size of PermGen space in "Run As -> Run Configurations"
Add this to VMArguments: