You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "gnodet (via GitHub)" <gi...@apache.org> on 2026/07/09 12:25:30 UTC
[I] Maven 4 regression: maven-resources-plugin fails with MalformedInputException on binary files that work with Maven 3 [maven]
gnodet opened a new issue, #12455:
URL: https://github.com/apache/maven/issues/12455
## Description
When building the [Apache Atlas](https://github.com/apache/atlas) project, `maven-resources-plugin:3.3.1` successfully filters resources with Maven 3.9.9 but fails with Maven 4.1.0-SNAPSHOT on the same binary `.xlsx` file.
## Steps to reproduce
1. Clone `apache/atlas` (commit `7caaabcf`)
2. Build with Maven 3.9.9 → **succeeds**
3. Build with Maven 4.1.0-SNAPSHOT (73edcd48) → **fails**
## Error
```
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.3.1:testResources (default-testResources) on project atlas-repository: filtering .../src/test/resources/excelFiles/template_1.xlsx to .../target/test-classes/excelFiles/template_1.xlsx failed with MalformedInputException: Input length = 1
```
Stack trace shows:
```
at org.apache.maven.shared.filtering.DefaultMavenFileFilter.copyFile(DefaultMavenFileFilter.java:116)
at org.apache.maven.shared.filtering.DefaultMavenResourcesFiltering.filterResources(DefaultMavenResourcesFiltering.java:268)
at org.apache.maven.plugins.resources.ResourcesMojo.execute(ResourcesMojo.java:343)
```
## Analysis
- Same `maven-resources-plugin:3.3.1` on both Maven 3 and Maven 4
- Same JDK (Temurin 17.0.19), same OS (Linux)
- The file is a binary `.xlsx` — it appears the filtering pipeline tries to decode it as text (UTF-8), which fails on the binary content
Something in Maven 4's model/session layer is causing the `maven-shared-filtering` library to attempt filtering on binary files that were previously excluded or handled differently by Maven 3.
## Environment
- Maven 3.9.9 → ✅ succeeds
- Maven 4.1.0-SNAPSHOT (73edcd48ea2c00a323b5db66fe26bfd00d050ff6) → ❌ fails
- JDK: Temurin 17.0.19
- OS: Ubuntu 24.04 (GitHub Actions runner)
Discovered via [maven4-testing](https://github.com/gnodet/maven4-testing) compatibility suite.
--
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: issues-unsubscribe@maven.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Maven 4 regression: maven-resources-plugin fails with MalformedInputException on binary files that work with Maven 3 [maven]
Posted by "gnodet (via GitHub)" <gi...@apache.org>.
gnodet closed issue #12455: Maven 4 regression: maven-resources-plugin fails with MalformedInputException on binary files that work with Maven 3
URL: https://github.com/apache/maven/issues/12455
--
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: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org