This page is now deprecated. Groovy-Eclipse has moved to git. See Getting Started With Groovy-Eclipse Source Code instead.
|Table of Contents|
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 Groovy-Eclipse plugin.
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 eclipse.org instead.
- Eclipse or 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 Groovy-Eclipse, 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.
- subversion 1.6.6
- libsvn-java 1.6.6
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:
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). If you chose to go with the "pure java" option rather than native libraries, pick the most recent "full java" version (1.1.7 at the time of this writing, for Eclipse 3.6).
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)
Step 3.c: Eclipse Java Library Path
If you are on Linux, and you did not choose the "pure Java" install, you may still need to tell Eclipse (or STS) about the installed JavaHL libraries. If you chose a pure java SVN install you can skip this step.
Note: The "win32 only" comment in the version info seems untrue, things work just fine under Linux, so just ignore it.
Step 4: Install Groovy-Eclipse into your Eclipse
Some of the projects contain Groovy code, so we need to have Groovy support installed.
In STS it can also be installed via the Dashboard from the Extensions Tab.
Step 5: Checkout Source from SVN
In SVN repository explorer: Add SVN repository location: https://svn.codehaus.org/groovy/eclipse
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: If you get an Out of Memory Error like this (I got this in STS)
java.lang.OutOfMemoryError: PermGen space at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632) at java.lang.ClassLoader.defineClass(ClassLoader.java:616) ...