maven multimodule project with Java11 fails to install the last module

18 views Asked by At

I am using Maven 3.8.4 to build a multimodule projet using Java11 as describe in this tutorial https://www.baeldung.com/maven-multi-module-project-java-jpms and got a problem in getting a POM from a previously installed artifact.

Below is the log of mvn clean install

[INFO] Building jar: C:\MXW\Modules\multimodulemavenproject\userdaomodule\target\userdaomodule-1.0.jar
[INFO]
[INFO] --- maven-install-plugin:3.1.1:install (default-install) @ userdaomodule ---
[INFO] Installing C:\MXW\Modules\multimodulemavenproject\userdaomodule\pom.xml to D:\.m2\repository\com\baeldung\multimodulemavenproject\userdaomodule\1.0\userdaomodule-1.0.pom
[INFO] Installing C:\MXW\Modules\multimodulemavenproject\userdaomodule\target\userdaomodule-1.0.jar to D:\.m2\repository\com\baeldung\multimodulemavenproject\userdaomodule\1.0\userdaomodule-1.0.jar
[INFO]
[INFO] ---------< com.baeldung.multimodulemavenproject:mainappmodule >---------
[INFO] Building mainappmodule 1.0                                         [5/5]
[INFO] --------------------------------[ jar ]---------------------------------
[WARNING] The POM for com.baeldung.entitymodule:entitymodule:jar:1.0 is missing, no dependency information available
[WARNING] The POM for com.baeldung.daomodule:daomodule:jar:1.0 is missing, no dependency information available
[WARNING] The POM for com.baeldung.userdaomodule:userdaomodule:jar:1.0 is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for multimodulemavenproject 1.0:
[INFO]
[INFO] multimodulemavenproject ............................ SUCCESS [  0.294 s]
[INFO] entitymodule ....................................... SUCCESS [  2.052 s]
[INFO] daomodule .......................................... SUCCESS [  0.227 s]
[INFO] userdaomodule ...................................... SUCCESS [  0.314 s]
[INFO] mainappmodule ...................................... FAILURE [  0.017 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  3.078 s
[INFO] Finished at: 2023-12-21T17:08:31+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project mainappmodule: Could not resolve dependencies for project com.baeldung.multimodulemavenproject:mainappmodule:jar:1.0: The following artifacts could not be resolved: com.baeldung.entitymodule:entitymodule:jar:1.0, com.baeldung.daomodule:daomodule:jar:1.0, com.baeldung.userdaomodule:userdaomodule:jar:1.0: com.baeldung.entitymodule:entitymodule:jar:1.0 was not found in https://nexus.metrixware.com/repository/release/ during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of release has elapsed or updates are forced -> [Help 1]

The log is showing clearly the installation of the userdaomodule.pom into the local repository but maven fails to find it out because it is not in the D:.m2\repository\com\baeldung\multimodulemavenproject\userdaomodule\1.0 directory.

What could be wrong? How to solve this issue?

Thanks

I am expecting tha dependencies modules be found in the local repository

0

There are 0 answers