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.

Transitive dependencies with classifier are not downloaded

See original GitHub issue

From issue https://github.com/sbt/sbt/issues/5136

steps

sbt version: 1.3.2

I think I’ve been able to reproduce this outside of Netflix:

libraryDependencies += "io.netty" % "netty" % "3.10.6.Final"

Then show Runtime/fullClasspath won’t show netty-tcnative whereas we depend on it in https://repo1.maven.org/maven2/io/netty/netty/3.10.6.Final/netty-3.10.6.Final.pom

problem

I have a dependency that depends transitively as the following ivy file shows:

<dependency org="com.netflix.bdp" name="presto-s3fs" rev="1.3.2" conf="compile->default">
  <artifact xmlns:m="http://ant.apache.org/ivy/maven" name="presto-s3fs" type="jar" ext="jar" m:classifier="core"/>
</dependency>

When useCoursier := true that transitive dependency is not in the classpath.

workaround

useCoursier := false or explicitly add: ("com.netflix.bdp" % "presto-s3fs" % "1.3.2").classifier("core")

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
joan38commented, Oct 7, 2019

Salut @alexarchambault I’ve been able to reproduce the issue in https://github.com/joan38/sbt-issue-1386

What’s happening is that when a classifier is specified in a ivy dependency and that transitive dependency gets resolved from Maven then it doesn’t use the classifier.

I run show Runtime/fullClasspath and the jar lib2 is not in there. If I swap around the 2 custom resolvers in the resolvers key (put the Maven after Ivy) then it will resolve the transitive dependency from Ivy too and it’s all fine.

Let me know if you need anything

0reactions
alexarchambaultcommented, Dec 19, 2019

@slandelle It seems there’s still an issue when publishing to Ivy repositories from sbt, yes (and then depending on what’s been published). Things needs to be fixed on the sbt side now, see https://github.com/sbt/sbt/issues/5325#issuecomment-567711900.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Gradle ignores transitive dependencies when specifying a ...
When specifying a dependency with classifier, e.g.. compile 'mygroup:mymodule:1.0-SNAPSHOT:glassfish4'. Gradle ignores transitive dependencies - in contrast ...
Read more >
Ivy not pulling transitive dependencies on jars with classifiers
Our build fails because the dependencies aren't downloaded. I assume there's some setting in ivysettings.xml that will let Ivy know that Pom ...
Read more >
Transitive dependencies with classifiers not resolved correctly
As can be seen, the transitive dependency used an invalid classifier. However, I can't use the workaround that I build dev and then...
Read more >
Chapter 51. Dependency Management
Transitive dependency management: Gradle gives you full control of your ... And sometimes you want to download a zip from a repository, that...
Read more >
Dependency management with Grape - Apache Groovy
1. Quick start · 1.1. Add a Dependency · 1.2. Specify Additional Repositories · 1.3. Maven Classifiers · 1.4. Excluding Transitive Dependencies ·...
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