简体   繁体   中英

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

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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM