《IDEA 循环依赖》Annotation processing is not supported for module cycles.

1. 错误现象 
Error:java: Annotation processing is not supported for module cycles. Please ensure that all modules from cycle [A,B] are excluded from annotation processing 

2. 问题分析 
查找http://stackoverflow.com/questions/27223917/how-to-configure-annotations-processing-in-intellij-idea-14-for-current-project发现可能是依赖的问题。 
在idea14菜单下  Analyze->Analyze Module Dependencies...发现果然是循环依赖。 
通过查看工程总的pom.xml可以看到工程各模块之间的依赖关系,各模块自己的pom.xml里配置的依赖顺序没有问题,也没有循环依赖。应该是自己在写单元测试时继承过一个Test基类,结果由于依赖关系原因Test不能被import进来,自己就随手点了下Add dependency on module...引入的。 

3.问题解决 
既然在配置文件上找不到修改的地方,就是工程自身的配置了,删除上面在添加的依赖,按照如下操作: 
1) Analyze->Analyze Module Dependencies... 
《IDEA 循环依赖》Annotation processing is not supported for module cycles. 

2)右键不该循环依赖的模块,在这里就是第一个模块,不应该依赖下面的模块 
《IDEA 循环依赖》Annotation processing is not supported for module cycles. 

3)选择依赖关系,删除不该出现的依赖 

《IDEA 循环依赖》Annotation processing is not supported for module cycles.

转自:http://zoroeye.iteye.com/blog/2254445