apache camel - packaging an executable jar

前端 未结 2 1154
离开以前
离开以前 2020-12-11 23:20

I\'m using maven for building my jar (Intellij IDEA IDE). It is app built using Apache Camel. An excerpt from my pom.xml:


    

        
2条回答
  •  盖世英雄少女心
    2020-12-11 23:55

    The maven-shade-plugin creates a jar with your application code and all dependencies merged into a single jar file. The problem with this approach is that you need to decided what to do with files with conflicting names. This is the configuration we use to build executable JARs for our Camel apps, including Spring and all required dependencies.

    
        org.apache.maven.plugins
        maven-shade-plugin
        1.5
        
            
                
                    org.apache.camel.spring.Main
                
                
                    META-INF/spring.handlers
                
                
                    META-INF/spring.schemas
                
                
                    META-INF/spring.tooling
                
                
                    META-INF/cxf/bus-extensions.txt
                
                
                
                    META-INF/INDEX.LIST
                
                
                    META-INF/MSFTSIG.SF
                
                
                    META-INF/MSFTSIG.RSA
                
            
        
        
            
                package
                
                    shade
                
            
        
    
    

提交回复
热议问题