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