Beware of symbolic links in Groovy/Grails setting dialog

Some time ago I set up groovy-1.5.4 and grails-1.0.2 and then used symbolic links named groovy and grails to point at the respective actual install directories. I figured this would allow me to change version for the command line when the next version comes out by just re-targeting the symlink. In the JetGroovy Groovy/Grails setting dialog I used the symbolic links as well and everything seemed to work fine.

So I upgraded to Groovy-1.5.6 and Grails-1.0.3 and fixed up the symlinks and it should all work yes?

Well not exactly, the command line was okay but starting IDEA it said it would upgrade the grails project which had already been upgraded on the command line and then IDEA went into an endless loop. After starting IDEA again any constraints = GORM clause said as a warning (yellow highlight) not able to assign null to class Object. I renamed the project directory and started again, moved in the domain and scaffolding only controller classes with the same result. When I went to the Groovy/Grails setting dialog and instead used the real directories instead of the symlinks IDEA did a lot of work as it relinked to the new versions and the project started to behave properly.

It appears IDEA is not able to detect a change in the symlink and therefore should be given the actual install directory.

Edited by: Ron McOuat on Jun 10, 2008 3:28 AM

1 comment
Comment actions Permalink

This is a limitation in IDEA core - it is not able to monitor external changes for files linked via symlinks.


Please sign in to leave a comment.