Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java.io.IOException: Supplied file is a not an existing directory! #122

Closed
asakaev opened this issue May 29, 2020 · 14 comments
Closed

java.io.IOException: Supplied file is a not an existing directory! #122

asakaev opened this issue May 29, 2020 · 14 comments

Comments

@asakaev
Copy link
Contributor

asakaev commented May 29, 2020

Hello Olaf!

I getting this error without publishTo := sonatypePublishToBundle.value in build.sbt. What I'm missing?

java.io.IOException: Supplied file /home/runner/work/leftpad/leftpad/target/sonatype-staging/0.1.6-SNAPSHOT is a not an existing directory!
272
	at org.sonatype.spice.zapper.fs.AbstractDirectory.<init>(AbstractDirectory.java:32)
273
	at org.sonatype.spice.zapper.fs.DirectoryIOSource.<init>(DirectoryIOSource.java:68)
@SethTisue
Copy link
Member

does it happen even with non-SNAPSHOTs?

@bpg
Copy link

bpg commented Jun 18, 2020

I have the same issue with -SNAPSHOT versions, works fine for regular ones. Full log is available here.

@asakaev , have you able to find any workaround for this?

@olafurpg
Copy link
Member

Thank you for reporting! This looks related to xerial/sbt-sonatype#103 can you check if define publishTo in build.sbt? Custom publishTo settings should be removed, they're defined by sbt-sonatype

@juanpedromoreno
Copy link

scala-exercises libraries are also experiencing this issue. I tried specifying the publishTo setting, without success either.

Have you found any workaround for this issue? Any help is appreciated.

@olafurpg
Copy link
Member

@juanpedromoreno what happens if you remove publishTo from your settings?

@juanpedromoreno
Copy link

In the last attempt, I removed it, but I got the same result.

@olafurpg
Copy link
Member

@juanpedromoreno Looking at your build.sbt https://github.com/scala-exercises/exercises-template/blob/7c6f96a9be3368490ffd647c39bf43859c4c25a5/build.sbt , some thoughts

inThisBuild(List(
  organization := "com.geirsson",
  homepage := Some(url("https://github.com/scalameta/sbt-scalafmt")),
  licenses := List("Apache-2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0")),
  developers := List(
    Developer(
      "olafurpg",
      "Ólafur Páll Geirsson",
      "olafurpg@gmail.com",
      url("https://geirsson.com")
    )
  )
))

@juanpedromoreno
Copy link

Thanks @olafurpg !

I think that was the problem, I did a couple of new commits: 1 and 2. And seemed to work.

I thought skip in publish := true only affects the sbt root module. It seems this has changed recently (I've been using this way for a long time now 🤔 ).

Again, thanks for your help!

@juanpedromoreno
Copy link

BTW, some of the missing settings you have mentioned are automatically being provided by this amazing plugin by @alejandrohdezma :)

@Tochemey
Copy link

Tochemey commented Jul 2, 2020

I have the issue when I cut a release tag. It has been working all this while.

@Tochemey
Copy link

Tochemey commented Jul 2, 2020

This is the log:

[info] 	published lagompb-core_2.13 to /home/travis/build/super-flat/lagom-pb/target/sonatype-staging/0.3.0/io/superflat/lagompb-core_2.13/0.3.0/lagompb-core_2.13-0.3.0-javadoc.jar.asc
[info] 	published lagompb-core_2.13 to /home/travis/build/super-flat/lagom-pb/target/sonatype-staging/0.3.0/io/superflat/lagompb-core_2.13/0.3.0/lagompb-core_2.13-0.3.0-sources.jar.asc
[info] 	published lagompb-core_2.13 to /home/travis/build/super-flat/lagom-pb/target/sonatype-staging/0.3.0/io/superflat/lagompb-core_2.13/0.3.0/lagompb-core_2.13-0.3.0-javadoc.jar
[info] 	published lagompb-core_2.13 to /home/travis/build/super-flat/lagom-pb/target/sonatype-staging/0.3.0/io/superflat/lagompb-core_2.13/0.3.0/lagompb-core_2.13-0.3.0.pom
[info] 	published lagompb-core_2.13 to /home/travis/build/super-flat/lagom-pb/target/sonatype-staging/0.3.0/io/superflat/lagompb-core_2.13/0.3.0/lagompb-core_2.13-0.3.0.jar
[info] 	published lagompb-core_2.13 to /home/travis/build/super-flat/lagom-pb/target/sonatype-staging/0.3.0/io/superflat/lagompb-core_2.13/0.3.0/lagompb-core_2.13-0.3.0.pom.asc
[info] 	published lagompb-core_2.13 to /home/travis/build/super-flat/lagom-pb/target/sonatype-staging/0.3.0/io/superflat/lagompb-core_2.13/0.3.0/lagompb-core_2.13-0.3.0-sources.jar
[info] 	published lagompb-core_2.13 to /home/travis/build/super-flat/lagom-pb/target/sonatype-staging/0.3.0/io/superflat/lagompb-core_2.13/0.3.0/lagompb-core_2.13-0.3.0.jar.asc
[success] Total time: 41 s, completed Jul 2, 2020 7:19:44 PM
[info] Reapplying settings...
[info] set current project to lagompb (in build file:/home/travis/build/super-flat/lagom-pb/)
[warn] .env file not found (fileName=.env), no .env environment configured.
2020-07-02 19:19:47.095Z  info [finagle] Using bridged scheduler with 2 workers 
2020-07-02 19:19:47.107Z  info [finagle] Finagle version 20.3.0 (rev=e3fd6d1bd88c9ed7edeb98a6598e23800924c633) built at 20200308-110321 
2020-07-02 19:19:48.335Z  info [SonatypeService] sonatypeRepository  : https://oss.sonatype.org/service/local  - (SonatypeService.scala:24)
2020-07-02 19:19:48.342Z  info [SonatypeService] sonatypeProfileName : io.superflat  - (SonatypeService.scala:25)
[info] Preparing a new staging repository for [sbt-sonatype] lagompb 0.3.0+0-4a8849f9+20200702-1919-SNAPSHOT
2020-07-02 19:19:48.356Z  info [SonatypeClient] Reading staging repository profiles...  - (SonatypeClient.scala:94)
2020-07-02 19:19:49.749Z  info [SonatypeClient] Reading staging profiles...  - (SonatypeClient.scala:106)
2020-07-02 19:19:51.684Z  info [SonatypeService] No previous staging repository for [sbt-sonatype] lagompb 0.3.0+0-4a8849f9+20200702-1919-SNAPSHOT was found  - (SonatypeService.scala:96)
2020-07-02 19:19:53.068Z  info [SonatypeClient] Creating a staging repository in profile io.superflat with a description key: [sbt-sonatype] lagompb 0.3.0+0-4a8849f9+20200702-1919-SNAPSHOT  - (SonatypeClient.scala:112)
2020-07-02 19:20:30.869Z  info [SonatypeClient] Created successfully: iosuperflat-1004  - (SonatypeClient.scala:125)
2020-07-02 19:20:30.902Z error [Sonatype] 
java.io.IOException: Supplied file /home/travis/build/super-flat/lagom-pb/target/sonatype-staging/0.3.0+0-4a8849f9+20200702-1919-SNAPSHOT is a not an existing directory!
	at org.sonatype.spice.zapper.fs.AbstractDirectory.<init>(AbstractDirectory.java:32)
	at org.sonatype.spice.zapper.fs.DirectoryIOSource.<init>(DirectoryIOSource.java:68)
	at org.sonatype.spice.zapper.fs.DirectoryIOSource.<init>(DirectoryIOSource.java:59)
	at org.sonatype.spice.zapper.fs.DirectoryIOSource.<init>(DirectoryIOSource.java:50)
	at xerial.sbt.sonatype.SonatypeClient.$anonfun$uploadBundle$1(SonatypeClient.scala:260)
	at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:23)
	at scala.util.Try$.apply(Try.scala:213)
	at wvlet.airframe.control.Retry$RetryContext.runInternal(Retry.scala:265)
	at wvlet.airframe.control.Retry$RetryContext.run(Retry.scala:253)
	at xerial.sbt.sonatype.SonatypeClient.uploadBundle(SonatypeClient.scala:245)
	at xerial.sbt.sonatype.SonatypeService.uploadBundle(SonatypeService.scala:71)
	at xerial.sbt.Sonatype$.$anonfun$sonatypeBundleRelease$2(Sonatype.scala:159)
	at xerial.sbt.Sonatype$.withSonatypeService(Sonatype.scala:402)
	at xerial.sbt.Sonatype$.$anonfun$sonatypeBundleRelease$1(Sonatype.scala:155)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at xsbt.boot.Launch$$anonfun$run$1.apply(Launch.scala:111)
	at xsbt.boot.Launch$.withContextLoader(Launch.scala:130)
	at xsbt.boot.Launch$.run(Launch.scala:111)
	at xsbt.boot.Launch$$anonfun$apply$1.apply(Launch.scala:37)
	at xsbt.boot.Launch$.launch(Launch.scala:119)
	at xsbt.boot.Launch$.apply(Launch.scala:20)
	at xsbt.boot.Boot$.runImpl(Boot.scala:56)
	at xsbt.boot.Boot$.main(Boot.scala:18)  - (Sonatype.scala:408)
restoring stty: 500:5:bf:8a3b:3:1c:7f:15:4:0:1:0:11:13:1a:0:12:f:17:16:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0
The command "sbt ci-release" exited with 1.

@olafurpg
Copy link
Member

olafurpg commented Jul 3, 2020

@Tochemey did you try adding skip in publish := true in the toplevel of build.sbt? Similar to #122 (comment)

I want to note that this is not an sbt-ci-release issue. This plugin doesn't do much except depend on several other plugins and change a few default sbt settings.

@Tochemey
Copy link

Tochemey commented Jul 3, 2020

@olafurpg I got it deployed. For some strange reason I observed that the lagompb 0.3.0+0-4a8849f9+20200702-1919-SNAPSHOT instead of being a release tag was kind of snapshot which was causing issue. I did some few commits later on and then cut a new release tag and it did work. My suspicion goes to dynver.

Thanks by the way for the swift response. Much appreciated.

@JavierMonton
Copy link

I'm having the same issue as comment 122.
On master it works fine but when I'm creating a tag, in the log appears that it is creating an Snapshot and it can't find the folder. This snapshot is being pushed to Nexus by the way.

java.io.IOException: Supplied file /home/runner/work/big-data-types/big-data-types/target/sonatype-staging/0.0.0+95-bea793c3-SNAPSHOT is a not an existing directory!

I have tried with skip in publish := true but it still fails.

Here is the execution

Any idea of how did you solve it?

Thanks!

kory33 added a commit to kory33/s2mc-test that referenced this issue Oct 25, 2021
fredex42 added a commit to guardian/content-api-firehose-client that referenced this issue May 31, 2023
folone added a commit to folone/poi.scala that referenced this issue Dec 25, 2023
folone added a commit to folone/poi.scala that referenced this issue Dec 25, 2023
folone added a commit to folone/poi.scala that referenced this issue Dec 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants