Index: contrib/abcl-asdf/maven-embedder.lisp
===================================================================
--- contrib/abcl-asdf/maven-embedder.lisp	(revision 14464)
+++ contrib/abcl-asdf/maven-embedder.lisp	(working copy)
@@ -175,13 +175,13 @@
       (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.
+  "Returns an implementation of the org.eclipse.aether.connector.wagon.WagonProvider contract.
 
 The implementation is specified as Lisp closures.  Currently, it only
 specializes the lookup() method if passed an 'http' role hint."
   (unless *init* (init))
   (java:jinterface-implementation 
-   "org.sonatype.aether.connector.wagon.WagonProvider"
+   "org.eclipse.aether.connector.wagon.WagonProvider"
    "lookup"
    (lambda (role-hint)
      (cond 
@@ -197,23 +197,22 @@
      (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"))))
+  (or (ignore-errors (#"newServiceLocator" 'org.apache.maven.repository.internal.MavenRepositorySystemUtils)) ;; maven-3.1.0
+      (ignore-errors (java:jnew "org.apache.maven.repository.internal.MavenServiceLocator")) ;; maven-3.0.4
+      (ignore-errors (java:jnew "org.apache.maven.repository.internal.DefaultServiceLocator"))))
 
 (defun make-repository-system ()
   (unless *init* (init))
   (let ((locator 
          (find-service-locator))
         (wagon-provider-class 
-         (java:jclass "org.sonatype.aether.connector.wagon.WagonProvider"))
+         (java:jclass "org.eclipse.aether.connector.wagon.WagonProvider"))
         (wagon-repository-connector-factory-class
-         (java:jclass "org.sonatype.aether.connector.wagon.WagonRepositoryConnectorFactory"))
+         (java:jclass "org.eclipse.aether.connector.wagon.WagonRepositoryConnectorFactory"))
         (repository-connector-factory-class 
-         (java:jclass "org.sonatype.aether.spi.connector.RepositoryConnectorFactory"))
+         (java:jclass "org.eclipse.aether.spi.connector.RepositoryConnectorFactory"))
         (repository-system-class
-         (java:jclass "org.sonatype.aether.RepositorySystem")))
+         (java:jclass "org.eclipse.aether.RepositorySystem")))
     (#"setServices" locator
                     wagon-provider-class
                    (java:jarray-from-list
@@ -226,9 +225,8 @@
             locator)))
         
 (defun make-session (repository-system)
-  "Construct a new org.sonatype.aether.RepositorySystemSession from REPOSITORY-SYSTEM"
-  (let ((session 
-         (java:jnew (jss:find-java-class "MavenRepositorySystemSession")))
+  "Construct a new org.eclipse.aether.RepositorySystemSession from REPOSITORY-SYSTEM"
+  (let ((session (#"newSession" 'org.apache.maven.repository.internal.MavenRepositorySystemUtils))
         (local-repository 
          (java:jnew (jss:find-java-class "LocalRepository")
                   (namestring (merge-pathnames ".m2/repository/"
@@ -236,13 +234,14 @@
     (#"setLocalRepositoryManager" 
      session
      (#"newLocalRepositoryManager" repository-system
+                                   session
                                    local-repository))))
 
 (defparameter *maven-http-proxy* nil
   "A string containing the URI of an http proxy for Maven to use.")
 
 (defun make-proxy ()
-  "Return an org.sonatype.aether.repository.Proxy instance initialized from *MAVEN-HTTP-PROXY*."
+  "Return an org.eclipse.aether.repository.Proxy instance initialized from *MAVEN-HTTP-PROXY*."
   (unless *maven-http-proxy*
     (warn "No proxy specified in *MAVEN-HTTP-PROXY*")
     (return-from make-proxy nil))
@@ -256,11 +255,11 @@
                  (parse-integer (subseq authority (1+ (search ":" authority))))))
          ;; TODO allow specification of authentication
          (authentication java:+null+))
-    (jss:new 'org.sonatype.aether.repository.Proxy
+    (jss:new 'org.eclipse.aether.repository.Proxy
              scheme host port authentication)))
 
 (defparameter *repository-system*  nil
-  "The org.sonatype.aether.RepositorySystem used by the Maeven Aether connector.")
+  "The org.sonatype.eclipse.RepositorySystem used by the Maeven Aether connector.")
 (defun ensure-repository-system (&key (force nil))
   (when (or force (not *repository-system*))
     (setf *repository-system* (make-repository-system)))
@@ -298,9 +297,9 @@
   (unless *init* (init))
   (let* ((artifact-string (format nil "~A:~A:~A" group-id artifact-id version))
          (artifact 
-          (jss:new "org.sonatype.aether.util.artifact.DefaultArtifact" artifact-string))
+          (jss:new "org.eclipse.aether.artifact.DefaultArtifact" artifact-string))
          (artifact-request 
-          (java:jnew "org.sonatype.aether.resolution.ArtifactRequest")))
+          (java:jnew "org.eclipse.aether.resolution.ArtifactRequest")))
     (#"setArtifact" artifact-request artifact)
     (#"addRepository" artifact-request (ensure-remote-repository))
     (#"toString" (#"getFile" 
@@ -308,7 +307,7 @@
                                                       (ensure-session) artifact-request))))))
 
 (defun make-remote-repository (id type url) 
-  (jss:new 'aether.repository.RemoteRepository id type url))
+  (#"build" (jss:new "org.eclipse.aether.repository.RemoteRepository$Builder" id type url)))
 
 (defparameter *default-repository* 
    "http://repo1.maven.org/maven2/")
@@ -348,11 +347,11 @@
   (unless versionp
     (warn "Using LATEST for unspecified version."))
   (let* ((artifact
-          (java:jnew (jss:find-java-class "aether.util.artifact.DefaultArtifact")
+          (java:jnew (jss:find-java-class "org.eclipse.aether.artifact.DefaultArtifact")
                      (format nil "~A:~A:~A"
                              group-id artifact-id version)))
          (dependency 
-          (java:jnew (jss:find-java-class "aether.graph.Dependency")
+          (java:jnew (jss:find-java-class "org.eclipse.aether.graph.Dependency")
                      artifact (java:jfield (jss:find-java-class "JavaScopes") "RUNTIME")))
          (collect-request (java:jnew (jss:find-java-class "CollectRequest"))))
     (#"setRoot" collect-request dependency)
@@ -375,7 +374,7 @@
   (flet ((log (e) 
            (format *maven-verbose* "~&~A~%" (#"toString" e))))
     (java:jinterface-implementation 
-     "org.sonatype.aether.RepositoryListener"
+     "org.eclipse.aether.RepositoryListener"
      "artifactDeployed" 
      #'log
      "artifactDeploying" 
