maven.help - Run help:describe for plugin at point.
--- 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)