maven学习

来源:互联网 发布:mac怎么设置鼠标右键 编辑:程序博客网 时间:2024/05/18 22:39

1、创建一个POM之前,我们应该先决定项目组(groupId),它的名字(artifactId)和它的版本,因为这些属性在仓库中的唯一标识项目的帮助

  • 所有的 POM 文件要求的项目元素和三个必填字段: groupId,artifactId,version。

  • 在库中的项目符号是:groupId:artifactId:version.

  • 根元素 pom.xml是项目,它有三个主要的子节点:

节点描述

groupId     This is an Id of project's group. This is generally unique amongst an organization or a project. For example, a banking group com.company.bank has all bank related projects.

artifactId    This is an Id of the project.This is generally name of the project. For example, consumer-banking. Along with the groupId, the artifactId defines the artifact's location within the repository.versionThis is the version of the project.Along with the 

groupId,     It is used within an artifact's repository to separate versions from each other. For example: 

 com.company.bank:consumer-banking:1.0

com.company.bank:consumer-banking:1.1.



0 0