插件(plugin)和目标(goal)
Maven,就其本质而言,是一个插件执行框架,Maven的每个目标的执行逻辑都是由插件来完成的,一个插件可以有1个或者几个目标,比如maven-compiler-plugin插件包含compile和testCompile,即maven-compiler-plugin提供了源代码编译和测试源代码编译的两个目标
使用插件和目标使得我们可以干预Maven构建框架的构建过程
Maven提供的插件列表
Core plugins | Plugins corresponding to default core phases (ie. clean, compile). They may have multiple goals as well. | |||||
clean | B | 2.5 | 2012-05-26 | Clean up after the build. | SVN | JIRA |
compiler | B | 3.1 | 2013-04-08 | Compiles Java sources. | SVN | JIRA |
deploy | B | 2.8.1 | 2013-10-18 | Deploy the built artifact to the remote repository. | SVN | JIRA |
failsafe | B | 2.17 | 2014-03-16 | Run the JUnit integration tests in an isolated classloader. | GIT | JIRA |
install | B | 2.5.1 | 2013-10-18 | Install the built artifact into the local repository. | SVN | JIRA |
resources | B | 2.6 | 2012-08-18 | Copy the resources to the output directory for including in the JAR. | SVN | JIRA |
site | B | 3.4 | 2014-07-07 | Generate a site for the current project. | SVN | JIRA |
surefire | B | 2.17 | 2014-03-16 | Run the JUnit unit tests in an isolated classloader. | GIT | JIRA |
verifier | B | 1.0 | 2010-01-30 | Useful for integration tests - verifies the existence of certain conditions. | SVN | JIRA |
Packaging types/tools | These plugins relate to packaging respective artifact types. | |||||
ear | B | 2.9.1 | 2014-06-15 | Generate an EAR from the current project. | SVN | JIRA |
ejb | B | 2.3 | 2010-09-18 | Build an EJB (and optional client) from the current project. | SVN | JIRA |
jar | B | 2.5 | 2014-06-19 | Build a JAR from the current project. | SVN | JIRA |
rar | B | 2.3 | 2012-11-22 | Build a RAR from the current project. | SVN | JIRA |
war | B | 2.4 | 2013-07-07 | Build a WAR from the current project. | SVN | JIRA |
app-client/acr | B | 1.0 | 2011-03-31 | Build a JavaEE application client from the current project. | SVN | JIRA |
shade | B | 2.3 | 2014-05-02 | Build an Uber-JAR from the current project, including dependencies. | SVN | JIRA |
source | B | 2.3 | 2014-07-08 | Build a source-JAR from the current project. | SVN | JIRA |
Reporting plugins | Plugins which generate reports, are configured as reports in the POM and run under the site generation lifecycle. | |||||
changelog | R | 2.3 | 2014-06-24 | Generate a list of recent changes from your SCM. | SVN | JIRA |
changes | B+R | 2.10 | 2014-04-13 | Generate a report from an issue tracker or a change document. | SVN | JIRA |
checkstyle | B+R | 2.12.1 | 2014-04-19 | Generate a Checkstyle report. | SVN | JIRA |
doap | B | 1.1 | 2011-01-15 | Generate a Description of a Project (DOAP) file from a POM. | SVN | JIRA |
docck | B | 1.0 | 2008-11-16 | Documentation checker plugin. | SVN | JIRA |
javadoc | B+R | 2.9.1 | 2013-06-28 | Generate Javadoc for the project. | SVN | JIRA |
jxr | R | 2.4 | 2013-12-10 | Generate a source cross reference. | SVN | JIRA |
linkcheck | R | 1.1 | 2010-11-13 | Generate a Linkcheck report of your project's documentation. | SVN | JIRA |
pmd | B+R | 3.2 | 2014-08-01 | Generate a PMD report. | SVN | JIRA |
project-info-reports | R | 2.7 | 2013-05-16 | Generate standard project reports. | SVN | JIRA |
surefire-report | R | 2.17 | 2014-03-16 | Generate a report based on the results of unit tests. | GIT | JIRA |
Tools | These are miscellaneous tools available through Maven by default. | |||||
ant | B | 2.3 | 2009-11-11 | Generate an Ant build file for the project. | SVN | JIRA |
antrun | B | 1.7 | 2011-11-01 | Run a set of ant tasks from a phase of the build. | SVN | JIRA |
archetype | B | 2.2 | 2011-11-19 | Generate a skeleton project structure from an archetype. | SVN | JIRA |
assembly | B | 2.4 | 2012-11-18 | Build an assembly (distribution) of sources and/or binaries. | SVN | JIRA |
dependency | B+R | 2.8 | 2013-05-18 | Dependency manipulation (copy, unpack) and analysis. | SVN | JIRA |
enforcer | B | 1.3.1 | 2013-07-12 | Environmental constraint checking (Maven Version, JDK etc), User Custom Rule Execution. | SVN | JIRA |
gpg | B | 1.5 | 2014-02-25 | Create signatures for the artifacts and poms. | SVN | JIRA |
help | B | 2.2 | 2013-02-23 | Get information about the working environment for the project. | SVN | JIRA |
invoker | B+R | 1.9 | 2014-06-28 | Run a set of Maven projects and verify the output. | SVN | JIRA |
jarsigner | B | 1.3.2 | 2014-03-23 | Signs or verifies project artifacts. | SVN | JIRA |
patch | B | 1.1.1 | 2010-01-06 | Use the gnu patch tool to apply patch files to source code. | SVN | JIRA |
B | 1.2 | 2012-11-08 | Generate a PDF version of your project's documentation. | SVN | JIRA | |
plugin | B+R | 3.3 | 2014-05-03 | Create a Maven plugin descriptor for any mojos found in the source tree, to include in the JAR. | SVN | JIRA |
release | B | 2.5 | 2014-03-04 | Release the current project - updating the POM and tagging in the SCM. | SVN | JIRA |
remote-resources | B | 1.5 | 2013-08-14 | Copy remote resources to the output directory for inclusion in the artifact. | SVN | JIRA |
repository | B | 2.3.1 | 2010-07-21 | Plugin to help with repository-based tasks. | SVN | JIRA |
scm | B | 1.9.1 | 2014-07-20 | Execute SCM commands for the current project. | GIT | JIRA |
scm-publish | B | 1.1 | 2014-05-18 | Publish your Maven website to a scm location. | SVN | JIRA |
stage | B | 1.0-alpha-2 | 2009-07-14 | Assists with release staging and promotion. | SVN | JIRA |
toolchains | B | 1.0 | 2009-11-01 | Allows to share configuration across plugins. | SVN | JIRA |
IDEs | Plugins that simplify integration with integrated developer environments. | |||||
eclipse | B | 2.9 | 2012-02-14 | Generate an Eclipse project file for the current project. | SVN | JIRA |
1. B表示是构建(Build)类型的插件,R表示是报表(Report)类型的。比如surefire-report插件是Report类型的插件用于report单元测试的结果
2. SVN是每个插件在SVN上的源代码,比如compiler插件,它的源代码路径是http://svn.apache.org/repos/asf/maven/plugins/trunk/maven-compiler-plugin
相关推荐
maven学习笔记,包含maven插件,maven的安装,中央仓库,自定义本地仓库等安装方法。
最新maven视频教程加源码笔记,内容完整有保证,是学习maven的不可多得的教程。
simple/ Maven Archtype插件创建了一个与artifactId匹配的目录——simple。这是项目的基础目录。 simple/pom.xml 每个项目在文件pom.xml里有它的项目对象模型 (POM)。这个文件描述了这个项目,配置了插件,...
Maven 构建SpringMVC项目学习笔记 一、背景介绍 二、构建工程 2.1、用maven插件构建项目框架 2.2、完善项目 2.3、将工程变成web工程 三、工程SpringMVC配置 3.1 赋予工程的springmvc特性 3.2、添加Maven依赖 四、...
现在maven插件地址多数不能用了,所以只能讲maven下下来使用,里面有些基本的指令,希望对你们有用
尚硅谷学习笔记+代码,Maven 教程 Maven 是 Apache 软件基金会组织维护的一款专门为 Java 项目提供构建和依赖管理支持的工具 1、构建 Java 项目开发过程中,构建指的是使用 『原材料生产产品』 的过程。 原材料 Java...
包含以下资料: Maven权威指南 Maven2_基础教程 maven2完全使用手册 Maven3实战笔记04Maven的生命周期和插件 Maven实战 Maven学习指南
云的学习笔记-云的学习笔记系统-云的学习笔记系统源码-云的学习笔记管理系统-云的学习笔记管理系统java代码-云的学习笔记系统设计与实现-基于ssm的云的学习笔记系统-基于Web的云的学习笔记系统设计与实现-云的学习...
云的学习笔记-云的学习笔记系统-云的学习笔记系统源码-云的学习笔记管理系统-云的学习笔记管理系统java代码-云的学习笔记系统设计与实现-基于ssm的云的学习笔记系统-基于Web的云的学习笔记系统设计与实现-云的学习...
包含:Maven2_基础教程.pdf\《Maven权威指南》-电子书下载(PDF)(中文)\maven2完全使用手册.docx\Maven3实战笔记04Maven的生命周期和插件.doc\Maven实战.pdf\Maven学习指南.pdf
在网上找了好久,终于找到,给大家分享出来,让大家看到
此文件为exe格式电子书,无需安装任何阅读软件就可以打开,由mybase笔记软件生成。 此电子书详细介绍了项目自动化构建工具Maven的使用,内容清晰简洁明了,易于阅读、理解! 目录: Maven概念 Maven安装 Maven...
云的学习笔记系统代码 java云的学习笔记系统代码 基于SSM的云的学习笔记系统代码 1、云的学习笔记系统的技术栈、环境、工具、软件: ① 系统环境:Windows/Mac ② 开发语言:Java ③ 框架:SSM ④ 架构:B/S、MVC ⑤ ...