abcl-asdf: fix for maven-3.5.0

Various fixups in a hack 'n slash to get maven-3.5.0 working.

From <https://maven.apache.org/docs/3.5.0/release-notes.html>:

    After Maven 3.3.9 was released, the Eclipse Aether project was
    retired and the code base was migrated to the Apache Maven
    project.

    The original goal for the 3.4.0 release was to replace Aether with
    the exact same code after migration to the Apache Maven project
    and then proceed with bug fixes to the resolver code as well as
    other areas of Maven.

    The migration of the code between the two foundations took longer
    than expected and as a result there were other changes committed
    to Maven core that were outside the scope of intent for 3.4.0.

    In order to refocus on the original intent for 3.4.0, the decision
    was taken to revert the Maven core history to the point of the
    3.3.9 release and merge in the desired changes one at a time.
parent fda888c9
......@@ -294,18 +294,19 @@ hint."
(declare (ignore wagon)))))
(defun find-service-locator ()
(or
(or
(ignore-errors
;; maven-3.1.0
(#"newServiceLocator" 'org.apache.maven.repository.internal.MavenRepositorySystemUtils))
;; maven-3.1.0 using org.eclipse.aether...
(jss:new "aether.impl.DefaultServiceLocator"))
(ignore-errors
;; maven-3.0.4
(java:jnew "org.apache.maven.repository.internal.MavenServiceLocator"))
(jss:new "org.apache.maven.repository.internal.MavenServiceLocator"))
(ignore-errors
(java:jnew "org.apache.maven.repository.internal.DefaultServiceLocator"))
(jss:new "org.apache.maven.repository.internal.DefaultServiceLocator"))
(ignore-errors
;; maven-3.1.0 using org.eclipse.aether...
(jss:find-java-class 'aether.impl.DefaultServiceLocator))))
;; maven-3.1.0
(#"newServiceLocator" 'org.apache.maven.repository.internal.MavenRepositorySystemUtils))))
(defun make-repository-system ()
(unless *init* (init))
......@@ -332,9 +333,9 @@ hint."
(repository-connector-factory-class
(or
(ignore-errors
(jss:find-java-class 'org.eclipse.aether.spi.connector.RepositoryConnectorFactory))
(ignore-errors
(jss:find-java-class 'aether.spi.connector.RepositoryConnectorFactory))
(ignore-errors
(jss:find-java-class 'org.eclipse.aether.spi.connector.RepositoryConnectorFactory))
(ignore-errors
(java:jclass "org.sonatype.aether.spi.connector.RepositoryConnectorFactory"))))
(repository-system-class
......@@ -366,24 +367,27 @@ hint."
(defun make-session (repository-system)
"Construct a new aether.RepositorySystemSession from the specified REPOSITORY-SYSTEM."
(let ((session
(or
(ignore-errors (#"newSession"
'org.apache.maven.repository.internal.MavenRepositorySystemUtils))
(ignore-errors (java:jnew (jss:find-java-class "MavenRepositorySystemSession")))))
(local-repository
(java:jnew (jss:find-java-class "LocalRepository")
(namestring (merge-pathnames ".m2/repository/"
(user-homedir-pathname))))))
(#"setLocalRepositoryManager"
session
(or
(ignore-errors ;; maven-3.1.0
(#"newLocalRepositoryManager"
repository-system session local-repository))
(ignore-errors
(#"newLocalRepositoryManager"
repository-system local-repository))))))
(with-aether ()
(let ((session
(or
(ignore-errors
(jss:new "MavenRepositorySystemSession"))
(ignore-errors
(#"newSession"
'org.apache.maven.repository.internal.MavenRepositorySystemUtils))))
(local-repository
(java:jnew (jss:find-java-class "LocalRepository")
(namestring (merge-pathnames ".m2/repository/"
(user-homedir-pathname))))))
(#"setLocalRepositoryManager"
session
(or
(ignore-errors ;; maven-3.1.0
(#"newLocalRepositoryManager"
repository-system session local-repository))
(ignore-errors
(#"newLocalRepositoryManager"
repository-system local-repository)))))))
(defparameter *maven-http-proxy* nil
"A string containing the URI of an http proxy for Maven to use.")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment