mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-05-01 04:30:37 +02:00
add alias for mvn clean deploy
This commit is contained in:
parent
73591101b6
commit
718afd8fc6
2 changed files with 16 additions and 14 deletions
|
|
@ -18,6 +18,7 @@ plugins=(... mvn)
|
|||
| `mvncisto` | `mvn clean install -DskipTests --offline` |
|
||||
| `mvne` | `mvn eclipse:eclipse` |
|
||||
| `mvnd` | `mvn deploy` |
|
||||
| `mvncd` | `mvn clean deploy` |
|
||||
| `mvnp` | `mvn package` |
|
||||
| `mvnc` | `mvn clean` |
|
||||
| `mvncom` | `mvn compile` |
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ BACKGROUND_CYAN=`tput setab 6`
|
|||
BACKGROUND_WHITE=`tput setab 7`
|
||||
RESET_FORMATTING=`tput sgr0`
|
||||
|
||||
|
||||
|
||||
# Wrapper function for Maven's mvn command.
|
||||
mvn-color()
|
||||
{
|
||||
|
|
@ -32,12 +32,12 @@ mvn-color()
|
|||
-e "s/\(\[WARNING\]\)\(.*\)/${BOLD}${TEXT_YELLOW}\1${RESET_FORMATTING}\2/g" \
|
||||
-e "s/\(\[ERROR\]\)\(.*\)/${BOLD}${TEXT_RED}\1${RESET_FORMATTING}\2/g" \
|
||||
-e "s/Tests run: \([^,]*\), Failures: \([^,]*\), Errors: \([^,]*\), Skipped: \([^,]*\)/${BOLD}${TEXT_GREEN}Tests run: \1${RESET_FORMATTING}, Failures: ${BOLD}${TEXT_RED}\2${RESET_FORMATTING}, Errors: ${BOLD}${TEXT_RED}\3${RESET_FORMATTING}, Skipped: ${BOLD}${TEXT_YELLOW}\4${RESET_FORMATTING}/g"
|
||||
|
||||
|
||||
# Make sure formatting is reset
|
||||
echo -ne ${RESET_FORMATTING}
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
# Override the mvn command with the colorized one.
|
||||
#alias mvn="mvn-color"
|
||||
|
||||
|
|
@ -49,6 +49,7 @@ alias mvncisto='mvn clean install -DskipTests --offline'
|
|||
alias mvne='mvn eclipse:eclipse'
|
||||
alias mvnce='mvn clean eclipse:clean eclipse:eclipse'
|
||||
alias mvnd='mvn deploy'
|
||||
alias mvncd='mvn clean deploy'
|
||||
alias mvnp='mvn package'
|
||||
alias mvnc='mvn clean'
|
||||
alias mvncom='mvn compile'
|
||||
|
|
@ -56,7 +57,7 @@ alias mvnct='mvn clean test'
|
|||
alias mvnt='mvn test'
|
||||
alias mvnag='mvn archetype:generate'
|
||||
alias mvn-updates='mvn versions:display-dependency-updates'
|
||||
alias mvntc7='mvn tomcat7:run'
|
||||
alias mvntc7='mvn tomcat7:run'
|
||||
alias mvntc='mvn tomcat:run'
|
||||
alias mvnjetty='mvn jetty:run'
|
||||
alias mvndt='mvn dependency:tree'
|
||||
|
|
@ -64,14 +65,14 @@ alias mvns='mvn site'
|
|||
alias mvnsrc='mvn dependency:sources'
|
||||
alias mvndocs='mvn dependency:resolve -Dclassifier=javadoc'
|
||||
|
||||
function listMavenCompletions {
|
||||
function listMavenCompletions {
|
||||
reply=(
|
||||
# common lifecycle
|
||||
clean process-resources compile process-test-resources test-compile test integration-test package verify install deploy site
|
||||
|
||||
|
||||
# common plugins
|
||||
deploy failsafe install site surefire checkstyle javadoc jxr pmd ant antrun archetype assembly dependency enforcer gpg help release repository source eclipse idea jetty cargo jboss tomcat tomcat6 tomcat7 exec versions war ear ejb android scm buildnumber nexus repository sonar license hibernate3 liquibase flyway gwt
|
||||
|
||||
|
||||
# deploy
|
||||
deploy:deploy-file
|
||||
# failsafe
|
||||
|
|
@ -82,7 +83,7 @@ function listMavenCompletions {
|
|||
site:site site:deploy site:run site:stage site:stage-deploy
|
||||
# surefire
|
||||
surefire:test
|
||||
|
||||
|
||||
# checkstyle
|
||||
checkstyle:checkstyle checkstyle:check
|
||||
# javadoc
|
||||
|
|
@ -116,12 +117,12 @@ function listMavenCompletions {
|
|||
repository:bundle-create repository:bundle-pack
|
||||
# source
|
||||
source:aggregate source:jar source:jar-no-fork
|
||||
|
||||
|
||||
# eclipse
|
||||
eclipse:clean eclipse:eclipse
|
||||
# idea
|
||||
idea:clean idea:idea
|
||||
|
||||
|
||||
# jetty
|
||||
jetty:run jetty:run-exploded
|
||||
# cargo
|
||||
|
|
@ -135,7 +136,7 @@ function listMavenCompletions {
|
|||
# tomcat7
|
||||
tomcat7:run tomcat7:run-war tomcat7:run-war-only tomcat7:deploy
|
||||
# tomee
|
||||
tomee:run tomee:run-war tomee:run-war-only tomee:stop tomee:deploy tomee:undeploy
|
||||
tomee:run tomee:run-war tomee:run-war-only tomee:stop tomee:deploy tomee:undeploy
|
||||
# spring-boot
|
||||
spring-boot:run spring-boot:repackage
|
||||
# exec
|
||||
|
|
@ -179,12 +180,12 @@ function listMavenCompletions {
|
|||
# arguments
|
||||
-am -amd -B -C -c -cpu -D -e -emp -ep -f -fae -ff -fn -gs -h -l -N -npr -npu -nsu -o -P -pl -q -rf -s -T -t -U -up -V -v -X
|
||||
|
||||
cli:execute cli:execute-phase
|
||||
archetype:generate generate-sources
|
||||
cli:execute cli:execute-phase
|
||||
archetype:generate generate-sources
|
||||
cobertura:cobertura
|
||||
-Dtest= `if [ -d ./src/test/java ] ; then find ./src/test/java -type f -name '*.java' | grep -v svn | sed 's?.*/\([^/]*\)\..*?-Dtest=\1?' ; fi`
|
||||
-Dit.test= `if [ -d ./src/test/java ] ; then find ./src/test/java -type f -name '*.java' | grep -v svn | sed 's?.*/\([^/]*\)\..*?-Dit.test=\1?' ; fi`
|
||||
);
|
||||
);
|
||||
}
|
||||
|
||||
compctl -K listMavenCompletions mvn
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue