From 58f3ac6dee2778b93291c7759301e0f5f5cf8ef1 Mon Sep 17 00:00:00 2001 From: "Saulo S. de Toledo" Date: Sun, 28 Jun 2026 14:44:17 +0200 Subject: [PATCH] refactor(core)!: rename package from java-agent-loader to jal Renamed all filenames, symbols, and package headers from 'java-agent-loader' to 'jal' to conform to the new official MELPA package name. Additionally, updated the commentaries across all files to explicitly Mention the full name "Java Agent Loader (JAL)" for search discoverability, and added notes clarifying that this handles JVM bytecode instrumentation rather than AI agents. BREAKING CHANGE: The package name has changed from `java-agent-loader` to `jal`. Package declarations in init files (e.g., `use-package`, `straight-use-package`) must be updated to reference `jal`. Note: Code-level namespaces were already using `jal-` and remain completely unchanged. --- .github/workflows/conventional-commits.yml | 4 +- .github/workflows/melpazoid.yml | 6 +-- Makefile | 2 +- README.org | 2 +- ...der-build-gradle.el => jal-build-gradle.el | 31 ++++++------ ...oader-build-maven.el => jal-build-maven.el | 29 +++++------ ...der-client-eglot.el => jal-client-eglot.el | 42 ++++++++-------- ...-loader-client-lsp.el => jal-client-lsp.el | 36 ++++++------- jal-known-agents.el | 45 +++++++++++++++++ java-agent-loader-utils.el => jal-utils.el | 33 ++++++------ java-agent-loader-vars.el => jal-vars.el | 31 ++++++------ java-agent-loader.el => jal.el | 50 +++++++++++-------- java-agent-loader-known-agents.el | 36 ------------- ...{java-agent-loader-test.el => jal-test.el} | 22 ++++---- 14 files changed, 197 insertions(+), 172 deletions(-) rename java-agent-loader-build-gradle.el => jal-build-gradle.el (88%) rename java-agent-loader-build-maven.el => jal-build-maven.el (90%) rename java-agent-loader-client-eglot.el => jal-client-eglot.el (79%) rename java-agent-loader-client-lsp.el => jal-client-lsp.el (81%) create mode 100644 jal-known-agents.el rename java-agent-loader-utils.el => jal-utils.el (92%) rename java-agent-loader-vars.el => jal-vars.el (82%) rename java-agent-loader.el => jal.el (90%) delete mode 100644 java-agent-loader-known-agents.el rename tests/{java-agent-loader-test.el => jal-test.el} (97%) diff --git a/.github/workflows/conventional-commits.yml b/.github/workflows/conventional-commits.yml index 3c4deb7..ec78496 100644 --- a/.github/workflows/conventional-commits.yml +++ b/.github/workflows/conventional-commits.yml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-24.04 steps: - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@v7 - name: Validate Conventional Commits - uses: webiny/action-conventional-commits@v1.3.0 + uses: webiny/action-conventional-commits@v1.4.2 diff --git a/.github/workflows/melpazoid.yml b/.github/workflows/melpazoid.yml index e279bab..c5e2578 100644 --- a/.github/workflows/melpazoid.yml +++ b/.github/workflows/melpazoid.yml @@ -9,10 +9,10 @@ jobs: runs-on: ubuntu-24.04 steps: - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@v7 - name: Set up Python 3.10 - uses: actions/setup-python@v4 + uses: actions/setup-python@v6 with: python-version: "3.10" @@ -26,7 +26,7 @@ jobs: - name: Run melpazoid env: LOCAL_REPO: ${{ github.workspace }} - RECIPE: (java-agent-loader :fetcher github :repo "saulotoledo/java-agent-loader") + RECIPE: (jal :fetcher github :repo "saulotoledo/java-agent-loader") # Change to true when the package is already in MELPA: EXIST_OK: false run: echo $GITHUB_REF && make -C ~/melpazoid diff --git a/Makefile b/Makefile index 018f433..a304a99 100644 --- a/Makefile +++ b/Makefile @@ -13,7 +13,7 @@ test: compile ert ert: $(EMACS) -Q -batch \ -L $(JAL_DIR) \ - -l $(JAL_DIR)tests/java-agent-loader-test.el \ + -l $(JAL_DIR)tests/jal-test.el \ -f ert-run-tests-batch-and-exit clean-elc: diff --git a/README.org b/README.org index 5506f6a..adf0110 100644 --- a/README.org +++ b/README.org @@ -67,7 +67,7 @@ No clone needed: Emacs fetches the package directly from GitHub: #+begin_src elisp (straight-use-package - '(java-agent-loader :type git :host github :repo "saulotoledo/java-agent-loader")) + '(jal :type git :host github :repo "saulotoledo/java-agent-loader")) #+end_src ** Configuration diff --git a/java-agent-loader-build-gradle.el b/jal-build-gradle.el similarity index 88% rename from java-agent-loader-build-gradle.el rename to jal-build-gradle.el index f057f6e..5570e21 100644 --- a/java-agent-loader-build-gradle.el +++ b/jal-build-gradle.el @@ -1,26 +1,27 @@ -;;; java-agent-loader-build-gradle.el --- Gradle detection for Java Agent Loader -*- lexical-binding: t; -*- +;;; jal-build-gradle.el --- Gradle detection for Java Agent Loader (JAL) -*- lexical-binding: t; -*- -;; This program is free software: you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation, either version 3 of the License, or -;; (at your option) any later version. +;; This program is free software: you can redistribute it and/or modify it under +;; the terms of the GNU General Public License as published by the Free Software +;; Foundation, either version 3 of the License, or (at your option) any later +;; version. -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. +;; This program is distributed in the hope that it will be useful, but WITHOUT +;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +;; FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +;; details. -;; You should have received a copy of the GNU General Public License -;; along with this program. If not, see . +;; You should have received a copy of the GNU General Public License along with +;; this program. If not, see . ;; Author: Saulo Toledo ;;; Commentary: -;; Gradle detection logic for JAL. + +;; Gradle detection logic for Java Agent Loader (JAL). ;;; Code: -(require 'java-agent-loader-utils) +(require 'jal-utils) (defun jal--gradle-write-init-script (agents-list) "Write a Gradle init script that lists resolved jars for AGENTS-LIST. @@ -130,5 +131,5 @@ or nil on failure." (funcall callback (nreverse found-agents)))))))))))) -(provide 'java-agent-loader-build-gradle) -;;; java-agent-loader-build-gradle.el ends here +(provide 'jal-build-gradle) +;;; jal-build-gradle.el ends here diff --git a/java-agent-loader-build-maven.el b/jal-build-maven.el similarity index 90% rename from java-agent-loader-build-maven.el rename to jal-build-maven.el index 1e6aa54..337afef 100644 --- a/java-agent-loader-build-maven.el +++ b/jal-build-maven.el @@ -1,26 +1,27 @@ -;;; java-agent-loader-build-maven.el --- Maven detection for Java Agent Loader -*- lexical-binding: t; -*- +;;; jal-build-maven.el --- Maven detection for Java Agent Loader (JAL) -*- lexical-binding: t; -*- -;; This program is free software: you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation, either version 3 of the License, or -;; (at your option) any later version. +;; This program is free software: you can redistribute it and/or modify it under +;; the terms of the GNU General Public License as published by the Free Software +;; Foundation, either version 3 of the License, or (at your option) any later +;; version. -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. +;; This program is distributed in the hope that it will be useful, but WITHOUT +;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +;; FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +;; details. -;; You should have received a copy of the GNU General Public License -;; along with this program. If not, see . +;; You should have received a copy of the GNU General Public License along with +;; this program. If not, see . ;; Author: Saulo Toledo ;;; Commentary: + ;; Maven detection logic for JAL. ;;; Code: -(require 'java-agent-loader-utils) +(require 'jal-utils) (defun jal--maven-extract-agent-dependency-info (mvn-output agent-id) "Extract the maven agent AGENT-ID from MVN-OUTPUT. @@ -143,5 +144,5 @@ or nil on failure." (funcall callback (nreverse found-agents)))))))))))) -(provide 'java-agent-loader-build-maven) -;;; java-agent-loader-build-maven.el ends here +(provide 'jal-build-maven) +;;; jal-build-maven.el ends here diff --git a/java-agent-loader-client-eglot.el b/jal-client-eglot.el similarity index 79% rename from java-agent-loader-client-eglot.el rename to jal-client-eglot.el index 41419a5..0a6bb98 100644 --- a/java-agent-loader-client-eglot.el +++ b/jal-client-eglot.el @@ -1,31 +1,33 @@ -;;; java-agent-loader-client-eglot.el --- eglot-java integration for JAL -*- lexical-binding: t; -*- +;;; jal-client-eglot.el --- eglot-java integration for Java Agent Loader (JAL) -*- lexical-binding: t; -*- -;; This program is free software: you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation, either version 3 of the License, or -;; (at your option) any later version. +;; This program is free software: you can redistribute it and/or modify it under +;; the terms of the GNU General Public License as published by the Free Software +;; Foundation, either version 3 of the License, or (at your option) any later +;; version. -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. +;; This program is distributed in the hope that it will be useful, but WITHOUT +;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +;; FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +;; details. -;; You should have received a copy of the GNU General Public License -;; along with this program. If not, see . +;; You should have received a copy of the GNU General Public License along with +;; this program. If not, see . ;; Author: Saulo Toledo ;;; Commentary: -;; This module provides integration between JAL and eglot-java. -;; It installs an around advice on `eglot-java--eclipse-jdt-contact' that -;; dynamically extends `eglot-java-eclipse-jdt-args' with the javaagent -;; arguments for the current project on every JDTLS startup. + +;; This module provides integration between Java Agent Loader (JAL) and +;; `eglot-java'. It installs an around advice on +;; `eglot-java--eclipse-jdt-contact' that dynamically extends +;; `eglot-java-eclipse-jdt-args' with the javaagent arguments for the current +;; project on every JDTLS startup. ;;; Code: -(require 'java-agent-loader) -(require 'java-agent-loader-vars) -(require 'java-agent-loader-known-agents) +(require 'jal) +(require 'jal-vars) +(require 'jal-known-agents) (defvar eglot-java-eclipse-jdt-args) @@ -101,5 +103,5 @@ This function is called automatically when eglot-java is loaded." (add-hook 'jal-agents-detected-hook #'jal--eglot-reconnect) (setq jal--eglot-java-interface-warning-issued nil)) -(provide 'java-agent-loader-client-eglot) -;;; java-agent-loader-client-eglot.el ends here +(provide 'jal-client-eglot) +;;; jal-client-eglot.el ends here diff --git a/java-agent-loader-client-lsp.el b/jal-client-lsp.el similarity index 81% rename from java-agent-loader-client-lsp.el rename to jal-client-lsp.el index 48490d4..150b588 100644 --- a/java-agent-loader-client-lsp.el +++ b/jal-client-lsp.el @@ -1,28 +1,30 @@ -;;; java-agent-loader-client-lsp.el --- LSP-Java integration for JAL -*- lexical-binding: t; -*- +;;; jal-client-lsp.el --- LSP-Java integration for Java Agent Loader (JAL) -*- lexical-binding: t; -*- -;; This program is free software: you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation, either version 3 of the License, or -;; (at your option) any later version. +;; This program is free software: you can redistribute it and/or modify it under +;; the terms of the GNU General Public License as published by the Free Software +;; Foundation, either version 3 of the License, or (at your option) any later +;; version. -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. +;; This program is distributed in the hope that it will be useful, but WITHOUT +;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +;; FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +;; details. -;; You should have received a copy of the GNU General Public License -;; along with this program. If not, see . +;; You should have received a copy of the GNU General Public License along with +;; this program. If not, see . ;; Author: Saulo Toledo ;;; Commentary: -;; This module provides integration between JAL and lsp-java. + +;; This module provides integration between Java Agent Loader (JAL) and +;; `lsp-java'. ;;; Code: -(require 'java-agent-loader) -(require 'java-agent-loader-vars) -(require 'java-agent-loader-known-agents) +(require 'jal) +(require 'jal-vars) +(require 'jal-known-agents) (defvar lsp-java-vmargs) (defvar lsp-java-java-path) @@ -89,5 +91,5 @@ This function is called automatically when lsp-java is loaded." (add-hook 'lsp-after-initialize-hook #'jal-find-and-configure-agents) (add-hook 'jal-agents-detected-hook #'jal--lsp-java-restart)) -(provide 'java-agent-loader-client-lsp) -;;; java-agent-loader-client-lsp.el ends here +(provide 'jal-client-lsp) +;;; jal-client-lsp.el ends here diff --git a/jal-known-agents.el b/jal-known-agents.el new file mode 100644 index 0000000..ac3542f --- /dev/null +++ b/jal-known-agents.el @@ -0,0 +1,45 @@ +;;; jal-known-agents.el --- Known agents registry for Java Agent Loader (JAL) -*- lexical-binding: t; -*- + +;; This program is free software: you can redistribute it and/or modify it under +;; the terms of the GNU General Public License as published by the Free Software +;; Foundation, either version 3 of the License, or (at your option) any later +;; version. + +;; This program is distributed in the hope that it will be useful, but WITHOUT +;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +;; FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +;; details. + +;; You should have received a copy of the GNU General Public License along with +;; this program. If not, see . + +;; Author: Saulo Toledo + +;;; Commentary: + +;; This module provides a centralized registry of commonly used Java agents for +;; the Java Agent Loader (JAL) ecosystem, pre-configured with sensible default +;; options. +;; +;; Note that this registry is intentionally not exhaustive or complete. Users +;; can easily extend this list in their own configurations to support custom or +;; niche agents. Furthermore, contributions to add more standard agents to this +;; default registry are highly welcome to facilitate usage for the wider +;; community. + +;;; Code: + +(defvar jal-known-agents + '( + ("lombok" :jar-path "org/projectlombok/%a/%v/%a-%v.jar" :params "") + ("opentelemetry-javaagent" :jar-path "io/opentelemetry/javaagent/%a/%v/%a-%v.jar") + ("org.jacoco.agent" :jar-path "org/jacoco/%a/%v/%a-%v-runtime.jar")) + "Registry of known Java agents with default configurations. +Each entry is either: +- (ARTIFACT-ID) : Use defaults +- (ARTIFACT-ID . PROPS) : Specify properties + +PROPS is a plist with keys :params and :jar-path.") + +(provide 'jal-known-agents) +;;; jal-known-agents.el ends here diff --git a/java-agent-loader-utils.el b/jal-utils.el similarity index 92% rename from java-agent-loader-utils.el rename to jal-utils.el index 56aace0..8885010 100644 --- a/java-agent-loader-utils.el +++ b/jal-utils.el @@ -1,27 +1,28 @@ -;;; java-agent-loader-utils.el --- Utilities for Java Agent Loader -*- lexical-binding: t; -*- +;;; jal-utils.el --- Utilities for Java Agent Loader (JAL) -*- lexical-binding: t; -*- -;; This program is free software: you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation, either version 3 of the License, or -;; (at your option) any later version. +;; This program is free software: you can redistribute it and/or modify it under +;; the terms of the GNU General Public License as published by the Free Software +;; Foundation, either version 3 of the License, or (at your option) any later +;; version. -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. +;; This program is distributed in the hope that it will be useful, but WITHOUT +;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +;; FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +;; details. -;; You should have received a copy of the GNU General Public License -;; along with this program. If not, see . +;; You should have received a copy of the GNU General Public License along with +;; this program. If not, see . ;; Author: Saulo Toledo ;;; Commentary: -;; Utility functions for jal. + +;; Utility functions for the Java Agent Loader (JAL). ;;; Code: -(require 'java-agent-loader-vars) -(require 'java-agent-loader-known-agents) +(require 'jal-vars) +(require 'jal-known-agents) (require 'project) (require 'format-spec) @@ -205,5 +206,5 @@ in the new scoped format." (when (jal--config-scoped-p full-config) (cadr (assoc java-key full-config))))))) -(provide 'java-agent-loader-utils) -;;; java-agent-loader-utils.el ends here +(provide 'jal-utils) +;;; jal-utils.el ends here diff --git a/java-agent-loader-vars.el b/jal-vars.el similarity index 82% rename from java-agent-loader-vars.el rename to jal-vars.el index 9464d17..c0c7d78 100644 --- a/java-agent-loader-vars.el +++ b/jal-vars.el @@ -1,27 +1,28 @@ -;;; java-agent-loader-vars.el --- Variables for Java Agent Loader -*- lexical-binding: t; -*- +;;; jal-vars.el --- Variables for Java Agent Loader (JAL) -*- lexical-binding: t; -*- -;; This program is free software: you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation, either version 3 of the License, or -;; (at your option) any later version. +;; This program is free software: you can redistribute it and/or modify it under +;; the terms of the GNU General Public License as published by the Free Software +;; Foundation, either version 3 of the License, or (at your option) any later +;; version. -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. +;; This program is distributed in the hope that it will be useful, but WITHOUT +;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +;; FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +;; details. -;; You should have received a copy of the GNU General Public License -;; along with this program. If not, see . +;; You should have received a copy of the GNU General Public License along with +;; this program. If not, see . ;; Author: Saulo Toledo ;;; Commentary: -;; Variables and constants for jal. + +;; Variables and constants for the Java Agent Loader (JAL). ;;; Code: (defgroup jal nil - "Java Agent Loader for JDTLS." + "Java Agent Loader (JAL) for JDTLS." :group 'tools :prefix "jal-") @@ -92,5 +93,5 @@ during setup so the core cache functions remain client-agnostic. When nil, `jal--current-java-key' falls back to resolving the first `java' found on PATH.") -(provide 'java-agent-loader-vars) -;;; java-agent-loader-vars.el ends here +(provide 'jal-vars) +;;; jal-vars.el ends here diff --git a/java-agent-loader.el b/jal.el similarity index 90% rename from java-agent-loader.el rename to jal.el index a367675..c0cda88 100644 --- a/java-agent-loader.el +++ b/jal.el @@ -1,37 +1,45 @@ -;;; java-agent-loader.el --- Java Agent Loader for JDTLS -*- lexical-binding: t; -*- +;;; jal.el --- Java Agent Loader (JAL) for JDTLS -*- lexical-binding: t; -*- -;; This program is free software: you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation, either version 3 of the License, or -;; (at your option) any later version. +;; This program is free software: you can redistribute it and/or modify it under +;; the terms of the GNU General Public License as published by the Free Software +;; Foundation, either version 3 of the License, or (at your option) any later +;; version. -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. +;; This program is distributed in the hope that it will be useful, but WITHOUT +;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +;; FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +;; details. -;; You should have received a copy of the GNU General Public License -;; along with this program. If not, see . +;; You should have received a copy of the GNU General Public License along with +;; this program. If not, see . ;; Author: Saulo Toledo -;; Version: 0.1.0 +;; Version: 1.0.0 ;; Package-Requires: ((emacs "28.1")) ;; Keywords: java, languages, tools ;; URL: https://github.com/saulotoledo/java-agent-loader ;;; Commentary: -;; This package manages the injection of -javaagent arguments for tools -;; like Lombok and JaCoCo into the JDT Language Server (JDTLS) process, -;; using a global cache to avoid slow Maven/Gradle lookups on every startup. +;; NOTE: This package handles JVM instrumentation agents, NOT artificial +;; intelligence (AI) agents. +;; +;; In the Java ecosystem, a "Java Agent" is a native JVM plugin that uses +;; bytecode instrumentation to modify compiled code on the fly as it loads. It +;; has no relation to AI assistants or LLM workflows. +;; +;; Java Agent Loader (JAL) manages the injection of these `-javaagent' arguments +;; for tools like Lombok and JaCoCo into the JDT Language Server (JDTLS) +;; process. It utilizes a global cache to avoid slow Maven or Gradle build tool +;; lookups on every single project startup. ;;; Code: (require 'project) -(require 'java-agent-loader-vars) -(require 'java-agent-loader-utils) -(require 'java-agent-loader-build-maven) -(require 'java-agent-loader-build-gradle) +(require 'jal-vars) +(require 'jal-utils) +(require 'jal-build-maven) +(require 'jal-build-gradle) (declare-function jal-lsp-java-setup "jal-client-lsp") (declare-function jal-eglot-java-setup "jal-client-eglot") @@ -292,5 +300,5 @@ Returns the list of agent configurations found, or nil." (warn "JAL: Search for agents skipped. Prerequisites not met.") nil)) -(provide 'java-agent-loader) -;;; java-agent-loader.el ends here +(provide 'jal) +;;; jal.el ends here diff --git a/java-agent-loader-known-agents.el b/java-agent-loader-known-agents.el deleted file mode 100644 index 3fe17ca..0000000 --- a/java-agent-loader-known-agents.el +++ /dev/null @@ -1,36 +0,0 @@ -;;; java-agent-loader-known-agents.el --- Known agents registry for JAL -*- lexical-binding: t; -*- - -;; This program is free software: you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation, either version 3 of the License, or -;; (at your option) any later version. - -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. - -;; You should have received a copy of the GNU General Public License -;; along with this program. If not, see . - -;; Author: Saulo Toledo - -;;; Commentary: -;; This module provides a registry of commonly used Java agents with sensible defaults. - -;;; Code: - -(defvar jal-known-agents - '( - ("lombok" :jar-path "org/projectlombok/%a/%v/%a-%v.jar" :params "") - ("opentelemetry-javaagent" :jar-path "io/opentelemetry/javaagent/%a/%v/%a-%v.jar") - ("org.jacoco.agent" :jar-path "org/jacoco/%a/%v/%a-%v-runtime.jar")) - "Registry of known Java agents with default configurations. -Each entry is either: -- (ARTIFACT-ID) : Use defaults -- (ARTIFACT-ID . PROPS) : Specify properties - -PROPS is a plist with keys :params and :jar-path.") - -(provide 'java-agent-loader-known-agents) -;;; java-agent-loader-known-agents.el ends here diff --git a/tests/java-agent-loader-test.el b/tests/jal-test.el similarity index 97% rename from tests/java-agent-loader-test.el rename to tests/jal-test.el index 3d37a57..77c9e55 100644 --- a/tests/java-agent-loader-test.el +++ b/tests/jal-test.el @@ -1,4 +1,4 @@ -;;; java-agent-loader-test.el --- ERT tests for Java Agent Loader -*- lexical-binding: t; -*- +;;; jal-test.el --- ERT tests for Java Agent Loader (JAL) -*- lexical-binding: t; -*- ;; This program is free software: you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by @@ -42,7 +42,7 @@ ;; jal-vars ;; --------------------------------------------------------------------------- -(require 'java-agent-loader-vars) +(require 'jal-vars) (ert-deftest jal-test/vars-defaults () "Core defcustoms start at sensible defaults." @@ -58,7 +58,7 @@ ;; jal-known-agents ;; --------------------------------------------------------------------------- -(require 'java-agent-loader-known-agents) +(require 'jal-known-agents) (ert-deftest jal-test/known-agents-not-empty () "`jal-known-agents' contains at least the bundled agents." @@ -69,7 +69,7 @@ ;; jal-utils / jal--merge-agent-configs ;; --------------------------------------------------------------------------- -(require 'java-agent-loader-utils) +(require 'jal-utils) (ert-deftest jal-test/merge-empty-user-agents () "Merging nil user agents returns known agents unchanged." @@ -102,7 +102,7 @@ ;; jal--detect-build-system ;; --------------------------------------------------------------------------- -(require 'java-agent-loader) +(require 'jal) (ert-deftest jal-test/detect-build-system-maven () "Detects Maven when pom.xml is present." @@ -154,7 +154,7 @@ "Return the list of command-line arguments to start JDTLS." '("java" "-jar" "jdtls.jar")) -(require 'java-agent-loader-client-lsp) +(require 'jal-client-lsp) (ert-deftest jal-test/lsp-setup-installs-advice () "`jal-lsp-java-setup' installs the around advice on lsp-java--ls-command." @@ -235,7 +235,7 @@ The return value is a cons cell as expected by Eglot’s server connection logic Returns the first matching executable in the current PATH." (executable-find "java")) -(require 'java-agent-loader-client-eglot) +(require 'jal-client-eglot) (ert-deftest jal-test/eglot-setup-installs-advice () "`jal-eglot-java-setup' installs the around advice on eglot-java--eclipse-jdt-contact." @@ -301,7 +301,7 @@ Returns the first matching executable in the current PATH." ;; jal-build-gradle helpers ;; --------------------------------------------------------------------------- -(require 'java-agent-loader-build-gradle) +(require 'jal-build-gradle) (ert-deftest jal-test/gradle-parse-empty-output () "Parsing empty Gradle init output returns nil." @@ -340,7 +340,7 @@ Returns the first matching executable in the current PATH." ;; jal-build-maven helpers ;; --------------------------------------------------------------------------- -(require 'java-agent-loader-build-maven) +(require 'jal-build-maven) (ert-deftest jal-test/maven-extract-version-3-parts () "Extracts version from 3-part G:A:V coordinate." @@ -368,5 +368,5 @@ Returns the first matching executable in the current PATH." (let ((output "[INFO] BUILD SUCCESS\n[INFO] BUILD SUCCESS")) (should (null (jal--maven-extract-agent-dependency-info output "lombok"))))) -(provide 'java-agent-loader-test) -;;; java-agent-loader-test.el ends here +(provide 'jal-test) +;;; jal-test.el ends here