【问题标题】:Unable to get Cobertura dependency in Jenkins: No plugin found for prefix 'cobertura' in the current project无法在 Jenkins 中获取 Cobertura 依赖项:在当前项目中未找到前缀“cobertura”的插件
【发布时间】:2015-08-04 19:03:47
【问题描述】:

由于某种我不知道的原因,我无法通过 jenkins slave box 获取 cobertura 插件依赖项。我以前遇到过一些代理问题,但我认为它们已经解决了。

这是我得到的构建错误:

[WARNING] Could not transfer metadata org.codehaus.mojo/maven-metadata.xml from/to central (http://repo.maven.apache.org/maven2): Connect to repo.maven.apache.org:80 [repo.maven.apache.org/199.27.79.215] failed: Connection timed out
[WARNING] Failure to transfer org.apache.maven.plugins/maven-metadata.xml 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. Original error: Could not transfer metadata org.apache.maven.plugins/maven-metadata.xml from/to central (http://repo.maven.apache.org/maven2): Connect to repo.maven.apache.org:80 [repo.maven.apache.org/199.27.79.215] failed: Connection timed out
[WARNING] Failure to transfer org.codehaus.mojo/maven-metadata.xml 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. Original error: Could not transfer metadata org.codehaus.mojo/maven-metadata.xml from/to central (http://repo.maven.apache.org/maven2): Connect to repo.maven.apache.org:80 [repo.maven.apache.org/199.27.79.215] failed: Connection timed out
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 06:19 min
[INFO] Finished at: 2015-08-04T11:54:21-08:00
[INFO] Final Memory: 15M/481M
[INFO] ------------------------------------------------------------------------
[ERROR] No plugin found for prefix 'cobertura' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (/jenkins/mvnrepo), central (http://repo.maven.apache.org/maven2)] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/NoPluginFoundForPrefixException

这是我的 settings.xml 文件:

<profile>

    <repositories>

        <repository>
            <id>local.central</id>
            <url>@localRepositoryUrl@</url>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </repository>

        <repository>
            <id>apache.snapshots</id>
            <name>Apache Snapshot Repository</name>
            <url>https://repository.apache.org/content/repositories/snapshots</url>
            <releases>
                <enabled>false</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </repository>        

    </repositories>

    <pluginRepositories>
        <pluginRepository>
            <id>local.central</id>
            <url>@localRepositoryUrl@</url>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </pluginRepository>
        <pluginRepository>
            <id>apache.snapshots</id>
            <name>Apache Snapshot Repository</name>
            <url>https://repository.apache.org/content/repositories/snapshots</url>
            <releases>
                <enabled>false</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </pluginRepository>         
    </pluginRepositories>

</profile>

我的这些存储库是否正确?任何帮助或帮助将不胜感激

【问题讨论】:

  • 你的插件到底是什么?

标签: java maven jenkins cobertura maven-cobertura-plugin


【解决方案1】:

看起来它又是我的代理了。我必须在默认 settings.xml 文件中添加我的代理设置

【讨论】:

    猜你喜欢
    • 2020-06-24
    • 2015-02-28
    • 2015-04-06
    • 2014-01-31
    • 2021-05-31
    • 2018-04-28
    • 2016-07-09
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多