Handling of problems like Invalid packaging for parent pom.xml, must be _pom_ but is _xxx when using maven

When I use maven for clean operation, I get the error Invalid packaging for parent pom.xml, must be pom but is _jar.
Found a similar question on Stack Overflow, https://stackoverflow.com/questions/13330930/invalid-packaging-for-parent-pom-xml-must-be-pom-but-is-ear .
It turned out that I did not specify the packaging method. Just add
<packaging>pom</packaging>this line of code to the corresponding pom.xml file.
Reference URL https://stackoverflow.com/questions/13330930/invalid-packaging-for-parent-pom-xml-must-be-pom-but-is-ear

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325090346&siteId=291194637