Scala ORM 产生不兼容的版本构建错误
Scala ORM producing incompatible version build errors
我们有一个工作的 Scala 应用程序,使用 Scala 2.11.5。
<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).
有人有解决办法吗?
谢谢
您可以通过在 POM 中引用正确的 Scala 版本来解决 Squeryl 问题。
<dependency>
<groupId>org.squeryl</groupId>
<artifactId>squeryl_2.11</artifactId>
<version>0.9.5-7</version>
</dependency>
我们有一个工作的 Scala 应用程序,使用 Scala 2.11.5。
<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).
有人有解决办法吗?
谢谢
您可以通过在 POM 中引用正确的 Scala 版本来解决 Squeryl 问题。
<dependency>
<groupId>org.squeryl</groupId>
<artifactId>squeryl_2.11</artifactId>
<version>0.9.5-7</version>
</dependency>