为什么使用sbt.ResolveException构建失败:未解析的依赖项:com.typesafe.sbt #sbt-pgp; 0.8.2:未找到?

时间:2014-10-15 22:10:26

标签: sbt

对于使用sbt 0.13.5成功构建的项目(尝试升级到0.13.6,仍然无效),我们突然在构建服务器上遇到故障(类型安全和maven repos通过我们的内部Nexus repo代理)任何想法? 编辑:注意,在本地运行时工作正常

[warn]  module not found: com.typesafe.sbt#sbt-pgp;0.8.2
[warn] ==== local: tried
[warn]   /home/bisonadm/.ivy2/local/com.typesafe.sbt/sbt-pgp/scala_2.10/sbt_0.13/0.8.2/ivys/ivy.xml
[warn] ==== typesafe-ivy-releases: tried
[warn]   https://repo.typesafe.com/typesafe/ivy-releases/com.typesafe.sbt/sbt-pgp/0.8.2/ivys/ivy.xml
[warn] ==== public: tried
[warn]   https://repo1.maven.org/maven2/com/typesafe/sbt/sbt-pgp_2.10_0.13/0.8.2/sbt-pgp-0.8.2.pom
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  ::          UNRESOLVED DEPENDENCIES         ::
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  :: com.typesafe.sbt#sbt-pgp;0.8.2: 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-pgp:0.8.2 (sbtVersion=0.13, scalaVersion=2.10)
[warn] 
[warn]  Note: Unresolved dependencies path:
[warn]      com.typesafe.sbt:sbt-pgp:0.8.2 (sbtVersion=0.13, scalaVersion=2.10)
[warn]        +- org.scalastyle:scalastyle-sbt-plugin:0.5.0 (sbtVersion=0.13, scalaVersion=2.10) (/ahp_agents/ec/workspace/T_COMMON_master_full_CI_J4350527/common/project/plugins.sbt#L5-6)
[warn]        +- default:common-build:0.1-SNAPSHOT (sbtVersion=0.13, scalaVersion=2.10)
sbt.ResolveException: unresolved dependency: com.typesafe.sbt#sbt-pgp;0.8.2: not found
    at sbt.IvyActions$.sbt$IvyActions$$resolve(IvyActions.scala:243)
    at sbt.IvyActions$$anonfun$updateEither$1.apply(IvyActions.scala:158)
    at sbt.IvyActions$$anonfun$updateEither$1.apply(IvyActions.scala:156)
    at sbt.IvySbt$Module$$anonfun$withModule$1.apply(Ivy.scala:147)
    at sbt.IvySbt$Module$$anonfun$withModule$1.apply(Ivy.scala:147)
    at sbt.IvySbt$$anonfun$withIvy$1.apply(Ivy.scala:124)
    at sbt.IvySbt.sbt$IvySbt$$action$1(Ivy.scala:56)
    at sbt.IvySbt$$anon$3.call(Ivy.scala:64)
    at xsbt.boot.Locks$GlobalLock.withChannel$1(Locks.scala:93)
    at xsbt.boot.Locks$GlobalLock.xsbt$boot$Locks$GlobalLock$$withChannelRetries$1(Locks.scala:78)
    at xsbt.boot.Locks$GlobalLock$$anonfun$withFileLock$1.apply(Locks.scala:97)
    at xsbt.boot.Using$.withResource(Using.scala:10)
    at xsbt.boot.Using$.apply(Using.scala:9)
    at xsbt.boot.Locks$GlobalLock.ignoringDeadlockAvoided(Locks.scala:58)
    at xsbt.boot.Locks$GlobalLock.withLock(Locks.scala:48)
    at xsbt.boot.Locks$.apply0(Locks.scala:31)
    at xsbt.boot.Locks$.apply(Locks.scala:28)
    at sbt.IvySbt.withDefaultLogger(Ivy.scala:64)
    at sbt.IvySbt.withIvy(Ivy.scala:119)
    at sbt.IvySbt.withIvy(Ivy.scala:116)
    at sbt.IvySbt$Module.withModule(Ivy.scala:147)
    at sbt.IvyActions$.updateEither(IvyActions.scala:156)
    at sbt.Classpaths$$anonfun$sbt$Classpaths$$work$1$1.apply(Defaults.scala:1282)
    at sbt.Classpaths$$anonfun$sbt$Classpaths$$work$1$1.apply(Defaults.scala:1279)
    at sbt.Classpaths$$anonfun$doWork$1$1$$anonfun$84.apply(Defaults.scala:1309)
    at sbt.Classpaths$$anonfun$doWork$1$1$$anonfun$84.apply(Defaults.scala:1307)
    at sbt.Tracked$$anonfun$lastOutput$1.apply(Tracked.scala:35)
    at sbt.Classpaths$$anonfun$doWork$1$1.apply(Defaults.scala:1312)
    at sbt.Classpaths$$anonfun$doWork$1$1.apply(Defaults.scala:1306)
    at sbt.Tracked$$anonfun$inputChanged$1.apply(Tracked.scala:45)
    at sbt.Classpaths$.cachedUpdate(Defaults.scala:1324)
    at sbt.Classpaths$$anonfun$updateTask$1.apply(Defaults.scala:1264)
    at sbt.Classpaths$$anonfun$updateTask$1.apply(Defaults.scala:1242)
    at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
    at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:40)
    at sbt.std.Transform$$anon$4.work(System.scala:63)
    at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:226)
    at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:226)
    at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17)
    at sbt.Execute.work(Execute.scala:235)
    at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:226)
    at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:226)
    at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:159)
    at sbt.CompletionService$$anon$2.call(CompletionService.scala:28)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)
[error] (*:update) sbt.ResolveException: unresolved dependency: com.typesafe.sbt#sbt-pgp;0.8.2: not found

1 个答案:

答案 0 :(得分:0)

It appears they've moved to Bintray recently(也许清理其他地方?)。

使用the recent release of sbt-pgp 1.0-M1我可以在https://bintray.com/sbt/sbt-plugin-releases/sbt-pgp/1.0-M1/view找到插件的二进制文件。

正如您可以阅读0.13.6 Release Notes中的改进:

  

添加Resolver.jcenterRepo和Resolver.bintrayRepo(所有者,repo)以更轻松地添加Bintray。

尽管如此,以下内容对我有用(请注意我以前没有使用过这个插件):

<强>项目/ SBT-pgp.sbt

resolvers += Resolver.jcenterRepo

addSbtPlugin("com.typesafe.sbt" % "sbt-pgp" % "1.0-M1")

<强>项目/ build.properties

sbt.version=0.13.6

不需要其他文件来启动sbt shell(使用sbt)并查询可用的插件:

> plugins
In file:/Users/jacek/sandbox/sbt-pgp/
    sbt.plugins.IvyPlugin: enabled in sbt-pgp
    sbt.plugins.JvmPlugin: enabled in sbt-pgp
    sbt.plugins.CorePlugin: enabled in sbt-pgp
    sbt.plugins.JUnitXmlReportPlugin: enabled in sbt-pgp
    com.typesafe.sbt.SbtPgp: enabled in sbt-pgp