【问题标题】:SBT / Ivy: xmlbeans library not detected even after it has been added to the dependency listSBT / Ivy:即使已将其添加到依赖项列表中,也未检测到 xmlbeans 库
【发布时间】:2015-04-25 19:00:47
【问题描述】:

即使在将 xmlbeans 添加为 SBT 中的依赖项后,我也无法访问它。

这是我的 build.sbt

name := "xmlbeans"
version := "1.0"
scalaVersion := "2.11.5"
libraryDependencies += "stax" % "stax-api" % "1.0.1"
libraryDependencies += "org.apache.xmlbeans" % "xmlbeans" % "2.6.0"

这是我的代码:

import org.apache.xmlbeans._

object Main {
  def main(args: Array[String]) = {
    println("hi")
  }
}

以及我在执行sbt update 后立即运行sbt run 时收到的错误消息:

src/main/scala/Main.scala:5: object apache is not a member of package org
[error] import org.apache.xmlbeans._

我错过了一些步骤吗?

【问题讨论】:

    标签: maven sbt ivy xmlbeans


    【解决方案1】:

    原来问题是一个简单的 ivy2 缓存问题。

    我只是删除了~/.ivy2/cache/org.apache.xmlbeans 文件夹并重新运行sbt updatesbt run。这一次它就像一个魅力。

    【讨论】:

      猜你喜欢
      • 2022-11-10
      • 2012-04-22
      • 2013-05-28
      • 1970-01-01
      • 2013-12-06
      • 2019-04-11
      • 1970-01-01
      • 2021-03-11
      • 2014-12-29
      相关资源
      最近更新 更多