How is “mvn clean install” different from “mvn install”?

前端 未结 5 949
名媛妹妹
名媛妹妹 2020-11-28 02:03

What is the difference between mvn clean install and mvn install?

5条回答
  •  野性不改
    2020-11-28 02:35

    You can call more than one target goal with maven. mvn clean install calls clean first, then install. You have to clean manually, because clean is not a standard target goal and not executed automatically on every install.

    clean removes the target folder - it deletes all class files, the java docs, the jars, reports and so on. If you don't clean, then maven will only "do what has to be done", like it won't compile classes when the corresponding source files haven't changed (in brief).

    we call it target in ant and goal in maven

提交回复
热议问题