How-To: Change Grails User work and cache directory under windows

Focus On Content  ~/ click me to toggle the navigation bar to the right

The directions below will help you move the Grails user work and cache directory to a different location.

Why?

Sometimes your default “primary drive” may be running out of space and you need to move your workspace else where.

How?

  1. Create a file called “settings.groovy” under “C:/Users/.grails” directory.

  2. Edit this file and add the following line: [sourcecode language=“jscript”]

grails.work.dir=“D:/grailswork”

[/sourcecode]

  1. Make sure that the defined folder exists.

  2. Remove all other content, files and folders in the “.grails” folder.

Your are all set