CodexBloom - Programming Q&A Platform

Maven scenarios to recognize properties from parent POM in a multi-module project after JDK upgrade

👀 Views: 65 đŸ’Ŧ Answers: 1 📅 Created: 2025-06-19
maven jdk17 dependencies multi-module Java

I'm wondering if anyone has experience with I'm currently working with an scenario in my multi-module Maven project after upgrading to JDK 17. Previously, everything was working fine with JDK 11, but now when I run `mvn clean install`, I get the following behavior messages: ``` [behavior] Failed to execute goal on project my-module: Could not resolve dependencies for project com.example:my-module:jar:1.0-SNAPSHOT: The following artifacts could not be resolved: com.example:my-dependency:jar:1.0-SNAPSHOT, com.example:my-parent:pom:1.0-SNAPSHOT: Failure to find com.example:my-dependency:jar:1.0-SNAPSHOT in http://my.repo.maven.org/ was cached in the local repository, resolution will not be reattempted until the update interval of my.repo has elapsed or updates are forced ``` This is puzzling since my `pom.xml` in the parent module has defined `my-dependency` as follows: ```xml <dependency> <groupId>com.example</groupId> <artifactId>my-dependency</artifactId> <version>1.0-SNAPSHOT</version> <scope>compile</scope> </dependency> ``` The parent POM is also correctly declared in the child module: ```xml <parent> <groupId>com.example</groupId> <artifactId>my-parent</artifactId> <version>1.0-SNAPSHOT</version> <relativePath>../my-parent/pom.xml</relativePath> </parent> ``` I've verified that the parent POM is indeed present at the specified relative path and that the dependency is also available in the local repository. I tried running `mvn clean install -U` to force an update, but the scenario continues. Additionally, I ensured that the `settings.xml` file in my `${MAVEN_HOME}/conf` directory has the correct repository URLs and that there are no proxy issues. I also checked that the JDK home is set correctly in my IDE (IntelliJ IDEA) and that it's pointing to the JDK 17 installation. Are there any known compatibility issues with property resolution in Maven when upgrading JDK versions? Any ideas on how I can resolve this dependency scenario? Thanks in advance! This issue appeared after updating to Java LTS. Thanks for taking the time to read this!