Maven can't find parent POM

元气小坏坏 提交于 2021-01-26 05:33:04

问题


I am trying to build a maven project, but I have encountered problem.

pom has specified parent pom and maven can't find it. I actually have the parent pom, but I don't know where to place it or what should I do so maven knows about.

I'm new to maven so sorry if my question is stupid.


回答1:


If you have the parent pom, you could try installing it.

When you run mvn install on a module the resulting artifact will be placed in your repository, so that it can be used from other modules.




回答2:


I am using Netbeans, I ran -N versions:update-child-modules in Run Maven/Goals.

It worked! It took 5 minutes to build but, it did build the project, and that's the first time that it has.




回答3:


http://maven.apache.org/guides/introduction/introduction-to-the-pom.html Example 1 and Example 2 are for Inheritance that can be usefull.




回答4:


This happens when the different POM in the project. They do not have the same version.

For example if you have:

MyProject / EAR ..... MyProject / WEB .....

you need to have the same version in three POM




回答5:


Same error for me.I resolved by updating the project with a new POM file(someone form my team accidently deleted it).



来源:https://stackoverflow.com/questions/10474583/maven-cant-find-parent-pom

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!