-
Notifications
You must be signed in to change notification settings - Fork 41.4k
Description
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.
Please add this dependency in Spring-boot 2.x