Maven package error: [WARNING] The POM for xxx is missing, no dependency inform

When maven install or package, execute warning and error:

[WARNING] The POM for com.xx-base:jar:1.0 is missing, no dependency information available

[ERROR] Failed to execute goal on project xx-mobi: Could not resolve dependencies for project com.xx-mobi:jar:1.0: Failed to collect dependencies at xx-base:jar:1.0: Failed to read artifact descriptor for xx- base:jar:1.0: Could not find artifact xx-root:pom:1.0 in geotoolrepo…

 

This is because the sub-modules of the maven project did not execute the public modules first when performing installation and packaging related operations. That is, the project has a public module xx-base; the current module that needs to be executed is xx-mobi, then you should install xx-base first, and then perform xx-mobi related operations.

Scenes

As shown in the following figure, a multi-module project created using Maven, a wa-servicemodule, a wa-appmodule, the wa-appmodule depends on the wa-servicemodule, and they are all WebAppDemosub-modules.

Error reporting and analysis

  • Perform packaging for the wa-app module and report [WARNING] The POM for com.mxc:wa-service:jar:1.0-SNAPSHOT is missing, no dependency information available , and the packaging fails.
  • According to the above error message, the preliminary analysis is that the jar package of the dependent wa-service module is not found in the warehouse . So I thought of installing the wa-service module first , and then packaging the wa-app module, but the result is still [WARNING] The POM for com.mxc:wa-service:jar:1.0-SNAPSHOT is missing, no dependency information available , the reason is unknown.

solve

Solution: first execute the install package installation on the parent module WebAppDemo , and then package the wa-app module.
Note: Pack and install the parent module, and all the sub-modules under it will be packaged and installed at the same time. For the above project, after the parent module is packaged and installed, the files of the three modules after packaged and installed can be found in the local warehouse.

Read More:

Leave a Reply

Your email address will not be published. Required fields are marked *