Scala-maven-plugin and Multiple Versions of Scala Libraries Detected
2015-12-18 18:31
639 查看
Have you ever seen messages like these running scala-maven-plugin?
Starting from scala 2.10 all changes in bugfix/patch version should be backward compatible, so these warnings don’t really have the point in this case.
But they are still very important in case when, let’s say, you somehow end up with scala 2.9 and 2.11 libraries. It happens that since version 3.1.6 you can fix this using
Where in my case I have
defined as
No more meaningless warnings!
1 2 3 4 | [WARNING] Expected all dependencies to require Scala version: 2.10.3 [WARNING] mycoolcompany:mycoolproject:1.5.25 requires scala version: 2.10.3 [WARNING] me.lessis:odelay-core_2.10:0.1.0 requires scala version: 2.10.4 [WARNING] Multiple versions of scala libraries detected! |
But they are still very important in case when, let’s say, you somehow end up with scala 2.9 and 2.11 libraries. It happens that since version 3.1.6 you can fix this using
scalaCompatVersionconfiguration
1 2 3 45 | <plugin> <groupId>net.alchim31.maven</groupId> <artifactId>scala-maven-plugin</artifactId> <version>3.1.6</version> <configuration> <scalaCompatVersion>${scala.binary.version}</scalaCompatVersion> <scalaVersion>${scala.version}</scalaVersion> </configuration> <!-- other settings--> </plugin> |
scala.binary.versionproperty
defined as
1 | <scala.binary.version>2.10</scala.binary.version> |
相关文章推荐
- Windows下Scala环境搭建
- Windows7下安装Scala 2.9.2教程
- Scala代码实现列出Hadoop 文件夹下面的所有文件
- ClassNotFoundException:scala.PreDef$
- XML 文件解析--含Unicode字符的XML文件
- 分分钟掌握快速排序(Java / Scala 实现)
- Scala极速入门
- Spark初探
- Scala实现REST操作
- Scala method call syntax
- 关于Scala多重继承的菱形问题
- Scala 高阶函数(high-order function)剖析
- Scala Monad Design Pattern
- Spray.io搭建Rest服务
- Spray.io搭建Rest — 支持Twirl模板并部署
- 搭建hadoop/spark集群环境
- Akka (actors) remote example
- scala工具库
- scala-协变、逆变、上界、下界
- scala-常用函数介绍