Home  >  Article  >  Java  >  Springboot code is correct but packaging error cannot be found. How to solve the problem?

Springboot code is correct but packaging error cannot be found. How to solve the problem?

PHPz
PHPzforward
2023-05-17 22:43:422168browse

Step one: Delete the module of the subproject in the modules of the parent project pom, and then package the parent project

Because there are no subprojects reporting errors, the parent project can be packaged successfully.

<modules>
    <module>wego-common</module>
    <module>wego-meta</module>
    <!--<module>wego-product</module>-->
    <module>wego-rbac</module>
    <!--<module>wego-order</module>-->
    <!--<module>wego-comment</module>-->
</modules>

Step 2: Package the subproject

Note: The parent project must be declared through the parent tag in the subproject

<parent>
    <groupId>com.wego</groupId>
    <artifactId>wego</artifactId>
    <version>1.0.0</version>
</parent>

Step 3: In Restore the module of the deleted sub-project in the parent project and package the parent project again

At this time, because no sub-project reports an error, the parent project can also be packaged successfully

<modules>
    <module>wego-common</module>
    <module>wego-meta</module>
    <module>wego-product</module>
    <module>wego-rbac</module>
    <module>wego-order</module>
    <module>wego-comment</module>
</modules>

If there are multiple sub-projects If the packaging is unsuccessful, then repeat the above steps until successful

The above is the detailed content of Springboot code is correct but packaging error cannot be found. How to solve the problem?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:yisu.com. If there is any infringement, please contact admin@php.cn delete