Configuration parameter for deleting read-only files
Add a force configuration option for deleting read-only files and directories. This is required because java.nio.file.Files.delete does not remove the read-only attribute, contrarily to java.io.File.delete. Note: the 3.4.0 version of the clean plugin, which was using java.io.File, may also not work anymore with read-only files starting with Java 25 if JDK-8355954 is fixed. Therefore, some action other than reverting commits is necessary.
An open question is whether the plugin should delete read-only files by default, or only if the user requested it. The latter is more conservative and is the standard behaviour of Unix commands such as rm. Furthermore, JDK-8355954 suggests that silent deletion of read-only files was an unintended bug rather than a feature.
Fix #109 and #246.
Fix #109 and #246.
I'm afraid that issues will not be fixed as issues are reported for version 3.x ...
This is for 4.x
Right, #246 is filled against 3.x and indeed would be a separated PR.
It will be more difficult to beckport it to 3.x ...
@desruisseaux can you try it ...
I will try to port to 3.x tomorrow. It will be partially a different development because 4.0 is based on java.nio.file.FileVisitor, while 3.x has not done this migration.
Ported this pull request to the 3.x branch in #252.
The port of this pull request has been merged on the 3.x branch one month ago and seems to work. Therefore, I presume that we can merge on master as well.