【发布时间】:2015-05-14 17:05:09
【问题描述】:
尝试关注 Manning 的 Scala 游戏,我在以下位置创建了一个 git 存储库:
https://github.com/nilvon9wo/Ean2BarcodePlayModule
网站发布于:
http://nilvon9wo.github.io/Ean2BarcodePlayModule
在我的 build.sbt 中,我添加了:
organization := "net.nowhereatall.playforscala"
publishTo := Some("Ean2BarcodePlayModule" at "http://nilvon9wo.github.io/Ean2BarcodePlayModule")
credentials += Credentials(Path.userHome / ".repo-credentials" / "credentials.properties")
而我的 credentials.properties 是这样的:
realm="Ean2BarcodePlayModule"
host=http://nilvon9wo.github.io/Ean2BarcodePlayModule
user=xxxxxxxxxxx
password=xxxxxxxxxx
当我执行激活器发布时,它终止并出现以下异常:
java.io.IOException: PUT operation to URL http://nilvon9wo.github.io/Ean2Barcode
PlayModule/net/nowhereatall/playforscala/ean2barcodeplaymodule_2.11/1.0-SNAPSHOT
/ean2barcodeplaymodule_2.11-1.0-SNAPSHOT.pom failed with status code 405: Not Al
lowed
at org.apache.ivy.util.url.AbstractURLHandler.validatePutStatusCode(Abst
ractURLHandler.java:82)
at org.apache.ivy.util.url.BasicURLHandler.upload(BasicURLHandler.java:2
64)
at org.apache.ivy.util.FileUtil.copy(FileUtil.java:150)
at org.apache.ivy.plugins.repository.url.URLRepository.put(URLRepository
.java:84)
at org.apache.ivy.plugins.repository.AbstractRepository.put(AbstractRepo
sitory.java:130)
at sbt.ConvertResolver$ChecksumFriendlyURLResolver$class.put(ConvertReso
lver.scala:80)
at sbt.ConvertResolver$PluginCapableResolver$1.put(ConvertResolver.scala
:106)
at org.apache.ivy.plugins.resolver.RepositoryResolver.publish(Repository
Resolver.java:216)
at sbt.IvyActions$$anonfun$publish$3.apply(IvyActions.scala:263)
at sbt.IvyActions$$anonfun$publish$3.apply(IvyActions.scala:262)
at scala.collection.TraversableLike$WithFilter$$anonfun$foreach$1.apply(
TraversableLike.scala:772)
at scala.collection.mutable.ResizableArray$class.foreach(ResizableArray.
scala:59)
at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:47)
at scala.collection.TraversableLike$WithFilter.foreach(TraversableLike.s
cala:771)
at sbt.IvyActions$.publish(IvyActions.scala:262)
at sbt.IvyActions$$anonfun$publish$1$$anonfun$apply$1.apply$mcV$sp(IvyAc
tions.scala:97)
at sbt.IvyActions$$anonfun$publish$1$$anonfun$apply$1.apply(IvyActions.s
cala:97)
at sbt.IvyActions$$anonfun$publish$1$$anonfun$apply$1.apply(IvyActions.s
cala:97)
at sbt.IvyActions$.withChecksums(IvyActions.scala:106)
at sbt.IvyActions$.sbt$IvyActions$$withChecksums(IvyActions.scala:101)
at sbt.IvyActions$$anonfun$publish$1.apply(IvyActions.scala:97)
at sbt.IvyActions$$anonfun$publish$1.apply(IvyActions.scala:91)
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$$withChannelRet
ries$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$.publish(IvyActions.scala:91)
at sbt.Classpaths$$anonfun$publishTask$1.apply(Defaults.scala:1173)
at sbt.Classpaths$$anonfun$publishTask$1.apply(Defaults.scala:1172)
at scala.Function3$$anonfun$tupled$1.apply(Function3.scala:35)
at scala.Function3$$anonfun$tupled$1.apply(Function3.scala:34)
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:23
7)
at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:23
7)
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(ConcurrentRestric
tions.scala:160)
at sbt.CompletionService$$anon$2.call(CompletionService.scala:30)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:47
1)
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] (*:publish) java.io.IOException: PUT operation to URL http://nilvon9wo.g
ithub.io/Ean2BarcodePlayModule/net/nowhereatall/playforscala/ean2barcodeplaymodu
le_2.11/1.0-SNAPSHOT/ean2barcodeplaymodule_2.11-1.0-SNAPSHOT.pom failed with sta
tus code 405: Not Allowed
如何正确配置 build.sbt 和/或 credentials.properties 以使activator publish 成功?
【问题讨论】:
标签: github playframework-2.0 repository sbt typesafe-activator