maven缺少神器

我有一个maven项目,直到昨天正在建设。 现在,每当我尝试使用m2e构建时,它都无法构建,因为它无法解析依赖关系,但这些依赖关系不会丢失,并且可以在我的本地存储库中找到它们。 我知道之前已经问过这个问题,但没有一个答案解决了我的问题。 我尝试了很多东西:

  • 删除缓存。
  • 关闭项目并重新打开它。
  • 做一个干净的项目安装。

然而没有结果。 那么有更系统的程序来解决这个问题吗?

编辑日志:

[INFO] Scanning for projects... [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building itunit-workflow 1.0.2-SNAPSHOT [INFO] ------------------------------------------------------------------------ [WARNING] The POM for org.activiti:activiti-bpmn-converter:jar:5.13 is missing, no dependency information available [WARNING] The POM for org.springframework:spring-beans:jar:3.1.2.RELEASE is missing, no dependency information available [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 7.279s [INFO] Finished at: Mon Dec 16 18:30:10 GMT+02:00 2013 [INFO] Final Memory: 5M/76M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal on project itunit-workflow: Could not resolve dependencies for project org.itunit.itunit:itunit-workflow:ejb:1.0.2-SNAPSHOT: The following artifacts could not be resolved: org.activiti:activiti-bpmn-converter:jar:5.13, org.springframework:spring-beans:jar:3.1.2.RELEASE: Cannot access central (http://repo.maven.apache.org/maven2) in offline mode and the artifact org.activiti:activiti-bpmn-converter:jar:5.13 has not been downloaded from it before. -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException 

这通常发生在从一个maven配置更改为另一个maven配置时。 在我的情况下,我正在从直接连接切换到maven central到使用nexus作为镜像。

删除本地\Users\YourUser\.m2文件夹中的maven-metadata*.xml_*.repositories对我来说\Users\YourUser\.m2

希望这可以帮助!

尝试使用Intellij IDEA Maven插件进行安装时,我遇到了这个问题。 但是当我使用本地Maven安装进行安装时,问题就消失了。 如果您遇到同样的问题,请尝试安装新的Maven并运行mvn install