"Failed to delete" html file with no apparent reason
Affected versions
3.2.0, 3.3.2, 3.5.0
Bug description
Getting random deletion error after upgrading vom 3.2.0 to 3.5.0, using Maven 3.9.7 This is on an Azure DevOps Pipeline, so I would expect no interference!?
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:3.5.0:clean (default-clean) on project NNN: Failed to clean project: Failed to delete /agent/_work/1/s/NNN/target/html/NNN/index.html -> [Help 1]
One would expect a clearer message from the Files.delete() and IOException?
Maybe backport https://github.com/apache/maven-clean-plugin/issues/180 to 3.x? Somewhat related? https://github.com/apache/maven-clean-plugin/issues/281 - where 3.3.2 seems to be fine, and 3.4.1 not.
Similar file, other plugin version, same problem
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:3.3.2:clean (default-clean) on project NNN: Failed to clean project: Failed to delete /agent/_work/1/s/NNN/target/doctrees/NNN/index.doctree -> [Help 1]
And yet 3.2.0
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:3.2.0:clean (default-clean) on project NNN: Failed to clean project: Failed to delete /agent/_work/1/s/NNN/target/doctrees/NNN/index.doctree -> [Help 1]