<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...>
<!--指定了当前pom版本-->
<modelVersion>4.0.0</modelVersion>
<groupId>反写的公司网址+项目名</groupId>
<artifactId>项目名+模块名</artifactId>
<version>大版本号.分支版本号.小版本号+版本(如0.0.1snapshot)</version>
<!--打包方式,默认是jar
还可以是war,zip,pom-->
<packaging></packaging>
<!--项目描述名-->
<name></name>
<url>项目地址</url>
<description>项目描述</description>
<developers>开发人员列表</developers>
<licenses>许可证信息</licenses>
<organization>组织信息</organization>
<!--依赖项-->
<dependencies>
<dependency>
<groupId></groupId>
<artifactId></artifactId>
<version></version>
<type></type>
<!--与3种classpath关系:编译、测试、运行
scope有6种:
compile,默认,编译测试运行都有效
provided,编译和测试有效
runtime,测试和运行有效
test,
system,与本机系统向关联,可移植性差,编译和测试有效
import,只使用在dependencyManagement中
-->
<scope>依赖范围</scope>
<!--设置依赖是否可选,默认false-->
<optional>true/false</optional>
<!--排除依赖传递列表-->
<exclusions>
<exclusion></exclusion>
</exclusions>
</dependency>
</dependencies>
<!--依赖的管理-->
<dependencyManagement>
<dependency></dependency>
</dependencyManagement>
<build>
<!--插件列表-->
<plugins>
<plugin>
<groupId></groupId>
<artifactId></artifactId>
<version></version>
</plugin>
</plugins>
</build>
<!--子模块中pom对父模块的继承-->
<parent></parent>
<!--聚合多个maven项目-->
<modules>
<module></module>
</modules>
</project>
网友评论