![](/img/trans.png)
[英]Plugin org.jacoco:jacoco-maven-plugin: one of its dependencies could not be resolved:
[英]Error in pom.xml - Failure to transfer org.jacoco jacoco-maven-plugin
我有一個不同的父項目,現在出現以下錯誤:
無法從http://repo.maven.apache.org/maven2傳輸org.jacoco:jacoco-maven-plugin:pom:0.6.2.201302030002緩存在本地存儲庫中,直到中心的更新間隔重新嘗試解析已過去或強制進行更新。 原始錯誤:無法將工件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
我用0.5.7.201204190339和0.6.2.201302030002和$ {jacoco.version}進行了嘗試。 但是現在成功了:-(
我使用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>
如果您位於公司防火牆或其他代理之后,則需要創建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>
您可能嘗試的另一件事是刪除存儲庫目錄,然后重試。
如果使用的是eclipse,則還需要在Eclipse中配置代理設置。 轉到窗口->首選項->在搜索框中輸入“代理”。
在“ Network connections
,選擇“活動提供者”作為“ Manual
,然后為HTTP和HTTPS設置代理設置。 不要為SOCKS設置代理。
這些解決方案之一始終對我有用:)
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.