http://maven.apache.org/guides/mini/guide-naming-conventions.html
确定是否是多模块
如果是单模块
com.zno2.项目名
如果是多模块
com.zno2.项目名.模块1
com.zno2.项目名.模块2
以人为镜
apache.org
项目:maven
类型:多模块
<parent> <groupId>org.apache.maven</groupId> <artifactId>maven-parent</artifactId> <version>27</version> <relativePath>../pom/maven/pom.xml</relativePath> </parent> <artifactId>maven</artifactId> <version>3.5.3-SNAPSHOT</version> <packaging>pom</packaging> <modules> <!-- package org.apache.maven.plugin; --> <module>maven-plugin-api</module> <!-- package org.apache.maven.building; --> <module>maven-builder-support</module> <!-- package org.apache.maven.model; --> <module>maven-model</module> <!-- package org.apache.maven.model.XXXX; --> <module>maven-model-builder</module> <!-- package org.apache.maven; --> <module>maven-core</module> <!-- package org.apache.maven.settings; --> <module>maven-settings</module> <!-- package org.apache.maven.settings.building; --> <module>maven-settings-builder</module> <!-- package org.apache.maven.artifact; --> <module>maven-artifact</module> <!-- package org.apache.maven.repository.internal; --> <module>maven-resolver-provider</module> <module>maven-repository-metadata</module> <module>maven-slf4j-provider</module> <module>maven-embedder</module> <module>maven-compat</module> <module>apache-maven</module> </modules>
spring.io https://github.com/spring-projects/spring-framework
项目:Spring Framework
类型:多模块
<!-- 包:org.springframework.web --> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-webmvc</artifactId> <version>4.3.3.RELEASE</version> </dependency>
<!-- 包:org.springframework.test --> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-test</artifactId> <version>4.3.3.RELEASE</version> <scope>test</scope> </dependency>
junit.org
项目:junit
类型:单模块
<!-- 包:org.junit --> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.12</version> <scope>test</scope> </dependency>
可以明得失
通常 groupId 是域名反置
项目名或模块名一般都要带着组织 比如 spring-jdbc ,而对应的package 一般是 把 - 换成 .
如何起一个好的项目名呢? spring 、java 、shiro 、ant 、docker
我的项目名是什么? bigdog
bigdog-bas (base utils)
bigdog-jds ( java data sources)
bigdog-ent (entities )
bigdog-srv (service ① rpc ② 非rpc)
bigdog-mgr (management 接入三方api)
标签:bigdog,项目,spring,约定,maven,模块,命名,org From: https://www.cnblogs.com/zno2/p/8409080.html