0a5e69b87eef354e96d8995b786082de7f67c082

Author
Bryan Banz <bryan.banz@firemon.com>
Committer
Marc Cornellà <marc.cornella@live.com>
Date

Message

mvn: add alias to run maven from a project's subdirectory

Diff

 1diff --git a/plugins/mvn/mvn.plugin.zsh b/plugins/mvn/mvn.plugin.zsh
 2index f4c46bfa1556a1821f368725bdd20d5c342aab90..7dd3c98dd2a82237b05442a4a260d72a9e116ba4 100644
 3--- a/plugins/mvn/mvn.plugin.zsh
 4+++ b/plugins/mvn/mvn.plugin.zsh
 5@@ -54,6 +54,9 @@ mvn-color() {
 6 # either use orignal mvn oder the mvn wrapper
 7 alias mvn="mvn-or-mvnw"
 8 
 9+# Run mvn against the pom found in a project's root directory (assumes a git repo)
10+alias 'mvn!'='mvn -f $(git rev-parse --show-toplevel 2>/dev/null || echo ".")/pom.xml'
11+
12 # aliases
13 alias mvncini='mvn clean initialize'
14 alias mvncie='mvn clean install eclipse:eclipse'