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-service
module, a wa-app
module, the wa-app
module depends on the wa-service
module, and they are all WebAppDemo
sub-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:
- An error was reported when Maven package was running the packaged jar package: there is no main list attribute in xxx.jar, which can be solved by configuring Maven plugin
- [Solved] Read file XXX /pom.xml Error when Maven is configured in idea
- Prompt unknown error in pom.xml of Maven project
- [Solved] Maven Error: parent.relativePath points at wrong local POM
- Error:scalac: missing or invalid dependency detected while loading class file ***
- Springboot package error: failed to execute goal org.apache.maven.plugins:maven-resources-plugin: 3.2.0…
- maven Error: Element ‘dependency’ cannot have character [children], because the type’s content type is
- Mvn dependency:copy-dependencies -DoutputDirectory=lib package Error
- [Solved] ‘pyopenssl’ is a dependency of conda and cannot be removed from requests’ is a dependency of conda
- [Solved] Error in inherits(x, “theme”): argument “e2” is missing, with no default
- Vue Package Error: npm ERR! missing script: build
- Maven Error: Missing artifact jdk.tools:jdk.tools:jar:1.7
- [Solved] Maven log jar package conflict error: Class path contains multiple SLF4J bindings
- [Solved] Go Get Download Dependency Error: is not using a known version control system
- .NETproject compilation error. Type or namespace name could not be found. Visual studio automatically introduces dependency package (shortcut key)
- package golang.org/x/net/XXX: unrecognized import path “golang.org/x/net/xxx“…
- [Solved] removeerror: ‘requests’ is a dependency of CONDA and cannot be removed from
- How to Solve Maven Error: Return code is: 501 , ReasonPhrase:HTTPS Required.