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

Missing method (java.nio.file.Path.of) when using SonatypeCentralService on Java 8 #507

Closed
gabb1er opened this issue Aug 13, 2024 · 2 comments · Fixed by #508
Closed

Missing method (java.nio.file.Path.of) when using SonatypeCentralService on Java 8 #507

gabb1er opened this issue Aug 13, 2024 · 2 comments · Fixed by #508

Comments

@gabb1er
Copy link

gabb1er commented Aug 13, 2024

Hello!

I'm using plugin to make a bundle upload with new Sonatype Central API.

The project is build with Java 8 and then sonatypeCentralUpload command throws following exception:

2024-08-12 14:40:01.733Z error [Sonatype] [GENERIC_ERROR] java.nio.file.Path.of(Ljava/lang/String;[Ljava/lang/String;)Ljava/nio/file/Path;  - (Sonatype.scala:494)

I suppose that origin of this error is here:

bundleZipDirectory <- Try(Files.createDirectory(Path.of(s"${localBundlePath.getPath}-bundle"))).toEither.leftMap {

In build.sbt the target JVM is set to 8, but method of in java.nio.file.Path interface is only available since Java 11.

@eed3si9n
Copy link
Contributor

Here's my PR for this - #508

@xerial
Copy link
Owner

xerial commented Aug 19, 2024

Thanks. Released https://github.com/xerial/sbt-sonatype/releases/tag/v3.11.3 with this fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants