I am using "org.eclipse.jgit-6.4.0.202211300538-r.jar" in a java project with maven. When I run the program from Intellij everything is fine and the program works perfectly. When I build an Artifact out of this project and run it on command line I get the error "java.lang.SecurityException: Invalid signature file digest for Manifest main attributes".
I know this jar file is a signed jar so I copied the JAR file to another directory and extracted it and deleted the *.RSA and *.SF files and ran it, doesn't work. I also extended my pom.xml file with all the suggestions found online like "excludes", "plugins" and much more, still doesn't work. May be you guys from StackOverflow know how can I create a single JAR-file which uses this jar and doesn't give the error. So how to get rid of this security error which does NOT come out when I run the program in Intellij but appears when I run it on a command line with java -jar