[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/javaimp 00c0e37: Fixes for build tool calls
From: |
Filipp Gunbin |
Subject: |
[elpa] externals/javaimp 00c0e37: Fixes for build tool calls |
Date: |
Thu, 4 Nov 2021 13:29:17 -0400 (EDT) |
branch: externals/javaimp
commit 00c0e37a5aecbf5d41f0fef8cdc238f8da309286
Author: Filipp Gunbin <fgunbin@fastmail.fm>
Commit: Filipp Gunbin <fgunbin@fastmail.fm>
Fixes for build tool calls
---
javaimp-gradle.el | 9 +++++----
javaimp-maven.el | 11 +++++++----
javaimp-util.el | 2 +-
3 files changed, 13 insertions(+), 9 deletions(-)
diff --git a/javaimp-gradle.el b/javaimp-gradle.el
index 89456a7..2777b72 100644
--- a/javaimp-gradle.el
+++ b/javaimp-gradle.el
@@ -108,9 +108,10 @@ descriptor."
(defun javaimp--gradle-fetch-dep-jars (module ids)
(javaimp--gradle-call
- ;; Always invoke on orig file (which is root build script)
- ;; because module's own file may not exist, even if reported by
- ;; Gradle as project.buildFile
+ ;; Always invoke on orig file (which is root build script) because
+ ;; module's own file may not exist, even if reported by Gradle as
+ ;; project.buildFile. Furthermore, we use that file's directory to
+ ;; determine for local build tool wrappers.
(javaimp-module-file-orig module)
(lambda ()
(re-search-forward "^dep-jars=\\(.*\\)$")
@@ -129,7 +130,7 @@ descriptor."
"gradlew.bat"
"gradlew"))
(program (if (file-exists-p local-gradlew)
- local-gradlew
+ (concat default-directory local-gradlew)
javaimp-gradle-program)))
(javaimp--call-build-tool
program
diff --git a/javaimp-maven.el b/javaimp-maven.el
index 6a62956..c4b7269 100644
--- a/javaimp-maven.el
+++ b/javaimp-maven.el
@@ -195,16 +195,19 @@ are somewhat arbitrary."
(search-forward "Dependencies classpath:")
(forward-line 1)
(javaimp--split-native-path (thing-at-point 'line)))
- "dependency:build-classpath"))
+ "dependency:build-classpath"
+ ;; Invoke in original file's directory because there may be local
+ ;; build tool wrapper.
+ (file-name-directory (javaimp-module-file-orig module))))
-(defun javaimp--maven-call (file handler task)
- (let* ((default-directory (file-name-directory file))
+(defun javaimp--maven-call (file handler task &optional dir)
+ (let* ((default-directory (or dir (file-name-directory file)))
;; Prefer local mvn wrapper
(local-mvnw (if (memq system-type '(cygwin windows-nt))
"mvnw.cmd"
"mvnw"))
(program (if (file-exists-p local-mvnw)
- local-mvnw
+ (concat default-directory local-mvnw)
javaimp-mvn-program)))
(javaimp--call-build-tool
program
diff --git a/javaimp-util.el b/javaimp-util.el
index 22dc917..a5cac64 100644
--- a/javaimp-util.el
+++ b/javaimp-util.el
@@ -286,7 +286,7 @@ unchanged."
(defun javaimp--call-build-tool (program handler &rest args)
"Run PROGRAM with ARGS, then call HANDLER in the temporary buffer
with point set to eob and return its result."
- (message "Calling program: %s %s" program (string-join args " "))
+ (message "Calling: %s %s" program (string-join args " "))
(with-temp-buffer
(let ((status
(let ((coding-system-for-read
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [elpa] externals/javaimp 00c0e37: Fixes for build tool calls,
Filipp Gunbin <=