elharo opened a new pull request, #641: URL: https://github.com/apache/maven-war-plugin/pull/641
Fixes #522 The WAR plugin's outdated resource detection was incorrectly marking files in `WEB-INF/lib` as outdated even when they were placed by other plugins (e.g., `maven-dependency-plugin`) for non-runtime-scope artifacts. These files would then be deleted by `deleteOutdatedResources()`. The fix computes the expected filenames for runtime-scope artifacts and only marks files under `WEB-INF/lib` as outdated if they match one of those filenames. Files placed by other plugins for provided-scope or other non-runtime artifacts are no longer touched. **Root cause:** When the `DefaultWarPackagingContext` constructor walks the `webappDirectory`, it marks files older than `session.getStartTime()` as "outdated". Files copied by `maven-dependency-plugin` to `WEB-INF/lib/` have timestamps from the local Maven repository (old), so they get marked as outdated. The WAR plugin only copies runtime-scope artifacts, so `provided`-scope artifacts are never "claimed" via `addResource()`, and are subsequently deleted. **Fix:** Before marking a file under `WEB-INF/lib/` as outdated, verify it matches a runtime-scope artifact filename. If it doesn't, it was placed by another plugin and should be preserved. -- 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]
