使用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

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


被折叠的 条评论
为什么被折叠?



