Goals

In Maven, there are three main phases of the build process that are commonly used: clean, compile, and package.

  1. clean: This phase removes all previously compiled classes and other generated files from the target directory.

mvn clean
  1. compile: This phase compiles the source code of the project and generates the class files.

mvn compile
  1. package: This phase packages the compiled classes and resources into a distributable format, such as a JAR or WAR file.

mvn package

Last updated