mvn-package

builds the project and creates a distributable package

TLDR

Build package
$ mvn package
Build skipping tests
$ mvn package -DskipTests
Build with profile
$ mvn package -P [production]
Build clean package
$ mvn clean package

SYNOPSIS

mvn package [options]

DESCRIPTION

mvn package builds the project and creates a distributable package (JAR, WAR, etc.). Executes compile, test, and package phases. Output goes to target/ directory.

PARAMETERS

-DskipTests

Skip test execution.
-Dmaven.test.skip
Skip test compilation and execution.
-P profile
Activate profile.
-o
Work offline.
-T threads
Parallel builds.

INSTALL

sudo dnf install maven
sudo pacman -S maven
sudo apk add maven
sudo zypper install maven
brew install maven
nix profile install nixpkgs#maven

SEE ALSO

mvn(1), mvn-install(1), mvn-compile(1)