spring-boot: SpringBoot2.4.0 MavenFilteringException: Input length = 1
jdk8 SpringBoot2.4.0
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.2.0:resources (default-resources) on project demo: Input length = 1 -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.2.0:resources (default-resources) on project zskeeper_server: Input length = 1
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:566)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
at org.codehaus.classworlds.Launcher.main (Launcher.java:47)
Caused by: org.apache.maven.plugin.MojoExecutionException: Input length = 1
at org.apache.maven.plugins.resources.ResourcesMojo.execute (ResourcesMojo.java:362)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
maven-resources-plugin needs to be modified to version 3.1.0 to solve the problem
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.1.0</version>
</plugin>
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 26
- Comments: 23 (5 by maintainers)
Commits related to this issue
- 주석에 windows에서 쓴 한글 ...(UTF-8)이 아닌 문자 때문에 생긴 버그 수정. https://github.com/spring-projects/spring-boot/issues/24346 — committed to frog97/spring-petclinic by deleted user 3 years ago
- Corregir error org.apache.maven.plugin.MojoExecutionException: Input length = 1. No pueden haber acentos (o supuestamente caracteres no UTF-8 en el application.properties -> https://github.com/spring-... — committed to guepardo190889/metricas by guepardo190889 3 years ago
- UTF-8-Fix (see https://github.com/spring-projects/spring-boot/issues/24346#issue-758399172) — committed to up-lsl/server-uebungen by deleted user 3 years ago
- Improve limit handling in StringDecoder The case of one data buffer containing multiple lines can could cause a buffer leak due to a suspected issue in concatMapIterable. This commit adds workarounds... — committed to humaolin/spring-boot by rstoyanchev 4 years ago
@brucelwl thank you for the sample.
application.propertiescontains nonUTF-8characters. I’ve removed those comments and this doesn’t fail for me anymore. Spring Boot usesUTF-8by default when you usespring-boot-starter-parentbut that’s something you can easily override for your own need.It looks like the previous of the plugin tolerated those non UTF-8 character when filtering and does not anymore. If you think there’s a regression in the ressources plugin, please follow-up on their issue tracker.
I solve the error by eliminating any word that has a “ñ” from my “application.properties” file that caused me the error when deploying my project.
Thanks for the pointers, though it would certainly be far easier to fix such errors if the tool simply gave a message saying that a certain file contains invalid characters…
Yes, i have in my .properties file comments with accents in my words because i speak spanish, the solution is remove them, then will run for complete. Saludos desde México Cabrones!, si se pudo! xD
I have deleted “ç” letter in the comment line on application.properties file and it worked…
same here, i delete the “ó” letter in a comment from my .properties file and problem solved.
My other option is to add this to the
<project>in thepom.xmlfile: