I have a grails application with some domain objects which get serialized as JSON. In another java/groovy project, I would like to use these domain objects. If I publish a plugin, it looks like only other grails applications can use the plugin.
I tried to create a raw groovy project with the domain classes and their data, and in my grails app, I have stubs like this:
class Fact extends com.domain.Fact {}
When I go to run my app, however, I get these
Caused by MappingException: Missing type or column for column[facts_fact] on domain[DeclarationDefinition] referencing[com.domain.Fact]
->> 303 | innerRun in java.util.concurrent.FutureTask$Sync
Is what I'm doing possible, or is there a better way?
At the end of the day, I want to be able to re-use POGOs as grails domain objects, or export grails domain objects as POGOs.