1
0
Fork 0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-11-24 23:00:09 +00:00
ohmyzsh/plugins/mvn
James Zhang a5e706d749
mvn: list modules (directories with pom.xml) (#8478)
Co-authored-by: zhangjinyan1 <zhangjinyan1@guazi.com>
2020-10-09 17:45:30 +02:00
..
mvn.plugin.zsh mvn: list modules (directories with pom.xml) (#8478) 2020-10-09 17:45:30 +02:00
README.md mvn: add Quarkus support in mvn completion (#9037) 2020-10-09 17:42:44 +02:00

mvn plugin

The mvn plugin provides many useful aliases as well as completion for the Apache Maven command (mvn).

Enable it by adding mvn to the plugins array in your zshrc file:

plugins=(... mvn)

Aliases

The plugin aliases mvn to a function that calls mvnw (the Maven Wrapper) if it's found, or the mvn command otherwise.

Alias Command
mvn! mvn -f <root>/pom.xml
mvnag mvn archetype:generate
mvnboot mvn spring-boot:run
mvnqdev mvn quarkus:dev
mvnc mvn clean
mvncd mvn clean deploy
mvnce mvn clean eclipse:clean eclipse:eclipse
mvnci mvn clean install
mvncie mvn clean install eclipse:eclipse
mvncini mvn clean initialize
mvncist mvn clean install -DskipTests
mvncisto mvn clean install -DskipTests --offline
mvncom mvn compile
mvncp mvn clean package
mvnct mvn clean test
mvncv mvn clean verify
mvncvst mvn clean verify -DskipTests
mvnd mvn deploy
mvndocs mvn dependency:resolve -Dclassifier=javadoc
mvndt mvn dependency:tree
mvne mvn eclipse:eclipse
mvnfmt mvn fmt:format
mvnjetty mvn jetty:run
mvnp mvn package
mvns mvn site
mvnsrc mvn dependency:sources
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. You can use it in place of the mvn command. For example: instead of mvn test, use mvn-color test.

Since Maven 3.5.0 the mvn command has colored output, so this function will be soon removed from the plugin.

Known bugs

It has a bug where it will swallow mvn prompts for user input, e.g. when using archetype:generate. See #5052.