“Invalid signature file” when attempting to run a .jar

后端 未结 21 2372
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-11-22 05:34

My java program is packaged in a jar file and makes use of an external jar library, bouncy castle. My code compiles fine, but running the jar leads to the following error:

21条回答
  •  时光说笑
    2020-11-22 06:16

    For those who have trouble with the accepted solution, there is another way to exclude resource from shaded jar with DontIncludeResourceTransformer:

    https://maven.apache.org/plugins/maven-shade-plugin/examples/resource-transformers.html#DontIncludeResourceTransformer

              
                
                    BC1024KE.DSA
                
              
    

    From Shade 3.0, this transformer accepts a list of resources. Before that you just need to use multiple transformer each with one resource.

提交回复
热议问题