12. Maven-plugin 设置和常见命令详解
核心 Plugin
Clean Plugin
The Clean Plugin is used when you want to remove files generated at build-time in a project’s directory.
跳过 Clean
1 | mvn clean -Dmaven.clean.skip=true |
Resources Plugin
Compiler Plugin
[JDK 1.8 及之前] Setting the -source and -target of the Java Compiler
11. Maven-lifecycles 和 plugin 简介
Maven 构建生命周期定义了一个项目构建跟发布的过程。
Maven defines 3 lifecycles in META-INF/plexus/components.xml。
一个典型的 Maven 构建(build)生命周期是由以下几个阶段的序列组成的:

为了完成 default 生命周期,这些阶段(包括其他未在上面罗列的生命周期阶段)将被按顺序地执行。
Maven 有以下三个标准的生命周期:
- clean:项目清理的处理
- default(或 build):项目部署的处理
- site:项目站点文档创建的处理
10. Maven-pom 中配置依赖机制
09. Maven-个性化 pom 文件
pom.xml 简版
1 | <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
pom.xml 标签详解
1 | <project |
参考
maven 坐标 Dependencies 和 Exclusions 详解_eff666 的博客-CSDN 博客_exclusions https://blog.csdn.net/eff666/article/details/51991465