我正在尝试设置我的Jenkins来构建我的项目。根模块构建没有问题。但是现在当另一个模块需要根模块时,Jenkins会抛出这个异常
Parsing POMs
ERROR: Failed to parse POMs
org.apache.maven.project.ProjectBuildingException: Some problems were encountered while processing the POMs:
[FATAL] Non-resolvable parent POM: Failure to find cz.cvut.fit.wst:wst-root-pom:pom:1.0 in 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 and 'parent.relativePath' points at wrong local POM @ line 3, column 10
at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:363)
at hudson.maven.MavenEmbedder.buildProjects(MavenEmbedder.java:361)
at hudson.maven.MavenEmbedder.readProjects(MavenEmbedder.java:331)
at hudson.maven.MavenModuleSetBuild$PomParser.invoke(MavenModuleSetBuild.java:1224)
at hudson.maven.MavenModuleSetBuild$PomParser.invoke(MavenModuleSetBuild.java:1049)
at hudson.FilePath.act(FilePath.java:832)
at hudson.FilePath.act(FilePath.java:814)
at hudson.maven.MavenModuleSetBuild$RunnerImpl.parsePoms(MavenModuleSetBuild.java:914)
at hudson.maven.MavenModuleSetBuild$RunnerImpl.doRun(MavenModuleSetBuild.java:658)
at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:473)
at hudson.model.Run.run(Run.java:1410)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:481)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:238)
Finished: FAILURE
它似乎没有在我的本地存储库中查找工件。我该如何解决这个问题?
答案 0 :(得分:0)
parent.relativePath不是强制性的,在某些情况下可能有点令人困惑(在jenkins / hudson中,但在IDE中也是如此)。
因此,除非您有充分的理由依赖relativePath,否则我认为安装父POM并像访问任何其他依赖项一样访问它更简单(我使用NEXUS作为企业仓库,jenkins本地maven获取最新版本如有必要,可以从中获取父POM)