Search code examples
javaspring-bootlogback

Spring boot: Upgrading logback 1.2.12 to 1.3


I use spring boot 2.7.12 and our company, for security reason, is asking to use at least the v1.3 of logback. I see that spring-boot-starter-logging (v2.7.12) is using version 1.2.12 of logback-classic.

I would like to force the version to 1.3 but when I try to add this in parent pom:

<dependencyManagement>
  <dependencies>
  ...
    <dependency>
      <groupId>ch.qos.logback</groupId>
      <artifactId>logback-classic</artifactId>
      <version>1.3</version>
    </dependency>
    ...
  </dependencies>
</dependencyManagement>

I have this error in child pom:

Missing artifact ch.qos.logback:logback-classic:jar:1.3

I do not understand how to solve it.

Can you help me please?


Solution

  • A version change from 1.3 to 1.3.0 is required.

    <!-- https://mvnrepository.com/artifact/ch.qos.logback/logback-classic -->
    <dependency>
        <groupId>ch.qos.logback</groupId>
        <artifactId>logback-classic</artifactId>
        <version>1.3.0</version>
        <scope>test</scope>
    </dependency>
    

    Link: https://mvnrepository.com/artifact/ch.qos.logback/logback-classic/1.3.0