gpt4 book ai didi

sbt - SBT为什么找不到Play 2.1插件?

转载 作者:行者123 更新时间:2023-12-04 04:18:06 24 4
gpt4 key购买 nike

在我的plugins.sbt文件中,我有

scalaVersion := "2.10.0"

resolvers += "Typesafe repository" at "http://repo.typesafe.com/typesafe/releases/"

addSbtPlugin("play" % "sbt-plugin" % "2.1")

当我尝试运行 sbt时,除其他外,我得到了
[warn] ==== Typesafe repository: tried
[warn] http://repo.typesafe.com/typesafe/releases/play/sbt-plugin_2.10_0.12/2.1/sbt- plugin-2.1.pom
[warn] ==== public: tried
[warn] http://repo1.maven.org/maven2/play/sbt-plugin_2.10_0.12/2.1/sbt-plugin-2.1.pom
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: play#sbt-plugin;2.1: not found
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn]
[warn] Note: Some unresolved dependencies have extra attributes. Check that these dependencies exist with the requested attributes.
[warn] play:sbt-plugin:2.1 (sbtVersion=0.12, scalaVersion=2.10)
[warn]
sbt.ResolveException: unresolved dependency: play#sbt-plugin;2.1: not found

为什么SBT找不到插件?我也尝试过 addSbtPlugin("play" % "sbt-plugin" % "2.1-RC1"),结果相似。

最佳答案

问题是在plugins.sbt文件中包含了scalaVersion设置。这将导致sbt在实际上应搜索sbt-plugin_2.9.2_0.12时在存储库中搜索sbt-plugin_2.10.0_0.12。

我不确定在plugins.sbt文件中指定scalaVersion的语义,但是也许是在声明运行SBT的Scala版本。

这是Play 2.1 sbt插件文件的链接:http://repo.typesafe.com/typesafe/simple/ivy-releases/play/sbt-plugin/scala_2.9.2/sbt_0.12/2.1-RC1/srcs/

关于sbt - SBT为什么找不到Play 2.1插件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14573574/

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