Maven Commands

  • Maven commands start with "mvn" and run tasks based on plugins
  • You can run multiple tasks in one line
  • Some tasks automatically include others
  • Maven output goes to defined places (convention over configuration)
  • mvn clean - Delete build artifacts. Clean Slate
  • mvn compile - Compiles code based on definitions in pom.xml
  • mvn test - Runs automated tests (Depends on plugins. Calls compile if needed)
  • mvn package - Builds a JAR file with your code (available through Spring plugin)

8 / 19