Multiple repositories

Each Maven project has its own effective POM file. The effective POM file is the aggregated POM file from the application POM, all parent POM files, and the super POM. Finally, what matters to Maven is the effective POM, not the individual ones. Each individual POM file can have its own repositories defined under the repositories section, but in the effective POM file, there will be one single repositories section, which aggregates all the repositories defined in each POM file.

Note

More details about Maven POM files were discussed in Chapter 2, Demystifying Project Object Model.

When you have multiple repositories defined in the POM, the order in which they are defined matters. Whenever Maven detects that a required artifact ...

Get Mastering Apache Maven 3 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.