slachiewicz opened a new pull request, #1801: URL: https://github.com/apache/maven-dependency-plugin/pull/1801
Adds `failOnDuplicates` (user property `mdep.unpack.failOnDuplicates`, default `false`) to `unpack` and `unpack-dependencies`. With it, the build fails when two entries of the same execution end up at the same file: from two archives unpacked into one directory, a duplicate entry inside one archive, or `fileMappers` that map two entries to one name. Paths are compared as the file system sees them, so names that differ only by case on macOS and Windows, and output directories reached through a symbolic link, count as the same file; that also catches the collision in #1082. The questions on the issue: duplicates are detected within one execution only, and files that were already on disk before it are not duplicates (keeping those is what `overWriteFiles` does). It works together with `overWriteFiles=false` and still reports the duplicate. The first entry for a path is written, later ones are skipped, and the build fails after all artifacts are processed, listing every duplicate; a failed execution marks none of its artifacts, so the next run reports them again. Every jar contains `META-INF/MANIFEST.MF`, so `unpack-dependencies` with this option usually needs `excludes` such as `META-INF/**,module-info.class`. Fixes #1279 --- To make clear that you license your contribution under the [Apache License Version 2.0, January 2004](https://www.apache.org/licenses/LICENSE-2.0) check one of the following: - [ ] I hereby declare this contribution to be licensed under the [Apache License Version 2.0, January 2004](https://www.apache.org/licenses/LICENSE-2.0) - [x] I hereby declare that I have filed an [Apache Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf). -- 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]
