gnu: icecat: Update to 78.10.0-guix0-preview1 [security fixes].
[jackhill/guix/guix.git] / gnu / packages / java.scm
index ab28b25..207f136 100644 (file)
@@ -1,5 +1,5 @@
 ;;; 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.
 ;;;
@@ -37,6 +38,7 @@
   #: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)
@@ -66,6 +68,7 @@
   #: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)
@@ -289,7 +292,8 @@ language.")
               (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"))
@@ -305,13 +309,30 @@ language.")
                             (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
@@ -696,7 +717,8 @@ machine.")))
                 (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
@@ -762,7 +784,9 @@ machine.")))
                (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.
@@ -770,9 +794,10 @@ machine.")))
                   #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)
@@ -803,6 +828,8 @@ machine.")))
               (sha256
                (base32
                 "0bg9sb4f7qbq77c0zf9m17p47ga0kf0r9622g9p12ysg26jd1ksg"))
+              (patches (search-patches
+                        "icedtea-6-extend-hotspot-aarch64-support.patch"))
               (modules '((guix build utils)))
               (snippet
                '(begin
@@ -831,7 +858,8 @@ machine.")))
        `("--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="
@@ -864,11 +892,8 @@ machine.")))
                             (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"))
@@ -1094,9 +1119,7 @@ machine.")))
                  (changeset "jdk6-b41")))
            (sha256
             (base32
-             "07lc1z4k5dj9nrc1wvwmpvxr3xgxrdkdh53xb95skk5ij49yagfd"))
-           (patches
-            (search-patches "icedtea-6-hotspot-gcc-segfault-workaround.patch"))))
+             "07lc1z4k5dj9nrc1wvwmpvxr3xgxrdkdh53xb95skk5ij49yagfd"))))
        ("corba-src"
         ,(origin
            (method hg-fetch)
@@ -1207,6 +1230,8 @@ bootstrapping purposes.")
            "--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"
@@ -1635,7 +1660,7 @@ bootstrapping purposes.")
               (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)
@@ -1738,6 +1763,8 @@ IcedTea build harness.")
                  `( ;;"--disable-bootstrap"
                    "--enable-bootstrap"
                    "--enable-nss"
+                   ,(string-append "--with-parallel-jobs="
+                                   (number->string (parallel-job-count)))
                    "--disable-downloading"
                    "--disable-system-pcsc"
                    "--disable-system-sctp"
@@ -1829,16 +1856,8 @@ new Date();"))
           ,(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"))
@@ -1862,10 +1881,10 @@ new Date();"))
                 "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
@@ -1909,6 +1928,33 @@ new Date();"))
                                                  (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
@@ -1922,9 +1968,9 @@ new Date();"))
          (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")
@@ -1954,11 +2000,11 @@ new Date();"))
                                          (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)
@@ -2008,32 +2054,32 @@ new Date();"))
                         "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")
@@ -2055,17 +2101,14 @@ new Date();"))
                 "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
@@ -2093,6 +2136,33 @@ new Date();"))
              (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"
@@ -2143,9 +2213,9 @@ new Date();"))
          (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")
@@ -2165,8 +2235,8 @@ new Date();"))
                    (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"))))
@@ -2180,24 +2250,24 @@ new Date();"))
                           (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
@@ -2220,21 +2290,21 @@ new Date();"))
                                          (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")
@@ -2320,17 +2390,17 @@ new Date();"))
     (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)
@@ -2362,21 +2432,21 @@ new Date();"))
     (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)
@@ -2408,14 +2478,14 @@ new Date();"))
 (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
@@ -2443,7 +2513,7 @@ new Date();"))
                ;; "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")))))))))
@@ -2456,14 +2526,14 @@ new Date();"))
 ;; 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)
@@ -2623,10 +2693,101 @@ distribution.")))
      `(#: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
@@ -2648,6 +2809,33 @@ 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")
@@ -2696,6 +2884,35 @@ as tree building (via a tool called JJTree included with JavaCC), actions,
 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)
@@ -2903,9 +3120,11 @@ Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n"
                                  ,(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\\}")
@@ -3196,9 +3415,11 @@ libraries from the SIS division at ETH Zurich like jHDF5.")
                                  ,(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"))
@@ -3262,7 +3483,7 @@ libraries from the SIS division at ETH Zurich like jHDF5.")
          ("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)
@@ -3519,7 +3740,28 @@ documentation tools.")
     (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
@@ -3528,6 +3770,23 @@ class/interface/method definitions from source files complete with JavaDoc
 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")
@@ -3562,11 +3821,11 @@ documentation tools.")
                (("<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\"/>"
@@ -3728,6 +3987,13 @@ testing frameworks, mocking libraries and UI validation rules.")
       ((#: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"
@@ -3898,7 +4164,7 @@ more.")
 (define-public java-plexus-interpolation
   (package
     (name "java-plexus-interpolation")
-    (version "1.23")
+    (version "1.26")
     (source (origin
               (method git-fetch)
               (uri (git-reference
@@ -3907,11 +4173,16 @@ more.")
               (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)))
@@ -3929,7 +4200,7 @@ these two libraries to vary independently of one another.")
 (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
@@ -3938,12 +4209,17 @@ these two libraries to vary independently of one another.")
               (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/")
@@ -3971,22 +4247,31 @@ components.")
      `(#: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
@@ -3994,6 +4279,21 @@ components.")
 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")
@@ -4045,19 +4345,18 @@ reusing it in maven.")
 (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
@@ -4075,19 +4374,22 @@ reusing it in maven.")
              #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)
@@ -4116,9 +4418,15 @@ archives (jar).")
                             ;; 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
@@ -4133,7 +4441,9 @@ archives (jar).")
                    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)
@@ -4151,13 +4461,64 @@ archives (jar).")
     (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-component-metadata
+  (package
+    (inherit java-plexus-container-default)
+    (name "java-plexus-component-metadata")
+    (arguments
+     `(#:jar-name "plexus-component-metadata.jar"
+       #:source-dir "src/main/java"
+       #:test-dir "src/test"
+       #:jdk ,icedtea-8
+       #: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/")
+             #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")
@@ -4175,7 +4536,6 @@ from source tags and class annotations.")))
     (arguments
      `(#:jar-name "plexus-cipher.jar"
        #:source-dir "src/main/java"
-       #:jdk ,icedtea-8
        #:tests? #f; FIXME: requires sisu-inject-bean
        #:phases
        (modify-phases %standard-phases
@@ -4186,39 +4546,110 @@ from source tags and class annotations.")))
              (with-output-to-file "build/classes/META-INF/sisu/javax.inject.Named"
                (lambda _
                  (display "org.sonatype.plexus.components.cipher.DefaultPlexusCipher\n")))
-             #t)))))
+             #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-compiler-api
+(define-public java-plexus-java
   (package
-    (name "java-plexus-compiler-api")
-    (version "2.8.4")
+    (name "java-plexus-java")
+    (version "0.9.10")
     (source (origin
               (method git-fetch)
               (uri (git-reference
-                     (url "https://github.com/codehaus-plexus/plexus-compiler")
-                     (commit (string-append "plexus-compiler-" version))))
+                     (url "https://github.com/codehaus-plexus/plexus-languages")
+                     (commit (string-append "plexus-languages-" version))))
               (file-name (git-file-name name version))
               (sha256
                (base32
-                "1nq1gnn3s6z1j29gmi1hqbklsmm8b1lmnafb0191914f95mn18gk"))))
+                "0vmvgq5hfxs90yyxgssfpwq78l7vwx1ljwpkk594mrdr8sm668b5"))
+              (modules '((guix build utils)))
+              (snippet
+               `(begin
+                  (for-each delete-file (find-files "." ".*.jar$"))
+                  #t))))
     (build-system ant-build-system)
     (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
-     `(("java-plexus-container-default" ,java-plexus-container-default)
-       ("java-plexus-util" ,java-plexus-utils)))
-    (native-inputs
+     `(#: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")
+    (version "2.8.4")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                     (url "https://github.com/codehaus-plexus/plexus-compiler")
+                     (commit (string-append "plexus-compiler-" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "1nq1gnn3s6z1j29gmi1hqbklsmm8b1lmnafb0191914f95mn18gk"))))
+    (build-system ant-build-system)
+    (arguments
+     `(#:jar-name "plexus-compiler-api.jar"
+       #:source-dir "plexus-compiler-api/src/main/java"
+       #: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)))
     (home-page "https://github.com/codehaus-plexus/plexus-compiler")
     (synopsis "Plexus Compilers component's API to manipulate compilers")
@@ -4227,6 +4658,91 @@ compilers.")
     (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)
@@ -4236,17 +4752,105 @@ compilers.")
        #: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")
@@ -4265,7 +4869,6 @@ Compiler component.")))
     (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
@@ -4313,9 +4916,12 @@ Compiler component.")))
          (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:
@@ -4417,7 +5023,9 @@ which behaves as if all files were just created.</description>\n
     </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)))
@@ -4463,7 +5071,7 @@ project and determining what files need to be rebuilt.")
                               "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)))
@@ -4512,8 +5120,7 @@ XSD and documentation.")
                                "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.")))
 
@@ -4542,10 +5149,9 @@ XSD and documentation.")
                  "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.")))
@@ -4588,11 +5194,10 @@ every feature for every plugin.")))
              (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)
@@ -4643,10 +5248,19 @@ on the XPP3 API (XML Pull Parser).")))
              (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
@@ -4656,6 +5270,32 @@ transformations and analysis algorithms allow easily assembling custom
 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)
@@ -4665,6 +5305,72 @@ complex transformations and code analysis tools.")
        ((#: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")
@@ -5650,7 +6356,28 @@ bottlenecks move away from the database in an effectively cached system.")
     (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
@@ -5710,22 +6437,24 @@ It provides packages in the @code{javax.annotations} namespace.")
     ;; 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;
@@ -5744,9 +6473,12 @@ It provides packages in the @code{javax.annotations} namespace.")
                  (("@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
@@ -5756,6 +6488,21 @@ concurrency, I/O, hashing, primitives, reflection, string processing, and much
 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.
@@ -5944,7 +6691,7 @@ an Apache AB clone based on HttpCore.")))
 (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/"
@@ -5952,7 +6699,7 @@ an Apache AB clone based on HttpCore.")))
                                   version "-src.tar.gz"))
               (sha256
                (base32
-                "1428399s7qy3cim5wc6f3ks4gl9nf9vkjpfmnlap3jflif7g2pj1"))))
+                "1va99m2zc2liv0v9vn72p5ja8yz4s5wq7zpahaai5nr966kvxzkb"))))
     (build-system ant-build-system)
     (arguments
      `(#:jar-name "httpcomponents-httpclient.jar"
@@ -6079,12 +6826,14 @@ programs.")
                ;; 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
@@ -6938,7 +7687,11 @@ logging framework for Java.")))
     (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)))
@@ -7111,8 +7864,12 @@ more efficient storage-wise than an uncompressed bitmap (as implemented in the
                 (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/")
@@ -7124,6 +7881,21 @@ allowing the end user to plug in the desired logging framework at deployment
 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")
@@ -7145,11 +7917,14 @@ time.")
              ;; ... 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
@@ -7624,6 +8399,410 @@ import org.antlr.grammar.v2.ANTLRTreePrinter;"))
     (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
@@ -8669,8 +9848,11 @@ not included are ones that require dependency to the Databind 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
@@ -8917,12 +10099,14 @@ interface and high-performance Typed Access API.")
     (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"
@@ -8957,13 +10141,14 @@ interface and high-performance Typed Access API.")
     (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"
@@ -9016,18 +10201,24 @@ make data-binding work.")
     (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")
@@ -9128,7 +10319,28 @@ this is not a static analysis tool.)")
      `(#: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
@@ -9139,19 +10351,24 @@ software engineering people who are interested in Aspect-Oriented Programming
 (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
+     `(#:jar-name "java-javax-inject.jar"
+       #: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
@@ -9188,20 +10405,23 @@ the dependency is said to be unsatisfied, and the application is broken.")
     (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
@@ -9228,6 +10448,51 @@ Java 6 and above.")
        ("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")
@@ -9341,19 +10606,35 @@ annotations.")
               (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
@@ -9732,7 +11013,7 @@ algorithms and xxHash hashing algorithm.")
 (define-public java-bouncycastle
   (package
     (name "java-bouncycastle")
-    (version "1.60")
+    (version "1.67")
     (source (origin
               (method git-fetch)
               (uri (git-reference
@@ -9742,7 +11023,7 @@ algorithms and xxHash hashing algorithm.")
               (file-name (git-file-name name version))
               (sha256
                (base32
-                "1m921a1ac2dl797ffzg3d4j97ch308f25spb4jgsj3npfmmys5gb"))
+                "1449q7fyh03s1q0bqljcrhgacwcyqmg2bbvb3z084avgapwsainz"))
               (modules '((guix build utils)))
               (snippet
                '(begin
@@ -10105,7 +11386,7 @@ application components to create, send, receive, and read messages.")
      `(("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
@@ -10269,13 +11550,16 @@ outputting XML data from Java code.")
                ;; 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/")
@@ -10284,6 +11568,65 @@ outputting XML data from Java code.")
 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)
@@ -10322,7 +11665,7 @@ public Bundle getBundle()"))
        ("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)
@@ -10334,7 +11677,7 @@ public Bundle getBundle()"))
     (inputs
      `(("java-asm" ,java-asm)))
     (native-inputs '())))
+
 (define-public java-geronimo-xbean-finder
   (package
     (inherit java-geronimo-xbean-reflect)
@@ -10418,7 +11761,11 @@ including pre-existing objects that you do not have source-code of.")
                (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)
@@ -10477,8 +11824,16 @@ that is part of the SWT Tools project.")
            (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")
@@ -10507,8 +11862,25 @@ console output.")
        (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)
@@ -10534,7 +11906,31 @@ sequences to format your console output which works on every platform.")
     (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")
@@ -10563,7 +11959,33 @@ JavaServer Pages (JSP).")
      `(#: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
@@ -10590,11 +12012,16 @@ specific events.")
        #: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)))
@@ -11122,6 +12549,7 @@ inside a Zip archive.")
     (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
@@ -11235,7 +12663,7 @@ Java method invocation.")
     (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.")))
@@ -11465,25 +12893,30 @@ and reporting) project dependencies.  It is characterized by the following:
 (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)
@@ -11504,6 +12937,20 @@ Integration with other containers via the Eclipse Extension Registry and the
 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")
@@ -11565,22 +13012,27 @@ OSGi Service Registry is a goal of this project.")
                (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
@@ -11588,6 +13040,21 @@ classpath scanning, auto-binding, and dynamic auto-wiring.  This package
 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")
@@ -11823,7 +13290,7 @@ network protocols, and core version control algorithms.")
 (define-public abcl
   (package
     (name "abcl")
-    (version "1.6.0")
+    (version "1.8.0")
     (source
      (origin
        (method url-fetch)
@@ -11831,7 +13298,7 @@ network protocols, and core version control algorithms.")
                            version "/abcl-src-" version ".tar.gz"))
        (sha256
         (base32
-         "0hvbcsffr8n2xwdixc8wyw1bfl9fxn2gyy0c4nma7j9zbn0wwgw9"))
+         "0zr5mmqyj484vza089l8vc88d07g0m8ymxzglvar3ydwyvi1x1qx"))
        (patches
         (search-patches
          "abcl-fix-build-xml.patch"))))
@@ -11981,6 +13448,61 @@ into the file itself.  The XMP Toolkit for Java is based on the C++ XMPCore
 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")
@@ -12147,3 +13669,98 @@ in Java, usable from Groovy, Kotlin, Scala, etc.")
 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))))