我已经进入项目文件夹和文件所在的目录并执行了mvn clean
和mvn install
,但我得到了这个:
[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
操作系统名称:windows xp,版本:5.1 arch:x86,
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不包含具有此版本号的 Artifact 。因此,您必须在 pom 文件中添加存储库描述。
类似:<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
关于java - Maven 安装构建错误 - 依赖项路径,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14588390/