简体   繁体   English

Ant/Javac 没有运行注解处理器

[英]Ant/Javac not running annotation processors

I seem to be getting an odd compile error while building my main project.在构建我的主项目时,我似乎遇到了一个奇怪的编译错误。 I have annotations in the source that is supposed to be generating class files, like NbBundle.Messages , and they are not being generated.我在应该生成 class 文件的源中有注释,比如NbBundle.Messages ,但它们没有生成。 The other projects that this one depends upon have no significant differences in their build scripts and they build just fine.这个项目所依赖的其他项目在它们的构建脚本中没有显着差异,它们构建得很好。

After a decent amount of investigating, it appears that the compiler was unable to find the class file for one of the annotations it encountered.经过大量调查后,编译器似乎无法找到它遇到的注释之一的 class 文件。 As a result, it silently bailed out of processing annotations and just continued with the expected compilation errors about the generated classes missing.结果,它默默地退出了处理注释,并继续处理有关生成的类丢失的预期编译错误。

Of note: this includes any dependencies your dependencies have.注意:这包括您的依赖项具有的任何依赖项。 In this case, it was org.apache.commons.javaflow.core.Skip which was added to class files in one of my dependencies upon compile-time.在这种情况下,它是org.apache.commons.javaflow.core.Skip ,它在我的编译时依赖项之一中添加到 class 文件中。 Adding the missing library to the primary project's dependencies resolved the issue.将缺少的库添加到主项目的依赖项中解决了这个问题。

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

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