The java application is building perfectly fine with maven 3.6.0-3.8.x . However with maven 3.9.0 it is giving this strange error for html or xml files.
Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.3.0:resources (default-resources) on project {project_name}: filtering {path1}/30168019.html to {path2}/30168019.html failed with MalformedInputException: Input length = 1 -> [Help 1]
First I thought might be some encoding issue wrt maven but in the pom file it is mentioned utf-8 itself. Does anyobody have any idea what might be causing this error?
I had this issue and fixed it by adding the below plugin to my pom.xml:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.1.0</version>
</plugin>
This is a workaround, and the proper fix is to make sure your files are properly encoded. More details in the selected answer here: Maven clean install: Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.2.0:resources
The first response helped me, but it still resulted in a 'Warning'. I resolved it by making the following configuration:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.1.0</version>
<configuration>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With