Maven install build error - Path to Dependency

余生颓废 提交于 2019-12-11 07:57:54

问题


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

project pom file: link

Info: Java Version: 1.6.0_26

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

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


回答1:


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.

Something like:
<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>

Also you can read https://community.jboss.org/wiki/MavenGettingStarted-Users



来源:https://stackoverflow.com/questions/14588390/maven-install-build-error-path-to-dependency

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!