mvn

mvn

TLDR

Compile a project

>_ mvn compile
copy

Compile and package the compiled code in its distributable format, such as a jar

>_ mvn package
copy

Compile and package, skipping unit tests

>_ mvn package -Dmaven.test.skip=true
copy

Install the built package in local maven repository. (This will invoke the compile and package commands too)

>_ mvn install
copy

Delete build artifacts from the target directory

>_ mvn clean
copy

Do a clean and then invoke the package phase

>_ mvn clean package
copy

Clean and then package the code with a given build profile

>_ mvn clean -P[profile] package
copy

Run a class with a main method

>_ mvn exec:java -Dexec.mainClass="[com.example.Main]" -Dexec.args="[arg1 arg2]"
copy

Copied to clipboard
free 100$ digital ocean credit