为什么构建因未解析的依赖而失败:com.typesafe.sbt #sbt-native-packager; 0.7.4?

时间:2014-10-05 18:25:00

标签: scala playframework typesafe-activator

根据Typesafe Activator,我使用sbt启动器版本0.13.5。

尝试在我继承的代码上运行./activator run时出现以下错误,该代码在另一台机器上运行。

[warn]  module not found: com.typesafe.sbt#sbt-native-packager;0.7.4
[warn] ==== typesafe-ivy-releases: tried
[warn]   http://repo.typesafe.com/typesafe/ivy-releases/com.typesafe.sbt/sbt-native-packager/scala_2.10/sbt_0.13/0.7.4/ivys/ivy.xml
[warn] ==== sbt-plugin-releases: tried
[warn]   http://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/com.typesafe.sbt/sbt-native-packager/scala_2.10/sbt_0.13/0.7.4/ivys/ivy.xml
[warn] ==== local: tried
[warn]   C:\Users\<username>\.ivy2\local\com.typesafe.sbt\sbt-native-packager\scala_2.10\sbt_0.13\0.7.4\ivys\ivy.xml
[warn] ==== sbt-releases-repo: tried
[warn]   http://repo.typesafe.com/typesafe/ivy-releases/com.typesafe.sbt/sbt-native-packager/scala_2.10/sbt_0.13/0.7.4/ivys/ivy.xml
[warn] ==== sbt-plugins-repo: tried
[warn]   http://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/com.typesafe.sbt/sbt-native-packager/scala_2.10/sbt_0.13/0.7.4/ivys/ivy.xml
[warn] ==== maven-central: tried
[warn]   http://repo1.maven.org/maven2/com/typesafe/sbt/sbt-native-packager_2.10_0.13/0.7.4/sbt-native-packager-0.7.4.pom
[warn] ==== Typesafe repository: tried
[warn]   http://repo.typesafe.com/typesafe/releases/com/typesafe/sbt/sbt-native-packager_2.10_0.13/0.7.4/sbt-native-packager-0.7.4.pom
[info] Resolving org.fusesource.jansi#jansi;1.4 ...
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  ::          UNRESOLVED DEPENDENCIES         ::
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  :: com.typesafe.sbt#sbt-native-packager;0.7.4: not found
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]
[warn]  Note: Some unresolved dependencies have extra attributes.  Check that these dependencies exist with the requested attributes.
[warn]          com.typesafe.sbt:sbt-native-packager:0.7.4 (scalaVersion=2.10, sbtVersion=0.13)
[warn]
sbt.ResolveException: unresolved dependency: com.typesafe.sbt#sbt-native-packager;0.7.4: not found
        at sbt.IvyActions$.sbt$IvyActions$$resolve(IvyActions.scala:217)
        at sbt.IvyActions$$anonfun$update$1.apply(IvyActions.scala:126)
        at sbt.IvyActions$$anonfun$update$1.apply(IvyActions.scala:125)
        at sbt.IvySbt$Module$$anonfun$withModule$1.apply(Ivy.scala:115)
        at sbt.IvySbt$Module$$anonfun$withModule$1.apply(Ivy.scala:115)
        at sbt.IvySbt$$anonfun$withIvy$1.apply(Ivy.scala:103)
        at sbt.IvySbt.sbt$IvySbt$$action$1(Ivy.scala:48)
        at sbt.IvySbt$$anon$3.call(Ivy.scala:57)
        at xsbt.boot.Locks$GlobalLock.withChannel$1(Locks.scala:98)
        at xsbt.boot.Locks$GlobalLock.xsbt$boot$Locks$GlobalLock$$withChannelRetries$1(Locks.scala:81)
        at xsbt.boot.Locks$GlobalLock$$anonfun$withFileLock$1.apply(Locks.scala:102)
        at xsbt.boot.Using$.withResource(Using.scala:11)
        at xsbt.boot.Using$.apply(Using.scala:10)
        at xsbt.boot.Locks$GlobalLock.ignoringDeadlockAvoided(Locks.scala:62)
        at xsbt.boot.Locks$GlobalLock.withLock(Locks.scala:52)
        at xsbt.boot.Locks$.apply0(Locks.scala:31)
        at xsbt.boot.Locks$.apply(Locks.scala:28)
        at sbt.IvySbt.withDefaultLogger(Ivy.scala:57)
        at sbt.IvySbt.withIvy(Ivy.scala:98)
        at sbt.IvySbt.withIvy(Ivy.scala:94)
        at sbt.IvySbt$Module.withModule(Ivy.scala:115)
        at sbt.IvyActions$.update(IvyActions.scala:125)
        at sbt.Classpaths$$anonfun$sbt$Classpaths$$work$1$1.apply(Defaults.scala:1223)
        at sbt.Classpaths$$anonfun$sbt$Classpaths$$work$1$1.apply(Defaults.scala:1221)
        at sbt.Classpaths$$anonfun$doWork$1$1$$anonfun$74.apply(Defaults.scala:1244)
        at sbt.Classpaths$$anonfun$doWork$1$1$$anonfun$74.apply(Defaults.scala:1242)
        at sbt.Tracked$$anonfun$lastOutput$1.apply(Tracked.scala:35)
        at sbt.Classpaths$$anonfun$doWork$1$1.apply(Defaults.scala:1246)
        at sbt.Classpaths$$anonfun$doWork$1$1.apply(Defaults.scala:1241)
        at sbt.Tracked$$anonfun$inputChanged$1.apply(Tracked.scala:45)
        at sbt.Classpaths$.cachedUpdate(Defaults.scala:1249)
        at sbt.Classpaths$$anonfun$updateTask$1.apply(Defaults.scala:1214)
        at sbt.Classpaths$$anonfun$updateTask$1.apply(Defaults.scala:1192)
        at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
        at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:42)
        at sbt.std.Transform$$anon$4.work(System.scala:64)
        at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:237)
        at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:237)
        at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:18)
        at sbt.Execute.work(Execute.scala:244)
        at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:237)
        at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:237)
        at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:160)
        at sbt.CompletionService$$anon$2.call(CompletionService.scala:30)
        at java.util.concurrent.FutureTask.run(Unknown Source)
        at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
        at java.util.concurrent.FutureTask.run(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)
[error] (*:update) sbt.ResolveException: unresolved dependency: com.typesafe.sbt#sbt-native-packager;0.7.4: not found

我不理解它正在寻找的模块,它不会出现在任何build.sbtplugins.sbt文件中。

4 个答案:

答案 0 :(得分:12)

以下是该问题的另一种解决方法:

将bintray repo添加到你的解析器(project / plugins.sbt)。

resolvers += Resolver.url("bintray-sbt-plugins", url("https://dl.bintray.com/sbt/sbt-plugin-releases/"))(Resolver.ivyStylePatterns) 

答案 1 :(得分:2)

我刚遇到同样的问题。我觉得有人发布了一个版本,但我不确定。

作为一种解决方法,您可以复制jar并在本地存储库中将其命名为0.7.4。当然,我不建议它不仅仅是暂时的,但它可以让你运行。 (这就是我所做的。)

答案 2 :(得分:2)

已经修复了将http://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/重定向到http://dl.bintray.com/sbt/sbt-plugin-releases/的问题。 不确定它是暂时的还是明确的解决方法,但现在它现在像以前一样工作。

答案 3 :(得分:1)

这是一个有希望的临时问题,由镜像Bintray存储库的问题引起。 Peter Vlugter posted有一个解决方法:

  

暂时解决方法,将bintray存储库添加到project/plugins.sbt

resolvers += Resolver.url("bintray-sbt-plugins", url("https://dl.bintray.com/sbt/sbt-plugin-releases/"))(Resolver.ivyStylePatterns)