I am using sbt 1.1.5 and get the following error when I run sbt publish
:
[info] published project_2.11 to http://localhost:8081/repository/maven-releases/project/project_2.11/1.4.1+0-6b38d149+20180906-1611/project_2.11-1.4.1+0-6b38d149+20180906-1611.pom
[error] java.net.SocketException: Broken pipe (Write failed)
Conf in build.sbt
:
resolvers += "Nexus" at "http://localhost:8081/repository/maven-releases/"
publishMavenStyle := true
publishTo := {
val nexus = "http://localhost:8081/repository/maven-releases/"
if (isSnapshot.value)
Some("snapshots" at nexus + "")
else
Some("releases" at nexus + "")
}
credentials += Credentials("Sonatype Nexus Repository Manager", "localhost", "admin", "admin123")
I am also using sbt plugins sbt-assembly
and sbt-dynver
.
The strange thing is that I can see sbt published pom file onto the repo, error happends when publishing the fat jar.
I think the solution here will solve this for you: https://support.sonatype.com/hc/en-us/articles/360000228868-Artifact-uploads-fail-with-broken-pipe-errors