What is use of enabled(snapshot, releases) tag in maven pom's repository element?

Viewed 18323

When specifying the repository element why we need snapshots and releases as well?

Example:

<repository>
  <id>my-repo</id>
  <url>https://some.url.com/my-repo</url>
  <snapshots>
    <enabled>false/true</enabled>
  </snapshots>
  <releases>
    <enabled>false/true</enabled>
  </releases>
</repository>

How it affects a specific version of the dependency? (1.2.3-SNAPSHOT, 1.2.3, 1.2.3-RELEASE)

When there are multiple repositories, which repository will be searched for the artifact? How the artifacts being resolved?

1 Answers
Related