log4j2-slf4j-impl duplicate dependencies

log4j2-slf4j-impl duplicate dependencies

I have a Maven project where I would like to use log4j2 with slf4j. So I add this dependency:

I have a Maven project where I would like to use log4j2 with slf4j. So I add this dependency:

<dependency>
  <groupId>org.apache.logging.log4j</groupId>
  <artifactId>log4j-slf4j-impl</artifactId>
  <version>2.11.2</version>
</dependency>

It seems to work as far as I can tell. But my question is in regard to log4j-slf4j-impl's transitive dependencies.

Why does IntelliJ show that log4j-core brings in log4j-api, but then omits it due to being a duplicate (which I believe the below screenshot is saying)? And how can I prevent that?

java maven

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

Java Core (2020) | Java for beginners | Brush up your Java Skills | Get Hired

In this video we will learn about all the major concepts that come under Java Core . The course is very carefully designed and is made with keeping simplicit...

Accessing Maven Properties in Java

Learn how to access Maven properties in Java. In this short tutorial, we'll take a look at how to use variables defined inside Maven's _pom.xml_ from a Java application.

Run a Java Main Method in Maven

Learn how to run Java main method using Maven. In this short tutorial, we're going to see how to run arbitrary main methods from any Java class using Maven.

Java Fundamentals: Learn Java for absolute beginners |Simpliv

Java Fundamentals: Learn Java for absolute beginners

Java Essentials : Learn Core Java From Basic to Advance

Learn Java Programming Using Practical Assignments. Start Building Back-end Web Applications Robust Test Automation Frameworks By End Of The Course. Learn More!