简体   繁体   English

pom.xml中的错误-无法传输org.jacoco jacoco-maven-plugin

[英]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.

相关问题 插件 org.jacoco:jacoco-maven-plugin:无法解析其依赖项之一: - Plugin org.jacoco:jacoco-maven-plugin: one of its dependencies could not be resolved: eclipse (pom.xml) 中的 Maven 错误:无法传输 org.apache.maven.plugins:maven-surefire-plugin:pom:2.12.4 - Maven error in eclipse (pom.xml) : Failure to transfer org.apache.maven.plugins:maven-surefire-plugin:pom:2.12.4 jacoco-maven-plugin:0.7.9 依赖问题 - jacoco-maven-plugin:0.7.9 dependency issue Jenkins jacoco插件不遵循pom.xml中的包含 - Jenkins jacoco plugin is not obeying includes in pom.xml jacoco-maven-plugin导致站点插件在多模块项目中失败 - jacoco-maven-plugin causes site plugin to fail in multimodule project 没有找到处理 jacoco-maven-plugin 的市场条目 - No marketplace entries found to handle jacoco-maven-plugin 在jacoco-maven-plugin中是否需要准备代理目标? - Is prepare-agent goal is necessary in jacoco-maven-plugin? Gradle 错误:无法解析 org.jacoco:org.jacoco.agent - Gradle error: Could not resolve org.jacoco:org.jacoco.agent 排除在pom.xml中为jacoco配置的内容,并排除声纳中的文件 - Exclude configured in pom.xml for jacoco and exclude files in sonar 去年影响 jacoco-maven-plugin 中的测试覆盖率的变化是什么? - What changed in the last year that affects test coverage in jacoco-maven-plugin?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM