[已解决] [ERROR] Failed to execute goal maven-resources-plugin:3.2.0:resources Input length = 1
文章目录错误描述解决方法1方法2最后错误描述完整的错误信息如下:[ERROR] Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.2.0:resources (default-resources) on project XXX: Input length = 1 -> [Help 1]org.ap
错误描述
完整的错误信息如下:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.2.0:resources (default-resources) on project XXX: 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 XXX: 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)
…
解决
方法1
网上看到下面的解决方法:大家可以尝试下,我这边没有解决
这个问题是由于项目的 application.properties 配置文件编码导致。文件编码为 GB2312,将它改为 UTF 编码即可。
注意:在改变编码之前,先将配置文件备份,不然可能导致配置文件出现中文乱码。配置文件改变成 UTF-8 编码后,将备份配置文件中的内容拷贝过来即可,将改变编码后的乱码配置全部覆盖即可
方法2
我们项目中配置了下面的信息:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.2.0</version>
<configuration>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
我尝试将 版本降级成 3.1.0,再编译项目,问题就解决了。
具体原因还不清楚,如果弄明白了,我再更新。
最后
大家如果看到这篇文章,看哪种方法对你有效,请评论留言,谢谢。
更多推荐


所有评论(0)