One of the compelling reasons to use Maven is that it makes
the process of tracking down dependencies (and dependencies
of dependencies) very easy. When a project depends on an artifact of
another project, we can say that this artifact is a dependency. In the
case of a Java project, this can be as simple as a project depending
on an external dependency such as Log4J or JUnit. Although
dependencies can model external dependencies, they can also manage the
dependencies between a set of related projects; if
project-a depends on
Maven is smart enough to know that
be built before
Relationships are not only about dependencies and figuring out what one project needs to be able to build an artifact. Maven can model the relationship of a project to a parent, and the relationship of a project to submodules. This section gives an overview of the various relationships between projects and how such relationships are configured.
Coordinates define a unique location for a project. They
were first introduced in Chapter 3. Projects are related to one another
using Maven coordinates.
project-a doesn’t just
project-b; a project with a
version depends on another project with a
version. To review, a Maven coordinate is
made up of three components:
groupId groups a set of
related artifacts. Group identifiers generally resemble a Java package name. For example, ...