Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SBT with read-only base directory

I am experimenting with SBT Revolver within a Docker container. I am mounting the base directory as a Docker volume. It works great, except for one problem: Docker does not map users, so I'm ending up with project/project/ and project/target/ directories that are not owned by the host user.

I was able to relocate the target/ directory by adding this to the build.sbt in the base directory:

target := file("/data/target")

But I don't have a clue as to how to customize the location of the files created within the project/ directory.

Is it possible in any way to have an SBT build where all the build outputs are created outside the base directory?

like image 670
Ed I Avatar asked Mar 12 '26 23:03

Ed I


1 Answers

Is it possible in any way to have an SBT build where all the build outputs are created outside the base directory?

I don't think we have a setting like that. You could add something like project/build.sbt:

target := file("/data/meta-target")

but it might actually force project/project/target and so on.

like image 52
Eugene Yokota Avatar answered Mar 14 '26 13:03

Eugene Yokota



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!