Cannot load.ivy where a classifier is required #387
Closed
Labels
Comments
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 How is this supposed to work with the new version: I see there's now a |
I found something that works.
would be nice if the syntax would more closely match what's used in SBT for simple copy-paste testing, like:
to translate to:
or, even if it needs to be duplicated, something like:
would be nice, if possible. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In sbt you can normally specify the classifier - e.g.
This doesn't work with
load.ivy
and its not clear how to load a JAR which requires a classifier.The text was updated successfully, but these errors were encountered: