Skip to content

log4j-over-slf4j not exists in spring-boot-starter-logging/pom.xml #20008

@ShriprasadM

Description

@ShriprasadM

Recently I am upgrading from spring boot 1.5.4 to spring boot 2.2.4.
After upgrading to spring boot 2.2.4, I am getting following compilation error

[INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 4.783 s [INFO] Finished at: 2020-02-02T14:42:44+05:30 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project : Compilation failure: Compilation failure: package org.apache.log4j does not exist

Observing that

https://github.com/spring-projects/spring-boot/blob/v1.5.4.RELEASE/spring-boot-starters/spring-boot-starter-logging/pom.xml - has the following maven dependency
<dependency> <groupId>org.slf4j</groupId> <artifactId>log4j-over-slf4j</artifactId> </dependency>

But, https://github.com/spring-projects/spring-boot/blob/v2.2.4.RELEASE/spring-boot-project/spring-boot-starters/spring-boot-starter-logging/pom.xml not contains it.

In dependency hierarchy for spring-boot 1.5.4, it is shown as follows.

image

Please add this dependency in Spring-boot 2.x

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: invalidAn issue that we don't feel is valid

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions