4

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

7
  • what is the exact version of sbt you are using?
    – user51
    Feb 13, 2018 at 17:34
  • With any 1.x version. Now it’s 1.1.0 Feb 13, 2018 at 22:26
  • looks like the artifcat for com.zeptolab.commons is not standard maven. You need to include the resolvers += which has the dependency you are adding in your project.
    – user51
    Feb 13, 2018 at 22:54
  • I’ve written that sbt 0.13.17 works and custom resolvers with my local repo are properly set up with resolvers += Feb 14, 2018 at 4:56
  • okay looks like there is bug in SBT. I had some similar issue stackoverflow.com/questions/46982706/… which was working in 0.13.16 but not in 1.0.x. So make small project that replicates your issue and file a bug in SBT github.com/sbt/sbt.
    – user51
    Feb 14, 2018 at 18:40

1 Answer 1

2

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.