4

我一直在尝试按照这里的教程:https ://wiki.jenkins-ci.org/display/JENKINS/Plugin+tutorial

我现在已经花了大约 7 个小时,最后决定只是询问并希望得到回应。

我根本没有从 create 命令编辑 pom 文件。我很确定我的设置文件是正确的。当我尝试运行或打包项目时,虽然我得到了这个:

    [WARNING] The POM for org.apache.maven.surefire:surefire-booter:jar:2.9 is missing,            no dependency information available
    [WARNING] The POM for org.apache.maven.surefire:maven-surefire-common:jar:2.9 is   missing, no dependency information available
    [WARNING] The POM for org.apache.maven:maven-toolchain:jar:2.0.9 is missing, no dependency information available
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD FAILURE
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 8.260s
    [INFO] Finished at: Tue Jan 29 16:07:56 EST 2013
    [INFO] Final Memory: 41M/387M
    [INFO] ------------------------------------------------------------------------
    [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.9:test (default-test) on project helloworld: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.9:test failed: Plugin org.apache.maven.plugins:maven-surefire-plugin:2.9 or one of its dependencies could not be resolved: The following artifacts could not be resolved: org.apache.maven.surefire:surefire-booter:jar:2.9, org.apache.maven.surefire:maven-surefire-common:jar:2.9, org.codehaus.plexus:plexus-utils:jar:2.1: Failure to find org.apache.maven.surefire:surefire-booter:jar:2.9 in http://repo.jenkins-ci.org/public/ was cached in the local repository, resolution will not be reattempted until the update interval of repo.jenkins-ci.org has elapsed or updates are forced ->

所以我假设它应该从我在设置文件中设置的存储库中下载这 3 个 jar 文件......但事实并非如此。有什么理由会发生这种情况吗?我能做些什么让它下载这些文件?或者是下载它们我只是没有在某处正确引用它们?我对此很陌生,所以我可以完全关闭。

如果有帮助,我有 maven 3.0.4 和 jdk 1.7.0_02。我认为从教程中复制和粘贴的所有其他内容都差不多。任何帮助将不胜感激!

4

1 回答 1

3

当您第一次尝试获取人工制品时可能出了点问题,现在您因为一个讨厌的 maven 错误而被卡住了。Maven 可能在您的本地存储库 (.m2) 中创建了一个空文件夹,现在认为您已经拥有依赖项。因此,您应该检查是否发生了这种情况,如果是,请删除该文件夹。

在这里查看我的答案:

编译器错误“无法读取所需库的存档” - Spring Tool Suite

您还可以首先检查为什么会出现问题。您是否使用浏览器访问以下网址?

http://repo.jenkins-ci.org/public/org/apache/maven/surefire/surefire-booter/2.9/

于 2013-01-30T08:49:15.583 回答