简体   繁体   English

调用grails run-app时,AST Transformation未应用于相关的插件域类

[英]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. 我有几个具有AST转换的插件,还有一个插件(称为Core),其中包含需要在编译时提供这些AST转换的域类。 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. 如果我在Core插件上运行maven-install,则似乎已应用了转换,但是当我尝试在使用这些插件的应用程序上运行grails run-app时,AST转换似乎未应用于我的任何域我的Core插件中的类。

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? 编译我所有的AST Transformation类并在编译我的域类(在另一个插件中)时及时提供给编译器的最佳方法是什么?

Using Grails 2.3.8 使用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 不知道为什么但是有用

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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