小编典典

Maven无法解析詹金斯的POM

jenkins

我有一个简单的maven项目,其中包含一些常用的测试工具。它在本地构建,但是在詹金斯上,我遇到了这个奇怪的错误(见下文)。

其他资讯:

  • 它使用Maven在本地构建
  • 设置与我们所有其他詹金斯项目相同(非常基本)
  • 其他詹金斯版本工作正常
  • 我尝试删除/root/.jenkins/workspace/testtools文件夹
  • 我尝试删除该版本并为其重新命名
  • 磁盘未满
  • 我没有找到其他有关此特定问题的有用信息。

**

Parsing POMs
ERROR: Failed to parse POMs
hudson.maven.MavenEmbedderException: 1 problem was encountered while building the effective settings
[FATAL] Non-readable settings /root/.jenkins/workspace/testtools: /root/.jenkins/workspace/testtools (Is a directory) @ /root/.jenkins/workspace/testtools**
at hudson.maven.MavenEmbedder.<init>(MavenEmbedder.java:128)
at hudson.maven.MavenEmbedder.<init>(MavenEmbedder.java:109)
at hudson.maven.MavenEmbedder.<init>(MavenEmbedder.java:136)
at hudson.maven.MavenUtil.createEmbedder(MavenUtil.java:212)
at hudson.maven.MavenModuleSetBuild$PomParser.invoke(MavenModuleSetBuild.java:1254)
at hudson.maven.MavenModuleSetBuild$PomParser.invoke(MavenModuleSetBuild.java:1058)
at hudson.FilePath.act(FilePath.java:909)
at hudson.FilePath.act(FilePath.java:882)
at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.parsePoms(MavenModuleSetBuild.java:920)
at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:652)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:586)
at hudson.model.Run.execute(Run.java:1603)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:506)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:247)
Caused by: hudson.maven.MavenEmbedderException: 1 problem was encountered while building the effective settings
[FATAL] Non-readable settings /root/.jenkins/workspace/testtools: /root/.jenkins/workspace/testtools (Is a directory) @ /root/.jenkins/workspace/testtools
at hudson.maven.MavenEmbedder.getSettings(MavenEmbedder.java:261)
at hudson.maven.MavenEmbedder.buildMavenExecutionRequest(MavenEmbedder.java:157)
at hudson.maven.MavenEmbedder.<init>(MavenEmbedder.java:120)
... 14 more
Caused by: org.apache.maven.settings.building.SettingsBuildingException: 1 problem was    encountered while building the effective settings
[FATAL] Non-readable settings /root/.jenkins/workspace/testtools: /root/.jenkins/workspace/testtools (Is a directory) @ /root/.jenkins/workspace/testtools
at org.apache.maven.settings.building.DefaultSettingsBuilder.build(DefaultSettingsBuilder.java:116)
at hudson.maven.MavenEmbedder.getSettings(MavenEmbedder.java:259)
... 16 more
Finished: FAILURE

阅读 640

收藏
2020-07-25

共1个答案

小编典典

Maven尝试将/root/.jenkins/workspace/testtools其读取为用户设置文件(通常位于/root/.m2/settings.xml)。由于这是一个目录,因此无法读取。

Build -> Advanced... -> settings file您似乎没有选择Settings in file system任何值的情况下,在“作业”配置中签入。将此更改为“使用默认Maven设置”,您就很好。

2020-07-25