2016-05-12 19:41:29 +08:00
|
|
|
## Introduction
|
2016-01-11 02:26:50 +08:00
|
|
|
|
2016-05-12 19:41:29 +08:00
|
|
|
The [mvn plugin](https://github.com/robbyrussell/oh-my-zsh/tree/master/plugins/mvn) provides many
|
|
|
|
[useful aliases](#aliases) as well as completion for the `mvn` command.
|
2016-01-11 02:26:50 +08:00
|
|
|
|
2016-05-12 19:41:29 +08:00
|
|
|
Enable it by adding `mvn` to the plugins array in your zshrc file:
|
|
|
|
```zsh
|
|
|
|
plugins=(... mvn)
|
|
|
|
```
|
2016-01-11 02:26:50 +08:00
|
|
|
|
|
|
|
## Aliases
|
|
|
|
|
2019-02-18 01:50:46 +08:00
|
|
|
The plugin aliases mvn to a either calls `mvnw` ([Maven Wrapper](https://github.com/takari/maven-wrapper))
|
|
|
|
if it's found, or the mvn command otherwise.
|
|
|
|
|
2016-05-12 19:41:29 +08:00
|
|
|
| Alias | Command |
|
|
|
|
|:---------------------|:------------------------------------------------|
|
2019-02-18 01:50:46 +08:00
|
|
|
| `mvn!` | `mvn -f <root>/pom.xml` |
|
|
|
|
| `mvnag` | `mvn archetype:generate` |
|
|
|
|
| `mvnboot` | `mvn spring-boot:run` |
|
|
|
|
| `mvnc` | `mvn clean` |
|
|
|
|
| `mvncd` | `mvn clean deploy` |
|
|
|
|
| `mvnce` | `mvn clean eclipse:clean eclipse:eclipse` |
|
2016-05-12 19:41:29 +08:00
|
|
|
| `mvnci` | `mvn clean install` |
|
2019-02-18 01:50:46 +08:00
|
|
|
| `mvncie` | `mvn clean install eclipse:eclipse` |
|
|
|
|
| `mvncini` | `mvn clean initialize` |
|
2016-05-12 19:41:29 +08:00
|
|
|
| `mvncist` | `mvn clean install -DskipTests` |
|
2016-06-15 11:42:48 +08:00
|
|
|
| `mvncisto` | `mvn clean install -DskipTests --offline` |
|
2016-05-12 19:41:29 +08:00
|
|
|
| `mvncom` | `mvn compile` |
|
2019-02-18 01:50:46 +08:00
|
|
|
| `mvncp` | `mvn clean package` |
|
2016-05-12 19:41:29 +08:00
|
|
|
| `mvnct` | `mvn clean test` |
|
2019-02-18 01:50:46 +08:00
|
|
|
| `mvncv` | `mvn clean verify` |
|
|
|
|
| `mvncvst` | `mvn clean verify -DskipTests` |
|
|
|
|
| `mvnd` | `mvn deploy` |
|
|
|
|
| `mvndocs` | `mvn dependency:resolve -Dclassifier=javadoc` |
|
2016-05-12 19:41:29 +08:00
|
|
|
| `mvndt` | `mvn dependency:tree` |
|
2019-02-18 01:50:46 +08:00
|
|
|
| `mvne` | `mvn eclipse:eclipse` |
|
|
|
|
| `mvnjetty` | `mvn jetty:run` |
|
|
|
|
| `mvnp` | `mvn package` |
|
2016-05-12 19:41:29 +08:00
|
|
|
| `mvns` | `mvn site` |
|
|
|
|
| `mvnsrc` | `mvn dependency:sources` |
|
2019-02-18 01:50:46 +08:00
|
|
|
| `mvnt` | `mvn test` |
|
|
|
|
| `mvntc` | `mvn tomcat:run` |
|
|
|
|
| `mvntc7` | `mvn tomcat7:run` |
|
|
|
|
| `mvn-updates` | `mvn versions:display-dependency-updates` |
|
|
|
|
|
|
|
|
## mvn-color
|
|
|
|
|
|
|
|
It's a function that wraps the mvn command to colorize it's output. Since Maven 3.5.0
|
|
|
|
the mvn command adds colored output, so this function will be soon removed from the
|
|
|
|
plugin.
|
|
|
|
|
|
|
|
It also has a bug where it won't print when mvn prompts for user input, _e.g._ when
|
|
|
|
using `archetype:generate`. See [#5052](https://github.com/robbyrussell/oh-my-zsh/issues/5052).
|