[ 
https://issues.apache.org/jira/browse/MCLEAN-124?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17896442#comment-17896442
 ] 

ASF GitHub Bot commented on MCLEAN-124:
---------------------------------------

peterdemaeyer commented on code in PR #60:
URL: https://github.com/apache/maven-clean-plugin/pull/60#discussion_r1833183933


##########
src/main/java/org/apache/maven/plugins/clean/Cleaner.java:
##########
@@ -273,7 +273,8 @@ private boolean isSymbolicLink(Path path) throws 
IOException {
      * @throws IOException If a file/directory could not be deleted and 
<code>failOnError</code> is <code>true</code>.
      */
     private int delete(File file, boolean failOnError, boolean retryOnError) 
throws IOException {
-        if (!file.delete()) {
+        IOException error = delete(file);

Review Comment:
   I renamed it to `failure`.





> Provide more accurate reason when can not delete a resource
> -----------------------------------------------------------
>
>                 Key: MCLEAN-124
>                 URL: https://issues.apache.org/jira/browse/MCLEAN-124
>             Project: Maven Clean Plugin
>          Issue Type: Improvement
>            Reporter: Slawomir Jaranowski
>            Priority: Major
>
> Currently we have only in stack trace something like:
> {noformat}
> Caused by: java.io.IOException: Failed to delete 
> /Users/runner/work/maven-surefire/maven-surefire/surefire-its/target
>     at org.apache.maven.plugins.clean.Cleaner.delete (Cleaner.java:300)
>     at org.apache.maven.plugins.clean.Cleaner.delete (Cleaner.java:250)
>     at org.apache.maven.plugins.clean.Cleaner.delete (Cleaner.java:124)
> {noformat}
> It will be usable if we have reported a reason ... why can not be deleted



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to