Changeset 14259


Ignore:
Timestamp:
11/28/12 11:06:03 (8 years ago)
Author:
Mark Evenson
Message:

abcl-asdf: restore the ability to use maven-3.0.3

Warn when interpreting alias for "com.sun.jna:jna".

Closes #268.

Location:
trunk/abcl/contrib
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/abcl/contrib/README.markdown

    r14181 r14259  
    3939   
    4040A collection of various useful JVM artifacts downloaded and cached by
    41 the Aether Maven connector.  Requires the maven-3.0.4 executable "mvn"
     41the Aether Maven connector.  Requires the maven-3.0.3 executable "mvn"
    4242(or "mvn.bat" under MSFT Windows) to be in the current processes's path.
    4343   
     
    6565Mark <evenson.not.org@gmail.com>
    6666Created:  2011-09-11
    67 Revised:  2012-10-12
     67Revised:  2012-11-28
    6868
    6969
  • trunk/abcl/contrib/abcl-asdf/README.markdown

    r14236 r14259  
    160160[1]:  http://www.iris-reasoner.org/
    161161
    162 Releases
    163 --------
    164 
    165 ### 9.9.2 2012-11-09
    166 
    167 
    168 
    169 
    170 ### 0.7.0 2012-02-05
    171 
    172 Plausibly work under MSFT operating systems.
    173 
    174 Working with maven-3.0.4.
    175 
    176 ### 0.5.0 2012-01-22
    177 
    178    o  just bless this as a release to stablize its offered API "as is"
    179    
    180    o  definitely failing under MSFT
    181    
    182    o  ASDF version has to be a three value integer (i.e. no "-snapshot"
    183       after version).  Should be fixed with appropiate :AROUND method
    184       as implementation specific monkeypatch.
    185        
    186 
    187 ### 0.4.1 2011-09-06
    188 
    189     o  locating the proper Maven3 libraries could work in more places
    190    
    191     o  untested under Windows
    192    
    193     o  more information should be optionally available when downloading
    194        as this process can potentially take a long time.
    195 
    196 
    197162#### Colophon
    198163
     
    200165   
    201166    Created: 2011-01-01
    202     Revised: 2012-11-09
     167    Revised: 2012-11-28
    203168   
  • trunk/abcl/contrib/abcl-asdf/abcl-asdf.asd

    r14240 r14259  
    33(asdf:defsystem :abcl-asdf
    44  :author "Mark Evenson"
    5   :version "0.9.2"
     5  :version "1.0.0"
    66  :depends-on (jss)
    77  :components
  • trunk/abcl/contrib/abcl-asdf/maven-embedder.lisp

    r14233 r14259  
    145145     (and (>= major 3)
    146146          (>= minor 0)
    147           (>= patch 4)))))
     147          (>= patch 3)))))
    148148
    149149(defparameter *init* nil)
     
    155155  (unless (and *mvn-libs-directory*
    156156               (probe-file *mvn-libs-directory*))
    157    (error "You must download maven-3.0.4 or later from http://maven.apache.org/download.html, then set ABCL-ASDF:*MVN-DIRECTORY* appropiately."))
     157   (error "Please obtain and install maven-3.0.4 locally from http://maven.apache.org/download.html, then set ABCL-ASDF:*MVN-DIRECTORY* appropiately."))
    158158 (unless (ensure-mvn-version)
    159    (error "We need maven-3.0.4 or later."))  (add-directory-jars-to-class-path *mvn-libs-directory* nil)
     159   (error "We need maven-3.0.3 or later."))  (add-directory-jars-to-class-path *mvn-libs-directory* nil)
    160160  (setf *init* t))
    161161
    162 (defparameter *http-wagon-implementations*
    163   ;;; maven-3.0.3 reported as not working with all needed functionality
    164   `("org.apache.maven.wagon.providers.http.HttpWagon" ;; introduced as default with maven-3.0.4
    165     "org.apache.maven.wagon.providers.http.LightweightHttpWagon")
    166   "A list of possible candidate implementations that provide access to http and https resources.
    167 
    168 Supposedly configurable with the java.net.protocols (c.f. reference maso2000 in the Manual.)")
     162(defun find-http-wagon ()
     163  "Find an implementation of the object that provides access to http and https resources.
     164
     165Supposedly configurable with the java.net.protocols (c.f. reference
     166maso2000 in the Manual.)"
     167  (handler-case
     168      ;; maven-3.0.4
     169      (java:jnew "org.apache.maven.wagon.providers.http.HttpWagon")
     170    (error ()
     171      ;; maven-3.0.3 reported as not working with all needed functionality
     172      (java:jnew  "org.apache.maven.wagon.providers.http.LightweightHttpWagon"))))
    169173
    170174(defun make-wagon-provider ()
     
    180184     (cond
    181185       ((find role-hint '("http" "https") :test #'string-equal)
    182         (some (lambda (provider) (java:jnew provider)) *http-wagon-implementations*))
     186        (find-http-wagon))
    183187       (t
    184188        (progn
     
    190194     (declare (ignore wagon)))))
    191195
     196(defun find-service-locator ()
     197  (handler-case
     198      (java:jnew "org.apache.maven.repository.internal.MavenServiceLocator") ;; maven-3.0.4
     199    (error ()
     200      (java:jnew "org.apache.maven.repository.internal.DefaultServiceLocator"))))
     201
    192202(defun make-repository-system ()
    193203  (unless *init* (init))
    194204  (let ((locator
    195          (java:jnew "org.apache.maven.repository.internal.MavenServiceLocator"))
     205         (find-service-locator))
    196206        (wagon-provider-class
    197207         (java:jclass "org.sonatype.aether.connector.wagon.WagonProvider"))
     
    416426    (cond
    417427      ((= (length result) 3)
    418        (resolve-dependencies (first result) (second result) (third result)))
     428       (resolve-dependencies
     429        (first result) (second result) (third result)))
    419430      ((string= string "com.sun.jna:jna")
    420        (resolve-dependencies "net.java.dev.jna" "jna" "3.4.0"))
     431       (warn "Replacing request for no longer available com.sun.jna:jna with net.java.dev.jna:jna")
     432       (resolve-dependencies "net.java.dev.jna" "jna" "LATEST"))
    421433      (t
    422434       (apply #'resolve-dependencies result)))))
    423435 
    424 #+nil
    425 (defmethod resolve ((mvn asdf:mvn))
    426   (with-slots (asdf::group-id asdf::artifact-id asdf::version)
    427       (asdf:ensure-parsed-mvn mvn)
    428     (resolve-dependencies (format nil "~A:~A:~A" asdf::group-id asdf::artifact-id asdf::version))))
    429 
    430436;;; Currently the last file listed in ASDF
    431437(provide 'abcl-asdf)
Note: See TracChangeset for help on using the changeset viewer.