maven2中常用插件(一)

阅读更多

学习《maven3 in action》总结如下常用插件及用法:

插件名称

用途

来源

用法例举

maven-clean-plugin

清理项目

Apache

     

        org.apache.maven.plugins

        maven-clean-plugin

       

         

           

              ${basedir}

             

                **/*.bak

                **/Thumbs.db

             

           

         

       

     

maven-compiler-plugin

编译项目

Apache

org.apache.maven.plugins

maven-compiler-plugin

${maven-compiler-plugin.version}

${project.build.sourceEncoding}

1.5

1.5

maven-deploy-plugin

部署项目

Apache

 

maven-install-plugin

安装项目

Apache

 

maven-resources-plugin

处理资源文件

Apache

 

maven-site-plugin

生成站点

Apache

org.apache.maven.plugins

maven-site-plugin

2.1.1                                  

                                        

zh_CN,en

${project.reporting.outputEncoding}        

${project.reporting.outputEncoding}                                

maven-surefire-plugin

执行测试

Apache

org.apache.maven.plugins

maven-surefire-plugin

2.5

**/*ATest.java

**/*BTest.java

**/*CTest.java

maven-jar-plugin

构件JAR文件

Apache

           

                    org.apache.maven.plugins

                    maven-jar-plugin

                    2.2

                    

                            

                                    

                                            test-jar

                                    

                            

                    

           

maven-war-plugin

构件WAR文件

Apache

org.apache.maven.plugins

maven-war-plugin

2.1-beta-1

${project.artifactId}

true

src/main/webapp

**/*.css

**/*.js

maven-shade-plugin

构件包含以来的JAR文件

Apache

org.apache.maven.plugins

maven-shade-plugin

1.2

package

shade

com.haifeng.autoCode.MainFrame

              

maven-changelog-plugin

生成版本控制变更报告

Apache

org.apache.maven.plugins

maven-changelog-plugin

2.2

range

60

maven-checkstyle-plugin

生成CheckStyle报告

Apache

org.apache.maven.plugins

maven-checkstyle-plugin

2.5

config/maven_checks.xml

目前不支持多模块儿聚合

maven-javadoc-plugin

生成JavaDoc文档

Apache

  

org.apache.maven.plugins

maven-javadoc-plugin

2.7                                

maven-jxr-plugin

生成源代码交叉引用文档

Apache

org.apache.maven.plugins

maven-jxr-plugin

2.2

true

maven-pmd-plugin

生成pmd报告

Apache

org.apache.maven.plugins

maven-pmd-plugin

2.5

rulesets/braces.xml

rulesets/naming.xml

rulesets/string.xml

true

maven-project-info-reports-plugin

生成项目信息报告

Apache

org.apache.maven.plugins

maven-project-info-reports-plugin

2.1

${project.build.sourceEncoding}

${project.reporting.outputEncoding}

maven-surefire-report-plugin

生成单元测试报告

Apache

 

maven-antrun-plugin

调用ant任务

Apache

 

maven-archetype-plugin

基于ArcheType生成项目骨架

Apache

 

maven-assembly-plugin

构件自定义格式的分发包

Apache

 

maven-dependency-plugin

以来分析及控制

Apache

 

maven-enforcer-plugin

定义规则并强制要求项目遵守

Apache

 

 

maven-pgp-plugin

为项目构件生成PGP签名

Apache

 

maven-help-plugin

获取项目及Maven环境信息

Apache

 

maven-invoker-plugin

自动运行Maven项目构建并验证

Apache

 

mavne-release-plugin

自动化项目版本发布

Apache

org.apache.maven.plugins

maven-release-plugin

2.0

https://127.0.0.1/app/tags/

maven-scm-plugin

集成版本控制系统

Apache

 

maven-source-plugin

生成源码包

Apache

 

maven-eclipse-plugin

生成eclipse项目环境配置

Apache

 

maven-helper-maven-plugin

包括各种支持构件生命周期的目标

Codehaus

 

exec-maven-plugin

运行系统程序或者java程序

Codehaus

你可能感兴趣的:(maven,Apache,XML,Eclipse,单元测试)