maven笔记(3)

项目管理利器(Maven)——Pom.xml解析

<name>项目的描述名</name> 
<url>项目的地址</url> 
<description>项目描述</description> 
<developers>开发人员信息</developers> 
<licenses>许可证信息</licenses> 

<!-- 依赖列表 -->
<dependencies>
<!-- 依赖项 -->
<dependency>
<!-- 坐标 -->
<groupId></groupId>
<artifactId></artifactId>
<version></version>
<type></type>
<scope>依赖的范围</scope>(只在依赖的范围内有用,PS:junit如果此处为test,则只在测试的依赖范围内有用,如在主代码引用junit类则报错)
<optional>设置依赖是否可选,默认是false(子项依赖继承),如为true子项必须显示引入该依赖</optional>
<!-- 排除依赖传递列表 -->
<exclusions>
<exclusion></exclusion>
</exclusions>
</dependency>
</dependencies>

<!-- 依赖的管理,并不会被运行(不会引用到实际的依赖),一般定义在父模块中,由子模块去继承 -->
<dependencyManagement>
<dependencies>
<dependency></dependency>
</dependencies>
</dependencyManagement>

<!-- 对构建行为提供相应的支持 -->
<build>
<!-- 插件列表 -->
<plugins>
<plugin>
<!-- 指定坐标 -->
<groupId></groupId>
<artifactId></artifactId>
<version></version>
</plugin>
</plugins>
</build>
<!-- 一般在子模块中指定所继承的父模块 -->
<parent></parent>

<!-- 模块列表 -->
<modules>
<module></module>
</modules>

原文地址:https://www.cnblogs.com/YangJavaer/p/5792133.html