Maven 安装构建错误 - 依赖路径 [英] Maven install build error - Path to Dependency

查看:43
本文介绍了Maven 安装构建错误 - 依赖路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经转到项目文件夹和文件所在的目录并执行了 mvn cleanmvn install 但我得到了这个:

I have gone to my directory where the project folders and files are and executed a mvn clean and mvn install and yet i get this:

   [INFO] Unable to find resource ‘org.eclipse.core:org.eclipse.core.commands:pom:3.5.0.I20090525-2000’ in repository central (http://repo1.maven.org/maven2)
    [INFO]-------
    [ERROR] BUILD ERROR
    [INFO]---------
    [INFO] Failed to resolve artifact.

Couldn’t find a version in [1.0.0-v20070606] to match range [1.0.0,2.0.0) org.eclipse.equinox:app:jar:null from the specified remote repositories:
central (http://repo1.maven.org/maven2),
ABC.Pricing.R2(http://mksrvsub.XXXXX/nexus/content/repositories/ABC.pricing.R2),
abc-snapshots(http://artifactory-tmp.xxxxx:8081/nexus/content/groups/repor),
abc123 (http://mksrvsub.XXXXX/nexus/content/repositories/Release),
andromeda (http://artifactory-tmp.xxxxxxx:8081/nexus/content/repositories/andromeda),

path to dependency:
com.xxx:MyServcies:jar:7.7.0-SNAPSHOT
com.xxx:MyBaseServcies:jar:7.7.0-SNAPSHOT
com.xxx:MyStrutsServcies:jar:7.7.0-SNAPSHOT
com.yyy.SomeSpecialService:jar:7.7.0-SNAPSHOT
org.eclipse:get:jar:3.2.100-v20070530
org.eclipse.core:runtime:jar:3.3.100-v20070530

项目 pom 文件:link

信息:Java 版本:1.6.0_26

Info: Java Version: 1.6.0_26

操作系统名称:windows xp,版本:5.1 arch:x86,

OS name: windows xp, verison: 5.1 arch:x86,

Apache Maven 2.2.1 (r801777; 2009-08-06 15:16:01-0400)

Apache Maven 2.2.1 (r801777; 2009-08-06 15:16:01-0400)

推荐答案

如您所见,Maven 无法解析依赖关系 org.eclipse.core.commands 版本 3.5.0.I20090525-2000.存储库 http://repo1.maven.org/maven2 不包含具有此版本号的工件.因此,您必须在 pom 文件中添加存储库描述.

As you can see Maven cannot resolve dependency org.eclipse.core.commands version 3.5.0.I20090525-2000. Repository http://repo1.maven.org/maven2 does not contain artifact with this version number. Therefore you have to add repository description in your pom file.

<repositories>
<repository>
<id>jboss-deprecated-repository</id>
<name>JBoss Deprecated Maven Repository</name>
<url>https://repository.jboss.org/nexus/content/repositories/deprecated/</url>
</repository>
...
<repositories>

你也可以阅读https://community.jboss.org/wiki/MavenGettingStarted-Users

这篇关于Maven 安装构建错误 - 依赖路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