Maven中解决system的jar依赖,打包复制问题

依赖管理配置:

创新互联建站专注于企业网络营销推广、网站重做改版、綦江网站定制设计、自适应品牌网站建设、HTML5商城网站定制开发、集团公司官网建设、外贸网站建设、高端网站制作、响应式网页设计等建站业务,价格优惠性价比高,为綦江等各大城市提供网站开发制作服务。


    com.alibaba
    fastjson
    1.2.29
    system
    
    E:/projectsx/lecing/lecing5/code/back/lib/fastjson-1.2.29-SNAPSHOT.jar

依赖配置:


    com.alibaba
    fastjson

build配置:

父POM中:


    ${project.artifactId}
    
        
            ${basedir}/src/main/java
            
                **/*.xml
                **/*.properties
            
        
        
            ${basedir}/src/main/resources
        
    
    
        
            
            
                org.apache.maven.plugins
                maven-resources-plugin
                2.7
                
                    UTF-8
                
            
            
            
                org.apache.maven.plugins
                maven-compiler-plugin
                3.5.1
                
                    1.8
                    1.8
                    UTF-8
                
            
        
    

子POM中:


    
        
            ${basedir}/src/main/java
            
                **/*.xml
                **/*.properties
            
        
        
            ${basedir}/src/main/resources
        
    
    
        
            org.apache.maven.plugins
            maven-dependency-plugin
            3.0.2
            
                
                    package
                    
                        copy-dependencies
                    
                
            
            
                system
                ${project.build.directory}/${project.build.finalName}/WEB-INF/lib
            
        
    

子POM中的插件才是解决的关键。


文章标题:Maven中解决system的jar依赖,打包复制问题
文章来源:http://pwwzsj.com/article/gipgho.html