How to package and compile java using maven

How to use maven to quickly compile and package java applications, through the command line mvn command to quickly achieve

In the example we clear the working directory and package the build

I hope to help every developer quickly find the commands they need. Of course, you can also add your own commonly used commands for easy searching.