-h
--help | Display help information |
-P
--activate-profiles <profiles> | Comma-delimited list of profiles to activate |
-V
--show-version | Display version information without stopping build |
-v
--version | Display version information and terminate the Maven process |
-o
--offline | Work offline |
-f <file>
--file <file> | Alternate path for POM file |
-s <file>
--settings <file> | Alternate path for the user settings file |
-gs <file>
--global-settings <file> | Alternate path for the global settings file |
-emp
--encrypt-master-password <password> | Encrypt master security password |
-ep
--encrypt-password <password> | Encrypt server password |
-fae
--fail-at-end | Only fail the build afterwards; allow all non-impacted builds to continue |
-ff
--fail-fast | Stop at first failure in reactorised builds |
-fn
--fail-never | Never fail the build, regardless of project result |
-e
--errors | Produce execution error messages |
-X
--debug | Produce execution debug output |
-q
--quiet | Quiet output - only show errors |
-B
--batch-mode | Run in non-interactive (batch) mode |
-C
--strict-checksums | Fail the build if checksums don’t match |
-c
--lax-checksums | Warn if checksums don’t match |
-U
--update-snapshots | Forces a check for updated releases and snapshots on remote repositories |
-N
--non-recursive | Prevents Maven from building submodules. Only builds the project contained in the current directory. |
-
Skip tests in install or package phase:
mvn clean install -Dmaven.test.skip=true
mvn clean package -Dmaven.test.skip=true
-
Compile the test sources and copy their resources, but skip their execution:
mvn clean install -DskipTests
mvn clean package -DskipTests
-
Use
${env.VARIABLE_NAME}
to get the value of an environment variable. -
Display where is the Maven local repository:
mvn help:evaluate -Dexpression=settings.localRepository
settings.xml
file with the<localRepository>/path/to/local/repo</localRepository>
element. -
Execute some given test classes / test methods
mvn test -Dtest="TanTest,SinTest#checkValue"
-
Execute some given test classes / test methods
mvn test -Dtest="TanTest,SinTest#checkValue"
-
The
-Dvalue=name
parameters are set as system properties and can be retrieve in the Java code usingjava system.getproperty()
.
-
Stop all daemons
mvnd --stop