m0smith / malabar-mode

EMCS JVM Integration for Java and other JVM based languages
GNU General Public License v2.0
330 stars 52 forks source link

calling malabar-java-mode fails #164

Closed lwiechec closed 9 years ago

lwiechec commented 9 years ago

When I try to call malabar-java-mode from withing the Java file that is already in java-mode, I am getting the following:

Debugger entered--Lisp error: (error "The argument 'pm' is required.  It should be one of (maven gradle). Passed arguments ((pm) (pmfile . /home/luke/work/projects/CCIF/common/pom.xml) (relative . [\"build\\/classes\\/main\",\"build\\/classes\\/test\"]))")
  signal(error ("The argument 'pm' is required.  It should be one of (maven gradle). Passed arguments ((pm) (pmfile . /home/luke/work/projects/CCIF/common/pom.xml) (relative . [\"build\\/classes\\/main\",\"build\\/classes\\/test\"]))"))
  error("The argument 'pm' is required.  It should be one of %s. Passed arguments %s" ("maven" "gradle") (("pm") ("pmfile" . "/home/luke/work/projects/CCIF/common/pom.xml") ("relative" . "[\"build\\/classes\\/main\",\"build\\/classes\\/test\"]")))
  (if (member pm malabar-known-project-managers) nil (error "The argument 'pm' is required.  It should be one of %s. Passed arguments %s" malabar-known-project-managers args-alist))
  (let ((pm (cdr (assoc "pm" args-alist)))) (if (member pm malabar-known-project-managers) nil (error "The argument 'pm' is required.  It should be one of %s. Passed arguments %s" malabar-known-project-managers args-alist)))
  malabar-url-validate-args((("pm") ("pmfile" . "/home/luke/work/projects/CCIF/common/pom.xml") ("relative" . "[\"build\\/classes\\/main\",\"build\\/classes\\/test\"]")))
  malabar-url-http-post-with-callback(malabar-kill-url-buffer "http://localhost:4428/add/" (("pm") ("pmfile" . "/home/luke/work/projects/CCIF/common/pom.xml") ("relative" . "[\"build\\/classes\\/main\",\"build\\/classes\\/test\"]")))
  malabar-url-http-post("http://localhost:4428/add/" (("pm") ("pmfile" . "/home/luke/work/projects/CCIF/common/pom.xml") ("relative" . "[\"build\\/classes\\/main\",\"build\\/classes\\/test\"]")))
  (let ((url (format "http://%s:%s/add/" malabar-server-host (malabar-project-port malabar-mode-project-file)))) (malabar-url-http-post url (list (cons "pm" malabar-mode-project-manager) (cons "pmfile" malabar-mode-project-file) (cons "relative" (json-encode malabar-package-additional-classpath)))))
  malabar-post-additional-classpath()
  malabar-mode-body()
  (let ((last-message (current-message))) (setq malabar-java-mode (if (eq arg (quote toggle)) (not malabar-java-mode) (> (prefix-numeric-value arg) 0))) (malabar-mode-body) (setq malabar-mode-project-parser "java") (run-hooks (quote malabar-java-mode-hook) (if malabar-java-mode (quote malabar-java-mode-on-hook) (quote malabar-java-mode-off-hook))) (if (called-interactively-p (quote any)) (progn nil (if (and (current-message) (not (equal last-message (current-message)))) nil (message "Malabar-Java mode %sabled" (if malabar-java-mode "en" "dis"))))))
  malabar-java-mode(toggle)
  call-interactively(malabar-java-mode record nil)
  command-execute(malabar-java-mode record)
  execute-extended-command(nil "malabar-java-mode")
  call-interactively(execute-extended-command nil nil)
  command-execute(execute-extended-command)

I suspect it has something to do with inability of malabar-mode-jar to handle both pm and pmfile atributes?

m0smith commented 9 years ago

You caught me in the middle of a rewrite to handle gradle as well as maven.