Skip to content
Skip to breadcrumbs
Skip to header menu
Skip to action menu
Skip to quick search
Quick Search
Browse
Pages
Blog
Labels
Attachments
Mail
Advanced
What’s New
Space Directory
Feed Builder
Keyboard Shortcuts
Confluence Gadgets
Log In
Dashboard
Groovy
Copy Page
You are not logged in. Any changes you make will be marked as
anonymous
. You may want to
Log In
if you already have an account. You can also
Sign Up
for a new account.
This page is being edited by
.
Paragraph
Paragraph
Heading 1
Heading 2
Heading 3
Heading 4
Heading 5
Heading 6
Preformatted
Quote
Bold
Italic
Underline
More colours
Strikethrough
Subscript
Superscript
Monospace
Clear Formatting
Bullet list
Numbered list
Outdent
Indent
Align left
Align center
Align right
Link
Table
Insert
Insert Content
Image
Link
Attachment
Symbol
Emoticon
Wiki Markup
Horizontal rule
tinymce.confluence.insert_menu.macro_desc
Info
JIRA Issue
Status
Gallery
Tasklist
Table of Contents
Other Macros
Page Layout
No Layout
Two column (simple)
Two column (simple, left sidebar)
Two column (simple, right sidebar)
Three column (simple)
Two column
Two column (left sidebar)
Two column (right sidebar)
Three column
Three column (left and right sidebars)
Undo
Redo
Find/Replace
Keyboard Shortcuts Help
<p>This page is now deprecated. Groovy-Eclipse has moved to git. See <a class="confluence-link" href="/display/GROOVY/Getting+Started+With+Groovy-Eclipse+Source+Code" data-linked-resource-id="152207389" data-linked-resource-type="page" data-linked-resource-default-alias="Getting Started With Groovy-Eclipse Source Code" data-base-url="http://docs.codehaus.org">Getting Started With Groovy-Eclipse Source Code</a> instead.</p><p><img class="editor-inline-macro" src="/plugins/servlet/confluence/placeholder/macro?definition=e3RvYzppbmRlbnQ9MHB4fG1pbkxldmVsPTJ8b3V0bGluZT10cnVlfQ&locale=en_GB&version=2" data-macro-name="toc" data-macro-parameters="indent=0px|minLevel=2|outline=true"></p><h1>Building Groovy Eclipse in Eclipse (on Ubuntu 10.04)</h1><p>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.</p><p>These instructions where written while going through the process on an Ubuntu 10.04 machine. So in places they are specific to that environment.</p><p>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.</p><h2>Step 1: Install Eclipse</h2><p>Install one of</p><ul><li>Eclipse for RCP/Plug-in Developers (183 MB)</li><li>Ubuntu note: Don't install Eclipse from the Ubuntu repositories download it manually from <a href="http://eclipse.org">eclipse.org</a> instead.</li><li><a href="http://eclipse.org/downloads">Eclipse</a> or <a href="http://www.springsource.com/products/eclipse-downloads">STS</a> pick and install the package appropriate for your OS.</li></ul><p>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.</p><h2>Step 2: Install Subversion on your machine</h2><p>We'll need to checkout the Groovy sources from SVN. There are two options available for installing Eclipse support for subversion.</p><ul><li>Subversive from the <a href="http://eclipse.org">Eclipse.org</a> repositories (recommended)</li><li>Subclipse from <a href="http://subclipse.tigris.org/">http://subclipse.tigris.org/</a></li></ul><p><strong>Note:</strong> For Subversive, it is possible to skip this step (OS install of subversion) entirely as there is a "Full Java" version of the backend libraries. I recommend this option since it is the easiest, most painless install process. If you choose this path, skip to Step 3.</p><p><strong>In Ubuntu (10.04):</strong></p><p>Open Synaptic and search for subversion.</p><p>I found and installed both of the following:</p><ul><li>subversion 1.6.6</li><li>libsvn-java 1.6.6</li></ul><h2>Step 3: Install Eclipse support for Subversion</h2><p>If you have something already installed, you may just want to go with that. Otherwise choose either Subversive or Subclipse and follow instructions below.</p><h3>Step 3.a: Subversive Install</h3><p>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:</p><ul><li>Subversive SVN Team Provider</li><li>Subversive SVN Integration for the Mylin project (optional)</li></ul><p>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).</p><h3>Step 3.b: Subclipse Install</h3><p>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)</p><p>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.</p><p>With version 1.6.6 of the JavaHL (libsvn-java) we need to install the <a href="http://subclipse.tigris.org/wiki/JavaHL#head-5ccce53a67ca6c3965de863ae91e2642eab537de">corresponding Subclipse</a> version: 1.6.x.</p><p>This can be installed from the Subclipse 1.6 update site:</p><p><a href="http://subclipse.tigris.org/update_1.6.x">http://subclipse.tigris.org/update_1.6.x</a></p><h3>Step 3.c: Eclipse Java Library Path</h3><p>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. <strong>If you chose a pure java SVN install you can skip this step.</strong></p><p><strong>Ubuntu 10.04 with Eclipse RCP</strong></p><p>Add the library path into the <strong>eclipse.ini</strong> file in the eclipse installation directory. In my case, I manually installed Eclipse into my home directory so I added</p><p>-Djava.library.path=/usr/lib/jni</p><p>to the end of ~/Applications/eclipse/eclipse.ini</p><p>Make sure this line is placed somewhere after the -vmargs line.</p><p><strong>Ubuntu (10.04) with STS (2.3.2)</strong></p><p>Add the library path into the <strong>STS.ini</strong> file in the STS installation directory. In my case, I manually installed Eclipse into my home directory so I added</p><p>-Djava.library.path=/usr/lib/jni</p><p>to the end of ~/Applications/springsource/sts-2.3.2.RELEASE/STS.ini</p><p>Make sure this line is placed somewhere after the -vmargs line.</p><p>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.</p><p>Note: The "win32 only" comment in the version info seems untrue, things work just fine under Linux, so just ignore it.</p><h2>Step 4: Install Groovy-Eclipse into your Eclipse</h2><p>Some of the projects contain Groovy code, so we need to have Groovy support installed.</p><p><strong>Preferably, the latest version of Groovy Eclipse should be installed, which can be obtained</strong></p><p><strong>from the update site for the latest snapshot:</strong></p><p><a href="http://dist.codehaus.org/groovy/distributions/greclipse/snapshot/e3.6/">http://dist.codehaus.org/groovy/distributions/greclipse/snapshot/e3.6/</a></p><p><strong>Alternately, the following update site can be used to get the latest release, but this might be a bit outdated:</strong></p><p><a href="http://dist.springsource.org/release/GRECLIPSE/e3.6/">http://dist.springsource.org/release/GRECLIPSE/e3.6/</a></p><p>In <a href="http://www.springsource.com/products/eclipse-downloads">STS</a> it can also be installed via the Dashboard from the Extensions Tab.</p><h2>Step 5: Checkout Source from SVN</h2><p>In SVN repository explorer: Add SVN repository location: <a href="https://svn.codehaus.org/groovy/eclipse">https://svn.codehaus.org/groovy/eclipse</a></p><ul><li>trunk<ul><li>base (contains plugins for compiler integration)<ul><li>org.codehaus.groovy</li><li>...</li></ul></li><li>base-test (contains plugins that test the compiler integration)<ul><li>org.eclipse.jdt.groovy.core.tests.builder</li><li>...</li></ul></li><li>extras (contains Groovy-Eclipse m2eclipse integration and the groovy-eclipse-compiler plugin for maven as well as some test projects.)<ul><li>...</li></ul></li><li>ide (contains ui plugins)<ul><li>...</li></ul></li><li>ide-test (contains ui test plugins)<ul><li>...</li></ul></li><li>jdt-patch (contains the JDT core patch plugins...only check out the branch corresponding to the eclipse version you have as your target environment)<ul><li>e36 (JDT patch and related plugins targeting Eclipse 3.6)<ul><li>...</li></ul></li><li>e37 (JDT patch and related plugins targeting Eclipse 3.7)<ul><li>...</li></ul></li></ul></li></ul></li></ul><p>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. <strong>You must select only the projects (e.g. org.codehaus.groovy), but not the directories base, base-test, ... themselves.</strong></p><p>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.</p><h2>Step 6: Run the tests</h2><p>Do <strong>Run As->JUnit plugin test</strong> on <strong>org.codehause.groovy.alltests.</strong></p><p><strong>Note 1:</strong> There are two separate sets of tests in alltests plugin:</p><ul><li>AllGroovyTests.java</li><li>GroovyJDTTests.java</li></ul><p>At the time when I wrote this, *running both test suites at once resulted in a number of test<br /> failures* in the GroovyJDTTests suite. Running both the suites separately I got no such failures.</p><p><strong>Note:</strong> If you get an Out of Memory Error like this (I got this in STS)</p><table class="wysiwyg-macro" data-macro-name="code" style="background-image: url(/plugins/servlet/confluence/placeholder/macro-heading?definition=e2NvZGV9&locale=en_GB&version=2); background-repeat: no-repeat;" data-macro-body-type="PLAIN_TEXT"><tr><td class="wysiwyg-macro-body"><pre>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) ... </pre></td></tr></table><p>You can increase the size of PermGen space in "Run As -> Run Configurations"</p><p>Add this to VMArguments:</p><table class="wysiwyg-macro" data-macro-name="code" style="background-image: url(/plugins/servlet/confluence/placeholder/macro-heading?definition=e2NvZGV9&locale=en_GB&version=2); background-repeat: no-repeat;" data-macro-body-type="PLAIN_TEXT"><tr><td class="wysiwyg-macro-body"><pre>-XX:MaxPermSize=256m</pre></td></tr></table>
Please type the word appearing in the picture.
Attachments
Labels
Location
Watch this page
< Edit
Preview >
Loading…
Save
Cancel
Next hint
search
attachments
weblink
advanced