我尝试将新创建的Play应用程序部署到Heroku,我在下面得到了例外。顺便说一下,当我尝试使用play debug
运行它时也会发生这种情况。它只适用于激活器应用程序。知道要改变什么才能在heroku上部署它?我打赌有一个回购遗失或什么。
remote: [warn] ::::::::::::::::::::::::::::::::::::::::::::::
remote: [warn] :: UNRESOLVED DEPENDENCIES ::
remote: [warn] ::::::::::::::::::::::::::::::::::::::::::::::
remote: [warn] :: com.typesafe.sbtrc#actor-client-2-10;0.3.1: not found
remote: [warn] ::::::::::::::::::::::::::::::::::::::::::::::
remote: sbt.ResolveException: unresolved dependency: com.typesafe.sbtrc#actor-client-2-10;0.3.1: not found
remote: at sbt.IvyActions$.sbt$IvyActions$$resolve(IvyActions.scala:217)
remote: at sbt.IvyActions$$anonfun$update$1.apply(IvyActions.scala:126)
remote: at sbt.IvyActions$$anonfun$update$1.apply(IvyActions.scala:125)
remote: at sbt.IvySbt$Module$$anonfun$withModule$1.apply(Ivy.scala:115)
remote: at sbt.IvySbt$Module$$anonfun$withModule$1.apply(Ivy.scala:115)
remote: at sbt.IvySbt$$anonfun$withIvy$1.apply(Ivy.scala:103)
remote: at sbt.IvySbt.sbt$IvySbt$$action$1(Ivy.scala:48)
remote: at sbt.IvySbt$$anon$3.call(Ivy.scala:57)
remote: at xsbt.boot.Locks$GlobalLock.withChannel$1(Locks.scala:93)
remote: at xsbt.boot.Locks$GlobalLock.xsbt$boot$Locks$GlobalLock$$withChannelRetries$1(Locks.scala:78)
remote: at xsbt.boot.Locks$GlobalLock$$anonfun$withFileLock$1.apply(Locks.scala:97)
remote: at xsbt.boot.Using$.withResource(Using.scala:10)
remote: at xsbt.boot.Using$.apply(Using.scala:9)
remote: at xsbt.boot.Locks$GlobalLock.ignoringDeadlockAvoided(Locks.scala:58)
remote: at xsbt.boot.Locks$GlobalLock.withLock(Locks.scala:48)
remote: at xsbt.boot.Locks$.apply0(Locks.scala:31)
remote: at xsbt.boot.Locks$.apply(Locks.scala:28)
remote: at sbt.IvySbt.withDefaultLogger(Ivy.scala:57)
remote: at sbt.IvySbt.withIvy(Ivy.scala:98)
remote: at sbt.IvySbt.withIvy(Ivy.scala:94)
remote: at sbt.IvySbt$Module.withModule(Ivy.scala:115)
remote: at sbt.IvyActions$.update(IvyActions.scala:125)
remote: at sbt.Classpaths$$anonfun$sbt$Classpaths$$work$1$1.apply(Defaults.scala:1223)
remote: at sbt.Classpaths$$anonfun$sbt$Classpaths$$work$1$1.apply(Defaults.scala:1221)
remote: at sbt.Classpaths$$anonfun$doWork$1$1$$anonfun$74.apply(Defaults.scala:1244)
remote: at sbt.Classpaths$$anonfun$doWork$1$1$$anonfun$74.apply(Defaults.scala:1242)
remote: at sbt.Tracked$$anonfun$lastOutput$1.apply(Tracked.scala:35)
remote: at sbt.Classpaths$$anonfun$doWork$1$1.apply(Defaults.scala:1246)
remote: at sbt.Classpaths$$anonfun$doWork$1$1.apply(Defaults.scala:1241)
remote: at sbt.Tracked$$anonfun$inputChanged$1.apply(Tracked.scala:45)
remote: at sbt.Classpaths$.cachedUpdate(Defaults.scala:1249)
remote: at sbt.Classpaths$$anonfun$updateTask$1.apply(Defaults.scala:1214)
remote: at sbt.Classpaths$$anonfun$updateTask$1.apply(Defaults.scala:1192)
remote: at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
remote: at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:42)
remote: at sbt.std.Transform$$anon$4.work(System.scala:64)
remote: at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:237)
remote: at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:237)
remote: at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:18)
remote: at sbt.Execute.work(Execute.scala:244)
remote: at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:237)
remote: at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:237)
remote: at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:160)
remote: at sbt.CompletionService$$anon$2.call(CompletionService.scala:30)
remote: at java.util.concurrent.FutureTask.run(FutureTask.java:266)
remote: at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
remote: at java.util.concurrent.FutureTask.run(FutureTask.java:266)
remote: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
remote: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
remote: at java.lang.Thread.run(Thread.java:745)
remote: [error] (*:update) sbt.ResolveException: unresolved dependency: com.typesafe.sbtrc#actor-client-2-10;0.3.1: not found
remote: [error] Total time: 26 s, completed Mar 9, 2015 4:20:10 PM
remote:
remote: ! ERROR: Failed to run sbt task: update
remote:
remote:
remote: ! Push rejected, failed to compile Play 2.x - Java app
该文件似乎只是在类型安全的常春藤风格回购中,但当我将解析器更改为:
resolvers += Resolver.url("Typesafe ivy repository", url("http://repo.typesafe.com/typesafe/ivy-releases/"))(Resolver.ivyStylePatterns)
我收到此错误:
remote: [warn] ::::::::::::::::::::::::::::::::::::::::::::::
remote: [warn] :: UNRESOLVED DEPENDENCIES ::
remote: [warn] ::::::::::::::::::::::::::::::::::::::::::::::
remote: [warn] :: com.typesafe.play#sbt-fork-run-protocol_2.10;2.3.8: not found
remote: [warn] :: com.typesafe.play#routes-compiler_2.10;2.3.8: not found
remote: [warn] :: com.typesafe.play#sbt-run-support_2.10;2.3.8: not found
remote: [warn] ::::::::::::::::::::::::::::::::::::::::::::::
remote: sbt.ResolveException: unresolved dependency: com.typesafe.play#sbt-fork-run-protocol_2.10;2.3.8: not found
remote: unresolved dependency: com.typesafe.play#routes-compiler_2.10;2.3.8: not found
remote: unresolved dependency: com.typesafe.play#sbt-run-support_2.10;2.3.8: not found
remote: at sbt.IvyActions$.sbt$IvyActions$$resolve(IvyActions.scala:217)
remote: at sbt.IvyActions$$anonfun$update$1.apply(IvyActions.scala:126)
remote: at sbt.IvyActions$$anonfun$update$1.apply(IvyActions.scala:125)
remote: at sbt.IvySbt$Module$$anonfun$withModule$1.apply(Ivy.scala:115)
remote: at sbt.IvySbt$Module$$anonfun$withModule$1.apply(Ivy.scala:115)
remote: at sbt.IvySbt$$anonfun$withIvy$1.apply(Ivy.scala:103)
remote: at sbt.IvySbt.sbt$IvySbt$$action$1(Ivy.scala:48)
remote: at sbt.IvySbt$$anon$3.call(Ivy.scala:57)
remote: at xsbt.boot.Locks$GlobalLock.withChannel$1(Locks.scala:93)
remote: at xsbt.boot.Locks$GlobalLock.xsbt$boot$Locks$GlobalLock$$withChannelRetries$1(Locks.scala:78)
remote: at xsbt.boot.Locks$GlobalLock$$anonfun$withFileLock$1.apply(Locks.scala:97)
remote: at xsbt.boot.Using$.withResource(Using.scala:10)
remote: at xsbt.boot.Using$.apply(Using.scala:9)
remote: at xsbt.boot.Locks$GlobalLock.ignoringDeadlockAvoided(Locks.scala:58)
remote: at xsbt.boot.Locks$GlobalLock.withLock(Locks.scala:48)
remote: at xsbt.boot.Locks$.apply0(Locks.scala:31)
remote: at xsbt.boot.Locks$.apply(Locks.scala:28)
remote: at sbt.IvySbt.withDefaultLogger(Ivy.scala:57)
remote: at sbt.IvySbt.withIvy(Ivy.scala:98)
remote: at sbt.IvySbt.withIvy(Ivy.scala:94)
remote: at sbt.IvySbt$Module.withModule(Ivy.scala:115)
remote: at sbt.IvyActions$.update(IvyActions.scala:125)
remote: at sbt.Classpaths$$anonfun$sbt$Classpaths$$work$1$1.apply(Defaults.scala:1223)
remote: at sbt.Classpaths$$anonfun$sbt$Classpaths$$work$1$1.apply(Defaults.scala:1221)
remote: at sbt.Classpaths$$anonfun$doWork$1$1$$anonfun$74.apply(Defaults.scala:1244)
remote: at sbt.Classpaths$$anonfun$doWork$1$1$$anonfun$74.apply(Defaults.scala:1242)
remote: at sbt.Tracked$$anonfun$lastOutput$1.apply(Tracked.scala:35)
remote: at sbt.Classpaths$$anonfun$doWork$1$1.apply(Defaults.scala:1246)
remote: at sbt.Classpaths$$anonfun$doWork$1$1.apply(Defaults.scala:1241)
remote: at sbt.Tracked$$anonfun$inputChanged$1.apply(Tracked.scala:45)
remote: at sbt.Classpaths$.cachedUpdate(Defaults.scala:1249)
remote: at sbt.Classpaths$$anonfun$updateTask$1.apply(Defaults.scala:1214)
remote: at sbt.Classpaths$$anonfun$updateTask$1.apply(Defaults.scala:1192)
remote: at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
remote: at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:42)
remote: at sbt.std.Transform$$anon$4.work(System.scala:64)
remote: at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:237)
remote: at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:237)
remote: at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:18)
remote: at sbt.Execute.work(Execute.scala:244)
remote: at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:237)
remote: at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:237)
remote: at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:160)
remote: at sbt.CompletionService$$anon$2.call(CompletionService.scala:30)
remote: at java.util.concurrent.FutureTask.run(FutureTask.java:266)
remote: at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
remote: at java.util.concurrent.FutureTask.run(FutureTask.java:266)
remote: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
remote: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
remote: at java.lang.Thread.run(Thread.java:745)
remote: [error] (*:update) sbt.ResolveException: unresolved dependency: com.typesafe.play#sbt-fork-run-protocol_2.10;2.3.8: not found
remote: [error] unresolved dependency: com.typesafe.play#routes-compiler_2.10;2.3.8: not found
remote: [error] unresolved dependency: com.typesafe.play#sbt-run-support_2.10;2.3.8: not found
remote: Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore?
remote: ! ERROR: Failed to run sbt task: update
remote:
remote:
remote: ! Push rejected, failed to compile Play 2.x - Java app
所以似乎找到了actor-client,但其他三个依赖项并没有,而且似乎也没有同时使用这两种类型的安全回购:(任何想法?
修改 如果我使用这些解析器,我已经调查了一下:
resolvers += "Sonatype OSS Snapshots" at "http://oss.sonatype.org/content/repositories/snapshots"
resolvers += Resolver.url("Typesafe Ivy", url("http://repo.typesafe.com/typesafe/ivy-snapshots"))(Resolver.ivyStylePatterns)
它正确检查所有仓库:
[warn] module not found: com.typesafe.play#sbt-run-support_2.10;2.3.8
[warn] ==== typesafe-ivy-releases: tried
[warn] http://repo.typesafe.com/typesafe/ivy-releases/com.typesafe.play/sbt-run-support_2.10/2.3.8/ivys/ivy.xml
[warn] ==== sbt-plugin-releases: tried
[warn] http://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/com.typesafe.play/sbt-run-support_2.10/2.3.8/ivys/ivy.xml
[warn] ==== local: tried
[warn] /tmp/scala_buildpack_build_dir/.sbt_home/.ivy2/local/com.typesafe.play/sbt-run-support_2.10/2.3.8/ivys/ivy.xml
[warn] ==== public: tried
[warn] http://repo1.maven.org/maven2/com/typesafe/play/sbt-run-support_2.10/2.3.8/sbt-run-support_2.10-2.3.8.pom
[warn] ==== Sonatype OSS Snapshots: tried
[warn] http://oss.sonatype.org/content/repositories/snapshots/com/typesafe/play/sbt-run-support_2.10/2.3.8/sbt-run-support_2.10-2.3.8.pom
[warn] ==== Typesafe Ivy: tried
[warn] http://repo.typesafe.com/typesafe/ivy-snapshots/com.typesafe.play/sbt-run-support_2.10/2.3.8/ivys/ivy.xml
但是,只要我将普通的类型安全仓库添加为第三个:
resolvers += "Sonatype OSS Snapshots" at "http://oss.sonatype.org/content/repositories/snapshots"
resolvers += Resolver.url("Typesafe Ivy", url("http://repo.typesafe.com/typesafe/ivy-snapshots"))(Resolver.ivyStylePatterns)
resolvers += "Typesafe" at "http://repo.typesafe.com/typesafe/releases/"
所有解析器都将被忽略,它只会从名为“Typesafe Releases Repository”的类型安全存储库中检查完全未配置的内容:
[warn] module not found: com.typesafe.sbtrc#actor-client-2-10;0.3.1
[warn] ==== local: tried
[warn] /tmp/scala_buildpack_build_dir/.sbt_home/.ivy2/local/com.typesafe.sbtrc/actor-client-2-10/0.3.1/ivys/ivy.xml
[warn] ==== public: tried
[warn] http://repo1.maven.org/maven2/com/typesafe/sbtrc/actor-client-2-10/0.3.1/actor-client-2-10-0.3.1.pom
[warn] ==== Typesafe Releases Repository: tried
[warn] https://repo.typesafe.com/typesafe/releases/com/typesafe/sbtrc/actor-client-2-10/0.3.1/actor-client-2-10-0.3.1.pom
我为我找到了一个工作解决方案:
使用activator
打开播放应用后,project/play-fork-run.sbt
会有一个包含以下行的新文件:
addSbtPlugin("com.typesafe.play" % "sbt-fork-run-plugin" % "2.3.8")
这个sbt插件依赖于导致无法在Heroku上部署的actor jar。如果我删除play-fork-run.sbt
,我可以在Heroku上部署项目。这只是一个临时解决方案,因为如果您使用激活器打开应用程序,将再次添加依赖项,但至少可以部署该应用程序。
答案 0 :(得分:0)
不确定此问题在2018年是否仍然有用,但是答案将是使用sbt而不是Activator。