I have a groovy/maven/grails app.
It consists of a standalone groovy application (backtick-core) which contains, amongst other things, all of my domain classes.
There is another module which is a grails web-app (backtick-grails).
Structure like this:
backtick
backtick-core
src/main/groovy/com/backtick/domain
backtick-grails
grails-app
...
I would like to be able to use the domain classes from backtick-core within my grails application (backtick-grails). Currently the grails app can see the classes, but they are not being "decorated" with all of the GORM features that domain objects usually get decorated with.
Is there some way of getting grails to scan other locations for domain classes?
I don't know if you can change the location for domain classes, as it is not the original idea.
However, you could modularize your application by extracting your domain into a plugin, as explained here.
This way, your application can use domain classes that are not part of it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With