Sbt 解决错误的库版本

Sbt resolve wrong version of library

sbt 怎么了?解决临时依赖的错误版本。

在 reposytory 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
...

我找到了类似问题的答案:

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