mvn
Apache Maven. Tool for building and managing Java-based projects. More information: <https://maven.apache.org>.
Install
- All systems
-
curl cmd.cat/mvn.sh
- Debian
-
apt-get install maven2 - Ubuntu
-
apt-get install maven2 -
Alpine
-
apk add maven - Arch Linux
-
pacman -S netbeans - Kali Linux
-
apt-get install maven - CentOS
-
yum install xmvn - Fedora
-
dnf install xmvn-minimal - Windows (WSL2)
-
sudo apt-get updatesudo apt-get install maven2 - OS X
-
brew install xmvn-minimal - Raspbian
-
apt-get install maven2 - Docker
-
docker run cmd.cat/mvn mvnpowered by Commando
Apache Maven. Tool for building and managing Java-based projects. More information: <https://maven.apache.org>.
-
Compile a project:
mvn compile -
Compile and package the compiled code in its distributable format, such as a `jar`:
mvn package -
Compile and package, skipping unit tests:
mvn package -DskipTests -
Install the built package in local maven repository. (This will invoke the compile and package commands too):
mvn install -
Delete build artifacts from the target directory:
mvn clean -
Do a clean and then invoke the package phase:
mvn clean package -
Clean and then package the code with a given build profile:
mvn clean -P profile package -
Run a class with a main method:
mvn exec:java -Dexec.mainClass="com.example.Main" -Dexec.args="argument1 argument2 ..."
© tl;dr; authors and contributors