简体   繁体   English

无法在 eclipse 中导入 maven 项目

[英]Not able to import maven projects in eclipse

Getting the internal error when i try to import the maven project from my local machine.当我尝试从我的本地计算机导入 maven 项目时出现内部错误。内部错误

Should import successfully.应该导入成功。

Try to尝试

  1. Delete the 'poi-ooxml' folder删除“poi-ooxml”文件夹
  2. Reimport the project重新导入项目

Navigate to the project folder via terminal.通过终端导航到项目文件夹。 Execute this command from inside:从内部执行此命令:

mvn clean install -U

base on the error message, looks like your repository path has a extra char '>'.根据错误消息,看起来您的存储库路径有一个额外的字符“>”。

Should be: C:\Users\xxxx.m2\repository\org...应该是:C:\Users\xxxx.m2\repository\org...

But Eclipse read: C:\Users\xxxx.m2\reposoitory**>**org但是 Eclipse 读取:C:\Users\xxxx.m2\reposoitory**>**org

this path should be set with maven setting.xml, so suggest:此路径应设置为 maven setting.xml,因此建议:

  1. make sure the maven pack from apache offical site确保来自 apache 官方网站的 maven 包
  2. override the setting.xml, under the maven_install_foleder/conf重写setting.xml,在maven_install_foleder/conf下
  3. check the Eclipse property settings about maven, if something override the repository path with a extra charareter检查关于 maven 的 Eclipse 属性设置,如果有东西用额外的字符覆盖存储库路径

I just deleted the .m2 folder and tried to import the project then it started to work correctly.我刚刚删除了.m2文件夹并尝试导入项目,然后它开始正常工作。 Also execute mvn clean intsall -u in the project folder.同时在项目文件夹中执行mvn clean intsall -u

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM