Обновление ohmyzsh
This commit is contained in:
@@ -4,6 +4,7 @@ The mvn plugin provides many [useful aliases](#aliases) as well as completion fo
|
||||
the [Apache Maven](https://maven.apache.org/) command (`mvn`).
|
||||
|
||||
Enable it by adding `mvn` to the plugins array in your zshrc file:
|
||||
|
||||
```zsh
|
||||
plugins=(... mvn)
|
||||
```
|
||||
@@ -18,6 +19,7 @@ if it's found, or the mvn command otherwise.
|
||||
| `mvn!` | `mvn -f <root>/pom.xml` |
|
||||
| `mvnag` | `mvn archetype:generate` |
|
||||
| `mvnboot` | `mvn spring-boot:run` |
|
||||
| `mvnqdev` | `mvn quarkus:dev` |
|
||||
| `mvnc` | `mvn clean` |
|
||||
| `mvncd` | `mvn clean deploy` |
|
||||
| `mvnce` | `mvn clean eclipse:clean eclipse:eclipse` |
|
||||
@@ -35,6 +37,7 @@ if it's found, or the mvn command otherwise.
|
||||
| `mvndocs` | `mvn dependency:resolve -Dclassifier=javadoc` |
|
||||
| `mvndt` | `mvn dependency:tree` |
|
||||
| `mvne` | `mvn eclipse:eclipse` |
|
||||
| `mvnfmt` | `mvn fmt:format` |
|
||||
| `mvnjetty` | `mvn jetty:run` |
|
||||
| `mvnp` | `mvn package` |
|
||||
| `mvns` | `mvn site` |
|
||||
@@ -55,4 +58,4 @@ 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).
|
||||
`archetype:generate`. See [#5052](https://github.com/ohmyzsh/ohmyzsh/issues/5052).
|
||||
|
||||
@@ -59,8 +59,10 @@ alias mvnd='mvn deploy'
|
||||
alias mvndocs='mvn dependency:resolve -Dclassifier=javadoc'
|
||||
alias mvndt='mvn dependency:tree'
|
||||
alias mvne='mvn eclipse:eclipse'
|
||||
alias mvnfmt='mvn fmt:format'
|
||||
alias mvnjetty='mvn jetty:run'
|
||||
alias mvnp='mvn package'
|
||||
alias mvnqdev='mvn quarkus:dev'
|
||||
alias mvns='mvn site'
|
||||
alias mvnsrc='mvn dependency:sources'
|
||||
alias mvnt='mvn test'
|
||||
@@ -71,7 +73,7 @@ alias mvn-updates='mvn versions:display-dependency-updates'
|
||||
|
||||
function listMavenCompletions {
|
||||
local file new_file
|
||||
local -a profiles POM_FILES
|
||||
local -a profiles POM_FILES modules
|
||||
|
||||
# Root POM
|
||||
POM_FILES=(~/.m2/settings.xml)
|
||||
@@ -107,6 +109,9 @@ function listMavenCompletions {
|
||||
profiles+=($(sed 's/<!--.*-->//' "$file" | sed '/<!--/,/-->/d' | grep -e "<profile>" -A 1 | grep -e "<id>.*</id>" | sed 's?.*<id>\(.*\)<\/id>.*?-P\1?'))
|
||||
done
|
||||
|
||||
# List modules
|
||||
modules=($(find **/pom.xml -type f | grep -v '/target/classes/META-INF/' | grep '/pom.xml' |sed 's|\(.*\)/pom\.xml|\1|'))
|
||||
|
||||
reply=(
|
||||
# common lifecycle
|
||||
clean initialize process-resources compile process-test-resources test-compile test package verify install deploy site
|
||||
@@ -183,6 +188,8 @@ function listMavenCompletions {
|
||||
tomee:run tomee:run-war tomee:run-war-only tomee:stop tomee:deploy tomee:undeploy
|
||||
# spring-boot
|
||||
spring-boot:run spring-boot:repackage
|
||||
# quarkus
|
||||
quarkus:dev quarkus:list-extensions quarkus:add-extension quarkus:add-extensions quarkus:generate-config quarkus:help
|
||||
# exec
|
||||
exec:exec exec:java
|
||||
# versions
|
||||
@@ -267,6 +274,8 @@ function listMavenCompletions {
|
||||
stage:copy
|
||||
# toolchain
|
||||
toolchain:toolchain
|
||||
#liberty
|
||||
liberty:clean-server liberty:compile-jsp liberty:configure-arquillian liberty:create-server liberty:debug liberty:debug-server liberty:deploy liberty:dev liberty:display-url liberty:dump-server liberty:install-apps liberty:install-feature liberty:install-server liberty:java-dump-server liberty:package-server liberty:run liberty:run-server liberty:server-status liberty:start liberty:start-server liberty:status liberty:stop liberty:stop-server liberty:test-start-server liberty:test-stop-server liberty:undeploy liberty:uninstall-feature
|
||||
|
||||
# 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="
|
||||
@@ -317,6 +326,7 @@ function listMavenCompletions {
|
||||
-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
|
||||
$modules
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user