Back to Ohmyzsh

mvn plugin

plugins/mvn/README.md

latest3.4 KB
Original Source

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:

zsh
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.

AliasCommand
mvn!mvn -f <root>/pom.xml
mvnagmvn archetype:generate
mvnbootmvn spring-boot:run
mvnqdevmvn quarkus:dev
mvncmvn clean
mvncdmvn clean deploy
mvncemvn clean eclipse:clean eclipse:eclipse
mvncimvn clean install
mvnciemvn clean install eclipse:eclipse
mvncinimvn clean initialize
mvncistmvn clean install -DskipTests
mvncistomvn clean install -DskipTests --offline
mvncommvn compile
mvncpmvn clean package
mvnctmvn clean test
mvncvmvn clean verify
mvncvstmvn clean verify -DskipTests
mvnvmvn verify
mvnvstmvn verify -DskipTests
mvndpmvn deploy
mvndocsmvn dependency:resolve -Dclassifier=javadoc
mvndtmvn dependency:tree
mvnemvn eclipse:eclipse
mvnfmtmvn fmt:format
mvnjettymvn jetty:run
mvnpmvn package
mvnsmvn site
mvnsrcmvn dependency:sources
mvntmvn test
mvntcmvn tomcat:run
mvntc7mvn tomcat7:run
mvn-updatesmvn 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.