Maven Commands
Java build and dependency tool.All Maven pages
- mvn archetype:generate: create a new Maven project from the command linemvn archetype:generate with maven-archetype-quickstart creates a new Maven project non-interactively. Parameters, common archetypes, Java version and pitfalls.
- mvn dependency:tree: show the Maven dependency tree and find conflictsmvn dependency:tree prints every direct and transitive dependency of a Maven project. Filter it with -Dincludes, show conflicts with -Dverbose, save to a file.
- mvn test -Dtest=MyTest: run a single test class or method with Mavenmvn test -Dtest=MyTest runs one test class and -Dtest=MyTest#method one method with Surefire. Patterns, exclusions, multi-module builds and integration tests.
- mvn versions:display-dependency-updates: check for newer Maven dependenciesmvn versions:display-dependency-updates lists Maven dependencies with newer versions, read-only. Plugin and property updates, goals that rewrite the POM.