elharo opened a new issue, #518:
URL: https://github.com/apache/maven-ear-plugin/issues/518
## Description
In `EarMojo.java:886-897`, the `removeFromOutdatedResources()` method has a
fallback path that will never match:
```java
try {
relativeDestFile =
getWorkDirectory().toPath().relativize(destination.normalize());
} catch (ProviderMismatchException e) {
relativeDestFile = destination.normalize(); // absolute path
}
if (outdatedResources.remove(relativeDestFile.toString())) { ... }
```
When a `ProviderMismatchException` occurs (e.g., zip filesystem path vs
local filesystem path), the fallback stores an absolute path. However,
`outdatedResources` contains only relative paths (from
`initOutdatedResources()` at line 857). The `remove()` will never match, so
cleanup silently fails for those paths.
## Expected behavior
Attempt to relativize differently, or at minimum log that cleanup could not
be performed for that path.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]