简体   繁体   English

无法解析com.typesafe.play:sbt-plugin:2.6.20

[英]Failing in resolving com.typesafe.play:sbt-plugin:2.6.20

Im trying to build the simplest play ontop of docker, and failing to do so. 我试图在Docker之上构建最简单的游戏,但没有这样做。 The application runs just fine on Intelij but when building the docker file - while resolving sbt dependencies - it fails to resolve com.typesafe.play:sbt-plugin:2.6.20 该应用程序在Intelij上运行良好,但是在构建docker文件时-解决sbt依赖关系时-无法解析com.typesafe.play:sbt-plugin:2.6.20

I've found that the link that the sbt tries to resolve is not up, and actually seems abit of: https://repo1.maven.org/maven2/com/typesafe/play/sbt-plugin_2.10_0.13/2.6.20/sbt-plugin-2.6.20.pom 我发现sbt尝试解决的链接没有打开,并且实际上似乎有点: https ://repo1.maven.org/maven2/com/typesafe/play/sbt-plugin_2.10_0.13/2.6 0.20 / SBT-插件-2.6.20.pom

While if you search the repository tree you could find: https://repo1.maven.org/maven2/com/typesafe/play/play_2.12/2.6.20/play_2.12-2.6.20.pom 如果您搜索存储库树,则会发现: https : //repo1.maven.org/maven2/com/typesafe/play/play_2.12/2.6.20/play_2.12-2.6.20.pom

Also I've seen in InteliJ's build log that it resolves from here: https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/ 我也在InteliJ的构建日志中看到它可以从此处解析: https ://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/

Including build log for 包括构建日志

