groupId
The groupId uniquely identifies your project across all projects and should follow the Java package naming rules. This means it starts with a reversed domain name that you control. For example, org.apache.maven
, org.apache.commons
.
While Maven doesn’t strictly enforce this rule, many traditional projects don’t adhere to this convention and use single-word IDs instead. However, new single-word IDs will find it challenging to be approved for inclusion in the Maven Central repository.
You can create as many subgroups as needed. Using the project structure is a good way to determine the granularity of the groupId
. That is, if the current project is a multi-module project, you should append a new identifier to the parent project’s groupId
. For example, org.apache.maven
, org.apache.maven.plugins
, org.apache.maven.reporting
.
artifactId
The artifactId is the name of the jar file without the version. If it’s something you’ve created, you can choose any name you like (lowercase letters, no strange symbols). However, if it’s a third-party jar, you must use the distributed jar’s name. For example, maven
, commons-math
.
version
If you’re releasing a version, you can choose any typical version with numbers and dots (1.0, 1.1, 1.0.1…). Avoid using dates as they’re usually associated with SNAPSHOT (nightly) versions. However, for third-party tools, you must use their version number, whatever it may be, even if it looks odd. For example, 2.0
, 2.0.1
, 1.3.1
.