Greg
Greg

Reputation: 11542

How can I get sbt to resolve my bintray dependencies (sbt 1.3.5)?

I've been publishing to bintray for a long time. My releases all go to this directory:

https://dl.bintray.com/blocke/releases/co/blocke/scalajack_2.13/6.2.0/scalajack_2.13-6.2.0.pom

By default sbt 1.3.5 doesn't seem to have bintray as one of its resolvers (it looks at repo1.maven.org and local, but that seems to be it). So I added this to my build.sbt:

resolvers += Resolver.bintrayIvyRepo("blocke", "releases")

It does check bintray but didn't find the library. It looked here:

not found: https://dl.bintray.com/blocke/releases/co.blocke/scalajack_2.13/6.2.0/ivys/ivy.xml

I see it's looking for ivy.xml at "co.block", not a pom file at "co/blocke". Hmm. Next I tried this in build.sbt:

resolvers += Resolver
  .bintrayIvyRepo("blocke", "releases")
  .withPatterns(Resolver.mavenStylePatterns)

This didn't resolve either. It didn't even try going to bintray for some reason with the maven patterns specified.

Finally tried this:

resolvers += Resolver.url("my-test-repo", new java.net.URL("https://dl.bintray/blocke/releases"))(Resolver.mavenStylePatterns)

Likewise sbt didn't even try to hit this url...just maven and local. It looks like if one of the resolvers fails (maven in this case) it doesn't try to look further. I get a big exception on the console.

How can I resolve this?

Upvotes: 0

Views: 306

Answers (1)

Greg
Greg

Reputation: 11542

Discovered there are 2 bintray resolvers: Resolver.bintrayRepo and Resolver.bintrayIvyRepo.

Using the first one works fine with the maven style:

resolvers += Resolver.bintrayRepo("blocke", "releases")

Upvotes: 1

Related Questions