Opened 12 years ago
Closed 12 years ago
#262 closed defect (fixed)
fails to (require :jna)
Reported by: | Christoph Egger | Owned by: | Mark Evenson |
---|---|---|---|
Priority: | major | Milestone: | 1.1.0 |
Component: | abcl-contrib | Version: | 1.1.0-dev |
Keywords: | Cc: | siccegge@… | |
Parent Tickets: |
Description
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
Change History (8)
comment:1 Changed 12 years ago by
comment:2 Changed 12 years ago by
EVIL> (read-line (sys::process-output (sys::run-program "mvn" '("-version")))) "Warning: JAVA_HOME environment variable is not set." NIL
comment:3 Changed 12 years ago by
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 ;-)
comment:4 Changed 12 years ago by
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."
comment:5 Changed 12 years ago by
Milestone: | → 1.1.0 |
---|---|
Version: | → 1.1.0-dev |
comment:6 Changed 12 years ago by
comment:7 Changed 12 years ago by
Milestone: | 1.1.0 → 1.1.1 |
---|
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.
comment:8 Changed 12 years ago by
Milestone: | 1.1.1 → 1.1.0 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Note: See
TracTickets for help on using
tickets.
because this trac gives me a 500 if I try to attach the file:
http://cs.ucsb.edu/~egger/bt