server_1_5b1cd8eac7c5 | [info] Loading project definition from /app-src/project
server_1_5b1cd8eac7c5 | [info] Set current project to app-src (in build file:/app-src/)
server_1_5b1cd8eac7c5 | [warn]  module not found: com.typesafe.play#sbt-plugin;2.6.20
server_1_5b1cd8eac7c5 | [warn] ==== local: tried
server_1_5b1cd8eac7c5 | [warn]   /root/.ivy2/local/com.typesafe.play/sbt-plugin/scala_2.10/sbt_0.13/2.6.20/ivys/ivy.xml
server_1_5b1cd8eac7c5 | [warn] ==== public: tried
server_1_5b1cd8eac7c5 | [warn]   https://repo1.maven.org/maven2/com/typesafe/play/sbt-plugin_2.10_0.13/2.6.20/sbt-plugin-2.6.20.pom
server_1_5b1cd8eac7c5 | [warn] ==== local-preloaded-ivy: tried
server_1_5b1cd8eac7c5 | [warn]   /root/.sbt/preloaded/com.typesafe.play/sbt-plugin/2.6.20/ivys/ivy.xml
server_1_5b1cd8eac7c5 | [warn] ==== local-preloaded: tried
server_1_5b1cd8eac7c5 | [warn]   file:////root/.sbt/preloaded/com/typesafe/play/sbt-plugin_2.10_0.13/2.6.20/sbt-plugin-2.6.20.pom
server_1_5b1cd8eac7c5 | [warn]  ::::::::::::::::::::::::::::::::::::::::::::::
server_1_5b1cd8eac7c5 | [warn]  ::          UNRESOLVED DEPENDENCIES         ::
server_1_5b1cd8eac7c5 | [warn]  ::::::::::::::::::::::::::::::::::::::::::::::
server_1_5b1cd8eac7c5 | [warn]  :: com.typesafe.play#sbt-plugin;2.6.20: not found
server_1_5b1cd8eac7c5 | [warn]  ::::::::::::::::::::::::::::::::::::::::::::::
server_1_5b1cd8eac7c5 | [warn] 
server_1_5b1cd8eac7c5 | [warn]  Note: Some unresolved dependencies have extra attributes.  Check that these dependencies exist with the requested attributes.
server_1_5b1cd8eac7c5 | [warn]          com.typesafe.play:sbt-plugin:2.6.20 (scalaVersion=2.10, sbtVersion=0.13)
server_1_5b1cd8eac7c5 | [warn] 
server_1_5b1cd8eac7c5 | [warn]  Note: Unresolved dependencies path:
server_1_5b1cd8eac7c5 | [warn]          com.typesafe.play:sbt-plugin:2.6.20 (scalaVersion=2.10, sbtVersion=0.13) (/app-src/plugins.sbt#L4-5)
server_1_5b1cd8eac7c5 | [warn]            +- default:app-src_2.10:0.1-SNAPSHOT
server_1_5b1cd8eac7c5 | sbt.ResolveException: unresolved dependency: com.typesafe.play#sbt-plugin;2.6.20: not found
server_1_5b1cd8eac7c5 |         at sbt.IvyActions$.sbt$IvyActions$$resolve(IvyActions.scala:320)
server_1_5b1cd8eac7c5 |         at sbt.IvyActions$$anonfun$updateEither$1.apply(IvyActions.scala:191)
server_1_5b1cd8eac7c5 |         at sbt.IvyActions$$anonfun$updateEither$1.apply(IvyActions.scala:168)
server_1_5b1cd8eac7c5 |         at sbt.IvySbt$Module$$anonfun$withModule$1.apply(Ivy.scala:156)
server_1_5b1cd8eac7c5 |         at sbt.IvySbt$Module$$anonfun$withModule$1.apply(Ivy.scala:156)
server_1_5b1cd8eac7c5 |         at sbt.IvySbt$$anonfun$withIvy$1.apply(Ivy.scala:133)
server_1_5b1cd8eac7c5 |         at sbt.IvySbt.sbt$IvySbt$$action$1(Ivy.scala:57)
server_1_5b1cd8eac7c5 |         at sbt.IvySbt$$anon$4.call(Ivy.scala:65)
server_1_5b1cd8eac7c5 |         at xsbt.boot.Locks$GlobalLock.withChannel$1(Locks.scala:93)
server_1_5b1cd8eac7c5 |         at xsbt.boot.Locks$GlobalLock.xsbt$boot$Locks$GlobalLock$$withChannelRetries$1(Locks.scala:78)
server_1_5b1cd8eac7c5 |         at xsbt.boot.Locks$GlobalLock$$anonfun$withFileLock$1.apply(Locks.scala:97)
server_1_5b1cd8eac7c5 |         at xsbt.boot.Using$.withResource(Using.scala:10)
server_1_5b1cd8eac7c5 |         at xsbt.boot.Using$.apply(Using.scala:9)
server_1_5b1cd8eac7c5 |         at xsbt.boot.Locks$GlobalLock.ignoringDeadlockAvoided(Locks.scala:58)
server_1_5b1cd8eac7c5 |         at xsbt.boot.Locks$GlobalLock.withLock(Locks.scala:48)
server_1_5b1cd8eac7c5 |         at xsbt.boot.Locks$.apply0(Locks.scala:31)
server_1_5b1cd8eac7c5 |         at xsbt.boot.Locks$.apply(Locks.scala:28)
server_1_5b1cd8eac7c5 |         at sbt.IvySbt.withDefaultLogger(Ivy.scala:65)
server_1_5b1cd8eac7c5 |         at sbt.IvySbt.withIvy(Ivy.scala:128)
server_1_5b1cd8eac7c5 |         at sbt.IvySbt.withIvy(Ivy.scala:125)
server_1_5b1cd8eac7c5 |         at sbt.IvySbt$Module.withModule(Ivy.scala:156)
server_1_5b1cd8eac7c5 |         at sbt.IvyActions$.updateEither(IvyActions.scala:168)
server_1_5b1cd8eac7c5 |         at sbt.Classpaths$$anonfun$sbt$Classpaths$$work$1$1.apply(Defaults.scala:1555)
server_1_5b1cd8eac7c5 |         at sbt.Classpaths$$anonfun$sbt$Classpaths$$work$1$1.apply(Defaults.scala:1551)
server_1_5b1cd8eac7c5 |         at sbt.Classpaths$$anonfun$doWork$1$1$$anonfun$122.apply(Defaults.scala:1586)
server_1_5b1cd8eac7c5 |         at sbt.Classpaths$$anonfun$doWork$1$1$$anonfun$122.apply(Defaults.scala:1584)
server_1_5b1cd8eac7c5 |         at sbt.Tracked$$anonfun$lastOutput$1.apply(Tracked.scala:37)
server_1_5b1cd8eac7c5 |         at sbt.Classpaths$$anonfun$doWork$1$1.apply(Defaults.scala:1589)
server_1_5b1cd8eac7c5 |         at sbt.Classpaths$$anonfun$doWork$1$1.apply(Defaults.scala:1583)
server_1_5b1cd8eac7c5 |         at sbt.Tracked$$anonfun$inputChanged$1.apply(Tracked.scala:60)
server_1_5b1cd8eac7c5 |         at sbt.Classpaths$.cachedUpdate(Defaults.scala:1606)
server_1_5b1cd8eac7c5 |         at sbt.Classpaths$$anonfun$updateTask$1.apply(Defaults.scala:1533)
server_1_5b1cd8eac7c5 |         at sbt.Classpaths$$anonfun$updateTask$1.apply(Defaults.scala:1485)
server_1_5b1cd8eac7c5 |         at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
server_1_5b1cd8eac7c5 |         at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:40)
server_1_5b1cd8eac7c5 |         at sbt.std.Transform$$anon$4.work(System.scala:63)
server_1_5b1cd8eac7c5 |         at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:228)
server_1_5b1cd8eac7c5 |         at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:228)
server_1_5b1cd8eac7c5 |         at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17)
server_1_5b1cd8eac7c5 |         at sbt.Execute.work(Execute.scala:237)
server_1_5b1cd8eac7c5 |         at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:228)
server_1_5b1cd8eac7c5 |         at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:228)
server_1_5b1cd8eac7c5 |         at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:159)
server_1_5b1cd8eac7c5 |         at sbt.CompletionService$$anon$2.call(CompletionService.scala:28)
server_1_5b1cd8eac7c5 |         at java.util.concurrent.FutureTask.run(FutureTask.java:266)
server_1_5b1cd8eac7c5 |         at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
server_1_5b1cd8eac7c5 |         at java.util.concurrent.FutureTask.run(FutureTask.java:266)
server_1_5b1cd8eac7c5 |         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
server_1_5b1cd8eac7c5 |         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
server_1_5b1cd8eac7c5 |         at java.lang.Thread.run(Thread.java:748)
server_1_5b1cd8eac7c5 | [error] (*:update) sbt.ResolveException: unresolved dependency: com

