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

error when using for an sbt plugin `Supplied file ... is a not an existing directory`

mpollmeier opened this issue · comments

With the latest 3.6 release, when using for an sbt plugin build, the following error happens during sonatypeBundleRelease:

[info] Created successfully: ioshiftleft-1539
[error] java.io.IOException: Supplied file /home/mp/Projects/shiftleft/sbt-ci-release-early/target/sonatype-staging/1.1.3 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)

Build on travis.ci: https://travis-ci.org/ShiftLeftSecurity/sbt-ci-release-early/jobs/583381874
Repo: https://github.com/ShiftLeftSecurity/sbt-ci-release-early/tree/6f9ed3ce07d86dd7aa4d3a4ba53983bdba43909f

Any idea where this comes from? Somehow the localBundlePath is wrong for sbt plugin builds.
Update: other than I first thought, this is actually broken for both sbt 1.2.8 and 1.3.0.

Argh, user error. I didn't change the publishTo := sonatypePublishToBundle.value as per the docs.

Let me know if you would like me to send you a PR for the readme, under e.g. 'common pitfallse', along with #100 (comment)

Thanks. I'm releasing sbt-sonatype 3.7 with the latest http-client version. So only a PR for publishTo setting is necessary.