Java, Maven and Gradle 25 cheatsheet
Java, Maven and Gradle 25: Maven
14 common Java, Maven and Gradle 25 tasks.
Create a Maven project
Generate a project from the quickstart archetype without prompts.
mvn archetype:generate -DgroupId=com.example -DartifactId=demo -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false
Clean and install
Delete target, build, test and install the artifact into your local repository.
mvn clean install
Build with Maven without running tests
Compile and package, skipping test execution.
mvn package -DskipTests
Show the Maven dependency tree
Print dependencies and their transitive dependencies.
mvn dependency:tree
Find dependency updates
List dependencies that have newer versions.
mvn versions:display-dependency-updates
Build one module of many
Build a module and the modules it depends on in a multi-module project.
mvn package -pl api -am
Show the effective POM
Print the POM after inheritance and profiles are applied.
mvn help:effective-pom