【发布时间】:2014-01-04 02:51:31
【问题描述】:
我有一个 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
【问题讨论】:
-
尝试运行自定义目标
mvn clean install -oo 指定离线 -
你可以从这两个地方做,对于 eclipse
run as > maven build...注意 3 点然后输入这个目标 -
同样的问题无法解决依赖
-
请检查您是否在 Eclipse 首选项中使用相同的 maven 安装。
-
不,我没有启用离线模式,但我在没有互联网的机器上工作(不要离线使用)。但我在本地 Maven 存储库中有所有依赖项