-
Notifications
You must be signed in to change notification settings - Fork 443
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
Workarounds for "input too long" problem do not work as expected #1466
Comments
Thanks a lot @bobismijnnaam for the detailed report. This surely sounds like a bug. Do you have the time to create a minimal example reproducing this? My initial guess would be that there are multiple main classes, but not sure if this explains this. |
Here is our build.sbt: https://github.com/utwente-fmt/vercors/blob/dev/build.sbt I think we have only one main class but of course maybe our settings are wrong. I have vacation this week but I'll try to make a repro when I get back (or maybe one of my team members can have a look, but I expect them to be busy as well). |
FWIW, I think that there are indeed multiple main classes, as we include other git repositories as dependencies, which have their own main method. The build.sbt even mentions multiple mains, and tries to handle them in some way: https://github.com/utwente-fmt/vercors/blob/97c49d6dc1097ded47a5ed53143695ace6904865/build.sbt#L153 |
I made a minimal version of our big project that exhibits the problem: Reproduction steps:
EDIT: Looks like the problem is that we have spaces in the organization in our build.sbt... So the short term fix for us is clear (i.e. remove spaces from our organization), not sure how you want to handle this on your side. |
Expected behaviour
Using
enablePlugins(LauncherJarPlugin)
orenablePlugins(ClasspathJarPlugin)
should result in a package that runs.Actual behaviour
When either of
enablePlugins(LauncherJarPlugin)
orenablePlugins(ClasspathJarPlugin)
is used, when running the generated package, an error is printed: "class vct.main.Main not found". (vct.main.Main is the main class of our package)Information
rpm --version
): I used the file manager's built-in "extract here"What's strange is that if I run the package with a custom java command in the terminal, e.g.:
$ java -cp 'lib/*:res vct.main.Main --help
As expected, it prints the help message. So all classes needed for running our package are in the unzipped package. But somehow the run script/jar files that sbt-native-packager generates have trouble finding the class files.
Currently we are using the workaround of:
scriptClasspath := Seq("*", "../res")
, which does result in a package that runs as expected, but we'd rather use one of the aforementioned plugins for clarity and stability.I am aware of https://sbt-native-packager.readthedocs.io/en/latest/recipes/longclasspath.html, #1327, and #1071, but I think I have tried all three options (of which the third worked, the
Seq("*")
approach). I did not apply any other changed to my build.sbt except adding the "enablePlugins" statements; please let me know if there is more intricate setup required to make these plugins function.The text was updated successfully, but these errors were encountered: