Groovy source file calling grails domain class

I think this is another classpath issue.

Code is http://code.google.com/p/groovypublish/.

File src/groovy/dsl/PostDsl.groovy has a reference to Post which is a grails domain class.

This runs from the command line, but not in Intellij Idea.

Idea: 7.0.4, grails 1.0.3, jetgroovy 1.6.19053


Information:Compilation completed with 1 error and 0 warnings
Information:1 error
Information:0 warnings
/home/jrobens/.IntelliJIdea70/system/compiler/groovypublish.groovypublisha774697d/.generated/Groovy_to_java_source_code_generator/groovypublish.a774691a/production/dsl/PostDsl.java
Error:Error:line (16)cannot find symbol class Post

1 comment
Comment actions Permalink

Hello, John.

I've tried to reproduce bug you've name. At first, application in last revision cannot be run. It seems, you've forgot to capitalize args.viewBuilder expression in PostController.groovy, at line 153.
Yes, in distinction form Java, Groovy may resolve unqualified classes from top-level package. This is definitely bug, and it will be fixed in one of near-term releases.

With best regards,
Ilya

0

Please sign in to leave a comment.