Search code examples
spring-bootspring-boot-starter-parent

How to overwrite version of spring boot BOM


I have a problem with updating Log4j versions. In my pom.xml file I updated the version like this:

<properties>
        // other stuff //
        <org.apache.logging.log4j.version>2.16.0</org.apache.logging.log4j.version>
    </properties>

But in the dependencies:

<dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-slf4j-impl</artifactId>
            <version>{org.apache.logging.log4j.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-core</artifactId>
            <version>{org.apache.logging.log4j.version}</version>
        </dependency>

The versions throw an error that it's override to 2.11.1 from a BOM file. Where can I update my pom to import a 2.16.0 version BOM file?


Solution

  • So both answers helped me out finding the solution for my problem. The problem was that in my dependency I didn't put a $ sign for my version tag. So with this line of code it works now: <version>${org.apache.logging.log4j.version}</version>