报错filtering ..\main\resources\lib\\xx**.jar to \target\classes\lib\\**xx.jar failed with Malformed..

报错信息: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>
    
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值