KyBe
KyBe

Reputation: 842

Sbt publish on artifactory

I'm trying to publish some scala project on artifactory using sbt by following this tutorial https://www.jfrog.com/confluence/display/RTF/SBT+Repositories but i fail.

My build.sbt

resolvers += "Artifactory" at "http://artifacts.xxxxx.net:yyyy/artifactory/sbt/"

credentials += Credentials("Artifactory Realm", "http://artifacts.xxxx.net:yyyy","user","password")

publishTo := Some("Artifactory Realm" at "http://artifacts.xxxxx.net:yyyy/artifactory/sbt/")

The ~/.sbt/repositories

[repositories]
local
my-ivy-proxy-releases: http://artifacts.xxxx.net:yyyy/artifactory/sbt/, 
[organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)
[revision]/[type]s/[artifact](-[classifier]).[ext]
my-maven-proxy-releases: http://artifacts.xxxx.net:yyyy/artifactory/sbt/

I'm falling on the following error :

java.io.IOException: Access to URL http://artifacts.xxxx.net/artifactory/sbt/project/project/1.0/project-1.0.jar was refused by the server: Unauthorized
    at org.apache.ivy.util.url.AbstractURLHandler.validatePutStatusCode(AbstractURLHandler.java:79)

Upvotes: 1

Views: 2697

Answers (1)

KyBe
KyBe

Reputation: 842

The problem was in the publishTo line, we just need to remove port and http :

publishTo := Some("Artifactory Realm" at "http://artifacts.xxxxx.net:yyyy/artifactory/sbt/")

By

publishTo := Some("Artifactory Realm" at "artifacts.xxxxx.net/artifactory/sbt/")

Upvotes: 1

Related Questions