springboot打包:整体打包和分离式打包

1 整体打包


    
        
            org.springframework.boot
           spring-boot-maven-plugin
        
    

2 配置文件,依赖jar分离式打包


        
            
                org.apache.maven.plugins
                maven-jar-plugin
                
                    
                        
                        /**/*.properties
                        /**/*.yml
                    
                    
                        
                            true
                            lib/
                            com.consumer.CancelOrderApplication
                        
                        
                        
                            conf/
                        
                    
                
            

            
                org.apache.maven.plugins
                maven-dependency-plugin
                
                    
                        copy-lib
                        prepare-package
                        
                            copy-dependencies
                        
                        
                            ${project.build.directory}/lib
                            false
                            false
                            true
                            compile
                        
                    
                
            

            
                org.apache.maven.plugins
                maven-resources-plugin
                
                    
                        copy-resources
                        validate
                        
                            copy-resources
                        
                        
                            ${project.build.directory}/conf
                            
                                
                                    src/main/resources
                                    true
                                
                            
                        
                    
                
            

            
                maven-surefire-plugin
                
                    true
                
            
        
    

你可能感兴趣的:(maven,java,jar,gradle,spring,boot)