前言
创作开始时间: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
参考文献
- Guide to naming conventions on groupId, artifactId, and version https://maven.apache.org/guides/mini/guide-naming-conventions.html
- How to Create a New Maven Project in Eclipse https://www.toolsqa.com/java/maven/create-new-maven-project-eclipse/
- https://maven.apache.org/pom.html