You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Maven构建成功后Jenkins显示POM解析失败问题求助

Fixing "ERROR: Failed to parse POMs java.nio.fi..." After Jenkins Build Success on Mac

Hey there, I’ve helped a few folks troubleshoot this exact issue with Jenkins and Maven on Mac, so let’s walk through the most likely fixes based on your setup:

  • Check Jenkins User File Permissions
    Jenkins on Mac runs under the jenkins system user by default, and your POM is stored in your personal user’s workspace (/Users/username/eclipse-workspace/ui-test/pom.xml). The jenkins user probably doesn’t have read access to this directory.
    Try these steps:

    1. Open Terminal and grant read/execute permissions to your workspace:
      sudo chmod -R 755 /Users/username/eclipse-workspace/ui-test
      
    2. For more persistent access, add the jenkins user to your personal user group (replace <your-group> with your username, since that’s usually your primary group):
      sudo dscl . append /Groups/<your-group> GroupMembership jenkins
      
  • Verify the POM Path in Jenkins
    Double-check that the Root POM path you entered in Jenkins is an absolute, error-free path. If your workspace or project name has spaces or special characters, wrap the path in quotes in the Jenkins configuration, or rename the directory to avoid those characters entirely—they can throw off file path parsing.

  • Clear Jenkins’ Maven Cache
    Corrupted cached artifacts in Jenkins’ local Maven repo can cause POM parsing failures even if the build succeeds initially.

    1. Locate Jenkins’ Maven repo (typically /Users/Shared/Jenkins/Home/.m2/repository)
    2. Back up the directory, then delete its contents, and rerun the build.
  • Align Jenkins and Local Maven Versions
    Make sure Jenkins is using the same Maven version you tested locally. Head to Jenkins’ Global Tool Configuration, check the Maven installation settings—you can either point it to your local Maven installation (e.g., /usr/local/bin/mvn or the path where you installed Maven) or ensure the bundled Maven version matches what you use in Eclipse.

  • Get the Full Error Log
    The truncated error java.nio.fi... only tells part of the story. Go to your build’s Console Output in Jenkins and look for the complete error stack trace. It might be an AccessDeniedException (permission issue) or NoSuchFileException (path mistake), which will point you straight to the root cause.

内容的提问来源于stack exchange,提问作者apple

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.21 07:02:32