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.
I’ve seen in DefaultMimeSupport that you derive the content-type using Apache Tika based on the file’s content and filename.
For an executable jar, Tika indeed returns application/x-sh. But IHMO this is wrong, at least in the context of Nexus Repository. Yes, an executable jar starts with a shell script, but it’s just a wrapper to facilitate execution but doesn’t change the primary nature of the file as a Java archive. The file is primarily a JAR file and should be treated as such (application/java-archive).