报错信息:filtering … \src\main\resources\lib\xx**.jar to \target\classes\lib\**xx.jar failed with MalformedInputException: Input length = 1 -> [Help 1]
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.3.1:resources (default-resources) on project 项目名: filtering 项目路径\src\main\resources\lib\bcpkix-jdk15on-1.70.jar to 项目路径\target\classes\lib\bcpkix-jdk15on-1.70.jar failed with MalformedInputException: Input length = 1 -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command [ERROR] mvn <args> -rf :pig-upms-biz
该问题在项目使用Maven clean install的时候出现的,一开始想的是,是否与这个jar包 (bcpkix-jdk15on-1.70.jar) 有关系?但是在pom文件中把对应的依赖注释掉后,并没有解决问题。
看一下完整的报错解析,关键在于两个路径。发现是打包的时候,有一步操作需要把\src\main\resources\lib\下的jar包转移到target\classes\lib\之下,但是Input length说明导入的jar包数目不对。
原因分析:
因为项目需要用到一些外部jar包,一开始是使用如以下这种相对路径的方式引入,并把jar包放置在${project.basedir}/src/main/resources/lib/之下。
<dependency>