Groovy module dependency for Grails and Griffon module

I have some modules in my project. One of them is "Common" module written on Groovy. Code of this module will be used in other modules written on Grails and Griffon. I have this module added as "Module Dependency" for other modules. But when I run my Grails or Griffon application I get an error that some classes of "Common" module are not resolved.

How can I include classes from "Common" module to other Grails and Griffon modules?

6 comments
Comment actions Permalink

Please check that 'add --classpath' option is enabled&checked in your
Grails and Griffon run configuration. Please also check that the output
of the module is actually on the '--classpath' option of the
Grails/Griffon applications that you run from IDEA. Finally, please
ensure that the Groovy classes from the Common module are compiled to
the output, not copied as resources.

0
Comment actions Permalink

"Add --classpath" checkbox is disabled on Grails project run configuration (see screenshot).



Attachment(s):
Снимок-Run-Debug Configurations.png
0
Comment actions Permalink

Could you please post the screenshot of the 'Server' module dependencies
tab? Where are the 'Common' module sources located on the disk
relatively to the 'Server'?

0
Comment actions Permalink

This is a structure of the project
Project Main Folder

  • Common Module Folder
    • src
    • test
  • Server Module Folder
    • grails-app
    • lib
    • scripts
    • scr
    • target
    • tests
    • web-app
  • out
    • production
      • Common
      • Server
    • test
  • Common.iml
  • Server.iml


Attachment(s):
server-module-output.png
server-module-dependencies.png
common-module-uotput.png
common-module-structure.png
common-module-dependencies.png
0
Comment actions Permalink

Yes, that's a bug. I've created a bug request
(http://youtrack.jetbrains.net/issue/IDEA-56650). We'll see what we can
do about it. Thank you very much for the report!

0
Comment actions Permalink

I have created report too: http://youtrack.jetbrains.net/issue/IDEA-56626. :) Could you mark my issue as duplicate in this connection?

0

Please sign in to leave a comment.