How can I exclude *.DSA and *.SF files from shaded jar?

后端 未结 3 833
遥遥无期
遥遥无期 2020-12-16 16:41

I have a section in pom.xml

 
   
      *:*
         
            

        
3条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-16 17:06

    I had the same problem. It was fixed by making my artifact selector more specific, e.g.

    bouncycastle:*
    

    The entire block looks like this:

    
        org.apache.maven.plugins
        maven-shade-plugin
        
            
                package
                
                    shade
                
                
                    
                        
                            com.mycompany.MainClass
                        
                    
                    
                        
                            bouncycastle:*
                            
                                META-INF/*.SF
                                META-INF/*.DSA
                                META-INF/*.RSA
                            
                        
                    
                    true
                    standalone
                
            
        
    
    
    

提交回复
热议问题