Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
abcl
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abcl
abcl
Commits
cf4eb6f5
Commit
cf4eb6f5
authored
Jan 31, 2013
by
mevenson@1c010e3e-69d0-11dd-93a8-456734b0d56f
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
abcl-asdf: fix bug to use the version of specified MVN components.
Reformat to SLIME whitespace conventions.
parent
579a755d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
38 deletions
+30
-38
contrib/abcl-asdf/abcl-asdf.lisp
contrib/abcl-asdf/abcl-asdf.lisp
+30
-38
No files found.
contrib/abcl-asdf/abcl-asdf.lisp
View file @
cf4eb6f5
...
...
@@ -17,8 +17,8 @@
(
repository
:initform
"http://repo1.maven.org/maven2/"
)
;;; XXX unimplmented
(
classname
:initarg
:classname
:initform
nil
)
(
alternate-uri
:initarg
:alternate-uri
:initform
nil
)
;; inherited from ASDF:COMPONENT ??? what are the CL semantics on overriding -- ME 2012-04-01
#+
nil
(
version
:initform
nil
)))
;; inherited from ASDF:COMPONENT ??? what are the CL semantics on overriding -- ME 2012-04-01
#+
nil
(
version
:initform
nil
)))
#+
nil
(
defmethod
find-component
((
component
iri
)
path
)
...
...
@@ -29,7 +29,7 @@
(
defmethod
perform
((
op
compile-op
)
(
c
mvn
))
(
abcl-asdf:resolve
(
ensure-parsed-mvn
c
)))
(
defmethod
perform
((
operation
load-op
)
(
c
mvn
))
(
let
((
resolved-path
(
abcl-asdf:resolve
(
ensure-parsed-mvn
c
))))
...
...
@@ -58,7 +58,7 @@
(
defun
ensure-parsed-mvn
(
component
)
(
with-slots
(
name
group-id
artifact-id
version
schema
path
repository
)
version
schema
path
repository
)
component
(
when
(
null
asdf::artifact-id
)
(
let
((
parsed
(
abcl-asdf::split-string
name
"/"
))
...
...
@@ -97,7 +97,7 @@
(
in-package
#:abcl-asdf
)
(
defgeneric
resolve
(
something
)
(
:documentation
"Returns a string in JVM CLASSPATH format as entries delimited by classpath separator string."
))
(
:documentation
"Returns a string in JVM CLASSPATH format as entries delimited by classpath separator string."
))
(
defmethod
resolve
((
mvn-component
asdf::mvn
))
"Resolve all runtime dependencies of MVN-COMPONENT.
...
...
@@ -106,39 +106,31 @@ Returns either a string in jvm classpath format as entries delimited
by classpath separator string or T. If the value T is returned, it
denotes that current JVM already has already loaded a given class. Can possibly be a
single entry denoting a remote binary artifact."
(
macrolet
((
aif
(
something
consequence
alternative
))
`
(
let
((
it
,
(
something
)))
(
if
it
consequence
alternative
)))
(
let
((
name
(
slot-value
mvn-component
'asdf::name
))
(
group-id
(
slot-value
mvn-component
'asdf::group-id
))
(
artifact-id
(
slot-value
mvn-component
'asdf::artifact-id
))
(
classname
(
slot-value
mvn-component
'asdf::classname
))
(
alternate-uri
(
slot-value
mvn-component
'asdf::alternate-uri
))
(
version
(
let
((
it
(
slot-value
mvn-component
'asdf::version
)))
(
cond
((
not
it
)
it
)
(
t
"LATEST"
)))))
(
handler-case
(
when
(
and
classname
(
jss:find-java-class
classname
))
(
warn
"Not loading ~A from the network because ~A is present in classpath."
name
classname
)
(
return-from
resolve
t
))
(
java:java-exception
(
e
)
(
unless
(
java:jinstance-of-p
(
java:java-exception-cause
e
)
"java.lang.ClassNotFoundException"
)
(
error
"Unexpected Java exception~&~A.~&"
e
))))
(
if
(
find-mvn
)
(
resolve-dependencies
group-id
artifact-id
version
)
(
if
alternate-uri
(
values
(
namestring
alternate-uri
)
alternate-uri
)
(
t
(
error
"Failed to resolve MVN component name ~A."
name
)))))))
(
let
((
name
(
slot-value
mvn-component
'asdf::name
))
(
group-id
(
slot-value
mvn-component
'asdf::group-id
))
(
artifact-id
(
slot-value
mvn-component
'asdf::artifact-id
))
(
classname
(
slot-value
mvn-component
'asdf::classname
))
(
alternate-uri
(
slot-value
mvn-component
'asdf::alternate-uri
))
(
version
(
if
(
slot-value
mvn-component
'asdf::version
)
(
slot-value
mvn-component
'asdf::version
)
"LATEST"
)))
(
handler-case
(
when
(
and
classname
(
jss:find-java-class
classname
))
(
warn
"Not loading ~A from the network because ~A is present in classpath."
name
classname
)
(
return-from
resolve
t
))
(
java:java-exception
(
e
)
(
unless
(
java:jinstance-of-p
(
java:java-exception-cause
e
)
"java.lang.ClassNotFoundException"
)
(
error
"Unexpected Java exception~&~A.~&"
e
))))
(
if
(
find-mvn
)
(
resolve-dependencies
group-id
artifact-id
version
)
(
if
alternate-uri
(
values
(
namestring
alternate-uri
)
alternate-uri
)
(
t
(
error
"Failed to resolve MVN component name ~A."
name
))))))
(
defun
as-classpath
(
classpath
)
"Break apart the JVM CLASSPATH string into a list of its consituents."
(
split-string
classpath
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment