Uploading Artifacts

I am trying to upload Snapshot.jar file to nexus and I am getting this error.

Return code is: 400, ReasonPhrase: Detected content type [application/x-sh], but expected [application/java-archive]:

When I change the file to tar extension successfully uploaded. Do you have any idea about this error?

Thank you,

The uploaded jar is being detected as a shell script. Is this a spring boot jar by any chance? If so, this is a known issue. Disable file content validation in the hosted repository in order to work around it.

1 Like

Thank you so much for your support. Mentioned solution works.

@rseddon why not make it configuarable, whitelist some mime types etc.