当前位置:网站首页>Invalid or corrupt jarfile xxx.jar
Invalid or corrupt jarfile xxx.jar
2022-07-30 16:12:00 【脱离语言】
一、遇到的问题
Artifacts打包的特点是,目录下会生成一大堆jar包,各个依赖包都是独立存在的,更新时只替换开发包即可。
之前一直用Artifacts打的包,会生成MANIFEST.MF文件,后来一直出现“Invalid or corrupt jarfile xxx.jar”,偶尔可以成功一两次,很是苦恼。
二、解决办法
改用mav install打包,可以解决上面的问题。特点是所有的依赖包都会打成一个jar包,所以这个jar会比较大,小则几十兆,大则一二百兆。
我遇到了新的问题。jar可以生成,但是执行时提示某个jar不存在。
这个jar包我认识,是个私有包,不在maven仓库里,以systemPath的形式接入的。
三、导入maven本地库
网络是个好东西,找到了解决办法。将该私有jar包导入maven本地仓库即可。命令如下:
mvn install:install-file -Dfile=xxx\xxx.jar -DgroupId=xxx -DartifactId=xxx -Dversion=x.x.x -Dpackage=jarDfile,指jar的原位置
DgroupId,给该包起个组名,即包路径
DartifactId,指产品名称,即这个jar的名字
Dversion,版本号,普通字符串也可以
Dpackage,包类型,固定jar
边栏推荐
- 服务器装好系统的电脑怎么分区
- [HMS core] [FAQ] A collection of typical questions about push kit, analysis services, and video editing services 3
- 70 lines of code, a desktop automatic translation artifact
- PCIE下载的驱动安装
- CAD几个优化设置
- Visual Studio编辑器 2019:scanf函数返回值被忽略(C4996)报错及解决办法
- 李沐d2l(七)kaggle房价预测+数值稳定性+模型初始化和激活函数
- Visual Studio 集成Qt开发环境的一些注意事项
- How to use Redis for distributed applications in Golang
- Load Base Split usage documentation
猜你喜欢

23. 请你谈谈关于IO同步、异步、阻塞、非阻塞的区别

php如何截取字符串的前几位

应用OPC解决方案实现控制系统数据的安全交换

hcip--ospf综合实验

(1) Cloud computing technology learning - virtualized vSphere learning

Nervegrowold d2l (7) kaggle housing forecast model, numerical stability and the initialization and activation function

【SOC】Classic output hello world

新人学习小熊派网络应用开发

php字符串如何去除第一个字符

【HMS core】【FAQ】push kit、分析服务、视频编辑服务典型问题合集3
随机推荐
[Developers must see] [push kit] Collection of typical problems of push service 2
3D激光SLAM:LeGO-LOAM论文解读---激光雷达里程计与建图
@Bean注解详解
【SOC FPGA】Peripheral KEY LED
Pytorch 训练技巧
打印1-100之间的奇数
静态网页和动态网页的不同之处;该如何选择服务器呢
SocialFi 何以成就 Web3 去中心化社交未来
配置Path环境变量
arcpy使用教程
武汉星起航:海外仓基础建设成为跨境电商企业的一大出海利器
win下搭建php环境的方法
[TypeScript] Introduction, Development Environment Construction, Basic Types
近段时间的学习碎片整理(24)
【HMS core】【FAQ】push kit, WisePlay DRM, Location Kit, Health Kit, 3D Modeling Kit, SignPal Kit Typical Questions Collection 4
rhce笔记3
FME realizes the method of converting CAD with attribute to SHP data
23. Please talk about the difference between IO synchronization, asynchronous, blocking and non-blocking
RobotStudio实现喷漆、打磨等功能(曲面路径生成与仿真)
[HMS core] [FAQ] Collection of typical problems of push kit, AR Engine, advertising service, scanning service 2