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
Sign Up
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><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</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. 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</p><p>These instructions are meant for Eclipse 3.7 (Indigo) or Eclipse 4.2 (Juno).</p><h2>Download and Install Eclipse</h2><p>Download and unzip Eclipse for RCP/Plug-in Developers from <a href="http://eclipse.org/downloads">http://eclipse.org/downloads</a>. Choose the appropriate version for your architecture.</p><p><em>Ubuntu note</em>: Don't install Eclipse from the Ubuntu repositories download it manually from <a class="external-link" href="http://eclipse.org/" rel="nofollow">eclipse.org</a> instead.</p><h2>Install git</h2><p>Groovy-Eclipse is available from github. To work with github, you need to have git installed on your machine. <a href="http://help.github.com/">Github has some good documentation</a> for a gentle introduction into git and it explains how to install the command line tools.</p><h2>Install eGit (Optional)</h2><p><a href="http://eclipse.org/egit">eGit</a> 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.</p><p>To install eGit, use the following update site:</p><table class="wysiwyg-macro" data-macro-name="info" style="background-image: url(/plugins/servlet/confluence/placeholder/macro-heading?definition=e2luZm99&locale=en_GB&version=2); background-repeat: no-repeat;" data-macro-body-type="RICH_TEXT"><tr><td class="wysiwyg-macro-body"><p>Eclipse 4.2 (Juno) - <a href="http://download.eclipse.org/releases/juno">http://download.eclipse.org/releases/juno</a></p><p>Eclipse 3.7 (Indigo) - <a href="http://download.eclipse.org/releases/juno">http://download.eclipse.org/releases/</a><a href="http://download.eclipse.org/releases/indigo">indigo</a></p></td></tr></table><p>Choose to install <strong>eGit </strong>(the visual tooling for git)<strong> </strong>and<strong> jGit </strong>(a java-based implementation of git),</p><p>No need to restart.</p><h2>Install Groovy-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 from the update site for the latest snapshot:</strong></p><table class="wysiwyg-macro" data-macro-name="info" style="background-image: url(/plugins/servlet/confluence/placeholder/macro-heading?definition=e2luZm99&locale=en_GB&version=2); background-repeat: no-repeat;" data-macro-body-type="RICH_TEXT"><tr><td class="wysiwyg-macro-body"><p><a href="http://dist.codehaus.org/groovy/distributions/greclipse/snapshot/e3.7/">http://dist.codehaus.org/groovy/distributions/greclipse/snapshot/e3.7</a></p><p>or</p><p><a href="http://dist.codehaus.org/groovy/distributions/greclipse/snapshot/e4.2/">http://dist.codehaus.org/groovy/distributions/greclipse/snapshot/e4.2</a></p></td></tr></table><p><strong>Now, restart.</strong></p><h2>Import Groovy-Eclipse source code into your workspace (the simple way)</h2><p>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 <em>Groovy-Eclipse team project set </em><a href="https://raw.github.com/groovy/groovy-eclipse/master/groovy-eclipse-project-set.psf">groovy-eclipse-project-set.psf</a>. 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. Currently, the psf file requires Eclipse 4.2.x.</p><h2>Import Groovy-Eclipse source code into your workspace (the complicated way)</h2><p>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.</p><p>If you are running git from the command line, use the following command to clone the repository:</p><table class="wysiwyg-macro" data-macro-name="info" style="background-image: url(/plugins/servlet/confluence/placeholder/macro-heading?definition=e2luZm99&locale=en_GB&version=2); background-repeat: no-repeat;" data-macro-body-type="RICH_TEXT"><tr><td class="wysiwyg-macro-body"><p>git clone <a href="git://github.com/groovy/groovy-eclipse.git">git://github.com/groovy/groovy-eclipse.git</a></p></td></tr></table><p>Have a cup of coffee or a beer while the project is cloned.</p><p>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:</p><p><img class="confluence-embedded-image" width="300" src="/download/attachments/231080174/project_import.png?version=1&modificationDate=1369434557725" data-image-src="/download/attachments/231080174/project_import.png?version=1&modificationDate=1369434557725" data-linked-resource-id="231375796" data-linked-resource-type="attachment" data-linked-resource-default-alias="project_import.png" data-base-url="http://docs.codehaus.org" data-linked-resource-container-id="231080174" title="null > project_import.png" data-element-title="project_import.png"></p><p>Or, you can clone from inside of eGit. Use the git repository url above and follow the <a href="http://wiki.eclipse.org/EGit/User_Guide#Starting_from_existing_Git_Repositories">directions on the eGit documentation</a>.</p><p>You do not need to import all projects, and some projects conflict with each other. Here are some suggestions on what to import:</p><ul><li><strong>IMPORTANT:</strong> there are multiple <em>org.eclipse.jdt.core</em> 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: <em>jdt-patch/e42</em>. Match your eclipse level to the path. <strong>If you do not follow this step, you will see compile errors in the imported projects.</strong></li><li>The projects <em>org.codehaus.groovy16</em>, <em>org.codehaus.groovy18</em>, and <em>org.codehaus.groovy20</em> projects contain the groovy 1.6, 1.8, and 2.0 compilers respectively. The <em>org.codehaus.groovy</em> 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.</li><li>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.</li><li>Any project that contains the word <em>test </em>contains unit tests. It is recommended to import these projects.</li><li>Any project prefixed with <em>Feature</em> as well as the <em>Site Groovy</em> does not contain code and can be ignored unless you know that you need it.</li><li>Any project prefixed with <em>groovy-eclipse-</em> 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.</li><li>The org.codehaus.groovy.eclipse.pluginbuilder project contains the releng code to build Groovy-Eclipse and publish the update site.</li></ul><h2>Run the tests</h2><p>Optionally, you may want to run the tests. Do <strong>Run As->JUnit plugin test</strong> on <strong>org.codehause.groovy.alltests.</strong></p><p><strong>Note:</strong> There are two separate sets of tests in alltests plugin:</p><ul><li>AllGroovyTests.java — the UI tests (content assist, navigation, refactoring, etc) takes ~35-45 minutes to run</li><li>GroovyJDTTests.java — the core tests (parser, compiler integration, type inferencing, searching, etc) takes ~10-15 minutes to run</li></ul><p>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.</p><p><strong>Note:</strong> If you get an Out of Memory Error like this:</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><h2>Now, look for some interesting bugs to work on</h2><p>See the list in jira. All the issues labelled <a href="http://jira.codehaus.org/secure/IssueNavigator.jspa?reset=true&jqlQuery=project+%3D+GRECLIPSE+AND+labels+%3D+help-requested+AND+status+in+%28Open%2C+%22In+Progress%22%2C+Reopened%29">help requested</a> are a good place to start. Also, you can contact the <a href="http://xircles.codehaus.org/lists/eclipse-plugin-dev@groovy.codehaus.org">eclipse plugin dev mailing list</a> and we can help you out.</p>
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