[
https://issues.apache.org/jira/browse/MCLEAN-26?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17958676#comment-17958676
]
Olivier Lamy commented on MCLEAN-26:
------------------------------------
This project has moved from Jira to GitHub Issues. This issue was migrated to
[apache/maven-clean-plugin#214|https://github.com/apache/maven-clean-plugin/issues/214].
> Long pathnames on windows platforms cannot be deleted
> -----------------------------------------------------
>
> Key: MCLEAN-26
> URL: https://issues.apache.org/jira/browse/MCLEAN-26
> Project: Maven Clean Plugin (Moved to GitHub Issues)
> Issue Type: Bug
> Affects Versions: 2.1.1
> Environment: Windows, JDK1.5 Update 7,
> Reporter: jd
> Assignee: Siveton Vincent
> Priority: Minor
> Fix For: 2.2
>
> Attachments: MCLEAN-file-management.patch
>
>
> NOTE: Could not find a specific project for file-management and since this
> project is getting affect by issue in file-management, I am reporting this
> problem and its solution here.
> When projects reside in directory structure that causes absolute pathnames to
> go beyond 248 (maybe 260 on some Java versions) characters, files cannot be
> deleted on Windows platform.
> On further investigation, the root cause was the
> org.apache.maven.shared.model.fileset.util.FileSetManager.delete method's
> failure to successfully delete the class file in projects' target directory.
> Caused by: java.io.IOException: Unable to delete file <class-file's very long
> pathname>
> at
> org.apache.maven.shared.model.fileset.util.FileSetManager.removeDir(FileSetManager.java:433)
> at
> org.apache.maven.shared.model.fileset.util.FileSetManager.removeDir(FileSetManager.java:423)
> at
> org.apache.maven.shared.model.fileset.util.FileSetManager.removeDir(FileSetManager.java:423)
> at
> org.apache.maven.shared.model.fileset.util.FileSetManager.removeDir(FileSetManager.java:423)
> at
> org.apache.maven.shared.model.fileset.util.FileSetManager.delete(FileSetManager.java:189)
> at
> org.apache.maven.plugin.clean.CleanMojo.removeDirectory(CleanMojo.java:185)
> ... 19 more
> This can be fixed by getting a canonical file from the specified file on
> failure and then attempting a delete as is apparent from the attached patch
> to file-management dependency's source:
> groupId: org.apache.maven.shared
> artifactId: file-management
> version: 1.0
--
This message was sent by Atlassian Jira
(v8.20.10#820010)