Skip to content

Grails 3.2 and eclipse Neon 4.6

March 4, 2017

Intellij is the only IDE which officially supports Grails 3.x.  It costs an iphone a year just to edit your petstore project.

So what are the other options.  The excellent, and in my opinion, superior GGTS  is sadly no longer developed, and stopped support at Grails 2.5.

But you can edit and run grails 3.2 in eclipse Neon.  You don’t get the wizards, but this can be done on the command line.

Install

  1. Install java 1.8 JDK (aka SE)
  2. Install Grails
    1. download from here 
    2. unzip e.g. to c:\dev
    3. set GRAILS_HOME=C:\dev\grails-3.2.6
    4. add %GRAILS_HOME%\bin to PATH.
    5. see guide
  3. Install Eclipse
    1. Download the latest eclipse from here. I chose the J2EE edition.
    2. Unzip it somewhere handy (e.g. c:\dev\eclipse)
    3. make a short cut of the c:\dev\eclipse\eclipse.exe and
    4. run it.
  4. install Groovy in eclipse
    1. Help->Install new Software -> Add..
    2. Set location to: http://dist.springsource.org/snapshot/GRECLIPSE/e4.6/
    3. Note, if you have a version of eclipse newer than Neon, which is 4.6, update the URL above to match the eclipse version
    4. Select:
      1. Groovy Compiler 2.4 feature
      2. Groovy Eclipse feature
    5. hit Next, accept terms, wait till installed, restart eclipse, bla bla etc.
  5. Install gradle support.  In theory, neon is supposed to have the eclipse buildship plugin installed, but mine didn’t.
    1. Help->Install new Software -> Add..
    2. Set location to: http://download.eclipse.org/buildship/updates/e46/releases/2.x
    3. select “buildship: Eclipse plug-ins for gradle”
    4. Hit Next, accept, wait, restart, bla bla

Now you should be ready to import a grails project.

Make one via the command line, e.g.

grails create-app bottom

Import he project into eclipse.

  1. In eclipse: File->Import->Gradle->Existing Gradle Project
  2. Select root of the grails app folder (bottom in this case)
  3. Chose “Grade Wrapper”.  No idea what this is, but seems to work.  It creats a bunch of files in your project root dir.

 

Run the project.

At the bottom window in eclipse you should see “Gradle Tasks”

gradle1

Under this, you should see your project, and several subdirectories.

One of them is “application”.  under this is “bootRun”.

Double click this. it should work (if nothing is running on port 8080)

See Ted Vinke’s article for more info.

 

 

 

 

 

 

Advertisements

From → dev

Leave a Comment

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

%d bloggers like this: