[英]Can't reach maven dependency
有时候,maven没有达到某种依赖关系。
当然是我的错,但是我可以构建很多项目,而没有很多依赖的问题...
在这种情况下,我试图获得:
<dependency>
<groupId>org.richfaces.cdk</groupId>
<artifactId>maven-cdk-plugin</artifactId>
<version>4.3.1.Final</version>
</dependency>
我得到:
[ERROR] Plugin org.richfaces.cdk:maven-cdk-plugin:4.3.1.Final or one of its depe
ndencies could not be resolved: Could not find artifact org.richfaces.cdk:maven-
cdk-plugin:jar:4.3.1.Final in central (https://repo.maven.apache.org/maven2) ->
[Help 1]
我目前在将jdk 1.8与maven 3.3.9结合使用。 我还在settings.xml的活动配置文件引用中添加了存储库标签:
...
<activeProfiles>
<!--make the profile active all the time -->
<activeProfile>nexus</activeProfile>
</activeProfiles>
<profiles>
...
<profile>
<id>nexus</id>
<!--Override the repository (and pluginRepository) "central" from the Maven Super POM
to activate snapshots for both! -->
<repositories>
<repository>
<id>repoId022</id>
<name>repositoryId022</name>
<url>https://mvnrepository.com/artifact/</url>
</repository>
...
我已经在浏览器中签到了,我可以到达依赖路径并下载它而没有问题。
现在我没主意了...您能建议什么吗? 谢谢!
问题是托管所有工件的Maven中央存储库缺少您在pom.xml中提到的工件。
明确显示错误消息,表明maven无法解析依赖关系,通常是由于您指定了错误的工件名称或版本而导致的。
我所做的只是在Maven Central Repo上进行了验证。
您可以通过遵循基本URL https://repo.maven.apache.org/maven2/来搜索工件,然后使用组和工件ID进行搜索。 我发现工件名称从maven-cdk-plugin
更改为maven-richfaces-resources-plugin
,下面是相同的URL。 https://repo.maven.apache.org/maven2/org/richfaces/cdk/maven-richfaces-resources-plugin/4.3.1.Final/
希望它对您有所帮助,如果您还有其他疑问,请与我们联系。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.