SBT正在读取两个版本的Jetty,一个从项目中读取,另一个从Ivy2缓存中读取。为什么?

时间:2018-12-08 21:26:13

标签: scala intellij-idea sbt jetty ivy

当我尝试跳船时,它向我大吼大叫,大概是这样的:

2018-12-08 16:14:29.214:WARN:oeja.AnnotationParser:qtp1854731462-11: org.eclipse.jetty.util.thread.strategy.ProduceExecuteConsume scanned from multiple locations: [jar:file:///Users/me/Documents/Projects/myproject/target/webapp/WEB-INF/lib/jetty-util-9.4.8.v20171121.jar!/org/eclipse/jetty/util/thread/strategy/ProduceExecuteConsume.class, jar:file:///Users/me/.ivy2/cache/org.eclipse.jetty/jetty-runner/jars/jetty-runner-9.4.8.v20171121.jar!/org/eclipse/jetty/util/thread/strategy/ProduceExecuteConsume.class]

和更多类似的东西。看来Ivy缓存的jar文件与本地版本冲突。

这是我的SBT构建依赖项:

resolvers += Classpaths.typesafeReleases

libraryDependencies += "org.scalacheck" %% "scalacheck" % "1.14.0" % "test"

libraryDependencies += "org.scalatest" % "scalatest_2.12" % "3.0.5" % "test" 

libraryDependencies ++= Seq(
  "org.scalatra" %% "scalatra" % ScalatraVersion,
  "org.scalatra" %% "scalatra-json" % ScalatraVersion,
  "org.scalatra" %% "scalatra-scalatest" % ScalatraVersion % "test",
  "org.json4s"   %% "json4s-native" % "3.5.2",
  "ch.qos.logback" % "logback-classic" % "1.2.3" % "runtime",
  "org.eclipse.jetty" % "jetty-server" % "9.4.8.v20171121",
  "javax.servlet" % "javax.servlet-api" % "3.1.0" % "provided"
)

enablePlugins(SbtTwirl)
enablePlugins(ScalatraPlugin)

我不明白为什么,并且想知道如何解决这个问题。幸运的是,这似乎并没有引起任何具体的错误。或多或少只是个烦人。预先感谢。

0 个答案:

没有答案