You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Question:
Why SBT 1.2.1 doesn't simply use the config file as is? Why does it need to copy (unlike SBT 0.13.x)?
I'm asking because in the multimodule project, path to the directory containing the config directory is calculated like this:
val url = Thread.currentThread.getContextClassLoader.getResource("xitrum.conf")
val fileName = url.getFile
val rootDir = fileName.replace("/config/xitrum.conf", "")
The code works with SBT 0.13.x, but not with SBT 1.2.1.
Note: System.getProperty("user.dir") can be used, but it's not flexible for multimodule SBT project.
Question: If modifying SBT to use the config directory as-is is not an option, in a multimodule SBT project, what should I do to get path to directory containing the config directory dynamically (that is, do not hardcode System.getProperty("user.dir") + "/app")?
Also, it seems that SBT doesn't clean up the temporary directory it created when it exits (#502).
The text was updated successfully, but these errors were encountered:
I'm using SBT 1.2.1 on Mac for a multimodule project.
My project directory looks like this:
In my build.sbt, I'm adding app/config directory to classpath of module app like this:
When I run the project with
sbt run
, I see that the config directory is copied to system temporary directory like this:Question:
Why SBT 1.2.1 doesn't simply use the config file as is? Why does it need to copy (unlike SBT 0.13.x)?
I'm asking because in the multimodule project, path to the directory containing the config directory is calculated like this:
The code works with SBT 0.13.x, but not with SBT 1.2.1.
Note:
System.getProperty("user.dir")
can be used, but it's not flexible for multimodule SBT project.Question: If modifying SBT to use the config directory as-is is not an option, in a multimodule SBT project, what should I do to get path to directory containing the config directory dynamically (that is, do not hardcode
System.getProperty("user.dir") + "/app"
)?Also, it seems that SBT doesn't clean up the temporary directory it created when it exits (#502).
The text was updated successfully, but these errors were encountered: