gpt4 book ai didi

scala - SBT 不会解决对除 Typesafe 之外的任何存储库的传递依赖

转载 作者:行者123 更新时间:2023-12-01 09:06:47 25 4
gpt4 key购买 nike

我有一个无法解决的传递依赖,我为此焦头烂额。

具体依赖是 org.apache.maven.wagon#wagon-provider-api;1.0-beta-2!wagon-provider-api.jar 虽然我不确定哪个直接依赖包括它。

该文件在默认的 Maven 存储库中是有效的。然而,出于某种原因,SBT 只是拒绝在那里检查它,尽管它很乐意在那里寻找其他依赖项:

[warn]  [NOT FOUND  ] org.apache.maven.wagon#wagon-provider-api;1.0-beta-2!wagon-provider-api.jar (52ms)
[warn] ==== Typesafe Releases Repository: tried
[warn] http://repo.typesafe.com/typesafe/releases/org/apache/maven/wagon/wagon-provider-api/1.0-beta-2/wagon-provider-api-1.0-beta-2.jar
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: FAILED DOWNLOADS ::
[warn] :: ^ see resolution messages for details ^ ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: org.apache.maven.wagon#wagon-provider-api;1.0-beta-2!wagon-provider-api.jar
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[error] (*:update) sbt.ResolveException: download failed: org.apache.maven.wagon#wagon-provider-api;1.0-beta-2!wagon-provider-api.jar
[error] Total time: 3 s, completed Mar 23, 2013 7:22:05 PM

我已经从主目录中删除了 .ivy2.m2.sbt。我运行了 sbt update。我一遍又一遍地运行 play cleanplay clean-all。从 SBT 提示运行 resolvers 显示 Maven 存储库在列表中。

我尝试下载 jar 并将其添加到我的 Ivy 缓存、我的 Ivy 存储库、我的 Play!存储库。

还有什么可以尝试?

我的 Build.scala:

import sbt._
import Keys._
import play.Project._

object ApplicationBuild extends Build {

val appName = "conspire"
val appVersion = "1.0-SNAPSHOT"

val appDependencies = Seq(
// Add your project dependencies here,
javaCore,
javaJdbc,
"mysql" % "mysql-connector-java" % "5.1.18",
"org.apache.cayenne.plugins" % "maven-cayenne-plugin" % "3.0.2",
"org.objectstyle.ashwood" % "ashwood" % "2.0",
"commons-collections" % "commons-collections" % "3.1",
"commons-lang" % "commons-lang" % "2.6",
"commons-logging" % "commons-logging" % "1.1"
)

val main = play.Project(appName, appVersion, appDependencies).settings(
externalResolvers += "Local Maven Repository" at "file:///"+Path.userHome+"/.m2/repository",
resolvers ++= Seq(DefaultMavenRepository,
"Objectstyle repository" at " http://objectstyle.org/maven2/")
)

}

最佳答案

尝试

resolvers := // which overrides current resolvers

代替

resolvers ++= // which appends to current resolvers

不要问我解释,因为我不知道它为什么有效。刚刚遇到与 JUnit 和 this link 类似的问题建议这样做,这有助于...

关于scala - SBT 不会解决对除 Typesafe 之外的任何存储库的传递依赖,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15593715/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com