mavenmvn-repomaven-lifecyclemaven-clean-plugin

What is the difference between mvn pre-clean / clean / post-clean?


what is the difference between these 3 commands: mvn pre-clean / clean / post-clean? Pre and post are unusual to be used. We go straight forward with mvn clean but why?


Solution

  • In the default lifecycle bindings, pre-clean and post-clean are empty phases. So calling pre-clean will do nothing and calling post-clean will be the same as clean.

    You could, of course, bind goals to theses phases and then use them.