简体   繁体   English

Maven 丢失的工件

[英]maven missing artifact

I have a maven project which until yesterday was being build normally.我有一个 Maven 项目,直到昨天才正常构建。 Now whenever i try to build using m2e it fails to build because it could not resolve dependencies, but these dependencies are not missing and they are found in my local repository.现在,每当我尝试使用 m2e 构建时,它都无法构建,因为它无法解析依赖项,但这些依赖项并没有丢失,它们可以在我的本地存储库中找到。 I know that this question has been asked before but none of the answers solved my problem.我知道以前有人问过这个问题,但没有一个答案能解决我的问题。 I have tried many things:我尝试了很多事情:

  • deleting the cache.删除缓存。
  • closing the project and reopening it.关闭项目并重新打开它。
  • doing a clean install of the project.对项目进行全新安装。

Yet no result.然而没有结果。 So is there more systematic procedure to solve this problem?那么有没有更系统的程序来解决这个问题呢?

Edit log:编辑日志:

[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

This usually happens when changing from one maven configuration to another.这通常发生在从一种 Maven 配置更改为另一种配置时。 In my case, I was switching from direct connection to maven central to using nexus as a mirror.就我而言,我正在从直接连接切换到 maven central 到使用 nexus 作为镜像。

Deleting maven-metadata*.xml and _*.repositories inside local \\Users\\YourUser\\.m2 folder did the trick for me.删除本地\\Users\\YourUser\\.m2文件夹中的maven-metadata*.xml_*.repositories对我\\Users\\YourUser\\.m2

Hope this helps!希望这有帮助!

In IntelliJ: -go to File -settings -on search box top left type 'maven'.在 IntelliJ 中:-go to File -settings -on 搜索框左上角输入“maven”。 -click on maven option -see if work offline box is checked. - 单击 Maven 选项 - 查看是否选中了脱机工作框。 if yes then uncheck it如果是,则取消选中它

In Eclipse: -click on the small dropdown arrow on the green Run icon.在 Eclipse 中:-单击绿色运行图标上的小下拉箭头。 -click on run configurations and select you maven build config -see if 'offline' box is checked. - 单击运行配置并选择您的 Maven 构建配置 - 查看是否选中了“离线”框。 if yes then uncheck it如果是,则取消选中它

If you did this and still getting same issue then I would go with @Faliorn solution如果您这样做并且仍然遇到相同的问题,那么我会使用@Faliorn 解决方案

I faced with this problem when tried make install with Intellij IDEA Maven plugin.我在尝试使用 Intellij IDEA Maven 插件进行 make install 时遇到了这个问题。 But when I made install with local Maven installation, problem was gone.但是当我使用本地 Maven 安装进行安装时,问题就消失了。 If you have same problem try to install new Maven and run mvn install如果您遇到同样的问题,请尝试安装新的 Maven 并运行mvn install

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

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