What do the Maven coordinates groupId, artifactId and version identify?
Options
- The postal address and contact data of the author
- A unique artifact: its group, its name and its version (Correct option)
- The server where the project runs in production
- The results of the tests of the project's build
Answer
A unique artifact (library or project): who publishes it (group), its name, and which version
Why
Every Maven artifact is identified by GAV: Group, Artifact, Version.
Example: org.springframework.boot : spring-boot-starter-web : 3.3.0.
groupId: usually the reverse domain of the organization (com.acme).artifactId: the name of the library or project.version: the release (1.4.2, or1.5.0-SNAPSHOTfor work in progress).
With these three Maven finds the right file in a repository.
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.17.1</version>
</dependency>Remember
GAV = group + artifact + version.