In sbt, I want to add a config
directory to the runtime class-path (but not export it as part of package
). So I have this:
unmanagedClasspath in Runtime += baseDirectory.value / "config"
This works fine for sbt run
, but apparently is not on the class-path if I use sbt console
.
How can I add this directory to the class-path for the console
task without it showing up in the exported jar?
Edit: I also tried the following, but I still cannot get the resources:
unmanagedClasspath in (Compile, console) += baseDirectory.value / "config"
Actually adding the following does work:
unmanagedClasspath in Compile += baseDirectory.value / "config"
I had found the contents in "config"
only because the package was created previously and using sbt clean package
shows that now the contents of "config"
will not be packaged any longer but do appear on the console class-path.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With