Java中Maven项目导出jar包配置的示例代码

具体代码如下所示;

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



  src/main/java
  
    
      src/main/resources
      
      ${project.build.directory}
      
        **/*.java
      
    
  
  src/test/java
  
    
      src/test/resources
      true
      
        **/*.java
      
    
  
  
    
      org.apache.maven.plugins
      maven-compiler-plugin
      2.3.2
      
        1.8
        1.8
        UTF-8
      
    
    
    
      org.apache.maven.plugins
      maven-dependency-plugin
      
        
          copy-dependencies
          package
          
            copy-dependencies
          
          
            
              ${project.build.directory}/lib
            
          
        
      
    
    
    
      org.apache.maven.plugins
      maven-jar-plugin
      
        
          
            true
            lib/
            com.ctbri.echoRisk.ApplicationStart
          
          
            ./
          
        
      
          
  

    
  ${project.basedir}/target
  ${project.artifactId}-${project.version}
  
    
      org.apache.maven.plugins
      maven-surefire-plugin
      2.21.0
      
        true
      
    
    
      org.apache.maven.plugins
      maven-compiler-plugin
      2.3.2
      
        1.8
        1.8
        UTF-8
        
          ${project.basedir}/lib/
        
      
    
    
      org.apache.maven.plugins
      maven-shade-plugin
      3.1.0
      
        
          package
          
            shade
          
          
            true
            
              
                *:*
              
            
            
              
              
                com.ctbri.echoRisk.ApplicationStart
              
              
              
                META-INF/spring.handlers
              
              
                META-INF/spring.schemas
              
            
          
        
      
    
  


  
    
      org.apache.maven.plugins
      maven-surefire-plugin
      2.21.0
      
        true
      
    
    
      maven-compiler-plugin
      2.3.2
      
        1.8
        1.8
        UTF-8
        
          ${project.basedir}/lib/
        
      
    
    
      maven-assembly-plugin
      
        
          jar-with-dependencies
        
        
          
            com.ctbri.echoRisk.ApplicationStart
          
        
      
      
        
          make-assembly
          package
          
            single
          
        
      
    
  

总结

以上所述是小编给大家介绍的Java中Maven项目导出jar包配置的示例代码,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对创新互联网站的支持!


当前文章:Java中Maven项目导出jar包配置的示例代码
本文地址:http://ybzwz.com/article/joihpc.html