Jenkins如何在Cloudbees中查找maven存储库?

时间:2013-04-17 09:37:23

标签: maven-3 pom.xml cloudbees

我常常遇到Cloudbees Jenkins查找maven存储库的问题。我们的项目仍然不成熟所以我们在Assembla上使用私有存储库和外部SVN。通常,jenkins会查看公共Cloudbees和我们的私有存储库来解决依赖关系。但有时它会在公共回购中停止并且无法转移工件。

编辑:触发的作业项目使用个人资料。此配置文件添加了自定义属性以完成构建。我已将它们放在此doc之后的私有settings.xml中。

http://wiki.cloudbees.com/bin/view/DEV/Sharing+Files+with+Build+Executors

所以这似乎是在停用云端默认配置文件。

此作业未找到父POM的一个示例。 Jenkins能够将父POM部署到私有存储库。它启动第二个工作(projectA)

Uploaded: https://repository-accountid.forge.cloudbees.com/snapshot/com/company/projectA-pom/1.2-SNAPSHOT/projectA-pom-1.2-20130416.155847-5.pom (5 KB at 79.0 KB/sec)
Downloading: https://repository-accountid.forge.cloudbees.com/snapshot/com/company/projectA-pom/maven-metadata.xml
Downloaded: https://repository-accountid.forge.cloudbees.com/snapshot/com/company/projectA-pom/maven-metadata.xml (285 B at 7.0 KB/sec)
Uploading: https://repository-accountid.forge.cloudbees.com/snapshot/com/company/projectA-pom/1.2-SNAPSHOT/maven-metadata.xml
Uploaded: https://repository-accountid.forge.cloudbees.com/snapshot/com/company/projectA-pom/1.2-SNAPSHOT/maven-metadata.xml (600 B at 9.2 KB/sec)
Uploading: https://repository-accountid.forge.cloudbees.com/snapshot/com/company/projectA-pom/maven-metadata.xml
Uploaded: https://repository-accountid.forge.cloudbees.com/snapshot/com/company/projectA-pom/maven-metadata.xml (285 B at 5.5 KB/sec)
[INFO] Deployment done in 0.62 sec
Triggering a new build of projectA #12

第二个构建应该使用新的POM父级(或至少已经可用)。它在公共存储库中搜索并停在那里。也许这是Maven插件的临时问题(Maven 2 jenkins插件或Cloudbees maven插件)

no change for https://subversion.assembla.com/svn/accountid.repo/projectA/trunk since the previous build
Parsing POMs
Failed to transfer Could not find metadata com.company:projectA-pom:1.2-SNAPSHOT/maven-metadata.xml in cloudbees-nexus-repository (http://repo.cloudbees.com/content/groups/public)
Failed to transfer Could not find artifact com.company:projectA-pom:pom:1.2-SNAPSHOT in cloudbees-nexus-repository (http://repo.cloudbees.com/content/groups/public)
ERROR: Failed to parse POMs
hudson.util.IOException2: remote file operation failed: /scratch/jenkins/workspace/projectA at hudson.remoting.Channel@2b842bd6:s-38976f5e
    at hudson.FilePath.act(FilePath.java:877)
    at hudson.FilePath.act(FilePath.java:863)
    at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.parsePoms(MavenModuleSetBuild.java:910)
    at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:654)
    at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:510)
    at hudson.model.Run.execute(Run.java:1505)
    at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:477)
    at hudson.model.ResourceController.execute(ResourceController.java:88)
    at hudson.model.Executor.run(Executor.java:237)
Caused by: hudson.remoting.ProxyException: hudson.maven.MavenModuleSetBuild$MavenExecutionException: org.apache.maven.project.ProjectBuildingException: Some problems were encountered while processing the POMs:
[FATAL] Non-resolvable parent POM: Could not find artifact com.company:projectA-pom:pom:1.2-SNAPSHOT in cloudbees-nexus-repository (http://repo.cloudbees.com/content/groups/public) and 'parent.relativePath' points at wrong local POM @ line 14, column 10

1 个答案:

答案 0 :(得分:2)

您是否阅读过CloudBees Private Maven Repository维基页面?您可能需要配置自定义settings.xml