<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<!--模型版本-->
<modelVersion>4.0.0</modelVersion>
<!--父项目&子项目-->
<!--子项目的pom ≈ 自己的pom + 父项目的pom-->
<!--如果父子项目对于同一属性中有不同的值,以子项目中的为准-->
<!--父项目的信息-->
<parent>
<!--被继承的父项目的groupId-->
<groupId></groupId>
<!--被继承的父项目的artifactId-->
<artifactId></artifactId>
<!--被继承的父项目的version-->
<version></version>
<!-- 父项目的pom.xml文件的相对路径。默认值是../pom.xml。Maven首先在构建当前项目处寻找,其次在relativePath位置,然后在本地仓库,最后在远程仓库。-->
<relativePath></relativePath>
</parent>
<!--项目组的标识,如果不写,默认与父项目groupId保持一致-->
<groupId></groupId>
<!--项目的标识,通常是项目的名称-->
<artifactId></artifactId>
<!--目前共有三种:pom、jar、war。父级项目一定为pom。默认使用jar方式打包。war打包会把依赖的jar包也打包,部署时使用war,不再需要下载其他依赖。-->
<packaging></packaging>
<!--项目版本-->
<version></version>
<!--项目名称-->
<name></name>
<!--项目主页的URL-->
<url></url>
<!-- 项目的详细描述-->
<description></description>
<!--自定义属性,可使用${abc}在pom中使用-->
<properties>
<abc></abc>
</properties>
<!--项目引入插件所需要的额外依赖-->
<dependencies>
<dependency>
<groupId></groupId>
<artifactId></artifactId>
</dependency>
</dependencies>
<!--dependencyManagement主要用来控制所有子项目依赖的版本号,是当前所有子项目依赖的默认版本号。-->
<!--如果dependencies与dependencyManagement中的依赖版本号不同,则选用dependencies的依赖版本号。-->
<dependencyManagement>
<dependencies>
<dependency>
</dependency>
</dependencies>
</dependencyManagement>
<profiles>
<!--指定build一个project中特定的子modules-->
<profile>
<id>default</id>
<!--默认激活当前配置-->
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<!--需要build的子模块-->
<modules>
<module>a</module>
<module>b</module>
</modules>
</profile>
<!--环境相关-->
<profile>
<!--配置文件名-->
<id>dev</id>
<!--默认激活当前配置-->
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<!--参数设置-->
<properties>
<activatedProperties>dev</activatedProperties>
</properties>
</profile>
</profiles>
<!--构建项目所需要的信息-->
<build>
</build>
</project>