Run Maven from another directory:
mvn -f tutorials/pom.xml clean verify
Run JAR application via exec-maven-plugin:
mvn exec:java
Run Spring application:
mvn clean spring-boot:run
-
run unit tests
mvn clean test
-
run unit and integration tests
mvn clean verify
-
generate Surefire report
mvn surefire-report:report-only
-
generate both reports
mvn surefire-report:report-only surefire-report:failsafe-report-only
-
build projects without testing and generate sources
mvn -Dmaven.test.skip=true clean source:jar install
-
build test artifacts
mvn clean test-compile jar:test-jar install
mvn archetype:generate -DgroupId=com.{group}.app -DartifactId={App Name} -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false
-
update pom.xml - see: https://stackoverflow.com/questions/574594/how-can-i-create-an-executable-jar-with-dependencies-using-maven
-
run
mvn clean compile assembly:single
mvn dependency:sources dependency:resolve -Dclassifier=javadoc
-
Generate dependency tree
mvn dependency:list | grep log4j mvn dependency:tree -Dverbose >dependency-tree.txt
-
Generate effective pom
mvn help:effective-pom
-
Generate list of used plugins
mvn help:effective-pom -Doutput=effective-pom.xml grep "<plugin>" -A 3 effective-pom.xml
Generate report
mvn jacoco:report
Generate report
mvn dependency-check:aggregate
Generate JavaDoc documentation:
mvn javadoc:javadoc
See also: