Sahas2711 opened a new pull request, #695: URL: https://github.com/apache/maven-war-plugin/pull/695
## Summary Replaces the Maven 3-deprecated `MavenProject.getDependencyArtifacts()` call in `OverlayManager` with `getArtifacts()` filtered to direct dependencies (two-element dependency trail). ## Problem Part of apache/maven#14157. `OverlayManager.getAssociatedArtifact` still calls `MavenProject.getDependencyArtifacts()`, deprecated since Maven 3. ## Root Cause Historical usage; the fallback path for non-war overlay artifacts was never migrated when the API was deprecated. ## Solution - Use `project.getArtifacts()` and keep only direct dependencies (dependency trail of length 2, or null trail for environments that do not record trails so test stubs keep working). - Behavior and parameters unchanged: same overlays resolve, same exception when an overlay is not a project dependency. ## Testing - `mvn -DskipITs test` — 104 tests, 0 failures, 0 errors (full unit suite including `OverlayManagerTest` and `WarZipTest`). ## Scope - `src/main/java/org/apache/maven/plugins/war/overlay/OverlayManager.java` ## Checklist - [x] Follows contribution guidelines. - [x] Includes regression tests where applicable (existing suite covers the path). - [x] No unrelated changes. - [x] Formatting and static analysis checked. - [x] Relevant tests executed. - [x] No known breaking changes. - [x] I hereby declare this contribution to be licensed under the Apache License Version 2.0, January 2004. Part of #694 -- 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]
