I am in the process of upgrading a large application to JDK17. Today, the project compile fine with a JDK11 and maven.
With JDK17, I have a really strange issue with versions of transitive dependencies.
This project is composed of multiple sub modules. If I compile a module directly, it works fine.
However, If I compile the root module, or any module containing submodules, the resolution of transitive dependencies doesn't work. I have error like the following :
[INFO] -------------------------------[ bundle ]-------------------------------
Downloading from internal-repository: http://srv:8080/nexus/content/groups/public/org/apache/camel/camel-netty4/$%7Bproject.version%7D/camel-netty4-$%7Bproject.version%7D.pom
[WARNING] The POM for org.apache.camel:camel-netty4:jar:${project.version} is missing, no dependency information available
Downloading from internal-repository: http://srv:8080/nexus/content/groups/public/org/apache/camel/camel-netty4/$%7Bproject.version%7D/camel-netty4-$%7Bproject.version%7D.jar
The version of the dependency is ${project.version}
instead of the real version. The project doesn't use camel-netty4
directly but camel-syslog
:
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-syslog</artifactId>
<version>${camel.version}</version>
</dependency>
this just an example, others projects fails with other transitive dependencies. And it works if I compile the sub-module directly.
Maven 3.6.3