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
836aae37
Commit
836aae37
authored
Jun 17, 2011
by
mevenson@1c010e3e-69d0-11dd-93a8-456734b0d56f
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix all compilation warnings.
Still not expected that ABCL-ASDF works, esp. in the use of RUN-PROGRAM.
parent
5a2f68d7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
17 deletions
+34
-17
contrib/abcl-asdf/abcl-asdf.lisp
contrib/abcl-asdf/abcl-asdf.lisp
+34
-17
No files found.
contrib/abcl-asdf/abcl-asdf.lisp
View file @
836aae37
...
...
@@ -2,11 +2,11 @@
(
:use
:cl
)
(
:export
#:package
))
(
defpackage
#:mvn
(
:use
:cl
)
(
:export
#:satisfy
))
(
in-package
:abcl-asdf
)
(
:export
#:satisfy
#:as-classpath
))
(
in-package
:asdf
)
(
defclass
iri
(
static-class
)
())
...
...
@@ -14,30 +14,32 @@
(
defclass
mvn
(
iri
)
())
;;; We interpret compilation to ensure that load-op will succeed
(
defmethod
perform
((
op
eration
compile-op
)
(
component
mvn
))
(
let
((
version
(
component-version
mvn
)))
(
mvn:satisfy
(
component-name
mvn
)
(
defmethod
perform
((
op
compile-op
)
(
c
mvn
))
(
let
((
version
(
component-version
c
)))
(
mvn:satisfy
(
component-name
c
)
:version
(
if
version
version
:latest
))))
(
defmethod
perform
((
operation
load-op
)
(
c
omponent
mvn
))
(
let
((
version
(
component-version
mvn
)))
(
defmethod
perform
((
operation
load-op
)
(
c
mvn
))
(
let
((
version
(
component-version
c
)))
(
java:add-to-classpath
(
as-classpath
(
mvn:satisfy
(
component-name
mvn
)
:version
(
if
version
version
:latest
))))))
(
mvn:as-classpath
(
mvn:satisfy
(
component-name
c
)
:version
(
if
version
version
:latest
))))))
(
in-package
:abcl-asdf
)
(
defun
decompose
(
iri
)
(
declare
(
ignore
iri
))
;;; XXX test
`
((
:scheme
:jvm
)
(
:authority
:mvn
)
(
:host
"log4j"
)
(
:version
"1.4.10"
)))
(
defun
mvn:satisfy
(
name
&key
(
version
:latest
))
(
let
((
build.xml
(
make-temp-file
)))
(
with-open-file
(
s
build.xml
:direction
:output
)
(
write-string
*ant-build-template*
s
))
(
run-program
(
format
nil
"ant -find ~A"
build.xml
))))
(
in-package
:mvn
)
(
defparameter
*maven-ant-tasks.jar*
"/export/home/evenson/src/apache-maven-3.0.3/maven-ant-tasks-2.1.1.jar"
)
#|
...
...
@@ -52,6 +54,7 @@ Ant with Maven tasks would add the following
(
format
nil
"<?xml version='1.0' encoding='UTF-8'?>
<project xmlns='antlib:org.apache.tools.ant'
xmlns:artifact='antlib:org.apache.maven.artifact.ant'
name='abcl-mvn-~A' default='install'>
<artifact:dependencies pathId='abcl.dynamic.classpath'>
...
...
@@ -71,8 +74,22 @@ Ant with Maven tasks would add the following
</project>
"
(
symbol-name
(
gensym
))
"junit"
"junit"
"3.8.2"
))
(
defun
satisfy
(
name
&key
(
version
:latest
))
(
declare
(
ignore
name
version
))
(
let
((
build.xml
(
ext:make-temp-file
)))
(
with-open-file
(
s
build.xml
:direction
:output
)
(
write-string
*ant-build-template*
s
))
(
ext:run-program
(
format
nil
"ant -find ~A -lib ~A"
build.xml
*maven-ant-tasks.jar*
))))
(
defun
as-classpath
(
mvn
)
"For a given MVN entry, return a list of loadable archives
suitable for addition to the classpath."
(
declare
(
ignore
mvn
))
(
error
"unimplemented"
))
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