Test classes unable to resolve normal classes for Grails 2.5.0 project in 14.1.3

When I try to build my Grails 2.5.0 project from scratch in IntelliJ 14.1.3 (via menu Vuild -> Rebuild Project), I get groovyc errors that my test classes cannot resolve my normal classes, like:

Error:(, ) Groovyc: unable to resolve class ...

How can I fix this?

IntelliJ is running in Java 8u45, the project build with Java 8u31 since later versions aren't compatible with Grails, and I'm on Mac OS X 10.10.3, with all updates applied.

If necessary, I can try to attach my config file(s) later, I just don't know if any sensitive data might be stored in them that shouldn't be posted online.

Comment actions Permalink

I just noticed that this problem is more extensive than I originally thought:

Some of my plugins, normal source, and test source cannot resolve their dependency classes.

I'll need to investigate more, but debugging the Grails app using a Run/Debug configuration works fine; all classes are built normally.  This outputs the built classes in the directory specified by the grails.project.class.dir setting in my BuildConfig.groovy.

Building via menu Build -> Rebuild Project outputs to the directory specified by "Project compiler output" in my project settings.  Is there any way to make the IntelliJ build user the grails.project.class.dir setting?

Comment actions Permalink

Please submit a bug at http://youtrack.jetbrains.com/issues/IDEA with a project to reproduce it.


Please sign in to leave a comment.