Dónal
Dónal

Reputation: 187499

IntelliJ run configuration for Grails environment

In IntelliJ, I want to create a run configuration that will execute run-app in a custom environment named "demo". The following works fine on the command-line

grails run-app -Dgrails.env=demo

But inside IntelliJ, if I enter either

run-app -Dgrails.env=demo

or

-Dgrails.env=demo run-app

in the "Command line" field of the "Run/Debug Configuration" dialog, neither of them start the app in the correct environment.

Upvotes: 7

Views: 3646

Answers (1)

Sergey
Sergey

Reputation: 841

Run Configuration dialog has separated text fields for jvm options and command arguments. You have to put '-Dgrails.env=demo' to 'VM options' field.

Upvotes: 12

Related Questions