I have a multi-module SBT project that I am trying to publish to a remote Apache Archiva.
[error] (core/*:publish) java.io.IOException: Access to URL http://XX.XX.XX.XX/repository/development/com/example/core_2.10/1.0.0.SNAPSHOT.304fcd73d72ffe4a05271197902c36b9a59b4922/core_2.10-1.0.0.SNAPSHOT.304fcd73d72ffe4a05271197902c36b9a59b4922.pom was refused by the server: Unauthorized
For my snapshots, I'm appending the Git SHA-1 hash for the commit.
Build.scala
publishMavenStyle := true,
publishArtifact in Test := false,
pomIncludeRepository := { _ => true },
publishTo := Some("development" at "http://XX.XX.XX.X/repository/development"),
credentials += Credentials(Path.userHome / ".ivy2" / ".credentials_development"), // archiva credentials by repo
I took care to set the realm correctly per posts I've read. I retrieved it by doing:
curl -X POST http://xx.xx.xx.xx/repository/development -v > /dev/null
.credentials_development
realm=Repository Archiva Managed development Repository
host=XX.XX.XX.XX
user=myuser
password=mypassword
In SBT, I run:
compile
assembly
make-pom
package
publish
I can upload artifacts using the user via the web administration.
How should I be doing it so the publishing works? Do I perhaps need to setup credentials via ivysettings.xml
?