2016-05-17 63 views
0

我们有一个使用Scala 2.11.5的Scala应用程序。Scala ORM生成不兼容的版本生成错误

<dependency> 
    <groupId>org.scala-lang</groupId> 
    <artifactId>scala-library</artifactId> 
    <version>2.11.5</version> 
</dependency> 

当我们引进SORM,使用以下Maven的依赖:

<dependency> 
    <groupId>org.sorm-framework</groupId> 
    <artifactId>sorm</artifactId> 
    <version>0.3.18</version> 
</dependency> 

以下两个生成错误发生:

scala-parser-combinators_2.12.0-M4-1.0.4.jar of xxx build path is cross-compiled with an incompatible version of Scala (2.12.0). 

scala-xml_2.12.0-M4-1.0.5.jar of xxx build path is cross-compiled with an incompatible version of Scala (2.12.0). 

我一直在使用SORM的旧版本试过,但类似出现问题。例如,对于版本0.3.8

slf4s_2.9.1-1.0.7.jar of xxx build path is cross-compiled with an incompatible version of Scala (2.9.1). 

使用Squeryl为对象关系映射时也存在类似的问题:

<dependency> 
    <groupId>org.squeryl</groupId> 
    <artifactId>squeryl_2.9.3</artifactId> 
    <version>0.9.5-7</version> 
</dependency> 

导致以下生成误差;

squeryl_2.9.3-0.9.5-7.jar of xxx build path is cross-compiled with an incompatible version of Scala (2.9.3). 

有没有人有解决方案?

感谢

回答

1

您可以通过在你的POM引用正确的Scala版本解决您的Squeryl问题。

<dependency> 
    <groupId>org.squeryl</groupId> 
    <artifactId>squeryl_2.11</artifactId> 
    <version>0.9.5-7</version> 
</dependency> 
+0

该项目现在建立 - 谢谢。 Squeryl与Sorm相比如何? – user1052610