maven打包配置文件和jar包放在外面

 1 用eclipse的Maven打包后在target目录,如下图

 maven打包配置文件和jar包放在外面_第1张图片

2 POM文件的build依赖



    src/main/java
    
        
        
 
            
            src/main/resources
            
                **/*.properties
                **/*.xml
            
            false
            ${project.build.directory}/config
        
    
 
    
 
        
        
            org.apache.maven.plugins
            maven-compiler-plugin
            
                1.8
                1.8
                UTF-8
            
        
 
        
            org.apache.maven.plugins
            maven-jar-plugin
            
                
                    
                    
                        com.dodoca.common.TaskMain
                        true
                        lib/
                    
                    
                    
                        config/
                    
                
                
                
            
        
        
        
            org.apache.maven.plugins
            maven-dependency-plugin
            
                
                    copy
                    package
                    
                        copy-dependencies
                    
                    
                        
                            ${project.build.directory}/lib
                        
                    
                
            
        
        
        
            org.apache.maven.plugins
            maven-resources-plugin
            2.5
            
                UTF-8
            
        
 
    

 

你可能感兴趣的:(java编程中的问题)