2015-02-09 404 views
0

我开始使用项目lombok,并注意到来自maven的命令行编译无法进行干净的编译。代码在eclipse下编译。龙目岛 - maven编译失败“错误:无法访问MappedSuperClass”

我在我的POM中具有指定的lombok依赖项。

[INFO] Spring, Axon, Spring security, REST API, Websockets SUCCESS [0.300s] 
[INFO] springagain-contracts ............................. SUCCESS [1.881s] 
[INFO] springagain-engine ................................ FAILURE [0.998s] 
[INFO] springagain-web ................................... SKIPPED 
[INFO] ------------------------------------------------------------------------ 
[INFO] BUILD FAILURE 
[INFO] ------------------------------------------------------------------------ 
[INFO] Total time: 3.344s 
[INFO] Finished at: Mon Feb 09 12:49:03 IST 2015 
[INFO] Final Memory: 23M/181M 
[INFO] ------------------------------------------------------------------------ 
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.5.1:compile (default-compile) on project springagain-engine: Compilation failure 
[ERROR] error: cannot access MappedSuperclass 
[ERROR] -> [Help 1] 

我已搜查高和低,唯一相关的问题是https://code.google.com/p/projectlombok/issues/detail?id=352但是,它并没有太多阐述它是如何固定的。

我的代码是在这里https://bitbucket.org/raghur/springagain

回答

1

你缺少的依赖。添加

<dependency> 
    <groupId>org.hibernate.javax.persistence</groupId> 
    <artifactId>hibernate-jpa-2.0-api</artifactId> 
    <version>1.0.1.Final</version> 
</dependency> 

应该解决这个问题。 这里有更多的上下文:https://code.google.com/p/projectlombok/issues/detail?id=352

+0

修正了它。但我仍然感到困惑 - 不要在项目中的任何地方使用JPA。猜猜它是传递依赖关系的某个地方:( – Raghu 2015-02-09 09:29:01