# HG changeset patch # User Oleksandr Gavenko # Date 1393598313 -7200 # Node ID 8e730890ac85520b6f824c3f864710c4501abe1c # Parent cc1303629cdea10ec8be6d308c9109916114edd9 maven.help - Run help:describe for plugin at point. diff -r cc1303629cde -r 8e730890ac85 maven-central.el --- a/maven-central.el Tue Feb 04 21:52:43 2014 +0200 +++ b/maven-central.el Fri Feb 28 16:38:33 2014 +0200 @@ -130,6 +130,24 @@ (maven-central.versions groupId artifactId)) )) +(defvar maven.command "mvn") + +(defvar maven.help-buffer-name "*Maven Help*") + +(defun maven.help () + "Run help:describe for plugin at point." + (interactive) + (let (dependency groupId artifactId) + (setq dependency (maven-central.parse-pom-dependency)) + (setq groupId (elt dependency 0)) + (setq artifactId (elt dependency 1)) + (if (not (and groupId artifactId)) + (message "Can't find `groupId' or `artifactId'") + (shell-command + (format "%s help:describe -DgroupId=%s -DartifactId=%s" maven.command groupId artifactId) + (switch-to-buffer maven.help-buffer-name)) ) + )) + ;; (maven-central.last-version "junit" "junit") (provide 'maven-central)