我有一个不同的父项目,现在我收到以下错误:
未能转移org.jacoco:jacoco-maven-plugin:pom:0.6.2.201302030002来自http://repo.maven.apache.org/maven2缓存在本地存储库中,解决方案将不会重新尝试,直到更新间隔为中心已经过去或强制更新 . 原始错误:无法传输工件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
我用0.5.7.201204190339 AND 0.6.2.201302030002和$ 试了一下 . 但现在成功:-(
我使用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>
1 回答
如果您位于公司防火墙或其他代理之后,则需要创建
settings.xml
文件并为代理服务器指定凭据,如下所示 .您可能尝试的其他方法是删除存储库目录,然后重试 .
如果您正在使用eclipse,那么您还需要在Eclipse中配置代理设置 . 转到窗口 - >首选项 - >在搜索框中输入“代理” .
在
Network connections
中,选择'Active Provider'作为Manual
,然后为HTTP和HTTPS设置代理设置 . 不要为SOCKS设置代理 .其中一个解决方案总能为我工作:)