Coursier: Transitive dependency resolution failure

Created on 12 Jan 2017  路  6Comments  路  Source: coursier/coursier

I get an error when trying to pull in scalameter here's a minimal example.

Run test to see the error, it's trying to pull down https://repo1.maven.org/maven2/org/mongodb/casbah_2.11/3.1.1/casbah_2.11-3.1.1.jar which doesn't exist.

[trace] Stack trace suppressed: run last *:update for the full output.
[error] (*:update) coursier.ResolutionException: 1 not found
[error]   https://repo1.maven.org/maven2/org/mongodb/casbah_2.11/3.1.1/casbah_2.11-3.1.1.jar
[error] Total time: 1 s, completed Jan 12, 2017 10:46:53 AM
sbt=0.13.13
coursier=1.0.0-M15-1

here's a build.sbt to reproduce it.

lazy val commonSettings = Seq(
  organization := "com.example",
  version := "0.1.0",
  scalaVersion := "2.11.8",
  libraryDependencies ++= Seq(
    "com.storm-enroute" %% "scalameter" % "0.8.2" % "test" 
  )
)

lazy val root = (project in file("."))
  .settings(commonSettings: _*)
bug

Most helpful comment

@pedrofurla That looks like https://github.com/coursier/coursier/issues/499 (bad interaction between features, involving the one fixing the issue here). Wiping the directory in cache that would contain the JAR that is attempted to be downloaded should fix that (if it tries to download https://foo.com/bar/a.jar, wipe ~/.coursier/cache/v1/https/foo.com/bar). The current master of coursier doesn't require this anymore, 1.0.0-RC2 will include the fix.

All 6 comments

I am running into the same thing with Monix 2.2.x (they stopped publishing empty JARs in monix/monix#298).

The interesting thing is that the resolution works via the CLI (coursier fetch io.monix::monix:2.2.1)

@NeQuissimus unfortunately I noticed it today too and I filed a duplicate in issue #429 - technically such dependencies specifying only POM files with no JARs are legal with Maven's specification, as specifying <packaging>pom</packaging> means that the POM itself represents the primary artifact and not a JAR file.

Sorry for the inconvenience, but the monix meta project just specifies a list of dependencies and it made no sense to publish an empty JAR.

This is fixed in the current master, and will be included in 1.0.0-M15-2 (about to be released). Don't hesitate to re-open if you still face this issue.

I guess there was some regression: I can reproduce this bug with version 1.0.0-RC1. https://gist.github.com/pedrofurla/bf956d719e8acf0b089dc747d1852e1d

@pedrofurla That looks like https://github.com/coursier/coursier/issues/499 (bad interaction between features, involving the one fixing the issue here). Wiping the directory in cache that would contain the JAR that is attempted to be downloaded should fix that (if it tries to download https://foo.com/bar/a.jar, wipe ~/.coursier/cache/v1/https/foo.com/bar). The current master of coursier doesn't require this anymore, 1.0.0-RC2 will include the fix.

Worked, thanks!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mosesn picture mosesn  路  6Comments

tabdulradi picture tabdulradi  路  6Comments

ckipp01 picture ckipp01  路  7Comments

dwijnand picture dwijnand  路  7Comments

vil1 picture vil1  路  8Comments