I want renovate to keep my Java versions in my pom.xml updated.
I had a look on the information in the renovate docs and it seems like it should work out of the box:
https://docs.renovatebot.com/java/#lts-releases
https://docs.renovatebot.com/presets-workarounds/#workaroundsjavaltsversions
My renovate config looks like this:
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"packageRules": [
{
"matchPackageNames": [
"maven-wrapper"
],
"enabled": false
}
],
"configMigration": true,
"extends": [
"config:recommended",
"group:allNonMajor",
":approveMajorUpdates"
]
}
And my pom looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>demo</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.2.3</version>
<relativePath/>
</parent>
<groupId>demo</groupId>
<artifactId>demo-service</artifactId>
<version>0.70.2-SNAPSHOT</version>
<name>demo-service</name>
<description>Demo project</description>
<properties>
<java.version>17</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-mongodb</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>com.google.cloud.tools</groupId>
<artifactId>jib-maven-plugin</artifactId>
<version>${jib-maven-plugin.version}</version>
<configuration>
<from>
<image>eclipse-temurin:${java.version}-alpine</image> <----
</from>
....
</plugin>
</plugins>
</build>
</project>
I'm overwriting the Java version that the Spring Boot Starter Parent uses with <java.version>17</java.version>, I also use this to determine the version of the eclipse Temurin base image in JIB.
Renovate won't pick up this dependency/version. What am I doing wrong? There also are no related logs in the debug output.
Update: Thanks to @Gaël J I created a feature request in the renovate project.
As of 2024-02, this is not yet supported but you can submit a feature request or even a pull request in Renovate's GitHub
The
javadatasource available in Renovate is only supported by theasdfmanager.The
mavenmanager does not use thejavadatasource to detect and suggest updates ofjava.versionMaven property.