Maven common command

create a new project

  • mvn archetype:generate -DgroupId={project-packaging} -DartifactId={project-name} -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false (The groupId is the name space, for example com.autofei. The artifactId is the project name)
  • mvn eclipse:eclipse (convert maven project into eclipse project)
  • mvn package (create jar file)
  • java -cp target/{jar-name} {main-class-name}

create a new web project

  • mvn archetype:generate -DgroupId={project-packaging} -DartifactId={project-name} -DarchetypeArtifactId=maven-archetype-webapp -DinteractiveMode=false
  • mvn eclipse:eclipse -Dwtpversion=2.0 (convert maven project into eclipse web project)
  • mvn package
  • deploy war file into container

list all template: mvn archetype:generate

run compile: mvn compile

run liquibase: mvn -P update-db process-resources

run install with multi threads: mvn clean -Dmaven.test.skip=true install -T 16

run gwt: mvn clean -Pgwt-dev-auto -Dmaven.test.skip=true install -T 16