Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-52327

java.nio.file.AccessDeniedException on Publish xunit Custom tool test report


    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Blocker
    • Resolution: Fixed
    • Component/s: xunit-plugin
    • Labels:
    • Environment:
      Windows 10
    • Similar Issues:



      I am stuck with this error for any html, csv, etc file after building the project (post build action):

      ERROR: Step ‘Publish xUnit test result report’ aborted due to exception: java.nio.file.AccessDeniedException: . at sun.nio.fs.WindowsException.

      -I installed Jenkins locally, created a project with the workspace been the same location as the Jenkins install dir to not mess around changing the workplace location.
      -I added a post build action of xunit (after installing the plugin) and used Custom in the drop down (https://wiki.jenkins.io/display/JENKINS/xUnit+Plugin).
      -I wrote the pattern as *.html and even gave the full path at one point
      -I did not include a stylesheet
      -I checked the permissions on the test file and changed accordingly if necessary

      When I ran a junit or xunit.net post build actions, Jenkins could see the test file and give the appropriate error (an error in the html for example).

      I also tried this on my mac at home and found the same issues but for the file permission, the error was: “is a directory”. I had made sure that the test result files were owned by Jenkins.

      Any clues what the issue could be?

      Thank you,




          aportoca Ana Bruno created issue -
          aportoca Ana Bruno made changes -
          Field Original Value New Value
          Attachment stack-trace.txt [ 43275 ]
          aportoca Ana Bruno made changes -
          Attachment stack-trace.txt [ 43276 ]
          nfalco Nikolas Falco made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]


            • Assignee:
              nfalco Nikolas Falco
              aportoca Ana Bruno
            • Votes:
              0 Vote for this issue
              2 Start watching this issue


              • Created: