[armedbear-cvs] r14259 - in trunk/abcl/contrib: . abcl-asdf
mevenson at common-lisp.net
mevenson at common-lisp.net
Wed Nov 28 11:06:09 UTC 2012
Author: mevenson
Date: Wed Nov 28 03:06:03 2012
New Revision: 14259
Log:
abcl-asdf: restore the ability to use maven-3.0.3
Warn when interpreting alias for "com.sun.jna:jna".
Closes #268.
Modified:
trunk/abcl/contrib/README.markdown
trunk/abcl/contrib/abcl-asdf/README.markdown
trunk/abcl/contrib/abcl-asdf/abcl-asdf.asd
trunk/abcl/contrib/abcl-asdf/maven-embedder.lisp
Modified: trunk/abcl/contrib/README.markdown
==============================================================================
--- trunk/abcl/contrib/README.markdown Wed Nov 28 01:16:24 2012 (r14258)
+++ trunk/abcl/contrib/README.markdown Wed Nov 28 03:06:03 2012 (r14259)
@@ -38,7 +38,7 @@
---
A collection of various useful JVM artifacts downloaded and cached by
-the Aether Maven connector. Requires the maven-3.0.4 executable "mvn"
+the Aether Maven connector. Requires the maven-3.0.3 executable "mvn"
(or "mvn.bat" under MSFT Windows) to be in the current processes's path.
jna
@@ -64,7 +64,7 @@
Mark <evenson.not.org at gmail.com>
Created: 2011-09-11
-Revised: 2012-10-12
+Revised: 2012-11-28
Modified: trunk/abcl/contrib/abcl-asdf/README.markdown
==============================================================================
--- trunk/abcl/contrib/abcl-asdf/README.markdown Wed Nov 28 01:16:24 2012 (r14258)
+++ trunk/abcl/contrib/abcl-asdf/README.markdown Wed Nov 28 03:06:03 2012 (r14259)
@@ -159,45 +159,10 @@
[1]: http://www.iris-reasoner.org/
-Releases
---------
-
-### 9.9.2 2012-11-09
-
-
-
-
-### 0.7.0 2012-02-05
-
-Plausibly work under MSFT operating systems.
-
-Working with maven-3.0.4.
-
-### 0.5.0 2012-01-22
-
- o just bless this as a release to stablize its offered API "as is"
-
- o definitely failing under MSFT
-
- o ASDF version has to be a three value integer (i.e. no "-snapshot"
- after version). Should be fixed with appropiate :AROUND method
- as implementation specific monkeypatch.
-
-
-### 0.4.1 2011-09-06
-
- o locating the proper Maven3 libraries could work in more places
-
- o untested under Windows
-
- o more information should be optionally available when downloading
- as this process can potentially take a long time.
-
-
#### Colophon
Mark <evenson.not.org at gmail.com>
Created: 2011-01-01
- Revised: 2012-11-09
+ Revised: 2012-11-28
Modified: trunk/abcl/contrib/abcl-asdf/abcl-asdf.asd
==============================================================================
--- trunk/abcl/contrib/abcl-asdf/abcl-asdf.asd Wed Nov 28 01:16:24 2012 (r14258)
+++ trunk/abcl/contrib/abcl-asdf/abcl-asdf.asd Wed Nov 28 03:06:03 2012 (r14259)
@@ -2,7 +2,7 @@
(asdf:defsystem :abcl-asdf
:author "Mark Evenson"
- :version "0.9.2"
+ :version "1.0.0"
:depends-on (jss)
:components
((:module packages :pathname ""
Modified: trunk/abcl/contrib/abcl-asdf/maven-embedder.lisp
==============================================================================
--- trunk/abcl/contrib/abcl-asdf/maven-embedder.lisp Wed Nov 28 01:16:24 2012 (r14258)
+++ trunk/abcl/contrib/abcl-asdf/maven-embedder.lisp Wed Nov 28 03:06:03 2012 (r14259)
@@ -144,7 +144,7 @@
(>= minor 1))
(and (>= major 3)
(>= minor 0)
- (>= patch 4)))))
+ (>= patch 3)))))
(defparameter *init* nil)
@@ -154,18 +154,22 @@
(setf *mvn-libs-directory* (find-mvn-libs)))
(unless (and *mvn-libs-directory*
(probe-file *mvn-libs-directory*))
- (error "You must download maven-3.0.4 or later from http://maven.apache.org/download.html, then set ABCL-ASDF:*MVN-DIRECTORY* appropiately."))
+ (error "Please obtain and install maven-3.0.4 locally from http://maven.apache.org/download.html, then set ABCL-ASDF:*MVN-DIRECTORY* appropiately."))
(unless (ensure-mvn-version)
- (error "We need maven-3.0.4 or later.")) (add-directory-jars-to-class-path *mvn-libs-directory* nil)
+ (error "We need maven-3.0.3 or later.")) (add-directory-jars-to-class-path *mvn-libs-directory* nil)
(setf *init* t))
-(defparameter *http-wagon-implementations*
- ;;; maven-3.0.3 reported as not working with all needed functionality
- `("org.apache.maven.wagon.providers.http.HttpWagon" ;; introduced as default with maven-3.0.4
- "org.apache.maven.wagon.providers.http.LightweightHttpWagon")
- "A list of possible candidate implementations that provide access to http and https resources.
+(defun find-http-wagon ()
+ "Find an implementation of the object that provides access to http and https resources.
-Supposedly configurable with the java.net.protocols (c.f. reference maso2000 in the Manual.)")
+Supposedly configurable with the java.net.protocols (c.f. reference
+maso2000 in the Manual.)"
+ (handler-case
+ ;; maven-3.0.4
+ (java:jnew "org.apache.maven.wagon.providers.http.HttpWagon")
+ (error ()
+ ;; maven-3.0.3 reported as not working with all needed functionality
+ (java:jnew "org.apache.maven.wagon.providers.http.LightweightHttpWagon"))))
(defun make-wagon-provider ()
"Returns an implementation of the org.sonatype.aether.connector.wagon.WagonProvider contract.
@@ -179,7 +183,7 @@
(lambda (role-hint)
(cond
((find role-hint '("http" "https") :test #'string-equal)
- (some (lambda (provider) (java:jnew provider)) *http-wagon-implementations*))
+ (find-http-wagon))
(t
(progn
(format *maven-verbose*
@@ -189,10 +193,16 @@
(lambda (wagon)
(declare (ignore wagon)))))
+(defun find-service-locator ()
+ (handler-case
+ (java:jnew "org.apache.maven.repository.internal.MavenServiceLocator") ;; maven-3.0.4
+ (error ()
+ (java:jnew "org.apache.maven.repository.internal.DefaultServiceLocator"))))
+
(defun make-repository-system ()
(unless *init* (init))
(let ((locator
- (java:jnew "org.apache.maven.repository.internal.MavenServiceLocator"))
+ (find-service-locator))
(wagon-provider-class
(java:jclass "org.sonatype.aether.connector.wagon.WagonProvider"))
(wagon-repository-connector-factory-class
@@ -415,17 +425,13 @@
(let ((result (split-string string ":")))
(cond
((= (length result) 3)
- (resolve-dependencies (first result) (second result) (third result)))
+ (resolve-dependencies
+ (first result) (second result) (third result)))
((string= string "com.sun.jna:jna")
- (resolve-dependencies "net.java.dev.jna" "jna" "3.4.0"))
+ (warn "Replacing request for no longer available com.sun.jna:jna with net.java.dev.jna:jna")
+ (resolve-dependencies "net.java.dev.jna" "jna" "LATEST"))
(t
(apply #'resolve-dependencies result)))))
-#+nil
-(defmethod resolve ((mvn asdf:mvn))
- (with-slots (asdf::group-id asdf::artifact-id asdf::version)
- (asdf:ensure-parsed-mvn mvn)
- (resolve-dependencies (format nil "~A:~A:~A" asdf::group-id asdf::artifact-id asdf::version))))
-
;;; Currently the last file listed in ASDF
(provide 'abcl-asdf)
More information about the armedbear-cvs
mailing list