Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

In Maven, the "targets" are really the names of a phase of one of the maven lifecycles. There are three Maven lifecycles: default, clean, and site.

When a user invokes a Make target (or targets), Make uses the timestamps of dependent artifacts to decide which previous targets need to be rebuilt prior to building the requested target(s). In maven, the user invokes a phase name (or names), and Maven runs all previous build phases that belong to the same lifecycle as the invoked phase(s).

A typical Make invocation might look like this:

No Format

$ make clean && make all

A typical Maven-2.x invocation might look like this:

No Format

$ mvn clean install

Users and developers familiar with the conventional Make target install might cringe at that mvn invocation, but the install phase in Maven is not at all like the target by that name typically found in a Makefile. In fact, Maven does not have a build phase that maps to the functionality typically performed by make install, and I have never seen such functionality kludged into a Maven build.