You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Remove the dependency to Plexus, replaced by more reliance on java.nio.
This commit contains the following work items:
* Replacement of Plexus includes/excludes filters by `java.nio.file.PathMatcher`.
One benefit is the support of different syntax, at least "glob" and "regex".
If no syntax is specified, default to the "glob" syntax with modifications
for reproducing the behavior of Plexus filters when it differs from "glob".
* Use `java.nio.file.FileVisitor` for walking over files and directory trees.
Consequently, the following of symbolic links is now handled by `FileVisitor`
instead of by `maven-clean-plugin` itself. An advantage is that `FileVisitor`
is safe against infinite loops when there is cycles in the symbolic links.
Also, file attributes (whether the file is regular, a directory or a link)
are queried only once per file.
* Changes in some logging messages and exceptions. "Deleting XYZ" is replaced
by either "Deleted XYZ" if the deletion has been successful, or replaced by
"Failed to delete XYZ" in case of failure (i.e., "XYZ" is not logged twice
in case of failure).
* The `IOException` throws by Java is no longer wrapped in another `IOException`,
so that the callers can catch an exception of the specific sub-type if desired.
The exception is also thrown earlier, before it causes another exception.
The difference can be seen in the tests: a deletion fails because unauthorized,
but the error that was reported to the user was not the `AccessDeniedException`.
Instead, it was a `DirectoryNotEmptyException` thrown when the plugin tried to
delete the directory that contains the file that the plugin failed to delete.
After this commit, the exception throws is the original `AccessDeniedException`.
0 commit comments