Get the App
SLTechnology News&Howtos  ›  Development  › 

What are the records of springboot multi-module packaging?

Shulou Source: shulou.com Published: 2022-06-03 08:50:46 11月15日 Update

What are the records of springboot multi-module packaging? I believe many inexperienced people are at a loss about this. Therefore, this paper summarizes the causes and solutions of the problem. Through this article, I hope you can solve this problem.

As expected, no common was found:

[WARNING] The POM for com.hs:common:jar:0.0.1-SNAPSHOT is missing, no dependency information available

Install the common first.

Continue to pack domain, or report an error. The error is slightly different.

[ERROR] Failed to execute goal on project domain: Could not resolve dependencies for project com.hs:domain:jar:0.0.1-SNAPSHOT: Failed to collect dependencies at com.hs:common:jar:0.0.1-SNAPSHOT: Failed to read artifact descriptor for com.hs:common:jar:0.0.1-SNAPSHOT: Could not find artifact com.hs:demo:pom:0.0.1-SNAPSHOT-> [Help 1]

This is a little confused, why still report an error, why not try the parent project install

Package domain again, successful

Another point to note is that the plug-in spring-boot-maven-plugin, must only exist in the main project, other projects can not have, other projects do not need to be able to execute, are dependent packages. After adding, there will be all kinds of mistakes, and the jar packaged by spring-boot-maven-plugin is unreliable. Sometimes when you create a sub-module, you also create a springboot project, and then you forget to delete it. As a result, packaging is always wrong, so it is recommended that you only build a springboot project on the main project, while other projects can build an ordinary maven project.

After reading the above, have you mastered the methods of recording the multi-module packaging of springboot? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!

Tags: Projects projects modules content methods more problems different wrong ordinary successful helpless for this again reasons for this suggestions skills plug-ins time Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Redmi Apple macOS Docker Linux