常用maven插件

maven-compiler-plugin

                                                                                                               
    org.apache.maven.plugins   
    maven-compiler-plugin   
    3.1   
       
        1.8     
        1.8    
        UTF-8
        true                                                 
        

也可通过设置属性进行配置使用java8版本


        1.8
        1.8

maven-surefire-plugin

maven-install-plugin

maven-jar-plugin

!-- 打包jar文件时,配置manifest文件,加入lib包的jar依赖 -->

    org.apache.maven.plugins
    maven-jar-plugin
    
        target/classes/
        
            
                com.alibaba.dubbo.container.Main
                
                
                false
                true
                lib/
            
            
                .
            
        
    

maven-source-plugin


    org.apache.maven.plugins
    maven-source-plugin
    
        
            attach-sources
            
                jar
            
        
    

maven-resource-plugin


    org.apache.maven.plugins
    maven-resources-plugin
    3.0.1
    
          UTF-8
     
 

maven-dependency-plugin

  
  
    org.apache.maven.plugins  
    maven-dependency-plugin  
    2.6  
      
          
            copy-dependencies  
            compile  
              
                copy-dependencies  
              
              
                  
                ${project.build.directory}/lib  
                  
                false  
                  
                true  
              
          
      

maven-assembly-plugin

该插件允许用户整合项目的输出,包括依赖,模块,网站文档和其他文档到一个单独的文档,即可用定制化打包。

创建的文档格式包括:zip, tar, tar.gz(tgz), gar.bz2(tbgz2), jar, dir,war 等等。四种预定义的描述器可用:bin, jar-with-dependencies, src, project.


        maven-assembly-plugin
        3.0.0
        
          
            jar-with-dependencies
          
        
        
          
            make-assembly 
            package 
            
              single
            
          
        

需要单独再配置文件


  bin
  
    tar.gz
    tar.bz2
    zip
  
  
    
      ${project.basedir}
      /
      
        README*
        LICENSE*
        NOTICE*
      
    
    
      ${project.build.directory}
      /
      
        *.jar
      
    
    
      ${project.build.directory}/site
      docs
    
  



  bin
  
    tar.gz
    tar.bz2
    zip
  
  
    
      ${project.basedir}
      /
      
        README*
        LICENSE*
        NOTICE*
      
    
    
      ${project.build.directory}
      /
      
        *.jar
      
    
    
      ${project.build.directory}/site
      docs
    
  


  src
  
    tar.gz
    tar.bz2
    zip
  
  
    
      ${project.basedir}
      
        README*
        LICENSE*
        NOTICE*
        pom.xml
      
      true
    
    
      ${project.basedir}/src
      true
    
  

maven-clean-plugin

  
    maven-clean-plugin  
      
        true  
          
              
                c:/a  
              
        
      
  

maven-enforcer-plugin

maven-release-plugin

maven-surefire-plugin

versions-maven-plugin

exec-maven-plugin

build-helper-maven-plugin

maven-help-plugin

maven-antrun-plugin

maven-checkstyle-plugin

检查代码风格等

maven-javadoc-plugin

maven-war-plugin

  
    org.apache.maven.plugins  
    maven-war-plugin  
    2.1.1  
      
          
      

mail-maven-plugin

你可能感兴趣的:(常用maven插件)