maven项目的命名规则(groupId, artifactId, and version)

前言

创作开始时间:2021年7月29日21:58:10

如题。在此记录maven项目的命名规则(含groupId, artifactId, and version)。

groupId

groupId可以理解为你们开发小组的标识,
其和java package的命名规则一样。一般来说不是单个词,通常是多个词。

示例:
org.apache.maven
org.apache.commons

artifactId

artifactId是你项目打出来的jar包的名字。所以命名一般代表这个项目要干什么。

比如:
maven
commons-math

version

version 就是版本号,比如:
0.1.1
0.1.1-SNAPSHOT

name

此外,在eclipse新建maven项目的时候,还有个name选项。

这里同artifactId即可。

name: Projects tend to have conversational names, beyond the artifactId. The Sun engineers did not refer to their project as “java-1.5”, but rather just called it “Tiger”. Here is where to set that value.

小结

创作结束时间:2021年7月29日22:02:18

参考文献

  1. Guide to naming conventions on groupId, artifactId, and version https://maven.apache.org/guides/mini/guide-naming-conventions.html
  2. How to Create a New Maven Project in Eclipse https://www.toolsqa.com/java/maven/create-new-maven-project-eclipse/
  3. https://maven.apache.org/pom.html
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值