What is the $ {} maven syntax for dependency?

advertisements

For example using logback dependency :

    <dependency>
        <groupId>ch.qos.logback</groupId>
        <artifactId>logback-classic</artifactId>
        <version>${logback.version}</version>
    </dependency>

Does <version>${logback.version}</version> download the latest version of the dependency ?


That's a maven property as defined in the properties section - see https://maven.apache.org/pom.html#Properties for more details.

In this example you can set the logback.version property to e.g. 3.5.1 using the following syntax: -

<properties>
    <logback.version>3.5.1<logback.version>
</properties>