Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sbt alternative to "mvn install -DskipTests"

Tags:

maven-2

scala

sbt

I'm trying to instal sbt based project to local maven repository. I have tried commands:

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

How can I do such operation in terms of SBT?

like image 305
yura Avatar asked Feb 23 '12 05:02

yura


2 Answers

The SBT wiki has the goods. Just define the repo (look for "Publishing to the users local maven repository" on the linked page) and invoke "publish".

like image 146
RM. Avatar answered Oct 27 '22 07:10

RM.


Using SBT 0.13 and without editing the project source files:

  • Create (or edit) a 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
like image 25
David Riccitelli Avatar answered Oct 27 '22 06:10

David Riccitelli