...
 
Commits (211)
build
dist
abcl
^abcl.properties
^abcl.properties$
^abcl$
^build
^dist
^build/
^dist/
^TAGS
^nbproject/private
^nbproject/private/
^doc/.+\.aux$
.+\.orig$
.+\.rej$
.+\.class$
^ext/
^test/lisp/abcl/tmp
^doc/manual/abcl\.((bbl)|(blg)|(idx)|(ilg)|(ind)|(log)|(out)|(pdf)|(toc))$
^doc/asdf/asdf\.((cp)|(cps)|(fn)|(fns)|(ky)|(log)|(pdf)|(pg)|(toc)|(tp)|(tps)|(vr)|(vrs))$
^bugs
.+\.diff$
^.idea/
Version 1.5.0
Version 1.6.0
=============
<http://abcl.org/svn/trunk/>
<http://gitlab.common-lisp.net/abcl/abcl/>
<http://github.com/easye/abcl/>
<http://github.com/armedbear/abcl/>
Unreleased
Updates
-------
* ASDF 3.2.2
Version 1.5.0
=============
June 11, 2017
Enhancements
------------
* [r14934] ABCL-INTROSPECT a contrib for accessing ABCL compiler
information (Alan).
* [r14907] ABCL-AIO all-in-one jar target creates dist/abcl-aio.jar (Alan).
* [r15009] Rework ABCL-BUILD as a contrib which uses UIOP machinery to
invoke Ant on <file:build.xml>, unifying all build mechanisms to a single
prescriptive source artifact external to Common-Lisp.
* [r14911] [r14955] [r14914] Source recording on SYS:SOURCE plist
PRECOMPILER possibly beta reduce form with function
position lambda, record arglist during Build
* [r14912] [r14922] Re-write the ASDF descriptions using secondary systems
* [r14917] build: 'abcl.clean.application.fasls' now cleans only ABCL fasls
* [r14923] Added Dockerfile to package ABCL in Docker
* [r14927] Build add ability to download Maven from Ant
* [r14931] Bless EXT:GET-PID as the offical way to get process id
* [r14947] JSS syntax for access Java fields (Alan)
* [r14962] JSS:J2LIST as a convenience method for turning "anything"
in Java to an appropriate Lisp list.
* [r14967] (Provisional) ABCL-ASDF JDK-JAR ASDF class to describe JDK
path locations (Alan).
* [r14969] Add QUICKLISP-ABCL:*QUICKLISP-PARENT-DIR* special (Alan).
* [r14978] Implement MAKE-LOAD-FORM for Java fields (Alan).
* [r15013] Restore the ability SYSTEM:CHOOSE-ASSEMBLER to use Objectweb
* [r15018] Enable use of MVN-MODULE in ASDF definitions (Alan).
* [r15019] Add NAMED-READTABLES from <​https://github.com/melisgl/named-readtables>
* [r15062] ABCL-INTROSPECT 'javaparser.asd' definition adds a
SHARPSIGN-ONE-QUOTATION_MARK macro to evaluate arbitrary Java expressions
Fixes
-----
* CL:OPEN
* [r14902] Fix CL:OPEN for :DIRECTION :INPUT (pipping)
* [r14903] JNEW-RUNTIME-CLASS Make static functions and :int
parameters work. Fix return conversion for null. Ensure that the
same classloader is used (olof).
* [r14905] ABCL-ASDF uses the value of the reported Maven home to look
for libraries, fixing loading CFFI under FreeBSD 11-RELEASE.
* [r14906] JSS:LOOKUP-CLASSNAME would return allcaps class name if not
found (alan).
* [r14909] QUICKLISP-ABCL simplify load/compile logic.
* [r14918] JAVA Remove generic Throwable handler from JAVA:JFIELD innards
* [r14919] ABCL-ASDF fix finding Maven on Fedora
* [r14926] ABCL-ASDF fix problems with test suite's reliance on PROVE
* [r14921] CL:DIRECTORY no longer errors on files containing asterisk characters
* [r14950] Fix restart calculation for compiled closures (Alan)
* [r14952] Guard printing of large Java objects (Alan)
* [r14953] Fix debugging frames which don't have a pathname (Alan)
* [r14956] Show function documentation in describe (Alan)
* [r14966] JAVA:CHAIN returns last value of computation (Alan)
* [r14973] ABCL-ASDF probes for "mvn" and "mvn.cmd" under Windows
* [r14974] Standardize the use of CL:*LOAD-VERBOSE* to control loading
verbosity.
* [r14976] Fix CL:GET-OUTPUT-STREAM-STRING to reset underlying buffer
* [r14979] Fix JavaObject.getParts() for Java arrays (Alan).
* [r14980] Fix SETF for EXT:URL-PATHNAME-FRAGMENT
* [r14987] Fix CL:MAKE-PATHNAME for explicitly nil HOST
* [r14996] Correctly implement 'time-of-the-time' daylight savings
semantics (Scott).
* [r15001] Fix signalling simple error with #\~ in CL:FORMAT string
(Alan).
* [r15002] Fix problems with SHARED-INITIALIZE (Olof).
* [r15003] Fix ENSURE-GENERIC-FUNCTION when removing definition (Olof).
* [r15004] Fix DESTRUCTURING-BIND with &rest arguments (Olof)
* [r15024] Optimise LOGCOUNT (Olof).
* [r15026] Support bignum argument for FILE-POSITION (Olof).
* [r15032] Better directory validation; handle :UNSPECIFIC (Olof).
* [r15033] Fix LOOP code size estimation (Olof).
* [r15034] Fix NTH inlining type mismatch (Olof).
* [r15035] Fix byte code verification error in edge case (Olof).
* [r15036] Fix PACKAGE-ERROR-PACKAGE behaviour (Olof).
* [r15037] Fix MAX type derivation (Olof).
* [r15038] Fix NPE if directory can't be accessed (Olof).
* [r15044] Documentation renders less/greater-than characters correctly (Olof).
Updates
-------
* ASDF 3.2.1
Version 1.4.0
=============
......
......@@ -260,38 +260,46 @@ of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
13. Linking this library statically or dynamically with other modules is making a combined work based on this library. Thus, the terms and conditions of the GNU General Public License cover the whole combination.
As a special exception, the copyright holders of this software give you
permission to link this software with independent modules to produce an
executable, regardless of the license terms of these independent modules, and
to copy and distribute the resulting executable under terms of your choice,
provided that you also meet, for each linked independent module, the terms and
conditions of the license of that module. An independent module is a module
which is not derived from or based on this software. If you modify this
software, you may extend this exception to your version of the software, but
you are not obligated to do so. If you do not wish to do so, delete this
exception statement from your version.
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO
WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.
13. Linking this library statically or dynamically with other
modules is making a combined work based on this library. Thus, the
terms and conditions of the GNU General Public License cover the
whole combination.
The following paragraph details the "classpath exception" which ABCL
allows as an exception to the statement about linking libraries.
As a special exception, the copyright holders of this software give
you permission to link this software with independent modules to
produce an executable, regardless of the license terms of these
independent modules, and to copy and distribute the resulting
executable under terms of your choice, provided that you also meet,
for each linked independent module, the terms and conditions of the
license of that module. An independent module is a module which is
not derived from or based on this software. If you modify this
software, you may extend this exception to your version of the
software, but you are not obligated to do so. If you do not wish to
do so, delete this exception statement from your version.
END OF TERMS AND CONDITIONS
......
# TODO optimize me for space
FROM easye/openjdk8
RUN export DEBIAN_FRONTEND='noninteractive' && \
apt-get update && \
apt-get upgrade -y && \
apt-get install -y \
libffi-dev
USER root
RUN useradd -ms /bin/bash abcl
USER abcl
ENV work /home/abcl/work
RUN mkdir -p ${work}
WORKDIR ${work}
COPY . ${work}/abcl
USER root
RUN chown -R abcl:abcl ${work}
USER abcl
# Diagnostics for debugging ABCL construction
#RUN ls -lR ${work}/abcl
RUN echo "java.options=-d64 -XX:+UseG1GC -XshowSettings:vm -Dfile.encoding=UTF-8 -XX:+AggressiveOpts -XX:CompileThreshold=10" > ${work}/abcl/abcl.properties
RUN cd ${work}/abcl && ant clean && ant abcl
ENV abcl_exec_path "${work}/abcl/abcl"
USER root
RUN ln -s ${abcl_exec_path} /usr/local/bin/abcl
USER abcl
CMD [ "/usr/local/bin/abcl" ]
This diff is collapsed.
This diff is collapsed.
#!/bin/sh
# abcl.in
# Copyright (C) 2004 Peter Graves
# Copyright (C) 2009 Erik Huelsmann
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
exec @JAVA@ \
-cp @ABCL_CLASSPATH@:"$CLASSPATH" \
@ABCL_JAVA_OPTIONS@ \
......
......@@ -15,11 +15,17 @@ abcl.build.incremental=true
## java.options sets the Java options in the abcl wrapper scripts
# Maximum safe performance on JDK8
java.options=-d64 -XX:+UseG1GC -XshowSettings:vm -Dfile.encoding=UTF-8 -XX:+AggressiveOpts -XX:CompileThreshold=10
# Reasonable defaults for Java 8
java.options=-d64 -XX:+UseG1GC -XshowSettings:vm
#java.options=-d64 -XshowSettings:vm -XX:+UseG1GC
# Java7 on 64bit optimizations
#java.options=-d64 -XshowSettings:vm -XX:+UseG1GC
# Reasonable defaults for circa-2012, ORCL JVM implementations
#java.options=-d64 -XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=1g -XX:+UseConcMarkSweepGC
# Reasonable defaults for openjdk6
#java.options=-d64 -XshowSettings:vm -XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=1g -XX:+UseConcMarkSweepGC
# See
# http://www.oracle.com/technetwork/java/javase/tech/vmoptions-jsp-140102.html
......
......@@ -16,15 +16,15 @@
@prefix dc: <http://purl.org/dc/elements/1.1/> .
<>
abcl:branch <http://abcl.org/svn/trunk/abcl> ;
dc:identifier <urn:abcl.org/1.5.0#dev> ;
dc:identifier <urn:abcl.org/1.6.0#dev> ;
doap:language "Common Lisp" ;
dc:created "01-JAN-2004" ;
dc:modified "08-OCT-2016" ;
dc:version "abcl-1.5.0" ;
dc:modified "11-JUN-2017" ;
dc:version "abcl-1.6.0" ;
dc:release "dev" ;
abcl:git <https://github.com/easye/abcl/> ; # Does this overwrite? TODO Check RDF specs.
abcl:git <https://gitlab.common-lisp.net/abcl/abcl/> ;
abcl:svn <http://abcl.org/trac/changeset/14886> .
abcl:svn <http://abcl.org/trac/changeset/15075> . # UPDATE
<>
rdfs:seeAlso <file:README> ;
......@@ -69,7 +69,8 @@
rdf:_11 "Olof-Joachim Frahm" ;
rdf:_7 _:cyrus ;
rdf:_8 _:dmiles ;
rdf:_9 _:alanr ;
rdf:_9 _:alanr ;
rdf:_9 "Alan Ruttenberg" ;
rdf:_10 _:pipping ;
rdf:_10 "Elias Pipping" ;
rdf:_12 "Vibhu Mohindra" ;
......@@ -88,17 +89,13 @@ _:user dc:identifier <http://ville.not.org/#me> ;
<> doap:license [
dc:license <http://usefulinc.com/doap/licenses/gplv2> ;
dc:license <http://usefulinc.com/doap/licenses/gplv2-classpath-exception> ;
rdfs:seeAlso <urn:abcl.org/release/1.3.3> ;
rdfs:seeAlso <urn:abcl.org/release/1.4.0> ;
dc:licenseDocument <file:COPYING> ;
dc:licenseDocument
<http://abcl.org/svn/trunk/abcl/src/org/armedbear/LICENSE> ;
<http://abcl.org/svn/tags/1.5.0/src/org/armedbear/COPYING> ;
] .
doap:Project rdfs:seeAlso [
a rdf:Bag;
rdf:_0 <http://abcl.org/releases/1.4.0/abcl-1.4.0.jar> ;
rdf:_0 <http://abcl.org/releases/1.5.0/abcl-1.5.0.jar> ;
rdf:_1 <http://abcl.org/trac/timeline> ;
rdf:_2 <http://abcl.org/trac/wiki> ;
rdf:_4 <https://github.com/easye/abcl/> ;
......@@ -115,6 +112,7 @@ doap:Project rdfs:seeAlso [
rdf:_14 <http://abcl.org/releases/1.3.2/abcl-1.3.1.jar> ;
rdf:_7 <http://abcl.org/releases/1.3.2/abcl-1.3.2.jar> ;
rdf:_8 <http://abcl.org/releases/1.3.3/abcl-1.3.3.jar> ;
rdf:_9 <http://abcl.org/releases/1.4.0/abcl-1.4.0.jar> ;
] ;
] .
......@@ -134,7 +132,9 @@ doap:Project rdfs:seeAlso [
doap:Project rdfs:seeAlso
<http://abcl.org/trac/timeline> ,
<http://abcl.org/trac/wiki> ,
<http://abcl.org/trac/wiki> ,
<http://github.com/armedbear/abcl/> ,
<http://gitlab.common-lisp.net/abcl/abcl/> ,
<http://code.google.com/p/abcl-dynamic-install/> ,
<http://abcl.org/svn/trunk/abcl/> .
......@@ -148,10 +148,16 @@ doap:Project rdfs:seeAlso
rdf:_7 abcl:jna ;
rdf:_8 abcl:asdf-jar ;
rdf:_9 abcl:quicklisp-abcl ;
rdf:_10 abcl:abcl-introspect ;
] .
abcl:jna dc:version "4.2.2" .
abcl:asdf dc:version "3.1.7.27" .
abcl:jna
dc:version "4.5.1" .
abcl:asdf
dc:version "3.2.2" .
abcl:abcl-introspect
rdfs:seeAlso <file:contrib/abcl-introspect/README.markdown> .
abcl:abcl-contrib
rdfs:seeAlso <file:contrib/README.markdown> .
......
This diff is collapsed.
......@@ -4,6 +4,11 @@ ABCL-CONTRIB
The contributions to Armed Bear constitute Common Lisp only code that
is potentially useful for system construction and distribution.
As such, these contributions have varying license terms which the end
user needs to accept on her own terms. Please see the licensing
metadata as expressed in the ASDF definitions for the status of your
usage.
quicklisp-abcl
Loads and installs the Quicklisp library manager from the network
......@@ -20,7 +25,6 @@ asdf-jar
Package ASDF system definitions into JVM artifacts for
distribution
jss
......@@ -30,7 +34,7 @@ jss
[lsw2][] Semantic Web package for dealing with OWL2 ontologies in
RDF(S) and other notations.
[lsw2]: http://code.google.com/p/lsw2/
[lsw2]: https://github.com/alanruttenberg/lsw2/
jfli
......@@ -43,25 +47,60 @@ jfli
[jfli]: http://sourceforge.net/projects/jfli/
mvn
A collection of various useful JVM artifacts downloaded and cached by
the Aether Maven connector. Requires the maven-3.0.3 executable "mvn"
(or "mvn.bat" under MSFT Windows) to be in the current processes's
path.
A collection of various useful JVM artifacts downloaded and cached
by the Aether Maven connector. Requires the maven-3.0.3
executable "mvn" (or "mvn.bat" under MSFT Windows) to be in the
current processes's path. These artifacts load the binary
artifacts necessary in the current JVM process,
mvn currently includes only the single artifact:
mvn currently includes:
jna
Cache, from the network if necessary, the jna-4.2.2.jar binary
artifact in the current JVM process, allowing the
bootstrapping of dynamically linking to shared executables on
the host platform.
JNA provides an the ability to dynamically link to shared
executables on the host platform, needed by CFFI.
log4j
An example of a dependency without an explicit version.
abcl-introspect
Advanced introspection of Java and Lisp runtime classes
representation.
abcl-build
The ABCL build system plus associated utilities for manipulating
external tools via UIOP.
named-readtables
(BSD Licensed)
From <https://github.com/melisgl/named-readtables>:
NAMED-READTABLES is a library that provides a namespace for
readtables akin to the already-existing namespace of packages. In
particular:
- you can associate readtables with names, and retrieve
readtables by names;
- you can associate source files with readtable names, and be
sure that the right readtable is active when compiling/loading
the file;
- similiarly, your development environment now has a chance to
automatically determine what readtable should be active while
processing source forms on interactive commands. (E.g. think of
`C-c C-c` in Slime (yet to be done))
# Colophon
Mark <evenson.not.org@gmail.com>
Created: 2011-09-11
Revised: 2016-10-01
<> abcl:documents <release#abcl-contrib.jar> .
Mark <evenson.not.org@gmail.com>
Created: 2011-09-11
Revised: 2017-06-11
<> abcl:documents <abcl.org/release/1.5.0/#abcl-contrib.jar> .
......@@ -15,7 +15,7 @@ Example 1
---------
For the following ASDF definition stored in a file named "log4j.asd"
that loadable by ASDF
that can be loaded:
;;;; -*- Mode: LISP -*-
(in-package :asdf)
......@@ -25,7 +25,7 @@ that loadable by ASDF
After issuing
CL-USER> (asdf:load-system :log4j)
CL-USER> (asdf:make :log4j)
all the Log4j libraries would be dynamically added to the classpath so
that the following code would
......@@ -33,7 +33,7 @@ that the following code would
(let ((logger (#"getLogger" 'log4j.Logger (symbol-name (gensym)))))
(#"trace" logger "Kilroy wuz here."))
output the message "Kilroy wuz here" to the log4j logging system.
output the message "Kilroy wuz here" to the Log4j logging system.
API
......@@ -53,16 +53,17 @@ ASDF classes derived from ASDF:COMPONENT:
the inheritance of the MVN component while allowing other forms of
uri-like resources to be encapsulated in the future.
The MVN component should specify a [Maven URI][1] as its PATH. A
Maven URI has the form "GROUP-ID/ARTIFACT-ID/VERSION" which specifies
the dependency to be satisfied for this component by resolution
through the Maven distributed dependency graph. The scheme (the
initial "mvn://") is implied, usually omitted for brevity. If a
VERSION is not specified (i.e. by a form like "GROUP-ID/ARTIFACT-ID"),
then the latest available version of the artifact will be retrieved
from the network.
The MVN component should specify a [Maven URI][mvn-uri] as its PATH.
A Maven URI has a namestring of the form
"GROUP-ID/ARTIFACT-ID/VERSION" which specifies the dependency to be
satisfied for this component by resolution through the Maven
distributed dependency graph. The scheme (the initial "mvn://" in a
Maven URI) is implied, and usually omitted for brevity. If a VERSION
is not specified (i.e. by a namestring like "GROUP-ID/ARTIFACT-ID" for
the MVN component), then the latest available version of the artifact
will be retrieved from the network.
[1]: http://team.ops4j.org/wiki/display/paxurl/Mvn+Protocol
[mvn-uri]: http://team.ops4j.org/wiki/display/paxurl/Mvn+Protocol
The MVN component may specify a CLASSNAME which if present in the
current jvm, inhibits further loading from the network. This may be
......@@ -81,7 +82,7 @@ into the currently executing JVM process all recursive dependencies
annotated in the ditributed Maven pom.xml graph.
One can muffle the verbosity of the Maven Aether resolver by setting
ABCL-ASDF:*MAVEN-VERBOSE* to NIL.
CL:*load-VERBOSE* to NIL.
Example 2
---------
......@@ -134,7 +135,7 @@ For a filesystem of jar archives:
./lib/ext/xsb-system/interprolog.jar
The following ASDF defintion loads enough JVM artifacts to use the
[IRIS reasoner][1]:
[IRIS reasoner][iris-reasoner]:
(defsystem :wsml2reasoner-jars
:version "0.6.4" ;; last sync with SVN
......@@ -157,12 +158,12 @@ The following ASDF defintion loads enough JVM artifacts to use the
:pathname "lib/ext/log4j/" :components
((:jar-file "log4j-1.2.14")))))
[1]: http://www.iris-reasoner.org/
[iris-reasoner]: http://www.iris-reasoner.org/
#### Colophon
Mark <evenson.not.org@gmail.com>
Created: 2011-01-01
Revised: 2013-08-16
Revised: 2017-06-13
;;;; -*- Mode: LISP -*-
(defsystem abcl-asdf-tests
:author "Mark Evenson"
:long-description "<urn:abcl.org/release/1.6.0/contrib/abcl-asdf/test#>"
:version "2.1.0"
:defsystem-depends-on (prove-asdf)
:depends-on (abcl-asdf
prove)
:components ((:module tests
:pathname "t/"
:components ((:test-file "log4j")
(:test-file "resolve")
(:test-file "resolve-multiple-maven-dependencies")
(:test-file "maven"))))
:perform (asdf:test-op (op c)
(uiop:symbol-call :prove-asdf 'run-test-system c)))
;;;; -*- Mode: LISP -*-
(asdf:defsystem :abcl-asdf
(defsystem abcl-asdf
:author "Mark Evenson"
:version "1.5.1"
:description "<> asdf:defsystem <urn:abcl.org/release/1.5.0/contrib/abcl-asdf#1.5.1>"
:depends-on (jss)
:description "Extensions to ASDF for handling Java binary artifacts."
:long-description "<urn:abcl.org/release/1.6.0/contrib/abcl-asdf#>"
:version "2.1.0"
:depends-on (jss abcl-build)
:components
((:module packages :pathname ""
:components
((:file "packages")))
(:module base :pathname ""
:components
((:file "abcl-asdf")
(:file "asdf-jar"
:depends-on ("abcl-asdf"))
(:file "maven-embedder"
:depends-on ("abcl-asdf" "asdf-jar")))
:depends-on (packages))))
(asdf:defsystem :abcl-asdf-test
:author "Mark Evenson"
:depends-on (abcl abcl-test-lisp abcl-asdf rt)
:components ((:module tests :serial t
:components ((:file "example")
(:file "maven")
(:file "test")))))
(defmethod asdf:perform ((o asdf:test-op) (c (eql (asdf:find-system 'abcl-asdf-test))))
(funcall (intern (symbol-name 'run) 'abcl-asdf-test)))
(defmethod asdf:perform ((o asdf:test-op) (c (eql (asdf:find-system 'abcl-asdf))))
(asdf:load-system :abcl-asdf-test)
(asdf:test-system :abcl-asdf-test))
;;; FIXME
#+nil
(defmethod asdf:perform ((o asdf:test-op) (c (eql (asdf:find-system 'abcl-asdf))))
"Invoke tests with (asdf:test-system 'abcl-asdf)."
(asdf:load-system 'abcl)
(asdf:load-system 'abcl-test-lisp)
(asdf:load-system 'abcl-asdf-test)
(funcall (intern (symbol-name 'run) 'abcl-asdf-test)))
((:module package
:pathname ""
:components ((:file "package")))
(:module base
:pathname ""
:components ((:file "abcl-asdf")
(:file "asdf-jar" :depends-on ("abcl-asdf")))
:depends-on (package))
(:module maven
:pathname ""
:components ((:file "maven")
(:file "mvn-module"))
:depends-on (base)))
:in-order-to ((test-op (test-op abcl-asdf-tests))))
;;;; The ABCL specific overrides in ASDF.
;;;;
;;;; Done separately from asdf.lisp for stability.
;;;; Extensions to ASDF for use by ABCL
(require :asdf)
(in-package :asdf)
......@@ -14,17 +14,19 @@
(defclass mvn (iri)
((group-id :initarg :group-id :initform nil)
(artifact-id :initarg :artifact-id :initform nil)
(repository :initarg :repository :initform "http://repo1.maven.org/maven2/") ;;; XXX unimplemented
(repositories :initarg :repositories :initform (list abcl-asdf::*default-repository*))
(resolved-classpath :initform nil :accessor resolved-classpath)
(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)))
#+nil
(defmethod find-component ((component iri) path)
component)
(defmethod shared-initialize ((mvn mvn) slot-names &rest initargs &key (repository NIL repository-p) repositories &allow-other-keys)
(if repository-p
(let ((initargs (list* :repositories (cons repository repositories)
(remove-plist-keys '(:repository :repositories) initargs))))
(apply #'call-next-method mvn slot-names initargs))
(call-next-method)))
;;; We intercept compilation to ensure that load-op will succeed
(defmethod perform ((op compile-op) (c mvn))
......@@ -60,7 +62,7 @@
(defun ensure-parsed-mvn (component)
(with-slots (name group-id artifact-id
version schema path repository)
version schema path repositories)
component
(when (null asdf::artifact-id)
(let ((parsed (abcl-asdf::split-string name "/"))
......@@ -82,8 +84,8 @@
(error "Failed to construct a mvn reference from name '~A' and version '~A'"
name version)))
(setf schema "mvn")
(when repository
(pushnew repository *mvn-repositories*))
(when repositories
(setf *mvn-repositories* (union repositories *mvn-repositories* :test #'string=)))
;;; Always set path to normalized path "on the way out" to
;;; contain group-id/artifact-id/version
;;; TODO? record repository as well in path of component
......@@ -112,19 +114,20 @@ 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."
(asdf:ensure-parsed-mvn mvn-component)
(asdf::ensure-parsed-mvn mvn-component)
(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))
(repository (slot-value mvn-component 'asdf::repository))
(repositories (slot-value mvn-component 'asdf::repositories))
(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))
(let ((jss:*muffle-warnings* T))
(jss:find-java-class classname)))
(warn "Not loading ~A from the network because ~A is present in classpath."
name classname)
(return-from resolve t))
......@@ -135,7 +138,8 @@ single entry denoting a remote binary artifact."
(if (find-mvn)
(resolve-dependencies group-id artifact-id
:version version
:repository repository)
:repository NIL
:repositories repositories)
(if alternate-uri
(values (pathname alternate-uri) alternate-uri)
(error "Failed to resolve MVN component name ~A." name)))))
......@@ -148,8 +152,3 @@ single entry denoting a remote binary artifact."
(split-string classpath
(java:jfield "java.io.File" "pathSeparator")))
(defun split-string (string split-char)
(loop :for i = 0 :then (1+ j)
:as j = (position split-char string :test #'string-equal :start i)
:collect (subseq string i j)
:while j))
......@@ -54,9 +54,8 @@
(defmethod operation-done-p ((operation compile-op) (c jar-directory))
t)
(defclass jar-file (static-file) ())
(defmethod source-file-type ((c jar-file) (s module)) "jar")
(defclass jar-file (static-file)
((type :initform "jar")))
(defmethod perform ((operation compile-op) (c jar-file))
(java:add-to-classpath (component-pathname c)))
......@@ -68,7 +67,7 @@
;;; The original JSS specified jar pathnames as having a NAME ending
;;; in ".jar" without a TYPE. If we encounter such a definition, we
;;; clean it up.
(defun normalize-jar-name (component)
(defmethod normalize-jar-name ((component jar-file))
(when (#"endsWith" (slot-value component 'name) ".jar")
(with-slots (name absolute-pathname) component
(let* ((new-name
......@@ -103,7 +102,16 @@
(defmethod perform ((operation load-op) (c class-file-directory))
(java:add-to-classpath (component-pathname c)))
;; a jar file where the pathname and name are relative to JAVA_HOME
(defclass jdk-jar (jar-file) ())
(defmethod normalize-jar-name :after ((c jdk-jar))
(setf (slot-value c 'absolute-pathname)
(merge-pathnames
(merge-pathnames
(slot-value c 'name)
(make-pathname :directory `(:relative ,(slot-value (component-parent c) 'relative-pathname))))
(java::jstatic "getProperty" "java.lang.System" "java.home"))))
;;;; -*- Mode: LISP -*-
(defsystem asdf-mvn-module-tests
:defsystem-depends-on (prove-asdf)
:depends-on (prove asdf-mvn-module)
:components ((:module tests :pathname "t/"
:components ((:file "mvn-module"))))
:perform (asdf:test-op (op c)
(uiop:symbol-call :prove-asdf 'run-test-system c)))
;;;; -*- Mode: LISP -*-
(defsystem asdf-mvn-module
:author "Alan Ruttenberg"
:version "1.0.0"
:depends-on (jss abcl-asdf)
:description "Handles Maven artifact exclusions via the ADSF:MVN-MODULE component."
:long-description "<urn:abcl.org/release/1.6.0/contrib/abcl-asdf/mvn-module#>"
:version "1.0.0"
:in-order-to ((test-op (test-op asdf-mvn-module-tests)))
:components ((:module source
:pathname ""
:components ((:file "asdf-mvn-module")))))
(in-package :asdf)
;; dependencies: a list of maven artifacts. color or slash separated
;; components groupid:artifactid:versionid
;; managed-dependencies: a list of maven artifacts. If an dependency
;; with same groupid and artifactid are encountered, the version
;; specified here overrides.
;; exclusions: a list of partial maven artifacts
;; groupid:artifactid. Dependencies with same groupid and artifactid are
;; exluded
(defclass mvn-module (component)
((depends :initarg :dependencies :initform nil :accessor mvn-module-depends)
(excludes :initarg :exclusions :initform nil :accessor mvn-module-excludes)
(managed :initarg :managed-dependencies :initform nil :accessor mvn-module-managed)))
(defmethod component-children ((c mvn-module))
nil)
;;; ASDF problems: method is deprecated. How do we define MVN-MODULE,
;;; a subclass of ASDF:COMPONENT, which has no corresponding pathname?
(defmethod source-file-type ((c mvn-module) (system parent-component)) :directory)
(defmethod perform ((op compile-op) (c mvn-module)))
(defmethod perform ((op prepare-op) (c mvn-module)))
(defmethod perform ((operation load-op) (c mvn-module))
(loop for path in (abcl-asdf:resolve-multiple-maven-dependencies
(mvn-module-depends c) (mvn-module-managed c) (mvn-module-excludes c))
do
(unless (member path abcl-asdf::*added-to-classpath* :test 'equalp)
(jss::add-to-classpath path))))
(in-package :abcl-asdf)
;;; <https://maven.apache.org/guides/introduction/introduction-to-optional-and-excludes-dependencies.html>
;;; If a artifact is root then its optional dependencies are
;; collected. If the same artifact is not root, then the optional
;;; dependencies are not collected. We don't need optionals since from
;;; our point of view we are the top pom and everything specified are
;;; dependencies
;;; Used by asdf-mvn-module.
(defun resolve-multiple-maven-dependencies
(dependencies &optional managed-dependencies exclusions (first-is-root nil))
"Return a list of jar file paths that satisfy dependencies
dependencies: a list of maven artifacts. color or slash separated
components groupid:artifactid:versionid
managed-dependencies: a list of maven artifacts. If an dependency
with same groupid and artifactid are encountered, the version
specified here overrides.
exclusions: a list of partial maven artifacts
groupid:artifactid. Dependencies with same groupid and artifactid are
exluded
first-is-root: If the first dependency should include optional
dependencies, set this to t. Usually not.
"
(let (aether)
(with-aether (aether)
(let ((collect-request (java:jnew (jss:find-java-class "CollectRequest")))
(exclusions-collection (jss:new 'java.util.HashSet))
(compile-scope (java:jfield (jss:find-java-class "JavaScopes") "COMPILE")))
(#"addRepository" collect-request (ensure-remote-repository))
(loop for e in exclusions
for (groupid artifactid) = (abcl-build:split-string e #\:)
;; If i have scope be compile-scope it doesn't get excluded!!
for exclusion = (jss:new 'aether.graph.Exclusion groupid artifactid "" "jar")
do (#"add" exclusions-collection exclusion))
(loop for a in dependencies
for artifact = (make-artifact (#"replaceAll" a "/" ":"))
for dependency = (jss:new 'aether.graph.Dependency artifact compile-scope)
do
;; setExclusions returns a new dependency. We have to use
;; that. That passed dependency i not modified!
;; http://grepcode.com/file/repo1.maven.org/maven2/org.eclipse.aether/aether-api/1.0.2.v0150114/org/eclipse/aether/graph/Dependency.java#Dependency.getOptional%28%29
;; Nice of them to clearly document that :-/
(setq dependency (#"setExclusions" dependency exclusions-collection))
(if first-is-root
(#"setRoot" collect-request dependency)
(#"addDependency" collect-request dependency))
(setq first-is-root nil))
(loop for a in managed-dependencies
for artifact = (make-artifact (#"replaceAll" a "/" ":"))
for dependency = (jss:new 'aether.graph.Dependency artifact compile-scope)
do (setq dependency (#"setExclusions" dependency exclusions-collection))
(#"addManagedDependency" collect-request dependency))
(let ((dependencies (#"collectDependencies" (ensure-repository-system) (ensure-session) collect-request))
(nodelist-generator (jss:new 'PreorderNodeListGenerator))
(dependency-request (jss:new 'DependencyRequest)))
(#"setRoot" dependency-request (#"getRoot" dependencies))
(#"resolveDependencies" (ensure-repository-system) (ensure-session) dependency-request)
(#"accept" (#"getRoot" dependencies) nodelist-generator)
(abcl-build:split-string (#"getClassPath" nodelist-generator) #\:))))))
(defpackage #:abcl-asdf
(:use :cl)
(in-package :cl-user)
(defpackage abcl-asdf
(:use cl)
(:import-from :abcl/build
#:split-string)
(:export
;;; Public API
#:resolve
#:ensure-mvn-version
;; Configuring Maven
#:with-aether
#:ensure-mvn-version
#:find-mvn
#:*mvn-directory*
......@@ -21,10 +30,7 @@
#:*maven-http-proxy*
#:make-remote-repository
#:*maven-remote-repository*
#:*maven-verbose*
#:resolve-artifact
#:resolve-dependencies
#:resolve-multiple-maven-dependencies
#:as-classpath
......@@ -34,6 +40,9 @@
#:*added-to-classpath*
#:*inhibit-add-to-classpath*))
(defpackage #:abcl-asdf-test
(:use :cl :abcl-asdf)
(:export #:run))
(defsystem #:soot-mixed-repositories
:defsystem-depends-on (#:jss #:abcl-asdf)
:components ((:mvn "ca.mcgill.sable/soot/3.0.0-20170622.230711-112"
:repository "http://repo1.maven.org/maven2/"
:repositories ("https://soot-build.cs.uni-paderborn.de/nexus/repository/soot-snapshot/")
:classname "soot.SootClass")))
(defsystem #:soot-only-repositories
:defsystem-depends-on (#:jss #:abcl-asdf)
:components ((:mvn "ca.mcgill.sable/soot/3.0.0-20170622.230711-112"
:repositories ("https://soot-build.cs.uni-paderborn.de/nexus/repository/soot-snapshot/"
"http://repo1.maven.org/maven2/")
:classname "soot.SootClass")))
;;; From https://github.com/alanruttenberg/lsw2/blob/owlapiv4/owl2/owl2libs-mvn2.asd
(defsystem test-mvn-module
:description "Non-Lisp dependencies necessary for OWL to function."
:defsystem-depends-on (asdf-mvn-module)
:components
((:mvn-module maven
:dependencies
("net.sourceforge.owlapi/pellet-cli-ignazio1977/2.4.0-ignazio1977"
"org.semanticweb.elk/elk-owlapi/0.4.3"
"net.sourceforge.owlapi/org.semanticweb.hermit/1.3.8.413"
"net.sourceforge.owlapi/owlapi-distribution/4.2.6"
"net.sourceforge.owlapi/owlexplanation/2.0.0"
"de.sciss/prefuse-core/1.0.1"
"de.sciss/prefuse-demos/1.0.1")
:managed-dependencies
("org.slf4j/slf4j-api/1.7.21"
"net.sourceforge.owlapi:owlapi-distribution:4.2.6")
:exclusions
("net.sourceforge.owlapi:owlapi-osgidistribution"
"edu.stanford.protege:org.protege.editor.owl"))
#+(or)
(:module rest :pathname "lib" :components
((:bundle "uk.ac.manchester.cs.owl.factplusplus-1.6.5")
(:jar-file "LSWTreeview-1.0.0")
(:jar-file "QuotedStringAnnotationVisitor-1.0.0")))
(:module lib :pathname "lib"
:depends-on (maven #+(or) rest)))
:perform (load-op :after (o c)
(progn
(#"configure" 'org.apache.log4j.BasicConfigurator (jss::new 'NullAppender))
(print "configured log4j"))))
(in-package :cl-user)
(prove:diag
"Output a message to the Console.
Note: for users of SLIME, this will appear in the associated *inferior-lisp* buffer.")
(prove:plan 2)
(progn
(when (find "log4j" (asdf:already-loaded-systems) :test 'equal)
(prove:diag "Log4j was already loaded. Explicitly clearing it from ASDF.")
(asdf:clear-system :log4j))
(prove:ok (asdf:load-system :log4j)
"Testing loading the log4j system…")
(#"configure" 'log4j.BasicConfigurator)
(#"info" (#"getRootLogger" 'log4j.Logger) "Kilroy wuz here.")
(prove:pass "No error occured while testing logging to *standard-output*"))
(prove:finalize)
(in-package :cl-user)
(prove:plan 5)
(prove:diag "Testing local bootable Maven version.")
(multiple-value-bind (good version)
(abcl-asdf:ensure-mvn-version)
(prove:ok good)
(prove:is-type version 'list)
(prove:ok (every #'fixnump version)))
(prove:is-type (abcl-asdf:resolve-dependencies "log4j" "log4j") 'string)
(prove:is-type (abcl-asdf:resolve "org.abcl/abcl") 'string)
(prove:finalize)
(in-package :cl-user)
;;; TODO: restore original ASDF configuration after running test
(defun asdf-add-test-mvn-module ()
(asdf:initialize-source-registry
`(:source-registry
(:directory ,(asdf:system-relative-pathname :asdf-mvn-module "t/eg/"))
:inherit-configuration)))
(unless (ignore-errors (asdf:find-system :test-mvn-module))
(asdf-add-test-mvn-module))
(prove:plan 3)
(prove:ok (asdf:load-system :test-mvn-module)
"Testing loading of ASDF:MVN-MODULE definition…")
(prove:ok (asdf:load-system :soot-only-repositories)
"Testing loading with only repositories list…")
(prove:ok (asdf:load-system :soot-mixed-repositories)
"Testing loading with both single and list of repositories…")
(prove:finalize)
(in-package :cl-user)
(prove:plan 3)
(let ((deps (abcl-asdf:resolve-multiple-maven-dependencies
'("net.sourceforge.owlapi:org.semanticweb.hermit:1.3.8.413"
"net.sourceforge.owlapi:owlapi-distribution:4.2.6"
"net.sourceforge.owlapi/pellet-cli-ignazio1977/2.4.0-ignazio1977"
"org.semanticweb.elk/elk-reasoner/0.4.3"
"net.sourceforge.owlapi/owlexplanation/2.0.0")
'("net.sourceforge.owlapi:owlapi-distribution:4.2.6")
'("net.sourceforge.owlapi:owlapi-osgidistribution"
"edu.stanford.protege:org.protege.editor.owl"))))
(prove:is (length deps) 87)
(prove:ok (not (find "owlapi-osgidistribution" deps :test 'search)))
(prove:ok (not (find "protege" deps :test 'search))))
(prove:finalize)
(in-package :cl-user)
(prove:plan 1)
(prove:is-type
(abcl-asdf:resolve-dependencies "org.armedbear.lisp" "abcl")
'string
"Resolving ABCL from distributed Maven POM graph.")
(prove:finalize)
(in-package :abcl-asdf-test)
(defun test-LOG4J.2 ()
"Output a message to the Console.
Note: for users of SLIME, this will appear in the associated *inferior-lisp* buffer."
(#"configure" 'log4j.BasicConfigurator)
(#"info" (#"getRootLogger" 'log4j.Logger) "Kilroy wuz here."))
(rt:deftest LOG4j.2
(test-LOG4J.2)
t)
;;;; -*- Mode: LISP -*-
(asdf:defsystem :log4j
:defsystem-depends-on (abcl-asdf)
:components ((:module log4j.jar :components
((:mvn "log4j/log4j/1.2.15")))
(:module source :pathname "" :components
((:file "example"))
:depends-on (log4j.jar))))
(defmethod perform ((o asdf:test-op) (s (eql (asdf:find-system :log4j))))
(asdf:load-system :log4j)
(eval (read-from-string "(cl-user::test-log4j.2)")))
#|
(abcl-asdf:resolve-dependencies "log4j" "log4j")
(abcl-asdf:resolve-dependencies "org.armedbear.lisp" "abcl")
|#
; TODO figure out what sort of test framework we can hook in. Probably ABCL-RT
(in-package :abcl-asdf-test)
(rt:deftest LOG4J.1
(let ((result (abcl-asdf:resolve-dependencies "log4j" "log4j")))
(and result
(format *standard-output* "~&~A~%" result)
(type-p result 'cons)))
t)
(rt:deftest ABCL.1
(let ((result (abcl-asdf:resolve-dependencies "org.armedbear.lisp" "abcl")))
(and result
(format *standard-output* "~&~A~%" result)
(type-p result 'cons)))
t)
(in-package :abcl-asdf-test)
(defun run (&rest args)
(abcl-rt:do-tests))
(rt:deftest ABCL-ASDF.MAVEN.1
(multiple-value-list (ensure-mvn-version))
(t (3 0 4)))
ABCL-BUILD
==========
Installing and executing the necessary toolchain to build ABCL.
Utility functions to download needed artifacts from the network.
(defsystem abcl-build-tests
:description "Test ABCL build system."
:defsystem-depends-on (prove-asdf)
:depends-on (abcl-build
prove)
:perform (test-op (op c)
(symbol-call :prove-asdf 'run-test-system c))
:components ((:module package
:pathname "build/t/"
:components ((:file "package")))
(:module build
:depends-on (package)
:pathname "build/t/"
:components ((:test-file "util")
(:test-file "install")
(:test-file "ant")
(:test-file "maven")
(:test-file "abcl-build")))))
;;; aka the "Lisp-hosted build system" which doesn't share build
;;; instructions with the canonical build system in <file:build.xml>
;;; Works for: abcl, sbcl, clisp, cmu, lispworks, allegro, openmcl
(defsystem abcl-build
:version "2.0.0"
:description "Build ABCL from a Lisp. Downloads necessary build-time tools to local cache if not available on system."
:in-order-to ((test-op (test-op abcl-build-tests)))
:components ((:module package
:pathname "build/"
:components ((:file "package")))
(:module util
:pathname "build/"
:depends-on (package)
:components ((:file "util")))
(:module build
:pathname "build/"
:depends-on (util)
:serial t
:components (;;; TODO optionally parse a local configuration for customization
(:file "customizations-default")
(:file "install")
(:file "maven")
(:file "ant")
(:file "abcl-build") ;; TODO: support API
(:file "deprecated")))))