简体   繁体   中英

AST Transformation is not being applied to dependent plugin domain classes when calling grails run-app

I have several plugins which have AST Transformations and one plugin (called Core) that contains domain classes which needs these AST Transformations available at compile time. The transformations seem to be applied if I run maven-install on the Core plugin, but when I try to run grails run-app on my application which uses these plugins, the AST Transformation doesn't seem to be applied to any of my domain classes in my Core plugin.

What is the best approach to compile all my AST Transformation classes and have it available to the compiler in time for when my domain classes (which are in another plugin) are compiled?

Using Grails 2.3.8

Try anotating your target class with the full reference.

Instead of

import ASTpackage.*
@ASTInterface
class Foo {
...

Use

import ASTpackage.*
@ASTpackage.ASTInterface
class Foo {
...

Don't know why but worked

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM