Guide to naming conventions on groupId, artifactId and version
groupId will identify your project uniquely across all projects, so we need to enforce a naming schema. It has to follow the package name rules, what means that has to be at least as a domain name you control, and you can create as many subgroups as you want. Look at More information about package names.
eg. org.apache.maven, org.apache.commons

A good way to determine the granularity of the groupId is to use the project structure. That is, if the current project is a multiple module project, it should append a new identifier to the parent's groupId.

eg. org.apache.maven, org.apache.maven.plugins, org.apache.maven.reporting

artifactId is the name of the jar without version. If you created it then you can choose whatever name you want with lowercase letters and no strange symbols. If it's a third party jar you have to take the name of the jar as it's distributed.
eg. maven, commons-math

version if you distribute it then you can choose any typical version with numbers and dots (1.0, 1.1, 1.0.1, ...). Don't use dates as they are usually associated with SNAPSHOT (nightly) builds. If it's a third party artifact, you have to use their version number whatever it is, and as strange as it can look.
eg. 2.0, 2.0.1, 1.3.1

以上内容是maven官网文档中的,命名约定指南(https://maven.apache.org/guides/mini/guide-naming-conventions.html)

总的来说:
groupId:定义当前Maven项目隶属的实际项目,例如org.sonatype.nexus,此id前半部分org.sonatype代表此项目隶属的组织或公司,后部分代表项目的名称,如果此项目多模块话开发的话就子模块可以分为org.sonatype.nexus.plugins和org.sonatype.nexus.utils等。

特别注意的是groupId不应该对应项目隶属的组织或公司,也就是说groupId不能只有org.sonatype而没有nexus。

例如:我建立一个项目,此项目是此后所有项目的一个总的平台,那么groupId应该是org.limingming.projectName,projectName是平台的名称,org.limingming是代表我个人的组织,如果以我所在的浪潮集团来说的话就应该是com.inspur.loushang。

artifactId是构件ID,该元素定义实际项目中的一个Maven项目或者是子模块,如上面官方约定中所说,构建名称必须小写字母,没有其他的特殊字符,推荐使用“实际项目名称-模块名称”的方式定义,例如:spirng-mvn、spring-core等。
推荐格式:使用实际项目名称作为artifactId的前缀,紧接着为模块名称
举例:nexus-indexer、spring-mvc、hibernate-c3po……这些id都是以实际项目名称作为前缀,然后接着一个中划线,再紧跟项目的模块名称,默认情况下maven会在artifactId添加version作为最后生成的名称。例如:spirng-mvn-2.0.0.jar

最新文章

  1. C#设计模式:原型模式(Prototype)及深拷贝、浅拷贝
  2. 《Javascript设计模式》笔记一js的表现力
  3. C/C++ 文件操作
  4. 慎重别选择到"僵尸"软件
  5. 51nod 1109 01组成的N的倍数
  6. JAVA对象是如何占用内存的
  7. WINDOWS 2008 SERVER域用户自动登陆
  8. 速卖通---发布商品aeopAeProductPropertys这个字段值报07004013的错误
  9. poj 1150 The Last Non-zero Digit
  10. JavaScript对象的深浅复制
  11. Angular 学习笔记 ( 链接服务器 )
  12. ASP.NET Core 2 学习笔记(一)
  13. R语言绘制茎叶图
  14. JConsole & JVisualVM远程监视Websphere服务器JVM的配置方法
  15. 【BZOJ-4016】最短路径树问题 Dijkstra + 点分治
  16. C#多线程编程之:异步事件调用
  17. Python运维开发基础03-语法基础
  18. FreeRTOS 临界段和开关中断
  19. ios学习--结合UIImageView实现图片的移动和缩放
  20. TP5.1 查看具体版本

热门文章

  1. python开发--Python实现延时操作的几种方式
  2. 【转】Redis哨兵(Sentinel)模式
  3. json 格式化处理工具
  4. 工控随笔_C#连接PLC_之_C#入门_02_程序性结构和注释
  5. FFmpeg 的bug
  6. maven更改本地的maven私服
  7. CSS继承控制:inherit、initial和unset
  8. WeQuant教程—1.3 利用回测工具降低交易风险
  9. liunx 定时任务工具 cron crontab
  10. Arch Linux 启用 MTU 探测