...

Mobile App Development - Maven

Back to Course

Lesson Description


Lession - #409 Maven Clean Lifecycle


The simplest lifecycle in Maven is Clean Lifecycle. Running mvn clean summons the clean lifecycle which comprises of three lifecycle stages:

pre-clean
clean
post-clean

The interesting stage with regards to the clean lifecycle is the clean phase. The Clean module's perfect objective (clean:clean>
is bound to the spotless stage in the clean lifecycle. The clean:clean objective erases the result of a form by erasing the form catalog. On the off chance that you haven't redone the area of the form registry it will be the ${basedir}/target index as characterized by the Super POM. At the point when you execute the clean:clean objective you don't do as such by executing the objective straightforwardly with mvn clean:clean, you do as such by executing the spotless period of the clean lifecycle. Executing the perfect stage offers Maven a chance to execute whatever other objectives which might be bound to the pre-clean stage.

For instance, assume you needed to set off an antrun:run objective errand to repeat a notice on pre-clean, or to make a document of a venture's construct index before it is erased. Essentially running the clean:clean objective won't execute the lifecycle by any means, yet indicating the perfect stage will utilize the clean lifecycle and advance through the three lifecycle stages until it arrives at the spotless stage.

Clean life cycle