Closed RoryStokes closed 3 years ago
Thank you for reporting! It would be great to be able to support this for Windows. I can't remember the details of what was failing but I spent quite a long time trying to get it working on Windows with no progress. I don't have a Windows computer to reproduce the issue, which made it even harder to troubleshoot the issue.
The manifest jar is always created in Windows but it's not used. The logic is here if anyone wants to take a look https://github.com/scalameta/sbt-native-image/blob/7b4d4d1b9e81da76e944904c2d5a563e7e58ec76/plugin/src/main/scala/sbtnativeimage/NativeImagePlugin.scala#L255-L256
The plugin is enabled in the build itself so you can iterate quickly on the changes with the following workflow
$ sbt # start sbt shell
> example/nativeImage # build native image
# make changes to NativeImagePlugin.scala file
> reload # pick up new changes
> example/nativeImage
Describe the bug
Windows native image builds fail when there are a large number of JARs in the classpath. It looks like previously a single manifest.jar was used to avoid this issue, but this was removed for Windows in #9
To Reproduce Steps to reproduce the behavior:
sbt nativeImage
Expected behavior
native-image
is invoked to create the binaryScreenshots Instead, the command fails due to the length of the command:
Installation:
Additional context I've been able to work around this for now by pre-assembling a fat jar with sbt-assembly, and then overriding the classpath with the result:
Search terms
Windows classpath