New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot load.ivy where a classifier is required #387

Closed
laurencer opened this Issue May 9, 2016 · 2 comments

Comments

Projects
None yet
2 participants
@laurencer

laurencer commented May 9, 2016

In sbt you can normally specify the classifier - e.g.

libraryDependencies ++= "net.sf.json-lib" % "json-lib" % "2.4" % "jdk15"

This doesn't work with load.ivy and its not clear how to load a JAR which requires a classifier.

@lihaoyi

This comment has been minimized.

Owner

lihaoyi commented May 20, 2017

This is fixed as of 662859f, which allows you to use coursier to add a classifier:

Welcome to the Ammonite Repl version-SNAPSHOT
(Scala 2.12.2 Java 1.8.0_112)
If you like Ammonite, please support our development at www.patreon.com/lihaoyi
@ interp.load.ivy(
    // Directly using coursier API. Can pass in exclusions,
    // attributes, configurations, classifiers, etc.
    coursier.Dependency(
      coursier.Module("net.sf.json-lib", "json-lib"),
      "2.4",
      attributes = coursier.Attributes(classifier = "jdk15")
    ),
    "xom" % "xom" % "1.1"
  )
https://repo1.maven.org/maven2/xom/xom/1.1/xom-1.1.pom
  100.0% [##########] 1.7 KiB (1.6 KiB / s)
https://repo1.maven.org/maven2/net/sf/json-lib/json-lib/2.4/json-lib-2.4.pom
  100.0% [##########] 12.8 KiB (11.2 KiB / s)
https://repo1.maven.org/maven2/xom/xom/1.1/xom-1.1.jar
  100.0% [##########] 421.5 KiB (336.9 KiB / s)
https://repo1.maven.org/maven2/net/sf/json-lib/json-lib/2.4/json-lib-2.4-jdk15.jar
  100.0% [##########] 155.4 KiB (120.5 KiB / s)

@ val serializer = new net.sf.json.xml.XMLSerializer
serializer: net.sf.json.xml.XMLSerializer = net.sf.json.xml.XMLSerializer@6d1c0769
@

@lihaoyi lihaoyi closed this May 20, 2017

@lihaoyi

This comment has been minimized.

Owner

lihaoyi commented May 21, 2017

@Atry Atry referenced this issue Aug 9, 2017

Closed

Maven classifier #128

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment