Changeset 15015


Ignore:
Timestamp:
05/23/17 11:00:24 (5 months ago)
Author:
mevenson
Message:

Move the failing test for maven dependencies into ABCL-ASDF

This test only makes sends if ABCL-ASDF can be loaded.

Fixed 't/resolve-multiple-maven-dependencies.lisp' to running, but now
failing on download of HeRMIT artifact:

Java exception
'org.eclipse.aether.resolution.DependencyResolutionException?: The
following artifacts could not be resolved:
net.sourceforge.owlapi:org.semanticweb.hermit:jar:1.3.8.413,
net.sourceforge.owlapi:owlapi-distribution:jar:4.2.6,
net.sourceforge.owlapi:pellet-cli-ignazio1977:jar:2.4.0-ignazio1977,
org.semanticweb.elk:elk-reasoner:jar:0.4.3,
net.sourceforge.owlapi:owlexplanation:jar:2.0.0: Could not find
artifact net.sourceforge.owlapi:org.semanticweb.hermit:jar:1.3.8.413'.

Location:
trunk/abcl/contrib/abcl-asdf
Files:
2 edited
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/abcl/contrib/abcl-asdf/abcl-asdf-tests.asd

    r15010 r15015  
    1616                        :components ((:test-file "log4j")
    1717                                     (:test-file "resolve")
     18                                     (:test-file "resolve-multiple-maven-dependencies")
    1819                                     (:test-file "maven"))))
    1920  :perform (asdf:test-op (op c)
  • trunk/abcl/contrib/abcl-asdf/t/resolve-multiple-maven-dependencies.lisp

    r15014 r15015  
     1(in-package :cl-user)
     2(require :jss)
     3
    14;; https://maven.apache.org/guides/introduction/introduction-to-optional-and-excludes-dependencies.html
    25;; if a artifact is root then its optional dependencies are
     
    2427 "
    2528  (let ((collect-request (java:jnew (jss:find-java-class "CollectRequest")))
    26   (exclusions-collection (new 'hashset) )
     29  (exclusions-collection (jss:new 'hashset) )
    2730  (compile-scope #"JavaScopes.COMPILE"))
    2831    (loop for e  in exclusions
    29     for (groupid artifactid) = (split-at-char e #\:)
     32    for (groupid artifactid) = (abcl/build:split-string e #\:)
    3033    ;; If i have scope be compile-scope it doesn't get excluded!!
    31     for exclusion = (new 'aether.graph.Exclusion groupid artifactid "" "jar")
     34    for exclusion = (jss:new 'aether.graph.Exclusion groupid artifactid "" "jar")
    3235    do (#"add" exclusions-collection exclusion))
    3336    (loop for a in dependencies
    3437    for artifact = (abcl-asdf::make-artifact (#"replaceAll" a "/" ":"))
    35     for dependency = (new 'aether.graph.Dependency artifact compile-scope)
     38    for dependency = (jss:new 'aether.graph.Dependency artifact compile-scope)
    3639    do 
    3740       ;; setExclusions returns a new dependency. We have to use that. That passed dependency is not modified!
     
    4548    (loop for a in managed-dependencies
    4649    for artifact = (abcl-asdf::make-artifact (#"replaceAll" a "/" ":"))
    47     for dependency = (new 'aether.graph.Dependency artifact compile-scope)
     50    for dependency = (jss:new 'aether.graph.Dependency artifact compile-scope)
    4851    do (setq dependency (#"setExclusions" dependency exclusions-collection))
    4952       (#"addManagedDependency" collect-request dependency))
     
    5154       (abcl-asdf::ensure-repository-system)
    5255       (abcl-asdf::ensure-session) collect-request))
    53     (nodelist-generator (new 'PreorderNodeListGenerator))
    54     (dependency-request (new 'DependencyRequest)))
    55       (#"setRoot" dependency-request (#"getRoot" dependencies))
    56       (#"resolveDependencies" (abcl-asdf::ensure-repository-system) (abcl-asdf::ensure-session) dependency-request)
    57       (#"accept" (#"getRoot" dependencies) nodelist-generator)
    58       (split-at-char (#"getClassPath" nodelist-generator) #\:)
    59       )))
    60 
     56    (nodelist-generator (jss:new 'PreorderNodeListGenerator))
     57    (dependency-request (jss:new 'DependencyRequest)))
     58      (#"setRoot" dependency-request
     59                  (#"getRoot" dependencies))
     60      (#"resolveDependencies" (abcl-asdf::ensure-repository-system)
     61                              (abcl-asdf::ensure-session)
     62                              dependency-request)
     63      (#"accept" (#"getRoot" dependencies)
     64                 nodelist-generator)
     65      (abcl/build:split-string (#"getClassPath" nodelist-generator) #\:))))
    6166
    6267
    6368(prove:plan 3)
    64 (let ((deps  (resolve-multiple-maven-dependencies '("net.sourceforge.owlapi:org.semanticweb.hermit:1.3.8.413"
    65              "net.sourceforge.owlapi:owlapi-distribution:4.2.6"
    66              "net.sourceforge.owlapi/pellet-cli-ignazio1977/2.4.0-ignazio1977"
    67              "org.semanticweb.elk/elk-reasoner/0.4.3"
    68              "net.sourceforge.owlapi/owlexplanation/2.0.0")
    69            '("net.sourceforge.owlapi:owlapi-distribution:4.2.6")
    70            '("net.sourceforge.owlapi:owlapi-osgidistribution"
    71              "edu.stanford.protege:org.protege.editor.owl")
    72            )))
     69(let ((deps (resolve-multiple-maven-dependencies
     70             '("net.sourceforge.owlapi:org.semanticweb.hermit:1.3.8.413"
     71               "net.sourceforge.owlapi:owlapi-distribution:4.2.6"
     72               "net.sourceforge.owlapi/pellet-cli-ignazio1977/2.4.0-ignazio1977"
     73               "org.semanticweb.elk/elk-reasoner/0.4.3"
     74               "net.sourceforge.owlapi/owlexplanation/2.0.0")
     75             '("net.sourceforge.owlapi:owlapi-distribution:4.2.6")
     76             '("net.sourceforge.owlapi:owlapi-osgidistribution"
     77               "edu.stanford.protege:org.protege.editor.owl"))))
    7378  (prove:ok (= (length deps) 87))
    7479  (prove:ok (not (find "owlapi-osgidistribution" deps :test 'search)))
  • trunk/abcl/contrib/abcl-asdf/t/resolve.lisp

    r15010 r15015  
    55   (and result
    66        (format *standard-output* "~&~A~%" result)
    7         (type-p result 'cons))))
     7        (type-p result 'cons)))
     8 "Resolving ABCL from distributed Maven POM graph.")
    89
    910(prove:finalize)
Note: See TracChangeset for help on using the changeset viewer.