java.lang.SecurityException: no manifest section for signature file entry

后端 未结 3 895
被撕碎了的回忆
被撕碎了的回忆 2021-01-15 14:53

I have tried suggestions in other threads but they don\'t help me. When I run my jar by java -jar -BigJar.jar I receive exception :

Exception in t

3条回答
  •  暖寄归人
    2021-01-15 15:11

    This error message tells exactly why bundled jar is not recommended for production release. The problem is some of your dependency jar is signed with signature files. repack it may violate some security policy on the dependency jar.

    To make it work, you need remove all signature files from the signed jar, before copying the unpacked files into your final build jar file.

    
       org.apache.maven.plugins
       maven-shade-plugin
       
          
             package
                
                   shade
                
          
       
       
          ${project.artifactId}-${project.version}-uber
          
             
                *:*
                   
                      META-INF/*.SF
                      META-INF/*.DSA
                      META-INF/*.RSA
                   
                
             
       
    
    

提交回复
热议问题