mirror of
https://github.com/tldr-pages/tldr.git
synced 2024-09-21 08:48:13 +03:00
mvn: add page (#1711)
This commit is contained in:
commit
1094158e50
36
pages/common/mvn.md
Normal file
36
pages/common/mvn.md
Normal file
@ -0,0 +1,36 @@
|
||||
# mvn
|
||||
|
||||
> Apache Maven.
|
||||
> Tool for building and managing Java-based projects.
|
||||
|
||||
- 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 -Dmaven.test.skip=true`
|
||||
|
||||
- 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 folder:
|
||||
|
||||
`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="{{arg1 arg2}}"`
|
Loading…
Reference in New Issue
Block a user