Maven shade + resteasy Could find writer for content-type

后端 未结 1 657
醉话见心
醉话见心 2021-01-24 04:44

I have a project that works fine with maven managed dependencies. But I have a requirement for giving my jar files as one.

For this I use maven-shade plugin (http://mave

1条回答
  •  温柔的废话
    2021-01-24 05:17

    You maybe missing one of the Shade transformers listed below. I was seeing the same error as yours when running 'java -jar' on my Shade-built jar file. Make sure you have a org.apache.maven.plugins.shade.resource.ServicesResourceTransformer entry. JAR files providing implementations of some interfaces often ship with a META-INF/services/ directory that maps interfaces to their implementation classes for lookup by the service locator. To merge multiple implementations of the same interface into one service entry, the ServicesResourceTransformer can be used. I believe this was the case with RestEasy running under Shade.

    
        
            
                org.apache.maven.plugins
                maven-shade-plugin
                
                    
                        package
                        
                            shade
                        
                        
                            
                                
                                    path.to.your.App
                                
                                
                                    META-INF/spring.handlers
                                
                                
                                    META-INF/spring.schemas
                                
                                
                            
                        
                    
                
            
        
    
    

    0 讨论(0)
提交回复
热议问题