1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2015, 2016, 2017 Ricardo Wurmus <rekado@elephly.net>
3 ;;; Copyright © 2016 Leo Famulari <leo@famulari.name>
4 ;;; Copyright © 2016, 2017 Roel Janssen <roel@gnu.org>
5 ;;; Copyright © 2017 Carlo Zancanaro <carlo@zancanaro.id.au>
6 ;;; Copyright © 2017 Julien Lepiller <julien@lepiller.eu>
7 ;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be>
8 ;;; Copyright © 2016, 2017, 2018 Alex Vong <alexvong1995@gmail.com>
9 ;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr>
10 ;;; Copyright © 2018 Gábor Boskovits <boskovits@gmail.com>
11 ;;; Copyright © 2018 Chris Marusich <cmmarusich@gmail.com>
13 ;;; This file is part of GNU Guix.
15 ;;; GNU Guix is free software; you can redistribute it and/or modify it
16 ;;; under the terms of the GNU General Public License as published by
17 ;;; the Free Software Foundation; either version 3 of the License, or (at
18 ;;; your option) any later version.
20 ;;; GNU Guix is distributed in the hope that it will be useful, but
21 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
22 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 ;;; GNU General Public License for more details.
25 ;;; You should have received a copy of the GNU General Public License
26 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
28 (define-module (gnu packages java)
29 #:use-module ((guix licenses) #:prefix license:)
30 #:use-module (guix packages)
31 #:use-module (guix download)
32 #:use-module (guix hg-download)
33 #:use-module (guix git-download)
34 #:use-module (guix svn-download)
35 #:use-module (guix utils)
36 #:use-module (guix build-system ant)
37 #:use-module (guix build-system gnu)
38 #:use-module (guix build-system trivial)
39 #:use-module (gnu packages)
40 #:use-module (gnu packages attr)
41 #:use-module (gnu packages autotools)
42 #:use-module (gnu packages base)
43 #:use-module (gnu packages bash)
44 #:use-module (gnu packages certs)
45 #:use-module (gnu packages cpio)
46 #:use-module (gnu packages cups)
47 #:use-module (gnu packages compression)
48 #:use-module (gnu packages fontutils)
49 #:use-module (gnu packages gawk)
50 #:use-module (gnu packages gettext)
51 #:use-module (gnu packages gcc)
52 #:use-module (gnu packages gl)
53 #:use-module (gnu packages gnuzilla) ;nss
54 #:use-module (gnu packages ghostscript) ;lcms
55 #:use-module (gnu packages gnome)
56 #:use-module (gnu packages gtk)
57 #:use-module (gnu packages guile)
58 #:use-module (gnu packages icu4c)
59 #:use-module (gnu packages image)
60 #:use-module (gnu packages libffi)
61 #:use-module (gnu packages linux) ;alsa
62 #:use-module (gnu packages web)
63 #:use-module (gnu packages wget)
64 #:use-module (gnu packages pkg-config)
65 #:use-module (gnu packages perl)
66 #:use-module (gnu packages popt)
67 #:use-module (gnu packages kerberos)
68 #:use-module (gnu packages xml)
69 #:use-module (gnu packages xorg)
70 #:use-module (gnu packages texinfo)
71 #:use-module ((srfi srfi-1) #:select (fold alist-delete))
72 #:use-module (srfi srfi-11)
73 #:use-module (ice-9 match))
77 ;;; Java bootstrap toolchain.
80 ;; The Java bootstrap begins with Jikes, a Java compiler written in C++. We
81 ;; use it to build the SableVM standard library and virtual machine, which are
82 ;; written in a simpler dialect of Java and C, respectively. This is
83 ;; sufficient to build an older version of Ant, which is needed to build an
84 ;; older version of ECJ, an incremental Java compiler, both of which are
87 ;; ECJ is needed to build the latest release of GNU Classpath (0.99).
88 ;; Classpath (> 0.98) is a requirement for JamVM, a more modern implementation
89 ;; of the Java virtual machine.
91 ;; With JamVM we can build the latest development version of GNU Classpath,
92 ;; which has much more support for Java 1.6 than the latest release. Since
93 ;; the previous build of JamVM is limited by the use of GNU Classpath 0.99 we
94 ;; rebuild it with the latest development version of GNU Classpath.
96 ;; Finally, we use the bootstrap toolchain to build the OpenJDK with the
97 ;; Icedtea 1.x build framework. We then build the more recent JDKs Icedtea
98 ;; 2.x and Icedtea 3.x.
106 (uri (string-append "mirror://sourceforge/jikes/Jikes/"
107 version "/jikes-" version ".tar.bz2"))
110 "1qqldrp74pzpy5ly421srqn30qppmm9cvjiqdngk8hf47dv2rc0c"))))
111 (build-system gnu-build-system)
112 (home-page "http://jikes.sourceforge.net/")
113 (synopsis "Compiler for the Java language")
114 (description "Jikes is a compiler that translates Java source files as
115 defined in The Java Language Specification into the bytecoded instruction set
116 and binary format defined in The Java Virtual Machine Specification.")
117 (license license:ibmpl1.0)))
119 (define sablevm-classpath
121 (name "sablevm-classpath")
125 (uri (string-append "mirror://sourceforge/sablevm/sablevm/"
126 version "/sablevm-classpath-" version ".tar.gz"))
129 "1qyhyfz8idghxdam16hdgpa24r2x4xbg9z8c8asa3chnd79h3zw2"))))
130 (build-system gnu-build-system)
147 ("pkg-config" ,pkg-config)))
148 (home-page "http://sablevm.org/")
149 (synopsis "Java Virtual Machine")
150 (description "SableVM is a clean-room, highly portable and efficient Java
151 virtual machine. Its goals are to be reasonably small, fast, and compliant
152 with the various specifications (JVM specification, JNI, invocation interface,
153 etc.). SableVM is no longer maintained.
155 This package provides the classpath library.")
156 (license license:lgpl2.1+)))
164 (uri (string-append "mirror://sourceforge/sablevm/sablevm/"
165 version "/sablevm-" version ".tar.gz"))
168 "1jyg4bsym6igz94wps5443c7wiwlzinqzkchcw972nz4kf1cql6g"))))
169 (build-system gnu-build-system)
172 (list "--with-internal-libffi=no"
173 "--with-internal-libpopt=no")
175 (modify-phases %standard-phases
176 (add-after 'unpack 'remove-timestamp-for-reproducibility
178 (substitute* "src/sablevm/Makefile.in"
179 (("\\$\\(SVMCOMPILETIME\\)") "(unknown)"))
181 (add-after 'unpack 'link-with-popt
183 (substitute* "src/sablevm/Makefile.in"
184 (("\\$\\(SVMADD\\)" match)
185 (string-append match " -lpopt")))
187 (add-after 'unpack 'patch-path-to-classpath
188 (lambda* (#:key inputs #:allow-other-keys)
189 (substitute* "Makefile.in"
190 (("@datadir@/sablevm-classpath")
191 (string-append (assoc-ref inputs "classpath")
192 "/share/sablevm-classpath")))
193 (substitute* "src/libsablevm/Makefile.in"
194 (("\\$\\(libdir\\)/sablevm-classpath")
195 (string-append (assoc-ref inputs "classpath")
196 "/lib/sablevm-classpath"))
197 (("\\$\\(datadir\\)/sablevm-classpath")
198 (string-append (assoc-ref inputs "classpath")
199 "/share/sablevm-classpath")))
202 `(("classpath" ,sablevm-classpath)
208 `(("libltdl" ,libltdl)))
209 (home-page "http://sablevm.org/")
210 (synopsis "Java Virtual Machine")
211 (description "SableVM is a clean-room, highly portable and efficient Java
212 virtual machine. Its goals are to be reasonably small, fast, and compliant
213 with the various specifications (JVM specification, JNI, invocation interface,
214 etc.). SableVM is no longer maintained.
216 This package provides the virtual machine.")
217 (license license:lgpl2.1+)))
219 (define ant-bootstrap
221 (name "ant-bootstrap")
222 ;; The 1.10.x series requires Java 8. 1.9.0 and later use generics, which
223 ;; are not supported. The 1.8.x series is the last to use only features
224 ;; supported by Jikes, but it cannot seem to be built with sablevm.
228 (uri (string-append "http://archive.apache.org/dist/"
229 "ant/source/apache-ant-"
230 version "-src.tar.bz2"))
233 "19pvqvgkxgpgsqm4lvbki5sm0z84kxmykdqicvfad47gc1r9mi2d"))))
234 (build-system gnu-build-system)
236 `(#:tests? #f ; no "check" target
238 (modify-phases %standard-phases
241 (lambda* (#:key inputs #:allow-other-keys)
243 (string-append (assoc-ref inputs "sablevm")
246 (string-append (assoc-ref inputs "sablevm")
247 "/bin/java-sablevm"))
249 (string-append (assoc-ref inputs "sablevm")
250 "/bin/javac-sablevm"))
252 ;; Use jikes instead of javac for <javac ...> tags in build.xml
253 (setenv "ANT_OPTS" "-Dbuild.compiler=jikes")
255 ;; jikes produces lots of warnings, but they are not very
256 ;; interesting, so we silence them.
257 (setenv "$BOOTJAVAC_OPTS" "-nowarn")
259 ;; Disable tests because we are bootstrapping and thus don't have
260 ;; any of the dependencies required to build and run the tests.
261 (substitute* "build.xml"
262 (("depends=\"jars,test-jar\"") "depends=\"jars\""))
263 (zero? (system* "bash" "bootstrap.sh"
264 (string-append "-Ddist.dir="
265 (assoc-ref %outputs "out"))))))
269 ("sablevm" ,sablevm)))
270 (home-page "http://ant.apache.org")
271 (synopsis "Build tool for Java")
273 "Ant is a platform-independent build tool for Java. It is similar to
274 make but is implemented using the Java language, requires the Java platform,
275 and is best suited to building Java projects. Ant uses XML to describe the
276 build process and its dependencies, whereas Make uses Makefile format.")
277 (license license:asl2.0)))
279 ;; Version 3.2.2 is the last version without a dependency on a full-fledged
280 ;; compiler for Java 1.5.
281 (define ecj-bootstrap
283 (name "ecj-bootstrap")
287 (uri (string-append "http://archive.eclipse.org/eclipse/"
288 "downloads/drops/R-" version
289 "-200702121330/ecjsrc.zip"))
292 "05hj82kxd23qaglsjkaqcj944riisjha7acf7h3ljhrjyljx8307"))))
293 ;; It would be so much easier if we could use the ant-build-system, but we
294 ;; cannot as we don't have ant at this point. We use ecj for
295 ;; bootstrapping the JDK.
296 (build-system gnu-build-system)
298 `(#:modules ((guix build gnu-build-system)
301 #:tests? #f ; there are no tests
303 (modify-phases %standard-phases
305 (lambda* (#:key inputs #:allow-other-keys)
308 (find-files (string-append (assoc-ref inputs "ant-bootstrap")
314 (lambda* (#:key inputs #:allow-other-keys)
315 ;; The unpack phase enters the "org" directory by mistake.
318 ;; Create a simple manifest to make ecj executable.
319 (with-output-to-file "manifest"
321 (display "Manifest-Version: 1.0
322 Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n")))
325 (and (zero? (apply system* "javac-sablevm"
326 (find-files "." "\\.java$")))
327 (zero? (system* "fastjar" "cvfm"
328 "ecj-bootstrap.jar" "manifest" ".")))))
330 (lambda* (#:key outputs #:allow-other-keys)
331 (let ((share (string-append (assoc-ref outputs "out")
334 (install-file "ecj-bootstrap.jar" share)
337 `(("ant-bootstrap" ,ant-bootstrap)
340 ("fastjar" ,fastjar)))
341 (home-page "https://eclipse.org")
342 (synopsis "Eclipse Java development tools core batch compiler")
343 (description "This package provides the Eclipse Java core batch compiler
344 for bootstrapping purposes. The @dfn{Eclipse compiler for Java} (ecj) is a
345 requirement for all GNU Classpath releases after version 0.93.")
346 (license license:epl1.0)))
348 (define ecj-javac-wrapper
349 (package (inherit ecj-bootstrap)
350 (name "ecj-javac-wrapper")
352 (build-system trivial-build-system)
354 `(#:modules ((guix build utils))
356 (let ((backend 'sablevm))
357 (use-modules (guix build utils))
358 (let* ((bin (string-append (assoc-ref %outputs "out") "/bin"))
359 (target (string-append bin "/javac"))
360 (guile (string-append (assoc-ref %build-inputs "guile")
362 (ecj (string-append (assoc-ref %build-inputs "ecj-bootstrap")
363 "/share/java/ecj-bootstrap.jar"))
366 (string-append (assoc-ref %build-inputs "sablevm")
367 "/lib/sablevm/bin/java"))
369 (string-append (assoc-ref %build-inputs "jamvm")
371 (bootcp (case backend
373 (let ((jvmlib (string-append
374 (assoc-ref %build-inputs "sablevm-classpath")
376 (string-append jvmlib "/jre/lib/rt.jar")))
378 (let ((jvmlib (string-append (assoc-ref %build-inputs "classpath")
379 "/share/classpath")))
380 (string-append jvmlib "/lib/glibj.zip:"
381 jvmlib "/lib/tools.zip"))))))
383 (with-output-to-file target
385 (format #t "#!~a --no-auto-compile\n!#\n" guile)
387 `(begin (use-modules (ice-9 match)
393 '(("-bootclasspath" ,bootcp)
398 (let ((classpath (getenv "CLASSPATH")))
402 (string-append ":" classpath)
404 (receive (vm-args other-args)
405 ;; Separate VM arguments from arguments to ECJ.
406 (partition (cut string-prefix? "-J" <>)
407 (fold (lambda (default acc)
408 (if (member (first default) acc)
409 acc (append default acc)))
413 ;; Remove "-J" prefix
414 (map (cut string-drop <> 2) vm-args)
415 '("org.eclipse.jdt.internal.compiler.batch.Main")
416 (cons "-nowarn" other-args)))))
418 (let ((args (cdr (command-line))))
420 (format (current-error-port) "javac: no arguments given!\n")
425 `(("guile" ,guile-2.2)
426 ("ecj-bootstrap" ,ecj-bootstrap)
428 ("sablevm-classpath" ,sablevm-classpath)))
429 (description "This package provides a wrapper around the @dfn{Eclipse
430 compiler for Java} (ecj) with a command line interface that is compatible with
431 the standard javac executable.")))
433 ;; Note: All the tool wrappers (e.g. for javah, javac, etc) fail with
434 ;; java.lang.UnsupportedClassVersionError. They simply won't run on the old
435 ;; sablevm. We use Classpath 0.99 to build JamVM, on which the Classpath
436 ;; tools do run. Using these Classpath tools on JamVM we can then build the
437 ;; development version of GNU Classpath.
438 (define classpath-on-sablevm
444 (uri (string-append "mirror://gnu/classpath/classpath-"
448 "1j7cby4k66f1nvckm48xcmh352b1d1b33qk7l6hi7dp9i9zjjagr"))))
449 (build-system gnu-build-system)
452 (list (string-append "--with-ecj-jar="
453 (assoc-ref %build-inputs "ecj-bootstrap")
454 "/share/java/ecj-bootstrap.jar")
455 (string-append "JAVAC="
456 (assoc-ref %build-inputs "ecj-javac-wrapper")
458 (string-append "JAVA="
459 (assoc-ref %build-inputs "sablevm")
462 "ac_cv_prog_java_works=yes" ; trust me
466 "--disable-gconf-peer"
472 (modify-phases %standard-phases
473 (add-after 'install 'install-data
474 (lambda _ (zero? (system* "make" "install-data")))))))
476 `(("ecj-bootstrap" ,ecj-bootstrap)
477 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
480 ("sablevm-classpath" ,sablevm-classpath)
482 ("pkg-config" ,pkg-config)))
483 (home-page "https://www.gnu.org/software/classpath/")
484 (synopsis "Essential libraries for Java")
485 (description "GNU Classpath is a project to create core class libraries
486 for use with runtimes, compilers and tools for the Java programming
488 ;; GPLv2 or later, with special linking exception.
489 (license license:gpl2+)))
491 (define jamvm-bootstrap
497 (uri (string-append "mirror://sourceforge/jamvm/jamvm/"
498 "JamVM%20" version "/jamvm-"
502 "1nl0zxz8y5x8gwsrm7n32bry4dx8x70p8z3s9jbdvs8avyb8whkn"))))
503 (build-system gnu-build-system)
506 (list (string-append "--with-classpath-install-dir="
507 (assoc-ref %build-inputs "classpath")))))
509 `(("classpath" ,classpath-on-sablevm)
510 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
512 (home-page "http://jamvm.sourceforge.net/")
513 (synopsis "Small Java Virtual Machine")
514 (description "JamVM is a Java Virtual Machine conforming to the JVM
515 specification edition 2 (blue book). It is extremely small. However, unlike
516 other small VMs it supports the full spec, including object finalisation and
518 (license license:gpl2+)))
520 ;; We need this because the tools provided by the latest release of GNU
521 ;; Classpath don't actually work with sablevm.
522 (define classpath-jamvm-wrappers
523 (package (inherit classpath-on-sablevm)
524 (name "classpath-jamvm-wrappers")
526 (build-system trivial-build-system)
528 `(#:modules ((guix build utils))
531 (use-modules (guix build utils))
532 (let* ((bash (assoc-ref %build-inputs "bash"))
533 (jamvm (assoc-ref %build-inputs "jamvm"))
534 (classpath (assoc-ref %build-inputs "classpath"))
535 (bin (string-append (assoc-ref %outputs "out")
538 (for-each (lambda (tool)
539 (with-output-to-file (string-append bin tool)
541 (format #t "#!~a/bin/sh
542 ~a/bin/jamvm -classpath ~a/share/classpath/tools.zip \
543 gnu.classpath.tools.~a.~a $@"
544 bash jamvm classpath tool
545 (if (string=? "native2ascii" tool)
546 "Native2ASCII" "Main"))))
547 (chmod (string-append bin tool) #o755))
557 ("jamvm" ,jamvm-bootstrap)
558 ("classpath" ,classpath-on-sablevm)))
560 (synopsis "Executables from GNU Classpath")
561 (description "This package provides wrappers around the tools provided by
562 the GNU Classpath library. They are executed by the JamVM virtual
565 (define ecj-javac-on-jamvm-wrapper
566 (package (inherit ecj-javac-wrapper)
567 (name "ecj-javac-on-jamvm-wrapper")
569 `(#:modules ((guix build utils))
571 ;; TODO: This builder is exactly the same as in ecj-javac-wrapper,
572 ;; except that the backend is 'jamvm here. Can we reuse the same
574 (let ((backend 'jamvm))
575 (use-modules (guix build utils))
576 (let* ((bin (string-append (assoc-ref %outputs "out") "/bin"))
577 (target (string-append bin "/javac"))
578 (guile (string-append (assoc-ref %build-inputs "guile")
580 (ecj (string-append (assoc-ref %build-inputs "ecj-bootstrap")
581 "/share/java/ecj-bootstrap.jar"))
584 (string-append (assoc-ref %build-inputs "sablevm")
585 "/lib/sablevm/bin/java"))
587 (string-append (assoc-ref %build-inputs "jamvm")
589 (bootcp (case backend
591 (let ((jvmlib (string-append
592 (assoc-ref %build-inputs "sablevm-classpath")
594 (string-append jvmlib "/jre/lib/rt.jar")))
596 (let ((jvmlib (string-append (assoc-ref %build-inputs "classpath")
597 "/share/classpath")))
598 (string-append jvmlib "/lib/glibj.zip:"
599 jvmlib "/lib/tools.zip"))))))
601 (with-output-to-file target
603 (format #t "#!~a --no-auto-compile\n!#\n" guile)
605 `(begin (use-modules (ice-9 match)
611 '(("-bootclasspath" ,bootcp)
616 (let ((classpath (getenv "CLASSPATH")))
620 (string-append ":" classpath)
622 (receive (vm-args other-args)
623 ;; Separate VM arguments from arguments to ECJ.
624 (partition (cut string-prefix? "-J" <>)
625 (fold (lambda (default acc)
626 (if (member (first default) acc)
627 acc (append default acc)))
631 ;; Remove "-J" prefix
632 (map (cut string-drop <> 2) vm-args)
633 '("org.eclipse.jdt.internal.compiler.batch.Main")
634 (cons "-nowarn" other-args)))))
636 (let ((args (cdr (command-line))))
638 (format (current-error-port) "javac: no arguments given!\n")
643 `(("guile" ,guile-2.2)
644 ("ecj-bootstrap" ,ecj-bootstrap)
645 ("jamvm" ,jamvm-bootstrap)
646 ("classpath" ,classpath-on-sablevm)))
647 (description "This package provides a wrapper around the @dfn{Eclipse
648 compiler for Java} (ecj) with a command line interface that is compatible with
649 the standard javac executable. The tool runs on JamVM instead of SableVM.")))
651 ;; The last release of GNU Classpath is 0.99 and it happened in 2012. Since
652 ;; then Classpath has gained much more support for Java 1.6.
653 (define-public classpath-devel
654 (let ((commit "e7c13ee0cf2005206fbec0eca677f8cf66d5a103")
656 (package (inherit classpath-on-sablevm)
657 (version (string-append "0.99-" revision "." (string-take commit 9)))
661 (url "https://git.savannah.gnu.org/git/classpath.git")
663 (file-name (string-append "classpath-" version "-checkout"))
666 "1v2rww76ww322mpg3s12a1kkc6gkp31bm9gcxs532h0wq285fiw4"))))
669 ;; Ensure that the initial heap size is smaller than the maximum
670 ;; size. By default only Xmx is set, which can lead to invalid
671 ;; memory settings on some machines with a lot of memory.
672 '("JAVAC_MEM_OPT=-J-Xms512M -J-Xmx768M")
674 (list (string-append "--with-ecj-jar="
675 (assoc-ref %build-inputs "ecj-bootstrap")
676 "/share/java/ecj-bootstrap.jar")
677 (string-append "--with-javac="
678 (assoc-ref %build-inputs "ecj-javac-wrapper")
680 (string-append "JAVA="
681 (assoc-ref %build-inputs "jamvm")
684 "ac_cv_prog_java_works=yes" ; trust me
688 "--disable-gconf-peer"
694 (modify-phases %standard-phases
695 (add-after 'unpack 'bootstrap
697 (zero? (system* "autoreconf" "-vif"))))
698 (add-after 'unpack 'remove-unsupported-annotations
700 (substitute* (find-files "java" "\\.java$")
703 (add-after 'install 'install-data
704 (lambda _ (zero? (system* "make" "install-data")))))))
706 `(("autoconf" ,autoconf)
707 ("automake" ,automake)
709 ("gettext" ,gettext-minimal)
711 ("classpath-jamvm-wrappers" ,classpath-jamvm-wrappers) ; for javah
712 ("ecj-bootstrap" ,ecj-bootstrap)
713 ("ecj-javac-wrapper" ,ecj-javac-on-jamvm-wrapper)
715 ("jamvm" ,jamvm-bootstrap)
717 ("pkg-config" ,pkg-config))))))
720 (package (inherit jamvm-bootstrap)
722 `(("classpath" ,classpath-devel)
723 ("ecj-javac-wrapper" ,ecj-javac-on-jamvm-wrapper)
726 (define ecj-javac-on-jamvm-wrapper-final
727 (package (inherit ecj-javac-on-jamvm-wrapper)
729 `(("guile" ,guile-2.2)
730 ("ecj-bootstrap" ,ecj-bootstrap)
732 ("classpath" ,classpath-devel)))))
734 ;; The bootstrap JDK consisting of jamvm, classpath-devel,
735 ;; ecj-javac-on-jamvm-wrapper-final cannot build Icedtea 2.x directly, because
736 ;; it's written in Java 7. It can, however, build the unmaintained Icedtea
737 ;; 1.x, which uses Java 6 only.
738 (define-public icedtea-6
745 "http://icedtea.wildebeest.org/download/source/icedtea6-"
749 "0bg9sb4f7qbq77c0zf9m17p47ga0kf0r9622g9p12ysg26jd1ksg"))
750 (modules '((guix build utils)))
752 '(substitute* "Makefile.in"
753 ;; do not leak information about the build host
754 (("DISTRIBUTION_ID=\"\\$\\(DIST_ID\\)\"")
755 "DISTRIBUTION_ID=\"\\\"guix\\\"\"")))))
756 (build-system gnu-build-system)
757 (outputs '("out" ; Java Runtime Environment
758 "jdk" ; Java Development Kit
759 "doc")) ; all documentation
761 `(;; There are many failing tests and many are known to fail upstream.
764 ;; The DSOs use $ORIGIN to refer to each other, but (guix build
765 ;; gremlin) doesn't support it yet, so skip this phase.
766 #:validate-runpath? #f
768 #:modules ((guix build utils)
769 (guix build gnu-build-system)
773 `("--enable-bootstrap"
776 "--with-parallel-jobs"
777 "--disable-downloading"
779 ,(string-append "--with-ecj="
780 (assoc-ref %build-inputs "ecj")
781 "/share/java/ecj-bootstrap.jar")
782 ,(string-append "--with-jar="
783 (assoc-ref %build-inputs "fastjar")
785 ,(string-append "--with-jdk-home="
786 (assoc-ref %build-inputs "classpath"))
787 ,(string-append "--with-java="
788 (assoc-ref %build-inputs "jamvm")
791 (modify-phases %standard-phases
793 (lambda* (#:key source inputs #:allow-other-keys)
794 (and (zero? (system* "tar" "xvf" source))
796 (chdir (string-append "icedtea6-" ,version))
798 (copy-recursively (assoc-ref inputs "openjdk-src") "openjdk")
799 ;; The convenient OpenJDK source bundle is no longer
800 ;; available for download, so we have to take the sources
801 ;; from the Mercurial repositories and change the Makefile
802 ;; to avoid tests for the OpenJDK zip archive.
803 (with-directory-excursion "openjdk"
804 (for-each (lambda (part)
808 (string-append part "-src"))
810 '("jdk" "hotspot" "corba"
811 "langtools" "jaxp" "jaxws")))
812 (substitute* "Makefile.in"
813 (("echo \"ERROR: No up-to-date OpenJDK zip available\"; exit -1;")
814 "echo \"trust me\";")
815 ;; The contents of the bootstrap directory must be
816 ;; writeable but when copying from the store they are
818 (("mkdir -p lib/rt" line)
819 (string-append line "; chmod -R u+w $(BOOT_DIR)")))
820 (zero? (system* "chmod" "-R" "u+w" "openjdk"))
822 (add-after 'unpack 'use-classpath
823 (lambda* (#:key inputs #:allow-other-keys)
824 (let ((jvmlib (assoc-ref inputs "classpath")))
825 ;; Classpath does not provide rt.jar.
826 (substitute* "Makefile.in"
827 (("\\$\\(SYSTEM_JDK_DIR\\)/jre/lib/rt.jar")
828 (string-append jvmlib "/share/classpath/glibj.zip")))
829 ;; Make sure we can find all classes.
831 (string-append jvmlib "/share/classpath/glibj.zip:"
832 jvmlib "/share/classpath/tools.zip"))
834 (string-append "-cp "
835 jvmlib "/share/classpath/glibj.zip:"
836 jvmlib "/share/classpath/tools.zip")))
838 (add-after 'unpack 'patch-patches
840 ;; shebang in patches so that they apply cleanly
841 (substitute* '("patches/jtreg-jrunscript.patch"
842 "patches/hotspot/hs23/drop_unlicensed_test.patch")
843 (("#!/bin/sh") (string-append "#!" (which "sh"))))
845 (add-after 'unpack 'patch-paths
846 (lambda* (#:key inputs #:allow-other-keys)
847 ;; buildtree.make generates shell scripts, so we need to replace
848 ;; the generated shebang
849 (substitute* '("openjdk/hotspot/make/linux/makefiles/buildtree.make")
850 (("/bin/sh") (which "bash")))
852 (let ((corebin (string-append
853 (assoc-ref inputs "coreutils") "/bin/"))
854 (binbin (string-append
855 (assoc-ref inputs "binutils") "/bin/"))
856 (grepbin (string-append
857 (assoc-ref inputs "grep") "/bin/")))
858 (substitute* '("openjdk/jdk/make/common/shared/Defs-linux.gmk"
859 "openjdk/corba/make/common/shared/Defs-linux.gmk")
860 (("UNIXCOMMAND_PATH = /bin/")
861 (string-append "UNIXCOMMAND_PATH = " corebin))
862 (("USRBIN_PATH = /usr/bin/")
863 (string-append "USRBIN_PATH = " corebin))
864 (("DEVTOOLS_PATH *= */usr/bin/")
865 (string-append "DEVTOOLS_PATH = " corebin))
866 (("COMPILER_PATH *= */usr/bin/")
867 (string-append "COMPILER_PATH = "
868 (assoc-ref inputs "gcc") "/bin/"))
869 (("DEF_OBJCOPY *=.*objcopy")
870 (string-append "DEF_OBJCOPY = " (which "objcopy"))))
872 ;; fix path to alsa header
873 (substitute* "openjdk/jdk/make/common/shared/Sanity.gmk"
874 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
875 (string-append "ALSA_INCLUDE="
876 (assoc-ref inputs "alsa-lib")
877 "/include/alsa/version.h")))
879 ;; fix hard-coded utility paths
880 (substitute* '("openjdk/jdk/make/common/shared/Defs-utils.gmk"
881 "openjdk/corba/make/common/shared/Defs-utils.gmk")
883 (string-append "ECHO = " (which "echo")))
885 (string-append "GREP = " (which "grep")))
887 (string-append "EGREP = " (which "egrep")))
889 (string-append "CPIO = " (which "cpio")))
890 (("READELF *=.*readelf")
891 (string-append "READELF = " (which "readelf")))
893 (string-append "AR = " (which "ar")))
895 (string-append "TAR = " (which "tar")))
897 (string-append "AS = " (which "as")))
899 (string-append "LD = " (which "ld")))
901 (string-append "STRIP = " (which "strip")))
903 (string-append "NM = " (which "nm")))
905 (string-append "SH = " (which "bash")))
907 (string-append "FIND = " (which "find")))
909 (string-append "LDD = " (which "ldd")))
910 (("NAWK *=.*(n|g)awk")
911 (string-append "NAWK = " (which "gawk")))
913 (string-append "XARGS = " (which "xargs")))
915 (string-append "UNZIP = " (which "unzip")))
917 (string-append "ZIPEXE = " (which "zip")))
919 (string-append "SED = " (which "sed"))))
921 ;; Some of these timestamps cause problems as they are more than
922 ;; 10 years ago, failing the build process.
924 "openjdk/jdk/src/share/classes/java/util/CurrencyData.properties"
925 (("AZ=AZM;2005-12-31-20-00-00;AZN") "AZ=AZN")
926 (("MZ=MZM;2006-06-30-22-00-00;MZN") "MZ=MZN")
927 (("RO=ROL;2005-06-30-21-00-00;RON") "RO=RON")
928 (("TR=TRL;2004-12-31-22-00-00;TRY") "TR=TRY"))
930 (add-before 'configure 'set-additional-paths
931 (lambda* (#:key inputs #:allow-other-keys)
933 (string-append (assoc-ref inputs "libxrender")
934 "/include/X11/extensions" ":"
935 (assoc-ref inputs "libxtst")
936 "/include/X11/extensions" ":"
937 (assoc-ref inputs "libxinerama")
938 "/include/X11/extensions" ":"
939 (or (getenv "CPATH") "")))
940 (setenv "ALT_CUPS_HEADERS_PATH"
941 (string-append (assoc-ref inputs "cups")
943 (setenv "ALT_FREETYPE_HEADERS_PATH"
944 (string-append (assoc-ref inputs "freetype")
946 (setenv "ALT_FREETYPE_LIB_PATH"
947 (string-append (assoc-ref inputs "freetype")
951 (lambda* (#:key outputs #:allow-other-keys)
952 (let ((doc (string-append (assoc-ref outputs "doc")
953 "/share/doc/icedtea"))
954 (jre (assoc-ref outputs "out"))
955 (jdk (assoc-ref outputs "jdk")))
956 (copy-recursively "openjdk.build/docs" doc)
957 (copy-recursively "openjdk.build/j2re-image" jre)
958 (copy-recursively "openjdk.build/j2sdk-image" jdk))
961 `(("ant" ,ant-bootstrap)
962 ("alsa-lib" ,alsa-lib)
964 ("classpath" ,classpath-devel)
965 ("coreutils" ,coreutils)
968 ("ecj" ,ecj-bootstrap)
969 ("ecj-javac" ,ecj-javac-on-jamvm-wrapper-final)
971 ("fontconfig" ,fontconfig)
972 ("freetype" ,freetype)
983 ("libxcomposite" ,libxcomposite)
985 ("libxinerama" ,libxinerama)
986 ("libxrender" ,libxrender)
987 ("libxslt" ,libxslt) ;for xsltproc
990 ("mit-krb5" ,mit-krb5)
992 ("nss-certs" ,nss-certs)
994 ("pkg-config" ,pkg-config)
995 ("procps" ,procps) ;for "free", even though I'm not sure we should use it
1005 (url "http://hg.openjdk.java.net/jdk6/jdk6/")
1006 (changeset "jdk6-b41")))
1009 "14q47yfg586fs64w30g8mk92m5dkxsvr36zzh0ra99xk5x0x96mv"))))
1014 (url "http://hg.openjdk.java.net/jdk6/jdk6/jdk/")
1015 (changeset "jdk6-b41")))
1018 "165824nhg1k1dx6zs9dny0j49rmk35jw5b13dmz8c77jfajml4v9"))))
1023 (url "http://hg.openjdk.java.net/jdk6/jdk6/hotspot/")
1024 (changeset "jdk6-b41")))
1027 "07lc1z4k5dj9nrc1wvwmpvxr3xgxrdkdh53xb95skk5ij49yagfd"))))
1032 (url "http://hg.openjdk.java.net/jdk6/jdk6/corba/")
1033 (changeset "jdk6-b41")))
1036 "1p9g1r9dnax2iwp7yb59qx7m4nmshqhwmrb2b8jj8zgbd9dl2i3q"))))
1041 (url "http://hg.openjdk.java.net/jdk6/jdk6/langtools/")
1042 (changeset "jdk6-b41")))
1045 "1x52wd67fynbbd9ild6fb4wvba3f5hhwk03qdjfazd0a1qr37z3d"))))
1050 (url "http://hg.openjdk.java.net/jdk6/jdk6/jaxp/")
1051 (changeset "jdk6-b41")))
1054 "0shlqrvzpr4nrkmv215lbxnby63s3yvbdh1yxcayznsyqwa4nlxm"))))
1059 (url "http://hg.openjdk.java.net/jdk6/jdk6/jaxws/")
1060 (changeset "jdk6-b41")))
1063 "0835lkw8vib1xhp8lxnybhlvzdh699hbi4mclxanydjk63zbpxk0"))))))
1064 (home-page "http://icedtea.classpath.org")
1065 (synopsis "Java development kit")
1067 "This package provides the OpenJDK built with the IcedTea build harness.
1068 This version of the OpenJDK is no longer maintained and is only used for
1069 bootstrapping purposes.")
1070 ;; IcedTea is released under the GPL2 + Classpath exception, which is the
1071 ;; same license as both GNU Classpath and OpenJDK.
1072 (license license:gpl2+)))
1074 (define-public icedtea-7
1075 (let* ((version "2.6.12")
1076 (drop (lambda (name hash)
1080 "http://icedtea.classpath.org/download/drops"
1081 "/icedtea7/" version "/" name ".tar.bz2"))
1082 (sha256 (base32 hash))))))
1089 "http://icedtea.wildebeest.org/download/source/icedtea-"
1093 "0s0zh0mj1sab99kb516lsgq3859vsc951phc565gwix4l5g9zppk"))
1094 (modules '((guix build utils)))
1096 '(substitute* "Makefile.in"
1097 ;; do not leak information about the build host
1098 (("DISTRIBUTION_ID=\"\\$\\(DIST_ID\\)\"")
1099 "DISTRIBUTION_ID=\"\\\"guix\\\"\"")))))
1100 (build-system gnu-build-system)
1101 (outputs '("out" ; Java Runtime Environment
1102 "jdk" ; Java Development Kit
1103 "doc")) ; all documentation
1105 `(;; There are many test failures. Some are known to
1106 ;; fail upstream, others relate to not having an X
1107 ;; server running at test time, yet others are a
1108 ;; complete mystery to me.
1110 ;; hotspot: passed: 241; failed: 45; error: 2
1111 ;; langtools: passed: 1,934; failed: 26
1115 ;; The DSOs use $ORIGIN to refer to each other, but (guix build
1116 ;; gremlin) doesn't support it yet, so skip this phase.
1117 #:validate-runpath? #f
1119 ;; Apparently, the C locale is needed for some of the tests.
1122 #:modules ((guix build utils)
1123 (guix build gnu-build-system)
1130 ;; TODO: package pcsc and sctp, and add to inputs
1131 `("--disable-system-pcsc"
1132 "--disable-system-sctp"
1133 "--enable-bootstrap"
1136 "--disable-downloading"
1137 "--disable-tests" ;they are run in the check phase instead
1138 "--with-openjdk-src-dir=./openjdk.src"
1139 ,(string-append "--with-jdk-home="
1140 (assoc-ref %build-inputs "jdk")))
1143 (modify-phases %standard-phases
1145 (lambda* (#:key source inputs #:allow-other-keys)
1146 (let ((target (string-append "icedtea-" ,version))
1147 (unpack (lambda* (name #:optional dir)
1149 (string-drop-right name 5))))
1151 (zero? (system* "tar" "xvf"
1152 (assoc-ref inputs name)
1154 "--strip-components=1"))))))
1157 (zero? (system* "tar" "xvf" source
1158 "-C" target "--strip-components=1"))
1160 (unpack "openjdk-src" "openjdk.src")
1161 (with-directory-excursion "openjdk.src"
1163 (filter (cut string-suffix? "-drop" <>)
1168 (add-after 'unpack 'fix-x11-extension-include-path
1169 (lambda* (#:key inputs #:allow-other-keys)
1170 (substitute* "openjdk.src/jdk/make/sun/awt/mawt.gmk"
1171 (((string-append "\\$\\(firstword \\$\\(wildcard "
1172 "\\$\\(OPENWIN_HOME\\)"
1173 "/include/X11/extensions\\).*$"))
1174 (string-append (assoc-ref inputs "libxrender")
1175 "/include/X11/extensions"
1176 " -I" (assoc-ref inputs "libxtst")
1177 "/include/X11/extensions"
1178 " -I" (assoc-ref inputs "libxinerama")
1179 "/include/X11/extensions"))
1180 (("\\$\\(wildcard /usr/include/X11/extensions\\)\\)") ""))
1182 (add-after 'unpack 'patch-paths
1184 ;; buildtree.make generates shell scripts, so we need to replace
1185 ;; the generated shebang
1186 (substitute* '("openjdk.src/hotspot/make/linux/makefiles/buildtree.make")
1187 (("/bin/sh") (which "bash")))
1189 (let ((corebin (string-append
1190 (assoc-ref %build-inputs "coreutils") "/bin/"))
1191 (binbin (string-append
1192 (assoc-ref %build-inputs "binutils") "/bin/"))
1193 (grepbin (string-append
1194 (assoc-ref %build-inputs "grep") "/bin/")))
1195 (substitute* '("openjdk.src/jdk/make/common/shared/Defs-linux.gmk"
1196 "openjdk.src/corba/make/common/shared/Defs-linux.gmk")
1197 (("UNIXCOMMAND_PATH = /bin/")
1198 (string-append "UNIXCOMMAND_PATH = " corebin))
1199 (("USRBIN_PATH = /usr/bin/")
1200 (string-append "USRBIN_PATH = " corebin))
1201 (("DEVTOOLS_PATH *= */usr/bin/")
1202 (string-append "DEVTOOLS_PATH = " corebin))
1203 (("COMPILER_PATH *= */usr/bin/")
1204 (string-append "COMPILER_PATH = "
1205 (assoc-ref %build-inputs "gcc") "/bin/"))
1206 (("DEF_OBJCOPY *=.*objcopy")
1207 (string-append "DEF_OBJCOPY = " (which "objcopy"))))
1209 ;; fix path to alsa header
1210 (substitute* "openjdk.src/jdk/make/common/shared/Sanity.gmk"
1211 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
1212 (string-append "ALSA_INCLUDE="
1213 (assoc-ref %build-inputs "alsa-lib")
1214 "/include/alsa/version.h")))
1216 ;; fix hard-coded utility paths
1217 (substitute* '("openjdk.src/jdk/make/common/shared/Defs-utils.gmk"
1218 "openjdk.src/corba/make/common/shared/Defs-utils.gmk")
1220 (string-append "ECHO = " (which "echo")))
1222 (string-append "GREP = " (which "grep")))
1223 (("EGREP *=.*egrep")
1224 (string-append "EGREP = " (which "egrep")))
1226 (string-append "CPIO = " (which "cpio")))
1227 (("READELF *=.*readelf")
1228 (string-append "READELF = " (which "readelf")))
1230 (string-append "AR = " (which "ar")))
1232 (string-append "TAR = " (which "tar")))
1234 (string-append "AS = " (which "as")))
1236 (string-append "LD = " (which "ld")))
1237 (("STRIP *=.*strip")
1238 (string-append "STRIP = " (which "strip")))
1240 (string-append "NM = " (which "nm")))
1242 (string-append "SH = " (which "bash")))
1244 (string-append "FIND = " (which "find")))
1246 (string-append "LDD = " (which "ldd")))
1247 (("NAWK *=.*(n|g)awk")
1248 (string-append "NAWK = " (which "gawk")))
1249 (("XARGS *=.*xargs")
1250 (string-append "XARGS = " (which "xargs")))
1251 (("UNZIP *=.*unzip")
1252 (string-append "UNZIP = " (which "unzip")))
1254 (string-append "ZIPEXE = " (which "zip")))
1256 (string-append "SED = " (which "sed"))))
1258 ;; Some of these timestamps cause problems as they are more than
1259 ;; 10 years ago, failing the build process.
1261 "openjdk.src/jdk/src/share/classes/java/util/CurrencyData.properties"
1262 (("AZ=AZM;2005-12-31-20-00-00;AZN") "AZ=AZN")
1263 (("MZ=MZM;2006-06-30-22-00-00;MZN") "MZ=MZN")
1264 (("RO=ROL;2005-06-30-21-00-00;RON") "RO=RON")
1265 (("TR=TRL;2004-12-31-22-00-00;TRY") "TR=TRY")))
1267 (add-before 'configure 'set-additional-paths
1268 (lambda* (#:key inputs #:allow-other-keys)
1269 (substitute* "openjdk.src/jdk/make/common/shared/Sanity.gmk"
1270 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
1271 (string-append "ALSA_INCLUDE="
1272 (assoc-ref inputs "alsa-lib")
1273 "/include/alsa/version.h")))
1276 (string-append (assoc-ref inputs "libxcomposite")
1277 "/include/X11/extensions" ":"
1278 (assoc-ref inputs "libxrender")
1279 "/include/X11/extensions" ":"
1280 (assoc-ref inputs "libxtst")
1281 "/include/X11/extensions" ":"
1282 (assoc-ref inputs "libxinerama")
1283 "/include/X11/extensions" ":"
1284 (or (getenv "CPATH") "")))
1285 (setenv "ALT_OBJCOPY" (which "objcopy"))
1286 (setenv "ALT_CUPS_HEADERS_PATH"
1287 (string-append (assoc-ref inputs "cups")
1289 (setenv "ALT_FREETYPE_HEADERS_PATH"
1290 (string-append (assoc-ref inputs "freetype")
1292 (setenv "ALT_FREETYPE_LIB_PATH"
1293 (string-append (assoc-ref inputs "freetype")
1296 (add-before 'check 'fix-test-framework
1298 ;; Fix PATH in test environment
1299 (substitute* "test/jtreg/com/sun/javatest/regtest/Main.java"
1300 (("PATH=/bin:/usr/bin")
1301 (string-append "PATH=" (getenv "PATH"))))
1302 (substitute* "test/jtreg/com/sun/javatest/util/SysEnv.java"
1303 (("/usr/bin/env") (which "env")))
1304 (substitute* "openjdk.src/hotspot/test/test_env.sh"
1305 (("/bin/rm") (which "rm"))
1306 (("/bin/cp") (which "cp"))
1307 (("/bin/mv") (which "mv")))
1309 (add-before 'check 'fix-hotspot-tests
1311 (with-directory-excursion "openjdk.src/hotspot/test/"
1312 (substitute* "jprt.config"
1313 (("PATH=\"\\$\\{path4sdk\\}\"")
1314 (string-append "PATH=" (getenv "PATH")))
1315 (("make=/usr/bin/make")
1316 (string-append "make=" (which "make"))))
1317 (substitute* '("runtime/6626217/Test6626217.sh"
1318 "runtime/7110720/Test7110720.sh")
1319 (("/bin/rm") (which "rm"))
1320 (("/bin/cp") (which "cp"))
1321 (("/bin/mv") (which "mv"))))
1323 (add-before 'check 'fix-jdk-tests
1325 (with-directory-excursion "openjdk.src/jdk/test/"
1326 (substitute* "com/sun/jdi/JdbReadTwiceTest.sh"
1327 (("/bin/pwd") (which "pwd")))
1328 (substitute* "com/sun/jdi/ShellScaffold.sh"
1329 (("/bin/kill") (which "kill")))
1330 (substitute* "start-Xvfb.sh"
1331 ;;(("/usr/bin/X11/Xvfb") (which "Xvfb"))
1332 (("/usr/bin/nohup") (which "nohup")))
1333 (substitute* "javax/security/auth/Subject/doAs/Test.sh"
1334 (("/bin/rm") (which "rm")))
1335 (substitute* "tools/launcher/MultipleJRE.sh"
1336 (("echo \"#!/bin/sh\"")
1337 (string-append "echo \"#!" (which "rm") "\""))
1338 (("/usr/bin/zip") (which "zip")))
1339 (substitute* "com/sun/jdi/OnThrowTest.java"
1340 (("#!/bin/sh") (string-append "#!" (which "sh"))))
1341 (substitute* "java/lang/management/OperatingSystemMXBean/GetSystemLoadAverage.java"
1342 (("/usr/bin/uptime") (which "uptime")))
1343 (substitute* "java/lang/ProcessBuilder/Basic.java"
1344 (("/usr/bin/env") (which "env"))
1345 (("/bin/false") (which "false"))
1346 (("/bin/true") (which "true"))
1347 (("/bin/cp") (which "cp"))
1348 (("/bin/sh") (which "sh")))
1349 (substitute* "java/lang/ProcessBuilder/FeelingLucky.java"
1350 (("/bin/sh") (which "sh")))
1351 (substitute* "java/lang/ProcessBuilder/Zombies.java"
1352 (("/usr/bin/perl") (which "perl"))
1353 (("/bin/ps") (which "ps"))
1354 (("/bin/true") (which "true")))
1355 (substitute* "java/lang/Runtime/exec/ConcurrentRead.java"
1356 (("/usr/bin/tee") (which "tee")))
1357 (substitute* "java/lang/Runtime/exec/ExecWithDir.java"
1358 (("/bin/true") (which "true")))
1359 (substitute* "java/lang/Runtime/exec/ExecWithInput.java"
1360 (("/bin/cat") (which "cat")))
1361 (substitute* "java/lang/Runtime/exec/ExitValue.java"
1362 (("/bin/sh") (which "sh"))
1363 (("/bin/true") (which "true"))
1364 (("/bin/kill") (which "kill")))
1365 (substitute* "java/lang/Runtime/exec/LotsOfDestroys.java"
1366 (("/usr/bin/echo") (which "echo")))
1367 (substitute* "java/lang/Runtime/exec/LotsOfOutput.java"
1368 (("/usr/bin/cat") (which "cat")))
1369 (substitute* "java/lang/Runtime/exec/SleepyCat.java"
1370 (("/bin/cat") (which "cat"))
1371 (("/bin/sleep") (which "sleep"))
1372 (("/bin/sh") (which "sh")))
1373 (substitute* "java/lang/Runtime/exec/StreamsSurviveDestroy.java"
1374 (("/bin/cat") (which "cat")))
1375 (substitute* "java/rmi/activation/CommandEnvironment/SetChildEnv.java"
1376 (("/bin/chmod") (which "chmod")))
1377 (substitute* "java/util/zip/ZipFile/Assortment.java"
1378 (("/bin/sh") (which "sh"))))
1382 ;; The "make check-*" targets always return zero, so we need to
1383 ;; check for errors in the associated log files to determine
1384 ;; whether any tests have failed.
1385 (use-modules (ice-9 rdelim))
1386 (let* ((error-pattern (make-regexp "^(Error|FAILED):.*"))
1387 (checker (lambda (port)
1389 (let ((line (read-line port)))
1391 ((eof-object? line) #t)
1392 ((regexp-exec error-pattern line) #f)
1394 (run-test (lambda (test)
1395 (system* "make" test)
1396 (call-with-input-file
1397 (string-append "test/" test ".log")
1400 (and (run-test "check-hotspot")
1401 (run-test "check-langtools")
1402 (run-test "check-jdk"))))))
1404 (lambda* (#:key outputs #:allow-other-keys)
1405 (let ((doc (string-append (assoc-ref outputs "doc")
1406 "/share/doc/icedtea"))
1407 (jre (assoc-ref outputs "out"))
1408 (jdk (assoc-ref outputs "jdk")))
1409 (copy-recursively "openjdk.build/docs" doc)
1410 (copy-recursively "openjdk.build/j2re-image" jre)
1411 (copy-recursively "openjdk.build/j2sdk-image" jdk))
1413 ;; Some of the libraries in the lib/amd64 folder link to libjvm.so.
1414 ;; But that shared object is located in the server/ folder, so it
1415 ;; cannot be found. This phase creates a symbolic link in the
1416 ;; lib/amd64 folder so that the other libraries can find it.
1419 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
1421 ;; FIXME: Find the bug in the build system, so that this symlink is
1423 (add-after 'install 'install-libjvm
1424 (lambda* (#:key inputs outputs #:allow-other-keys)
1425 (let* ((lib-path (string-append (assoc-ref outputs "out")
1427 (symlink (string-append lib-path "/server/libjvm.so")
1428 (string-append lib-path "/libjvm.so")))
1430 ;; By default IcedTea only generates an empty keystore. In order to
1431 ;; be able to use certificates in Java programs we need to generate a
1432 ;; keystore from a set of certificates. For convenience we use the
1433 ;; certificates from the nss-certs package.
1434 (add-after 'install 'install-keystore
1435 (lambda* (#:key inputs outputs #:allow-other-keys)
1436 (let* ((keystore "cacerts")
1437 (certs-dir (string-append (assoc-ref inputs "nss-certs")
1439 (keytool (string-append (assoc-ref outputs "jdk")
1441 (define (extract-cert file target)
1442 (call-with-input-file file
1444 (call-with-output-file target
1446 (let loop ((line (read-line in 'concat))
1449 ((eof-object? line) #t)
1450 ((string-prefix? "-----BEGIN" line)
1452 (loop (read-line in 'concat) #t))
1453 ((string-prefix? "-----END" line)
1457 (when copying? (display line out))
1458 (loop (read-line in 'concat) copying?)))))))))
1459 (define (import-cert cert)
1460 (format #t "Importing certificate ~a\n" (basename cert))
1461 (let ((temp "tmpcert"))
1462 (extract-cert cert temp)
1463 (let ((port (open-pipe* OPEN_WRITE keytool
1465 "-alias" (basename cert)
1466 "-keystore" keystore
1467 "-storepass" "changeit"
1469 (display "yes\n" port)
1470 (when (not (zero? (status:exit-val (close-pipe port))))
1471 (format #t "failed to import ~a\n" cert)))
1472 (delete-file temp)))
1474 ;; This is necessary because the certificate directory contains
1475 ;; files with non-ASCII characters in their names.
1476 (setlocale LC_ALL "en_US.utf8")
1477 (setenv "LC_ALL" "en_US.utf8")
1479 (for-each import-cert (find-files certs-dir "\\.pem$"))
1480 (mkdir-p (string-append (assoc-ref outputs "out")
1482 (mkdir-p (string-append (assoc-ref outputs "jdk")
1483 "/jre/lib/security"))
1485 ;; The cacerts files we are going to overwrite are chmod'ed as
1486 ;; read-only (444) in icedtea-8 (which derives from this
1487 ;; package). We have to change this so we can overwrite them.
1488 (chmod (string-append (assoc-ref outputs "out")
1489 "/lib/security/" keystore) #o644)
1490 (chmod (string-append (assoc-ref outputs "jdk")
1491 "/jre/lib/security/" keystore) #o644)
1493 (install-file keystore
1494 (string-append (assoc-ref outputs "out")
1496 (install-file keystore
1497 (string-append (assoc-ref outputs "jdk")
1498 "/jre/lib/security"))
1503 "15qf3nfidgnigh2zny6djfp8bhfwjnwk9i06mxs2jbq6na953ql2"))
1506 "1phvn8fyl5mw2n2sn97f17nm442k75xsz2023bfw4h66ywzkqhqy"))
1509 "0j4ms6lmnfa2cwfh9yfqdfg1bnn3fc40ay4x6k8zqa8yvspik5w5"))
1512 "09sddj73k7n29s39hvdk14r130mvlknbxkpd2w58f34sq5sgpdrg"))
1515 "0q896zz8wyswmksy225q1k27nz3v3l27052dcvvpv20ryykz8yp7"))
1518 "0niicyfccim4a9is4akh87jd7wbl8jrazdaab957mcv9l1x3bnqc"))
1521 "1jw42qhbm3wfavk39304m53lmqipcllrvjqiab2f42mjs10i8gfx"))
1522 ("ant" ,ant-bootstrap)
1524 ("coreutils" ,coreutils)
1525 ("diffutils" ,diffutils) ;for tests
1528 ("libtool" ,libtool)
1529 ("pkg-config" ,pkg-config)
1535 ("fastjar" ,fastjar)
1536 ("libxslt" ,libxslt) ;for xsltproc
1537 ("nss-certs" ,nss-certs)
1539 ("procps" ,procps) ;for "free", even though I'm not sure we should use it
1540 ("jdk" ,icedtea-6 "jdk")))
1542 `(("alsa-lib" ,alsa-lib)
1545 ("libxcomposite" ,libxcomposite)
1547 ("libxtst" ,libxtst)
1549 ("libxinerama" ,libxinerama)
1550 ("libxrender" ,libxrender)
1551 ("libjpeg" ,libjpeg)
1553 ("mit-krb5" ,mit-krb5)
1556 ("fontconfig" ,fontconfig)
1557 ("freetype" ,freetype)
1561 (home-page "http://icedtea.classpath.org")
1562 (synopsis "Java development kit")
1564 "This package provides the Java development kit OpenJDK built with the
1565 IcedTea build harness.")
1566 ;; IcedTea is released under the GPL2 + Classpath exception, which is the
1567 ;; same license as both GNU Classpath and OpenJDK.
1568 (license license:gpl2+))))
1570 (define-public icedtea-8
1571 (let* ((version "3.6.0")
1572 (drop (lambda (name hash)
1576 "http://icedtea.classpath.org/download/drops"
1577 "/icedtea8/" version "/" name ".tar.xz"))
1578 (sha256 (base32 hash))))))
1579 (package (inherit icedtea-7)
1584 "http://icedtea.wildebeest.org/download/source/icedtea-"
1588 "0zj192zrrxqh6j1ywc3399gk2ycay9w8pvzcvvr2kvdkb37ak86h"))
1589 (modules '((guix build utils)))
1592 (substitute* "acinclude.m4"
1593 ;; Do not embed build time
1594 (("(DIST_ID=\"Custom build).*$" _ prefix)
1595 (string-append prefix "\"\n"))
1596 ;; Do not leak information about the build host
1597 (("DIST_NAME=\"\\$build_os\"")
1598 "DIST_NAME=\"guix\""))
1601 (substitute-keyword-arguments (package-arguments icedtea-7)
1602 ((#:configure-flags flags)
1603 `(let ((jdk (assoc-ref %build-inputs "jdk")))
1604 `(;;"--disable-bootstrap"
1605 "--enable-bootstrap"
1607 "--disable-downloading"
1608 "--disable-system-pcsc"
1609 "--disable-system-sctp"
1610 "--disable-tests" ;they are run in the check phase instead
1611 "--with-openjdk-src-dir=./openjdk.src"
1612 ,(string-append "--with-jdk-home=" jdk))))
1614 `(modify-phases ,phases
1615 (delete 'fix-x11-extension-include-path)
1616 (delete 'patch-paths)
1617 (delete 'set-additional-paths)
1618 (delete 'patch-patches)
1619 (add-after 'unpack 'patch-jni-libs
1620 ;; Hardcode dynamically loaded libraries.
1622 (let* ((library-path (search-path-as-string->list
1623 (getenv "LIBRARY_PATH")))
1624 (find-library (lambda (name)
1627 (string-append "lib" name ".so")))))
1630 (catch 'decoding-error
1633 (("VERSIONED_JNI_LIB_NAME\\(\"(.*)\", \"(.*)\"\\)"
1635 (format #f "\"~a\"" (find-library name)))
1636 (("JNI_LIB_NAME\\(\"(.*)\"\\)" _ name)
1637 (format #f "\"~a\"" (find-library name)))))
1639 ;; Those are safe to skip.
1640 (format (current-error-port)
1641 "warning: failed to substitute: ~a~%"
1643 (find-files "openjdk.src/jdk/src/solaris/native"
1647 (lambda* (#:key outputs #:allow-other-keys)
1648 (let ((doc (string-append (assoc-ref outputs "doc")
1649 "/share/doc/icedtea"))
1650 (jre (assoc-ref outputs "out"))
1651 (jdk (assoc-ref outputs "jdk")))
1652 (copy-recursively "openjdk.build/docs" doc)
1653 (copy-recursively "openjdk.build/images/j2re-image" jre)
1654 (copy-recursively "openjdk.build/images/j2sdk-image" jdk)
1655 ;; Install the nss.cfg file to JRE to enable SSL/TLS
1657 (copy-file (string-append jdk "/jre/lib/security/nss.cfg")
1658 (string-append jre "/lib/security/nss.cfg"))
1661 `(("jdk" ,icedtea-7 "jdk")
1664 "0mqxh81kq05z4wydkik0yrr81ibf84xmwsdcw9n2gfrzs4f5jxnb"))
1667 "0b207g2n6kn510zf5vwh58bsxgqrmkvrna4p20r74v9cwcwx83n2"))
1670 "0qinc1q4w01nkr9klhfyd8caxvyrrfxjrz32nd7kgyja2bj8x7dd"))
1673 "07azrp3g86vk2laybmr5xfn0yrljkxs0rlm1q48385br225bgdxi"))
1676 "018fd2hq57zp3pq06wlxy5pabqcyk36xi8hk0d6xk3a90wsjvyik"))
1679 "0vs488kq5j2cc6kplc78jbhfxwq4fn06l34xrbq4d6y17777arg8"))
1682 "04f6d1wvck5jrpvrcw5gsbzxnihcry9zrf1v85czdm959q21zv9c"))
1685 "1mfgpzyr6zzy9klf8nn3z6d41fydb9ghpfpqzjq3cl95axfbdl1g"))
1688 "1a26cmzbs50gkh4rmmmxls7zljx62vfp1wq02gsfd5jqs4xvlibj"))
1691 "11hmn9mwmvryfddcanzx3qffjm8bbiv18nwv3iy9cswrvxjy010f"))
1692 ,@(fold alist-delete (package-native-inputs icedtea-7)
1693 '("jdk" "openjdk-src" "corba-drop" "jaxp-drop" "jaxws-drop"
1694 "jdk-drop" "langtools-drop" "hotspot-drop")))))))
1696 (define-public icedtea icedtea-7)
1699 (define-public ant/java8
1700 (package (inherit ant-bootstrap)
1705 (uri (string-append "mirror://apache/ant/source/apache-ant-"
1706 version "-src.tar.gz"))
1709 "10p3dh77lkzzzcy32dk9azljixzadp46fggjfbvgkl8mmb8cxxv8"))
1710 (modules '((guix build utils)))
1713 (for-each delete-file
1714 (find-files "lib/optional" "\\.jar$"))
1717 (substitute-keyword-arguments (package-arguments ant-bootstrap)
1719 `(modify-phases ,phases
1720 (add-after 'unpack 'remove-scripts
1721 ;; Remove bat / cmd scripts for DOS as well as the antRun and runant
1724 (for-each delete-file
1725 (find-files "src/script"
1726 "(.*\\.(bat|cmd)|runant.*|antRun.*)"))
1729 (lambda* (#:key inputs outputs #:allow-other-keys)
1730 (setenv "JAVA_HOME" (assoc-ref inputs "jdk"))
1732 ;; Disable tests to avoid dependency on hamcrest-core, which needs
1733 ;; Ant to build. This is necessary in addition to disabling the
1734 ;; "check" phase, because the dependency on "test-jar" would always
1735 ;; result in the tests to be run.
1736 (substitute* "build.xml"
1737 (("depends=\"jars,test-jar\"") "depends=\"jars\""))
1738 (zero? (system* "bash" "bootstrap.sh"
1739 (string-append "-Ddist.dir="
1740 (assoc-ref outputs "out"))))))))))
1742 `(("jdk" ,icedtea-8 "jdk")))))
1744 ;; The 1.9.x series is the last that can be built with GCJ. The 1.10.x series
1747 (package (inherit ant/java8)
1751 (uri (string-append "mirror://apache/ant/source/apache-ant-"
1752 version "-src.tar.gz"))
1755 "1k28mka0m3isy9yr8gz84kz1f3f879rwaxrd44vdn9xbfwvwk86n"))))
1757 `(("jdk" ,icedtea-7 "jdk")))))
1759 (define-public ant-apache-bcel
1762 (name "ant-apache-bcel")
1764 (substitute-keyword-arguments (package-arguments ant/java8)
1766 `(modify-phases ,phases
1767 (add-after 'unpack 'link-bcel
1768 (lambda* (#:key inputs #:allow-other-keys)
1769 (for-each (lambda (file)
1771 (string-append "lib/optional/"
1773 (find-files (assoc-ref inputs "java-commons-bcel")
1776 (add-after 'build 'install
1777 (lambda* (#:key outputs #:allow-other-keys)
1778 (let* ((out (assoc-ref outputs "out"))
1779 (share (string-append out "/share/java"))
1780 (bin (string-append out "/bin"))
1781 (lib (string-append out "/lib")))
1783 (install-file (string-append lib "/ant-apache-bcel.jar") share)
1784 (delete-file-recursively bin)
1785 (delete-file-recursively lib)
1788 `(("java-commons-bcel" ,java-commons-bcel)
1789 ,@(package-inputs ant/java8)))))
1791 (define-public ant-junit
1796 (substitute-keyword-arguments (package-arguments ant/java8)
1798 `(modify-phases ,phases
1799 (add-after 'unpack 'link-junit
1800 (lambda* (#:key inputs #:allow-other-keys)
1801 (for-each (lambda (file)
1803 (string-append "lib/optional/"
1805 (find-files (assoc-ref inputs "java-junit")
1808 (add-after 'build 'install
1809 (lambda* (#:key outputs #:allow-other-keys)
1810 (let* ((out (assoc-ref outputs "out"))
1811 (share (string-append out "/share/java"))
1812 (bin (string-append out "/bin"))
1813 (lib (string-append out "/lib")))
1815 (install-file (string-append lib "/ant-junit.jar") share)
1816 (delete-file-recursively bin)
1817 (delete-file-recursively lib)
1820 `(("java-junit" ,java-junit)
1821 ,@(package-inputs ant/java8)))))
1823 (define-public clojure
1824 (let* ((remove-archives '(begin
1825 (for-each delete-file
1826 (find-files "." ".*\\.(jar|zip)"))
1828 (submodule (lambda (prefix version hash)
1831 (uri (string-append "https://github.com/clojure/"
1832 prefix version ".tar.gz"))
1833 (sha256 (base32 hash))
1834 (modules '((guix build utils)))
1835 (snippet remove-archives)))))
1843 (string-append "https://github.com/clojure/clojure/archive/clojure-"
1846 (base32 "0xjbzcw45z32vsn9pifp7ndysjzqswp5ig0jkjpivigh2ckkdzha"))
1847 (modules '((guix build utils)))
1848 (snippet remove-archives)))
1849 (build-system ant-build-system)
1851 `(#:modules ((guix build ant-build-system)
1857 #:test-target "test"
1859 (modify-phases %standard-phases
1860 (add-after 'unpack 'unpack-submodule-sources
1861 (lambda* (#:key inputs #:allow-other-keys)
1865 (with-directory-excursion name
1866 (or (zero? (system* "tar"
1867 ;; Use xz for repacked tarball.
1871 "--file" (assoc-ref inputs name)
1872 "--strip-components=1"))
1873 (error "failed to unpack tarball" name)))
1874 (copy-recursively (string-append name "/src/main/clojure/")
1876 '("core-specs-alpha-src"
1877 "data-generators-src"
1880 "test-generative-src"
1881 "tools-namespace-src"))
1883 ;; The javadoc target is not built by default.
1884 (add-after 'build 'build-doc
1886 (zero? (system* "ant" "javadoc"))))
1887 ;; Needed since no install target is provided.
1889 (lambda* (#:key outputs #:allow-other-keys)
1890 (let ((java-dir (string-append (assoc-ref outputs "out")
1892 ;; Install versioned to avoid collisions.
1893 (install-file (string-append "clojure-" ,version ".jar")
1896 ;; Needed since no install-doc target is provided.
1897 (add-after 'install 'install-doc
1898 (lambda* (#:key outputs #:allow-other-keys)
1899 (let ((doc-dir (string-append (assoc-ref outputs "out")
1900 "/share/doc/clojure-"
1902 (copy-recursively "doc/clojure" doc-dir)
1903 (copy-recursively "target/javadoc/"
1904 (string-append doc-dir "javadoc/"))
1905 (for-each (cut install-file <> doc-dir)
1906 (filter (cut string-match
1907 ".*\\.(html|markdown|md|txt)"
1911 ;; The native-inputs below are needed to run the tests.
1913 `(("core-specs-alpha-src"
1914 ,(submodule "core.specs.alpha/archive/core.specs.alpha-"
1916 "0v2a0svf1ar2y42ajxwsjr7zmm5j7pp2zwrd2jh3k7xzd1p9x1fv"))
1917 ("data-generators-src"
1918 ,(submodule "data.generators/archive/data.generators-"
1920 "0kki093jp4ckwxzfnw8ylflrfqs8b1i1wi9iapmwcsy328dmgzp1"))
1922 ,(submodule "spec.alpha/archive/spec.alpha-"
1924 "00alf0347licdn773w2jarpllyrbl52qz4d8mw61anjksacxylzz"))
1926 ,(submodule "test.check/archive/test.check-"
1928 "0p0mnyhr442bzkz0s4k5ra3i6l5lc7kp6ajaqkkyh4c2k5yck1md"))
1929 ("test-generative-src"
1930 ,(submodule "test.generative/archive/test.generative-"
1932 "1pjafy1i7yblc7ixmcpfq1lfbyf3jaljvkgrajn70sws9xs7a9f8"))
1933 ("tools-namespace-src"
1934 ,(submodule "tools.namespace/archive/tools.namespace-"
1936 "10baak8v0hnwz2hr33bavshm7y49mmn9zsyyms1dwjz45p5ymhy0"))))
1937 (home-page "https://clojure.org/")
1938 (synopsis "Lisp dialect running on the JVM")
1939 (description "Clojure is a dynamic, general-purpose programming language,
1940 combining the approachability and interactive development of a scripting
1941 language with an efficient and robust infrastructure for multithreaded
1942 programming. Clojure is a compiled language, yet remains completely dynamic
1943 – every feature supported by Clojure is supported at runtime. Clojure
1944 provides easy access to the Java frameworks, with optional type hints and type
1945 inference, to ensure that calls to Java can avoid reflection.
1947 Clojure is a dialect of Lisp, and shares with Lisp the code-as-data philosophy
1948 and a powerful macro system. Clojure is predominantly a functional programming
1949 language, and features a rich set of immutable, persistent data structures.
1950 When mutable state is needed, Clojure offers a software transactional memory
1951 system and reactive Agent system that ensure clean, correct, multithreaded
1953 ;; Clojure is licensed under EPL1.0
1954 ;; ASM bytecode manipulation library is licensed under BSD-3
1955 ;; Guava Murmur3 hash implementation is licensed under APL2.0
1956 ;; src/clj/repl.clj is licensed under CPL1.0
1958 ;; See readme.html or readme.txt for details.
1959 (license (list license:epl1.0
1964 (define-public javacc
1970 (uri (string-append "https://github.com/javacc/javacc/"
1971 "archive/" version ".tar.gz"))
1972 (file-name (string-append "javacc-" version ".tar.gz"))
1975 "111xc9mnmc5a6qz6x3xbhqc07y1lg2b996ggzw0hrblg42zya9xf"))))
1976 (build-system ant-build-system)
1978 `(#:test-target "test"
1980 (modify-phases %standard-phases
1981 (add-after 'unpack 'delete-bundled-libs
1983 (delete-file-recursively "lib") #t))
1984 (replace 'install (install-jars "target")))))
1985 (home-page "https://javacc.org/")
1986 (synopsis "Java parser generator")
1987 (description "Java Compiler Compiler (JavaCC) is the most popular parser
1988 generator for use with Java applications. A parser generator is a tool that
1989 reads a grammar specification and converts it to a Java program that can
1990 recognize matches to the grammar. In addition to the parser generator itself,
1991 JavaCC provides other standard capabilities related to parser generation such
1992 as tree building (via a tool called JJTree included with JavaCC), actions,
1994 (license license:bsd-3)))
1996 (define-public javacc-4
1997 (package (inherit javacc)
2002 (url "https://github.com/javacc/javacc.git")
2003 (commit "release_41")))
2004 (file-name (string-append "javacc-" version "-checkout"))
2007 "07ysav7j8r1c6h8qxrgqk6lwdp74ly0ad1935lragxml0qqc3ka0"))))
2009 ;; /tmp/guix-build-javacc-4.1.drv-0/source/test/javacodeLA/build.xml:60:
2014 (modify-phases %standard-phases
2015 (add-after 'unpack 'delete-bundled-libs
2017 (delete-file-recursively "lib") #t))
2018 (replace 'install (install-jars "bin/lib")))))))
2020 (define-public java-classpathx-servletapi
2022 (name "java-classpathx-servletapi")
2026 (uri (string-append "mirror://gnu/classpathx/servletapi/"
2027 "servletapi-" version ".tar.gz"))
2030 "07d8h051siga2f33fra72hk12sbq1bxa4jifjg0qj0vfazjjff0x"))))
2031 (build-system ant-build-system)
2033 `(#:tests? #f ; there is no test target
2034 #:build-target "compile"
2036 (list "-Dbuild.compiler=javac1.8"
2037 (string-append "-Ddist=" (assoc-ref %outputs "out")))
2039 (modify-phases %standard-phases
2041 (lambda* (#:key make-flags #:allow-other-keys)
2042 (zero? (apply system* `("ant" "dist" ,@make-flags))))))))
2043 (home-page "https://www.gnu.org/software/classpathx/")
2044 (synopsis "Java servlet API implementation")
2045 (description "This is the GNU servlet API distribution, part of the
2046 ClasspathX project. It provides implementations of version 3.0 of the servlet
2047 API and version 2.1 of the Java ServerPages API.")
2048 (license license:gpl3+)))
2050 (define-public java-swt
2055 ;; The types of many variables and procedures differ in the sources
2056 ;; dependent on whether the target architecture is a 32-bit system or a
2057 ;; 64-bit system. Instead of patching the sources on demand in a build
2058 ;; phase we download either the 32-bit archive (which mostly uses "int"
2059 ;; types) or the 64-bit archive (which mostly uses "long" types).
2060 (let ((hash32 "09q0cbh90d90q3a7dx9430kc4m6bijrkr4lajrmzzvi0jjdpq4v9")
2061 (hash64 "17k5hs75a87ssmc5xhwdfdm2gn4zba0r837l2455za01krnkaa2q")
2064 (let-values (((hash file)
2065 (match (or (%current-target-system) (%current-system))
2066 ("x86_64-linux" (values hash64 file64))
2067 (_ (values hash32 file32)))))
2071 "http://download.eclipse.org/eclipse/downloads/drops4/"
2072 "R-" version "-201710090410/swt-" version
2073 "-gtk-linux-" file ".zip"))
2074 (sha256 (base32 hash))))))
2075 (build-system ant-build-system)
2077 `(#:jar-name "swt.jar"
2079 #:tests? #f ; no "check" target
2081 (modify-phases %standard-phases
2083 (lambda* (#:key source #:allow-other-keys)
2085 (zero? (system* "unzip" source "-d" "swt"))
2088 (zero? (system* "unzip" "src.zip" "-d" "src")))))
2089 ;; The classpath contains invalid icecat jars. Since we don't need
2090 ;; anything other than the JDK on the classpath, we can simply unset
2092 (add-after 'configure 'unset-classpath
2093 (lambda _ (unsetenv "CLASSPATH") #t))
2094 (add-before 'build 'build-native
2095 (lambda* (#:key inputs outputs #:allow-other-keys)
2096 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
2097 ;; Build shared libraries. Users of SWT have to set the system
2098 ;; property swt.library.path to the "lib" directory of this
2101 (setenv "OUTPUT_DIR" lib)
2102 (with-directory-excursion "src"
2103 (zero? (system* "bash" "build.sh"))))))
2104 (add-after 'install 'install-native
2105 (lambda* (#:key outputs #:allow-other-keys)
2106 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
2107 (for-each (lambda (file)
2108 (install-file file lib))
2109 (find-files "." "\\.so$"))
2113 ("libxtst" ,libxtst)
2118 `(("pkg-config" ,pkg-config)
2120 (home-page "https://www.eclipse.org/swt/")
2121 (synopsis "Widget toolkit for Java")
2123 "SWT is a widget toolkit for Java designed to provide efficient, portable
2124 access to the user-interface facilities of the operating systems on which it
2126 ;; SWT code is licensed under EPL1.0
2127 ;; Gnome and Gtk+ bindings contain code licensed under LGPLv2.1
2128 ;; Cairo bindings contain code under MPL1.1
2129 ;; XULRunner 1.9 bindings contain code under MPL2.0
2134 license:lgpl2.1+))))
2136 (define-public java-xz
2142 (uri (string-append "http://tukaani.org/xz/xz-java-" version ".zip"))
2145 "1z3p1ri1gvl07inxn0agx44ck8n7wrzfmvkz8nbq3njn8r9wba8x"))))
2146 (build-system ant-build-system)
2148 `(#:tests? #f ; There are no tests to run.
2149 #:jar-name ,(string-append "xz-" version ".jar")
2151 (modify-phases %standard-phases
2152 ;; The unpack phase enters the "maven" directory by accident.
2153 (add-after 'unpack 'chdir
2154 (lambda _ (chdir "..") #t)))))
2156 `(("unzip" ,unzip)))
2157 (home-page "https://tukaani.org/xz/java.html")
2158 (synopsis "Implementation of XZ data compression in pure Java")
2159 (description "This library aims to be a complete implementation of XZ data
2160 compression in pure Java. Single-threaded streamed compression and
2161 decompression and random access decompression have been fully implemented.")
2162 (license license:public-domain)))
2164 ;; java-hamcrest-core uses qdox version 1.12. We package this version instead
2165 ;; of the latest release.
2166 (define-public java-qdox-1.12
2172 (uri (string-append "http://central.maven.org/maven2/"
2173 "com/thoughtworks/qdox/qdox/" version
2174 "/qdox-" version "-sources.jar"))
2177 "0hlfbqq2avf5s26wxkksqmkdyk6zp9ggqn37c468m96mjv0n9xfl"))))
2178 (build-system ant-build-system)
2180 `(;; Tests require junit
2182 #:jar-name "qdox.jar"
2184 (modify-phases %standard-phases
2186 (lambda* (#:key source #:allow-other-keys)
2188 (with-directory-excursion "src"
2189 (zero? (system* "jar" "-xf" source)))))
2190 ;; At this point we don't have junit, so we must remove the API
2192 (add-after 'unpack 'delete-tests
2194 (delete-file-recursively "src/com/thoughtworks/qdox/junit")
2196 (home-page "http://qdox.codehaus.org/")
2197 (synopsis "Parse definitions from Java source files")
2199 "QDox is a high speed, small footprint parser for extracting
2200 class/interface/method definitions from source files complete with JavaDoc
2201 @code{@@tags}. It is designed to be used by active code generators or
2202 documentation tools.")
2203 (license license:asl2.0)))
2205 (define-public java-jarjar
2207 (name "java-jarjar")
2212 "https://storage.googleapis.com/google-code-archive-downloads/v2/"
2213 "code.google.com/jarjar/jarjar-src-" version ".zip"))
2216 "1v8irhni9cndcw1l1wxqgry013s2kpj0qqn57lj2ji28xjq8ndjl"))))
2217 (build-system ant-build-system)
2219 `(;; Tests require junit, which ultimately depends on this package.
2221 #:build-target "jar"
2223 (modify-phases %standard-phases
2225 (lambda* (#:key outputs #:allow-other-keys)
2226 (let ((target (string-append (assoc-ref outputs "out")
2228 (install-file (string-append "dist/jarjar-" ,version ".jar")
2232 `(("unzip" ,unzip)))
2233 (home-page "https://code.google.com/archive/p/jarjar/")
2234 (synopsis "Repackage Java libraries")
2236 "Jar Jar Links is a utility that makes it easy to repackage Java
2237 libraries and embed them into your own distribution. Jar Jar Links includes
2238 an Ant task that extends the built-in @code{jar} task.")
2239 (license license:asl2.0)))
2241 (define-public java-hamcrest-core
2243 (name "java-hamcrest-core")
2247 (uri (string-append "https://github.com/hamcrest/JavaHamcrest/"
2248 "archive/hamcrest-java-" version ".tar.gz"))
2251 "11g0s105fmwzijbv08lx8jlb521yravjmxnpgdx08fvg1kjivhva"))
2252 (modules '((guix build utils)))
2255 ;; Delete bundled thirds-party jar archives.
2256 (delete-file-recursively "lib")
2258 (build-system ant-build-system)
2260 `(#:tests? #f ; Tests require junit
2261 #:modules ((guix build ant-build-system)
2264 #:make-flags (list (string-append "-Dversion=" ,version))
2265 #:test-target "unit-test"
2266 #:build-target "core"
2268 (modify-phases %standard-phases
2269 ;; Disable unit tests, because they require junit, which requires
2270 ;; hamcrest-core. We also give a fixed value to the "Built-Date"
2271 ;; attribute from the manifest for reproducibility.
2272 (add-before 'configure 'patch-build.xml
2274 (substitute* "build.xml"
2275 (("unit-test, ") "")
2276 (("\\$\\{build.timestamp\\}") "guix"))
2278 ;; Java's "getMethods()" returns methods in an unpredictable order.
2279 ;; To make the output of the generated code deterministic we must
2280 ;; sort the array of methods.
2281 (add-after 'unpack 'make-method-order-deterministic
2283 (substitute* "hamcrest-generator/src/main/java/org/hamcrest/generator/ReflectiveFactoryReader.java"
2284 (("import java\\.util\\.Iterator;" line)
2285 (string-append line "\n"
2286 "import java.util.Arrays; import java.util.Comparator;"))
2287 (("allMethods = cls\\.getMethods\\(\\);" line)
2288 (string-append "_" line
2290 private Method[] getSortedMethods() {
2291 Arrays.sort(_allMethods, new Comparator<Method>() {
2293 public int compare(Method a, Method b) {
2294 return a.toString().compareTo(b.toString());
2300 private Method[] allMethods = getSortedMethods();")))))
2301 (add-before 'build 'do-not-use-bundled-qdox
2302 (lambda* (#:key inputs #:allow-other-keys)
2303 (substitute* "build.xml"
2304 (("lib/generator/qdox-1.12.jar")
2305 (string-append (assoc-ref inputs "java-qdox-1.12")
2306 "/share/java/qdox.jar")))
2308 ;; build.xml searches for .jar files in this directoy, which
2309 ;; we remove from the source archive.
2310 (add-before 'build 'create-dummy-directories
2312 (mkdir-p "lib/integration")
2315 (lambda* (#:key outputs #:allow-other-keys)
2316 (let* ((target (string-append (assoc-ref outputs "out")
2318 (version-suffix ,(string-append "-" version ".jar"))
2319 (install-without-version-suffix
2322 (string-append target
2323 (basename jar version-suffix)
2327 install-without-version-suffix
2330 (and (string-suffix? ".jar" name)
2331 (not (string-suffix? "-sources.jar" name)))))))
2334 `(("java-qdox-1.12" ,java-qdox-1.12)
2335 ("java-jarjar" ,java-jarjar)))
2336 (home-page "http://hamcrest.org/")
2337 (synopsis "Library of matchers for building test expressions")
2339 "This package provides a library of matcher objects (also known as
2340 constraints or predicates) allowing @code{match} rules to be defined
2341 declaratively, to be used in other frameworks. Typical scenarios include
2342 testing frameworks, mocking libraries and UI validation rules.")
2343 (license license:bsd-2)))
2345 (define-public java-junit
2351 (uri (string-append "https://github.com/junit-team/junit/"
2352 "archive/r" version ".tar.gz"))
2353 (file-name (string-append name "-" version ".tar.gz"))
2356 "090dn5v1vs0b3acyaqc0gjf6p8lmd2h24wfzsbq7sly6b214anws"))
2357 (modules '((guix build utils)))
2360 ;; Delete bundled jar archives.
2361 (delete-file-recursively "lib")
2363 (build-system ant-build-system)
2365 `(#:tests? #f ; no tests
2366 #:jar-name "junit.jar"))
2368 `(("java-hamcrest-core" ,java-hamcrest-core)))
2369 (home-page "http://junit.org/")
2370 (synopsis "Test framework for Java")
2372 "JUnit is a simple framework to write repeatable tests for Java projects.
2373 JUnit provides assertions for testing expected results, test fixtures for
2374 sharing common test data, and test runners for running tests.")
2375 (license license:epl1.0)))
2377 (define-public java-plexus-utils
2379 (name "java-plexus-utils")
2383 (uri (string-append "https://github.com/codehaus-plexus/"
2384 "plexus-utils/archive/plexus-utils-"
2388 "1mlwpc6fms24slygv5yvi6fi9hcha2fh0v73p5znpi78bg36i2js"))))
2389 (build-system ant-build-system)
2390 ;; FIXME: The default build.xml does not include a target to install
2393 `(#:jar-name "plexus-utils.jar"
2394 #:source-dir "src/main"
2396 (modify-phases %standard-phases
2397 (add-after 'unpack 'fix-reference-to-/bin-and-/usr
2399 (substitute* "src/main/java/org/codehaus/plexus/util/\
2400 cli/shell/BourneShell.java"
2401 (("/bin/sh") (which "sh"))
2402 (("/usr/") (getcwd)))
2404 (add-after 'unpack 'fix-or-disable-broken-tests
2406 (with-directory-excursion "src/test/java/org/codehaus/plexus/util"
2407 (substitute* '("cli/CommandlineTest.java"
2408 "cli/shell/BourneShellTest.java")
2409 (("/bin/sh") (which "sh"))
2410 (("/bin/echo") (which "echo")))
2412 ;; This test depends on MavenProjectStub, but we don't have
2413 ;; a package for Maven.
2414 (delete-file "introspection/ReflectionValueExtractorTest.java")
2416 ;; FIXME: The command line tests fail, maybe because they use
2418 (delete-file "cli/CommandlineTest.java"))
2421 `(("java-junit" ,java-junit)))
2422 (home-page "http://codehaus-plexus.github.io/plexus-utils/")
2423 (synopsis "Common utilities for the Plexus framework")
2424 (description "This package provides various Java utility classes for the
2425 Plexus framework to ease working with strings, files, command lines, XML and
2427 (license license:asl2.0)))
2429 (define-public java-plexus-interpolation
2431 (name "java-plexus-interpolation")
2435 (uri (string-append "https://github.com/codehaus-plexus/"
2436 "plexus-interpolation/archive/"
2437 "plexus-interpolation-" version ".tar.gz"))
2440 "03377yzlx5q440m6sxxgv6a5qb8fl30zzcgxgc0hxk5qgl2z1jjn"))))
2441 (build-system ant-build-system)
2443 `(#:jar-name "plexus-interpolation.jar"
2444 #:source-dir "src/main"))
2446 `(("java-junit" ,java-junit)
2447 ("java-hamcrest-core" ,java-hamcrest-core)))
2448 (home-page "http://codehaus-plexus.github.io/plexus-interpolation/")
2449 (synopsis "Java components for interpolating ${} strings and the like")
2450 (description "Plexus interpolator is a modular, flexible interpolation
2451 framework for the expression language style commonly seen in Maven, Plexus,
2452 and other related projects.
2454 It has its foundation in the @code{org.codehaus.plexus.utils.interpolation}
2455 package within @code{plexus-utils}, but has been separated in order to allow
2456 these two libraries to vary independently of one another.")
2457 (license license:asl2.0)))
2459 (define-public java-plexus-classworlds
2461 (name "java-plexus-classworlds")
2465 (uri (string-append "https://github.com/codehaus-plexus/"
2466 "plexus-classworlds/archive/plexus-classworlds-"
2470 "1qm4p0rl8d82lzhsiwnviw11jnq44s0gflg78zq152xyyr2xmh8g"))))
2471 (build-system ant-build-system)
2473 `(#:jar-name "plexus-classworlds.jar"
2474 #:source-dir "src/main"
2475 #:tests? #f));; FIXME: we need to generate some resources as in pom.xml
2477 `(("java-junit" ,java-junit)))
2478 (home-page "http://codehaus-plexus.github.io/plexus-classworlds/")
2479 (synopsis "Java class loader framework")
2480 (description "Plexus classworlds replaces the native @code{ClassLoader}
2481 mechanism of Java. It is especially useful for dynamic loading of application
2483 (license license:asl2.0)))
2485 (define-public java-plexus-container-default-bootstrap
2487 (name "java-plexus-container-default-bootstrap")
2491 (uri (string-append "https://github.com/codehaus-plexus/plexus-containers"
2492 "/archive/plexus-containers-" version ".tar.gz"))
2495 "0xw5g30qf4a83608rw9v2hv8pfsz7d69dkdhk6r0wia4q78hh1pc"))))
2496 (build-system ant-build-system)
2498 `(#:jar-name "container-default.jar"
2499 #:source-dir "plexus-container-default/src/main/java"
2500 #:test-dir "plexus-container-default/src/test"
2502 #:tests? #f; requires plexus-archiver, which depends on this package
2504 (modify-phases %standard-phases
2505 (add-before 'build 'copy-resources
2508 "plexus-container-default/src/main/resources/"
2512 `(("worldclass" ,java-plexus-classworlds)
2513 ("xbean" ,java-geronimo-xbean-reflect)
2514 ("utils" ,java-plexus-utils)
2515 ("junit" ,java-junit)
2516 ("guava" ,java-guava)))
2517 (home-page "https://github.com/codehaus-plexus/plexus-containers")
2518 (synopsis "Inversion-of-control container")
2519 (description "Plexus-default-container is Plexus' inversion-of-control
2520 (@dfn{IoC}) container. It is composed of its public API and its default
2522 (license license:asl2.0)))
2524 (define-public java-plexus-io
2526 (name "java-plexus-io")
2530 (uri (string-append "https://github.com/codehaus-plexus/plexus-io"
2531 "/archive/plexus-io-" version ".tar.gz"))
2534 "0f2j41kihaymxkpbm55smpxjja235vad8cgz94frfy3ppcp021dw"))))
2535 (build-system ant-build-system)
2537 `(#:jar-name "plexus-io.jar"
2538 #:source-dir "src/main/java"
2539 #:test-dir "src/test"
2542 (modify-phases %standard-phases
2543 (add-before 'build 'copy-resources
2545 (mkdir-p "build/classes/META-INF/plexus")
2546 (copy-file "src/main/resources/META-INF/plexus/components.xml"
2547 "build/classes/META-INF/plexus/components.xml")
2550 `(("utils" ,java-plexus-utils)
2551 ("commons-io" ,java-commons-io)
2552 ("java-jsr305" ,java-jsr305)))
2554 `(("junit" ,java-junit)
2555 ("hamcrest" ,java-hamcrest-core)
2556 ("guava" ,java-guava)
2557 ("classworlds" ,java-plexus-classworlds)
2558 ("xbean" ,java-geronimo-xbean-reflect)
2559 ("container-default" ,java-plexus-container-default-bootstrap)))
2560 (home-page "https://github.com/codehaus-plexus/plexus-io")
2561 (synopsis "I/O plexus components")
2562 (description "Plexus IO is a set of plexus components, which are designed
2563 for use in I/O operations. This implementation using plexus components allows
2564 reusing it in maven.")
2565 (license license:asl2.0)))
2567 (define-public java-plexus-archiver
2569 (name "java-plexus-archiver")
2573 (uri (string-append "https://github.com/codehaus-plexus/plexus-archiver"
2574 "/archive/plexus-archiver-" version ".tar.gz"))
2577 "0iv1j7khra6icqh3jndng3iipfmkc7l5jq2y802cm8r575v75pyv"))))
2578 (build-system ant-build-system)
2580 `(#:jar-name "plexus-archiver.jar"
2581 #:source-dir "src/main/java"
2583 #:test-dir "src/test"
2584 #:test-exclude (list "**/Abstract*.java" "**/Base*.java")
2586 (modify-phases %standard-phases
2587 (add-before 'check 'remove-failing
2589 ;; Requires an older version of plexus container
2591 "src/test/java/org/codehaus/plexus/archiver/DuplicateFilesTest.java")))
2592 (add-before 'build 'copy-resources
2594 (mkdir-p "build/classes/META-INF/plexus")
2595 (copy-file "src/main/resources/META-INF/plexus/components.xml"
2596 "build/classes/META-INF/plexus/components.xml")
2599 `(("utils" ,java-plexus-utils)
2600 ("commons-io" ,java-commons-io)
2601 ("snappy" ,java-iq80-snappy)
2602 ("io" ,java-plexus-io)
2603 ("compress" ,java-commons-compress)
2604 ("container-default" ,java-plexus-container-default-bootstrap)
2605 ("snappy" ,java-snappy)
2606 ("java-jsr305" ,java-jsr305)))
2608 `(("junit" ,java-junit)
2609 ("classworld" ,java-plexus-classworlds)
2610 ("xbean" ,java-geronimo-xbean-reflect)
2611 ("xz" ,java-tukaani-xz)
2612 ("guava" ,java-guava)))
2613 (home-page "https://github.com/codehaus-plexus/plexus-archiver")
2614 (synopsis "Archiver component of the Plexus project")
2615 (description "Plexus-archiver contains a component to deal with project
2617 (license license:asl2.0)))
2619 (define-public java-plexus-container-default
2621 (inherit java-plexus-container-default-bootstrap)
2622 (name "java-plexus-container-default")
2624 `(#:jar-name "container-default.jar"
2625 #:source-dir "plexus-container-default/src/main/java"
2626 #:test-dir "plexus-container-default/src/test"
2627 #:test-exclude (list ;"**/*Test.java"
2629 ;; Requires plexus-hierarchy
2630 "**/PlexusHierarchyTest.java"
2632 "**/ComponentRealmCompositionTest.java"
2633 "**/PlexusContainerTest.java")
2636 (modify-phases %standard-phases
2637 (add-before 'build 'copy-resources
2640 "plexus-container-default/src/main/resources/"
2643 (add-before 'check 'fix-paths
2645 (let ((dir "plexus-container-default/src/test/java/org/codehaus"))
2648 dir "/plexus/component/composition/"
2649 "ComponentRealmCompositionTest.java")
2650 (("src/test") "plexus-container-default/src/test"))
2653 `(("worldclass" ,java-plexus-classworlds)
2654 ("xbean" ,java-geronimo-xbean-reflect)
2655 ("utils" ,java-plexus-utils)
2656 ("junit" ,java-junit)
2657 ("guava" ,java-guava)))
2659 `(("archiver" ,java-plexus-archiver)
2660 ("hamcrest" ,java-hamcrest-core)))))
2662 (define-public java-asm
2668 (uri (string-append "http://download.forge.ow2.org/asm/"
2669 "asm-" version ".tar.gz"))
2672 "115l5pqblirdkmzi32dxx7gbcm4jy0s14y5wircr6h8jdr9aix00"))))
2673 (build-system ant-build-system)
2675 `(("java-aqute-bndlib" ,java-aqute-bndlib)))
2677 `(#:build-target "compile"
2678 ;; The tests require an old version of Janino, which no longer compiles
2683 ;; We don't need these extra ant tasks, but the build system asks us to
2684 ;; provide a path anyway.
2685 "-Dobjectweb.ant.tasks.path=dummy-path"
2686 ;; The java-aqute.bndlib JAR file will be put onto the classpath and
2687 ;; used during the build automatically by ant-build-system, but
2688 ;; java-asm's build.xml fails unless we provide something here.
2689 "-Dbiz.aQute.bnd.path=dummy-path")
2691 (modify-phases %standard-phases
2692 (add-before 'install 'build-jars
2693 (lambda* (#:key make-flags #:allow-other-keys)
2694 ;; We cannot use the "jar" target because it depends on a couple
2695 ;; of unpackaged, complicated tools.
2697 (zero? (system* "jar"
2698 "-cf" (string-append "dist/asm-" ,version ".jar")
2699 "-C" "output/build/tmp" "."))))
2701 (install-jars "dist")))))
2703 `(("java-junit" ,java-junit)))
2704 (home-page "http://asm.ow2.org/")
2705 (synopsis "Very small and fast Java bytecode manipulation framework")
2706 (description "ASM is an all purpose Java bytecode manipulation and
2707 analysis framework. It can be used to modify existing classes or dynamically
2708 generate classes, directly in binary form. The provided common
2709 transformations and analysis algorithms allow to easily assemble custom
2710 complex transformations and code analysis tools.")
2711 (license license:bsd-3)))
2713 (define-public java-cglib
2720 "https://github.com/cglib/cglib/archive/RELEASE_"
2721 (string-map (lambda (c) (if (char=? c #\.) #\_ c)) version)
2723 (file-name (string-append "cglib-" version ".tar.gz"))
2726 "162dvd4fln76ai8prfharf66pn6r56p3sxx683j5vdyccrd5hi1q"))))
2727 (build-system ant-build-system)
2729 `(;; FIXME: tests fail because junit runs
2730 ;; "net.sf.cglib.transform.AbstractTransformTest", which does not seem
2731 ;; to describe a test at all.
2733 #:jar-name "cglib.jar"
2735 (modify-phases %standard-phases
2736 (add-after 'unpack 'chdir
2737 (lambda _ (chdir "cglib") #t)))))
2739 `(("java-asm" ,java-asm)
2740 ("java-junit" ,java-junit)))
2741 (home-page "https://github.com/cglib/cglib/")
2742 (synopsis "Java byte code generation library")
2743 (description "The byte code generation library CGLIB is a high level API
2744 to generate and transform Java byte code.")
2745 (license license:asl2.0)))
2747 (define-public java-objenesis
2749 (name "java-objenesis")
2753 (uri (string-append "https://github.com/easymock/objenesis/"
2754 "archive/" version ".tar.gz"))
2755 (file-name (string-append "objenesis-" version ".tar.gz"))
2758 "1va5qz1i2wawwavhnxfzxnfgrcaflz9p1pg03irrjh4nd3rz8wh6"))))
2759 (build-system ant-build-system)
2761 `(#:jar-name "objenesis.jar"
2762 #:source-dir "main/src/"
2763 #:test-dir "main/src/test/"))
2765 `(("java-junit" ,java-junit)
2766 ("java-hamcrest-core" ,java-hamcrest-core)))
2767 (home-page "http://objenesis.org/")
2768 (synopsis "Bypass the constructor when creating an object")
2769 (description "Objenesis is a small Java library that serves one purpose:
2770 to instantiate a new object of a particular class. It is common to see
2771 restrictions in libraries stating that classes must require a default
2772 constructor. Objenesis aims to overcome these restrictions by bypassing the
2773 constructor on object instantiation.")
2774 (license license:asl2.0)))
2776 (define-public java-easymock
2778 (name "java-easymock")
2782 (uri (string-append "https://github.com/easymock/easymock/"
2783 "archive/easymock-" version ".tar.gz"))
2786 "1yzg0kv256ndr57gpav46cyv4a1ns5sj722l50zpxk3j6sk9hnmi"))))
2787 (build-system ant-build-system)
2789 `(#:jar-name "easymock.jar"
2790 #:source-dir "core/src/main"
2791 #:test-dir "core/src/test"
2793 (modify-phases %standard-phases
2794 ;; FIXME: Android support requires the following packages to be
2795 ;; available: com.google.dexmaker.stock.ProxyBuilder
2796 (add-after 'unpack 'delete-android-support
2798 (with-directory-excursion "core/src/main/java/org/easymock/internal"
2799 (substitute* "MocksControl.java"
2800 (("AndroidSupport.isAndroid\\(\\)") "false")
2801 (("return classProxyFactory = new AndroidClassProxyFactory\\(\\);") ""))
2802 (delete-file "AndroidClassProxyFactory.java"))
2804 (add-after 'unpack 'delete-broken-tests
2806 (with-directory-excursion "core/src/test/java/org/easymock"
2807 ;; This test depends on dexmaker.
2808 (delete-file "tests2/ClassExtensionHelperTest.java")
2810 ;; This is not a test.
2811 (delete-file "tests/BaseEasyMockRunnerTest.java")
2813 ;; This test should be executed with a different runner...
2814 (delete-file "tests2/EasyMockAnnotationsTest.java")
2815 ;; ...but deleting it means that we also have to delete these
2817 (delete-file "tests2/EasyMockRunnerTest.java")
2818 (delete-file "tests2/EasyMockRuleTest.java")
2820 ;; This test fails because the file "easymock.properties" does
2822 (delete-file "tests2/EasyMockPropertiesTest.java"))
2825 `(("java-asm" ,java-asm)
2826 ("java-cglib" ,java-cglib)
2827 ("java-objenesis" ,java-objenesis)))
2829 `(("java-junit" ,java-junit)
2830 ("java-hamcrest-core" ,java-hamcrest-core)))
2831 (home-page "http://easymock.org")
2832 (synopsis "Java library providing mock objects for unit tests")
2833 (description "EasyMock is a Java library that provides an easy way to use
2834 mock objects in unit testing.")
2835 (license license:asl2.0)))
2837 (define-public java-jmock-1
2843 (uri (string-append "https://github.com/jmock-developers/"
2844 "jmock-library/archive/" version ".tar.gz"))
2845 (file-name (string-append "jmock-" version ".tar.gz"))
2848 "0xmrlhq0fszldkbv281k9463mv496143vvmqwpxp62yzjvdkx9w0"))))
2849 (build-system ant-build-system)
2851 `(#:build-target "jars"
2852 #:test-target "run.tests"
2854 (modify-phases %standard-phases
2855 (replace 'install (install-jars "build")))))
2856 (home-page "http://www.jmock.org")
2857 (synopsis "Mock object library for test-driven development")
2858 (description "JMock is a library that supports test-driven development of
2859 Java code with mock objects. Mock objects help you design and test the
2860 interactions between the objects in your programs.
2865 @item makes it quick and easy to define mock objects
2866 @item lets you precisely specify the interactions between
2867 your objects, reducing the brittleness of your tests
2868 @item plugs into your favourite test framework
2869 @item is easy to extend.
2871 (license license:bsd-3)))
2873 (define-public java-jmock
2875 (inherit java-jmock-1)
2880 (uri (string-append "https://github.com/jmock-developers/"
2881 "jmock-library/archive/" version ".tar.gz"))
2882 (file-name (string-append name "-" version ".tar.gz"))
2885 "18650a9g8xffcsdb6w91pbswa7f40fp2sh6s3nclkclz5dbzq8f0"))))
2887 `(("java-hamcrest-all" ,java-hamcrest-all)
2888 ("java-asm" ,java-asm)
2889 ("java-bsh" ,java-bsh)
2890 ("java-junit" ,java-junit)))
2892 `(("cglib" ,java-cglib)))
2894 `(#:jar-name "java-jmock.jar"
2895 #:source-dir "jmock/src/main/java"
2896 #:test-dir "jmock/src/test"))))
2898 (define-public java-jmock-junit4
2900 (inherit java-jmock)
2901 (name "java-jmock-junit4")
2903 `(#:jar-name "java-jmock-junit4.jar"
2904 #:source-dir "jmock-junit4/src/main/java"
2905 #:test-dir "jmock-junit4/src/test"))
2907 `(("java-hamcrest-all" ,java-hamcrest-all)
2908 ("java-asm" ,java-asm)
2909 ("java-bsh" ,java-bsh)
2910 ("java-jmock" ,java-jmock)
2911 ("java-jumit" ,java-junit)))))
2913 (define-public java-jmock-legacy
2915 (inherit java-jmock)
2916 (name "java-jmock-legacy")
2918 `(#:jar-name "java-jmock-legacy.jar"
2919 #:source-dir "jmock-legacy/src/main/java"
2920 #:test-dir "jmock-legacy/src/test"
2922 (modify-phases %standard-phases
2923 (add-before 'check 'copy-tests
2925 ;; This file is a dependancy of some tests
2926 (let ((file "org/jmock/test/acceptance/PackageProtectedType.java"))
2927 (copy-file (string-append "jmock/src/test/java/" file)
2928 (string-append "jmock-legacy/src/test/java/" file))
2931 `(("java-hamcrest-all" ,java-hamcrest-all)
2932 ("java-objenesis" ,java-objenesis)
2933 ("java-cglib" ,java-cglib)
2934 ("java-jmock" ,java-jmock)
2935 ("java-asm" ,java-asm)
2936 ("java-bsh" ,java-bsh)
2937 ("java-junit" ,java-junit)))
2939 `(("java-jmock-junit4" ,java-jmock-junit4)))))
2941 (define-public java-hamcrest-all
2942 (package (inherit java-hamcrest-core)
2943 (name "java-hamcrest-all")
2945 (substitute-keyword-arguments (package-arguments java-hamcrest-core)
2946 ;; FIXME: a unit test fails because org.hamcrest.SelfDescribing is not
2947 ;; found, although it is part of the hamcrest-core library that has
2950 ;; Fixing this one test is insufficient, though, and upstream confirmed
2951 ;; that the latest hamcrest release fails its unit tests when built
2952 ;; with Java 7. See https://github.com/hamcrest/JavaHamcrest/issues/30
2954 ((#:build-target _) "bigjar")
2956 `(modify-phases ,phases
2957 ;; Some build targets override the classpath, so we need to patch
2958 ;; the build.xml to ensure that required dependencies are on the
2960 (add-after 'unpack 'patch-classpath-for-integration
2961 (lambda* (#:key inputs #:allow-other-keys)
2962 (substitute* "build.xml"
2963 ((" build/hamcrest-library-\\$\\{version\\}.jar" line)
2967 (find-files (assoc-ref inputs "java-hamcrest-core") "\\.jar$")
2968 (find-files (assoc-ref inputs "java-junit") "\\.jar$")
2969 (find-files (assoc-ref inputs "java-jmock") "\\.jar$")
2970 (find-files (assoc-ref inputs "java-easymock") "\\.jar$")))
2974 `(("java-junit" ,java-junit)
2975 ("java-jmock" ,java-jmock-1)
2976 ("java-easymock" ,java-easymock)
2977 ("java-hamcrest-core" ,java-hamcrest-core)
2978 ,@(package-inputs java-hamcrest-core)))))
2980 (define-public java-jopt-simple
2982 (name "java-jopt-simple")
2986 (uri (string-append "http://repo1.maven.org/maven2/"
2987 "net/sf/jopt-simple/jopt-simple/"
2988 version "/jopt-simple-"
2989 version "-sources.jar"))
2992 "1v8bzmwmw6qq20gm42xyay6vrd567dra4vqwhgjnqqjz1gs9f8qa"))))
2993 (build-system ant-build-system)
2995 `(#:tests? #f ; there are no tests
2996 #:jar-name "jopt-simple.jar"))
2997 (home-page "https://pholser.github.io/jopt-simple/")
2998 (synopsis "Java library for parsing command line options")
2999 (description "JOpt Simple is a Java library for parsing command line
3000 options, such as those you might pass to an invocation of @code{javac}. In
3001 the interest of striving for simplicity, as closely as possible JOpt Simple
3002 attempts to honor the command line option syntaxes of POSIX @code{getopt} and
3003 GNU @code{getopt_long}. It also aims to make option parser configuration and
3004 retrieval of options and their arguments simple and expressive, without being
3006 (license license:expat)))
3008 (define-public java-commons-math3
3010 (name "java-commons-math3")
3014 (uri (string-append "mirror://apache/commons/math/source/"
3015 "commons-math3-" version "-src.tar.gz"))
3018 "19l6yp44qc5g7wg816nbn5z3zq3xxzwimvbm4a8pczgvpi4i85s6"))))
3019 (build-system ant-build-system)
3021 `(#:build-target "jar"
3022 #:test-target "test"
3024 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
3025 (junit (assoc-ref %build-inputs "java-junit")))
3026 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
3027 (string-append "-Dhamcrest.jar=" hamcrest
3028 "/share/java/hamcrest-core.jar")))
3030 (modify-phases %standard-phases
3031 ;; We want to build the jar in the build phase and run the tests
3032 ;; later in a separate phase.
3033 (add-after 'unpack 'untangle-targets
3035 (substitute* "build.xml"
3036 (("name=\"jar\" depends=\"test\"")
3037 "name=\"jar\" depends=\"compile\""))
3039 ;; There is no install target.
3041 (install-jars "target")))))
3043 `(("java-junit" ,java-junit)
3044 ("java-hamcrest-core" ,java-hamcrest-core)))
3045 (home-page "http://commons.apache.org/math/")
3046 (synopsis "Apache Commons mathematics library")
3047 (description "Commons Math is a library of lightweight, self-contained
3048 mathematics and statistics components addressing the most common problems not
3049 available in the Java programming language or Commons Lang.")
3050 (license license:asl2.0)))
3052 (define-public java-jmh
3059 (url "http://hg.openjdk.java.net/code-tools/jmh/")
3060 (changeset version)))
3061 (file-name (string-append name "-" version "-checkout"))
3064 "1fxyxhg9famwcg1prc4cgwb5wzyxqavn3cjm5vz8605xz7x5k084"))))
3065 (build-system ant-build-system)
3067 `(#:jar-name "jmh-core.jar"
3068 #:source-dir "jmh-core/src/main"
3069 #:test-dir "jmh-core/src/test"
3071 (modify-phases %standard-phases
3072 ;; This seems to be a bug in the JDK. It may not be necessary in
3073 ;; future versions of the JDK.
3074 (add-after 'unpack 'fix-bug
3076 (with-directory-excursion
3077 "jmh-core/src/main/java/org/openjdk/jmh/runner/options"
3078 (substitute* '("IntegerValueConverter.java"
3079 "ThreadsValueConverter.java")
3080 (("public Class<Integer> valueType")
3081 "public Class<? extends Integer> valueType")))
3084 `(("java-jopt-simple" ,java-jopt-simple)
3085 ("java-commons-math3" ,java-commons-math3)))
3087 `(("java-junit" ,java-junit)
3088 ("java-hamcrest-core" ,java-hamcrest-core)))
3089 (home-page "http://openjdk.java.net/projects/code-tools/jmh/")
3090 (synopsis "Benchmark harness for the JVM")
3091 (description "JMH is a Java harness for building, running, and analysing
3092 nano/micro/milli/macro benchmarks written in Java and other languages
3093 targeting the JVM.")
3095 (license license:gpl2)))
3097 (define-public java-commons-collections4
3099 (name "java-commons-collections4")
3103 (uri (string-append "mirror://apache/commons/collections/source/"
3104 "commons-collections4-" version "-src.tar.gz"))
3107 "1krfhvggympq4avk7gh6qafzf6b9ip6r1m4lmacikyx04039m0wl"))))
3108 (build-system ant-build-system)
3110 `(#:test-target "test"
3112 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
3113 (junit (assoc-ref %build-inputs "java-junit"))
3114 (easymock (assoc-ref %build-inputs "java-easymock")))
3115 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
3116 (string-append "-Dhamcrest.jar=" hamcrest
3117 "/share/java/hamcrest-core.jar")
3118 (string-append "-Deasymock.jar=" easymock
3119 "/share/java/easymock.jar")))
3121 (modify-phases %standard-phases
3123 (install-jars "target")))))
3125 `(("java-junit" ,java-junit)
3126 ("java-hamcrest-core" ,java-hamcrest-core)
3127 ("java-easymock" ,java-easymock)))
3128 (home-page "http://commons.apache.org/collections/")
3129 (synopsis "Collections framework")
3130 (description "The Java Collections Framework is the recognised standard
3131 for collection handling in Java. Commons-Collections seek to build upon the
3132 JDK classes by providing new interfaces, implementations and utilities. There
3133 are many features, including:
3136 @item @code{Bag} interface for collections that have a number of copies of
3138 @item @code{BidiMap} interface for maps that can be looked up from value to
3139 key as well and key to value
3140 @item @code{MapIterator} interface to provide simple and quick iteration over
3142 @item Transforming decorators that alter each object as it is added to the
3144 @item Composite collections that make multiple collections look like one
3145 @item Ordered maps and sets that retain the order elements are added in,
3146 including an LRU based map
3147 @item Reference map that allows keys and/or values to be garbage collected
3149 @item Many comparator implementations
3150 @item Many iterator implementations
3151 @item Adapter classes from array and enumerations to collections
3152 @item Utilities to test or create typical set-theory properties of collections
3153 such as union, intersection, and closure.
3155 (license license:asl2.0)))
3157 (define-public java-commons-collections
3159 (inherit java-commons-collections4)
3160 (name "java-commons-collections")
3164 (uri (string-append "mirror://apache/commons/collections/source/"
3165 "commons-collections-" version "-src.tar.gz"))
3168 "055r51a5lfc3z7rkxnxmnn1npvkvda7636hjpm4qk7cnfzz98387"))))
3170 (substitute-keyword-arguments (package-arguments java-commons-collections4)
3172 `(modify-phases ,phases
3173 ;; The manifest is required by the build procedure
3174 (add-before 'build 'add-manifest
3176 (mkdir-p "build/conf")
3177 (call-with-output-file "build/conf/MANIFEST.MF"
3179 (format file "Manifest-Version: 1.0\n")))))
3181 (install-jars "build"))))))))
3183 (define java-commons-collections-test-classes
3185 (inherit java-commons-collections)
3187 `(#:jar-name "commons-collections-test-classes.jar"
3188 #:source-dir "src/test"
3191 `(("collection" ,java-commons-collections)))))
3193 (define-public java-commons-beanutils
3195 (name "java-commons-beanutils")
3199 (uri (string-append "mirror://apache/commons/beanutils/source/"
3200 "commons-beanutils-" version "-src.tar.gz"))
3203 "03cs0bq3sl1sdc7py9g3qnf8n9h473nrkvd3d251kaqv6a2ab7qk"))))
3204 (build-system ant-build-system)
3206 `(#:test-target "test"
3209 (modify-phases %standard-phases
3211 (lambda* (#:key outputs #:allow-other-keys)
3212 (rename-file (string-append "dist/commons-beanutils-" ,version
3214 "commons-beanutils.jar")
3215 (install-file "commons-beanutils.jar"
3216 (string-append (assoc-ref outputs "out") "/share/java/"))
3219 `(("logging" ,java-commons-logging-minimal)
3220 ("collections" ,java-commons-collections)))
3222 `(("junit" ,java-junit)
3223 ("collections-test" ,java-commons-collections-test-classes)))
3224 (home-page "http://commons.apache.org/beanutils/")
3225 (synopsis "Dynamically set or get properties in Java")
3226 (description "BeanUtils provides a simplified interface to reflection and
3227 introspection to set or get dynamically determined properties through their
3228 setter and getter method.")
3229 (license license:asl2.0)))
3231 (define-public java-commons-io
3233 (name "java-commons-io")
3238 (uri (string-append "mirror://apache/commons/io/source/"
3239 "commons-io-" version "-src.tar.gz"))
3242 "0q5y41jrcjvx9hzs47x5kdhnasdy6rm4bzqd2jxl02w717m7a7v3"))))
3243 (build-system ant-build-system)
3244 (outputs '("out" "doc"))
3246 `(#:test-target "test"
3248 (list (string-append "-Djunit.jar="
3249 (assoc-ref %build-inputs "java-junit")
3250 "/share/java/junit.jar"))
3252 (modify-phases %standard-phases
3253 (add-after 'build 'build-javadoc ant-build-javadoc)
3254 (replace 'install (install-jars "target"))
3255 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
3257 `(("java-junit" ,java-junit)
3258 ("java-hamcrest-core" ,java-hamcrest-core)))
3259 (home-page "http://commons.apache.org/io/")
3260 (synopsis "Common useful IO related classes")
3261 (description "Commons-IO contains utility classes, stream implementations,
3262 file filters and endian classes.")
3263 (license license:asl2.0)))
3265 (define-public java-commons-lang
3267 (name "java-commons-lang")
3272 (uri (string-append "mirror://apache/commons/lang/source/"
3273 "commons-lang-" version "-src.tar.gz"))
3275 (base32 "1mxwagqadzx1b2al7i0z1v0r235aj2njdyijf02szq0vhmqrfiq5"))))
3276 (build-system ant-build-system)
3277 (outputs '("out" "doc"))
3279 `(#:test-target "test"
3280 #:test-exclude (list "**/Abstract*.java" "**/Random*.java")
3282 (modify-phases %standard-phases
3283 (add-after 'build 'build-javadoc ant-build-javadoc)
3284 (add-before 'check 'disable-failing-test
3286 ;; Disable a failing test
3287 (substitute* "src/test/java/org/apache/commons/lang/\
3288 time/FastDateFormatTest.java"
3289 (("public void testFormat\\(\\)")
3290 "public void disabled_testFormat()"))
3292 (replace 'install (install-jars "target"))
3293 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
3295 `(("java-junit" ,java-junit)))
3296 (home-page "http://commons.apache.org/lang/")
3297 (synopsis "Extension of the java.lang package")
3298 (description "The Commons Lang components contains a set of Java classes
3299 that provide helper methods for standard Java classes, especially those found
3300 in the @code{java.lang} package in the Sun JDK. The following classes are
3304 @item StringUtils - Helper for @code{java.lang.String}.
3305 @item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets
3306 of characters such as @code{[a-z]} and @code{[abcdez]}.
3307 @item RandomStringUtils - Helper for creating randomised strings.
3308 @item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
3309 @item NumberRange - A range of numbers with an upper and lower bound.
3310 @item ObjectUtils - Helper for @code{java.lang.Object}.
3311 @item SerializationUtils - Helper for serializing objects.
3312 @item SystemUtils - Utility class defining the Java system properties.
3313 @item NestedException package - A sub-package for the creation of nested
3315 @item Enum package - A sub-package for the creation of enumerated types.
3316 @item Builder package - A sub-package for the creation of @code{equals},
3317 @code{hashCode}, @code{compareTo} and @code{toString} methods.
3319 (license license:asl2.0)))
3321 (define-public java-commons-lang3
3323 (name "java-commons-lang3")
3328 (uri (string-append "mirror://apache/commons/lang/source/"
3329 "commons-lang3-" version "-src.tar.gz"))
3331 (base32 "0xpshb9spjhplq5a7mr0y1bgfw8190ik4xj8f569xidfcki1d6kg"))))
3332 (build-system ant-build-system)
3333 (outputs '("out" "doc"))
3335 `(#:test-target "test"
3337 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-all"))
3338 (junit (assoc-ref %build-inputs "java-junit"))
3339 (easymock (assoc-ref %build-inputs "java-easymock"))
3340 (io (assoc-ref %build-inputs "java-commons-io")))
3341 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
3342 (string-append "-Dhamcrest.jar=" hamcrest
3343 "/share/java/hamcrest-all.jar")
3344 (string-append "-Dcommons-io.jar=" io
3345 "/share/java/commons-io-"
3346 ,(package-version java-commons-io)
3348 (string-append "-Deasymock.jar=" easymock
3349 "/share/java/easymock.jar")))
3351 (modify-phases %standard-phases
3352 (add-after 'build 'build-javadoc ant-build-javadoc)
3353 (replace 'install (install-jars "target"))
3354 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
3356 `(("java-junit" ,java-junit)
3357 ("java-commons-io" ,java-commons-io)
3358 ("java-hamcrest-all" ,java-hamcrest-all)
3359 ("java-easymock" ,java-easymock)))
3360 (home-page "http://commons.apache.org/lang/")
3361 (synopsis "Extension of the java.lang package")
3362 (description "The Commons Lang components contains a set of Java classes
3363 that provide helper methods for standard Java classes, especially those found
3364 in the @code{java.lang} package. The following classes are included:
3367 @item StringUtils - Helper for @code{java.lang.String}.
3368 @item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets of
3369 characters such as @code{[a-z]} and @code{[abcdez]}.
3370 @item RandomStringUtils - Helper for creating randomised strings.
3371 @item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
3372 @item NumberRange - A range of numbers with an upper and lower bound.
3373 @item ObjectUtils - Helper for @code{java.lang.Object}.
3374 @item SerializationUtils - Helper for serializing objects.
3375 @item SystemUtils - Utility class defining the Java system properties.
3376 @item NestedException package - A sub-package for the creation of nested
3378 @item Enum package - A sub-package for the creation of enumerated types.
3379 @item Builder package - A sub-package for the creation of @code{equals},
3380 @code{hashCode}, @code{compareTo} and @code{toString} methods.
3382 (license license:asl2.0)))
3384 (define-public java-jsr305
3386 (name "java-jsr305")
3390 (uri (string-append "https://repo1.maven.org/maven2/"
3391 "com/google/code/findbugs/"
3392 "jsr305/" version "/jsr305-"
3393 version "-sources.jar"))
3396 "1rh6jin9v7jqpq3kf1swl868l8i94r636n03pzpsmgr8v0lh9j2n"))))
3397 (build-system ant-build-system)
3399 `(#:tests? #f ; no tests included
3400 #:jar-name "jsr305.jar"))
3401 (home-page "http://findbugs.sourceforge.net/")
3402 (synopsis "Annotations for the static analyzer called findbugs")
3403 (description "This package provides annotations for the findbugs package.
3404 It provides packages in the @code{javax.annotations} namespace.")
3405 (license license:asl2.0)))
3407 (define-public java-guava
3410 ;; This is the last release of Guava that can be built with Java 7.
3414 (uri (string-append "https://github.com/google/guava/"
3415 "releases/download/v" version
3416 "/guava-" version "-sources.jar"))
3419 "1gawrs5gi6j5hcfxdgpnfli75vb9pfi4sn09pnc8xacr669yajwr"))))
3420 (build-system ant-build-system)
3422 `(#:tests? #f ; no tests included
3423 #:jar-name "guava.jar"
3425 (modify-phases %standard-phases
3426 (add-after 'unpack 'trim-sources
3428 (with-directory-excursion "src/com/google/common"
3429 ;; Remove annotations to avoid extra dependencies:
3430 ;; * "j2objc" annotations are used when converting Java to
3432 ;; * "errorprone" annotations catch common Java mistakes at
3434 ;; * "IgnoreJRERequirement" is used for Android.
3435 (substitute* (find-files "." "\\.java$")
3436 (("import com.google.j2objc.*") "")
3437 (("import com.google.errorprone.annotation.*") "")
3438 (("import org.codehaus.mojo.animal_sniffer.*") "")
3439 (("@CanIgnoreReturnValue") "")
3442 (("@RetainedWith") "")
3444 (("@ForOverride") "")
3445 (("@J2ObjCIncompatible") "")
3446 (("@IgnoreJRERequirement") "")))
3449 `(("java-jsr305" ,java-jsr305)))
3450 (home-page "https://github.com/google/guava")
3451 (synopsis "Google core libraries for Java")
3452 (description "Guava is a set of core libraries that includes new
3453 collection types (such as multimap and multiset), immutable collections, a
3454 graph library, functional types, an in-memory cache, and APIs/utilities for
3455 concurrency, I/O, hashing, primitives, reflection, string processing, and much
3457 (license license:asl2.0)))
3459 ;; The java-commons-logging package provides adapters to many different
3460 ;; logging frameworks. To avoid an excessive dependency graph we try to build
3461 ;; it with only a minimal set of adapters.
3462 (define-public java-commons-logging-minimal
3464 (name "java-commons-logging-minimal")
3468 (uri (string-append "mirror://apache/commons/logging/source/"
3469 "commons-logging-" version "-src.tar.gz"))
3472 "10bwcy5w8d7y39n0krlwhnp8ds3kj5zhmzj0zxnkw0qdlsjmsrj9"))))
3473 (build-system ant-build-system)
3475 `(#:tests? #f ; avoid dependency on logging frameworks
3476 #:jar-name "commons-logging-minimal.jar"
3478 (modify-phases %standard-phases
3479 (add-after 'unpack 'delete-adapters-and-tests
3481 ;; Delete all adapters except for NoOpLog, SimpleLog, and
3482 ;; LogFactoryImpl. NoOpLog is required to build; LogFactoryImpl
3483 ;; is used by applications; SimpleLog is the only actually usable
3484 ;; implementation that does not depend on another logging
3488 (delete-file (string-append
3489 "src/main/java/org/apache/commons/logging/impl/" file)))
3490 (list "Jdk13LumberjackLogger.java"
3491 "WeakHashtable.java"
3493 "ServletContextCleaner.java"
3496 "LogKitLogger.java"))
3497 (delete-file-recursively "src/test")
3499 (home-page "http://commons.apache.org/logging/")
3500 (synopsis "Common API for logging implementations")
3501 (description "The Logging package is a thin bridge between different
3502 logging implementations. A library that uses the commons-logging API can be
3503 used with any logging implementation at runtime.")
3504 (license license:asl2.0)))
3506 ;; This is the last release of the 1.x series.
3507 (define-public java-mockito-1
3509 (name "java-mockito")
3513 (uri (string-append "http://repo1.maven.org/maven2/"
3514 "org/mockito/mockito-core/" version
3515 "/mockito-core-" version "-sources.jar"))
3518 "0vmiwnwpf83g2q7kj1rislmja8fpvqkixjhawh7nxnygx6pq11kc"))))
3519 (build-system ant-build-system)
3521 `(#:jar-name "mockito.jar"
3522 #:tests? #f ; no tests included
3523 ;; FIXME: patch-and-repack does not support jars, so we have to apply
3524 ;; patches in build phases.
3526 (modify-phases %standard-phases
3527 ;; Mockito was developed against a different version of hamcrest,
3528 ;; which does not require matcher implementations to provide an
3529 ;; implementation of the "describeMismatch" method. We add this
3530 ;; simple definition to pass the build with our version of hamcrest.
3531 (add-after 'unpack 'fix-hamcrest-build-error
3533 (substitute* "src/org/mockito/internal/matchers/LocalizedMatcher.java"
3534 (("public Matcher getActualMatcher\\(\\) .*" line)
3536 public void describeMismatch(Object item, Description description) {
3537 actualMatcher.describeMismatch(item, description);
3541 ;; Mockito bundles cglib. We have a cglib package, so let's use
3543 (add-after 'unpack 'use-system-libraries
3545 (with-directory-excursion "src/org/mockito/internal/creation/cglib"
3546 (substitute* '("CGLIBHacker.java"
3547 "CglibMockMaker.java"
3548 "ClassImposterizer.java"
3549 "DelegatingMockitoMethodProxy.java"
3550 "MethodInterceptorFilter.java"
3551 "MockitoNamingPolicy.java"
3552 "SerializableMockitoMethodProxy.java"
3553 "SerializableNoOp.java")
3554 (("import org.mockito.cglib") "import net.sf.cglib")))
3557 `(("java-junit" ,java-junit)
3558 ("java-objenesis" ,java-objenesis)
3559 ("java-cglib" ,java-cglib)
3560 ("java-hamcrest-core" ,java-hamcrest-core)))
3561 (home-page "http://mockito.org")
3562 (synopsis "Mockito is a mock library for Java")
3563 (description "Mockito is a mocking library for Java which lets you write
3564 tests with a clean and simple API. It generates mocks using reflection, and
3565 it records all mock invocations, including methods arguments.")
3566 (license license:asl2.0)))
3568 (define-public java-httpcomponents-httpcore
3570 (name "java-httpcomponents-httpcore")
3574 (uri (string-append "mirror://apache//httpcomponents/httpcore/"
3575 "source/httpcomponents-core-"
3576 version "-src.tar.gz"))
3579 "02bwcf38y4vgwq7kj2s6q7qrmma641r5lacivm16kgxvb2j6h1vy"))))
3580 (build-system ant-build-system)
3582 `(#:jar-name "httpcomponents-httpcore.jar"
3584 (modify-phases %standard-phases
3585 (add-after 'unpack 'chdir
3586 (lambda _ (chdir "httpcore") #t)))))
3588 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)
3589 ("java-commons-lang3" ,java-commons-lang3)))
3591 `(("java-junit" ,java-junit)
3592 ("java-mockito" ,java-mockito-1)))
3593 (home-page "https://hc.apache.org/httpcomponents-core-4.4.x/index.html")
3594 (synopsis "Low level HTTP transport components")
3595 (description "HttpCore is a set of low level HTTP transport components
3596 that can be used to build custom client and server side HTTP services with a
3597 minimal footprint. HttpCore supports two I/O models: blocking I/O model based
3598 on the classic Java I/O and non-blocking, event driven I/O model based on Java
3601 This package provides the blocking I/O model library.")
3602 (license license:asl2.0)))
3604 (define-public java-httpcomponents-httpcore-nio
3605 (package (inherit java-httpcomponents-httpcore)
3606 (name "java-httpcomponents-httpcore-nio")
3608 `(#:jar-name "httpcomponents-httpcore-nio.jar"
3610 (modify-phases %standard-phases
3611 (add-after 'unpack 'chdir
3612 (lambda _ (chdir "httpcore-nio") #t)))))
3614 `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
3615 ("java-hamcrest-core" ,java-hamcrest-core)
3616 ,@(package-inputs java-httpcomponents-httpcore)))
3617 (description "HttpCore is a set of low level HTTP transport components
3618 that can be used to build custom client and server side HTTP services with a
3619 minimal footprint. HttpCore supports two I/O models: blocking I/O model based
3620 on the classic Java I/O and non-blocking, event driven I/O model based on Java
3623 This package provides the non-blocking I/O model library based on Java
3626 (define-public java-httpcomponents-httpcore-ab
3627 (package (inherit java-httpcomponents-httpcore)
3628 (name "java-httpcomponents-httpcore-ab")
3630 `(#:jar-name "httpcomponents-httpcore-ab.jar"
3632 (modify-phases %standard-phases
3633 (add-after 'unpack 'chdir
3634 (lambda _ (chdir "httpcore-ab") #t)))))
3636 `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
3637 ("java-commons-cli" ,java-commons-cli)
3638 ("java-hamcrest-core" ,java-hamcrest-core)
3639 ,@(package-inputs java-httpcomponents-httpcore)))
3640 (synopsis "Apache HttpCore benchmarking tool")
3641 (description "This package provides the HttpCore benchmarking tool. It is
3642 an Apache AB clone based on HttpCore.")))
3644 (define-public java-httpcomponents-httpclient
3646 (name "java-httpcomponents-httpclient")
3650 (uri (string-append "mirror://apache/httpcomponents/httpclient/"
3651 "source/httpcomponents-client-"
3652 version "-src.tar.gz"))
3655 "1428399s7qy3cim5wc6f3ks4gl9nf9vkjpfmnlap3jflif7g2pj1"))))
3656 (build-system ant-build-system)
3658 `(#:jar-name "httpcomponents-httpclient.jar"
3660 (modify-phases %standard-phases
3661 (add-after 'unpack 'chdir
3662 (lambda _ (chdir "httpclient") #t)))))
3664 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)
3665 ("java-commons-codec" ,java-commons-codec)
3666 ("java-hamcrest-core" ,java-hamcrest-core)
3667 ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
3668 ("java-mockito" ,java-mockito-1)
3669 ("java-junit" ,java-junit)))
3670 (home-page "https://hc.apache.org/httpcomponents-client-ga/")
3671 (synopsis "HTTP client library for Java")
3672 (description "Although the @code{java.net} package provides basic
3673 functionality for accessing resources via HTTP, it doesn't provide the full
3674 flexibility or functionality needed by many applications. @code{HttpClient}
3675 seeks to fill this void by providing an efficient, up-to-date, and
3676 feature-rich package implementing the client side of the most recent HTTP
3677 standards and recommendations.")
3678 (license license:asl2.0)))
3680 (define-public java-httpcomponents-httpmime
3681 (package (inherit java-httpcomponents-httpclient)
3682 (name "java-httpcomponents-httpmime")
3684 `(#:jar-name "httpcomponents-httpmime.jar"
3686 (modify-phases %standard-phases
3687 (add-after 'unpack 'chdir
3688 (lambda _ (chdir "httpmime") #t)))))
3690 `(("java-httpcomponents-httpclient" ,java-httpcomponents-httpclient)
3691 ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
3692 ("java-junit" ,java-junit)
3693 ("java-hamcrest-core" ,java-hamcrest-core)))))
3695 (define-public java-commons-net
3697 (name "java-commons-net")
3701 (uri (string-append "mirror://apache/commons/net/source/"
3702 "commons-net-" version "-src.tar.gz"))
3705 "0n0cmnddk9qdqhjvka8pc6hd9mn2qi3166f1s6xk32h7rfy1adxr"))))
3706 (build-system ant-build-system)
3708 `(;; FIXME: MainTest.java tries to read "examples.properties" (which
3709 ;; should be "resources/examples/examples.properties"), but gets "null"
3712 #:jar-name "commons-net.jar"))
3714 `(("java-junit" ,java-junit)
3715 ("java-hamcrest-core" ,java-hamcrest-core)))
3716 (home-page "http://commons.apache.org/net/")
3717 (synopsis "Client library for many basic Internet protocols")
3718 (description "The Apache Commons Net library implements the client side of
3719 many basic Internet protocols. The purpose of the library is to provide
3720 fundamental protocol access, not higher-level abstractions.")
3721 (license license:asl2.0)))
3723 (define-public java-jsch
3729 (uri (string-append "mirror://sourceforge/jsch/jsch/"
3730 version "/jsch-" version ".zip"))
3733 "029rdddyq1mh3ghryh3ki99kba1xkf1d1swjv2vi6lk6zzjy2wdb"))))
3734 (build-system ant-build-system)
3736 `(#:build-target "dist"
3737 #:tests? #f ; no tests included
3739 (modify-phases %standard-phases
3740 (replace 'install (install-jars "dist")))))
3742 `(("unzip" ,unzip)))
3743 (home-page "http://www.jcraft.com/jsch/")
3744 (synopsis "Pure Java implementation of SSH2")
3745 (description "JSch is a pure Java implementation of SSH2. JSch allows you
3746 to connect to an SSH server and use port forwarding, X11 forwarding, file
3747 transfer, etc., and you can integrate its functionality into your own Java
3749 (license license:bsd-3)))
3751 (define-public java-commons-compress
3753 (name "java-commons-compress")
3757 (uri (string-append "mirror://apache/commons/compress/source/"
3758 "commons-compress-" version "-src.tar.gz"))
3761 "1vjqvavrn0babffn1kciz6v52ibwq2vwhzlb95hazis3lgllnxc8"))))
3762 (build-system ant-build-system)
3764 `(#:jar-name "commons-compress.jar"
3766 (modify-phases %standard-phases
3767 (add-after 'unpack 'delete-bad-tests
3769 (with-directory-excursion "src/test/java/org/apache/commons/compress/"
3770 ;; FIXME: These tests really should not fail. Maybe they are
3771 ;; indicative of problems with our Java packaging work.
3773 ;; This test fails with a null pointer exception.
3774 (delete-file "archivers/sevenz/SevenZOutputFileTest.java")
3775 ;; This test fails to open test resources.
3776 (delete-file "archivers/zip/ExplodeSupportTest.java")
3778 ;; FIXME: This test adds a dependency on powermock, which is hard to
3779 ;; package at this point.
3780 ;; https://github.com/powermock/powermock
3781 (delete-file "archivers/sevenz/SevenZNativeHeapTest.java"))
3784 `(("java-junit" ,java-junit)
3785 ("java-hamcrest-core" ,java-hamcrest-core)
3786 ("java-mockito" ,java-mockito-1)
3787 ("java-xz" ,java-xz)))
3788 (home-page "https://commons.apache.org/proper/commons-compress/")
3789 (synopsis "Java library for working with compressed files")
3790 (description "The Apache Commons Compress library defines an API for
3791 working with compressed files such as ar, cpio, Unix dump, tar, zip, gzip, XZ,
3792 Pack200, bzip2, 7z, arj, lzma, snappy, DEFLATE, lz4 and Z files.")
3793 (license license:asl2.0)))
3795 (define-public java-commons-csv
3797 (name "java-commons-csv")
3801 (uri (string-append "mirror://apache/commons/csv/source/"
3802 "commons-csv-" version "-src.tar.gz"))
3805 "1l89m0fm2s3xx3v3iynvangymfg2vlyngaj6fgsi457nmsw7m7ij"))))
3806 (build-system ant-build-system)
3808 `(#:jar-name "commons-csv.jar"
3809 #:source-dir "src/main/java"
3810 #:tests? #f)); FIXME: requires java-h2
3812 `(("java-hamcrest-core" ,java-hamcrest-core)
3813 ("java-commons-io" ,java-commons-io)
3814 ("java-commons-lang3" ,java-commons-lang3)
3815 ("junit" ,java-junit)))
3816 (home-page "https://commons.apache.org/proper/commons-csv/")
3817 (synopsis "Read and write CSV documents")
3818 (description "Commons CSV reads and writes files in variations of the Comma
3819 Separated Value (CSV) format. The most common CSV formats are predefined in the
3823 @item Microsoft Excel
3824 @item Informix UNLOAD
3825 @item Informix UNLOAD CSV
3831 Custom formats can be created using a fluent style API.")
3832 (license license:asl2.0)))
3834 (define-public java-osgi-annotation
3836 (name "java-osgi-annotation")
3840 (uri (string-append "https://repo1.maven.org/maven2/"
3841 "org/osgi/org.osgi.annotation/" version "/"
3842 "org.osgi.annotation-" version "-sources.jar"))
3845 "1q718mb7gqg726rh6pc2hcisn8v50nv35abbir0jypmffhiii85w"))))
3846 (build-system ant-build-system)
3848 `(#:tests? #f ; no tests
3849 #:jar-name "osgi-annotation.jar"))
3850 (home-page "https://www.osgi.org")
3851 (synopsis "Annotation module of OSGi framework")
3853 "OSGi, for Open Services Gateway initiative framework, is a module system
3854 and service platform for the Java programming language. This package contains
3855 the OSGi annotation module, providing additional services to help dynamic
3857 (license license:asl2.0)))
3859 (define-public java-osgi-core
3861 (name "java-osgi-core")
3865 (uri (string-append "https://repo1.maven.org/maven2/"
3866 "org/osgi/org.osgi.core/" version "/"
3867 "org.osgi.core-" version "-sources.jar"))
3870 "19bpf5jx32jq9789gyhin35q5v7flmw0p9mk7wbgqpxqfmxyiabv"))))
3871 (build-system ant-build-system)
3873 `(#:tests? #f ; no tests
3874 #:jar-name "osgi-core.jar"))
3876 `(("java-osgi-annotation" ,java-osgi-annotation)))
3877 (home-page "https://www.osgi.org")
3878 (synopsis "Core module of OSGi framework")
3880 "OSGi, for Open Services Gateway initiative framework, is a module system
3881 and service platform for the Java programming language. This package contains
3882 the OSGi Core module.")
3883 (license license:asl2.0)))
3885 (define-public java-osgi-service-event
3887 (name "java-osgi-service-event")
3891 (uri (string-append "https://repo1.maven.org/maven2/"
3892 "org/osgi/org.osgi.service.event/"
3893 version "/org.osgi.service.event-"
3894 version "-sources.jar"))
3897 "1nyhlgagwym75bycnjczwbnpymv2iw84zbhvvzk84g9q736i6qxm"))))
3898 (build-system ant-build-system)
3900 `(#:tests? #f ; no tests
3901 #:jar-name "osgi-service-event.jar"))
3903 `(("java-osgi-annotation" ,java-osgi-annotation)
3904 ("java-osgi-core" ,java-osgi-core)))
3905 (home-page "https://www.osgi.org")
3906 (synopsis "OSGi service event module")
3908 "OSGi, for Open Services Gateway initiative framework, is a module system
3909 and service platform for the Java programming language. This package contains
3910 the OSGi @code{org.osgi.service.event} module.")
3911 (license license:asl2.0)))
3913 (define-public java-eclipse-osgi
3915 (name "java-eclipse-osgi")
3919 (uri (string-append "https://repo1.maven.org/maven2/"
3920 "org/eclipse/platform/org.eclipse.osgi/"
3921 version "/org.eclipse.osgi-"
3922 version "-sources.jar"))
3925 "00cqc6lb29n0zv68b4l842vzkwawvbr7gshfdygsk8sicvcq2c7b"))))
3926 (build-system ant-build-system)
3928 `(#:tests? #f ; no tests included
3929 #:jar-name "eclipse-equinox-osgi.jar"))
3931 `(("java-osgi-annotation" ,java-osgi-annotation)))
3932 (home-page "http://www.eclipse.org/equinox/")
3933 (synopsis "Eclipse Equinox OSGi framework")
3934 (description "This package provides an implementation of the OSGi Core
3936 (license license:epl1.0)))
3938 (define-public java-eclipse-equinox-common
3940 (name "java-eclipse-equinox-common")
3944 (uri (string-append "https://repo1.maven.org/maven2/"
3945 "org/eclipse/platform/org.eclipse.equinox.common/"
3946 version "/org.eclipse.equinox.common-"
3947 version "-sources.jar"))
3950 "12aazpkgw46r1qj0pr421jzwhbmsizd97r37krd7njnbrdgfzksc"))))
3951 (build-system ant-build-system)
3953 `(#:tests? #f ; no tests included
3954 #:jar-name "eclipse-equinox-common.jar"))
3956 `(("java-eclipse-osgi" ,java-eclipse-osgi)))
3957 (home-page "http://www.eclipse.org/equinox/")
3958 (synopsis "Common Eclipse runtime")
3959 (description "This package provides the common Eclipse runtime.")
3960 (license license:epl1.0)))
3962 (define-public java-eclipse-core-jobs
3964 (name "java-eclipse-core-jobs")
3968 (uri (string-append "https://repo1.maven.org/maven2/"
3969 "org/eclipse/platform/org.eclipse.core.jobs/"
3970 version "/org.eclipse.core.jobs-"
3971 version "-sources.jar"))
3974 "0395b8lh0km8vhzjnchvs1rii1qz48hyvb2wqfaq4yhklbwihq4b"))))
3975 (build-system ant-build-system)
3977 `(#:tests? #f ; no tests included
3978 #:jar-name "eclipse-core-jobs.jar"))
3980 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
3981 ("java-eclipse-osgi" ,java-eclipse-osgi)))
3982 (home-page "http://www.eclipse.org/equinox/")
3983 (synopsis "Eclipse jobs mechanism")
3984 (description "This package provides the Eclipse jobs mechanism.")
3985 (license license:epl1.0)))
3987 (define-public java-eclipse-equinox-registry
3989 (name "java-eclipse-equinox-registry")
3993 (uri (string-append "https://repo1.maven.org/maven2/"
3994 "org/eclipse/platform/org.eclipse.equinox.registry/"
3995 version "/org.eclipse.equinox.registry-"
3996 version "-sources.jar"))
3999 "1i9sgymh2fy5vdgk5y7s3qvrlbgh4l93ddqi3v4zmca7hwrlhf9k"))))
4000 (build-system ant-build-system)
4002 `(#:tests? #f ; no tests included
4003 #:jar-name "eclipse-equinox-registry.jar"))
4005 `(("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
4006 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
4007 ("java-eclipse-osgi" ,java-eclipse-osgi)))
4008 (home-page "http://www.eclipse.org/equinox/")
4009 (synopsis "Eclipse extension registry support")
4010 (description "This package provides support for the Eclipse extension
4012 (license license:epl1.0)))
4014 (define-public java-eclipse-equinox-app
4016 (name "java-eclipse-equinox-app")
4020 (uri (string-append "https://repo1.maven.org/maven2/"
4021 "org/eclipse/platform/org.eclipse.equinox.app/"
4022 version "/org.eclipse.equinox.app-"
4023 version "-sources.jar"))
4026 "0nhvbp93y203ar7y59gb0mz3w2d3jlqhr0c9hii9bcfpmr7imdab"))))
4027 (build-system ant-build-system)
4029 `(#:tests? #f ; no tests included
4030 #:jar-name "eclipse-equinox-app.jar"))
4032 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
4033 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
4034 ("java-eclipse-osgi" ,java-eclipse-osgi)
4035 ("java-osgi-service-event" ,java-osgi-service-event)))
4036 (home-page "http://www.eclipse.org/equinox/")
4037 (synopsis "Equinox application container")
4038 (description "This package provides the Equinox application container for
4040 (license license:epl1.0)))
4042 (define-public java-eclipse-equinox-preferences
4044 (name "java-eclipse-equinox-preferences")
4048 (uri (string-append "https://repo1.maven.org/maven2/"
4049 "org/eclipse/platform/org.eclipse.equinox.preferences/"
4050 version "/org.eclipse.equinox.preferences-"
4051 version "-sources.jar"))
4054 "0k7w6c141sqym4fy3af0qkwpy4pdh2vsjpjba6rp5fxyqa24v0a2"))))
4055 (build-system ant-build-system)
4057 `(#:tests? #f ; no tests included
4058 #:jar-name "eclipse-equinox-preferences.jar"))
4060 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
4061 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
4062 ("java-eclipse-osgi" ,java-eclipse-osgi)))
4063 (home-page "http://www.eclipse.org/equinox/")
4064 (synopsis "Eclipse preferences mechanism")
4065 (description "This package provides the Eclipse preferences mechanism with
4066 the module @code{org.eclipse.equinox.preferences}.")
4067 (license license:epl1.0)))
4069 (define-public java-eclipse-core-contenttype
4071 (name "java-eclipse-core-contenttype")
4075 (uri (string-append "https://repo1.maven.org/maven2/"
4076 "org/eclipse/platform/org.eclipse.core.contenttype/"
4077 version "/org.eclipse.core.contenttype-"
4078 version "-sources.jar"))
4081 "1wcqcv7ijwv5rh748vz3x9pkmjl9w1r0k0026k56n8yjl4rrmspi"))))
4082 (build-system ant-build-system)
4084 `(#:tests? #f ; no tests included
4085 #:jar-name "eclipse-core-contenttype.jar"))
4087 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
4088 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
4089 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
4090 ("java-eclipse-osgi" ,java-eclipse-osgi)))
4091 (home-page "http://www.eclipse.org/")
4092 (synopsis "Eclipse content mechanism")
4093 (description "This package provides the Eclipse content mechanism in the
4094 @code{org.eclipse.core.contenttype} module.")
4095 (license license:epl1.0)))
4097 (define-public java-eclipse-core-runtime
4099 (name "java-eclipse-core-runtime")
4103 (uri (string-append "https://repo1.maven.org/maven2/"
4104 "org/eclipse/platform/org.eclipse.core.runtime/"
4105 version "/org.eclipse.core.runtime-"
4106 version "-sources.jar"))
4109 "16mkf8jgj35pgzms7w1gyfq0gfm4ixw6c5xbbxzdj1la56c758ya"))))
4110 (build-system ant-build-system)
4112 `(#:tests? #f ; no tests included
4113 #:jar-name "eclipse-core-runtime.jar"))
4115 `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
4116 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
4117 ("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
4118 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
4119 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
4120 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
4121 ("java-eclipse-osgi" ,java-eclipse-osgi)))
4122 (home-page "https://www.eclipse.org/")
4123 (synopsis "Eclipse core runtime")
4124 (description "This package provides the Eclipse core runtime with the
4125 module @code{org.eclipse.core.runtime}.")
4126 (license license:epl1.0)))
4128 (define-public java-eclipse-core-filesystem
4130 (name "java-eclipse-core-filesystem")
4134 (uri (string-append "https://repo1.maven.org/maven2/"
4135 "org/eclipse/platform/org.eclipse.core.filesystem/"
4136 version "/org.eclipse.core.filesystem-"
4137 version "-sources.jar"))
4140 "0km1bhwjim4rfy3pkvjhvy31kgsyf2ncx0mlkmbf5n6g57pphdyj"))))
4141 (build-system ant-build-system)
4143 `(#:tests? #f ; no tests included
4144 #:jar-name "eclipse-core-filesystem.jar"))
4146 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
4147 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
4148 ("java-eclipse-osgi" ,java-eclipse-osgi)))
4149 (home-page "https://www.eclipse.org/")
4150 (synopsis "Eclipse core file system")
4151 (description "This package provides the Eclipse core file system with the
4152 module @code{org.eclipse.core.filesystem}.")
4153 (license license:epl1.0)))
4155 (define-public java-eclipse-core-expressions
4157 (name "java-eclipse-core-expressions")
4161 (uri (string-append "https://repo1.maven.org/maven2/"
4162 "org/eclipse/platform/org.eclipse.core.expressions/"
4163 version "/org.eclipse.core.expressions-"
4164 version "-sources.jar"))
4167 "18bw2l875gmygvpagpgk9l24qzbdjia4ag12nw6fi8v8yaq4987f"))))
4168 (build-system ant-build-system)
4170 `(#:tests? #f ; no tests included
4171 #:jar-name "eclipse-core-expressions.jar"))
4173 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
4174 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
4175 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
4176 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
4177 ("java-eclipse-osgi" ,java-eclipse-osgi)))
4178 (home-page "https://www.eclipse.org/")
4179 (synopsis "Eclipse core expression language")
4180 (description "This package provides the Eclipse core expression language
4181 with the @code{org.eclipse.core.expressions} module.")
4182 (license license:epl1.0)))
4184 (define-public java-eclipse-core-variables
4186 (name "java-eclipse-core-variables")
4190 (uri (string-append "https://repo1.maven.org/maven2/"
4191 "org/eclipse/platform/org.eclipse.core.variables/"
4192 version "/org.eclipse.core.variables-"
4193 version "-sources.jar"))
4196 "12dirh03zi4n5x5cj07vzrhkmnqy6h9q10h9j605pagmpmifyxmy"))))
4197 (build-system ant-build-system)
4199 `(#:tests? #f ; no tests included
4200 #:jar-name "eclipse-core-variables.jar"))
4202 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
4203 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
4204 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
4205 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
4206 ("java-eclipse-osgi" ,java-eclipse-osgi)))
4207 (home-page "https://www.eclipse.org/platform")
4208 (synopsis "Eclipse core variables")
4209 (description "This package provides the Eclipse core variables module
4210 @code{org.eclipse.core.variables}.")
4211 (license license:epl1.0)))
4213 (define-public java-eclipse-ant-core
4215 (name "java-eclipse-ant-core")
4219 (uri (string-append "https://repo1.maven.org/maven2/"
4220 "org/eclipse/platform/org.eclipse.ant.core/"
4221 version "/org.eclipse.ant.core-"
4222 version "-sources.jar"))
4225 "11g3if794qjlk98mz9zch22rr56sd7z63vn4i7k2icr8cq5bfqg7"))))
4226 (build-system ant-build-system)
4228 `(#:tests? #f ; no tests included
4229 #:jar-name "eclipse-ant-core.jar"))
4231 `(("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
4232 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
4233 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
4234 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
4235 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
4236 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
4237 ("java-eclipse-core-variables" ,java-eclipse-core-variables)
4238 ("java-eclipse-osgi" ,java-eclipse-osgi)))
4239 (home-page "https://www.eclipse.org/platform")
4240 (synopsis "Ant build tool core libraries")
4241 (description "This package provides the ant build tool core libraries with
4242 the module @code{org.eclipse.ant.core}.")
4243 (license license:epl1.0)))
4245 (define-public java-eclipse-core-resources
4247 (name "java-eclipse-core-resources")
4251 (uri (string-append "https://repo1.maven.org/maven2/"
4252 "org/eclipse/platform/org.eclipse.core.resources/"
4253 version "/org.eclipse.core.resources-"
4254 version "-sources.jar"))
4257 "1hrfxrll6cpcagfksk2na1ypvkcnsp0fk6n3vcsrn97qayf9mx9l"))))
4258 (build-system ant-build-system)
4260 `(#:tests? #f ; no tests included
4261 #:jar-name "eclipse-core-resources.jar"))
4263 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
4264 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
4265 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
4266 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
4267 ("java-eclipse-core-expressions" ,java-eclipse-core-expressions)
4268 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
4269 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
4270 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
4271 ("java-eclipse-ant-core" ,java-eclipse-ant-core)
4272 ("java-eclipse-osgi" ,java-eclipse-osgi)))
4273 (home-page "https://www.eclipse.org/")
4274 (synopsis "Eclipse core resource management")
4275 (description "This package provides the Eclipse core resource management
4276 module @code{org.eclipse.core.resources}.")
4277 (license license:epl1.0)))
4279 (define-public java-eclipse-compare-core
4281 (name "java-eclipse-compare-core")
4285 (uri (string-append "https://repo1.maven.org/maven2/"
4286 "org/eclipse/platform/org.eclipse.compare.core/"
4287 version "/org.eclipse.compare.core-"
4288 version "-sources.jar"))
4291 "10g37r0pbiffyv2wk35c6g5lwzkdipkl0kkjp41v84dln46xm4dg"))))
4292 (build-system ant-build-system)
4294 `(#:tests? #f ; no tests included
4295 #:jar-name "eclipse-compare-core.jar"))
4297 `(("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
4298 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
4299 ("java-eclipse-osgi" ,java-eclipse-osgi)
4300 ("java-icu4j" ,java-icu4j)))
4301 (home-page "https://www.eclipse.org/")
4302 (synopsis "Eclipse core compare support")
4303 (description "This package provides the Eclipse core compare support
4304 module @code{org.eclipse.compare.core}.")
4305 (license license:epl1.0)))
4307 (define-public java-eclipse-team-core
4309 (name "java-eclipse-team-core")
4313 (uri (string-append "https://repo1.maven.org/maven2/"
4314 "org/eclipse/platform/org.eclipse.team.core/"
4315 version "/org.eclipse.team.core-"
4316 version "-sources.jar"))
4319 "02j2jzqgb26zx2d5ahxmvijw6j4r0la90zl5c3i65x6z19ciyam7"))))
4320 (build-system ant-build-system)
4322 `(#:tests? #f ; no tests included
4323 #:jar-name "eclipse-team-core.jar"))
4325 `(("java-eclipse-compare-core" ,java-eclipse-compare-core)
4326 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
4327 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
4328 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
4329 ("java-eclipse-core-resources" ,java-eclipse-core-resources)
4330 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
4331 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
4332 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
4333 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
4334 ("java-eclipse-osgi" ,java-eclipse-osgi)))
4335 (home-page "https://www.eclipse.org/platform")
4336 (synopsis "Eclipse team support core")
4337 (description "This package provides the Eclipse team support core module
4338 @code{org.eclipse.team.core}.")
4339 (license license:epl1.0)))
4341 (define-public java-eclipse-core-commands
4343 (name "java-eclipse-core-commands")
4347 (uri (string-append "https://repo1.maven.org/maven2/"
4348 "org/eclipse/platform/org.eclipse.core.commands/"
4349 version "/org.eclipse.core.commands-"
4350 version "-sources.jar"))
4353 "0yjn482qndcfrsq3jd6vnhcylp16420f5aqkrwr8spsprjigjcr9"))))
4354 (build-system ant-build-system)
4356 `(#:tests? #f ; no tests included
4357 #:jar-name "eclipse-core-commands.jar"))
4359 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)))
4360 (home-page "https://www.eclipse.org/platform")
4361 (synopsis "Eclipse core commands")
4362 (description "This package provides Eclipse core commands in the module
4363 @code{org.eclipse.core.commands}.")
4364 (license license:epl1.0)))
4366 (define-public java-eclipse-text
4368 (name "java-eclipse-text")
4372 (uri (string-append "https://repo1.maven.org/maven2/"
4373 "org/eclipse/platform/org.eclipse.text/"
4374 version "/org.eclipse.text-"
4375 version "-sources.jar"))
4378 "0scz70vzz5qs5caji9f5q01vkqnvip7dpri1q07l8wbbdcxn4cq1"))))
4379 (build-system ant-build-system)
4381 `(#:tests? #f ; no tests included
4382 #:jar-name "eclipse-text.jar"
4384 (modify-phases %standard-phases
4385 ;; When creating a new category we must make sure that the new list
4386 ;; matches List<Position>. By default it seems to be too generic
4387 ;; (ArrayList<Object>), so we specialize it to ArrayList<Position>.
4388 ;; Without this we get this error:
4390 ;; [javac] .../src/org/eclipse/jface/text/AbstractDocument.java:376:
4391 ;; error: method put in interface Map<K,V> cannot be applied to given types;
4392 ;; [javac] fPositions.put(category, new ArrayList<>());
4394 ;; [javac] required: String,List<Position>
4395 ;; [javac] found: String,ArrayList<Object>
4396 ;; [javac] reason: actual argument ArrayList<Object> cannot be converted
4397 ;; to List<Position> by method invocation conversion
4398 ;; [javac] where K,V are type-variables:
4399 ;; [javac] K extends Object declared in interface Map
4400 ;; [javac] V extends Object declared in interface Map
4402 ;; I don't know if this is a good fix. I suspect it is not, but it
4404 (add-after 'unpack 'fix-compilation-error
4406 (substitute* "src/org/eclipse/jface/text/AbstractDocument.java"
4407 (("Positions.put\\(category, new ArrayList<>\\(\\)\\);")
4408 "Positions.put(category, new ArrayList<Position>());"))
4411 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
4412 ("java-eclipse-core-commands" ,java-eclipse-core-commands)
4413 ("java-icu4j" ,java-icu4j)))
4414 (home-page "http://www.eclipse.org/platform")
4415 (synopsis "Eclipse text library")
4416 (description "Platform Text is part of the Platform UI project and
4417 provides the basic building blocks for text and text editors within Eclipse
4418 and contributes the Eclipse default text editor.")
4419 (license license:epl1.0)))
4421 (define-public java-eclipse-jdt-core
4423 (name "java-eclipse-jdt-core")
4427 (uri (string-append "https://repo1.maven.org/maven2/"
4428 "org/eclipse/jdt/org.eclipse.jdt.core/"
4429 version "/org.eclipse.jdt.core-"
4430 version "-sources.jar"))
4433 "191xw4lc7mjjkprh4ji5vnpjvr5r4zvbpwkriy4bvsjqrz35vh1j"))))
4434 (build-system ant-build-system)
4436 `(#:tests? #f ; no tests included
4437 #:jar-name "eclipse-jdt-core.jar"))
4439 `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
4440 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
4441 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
4442 ("java-eclipse-core-resources" ,java-eclipse-core-resources)
4443 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
4444 ("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
4445 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
4446 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
4447 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
4448 ("java-eclipse-osgi" ,java-eclipse-osgi)
4449 ("java-eclipse-text" ,java-eclipse-text)))
4450 (home-page "https://www.eclipse.org/jdt")
4451 (synopsis "Java development tools core libraries")
4452 (description "This package provides the core libraries of the Eclipse Java
4453 development tools.")
4454 (license license:epl1.0)))
4456 (define-public java-javax-mail
4458 (name "java-javax-mail")
4462 (uri (string-append "https://repo1.maven.org/maven2/"
4463 "com/sun/mail/javax.mail/"
4464 version "/javax.mail-"
4465 version "-sources.jar"))
4468 "0sdlfgsc2b5s89xv1261y8i0jijcja019k2x1c8ngfn582w4jly9"))))
4469 (build-system ant-build-system)
4471 `(#:tests? #f ; no tests
4472 #:jar-name "javax-mail.jar"))
4473 (home-page "https://javamail.java.net")
4474 (synopsis "Reference implementation of the JavaMail API")
4476 "This package provides versions of the JavaMail API implementation, IMAP,
4477 SMTP, and POP3 service providers, some examples, and documentation for the
4479 ;; GPLv2 only with "classpath exception".
4480 (license license:gpl2)))
4482 (define-public java-log4j-api
4484 (name "java-log4j-api")
4488 (uri (string-append "mirror://apache/logging/log4j/" version
4489 "/apache-log4j-" version "-src.tar.gz"))
4492 "0j5p9gik0jysh37nlrckqbky12isy95cpwg2gv5fas1rcdqbraxd"))))
4493 (build-system ant-build-system)
4495 `(#:tests? #f ; tests require unpackaged software
4496 #:jar-name "log4j-api.jar"
4498 (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out")
4501 (modify-phases %standard-phases
4502 (add-after 'unpack 'enter-dir
4503 (lambda _ (chdir "log4j-api") #t))
4504 ;; FIXME: The tests require additional software that has not been
4505 ;; packaged yet, such as
4506 ;; * org.apache.maven
4507 ;; * org.apache.felix
4508 (add-after 'enter-dir 'delete-tests
4509 (lambda _ (delete-file-recursively "src/test") #t)))))
4511 `(("java-osgi-core" ,java-osgi-core)
4512 ("java-hamcrest-core" ,java-hamcrest-core)
4513 ("java-junit" ,java-junit)))
4514 (home-page "http://logging.apache.org/log4j/2.x/")
4515 (synopsis "API module of the Log4j logging framework for Java")
4517 "This package provides the API module of the Log4j logging framework for
4519 (license license:asl2.0)))
4521 (define-public java-log4j-core
4523 (inherit java-log4j-api)
4524 (name "java-log4j-core")
4526 `(("java-osgi-core" ,java-osgi-core)
4527 ("java-hamcrest-core" ,java-hamcrest-core)
4528 ("java-log4j-api" ,java-log4j-api)
4529 ("java-mail" ,java-mail)
4530 ("java-jboss-jms-api-spec" ,java-jboss-jms-api-spec)
4531 ("java-lmax-disruptor" ,java-lmax-disruptor)
4532 ("java-kafka" ,java-kafka-clients)
4533 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
4534 ("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
4535 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
4536 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)
4537 ("java-fasterxml-jackson-dataformat-xml" ,java-fasterxml-jackson-dataformat-xml)
4538 ("java-fasterxml-jackson-dataformat-yaml" ,java-fasterxml-jackson-dataformat-yaml)
4539 ("java-commons-compress" ,java-commons-compress)
4540 ("java-commons-csv" ,java-commons-csv)
4541 ("java-jeromq" ,java-jeromq)
4542 ("java-junit" ,java-junit)))
4544 `(("hamcrest" ,java-hamcrest-all)
4545 ("java-commons-io" ,java-commons-io)
4546 ("java-commons-lang3" ,java-commons-lang3)
4547 ("slf4j" ,java-slf4j-api)))
4549 `(#:tests? #f ; tests require more dependencies
4550 #:test-dir "src/test"
4551 #:source-dir "src/main/java"
4552 #:jar-name "log4j-core.jar"
4555 (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out")
4558 (modify-phases %standard-phases
4559 (add-after 'unpack 'enter-dir
4560 (lambda _ (chdir "log4j-core") #t)))))
4561 (synopsis "Core component of the Log4j framework")
4562 (description "This package provides the core component of the Log4j
4563 logging framework for Java.")))
4565 (define-public java-log4j-1.2-api
4567 (inherit java-log4j-api)
4568 (name "java-log4j-1.2-api")
4570 `(#:jar-name "java-log4j-1.2-api.jar"
4571 #:source-dir "log4j-1.2-api/src/main/java"
4573 ;; Tests require maven-model (and other maven subprojects), which is a
4574 ;; cyclic dependency.
4577 `(("log4j-api" ,java-log4j-api)
4578 ("log4j-core" ,java-log4j-core)
4579 ("osgi-core" ,java-osgi-core)
4580 ("eclipse-osgi" ,java-eclipse-osgi)
4581 ("java-lmax-disruptor" ,java-lmax-disruptor)))))
4583 (define-public java-commons-cli
4585 (name "java-commons-cli")
4589 (uri (string-append "mirror://apache/commons/cli/source/"
4590 "commons-cli-" version "-src.tar.gz"))
4593 "1fkjn552i12vp3xxk21ws4p70fi0lyjm004vzxsdaz7gdpgyxxyl"))))
4594 (build-system ant-build-system)
4597 `(#:jar-name "commons-cli.jar"))
4599 `(("java-junit" ,java-junit)
4600 ("java-hamcrest-core" ,java-hamcrest-core)))
4601 (home-page "http://commons.apache.org/cli/")
4602 (synopsis "Command line arguments and options parsing library")
4603 (description "The Apache Commons CLI library provides an API for parsing
4604 command line options passed to programs. It is also able to print help
4605 messages detailing the options available for a command line tool.
4607 Commons CLI supports different types of options:
4610 @item POSIX like options (ie. tar -zxvf foo.tar.gz)
4611 @item GNU like long options (ie. du --human-readable --max-depth=1)
4612 @item Java like properties (ie. java -Djava.awt.headless=true Foo)
4613 @item Short options with value attached (ie. gcc -O2 foo.c)
4614 @item long options with single hyphen (ie. ant -projecthelp)
4617 This is a part of the Apache Commons Project.")
4618 (license license:asl2.0)))
4620 (define-public java-commons-codec
4622 (name "java-commons-codec")
4626 (uri (string-append "mirror://apache/commons/codec/source/"
4627 "commons-codec-" version "-src.tar.gz"))
4630 "1w9qg30y4s0x8gnmr2fgj4lyplfn788jqxbcz27lf5kbr6n8xr65"))))
4631 (build-system ant-build-system)
4632 (outputs '("out" "doc"))
4634 `(#:test-target "test"
4636 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
4637 (junit (assoc-ref %build-inputs "java-junit")))
4638 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
4639 (string-append "-Dhamcrest.jar=" hamcrest
4640 "/share/java/hamcrest-core.jar")
4641 ;; Do not append version to jar.
4642 "-Dfinal.name=commons-codec"))
4644 (modify-phases %standard-phases
4645 (add-after 'build 'build-javadoc ant-build-javadoc)
4646 (replace 'install (install-jars "dist"))
4647 (add-after 'install 'install-doc (install-javadoc "dist/docs/api")))))
4649 `(("java-junit" ,java-junit)
4650 ("java-hamcrest-core" ,java-hamcrest-core)))
4651 (home-page "http://commons.apache.org/codec/")
4652 (synopsis "Common encoders and decoders such as Base64, Hex, Phonetic and URLs")
4653 (description "The codec package contains simple encoder and decoders for
4654 various formats such as Base64 and Hexadecimal. In addition to these widely
4655 used encoders and decoders, the codec package also maintains a collection of
4656 phonetic encoding utilities.
4658 This is a part of the Apache Commons Project.")
4659 (license license:asl2.0)))
4661 (define-public java-commons-daemon
4663 (name "java-commons-daemon")
4667 (uri (string-append "mirror://apache/commons/daemon/source/"
4668 "commons-daemon-" version "-src.tar.gz"))
4671 "0ci46kq8jpz084ccwq0mmkahcgsmh20ziclp2jf5i0djqv95gvhi"))))
4672 (build-system ant-build-system)
4674 `(#:test-target "test"
4676 (modify-phases %standard-phases
4677 (add-after 'build 'build-javadoc ant-build-javadoc)
4678 (replace 'install (install-jars "dist"))
4679 (add-after 'install 'install-doc (install-javadoc "dist/docs/api")))))
4681 `(("java-junit" ,java-junit)))
4682 (home-page "http://commons.apache.org/daemon/")
4683 (synopsis "Library to launch Java applications as daemons")
4684 (description "The Daemon package from Apache Commons can be used to
4685 implement Java applications which can be launched as daemons. For example the
4686 program will be notified about a shutdown so that it can perform cleanup tasks
4687 before its process of execution is destroyed by the operation system.
4689 This package contains the Java library. You will also need the actual binary
4690 for your architecture which is provided by the jsvc package.
4692 This is a part of the Apache Commons Project.")
4693 (license license:asl2.0)))
4695 (define-public java-javaewah
4697 (name "java-javaewah")
4701 (uri (string-append "https://github.com/lemire/javaewah/"
4702 "archive/JavaEWAH-" version ".tar.gz"))
4705 "1n7j1r1h24wlhwv9zdcj6yqjrhma2ixwyzm15l5vrv6yqjs6753b"))))
4706 (build-system ant-build-system)
4707 (arguments `(#:jar-name "javaewah.jar"))
4709 `(("java-junit" ,java-junit)
4710 ("java-hamcrest-core" ,java-hamcrest-core)))
4711 (home-page "https://github.com/lemire/javaewah")
4712 (synopsis "Compressed alternative to the Java @code{BitSet} class")
4713 (description "This is a word-aligned compressed variant of the Java
4714 @code{Bitset} class. It provides both a 64-bit and a 32-bit RLE-like
4715 compression scheme. It can be used to implement bitmap indexes.
4717 The goal of word-aligned compression is not to achieve the best compression,
4718 but rather to improve query processing time. Hence, JavaEWAH tries to save CPU
4719 cycles, maybe at the expense of storage. However, the EWAH scheme is always
4720 more efficient storage-wise than an uncompressed bitmap (as implemented in the
4721 @code{BitSet} class by Sun).")
4722 ;; GPL2.0 derivates are explicitly allowed.
4723 (license license:asl2.0)))
4725 (define-public java-slf4j-api
4727 (name "java-slf4j-api")
4731 (uri (string-append "https://www.slf4j.org/dist/slf4j-"
4735 "13j51sgzmhhdrfa74gkal5zpip7r1440dh7zsi2c8bpb2zs1v8kb"))
4736 (modules '((guix build utils)))
4737 ;; Delete bundled jars.
4740 (for-each delete-file (find-files "." "\\.jar$"))
4742 (build-system ant-build-system)
4744 `(#:jar-name "slf4j-api.jar"
4745 #:source-dir "slf4j-api/src/main"
4746 #:test-dir "slf4j-api/src/test"
4748 (modify-phases %standard-phases
4749 (add-after 'build 'regenerate-jar
4751 ;; pom.xml ignores these files in the jar creation process. If we don't,
4752 ;; we get the error "This code should have never made it into slf4j-api.jar"
4753 (delete-file-recursively "build/classes/org/slf4j/impl")
4754 (zero? (system* "jar" "-cf" "build/jar/slf4j-api.jar" "-C"
4755 "build/classes" "."))))
4756 (add-before 'check 'dont-test-abstract-classes
4758 ;; abstract classes are not meant to be run with junit
4759 (substitute* "build.xml"
4760 (("<include name=\"\\*\\*/\\*Test.java\" />")
4761 (string-append "<include name=\"**/*Test.java\" />"
4762 "<exclude name=\"**/MultithreadedInitializationTest"
4763 ".java\" />"))))))))
4765 `(("java-junit" ,java-junit)
4766 ("java-hamcrest-core" ,java-hamcrest-core)))
4767 (home-page "https://www.slf4j.org/")
4768 (synopsis "Simple logging facade for Java")
4769 (description "The Simple Logging Facade for Java (SLF4J) serves as a
4770 simple facade or abstraction for various logging
4771 frameworks (e.g. @code{java.util.logging}, @code{logback}, @code{log4j})
4772 allowing the end user to plug in the desired logging framework at deployment
4774 (license license:expat)))
4776 (define-public java-slf4j-simple
4778 (name "java-slf4j-simple")
4780 (source (package-source java-slf4j-api))
4781 (build-system ant-build-system)
4783 `(#:jar-name "slf4j-simple.jar"
4784 #:source-dir "slf4j-simple/src/main"
4785 #:test-dir "slf4j-simple/src/test"
4787 (modify-phases %standard-phases
4788 ;; The tests need some test classes from slf4j-api
4789 (add-before 'check 'build-slf4j-api-test-helpers
4791 ;; Add current dir to CLASSPATH ...
4793 (string-append (getcwd) ":" (getenv "CLASSPATH")))
4794 ;; ... and build test helper classes here:
4798 ,@(find-files "slf4j-api/src/test" ".*\\.java")))))))))
4800 `(("java-junit" ,java-junit)
4801 ("java-hamcrest-core" ,java-hamcrest-core)
4802 ("java-slf4j-api" ,java-slf4j-api)))
4803 (home-page "https://www.slf4j.org/")
4804 (synopsis "Simple implementation of simple logging facade for Java")
4805 (description "SLF4J binding for the Simple implementation, which outputs
4806 all events to System.err. Only messages of level INFO and higher are
4808 (license license:expat)))
4810 (define-public antlr2
4816 (uri (string-append "http://www.antlr2.org/download/antlr-"
4820 "1ffvcwdw73id0dk6pj2mlxjvbg0662qacx4ylayqcxgg381fnfl5"))
4821 (modules '((guix build utils)))
4824 (delete-file "antlr.jar")
4825 (substitute* "lib/cpp/antlr/CharScanner.hpp"
4829 "#define EOF (-1)\n"
4830 "#include <strings.h>")))
4831 (substitute* "configure"
4834 (build-system gnu-build-system)
4836 `(#:tests? #f ; no test target
4837 #:imported-modules ((guix build ant-build-system)
4838 (guix build syscalls)
4839 ,@%gnu-build-system-modules)
4840 #:modules (((guix build ant-build-system) #:prefix ant:)
4841 (guix build gnu-build-system)
4844 (modify-phases %standard-phases
4845 (add-after 'install 'strip-jar-timestamps
4846 (assoc-ref ant:%standard-phases 'strip-jar-timestamps))
4847 (add-after 'configure 'fix-bin-ls
4849 (substitute* (find-files "." "Makefile")
4855 ("java" ,icedtea "jdk")))
4857 `(("java" ,icedtea)))
4858 (home-page "http://www.antlr2.org")
4859 (synopsis "Framework for constructing recognizers, compilers, and translators")
4860 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
4861 is a language tool that provides a framework for constructing recognizers,
4862 compilers, and translators from grammatical descriptions containing Java, C#,
4863 C++, or Python actions. ANTLR provides excellent support for tree construction,
4864 tree walking, and translation.")
4865 (license license:public-domain)))
4867 (define-public java-stringtemplate-3
4869 (name "java-stringtemplate")
4873 (uri (string-append "https://github.com/antlr/website-st4/raw/"
4874 "gh-pages/download/stringtemplate-"
4878 "086yj68np1vqhkj7483diz3km6s6y4gmwqswa7524a0ca6vxn2is"))))
4879 (build-system ant-build-system)
4881 `(#:jar-name (string-append ,name "-" ,version ".jar")
4883 #:modules ((guix build ant-build-system)
4887 (modify-phases %standard-phases
4888 (add-before 'check 'fix-tests
4890 (substitute* "build.xml"
4891 (("\\$\\{test.home\\}/java")
4892 "${test.home}/org"))
4894 (add-before 'build 'generate-grammar
4896 (with-directory-excursion "src/org/antlr/stringtemplate/language/"
4897 (every (lambda (file)
4898 (format #t "~a\n" file)
4899 (zero? (system* "antlr" file)))
4900 '("template.g" "angle.bracket.template.g" "action.g"
4901 "eval.g" "group.g" "interface.g"))))))))
4904 ("java-junit" ,java-junit)))
4905 (home-page "http://www.stringtemplate.org")
4906 (synopsis "Template engine to generate formatted text output")
4907 (description "StringTemplate is a java template engine (with ports for C#,
4908 Objective-C, JavaScript, Scala) for generating source code, web pages, emails,
4909 or any other formatted text output. StringTemplate is particularly good at
4910 code generators, multiple site skins, and internationalization / localization.
4911 StringTemplate also powers ANTLR.")
4912 (license license:bsd-3)))
4914 ;; antlr3 is partially written using antlr3 grammar files. It also depends on
4915 ;; ST4 (stringtemplate4), which is also partially written using antlr3 grammar
4916 ;; files and uses antlr3 at runtime. The latest version requires a recent version
4917 ;; of antlr3 at runtime.
4918 ;; Fortunately, ST4 4.0.6 can be built with an older antlr3, and we use antlr3.3.
4919 ;; This version of ST4 is sufficient for the latest antlr3.
4920 ;; We use ST4 4.0.6 to build a boostrap antlr3 (latest version), and build
4921 ;; the latest ST4 with it. Then we build our final antlr3 that will be linked
4922 ;; against the latest ST4.
4923 ;; antlr3.3 still depends on antlr3 to generate some files, so we use an
4924 ;; even older version, antlr3.1, to generate them. Fortunately antlr3.1 uses
4925 ;; only grammar files with the antlr2 syntax.
4926 ;; So we build antlr3.1 -> antlr3.3 -> ST4.0.6 -> antlr3-bootstrap -> ST4 -> antlr3.
4928 (define-public java-stringtemplate
4929 (package (inherit java-stringtemplate-3)
4930 (name "java-stringtemplate")
4934 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/"
4936 (file-name (string-append name "-" version ".tar.gz"))
4939 "1pri8hqa95rfdkjy55icl5q1m09zwp5k67ib14abas39s4v3w087"))))
4940 (build-system ant-build-system)
4942 `(#:jar-name (string-append ,name "-" ,version ".jar")
4943 #:tests? #f ; FIXME: tests fail for unknown reasons
4945 #:modules ((guix build ant-build-system)
4949 (modify-phases %standard-phases
4950 (add-before 'check 'fix-test-target
4952 (substitute* "build.xml"
4953 (("\\$\\{test.home\\}/java") "${test.home}/")
4954 (("\\*Test.java") "Test*.java"))
4956 (add-before 'build 'generate-grammar
4958 (with-directory-excursion "src/org/stringtemplate/v4/compiler/"
4959 (every (lambda (file)
4960 (format #t "~a\n" file)
4961 (zero? (system* "antlr3" file)))
4962 '("STParser.g" "Group.g" "CodeGenerator.g"))))))))
4964 `(("antlr3" ,antlr3-bootstrap)
4966 ("java-stringtemplate" ,java-stringtemplate-3)
4967 ("java-junit" ,java-junit)))))
4969 (define java-stringtemplate-4.0.6
4970 (package (inherit java-stringtemplate)
4971 (name "java-stringtemplate")
4975 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/ST-"
4977 (file-name (string-append name "-" version ".tar.gz"))
4980 "0hjmh1ahdsh3w825i67mli9l4nncc4l6hdbf9ma91jvlj590sljp"))))
4982 `(("antlr3" ,antlr3-3.3)
4984 ("java-stringtemplate" ,java-stringtemplate-3)))))
4986 (define-public antlr3
4992 (uri (string-append "https://github.com/antlr/antlr3/archive/"
4994 (file-name (string-append name "-" version ".tar.gz"))
4997 "0218v683081lg54z9hvjxinhxd4dqp870jx6n39gslm0bkyi4vd6"))))
4998 (build-system ant-build-system)
5000 `(#:jar-name (string-append ,name "-" ,version ".jar")
5001 #:source-dir "tool/src/main/java:runtime/Java/src/main/java:tool/src/main/antlr3"
5004 (modify-phases %standard-phases
5005 (add-after 'install 'bin-install
5006 (lambda* (#:key inputs outputs #:allow-other-keys)
5007 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
5008 (bin (string-append (assoc-ref outputs "out") "/bin")))
5010 (with-output-to-file (string-append bin "/antlr3")
5013 (string-append "#!" (which "sh") "\n"
5014 "java -cp " jar "/" ,name "-" ,version ".jar:"
5016 (find-files (assoc-ref inputs "stringtemplate")
5020 (find-files (assoc-ref inputs "stringtemplate4")
5024 (find-files (string-append
5025 (assoc-ref inputs "antlr")
5028 " org.antlr.Tool $*"))))
5029 (chmod (string-append bin "/antlr3") #o755))))
5030 (add-before 'build 'generate-grammar
5032 (chdir "tool/src/main/antlr3/org/antlr/grammar/v3/")
5033 (for-each (lambda (file)
5036 (system* "antlr3" file))
5037 '("ANTLR.g" "ANTLRTreePrinter.g" "ActionAnalysis.g"
5038 "AssignTokenTypesWalker.g"
5039 "ActionTranslator.g" "TreeToNFAConverter.g"
5040 "ANTLRv3.g" "ANTLRv3Tree.g" "LeftRecursiveRuleWalker.g"
5041 "CodeGenTreeWalker.g" "DefineGrammarItemsWalker.g"))
5042 (substitute* "ANTLRParser.java"
5043 (("public Object getTree") "public GrammarAST getTree"))
5044 (substitute* "ANTLRv3Parser.java"
5045 (("public Object getTree") "public CommonTree getTree"))
5046 (chdir "../../../../../java")
5047 (system* "antlr" "-o" "org/antlr/tool"
5048 "org/antlr/tool/serialize.g")
5049 (substitute* "org/antlr/tool/LeftRecursiveRuleAnalyzer.java"
5050 (("import org.antlr.grammar.v3.\\*;") "import org.antlr.grammar.v3.*;
5051 import org.antlr.grammar.v3.ANTLRTreePrinter;"))
5052 (substitute* "org/antlr/tool/ErrorManager.java"
5053 (("case NO_SUCH_ATTRIBUTE_PASS_THROUGH:") ""))
5054 (chdir "../../../..")))
5055 (add-before 'build 'fix-build-xml
5057 (substitute* "build.xml"
5058 (("<exec") "<copy todir=\"${classes.dir}\">
5059 <fileset dir=\"tool/src/main/resources\">
5060 <include name=\"**/*.stg\"/>
5061 <include name=\"**/*.st\"/>
5062 <include name=\"**/*.sti\"/>
5063 <include name=\"**/STLexer.tokens\"/>
5065 </copy><exec")))))))
5068 ("antlr3" ,antlr3-bootstrap)))
5070 `(("junit" ,java-junit)
5071 ("stringtemplate" ,java-stringtemplate-3)
5072 ("stringtemplate4" ,java-stringtemplate)))
5074 `(("stringtemplate" ,java-stringtemplate-3)
5076 ("stringtemplate4" ,java-stringtemplate-4.0.6)))
5077 (home-page "http://www.antlr3.org")
5078 (synopsis "Framework for constructing recognizers, compilers, and translators")
5079 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
5080 is a language tool that provides a framework for constructing recognizers,
5081 compilers, and translators from grammatical descriptions containing Java, C#,
5082 C++, or Python actions. ANTLR provides excellent support for tree construction,
5083 tree walking, and translation.")
5084 (license license:bsd-3)))
5086 (define antlr3-bootstrap
5089 (name "antlr3-bootstrap")
5092 ("antlr3" ,antlr3-3.3)))
5094 `(("junit" ,java-junit)))))
5103 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
5104 "gh-pages/download/antlr-"
5108 "0qgg5vgsm4l1d6dj9pfbaa25dpv2ry2gny8ajy4vvgvfklw97b3m"))))
5110 `(#:jar-name (string-append ,name "-" ,version ".jar")
5111 #:source-dir (string-join '("tool/src/main/java"
5112 "runtime/Java/src/main/java"
5113 "tool/src/main/antlr2"
5114 "tool/src/main/antlr3")
5116 #:tests? #f ; FIXME: tests seem to require maven plugin
5117 #:modules ((guix build ant-build-system)
5121 (modify-phases %standard-phases
5122 (add-after 'install 'bin-install
5123 (lambda* (#:key inputs outputs #:allow-other-keys)
5124 (let* ((out (assoc-ref outputs "out"))
5125 (jar (string-append out "/share/java"))
5126 (bin (string-append out "/bin")))
5128 (with-output-to-file (string-append bin "/antlr3")
5132 "#!" (which "sh") "\n"
5133 "java -cp " jar "/antlr3-3.3.jar:"
5135 (append (find-files (assoc-ref inputs "java-stringtemplate")
5137 (find-files (string-append (assoc-ref inputs "antlr")
5141 " org.antlr.Tool $*"))))
5142 (chmod (string-append bin "/antlr3") #o755)
5144 (add-before 'build 'generate-grammar
5146 (substitute* "tool/src/main/java/org/antlr/tool/Grammar.java"
5147 (("import org.antlr.grammar.v2.\\*;")
5148 "import org.antlr.grammar.v2.*;\n
5149 import org.antlr.grammar.v2.TreeToNFAConverter;\n
5150 import org.antlr.grammar.v2.DefineGrammarItemsWalker;\n
5151 import org.antlr.grammar.v2.ANTLRTreePrinter;"))
5153 (with-directory-excursion "tool/src/main/antlr2/org/antlr/grammar/v2/"
5154 (every (lambda (file)
5155 (format #t "~a\n" file)
5156 (zero? (system* "antlr" file)))
5157 '("antlr.g" "antlr.print.g" "assign.types.g"
5158 "buildnfa.g" "codegen.g" "define.g")))
5159 (with-directory-excursion "tool/src/main/antlr3/org/antlr/grammar/v3/"
5160 (every (lambda (file)
5161 (format #t "~a\n" file)
5162 (zero? (system* "antlr3" file)))
5163 '("ActionAnalysis.g" "ActionTranslator.g" "ANTLRv3.g"
5164 "ANTLRv3Tree.g"))))))
5165 (add-before 'build 'fix-build-xml
5167 (substitute* "build.xml"
5168 (("<exec") "<copy todir=\"${classes.dir}\">
5169 <fileset dir=\"tool/src/main/resources\">
5170 <include name=\"**/*.stg\"/>
5171 <include name=\"**/*.st\"/>
5172 <include name=\"**/*.sti\"/>
5173 <include name=\"**/STLexer.tokens\"/>
5179 ("antlr3" ,antlr3-3.1)))
5181 `(("junit" ,java-junit)))
5183 `(("java-stringtemplate" ,java-stringtemplate-3)
5185 ("antlr3" ,antlr3-3.1)))))
5194 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
5195 "gh-pages/download/antlr-"
5199 "0sfimc9cpbgrihz4giyygc8afgpma2c93yqpwb951giriri6x66z"))))
5201 `(#:jar-name (string-append ,name "-" ,version ".jar")
5202 #:source-dir "src:runtime/Java/src"
5205 (modify-phases %standard-phases
5206 (add-after 'install 'bin-install
5207 (lambda* (#:key inputs outputs #:allow-other-keys)
5208 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
5209 (bin (string-append (assoc-ref outputs "out") "/bin")))
5211 (with-output-to-file (string-append bin "/antlr3")
5214 (string-append "#!" (which "sh") "\n"
5215 "java -cp " jar "/antlr3-3.1-3.1.jar:"
5217 (find-files (assoc-ref inputs "stringtemplate")
5221 (find-files (string-append
5222 (assoc-ref inputs "antlr")
5225 " org.antlr.Tool $*"))))
5226 (chmod (string-append bin "/antlr3") #o755))))
5227 (add-before 'build 'generate-grammar
5229 (let ((dir "src/org/antlr/tool/"))
5230 (for-each (lambda (file)
5233 (system* "antlr" "-o" dir (string-append dir file)))
5234 '("antlr.g" "antlr.print.g" "assign.types.g"
5235 "buildnfa.g" "define.g")))
5236 (format #t "codegen.g\n")
5237 (system* "antlr" "-o" "src/org/antlr/codegen"
5238 "src/org/antlr/codegen/codegen.g")))
5239 (add-before 'build 'fix-build-xml
5241 (substitute* "build.xml"
5242 (("<exec") "<copy todir=\"${classes.dir}\">
5243 <fileset dir=\"src\">
5244 <include name=\"**/*.stg\"/>
5245 <include name=\"**/*.st\"/>
5246 <include name=\"**/*.sti\"/>
5247 <include name=\"**/STLexer.tokens\"/>
5249 </copy><exec")))))))
5251 `(("antlr" ,antlr2)))
5253 `(("junit" ,java-junit)))
5255 `(("stringtemplate" ,java-stringtemplate-3)))))
5257 (define-public java-commons-cli-1.2
5258 ;; This is a bootstrap dependency for Maven2.
5260 (inherit java-commons-cli)
5264 (uri (string-append "mirror://apache/commons/cli/source/"
5265 "commons-cli-" version "-src.tar.gz"))
5268 "0rvfgzgv2pc1m091dfj3ih9ddsjjppr1f1wf0qmc3bk6b1kwv2dm"))))
5270 `(#:jar-name "commons-cli.jar"
5272 (modify-phases %standard-phases
5273 (add-before 'check 'fix-build-xml
5274 (lambda* (#:key inputs #:allow-other-keys)
5275 (substitute* "build.xml"
5276 (("dir=\"\\$\\{test.home\\}/java\"")
5277 "dir=\"${test.home}\""))
5280 `(("java-junit" ,java-junit)))))
5282 (define-public java-microemulator-cldc
5284 (name "java-microemulator-cldc")
5288 (uri (string-append "https://github.com/barteo/microemu/archive/"
5290 (string-map (lambda (c) (if (char=? c #\.) #\_ c))
5293 (file-name (string-append name "-" version ".tar.gz"))
5296 "1x1apmz38gkppxnwnygwmi12j54v4p258v8ddzn6dldkk7vak1ll"))))
5297 (build-system ant-build-system)
5299 `(#:jar-name "microemulator-cldc.jar"
5300 #:source-dir "microemu-cldc/src/main/java"
5301 #:tests? #f)); Requires even older software
5302 (home-page "https://github.com/barteo/microemu")
5303 (synopsis "J2ME CLDC emulator")
5304 (description "Microemulator is a Java 2 Micro Edition (J2ME) CLDC/MIDP
5305 Emulator. It allows to demonstrate MIDlet based applications in web browser
5306 applet and can be run as a standalone java application.")
5307 (license (list license:asl2.0
5309 license:lgpl2.1+))))
5311 (define-public java-datanucleus-javax-persistence
5313 (name "java-datanucleus-javax-persistence")
5317 (uri (string-append "https://github.com/datanucleus/"
5318 "javax.persistence/archive/javax.persistence-"
5319 version "-release.tar.gz"))
5322 "11jx0fjwgc2hhbqqgdd6m1pf2fplf9vslppygax0y1z5csnqjhpx"))))
5323 (build-system ant-build-system)
5325 `(#:jar-name "java-datanucleus-javax-persistence.jar"
5327 #:source-dir "src/main/java"
5328 #:tests? #f)); no tests
5329 (home-page "https://github.com/datanucleus/javax.persistence")
5330 (synopsis "JPA API")
5331 (description "This package contains a clean definition of JPA API intended
5332 for use with DataNucleus JPA since the JCP haven't provided an official JPA API
5333 jar. See @url{http://java.net/projects/jpa-spec/downloads} for the specification
5334 used to generate this API.")
5335 (license (list license:edl1.0 license:epl1.0))))
5337 (define-public java-osgi-cmpn
5339 (name "java-osgi-cmpn")
5343 (uri (string-append "http://central.maven.org/maven2/"
5344 "org/osgi/osgi.cmpn/" version "/osgi.cmpn-"
5345 version "-sources.jar"))
5348 "1lmb6xyrmkqdhv1kayf0514rlwq6ypvs4m44ibrck3snp8241wys"))))
5349 (build-system ant-build-system)
5351 `(#:jar-name "osgi-cmpn.jar"
5352 #:tests? #f)); no tests
5354 `(("annotation" ,java-osgi-annotation)
5355 ("core" ,java-osgi-core)
5356 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
5357 ("microemulator" ,java-microemulator-cldc)
5358 ("servlet" ,java-classpathx-servletapi)))
5359 (home-page "https://www.osgi.org")
5360 (synopsis "Compendium specification module of OSGi framework")
5362 "OSGi, for Open Services Gateway initiative framework, is a module system
5363 and service platform for the Java programming language. This package contains
5364 the compendium specification module, providing interfaces and classes for use
5365 in compiling bundles.")
5366 (license license:asl2.0)))
5368 (define-public java-osgi-service-component-annotations
5370 (name "java-osgi-service-component-annotations")
5374 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
5375 "org.osgi.service.component.annotations/"
5376 version "/org.osgi.service.component.annotations-"
5377 version "-sources.jar"))
5380 "15rq9cmp4fpn74q44m4j35qsqmjf5lx3hcrk6pzvbhc08igic2f0"))))
5381 (build-system ant-build-system)
5383 `(#:jar-name "osgi-service-component-annotations.jar"
5384 #:tests? #f)); no tests
5386 `(("annotation" ,java-osgi-annotation)))
5387 (home-page "https://www.osgi.org")
5388 (synopsis "Support annotations for osgi-service-component")
5390 "OSGi, for Open Services Gateway initiative framework, is a module system
5391 and service platform for the Java programming language. This package contains
5392 the support annotations for osgi-service-component.")
5393 (license license:asl2.0)))
5395 (define-public java-osgi-dto
5397 (name "java-osgi-dto")
5401 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
5402 "org.osgi.dto/" version "/org.osgi.dto-"
5403 version "-sources.jar"))
5406 "0f4bqjzadn0hwk6sd3h5gvbyfp3yci1s6r0v770cc15p0pg627yr"))))
5407 (build-system ant-build-system)
5409 `(#:jar-name "osgi-dto.jar"
5410 #:tests? #f)); no tests
5412 `(("annotation" ,java-osgi-annotation)))
5413 (home-page "https://www.osgi.org")
5414 (synopsis "Data Transfer Objects")
5416 "OSGi, for Open Services Gateway initiative framework, is a module system
5417 and service platform for the Java programming language. This package contains
5418 the Data Transfer Objects. It is easily serializable having only public fields
5419 of primitive types and their wrapper classes, Strings, and DTOs. List, Set,
5420 Map and array aggregates may also be used. The aggregates must only hold
5421 objects of the listed types or aggregates.")
5422 (license license:asl2.0)))
5424 (define-public java-osgi-resource
5426 (name "java-osgi-resource")
5430 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
5431 "org.osgi.resource/"
5432 version "/org.osgi.resource-"
5433 version "-sources.jar"))
5436 "0hi0fsc5v99q22bd7lrkvpz1y0ds4w9arjldpwsrcpqvz2js7q2d"))))
5437 (build-system ant-build-system)
5439 `(#:jar-name "osgi-resource.jar"
5440 #:tests? #f)); no tests
5442 `(("annotation" ,java-osgi-annotation)
5443 ("dto" ,java-osgi-dto)))
5444 (home-page "https://www.osgi.org")
5445 (synopsis "OSGI Resource")
5447 "OSGi, for Open Services Gateway initiative framework, is a module system
5448 and service platform for the Java programming language. This package contains
5449 the definition of common types in osgi packages.")
5450 (license license:asl2.0)))
5452 (define-public java-osgi-namespace-contract
5454 (name "java-osgi-namespace-contract")
5458 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
5459 "org.osgi.namespace.contract/"
5460 version "/org.osgi.namespace.contract-"
5461 version "-sources.jar"))
5464 "1iz4f2i0fvqrlq90ki9nfzcfpvy2av434ri25bglywqssx8mmp36"))))
5465 (build-system ant-build-system)
5467 `(("resource" ,java-osgi-resource)
5468 ("annotation" ,java-osgi-annotation)))
5470 `(#:jar-name "osgi-namespace-contract.jar"
5471 #:tests? #f)); no tests
5472 (home-page "https://www.osgi.org")
5473 (synopsis "Contract Capability and Requirement Namespace")
5475 "OSGi, for Open Services Gateway initiative framework, is a module system
5476 and service platform for the Java programming language. This package contains
5477 the names for the attributes and directives for a namespace with contracts.")
5478 (license license:asl2.0)))
5480 (define-public java-osgi-namespace-extender
5482 (name "java-osgi-namespace-extender")
5486 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
5487 "org.osgi.namespace.extender/"
5488 version "/org.osgi.namespace.extender-"
5489 version "-sources.jar"))
5492 "0jgqiak2i05qv6j3gd33xlaifzzc0ylxxk376v2x0apfg3vvixmz"))))
5493 (build-system ant-build-system)
5495 `(("resource" ,java-osgi-resource)
5496 ("annotation" ,java-osgi-annotation)))
5498 `(#:jar-name "osgi-namespace-extendent.jar"
5499 #:tests? #f)); no tests
5500 (home-page "https://www.osgi.org")
5501 (synopsis "Extender Capability and Requirement Namespace")
5503 "OSGi, for Open Services Gateway initiative framework, is a module system
5504 and service platform for the Java programming language. This package contains
5505 the names for the attributes and directives for an extender namespace.")
5506 (license license:asl2.0)))
5508 (define-public java-osgi-namespace-service
5510 (name "java-osgi-namespace-service")
5514 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
5515 "org.osgi.namespace.service/"
5516 version "/org.osgi.namespace.service-"
5517 version "-sources.jar"))
5520 "0qmw8n2449nkmm56d1znz9zhazb6ya3vsimd5bf5jg23zzhgl8c8"))))
5521 (build-system ant-build-system)
5523 `(("resource" ,java-osgi-resource)
5524 ("annotation" ,java-osgi-annotation)))
5526 `(#:jar-name "osgi-namespace-service.jar"
5527 #:tests? #f)); no tests
5528 (home-page "https://www.osgi.org")
5529 (synopsis "Service Capability and Requirement Namespace")
5531 "OSGi, for Open Services Gateway initiative framework, is a module system
5532 and service platform for the Java programming language. This package contains
5533 the names for the attributes and directives for a service namespace.")
5534 (license license:asl2.0)))
5536 (define-public java-osgi-util-function
5538 (name "java-osgi-util-function")
5542 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
5543 "org.osgi.util.function/"
5544 version "/org.osgi.util.function-"
5545 version "-sources.jar"))
5548 "04l7j3hwmmj28w23m7paca0afzncs42j2mdr3liqq8kvp548sc6x"))))
5549 (build-system ant-build-system)
5551 `(#:jar-name "osgi-util-function.jar"
5552 #:tests? #f)); no tests
5554 `(("annotation" ,java-osgi-annotation)))
5555 (home-page "https://www.osgi.org")
5556 (synopsis "OSGI Util Function")
5558 "OSGi, for Open Services Gateway initiative framework, is a module system
5559 and service platform for the Java programming language. This package contains
5560 an interface for a function that accepts a single argument and produces a result.")
5561 (license license:asl2.0)))
5563 (define-public java-osgi-util-promise
5565 (name "java-osgi-util-promise")
5569 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
5570 "org.osgi.util.promise/"
5571 version "/org.osgi.util.promise-"
5572 version "-sources.jar"))
5575 "0y34dwiflg1c4ahvkswpf9z02xph2sr9fm04ia5493x3lshpw22c"))))
5576 (build-system ant-build-system)
5578 `(#:jar-name "osgi-util-promise.jar"
5579 #:tests? #f)); no tests
5581 `(("annotation" ,java-osgi-annotation)
5582 ("function" ,java-osgi-util-function)))
5583 (home-page "https://www.osgi.org")
5584 (synopsis "Promise of a value")
5586 "OSGi, for Open Services Gateway initiative framework, is a module system
5587 and service platform for the Java programming language. This package contains
5588 an interface and utilitary classes for promises. A Promise represents a future
5589 value. It handles the interactions for asynchronous processing.")
5590 (license license:asl2.0)))
5592 (define-public java-osgi-service-metatype-annotations
5594 (name "java-osgi-service-metatype-annotations")
5598 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
5599 "org.osgi.service.metatype.annotations/"
5600 version "/org.osgi.service.metatype.annotations-"
5601 version "-sources.jar"))
5604 "12rwm3349wk80vm88rcdgs4435m4jxkpkj5mrx326skkz2c6hyw6"))))
5605 (build-system ant-build-system)
5607 `(#:jar-name "osgi-service-metatype-annotations.jar"
5608 #:tests? #f)); no tests
5610 `(("annotation" ,java-osgi-annotation)))
5611 (home-page "https://www.osgi.org")
5612 (synopsis "Support annotations for metatype")
5614 "OSGi, for Open Services Gateway initiative framework, is a module system
5615 and service platform for the Java programming language. This package contains
5616 the support annotations for metatype.")
5617 (license license:asl2.0)))
5619 (define-public java-osgi-service-repository
5621 (name "java-osgi-service-repository")
5625 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
5626 "org.osgi.service.repository/"
5627 version "/org.osgi.service.repository-"
5628 version "-sources.jar"))
5631 "1k41mhg7b58pd8nsghr2qwcjrxdnf1p9spsw9v11k4257g6rl06n"))))
5632 (build-system ant-build-system)
5634 `(#:jar-name "osgi-service-repository.jar"
5635 #:tests? #f)); no tests
5637 `(("annotation" ,java-osgi-annotation)
5638 ("promise" ,java-osgi-util-promise)
5639 ("resource" ,java-osgi-resource)))
5640 (home-page "https://www.osgi.org")
5641 (synopsis "OSGI service repository")
5643 "OSGi, for Open Services Gateway initiative framework, is a module system
5644 and service platform for the Java programming language. This package contains
5645 a repository service that contains resources.")
5646 (license license:asl2.0)))
5648 (define-public java-osgi-framework
5650 (name "java-osgi-framework")
5654 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
5655 "org.osgi.framework/" version "/org.osgi.framework-"
5656 version "-sources.jar"))
5659 "1lwp2zfad3rybcc6q9bwz8xsgkc92ypzy5p6x54387f1qj65m73s"))))
5660 (build-system ant-build-system)
5662 `(#:jar-name "osgi-framework.jar"
5663 #:tests? #f)); no tests
5665 `(("annotation" ,java-osgi-annotation)
5666 ("resource" ,java-osgi-resource)
5667 ("dto" ,java-osgi-dto)))
5668 (home-page "https://www.osgi.org")
5669 (synopsis "OSGi framework")
5671 "OSGi, for Open Services Gateway initiative framework, is a module system
5672 and service platform for the Java programming language.")
5673 (license license:asl2.0)))
5675 (define-public java-osgi-service-log
5677 (name "java-osgi-service-log")
5681 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
5682 "org.osgi.service.log/"
5683 version "/org.osgi.service.log-"
5684 version "-sources.jar"))
5687 "1029j30dzcwializzca0j3fkhwwz08kmmsha5agw1iccscimj6r0"))))
5688 (build-system ant-build-system)
5690 `(#:jar-name "osgi-service-log.jar"
5691 #:tests? #f)); no tests
5693 `(("java-osgi-framework" ,java-osgi-framework)))
5694 (home-page "https://www.osgi.org")
5695 (synopsis "Provides methods for bundles to write messages to the log")
5697 "OSGi, for Open Services Gateway initiative framework, is a module system
5698 and service platform for the Java programming language. This package contains
5700 (license license:asl2.0)))
5702 (define-public java-osgi-service-jdbc
5704 (name "java-osgi-service-jdbc")
5708 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
5709 "org.osgi.service.jdbc/"
5710 version "/org.osgi.service.jdbc-"
5711 version "-sources.jar"))
5714 "11iln5v7bk469cgb9ddkrz9sa95b3733gqgaqw9xf5g6wq652yjz"))))
5715 (build-system ant-build-system)
5717 `(#:jar-name "osgi-service-jdbc.jar"
5718 #:tests? #f)); no tests
5719 (home-page "https://www.osgi.org")
5720 (synopsis "Factory for JDBC connection factories")
5722 "OSGi, for Open Services Gateway initiative framework, is a module system
5723 and service platform for the Java programming language. This package contains
5724 a factory for JDBC connection factories. There are 3 preferred connection
5725 factories for getting JDBC connections:
5728 @item @code{javax.sql.DataSource};
5729 @item @code{javax.sql.ConnectionPoolDataSource};
5730 @item @code{javax.sql.XADataSource}.
5732 (license license:asl2.0)))
5734 (define-public java-osgi-service-resolver
5736 (name "java-osgi-service-resolver")
5740 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
5741 "org.osgi.service.resolver/"
5742 version "/org.osgi.service.resolver-"
5743 version "-sources.jar"))
5746 "1dzqn1ryfi2rq4zwsgp44bmj2wlfydjg1qbxw2b0z4xdjjy55vxd"))))
5747 (build-system ant-build-system)
5749 `(#:jar-name "osgi-service-resolver.jar"
5750 #:tests? #f)); no tests
5752 `(("annotation" ,java-osgi-annotation)
5753 ("resource" ,java-osgi-resource)))
5754 (home-page "https://www.osgi.org")
5755 (synopsis "OSGI Resolver service")
5757 "OSGi, for Open Services Gateway initiative framework, is a module system
5758 and service platform for the Java programming language. This package contains
5759 a resolver service that resolves the specified resources in the context supplied
5761 (license license:asl2.0)))
5763 (define-public java-osgi-util-tracker
5765 (name "java-osgi-util-tracker")
5769 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
5770 "org.osgi.util.tracker/"
5771 version "/org.osgi.util.tracker-"
5772 version "-sources.jar"))
5775 "0c4fh9vxwzsx59r8dygda0gq2gx3z5vfhc3jsphlqwf5w0h403lz"))))
5776 (build-system ant-build-system)
5778 `(#:jar-name "osgi-util-tracker.jar"
5779 #:tests? #f)); no tests
5781 `(("framework" ,java-osgi-framework)
5782 ("annotation" ,java-osgi-annotation)))
5783 (home-page "https://www.osgi.org")
5784 (synopsis "Bundle tracking")
5786 "OSGi, for Open Services Gateway initiative framework, is a module system
5787 and service platform for the Java programming language. This package contains
5788 bundle tracking utility classes.")
5789 (license license:asl2.0)))
5791 (define-public java-osgi-service-cm
5793 (name "java-osgi-service-cm")
5797 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
5798 "org.osgi.service.cm/"
5799 version "/org.osgi.service.cm-"
5800 version "-sources.jar"))
5803 "1z8kap48y3xi0ggj8v6czglfnpnd94mmismgi2wbqhj1nl5fzbp6"))))
5804 (build-system ant-build-system)
5806 `(#:jar-name "osgi-service-cm.jar"
5807 #:tests? #f)); no tests
5809 `(("framework" ,java-osgi-framework)
5810 ("annotation" ,java-osgi-annotation)))
5811 (home-page "https://www.osgi.org")
5812 (synopsis "OSGI Configuration Management")
5814 "OSGi, for Open Services Gateway initiative framework, is a module system
5815 and service platform for the Java programming language. This package contains
5816 utility classes for the configuration of services.")
5817 (license license:asl2.0)))
5819 (define-public java-osgi-service-packageadmin
5821 (name "java-osgi-service-packageadmin")
5825 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
5826 "org.osgi.service.packageadmin/"
5827 version "/org.osgi.service.packageadmin-"
5828 version "-sources.jar"))
5831 "041mpxzi7g36wmcily6y4ccn3jx15akpdy8gmhyb7m98x7qfvn52"))))
5832 (build-system ant-build-system)
5834 `(#:jar-name "osgi-service-packageadmin.jar"
5835 #:tests? #f)); no tests
5837 `(("framework" ,java-osgi-framework)))
5838 (home-page "https://www.osgi.org")
5839 (synopsis "OSGI Package Administration")
5841 "OSGi, for Open Services Gateway initiative framework, is a module system
5842 and service platform for the Java programming language. This package contains
5843 the packageadmin service.")
5844 (license license:asl2.0)))
5846 (define-public java-ops4j-base-lang
5848 (name "java-ops4j-base-lang")
5852 (uri (string-append "https://github.com/ops4j/org.ops4j.base/"
5853 "archive/base-" version ".tar.gz"))
5856 "18hl3lpchgpv8yh5rlk39l2gif5dlfgb8gxjmncf39pr2dprkniw"))))
5857 (build-system ant-build-system)
5859 `(#:jar-name "java-ops4j-base-lang.jar"
5860 #:source-dir "ops4j-base-lang/src/main/java"
5861 #:tests? #f; no tests
5863 (modify-phases %standard-phases
5864 (add-before 'build 'add-test-file
5866 ;; That file is required by a test in ops4j-pax-exam-core-spi
5867 (mkdir-p "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang")
5868 (with-output-to-file "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang/pom.properties"
5872 "version=" ,version "\n"
5873 "groupId=org.ops4j.base"
5874 "artifactId=ops4j-base-lang\n")))))))))
5875 (home-page "https://ops4j1.jira.com/wiki/spaces/base/overview")
5876 (synopsis "Utility classes and extensions to be used in OPS4J projects")
5877 (description "OPS4J stands for Open Participation Software for Java. This
5878 package contains utilities and extensions related to @code{java.lang}.")
5879 (license license:asl2.0)))
5881 (define-public java-ops4j-base-monitors
5883 (inherit java-ops4j-base-lang)
5884 (name "java-ops4j-base-monitors")
5886 `(#:jar-name "java-ops4j-base-monitors.jar"
5887 #:source-dir "ops4j-base-monitors/src/main/java"
5888 #:tests? #f)); no tests
5890 `(("lang" ,java-ops4j-base-lang)))
5891 (description "OPS4J stands for Open Participation Software for Java. This
5892 package contains utilities and extensions related to monitoring.")))
5894 (define-public java-ops4j-base-io
5896 (inherit java-ops4j-base-lang)
5897 (name "java-ops4j-base-io")
5899 `(#:jar-name "java-ops4j-base-io.jar"
5900 #:source-dir "ops4j-base-io/src/main/java"
5901 #:test-dir "ops4j-base-io/src/test"
5903 (list "**/ListerTest.java")))
5905 `(("lang" ,java-ops4j-base-monitors)
5906 ("lang" ,java-ops4j-base-lang)))
5908 `(("junit" ,java-junit)
5909 ("hamcrest" ,java-hamcrest-core)))
5910 (description "OPS4J stands for Open Participation Software for Java. This
5911 package contains utilities and extensions related to handling streams and files.")))
5913 (define-public java-ops4j-base-util
5915 (inherit java-ops4j-base-lang)
5916 (name "java-ops4j-base-util")
5918 `(#:jar-name "java-ops4j-base-util.jar"
5919 #:source-dir "ops4j-base-util/src/main/java"
5920 #:test-dir "ops4j-base-util/src/test"))
5922 `(("lang" ,java-ops4j-base-lang)))
5924 `(("junit" ,java-junit)))
5925 (description "OPS4J stands for Open Participation Software for Java. This
5926 package contains utilities and extensions related to environment, i18n and
5929 (define-public java-ops4j-base-util-property
5931 (inherit java-ops4j-base-lang)
5932 (name "java-ops4j-base-util-property")
5934 `(#:jar-name "java-ops4j-base-util-property.jar"
5935 #:source-dir "ops4j-base-util-property/src/main/java"
5936 #:tests? #f)); no tests
5938 `(("lang" ,java-ops4j-base-lang)
5939 ("util" ,java-ops4j-base-util)))
5940 (description "OPS4J stands for Open Participation Software for Java. This
5941 package contains utilities and extensions related to resolving properties from
5942 different sources.")))
5944 (define-public java-ops4j-base-store
5946 (inherit java-ops4j-base-lang)
5947 (name "java-ops4j-base-store")
5949 `(#:jar-name "java-ops4j-base-store.jar"
5950 #:source-dir "ops4j-base-store/src/main/java"
5951 #:tests? #f)); no tests
5953 `(("lang" ,java-ops4j-base-lang)
5954 ("slf4j" ,java-slf4j-api)
5955 ("io" ,java-ops4j-base-io)))
5956 (description "OPS4J stands for Open Participation Software for Java. This
5957 package contains utilities for storing and retrieving data from an
5958 @code{InputStream}.")))
5960 (define-public java-ops4j-base-spi
5962 (inherit java-ops4j-base-lang)
5963 (name "java-ops4j-base-spi")
5965 `(#:jar-name "java-ops4j-base-spi.jar"
5966 #:source-dir "ops4j-base-spi/src/main/java"
5967 #:test-dir "ops4j-base-spi/src/test"))
5969 `(("junit" ,java-junit)
5970 ("hamcrest" ,java-hamcrest-core)))
5971 (description "OPS4J stands for Open Participation Software for Java. This
5972 package contains utilities for obtaining services via the Java SE 6
5973 @code{ServiceLoader}.")))
5975 (define-public java-aqute-bnd-annotation
5977 (name "java-aqute-bnd-annotation")
5981 (uri (string-append "https://github.com/bndtools/bnd/archive/"
5982 version ".REL.tar.gz"))
5983 (file-name (string-append name "-" version ".tar.gz"))
5986 "09vgb6axikbz66zi9falijbnzh1qnp9ysfns123dmzdb01cbza9q"))))
5987 (build-system ant-build-system)
5989 `(#:jar-name "java-aqute-bnd-annotation.jar"
5990 #:source-dir "biz.aQute.bnd.annotation/src"
5991 #:tests? #f)); empty test dir
5992 (home-page "http://bnd.bndtools.org/")
5993 (synopsis "Tools for OSGi")
5994 (description "Bnd is a swiss army knife for OSGi, it creates manifest
5995 headers based on analyzing the class code, it verifies the project settings,
5996 it manages project dependencies, gives diffs jars, and much more.")
5997 (license license:asl2.0)))
5999 (define-public java-aqute-libg
6001 (inherit java-aqute-bnd-annotation)
6002 (name "java-aqute-libg")
6004 `(#:jar-name "java-aqute-libg.jar"
6005 #:source-dir "aQute.libg/src"
6006 #:tests? #f)); FIXME: tests are in "aQute.libg/test", not in a java directory
6008 `(("slf4j" ,java-slf4j-api)
6009 ("osgi-annot" ,java-osgi-annotation)
6010 ("java-osgi-cmpn" ,java-osgi-cmpn)
6011 ("osgi" ,java-osgi-core)))))
6013 (define-public java-aqute-bndlib
6015 (inherit java-aqute-bnd-annotation)
6016 (name "java-aqute-bndlib")
6018 `(#:jar-name "java-bndlib.jar"
6019 #:source-dir "biz.aQute.bndlib/src"
6020 #:tests? #f)); no tests
6022 `(("slf4j" ,java-slf4j-api)
6023 ("osgi-annot" ,java-osgi-annotation)
6024 ("java-aqute-libg" ,java-aqute-libg)
6025 ("java-aqute-bnd-annotation" ,java-aqute-bnd-annotation)
6026 ("java-osgi-service-component-annotations" ,java-osgi-service-component-annotations)
6027 ("java-osgi-service-repository" ,java-osgi-service-repository)
6028 ("java-osgi-service-log" ,java-osgi-service-log)
6029 ("java-osgi-service-metatype-annotations" ,java-osgi-service-metatype-annotations)
6030 ("java-osgi-namespace-contract" ,java-osgi-namespace-contract)
6031 ("java-osgi-namespace-extender" ,java-osgi-namespace-extender)
6032 ("java-osgi-namespace-service" ,java-osgi-namespace-service)
6033 ("promise" ,java-osgi-util-promise)
6034 ("osgi" ,java-osgi-core)))))
6036 (define-public java-ops4j-pax-tinybundles
6038 (name "java-ops4j-pax-tinybundles")
6042 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.tinybundles/"
6043 "archive/tinybundles-" version ".tar.gz"))
6046 "0y0gq3pvv0iir2b885lmlwnvr724vv7vklzhhr4fs27d7mdkj871"))))
6048 `(#:jar-name "java-ops4j-pax-tinybundles.jar"
6049 #:source-dir "src/main/java"
6051 ;; Abstract base classes for other tests
6052 (list "**/BndTest.java" "**/CoreTest.java")
6054 (modify-phases %standard-phases
6055 (add-before 'check 'fix-version
6057 ;; This test has a reference to an old version of bndlib we are not
6058 ;; packaging. It uses the version referenced in pom.xml. We replace
6059 ;; it with our own version.
6060 (substitute* "src/test/java/org/ops4j/pax/tinybundles/bnd/BndTest.java"
6061 (("2.4.0.201411031534") "3.4.0")))))))
6063 `(("lang" ,java-ops4j-base-lang)
6064 ("io" ,java-ops4j-base-io)
6065 ("store" ,java-ops4j-base-store)
6066 ("slf4j" ,java-slf4j-api)
6067 ("libg" ,java-aqute-libg)
6068 ("bndlib" ,java-aqute-bndlib)))
6070 `(("junit" ,java-junit)
6071 ("hamcrest" ,java-hamcrest-core)
6072 ("log4j" ,java-log4j-api)
6073 ("bndannotation" ,java-aqute-bnd-annotation)
6074 ("framework" ,java-osgi-framework)))
6075 (build-system ant-build-system)
6076 (home-page "https://ops4j1.jira.com/wiki/spaces/ops4j/pages/12060312/Tinybundles")
6077 (synopsis "Java APIs to create OSGi related artifacts")
6078 (description "Tinybundles is all about creating OSGi related artifacts like
6079 Bundles, Fragments and Deployment Packages with Java Api. It is very convinient
6080 to create such artifacts on-the-fly inside Tests (like in Pax Exam). On the
6081 other hand, this library can be a foundation of real end user tools that need
6082 to create those artifacts.")
6083 (license license:asl2.0)))
6085 (define-public java-ops4j-pax-exam-core
6087 (name "java-ops4j-pax-exam-core")
6091 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.exam2/"
6092 "archive/exam-reactor-" version ".tar.gz"))
6095 "08mzw8nkah3rj3vznlplnawspxhp61zgvb44ifqa1rni1cvbms2g"))))
6097 `(#:jar-name "java-ops4j-pax-exam-core.jar"
6098 #:source-dir "core/pax-exam/src/main/java"
6099 #:test-dir "core/pax-exam/src/test"))
6101 `(("slf4j" ,java-slf4j-api)
6102 ("lang" ,java-ops4j-base-lang)
6103 ("io" ,java-ops4j-base-io)
6104 ("util-property" ,java-ops4j-base-util-property)
6105 ("util-store" ,java-ops4j-base-store)
6106 ("java-osgi-core" ,java-osgi-core)))
6108 `(("junit" ,java-junit)
6109 ("hamcrest" ,java-hamcrest-core)))
6110 (build-system ant-build-system)
6111 (home-page "https://ops4j1.jira.com/wiki/spaces/PAXEXAM4/overview")
6112 (synopsis "In-Container Testing for OSGi, Java EE and CDI")
6113 (description "Pax Exam creates OSGi bundles for testing purposes. It lets
6114 the user take control of the OSGi framework, the test framework (e.g. JUnit) and
6115 the system under test at the same time.")
6116 (license license:asl2.0)))
6118 (define-public java-ops4j-pax-exam-core-spi
6120 (inherit java-ops4j-pax-exam-core)
6121 (name "java-ops4j-pax-exam-core-spi")
6123 `(#:jar-name "java-ops4j-pax-exam-spi.jar"
6124 #:source-dir "src/main/java"
6127 ;; Abstract base class, not a test
6128 "**/BaseStagedReactorTest.java"
6129 ;; Depends on org.mortbay.jetty.testwars:test-war-dump
6130 "**/WarBuilderTest.java")
6132 (modify-phases %standard-phases
6133 (add-before 'configure 'chdir
6135 ;; Tests assume we are in this directory
6136 (chdir "core/pax-exam-spi")))
6137 (add-before 'check 'fix-tests
6139 ;; One test checks that this file is present.
6140 (mkdir-p "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi")
6141 (with-output-to-file
6142 "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi/pom.properties"
6145 (string-append "artifactId = pax-exam-spi\n"
6146 "version = " ,(package-version java-ops4j-pax-exam-core-spi)))))
6147 ;; Maven puts compilation results in the target directory, while we
6148 ;; put them in the build directory.
6149 (substitute* '("src/test/java/org/ops4j/pax/exam/spi/war/WarBuilderTest.java"
6150 "src/test/java/org/ops4j/pax/exam/spi/war/WarTestProbeBuilderTest.java"
6151 "src/test/java/org/ops4j/pax/exam/spi/war/ZipBuilderTest.java")
6152 (("target") "build"))
6153 ;; One test is expected to fail, but it doesn't throw the expected exception
6154 (substitute* "src/test/java/org/ops4j/pax/exam/spi/reactors/BaseStagedReactorTest.java"
6155 (("AssertionError") "IllegalArgumentException")))))))
6157 `(("java-ops4j-pax-exam-core" ,java-ops4j-pax-exam-core)
6158 ("lang" ,java-ops4j-base-lang)
6159 ("monitors" ,java-ops4j-base-monitors)
6160 ("store" ,java-ops4j-base-store)
6161 ("io" ,java-ops4j-base-io)
6162 ("spi" ,java-ops4j-base-spi)
6163 ("osgi" ,java-osgi-core)
6164 ("slf4j" ,java-slf4j-api)
6165 ("tinybundles" ,java-ops4j-pax-tinybundles)))
6167 `(("mockito" ,java-mockito-1)
6168 ("junit" ,java-junit)
6169 ("hamcrest" ,java-hamcrest-core)
6170 ("cglib" ,java-cglib)
6171 ("objenesis" ,java-objenesis)
6172 ("asm" ,java-asm)))))
6174 (define-public java-ops4j-pax-exam-core-junit
6176 (inherit java-ops4j-pax-exam-core)
6177 (name "java-ops4j-pax-exam-core-junit")
6179 `(#:jar-name "ops4j-pax-exam-core-junit.jar"
6180 #:source-dir "drivers/pax-exam-junit4/src/main/java"
6181 #:tests? #f)); no tests
6183 `(("junit" ,java-junit)
6184 ("slf4j" ,java-slf4j-api)
6185 ("core" ,java-ops4j-pax-exam-core)
6186 ("spi" ,java-ops4j-pax-exam-core-spi)))
6187 (native-inputs '())))
6189 (define-public java-fasterxml-jackson-annotations
6191 (name "java-fasterxml-jackson-annotations")
6195 (uri (string-append "https://github.com/FasterXML/"
6196 "jackson-annotations/archive/"
6197 "jackson-annotations-" version ".tar.gz"))
6200 "0b4wdxjxfbl3gkilylfdbl7fzimfpyih676jiwdf19i4056j8lqw"))))
6201 (build-system ant-build-system)
6203 `(#:jar-name "jackson-annotations.jar"
6204 #:source-dir "src/main/java"
6205 #:test-dir "src/test"))
6207 `(("junit" ,java-junit)))
6208 (home-page "https://github.com/FasterXML/jackson-annotations")
6209 (synopsis "General purpose annotations for the Jackson Data Processor")
6210 (description "This package contains general purpose annotations for the
6211 Jackson Data Processor, used on value and handler types. The only annotations
6212 not included are ones that require dependency to the Databind package.")
6213 (license license:asl2.0)))
6215 (define-public java-fasterxml-jackson-core
6217 (name "java-fasterxml-jackson-core")
6221 (uri (string-append "https://github.com/FasterXML/"
6222 "jackson-core/archive/"
6223 "jackson-core-" version ".tar.gz"))
6226 "0q2d6qnylyxj5jh0sam1b095b5486f7ipzhxgwcgbm254ls7fqc1"))))
6227 (build-system ant-build-system)
6229 `(#:jar-name "jackson-core.jar"
6230 #:source-dir "src/main/java"
6231 #:test-dir "src/test"
6234 ;; Expected failure. pom.xml excludes these
6236 ;; Base classes that have no constructor for junit
6238 "**/ConcurrencyReadTest.java"
6239 "**/ManualCharAccessTest.java"
6240 "**/ManualCharAccessTest.java"
6241 "**/TrailingCommasTest.java"
6242 "**/AsyncMissingValuesInObjectTest.java"
6243 "**/AsyncMissingValuesInArrayTest.java")
6245 (modify-phases %standard-phases
6246 (add-before 'configure 'generate-PackageVersion.java
6248 (let* ((out "src/main/java/com/fasterxml/jackson/core/json/PackageVersion.java")
6249 (in (string-append out ".in")))
6252 (("@package@") "com.fasterxml.jackson.core.json")
6253 (("@projectversion@") ,version)
6254 (("@projectgroupid@") "com.fasterxml.jackson.core")
6255 (("@projectartifactid@") "jackson-core")))))
6256 (add-before 'build 'copy-resources
6258 (copy-recursively "src/main/resources"
6260 (add-before 'check 'copy-test-resources
6262 (copy-recursively "src/test/resources"
6263 "build/test-classes"))))))
6265 `(("junit" ,java-junit)
6266 ("hamcrest" ,java-hamcrest-core)))
6267 (home-page "https://github.com/FasterXML/jackson-core")
6270 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
6272 (define-public java-fasterxml-jackson-databind
6274 (name "java-fasterxml-jackson-databind")
6278 (uri (string-append "https://github.com/FasterXML/"
6279 "jackson-databind/archive/"
6280 "jackson-databind-" version ".tar.gz"))
6283 "1d5ns8ypqhdy8d94i8q560ip9kka6q8lhnk6q7nfh2g9mr22cc4w"))))
6284 (build-system ant-build-system)
6286 `(#:jar-name "jackson-databind.jar"
6287 #:source-dir "src/main/java"
6288 #:tests? #f; requires javax.measures for which I can't find a free implementation
6290 (modify-phases %standard-phases
6291 (add-before 'configure 'generate-PackageVersion.java
6293 (let* ((out "src/main/java/com/fasterxml/jackson/databind/cfg/PackageVersion.java")
6294 (in (string-append out ".in")))
6297 (("@package@") "com.fasterxml.jackson.databind.cfg")
6298 (("@projectversion@") ,version)
6299 (("@projectgroupid@") "com.fasterxml.jackson.databind")
6300 (("@projectartifactid@") "jackson-databind")))))
6301 (add-before 'build 'copy-resources
6303 (copy-recursively "src/main/resources" "build/classes"))))))
6305 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
6306 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)))
6307 (home-page "https://github.com/FasterXML/jackson-databind")
6308 (synopsis "Data-binding functionality and tree-model for the Jackson Data Processor")
6309 (description "This package contains the general-purpose data-binding
6310 functionality and tree-model for Jackson Data Processor. It builds on core
6311 streaming parser/generator package, and uses Jackson Annotations for
6313 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
6315 (define-public java-fasterxml-jackson-modules-base-jaxb
6317 (name "java-fasterxml-jackson-modules-base-jaxb")
6321 (uri (string-append "https://github.com/FasterXML/"
6322 "jackson-modules-base/archive/"
6323 "jackson-modules-base-" version ".tar.gz"))
6326 "0kc19n5a188g4vpyay44xfb7qcabcbfnwzhx1g84lg0sac8lf0ng"))))
6327 (build-system ant-build-system)
6329 `(#:jar-name "jackson-modules-base-jaxb.jar"
6330 #:source-dir "jaxb/src/main/java"
6331 #:test-dir "jaxb/src/test"
6333 ;; Base class for tests
6334 (list "**/BaseJaxbTest.java")
6336 (modify-phases %standard-phases
6337 (add-before 'configure 'generate-PackageVersion.java
6339 (let* ((out (string-append "jaxb/src/main/java/com/fasterxml/"
6340 "jackson/module/jaxb/PackageVersion.java"))
6341 (in (string-append out ".in")))
6344 (("@package@") "com.fasterxml.jackson.module.jaxb")
6345 (("@projectversion@") ,version)
6346 (("@projectgroupid@") "com.fasterxml.jackson.module.jaxb")
6347 (("@projectartifactid@") "jackson-module-jaxb")))))
6348 (add-before 'build 'copy-resources
6350 (copy-recursively "jaxb/src/main/resources" "build/classes"))))))
6352 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
6353 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
6354 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)))
6356 `(("java-junit" ,java-junit)))
6357 (home-page "https://github.com/FasterXML/jackson-modules-base")
6358 (synopsis "Jaxb annotations jackson module")
6359 (description "This package is the jaxb annotations module for jackson.")
6360 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
6362 (define-public java-snakeyaml
6364 (name "java-snakeyaml")
6368 (uri (string-append "https://bitbucket.org/asomov/snakeyaml/get/v"
6372 "0rf5ha6w0waz50jz2479jsrbgmd0dnx0gs337m126j5z7zlmg7mg"))))
6373 (build-system ant-build-system)
6375 `(#:jar-name "java-snakeyaml.jar"
6376 #:source-dir "src/main/java"
6377 ;; Tests require velocity, a cyclic dependency, and
6378 ;; java-spring-framework-context which is not packaged.
6380 (home-page "https://bitbucket.org/asomov/snakeyaml")
6381 (synopsis "YAML processor")
6382 (description "SnakeYAML is a YAML processor for the Java Virtual Machine.")
6383 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
6385 (define-public java-fasterxml-jackson-dataformat-yaml
6387 (name "java-fasterxml-jackson-dataformat-yaml")
6391 (uri (string-append "https://github.com/FasterXML/"
6392 "jackson-dataformats-text/archive/"
6393 "jackson-dataformats-text-" version ".tar.gz"))
6396 "1x7c7v201jpb8ynjsmmq7jj7hyqzzp39jvpr053ggdndm022yzc7"))))
6397 (build-system ant-build-system)
6399 `(#:jar-name "jackson-dataformat-yaml.jar"
6400 #:source-dir "yaml/src/main/java"
6401 #:test-dir "yaml/src/test"
6402 #:test-exclude (list "**/failing/**.java")
6404 (modify-phases %standard-phases
6405 (add-before 'configure 'generate-PackageVersion.java
6407 (let* ((out "yaml/src/main/java/com/fasterxml/jackson/dataformat/yaml/PackageVersion.java")
6408 (in (string-append out ".in")))
6411 (("@package@") "com.fasterxml.jackson.dataformat.yaml")
6412 (("@projectversion@") ,version)
6413 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.yaml")
6414 (("@projectartifactid@") "jackson-dataformat-yaml"))))))))
6416 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
6417 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
6418 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)
6419 ("java-snakeyaml" ,java-snakeyaml)))
6421 `(("junit" ,java-junit)
6422 ("hamcrest" ,java-hamcrest-core)
6423 ("java-ops4j-pax-exam-core-spi" ,java-ops4j-pax-exam-core-spi)
6424 ("java-ops4j-pax-exam-core-junit" ,java-ops4j-pax-exam-core-junit)
6425 ("java-ops4j-pax-exam" ,java-ops4j-pax-exam-core)))
6426 (home-page "https://github.com/FasterXML/jackson-dataformats-text")
6427 (synopsis "Yaml backend for Jackson")
6428 (description "Dataformat backends are used to support format alternatives
6429 to JSON, supported by default. This is done by sub-classing Jackson core
6431 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
6433 (define-public java-stax2-api
6435 (name "java-stax2-api")
6439 (uri (string-append "https://github.com/FasterXML/stax2-api/archive/"
6440 "stax2-api-" version ".tar.gz"))
6443 "1amc1si0l0hyyw2sawmnzy4hkna3z6fp195y4nm5m9wb9ld5awkq"))))
6444 (build-system ant-build-system)
6446 `(#:jar-name "java-stax2-api.jar"
6447 #:source-dir "src/main/java"
6448 #:tests? #f)); no tests
6449 (home-page "https://github.com/FasterXML/stax2-api")
6450 (synopsis "Stax2 API")
6451 (description "Stax2 API is an extension to basic Stax 1.0 API that adds
6452 significant new functionalities, such as full-featured bi-direction validation
6453 interface and high-performance Typed Access API.")
6454 (license license:bsd-2)))
6456 (define-public java-woodstox-core
6458 (name "java-woodstox-core")
6462 (uri (string-append "https://github.com/FasterXML/woodstox/archive/"
6463 "woodstox-core-" version ".tar.gz"))
6466 "1i7pdgb8jbw6gdy5kmm0l6rz109n2ns92pqalpyp24vb8vlvdfd4"))))
6467 (build-system ant-build-system)
6469 `(#:jar-name "woodstox.jar"
6471 (list "**/Base*.java" "failing/**")
6473 (modify-phases %standard-phases
6474 (add-before 'build 'remove-msv-dep
6476 ;; we don't need osgi, and it depends on msv
6477 (delete-file-recursively "src/main/java/com/ctc/wstx/osgi")
6478 ;; msv's latest release is from 2011 and we don't need it
6479 (delete-file-recursively "src/main/java/com/ctc/wstx/msv")
6480 (delete-file-recursively "src/test/java/wstxtest/osgi")
6481 (delete-file-recursively "src/test/java/wstxtest/msv")))
6482 (add-before 'build 'copy-resources
6484 (copy-recursively "src/main/resources" "build/classes"))))))
6486 `(("stax2" ,java-stax2-api)))
6488 `(("junit" ,java-junit)))
6489 (home-page "https://github.com/FasterXML/woodstox")
6490 (synopsis "Stax XML API implementation")
6491 (description "Woodstox is a stax XML API implementation.")
6492 (license license:asl2.0)))
6494 (define-public java-fasterxml-jackson-dataformat-xml
6496 (name "java-fasterxml-jackson-dataformat-xml")
6500 (uri (string-append "https://github.com/FasterXML/"
6501 "jackson-dataformat-xml/archive/"
6502 "jackson-dataformat-xml-" version ".tar.gz"))
6505 "1j1qanvcdh6afagr67zqrlypjkf0n6wr1qzpbvkw79lii72j6pbr"))))
6506 (build-system ant-build-system)
6508 `(#:jar-name "jackson-dataformat-xml.jar"
6509 #:source-dir "src/main/java"
6511 (list "**/failing/**")
6513 (modify-phases %standard-phases
6514 (add-before 'configure 'generate-PackageVersion.java
6516 (let* ((out "src/main/java/com/fasterxml/jackson/dataformat/xml/PackageVersion.java")
6517 (in (string-append out ".in")))
6521 (("@package@") "com.fasterxml.jackson.dataformat.xml")
6522 (("@projectversion@") ,version)
6523 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.xml")
6524 (("@projectartifactid@") "jackson-dataformat-xml")))))
6525 (add-before 'build 'copy-resources
6527 (copy-recursively "src/main/resources" "build/classes"))))))
6529 `(("jackson-annotations" ,java-fasterxml-jackson-annotations)
6530 ("jackson-core" ,java-fasterxml-jackson-core)
6531 ("jackson-modules-base-jaxb" ,java-fasterxml-jackson-modules-base-jaxb)
6532 ("jackson-databind" ,java-fasterxml-jackson-databind)
6533 ("stax2-api" ,java-stax2-api)
6534 ("woodstox" ,java-woodstox-core)))
6536 `(("junit" ,java-junit)
6537 ("hamcrest" ,java-hamcrest-core)))
6538 (home-page "https://github.com/FasterXML/jackson-dataformat-xml")
6539 (synopsis "Read and write XML")
6540 (description "This package contains Jackson extension component for reading
6541 and writing XML encoded data.
6543 Further, the goal is to emulate how JAXB data-binding works with \"Code-first\"
6544 approach (that is, no support is added for \"Schema-first\" approach). Support
6545 for JAXB annotations is provided by JAXB annotation module; this module
6546 provides low-level abstractions (@code{JsonParser}, @code{JsonGenerator},
6547 @code{JsonFactory}) as well as small number of higher level overrides needed to
6548 make data-binding work.")
6549 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
6551 (define-public java-hdrhistogram
6553 (name "java-hdrhistogram")
6557 (uri (string-append "https://github.com/HdrHistogram/HdrHistogram/"
6558 "archive/HdrHistogram-" version ".tar.gz"))
6561 "1sicbmc3sr42nw93qbkb26q9rn33ag33k6k77phjc3j5h5gjffqv"))))
6562 (build-system ant-build-system)
6564 `(#:jar-name "java-hdrhistogram.jar"
6565 #:source-dir "src/main/java"
6567 (modify-phases %standard-phases
6568 (add-before 'configure 'set-version
6570 (let* ((version-java "src/main/java/org/HdrHistogram/Version.java")
6571 (template (string-append version-java ".template")))
6572 (copy-file template version-java)
6573 (substitute* version-java
6574 (("\\$VERSION\\$") ,version)
6575 (("\\$BUILD_TIME\\$") "0"))
6578 `(("junit" ,java-junit)
6579 ("hamcrest" ,java-hamcrest-core)))
6580 (home-page "https://hdrhistogram.github.io/HdrHistogram")
6581 (synopsis "High dynamic range histogram")
6582 (description "Hdrhistogram allows to create histograms that support
6583 recording and analyzing sampled data value counts across a configurable integer
6584 value range with configurable value precision within the range. Value precision
6585 is expressed as the number of significant digits in the value recording, and
6586 provides control over value quantization behavior across the value range and
6587 the subsequent value resolution at any given level.")
6588 (license license:public-domain)))
6590 (define-public java-cofoja
6592 (name "java-cofoja")
6597 (url "https://github.com/nhatminhle/cofoja.git")
6598 (commit (string-append "v" version))))
6599 (file-name (string-append "java-cofoja-" version "-checkout"))
6602 "0p7sz8y5xgpi5rx1qwn6587fkd52qr3ha3ybh14gqcyxhikl525w"))))
6603 (build-system ant-build-system)
6605 `(#:build-target "dist"
6606 #:test-target "test"
6609 (list "-Ddist.dir=dist")
6610 #:modules ((guix build ant-build-system)
6611 (guix build java-utils)
6616 (modify-phases %standard-phases
6617 ;; The bulid system ignores the class path the ant-build-system sets
6618 ;; up and instead expects to find all dependencies in the "lib"
6620 (add-after 'unpack 'create-libdir
6621 (lambda* (#:key inputs #:allow-other-keys)
6625 (let ((target (string-append "lib/" (basename file))))
6626 (unless (file-exists? target)
6627 (symlink file target))))
6628 (append-map (match-lambda
6630 (find-files dir "\\.jar$")))
6633 (replace 'install (install-jars "dist")))))
6635 `(("java-asm" ,java-asm)))
6637 `(("java-junit" ,java-junit)))
6638 (home-page "https://github.com/nhatminhle/cofoja")
6639 (synopsis "Contracts for Java")
6640 (description "Contracts for Java, or Cofoja for short, is a contract
6641 programming framework and test tool for Java, which uses annotation processing
6642 and bytecode instrumentation to provide run-time checking. (In particular,
6643 this is not a static analysis tool.)")
6644 (license license:lgpl3+)))
6646 (define-public java-aopalliance
6648 (name "java-aopalliance")
6652 ;; Note: this git repository is not official, but contains the
6653 ;; source code that is in the CVS repository. Downloading the
6654 ;; tarball from sourceforge is undeterministic, and the cvs download
6657 (url "https://github.com/hoverruan/aopalliance")
6658 (commit "0d7757ae204e5876f69431421fe9bc2a4f01e8a0")))
6659 (file-name (string-append name "-" version))
6662 "0rsg2b0v3hxlq2yk1i3m2gw3xwq689j3cwx9wbxvqfpdcjbca0qr"))))
6663 (build-system ant-build-system)
6665 `(#:jar-name "java-aopalliance.jar"
6667 #:tests? #f; no tests
6668 #:source-dir "aopalliance/src/main"))
6669 (home-page "http://aopalliance.sourceforge.net")
6670 (synopsis "Aspect-Oriented Programming")
6671 (description "The AOP Alliance project is a joint project between several
6672 software engineering people who are interested in Aspect-Oriented Programming
6674 (license license:public-domain)))
6676 (define-public java-javax-inject
6678 (name "java-javax-inject")
6682 (uri (string-append "https://github.com/javax-inject/javax-inject/"
6683 "archive/javax.inject-" version ".tar.gz"))
6686 "1ydrlvh2r7vr1g7lhjwy3w2dggpj9h6pix1lakkkgdywb365n6g0"))))
6687 (build-system ant-build-system)
6689 `(#:jar-name "java-javax-inject.jar"
6691 #:tests? #f)); no tests
6692 (home-page "http://github.com/javax-inject/javax-inject")
6693 (synopsis "JSR-330: Dependency Injection for Java")
6694 (description "This package specifies a means for obtaining objects in such
6695 a way as to maximize reusability, testability and maintainability compared to
6696 traditional approaches such as constructors, factories, and service locators
6697 (e.g., JNDI). This process, known as dependency injection, is beneficial to
6698 most nontrivial applications.
6700 Many types depend on other types. For example, a @var{Stopwatch} might depend
6701 on a @var{TimeSource}. The types on which a type depends are known as its
6702 dependencies. The process of finding an instance of a dependency to use at run
6703 time is known as resolving the dependency. If no such instance can be found,
6704 the dependency is said to be unsatisfied, and the application is broken.")
6705 (license license:asl2.0)))
6707 (define-public java-guice
6713 (uri (string-append "https://github.com/google/guice/archive/"
6715 (file-name (string-append name "-" version ".tar.gz"))
6718 "0dwmqjzlavb144ywqqglj3h68hqszkff8ai0a42hyb5il0qh4rbp"))))
6719 (build-system ant-build-system)
6721 `(#:jar-name "java-guice.jar"
6723 #:tests? #f; FIXME: tests are not in a java sub directory
6724 #:source-dir "core/src"))
6726 `(("guava" ,java-guava)
6727 ("java-cglib" ,java-cglib)
6728 ("java-aopalliance" ,java-aopalliance)
6729 ("java-javax-inject" ,java-javax-inject)
6730 ("java-asm" ,java-asm)))
6731 (home-page "https://github.com/google/guice")
6732 (synopsis "Lightweight dependency injection framework")
6733 (description "Guice is a lightweight dependency injection framework fo
6735 (license license:asl2.0)))
6737 (define-public java-guice-servlet
6739 (inherit java-guice)
6740 (name "java-guice-servlet")
6742 `(#:jar-name "guice-servlet.jar"
6743 #:source-dir "extensions/servlet/src/"
6745 #:tests? #f)); FIXME: not in a java subdir
6747 `(("guice" ,java-guice)
6748 ("servlet" ,java-tomcat)
6749 ,@(package-inputs java-guice)))))
6751 (define-public java-assertj
6753 (name "java-assertj")
6757 (uri (string-append "https://github.com/joel-costigliola/"
6758 "assertj-core/archive/"
6759 "assertj-core-" version ".tar.gz"))
6762 "1kf124fxskf548rklkg86294w2x6ajqrff94rrhyqns31danqkfz"))))
6763 (build-system ant-build-system)
6765 `(#:jar-name "java-assertj.jar"
6767 #:source-dir "src/main/java"
6768 #:tests? #f)); depends on tng-junit which depends on assertj
6770 `(("cglib" ,java-cglib)
6771 ("junit" ,java-junit)
6772 ("hamcrest" ,java-hamcrest-core)))
6774 `(("mockito" ,java-mockito-1)))
6775 (home-page "https://joel-costigliola.github.io/assertj/index.html")
6776 (synopsis "Fluent assertions for java")
6777 (description "AssertJ core is a Java library that provides a fluent
6778 interface for writing assertions. Its main goal is to improve test code
6779 readability and make maintenance of tests easier.")
6780 (license license:asl2.0)))
6782 (define-public java-jboss-javassist
6784 (name "java-jboss-javassist")
6788 (uri (string-append "https://github.com/jboss-javassist/javassist/"
6790 (string-map (lambda (x) (if (eq? x #\.) #\_ x)) version)
6794 "10lpcr3sbf7y6fq6fc2h2ik7rqrivwcy4747bg0kxhwszil3cfmf"))))
6795 (build-system ant-build-system)
6797 `(#:jar-name "java-jboss-javassist.jar"
6799 #:source-dir "src/main"
6800 #:tests? #f; FIXME: requires junit-awtui and junit-swingui from junit3
6802 (modify-phases %standard-phases
6803 (add-before 'configure 'remove-binary
6805 (delete-file "javassist.jar")
6808 `(("junit" ,java-junit)))
6809 (home-page "https://github.com/jboss-javassist/javassist")
6810 (synopsis "Java bytecode engineering toolkit")
6811 (description "Javassist (JAVA programming ASSISTant) makes Java bytecode
6812 manipulation simple. It is a class library for editing bytecodes in Java; it
6813 enables Java programs to define a new class at runtime and to modify a class
6814 file when the JVM loads it.")
6815 (license (list license:gpl2 license:cddl1.0)))); either gpl2 only or cddl.
6817 (define-public java-jcommander
6819 (name "java-jcommander")
6823 (uri (string-append "https://github.com/cbeust/jcommander/archive/"
6825 (file-name (string-append name "-" version ".tar.gz"))
6828 "1f5k2ckay6qjc3d3w3d7bc0p3cx3c7n6p6zxvw1kibqdr0q98wlx"))))
6829 (build-system ant-build-system)
6831 `(#:jar-name "java-jcommander.jar"
6833 #:tests? #f; requires testng which depends on jcommander
6834 #:source-dir "src/main/java"))
6835 (home-page "http://jcommander.org")
6836 (synopsis "Command line parameters parser")
6837 (description "JCommander is a very small Java framework that makes it
6838 trivial to parse command line parameters. Parameters are declared with
6840 (license license:asl2.0)))
6842 (define-public java-bsh
6848 (uri (string-append "https://github.com/beanshell/beanshell/archive/"
6850 (file-name (string-append name "-" version ".tar.gz"))
6853 "1bawkxk6jyc75hxvzkpz689h73cn3f222m0ar3nvb0dal2b85kfv"))))
6854 (build-system ant-build-system)
6856 `(#:build-target "jarall"
6857 #:test-target "junit-tests-all"
6859 (modify-phases %standard-phases
6861 (lambda* (#:key outputs #:allow-other-keys)
6862 (let ((share (string-append (assoc-ref outputs "out") "/share/java")))
6864 (copy-file "dist/bsh-2.0b6.jar" (string-append share "/bsh-2.0b6.jar"))
6866 (home-page "http://beanshell.org/")
6867 (synopsis "Lightweight Scripting for Java")
6868 (description "BeanShell is a small, free, embeddable Java source
6869 interpreter with object scripting language features, written in Java.
6870 BeanShell dynamically executes standard Java syntax and extends it with common
6871 scripting conveniences such as loose types, commands, and method closures like
6872 those in Perl and JavaScript.")
6873 (license license:asl2.0)))
6875 (define-public java-fest-util
6877 (name "java-fest-util")
6881 (uri (string-append "https://github.com/alexruiz/fest-util/"
6882 "archive/fest-util-" version ".tar.gz"))
6885 "05g6hljz5mdaakk8d7g32klbhz9bdwp3qlj6rdaggdidxs3x1sb8"))))
6886 (build-system ant-build-system)
6888 `(#:jar-name "java-fest-util.jar"
6889 #:source-dir "src/main/java"))
6891 `(("junit" ,java-junit)
6892 ("hamcrest" ,java-hamcrest-core)))
6893 (home-page "https://github.com/alexruiz/fest-util")
6894 (synopsis "FEST common utilities")
6895 (description "Common utilities used in all FEST module.")
6896 (license license:asl2.0)))
6898 (define-public java-fest-test
6900 (name "java-fest-test")
6904 (uri (string-append "https://github.com/alexruiz/fest-test/"
6905 "archive/fest-test-" version ".tar.gz"))
6908 "1rxfbw6l9vc65iy1x3fb617qc6y4w2k430pgf1mfbxfdlxbm0f7g"))))
6909 (build-system ant-build-system)
6911 `(#:jar-name "java-fest-test.jar"
6912 #:source-dir "src/main/java"
6913 #:tests? #f)); no tests
6915 `(("junit" ,java-junit)))
6916 (home-page "https://github.com/alexruiz/fest-test")
6917 (synopsis "Common FEST testing infrastructure")
6918 (description "Fest-test contains the common FEST testing infrastructure.")
6919 (license license:asl2.0)))
6921 (define-public java-fest-assert
6923 (name "java-fest-assert")
6927 (uri (string-append "https://github.com/alexruiz/fest-assert-2.x/"
6928 "archive/fest-assert-core-" version ".tar.gz"))
6931 "1bi0iqavikzww6rxvz5jyg7y6bflv95s6ibryxx0xfcxrrw6i5lw"))))
6932 (build-system ant-build-system)
6934 `(#:jar-name "java-fest-assert.jar"
6935 #:source-dir "src/main/java"
6940 ;; Unable to set MockitoNamingPolicy on cglib generator which creates FastClasses
6941 "**/MessageFormatter_format_Test.java"
6942 "**/internal/*/*_assert*_Test.java")))
6944 `(("java-fest-util" ,java-fest-util)))
6946 `(("java-junit" ,java-junit)
6947 ("java-fest-test" ,java-fest-test)
6948 ("java-hamcrest-core" ,java-hamcrest-core)
6949 ("java-mockito" ,java-mockito-1)
6950 ("java-cglib" ,java-cglib)
6951 ("java-objenesis" ,java-objenesis)
6952 ("java-asm" ,java-asm)))
6953 (home-page "https://github.com/alexruiz/fest-assert-2.x")
6954 (synopsis "FEST fluent assertions")
6955 (description "FEST-Assert provides a fluent interface for assertions.")
6956 (license license:asl2.0)))
6958 (define-public java-testng
6960 (name "java-testng")
6964 (uri (string-append "https://github.com/cbeust/testng/archive/"
6966 (file-name (string-append name "-" version ".tar.gz"))
6969 "01j2x47wkj7n5w6gpcjfbwgc88ai5654b23lb87w7nsrj63m3by6"))))
6970 (build-system ant-build-system)
6972 `(#:jdk ,icedtea-8; java.util.function
6973 #:jar-name "java-testng.jar"
6974 #:source-dir "src/main/java"
6976 (modify-phases %standard-phases
6977 (add-before 'build 'copy-resources
6979 (copy-recursively "src/main/resources" "build/classes")
6981 (add-before 'check 'copy-test-resources
6983 (copy-recursively "src/test/resources" "build/test-classes")
6987 (system* "ant" "compile-tests")
6988 ;; we don't have groovy
6989 (substitute* "src/test/resources/testng.xml"
6990 (("<class name=\"test.groovy.GroovyTest\" />") ""))
6991 (zero? (system* "java" "-cp" (string-append (getenv "CLASSPATH")
6993 ":build/test-classes")
6994 "-Dtest.resources.dir=src/test/resources"
6995 "org.testng.TestNG" "src/test/resources/testng.xml")))))))
6997 `(("junit" ,java-junit)
6998 ("java-jsr305" ,java-jsr305)
6999 ("java-bsh" ,java-bsh)
7000 ("java-jcommander" ,java-jcommander)
7001 ("java-guice" ,java-guice)
7002 ("snakeyaml" ,java-snakeyaml)))
7004 `(("guava" ,java-guava)
7005 ("java-javax-inject" ,java-javax-inject)
7006 ("java-hamcrest" ,java-hamcrest-all)
7007 ("java-assertj" ,java-assertj)
7008 ("cglib" ,java-cglib)
7010 ("aopalliance" ,java-aopalliance)))
7011 (home-page "http://testng.org")
7012 (synopsis "Testing framework")
7013 (description "TestNG is a testing framework inspired from JUnit and NUnit
7014 but introducing some new functionalities that make it more powerful and easier
7016 (license license:asl2.0)))
7018 (define-public java-jnacl
7025 (url "https://github.com/neilalexander/jnacl")
7026 (commit "40c322e0a42637ab17cdf941138eeaf2494055f8")))
7029 "1pspnmp44q61a2q4bpslpxw86rfn8s5l0xgvyrikqgdvg7ypx597"))))
7030 (build-system ant-build-system)
7032 `(#:jar-name "java-jnacl.jar"
7033 #:source-dir "src/main/java"
7036 (modify-phases %standard-phases
7037 (add-before 'build 'fix-tests
7039 (substitute* "src/test/java/com/neilalexander/jnacl/NaClTest.java"
7040 (("assertions.Assertions") "assertions.api.Assertions"))
7041 (substitute* "src/test/java/com/neilalexander/jnacl/NaclSecretBoxTest.java"
7042 (("assertions.Assertions") "assertions.api.Assertions"))
7046 (system* "ant" "compile-tests")
7048 (zero? (system* "java" "-cp" (string-append (getenv "CLASSPATH")
7050 ":build/test-classes")
7051 "org.testng.TestNG" "-testclass"
7052 "build/test-classes/com/neilalexander/jnacl/NaclSecretBoxTest.class"))
7053 (zero? (system* "java" "-cp" (string-append (getenv "CLASSPATH")
7055 ":build/test-classes")
7056 "org.testng.TestNG" "-testclass"
7057 "build/test-classes/com/neilalexander/jnacl/NaClTest.class"))))))))
7059 `(("java-testng" ,java-testng)
7060 ("java-fest-util" ,java-fest-util)
7061 ("java-fest-assert" ,java-fest-assert)))
7062 (home-page "https://github.com/neilalexander/jnacl")
7063 (synopsis "Java implementation of NaCl")
7064 (description "Pure Java implementation of the NaCl: Networking and
7065 Cryptography library.")
7066 (license license:mpl2.0)))
7068 (define-public java-mvel2
7074 (uri (string-append "https://github.com/mvel/mvel/archive/mvel2-"
7075 version ".Final.tar.gz"))
7078 "01ph5s9gm16l2qz58lg21w6fna7xmmrj7f9bzqr1jim7h9557d3z"))))
7079 (build-system ant-build-system)
7081 `(#:jar-name "mvel2.jar"
7082 #:source-dir "src/main/java"
7084 (list "**/Abstract*.java"
7085 ;; Base class with no tests
7086 "**/MVELThreadTest.java")
7088 (modify-phases %standard-phases
7089 (add-after 'install 'install-bin
7090 (lambda* (#:key outputs #:allow-other-keys)
7091 (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
7093 (with-output-to-file (string-append bin "/mvel2")
7097 "#!" (which "bash") "\n"
7098 "if [ \"$#\" -ne \"2\" ]; then\n"
7099 "echo 'Usage: mvel2 <script> <out.dir>'\n"
7102 "java -Dout.dir=$2 -cp " (getenv "CLASSPATH")
7103 ":" (assoc-ref outputs "out") "/share/java/mvel2.jar"
7104 " org.mvel2.sh.Main $1"))))
7105 (chmod (string-append bin "/mvel2") #o755))
7108 `(("junit" ,java-junit)
7109 ("hamcrest" ,java-hamcrest-core)))
7110 (home-page "https://github.com/mvel/mvel")
7111 (synopsis "MVFLEX Expression Language")
7112 (description "MVEL has largely been inspired by Java syntax, but has some
7113 fundamental differences aimed at making it more efficient as an expression
7114 language, such as operators that directly support collection, array and string
7115 matching, as well as regular expressions. MVEL is used to evaluate expressions
7116 written using Java syntax.
7118 In addition to the expression language, MVEL serves as a templating language for
7119 configuration and string construction.")
7120 (license license:asl2.0)))
7122 (define-public java-commons-jexl-2
7124 (name "java-commons-jexl")
7128 (uri (string-append "mirror://apache/commons/jexl/source/"
7129 "commons-jexl-" version "-src.tar.gz"))
7132 "1ai7632bwwaxglb0nbpblpr2jw5g20afrsaq372ipkphi3ncy1jz"))))
7133 (build-system ant-build-system)
7135 `(#:jar-name "commons-jexl-2.jar"
7137 #:source-dir "src/main/java"
7139 (modify-phases %standard-phases
7140 (add-before 'check 'disable-broken-tests
7141 (lambda* (#:key inputs #:allow-other-keys)
7142 (with-directory-excursion "src/test/java/org/apache/commons/jexl2/"
7143 (substitute* "ArithmeticTest.java"
7144 (("asserter.assertExpression\\(\"3 / 0\"") "//")
7145 (("asserter.assertExpression\\(\"imanull") "//"))
7146 ;; This test fails with "ambiguous method invocation"
7147 (delete-file "CacheTest.java")
7148 ;; This test doesn't have access to the temp directory
7149 (substitute* "ClassCreatorTest.java"
7150 (("java.io.tmpdir") "user.dir"))
7151 ;; This test fails in trying to detect whether it can run.
7152 (substitute* "ClassCreator.java"
7153 (("boolean canRun =.*") "boolean canRun = false;\n"))
7154 ;; ...and these tests depend on it.
7155 (delete-file "scripting/JexlScriptEngineOptionalTest.java")
7156 (delete-file "scripting/JexlScriptEngineTest.java"))
7158 (add-before 'build 'run-javacc
7160 (with-directory-excursion "src/main/java/org/apache/commons/jexl2/parser/"
7161 (and (zero? (system* "java" "jjtree" "Parser.jjt"))
7162 (zero? (system* "java" "javacc" "Parser.jj")))))))))
7164 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)))
7166 `(("java-junit" ,java-junit)
7167 ("java-hamcrest-core" ,java-hamcrest-core)
7168 ("javacc" ,javacc-4)))
7169 (home-page "https://commons.apache.org/proper/commons-jexl/")
7170 (synopsis "Java Expression Language ")
7171 (description "JEXL is a library intended to facilitate the implementation
7172 of dynamic and scripting features in applications and frameworks written in
7173 Java. JEXL implements an Expression Language based on some extensions to the
7174 JSTL Expression Language supporting most of the constructs seen in
7175 shell-script or ECMAScript. Its goal is to expose scripting features usable
7176 by technical operatives or consultants working with enterprise platforms.")
7177 (license license:asl2.0)))
7179 (define-public java-lz4
7185 (uri (string-append "https://github.com/lz4/lz4-java/archive/"
7187 (file-name (string-append name "-" version ".tar.gz"))
7190 "096dm57p2lzqk28n0j2p52x2j3cvnsd2dfqn43n7vbwrkjsy7y54"))))
7191 (build-system ant-build-system)
7193 `(#:jar-name "lz4.jar"
7195 #:source-dir "src/java:src/java-unsafe"
7196 #:tests? #f; FIXME: requires more dependencies
7198 (modify-phases %standard-phases
7199 (add-before 'configure 'generate-source
7201 (with-directory-excursion "src/build/source_templates"
7202 (zero? (system* "mvel2" "../gen_sources.mvel" "../../java"))))))))
7204 `(("mvel" ,java-mvel2)))
7205 (home-page "https://jpountz.github.io/lz4-java")
7206 (synopsis "Compression algorithm")
7207 (description "LZ4 - Java is a Java port of the popular lz4 compression
7208 algorithms and xxHash hashing algorithm.")
7209 (license license:asl2.0)))
7211 (define-public java-bouncycastle-bcprov
7213 (name "java-bouncycastle-bcprov")
7217 (uri "https://bouncycastle.org/download/bcprov-jdk15on-158.tar.gz")
7220 "1hgkg96llbvgs8i0krwz2n0j7wlg6jfnq8w8kg0cc899j0wfmf3n"))))
7221 (build-system ant-build-system)
7223 `(#:jar-name "bouncycastle-bcprov.jar"
7224 #:tests? #f; no tests
7227 (modify-phases %standard-phases
7228 (add-before 'configure 'unzip-src
7231 (with-directory-excursion "src"
7232 (zero? (system* "unzip" "../src.zip"))))))))
7235 ("junit" ,java-junit)))
7236 (home-page "https://www.bouncycastle.org")
7237 (synopsis "Cryptographic library")
7238 (description "Bouncy Castle Provider (bcprov) is a cryptographic library
7239 for the Java programming language.")
7240 (license license:expat)))
7242 (define-public java-bouncycastle-bcpkix
7244 (name "java-bouncycastle-bcpkix")
7248 (uri "https://bouncycastle.org/download/bcpkix-jdk15on-158.tar.gz")
7251 "0is7qay02803s9f7lhnfcjlz61ni3hq5d7apg0iil7nbqkbfbcq2"))))
7252 (build-system ant-build-system)
7254 `(#:jar-name "bouncycastle-bcpkix.jar"
7255 #:tests? #f; no tests
7258 (modify-phases %standard-phases
7259 (add-before 'configure 'unzip-src
7262 (with-directory-excursion "src"
7263 (zero? (system* "unzip" "../src.zip"))))))))
7266 ("junit" ,java-junit)))
7268 `(("bcprov" ,java-bouncycastle-bcprov)))
7269 (home-page "https://www.bouncycastle.org")
7270 (synopsis "Cryptographic library")
7271 (description "Bouncy Castle Java API for PKIX, CMS, EAC, TSP, PKCS, OCSP,
7273 (license license:expat)))
7275 (define-public java-lmax-disruptor
7277 (name "java-lmax-disruptor")
7281 (uri (string-append "https://github.com/LMAX-Exchange/disruptor/"
7282 "archive/" version ".tar.gz"))
7283 (file-name (string-append name "-" version ".tar.gz"))
7286 "17da2gwj5abnlsfgn2xqjk5lgzbg4vkb0hdv2dvc8r2fx4bi7w3g"))))
7287 (build-system ant-build-system)
7289 `(#:jar-name "java-lmax-disruptor.jar"
7291 #:tests? #f)); tests hang
7293 `(("junit" ,java-junit)
7294 ("java-hdrhistogram" ,java-hdrhistogram)
7295 ("java-jmock" ,java-jmock)
7296 ("java-jmock-legacy" ,java-jmock-legacy)
7297 ("java-jmock-junit4" ,java-jmock-junit4)
7298 ("java-hamcrest-all" ,java-hamcrest-all)))
7300 `(("cglib" ,java-cglib)
7301 ("objenesis" ,java-objenesis)
7303 (home-page "https://www.lmax.com/disruptor")
7304 (synopsis "High performance inter-thread communication")
7305 (description "LMAX Disruptor is a software pattern and software component
7306 for high performance inter-thread communication that avoids the need for
7307 message queues or resource locking.")
7308 (license license:asl2.0)))
7310 (define-public java-commons-bcel
7312 (name "java-commons-bcel")
7316 (uri (string-append "mirror://apache/commons/bcel/source/bcel-"
7317 version "-src.tar.gz"))
7320 "0j3x1rxd673k07psclk8k13rqh0x0mf2yy5qiwkiw4z3afa568jy"))))
7321 (build-system ant-build-system)
7323 `(#:jar-name "bcel.jar"
7325 #:source-dir "src/main/java"
7326 #:test-dir "src/test/java"
7327 ;; FIXME: Tests require the unpackaged jna.
7329 (home-page "https://commons.apache.org/proper/commons-bcel/")
7330 (synopsis "Byte code engineering library")
7331 (description "The Byte Code Engineering Library (Apache Commons BCEL) is
7332 intended to give users a convenient way to analyze, create, and
7333 manipulate (binary) Java class files. Classes are represented by objects
7334 which contain all the symbolic information of the given class: methods, fields
7335 and byte code instructions, in particular.
7337 Such objects can be read from an existing file, be transformed by a
7338 program (e.g. a class loader at run-time) and written to a file again. An
7339 even more interesting application is the creation of classes from scratch at
7340 run-time. The @dfn{Byte Code Engineering Library} (BCEL) may be also useful
7341 if you want to learn about the @dfn{Java Virtual Machine} (JVM) and the format
7342 of Java @code{.class} files.")
7343 (license license:asl2.0)))
7345 (define-public java-xerial-core
7347 (name "java-xerial-core")
7351 (uri (string-append "https://github.com/xerial/xerial-java/archive/"
7353 (file-name (string-append name "-" version ".tar.gz"))
7356 "0d3g863i41bgalpa4xr3vm1h140l091n8iwgq5qvby5yivns9y8d"))))
7357 (build-system ant-build-system)
7359 `(#:jar-name "xerial-core.jar"
7360 #:source-dir "xerial-core/src/main/java"
7361 #:test-dir "xerial-core/src/test"
7363 (modify-phases %standard-phases
7364 (add-before 'build 'copy-resources
7366 (copy-recursively "xerial-core/src/main/resources"
7370 `(("junit" ,java-junit)
7371 ("hamcrest" ,java-hamcrest-core)))
7372 (home-page "https://github.com/xerial/xerial-java")
7373 (synopsis "Data management libraries for Java")
7374 (description "Xerial is a set of data management libraries for the Java
7375 programming language. The ultimate goal of the Xerial project is to manage
7376 everything as database, including class objects, text format data, data
7378 (license license:asl2.0)))
7380 (define-public java-powermock-reflect
7382 (name "java-powermock-reflect")
7386 (uri (string-append "https://github.com/powermock/powermock/"
7387 "archive/powermock-" version ".tar.gz"))
7388 (file-name (string-append name "-" version ".tar.gz"))
7391 "0sbgi5vqq7k72wzcdjb20s370vyd4hsbnx71pzb8ishml3gy7fwy"))
7393 (search-patches "java-powermock-fix-java-files.patch"))))
7394 (build-system ant-build-system)
7396 `(#:jar-name "java-powermock-reflect.jar"
7398 #:source-dir "powermock-reflect/src/main/java"
7399 #:test-dir "powermock-reflect/src/test"))
7401 `(("java-objenesis" ,java-objenesis)))
7403 `(("junit" ,java-junit)
7404 ("cglib" ,java-cglib)
7406 ("hamcrest" ,java-hamcrest-core)
7407 ("assertj" ,java-assertj)))
7408 (home-page "https://github.com/powermock/powermock")
7409 (synopsis "Mock library extension framework")
7410 (description "PowerMock is a framework that extends other mock libraries
7411 such as EasyMock with more powerful capabilities. PowerMock uses a custom
7412 classloader and bytecode manipulation to enable mocking of static methods,
7413 constructors, final classes and methods, private methods, removal of static
7414 initializers and more. By using a custom classloader no changes need to be
7415 done to the IDE or continuous integration servers which simplifies adoption.")
7416 (license license:asl2.0)))
7418 (define-public java-powermock-core
7420 (inherit java-powermock-reflect)
7421 (name "java-powermock-core")
7423 `(#:jar-name "java-powermock-core.jar"
7424 #:source-dir "powermock-core/src/main/java"
7425 #:test-dir "powermock-core/src/test"
7426 #:tests? #f; requires powermock-api
7429 (modify-phases %standard-phases
7430 (add-before 'build 'copy-resources
7432 (copy-recursively "powermock-core/src/main/resources"
7433 "build/classes"))))))
7435 `(("reflect" ,java-powermock-reflect)
7436 ("javassist" ,java-jboss-javassist)))
7438 `(("junit" ,java-junit)
7439 ("assertj" ,java-assertj)
7440 ("mockito" ,java-mockito-1)))))
7442 (define-public java-powermock-api-support
7444 (inherit java-powermock-reflect)
7445 (name "java-powermock-api-support")
7446 (build-system ant-build-system)
7448 `(#:jar-name "java-powermock-api-support.jar"
7450 #:source-dir "powermock-api/powermock-api-support/src/main/java"
7451 #:tests? #f)); no tests
7453 `(("core" ,java-powermock-core)
7454 ("reflect" ,java-powermock-reflect)))))
7456 (define-public java-powermock-modules-junit4-common
7458 (inherit java-powermock-reflect)
7459 (name "java-powermock-modules-junit4-common")
7460 (build-system ant-build-system)
7462 `(#:jar-name "java-powermock-modules-junit4-common.jar"
7464 #:source-dir "powermock-modules/powermock-module-junit4-common/src/main/java"
7465 #:test-dir "powermock-modules/powermock-module-junit4-common/src/test"))
7467 `(("core" ,java-powermock-core)
7468 ("easymock" ,java-easymock)
7469 ("reflect" ,java-powermock-reflect)
7470 ("hamcrest" ,java-hamcrest-core)
7471 ("cglib" ,java-cglib)))))
7473 (define-public java-powermock-modules-junit4
7475 (inherit java-powermock-reflect)
7476 (name "java-powermock-modules-junit4")
7477 (build-system ant-build-system)
7479 `(#:jar-name "java-powermock-modules-junit4.jar"
7481 #:source-dir "powermock-modules/powermock-module-junit4/src/main/java"
7482 #:test-dir "powermock-modules/powermock-module-junit4/src/test"
7484 (modify-phases %standard-phases
7485 (add-before 'build 'fix-junit-detection
7487 ;; Our junit version is 4.12-SNAPSHOT
7488 (substitute* (find-files "powermock-modules/powermock-module-junit4"
7489 "PowerMockJUnit4MethodValidator.java")
7490 (("4.12") "4.12-SNAPSHOT")))))))
7492 `(("core" ,java-powermock-core)
7493 ("reflect" ,java-powermock-reflect)
7494 ("common" ,java-powermock-modules-junit4-common)
7495 ("cglib" ,java-cglib)))
7497 `(("easymock" ,java-easymock)
7498 ("hamcrest" ,java-hamcrest-core)
7499 ("objenesis" ,java-objenesis)
7501 ("junit" ,java-junit)))))
7503 (define-public java-powermock-api-easymock
7505 (inherit java-powermock-reflect)
7506 (name "java-powermock-api-easymock")
7507 (build-system ant-build-system)
7509 `(#:jar-name "java-powermock-api-easymock.jar"
7511 #:source-dir "powermock-api/powermock-api-easymock/src/main/java"
7512 #:tests? #f; no tests
7514 (modify-phases %standard-phases
7515 (add-before 'build 'fix-file
7517 ;; FIXME: This looks wrong, but it fixes a build error.
7518 (with-directory-excursion "powermock-api/powermock-api-easymock"
7519 (substitute* "src/main/java/org/powermock/api/easymock/PowerMock.java"
7520 (("classLoader instanceof MockClassLoader") "false")
7521 (("\\(\\(MockClassLoader\\) classLoader\\).*;") ";")))
7524 `(("core" ,java-powermock-core)
7525 ("easymock" ,java-easymock)
7526 ("reflect" ,java-powermock-reflect)
7527 ("support" ,java-powermock-api-support)
7528 ("cglib" ,java-cglib)))))
7530 (define-public java-jboss-jms-api-spec
7532 (name "java-jboss-jms-api-spec")
7536 (uri (string-append "https://github.com/jboss/jboss-jms-api_spec/"
7537 "archive/jboss-jms-api_" version
7538 "_spec-1.0.1.Final.tar.gz"))
7541 "07bqblw9kq2i8q92bz70fvavq5xjfkaixl8xa0m0cypjgy82rb7m"))))
7542 (build-system ant-build-system)
7544 `(#:jar-name "java-jboss-jms-api_spec.jar"
7547 #:tests? #f)); no tests
7548 (home-page "https://github.com/jboss/jboss-jms-api_spec")
7549 (synopsis "Java Message Service API specification")
7550 (description "Java Message Service (JMS) API is used to send messages
7551 messages between two or more clients. It is a messaging standard that allows
7552 application components to create, send, receive, and read messages.")
7553 ; either gpl2 only with GPL Classpath Exception, or cddl.
7554 (license (list license:gpl2 license:cddl1.0))))
7556 (define-public java-mail
7562 (uri (string-append "https://github.com/javaee/javamail/archive/"
7563 "JAVAMAIL-1_6_0.tar.gz"))
7566 "1b4rg7fpj50ld90a71iz2m4gm3f5cnw18p3q3rbrrryjip46kx92"))))
7567 (build-system ant-build-system)
7569 `(#:jar-name "java-mail.jar"
7571 #:source-dir "mail/src/main/java"
7572 #:test-dir "mail/src/test"
7574 (list "**/CollectorFormatterTest.java"
7575 "**/CompactFormatterTest.java"
7576 "**/DurationFilterTest.java"
7577 "**/MailHandlerTest.java"
7578 "**/GetLocalAddressTest.java"
7579 ;; FIXME: both end with:
7580 ;; java.lang.ClassNotFoundException:
7581 ;; javax.mail.internet.MimeMultipartParseTest
7582 "**/MimeMultipartParseTest.java"
7583 "**/SearchTermSerializationTest.java")
7585 (modify-phases %standard-phases
7586 (add-before 'configure 'move-version.java
7588 (copy-file "mail/src/main/resources/javax/mail/Version.java"
7589 "mail/src/main/java/javax/mail/Version.java")
7591 (add-before 'build 'copy-resources
7593 (copy-recursively "mail/src/main/resources/META-INF"
7594 "build/classes/META-INF")
7597 `(("junit" ,java-junit)
7598 ("hamcrest" ,java-hamcrest-core)))
7599 (home-page "https://javaee.github.io/javamail/")
7600 (synopsis "Mail-related functionnalities in Java")
7601 (description "The JavaMail API provides a platform-independent and
7602 protocol-independent framework to build mail and messaging applications.")
7603 ;; General Public License Version 2 only ("GPL") or the Common Development
7604 ;; and Distribution License("CDDL")
7605 (license (list license:cddl1.1
7606 license:gpl2)))); with classpath exception
7608 (define-public java-jeromq
7610 (name "java-jeromq")
7614 (uri (string-append "https://github.com/zeromq/jeromq/archive/v"
7616 (file-name (string-append name "-" version ".tar.gz"))
7619 "17wx8dlyqmbw77xf6d6wxnhiyky6181zpf1a48jqzz9hidz0j841"))))
7620 (build-system ant-build-system)
7622 `(#:jar-name "java-jeromq.jar"
7623 #:source-dir "src/main/java"
7629 "**/ZBeaconTest.java"
7631 "**/CustomDecoderTest.java"
7632 "**/CustomEncoderTest.java")))
7634 `(("java-jnacl" ,java-jnacl)))
7636 `(("java-hamcrest-core" ,java-hamcrest-core)
7637 ("junit" ,java-junit)))
7638 (home-page "http://zeromq.org/bindings:java")
7639 (synopsis "Java binding for 0MQ")
7640 (description "Jeromq provides the java bindings for 0MQ.")
7641 (license license:mpl2.0)))
7643 (define-public java-kafka-clients
7645 (name "java-kafka-clients")
7649 (uri (string-append "mirror://apache/kafka/" version "/kafka-"
7650 version "-src.tgz"))
7653 "1yxmnsmliwm7671q5yy9bl4jdqyyn00n26cggz9brwczx80w1vfq"))))
7654 (build-system ant-build-system)
7656 `(#:jar-name "java-kafka-clients.jar"
7658 #:source-dir "clients/src/main/java"
7659 #:test-dir "clients/src/test"
7662 ;; This file does not contain a class
7663 "**/IntegrationTest.java"
7665 "**/ClientUtilsTest.java"
7666 ;; End with errors that seem related to our powermock
7667 "**/KafkaProducerTest.java"
7668 "**/BufferPoolTest.java")))
7670 `(("java-slf4j-api" ,java-slf4j-api)
7671 ("java-lz4" ,java-lz4)))
7673 `(("junit" ,java-junit)
7674 ("hamcrest" ,java-hamcrest-all)
7675 ("objenesis" ,java-objenesis)
7677 ("cglib" ,java-cglib)
7678 ("javassist" ,java-jboss-javassist)
7679 ("snappy" ,java-snappy)
7680 ("easymock" ,java-easymock)
7681 ("powermock" ,java-powermock-core)
7682 ("powermock-easymock" ,java-powermock-api-easymock)
7683 ("powermock-junit4-common" ,java-powermock-modules-junit4-common)
7684 ("powermock-junit4" ,java-powermock-modules-junit4)
7685 ("powermock-support" ,java-powermock-api-support)
7686 ("bouncycastle" ,java-bouncycastle-bcprov)
7687 ("bouncycastle-bcpkix" ,java-bouncycastle-bcpkix)))
7688 (home-page "https://kafka.apache.org")
7689 (synopsis "Distributed streaming platform")
7690 (description "Kafka is a distributed streaming platform, which means:
7692 @item it can publish and subscribe to streams of records;
7693 @item it can store streams of records in a fault-tolerant way;
7694 @item it can process streams of records as they occur.
7696 ;; Either cddl or gpl2 only.
7697 (license (list license:cddl1.1; actually cddl1.1
7698 license:gpl2)))); with classpath exception
7700 (define-public java-jdom
7706 (uri (string-append "http://jdom.org/dist/binary/archive/jdom-"
7710 "07wdpm3jwwc9q38kmdw40fvbmv6jzjrkrf8m0zqs58f79a672wfl"))))
7711 (build-system ant-build-system)
7713 `(#:build-target "package"
7714 #:tests? #f; tests are run as part of the build process
7716 (modify-phases %standard-phases
7718 (install-jars "build")))))
7719 (home-page "http://jdom.org/")
7720 (synopsis "Access, manipulate, and output XML data")
7721 (description "Java-based solution for accessing, manipulating, and
7722 outputting XML data from Java code.")
7723 (license license:bsd-4)))
7725 (define-public java-geronimo-xbean-reflect
7727 (name "java-geronimo-xbean-reflect")
7732 (url "https://svn.apache.org/repos/asf/geronimo/xbean/tags/xbean-4.5/")
7733 (revision 1807396)))
7734 (file-name (string-append name "-" version))
7737 "18q3i6jgm6rkw8aysfgihgywrdc5nvijrwnslmi3ww497jvri6ja"))))
7738 (build-system ant-build-system)
7740 `(#:jar-name "geronimo-xbean-reflect.jar"
7741 #:source-dir "xbean-reflect/src/main/java"
7742 #:test-dir "xbean-reflect/src/test"
7745 (list "**/Abstract*.java" "**/AsmParameterNameLoaderTest.java"
7746 "**/ObjectRecipeTest.java" "**/ParameterNameLoaderTest.java"
7747 "**/RecipeHelperTest.java" "**/XbeanAsmParameterNameLoaderTest.java")
7749 (modify-phases %standard-phases
7750 (add-before 'build 'fix-source
7752 (let ((dir "xbean-reflect/src/main/java/org/apache/xbean/recipe/"))
7753 ;; org.apache.xbean.asm6 is actually repackaged java-asm
7754 (substitute* (string-append dir "XbeanAsmParameterNameLoader.java")
7755 (("org.apache.xbean.asm5") "org.objectweb.asm"))
7759 ("log4j" ,java-log4j-api)
7760 ("log4j-1.2" ,java-log4j-1.2-api)
7761 ("log4j-core" ,java-log4j-core)
7762 ("logging" ,java-commons-logging-minimal)))
7764 `(("junit" ,java-junit)))
7765 (home-page "https://geronimo.apache.org/maven/xbean/3.6/xbean-reflect/")
7766 (synopsis "Dependency injection helper")
7767 (description "Xbean-reflect provides very flexible ways to create objects
7768 and graphs of objects for dependency injection frameworks")
7769 (license license:asl2.0)))