mvn clean install command

Hello @kdaud as long as i know mvn clean install contains two commands bundled into one.

  1. mvn clean:
    This cleans/deletes all of the downloaded dependence resources as specified in the project’s pom file from the .m2 folder.

  2. mvn install:
    This downloads maven dependencies into the .m2 folder from the internet or from other folders inside the .m2 folder as specified in the pom file.

Hence, there is no need to delete the contents if u run mvn clean install because maven has already done that for you.

3 Likes