GRAILS_OPTS environment variable not used

Hello

Under Windows (XP) I'm using the GRAILS_OPTS environment variable to set the .grails and .ivy2 directories:

GRAILS_OPTS=-Dgrails.work.dir=C:\Local\grails\.grails -Divy.default.ivy.user.dir=C:\Local\grails\.ivy2

(I'm doing this b/c my user_home directory is a share drive which significantly impacts performance)

When I use Grails from IntelliJ it ignores this and just uses the default directories in my user home.  This appears to be happening because IntelliJ does not use the grails execution scripts / batch files provided in the grails installation, but instead calls java directly.  

Is there a way I can either get IntelliJ to use the GRAILS_OPTS variable, add these options to the Grails execution line, or change some setting in IntelliJ to change the location of these directories?

Alternatively, if I could adjust the location of user_home in IntelliJ, that would work too.

Thanks,
Dave

using
IntelliJ 10.5.1
   build IU-107-322
   jdk1.6.0_22

1 comment
Comment actions Permalink

It's incorrect behaviour, I've created issue http://youtrack.jetbrains.net/issue/IDEA-73598 in bug tracker.

As workaround you can specify 'grails.work.dir' and 'ivy.default.ivy.user.dir' in BuildConfig, example:

grails.project.work.dir="C:\Local\grails\.grails"
System.setProperty("ivy.default.ivy.user.dir", "C:\Local\grails\.ivy2")
0

Please sign in to leave a comment.