xerial / sbt-sonatype

A sbt plugin for publishing Scala/Java projects to the Maven central.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

NPE during staging

limansky opened this issue · comments

Hi,

I'm trying to incorporate sbt-sonatype in the build process, and get NPE:

[info] 	published yupana-spark_2.12 to https://oss.sonatype.org/service/local/staging/deploy/maven2/org/yupana/yupana-spark_2.12/0.2.0/yupana-spark_2.12-0.2.0-sources.jar.asc
[success] Total time: 214 s, completed 31.10.2019 16:19:48
[info] Reapplying settings...
[info] Set current project to yupana (in build file:/home/limansky/projects/yupana/)
[info] Nexus repository URL: https://oss.sonatype.org/service/local
[info] sonatypeProfileName = org.yupana
[info] Preparing a new staging repository for [sbt-sonatype] yupana 0.2.0
[info] Reading staging repository profiles...
[info] Reading staging profiles...
[info] Creating a staging repository in profile org.yupana with a description key: [sbt-sonatype] yupana 0.2.0
[info] No staging repository for [sbt-sonatype] yupana 0.2.0 is found
[info] Created successfully: orgyupana-1009
[error] java.io.IOException: Supplied file /home/limansky/projects/yupana/target/sonatype-staging/0.2.0 is a not an existing directory!
[error] 	at org.sonatype.spice.zapper.fs.AbstractDirectory.<init>(AbstractDirectory.java:32)
[error] 	at org.sonatype.spice.zapper.fs.DirectoryIOSource.<init>(DirectoryIOSource.java:68)
[error] 	at org.sonatype.spice.zapper.fs.DirectoryIOSource.<init>(DirectoryIOSource.java:59)
[error] 	at org.sonatype.spice.zapper.fs.DirectoryIOSource.<init>(DirectoryIOSource.java:50)
[error] 	at xerial.sbt.NexusRESTService.uploadBundle(NexusClient.scala:189)
[error] 	at xerial.sbt.Sonatype$.$anonfun$sonatypeBundleRelease$1(Sonatype.scala:151)
[error] 	at sbt.Command$.$anonfun$command$2(Command.scala:91)
[error] 	at sbtrelease.ReleasePlugin$autoImport$.$anonfun$releaseStepCommand$2(ReleasePlugin.scala:94)
[error] 	at sbtrelease.ReleasePlugin$autoImport$ReleaseKeys$.filterFailure$1(ReleasePlugin.scala:177)
[error] 	at sbtrelease.ReleasePlugin$autoImport$ReleaseKeys$.$anonfun$releaseCommand$9(ReleasePlugin.scala:195)
[error] 	at scala.Function$.$anonfun$chain$2(Function.scala:24)
[error] 	at scala.collection.LinearSeqOptimized.foldLeft(LinearSeqOptimized.scala:122)
[error] 	at scala.collection.LinearSeqOptimized.foldLeft$(LinearSeqOptimized.scala:118)
[error] 	at scala.collection.immutable.List.foldLeft(List.scala:85)
[error] 	at scala.collection.TraversableOnce.$div$colon(TraversableOnce.scala:150)
[error] 	at scala.collection.TraversableOnce.$div$colon$(TraversableOnce.scala:150)
[error] 	at scala.collection.AbstractTraversable.$div$colon(Traversable.scala:104)
[error] 	at scala.Function$.$anonfun$chain$1(Function.scala:24)
[error] 	at sbtrelease.ReleasePlugin$autoImport$ReleaseKeys$.$anonfun$releaseCommand$2(ReleasePlugin.scala:201)
[error] 	at sbt.Command$.$anonfun$applyEffect$4(Command.scala:142)
[error] 	at sbt.Command$.$anonfun$applyEffect$2(Command.scala:137)
[error] 	at sbt.Command$.process(Command.scala:181)
[error] 	at sbt.MainLoop$.processCommand(MainLoop.scala:151)
[error] 	at sbt.MainLoop$.$anonfun$next$2(MainLoop.scala:139)
[error] 	at sbt.State$$anon$1.runCmd$1(State.scala:246)
[error] 	at sbt.State$$anon$1.process(State.scala:250)
[error] 	at sbt.MainLoop$.$anonfun$next$1(MainLoop.scala:139)
[error] 	at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:16)
[error] 	at sbt.MainLoop$.next(MainLoop.scala:139)
[error] 	at sbt.MainLoop$.run(MainLoop.scala:132)
[error] 	at sbt.MainLoop$.$anonfun$runWithNewLog$1(MainLoop.scala:110)
[error] 	at sbt.io.Using.apply(Using.scala:22)
[error] 	at sbt.MainLoop$.runWithNewLog(MainLoop.scala:104)
[error] 	at sbt.MainLoop$.runAndClearLast(MainLoop.scala:59)
[error] 	at sbt.MainLoop$.runLoggedLoop(MainLoop.scala:44)
[error] 	at sbt.MainLoop$.runLogged(MainLoop.scala:35)
[error] 	at sbt.StandardMain$.runManaged(Main.scala:138)
[error] 	at sbt.xMain.run(Main.scala:89)
[error] 	at xsbt.boot.Launch$$anonfun$run$1.apply(Launch.scala:111)
[error] 	at xsbt.boot.Launch$.withContextLoader(Launch.scala:130)
[error] 	at xsbt.boot.Launch$.run(Launch.scala:111)
[error] 	at xsbt.boot.Launch$$anonfun$apply$1.apply(Launch.scala:37)
[error] 	at xsbt.boot.Launch$.launch(Launch.scala:119)
[error] 	at xsbt.boot.Launch$.apply(Launch.scala:20)
[error] 	at xsbt.boot.Boot$.runImpl(Boot.scala:56)
[error] 	at xsbt.boot.Boot$.main(Boot.scala:18)
[error] 	at xsbt.boot.Boot.main(Boot.scala)
[error] java.io.IOException: Supplied file /home/limansky/projects/yupana/target/sonatype-staging/0.2.0 is a not an existing directory!
[error] Use 'last' for the full log.
sbt:yupana> [info] shutting down server

Am I do something wrong? The code is available at https://github.com/rusexpertiza-llc/yupana

It looks like publishTo is not configured as
publishTo := sonatypePublishToBundle.value

@xerial Thanks, that fixed the issue.