From 4ff1ef0001bf8168d0b89380a73b9eec6982e505 Mon Sep 17 00:00:00 2001 From: Jeremy Dormitzer Date: Fri, 6 May 2022 16:58:11 -0400 Subject: [PATCH] Delete maven run-command recipe Turns out it's more convenient to just set the projectile-project-*-cmd variables since mvn invocations vary so widely --- emacs/.emacs.d/config/init-run-command.el | 72 ----------------------- 1 file changed, 72 deletions(-) diff --git a/emacs/.emacs.d/config/init-run-command.el b/emacs/.emacs.d/config/init-run-command.el index a8b6b1d..3ff8c12 100644 --- a/emacs/.emacs.d/config/init-run-command.el +++ b/emacs/.emacs.d/config/init-run-command.el @@ -215,77 +215,6 @@ (list :command-name "install" :command-line (format "pip install -r %s" (buffer-file-name)))))) - (defun run-command-recipe-maven () - (when-let* ((root-dir (or (projectile-project-root) default-directory)) - (local-pom-dir (locate-dominating-file default-directory "pom.xml")) - (project-dir (locate-dominating-file root-dir "pom.xml")) - (commands (list - (list :command-name "validate" - :command-line "mvn validate" - :working-dir local-pom-dir) - (list :command-name "compile" - :command-line "mvn compile" - :working-dir local-pom-dir) - (list :command-name "clean compile" - :command-line "mvn clean compile" - :working-dir local-pom-dir) - (list :command-name "test" - :command-line "mvn test -DfailIfNoTests=false" - :working-dir local-pom-dir) - (list :command-name "package" - :command-line "mvn package" - :working-dir local-pom-dir) - (list :command-name "verify" - :command-line "mvn verify" - :working-dir local-pom-dir) - (list :command-name "install" - :command-line "mvn install" - :working-dir local-pom-dir) - (list :command-name "install (skip tests)" - :command-line "mvn install -DskipTests" - :working-dir local-pom-dir) - (list :command-name "deploy" - :command-line "mvn deploy" - :working-dir local-pom-dir) - (list :command-name "clean" - :command-line "mvn clean" - :working-dir local-pom-dir) - (list :command-name "exec:java" - :command-line "mvn exec:java" - :working-dir local-pom-dir) - (list :command-name "clean compile exec:java" - :command-line "mvn clean compile exec:java" - :working-dir local-pom-dir) - (when-let ((test-class (and (buffer-file-name) - (let ((case-fold-search nil)) - (string-match-p ".*\\(Test\\|IT\\).*\\.java$" - (buffer-file-name))) - (fboundp 'dap-java-test-class) - (dap-java-test-class)))) - (list :command-name "test this class" - :command-line (format "mvn test -DfailIfNoTests=false -Dtest=%s" test-class) - :working-dir local-pom-dir)) - (when-let ((test-method (and (buffer-file-name) - (let ((case-fold-search nil)) - (string-match-p ".*\\(Test\\|IT\\).*\\.java$" - (buffer-file-name))) - (fboundp 'dap-java-test-method-at-point) - (dap-java-test-method-at-point t)))) - (list :command-name "test this method" - :command-line (format "mvn test -DfailIfNoTests=false -Dtest=%s" test-method) - :working-dir local-pom-dir))))) - (if (s-equals? local-pom-dir project-dir) - commands - (-concat commands - (-map (lambda (cmd) - (when cmd - (-> (-copy cmd) - (plist-put :command-name - (format "%s (root POM)" - (plist-get cmd :command-name))) - (plist-put :working-dir project-dir)))) - commands))))) - (defun get-cargo-commands (dir) (when (executable-find "cargo") (with-temp-buffer @@ -378,7 +307,6 @@ run-command-recipe-nosetests run-command-recipe-web-ext run-command-recipe-pip - run-command-recipe-maven run-command-recipe-cargo run-command-recipe-rake run-command-recipe-scripts)))