jar包瘦身,把项目依赖打包成libs

下面是pom,直接粘贴使用便可

   
        message-router
        
            
                org.apache.maven.plugins
                maven-jar-plugin
                
                    
                    
                        *.properties
                        *.xml
                    
                    
                    
                    ${project.build.directory}
                
            

            
                org.springframework.boot
                spring-boot-maven-plugin
                
                    
                    false
                    ZIP
                    
                    com.sjtu.messagerouter.MessageRouterApplication
                    
                    
                        
                            nothing
                            nothing
                        
                    
                    
                    
                        
                            org.projectlombok
                            lombok
                        
                    
                
            

            
            
                org.apache.maven.plugins
                maven-dependency-plugin
                
                    
                        copy
                        package
                        
                            copy-dependencies
                        
                        
                            
                                ${project.build.directory}/libs
                            
                        
                    
                
            
        
    


    
    
        
            baidu-nexus
            http://maven.scm.baidu.com:8081/nexus/content/groups/public
            
                true
            
            
                true
            
        
    

你可能感兴趣的:(jar,java)