Sbt alternative to "mvn install -DskipTests"

I am trying to install an sbt based project in a local maven repository. I tried the commands:

  • "sbt publish" - repository credentials required
  • "sbt publish-local" install in .ivy repositry, but I need maven!

How can I perform such an operation in terms of SBT?

+4
source share
2 answers

Using SBT 0.13 and without editing the project source files:

  • Create (or edit) the global.sbt file in ~/.sbt/0.13 :

    vim ~/.sbt/0.13/global.sbt

  • Add the following line:

    publishTo := Some(Resolver.file("file", new File(Path.userHome.absolutePath+"/.m2/repository")))

  • Save and close the file

  • Run sbt publish from the project folder
+3
source

Source: https://habr.com/ru/post/1397953/


All Articles