maven缺少神器

bob*_*cac 7 java m2eclipse 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
Run Code Online (Sandbox Code Playgroud)

小智 15

在 IntelliJ 中: - 转到文件 - 设置 - 在搜索框左上角输入“maven”。- 单击 Maven 选项 - 查看脱机工作框是否已选中。如果是,则取消选中它

在 Eclipse 中: - 单击绿色运行图标上的小下拉箭头。- 单击运行配置并选择您的 Maven 构建配置 - 查看是否选中“离线”框。如果是,则取消选中它

如果你这样做了但仍然遇到同样的问题那么我会使用@Faliorn解决方案


Fal*_*orn 14

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

删除maven-metadata*.xml_*.repositories本地\Users\YourUser\.m2文件夹内部为我做了伎俩.

希望这可以帮助!

  • BTW @ bob-cac,这应该是公认的答案,恕我直言. (2认同)