Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/maven/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Nexus can';找不到Maven Central中的工件_Maven_Sonarqube_Nexus - Fatal编程技术网

Nexus can';找不到Maven Central中的工件

Nexus can';找不到Maven Central中的工件,maven,sonarqube,nexus,Maven,Sonarqube,Nexus,我有一个带有组类型存储库的Nexus服务器,其中包含Maven Center。我可以在maven Center中看到org.codehaus.mojo:cobertura maven插件:2.5.1工件(pom和jar),但当我尝试使用maven下载此工件时,它会说: Downloading: https://example.com/nexus/content/groups/all/org/codehaus/mojo/cobertura-maven-plugin/2.5.1/cobertura-

我有一个带有组类型存储库的Nexus服务器,其中包含Maven Center。我可以在maven Center中看到org.codehaus.mojo:cobertura maven插件:2.5.1工件(pom和jar),但当我尝试使用maven下载此工件时,它会说:

Downloading: https://example.com/nexus/content/groups/all/org/codehaus/mojo/cobertura-maven-plugin/2.5.1/cobertura-maven-plugin-2.5.1.pom
[WARNING] The POM for org.codehaus.mojo:cobertura-maven-plugin:jar:2.5.1 is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 14.523s
[INFO] Finished at: Wed May 16 16:31:24 EEST 2012
[INFO] Final Memory: 18M/219M
[INFO] ------------------------------------------------------------------------
[INFO] [16:31:24.647] Execute org.codehaus.mojo:cobertura-maven-plugin:2.5.1:cobertura done: 3978 ms
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] example project 1 ................................. FAILURE [10.077s]
[INFO] example project 2 ................................. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 14.804s
[INFO] Finished at: Wed May 16 16:31:24 EEST 2012
[INFO] Final Memory: 17M/218M
[INFO] ------------------------------------------------------------------------
[ERROR] Plugin org.codehaus.mojo:cobertura-maven-plugin:2.5.1 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.codehaus.mojo:cobertura-maven-plugin:jar:2.5.1: Could not find artifact org.codehaus.mojo:cobertura-maven-plugin:pom:2.5.1 in example.com (https://example.com/nexus/content/groups/all) -> [Help 1]
[ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.0:sonar (default-cli) on project example project 1: Can not execute Sonar: Unable to execute maven plugin: Exception during execution of org.codehaus.mojo:cobertura-maven-plugin:2.5.1:cobertura -> [Help 2]
知道为什么它不能下载工件吗


UPD:是的,我在settings.xml中设置了镜像,是的,存储库是“在服务中”,并且只使用反向代理。

插件通常存储在不同于“正常”工件的存储库中(尽管据我所知,没有真正的理由需要这样做,只是经常这样做)


仔细检查您的配置,确保您所指向的组在central中有可用的插件。如果显示Nexus配置,则可能能够查明问题。

您必须将settings.xml指向已定义的“all”组。此外,您还必须覆盖repository和pluginRepository的“central”(请参阅),并确保central是all组的一部分

一旦一切正常,再次尝试您的项目,并使用-U强制更新

mvn -U clean install

通过手动将此工件添加到第三方存储库来解决此问题。将感谢更好的解决方案。现在通过安装最新的Nexus(2.0.4-1)解决。以前的版本是1.7.2。你说的Nexus配置是什么意思?我无法访问Nexus所在的服务器,除非通过HTTPS。因此,我无法查看或更改该服务器上的任何配置文件或查看日志:(。但我当然有settings.xml并具有服务器的管理权限。Manfred,非常感谢您的回答。但我再也无法访问该服务器,因此无法检查它。希望它能帮助其他面临相同问题的人。