From 77c8d5c99e56fba898b0b8804e73eaf8d420d7e2 Mon Sep 17 00:00:00 2001 From: Bryan Banz Date: Wed, 22 Oct 2014 12:09:53 -0500 Subject: [PATCH] Enable running maven from a project's subdirectory --- plugins/mvn/mvn.plugin.zsh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/mvn/mvn.plugin.zsh b/plugins/mvn/mvn.plugin.zsh index fc5922587..74b3bee59 100644 --- a/plugins/mvn/mvn.plugin.zsh +++ b/plugins/mvn/mvn.plugin.zsh @@ -39,7 +39,10 @@ mvn-color() echo -ne ${RESET_FORMATTING} ) } - + +# Run mvn against the pom found in a project's root directory (assumes a git repo) +alias mvn!='mvn -f $(git rev-parse --show-toplevel || echo ".")/pom.xml' + # Override the mvn command with the colorized one. #alias mvn="mvn-color"