Show Navigation

Grails® Development with Groovy Eclipse

By Sergio Del Amo Caballero

March 2, 2018

Tags: #groovy #eclipse #gradle

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

Groovy Eclipse

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

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

Set up 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.

Gradle Views

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

Clean

./gradlew clean

Build your artifacts

./gradlew assemble

Dependency report

./gradlew dependencies

You might also like ...