2 ;;; GNU Guix --- Functional package management for GNU
3 ;;; Copyright © 2015, 2016, 2017, 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
4 ;;; Copyright © 2016 Leo Famulari <leo@famulari.name>
5 ;;; Copyright © 2016, 2017 Roel Janssen <roel@gnu.org>
6 ;;; Copyright © 2017, 2019 Carlo Zancanaro <carlo@zancanaro.id.au>
7 ;;; Copyright © 2017, 2018, 2019 Julien Lepiller <julien@lepiller.eu>
8 ;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be>
9 ;;; Copyright © 2016, 2017, 2018 Alex Vong <alexvong1995@gmail.com>
10 ;;; Copyright © 2017, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
11 ;;; Copyright © 2018, 2019 Gábor Boskovits <boskovits@gmail.com>
12 ;;; Copyright © 2018 Chris Marusich <cmmarusich@gmail.com>
13 ;;; Copyright © 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
14 ;;; Copyright © 2019 Björn Höfling <bjoern.hoefling@bjoernhoefling.de>
16 ;;; This file is part of GNU Guix.
18 ;;; GNU Guix is free software; you can redistribute it and/or modify it
19 ;;; under the terms of the GNU General Public License as published by
20 ;;; the Free Software Foundation; either version 3 of the License, or (at
21 ;;; your option) any later version.
23 ;;; GNU Guix is distributed in the hope that it will be useful, but
24 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
25 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26 ;;; GNU General Public License for more details.
28 ;;; You should have received a copy of the GNU General Public License
29 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
31 (define-module (gnu packages java)
32 #:use-module ((guix licenses) #:prefix license:)
33 #:use-module (guix packages)
34 #:use-module (guix download)
35 #:use-module (guix hg-download)
36 #:use-module (guix git-download)
37 #:use-module (guix svn-download)
38 #:use-module (guix utils)
39 #:use-module (guix build-system ant)
40 #:use-module (guix build-system gnu)
41 #:use-module (guix build-system trivial)
42 #:use-module (gnu packages)
43 #:use-module (gnu packages attr)
44 #:use-module (gnu packages autotools)
45 #:use-module (gnu packages base)
46 #:use-module (gnu packages bash)
47 #:use-module (gnu packages certs)
48 #:use-module (gnu packages cpio)
49 #:use-module (gnu packages cups)
50 #:use-module (gnu packages compression)
51 #:use-module (gnu packages elf)
52 #:use-module (gnu packages fontutils)
53 #:use-module (gnu packages gawk)
54 #:use-module (gnu packages gettext)
55 #:use-module (gnu packages gcc)
56 #:use-module (gnu packages gl)
57 #:use-module (gnu packages ghostscript) ;lcms
58 #:use-module (gnu packages gnome)
59 #:use-module (gnu packages groovy)
60 #:use-module (gnu packages gtk)
61 #:use-module (gnu packages guile)
62 #:use-module (gnu packages icu4c)
63 #:use-module (gnu packages image)
64 #:use-module (gnu packages java-compression)
65 #:use-module (gnu packages libffi)
66 #:use-module (gnu packages linux) ;alsa
67 #:use-module (gnu packages maths)
68 #:use-module (gnu packages nss)
69 #:use-module (gnu packages onc-rpc)
70 #:use-module (gnu packages web)
71 #:use-module (gnu packages wget)
72 #:use-module (gnu packages pkg-config)
73 #:use-module (gnu packages perl)
74 #:use-module (gnu packages popt)
75 #:use-module (gnu packages kerberos)
76 #:use-module (gnu packages xml)
77 #:use-module (gnu packages xorg)
78 #:use-module (gnu packages texinfo)
79 #:use-module ((srfi srfi-1) #:select (fold alist-delete))
80 #:use-module (srfi srfi-11)
81 #:use-module (ice-9 match))
85 ;;; Java bootstrap toolchain.
88 ;; The Java bootstrap begins with Jikes, a Java compiler written in C++. We
89 ;; use it to build a simple version of GNU Classpath, the Java standard
90 ;; library. We chose version 0.93 because it is the last version that can be
91 ;; built with Jikes. With Jikes and this version of GNU Classpath we can
92 ;; build JamVM, a Java Virtual Machine. We build version 1.5.1 because it is
93 ;; the last version of JamVM that works with a version of GNU classpath that
94 ;; does not require ECJ. These three packages make up the bootstrap JDK.
96 ;; This is sufficient to build an older version of Ant, which is needed to
97 ;; build an older version of ECJ, an incremental Java compiler, both of which
98 ;; are written in Java.
100 ;; ECJ is needed to build the latest release (0.99) and the development
101 ;; version of GNU Classpath. The development version of GNU Classpath has
102 ;; much more support for Java 1.6 than the latest release, but we need to
103 ;; build 0.99 first to get a working version of javah. ECJ, the development
104 ;; version of GNU Classpath, and the latest version of JamVM make up the
105 ;; second stage JDK with which we can build the OpenJDK with the Icedtea 1.x
106 ;; build framework. We then build the more recent JDKs Icedtea 2.x and
115 (uri (string-append "mirror://sourceforge/jikes/Jikes/"
116 version "/jikes-" version ".tar.bz2"))
119 "1qqldrp74pzpy5ly421srqn30qppmm9cvjiqdngk8hf47dv2rc0c"))))
120 (build-system gnu-build-system)
121 (home-page "http://jikes.sourceforge.net/")
122 (synopsis "Compiler for the Java language")
123 (description "Jikes is a compiler that translates Java source files as
124 defined in The Java Language Specification into the bytecoded instruction set
125 and binary format defined in The Java Virtual Machine Specification.")
126 (license license:ibmpl1.0)))
128 ;; This is the last version of GNU Classpath that can be built without ECJ.
129 (define classpath-bootstrap
135 (uri (string-append "mirror://gnu/classpath/classpath-"
139 "0i99wf9xd3hw1sj2sazychb9prx8nadxh2clgvk3zlmb28v0jbfz"))
140 (patches (search-patches "classpath-aarch64-support.patch"))))
141 (build-system gnu-build-system)
144 (list (string-append "JAVAC="
145 (assoc-ref %build-inputs "jikes")
150 "--disable-gconf-peer"
156 (modify-phases %standard-phases
157 ;; XXX: This introduces a memory leak as we remove a call to free up
158 ;; memory for the file name string. This was necessary because of a
159 ;; runtime error that would have prevented us from building
160 ;; ant-bootstrap later. See https://issues.guix.gnu.org/issue/36685
161 ;; for the gnarly details.
162 (add-after 'unpack 'remove-call-to-free
164 (substitute* "native/jni/java-io/java_io_VMFile.c"
165 (("result = cpio_isFileExists.*" m)
166 (string-append m "\n//")))
168 (add-after 'install 'install-data
169 (lambda _ (invoke "make" "install-data"))))))
174 ("pkg-config" ,pkg-config)))
175 (home-page "https://www.gnu.org/software/classpath/")
176 (synopsis "Essential libraries for Java")
177 (description "GNU Classpath is a project to create core class libraries
178 for use with runtimes, compilers and tools for the Java programming
180 ;; GPLv2 or later, with special linking exception.
181 (license license:gpl2+)))
183 ;; This is the last version of JamVM that works with a version of GNU
184 ;; classpath that does not require ECJ.
185 (define jamvm-1-bootstrap
191 (uri (string-append "mirror://sourceforge/jamvm/jamvm/"
192 "JamVM%20" version "/jamvm-"
194 (patches (search-patches "jamvm-arm.patch"))
197 "06lhi03l3b0h48pc7x58bk9my2nrcf1flpmglvys3wyad6yraf36"))
200 ;; Remove precompiled software.
201 (delete-file "lib/classes.zip")
203 (build-system gnu-build-system)
206 (list (string-append "--with-classpath-install-dir="
207 (assoc-ref %build-inputs "classpath"))
208 "--disable-int-caching"
209 "--enable-runtime-reloc-checks"
212 `(("classpath" ,classpath-bootstrap)
217 ;; When built with a recent GCC and glibc the configure step of icedtea-6
218 ;; fails with an invalid instruction error.
221 ("libc" ,glibc-2.28)))
222 (home-page "http://jamvm.sourceforge.net/")
223 (synopsis "Small Java Virtual Machine")
224 (description "JamVM is a Java Virtual Machine conforming to the JVM
225 specification edition 2 (blue book). It is extremely small. However, unlike
226 other small VMs it supports the full spec, including object finalisation and
228 (license license:gpl2+)))
230 (define ant-bootstrap
232 (name "ant-bootstrap")
233 ;; The 1.10.x series requires Java 8. 1.9.0 and later use generics, which
234 ;; are not supported. The 1.8.x series is the last to use only features
235 ;; supported by Jikes.
239 (uri (string-append "http://archive.apache.org/dist/"
240 "ant/source/apache-ant-"
241 version "-src.tar.bz2"))
244 "1cg0lga887qz5iizh6mlkxp01lciymrhmp7wzxpl6zpnldxmzrjx"))))
245 (build-system gnu-build-system)
247 `(#:imported-modules ((guix build syscalls)
248 ,@%gnu-build-system-modules)
249 #:modules ((srfi srfi-1)
250 (guix build gnu-build-system)
252 (guix build syscalls))
253 #:tests? #f ; no "check" target
255 (modify-phases %standard-phases
259 (lambda* (#:key inputs #:allow-other-keys)
260 (setenv "JAVA_HOME" (assoc-ref inputs "jamvm"))
262 (string-append (assoc-ref inputs "jamvm")
265 (string-append (assoc-ref inputs "jikes")
268 (string-append (assoc-ref inputs "jamvm")
271 ;; Ant complains if this file doesn't exist.
272 (setenv "HOME" "/tmp")
273 (with-output-to-file "/tmp/.ant.properties"
274 (lambda _ (display "")))
276 ;; Use jikes instead of javac for <javac ...> tags in build.xml
277 (setenv "ANT_OPTS" "-Dbuild.compiler=jikes")
279 ;; jikes produces lots of warnings, but they are not very
280 ;; interesting, so we silence them.
281 (setenv "$BOOTJAVAC_OPTS" "-nowarn")
283 ;; Without these JamVM options the build may freeze.
284 (substitute* "bootstrap.sh"
285 (("^\"\\$\\{JAVACMD\\}\" " m)
286 ,@(if (string-prefix? "armhf" (or (%current-system)
287 (%current-target-system)))
288 `((string-append m "-Xnocompact "))
289 `((string-append m "-Xnocompact -Xnoinlining ")))))
291 ;; Disable tests because we are bootstrapping and thus don't have
292 ;; any of the dependencies required to build and run the tests.
293 (substitute* "build.xml"
294 (("depends=\"jars,test-jar\"") "depends=\"jars\""))
295 (invoke "bash" "bootstrap.sh"
296 (string-append "-Ddist.dir="
297 (assoc-ref %outputs "out")))))
298 (add-after 'build 'strip-jar-timestamps ;based on ant-build-system
299 (lambda* (#:key outputs #:allow-other-keys)
300 (define (repack-archive jar)
301 (let* ((dir (mkdtemp! "jar-contents.XXXXXX"))
302 (manifest (string-append dir "/META-INF/MANIFESTS.MF")))
303 (with-directory-excursion dir
304 (invoke "unzip" jar))
306 ;; XXX: copied from (gnu build install)
307 (for-each (lambda (file)
308 (let ((s (lstat file)))
309 (unless (eq? (stat:type s) 'symlink)
310 (utime file 0 0 0 0))))
311 (find-files dir #:directories? #t))
312 ;; It is important that the manifest appears first.
313 (with-directory-excursion dir
314 (let* ((files (find-files "." ".*" #:directories? #t))
315 ;; To ensure that the reference scanner can
316 ;; detect all store references in the jars
317 ;; we disable compression with the "-0" option.
318 (command (if (file-exists? manifest)
319 `("zip" "-0" "-X" ,jar ,manifest
321 `("zip" "-0" "-X" ,jar ,@files))))
322 (apply invoke command)))))
323 (for-each repack-archive
325 (string-append (assoc-ref %outputs "out") "/lib")
331 ("jamvm" ,jamvm-1-bootstrap)
334 (home-page "http://ant.apache.org")
335 (synopsis "Build tool for Java")
337 "Ant is a platform-independent build tool for Java. It is similar to
338 make but is implemented using the Java language, requires the Java platform,
339 and is best suited to building Java projects. Ant uses XML to describe the
340 build process and its dependencies, whereas Make uses Makefile format.")
341 (license license:asl2.0)))
343 ;; Version 3.2.2 is the last version without a dependency on a full-fledged
344 ;; compiler for Java 1.5.
345 (define ecj-bootstrap
347 (name "ecj-bootstrap")
351 (uri (string-append "http://archive.eclipse.org/eclipse/"
352 "downloads/drops/R-" version
353 "-200702121330/ecjsrc.zip"))
356 "05hj82kxd23qaglsjkaqcj944riisjha7acf7h3ljhrjyljx8307"))))
357 ;; It would be so much easier if we could use the ant-build-system, but we
358 ;; cannot as we don't have ant at this point. We use ecj for
359 ;; bootstrapping the JDK.
360 (build-system gnu-build-system)
362 `(#:modules ((guix build gnu-build-system)
365 #:tests? #f ; there are no tests
367 (modify-phases %standard-phases
369 (lambda* (#:key inputs #:allow-other-keys)
372 (cons (string-append (assoc-ref inputs "jamvm")
374 (find-files (string-append
375 (assoc-ref inputs "ant-bootstrap")
381 (lambda* (#:key inputs #:allow-other-keys)
382 ;; The unpack phase enters the "org" directory by mistake.
385 ;; Create a simple manifest to make ecj executable.
386 (with-output-to-file "manifest"
388 (display "Manifest-Version: 1.0
389 Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n")))
392 (and (apply invoke "jikes"
393 (find-files "." "\\.java$"))
394 (invoke "fastjar" "cvfm"
395 "ecj-bootstrap.jar" "manifest" "."))))
397 (lambda* (#:key outputs #:allow-other-keys)
398 (let ((share (string-append (assoc-ref outputs "out")
401 (install-file "ecj-bootstrap.jar" share)
404 `(("ant-bootstrap" ,ant-bootstrap)
407 ("jamvm" ,jamvm-1-bootstrap)
408 ("fastjar" ,fastjar)))
409 (home-page "https://eclipse.org")
410 (synopsis "Eclipse Java development tools core batch compiler")
411 (description "This package provides the Eclipse Java core batch compiler
412 for bootstrapping purposes. The @dfn{Eclipse compiler for Java} (ecj) is a
413 requirement for all GNU Classpath releases after version 0.93.")
414 (license license:epl1.0)))
416 (define ecj-javac-wrapper
417 (package (inherit ecj-bootstrap)
418 (name "ecj-javac-wrapper")
420 (build-system trivial-build-system)
422 `(#:modules ((guix build utils))
425 (use-modules (guix build utils))
426 (let* ((bin (string-append (assoc-ref %outputs "out") "/bin"))
427 (target (string-append bin "/javac"))
428 (guile (string-append (assoc-ref %build-inputs "guile")
430 (ecj (string-append (assoc-ref %build-inputs "ecj-bootstrap")
431 "/share/java/ecj-bootstrap.jar"))
432 (java (string-append (assoc-ref %build-inputs "jamvm")
434 (bootcp (let ((jvmlib (string-append (assoc-ref %build-inputs "classpath")
435 "/share/classpath")))
436 (string-append jvmlib "/glibj.zip:"
437 jvmlib "/tools.zip"))))
439 (with-output-to-file target
441 (format #t "#!~a --no-auto-compile\n!#\n" guile)
443 `(begin (use-modules (ice-9 match)
449 '(("-bootclasspath" ,bootcp)
454 (let ((classpath (getenv "CLASSPATH")))
456 (string-join (list ,ecj
457 ,(string-append (assoc-ref %build-inputs "jamvm")
461 (receive (vm-args other-args)
462 ;; Separate VM arguments from arguments to ECJ.
463 (partition (cut string-prefix? "-J" <>)
464 (fold (lambda (default acc)
465 (if (member (first default) acc)
466 acc (append default acc)))
470 ;; Remove "-J" prefix
471 (map (cut string-drop <> 2) vm-args)
472 '("org.eclipse.jdt.internal.compiler.batch.Main")
473 (cons "-nowarn" other-args)))))
475 (let ((args (cdr (command-line))))
477 (format (current-error-port) "javac: no arguments given!\n")
482 `(("guile" ,guile-2.2)
483 ("ecj-bootstrap" ,ecj-bootstrap)
484 ("jamvm" ,jamvm-1-bootstrap)
485 ("classpath" ,classpath-bootstrap)))
486 (description "This package provides a wrapper around the @dfn{Eclipse
487 compiler for Java} (ecj) with a command line interface that is compatible with
488 the standard javac executable.")))
490 ;; The classpath-bootstrap was built without a virtual machine, so it does not
491 ;; provide a wrapper for javah. We cannot build the development version of
492 ;; Classpath without javah.
493 (define classpath-0.99
494 (package (inherit classpath-bootstrap)
498 (uri (string-append "mirror://gnu/classpath/classpath-"
502 "1j7cby4k66f1nvckm48xcmh352b1d1b33qk7l6hi7dp9i9zjjagr"))
503 (patches (search-patches "classpath-aarch64-support.patch"))))
506 (list (string-append "--with-ecj-jar="
507 (assoc-ref %build-inputs "ecj-bootstrap")
508 "/share/java/ecj-bootstrap.jar")
509 (string-append "JAVAC="
510 (assoc-ref %build-inputs "ecj-javac-wrapper")
512 (string-append "JAVA="
513 (assoc-ref %build-inputs "jamvm")
516 "ac_cv_prog_java_works=yes" ; trust me
520 "--disable-gconf-peer"
526 (modify-phases %standard-phases
527 (add-after 'install 'install-data
528 (lambda _ (invoke "make" "install-data"))))))
530 `(("ecj-bootstrap" ,ecj-bootstrap)
531 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
533 ("jamvm" ,jamvm-1-bootstrap)
534 ("classpath" ,classpath-bootstrap)
536 ("pkg-config" ,pkg-config)))))
538 ;; We need this because classpath-bootstrap does not provide all of the tools
539 ;; we need to build classpath-devel.
540 (define classpath-jamvm-wrappers
541 (package (inherit classpath-0.99)
542 (name "classpath-jamvm-wrappers")
544 (build-system trivial-build-system)
546 `(#:modules ((guix build utils))
549 (use-modules (guix build utils))
550 (let* ((bash (assoc-ref %build-inputs "bash"))
551 (jamvm (assoc-ref %build-inputs "jamvm"))
552 (classpath (assoc-ref %build-inputs "classpath"))
553 (bin (string-append (assoc-ref %outputs "out")
556 (for-each (lambda (tool)
557 (with-output-to-file (string-append bin tool)
559 ,@(if (string-prefix? "armhf" (or (%current-system)
560 (%current-target-system)))
561 `((format #t "#!~a/bin/sh
562 ~a/bin/jamvm -Xnocompact -classpath ~a/share/classpath/tools.zip \
563 gnu.classpath.tools.~a.~a $@"
564 bash jamvm classpath tool
565 (if (string=? "native2ascii" tool)
566 "Native2ASCII" "Main")))
567 `((format #t "#!~a/bin/sh
568 ~a/bin/jamvm -Xnocompact -Xnoinlining -classpath ~a/share/classpath/tools.zip \
569 gnu.classpath.tools.~a.~a $@"
570 bash jamvm classpath tool
571 (if (string=? "native2ascii" tool)
572 "Native2ASCII" "Main"))))))
573 (chmod (string-append bin tool) #o755))
583 ("jamvm" ,jamvm-1-bootstrap)
584 ("classpath" ,classpath-0.99)))
586 (synopsis "Executables from GNU Classpath")
587 (description "This package provides wrappers around the tools provided by
588 the GNU Classpath library. They are executed by the JamVM virtual
591 ;; The last release of GNU Classpath is 0.99 and it happened in 2012. Since
592 ;; then Classpath has gained much more support for Java 1.6.
593 (define-public classpath-devel
594 (let ((commit "e7c13ee0cf2005206fbec0eca677f8cf66d5a103")
596 (package (inherit classpath-bootstrap)
597 (version (string-append "0.99-" revision "." (string-take commit 9)))
601 (url "https://git.savannah.gnu.org/git/classpath.git")
603 (file-name (string-append "classpath-" version "-checkout"))
606 "1v2rww76ww322mpg3s12a1kkc6gkp31bm9gcxs532h0wq285fiw4"))))
609 ;; Ensure that the initial heap size is smaller than the maximum
610 ;; size. By default only Xmx is set, which can lead to invalid
611 ;; memory settings on some machines with a lot of memory.
612 '("JAVAC_MEM_OPT=-J-Xms512M -J-Xmx768M")
614 (list (string-append "--with-ecj-jar="
615 (assoc-ref %build-inputs "ecj-bootstrap")
616 "/share/java/ecj-bootstrap.jar")
617 (string-append "--with-javac="
618 (assoc-ref %build-inputs "ecj-javac-wrapper")
620 (string-append "JAVA="
621 (assoc-ref %build-inputs "jamvm")
624 "ac_cv_prog_java_works=yes" ; trust me
628 "--disable-gconf-peer"
634 (modify-phases %standard-phases
635 ;; XXX The bootstrap phase executes autogen.sh, which fails after
636 ;; complaining about the lack of gettext.
638 (lambda _ (invoke "autoreconf" "-vif")))
639 (add-after 'unpack 'remove-unsupported-annotations
641 (substitute* (find-files "java" "\\.java$")
644 (add-after 'install 'install-data
645 (lambda _ (invoke "make" "install-data"))))))
647 `(("autoconf" ,autoconf)
648 ("automake" ,automake)
650 ("gettext" ,gettext-minimal)
652 ("classpath-jamvm-wrappers" ,classpath-jamvm-wrappers) ; for javah
653 ("ecj-bootstrap" ,ecj-bootstrap)
654 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
656 ("jamvm" ,jamvm-1-bootstrap)
658 ("pkg-config" ,pkg-config))))))
661 (package (inherit jamvm-1-bootstrap)
665 (uri (string-append "mirror://sourceforge/jamvm/jamvm/"
666 "JamVM%20" version "/jamvm-"
670 "1nl0zxz8y5x8gwsrm7n32bry4dx8x70p8z3s9jbdvs8avyb8whkn"))
673 ;; Remove precompiled software.
674 (delete-file "src/classlib/gnuclasspath/lib/classes.zip")
676 (build-system gnu-build-system)
679 (list (string-append "--with-classpath-install-dir="
680 (assoc-ref %build-inputs "classpath")))))
682 `(("classpath" ,classpath-devel)
683 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
687 (define ecj-javac-wrapper-final
688 (package (inherit ecj-javac-wrapper)
690 `(("guile" ,guile-2.2)
691 ("ecj-bootstrap" ,ecj-bootstrap)
693 ("classpath" ,classpath-devel)))))
695 ;; The bootstrap JDK consisting of jamvm, classpath-devel,
696 ;; ecj-javac-wrapper-final cannot build Icedtea 2.x directly, because it's
697 ;; written in Java 7. It can, however, build the unmaintained Icedtea 1.x,
698 ;; which uses Java 6 only.
699 (define-public icedtea-6
706 "http://icedtea.wildebeest.org/download/source/icedtea6-"
710 "0bg9sb4f7qbq77c0zf9m17p47ga0kf0r9622g9p12ysg26jd1ksg"))
711 (modules '((guix build utils)))
714 (substitute* "Makefile.in"
715 ;; do not leak information about the build host
716 (("DISTRIBUTION_ID=\"\\$\\(DIST_ID\\)\"")
717 "DISTRIBUTION_ID=\"\\\"guix\\\"\""))
719 (build-system gnu-build-system)
720 (outputs '("out" ; Java Runtime Environment
721 "jdk" ; Java Development Kit
722 "doc")) ; all documentation
724 `(;; There are many failing tests and many are known to fail upstream.
727 ;; The DSOs use $ORIGIN to refer to each other, but (guix build
728 ;; gremlin) doesn't support it yet, so skip this phase.
729 #:validate-runpath? #f
731 #:modules ((guix build utils)
732 (guix build gnu-build-system)
736 `("--enable-bootstrap"
739 "--with-parallel-jobs"
740 "--disable-downloading"
742 ,(string-append "--with-ecj="
743 (assoc-ref %build-inputs "ecj")
744 "/share/java/ecj-bootstrap.jar")
745 ,(string-append "--with-jar="
746 (assoc-ref %build-inputs "fastjar")
748 ,(string-append "--with-jdk-home="
749 (assoc-ref %build-inputs "classpath"))
750 ,(string-append "--with-java="
751 (assoc-ref %build-inputs "jamvm")
754 (modify-phases %standard-phases
756 (lambda* (#:key source inputs #:allow-other-keys)
757 (invoke "tar" "xvf" source)
758 (chdir (string-append "icedtea6-" ,version))
760 (copy-recursively (assoc-ref inputs "openjdk-src") "openjdk")
761 ;; The convenient OpenJDK source bundle is no longer
762 ;; available for download, so we have to take the sources
763 ;; from the Mercurial repositories and change the Makefile
764 ;; to avoid tests for the OpenJDK zip archive.
765 (with-directory-excursion "openjdk"
766 (for-each (lambda (part)
770 (string-append part "-src"))
773 "langtools" "jaxp" "jaxws")))
774 (with-directory-excursion "openjdk"
775 (invoke "tar" "xvf" (assoc-ref inputs "hotspot-src"))
776 (rename-file "hg-checkout" "hotspot"))
777 (substitute* "patches/freetypeversion.patch"
778 (("REQUIRED_FREETYPE_VERSION = 2.2.1")
779 "REQUIRED_FREETYPE_VERSION = 2.10.1"))
780 (substitute* "Makefile.in"
781 (("echo \"ERROR: No up-to-date OpenJDK zip available\"; exit -1;")
782 "echo \"trust me\";")
783 ;; The contents of the bootstrap directory must be
784 ;; writeable but when copying from the store they are
786 (("mkdir -p lib/rt" line)
787 (string-append line "; chmod -R u+w $(BOOT_DIR)")))
788 (invoke "chmod" "-R" "u+w" "openjdk")))
789 (add-after 'unpack 'use-classpath
790 (lambda* (#:key inputs #:allow-other-keys)
791 (let ((jvmlib (assoc-ref inputs "classpath"))
792 (jamvm (assoc-ref inputs "jamvm")))
793 ;; Classpath does not provide rt.jar.
794 (substitute* "Makefile.in"
795 (("\\$\\(SYSTEM_JDK_DIR\\)/jre/lib/rt.jar")
796 (string-append jvmlib "/share/classpath/glibj.zip")))
797 ;; Make sure we can find all classes.
799 (string-append jvmlib "/share/classpath/glibj.zip:"
800 jvmlib "/share/classpath/tools.zip:"
801 jamvm "/lib/rt.jar"))
803 (string-append "-cp "
804 jvmlib "/share/classpath/glibj.zip:"
805 jvmlib "/share/classpath/tools.zip")))
807 (add-after 'unpack 'patch-patches
809 ;; shebang in patches so that they apply cleanly
810 (substitute* '("patches/jtreg-jrunscript.patch"
811 "patches/hotspot/hs23/drop_unlicensed_test.patch")
812 (("#!/bin/sh") (string-append "#!" (which "sh"))))
814 (add-after 'unpack 'patch-paths
815 (lambda* (#:key inputs #:allow-other-keys)
816 ;; buildtree.make generates shell scripts, so we need to replace
817 ;; the generated shebang
818 (substitute* '("openjdk/hotspot/make/linux/makefiles/buildtree.make")
819 (("/bin/sh") (which "bash")))
821 (let ((corebin (string-append
822 (assoc-ref inputs "coreutils") "/bin/"))
823 (binbin (string-append
824 (assoc-ref inputs "binutils") "/bin/"))
825 (grepbin (string-append
826 (assoc-ref inputs "grep") "/bin/")))
827 (substitute* '("openjdk/jdk/make/common/shared/Defs-linux.gmk"
828 "openjdk/corba/make/common/shared/Defs-linux.gmk")
829 (("UNIXCOMMAND_PATH = /bin/")
830 (string-append "UNIXCOMMAND_PATH = " corebin))
831 (("USRBIN_PATH = /usr/bin/")
832 (string-append "USRBIN_PATH = " corebin))
833 (("DEVTOOLS_PATH *= */usr/bin/")
834 (string-append "DEVTOOLS_PATH = " corebin))
835 (("COMPILER_PATH *= */usr/bin/")
836 (string-append "COMPILER_PATH = "
837 (assoc-ref inputs "gcc") "/bin/"))
838 (("DEF_OBJCOPY *=.*objcopy")
839 (string-append "DEF_OBJCOPY = " (which "objcopy"))))
841 ;; fix path to alsa header
842 (substitute* "openjdk/jdk/make/common/shared/Sanity.gmk"
843 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
844 (string-append "ALSA_INCLUDE="
845 (assoc-ref inputs "alsa-lib")
846 "/include/alsa/version.h")))
848 ;; fix hard-coded utility paths
849 (substitute* '("openjdk/jdk/make/common/shared/Defs-utils.gmk"
850 "openjdk/corba/make/common/shared/Defs-utils.gmk")
852 (string-append "ECHO = " (which "echo")))
854 (string-append "GREP = " (which "grep")))
856 (string-append "EGREP = " (which "egrep")))
858 (string-append "CPIO = " (which "cpio")))
859 (("READELF *=.*readelf")
860 (string-append "READELF = " (which "readelf")))
862 (string-append "AR = " (which "ar")))
864 (string-append "TAR = " (which "tar")))
866 (string-append "AS = " (which "as")))
868 (string-append "LD = " (which "ld")))
870 (string-append "STRIP = " (which "strip")))
872 (string-append "NM = " (which "nm")))
874 (string-append "SH = " (which "bash")))
876 (string-append "FIND = " (which "find")))
878 (string-append "LDD = " (which "ldd")))
879 (("NAWK *=.*(n|g)awk")
880 (string-append "NAWK = " (which "gawk")))
882 (string-append "XARGS = " (which "xargs")))
884 (string-append "UNZIP = " (which "unzip")))
886 (string-append "ZIPEXE = " (which "zip")))
888 (string-append "SED = " (which "sed"))))
890 ;; Some of these timestamps cause problems as they are more than
891 ;; 10 years ago, failing the build process.
893 "openjdk/jdk/src/share/classes/java/util/CurrencyData.properties"
894 (("AZ=AZM;2005-12-31-20-00-00;AZN") "AZ=AZN")
895 (("MZ=MZM;2006-06-30-22-00-00;MZN") "MZ=MZN")
896 (("RO=ROL;2005-06-30-21-00-00;RON") "RO=RON")
897 (("TR=TRL;2004-12-31-22-00-00;TRY") "TR=TRY"))
899 (add-before 'configure 'set-additional-paths
900 (lambda* (#:key inputs #:allow-other-keys)
902 (string-append (assoc-ref inputs "libxrender")
903 "/include/X11/extensions" ":"
904 (assoc-ref inputs "libxtst")
905 "/include/X11/extensions" ":"
906 (assoc-ref inputs "libxinerama")
907 "/include/X11/extensions" ":"
908 (or (getenv "CPATH") "")))
909 (setenv "ALT_CUPS_HEADERS_PATH"
910 (string-append (assoc-ref inputs "cups")
912 (setenv "ALT_FREETYPE_HEADERS_PATH"
913 (string-append (assoc-ref inputs "freetype")
915 (setenv "ALT_FREETYPE_LIB_PATH"
916 (string-append (assoc-ref inputs "freetype")
919 (add-before 'build 'disable-os-version-check
920 ;; allow build on linux major version change
922 (setenv "DISABLE_HOTSPOT_OS_VERSION_CHECK" "ok")
925 (lambda* (#:key outputs #:allow-other-keys)
926 (let ((doc (string-append (assoc-ref outputs "doc")
927 "/share/doc/icedtea"))
928 (jre (assoc-ref outputs "out"))
929 (jdk (assoc-ref outputs "jdk")))
930 (copy-recursively "openjdk.build/docs" doc)
931 (copy-recursively "openjdk.build/j2re-image" jre)
932 (copy-recursively "openjdk.build/j2sdk-image" jdk))
935 `(("ant" ,ant-bootstrap)
936 ("alsa-lib" ,alsa-lib)
938 ("classpath" ,classpath-devel)
939 ("coreutils" ,coreutils)
942 ("ecj" ,ecj-bootstrap)
943 ("ecj-javac" ,ecj-javac-wrapper-final)
945 ("fontconfig" ,fontconfig)
946 ("freetype" ,freetype)
958 ("libxcomposite" ,libxcomposite)
960 ("libxinerama" ,libxinerama)
961 ("libxrender" ,libxrender)
962 ("libxslt" ,libxslt) ;for xsltproc
965 ("mit-krb5" ,mit-krb5)
967 ("nss-certs" ,nss-certs)
969 ("pkg-config" ,pkg-config)
970 ("procps" ,procps) ;for "free", even though I'm not sure we should use it
980 (url "http://hg.openjdk.java.net/jdk6/jdk6/")
981 (changeset "jdk6-b41")))
984 "14q47yfg586fs64w30g8mk92m5dkxsvr36zzh0ra99xk5x0x96mv"))))
989 (url "http://hg.openjdk.java.net/jdk6/jdk6/jdk/")
990 (changeset "jdk6-b41")))
993 "165824nhg1k1dx6zs9dny0j49rmk35jw5b13dmz8c77jfajml4v9"))))
998 (url "http://hg.openjdk.java.net/jdk6/jdk6/hotspot/")
999 (changeset "jdk6-b41")))
1002 "07lc1z4k5dj9nrc1wvwmpvxr3xgxrdkdh53xb95skk5ij49yagfd"))
1004 (search-patches "icedtea-6-hotspot-gcc-segfault-workaround.patch"))))
1009 (url "http://hg.openjdk.java.net/jdk6/jdk6/corba/")
1010 (changeset "jdk6-b41")))
1013 "1p9g1r9dnax2iwp7yb59qx7m4nmshqhwmrb2b8jj8zgbd9dl2i3q"))))
1018 (url "http://hg.openjdk.java.net/jdk6/jdk6/langtools/")
1019 (changeset "jdk6-b41")))
1022 "1x52wd67fynbbd9ild6fb4wvba3f5hhwk03qdjfazd0a1qr37z3d"))))
1027 (url "http://hg.openjdk.java.net/jdk6/jdk6/jaxp/")
1028 (changeset "jdk6-b41")))
1031 "0shlqrvzpr4nrkmv215lbxnby63s3yvbdh1yxcayznsyqwa4nlxm"))))
1036 (url "http://hg.openjdk.java.net/jdk6/jdk6/jaxws/")
1037 (changeset "jdk6-b41")))
1040 "0835lkw8vib1xhp8lxnybhlvzdh699hbi4mclxanydjk63zbpxk0"))))))
1041 (home-page "http://icedtea.classpath.org")
1042 (synopsis "Java development kit")
1044 "This package provides the OpenJDK built with the IcedTea build harness.
1045 This version of the OpenJDK is no longer maintained and is only used for
1046 bootstrapping purposes.")
1047 ;; IcedTea is released under the GPL2 + Classpath exception, which is the
1048 ;; same license as both GNU Classpath and OpenJDK.
1049 (license license:gpl2+)))
1051 (define-public icedtea-7
1052 (let* ((version "2.6.13")
1053 (drop (lambda (name hash)
1057 "http://icedtea.classpath.org/download/drops"
1058 "/icedtea7/" version "/" name ".tar.bz2"))
1059 (sha256 (base32 hash))))))
1066 "http://icedtea.wildebeest.org/download/source/icedtea-"
1070 "1w331rdqx1dcx2xb0fmjmrkdc71xqn20fxsgw8by4xhiblh88khh"))
1071 (modules '((guix build utils)))
1074 (substitute* "Makefile.in"
1075 ;; do not leak information about the build host
1076 (("DISTRIBUTION_ID=\"\\$\\(DIST_ID\\)\"")
1077 "DISTRIBUTION_ID=\"\\\"guix\\\"\""))
1079 (build-system gnu-build-system)
1080 (outputs '("out" ; Java Runtime Environment
1081 "jdk" ; Java Development Kit
1082 "doc")) ; all documentation
1084 `(;; There are many test failures. Some are known to
1085 ;; fail upstream, others relate to not having an X
1086 ;; server running at test time, yet others are a
1087 ;; complete mystery to me.
1089 ;; hotspot: passed: 241; failed: 45; error: 2
1090 ;; langtools: passed: 1,934; failed: 26
1094 ;; The DSOs use $ORIGIN to refer to each other, but (guix build
1095 ;; gremlin) doesn't support it yet, so skip this phase.
1096 #:validate-runpath? #f
1098 ;; Apparently, the C locale is needed for some of the tests.
1101 #:modules ((guix build utils)
1102 (guix build gnu-build-system)
1109 ;; TODO: package pcsc and sctp, and add to inputs
1110 `("--disable-system-pcsc"
1111 "--disable-system-sctp"
1112 "--enable-bootstrap"
1115 "--disable-downloading"
1116 "--disable-tests" ;they are run in the check phase instead
1117 "--with-openjdk-src-dir=./openjdk.src"
1118 ,(string-append "--with-jdk-home="
1119 (assoc-ref %build-inputs "jdk")))
1122 (modify-phases %standard-phases
1124 (lambda* (#:key source inputs #:allow-other-keys)
1125 (let ((target (string-append "icedtea-" ,version))
1126 (unpack (lambda* (name #:optional dir)
1128 (string-drop-right name 5))))
1131 (assoc-ref inputs name)
1133 "--strip-components=1")))))
1135 (invoke "tar" "xvf" source
1136 "-C" target "--strip-components=1")
1138 (unpack "openjdk-src" "openjdk.src")
1139 (with-directory-excursion "openjdk.src"
1141 (filter (cut string-suffix? "-drop" <>)
1146 (add-after 'unpack 'patch-bitrot
1148 (substitute* '("patches/boot/revert-6973616.patch"
1149 "openjdk.src/jdk/make/common/shared/Defs-versions.gmk")
1150 (("REQUIRED_FREETYPE_VERSION = 2.2.1")
1151 "REQUIRED_FREETYPE_VERSION = 2.10.1"))
1152 ;; As of attr 2.4.48 this header is no longer
1153 ;; included. It is provided by the libc instead.
1154 (substitute* '("configure"
1155 "openjdk.src/jdk/src/solaris/native/sun/nio/fs/LinuxNativeDispatcher.c")
1156 (("attr/xattr.h") "sys/xattr.h"))
1158 (add-after 'unpack 'fix-x11-extension-include-path
1159 (lambda* (#:key inputs #:allow-other-keys)
1160 (substitute* "openjdk.src/jdk/make/sun/awt/mawt.gmk"
1161 (((string-append "\\$\\(firstword \\$\\(wildcard "
1162 "\\$\\(OPENWIN_HOME\\)"
1163 "/include/X11/extensions\\).*$"))
1164 (string-append (assoc-ref inputs "libxrender")
1165 "/include/X11/extensions"
1166 " -I" (assoc-ref inputs "libxtst")
1167 "/include/X11/extensions"
1168 " -I" (assoc-ref inputs "libxinerama")
1169 "/include/X11/extensions"))
1170 (("\\$\\(wildcard /usr/include/X11/extensions\\)\\)") ""))
1172 (add-after 'unpack 'patch-paths
1174 ;; buildtree.make generates shell scripts, so we need to replace
1175 ;; the generated shebang
1176 (substitute* '("openjdk.src/hotspot/make/linux/makefiles/buildtree.make")
1177 (("/bin/sh") (which "bash")))
1179 (let ((corebin (string-append
1180 (assoc-ref %build-inputs "coreutils") "/bin/"))
1181 (binbin (string-append
1182 (assoc-ref %build-inputs "binutils") "/bin/"))
1183 (grepbin (string-append
1184 (assoc-ref %build-inputs "grep") "/bin/")))
1185 (substitute* '("openjdk.src/jdk/make/common/shared/Defs-linux.gmk"
1186 "openjdk.src/corba/make/common/shared/Defs-linux.gmk")
1187 (("UNIXCOMMAND_PATH = /bin/")
1188 (string-append "UNIXCOMMAND_PATH = " corebin))
1189 (("USRBIN_PATH = /usr/bin/")
1190 (string-append "USRBIN_PATH = " corebin))
1191 (("DEVTOOLS_PATH *= */usr/bin/")
1192 (string-append "DEVTOOLS_PATH = " corebin))
1193 (("COMPILER_PATH *= */usr/bin/")
1194 (string-append "COMPILER_PATH = "
1195 (assoc-ref %build-inputs "gcc") "/bin/"))
1196 (("DEF_OBJCOPY *=.*objcopy")
1197 (string-append "DEF_OBJCOPY = " (which "objcopy"))))
1199 ;; fix path to alsa header
1200 (substitute* "openjdk.src/jdk/make/common/shared/Sanity.gmk"
1201 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
1202 (string-append "ALSA_INCLUDE="
1203 (assoc-ref %build-inputs "alsa-lib")
1204 "/include/alsa/version.h")))
1206 ;; fix hard-coded utility paths
1207 (substitute* '("openjdk.src/jdk/make/common/shared/Defs-utils.gmk"
1208 "openjdk.src/corba/make/common/shared/Defs-utils.gmk")
1210 (string-append "ECHO = " (which "echo")))
1212 (string-append "GREP = " (which "grep")))
1213 (("EGREP *=.*egrep")
1214 (string-append "EGREP = " (which "egrep")))
1216 (string-append "CPIO = " (which "cpio")))
1217 (("READELF *=.*readelf")
1218 (string-append "READELF = " (which "readelf")))
1220 (string-append "AR = " (which "ar")))
1222 (string-append "TAR = " (which "tar")))
1224 (string-append "AS = " (which "as")))
1226 (string-append "LD = " (which "ld")))
1227 (("STRIP *=.*strip")
1228 (string-append "STRIP = " (which "strip")))
1230 (string-append "NM = " (which "nm")))
1232 (string-append "SH = " (which "bash")))
1234 (string-append "FIND = " (which "find")))
1236 (string-append "LDD = " (which "ldd")))
1237 (("NAWK *=.*(n|g)awk")
1238 (string-append "NAWK = " (which "gawk")))
1239 (("XARGS *=.*xargs")
1240 (string-append "XARGS = " (which "xargs")))
1241 (("UNZIP *=.*unzip")
1242 (string-append "UNZIP = " (which "unzip")))
1244 (string-append "ZIPEXE = " (which "zip")))
1246 (string-append "SED = " (which "sed"))))
1248 ;; Some of these timestamps cause problems as they are more than
1249 ;; 10 years ago, failing the build process.
1251 "openjdk.src/jdk/src/share/classes/java/util/CurrencyData.properties"
1252 (("AZ=AZM;2005-12-31-20-00-00;AZN") "AZ=AZN")
1253 (("MZ=MZM;2006-06-30-22-00-00;MZN") "MZ=MZN")
1254 (("RO=ROL;2005-06-30-21-00-00;RON") "RO=RON")
1255 (("TR=TRL;2004-12-31-22-00-00;TRY") "TR=TRY")))
1257 (add-before 'configure 'set-additional-paths
1258 (lambda* (#:key inputs #:allow-other-keys)
1259 (substitute* "openjdk.src/jdk/make/common/shared/Sanity.gmk"
1260 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
1261 (string-append "ALSA_INCLUDE="
1262 (assoc-ref inputs "alsa-lib")
1263 "/include/alsa/version.h")))
1266 (string-append (assoc-ref inputs "libxcomposite")
1267 "/include/X11/extensions" ":"
1268 (assoc-ref inputs "libxrender")
1269 "/include/X11/extensions" ":"
1270 (assoc-ref inputs "libxtst")
1271 "/include/X11/extensions" ":"
1272 (assoc-ref inputs "libxinerama")
1273 "/include/X11/extensions" ":"
1274 (or (getenv "CPATH") "")))
1275 (setenv "ALT_OBJCOPY" (which "objcopy"))
1276 (setenv "ALT_CUPS_HEADERS_PATH"
1277 (string-append (assoc-ref inputs "cups")
1279 (setenv "ALT_FREETYPE_HEADERS_PATH"
1280 (string-append (assoc-ref inputs "freetype")
1282 (setenv "ALT_FREETYPE_LIB_PATH"
1283 (string-append (assoc-ref inputs "freetype")
1286 (add-before 'build 'disable-os-version-check
1287 ;; allow build on linux major version change
1289 (setenv "DISABLE_HOTSPOT_OS_VERSION_CHECK" "ok")
1291 (add-before 'check 'fix-test-framework
1293 ;; Fix PATH in test environment
1294 (substitute* "test/jtreg/com/sun/javatest/regtest/Main.java"
1295 (("PATH=/bin:/usr/bin")
1296 (string-append "PATH=" (getenv "PATH"))))
1297 (substitute* "test/jtreg/com/sun/javatest/util/SysEnv.java"
1298 (("/usr/bin/env") (which "env")))
1299 (substitute* "openjdk.src/hotspot/test/test_env.sh"
1300 (("/bin/rm") (which "rm"))
1301 (("/bin/cp") (which "cp"))
1302 (("/bin/mv") (which "mv")))
1304 (add-before 'check 'fix-hotspot-tests
1306 (with-directory-excursion "openjdk.src/hotspot/test/"
1307 (substitute* "jprt.config"
1308 (("PATH=\"\\$\\{path4sdk\\}\"")
1309 (string-append "PATH=" (getenv "PATH")))
1310 (("make=/usr/bin/make")
1311 (string-append "make=" (which "make"))))
1312 (substitute* '("runtime/6626217/Test6626217.sh"
1313 "runtime/7110720/Test7110720.sh")
1314 (("/bin/rm") (which "rm"))
1315 (("/bin/cp") (which "cp"))
1316 (("/bin/mv") (which "mv"))))
1318 (add-before 'check 'fix-jdk-tests
1320 (with-directory-excursion "openjdk.src/jdk/test/"
1321 (substitute* "com/sun/jdi/JdbReadTwiceTest.sh"
1322 (("/bin/pwd") (which "pwd")))
1323 (substitute* "com/sun/jdi/ShellScaffold.sh"
1324 (("/bin/kill") (which "kill")))
1325 (substitute* "start-Xvfb.sh"
1326 ;;(("/usr/bin/X11/Xvfb") (which "Xvfb"))
1327 (("/usr/bin/nohup") (which "nohup")))
1328 (substitute* "javax/security/auth/Subject/doAs/Test.sh"
1329 (("/bin/rm") (which "rm")))
1330 (substitute* "tools/launcher/MultipleJRE.sh"
1331 (("echo \"#!/bin/sh\"")
1332 (string-append "echo \"#!" (which "rm") "\""))
1333 (("/usr/bin/zip") (which "zip")))
1334 (substitute* "com/sun/jdi/OnThrowTest.java"
1335 (("#!/bin/sh") (string-append "#!" (which "sh"))))
1336 (substitute* "java/lang/management/OperatingSystemMXBean/GetSystemLoadAverage.java"
1337 (("/usr/bin/uptime") (which "uptime")))
1338 (substitute* "java/lang/ProcessBuilder/Basic.java"
1339 (("/usr/bin/env") (which "env"))
1340 (("/bin/false") (which "false"))
1341 (("/bin/true") (which "true"))
1342 (("/bin/cp") (which "cp"))
1343 (("/bin/sh") (which "sh")))
1344 (substitute* "java/lang/ProcessBuilder/FeelingLucky.java"
1345 (("/bin/sh") (which "sh")))
1346 (substitute* "java/lang/ProcessBuilder/Zombies.java"
1347 (("/usr/bin/perl") (which "perl"))
1348 (("/bin/ps") (which "ps"))
1349 (("/bin/true") (which "true")))
1350 (substitute* "java/lang/Runtime/exec/ConcurrentRead.java"
1351 (("/usr/bin/tee") (which "tee")))
1352 (substitute* "java/lang/Runtime/exec/ExecWithDir.java"
1353 (("/bin/true") (which "true")))
1354 (substitute* "java/lang/Runtime/exec/ExecWithInput.java"
1355 (("/bin/cat") (which "cat")))
1356 (substitute* "java/lang/Runtime/exec/ExitValue.java"
1357 (("/bin/sh") (which "sh"))
1358 (("/bin/true") (which "true"))
1359 (("/bin/kill") (which "kill")))
1360 (substitute* "java/lang/Runtime/exec/LotsOfDestroys.java"
1361 (("/usr/bin/echo") (which "echo")))
1362 (substitute* "java/lang/Runtime/exec/LotsOfOutput.java"
1363 (("/usr/bin/cat") (which "cat")))
1364 (substitute* "java/lang/Runtime/exec/SleepyCat.java"
1365 (("/bin/cat") (which "cat"))
1366 (("/bin/sleep") (which "sleep"))
1367 (("/bin/sh") (which "sh")))
1368 (substitute* "java/lang/Runtime/exec/StreamsSurviveDestroy.java"
1369 (("/bin/cat") (which "cat")))
1370 (substitute* "java/rmi/activation/CommandEnvironment/SetChildEnv.java"
1371 (("/bin/chmod") (which "chmod")))
1372 (substitute* "java/util/zip/ZipFile/Assortment.java"
1373 (("/bin/sh") (which "sh"))))
1377 ;; The "make check-*" targets always return zero, so we need to
1378 ;; check for errors in the associated log files to determine
1379 ;; whether any tests have failed.
1380 (use-modules (ice-9 rdelim))
1381 (let* ((error-pattern (make-regexp "^(Error|FAILED):.*"))
1382 (checker (lambda (port)
1384 (let ((line (read-line port)))
1386 ((eof-object? line) #t)
1387 ((regexp-exec error-pattern line)
1388 (error "test failed"))
1390 (run-test (lambda (test)
1391 (invoke "make" test)
1392 (call-with-input-file
1393 (string-append "test/" test ".log")
1395 (when #f ; skip tests
1396 (run-test "check-hotspot")
1397 (run-test "check-langtools")
1398 (run-test "check-jdk"))
1401 (lambda* (#:key outputs #:allow-other-keys)
1402 (let ((doc (string-append (assoc-ref outputs "doc")
1403 "/share/doc/icedtea"))
1404 (jre (assoc-ref outputs "out"))
1405 (jdk (assoc-ref outputs "jdk")))
1406 (copy-recursively "openjdk.build/docs" doc)
1407 (copy-recursively "openjdk.build/j2re-image" jre)
1408 (copy-recursively "openjdk.build/j2sdk-image" jdk))
1410 ;; Some of the libraries in the lib/amd64 folder link to libjvm.so.
1411 ;; But that shared object is located in the server/ folder, so it
1412 ;; cannot be found. This phase creates a symbolic link in the
1413 ;; lib/amd64 folder so that the other libraries can find it.
1416 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
1418 ;; FIXME: Find the bug in the build system, so that this symlink is
1420 (add-after 'install 'install-libjvm
1421 (lambda* (#:key inputs outputs #:allow-other-keys)
1422 (let* ((lib-path (string-append (assoc-ref outputs "out")
1423 ;; See 'INSTALL_ARCH_DIR' in
1425 ,(match (%current-system)
1434 ;; We need a catch-all, dropping
1435 ;; '-linux' works in most cases.
1440 (%current-system) 6)))))))
1441 (symlink (string-append lib-path "/server/libjvm.so")
1442 (string-append lib-path "/libjvm.so")))
1444 ;; By default IcedTea only generates an empty keystore. In order to
1445 ;; be able to use certificates in Java programs we need to generate a
1446 ;; keystore from a set of certificates. For convenience we use the
1447 ;; certificates from the nss-certs package.
1448 (add-after 'install 'install-keystore
1449 (lambda* (#:key inputs outputs #:allow-other-keys)
1450 (let* ((keystore "cacerts")
1451 (certs-dir (string-append (assoc-ref inputs "nss-certs")
1453 (keytool (string-append (assoc-ref outputs "jdk")
1455 (define (extract-cert file target)
1456 (call-with-input-file file
1458 (call-with-output-file target
1460 (let loop ((line (read-line in 'concat))
1463 ((eof-object? line) #t)
1464 ((string-prefix? "-----BEGIN" line)
1466 (loop (read-line in 'concat) #t))
1467 ((string-prefix? "-----END" line)
1471 (when copying? (display line out))
1472 (loop (read-line in 'concat) copying?)))))))))
1473 (define (import-cert cert)
1474 (format #t "Importing certificate ~a\n" (basename cert))
1475 (let ((temp "tmpcert"))
1476 (extract-cert cert temp)
1477 (let ((port (open-pipe* OPEN_WRITE keytool
1479 "-alias" (basename cert)
1480 "-keystore" keystore
1481 "-storepass" "changeit"
1483 (display "yes\n" port)
1484 (when (not (zero? (status:exit-val (close-pipe port))))
1485 (format #t "failed to import ~a\n" cert)))
1486 (delete-file temp)))
1488 ;; This is necessary because the certificate directory contains
1489 ;; files with non-ASCII characters in their names.
1490 (setlocale LC_ALL "en_US.utf8")
1491 (setenv "LC_ALL" "en_US.utf8")
1493 (for-each import-cert (find-files certs-dir "\\.pem$"))
1494 (mkdir-p (string-append (assoc-ref outputs "out")
1496 (mkdir-p (string-append (assoc-ref outputs "jdk")
1497 "/jre/lib/security"))
1499 ;; The cacerts files we are going to overwrite are chmod'ed as
1500 ;; read-only (444) in icedtea-8 (which derives from this
1501 ;; package). We have to change this so we can overwrite them.
1502 (chmod (string-append (assoc-ref outputs "out")
1503 "/lib/security/" keystore) #o644)
1504 (chmod (string-append (assoc-ref outputs "jdk")
1505 "/jre/lib/security/" keystore) #o644)
1507 (install-file keystore
1508 (string-append (assoc-ref outputs "out")
1510 (install-file keystore
1511 (string-append (assoc-ref outputs "jdk")
1512 "/jre/lib/security"))
1517 "0l34ikyf62hbzlf9032alzkkqvf7bpmckz4gvirvph755w7gka8l"))
1520 "050gv2jbg1pi6qkn8w18bwpbklfa5b0kymjvan9pncddbj8m84fz"))
1523 "1k6yldwnxfzdg5926r1nlfv8d1r1j7rlp2nkz6gqh05vgyamnfhl"))
1526 "110j7jlz47x2gg6f7653x12mssan5kvj9l9h1m1c8c92drfxbqyk"))
1529 "0d1mca38ksxvdskp9im3pp7fdijhj1n3lwq9w13r9s4v3qyskgdd"))
1532 "0nq5236fzxn3p6x8cgncl56mzcmsj07q9gymysnws4c8byc6n0qj"))
1537 "http://icedtea.classpath.org/downloads/drops"
1538 "/icedtea7/" version "/hotspot.tar.bz2"))
1541 "17bdv39n4lh8l5737c96f3xgamx4y305m067p01cywgp7zaddqws"))
1542 (patches (search-patches
1543 "icedtea-7-hotspot-gcc-segfault-workaround.patch"))))
1544 ("ant" ,ant-bootstrap)
1546 ("coreutils" ,coreutils)
1547 ("diffutils" ,diffutils) ;for tests
1550 ("libtool" ,libtool)
1551 ("pkg-config" ,pkg-config)
1557 ("fastjar" ,fastjar)
1558 ("libxslt" ,libxslt) ;for xsltproc
1559 ("nss-certs" ,nss-certs)
1561 ("procps" ,procps) ;for "free", even though I'm not sure we should use it
1562 ("jdk" ,icedtea-6 "jdk")))
1564 `(("alsa-lib" ,alsa-lib)
1567 ("libxcomposite" ,libxcomposite)
1569 ("libxtst" ,libxtst)
1571 ("libxinerama" ,libxinerama)
1572 ("libxrender" ,libxrender)
1573 ("libjpeg" ,libjpeg)
1575 ("mit-krb5" ,mit-krb5)
1578 ("fontconfig" ,fontconfig)
1579 ("freetype" ,freetype)
1583 (home-page "http://icedtea.classpath.org")
1584 (synopsis "Java development kit")
1586 "This package provides the Java development kit OpenJDK built with the
1587 IcedTea build harness.")
1589 ;; 'configure' lists "mips" and "mipsel", but not "mips64el'.
1590 (supported-systems (delete "mips64el-linux" %supported-systems))
1592 ;; IcedTea is released under the GPL2 + Classpath exception, which is the
1593 ;; same license as both GNU Classpath and OpenJDK.
1594 (license license:gpl2+))))
1596 (define-public icedtea-8
1597 (let* ((version "3.7.0")
1598 (drop (lambda (name hash)
1602 "http://icedtea.classpath.org/download/drops"
1603 "/icedtea8/" version "/" name ".tar.xz"))
1604 (sha256 (base32 hash))))))
1605 (package (inherit icedtea-7)
1610 "http://icedtea.wildebeest.org/download/source/icedtea-"
1614 "09yqzn8rpccs7cyv89hhy5zlznpgqw5x3jz0w1ccp0cz1vgs8l5w"))
1615 (modules '((guix build utils)))
1618 (substitute* '("configure"
1620 ;; Do not embed build time
1621 (("(DIST_ID=\"Custom build).*$" _ prefix)
1622 (string-append prefix "\"\n"))
1623 ;; Do not leak information about the build host
1624 (("DIST_NAME=\"\\$build_os\"")
1625 "DIST_NAME=\"guix\""))
1628 `(#:imported-modules
1629 ((guix build ant-build-system)
1630 (guix build syscalls)
1631 ,@%gnu-build-system-modules)
1632 ,@(substitute-keyword-arguments (package-arguments icedtea-7)
1633 ((#:modules modules)
1634 `((guix build utils)
1635 (guix build gnu-build-system)
1636 ((guix build ant-build-system) #:prefix ant:)
1641 ((#:configure-flags flags)
1642 `(let ((jdk (assoc-ref %build-inputs "jdk")))
1643 `( ;;"--disable-bootstrap"
1644 "--enable-bootstrap"
1646 "--disable-downloading"
1647 "--disable-system-pcsc"
1648 "--disable-system-sctp"
1649 "--disable-tests" ;they are run in the check phase instead
1650 "--with-openjdk-src-dir=./openjdk.src"
1651 ,(string-append "--with-jdk-home=" jdk))))
1653 `(modify-phases ,phases
1654 (delete 'fix-x11-extension-include-path)
1655 (delete 'patch-paths)
1656 (delete 'set-additional-paths)
1657 (delete 'patch-patches)
1658 (delete 'patch-bitrot)
1659 ;; Prevent the keytool from recording the current time when
1660 ;; adding certificates at build time.
1661 (add-after 'unpack 'patch-keystore
1663 (substitute* "openjdk.src/jdk/src/share/classes/sun/security/provider/JavaKeyStore.java"
1664 (("date = new Date\\(\\);")
1666 date = (System.getenv(\"SOURCE_DATE_EPOCH\") != null) ?\
1667 new Date(Long.parseLong(System.getenv(\"SOURCE_DATE_EPOCH\"))) :\
1670 (add-after 'unpack 'patch-jni-libs
1671 ;; Hardcode dynamically loaded libraries.
1673 (let* ((library-path (search-path-as-string->list
1674 (getenv "LIBRARY_PATH")))
1675 (find-library (lambda (name)
1678 (string-append "lib" name ".so")))))
1681 (catch 'decoding-error
1684 (("VERSIONED_JNI_LIB_NAME\\(\"(.*)\", \"(.*)\"\\)"
1686 (format #f "\"~a\"" (find-library name)))
1687 (("JNI_LIB_NAME\\(\"(.*)\"\\)" _ name)
1688 (format #f "\"~a\"" (find-library name)))))
1690 ;; Those are safe to skip.
1691 (format (current-error-port)
1692 "warning: failed to substitute: ~a~%"
1694 (find-files "openjdk.src/jdk/src/solaris/native"
1698 (lambda* (#:key outputs #:allow-other-keys)
1699 (let ((doc (string-append (assoc-ref outputs "doc")
1700 "/share/doc/icedtea"))
1701 (jre (assoc-ref outputs "out"))
1702 (jdk (assoc-ref outputs "jdk")))
1703 (copy-recursively "openjdk.build/docs" doc)
1704 (copy-recursively "openjdk.build/images/j2re-image" jre)
1705 (copy-recursively "openjdk.build/images/j2sdk-image" jdk)
1706 ;; Install the nss.cfg file to JRE to enable SSL/TLS
1708 (copy-file (string-append jdk "/jre/lib/security/nss.cfg")
1709 (string-append jre "/lib/security/nss.cfg"))
1711 (add-after 'install 'strip-jar-timestamps
1712 (assoc-ref ant:%standard-phases 'strip-jar-timestamps)))))))
1714 `(("jdk" ,icedtea-7 "jdk")
1717 "1mj6xgmw31i6qd30qi9dmv7160fbcfq5ikz1jwjihdg2793il19p"))
1720 "1wb8k5zm40zld0986dvmlh5xh3gyixbg9h26sl662zy92amhmyyg"))
1723 "11ma4zz0599cy70xd219v7a8vin7p96xrhhz3wsaw6cjhkzpagah"))
1726 "14m1y0z0fbm5z5zjw3vnq85py8dma84bi3f9cw8rhdyc6skk8q4i"))
1729 "09andnm6xaasnp963hgx42yiflifiljp9z7z85jrfyc5z8a5whmf"))
1732 "0s6lcpc0zckz2fnq98aqf28nz9y3wbi41a3kyaqqa2abwbkm1zwl"))
1735 "15wizy123vhk40chl1b4p552jf2pw2hdww0myf11qab425axz4nw"))
1740 "http://icedtea.classpath.org/download/drops"
1741 "/icedtea8/" version "/hotspot.tar.xz"))
1744 "1ciz1w9j0kz7s1dxdhyqq71nla9icyz6qvn0b9z2zgkklqa98qmm"))
1745 (patches (search-patches
1746 "icedtea-7-hotspot-gcc-segfault-workaround.patch"))))
1749 "19pzl3ppaw8j6r5cnyp8qiw3hxijh3hdc46l39g5yfhdl4pr4hpa"))
1752 "0k33anxdzw1icn072wynfmmdjhsv50hay0j1sfkfxny12rb3vgdy"))
1753 ,@(fold alist-delete (package-native-inputs icedtea-7)
1754 '("jdk" "openjdk-src" "corba-drop" "jaxp-drop" "jaxws-drop"
1755 "jdk-drop" "langtools-drop" "hotspot-drop")))))))
1757 (define-public openjdk9
1763 (uri "https://hg.openjdk.java.net/jdk/jdk/archive/3cc80be736f2.tar.bz2")
1764 (file-name (string-append name "-" version ".tar.bz2"))
1767 "01ihmyf7k5z17wbr7xig7y40l9f01d5zjgkcmawn1102hw5kchpq"))
1768 (modules '((guix build utils)))
1771 (for-each delete-file (find-files "." ".*.bin$"))
1772 (for-each delete-file (find-files "." ".*.exe$"))
1773 (for-each delete-file (find-files "." ".*.jar$"))
1775 (build-system gnu-build-system)
1776 (outputs '("out" "jdk" "doc"))
1778 `(#:tests? #f; require jtreg
1780 ((guix build syscalls)
1781 ,@%gnu-build-system-modules)
1783 (modify-phases %standard-phases
1784 (add-after 'patch-source-shebangs 'fix-java-shebangs
1786 ;; This file was "fixed" by patch-source-shebangs, but it requires
1787 ;; this exact first line.
1788 (substitute* "jdk/make/data/blacklistedcertsconverter/blacklisted.certs.pem"
1789 (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))
1792 (lambda* (#:key inputs outputs #:allow-other-keys)
1793 ;; TODO: unbundle libpng and lcms
1794 (invoke "bash" "./configure"
1795 (string-append "--with-freetype=" (assoc-ref inputs "freetype"))
1796 "--disable-freetype-bundling"
1797 "--disable-warnings-as-errors"
1798 "--disable-hotspot-gtest"
1799 "--with-giflib=system"
1800 "--with-libjpeg=system"
1801 (string-append "--prefix=" (assoc-ref outputs "out")))
1805 (with-output-to-file ".src-rev"
1807 (display ,version)))
1808 (setenv "GUIX_LD_WRAPPER_ALLOW_IMPURITIES" "yes")
1809 (invoke "make" "all")
1811 ;; Some of the libraries in the lib/ folder link to libjvm.so.
1812 ;; But that shared object is located in the server/ folder, so it
1813 ;; cannot be found. This phase creates a symbolic link in the
1814 ;; lib/ folder so that the other libraries can find it.
1817 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
1819 ;; FIXME: Find the bug in the build system, so that this symlink is
1821 (add-after 'install 'install-libjvm
1822 (lambda* (#:key inputs outputs #:allow-other-keys)
1823 (let* ((lib-out (string-append (assoc-ref outputs "out")
1825 (lib-jdk (string-append (assoc-ref outputs "jdk")
1827 (symlink (string-append lib-jdk "/server/libjvm.so")
1828 (string-append lib-jdk "/libjvm.so"))
1829 (symlink (string-append lib-out "/server/libjvm.so")
1830 (string-append lib-out "/libjvm.so")))
1833 (lambda* (#:key outputs #:allow-other-keys)
1834 (let ((out (assoc-ref outputs "out"))
1835 (jdk (assoc-ref outputs "jdk"))
1836 (doc (assoc-ref outputs "doc"))
1837 (images (car (find-files "build" ".*-server-release"
1838 #:directories? #t))))
1839 (copy-recursively (string-append images "/images/jdk") jdk)
1840 (copy-recursively (string-append images "/images/jre") out)
1841 (copy-recursively (string-append images "/images/docs") doc))
1843 (add-after 'install 'strip-zip-timestamps
1844 (lambda* (#:key outputs #:allow-other-keys)
1845 (use-modules (guix build syscalls))
1846 (for-each (lambda (zip)
1847 (let ((dir (mkdtemp! "zip-contents.XXXXXX")))
1848 (with-directory-excursion dir
1849 (invoke "unzip" zip))
1851 (for-each (lambda (file)
1852 (let ((s (lstat file)))
1853 (unless (eq? (stat:type s) 'symlink)
1854 (format #t "reset ~a~%" file)
1855 (utime file 0 0 0 0))))
1856 (find-files dir #:directories? #t))
1857 (with-directory-excursion dir
1858 (let ((files (find-files "." ".*" #:directories? #t)))
1859 (apply invoke "zip" "-0" "-X" zip files)))))
1860 (find-files (assoc-ref outputs "doc") ".*.zip$"))
1863 `(("alsa-lib" ,alsa-lib)
1865 ("fontconfig" ,fontconfig)
1866 ("freetype" ,freetype)
1870 ("libjpeg" ,libjpeg)
1874 ("libxcomposite" ,libxcomposite)
1876 ("libxinerama" ,libxinerama)
1877 ("libxrender" ,libxrender)
1879 ("libxtst" ,libxtst)))
1881 `(("icedtea-8" ,icedtea-8)
1882 ("icedtea-8:jdk" ,icedtea-8 "jdk")
1886 (home-page "https://openjdk.java.net/projects/jdk9/")
1887 (synopsis "Java development kit")
1889 "This package provides the Java development kit OpenJDK.")
1890 (license license:gpl2+)))
1892 (define-public openjdk10
1899 (uri "http://hg.openjdk.java.net/jdk/jdk/archive/6fa770f9f8ab.tar.bz2")
1900 (file-name (string-append name "-" version ".tar.bz2"))
1903 "0zywq2203b4hx4jms9vbwvjcj1d3k2v3qpx4s33729fkpmid97r4"))
1904 (patches (search-patches
1905 "openjdk-10-idlj-reproducibility.patch"))
1906 (modules '((guix build utils)))
1909 (for-each delete-file (find-files "." ".*.bin$"))
1910 (for-each delete-file (find-files "." ".*.exe$"))
1911 (for-each delete-file (find-files "." ".*.jar$"))
1914 (substitute-keyword-arguments (package-arguments openjdk9)
1916 `(modify-phases ,phases
1917 (replace 'fix-java-shebangs
1919 ;; This file was "fixed" by patch-source-shebangs, but it requires
1920 ;; this exact first line.
1921 (substitute* "make/data/blacklistedcertsconverter/blacklisted.certs.pem"
1922 (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))
1925 (lambda* (#:key inputs outputs #:allow-other-keys)
1926 (invoke "bash" "./configure"
1927 (string-append "--with-freetype=" (assoc-ref inputs "freetype"))
1928 "--disable-freetype-bundling"
1929 "--disable-warnings-as-errors"
1930 "--disable-hotspot-gtest"
1931 "--with-giflib=system"
1932 "--with-libjpeg=system"
1933 "--with-native-debug-symbols=zipped"
1934 (string-append "--prefix=" (assoc-ref outputs "out")))
1937 `(("openjdk9" ,openjdk9)
1938 ("openjdk9:jdk" ,openjdk9 "jdk")
1943 (define-public openjdk11
1949 (uri "http://hg.openjdk.java.net/jdk/jdk/archive/76072a077ee1.tar.bz2")
1950 (file-name (string-append name "-" version ".tar.bz2"))
1953 "0v705w1s9lrqalzahir78pk397rkk9gfvzq821yv8h3xha0bqi6w"))
1954 (modules '((guix build utils)))
1957 (for-each delete-file (find-files "." ".*.bin$"))
1958 (for-each delete-file (find-files "." ".*.exe$"))
1959 (for-each delete-file (find-files "." ".*.jar$"))
1961 (build-system gnu-build-system)
1962 (outputs '("out" "jdk" "doc"))
1964 `(#:imported-modules
1965 ((guix build syscalls)
1966 (ice-9 binary-ports)
1968 ,@%gnu-build-system-modules)
1969 #:tests? #f; requires jtreg
1970 ;; TODO package jtreg
1971 ;; disable parallel builds, as the openjdk build system does not like -j
1972 #:parallel-build? #f
1973 #:parallel-tests? #f
1974 ;; reenable parallel builds and tests by adding the flags manually
1975 #:make-flags (list (string-append "JOBS=" (number->string (parallel-job-count))))
1977 `("--disable-option-checking" ; --enable-fast-install default flag errors otherwise
1978 "--disable-warnings-as-errors"
1979 ;; make validate-runpath pass, see: http://issues.guix.info/issue/32894
1980 "--with-native-debug-symbols=zipped"
1981 ;; do not use the bundled libraries
1982 "--with-giflib=system"
1983 "--with-lcms=system"
1984 "--with-libjpeg=system"
1985 "--with-libpng=system"
1986 "--with-version-pre="
1987 ;; allow the build system to locate the system freetype
1988 ,(string-append "--with-freetype-include="
1989 (assoc-ref %build-inputs "freetype") "/include")
1990 ,(string-append "--with-freetype-lib="
1991 (assoc-ref %build-inputs "freetype") "/lib"))
1994 (modify-phases %standard-phases
1995 (add-after 'patch-source-shebangs 'fix-java-shebangs
1997 ;; This file was "fixed" by patch-source-shebangs, but it requires
1998 ;; this exact first line.
1999 (substitute* "make/data/blacklistedcertsconverter/blacklisted.certs.pem"
2000 (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))
2004 (with-output-to-file ".src-rev"
2006 (display ,version)))
2007 (setenv "GUIX_LD_WRAPPER_ALLOW_IMPURITIES" "yes")
2008 (invoke "make" "all")
2010 ;; jdk 11 does not build jre by default any more
2011 ;; building it anyways
2012 ;; for further information see:
2013 ;; https://github.com/AdoptOpenJDK/openjdk-build/issues/356
2014 (add-after 'build 'build-jre
2016 (invoke "make" "legacy-jre-image")
2019 (lambda* (#:key outputs #:allow-other-keys)
2020 (let ((out (assoc-ref outputs "out"))
2021 (jdk (assoc-ref outputs "jdk"))
2022 (doc (assoc-ref outputs "doc"))
2023 (images (car (find-files "build" ".*-server-release"
2024 #:directories? #t))))
2025 (copy-recursively (string-append images "/images/jdk") jdk)
2026 (copy-recursively (string-append images "/images/jre") out)
2027 (copy-recursively (string-append images "/images/docs") doc))
2029 ;; Some of the libraries in the lib/ folder link to libjvm.so.
2030 ;; But that shared object is located in the server/ folder, so it
2031 ;; cannot be found. This phase creates a symbolic link in the
2032 ;; lib/ folder so that the other libraries can find it.
2035 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
2037 ;; FIXME: Find the bug in the build system, so that this symlink is
2039 (add-after 'install 'install-libjvm
2040 (lambda* (#:key inputs outputs #:allow-other-keys)
2041 (let* ((lib-out (string-append (assoc-ref outputs "out")
2043 (lib-jdk (string-append (assoc-ref outputs "jdk")
2045 (symlink (string-append lib-jdk "/server/libjvm.so")
2046 (string-append lib-jdk "/libjvm.so"))
2047 (symlink (string-append lib-out "/server/libjvm.so")
2048 (string-append lib-out "/libjvm.so")))
2050 (add-after 'install 'strip-character-data-timestamps
2051 (lambda* (#:key outputs #:allow-other-keys)
2052 (use-modules (guix build syscalls))
2053 (let ((archive (string-append
2054 (assoc-ref outputs "jdk") "/lib/src.zip"))
2055 (dir (mkdtemp! "zip-contents.XXXXXX")))
2056 (with-directory-excursion dir
2057 (invoke "unzip" archive))
2058 (delete-file archive)
2059 (with-directory-excursion dir
2060 (let ((char-data-files (find-files "." "CharacterData.*")))
2061 (for-each (lambda (file)
2063 (((string-append "This file was generated "
2064 "AUTOMATICALLY from a template "
2066 (string-append "This file was generated "
2067 "AUTOMATICALLY from a template "
2070 (with-directory-excursion dir
2071 (let ((files (find-files "." ".*" #:directories? #t)))
2072 (apply invoke "zip" "-0" "-X" archive files))))))
2073 (add-after 'strip-character-data-timestamps 'strip-archive-timestamps
2074 (lambda* (#:key outputs #:allow-other-keys)
2075 (use-modules (guix build syscalls)
2076 (ice-9 binary-ports)
2078 (letrec ((repack-archive
2080 (let ((dir (mkdtemp! "zip-contents.XXXXXX")))
2081 (with-directory-excursion dir
2082 (invoke "unzip" archive))
2083 (delete-file archive)
2084 (for-each (compose repack-archive canonicalize-path)
2085 (find-files dir "(ct.sym|.*.jar)$"))
2086 (let ((reset-file-timestamp
2088 (let ((s (lstat file)))
2089 (unless (eq? (stat:type s) 'symlink)
2090 (format #t "reset ~a~%" file)
2091 (utime file 0 0 0 0))))))
2092 (for-each reset-file-timestamp
2093 (find-files dir #:directories? #t)))
2094 (with-directory-excursion dir
2095 (let ((files (find-files "." ".*" #:directories? #t)))
2096 (apply invoke "zip" "-0" "-X" archive files)))))))
2097 (for-each repack-archive
2098 (find-files (assoc-ref outputs "doc") ".*.zip$"))
2099 (for-each repack-archive
2100 (find-files (assoc-ref outputs "jdk")
2101 ".*.(zip|jar|diz)$"))
2102 (repack-archive (string-append (assoc-ref outputs "jdk") "/lib/ct.sym"))
2105 (call-with-input-file file-name
2107 (let ((header #vu8(#x4a #x4d #x01 #x00)))
2108 (if (equal? (get-bytevector-n
2109 file (bytevector-length header))
2111 (let* ((header-length (bytevector-length header))
2112 (temp-file (mkstemp!
2114 "temp-file.XXXXXX")))
2115 (temp-filename (port-filename temp-file))
2117 (- (stat:size (stat file))
2119 (sendfile temp-file file content-length header-length)
2120 (delete-file file-name)
2121 (close-port temp-file)
2122 (repack-archive (canonicalize-path temp-filename))
2123 (call-with-output-file file-name
2125 (put-bytevector file header)
2126 (call-with-input-file temp-filename
2130 (stat:size (stat temp-file)) 0)))))))))))))
2131 (for-each repack-jmod
2132 (find-files (assoc-ref outputs "jdk") ".*.jmod$")))
2134 (add-after 'install 'remove-timestamp-from-api-summary
2135 (lambda* (#:key outputs #:allow-other-keys)
2136 (substitute* (string-append (assoc-ref outputs "doc")
2137 "/api/overview-summary.html")
2138 (("Generated by javadoc \\(11-internal\\).*$")
2139 "Generated by javadoc (11-internal) -->\n"))
2142 `(("alsa-lib" ,alsa-lib)
2144 ("fontconfig" ,fontconfig)
2145 ("freetype" ,freetype)
2148 ("libjpeg" ,libjpeg)
2151 ("libxext" ,libxext)
2152 ("libxrender" ,libxrender)
2154 ("libxtst" ,libxtst)))
2156 `(("autoconf" ,autoconf)
2157 ("openjdk10" ,openjdk10)
2158 ("openjdk10:jdk" ,openjdk10 "jdk")
2159 ("pkg-config" ,pkg-config)
2163 (home-page "https://openjdk.java.net/projects/jdk/11/")
2164 (synopsis "Java development kit")
2166 "This package provides the Java development kit OpenJDK.")
2167 (license license:gpl2+)))
2169 (define-public openjdk12
2176 (uri "http://hg.openjdk.java.net/jdk/jdk/archive/0276cba45aac.tar.bz2")
2177 (file-name (string-append name "-" version ".tar.bz2"))
2180 "0mbhdrk12b6878kby0flnbak7444dlpm0ihlmf92vk59y1c02bc2"))
2181 (modules '((guix build utils)))
2184 (for-each delete-file (find-files "." ".*.bin$"))
2185 (for-each delete-file (find-files "." ".*.exe$"))
2186 (for-each delete-file (find-files "." ".*.jar$"))
2189 `(("alsa-lib" ,alsa-lib)
2191 ("fontconfig" ,fontconfig)
2192 ("freetype" ,freetype)
2195 ("libjpeg" ,libjpeg)
2198 ("libxext" ,libxext)
2199 ("libxrandr" ,libxrandr)
2200 ("libxrender" ,libxrender)
2202 ("libxtst" ,libxtst)))
2204 `(("autoconf" ,autoconf)
2205 ("openjdk11" ,openjdk11)
2206 ("openjdk11:jdk" ,openjdk11 "jdk")
2207 ("pkg-config" ,pkg-config)
2211 (home-page "https://openjdk.java.net/projects/jdk/12")))
2213 (define-public icedtea icedtea-8)
2216 (define-public ant/java8
2217 (package (inherit ant-bootstrap)
2222 (uri (string-append "mirror://apache/ant/source/apache-ant-"
2223 version "-src.tar.gz"))
2226 "10p3dh77lkzzzcy32dk9azljixzadp46fggjfbvgkl8mmb8cxxv8"))
2227 (modules '((guix build utils)))
2230 (for-each delete-file
2231 (find-files "lib/optional" "\\.jar$"))
2234 (substitute-keyword-arguments (package-arguments ant-bootstrap)
2236 `(modify-phases ,phases
2237 (add-after 'unpack 'remove-scripts
2238 ;; Remove bat / cmd scripts for DOS as well as the antRun and runant
2241 (for-each delete-file
2242 (find-files "src/script"
2243 "(.*\\.(bat|cmd)|runant.*|antRun.*)"))
2246 (lambda* (#:key inputs outputs #:allow-other-keys)
2247 (setenv "JAVA_HOME" (assoc-ref inputs "jdk"))
2249 ;; Disable tests to avoid dependency on hamcrest-core, which needs
2250 ;; Ant to build. This is necessary in addition to disabling the
2251 ;; "check" phase, because the dependency on "test-jar" would always
2252 ;; result in the tests to be run.
2253 (substitute* "build.xml"
2254 (("depends=\"jars,test-jar\"") "depends=\"jars\""))
2255 (invoke "bash" "bootstrap.sh"
2256 (string-append "-Ddist.dir="
2257 (assoc-ref outputs "out")))))))))
2259 `(("jdk" ,icedtea-8 "jdk")
2261 ("unzip" ,unzip)))))
2263 ;; The 1.9.x series is the last that can be built with GCJ. The 1.10.x series
2266 (package (inherit ant/java8)
2270 (uri (string-append "mirror://apache/ant/source/apache-ant-"
2271 version "-src.tar.gz"))
2274 "1k28mka0m3isy9yr8gz84kz1f3f879rwaxrd44vdn9xbfwvwk86n"))))
2276 `(("jdk" ,icedtea-7 "jdk")
2278 ("unzip" ,unzip)))))
2280 (define-public ant-apache-bcel
2283 (name "ant-apache-bcel")
2285 (substitute-keyword-arguments (package-arguments ant/java8)
2287 `(modify-phases ,phases
2288 (add-after 'unpack 'link-bcel
2289 (lambda* (#:key inputs #:allow-other-keys)
2290 (for-each (lambda (file)
2292 (string-append "lib/optional/"
2294 (find-files (assoc-ref inputs "java-commons-bcel")
2297 (add-after 'build 'install
2298 (lambda* (#:key outputs #:allow-other-keys)
2299 (let* ((out (assoc-ref outputs "out"))
2300 (share (string-append out "/share/java"))
2301 (bin (string-append out "/bin"))
2302 (lib (string-append out "/lib")))
2304 (install-file (string-append lib "/ant-apache-bcel.jar") share)
2305 (delete-file-recursively bin)
2306 (delete-file-recursively lib)
2309 `(("java-commons-bcel" ,java-commons-bcel)
2310 ,@(package-inputs ant/java8)))))
2312 (define-public ant-junit
2317 (substitute-keyword-arguments (package-arguments ant/java8)
2319 `(modify-phases ,phases
2320 (add-after 'unpack 'link-junit
2321 (lambda* (#:key inputs #:allow-other-keys)
2322 (for-each (lambda (file)
2324 (string-append "lib/optional/"
2326 (find-files (assoc-ref inputs "java-junit")
2329 (add-after 'build 'install
2330 (lambda* (#:key outputs #:allow-other-keys)
2331 (let* ((out (assoc-ref outputs "out"))
2332 (share (string-append out "/share/java"))
2333 (bin (string-append out "/bin"))
2334 (lib (string-append out "/lib")))
2336 (install-file (string-append lib "/ant-junit.jar") share)
2337 (delete-file-recursively bin)
2338 (delete-file-recursively lib)
2341 `(("java-junit" ,java-junit)
2342 ,@(package-inputs ant/java8)))))
2344 (define-public java-openjfx-build
2346 (name "java-openjfx-build")
2347 ;; This is a java-8 version
2352 (url "http://hg.openjdk.java.net/openjfx/8u-dev/rt")
2353 (changeset (string-append
2354 (string-join (string-split version #\.) "u")
2356 (file-name (string-append name "-" version "-checkout"))
2359 "0yg38mwpivswccv9n96k06x3iv82i4px1a9xg9l8dswzwmfj259f"))))
2360 (build-system ant-build-system)
2362 `(#:jar-name "java-openjfx.jar"
2363 #:source-dir "buildSrc/src/main/java"
2364 #:test-dir "buildSrc/src/test"
2366 (modify-phases %standard-phases
2367 (add-before 'configure 'generate-jsl-parser
2369 (invoke "antlr3" "-o"
2370 "buildSrc/src/main/java/com/sun/scenario/effect/compiler"
2371 "buildSrc/src/main/antlr/JSL.g"))))))
2373 `(("antlr3" ,antlr3)
2374 ("java-stringtemplate" ,java-stringtemplate)))
2376 `(("java-junit" ,java-junit)
2377 ("java-hamcrest-core" ,java-hamcrest-core)))
2378 (home-page "https://openjfx.io")
2379 (synopsis "Graphical application toolkit in Java")
2380 (description "OpenJFX is a client application platform for desktop,
2381 mobile and embedded systems built on Java. Its goal is to produce a
2382 modern, efficient, and fully featured toolkit for developing rich client
2383 applications. This package contains base classes for the OpenJFX
2384 distribution and helper classes for building other parts of the
2386 (license license:gpl2))) ;gpl2 only, with classpath exception
2388 (define-public java-openjfx-base
2389 (package (inherit java-openjfx-build)
2390 (name "java-openjfx-base")
2392 `(#:jar-name "java-openjfx-base.jar"
2393 #:source-dir "modules/base/src/main/java:modules/base/src/main/java8:modules/base/src/main/version-info"
2394 #:test-dir "modules/base/src/test"
2396 (modify-phases %standard-phases
2397 (add-before 'check 'remove-empty-file
2399 (with-directory-excursion "modules/base/src/test/java"
2400 ;; These files are completely commented, but junit expects them to
2401 ;; contain a class, so tests fail.
2403 "com/sun/javafx/property/adapter/PropertyDescriptorTest.java")
2405 "com/sun/javafx/property/adapter/ReadOnlyPropertyDescriptorTest.java")
2406 (delete-file "javafx/beans/property/PropertiesTest.java")
2408 "javafx/beans/property/adapter/ReadOnlyJavaBeanPropertyBuilder_General_Test.java")
2410 (delete-file "com/sun/javafx/runtime/VersionInfoTest.java"))
2413 `(("java-openjfx-build" ,java-openjfx-build)))
2414 (description "OpenJFX is a client application platform for desktop,
2415 mobile and embedded systems built on Java. Its goal is to produce a
2416 modern, efficient, and fully featured toolkit for developing rich client
2417 applications. This package contains base classes for the OpenJFX
2420 (define-public java-openjfx-graphics
2421 (package (inherit java-openjfx-build)
2422 (name "java-openjfx-graphics")
2424 `(#:jar-name "java-openjfx-graphics.jar"
2425 #:source-dir "modules/graphics/src/main/java"
2426 #:tests? #f; require X
2427 #:test-dir "modules/graphics/src/test"))
2429 `(("java-openjfx-base" ,java-openjfx-base)
2430 ("java-swt" ,java-swt)))
2431 (description "OpenJFX is a client application platform for desktop,
2432 mobile and embedded systems built on Java. Its goal is to produce a
2433 modern, efficient, and fully featured toolkit for developing rich client
2434 applications. This package contains graphics-related classes for the
2435 OpenJFX distribution.")))
2437 (define-public java-openjfx-media
2438 (package (inherit java-openjfx-build)
2439 (name "java-openjfx-media")
2441 `(("java-openjxf-graphics" ,java-openjfx-graphics)))
2443 `(#:jar-name "java-openjfx-media.jar"
2444 #:source-dir "modules/media/src/main/java"
2445 #:tests? #f)); no tests
2446 (description "OpenJFX is a client application platform for desktop,
2447 mobile and embedded systems built on Java. Its goal is to produce a
2448 modern, efficient, and fully featured toolkit for developing rich client
2449 applications. This package contains media-related classes for the
2450 OpenJFX distribution.")))
2452 (define-public javacc-4
2459 (url "https://github.com/javacc/javacc.git")
2460 (commit "release_41")))
2461 (file-name (string-append "javacc-" version "-checkout"))
2464 "07ysav7j8r1c6h8qxrgqk6lwdp74ly0ad1935lragxml0qqc3ka0"))
2465 (modules '((guix build utils)))
2466 ;; delete bundled jars
2467 (snippet '(begin (delete-file-recursively "lib") #t))))
2468 (build-system ant-build-system)
2470 ;; /tmp/guix-build-javacc-4.1.drv-0/source/test/javacodeLA/build.xml:60:
2475 (modify-phases %standard-phases
2476 ;; Delete tests to avoid build failure (we don't run them anyway).
2477 (add-after 'unpack 'delete-tests
2479 (for-each delete-file
2480 '("src/org/javacc/JavaCCTestCase.java"
2481 "src/org/javacc/parser/ExpansionTest.java"
2482 "src/org/javacc/parser/OptionsTest.java"
2483 "src/org/javacc/jjtree/JJTreeOptionsTest.java"))
2484 (for-each delete-file-recursively
2485 '("src/org/javacc/parser/test"
2486 "src/org/javacc/jjdoc/test"))
2488 (replace 'install (install-jars "bin/lib")))))
2489 (home-page "https://javacc.org/")
2490 (synopsis "Java parser generator")
2491 (description "Java Compiler Compiler (JavaCC) is the most popular parser
2492 generator for use with Java applications. A parser generator is a tool that
2493 reads a grammar specification and converts it to a Java program that can
2494 recognize matches to the grammar. In addition to the parser generator itself,
2495 JavaCC provides other standard capabilities related to parser generation such
2496 as tree building (via a tool called JJTree included with JavaCC), actions,
2498 (license license:bsd-3)))
2500 (define-public javacc
2508 (url "https://github.com/javacc/javacc.git")
2510 (file-name (git-file-name "javacc" version))
2512 (base32 "18kkak3gda93gr25jrgy6q00g0jr8i24ri2wk4kybz1v234fxx9i"))
2513 (modules '((guix build utils)))
2514 ;; Delete bundled jars.
2515 (snippet '(begin (for-each delete-file-recursively
2516 '("bootstrap" "lib"))
2519 `(#:make-flags ; bootstrap from javacc-4
2520 (list (string-append "-Dbootstrap-jar="
2521 (assoc-ref %build-inputs "javacc")
2522 "/share/java/javacc.jar"))
2523 #:test-target "test"
2525 (modify-phases %standard-phases
2526 (replace 'install (install-jars "target"))
2527 (add-after 'install 'install-bin
2528 (lambda* (#:key outputs inputs #:allow-other-keys)
2529 (let* ((out (assoc-ref outputs "out"))
2530 (dir (string-append out "/share/java"))
2531 (bin (string-append out "/bin"))
2532 (javacc (string-append bin "/javacc")))
2534 (with-output-to-file javacc
2537 (string-append "#!/bin/sh\n"
2538 (assoc-ref inputs "jdk") "/bin/java"
2539 " -cp " dir "/javacc.jar" " `basename $0`" " $*"))))
2540 (chmod javacc #o755)
2541 ;; symlink to different names to affect the first argument and
2542 ;; change the behavior of the jar file.
2543 (symlink javacc (string-append bin "/jjdoc"))
2544 (symlink javacc (string-append bin "/jjtree"))
2548 `(("javacc" ,javacc-4)))))
2550 ;; This is the last 3.x release of ECJ
2551 (define-public java-ecj-3
2557 (uri (string-append "http://archive.eclipse.org/eclipse/"
2558 "downloads/drops/R-" version
2559 "-201301310800/ecjsrc-" version ".jar"))
2562 "01mdj14jw11g1jfnki4fi8229p0c6zzckd38zqy2w4m3cjcvsx04"))))
2563 (build-system ant-build-system)
2565 `(#:tests? #f ; none included
2566 #:jdk ,icedtea-7 ; doesn't build with JDK8+
2567 #:make-flags (list "-f" "src/build.xml")
2568 #:build-target "build"
2570 (modify-phases %standard-phases
2571 (add-after 'unpack 'fix-manifest
2573 ;; Record the main class to make ecj executable.
2574 (with-atomic-file-replacement "src/META-INF/MANIFEST.MF"
2576 (display "Manifest-Version: 1.0
2577 Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n"
2580 (replace 'install (install-jars ".")))))
2581 (home-page "https://eclipse.org")
2582 (synopsis "Eclipse Java development tools core batch compiler")
2583 (description "This package provides the Eclipse Java core batch compiler.")
2584 (license license:epl1.0)))
2586 ;; This is needed for java-cisd-args4j
2587 (define-public java-ecj-3.5
2588 (package (inherit java-ecj-3)
2591 (method url-fetch/zipbomb)
2592 (uri (string-append "http://archive.eclipse.org/eclipse/"
2593 "downloads/drops/R-" version
2594 "-200909170800/ecjsrc-" version ".zip"))
2597 "1vnl2mavisc567bip736xzsvvbjif5279wc4a7pbdik5wlir8qr7"))))
2598 (build-system ant-build-system)
2600 `(#:tests? #f ; none included
2601 #:jdk ,icedtea-7 ; doesn't build with JDK8+
2602 #:build-target "build"
2604 (modify-phases %standard-phases
2605 (add-after 'unpack 'fix-manifest
2607 ;; Record the main class to make ecj executable.
2608 (with-atomic-file-replacement "META-INF/MANIFEST.MF"
2611 (display "Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n"
2614 (replace 'install (install-jars ".")))))
2616 `(("unzip" ,unzip)))))
2618 (define-public java-ecj
2619 (package (inherit java-ecj-3)
2625 "http://archive.eclipse.org/eclipse/downloads/drops4/R-"
2627 "-201703010400/ecjsrc-"
2632 "11cfgsdgznja1pvlxkjbqykxd7pcd5655vkm7s44xmahmap15gpl"))))
2634 `(#:tests? #f ; none included
2635 #:build-target "build"
2637 (modify-phases %standard-phases
2638 (add-after 'unpack 'fix-build.xml
2640 (substitute* "src/build.xml"
2644 (add-after 'unpack 'fix-prop
2646 (substitute* "src/build.xml"
2647 (("^.*properties.*$")
2648 "<include name=\"**/*.properties\"/>
2649 <include name=\"**/*.props\"/>"))
2651 (add-before 'build 'chdir
2655 (replace 'install (install-jars ".")))))))
2657 (define-public java-cisd-base
2658 (let ((revision 38938)
2659 (base-version "14.12.0"))
2661 (name "java-cisd-base")
2662 (version (string-append base-version "-" (number->string revision)))
2666 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2667 "base/tags/release/"
2668 (version-major+minor base-version)
2669 ".x/" base-version "/base/"))
2670 (revision revision)))
2671 (file-name (string-append "java-cisd-base-" version "-checkout"))
2674 "1i5adyf7nzclb0wydgwa1az04qliid8035vpahaandmkmigbnxiy"))
2675 (modules '((guix build utils)))
2678 ;; Delete included gradle jar
2679 (delete-file-recursively "gradle/wrapper")
2680 ;; Delete pre-built native libraries
2681 (delete-file-recursively "libs")
2683 (build-system ant-build-system)
2685 `(#:make-flags '("-file" "build/build.xml")
2686 #:test-target "jar-test"
2689 (modify-phases %standard-phases
2690 (add-after 'unpack 'unpack-build-resources
2691 (lambda* (#:key inputs #:allow-other-keys)
2692 (copy-recursively (assoc-ref inputs "build-resources")
2693 "../build_resources")
2695 (add-after 'unpack-build-resources 'fix-dependencies
2696 (lambda* (#:key inputs #:allow-other-keys)
2697 (substitute* "build/build.xml"
2698 (("\\$\\{lib\\}/testng/testng-jdk15.jar")
2699 (string-append (assoc-ref inputs "java-testng")
2700 "/share/java/java-testng.jar"))
2701 (("\\$\\{lib\\}/commons-lang/commons-lang.jar")
2702 (string-append (assoc-ref inputs "java-commons-lang")
2703 "/share/java/commons-lang-"
2704 ,(package-version java-commons-lang) ".jar"))
2705 (("\\$\\{lib\\}/commons-io/commons-io.jar")
2706 (string-append (assoc-ref inputs "java-commons-io")
2707 "/share/java/commons-io-"
2708 ,(package-version java-commons-io)
2710 ;; Remove dependency on svn
2711 (("<build-info.*") "")
2712 (("\\$\\{revision.number\\}")
2713 ,(number->string revision))
2714 (("\\$\\{version.number\\}") ,base-version))
2715 ;; Remove dependency on classycle
2716 (substitute* "../build_resources/ant/build-common.xml"
2717 (("<taskdef name=\"dependency-checker.*") "")
2718 (("classname=\"classycle.*") "")
2719 (("classpath=\"\\$\\{lib\\}/classycle.*") ""))
2721 ;; A few tests fail because of the lack of a proper /etc/groups and
2722 ;; /etc/passwd file in the build container.
2723 (add-after 'unpack 'disable-broken-tests
2725 (substitute* "sourceTest/java/ch/systemsx/cisd/base/AllTests.java"
2726 (("Unix.isOperational\\(\\)") "false"))
2728 ;; These decorators are almost useless and pull in an unpackaged
2730 (add-after 'unpack 'remove-useless-decorators
2732 (substitute* "source/java/ch/systemsx/cisd/base/unix/Unix.java"
2734 (("import ch.rinn.restrictions.Private;") ""))
2735 (substitute* "sourceTest/java/ch/systemsx/cisd/base/unix/UnixTests.java"
2737 (("import ch.rinn.restrictions.Friend;") ""))
2739 (add-before 'configure 'build-native-code
2740 (lambda* (#:key inputs #:allow-other-keys)
2741 (let ((jdk (assoc-ref inputs "jdk"))
2742 (dir ,(match (%current-system)
2745 ((or "armhf-linux" "aarch64-linux")
2747 ((or "x86_64-linux")
2749 (_ "unknown-Linux"))))
2750 (with-directory-excursion "source/c"
2751 (invoke "gcc" "-shared" "-O3" "-fPIC" "unix.c"
2752 (string-append "-I" jdk "/include")
2753 (string-append "-I" jdk "/include/linux")
2755 (invoke "gcc" "-shared" "-O3" "-fPIC"
2756 "-DMACHINE_BYTE_ORDER=1"
2764 (string-append "-I" jdk "/include")
2765 (string-append "-I" jdk "/include/linux")
2766 "-o" "libnativedata.so"))
2767 (install-file "source/c/libunix.so"
2768 (string-append "libs/native/unix/" dir))
2769 (install-file "source/c/libnativedata.so"
2770 (string-append "libs/native/nativedata/" dir))
2772 ;; In the "check" phase we only build the test executable.
2773 (add-after 'check 'run-tests
2775 (invoke "java" "-jar" "targets/dist/sis-base-test.jar")
2776 (delete-file "targets/dist/sis-base-test.jar")
2778 (replace 'install (install-jars "targets/dist")))))
2780 `(("jdk" ,icedtea-8)
2781 ("java-commons-lang" ,java-commons-lang)
2782 ("java-commons-io" ,java-commons-io)
2783 ("java-testng" ,java-testng)
2788 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2789 "base/tags/release/"
2790 (version-major+minor base-version)
2792 "/build_resources/"))
2793 (revision revision)))
2796 "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk"))))))
2797 (home-page "http://svnsis.ethz.ch")
2798 (synopsis "Utility classes for libraries from ETH Zurich")
2799 (description "This library supplies some utility classes needed for
2800 libraries from the SIS division at ETH Zurich like jHDF5.")
2801 ;; The C sources are under a non-copyleft license, which looks like a
2802 ;; variant of the BSD licenses. The whole package is under the ASL2.0.
2803 (license (list license:asl2.0
2804 (license:non-copyleft "file://source/c/COPYING"))))))
2806 (define-public java-cisd-args4j
2807 (let ((revision 39162)
2808 (base-version "9.11.2"))
2810 (name "java-cisd-args4j")
2811 (version (string-append base-version "-" (number->string revision)))
2815 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2816 "args4j/tags/release/"
2817 (version-major+minor base-version)
2818 ".x/" base-version "/args4j/"))
2819 (revision revision)))
2820 (file-name (string-append "java-cisd-args4j-" version "-checkout"))
2823 "0hhqznjaivq7ips7mkwas78z42s6djsm20rrs7g1zd59rcsakxn2"))))
2824 (build-system ant-build-system)
2826 `(#:make-flags '("-file" "build/build.xml")
2827 #:tests? #f ; there are no tests
2828 ;; There are weird build failures with JDK8, such as: "The type
2829 ;; java.io.ObjectInputStream cannot be resolved. It is indirectly
2830 ;; referenced from required .class files"
2832 #:modules ((guix build ant-build-system)
2834 (guix build java-utils)
2839 (modify-phases %standard-phases
2840 (add-after 'unpack 'unpack-build-resources
2841 (lambda* (#:key inputs #:allow-other-keys)
2842 (mkdir-p "../build_resources")
2843 (invoke "tar" "xf" (assoc-ref inputs "build-resources")
2844 "-C" "../build_resources"
2845 "--strip-components=1")
2846 (mkdir-p "../build_resources/lib")
2848 (add-after 'unpack-build-resources 'fix-dependencies
2849 (lambda* (#:key inputs #:allow-other-keys)
2850 ;; FIXME: There should be a more convenient abstraction for
2851 ;; editing XML files.
2852 (with-directory-excursion "../build_resources/ant/"
2853 (chmod "build-common.xml" #o664)
2854 (call-with-output-file "build-common.xml.new"
2858 (with-input-from-file "build-common.xml"
2859 (lambda _ (xml->sxml #:trim-whitespace? #t)))
2860 `(;; Remove dependency on classycle and custom ant tasks
2861 (taskdef . ,(lambda (tag . kids)
2862 (let ((name ((sxpath '(name *text*)) kids)))
2863 (if (or (member "build-info" name)
2864 (member "dependency-checker" name)
2865 (member "build-java-subprojects" name)
2866 (member "project-classpath" name))
2869 (typedef . ,(lambda (tag . kids)
2870 (let ((name ((sxpath '(name *text*)) kids)))
2871 (if (member "recursive-jar" name)
2874 (build-java-subprojects . ,(lambda _ '()))
2875 ;; Ignore everything else
2876 (*default* . ,(lambda (tag . kids) `(,tag ,@kids)))
2877 (*text* . ,(lambda (_ txt) txt))))
2879 (rename-file "build-common.xml.new" "build-common.xml"))
2880 (substitute* "build/build.xml"
2881 (("\\$\\{lib\\}/cisd-base/cisd-base.jar")
2882 (string-append (assoc-ref inputs "java-cisd-base")
2883 "/share/java/sis-base.jar"))
2884 ;; Remove dependency on svn
2885 (("<build-info.*") "")
2886 (("\\$\\{revision.number\\}")
2887 ,(number->string revision))
2888 (("\\$\\{version.number\\}") ,base-version)
2889 ;; Don't use custom ant tasks.
2890 (("recursive-jar") "jar")
2891 (("<project-classpath.*") ""))
2893 (replace 'install (install-jars "targets/dist")))))
2895 `(("java-cisd-base" ,java-cisd-base)))
2897 `(("ecj" ,java-ecj-3.5)
2902 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2903 "args4j/tags/release/"
2904 (version-major+minor base-version)
2906 "/build_resources/"))
2907 (revision revision)))
2910 "056cam4k8pll7ass31sy6gwn8g8719njc41yf4l02b0342nilkyf"))
2911 (modules '((guix build utils)))
2912 ;; Delete bundled pre-built jars.
2914 '(begin (delete-file-recursively "lib/") #t))))))
2915 (home-page "http://svnsis.ethz.ch")
2916 (synopsis "Command line parser library")
2917 (description "This package provides a parser for command line arguments.")
2918 (license license:asl2.0))))
2920 (define-public java-cisd-jhdf5
2921 (let ((revision 39162)
2922 (base-version "14.12.6"))
2924 (name "java-cisd-jhdf5")
2925 (version (string-append base-version "-" (number->string revision)))
2929 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2930 "jhdf5/tags/release/"
2931 (version-major+minor base-version)
2932 ".x/" base-version "/jhdf5/"))
2933 (revision revision)))
2934 (file-name (string-append "java-cisd-jhdf5-" version "-checkout"))
2937 "13i17s2hn0q9drdqvp8csy7770p3hdbh9rp30ihln2ldkfawdmz0"))
2938 (modules '((guix build utils)))
2941 ;; Delete included gradle jar
2942 (delete-file-recursively "gradle/wrapper")
2943 ;; Delete pre-built native libraries
2944 (delete-file-recursively "libs")
2946 (build-system ant-build-system)
2948 `(#:make-flags '("-file" "build/build.xml")
2949 #:build-target "jar-all"
2950 #:test-target "jar-test"
2953 (modify-phases %standard-phases
2954 ;; FIXME: this build phase fails.
2955 (delete 'generate-jar-indices)
2956 ;; Don't erase results from the build phase when building tests.
2957 (add-after 'unpack 'separate-test-target-from-clean
2959 (substitute* "build/build.xml"
2960 (("\"jar-test\" depends=\"clean, ")
2961 "\"jar-test\" depends=\""))
2963 (add-after 'unpack 'unpack-build-resources
2964 (lambda* (#:key inputs #:allow-other-keys)
2965 (copy-recursively (assoc-ref inputs "build-resources")
2966 "../build_resources")
2967 (delete-file-recursively "../build_resources/lib/")
2968 (mkdir-p "../build_resources/lib")
2969 ;; Remove dependency on classycle
2970 (substitute* "../build_resources/ant/build-common.xml"
2971 (("<taskdef name=\"dependency-checker.*") "")
2972 (("classname=\"classycle.*") "")
2973 (("classpath=\"\\$\\{lib\\}/classycle.*") ""))
2974 ;; Remove dependency on svn
2975 (substitute* "build/build.xml"
2976 (("<build-info.*") "")
2977 (("\\$\\{revision.number\\}")
2978 ,(number->string revision))
2979 (("\\$\\{version.number\\}") ,base-version))
2981 (add-after 'unpack-build-resources 'fix-dependencies
2982 (lambda* (#:key inputs #:allow-other-keys)
2983 (substitute* "../build_resources/ant/build-common.xml"
2984 (("../libraries/testng/testng-jdk15.jar")
2985 (string-append (assoc-ref inputs "java-testng")
2986 "/share/java/java-testng.jar")))
2987 (substitute* "build/build.xml"
2988 (("\\$\\{lib\\}/sis-base/sis-base.jar")
2989 (string-append (assoc-ref inputs "java-cisd-base")
2990 "/share/java/sis-base.jar"))
2991 (("\\$\\{lib\\}/cisd-args4j/cisd-args4j.jar")
2992 (string-append (assoc-ref inputs "java-cisd-args4j")
2993 "/share/java/cisd-args4j.jar"))
2994 (("\\$\\{lib\\}/commons-lang/commons-lang.jar")
2995 (string-append (assoc-ref inputs "java-commons-lang")
2996 "/share/java/commons-lang-"
2997 ,(package-version java-commons-lang) ".jar"))
2998 (("\\$\\{lib\\}/commons-io/commons-io.jar")
2999 (string-append (assoc-ref inputs "java-commons-io")
3000 "/share/java/commons-io-"
3001 ,(package-version java-commons-io)
3003 (("\\$\\{lib\\}/testng/testng-jdk15.jar")
3004 (string-append (assoc-ref inputs "java-testng")
3005 "/share/java/java-testng.jar"))
3006 (("\\$\\{lib\\}/junit4/junit.jar")
3007 (string-append (assoc-ref inputs "java-junit")
3008 "/share/java/junit.jar"))
3009 (("\\$\\{lib\\}/jmock/hamcrest/hamcrest-core.jar")
3010 (string-append (assoc-ref inputs "java-hamcrest-core")
3011 "/share/java/hamcrest-core.jar")))
3012 ;; Remove dependency on ch.rinn.restrictions
3013 (with-directory-excursion "source/java/ch/systemsx/cisd/hdf5/"
3014 (substitute* '("BitSetConversionUtils.java"
3016 (("import ch.rinn.restrictions.Private;") "")
3018 (with-directory-excursion "sourceTest/java/ch/systemsx/cisd/hdf5/"
3019 (substitute* '("BitSetConversionTest.java"
3020 "h5ar/HDF5ArchiverTest.java")
3021 (("import ch.rinn.restrictions.Friend;") "")
3023 ;; Remove leftovers from removing @Friend
3024 (substitute* "h5ar/HDF5ArchiverTest.java"
3025 (("\\{ HDF5Archiver.class, IdCache.class, LinkRecord.class \\}\\)")
3028 (add-before 'configure 'build-native-library
3029 (lambda* (#:key inputs #:allow-other-keys)
3030 (let ((jdk (assoc-ref inputs "jdk"))
3031 (hdf5 (assoc-ref inputs "hdf5"))
3032 (dir ,(match (%current-system)
3035 ((or "armhf-linux" "aarch64-linux")
3037 ((or "x86_64-linux")
3039 (_ "unknown-Linux"))))
3040 (with-directory-excursion "source/c"
3041 (apply invoke `("gcc" "-shared" "-O3"
3043 "-Wl,--exclude-libs,ALL"
3044 ,@(find-files "jhdf5" "\\.c$")
3045 ,@(find-files "hdf-java" "\\.c$")
3046 ,(string-append "-I" hdf5 "/include")
3047 ,(string-append "-I" jdk "/include")
3048 ,(string-append "-I" jdk "/include/linux")
3049 ,(string-append hdf5 "/lib/libhdf5.a")
3050 "-o" "libjhdf5.so" "-lz")))
3051 (install-file "source/c/libjhdf5.so"
3052 (string-append "libs/native/jhdf5/" dir))
3054 ;; In the "check" phase we only build the test executable.
3055 (add-after 'check 'run-tests
3057 (invoke "java" "-jar" "targets/dist/sis-jhdf5-test.jar")
3058 (delete-file "targets/dist/sis-jhdf5-test.jar")
3061 (install-jars "targets/dist")))))
3063 `(("java-cisd-base" ,java-cisd-base)
3064 ("java-cisd-args4j" ,java-cisd-args4j)
3065 ("java-commons-lang" ,java-commons-lang)
3066 ("java-commons-io" ,java-commons-io)
3070 `(("jdk" ,icedtea-8)
3071 ("java-testng" ,java-testng)
3072 ("java-junit" ,java-junit)
3073 ("java-jmock" ,java-jmock)
3074 ("java-hamcrest-core" ,java-hamcrest-core)
3079 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
3080 "jhdf5/tags/release/"
3081 (version-major+minor base-version)
3083 "/build_resources/"))
3084 (revision revision)))
3087 "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk"))))))
3088 (home-page "https://wiki-bsse.ethz.ch/display/JHDF5/")
3089 (synopsis "Java binding for HDF5")
3090 (description "JHDF5 is a high-level API in Java for reading and writing
3091 HDF5 files, building on the libraries provided by the HDF Group.")
3092 ;; The C sources are under a non-copyleft license, which looks like a
3093 ;; variant of the BSD licenses. The whole package is under the ASL2.0.
3094 (license (list license:asl2.0
3095 (license:non-copyleft "file://source/c/COPYING"))))))
3097 (define-public java-classpathx-servletapi
3099 (name "java-classpathx-servletapi")
3103 (uri (string-append "mirror://gnu/classpathx/servletapi/"
3104 "servletapi-" version ".tar.gz"))
3107 "07d8h051siga2f33fra72hk12sbq1bxa4jifjg0qj0vfazjjff0x"))))
3108 (build-system ant-build-system)
3110 `(#:tests? #f ; there is no test target
3111 #:build-target "compile"
3113 (list "-Dbuild.compiler=javac1.8"
3114 (string-append "-Ddist=" (assoc-ref %outputs "out")))
3116 (modify-phases %standard-phases
3118 (lambda* (#:key make-flags #:allow-other-keys)
3119 (apply invoke `("ant" "dist" ,@make-flags)))))))
3120 (home-page "https://www.gnu.org/software/classpathx/")
3121 (synopsis "Java servlet API implementation")
3122 (description "This is the GNU servlet API distribution, part of the
3123 ClasspathX project. It provides implementations of version 3.0 of the servlet
3124 API and version 2.1 of the Java ServerPages API.")
3125 (license license:gpl3+)))
3127 (define-public java-javaee-servletapi
3129 (name "java-javaee-servletapi")
3134 (url "https://github.com/javaee/servlet-spec.git")
3136 (file-name (git-file-name name version))
3139 "0s03lj8w5an70lkqbjycgfrfk0kc07vbfav91jzk87gh3awf9ksl"))))
3140 (build-system ant-build-system)
3142 `(#:jar-name "javax-servletapi.jar"
3145 #:source-dir "src/main/java"
3147 (modify-phases %standard-phases
3148 (add-before 'build 'copy-resources
3150 (mkdir-p "build/classes/javax/servlet/http")
3151 (let ((from-prefix "src/main/java/javax/servlet/")
3152 (to-prefix "build/classes/javax/servlet/"))
3153 (for-each (lambda (f)
3154 (copy-file (string-append from-prefix f)
3155 (string-append to-prefix f)))
3156 (list "LocalStrings_ja.properties"
3157 "LocalStrings.properties"
3158 "LocalStrings_fr.properties"
3159 "http/LocalStrings_es.properties"
3160 "http/LocalStrings_ja.properties"
3161 "http/LocalStrings.properties"
3162 "http/LocalStrings_fr.properties")))
3165 `(("unzip" ,unzip)))
3166 (home-page "https://javaee.github.io/servlet-spec/")
3167 (synopsis "Java servlet API")
3168 (description "Java Servlet is the foundation web specification in the
3169 Java Enterprise Platform. Developers can build web applications using the
3170 Servlet API to interact with the request/response workflow. This project
3171 provides information on the continued development of the Java Servlet
3173 ;; Main code is dual-licensed by Oracle under either GLP2 or CDDL 1.1.
3174 ;; Some files are licensed under ASL 2.0.
3175 (license (list license:asl2.0 license:gpl2 license:cddl1.1))))
3177 (define-public java-swt
3182 ;; The types of many variables and procedures differ in the sources
3183 ;; dependent on whether the target architecture is a 32-bit system or a
3184 ;; 64-bit system. Instead of patching the sources on demand in a build
3185 ;; phase we download either the 32-bit archive (which mostly uses "int"
3186 ;; types) or the 64-bit archive (which mostly uses "long" types).
3187 (let ((hash32 "09q0cbh90d90q3a7dx9430kc4m6bijrkr4lajrmzzvi0jjdpq4v9")
3188 (hash64 "17k5hs75a87ssmc5xhwdfdm2gn4zba0r837l2455za01krnkaa2q")
3191 (let-values (((hash file)
3192 (match (or (%current-target-system) (%current-system))
3193 ("x86_64-linux" (values hash64 file64))
3194 (_ (values hash32 file32)))))
3198 "http://download.eclipse.org/eclipse/downloads/drops4/"
3199 "R-" version "-201710090410/swt-" version
3200 "-gtk-linux-" file ".zip"))
3201 (sha256 (base32 hash))))))
3202 (build-system ant-build-system)
3204 `(#:jar-name "swt.jar"
3206 #:tests? #f ; no "check" target
3208 (modify-phases %standard-phases
3210 (lambda* (#:key source #:allow-other-keys)
3212 (invoke "unzip" source "-d" "swt")
3215 (invoke "unzip" "src.zip" "-d" "src")))
3216 ;; The classpath contains invalid icecat jars. Since we don't need
3217 ;; anything other than the JDK on the classpath, we can simply unset
3219 (add-after 'configure 'unset-classpath
3220 (lambda _ (unsetenv "CLASSPATH") #t))
3221 (add-before 'build 'build-native
3222 (lambda* (#:key inputs outputs #:allow-other-keys)
3223 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
3224 ;; Build shared libraries. Users of SWT have to set the system
3225 ;; property swt.library.path to the "lib" directory of this
3228 (setenv "OUTPUT_DIR" lib)
3229 (with-directory-excursion "src"
3230 (invoke "bash" "build.sh")))))
3231 (add-after 'install 'install-native
3232 (lambda* (#:key outputs #:allow-other-keys)
3233 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
3234 (for-each (lambda (file)
3235 (install-file file lib))
3236 (find-files "." "\\.so$"))
3240 ("libxtst" ,libxtst)
3245 `(("pkg-config" ,pkg-config)
3247 (home-page "https://www.eclipse.org/swt/")
3248 (synopsis "Widget toolkit for Java")
3250 "SWT is a widget toolkit for Java designed to provide efficient, portable
3251 access to the user-interface facilities of the operating systems on which it
3253 ;; SWT code is licensed under EPL1.0
3254 ;; Gnome and Gtk+ bindings contain code licensed under LGPLv2.1
3255 ;; Cairo bindings contain code under MPL1.1
3256 ;; XULRunner 1.9 bindings contain code under MPL2.0
3261 license:lgpl2.1+))))
3263 (define-public java-xz
3269 (uri (string-append "http://tukaani.org/xz/xz-java-" version ".zip"))
3272 "1z3p1ri1gvl07inxn0agx44ck8n7wrzfmvkz8nbq3njn8r9wba8x"))))
3273 (build-system ant-build-system)
3275 `(#:tests? #f ; There are no tests to run.
3276 #:jar-name ,(string-append "xz-" version ".jar")
3278 (modify-phases %standard-phases
3279 ;; The unpack phase enters the "maven" directory by accident.
3280 (add-after 'unpack 'chdir
3281 (lambda _ (chdir "..") #t)))))
3283 `(("unzip" ,unzip)))
3284 (home-page "https://tukaani.org/xz/java.html")
3285 (synopsis "Implementation of XZ data compression in pure Java")
3286 (description "This library aims to be a complete implementation of XZ data
3287 compression in pure Java. Single-threaded streamed compression and
3288 decompression and random access decompression have been fully implemented.")
3289 (license license:public-domain)))
3291 ;; java-hamcrest-core uses qdox version 1.12. We package this version instead
3292 ;; of the latest release.
3293 (define-public java-qdox-1.12
3299 (uri (string-append "http://central.maven.org/maven2/"
3300 "com/thoughtworks/qdox/qdox/" version
3301 "/qdox-" version "-sources.jar"))
3304 "0hlfbqq2avf5s26wxkksqmkdyk6zp9ggqn37c468m96mjv0n9xfl"))))
3305 (build-system ant-build-system)
3307 `(;; Tests require junit
3309 #:jar-name "qdox.jar"
3311 (modify-phases %standard-phases
3313 (lambda* (#:key source #:allow-other-keys)
3315 (with-directory-excursion "src"
3316 (invoke "jar" "-xf" source))))
3317 ;; At this point we don't have junit, so we must remove the API
3319 (add-after 'unpack 'delete-tests
3321 (delete-file-recursively "src/com/thoughtworks/qdox/junit")
3323 (home-page "http://qdox.codehaus.org/")
3324 (synopsis "Parse definitions from Java source files")
3326 "QDox is a high speed, small footprint parser for extracting
3327 class/interface/method definitions from source files complete with JavaDoc
3328 @code{@@tags}. It is designed to be used by active code generators or
3329 documentation tools.")
3330 (license license:asl2.0)))
3332 (define-public java-jarjar
3334 (name "java-jarjar")
3339 "https://storage.googleapis.com/google-code-archive-downloads/v2/"
3340 "code.google.com/jarjar/jarjar-src-" version ".zip"))
3343 "1v8irhni9cndcw1l1wxqgry013s2kpj0qqn57lj2ji28xjq8ndjl"))
3344 (modules '((guix build utils)))
3347 ;; Delete bundled thirds-party jar archives.
3348 ;; TODO: unbundle maven-plugin-api.
3349 (delete-file "lib/asm-4.0.jar")
3350 (delete-file "lib/asm-commons-4.0.jar")
3351 (delete-file "lib/junit-4.8.1.jar")
3353 (build-system ant-build-system)
3355 `(;; Tests require junit, which ultimately depends on this package.
3357 #:build-target "jar"
3359 (modify-phases %standard-phases
3360 (add-before 'build 'do-not-use-bundled-asm
3361 (lambda* (#:key inputs #:allow-other-keys)
3362 (substitute* "build.xml"
3363 (("<path id=\"path.build\">")
3364 (string-append "<path id=\"path.build\"><fileset dir=\""
3365 (assoc-ref inputs "java-asm-bootstrap")
3366 "/share/java\" includes=\"**/*.jar\"/>"))
3367 (("<zipfileset src=\"lib/asm-4.0.jar\"/>") "")
3368 (("lib/asm-commons-4.0.jar")
3369 (string-append (assoc-ref inputs "java-asm-bootstrap")
3370 "/share/java/asm-6.0.jar"))
3371 (("<include name=\"org/objectweb/asm/commons/Remap\\*\\.class\"/>")
3372 (string-append "<include name=\"org/objectweb/asm/"
3373 "commons/Remap*.class\"/>"
3374 "<include name=\"org/objectweb/asm/*.class\"/>"
3375 "<include name=\"org/objectweb/asm/"
3376 "signature/*.class\"/>"
3377 "<include name=\"org/objectweb/asm/"
3378 "commons/SignatureRemapper.class\"/>")))
3381 (lambda* (#:key outputs #:allow-other-keys)
3382 (let ((target (string-append (assoc-ref outputs "out")
3384 (install-file (string-append "dist/jarjar-" ,version ".jar")
3388 `(("java-asm-bootstrap" ,java-asm-bootstrap)))
3390 `(("unzip" ,unzip)))
3391 (home-page "https://code.google.com/archive/p/jarjar/")
3392 (synopsis "Repackage Java libraries")
3394 "Jar Jar Links is a utility that makes it easy to repackage Java
3395 libraries and embed them into your own distribution. Jar Jar Links includes
3396 an Ant task that extends the built-in @code{jar} task.")
3397 (license license:asl2.0)))
3399 (define-public java-hamcrest-core
3401 (name "java-hamcrest-core")
3405 (uri (string-append "https://github.com/hamcrest/JavaHamcrest/"
3406 "archive/hamcrest-java-" version ".tar.gz"))
3409 "11g0s105fmwzijbv08lx8jlb521yravjmxnpgdx08fvg1kjivhva"))
3410 (modules '((guix build utils)))
3413 ;; Delete bundled thirds-party jar archives.
3414 (delete-file-recursively "lib")
3416 (build-system ant-build-system)
3418 `(#:tests? #f ; Tests require junit
3419 #:modules ((guix build ant-build-system)
3422 #:make-flags (list (string-append "-Dversion=" ,version))
3423 #:test-target "unit-test"
3424 #:build-target "core"
3426 (modify-phases %standard-phases
3427 ;; Disable unit tests, because they require junit, which requires
3428 ;; hamcrest-core. We also give a fixed value to the "Built-Date"
3429 ;; attribute from the manifest for reproducibility.
3430 (add-before 'configure 'patch-build.xml
3432 (substitute* "build.xml"
3433 (("unit-test, ") "")
3434 (("\\$\\{build.timestamp\\}") "guix"))
3436 ;; Java's "getMethods()" returns methods in an unpredictable order.
3437 ;; To make the output of the generated code deterministic we must
3438 ;; sort the array of methods.
3439 (add-after 'unpack 'make-method-order-deterministic
3441 (substitute* "hamcrest-generator/src/main/java/org/hamcrest/generator/ReflectiveFactoryReader.java"
3442 (("import java\\.util\\.Iterator;" line)
3443 (string-append line "\n"
3444 "import java.util.Arrays; import java.util.Comparator;"))
3445 (("allMethods = cls\\.getMethods\\(\\);" line)
3446 (string-append "_" line
3448 private Method[] getSortedMethods() {
3449 Arrays.sort(_allMethods, new Comparator<Method>() {
3451 public int compare(Method a, Method b) {
3452 return a.toString().compareTo(b.toString());
3458 private Method[] allMethods = getSortedMethods();")))
3460 (add-before 'build 'do-not-use-bundled-qdox
3461 (lambda* (#:key inputs #:allow-other-keys)
3462 (substitute* "build.xml"
3463 (("lib/generator/qdox-1.12.jar")
3464 (string-append (assoc-ref inputs "java-qdox-1.12")
3465 "/share/java/qdox.jar")))
3467 ;; build.xml searches for .jar files in this directoy, which
3468 ;; we remove from the source archive.
3469 (add-before 'build 'create-dummy-directories
3471 (mkdir-p "lib/integration")
3474 (lambda* (#:key outputs #:allow-other-keys)
3475 (let* ((target (string-append (assoc-ref outputs "out")
3477 (version-suffix ,(string-append "-" version ".jar"))
3478 (install-without-version-suffix
3481 (string-append target
3482 (basename jar version-suffix)
3486 install-without-version-suffix
3489 (and (string-suffix? ".jar" name)
3490 (not (string-suffix? "-sources.jar" name)))))))
3493 `(("java-qdox-1.12" ,java-qdox-1.12)
3494 ("java-jarjar" ,java-jarjar)))
3495 (home-page "http://hamcrest.org/")
3496 (synopsis "Library of matchers for building test expressions")
3498 "This package provides a library of matcher objects (also known as
3499 constraints or predicates) allowing @code{match} rules to be defined
3500 declaratively, to be used in other frameworks. Typical scenarios include
3501 testing frameworks, mocking libraries and UI validation rules.")
3502 (license license:bsd-2)))
3504 (define-public java-junit
3510 (uri (string-append "https://github.com/junit-team/junit/"
3511 "archive/r" version ".tar.gz"))
3512 (file-name (string-append name "-" version ".tar.gz"))
3515 "090dn5v1vs0b3acyaqc0gjf6p8lmd2h24wfzsbq7sly6b214anws"))
3516 (modules '((guix build utils)))
3519 ;; Delete bundled jar archives.
3520 (delete-file-recursively "lib")
3522 (build-system ant-build-system)
3524 `(#:tests? #f ; no tests
3525 #:jar-name "junit.jar"))
3527 `(("java-hamcrest-core" ,java-hamcrest-core)))
3528 (home-page "http://junit.org/")
3529 (synopsis "Test framework for Java")
3531 "JUnit is a simple framework to write repeatable tests for Java projects.
3532 JUnit provides assertions for testing expected results, test fixtures for
3533 sharing common test data, and test runners for running tests.")
3534 (license license:epl1.0)))
3536 (define-public java-plexus-utils
3538 (name "java-plexus-utils")
3542 (uri (string-append "https://github.com/codehaus-plexus/"
3543 "plexus-utils/archive/plexus-utils-"
3547 "1ihfigar20lvk4pinii7dq05i173xphhw4iyrk6gjfy04m01j2lz"))))
3548 (build-system ant-build-system)
3549 ;; FIXME: The default build.xml does not include a target to install
3552 `(#:jar-name "plexus-utils.jar"
3553 #:source-dir "src/main"
3555 (modify-phases %standard-phases
3556 (add-after 'unpack 'fix-reference-to-/bin-and-/usr
3558 (substitute* "src/main/java/org/codehaus/plexus/util/\
3559 cli/shell/BourneShell.java"
3560 (("/bin/sh") (which "sh"))
3561 (("/usr/") (getcwd)))
3563 (add-after 'unpack 'fix-or-disable-broken-tests
3565 (with-directory-excursion "src/test/java/org/codehaus/plexus/util"
3566 (substitute* '("cli/CommandlineTest.java"
3567 "cli/shell/BourneShellTest.java")
3568 (("/bin/sh") (which "sh"))
3569 (("/bin/echo") (which "echo")))
3571 ;; This test depends on MavenProjectStub, but we don't have
3572 ;; a package for Maven.
3573 (delete-file "introspection/ReflectionValueExtractorTest.java")
3575 ;; FIXME: The command line tests fail, maybe because they use
3577 (delete-file "cli/CommandlineTest.java"))
3580 `(("java-hamcrest-core" ,java-hamcrest-core)
3581 ("java-junit" ,java-junit)))
3582 (home-page "http://codehaus-plexus.github.io/plexus-utils/")
3583 (synopsis "Common utilities for the Plexus framework")
3584 (description "This package provides various Java utility classes for the
3585 Plexus framework to ease working with strings, files, command lines, XML and
3587 (license license:asl2.0)))
3589 (define-public java-plexus-interpolation
3591 (name "java-plexus-interpolation")
3595 (uri (string-append "https://github.com/codehaus-plexus/"
3596 "plexus-interpolation/archive/"
3597 "plexus-interpolation-" version ".tar.gz"))
3600 "03377yzlx5q440m6sxxgv6a5qb8fl30zzcgxgc0hxk5qgl2z1jjn"))))
3601 (build-system ant-build-system)
3603 `(#:jar-name "plexus-interpolation.jar"
3604 #:source-dir "src/main"))
3606 `(("java-junit" ,java-junit)
3607 ("java-hamcrest-core" ,java-hamcrest-core)))
3608 (home-page "http://codehaus-plexus.github.io/plexus-interpolation/")
3609 (synopsis "Java components for interpolating ${} strings and the like")
3610 (description "Plexus interpolator is a modular, flexible interpolation
3611 framework for the expression language style commonly seen in Maven, Plexus,
3612 and other related projects.
3614 It has its foundation in the @code{org.codehaus.plexus.utils.interpolation}
3615 package within @code{plexus-utils}, but has been separated in order to allow
3616 these two libraries to vary independently of one another.")
3617 (license license:asl2.0)))
3619 (define-public java-plexus-classworlds
3621 (name "java-plexus-classworlds")
3625 (uri (string-append "https://github.com/codehaus-plexus/"
3626 "plexus-classworlds/archive/plexus-classworlds-"
3630 "1qm4p0rl8d82lzhsiwnviw11jnq44s0gflg78zq152xyyr2xmh8g"))))
3631 (build-system ant-build-system)
3633 `(#:jar-name "plexus-classworlds.jar"
3634 #:source-dir "src/main"
3635 #:tests? #f));; FIXME: we need to generate some resources as in pom.xml
3637 `(("java-junit" ,java-junit)))
3638 (home-page "http://codehaus-plexus.github.io/plexus-classworlds/")
3639 (synopsis "Java class loader framework")
3640 (description "Plexus classworlds replaces the native @code{ClassLoader}
3641 mechanism of Java. It is especially useful for dynamic loading of application
3643 (license license:asl2.0)))
3645 (define java-plexus-container-default-bootstrap
3647 (name "java-plexus-container-default-bootstrap")
3651 (uri (string-append "https://github.com/codehaus-plexus/plexus-containers"
3652 "/archive/plexus-containers-" version ".tar.gz"))
3655 "0xw5g30qf4a83608rw9v2hv8pfsz7d69dkdhk6r0wia4q78hh1pc"))))
3656 (build-system ant-build-system)
3658 `(#:jar-name "container-default.jar"
3659 #:source-dir "plexus-container-default/src/main/java"
3660 #:test-dir "plexus-container-default/src/test"
3662 #:tests? #f; requires plexus-archiver, which depends on this package
3664 (modify-phases %standard-phases
3665 (add-before 'build 'copy-resources
3668 "plexus-container-default/src/main/resources/"
3672 `(("worldclass" ,java-plexus-classworlds)
3673 ("xbean" ,java-geronimo-xbean-reflect)
3674 ("utils" ,java-plexus-utils)
3675 ("junit" ,java-junit)
3676 ("guava" ,java-guava)))
3677 (home-page "https://github.com/codehaus-plexus/plexus-containers")
3678 (synopsis "Inversion-of-control container")
3679 (description "Plexus-default-container is Plexus' inversion-of-control
3680 (@dfn{IoC}) container. It is composed of its public API and its default
3682 (license license:asl2.0)))
3684 (define-public java-plexus-io
3686 (name "java-plexus-io")
3690 (uri (string-append "https://github.com/codehaus-plexus/plexus-io"
3691 "/archive/plexus-io-" version ".tar.gz"))
3694 "0f2j41kihaymxkpbm55smpxjja235vad8cgz94frfy3ppcp021dw"))))
3695 (build-system ant-build-system)
3697 `(#:jar-name "plexus-io.jar"
3698 #:source-dir "src/main/java"
3699 #:test-dir "src/test"
3702 (modify-phases %standard-phases
3703 (add-before 'build 'copy-resources
3705 (mkdir-p "build/classes/META-INF/plexus")
3706 (copy-file "src/main/resources/META-INF/plexus/components.xml"
3707 "build/classes/META-INF/plexus/components.xml")
3710 `(("utils" ,java-plexus-utils)
3711 ("commons-io" ,java-commons-io)
3712 ("java-jsr305" ,java-jsr305)))
3714 `(("junit" ,java-junit)
3715 ("hamcrest" ,java-hamcrest-core)
3716 ("guava" ,java-guava)
3717 ("classworlds" ,java-plexus-classworlds)
3718 ("xbean" ,java-geronimo-xbean-reflect)
3719 ("container-default" ,java-plexus-container-default-bootstrap)))
3720 (home-page "https://github.com/codehaus-plexus/plexus-io")
3721 (synopsis "I/O plexus components")
3722 (description "Plexus IO is a set of plexus components, which are designed
3723 for use in I/O operations. This implementation using plexus components allows
3724 reusing it in maven.")
3725 (license license:asl2.0)))
3727 (define-public java-plexus-archiver
3729 (name "java-plexus-archiver")
3733 (uri (string-append "https://github.com/codehaus-plexus/plexus-archiver"
3734 "/archive/plexus-archiver-" version ".tar.gz"))
3737 "0ry6i92gli0mvdmfih2vgs0lkf9yvx18h2ajxim66yg6yipnp0hg"))))
3738 (build-system ant-build-system)
3740 `(#:jar-name "plexus-archiver.jar"
3741 #:source-dir "src/main/java"
3743 #:test-dir "src/test"
3744 #:test-exclude (list "**/Abstract*.java" "**/Base*.java")
3746 (modify-phases %standard-phases
3747 (add-before 'check 'remove-failing
3749 ;; Requires an older version of plexus container
3751 "src/test/java/org/codehaus/plexus/archiver/DuplicateFilesTest.java")
3753 (add-before 'check 'fix-test-building
3755 (substitute* "build.xml"
3756 (("srcdir=\"src/test\"") "srcdir=\"src/test/java\""))
3758 (add-before 'build 'copy-resources
3760 (mkdir-p "build/classes/META-INF/plexus")
3761 (copy-file "src/main/resources/META-INF/plexus/components.xml"
3762 "build/classes/META-INF/plexus/components.xml")
3765 `(("utils" ,java-plexus-utils)
3766 ("commons-io" ,java-commons-io)
3767 ("snappy" ,java-iq80-snappy)
3768 ("io" ,java-plexus-io)
3769 ("compress" ,java-commons-compress)
3770 ("container-default" ,java-plexus-container-default-bootstrap)
3771 ("snappy" ,java-snappy)
3772 ("java-jsr305" ,java-jsr305)))
3774 `(("java-hamcrest-core" ,java-hamcrest-core)
3775 ("junit" ,java-junit)
3776 ("classworld" ,java-plexus-classworlds)
3777 ("xbean" ,java-geronimo-xbean-reflect)
3778 ("xz" ,java-tukaani-xz)
3779 ("guava" ,java-guava)))
3780 (home-page "https://github.com/codehaus-plexus/plexus-archiver")
3781 (synopsis "Archiver component of the Plexus project")
3782 (description "Plexus-archiver contains a component to deal with project
3784 (license license:asl2.0)))
3786 (define-public java-plexus-container-default
3788 (inherit java-plexus-container-default-bootstrap)
3789 (name "java-plexus-container-default")
3791 `(#:jar-name "container-default.jar"
3792 #:source-dir "plexus-container-default/src/main/java"
3793 #:test-dir "plexus-container-default/src/test"
3794 #:test-exclude (list ;"**/*Test.java"
3796 ;; Requires plexus-hierarchy
3797 "**/PlexusHierarchyTest.java"
3799 "**/ComponentRealmCompositionTest.java"
3800 "**/PlexusContainerTest.java")
3803 (modify-phases %standard-phases
3804 (add-before 'build 'copy-resources
3807 "plexus-container-default/src/main/resources/"
3810 (add-before 'check 'fix-paths
3812 (let ((dir "plexus-container-default/src/test/java/org/codehaus"))
3815 dir "/plexus/component/composition/"
3816 "ComponentRealmCompositionTest.java")
3817 (("src/test") "plexus-container-default/src/test"))
3820 `(("worldclass" ,java-plexus-classworlds)
3821 ("xbean" ,java-geronimo-xbean-reflect)
3822 ("utils" ,java-plexus-utils)
3823 ("junit" ,java-junit)
3824 ("guava" ,java-guava)))
3826 `(("archiver" ,java-plexus-archiver)
3827 ("hamcrest" ,java-hamcrest-core)))))
3829 (define-public java-plexus-component-annotations
3831 (inherit java-plexus-container-default)
3832 (name "java-plexus-component-annotations")
3834 `(#:jar-name "plexus-component-annotations.jar"
3835 #:source-dir "plexus-component-annotations/src/main/java"
3836 #:tests? #f)); no tests
3839 (synopsis "Plexus descriptors generator")
3840 (description "This package is a Maven plugin to generate Plexus descriptors
3841 from source tags and class annotations.")))
3843 (define-public java-plexus-cipher
3845 (name "java-plexus-cipher")
3849 (uri (string-append "https://github.com/codehaus-plexus/plexus-cipher"
3850 "/archive/plexus-cipher-" version ".tar.gz"))
3853 "1j3r8xzlxlk340snkjp6lk2ilkxlkn8qavsfiq01f43xmvv8ymk3"))))
3854 (build-system ant-build-system)
3856 `(#:jar-name "plexus-cipher.jar"
3857 #:source-dir "src/main/java"
3859 #:tests? #f; FIXME: requires sisu-inject-bean
3861 (modify-phases %standard-phases
3862 (add-before 'build 'copy-resources
3864 (copy-recursively "src/main/resources" "build/classes")
3865 (mkdir-p "build/classes/META-INF/sisu")
3866 (with-output-to-file "build/classes/META-INF/sisu/javax.inject.Named"
3868 (display "org.sonatype.plexus.components.cipher.DefaultPlexusCipher\n")))
3871 `(("java-cdi-api" ,java-cdi-api)
3872 ("java-javax-inject" ,java-javax-inject)))
3873 (home-page "https://github.com/sonatype/plexus-cipher")
3874 (synopsis "Encryption/decryption Component")
3875 (description "Plexus-cipher contains a component to deal with encryption
3877 (license license:asl2.0)))
3879 (define-public java-plexus-compiler-api
3881 (name "java-plexus-compiler-api")
3885 (uri (string-append "https://github.com/codehaus-plexus/plexus-compiler"
3886 "/archive/plexus-compiler-" version ".tar.gz"))
3889 "09vmxs0807wsd26nbrwwj5l8ycmzazqycj52l7w6wjvkryywi69h"))))
3890 (build-system ant-build-system)
3892 `(#:jar-name "plexus-compiler-api.jar"
3893 #:source-dir "plexus-compiler-api/src/main/java"
3895 #:test-dir "plexus-compiler-api/src/test"))
3897 `(("java-plexus-container-default" ,java-plexus-container-default)
3898 ("java-plexus-util" ,java-plexus-utils)))
3900 `(("java-junit" ,java-junit)))
3901 (home-page "https://github.com/codehaus-plexus/plexus-compiler")
3902 (synopsis "Plexus Compilers component's API to manipulate compilers")
3903 (description "This package contains the API used by components to manipulate
3905 (license (list license:asl2.0
3908 (define-public java-plexus-compiler-javac
3910 (inherit java-plexus-compiler-api)
3911 (name "java-plexus-compiler-javac")
3913 `(#:jar-name "plexus-compiler-javac.jar"
3914 #:source-dir "plexus-compilers/plexus-compiler-javac/src/main/java"
3916 #:tests? #f; depends on compiler-test -> maven-core -> ... -> this package.
3917 #:test-dir "plexus-compilers/plexus-compiler-javac/src/test"))
3919 `(("java-plexus-compiler-api" ,java-plexus-compiler-api)
3920 ("java-plexus-utils" ,java-plexus-utils)
3921 ("java-plexus-container-default" ,java-plexus-container-default)))
3923 `(("java-junit" ,java-junit)))
3924 (synopsis "Javac Compiler support for Plexus Compiler component")
3925 (description "This package contains the Javac Compiler support for Plexus
3926 Compiler component.")))
3928 (define-public java-plexus-sec-dispatcher
3930 (name "java-plexus-sec-dispatcher")
3931 (version "1.4") ;; Newest release listed at the Maven Central Repository.
3933 ;; This project doesn't tag releases or publish tarballs, so we take
3934 ;; the "prepare release plexus-sec-dispatcher-1.4" git commit.
3936 (uri (string-append "https://github.com/sonatype/plexus-sec-dispatcher/"
3937 "archive/7db8f88048.tar.gz"))
3940 "1smfrk4n7xbrsxpxcp2j4i0j8q86j73w0w6xg7qz83dp6dagdjgp"))
3941 (file-name (string-append name "-" version ".tar.gz"))))
3943 `(#:jar-name "plexus-sec-dispatcher.jar"
3944 #:source-dir "src/main/java"
3947 (modify-phases %standard-phases
3948 (add-before 'build 'generate-models
3949 (lambda* (#:key inputs #:allow-other-keys)
3950 (define (modello-single-mode file version mode)
3952 "org.codehaus.modello.ModelloCli"
3953 file mode "src/main/java" version
3955 (let ((file "src/main/mdo/settings-security.mdo"))
3956 (modello-single-mode file "1.0.0" "java")
3957 (modello-single-mode file "1.0.0" "xpp3-reader")
3958 (modello-single-mode file "1.0.0" "xpp3-writer"))
3960 (add-before 'build 'generate-components.xml
3962 (mkdir-p "build/classes/META-INF/plexus")
3963 (with-output-to-file "build/classes/META-INF/plexus/components.xml"
3969 <role>org.sonatype.plexus.components.sec.dispatcher.SecDispatcher</role>\n
3970 <role-hint>default</role-hint>\n
3971 <implementation>org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher</implementation>\n
3972 <description></description>\n
3975 <role>org.sonatype.plexus.components.cipher.PlexusCipher</role>\n
3976 <field-name>_cipher</field-name>\n
3979 <role>org.sonatype.plexus.components.sec.dispatcher.PasswordDecryptor</role>\n
3980 <field-name>_decryptors</field-name>\n
3984 <_configuration-file>~/.settings-security.xml</_configuration-file>\n
3988 </component-set>\n")))
3990 (add-before 'check 'fix-paths
3992 (copy-recursively "src/test/resources" "target")
3995 `(("java-plexus-cipher" ,java-plexus-cipher)))
3997 `(("java-modello-core" ,java-modello-core)
3999 ("java-plexus-container-default" ,java-plexus-container-default)
4000 ("java-plexus-classworlds" ,java-plexus-classworlds)
4001 ("java-plexus-utils" ,java-plexus-utils)
4002 ("java-guava" ,java-guava)
4003 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
4004 ("java-sisu-build-api" ,java-sisu-build-api)
4006 ("java-modellop-plugins-java" ,java-modello-plugins-java)
4007 ("java-modellop-plugins-xml" ,java-modello-plugins-xml)
4008 ("java-modellop-plugins-xpp3" ,java-modello-plugins-xpp3)
4010 ("java-junit" ,java-junit)))
4011 (build-system ant-build-system)
4012 (home-page "https://github.com/sonatype/plexus-sec-dispatcher")
4013 (synopsis "Plexus Security Dispatcher Component")
4014 (description "This package is the Plexus Security Dispatcher Component.
4015 This component decrypts a string passed to it.")
4016 (license license:asl2.0)))
4018 (define-public java-plexus-cli
4020 (name "java-plexus-cli")
4025 (url "https://github.com/sonatype/plexus-cli")
4026 (commit "a776afa6bca84e5107bedb69440329cdb24ed645")))
4027 (file-name (string-append name "-" version))
4030 "0xjrlay605rypv3zd7y24vlwf0039bil3n2cqw54r1ddpysq46vx"))))
4031 (build-system ant-build-system)
4033 `(#:jar-name "plexus-cli.jar"
4034 #:source-dir "src/main/java"
4036 #:test-dir "src/test"))
4038 `(("java-commons-cli" ,java-commons-cli)
4039 ("java-plexus-container-default" ,java-plexus-container-default)
4040 ("java-plexus-classworlds" ,java-plexus-classworlds)))
4042 `(("java-plexus-utils" ,java-plexus-utils)
4043 ("java-junit" ,java-junit)
4044 ("java-guava" ,java-guava)))
4045 (home-page "https://codehaus-plexus.github.io/plexus-cli")
4046 (synopsis "CLI building library for plexus")
4047 (description "This package is a library to help creating CLI around
4048 Plexus components.")
4049 (license license:asl2.0)))
4051 (define-public java-sisu-build-api
4053 (name "java-sisu-build-api")
4057 (uri (string-append "https://github.com/sonatype/sisu-build-api/"
4058 "archive/plexus-build-api-" version ".tar.gz"))
4061 "1c3rrpma3x634xp2rm2p5iskfhzdyc7qfbhjzr70agrl1jwghgy2"))))
4062 (build-system ant-build-system)
4064 `(#:jar-name "sisu-build-api.jar"
4065 #:source-dir "src/main/java"
4067 #:tests? #f; FIXME: how to run the tests?
4069 (modify-phases %standard-phases
4070 (add-before 'build 'copy-resources
4072 (copy-recursively "src/main/resources" "build/classes")
4073 (substitute* (find-files "build/classes")
4074 (("\\$\\{project.version\\}") ,version))
4076 (add-before 'build 'generate-plexus-compontent
4078 (mkdir-p "build/classes/META-INF/plexus")
4079 ;; This file is required for plexus to inject this package.
4080 ;; FIXME: how is it generated?
4081 (with-output-to-file "build/classes/META-INF/plexus/components.xml"
4087 <role>org.sonatype.plexus.build.incremental.BuildContext</role>\n
4088 <role-hint>default</role-hint>\n
4089 <implementation>org.sonatype.plexus.build.incremental.DefaultBuildContext</implementation>\n
4090 <description>Filesystem based non-incremental build context implementation\n
4091 which behaves as if all files were just created.</description>\n
4094 </component-set>\n")))
4097 `(("java-plexus-utils" ,java-plexus-utils)
4098 ("java-plexus-container-default" ,java-plexus-container-default)))
4099 (home-page "https://github.com/sonatype/sisu-build-api/")
4100 (synopsis "Base build API for maven")
4101 (description "This package contains the base build API for maven and
4102 a default implementation of it. This API is about scanning files in a
4103 project and determining what files need to be rebuilt.")
4104 (license license:asl2.0)))
4106 (define-public java-modello-core
4108 (name "java-modello-core")
4112 (uri (string-append "https://github.com/codehaus-plexus/modello"
4113 "/archive/modello-" version ".tar.gz"))
4116 "0l2pvns8pmlrmjm3iknp7gpg3654y1m8qhy55b19sdwdchdcyxfh"))))
4117 (build-system ant-build-system)
4119 `(#:jar-name "modello-core.jar"
4120 #:source-dir "modello-core/src/main/java"
4121 #:test-dir "modello-core/src/test"
4122 #:main-class "org.codehaus.modello.ModelloCli"
4125 (modify-phases %standard-phases
4126 (add-before 'build 'copy-resources
4128 (mkdir-p "build/classes/META-INF/plexus")
4129 (copy-file "modello-core/src/main/resources/META-INF/plexus/components.xml"
4130 "build/classes/META-INF/plexus/components.xml")
4132 (add-before 'check 'fix-tests
4134 (with-directory-excursion "modello-core/src/test/java/org/codehaus"
4135 (substitute* '("modello/core/DefaultModelloCoreTest.java"
4136 "modello/core/io/ModelReaderTest.java")
4137 (("src/test") "modello-core/src/test")))
4140 `(("java-plexus-utils" ,java-plexus-utils)
4141 ("java-plexus-container-default" ,java-plexus-container-default)
4142 ("java-sisu-build-api" ,java-sisu-build-api)))
4144 `(("java-junit" ,java-junit)
4145 ("java-plexus-classworlds" ,java-plexus-classworlds)
4146 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
4147 ("java-guava" ,java-guava)))
4148 (home-page "http://codehaus-plexus.github.io/modello/")
4149 (synopsis "Framework for code generation from a simple model")
4150 (description "Modello is a framework for code generation from a simple model.
4152 Modello generates code from a simple model format: based on a plugin
4153 architecture, various types of code and descriptors can be generated from the
4154 single model, including Java POJOs, XML/JSON/YAML marshallers/unmarshallers,
4155 XSD and documentation.")
4158 ;; Although this package uses only files licensed under expat,
4159 ;; other parts of the source are licensed under different
4160 ;; licenses. We include them to be inherited by other packages.
4162 ;; Some files in modello-plugin-java are licensed under a
4163 ;; 5-clause BSD license.
4164 (license:non-copyleft
4165 (string-append "file:///modello-plugins/modello-plugin-java/"
4166 "src/main/java/org/codehaus/modello/plugin/"
4167 "java/javasource/JNaming.java"))))))
4169 (define-public java-modello-plugins-java
4171 (inherit java-modello-core)
4172 (name "java-modello-plugins-java")
4174 `(#:jar-name "modello-plugins-java.jar"
4175 #:source-dir "modello-plugins/modello-plugin-java/src/main/java"
4176 #:test-dir "modello-plugins/modello-plugin-java/src/test"
4178 #:tests? #f; requires maven-model, which depends on this package
4180 (modify-phases %standard-phases
4181 (add-before 'build 'copy-resources
4183 (mkdir-p "build/classes")
4184 (copy-recursively "modello-plugins/modello-plugin-java/src/main/resources"
4188 `(("java-modello-core" ,java-modello-core)
4189 ,@(package-inputs java-modello-core)))
4190 (synopsis "Modello Java Plugin")
4191 (description "Modello Java Plugin generates Java objects for the model.")))
4193 (define-public java-modello-plugins-xml
4195 (inherit java-modello-core)
4196 (name "java-modello-plugins-xml")
4198 `(#:jar-name "modello-plugins-xml.jar"
4199 #:source-dir "modello-plugins/modello-plugin-xml/src/main/java"
4200 #:test-dir "modello-plugins/modello-plugin-xml/src/test"
4203 (modify-phases %standard-phases
4204 (add-before 'build 'copy-resources
4206 (mkdir-p "build/classes")
4208 "modello-plugins/modello-plugin-xml/src/main/resources"
4211 (add-before 'check 'fix-paths
4213 (with-directory-excursion "modello-plugins/modello-plugin-xml/src/test"
4215 "java/org/codehaus/modello/plugins/xml/XmlModelloPluginTest.java"
4216 (("src/test") "modello-plugins/modello-plugin-xml/src/test")))
4219 `(("java-modello-core" ,java-modello-core)
4220 ("java-modello-plugins-java" ,java-modello-plugins-java)
4221 ,@(package-inputs java-modello-core)))
4222 (synopsis "Modello XML Plugin")
4223 (description "Modello XML Plugin contains shared code for every plugins
4224 working on XML representation of the model.")))
4226 (define-public java-modello-test
4228 (inherit java-modello-core)
4229 (name "java-modello-test")
4231 `(#:jar-name "modello-test.jar"
4232 #:source-dir "modello-test/src/main/java"
4233 #:tests? #f; no tests
4236 `(("java-plexus-utils" ,java-plexus-utils)
4237 ("java-plexus-compiler-api" ,java-plexus-compiler-api)
4238 ("java-plexus-compiler-javac" ,java-plexus-compiler-javac)
4239 ("java-plexus-container-default" ,java-plexus-container-default)))
4240 (synopsis "Modello test package")
4241 (description "The modello test package contains the basis to create
4242 Modello generator unit-tests, including sample models and xml files to test
4243 every feature for every plugin.")))
4245 (define-public java-modello-plugins-xpp3
4247 (inherit java-modello-core)
4248 (name "java-modello-plugins-xpp3")
4250 `(#:jar-name "modello-plugins-xpp3.jar"
4251 #:source-dir "modello-plugins/modello-plugin-xpp3/src/main/java"
4252 #:test-dir "modello-plugins/modello-plugin-xpp3/src/test"
4253 ;; One of the test dependencies is maven-model which depends on this package.
4257 (modify-phases %standard-phases
4258 (add-before 'build 'copy-resources
4260 (mkdir-p "build/classes")
4261 (copy-recursively "modello-plugins/modello-plugin-xpp3/src/main/resources"
4265 `(("java-modello-core" ,java-modello-core)
4266 ("java-modello-plugins-java" ,java-modello-plugins-java)
4267 ("java-modello-plugins-xml" ,java-modello-plugins-xml)
4268 ,@(package-inputs java-modello-core)))
4270 `(("java-xmlunit" ,java-xmlunit)
4271 ("java-modello-test" ,java-modello-test)
4272 ,@(package-native-inputs java-modello-core)))
4273 (synopsis "Modello XPP3 Plugin")
4274 (description "The modello XPP3 plugin generates XML readers and writers based
4275 on the XPP3 API (XML Pull Parser).")))
4277 (define-public java-asm
4283 (uri (string-append "http://download.forge.ow2.org/asm/"
4284 "asm-" version ".tar.gz"))
4287 "115l5pqblirdkmzi32dxx7gbcm4jy0s14y5wircr6h8jdr9aix00"))))
4288 (build-system ant-build-system)
4290 `(("java-aqute-bndlib" ,java-aqute-bndlib)
4291 ("java-aqute-libg" ,java-aqute-libg)))
4293 `(#:build-target "compile"
4294 ;; The tests require an old version of Janino, which no longer compiles
4299 ;; We don't need these extra ant tasks, but the build system asks us to
4300 ;; provide a path anyway.
4301 "-Dobjectweb.ant.tasks.path=dummy-path"
4302 ;; The java-aqute.bndlib JAR file will be put onto the classpath and
4303 ;; used during the build automatically by ant-build-system, but
4304 ;; java-asm's build.xml fails unless we provide something here.
4305 "-Dbiz.aQute.bnd.path=dummy-path")
4307 (modify-phases %standard-phases
4308 (add-before 'install 'build-jars
4309 (lambda* (#:key make-flags #:allow-other-keys)
4310 ;; We cannot use the "jar" target because it depends on a couple
4311 ;; of unpackaged, complicated tools.
4314 "-cf" (string-append "dist/asm-" ,version ".jar")
4315 "-C" "output/build/tmp" ".")))
4317 (install-jars "dist")))))
4319 `(("java-junit" ,java-junit)))
4320 (home-page "http://asm.ow2.org/")
4321 (synopsis "Very small and fast Java bytecode manipulation framework")
4322 (description "ASM is an all purpose Java bytecode manipulation and
4323 analysis framework. It can be used to modify existing classes or dynamically
4324 generate classes, directly in binary form. The provided common
4325 transformations and analysis algorithms allow to easily assemble custom
4326 complex transformations and code analysis tools.")
4327 (license license:bsd-3)))
4329 (define java-asm-bootstrap
4332 (name "java-asm-bootstrap")
4334 (substitute-keyword-arguments (package-arguments java-asm)
4338 `(("java-aqute-bndlib" ,java-aqute-bndlib-bootstrap)
4339 ("java-aqute-libg" ,java-aqute-libg-bootstrap)
4340 ,@(delete `("java-aqute-bndlib" ,java-aqute-bndlib)
4341 (delete `("java-aqute-libg" ,java-aqute-libg)
4342 (package-inputs java-asm)))))))
4344 (define-public java-cglib
4352 (url "https://github.com/cglib/cglib.git")
4353 (commit (string-append
4355 (string-map (lambda (c) (if (char=? c #\.) #\_ c))
4357 (file-name (git-file-name name version))
4359 (base32 "186451jms2zfp47yd8kxd77az2cqal1my2br7klgyp8fpl4qfg8v"))))
4360 (build-system ant-build-system)
4362 `(;; FIXME: tests fail because junit runs
4363 ;; "net.sf.cglib.transform.AbstractTransformTest", which does not seem
4364 ;; to describe a test at all.
4366 #:jar-name "cglib.jar"
4368 (modify-phases %standard-phases
4369 (add-after 'unpack 'chdir
4370 (lambda _ (chdir "cglib") #t)))))
4372 `(("java-asm" ,java-asm)
4373 ("java-junit" ,java-junit)))
4374 (home-page "https://github.com/cglib/cglib/")
4375 (synopsis "Java byte code generation library")
4376 (description "The byte code generation library CGLIB is a high level API
4377 to generate and transform Java byte code.")
4378 (license license:asl2.0)))
4380 (define-public java-objenesis
4382 (name "java-objenesis")
4386 (uri (string-append "https://github.com/easymock/objenesis/"
4387 "archive/" version ".tar.gz"))
4388 (file-name (string-append "objenesis-" version ".tar.gz"))
4391 "1va5qz1i2wawwavhnxfzxnfgrcaflz9p1pg03irrjh4nd3rz8wh6"))))
4392 (build-system ant-build-system)
4394 `(#:jar-name "objenesis.jar"
4395 #:source-dir "main/src/"
4396 #:test-dir "main/src/test/"))
4398 `(("java-junit" ,java-junit)
4399 ("java-hamcrest-core" ,java-hamcrest-core)))
4400 (home-page "http://objenesis.org/")
4401 (synopsis "Bypass the constructor when creating an object")
4402 (description "Objenesis is a small Java library that serves one purpose:
4403 to instantiate a new object of a particular class. It is common to see
4404 restrictions in libraries stating that classes must require a default
4405 constructor. Objenesis aims to overcome these restrictions by bypassing the
4406 constructor on object instantiation.")
4407 (license license:asl2.0)))
4409 (define-public java-easymock
4411 (name "java-easymock")
4415 (uri (string-append "https://github.com/easymock/easymock/"
4416 "archive/easymock-" version ".tar.gz"))
4419 "1yzg0kv256ndr57gpav46cyv4a1ns5sj722l50zpxk3j6sk9hnmi"))))
4420 (build-system ant-build-system)
4422 `(#:jar-name "easymock.jar"
4423 #:source-dir "core/src/main"
4424 #:test-dir "core/src/test"
4426 (modify-phases %standard-phases
4427 ;; FIXME: Android support requires the following packages to be
4428 ;; available: com.google.dexmaker.stock.ProxyBuilder
4429 (add-after 'unpack 'delete-android-support
4431 (with-directory-excursion "core/src/main/java/org/easymock/internal"
4432 (substitute* "MocksControl.java"
4433 (("AndroidSupport.isAndroid\\(\\)") "false")
4434 (("return classProxyFactory = new AndroidClassProxyFactory\\(\\);") ""))
4435 (delete-file "AndroidClassProxyFactory.java"))
4437 (add-after 'unpack 'delete-broken-tests
4439 (with-directory-excursion "core/src/test/java/org/easymock"
4440 ;; This test depends on dexmaker.
4441 (delete-file "tests2/ClassExtensionHelperTest.java")
4443 ;; This is not a test.
4444 (delete-file "tests/BaseEasyMockRunnerTest.java")
4446 ;; This test should be executed with a different runner...
4447 (delete-file "tests2/EasyMockAnnotationsTest.java")
4448 ;; ...but deleting it means that we also have to delete these
4450 (delete-file "tests2/EasyMockRunnerTest.java")
4451 (delete-file "tests2/EasyMockRuleTest.java")
4453 ;; This test fails because the file "easymock.properties" does
4455 (delete-file "tests2/EasyMockPropertiesTest.java"))
4458 `(("java-asm" ,java-asm)
4459 ("java-cglib" ,java-cglib)
4460 ("java-objenesis" ,java-objenesis)))
4462 `(("java-junit" ,java-junit)
4463 ("java-hamcrest-core" ,java-hamcrest-core)))
4464 (home-page "http://easymock.org")
4465 (synopsis "Java library providing mock objects for unit tests")
4466 (description "EasyMock is a Java library that provides an easy way to use
4467 mock objects in unit testing.")
4468 (license license:asl2.0)))
4470 (define-public java-jmock-1
4476 (uri (string-append "https://github.com/jmock-developers/"
4477 "jmock-library/archive/" version ".tar.gz"))
4478 (file-name (string-append "jmock-" version ".tar.gz"))
4481 "0xmrlhq0fszldkbv281k9463mv496143vvmqwpxp62yzjvdkx9w0"))))
4482 (build-system ant-build-system)
4484 `(#:build-target "jars"
4485 #:test-target "run.tests"
4487 (modify-phases %standard-phases
4488 (replace 'install (install-jars "build")))))
4489 (home-page "http://www.jmock.org")
4490 (synopsis "Mock object library for test-driven development")
4491 (description "JMock is a library that supports test-driven development of
4492 Java code with mock objects. Mock objects help you design and test the
4493 interactions between the objects in your programs.
4498 @item makes it quick and easy to define mock objects
4499 @item lets you precisely specify the interactions between
4500 your objects, reducing the brittleness of your tests
4501 @item plugs into your favourite test framework
4502 @item is easy to extend.
4504 (license license:bsd-3)))
4506 (define-public java-jmock
4508 (inherit java-jmock-1)
4513 (uri (string-append "https://github.com/jmock-developers/"
4514 "jmock-library/archive/" version ".tar.gz"))
4515 (file-name (string-append name "-" version ".tar.gz"))
4518 "18650a9g8xffcsdb6w91pbswa7f40fp2sh6s3nclkclz5dbzq8f0"))))
4520 `(("java-hamcrest-all" ,java-hamcrest-all)
4521 ("java-asm" ,java-asm)
4522 ("java-bsh" ,java-bsh)
4523 ("java-junit" ,java-junit)))
4525 `(("cglib" ,java-cglib)))
4527 `(#:jar-name "java-jmock.jar"
4528 #:source-dir "jmock/src/main/java"
4529 #:test-dir "jmock/src/test"))))
4531 (define-public java-jmock-junit4
4533 (inherit java-jmock)
4534 (name "java-jmock-junit4")
4536 `(#:jar-name "java-jmock-junit4.jar"
4537 #:source-dir "jmock-junit4/src/main/java"
4538 #:test-dir "jmock-junit4/src/test"))
4540 `(("java-hamcrest-all" ,java-hamcrest-all)
4541 ("java-asm" ,java-asm)
4542 ("java-bsh" ,java-bsh)
4543 ("java-jmock" ,java-jmock)
4544 ("java-jumit" ,java-junit)))))
4546 (define-public java-jmock-legacy
4548 (inherit java-jmock)
4549 (name "java-jmock-legacy")
4551 `(#:jar-name "java-jmock-legacy.jar"
4552 #:source-dir "jmock-legacy/src/main/java"
4553 #:test-dir "jmock-legacy/src/test"
4555 (modify-phases %standard-phases
4556 (add-before 'check 'copy-tests
4558 ;; This file is a dependancy of some tests
4559 (let ((file "org/jmock/test/acceptance/PackageProtectedType.java"))
4560 (copy-file (string-append "jmock/src/test/java/" file)
4561 (string-append "jmock-legacy/src/test/java/" file))
4564 `(("java-hamcrest-all" ,java-hamcrest-all)
4565 ("java-objenesis" ,java-objenesis)
4566 ("java-cglib" ,java-cglib)
4567 ("java-jmock" ,java-jmock)
4568 ("java-asm" ,java-asm)
4569 ("java-bsh" ,java-bsh)
4570 ("java-junit" ,java-junit)))
4572 `(("java-jmock-junit4" ,java-jmock-junit4)))))
4574 (define-public java-hamcrest-all
4575 (package (inherit java-hamcrest-core)
4576 (name "java-hamcrest-all")
4579 ,@(substitute-keyword-arguments (package-arguments java-hamcrest-core)
4580 ((#:build-target _) "bigjar")
4582 `(modify-phases ,phases
4583 ;; Some build targets override the classpath, so we need to patch
4584 ;; the build.xml to ensure that required dependencies are on the
4586 (add-after 'unpack 'patch-classpath-for-integration
4587 (lambda* (#:key inputs #:allow-other-keys)
4588 (substitute* "build.xml"
4589 ((" build/hamcrest-library-\\$\\{version\\}.jar" line)
4593 (find-files (assoc-ref inputs "java-junit") "\\.jar$")
4594 (find-files (assoc-ref inputs "java-jmock") "\\.jar$")
4595 (find-files (assoc-ref inputs "java-easymock") "\\.jar$")))
4597 (("build/hamcrest-core-\\$\\{version\\}\\.jar")
4598 (string-append (assoc-ref inputs "java-hamcrest-core")
4599 "/share/java/hamcrest-core.jar")))
4602 `(("java-junit" ,java-junit)
4603 ("java-jmock" ,java-jmock-1)
4604 ;; This is necessary because of what seems to be a race condition.
4605 ;; This package would sometimes fail to build because hamcrest-core.jar
4606 ;; could not be found, even though it is built as part of this package.
4607 ;; Adding java-hamcrest-core appears to fix this problem. See
4608 ;; https://debbugs.gnu.org/31390 for more information.
4609 ("java-hamcrest-core" ,java-hamcrest-core)
4610 ("java-easymock" ,java-easymock)
4611 ,@(package-inputs java-hamcrest-core)))))
4613 (define-public java-jopt-simple
4615 (name "java-jopt-simple")
4619 (uri (string-append "http://repo1.maven.org/maven2/"
4620 "net/sf/jopt-simple/jopt-simple/"
4621 version "/jopt-simple-"
4622 version "-sources.jar"))
4625 "1v8bzmwmw6qq20gm42xyay6vrd567dra4vqwhgjnqqjz1gs9f8qa"))))
4626 (build-system ant-build-system)
4628 `(#:tests? #f ; there are no tests
4629 #:jar-name "jopt-simple.jar"))
4630 (home-page "https://pholser.github.io/jopt-simple/")
4631 (synopsis "Java library for parsing command line options")
4632 (description "JOpt Simple is a Java library for parsing command line
4633 options, such as those you might pass to an invocation of @code{javac}. In
4634 the interest of striving for simplicity, as closely as possible JOpt Simple
4635 attempts to honor the command line option syntaxes of POSIX @code{getopt} and
4636 GNU @code{getopt_long}. It also aims to make option parser configuration and
4637 retrieval of options and their arguments simple and expressive, without being
4639 (license license:expat)))
4641 (define-public java-commons-math3
4643 (name "java-commons-math3")
4647 (uri (string-append "mirror://apache/commons/math/source/"
4648 "commons-math3-" version "-src.tar.gz"))
4651 "19l6yp44qc5g7wg816nbn5z3zq3xxzwimvbm4a8pczgvpi4i85s6"))))
4652 (build-system ant-build-system)
4654 `(#:build-target "jar"
4655 #:test-target "test"
4657 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
4658 (junit (assoc-ref %build-inputs "java-junit")))
4659 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
4660 (string-append "-Dhamcrest.jar=" hamcrest
4661 "/share/java/hamcrest-core.jar")))
4663 (modify-phases %standard-phases
4664 ;; We want to build the jar in the build phase and run the tests
4665 ;; later in a separate phase.
4666 (add-after 'unpack 'untangle-targets
4668 (substitute* "build.xml"
4669 (("name=\"jar\" depends=\"test\"")
4670 "name=\"jar\" depends=\"compile\""))
4672 ;; There is no install target.
4674 (install-jars "target")))))
4676 `(("java-junit" ,java-junit)
4677 ("java-hamcrest-core" ,java-hamcrest-core)))
4678 (home-page "http://commons.apache.org/math/")
4679 (synopsis "Apache Commons mathematics library")
4680 (description "Commons Math is a library of lightweight, self-contained
4681 mathematics and statistics components addressing the most common problems not
4682 available in the Java programming language or Commons Lang.")
4683 (license license:asl2.0)))
4685 (define-public java-jmh
4692 (url "http://hg.openjdk.java.net/code-tools/jmh/")
4693 (changeset version)))
4694 (file-name (string-append name "-" version "-checkout"))
4697 "1fxyxhg9famwcg1prc4cgwb5wzyxqavn3cjm5vz8605xz7x5k084"))))
4698 (build-system ant-build-system)
4700 `(#:jar-name "jmh-core.jar"
4701 #:source-dir "jmh-core/src/main"
4702 #:test-dir "jmh-core/src/test"
4704 (modify-phases %standard-phases
4705 ;; This seems to be a bug in the JDK. It may not be necessary in
4706 ;; future versions of the JDK.
4707 (add-after 'unpack 'fix-bug
4709 (with-directory-excursion
4710 "jmh-core/src/main/java/org/openjdk/jmh/runner/options"
4711 (substitute* '("IntegerValueConverter.java"
4712 "ThreadsValueConverter.java")
4713 (("public Class<Integer> valueType")
4714 "public Class<? extends Integer> valueType")))
4717 `(("java-jopt-simple" ,java-jopt-simple)
4718 ("java-commons-math3" ,java-commons-math3)))
4720 `(("java-junit" ,java-junit)
4721 ("java-hamcrest-core" ,java-hamcrest-core)))
4722 (home-page "http://openjdk.java.net/projects/code-tools/jmh/")
4723 (synopsis "Benchmark harness for the JVM")
4724 (description "JMH is a Java harness for building, running, and analysing
4725 nano/micro/milli/macro benchmarks written in Java and other languages
4726 targeting the JVM.")
4728 (license license:gpl2)))
4730 (define-public java-commons-collections4
4732 (name "java-commons-collections4")
4736 (uri (string-append "mirror://apache/commons/collections/source/"
4737 "commons-collections4-" version "-src.tar.gz"))
4740 "1krfhvggympq4avk7gh6qafzf6b9ip6r1m4lmacikyx04039m0wl"))))
4741 (build-system ant-build-system)
4743 `(#:test-target "test"
4745 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
4746 (junit (assoc-ref %build-inputs "java-junit"))
4747 (easymock (assoc-ref %build-inputs "java-easymock")))
4748 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
4749 (string-append "-Dhamcrest.jar=" hamcrest
4750 "/share/java/hamcrest-core.jar")
4751 (string-append "-Deasymock.jar=" easymock
4752 "/share/java/easymock.jar")))
4754 (modify-phases %standard-phases
4756 (install-jars "target")))))
4758 `(("java-junit" ,java-junit)
4759 ("java-hamcrest-core" ,java-hamcrest-core)
4760 ("java-easymock" ,java-easymock)))
4761 (home-page "http://commons.apache.org/collections/")
4762 (synopsis "Collections framework")
4763 (description "The Java Collections Framework is the recognised standard
4764 for collection handling in Java. Commons-Collections seek to build upon the
4765 JDK classes by providing new interfaces, implementations and utilities. There
4766 are many features, including:
4769 @item @code{Bag} interface for collections that have a number of copies of
4771 @item @code{BidiMap} interface for maps that can be looked up from value to
4772 key as well and key to value
4773 @item @code{MapIterator} interface to provide simple and quick iteration over
4775 @item Transforming decorators that alter each object as it is added to the
4777 @item Composite collections that make multiple collections look like one
4778 @item Ordered maps and sets that retain the order elements are added in,
4779 including an LRU based map
4780 @item Reference map that allows keys and/or values to be garbage collected
4782 @item Many comparator implementations
4783 @item Many iterator implementations
4784 @item Adapter classes from array and enumerations to collections
4785 @item Utilities to test or create typical set-theory properties of collections
4786 such as union, intersection, and closure.
4788 (license license:asl2.0)))
4790 (define-public java-commons-collections
4792 (inherit java-commons-collections4)
4793 (name "java-commons-collections")
4797 (uri (string-append "mirror://apache/commons/collections/source/"
4798 "commons-collections-" version "-src.tar.gz"))
4801 "055r51a5lfc3z7rkxnxmnn1npvkvda7636hjpm4qk7cnfzz98387"))
4803 (search-patches "java-commons-collections-fix-java8.patch"))))
4805 (substitute-keyword-arguments (package-arguments java-commons-collections4)
4807 `(modify-phases ,phases
4808 ;; The manifest is required by the build procedure
4809 (add-before 'build 'add-manifest
4811 (mkdir-p "build/conf")
4812 (call-with-output-file "build/conf/MANIFEST.MF"
4814 (format file "Manifest-Version: 1.0\n")))
4817 (install-jars "build"))))))))
4819 (define java-commons-collections-test-classes
4821 (inherit java-commons-collections)
4823 `(#:jar-name "commons-collections-test-classes.jar"
4824 #:source-dir "src/test"
4827 `(("collection" ,java-commons-collections)))))
4829 (define-public java-commons-beanutils
4831 (name "java-commons-beanutils")
4835 (uri (string-append "mirror://apache/commons/beanutils/source/"
4836 "commons-beanutils-" version "-src.tar.gz"))
4839 "03cs0bq3sl1sdc7py9g3qnf8n9h473nrkvd3d251kaqv6a2ab7qk"))))
4840 (build-system ant-build-system)
4842 `(#:test-target "test"
4845 (modify-phases %standard-phases
4847 (lambda* (#:key outputs #:allow-other-keys)
4848 (rename-file (string-append "dist/commons-beanutils-" ,version
4850 "commons-beanutils.jar")
4851 (install-file "commons-beanutils.jar"
4852 (string-append (assoc-ref outputs "out") "/share/java/"))
4855 `(("logging" ,java-commons-logging-minimal)
4856 ("collections" ,java-commons-collections)))
4858 `(("junit" ,java-junit)
4859 ("collections-test" ,java-commons-collections-test-classes)))
4860 (home-page "http://commons.apache.org/beanutils/")
4861 (synopsis "Dynamically set or get properties in Java")
4862 (description "BeanUtils provides a simplified interface to reflection and
4863 introspection to set or get dynamically determined properties through their
4864 setter and getter method.")
4865 (license license:asl2.0)))
4867 (define-public java-commons-io
4869 (name "java-commons-io")
4874 (uri (string-append "mirror://apache/commons/io/source/"
4875 "commons-io-" version "-src.tar.gz"))
4878 "0q5y41jrcjvx9hzs47x5kdhnasdy6rm4bzqd2jxl02w717m7a7v3"))))
4879 (build-system ant-build-system)
4880 (outputs '("out" "doc"))
4882 `(#:test-target "test"
4884 (list (string-append "-Djunit.jar="
4885 (assoc-ref %build-inputs "java-junit")
4886 "/share/java/junit.jar"))
4888 (modify-phases %standard-phases
4889 (add-after 'build 'build-javadoc ant-build-javadoc)
4890 (replace 'install (install-jars "target"))
4891 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
4893 `(("java-junit" ,java-junit)
4894 ("java-hamcrest-core" ,java-hamcrest-core)))
4895 (home-page "http://commons.apache.org/io/")
4896 (synopsis "Common useful IO related classes")
4897 (description "Commons-IO contains utility classes, stream implementations,
4898 file filters and endian classes.")
4899 (license license:asl2.0)))
4901 (define-public java-commons-exec-1.1
4903 (name "java-commons-exec")
4908 (uri (string-append "mirror://apache/commons/exec/source/"
4909 "commons-exec-" version "-src.tar.gz"))
4912 "025dk8xgj10lxwwwqp0hng2rn7fr4vcirxzydqzx9k4dim667alk"))))
4913 (build-system ant-build-system)
4915 `(#:test-target "test"
4917 (list (string-append "-Dmaven.junit.jar="
4918 (assoc-ref %build-inputs "java-junit")
4919 "/share/java/junit.jar"))
4921 (modify-phases %standard-phases
4922 (add-before 'build 'delete-network-tests
4924 (delete-file "src/test/java/org/apache/commons/exec/DefaultExecutorTest.java")
4925 (substitute* "src/test/java/org/apache/commons/exec/TestRunner.java"
4926 (("suite\\.addTestSuite\\(DefaultExecutorTest\\.class\\);") ""))
4928 ;; The "build" phase automatically tests.
4930 (replace 'install (install-jars "target")))))
4932 `(("java-junit" ,java-junit)))
4933 (home-page "http://commons.apache.org/proper/commons-exec/")
4934 (synopsis "Common program execution related classes")
4935 (description "Commons-Exec simplifies executing external processes.")
4936 (license license:asl2.0)))
4938 (define-public java-commons-exec
4940 (inherit java-commons-exec-1.1)
4945 (uri (string-append "mirror://apache/commons/exec/source/"
4946 "commons-exec-" version "-src.tar.gz"))
4949 "17yb4h6f8l49c5iyyvda4z2nmw0bxrx857nrwmsr7mmpb7x441yv"))))
4951 `(#:test-target "test"
4953 (list (string-append "-Dmaven.junit.jar="
4954 (assoc-ref %build-inputs "java-junit")
4955 "/share/java/junit.jar")
4956 "-Dmaven.compiler.source=1.7"
4957 "-Dmaven.compiler.target=1.7")
4959 (modify-phases %standard-phases
4960 (add-before 'build 'delete-network-tests
4961 (lambda* (#:key inputs #:allow-other-keys)
4962 ;; This test hangs indefinitely.
4963 (delete-file "src/test/java/org/apache/commons/exec/issues/Exec60Test.java")
4964 (substitute* "src/test/java/org/apache/commons/exec/issues/Exec41Test.java"
4965 (("ping -c 10 127.0.0.1") "sleep 10"))
4966 (substitute* "src/test/java/org/apache/commons/exec/issues/Exec49Test.java"
4968 (call-with-output-file "src/test/scripts/ping.sh"
4970 (format port "#!~a/bin/sh\nsleep $1\n"
4971 (assoc-ref inputs "bash"))))
4973 ;; The "build" phase automatically tests.
4975 (replace 'install (install-jars "target")))))
4977 `(("java-junit" ,java-junit)
4978 ("java-hamcrest-core" ,java-hamcrest-core)))))
4980 (define-public java-commons-lang
4982 (name "java-commons-lang")
4987 (uri (string-append "mirror://apache/commons/lang/source/"
4988 "commons-lang-" version "-src.tar.gz"))
4990 (base32 "1mxwagqadzx1b2al7i0z1v0r235aj2njdyijf02szq0vhmqrfiq5"))))
4991 (build-system ant-build-system)
4992 (outputs '("out" "doc"))
4994 `(#:test-target "test"
4995 #:test-exclude (list "**/Abstract*.java" "**/Random*.java")
4997 (modify-phases %standard-phases
4998 (add-after 'build 'build-javadoc ant-build-javadoc)
4999 (add-before 'check 'disable-failing-test
5001 ;; Disable a failing test
5002 (substitute* "src/test/java/org/apache/commons/lang/\
5003 time/FastDateFormatTest.java"
5004 (("public void testFormat\\(\\)")
5005 "public void disabled_testFormat()"))
5007 (replace 'install (install-jars "target"))
5008 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
5010 `(("java-junit" ,java-junit)))
5011 (home-page "http://commons.apache.org/lang/")
5012 (synopsis "Extension of the java.lang package")
5013 (description "The Commons Lang components contains a set of Java classes
5014 that provide helper methods for standard Java classes, especially those found
5015 in the @code{java.lang} package in the Sun JDK. The following classes are
5019 @item StringUtils - Helper for @code{java.lang.String}.
5020 @item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets
5021 of characters such as @code{[a-z]} and @code{[abcdez]}.
5022 @item RandomStringUtils - Helper for creating randomised strings.
5023 @item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
5024 @item NumberRange - A range of numbers with an upper and lower bound.
5025 @item ObjectUtils - Helper for @code{java.lang.Object}.
5026 @item SerializationUtils - Helper for serializing objects.
5027 @item SystemUtils - Utility class defining the Java system properties.
5028 @item NestedException package - A sub-package for the creation of nested
5030 @item Enum package - A sub-package for the creation of enumerated types.
5031 @item Builder package - A sub-package for the creation of @code{equals},
5032 @code{hashCode}, @code{compareTo} and @code{toString} methods.
5034 (license license:asl2.0)))
5036 (define-public java-commons-lang3
5038 (name "java-commons-lang3")
5043 (uri (string-append "mirror://apache/commons/lang/source/"
5044 "commons-lang3-" version "-src.tar.gz"))
5046 (base32 "0xpshb9spjhplq5a7mr0y1bgfw8190ik4xj8f569xidfcki1d6kg"))))
5047 (build-system ant-build-system)
5048 (outputs '("out" "doc"))
5050 `(#:test-target "test"
5052 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-all"))
5053 (junit (assoc-ref %build-inputs "java-junit"))
5054 (easymock (assoc-ref %build-inputs "java-easymock"))
5055 (io (assoc-ref %build-inputs "java-commons-io")))
5056 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
5057 (string-append "-Dhamcrest.jar=" hamcrest
5058 "/share/java/hamcrest-all.jar")
5059 (string-append "-Dcommons-io.jar=" io
5060 "/share/java/commons-io-"
5061 ,(package-version java-commons-io)
5063 (string-append "-Deasymock.jar=" easymock
5064 "/share/java/easymock.jar")))
5066 (modify-phases %standard-phases
5067 (add-after 'build 'build-javadoc ant-build-javadoc)
5068 (replace 'install (install-jars "target"))
5069 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
5071 `(("java-junit" ,java-junit)
5072 ("java-commons-io" ,java-commons-io)
5073 ("java-hamcrest-all" ,java-hamcrest-all)
5074 ("java-easymock" ,java-easymock)))
5075 (home-page "http://commons.apache.org/lang/")
5076 (synopsis "Extension of the java.lang package")
5077 (description "The Commons Lang components contains a set of Java classes
5078 that provide helper methods for standard Java classes, especially those found
5079 in the @code{java.lang} package. The following classes are included:
5082 @item StringUtils - Helper for @code{java.lang.String}.
5083 @item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets of
5084 characters such as @code{[a-z]} and @code{[abcdez]}.
5085 @item RandomStringUtils - Helper for creating randomised strings.
5086 @item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
5087 @item NumberRange - A range of numbers with an upper and lower bound.
5088 @item ObjectUtils - Helper for @code{java.lang.Object}.
5089 @item SerializationUtils - Helper for serializing objects.
5090 @item SystemUtils - Utility class defining the Java system properties.
5091 @item NestedException package - A sub-package for the creation of nested
5093 @item Enum package - A sub-package for the creation of enumerated types.
5094 @item Builder package - A sub-package for the creation of @code{equals},
5095 @code{hashCode}, @code{compareTo} and @code{toString} methods.
5097 (license license:asl2.0)))
5099 (define-public java-commons-bsf
5101 (name "java-commons-bsf")
5105 (uri (string-append "mirror://apache/commons/bsf/source/bsf-src-"
5109 "1sbamr8jl32p1jgf59nw0b2w9qivyg145954hm6ly54cfgsqrdas"))
5110 (modules '((guix build utils)))
5113 (for-each delete-file
5114 (find-files "." "\\.jar$"))
5116 (build-system ant-build-system)
5118 `(#:build-target "jar"
5119 #:tests? #f; No test file
5120 #:modules ((guix build ant-build-system)
5122 (guix build java-utils)
5125 (modify-phases %standard-phases
5126 (add-before 'build 'create-properties
5128 ;; This file is missing from the distribution
5129 (call-with-output-file "build-properties.xml"
5132 `(project (@ (basedir ".") (name "build-properties") (default ""))
5133 (property (@ (name "project.name") (value "bsf")))
5134 (property (@ (name "source.level") (value "1.5")))
5135 (property (@ (name "build.lib") (value "build/jar")))
5136 (property (@ (name "src.dir") (value "src")))
5137 (property (@ (name "tests.dir") (value "src/org/apache/bsf/test")))
5138 (property (@ (name "build.tests") (value "build/test-classes")))
5139 (property (@ (name "build.dest") (value "build/classes"))))
5142 (replace 'install (install-jars "build")))))
5144 `(("java-junit" ,java-junit)))
5146 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)))
5147 (home-page "https://commons.apache.org/proper/commons-bsf")
5148 (synopsis "Bean Scripting Framework")
5149 (description "The Bean Scripting Framework (BSF) is a set of Java classes
5150 which provides scripting language support within Java applications, and access
5151 to Java objects and methods from scripting languages. BSF allows one to write
5152 JSPs in languages other than Java while providing access to the Java class
5153 library. In addition, BSF permits any Java application to be implemented in
5154 part (or dynamically extended) by a language that is embedded within it. This
5155 is achieved by providing an API that permits calling scripting language engines
5156 from within Java, as well as an object registry that exposes Java objects to
5157 these scripting language engines.")
5158 (license license:asl2.0)))
5160 (define-public java-commons-jxpath
5162 (name "java-commons-jxpath")
5166 (uri (string-append "mirror://apache/commons/jxpath/source/"
5167 "commons-jxpath-" version "-src.tar.gz"))
5170 "1rpgg31ayn9fwr4bfi2i1ij0npcg79ad2fv0w9hacvawsyc42cfs"))))
5171 (build-system ant-build-system)
5173 `(#:jar-name "commons-jxpath.jar"
5174 ;; tests require more dependencies, including mockrunner which depends on old software
5176 #:source-dir "src/java"))
5178 `(("servlet" ,java-classpathx-servletapi)
5179 ("java-jdom" ,java-jdom)
5180 ("java-commons-beanutils" ,java-commons-beanutils)))
5182 `(("java-junit" ,java-junit)))
5183 (home-page "http://commons.apache.org/jxpath/")
5184 (synopsis "Simple interpreter of an expression language called XPath.")
5185 (description "The org.apache.commons.jxpath package defines a simple
5186 interpreter of an expression language called XPath. JXPath applies XPath
5187 expressions to graphs of objects of all kinds: JavaBeans, Maps, Servlet
5188 contexts, DOM etc, including mixtures thereof.")
5189 (license license:asl2.0)))
5191 (define-public java-commons-pool
5193 (name "java-commons-pool")
5197 (uri (string-append "mirror://apache/commons/pool/source/"
5198 "commons-pool2-" version "-src.tar.gz"))
5201 "1fi1hgqmq01bs6azbj3sfswxzadp2r8sjjfiq6ryilz1m50kvrv6"))))
5203 `(#:jar-name "common-pool.jar"
5204 #:source-dir "src/main/java"
5206 (list "**/PerformanceTest.java")))
5207 (build-system ant-build-system)
5209 `(("java-cglib" ,java-cglib)))
5211 `(("java-junit" ,java-junit)
5212 ("java-hamcrest-core" ,java-hamcrest-core)
5213 ("java-asm" ,java-asm)
5214 ("java-objenesis" ,java-objenesis)))
5215 (home-page "https://commons.apache.org/proper/commons-pool/")
5216 (synopsis "Object-pooling API in Java")
5217 (description "The commons-pool package provides an object-pooling API
5218 and a number of object pool implementations. This package defines a
5219 handful of pooling interfaces and some base classes that may be useful when
5220 creating new pool implementations.")
5221 (license license:asl2.0)))
5223 (define-public java-commons-dbcp
5225 (name "java-commons-dbcp")
5229 (uri (string-append "mirror://apache/commons/dbcp/source/"
5230 "commons-dbcp2-" version "-src.tar.gz"))
5233 "0axbvcbnf2l70fc3ybrlp3siw2w4ka9mia2pnx4py8gz54cpw3rc"))))
5235 `(#:source-dir "src/main/java"
5236 #:jar-name "java-commons-dbcp.jar"
5237 #:tests? #f)); requires apache-geronimo
5239 `(("java-commons-pool" ,java-commons-pool)
5240 ("java-commons-logging" ,java-commons-logging-minimal)
5241 ("java-jboss-transaction-api-spec" ,java-jboss-transaction-api-spec)))
5243 `(("java-junit" ,java-junit)))
5244 (build-system ant-build-system)
5245 (home-page "https://commons.apache.org/proper/commons-dbcp/")
5246 (synopsis "Database Connection Pool for Java")
5247 (description "Commons-dbcp allows you to share a pool of database
5248 connections between users. Creating a new connection for each user can be
5249 time consuming and even unfeasible when the number of simultaneous users is
5250 very large. This package provides a way to share a poole of connections to
5252 (license license:asl2.0)))
5254 (define-public java-commons-jcs
5256 (name "java-commons-jcs")
5260 (uri (string-append "mirror://apache/commons/jcs/source/"
5261 "commons-jcs-dist-" version "-src.tar.gz"))
5264 "0syhq2npjbrl0azqfjm0gvash1qd5qjy4qmysxcrqjsk0nf9fa1q"))))
5265 (build-system ant-build-system)
5267 `(#:jar-name "commons-jcs.jar"
5268 #:source-dir "commons-jcs-core/src/main/java"
5269 #:test-dir "commons-jcs-core/src/test"
5270 #:tests? #f; requires hsqldb
5272 (modify-phases %standard-phases
5273 (add-before 'build 'prepare
5275 (with-directory-excursion
5276 "commons-jcs-core/src/main/java/org/apache/commons/jcs"
5278 "auxiliary/disk/jdbc/dsfactory/SharedPoolDataSourceFactory.java"
5279 (("commons.dbcp") "commons.dbcp2")
5280 ((".*\\.setMaxActive.*") ""))
5281 ;;; Remove dependency on velocity-tools
5282 (delete-file "admin/servlet/JCSAdminServlet.java"))
5285 `(("java-classpathx-servletapi" ,java-classpathx-servletapi)
5286 ("java-commons-logging-minimal" ,java-commons-logging-minimal)
5287 ("java-commons-httpclient" ,java-commons-httpclient)
5288 ("java-commons-dbcp" ,java-commons-dbcp)))
5290 `(("java-junit" ,java-junit)))
5291 (home-page "https://commons.apache.org/proper/commons-jcs/")
5292 (synopsis "Distributed caching system in Java")
5293 (description "JCS is a distributed caching system written in Java. It
5294 is intended to speed up applications by providing a means to manage cached
5295 data of various dynamic natures. Like any caching system, JCS is most useful
5296 for high read, low put applications. Latency times drop sharply and
5297 bottlenecks move away from the database in an effectively cached system.")
5298 (license license:asl2.0)))
5300 (define-public java-jsr250
5302 (name "java-jsr250")
5306 (uri (string-append "https://repo1.maven.org/maven2/"
5307 "javax/annotation/javax.annotation-api/"
5308 version "/javax.annotation-api-"
5309 version "-sources.jar"))
5312 "08clh8n4n9wfglf75qsqfjs6yf79f7x6hqx38cn856pksszv50kz"))))
5313 (build-system ant-build-system)
5315 `(#:tests? #f ; no tests included
5317 #:jar-name "jsr250.jar"))
5318 (home-page "https://jcp.org/en/jsr/detail?id=250")
5319 (synopsis "Security-related annotations")
5320 (description "This package provides annotations for security. It provides
5321 packages in the @code{javax.annotation} and @code{javax.annotation.security}
5323 ;; either cddl or gpl2 only, with classpath exception
5324 (license (list license:cddl1.0
5327 (define-public java-jsr305
5329 (name "java-jsr305")
5333 (uri (string-append "https://repo1.maven.org/maven2/"
5334 "com/google/code/findbugs/"
5335 "jsr305/" version "/jsr305-"
5336 version "-sources.jar"))
5339 "1rh6jin9v7jqpq3kf1swl868l8i94r636n03pzpsmgr8v0lh9j2n"))))
5340 (build-system ant-build-system)
5342 `(#:tests? #f ; no tests included
5343 #:jar-name "jsr305.jar"))
5344 (home-page "http://findbugs.sourceforge.net/")
5345 (synopsis "Annotations for the static analyzer called findbugs")
5346 (description "This package provides annotations for the findbugs package.
5347 It provides packages in the @code{javax.annotations} namespace.")
5348 (license license:asl2.0)))
5350 (define-public java-guava
5353 ;; This is the last release of Guava that can be built with Java 7.
5357 (uri (string-append "https://github.com/google/guava/"
5358 "releases/download/v" version
5359 "/guava-" version "-sources.jar"))
5362 "1gawrs5gi6j5hcfxdgpnfli75vb9pfi4sn09pnc8xacr669yajwr"))))
5363 (build-system ant-build-system)
5365 `(#:tests? #f ; no tests included
5366 #:jar-name "guava.jar"
5368 (modify-phases %standard-phases
5369 (add-after 'unpack 'trim-sources
5371 (with-directory-excursion "src/com/google/common"
5372 ;; Remove annotations to avoid extra dependencies:
5373 ;; * "j2objc" annotations are used when converting Java to
5375 ;; * "errorprone" annotations catch common Java mistakes at
5377 ;; * "IgnoreJRERequirement" is used for Android.
5378 (substitute* (find-files "." "\\.java$")
5379 (("import com.google.j2objc.*") "")
5380 (("import com.google.errorprone.annotation.*") "")
5381 (("import org.codehaus.mojo.animal_sniffer.*") "")
5382 (("@CanIgnoreReturnValue") "")
5385 (("@RetainedWith") "")
5387 (("@ForOverride") "")
5388 (("@J2ObjCIncompatible") "")
5389 (("@IgnoreJRERequirement") "")))
5392 `(("java-jsr305" ,java-jsr305)))
5393 (home-page "https://github.com/google/guava")
5394 (synopsis "Google core libraries for Java")
5395 (description "Guava is a set of core libraries that includes new
5396 collection types (such as multimap and multiset), immutable collections, a
5397 graph library, functional types, an in-memory cache, and APIs/utilities for
5398 concurrency, I/O, hashing, primitives, reflection, string processing, and much
5400 (license license:asl2.0)))
5402 ;; The java-commons-logging package provides adapters to many different
5403 ;; logging frameworks. To avoid an excessive dependency graph we try to build
5404 ;; it with only a minimal set of adapters.
5405 (define-public java-commons-logging-minimal
5407 (name "java-commons-logging-minimal")
5411 (uri (string-append "mirror://apache/commons/logging/source/"
5412 "commons-logging-" version "-src.tar.gz"))
5415 "10bwcy5w8d7y39n0krlwhnp8ds3kj5zhmzj0zxnkw0qdlsjmsrj9"))))
5416 (build-system ant-build-system)
5418 `(#:tests? #f ; avoid dependency on logging frameworks
5419 #:jar-name "commons-logging-minimal.jar"
5421 (modify-phases %standard-phases
5422 (add-after 'unpack 'delete-adapters-and-tests
5424 ;; Delete all adapters except for NoOpLog, SimpleLog, and
5425 ;; LogFactoryImpl. NoOpLog is required to build; LogFactoryImpl
5426 ;; is used by applications; SimpleLog is the only actually usable
5427 ;; implementation that does not depend on another logging
5431 (delete-file (string-append
5432 "src/main/java/org/apache/commons/logging/impl/" file)))
5433 (list "Jdk13LumberjackLogger.java"
5434 "WeakHashtable.java"
5436 "ServletContextCleaner.java"
5439 "LogKitLogger.java"))
5440 (delete-file-recursively "src/test")
5442 (home-page "http://commons.apache.org/logging/")
5443 (synopsis "Common API for logging implementations")
5444 (description "The Logging package is a thin bridge between different
5445 logging implementations. A library that uses the commons-logging API can be
5446 used with any logging implementation at runtime.")
5447 (license license:asl2.0)))
5449 ;; This is the last release of the 1.x series.
5450 (define-public java-mockito-1
5452 (name "java-mockito")
5456 (uri (string-append "http://repo1.maven.org/maven2/"
5457 "org/mockito/mockito-core/" version
5458 "/mockito-core-" version "-sources.jar"))
5461 "0vmiwnwpf83g2q7kj1rislmja8fpvqkixjhawh7nxnygx6pq11kc"))))
5462 (build-system ant-build-system)
5464 `(#:jar-name "mockito.jar"
5465 #:tests? #f ; no tests included
5466 ;; FIXME: patch-and-repack does not support jars, so we have to apply
5467 ;; patches in build phases.
5469 (modify-phases %standard-phases
5470 ;; Mockito was developed against a different version of hamcrest,
5471 ;; which does not require matcher implementations to provide an
5472 ;; implementation of the "describeMismatch" method. We add this
5473 ;; simple definition to pass the build with our version of hamcrest.
5474 (add-after 'unpack 'fix-hamcrest-build-error
5476 (substitute* "src/org/mockito/internal/matchers/LocalizedMatcher.java"
5477 (("public Matcher getActualMatcher\\(\\) .*" line)
5479 public void describeMismatch(Object item, Description description) {
5480 actualMatcher.describeMismatch(item, description);
5484 ;; Mockito bundles cglib. We have a cglib package, so let's use
5486 (add-after 'unpack 'use-system-libraries
5488 (with-directory-excursion "src/org/mockito/internal/creation/cglib"
5489 (substitute* '("CGLIBHacker.java"
5490 "CglibMockMaker.java"
5491 "ClassImposterizer.java"
5492 "DelegatingMockitoMethodProxy.java"
5493 "MethodInterceptorFilter.java"
5494 "MockitoNamingPolicy.java"
5495 "SerializableMockitoMethodProxy.java"
5496 "SerializableNoOp.java")
5497 (("import org.mockito.cglib") "import net.sf.cglib")))
5500 `(("java-junit" ,java-junit)
5501 ("java-objenesis" ,java-objenesis)
5502 ("java-cglib" ,java-cglib)
5503 ("java-hamcrest-core" ,java-hamcrest-core)))
5504 (home-page "http://mockito.org")
5505 (synopsis "Mockito is a mock library for Java")
5506 (description "Mockito is a mocking library for Java which lets you write
5507 tests with a clean and simple API. It generates mocks using reflection, and
5508 it records all mock invocations, including methods arguments.")
5509 (license license:asl2.0)))
5511 (define-public java-httpcomponents-httpcore
5513 (name "java-httpcomponents-httpcore")
5517 (uri (string-append "mirror://apache//httpcomponents/httpcore/"
5518 "source/httpcomponents-core-"
5519 version "-src.tar.gz"))
5522 "02bwcf38y4vgwq7kj2s6q7qrmma641r5lacivm16kgxvb2j6h1vy"))))
5523 (build-system ant-build-system)
5525 `(#:jar-name "httpcomponents-httpcore.jar"
5527 (modify-phases %standard-phases
5528 (add-after 'unpack 'chdir
5529 (lambda _ (chdir "httpcore") #t)))))
5531 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)
5532 ("java-commons-lang3" ,java-commons-lang3)))
5534 `(("java-junit" ,java-junit)
5535 ("java-mockito" ,java-mockito-1)))
5536 (home-page "https://hc.apache.org/httpcomponents-core-4.4.x/index.html")
5537 (synopsis "Low level HTTP transport components")
5538 (description "HttpCore is a set of low level HTTP transport components
5539 that can be used to build custom client and server side HTTP services with a
5540 minimal footprint. HttpCore supports two I/O models: blocking I/O model based
5541 on the classic Java I/O and non-blocking, event driven I/O model based on Java
5544 This package provides the blocking I/O model library.")
5545 (license license:asl2.0)))
5547 (define-public java-httpcomponents-httpcore-nio
5548 (package (inherit java-httpcomponents-httpcore)
5549 (name "java-httpcomponents-httpcore-nio")
5551 `(#:jar-name "httpcomponents-httpcore-nio.jar"
5553 (modify-phases %standard-phases
5554 (add-after 'unpack 'chdir
5555 (lambda _ (chdir "httpcore-nio") #t)))))
5557 `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
5558 ("java-hamcrest-core" ,java-hamcrest-core)
5559 ,@(package-inputs java-httpcomponents-httpcore)))
5560 (description "HttpCore is a set of low level HTTP transport components
5561 that can be used to build custom client and server side HTTP services with a
5562 minimal footprint. HttpCore supports two I/O models: blocking I/O model based
5563 on the classic Java I/O and non-blocking, event driven I/O model based on Java
5566 This package provides the non-blocking I/O model library based on Java
5569 (define-public java-httpcomponents-httpcore-ab
5570 (package (inherit java-httpcomponents-httpcore)
5571 (name "java-httpcomponents-httpcore-ab")
5573 `(#:jar-name "httpcomponents-httpcore-ab.jar"
5575 (modify-phases %standard-phases
5576 (add-after 'unpack 'chdir
5577 (lambda _ (chdir "httpcore-ab") #t)))))
5579 `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
5580 ("java-commons-cli" ,java-commons-cli)
5581 ("java-hamcrest-core" ,java-hamcrest-core)
5582 ,@(package-inputs java-httpcomponents-httpcore)))
5583 (synopsis "Apache HttpCore benchmarking tool")
5584 (description "This package provides the HttpCore benchmarking tool. It is
5585 an Apache AB clone based on HttpCore.")))
5587 (define-public java-httpcomponents-httpclient
5589 (name "java-httpcomponents-httpclient")
5593 (uri (string-append "mirror://apache/httpcomponents/httpclient/"
5594 "source/httpcomponents-client-"
5595 version "-src.tar.gz"))
5598 "1428399s7qy3cim5wc6f3ks4gl9nf9vkjpfmnlap3jflif7g2pj1"))))
5599 (build-system ant-build-system)
5601 `(#:jar-name "httpcomponents-httpclient.jar"
5603 (modify-phases %standard-phases
5604 (add-after 'unpack 'chdir
5605 (lambda _ (chdir "httpclient") #t)))))
5607 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)
5608 ("java-commons-codec" ,java-commons-codec)
5609 ("java-hamcrest-core" ,java-hamcrest-core)
5610 ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
5611 ("java-mockito" ,java-mockito-1)
5612 ("java-junit" ,java-junit)))
5613 (home-page "https://hc.apache.org/httpcomponents-client-ga/")
5614 (synopsis "HTTP client library for Java")
5615 (description "Although the @code{java.net} package provides basic
5616 functionality for accessing resources via HTTP, it doesn't provide the full
5617 flexibility or functionality needed by many applications. @code{HttpClient}
5618 seeks to fill this void by providing an efficient, up-to-date, and
5619 feature-rich package implementing the client side of the most recent HTTP
5620 standards and recommendations.")
5621 (license license:asl2.0)))
5623 (define-public java-httpcomponents-httpmime
5624 (package (inherit java-httpcomponents-httpclient)
5625 (name "java-httpcomponents-httpmime")
5627 `(#:jar-name "httpcomponents-httpmime.jar"
5629 (modify-phases %standard-phases
5630 (add-after 'unpack 'chdir
5631 (lambda _ (chdir "httpmime") #t)))))
5633 `(("java-httpcomponents-httpclient" ,java-httpcomponents-httpclient)
5634 ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
5635 ("java-junit" ,java-junit)
5636 ("java-hamcrest-core" ,java-hamcrest-core)))))
5638 (define-public java-commons-net
5640 (name "java-commons-net")
5644 (uri (string-append "mirror://apache/commons/net/source/"
5645 "commons-net-" version "-src.tar.gz"))
5648 "0n0cmnddk9qdqhjvka8pc6hd9mn2qi3166f1s6xk32h7rfy1adxr"))))
5649 (build-system ant-build-system)
5651 `(;; FIXME: MainTest.java tries to read "examples.properties" (which
5652 ;; should be "resources/examples/examples.properties"), but gets "null"
5655 #:jar-name "commons-net.jar"))
5657 `(("java-junit" ,java-junit)
5658 ("java-hamcrest-core" ,java-hamcrest-core)))
5659 (home-page "http://commons.apache.org/net/")
5660 (synopsis "Client library for many basic Internet protocols")
5661 (description "The Apache Commons Net library implements the client side of
5662 many basic Internet protocols. The purpose of the library is to provide
5663 fundamental protocol access, not higher-level abstractions.")
5664 (license license:asl2.0)))
5666 (define-public java-jsch
5672 (uri (string-append "mirror://sourceforge/jsch/jsch/"
5673 version "/jsch-" version ".zip"))
5676 "1lxyjwvmwa723wcf3bqn816hkvc03vz4xhbsi7bvfhrz2rpgcfq6"))))
5677 (build-system ant-build-system)
5679 `(#:build-target "dist"
5680 #:tests? #f ; no tests included
5682 (modify-phases %standard-phases
5683 (replace 'install (install-jars "dist")))))
5685 `(("unzip" ,unzip)))
5686 (home-page "http://www.jcraft.com/jsch/")
5687 (synopsis "Pure Java implementation of SSH2")
5688 (description "JSch is a pure Java implementation of SSH2. JSch allows you
5689 to connect to an SSH server and use port forwarding, X11 forwarding, file
5690 transfer, etc., and you can integrate its functionality into your own Java
5692 (license license:bsd-3)))
5694 (define-public java-commons-compress
5696 (name "java-commons-compress")
5700 (uri (string-append "mirror://apache/commons/compress/source/"
5701 "commons-compress-" version "-src.tar.gz"))
5704 "1vjqvavrn0babffn1kciz6v52ibwq2vwhzlb95hazis3lgllnxc8"))))
5705 (build-system ant-build-system)
5707 `(#:jar-name "commons-compress.jar"
5709 (modify-phases %standard-phases
5710 (add-after 'unpack 'delete-bad-tests
5712 (with-directory-excursion "src/test/java/org/apache/commons/compress/"
5713 ;; FIXME: These tests really should not fail. Maybe they are
5714 ;; indicative of problems with our Java packaging work.
5716 ;; This test fails with a null pointer exception.
5717 (delete-file "archivers/sevenz/SevenZOutputFileTest.java")
5718 ;; This test fails to open test resources.
5719 (delete-file "archivers/zip/ExplodeSupportTest.java")
5721 ;; FIXME: This test adds a dependency on powermock, which is hard to
5722 ;; package at this point.
5723 ;; https://github.com/powermock/powermock
5724 (delete-file "archivers/sevenz/SevenZNativeHeapTest.java"))
5727 `(("java-junit" ,java-junit)
5728 ("java-hamcrest-core" ,java-hamcrest-core)
5729 ("java-mockito" ,java-mockito-1)
5730 ("java-xz" ,java-xz)))
5731 (home-page "https://commons.apache.org/proper/commons-compress/")
5732 (synopsis "Java library for working with compressed files")
5733 (description "The Apache Commons Compress library defines an API for
5734 working with compressed files such as ar, cpio, Unix dump, tar, zip, gzip, XZ,
5735 Pack200, bzip2, 7z, arj, lzma, snappy, DEFLATE, lz4 and Z files.")
5736 (license license:asl2.0)))
5738 (define-public java-commons-csv
5740 (name "java-commons-csv")
5744 (uri (string-append "mirror://apache/commons/csv/source/"
5745 "commons-csv-" version "-src.tar.gz"))
5748 "1l89m0fm2s3xx3v3iynvangymfg2vlyngaj6fgsi457nmsw7m7ij"))))
5749 (build-system ant-build-system)
5751 `(#:jar-name "commons-csv.jar"
5752 #:source-dir "src/main/java"
5753 #:tests? #f)); FIXME: requires java-h2
5755 `(("java-hamcrest-core" ,java-hamcrest-core)
5756 ("java-commons-io" ,java-commons-io)
5757 ("java-commons-lang3" ,java-commons-lang3)
5758 ("junit" ,java-junit)))
5759 (home-page "https://commons.apache.org/proper/commons-csv/")
5760 (synopsis "Read and write CSV documents")
5761 (description "Commons CSV reads and writes files in variations of the Comma
5762 Separated Value (CSV) format. The most common CSV formats are predefined in the
5766 @item Microsoft Excel
5767 @item Informix UNLOAD
5768 @item Informix UNLOAD CSV
5774 Custom formats can be created using a fluent style API.")
5775 (license license:asl2.0)))
5777 (define-public java-osgi-annotation
5779 (name "java-osgi-annotation")
5783 (uri (string-append "https://repo1.maven.org/maven2/"
5784 "org/osgi/org.osgi.annotation/" version "/"
5785 "org.osgi.annotation-" version "-sources.jar"))
5788 "1q718mb7gqg726rh6pc2hcisn8v50nv35abbir0jypmffhiii85w"))))
5789 (build-system ant-build-system)
5791 `(#:tests? #f ; no tests
5792 #:jar-name "osgi-annotation.jar"))
5793 (home-page "https://www.osgi.org")
5794 (synopsis "Annotation module of OSGi framework")
5796 "OSGi, for Open Services Gateway initiative framework, is a module system
5797 and service platform for the Java programming language. This package contains
5798 the OSGi annotation module, providing additional services to help dynamic
5800 (license license:asl2.0)))
5802 (define-public java-osgi-core
5804 (name "java-osgi-core")
5808 (uri (string-append "https://repo1.maven.org/maven2/"
5809 "org/osgi/org.osgi.core/" version "/"
5810 "org.osgi.core-" version "-sources.jar"))
5813 "19bpf5jx32jq9789gyhin35q5v7flmw0p9mk7wbgqpxqfmxyiabv"))))
5814 (build-system ant-build-system)
5816 `(#:tests? #f ; no tests
5817 #:jar-name "osgi-core.jar"))
5819 `(("java-osgi-annotation" ,java-osgi-annotation)))
5820 (home-page "https://www.osgi.org")
5821 (synopsis "Core module of OSGi framework")
5823 "OSGi, for Open Services Gateway initiative framework, is a module system
5824 and service platform for the Java programming language. This package contains
5825 the OSGi Core module.")
5826 (license license:asl2.0)))
5828 (define-public java-osgi-service-event
5830 (name "java-osgi-service-event")
5834 (uri (string-append "https://repo1.maven.org/maven2/"
5835 "org/osgi/org.osgi.service.event/"
5836 version "/org.osgi.service.event-"
5837 version "-sources.jar"))
5840 "1nyhlgagwym75bycnjczwbnpymv2iw84zbhvvzk84g9q736i6qxm"))))
5841 (build-system ant-build-system)
5843 `(#:tests? #f ; no tests
5844 #:jar-name "osgi-service-event.jar"))
5846 `(("java-osgi-annotation" ,java-osgi-annotation)
5847 ("java-osgi-core" ,java-osgi-core)))
5848 (home-page "https://www.osgi.org")
5849 (synopsis "OSGi service event module")
5851 "OSGi, for Open Services Gateway initiative framework, is a module system
5852 and service platform for the Java programming language. This package contains
5853 the OSGi @code{org.osgi.service.event} module.")
5854 (license license:asl2.0)))
5856 (define-public java-eclipse-osgi
5858 (name "java-eclipse-osgi")
5862 (uri (string-append "https://repo1.maven.org/maven2/"
5863 "org/eclipse/platform/org.eclipse.osgi/"
5864 version "/org.eclipse.osgi-"
5865 version "-sources.jar"))
5868 "00cqc6lb29n0zv68b4l842vzkwawvbr7gshfdygsk8sicvcq2c7b"))))
5869 (build-system ant-build-system)
5871 `(#:tests? #f ; no tests included
5872 #:jar-name "eclipse-equinox-osgi.jar"))
5874 `(("java-osgi-annotation" ,java-osgi-annotation)))
5875 (home-page "http://www.eclipse.org/equinox/")
5876 (synopsis "Eclipse Equinox OSGi framework")
5877 (description "This package provides an implementation of the OSGi Core
5879 (license license:epl1.0)))
5881 (define-public java-eclipse-equinox-common
5883 (name "java-eclipse-equinox-common")
5884 (version "3.10.200")
5887 (uri (string-append "https://repo1.maven.org/maven2/"
5888 "org/eclipse/platform/org.eclipse.equinox.common/"
5889 version "/org.eclipse.equinox.common-"
5890 version "-sources.jar"))
5893 "1yn8ij6xsljlf35sr2l7wvyvc0ss4n1rv0ry5zkgb49dj4hyrqrj"))))
5894 (build-system ant-build-system)
5896 `(#:tests? #f ; no tests included
5897 #:jar-name "eclipse-equinox-common.jar"))
5899 `(("java-eclipse-osgi" ,java-eclipse-osgi)))
5900 (home-page "http://www.eclipse.org/equinox/")
5901 (synopsis "Common Eclipse runtime")
5902 (description "This package provides the common Eclipse runtime.")
5903 (license license:epl1.0)))
5905 (define-public java-eclipse-core-jobs
5907 (name "java-eclipse-core-jobs")
5911 (uri (string-append "https://repo1.maven.org/maven2/"
5912 "org/eclipse/platform/org.eclipse.core.jobs/"
5913 version "/org.eclipse.core.jobs-"
5914 version "-sources.jar"))
5917 "0395b8lh0km8vhzjnchvs1rii1qz48hyvb2wqfaq4yhklbwihq4b"))))
5918 (build-system ant-build-system)
5920 `(#:tests? #f ; no tests included
5921 #:jar-name "eclipse-core-jobs.jar"))
5923 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5924 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5925 (home-page "http://www.eclipse.org/equinox/")
5926 (synopsis "Eclipse jobs mechanism")
5927 (description "This package provides the Eclipse jobs mechanism.")
5928 (license license:epl1.0)))
5930 (define-public java-eclipse-equinox-registry
5932 (name "java-eclipse-equinox-registry")
5936 (uri (string-append "https://repo1.maven.org/maven2/"
5937 "org/eclipse/platform/org.eclipse.equinox.registry/"
5938 version "/org.eclipse.equinox.registry-"
5939 version "-sources.jar"))
5942 "1i9sgymh2fy5vdgk5y7s3qvrlbgh4l93ddqi3v4zmca7hwrlhf9k"))))
5943 (build-system ant-build-system)
5945 `(#:tests? #f ; no tests included
5946 #:jar-name "eclipse-equinox-registry.jar"))
5948 `(("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
5949 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5950 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5951 (home-page "http://www.eclipse.org/equinox/")
5952 (synopsis "Eclipse extension registry support")
5953 (description "This package provides support for the Eclipse extension
5955 (license license:epl1.0)))
5957 (define-public java-eclipse-equinox-app
5959 (name "java-eclipse-equinox-app")
5963 (uri (string-append "https://repo1.maven.org/maven2/"
5964 "org/eclipse/platform/org.eclipse.equinox.app/"
5965 version "/org.eclipse.equinox.app-"
5966 version "-sources.jar"))
5969 "0nhvbp93y203ar7y59gb0mz3w2d3jlqhr0c9hii9bcfpmr7imdab"))))
5970 (build-system ant-build-system)
5972 `(#:tests? #f ; no tests included
5973 #:jar-name "eclipse-equinox-app.jar"))
5975 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5976 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5977 ("java-eclipse-osgi" ,java-eclipse-osgi)
5978 ("java-osgi-service-event" ,java-osgi-service-event)))
5979 (home-page "http://www.eclipse.org/equinox/")
5980 (synopsis "Equinox application container")
5981 (description "This package provides the Equinox application container for
5983 (license license:epl1.0)))
5985 (define-public java-eclipse-equinox-preferences
5987 (name "java-eclipse-equinox-preferences")
5991 (uri (string-append "https://repo1.maven.org/maven2/"
5992 "org/eclipse/platform/org.eclipse.equinox.preferences/"
5993 version "/org.eclipse.equinox.preferences-"
5994 version "-sources.jar"))
5997 "0k7w6c141sqym4fy3af0qkwpy4pdh2vsjpjba6rp5fxyqa24v0a2"))))
5998 (build-system ant-build-system)
6000 `(#:tests? #f ; no tests included
6001 #:jar-name "eclipse-equinox-preferences.jar"))
6003 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6004 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6005 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6006 (home-page "http://www.eclipse.org/equinox/")
6007 (synopsis "Eclipse preferences mechanism")
6008 (description "This package provides the Eclipse preferences mechanism with
6009 the module @code{org.eclipse.equinox.preferences}.")
6010 (license license:epl1.0)))
6012 (define-public java-eclipse-core-contenttype
6014 (name "java-eclipse-core-contenttype")
6018 (uri (string-append "https://repo1.maven.org/maven2/"
6019 "org/eclipse/platform/org.eclipse.core.contenttype/"
6020 version "/org.eclipse.core.contenttype-"
6021 version "-sources.jar"))
6024 "1wcqcv7ijwv5rh748vz3x9pkmjl9w1r0k0026k56n8yjl4rrmspi"))))
6025 (build-system ant-build-system)
6027 `(#:tests? #f ; no tests included
6028 #:jar-name "eclipse-core-contenttype.jar"))
6030 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6031 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6032 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6033 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6034 (home-page "http://www.eclipse.org/")
6035 (synopsis "Eclipse content mechanism")
6036 (description "This package provides the Eclipse content mechanism in the
6037 @code{org.eclipse.core.contenttype} module.")
6038 (license license:epl1.0)))
6040 (define-public java-eclipse-core-runtime
6042 (name "java-eclipse-core-runtime")
6043 (version "3.15.100")
6046 (uri (string-append "https://repo1.maven.org/maven2/"
6047 "org/eclipse/platform/org.eclipse.core.runtime/"
6048 version "/org.eclipse.core.runtime-"
6049 version "-sources.jar"))
6052 "0l8xayacsbjvz5hypx2fv47vpw2n4dspamcfb3hx30x9hj8vmg7r"))))
6053 (build-system ant-build-system)
6055 `(#:tests? #f ; no tests included
6056 #:jar-name "eclipse-core-runtime.jar"))
6058 `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
6059 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
6060 ("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
6061 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6062 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6063 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6064 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6065 (home-page "https://www.eclipse.org/")
6066 (synopsis "Eclipse core runtime")
6067 (description "This package provides the Eclipse core runtime with the
6068 module @code{org.eclipse.core.runtime}.")
6069 (license license:epl1.0)))
6071 (define-public java-eclipse-core-filesystem
6073 (name "java-eclipse-core-filesystem")
6077 (uri (string-append "https://repo1.maven.org/maven2/"
6078 "org/eclipse/platform/org.eclipse.core.filesystem/"
6079 version "/org.eclipse.core.filesystem-"
6080 version "-sources.jar"))
6083 "0km1bhwjim4rfy3pkvjhvy31kgsyf2ncx0mlkmbf5n6g57pphdyj"))))
6084 (build-system ant-build-system)
6086 `(#:tests? #f ; no tests included
6087 #:jar-name "eclipse-core-filesystem.jar"))
6089 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6090 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6091 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6092 (home-page "https://www.eclipse.org/")
6093 (synopsis "Eclipse core file system")
6094 (description "This package provides the Eclipse core file system with the
6095 module @code{org.eclipse.core.filesystem}.")
6096 (license license:epl1.0)))
6098 (define-public java-eclipse-core-expressions
6100 (name "java-eclipse-core-expressions")
6104 (uri (string-append "https://repo1.maven.org/maven2/"
6105 "org/eclipse/platform/org.eclipse.core.expressions/"
6106 version "/org.eclipse.core.expressions-"
6107 version "-sources.jar"))
6110 "18bw2l875gmygvpagpgk9l24qzbdjia4ag12nw6fi8v8yaq4987f"))))
6111 (build-system ant-build-system)
6113 `(#:tests? #f ; no tests included
6114 #:jar-name "eclipse-core-expressions.jar"))
6116 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6117 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6118 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6119 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
6120 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6121 (home-page "https://www.eclipse.org/")
6122 (synopsis "Eclipse core expression language")
6123 (description "This package provides the Eclipse core expression language
6124 with the @code{org.eclipse.core.expressions} module.")
6125 (license license:epl1.0)))
6127 (define-public java-eclipse-core-variables
6129 (name "java-eclipse-core-variables")
6133 (uri (string-append "https://repo1.maven.org/maven2/"
6134 "org/eclipse/platform/org.eclipse.core.variables/"
6135 version "/org.eclipse.core.variables-"
6136 version "-sources.jar"))
6139 "12dirh03zi4n5x5cj07vzrhkmnqy6h9q10h9j605pagmpmifyxmy"))))
6140 (build-system ant-build-system)
6142 `(#:tests? #f ; no tests included
6143 #:jar-name "eclipse-core-variables.jar"))
6145 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6146 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6147 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6148 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
6149 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6150 (home-page "https://www.eclipse.org/platform")
6151 (synopsis "Eclipse core variables")
6152 (description "This package provides the Eclipse core variables module
6153 @code{org.eclipse.core.variables}.")
6154 (license license:epl1.0)))
6156 (define-public java-eclipse-ant-core
6158 (name "java-eclipse-ant-core")
6162 (uri (string-append "https://repo1.maven.org/maven2/"
6163 "org/eclipse/platform/org.eclipse.ant.core/"
6164 version "/org.eclipse.ant.core-"
6165 version "-sources.jar"))
6168 "11g3if794qjlk98mz9zch22rr56sd7z63vn4i7k2icr8cq5bfqg7"))))
6169 (build-system ant-build-system)
6171 `(#:tests? #f ; no tests included
6172 #:jar-name "eclipse-ant-core.jar"))
6174 `(("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
6175 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6176 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6177 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6178 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
6179 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
6180 ("java-eclipse-core-variables" ,java-eclipse-core-variables)
6181 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6182 (home-page "https://www.eclipse.org/platform")
6183 (synopsis "Ant build tool core libraries")
6184 (description "This package provides the ant build tool core libraries with
6185 the module @code{org.eclipse.ant.core}.")
6186 (license license:epl1.0)))
6188 (define-public java-eclipse-core-resources
6190 (name "java-eclipse-core-resources")
6191 (version "3.13.200")
6194 (uri (string-append "https://repo1.maven.org/maven2/"
6195 "org/eclipse/platform/org.eclipse.core.resources/"
6196 version "/org.eclipse.core.resources-"
6197 version "-sources.jar"))
6200 "1sn3b6ky72hkvxcgf9b2jkpbdh3y8lbhi9xxwv1dsiddpkkq91hs"))))
6201 (build-system ant-build-system)
6203 `(#:tests? #f ; no tests included
6204 #:jar-name "eclipse-core-resources.jar"))
6206 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6207 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6208 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6209 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
6210 ("java-eclipse-core-expressions" ,java-eclipse-core-expressions)
6211 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
6212 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
6213 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
6214 ("java-eclipse-ant-core" ,java-eclipse-ant-core)
6215 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6216 (home-page "https://www.eclipse.org/")
6217 (synopsis "Eclipse core resource management")
6218 (description "This package provides the Eclipse core resource management
6219 module @code{org.eclipse.core.resources}.")
6220 (license license:epl1.0)))
6222 (define-public java-eclipse-compare-core
6224 (name "java-eclipse-compare-core")
6228 (uri (string-append "https://repo1.maven.org/maven2/"
6229 "org/eclipse/platform/org.eclipse.compare.core/"
6230 version "/org.eclipse.compare.core-"
6231 version "-sources.jar"))
6234 "10g37r0pbiffyv2wk35c6g5lwzkdipkl0kkjp41v84dln46xm4dg"))))
6235 (build-system ant-build-system)
6237 `(#:tests? #f ; no tests included
6238 #:jar-name "eclipse-compare-core.jar"))
6240 `(("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
6241 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6242 ("java-eclipse-osgi" ,java-eclipse-osgi)
6243 ("java-icu4j" ,java-icu4j)))
6244 (home-page "https://www.eclipse.org/")
6245 (synopsis "Eclipse core compare support")
6246 (description "This package provides the Eclipse core compare support
6247 module @code{org.eclipse.compare.core}.")
6248 (license license:epl1.0)))
6250 (define-public java-eclipse-team-core
6252 (name "java-eclipse-team-core")
6256 (uri (string-append "https://repo1.maven.org/maven2/"
6257 "org/eclipse/platform/org.eclipse.team.core/"
6258 version "/org.eclipse.team.core-"
6259 version "-sources.jar"))
6262 "02j2jzqgb26zx2d5ahxmvijw6j4r0la90zl5c3i65x6z19ciyam7"))))
6263 (build-system ant-build-system)
6265 `(#:tests? #f ; no tests included
6266 #:jar-name "eclipse-team-core.jar"))
6268 `(("java-eclipse-compare-core" ,java-eclipse-compare-core)
6269 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
6270 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
6271 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
6272 ("java-eclipse-core-resources" ,java-eclipse-core-resources)
6273 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
6274 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6275 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6276 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6277 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6278 (home-page "https://www.eclipse.org/platform")
6279 (synopsis "Eclipse team support core")
6280 (description "This package provides the Eclipse team support core module
6281 @code{org.eclipse.team.core}.")
6282 (license license:epl1.0)))
6284 (define-public java-eclipse-core-commands
6286 (name "java-eclipse-core-commands")
6290 (uri (string-append "https://repo1.maven.org/maven2/"
6291 "org/eclipse/platform/org.eclipse.core.commands/"
6292 version "/org.eclipse.core.commands-"
6293 version "-sources.jar"))
6296 "0yjn482qndcfrsq3jd6vnhcylp16420f5aqkrwr8spsprjigjcr9"))))
6297 (build-system ant-build-system)
6299 `(#:tests? #f ; no tests included
6300 #:jar-name "eclipse-core-commands.jar"))
6302 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)))
6303 (home-page "https://www.eclipse.org/platform")
6304 (synopsis "Eclipse core commands")
6305 (description "This package provides Eclipse core commands in the module
6306 @code{org.eclipse.core.commands}.")
6307 (license license:epl1.0)))
6309 (define-public java-eclipse-text
6311 (name "java-eclipse-text")
6315 (uri (string-append "https://repo1.maven.org/maven2/"
6316 "org/eclipse/platform/org.eclipse.text/"
6317 version "/org.eclipse.text-"
6318 version "-sources.jar"))
6321 "0scz70vzz5qs5caji9f5q01vkqnvip7dpri1q07l8wbbdcxn4cq1"))))
6322 (build-system ant-build-system)
6324 `(#:tests? #f ; no tests included
6325 #:jar-name "eclipse-text.jar"
6327 (modify-phases %standard-phases
6328 ;; When creating a new category we must make sure that the new list
6329 ;; matches List<Position>. By default it seems to be too generic
6330 ;; (ArrayList<Object>), so we specialize it to ArrayList<Position>.
6331 ;; Without this we get this error:
6333 ;; [javac] .../src/org/eclipse/jface/text/AbstractDocument.java:376:
6334 ;; error: method put in interface Map<K,V> cannot be applied to given types;
6335 ;; [javac] fPositions.put(category, new ArrayList<>());
6337 ;; [javac] required: String,List<Position>
6338 ;; [javac] found: String,ArrayList<Object>
6339 ;; [javac] reason: actual argument ArrayList<Object> cannot be converted
6340 ;; to List<Position> by method invocation conversion
6341 ;; [javac] where K,V are type-variables:
6342 ;; [javac] K extends Object declared in interface Map
6343 ;; [javac] V extends Object declared in interface Map
6345 ;; I don't know if this is a good fix. I suspect it is not, but it
6347 (add-after 'unpack 'fix-compilation-error
6349 (substitute* "src/org/eclipse/jface/text/AbstractDocument.java"
6350 (("Positions.put\\(category, new ArrayList<>\\(\\)\\);")
6351 "Positions.put(category, new ArrayList<Position>());"))
6354 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6355 ("java-eclipse-core-commands" ,java-eclipse-core-commands)
6356 ("java-icu4j" ,java-icu4j)))
6357 (home-page "http://www.eclipse.org/platform")
6358 (synopsis "Eclipse text library")
6359 (description "Platform Text is part of the Platform UI project and
6360 provides the basic building blocks for text and text editors within Eclipse
6361 and contributes the Eclipse default text editor.")
6362 (license license:epl1.0)))
6364 (define-public java-eclipse-jdt-core
6366 (name "java-eclipse-jdt-core")
6370 (uri (string-append "https://repo1.maven.org/maven2/"
6371 "org/eclipse/jdt/org.eclipse.jdt.core/"
6372 version "/org.eclipse.jdt.core-"
6373 version "-sources.jar"))
6376 "1g560yr9v2kzv34gc2m3ifpgnj7krcdd6h4gd4z83pwqacwkfz0k"))))
6377 (build-system ant-build-system)
6379 `(#:tests? #f ; no tests included
6380 #:jar-name "eclipse-jdt-core.jar"
6382 (modify-phases %standard-phases
6383 (add-after 'unpack 'move-sources
6385 (with-directory-excursion "src/jdtCompilerAdaptersrc/"
6386 (for-each (lambda (file)
6387 (install-file file (string-append "../" (dirname file))))
6388 (find-files "." ".*")))
6389 (delete-file-recursively "src/jdtCompilerAdaptersrc/")
6391 (add-before 'build 'copy-resources
6393 (with-directory-excursion "src"
6394 (for-each (lambda (file)
6395 (install-file file (string-append "../build/classes/" (dirname file))))
6396 (find-files "." ".*.(props|properties|rsc)")))
6399 `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
6400 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
6401 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
6402 ("java-eclipse-core-resources" ,java-eclipse-core-resources)
6403 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
6404 ("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
6405 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6406 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6407 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6408 ("java-eclipse-osgi" ,java-eclipse-osgi)
6409 ("java-eclipse-text" ,java-eclipse-text)))
6410 (home-page "https://www.eclipse.org/jdt")
6411 (synopsis "Java development tools core libraries")
6412 (description "This package provides the core libraries of the Eclipse Java
6413 development tools.")
6414 (license license:epl1.0)))
6416 (define-public java-eclipse-jdt-compiler-apt
6418 (name "java-eclipse-jdt-compiler-apt")
6422 (uri (string-append "https://repo1.maven.org/maven2/"
6423 "org/eclipse/jdt/org.eclipse.jdt.compiler.apt/"
6424 version "/org.eclipse.jdt.compiler.apt-"
6425 version "-sources.jar"))
6428 "1s285k9p2ixdqrknb40jbbvw682n9a7l5lqpn583a8pvlzg2l6r8"))))
6429 (build-system ant-build-system)
6431 `(#:tests? #f ; no tests included
6432 #:jar-name "eclipse-jdt-compiler-apt.jar"
6435 `(("java-eclipse-jdt-core" ,java-eclipse-jdt-core)))
6436 (home-page "https://www.eclipse.org/jdt/apt/")
6437 (synopsis "Annotation processing tool")
6438 (description "APT stands for Annotation Processing Tool. APT provides a
6439 means for generating files and compiling new Java classes based on annotations
6440 found in your source code.")
6441 (license license:epl2.0)))
6443 (define-public java-javax-mail
6445 (name "java-javax-mail")
6449 (uri (string-append "https://repo1.maven.org/maven2/"
6450 "com/sun/mail/javax.mail/"
6451 version "/javax.mail-"
6452 version "-sources.jar"))
6455 "0sdlfgsc2b5s89xv1261y8i0jijcja019k2x1c8ngfn582w4jly9"))))
6456 (build-system ant-build-system)
6458 `(#:tests? #f ; no tests
6459 #:jar-name "javax-mail.jar"))
6460 (home-page "https://javamail.java.net")
6461 (synopsis "Reference implementation of the JavaMail API")
6463 "This package provides versions of the JavaMail API implementation, IMAP,
6464 SMTP, and POP3 service providers, some examples, and documentation for the
6466 ;; GPLv2 only with "classpath exception".
6467 (license license:gpl2)))
6469 (define-public java-log4j-api
6471 (name "java-log4j-api")
6475 (uri (string-append "mirror://apache/logging/log4j/" version
6476 "/apache-log4j-" version "-src.tar.gz"))
6479 "0j5p9gik0jysh37nlrckqbky12isy95cpwg2gv5fas1rcdqbraxd"))))
6480 (build-system ant-build-system)
6482 `(#:tests? #f ; tests require unpackaged software
6483 #:jar-name "log4j-api.jar"
6485 (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out")
6488 (modify-phases %standard-phases
6489 (add-after 'unpack 'enter-dir
6490 (lambda _ (chdir "log4j-api") #t))
6491 ;; FIXME: The tests require additional software that has not been
6492 ;; packaged yet, such as
6493 ;; * org.apache.maven
6494 ;; * org.apache.felix
6495 (add-after 'enter-dir 'delete-tests
6496 (lambda _ (delete-file-recursively "src/test") #t)))))
6498 `(("java-osgi-core" ,java-osgi-core)
6499 ("java-hamcrest-core" ,java-hamcrest-core)
6500 ("java-junit" ,java-junit)))
6501 (home-page "http://logging.apache.org/log4j/2.x/")
6502 (synopsis "API module of the Log4j logging framework for Java")
6504 "This package provides the API module of the Log4j logging framework for
6506 (license license:asl2.0)))
6508 (define-public java-log4j-core
6510 (inherit java-log4j-api)
6511 (name "java-log4j-core")
6513 `(("java-osgi-core" ,java-osgi-core)
6514 ("java-hamcrest-core" ,java-hamcrest-core)
6515 ("java-log4j-api" ,java-log4j-api)
6516 ("java-mail" ,java-mail)
6517 ("java-jboss-jms-api-spec" ,java-jboss-jms-api-spec)
6518 ("java-lmax-disruptor" ,java-lmax-disruptor)
6519 ("java-kafka" ,java-kafka-clients)
6520 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
6521 ("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
6522 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
6523 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)
6524 ("java-fasterxml-jackson-dataformat-xml" ,java-fasterxml-jackson-dataformat-xml)
6525 ("java-fasterxml-jackson-dataformat-yaml" ,java-fasterxml-jackson-dataformat-yaml)
6526 ("java-commons-compress" ,java-commons-compress)
6527 ("java-commons-csv" ,java-commons-csv)
6528 ("java-jeromq" ,java-jeromq)
6529 ("java-junit" ,java-junit)))
6531 `(("hamcrest" ,java-hamcrest-all)
6532 ("java-commons-io" ,java-commons-io)
6533 ("java-commons-lang3" ,java-commons-lang3)
6534 ("slf4j" ,java-slf4j-api)))
6536 `(#:tests? #f ; tests require more dependencies
6537 #:test-dir "src/test"
6538 #:source-dir "src/main/java"
6539 #:jar-name "log4j-core.jar"
6542 (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out")
6545 (modify-phases %standard-phases
6546 (add-after 'unpack 'enter-dir
6547 (lambda _ (chdir "log4j-core") #t)))))
6548 (synopsis "Core component of the Log4j framework")
6549 (description "This package provides the core component of the Log4j
6550 logging framework for Java.")))
6552 (define-public java-log4j-1.2-api
6554 (inherit java-log4j-api)
6555 (name "java-log4j-1.2-api")
6557 `(#:jar-name "java-log4j-1.2-api.jar"
6558 #:source-dir "log4j-1.2-api/src/main/java"
6560 ;; Tests require maven-model (and other maven subprojects), which is a
6561 ;; cyclic dependency.
6564 `(("log4j-api" ,java-log4j-api)
6565 ("log4j-core" ,java-log4j-core)
6566 ("osgi-core" ,java-osgi-core)
6567 ("eclipse-osgi" ,java-eclipse-osgi)
6568 ("java-lmax-disruptor" ,java-lmax-disruptor)))))
6570 (define-public java-commons-cli
6572 (name "java-commons-cli")
6576 (uri (string-append "mirror://apache/commons/cli/source/"
6577 "commons-cli-" version "-src.tar.gz"))
6580 "05hgi2z01fqz374y719gl1dxzqvzci5af071zm7vxrjg9vczipm1"))))
6581 (build-system ant-build-system)
6584 `(#:jar-name "commons-cli.jar"))
6586 `(("java-junit" ,java-junit)
6587 ("java-hamcrest-core" ,java-hamcrest-core)))
6588 (home-page "http://commons.apache.org/cli/")
6589 (synopsis "Command line arguments and options parsing library")
6590 (description "The Apache Commons CLI library provides an API for parsing
6591 command line options passed to programs. It is also able to print help
6592 messages detailing the options available for a command line tool.
6594 Commons CLI supports different types of options:
6597 @item POSIX like options (ie. tar -zxvf foo.tar.gz)
6598 @item GNU like long options (ie. du --human-readable --max-depth=1)
6599 @item Java like properties (ie. java -Djava.awt.headless=true Foo)
6600 @item Short options with value attached (ie. gcc -O2 foo.c)
6601 @item long options with single hyphen (ie. ant -projecthelp)
6604 This is a part of the Apache Commons Project.")
6605 (license license:asl2.0)))
6607 (define-public java-commons-codec
6609 (name "java-commons-codec")
6613 (uri (string-append "mirror://apache/commons/codec/source/"
6614 "commons-codec-" version "-src.tar.gz"))
6617 "1w9qg30y4s0x8gnmr2fgj4lyplfn788jqxbcz27lf5kbr6n8xr65"))))
6618 (build-system ant-build-system)
6619 (outputs '("out" "doc"))
6621 `(#:test-target "test"
6623 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
6624 (junit (assoc-ref %build-inputs "java-junit")))
6625 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
6626 (string-append "-Dhamcrest.jar=" hamcrest
6627 "/share/java/hamcrest-core.jar")
6628 ;; Do not append version to jar.
6629 "-Dfinal.name=commons-codec"))
6631 (modify-phases %standard-phases
6632 (add-after 'build 'build-javadoc ant-build-javadoc)
6633 (replace 'install (install-jars "dist"))
6634 (add-after 'install 'install-doc (install-javadoc "dist/docs/api")))))
6636 `(("java-junit" ,java-junit)
6637 ("java-hamcrest-core" ,java-hamcrest-core)))
6638 (home-page "http://commons.apache.org/codec/")
6639 (synopsis "Common encoders and decoders such as Base64, Hex, Phonetic and URLs")
6640 (description "The codec package contains simple encoder and decoders for
6641 various formats such as Base64 and Hexadecimal. In addition to these widely
6642 used encoders and decoders, the codec package also maintains a collection of
6643 phonetic encoding utilities.
6645 This is a part of the Apache Commons Project.")
6646 (license license:asl2.0)))
6648 (define-public java-commons-daemon
6650 (name "java-commons-daemon")
6654 (uri (string-append "mirror://apache/commons/daemon/source/"
6655 "commons-daemon-" version "-src.tar.gz"))
6658 "141gkhfzv5v3pdhic6y4ardq2dhsa3v36j8wmmhy6f8mac48fp7n"))))
6659 (build-system ant-build-system)
6661 `(#:test-target "test"
6663 (modify-phases %standard-phases
6664 (add-after 'build 'build-javadoc ant-build-javadoc)
6665 (replace 'install (install-jars "dist"))
6666 (add-after 'install 'install-doc (install-javadoc "dist/docs/api")))))
6668 `(("java-junit" ,java-junit)))
6669 (home-page "http://commons.apache.org/daemon/")
6670 (synopsis "Library to launch Java applications as daemons")
6671 (description "The Daemon package from Apache Commons can be used to
6672 implement Java applications which can be launched as daemons. For example the
6673 program will be notified about a shutdown so that it can perform cleanup tasks
6674 before its process of execution is destroyed by the operation system.
6676 This package contains the Java library. You will also need the actual binary
6677 for your architecture which is provided by the jsvc package.
6679 This is a part of the Apache Commons Project.")
6680 (license license:asl2.0)))
6682 (define-public java-javaewah
6684 (name "java-javaewah")
6688 (uri (string-append "https://github.com/lemire/javaewah/"
6689 "archive/JavaEWAH-" version ".tar.gz"))
6692 "1n7j1r1h24wlhwv9zdcj6yqjrhma2ixwyzm15l5vrv6yqjs6753b"))))
6693 (build-system ant-build-system)
6694 (arguments `(#:jar-name "javaewah.jar"))
6696 `(("java-junit" ,java-junit)
6697 ("java-hamcrest-core" ,java-hamcrest-core)))
6698 (home-page "https://github.com/lemire/javaewah")
6699 (synopsis "Compressed alternative to the Java @code{BitSet} class")
6700 (description "This is a word-aligned compressed variant of the Java
6701 @code{Bitset} class. It provides both a 64-bit and a 32-bit RLE-like
6702 compression scheme. It can be used to implement bitmap indexes.
6704 The goal of word-aligned compression is not to achieve the best compression,
6705 but rather to improve query processing time. Hence, JavaEWAH tries to save CPU
6706 cycles, maybe at the expense of storage. However, the EWAH scheme is always
6707 more efficient storage-wise than an uncompressed bitmap (as implemented in the
6708 @code{BitSet} class by Sun).")
6709 ;; GPL2.0 derivates are explicitly allowed.
6710 (license license:asl2.0)))
6712 (define-public java-slf4j-api
6714 (name "java-slf4j-api")
6718 (uri (string-append "https://www.slf4j.org/dist/slf4j-"
6722 "13j51sgzmhhdrfa74gkal5zpip7r1440dh7zsi2c8bpb2zs1v8kb"))
6723 (modules '((guix build utils)))
6724 ;; Delete bundled jars.
6727 (for-each delete-file (find-files "." "\\.jar$"))
6729 (build-system ant-build-system)
6731 `(#:jar-name "slf4j-api.jar"
6732 #:source-dir "slf4j-api/src/main"
6733 #:test-dir "slf4j-api/src/test"
6735 (modify-phases %standard-phases
6736 (add-after 'build 'regenerate-jar
6738 ;; pom.xml ignores these files in the jar creation process. If we don't,
6739 ;; we get the error "This code should have never made it into slf4j-api.jar"
6740 (delete-file-recursively "build/classes/org/slf4j/impl")
6741 (invoke "jar" "-cf" "build/jar/slf4j-api.jar" "-C"
6742 "build/classes" ".")))
6743 (add-before 'check 'dont-test-abstract-classes
6745 ;; abstract classes are not meant to be run with junit
6746 (substitute* "build.xml"
6747 (("<include name=\"\\*\\*/\\*Test.java\" />")
6748 (string-append "<include name=\"**/*Test.java\" />"
6749 "<exclude name=\"**/MultithreadedInitializationTest"
6753 `(("java-junit" ,java-junit)
6754 ("java-hamcrest-core" ,java-hamcrest-core)))
6755 (home-page "https://www.slf4j.org/")
6756 (synopsis "Simple logging facade for Java")
6757 (description "The Simple Logging Facade for Java (SLF4J) serves as a
6758 simple facade or abstraction for various logging
6759 frameworks (e.g. @code{java.util.logging}, @code{logback}, @code{log4j})
6760 allowing the end user to plug in the desired logging framework at deployment
6762 (license license:expat)))
6764 (define java-slf4j-api-bootstrap
6766 (inherit java-slf4j-api)
6767 (name "java-slf4j-api-bootstrap")
6770 (substitute-keyword-arguments (package-arguments java-slf4j-api)
6771 ((#:tests? _ #f) #f)))))
6773 (define-public java-slf4j-simple
6775 (name "java-slf4j-simple")
6777 (source (package-source java-slf4j-api))
6778 (build-system ant-build-system)
6780 `(#:jar-name "slf4j-simple.jar"
6781 #:source-dir "slf4j-simple/src/main"
6782 #:test-dir "slf4j-simple/src/test"
6784 (modify-phases %standard-phases
6785 ;; The tests need some test classes from slf4j-api
6786 (add-before 'check 'build-slf4j-api-test-helpers
6788 ;; Add current dir to CLASSPATH ...
6790 (string-append (getcwd) ":" (getenv "CLASSPATH")))
6791 ;; ... and build test helper classes here:
6794 ,@(find-files "slf4j-api/src/test" ".*\\.java"))))))))
6796 `(("java-junit" ,java-junit)
6797 ("java-hamcrest-core" ,java-hamcrest-core)
6798 ("java-slf4j-api" ,java-slf4j-api)))
6799 (home-page "https://www.slf4j.org/")
6800 (synopsis "Simple implementation of simple logging facade for Java")
6801 (description "SLF4J binding for the Simple implementation, which outputs
6802 all events to System.err. Only messages of level INFO and higher are
6804 (license license:expat)))
6806 (define-public antlr2
6812 (uri (string-append "http://www.antlr2.org/download/antlr-"
6816 "1ffvcwdw73id0dk6pj2mlxjvbg0662qacx4ylayqcxgg381fnfl5"))
6817 (modules '((guix build utils)))
6820 (delete-file "antlr.jar")
6821 (substitute* "lib/cpp/antlr/CharScanner.hpp"
6825 "#define EOF (-1)\n"
6826 "#include <strings.h>")))
6827 (substitute* "configure"
6830 (build-system gnu-build-system)
6832 `(#:tests? #f ; no test target
6833 #:imported-modules ((guix build ant-build-system)
6834 (guix build syscalls)
6835 ,@%gnu-build-system-modules)
6836 #:modules (((guix build ant-build-system) #:prefix ant:)
6837 (guix build gnu-build-system)
6840 (modify-phases %standard-phases
6841 (add-after 'install 'strip-jar-timestamps
6842 (assoc-ref ant:%standard-phases 'strip-jar-timestamps))
6843 (add-before 'configure 'fix-timestamp
6845 (substitute* "configure"
6846 (("^TIMESTAMP.*") "TIMESTAMP=19700101\n"))
6848 (add-after 'configure 'fix-bin-ls
6850 (substitute* (find-files "." "Makefile")
6856 ("java" ,icedtea "jdk")))
6858 `(("java" ,icedtea)))
6859 (home-page "http://www.antlr2.org")
6860 (synopsis "Framework for constructing recognizers, compilers, and translators")
6861 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
6862 is a language tool that provides a framework for constructing recognizers,
6863 compilers, and translators from grammatical descriptions containing Java, C#,
6864 C++, or Python actions. ANTLR provides excellent support for tree construction,
6865 tree walking, and translation.")
6866 (license license:public-domain)))
6868 (define-public java-stringtemplate-3
6870 (name "java-stringtemplate")
6874 (uri (string-append "https://github.com/antlr/website-st4/raw/"
6875 "gh-pages/download/stringtemplate-"
6879 "086yj68np1vqhkj7483diz3km6s6y4gmwqswa7524a0ca6vxn2is"))))
6880 (build-system ant-build-system)
6882 `(#:jar-name (string-append ,name "-" ,version ".jar")
6884 #:modules ((guix build ant-build-system)
6888 (modify-phases %standard-phases
6889 (add-before 'check 'fix-tests
6891 (substitute* "build.xml"
6892 (("\\$\\{test.home\\}/java")
6893 "${test.home}/org"))
6895 (add-before 'build 'generate-grammar
6897 (with-directory-excursion "src/org/antlr/stringtemplate/language/"
6898 (for-each (lambda (file)
6899 (format #t "~a\n" file)
6900 (invoke "antlr" file))
6901 '("template.g" "angle.bracket.template.g" "action.g"
6902 "eval.g" "group.g" "interface.g")))
6906 ("java-junit" ,java-junit)))
6907 (home-page "http://www.stringtemplate.org")
6908 (synopsis "Template engine to generate formatted text output")
6909 (description "StringTemplate is a java template engine (with ports for C#,
6910 Objective-C, JavaScript, Scala) for generating source code, web pages, emails,
6911 or any other formatted text output. StringTemplate is particularly good at
6912 code generators, multiple site skins, and internationalization / localization.
6913 StringTemplate also powers ANTLR.")
6914 (license license:bsd-3)))
6916 ;; antlr3 is partially written using antlr3 grammar files. It also depends on
6917 ;; ST4 (stringtemplate4), which is also partially written using antlr3 grammar
6918 ;; files and uses antlr3 at runtime. The latest version requires a recent version
6919 ;; of antlr3 at runtime.
6920 ;; Fortunately, ST4 4.0.6 can be built with an older antlr3, and we use antlr3.3.
6921 ;; This version of ST4 is sufficient for the latest antlr3.
6922 ;; We use ST4 4.0.6 to build a boostrap antlr3 (latest version), and build
6923 ;; the latest ST4 with it. Then we build our final antlr3 that will be linked
6924 ;; against the latest ST4.
6925 ;; antlr3.3 still depends on antlr3 to generate some files, so we use an
6926 ;; even older version, antlr3.1, to generate them. Fortunately antlr3.1 uses
6927 ;; only grammar files with the antlr2 syntax.
6928 ;; So we build antlr3.1 -> antlr3.3 -> ST4.0.6 -> antlr3-bootstrap -> ST4 -> antlr3.
6930 (define-public java-stringtemplate
6931 (package (inherit java-stringtemplate-3)
6932 (name "java-stringtemplate")
6936 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/"
6938 (file-name (string-append name "-" version ".tar.gz"))
6941 "1pri8hqa95rfdkjy55icl5q1m09zwp5k67ib14abas39s4v3w087"))))
6942 (build-system ant-build-system)
6944 `(#:jar-name (string-append ,name "-" ,version ".jar")
6945 #:tests? #f ; FIXME: tests fail for unknown reasons
6947 #:modules ((guix build ant-build-system)
6951 (modify-phases %standard-phases
6952 (add-before 'check 'fix-test-target
6954 (substitute* "build.xml"
6955 (("\\$\\{test.home\\}/java") "${test.home}/")
6956 (("\\*Test.java") "Test*.java"))
6958 (add-before 'build 'generate-grammar
6960 (with-directory-excursion "src/org/stringtemplate/v4/compiler/"
6961 (for-each (lambda (file)
6962 (format #t "~a\n" file)
6963 (invoke "antlr3" file))
6964 '("STParser.g" "Group.g" "CodeGenerator.g")))
6967 `(("antlr3" ,antlr3-bootstrap)
6969 ("java-stringtemplate" ,java-stringtemplate-3)
6970 ("java-junit" ,java-junit)))))
6972 (define java-stringtemplate-4.0.6
6973 (package (inherit java-stringtemplate)
6974 (name "java-stringtemplate")
6978 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/ST-"
6980 (file-name (string-append name "-" version ".tar.gz"))
6983 "0hjmh1ahdsh3w825i67mli9l4nncc4l6hdbf9ma91jvlj590sljp"))))
6985 `(("antlr3" ,antlr3-3.3)
6987 ("java-stringtemplate" ,java-stringtemplate-3)))))
6989 (define-public antlr3
6995 (uri (string-append "https://github.com/antlr/antlr3/archive/"
6997 (file-name (string-append name "-" version ".tar.gz"))
7000 "0218v683081lg54z9hvjxinhxd4dqp870jx6n39gslm0bkyi4vd6"))))
7001 (build-system ant-build-system)
7003 `(#:jar-name (string-append ,name "-" ,version ".jar")
7004 #:source-dir "tool/src/main/java:runtime/Java/src/main/java:tool/src/main/antlr3"
7007 (modify-phases %standard-phases
7008 (add-after 'install 'bin-install
7009 (lambda* (#:key inputs outputs #:allow-other-keys)
7010 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
7011 (bin (string-append (assoc-ref outputs "out") "/bin")))
7013 (with-output-to-file (string-append bin "/antlr3")
7016 (string-append "#!" (which "sh") "\n"
7017 "java -cp " jar "/" ,name "-" ,version ".jar:"
7019 (find-files (assoc-ref inputs "stringtemplate")
7023 (find-files (assoc-ref inputs "stringtemplate4")
7027 (find-files (string-append
7028 (assoc-ref inputs "antlr")
7031 " org.antlr.Tool $*"))))
7032 (chmod (string-append bin "/antlr3") #o755))
7034 (add-before 'build 'generate-grammar
7036 (chdir "tool/src/main/antlr3/org/antlr/grammar/v3/")
7037 (for-each (lambda (file)
7040 (invoke "antlr3" file))
7041 '("ANTLR.g" "ANTLRTreePrinter.g" "ActionAnalysis.g"
7042 "AssignTokenTypesWalker.g"
7043 "ActionTranslator.g" "TreeToNFAConverter.g"
7044 "ANTLRv3.g" "ANTLRv3Tree.g" "LeftRecursiveRuleWalker.g"
7045 "CodeGenTreeWalker.g" "DefineGrammarItemsWalker.g"))
7046 (substitute* "ANTLRParser.java"
7047 (("public Object getTree") "public GrammarAST getTree"))
7048 (substitute* "ANTLRv3Parser.java"
7049 (("public Object getTree") "public CommonTree getTree"))
7050 (chdir "../../../../../java")
7051 (substitute* "org/antlr/tool/LeftRecursiveRuleAnalyzer.java"
7052 (("import org.antlr.grammar.v3.\\*;") "import org.antlr.grammar.v3.*;
7053 import org.antlr.grammar.v3.ANTLRTreePrinter;"))
7054 (substitute* "org/antlr/tool/ErrorManager.java"
7055 (("case NO_SUCH_ATTRIBUTE_PASS_THROUGH:") ""))
7056 (chdir "../../../..")
7058 (add-before 'build 'fix-build-xml
7060 (substitute* "build.xml"
7061 (("target name=\"compile\">")
7062 "target name=\"compile\">
7063 <copy todir=\"${classes.dir}\">
7064 <fileset dir=\"tool/src/main/resources\">
7065 <include name=\"**/*.stg\"/>
7066 <include name=\"**/*.st\"/>
7067 <include name=\"**/*.sti\"/>
7068 <include name=\"**/STLexer.tokens\"/>
7074 ("antlr3" ,antlr3-bootstrap)))
7076 `(("junit" ,java-junit)
7077 ("stringtemplate" ,java-stringtemplate-3)
7078 ("stringtemplate4" ,java-stringtemplate)))
7080 `(("stringtemplate" ,java-stringtemplate-3)
7082 ("stringtemplate4" ,java-stringtemplate-4.0.6)))
7083 (home-page "http://www.antlr3.org")
7084 (synopsis "Framework for constructing recognizers, compilers, and translators")
7085 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
7086 is a language tool that provides a framework for constructing recognizers,
7087 compilers, and translators from grammatical descriptions containing Java, C#,
7088 C++, or Python actions. ANTLR provides excellent support for tree construction,
7089 tree walking, and translation.")
7090 (license license:bsd-3)))
7092 (define antlr3-bootstrap
7095 (name "antlr3-bootstrap")
7098 ("antlr3" ,antlr3-3.3)))
7100 `(("junit" ,java-junit)))))
7109 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
7110 "gh-pages/download/antlr-"
7114 "0qgg5vgsm4l1d6dj9pfbaa25dpv2ry2gny8ajy4vvgvfklw97b3m"))
7116 (search-patches "antlr3-3_3-fix-java8-compilation.patch"))))
7118 `(#:jar-name (string-append ,name "-" ,version ".jar")
7119 #:source-dir (string-join '("tool/src/main/java"
7120 "runtime/Java/src/main/java"
7121 "tool/src/main/antlr2"
7122 "tool/src/main/antlr3")
7124 #:tests? #f ; FIXME: tests seem to require maven plugin
7125 #:modules ((guix build ant-build-system)
7129 (modify-phases %standard-phases
7130 (add-after 'install 'bin-install
7131 (lambda* (#:key inputs outputs #:allow-other-keys)
7132 (let* ((out (assoc-ref outputs "out"))
7133 (jar (string-append out "/share/java"))
7134 (bin (string-append out "/bin")))
7136 (with-output-to-file (string-append bin "/antlr3")
7140 "#!" (which "sh") "\n"
7141 "java -cp " jar "/antlr3-3.3.jar:"
7143 (append (find-files (assoc-ref inputs "java-stringtemplate")
7145 (find-files (string-append (assoc-ref inputs "antlr")
7149 " org.antlr.Tool $*"))))
7150 (chmod (string-append bin "/antlr3") #o755)
7152 (add-before 'build 'generate-grammar
7154 (substitute* "tool/src/main/java/org/antlr/tool/Grammar.java"
7155 (("import org.antlr.grammar.v2.\\*;")
7156 "import org.antlr.grammar.v2.*;\n
7157 import org.antlr.grammar.v2.TreeToNFAConverter;\n
7158 import org.antlr.grammar.v2.DefineGrammarItemsWalker;\n
7159 import org.antlr.grammar.v2.ANTLRTreePrinter;"))
7160 (with-directory-excursion "tool/src/main/antlr2/org/antlr/grammar/v2/"
7161 (for-each (lambda (file)
7162 (format #t "~a\n" file)
7163 (invoke "antlr" file))
7164 '("antlr.g" "antlr.print.g" "assign.types.g"
7165 "buildnfa.g" "codegen.g" "define.g")))
7166 (with-directory-excursion "tool/src/main/antlr3/org/antlr/grammar/v3/"
7167 (for-each (lambda (file)
7168 (format #t "~a\n" file)
7169 (invoke "antlr3" file))
7170 '("ActionAnalysis.g" "ActionTranslator.g" "ANTLRv3.g"
7173 (add-before 'build 'fix-build-xml
7175 (substitute* "build.xml"
7176 (("target name=\"compile\">")
7177 "target name=\"compile\">
7178 <copy todir=\"${classes.dir}\">
7179 <fileset dir=\"tool/src/main/resources\">
7180 <include name=\"**/*.stg\"/>
7181 <include name=\"**/*.st\"/>
7182 <include name=\"**/*.sti\"/>
7183 <include name=\"**/STLexer.tokens\"/>
7189 ("antlr3" ,antlr3-3.1)))
7191 `(("junit" ,java-junit)))
7193 `(("java-stringtemplate" ,java-stringtemplate-3)
7195 ("antlr3" ,antlr3-3.1)))))
7197 (define-public antlr3-3.1
7203 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
7204 "gh-pages/download/antlr-"
7208 "0sfimc9cpbgrihz4giyygc8afgpma2c93yqpwb951giriri6x66z"))
7210 (search-patches "antlr3-3_1-fix-java8-compilation.patch"))))
7212 `(#:jar-name (string-append "antlr3-" ,version ".jar")
7213 #:source-dir "src:runtime/Java/src"
7216 (modify-phases %standard-phases
7217 (add-after 'install 'bin-install
7218 (lambda* (#:key inputs outputs #:allow-other-keys)
7219 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
7220 (bin (string-append (assoc-ref outputs "out") "/bin")))
7222 (with-output-to-file (string-append bin "/antlr3")
7225 (string-append "#!" (which "sh") "\n"
7226 "java -cp " jar "/antlr3-3.1.jar:"
7228 (find-files (assoc-ref inputs "stringtemplate")
7232 (find-files (string-append
7233 (assoc-ref inputs "antlr")
7236 " org.antlr.Tool $*"))))
7237 (chmod (string-append bin "/antlr3") #o755))
7239 (add-before 'build 'generate-grammar
7241 (let ((dir "src/org/antlr/tool/"))
7242 (for-each (lambda (file)
7245 (invoke "antlr" "-o" dir (string-append dir file)))
7246 '("antlr.g" "antlr.print.g" "assign.types.g"
7247 "buildnfa.g" "define.g")))
7248 (format #t "codegen.g\n")
7249 (invoke "antlr" "-o" "src/org/antlr/codegen"
7250 "src/org/antlr/codegen/codegen.g")
7252 (add-before 'build 'fix-build-xml
7254 (substitute* "build.xml"
7255 (("target name=\"compile\">")
7256 "target name=\"compile\">
7257 <copy todir=\"${classes.dir}\">
7258 <fileset dir=\"src\">
7259 <include name=\"**/*.stg\"/>
7260 <include name=\"**/*.st\"/>
7261 <include name=\"**/*.sti\"/>
7262 <include name=\"**/STLexer.tokens\"/>
7267 `(("antlr" ,antlr2)))
7269 `(("junit" ,java-junit)))
7271 `(("stringtemplate" ,java-stringtemplate-3)))))
7273 (define-public java-commons-cli-1.2
7274 ;; This is a bootstrap dependency for Maven2.
7276 (inherit java-commons-cli)
7280 (uri (string-append "mirror://apache/commons/cli/source/"
7281 "commons-cli-" version "-src.tar.gz"))
7284 "0rvfgzgv2pc1m091dfj3ih9ddsjjppr1f1wf0qmc3bk6b1kwv2dm"))))
7286 `(#:jar-name "commons-cli.jar"
7288 (modify-phases %standard-phases
7289 (add-before 'check 'fix-build-xml
7290 (lambda* (#:key inputs #:allow-other-keys)
7291 (substitute* "build.xml"
7292 (("dir=\"\\$\\{test.home\\}/java\"")
7293 "dir=\"${test.home}\""))
7296 `(("java-junit" ,java-junit)))))
7298 (define-public java-microemulator-cldc
7300 (name "java-microemulator-cldc")
7304 (uri (string-append "https://github.com/barteo/microemu/archive/"
7306 (string-map (lambda (c) (if (char=? c #\.) #\_ c))
7309 (file-name (string-append name "-" version ".tar.gz"))
7312 "1x1apmz38gkppxnwnygwmi12j54v4p258v8ddzn6dldkk7vak1ll"))))
7313 (build-system ant-build-system)
7315 `(#:jar-name "microemulator-cldc.jar"
7316 #:source-dir "microemu-cldc/src/main/java"
7317 #:tests? #f)); Requires even older software
7318 (home-page "https://github.com/barteo/microemu")
7319 (synopsis "J2ME CLDC emulator")
7320 (description "Microemulator is a Java 2 Micro Edition (J2ME) CLDC/MIDP
7321 Emulator. It allows to demonstrate MIDlet based applications in web browser
7322 applet and can be run as a standalone java application.")
7323 (license (list license:asl2.0
7325 license:lgpl2.1+))))
7327 (define-public java-datanucleus-javax-persistence
7329 (name "java-datanucleus-javax-persistence")
7333 (uri (string-append "https://github.com/datanucleus/"
7334 "javax.persistence/archive/javax.persistence-"
7335 version "-release.tar.gz"))
7338 "11jx0fjwgc2hhbqqgdd6m1pf2fplf9vslppygax0y1z5csnqjhpx"))))
7339 (build-system ant-build-system)
7341 `(#:jar-name "java-datanucleus-javax-persistence.jar"
7343 #:source-dir "src/main/java"
7344 #:tests? #f)); no tests
7345 (home-page "https://github.com/datanucleus/javax.persistence")
7346 (synopsis "JPA API")
7347 (description "This package contains a clean definition of JPA API intended
7348 for use with DataNucleus JPA since the JCP haven't provided an official JPA API
7349 jar. See @url{http://java.net/projects/jpa-spec/downloads} for the specification
7350 used to generate this API.")
7351 (license (list license:edl1.0 license:epl1.0))))
7353 (define-public java-osgi-cmpn
7355 (name "java-osgi-cmpn")
7359 (uri (string-append "http://central.maven.org/maven2/"
7360 "org/osgi/osgi.cmpn/" version "/osgi.cmpn-"
7361 version "-sources.jar"))
7364 "1lmb6xyrmkqdhv1kayf0514rlwq6ypvs4m44ibrck3snp8241wys"))))
7365 (build-system ant-build-system)
7367 `(#:jar-name "osgi-cmpn.jar"
7368 #:tests? #f)); no tests
7370 `(("annotation" ,java-osgi-annotation)
7371 ("core" ,java-osgi-core)
7372 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
7373 ("microemulator" ,java-microemulator-cldc)
7374 ("servlet" ,java-classpathx-servletapi)))
7375 (home-page "https://www.osgi.org")
7376 (synopsis "Compendium specification module of OSGi framework")
7378 "OSGi, for Open Services Gateway initiative framework, is a module system
7379 and service platform for the Java programming language. This package contains
7380 the compendium specification module, providing interfaces and classes for use
7381 in compiling bundles.")
7382 (license license:asl2.0)))
7384 (define-public java-osgi-service-component-annotations
7386 (name "java-osgi-service-component-annotations")
7390 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7391 "org.osgi.service.component.annotations/"
7392 version "/org.osgi.service.component.annotations-"
7393 version "-sources.jar"))
7396 "15rq9cmp4fpn74q44m4j35qsqmjf5lx3hcrk6pzvbhc08igic2f0"))))
7397 (build-system ant-build-system)
7399 `(#:jar-name "osgi-service-component-annotations.jar"
7400 #:tests? #f)); no tests
7402 `(("annotation" ,java-osgi-annotation)))
7403 (home-page "https://www.osgi.org")
7404 (synopsis "Support annotations for osgi-service-component")
7406 "OSGi, for Open Services Gateway initiative framework, is a module system
7407 and service platform for the Java programming language. This package contains
7408 the support annotations for osgi-service-component.")
7409 (license license:asl2.0)))
7411 (define-public java-osgi-dto
7413 (name "java-osgi-dto")
7417 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7418 "org.osgi.dto/" version "/org.osgi.dto-"
7419 version "-sources.jar"))
7422 "0f4bqjzadn0hwk6sd3h5gvbyfp3yci1s6r0v770cc15p0pg627yr"))))
7423 (build-system ant-build-system)
7425 `(#:jar-name "osgi-dto.jar"
7426 #:tests? #f)); no tests
7428 `(("annotation" ,java-osgi-annotation)))
7429 (home-page "https://www.osgi.org")
7430 (synopsis "Data Transfer Objects")
7432 "OSGi, for Open Services Gateway initiative framework, is a module system
7433 and service platform for the Java programming language. This package contains
7434 the Data Transfer Objects. It is easily serializable having only public fields
7435 of primitive types and their wrapper classes, Strings, and DTOs. List, Set,
7436 Map and array aggregates may also be used. The aggregates must only hold
7437 objects of the listed types or aggregates.")
7438 (license license:asl2.0)))
7440 (define-public java-osgi-resource
7442 (name "java-osgi-resource")
7446 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7447 "org.osgi.resource/"
7448 version "/org.osgi.resource-"
7449 version "-sources.jar"))
7452 "0hi0fsc5v99q22bd7lrkvpz1y0ds4w9arjldpwsrcpqvz2js7q2d"))))
7453 (build-system ant-build-system)
7455 `(#:jar-name "osgi-resource.jar"
7456 #:tests? #f)); no tests
7458 `(("annotation" ,java-osgi-annotation)
7459 ("dto" ,java-osgi-dto)))
7460 (home-page "https://www.osgi.org")
7461 (synopsis "OSGI Resource")
7463 "OSGi, for Open Services Gateway initiative framework, is a module system
7464 and service platform for the Java programming language. This package contains
7465 the definition of common types in osgi packages.")
7466 (license license:asl2.0)))
7468 (define-public java-osgi-namespace-contract
7470 (name "java-osgi-namespace-contract")
7474 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7475 "org.osgi.namespace.contract/"
7476 version "/org.osgi.namespace.contract-"
7477 version "-sources.jar"))
7480 "1iz4f2i0fvqrlq90ki9nfzcfpvy2av434ri25bglywqssx8mmp36"))))
7481 (build-system ant-build-system)
7483 `(("resource" ,java-osgi-resource)
7484 ("annotation" ,java-osgi-annotation)))
7486 `(#:jar-name "osgi-namespace-contract.jar"
7487 #:tests? #f)); no tests
7488 (home-page "https://www.osgi.org")
7489 (synopsis "Contract Capability and Requirement Namespace")
7491 "OSGi, for Open Services Gateway initiative framework, is a module system
7492 and service platform for the Java programming language. This package contains
7493 the names for the attributes and directives for a namespace with contracts.")
7494 (license license:asl2.0)))
7496 (define-public java-osgi-namespace-extender
7498 (name "java-osgi-namespace-extender")
7502 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7503 "org.osgi.namespace.extender/"
7504 version "/org.osgi.namespace.extender-"
7505 version "-sources.jar"))
7508 "0jgqiak2i05qv6j3gd33xlaifzzc0ylxxk376v2x0apfg3vvixmz"))))
7509 (build-system ant-build-system)
7511 `(("resource" ,java-osgi-resource)
7512 ("annotation" ,java-osgi-annotation)))
7514 `(#:jar-name "osgi-namespace-extendent.jar"
7515 #:tests? #f)); no tests
7516 (home-page "https://www.osgi.org")
7517 (synopsis "Extender Capability and Requirement Namespace")
7519 "OSGi, for Open Services Gateway initiative framework, is a module system
7520 and service platform for the Java programming language. This package contains
7521 the names for the attributes and directives for an extender namespace.")
7522 (license license:asl2.0)))
7524 (define-public java-osgi-namespace-service
7526 (name "java-osgi-namespace-service")
7530 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7531 "org.osgi.namespace.service/"
7532 version "/org.osgi.namespace.service-"
7533 version "-sources.jar"))
7536 "0qmw8n2449nkmm56d1znz9zhazb6ya3vsimd5bf5jg23zzhgl8c8"))))
7537 (build-system ant-build-system)
7539 `(("resource" ,java-osgi-resource)
7540 ("annotation" ,java-osgi-annotation)))
7542 `(#:jar-name "osgi-namespace-service.jar"
7543 #:tests? #f)); no tests
7544 (home-page "https://www.osgi.org")
7545 (synopsis "Service Capability and Requirement Namespace")
7547 "OSGi, for Open Services Gateway initiative framework, is a module system
7548 and service platform for the Java programming language. This package contains
7549 the names for the attributes and directives for a service namespace.")
7550 (license license:asl2.0)))
7552 (define-public java-osgi-util-function
7554 (name "java-osgi-util-function")
7558 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7559 "org.osgi.util.function/"
7560 version "/org.osgi.util.function-"
7561 version "-sources.jar"))
7564 "04l7j3hwmmj28w23m7paca0afzncs42j2mdr3liqq8kvp548sc6x"))))
7565 (build-system ant-build-system)
7567 `(#:jar-name "osgi-util-function.jar"
7568 #:tests? #f)); no tests
7570 `(("annotation" ,java-osgi-annotation)))
7571 (home-page "https://www.osgi.org")
7572 (synopsis "OSGI Util Function")
7574 "OSGi, for Open Services Gateway initiative framework, is a module system
7575 and service platform for the Java programming language. This package contains
7576 an interface for a function that accepts a single argument and produces a result.")
7577 (license license:asl2.0)))
7579 (define-public java-osgi-util-promise
7581 (name "java-osgi-util-promise")
7585 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7586 "org.osgi.util.promise/"
7587 version "/org.osgi.util.promise-"
7588 version "-sources.jar"))
7591 "0y34dwiflg1c4ahvkswpf9z02xph2sr9fm04ia5493x3lshpw22c"))))
7592 (build-system ant-build-system)
7594 `(#:jar-name "osgi-util-promise.jar"
7595 #:tests? #f)); no tests
7597 `(("annotation" ,java-osgi-annotation)
7598 ("function" ,java-osgi-util-function)))
7599 (home-page "https://www.osgi.org")
7600 (synopsis "Promise of a value")
7602 "OSGi, for Open Services Gateway initiative framework, is a module system
7603 and service platform for the Java programming language. This package contains
7604 an interface and utilitary classes for promises. A Promise represents a future
7605 value. It handles the interactions for asynchronous processing.")
7606 (license license:asl2.0)))
7608 (define-public java-osgi-service-metatype-annotations
7610 (name "java-osgi-service-metatype-annotations")
7614 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7615 "org.osgi.service.metatype.annotations/"
7616 version "/org.osgi.service.metatype.annotations-"
7617 version "-sources.jar"))
7620 "12rwm3349wk80vm88rcdgs4435m4jxkpkj5mrx326skkz2c6hyw6"))))
7621 (build-system ant-build-system)
7623 `(#:jar-name "osgi-service-metatype-annotations.jar"
7624 #:tests? #f)); no tests
7626 `(("annotation" ,java-osgi-annotation)))
7627 (home-page "https://www.osgi.org")
7628 (synopsis "Support annotations for metatype")
7630 "OSGi, for Open Services Gateway initiative framework, is a module system
7631 and service platform for the Java programming language. This package contains
7632 the support annotations for metatype.")
7633 (license license:asl2.0)))
7635 (define-public java-osgi-service-repository
7637 (name "java-osgi-service-repository")
7641 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7642 "org.osgi.service.repository/"
7643 version "/org.osgi.service.repository-"
7644 version "-sources.jar"))
7647 "1k41mhg7b58pd8nsghr2qwcjrxdnf1p9spsw9v11k4257g6rl06n"))))
7648 (build-system ant-build-system)
7650 `(#:jar-name "osgi-service-repository.jar"
7651 #:tests? #f)); no tests
7653 `(("annotation" ,java-osgi-annotation)
7654 ("promise" ,java-osgi-util-promise)
7655 ("resource" ,java-osgi-resource)))
7656 (home-page "https://www.osgi.org")
7657 (synopsis "OSGI service repository")
7659 "OSGi, for Open Services Gateway initiative framework, is a module system
7660 and service platform for the Java programming language. This package contains
7661 a repository service that contains resources.")
7662 (license license:asl2.0)))
7664 (define-public java-osgi-framework
7666 (name "java-osgi-framework")
7670 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7671 "org.osgi.framework/" version "/org.osgi.framework-"
7672 version "-sources.jar"))
7675 "1lwp2zfad3rybcc6q9bwz8xsgkc92ypzy5p6x54387f1qj65m73s"))))
7676 (build-system ant-build-system)
7678 `(#:jar-name "osgi-framework.jar"
7679 #:tests? #f)); no tests
7681 `(("annotation" ,java-osgi-annotation)
7682 ("resource" ,java-osgi-resource)
7683 ("dto" ,java-osgi-dto)))
7684 (home-page "https://www.osgi.org")
7685 (synopsis "OSGi framework")
7687 "OSGi, for Open Services Gateway initiative framework, is a module system
7688 and service platform for the Java programming language.")
7689 (license license:asl2.0)))
7691 (define-public java-osgi-service-log
7693 (name "java-osgi-service-log")
7697 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7698 "org.osgi.service.log/"
7699 version "/org.osgi.service.log-"
7700 version "-sources.jar"))
7703 "1029j30dzcwializzca0j3fkhwwz08kmmsha5agw1iccscimj6r0"))))
7704 (build-system ant-build-system)
7706 `(#:jar-name "osgi-service-log.jar"
7707 #:tests? #f)); no tests
7709 `(("java-osgi-framework" ,java-osgi-framework)))
7710 (home-page "https://www.osgi.org")
7711 (synopsis "Provides methods for bundles to write messages to the log")
7713 "OSGi, for Open Services Gateway initiative framework, is a module system
7714 and service platform for the Java programming language. This package contains
7716 (license license:asl2.0)))
7718 (define-public java-osgi-service-jdbc
7720 (name "java-osgi-service-jdbc")
7724 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7725 "org.osgi.service.jdbc/"
7726 version "/org.osgi.service.jdbc-"
7727 version "-sources.jar"))
7730 "11iln5v7bk469cgb9ddkrz9sa95b3733gqgaqw9xf5g6wq652yjz"))))
7731 (build-system ant-build-system)
7733 `(#:jar-name "osgi-service-jdbc.jar"
7734 #:tests? #f)); no tests
7735 (home-page "https://www.osgi.org")
7736 (synopsis "Factory for JDBC connection factories")
7738 "OSGi, for Open Services Gateway initiative framework, is a module system
7739 and service platform for the Java programming language. This package contains
7740 a factory for JDBC connection factories. There are 3 preferred connection
7741 factories for getting JDBC connections:
7744 @item @code{javax.sql.DataSource};
7745 @item @code{javax.sql.ConnectionPoolDataSource};
7746 @item @code{javax.sql.XADataSource}.
7748 (license license:asl2.0)))
7750 (define-public java-osgi-service-resolver
7752 (name "java-osgi-service-resolver")
7756 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7757 "org.osgi.service.resolver/"
7758 version "/org.osgi.service.resolver-"
7759 version "-sources.jar"))
7762 "1dzqn1ryfi2rq4zwsgp44bmj2wlfydjg1qbxw2b0z4xdjjy55vxd"))))
7763 (build-system ant-build-system)
7765 `(#:jar-name "osgi-service-resolver.jar"
7766 #:tests? #f)); no tests
7768 `(("annotation" ,java-osgi-annotation)
7769 ("resource" ,java-osgi-resource)))
7770 (home-page "https://www.osgi.org")
7771 (synopsis "OSGI Resolver service")
7773 "OSGi, for Open Services Gateway initiative framework, is a module system
7774 and service platform for the Java programming language. This package contains
7775 a resolver service that resolves the specified resources in the context supplied
7777 (license license:asl2.0)))
7779 (define-public java-osgi-util-tracker
7781 (name "java-osgi-util-tracker")
7785 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7786 "org.osgi.util.tracker/"
7787 version "/org.osgi.util.tracker-"
7788 version "-sources.jar"))
7791 "0c4fh9vxwzsx59r8dygda0gq2gx3z5vfhc3jsphlqwf5w0h403lz"))))
7792 (build-system ant-build-system)
7794 `(#:jar-name "osgi-util-tracker.jar"
7795 #:tests? #f)); no tests
7797 `(("framework" ,java-osgi-framework)
7798 ("annotation" ,java-osgi-annotation)))
7799 (home-page "https://www.osgi.org")
7800 (synopsis "Bundle tracking")
7802 "OSGi, for Open Services Gateway initiative framework, is a module system
7803 and service platform for the Java programming language. This package contains
7804 bundle tracking utility classes.")
7805 (license license:asl2.0)))
7807 (define-public java-osgi-service-cm
7809 (name "java-osgi-service-cm")
7813 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7814 "org.osgi.service.cm/"
7815 version "/org.osgi.service.cm-"
7816 version "-sources.jar"))
7819 "1z8kap48y3xi0ggj8v6czglfnpnd94mmismgi2wbqhj1nl5fzbp6"))))
7820 (build-system ant-build-system)
7822 `(#:jar-name "osgi-service-cm.jar"
7823 #:tests? #f)); no tests
7825 `(("framework" ,java-osgi-framework)
7826 ("annotation" ,java-osgi-annotation)))
7827 (home-page "https://www.osgi.org")
7828 (synopsis "OSGI Configuration Management")
7830 "OSGi, for Open Services Gateway initiative framework, is a module system
7831 and service platform for the Java programming language. This package contains
7832 utility classes for the configuration of services.")
7833 (license license:asl2.0)))
7835 (define-public java-osgi-service-packageadmin
7837 (name "java-osgi-service-packageadmin")
7841 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7842 "org.osgi.service.packageadmin/"
7843 version "/org.osgi.service.packageadmin-"
7844 version "-sources.jar"))
7847 "041mpxzi7g36wmcily6y4ccn3jx15akpdy8gmhyb7m98x7qfvn52"))))
7848 (build-system ant-build-system)
7850 `(#:jar-name "osgi-service-packageadmin.jar"
7851 #:tests? #f)); no tests
7853 `(("framework" ,java-osgi-framework)))
7854 (home-page "https://www.osgi.org")
7855 (synopsis "OSGI Package Administration")
7857 "OSGi, for Open Services Gateway initiative framework, is a module system
7858 and service platform for the Java programming language. This package contains
7859 the packageadmin service.")
7860 (license license:asl2.0)))
7862 (define-public java-ops4j-base-lang
7864 (name "java-ops4j-base-lang")
7868 (uri (string-append "https://github.com/ops4j/org.ops4j.base/"
7869 "archive/base-" version ".tar.gz"))
7872 "18hl3lpchgpv8yh5rlk39l2gif5dlfgb8gxjmncf39pr2dprkniw"))))
7873 (build-system ant-build-system)
7875 `(#:jar-name "java-ops4j-base-lang.jar"
7876 #:source-dir "ops4j-base-lang/src/main/java"
7877 #:tests? #f; no tests
7879 (modify-phases %standard-phases
7880 (add-before 'build 'add-test-file
7882 ;; That file is required by a test in ops4j-pax-exam-core-spi
7883 (mkdir-p "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang")
7884 (with-output-to-file "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang/pom.properties"
7888 "version=" ,version "\n"
7889 "groupId=org.ops4j.base"
7890 "artifactId=ops4j-base-lang\n"))))
7892 (home-page "https://ops4j1.jira.com/wiki/spaces/base/overview")
7893 (synopsis "Utility classes and extensions to be used in OPS4J projects")
7894 (description "OPS4J stands for Open Participation Software for Java. This
7895 package contains utilities and extensions related to @code{java.lang}.")
7896 (license license:asl2.0)))
7898 (define-public java-ops4j-base-monitors
7900 (inherit java-ops4j-base-lang)
7901 (name "java-ops4j-base-monitors")
7903 `(#:jar-name "java-ops4j-base-monitors.jar"
7904 #:source-dir "ops4j-base-monitors/src/main/java"
7905 #:tests? #f)); no tests
7907 `(("lang" ,java-ops4j-base-lang)))
7908 (description "OPS4J stands for Open Participation Software for Java. This
7909 package contains utilities and extensions related to monitoring.")))
7911 (define-public java-ops4j-base-io
7913 (inherit java-ops4j-base-lang)
7914 (name "java-ops4j-base-io")
7916 `(#:jar-name "java-ops4j-base-io.jar"
7917 #:source-dir "ops4j-base-io/src/main/java"
7918 #:test-dir "ops4j-base-io/src/test"
7920 (list "**/ListerTest.java")))
7922 `(("lang" ,java-ops4j-base-monitors)
7923 ("lang" ,java-ops4j-base-lang)))
7925 `(("junit" ,java-junit)
7926 ("hamcrest" ,java-hamcrest-core)))
7927 (description "OPS4J stands for Open Participation Software for Java. This
7928 package contains utilities and extensions related to handling streams and files.")))
7930 (define-public java-ops4j-base-util
7932 (inherit java-ops4j-base-lang)
7933 (name "java-ops4j-base-util")
7935 `(#:jar-name "java-ops4j-base-util.jar"
7936 #:source-dir "ops4j-base-util/src/main/java"
7937 #:test-dir "ops4j-base-util/src/test"))
7939 `(("lang" ,java-ops4j-base-lang)))
7941 `(("junit" ,java-junit)))
7942 (description "OPS4J stands for Open Participation Software for Java. This
7943 package contains utilities and extensions related to environment, i18n and
7946 (define-public java-ops4j-base-util-property
7948 (inherit java-ops4j-base-lang)
7949 (name "java-ops4j-base-util-property")
7951 `(#:jar-name "java-ops4j-base-util-property.jar"
7952 #:source-dir "ops4j-base-util-property/src/main/java"
7953 #:tests? #f)); no tests
7955 `(("lang" ,java-ops4j-base-lang)
7956 ("util" ,java-ops4j-base-util)))
7957 (description "OPS4J stands for Open Participation Software for Java. This
7958 package contains utilities and extensions related to resolving properties from
7959 different sources.")))
7961 (define-public java-ops4j-base-store
7963 (inherit java-ops4j-base-lang)
7964 (name "java-ops4j-base-store")
7966 `(#:jar-name "java-ops4j-base-store.jar"
7967 #:source-dir "ops4j-base-store/src/main/java"
7968 #:tests? #f)); no tests
7970 `(("lang" ,java-ops4j-base-lang)
7971 ("slf4j" ,java-slf4j-api)
7972 ("io" ,java-ops4j-base-io)))
7973 (description "OPS4J stands for Open Participation Software for Java. This
7974 package contains utilities for storing and retrieving data from an
7975 @code{InputStream}.")))
7977 (define-public java-ops4j-base-spi
7979 (inherit java-ops4j-base-lang)
7980 (name "java-ops4j-base-spi")
7982 `(#:jar-name "java-ops4j-base-spi.jar"
7983 #:source-dir "ops4j-base-spi/src/main/java"
7984 #:test-dir "ops4j-base-spi/src/test"))
7986 `(("junit" ,java-junit)
7987 ("hamcrest" ,java-hamcrest-core)))
7988 (description "OPS4J stands for Open Participation Software for Java. This
7989 package contains utilities for obtaining services via the Java SE 6
7990 @code{ServiceLoader}.")))
7992 (define-public java-aqute-bnd-annotation
7994 (name "java-aqute-bnd-annotation")
7998 (uri (string-append "https://github.com/bndtools/bnd/archive/"
7999 version ".REL.tar.gz"))
8000 (file-name (string-append name "-" version ".tar.gz"))
8003 "1ggyiq0as0f6cz333a0dh98j72kmvv5pf2s47v9554yh905lfqdl"))))
8004 (build-system ant-build-system)
8006 `(#:jar-name "java-aqute-bnd-annotation.jar"
8007 #:source-dir "biz.aQute.bnd.annotation/src"
8008 #:tests? #f)); empty test dir
8009 (home-page "http://bnd.bndtools.org/")
8010 (synopsis "Tools for OSGi")
8011 (description "Bnd is a swiss army knife for OSGi, it creates manifest
8012 headers based on analyzing the class code, it verifies the project settings,
8013 it manages project dependencies, gives diffs jars, and much more.")
8014 (license license:asl2.0)))
8016 (define-public java-aqute-libg
8018 (inherit java-aqute-bnd-annotation)
8019 (name "java-aqute-libg")
8021 `(#:jar-name "java-aqute-libg.jar"
8022 ;; The build fails when source/target more recent than 1.7. This
8023 ;; is a known issue. See: https://github.com/bndtools/bnd/issues/1327
8025 ;; It is closed as won't fix. There is no way to change the source
8026 ;; so that it works on 1.8, and still works on 1.6, the upstream
8027 ;; target. It work fine on 1.7, so we use 1.7.
8028 #:make-flags (list "-Dant.build.javac.source=1.7"
8029 "-Dant.build.javac.target=1.7")
8031 (modify-phases %standard-phases
8032 (add-before 'configure 'chdir
8033 ;; Change to aQute.libg directory, so that the relative
8034 ;; paths in the tests aren't broken.
8036 (chdir "aQute.libg")
8038 (add-before 'check 'create-test-directory
8039 ;; Copy the test directory to test/java, since that's where
8040 ;; ant-build-system's default project in build.xml expects to find
8041 ;; the test classes. Leave a copy in the original place to not
8042 ;; break paths in tests.
8045 (copy-recursively "test" "src/test/java")
8048 `(("slf4j" ,java-slf4j-api)
8049 ("osgi-annot" ,java-osgi-annotation)
8050 ("java-osgi-cmpn" ,java-osgi-cmpn)
8051 ("osgi" ,java-osgi-core)))
8053 `(("hamcrest" ,java-hamcrest-core)
8054 ("java-junit" ,java-junit)))))
8056 (define java-aqute-libg-bootstrap
8058 (inherit java-aqute-libg)
8059 (name "java-aqute-libg-bootstrap")
8061 ;; Disable tests, at this stage of bootstrap we have no test frameworks.
8062 (substitute-keyword-arguments (package-arguments java-aqute-libg)
8063 ((#:tests? _ #f) #f)))
8065 `(("slf4j-bootstrap" ,java-slf4j-api-bootstrap)
8066 ,@(delete `("slf4j" ,java-slf4j-api)
8067 (package-inputs java-aqute-libg))))
8068 (native-inputs '())))
8070 (define-public java-aqute-bndlib
8072 (inherit java-aqute-bnd-annotation)
8073 (name "java-aqute-bndlib")
8075 `(#:jar-name "java-bndlib.jar"
8076 #:source-dir "biz.aQute.bndlib/src"
8077 #:tests? #f)); no tests
8079 `(("slf4j" ,java-slf4j-api)
8080 ("osgi-annot" ,java-osgi-annotation)
8081 ("java-aqute-libg" ,java-aqute-libg)
8082 ("java-aqute-bnd-annotation" ,java-aqute-bnd-annotation)
8083 ("java-osgi-service-component-annotations" ,java-osgi-service-component-annotations)
8084 ("java-osgi-service-repository" ,java-osgi-service-repository)
8085 ("java-osgi-service-log" ,java-osgi-service-log)
8086 ("java-osgi-service-metatype-annotations" ,java-osgi-service-metatype-annotations)
8087 ("java-osgi-namespace-contract" ,java-osgi-namespace-contract)
8088 ("java-osgi-namespace-extender" ,java-osgi-namespace-extender)
8089 ("java-osgi-namespace-service" ,java-osgi-namespace-service)
8090 ("promise" ,java-osgi-util-promise)
8091 ("osgi" ,java-osgi-core)))))
8093 (define java-aqute-bndlib-bootstrap
8095 (inherit java-aqute-bndlib)
8096 (name "java-aqute-bndlib-bootstrap")
8098 `(("slf4j-bootstrap" ,java-slf4j-api-bootstrap)
8099 ("java-aqute-libg-bootstrap" ,java-aqute-libg-bootstrap)
8100 ,@(delete `("slf4j" ,java-slf4j-api)
8101 (delete `("java-aqute-libg" ,java-aqute-libg)
8102 (package-inputs java-aqute-bndlib)))))))
8104 (define-public java-ops4j-pax-tinybundles
8106 (name "java-ops4j-pax-tinybundles")
8110 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.tinybundles/"
8111 "archive/tinybundles-" version ".tar.gz"))
8114 "0y0gq3pvv0iir2b885lmlwnvr724vv7vklzhhr4fs27d7mdkj871"))))
8116 `(#:jar-name "java-ops4j-pax-tinybundles.jar"
8117 #:source-dir "src/main/java"
8119 ;; Abstract base classes for other tests
8120 (list "**/BndTest.java" "**/CoreTest.java")
8122 (modify-phases %standard-phases
8123 (add-before 'check 'fix-version
8125 ;; This test has a reference to an old version of bndlib we are not
8126 ;; packaging. It uses the version referenced in pom.xml. We replace
8127 ;; it with our own version.
8128 (substitute* "src/test/java/org/ops4j/pax/tinybundles/bnd/BndTest.java"
8129 (("[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*")
8130 ,(package-version java-aqute-bndlib)))
8133 `(("lang" ,java-ops4j-base-lang)
8134 ("io" ,java-ops4j-base-io)
8135 ("store" ,java-ops4j-base-store)
8136 ("slf4j" ,java-slf4j-api)
8137 ("libg" ,java-aqute-libg)
8138 ("bndlib" ,java-aqute-bndlib)))
8140 `(("junit" ,java-junit)
8141 ("hamcrest" ,java-hamcrest-core)
8142 ("log4j" ,java-log4j-api)
8143 ("bndannotation" ,java-aqute-bnd-annotation)
8144 ("framework" ,java-osgi-framework)))
8145 (build-system ant-build-system)
8146 (home-page "https://ops4j1.jira.com/wiki/spaces/ops4j/pages/12060312/Tinybundles")
8147 (synopsis "Java APIs to create OSGi related artifacts")
8148 (description "Tinybundles is all about creating OSGi related artifacts like
8149 Bundles, Fragments and Deployment Packages with Java Api. It is very convenient
8150 to create such artifacts on-the-fly inside Tests (like in Pax Exam). On the
8151 other hand, this library can be a foundation of real end user tools that need
8152 to create those artifacts.")
8153 (license license:asl2.0)))
8155 (define-public java-ops4j-pax-exam-core
8157 (name "java-ops4j-pax-exam-core")
8161 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.exam2/"
8162 "archive/exam-reactor-" version ".tar.gz"))
8165 "08mzw8nkah3rj3vznlplnawspxhp61zgvb44ifqa1rni1cvbms2g"))))
8167 `(#:jar-name "java-ops4j-pax-exam-core.jar"
8168 #:source-dir "core/pax-exam/src/main/java"
8169 #:test-dir "core/pax-exam/src/test"))
8171 `(("slf4j" ,java-slf4j-api)
8172 ("lang" ,java-ops4j-base-lang)
8173 ("io" ,java-ops4j-base-io)
8174 ("util-property" ,java-ops4j-base-util-property)
8175 ("util-store" ,java-ops4j-base-store)
8176 ("java-osgi-core" ,java-osgi-core)))
8178 `(("junit" ,java-junit)
8179 ("hamcrest" ,java-hamcrest-core)))
8180 (build-system ant-build-system)
8181 (home-page "https://ops4j1.jira.com/wiki/spaces/PAXEXAM4/overview")
8182 (synopsis "In-Container Testing for OSGi, Java EE and CDI")
8183 (description "Pax Exam creates OSGi bundles for testing purposes. It lets
8184 the user take control of the OSGi framework, the test framework (e.g. JUnit) and
8185 the system under test at the same time.")
8186 (license license:asl2.0)))
8188 (define-public java-ops4j-pax-exam-core-spi
8190 (inherit java-ops4j-pax-exam-core)
8191 (name "java-ops4j-pax-exam-core-spi")
8193 `(#:jar-name "java-ops4j-pax-exam-spi.jar"
8194 #:source-dir "src/main/java"
8197 ;; Abstract base class, not a test
8198 "**/BaseStagedReactorTest.java"
8199 ;; Depends on org.mortbay.jetty.testwars:test-war-dump
8200 "**/WarBuilderTest.java")
8202 (modify-phases %standard-phases
8203 (add-before 'configure 'chdir
8205 ;; Tests assume we are in this directory
8206 (chdir "core/pax-exam-spi")
8208 (add-before 'check 'fix-tests
8210 ;; One test checks that this file is present.
8211 (mkdir-p "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi")
8212 (with-output-to-file
8213 "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi/pom.properties"
8216 (string-append "artifactId = pax-exam-spi\n"
8217 "version = " ,(package-version java-ops4j-pax-exam-core-spi)))))
8218 ;; Maven puts compilation results in the target directory, while we
8219 ;; put them in the build directory.
8220 (substitute* '("src/test/java/org/ops4j/pax/exam/spi/war/WarBuilderTest.java"
8221 "src/test/java/org/ops4j/pax/exam/spi/war/WarTestProbeBuilderTest.java"
8222 "src/test/java/org/ops4j/pax/exam/spi/war/ZipBuilderTest.java")
8223 (("target") "build"))
8224 ;; One test is expected to fail, but it doesn't throw the expected exception
8225 (substitute* "src/test/java/org/ops4j/pax/exam/spi/reactors/BaseStagedReactorTest.java"
8226 (("AssertionError") "IllegalArgumentException"))
8229 `(("java-ops4j-pax-exam-core" ,java-ops4j-pax-exam-core)
8230 ("lang" ,java-ops4j-base-lang)
8231 ("monitors" ,java-ops4j-base-monitors)
8232 ("store" ,java-ops4j-base-store)
8233 ("io" ,java-ops4j-base-io)
8234 ("spi" ,java-ops4j-base-spi)
8235 ("osgi" ,java-osgi-core)
8236 ("slf4j" ,java-slf4j-api)
8237 ("tinybundles" ,java-ops4j-pax-tinybundles)))
8239 `(("mockito" ,java-mockito-1)
8240 ("junit" ,java-junit)
8241 ("hamcrest" ,java-hamcrest-core)
8242 ("cglib" ,java-cglib)
8243 ("objenesis" ,java-objenesis)
8244 ("asm" ,java-asm)))))
8246 (define-public java-ops4j-pax-exam-core-junit
8248 (inherit java-ops4j-pax-exam-core)
8249 (name "java-ops4j-pax-exam-core-junit")
8251 `(#:jar-name "ops4j-pax-exam-core-junit.jar"
8252 #:source-dir "drivers/pax-exam-junit4/src/main/java"
8253 #:tests? #f)); no tests
8255 `(("junit" ,java-junit)
8256 ("slf4j" ,java-slf4j-api)
8257 ("core" ,java-ops4j-pax-exam-core)
8258 ("spi" ,java-ops4j-pax-exam-core-spi)))
8259 (native-inputs '())))
8261 (define-public java-fasterxml-jackson-annotations
8263 (name "java-fasterxml-jackson-annotations")
8267 (uri (string-append "https://github.com/FasterXML/"
8268 "jackson-annotations/archive/"
8269 "jackson-annotations-" version ".tar.gz"))
8272 "0mr95xd0da6a4g95zvrl1ryk5n5zv2rc696w3xnsr5hxk2gicfc4"))))
8273 (build-system ant-build-system)
8275 `(#:jar-name "jackson-annotations.jar"
8276 #:source-dir "src/main/java"
8277 #:test-dir "src/test"))
8279 `(("junit" ,java-junit)))
8280 (home-page "https://github.com/FasterXML/jackson-annotations")
8281 (synopsis "General purpose annotations for the Jackson Data Processor")
8282 (description "This package contains general purpose annotations for the
8283 Jackson Data Processor, used on value and handler types. The only annotations
8284 not included are ones that require dependency to the Databind package.")
8285 (license license:asl2.0)))
8287 (define-public java-fasterxml-jackson-core
8289 (name "java-fasterxml-jackson-core")
8293 (uri (string-append "https://github.com/FasterXML/"
8294 "jackson-core/archive/"
8295 "jackson-core-" version ".tar.gz"))
8298 "159hsnk17jr1gyzkf01cxvsn45srnk37g949r7364qlsr527gjgd"))))
8299 (build-system ant-build-system)
8301 `(#:jar-name "jackson-core.jar"
8302 #:source-dir "src/main/java"
8303 #:test-dir "src/test"
8306 ;; Expected failure. pom.xml excludes these
8308 ;; Base classes that have no constructor for junit
8310 "**/ConcurrencyReadTest.java"
8311 "**/ManualCharAccessTest.java"
8312 "**/ManualCharAccessTest.java"
8313 "**/TrailingCommasTest.java"
8314 "**/AsyncMissingValuesInObjectTest.java"
8315 "**/AsyncMissingValuesInArrayTest.java")
8317 (modify-phases %standard-phases
8318 (add-before 'configure 'generate-PackageVersion.java
8320 (let* ((out "src/main/java/com/fasterxml/jackson/core/json/PackageVersion.java")
8321 (in (string-append out ".in")))
8324 (("@package@") "com.fasterxml.jackson.core.json")
8325 (("@projectversion@") ,version)
8326 (("@projectgroupid@") "com.fasterxml.jackson.core")
8327 (("@projectartifactid@") "jackson-core")))
8329 (add-before 'build 'copy-resources
8331 (copy-recursively "src/main/resources"
8334 (add-before 'check 'copy-test-resources
8336 (copy-recursively "src/test/resources"
8337 "build/test-classes")
8340 `(("junit" ,java-junit)
8341 ("hamcrest" ,java-hamcrest-core)))
8342 (home-page "https://github.com/FasterXML/jackson-core")
8345 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
8347 (define-public java-fasterxml-jackson-databind
8349 (name "java-fasterxml-jackson-databind")
8353 (uri (string-append "https://github.com/FasterXML/"
8354 "jackson-databind/archive/"
8355 "jackson-databind-" version ".tar.gz"))
8358 "1zd2cw4z6kdkbx8za96xh9pyicv2a2l7y0rkcx2fqd8hv6d47s08"))))
8359 (build-system ant-build-system)
8361 `(#:jar-name "jackson-databind.jar"
8362 #:source-dir "src/main/java"
8363 #:tests? #f; requires javax.measures for which I can't find a free implementation
8365 (modify-phases %standard-phases
8366 (add-before 'configure 'generate-PackageVersion.java
8368 (let* ((out "src/main/java/com/fasterxml/jackson/databind/cfg/PackageVersion.java")
8369 (in (string-append out ".in")))
8372 (("@package@") "com.fasterxml.jackson.databind.cfg")
8373 (("@projectversion@") ,version)
8374 (("@projectgroupid@") "com.fasterxml.jackson.databind")
8375 (("@projectartifactid@") "jackson-databind")))
8377 (add-before 'build 'copy-resources
8379 (copy-recursively "src/main/resources" "build/classes")
8382 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
8383 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)))
8384 (home-page "https://github.com/FasterXML/jackson-databind")
8385 (synopsis "Data-binding functionality and tree-model for the Jackson Data Processor")
8386 (description "This package contains the general-purpose data-binding
8387 functionality and tree-model for Jackson Data Processor. It builds on core
8388 streaming parser/generator package, and uses Jackson Annotations for
8390 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
8392 (define-public java-fasterxml-jackson-modules-base-jaxb
8394 (name "java-fasterxml-jackson-modules-base-jaxb")
8398 (uri (string-append "https://github.com/FasterXML/"
8399 "jackson-modules-base/archive/"
8400 "jackson-modules-base-" version ".tar.gz"))
8403 "1wws95xi8sppp6b0k2vvjdjyynl20r1a4dwrhai08lzlria6blp5"))))
8404 (build-system ant-build-system)
8406 `(#:jar-name "jackson-modules-base-jaxb.jar"
8407 #:source-dir "jaxb/src/main/java"
8408 #:test-dir "jaxb/src/test"
8410 ;; Base class for tests
8411 (list "**/BaseJaxbTest.java")
8413 (modify-phases %standard-phases
8414 (add-before 'configure 'generate-PackageVersion.java
8416 (let* ((out (string-append "jaxb/src/main/java/com/fasterxml/"
8417 "jackson/module/jaxb/PackageVersion.java"))
8418 (in (string-append out ".in")))
8421 (("@package@") "com.fasterxml.jackson.module.jaxb")
8422 (("@projectversion@") ,version)
8423 (("@projectgroupid@") "com.fasterxml.jackson.module.jaxb")
8424 (("@projectartifactid@") "jackson-module-jaxb")))
8426 (add-before 'build 'copy-resources
8428 (copy-recursively "jaxb/src/main/resources" "build/classes")
8431 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
8432 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
8433 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)))
8435 `(("java-junit" ,java-junit)))
8436 (home-page "https://github.com/FasterXML/jackson-modules-base")
8437 (synopsis "Jaxb annotations jackson module")
8438 (description "This package is the jaxb annotations module for jackson.")
8439 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
8441 (define-public java-fasterxml-jackson-modules-base-mrbean
8443 (name "java-fasterxml-jackson-modules-base-mrbean")
8447 (uri (string-append "https://github.com/FasterXML/"
8448 "jackson-modules-base/archive/"
8449 "jackson-modules-base-" version ".tar.gz"))
8452 "1wws95xi8sppp6b0k2vvjdjyynl20r1a4dwrhai08lzlria6blp5"))))
8453 (build-system ant-build-system)
8455 `(#:jar-name "jackson-modules-base-mrbean.jar"
8456 #:source-dir "mrbean/src/main/java"
8457 #:test-dir "mrbean/src/test"
8459 ;; Base class for tests
8460 (list "**/BaseTest.java")
8462 (modify-phases %standard-phases
8463 (add-before 'configure 'generate-PackageVersion.java
8465 (let* ((out (string-append "mrbean/src/main/java/com/fasterxml/"
8466 "jackson/module/mrbean/PackageVersion.java"))
8467 (in (string-append out ".in")))
8470 (("@package@") "com.fasterxml.jackson.module.mrbean")
8471 (("@projectversion@") ,version)
8472 (("@projectgroupid@") "com.fasterxml.jackson.module.mrbean")
8473 (("@projectartifactid@") "jackson-module-mrbean")))
8476 `(("java-asm" ,java-asm)
8477 ("java-fasterxml-jackson-annotations"
8478 ,java-fasterxml-jackson-annotations)
8479 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
8480 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)))
8482 `(("java-junit" ,java-junit)))
8483 (home-page "https://github.com/FasterXML/jackson-modules-base")
8484 (synopsis "POJO type materialization for Java")
8485 (description "This package implements POJO type materialization.
8486 Databinders can construct implementation classes for Java interfaces as part
8487 of deserialization.")
8488 (license license:asl2.0)))
8490 (define-public java-snakeyaml
8492 (name "java-snakeyaml")
8496 (uri (string-append "https://bitbucket.org/asomov/snakeyaml/get/v"
8498 (file-name (string-append name "-" version ".tar.gz"))
8501 "0rf5ha6w0waz50jz2479jsrbgmd0dnx0gs337m126j5z7zlmg7mg"))))
8502 (build-system ant-build-system)
8504 `(#:jar-name "java-snakeyaml.jar"
8505 #:source-dir "src/main/java"
8506 ;; Tests require velocity, a cyclic dependency, and
8507 ;; java-spring-framework-context which is not packaged.
8509 (home-page "https://bitbucket.org/asomov/snakeyaml")
8510 (synopsis "YAML processor")
8511 (description "SnakeYAML is a YAML processor for the Java Virtual Machine.")
8512 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
8514 (define-public java-fasterxml-jackson-dataformat-yaml
8516 (name "java-fasterxml-jackson-dataformat-yaml")
8520 (uri (string-append "https://github.com/FasterXML/"
8521 "jackson-dataformats-text/archive/"
8522 "jackson-dataformats-text-" version ".tar.gz"))
8525 "1hikl06khaxbg439avf442qifcadap8w0lx13f0nnhp2vh3dkbz7"))))
8526 (build-system ant-build-system)
8528 `(#:jar-name "jackson-dataformat-yaml.jar"
8529 #:source-dir "yaml/src/main/java"
8530 #:test-dir "yaml/src/test"
8531 #:test-exclude (list "**/failing/**.java")
8533 (modify-phases %standard-phases
8534 (add-before 'configure 'generate-PackageVersion.java
8536 (let* ((out "yaml/src/main/java/com/fasterxml/jackson/dataformat/yaml/PackageVersion.java")
8537 (in (string-append out ".in")))
8540 (("@package@") "com.fasterxml.jackson.dataformat.yaml")
8541 (("@projectversion@") ,version)
8542 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.yaml")
8543 (("@projectartifactid@") "jackson-dataformat-yaml")))
8546 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
8547 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
8548 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)
8549 ("java-snakeyaml" ,java-snakeyaml)))
8551 `(("junit" ,java-junit)
8552 ("hamcrest" ,java-hamcrest-core)
8553 ("java-ops4j-pax-exam-core-spi" ,java-ops4j-pax-exam-core-spi)
8554 ("java-ops4j-pax-exam-core-junit" ,java-ops4j-pax-exam-core-junit)
8555 ("java-ops4j-pax-exam" ,java-ops4j-pax-exam-core)))
8556 (home-page "https://github.com/FasterXML/jackson-dataformats-text")
8557 (synopsis "Yaml backend for Jackson")
8558 (description "Dataformat backends are used to support format alternatives
8559 to JSON, supported by default. This is done by sub-classing Jackson core
8561 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
8563 (define-public java-stax2-api
8565 (name "java-stax2-api")
8569 (uri (string-append "https://github.com/FasterXML/stax2-api/archive/"
8570 "stax2-api-" version ".tar.gz"))
8573 "1amc1si0l0hyyw2sawmnzy4hkna3z6fp195y4nm5m9wb9ld5awkq"))))
8574 (build-system ant-build-system)
8576 `(#:jar-name "java-stax2-api.jar"
8577 #:source-dir "src/main/java"
8578 #:tests? #f)); no tests
8579 (home-page "https://github.com/FasterXML/stax2-api")
8580 (synopsis "Stax2 API")
8581 (description "Stax2 API is an extension to basic Stax 1.0 API that adds
8582 significant new functionalities, such as full-featured bi-direction validation
8583 interface and high-performance Typed Access API.")
8584 (license license:bsd-2)))
8586 (define-public java-woodstox-core
8588 (name "java-woodstox-core")
8592 (uri (string-append "https://github.com/FasterXML/woodstox/archive/"
8593 "woodstox-core-" version ".tar.gz"))
8596 "1i7pdgb8jbw6gdy5kmm0l6rz109n2ns92pqalpyp24vb8vlvdfd4"))))
8597 (build-system ant-build-system)
8599 `(#:jar-name "woodstox.jar"
8601 (list "**/Base*.java" "failing/**")
8603 (modify-phases %standard-phases
8604 (add-before 'build 'remove-msv-dep
8606 ;; we don't need osgi, and it depends on msv
8607 (delete-file-recursively "src/main/java/com/ctc/wstx/osgi")
8608 ;; msv's latest release is from 2011 and we don't need it
8609 (delete-file-recursively "src/main/java/com/ctc/wstx/msv")
8610 (delete-file-recursively "src/test/java/wstxtest/osgi")
8611 (delete-file-recursively "src/test/java/wstxtest/msv")
8613 (add-before 'build 'copy-resources
8615 (copy-recursively "src/main/resources" "build/classes")
8618 `(("stax2" ,java-stax2-api)))
8620 `(("junit" ,java-junit)))
8621 (home-page "https://github.com/FasterXML/woodstox")
8622 (synopsis "Stax XML API implementation")
8623 (description "Woodstox is a stax XML API implementation.")
8624 (license license:asl2.0)))
8626 (define-public java-fasterxml-jackson-dataformat-xml
8628 (name "java-fasterxml-jackson-dataformat-xml")
8632 (uri (string-append "https://github.com/FasterXML/"
8633 "jackson-dataformat-xml/archive/"
8634 "jackson-dataformat-xml-" version ".tar.gz"))
8637 "111fkkl90w31jbf30kgj82qdcxlw4sxppki7i198liw0ck1jcavq"))))
8638 (build-system ant-build-system)
8640 `(#:jar-name "jackson-dataformat-xml.jar"
8641 #:source-dir "src/main/java"
8643 (list "**/failing/**")
8645 (modify-phases %standard-phases
8646 (add-before 'configure 'generate-PackageVersion.java
8648 (let* ((out "src/main/java/com/fasterxml/jackson/dataformat/xml/PackageVersion.java")
8649 (in (string-append out ".in")))
8653 (("@package@") "com.fasterxml.jackson.dataformat.xml")
8654 (("@projectversion@") ,version)
8655 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.xml")
8656 (("@projectartifactid@") "jackson-dataformat-xml")))
8658 (add-before 'build 'copy-resources
8660 (copy-recursively "src/main/resources" "build/classes")
8663 `(("jackson-annotations" ,java-fasterxml-jackson-annotations)
8664 ("jackson-core" ,java-fasterxml-jackson-core)
8665 ("jackson-modules-base-jaxb" ,java-fasterxml-jackson-modules-base-jaxb)
8666 ("jackson-databind" ,java-fasterxml-jackson-databind)
8667 ("stax2-api" ,java-stax2-api)
8668 ("woodstox" ,java-woodstox-core)))
8670 `(("junit" ,java-junit)
8671 ("hamcrest" ,java-hamcrest-core)))
8672 (home-page "https://github.com/FasterXML/jackson-dataformat-xml")
8673 (synopsis "Read and write XML")
8674 (description "This package contains Jackson extension component for reading
8675 and writing XML encoded data.
8677 Further, the goal is to emulate how JAXB data-binding works with \"Code-first\"
8678 approach (that is, no support is added for \"Schema-first\" approach). Support
8679 for JAXB annotations is provided by JAXB annotation module; this module
8680 provides low-level abstractions (@code{JsonParser}, @code{JsonGenerator},
8681 @code{JsonFactory}) as well as small number of higher level overrides needed to
8682 make data-binding work.")
8683 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
8685 (define-public java-hdrhistogram
8687 (name "java-hdrhistogram")
8691 (uri (string-append "https://github.com/HdrHistogram/HdrHistogram/"
8692 "archive/HdrHistogram-" version ".tar.gz"))
8695 "1sicbmc3sr42nw93qbkb26q9rn33ag33k6k77phjc3j5h5gjffqv"))))
8696 (build-system ant-build-system)
8698 `(#:jar-name "java-hdrhistogram.jar"
8699 #:source-dir "src/main/java"
8701 (modify-phases %standard-phases
8702 (add-before 'configure 'set-version
8704 (let* ((version-java "src/main/java/org/HdrHistogram/Version.java")
8705 (template (string-append version-java ".template")))
8706 (copy-file template version-java)
8707 (substitute* version-java
8708 (("\\$VERSION\\$") ,version)
8709 (("\\$BUILD_TIME\\$") "0"))
8712 `(("junit" ,java-junit)
8713 ("hamcrest" ,java-hamcrest-core)))
8714 (home-page "https://hdrhistogram.github.io/HdrHistogram")
8715 (synopsis "High dynamic range histogram")
8716 (description "Hdrhistogram allows to create histograms that support
8717 recording and analyzing sampled data value counts across a configurable integer
8718 value range with configurable value precision within the range. Value precision
8719 is expressed as the number of significant digits in the value recording, and
8720 provides control over value quantization behavior across the value range and
8721 the subsequent value resolution at any given level.")
8722 (license license:public-domain)))
8724 (define-public java-cofoja
8726 (name "java-cofoja")
8731 (url "https://github.com/nhatminhle/cofoja.git")
8732 (commit (string-append "v" version))))
8733 (file-name (string-append "java-cofoja-" version "-checkout"))
8736 "0p7sz8y5xgpi5rx1qwn6587fkd52qr3ha3ybh14gqcyxhikl525w"))))
8737 (build-system ant-build-system)
8739 `(#:build-target "dist"
8740 #:test-target "test"
8743 (list "-Ddist.dir=dist")
8744 #:modules ((guix build ant-build-system)
8745 (guix build java-utils)
8750 (modify-phases %standard-phases
8751 ;; The bulid system ignores the class path the ant-build-system sets
8752 ;; up and instead expects to find all dependencies in the "lib"
8754 (add-after 'unpack 'create-libdir
8755 (lambda* (#:key inputs #:allow-other-keys)
8759 (let ((target (string-append "lib/" (basename file))))
8760 (unless (file-exists? target)
8761 (symlink file target))))
8762 (append-map (match-lambda
8764 (find-files dir "\\.jar$")))
8767 (replace 'install (install-jars "dist")))))
8769 `(("java-asm" ,java-asm)))
8771 `(("java-junit" ,java-junit)))
8772 (home-page "https://github.com/nhatminhle/cofoja")
8773 (synopsis "Contracts for Java")
8774 (description "Contracts for Java, or Cofoja for short, is a contract
8775 programming framework and test tool for Java, which uses annotation processing
8776 and bytecode instrumentation to provide run-time checking. (In particular,
8777 this is not a static analysis tool.)")
8778 (license license:lgpl3+)))
8780 (define-public java-aopalliance
8782 (name "java-aopalliance")
8786 ;; Note: this git repository is not official, but contains the
8787 ;; source code that is in the CVS repository. Downloading the
8788 ;; tarball from sourceforge is undeterministic, and the cvs download
8791 (url "https://github.com/hoverruan/aopalliance")
8792 (commit "0d7757ae204e5876f69431421fe9bc2a4f01e8a0")))
8793 (file-name (string-append name "-" version))
8796 "0rsg2b0v3hxlq2yk1i3m2gw3xwq689j3cwx9wbxvqfpdcjbca0qr"))))
8797 (build-system ant-build-system)
8799 `(#:jar-name "java-aopalliance.jar"
8801 #:tests? #f; no tests
8802 #:source-dir "aopalliance/src/main"))
8803 (home-page "http://aopalliance.sourceforge.net")
8804 (synopsis "Aspect-Oriented Programming")
8805 (description "The AOP Alliance project is a joint project between several
8806 software engineering people who are interested in Aspect-Oriented Programming
8808 (license license:public-domain)))
8810 (define-public java-javax-inject
8812 (name "java-javax-inject")
8816 (uri (string-append "https://github.com/javax-inject/javax-inject/"
8817 "archive/javax.inject-" version ".tar.gz"))
8820 "1ydrlvh2r7vr1g7lhjwy3w2dggpj9h6pix1lakkkgdywb365n6g0"))))
8821 (build-system ant-build-system)
8823 `(#:jar-name "java-javax-inject.jar"
8825 #:tests? #f)); no tests
8826 (home-page "http://github.com/javax-inject/javax-inject")
8827 (synopsis "JSR-330: Dependency Injection for Java")
8828 (description "This package specifies a means for obtaining objects in such
8829 a way as to maximize reusability, testability and maintainability compared to
8830 traditional approaches such as constructors, factories, and service locators
8831 (e.g., JNDI). This process, known as dependency injection, is beneficial to
8832 most nontrivial applications.
8834 Many types depend on other types. For example, a @var{Stopwatch} might depend
8835 on a @var{TimeSource}. The types on which a type depends are known as its
8836 dependencies. The process of finding an instance of a dependency to use at run
8837 time is known as resolving the dependency. If no such instance can be found,
8838 the dependency is said to be unsatisfied, and the application is broken.")
8839 (license license:asl2.0)))
8841 (define-public java-guice
8847 (uri (string-append "https://github.com/google/guice/archive/"
8849 (file-name (string-append name "-" version ".tar.gz"))
8850 (modules '((guix build utils)))
8853 (for-each delete-file (find-files "." ".*.jar"))))
8856 "0dwmqjzlavb144ywqqglj3h68hqszkff8ai0a42hyb5il0qh4rbp"))))
8857 (build-system ant-build-system)
8859 `(#:jar-name "java-guice.jar"
8861 #:tests? #f; FIXME: tests are not in a java sub directory
8862 #:source-dir "core/src"))
8864 `(("guava" ,java-guava)
8865 ("java-cglib" ,java-cglib)
8866 ("java-aopalliance" ,java-aopalliance)
8867 ("java-javax-inject" ,java-javax-inject)
8868 ("java-asm" ,java-asm)))
8869 (home-page "https://github.com/google/guice")
8870 (synopsis "Lightweight dependency injection framework")
8871 (description "Guice is a lightweight dependency injection framework fo
8873 (license license:asl2.0)))
8875 (define-public java-guice-servlet
8877 (inherit java-guice)
8878 (name "java-guice-servlet")
8880 `(#:jar-name "guice-servlet.jar"
8881 #:source-dir "extensions/servlet/src/"
8883 #:tests? #f)); FIXME: not in a java subdir
8885 `(("guice" ,java-guice)
8886 ("servlet" ,java-classpathx-servletapi)
8887 ,@(package-inputs java-guice)))))
8889 (define-public java-assertj
8891 (name "java-assertj")
8895 (uri (string-append "https://github.com/joel-costigliola/"
8896 "assertj-core/archive/"
8897 "assertj-core-" version ".tar.gz"))
8900 "1kf124fxskf548rklkg86294w2x6ajqrff94rrhyqns31danqkfz"))))
8901 (build-system ant-build-system)
8903 `(#:jar-name "java-assertj.jar"
8905 #:source-dir "src/main/java"
8906 #:tests? #f)); depends on tng-junit which depends on assertj
8908 `(("cglib" ,java-cglib)
8909 ("junit" ,java-junit)
8910 ("hamcrest" ,java-hamcrest-core)))
8912 `(("mockito" ,java-mockito-1)))
8913 (home-page "https://joel-costigliola.github.io/assertj/index.html")
8914 (synopsis "Fluent assertions for java")
8915 (description "AssertJ core is a Java library that provides a fluent
8916 interface for writing assertions. Its main goal is to improve test code
8917 readability and make maintenance of tests easier.")
8918 (license license:asl2.0)))
8920 (define-public java-jboss-javassist
8922 (name "java-jboss-javassist")
8926 (uri (string-append "https://github.com/jboss-javassist/javassist/"
8928 (string-map (lambda (x) (if (eq? x #\.) #\_ x)) version)
8932 "10lpcr3sbf7y6fq6fc2h2ik7rqrivwcy4747bg0kxhwszil3cfmf"))))
8933 (build-system ant-build-system)
8935 `(#:jar-name "java-jboss-javassist.jar"
8937 #:source-dir "src/main"
8938 #:tests? #f; FIXME: requires junit-awtui and junit-swingui from junit3
8940 (modify-phases %standard-phases
8941 (add-before 'configure 'remove-binary
8943 (delete-file "javassist.jar")
8946 `(("junit" ,java-junit)))
8947 (home-page "https://github.com/jboss-javassist/javassist")
8948 (synopsis "Java bytecode engineering toolkit")
8949 (description "Javassist (JAVA programming ASSISTant) makes Java bytecode
8950 manipulation simple. It is a class library for editing bytecodes in Java; it
8951 enables Java programs to define a new class at runtime and to modify a class
8952 file when the JVM loads it.")
8953 (license (list license:gpl2 license:cddl1.0)))); either gpl2 only or cddl.
8955 (define-public java-jcommander
8957 (name "java-jcommander")
8961 (uri (string-append "https://github.com/cbeust/jcommander/archive/"
8963 (file-name (string-append name "-" version ".tar.gz"))
8966 "1f5k2ckay6qjc3d3w3d7bc0p3cx3c7n6p6zxvw1kibqdr0q98wlx"))))
8967 (build-system ant-build-system)
8969 `(#:jar-name "java-jcommander.jar"
8971 #:tests? #f; requires testng which depends on jcommander
8972 #:source-dir "src/main/java"))
8973 (home-page "http://jcommander.org")
8974 (synopsis "Command line parameters parser")
8975 (description "JCommander is a very small Java framework that makes it
8976 trivial to parse command line parameters. Parameters are declared with
8978 (license license:asl2.0)))
8980 (define-public java-bsh
8986 (uri (string-append "https://github.com/beanshell/beanshell/archive/"
8988 (file-name (string-append name "-" version ".tar.gz"))
8991 "1bawkxk6jyc75hxvzkpz689h73cn3f222m0ar3nvb0dal2b85kfv"))))
8992 (build-system ant-build-system)
8994 `(#:build-target "jarall"
8995 #:test-target "junit-tests-all"
8997 (modify-phases %standard-phases
8999 (lambda* (#:key outputs #:allow-other-keys)
9000 (let ((share (string-append (assoc-ref outputs "out") "/share/java")))
9002 (copy-file "dist/bsh-2.0b6.jar" (string-append share "/bsh-2.0b6.jar"))
9004 (home-page "http://beanshell.org/")
9005 (synopsis "Lightweight Scripting for Java")
9006 (description "BeanShell is a small, free, embeddable Java source
9007 interpreter with object scripting language features, written in Java.
9008 BeanShell dynamically executes standard Java syntax and extends it with common
9009 scripting conveniences such as loose types, commands, and method closures like
9010 those in Perl and JavaScript.")
9011 (license license:asl2.0)))
9013 (define-public java-fest-util
9015 (name "java-fest-util")
9019 (uri (string-append "https://github.com/alexruiz/fest-util/"
9020 "archive/fest-util-" version ".tar.gz"))
9023 "05g6hljz5mdaakk8d7g32klbhz9bdwp3qlj6rdaggdidxs3x1sb8"))))
9024 (build-system ant-build-system)
9026 `(#:jar-name "java-fest-util.jar"
9027 #:source-dir "src/main/java"))
9029 `(("junit" ,java-junit)
9030 ("hamcrest" ,java-hamcrest-core)))
9031 (home-page "https://github.com/alexruiz/fest-util")
9032 (synopsis "FEST common utilities")
9033 (description "Common utilities used in all FEST module.")
9034 (license license:asl2.0)))
9036 (define-public java-fest-test
9038 (name "java-fest-test")
9042 (uri (string-append "https://github.com/alexruiz/fest-test/"
9043 "archive/fest-test-" version ".tar.gz"))
9046 "1rxfbw6l9vc65iy1x3fb617qc6y4w2k430pgf1mfbxfdlxbm0f7g"))))
9047 (build-system ant-build-system)
9049 `(#:jar-name "java-fest-test.jar"
9050 #:source-dir "src/main/java"
9051 #:tests? #f)); no tests
9053 `(("junit" ,java-junit)))
9054 (home-page "https://github.com/alexruiz/fest-test")
9055 (synopsis "Common FEST testing infrastructure")
9056 (description "Fest-test contains the common FEST testing infrastructure.")
9057 (license license:asl2.0)))
9059 (define-public java-fest-assert
9061 (name "java-fest-assert")
9065 (uri (string-append "https://github.com/alexruiz/fest-assert-2.x/"
9066 "archive/fest-assert-core-" version ".tar.gz"))
9069 "1bi0iqavikzww6rxvz5jyg7y6bflv95s6ibryxx0xfcxrrw6i5lw"))))
9070 (build-system ant-build-system)
9072 `(#:jar-name "java-fest-assert.jar"
9073 #:source-dir "src/main/java"
9078 ;; Unable to set MockitoNamingPolicy on cglib generator which creates FastClasses
9079 "**/MessageFormatter_format_Test.java"
9080 "**/internal/*/*_assert*_Test.java")))
9082 `(("java-fest-util" ,java-fest-util)))
9084 `(("java-junit" ,java-junit)
9085 ("java-fest-test" ,java-fest-test)
9086 ("java-hamcrest-core" ,java-hamcrest-core)
9087 ("java-mockito" ,java-mockito-1)
9088 ("java-cglib" ,java-cglib)
9089 ("java-objenesis" ,java-objenesis)
9090 ("java-asm" ,java-asm)))
9091 (home-page "https://github.com/alexruiz/fest-assert-2.x")
9092 (synopsis "FEST fluent assertions")
9093 (description "FEST-Assert provides a fluent interface for assertions.")
9094 (license license:asl2.0)))
9096 (define-public java-testng
9098 (name "java-testng")
9103 (url "https://github.com/cbeust/testng.git")
9105 (file-name (string-append name "-" version "-checkout"))
9108 "0y6vq30i5g276kw0v2bhbvci22ijg7ax49ap2611yqlhbs4d6dqv"))))
9109 (build-system ant-build-system)
9111 `(#:jdk ,icedtea-8; java.util.function
9112 #:jar-name "java-testng.jar"
9113 #:source-dir "src/main/java"
9115 (modify-phases %standard-phases
9116 ;; FIXME: I don't know why these tests fail
9117 (add-after 'unpack 'delete-failing-tests
9119 (substitute* "src/test/resources/testng.xml"
9120 (("<class name=\"test.configuration.github1625.TestRunnerIssue1625\"/>") "")
9121 (("<class name=\"test.serviceloader.ServiceLoaderTest\" />") ""))
9123 ;; We don't have groovy
9124 (add-after 'unpack 'delete-groovy-tests
9126 (delete-file-recursively "src/test/java/test/dependent/issue1648/")
9127 (substitute* "src/test/resources/testng.xml"
9128 (("<class name=\"test.dependent.issue1648.TestRunner\"/>") ""))
9130 (add-before 'build 'copy-resources
9132 (copy-recursively "src/main/resources" "build/classes")
9134 (add-before 'check 'copy-test-resources
9136 (copy-recursively "src/test/resources" "build/test-classes")
9140 (invoke "ant" "compile-tests")
9141 ;; we don't have groovy
9142 (substitute* "src/test/resources/testng.xml"
9143 (("<class name=\"test.groovy.GroovyTest\" />") ""))
9144 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
9146 ":build/test-classes")
9147 "-Dtest.resources.dir=src/test/resources"
9148 "org.testng.TestNG" "src/test/resources/testng.xml"))))))
9150 `(("junit" ,java-junit)
9151 ("java-jsr305" ,java-jsr305)
9152 ("java-bsh" ,java-bsh)
9153 ("java-jcommander" ,java-jcommander)
9154 ("java-guice" ,java-guice)
9155 ("snakeyaml" ,java-snakeyaml)))
9157 `(("guava" ,java-guava)
9158 ("java-javax-inject" ,java-javax-inject)
9159 ("java-hamcrest" ,java-hamcrest-all)
9160 ("java-assertj" ,java-assertj)
9161 ("java-mockito" ,java-mockito-1)
9162 ("cglib" ,java-cglib)
9164 ("aopalliance" ,java-aopalliance)))
9165 (home-page "http://testng.org")
9166 (synopsis "Testing framework")
9167 (description "TestNG is a testing framework inspired from JUnit and NUnit
9168 but introducing some new functionalities that make it more powerful and easier
9170 (license license:asl2.0)))
9172 (define-public java-jnacl
9173 (let ((commit "094e819afdd63ea81a499b3bcb42a271006bebd9")
9177 (version (string-append "0.1.0-" revision "." (string-take commit 7)))
9181 (url "https://github.com/neilalexander/jnacl.git")
9183 (file-name (git-file-name name version))
9186 "1d6g6xhn83byv5943n7935wwjsk0ibk0qdvqgr699qqgqqmwisbb"))))
9187 (build-system ant-build-system)
9189 `(#:jar-name "jnacl.jar"
9190 #:source-dir "src/main/java"
9193 (modify-phases %standard-phases
9194 (add-before 'build 'fix-tests
9196 (substitute* '("src/test/java/com/neilalexander/jnacl/NaClTest.java"
9197 "src/test/java/com/neilalexander/jnacl/NaclSecretBoxTest.java")
9198 (("assertions.Assertions") "assertions.api.Assertions"))
9202 (invoke "ant" "compile-tests")
9203 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
9205 ":build/test-classes")
9206 "org.testng.TestNG" "-testclass"
9207 "build/test-classes/com/neilalexander/jnacl/NaclSecretBoxTest.class")
9208 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
9210 ":build/test-classes")
9211 "org.testng.TestNG" "-testclass"
9212 "build/test-classes/com/neilalexander/jnacl/NaClTest.class"))))))
9214 `(("java-testng" ,java-testng)
9215 ("java-fest-util" ,java-fest-util)
9216 ("java-fest-assert" ,java-fest-assert)))
9217 (home-page "https://github.com/neilalexander/jnacl")
9218 (synopsis "Java implementation of NaCl")
9219 (description "Pure Java implementation of the NaCl: Networking and
9220 Cryptography library.")
9221 (license license:bsd-2))))
9223 (define-public java-mvel2
9229 (uri (string-append "https://github.com/mvel/mvel/archive/mvel2-"
9230 version ".Final.tar.gz"))
9233 "01ph5s9gm16l2qz58lg21w6fna7xmmrj7f9bzqr1jim7h9557d3z"))))
9234 (build-system ant-build-system)
9236 `(#:jar-name "mvel2.jar"
9237 #:source-dir "src/main/java"
9239 (list "**/Abstract*.java"
9240 ;; Base class with no tests
9241 "**/MVELThreadTest.java")
9243 (modify-phases %standard-phases
9244 (add-after 'install 'install-bin
9245 (lambda* (#:key outputs #:allow-other-keys)
9246 (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
9248 (with-output-to-file (string-append bin "/mvel2")
9252 "#!" (which "bash") "\n"
9253 "if [ \"$#\" -ne \"2\" ]; then\n"
9254 "echo 'Usage: mvel2 <script> <out.dir>'\n"
9257 "java -Dout.dir=$2 -cp " (getenv "CLASSPATH")
9258 ":" (assoc-ref outputs "out") "/share/java/mvel2.jar"
9259 " org.mvel2.sh.Main $1"))))
9260 (chmod (string-append bin "/mvel2") #o755))
9263 `(("junit" ,java-junit)
9264 ("hamcrest" ,java-hamcrest-core)))
9265 (home-page "https://github.com/mvel/mvel")
9266 (synopsis "MVFLEX Expression Language")
9267 (description "MVEL has largely been inspired by Java syntax, but has some
9268 fundamental differences aimed at making it more efficient as an expression
9269 language, such as operators that directly support collection, array and string
9270 matching, as well as regular expressions. MVEL is used to evaluate expressions
9271 written using Java syntax.
9273 In addition to the expression language, MVEL serves as a templating language for
9274 configuration and string construction.")
9275 (license license:asl2.0)))
9277 (define-public java-commons-jexl-2
9279 (name "java-commons-jexl")
9283 (uri (string-append "mirror://apache/commons/jexl/source/"
9284 "commons-jexl-" version "-src.tar.gz"))
9287 "1ai7632bwwaxglb0nbpblpr2jw5g20afrsaq372ipkphi3ncy1jz"))))
9288 (build-system ant-build-system)
9290 `(#:jar-name "commons-jexl-2.jar"
9292 #:source-dir "src/main/java"
9294 (modify-phases %standard-phases
9295 (add-before 'check 'disable-broken-tests
9296 (lambda* (#:key inputs #:allow-other-keys)
9297 (with-directory-excursion "src/test/java/org/apache/commons/jexl2/"
9298 (substitute* "ArithmeticTest.java"
9299 (("asserter.assertExpression\\(\"3 / 0\"") "//")
9300 (("asserter.assertExpression\\(\"imanull") "//"))
9301 ;; This test fails with "ambiguous method invocation"
9302 (delete-file "CacheTest.java")
9303 ;; This test doesn't have access to the temp directory
9304 (substitute* "ClassCreatorTest.java"
9305 (("java.io.tmpdir") "user.dir"))
9306 ;; This test fails in trying to detect whether it can run.
9307 (substitute* "ClassCreator.java"
9308 (("boolean canRun =.*") "boolean canRun = false;\n"))
9309 ;; ...and these tests depend on it.
9310 (delete-file "scripting/JexlScriptEngineOptionalTest.java")
9311 (delete-file "scripting/JexlScriptEngineTest.java"))
9313 (add-before 'build 'run-javacc
9315 (with-directory-excursion "src/main/java/org/apache/commons/jexl2/parser/"
9316 (invoke "java" "jjtree" "Parser.jjt")
9317 (invoke "java" "javacc" "Parser.jj"))
9320 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)))
9322 `(("java-junit" ,java-junit)
9323 ("java-hamcrest-core" ,java-hamcrest-core)
9324 ("javacc" ,javacc-4)))
9325 (home-page "https://commons.apache.org/proper/commons-jexl/")
9326 (synopsis "Java Expression Language ")
9327 (description "JEXL is a library intended to facilitate the implementation
9328 of dynamic and scripting features in applications and frameworks written in
9329 Java. JEXL implements an Expression Language based on some extensions to the
9330 JSTL Expression Language supporting most of the constructs seen in
9331 shell-script or ECMAScript. Its goal is to expose scripting features usable
9332 by technical operatives or consultants working with enterprise platforms.")
9333 (license license:asl2.0)))
9335 (define-public java-lz4
9341 (uri (string-append "https://github.com/lz4/lz4-java/archive/"
9343 (file-name (string-append name "-" version ".tar.gz"))
9346 "096dm57p2lzqk28n0j2p52x2j3cvnsd2dfqn43n7vbwrkjsy7y54"))))
9347 (build-system ant-build-system)
9349 `(#:jar-name "lz4.jar"
9351 #:source-dir "src/java:src/java-unsafe"
9352 #:tests? #f; FIXME: requires more dependencies
9354 (modify-phases %standard-phases
9355 (add-before 'configure 'generate-source
9357 (with-directory-excursion "src/build/source_templates"
9358 (invoke "mvel2" "../gen_sources.mvel" "../../java"))
9361 `(("mvel" ,java-mvel2)))
9362 (home-page "https://jpountz.github.io/lz4-java")
9363 (synopsis "Compression algorithm")
9364 (description "LZ4 - Java is a Java port of the popular lz4 compression
9365 algorithms and xxHash hashing algorithm.")
9366 (license license:asl2.0)))
9368 (define-public java-bouncycastle
9370 (name "java-bouncycastle")
9374 (uri (string-append "https://github.com/bcgit/bc-java/archive/r"
9375 (substring version 0 1) "v"
9376 (substring version 2 4) ".tar.gz"))
9379 "0v434513y708qc87k4xz13p2kzydc736lk3ks67df9mg11s7hchv"))
9380 (modules '((guix build utils)))
9383 (for-each delete-file
9384 (find-files "." "\\.jar$"))
9386 (build-system ant-build-system)
9391 (modify-phases %standard-phases
9394 (invoke "ant" "-f" "ant/jdk15+.xml" "build-provider")
9395 (invoke "ant" "-f" "ant/jdk15+.xml" "build")))
9396 ;; FIXME: the tests freeze.
9399 ;; (invoke "ant" "-f" "ant/jdk15+.xml" "test")))
9401 (install-jars "build/artifacts/jdk1.5/jars")))))
9403 `(("java-javax-mail" ,java-javax-mail)))
9406 ("junit" ,java-junit)
9407 ("java-native-access" ,java-native-access)
9408 ("java-native-access-platform" ,java-native-access-platform)))
9409 (home-page "https://www.bouncycastle.org")
9410 (synopsis "Cryptographic library")
9411 (description "Bouncy Castle is a cryptographic library for the Java
9412 programming language.")
9413 (license license:expat)))
9415 (define-public java-lmax-disruptor
9417 (name "java-lmax-disruptor")
9421 (uri (string-append "https://github.com/LMAX-Exchange/disruptor/"
9422 "archive/" version ".tar.gz"))
9423 (file-name (string-append name "-" version ".tar.gz"))
9426 "17da2gwj5abnlsfgn2xqjk5lgzbg4vkb0hdv2dvc8r2fx4bi7w3g"))))
9427 (build-system ant-build-system)
9429 `(#:jar-name "java-lmax-disruptor.jar"
9431 #:tests? #f)); tests hang
9433 `(("junit" ,java-junit)
9434 ("java-hdrhistogram" ,java-hdrhistogram)
9435 ("java-jmock" ,java-jmock)
9436 ("java-jmock-legacy" ,java-jmock-legacy)
9437 ("java-jmock-junit4" ,java-jmock-junit4)
9438 ("java-hamcrest-all" ,java-hamcrest-all)))
9440 `(("cglib" ,java-cglib)
9441 ("objenesis" ,java-objenesis)
9443 (home-page "https://www.lmax.com/disruptor")
9444 (synopsis "High performance inter-thread communication")
9445 (description "LMAX Disruptor is a software pattern and software component
9446 for high performance inter-thread communication that avoids the need for
9447 message queues or resource locking.")
9448 (license license:asl2.0)))
9450 (define-public java-commons-bcel
9452 (name "java-commons-bcel")
9456 (uri (string-append "mirror://apache/commons/bcel/source/bcel-"
9457 version "-src.tar.gz"))
9460 "0j3x1rxd673k07psclk8k13rqh0x0mf2yy5qiwkiw4z3afa568jy"))))
9461 (build-system ant-build-system)
9463 `(#:jar-name "bcel.jar"
9465 #:source-dir "src/main/java"
9466 #:test-dir "src/test/java"
9467 ;; FIXME: Tests require the unpackaged jna.
9469 (home-page "https://commons.apache.org/proper/commons-bcel/")
9470 (synopsis "Byte code engineering library")
9471 (description "The Byte Code Engineering Library (Apache Commons BCEL) is
9472 intended to give users a convenient way to analyze, create, and
9473 manipulate (binary) Java class files. Classes are represented by objects
9474 which contain all the symbolic information of the given class: methods, fields
9475 and byte code instructions, in particular.
9477 Such objects can be read from an existing file, be transformed by a
9478 program (e.g. a class loader at run-time) and written to a file again. An
9479 even more interesting application is the creation of classes from scratch at
9480 run-time. The @dfn{Byte Code Engineering Library} (BCEL) may be also useful
9481 if you want to learn about the @dfn{Java Virtual Machine} (JVM) and the format
9482 of Java @code{.class} files.")
9483 (license license:asl2.0)))
9485 (define-public java-xerial-core
9487 (name "java-xerial-core")
9491 (uri (string-append "https://github.com/xerial/xerial-java/archive/"
9493 (file-name (string-append name "-" version ".tar.gz"))
9496 "0d3g863i41bgalpa4xr3vm1h140l091n8iwgq5qvby5yivns9y8d"))))
9497 (build-system ant-build-system)
9499 `(#:jar-name "xerial-core.jar"
9500 #:source-dir "xerial-core/src/main/java"
9501 #:test-dir "xerial-core/src/test"
9503 (modify-phases %standard-phases
9504 (add-before 'build 'copy-resources
9506 (copy-recursively "xerial-core/src/main/resources"
9510 `(("junit" ,java-junit)
9511 ("hamcrest" ,java-hamcrest-core)))
9512 (home-page "https://github.com/xerial/xerial-java")
9513 (synopsis "Data management libraries for Java")
9514 (description "Xerial is a set of data management libraries for the Java
9515 programming language. The ultimate goal of the Xerial project is to manage
9516 everything as database, including class objects, text format data, data
9518 (license license:asl2.0)))
9520 (define-public java-powermock-reflect
9522 (name "java-powermock-reflect")
9526 (uri (string-append "https://github.com/powermock/powermock/"
9527 "archive/powermock-" version ".tar.gz"))
9528 (file-name (string-append name "-" version ".tar.gz"))
9531 "0sbgi5vqq7k72wzcdjb20s370vyd4hsbnx71pzb8ishml3gy7fwy"))
9533 (search-patches "java-powermock-fix-java-files.patch"))))
9534 (build-system ant-build-system)
9536 `(#:jar-name "java-powermock-reflect.jar"
9538 #:source-dir "powermock-reflect/src/main/java"
9539 #:test-dir "powermock-reflect/src/test"))
9541 `(("java-objenesis" ,java-objenesis)))
9543 `(("junit" ,java-junit)
9544 ("cglib" ,java-cglib)
9546 ("hamcrest" ,java-hamcrest-core)
9547 ("assertj" ,java-assertj)))
9548 (home-page "https://github.com/powermock/powermock")
9549 (synopsis "Mock library extension framework")
9550 (description "PowerMock is a framework that extends other mock libraries
9551 such as EasyMock with more powerful capabilities. PowerMock uses a custom
9552 classloader and bytecode manipulation to enable mocking of static methods,
9553 constructors, final classes and methods, private methods, removal of static
9554 initializers and more. By using a custom classloader no changes need to be
9555 done to the IDE or continuous integration servers which simplifies adoption.")
9556 (license license:asl2.0)))
9558 (define-public java-powermock-core
9560 (inherit java-powermock-reflect)
9561 (name "java-powermock-core")
9563 `(#:jar-name "java-powermock-core.jar"
9564 #:source-dir "powermock-core/src/main/java"
9565 #:test-dir "powermock-core/src/test"
9566 #:tests? #f; requires powermock-api
9569 (modify-phases %standard-phases
9570 (add-before 'build 'copy-resources
9572 (copy-recursively "powermock-core/src/main/resources"
9576 `(("reflect" ,java-powermock-reflect)
9577 ("javassist" ,java-jboss-javassist)))
9579 `(("junit" ,java-junit)
9580 ("assertj" ,java-assertj)
9581 ("mockito" ,java-mockito-1)))))
9583 (define-public java-powermock-api-support
9585 (inherit java-powermock-reflect)
9586 (name "java-powermock-api-support")
9587 (build-system ant-build-system)
9589 `(#:jar-name "java-powermock-api-support.jar"
9591 #:source-dir "powermock-api/powermock-api-support/src/main/java"
9592 #:tests? #f)); no tests
9594 `(("core" ,java-powermock-core)
9595 ("reflect" ,java-powermock-reflect)))))
9597 (define-public java-powermock-modules-junit4-common
9599 (inherit java-powermock-reflect)
9600 (name "java-powermock-modules-junit4-common")
9601 (build-system ant-build-system)
9603 `(#:jar-name "java-powermock-modules-junit4-common.jar"
9605 #:source-dir "powermock-modules/powermock-module-junit4-common/src/main/java"
9606 #:test-dir "powermock-modules/powermock-module-junit4-common/src/test"))
9608 `(("core" ,java-powermock-core)
9609 ("easymock" ,java-easymock)
9610 ("reflect" ,java-powermock-reflect)
9611 ("hamcrest" ,java-hamcrest-core)
9612 ("cglib" ,java-cglib)))))
9614 (define-public java-powermock-modules-junit4
9616 (inherit java-powermock-reflect)
9617 (name "java-powermock-modules-junit4")
9618 (build-system ant-build-system)
9620 `(#:jar-name "java-powermock-modules-junit4.jar"
9622 #:source-dir "powermock-modules/powermock-module-junit4/src/main/java"
9623 #:test-dir "powermock-modules/powermock-module-junit4/src/test"
9625 (modify-phases %standard-phases
9626 (add-before 'build 'fix-junit-detection
9628 ;; Our junit version is 4.12-SNAPSHOT
9629 (substitute* (find-files "powermock-modules/powermock-module-junit4"
9630 "PowerMockJUnit4MethodValidator.java")
9631 (("4.12") "4.12-SNAPSHOT"))
9634 `(("core" ,java-powermock-core)
9635 ("reflect" ,java-powermock-reflect)
9636 ("common" ,java-powermock-modules-junit4-common)
9637 ("cglib" ,java-cglib)))
9639 `(("easymock" ,java-easymock)
9640 ("hamcrest" ,java-hamcrest-core)
9641 ("objenesis" ,java-objenesis)
9643 ("junit" ,java-junit)))))
9645 (define-public java-powermock-api-easymock
9647 (inherit java-powermock-reflect)
9648 (name "java-powermock-api-easymock")
9649 (build-system ant-build-system)
9651 `(#:jar-name "java-powermock-api-easymock.jar"
9653 #:source-dir "powermock-api/powermock-api-easymock/src/main/java"
9654 #:tests? #f; no tests
9656 (modify-phases %standard-phases
9657 (add-before 'build 'fix-file
9659 ;; FIXME: This looks wrong, but it fixes a build error.
9660 (with-directory-excursion "powermock-api/powermock-api-easymock"
9661 (substitute* "src/main/java/org/powermock/api/easymock/PowerMock.java"
9662 (("classLoader instanceof MockClassLoader") "false")
9663 (("\\(\\(MockClassLoader\\) classLoader\\).*;") ";")))
9666 `(("core" ,java-powermock-core)
9667 ("easymock" ,java-easymock)
9668 ("reflect" ,java-powermock-reflect)
9669 ("support" ,java-powermock-api-support)
9670 ("cglib" ,java-cglib)))))
9672 (define-public java-jboss-jms-api-spec
9674 (name "java-jboss-jms-api-spec")
9678 (uri (string-append "https://github.com/jboss/jboss-jms-api_spec/"
9679 "archive/jboss-jms-api_" version
9680 "_spec-1.0.1.Final.tar.gz"))
9683 "07bqblw9kq2i8q92bz70fvavq5xjfkaixl8xa0m0cypjgy82rb7m"))))
9684 (build-system ant-build-system)
9686 `(#:jar-name "java-jboss-jms-api_spec.jar"
9689 #:tests? #f)); no tests
9690 (home-page "https://github.com/jboss/jboss-jms-api_spec")
9691 (synopsis "Java Message Service API specification")
9692 (description "Java Message Service (JMS) API is used to send messages
9693 messages between two or more clients. It is a messaging standard that allows
9694 application components to create, send, receive, and read messages.")
9695 ; either gpl2 only with GPL Classpath Exception, or cddl.
9696 (license (list license:gpl2 license:cddl1.0))))
9698 (define-public java-mail
9704 (uri (string-append "https://github.com/javaee/javamail/archive/"
9705 "JAVAMAIL-1_6_0.tar.gz"))
9708 "1b4rg7fpj50ld90a71iz2m4gm3f5cnw18p3q3rbrrryjip46kx92"))))
9709 (build-system ant-build-system)
9711 `(#:jar-name "java-mail.jar"
9713 #:source-dir "mail/src/main/java"
9714 #:test-dir "mail/src/test"
9716 (list "**/CollectorFormatterTest.java"
9717 "**/CompactFormatterTest.java"
9718 "**/DurationFilterTest.java"
9719 "**/MailHandlerTest.java"
9720 "**/GetLocalAddressTest.java"
9721 ;; FIXME: both end with:
9722 ;; java.lang.ClassNotFoundException:
9723 ;; javax.mail.internet.MimeMultipartParseTest
9724 "**/MimeMultipartParseTest.java"
9725 "**/SearchTermSerializationTest.java")
9727 (modify-phases %standard-phases
9728 (add-before 'configure 'move-version.java
9730 (copy-file "mail/src/main/resources/javax/mail/Version.java"
9731 "mail/src/main/java/javax/mail/Version.java")
9733 (add-before 'build 'copy-resources
9735 (copy-recursively "mail/src/main/resources/META-INF"
9736 "build/classes/META-INF")
9739 `(("junit" ,java-junit)
9740 ("hamcrest" ,java-hamcrest-core)))
9741 (home-page "https://javaee.github.io/javamail/")
9742 (synopsis "Mail-related functionnalities in Java")
9743 (description "The JavaMail API provides a platform-independent and
9744 protocol-independent framework to build mail and messaging applications.")
9745 ;; General Public License Version 2 only ("GPL") or the Common Development
9746 ;; and Distribution License("CDDL")
9747 (license (list license:cddl1.1
9748 license:gpl2)))); with classpath exception
9750 (define-public java-jeromq
9752 (name "java-jeromq")
9757 (url "https://github.com/zeromq/jeromq.git")
9758 (commit (string-append "v" version))))
9759 (file-name (string-append name "-" version "-checkout"))
9762 "1gxkp7lv2ahymgrqdw94ncq54bmp4m4sw5m1x9gkp7l5bxn0xsyj"))
9763 (patches (search-patches "java-jeromq-fix-tests.patch"))))
9764 (build-system ant-build-system)
9766 `(#:jar-name "java-jeromq.jar"
9767 #:source-dir "src/main/java"
9773 "**/ZBeaconTest.java"
9775 "**/DealerSpecTest.java"
9776 "**/CustomDecoderTest.java"
9777 "**/CustomEncoderTest.java"
9778 "**/ConnectRidTest.java"
9779 "**/ReqSpecTest.java"
9780 "**/PushPullSpecTest.java"
9781 "**/PubSubHwmTest.java"
9782 "**/RouterSpecTest.java"
9783 "**/ProxyTest.java")))
9785 `(("java-jnacl" ,java-jnacl)))
9787 `(("java-hamcrest-core" ,java-hamcrest-core)
9788 ("junit" ,java-junit)))
9789 (home-page "http://zeromq.org/bindings:java")
9790 (synopsis "Java binding for 0MQ")
9791 (description "Jeromq provides the java bindings for 0MQ.")
9792 (license license:mpl2.0)))
9794 (define-public java-kafka-clients
9796 (name "java-kafka-clients")
9800 (uri (string-append "mirror://apache/kafka/" version "/kafka-"
9801 version "-src.tgz"))
9804 "1yxmnsmliwm7671q5yy9bl4jdqyyn00n26cggz9brwczx80w1vfq"))))
9805 (build-system ant-build-system)
9807 `(#:jar-name "java-kafka-clients.jar"
9809 #:source-dir "clients/src/main/java"
9810 #:test-dir "clients/src/test"
9813 ;; This file does not contain a class
9814 "**/IntegrationTest.java"
9816 "**/ClientUtilsTest.java"
9817 ;; End with errors that seem related to our powermock
9818 "**/KafkaProducerTest.java"
9819 "**/BufferPoolTest.java")))
9821 `(("java-slf4j-api" ,java-slf4j-api)
9822 ("java-lz4" ,java-lz4)))
9824 `(("junit" ,java-junit)
9825 ("hamcrest" ,java-hamcrest-all)
9826 ("objenesis" ,java-objenesis)
9828 ("cglib" ,java-cglib)
9829 ("javassist" ,java-jboss-javassist)
9830 ("snappy" ,java-snappy)
9831 ("easymock" ,java-easymock)
9832 ("powermock" ,java-powermock-core)
9833 ("powermock-easymock" ,java-powermock-api-easymock)
9834 ("powermock-junit4-common" ,java-powermock-modules-junit4-common)
9835 ("powermock-junit4" ,java-powermock-modules-junit4)
9836 ("powermock-support" ,java-powermock-api-support)
9837 ("java-bouncycastle" ,java-bouncycastle)))
9838 (home-page "https://kafka.apache.org")
9839 (synopsis "Distributed streaming platform")
9840 (description "Kafka is a distributed streaming platform, which means:
9842 @item it can publish and subscribe to streams of records;
9843 @item it can store streams of records in a fault-tolerant way;
9844 @item it can process streams of records as they occur.
9846 ;; Either cddl or gpl2 only.
9847 (license (list license:cddl1.1; actually cddl1.1
9848 license:gpl2)))); with classpath exception
9850 (define-public java-jdom
9856 (uri (string-append "http://jdom.org/dist/binary/archive/jdom-"
9860 "07wdpm3jwwc9q38kmdw40fvbmv6jzjrkrf8m0zqs58f79a672wfl"))))
9861 (build-system ant-build-system)
9863 `(#:build-target "package"
9864 #:tests? #f; tests are run as part of the build process
9866 (modify-phases %standard-phases
9868 (install-jars "build")))))
9869 (home-page "http://jdom.org/")
9870 (synopsis "Access, manipulate, and output XML data")
9871 (description "Java-based solution for accessing, manipulating, and
9872 outputting XML data from Java code.")
9873 (license license:bsd-4)))
9875 (define-public java-geronimo-xbean-reflect
9877 (name "java-geronimo-xbean-reflect")
9882 (url "https://svn.apache.org/repos/asf/geronimo/xbean/tags/xbean-4.5/")
9883 (revision 1807396)))
9884 (file-name (string-append name "-" version))
9887 "18q3i6jgm6rkw8aysfgihgywrdc5nvijrwnslmi3ww497jvri6ja"))))
9888 (build-system ant-build-system)
9890 `(#:jar-name "geronimo-xbean-reflect.jar"
9891 #:source-dir "xbean-reflect/src/main/java"
9892 #:test-dir "xbean-reflect/src/test"
9895 (list "**/Abstract*.java" "**/AsmParameterNameLoaderTest.java"
9896 "**/ObjectRecipeTest.java" "**/ParameterNameLoaderTest.java"
9897 "**/RecipeHelperTest.java" "**/XbeanAsmParameterNameLoaderTest.java")
9899 (modify-phases %standard-phases
9900 (add-before 'build 'fix-source
9902 (let ((dir "xbean-reflect/src/main/java/org/apache/xbean/recipe/"))
9903 ;; org.apache.xbean.asm6 is actually repackaged java-asm
9904 (substitute* (string-append dir "XbeanAsmParameterNameLoader.java")
9905 (("org.apache.xbean.asm5") "org.objectweb.asm"))
9909 ("log4j" ,java-log4j-api)
9910 ("log4j-1.2" ,java-log4j-1.2-api)
9911 ("log4j-core" ,java-log4j-core)
9912 ("logging" ,java-commons-logging-minimal)))
9914 `(("junit" ,java-junit)))
9915 (home-page "https://geronimo.apache.org/maven/xbean/3.6/xbean-reflect/")
9916 (synopsis "Dependency injection helper")
9917 (description "Xbean-reflect provides very flexible ways to create objects
9918 and graphs of objects for dependency injection frameworks")
9919 (license license:asl2.0)))
9921 (define-public java-geronimo-xbean-bundleutils
9923 (inherit java-geronimo-xbean-reflect)
9924 (name "java-geronimo-xbean-bundleutils")
9926 `(#:jar-name "geronimo-xbean-bundleutils.jar"
9927 #:source-dir "xbean-bundleutils/src/main/java"
9928 #:test-dir "xbean-bundleutils/src/test"
9930 (modify-phases %standard-phases
9931 (add-before 'build 'fix-java
9933 ;; We use a more recent version of osgi, so this file requires
9934 ;; more interface method implementations.
9935 (substitute* "xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/DelegatingBundleContext.java"
9936 (("import org.osgi.framework.ServiceRegistration;")
9937 "import org.osgi.framework.ServiceRegistration;
9938 import org.osgi.framework.ServiceFactory;
9939 import java.util.Collection;
9940 import org.osgi.framework.ServiceObjects;")
9941 (("public Bundle getBundle\\(\\)")
9943 public <S> ServiceObjects<S> getServiceObjects(ServiceReference<S> reference) {
9944 throw new UnsupportedOperationException();
9947 public <S> ServiceRegistration<S> registerService(Class<S> clazz,
9948 ServiceFactory<S> factory, Dictionary<String, ?> properties) {
9949 throw new UnsupportedOperationException();
9951 public Bundle getBundle()"))
9954 `(("java-slf4j" ,java-slf4j-api)
9955 ("java-asm" ,java-asm)
9956 ("java-osgi-framework" ,java-osgi-framework)
9957 ("java-eclipse-osgi" ,java-eclipse-osgi)
9958 ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin)))))
9960 (define-public java-geronimo-xbean-asm-util
9962 (inherit java-geronimo-xbean-reflect)
9963 (name "java-geronimo-xbean-asm-util")
9965 `(#:jar-name "geronimo-xbean-asm-util.jar"
9966 #:source-dir "xbean-asm-util/src/main/java"
9967 #:tests? #f)); no tests
9969 `(("java-asm" ,java-asm)))
9970 (native-inputs '())))
9972 (define-public java-geronimo-xbean-finder
9974 (inherit java-geronimo-xbean-reflect)
9975 (name "java-geronimo-xbean-finder")
9977 `(#:jar-name "geronimo-xbean-finder.jar"
9978 #:source-dir "xbean-finder/src/main/java"
9979 #:test-dir "xbean-finder/src/test"))
9981 `(("java-slf4j-api" ,java-slf4j-api)
9982 ("java-asm" ,java-asm)
9983 ("java-geronimo-xbean-bundleutils" ,java-geronimo-xbean-bundleutils)
9984 ("java-geronimo-xbean-asm-util" ,java-geronimo-xbean-asm-util)
9985 ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin)
9986 ("java-osgi-framework" ,java-osgi-framework)))
9988 `(("java-junit" ,java-junit)
9989 ("java-hamcrest-core" ,java-hamcrest-core)))))
9991 (define-public java-gson
9997 (uri (string-append "https://github.com/google/gson/archive/"
9998 "gson-parent-" version ".tar.gz"))
10001 "1j4qnp7v046q0k48c4kyf69sxaasx2h949d3cqwsm3kzxms3x0f9"))))
10002 (build-system ant-build-system)
10004 `(#:jar-name "gson.jar"
10005 #:source-dir "gson/src/main/java"
10006 #:test-dir "gson/src/test"))
10008 `(("java-junit" ,java-junit)
10009 ("java-hamcrest-core" ,java-hamcrest-core)))
10010 (home-page "https://github.com/google/gson")
10011 (synopsis "Java serialization/deserialization library from/to JSON")
10012 (description "Gson is a Java library that can be used to convert Java
10013 Objects into their JSON representation. It can also be used to convert a JSON
10014 string to an equivalent Java object. Gson can work with arbitrary Java objects
10015 including pre-existing objects that you do not have source-code of.")
10016 (license license:asl2.0)))
10018 (define-public java-hawtjni
10020 (name "java-hawtjni")
10024 (uri (string-append "https://github.com/fusesource/hawtjni/archive/"
10025 "hawtjni-project-" version ".tar.gz"))
10028 "1bqfd732rmh6svyx17fpw9175gc9gzkcbyps2yyrf50c3zzjas6g"))))
10029 (build-system ant-build-system)
10031 `(#:jar-name "hawtjni.jar"
10032 #:source-dir "hawtjni-generator/src/main/java:hawtjni-runtime/src/main/java"
10033 #:tests? #f; no tests
10035 (modify-phases %standard-phases
10036 (add-before 'build 'build-native
10037 (lambda* (#:key inputs #:allow-other-keys)
10038 (let ((include (string-append "-I" (assoc-ref inputs "jdk") "/include/linux")))
10039 (with-directory-excursion "hawtjni-generator/src/main/resources/"
10040 (invoke "gcc" "-c" "hawtjni.c" "-o" "hawtjni.o"
10041 "-fPIC" "-O2" include)
10042 (invoke "gcc" "-c" "hawtjni-callback.c" "-o" "hawtjni-callback.o"
10043 "-fPIC" "-O2" include)
10044 (invoke "gcc" "-o" "libhawtjni.so" "-shared"
10045 "hawtjni.o" "hawtjni-callback.o")))
10047 (add-after 'install 'install-native
10048 (lambda* (#:key outputs #:allow-other-keys)
10049 (let* ((out (assoc-ref outputs "out"))
10050 (lib (string-append out "/lib"))
10051 (inc (string-append out "/include")))
10052 (with-directory-excursion "hawtjni-generator/src/main/resources/"
10053 (install-file "libhawtjni.so" lib)
10054 (install-file "hawtjni.h" inc)))
10057 `(("java-commons-cli" ,java-commons-cli)
10058 ("java-asm" ,java-asm)
10059 ("java-geronimo-xbean-finder" ,java-geronimo-xbean-finder)))
10060 (home-page "https://fusesource.github.io/hawtjni/")
10061 (synopsis "JNI code generator")
10062 (description "HawtJNI is a code generator that produces the JNI code needed
10063 to implement Java native methods. It is based on the jnigen code generator
10064 that is part of the SWT Tools project.")
10065 (license license:asl2.0)))
10067 (define-public java-jansi-native
10069 (name "java-jansi-native")
10073 (uri (string-append "https://github.com/fusesource/jansi-native/"
10074 "archive/jansi-native-" version ".tar.gz"))
10077 "0j2ydlgxbzbgshqkwghbxxxnbnx1mmjgd6k5fw6xfvxw1z956yqf"))))
10078 (build-system ant-build-system)
10080 `(#:jar-name "jansi-native.jar"
10081 #:source-dir "src/main/java"
10082 #:tests? #f; no tests
10084 (modify-phases %standard-phases
10085 (add-before 'build 'build-native
10086 (lambda* (#:key inputs #:allow-other-keys)
10087 ;; there are more required files for windows in windows/
10088 (with-directory-excursion "src/main/native-package/src"
10089 (substitute* "jansi_ttyname.c"
10090 (("#include \"jansi_.*") ""))
10091 (invoke "gcc" "-c" "jansi_ttyname.c" "-o" "jansi_ttyname.o"
10092 (string-append "-I" (assoc-ref inputs "java-hawtjni")
10094 (string-append "-I" (assoc-ref inputs "jdk")
10097 (invoke "gcc" "-o" "libjansi.so" "-shared" "jansi_ttyname.o"))))
10098 (add-before 'build 'install-native
10100 (let ((dir (string-append "build/classes/META-INF/native/"
10101 ,(match (%current-system)
10102 ((or "i686-linux" "armhf-linux")
10104 ((or "x86_64-linux" "aarch64-linux"
10107 (install-file "src/main/native-package/src/libjansi.so" dir))
10109 (add-after 'install 'install-native
10110 (lambda* (#:key outputs #:allow-other-keys)
10111 (install-file "src/main/native-package/src/jansi.h"
10112 (string-append (assoc-ref outputs "out") "/include"))
10115 `(("java-hawtjni" ,java-hawtjni)))
10116 (home-page "https://fusesource.github.io/jansi/")
10117 (synopsis "Native library for jansi")
10118 (description "This package provides the native library for jansi, a small
10119 Java library that allows you to use ANSI escape sequences to format your
10121 (license license:asl2.0)))
10123 (define-public java-jansi
10125 (name "java-jansi")
10129 (uri (string-append "https://github.com/fusesource/jansi/archive/"
10130 "jansi-project-" version ".tar.gz"))
10133 "11kh3144i3fzp21dpy8zg52mjmsr214k7km9p8ly0rqk2px0qq2z"))))
10134 (build-system ant-build-system)
10136 `(#:jar-name "jansi.jar"
10137 #:source-dir "jansi/src/main/java"
10138 #:test-dir "jansi/src/test"
10140 (modify-phases %standard-phases
10141 (add-after 'check 'clear-term
10143 (invoke "echo" "-e" "\\e[0m"))))))
10145 `(("java-jansi-native" ,java-jansi-native)))
10147 `(("java-junit" ,java-junit)
10148 ("java-hamcrest-core" ,java-hamcrest-core)))
10149 (home-page "https://fusesource.github.io/jansi/")
10150 (synopsis "Portable ANSI escape sequences")
10151 (description "Jansi is a Java library that allows you to use ANSI escape
10152 sequences to format your console output which works on every platform.")
10153 (license license:asl2.0)))
10155 (define-public java-jboss-el-api-spec
10157 (name "java-jboss-el-api-spec")
10161 (uri (string-append "https://github.com/jboss/jboss-el-api_spec/"
10162 "archive/jboss-el-api_" version
10163 "_spec-1.0.7.Final.tar.gz"))
10166 "1j45ljxalwlibxl7g7iv952sjxkw275m8vyxxij8l6wdd5pf0pdh"))))
10167 (build-system ant-build-system)
10169 `(#:jar-name "java-jboss-el-api_spec.jar"
10172 `(("java-junit" ,java-junit)))
10173 (home-page "https://github.com/jboss/jboss-el-api_spec")
10174 (synopsis "JSR-341 expression language 3.0 API")
10175 (description "This package contains an implementation of the JSR-341
10176 specification for the expression language 3.0. It implements an expression
10177 language inspired by ECMAScript and XPath. This language is used with
10178 JavaServer Pages (JSP).")
10179 ;; Either GPL2 only or CDDL.
10180 (license (list license:gpl2 license:cddl1.1))))
10182 (define-public java-jboss-interceptors-api-spec
10184 (name "java-jboss-interceptors-api-spec")
10188 (uri (string-append "https://github.com/jboss/jboss-interceptors-api_spec/"
10189 "archive/jboss-interceptors-api_" version
10190 "_spec-1.0.0.Final.tar.gz"))
10193 "0wv8x0jp9a5qxlrgkhb5jdk2gr6vi87b4j4kjb8ryxiy9gn8g51z"))))
10194 (build-system ant-build-system)
10196 `(#:jar-name "java-jboss-interceptors-api_spec.jar"
10199 #:tests? #f)); no tests
10200 (home-page "https://github.com/jboss/jboss-interceptors-api_spec")
10201 (synopsis "Interceptors 1.2 API classes from JSR 318")
10202 (description "Java-jboss-interceptors-api-spec implements the Interceptors
10203 API. Interceptors are used to interpose on business method invocations and
10205 ;; Either GPL2 only or CDDL.
10206 (license (list license:gpl2 license:cddl1.1))))
10208 (define-public java-cdi-api
10210 (name "java-cdi-api")
10214 (uri (string-append "https://github.com/cdi-spec/cdi/archive/"
10215 version ".tar.gz"))
10216 (file-name (string-append name "-" version ".tar.gz"))
10219 "1iv8b8bp07c5kmqic14jsr868vycjv4qv02lf3pkgp9z21mnfg5y"))))
10220 (build-system ant-build-system)
10222 `(#:source-dir "api/src/main/java"
10223 #:jar-name "java-cdi-api.jar"
10224 #:test-dir "api/src/test"
10226 #:tests? #f)); Tests fail because we don't have a CDI provider yet
10228 `(("java-javax-inject" ,java-javax-inject)
10229 ("java-jboss-el-api-spec" ,java-jboss-el-api-spec)
10230 ("java-jboss-interceptors-api-spec" ,java-jboss-interceptors-api-spec)))
10232 `(("java-testng" ,java-testng)
10233 ("java-hamcrest-core" ,java-hamcrest-core)))
10234 (home-page "http://cdi-spec.org/")
10235 (synopsis "Contexts and Dependency Injection APIs")
10236 (description "Java-cdi-api contains the required APIs for Contexts and
10237 Dependency Injection (CDI).")
10238 (license license:asl2.0)))
10240 (define-public java-joda-convert
10242 (name "java-joda-convert")
10246 (uri (string-append "https://github.com/JodaOrg/joda-convert/archive/v"
10247 version ".tar.gz"))
10248 (file-name (string-append name "-" version ".tar.gz"))
10251 "0vp346xz7dh9br4q7xazhc7hvzf76a6hf95fki9bg67q5jr0kjh7"))))
10252 (build-system ant-build-system)
10254 `(#:jar-name (string-append ,name "-" ,version ".jar")
10255 #:source-dir "src/main/java"
10256 #:test-include (list "**/Test*.java")
10257 ;; Contains only interfaces and base classes (no test)
10258 #:test-exclude (list "**/test*/**.java")))
10260 `(("java-guava" ,java-guava)))
10262 `(("java-junit" ,java-junit)
10263 ("java-hamcrest-core" ,java-hamcrest-core)))
10264 (home-page "http://www.joda.org/joda-convert/")
10265 (synopsis "Conversion between Objects and Strings")
10266 (description "Joda-Convert provides a small set of classes to aid
10267 conversion between Objects and Strings. It is not intended to tackle the
10268 wider problem of Object to Object transformation.")
10269 (license license:asl2.0)))
10271 (define-public java-joda-time
10273 (name "java-joda-time")
10277 (uri (string-append "https://github.com/JodaOrg/joda-time/archive/v"
10278 version ".tar.gz"))
10279 (file-name (string-append name "-" version ".tar.gz"))
10282 "1i9x91mi7yg2pasl0k3912f1pg46n37sps6rdb0v1gs8hj9ppwc1"))))
10283 (build-system ant-build-system)
10285 `(#:jar-name "java-joda-time.jar"
10286 #:source-dir "src/main/java"
10287 #:test-include (list "**/Test*.java")
10288 ;; There is no runnable test in these files
10289 #:test-exclude (list "**/Test*Chronology.java" "**/Test*Field.java")
10291 (modify-phases %standard-phases
10292 (add-after 'build 'build-resources
10294 (mkdir-p "build/classes/org/joda/time/tz/data")
10295 (mkdir-p "build/classes/org/joda/time/format")
10296 ;; This will produce the following exception:
10297 ;; java.io.IOException: Resource not found: "org/joda/time/tz/data/ZoneInfoMap"
10298 ;; which is normal, because it doesn't exist yet. It still generates
10299 ;; the same file as in the binary one can find on maven.
10300 (invoke "java" "-cp"
10301 (string-append "build/classes:" (getenv "CLASSPATH"))
10302 "org.joda.time.tz.ZoneInfoCompiler"
10303 "-src" "src/main/java/org/joda/time/tz/src"
10304 "-dst" "build/classes/org/joda/time/tz/data"
10305 "africa" "antarctica" "asia" "australasia"
10306 "europe" "northamerica" "southamerica"
10307 "pacificnew" "etcetera" "backward" "systemv")
10308 (for-each (lambda (f)
10309 (copy-file f (string-append
10310 "build/classes/org/joda/time/format/"
10312 (find-files "src/main/java/org/joda/time/format" ".*.properties"))
10314 (add-before 'install 'regenerate-jar
10316 ;; We need to regenerate the jar file to add generated data.
10317 (delete-file "build/jar/java-joda-time.jar")
10318 (invoke "ant" "jar")))
10319 (add-before 'check 'copy-test-resources
10321 (mkdir-p "build/test-classes/org/joda/time/tz/data")
10322 (copy-file "src/test/resources/tzdata/ZoneInfoMap"
10323 "build/test-classes/org/joda/time/tz/data/ZoneInfoMap")
10324 (copy-recursively "src/test/resources" "build/test-classes")
10327 `(("java-joda-convert" ,java-joda-convert)))
10329 `(("java-junit" ,java-junit)
10330 ("java-hamcrest-core" ,java-hamcrest-core)
10331 ("tzdata" ,tzdata)))
10332 (home-page "http://www.joda.org/joda-time/")
10333 (synopsis "Replacement for the Java date and time classes")
10334 (description "Joda-Time is a replacement for the Java date and time
10335 classes prior to Java SE 8.")
10336 (license license:asl2.0)))
10338 (define-public java-xerces
10340 (name "java-xerces")
10345 (uri (string-append "mirror://apache/xerces/j/source/"
10346 "Xerces-J-src." version ".tar.gz"))
10348 (base32 "1006igwy2lqrmjvdk64v8dg6qbk9c29pm8xxx7r87n0vnpvmx6pm"))
10349 (patches (search-patches
10350 "java-xerces-xjavac_taskdef.patch"
10351 "java-xerces-build_dont_unzip.patch"
10352 "java-xerces-bootclasspath.patch"))))
10353 (build-system ant-build-system)
10355 `(#:tests? #f;; Test files are not present
10356 #:test-target "test"
10359 (modify-phases %standard-phases
10360 (add-after 'unpack 'create-build.properties
10361 (lambda* (#:key inputs #:allow-other-keys)
10362 (let ((jaxp (assoc-ref inputs "java-jaxp"))
10363 (resolver (assoc-ref inputs "java-apache-xml-commons-resolver")))
10364 (with-output-to-file "build.properties"
10367 "jar.jaxp = ~a/share/java/jaxp.jar~@
10368 jar.apis-ext = ~a/share/java/jaxp.jar~@
10369 jar.resolver = ~a/share/java/xml-resolver.jar~%"
10370 jaxp jaxp resolver)))
10371 ;; Make xerces use our version of jaxp in tests
10372 (substitute* "build.xml"
10374 (string-append jaxp "/share/java/jaxp.jar"))
10375 (("\\$\\{tools.dir\\}/\\$\\{jar.apis\\}")
10378 (replace 'install (install-jars "build")))))
10380 `(("java-apache-xml-commons-resolver" ,java-apache-xml-commons-resolver)
10381 ("java-jaxp" ,java-jaxp)))
10382 (home-page "https://xerces.apache.org/xerces2-j/")
10383 (synopsis "Validating XML parser for Java with DOM level 3 support")
10384 (description "The Xerces2 Java parser is the reference implementation of
10385 XNI, the Xerces Native Interface, and also a fully conforming XML Schema
10388 Xerces2-J supports the following standards and APIs:
10391 @item eXtensible Markup Language (XML) 1.0 Second Edition Recommendation
10392 @item Namespaces in XML Recommendation
10393 @item Document Object Model (DOM) Level 2 Core, Events, and Traversal and
10394 Range Recommendations
10395 @item Simple API for XML (SAX) 2.0.1 Core and Extension
10396 @item Java APIs for XML Processing (JAXP) 1.2.01
10397 @item XML Schema 1.0 Structures and Datatypes Recommendations
10398 @item Experimental implementation of the Document Object Model (DOM) Level 3
10399 Core and Load/Save Working Drafts
10400 @item Provides a partial implementation of the XML Inclusions (XInclude) W3C
10401 Candidate Recommendation
10404 Xerces is now able to parse documents written according to the XML 1.1
10405 Candidate Recommendation, except that it does not yet provide an option to
10406 enable normalization checking as described in section 2.13 of this
10407 specification. It also handles namespaces according to the XML Namespaces 1.1
10408 Candidate Recommendation, and will correctly serialize XML 1.1 documents if
10409 the DOM level 3 load/save API's are in use.")
10410 (license license:asl2.0)))
10412 (define-public java-jakarta-regexp
10414 (name "java-jakarta-regexp")
10419 (uri (string-append
10420 "https://archive.apache.org/dist/jakarta/regexp/jakarta-regexp-"
10421 version ".tar.gz"))
10424 "0zg9rmyif48dck0cv6ynpxv23mmcsx265am1fnnxss7brgw0ms3r"))))
10425 (build-system ant-build-system)
10427 `(#:test-target "test"
10429 (modify-phases %standard-phases
10431 (lambda* (#:key outputs #:allow-other-keys)
10432 (let* ((out (assoc-ref outputs "out"))
10433 (out-share (string-append out "/share/java")))
10434 (mkdir-p out-share)
10435 (for-each (lambda (name)
10436 (install-file name out-share))
10437 (find-files "build" "^jakarta-regexp-.*\\.jar$"))
10439 (home-page "https://attic.apache.org/projects/jakarta-regexp.html")
10440 (synopsis "Regular expression parser generator for Java.")
10441 (description "@code{jakarta-regexp} is an old regular expression parser
10442 generator for Java.")
10443 (license license:asl2.0)))
10445 (define-public java-jline
10447 (name "java-jline")
10451 (uri (string-append "https://github.com/jline/jline1/archive/jline-"
10452 version ".tar.gz"))
10455 "0bi3p6vrh7a6v0fbpb6rx9plpmx5zk3lr352xzdbz2jcxg499wir"))))
10456 (build-system ant-build-system)
10458 `(#:jar-name "jline.jar"
10459 #:source-dir "src/main/java"
10460 #:test-dir "src/test"
10462 (modify-phases %standard-phases
10463 (add-before 'build 'copy-resources
10465 (copy-recursively "src/main/resources" "build/classes")
10468 `(("java-junit" ,java-junit)))
10469 (home-page "https://jline.github.io")
10470 (synopsis "Console input handling library")
10471 (description "JLine is a Java library for handling console input. It is
10472 similar in functionality to BSD editline and GNU readline but with additional
10473 features that bring it on par with the Z shell line editor.")
10474 (license license:bsd-3)))
10476 (define-public java-jline-2
10478 (inherit java-jline)
10482 (uri (string-append "https://github.com/jline/jline2/archive/jline-"
10483 version ".tar.gz"))
10486 "1c6qa26mf0viw8hg4jnv72s7i1qb1gh1l8rrzcdvqhqhx82rkdlf"))))
10489 ,@(package-arguments java-jline)))
10491 `(("java-jansi" ,java-jansi)
10492 ("java-jansi-native" ,java-jansi-native)))
10494 `(("java-powermock-modules-junit4" ,java-powermock-modules-junit4)
10495 ("java-powermock-modules-junit4-common" ,java-powermock-modules-junit4-common)
10496 ("java-powermock-api-easymock" ,java-powermock-api-easymock)
10497 ("java-powermock-api-support" ,java-powermock-api-support)
10498 ("java-powermock-core" ,java-powermock-core)
10499 ("java-powermock-reflect" ,java-powermock-reflect)
10500 ("java-easymock" ,java-easymock)
10501 ("java-jboss-javassist" ,java-jboss-javassist)
10502 ("java-objenesis" ,java-objenesis)
10503 ("java-asm" ,java-asm)
10504 ("java-hamcrest-core" ,java-hamcrest-core)
10505 ("java-cglib" ,java-cglib)
10506 ("java-junit" ,java-junit)
10507 ("java-hawtjni" ,java-hawtjni)))))
10509 (define-public java-xmlunit
10511 (name "java-xmlunit")
10515 (uri (string-append "https://github.com/xmlunit/xmlunit/archive/v"
10516 version ".tar.gz"))
10517 (file-name (string-append name "-" version ".tar.gz"))
10520 "035rivlnmwhfqj0fzviciv0bkh1h95ps1iwnh2kjcvdbk5nccm4z"))))
10521 (build-system ant-build-system)
10523 `(#:jar-name "java-xmlunit.jar"
10524 #:source-dir "xmlunit-core/src/main/java"
10525 #:test-dir "xmlunit-core/src/test"
10527 (modify-phases %standard-phases
10528 (add-before 'check 'copy-test-resources
10529 (lambda* (#:key inputs #:allow-other-keys)
10530 (copy-recursively (assoc-ref inputs "resources") "../test-resources")
10533 `(("java-junit" ,java-junit)
10534 ("java-mockito-1" ,java-mockito-1)
10535 ("java-hamcrest-all" ,java-hamcrest-all)
10536 ("java-objenesis" ,java-objenesis)
10537 ("java-asm" ,java-asm)
10538 ("java-cglib" ,java-cglib)
10542 (uri (git-reference
10543 (url "https://github.com/xmlunit/test-resources.git")
10544 (commit "a590d2ae865c3e0455691d76ba8eefccc2215aec")))
10545 (file-name "java-xmlunit-test-resources")
10548 "0r0glj37pg5l868yjz78gckr91cs8fysxxbp9p328dssssi91agr"))))))
10549 (home-page "http://www.xmlunit.org/")
10550 (synopsis "XML output testing")
10551 (description "XMLUnit provides you with the tools to verify the XML you
10552 emit is the one you want to create. It provides helpers to validate against
10553 an XML Schema, assert the values of XPath queries or compare XML documents
10554 against expected outcomes.")
10555 (license license:asl2.0)))
10557 (define-public java-xmlunit-legacy
10559 (inherit java-xmlunit)
10560 (name "java-xmlunit-legacy")
10562 `(#:jar-name "java-xmlunit-legacy.jar"
10563 #:source-dir "xmlunit-legacy/src/main/java"
10564 #:test-dir "xmlunit-legacy/src/test"))
10566 `(("java-xmlunit" ,java-xmlunit)
10567 ("java-junit" ,java-junit)))
10569 `(("java-mockito-1" ,java-mockito-1)))))
10571 (define-public java-xmlunit-matchers
10573 (inherit java-xmlunit)
10574 (name "java-xmlunit-matchers")
10576 `(#:jar-name "java-xmlunit-matchers.jar"
10577 #:source-dir "xmlunit-matchers/src/main/java"
10578 #:test-dir "xmlunit-matchers/src/test"
10580 ;; Cannot open xsd for http://www.xmlunit.org/test-support/Book.xsd
10581 (list "**/ValidationMatcherTest.java")
10583 (modify-phases %standard-phases
10584 (add-before 'build 'copy-test-class
10586 (copy-file "xmlunit-core/src/test/java/org/xmlunit/TestResources.java"
10587 "xmlunit-matchers/src/test/java/org/xmlunit/TestResources.java")
10589 (add-before 'build 'fix-test-resources-path
10591 (substitute* (find-files "xmlunit-matchers/src/test" ".*.java")
10592 (("../test-resources") "test-resources"))
10594 (add-before 'check 'copy-test-resources
10595 (lambda* (#:key inputs #:allow-other-keys)
10596 (copy-recursively (assoc-ref inputs "resources") "test-resources")
10599 `(("java-xmlunit" ,java-xmlunit)
10600 ("java-junit" ,java-junit)))))
10602 (define-public java-openchart2
10604 (name "java-openchart2")
10608 (uri (string-append "http://download.approximatrix.com/openchart2/"
10609 "openchart2-" version ".source.zip"))
10612 "1xq96zm5r02n1blja0072jmmsifmxc40lbyfbnmcnr6mw42frh4g"))))
10613 (build-system ant-build-system)
10615 `(#:test-target "test"
10617 (modify-phases %standard-phases
10618 (add-after 'unpack 'fix-junit-errors
10620 (with-directory-excursion "unittest/src/com/approximatrix/charting/"
10621 (substitute* '("coordsystem/ticklocator/NumericXTickLocatorTest.java"
10622 "coordsystem/ticklocator/NumericYTickLocatorTest.java"
10623 "coordsystem/ticklocator/ObjectXTickLocatorTest.java"
10624 "model/DefaultChartDataModelConstraintsTest.java"
10625 "model/MultiScatterDataModelConstraintsTest.java"
10626 "model/threedimensional/DotPlotDataModelConstraintsTest.java")
10627 (("(assertEquals[^;]+);" before _)
10628 (string-append (string-drop-right before 2) ", 1E-6);"))))
10630 (replace 'install (install-jars ".")))))
10633 ("java-junit" ,java-junit)
10634 ("java-hamcrest-core" ,java-hamcrest-core)))
10635 (home-page "http://approximatrix.com/products/openchart2/")
10636 (synopsis "Simple plotting for Java")
10637 (description "Openchart2 provides a simple, yet powerful, interface for
10638 Java programmers to create two-dimensional charts and plots. The library
10639 features an assortment of graph styles, including advanced scatter plots, bar
10640 graphs, and pie charts.")
10641 (license license:lgpl2.1+)))
10643 (define-public java-commons-httpclient
10645 (name "java-commons-httpclient")
10649 (uri (string-append "https://archive.apache.org/dist/httpcomponents/"
10650 "commons-httpclient/source/commons-httpclient-"
10651 version "-src.tar.gz"))
10654 "1wlpn3cfy3d4inxy6g7wxcsa8p7sshn6aldk9y4ia3lb879rd97r"))))
10655 (build-system ant-build-system)
10657 `(#:build-target "compile"
10658 #:test-target "test"
10659 #:tests? #f; requires junit-textui (junit 3)
10661 (modify-phases %standard-phases
10662 (add-before 'build 'fix-accent
10664 (for-each (lambda (file)
10665 (with-fluids ((%default-port-encoding "ISO-8859-1"))
10667 (("\\* @author Ortwin .*") "* @author Ortwin Glueck\n"))))
10668 '("src/java/org/apache/commons/httpclient/HttpContentTooLargeException.java"
10669 "src/examples/TrivialApp.java" "src/examples/ClientApp.java"
10670 "src/test/org/apache/commons/httpclient/TestHttps.java"
10671 "src/test/org/apache/commons/httpclient/TestURIUtil2.java"))
10674 (lambda* (#:key outputs #:allow-other-keys)
10675 (invoke "ant" "dist"
10676 (string-append "-Ddist.home=" (assoc-ref outputs "out")
10680 `(("java-commons-logging" ,java-commons-logging-minimal)
10681 ("java-commons-codec" ,java-commons-codec)))
10682 (home-page "https://hc.apache.org")
10683 (synopsis "HTTP/1.1 compliant HTTP agent implementation")
10684 (description "This package contains an HTTP/1.1 compliant HTTP agent
10685 implementation. It also provides reusable components for client-side
10686 authentication, HTTP state management, and HTTP connection management.")
10687 (license license:asl2.0)))
10689 (define-public java-commons-vfs
10691 (name "java-commons-vfs")
10695 (uri (string-append "mirror://apache/commons/vfs/source/"
10696 "commons-vfs2-distribution-" version "-src.tar.gz"))
10697 (file-name (string-append name "-" version ".tar.gz"))
10700 "1cnq1iaghbp4cslpnvwbp83i5v234x87irssqynhwpfgw7caf1s3"))
10701 (modules '((guix build utils)))
10704 (for-each delete-file
10705 (find-files "." "\\.jar$"))
10707 (build-system ant-build-system)
10709 `(#:jar-name "commons-vfs.jar"
10710 #:source-dir "commons-vfs2/src/main/java"
10711 #:test-dir "commons-vfs2/src/test"
10712 ; FIXME: tests depend on many things: apache sshd, hadoop, ftpserver, ...
10715 (modify-phases %standard-phases
10716 (add-before 'build 'remove-hadoop-and-webdav
10717 ; Remove these files as they are not required and depend on difficult
10720 (for-each delete-file-recursively
10721 '("commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/webdav"
10722 "commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/hdfs"))
10725 `(("java-commons-collections4" ,java-commons-collections4)
10726 ("java-commons-compress" ,java-commons-compress)
10727 ("java-commons-httpclient" ,java-commons-httpclient)
10728 ("java-commons-logging-minimal" ,java-commons-logging-minimal)
10729 ("java-commons-net" ,java-commons-net)
10730 ("java-jsch" ,java-jsch)))
10731 (home-page "http://commons.apache.org/proper/commons-vfs/")
10732 (synopsis "Java file system library")
10733 (description "Commons VFS provides a single API for accessing various
10734 different file systems. It presents a uniform view of the files from various
10735 different sources, such as the files on local disk, on an HTTP server, or
10736 inside a Zip archive.")
10737 (license license:asl2.0)))
10739 (define-public java-jakarta-oro
10741 (name "java-jakarta-oro")
10745 (uri (string-append "https://archive.apache.org/dist/jakarta/oro/"
10746 "jakarta-oro-" version ".tar.gz"))
10749 "0rpmnsskiwmsy8r0sckz5n5dbvh3vkxx8hpm177c754r8xy3qksc"))
10750 (modules '((guix build utils)))
10753 (delete-file (string-append "jakarta-oro-" ,version ".jar"))
10755 (build-system ant-build-system)
10757 `(#:build-target "package"
10758 #:tests? #f; tests are run as part of the build process
10760 (modify-phases %standard-phases
10762 (install-jars ,(string-append "jakarta-oro-" version))))))
10763 (home-page "https://jakarta.apache.org/oro/")
10764 (synopsis "Text-processing for Java")
10765 (description "The Jakarta-ORO Java classes are a set of text-processing
10766 Java classes that provide Perl5 compatible regular expressions, AWK-like
10767 regular expressions, glob expressions, and utility classes for performing
10768 substitutions, splits, filtering filenames, etc. This library is the successor
10769 of the OROMatcher, AwkTools, PerlTools, and TextTools libraries originally
10771 (license license:asl1.1)))
10773 (define-public java-native-access
10775 (name "java-native-access")
10779 (uri (string-append "https://github.com/java-native-access/jna/"
10780 "archive/" version ".tar.gz"))
10781 (file-name (string-append name "-" version ".tar.gz"))
10784 "0zrpzkib6b905i018a9pqlzkqinphywr6y4jwv6mwp63jjqvqkd9"))
10785 (modules '((guix build utils)))
10788 (for-each delete-file (find-files "." ".*.jar"))
10789 (delete-file-recursively "native/libffi")
10790 (delete-file-recursively "dist")
10792 (build-system ant-build-system)
10794 `(#:tests? #f; FIXME: tests require reflections.jar
10795 #:test-target "test"
10796 #:make-flags (list "-Ddynlink.native=true")
10798 (modify-phases %standard-phases
10799 (add-before 'build 'fix-build.xml
10800 (lambda* (#:key inputs #:allow-other-keys)
10801 (substitute* "build.xml"
10802 ;; Since we removed the bundled ant.jar, give the correct path
10803 (("lib/ant.jar") (string-append (assoc-ref inputs "ant") "/lib/ant.jar"))
10804 ;; We removed generated native libraries. We can only rebuild one
10805 ;; so don't fail if we can't find a native library for another architecture.
10806 (("zipfileset") "zipfileset erroronmissingarchive=\"false\""))
10807 ;; Copy test dependencies
10808 (copy-file (string-append (assoc-ref inputs "java-junit")
10809 "/share/java/junit.jar")
10811 (copy-file (string-append (assoc-ref inputs "java-hamcrest-core")
10812 "/share/java/hamcrest-core.jar")
10813 "lib/hamcrest-core.jar")
10814 ;; FIXME: once reflections.jar is built, copy it to lib/test.
10816 (add-before 'build 'build-native
10818 (invoke "ant" "-Ddynlink.native=true" "native")
10821 (install-jars "build")))))
10823 `(("libffi" ,libffi)
10827 `(("java-junit" ,java-junit)
10828 ("java-hamcrest-core" ,java-hamcrest-core)))
10829 (home-page "https://github.com/java-native-access/jna")
10830 (synopsis "Access to native shared libraries from Java")
10831 (description "JNA provides Java programs easy access to native shared
10832 libraries without writing anything but Java code - no JNI or native code is
10833 required. JNA allows you to call directly into native functions using natural
10834 Java method invocation.")
10835 ;; Java Native Access project (JNA) is dual-licensed under 2
10836 ;; alternative Free licenses: LGPL 2.1 or later and Apache License 2.0.
10839 license:lgpl2.1+))))
10841 (define-public java-native-access-platform
10843 (inherit java-native-access)
10844 (name "java-native-access-platform")
10846 `(#:test-target "test"
10847 #:tests? #f; require jna-test.jar
10849 (modify-phases %standard-phases
10850 (add-before 'build 'chdir
10852 (chdir "contrib/platform")
10854 (add-after 'chdir 'fix-ant
10855 (lambda* (#:key inputs #:allow-other-keys)
10856 (substitute* "nbproject/project.properties"
10857 (("../../build/jna.jar")
10858 (string-append (assoc-ref inputs "java-native-access")
10859 "/share/java/jna.jar"))
10860 (("../../lib/hamcrest-core-.*.jar")
10861 (string-append (assoc-ref inputs "java-hamcrest-core")
10862 "/share/java/hamcrest-core.jar"))
10863 (("../../lib/junit.jar")
10864 (string-append (assoc-ref inputs "java-junit")
10865 "/share/java/junit.jar")))
10868 (install-jars "dist")))))
10870 `(("java-native-access" ,java-native-access)))
10871 (synopsis "Cross-platform mappings for jna")
10872 (description "java-native-access-platfrom has cross-platform mappings
10873 and mappings for a number of commonly used platform functions, including a
10874 large number of Win32 mappings as well as a set of utility classes that
10875 simplify native access.")))
10877 (define-public java-jsch-agentproxy-core
10879 (name "java-jsch-agentproxy-core")
10883 (uri (string-append "https://github.com/ymnk/jsch-agent-proxy/archive/"
10884 version ".tar.gz"))
10885 (file-name (string-append name "-" version ".tar.gz"))
10888 "02iqg6jbc1kxvfzqcg6wy9ygqxfm82bw5rf6vnswqy4y572niz4q"))))
10889 (build-system ant-build-system)
10891 `(#:jar-name "jsch-agentproxy-core.jar"
10892 #:source-dir "jsch-agent-proxy-core/src/main/java"
10893 #:tests? #f)); no tests
10894 (home-page "https://github.com/ymnk/jsch-agent-proxy")
10895 (synopsis "Core component of the proxy to ssh-agent and Pageant in Java")
10896 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10897 and Pageant included Putty. It will be easily integrated into JSch, and users
10898 will be allowed to use these programs for authentication.")
10899 (license license:bsd-3)))
10901 (define-public java-jsch-agentproxy-sshagent
10903 (inherit java-jsch-agentproxy-core)
10904 (name "java-jsch-agentproxy-sshagent")
10906 `(#:jar-name "jsch-agentproxy-sshagent.jar"
10907 #:source-dir "jsch-agent-proxy-sshagent/src/main/java"
10908 #:tests? #f)); no tests
10910 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
10911 (synopsis "Proxy to ssh-agent")
10912 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10913 and Pageant included in Putty. This component contains the code for a proxy to
10916 (define-public java-jsch-agentproxy-usocket-jna
10918 (inherit java-jsch-agentproxy-core)
10919 (name "java-jsch-agentproxy-usocket-jna")
10921 `(#:jar-name "jsch-agentproxy-usocket-jna.jar"
10922 #:source-dir "jsch-agent-proxy-usocket-jna/src/main/java"
10923 #:tests? #f)); no tests
10925 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
10926 ("java-native-access" ,java-native-access)))
10927 (synopsis "USocketFactory implementation using JNA")
10928 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10929 and Pageant included in Putty. This component contains an implementation of
10930 USocketFactory using @dfn{JNA} (Java Native Access).")))
10932 (define-public java-jsch-agentproxy-pageant
10934 (inherit java-jsch-agentproxy-core)
10935 (name "java-jsch-agentproxy-pageant")
10937 `(#:jar-name "jsch-agentproxy-pageant.jar"
10938 #:source-dir "jsch-agent-proxy-pageant/src/main/java"
10939 #:tests? #f)); no tests
10941 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
10942 ("java-native-access" ,java-native-access)
10943 ("java-native-access-platform" ,java-native-access-platform)))
10944 (synopsis "Proxy to pageant")
10945 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10946 and Pageant included in Putty. This component contains the code for a proxy to
10949 (define-public java-jsch-agentproxy-usocket-nc
10951 (inherit java-jsch-agentproxy-core)
10952 (name "java-jsch-agentproxy-usocket-nc")
10954 `(#:jar-name "jsch-agentproxy-usocket-nc.jar"
10955 #:source-dir "jsch-agent-proxy-usocket-nc/src/main/java"
10956 #:tests? #f)); no tests
10958 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
10959 (synopsis "USocketFactory implementation using netcat")
10960 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10961 and Pageant included in Putty. This component contains an implementation of
10962 USocketFactory using netcat.")))
10964 (define-public java-jsch-agentproxy-connector-factory
10966 (inherit java-jsch-agentproxy-core)
10967 (name "java-jsch-agentproxy-connector-factory")
10969 `(#:jar-name "jsch-agentproxy-connector-factory.jar"
10970 #:source-dir "jsch-agent-proxy-connector-factory/src/main/java"
10971 #:tests? #f)); no tests
10973 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
10974 ("java-jsch-agentproxy-sshagent" ,java-jsch-agentproxy-sshagent)
10975 ("java-jsch-agentproxy-usocket-jna" ,java-jsch-agentproxy-usocket-jna)
10976 ("java-jsch-agentproxy-pageant" ,java-jsch-agentproxy-pageant)
10977 ("java-jsch-agentproxy-usocket-nc" ,java-jsch-agentproxy-usocket-nc)))
10978 (synopsis "Connector factory for jsch agent proxy")
10979 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10980 and Pageant included in Putty. This component contains a connector factory.")))
10982 (define-public java-jsch-agentproxy-jsch
10984 (inherit java-jsch-agentproxy-core)
10985 (name "java-jsch-agentproxy-jsch")
10987 `(#:jar-name "jsch-agentproxy-jsch.jar"
10988 #:source-dir "jsch-agent-proxy-jsch/src/main/java"
10989 #:tests? #f)); no tests
10991 `(("java-jsch" ,java-jsch)
10992 ("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
10993 (synopsis "JSch integration library for agentproxy")
10994 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10995 and Pageant included in Putty. This component contains a library to use
10996 jsch-agent-proxy with JSch.")))
10998 (define-public java-apache-ivy
11000 (name "java-apache-ivy")
11004 (uri (string-append "mirror://apache//ant/ivy/" version
11005 "/apache-ivy-" version "-src.tar.gz"))
11008 "1xkfn57g2m7l6y0xdq75x5rnrgk52m9jx2xah70g3ggl8750hbr0"))
11011 "java-apache-ivy-port-to-latest-bouncycastle.patch"))))
11012 (build-system ant-build-system)
11014 `(#:jar-name "ivy.jar"
11017 (modify-phases %standard-phases
11018 (add-before 'build 'remove-example
11020 (delete-file-recursively "src/example")
11022 (add-before 'build 'copy-resources
11024 (with-directory-excursion "src/java"
11025 (for-each (lambda (file)
11026 (install-file file (string-append "../../build/classes/" (dirname file))))
11028 (find-files "." ".*.css")
11029 (find-files "." ".*.ent")
11030 (find-files "." ".*.html")
11031 (find-files "." ".*.properties")
11032 (find-files "." ".*.xsd")
11033 (find-files "." ".*.xsl")
11034 (find-files "." ".*.xml"))))
11036 (add-before 'build 'fix-vfs
11039 '("src/java/org/apache/ivy/plugins/repository/vfs/VfsRepository.java"
11040 "src/java/org/apache/ivy/plugins/repository/vfs/VfsResource.java")
11041 (("import org.apache.commons.vfs") "import org.apache.commons.vfs2"))
11043 (add-before 'install 'copy-manifest
11045 (install-file "META-INF/MANIFEST.MF" "build/classes/META-INF")
11047 (add-before 'install 'repack
11049 (invoke "jar" "-cmf" "build/classes/META-INF/MANIFEST.MF" "build/jar/ivy.jar"
11050 "-C" "build/classes" ".")))
11051 (add-after 'install 'install-bin
11052 (lambda* (#:key outputs #:allow-other-keys)
11053 (let* ((bin (string-append (assoc-ref outputs "out") "/bin"))
11054 (ivy (string-append bin "/ivy"))
11055 (jar (string-append (assoc-ref outputs "out") "/share/java/ivy.jar")))
11057 (with-output-to-file ivy
11059 (display (string-append
11060 "#!" (which "sh") "\n"
11061 "if [[ -z $CLASSPATH ]]; then\n"
11062 " cp=\"" (getenv "CLASSPATH") ":" jar "\"\n"
11064 " cp=\"" (getenv "CLASSPATH") ":" jar ":$CLASSPATH\"\n"
11066 (which "java") " -cp $cp org.apache.ivy.Main $@\n"))))
11070 `(("java-bouncycastle" ,java-bouncycastle)
11071 ("java-commons-cli" ,java-commons-cli)
11072 ("java-commons-collections" ,java-commons-collections)
11073 ("java-commons-httpclient" ,java-commons-httpclient)
11074 ("java-commons-lang" ,java-commons-lang)
11075 ("java-commons-vfs" ,java-commons-vfs)
11076 ("java-jakarta-oro" ,java-jakarta-oro)
11077 ("java-jsch" ,java-jsch)
11078 ("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
11079 ("java-jsch-agentproxy-connector-factory" ,java-jsch-agentproxy-connector-factory)
11080 ("java-jsch-agentproxy-jsch" ,java-jsch-agentproxy-jsch)
11081 ("java-junit" ,java-junit)))
11082 (home-page "https://ant.apache.org/ivy")
11083 (synopsis "Dependency manager for the Java programming language")
11084 (description "Ivy is a tool for managing (recording, tracking, resolving
11085 and reporting) project dependencies. It is characterized by the following:
11088 @item flexibility and configurability - Ivy is essentially process agnostic
11089 and is not tied to any methodology or structure. Instead it provides the
11090 necessary flexibility and configurability to be adapted to a broad range
11091 of dependency management and build processes.
11092 @item tight integration with Apache Ant - while available as a standalone tool,
11093 Ivy works particularly well with Apache Ant providing a number of
11094 powerful Ant tasks ranging from dependency resolution to dependency
11095 reporting and publication.
11097 (license license:asl2.0)))
11099 (define-public java-eclipse-sisu-inject
11101 (name "java-eclipse-sisu-inject")
11105 (uri (git-reference
11106 (url "https://github.com/eclipse/sisu.inject/")
11107 (commit "releases/0.3.3")))
11108 (file-name (git-file-name name version))
11111 "0gibc9x0bw0f4ls086fx73610fcspz9g2as7kcpcfhvl5znysvg7"))))
11112 (build-system ant-build-system)
11114 `(#:jar-name "eclipse-sisu-inject.jar"
11115 #:source-dir "org.eclipse.sisu.inject/src"
11117 #:tests? #f)); no tests
11119 `(("java-guice" ,java-guice)
11120 ("java-guice-servlet" ,java-guice-servlet)
11121 ("java-javax-inject" ,java-javax-inject)
11122 ("java-javaee-servletapi" ,java-javaee-servletapi)
11123 ("java-junit" ,java-junit)
11124 ("java-slf4j-api" ,java-slf4j-api)
11125 ("java-jsr305" ,java-jsr305)
11126 ("java-jsr250" ,java-jsr250)
11127 ("java-cdi-api" ,java-cdi-api)
11128 ("java-osgi-framework" ,java-osgi-framework)
11129 ("java-osgi-util-tracker" ,java-osgi-util-tracker)
11130 ("java-testng" ,java-testng)))
11131 (home-page "https://www.eclipse.org/sisu/")
11132 (synopsis "Classpath scanning, auto-binding, and dynamic auto-wiring")
11133 (description "Sisu is a modular JSR330-based container that supports
11134 classpath scanning, auto-binding, and dynamic auto-wiring. Sisu uses
11135 Google-Guice to perform dependency injection and provide the core JSR330
11136 support, but removes the need to write explicit bindings in Guice modules.
11137 Integration with other containers via the Eclipse Extension Registry and the
11138 OSGi Service Registry is a goal of this project.")
11139 (license license:epl1.0)))
11141 (define-public java-eclipse-sisu-plexus
11143 (name "java-eclipse-sisu-plexus")
11147 (uri (git-reference
11148 (url "https://github.com/eclipse/sisu.plexus.git")
11149 (commit (string-append "releases/" version))))
11150 (file-name (git-file-name name version))
11153 "17mjlajnsqnk07cc58h1qpxrif85yb2m2y0pyba48yjjgikk8r9f"))
11154 (modules '((guix build utils)))
11157 (for-each delete-file (find-files "." ".*.jar"))
11158 (rename-file "org.eclipse.sisu.plexus.tests/src"
11159 "org.eclipse.sisu.plexus.tests/java")
11161 (build-system ant-build-system)
11163 `(#:jar-name "eclipse-sisu-plexus.jar"
11164 #:source-dir "org.eclipse.sisu.plexus/src"
11165 #:test-dir "org.eclipse.sisu.plexus.tests"
11168 ;; This test fails probably because we can't generate the necessary
11170 "**/PlexusLoggingTest.*"
11171 ;; FIXME: This test fails because of some injection error
11172 "**/PlexusRequirementTest.*")
11175 (modify-phases %standard-phases
11176 (add-before 'build 'copy-resources
11178 (install-file "org.eclipse.sisu.plexus/META-INF/plexus/components.xml"
11179 "build/classes/META-INF/plexus")
11181 (add-before 'check 'build-test-jar
11183 (with-directory-excursion "org.eclipse.sisu.plexus.tests/resources/component-jar/src/main/"
11185 (with-directory-excursion "java"
11186 (apply invoke "javac" "-cp"
11187 (string-append (getenv "CLASSPATH")
11188 ":../../../../../build/classes")
11189 (find-files "." ".*.java"))
11190 (for-each (lambda (file) (install-file file (string-append "../build/" file)))
11191 (find-files "." ".*.jar")))
11192 (mkdir-p "build/META-INF/plexus")
11193 (copy-file "resources/META-INF/plexus/components.xml"
11194 "build/META-INF/plexus/components.xml")
11195 (with-directory-excursion "build"
11196 (invoke "jar" "cf" "../../../component-jar-0.1.jar" ".")))
11197 (with-directory-excursion "org.eclipse.sisu.plexus.tests/"
11198 (copy-recursively "META-INF" "../build/test-classes/META-INF")
11199 (substitute* "java/org/eclipse/sisu/plexus/DefaultPlexusContainerTest.java"
11200 (("resources/component-jar")
11201 "org.eclipse.sisu.plexus.tests/resources/component-jar")))
11204 `(("java-plexus-classworlds" ,java-plexus-classworlds)
11205 ("java-plexus-util" ,java-plexus-utils)
11206 ("java-plexus-component-annotations" ,java-plexus-component-annotations)
11207 ("java-osgi-framework" ,java-osgi-framework)
11208 ("java-eclipse-sisu-inject" ,java-eclipse-sisu-inject)
11209 ("java-guice" ,java-guice)
11210 ("java-javax-inject" ,java-javax-inject)
11211 ("java-slf4j-api" ,java-slf4j-api)
11212 ("java-junit" ,java-junit)))
11214 `(("java-guava" ,java-guava)
11215 ("java-aopalliance" ,java-aopalliance)
11216 ("java-cglib" ,java-cglib)
11217 ("java-asm" ,java-asm)))
11218 (home-page "https://www.eclipse.org/sisu/")
11219 (synopsis "Plexus support for the sisu container")
11220 (description "Sisu is a modular JSR330-based container that supports
11221 classpath scanning, auto-binding, and dynamic auto-wiring. This package
11222 adds Plexus support to the Sisu-Inject container.")
11223 (license license:epl1.0)))
11225 (define-public java-commons-compiler
11227 (name "java-commons-compiler")
11231 (uri (git-reference
11232 (url "https://github.com/janino-compiler/janino")
11233 (commit "91aa95686d1e4ca3b16a984a03a38686572331b2")))
11234 (file-name (string-append name "-" version))
11237 "04hfdl59sgh20qkxzgnibvs8f9hy6n7znxwpk611y5d89977y62r"))
11238 (modules '((guix build utils)))
11241 (for-each delete-file
11242 (find-files "." "\\.jar$"))
11244 (build-system ant-build-system)
11246 `(#:jar-name "commons-compiler.jar"
11247 #:source-dir "commons-compiler/src/main"
11248 #:tests? #f)); no tests
11249 (home-page "https://github.com/janino-compiler/janino")
11250 (synopsis "Java compiler")
11251 (description "Commons-compiler contains an API for janino, including the
11252 @code{IExpressionEvaluator}, @code{IScriptEvaluator}, @code{IClassBodyEvaluator}
11253 and @code{ISimpleCompiler} interfaces.")
11254 (license license:bsd-3)))
11256 (define-public java-janino
11258 (inherit java-commons-compiler)
11259 (name "java-janino")
11261 `(#:jar-name "janino.jar"
11262 #:source-dir "src/main/java"
11264 (modify-phases %standard-phases
11265 (add-before 'configure 'chdir
11270 `(("java-commons-compiler" ,java-commons-compiler)))
11272 `(("java-junit" ,java-junit)
11273 ("java-hamcrest-core" ,java-hamcrest-core)))
11274 (description "Janino is a Java compiler. Janino can compile a set of
11275 source files to a set of class files like @code{javac}, but also compile a
11276 Java expression, block, class body or source file in memory, load the bytecode
11277 and execute it directly in the same JVM. @code{janino} can also be used for
11278 static code analysis or code manipulation.")))
11280 (define-public java-logback-core
11282 (name "java-logback-core")
11286 (uri (string-append "https://github.com/qos-ch/logback/archive/v_"
11287 version ".tar.gz"))
11288 (file-name (string-append name "-" version ".tar.gz"))
11291 "1x6ga74yfgm94cfx98gybakbrlilx8i2gn6dx13l40kasmys06mi"))
11292 (modules '((guix build utils)))
11295 (delete-file-recursively "logback-access/lib")
11297 (build-system ant-build-system)
11299 `(#:jar-name "logback.jar"
11300 #:source-dir "src/main/java"
11301 #:test-dir "src/test"
11303 ;; These tests fail with Unable to set MockitoNamingPolicy on cglib generator
11304 ;; which creates FastClasses
11305 (list "**/AllCoreTest.*"
11306 "**/AutoFlushingObjectWriterTest.*"
11308 "**/ResilientOutputStreamTest.*"
11309 ;; And we still don't want to run abstract classes
11312 (modify-phases %standard-phases
11313 (add-before 'configure 'chdir
11315 (chdir "logback-core")
11318 `(("java-javax-mail" ,java-javax-mail)
11319 ("servlet" ,java-javaee-servletapi)
11320 ("java-commons-compiler" ,java-commons-compiler)
11321 ("java-janino" ,java-janino)))
11323 `(("java-junit" ,java-junit)
11324 ("java-hamcrest-core" ,java-hamcrest-core)
11325 ("java-mockito-1" ,java-mockito-1)
11326 ("java-cglib" ,java-cglib)
11327 ("java-asm" ,java-asm)
11328 ("java-objenesis" ,java-objenesis)
11329 ("java-joda-time" ,java-joda-time)))
11330 (home-page "https://logback.qos.ch")
11331 (synopsis "Logging for java")
11332 (description "Logback is intended as a successor to the popular log4j project.
11333 This module lays the groundwork for the other two modules.")
11334 ;; Either epl1.0 or lgpl2.1
11335 (license (list license:epl1.0
11336 license:lgpl2.1))))
11338 (define-public java-logback-classic
11340 (inherit java-logback-core)
11341 (name "java-logback-classic")
11343 `(#:jar-name "logback-classic.jar"
11344 #:source-dir "src/main/java"
11345 #:test-dir "src/test"
11346 #:tests? #f; tests require more packages: h2, greenmail, hsql, subethamail, slf4j, log4j, felix
11349 (modify-phases %standard-phases
11350 (add-before 'configure 'chdir
11352 (chdir "logback-classic")
11355 (lambda* (#:key inputs #:allow-other-keys)
11356 (mkdir-p "build/classes")
11357 (setenv "CLASSPATH"
11359 (apply append (map (lambda (input)
11360 (find-files (assoc-ref inputs input)
11362 '("java-logback-core" "java-slf4j-api"
11363 "java-commons-compiler" "servlet"
11366 (apply invoke "groovyc" "-d" "build/classes" "-j"
11367 (find-files "src/main/" ".*\\.(groovy|java)$"))
11368 (invoke "ant" "jar")
11371 `(("java-logback-core" ,java-logback-core)
11372 ("java-slf4j-api" ,java-slf4j-api)
11373 ,@(package-inputs java-logback-core)))
11375 `(("groovy" ,groovy)))
11376 (description "Logback is intended as a successor to the popular log4j project.
11377 This module can be assimilated to a significantly improved version of log4j.
11378 Moreover, @code{logback-classic} natively implements the slf4j API so that you
11379 can readily switch back and forth between logback and other logging frameworks
11380 such as log4j or @code{java.util.logging} (JUL).")))
11382 (define-public java-qdox
11385 ; Newer version exists, but this version is required by java-plexus-component-metadata
11389 ;; 2.0-M4, -M5 at https://github.com/paul-hammant/qdox
11390 ;; Older releases at https://github.com/codehaus/qdox/
11391 ;; Note: The release at maven is pre-generated. The release at
11392 ;; github requires jflex.
11393 (uri (string-append "http://central.maven.org/maven2/"
11394 "com/thoughtworks/qdox/qdox/" version
11395 "/qdox-" version "-sources.jar"))
11398 "10xxrcaicq6axszcr2jpygisa4ch4sinyx5q7kqqxv4lknrmxp5x"))))
11399 (build-system ant-build-system)
11401 `(#:jar-name "qdox.jar"
11402 #:tests? #f)); no tests
11403 (home-page "http://qdox.codehaus.org/")
11404 (synopsis "Parse definitions from Java source files")
11405 (description "QDox is a high speed, small footprint parser for extracting
11406 class/interface/method definitions from source files complete with JavaDoc
11407 @code{@@tags}. It is designed to be used by active code generators or
11408 documentation tools.")
11409 (license license:asl2.0)))
11411 (define-public java-jgit
11414 (version "4.7.0.201704051617-r")
11417 (uri (string-append "https://repo1.maven.org/maven2/"
11418 "org/eclipse/jgit/org.eclipse.jgit/"
11419 version "/org.eclipse.jgit-"
11420 version "-sources.jar"))
11423 "13ii4jn02ynzq6i7gsyi21k2i94jpc85wf6bcm31q4cyvzv0mk4k"))))
11424 (build-system ant-build-system)
11426 `(#:tests? #f ; There are no tests to run.
11427 #:jar-name "jgit.jar"
11428 ;; JGit must be built with a JDK supporting Java 8.
11430 ;; Target our older default JDK.
11431 #:make-flags (list "-Dtarget=1.7")
11433 (modify-phases %standard-phases
11434 ;; The jar file generated by the default build.xml does not include
11435 ;; the text properties files, so we need to add them.
11436 (add-after 'build 'add-properties
11437 (lambda* (#:key jar-name #:allow-other-keys)
11438 (with-directory-excursion "src"
11439 (apply invoke "jar" "-uf"
11440 (string-append "../build/jar/" jar-name)
11441 (find-files "." "\\.properties$")))
11444 `(("java-classpathx-servletapi" ,java-classpathx-servletapi)
11445 ("java-javaewah" ,java-javaewah)
11446 ("java-jsch" ,java-jsch)
11447 ("java-slf4j-api" ,java-slf4j-api)))
11448 (home-page "https://eclipse.org/jgit/")
11449 (synopsis "Java library implementing the Git version control system")
11450 (description "JGit is a lightweight, pure Java library implementing the
11451 Git version control system, providing repository access routines, support for
11452 network protocols, and core version control algorithms.")
11453 (license license:edl1.0)))
11455 ;; For axoloti. This package can still be built with icedtea-7, which is
11456 ;; currently used as the default JDK.
11457 (define-public java-jgit-4.2
11458 (package (inherit java-jgit)
11459 (version "4.2.0.201601211800-r")
11462 (uri (string-append "https://repo1.maven.org/maven2/"
11463 "org/eclipse/jgit/org.eclipse.jgit/"
11464 version "/org.eclipse.jgit-"
11465 version "-sources.jar"))
11468 "15gm537iivhnzlkjym4x3wn5jqdjdragsw9pdpzqqg21nrc817mm"))))
11469 (build-system ant-build-system)
11471 (substitute-keyword-arguments (package-arguments java-jgit)
11472 ;; Build for default JDK.
11473 ((#:jdk _) icedtea-7)
11475 `(modify-phases ,phases
11476 (add-after 'unpack 'use-latest-javaewah-API
11478 (substitute* "src/org/eclipse/jgit/internal/storage/file/BitmapIndexImpl.java"
11479 (("wordinbits") "WORD_IN_BITS"))
11482 `(("java-javaewah" ,java-javaewah)
11483 ("java-jsch" ,java-jsch)
11484 ("java-slf4j-api" ,java-slf4j-api)))))
11486 (define-public abcl
11493 (uri (string-append "https://abcl.org/releases/"
11494 version "/abcl-src-" version ".tar.gz"))
11497 "0hvbcsffr8n2xwdixc8wyw1bfl9fxn2gyy0c4nma7j9zbn0wwgw9"))
11500 "abcl-fix-build-xml.patch"))))
11501 (build-system ant-build-system)
11503 `(("java-junit" ,java-junit)))
11505 `(#:build-target "abcl.jar"
11506 #:test-target "abcl.test"
11508 (modify-phases %standard-phases
11510 (lambda* (#:key outputs #:allow-other-keys)
11511 (let ((share (string-append (assoc-ref outputs "out")
11513 (bin (string-append (assoc-ref outputs "out")
11516 (install-file "dist/abcl.jar" share)
11517 (install-file "dist/abcl-contrib.jar" share)
11519 (with-output-to-file (string-append bin "abcl")
11521 (let ((classpath (string-append
11524 share "abcl-contrib.jar")))
11525 (display (string-append
11526 "#!" (which "sh") "\n"
11527 "if [[ -z $CLASSPATH ]]; then\n"
11528 " cp=\"" classpath "\"\n"
11530 " cp=\"" classpath ":$CLASSPATH\"\n"
11532 "exec " (which "java")
11533 " -cp $cp org.armedbear.lisp.Main $@\n")))))
11534 (chmod (string-append bin "abcl") #o755)
11536 (home-page "https://abcl.org/")
11537 (synopsis "Common Lisp Implementation on the JVM")
11539 "@dfn{Armed Bear Common Lisp} (ABCL) is a full implementation of the Common
11540 Lisp language featuring both an interpreter and a compiler, running in the
11541 JVM. It supports JSR-223 (Java scripting API): it can be a scripting engine
11542 in any Java application. Additionally, it can be used to implement (parts of)
11543 the application using Java to Lisp integration APIs.")
11544 (license (list license:gpl2+
11545 ;; named-readtables is released under 3 clause BSD
11547 ;; jfli is released under CPL 1.0
11550 (define-public java-jsonp-api
11552 (name "java-jsonp-api")
11556 (uri (git-reference
11557 (url "https://github.com/eclipse-ee4j/jsonp")
11558 (commit (string-append version "-RELEASE"))))
11559 (file-name (git-file-name name version))
11562 "0nxq16lrx7i87hgyj5rzcwilvr67h0i299gygfn8f5vs4n7n59vy"))))
11563 (build-system ant-build-system)
11565 `(#:jar-name "jsonp-api.jar"
11567 #:source-dir "api/src/main/java"
11568 #:test-dir "api/src/test"))
11569 (home-page "https://eclipse-ee4j.github.io/jsonp/")
11570 (synopsis "JSON Processing in Java")
11571 (description "JSON Processing (JSON-P) is a Java API to process (e.g.
11572 parse, generate, transform and query) JSON messages. It produces and
11573 consumes JSON text in a streaming fashion (similar to StAX API for XML)
11574 and allows to build a Java object model for JSON text using API classes
11575 (similar to DOM API for XML).")
11576 ;; either gpl2 only with classpath exception, or epl2.0.
11577 (license (list license:gpl2
11580 (define-public java-jsonp-impl
11582 (inherit java-jsonp-api)
11583 (name "java-jsonp-impl")
11585 `(#:jar-name "jsonp-impl.jar"
11587 #:source-dir "impl/src/main/java"
11588 #:test-dir "impl/src/test"))
11590 `(("java-jsonp-api" ,java-jsonp-api)))
11591 (description "JSON Processing (JSON-P) is a Java API to process (e.g.
11592 parse, generate, transform and query) JSON messages. This package contains
11593 a reference implementation of that API.")))
11595 (define-public java-xmp
11601 (uri (string-append "http://download.macromedia.com/pub/developer"
11602 "/xmp/sdk/XMPCoreJava-" version ".zip"))
11605 "14nai2mmsg7l5ya2y5mx4w4lr1az3sk2fjz6hiy4zdrsavgvl1g7"))))
11606 (build-system ant-build-system)
11608 `(#:build-target "build"
11609 #:tests? #f; no tests
11611 (modify-phases %standard-phases
11612 (add-after 'unpack 'chdir
11616 (add-before 'build 'fix-timestamp
11618 (substitute* "build.xml"
11619 (("\\$\\{BuildDate\\}") "1970 Jan 01 00:00:00-GMT"))
11622 (install-jars "."))
11623 (add-after 'install 'install-doc
11624 (lambda* (#:key outputs #:allow-other-keys)
11627 (string-append (assoc-ref outputs "out") "/share/doc/java-xmp"))
11630 `(("unzip" ,unzip)))
11631 (home-page "https://www.adobe.com/devnet/xmp.html")
11632 (synopsis "Extensible Metadat Platform (XMP) support in Java")
11633 (description "Adobe's Extensible Metadata Platform (XMP) is a labeling
11634 technology that allows you to embed data about a file, known as metadata,
11635 into the file itself. The XMP Toolkit for Java is based on the C++ XMPCore
11636 library and the API is similar.")
11637 (license license:bsd-3)))
11639 (define-public java-metadata-extractor
11641 (name "java-metadata-extractor")
11645 (uri (git-reference
11646 (url "https://github.com/drewnoakes/metadata-extractor")
11648 (file-name (git-file-name name version))
11651 "06yrq0swrl1r40yjbk5kqzjxr04jlkq9lfi711jvfgjf5kp2qinj"))))
11652 (build-system ant-build-system)
11654 `(#:jar-name "metadata-extractor.jar"
11655 #:source-dir "Source"
11658 (modify-phases %standard-phases
11659 (add-before 'check 'fix-test-dir
11661 (substitute* "build.xml"
11662 (("/java\">") "\">"))
11665 `(("java-xmp" ,java-xmp)))
11667 `(("java-hamcrest-core" ,java-hamcrest-core)
11668 ("java-junit" ,java-junit)))
11669 (home-page "https://github.com/drewnoakes/metadata-extractor")
11670 (synopsis "Extract metadata from image and video files")
11671 (description "Metadata-extractor is a straightforward Java library for
11672 reading metadata from image files. It is able to read metadata in Exif,
11673 IPTC, XMP, ICC and more formats.")
11674 (license license:asl2.0)))
11676 (define-public java-svg-salamander
11678 (name "java-svg-salamander")
11682 (uri (git-reference
11683 (url "https://github.com/blackears/svgSalamander")
11684 (commit (string-append "v" version))))
11685 (file-name (git-file-name name version))
11688 "1zv3kjdkf6iqf02x6ln76254y634j2ji448y706a65lsbfjmmicf"))
11689 (modules '((guix build utils)))
11692 (for-each delete-file (find-files "." ".*.jar"))
11695 (search-patches "java-svg-salamander-Fix-non-det.patch"))))
11696 (build-system ant-build-system)
11698 `(#:tests? #f; no tests
11700 (modify-phases %standard-phases
11701 (add-after 'unpack 'chdir
11705 (add-before 'build 'copy-jars
11706 (lambda* (#:key inputs #:allow-other-keys)
11707 (copy-file (car (find-files (assoc-ref inputs "javacc") "\\.jar$"))
11708 "../libraries/javacc.jar")
11709 (copy-file (car (find-files (assoc-ref inputs "ant") "ant\\.jar$"))
11710 "../libraries/ant.jar")
11713 (install-jars "dist")))))
11715 `(("javacc" ,javacc)))
11716 (home-page "https://github.com/blackears/svgSalamander")
11717 (synopsis "SVG engine for Java")
11718 (description "SVG Salamander is an SVG engine for Java that's designed
11719 to be small, fast, and allow programmers to use it with a minimum of fuss.
11720 It's in particular targeted for making it easy to integrate SVG into Java
11721 games and making it much easier for artists to design 2D game content - from
11722 rich interactive menus to charts and graphcs to complex animations.")
11723 (license license:bsd-2)))
11725 (define-public java-jboss-transaction-api-spec
11727 (name "java-jboss-transaction-api-spec")
11728 (version "1.2+1.1.1")
11731 (uri (git-reference
11732 (url "https://github.com/jboss/jboss-transaction-api_spec")
11733 (commit "jboss-transaction-api_1.2_spec-1.1.1.Final")))
11734 (file-name (git-file-name name version))
11737 "1xbfq5hvb86izflydxrqqv3k26c1ba2m0ap6m97shqrsdi9by4wy"))))
11738 (build-system ant-build-system)
11740 `(#:jar-name "java-jboss-transaction-api_spec.jar"
11741 #:source-dir "src/main/java"
11742 #:tests? #f)); no tests
11744 `(("java-cdi-api" ,java-cdi-api)
11745 ("java-jboss-interceptors-api-spec" ,java-jboss-interceptors-api-spec)))
11746 (home-page "https://github.com/jboss/jboss-transaction-api_spec")
11747 (synopsis "Generic transaction management API in Java")
11748 (description "Java-jboss-transaction-api-spec implements the Transactions
11749 API. A transaction is a unit of work containing one or more operations
11750 involving one or more shared resources having ACID (Atomicity, Consistency,
11751 Isolation and Durability) properties.")
11752 ;; either gpl2 only with classpath exception or cddl.
11753 (license (list license:gpl2 license:cddl1.0))))