Maven POM错误-缺少POM [英] Maven POM error - POM is missing

查看:153
本文介绍了Maven POM错误-缺少POM的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试构建一个Maven项目.我的其他团队成员能够毫无问题地构建它.我收到以下错误:

I am trying to build a maven project. My other team members are able to build it without issues. I get the following errors:

[WARNING] The POM for org.hectorclient:hector-core:jar:1.0-3 is missing, no dependency information 
available
[WARNING] The POM for org.hectorclient:hector-test:jar:1.0-3 is missing, no dependency information     
available

然后,构建因以下错误而失败:无法解决项目XYZ的依赖关系.可能出什么问题了?

Then the build fails with the error: Could not resolve dependencies for the project XYZ. What could be possibly going wrong?

推荐答案

当然,您的.m2本地存储库中缺少jar. 假定依赖关系写在pom中.

Surely the jar is missing from your .m2 local repository. Assuming the dependency is written in the pom.

我的建议:

  1. 案例:当您拥有互联网

  1. Case: When you have internet

    在您的POM.xml后面执行
  1. fire mvn install,它将下载所有必需的jar.
  2. 然后射击mvn compile进行建造.
  1. fire mvn install that will follow your POM.xml and it will download all the necessary jars.
  2. then fire mvn compile to build.

  • 案例:您的互联网连接受到限制,这限制了/没有互联网

  • Case: You are having restricted internet connection that is restricting / no Internet

    1. 从成功编译的其他计算机上获取存储库+ POM
    2. 然后开火mvn -o compile

  • 我认为它将解决您的情况.

    I assume it will solve your case.

    这篇关于Maven POM错误-缺少POM的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

    查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