Removes the target directory where compiled files are stored.
mvn clean
Compiles the source code of the project.
mvn compile
Executes all unit tests.
mvn test
Packages the compiled code into a .jar or .war file inside the target folder.
mvn package
Starts the Spring Boot application directly from the command line.
mvn spring-boot:run
Compiles, tests, and installs the package into your local Maven repository (~/.m2/repository).
mvn install
Speeds up the build process by skipping tests.
mvn clean install -DskipTests
Runs a specific test class.
mvn -Dtest=ClassNameTest test
Builds a documentation site for the project.
mvn site
Forces Maven to update all dependencies from remote repositories.
mvn clean install -U