Grails Development with Eclipse

02 Mar 2018

Tags: IDE

In this blog post, we show the steps necessary to setup Eclipse IDE to develop Grails 3 applications.

Groovy Eclipse

First step is to install Groovy Eclipse. Check the installation instructions.

Once, you have setup Groovy Eclipse setup the Compiler to use Groovy 2.4.13; the version used by the latest stable release of Grails 3.3.2.

Setup Groovy Compiler at Eclipse

Eclipse Spock Plugin

Install Eclipse Spock Plugin

Eclipse Spock Plugin

Buildship Gradle plugin

Install Buildship Gradle plugin.

Buildship Gradle plugin

We are going to rely on Gradle tasks to drive our Grails development in Eclipse. Thus, you may want to enable Gradle views.

Buildship Gradle plugin

Gradle Tips

When you work often with Gradle it becomes useful to get a verbose output while you run your tests:

tasks.withType(Test) {
      beforeTest { descriptor -> logger.quiet " -- $descriptor" }
     testLogging {
         events "passed", "skipped", "failed"
         exceptionFormat 'full'

Common Grails Gradle Tasks

Run your app

./gradlew bootRun

Run unit tests

./gradlew test

Run integration/functional tests

./gradlew integrationTest

Run ALL tests unit/integration/functional

./gradlew check


./gradlew clean

Build your artifacts

./gradlew assemble

Dependency Report:

./gradlew dependencies

Published on 02 Mar 2018