Grizzly and Jersey standalone jar

后端 未结 3 962
慢半拍i
慢半拍i 2020-12-09 21:52

I am trying to package Grizzly with Jersey as a single jar using Maven shade plugin. But I always get the message No container provider supports the type class org.gla

3条回答
  •  伪装坚强ぢ
    2020-12-09 22:02

    I just made the stupid mistake. Configure maven-assembly-plugin in pom as well.

    Assembly seems to replace META-INF/services and override "com.sun.jersey.server.impl.container.grizzly2.GrizzlyContainerProvider " in File com.sun.jersey.spi.container.ContainerProvider

    As guide http://maven.apache.org/plugins/maven-assembly-plugin/ mentioned, If your project wants to package your artifact in an uber-jar, the assembly plugin provides only basic support. For more control, use the Maven Shade Plugin.

      
            
                org.apache.maven.plugins
                maven-assembly-plugin
                
                    
                        
                            true
                            XXX.DaemonMain
                        
                    
                    
                        jar-with-dependencies
                    
                
              
    

提交回复
热议问题