Reputation: 184
So I'm trying to use sbt-release, and I'm having issues where it's publishing the artifact to my snapshot repository, and not the release repository.
val Organization = "com.mycompany"
val Name = "My Service"
val Version = "0.1-SNAPSHOT"
...
settings = Defaults.coreDefaultSettings ++ Seq(
name := Name,
organization := Organization,
version := Version,
scalaVersion := ScalaVersion
...
assemblyJarName in assembly := s"my-service-${Version}.jar",
...
)
publishTo := {
val nexus = "my.nexus.url.com/repositories/"
if (isSnapshot.value)
Some("snapshots" at nexus + "snapshots/")
else
Some("releases" at nexus + "releases/")
},
credentials += Credentials(Path.userHome / ".ivy2" / ".credentials")
If I remove the -SNAPSHOT
from the version, then it publishes it to the correct repository, but shouldn't sbt-release be telling it to do that by itself?
Also if I get rid of the if (isSnapshot.value)
then sbt publish
will also publish to the wrong repository.
If I could get some help on this, I would really appreciate it.
Upvotes: 0
Views: 553
Reputation: 184
It was the version I had here. It was over riding the version.sbt which is where 0.1-SNAPSHOT
should be stored.
Upvotes: 1