Changeset 15097


Ignore:
Timestamp:
08/18/17 21:52:01 (5 weeks ago)
Author:
mevenson
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/abcl/contrib/abcl-asdf/maven.lisp

    r15093 r15097  
    295295
    296296(defun find-service-locator ()
    297   (or
     297  (or
     298   (ignore-errors
     299     ;; maven-3.1.0 using org.eclipse.aether...
     300     (jss:new "aether.impl.DefaultServiceLocator"))
     301   (ignore-errors
     302     ;; maven-3.0.4
     303     (jss:new "org.apache.maven.repository.internal.MavenServiceLocator"))
     304   (ignore-errors
     305     (jss:new "org.apache.maven.repository.internal.DefaultServiceLocator"))
    298306   (ignore-errors
    299307     ;; maven-3.1.0
    300      (#"newServiceLocator" 'org.apache.maven.repository.internal.MavenRepositorySystemUtils))
    301    (ignore-errors
    302      ;; maven-3.0.4
    303      (java:jnew "org.apache.maven.repository.internal.MavenServiceLocator"))
    304    (ignore-errors
    305      (java:jnew "org.apache.maven.repository.internal.DefaultServiceLocator"))
    306    (ignore-errors
    307      ;; maven-3.1.0 using org.eclipse.aether...
    308      (jss:find-java-class 'aether.impl.DefaultServiceLocator))))
     308     (#"newServiceLocator" 'org.apache.maven.repository.internal.MavenRepositorySystemUtils))))
     309
    309310
    310311(defun make-repository-system ()
     
    333334         (or
    334335          (ignore-errors
     336            (jss:find-java-class 'aether.spi.connector.RepositoryConnectorFactory))
     337          (ignore-errors
    335338            (jss:find-java-class 'org.eclipse.aether.spi.connector.RepositoryConnectorFactory))
    336           (ignore-errors
    337             (jss:find-java-class 'aether.spi.connector.RepositoryConnectorFactory))
    338339          (ignore-errors
    339340            (java:jclass "org.sonatype.aether.spi.connector.RepositoryConnectorFactory"))))
     
    367368(defun make-session (repository-system)
    368369  "Construct a new aether.RepositorySystemSession from the specified REPOSITORY-SYSTEM."
    369   (let ((session
    370          (or
    371           (ignore-errors (#"newSession"
    372                           'org.apache.maven.repository.internal.MavenRepositorySystemUtils))
    373           (ignore-errors (java:jnew (jss:find-java-class "MavenRepositorySystemSession")))))
    374         (local-repository
    375          (java:jnew (jss:find-java-class "LocalRepository")
    376                     (namestring (merge-pathnames ".m2/repository/"
    377                                                  (user-homedir-pathname))))))
    378     (#"setLocalRepositoryManager"
    379      session
    380      (or
    381       (ignore-errors      ;; maven-3.1.0
    382         (#"newLocalRepositoryManager"
    383          repository-system session local-repository))
    384       (ignore-errors
    385         (#"newLocalRepositoryManager"
    386          repository-system local-repository))))))
     370  (with-aether ()
     371    (let ((session
     372           (or
     373            (ignore-errors
     374              (jss:new "MavenRepositorySystemSession"))
     375            (ignore-errors
     376              (#"newSession"
     377               'org.apache.maven.repository.internal.MavenRepositorySystemUtils))))
     378          (local-repository
     379           (java:jnew (jss:find-java-class "LocalRepository")
     380                      (namestring (merge-pathnames ".m2/repository/"
     381                                                   (user-homedir-pathname))))))
     382      (#"setLocalRepositoryManager"
     383       session
     384       (or
     385        (ignore-errors      ;; maven-3.1.0
     386          (#"newLocalRepositoryManager"
     387           repository-system session local-repository))
     388        (ignore-errors
     389          (#"newLocalRepositoryManager"
     390           repository-system local-repository)))))))
    387391
    388392(defparameter *maven-http-proxy* nil
Note: See TracChangeset for help on using the changeset viewer.