zsh-mvn-contexts is a zsh plugin for fast switching between your maven configurations
-
Add the following to your .zshrc:
antigen bundle artemy/zsh-mvn-contexts
-
Restart zsh.
-
Clone this repository into oh-my-zsh's plugin directory:
git clone [email protected]:artemy/zsh-mvn-contexts.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/_mvnctx
-
Enable the plugin in
~/.zshrc
:plugins=( [other plugins...] _mvnctx)
(mind the underscore)
-
Restart zsh.
- Create
~/.m2/contexts
directory - Save your custom maven settings as
~/.m2/contexts/<my-context>.xml
- (Optional) save your custom maven security file as
~/.m2/contexts/<my-context>-security.xml
Plugin will symlink one of the specified "context" files from your ~/.m2/contexts
directory into ~/.m2
directory together with respective security file (if exists).
mvnctx <my-context>
Plugin is also aware of existing configurations so it supports autocompletion.
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Thanks to Robin Trietsch for the idea and contributions.
This project is licensed under the MIT License. See the LICENSE file for details.