apache / apache/maven-ear-plugin
Return value of File.delete() ignored in EarMojo
- Dominant language
- Java
- Stars
- 14
- Forks
- 29
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 6
Description
## Description
In `EarMojo.java:881`, the return value of `File.delete()` is ignored:
```java
resourceFile.delete();
```
If the file cannot be deleted (e.g., locked by another process, permission denied), the failure goes undetected. In incremental builds, stale resources can remain behind.
## Expected behavior
Check the return value and log a warning:
```java
if (!resourceFile.delete()) {
getLog().warn("Failed to delete outdated resource: " + resourceFile);
}
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in EarMojo.java at line 881, where resourceFile.delete() is called, and inspect the surrounding incremental-build cleanup flow. Done means a failed deletion is detected and logged as a warning while successful deletions retain their current behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 85/100