[armedbear-devel] installing java dependencies with :mvn ASDF component
Anton Vodonosov
avodonosov at yandex.ru
Fri Aug 9 21:39:16 UTC 2013
I think I found the reason.
I am using the latest maven 3.1.0. The Aether API has moved to another packages:
org.eclipse.aether.*
I have changed contrib/abcl-asdf/maven-embedder.lisp file to use new java class names
(as in the addached svn.diff), and the error seems gone.
I continue to work on the Excel improt, will here report if find new information.
Best regards,
- Anton
10.08.2013, 01:01, "Anton Vodonosov" <avodonosov at yandex.ru>:
> Hello.
>
> I need to import data from Excel, and following Hans Hübner's article
> for how to do this with ABCL:
> http://netzhansa.blogspot.com/2013/03/dealing-with-excel-files-from-common.html
>
> The Hans' code depends on Apache POI library.
>
> I saw that ABCL comes from abcl-asdf contrib, which extends ASDF by adding a :mnv component,
> so that we can specify :mvn artifact as a dependency of our ASDF system.
> I would like to use this facility to automatically install the POI .jar files.
>
> I created an .asdf file with this content:
>
> (defsystem :excel-s
> :defsystem-depends-on (:abcl-asdf)
> :version "0.1.0"
> :encoding :utf-8
> :components ((:mvn "org.apache.poi/poi-ooxml/3.9")))
>
> Then I invoke ABCL:
> C:\Users\anton\projects\abcl\abcl.bat --batch --eval "(require :abcl-contrib") --eval "(pushnew \"./\" asdf:*central-registry* :test #'equal)" --eval "(ql:quickload :excel-s)"
>
> It fails with exception: java.lang.ClassNotFoundException: aether.util.artifact.DefaultArtifact
> This exception is throw by abcl-asdf::resolve-dependencies function, defined in the
> contrib/abcl-asdf/maven-embedder.lisp.
>
> Maven is installed on my machine, including the /lib/ directory containing the Aether API jars.
>
> I performed some investigation and tried to ensure the Aether .jars are added to classpath:
>
> (abcl-asdf::init)
> (let ((*default-pathname-defaults* abcl-asdf::*mvn-libs-directory*))
> (dolist (jar-pathname (or (directory "**/*.jar")
> (error "no jars found in ~S - expected Apache Maven /libs/ directory ~
> installation there"
> (merge-pathnames abcl-asdf::*mvn-libs-directory*))))
> (java:add-to-classpath (namestring jar-pathname))))
>
> Still I have the same error - class aether.util.artifact.DefaultArtifact not found.
>
> Is the way I am trying to install java libs expected to work, and how to find the problem?
>
> Best regards,
> - Anton
More information about the armedbear-devel
mailing list