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.

logback-core dependency should have `provided` scope

See original GitHub issue

Given that logback-core is indeed provided at runtime and README clearly states that as a (rather obvious) requirement, it would be cleaner to classify the former as provided-scope dependency.

This would also allow various custom/in-house libraries that extend logstash-logback-encoder to avoid introducing logback-core as transitive compile-scope dependency into their customers’ class path (currently one has to specifically exclude logback-core to achieve that).

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
yborovikovcommented, May 1, 2018

Hi @philsttr, thank you for your detailed explanation!

Striking a balance between convenience and correctness/flexibility is often a tricky challenge, indeed. In this particular case, however, it might be quite simple.

The reason is that for the majority of logstash-logback-encoder consumers (using it for logging) the consumers would still have to explicitly declare either logback-classic or logback-access (or both) as their runtime scoped dependencies - simply relying on the transitive logback-core dependency of logstash-logback-encoder would not be enough in most cases I can think of (is there a popular way to use pure logback-core directly?).

Given that (and the possibility of logback-core version mismatch between customer customer-declared logback-classic and the one potentially coming from logstash-logback-encoder), I would argue that categorizing logback-classic as provided scope (in this library) would not harm the convenience, at all, in the typical basic use case.

0reactions
yborovikovcommented, Aug 4, 2018

Thank you!

Read more comments on GitHub >

github_iconTop Results From Across the Web

logback-core dependency should have provided scope #288
Given that logback-core is indeed provided at runtime and README clearly states that as a (rather obvious) requirement, it would be cleaner ...
Read more >
Maven Test Scope - java - Stack Overflow
Exclude logback-core when including myproject1 : ... Run mvn dependency:tree to see origin of your dependencies and their scope.
Read more >
Maven dependency declaration - Logback - QOS.ch
To use logback-classic in your Maven project, declare the following dependency in your project's pom file. TRANSITIVITY Note that in addition to logback- ......
Read more >
A Guide To Logback - Baeldung
Logback is one of the most widely used logging frameworks in the Java Community. It's a replacement for its predecessor, Log4j.
Read more >
Maven Scopes and Gradle Configurations Explained
We can use the provided scope to declare a dependency that will not ... API (like slf4j-log4j12 or logback-classic ) to the runtime...
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