[英]sbt unresolved library dependencies
sbt compile issues unresolved dependencies error sbt编译问题未解决的依赖项错误
Research SBT configuration. 研究SBT配置。 I do have the correct syntax.
我确实有正确的语法。 But SBT still issues error
但是SBT仍然会发出错误
name := "MyProject"
version := "1.0"
scalaVersion := "2.11.12"
resolvers +=
"Sonatype OSS Snapshots" at "https://oss.sonatype.org/content/repositories/releases"
libraryDependencies += "java.io.IOException" % "IOException" % "latest.integration"
libraryDependencies += "java.io.FileReader" % "FileReader" % "latest.integration"
libraryDependencies += "java.io.FileNotFoundExceptiom" % "FileNotFoundException" % "latest.integration"
I have a working scala program. 我有一个正在运行的scala程序。 I expect the dependencies to be included instead I receive the following Warning.
我希望包含依赖项,而不是收到以下警告。 What am I missing?
我想念什么? Warning Message
警告信息
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: java.io.IOException#IOException;latest.integration: not found
[warn] :: java.io.FileReader#FileReader;latest.integration: not found
[warn] :: java.io.FileNotFoundExceptiom#FileNotFoundException;latest.integration: not found
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
hmm, there's something weird. 嗯,有些奇怪。
Typically you declare dependencies in a form of a lib/jar that does contain a set of classes, and not the individual class itself. 通常,您以lib / jar的形式声明依赖项,而lib / jar确实包含一组类,而不是单个类本身。
In your specific case, you don't even need to add any dependency to get java.io.* classes since it belong to standard library and are included by default 在您的特定情况下,您甚至不需要添加任何依赖关系即可获取java.io. *类,因为它属于标准库,并且默认包含在其中
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.