Command-line Options
An overview of the options available while executing maven commands.
About
1. Test Control Options
Skip Tests Execution
-DskipTests
mvn clean install -DskipTests-Dmaven.test.skip=true
-DskipITs or -DskipFailsafeTests
Executing a Specific Test Class
Executing a Specific Test Method in a Class
Executing Multiple Test Classes
2. Profile Settings
Activate Profiles (-P)
3. Configuration Activation
Define System or Project Properties (-D )
4. Debugging Build Issue
Debug Output (-X )
Show Full Stack Traces (-e )
5. Module and Project Selection (Multi-module Projects)
Build Selected Modules (-pl )
Build required Upstream Modules Dependencies (-am )
Prevent building child modules (-N or --non-recursive )
6. Project Structure and Location
Use Alternate POM File (-f )
7. Chaining Phases
8. Download Dependency
Syntax
Download a standard JAR
Download a JAR with a specific packaging
Download a JAR with a classifier (e.g., sources)
Last updated