-
Notifications
You must be signed in to change notification settings - Fork 444
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
Custom mainclass #319
Custom mainclass #319
Conversation
Hi @jkutner, Thank you for your contribution! We really value the time you've taken to put this together. Before we proceed with reviewing this pull request, please sign the Typesafe Contributors License Agreement: |
This would fix #80 I believe |
LGTM. This should be easily testable? Can you provide a test within in the It would be even more awesome if you could add a little documentation for it. |
sure. i'll do both and update the PR |
I have tried to create test for this, and I'm having trouble. I think I don't understand the testing framework. Can you look at my test project under |
Now you could run your test with |
I tried to follow the example of the existing tests, but I'm stuck testing for my
Am I doing something obviously wrong? |
Some suggestions about debugging. Are you sure where do you extract zip? Try to add |
Ah, nice trick with the TaskKey[Unit]("print-dir") <<= (baseDirectory, streams) map { (t, streams) =>
streams.log.warn("----------------------------")
(t).listFiles foreach (f => streams.log.warn(f.getAbsolutePath))
} The errorAnyway, I found the error. The problem is that there are multiple The fixSetting a specific main class helps. mainClass in Compile := Some("Main") Note that is must be scoped to |
Thanks @kardapoltsev and @muuki88 -- i am wiser now :) The test is passing. I will update the docs soon. |
Brilliant! Thanks @jkutner |
Merged into |
The PR allows for a custom main class as an arg to the bash script. The primary motivation for this is adding the ability to run something like the following to get a repl for an app:
The above requires adding the following to your
build.sbt
of course:If this PR is acceptable I will take the time to add this to the bat-template as well.