我的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?
答案 0 :(得分:1)
根据mvnrepo(https://mvnrepository.com/artifact/commons-validator/commons-validator)
使用libraryDependencies += "commons-validator" % "commons-validator" % "1.6"