POM "Project Object Model".它是一个名为pom.xml文件的Maven项目的XML表示形式。在Maven世界中,项目根本不需要包含任何代码,只是一个pom.xml。
- <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
- http://maven.apache.org/xsd/maven-4.0.0.xsd">
- 这个是头文件主要作用是输入时进行提示用的
- <modelVersion>4.0.0</modelVersion> maven2和3用的都是这个版本,相当于maven的版本
- <!-- The Basics -->
- <groupId>...</groupId> 项目组id <groupId>com.sh.mvn</groupId> mvn是工程名
- <artifactId>...</artifactId>项目组中项目的一个唯一的id,即项目名
- <version>...</version> 项目版本比如<version>1.0-SHAPSHOT</version>
- <packaging>...</packaging>
- <dependencies>...</dependencies> 引用的架包
- <parent>...</parent>
- <dependencyManagement>...</dependencyManagement>
- <modules>...</modules>
- <properties>...</properties>
- <!-- Build Settings -->
- <build>...</build>
- <reporting>...</reporting>
- <!-- More Project Information -->
- <name>...</name>
- <description>...</description>
- <url>...</url>
- <inceptionYear>...</inceptionYear>
- <licenses>...</licenses>
- <organization>...</organization>
- <developers>...</developers>
- <contributors>...</contributors>
- <!-- Environment Settings -->
- <issueManagement>...</issueManagement>
- <ciManagement>...</ciManagement>
- <mailingLists>...</mailingLists>
- <scm>...</scm>
- <prerequisites>...</prerequisites>
- <repositories>...</repositories>
- <pluginRepositories>...</pluginRepositories>
- <distributionManagement>...</distributionManagement>
- <profiles>...</profiles>
- </project>