Skip to content

Spotbugs Xml Output file Locked After Execution (Windows only) #517

@mcordeiro73

Description

@mcordeiro73

When attempting to run mvn clean verify package clean with version 4.7.3.0 of the spotbugs-maven-plugin, I get the below error in the execution of the second clean goal.

Note: This did not occur when using older versions of the spotbugs-maven-plugin (I am upgrading from version 4.5.3.0).

Some observations made while looking into this issue:

  • It only appears to occur on Windows. When attempting to recreate on macOS the issue did not occur.
  • It only occurs when executing as a single goal string. If instead the second clean is split into another mvn command the clean works without issue.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  01:09 min
[INFO] Finished at: 2022-12-16T14:27:04-05:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:2.5:clean (default-clean) on project sample-project: Failed to clean project: Failed to delete C:\Workspaces\Workspace1\Project\target\SpotbugsReport\spotbugsXml.xml -> [Help 1]

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions