elharo opened a new pull request, #639: URL: https://github.com/apache/maven-war-plugin/pull/639
## Fix for MWAR-220 / issue #389 When a project uses dependencyManagement to pin a specific version of a library, any jar in a WAR overlay's `WEB-INF/lib` with the same artifactId but a different version will now be removed during overlay processing. ### How it works In `OverlayPackagingTask.performPackaging()`, after unpacking the overlay and before copying files, the new `filterConflictingDependencyJars()` method scans the overlay's `WEB-INF/lib` directory. For each jar, it extracts the artifactId from the filename (following the `artifactId-version(-classifier)?.jar` convention). If the artifactId matches a non-optional jar artifact from the project's dependency tree, the overlay jar is removed — the managed version will be provided by the project's own dependency resolution. ### Additional changes - Updated the MWAR-389 IT test (`verify.bsh`) to remove print statements for the passing case per review feedback. The IT test in PR #638 documents this issue and now passes with this fix applied. -- 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]
