Repaso
Español

What do the Maven coordinates groupId, artifactId and version identify?

Options

  1. The postal address and contact data of the author
  2. A unique artifact: its group, its name and its version (Correct option)
  3. The server where the project runs in production
  4. 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, or 1.5.0-SNAPSHOT for 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.

Key terms

Practice this question in Repaso