简体   繁体   English

Jenkins / Hudson-无法构建多模块项目

[英]Jenkins/Hudson - Cannot build multimodule project

I'm trying to set up my Jenkins to build my project. 我正试图建立我的詹金斯来建立我的项目。 The root module was built without a problem. 根模块的构建没有问题。 But now when the other module needs the root one, Jenkins throws this exception 但是现在,当另一个模块需要根模块时,詹金斯会抛出此异常

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

It seems that it doesn't look for artifacts in my local repository. 似乎它不在我的本地存储库中寻找工件。 How can I fix this? 我怎样才能解决这个问题?

parent.relativePath is not mandatory, and can be a bit confusing in several cases (in jenkins/hudson, but in IDE as well). parent.relativePath不是强制性的,在某些情况下可能会有些混乱(在jenkins / hudson中,但在IDE中也是如此)。

So unless you have a good reason to rely on the relativePath, I consider it simpler to install the parent POM and access it like any other dependency (I use NEXUS as a corporate repo, and the jenkins local maven gets the last version of the parent POM from it if necessary) 因此,除非您有充分的理由依赖relativePath,否则我认为安装父POM并像访问其他任何依赖项一样访问它更为简单(我使用NEXUS作为公司存储库,而jenkins本地maven获得了父的最新版本如有需要,请从中取出POM)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM