#262: fails to (require :jna) --------------------------------------------+------------------------------- Reporter: https://openid.fau.de/eg74yneg | Owner: mevenson Type: defect | Status: new Priority: major | Milestone: Component: abcl-contrib | Version: Keywords: | --------------------------------------------+------------------------------- {{{ The value NIL is not of type REAL. [Condition of type TYPE-ERROR] }}}
backtrace attached. maven 3.0.4 is installed
{{{ mvn org.apache.maven.plugins:maven-dependency-plugin:2.1:get -DrepoUrl=repo.maven.apache.org -Dartifact=net.java.dev.jna:jna:3.5.1 }}}
Works just fine and downloads jna
#262: fails to (require :jna) --------------------------------------------+------------------------------- Reporter: https://openid.fau.de/eg74yneg | Owner: mevenson Type: defect | Status: new Priority: major | Milestone: Component: abcl-contrib | Version: Keywords: | --------------------------------------------+-------------------------------
Comment(by https://openid.fau.de/eg74yneg):
because this trac gives me a 500 if I try to attach the file:
#262: fails to (require :jna) --------------------------------------------+------------------------------- Reporter: https://openid.fau.de/eg74yneg | Owner: mevenson Type: defect | Status: new Priority: major | Milestone: Component: abcl-contrib | Version: Keywords: | --------------------------------------------+-------------------------------
Comment(by https://openid.fau.de/eg74yneg):
{{{ EVIL> (read-line (sys::process-output (sys::run-program "mvn" '("-version")))) "Warning: JAVA_HOME environment variable is not set." NIL }}}
#262: fails to (require :jna) --------------------------------------------+------------------------------- Reporter: https://openid.fau.de/eg74yneg | Owner: mevenson Type: defect | Status: new Priority: major | Milestone: Component: abcl-contrib | Version: Keywords: | --------------------------------------------+-------------------------------
Comment(by https://openid.fau.de/eg74yneg):
Couldn't the first matching line be used instead of failing if the first line doesn't work out? And maybe something more meaningfull returned than "The value NIL is not of type REAL." when abcl-asdf can't parse the maven versionstring ;-)
#262: fails to (require :jna) --------------------------------------------+------------------------------- Reporter: https://openid.fau.de/eg74yneg | Owner: mevenson Type: defect | Status: new Priority: major | Milestone: Component: abcl-contrib | Version: Keywords: | --------------------------------------------+-------------------------------
Comment(by https://openid.fau.de/eg74yneg):
Following patch works for me
{{{ Index: contrib/abcl-asdf/maven-embedder.lisp =================================================================== --- contrib/abcl-asdf/maven-embedder.lisp (revision 14231) +++ contrib/abcl-asdf/maven-embedder.lisp (working copy) @@ -114,21 +114,21 @@
(defun mvn-version () "Return the Maven version used by the Aether connector." - (let* ((line - (read-line (sys::process-output - (sys::run-program - (namestring (find-mvn)) '("-version"))))) - (pattern (#"compile" - 'regex.Pattern - "Apache Maven ([0-9]+)\.([0-9]+)\.([0-9]+)")) - (matcher (#"matcher" pattern line)) - (found (#"find" matcher))) - (unless found - (return-from mvn-version nil)) - (mapcar #'parse-integer - `(,(#"group" matcher 1) - ,(#"group" matcher 2) - ,(#"group" matcher 3))))) + (let ((stream (sys::process-output + (sys::run-program + (namestring (find-mvn)) '("-version"))))) + (do ((line (read-line stream nil) (read-line stream nil)) + (pattern (#"compile" + 'regex.Pattern + "Apache Maven ([0-9]+)\.([0-9]+)\.([0-9]+)"))) + ((not line) nil) + (let ((matcher (#"matcher" pattern line))) + (when (#"find" matcher) + (return-from mvn-version + (mapcar #'parse-integer + `(,(#"group" matcher 1) + ,(#"group" matcher 2) + ,(#"group" matcher 3))))))))
(defun ensure-mvn-version () "Return t if Maven version is 3.0.3 or greater." }}}
#262: fails to (require :jna) --------------------------------------------+------------------------------- Reporter: https://openid.fau.de/eg74yneg | Owner: mevenson Type: defect | Status: new Priority: major | Milestone: 1.1.0 Component: abcl-contrib | Version: 1.1.0-dev Keywords: | --------------------------------------------+------------------------------- Changes (by mevenson):
* version: => 1.1.0-dev * milestone: => 1.1.0
#262: fails to (require :jna) --------------------------------------------+------------------------------- Reporter: https://openid.fau.de/eg74yneg | Owner: mevenson Type: defect | Status: new Priority: major | Milestone: 1.1.1 Component: abcl-contrib | Version: 1.1.0-dev Keywords: | --------------------------------------------+------------------------------- Changes (by mevenson):
* milestone: 1.1.0 => 1.1.1
Comment:
Needs further triage for failing cases.
Possibly attempt to set the process's M2_HOME environment to the pathname of a suitable Maven.
Now possible to specify a :CLASSNAME in the ASDF definition that bypasses any attempt to use Maven.
#262: fails to (require :jna) ---------------------------------------------+------------------------------ Reporter: https://openid.fau.de/eg74yneg | Owner: mevenson Type: defect | Status: closed Priority: major | Milestone: 1.1.0 Component: abcl-contrib | Version: 1.1.0-dev Resolution: fixed | Keywords: ---------------------------------------------+------------------------------ Changes (by mevenson):
* status: new => closed * resolution: => fixed * milestone: 1.1.1 => 1.1.0
armedbear-ticket@common-lisp.net