Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Next »

Building Groovy Eclipse in Eclipse on Ubuntu 10.04

Below is a step-by-step list of instructions that takes you through the process of setting up an Eclipse environment for building the Greclipse plugin.

These instructions where written while going through the process on an Ubuntu 10.04 machine. So in places they are specific to that environment.

If someone tries these instructions in a different environment (say Mac OS X or Windows) it would be nice to provide a copy of this page with appropriate modifications for those environments.

Step 1: Install Eclipse

Install one of

  • Eclipse for RCP/Plug-in Developers (183 MB)
  • Ubuntu note: Don't install Eclipse from the Ubuntu repositories download it manually from instead.
  • Eclipse STS pick and install the package appropriate for your OS.

I prefer to install Eclipse RCP instead of STS. The main reason is that the RCP plugin environment comes with all the source code for JDT plugins, which is quite useful while working on Greclipse, which heavily subclasses from JDT.

Step 2: Install Subversion on your machine

We'll need to checkout the Groovy sources from SVN. There are two options available for installing Eclipse support for subversion.

In both cases you will probably need to install subversion itself on your machine. The process differs depending on OS.

In Ubuntu (10.04):

Open Synaptic and search for subversion.

I found and installed both of the following:

  • subversion 1.6.6
  • libsvn-java 1.6.6

Note: For Subversive, it may be possible to skip this step (OS install of subversion) entirely as there is a "Full Java" version of the backend libraries. I haven't actually tried this however. If someone does a "Pure Java" install it would be good to update these notes with more info on that.

Step 3: Install Eclipse support for Subversion

If you have something already installed, you may just want to go with that. Otherwise choose either Subversive or Subclipse and follow instructions below.

Step 3.a: Subversive Install

To install subversive, you go through the Galileo update site (under "Help >> Install New Software"). You don't need to add it, it should already be there (with a standard install of Eclipse or STS). Under the Collaboration category find and install:

  • Subversive SVN Team Provider
  • Subversive SVN Integration for the Mylin project (optional)

After installing these and restarting Eclipse, you will be prompted to install an SVN connector package. Pick a version that matches your install of subversion (e.g. I installed the JavaHL 1.6 connector to match the version installed in my OS).

Step 3.b: Subclipse Install

As an alternative to Subversive you can install Subclipse instead. (Note: It is probably a bad idea to install both of them at the same time)

Before installing Subclipse, check which version you need to install. Essentially it depends on which version of subversion and the JavaHL library you have installed in your OS. It is recommended to get the more recent version of JavaHL and SVN to be able to install the more recent version of subclipse plugin.

With version 1.6.6 of the JavaHL (libsvn-java) we need to install the corresponding Subclipse version: 1.6.x.

This can be installed from the Subclipse 1.6 update site:

Step 3: Eclipse Java Library Path

If you are on Linux, you still need to tell Eclipse (or STS) about the installed JavaHL libraries.

Ubuntu 10.04 with Eclipse RCP

Add the library path into the eclipse.ini file in the eclipse installation directory. In my case, I manually installed Eclipse into my home directory so I added


to the end of ~/Applications/eclipse/eclipse.ini

Make sure this line is placed somewhere after the -vmargs line.

Ubuntu (10.04) with STS (2.3.2)

Add the library path into the STS.ini file in the STS installation directory. In my case, I manually installed Eclipse into my home directory so I added


to the end of ~/Applications/springsource/sts-2.3.2.RELEASE/STS.ini

Make sure this line is placed somewhere after the -vmargs line.

You may want to check whether the JavaHL library is properly installed: in Eclipse Preferences >> Team >> SVN >> SVN Connector it should display the version of the library if it is properly installed.

Note: The "win32 only" comment in the version info seems untrue, things work just fine under Linux, so just ignore it.

Step 4: Install GREclipse (Groovy Eclipse)

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:

Alternately, the following update site can be used, albeit an older version:

In STS it can also be installed via the Dashboard from the Extensions Tab. (I have not tried this method)

Step 5: Checkout Source from SVN

In SVN repository exlorer: Add SVN repository location:

Under branches/E35 we find the following structure.

  • E35
    • base
      • org.codehaus.groovy
      • ...
    • base-test
      • org.eclipse.jdt.groovy.core.tests.builder
      • ...
    • extras
      • ...
    • ide
      • ...

Each of the directories base, base-test, extras and ide contains a number of eclipse projects. Check out all the projects except those in extras. You must select only the projects (e.g. org.codehaus.groovy), but not the directories base, base-test, ... themselves.

This can be done easily as follows: You can select multiple projects by control-clicking on each project. When all projects are selected do a "check out as project" (subclipse) or "check out" (subversive) to check them out all at once.

Step 6: Run the tests

Do Run As->JUnit plugin test on org.codehause.groovy.alltests.

Note 1: 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 (I got this in STS)

You can increase the size of PermGen space in "Run As -> Run Configurations"

Add this to VMArguments:

  • No labels