[英]Error in pom.xml - Failure to transfer org.jacoco jacoco-maven-plugin
I have a parent project with different and now I get the following error: 我有一个不同的父项目,现在出现以下错误:
Failure to transfer org.jacoco:jacoco-maven-plugin:pom:0.6.2.201302030002 from http://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced.
无法从http://repo.maven.apache.org/maven2传输org.jacoco:jacoco-maven-plugin:pom:0.6.2.201302030002缓存在本地存储库中,直到中心的更新间隔重新尝试解析已过去或强制进行更新。 Original error: Could not transfer artifact org.jacoco:jacoco-maven-plugin:pom:0.6.2.201302030002 from/to central (http:// repo.maven.apache.org/maven2): null to http://repo.maven.apache.org/maven2/org/jacoco/jacoco-maven-plugin/ 0.6.2.201302030002/jacoco-maven-plugin-0.6.2.201302030002.pom
原始错误:无法将工件org.jacoco:jacoco-maven-plugin:pom:0.6.2.201302030002从中央传输到中央(http:// repo.maven.apache.org/maven2):null到http:// repo。 maven.apache.org/maven2/org/jacoco/jacoco-maven-plugin/ 0.6.2.201302030002 / jacoco-行家-插件-0.6.2.201302030002.pom
I tried it with 0.5.7.201204190339 AND 0.6.2.201302030002 and ${jacoco.version} . 我用0.5.7.201204190339和0.6.2.201302030002和$ {jacoco.version}进行了尝试。 But now success :-(
但是现在成功了:-(
I use Spring Tool Suite - Version: 3.6.0.RELEASE and I have installed m2eclipse Plugin. 我使用Spring Tool Suite-版本:3.6.0.RELEASE并安装了m2eclipse插件。
<build>
<defaultGoal>install</defaultGoal>
<plugins>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<!-- <version>${jacoco.version}</version> -->
<version>0.5.7.201204190339</version>
<executions>
<execution>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>report</id>
<phase>prepare-package</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
</executions>
<configuration>
<skip>${jacoco.skip}</skip>
</configuration>
</plugin>
If you are behind corporate firewall or other proxy then you need to create settings.xml
file and specify credentials for proxy server like below. 如果您位于公司防火墙或其他代理之后,则需要创建
settings.xml
文件并为代理服务器指定凭据,如下所示。
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
<proxies>
<proxy>
<id>my_proxy</id>
<active>true</active>
<protocol>http</protocol>
<host>{proxy server address}</host>
<port>{proxy server port}</port>
<username>{user name to be used for proxy}</username>
<password>{password to be used for proxy}</password>
<nonProxyHosts>*.google.com|localhost|127.0.0.1</nonProxyHosts>
</proxy>
</proxies>
</settings>
Other thing you may try is to delete repository directory and try again. 您可能尝试的另一件事是删除存储库目录,然后重试。
If you are using eclipse then you need to configure proxy settings in Eclipse too. 如果使用的是eclipse,则还需要在Eclipse中配置代理设置。 Goto Window -> Preference -> type 'proxy' in search box.
转到窗口->首选项->在搜索框中输入“代理”。
In Network connections
, choose 'Active Provider' as Manual
and then set proxy settings for HTTP and HTTPS. 在“
Network connections
,选择“活动提供者”作为“ Manual
,然后为HTTP和HTTPS设置代理设置。 Do not set proxy for SOCKS. 不要为SOCKS设置代理。
One of these solutions always work for me :) 这些解决方案之一始终对我有用:)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.