Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Ohmyzsh
Commits
424b2476
Unverified
Commit
424b2476
authored
Feb 17, 2019
by
Marc Cornellà
Committed by
GitHub
Feb 17, 2019
Browse files
Merge pull request #7599 from mcornella/plugin/mvn-refactor
mvn: unify changes, refactor and cleanup
parents
c5272bdd
0e647904
Changes
2
Hide whitespace changes
Inline
Side-by-side
plugins/mvn/README.md
View file @
424b2476
#
#
Introductio
n
#
mvn plugi
n
The
[
mvn plugin
](
https://github.com/robbyrussell/oh-my-zsh/tree/master/plugins/mvn
)
provides many
The mvn plugin
provides many
[
useful aliases
](
#aliases
)
as well as completion for
[
useful aliases
](
#aliases
)
as well as completion for the
`mvn`
command
.
the
[
Apache Maven
](
https://maven.apache.org/
)
command (
`mvn`
)
.
Enable it by adding
`mvn`
to the plugins array in your zshrc file:
Enable it by adding
`mvn`
to the plugins array in your zshrc file:
```
zsh
```
zsh
...
@@ -10,25 +10,49 @@ plugins=(... mvn)
...
@@ -10,25 +10,49 @@ plugins=(... mvn)
## Aliases
## Aliases
The plugin aliases mvn to a function that calls
`mvnw`
(the
[
Maven Wrapper
](
https://github.com/takari/maven-wrapper
)
)
if it's found, or the mvn command otherwise.
| Alias | Command |
| Alias | Command |
|:---------------------|:------------------------------------------------|
|:---------------------|:------------------------------------------------|
|
`mvncie`
|
`mvn clean install eclipse:eclipse`
|
|
`mvn!`
|
`mvn -f <root>/pom.xml`
|
|
`mvnag`
|
`mvn archetype:generate`
|
|
`mvnboot`
|
`mvn spring-boot:run`
|
|
`mvnc`
|
`mvn clean`
|
|
`mvncd`
|
`mvn clean deploy`
|
|
`mvnce`
|
`mvn clean eclipse:clean eclipse:eclipse`
|
|
`mvnci`
|
`mvn clean install`
|
|
`mvnci`
|
`mvn clean install`
|
|
`mvncie`
|
`mvn clean install eclipse:eclipse`
|
|
`mvncini`
|
`mvn clean initialize`
|
|
`mvncist`
|
`mvn clean install -DskipTests`
|
|
`mvncist`
|
`mvn clean install -DskipTests`
|
|
`mvncisto`
|
`mvn clean install -DskipTests --offline`
|
|
`mvncisto`
|
`mvn clean install -DskipTests --offline`
|
|
`mvne`
|
`mvn eclipse:eclipse`
|
|
`mvncv`
|
`mvn clean verify`
|
|
`mvnd`
|
`mvn deploy`
|
|
`mvnp`
|
`mvn package`
|
|
`mvnc`
|
`mvn clean`
|
|
`mvncom`
|
`mvn compile`
|
|
`mvncom`
|
`mvn compile`
|
|
`mvncp`
|
`mvn clean package`
|
|
`mvnct`
|
`mvn clean test`
|
|
`mvnct`
|
`mvn clean test`
|
|
`mvnt`
|
`mvn test`
|
|
`mvncv`
|
`mvn clean verify`
|
|
`mvnag`
|
`mvn archetype:generate`
|
|
`mvncvst`
|
`mvn clean verify -DskipTests`
|
|
`mvn-updates`
|
`mvn versions:display-dependency-updates`
|
|
`mvnd`
|
`mvn deploy`
|
|
`mvntc7`
|
`mvn tomcat7:run`
|
|
`mvndocs`
|
`mvn dependency:resolve -Dclassifier=javadoc`
|
|
`mvnjetty`
|
`mvn jetty:run`
|
|
`mvndt`
|
`mvn dependency:tree`
|
|
`mvndt`
|
`mvn dependency:tree`
|
|
`mvne`
|
`mvn eclipse:eclipse`
|
|
`mvnjetty`
|
`mvn jetty:run`
|
|
`mvnp`
|
`mvn package`
|
|
`mvns`
|
`mvn site`
|
|
`mvns`
|
`mvn site`
|
|
`mvnsrc`
|
`mvn dependency:sources`
|
|
`mvnsrc`
|
`mvn dependency:sources`
|
|
`mvndocs`
|
`mvn dependency:resolve -Dclassifier=javadoc`
|
|
`mvnt`
|
`mvn test`
|
|
`mvntc`
|
`mvn tomcat:run`
|
|
`mvntc7`
|
`mvn tomcat7:run`
|
|
`mvn-updates`
|
`mvn 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
](
https://maven.apache.org/docs/3.5.0/release-notes.html
)
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
](
https://github.com/robbyrussell/oh-my-zsh/issues/5052
)
.
plugins/mvn/mvn.plugin.zsh
View file @
424b2476
# mvn-color based on https://gist.github.com/1027800
# Calls ./mvnw if found, otherwise execute the original mvn
BOLD
=
$(
tput bold
)
UNDERLINE_ON
=
$(
tput smul
)
UNDERLINE_OFF
=
$(
tput rmul
)
TEXT_BLACK
=
$(
tput setaf 0
)
TEXT_RED
=
$(
tput setaf 1
)
TEXT_GREEN
=
$(
tput setaf 2
)
TEXT_YELLOW
=
$(
tput setaf 3
)
TEXT_BLUE
=
$(
tput setaf 4
)
TEXT_MAGENTA
=
$(
tput setaf 5
)
TEXT_CYAN
=
$(
tput setaf 6
)
TEXT_WHITE
=
$(
tput setaf 7
)
BACKGROUND_BLACK
=
$(
tput setab 0
)
BACKGROUND_RED
=
$(
tput setab 1
)
BACKGROUND_GREEN
=
$(
tput setab 2
)
BACKGROUND_YELLOW
=
$(
tput setab 3
)
BACKGROUND_BLUE
=
$(
tput setab 4
)
BACKGROUND_MAGENTA
=
$(
tput setab 5
)
BACKGROUND_CYAN
=
$(
tput setab 6
)
BACKGROUND_WHITE
=
$(
tput setab 7
)
RESET_FORMATTING
=
$(
tput sgr0
)
# if found an executable ./mvnw file execute it otherwise execute orignal mvn
mvn-or-mvnw
()
{
mvn-or-mvnw
()
{
if
[
-x
./mvnw
]
;
then
if
[
-x
./mvnw
]
;
then
echo
"executing mvnw instead of mvn"
echo
"executing mvnw instead of mvn"
./mvnw
"
$@
"
;
./mvnw
"
$@
"
else
else
mvn
"
$@
"
;
command
mvn
"
$@
"
fi
fi
}
}
# Wrapper function for Maven's mvn command.
# Wrapper function for Maven's mvn command.
Based on https://gist.github.com/1027800
mvn-color
()
{
mvn-color
()
{
(
local
BOLD
=
$(
echoti bold
)
# Filter mvn output using sed. Before filtering set the locale to C, so invalid characters won't break some sed implementations
local
TEXT_RED
=
$(
echoti setaf 1
)
unset
LANG
local
TEXT_GREEN
=
$(
echoti setaf 2
)
LC_CTYPE
=
C mvn
"
$@
"
|
sed
-e
"s/
\(\[
INFO
\]\)\(
.*
\)
/
${
TEXT_BLUE
}${
BOLD
}
\1
${
RESET_FORMATTING
}
\2
/g"
\
local
TEXT_YELLOW
=
$(
echoti setaf 3
)
-e
"s/
\(\[
INFO
\]\
BUILD SUCCESSFUL
\)
/
${
BOLD
}${
TEXT_GREEN
}
\1
${
RESET_FORMATTING
}
/g"
\
local
TEXT_BLUE
=
$(
echoti setaf 4
)
-e
"s/
\(\[
WARNING
\]\)\(
.*
\)
/
${
BOLD
}${
TEXT_YELLOW
}
\1
${
RESET_FORMATTING
}
\2
/g"
\
local
TEXT_WHITE
=
$(
echoti setaf 7
)
-e
"s/
\(\[
ERROR
\]\)\(
.*
\)
/
${
BOLD
}${
TEXT_RED
}
\1
${
RESET_FORMATTING
}
\2
/g"
\
local
RESET_FORMATTING
=
$(
echoti sgr0
)
-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"
(
# Filter mvn output using sed. Before filtering set the locale to C, so invalid characters won't break some sed implementations
# Make sure formatting is reset
unset
LANG
echo
-ne
"
${
RESET_FORMATTING
}
"
LC_CTYPE
=
C mvn
"
$@
"
|
sed
\
)
-e
"s/
\(\[
INFO
\]\)\(
.*
\)
/
${
TEXT_BLUE
}${
BOLD
}
\1
${
RESET_FORMATTING
}
\2
/g"
\
}
-e
"s/
\(\[
DEBUG
\]\)\(
.*
\)
/
${
TEXT_WHITE
}${
BOLD
}
\1
${
RESET_FORMATTING
}
\2
/g"
\
-e
"s/
\(\[
INFO
\]\
BUILD SUCCESSFUL
\)
/
${
BOLD
}${
TEXT_GREEN
}
\1
${
RESET_FORMATTING
}
/g"
\
-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"
# Override the mvn command with the colorized one.
# Make sure formatting is reset
#alias mvn="mvn-color"
echo
-ne
"
${
RESET_FORMATTING
}
"
)
}
# either use orignal mvn o
de
r the mvn wrapper
# either use orignal mvn or the mvn wrapper
alias
mvn
=
"mvn-or-mvnw"
alias
mvn
=
"mvn-or-mvnw"
# 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 2>/dev/null || echo ".")/pom.xml'
# aliases
# aliases
alias
mvncie
=
'mvn clean install eclipse:eclipse'
alias
mvnag
=
'mvn archetype:generate'
alias
mvnboot
=
'mvn spring-boot:run'
alias
mvnc
=
'mvn clean'
alias
mvncd
=
'mvn clean deploy'
alias
mvnce
=
'mvn clean eclipse:clean eclipse:eclipse'
alias
mvnci
=
'mvn clean install'
alias
mvnci
=
'mvn clean install'
alias
mvncie
=
'mvn clean install eclipse:eclipse'
alias
mvncini
=
'mvn clean initialize'
alias
mvncist
=
'mvn clean install -DskipTests'
alias
mvncist
=
'mvn clean install -DskipTests'
alias
mvncisto
=
'mvn clean install -DskipTests --offline'
alias
mvncisto
=
'mvn clean install -DskipTests --offline'
alias
mvne
=
'mvn eclipse:eclipse'
alias
mvnce
=
'mvn clean eclipse:clean eclipse:eclipse'
alias
mvncv
=
'mvn clean verify'
alias
mvnd
=
'mvn deploy'
alias
mvnp
=
'mvn package'
alias
mvnc
=
'mvn clean'
alias
mvncom
=
'mvn compile'
alias
mvncom
=
'mvn compile'
alias
mvncp
=
'mvn clean package'
alias
mvnct
=
'mvn clean test'
alias
mvnct
=
'mvn clean test'
alias
mvnt
=
'mvn test'
alias
mvncv
=
'mvn clean verify'
alias
mvnag
=
'mvn archetype:generate'
alias
mvncvst
=
'mvn clean verify -DskipTests'
alias
mvn-updates
=
'mvn versions:display-dependency-updates'
alias
mvnd
=
'mvn deploy'
alias
mvntc7
=
'mvn tomcat7:run'
alias
mvndocs
=
'mvn dependency:resolve -Dclassifier=javadoc'
alias
mvntc
=
'mvn tomcat:run'
alias
mvnjetty
=
'mvn jetty:run'
alias
mvnboot
=
'mvn spring-boot:run'
alias
mvndt
=
'mvn dependency:tree'
alias
mvndt
=
'mvn dependency:tree'
alias
mvne
=
'mvn eclipse:eclipse'
alias
mvnjetty
=
'mvn jetty:run'
alias
mvnp
=
'mvn package'
alias
mvns
=
'mvn site'
alias
mvns
=
'mvn site'
alias
mvnsrc
=
'mvn dependency:sources'
alias
mvnsrc
=
'mvn dependency:sources'
alias
mvndocs
=
'mvn dependency:resolve -Dclassifier=javadoc'
alias
mvnt
=
'mvn test'
alias
mvntc
=
'mvn tomcat:run'
alias
mvntc7
=
'mvn tomcat7:run'
alias
mvn-updates
=
'mvn versions:display-dependency-updates'
function
listMavenCompletions
{
local
file new_file
local
-a
profiles POM_FILES
# Root POM
POM_FILES
=(
~/.m2/settings.xml
)
function
listMavenCompletions
{
# POM in the current directory
reply
=(
if
[[
-f
pom.xml
]]
;
then
# common lifecycle
local
file
=
pom.xml
clean process-resources compile process-test-resources test-compile
test
integration-test package verify
install
deploy site
POM_FILES+
=(
"
${
file
:A
}
"
)
fi
# Look for POM files in parent directories
while
[[
-n
"
$file
"
]]
&&
grep
-q
"<parent>"
"
$file
"
;
do
# look for a new relativePath for parent pom.xml
new_file
=
$(
grep
-e
"<relativePath>.*</relativePath>"
"
$file
"
|
sed
-e
's/.*<relativePath>\(.*\)<\/relativePath>.*/\1/'
)
# if <parent> is present but not defined, assume ../pom.xml
if
[[
-z
"
$new_file
"
]]
;
then
new_file
=
"../pom.xml"
fi
# if file doesn't exist break
file
=
"
${
file
:h
}
/
${
new_file
}
"
if
!
[[
-e
"
$file
"
]]
;
then
break
fi
POM_FILES+
=(
"
${
file
:A
}
"
)
done
# Get profiles from found files
for
file
in
$POM_FILES
;
do
[[
-e
$file
]]
||
continue
profiles+
=(
$(
sed
's/<!--.*-->//'
"
$file
"
|
sed
'/<!--/,/-->/d'
|
grep
-e
"<profile>"
-A
1 |
grep
-e
"<id>.*</id>"
|
sed
's?.*<id>\(.*\)<\/id>.*?-P\1?'
)
)
done
# common plugins
reply
=(
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
# common lifecycle
clean initialize process-resources compile process-test-resources test-compile
test
package verify
install
deploy site
# deploy
# integration testing
deploy:deploy-file
pre-integration-test integration-test
# failsafe
failsafe:integration-test failsafe:verify
# install
install
:install-file
install
:help
# site
site:site site:deploy site:run site:stage site:stage-deploy site:attach-descriptor site:jar site:effective-site
# surefire
surefire:test
# checkstyle
# common plugins
checkstyle:checkstyle checkstyle:check checkstyle:checkstyle-aggregate
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
# javadoc
javadoc:javadoc javadoc:test-javadoc javadoc:javadoc-no-fork javadoc:test-javadoc-no-fork javadoc:aggregate javadoc:test-aggregate javadoc:jar javadoc:test-jar javadoc:aggregate-jar javadoc:test-aggregate-jar javadoc:fix javadoc:test-fix javadoc:resource-bundle javadoc:test-resource-bundle
# jxr
jxr:jxr jxr:aggregate jxr:test-jxr jxr:test-aggregate
# pmd
pmd:pmd pmd:cpd pmd:check pmd:cpd-check
# ant
# deploy
ant:ant ant:clean
deploy:deploy-file
# antrun
# failsafe
antrun:run
failsafe:integration-test failsafe:verify
# archetype
# install
archetype:generate archetype:create-from-project archetype:crawl
install
:install-file
install
:help
# assembly
# site
assembly:single assembly:assembly
site:site site:deploy site:run site:stage site:stage-deploy site:attach-descriptor site:jar site:effective-site
# dependency
# surefire
dependency:analyze dependency:analyze-dep-mgt dependency:analyze-only dependency:analyze-report dependency:analyze-duplicate dependency:build-classpath dependency:copy dependency:copy-dependencies dependency:display-ancestors dependency:get dependency:go-offline dependency:list dependency:list-repositories dependency:properties dependency:purge-local-repository dependency:resolve dependency:resolve-plugins dependency:sources dependency:tree dependency:unpack dependency:unpack-dependencies
surefire:test
# enforcer
enforcer:enforce enforcer:display-info
# gpg
gpg:sign gpg:sign-and-deploy-file
# help
help
:active-profiles
help
:all-profiles
help
:describe
help
:effective-pom
help
:effective-settings
help
:evaluate
help
:expressions
help
:system
# release
release:clean release:prepare release:prepare-with-pom release:rollback release:perform release:stage release:branch release:update-versions
# jgitflow
jgitflow:feature-start jgitflow:feature-finish jgitflow:release-start jgitflow:release-finish jgitflow:hotfix-start jgitflow:hotfix-finish jgitflow:build-number
# repository
repository:bundle-create repository:bundle-pack
# source
source
:aggregate
source
:jar
source
:jar-no-fork
source
:test-jar
source
:test-jar-no-fork
# eclipse
# checkstyle
eclipse:clean eclipse:eclipse
checkstyle:checkstyle checkstyle:check checkstyle:checkstyle-aggregate
# idea
# javadoc
idea:clean idea:idea
javadoc:javadoc javadoc:test-javadoc javadoc:javadoc-no-fork javadoc:test-javadoc-no-fork javadoc:aggregate javadoc:test-aggregate javadoc:jar javadoc:test-jar javadoc:aggregate-jar javadoc:test-aggregate-jar javadoc:fix javadoc:test-fix javadoc:resource-bundle javadoc:test-resource-bundle
# jxr
jxr:jxr jxr:aggregate jxr:test-jxr jxr:test-aggregate
# pmd
pmd:pmd pmd:cpd pmd:check pmd:cpd-check
# jetty
# ant
jetty:run jetty:run-exploded
ant:ant ant:clean
# cargo
# antrun
cargo:start cargo:run cargo:stop cargo:deploy cargo:undeploy cargo:help
antrun:run
# jboss
# archetype
jboss:start jboss:stop jboss:deploy jboss:undeploy jboss:redeploy
archetype:generate archetype:create-from-project archetype:crawl
# tomcat
# assembly
tomcat:start tomcat:stop tomcat:deploy tomcat:undeploy tomcat:redeplo
y
assembly:single assembly:assembl
y
# tomcat6
# dependency
tomcat6:run tomcat6:run-war tomcat6:run-war-only tomcat6:stop tomcat6:deploy tomcat6:undeploy
dependency:analyze dependency:analyze-dep-mgt dependency:analyze-only dependency:analyze-report dependency:analyze-duplicate dependency:build-classpath dependency:copy dependency:copy-dependencies dependency:display-ancestors dependency:get dependency:go-offline dependency:list dependency:list-repositories dependency:properties dependency:purge-local-repository dependency:resolve dependency:resolve-plugins dependency:sources dependency:tree dependency:unpack dependency:unpack-dependencies
# tomcat7
# enforcer
tomcat7:run tomcat7:run-war tomcat7:run-war-only tomcat7:deploy
enforcer:enforce enforcer:display-info
# tomee
# gpg
tomee:run tomee:run-war tomee:run-war-only tomee:stop tomee:deploy tomee:undeploy
gpg:sign gpg:sign-and-deploy-file
# spring-boot
# help
spring-boot:run spring-boot:repackage
help
:active-profiles
help
:all-profiles
help
:describe
help
:effective-pom
help
:effective-settings
help
:evaluate
help
:expressions
help
:system
# exec
# release
exec
:exec
exec
:java
release:clean release:prepare release:prepare-with-pom release:rollback release:perform release:stage release:branch release:update-versions
# versions
# jgitflow
versions:display-dependency-updates versions:display-plugin-updates versions:display-property-updates versions:update-parent versions:update-properties versions:update-child-modules versions:lock-snapshots versions:unlock-snapshots versions:resolve-ranges versions:set versions:use-releases versions:use-next-releases versions:use-latest-releases versions:use-next-snapshots versions:use-latest-snapshots versions:use-next-versions versions:use-latest-versions versions:commit versions:revert
jgitflow:feature-start jgitflow:feature-finish jgitflow:release-start jgitflow:release-finish jgitflow:hotfix-start jgitflow:hotfix-finish jgitflow:build-number
# scm
# repository
scm:add scm:bootstrap scm:branch scm:changelog scm:check-local-modification scm:checkin scm:checkout scm:diff scm:edit scm:export scm:list scm:remove scm:status scm:tag scm:unedit scm:update scm:update-subprojects scm:validate
repository:bundle-create repository:bundle-pack
# buildnumber
# source
buildnumber:c
reate
buildnumber:create-timestamp buildnumber:help buildnumber:hgchangeset
source
:agg
re
g
ate
source
:jar
source
:jar-no-fork
source
:test-jar
source
:test-jar-no-fork
# war
# eclipse
war:war war:exploded war:inplace war:manifest
eclipse:clean eclipse:eclipse
# ear
# idea
ear:ear ear:generate-application-xml
idea:clean idea:idea
# ejb
ejb:ejb
# android
android:apk android:apklib android:deploy android:deploy-dependencies android:dex android:emulator-start android:emulator-stop android:emulator-stop-all android:generate-sources android:help android:instrument android:manifest-update android:pull android:push android:redeploy android:run android:undeploy android:unpack android:version-update android:zipalign android:devices
# nexus
nexus:staging-list nexus:staging-close nexus:staging-drop nexus:staging-release nexus:staging-build-promotion nexus:staging-profiles-list nexus:settings-download
# repository
repository:bundle-create repository:bundle-pack repository:help
# sonar
# jetty
sonar:sonar
jetty:run jetty:run-exploded
# license
# cargo
license:format license:check
cargo:start cargo:run cargo:stop cargo:deploy cargo:undeploy cargo:help
# hibernate3
# jboss
hibernate3:hbm2ddl hibernate3:help
jboss:start jboss:stop jboss:deploy jboss:undeploy jboss:redeploy
# liquibase
# tomcat
liquibase:changelogSync liquibase:changelogSyncSQL liquibase:clearCheckSums liquibase:dbDoc liquibase:diff liquibase:dropAll liquibase:help liquibase:migrate liquibase:listLocks liquibase:migrateSQL liquibase:releaseLocks liquibase:rollback liquibase:rollbackSQL liquibase:status liquibase:tag liquibase:update liquibase:updateSQL liquibase:updateTestingRollback
tomcat:start tomcat:stop tomcat:deploy tomcat:undeploy tomcat:redeploy
# flyway
# tomcat6
flyway:clean flyway:history flyway:init flyway:migrate flyway:status flyway:validate
tomcat6:run tomcat6:run-war tomcat6:run-war-only tomcat6:stop tomcat6:deploy tomcat6:undeploy
# gwt
# tomcat7
gwt:browser gwt:clean gwt:compile gwt:compile-report gwt:css gwt:debug gwt:eclipse gwt:eclipseTest gwt:generateAsync gwt:help gwt:i18n gwt:mergewebxml gwt:resources gwt:run gwt:sdkInstall gwt:source-jar gwt:soyc gwt:test
tomcat7:run tomcat7:run-war tomcat7:run-war-only tomcat7:deploy
# asciidoctor
# tomee
asciidoctor:process-asciidoc asciidoctor:auto-refresh asciidoctor:http asciidoctor:zip
tomee:run tomee:run-war tomee:run-war-only tomee:stop tomee:deploy tomee:undeploy
# compiler
# spring-boot
compiler:compile compiler:testCompile
spring-boot:run spring-boot:repackage
# resources
# exec
resources:resources resources:testResources resources:copy-resources
exec
:exec
exec
:java
# verifier
# versions
verifier:verify
versions:display-dependency-updates versions:display-plugin-updates versions:display-property-updates versions:update-parent versions:update-properties versions:update-child-modules versions:lock-snapshots versions:unlock-snapshots versions:resolve-ranges versions:set versions:use-releases versions:use-next-releases versions:use-latest-releases versions:use-next-snapshots versions:use-latest-snapshots versions:use-next-versions versions:use-latest-versions versions:commit versions:revert
# jar
# scm
jar:jar jar:test-jar
scm:add scm:bootstrap scm:branch scm:changelog scm:check-local-modification scm:checkin scm:checkout scm:diff scm:edit scm:export scm:list scm:remove scm:status scm:tag scm:unedit scm:update scm:update-subprojects scm:validate
# rar
# buildnumber
rar:rar
buildnumber:create buildnumber:create-timestamp buildnumber:help buildnumber:hgchangeset
# acr
acr:acr
# shade
shade:shade
# changelog
changelog:changelog changelog:dev-activity changelog:file-activity
# changes
changes:announcement-mail changes:announcement-generate changes:changes-check changes:changes-validate changes:changes-report changes:jira-report changes:trac-report changes:github-report
# doap
doap:generate
# docck
docck:check
# jdeps
jdeps:jdkinternals jdeps:test-jdkinternals
# linkcheck
linkcheck:linkcheck
# project-info-reports
project-info-reports:cim project-info-reports:dependencies project-info-reports:dependency-convergence project-info-reports:dependency-info project-info-reports:dependency-management project-info-reports:distribution-management project-info-reports:help project-info-reports:index project-info-reports:issue-tracking project-info-reports:license project-info-reports:mailing-list project-info-reports:modules project-info-reports:plugin-management project-info-reports:plugins project-info-reports:project-team project-info-reports:scm project-info-reports:summary
# surefire-report
surefire-report:failsafe-report-only surefire-report:report surefire-report:report-only
# invoker
invoker:install invoker:integration-test invoker:verify invoker:run
# jarsigner
jarsigner:sign jarsigner:verify
# patch
patch:apply
# pdf
pdf:pdf
# plugin
plugin:descriptor plugin:report plugin:updateRegistry plugin:addPluginArtifactMetadata plugin:helpmojo
# remote-resources
remote-resources:bundle remote-resources:process
# scm-publish
scm-publish:help scm-publish:publish-scm scm-publish:scmpublish
# stage
stage:copy
# toolchain
toolchain:toolchain
# options
"-Dmaven.test.skip=true"
-DskipTests
-DskipITs
-Dmaven
.surefire.debug
-DenableCiProfile
"-Dpmd.skip=true"
"-Dcheckstyle.skip=true"
"-Dtycho.mode=maven"
"-Dmaven.test.failure.ignore=true"
"-DgroupId="
"-DartifactId="
"-Dversion="
"-Dpackaging=jar"
"-Dfile="
# arguments
# war
-am
--also-make
war:war war:exploded war:inplace war:manifest
-amd
--also-make-dependents-am
# ear
-B
--batch-mode
ear:ear ear:generate-application-xml
-b
--builder
# ejb
-C
--strict-checksums
ejb:ejb
-c
--lax-checksums
# android
-cpu
--check-plugin-updates
android:apk android:apklib android:deploy android:deploy-dependencies android:dex android:emulator-start android:emulator-stop android:emulator-stop-all android:generate-sources android:help android:instrument android:manifest-update android:pull android:push android:redeploy android:run android:undeploy android:unpack android:version-update android:zipalign android:devices
-D
--define
# nexus
-e
--errors
nexus:staging-list nexus:staging-close nexus:staging-drop nexus:staging-release nexus:staging-build-promotion nexus:staging-profiles-list nexus:settings-download
-emp
--encrypt-master-password
# repository
-ep
--encrypt-password
repository:bundle-create repository:bundle-pack repository:help
-f
--file
-fae
--fail-at-end
-ff
--fail-fast
-fn
--fail-never
-gs
--global-settings
-gt
--global-toolchains
-h
--help
-l
--log-file
-llr
--legacy-local-repository
-N
--non-recursive
-npr
--no-plugin-registry
-npu
--no-plugin-updates
-nsu
--no-snapshot-updates
-o
--offline
-P
--activate-profiles
-pl
--projects
-q
--quiet
-rf
--resume-from
-s
--settings
-t
--toolchains
-T
--threads
-U
--update-snapshots
-up
--update-plugins
-v
--version
-V
--show-version
-X
--debug
cli:execute cli:execute-phase
# sonar
archetype:generate generate-sources
sonar:sonar
cobertura:cobertura
# license
-Dtest
=
$(
if
[
-d
./src/test/java
]
;
then
find ./src/test/java
-type
f
-name
'*.java'
|
grep
-v
svn |
sed
's?.*/\([^/]*\)\..*?-Dtest=\1?'
;
fi
)
license:format license:check
-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
)
# hibernate3
)
;
hibernate3:hbm2ddl hibernate3:help
# liquibase
liquibase:changelogSync liquibase:changelogSyncSQL liquibase:clearCheckSums liquibase:dbDoc liquibase:diff liquibase:dropAll liquibase:help liquibase:migrate liquibase:listLocks liquibase:migrateSQL liquibase:releaseLocks liquibase:rollback liquibase:rollbackSQL liquibase:status liquibase:tag liquibase:update liquibase:updateSQL liquibase:updateTestingRollback
# flyway
flyway:clean flyway:history flyway:init flyway:migrate flyway:status flyway:validate
# gwt
gwt:browser gwt:clean gwt:compile gwt:compile-report gwt:css gwt:debug gwt:eclipse gwt:eclipseTest gwt:generateAsync gwt:help gwt:i18n gwt:mergewebxml gwt:resources gwt:run gwt:sdkInstall gwt:source-jar gwt:soyc gwt:test
# asciidoctor
asciidoctor:process-asciidoc asciidoctor:auto-refresh asciidoctor:http asciidoctor:zip
# compiler
compiler:compile compiler:testCompile
# resources
resources:resources resources:testResources resources:copy-resources
# verifier
verifier:verify
# jar
jar:jar jar:test-jar
# rar
rar:rar
# acr
acr:acr
# shade
shade:shade
# changelog
changelog:changelog changelog:dev-activity changelog:file-activity
# changes
changes:announcement-mail changes:announcement-generate changes:changes-check changes:changes-validate changes:changes-report changes:jira-report changes:trac-report changes:github-report
# doap
doap:generate
# docck
docck:check
# jdeps
jdeps:jdkinternals jdeps:test-jdkinternals
# linkcheck
linkcheck:linkcheck
# project-info-reports
project-info-reports:cim project-info-reports:dependencies project-info-reports:dependency-convergence project-info-reports:dependency-info project-info-reports:dependency-management project-info-reports:distribution-management project-info-reports:help project-info-reports:index project-info-reports:issue-tracking project-info-reports:license project-info-reports:mailing-list project-info-reports:modules project-info-reports:plugin-management project-info-reports:plugins project-info-reports:project-team project-info-reports:scm project-info-reports:summary
# surefire-report
surefire-report:failsafe-report-only surefire-report:report surefire-report:report-only
# invoker
invoker:install invoker:integration-test invoker:verify invoker:run
# jarsigner
jarsigner:sign jarsigner:verify
# patch
patch:apply
# pdf
pdf:pdf
# plugin
plugin:descriptor plugin:report plugin:updateRegistry plugin:addPluginArtifactMetadata plugin:helpmojo
# remote-resources
remote-resources:bundle remote-resources:process
# scm-publish
scm-publish:help scm-publish:publish-scm scm-publish:scmpublish
# stage
stage:copy
# toolchain
toolchain:toolchain
# options
"-Dmaven.test.skip=true"
-DskipTests
-DskipITs
-Dmaven
.surefire.debug
-DenableCiProfile
"-Dpmd.skip=true"
"-Dcheckstyle.skip=true"
"-Dtycho.mode=maven"
"-Dmaven.test.failure.ignore=true"
"-DgroupId="
"-DartifactId="
"-Dversion="
"-Dpackaging=jar"
"-Dfile="
# arguments
-am
--also-make
-amd
--also-make-dependents-am
-B
--batch-mode
-b
--builder
-C
--strict-checksums
-c
--lax-checksums
-cpu
--check-plugin-updates
-D
--define
-e
--errors
-emp
--encrypt-master-password
-ep
--encrypt-password
-f
--file
-fae
--fail-at-end
-ff
--fail-fast
-fn
--fail-never
-gs
--global-settings
-gt
--global-toolchains
-h
--help
-l
--log-file
-llr
--legacy-local-repository
-N
--non-recursive
-npr
--no-plugin-registry
-npu
--no-plugin-updates
-nsu
--no-snapshot-updates
-o
--offline
-P
--activate-profiles
-pl
--projects
-q
--quiet
-rf
--resume-from
-s
--settings
-t
--toolchains
-T
--threads
-U
--update-snapshots
-up
--update-plugins
-v
--version
-V
--show-version
-X
--debug
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
)
$profiles
)
}
}
compctl
-K
listMavenCompletions mvn
compctl
-K
listMavenCompletions mvn mvnw
compctl
-K
listMavenCompletions mvn-color
compctl
-K
listMavenCompletions mvn-or-mvnw
compctl
-K
listMavenCompletions mvn-or-mvnw
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment