concept Maven repository in category gradle

appears as: Maven repository, Maven repositories, Maven repository
Gradle in Action - corrected 9052019

This is an excerpt from Manning's book Gradle in Action - corrected 9052019.

Maven repositories are among the most commonly used repository types in Java projects. The library is usually represented in the form of a JAR file. The metadata is expressed in XML and describes relevant information about the library and its transitive dependencies, the POM file. Both artifacts are stored in a predefined directory structure in the repository. When you declare a dependency in your build script, its attributes are used to derive the exact location in the repository. The dot character in the group attribute of a dependency indicates a subdirectory in the Maven repository. Figure 5.9 shows how the Cargo Ant dependency attributes are mapped to determine the location of the JAR and POM files in the repository.

Figure 5.9. How a dependency declaration maps to artifacts in a Maven repository

It’s time to publish them to a Maven repository for later consumption. We’ll look at how to publish them to three types of Maven repositories, as shown in figure 14.3:

Figure 14.3. Publishing artifacts to a Maven repository