Includin both build.sbt and plugins.sbt (mostly as they were with the intelij play boiler project): 包括build.sbt和plugins.sbt(大多数情况与intelij Play锅炉项目相同):

build.sbt: build.sbt:

name := "intro"

version := "1.0" 

lazy val `intro` = (project in file(".")).enablePlugins(PlayScala)

resolvers += "scalaz-bintray" at "https://dl.bintray.com/scalaz/releases"

resolvers += "Akka Snapshot Repository" at "http://repo.akka.io/snapshots/"

scalaVersion := "2.12.6"

libraryDependencies ++= Seq( jdbc , ehcache , ws , specs2 % Test , guice)

libraryDependencies += "org.mongodb.scala" %% "mongo-scala-driver" % "2.5.0"


unmanagedResourceDirectories in Test <+=  baseDirectory ( _ /"target/web/public/test" )  

plugins.sbt plugins.sbt

logLevel := Level.Warn


addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.6.20")
  • Note that I've tried hell of alot revolvers to that I've found around the net and with no luck. 请注意,我尝试了很多左轮手枪,以至于我在网上发现的情况都没有运气。

  • note2: with boths sbt's mentioned the Intelij project plays just fine note2:提到sbt都提到Intelij项目就可以了

btw, if the docker file is of any interest it could be found here: https://github.com/levgou/table-handler/blob/master/intro_server/Dockerfile 顺便说一句,如果您对docker文件感兴趣,可以在这里找到: https : //github.com/levgou/table-handler/blob/master/intro_server/Dockerfile

EDIT: the problem was, me not copying the build.sbt into my docker dir, and it finding some other .sbt that was there by mistake (silly me) 编辑:问题是,我没有将build.sbt复制到我的docker目录中,并且它发现了其他一些错误的.sbt(对不起我)

Please make sure you check the scala version. 请确保您检查scala版本。 In the link it tries to download 2.10 version of the library which doesn't exist, while the 2.12 one does. 在该链接中,它尝试下载不存在的2.10版本的库,而2.12版本却下载了。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 超时解析sbt-plugin - Timeout resolving sbt-plugin maven repo1 中缺少 Typesafe Play sbt-plugin 版本 2.8.7 - Typesafe Play sbt-plugin version 2.8.7 missing from maven repo1 未解决的依赖项 — com.typesafe.play#sbt-plugin;2.4.3:未找到 - UNRESOLVED DEPENDENCIES — com.typesafe.play#sbt-plugin;2.4.3: not found Play sbt-plugin(Build.scala)的文档在哪里? - Where is the documentation for Play sbt-plugin (Build.scala)? 尚未解决的依赖项:sbt-plugin; 2.7.0,尝试编译播放模板项目时 - Unresolved dependency: sbt-plugin;2.7.0 when trying to compile a play template project 如何在 sbt-plugin 中使用 sbt-assembly? - How to use sbt-assembly in sbt-plugin? 构建自定义SBT插件,出现错误:对象sbt不是包com.typesafe的成员 - Building Custom SBT plugin, getting error: object sbt is not a member of package com.typesafe 未能在build.sbt中包含com.typesafe(对于Scala和在Heroku上喷涂) - Failing to include com.typesafe in build.sbt (for Scala and spray on Heroku) sbt.ResolveException:未解决的依赖项:com.typesafe.akka#akka-sbt-plugin; 2.0:找不到 - sbt.ResolveException: unresolved dependency: com.typesafe.akka#akka-sbt-plugin;2.0: not found 带有SBT插件的IntelliJ:错误解决[com.mycompany.mypackage] - IntelliJ with SBT plugin: Error Resolving [com.mycompany.mypackage]
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM