Setting up Groovy and Grails on Ubuntu 11.04

After upgrading my Ubuntu since 8.04 to 10.10 as a regular system upgrade my system started becoming really slow. So, I decided to do a clean install of Ubuntu 11.04.
As I am going through this I wanted to document the process of setting up Ubuntu 11.04 with Groovy and Grails.(Note: I have Ubuntu 64 bit installed, there may be extra steps I may had to do compared to 32 bit.)

1. Installing JDK
As a first steps, we will have to install JDK.
Lets run the following command to install the JDK on the system

$ sudo apt-get install sun-java6-bin sun-java6-jre sun-java6-jdk

2. Installing Eclipse
a. Let’s grab the latest version of eclipse from the eclipse.org website
http://www.eclipse.org/downloads/

b. I got the “Eclipse IDE for Java EE Developers” (64- bit version as my Ubuntu is 64 bit)

c. After you obtain the zip, simiply unzip the content to the home folder. This should result in structure like “/home/manijshrestha/eclipse”

3. Groovy Eclipse plug-in
You can follow the instructions in groovy website in
http://groovy.codehaus.org/Compiler+Switching+within+Groovy-Eclipse

a. go to “Help>Install New Software… ”
b. Put “http://dist.codehaus.org/groovy/distributions/greclipse/snapshot/e3.6/” and hit enter
c. Install “Groovy-Eclipse”, “Groovy Eclipse SDK” and “Extra Groovy Compilers”

4. Grails Install
For grails, spring source provides with STS plugin for eclipse, Lets install that,
For that, Similar to Groovy Install, lets install the STS plug-in. Lets follow the steps below

a. go to “Help>Install New Software… ”

b. Click on “Add” Button and put following URL
http://dist.springsource.com/release/TOOLS/update/e3.6
(you can give a name like “Spring STS” etc)

c. Click on “Add” Button again to add URL for dependencies:
http://dist.springsource.com/release/TOOLS/composite/e3.6
(you can give name like “Spring Dependencies”)

d. Back in the “Install New Software” window, choose to work with: ”SpringSource update site for Eclipse 3.6 Release”

e. Select ”SpringSource Tool Suite Grails Support” under the category ”Extensions / STS”

f. Press the Next button and follow the wizard to complete the installation. The installation might seem to be stuck at zero percent for a couple of minutes, just be patient. You will also get a warning that you are trying to install unsigned content which is normal in this case.

g. Re-start eclipse as prompted and you are DONE!
(you can verify the settings by going to File>New>Other – You should see “Groovy” and “Grails” listed…)

Note
These plug-ins are installed inside Eclipse so in the “Terminal” you may not see a result if you do “groovy -version” or “grails -version”.

I will post on how to manually install Groovy and Grails on Ubuntu in my next Post.
(References: http://blog.callistaenterprise.se/2011/01/13/setting-up-your-eclipse-environment-for-groovy-and-grails/)

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s