0

I need use a domain class define in one inplacePlugin to a controller class in another inplacePlugin inside my app, but when I try to define the class IDE "cannot resolve the symbol". AutorDef domain class I define public in my app. What i need to do for reselve this issue?

   def autor = AutorDef.findAll()
Ale
  • 226
  • 1
  • 9
  • 17

1 Answers1

1

I already know how can do it that, it is very simple, (of course after a few day of deep thinking and search). Here is the solution. In BuildConfig.groovy inside the inplace plugin where we need import the domain class from other inplace plugin we add next code,

grails.plugin.location.'common'="../sdl-common" 

We add this code directly below

grails.project.test.reports.dir = "target/test-reports"

The import code before equals

grails.plugin.location.'common'

is the name use for import the plugin data(domain class, etc) and

"../sdl-common"

is the route to inplace plugin, and when we need to import the data in our classes, or controllers, we only need add

import common.*

in the part where we import hte packages.

Ale
  • 226
  • 1
  • 9
  • 17