2015-05-29 86 views
1

Ebean ORM已從Play主內核中提取出來,並已作爲Play 2.4中的依賴項引入。偉大的舉措。升級到Play框架後的JPA依賴項問題2.4

但這是打破現有的代碼。在遵循Ebean的Play migration說明之後,我收到了幾個JPA註釋錯誤。經過調查,似乎ebean正在拉動JPA 1.0持久性API。

[info] | +-org.avaje.ebeanorm:avaje-ebeanorm-agent:4.5.3 
[info] | | +-javax.persistence:persistence-api:1.0 
[info] | | 
[info] | +-org.avaje.ebeanorm:avaje-ebeanorm:4.6.2 
[info] | +-com.fasterxml.jackson.core:jackson-core:2.4.1 (evicted by: 2.5.3) 
[info] | +-com.fasterxml.jackson.core:jackson-core:2.4.3 (evicted by: 2.5.3) 
[info] | +-com.fasterxml.jackson.core:jackson-core:2.5.3 
[info] | +-javax.persistence:persistence-api:1.0 
[info] | +-org.slf4j:slf4j-api:1.7.12 
[info] | +-org.slf4j:slf4j-api:1.7.7 (evicted by: 1.7.12) 

凡在播放2.3.9不是這種情況下,它被拉動我JPA 2.0

[info] | +-org.avaje.ebeanorm:avaje-ebeanorm-agent:3.2.2 
[info] | +-org.avaje.ebeanorm:avaje-ebeanorm:3.3.4 
[info] | +-org.hibernate.javax.persistence:hibernate-jpa-2.0-api:1.0.1.Final 
[info] | 
[info] +-com.typesafe.play:play-java-jdbc_2.11:2.3.9 [S] 
[info] | +-com.typesafe.play:play-java_2.11:2.3.9 [S] 
[info] | | +-com.google.code.findbugs:jsr305:2.0.3 
[info] | | +-com.google.guava:guava:16.0.1 

任何指針上不含JPA 1.0和依賴休眠-JPA-2.0-API?

+0

Guys..anybody的東西也面臨類似的問題? – basav

回答

0

您可以從ebean依賴關係中排除persistence-api。

("org.avaje.ebeanorm" % "avaje-ebeanorm" % "4.6.2").exclude("javax.persistence","persistence-api")