Skip to content

Sbt does not resolve dependencies with classifiers. #285

@anikifoss

Description

@anikifoss

There are multiple problems here. First of all, having "org.lwjgl.lwjgl" % "lwjgl-platform" % lwjglVersion" should be enough to download all the artifacts. But it does not work.

Having failed that, manually putting all the artifact as a dependencies also fails, because only one of those is downloaded and the rest is ignored. The choise appears to be arbitrary.
Surpisingly listing only one artifact works.

Here is the build:

import sbt._
import Keys._


object MyBuild extends Build {

  val lwjglVersion = "2.8.2"

  lazy val broken = Project(
    id = "broken",
    base = file("."),
    settings = Defaults.defaultSettings ++ Seq(
      scalaVersion := "2.9.1",
      target := new File("target/broken"),
      libraryDependencies += "org.lwjgl.lwjgl" % "lwjgl-platform" % lwjglVersion classifier "natives-windows",
      libraryDependencies += "org.lwjgl.lwjgl" % "lwjgl-platform" % lwjglVersion classifier "natives-linux",
      libraryDependencies += "org.lwjgl.lwjgl" % "lwjgl-platform" % lwjglVersion classifier "natives-osx"
    )
  )

  lazy val working = Project(
    id = "working",
    base = file("."),
    settings = Defaults.defaultSettings ++ Seq(
      scalaVersion := "2.9.1",
      target := new File("target/working"),
      libraryDependencies += "org.lwjgl.lwjgl" % "lwjgl-platform" % lwjglVersion classifier "natives-linux"
    )
  )
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions