【问题标题】:Sbt resolve wrong version of librarySbt 解决错误版本的库
【发布时间】:2019-03-15 17:49:25
【问题描述】:

sbt 有什么问题?解决瞬态依赖的错误版本。

在带有特定版本的存储库 pom 库中标记但 sbt 尝试下载此:

https://repo1.maven.org/maven2/org/jboss/spec/javax/servlet/jboss-servlet-api_3.1_spec/working@theSemenovPC/jboss-servlet-api_3.1_spec-working@theSemenovPC.pom

他们在哪里找到working@theSemenovPC?为什么它不解析为 pom 中指定的 1.0.2.Final?

更新:build.sbt

name := "test-sbt"

version := "0.1"

scalaVersion := "2.12.8"

libraryDependencies += "org.keycloak" % "keycloak-services" % "4.5.0.Final"

输出:

...
info] Defining Global / sbtStructureOptions, Global / sbtStructureOutputFile and 1 others.
[info] The new values will be used by cleanKeepFiles
[info]  Run `last` for details.
[info] Reapplying settings...
[info] Set current project to test-sbt (in build file:/home/thesemenov/projects/kredo-beckend-runner/git/twst-sbt/)
[info] Applying State transformations org.jetbrains.sbt.CreateTasks from /home/thesemenov/.IdeaIC2018.3/config/plugins/Scala/launcher/sbt-structure-1.0.jar
[info] Reapplying settings...
[info] Set current project to test-sbt (in build file:/home/thesemenov/projects/kredo-beckend-runner/git/twst-sbt/)
[info] Updating ...
[warn]  module not found: org.jboss.spec.javax.xml.bind#jboss-jaxb-api_2.3_spec;working@theSemenovPC
[warn] ==== local: tried
[warn]   /home/thesemenov/.ivy2/local/org.jboss.spec.javax.xml.bind/jboss-jaxb-api_2.3_spec/working@theSemenovPC/ivys/ivy.xml
[warn] ==== public: tried
[warn]   https://repo1.maven.org/maven2/org/jboss/spec/javax/xml/bind/jboss-jaxb-api_2.3_spec/working@theSemenovPC/jboss-jaxb-api_2.3_spec-working@theSemenovPC.pom
[warn] ==== local-preloaded-ivy: tried
[warn]   /home/thesemenov/.sbt/preloaded/org.jboss.spec.javax.xml.bind/jboss-jaxb-api_2.3_spec/working@theSemenovPC/ivys/ivy.xml
[warn] ==== local-preloaded: tried
[warn]   file:////home/thesemenov/.sbt/preloaded/org/jboss/spec/javax/xml/bind/jboss-jaxb-api_2.3_spec/working@theSemenovPC/jboss-jaxb-api_2.3_spec-working@theSemenovPC.pom
[warn]  module not found: org.jboss.spec.javax.servlet#jboss-servlet-api_3.1_spec;working@theSemenovPC
[warn] ==== local: tried
[warn]   /home/thesemenov/.ivy2/local/org.jboss.spec.javax.servlet/jboss-servlet-api_3.1_spec/working@theSemenovPC/ivys/ivy.xml
[warn] ==== public: tried
[warn]   https://repo1.maven.org/maven2/org/jboss/spec/javax/servlet/jboss-servlet-api_3.1_spec/working@theSemenovPC/jboss-servlet-api_3.1_spec-working@theSemenovPC.pom
[warn] ==== local-preloaded-ivy: tried
[warn]   /home/thesemenov/.sbt/preloaded/org.jboss.spec.javax.servlet/jboss-servlet-api_3.1_spec/working@theSemenovPC/ivys/ivy.xml
[warn] ==== local-preloaded: tried
...

【问题讨论】:

  • 如果您想获得这方面的帮助,您应该发布您的build.sbt(您指定libraryDependencies 的部分)。

标签: java playframework sbt build-tools


【解决方案1】:

我找到了类似问题的答案: sbt: error importing resteasy-client

似乎 sbt 无法将 pom 中没有版本的临时依赖解析为最新版本。您需要将该库从瞬态中排除并手动将其包含到具有指定版本的项目 libraryDependencies 中

【讨论】:

    猜你喜欢
    • 2018-11-01
    • 2016-09-12
    • 1970-01-01
    • 2018-03-24
    • 2019-09-30
    • 2018-11-29
    • 1970-01-01
    • 1970-01-01
    • 2013-07-26
    相关资源
    最近更新 更多