scalasbtsbt1.0

SBT 1.x fails to resolve parent pom


My SBT 1.1.0 setup fails to resolve parent dependency as a POM file.

We have several libraries published in a local Sonatype repository. All of them depend on 1 maven project with <packaging>pom</packaging> property set. So there is no JAR file in the repo, only declarative POM file for this parent project and this POM is available and accessible.

SBT 0.13.17 resolves this chain successfully and downloads libraries plus this parent POM.

But SBT 1.x fails with error:

unresolved dependency: ... unable to get resource for commons-dependencies-parent-2.165.jar

It's trying to download JAR instead of POM file.

I was trying to specify this parent dependency explicitly with

"com.zeptolab.commons" % "commons-dependencies-parent" % "2.165"

But the bug persists.

Any ideas or workarounds? Have already switched all projects to SBT 1.1.0 except this one due to this problem.

UPD. Custom resolver is properly set up and working with sbt 0.13.17

UPD2 Made an issue https://github.com/sbt/sbt/issues/3953


Solution

  • Found a workaround for this issue. Looks like there is a bug in new http client. So setting updateOptions := updateOptions.value.withGigahorse(false) helps.