0

所以我正在尝试使用sbt-release,我遇到了将工件发布到我的快照存储库而不是发布存储库的问题。

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")

如果我-SNAPSHOT从版本中删除它,那么它会将其发布到正确的存储库,但 sbt-release 不应该告诉它自己这样做吗?

此外,如果我摆脱了if (isSnapshot.value)thensbt publish也会发布到错误的存储库。

如果我能在这方面得到一些帮助,我将不胜感激。

4

1 回答 1

0

这是我在这里的版本。0.1-SNAPSHOT它已经结束了应该存储的 version.sbt 。

于 2016-03-14T20:19:50.417 回答