Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/unity3d/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
SBT程序集将fat jar发布到Nexus_Sbt_Nexus_Sbt Assembly - Fatal编程技术网

SBT程序集将fat jar发布到Nexus

SBT程序集将fat jar发布到Nexus,sbt,nexus,sbt-assembly,Sbt,Nexus,Sbt Assembly,我正试图将sbt publish生成的胖jar推送到一个私有的Nexus存储库中。因此,在我的Nexus中,我创建了两个存储库,一个托管快照版本,一个托管发布工件 以下是我的build.sbt中的重要代码: publishTo := { val nexus = "http://localhost:8081/" if (isSnapshot.value) Some("snapshots" at nexus + "repository/test-snapshots") else

我正试图将
sbt publish
生成的胖jar推送到一个私有的Nexus存储库中。因此,在我的Nexus中,我创建了两个存储库,一个托管快照版本,一个托管发布工件

以下是我的
build.sbt
中的重要代码:

publishTo := {
  val nexus = "http://localhost:8081/"
  if (isSnapshot.value)
    Some("snapshots" at nexus + "repository/test-snapshots")
  else
    Some("releases"  at nexus + "repository/test-releases")
}

credentials += Credentials(
  "Sonatype Nexus Repository Manager", "localhost", "admin", "admin123"
)

artifact in (Compile, assembly) := {
  val art = (artifact in (Compile, assembly)).value
  art.withClassifier(Some("assembly"))
}

addArtifact(artifact in (Compile, assembly), assembly)
这是stacktrace的一部分:

[info] Assembly up to date: /.../target/scala-2.11/test-assembly-1.0-SNAPSHOT.jar
[info]  published test_2.11 to http://localhost:8081/repository/test-snapshots/com/test/test_2.11/1.0-SNAPSHOT/test_2.11-1.0-SNAPSHOT-javadoc.jar
[info]  published test_2.11 to http://localhost:8081/repository/test-snapshots/com/test/test_2.11/1.0-SNAPSHOT/test_2.11-1.0-SNAPSHOT-sources.jar
[info]  published test_2.11 to http://localhost:8081/repository/test-snapshots/com/test/test_2.11/1.0-SNAPSHOT/test_2.11-1.0-SNAPSHOT.jar
[info]  published test_2.11 to http://localhost:8081/repository/test-snapshots/com/test/test_2.11/1.0-SNAPSHOT/test_2.11-1.0-SNAPSHOT.pom
[error] java.net.SocketException: Broken pipe (Write failed)
因此,正如我们所看到的,它能够发布工件直到pom文件


提前感谢您的帮助

我可以使用您粘贴的代码发布。您可能正在处理网络/连接问题。