maven-assembly-plugin打包-springboot 配置打在包外 动态配置

pom.xml


    
        
        
            org.springframework.boot
            spring-boot-maven-plugin
            
                
                    
                        build-info
                    
                
            
            
                
                false
            
        
        
        
            maven-assembly-plugin
            
                
                ${project.artifactId}-${project.version}
            
            
                
                    full
                    
                    package
                    
                        
                        single
                    
                    
                        
                        ${basedir}/assembly/assembly.xml
                    
                
            
        
    

配置比较多而且比较固定,所以可以在parent工程中声明,在要打包的项目中引用。

assembly.xml 配置


    
    jar
    
        tar.gz
    
    
        
            
            ${project.build.directory}/classes/config
            /
            0755
        
    
    
        
        
            README.md
            
        
        
            
            ${project.build.directory}/${project.build.finalName}.jar
            /
        
    

你可能感兴趣的:(Java,springboot,maven,assembly)