Question

I know that "mvn clean install" cleans everything that has already been built by maven and rebuilds everything as specified by pom.xml. However, if things have already been installed, and I just run "mvn install", does it reinstall things that already been installed? In other words, does it install things twice or does it only install the additional files that are needed?

Was it helpful?

Solution

mvn clean install tells maven to do the clean phase in each module before running the install phase for each module.

mvn clean is its own build lifecycle phase (which can be thought of as an action or task) in maven.

In Maven terms:

clean is a phase of the clean lifecycle.

install is a phase of the default lifecycle

Licensed under: CC-BY-SA with attribution
scroll top