我一直在尝试按照这里的教程: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。我认为其他所有其他内容都可以从教程中复制和粘贴。任何帮助将不胜感激!
答案 0 :(得分:3)
当你第一次尝试获取这些文物时,可能出现了一些错误,现在你因为一个讨厌的maven bug而陷入困境。 Maven可能在本地存储库(.m2)中创建了一个空文件夹,现在认为您已经拥有了依赖项。因此,您应该检查是否发生了这种情况,如果是,则删除该文件夹。
请在此处查看我的回答:
Compiler error "archive for required library could not be read" - Spring Tool Suite
您还可以首先检查出现问题的原因。您是否使用浏览器访问以下网址?
http://repo.jenkins-ci.org/public/org/apache/maven/surefire/surefire-booter/2.9/