From 27321265258ce4e0b0c0b1bdb90eb5e72b9b1c29 Mon Sep 17 00:00:00 2001 From: miguelpuyol Date: Sun, 1 Jul 2018 20:42:29 +0200 Subject: Add Spring Boot Run command (#4460) --- plugins/mvn/mvn.plugin.zsh | 2 ++ 1 file changed, 2 insertions(+) (limited to 'plugins/mvn') diff --git a/plugins/mvn/mvn.plugin.zsh b/plugins/mvn/mvn.plugin.zsh index ee6fe2770..d422ba5c7 100644 --- a/plugins/mvn/mvn.plugin.zsh +++ b/plugins/mvn/mvn.plugin.zsh @@ -59,11 +59,13 @@ alias mvn-updates='mvn versions:display-dependency-updates' alias mvntc7='mvn tomcat7:run' alias mvntc='mvn tomcat:run' alias mvnjetty='mvn jetty:run' +alias mvnboot='mvn spring-boot:run' alias mvndt='mvn dependency:tree' alias mvns='mvn site' alias mvnsrc='mvn dependency:sources' alias mvndocs='mvn dependency:resolve -Dclassifier=javadoc' + function listMavenCompletions { reply=( # common lifecycle -- cgit v1.2.3-70-g09d2 From 3cd8eaf9bb1382ff4f35e614904a4f16553e0dcb Mon Sep 17 00:00:00 2001 From: Janosch Schwalm Date: Wed, 29 Aug 2018 21:00:06 +0200 Subject: execute mvnw with "mvn" when mvnw-file is present (#6484) * executing mvnw, when mvnw-file exists indriectly enable autocompletion for mvnw * inform the user :) --- plugins/mvn/mvn.plugin.zsh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'plugins/mvn') diff --git a/plugins/mvn/mvn.plugin.zsh b/plugins/mvn/mvn.plugin.zsh index d422ba5c7..74583c6dc 100644 --- a/plugins/mvn/mvn.plugin.zsh +++ b/plugins/mvn/mvn.plugin.zsh @@ -20,6 +20,15 @@ BACKGROUND_CYAN=$(tput setab 6) BACKGROUND_WHITE=$(tput setab 7) RESET_FORMATTING=$(tput sgr0) +# if found a ./mvnw file execute it otherwise execute orignal mvn +mvn-or-mvnw() { + if [ -f ./mvnw ] ; then + echo "executing mvnw instead of mvn" + ./mvnw "$@"; + else + mvn "$@"; + fi +} # Wrapper function for Maven's mvn command. mvn-color() { @@ -40,6 +49,9 @@ mvn-color() { # Override the mvn command with the colorized one. #alias mvn="mvn-color" +# either use orignal mvn oder the mvn wrapper +alias mvn="mvn-or-mvnw" + # aliases alias mvncie='mvn clean install eclipse:eclipse' alias mvnci='mvn clean install' @@ -276,3 +288,5 @@ function listMavenCompletions { } compctl -K listMavenCompletions mvn +compctl -K listMavenCompletions mvn-or-mvnw + -- cgit v1.2.3-70-g09d2 From 745b6550a6a8415e2c6df0006aad40549c3bc56a Mon Sep 17 00:00:00 2001 From: "Paul N. Baker" Date: Wed, 24 Oct 2018 09:41:05 -0600 Subject: mvn: run mvnw only if executable (#7326) The problem that can occur is ocassionally mvnw will not be executable. This can happen if mvnw is included from an archetype, as unix permissions aren't preserved within the jar they're stored in. Only using mvnw if it exists AND is executable --- plugins/mvn/mvn.plugin.zsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'plugins/mvn') diff --git a/plugins/mvn/mvn.plugin.zsh b/plugins/mvn/mvn.plugin.zsh index 74583c6dc..f367fecce 100644 --- a/plugins/mvn/mvn.plugin.zsh +++ b/plugins/mvn/mvn.plugin.zsh @@ -20,9 +20,9 @@ BACKGROUND_CYAN=$(tput setab 6) BACKGROUND_WHITE=$(tput setab 7) RESET_FORMATTING=$(tput sgr0) -# if found a ./mvnw file execute it otherwise execute orignal mvn +# if found an executable ./mvnw file execute it otherwise execute orignal mvn mvn-or-mvnw() { - if [ -f ./mvnw ] ; then + if [ -x ./mvnw ] ; then echo "executing mvnw instead of mvn" ./mvnw "$@"; else -- cgit v1.2.3-70-g09d2