nexus私服部署问题记录

本文解决了一个常见的Maven部署问题,当尝试将jar包部署到Nexus私服时,由于MIME类型不匹配导致的错误。通过取消仓库校验请求头,确保上传内容与仓库格式相匹配,从而解决了Detected contenttype与预期不符的问题。

使用maven命令 deploy到nexus私服的时候报错如下:

2020-05-21 14:09:39,856+0800 WARN  [qtp1952156729-612]  admin org.sonatype.nexus.repository.view.handlers.ExceptionHandler - Invalid content: PUT xxxxxx.jar: org.sonatype.nexus.repository.InvalidContentException: Detected content type [application/x-sh], but expected [application/java-archive]:xxxxx.jar

解决方式:

取消私服仓库校验请求头 Validate that all content uploaded to this repository is of a MIME type appropriate for the repository format

保存后即可解决问题

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值