Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to specify an alternate location for sbt to look for build config via the command line?

Tags:

scala

sbt

As far as I can tell when you run the sbt executable it looks for your build configuration within the current directory structure (build.sbt or build scala files). Is there a way to specify an alternate location for the sbt executable to look for the build.sbt or build scala files? Also is there a way to similarly specify a working directory?

For example, could I run sbt from any directory but specify a commandline argument to indicate which build.sbt file I want to run and where the working directory should be?

Something like:

sbt -b /some/dir1/with/build.sbt -w /tmp/sbt/working/dir

I want to do this outside of a build.sbt file, just through the commandline.

like image 318
ssanj Avatar asked Nov 08 '22 16:11

ssanj


1 Answers

It is not possible. build.sbt needs to be on the same folder where you run the sbt command

like image 180
pedrorijo91 Avatar answered Nov 15 '22 09:11

pedrorijo91