I am just learning maven, and we have recently needed to go more and more. I would like to know the difference between
mvn clean installmvn releasemvn deploy
Please be as descriptive as possible.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The
clean,installanddeployphases are valid lifecycle phases and invoking them will trigger all the phases preceding them, and the goals bound to these phases.This command invokes the
cleanphase and then theinstallphase sequentially:clean: removes files generated at build-time in a project’s directory (targetby default)install: installs the package into the local repository, for use as a dependency in other projects locally.This command invokes the
deployphase:deploy: copies the final package to the remote repository for sharing with other developers and projects.This is not a valid phase nor a goal so this won’t do anything. But if refers to the Maven Release Plugin that is used to automate release management. Releasing a project is done in two steps:
prepareandperform. As documented:And then:
See also