实现maven打包 可执行jar与依赖jar分离




src/main/resources
true

/.xml
/.properties
/.yml




${project.build.directory}/classes
src/main/resources
true


/.xml
/.properties
/.yml


    
        
        
            org.apache.maven.plugins
            maven-resources-plugin
            
                ${project.build.sourceEncoding}
            
        
        
            org.apache.maven.plugins
            maven-compiler-plugin
            
                ${java.version}
                ${java.version}
                ${project.build.sourceEncoding}
            
        
        
            org.apache.maven.plugins
            maven-war-plugin
            
                ${project.artifactId}-${project.version}
            
        
        
        
            org.apache.maven.plugins
            maven-surefire-plugin
            
                true
            
        
        
        
        
            org.apache.maven.plugins
            maven-jar-plugin
            
                
                target/classes/
                ${project.artifactId}-${project.version}
                
                    
                        
                        ${spring-cloud-main-class}
                        
                        false
                        true
                        
                        lib/
                        true
                    
                
            
        
        
            org.apache.maven.plugins
            maven-dependency-plugin
            
                
                    copy-dependencies
                    package
                    
                        copy-dependencies
                    
                    
                        
                        jar
                        jar
                        
                        
                            ${project.build.directory}/lib
                        
                    
                
            
        
    

你可能感兴趣的:(实现maven打包 可执行jar与依赖jar分离)