sbt-native-packager を使用してアーティファクトを公開すると、アーティファクト名にバージョンが 2 回表示されます。
プロジェクト/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
ローカルで公開する場合はアーティファクト名で問題ありませんが、リモートで公開するとアーティファクト名に「バージョン」が 2 回含まれます。( name-version-version.zip
) なぜ?一度だけ表示されるようにするにはどうすればよいですか?