Error while creating consolidated jar file - no manifiest section for signature file entry javax/mail/internet/ContentDisposition.class

前端 未结 4 1261
长情又很酷
长情又很酷 2020-12-18 09:48

I have some jar files into /libs/ and my project classes are located at /target/. To remove dependency on external folder. I want to make a consolidate jar file. Which conta

4条回答
  •  被撕碎了的回忆
    2020-12-18 10:35

    Exception in thread "main" java.lang.SecurityException: no manifiest section for signature file entry

    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. Note that doesn't support exclude file within jar archive, try using a list of instead:

    
      
    
    ... ...
    

提交回复
热议问题