Read repository location from settings.xml

This commit is contained in:
Julien Nicoulaud 2011-08-03 18:05:52 +02:00
parent e3310dbe61
commit 3ef5bd8e36
1 changed files with 5 additions and 3 deletions

6
_mvn
View File

@ -415,8 +415,10 @@ _mvn_plugin_goal_properties() {
(( $+functions[_mvn_groupIds] )) ||
_mvn_groupIds() {
# TODO Read repository location from settings/project
local repository_location=$HOME/.m2/repository ret=1
local settings_file repository_location ret=1
settings_file=${~opt_args[-s]:-${opt_args[--settings]:-$HOME/.m2/settings.xml}}
repository_location=${${${${(M)"$(<$settings_file)":#*<localRepository>*}:-$HOME/.m2/repository}##*<localRepository>}%%<\/localRepository>*}
zstyle -s ":completion:${curcontext}:" cache-policy update_policy
[[ -z "$update_policy" ]] && zstyle ":completion:${curcontext}:" cache-policy _mvn_groupIds_caching_policy