gnodet opened a new pull request, #405: URL: https://github.com/apache/maven-filtering/pull/405
## Summary Fixes [MRESOURCES-301](https://issues.apache.org/jira/browse/MRESOURCES-301) — `nonFilteredFileExtension` not taken into account. Binary file types such as JAR, ZIP, WAR and other archives, native libraries, fonts, office documents, and audio/video files should never be processed as text by the resource-filtering machinery. Before this change, only a narrow set of image extensions (`jpg`, `jpeg`, `gif`, `bmp`, `png`, `ico`) were excluded from filtering by default. This forced users to manually configure `nonFilteredFileExtensions` for every binary type they used in resource directories — a common source of build failures (corrupted JARs, `MalformedInputException`) as reported in MRESOURCES-301 and its duplicate MRESOURCES-82. ## Changes **`DefaultMavenResourcesFiltering`** — expanded the default non-filtered extension list to cover: | Category | Extensions | |---|---| | Images | jpg, jpeg, gif, bmp, png, ico, webp, tif, tiff, svg | | Java archives / native | jar, war, ear, aar, rar, jnilib, so, dll, dylib | | Generic archives | zip, gz, bz2, xz, zst, 7z, tar | | Executables | exe, bin, class | | Documents | pdf, doc, docx, xls, xlsx, ppt, pptx | | Audio / video | mp3, mp4, ogg, wav, avi, mov, flv, swf | | Fonts | ttf, otf, woff, woff2, eot | **Test** — added `binaryJarIsNotFilteredByDefault` in `DefaultMavenResourcesFilteringTest`: places a binary (non-UTF-8) `.jar` file in a fully-filtered resource directory with **no** user-configured `nonFilteredFileExtensions`, and verifies it is binary-copied without throwing. ## Backward compatibility Users who currently work around the missing defaults by configuring `nonFilteredFileExtensions` explicitly can keep their configuration unchanged; the extensions will simply be present in both the default and user lists, which is harmless (list concatenation before `contains()` check). -- 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]
