Creating Maven Projects mvn archetype:create -DgroupId=com._3kbo -DartifactId=application (create a project for building a jar file ) mvn archetype:create -DgroupId=com._3kbo -DartifactId=webapplication -DarchetypeArtifactId=maven-archetype-webapp (create a web app project for building a war file) mvn archetype:generate (Select the number of the desired archetype.) Building, Testing, Packaging and Installing to the Repository mvn clean (cleans the project, i.e. delete the target directory) mvn compile (compiles the source code) mvn test (if required compiles the source code, then runs the unit tests) mvn package (compiles, tests then packages the jar or war file) mvn clean install (cleans the project, compiles, tests, packages and installs the jar or war file) mvn install ...