为什么版本在发布时会在人工制品名称中出现两次?

时间:2014-06-10 06:42:47

标签: sbt-native-packager

使用sbt-native-packager发布人工制品时,该版本在人工制品名称中出现两次。

项目/ plugins.sbt

addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "0.7.1")

build.sbt

import com.typesafe.sbt.SbtNativePackager._
import NativePackagerKeys._

packageArchetype.java_server

name := "name"

version := "version"

publishTo := Some("fake" at "http://oss.sonatype.org/nexus/content/repositories/fake")

deploymentSettings

SBT会话

> universal:normalizedName
[info] name

> universal:version
[info] version

> universal:name
[info] name-version

> universal:publishLocal
[info] Wrote /Users/synesso/projects/z/target/scala-2.10/name_2.10-version.pom
a name-version
a name-version/lib
a name-version/lib/name.name-version.jar
a name-version/lib/org.scala-lang.scala-library-2.10.3.jar
[info]  published name-version to /Users/synesso/.ivy2/local/name/name-version
    /version/zips/name-version.zip
[info]  published name-version to /Users/synesso/.ivy2/local/name/name-version
    /version/tgzs/name-version.tgz
[success] Total time: 1 s, completed 10/06/2014 4:37:16 PM

> universal:publish
[info] Wrote /Users/synesso/projects/z/target/scala-2.10/name_2.10-version.pom
a name-version
a name-version/lib
a name-version/lib/name.name-version.jar
a name-version/lib/org.scala-lang.scala-library-2.10.3.jar
[trace] Stack trace suppressed: run last universal:publish for the full output.
[error] (universal:publish) java.io.IOException: PUT operation to URL 
    http://oss.sonatype.org/nexus/content/repositories/fake/name/
    name-version/version/name-version-version.zip failed with status code 301: 
    Moved Permanently
[error] Total time: 9 s, completed 10/06/2014 4:38:20 PM

在本地发布时,人工制品名称是可以的,但远程发布会给出一个人工制品名称"版本"在它两次。 (name-version-version.zip)为什么?我如何确保它只出现一次?

1 个答案:

答案 0 :(得分:0)

这是插件的错误。 https://github.com/sbt/sbt-native-packager/issues/270已修复,0.8.0-M1