1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-29 23:24:55 +02:00
tldr/pages/common/mvn.md
K.B.Dharun Krishna 2135714193
pages/*, style-guide: update contents, fix Markdown (#10492)
* pages/*, style-guide: update pages, fix Markdown (commit 1)

* Update pages

* style-guide.de: update page

* Apply suggestions from code review

Co-authored-by: Lena <126529524+acuteenvy@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Lena <126529524+acuteenvy@users.noreply.github.com>

* pip3: remove search command

* rpm: update path placeholder

Co-authored-by: pixel <pixel+github@chrissx.de>

* Update pages/linux/pkgfile.md

Co-authored-by: Lena <126529524+acuteenvy@users.noreply.github.com>

---------

Co-authored-by: Lena <126529524+acuteenvy@users.noreply.github.com>
Co-authored-by: pixel <pixel+github@chrissx.de>
2023-08-26 23:00:06 +05:30

833 B

mvn

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 ...}}"