question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Hi there!

I’m trying to set up a notebook with Stanford’s CoreNLP, which contains a dependency with classifier:

<dependency>
    <groupId>edu.stanford.nlp</groupId>
    <artifactId>stanford-corenlp</artifactId>
    <version>3.7.0</version>
    <classifier>models-english</classifier>
</dependency>

I’ve tried to add it on using the following statement:

interp.load.ivy("edu.stanford.nlp" % "stanford-corenlp" % "3.7.0" classifier "models-english")

but got an error:

cmd5.sc:1: value classifier is not a member of (String, String, String)
val res5 = interp.load.ivy("edu.stanford.nlp" % "stanford-corenlp" % "3.7.0" classifier "models-english")

Is there any other way to import a dependency with a classifier?

Cheers, Eugene

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
lambdaofgodcommented, Dec 24, 2017

Hey guys, I was just able to configure my notebook so that it works, maybe someone will find this useful: https://github.com/lambdaofgod/examples-counterexamples/blob/master/notebooks/CoreNLP.ipynb

3reactions
Atrycommented, Aug 9, 2017

I tried the new fix at https://github.com/lihaoyi/Ammonite/issues/387

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"
)

It does not work for ammonium 0.8.3-2

cmd7.sc:4: type mismatch;
 found   : coursier.Dependency
    (which expands to)  coursier.core.Dependency
 required: (String, String, String)
  coursier.Dependency(
                     ^cmd7.sc:9: type mismatch;
 found   : (String, String, String)
 required: Boolean
  "xom" % "xom" % "1.1"
                ^
Read more comments on GitHub >

github_iconTop Results From Across the Web

A Guide to Maven Artifact Classifiers - Baeldung
A Maven artifact classifier is an optional and arbitrary string that gets appended to the generated artifact's name just after its version ...
Read more >
POM Reference - Maven
classifier : The classifier distinguishes artifacts that were built from the same POM but differ in content. It is some optional and arbitrary...
Read more >
What is the purpose of Mavens dependency declarations ...
The classifier distinguishes artifacts that were built from the same POM but differ in content. It is some optional and arbitrary string ...
Read more >
Simplifying our Git repositories using Maven Classifiers
The general principle is that you collapse the three repositories into one but generate the three artifacts and publish them to Maven (or...
Read more >
5.5. Tips and Tricks - TheNEXUS | A Community Project
You can set a classifier with the Maven Assembly plugin or with the Maven Jar plugin. The following pom.xml produces a qualified artifact...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found