scala 2.12.1的common-validator sbt依赖项

时间:2018-05-18 09:49:02

标签: scala sbt

我的sbt文件如下所示

organization := "scala"
name := "MyProject"
version := "1.0"
scalaVersion := "2.12.1"

libraryDependencies += "com.github.nscala-time" %% "nscala-time" % "2.20.0"
libraryDependencies += "commons-net" % "commons-net" % "3.6"
libraryDependencies += "commons-validator" % "commons-validator" % "1.6.0"

当我运行sbt compile时,我得到了这个

sbt.librarymanagement.ResolveException: unresolved dependency: commons-validator#commons-validator;1.6.0: not found

然而,当我将scala版本更改为2.11.7时,sbt编译正常。我错过了什么?我怎样才能使它适用于2.12.1?

1 个答案:

答案 0 :(得分:1)

根据mvnrepo(https://mvnrepository.com/artifact/commons-validator/commons-validator

使用libraryDependencies += "commons-validator" % "commons-validator" % "1.6"