Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SBT PublishM2 do not refresh snapshot jar in local maven repo

Tags:

maven

scala

sbt

I have a simple Sbt project

name := "xxxx"

organization := "xxxxx"

version := "0.0.2-SNAPSHOT"

scalaVersion := "2.11.6"



resolvers += "spray repo" at "http://repo.spray.io"


scalacOptions in ThisBuild ++= Seq("-language:postfixOps", "-feature")



libraryDependencies ++=
  Seq("io.spray" %% "spray-client" % "1.3.3",
      "io.spray" %%  "spray-json" % "1.3.2",
      "com.typesafe.akka" %% "akka-actor" % "2.3.11",
      "org.dspace" % "dspace-api" % "1.8.2",
      "org.scalatest" %% "scalatest" % "2.2.4" % "test")

When i do publishLocal, my snapshot is always updated in Ivy, however when i do publishM2 it does not work. I check the source jar in the .m2 folder and it is never updated. I have to delete manually the folder of my artifact in my local .m2 folder, then do the publication again.

Is there a way to have sbt replace the jar in the .m2 folder using PublishM2 ?

like image 706
MaatDeamon Avatar asked Jun 10 '15 15:06

MaatDeamon


1 Answers

It's a known bug: https://github.com/sbt/sbt/pull/1960

It's been merged in master, presumably 0.13.9 will contain the fix

like image 189
melps Avatar answered Oct 16 '22 20:10

melps