Changeset 14905 for trunk/abcl/contrib/abcl-asdf/maven-embedder.lisp
- Timestamp:
- 10/21/16 08:40:31 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abcl/contrib/abcl-asdf/maven-embedder.lisp
r14845 r14905 119 119 (list (make-pathname :defaults (merge-pathnames "../lib/" (find-mvn)) 120 120 :name nil :type nil) 121 (ignore-errors 122 (make-pathname :defaults (merge-pathnames "lib/" (mvn-home)) 123 :name nil :type nil)) 121 124 ;; library location for homebrew maven package on OS X 122 125 (make-pathname :defaults (merge-pathnames "../libexec/lib/" (find-mvn)) … … 163 166 (error "Failed to determine Maven version: ~A." e)))) 164 167 168 (defun mvn-home () 169 "If the Maven executable can be invoked, introspect the value 170 reported as Maven home." 171 (handler-case 172 (multiple-value-bind (output error-output status) 173 (uiop/run-program:run-program 174 (format nil "~a --version" (truename (find-mvn))) 175 :output :string 176 :error-output :string) 177 (unless (zerop status) 178 (error "Failed to invoke Maven executable to introspect library locations: ~a." error-output)) 179 (let ((pattern (#"compile" 180 'regex.Pattern 181 "Maven home: (.+)$"))) 182 (with-input-from-string (s output) 183 (do ((line (read-line s nil :eof) 184 (read-line s nil :eof))) 185 ((or (not line) (eq line :eof)) nil) 186 (let ((matcher (#"matcher" pattern line))) 187 (when (#"find" matcher) 188 (return-from mvn-home (uiop/pathname:ensure-directory-pathname (#"group" matcher 1))))))))) 189 (subprocess-error (e) 190 (error "Failed to invoke Maven executable to introspect library locations: ~a." e)))) 191 165 192 (defun ensure-mvn-version () 166 193 "Return t if Maven version is 3.0.3 or greater." … … 179 206 180 207 (defparameter *init* nil) 181 208 182 209 (defun init (&optional &key (force nil)) 183 210 "Run the initialization strategy to bootstrap a Maven dependency node.
Note: See TracChangeset
for help on using the changeset viewer.