SBT解决库的错误版本

时间:2019-03-15 17:49:26

标签: java playframework sbt build-tools

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?

upd: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
...

1 个答案:

答案 0 :(得分:0)

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

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