Maven - Build Lifecycle
来源:互联网 发布:屠龙大陆翅膀进阶数据 编辑:程序博客网 时间:2024/06/04 01:26
Introduction to the Build Lifecycle
关键点:
Maven is based around the central concept of a build lifecycle. What this means is that the process for building and distributing a particular artifact (project) is clearly defined. thePOM will ensure they get the results they desired.
There are three built-in build lifecycles: default, clean and site.
The default lifecycle handles your project deployment, theclean lifecycle handles project cleaning, while the site lifecycle handles the creation of your project's site documentation.
A Build Lifecycle is Made Up of Phases.
The default lifecycle comprises of the following phases:
- validate - validate the project is correct and all necessary information is available
- compile - compile the source code of the project
- test - test the compiled source code using a suitable unit testing framework. These tests should not require the code be packaged or deployed
- package - take the compiled code and package it in its distributable format, such as a JAR.
- integration-test - process and deploy the package if necessary into an environment where integration tests can be run
- verify - run any checks to verify the package is valid and meets quality criteria
- install - install the package into the local repository, for use as a dependency in other projects locally
- deploy - done in an integration or release environment, copies the final package to the remote repository for sharing with other developers and projects.
A Build Phase is Made Up of Plugin Goals.
A plugin goal represents a specific task. It may be bound to zero or more build phases. A goal not bound to any build phase could be executed outside of the build lifecycle by direct invocation. If a goal is bound to one or more build phases, that goal will be called in all those phases.
A build phase can also have zero or more goals bound to it. If a build phase has no goals bound to it, that build phase will not execute. But if it has one or more goals bound to it, it will execute all those goals.
Setting Up Your Project
Packaging
Set the packaging for your project via the equally named POM element <packaging>.
Setting packaging value means bind default goal to particular phrase.
Some of the valid packaging values are jar, war, ear andpom.
If no packaging value has been specified, it will default to jar.
Particular packaging value represents that particular list of goals to bind to a particular phase.
Some packaging values need to include a particular plugin in the <build> section of your POM and specify<extensions>true</extensions> for that plugin.
Plugins
The second way to add goals to phases is to configure plugins in your project.
- maven build lifecycle
- maven build lifecycle
- Maven - Build Lifecycle
- maven 之 build lifecycle
- maven之 build lifecycle
- maven 的 Build lifecycle
- Maven Build Lifecycle
- 【Maven】Unknown lifecycle phase "build"
- #Maven# Introduction to the Build Lifecycle
- Maven - Introduction to the Build Lifecycle
- Maven: Build lifecycle and Phases and Goals
- maven项目构建出现Unknown lifecycle phase "build".提示解决方法
- Error parsing lifecycle processing instructionspom.xml /xxxxx Maven Project Build Life
- maven default lifecycle
- Maven Lifecycle and Goals
- Maven Plugin And LifeCycle
- Introduction to the Build Lifecycle
- Maven报错 解决方案。ERROR: No goals have been specified for this build. You must specify a valid lifecycle
- 把二元查找树转变成排序的双向链表
- Activity
- nonatomic,assign,copy等的解析与运用时机
- outlook 2013 配置163企业邮箱
- 一次艰难的ASP.NET生成Excel文件的历程总结
- Maven - Build Lifecycle
- 解决jquery插件冲突的问题
- 三++28
- php 网页转 word 文件
- pair类
- Concise,一款为hexo设计的简约而漂亮的主题
- LeetCode 7.Reverse integer
- 编程之美2.1——求二进制数中1的个数
- linux字符设备基本框架--原文地址http://blog.chinaunix.net/uid-25424552-id-3387451.html