;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2016 Leo Famulari <leo@famulari.name>
;;; Copyright © 2016, 2017 Roel Janssen <roel@gnu.org>
;;; Copyright © 2017, 2019 Carlo Zancanaro <carlo@zancanaro.id.au>
;;; Copyright © 2018, 2019 Gábor Boskovits <boskovits@gmail.com>
;;; Copyright © 2018 Chris Marusich <cmmarusich@gmail.com>
;;; Copyright © 2018, 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
-;;; Copyright © 2019, 2020 Björn Höfling <bjoern.hoefling@bjoernhoefling.de>
+;;; Copyright © 2019, 2020, 2021 Björn Höfling <bjoern.hoefling@bjoernhoefling.de>
;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
;;; Copyright © 2020 Raghav Gururajan <raghavgururajan@disroot.org>
;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2021 Vincent Legoll <vincent.legoll@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
#:use-module (guix hg-download)
#:use-module (guix git-download)
#:use-module (guix svn-download)
+ #:use-module ((guix build utils) #:select (alist-replace))
#:use-module (guix utils)
#:use-module (guix build-system ant)
#:use-module (guix build-system gnu)
#:use-module (gnu packages libffi)
#:use-module (gnu packages linux) ;alsa
#:use-module (gnu packages maths)
+ #:use-module (gnu packages maven)
#:use-module (gnu packages maven-parent-pom)
#:use-module (gnu packages nss)
#:use-module (gnu packages onc-rpc)
(uri (string-append "mirror://sourceforge/jamvm/jamvm/"
"JamVM%20" version "/jamvm-"
version ".tar.gz"))
- (patches (search-patches "jamvm-arm.patch"))
+ (patches (search-patches "jamvm-1.5.1-aarch64-support.patch"
+ "jamvm-1.5.1-armv7-support.patch"))
(sha256
(base32
"06lhi03l3b0h48pc7x58bk9my2nrcf1flpmglvys3wyad6yraf36"))
(assoc-ref %build-inputs "classpath"))
"--disable-int-caching"
"--enable-runtime-reloc-checks"
- "--enable-ffi")))
+ "--enable-ffi")
+ #:phases
+ ,(if (string-prefix? "aarch64" (or (%current-system)
+ (%current-target-system)))
+ ;; Makefiles and the configure script need to be regenerated to
+ ;; incorporate support for AArch64.
+ '(modify-phases %standard-phases
+ (replace 'bootstrap
+ (lambda _ (invoke "autoreconf" "-vif"))))
+ '%standard-phases)))
(inputs
`(("classpath" ,classpath-bootstrap)
("jikes" ,jikes)
("libffi" ,libffi)
("zip" ,zip)
("zlib" ,zlib)))
+ (native-inputs
+ (if (string-prefix? "aarch64" (or (%current-system)
+ (%current-target-system)))
+ ;; Additional packages needed for autoreconf.
+ `(("autoconf" ,autoconf)
+ ("automake" ,automake)
+ ("libtool" ,libtool))
+ '()))
(home-page "http://jamvm.sourceforge.net/")
(synopsis "Small Java Virtual Machine")
(description "JamVM is a Java Virtual Machine conforming to the JVM
(file-name (string-append "classpath-" version "-checkout"))
(sha256
(base32
- "1v2rww76ww322mpg3s12a1kkc6gkp31bm9gcxs532h0wq285fiw4"))))
+ "1v2rww76ww322mpg3s12a1kkc6gkp31bm9gcxs532h0wq285fiw4"))
+ (patches (search-patches "classpath-aarch64-support.patch"))))
(arguments
`(#:make-flags
;; Ensure that the initial heap size is smaller than the maximum
(base32
"1nl0zxz8y5x8gwsrm7n32bry4dx8x70p8z3s9jbdvs8avyb8whkn"))
(patches
- (search-patches "jamvm-2.0.0-disable-branch-patching.patch"))
+ (search-patches "jamvm-2.0.0-disable-branch-patching.patch"
+ "jamvm-2.0.0-opcode-guard.patch"
+ "jamvm-2.0.0-aarch64-support.patch"))
(snippet
'(begin
;; Remove precompiled software.
#t))))
(build-system gnu-build-system)
(arguments
- `(#:configure-flags
- (list (string-append "--with-classpath-install-dir="
- (assoc-ref %build-inputs "classpath")))))
+ (substitute-keyword-arguments (package-arguments jamvm-1-bootstrap)
+ ((#:configure-flags _)
+ '(list (string-append "--with-classpath-install-dir="
+ (assoc-ref %build-inputs "classpath"))))))
(inputs
`(("classpath" ,classpath-devel)
("ecj-javac-wrapper" ,ecj-javac-wrapper)
(sha256
(base32
"0bg9sb4f7qbq77c0zf9m17p47ga0kf0r9622g9p12ysg26jd1ksg"))
+ (patches (search-patches
+ "icedtea-6-extend-hotspot-aarch64-support.patch"))
(modules '((guix build utils)))
(snippet
'(begin
`("--enable-bootstrap"
"--enable-nss"
"--without-rhino"
- "--with-parallel-jobs"
+ ,(string-append "--with-parallel-jobs="
+ (number->string (parallel-job-count)))
"--disable-downloading"
"--disable-tests"
,(string-append "--with-ecj="
(assoc-ref inputs
(string-append part "-src"))
part))
- '("jdk" "corba"
+ '("jdk" "hotspot" "corba"
"langtools" "jaxp" "jaxws")))
- (with-directory-excursion "openjdk"
- (invoke "tar" "xvf" (assoc-ref inputs "hotspot-src"))
- (rename-file "hg-checkout" "hotspot"))
(substitute* "patches/freetypeversion.patch"
(("REQUIRED_FREETYPE_VERSION = 2.2.1")
"REQUIRED_FREETYPE_VERSION = 2.10.1"))
(changeset "jdk6-b41")))
(sha256
(base32
- "07lc1z4k5dj9nrc1wvwmpvxr3xgxrdkdh53xb95skk5ij49yagfd"))
- (patches
- (search-patches "icedtea-6-hotspot-gcc-segfault-workaround.patch"))))
+ "07lc1z4k5dj9nrc1wvwmpvxr3xgxrdkdh53xb95skk5ij49yagfd"))))
("corba-src"
,(origin
(method hg-fetch)
"--enable-bootstrap"
"--enable-nss"
"--without-rhino"
+ ,(string-append "--with-parallel-jobs="
+ (number->string (parallel-job-count)))
"--disable-downloading"
"--disable-tests" ;they are run in the check phase instead
"--with-openjdk-src-dir=./openjdk.src"
(base32
"17bdv39n4lh8l5737c96f3xgamx4y305m067p01cywgp7zaddqws"))
(patches (search-patches
- "icedtea-7-hotspot-gcc-segfault-workaround.patch"))))
+ "icedtea-7-hotspot-aarch64-use-c++98.patch"))))
("ant" ,ant-bootstrap)
("attr" ,attr)
("coreutils" ,coreutils)
`( ;;"--disable-bootstrap"
"--enable-bootstrap"
"--enable-nss"
+ ,(string-append "--with-parallel-jobs="
+ (number->string (parallel-job-count)))
"--disable-downloading"
"--disable-system-pcsc"
"--disable-system-sctp"
,(drop "langtools"
"15wizy123vhk40chl1b4p552jf2pw2hdww0myf11qab425axz4nw"))
("hotspot-drop"
- ,(origin
- (method url-fetch)
- (uri (string-append
- "http://icedtea.classpath.org/download/drops"
- "/icedtea8/" version "/hotspot.tar.xz"))
- (sha256
- (base32
- "1ciz1w9j0kz7s1dxdhyqq71nla9icyz6qvn0b9z2zgkklqa98qmm"))
- (patches (search-patches
- "icedtea-7-hotspot-gcc-segfault-workaround.patch"))))
+ ,(drop "hotspot"
+ "1ciz1w9j0kz7s1dxdhyqq71nla9icyz6qvn0b9z2zgkklqa98qmm"))
("nashorn-drop"
,(drop "nashorn"
"19pzl3ppaw8j6r5cnyp8qiw3hxijh3hdc46l39g5yfhdl4pr4hpa"))
"01ihmyf7k5z17wbr7xig7y40l9f01d5zjgkcmawn1102hw5kchpq"))
(modules '((guix build utils)))
(snippet
- `(begin
- (for-each delete-file
- (find-files "." ".*.(bin|exe|jar)$"))
- #t))))
+ `(begin
+ (for-each delete-file
+ (find-files "." ".*.(bin|exe|jar)$"))
+ #t))))
(build-system gnu-build-system)
(outputs '("out" "jdk" "doc"))
(arguments
(number->string (parallel-job-count))))
'())
,@make-flags))))
+ (add-after 'unpack 'patch-jni-libs
+ ;; Hardcode dynamically loaded libraries.
+ (lambda _
+ (let* ((library-path (search-path-as-string->list
+ (getenv "LIBRARY_PATH")))
+ (find-library (lambda (name)
+ (search-path
+ library-path
+ (string-append "lib" name ".so")))))
+ (for-each
+ (lambda (file)
+ (catch 'decoding-error
+ (lambda ()
+ (substitute* file
+ (("VERSIONED_JNI_LIB_NAME\\(\"(.*)\", \"(.*)\"\\)"
+ _ name version)
+ (format #f "\"~a\"" (find-library name)))
+ (("JNI_LIB_NAME\\(\"(.*)\"\\)" _ name)
+ (format #f "\"~a\"" (find-library name)))))
+ (lambda _
+ ;; Those are safe to skip.
+ (format (current-error-port)
+ "warning: failed to substitute: ~a~%"
+ file))))
+ (find-files "."
+ "\\.c$|\\.h$"))
+ #t)))
;; Some of the libraries in the lib/ folder link to libjvm.so.
;; But that shared object is located in the server/ folder, so it
;; cannot be found. This phase creates a symbolic link in the
(add-after 'install 'install-libjvm
(lambda* (#:key inputs outputs #:allow-other-keys)
(let* ((lib-out (string-append (assoc-ref outputs "out")
- "/lib"))
+ "/lib"))
(lib-jdk (string-append (assoc-ref outputs "jdk")
- "/lib")))
+ "/lib")))
(symlink (string-append lib-jdk "/server/libjvm.so")
(string-append lib-jdk "/libjvm.so"))
(symlink (string-append lib-out "/server/libjvm.so")
(unless (eq? (stat:type s) 'symlink)
(format #t "reset ~a~%" file)
(utime file 0 0 0 0))))
- (find-files dir #:directories? #t))
+ (find-files dir #:directories? #t))
(with-directory-excursion dir
(let ((files (find-files "." ".*" #:directories? #t)))
(apply invoke "zip" "-0" "-X" zip files)))))
- (find-files (assoc-ref outputs "doc") ".*.zip$"))
+ (find-files (assoc-ref outputs "doc") ".*.zip$"))
#t)))))
(inputs
`(("alsa-lib" ,alsa-lib)
"openjdk-10-idlj-reproducibility.patch"))
(modules '((guix build utils)))
(snippet
- `(begin
- (for-each delete-file (find-files "." ".*.(bin|exe|jar)$"))
- #t))))
+ `(begin
+ (for-each delete-file (find-files "." ".*.(bin|exe|jar)$"))
+ #t))))
(arguments
- (substitute-keyword-arguments (package-arguments openjdk9)
- ((#:phases phases)
- `(modify-phases ,phases
- (replace 'fix-java-shebangs
- (lambda _
- ;; This file was "fixed" by patch-source-shebangs, but it requires
- ;; this exact first line.
- (substitute* "make/data/blacklistedcertsconverter/blacklisted.certs.pem"
- (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))
- #t))
- (replace 'configure
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (invoke "bash" "./configure"
- (string-append "--with-freetype=" (assoc-ref inputs "freetype"))
- "--disable-freetype-bundling"
- "--disable-warnings-as-errors"
- "--disable-hotspot-gtest"
- "--with-giflib=system"
- "--with-libjpeg=system"
- "--with-native-debug-symbols=zipped"
- (string-append "--prefix=" (assoc-ref outputs "out")))
- #t))))))
+ (substitute-keyword-arguments (package-arguments openjdk9)
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (replace 'fix-java-shebangs
+ (lambda _
+ ;; This file was "fixed" by patch-source-shebangs, but it requires
+ ;; this exact first line.
+ (substitute* "make/data/blacklistedcertsconverter/blacklisted.certs.pem"
+ (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))
+ #t))
+ (replace 'configure
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (invoke "bash" "./configure"
+ (string-append "--with-freetype=" (assoc-ref inputs "freetype"))
+ "--disable-freetype-bundling"
+ "--disable-warnings-as-errors"
+ "--disable-hotspot-gtest"
+ "--with-giflib=system"
+ "--with-libjpeg=system"
+ "--with-native-debug-symbols=zipped"
+ (string-append "--prefix=" (assoc-ref outputs "out")))
+ #t))))))
(native-inputs
`(("openjdk9" ,openjdk9)
("openjdk9:jdk" ,openjdk9 "jdk")
"0v705w1s9lrqalzahir78pk397rkk9gfvzq821yv8h3xha0bqi6w"))
(modules '((guix build utils)))
(snippet
- `(begin
- (for-each delete-file (find-files "." ".*.(bin|exe|jar)$"))
- #t))))
+ `(begin
+ (for-each delete-file (find-files "." ".*.(bin|exe|jar)$"))
+ #t))))
(build-system gnu-build-system)
(outputs '("out" "jdk" "doc"))
(arguments
- `(#:imported-modules
- ((guix build syscalls)
- (ice-9 binary-ports)
- (rnrs bytevectors)
- ,@%gnu-build-system-modules)
+ `(#:imported-modules ((guix build syscalls)
+ ,@%gnu-build-system-modules)
#:tests? #f; requires jtreg
;; TODO package jtreg
#:configure-flags
(substitute* "make/data/blacklistedcertsconverter/blacklisted.certs.pem"
(("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))
#t))
+ (add-after 'unpack 'patch-jni-libs
+ ;; Hardcode dynamically loaded libraries.
+ (lambda _
+ (let* ((library-path (search-path-as-string->list
+ (getenv "LIBRARY_PATH")))
+ (find-library (lambda (name)
+ (search-path
+ library-path
+ (string-append "lib" name ".so")))))
+ (for-each
+ (lambda (file)
+ (catch 'decoding-error
+ (lambda ()
+ (substitute* file
+ (("VERSIONED_JNI_LIB_NAME\\(\"(.*)\", \"(.*)\"\\)"
+ _ name version)
+ (format #f "\"~a\"" (find-library name)))
+ (("JNI_LIB_NAME\\(\"(.*)\"\\)" _ name)
+ (format #f "\"~a\"" (find-library name)))))
+ (lambda _
+ ;; Those are safe to skip.
+ (format (current-error-port)
+ "warning: failed to substitute: ~a~%"
+ file))))
+ (find-files "."
+ "\\.c$|\\.h$"))
+ #t)))
(add-before 'build 'write-source-revision-file
(lambda _
(with-output-to-file ".src-rev"
(add-after 'install 'install-libjvm
(lambda* (#:key inputs outputs #:allow-other-keys)
(let* ((lib-out (string-append (assoc-ref outputs "out")
- "/lib"))
+ "/lib"))
(lib-jdk (string-append (assoc-ref outputs "jdk")
- "/lib")))
+ "/lib")))
(symlink (string-append lib-jdk "/server/libjvm.so")
(string-append lib-jdk "/libjvm.so"))
(symlink (string-append lib-out "/server/libjvm.so")
(for-each (lambda (file)
(substitute* file
(((string-append "This file was generated "
- "AUTOMATICALLY from a template "
- "file.*"))
+ "AUTOMATICALLY from a template "
+ "file.*"))
(string-append "This file was generated "
"AUTOMATICALLY from a template "
"file"))))
(ice-9 binary-ports)
(rnrs bytevectors))
(letrec ((repack-archive
- (lambda (archive)
- (let ((dir (mkdtemp! "zip-contents.XXXXXX")))
- (with-directory-excursion dir
- (invoke "unzip" archive))
- (delete-file archive)
- (for-each (compose repack-archive canonicalize-path)
- (find-files dir "(ct.sym|.*.jar)$"))
- (let ((reset-file-timestamp
- (lambda (file)
- (let ((s (lstat file)))
- (unless (eq? (stat:type s) 'symlink)
- (format #t "reset ~a~%" file)
- (utime file 0 0 0 0))))))
- (for-each reset-file-timestamp
- (find-files dir #:directories? #t)))
- (with-directory-excursion dir
- (let ((files (find-files "." ".*" #:directories? #t)))
- (apply invoke "zip" "-0" "-X" archive files)))))))
+ (lambda (archive)
+ (let ((dir (mkdtemp! "zip-contents.XXXXXX")))
+ (with-directory-excursion dir
+ (invoke "unzip" archive))
+ (delete-file archive)
+ (for-each (compose repack-archive canonicalize-path)
+ (find-files dir "(ct.sym|.*.jar)$"))
+ (let ((reset-file-timestamp
+ (lambda (file)
+ (let ((s (lstat file)))
+ (unless (eq? (stat:type s) 'symlink)
+ (format #t "reset ~a~%" file)
+ (utime file 0 0 0 0))))))
+ (for-each reset-file-timestamp
+ (find-files dir #:directories? #t)))
+ (with-directory-excursion dir
+ (let ((files (find-files "." ".*" #:directories? #t)))
+ (apply invoke "zip" "-0" "-X" archive files)))))))
(for-each repack-archive
(find-files (assoc-ref outputs "doc") ".*.zip$"))
(for-each repack-archive
(content-length
(- (stat:size (stat file))
header-length)))
- (sendfile temp-file file content-length header-length)
- (delete-file file-name)
- (close-port temp-file)
- (repack-archive (canonicalize-path temp-filename))
- (call-with-output-file file-name
- (lambda (file)
- (put-bytevector file header)
- (call-with-input-file temp-filename
- (lambda (temp-file)
- (sendfile
- file temp-file
- (stat:size (stat temp-file)) 0)))))))))))))
+ (sendfile temp-file file content-length header-length)
+ (delete-file file-name)
+ (close-port temp-file)
+ (repack-archive (canonicalize-path temp-filename))
+ (call-with-output-file file-name
+ (lambda (file)
+ (put-bytevector file header)
+ (call-with-input-file temp-filename
+ (lambda (temp-file)
+ (sendfile
+ file temp-file
+ (stat:size (stat temp-file)) 0)))))))))))))
(for-each repack-jmod
(find-files (assoc-ref outputs "jdk") ".*.jmod$")))
- #t)))
+ #t)))
(add-after 'install 'remove-timestamp-from-api-summary
(lambda* (#:key outputs #:allow-other-keys)
(substitute* (string-append (assoc-ref outputs "doc")
(name "openjdk")
(version "13.0")
(source (origin
- (method url-fetch)
- (uri "http://hg.openjdk.java.net/jdk/jdk13/archive/9c250a7600e1.tar.bz2")
- (file-name (string-append name "-" version ".tar.bz2"))
- (sha256
- (base32
- "0v0ljvx5dyzp96dw4z4ksw3pvasil7783mgnmd1wk9gads5ab8iq"))
- (modules '((guix build utils)))
- (snippet
- `(begin
- (for-each delete-file (find-files "." ".*.(bin|exe|jar)$"))
- #t))))
+ (method url-fetch)
+ (uri "http://hg.openjdk.java.net/jdk/jdk13/archive/9c250a7600e1.tar.bz2")
+ (file-name (string-append name "-" version ".tar.bz2"))
+ (sha256
+ (base32
+ "0v0ljvx5dyzp96dw4z4ksw3pvasil7783mgnmd1wk9gads5ab8iq"))
+ (modules '((guix build utils)))
+ (snippet
+ `(begin
+ (for-each delete-file (find-files "." ".*.(bin|exe|jar)$"))
+ #t))))
(inputs
`(("alsa-lib" ,alsa-lib)
("cups" ,cups)
(name "openjdk")
(version "14.0")
(source (origin
- (method url-fetch)
- (uri "http://hg.openjdk.java.net/jdk/jdk14/archive/bc54620a3848.tar.bz2")
- (file-name (string-append name "-" version ".tar.bz2"))
- (sha256
- (base32
- "0z485pk7r1xpw8004g4nrwrzj17sabgx8yfdbxwfvzkjp8qyajch"))
- (modules '((guix build utils)))
- (snippet
- `(begin
+ (method url-fetch)
+ (uri "http://hg.openjdk.java.net/jdk/jdk14/archive/bc54620a3848.tar.bz2")
+ (file-name (string-append name "-" version ".tar.bz2"))
+ (sha256
+ (base32
+ "0z485pk7r1xpw8004g4nrwrzj17sabgx8yfdbxwfvzkjp8qyajch"))
+ (modules '((guix build utils)))
+ (snippet
+ `(begin
;; The m4 macro uses 'help' to search for builtins, which is
;; not available in bash-minimal
(substitute* "make/autoconf/basics.m4"
(("if help") "if command -v"))
- (for-each delete-file (find-files "." ".*.(bin|exe|jar)$"))
- #t))))
+ (for-each delete-file (find-files "." ".*.(bin|exe|jar)$"))
+ #t))))
(inputs
`(("alsa-lib" ,alsa-lib)
("cups" ,cups)
(define-public ant/java8
(package (inherit ant-bootstrap)
(name "ant")
- (version "1.10.1")
+ (version "1.10.9")
(source (origin
(method url-fetch)
(uri (string-append "mirror://apache/ant/source/apache-ant-"
version "-src.tar.gz"))
(sha256
(base32
- "10p3dh77lkzzzcy32dk9azljixzadp46fggjfbvgkl8mmb8cxxv8"))
+ "0x78434q5ab193ma7ys27m9kwpdgrfzqj00hrf1szwcgk0lzw01z"))
(modules '((guix build utils)))
(snippet
'(begin
;; "check" phase, because the dependency on "test-jar" would always
;; result in the tests to be run.
(substitute* "build.xml"
- (("depends=\"jars,test-jar\"") "depends=\"jars\""))
+ (("depends=\"jars,test-jar") "depends=\"jars"))
(invoke "bash" "bootstrap.sh"
(string-append "-Ddist.dir="
(assoc-ref outputs "out")))))))))
;; requires Java 8.
(define-public ant
(package (inherit ant/java8)
- (version "1.9.9")
+ (version "1.9.15")
(source (origin
(method url-fetch)
(uri (string-append "mirror://apache/ant/source/apache-ant-"
version "-src.tar.gz"))
(sha256
(base32
- "1k28mka0m3isy9yr8gz84kz1f3f879rwaxrd44vdn9xbfwvwk86n"))))
+ "1xy30f1w5gaqk6g3f0vw7ygix4rb6032qkcw42y4z8wd9jihgygd"))))
(native-inputs
`(("jdk" ,icedtea-7 "jdk")
("zip" ,zip)
`(#:jar-name "java-openjfx-graphics.jar"
#:source-dir "modules/graphics/src/main/java"
#:tests? #f; require X
- #:test-dir "modules/graphics/src/test"))
+ #:test-dir "modules/graphics/src/test"
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'copy-missing-file
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((target "modules/graphics/src/main/native-prism-sw/JNativeSurface.c"))
+ (copy-file (assoc-ref inputs "JNativeSurface.c") target)
+ ;; XXX: looks like the missing file we found isn't *quite*
+ ;; compatible...
+ (substitute* target
+ (("case TYPE_INT_ARGB:") "")))))
+ (add-after 'build 'build-native
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let ((jdk (assoc-ref inputs "jdk"))
+ (class-file->class-name
+ (lambda (class-file)
+ (string-map (lambda (c)
+ (if (char=? c #\/) #\. c))
+ (string-drop-right class-file
+ (string-length ".class"))))))
+ (setenv "CPPFLAGS"
+ (string-append "-DINLINE=inline "
+ "-DLINUX "
+ "-I" jdk "/include "
+ "-I" jdk "/include/linux "
+ "-I " (getcwd) "/build/classes/include "
+ "-I " (getcwd) "/modules/graphics/src/main/native-prism-sw"))
+
+ ;; Instructions have been adapted from buildSrc/linux.gradle
+ (with-directory-excursion "build/classes"
+ ;; Build prism
+ (mkdir-p "include")
+
+ ;; Generate headers for prism
+ (apply invoke "javah" "-d" "include" "-cp" "."
+ (map class-file->class-name
+ (append (find-files "com/sun/prism/impl" "\\.class$")
+ (find-files "com/sun/prism" "PresentableState.*\\.class$"))))
+
+ ;; ...then for prism_sw
+ (apply invoke "javah" "-d" "include" "-cp" "."
+ (map class-file->class-name
+ (find-files "com/sun/pisces" "\\.class$")))
+
+ ;; ...and for prism_es2
+ (apply invoke "javah" "-d" "include" "-cp" "."
+ (map class-file->class-name
+ (find-files "com/sun/prism/es2" "\\.class$")))))
+
+ (with-directory-excursion "netbeans/native-prism"
+ (invoke "make" "CONF=Release"))
+ (with-directory-excursion "netbeans/native-prism-sw"
+ (invoke "make" "CONF=Release"))
+ ;; TODO: This fails due to unknown EGL procedure names
+ #;
+ (with-directory-excursion "netbeans/native-prism-es2"
+ (invoke "make" "CONF=Release"))
+
+ (let* ((out (assoc-ref outputs "out"))
+ (dir ,(match (%current-system)
+ ("i686-linux"
+ "i386")
+ ((or "armhf-linux" "aarch64-linux")
+ "arm")
+ ((or "x86_64-linux")
+ "amd64")
+ (_ "unknown")))
+ (target (string-append out "/share/" dir "/")))
+ (mkdir-p target)
+ (for-each (lambda (file)
+ (let ((new-name
+ (string-append "lib"
+ (string-map
+ (lambda (c)
+ (if (char=? c #\-) #\_ c))
+ (string-drop (basename file)
+ (string-length "libnative-"))))))
+ (copy-file file
+ (string-append target new-name))))
+ (find-files "netbeans" "\\.so$"))))))))
(propagated-inputs
`(("java-openjfx-base" ,java-openjfx-base)
("java-swt" ,java-swt)))
+ ;; XXX: for unknown reasons
+ ;; modules/graphics/src/main/native-prism-sw/JNativeSurface.c is missing
+ ;; in this revision.
+ (native-inputs
+ `(("JNativeSurface.c"
+ ,(origin
+ (method url-fetch)
+ (uri "https://raw.githubusercontent.com/openjdk/jfx/8u20-b02\
+/modules/graphics/src/main/native-prism-sw/JNativeSurface.c")
+ (sha256
+ (base32
+ "1kp15wbnd6rn0nciczp5ibq0ikby2yysvx1gnz5fa05vl2mm8mbm"))))))
(description "OpenJFX is a client application platform for desktop,
mobile and embedded systems built on Java. Its goal is to produce a
modern, efficient, and fully featured toolkit for developing rich client
applications. This package contains media-related classes for the
OpenJFX distribution.")))
+(define-public java-openjfx-controls
+ (package (inherit java-openjfx-build)
+ (name "java-openjfx-controls")
+ (propagated-inputs
+ `(("java-openjxf-graphics" ,java-openjfx-graphics)))
+ (arguments
+ `(#:jar-name "java-openjfx-controls.jar"
+ #:source-dir "modules/controls/src/main/java"
+ #:test-dir "modules/controls/src/test"
+ ;; TODO: tests require com.sun.javafx.pgstub,
+ ;; javafx.collections.MockSetObserver, and
+ ;; com.sun.javafx.binding.ExpressionHelperUtility
+ #:tests? #false
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'copy-resources
+ (lambda _
+ (copy-recursively "modules/controls/src/test/resources"
+ "build/test-classes")
+ (copy-recursively "modules/controls/src/main/resources"
+ "build/classes"))))))
+ (description "OpenJFX is a client application platform for desktop,
+mobile and embedded systems built on Java. Its goal is to produce a
+modern, efficient, and fully featured toolkit for developing rich client
+applications. This package contains UI control classes for the
+OpenJFX distribution.")))
+
(define-public javacc-4
(package
(name "javacc")
debugging, etc.")
(license license:bsd-3)))
+;; javacc-3, as javacc-4 is not properly bootstrapped: is contains a javacc.jar
+;; in the bootstrap/ directory.
+(define-public javacc-3
+ (package
+ (inherit javacc-4)
+ (version "3.2")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/javacc/javacc")
+ (commit "release_32")))
+ (file-name (string-append "javacc-" version "-checkout"))
+ (sha256
+ (base32
+ "1pyf1xyh8gk83nxqn2v2mdws32l68ydznha41cxa4l2kkbq1v1g3"))))
+ (arguments
+ `(#:tests? #f
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'build 'set-java-version
+ (lambda _
+ (for-each
+ (lambda (file)
+ (substitute* file
+ (("debug=") "source=\"1.4\" debug=")))
+ (find-files "." "build.xml"))
+ #t))
+ (replace 'install (install-jars "bin/lib")))))))
+
(define-public javacc
(package
(inherit javacc-4)
,(package-version java-commons-lang) ".jar"))
(("\\$\\{lib\\}/commons-io/commons-io.jar")
(string-append (assoc-ref inputs "java-commons-io")
- "/share/java/commons-io-"
+ "/lib/m2/commons-io/commons-io/"
,(package-version java-commons-io)
- "-SNAPSHOT.jar"))
+ "/commons-io-"
+ ,(package-version java-commons-io)
+ ".jar"))
;; Remove dependency on svn
(("<build-info.*") "")
(("\\$\\{revision.number\\}")
,(package-version java-commons-lang) ".jar"))
(("\\$\\{lib\\}/commons-io/commons-io.jar")
(string-append (assoc-ref inputs "java-commons-io")
- "/share/java/commons-io-"
+ "/lib/m2/commons-io/commons-io/"
+ ,(package-version java-commons-io)
+ "/commons-io-"
,(package-version java-commons-io)
- "-SNAPSHOT.jar"))
+ ".jar"))
(("\\$\\{lib\\}/testng/testng-jdk15.jar")
(string-append (assoc-ref inputs "java-testng")
"/share/java/java-testng.jar"))
("java-cisd-args4j" ,java-cisd-args4j)
("java-commons-lang" ,java-commons-lang)
("java-commons-io" ,java-commons-io)
- ("hdf5" ,hdf5)
+ ("hdf5" ,hdf5-1.8)
("zlib" ,zlib)))
(native-inputs
`(("jdk" ,icedtea-8)
(build-system ant-build-system)
(arguments
`(#:jar-name "qdox.jar"
- #:tests? #f)); no tests
+ #:tests? #f; no tests
+ #:modules
+ ((guix build ant-build-system)
+ (guix build java-utils)
+ (guix build utils)
+ (sxml simple))
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'install 'create-pom
+ (lambda _
+ (with-output-to-file "pom.xml"
+ (lambda _
+ (sxml->xml
+ `((project
+ (modelVersion "4.0.0")
+ (name "QDox")
+ (groupId "com.thoughtworks.qdox")
+ (artifactId "qdox")
+ (version ,,version))))))
+ #t))
+ (replace 'install
+ (install-from-pom "pom.xml")))))
(home-page "https://github.com/codehaus/qdox")
(synopsis "Parse definitions from Java source files")
(description "QDox is a high speed, small footprint parser for extracting
documentation tools.")
(license license:asl2.0)))
+(define-public java-qdox-2-M9
+ (package
+ (inherit java-qdox)
+ (version "2.0-M9"); required by plexus-java
+ (source (origin
+ (method url-fetch)
+ ;; 2.0-M4, -M5 at https://github.com/paul-hammant/qdox
+ ;; Older releases at https://github.com/codehaus/qdox/
+ ;; Note: The release at maven is pre-generated. The release at
+ ;; github requires jflex.
+ (uri (string-append "https://repo1.maven.org/maven2/"
+ "com/thoughtworks/qdox/qdox/" version
+ "/qdox-" version "-sources.jar"))
+ (sha256
+ (base32
+ "1s2jnmx2dkwnaha12lcj26aynywgwa8sslc47z82wx8xai13y4fg"))))))
+
(define-public java-jarjar
(package
(name "java-jarjar")
(("<path id=\"path.build\">")
(string-append "<path id=\"path.build\"><fileset dir=\""
(assoc-ref inputs "java-asm-bootstrap")
- "/share/java\" includes=\"**/*.jar\"/>"))
+ "/lib/m2\" includes=\"**/*.jar\"/>"))
(("<zipfileset src=\"lib/asm-4.0.jar\"/>") "")
(("lib/asm-commons-4.0.jar")
- (string-append (assoc-ref inputs "java-asm-bootstrap")
- "/share/java/asm-6.0.jar"))
+ (car (find-files (assoc-ref inputs "java-asm-bootstrap")
+ "asm-6.0.jar")))
(("<include name=\"org/objectweb/asm/commons/Remap\\*\\.class\"/>")
(string-append "<include name=\"org/objectweb/asm/"
"commons/Remap*.class\"/>"
((#:build-target _) "library")
((#:phases phases)
`(modify-phases ,phases
+ (add-after 'unpack 'patch-classpath-for-integration
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "build.xml"
+ (("build/hamcrest-core-\\$\\{version\\}\\.jar")
+ (car (find-files (assoc-ref inputs "java-hamcrest-core")
+ "jar$"))))
+ #t))
(replace 'create-pom
(lambda _
(substitute* "pom/hamcrest-library.pom"
(define-public java-plexus-utils
(package
(name "java-plexus-utils")
- (version "3.2.0")
+ ;; sisu-build-api needs this version, later versions don't work
+ (version "3.2.1")
(source (origin
(method git-fetch)
(uri (git-reference
(file-name (git-file-name name version))
(sha256
(base32
- "1mlx7xrq7lgqjqcpg7y4hi1ghavf28vvk3har82037dqx61n0f15"))))
+ "1w169glixyk94jbczj8jzg897lsab46jihiaa3dhw0p06g35va8b"))))
(build-system ant-build-system)
;; FIXME: The default build.xml does not include a target to install
;; javadoc files.
;; FIXME: The command line tests fail, maybe because they use
;; absolute paths.
- (delete-file "cli/CommandlineTest.java"))
- #t)))))
+ (delete-file "cli/CommandlineTest.java")
+
+ ;; These tests require openjdk jmh, which is not packaged yet
+ (for-each delete-file (find-files "." "PerfTest.java$")))
+ #t))
+ (add-before 'build 'copy-resources
+ (lambda _
+ (copy-recursively "src/main/resources" "build/classes")
+ #t))
+ (replace 'install (install-from-pom "pom.xml")))))
(native-inputs
`(("java-hamcrest-core" ,java-hamcrest-core)
("java-junit" ,java-junit)))
+ (propagated-inputs
+ `(("plexus-parent-pom" ,plexus-parent-pom-5.1)))
(home-page "https://codehaus-plexus.github.io/plexus-utils/")
(synopsis "Common utilities for the Plexus framework")
(description "This package provides various Java utility classes for the
more.")
(license license:asl2.0)))
+(define-public java-plexus-utils-3.3.0
+ (package
+ (inherit java-plexus-utils)
+ (version "3.3.0")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/codehaus-plexus/plexus-utils")
+ (commit (string-append "plexus-utils-" version))))
+ (file-name (git-file-name "java-plexus-utils" version))
+ (sha256
+ (base32
+ "0d0fq21rzjy0j55kcp8w9k1rbq9rwr0r7cc8239p9jbz54vihp0g"))))))
+
(define-public java-plexus-interpolation
(package
(name "java-plexus-interpolation")
- (version "1.23")
+ (version "1.26")
(source (origin
(method git-fetch)
(uri (git-reference
(file-name (git-file-name name version))
(sha256
(base32
- "005hxxg1adv71a96lz4vp65bk3v1pi76j4c45z29xzizclib16vl"))))
+ "1rahjmhywf6d5m32qzlc9izawyvcd71abfm9k03f13rs2xmfxzlh"))))
(build-system ant-build-system)
(arguments
`(#:jar-name "plexus-interpolation.jar"
- #:source-dir "src/main"))
+ #:source-dir "src/main"
+ #:phases
+ (modify-phases %standard-phases
+ (replace 'install (install-from-pom "pom.xml")))))
+ (propagated-inputs
+ `(("plexus-parent-pom-5.1" ,plexus-parent-pom-5.1)))
(native-inputs
`(("java-junit" ,java-junit)
("java-hamcrest-core" ,java-hamcrest-core)))
(define-public java-plexus-classworlds
(package
(name "java-plexus-classworlds")
- (version "2.5.2")
+ (version "2.6.0")
(source (origin
(method git-fetch)
(uri (git-reference
(file-name (git-file-name name version))
(sha256
(base32
- "1iv8x55fbni2hg4l7pdpbwfq75xmvq1f25g6nxma8rcdpihsh13r"))))
+ "034k2hgvj1saalwbnzrbg4n0zgzwcpz1lhlb8q4kgglsp9pmm03s"))))
(build-system ant-build-system)
(arguments
`(#:jar-name "plexus-classworlds.jar"
#:source-dir "src/main"
- #:tests? #f));; FIXME: we need to generate some resources as in pom.xml
+ #:tests? #f;; FIXME: we need to generate some resources as in pom.xml
+ #:phases
+ (modify-phases %standard-phases
+ (replace 'install (install-from-pom "pom.xml")))))
+ (propagated-inputs
+ `(("plexus-parent-pom-5.1" ,plexus-parent-pom-5.1)))
(native-inputs
`(("java-junit" ,java-junit)))
(home-page "https://codehaus-plexus.github.io/plexus-classworlds/")
`(#:jar-name "container-default.jar"
#:source-dir "plexus-container-default/src/main/java"
#:test-dir "plexus-container-default/src/test"
- #:jdk ,icedtea-8
#:tests? #f; requires plexus-archiver, which depends on this package
#:phases
(modify-phases %standard-phases
+ (add-before 'build 'fix-google-collections
+ (lambda _
+ ;; Google collections are now replaced with guava
+ (substitute* "plexus-container-default/pom.xml"
+ (("google-collections") "guava")
+ (("com.google.collections") "com.google.guava"))
+ #t))
(add-before 'build 'copy-resources
(lambda _
(copy-recursively
"plexus-container-default/src/main/resources/"
"build/classes")
- #t)))))
- (inputs
- `(("worldclass" ,java-plexus-classworlds)
- ("xbean" ,java-geronimo-xbean-reflect)
- ("utils" ,java-plexus-utils)
- ("junit" ,java-junit)
- ("guava" ,java-guava)))
+ #t))
+ (replace 'install
+ (install-from-pom "plexus-container-default/pom.xml")))))
+ (propagated-inputs
+ `(("java-plexus-worldclass" ,java-plexus-classworlds)
+ ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
+ ("java-plexus-utils" ,java-plexus-utils)
+ ("java-junit" ,java-junit)
+ ("java-guava" ,java-guava)
+ ("java-plexus-containers-parent-pom" ,java-plexus-containers-parent-pom)))
(home-page "https://github.com/codehaus-plexus/plexus-containers")
(synopsis "Inversion-of-control container")
(description "Plexus-default-container is Plexus' inversion-of-control
implementation.")
(license license:asl2.0)))
+(define java-plexus-containers-parent-pom
+ (package
+ (inherit java-plexus-container-default-bootstrap)
+ (name "java-plexus-containers-parent-pom")
+ (arguments
+ `(#:tests? #f
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'configure)
+ (delete 'build)
+ (replace 'install
+ (install-pom-file "pom.xml")))))
+ (propagated-inputs
+ `(("plexus-parent-pom" ,plexus-parent-pom-4.0)))))
+
(define-public java-plexus-io
(package
(name "java-plexus-io")
- (version "3.0.0")
+ (version "3.2.0")
(source (origin
(method git-fetch)
(uri (git-reference
(file-name (git-file-name name version))
(sha256
(base32
- "1h4q9l2j9sfbscvxpnyy2hazi0r83h3am86y4r959wrl1b24xxwd"))))
+ "1r3wqfpbxq8vp4p914i8p88r0994rmcjw02hz14n11cfb6gsyvlr"))))
(build-system ant-build-system)
(arguments
`(#:jar-name "plexus-io.jar"
#:source-dir "src/main/java"
#:test-dir "src/test"
- #:jdk ,icedtea-8
#:phases
(modify-phases %standard-phases
(add-before 'build 'copy-resources
(lambda _
- (mkdir-p "build/classes/META-INF/plexus")
- (copy-file "src/main/resources/META-INF/plexus/components.xml"
- "build/classes/META-INF/plexus/components.xml")
- #t)))))
+ (mkdir-p "build/classes")
+ (copy-recursively "src/main/resources" "build/classes")
+ (mkdir-p "build/test-classes")
+ (copy-recursively "src/test/resources" "build/test-classes")
+ #t))
+ (replace 'install (install-from-pom "pom.xml")))))
+ (propagated-inputs
+ `(("java-plexus-utils" ,java-plexus-utils-3.3.0)
+ ("java-commons-io" ,java-commons-io)
+ ("plexus-parent-pom" ,plexus-parent-pom-5.1)))
(inputs
- `(("utils" ,java-plexus-utils)
- ("commons-io" ,java-commons-io)
- ("java-jsr305" ,java-jsr305)))
+ `(("java-jsr305" ,java-jsr305)))
(native-inputs
`(("junit" ,java-junit)
("hamcrest" ,java-hamcrest-core)
(define-public java-plexus-archiver
(package
(name "java-plexus-archiver")
- (version "4.1.0")
+ (version "4.2.2")
(source (origin
(method url-fetch)
(uri (string-append "https://github.com/codehaus-plexus/plexus-archiver"
"/archive/plexus-archiver-" version ".tar.gz"))
(sha256
(base32
- "0ry6i92gli0mvdmfih2vgs0lkf9yvx18h2ajxim66yg6yipnp0hg"))))
+ "144n971r3lfrx3l12nf2scm80x4xdvgbkk4bjpa4vcvvdrll6qys"))))
(build-system ant-build-system)
(arguments
`(#:jar-name "plexus-archiver.jar"
#:source-dir "src/main/java"
- #:jdk ,icedtea-8
#:test-dir "src/test"
#:test-exclude (list "**/Abstract*.java" "**/Base*.java")
#:phases
#t))
(add-before 'build 'copy-resources
(lambda _
- (mkdir-p "build/classes/META-INF/plexus")
- (copy-file "src/main/resources/META-INF/plexus/components.xml"
- "build/classes/META-INF/plexus/components.xml")
- #t)))))
+ (mkdir-p "build/classes")
+ (copy-recursively "src/main/resources" "build/classes")
+ (mkdir-p "build/test-classes")
+ (copy-recursively "src/test/resources" "build/test-classes")
+ #t))
+ (replace 'install (install-from-pom "pom.xml")))))
+ (propagated-inputs
+ `(("java-plexus-utils" ,java-plexus-utils-3.3.0)
+ ("java-plexus-io" ,java-plexus-io)
+ ("java-iq80-snappy" ,java-iq80-snappy)
+ ("java-commons-compress" ,java-commons-compress)
+ ("plexus-parent-pom" ,plexus-parent-pom-6.1)))
(inputs
- `(("utils" ,java-plexus-utils)
- ("commons-io" ,java-commons-io)
- ("snappy" ,java-iq80-snappy)
- ("io" ,java-plexus-io)
- ("compress" ,java-commons-compress)
- ("container-default" ,java-plexus-container-default-bootstrap)
- ("snappy" ,java-snappy)
- ("java-jsr305" ,java-jsr305)))
+ `(("java-jsr305" ,java-jsr305)
+ ("java-plexus-container-default"
+ ,java-plexus-container-default-bootstrap)))
(native-inputs
`(("java-hamcrest-core" ,java-hamcrest-core)
("junit" ,java-junit)
;; Failures
"**/ComponentRealmCompositionTest.java"
"**/PlexusContainerTest.java")
- #:jdk ,icedtea-8
#:phases
(modify-phases %standard-phases
+ (add-before 'build 'fix-google-collections
+ (lambda _
+ ;; Google collections are now replaced with guava
+ (substitute* "plexus-container-default/pom.xml"
+ (("google-collections") "guava")
+ (("com.google.collections") "com.google.guava"))
+ #t))
(add-before 'build 'copy-resources
(lambda _
(copy-recursively
dir "/plexus/component/composition/"
"ComponentRealmCompositionTest.java")
(("src/test") "plexus-container-default/src/test"))
- #t))))))
+ #t)))
+ (replace 'install
+ (install-from-pom "plexus-container-default/pom.xml")))))
(inputs
`(("worldclass" ,java-plexus-classworlds)
("xbean" ,java-geronimo-xbean-reflect)
(arguments
`(#:jar-name "plexus-component-annotations.jar"
#:source-dir "plexus-component-annotations/src/main/java"
- #:tests? #f)); no tests
+ #:tests? #f; no tests
+ #:phases
+ (modify-phases %standard-phases
+ (replace 'install
+ (install-from-pom "plexus-component-annotations/pom.xml")))))
+ (propagated-inputs
+ `(("java-plexus-containers-parent-pom" ,java-plexus-containers-parent-pom)))
(inputs '())
(native-inputs '())
(synopsis "Plexus descriptors generator")
(description "This package is a Maven plugin to generate Plexus descriptors
from source tags and class annotations.")))
-(define-public java-plexus-cipher
+(define-public java-plexus-component-metadata
(package
- (name "java-plexus-cipher")
- (version "1.7")
- (source (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/codehaus-plexus/plexus-cipher")
- (commit (string-append "plexus-cipher-" version))))
- (file-name (git-file-name name version))
- (sha256
- (base32
- "0m638nzlxbmnbcj5cwdpgs326ab584yv0k803zlx37r6iqwvf6b0"))))
- (build-system ant-build-system)
+ (inherit java-plexus-container-default)
+ (name "java-plexus-component-metadata")
(arguments
- `(#:jar-name "plexus-cipher.jar"
+ `(#:jar-name "plexus-component-metadata.jar"
#:source-dir "src/main/java"
+ #:test-dir "src/test"
#:jdk ,icedtea-8
- #:tests? #f; FIXME: requires sisu-inject-bean
#:phases
(modify-phases %standard-phases
+ (add-before 'configure 'chdir
+ (lambda _
+ (chdir "plexus-component-metadata")
+ #t))
(add-before 'build 'copy-resources
(lambda _
- (copy-recursively "src/main/resources" "build/classes")
- (mkdir-p "build/classes/META-INF/sisu")
- (with-output-to-file "build/classes/META-INF/sisu/javax.inject.Named"
- (lambda _
- (display "org.sonatype.plexus.components.cipher.DefaultPlexusCipher\n")))
+ (copy-recursively "src/main/resources"
+ "build/classes/")
#t)))))
+ (propagated-inputs
+ `(("java-plexus-container-default" ,java-plexus-container-default)
+ ("java-plexu-component-annotations" ,java-plexus-component-annotations)
+ ("java-plexus-utils" ,java-plexus-utils)
+ ("java-plexus-cli" ,java-plexus-cli)
+ ("java-plexus-classworlds" ,java-plexus-classworlds)
+ ("maven-plugin-api" ,maven-plugin-api)
+ ("maven-plugin-annotations" ,maven-plugin-annotations)
+ ("maven-core-bootstrap" ,maven-core-bootstrap)
+ ("maven-model" ,maven-model)
+ ("java-commons-cli" ,java-commons-cli)
+ ("java-qdox" ,java-qdox)
+ ("java-jdom2" ,java-jdom2)
+ ("java-asm" ,java-asm)))
+ (native-inputs
+ `(("java-junit" ,java-junit)
+ ("java-guava" ,java-guava)
+ ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)))
+ (synopsis "Inversion-of-control container for Maven")
+ (description "The Plexus project provides a full software stack for creating
+and executing software projects. Based on the Plexus container, the
+applications can utilise component-oriented programming to build modular,
+reusable components that can easily be assembled and reused. This package
+provides the Maven plugin generating the component metadata.")))
+
+(define-public java-plexus-cipher
+ (package
+ (name "java-plexus-cipher")
+ (version "1.7")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/codehaus-plexus/plexus-cipher")
+ (commit (string-append "plexus-cipher-" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0m638nzlxbmnbcj5cwdpgs326ab584yv0k803zlx37r6iqwvf6b0"))))
+ (build-system ant-build-system)
+ (arguments
+ `(#:jar-name "plexus-cipher.jar"
+ #:source-dir "src/main/java"
+ #:tests? #f; FIXME: requires sisu-inject-bean
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'build 'copy-resources
+ (lambda _
+ (copy-recursively "src/main/resources" "build/classes")
+ (mkdir-p "build/classes/META-INF/sisu")
+ (with-output-to-file "build/classes/META-INF/sisu/javax.inject.Named"
+ (lambda _
+ (display "org.sonatype.plexus.components.cipher.DefaultPlexusCipher\n")))
+ #t))
+ (add-before 'install 'fix-test-dependency
+ (lambda _
+ ;; sisu-inject-bean is only used for tests, but its scope is "provided".
+ (substitute* "pom.xml"
+ (("provided") "test"))
+ #t))
+ (replace 'install (install-from-pom "pom.xml")))))
(inputs
`(("java-cdi-api" ,java-cdi-api)
("java-javax-inject" ,java-javax-inject)))
+ (propagated-inputs
+ `(("java-sonatype-spice-parent-pom" ,java-sonatype-spice-parent-pom-15)))
+ (native-inputs
+ `(("java-junit" ,java-junit)))
(home-page "https://github.com/sonatype/plexus-cipher")
(synopsis "Encryption/decryption Component")
(description "Plexus-cipher contains a component to deal with encryption
and decryption.")
(license license:asl2.0)))
+(define-public java-plexus-java
+ (package
+ (name "java-plexus-java")
+ (version "0.9.10")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/codehaus-plexus/plexus-languages")
+ (commit (string-append "plexus-languages-" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0vmvgq5hfxs90yyxgssfpwq78l7vwx1ljwpkk594mrdr8sm668b5"))
+ (modules '((guix build utils)))
+ (snippet
+ `(begin
+ (for-each delete-file (find-files "." ".*.jar$"))
+ #t))))
+ (build-system ant-build-system)
+ (arguments
+ `(#:jar-name "plexus-java.java"
+ #:source-dir "plexus-java/src/main/java"
+ #:test-dir "plexus-java/src/test"
+ #:tests? #f; require mockito 2
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'build 'generate-metadata
+ (lambda _
+ (invoke "java" "-cp" (string-append (getenv "CLASSPATH") ":build/classes")
+ "org.codehaus.plexus.metadata.PlexusMetadataGeneratorCli"
+ "--source" "plexus-java/src/main/java"
+ "--output" "build/classes/META-INF/plexus/components.xml"
+ "--classes" "build/classes"
+ "--descriptors" "build/classes/META-INF")
+ (invoke "ant" "jar")
+ #t))
+ (add-before 'install 'install-parent
+ (install-pom-file "pom.xml"))
+ (replace 'install
+ (install-from-pom "plexus-java/pom.xml")))))
+ (propagated-inputs
+ `(("java-asm" ,java-asm)
+ ("java-qdox" ,java-qdox-2-M9)
+ ("java-javax-inject" ,java-javax-inject)
+ ("plexus-parent-pom" ,plexus-parent-pom-4.0)))
+ (inputs
+ `(("java-plexus-component-annotations" ,java-plexus-component-annotations)))
+ (native-inputs
+ `(("java-plexus-component-metadata" ,java-plexus-component-metadata)
+ ("java-junit" ,java-junit)))
+ (home-page "https://codehaus-plexus.github.io/plexus-languages/plexus-java")
+ (synopsis "Shared language features for Java")
+ (description "This package contains shared language features of the Java
+language, for the plexus project.")
+ (license license:asl2.0)))
+
(define-public java-plexus-compiler-api
(package
(name "java-plexus-compiler-api")
(arguments
`(#:jar-name "plexus-compiler-api.jar"
#:source-dir "plexus-compiler-api/src/main/java"
- #:jdk ,icedtea-8
- #:test-dir "plexus-compiler-api/src/test"))
- (inputs
+ #:test-dir "plexus-compiler-api/src/test"
+ #:phases
+ (modify-phases %standard-phases
+ (replace 'install
+ (install-from-pom "plexus-compiler-api/pom.xml")))))
+ (propagated-inputs
`(("java-plexus-container-default" ,java-plexus-container-default)
+ ("java-plexus-compiler-pom" ,java-plexus-compiler-pom)
("java-plexus-util" ,java-plexus-utils)))
(native-inputs
`(("java-junit" ,java-junit)))
(license (list license:asl2.0
license:expat))))
+(define java-plexus-compiler-pom
+ (package
+ (inherit java-plexus-compiler-api)
+ (name "java-plexus-compiler-pom")
+ (arguments
+ `(#:tests? #f
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'configure)
+ (delete 'build)
+ (replace 'install
+ (install-pom-file "pom.xml"))
+ (add-after 'install 'install-compilers
+ (install-pom-file "plexus-compilers/pom.xml")))))
+ (propagated-inputs
+ `(("plexus-components-parent-pom-4.0" ,plexus-components-parent-pom-4.0)))))
+
+(define plexus-components-parent-pom-4.0
+ (package
+ (name "plexus-components-parent-pom")
+ (version "4.0")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/codehaus-plexus/plexus-components")
+ (commit (string-append "plexus-components-" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "041bm8yv0m2i17mqg8zljib4ykpha7ijls2qfdwvkma4d39lhysi"))))
+ (build-system ant-build-system)
+ (arguments
+ `(#:tests? #f
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'configure)
+ (delete 'build)
+ (replace 'install
+ (install-pom-file "pom.xml")))))
+ (propagated-inputs
+ `(("plexus-parent-pom-4.0" ,plexus-parent-pom-4.0)))
+ (home-page "https://codehaus-plexus.github.io/plexus-components")
+ (synopsis "Plexus parent pom")
+ (description "This package contains the Plexus components parent POM.")
+ (license license:asl2.0)))
+
+(define-public java-plexus-compiler-manager
+ (package
+ (inherit java-plexus-compiler-api)
+ (name "java-plexus-compiler-manager")
+ (arguments
+ `(#:jar-name "compiler-compiler-manager.java"
+ #:source-dir "plexus-compiler-manager/src/main/java"
+ #:test-dir "plexus-compiler-manager/src/test"
+ #:tests? #f
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'build 'generate-metadata
+ (lambda _
+ (invoke "java" "-cp" (string-append (getenv "CLASSPATH") ":build/classes")
+ "org.codehaus.plexus.metadata.PlexusMetadataGeneratorCli"
+ "--source" "plexus-compiler-manager/src/main/java"
+ "--output" "build/classes/META-INF/plexus/components.xml"
+ "--classes" "build/classes"
+ "--descriptors" "build/classes/META-INF")
+ (invoke "ant" "jar")
+ #t))
+ (add-after 'generate-metadata 'rebuild
+ (lambda _
+ (invoke "ant" "jar")
+ #t))
+ (replace 'install
+ (install-from-pom "plexus-compiler-manager/pom.xml")))))
+ (propagated-inputs
+ `(("java-plexus-compiler-api" ,java-plexus-compiler-api)
+ ("java-plexus-compiler-pom" ,java-plexus-compiler-pom)
+ ("java-plexus-container-default" ,java-plexus-container-default)))
+ (native-inputs
+ `(("unzip" ,unzip)
+ ("java-plexus-component-metadata" ,java-plexus-component-metadata)))
+ (synopsis "Compiler management for Plexus Compiler component")
+ (description "Plexus Compiler is a Plexus component to use different
+compilers through a uniform API. This component chooses the compiler
+implementation to use in a project.")))
+
(define-public java-plexus-compiler-javac
(package
(inherit java-plexus-compiler-api)
#:source-dir "plexus-compilers/plexus-compiler-javac/src/main/java"
#:jdk ,icedtea-8
#:tests? #f; depends on compiler-test -> maven-core -> ... -> this package.
- #:test-dir "plexus-compilers/plexus-compiler-javac/src/test"))
- (inputs
+ #:test-dir "plexus-compilers/plexus-compiler-javac/src/test"
+ #:modules ((guix build ant-build-system)
+ (guix build utils)
+ (guix build java-utils)
+ (sxml simple))
+ #:phases
+ (modify-phases %standard-phases
+ ;; We cannot use java-plexus-component-metadata to generate the metadata
+ ;; because it ultimately depends on this package.
+ ;; Create it manually instead
+ (add-before 'build 'create-metadata
+ (lambda _
+ (let* ((dir "build/classes/META-INF/plexus")
+ (file (string-append dir "/components.xml")))
+ (mkdir-p dir)
+ (with-output-to-file file
+ (lambda _
+ (sxml->xml
+ `(component-set
+ (components
+ (component
+ (role "org.codehaus.plexus.compiler.Compiler")
+ (role-hint "javac")
+ (implementation "org.codehaus.plexus.compiler.javac.JavacCompiler")
+ (isolated-realm "false"))))))))
+ #t))
+ (replace 'install
+ (install-from-pom "plexus-compilers/plexus-compiler-javac/pom.xml")))))
+ (propagated-inputs
`(("java-plexus-compiler-api" ,java-plexus-compiler-api)
("java-plexus-utils" ,java-plexus-utils)
("java-plexus-container-default" ,java-plexus-container-default)))
- (native-inputs
- `(("java-junit" ,java-junit)))
(synopsis "Javac Compiler support for Plexus Compiler component")
(description "This package contains the Javac Compiler support for Plexus
Compiler component.")))
+(define plexus-components-pom-1.1.20
+ (package
+ (name "plexus-components-pom-1.1.20")
+ (version "1.1.20")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/codehaus-plexus/plexus-components")
+ (commit (string-append "plexus-components-" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1q254k95m9icyfsvaw8c226midg8v6v436wvivhv7im825mnp5yb"))))
+ (build-system ant-build-system)
+ (arguments
+ `(#:tests? #f
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'configure)
+ (delete 'build)
+ (replace 'install
+ (install-pom-file "pom.xml")))))
+ (propagated-inputs
+ `(("plexus-parent-pom" ,plexus-parent-pom-3.1)))
+ (home-page "https://github.com/codehaus-plexus/plexus-components")
+ (synopsis "Maven parent pom for plexus packages")
+ (description "This package contains the parent pom for plexus component
+packages.")
+ (license license:asl2.0)))
+
+(define-public java-plexus-digest
+ (package
+ (name "java-plexus-digest")
+ (version "1.2")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/codehaus-plexus/plexus-digest")
+ (commit "2a52ad1bda8297fa0e287163d2fa37245ec6a430")))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "19w5wxsliz8r42niry68qa665kvjsb8081dazg9vgd3pca72w07x"))))
+ (build-system ant-build-system)
+ (arguments
+ `(#:jar-name "plexus-digest.jar"
+ #:source-dir "src/main/java"
+ #:tests? #f
+ #:phases
+ (modify-phases %standard-phases
+ (replace 'install
+ (install-from-pom "pom.xml")))))
+ (propagated-inputs
+ `(("java-plexus-utils" ,java-plexus-utils)
+ ("plexus-components-pom-1.1.20" ,plexus-components-pom-1.1.20)))
+ (native-inputs
+ `(("java-junit" ,java-junit)))
+ (home-page "https://github.com/codehaus-plexus/plexus-digest")
+ (synopsis "Hash function utilities for Java")
+ (description "This package is a plexus component that contains hash
+function utilities.")
+ (license license:asl2.0)))
+
(define-public java-plexus-sec-dispatcher
(package
(name "java-plexus-sec-dispatcher")
(arguments
`(#:jar-name "plexus-sec-dispatcher.jar"
#:source-dir "src/main/java"
- #:jdk ,icedtea-8
#:phases
(modify-phases %standard-phases
(add-before 'build 'generate-models
(add-before 'check 'fix-paths
(lambda _
(copy-recursively "src/test/resources" "target")
- #t)))))
- (inputs
- `(("java-plexus-cipher" ,java-plexus-cipher)))
+ #t))
+ (replace 'install (install-from-pom "pom.xml")))))
+ (propagated-inputs
+ `(("java-plexus-utils" ,java-plexus-utils)
+ ("java-plexus-cipher" ,java-plexus-cipher)
+ ("java-sonatype-spice-parent-pom" ,java-sonatype-spice-parent-pom-12)))
(native-inputs
`(("java-modello-core" ,java-modello-core)
;; for modello:
</component>\n
</components>\n
</component-set>\n")))
- #t)))))
+ #t))
+ (replace 'install
+ (install-from-pom "pom.xml")))))
(inputs
`(("java-plexus-utils" ,java-plexus-utils)
("java-plexus-container-default" ,java-plexus-container-default)))
"modello/core/io/ModelReaderTest.java")
(("src/test") "modello-core/src/test")))
#t)))))
- (inputs
+ (propagated-inputs
`(("java-plexus-utils" ,java-plexus-utils)
("java-plexus-container-default" ,java-plexus-container-default)
("java-sisu-build-api" ,java-sisu-build-api)))
"build/classes")
#t)))))
(inputs
- `(("java-modello-core" ,java-modello-core)
- ,@(package-inputs java-modello-core)))
+ `(("java-modello-core" ,java-modello-core)))
(synopsis "Modello Java Plugin")
(description "Modello Java Plugin generates Java objects for the model.")))
"java/org/codehaus/modello/plugins/xml/XmlModelloPluginTest.java"
(("src/test") "modello-plugins/modello-plugin-xml/src/test")))
#t)))))
- (inputs
+ (propagated-inputs
`(("java-modello-core" ,java-modello-core)
- ("java-modello-plugins-java" ,java-modello-plugins-java)
- ,@(package-inputs java-modello-core)))
+ ("java-modello-plugins-java" ,java-modello-plugins-java)))
(synopsis "Modello XML Plugin")
(description "Modello XML Plugin contains shared code for every plugins
working on XML representation of the model.")))
(copy-recursively "modello-plugins/modello-plugin-xpp3/src/main/resources"
"build/classes")
#t)))))
- (inputs
+ (propagated-inputs
`(("java-modello-core" ,java-modello-core)
("java-modello-plugins-java" ,java-modello-plugins-java)
- ("java-modello-plugins-xml" ,java-modello-plugins-xml)
- ,@(package-inputs java-modello-core)))
+ ("java-modello-plugins-xml" ,java-modello-plugins-xml)))
(native-inputs
`(("java-xmlunit" ,java-xmlunit)
("java-modello-test" ,java-modello-test)
(invoke "jar"
"-cf" (string-append "dist/asm-" ,version ".jar")
"-C" "output/build/tmp" ".")))
+ (add-before 'install 'fix-pom
+ (lambda _
+ (substitute* (find-files "archive" "\\.pom$")
+ (("@product.artifact@") ,version))
+ #t))
+ (add-before 'install 'install-parent
+ (install-pom-file "archive/asm-parent.pom"))
(replace 'install
- (install-jars "dist")))))
+ (install-from-pom "archive/asm.pom")))))
(native-inputs
`(("java-junit" ,java-junit)))
+ (propagated-inputs
+ `(("java-org-ow2-parent-pom" ,java-org-ow2-parent-pom-1.3)))
(home-page "https://asm.ow2.io/")
(synopsis "Very small and fast Java bytecode manipulation framework")
(description "ASM is an all purpose Java bytecode manipulation and
complex transformations and code analysis tools.")
(license license:bsd-3)))
+(define java-org-ow2-parent-pom-1.3
+ (package
+ (name "java-org-ow2-parent-pom")
+ (version "1.3")
+ (source (origin
+ (method url-fetch)
+ (uri "https://repo1.maven.org/maven2/org/ow2/ow2/1.3/ow2-1.3.pom")
+ (sha256
+ (base32
+ "1yr8hfx8gffpppa4ii6cvrsq029a6x8hzy7nsavxhs60s9kmq8ai"))))
+ (build-system ant-build-system)
+ (arguments
+ `(#:tests? #f
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'unpack)
+ (delete 'build)
+ (delete 'configure)
+ (replace 'install
+ (install-pom-file (assoc-ref %build-inputs "source"))))))
+ (home-page "https://ow2.org")
+ (synopsis "Ow2.org parent pom")
+ (description "This package contains the parent pom for projects from ow2.org,
+including java-asm.")
+ (license license:lgpl2.1+)))
+
(define java-asm-bootstrap
(package
(inherit java-asm)
((#:tests? _) #f)))
(native-inputs `())))
+(define-public java-asm-8
+ (package
+ (inherit java-asm)
+ (version "8.0.1")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://gitlab.ow2.org/asm/asm")
+ (commit (string-append
+ "ASM_" (string-join (string-split version #\.)
+ "_")))))
+ (file-name (git-file-name "java-asm" version))
+ (sha256
+ (base32
+ "1s6j27zc1i76gh891w2g48b1c3abp9w8zp5j54yb1vm5h8djkd69"))))
+ (arguments
+ `(#:jar-name "asm8.jar"
+ #:source-dir "asm/src/main/java"
+ #:test-dir "asm/src/test"
+ ;; tests depend on junit5
+ #:tests? #f))
+ (propagated-inputs '())
+ (native-inputs '())))
+
+(define-public java-asm-tree-8
+ (package
+ (inherit java-asm-8)
+ (name "java-asm-tree")
+ (arguments
+ `(#:jar-name "asm-tree.jar"
+ #:source-dir "asm-tree/src/main/java"
+ #:test-dir "asm-tree/src/test"
+ ;; tests depend on junit5
+ #:tests? #f))
+ (inputs
+ `(("java-asm" ,java-asm-8)))))
+
+(define-public java-asm-analysis-8
+ (package
+ (inherit java-asm-8)
+ (name "java-asm-analysis")
+ (arguments
+ `(#:jar-name "asm-analysis.jar"
+ #:source-dir "asm-analysis/src/main/java"
+ #:test-dir "asm-analysis/src/test"
+ ;; tests depend on junit5
+ #:tests? #f))
+ (inputs
+ `(("java-asm" ,java-asm-8)
+ ("java-asm-tree" ,java-asm-tree-8)))))
+
+(define-public java-asm-util-8
+ (package
+ (inherit java-asm-8)
+ (name "java-asm-util")
+ (arguments
+ `(#:jar-name "asm-util8.jar"
+ #:source-dir "asm-util/src/main/java"
+ #:test-dir "asm-util/src/test"
+ ;; tests depend on junit5
+ #:tests? #f))
+ (inputs
+ `(("java-asm" ,java-asm-8)
+ ("java-asm-analysis" ,java-asm-analysis-8)
+ ("java-asm-tree" ,java-asm-tree-8)))))
+
(define-public java-cglib
(package
(name "java-cglib")
#:phases
(modify-phases %standard-phases
(add-after 'build 'build-javadoc ant-build-javadoc)
- (replace 'install (install-jars "target"))
+ (replace 'install (install-from-pom "pom.xml"))
(add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
(native-inputs
`(("java-junit" ,java-junit)
("java-hamcrest-core" ,java-hamcrest-core)))
+ (propagated-inputs
+ `(("apache-commons-parent-pom" ,apache-commons-parent-pom-39)))
(home-page "https://commons.apache.org/io/")
(synopsis "Common useful IO related classes")
(description "Commons-IO contains utility classes, stream implementations,
(arguments
`(#:tests? #f ; no tests included
#:jdk ,icedtea-8
- #:jar-name "jsr250.jar"))
+ #:jar-name "jsr250.jar"
+ #:modules ((guix build ant-build-system)
+ (guix build utils)
+ (guix build maven pom)
+ (guix build java-utils)
+ (sxml simple))
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'install 'create-pom
+ (lambda _
+ (with-output-to-file "pom.xml"
+ (lambda _
+ (sxml->xml
+ `((project
+ (modelVersion "4.0.0")
+ (name "jsr250")
+ (groupId "javax.annotation")
+ (artifactId "jsr250-api")
+ (version ,,version))))))
+ #t))
+ (replace 'install
+ (install-from-pom "pom.xml")))))
(home-page "https://jcp.org/en/jsr/detail?id=250")
(synopsis "Security-related annotations")
(description "This package provides annotations for security. It provides
(build-system ant-build-system)
(arguments
`(#:tests? #f ; no tests included
- #:jar-name "jsr305.jar"))
+ #:jar-name "jsr305.jar"
+ #:modules ((guix build ant-build-system)
+ (guix build java-utils)
+ (guix build maven pom)
+ (guix build utils)
+ (sxml simple))
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'install 'create-pom
+ (lambda _
+ (with-output-to-file "pom.xml"
+ (lambda _
+ (sxml->xml
+ `((project
+ (modelVersion "4.0.0")
+ (name "jsr305")
+ (groupId "com.google.code.findbugs")
+ (artifactId "jsr305")
+ (version ,,version))))))
+ #t))
+ (replace 'install
+ (install-from-pom "pom.xml")))))
(home-page "http://findbugs.sourceforge.net/")
(synopsis "Annotations for the static analyzer called findbugs")
(description "This package provides annotations for the findbugs package.
;; This is the last release of Guava that can be built with Java 7.
(version "20.0")
(source (origin
- (method url-fetch)
- (uri (string-append "https://github.com/google/guava/"
- "releases/download/v" version
- "/guava-" version "-sources.jar"))
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/google/guava/")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
(sha256
(base32
- "1gawrs5gi6j5hcfxdgpnfli75vb9pfi4sn09pnc8xacr669yajwr"))))
+ "00h5cawdjic1vind3yivzh1f58flvm1yfmhsyqwyvmbvj1vakysp"))))
(build-system ant-build-system)
(arguments
`(#:tests? #f ; no tests included
#:jar-name "guava.jar"
+ #:source-dir "guava/src"
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'trim-sources
(lambda _
- (with-directory-excursion "src/com/google/common"
+ (with-directory-excursion "guava/src/com/google/common"
;; Remove annotations to avoid extra dependencies:
;; * "j2objc" annotations are used when converting Java to
;; Objective C;
(("@ForOverride") "")
(("@J2ObjCIncompatible") "")
(("@IgnoreJRERequirement") "")))
- #t)))))
+ #t))
+ (replace 'install (install-from-pom "guava/pom.xml")))))
(inputs
`(("java-jsr305" ,java-jsr305)))
+ (propagated-inputs
+ `(("java-guava-parent-pom" ,java-guava-parent-pom)))
(home-page "https://github.com/google/guava")
(synopsis "Google core libraries for Java")
(description "Guava is a set of core libraries that includes new
more!")
(license license:asl2.0)))
+(define java-guava-parent-pom
+ (package
+ (inherit java-guava)
+ (name "java-guava-parent-pom")
+ (arguments
+ `(#:tests? #f
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'configure)
+ (delete 'build)
+ (replace 'install
+ (install-pom-file "pom.xml")))))
+ (propagated-inputs
+ `(("java-sonatype-oss-parent-pom" ,java-sonatype-oss-parent-pom-7)))))
+
;; The java-commons-logging package provides adapters to many different
;; logging frameworks. To avoid an excessive dependency graph we try to build
;; it with only a minimal set of adapters.
(define-public java-httpcomponents-httpclient
(package
(name "java-httpcomponents-httpclient")
- (version "4.5.3")
+ (version "4.5.12")
(source (origin
(method url-fetch)
(uri (string-append "mirror://apache/httpcomponents/httpclient/"
version "-src.tar.gz"))
(sha256
(base32
- "1428399s7qy3cim5wc6f3ks4gl9nf9vkjpfmnlap3jflif7g2pj1"))))
+ "1va99m2zc2liv0v9vn72p5ja8yz4s5wq7zpahaai5nr966kvxzkb"))))
(build-system ant-build-system)
(arguments
`(#:jar-name "httpcomponents-httpclient.jar"
;; package at this point.
;; https://github.com/powermock/powermock
(delete-file "archivers/sevenz/SevenZNativeHeapTest.java"))
- #t)))))
- (inputs
+ #t))
+ (replace 'install (install-from-pom "pom.xml")))))
+ (propagated-inputs
+ `(("java-xz" ,java-xz)
+ ("apache-commons-parent-pom" ,apache-commons-parent-pom-41)))
+ (native-inputs
`(("java-junit" ,java-junit)
- ("java-hamcrest-core" ,java-hamcrest-core)
- ("java-mockito" ,java-mockito-1)
- ("java-xz" ,java-xz)))
+ ("java-mockito" ,java-mockito-1)))
(home-page "https://commons.apache.org/proper/commons-compress/")
(synopsis "Java library for working with compressed files")
(description "The Apache Commons Compress library defines an API for
(build-system ant-build-system)
;; TODO: javadoc
(arguments
- `(#:jar-name "commons-cli.jar"))
+ `(#:jar-name "commons-cli.jar"
+ #:phases
+ (modify-phases %standard-phases
+ (replace 'install
+ (install-from-pom "pom.xml")))))
(native-inputs
`(("java-junit" ,java-junit)
("java-hamcrest-core" ,java-hamcrest-core)))
(define-public java-commons-codec
(package
(name "java-commons-codec")
- (version "1.10")
+ (version "1.14")
(source (origin
(method url-fetch)
(uri (string-append "mirror://apache/commons/codec/source/"
"commons-codec-" version "-src.tar.gz"))
(sha256
(base32
- "1w9qg30y4s0x8gnmr2fgj4lyplfn788jqxbcz27lf5kbr6n8xr65"))))
+ "11xr0agckkhm91pb5akf2mbk84yd54gyr178wj57gsm97fi7nkh9"))))
(build-system ant-build-system)
- (outputs '("out" "doc"))
(arguments
- `(#:test-target "test"
- #:make-flags
- (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
- (junit (assoc-ref %build-inputs "java-junit")))
- (list (string-append "-Djunit.jar=" (car (find-files junit "jar$")))
- (string-append "-Dhamcrest.jar=" (car (find-files hamcrest "jar$")))
- ;; Do not append version to jar.
- "-Dfinal.name=commons-codec"))
+ `(#:jar-name "java-commons-codec.jar"
+ #:source-dir "src/main/java"
+ #:test-dir "src/test"
+ #:test-exclude (list "**/*AbstractTest.java")
#:phases
(modify-phases %standard-phases
- (add-after 'build 'build-javadoc ant-build-javadoc)
- (replace 'install (install-jars "dist"))
- (add-after 'install 'install-doc (install-javadoc "dist/docs/api")))))
+ (add-before 'build 'copy-resources
+ (lambda _
+ (copy-recursively "src/main/resources"
+ "build/classes")
+ #t))
+ (add-before 'check 'copy-test-resources
+ (lambda _
+ (copy-recursively "src/test/resources"
+ "build/test-classes")
+ #t))
+ (replace 'install (install-from-pom "pom.xml")))))
(native-inputs
- `(("java-junit" ,java-junit)
- ("java-hamcrest-core" ,java-hamcrest-core)))
+ `(("java-commons-lang3" ,java-commons-lang3)
+ ("java-junit" ,java-junit)))
+ (propagated-inputs
+ `(("apache-commons-parent-pom" ,apache-commons-parent-pom-50)))
(home-page "https://commons.apache.org/codec/")
(synopsis "Common encoders and decoders such as Base64, Hex, Phonetic and URLs")
(description "The codec package contains simple encoder and decoders for
(string-append "<include name=\"**/*Test.java\" />"
"<exclude name=\"**/MultithreadedInitializationTest"
".java\" />")))
- #t)))))
- (inputs
+ #t))
+ (replace 'install
+ (install-from-pom "slf4j-api/pom.xml")))))
+ (propagated-inputs
+ `(("java-slf4j-parent" ,java-slf4j-parent)))
+ (native-inputs
`(("java-junit" ,java-junit)
("java-hamcrest-core" ,java-hamcrest-core)))
(home-page "https://www.slf4j.org/")
time.")
(license license:expat)))
+(define java-slf4j-parent
+ (package
+ (inherit java-slf4j-api)
+ (name "java-slf4j-parent")
+ (native-inputs `())
+ (propagated-inputs '())
+ (arguments
+ `(#:tests? #f
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'build)
+ (delete 'configure)
+ (replace 'install
+ (install-pom-file "pom.xml")))))))
+
(define-public java-slf4j-simple
(package
(name "java-slf4j-simple")
;; ... and build test helper classes here:
(apply invoke
`("javac" "-d" "."
- ,@(find-files "slf4j-api/src/test" ".*\\.java"))))))))
- (inputs
+ ,@(find-files "slf4j-api/src/test" ".*\\.java")))))
+ (replace 'install
+ (install-from-pom "slf4j-simple/pom.xml")))))
+ (propagated-inputs
+ `(("java-slf4j-api" ,java-slf4j-api)))
+ (native-inputs
`(("java-junit" ,java-junit)
- ("java-hamcrest-core" ,java-hamcrest-core)
- ("java-slf4j-api" ,java-slf4j-api)))
+ ("java-hamcrest-core" ,java-hamcrest-core)))
(home-page "https://www.slf4j.org/")
(synopsis "Simple implementation of simple logging facade for Java")
(description "SLF4J binding for the Simple implementation, which outputs
(propagated-inputs
`(("stringtemplate" ,java-stringtemplate-3)))))
+(define-public java-treelayout
+ (package
+ (name "java-treelayout")
+ (version "1.0.3")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/abego/treelayout")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "18my8ql9b1y0n0zrvkih7xfhf3dpgfhyfifvkcfhmwcvw3divxak"))))
+ (build-system ant-build-system)
+ (arguments
+ `(#:jar-name (string-append ,name "-" ,version ".jar")
+ #:source-dir "org.abego.treelayout/src/main/java"
+ #:test-dir "org.abego.treelayout/src/test"))
+ (inputs
+ `(("java-junit" ,java-junit)))
+ (native-inputs
+ `(("java-hamcrest-core" ,java-hamcrest-core)))
+ (home-page "http://treelayout.sourceforge.net")
+ (synopsis "Tree Layout Algorithm in Java")
+ (description "TreeLayout creates tree layouts for arbitrary trees. It is
+not restricted to a specific output or format, but can be used for any kind of
+two dimensional diagram. Examples are Swing based components, SVG files, etc.
+This is possible because TreeLayout separates the layout of a tree from the
+actual rendering.")
+ (license license:bsd-3)))
+
+(define-public java-antlr4-runtime
+ (package
+ (name "java-antlr4-runtime")
+ (version "4.8")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/antlr/antlr4")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1qal3add26qxskm85nk7r758arladn5rcyjinmhlhznmpbbv9j8m"))
+ (patches
+ (search-patches "java-antlr4-Add-standalone-generator.patch"
+ "java-antlr4-fix-code-too-large.java"))))
+ (build-system ant-build-system)
+ (arguments
+ `(#:jar-name "java-antlr4-runtime.jar"
+ #:source-dir "runtime/Java/src/org"
+ #:tests? #f; tests depend on java-antlr4 itself
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'build 'copy-resources
+ (lambda _
+ (copy-recursively "runtime/Java/src/main/dot"
+ "build/classes")
+ #t)))))
+ (home-page "https://www.antlr.org")
+ (synopsis "ANTLR runtime library")
+ (description "This package contains the runtime library used with generated
+sources by ANTLR.")
+ (license license:bsd-3)))
+
+(define-public antlr4
+ (package
+ (inherit java-antlr4-runtime)
+ (name "antlr4")
+ (arguments
+ `(#:jar-name "antlr4.jar"
+ #:source-dir "tool/src"
+ #:test-dir "tool-testsuite/test:runtime-testsuite/test:runtime-testsuite/annotations/src"
+ #:test-include (list "**/Test*.java")
+ #:test-exclude (list
+ ;; no runnable method
+ "**/TestOutputReading.java"
+ ;; no @Test methods
+ "**/TestParserErrors.java"
+ "**/TestSemPredEvalParser.java"
+ "**/TestSets.java"
+ "**/TestListeners.java"
+ "**/TestParseTrees.java"
+ "**/TestParserExec.java"
+ "**/TestLexerErrors.java"
+ "**/TestPerformance.java"
+ "**/TestCompositeParsers.java"
+ "**/TestLexerExec.java"
+ "**/TestSemPredEvalLexer.java"
+ "**/TestLeftRecursion.java"
+ "**/TestFullContextParsing.java"
+ "**/TestCompositeLexers.java"
+ ;; Null pointer exception
+ "**/TestCompositeGrammars.java"
+ ;; Wrong assumption on emoji
+ "**/TestUnicodeData.java")
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'build 'fix-build.xml
+ (lambda _
+ ;; tests are not in a java subdirectory
+ (substitute* "build.xml"
+ (("\\$\\{test.home\\}/java") "${test.home}"))
+ #t))
+ ;; tests require to have a working antlr4 binary
+ (delete 'check)
+ (add-after 'bin-install 'check
+ (lambda _
+ (invoke "ant" "compile-tests")
+ (invoke "ant" "check" "-Dtest.home=runtime-testsuite/annotations/src")
+ (invoke "ant" "check" "-Dtest.home=runtime-testsuite/test")
+ (invoke "ant" "check" "-Dtest.home=tool-testsuite/test")
+ #t))
+ (add-before 'check 'remove-unrelated-languages
+ (lambda _
+ ;; There are tests for other languages that ANTLR can generate, but
+ ;; we don't have the infrastructure for that yet. Let's test Java
+ ;; generation only.
+ (for-each
+ (lambda (language)
+ (delete-file-recursively
+ (string-append "runtime-testsuite/test/org/antlr/v4/test/runtime/"
+ language)))
+ '("cpp" "csharp" "go" "javascript" "php" "python" "python2"
+ "python3" "swift"))
+ #t))
+ (add-before 'check 'generate-test-parsers
+ (lambda* (#:key outputs #:allow-other-keys)
+ (define (run-antlr dir filename package)
+ (invoke "antlr4" "-lib" dir "-visitor" "-no-listener"
+ "-package" package (string-append dir "/" filename)
+ "-Xlog"))
+ (setenv "PATH" (string-append (getenv "PATH") ":"
+ (assoc-ref outputs "out") "/bin"))
+ (run-antlr "runtime-testsuite/test/org/antlr/v4/test/runtime/java/api"
+ "Java.g4" "org.antlr.v4.test.runtime.java.api")
+ (run-antlr "runtime-testsuite/test/org/antlr/v4/test/runtime/java/api"
+ "VisitorBasic.g4" "org.antlr.v4.test.runtime.java.api")
+ (run-antlr "runtime-testsuite/test/org/antlr/v4/test/runtime/java/api"
+ "VisitorCalc.g4" "org.antlr.v4.test.runtime.java.api")
+ #t))
+ (add-before 'check 'remove-graphemes
+ (lambda _
+ ;; When running antlr on grahemes.g4, we get a runtime exception:
+ ;; set is empty. So delete the file that depends on it.
+ (delete-file
+ "runtime-testsuite/test/org/antlr/v4/test/runtime/java/api/perf/TimeLexerSpeed.java")
+ #t))
+ (add-after 'install 'bin-install
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
+ (bin (string-append (assoc-ref outputs "out") "/bin")))
+ (mkdir-p bin)
+ (with-output-to-file (string-append bin "/antlr4")
+ (lambda _
+ (display
+ (string-append "#!" (which "sh") "\n"
+ "java -cp " jar "/antlr4.jar:"
+ (string-join
+ (apply
+ append
+ (map
+ (lambda (input)
+ (find-files (assoc-ref inputs input)
+ ".*\\.jar"))
+ '("antlr3" "java-stringtemplate"
+ "java-antlr4-runtime" "java-treelayout"
+ "java-jsonp-api" "java-icu4j")))
+ ":")
+ " org.antlr.v4.Tool $*"))))
+ (chmod (string-append bin "/antlr4") #o755)
+ #t)))
+ (add-before 'build 'copy-resources
+ (lambda _
+ (copy-recursively "tool/resources/" "build/classes")
+ #t))
+ (add-before 'build 'generate-unicode
+ (lambda _
+ ;; First: build the generator
+ (invoke "javac" "-cp" (getenv "CLASSPATH")
+ "tool/src/org/antlr/v4/unicode/UnicodeRenderer.java"
+ "tool/src/org/antlr/v4/unicode/UnicodeDataTemplateController.java")
+ ;; Then use it
+ (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
+ ":tool/src:runtime/Java")
+ "org.antlr.v4.unicode.UnicodeRenderer"
+ "tool/resources/org/antlr/v4/tool/templates"
+ "unicodedata"
+ "tool/src/org/antlr/v4/unicode/UnicodeData.java")
+ ;; It seems there is a bug with our ST4
+ (substitute* "tool/src/org/antlr/v4/unicode/UnicodeData.java"
+ (("\\\\>") ">"))
+ ;; Remove the additional file
+ (delete-file "tool/src/org/antlr/v4/unicode/UnicodeRenderer.java")
+ #t))
+ (add-before 'build 'generate-grammar
+ (lambda* (#:key inputs #:allow-other-keys)
+ (with-directory-excursion "tool/src/org/antlr/v4/parse"
+ (for-each (lambda (file)
+ (display file)
+ (newline)
+ (invoke "antlr3" file))
+ '("ANTLRLexer.g" "ANTLRParser.g" "BlockSetTransformer.g"
+ "GrammarTreeVisitor.g" "ATNBuilder.g"
+ "ActionSplitter.g" "LeftRecursiveRuleWalker.g")))
+ (with-directory-excursion "tool/src/org/antlr/v4/codegen"
+ (install-file "../parse/ANTLRParser.tokens" ".")
+ (display "SourceGenTriggers.g\n")
+ (invoke "antlr3" "SourceGenTriggers.g"))
+ #t)))))
+ (inputs
+ `(("antlr3" ,antlr3)
+ ("java-antlr4-runtime" ,java-antlr4-runtime)
+ ("java-icu4j" ,java-icu4j)
+ ("java-jsonp-api" ,java-jsonp-api)
+ ("java-stringtemplate" ,java-stringtemplate)
+ ("java-treelayout" ,java-treelayout)))
+ (native-inputs
+ `(("java-junit" ,java-junit)))
+ (synopsis "Parser and lexer generator in Java")
+ (description "ANTLR (ANother Tool for Language Recognition) is a powerful
+parser generator for reading, processing, executing, or translating structured
+text or binary files. It's widely used to build languages, tools, and
+frameworks. From a grammar, ANTLR generates a parser that can build and walk
+parse trees.")))
+
+(define-public java-antlr4-runtime-4.1
+ (package
+ (inherit java-antlr4-runtime)
+ (version "4.1")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/antlr/antlr4")
+ (commit version)))
+ (file-name (git-file-name "antlr4" version))
+ (sha256
+ (base32
+ "1i8hmx5an58cjyvhji0xgpvd6lq00z1k1mjys025q2wqc25wv4c1"))))
+ (arguments
+ (substitute-keyword-arguments (package-arguments java-antlr4-runtime)
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (add-before 'configure 'chmod
+ (lambda _
+ (chmod "build.xml" #o644)
+ #t))))))
+ (inputs
+ `(("java-treelayout" ,java-treelayout)))))
+
+(define-public antlr4-4.1
+ (package
+ (inherit antlr4)
+ (version (package-version java-antlr4-runtime-4.1))
+ (source (package-source java-antlr4-runtime-4.1))
+ (arguments
+ (substitute-keyword-arguments (package-arguments antlr4)
+ ((#:test-dir _)
+ "tool/test")
+ ((#:test-exclude excludes)
+ `(list "**/TestParseErrors.java"
+ "**/TestTopologicalSort.java"
+ ,@excludes))
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (delete 'generate-unicode)
+ (replace 'check
+ (lambda _
+ (invoke "ant" "check")
+ #t))
+ (add-before 'configure 'chmod
+ (lambda _
+ (chmod "build.xml" #o644)
+ #t))
+ (delete 'remove-graphemes)
+ (delete 'remove-unrelated-languages)
+ (delete 'generate-test-parsers)))))
+ (inputs
+ (alist-replace
+ "java-antlr4-runtime" (list java-antlr4-runtime-4.1)
+ (package-inputs antlr4)))))
+
+(define-public java-tunnelvisionlabs-antlr4-runtime-annotations
+ (package
+ (inherit java-antlr4-runtime)
+ (name "java-tunnelvisionlabs-antlr4-runtime-annotations")
+ (version "4.7.4")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/tunnelvisionlabs/antlr4")
+ (commit (string-append version "-opt"))))
+ (file-name (git-file-name "java-tunnelvisionlabs-antlr4" version))
+ (sha256
+ (base32
+ "1mf2lvvsszpialsk23ma83pwp50nd32lrbjpa847zlm5gmranbr8"))
+ (patches
+ (search-patches "java-antlr4-Add-standalone-generator.patch"
+ "java-tunnelvisionlabs-antlr-code-too-large.patch"))))
+ (arguments
+ `(#:jar-name "java-antlr4-runtime-annotations.jar"
+ #:source-dir "runtime/JavaAnnotations/src"
+ #:tests? #f; no tests
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'build 'copy-resources
+ (lambda _
+ (copy-recursively "runtime/JavaAnnotations/resources"
+ "build/classes")
+ #t))
+ (add-after 'copy-resources 'rebuild-jar
+ (lambda _
+ (invoke "ant" "jar")
+ #t)))))
+ (inputs '())
+ (native-inputs '())
+ (synopsis "Annotations for ANTLR's runtime library")
+ (description "This package contains annotations used during the build of
+the runtime library of ANTLR.")))
+
+;; the runtime of this library requires a lexer that is generated by antlr4.
+;; However, antlr4 itself requires this library at build and run-time. We
+;; use antlr4@4.1, the closest version of antlr that doesn't need this
+;; bootstrap process, to generate the lexer. The generated lexer is built
+;; for the 4.1 runtime, which is slightly different from this runtime.
+;; So, we build the runtime with antlr 4.1, with a broken xml lexer, that we
+;; use to build antlr4. We then re-use this antlr4 to build the runtime, and
+;; the proper, working, runtime to build antlr4 again.
+(define java-tunnelvisionlabs-antlr4-runtime-bootstrap
+ (package
+ (inherit java-antlr4-runtime)
+ (name "java-tunnelvisionlabs-antlr4-runtime")
+ (version (package-version java-tunnelvisionlabs-antlr4-runtime-annotations))
+ (source (package-source java-tunnelvisionlabs-antlr4-runtime-annotations))
+ (arguments
+ `(#:jar-name "java-antlr4-runtime.jar"
+ #:source-dir "runtime/Java/src"
+ #:tests? #f; tests require antlr4, but antlr4 depends on this package
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'build 'generate-xpath-lexer
+ (lambda _
+ (invoke "antlr4" "-lib" "runtime/Java/src/org/antlr/v4/runtime/tree/xpath"
+ "-visitor" "-no-listener"
+ "-package" "org.antlr.v4.runtime.tree.xpath"
+ "runtime/Java/src/org/antlr/v4/runtime/tree/xpath/XPathLexer.g4")
+ ;; Generated code is for an incompatible version of the runtime
+ (substitute* "runtime/Java/src/org/antlr/v4/runtime/tree/xpath/XPathLexer.java"
+ (("LexerATNSimulator\\(this,_ATN,_decisionToDFA,_sharedContextCache\\)")
+ "LexerATNSimulator(this,_ATN)"))
+ #t))
+ (add-before 'build 'copy-resources
+ (lambda _
+ (copy-recursively "runtime/Java/src/main/dot"
+ "build/classes")
+ #t)))))
+ (native-inputs
+ `(("antlr4" ,antlr4-4.1)
+ ("java-tunnelvisionlabs-antlr4-runtime-annotations"
+ ,java-tunnelvisionlabs-antlr4-runtime-annotations)))))
+
+(define java-tunnelvisionlabs-antlr4-bootstrap
+ (package
+ (inherit antlr4)
+ (name "java-tunnelvisionlabs-antlr4")
+ (version (package-version java-tunnelvisionlabs-antlr4-runtime-annotations))
+ (source (package-source java-tunnelvisionlabs-antlr4-runtime-annotations))
+ (arguments
+ (substitute-keyword-arguments (package-arguments antlr4)
+ ((#:test-dir _)
+ "tool/test:runtime-testsuite/src")
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (delete 'remove-unrelated-languages)
+ (delete 'remove-graphemes)
+ (delete 'generate-test-parsers)
+ (delete 'check)))))
+ (native-inputs '())
+ (inputs
+ `(("antlr3" ,antlr3)
+ ("java-antlr4-runtime" ,java-tunnelvisionlabs-antlr4-runtime-bootstrap)
+ ("java-tunnelvisionlabs-antlr4-runtime-annotations"
+ ,java-tunnelvisionlabs-antlr4-runtime-annotations)
+ ("java-icu4j" ,java-icu4j)
+ ("java-jsonp-api" ,java-jsonp-api)
+ ("java-stringtemplate" ,java-stringtemplate)
+ ("java-treelayout" ,java-treelayout)))))
+
+(define-public java-tunnelvisionlabs-antlr4-runtime
+ (package
+ (inherit java-tunnelvisionlabs-antlr4-runtime-bootstrap)
+ (native-inputs
+ (alist-replace
+ "antlr4" (list java-tunnelvisionlabs-antlr4-bootstrap)
+ (package-native-inputs java-tunnelvisionlabs-antlr4-runtime-bootstrap)))))
+
+(define-public java-tunnelvisionlabs-antlr4
+ (package
+ (inherit java-tunnelvisionlabs-antlr4-bootstrap)
+ (inputs
+ (alist-replace
+ "java-antlr4-runtime" (list java-tunnelvisionlabs-antlr4-runtime)
+ (package-inputs java-tunnelvisionlabs-antlr4-bootstrap)))))
+
(define-public java-commons-cli-1.2
;; This is a bootstrap dependency for Maven2.
(package
`(("junit" ,java-junit)
("hamcrest" ,java-hamcrest-core)))
(home-page "https://github.com/FasterXML/jackson-core")
- (synopsis "")
- (description "")
+ (synopsis "Low-level streaming parser and generator abstractions")
+ (description "This package contains core low-level incremental
+(streaming) parser and generator abstractions used by the Jackson Data
+Processor. It also includes the default implementation of handler types
+(parser, generator) that handle JSON format.")
(license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
(define-public java-fasterxml-jackson-databind
(name "java-woodstox-core")
(version "5.0.3")
(source (origin
- (method url-fetch)
- (uri (string-append "https://github.com/FasterXML/woodstox/archive/"
- "woodstox-core-" version ".tar.gz"))
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/FasterXML/woodstox")
+ (commit (string-append "woodstox-core-" version))))
+ (file-name (git-file-name name version))
(sha256
(base32
- "1i7pdgb8jbw6gdy5kmm0l6rz109n2ns92pqalpyp24vb8vlvdfd4"))))
+ "0bfylk24a967hwxprxqbg6cdvm6n4ldcarp54yg980viwvjiglyp"))))
(build-system ant-build-system)
(arguments
`(#:jar-name "woodstox.jar"
(name "java-fasterxml-jackson-dataformat-xml")
(version "2.9.4")
(source (origin
- (method url-fetch)
- (uri (string-append "https://github.com/FasterXML/"
- "jackson-dataformat-xml/archive/"
- "jackson-dataformat-xml-" version ".tar.gz"))
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/FasterXML/jackson-dataformat-xml")
+ (commit (string-append "jackson-dataformat-xml-" version))))
+ (file-name (git-file-name name version))
(sha256
(base32
- "111fkkl90w31jbf30kgj82qdcxlw4sxppki7i198liw0ck1jcavq"))))
+ "0s1wl65mbs57c2hz2v8rnh8i04y5lpyyvnjz562j5j6b83vwwpfx"))))
(build-system ant-build-system)
(arguments
`(#:jar-name "jackson-dataformat-xml.jar"
(name "java-hdrhistogram")
(version "2.1.9")
(source (origin
- (method url-fetch)
- (uri (string-append "https://github.com/HdrHistogram/HdrHistogram/"
- "archive/HdrHistogram-" version ".tar.gz"))
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/HdrHistogram/HdrHistogram")
+ (commit (string-append "HdrHistogram-" version))))
+ (file-name (git-file-name name version))
(sha256
(base32
- "1sicbmc3sr42nw93qbkb26q9rn33ag33k6k77phjc3j5h5gjffqv"))))
+ "1cw8aa1vk258k42xs6wpy72m4gbai540jq032qsa7c5586iawx2d"))))
(build-system ant-build-system)
(arguments
`(#:jar-name "java-hdrhistogram.jar"
#:source-dir "src/main/java"
#:phases
(modify-phases %standard-phases
+ (add-after 'unpack 'make-files-writable
+ (lambda _
+ (for-each make-file-writable (find-files "."))
+ #t))
(add-before 'configure 'set-version
(lambda _
(let* ((version-java "src/main/java/org/HdrHistogram/Version.java")
`(#:jar-name "java-aopalliance.jar"
#:jdk ,icedtea-8
#:tests? #f; no tests
- #:source-dir "aopalliance/src/main"))
+ #:source-dir "aopalliance/src/main"
+ #:modules ((guix build ant-build-system)
+ (guix build utils)
+ (guix build maven pom)
+ (guix build java-utils)
+ (sxml simple))
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'install 'create-pom
+ (lambda _
+ (with-output-to-file "pom.xml"
+ (lambda _
+ (sxml->xml
+ `((project
+ (modelVersion "4.0.0")
+ (name "aopalliance")
+ (groupId "aopalliance")
+ (artifactId "aopalliance")
+ (version "1.0"))))))
+ #t))
+ (replace 'install
+ (install-from-pom "pom.xml")))))
(home-page "http://aopalliance.sourceforge.net")
(synopsis "Aspect-Oriented Programming")
(description "The AOP Alliance project is a joint project between several
(define-public java-javax-inject
(package
(name "java-javax-inject")
- (version "tck-1")
+ (version "1")
(source (origin
- (method url-fetch)
- (uri (string-append "https://github.com/javax-inject/javax-inject/"
- "archive/javax.inject-" version ".tar.gz"))
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/javax-inject/javax-inject")
+ (commit version)))
+ (file-name (git-file-name name version))
(sha256
(base32
- "1ydrlvh2r7vr1g7lhjwy3w2dggpj9h6pix1lakkkgdywb365n6g0"))))
+ "1rspl0nkvk1jif6nccikw93xic6ljj2b6kpy2mffwi2mnvc13j7x"))))
(build-system ant-build-system)
(arguments
`(#:jar-name "java-javax-inject.jar"
- #:jdk ,icedtea-8
- #:tests? #f)); no tests
+ #:tests? #f; no tests
+ #:phases
+ (modify-phases %standard-phases
+ (replace 'install
+ (install-from-pom "pom.xml")))))
(home-page "https://github.com/javax-inject/javax-inject")
(synopsis "JSR-330: Dependency Injection for Java")
(description "This package specifies a means for obtaining objects in such
(arguments
`(#:jar-name "java-guice.jar"
#:jdk ,icedtea-8
- #:tests? #f ; FIXME: tests are not in a java sub directory
+ #:tests? #f; FIXME: tests are not in a java sub directory
#:source-dir "core/src"
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'make-files-writable
(lambda _
(for-each make-file-writable (find-files "."))
- #t)))))
- (inputs
- `(("guava" ,java-guava)
+ #t))
+ (replace 'install
+ (install-from-pom "core/pom.xml")))))
+ (propagated-inputs
+ `(("java-aopalliance" ,java-aopalliance)
+ ("java-asm" ,java-asm)
("java-cglib" ,java-cglib)
- ("java-aopalliance" ,java-aopalliance)
+ ("java-guava" ,java-guava)
("java-javax-inject" ,java-javax-inject)
- ("java-asm" ,java-asm)))
+ ("java-guice-parent-pom" ,java-guice-parent-pom)))
(home-page "https://github.com/google/guice")
(synopsis "Lightweight dependency injection framework")
(description "Guice is a lightweight dependency injection framework for
("servlet" ,java-classpathx-servletapi)
,@(package-inputs java-guice)))))
+(define java-guice-parent-pom
+ (package
+ (inherit java-guice)
+ (name "java-guice-parent-pom")
+ (arguments
+ `(#:tests? #f
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'configure)
+ (delete 'build)
+ (add-after 'install 'install-extensions
+ (install-pom-file "extensions/pom.xml"))
+ (replace 'install
+ (install-pom-file "pom.xml")))))
+ (propagated-inputs
+ `(("java-google-parent-pom" ,java-google-parent-pom-5)))))
+
+(define java-google-parent-pom-5
+ (package
+ (name "java-google-parent-pom")
+ (version "5")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/google/google-maven-parents")
+ (commit (string-append "google-" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0zb7hx24p8k8rfdvix2vsbfqn73jhrycdndvhf8j5gbii9wbqibv"))))
+ (build-system ant-build-system)
+ (arguments
+ `(#:tests? #f
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'configure)
+ (delete 'build)
+ (replace 'install
+ (install-pom-file "pom.xml")))))
+ (home-page "https://github.com/google/google-maven-parents")
+ (synopsis "Google parent pom")
+ (description "This package contains the Maven parent POM for other Google
+Java projects.")
+ (license license:asl2.0)))
+
(define-public java-assertj
(package
(name "java-assertj")
(file-name (git-file-name name version))
(sha256
(base32
- "0kz3f0xjack6c9syssi4qjw1rbd3q5963sk5pmr143hiibxa9csw"))))
+ "0kz3f0xjack6c9syssi4qjw1rbd3q5963sk5pmr143hiibxa9csw"))
+ (modules '((guix build utils)))
+ (snippet
+ '(begin
+ ;; Delete bundled third-party jar archives.
+ (for-each delete-file (find-files "." ".*.jar$"))
+ (for-each (lambda (file) (chmod file #o644))
+ (find-files "." "."))
+ #t))))
(build-system ant-build-system)
(arguments
`(#:build-target "jarall"
#:test-target "junit-tests-all"
+ #:make-flags (list "-DDATE" "(no date for reproducibility)")
#:phases
(modify-phases %standard-phases
+ (add-before 'install 'fix-pom
+ (lambda _
+ (substitute* "pom.xml"
+ (("org.apache-extras.beanshell") "org.beanshell"))
+ #t))
(replace 'install
- (lambda* (#:key outputs #:allow-other-keys)
- (let ((share (string-append (assoc-ref outputs "out") "/share/java")))
- (mkdir-p share)
- (copy-file "dist/bsh-2.0b6.jar" (string-append share "/bsh-2.0b6.jar"))
- #t))))))
+ (install-from-pom "pom.xml")))))
+ (inputs
+ `(("java-classpathx-servletapi" ,java-classpathx-servletapi)
+ ("java-commons-bsf" ,java-commons-bsf)))
+ (native-inputs
+ `(("java-junit" ,java-junit)
+ ("javacc" ,javacc-3)))
(home-page "http://beanshell.org/")
(synopsis "Lightweight Scripting for Java")
(description "BeanShell is a small, free, embeddable Java source
(define-public java-bouncycastle
(package
(name "java-bouncycastle")
- (version "1.60")
+ (version "1.67")
(source (origin
(method git-fetch)
(uri (git-reference
(file-name (git-file-name name version))
(sha256
(base32
- "1m921a1ac2dl797ffzg3d4j97ch308f25spb4jgsj3npfmmys5gb"))
+ "1449q7fyh03s1q0bqljcrhgacwcyqmg2bbvb3z084avgapwsainz"))
(modules '((guix build utils)))
(snippet
'(begin
`(("junit" ,java-junit)
("hamcrest" ,java-hamcrest-core)))
(home-page "https://javaee.github.io/javamail/")
- (synopsis "Mail-related functionnalities in Java")
+ (synopsis "Mail-related functionality in Java")
(description "The JavaMail API provides a platform-independent and
protocol-independent framework to build mail and messaging applications.")
;; General Public License Version 2 only ("GPL") or the Common Development
;; org.apache.xbean.asm6 is actually repackaged java-asm
(substitute* (string-append dir "XbeanAsmParameterNameLoader.java")
(("org.apache.xbean.asm5") "org.objectweb.asm"))
- #t))))))
+ #t)))
+ (replace 'install (install-from-pom "xbean-reflect/pom.xml")))))
(inputs
`(("asm" ,java-asm)
("log4j" ,java-log4j-api)
("log4j-1.2" ,java-log4j-1.2-api)
("log4j-core" ,java-log4j-core)
("logging" ,java-commons-logging-minimal)))
+ (propagated-inputs
+ `(("java-geronimo-parent-pom" ,java-geronimo-parent-pom)))
(native-inputs
`(("junit" ,java-junit)))
(home-page "https://geronimo.apache.org/maven/xbean/3.6/xbean-reflect/")
and graphs of objects for dependency injection frameworks")
(license license:asl2.0)))
+(define java-geronimo-genesis-2.1
+ (package
+ (name "java-geronimo-genesis")
+ (version "2.1")
+ (source (origin
+ (method svn-fetch)
+ (uri (svn-reference
+ (url (string-append "https://svn.apache.org/repos/asf/"
+ "geronimo/genesis/tags/genesis-"
+ version))
+ (revision 1807396)))
+ (file-name (string-append name "-" version "-source"))
+ (sha256
+ (base32
+ "119yn795jvnjf52si84q192s8wag1k013iabg78b7wnadssnnh31"))))
+ (build-system ant-build-system)
+ (arguments
+ `(#:tests? #f
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'configure)
+ (delete 'build)
+ (replace 'install
+ (install-pom-file "pom.xml"))
+ (add-after 'install 'install-enforcer-rules
+ (install-pom-file "genesis-enforcer-rules/pom.xml"))
+ (add-after 'install 'install-flava
+ (install-pom-file "genesis-default-flava/pom.xml"))
+ (add-after 'install 'install-packaging
+ (install-pom-file "genesis-packaging/pom.xml"))
+ (add-after 'install-flava 'install-flava-java4
+ (install-pom-file "genesis-default-flava/genesis-java1.4-flava/pom.xml"))
+ (add-after 'install-flava 'install-flava-java5
+ (install-pom-file "genesis-default-flava/genesis-java5-flava/pom.xml"))
+ (add-after 'install-flava 'install-flava-java6
+ (install-pom-file "genesis-default-flava/genesis-java6-flava/pom.xml")))))
+ (propagated-inputs
+ `(("apache-parent-pom" ,apache-parent-pom-13)))
+ (home-page "https://geronimo.apache.org")
+ (synopsis "Collection of maven POM files for the Geronimo project")
+ (description "Apache Geronimo is a server runtime. This package contains
+only pom files used by other components in the Geronimo project.")
+ (license license:asl2.0)))
+
+(define java-geronimo-parent-pom
+ (package
+ (inherit java-geronimo-xbean-reflect)
+ (name "java-geronimo-parent-pom")
+ (arguments
+ `(#:tests? #f
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'configure)
+ (delete 'build)
+ (replace 'install
+ (install-pom-file "pom.xml")))))
+ (propagated-inputs
+ `(("java-geronimo-genesis" ,java-geronimo-genesis-2.1)))))
+
(define-public java-geronimo-xbean-bundleutils
(package
(inherit java-geronimo-xbean-reflect)
("java-osgi-framework" ,java-osgi-framework)
("java-eclipse-osgi" ,java-eclipse-osgi)
("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin)))))
-
+
(define-public java-geronimo-xbean-asm-util
(package
(inherit java-geronimo-xbean-reflect)
(inputs
`(("java-asm" ,java-asm)))
(native-inputs '())))
-
+
(define-public java-geronimo-xbean-finder
(package
(inherit java-geronimo-xbean-reflect)
(with-directory-excursion "hawtjni-generator/src/main/resources/"
(install-file "libhawtjni.so" lib)
(install-file "hawtjni.h" inc)))
- #t)))))
+ #t))
+ (add-before 'install 'install-parent
+ (install-pom-file "pom.xml"))
+ (replace 'install
+ (install-from-pom "hawtjni-runtime/pom.xml")))))
(inputs
`(("java-commons-cli" ,java-commons-cli)
("java-asm" ,java-asm)
(lambda* (#:key outputs #:allow-other-keys)
(install-file "src/main/native-package/src/jansi.h"
(string-append (assoc-ref outputs "out") "/include"))
- #t)))))
- (inputs
+ #t))
+ (add-before 'install 'fix-pom
+ (lambda _
+ ;; pom contains variables to complete name, but we don't support that
+ (substitute* "pom.xml"
+ (("\\$\\{platform\\}") "native"))
+ #t))
+ (replace 'install
+ (install-from-pom "pom.xml")))))
+ (propagated-inputs
`(("java-hawtjni" ,java-hawtjni)))
(home-page "https://fusesource.github.io/jansi/")
(synopsis "Native library for jansi")
(modify-phases %standard-phases
(add-after 'check 'clear-term
(lambda _
- (invoke "echo" "-e" "\\e[0m"))))))
- (inputs
+ (invoke "echo" "-e" "\\e[0m")))
+ (add-before 'install 'install-parent
+ (install-pom-file "pom.xml"))
+ (add-before 'install 'fix-pom
+ (lambda _
+ ;; pom adds jansi native versions for different platforms, but we
+ ;; only need one, so use native instead
+ (substitute* "jansi/pom.xml"
+ (("windows32") "native")
+ (("windows64") "native")
+ (("osx") "native")
+ (("linux32") "native")
+ (("linux64") "native")
+ (("freebsd32") "native")
+ (("freebsd64") "native"))
+ #t))
+ (replace 'install
+ (install-from-pom "jansi/pom.xml")))))
+ (propagated-inputs
`(("java-jansi-native" ,java-jansi-native)))
(native-inputs
`(("java-junit" ,java-junit)
(build-system ant-build-system)
(arguments
`(#:jar-name "java-jboss-el-api_spec.jar"
- #:jdk ,icedtea-8))
+ #:modules ((guix build ant-build-system)
+ (guix build utils)
+ (guix build maven pom)
+ (guix build java-utils)
+ (sxml simple))
+ #:phases
+ (modify-phases %standard-phases
+ ;; the origin of javax.el:javax.el-api is unknown, so we use this package
+ ;; instead, which implements the same thing. We override the pom file
+ ;; to "rename" the package so it can be found by maven.
+ (add-before 'install 'override-pom
+ (lambda _
+ (delete-file "pom.xml")
+ (with-output-to-file "pom.xml"
+ (lambda _
+ (sxml->xml
+ `(project
+ (modelVersion "4.0.0")
+ (name "el-api")
+ (groupId "javax.el")
+ (artifactId "javax.el-api")
+ (version "3.0")))))
+ #t))
+ (replace 'install
+ (install-from-pom "pom.xml")))))
(inputs
`(("java-junit" ,java-junit)))
(home-page "https://github.com/jboss/jboss-el-api_spec")
`(#:jar-name "java-jboss-interceptors-api_spec.jar"
#:jdk ,icedtea-8
#:source-dir "."
- #:tests? #f)); no tests
+ #:tests? #f; no tests
+ #:modules ((guix build ant-build-system)
+ (guix build utils)
+ (guix build maven pom)
+ (guix build java-utils)
+ (sxml simple))
+ #:phases
+ (modify-phases %standard-phases
+ ;; the origin of javax.interceptor:javax.interceptor-api is unknown,
+ ;; so we use this package instead, which implements the same thing.
+ ;; We override the pom file to "rename" the package so it can be found
+ ;; by maven.
+ (add-before 'install 'override-pom
+ (lambda _
+ (delete-file "pom.xml")
+ (with-output-to-file "pom.xml"
+ (lambda _
+ (sxml->xml
+ `(project
+ (modelVersion "4.0.0")
+ (name "interceptor-api")
+ (groupId "javax.interceptor")
+ (artifactId "javax.interceptor-api")
+ (version "3.0")))))
+ #t))
+ (replace 'install
+ (install-from-pom "pom.xml")))))
(home-page "https://github.com/jboss/jboss-interceptors-api_spec")
(synopsis "Interceptors 1.2 API classes from JSR 318")
(description "Java-jboss-interceptors-api-spec implements the Interceptors
#:jar-name "java-cdi-api.jar"
#:test-dir "api/src/test"
#:jdk ,icedtea-8
- #:tests? #f)); Tests fail because we don't have a CDI provider yet
- (inputs
+ #:tests? #f; Tests fail because we don't have a CDI provider yet
+ #:phases
+ (modify-phases %standard-phases
+ (replace 'install
+ (install-from-pom "api/pom.xml")))))
+ (propagated-inputs
`(("java-javax-inject" ,java-javax-inject)
("java-jboss-el-api-spec" ,java-jboss-el-api-spec)
- ("java-jboss-interceptors-api-spec" ,java-jboss-interceptors-api-spec)))
+ ("java-jboss-interceptors-api-spec" ,java-jboss-interceptors-api-spec)
+ ("java-weld-parent-pom" ,java-weld-parent-pom)))
(native-inputs
`(("java-testng" ,java-testng)
("java-hamcrest-core" ,java-hamcrest-core)))
(build-system ant-build-system)
(arguments
`(#:build-target "package"
+ #:make-flags (list "-DDATE" "(no recorded date for reproducibility)")
#:tests? #f; tests are run as part of the build process
#:phases
(modify-phases %standard-phases
(inputs
`(("java-native-access" ,java-native-access)))
(synopsis "Cross-platform mappings for jna")
- (description "java-native-access-platfrom has cross-platform mappings
+ (description "java-native-access-platform has cross-platform mappings
and mappings for a number of commonly used platform functions, including a
large number of Win32 mappings as well as a set of utility classes that
simplify native access.")))
(define-public java-eclipse-sisu-inject
(package
(name "java-eclipse-sisu-inject")
- (version "0.3.3")
+ (version "0.3.4")
(source (origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/eclipse/sisu.inject/")
- (commit "releases/0.3.3")))
+ (commit (string-append "releases/" version))))
(file-name (git-file-name name version))
(sha256
(base32
- "0gibc9x0bw0f4ls086fx73610fcspz9g2as7kcpcfhvl5znysvg7"))))
+ "16044sizdb0rjbhlfbmcnpds5y7by7dyn9b0c11606aikqi8k3x6"))))
(build-system ant-build-system)
(arguments
`(#:jar-name "eclipse-sisu-inject.jar"
#:source-dir "org.eclipse.sisu.inject/src"
- #:jdk ,icedtea-8
- #:tests? #f)); no tests
- (inputs
+ #:tests? #f; no tests
+ #:phases
+ (modify-phases %standard-phases
+ (replace 'install
+ (install-from-pom "org.eclipse.sisu.inject/pom.xml")))))
+ (propagated-inputs
`(("java-guice" ,java-guice)
- ("java-guice-servlet" ,java-guice-servlet)
+ ("java-sisu-inject-parent-pom" ,java-sisu-inject-parent-pom)))
+ (inputs
+ `(("java-guice-servlet" ,java-guice-servlet)
("java-javax-inject" ,java-javax-inject)
("java-javaee-servletapi" ,java-javaee-servletapi)
("java-junit" ,java-junit)
OSGi Service Registry is a goal of this project.")
(license license:epl1.0)))
+(define java-sisu-inject-parent-pom
+ (package
+ (inherit java-eclipse-sisu-inject)
+ (name "java-sisu-inject-parent-pom")
+ (arguments
+ `(#:tests? #f
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'configure)
+ (delete 'build)
+ (replace 'install
+ (install-pom-file "pom.xml")))))
+ (propagated-inputs '())))
+
(define-public java-eclipse-sisu-plexus
(package
(name "java-eclipse-sisu-plexus")
(substitute* "java/org/eclipse/sisu/plexus/DefaultPlexusContainerTest.java"
(("resources/component-jar")
"org.eclipse.sisu.plexus.tests/resources/component-jar")))
- #t)))))
- (inputs
+ #t))
+ (replace 'install
+ (install-from-pom "org.eclipse.sisu.plexus/pom.xml")))))
+ (propagated-inputs
`(("java-plexus-classworlds" ,java-plexus-classworlds)
- ("java-plexus-util" ,java-plexus-utils)
+ ("java-plexus-utils" ,java-plexus-utils)
("java-plexus-component-annotations" ,java-plexus-component-annotations)
- ("java-osgi-framework" ,java-osgi-framework)
+ ("java-cdi-api" ,java-cdi-api)
("java-eclipse-sisu-inject" ,java-eclipse-sisu-inject)
- ("java-guice" ,java-guice)
- ("java-javax-inject" ,java-javax-inject)
+ ("java-sisu-plexus-parent-pom" ,java-sisu-plexus-parent-pom)))
+ (inputs
+ `(("java-osgi-framework" ,java-osgi-framework)
("java-slf4j-api" ,java-slf4j-api)
- ("java-junit" ,java-junit)))
- (native-inputs
- `(("java-guava" ,java-guava)
+ ("java-javax-inject" ,java-javax-inject)
+ ("java-guice" ,java-guice)
+ ("java-guava" ,java-guava)
("java-aopalliance" ,java-aopalliance)
- ("java-cglib" ,java-cglib)
- ("java-asm" ,java-asm)))
+ ("java-asm" ,java-asm)
+ ("java-cglib" ,java-cglib)))
+ (native-inputs
+ `(("java-junit" ,java-junit)))
(home-page "https://www.eclipse.org/sisu/")
(synopsis "Plexus support for the sisu container")
(description "Sisu is a modular JSR330-based container that supports
adds Plexus support to the Sisu-Inject container.")
(license license:epl1.0)))
+(define java-sisu-plexus-parent-pom
+ (package
+ (inherit java-eclipse-sisu-plexus)
+ (name "java-sisu-plexus-parent-pom")
+ (arguments
+ `(#:tests? #f
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'configure)
+ (delete 'build)
+ (replace 'install
+ (install-pom-file "pom.xml")))))
+ (propagated-inputs
+ `(("java-sonatype-oss-parent-pom-9" ,java-sonatype-oss-parent-pom-9)))))
+
(define-public java-commons-compiler
(package
(name "java-commons-compiler")
(define-public abcl
(package
(name "abcl")
- (version "1.6.0")
+ (version "1.8.0")
(source
(origin
(method url-fetch)
version "/abcl-src-" version ".tar.gz"))
(sha256
(base32
- "0hvbcsffr8n2xwdixc8wyw1bfl9fxn2gyy0c4nma7j9zbn0wwgw9"))
+ "0zr5mmqyj484vza089l8vc88d07g0m8ymxzglvar3ydwyvi1x1qx"))
(patches
(search-patches
"abcl-fix-build-xml.patch"))))
library and the API is similar.")
(license license:bsd-3)))
+(define-public java-args4j
+ (package
+ (name "java-args4j")
+ (version "2.33")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/kohsuke/args4j")
+ (commit (string-append "args4j-site-" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0w061fg65qrsm1a0lz0vyprsyidj31krjb459qi2lw0y78xza26s"))))
+ (build-system ant-build-system)
+ (arguments
+ `(#:jar-name "args4j.jar"
+ #:source-dir "args4j/src"
+ #:test-dir "args4j/test"
+ #:test-exclude
+ (list "**/ExampleTest.*"
+ "**/ExternalConfiguredTest.*" ; fails to find a file
+ ;; We still don't want to run abstract classes
+ "**/Abstract*.*")
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'check 'fix-test-dir
+ (lambda _
+ (substitute* "build.xml"
+ (("/java\">") "\">"))
+ #t))
+ (add-before 'build 'copy-resources
+ (lambda _
+ (let ((from-prefix "args4j/src/org/kohsuke/args4j/")
+ (to-prefix "build/classes/org/kohsuke/args4j/"))
+ (for-each (lambda (f)
+ (install-file
+ (string-append from-prefix f)
+ (string-append to-prefix (dirname f))))
+ (list "Messages.properties"
+ "Messages_de.properties"
+ "Messages_en.properties"
+ "Messages_ru.properties"
+ "spi/Messages.properties"
+ "spi/Messages_de.properties"
+ "spi/Messages_en.properties"
+ "spi/Messages_ru.properties")))
+ #t)))))
+ (native-inputs
+ `(("java-junit" ,java-junit)))
+ (home-page "https://args4j.kohsuke.org/")
+ (synopsis "Command line parser library")
+ (description "Args4j is a small Java class library that makes it easy to
+parse command line options/arguments in your CUI application.")
+ (license license:expat)))
+
(define-public java-metadata-extractor
(package
(name "java-metadata-extractor")
used in JVM-based languages. They serve as an additional documentation and
can be interpreted by IDEs and static analysis tools to improve code analysis.")
(license license:expat)))
+
+(define-public java-javaparser
+ (package
+ (name "java-javaparser")
+ (version "3.16.1")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/javaparser/javaparser")
+ (commit (string-append "javaparser-parent-" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1a4jk12ffa31fa0y8vda0739vpfj1206p0nha842b7bixbvwamv9"))
+ (modules '((guix build utils)))
+ (snippet
+ '(begin
+ (for-each delete-file
+ (find-files "." "\\.jar$"))
+ #t))))
+ (build-system ant-build-system)
+ (arguments
+ `(#:tests? #f; tests require jbehave and junit5
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'build 'fill-template
+ (lambda _
+ (with-directory-excursion "javaparser-core/src/main"
+ (copy-file "java-templates/com/github/javaparser/JavaParserBuild.java"
+ "java/com/github/javaparser/JavaParserBuild.java")
+ (substitute* "java/com/github/javaparser/JavaParserBuild.java"
+ (("\\$\\{project.version\\}") ,version)
+ (("\\$\\{project.name\\}") "javaparser")
+ (("\\$\\{project.build.finalName\\}") "javaparser")
+ (("\\$\\{maven.version\\}") "fake")
+ (("\\$\\{maven.build.version\\}") "fake")
+ (("\\$\\{build.timestamp\\}") "0")
+ (("\\$\\{java.vendor\\}") "Guix")
+ (("\\$\\{java.vendor.url\\}") "https://gnu.org/software/guix")
+ (("\\$\\{java.version\\}") "1.8")
+ (("\\$\\{os.arch\\}") "any")
+ (("\\$\\{os.name\\}") "GuixSD")
+ (("\\$\\{os.version\\}") "not available")))
+ #t))
+ (add-before 'build 'generate-javacc
+ (lambda _
+ (with-directory-excursion "javaparser-core/src/main/java"
+ (invoke "java" "javacc" "../javacc/java.jj"))
+ #t))
+ (add-before 'build 'copy-javacc-support
+ (lambda _
+ (with-directory-excursion "javaparser-core/src/main"
+ (copy-recursively "javacc-support" "java"))
+ #t))
+ (replace 'build
+ (lambda _
+ (define (build name)
+ (format #t "Building ~a~%" name)
+ (delete-file-recursively "build/classes")
+ (mkdir-p "build/classes")
+ (apply invoke "javac"
+ "-cp" (string-append (getenv "CLASSPATH") ":"
+ (string-join (find-files "build/jar" ".")
+ ":"))
+ "-d" "build/classes"
+ (find-files (string-append name "/src/main/java")
+ ".*.java"))
+ (invoke "jar" "-cf" (string-append "build/jar/" name ".jar")
+ "-C" "build/classes" "."))
+ (mkdir-p "build/classes")
+ (mkdir-p "build/test-classes")
+ (mkdir-p "build/jar")
+ (build "javaparser-core")
+ (build "javaparser-core-serialization")
+ (build "javaparser-core-generators")
+ (build "javaparser-core-metamodel-generator")
+ (build "javaparser-symbol-solver-core")
+ #t))
+ (replace 'install
+ (install-jars "build/jar")))))
+ (inputs
+ `(("java-guava" ,java-guava)
+ ("java-jboss-javassist" ,java-jboss-javassist)
+ ("java-jsonp-api" ,java-jsonp-api)))
+ (native-inputs
+ `(("javacc" ,javacc)))
+ (home-page "http://javaparser.org/")
+ (synopsis "Parser for Java")
+ (description
+ "This project contains a set of libraries implementing a Java 1.0 - Java
+11 Parser with advanced analysis functionalities.")
+ (license (list
+ ;; either lgpl or asl
+ license:lgpl3+
+ license:asl2.0))))