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中心,转而使用nexus作为镜像。

删除本地UsersYourUser.m2文件夹中的maven-metadata*.xml_*.repositories对我来说很有用

希望这能有所帮助!

在IntelliJ中:-转到文件-设置-在搜索框左上角键入"maven"。-点击maven选项-查看是否选中"脱机工作"框。如果是,则取消选中

在Eclipse中:-单击绿色Run图标上的小下拉箭头。-单击运行配置,然后选择maven构建配置-查看是否选中了"脱机"框。如果是,则取消选中

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

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

最新更新