-
Notifications
You must be signed in to change notification settings - Fork 37
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
Start script generated with startScriptForJarSettings uses class files, not jar file #41
Comments
Explicitly replace class files by generated jar file in classpath for Jar settings
Hi, sorry for ignoring this; I need to invest some time because honestly I don't a) remember why I added both ForClasses and ForJar, or b) know when/why they became broken, and as a result c) don't know what they should actually do (like should it use a jar for every project in the build?). Anyway I haven't had a day to spend on it. If you or someone else has time to dig in a bit more and sort of figure out what's going on, that may be helpful. Or even just let me know why in your particular case you need to use the jar! ;-) Thanks for the PR and sorry I'm AWOL for a bit. |
No problems, I took the time to "fix" it (see my pull request, I don't have any experience in writing sbt plugin, so I'm pretty sure I'm doing something wrong somewhere), so we could go on for now. To explain why I'm trying to use jars here: We have a server application on a cluster of dozens of machines. Our current build process pull the latest code from the git repo, compiles the code, uses the sbt-start-script to generate a script, then restart the servers one by one waiting for each of them to be up before moving to the next. We recently had some weird issue in our code base. After some investigation, I realized that it was occurring while we were compiling the code, but fixed itself after a restart. What we realized was that our servers were still not warm enough and had code that was not loaded yet, tried to find the class file (that was deleted), and failed without knowing how to recover. After some tests, we realized that running a jar (and not classes) was fixing that issue. I found this issue during theses tests. Thanks for the answer! I hope that I've clarified the situation for you. |
Tried to modify a project definition to use a jar instead of classes for staging, found this. Reproducible with versions between 0.6.0 and 0.9.0 using sbt 0.12.4.
project/Project.scala
For testing purposes, I've only written a single Hello World. This is the start script generated after running sbt stage (target/start, using version 0.9.0)
The text was updated successfully, but these errors were encountered: