My guess is that things are not hanging here, but just progressing really, really slowly. In older versions of the groovy compiler, unresolved classes would not be cached. So, every time an unresolvable class was found, even if the compiler had just tried to resolve it, another resolve attempt would occur. Resolve attempts are very, very slow, especially when they fail.
With later versions of 1.8.6, and 2.0, we are now caching unresolved classes and this situation should be much slower.
Is this still a problem for you? If so, there may be something else going on.