1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2015, 2016, 2017, 2018 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-threading=switch" ; slower but prevents segfault
173 "--with-internal-libffi=no"
174 "--with-internal-libpopt=no")
176 (modify-phases %standard-phases
177 (add-after 'unpack 'remove-timestamp-for-reproducibility
179 (substitute* "src/sablevm/Makefile.in"
180 (("\\$\\(SVMCOMPILETIME\\)") "(unknown)"))
182 (add-after 'unpack 'link-with-popt
184 (substitute* "src/sablevm/Makefile.in"
185 (("\\$\\(SVMADD\\)" match)
186 (string-append match " -lpopt")))
188 (add-after 'unpack 'patch-path-to-classpath
189 (lambda* (#:key inputs #:allow-other-keys)
190 (substitute* "Makefile.in"
191 (("@datadir@/sablevm-classpath")
192 (string-append (assoc-ref inputs "classpath")
193 "/share/sablevm-classpath")))
194 (substitute* "src/libsablevm/Makefile.in"
195 (("\\$\\(libdir\\)/sablevm-classpath")
196 (string-append (assoc-ref inputs "classpath")
197 "/lib/sablevm-classpath"))
198 (("\\$\\(datadir\\)/sablevm-classpath")
199 (string-append (assoc-ref inputs "classpath")
200 "/share/sablevm-classpath")))
203 `(("classpath" ,sablevm-classpath)
209 `(("libltdl" ,libltdl)))
210 (home-page "http://sablevm.org/")
211 (synopsis "Java Virtual Machine")
212 (description "SableVM is a clean-room, highly portable and efficient Java
213 virtual machine. Its goals are to be reasonably small, fast, and compliant
214 with the various specifications (JVM specification, JNI, invocation interface,
215 etc.). SableVM is no longer maintained.
217 This package provides the virtual machine.")
218 (license license:lgpl2.1+)))
220 (define ant-bootstrap
222 (name "ant-bootstrap")
223 ;; The 1.10.x series requires Java 8. 1.9.0 and later use generics, which
224 ;; are not supported. The 1.8.x series is the last to use only features
225 ;; supported by Jikes, but it cannot seem to be built with sablevm.
229 (uri (string-append "http://archive.apache.org/dist/"
230 "ant/source/apache-ant-"
231 version "-src.tar.bz2"))
234 "19pvqvgkxgpgsqm4lvbki5sm0z84kxmykdqicvfad47gc1r9mi2d"))))
235 (build-system gnu-build-system)
237 `(#:tests? #f ; no "check" target
239 (modify-phases %standard-phases
242 (lambda* (#:key inputs #:allow-other-keys)
244 (string-append (assoc-ref inputs "sablevm")
247 (string-append (assoc-ref inputs "sablevm")
248 "/bin/java-sablevm"))
250 (string-append (assoc-ref inputs "sablevm")
251 "/bin/javac-sablevm"))
253 ;; Use jikes instead of javac for <javac ...> tags in build.xml
254 (setenv "ANT_OPTS" "-Dbuild.compiler=jikes")
256 ;; jikes produces lots of warnings, but they are not very
257 ;; interesting, so we silence them.
258 (setenv "$BOOTJAVAC_OPTS" "-nowarn")
260 ;; Disable tests because we are bootstrapping and thus don't have
261 ;; any of the dependencies required to build and run the tests.
262 (substitute* "build.xml"
263 (("depends=\"jars,test-jar\"") "depends=\"jars\""))
264 (zero? (system* "bash" "bootstrap.sh"
265 (string-append "-Ddist.dir="
266 (assoc-ref %outputs "out"))))))
270 ("sablevm" ,sablevm)))
271 (home-page "http://ant.apache.org")
272 (synopsis "Build tool for Java")
274 "Ant is a platform-independent build tool for Java. It is similar to
275 make but is implemented using the Java language, requires the Java platform,
276 and is best suited to building Java projects. Ant uses XML to describe the
277 build process and its dependencies, whereas Make uses Makefile format.")
278 (license license:asl2.0)))
280 ;; Version 3.2.2 is the last version without a dependency on a full-fledged
281 ;; compiler for Java 1.5.
282 (define ecj-bootstrap
284 (name "ecj-bootstrap")
288 (uri (string-append "http://archive.eclipse.org/eclipse/"
289 "downloads/drops/R-" version
290 "-200702121330/ecjsrc.zip"))
293 "05hj82kxd23qaglsjkaqcj944riisjha7acf7h3ljhrjyljx8307"))))
294 ;; It would be so much easier if we could use the ant-build-system, but we
295 ;; cannot as we don't have ant at this point. We use ecj for
296 ;; bootstrapping the JDK.
297 (build-system gnu-build-system)
299 `(#:modules ((guix build gnu-build-system)
302 #:tests? #f ; there are no tests
304 (modify-phases %standard-phases
306 (lambda* (#:key inputs #:allow-other-keys)
309 (find-files (string-append (assoc-ref inputs "ant-bootstrap")
315 (lambda* (#:key inputs #:allow-other-keys)
316 ;; The unpack phase enters the "org" directory by mistake.
319 ;; Create a simple manifest to make ecj executable.
320 (with-output-to-file "manifest"
322 (display "Manifest-Version: 1.0
323 Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n")))
326 (and (zero? (apply system* "javac-sablevm"
327 (find-files "." "\\.java$")))
328 (zero? (system* "fastjar" "cvfm"
329 "ecj-bootstrap.jar" "manifest" ".")))))
331 (lambda* (#:key outputs #:allow-other-keys)
332 (let ((share (string-append (assoc-ref outputs "out")
335 (install-file "ecj-bootstrap.jar" share)
338 `(("ant-bootstrap" ,ant-bootstrap)
341 ("fastjar" ,fastjar)))
342 (home-page "https://eclipse.org")
343 (synopsis "Eclipse Java development tools core batch compiler")
344 (description "This package provides the Eclipse Java core batch compiler
345 for bootstrapping purposes. The @dfn{Eclipse compiler for Java} (ecj) is a
346 requirement for all GNU Classpath releases after version 0.93.")
347 (license license:epl1.0)))
349 (define ecj-javac-wrapper
350 (package (inherit ecj-bootstrap)
351 (name "ecj-javac-wrapper")
353 (build-system trivial-build-system)
355 `(#:modules ((guix build utils))
357 (let ((backend 'sablevm))
358 (use-modules (guix build utils))
359 (let* ((bin (string-append (assoc-ref %outputs "out") "/bin"))
360 (target (string-append bin "/javac"))
361 (guile (string-append (assoc-ref %build-inputs "guile")
363 (ecj (string-append (assoc-ref %build-inputs "ecj-bootstrap")
364 "/share/java/ecj-bootstrap.jar"))
367 (string-append (assoc-ref %build-inputs "sablevm")
368 "/lib/sablevm/bin/java"))
370 (string-append (assoc-ref %build-inputs "jamvm")
372 (bootcp (case backend
374 (let ((jvmlib (string-append
375 (assoc-ref %build-inputs "sablevm-classpath")
377 (string-append jvmlib "/jre/lib/rt.jar")))
379 (let ((jvmlib (string-append (assoc-ref %build-inputs "classpath")
380 "/share/classpath")))
381 (string-append jvmlib "/lib/glibj.zip:"
382 jvmlib "/lib/tools.zip"))))))
384 (with-output-to-file target
386 (format #t "#!~a --no-auto-compile\n!#\n" guile)
388 `(begin (use-modules (ice-9 match)
394 '(("-bootclasspath" ,bootcp)
399 (let ((classpath (getenv "CLASSPATH")))
403 (string-append ":" classpath)
405 (receive (vm-args other-args)
406 ;; Separate VM arguments from arguments to ECJ.
407 (partition (cut string-prefix? "-J" <>)
408 (fold (lambda (default acc)
409 (if (member (first default) acc)
410 acc (append default acc)))
414 ;; Remove "-J" prefix
415 (map (cut string-drop <> 2) vm-args)
416 '("org.eclipse.jdt.internal.compiler.batch.Main")
417 (cons "-nowarn" other-args)))))
419 (let ((args (cdr (command-line))))
421 (format (current-error-port) "javac: no arguments given!\n")
426 `(("guile" ,guile-2.2)
427 ("ecj-bootstrap" ,ecj-bootstrap)
429 ("sablevm-classpath" ,sablevm-classpath)))
430 (description "This package provides a wrapper around the @dfn{Eclipse
431 compiler for Java} (ecj) with a command line interface that is compatible with
432 the standard javac executable.")))
434 ;; Note: All the tool wrappers (e.g. for javah, javac, etc) fail with
435 ;; java.lang.UnsupportedClassVersionError. They simply won't run on the old
436 ;; sablevm. We use Classpath 0.99 to build JamVM, on which the Classpath
437 ;; tools do run. Using these Classpath tools on JamVM we can then build the
438 ;; development version of GNU Classpath.
439 (define classpath-on-sablevm
445 (uri (string-append "mirror://gnu/classpath/classpath-"
449 "1j7cby4k66f1nvckm48xcmh352b1d1b33qk7l6hi7dp9i9zjjagr"))))
450 (build-system gnu-build-system)
453 (list (string-append "--with-ecj-jar="
454 (assoc-ref %build-inputs "ecj-bootstrap")
455 "/share/java/ecj-bootstrap.jar")
456 (string-append "JAVAC="
457 (assoc-ref %build-inputs "ecj-javac-wrapper")
459 (string-append "JAVA="
460 (assoc-ref %build-inputs "sablevm")
463 "ac_cv_prog_java_works=yes" ; trust me
467 "--disable-gconf-peer"
473 (modify-phases %standard-phases
474 (add-after 'install 'install-data
475 (lambda _ (zero? (system* "make" "install-data")))))))
477 `(("ecj-bootstrap" ,ecj-bootstrap)
478 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
481 ("sablevm-classpath" ,sablevm-classpath)
483 ("pkg-config" ,pkg-config)))
484 (home-page "https://www.gnu.org/software/classpath/")
485 (synopsis "Essential libraries for Java")
486 (description "GNU Classpath is a project to create core class libraries
487 for use with runtimes, compilers and tools for the Java programming
489 ;; GPLv2 or later, with special linking exception.
490 (license license:gpl2+)))
492 (define jamvm-bootstrap
498 (uri (string-append "mirror://sourceforge/jamvm/jamvm/"
499 "JamVM%20" version "/jamvm-"
503 "1nl0zxz8y5x8gwsrm7n32bry4dx8x70p8z3s9jbdvs8avyb8whkn"))))
504 (build-system gnu-build-system)
507 (list (string-append "--with-classpath-install-dir="
508 (assoc-ref %build-inputs "classpath")))))
510 `(("classpath" ,classpath-on-sablevm)
511 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
513 (home-page "http://jamvm.sourceforge.net/")
514 (synopsis "Small Java Virtual Machine")
515 (description "JamVM is a Java Virtual Machine conforming to the JVM
516 specification edition 2 (blue book). It is extremely small. However, unlike
517 other small VMs it supports the full spec, including object finalisation and
519 (license license:gpl2+)))
521 ;; We need this because the tools provided by the latest release of GNU
522 ;; Classpath don't actually work with sablevm.
523 (define classpath-jamvm-wrappers
524 (package (inherit classpath-on-sablevm)
525 (name "classpath-jamvm-wrappers")
527 (build-system trivial-build-system)
529 `(#:modules ((guix build utils))
532 (use-modules (guix build utils))
533 (let* ((bash (assoc-ref %build-inputs "bash"))
534 (jamvm (assoc-ref %build-inputs "jamvm"))
535 (classpath (assoc-ref %build-inputs "classpath"))
536 (bin (string-append (assoc-ref %outputs "out")
539 (for-each (lambda (tool)
540 (with-output-to-file (string-append bin tool)
542 (format #t "#!~a/bin/sh
543 ~a/bin/jamvm -classpath ~a/share/classpath/tools.zip \
544 gnu.classpath.tools.~a.~a $@"
545 bash jamvm classpath tool
546 (if (string=? "native2ascii" tool)
547 "Native2ASCII" "Main"))))
548 (chmod (string-append bin tool) #o755))
558 ("jamvm" ,jamvm-bootstrap)
559 ("classpath" ,classpath-on-sablevm)))
561 (synopsis "Executables from GNU Classpath")
562 (description "This package provides wrappers around the tools provided by
563 the GNU Classpath library. They are executed by the JamVM virtual
566 (define ecj-javac-on-jamvm-wrapper
567 (package (inherit ecj-javac-wrapper)
568 (name "ecj-javac-on-jamvm-wrapper")
570 `(#:modules ((guix build utils))
572 ;; TODO: This builder is exactly the same as in ecj-javac-wrapper,
573 ;; except that the backend is 'jamvm here. Can we reuse the same
575 (let ((backend 'jamvm))
576 (use-modules (guix build utils))
577 (let* ((bin (string-append (assoc-ref %outputs "out") "/bin"))
578 (target (string-append bin "/javac"))
579 (guile (string-append (assoc-ref %build-inputs "guile")
581 (ecj (string-append (assoc-ref %build-inputs "ecj-bootstrap")
582 "/share/java/ecj-bootstrap.jar"))
585 (string-append (assoc-ref %build-inputs "sablevm")
586 "/lib/sablevm/bin/java"))
588 (string-append (assoc-ref %build-inputs "jamvm")
590 (bootcp (case backend
592 (let ((jvmlib (string-append
593 (assoc-ref %build-inputs "sablevm-classpath")
595 (string-append jvmlib "/jre/lib/rt.jar")))
597 (let ((jvmlib (string-append (assoc-ref %build-inputs "classpath")
598 "/share/classpath")))
599 (string-append jvmlib "/lib/glibj.zip:"
600 jvmlib "/lib/tools.zip"))))))
602 (with-output-to-file target
604 (format #t "#!~a --no-auto-compile\n!#\n" guile)
606 `(begin (use-modules (ice-9 match)
612 '(("-bootclasspath" ,bootcp)
617 (let ((classpath (getenv "CLASSPATH")))
621 (string-append ":" classpath)
623 (receive (vm-args other-args)
624 ;; Separate VM arguments from arguments to ECJ.
625 (partition (cut string-prefix? "-J" <>)
626 (fold (lambda (default acc)
627 (if (member (first default) acc)
628 acc (append default acc)))
632 ;; Remove "-J" prefix
633 (map (cut string-drop <> 2) vm-args)
634 '("org.eclipse.jdt.internal.compiler.batch.Main")
635 (cons "-nowarn" other-args)))))
637 (let ((args (cdr (command-line))))
639 (format (current-error-port) "javac: no arguments given!\n")
644 `(("guile" ,guile-2.2)
645 ("ecj-bootstrap" ,ecj-bootstrap)
646 ("jamvm" ,jamvm-bootstrap)
647 ("classpath" ,classpath-on-sablevm)))
648 (description "This package provides a wrapper around the @dfn{Eclipse
649 compiler for Java} (ecj) with a command line interface that is compatible with
650 the standard javac executable. The tool runs on JamVM instead of SableVM.")))
652 ;; The last release of GNU Classpath is 0.99 and it happened in 2012. Since
653 ;; then Classpath has gained much more support for Java 1.6.
654 (define-public classpath-devel
655 (let ((commit "e7c13ee0cf2005206fbec0eca677f8cf66d5a103")
657 (package (inherit classpath-on-sablevm)
658 (version (string-append "0.99-" revision "." (string-take commit 9)))
662 (url "https://git.savannah.gnu.org/git/classpath.git")
664 (file-name (string-append "classpath-" version "-checkout"))
667 "1v2rww76ww322mpg3s12a1kkc6gkp31bm9gcxs532h0wq285fiw4"))))
670 ;; Ensure that the initial heap size is smaller than the maximum
671 ;; size. By default only Xmx is set, which can lead to invalid
672 ;; memory settings on some machines with a lot of memory.
673 '("JAVAC_MEM_OPT=-J-Xms512M -J-Xmx768M")
675 (list (string-append "--with-ecj-jar="
676 (assoc-ref %build-inputs "ecj-bootstrap")
677 "/share/java/ecj-bootstrap.jar")
678 (string-append "--with-javac="
679 (assoc-ref %build-inputs "ecj-javac-wrapper")
681 (string-append "JAVA="
682 (assoc-ref %build-inputs "jamvm")
685 "ac_cv_prog_java_works=yes" ; trust me
689 "--disable-gconf-peer"
695 (modify-phases %standard-phases
696 (add-after 'unpack 'remove-unsupported-annotations
698 (substitute* (find-files "java" "\\.java$")
701 (add-after 'install 'install-data
702 (lambda _ (zero? (system* "make" "install-data")))))))
704 `(("autoconf" ,autoconf)
705 ("automake" ,automake)
707 ("gettext" ,gettext-minimal)
709 ("classpath-jamvm-wrappers" ,classpath-jamvm-wrappers) ; for javah
710 ("ecj-bootstrap" ,ecj-bootstrap)
711 ("ecj-javac-wrapper" ,ecj-javac-on-jamvm-wrapper)
713 ("jamvm" ,jamvm-bootstrap)
715 ("pkg-config" ,pkg-config))))))
718 (package (inherit jamvm-bootstrap)
720 `(("classpath" ,classpath-devel)
721 ("ecj-javac-wrapper" ,ecj-javac-on-jamvm-wrapper)
724 (define ecj-javac-on-jamvm-wrapper-final
725 (package (inherit ecj-javac-on-jamvm-wrapper)
727 `(("guile" ,guile-2.2)
728 ("ecj-bootstrap" ,ecj-bootstrap)
730 ("classpath" ,classpath-devel)))))
732 ;; The bootstrap JDK consisting of jamvm, classpath-devel,
733 ;; ecj-javac-on-jamvm-wrapper-final cannot build Icedtea 2.x directly, because
734 ;; it's written in Java 7. It can, however, build the unmaintained Icedtea
735 ;; 1.x, which uses Java 6 only.
736 (define-public icedtea-6
743 "http://icedtea.wildebeest.org/download/source/icedtea6-"
747 "0bg9sb4f7qbq77c0zf9m17p47ga0kf0r9622g9p12ysg26jd1ksg"))
748 (modules '((guix build utils)))
750 '(substitute* "Makefile.in"
751 ;; do not leak information about the build host
752 (("DISTRIBUTION_ID=\"\\$\\(DIST_ID\\)\"")
753 "DISTRIBUTION_ID=\"\\\"guix\\\"\"")))))
754 (build-system gnu-build-system)
755 (outputs '("out" ; Java Runtime Environment
756 "jdk" ; Java Development Kit
757 "doc")) ; all documentation
759 `(;; There are many failing tests and many are known to fail upstream.
762 ;; The DSOs use $ORIGIN to refer to each other, but (guix build
763 ;; gremlin) doesn't support it yet, so skip this phase.
764 #:validate-runpath? #f
766 #:modules ((guix build utils)
767 (guix build gnu-build-system)
771 `("--enable-bootstrap"
774 "--with-parallel-jobs"
775 "--disable-downloading"
777 ,(string-append "--with-ecj="
778 (assoc-ref %build-inputs "ecj")
779 "/share/java/ecj-bootstrap.jar")
780 ,(string-append "--with-jar="
781 (assoc-ref %build-inputs "fastjar")
783 ,(string-append "--with-jdk-home="
784 (assoc-ref %build-inputs "classpath"))
785 ,(string-append "--with-java="
786 (assoc-ref %build-inputs "jamvm")
789 (modify-phases %standard-phases
791 (lambda* (#:key source inputs #:allow-other-keys)
792 (and (zero? (system* "tar" "xvf" source))
794 (chdir (string-append "icedtea6-" ,version))
796 (copy-recursively (assoc-ref inputs "openjdk-src") "openjdk")
797 ;; The convenient OpenJDK source bundle is no longer
798 ;; available for download, so we have to take the sources
799 ;; from the Mercurial repositories and change the Makefile
800 ;; to avoid tests for the OpenJDK zip archive.
801 (with-directory-excursion "openjdk"
802 (for-each (lambda (part)
806 (string-append part "-src"))
808 '("jdk" "hotspot" "corba"
809 "langtools" "jaxp" "jaxws")))
810 (substitute* "Makefile.in"
811 (("echo \"ERROR: No up-to-date OpenJDK zip available\"; exit -1;")
812 "echo \"trust me\";")
813 ;; The contents of the bootstrap directory must be
814 ;; writeable but when copying from the store they are
816 (("mkdir -p lib/rt" line)
817 (string-append line "; chmod -R u+w $(BOOT_DIR)")))
818 (zero? (system* "chmod" "-R" "u+w" "openjdk"))
820 (add-after 'unpack 'use-classpath
821 (lambda* (#:key inputs #:allow-other-keys)
822 (let ((jvmlib (assoc-ref inputs "classpath")))
823 ;; Classpath does not provide rt.jar.
824 (substitute* "Makefile.in"
825 (("\\$\\(SYSTEM_JDK_DIR\\)/jre/lib/rt.jar")
826 (string-append jvmlib "/share/classpath/glibj.zip")))
827 ;; Make sure we can find all classes.
829 (string-append jvmlib "/share/classpath/glibj.zip:"
830 jvmlib "/share/classpath/tools.zip"))
832 (string-append "-cp "
833 jvmlib "/share/classpath/glibj.zip:"
834 jvmlib "/share/classpath/tools.zip")))
836 (add-after 'unpack 'patch-patches
838 ;; shebang in patches so that they apply cleanly
839 (substitute* '("patches/jtreg-jrunscript.patch"
840 "patches/hotspot/hs23/drop_unlicensed_test.patch")
841 (("#!/bin/sh") (string-append "#!" (which "sh"))))
843 (add-after 'unpack 'patch-paths
844 (lambda* (#:key inputs #:allow-other-keys)
845 ;; buildtree.make generates shell scripts, so we need to replace
846 ;; the generated shebang
847 (substitute* '("openjdk/hotspot/make/linux/makefiles/buildtree.make")
848 (("/bin/sh") (which "bash")))
850 (let ((corebin (string-append
851 (assoc-ref inputs "coreutils") "/bin/"))
852 (binbin (string-append
853 (assoc-ref inputs "binutils") "/bin/"))
854 (grepbin (string-append
855 (assoc-ref inputs "grep") "/bin/")))
856 (substitute* '("openjdk/jdk/make/common/shared/Defs-linux.gmk"
857 "openjdk/corba/make/common/shared/Defs-linux.gmk")
858 (("UNIXCOMMAND_PATH = /bin/")
859 (string-append "UNIXCOMMAND_PATH = " corebin))
860 (("USRBIN_PATH = /usr/bin/")
861 (string-append "USRBIN_PATH = " corebin))
862 (("DEVTOOLS_PATH *= */usr/bin/")
863 (string-append "DEVTOOLS_PATH = " corebin))
864 (("COMPILER_PATH *= */usr/bin/")
865 (string-append "COMPILER_PATH = "
866 (assoc-ref inputs "gcc") "/bin/"))
867 (("DEF_OBJCOPY *=.*objcopy")
868 (string-append "DEF_OBJCOPY = " (which "objcopy"))))
870 ;; fix path to alsa header
871 (substitute* "openjdk/jdk/make/common/shared/Sanity.gmk"
872 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
873 (string-append "ALSA_INCLUDE="
874 (assoc-ref inputs "alsa-lib")
875 "/include/alsa/version.h")))
877 ;; fix hard-coded utility paths
878 (substitute* '("openjdk/jdk/make/common/shared/Defs-utils.gmk"
879 "openjdk/corba/make/common/shared/Defs-utils.gmk")
881 (string-append "ECHO = " (which "echo")))
883 (string-append "GREP = " (which "grep")))
885 (string-append "EGREP = " (which "egrep")))
887 (string-append "CPIO = " (which "cpio")))
888 (("READELF *=.*readelf")
889 (string-append "READELF = " (which "readelf")))
891 (string-append "AR = " (which "ar")))
893 (string-append "TAR = " (which "tar")))
895 (string-append "AS = " (which "as")))
897 (string-append "LD = " (which "ld")))
899 (string-append "STRIP = " (which "strip")))
901 (string-append "NM = " (which "nm")))
903 (string-append "SH = " (which "bash")))
905 (string-append "FIND = " (which "find")))
907 (string-append "LDD = " (which "ldd")))
908 (("NAWK *=.*(n|g)awk")
909 (string-append "NAWK = " (which "gawk")))
911 (string-append "XARGS = " (which "xargs")))
913 (string-append "UNZIP = " (which "unzip")))
915 (string-append "ZIPEXE = " (which "zip")))
917 (string-append "SED = " (which "sed"))))
919 ;; Some of these timestamps cause problems as they are more than
920 ;; 10 years ago, failing the build process.
922 "openjdk/jdk/src/share/classes/java/util/CurrencyData.properties"
923 (("AZ=AZM;2005-12-31-20-00-00;AZN") "AZ=AZN")
924 (("MZ=MZM;2006-06-30-22-00-00;MZN") "MZ=MZN")
925 (("RO=ROL;2005-06-30-21-00-00;RON") "RO=RON")
926 (("TR=TRL;2004-12-31-22-00-00;TRY") "TR=TRY"))
928 (add-before 'configure 'set-additional-paths
929 (lambda* (#:key inputs #:allow-other-keys)
931 (string-append (assoc-ref inputs "libxrender")
932 "/include/X11/extensions" ":"
933 (assoc-ref inputs "libxtst")
934 "/include/X11/extensions" ":"
935 (assoc-ref inputs "libxinerama")
936 "/include/X11/extensions" ":"
937 (or (getenv "CPATH") "")))
938 (setenv "ALT_CUPS_HEADERS_PATH"
939 (string-append (assoc-ref inputs "cups")
941 (setenv "ALT_FREETYPE_HEADERS_PATH"
942 (string-append (assoc-ref inputs "freetype")
944 (setenv "ALT_FREETYPE_LIB_PATH"
945 (string-append (assoc-ref inputs "freetype")
949 (lambda* (#:key outputs #:allow-other-keys)
950 (let ((doc (string-append (assoc-ref outputs "doc")
951 "/share/doc/icedtea"))
952 (jre (assoc-ref outputs "out"))
953 (jdk (assoc-ref outputs "jdk")))
954 (copy-recursively "openjdk.build/docs" doc)
955 (copy-recursively "openjdk.build/j2re-image" jre)
956 (copy-recursively "openjdk.build/j2sdk-image" jdk))
959 `(("ant" ,ant-bootstrap)
960 ("alsa-lib" ,alsa-lib)
962 ("classpath" ,classpath-devel)
963 ("coreutils" ,coreutils)
966 ("ecj" ,ecj-bootstrap)
967 ("ecj-javac" ,ecj-javac-on-jamvm-wrapper-final)
969 ("fontconfig" ,fontconfig)
970 ("freetype" ,freetype)
981 ("libxcomposite" ,libxcomposite)
983 ("libxinerama" ,libxinerama)
984 ("libxrender" ,libxrender)
985 ("libxslt" ,libxslt) ;for xsltproc
988 ("mit-krb5" ,mit-krb5)
990 ("nss-certs" ,nss-certs)
992 ("pkg-config" ,pkg-config)
993 ("procps" ,procps) ;for "free", even though I'm not sure we should use it
1003 (url "http://hg.openjdk.java.net/jdk6/jdk6/")
1004 (changeset "jdk6-b41")))
1007 "14q47yfg586fs64w30g8mk92m5dkxsvr36zzh0ra99xk5x0x96mv"))))
1012 (url "http://hg.openjdk.java.net/jdk6/jdk6/jdk/")
1013 (changeset "jdk6-b41")))
1016 "165824nhg1k1dx6zs9dny0j49rmk35jw5b13dmz8c77jfajml4v9"))))
1021 (url "http://hg.openjdk.java.net/jdk6/jdk6/hotspot/")
1022 (changeset "jdk6-b41")))
1025 "07lc1z4k5dj9nrc1wvwmpvxr3xgxrdkdh53xb95skk5ij49yagfd"))))
1030 (url "http://hg.openjdk.java.net/jdk6/jdk6/corba/")
1031 (changeset "jdk6-b41")))
1034 "1p9g1r9dnax2iwp7yb59qx7m4nmshqhwmrb2b8jj8zgbd9dl2i3q"))))
1039 (url "http://hg.openjdk.java.net/jdk6/jdk6/langtools/")
1040 (changeset "jdk6-b41")))
1043 "1x52wd67fynbbd9ild6fb4wvba3f5hhwk03qdjfazd0a1qr37z3d"))))
1048 (url "http://hg.openjdk.java.net/jdk6/jdk6/jaxp/")
1049 (changeset "jdk6-b41")))
1052 "0shlqrvzpr4nrkmv215lbxnby63s3yvbdh1yxcayznsyqwa4nlxm"))))
1057 (url "http://hg.openjdk.java.net/jdk6/jdk6/jaxws/")
1058 (changeset "jdk6-b41")))
1061 "0835lkw8vib1xhp8lxnybhlvzdh699hbi4mclxanydjk63zbpxk0"))))))
1062 (home-page "http://icedtea.classpath.org")
1063 (synopsis "Java development kit")
1065 "This package provides the OpenJDK built with the IcedTea build harness.
1066 This version of the OpenJDK is no longer maintained and is only used for
1067 bootstrapping purposes.")
1068 ;; IcedTea is released under the GPL2 + Classpath exception, which is the
1069 ;; same license as both GNU Classpath and OpenJDK.
1070 (license license:gpl2+)))
1072 (define-public icedtea-7
1073 (let* ((version "2.6.12")
1074 (drop (lambda (name hash)
1078 "http://icedtea.classpath.org/download/drops"
1079 "/icedtea7/" version "/" name ".tar.bz2"))
1080 (sha256 (base32 hash))))))
1087 "http://icedtea.wildebeest.org/download/source/icedtea-"
1091 "0s0zh0mj1sab99kb516lsgq3859vsc951phc565gwix4l5g9zppk"))
1092 (modules '((guix build utils)))
1094 '(substitute* "Makefile.in"
1095 ;; do not leak information about the build host
1096 (("DISTRIBUTION_ID=\"\\$\\(DIST_ID\\)\"")
1097 "DISTRIBUTION_ID=\"\\\"guix\\\"\"")))))
1098 (build-system gnu-build-system)
1099 (outputs '("out" ; Java Runtime Environment
1100 "jdk" ; Java Development Kit
1101 "doc")) ; all documentation
1103 `(;; There are many test failures. Some are known to
1104 ;; fail upstream, others relate to not having an X
1105 ;; server running at test time, yet others are a
1106 ;; complete mystery to me.
1108 ;; hotspot: passed: 241; failed: 45; error: 2
1109 ;; langtools: passed: 1,934; failed: 26
1113 ;; The DSOs use $ORIGIN to refer to each other, but (guix build
1114 ;; gremlin) doesn't support it yet, so skip this phase.
1115 #:validate-runpath? #f
1117 ;; Apparently, the C locale is needed for some of the tests.
1120 #:modules ((guix build utils)
1121 (guix build gnu-build-system)
1128 ;; TODO: package pcsc and sctp, and add to inputs
1129 `("--disable-system-pcsc"
1130 "--disable-system-sctp"
1131 "--enable-bootstrap"
1134 "--disable-downloading"
1135 "--disable-tests" ;they are run in the check phase instead
1136 "--with-openjdk-src-dir=./openjdk.src"
1137 ,(string-append "--with-jdk-home="
1138 (assoc-ref %build-inputs "jdk")))
1141 (modify-phases %standard-phases
1143 (lambda* (#:key source inputs #:allow-other-keys)
1144 (let ((target (string-append "icedtea-" ,version))
1145 (unpack (lambda* (name #:optional dir)
1147 (string-drop-right name 5))))
1149 (zero? (system* "tar" "xvf"
1150 (assoc-ref inputs name)
1152 "--strip-components=1"))))))
1155 (zero? (system* "tar" "xvf" source
1156 "-C" target "--strip-components=1"))
1158 (unpack "openjdk-src" "openjdk.src")
1159 (with-directory-excursion "openjdk.src"
1161 (filter (cut string-suffix? "-drop" <>)
1166 (add-after 'unpack 'fix-x11-extension-include-path
1167 (lambda* (#:key inputs #:allow-other-keys)
1168 (substitute* "openjdk.src/jdk/make/sun/awt/mawt.gmk"
1169 (((string-append "\\$\\(firstword \\$\\(wildcard "
1170 "\\$\\(OPENWIN_HOME\\)"
1171 "/include/X11/extensions\\).*$"))
1172 (string-append (assoc-ref inputs "libxrender")
1173 "/include/X11/extensions"
1174 " -I" (assoc-ref inputs "libxtst")
1175 "/include/X11/extensions"
1176 " -I" (assoc-ref inputs "libxinerama")
1177 "/include/X11/extensions"))
1178 (("\\$\\(wildcard /usr/include/X11/extensions\\)\\)") ""))
1180 (add-after 'unpack 'patch-paths
1182 ;; buildtree.make generates shell scripts, so we need to replace
1183 ;; the generated shebang
1184 (substitute* '("openjdk.src/hotspot/make/linux/makefiles/buildtree.make")
1185 (("/bin/sh") (which "bash")))
1187 (let ((corebin (string-append
1188 (assoc-ref %build-inputs "coreutils") "/bin/"))
1189 (binbin (string-append
1190 (assoc-ref %build-inputs "binutils") "/bin/"))
1191 (grepbin (string-append
1192 (assoc-ref %build-inputs "grep") "/bin/")))
1193 (substitute* '("openjdk.src/jdk/make/common/shared/Defs-linux.gmk"
1194 "openjdk.src/corba/make/common/shared/Defs-linux.gmk")
1195 (("UNIXCOMMAND_PATH = /bin/")
1196 (string-append "UNIXCOMMAND_PATH = " corebin))
1197 (("USRBIN_PATH = /usr/bin/")
1198 (string-append "USRBIN_PATH = " corebin))
1199 (("DEVTOOLS_PATH *= */usr/bin/")
1200 (string-append "DEVTOOLS_PATH = " corebin))
1201 (("COMPILER_PATH *= */usr/bin/")
1202 (string-append "COMPILER_PATH = "
1203 (assoc-ref %build-inputs "gcc") "/bin/"))
1204 (("DEF_OBJCOPY *=.*objcopy")
1205 (string-append "DEF_OBJCOPY = " (which "objcopy"))))
1207 ;; fix path to alsa header
1208 (substitute* "openjdk.src/jdk/make/common/shared/Sanity.gmk"
1209 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
1210 (string-append "ALSA_INCLUDE="
1211 (assoc-ref %build-inputs "alsa-lib")
1212 "/include/alsa/version.h")))
1214 ;; fix hard-coded utility paths
1215 (substitute* '("openjdk.src/jdk/make/common/shared/Defs-utils.gmk"
1216 "openjdk.src/corba/make/common/shared/Defs-utils.gmk")
1218 (string-append "ECHO = " (which "echo")))
1220 (string-append "GREP = " (which "grep")))
1221 (("EGREP *=.*egrep")
1222 (string-append "EGREP = " (which "egrep")))
1224 (string-append "CPIO = " (which "cpio")))
1225 (("READELF *=.*readelf")
1226 (string-append "READELF = " (which "readelf")))
1228 (string-append "AR = " (which "ar")))
1230 (string-append "TAR = " (which "tar")))
1232 (string-append "AS = " (which "as")))
1234 (string-append "LD = " (which "ld")))
1235 (("STRIP *=.*strip")
1236 (string-append "STRIP = " (which "strip")))
1238 (string-append "NM = " (which "nm")))
1240 (string-append "SH = " (which "bash")))
1242 (string-append "FIND = " (which "find")))
1244 (string-append "LDD = " (which "ldd")))
1245 (("NAWK *=.*(n|g)awk")
1246 (string-append "NAWK = " (which "gawk")))
1247 (("XARGS *=.*xargs")
1248 (string-append "XARGS = " (which "xargs")))
1249 (("UNZIP *=.*unzip")
1250 (string-append "UNZIP = " (which "unzip")))
1252 (string-append "ZIPEXE = " (which "zip")))
1254 (string-append "SED = " (which "sed"))))
1256 ;; Some of these timestamps cause problems as they are more than
1257 ;; 10 years ago, failing the build process.
1259 "openjdk.src/jdk/src/share/classes/java/util/CurrencyData.properties"
1260 (("AZ=AZM;2005-12-31-20-00-00;AZN") "AZ=AZN")
1261 (("MZ=MZM;2006-06-30-22-00-00;MZN") "MZ=MZN")
1262 (("RO=ROL;2005-06-30-21-00-00;RON") "RO=RON")
1263 (("TR=TRL;2004-12-31-22-00-00;TRY") "TR=TRY")))
1265 (add-before 'configure 'set-additional-paths
1266 (lambda* (#:key inputs #:allow-other-keys)
1267 (substitute* "openjdk.src/jdk/make/common/shared/Sanity.gmk"
1268 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
1269 (string-append "ALSA_INCLUDE="
1270 (assoc-ref inputs "alsa-lib")
1271 "/include/alsa/version.h")))
1274 (string-append (assoc-ref inputs "libxcomposite")
1275 "/include/X11/extensions" ":"
1276 (assoc-ref inputs "libxrender")
1277 "/include/X11/extensions" ":"
1278 (assoc-ref inputs "libxtst")
1279 "/include/X11/extensions" ":"
1280 (assoc-ref inputs "libxinerama")
1281 "/include/X11/extensions" ":"
1282 (or (getenv "CPATH") "")))
1283 (setenv "ALT_OBJCOPY" (which "objcopy"))
1284 (setenv "ALT_CUPS_HEADERS_PATH"
1285 (string-append (assoc-ref inputs "cups")
1287 (setenv "ALT_FREETYPE_HEADERS_PATH"
1288 (string-append (assoc-ref inputs "freetype")
1290 (setenv "ALT_FREETYPE_LIB_PATH"
1291 (string-append (assoc-ref inputs "freetype")
1294 (add-before 'check 'fix-test-framework
1296 ;; Fix PATH in test environment
1297 (substitute* "test/jtreg/com/sun/javatest/regtest/Main.java"
1298 (("PATH=/bin:/usr/bin")
1299 (string-append "PATH=" (getenv "PATH"))))
1300 (substitute* "test/jtreg/com/sun/javatest/util/SysEnv.java"
1301 (("/usr/bin/env") (which "env")))
1302 (substitute* "openjdk.src/hotspot/test/test_env.sh"
1303 (("/bin/rm") (which "rm"))
1304 (("/bin/cp") (which "cp"))
1305 (("/bin/mv") (which "mv")))
1307 (add-before 'check 'fix-hotspot-tests
1309 (with-directory-excursion "openjdk.src/hotspot/test/"
1310 (substitute* "jprt.config"
1311 (("PATH=\"\\$\\{path4sdk\\}\"")
1312 (string-append "PATH=" (getenv "PATH")))
1313 (("make=/usr/bin/make")
1314 (string-append "make=" (which "make"))))
1315 (substitute* '("runtime/6626217/Test6626217.sh"
1316 "runtime/7110720/Test7110720.sh")
1317 (("/bin/rm") (which "rm"))
1318 (("/bin/cp") (which "cp"))
1319 (("/bin/mv") (which "mv"))))
1321 (add-before 'check 'fix-jdk-tests
1323 (with-directory-excursion "openjdk.src/jdk/test/"
1324 (substitute* "com/sun/jdi/JdbReadTwiceTest.sh"
1325 (("/bin/pwd") (which "pwd")))
1326 (substitute* "com/sun/jdi/ShellScaffold.sh"
1327 (("/bin/kill") (which "kill")))
1328 (substitute* "start-Xvfb.sh"
1329 ;;(("/usr/bin/X11/Xvfb") (which "Xvfb"))
1330 (("/usr/bin/nohup") (which "nohup")))
1331 (substitute* "javax/security/auth/Subject/doAs/Test.sh"
1332 (("/bin/rm") (which "rm")))
1333 (substitute* "tools/launcher/MultipleJRE.sh"
1334 (("echo \"#!/bin/sh\"")
1335 (string-append "echo \"#!" (which "rm") "\""))
1336 (("/usr/bin/zip") (which "zip")))
1337 (substitute* "com/sun/jdi/OnThrowTest.java"
1338 (("#!/bin/sh") (string-append "#!" (which "sh"))))
1339 (substitute* "java/lang/management/OperatingSystemMXBean/GetSystemLoadAverage.java"
1340 (("/usr/bin/uptime") (which "uptime")))
1341 (substitute* "java/lang/ProcessBuilder/Basic.java"
1342 (("/usr/bin/env") (which "env"))
1343 (("/bin/false") (which "false"))
1344 (("/bin/true") (which "true"))
1345 (("/bin/cp") (which "cp"))
1346 (("/bin/sh") (which "sh")))
1347 (substitute* "java/lang/ProcessBuilder/FeelingLucky.java"
1348 (("/bin/sh") (which "sh")))
1349 (substitute* "java/lang/ProcessBuilder/Zombies.java"
1350 (("/usr/bin/perl") (which "perl"))
1351 (("/bin/ps") (which "ps"))
1352 (("/bin/true") (which "true")))
1353 (substitute* "java/lang/Runtime/exec/ConcurrentRead.java"
1354 (("/usr/bin/tee") (which "tee")))
1355 (substitute* "java/lang/Runtime/exec/ExecWithDir.java"
1356 (("/bin/true") (which "true")))
1357 (substitute* "java/lang/Runtime/exec/ExecWithInput.java"
1358 (("/bin/cat") (which "cat")))
1359 (substitute* "java/lang/Runtime/exec/ExitValue.java"
1360 (("/bin/sh") (which "sh"))
1361 (("/bin/true") (which "true"))
1362 (("/bin/kill") (which "kill")))
1363 (substitute* "java/lang/Runtime/exec/LotsOfDestroys.java"
1364 (("/usr/bin/echo") (which "echo")))
1365 (substitute* "java/lang/Runtime/exec/LotsOfOutput.java"
1366 (("/usr/bin/cat") (which "cat")))
1367 (substitute* "java/lang/Runtime/exec/SleepyCat.java"
1368 (("/bin/cat") (which "cat"))
1369 (("/bin/sleep") (which "sleep"))
1370 (("/bin/sh") (which "sh")))
1371 (substitute* "java/lang/Runtime/exec/StreamsSurviveDestroy.java"
1372 (("/bin/cat") (which "cat")))
1373 (substitute* "java/rmi/activation/CommandEnvironment/SetChildEnv.java"
1374 (("/bin/chmod") (which "chmod")))
1375 (substitute* "java/util/zip/ZipFile/Assortment.java"
1376 (("/bin/sh") (which "sh"))))
1380 ;; The "make check-*" targets always return zero, so we need to
1381 ;; check for errors in the associated log files to determine
1382 ;; whether any tests have failed.
1383 (use-modules (ice-9 rdelim))
1384 (let* ((error-pattern (make-regexp "^(Error|FAILED):.*"))
1385 (checker (lambda (port)
1387 (let ((line (read-line port)))
1389 ((eof-object? line) #t)
1390 ((regexp-exec error-pattern line) #f)
1392 (run-test (lambda (test)
1393 (system* "make" test)
1394 (call-with-input-file
1395 (string-append "test/" test ".log")
1398 (and (run-test "check-hotspot")
1399 (run-test "check-langtools")
1400 (run-test "check-jdk"))))))
1402 (lambda* (#:key outputs #:allow-other-keys)
1403 (let ((doc (string-append (assoc-ref outputs "doc")
1404 "/share/doc/icedtea"))
1405 (jre (assoc-ref outputs "out"))
1406 (jdk (assoc-ref outputs "jdk")))
1407 (copy-recursively "openjdk.build/docs" doc)
1408 (copy-recursively "openjdk.build/j2re-image" jre)
1409 (copy-recursively "openjdk.build/j2sdk-image" jdk))
1411 ;; Some of the libraries in the lib/amd64 folder link to libjvm.so.
1412 ;; But that shared object is located in the server/ folder, so it
1413 ;; cannot be found. This phase creates a symbolic link in the
1414 ;; lib/amd64 folder so that the other libraries can find it.
1417 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
1419 ;; FIXME: Find the bug in the build system, so that this symlink is
1421 (add-after 'install 'install-libjvm
1422 (lambda* (#:key inputs outputs #:allow-other-keys)
1423 (let* ((lib-path (string-append (assoc-ref outputs "out")
1425 (symlink (string-append lib-path "/server/libjvm.so")
1426 (string-append lib-path "/libjvm.so")))
1428 ;; By default IcedTea only generates an empty keystore. In order to
1429 ;; be able to use certificates in Java programs we need to generate a
1430 ;; keystore from a set of certificates. For convenience we use the
1431 ;; certificates from the nss-certs package.
1432 (add-after 'install 'install-keystore
1433 (lambda* (#:key inputs outputs #:allow-other-keys)
1434 (let* ((keystore "cacerts")
1435 (certs-dir (string-append (assoc-ref inputs "nss-certs")
1437 (keytool (string-append (assoc-ref outputs "jdk")
1439 (define (extract-cert file target)
1440 (call-with-input-file file
1442 (call-with-output-file target
1444 (let loop ((line (read-line in 'concat))
1447 ((eof-object? line) #t)
1448 ((string-prefix? "-----BEGIN" line)
1450 (loop (read-line in 'concat) #t))
1451 ((string-prefix? "-----END" line)
1455 (when copying? (display line out))
1456 (loop (read-line in 'concat) copying?)))))))))
1457 (define (import-cert cert)
1458 (format #t "Importing certificate ~a\n" (basename cert))
1459 (let ((temp "tmpcert"))
1460 (extract-cert cert temp)
1461 (let ((port (open-pipe* OPEN_WRITE keytool
1463 "-alias" (basename cert)
1464 "-keystore" keystore
1465 "-storepass" "changeit"
1467 (display "yes\n" port)
1468 (when (not (zero? (status:exit-val (close-pipe port))))
1469 (format #t "failed to import ~a\n" cert)))
1470 (delete-file temp)))
1472 ;; This is necessary because the certificate directory contains
1473 ;; files with non-ASCII characters in their names.
1474 (setlocale LC_ALL "en_US.utf8")
1475 (setenv "LC_ALL" "en_US.utf8")
1477 (for-each import-cert (find-files certs-dir "\\.pem$"))
1478 (mkdir-p (string-append (assoc-ref outputs "out")
1480 (mkdir-p (string-append (assoc-ref outputs "jdk")
1481 "/jre/lib/security"))
1483 ;; The cacerts files we are going to overwrite are chmod'ed as
1484 ;; read-only (444) in icedtea-8 (which derives from this
1485 ;; package). We have to change this so we can overwrite them.
1486 (chmod (string-append (assoc-ref outputs "out")
1487 "/lib/security/" keystore) #o644)
1488 (chmod (string-append (assoc-ref outputs "jdk")
1489 "/jre/lib/security/" keystore) #o644)
1491 (install-file keystore
1492 (string-append (assoc-ref outputs "out")
1494 (install-file keystore
1495 (string-append (assoc-ref outputs "jdk")
1496 "/jre/lib/security"))
1501 "15qf3nfidgnigh2zny6djfp8bhfwjnwk9i06mxs2jbq6na953ql2"))
1504 "1phvn8fyl5mw2n2sn97f17nm442k75xsz2023bfw4h66ywzkqhqy"))
1507 "0j4ms6lmnfa2cwfh9yfqdfg1bnn3fc40ay4x6k8zqa8yvspik5w5"))
1510 "09sddj73k7n29s39hvdk14r130mvlknbxkpd2w58f34sq5sgpdrg"))
1513 "0q896zz8wyswmksy225q1k27nz3v3l27052dcvvpv20ryykz8yp7"))
1516 "0niicyfccim4a9is4akh87jd7wbl8jrazdaab957mcv9l1x3bnqc"))
1519 "1jw42qhbm3wfavk39304m53lmqipcllrvjqiab2f42mjs10i8gfx"))
1520 ("ant" ,ant-bootstrap)
1522 ("coreutils" ,coreutils)
1523 ("diffutils" ,diffutils) ;for tests
1526 ("libtool" ,libtool)
1527 ("pkg-config" ,pkg-config)
1533 ("fastjar" ,fastjar)
1534 ("libxslt" ,libxslt) ;for xsltproc
1535 ("nss-certs" ,nss-certs)
1537 ("procps" ,procps) ;for "free", even though I'm not sure we should use it
1538 ("jdk" ,icedtea-6 "jdk")))
1540 `(("alsa-lib" ,alsa-lib)
1543 ("libxcomposite" ,libxcomposite)
1545 ("libxtst" ,libxtst)
1547 ("libxinerama" ,libxinerama)
1548 ("libxrender" ,libxrender)
1549 ("libjpeg" ,libjpeg)
1551 ("mit-krb5" ,mit-krb5)
1554 ("fontconfig" ,fontconfig)
1555 ("freetype" ,freetype)
1559 (home-page "http://icedtea.classpath.org")
1560 (synopsis "Java development kit")
1562 "This package provides the Java development kit OpenJDK built with the
1563 IcedTea build harness.")
1564 ;; IcedTea is released under the GPL2 + Classpath exception, which is the
1565 ;; same license as both GNU Classpath and OpenJDK.
1566 (license license:gpl2+))))
1568 (define-public icedtea-8
1569 (let* ((version "3.6.0")
1570 (drop (lambda (name hash)
1574 "http://icedtea.classpath.org/download/drops"
1575 "/icedtea8/" version "/" name ".tar.xz"))
1576 (sha256 (base32 hash))))))
1577 (package (inherit icedtea-7)
1582 "http://icedtea.wildebeest.org/download/source/icedtea-"
1586 "0zj192zrrxqh6j1ywc3399gk2ycay9w8pvzcvvr2kvdkb37ak86h"))
1587 (modules '((guix build utils)))
1590 (substitute* "acinclude.m4"
1591 ;; Do not embed build time
1592 (("(DIST_ID=\"Custom build).*$" _ prefix)
1593 (string-append prefix "\"\n"))
1594 ;; Do not leak information about the build host
1595 (("DIST_NAME=\"\\$build_os\"")
1596 "DIST_NAME=\"guix\""))
1599 (substitute-keyword-arguments (package-arguments icedtea-7)
1600 ((#:configure-flags flags)
1601 `(let ((jdk (assoc-ref %build-inputs "jdk")))
1602 `(;;"--disable-bootstrap"
1603 "--enable-bootstrap"
1605 "--disable-downloading"
1606 "--disable-system-pcsc"
1607 "--disable-system-sctp"
1608 "--disable-tests" ;they are run in the check phase instead
1609 "--with-openjdk-src-dir=./openjdk.src"
1610 ,(string-append "--with-jdk-home=" jdk))))
1612 `(modify-phases ,phases
1613 (delete 'fix-x11-extension-include-path)
1614 (delete 'patch-paths)
1615 (delete 'set-additional-paths)
1616 (delete 'patch-patches)
1617 (add-after 'unpack 'patch-jni-libs
1618 ;; Hardcode dynamically loaded libraries.
1620 (let* ((library-path (search-path-as-string->list
1621 (getenv "LIBRARY_PATH")))
1622 (find-library (lambda (name)
1625 (string-append "lib" name ".so")))))
1628 (catch 'decoding-error
1631 (("VERSIONED_JNI_LIB_NAME\\(\"(.*)\", \"(.*)\"\\)"
1633 (format #f "\"~a\"" (find-library name)))
1634 (("JNI_LIB_NAME\\(\"(.*)\"\\)" _ name)
1635 (format #f "\"~a\"" (find-library name)))))
1637 ;; Those are safe to skip.
1638 (format (current-error-port)
1639 "warning: failed to substitute: ~a~%"
1641 (find-files "openjdk.src/jdk/src/solaris/native"
1645 (lambda* (#:key outputs #:allow-other-keys)
1646 (let ((doc (string-append (assoc-ref outputs "doc")
1647 "/share/doc/icedtea"))
1648 (jre (assoc-ref outputs "out"))
1649 (jdk (assoc-ref outputs "jdk")))
1650 (copy-recursively "openjdk.build/docs" doc)
1651 (copy-recursively "openjdk.build/images/j2re-image" jre)
1652 (copy-recursively "openjdk.build/images/j2sdk-image" jdk)
1653 ;; Install the nss.cfg file to JRE to enable SSL/TLS
1655 (copy-file (string-append jdk "/jre/lib/security/nss.cfg")
1656 (string-append jre "/lib/security/nss.cfg"))
1659 `(("jdk" ,icedtea-7 "jdk")
1662 "0mqxh81kq05z4wydkik0yrr81ibf84xmwsdcw9n2gfrzs4f5jxnb"))
1665 "0b207g2n6kn510zf5vwh58bsxgqrmkvrna4p20r74v9cwcwx83n2"))
1668 "0qinc1q4w01nkr9klhfyd8caxvyrrfxjrz32nd7kgyja2bj8x7dd"))
1671 "07azrp3g86vk2laybmr5xfn0yrljkxs0rlm1q48385br225bgdxi"))
1674 "018fd2hq57zp3pq06wlxy5pabqcyk36xi8hk0d6xk3a90wsjvyik"))
1677 "0vs488kq5j2cc6kplc78jbhfxwq4fn06l34xrbq4d6y17777arg8"))
1680 "04f6d1wvck5jrpvrcw5gsbzxnihcry9zrf1v85czdm959q21zv9c"))
1683 "1mfgpzyr6zzy9klf8nn3z6d41fydb9ghpfpqzjq3cl95axfbdl1g"))
1686 "1a26cmzbs50gkh4rmmmxls7zljx62vfp1wq02gsfd5jqs4xvlibj"))
1689 "11hmn9mwmvryfddcanzx3qffjm8bbiv18nwv3iy9cswrvxjy010f"))
1690 ,@(fold alist-delete (package-native-inputs icedtea-7)
1691 '("jdk" "openjdk-src" "corba-drop" "jaxp-drop" "jaxws-drop"
1692 "jdk-drop" "langtools-drop" "hotspot-drop")))))))
1694 (define-public icedtea icedtea-7)
1697 (define-public ant/java8
1698 (package (inherit ant-bootstrap)
1703 (uri (string-append "mirror://apache/ant/source/apache-ant-"
1704 version "-src.tar.gz"))
1707 "10p3dh77lkzzzcy32dk9azljixzadp46fggjfbvgkl8mmb8cxxv8"))
1708 (modules '((guix build utils)))
1711 (for-each delete-file
1712 (find-files "lib/optional" "\\.jar$"))
1715 (substitute-keyword-arguments (package-arguments ant-bootstrap)
1717 `(modify-phases ,phases
1718 (add-after 'unpack 'remove-scripts
1719 ;; Remove bat / cmd scripts for DOS as well as the antRun and runant
1722 (for-each delete-file
1723 (find-files "src/script"
1724 "(.*\\.(bat|cmd)|runant.*|antRun.*)"))
1727 (lambda* (#:key inputs outputs #:allow-other-keys)
1728 (setenv "JAVA_HOME" (assoc-ref inputs "jdk"))
1730 ;; Disable tests to avoid dependency on hamcrest-core, which needs
1731 ;; Ant to build. This is necessary in addition to disabling the
1732 ;; "check" phase, because the dependency on "test-jar" would always
1733 ;; result in the tests to be run.
1734 (substitute* "build.xml"
1735 (("depends=\"jars,test-jar\"") "depends=\"jars\""))
1736 (zero? (system* "bash" "bootstrap.sh"
1737 (string-append "-Ddist.dir="
1738 (assoc-ref outputs "out"))))))))))
1740 `(("jdk" ,icedtea-8 "jdk")))))
1742 ;; The 1.9.x series is the last that can be built with GCJ. The 1.10.x series
1745 (package (inherit ant/java8)
1749 (uri (string-append "mirror://apache/ant/source/apache-ant-"
1750 version "-src.tar.gz"))
1753 "1k28mka0m3isy9yr8gz84kz1f3f879rwaxrd44vdn9xbfwvwk86n"))))
1755 `(("jdk" ,icedtea-7 "jdk")))))
1757 (define-public ant-apache-bcel
1760 (name "ant-apache-bcel")
1762 (substitute-keyword-arguments (package-arguments ant/java8)
1764 `(modify-phases ,phases
1765 (add-after 'unpack 'link-bcel
1766 (lambda* (#:key inputs #:allow-other-keys)
1767 (for-each (lambda (file)
1769 (string-append "lib/optional/"
1771 (find-files (assoc-ref inputs "java-commons-bcel")
1774 (add-after 'build 'install
1775 (lambda* (#:key outputs #:allow-other-keys)
1776 (let* ((out (assoc-ref outputs "out"))
1777 (share (string-append out "/share/java"))
1778 (bin (string-append out "/bin"))
1779 (lib (string-append out "/lib")))
1781 (install-file (string-append lib "/ant-apache-bcel.jar") share)
1782 (delete-file-recursively bin)
1783 (delete-file-recursively lib)
1786 `(("java-commons-bcel" ,java-commons-bcel)
1787 ,@(package-inputs ant/java8)))))
1789 (define-public ant-junit
1794 (substitute-keyword-arguments (package-arguments ant/java8)
1796 `(modify-phases ,phases
1797 (add-after 'unpack 'link-junit
1798 (lambda* (#:key inputs #:allow-other-keys)
1799 (for-each (lambda (file)
1801 (string-append "lib/optional/"
1803 (find-files (assoc-ref inputs "java-junit")
1806 (add-after 'build 'install
1807 (lambda* (#:key outputs #:allow-other-keys)
1808 (let* ((out (assoc-ref outputs "out"))
1809 (share (string-append out "/share/java"))
1810 (bin (string-append out "/bin"))
1811 (lib (string-append out "/lib")))
1813 (install-file (string-append lib "/ant-junit.jar") share)
1814 (delete-file-recursively bin)
1815 (delete-file-recursively lib)
1818 `(("java-junit" ,java-junit)
1819 ,@(package-inputs ant/java8)))))
1821 (define-public clojure
1822 (let* ((remove-archives '(begin
1823 (for-each delete-file
1824 (find-files "." ".*\\.(jar|zip)"))
1826 (submodule (lambda (prefix version hash)
1829 (uri (string-append "https://github.com/clojure/"
1830 prefix version ".tar.gz"))
1831 (sha256 (base32 hash))
1832 (modules '((guix build utils)))
1833 (snippet remove-archives)))))
1841 (string-append "https://github.com/clojure/clojure/archive/clojure-"
1844 (base32 "0xjbzcw45z32vsn9pifp7ndysjzqswp5ig0jkjpivigh2ckkdzha"))
1845 (modules '((guix build utils)))
1846 (snippet remove-archives)))
1847 (build-system ant-build-system)
1849 `(#:modules ((guix build ant-build-system)
1855 #:test-target "test"
1857 (modify-phases %standard-phases
1858 (add-after 'unpack 'unpack-submodule-sources
1859 (lambda* (#:key inputs #:allow-other-keys)
1863 (with-directory-excursion name
1864 (or (zero? (system* "tar"
1865 ;; Use xz for repacked tarball.
1869 "--file" (assoc-ref inputs name)
1870 "--strip-components=1"))
1871 (error "failed to unpack tarball" name)))
1872 (copy-recursively (string-append name "/src/main/clojure/")
1874 '("core-specs-alpha-src"
1875 "data-generators-src"
1878 "test-generative-src"
1879 "tools-namespace-src"))
1881 ;; The javadoc target is not built by default.
1882 (add-after 'build 'build-doc
1884 (zero? (system* "ant" "javadoc"))))
1885 ;; Needed since no install target is provided.
1887 (lambda* (#:key outputs #:allow-other-keys)
1888 (let ((java-dir (string-append (assoc-ref outputs "out")
1890 ;; Install versioned to avoid collisions.
1891 (install-file (string-append "clojure-" ,version ".jar")
1894 ;; Needed since no install-doc target is provided.
1895 (add-after 'install 'install-doc
1896 (lambda* (#:key outputs #:allow-other-keys)
1897 (let ((doc-dir (string-append (assoc-ref outputs "out")
1898 "/share/doc/clojure-"
1900 (copy-recursively "doc/clojure" doc-dir)
1901 (copy-recursively "target/javadoc/"
1902 (string-append doc-dir "javadoc/"))
1903 (for-each (cut install-file <> doc-dir)
1904 (filter (cut string-match
1905 ".*\\.(html|markdown|md|txt)"
1909 ;; The native-inputs below are needed to run the tests.
1911 `(("core-specs-alpha-src"
1912 ,(submodule "core.specs.alpha/archive/core.specs.alpha-"
1914 "0v2a0svf1ar2y42ajxwsjr7zmm5j7pp2zwrd2jh3k7xzd1p9x1fv"))
1915 ("data-generators-src"
1916 ,(submodule "data.generators/archive/data.generators-"
1918 "0kki093jp4ckwxzfnw8ylflrfqs8b1i1wi9iapmwcsy328dmgzp1"))
1920 ,(submodule "spec.alpha/archive/spec.alpha-"
1922 "00alf0347licdn773w2jarpllyrbl52qz4d8mw61anjksacxylzz"))
1924 ,(submodule "test.check/archive/test.check-"
1926 "0p0mnyhr442bzkz0s4k5ra3i6l5lc7kp6ajaqkkyh4c2k5yck1md"))
1927 ("test-generative-src"
1928 ,(submodule "test.generative/archive/test.generative-"
1930 "1pjafy1i7yblc7ixmcpfq1lfbyf3jaljvkgrajn70sws9xs7a9f8"))
1931 ("tools-namespace-src"
1932 ,(submodule "tools.namespace/archive/tools.namespace-"
1934 "10baak8v0hnwz2hr33bavshm7y49mmn9zsyyms1dwjz45p5ymhy0"))))
1935 (home-page "https://clojure.org/")
1936 (synopsis "Lisp dialect running on the JVM")
1937 (description "Clojure is a dynamic, general-purpose programming language,
1938 combining the approachability and interactive development of a scripting
1939 language with an efficient and robust infrastructure for multithreaded
1940 programming. Clojure is a compiled language, yet remains completely dynamic
1941 – every feature supported by Clojure is supported at runtime. Clojure
1942 provides easy access to the Java frameworks, with optional type hints and type
1943 inference, to ensure that calls to Java can avoid reflection.
1945 Clojure is a dialect of Lisp, and shares with Lisp the code-as-data philosophy
1946 and a powerful macro system. Clojure is predominantly a functional programming
1947 language, and features a rich set of immutable, persistent data structures.
1948 When mutable state is needed, Clojure offers a software transactional memory
1949 system and reactive Agent system that ensure clean, correct, multithreaded
1951 ;; Clojure is licensed under EPL1.0
1952 ;; ASM bytecode manipulation library is licensed under BSD-3
1953 ;; Guava Murmur3 hash implementation is licensed under APL2.0
1954 ;; src/clj/repl.clj is licensed under CPL1.0
1956 ;; See readme.html or readme.txt for details.
1957 (license (list license:epl1.0
1962 (define-public javacc
1968 (uri (string-append "https://github.com/javacc/javacc/"
1969 "archive/" version ".tar.gz"))
1970 (file-name (string-append "javacc-" version ".tar.gz"))
1973 "111xc9mnmc5a6qz6x3xbhqc07y1lg2b996ggzw0hrblg42zya9xf"))))
1974 (build-system ant-build-system)
1976 `(#:test-target "test"
1978 (modify-phases %standard-phases
1979 (add-after 'unpack 'delete-bundled-libs
1981 (delete-file-recursively "lib") #t))
1982 (replace 'install (install-jars "target")))))
1983 (home-page "https://javacc.org/")
1984 (synopsis "Java parser generator")
1985 (description "Java Compiler Compiler (JavaCC) is the most popular parser
1986 generator for use with Java applications. A parser generator is a tool that
1987 reads a grammar specification and converts it to a Java program that can
1988 recognize matches to the grammar. In addition to the parser generator itself,
1989 JavaCC provides other standard capabilities related to parser generation such
1990 as tree building (via a tool called JJTree included with JavaCC), actions,
1992 (license license:bsd-3)))
1994 (define-public javacc-4
1995 (package (inherit javacc)
2000 (url "https://github.com/javacc/javacc.git")
2001 (commit "release_41")))
2002 (file-name (string-append "javacc-" version "-checkout"))
2005 "07ysav7j8r1c6h8qxrgqk6lwdp74ly0ad1935lragxml0qqc3ka0"))))
2007 ;; /tmp/guix-build-javacc-4.1.drv-0/source/test/javacodeLA/build.xml:60:
2012 (modify-phases %standard-phases
2013 (add-after 'unpack 'delete-bundled-libs
2015 (delete-file-recursively "lib") #t))
2016 (replace 'install (install-jars "bin/lib")))))))
2018 (define-public java-classpathx-servletapi
2020 (name "java-classpathx-servletapi")
2024 (uri (string-append "mirror://gnu/classpathx/servletapi/"
2025 "servletapi-" version ".tar.gz"))
2028 "07d8h051siga2f33fra72hk12sbq1bxa4jifjg0qj0vfazjjff0x"))))
2029 (build-system ant-build-system)
2031 `(#:tests? #f ; there is no test target
2032 #:build-target "compile"
2034 (list "-Dbuild.compiler=javac1.8"
2035 (string-append "-Ddist=" (assoc-ref %outputs "out")))
2037 (modify-phases %standard-phases
2039 (lambda* (#:key make-flags #:allow-other-keys)
2040 (zero? (apply system* `("ant" "dist" ,@make-flags))))))))
2041 (home-page "https://www.gnu.org/software/classpathx/")
2042 (synopsis "Java servlet API implementation")
2043 (description "This is the GNU servlet API distribution, part of the
2044 ClasspathX project. It provides implementations of version 3.0 of the servlet
2045 API and version 2.1 of the Java ServerPages API.")
2046 (license license:gpl3+)))
2048 (define-public java-swt
2053 ;; The types of many variables and procedures differ in the sources
2054 ;; dependent on whether the target architecture is a 32-bit system or a
2055 ;; 64-bit system. Instead of patching the sources on demand in a build
2056 ;; phase we download either the 32-bit archive (which mostly uses "int"
2057 ;; types) or the 64-bit archive (which mostly uses "long" types).
2058 (let ((hash32 "09q0cbh90d90q3a7dx9430kc4m6bijrkr4lajrmzzvi0jjdpq4v9")
2059 (hash64 "17k5hs75a87ssmc5xhwdfdm2gn4zba0r837l2455za01krnkaa2q")
2062 (let-values (((hash file)
2063 (match (or (%current-target-system) (%current-system))
2064 ("x86_64-linux" (values hash64 file64))
2065 (_ (values hash32 file32)))))
2069 "http://download.eclipse.org/eclipse/downloads/drops4/"
2070 "R-" version "-201710090410/swt-" version
2071 "-gtk-linux-" file ".zip"))
2072 (sha256 (base32 hash))))))
2073 (build-system ant-build-system)
2075 `(#:jar-name "swt.jar"
2077 #:tests? #f ; no "check" target
2079 (modify-phases %standard-phases
2081 (lambda* (#:key source #:allow-other-keys)
2083 (zero? (system* "unzip" source "-d" "swt"))
2086 (zero? (system* "unzip" "src.zip" "-d" "src")))))
2087 ;; The classpath contains invalid icecat jars. Since we don't need
2088 ;; anything other than the JDK on the classpath, we can simply unset
2090 (add-after 'configure 'unset-classpath
2091 (lambda _ (unsetenv "CLASSPATH") #t))
2092 (add-before 'build 'build-native
2093 (lambda* (#:key inputs outputs #:allow-other-keys)
2094 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
2095 ;; Build shared libraries. Users of SWT have to set the system
2096 ;; property swt.library.path to the "lib" directory of this
2099 (setenv "OUTPUT_DIR" lib)
2100 (with-directory-excursion "src"
2101 (zero? (system* "bash" "build.sh"))))))
2102 (add-after 'install 'install-native
2103 (lambda* (#:key outputs #:allow-other-keys)
2104 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
2105 (for-each (lambda (file)
2106 (install-file file lib))
2107 (find-files "." "\\.so$"))
2111 ("libxtst" ,libxtst)
2116 `(("pkg-config" ,pkg-config)
2118 (home-page "https://www.eclipse.org/swt/")
2119 (synopsis "Widget toolkit for Java")
2121 "SWT is a widget toolkit for Java designed to provide efficient, portable
2122 access to the user-interface facilities of the operating systems on which it
2124 ;; SWT code is licensed under EPL1.0
2125 ;; Gnome and Gtk+ bindings contain code licensed under LGPLv2.1
2126 ;; Cairo bindings contain code under MPL1.1
2127 ;; XULRunner 1.9 bindings contain code under MPL2.0
2132 license:lgpl2.1+))))
2134 (define-public java-xz
2140 (uri (string-append "http://tukaani.org/xz/xz-java-" version ".zip"))
2143 "1z3p1ri1gvl07inxn0agx44ck8n7wrzfmvkz8nbq3njn8r9wba8x"))))
2144 (build-system ant-build-system)
2146 `(#:tests? #f ; There are no tests to run.
2147 #:jar-name ,(string-append "xz-" version ".jar")
2149 (modify-phases %standard-phases
2150 ;; The unpack phase enters the "maven" directory by accident.
2151 (add-after 'unpack 'chdir
2152 (lambda _ (chdir "..") #t)))))
2154 `(("unzip" ,unzip)))
2155 (home-page "https://tukaani.org/xz/java.html")
2156 (synopsis "Implementation of XZ data compression in pure Java")
2157 (description "This library aims to be a complete implementation of XZ data
2158 compression in pure Java. Single-threaded streamed compression and
2159 decompression and random access decompression have been fully implemented.")
2160 (license license:public-domain)))
2162 ;; java-hamcrest-core uses qdox version 1.12. We package this version instead
2163 ;; of the latest release.
2164 (define-public java-qdox-1.12
2170 (uri (string-append "http://central.maven.org/maven2/"
2171 "com/thoughtworks/qdox/qdox/" version
2172 "/qdox-" version "-sources.jar"))
2175 "0hlfbqq2avf5s26wxkksqmkdyk6zp9ggqn37c468m96mjv0n9xfl"))))
2176 (build-system ant-build-system)
2178 `(;; Tests require junit
2180 #:jar-name "qdox.jar"
2182 (modify-phases %standard-phases
2184 (lambda* (#:key source #:allow-other-keys)
2186 (with-directory-excursion "src"
2187 (zero? (system* "jar" "-xf" source)))))
2188 ;; At this point we don't have junit, so we must remove the API
2190 (add-after 'unpack 'delete-tests
2192 (delete-file-recursively "src/com/thoughtworks/qdox/junit")
2194 (home-page "http://qdox.codehaus.org/")
2195 (synopsis "Parse definitions from Java source files")
2197 "QDox is a high speed, small footprint parser for extracting
2198 class/interface/method definitions from source files complete with JavaDoc
2199 @code{@@tags}. It is designed to be used by active code generators or
2200 documentation tools.")
2201 (license license:asl2.0)))
2203 (define-public java-jarjar
2205 (name "java-jarjar")
2210 "https://storage.googleapis.com/google-code-archive-downloads/v2/"
2211 "code.google.com/jarjar/jarjar-src-" version ".zip"))
2214 "1v8irhni9cndcw1l1wxqgry013s2kpj0qqn57lj2ji28xjq8ndjl"))))
2215 (build-system ant-build-system)
2217 `(;; Tests require junit, which ultimately depends on this package.
2219 #:build-target "jar"
2221 (modify-phases %standard-phases
2223 (lambda* (#:key outputs #:allow-other-keys)
2224 (let ((target (string-append (assoc-ref outputs "out")
2226 (install-file (string-append "dist/jarjar-" ,version ".jar")
2230 `(("unzip" ,unzip)))
2231 (home-page "https://code.google.com/archive/p/jarjar/")
2232 (synopsis "Repackage Java libraries")
2234 "Jar Jar Links is a utility that makes it easy to repackage Java
2235 libraries and embed them into your own distribution. Jar Jar Links includes
2236 an Ant task that extends the built-in @code{jar} task.")
2237 (license license:asl2.0)))
2239 (define-public java-hamcrest-core
2241 (name "java-hamcrest-core")
2245 (uri (string-append "https://github.com/hamcrest/JavaHamcrest/"
2246 "archive/hamcrest-java-" version ".tar.gz"))
2249 "11g0s105fmwzijbv08lx8jlb521yravjmxnpgdx08fvg1kjivhva"))
2250 (modules '((guix build utils)))
2253 ;; Delete bundled thirds-party jar archives.
2254 (delete-file-recursively "lib")
2256 (build-system ant-build-system)
2258 `(#:tests? #f ; Tests require junit
2259 #:modules ((guix build ant-build-system)
2262 #:make-flags (list (string-append "-Dversion=" ,version))
2263 #:test-target "unit-test"
2264 #:build-target "core"
2266 (modify-phases %standard-phases
2267 ;; Disable unit tests, because they require junit, which requires
2268 ;; hamcrest-core. We also give a fixed value to the "Built-Date"
2269 ;; attribute from the manifest for reproducibility.
2270 (add-before 'configure 'patch-build.xml
2272 (substitute* "build.xml"
2273 (("unit-test, ") "")
2274 (("\\$\\{build.timestamp\\}") "guix"))
2276 ;; Java's "getMethods()" returns methods in an unpredictable order.
2277 ;; To make the output of the generated code deterministic we must
2278 ;; sort the array of methods.
2279 (add-after 'unpack 'make-method-order-deterministic
2281 (substitute* "hamcrest-generator/src/main/java/org/hamcrest/generator/ReflectiveFactoryReader.java"
2282 (("import java\\.util\\.Iterator;" line)
2283 (string-append line "\n"
2284 "import java.util.Arrays; import java.util.Comparator;"))
2285 (("allMethods = cls\\.getMethods\\(\\);" line)
2286 (string-append "_" line
2288 private Method[] getSortedMethods() {
2289 Arrays.sort(_allMethods, new Comparator<Method>() {
2291 public int compare(Method a, Method b) {
2292 return a.toString().compareTo(b.toString());
2298 private Method[] allMethods = getSortedMethods();")))))
2299 (add-before 'build 'do-not-use-bundled-qdox
2300 (lambda* (#:key inputs #:allow-other-keys)
2301 (substitute* "build.xml"
2302 (("lib/generator/qdox-1.12.jar")
2303 (string-append (assoc-ref inputs "java-qdox-1.12")
2304 "/share/java/qdox.jar")))
2306 ;; build.xml searches for .jar files in this directoy, which
2307 ;; we remove from the source archive.
2308 (add-before 'build 'create-dummy-directories
2310 (mkdir-p "lib/integration")
2313 (lambda* (#:key outputs #:allow-other-keys)
2314 (let* ((target (string-append (assoc-ref outputs "out")
2316 (version-suffix ,(string-append "-" version ".jar"))
2317 (install-without-version-suffix
2320 (string-append target
2321 (basename jar version-suffix)
2325 install-without-version-suffix
2328 (and (string-suffix? ".jar" name)
2329 (not (string-suffix? "-sources.jar" name)))))))
2332 `(("java-qdox-1.12" ,java-qdox-1.12)
2333 ("java-jarjar" ,java-jarjar)))
2334 (home-page "http://hamcrest.org/")
2335 (synopsis "Library of matchers for building test expressions")
2337 "This package provides a library of matcher objects (also known as
2338 constraints or predicates) allowing @code{match} rules to be defined
2339 declaratively, to be used in other frameworks. Typical scenarios include
2340 testing frameworks, mocking libraries and UI validation rules.")
2341 (license license:bsd-2)))
2343 (define-public java-junit
2349 (uri (string-append "https://github.com/junit-team/junit/"
2350 "archive/r" version ".tar.gz"))
2351 (file-name (string-append name "-" version ".tar.gz"))
2354 "090dn5v1vs0b3acyaqc0gjf6p8lmd2h24wfzsbq7sly6b214anws"))
2355 (modules '((guix build utils)))
2358 ;; Delete bundled jar archives.
2359 (delete-file-recursively "lib")
2361 (build-system ant-build-system)
2363 `(#:tests? #f ; no tests
2364 #:jar-name "junit.jar"))
2366 `(("java-hamcrest-core" ,java-hamcrest-core)))
2367 (home-page "http://junit.org/")
2368 (synopsis "Test framework for Java")
2370 "JUnit is a simple framework to write repeatable tests for Java projects.
2371 JUnit provides assertions for testing expected results, test fixtures for
2372 sharing common test data, and test runners for running tests.")
2373 (license license:epl1.0)))
2375 (define-public java-plexus-utils
2377 (name "java-plexus-utils")
2381 (uri (string-append "https://github.com/codehaus-plexus/"
2382 "plexus-utils/archive/plexus-utils-"
2386 "1mlwpc6fms24slygv5yvi6fi9hcha2fh0v73p5znpi78bg36i2js"))))
2387 (build-system ant-build-system)
2388 ;; FIXME: The default build.xml does not include a target to install
2391 `(#:jar-name "plexus-utils.jar"
2392 #:source-dir "src/main"
2394 (modify-phases %standard-phases
2395 (add-after 'unpack 'fix-reference-to-/bin-and-/usr
2397 (substitute* "src/main/java/org/codehaus/plexus/util/\
2398 cli/shell/BourneShell.java"
2399 (("/bin/sh") (which "sh"))
2400 (("/usr/") (getcwd)))
2402 (add-after 'unpack 'fix-or-disable-broken-tests
2404 (with-directory-excursion "src/test/java/org/codehaus/plexus/util"
2405 (substitute* '("cli/CommandlineTest.java"
2406 "cli/shell/BourneShellTest.java")
2407 (("/bin/sh") (which "sh"))
2408 (("/bin/echo") (which "echo")))
2410 ;; This test depends on MavenProjectStub, but we don't have
2411 ;; a package for Maven.
2412 (delete-file "introspection/ReflectionValueExtractorTest.java")
2414 ;; FIXME: The command line tests fail, maybe because they use
2416 (delete-file "cli/CommandlineTest.java"))
2419 `(("java-junit" ,java-junit)))
2420 (home-page "http://codehaus-plexus.github.io/plexus-utils/")
2421 (synopsis "Common utilities for the Plexus framework")
2422 (description "This package provides various Java utility classes for the
2423 Plexus framework to ease working with strings, files, command lines, XML and
2425 (license license:asl2.0)))
2427 (define-public java-plexus-interpolation
2429 (name "java-plexus-interpolation")
2433 (uri (string-append "https://github.com/codehaus-plexus/"
2434 "plexus-interpolation/archive/"
2435 "plexus-interpolation-" version ".tar.gz"))
2438 "03377yzlx5q440m6sxxgv6a5qb8fl30zzcgxgc0hxk5qgl2z1jjn"))))
2439 (build-system ant-build-system)
2441 `(#:jar-name "plexus-interpolation.jar"
2442 #:source-dir "src/main"))
2444 `(("java-junit" ,java-junit)
2445 ("java-hamcrest-core" ,java-hamcrest-core)))
2446 (home-page "http://codehaus-plexus.github.io/plexus-interpolation/")
2447 (synopsis "Java components for interpolating ${} strings and the like")
2448 (description "Plexus interpolator is a modular, flexible interpolation
2449 framework for the expression language style commonly seen in Maven, Plexus,
2450 and other related projects.
2452 It has its foundation in the @code{org.codehaus.plexus.utils.interpolation}
2453 package within @code{plexus-utils}, but has been separated in order to allow
2454 these two libraries to vary independently of one another.")
2455 (license license:asl2.0)))
2457 (define-public java-plexus-classworlds
2459 (name "java-plexus-classworlds")
2463 (uri (string-append "https://github.com/codehaus-plexus/"
2464 "plexus-classworlds/archive/plexus-classworlds-"
2468 "1qm4p0rl8d82lzhsiwnviw11jnq44s0gflg78zq152xyyr2xmh8g"))))
2469 (build-system ant-build-system)
2471 `(#:jar-name "plexus-classworlds.jar"
2472 #:source-dir "src/main"
2473 #:tests? #f));; FIXME: we need to generate some resources as in pom.xml
2475 `(("java-junit" ,java-junit)))
2476 (home-page "http://codehaus-plexus.github.io/plexus-classworlds/")
2477 (synopsis "Java class loader framework")
2478 (description "Plexus classworlds replaces the native @code{ClassLoader}
2479 mechanism of Java. It is especially useful for dynamic loading of application
2481 (license license:asl2.0)))
2483 (define-public java-plexus-container-default-bootstrap
2485 (name "java-plexus-container-default-bootstrap")
2489 (uri (string-append "https://github.com/codehaus-plexus/plexus-containers"
2490 "/archive/plexus-containers-" version ".tar.gz"))
2493 "0xw5g30qf4a83608rw9v2hv8pfsz7d69dkdhk6r0wia4q78hh1pc"))))
2494 (build-system ant-build-system)
2496 `(#:jar-name "container-default.jar"
2497 #:source-dir "plexus-container-default/src/main/java"
2498 #:test-dir "plexus-container-default/src/test"
2500 #:tests? #f; requires plexus-archiver, which depends on this package
2502 (modify-phases %standard-phases
2503 (add-before 'build 'copy-resources
2506 "plexus-container-default/src/main/resources/"
2510 `(("worldclass" ,java-plexus-classworlds)
2511 ("xbean" ,java-geronimo-xbean-reflect)
2512 ("utils" ,java-plexus-utils)
2513 ("junit" ,java-junit)
2514 ("guava" ,java-guava)))
2515 (home-page "https://github.com/codehaus-plexus/plexus-containers")
2516 (synopsis "Inversion-of-control container")
2517 (description "Plexus-default-container is Plexus' inversion-of-control
2518 (@dfn{IoC}) container. It is composed of its public API and its default
2520 (license license:asl2.0)))
2522 (define-public java-plexus-io
2524 (name "java-plexus-io")
2528 (uri (string-append "https://github.com/codehaus-plexus/plexus-io"
2529 "/archive/plexus-io-" version ".tar.gz"))
2532 "0f2j41kihaymxkpbm55smpxjja235vad8cgz94frfy3ppcp021dw"))))
2533 (build-system ant-build-system)
2535 `(#:jar-name "plexus-io.jar"
2536 #:source-dir "src/main/java"
2537 #:test-dir "src/test"
2540 (modify-phases %standard-phases
2541 (add-before 'build 'copy-resources
2543 (mkdir-p "build/classes/META-INF/plexus")
2544 (copy-file "src/main/resources/META-INF/plexus/components.xml"
2545 "build/classes/META-INF/plexus/components.xml")
2548 `(("utils" ,java-plexus-utils)
2549 ("commons-io" ,java-commons-io)
2550 ("java-jsr305" ,java-jsr305)))
2552 `(("junit" ,java-junit)
2553 ("hamcrest" ,java-hamcrest-core)
2554 ("guava" ,java-guava)
2555 ("classworlds" ,java-plexus-classworlds)
2556 ("xbean" ,java-geronimo-xbean-reflect)
2557 ("container-default" ,java-plexus-container-default-bootstrap)))
2558 (home-page "https://github.com/codehaus-plexus/plexus-io")
2559 (synopsis "I/O plexus components")
2560 (description "Plexus IO is a set of plexus components, which are designed
2561 for use in I/O operations. This implementation using plexus components allows
2562 reusing it in maven.")
2563 (license license:asl2.0)))
2565 (define-public java-plexus-archiver
2567 (name "java-plexus-archiver")
2571 (uri (string-append "https://github.com/codehaus-plexus/plexus-archiver"
2572 "/archive/plexus-archiver-" version ".tar.gz"))
2575 "0iv1j7khra6icqh3jndng3iipfmkc7l5jq2y802cm8r575v75pyv"))))
2576 (build-system ant-build-system)
2578 `(#:jar-name "plexus-archiver.jar"
2579 #:source-dir "src/main/java"
2581 #:test-dir "src/test"
2582 #:test-exclude (list "**/Abstract*.java" "**/Base*.java")
2584 (modify-phases %standard-phases
2585 (add-before 'check 'remove-failing
2587 ;; Requires an older version of plexus container
2589 "src/test/java/org/codehaus/plexus/archiver/DuplicateFilesTest.java")))
2590 (add-before 'build 'copy-resources
2592 (mkdir-p "build/classes/META-INF/plexus")
2593 (copy-file "src/main/resources/META-INF/plexus/components.xml"
2594 "build/classes/META-INF/plexus/components.xml")
2597 `(("utils" ,java-plexus-utils)
2598 ("commons-io" ,java-commons-io)
2599 ("snappy" ,java-iq80-snappy)
2600 ("io" ,java-plexus-io)
2601 ("compress" ,java-commons-compress)
2602 ("container-default" ,java-plexus-container-default-bootstrap)
2603 ("snappy" ,java-snappy)
2604 ("java-jsr305" ,java-jsr305)))
2606 `(("junit" ,java-junit)
2607 ("classworld" ,java-plexus-classworlds)
2608 ("xbean" ,java-geronimo-xbean-reflect)
2609 ("xz" ,java-tukaani-xz)
2610 ("guava" ,java-guava)))
2611 (home-page "https://github.com/codehaus-plexus/plexus-archiver")
2612 (synopsis "Archiver component of the Plexus project")
2613 (description "Plexus-archiver contains a component to deal with project
2615 (license license:asl2.0)))
2617 (define-public java-plexus-container-default
2619 (inherit java-plexus-container-default-bootstrap)
2620 (name "java-plexus-container-default")
2622 `(#:jar-name "container-default.jar"
2623 #:source-dir "plexus-container-default/src/main/java"
2624 #:test-dir "plexus-container-default/src/test"
2625 #:test-exclude (list ;"**/*Test.java"
2627 ;; Requires plexus-hierarchy
2628 "**/PlexusHierarchyTest.java"
2630 "**/ComponentRealmCompositionTest.java"
2631 "**/PlexusContainerTest.java")
2634 (modify-phases %standard-phases
2635 (add-before 'build 'copy-resources
2638 "plexus-container-default/src/main/resources/"
2641 (add-before 'check 'fix-paths
2643 (let ((dir "plexus-container-default/src/test/java/org/codehaus"))
2646 dir "/plexus/component/composition/"
2647 "ComponentRealmCompositionTest.java")
2648 (("src/test") "plexus-container-default/src/test"))
2651 `(("worldclass" ,java-plexus-classworlds)
2652 ("xbean" ,java-geronimo-xbean-reflect)
2653 ("utils" ,java-plexus-utils)
2654 ("junit" ,java-junit)
2655 ("guava" ,java-guava)))
2657 `(("archiver" ,java-plexus-archiver)
2658 ("hamcrest" ,java-hamcrest-core)))))
2660 (define-public java-asm
2666 (uri (string-append "http://download.forge.ow2.org/asm/"
2667 "asm-" version ".tar.gz"))
2670 "115l5pqblirdkmzi32dxx7gbcm4jy0s14y5wircr6h8jdr9aix00"))))
2671 (build-system ant-build-system)
2673 `(("java-aqute-bndlib" ,java-aqute-bndlib)))
2675 `(#:build-target "compile"
2676 ;; The tests require an old version of Janino, which no longer compiles
2681 ;; We don't need these extra ant tasks, but the build system asks us to
2682 ;; provide a path anyway.
2683 "-Dobjectweb.ant.tasks.path=dummy-path"
2684 ;; The java-aqute.bndlib JAR file will be put onto the classpath and
2685 ;; used during the build automatically by ant-build-system, but
2686 ;; java-asm's build.xml fails unless we provide something here.
2687 "-Dbiz.aQute.bnd.path=dummy-path")
2689 (modify-phases %standard-phases
2690 (add-before 'install 'build-jars
2691 (lambda* (#:key make-flags #:allow-other-keys)
2692 ;; We cannot use the "jar" target because it depends on a couple
2693 ;; of unpackaged, complicated tools.
2695 (zero? (system* "jar"
2696 "-cf" (string-append "dist/asm-" ,version ".jar")
2697 "-C" "output/build/tmp" "."))))
2699 (install-jars "dist")))))
2701 `(("java-junit" ,java-junit)))
2702 (home-page "http://asm.ow2.org/")
2703 (synopsis "Very small and fast Java bytecode manipulation framework")
2704 (description "ASM is an all purpose Java bytecode manipulation and
2705 analysis framework. It can be used to modify existing classes or dynamically
2706 generate classes, directly in binary form. The provided common
2707 transformations and analysis algorithms allow to easily assemble custom
2708 complex transformations and code analysis tools.")
2709 (license license:bsd-3)))
2711 (define-public java-cglib
2718 "https://github.com/cglib/cglib/archive/RELEASE_"
2719 (string-map (lambda (c) (if (char=? c #\.) #\_ c)) version)
2721 (file-name (string-append "cglib-" version ".tar.gz"))
2724 "162dvd4fln76ai8prfharf66pn6r56p3sxx683j5vdyccrd5hi1q"))))
2725 (build-system ant-build-system)
2727 `(;; FIXME: tests fail because junit runs
2728 ;; "net.sf.cglib.transform.AbstractTransformTest", which does not seem
2729 ;; to describe a test at all.
2731 #:jar-name "cglib.jar"
2733 (modify-phases %standard-phases
2734 (add-after 'unpack 'chdir
2735 (lambda _ (chdir "cglib") #t)))))
2737 `(("java-asm" ,java-asm)
2738 ("java-junit" ,java-junit)))
2739 (home-page "https://github.com/cglib/cglib/")
2740 (synopsis "Java byte code generation library")
2741 (description "The byte code generation library CGLIB is a high level API
2742 to generate and transform Java byte code.")
2743 (license license:asl2.0)))
2745 (define-public java-objenesis
2747 (name "java-objenesis")
2751 (uri (string-append "https://github.com/easymock/objenesis/"
2752 "archive/" version ".tar.gz"))
2753 (file-name (string-append "objenesis-" version ".tar.gz"))
2756 "1va5qz1i2wawwavhnxfzxnfgrcaflz9p1pg03irrjh4nd3rz8wh6"))))
2757 (build-system ant-build-system)
2759 `(#:jar-name "objenesis.jar"
2760 #:source-dir "main/src/"
2761 #:test-dir "main/src/test/"))
2763 `(("java-junit" ,java-junit)
2764 ("java-hamcrest-core" ,java-hamcrest-core)))
2765 (home-page "http://objenesis.org/")
2766 (synopsis "Bypass the constructor when creating an object")
2767 (description "Objenesis is a small Java library that serves one purpose:
2768 to instantiate a new object of a particular class. It is common to see
2769 restrictions in libraries stating that classes must require a default
2770 constructor. Objenesis aims to overcome these restrictions by bypassing the
2771 constructor on object instantiation.")
2772 (license license:asl2.0)))
2774 (define-public java-easymock
2776 (name "java-easymock")
2780 (uri (string-append "https://github.com/easymock/easymock/"
2781 "archive/easymock-" version ".tar.gz"))
2784 "1yzg0kv256ndr57gpav46cyv4a1ns5sj722l50zpxk3j6sk9hnmi"))))
2785 (build-system ant-build-system)
2787 `(#:jar-name "easymock.jar"
2788 #:source-dir "core/src/main"
2789 #:test-dir "core/src/test"
2791 (modify-phases %standard-phases
2792 ;; FIXME: Android support requires the following packages to be
2793 ;; available: com.google.dexmaker.stock.ProxyBuilder
2794 (add-after 'unpack 'delete-android-support
2796 (with-directory-excursion "core/src/main/java/org/easymock/internal"
2797 (substitute* "MocksControl.java"
2798 (("AndroidSupport.isAndroid\\(\\)") "false")
2799 (("return classProxyFactory = new AndroidClassProxyFactory\\(\\);") ""))
2800 (delete-file "AndroidClassProxyFactory.java"))
2802 (add-after 'unpack 'delete-broken-tests
2804 (with-directory-excursion "core/src/test/java/org/easymock"
2805 ;; This test depends on dexmaker.
2806 (delete-file "tests2/ClassExtensionHelperTest.java")
2808 ;; This is not a test.
2809 (delete-file "tests/BaseEasyMockRunnerTest.java")
2811 ;; This test should be executed with a different runner...
2812 (delete-file "tests2/EasyMockAnnotationsTest.java")
2813 ;; ...but deleting it means that we also have to delete these
2815 (delete-file "tests2/EasyMockRunnerTest.java")
2816 (delete-file "tests2/EasyMockRuleTest.java")
2818 ;; This test fails because the file "easymock.properties" does
2820 (delete-file "tests2/EasyMockPropertiesTest.java"))
2823 `(("java-asm" ,java-asm)
2824 ("java-cglib" ,java-cglib)
2825 ("java-objenesis" ,java-objenesis)))
2827 `(("java-junit" ,java-junit)
2828 ("java-hamcrest-core" ,java-hamcrest-core)))
2829 (home-page "http://easymock.org")
2830 (synopsis "Java library providing mock objects for unit tests")
2831 (description "EasyMock is a Java library that provides an easy way to use
2832 mock objects in unit testing.")
2833 (license license:asl2.0)))
2835 (define-public java-jmock-1
2841 (uri (string-append "https://github.com/jmock-developers/"
2842 "jmock-library/archive/" version ".tar.gz"))
2843 (file-name (string-append "jmock-" version ".tar.gz"))
2846 "0xmrlhq0fszldkbv281k9463mv496143vvmqwpxp62yzjvdkx9w0"))))
2847 (build-system ant-build-system)
2849 `(#:build-target "jars"
2850 #:test-target "run.tests"
2852 (modify-phases %standard-phases
2853 (replace 'install (install-jars "build")))))
2854 (home-page "http://www.jmock.org")
2855 (synopsis "Mock object library for test-driven development")
2856 (description "JMock is a library that supports test-driven development of
2857 Java code with mock objects. Mock objects help you design and test the
2858 interactions between the objects in your programs.
2863 @item makes it quick and easy to define mock objects
2864 @item lets you precisely specify the interactions between
2865 your objects, reducing the brittleness of your tests
2866 @item plugs into your favourite test framework
2867 @item is easy to extend.
2869 (license license:bsd-3)))
2871 (define-public java-jmock
2873 (inherit java-jmock-1)
2878 (uri (string-append "https://github.com/jmock-developers/"
2879 "jmock-library/archive/" version ".tar.gz"))
2880 (file-name (string-append name "-" version ".tar.gz"))
2883 "18650a9g8xffcsdb6w91pbswa7f40fp2sh6s3nclkclz5dbzq8f0"))))
2885 `(("java-hamcrest-all" ,java-hamcrest-all)
2886 ("java-asm" ,java-asm)
2887 ("java-bsh" ,java-bsh)
2888 ("java-junit" ,java-junit)))
2890 `(("cglib" ,java-cglib)))
2892 `(#:jar-name "java-jmock.jar"
2893 #:source-dir "jmock/src/main/java"
2894 #:test-dir "jmock/src/test"))))
2896 (define-public java-jmock-junit4
2898 (inherit java-jmock)
2899 (name "java-jmock-junit4")
2901 `(#:jar-name "java-jmock-junit4.jar"
2902 #:source-dir "jmock-junit4/src/main/java"
2903 #:test-dir "jmock-junit4/src/test"))
2905 `(("java-hamcrest-all" ,java-hamcrest-all)
2906 ("java-asm" ,java-asm)
2907 ("java-bsh" ,java-bsh)
2908 ("java-jmock" ,java-jmock)
2909 ("java-jumit" ,java-junit)))))
2911 (define-public java-jmock-legacy
2913 (inherit java-jmock)
2914 (name "java-jmock-legacy")
2916 `(#:jar-name "java-jmock-legacy.jar"
2917 #:source-dir "jmock-legacy/src/main/java"
2918 #:test-dir "jmock-legacy/src/test"
2920 (modify-phases %standard-phases
2921 (add-before 'check 'copy-tests
2923 ;; This file is a dependancy of some tests
2924 (let ((file "org/jmock/test/acceptance/PackageProtectedType.java"))
2925 (copy-file (string-append "jmock/src/test/java/" file)
2926 (string-append "jmock-legacy/src/test/java/" file))
2929 `(("java-hamcrest-all" ,java-hamcrest-all)
2930 ("java-objenesis" ,java-objenesis)
2931 ("java-cglib" ,java-cglib)
2932 ("java-jmock" ,java-jmock)
2933 ("java-asm" ,java-asm)
2934 ("java-bsh" ,java-bsh)
2935 ("java-junit" ,java-junit)))
2937 `(("java-jmock-junit4" ,java-jmock-junit4)))))
2939 (define-public java-hamcrest-all
2940 (package (inherit java-hamcrest-core)
2941 (name "java-hamcrest-all")
2943 (substitute-keyword-arguments (package-arguments java-hamcrest-core)
2944 ;; FIXME: a unit test fails because org.hamcrest.SelfDescribing is not
2945 ;; found, although it is part of the hamcrest-core library that has
2948 ;; Fixing this one test is insufficient, though, and upstream confirmed
2949 ;; that the latest hamcrest release fails its unit tests when built
2950 ;; with Java 7. See https://github.com/hamcrest/JavaHamcrest/issues/30
2952 ((#:build-target _) "bigjar")
2954 `(modify-phases ,phases
2955 ;; Some build targets override the classpath, so we need to patch
2956 ;; the build.xml to ensure that required dependencies are on the
2958 (add-after 'unpack 'patch-classpath-for-integration
2959 (lambda* (#:key inputs #:allow-other-keys)
2960 (substitute* "build.xml"
2961 ((" build/hamcrest-library-\\$\\{version\\}.jar" line)
2965 (find-files (assoc-ref inputs "java-hamcrest-core") "\\.jar$")
2966 (find-files (assoc-ref inputs "java-junit") "\\.jar$")
2967 (find-files (assoc-ref inputs "java-jmock") "\\.jar$")
2968 (find-files (assoc-ref inputs "java-easymock") "\\.jar$")))
2972 `(("java-junit" ,java-junit)
2973 ("java-jmock" ,java-jmock-1)
2974 ("java-easymock" ,java-easymock)
2975 ("java-hamcrest-core" ,java-hamcrest-core)
2976 ,@(package-inputs java-hamcrest-core)))))
2978 (define-public java-jopt-simple
2980 (name "java-jopt-simple")
2984 (uri (string-append "http://repo1.maven.org/maven2/"
2985 "net/sf/jopt-simple/jopt-simple/"
2986 version "/jopt-simple-"
2987 version "-sources.jar"))
2990 "1v8bzmwmw6qq20gm42xyay6vrd567dra4vqwhgjnqqjz1gs9f8qa"))))
2991 (build-system ant-build-system)
2993 `(#:tests? #f ; there are no tests
2994 #:jar-name "jopt-simple.jar"))
2995 (home-page "https://pholser.github.io/jopt-simple/")
2996 (synopsis "Java library for parsing command line options")
2997 (description "JOpt Simple is a Java library for parsing command line
2998 options, such as those you might pass to an invocation of @code{javac}. In
2999 the interest of striving for simplicity, as closely as possible JOpt Simple
3000 attempts to honor the command line option syntaxes of POSIX @code{getopt} and
3001 GNU @code{getopt_long}. It also aims to make option parser configuration and
3002 retrieval of options and their arguments simple and expressive, without being
3004 (license license:expat)))
3006 (define-public java-commons-math3
3008 (name "java-commons-math3")
3012 (uri (string-append "mirror://apache/commons/math/source/"
3013 "commons-math3-" version "-src.tar.gz"))
3016 "19l6yp44qc5g7wg816nbn5z3zq3xxzwimvbm4a8pczgvpi4i85s6"))))
3017 (build-system ant-build-system)
3019 `(#:build-target "jar"
3020 #:test-target "test"
3022 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
3023 (junit (assoc-ref %build-inputs "java-junit")))
3024 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
3025 (string-append "-Dhamcrest.jar=" hamcrest
3026 "/share/java/hamcrest-core.jar")))
3028 (modify-phases %standard-phases
3029 ;; We want to build the jar in the build phase and run the tests
3030 ;; later in a separate phase.
3031 (add-after 'unpack 'untangle-targets
3033 (substitute* "build.xml"
3034 (("name=\"jar\" depends=\"test\"")
3035 "name=\"jar\" depends=\"compile\""))
3037 ;; There is no install target.
3039 (install-jars "target")))))
3041 `(("java-junit" ,java-junit)
3042 ("java-hamcrest-core" ,java-hamcrest-core)))
3043 (home-page "http://commons.apache.org/math/")
3044 (synopsis "Apache Commons mathematics library")
3045 (description "Commons Math is a library of lightweight, self-contained
3046 mathematics and statistics components addressing the most common problems not
3047 available in the Java programming language or Commons Lang.")
3048 (license license:asl2.0)))
3050 (define-public java-jmh
3057 (url "http://hg.openjdk.java.net/code-tools/jmh/")
3058 (changeset version)))
3059 (file-name (string-append name "-" version "-checkout"))
3062 "1fxyxhg9famwcg1prc4cgwb5wzyxqavn3cjm5vz8605xz7x5k084"))))
3063 (build-system ant-build-system)
3065 `(#:jar-name "jmh-core.jar"
3066 #:source-dir "jmh-core/src/main"
3067 #:test-dir "jmh-core/src/test"
3069 (modify-phases %standard-phases
3070 ;; This seems to be a bug in the JDK. It may not be necessary in
3071 ;; future versions of the JDK.
3072 (add-after 'unpack 'fix-bug
3074 (with-directory-excursion
3075 "jmh-core/src/main/java/org/openjdk/jmh/runner/options"
3076 (substitute* '("IntegerValueConverter.java"
3077 "ThreadsValueConverter.java")
3078 (("public Class<Integer> valueType")
3079 "public Class<? extends Integer> valueType")))
3082 `(("java-jopt-simple" ,java-jopt-simple)
3083 ("java-commons-math3" ,java-commons-math3)))
3085 `(("java-junit" ,java-junit)
3086 ("java-hamcrest-core" ,java-hamcrest-core)))
3087 (home-page "http://openjdk.java.net/projects/code-tools/jmh/")
3088 (synopsis "Benchmark harness for the JVM")
3089 (description "JMH is a Java harness for building, running, and analysing
3090 nano/micro/milli/macro benchmarks written in Java and other languages
3091 targeting the JVM.")
3093 (license license:gpl2)))
3095 (define-public java-commons-collections4
3097 (name "java-commons-collections4")
3101 (uri (string-append "mirror://apache/commons/collections/source/"
3102 "commons-collections4-" version "-src.tar.gz"))
3105 "1krfhvggympq4avk7gh6qafzf6b9ip6r1m4lmacikyx04039m0wl"))))
3106 (build-system ant-build-system)
3108 `(#:test-target "test"
3110 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
3111 (junit (assoc-ref %build-inputs "java-junit"))
3112 (easymock (assoc-ref %build-inputs "java-easymock")))
3113 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
3114 (string-append "-Dhamcrest.jar=" hamcrest
3115 "/share/java/hamcrest-core.jar")
3116 (string-append "-Deasymock.jar=" easymock
3117 "/share/java/easymock.jar")))
3119 (modify-phases %standard-phases
3121 (install-jars "target")))))
3123 `(("java-junit" ,java-junit)
3124 ("java-hamcrest-core" ,java-hamcrest-core)
3125 ("java-easymock" ,java-easymock)))
3126 (home-page "http://commons.apache.org/collections/")
3127 (synopsis "Collections framework")
3128 (description "The Java Collections Framework is the recognised standard
3129 for collection handling in Java. Commons-Collections seek to build upon the
3130 JDK classes by providing new interfaces, implementations and utilities. There
3131 are many features, including:
3134 @item @code{Bag} interface for collections that have a number of copies of
3136 @item @code{BidiMap} interface for maps that can be looked up from value to
3137 key as well and key to value
3138 @item @code{MapIterator} interface to provide simple and quick iteration over
3140 @item Transforming decorators that alter each object as it is added to the
3142 @item Composite collections that make multiple collections look like one
3143 @item Ordered maps and sets that retain the order elements are added in,
3144 including an LRU based map
3145 @item Reference map that allows keys and/or values to be garbage collected
3147 @item Many comparator implementations
3148 @item Many iterator implementations
3149 @item Adapter classes from array and enumerations to collections
3150 @item Utilities to test or create typical set-theory properties of collections
3151 such as union, intersection, and closure.
3153 (license license:asl2.0)))
3155 (define-public java-commons-collections
3157 (inherit java-commons-collections4)
3158 (name "java-commons-collections")
3162 (uri (string-append "mirror://apache/commons/collections/source/"
3163 "commons-collections-" version "-src.tar.gz"))
3166 "055r51a5lfc3z7rkxnxmnn1npvkvda7636hjpm4qk7cnfzz98387"))))
3168 (substitute-keyword-arguments (package-arguments java-commons-collections4)
3170 `(modify-phases ,phases
3171 ;; The manifest is required by the build procedure
3172 (add-before 'build 'add-manifest
3174 (mkdir-p "build/conf")
3175 (call-with-output-file "build/conf/MANIFEST.MF"
3177 (format file "Manifest-Version: 1.0\n")))))
3179 (install-jars "build"))))))))
3181 (define java-commons-collections-test-classes
3183 (inherit java-commons-collections)
3185 `(#:jar-name "commons-collections-test-classes.jar"
3186 #:source-dir "src/test"
3189 `(("collection" ,java-commons-collections)))))
3191 (define-public java-commons-beanutils
3193 (name "java-commons-beanutils")
3197 (uri (string-append "mirror://apache/commons/beanutils/source/"
3198 "commons-beanutils-" version "-src.tar.gz"))
3201 "03cs0bq3sl1sdc7py9g3qnf8n9h473nrkvd3d251kaqv6a2ab7qk"))))
3202 (build-system ant-build-system)
3204 `(#:test-target "test"
3207 (modify-phases %standard-phases
3209 (lambda* (#:key outputs #:allow-other-keys)
3210 (rename-file (string-append "dist/commons-beanutils-" ,version
3212 "commons-beanutils.jar")
3213 (install-file "commons-beanutils.jar"
3214 (string-append (assoc-ref outputs "out") "/share/java/"))
3217 `(("logging" ,java-commons-logging-minimal)
3218 ("collections" ,java-commons-collections)))
3220 `(("junit" ,java-junit)
3221 ("collections-test" ,java-commons-collections-test-classes)))
3222 (home-page "http://commons.apache.org/beanutils/")
3223 (synopsis "Dynamically set or get properties in Java")
3224 (description "BeanUtils provides a simplified interface to reflection and
3225 introspection to set or get dynamically determined properties through their
3226 setter and getter method.")
3227 (license license:asl2.0)))
3229 (define-public java-commons-io
3231 (name "java-commons-io")
3236 (uri (string-append "mirror://apache/commons/io/source/"
3237 "commons-io-" version "-src.tar.gz"))
3240 "0q5y41jrcjvx9hzs47x5kdhnasdy6rm4bzqd2jxl02w717m7a7v3"))))
3241 (build-system ant-build-system)
3242 (outputs '("out" "doc"))
3244 `(#:test-target "test"
3246 (list (string-append "-Djunit.jar="
3247 (assoc-ref %build-inputs "java-junit")
3248 "/share/java/junit.jar"))
3250 (modify-phases %standard-phases
3251 (add-after 'build 'build-javadoc ant-build-javadoc)
3252 (replace 'install (install-jars "target"))
3253 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
3255 `(("java-junit" ,java-junit)
3256 ("java-hamcrest-core" ,java-hamcrest-core)))
3257 (home-page "http://commons.apache.org/io/")
3258 (synopsis "Common useful IO related classes")
3259 (description "Commons-IO contains utility classes, stream implementations,
3260 file filters and endian classes.")
3261 (license license:asl2.0)))
3263 (define-public java-commons-lang
3265 (name "java-commons-lang")
3270 (uri (string-append "mirror://apache/commons/lang/source/"
3271 "commons-lang-" version "-src.tar.gz"))
3273 (base32 "1mxwagqadzx1b2al7i0z1v0r235aj2njdyijf02szq0vhmqrfiq5"))))
3274 (build-system ant-build-system)
3275 (outputs '("out" "doc"))
3277 `(#:test-target "test"
3278 #:test-exclude (list "**/Abstract*.java" "**/Random*.java")
3280 (modify-phases %standard-phases
3281 (add-after 'build 'build-javadoc ant-build-javadoc)
3282 (add-before 'check 'disable-failing-test
3284 ;; Disable a failing test
3285 (substitute* "src/test/java/org/apache/commons/lang/\
3286 time/FastDateFormatTest.java"
3287 (("public void testFormat\\(\\)")
3288 "public void disabled_testFormat()"))
3290 (replace 'install (install-jars "target"))
3291 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
3293 `(("java-junit" ,java-junit)))
3294 (home-page "http://commons.apache.org/lang/")
3295 (synopsis "Extension of the java.lang package")
3296 (description "The Commons Lang components contains a set of Java classes
3297 that provide helper methods for standard Java classes, especially those found
3298 in the @code{java.lang} package in the Sun JDK. The following classes are
3302 @item StringUtils - Helper for @code{java.lang.String}.
3303 @item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets
3304 of characters such as @code{[a-z]} and @code{[abcdez]}.
3305 @item RandomStringUtils - Helper for creating randomised strings.
3306 @item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
3307 @item NumberRange - A range of numbers with an upper and lower bound.
3308 @item ObjectUtils - Helper for @code{java.lang.Object}.
3309 @item SerializationUtils - Helper for serializing objects.
3310 @item SystemUtils - Utility class defining the Java system properties.
3311 @item NestedException package - A sub-package for the creation of nested
3313 @item Enum package - A sub-package for the creation of enumerated types.
3314 @item Builder package - A sub-package for the creation of @code{equals},
3315 @code{hashCode}, @code{compareTo} and @code{toString} methods.
3317 (license license:asl2.0)))
3319 (define-public java-commons-lang3
3321 (name "java-commons-lang3")
3326 (uri (string-append "mirror://apache/commons/lang/source/"
3327 "commons-lang3-" version "-src.tar.gz"))
3329 (base32 "0xpshb9spjhplq5a7mr0y1bgfw8190ik4xj8f569xidfcki1d6kg"))))
3330 (build-system ant-build-system)
3331 (outputs '("out" "doc"))
3333 `(#:test-target "test"
3335 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-all"))
3336 (junit (assoc-ref %build-inputs "java-junit"))
3337 (easymock (assoc-ref %build-inputs "java-easymock"))
3338 (io (assoc-ref %build-inputs "java-commons-io")))
3339 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
3340 (string-append "-Dhamcrest.jar=" hamcrest
3341 "/share/java/hamcrest-all.jar")
3342 (string-append "-Dcommons-io.jar=" io
3343 "/share/java/commons-io-"
3344 ,(package-version java-commons-io)
3346 (string-append "-Deasymock.jar=" easymock
3347 "/share/java/easymock.jar")))
3349 (modify-phases %standard-phases
3350 (add-after 'build 'build-javadoc ant-build-javadoc)
3351 (replace 'install (install-jars "target"))
3352 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
3354 `(("java-junit" ,java-junit)
3355 ("java-commons-io" ,java-commons-io)
3356 ("java-hamcrest-all" ,java-hamcrest-all)
3357 ("java-easymock" ,java-easymock)))
3358 (home-page "http://commons.apache.org/lang/")
3359 (synopsis "Extension of the java.lang package")
3360 (description "The Commons Lang components contains a set of Java classes
3361 that provide helper methods for standard Java classes, especially those found
3362 in the @code{java.lang} package. The following classes are included:
3365 @item StringUtils - Helper for @code{java.lang.String}.
3366 @item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets of
3367 characters such as @code{[a-z]} and @code{[abcdez]}.
3368 @item RandomStringUtils - Helper for creating randomised strings.
3369 @item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
3370 @item NumberRange - A range of numbers with an upper and lower bound.
3371 @item ObjectUtils - Helper for @code{java.lang.Object}.
3372 @item SerializationUtils - Helper for serializing objects.
3373 @item SystemUtils - Utility class defining the Java system properties.
3374 @item NestedException package - A sub-package for the creation of nested
3376 @item Enum package - A sub-package for the creation of enumerated types.
3377 @item Builder package - A sub-package for the creation of @code{equals},
3378 @code{hashCode}, @code{compareTo} and @code{toString} methods.
3380 (license license:asl2.0)))
3382 (define-public java-jsr305
3384 (name "java-jsr305")
3388 (uri (string-append "https://repo1.maven.org/maven2/"
3389 "com/google/code/findbugs/"
3390 "jsr305/" version "/jsr305-"
3391 version "-sources.jar"))
3394 "1rh6jin9v7jqpq3kf1swl868l8i94r636n03pzpsmgr8v0lh9j2n"))))
3395 (build-system ant-build-system)
3397 `(#:tests? #f ; no tests included
3398 #:jar-name "jsr305.jar"))
3399 (home-page "http://findbugs.sourceforge.net/")
3400 (synopsis "Annotations for the static analyzer called findbugs")
3401 (description "This package provides annotations for the findbugs package.
3402 It provides packages in the @code{javax.annotations} namespace.")
3403 (license license:asl2.0)))
3405 (define-public java-guava
3408 ;; This is the last release of Guava that can be built with Java 7.
3412 (uri (string-append "https://github.com/google/guava/"
3413 "releases/download/v" version
3414 "/guava-" version "-sources.jar"))
3417 "1gawrs5gi6j5hcfxdgpnfli75vb9pfi4sn09pnc8xacr669yajwr"))))
3418 (build-system ant-build-system)
3420 `(#:tests? #f ; no tests included
3421 #:jar-name "guava.jar"
3423 (modify-phases %standard-phases
3424 (add-after 'unpack 'trim-sources
3426 (with-directory-excursion "src/com/google/common"
3427 ;; Remove annotations to avoid extra dependencies:
3428 ;; * "j2objc" annotations are used when converting Java to
3430 ;; * "errorprone" annotations catch common Java mistakes at
3432 ;; * "IgnoreJRERequirement" is used for Android.
3433 (substitute* (find-files "." "\\.java$")
3434 (("import com.google.j2objc.*") "")
3435 (("import com.google.errorprone.annotation.*") "")
3436 (("import org.codehaus.mojo.animal_sniffer.*") "")
3437 (("@CanIgnoreReturnValue") "")
3440 (("@RetainedWith") "")
3442 (("@ForOverride") "")
3443 (("@J2ObjCIncompatible") "")
3444 (("@IgnoreJRERequirement") "")))
3447 `(("java-jsr305" ,java-jsr305)))
3448 (home-page "https://github.com/google/guava")
3449 (synopsis "Google core libraries for Java")
3450 (description "Guava is a set of core libraries that includes new
3451 collection types (such as multimap and multiset), immutable collections, a
3452 graph library, functional types, an in-memory cache, and APIs/utilities for
3453 concurrency, I/O, hashing, primitives, reflection, string processing, and much
3455 (license license:asl2.0)))
3457 ;; The java-commons-logging package provides adapters to many different
3458 ;; logging frameworks. To avoid an excessive dependency graph we try to build
3459 ;; it with only a minimal set of adapters.
3460 (define-public java-commons-logging-minimal
3462 (name "java-commons-logging-minimal")
3466 (uri (string-append "mirror://apache/commons/logging/source/"
3467 "commons-logging-" version "-src.tar.gz"))
3470 "10bwcy5w8d7y39n0krlwhnp8ds3kj5zhmzj0zxnkw0qdlsjmsrj9"))))
3471 (build-system ant-build-system)
3473 `(#:tests? #f ; avoid dependency on logging frameworks
3474 #:jar-name "commons-logging-minimal.jar"
3476 (modify-phases %standard-phases
3477 (add-after 'unpack 'delete-adapters-and-tests
3479 ;; Delete all adapters except for NoOpLog, SimpleLog, and
3480 ;; LogFactoryImpl. NoOpLog is required to build; LogFactoryImpl
3481 ;; is used by applications; SimpleLog is the only actually usable
3482 ;; implementation that does not depend on another logging
3486 (delete-file (string-append
3487 "src/main/java/org/apache/commons/logging/impl/" file)))
3488 (list "Jdk13LumberjackLogger.java"
3489 "WeakHashtable.java"
3491 "ServletContextCleaner.java"
3494 "LogKitLogger.java"))
3495 (delete-file-recursively "src/test")
3497 (home-page "http://commons.apache.org/logging/")
3498 (synopsis "Common API for logging implementations")
3499 (description "The Logging package is a thin bridge between different
3500 logging implementations. A library that uses the commons-logging API can be
3501 used with any logging implementation at runtime.")
3502 (license license:asl2.0)))
3504 ;; This is the last release of the 1.x series.
3505 (define-public java-mockito-1
3507 (name "java-mockito")
3511 (uri (string-append "http://repo1.maven.org/maven2/"
3512 "org/mockito/mockito-core/" version
3513 "/mockito-core-" version "-sources.jar"))
3516 "0vmiwnwpf83g2q7kj1rislmja8fpvqkixjhawh7nxnygx6pq11kc"))))
3517 (build-system ant-build-system)
3519 `(#:jar-name "mockito.jar"
3520 #:tests? #f ; no tests included
3521 ;; FIXME: patch-and-repack does not support jars, so we have to apply
3522 ;; patches in build phases.
3524 (modify-phases %standard-phases
3525 ;; Mockito was developed against a different version of hamcrest,
3526 ;; which does not require matcher implementations to provide an
3527 ;; implementation of the "describeMismatch" method. We add this
3528 ;; simple definition to pass the build with our version of hamcrest.
3529 (add-after 'unpack 'fix-hamcrest-build-error
3531 (substitute* "src/org/mockito/internal/matchers/LocalizedMatcher.java"
3532 (("public Matcher getActualMatcher\\(\\) .*" line)
3534 public void describeMismatch(Object item, Description description) {
3535 actualMatcher.describeMismatch(item, description);
3539 ;; Mockito bundles cglib. We have a cglib package, so let's use
3541 (add-after 'unpack 'use-system-libraries
3543 (with-directory-excursion "src/org/mockito/internal/creation/cglib"
3544 (substitute* '("CGLIBHacker.java"
3545 "CglibMockMaker.java"
3546 "ClassImposterizer.java"
3547 "DelegatingMockitoMethodProxy.java"
3548 "MethodInterceptorFilter.java"
3549 "MockitoNamingPolicy.java"
3550 "SerializableMockitoMethodProxy.java"
3551 "SerializableNoOp.java")
3552 (("import org.mockito.cglib") "import net.sf.cglib")))
3555 `(("java-junit" ,java-junit)
3556 ("java-objenesis" ,java-objenesis)
3557 ("java-cglib" ,java-cglib)
3558 ("java-hamcrest-core" ,java-hamcrest-core)))
3559 (home-page "http://mockito.org")
3560 (synopsis "Mockito is a mock library for Java")
3561 (description "Mockito is a mocking library for Java which lets you write
3562 tests with a clean and simple API. It generates mocks using reflection, and
3563 it records all mock invocations, including methods arguments.")
3564 (license license:asl2.0)))
3566 (define-public java-httpcomponents-httpcore
3568 (name "java-httpcomponents-httpcore")
3572 (uri (string-append "mirror://apache//httpcomponents/httpcore/"
3573 "source/httpcomponents-core-"
3574 version "-src.tar.gz"))
3577 "02bwcf38y4vgwq7kj2s6q7qrmma641r5lacivm16kgxvb2j6h1vy"))))
3578 (build-system ant-build-system)
3580 `(#:jar-name "httpcomponents-httpcore.jar"
3582 (modify-phases %standard-phases
3583 (add-after 'unpack 'chdir
3584 (lambda _ (chdir "httpcore") #t)))))
3586 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)
3587 ("java-commons-lang3" ,java-commons-lang3)))
3589 `(("java-junit" ,java-junit)
3590 ("java-mockito" ,java-mockito-1)))
3591 (home-page "https://hc.apache.org/httpcomponents-core-4.4.x/index.html")
3592 (synopsis "Low level HTTP transport components")
3593 (description "HttpCore is a set of low level HTTP transport components
3594 that can be used to build custom client and server side HTTP services with a
3595 minimal footprint. HttpCore supports two I/O models: blocking I/O model based
3596 on the classic Java I/O and non-blocking, event driven I/O model based on Java
3599 This package provides the blocking I/O model library.")
3600 (license license:asl2.0)))
3602 (define-public java-httpcomponents-httpcore-nio
3603 (package (inherit java-httpcomponents-httpcore)
3604 (name "java-httpcomponents-httpcore-nio")
3606 `(#:jar-name "httpcomponents-httpcore-nio.jar"
3608 (modify-phases %standard-phases
3609 (add-after 'unpack 'chdir
3610 (lambda _ (chdir "httpcore-nio") #t)))))
3612 `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
3613 ("java-hamcrest-core" ,java-hamcrest-core)
3614 ,@(package-inputs java-httpcomponents-httpcore)))
3615 (description "HttpCore is a set of low level HTTP transport components
3616 that can be used to build custom client and server side HTTP services with a
3617 minimal footprint. HttpCore supports two I/O models: blocking I/O model based
3618 on the classic Java I/O and non-blocking, event driven I/O model based on Java
3621 This package provides the non-blocking I/O model library based on Java
3624 (define-public java-httpcomponents-httpcore-ab
3625 (package (inherit java-httpcomponents-httpcore)
3626 (name "java-httpcomponents-httpcore-ab")
3628 `(#:jar-name "httpcomponents-httpcore-ab.jar"
3630 (modify-phases %standard-phases
3631 (add-after 'unpack 'chdir
3632 (lambda _ (chdir "httpcore-ab") #t)))))
3634 `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
3635 ("java-commons-cli" ,java-commons-cli)
3636 ("java-hamcrest-core" ,java-hamcrest-core)
3637 ,@(package-inputs java-httpcomponents-httpcore)))
3638 (synopsis "Apache HttpCore benchmarking tool")
3639 (description "This package provides the HttpCore benchmarking tool. It is
3640 an Apache AB clone based on HttpCore.")))
3642 (define-public java-httpcomponents-httpclient
3644 (name "java-httpcomponents-httpclient")
3648 (uri (string-append "mirror://apache/httpcomponents/httpclient/"
3649 "source/httpcomponents-client-"
3650 version "-src.tar.gz"))
3653 "1428399s7qy3cim5wc6f3ks4gl9nf9vkjpfmnlap3jflif7g2pj1"))))
3654 (build-system ant-build-system)
3656 `(#:jar-name "httpcomponents-httpclient.jar"
3658 (modify-phases %standard-phases
3659 (add-after 'unpack 'chdir
3660 (lambda _ (chdir "httpclient") #t)))))
3662 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)
3663 ("java-commons-codec" ,java-commons-codec)
3664 ("java-hamcrest-core" ,java-hamcrest-core)
3665 ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
3666 ("java-mockito" ,java-mockito-1)
3667 ("java-junit" ,java-junit)))
3668 (home-page "https://hc.apache.org/httpcomponents-client-ga/")
3669 (synopsis "HTTP client library for Java")
3670 (description "Although the @code{java.net} package provides basic
3671 functionality for accessing resources via HTTP, it doesn't provide the full
3672 flexibility or functionality needed by many applications. @code{HttpClient}
3673 seeks to fill this void by providing an efficient, up-to-date, and
3674 feature-rich package implementing the client side of the most recent HTTP
3675 standards and recommendations.")
3676 (license license:asl2.0)))
3678 (define-public java-httpcomponents-httpmime
3679 (package (inherit java-httpcomponents-httpclient)
3680 (name "java-httpcomponents-httpmime")
3682 `(#:jar-name "httpcomponents-httpmime.jar"
3684 (modify-phases %standard-phases
3685 (add-after 'unpack 'chdir
3686 (lambda _ (chdir "httpmime") #t)))))
3688 `(("java-httpcomponents-httpclient" ,java-httpcomponents-httpclient)
3689 ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
3690 ("java-junit" ,java-junit)
3691 ("java-hamcrest-core" ,java-hamcrest-core)))))
3693 (define-public java-commons-net
3695 (name "java-commons-net")
3699 (uri (string-append "mirror://apache/commons/net/source/"
3700 "commons-net-" version "-src.tar.gz"))
3703 "0n0cmnddk9qdqhjvka8pc6hd9mn2qi3166f1s6xk32h7rfy1adxr"))))
3704 (build-system ant-build-system)
3706 `(;; FIXME: MainTest.java tries to read "examples.properties" (which
3707 ;; should be "resources/examples/examples.properties"), but gets "null"
3710 #:jar-name "commons-net.jar"))
3712 `(("java-junit" ,java-junit)
3713 ("java-hamcrest-core" ,java-hamcrest-core)))
3714 (home-page "http://commons.apache.org/net/")
3715 (synopsis "Client library for many basic Internet protocols")
3716 (description "The Apache Commons Net library implements the client side of
3717 many basic Internet protocols. The purpose of the library is to provide
3718 fundamental protocol access, not higher-level abstractions.")
3719 (license license:asl2.0)))
3721 (define-public java-jsch
3727 (uri (string-append "mirror://sourceforge/jsch/jsch/"
3728 version "/jsch-" version ".zip"))
3731 "029rdddyq1mh3ghryh3ki99kba1xkf1d1swjv2vi6lk6zzjy2wdb"))))
3732 (build-system ant-build-system)
3734 `(#:build-target "dist"
3735 #:tests? #f ; no tests included
3737 (modify-phases %standard-phases
3738 (replace 'install (install-jars "dist")))))
3740 `(("unzip" ,unzip)))
3741 (home-page "http://www.jcraft.com/jsch/")
3742 (synopsis "Pure Java implementation of SSH2")
3743 (description "JSch is a pure Java implementation of SSH2. JSch allows you
3744 to connect to an SSH server and use port forwarding, X11 forwarding, file
3745 transfer, etc., and you can integrate its functionality into your own Java
3747 (license license:bsd-3)))
3749 (define-public java-commons-compress
3751 (name "java-commons-compress")
3755 (uri (string-append "mirror://apache/commons/compress/source/"
3756 "commons-compress-" version "-src.tar.gz"))
3759 "1vjqvavrn0babffn1kciz6v52ibwq2vwhzlb95hazis3lgllnxc8"))))
3760 (build-system ant-build-system)
3762 `(#:jar-name "commons-compress.jar"
3764 (modify-phases %standard-phases
3765 (add-after 'unpack 'delete-bad-tests
3767 (with-directory-excursion "src/test/java/org/apache/commons/compress/"
3768 ;; FIXME: These tests really should not fail. Maybe they are
3769 ;; indicative of problems with our Java packaging work.
3771 ;; This test fails with a null pointer exception.
3772 (delete-file "archivers/sevenz/SevenZOutputFileTest.java")
3773 ;; This test fails to open test resources.
3774 (delete-file "archivers/zip/ExplodeSupportTest.java")
3776 ;; FIXME: This test adds a dependency on powermock, which is hard to
3777 ;; package at this point.
3778 ;; https://github.com/powermock/powermock
3779 (delete-file "archivers/sevenz/SevenZNativeHeapTest.java"))
3782 `(("java-junit" ,java-junit)
3783 ("java-hamcrest-core" ,java-hamcrest-core)
3784 ("java-mockito" ,java-mockito-1)
3785 ("java-xz" ,java-xz)))
3786 (home-page "https://commons.apache.org/proper/commons-compress/")
3787 (synopsis "Java library for working with compressed files")
3788 (description "The Apache Commons Compress library defines an API for
3789 working with compressed files such as ar, cpio, Unix dump, tar, zip, gzip, XZ,
3790 Pack200, bzip2, 7z, arj, lzma, snappy, DEFLATE, lz4 and Z files.")
3791 (license license:asl2.0)))
3793 (define-public java-commons-csv
3795 (name "java-commons-csv")
3799 (uri (string-append "mirror://apache/commons/csv/source/"
3800 "commons-csv-" version "-src.tar.gz"))
3803 "1l89m0fm2s3xx3v3iynvangymfg2vlyngaj6fgsi457nmsw7m7ij"))))
3804 (build-system ant-build-system)
3806 `(#:jar-name "commons-csv.jar"
3807 #:source-dir "src/main/java"
3808 #:tests? #f)); FIXME: requires java-h2
3810 `(("java-hamcrest-core" ,java-hamcrest-core)
3811 ("java-commons-io" ,java-commons-io)
3812 ("java-commons-lang3" ,java-commons-lang3)
3813 ("junit" ,java-junit)))
3814 (home-page "https://commons.apache.org/proper/commons-csv/")
3815 (synopsis "Read and write CSV documents")
3816 (description "Commons CSV reads and writes files in variations of the Comma
3817 Separated Value (CSV) format. The most common CSV formats are predefined in the
3821 @item Microsoft Excel
3822 @item Informix UNLOAD
3823 @item Informix UNLOAD CSV
3829 Custom formats can be created using a fluent style API.")
3830 (license license:asl2.0)))
3832 (define-public java-osgi-annotation
3834 (name "java-osgi-annotation")
3838 (uri (string-append "https://repo1.maven.org/maven2/"
3839 "org/osgi/org.osgi.annotation/" version "/"
3840 "org.osgi.annotation-" version "-sources.jar"))
3843 "1q718mb7gqg726rh6pc2hcisn8v50nv35abbir0jypmffhiii85w"))))
3844 (build-system ant-build-system)
3846 `(#:tests? #f ; no tests
3847 #:jar-name "osgi-annotation.jar"))
3848 (home-page "https://www.osgi.org")
3849 (synopsis "Annotation module of OSGi framework")
3851 "OSGi, for Open Services Gateway initiative framework, is a module system
3852 and service platform for the Java programming language. This package contains
3853 the OSGi annotation module, providing additional services to help dynamic
3855 (license license:asl2.0)))
3857 (define-public java-osgi-core
3859 (name "java-osgi-core")
3863 (uri (string-append "https://repo1.maven.org/maven2/"
3864 "org/osgi/org.osgi.core/" version "/"
3865 "org.osgi.core-" version "-sources.jar"))
3868 "19bpf5jx32jq9789gyhin35q5v7flmw0p9mk7wbgqpxqfmxyiabv"))))
3869 (build-system ant-build-system)
3871 `(#:tests? #f ; no tests
3872 #:jar-name "osgi-core.jar"))
3874 `(("java-osgi-annotation" ,java-osgi-annotation)))
3875 (home-page "https://www.osgi.org")
3876 (synopsis "Core module of OSGi framework")
3878 "OSGi, for Open Services Gateway initiative framework, is a module system
3879 and service platform for the Java programming language. This package contains
3880 the OSGi Core module.")
3881 (license license:asl2.0)))
3883 (define-public java-osgi-service-event
3885 (name "java-osgi-service-event")
3889 (uri (string-append "https://repo1.maven.org/maven2/"
3890 "org/osgi/org.osgi.service.event/"
3891 version "/org.osgi.service.event-"
3892 version "-sources.jar"))
3895 "1nyhlgagwym75bycnjczwbnpymv2iw84zbhvvzk84g9q736i6qxm"))))
3896 (build-system ant-build-system)
3898 `(#:tests? #f ; no tests
3899 #:jar-name "osgi-service-event.jar"))
3901 `(("java-osgi-annotation" ,java-osgi-annotation)
3902 ("java-osgi-core" ,java-osgi-core)))
3903 (home-page "https://www.osgi.org")
3904 (synopsis "OSGi service event module")
3906 "OSGi, for Open Services Gateway initiative framework, is a module system
3907 and service platform for the Java programming language. This package contains
3908 the OSGi @code{org.osgi.service.event} module.")
3909 (license license:asl2.0)))
3911 (define-public java-eclipse-osgi
3913 (name "java-eclipse-osgi")
3917 (uri (string-append "https://repo1.maven.org/maven2/"
3918 "org/eclipse/platform/org.eclipse.osgi/"
3919 version "/org.eclipse.osgi-"
3920 version "-sources.jar"))
3923 "00cqc6lb29n0zv68b4l842vzkwawvbr7gshfdygsk8sicvcq2c7b"))))
3924 (build-system ant-build-system)
3926 `(#:tests? #f ; no tests included
3927 #:jar-name "eclipse-equinox-osgi.jar"))
3929 `(("java-osgi-annotation" ,java-osgi-annotation)))
3930 (home-page "http://www.eclipse.org/equinox/")
3931 (synopsis "Eclipse Equinox OSGi framework")
3932 (description "This package provides an implementation of the OSGi Core
3934 (license license:epl1.0)))
3936 (define-public java-eclipse-equinox-common
3938 (name "java-eclipse-equinox-common")
3942 (uri (string-append "https://repo1.maven.org/maven2/"
3943 "org/eclipse/platform/org.eclipse.equinox.common/"
3944 version "/org.eclipse.equinox.common-"
3945 version "-sources.jar"))
3948 "12aazpkgw46r1qj0pr421jzwhbmsizd97r37krd7njnbrdgfzksc"))))
3949 (build-system ant-build-system)
3951 `(#:tests? #f ; no tests included
3952 #:jar-name "eclipse-equinox-common.jar"))
3954 `(("java-eclipse-osgi" ,java-eclipse-osgi)))
3955 (home-page "http://www.eclipse.org/equinox/")
3956 (synopsis "Common Eclipse runtime")
3957 (description "This package provides the common Eclipse runtime.")
3958 (license license:epl1.0)))
3960 (define-public java-eclipse-core-jobs
3962 (name "java-eclipse-core-jobs")
3966 (uri (string-append "https://repo1.maven.org/maven2/"
3967 "org/eclipse/platform/org.eclipse.core.jobs/"
3968 version "/org.eclipse.core.jobs-"
3969 version "-sources.jar"))
3972 "0395b8lh0km8vhzjnchvs1rii1qz48hyvb2wqfaq4yhklbwihq4b"))))
3973 (build-system ant-build-system)
3975 `(#:tests? #f ; no tests included
3976 #:jar-name "eclipse-core-jobs.jar"))
3978 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
3979 ("java-eclipse-osgi" ,java-eclipse-osgi)))
3980 (home-page "http://www.eclipse.org/equinox/")
3981 (synopsis "Eclipse jobs mechanism")
3982 (description "This package provides the Eclipse jobs mechanism.")
3983 (license license:epl1.0)))
3985 (define-public java-eclipse-equinox-registry
3987 (name "java-eclipse-equinox-registry")
3991 (uri (string-append "https://repo1.maven.org/maven2/"
3992 "org/eclipse/platform/org.eclipse.equinox.registry/"
3993 version "/org.eclipse.equinox.registry-"
3994 version "-sources.jar"))
3997 "1i9sgymh2fy5vdgk5y7s3qvrlbgh4l93ddqi3v4zmca7hwrlhf9k"))))
3998 (build-system ant-build-system)
4000 `(#:tests? #f ; no tests included
4001 #:jar-name "eclipse-equinox-registry.jar"))
4003 `(("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
4004 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
4005 ("java-eclipse-osgi" ,java-eclipse-osgi)))
4006 (home-page "http://www.eclipse.org/equinox/")
4007 (synopsis "Eclipse extension registry support")
4008 (description "This package provides support for the Eclipse extension
4010 (license license:epl1.0)))
4012 (define-public java-eclipse-equinox-app
4014 (name "java-eclipse-equinox-app")
4018 (uri (string-append "https://repo1.maven.org/maven2/"
4019 "org/eclipse/platform/org.eclipse.equinox.app/"
4020 version "/org.eclipse.equinox.app-"
4021 version "-sources.jar"))
4024 "0nhvbp93y203ar7y59gb0mz3w2d3jlqhr0c9hii9bcfpmr7imdab"))))
4025 (build-system ant-build-system)
4027 `(#:tests? #f ; no tests included
4028 #:jar-name "eclipse-equinox-app.jar"))
4030 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
4031 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
4032 ("java-eclipse-osgi" ,java-eclipse-osgi)
4033 ("java-osgi-service-event" ,java-osgi-service-event)))
4034 (home-page "http://www.eclipse.org/equinox/")
4035 (synopsis "Equinox application container")
4036 (description "This package provides the Equinox application container for
4038 (license license:epl1.0)))
4040 (define-public java-eclipse-equinox-preferences
4042 (name "java-eclipse-equinox-preferences")
4046 (uri (string-append "https://repo1.maven.org/maven2/"
4047 "org/eclipse/platform/org.eclipse.equinox.preferences/"
4048 version "/org.eclipse.equinox.preferences-"
4049 version "-sources.jar"))
4052 "0k7w6c141sqym4fy3af0qkwpy4pdh2vsjpjba6rp5fxyqa24v0a2"))))
4053 (build-system ant-build-system)
4055 `(#:tests? #f ; no tests included
4056 #:jar-name "eclipse-equinox-preferences.jar"))
4058 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
4059 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
4060 ("java-eclipse-osgi" ,java-eclipse-osgi)))
4061 (home-page "http://www.eclipse.org/equinox/")
4062 (synopsis "Eclipse preferences mechanism")
4063 (description "This package provides the Eclipse preferences mechanism with
4064 the module @code{org.eclipse.equinox.preferences}.")
4065 (license license:epl1.0)))
4067 (define-public java-eclipse-core-contenttype
4069 (name "java-eclipse-core-contenttype")
4073 (uri (string-append "https://repo1.maven.org/maven2/"
4074 "org/eclipse/platform/org.eclipse.core.contenttype/"
4075 version "/org.eclipse.core.contenttype-"
4076 version "-sources.jar"))
4079 "1wcqcv7ijwv5rh748vz3x9pkmjl9w1r0k0026k56n8yjl4rrmspi"))))
4080 (build-system ant-build-system)
4082 `(#:tests? #f ; no tests included
4083 #:jar-name "eclipse-core-contenttype.jar"))
4085 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
4086 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
4087 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
4088 ("java-eclipse-osgi" ,java-eclipse-osgi)))
4089 (home-page "http://www.eclipse.org/")
4090 (synopsis "Eclipse content mechanism")
4091 (description "This package provides the Eclipse content mechanism in the
4092 @code{org.eclipse.core.contenttype} module.")
4093 (license license:epl1.0)))
4095 (define-public java-eclipse-core-runtime
4097 (name "java-eclipse-core-runtime")
4101 (uri (string-append "https://repo1.maven.org/maven2/"
4102 "org/eclipse/platform/org.eclipse.core.runtime/"
4103 version "/org.eclipse.core.runtime-"
4104 version "-sources.jar"))
4107 "16mkf8jgj35pgzms7w1gyfq0gfm4ixw6c5xbbxzdj1la56c758ya"))))
4108 (build-system ant-build-system)
4110 `(#:tests? #f ; no tests included
4111 #:jar-name "eclipse-core-runtime.jar"))
4113 `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
4114 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
4115 ("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
4116 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
4117 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
4118 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
4119 ("java-eclipse-osgi" ,java-eclipse-osgi)))
4120 (home-page "https://www.eclipse.org/")
4121 (synopsis "Eclipse core runtime")
4122 (description "This package provides the Eclipse core runtime with the
4123 module @code{org.eclipse.core.runtime}.")
4124 (license license:epl1.0)))
4126 (define-public java-eclipse-core-filesystem
4128 (name "java-eclipse-core-filesystem")
4132 (uri (string-append "https://repo1.maven.org/maven2/"
4133 "org/eclipse/platform/org.eclipse.core.filesystem/"
4134 version "/org.eclipse.core.filesystem-"
4135 version "-sources.jar"))
4138 "0km1bhwjim4rfy3pkvjhvy31kgsyf2ncx0mlkmbf5n6g57pphdyj"))))
4139 (build-system ant-build-system)
4141 `(#:tests? #f ; no tests included
4142 #:jar-name "eclipse-core-filesystem.jar"))
4144 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
4145 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
4146 ("java-eclipse-osgi" ,java-eclipse-osgi)))
4147 (home-page "https://www.eclipse.org/")
4148 (synopsis "Eclipse core file system")
4149 (description "This package provides the Eclipse core file system with the
4150 module @code{org.eclipse.core.filesystem}.")
4151 (license license:epl1.0)))
4153 (define-public java-eclipse-core-expressions
4155 (name "java-eclipse-core-expressions")
4159 (uri (string-append "https://repo1.maven.org/maven2/"
4160 "org/eclipse/platform/org.eclipse.core.expressions/"
4161 version "/org.eclipse.core.expressions-"
4162 version "-sources.jar"))
4165 "18bw2l875gmygvpagpgk9l24qzbdjia4ag12nw6fi8v8yaq4987f"))))
4166 (build-system ant-build-system)
4168 `(#:tests? #f ; no tests included
4169 #:jar-name "eclipse-core-expressions.jar"))
4171 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
4172 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
4173 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
4174 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
4175 ("java-eclipse-osgi" ,java-eclipse-osgi)))
4176 (home-page "https://www.eclipse.org/")
4177 (synopsis "Eclipse core expression language")
4178 (description "This package provides the Eclipse core expression language
4179 with the @code{org.eclipse.core.expressions} module.")
4180 (license license:epl1.0)))
4182 (define-public java-eclipse-core-variables
4184 (name "java-eclipse-core-variables")
4188 (uri (string-append "https://repo1.maven.org/maven2/"
4189 "org/eclipse/platform/org.eclipse.core.variables/"
4190 version "/org.eclipse.core.variables-"
4191 version "-sources.jar"))
4194 "12dirh03zi4n5x5cj07vzrhkmnqy6h9q10h9j605pagmpmifyxmy"))))
4195 (build-system ant-build-system)
4197 `(#:tests? #f ; no tests included
4198 #:jar-name "eclipse-core-variables.jar"))
4200 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
4201 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
4202 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
4203 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
4204 ("java-eclipse-osgi" ,java-eclipse-osgi)))
4205 (home-page "https://www.eclipse.org/platform")
4206 (synopsis "Eclipse core variables")
4207 (description "This package provides the Eclipse core variables module
4208 @code{org.eclipse.core.variables}.")
4209 (license license:epl1.0)))
4211 (define-public java-eclipse-ant-core
4213 (name "java-eclipse-ant-core")
4217 (uri (string-append "https://repo1.maven.org/maven2/"
4218 "org/eclipse/platform/org.eclipse.ant.core/"
4219 version "/org.eclipse.ant.core-"
4220 version "-sources.jar"))
4223 "11g3if794qjlk98mz9zch22rr56sd7z63vn4i7k2icr8cq5bfqg7"))))
4224 (build-system ant-build-system)
4226 `(#:tests? #f ; no tests included
4227 #:jar-name "eclipse-ant-core.jar"))
4229 `(("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
4230 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
4231 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
4232 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
4233 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
4234 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
4235 ("java-eclipse-core-variables" ,java-eclipse-core-variables)
4236 ("java-eclipse-osgi" ,java-eclipse-osgi)))
4237 (home-page "https://www.eclipse.org/platform")
4238 (synopsis "Ant build tool core libraries")
4239 (description "This package provides the ant build tool core libraries with
4240 the module @code{org.eclipse.ant.core}.")
4241 (license license:epl1.0)))
4243 (define-public java-eclipse-core-resources
4245 (name "java-eclipse-core-resources")
4249 (uri (string-append "https://repo1.maven.org/maven2/"
4250 "org/eclipse/platform/org.eclipse.core.resources/"
4251 version "/org.eclipse.core.resources-"
4252 version "-sources.jar"))
4255 "1hrfxrll6cpcagfksk2na1ypvkcnsp0fk6n3vcsrn97qayf9mx9l"))))
4256 (build-system ant-build-system)
4258 `(#:tests? #f ; no tests included
4259 #:jar-name "eclipse-core-resources.jar"))
4261 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
4262 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
4263 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
4264 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
4265 ("java-eclipse-core-expressions" ,java-eclipse-core-expressions)
4266 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
4267 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
4268 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
4269 ("java-eclipse-ant-core" ,java-eclipse-ant-core)
4270 ("java-eclipse-osgi" ,java-eclipse-osgi)))
4271 (home-page "https://www.eclipse.org/")
4272 (synopsis "Eclipse core resource management")
4273 (description "This package provides the Eclipse core resource management
4274 module @code{org.eclipse.core.resources}.")
4275 (license license:epl1.0)))
4277 (define-public java-eclipse-compare-core
4279 (name "java-eclipse-compare-core")
4283 (uri (string-append "https://repo1.maven.org/maven2/"
4284 "org/eclipse/platform/org.eclipse.compare.core/"
4285 version "/org.eclipse.compare.core-"
4286 version "-sources.jar"))
4289 "10g37r0pbiffyv2wk35c6g5lwzkdipkl0kkjp41v84dln46xm4dg"))))
4290 (build-system ant-build-system)
4292 `(#:tests? #f ; no tests included
4293 #:jar-name "eclipse-compare-core.jar"))
4295 `(("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
4296 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
4297 ("java-eclipse-osgi" ,java-eclipse-osgi)
4298 ("java-icu4j" ,java-icu4j)))
4299 (home-page "https://www.eclipse.org/")
4300 (synopsis "Eclipse core compare support")
4301 (description "This package provides the Eclipse core compare support
4302 module @code{org.eclipse.compare.core}.")
4303 (license license:epl1.0)))
4305 (define-public java-eclipse-team-core
4307 (name "java-eclipse-team-core")
4311 (uri (string-append "https://repo1.maven.org/maven2/"
4312 "org/eclipse/platform/org.eclipse.team.core/"
4313 version "/org.eclipse.team.core-"
4314 version "-sources.jar"))
4317 "02j2jzqgb26zx2d5ahxmvijw6j4r0la90zl5c3i65x6z19ciyam7"))))
4318 (build-system ant-build-system)
4320 `(#:tests? #f ; no tests included
4321 #:jar-name "eclipse-team-core.jar"))
4323 `(("java-eclipse-compare-core" ,java-eclipse-compare-core)
4324 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
4325 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
4326 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
4327 ("java-eclipse-core-resources" ,java-eclipse-core-resources)
4328 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
4329 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
4330 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
4331 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
4332 ("java-eclipse-osgi" ,java-eclipse-osgi)))
4333 (home-page "https://www.eclipse.org/platform")
4334 (synopsis "Eclipse team support core")
4335 (description "This package provides the Eclipse team support core module
4336 @code{org.eclipse.team.core}.")
4337 (license license:epl1.0)))
4339 (define-public java-eclipse-core-commands
4341 (name "java-eclipse-core-commands")
4345 (uri (string-append "https://repo1.maven.org/maven2/"
4346 "org/eclipse/platform/org.eclipse.core.commands/"
4347 version "/org.eclipse.core.commands-"
4348 version "-sources.jar"))
4351 "0yjn482qndcfrsq3jd6vnhcylp16420f5aqkrwr8spsprjigjcr9"))))
4352 (build-system ant-build-system)
4354 `(#:tests? #f ; no tests included
4355 #:jar-name "eclipse-core-commands.jar"))
4357 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)))
4358 (home-page "https://www.eclipse.org/platform")
4359 (synopsis "Eclipse core commands")
4360 (description "This package provides Eclipse core commands in the module
4361 @code{org.eclipse.core.commands}.")
4362 (license license:epl1.0)))
4364 (define-public java-eclipse-text
4366 (name "java-eclipse-text")
4370 (uri (string-append "https://repo1.maven.org/maven2/"
4371 "org/eclipse/platform/org.eclipse.text/"
4372 version "/org.eclipse.text-"
4373 version "-sources.jar"))
4376 "0scz70vzz5qs5caji9f5q01vkqnvip7dpri1q07l8wbbdcxn4cq1"))))
4377 (build-system ant-build-system)
4379 `(#:tests? #f ; no tests included
4380 #:jar-name "eclipse-text.jar"
4382 (modify-phases %standard-phases
4383 ;; When creating a new category we must make sure that the new list
4384 ;; matches List<Position>. By default it seems to be too generic
4385 ;; (ArrayList<Object>), so we specialize it to ArrayList<Position>.
4386 ;; Without this we get this error:
4388 ;; [javac] .../src/org/eclipse/jface/text/AbstractDocument.java:376:
4389 ;; error: method put in interface Map<K,V> cannot be applied to given types;
4390 ;; [javac] fPositions.put(category, new ArrayList<>());
4392 ;; [javac] required: String,List<Position>
4393 ;; [javac] found: String,ArrayList<Object>
4394 ;; [javac] reason: actual argument ArrayList<Object> cannot be converted
4395 ;; to List<Position> by method invocation conversion
4396 ;; [javac] where K,V are type-variables:
4397 ;; [javac] K extends Object declared in interface Map
4398 ;; [javac] V extends Object declared in interface Map
4400 ;; I don't know if this is a good fix. I suspect it is not, but it
4402 (add-after 'unpack 'fix-compilation-error
4404 (substitute* "src/org/eclipse/jface/text/AbstractDocument.java"
4405 (("Positions.put\\(category, new ArrayList<>\\(\\)\\);")
4406 "Positions.put(category, new ArrayList<Position>());"))
4409 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
4410 ("java-eclipse-core-commands" ,java-eclipse-core-commands)
4411 ("java-icu4j" ,java-icu4j)))
4412 (home-page "http://www.eclipse.org/platform")
4413 (synopsis "Eclipse text library")
4414 (description "Platform Text is part of the Platform UI project and
4415 provides the basic building blocks for text and text editors within Eclipse
4416 and contributes the Eclipse default text editor.")
4417 (license license:epl1.0)))
4419 (define-public java-eclipse-jdt-core
4421 (name "java-eclipse-jdt-core")
4425 (uri (string-append "https://repo1.maven.org/maven2/"
4426 "org/eclipse/jdt/org.eclipse.jdt.core/"
4427 version "/org.eclipse.jdt.core-"
4428 version "-sources.jar"))
4431 "191xw4lc7mjjkprh4ji5vnpjvr5r4zvbpwkriy4bvsjqrz35vh1j"))))
4432 (build-system ant-build-system)
4434 `(#:tests? #f ; no tests included
4435 #:jar-name "eclipse-jdt-core.jar"))
4437 `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
4438 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
4439 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
4440 ("java-eclipse-core-resources" ,java-eclipse-core-resources)
4441 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
4442 ("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
4443 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
4444 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
4445 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
4446 ("java-eclipse-osgi" ,java-eclipse-osgi)
4447 ("java-eclipse-text" ,java-eclipse-text)))
4448 (home-page "https://www.eclipse.org/jdt")
4449 (synopsis "Java development tools core libraries")
4450 (description "This package provides the core libraries of the Eclipse Java
4451 development tools.")
4452 (license license:epl1.0)))
4454 (define-public java-javax-mail
4456 (name "java-javax-mail")
4460 (uri (string-append "https://repo1.maven.org/maven2/"
4461 "com/sun/mail/javax.mail/"
4462 version "/javax.mail-"
4463 version "-sources.jar"))
4466 "0sdlfgsc2b5s89xv1261y8i0jijcja019k2x1c8ngfn582w4jly9"))))
4467 (build-system ant-build-system)
4469 `(#:tests? #f ; no tests
4470 #:jar-name "javax-mail.jar"))
4471 (home-page "https://javamail.java.net")
4472 (synopsis "Reference implementation of the JavaMail API")
4474 "This package provides versions of the JavaMail API implementation, IMAP,
4475 SMTP, and POP3 service providers, some examples, and documentation for the
4477 ;; GPLv2 only with "classpath exception".
4478 (license license:gpl2)))
4480 (define-public java-log4j-api
4482 (name "java-log4j-api")
4486 (uri (string-append "mirror://apache/logging/log4j/" version
4487 "/apache-log4j-" version "-src.tar.gz"))
4490 "0j5p9gik0jysh37nlrckqbky12isy95cpwg2gv5fas1rcdqbraxd"))))
4491 (build-system ant-build-system)
4493 `(#:tests? #f ; tests require unpackaged software
4494 #:jar-name "log4j-api.jar"
4496 (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out")
4499 (modify-phases %standard-phases
4500 (add-after 'unpack 'enter-dir
4501 (lambda _ (chdir "log4j-api") #t))
4502 ;; FIXME: The tests require additional software that has not been
4503 ;; packaged yet, such as
4504 ;; * org.apache.maven
4505 ;; * org.apache.felix
4506 (add-after 'enter-dir 'delete-tests
4507 (lambda _ (delete-file-recursively "src/test") #t)))))
4509 `(("java-osgi-core" ,java-osgi-core)
4510 ("java-hamcrest-core" ,java-hamcrest-core)
4511 ("java-junit" ,java-junit)))
4512 (home-page "http://logging.apache.org/log4j/2.x/")
4513 (synopsis "API module of the Log4j logging framework for Java")
4515 "This package provides the API module of the Log4j logging framework for
4517 (license license:asl2.0)))
4519 (define-public java-log4j-core
4521 (inherit java-log4j-api)
4522 (name "java-log4j-core")
4524 `(("java-osgi-core" ,java-osgi-core)
4525 ("java-hamcrest-core" ,java-hamcrest-core)
4526 ("java-log4j-api" ,java-log4j-api)
4527 ("java-mail" ,java-mail)
4528 ("java-jboss-jms-api-spec" ,java-jboss-jms-api-spec)
4529 ("java-lmax-disruptor" ,java-lmax-disruptor)
4530 ("java-kafka" ,java-kafka-clients)
4531 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
4532 ("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
4533 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
4534 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)
4535 ("java-fasterxml-jackson-dataformat-xml" ,java-fasterxml-jackson-dataformat-xml)
4536 ("java-fasterxml-jackson-dataformat-yaml" ,java-fasterxml-jackson-dataformat-yaml)
4537 ("java-commons-compress" ,java-commons-compress)
4538 ("java-commons-csv" ,java-commons-csv)
4539 ("java-jeromq" ,java-jeromq)
4540 ("java-junit" ,java-junit)))
4542 `(("hamcrest" ,java-hamcrest-all)
4543 ("java-commons-io" ,java-commons-io)
4544 ("java-commons-lang3" ,java-commons-lang3)
4545 ("slf4j" ,java-slf4j-api)))
4547 `(#:tests? #f ; tests require more dependencies
4548 #:test-dir "src/test"
4549 #:source-dir "src/main/java"
4550 #:jar-name "log4j-core.jar"
4553 (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out")
4556 (modify-phases %standard-phases
4557 (add-after 'unpack 'enter-dir
4558 (lambda _ (chdir "log4j-core") #t)))))
4559 (synopsis "Core component of the Log4j framework")
4560 (description "This package provides the core component of the Log4j
4561 logging framework for Java.")))
4563 (define-public java-log4j-1.2-api
4565 (inherit java-log4j-api)
4566 (name "java-log4j-1.2-api")
4568 `(#:jar-name "java-log4j-1.2-api.jar"
4569 #:source-dir "log4j-1.2-api/src/main/java"
4571 ;; Tests require maven-model (and other maven subprojects), which is a
4572 ;; cyclic dependency.
4575 `(("log4j-api" ,java-log4j-api)
4576 ("log4j-core" ,java-log4j-core)
4577 ("osgi-core" ,java-osgi-core)
4578 ("eclipse-osgi" ,java-eclipse-osgi)
4579 ("java-lmax-disruptor" ,java-lmax-disruptor)))))
4581 (define-public java-commons-cli
4583 (name "java-commons-cli")
4587 (uri (string-append "mirror://apache/commons/cli/source/"
4588 "commons-cli-" version "-src.tar.gz"))
4591 "1fkjn552i12vp3xxk21ws4p70fi0lyjm004vzxsdaz7gdpgyxxyl"))))
4592 (build-system ant-build-system)
4595 `(#:jar-name "commons-cli.jar"))
4597 `(("java-junit" ,java-junit)
4598 ("java-hamcrest-core" ,java-hamcrest-core)))
4599 (home-page "http://commons.apache.org/cli/")
4600 (synopsis "Command line arguments and options parsing library")
4601 (description "The Apache Commons CLI library provides an API for parsing
4602 command line options passed to programs. It is also able to print help
4603 messages detailing the options available for a command line tool.
4605 Commons CLI supports different types of options:
4608 @item POSIX like options (ie. tar -zxvf foo.tar.gz)
4609 @item GNU like long options (ie. du --human-readable --max-depth=1)
4610 @item Java like properties (ie. java -Djava.awt.headless=true Foo)
4611 @item Short options with value attached (ie. gcc -O2 foo.c)
4612 @item long options with single hyphen (ie. ant -projecthelp)
4615 This is a part of the Apache Commons Project.")
4616 (license license:asl2.0)))
4618 (define-public java-commons-codec
4620 (name "java-commons-codec")
4624 (uri (string-append "mirror://apache/commons/codec/source/"
4625 "commons-codec-" version "-src.tar.gz"))
4628 "1w9qg30y4s0x8gnmr2fgj4lyplfn788jqxbcz27lf5kbr6n8xr65"))))
4629 (build-system ant-build-system)
4630 (outputs '("out" "doc"))
4632 `(#:test-target "test"
4634 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
4635 (junit (assoc-ref %build-inputs "java-junit")))
4636 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
4637 (string-append "-Dhamcrest.jar=" hamcrest
4638 "/share/java/hamcrest-core.jar")
4639 ;; Do not append version to jar.
4640 "-Dfinal.name=commons-codec"))
4642 (modify-phases %standard-phases
4643 (add-after 'build 'build-javadoc ant-build-javadoc)
4644 (replace 'install (install-jars "dist"))
4645 (add-after 'install 'install-doc (install-javadoc "dist/docs/api")))))
4647 `(("java-junit" ,java-junit)
4648 ("java-hamcrest-core" ,java-hamcrest-core)))
4649 (home-page "http://commons.apache.org/codec/")
4650 (synopsis "Common encoders and decoders such as Base64, Hex, Phonetic and URLs")
4651 (description "The codec package contains simple encoder and decoders for
4652 various formats such as Base64 and Hexadecimal. In addition to these widely
4653 used encoders and decoders, the codec package also maintains a collection of
4654 phonetic encoding utilities.
4656 This is a part of the Apache Commons Project.")
4657 (license license:asl2.0)))
4659 (define-public java-commons-daemon
4661 (name "java-commons-daemon")
4665 (uri (string-append "mirror://apache/commons/daemon/source/"
4666 "commons-daemon-" version "-src.tar.gz"))
4669 "0ci46kq8jpz084ccwq0mmkahcgsmh20ziclp2jf5i0djqv95gvhi"))))
4670 (build-system ant-build-system)
4672 `(#:test-target "test"
4674 (modify-phases %standard-phases
4675 (add-after 'build 'build-javadoc ant-build-javadoc)
4676 (replace 'install (install-jars "dist"))
4677 (add-after 'install 'install-doc (install-javadoc "dist/docs/api")))))
4679 `(("java-junit" ,java-junit)))
4680 (home-page "http://commons.apache.org/daemon/")
4681 (synopsis "Library to launch Java applications as daemons")
4682 (description "The Daemon package from Apache Commons can be used to
4683 implement Java applications which can be launched as daemons. For example the
4684 program will be notified about a shutdown so that it can perform cleanup tasks
4685 before its process of execution is destroyed by the operation system.
4687 This package contains the Java library. You will also need the actual binary
4688 for your architecture which is provided by the jsvc package.
4690 This is a part of the Apache Commons Project.")
4691 (license license:asl2.0)))
4693 (define-public java-javaewah
4695 (name "java-javaewah")
4699 (uri (string-append "https://github.com/lemire/javaewah/"
4700 "archive/JavaEWAH-" version ".tar.gz"))
4703 "1n7j1r1h24wlhwv9zdcj6yqjrhma2ixwyzm15l5vrv6yqjs6753b"))))
4704 (build-system ant-build-system)
4705 (arguments `(#:jar-name "javaewah.jar"))
4707 `(("java-junit" ,java-junit)
4708 ("java-hamcrest-core" ,java-hamcrest-core)))
4709 (home-page "https://github.com/lemire/javaewah")
4710 (synopsis "Compressed alternative to the Java @code{BitSet} class")
4711 (description "This is a word-aligned compressed variant of the Java
4712 @code{Bitset} class. It provides both a 64-bit and a 32-bit RLE-like
4713 compression scheme. It can be used to implement bitmap indexes.
4715 The goal of word-aligned compression is not to achieve the best compression,
4716 but rather to improve query processing time. Hence, JavaEWAH tries to save CPU
4717 cycles, maybe at the expense of storage. However, the EWAH scheme is always
4718 more efficient storage-wise than an uncompressed bitmap (as implemented in the
4719 @code{BitSet} class by Sun).")
4720 ;; GPL2.0 derivates are explicitly allowed.
4721 (license license:asl2.0)))
4723 (define-public java-slf4j-api
4725 (name "java-slf4j-api")
4729 (uri (string-append "https://www.slf4j.org/dist/slf4j-"
4733 "13j51sgzmhhdrfa74gkal5zpip7r1440dh7zsi2c8bpb2zs1v8kb"))
4734 (modules '((guix build utils)))
4735 ;; Delete bundled jars.
4738 (for-each delete-file (find-files "." "\\.jar$"))
4740 (build-system ant-build-system)
4742 `(#:jar-name "slf4j-api.jar"
4743 #:source-dir "slf4j-api/src/main"
4744 #:test-dir "slf4j-api/src/test"
4746 (modify-phases %standard-phases
4747 (add-after 'build 'regenerate-jar
4749 ;; pom.xml ignores these files in the jar creation process. If we don't,
4750 ;; we get the error "This code should have never made it into slf4j-api.jar"
4751 (delete-file-recursively "build/classes/org/slf4j/impl")
4752 (zero? (system* "jar" "-cf" "build/jar/slf4j-api.jar" "-C"
4753 "build/classes" "."))))
4754 (add-before 'check 'dont-test-abstract-classes
4756 ;; abstract classes are not meant to be run with junit
4757 (substitute* "build.xml"
4758 (("<include name=\"\\*\\*/\\*Test.java\" />")
4759 (string-append "<include name=\"**/*Test.java\" />"
4760 "<exclude name=\"**/MultithreadedInitializationTest"
4761 ".java\" />"))))))))
4763 `(("java-junit" ,java-junit)
4764 ("java-hamcrest-core" ,java-hamcrest-core)))
4765 (home-page "https://www.slf4j.org/")
4766 (synopsis "Simple logging facade for Java")
4767 (description "The Simple Logging Facade for Java (SLF4J) serves as a
4768 simple facade or abstraction for various logging
4769 frameworks (e.g. @code{java.util.logging}, @code{logback}, @code{log4j})
4770 allowing the end user to plug in the desired logging framework at deployment
4772 (license license:expat)))
4774 (define-public java-slf4j-simple
4776 (name "java-slf4j-simple")
4778 (source (package-source java-slf4j-api))
4779 (build-system ant-build-system)
4781 `(#:jar-name "slf4j-simple.jar"
4782 #:source-dir "slf4j-simple/src/main"
4783 #:test-dir "slf4j-simple/src/test"
4785 (modify-phases %standard-phases
4786 ;; The tests need some test classes from slf4j-api
4787 (add-before 'check 'build-slf4j-api-test-helpers
4789 ;; Add current dir to CLASSPATH ...
4791 (string-append (getcwd) ":" (getenv "CLASSPATH")))
4792 ;; ... and build test helper classes here:
4796 ,@(find-files "slf4j-api/src/test" ".*\\.java")))))))))
4798 `(("java-junit" ,java-junit)
4799 ("java-hamcrest-core" ,java-hamcrest-core)
4800 ("java-slf4j-api" ,java-slf4j-api)))
4801 (home-page "https://www.slf4j.org/")
4802 (synopsis "Simple implementation of simple logging facade for Java")
4803 (description "SLF4J binding for the Simple implementation, which outputs
4804 all events to System.err. Only messages of level INFO and higher are
4806 (license license:expat)))
4808 (define-public antlr2
4814 (uri (string-append "http://www.antlr2.org/download/antlr-"
4818 "1ffvcwdw73id0dk6pj2mlxjvbg0662qacx4ylayqcxgg381fnfl5"))
4819 (modules '((guix build utils)))
4822 (delete-file "antlr.jar")
4823 (substitute* "lib/cpp/antlr/CharScanner.hpp"
4827 "#define EOF (-1)\n"
4828 "#include <strings.h>")))
4829 (substitute* "configure"
4832 (build-system gnu-build-system)
4834 `(#:tests? #f ; no test target
4835 #:imported-modules ((guix build ant-build-system)
4836 (guix build syscalls)
4837 ,@%gnu-build-system-modules)
4838 #:modules (((guix build ant-build-system) #:prefix ant:)
4839 (guix build gnu-build-system)
4842 (modify-phases %standard-phases
4843 (add-after 'install 'strip-jar-timestamps
4844 (assoc-ref ant:%standard-phases 'strip-jar-timestamps))
4845 (add-after 'configure 'fix-bin-ls
4847 (substitute* (find-files "." "Makefile")
4853 ("java" ,icedtea "jdk")))
4855 `(("java" ,icedtea)))
4856 (home-page "http://www.antlr2.org")
4857 (synopsis "Framework for constructing recognizers, compilers, and translators")
4858 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
4859 is a language tool that provides a framework for constructing recognizers,
4860 compilers, and translators from grammatical descriptions containing Java, C#,
4861 C++, or Python actions. ANTLR provides excellent support for tree construction,
4862 tree walking, and translation.")
4863 (license license:public-domain)))
4865 (define-public java-stringtemplate-3
4867 (name "java-stringtemplate")
4871 (uri (string-append "https://github.com/antlr/website-st4/raw/"
4872 "gh-pages/download/stringtemplate-"
4876 "086yj68np1vqhkj7483diz3km6s6y4gmwqswa7524a0ca6vxn2is"))))
4877 (build-system ant-build-system)
4879 `(#:jar-name (string-append ,name "-" ,version ".jar")
4881 #:modules ((guix build ant-build-system)
4885 (modify-phases %standard-phases
4886 (add-before 'check 'fix-tests
4888 (substitute* "build.xml"
4889 (("\\$\\{test.home\\}/java")
4890 "${test.home}/org"))
4892 (add-before 'build 'generate-grammar
4894 (with-directory-excursion "src/org/antlr/stringtemplate/language/"
4895 (every (lambda (file)
4896 (format #t "~a\n" file)
4897 (zero? (system* "antlr" file)))
4898 '("template.g" "angle.bracket.template.g" "action.g"
4899 "eval.g" "group.g" "interface.g"))))))))
4902 ("java-junit" ,java-junit)))
4903 (home-page "http://www.stringtemplate.org")
4904 (synopsis "Template engine to generate formatted text output")
4905 (description "StringTemplate is a java template engine (with ports for C#,
4906 Objective-C, JavaScript, Scala) for generating source code, web pages, emails,
4907 or any other formatted text output. StringTemplate is particularly good at
4908 code generators, multiple site skins, and internationalization / localization.
4909 StringTemplate also powers ANTLR.")
4910 (license license:bsd-3)))
4912 ;; antlr3 is partially written using antlr3 grammar files. It also depends on
4913 ;; ST4 (stringtemplate4), which is also partially written using antlr3 grammar
4914 ;; files and uses antlr3 at runtime. The latest version requires a recent version
4915 ;; of antlr3 at runtime.
4916 ;; Fortunately, ST4 4.0.6 can be built with an older antlr3, and we use antlr3.3.
4917 ;; This version of ST4 is sufficient for the latest antlr3.
4918 ;; We use ST4 4.0.6 to build a boostrap antlr3 (latest version), and build
4919 ;; the latest ST4 with it. Then we build our final antlr3 that will be linked
4920 ;; against the latest ST4.
4921 ;; antlr3.3 still depends on antlr3 to generate some files, so we use an
4922 ;; even older version, antlr3.1, to generate them. Fortunately antlr3.1 uses
4923 ;; only grammar files with the antlr2 syntax.
4924 ;; So we build antlr3.1 -> antlr3.3 -> ST4.0.6 -> antlr3-bootstrap -> ST4 -> antlr3.
4926 (define-public java-stringtemplate
4927 (package (inherit java-stringtemplate-3)
4928 (name "java-stringtemplate")
4932 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/"
4934 (file-name (string-append name "-" version ".tar.gz"))
4937 "1pri8hqa95rfdkjy55icl5q1m09zwp5k67ib14abas39s4v3w087"))))
4938 (build-system ant-build-system)
4940 `(#:jar-name (string-append ,name "-" ,version ".jar")
4941 #:tests? #f ; FIXME: tests fail for unknown reasons
4943 #:modules ((guix build ant-build-system)
4947 (modify-phases %standard-phases
4948 (add-before 'check 'fix-test-target
4950 (substitute* "build.xml"
4951 (("\\$\\{test.home\\}/java") "${test.home}/")
4952 (("\\*Test.java") "Test*.java"))
4954 (add-before 'build 'generate-grammar
4956 (with-directory-excursion "src/org/stringtemplate/v4/compiler/"
4957 (every (lambda (file)
4958 (format #t "~a\n" file)
4959 (zero? (system* "antlr3" file)))
4960 '("STParser.g" "Group.g" "CodeGenerator.g"))))))))
4962 `(("antlr3" ,antlr3-bootstrap)
4964 ("java-stringtemplate" ,java-stringtemplate-3)
4965 ("java-junit" ,java-junit)))))
4967 (define java-stringtemplate-4.0.6
4968 (package (inherit java-stringtemplate)
4969 (name "java-stringtemplate")
4973 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/ST-"
4975 (file-name (string-append name "-" version ".tar.gz"))
4978 "0hjmh1ahdsh3w825i67mli9l4nncc4l6hdbf9ma91jvlj590sljp"))))
4980 `(("antlr3" ,antlr3-3.3)
4982 ("java-stringtemplate" ,java-stringtemplate-3)))))
4984 (define-public antlr3
4990 (uri (string-append "https://github.com/antlr/antlr3/archive/"
4992 (file-name (string-append name "-" version ".tar.gz"))
4995 "0218v683081lg54z9hvjxinhxd4dqp870jx6n39gslm0bkyi4vd6"))))
4996 (build-system ant-build-system)
4998 `(#:jar-name (string-append ,name "-" ,version ".jar")
4999 #:source-dir "tool/src/main/java:runtime/Java/src/main/java:tool/src/main/antlr3"
5002 (modify-phases %standard-phases
5003 (add-after 'install 'bin-install
5004 (lambda* (#:key inputs outputs #:allow-other-keys)
5005 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
5006 (bin (string-append (assoc-ref outputs "out") "/bin")))
5008 (with-output-to-file (string-append bin "/antlr3")
5011 (string-append "#!" (which "sh") "\n"
5012 "java -cp " jar "/" ,name "-" ,version ".jar:"
5014 (find-files (assoc-ref inputs "stringtemplate")
5018 (find-files (assoc-ref inputs "stringtemplate4")
5022 (find-files (string-append
5023 (assoc-ref inputs "antlr")
5026 " org.antlr.Tool $*"))))
5027 (chmod (string-append bin "/antlr3") #o755))))
5028 (add-before 'build 'generate-grammar
5030 (chdir "tool/src/main/antlr3/org/antlr/grammar/v3/")
5031 (for-each (lambda (file)
5034 (system* "antlr3" file))
5035 '("ANTLR.g" "ANTLRTreePrinter.g" "ActionAnalysis.g"
5036 "AssignTokenTypesWalker.g"
5037 "ActionTranslator.g" "TreeToNFAConverter.g"
5038 "ANTLRv3.g" "ANTLRv3Tree.g" "LeftRecursiveRuleWalker.g"
5039 "CodeGenTreeWalker.g" "DefineGrammarItemsWalker.g"))
5040 (substitute* "ANTLRParser.java"
5041 (("public Object getTree") "public GrammarAST getTree"))
5042 (substitute* "ANTLRv3Parser.java"
5043 (("public Object getTree") "public CommonTree getTree"))
5044 (chdir "../../../../../java")
5045 (system* "antlr" "-o" "org/antlr/tool"
5046 "org/antlr/tool/serialize.g")
5047 (substitute* "org/antlr/tool/LeftRecursiveRuleAnalyzer.java"
5048 (("import org.antlr.grammar.v3.\\*;") "import org.antlr.grammar.v3.*;
5049 import org.antlr.grammar.v3.ANTLRTreePrinter;"))
5050 (substitute* "org/antlr/tool/ErrorManager.java"
5051 (("case NO_SUCH_ATTRIBUTE_PASS_THROUGH:") ""))
5052 (chdir "../../../..")))
5053 (add-before 'build 'fix-build-xml
5055 (substitute* "build.xml"
5056 (("<exec") "<copy todir=\"${classes.dir}\">
5057 <fileset dir=\"tool/src/main/resources\">
5058 <include name=\"**/*.stg\"/>
5059 <include name=\"**/*.st\"/>
5060 <include name=\"**/*.sti\"/>
5061 <include name=\"**/STLexer.tokens\"/>
5063 </copy><exec")))))))
5066 ("antlr3" ,antlr3-bootstrap)))
5068 `(("junit" ,java-junit)
5069 ("stringtemplate" ,java-stringtemplate-3)
5070 ("stringtemplate4" ,java-stringtemplate)))
5072 `(("stringtemplate" ,java-stringtemplate-3)
5074 ("stringtemplate4" ,java-stringtemplate-4.0.6)))
5075 (home-page "http://www.antlr3.org")
5076 (synopsis "Framework for constructing recognizers, compilers, and translators")
5077 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
5078 is a language tool that provides a framework for constructing recognizers,
5079 compilers, and translators from grammatical descriptions containing Java, C#,
5080 C++, or Python actions. ANTLR provides excellent support for tree construction,
5081 tree walking, and translation.")
5082 (license license:bsd-3)))
5084 (define antlr3-bootstrap
5087 (name "antlr3-bootstrap")
5090 ("antlr3" ,antlr3-3.3)))
5092 `(("junit" ,java-junit)))))
5101 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
5102 "gh-pages/download/antlr-"
5106 "0qgg5vgsm4l1d6dj9pfbaa25dpv2ry2gny8ajy4vvgvfklw97b3m"))))
5108 `(#:jar-name (string-append ,name "-" ,version ".jar")
5109 #:source-dir (string-join '("tool/src/main/java"
5110 "runtime/Java/src/main/java"
5111 "tool/src/main/antlr2"
5112 "tool/src/main/antlr3")
5114 #:tests? #f ; FIXME: tests seem to require maven plugin
5115 #:modules ((guix build ant-build-system)
5119 (modify-phases %standard-phases
5120 (add-after 'install 'bin-install
5121 (lambda* (#:key inputs outputs #:allow-other-keys)
5122 (let* ((out (assoc-ref outputs "out"))
5123 (jar (string-append out "/share/java"))
5124 (bin (string-append out "/bin")))
5126 (with-output-to-file (string-append bin "/antlr3")
5130 "#!" (which "sh") "\n"
5131 "java -cp " jar "/antlr3-3.3.jar:"
5133 (append (find-files (assoc-ref inputs "java-stringtemplate")
5135 (find-files (string-append (assoc-ref inputs "antlr")
5139 " org.antlr.Tool $*"))))
5140 (chmod (string-append bin "/antlr3") #o755)
5142 (add-before 'build 'generate-grammar
5144 (substitute* "tool/src/main/java/org/antlr/tool/Grammar.java"
5145 (("import org.antlr.grammar.v2.\\*;")
5146 "import org.antlr.grammar.v2.*;\n
5147 import org.antlr.grammar.v2.TreeToNFAConverter;\n
5148 import org.antlr.grammar.v2.DefineGrammarItemsWalker;\n
5149 import org.antlr.grammar.v2.ANTLRTreePrinter;"))
5151 (with-directory-excursion "tool/src/main/antlr2/org/antlr/grammar/v2/"
5152 (every (lambda (file)
5153 (format #t "~a\n" file)
5154 (zero? (system* "antlr" file)))
5155 '("antlr.g" "antlr.print.g" "assign.types.g"
5156 "buildnfa.g" "codegen.g" "define.g")))
5157 (with-directory-excursion "tool/src/main/antlr3/org/antlr/grammar/v3/"
5158 (every (lambda (file)
5159 (format #t "~a\n" file)
5160 (zero? (system* "antlr3" file)))
5161 '("ActionAnalysis.g" "ActionTranslator.g" "ANTLRv3.g"
5162 "ANTLRv3Tree.g"))))))
5163 (add-before 'build 'fix-build-xml
5165 (substitute* "build.xml"
5166 (("<exec") "<copy todir=\"${classes.dir}\">
5167 <fileset dir=\"tool/src/main/resources\">
5168 <include name=\"**/*.stg\"/>
5169 <include name=\"**/*.st\"/>
5170 <include name=\"**/*.sti\"/>
5171 <include name=\"**/STLexer.tokens\"/>
5177 ("antlr3" ,antlr3-3.1)))
5179 `(("junit" ,java-junit)))
5181 `(("java-stringtemplate" ,java-stringtemplate-3)
5183 ("antlr3" ,antlr3-3.1)))))
5192 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
5193 "gh-pages/download/antlr-"
5197 "0sfimc9cpbgrihz4giyygc8afgpma2c93yqpwb951giriri6x66z"))))
5199 `(#:jar-name (string-append ,name "-" ,version ".jar")
5200 #:source-dir "src:runtime/Java/src"
5203 (modify-phases %standard-phases
5204 (add-after 'install 'bin-install
5205 (lambda* (#:key inputs outputs #:allow-other-keys)
5206 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
5207 (bin (string-append (assoc-ref outputs "out") "/bin")))
5209 (with-output-to-file (string-append bin "/antlr3")
5212 (string-append "#!" (which "sh") "\n"
5213 "java -cp " jar "/antlr3-3.1-3.1.jar:"
5215 (find-files (assoc-ref inputs "stringtemplate")
5219 (find-files (string-append
5220 (assoc-ref inputs "antlr")
5223 " org.antlr.Tool $*"))))
5224 (chmod (string-append bin "/antlr3") #o755))))
5225 (add-before 'build 'generate-grammar
5227 (let ((dir "src/org/antlr/tool/"))
5228 (for-each (lambda (file)
5231 (system* "antlr" "-o" dir (string-append dir file)))
5232 '("antlr.g" "antlr.print.g" "assign.types.g"
5233 "buildnfa.g" "define.g")))
5234 (format #t "codegen.g\n")
5235 (system* "antlr" "-o" "src/org/antlr/codegen"
5236 "src/org/antlr/codegen/codegen.g")))
5237 (add-before 'build 'fix-build-xml
5239 (substitute* "build.xml"
5240 (("<exec") "<copy todir=\"${classes.dir}\">
5241 <fileset dir=\"src\">
5242 <include name=\"**/*.stg\"/>
5243 <include name=\"**/*.st\"/>
5244 <include name=\"**/*.sti\"/>
5245 <include name=\"**/STLexer.tokens\"/>
5247 </copy><exec")))))))
5249 `(("antlr" ,antlr2)))
5251 `(("junit" ,java-junit)))
5253 `(("stringtemplate" ,java-stringtemplate-3)))))
5255 (define-public java-commons-cli-1.2
5256 ;; This is a bootstrap dependency for Maven2.
5258 (inherit java-commons-cli)
5262 (uri (string-append "mirror://apache/commons/cli/source/"
5263 "commons-cli-" version "-src.tar.gz"))
5266 "0rvfgzgv2pc1m091dfj3ih9ddsjjppr1f1wf0qmc3bk6b1kwv2dm"))))
5268 `(#:jar-name "commons-cli.jar"
5270 (modify-phases %standard-phases
5271 (add-before 'check 'fix-build-xml
5272 (lambda* (#:key inputs #:allow-other-keys)
5273 (substitute* "build.xml"
5274 (("dir=\"\\$\\{test.home\\}/java\"")
5275 "dir=\"${test.home}\""))
5278 `(("java-junit" ,java-junit)))))
5280 (define-public java-microemulator-cldc
5282 (name "java-microemulator-cldc")
5286 (uri (string-append "https://github.com/barteo/microemu/archive/"
5288 (string-map (lambda (c) (if (char=? c #\.) #\_ c))
5291 (file-name (string-append name "-" version ".tar.gz"))
5294 "1x1apmz38gkppxnwnygwmi12j54v4p258v8ddzn6dldkk7vak1ll"))))
5295 (build-system ant-build-system)
5297 `(#:jar-name "microemulator-cldc.jar"
5298 #:source-dir "microemu-cldc/src/main/java"
5299 #:tests? #f)); Requires even older software
5300 (home-page "https://github.com/barteo/microemu")
5301 (synopsis "J2ME CLDC emulator")
5302 (description "Microemulator is a Java 2 Micro Edition (J2ME) CLDC/MIDP
5303 Emulator. It allows to demonstrate MIDlet based applications in web browser
5304 applet and can be run as a standalone java application.")
5305 (license (list license:asl2.0
5307 license:lgpl2.1+))))
5309 (define-public java-datanucleus-javax-persistence
5311 (name "java-datanucleus-javax-persistence")
5315 (uri (string-append "https://github.com/datanucleus/"
5316 "javax.persistence/archive/javax.persistence-"
5317 version "-release.tar.gz"))
5320 "11jx0fjwgc2hhbqqgdd6m1pf2fplf9vslppygax0y1z5csnqjhpx"))))
5321 (build-system ant-build-system)
5323 `(#:jar-name "java-datanucleus-javax-persistence.jar"
5325 #:source-dir "src/main/java"
5326 #:tests? #f)); no tests
5327 (home-page "https://github.com/datanucleus/javax.persistence")
5328 (synopsis "JPA API")
5329 (description "This package contains a clean definition of JPA API intended
5330 for use with DataNucleus JPA since the JCP haven't provided an official JPA API
5331 jar. See @url{http://java.net/projects/jpa-spec/downloads} for the specification
5332 used to generate this API.")
5333 (license (list license:edl1.0 license:epl1.0))))
5335 (define-public java-osgi-cmpn
5337 (name "java-osgi-cmpn")
5341 (uri (string-append "http://central.maven.org/maven2/"
5342 "org/osgi/osgi.cmpn/" version "/osgi.cmpn-"
5343 version "-sources.jar"))
5346 "1lmb6xyrmkqdhv1kayf0514rlwq6ypvs4m44ibrck3snp8241wys"))))
5347 (build-system ant-build-system)
5349 `(#:jar-name "osgi-cmpn.jar"
5350 #:tests? #f)); no tests
5352 `(("annotation" ,java-osgi-annotation)
5353 ("core" ,java-osgi-core)
5354 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
5355 ("microemulator" ,java-microemulator-cldc)
5356 ("servlet" ,java-classpathx-servletapi)))
5357 (home-page "https://www.osgi.org")
5358 (synopsis "Compendium specification module of OSGi framework")
5360 "OSGi, for Open Services Gateway initiative framework, is a module system
5361 and service platform for the Java programming language. This package contains
5362 the compendium specification module, providing interfaces and classes for use
5363 in compiling bundles.")
5364 (license license:asl2.0)))
5366 (define-public java-osgi-service-component-annotations
5368 (name "java-osgi-service-component-annotations")
5372 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
5373 "org.osgi.service.component.annotations/"
5374 version "/org.osgi.service.component.annotations-"
5375 version "-sources.jar"))
5378 "15rq9cmp4fpn74q44m4j35qsqmjf5lx3hcrk6pzvbhc08igic2f0"))))
5379 (build-system ant-build-system)
5381 `(#:jar-name "osgi-service-component-annotations.jar"
5382 #:tests? #f)); no tests
5384 `(("annotation" ,java-osgi-annotation)))
5385 (home-page "https://www.osgi.org")
5386 (synopsis "Support annotations for osgi-service-component")
5388 "OSGi, for Open Services Gateway initiative framework, is a module system
5389 and service platform for the Java programming language. This package contains
5390 the support annotations for osgi-service-component.")
5391 (license license:asl2.0)))
5393 (define-public java-osgi-dto
5395 (name "java-osgi-dto")
5399 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
5400 "org.osgi.dto/" version "/org.osgi.dto-"
5401 version "-sources.jar"))
5404 "0f4bqjzadn0hwk6sd3h5gvbyfp3yci1s6r0v770cc15p0pg627yr"))))
5405 (build-system ant-build-system)
5407 `(#:jar-name "osgi-dto.jar"
5408 #:tests? #f)); no tests
5410 `(("annotation" ,java-osgi-annotation)))
5411 (home-page "https://www.osgi.org")
5412 (synopsis "Data Transfer Objects")
5414 "OSGi, for Open Services Gateway initiative framework, is a module system
5415 and service platform for the Java programming language. This package contains
5416 the Data Transfer Objects. It is easily serializable having only public fields
5417 of primitive types and their wrapper classes, Strings, and DTOs. List, Set,
5418 Map and array aggregates may also be used. The aggregates must only hold
5419 objects of the listed types or aggregates.")
5420 (license license:asl2.0)))
5422 (define-public java-osgi-resource
5424 (name "java-osgi-resource")
5428 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
5429 "org.osgi.resource/"
5430 version "/org.osgi.resource-"
5431 version "-sources.jar"))
5434 "0hi0fsc5v99q22bd7lrkvpz1y0ds4w9arjldpwsrcpqvz2js7q2d"))))
5435 (build-system ant-build-system)
5437 `(#:jar-name "osgi-resource.jar"
5438 #:tests? #f)); no tests
5440 `(("annotation" ,java-osgi-annotation)
5441 ("dto" ,java-osgi-dto)))
5442 (home-page "https://www.osgi.org")
5443 (synopsis "OSGI Resource")
5445 "OSGi, for Open Services Gateway initiative framework, is a module system
5446 and service platform for the Java programming language. This package contains
5447 the definition of common types in osgi packages.")
5448 (license license:asl2.0)))
5450 (define-public java-osgi-namespace-contract
5452 (name "java-osgi-namespace-contract")
5456 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
5457 "org.osgi.namespace.contract/"
5458 version "/org.osgi.namespace.contract-"
5459 version "-sources.jar"))
5462 "1iz4f2i0fvqrlq90ki9nfzcfpvy2av434ri25bglywqssx8mmp36"))))
5463 (build-system ant-build-system)
5465 `(("resource" ,java-osgi-resource)
5466 ("annotation" ,java-osgi-annotation)))
5468 `(#:jar-name "osgi-namespace-contract.jar"
5469 #:tests? #f)); no tests
5470 (home-page "https://www.osgi.org")
5471 (synopsis "Contract Capability and Requirement Namespace")
5473 "OSGi, for Open Services Gateway initiative framework, is a module system
5474 and service platform for the Java programming language. This package contains
5475 the names for the attributes and directives for a namespace with contracts.")
5476 (license license:asl2.0)))
5478 (define-public java-osgi-namespace-extender
5480 (name "java-osgi-namespace-extender")
5484 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
5485 "org.osgi.namespace.extender/"
5486 version "/org.osgi.namespace.extender-"
5487 version "-sources.jar"))
5490 "0jgqiak2i05qv6j3gd33xlaifzzc0ylxxk376v2x0apfg3vvixmz"))))
5491 (build-system ant-build-system)
5493 `(("resource" ,java-osgi-resource)
5494 ("annotation" ,java-osgi-annotation)))
5496 `(#:jar-name "osgi-namespace-extendent.jar"
5497 #:tests? #f)); no tests
5498 (home-page "https://www.osgi.org")
5499 (synopsis "Extender Capability and Requirement Namespace")
5501 "OSGi, for Open Services Gateway initiative framework, is a module system
5502 and service platform for the Java programming language. This package contains
5503 the names for the attributes and directives for an extender namespace.")
5504 (license license:asl2.0)))
5506 (define-public java-osgi-namespace-service
5508 (name "java-osgi-namespace-service")
5512 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
5513 "org.osgi.namespace.service/"
5514 version "/org.osgi.namespace.service-"
5515 version "-sources.jar"))
5518 "0qmw8n2449nkmm56d1znz9zhazb6ya3vsimd5bf5jg23zzhgl8c8"))))
5519 (build-system ant-build-system)
5521 `(("resource" ,java-osgi-resource)
5522 ("annotation" ,java-osgi-annotation)))
5524 `(#:jar-name "osgi-namespace-service.jar"
5525 #:tests? #f)); no tests
5526 (home-page "https://www.osgi.org")
5527 (synopsis "Service Capability and Requirement Namespace")
5529 "OSGi, for Open Services Gateway initiative framework, is a module system
5530 and service platform for the Java programming language. This package contains
5531 the names for the attributes and directives for a service namespace.")
5532 (license license:asl2.0)))
5534 (define-public java-osgi-util-function
5536 (name "java-osgi-util-function")
5540 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
5541 "org.osgi.util.function/"
5542 version "/org.osgi.util.function-"
5543 version "-sources.jar"))
5546 "04l7j3hwmmj28w23m7paca0afzncs42j2mdr3liqq8kvp548sc6x"))))
5547 (build-system ant-build-system)
5549 `(#:jar-name "osgi-util-function.jar"
5550 #:tests? #f)); no tests
5552 `(("annotation" ,java-osgi-annotation)))
5553 (home-page "https://www.osgi.org")
5554 (synopsis "OSGI Util Function")
5556 "OSGi, for Open Services Gateway initiative framework, is a module system
5557 and service platform for the Java programming language. This package contains
5558 an interface for a function that accepts a single argument and produces a result.")
5559 (license license:asl2.0)))
5561 (define-public java-osgi-util-promise
5563 (name "java-osgi-util-promise")
5567 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
5568 "org.osgi.util.promise/"
5569 version "/org.osgi.util.promise-"
5570 version "-sources.jar"))
5573 "0y34dwiflg1c4ahvkswpf9z02xph2sr9fm04ia5493x3lshpw22c"))))
5574 (build-system ant-build-system)
5576 `(#:jar-name "osgi-util-promise.jar"
5577 #:tests? #f)); no tests
5579 `(("annotation" ,java-osgi-annotation)
5580 ("function" ,java-osgi-util-function)))
5581 (home-page "https://www.osgi.org")
5582 (synopsis "Promise of a value")
5584 "OSGi, for Open Services Gateway initiative framework, is a module system
5585 and service platform for the Java programming language. This package contains
5586 an interface and utilitary classes for promises. A Promise represents a future
5587 value. It handles the interactions for asynchronous processing.")
5588 (license license:asl2.0)))
5590 (define-public java-osgi-service-metatype-annotations
5592 (name "java-osgi-service-metatype-annotations")
5596 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
5597 "org.osgi.service.metatype.annotations/"
5598 version "/org.osgi.service.metatype.annotations-"
5599 version "-sources.jar"))
5602 "12rwm3349wk80vm88rcdgs4435m4jxkpkj5mrx326skkz2c6hyw6"))))
5603 (build-system ant-build-system)
5605 `(#:jar-name "osgi-service-metatype-annotations.jar"
5606 #:tests? #f)); no tests
5608 `(("annotation" ,java-osgi-annotation)))
5609 (home-page "https://www.osgi.org")
5610 (synopsis "Support annotations for metatype")
5612 "OSGi, for Open Services Gateway initiative framework, is a module system
5613 and service platform for the Java programming language. This package contains
5614 the support annotations for metatype.")
5615 (license license:asl2.0)))
5617 (define-public java-osgi-service-repository
5619 (name "java-osgi-service-repository")
5623 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
5624 "org.osgi.service.repository/"
5625 version "/org.osgi.service.repository-"
5626 version "-sources.jar"))
5629 "1k41mhg7b58pd8nsghr2qwcjrxdnf1p9spsw9v11k4257g6rl06n"))))
5630 (build-system ant-build-system)
5632 `(#:jar-name "osgi-service-repository.jar"
5633 #:tests? #f)); no tests
5635 `(("annotation" ,java-osgi-annotation)
5636 ("promise" ,java-osgi-util-promise)
5637 ("resource" ,java-osgi-resource)))
5638 (home-page "https://www.osgi.org")
5639 (synopsis "OSGI service repository")
5641 "OSGi, for Open Services Gateway initiative framework, is a module system
5642 and service platform for the Java programming language. This package contains
5643 a repository service that contains resources.")
5644 (license license:asl2.0)))
5646 (define-public java-osgi-framework
5648 (name "java-osgi-framework")
5652 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
5653 "org.osgi.framework/" version "/org.osgi.framework-"
5654 version "-sources.jar"))
5657 "1lwp2zfad3rybcc6q9bwz8xsgkc92ypzy5p6x54387f1qj65m73s"))))
5658 (build-system ant-build-system)
5660 `(#:jar-name "osgi-framework.jar"
5661 #:tests? #f)); no tests
5663 `(("annotation" ,java-osgi-annotation)
5664 ("resource" ,java-osgi-resource)
5665 ("dto" ,java-osgi-dto)))
5666 (home-page "https://www.osgi.org")
5667 (synopsis "OSGi framework")
5669 "OSGi, for Open Services Gateway initiative framework, is a module system
5670 and service platform for the Java programming language.")
5671 (license license:asl2.0)))
5673 (define-public java-osgi-service-log
5675 (name "java-osgi-service-log")
5679 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
5680 "org.osgi.service.log/"
5681 version "/org.osgi.service.log-"
5682 version "-sources.jar"))
5685 "1029j30dzcwializzca0j3fkhwwz08kmmsha5agw1iccscimj6r0"))))
5686 (build-system ant-build-system)
5688 `(#:jar-name "osgi-service-log.jar"
5689 #:tests? #f)); no tests
5691 `(("java-osgi-framework" ,java-osgi-framework)))
5692 (home-page "https://www.osgi.org")
5693 (synopsis "Provides methods for bundles to write messages to the log")
5695 "OSGi, for Open Services Gateway initiative framework, is a module system
5696 and service platform for the Java programming language. This package contains
5698 (license license:asl2.0)))
5700 (define-public java-osgi-service-jdbc
5702 (name "java-osgi-service-jdbc")
5706 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
5707 "org.osgi.service.jdbc/"
5708 version "/org.osgi.service.jdbc-"
5709 version "-sources.jar"))
5712 "11iln5v7bk469cgb9ddkrz9sa95b3733gqgaqw9xf5g6wq652yjz"))))
5713 (build-system ant-build-system)
5715 `(#:jar-name "osgi-service-jdbc.jar"
5716 #:tests? #f)); no tests
5717 (home-page "https://www.osgi.org")
5718 (synopsis "Factory for JDBC connection factories")
5720 "OSGi, for Open Services Gateway initiative framework, is a module system
5721 and service platform for the Java programming language. This package contains
5722 a factory for JDBC connection factories. There are 3 preferred connection
5723 factories for getting JDBC connections:
5726 @item @code{javax.sql.DataSource};
5727 @item @code{javax.sql.ConnectionPoolDataSource};
5728 @item @code{javax.sql.XADataSource}.
5730 (license license:asl2.0)))
5732 (define-public java-osgi-service-resolver
5734 (name "java-osgi-service-resolver")
5738 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
5739 "org.osgi.service.resolver/"
5740 version "/org.osgi.service.resolver-"
5741 version "-sources.jar"))
5744 "1dzqn1ryfi2rq4zwsgp44bmj2wlfydjg1qbxw2b0z4xdjjy55vxd"))))
5745 (build-system ant-build-system)
5747 `(#:jar-name "osgi-service-resolver.jar"
5748 #:tests? #f)); no tests
5750 `(("annotation" ,java-osgi-annotation)
5751 ("resource" ,java-osgi-resource)))
5752 (home-page "https://www.osgi.org")
5753 (synopsis "OSGI Resolver service")
5755 "OSGi, for Open Services Gateway initiative framework, is a module system
5756 and service platform for the Java programming language. This package contains
5757 a resolver service that resolves the specified resources in the context supplied
5759 (license license:asl2.0)))
5761 (define-public java-osgi-util-tracker
5763 (name "java-osgi-util-tracker")
5767 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
5768 "org.osgi.util.tracker/"
5769 version "/org.osgi.util.tracker-"
5770 version "-sources.jar"))
5773 "0c4fh9vxwzsx59r8dygda0gq2gx3z5vfhc3jsphlqwf5w0h403lz"))))
5774 (build-system ant-build-system)
5776 `(#:jar-name "osgi-util-tracker.jar"
5777 #:tests? #f)); no tests
5779 `(("framework" ,java-osgi-framework)
5780 ("annotation" ,java-osgi-annotation)))
5781 (home-page "https://www.osgi.org")
5782 (synopsis "Bundle tracking")
5784 "OSGi, for Open Services Gateway initiative framework, is a module system
5785 and service platform for the Java programming language. This package contains
5786 bundle tracking utility classes.")
5787 (license license:asl2.0)))
5789 (define-public java-osgi-service-cm
5791 (name "java-osgi-service-cm")
5795 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
5796 "org.osgi.service.cm/"
5797 version "/org.osgi.service.cm-"
5798 version "-sources.jar"))
5801 "1z8kap48y3xi0ggj8v6czglfnpnd94mmismgi2wbqhj1nl5fzbp6"))))
5802 (build-system ant-build-system)
5804 `(#:jar-name "osgi-service-cm.jar"
5805 #:tests? #f)); no tests
5807 `(("framework" ,java-osgi-framework)
5808 ("annotation" ,java-osgi-annotation)))
5809 (home-page "https://www.osgi.org")
5810 (synopsis "OSGI Configuration Management")
5812 "OSGi, for Open Services Gateway initiative framework, is a module system
5813 and service platform for the Java programming language. This package contains
5814 utility classes for the configuration of services.")
5815 (license license:asl2.0)))
5817 (define-public java-osgi-service-packageadmin
5819 (name "java-osgi-service-packageadmin")
5823 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
5824 "org.osgi.service.packageadmin/"
5825 version "/org.osgi.service.packageadmin-"
5826 version "-sources.jar"))
5829 "041mpxzi7g36wmcily6y4ccn3jx15akpdy8gmhyb7m98x7qfvn52"))))
5830 (build-system ant-build-system)
5832 `(#:jar-name "osgi-service-packageadmin.jar"
5833 #:tests? #f)); no tests
5835 `(("framework" ,java-osgi-framework)))
5836 (home-page "https://www.osgi.org")
5837 (synopsis "OSGI Package Administration")
5839 "OSGi, for Open Services Gateway initiative framework, is a module system
5840 and service platform for the Java programming language. This package contains
5841 the packageadmin service.")
5842 (license license:asl2.0)))
5844 (define-public java-ops4j-base-lang
5846 (name "java-ops4j-base-lang")
5850 (uri (string-append "https://github.com/ops4j/org.ops4j.base/"
5851 "archive/base-" version ".tar.gz"))
5854 "18hl3lpchgpv8yh5rlk39l2gif5dlfgb8gxjmncf39pr2dprkniw"))))
5855 (build-system ant-build-system)
5857 `(#:jar-name "java-ops4j-base-lang.jar"
5858 #:source-dir "ops4j-base-lang/src/main/java"
5859 #:tests? #f; no tests
5861 (modify-phases %standard-phases
5862 (add-before 'build 'add-test-file
5864 ;; That file is required by a test in ops4j-pax-exam-core-spi
5865 (mkdir-p "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang")
5866 (with-output-to-file "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang/pom.properties"
5870 "version=" ,version "\n"
5871 "groupId=org.ops4j.base"
5872 "artifactId=ops4j-base-lang\n")))))))))
5873 (home-page "https://ops4j1.jira.com/wiki/spaces/base/overview")
5874 (synopsis "Utility classes and extensions to be used in OPS4J projects")
5875 (description "OPS4J stands for Open Participation Software for Java. This
5876 package contains utilities and extensions related to @code{java.lang}.")
5877 (license license:asl2.0)))
5879 (define-public java-ops4j-base-monitors
5881 (inherit java-ops4j-base-lang)
5882 (name "java-ops4j-base-monitors")
5884 `(#:jar-name "java-ops4j-base-monitors.jar"
5885 #:source-dir "ops4j-base-monitors/src/main/java"
5886 #:tests? #f)); no tests
5888 `(("lang" ,java-ops4j-base-lang)))
5889 (description "OPS4J stands for Open Participation Software for Java. This
5890 package contains utilities and extensions related to monitoring.")))
5892 (define-public java-ops4j-base-io
5894 (inherit java-ops4j-base-lang)
5895 (name "java-ops4j-base-io")
5897 `(#:jar-name "java-ops4j-base-io.jar"
5898 #:source-dir "ops4j-base-io/src/main/java"
5899 #:test-dir "ops4j-base-io/src/test"
5901 (list "**/ListerTest.java")))
5903 `(("lang" ,java-ops4j-base-monitors)
5904 ("lang" ,java-ops4j-base-lang)))
5906 `(("junit" ,java-junit)
5907 ("hamcrest" ,java-hamcrest-core)))
5908 (description "OPS4J stands for Open Participation Software for Java. This
5909 package contains utilities and extensions related to handling streams and files.")))
5911 (define-public java-ops4j-base-util
5913 (inherit java-ops4j-base-lang)
5914 (name "java-ops4j-base-util")
5916 `(#:jar-name "java-ops4j-base-util.jar"
5917 #:source-dir "ops4j-base-util/src/main/java"
5918 #:test-dir "ops4j-base-util/src/test"))
5920 `(("lang" ,java-ops4j-base-lang)))
5922 `(("junit" ,java-junit)))
5923 (description "OPS4J stands for Open Participation Software for Java. This
5924 package contains utilities and extensions related to environment, i18n and
5927 (define-public java-ops4j-base-util-property
5929 (inherit java-ops4j-base-lang)
5930 (name "java-ops4j-base-util-property")
5932 `(#:jar-name "java-ops4j-base-util-property.jar"
5933 #:source-dir "ops4j-base-util-property/src/main/java"
5934 #:tests? #f)); no tests
5936 `(("lang" ,java-ops4j-base-lang)
5937 ("util" ,java-ops4j-base-util)))
5938 (description "OPS4J stands for Open Participation Software for Java. This
5939 package contains utilities and extensions related to resolving properties from
5940 different sources.")))
5942 (define-public java-ops4j-base-store
5944 (inherit java-ops4j-base-lang)
5945 (name "java-ops4j-base-store")
5947 `(#:jar-name "java-ops4j-base-store.jar"
5948 #:source-dir "ops4j-base-store/src/main/java"
5949 #:tests? #f)); no tests
5951 `(("lang" ,java-ops4j-base-lang)
5952 ("slf4j" ,java-slf4j-api)
5953 ("io" ,java-ops4j-base-io)))
5954 (description "OPS4J stands for Open Participation Software for Java. This
5955 package contains utilities for storing and retrieving data from an
5956 @code{InputStream}.")))
5958 (define-public java-ops4j-base-spi
5960 (inherit java-ops4j-base-lang)
5961 (name "java-ops4j-base-spi")
5963 `(#:jar-name "java-ops4j-base-spi.jar"
5964 #:source-dir "ops4j-base-spi/src/main/java"
5965 #:test-dir "ops4j-base-spi/src/test"))
5967 `(("junit" ,java-junit)
5968 ("hamcrest" ,java-hamcrest-core)))
5969 (description "OPS4J stands for Open Participation Software for Java. This
5970 package contains utilities for obtaining services via the Java SE 6
5971 @code{ServiceLoader}.")))
5973 (define-public java-aqute-bnd-annotation
5975 (name "java-aqute-bnd-annotation")
5979 (uri (string-append "https://github.com/bndtools/bnd/archive/"
5980 version ".REL.tar.gz"))
5981 (file-name (string-append name "-" version ".tar.gz"))
5984 "09vgb6axikbz66zi9falijbnzh1qnp9ysfns123dmzdb01cbza9q"))))
5985 (build-system ant-build-system)
5987 `(#:jar-name "java-aqute-bnd-annotation.jar"
5988 #:source-dir "biz.aQute.bnd.annotation/src"
5989 #:tests? #f)); empty test dir
5990 (home-page "http://bnd.bndtools.org/")
5991 (synopsis "Tools for OSGi")
5992 (description "Bnd is a swiss army knife for OSGi, it creates manifest
5993 headers based on analyzing the class code, it verifies the project settings,
5994 it manages project dependencies, gives diffs jars, and much more.")
5995 (license license:asl2.0)))
5997 (define-public java-aqute-libg
5999 (inherit java-aqute-bnd-annotation)
6000 (name "java-aqute-libg")
6002 `(#:jar-name "java-aqute-libg.jar"
6003 #:source-dir "aQute.libg/src"
6004 #:tests? #f)); FIXME: tests are in "aQute.libg/test", not in a java directory
6006 `(("slf4j" ,java-slf4j-api)
6007 ("osgi-annot" ,java-osgi-annotation)
6008 ("java-osgi-cmpn" ,java-osgi-cmpn)
6009 ("osgi" ,java-osgi-core)))))
6011 (define-public java-aqute-bndlib
6013 (inherit java-aqute-bnd-annotation)
6014 (name "java-aqute-bndlib")
6016 `(#:jar-name "java-bndlib.jar"
6017 #:source-dir "biz.aQute.bndlib/src"
6018 #:tests? #f)); no tests
6020 `(("slf4j" ,java-slf4j-api)
6021 ("osgi-annot" ,java-osgi-annotation)
6022 ("java-aqute-libg" ,java-aqute-libg)
6023 ("java-aqute-bnd-annotation" ,java-aqute-bnd-annotation)
6024 ("java-osgi-service-component-annotations" ,java-osgi-service-component-annotations)
6025 ("java-osgi-service-repository" ,java-osgi-service-repository)
6026 ("java-osgi-service-log" ,java-osgi-service-log)
6027 ("java-osgi-service-metatype-annotations" ,java-osgi-service-metatype-annotations)
6028 ("java-osgi-namespace-contract" ,java-osgi-namespace-contract)
6029 ("java-osgi-namespace-extender" ,java-osgi-namespace-extender)
6030 ("java-osgi-namespace-service" ,java-osgi-namespace-service)
6031 ("promise" ,java-osgi-util-promise)
6032 ("osgi" ,java-osgi-core)))))
6034 (define-public java-ops4j-pax-tinybundles
6036 (name "java-ops4j-pax-tinybundles")
6040 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.tinybundles/"
6041 "archive/tinybundles-" version ".tar.gz"))
6044 "0y0gq3pvv0iir2b885lmlwnvr724vv7vklzhhr4fs27d7mdkj871"))))
6046 `(#:jar-name "java-ops4j-pax-tinybundles.jar"
6047 #:source-dir "src/main/java"
6049 ;; Abstract base classes for other tests
6050 (list "**/BndTest.java" "**/CoreTest.java")
6052 (modify-phases %standard-phases
6053 (add-before 'check 'fix-version
6055 ;; This test has a reference to an old version of bndlib we are not
6056 ;; packaging. It uses the version referenced in pom.xml. We replace
6057 ;; it with our own version.
6058 (substitute* "src/test/java/org/ops4j/pax/tinybundles/bnd/BndTest.java"
6059 (("2.4.0.201411031534") "3.4.0")))))))
6061 `(("lang" ,java-ops4j-base-lang)
6062 ("io" ,java-ops4j-base-io)
6063 ("store" ,java-ops4j-base-store)
6064 ("slf4j" ,java-slf4j-api)
6065 ("libg" ,java-aqute-libg)
6066 ("bndlib" ,java-aqute-bndlib)))
6068 `(("junit" ,java-junit)
6069 ("hamcrest" ,java-hamcrest-core)
6070 ("log4j" ,java-log4j-api)
6071 ("bndannotation" ,java-aqute-bnd-annotation)
6072 ("framework" ,java-osgi-framework)))
6073 (build-system ant-build-system)
6074 (home-page "https://ops4j1.jira.com/wiki/spaces/ops4j/pages/12060312/Tinybundles")
6075 (synopsis "Java APIs to create OSGi related artifacts")
6076 (description "Tinybundles is all about creating OSGi related artifacts like
6077 Bundles, Fragments and Deployment Packages with Java Api. It is very convinient
6078 to create such artifacts on-the-fly inside Tests (like in Pax Exam). On the
6079 other hand, this library can be a foundation of real end user tools that need
6080 to create those artifacts.")
6081 (license license:asl2.0)))
6083 (define-public java-ops4j-pax-exam-core
6085 (name "java-ops4j-pax-exam-core")
6089 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.exam2/"
6090 "archive/exam-reactor-" version ".tar.gz"))
6093 "08mzw8nkah3rj3vznlplnawspxhp61zgvb44ifqa1rni1cvbms2g"))))
6095 `(#:jar-name "java-ops4j-pax-exam-core.jar"
6096 #:source-dir "core/pax-exam/src/main/java"
6097 #:test-dir "core/pax-exam/src/test"))
6099 `(("slf4j" ,java-slf4j-api)
6100 ("lang" ,java-ops4j-base-lang)
6101 ("io" ,java-ops4j-base-io)
6102 ("util-property" ,java-ops4j-base-util-property)
6103 ("util-store" ,java-ops4j-base-store)
6104 ("java-osgi-core" ,java-osgi-core)))
6106 `(("junit" ,java-junit)
6107 ("hamcrest" ,java-hamcrest-core)))
6108 (build-system ant-build-system)
6109 (home-page "https://ops4j1.jira.com/wiki/spaces/PAXEXAM4/overview")
6110 (synopsis "In-Container Testing for OSGi, Java EE and CDI")
6111 (description "Pax Exam creates OSGi bundles for testing purposes. It lets
6112 the user take control of the OSGi framework, the test framework (e.g. JUnit) and
6113 the system under test at the same time.")
6114 (license license:asl2.0)))
6116 (define-public java-ops4j-pax-exam-core-spi
6118 (inherit java-ops4j-pax-exam-core)
6119 (name "java-ops4j-pax-exam-core-spi")
6121 `(#:jar-name "java-ops4j-pax-exam-spi.jar"
6122 #:source-dir "src/main/java"
6125 ;; Abstract base class, not a test
6126 "**/BaseStagedReactorTest.java"
6127 ;; Depends on org.mortbay.jetty.testwars:test-war-dump
6128 "**/WarBuilderTest.java")
6130 (modify-phases %standard-phases
6131 (add-before 'configure 'chdir
6133 ;; Tests assume we are in this directory
6134 (chdir "core/pax-exam-spi")))
6135 (add-before 'check 'fix-tests
6137 ;; One test checks that this file is present.
6138 (mkdir-p "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi")
6139 (with-output-to-file
6140 "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi/pom.properties"
6143 (string-append "artifactId = pax-exam-spi\n"
6144 "version = " ,(package-version java-ops4j-pax-exam-core-spi)))))
6145 ;; Maven puts compilation results in the target directory, while we
6146 ;; put them in the build directory.
6147 (substitute* '("src/test/java/org/ops4j/pax/exam/spi/war/WarBuilderTest.java"
6148 "src/test/java/org/ops4j/pax/exam/spi/war/WarTestProbeBuilderTest.java"
6149 "src/test/java/org/ops4j/pax/exam/spi/war/ZipBuilderTest.java")
6150 (("target") "build"))
6151 ;; One test is expected to fail, but it doesn't throw the expected exception
6152 (substitute* "src/test/java/org/ops4j/pax/exam/spi/reactors/BaseStagedReactorTest.java"
6153 (("AssertionError") "IllegalArgumentException")))))))
6155 `(("java-ops4j-pax-exam-core" ,java-ops4j-pax-exam-core)
6156 ("lang" ,java-ops4j-base-lang)
6157 ("monitors" ,java-ops4j-base-monitors)
6158 ("store" ,java-ops4j-base-store)
6159 ("io" ,java-ops4j-base-io)
6160 ("spi" ,java-ops4j-base-spi)
6161 ("osgi" ,java-osgi-core)
6162 ("slf4j" ,java-slf4j-api)
6163 ("tinybundles" ,java-ops4j-pax-tinybundles)))
6165 `(("mockito" ,java-mockito-1)
6166 ("junit" ,java-junit)
6167 ("hamcrest" ,java-hamcrest-core)
6168 ("cglib" ,java-cglib)
6169 ("objenesis" ,java-objenesis)
6170 ("asm" ,java-asm)))))
6172 (define-public java-ops4j-pax-exam-core-junit
6174 (inherit java-ops4j-pax-exam-core)
6175 (name "java-ops4j-pax-exam-core-junit")
6177 `(#:jar-name "ops4j-pax-exam-core-junit.jar"
6178 #:source-dir "drivers/pax-exam-junit4/src/main/java"
6179 #:tests? #f)); no tests
6181 `(("junit" ,java-junit)
6182 ("slf4j" ,java-slf4j-api)
6183 ("core" ,java-ops4j-pax-exam-core)
6184 ("spi" ,java-ops4j-pax-exam-core-spi)))
6185 (native-inputs '())))
6187 (define-public java-fasterxml-jackson-annotations
6189 (name "java-fasterxml-jackson-annotations")
6193 (uri (string-append "https://github.com/FasterXML/"
6194 "jackson-annotations/archive/"
6195 "jackson-annotations-" version ".tar.gz"))
6198 "0mr95xd0da6a4g95zvrl1ryk5n5zv2rc696w3xnsr5hxk2gicfc4"))))
6199 (build-system ant-build-system)
6201 `(#:jar-name "jackson-annotations.jar"
6202 #:source-dir "src/main/java"
6203 #:test-dir "src/test"))
6205 `(("junit" ,java-junit)))
6206 (home-page "https://github.com/FasterXML/jackson-annotations")
6207 (synopsis "General purpose annotations for the Jackson Data Processor")
6208 (description "This package contains general purpose annotations for the
6209 Jackson Data Processor, used on value and handler types. The only annotations
6210 not included are ones that require dependency to the Databind package.")
6211 (license license:asl2.0)))
6213 (define-public java-fasterxml-jackson-core
6215 (name "java-fasterxml-jackson-core")
6219 (uri (string-append "https://github.com/FasterXML/"
6220 "jackson-core/archive/"
6221 "jackson-core-" version ".tar.gz"))
6224 "159hsnk17jr1gyzkf01cxvsn45srnk37g949r7364qlsr527gjgd"))))
6225 (build-system ant-build-system)
6227 `(#:jar-name "jackson-core.jar"
6228 #:source-dir "src/main/java"
6229 #:test-dir "src/test"
6232 ;; Expected failure. pom.xml excludes these
6234 ;; Base classes that have no constructor for junit
6236 "**/ConcurrencyReadTest.java"
6237 "**/ManualCharAccessTest.java"
6238 "**/ManualCharAccessTest.java"
6239 "**/TrailingCommasTest.java"
6240 "**/AsyncMissingValuesInObjectTest.java"
6241 "**/AsyncMissingValuesInArrayTest.java")
6243 (modify-phases %standard-phases
6244 (add-before 'configure 'generate-PackageVersion.java
6246 (let* ((out "src/main/java/com/fasterxml/jackson/core/json/PackageVersion.java")
6247 (in (string-append out ".in")))
6250 (("@package@") "com.fasterxml.jackson.core.json")
6251 (("@projectversion@") ,version)
6252 (("@projectgroupid@") "com.fasterxml.jackson.core")
6253 (("@projectartifactid@") "jackson-core")))))
6254 (add-before 'build 'copy-resources
6256 (copy-recursively "src/main/resources"
6258 (add-before 'check 'copy-test-resources
6260 (copy-recursively "src/test/resources"
6261 "build/test-classes"))))))
6263 `(("junit" ,java-junit)
6264 ("hamcrest" ,java-hamcrest-core)))
6265 (home-page "https://github.com/FasterXML/jackson-core")
6268 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
6270 (define-public java-fasterxml-jackson-databind
6272 (name "java-fasterxml-jackson-databind")
6276 (uri (string-append "https://github.com/FasterXML/"
6277 "jackson-databind/archive/"
6278 "jackson-databind-" version ".tar.gz"))
6281 "1zd2cw4z6kdkbx8za96xh9pyicv2a2l7y0rkcx2fqd8hv6d47s08"))))
6282 (build-system ant-build-system)
6284 `(#:jar-name "jackson-databind.jar"
6285 #:source-dir "src/main/java"
6286 #:tests? #f; requires javax.measures for which I can't find a free implementation
6288 (modify-phases %standard-phases
6289 (add-before 'configure 'generate-PackageVersion.java
6291 (let* ((out "src/main/java/com/fasterxml/jackson/databind/cfg/PackageVersion.java")
6292 (in (string-append out ".in")))
6295 (("@package@") "com.fasterxml.jackson.databind.cfg")
6296 (("@projectversion@") ,version)
6297 (("@projectgroupid@") "com.fasterxml.jackson.databind")
6298 (("@projectartifactid@") "jackson-databind")))))
6299 (add-before 'build 'copy-resources
6301 (copy-recursively "src/main/resources" "build/classes"))))))
6303 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
6304 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)))
6305 (home-page "https://github.com/FasterXML/jackson-databind")
6306 (synopsis "Data-binding functionality and tree-model for the Jackson Data Processor")
6307 (description "This package contains the general-purpose data-binding
6308 functionality and tree-model for Jackson Data Processor. It builds on core
6309 streaming parser/generator package, and uses Jackson Annotations for
6311 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
6313 (define-public java-fasterxml-jackson-modules-base-jaxb
6315 (name "java-fasterxml-jackson-modules-base-jaxb")
6319 (uri (string-append "https://github.com/FasterXML/"
6320 "jackson-modules-base/archive/"
6321 "jackson-modules-base-" version ".tar.gz"))
6324 "1wws95xi8sppp6b0k2vvjdjyynl20r1a4dwrhai08lzlria6blp5"))))
6325 (build-system ant-build-system)
6327 `(#:jar-name "jackson-modules-base-jaxb.jar"
6328 #:source-dir "jaxb/src/main/java"
6329 #:test-dir "jaxb/src/test"
6331 ;; Base class for tests
6332 (list "**/BaseJaxbTest.java")
6334 (modify-phases %standard-phases
6335 (add-before 'configure 'generate-PackageVersion.java
6337 (let* ((out (string-append "jaxb/src/main/java/com/fasterxml/"
6338 "jackson/module/jaxb/PackageVersion.java"))
6339 (in (string-append out ".in")))
6342 (("@package@") "com.fasterxml.jackson.module.jaxb")
6343 (("@projectversion@") ,version)
6344 (("@projectgroupid@") "com.fasterxml.jackson.module.jaxb")
6345 (("@projectartifactid@") "jackson-module-jaxb")))))
6346 (add-before 'build 'copy-resources
6348 (copy-recursively "jaxb/src/main/resources" "build/classes"))))))
6350 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
6351 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
6352 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)))
6354 `(("java-junit" ,java-junit)))
6355 (home-page "https://github.com/FasterXML/jackson-modules-base")
6356 (synopsis "Jaxb annotations jackson module")
6357 (description "This package is the jaxb annotations module for jackson.")
6358 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
6360 (define-public java-snakeyaml
6362 (name "java-snakeyaml")
6366 (uri (string-append "https://bitbucket.org/asomov/snakeyaml/get/v"
6370 "0rf5ha6w0waz50jz2479jsrbgmd0dnx0gs337m126j5z7zlmg7mg"))))
6371 (build-system ant-build-system)
6373 `(#:jar-name "java-snakeyaml.jar"
6374 #:source-dir "src/main/java"
6375 ;; Tests require velocity, a cyclic dependency, and
6376 ;; java-spring-framework-context which is not packaged.
6378 (home-page "https://bitbucket.org/asomov/snakeyaml")
6379 (synopsis "YAML processor")
6380 (description "SnakeYAML is a YAML processor for the Java Virtual Machine.")
6381 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
6383 (define-public java-fasterxml-jackson-dataformat-yaml
6385 (name "java-fasterxml-jackson-dataformat-yaml")
6389 (uri (string-append "https://github.com/FasterXML/"
6390 "jackson-dataformats-text/archive/"
6391 "jackson-dataformats-text-" version ".tar.gz"))
6394 "1hikl06khaxbg439avf442qifcadap8w0lx13f0nnhp2vh3dkbz7"))))
6395 (build-system ant-build-system)
6397 `(#:jar-name "jackson-dataformat-yaml.jar"
6398 #:source-dir "yaml/src/main/java"
6399 #:test-dir "yaml/src/test"
6400 #:test-exclude (list "**/failing/**.java")
6402 (modify-phases %standard-phases
6403 (add-before 'configure 'generate-PackageVersion.java
6405 (let* ((out "yaml/src/main/java/com/fasterxml/jackson/dataformat/yaml/PackageVersion.java")
6406 (in (string-append out ".in")))
6409 (("@package@") "com.fasterxml.jackson.dataformat.yaml")
6410 (("@projectversion@") ,version)
6411 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.yaml")
6412 (("@projectartifactid@") "jackson-dataformat-yaml"))))))))
6414 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
6415 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
6416 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)
6417 ("java-snakeyaml" ,java-snakeyaml)))
6419 `(("junit" ,java-junit)
6420 ("hamcrest" ,java-hamcrest-core)
6421 ("java-ops4j-pax-exam-core-spi" ,java-ops4j-pax-exam-core-spi)
6422 ("java-ops4j-pax-exam-core-junit" ,java-ops4j-pax-exam-core-junit)
6423 ("java-ops4j-pax-exam" ,java-ops4j-pax-exam-core)))
6424 (home-page "https://github.com/FasterXML/jackson-dataformats-text")
6425 (synopsis "Yaml backend for Jackson")
6426 (description "Dataformat backends are used to support format alternatives
6427 to JSON, supported by default. This is done by sub-classing Jackson core
6429 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
6431 (define-public java-stax2-api
6433 (name "java-stax2-api")
6437 (uri (string-append "https://github.com/FasterXML/stax2-api/archive/"
6438 "stax2-api-" version ".tar.gz"))
6441 "1amc1si0l0hyyw2sawmnzy4hkna3z6fp195y4nm5m9wb9ld5awkq"))))
6442 (build-system ant-build-system)
6444 `(#:jar-name "java-stax2-api.jar"
6445 #:source-dir "src/main/java"
6446 #:tests? #f)); no tests
6447 (home-page "https://github.com/FasterXML/stax2-api")
6448 (synopsis "Stax2 API")
6449 (description "Stax2 API is an extension to basic Stax 1.0 API that adds
6450 significant new functionalities, such as full-featured bi-direction validation
6451 interface and high-performance Typed Access API.")
6452 (license license:bsd-2)))
6454 (define-public java-woodstox-core
6456 (name "java-woodstox-core")
6460 (uri (string-append "https://github.com/FasterXML/woodstox/archive/"
6461 "woodstox-core-" version ".tar.gz"))
6464 "1i7pdgb8jbw6gdy5kmm0l6rz109n2ns92pqalpyp24vb8vlvdfd4"))))
6465 (build-system ant-build-system)
6467 `(#:jar-name "woodstox.jar"
6469 (list "**/Base*.java" "failing/**")
6471 (modify-phases %standard-phases
6472 (add-before 'build 'remove-msv-dep
6474 ;; we don't need osgi, and it depends on msv
6475 (delete-file-recursively "src/main/java/com/ctc/wstx/osgi")
6476 ;; msv's latest release is from 2011 and we don't need it
6477 (delete-file-recursively "src/main/java/com/ctc/wstx/msv")
6478 (delete-file-recursively "src/test/java/wstxtest/osgi")
6479 (delete-file-recursively "src/test/java/wstxtest/msv")))
6480 (add-before 'build 'copy-resources
6482 (copy-recursively "src/main/resources" "build/classes"))))))
6484 `(("stax2" ,java-stax2-api)))
6486 `(("junit" ,java-junit)))
6487 (home-page "https://github.com/FasterXML/woodstox")
6488 (synopsis "Stax XML API implementation")
6489 (description "Woodstox is a stax XML API implementation.")
6490 (license license:asl2.0)))
6492 (define-public java-fasterxml-jackson-dataformat-xml
6494 (name "java-fasterxml-jackson-dataformat-xml")
6498 (uri (string-append "https://github.com/FasterXML/"
6499 "jackson-dataformat-xml/archive/"
6500 "jackson-dataformat-xml-" version ".tar.gz"))
6503 "111fkkl90w31jbf30kgj82qdcxlw4sxppki7i198liw0ck1jcavq"))))
6504 (build-system ant-build-system)
6506 `(#:jar-name "jackson-dataformat-xml.jar"
6507 #:source-dir "src/main/java"
6509 (list "**/failing/**")
6511 (modify-phases %standard-phases
6512 (add-before 'configure 'generate-PackageVersion.java
6514 (let* ((out "src/main/java/com/fasterxml/jackson/dataformat/xml/PackageVersion.java")
6515 (in (string-append out ".in")))
6519 (("@package@") "com.fasterxml.jackson.dataformat.xml")
6520 (("@projectversion@") ,version)
6521 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.xml")
6522 (("@projectartifactid@") "jackson-dataformat-xml")))))
6523 (add-before 'build 'copy-resources
6525 (copy-recursively "src/main/resources" "build/classes"))))))
6527 `(("jackson-annotations" ,java-fasterxml-jackson-annotations)
6528 ("jackson-core" ,java-fasterxml-jackson-core)
6529 ("jackson-modules-base-jaxb" ,java-fasterxml-jackson-modules-base-jaxb)
6530 ("jackson-databind" ,java-fasterxml-jackson-databind)
6531 ("stax2-api" ,java-stax2-api)
6532 ("woodstox" ,java-woodstox-core)))
6534 `(("junit" ,java-junit)
6535 ("hamcrest" ,java-hamcrest-core)))
6536 (home-page "https://github.com/FasterXML/jackson-dataformat-xml")
6537 (synopsis "Read and write XML")
6538 (description "This package contains Jackson extension component for reading
6539 and writing XML encoded data.
6541 Further, the goal is to emulate how JAXB data-binding works with \"Code-first\"
6542 approach (that is, no support is added for \"Schema-first\" approach). Support
6543 for JAXB annotations is provided by JAXB annotation module; this module
6544 provides low-level abstractions (@code{JsonParser}, @code{JsonGenerator},
6545 @code{JsonFactory}) as well as small number of higher level overrides needed to
6546 make data-binding work.")
6547 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
6549 (define-public java-hdrhistogram
6551 (name "java-hdrhistogram")
6555 (uri (string-append "https://github.com/HdrHistogram/HdrHistogram/"
6556 "archive/HdrHistogram-" version ".tar.gz"))
6559 "1sicbmc3sr42nw93qbkb26q9rn33ag33k6k77phjc3j5h5gjffqv"))))
6560 (build-system ant-build-system)
6562 `(#:jar-name "java-hdrhistogram.jar"
6563 #:source-dir "src/main/java"
6565 (modify-phases %standard-phases
6566 (add-before 'configure 'set-version
6568 (let* ((version-java "src/main/java/org/HdrHistogram/Version.java")
6569 (template (string-append version-java ".template")))
6570 (copy-file template version-java)
6571 (substitute* version-java
6572 (("\\$VERSION\\$") ,version)
6573 (("\\$BUILD_TIME\\$") "0"))
6576 `(("junit" ,java-junit)
6577 ("hamcrest" ,java-hamcrest-core)))
6578 (home-page "https://hdrhistogram.github.io/HdrHistogram")
6579 (synopsis "High dynamic range histogram")
6580 (description "Hdrhistogram allows to create histograms that support
6581 recording and analyzing sampled data value counts across a configurable integer
6582 value range with configurable value precision within the range. Value precision
6583 is expressed as the number of significant digits in the value recording, and
6584 provides control over value quantization behavior across the value range and
6585 the subsequent value resolution at any given level.")
6586 (license license:public-domain)))
6588 (define-public java-cofoja
6590 (name "java-cofoja")
6595 (url "https://github.com/nhatminhle/cofoja.git")
6596 (commit (string-append "v" version))))
6597 (file-name (string-append "java-cofoja-" version "-checkout"))
6600 "0p7sz8y5xgpi5rx1qwn6587fkd52qr3ha3ybh14gqcyxhikl525w"))))
6601 (build-system ant-build-system)
6603 `(#:build-target "dist"
6604 #:test-target "test"
6607 (list "-Ddist.dir=dist")
6608 #:modules ((guix build ant-build-system)
6609 (guix build java-utils)
6614 (modify-phases %standard-phases
6615 ;; The bulid system ignores the class path the ant-build-system sets
6616 ;; up and instead expects to find all dependencies in the "lib"
6618 (add-after 'unpack 'create-libdir
6619 (lambda* (#:key inputs #:allow-other-keys)
6623 (let ((target (string-append "lib/" (basename file))))
6624 (unless (file-exists? target)
6625 (symlink file target))))
6626 (append-map (match-lambda
6628 (find-files dir "\\.jar$")))
6631 (replace 'install (install-jars "dist")))))
6633 `(("java-asm" ,java-asm)))
6635 `(("java-junit" ,java-junit)))
6636 (home-page "https://github.com/nhatminhle/cofoja")
6637 (synopsis "Contracts for Java")
6638 (description "Contracts for Java, or Cofoja for short, is a contract
6639 programming framework and test tool for Java, which uses annotation processing
6640 and bytecode instrumentation to provide run-time checking. (In particular,
6641 this is not a static analysis tool.)")
6642 (license license:lgpl3+)))
6644 (define-public java-aopalliance
6646 (name "java-aopalliance")
6650 ;; Note: this git repository is not official, but contains the
6651 ;; source code that is in the CVS repository. Downloading the
6652 ;; tarball from sourceforge is undeterministic, and the cvs download
6655 (url "https://github.com/hoverruan/aopalliance")
6656 (commit "0d7757ae204e5876f69431421fe9bc2a4f01e8a0")))
6657 (file-name (string-append name "-" version))
6660 "0rsg2b0v3hxlq2yk1i3m2gw3xwq689j3cwx9wbxvqfpdcjbca0qr"))))
6661 (build-system ant-build-system)
6663 `(#:jar-name "java-aopalliance.jar"
6665 #:tests? #f; no tests
6666 #:source-dir "aopalliance/src/main"))
6667 (home-page "http://aopalliance.sourceforge.net")
6668 (synopsis "Aspect-Oriented Programming")
6669 (description "The AOP Alliance project is a joint project between several
6670 software engineering people who are interested in Aspect-Oriented Programming
6672 (license license:public-domain)))
6674 (define-public java-javax-inject
6676 (name "java-javax-inject")
6680 (uri (string-append "https://github.com/javax-inject/javax-inject/"
6681 "archive/javax.inject-" version ".tar.gz"))
6684 "1ydrlvh2r7vr1g7lhjwy3w2dggpj9h6pix1lakkkgdywb365n6g0"))))
6685 (build-system ant-build-system)
6687 `(#:jar-name "java-javax-inject.jar"
6689 #:tests? #f)); no tests
6690 (home-page "http://github.com/javax-inject/javax-inject")
6691 (synopsis "JSR-330: Dependency Injection for Java")
6692 (description "This package specifies a means for obtaining objects in such
6693 a way as to maximize reusability, testability and maintainability compared to
6694 traditional approaches such as constructors, factories, and service locators
6695 (e.g., JNDI). This process, known as dependency injection, is beneficial to
6696 most nontrivial applications.
6698 Many types depend on other types. For example, a @var{Stopwatch} might depend
6699 on a @var{TimeSource}. The types on which a type depends are known as its
6700 dependencies. The process of finding an instance of a dependency to use at run
6701 time is known as resolving the dependency. If no such instance can be found,
6702 the dependency is said to be unsatisfied, and the application is broken.")
6703 (license license:asl2.0)))
6705 (define-public java-guice
6711 (uri (string-append "https://github.com/google/guice/archive/"
6713 (file-name (string-append name "-" version ".tar.gz"))
6716 "0dwmqjzlavb144ywqqglj3h68hqszkff8ai0a42hyb5il0qh4rbp"))))
6717 (build-system ant-build-system)
6719 `(#:jar-name "java-guice.jar"
6721 #:tests? #f; FIXME: tests are not in a java sub directory
6722 #:source-dir "core/src"))
6724 `(("guava" ,java-guava)
6725 ("java-cglib" ,java-cglib)
6726 ("java-aopalliance" ,java-aopalliance)
6727 ("java-javax-inject" ,java-javax-inject)
6728 ("java-asm" ,java-asm)))
6729 (home-page "https://github.com/google/guice")
6730 (synopsis "Lightweight dependency injection framework")
6731 (description "Guice is a lightweight dependency injection framework fo
6733 (license license:asl2.0)))
6735 (define-public java-guice-servlet
6737 (inherit java-guice)
6738 (name "java-guice-servlet")
6740 `(#:jar-name "guice-servlet.jar"
6741 #:source-dir "extensions/servlet/src/"
6743 #:tests? #f)); FIXME: not in a java subdir
6745 `(("guice" ,java-guice)
6746 ("servlet" ,java-tomcat)
6747 ,@(package-inputs java-guice)))))
6749 (define-public java-assertj
6751 (name "java-assertj")
6755 (uri (string-append "https://github.com/joel-costigliola/"
6756 "assertj-core/archive/"
6757 "assertj-core-" version ".tar.gz"))
6760 "1kf124fxskf548rklkg86294w2x6ajqrff94rrhyqns31danqkfz"))))
6761 (build-system ant-build-system)
6763 `(#:jar-name "java-assertj.jar"
6765 #:source-dir "src/main/java"
6766 #:tests? #f)); depends on tng-junit which depends on assertj
6768 `(("cglib" ,java-cglib)
6769 ("junit" ,java-junit)
6770 ("hamcrest" ,java-hamcrest-core)))
6772 `(("mockito" ,java-mockito-1)))
6773 (home-page "https://joel-costigliola.github.io/assertj/index.html")
6774 (synopsis "Fluent assertions for java")
6775 (description "AssertJ core is a Java library that provides a fluent
6776 interface for writing assertions. Its main goal is to improve test code
6777 readability and make maintenance of tests easier.")
6778 (license license:asl2.0)))
6780 (define-public java-jboss-javassist
6782 (name "java-jboss-javassist")
6786 (uri (string-append "https://github.com/jboss-javassist/javassist/"
6788 (string-map (lambda (x) (if (eq? x #\.) #\_ x)) version)
6792 "10lpcr3sbf7y6fq6fc2h2ik7rqrivwcy4747bg0kxhwszil3cfmf"))))
6793 (build-system ant-build-system)
6795 `(#:jar-name "java-jboss-javassist.jar"
6797 #:source-dir "src/main"
6798 #:tests? #f; FIXME: requires junit-awtui and junit-swingui from junit3
6800 (modify-phases %standard-phases
6801 (add-before 'configure 'remove-binary
6803 (delete-file "javassist.jar")
6806 `(("junit" ,java-junit)))
6807 (home-page "https://github.com/jboss-javassist/javassist")
6808 (synopsis "Java bytecode engineering toolkit")
6809 (description "Javassist (JAVA programming ASSISTant) makes Java bytecode
6810 manipulation simple. It is a class library for editing bytecodes in Java; it
6811 enables Java programs to define a new class at runtime and to modify a class
6812 file when the JVM loads it.")
6813 (license (list license:gpl2 license:cddl1.0)))); either gpl2 only or cddl.
6815 (define-public java-jcommander
6817 (name "java-jcommander")
6821 (uri (string-append "https://github.com/cbeust/jcommander/archive/"
6823 (file-name (string-append name "-" version ".tar.gz"))
6826 "1f5k2ckay6qjc3d3w3d7bc0p3cx3c7n6p6zxvw1kibqdr0q98wlx"))))
6827 (build-system ant-build-system)
6829 `(#:jar-name "java-jcommander.jar"
6831 #:tests? #f; requires testng which depends on jcommander
6832 #:source-dir "src/main/java"))
6833 (home-page "http://jcommander.org")
6834 (synopsis "Command line parameters parser")
6835 (description "JCommander is a very small Java framework that makes it
6836 trivial to parse command line parameters. Parameters are declared with
6838 (license license:asl2.0)))
6840 (define-public java-bsh
6846 (uri (string-append "https://github.com/beanshell/beanshell/archive/"
6848 (file-name (string-append name "-" version ".tar.gz"))
6851 "1bawkxk6jyc75hxvzkpz689h73cn3f222m0ar3nvb0dal2b85kfv"))))
6852 (build-system ant-build-system)
6854 `(#:build-target "jarall"
6855 #:test-target "junit-tests-all"
6857 (modify-phases %standard-phases
6859 (lambda* (#:key outputs #:allow-other-keys)
6860 (let ((share (string-append (assoc-ref outputs "out") "/share/java")))
6862 (copy-file "dist/bsh-2.0b6.jar" (string-append share "/bsh-2.0b6.jar"))
6864 (home-page "http://beanshell.org/")
6865 (synopsis "Lightweight Scripting for Java")
6866 (description "BeanShell is a small, free, embeddable Java source
6867 interpreter with object scripting language features, written in Java.
6868 BeanShell dynamically executes standard Java syntax and extends it with common
6869 scripting conveniences such as loose types, commands, and method closures like
6870 those in Perl and JavaScript.")
6871 (license license:asl2.0)))
6873 (define-public java-fest-util
6875 (name "java-fest-util")
6879 (uri (string-append "https://github.com/alexruiz/fest-util/"
6880 "archive/fest-util-" version ".tar.gz"))
6883 "05g6hljz5mdaakk8d7g32klbhz9bdwp3qlj6rdaggdidxs3x1sb8"))))
6884 (build-system ant-build-system)
6886 `(#:jar-name "java-fest-util.jar"
6887 #:source-dir "src/main/java"))
6889 `(("junit" ,java-junit)
6890 ("hamcrest" ,java-hamcrest-core)))
6891 (home-page "https://github.com/alexruiz/fest-util")
6892 (synopsis "FEST common utilities")
6893 (description "Common utilities used in all FEST module.")
6894 (license license:asl2.0)))
6896 (define-public java-fest-test
6898 (name "java-fest-test")
6902 (uri (string-append "https://github.com/alexruiz/fest-test/"
6903 "archive/fest-test-" version ".tar.gz"))
6906 "1rxfbw6l9vc65iy1x3fb617qc6y4w2k430pgf1mfbxfdlxbm0f7g"))))
6907 (build-system ant-build-system)
6909 `(#:jar-name "java-fest-test.jar"
6910 #:source-dir "src/main/java"
6911 #:tests? #f)); no tests
6913 `(("junit" ,java-junit)))
6914 (home-page "https://github.com/alexruiz/fest-test")
6915 (synopsis "Common FEST testing infrastructure")
6916 (description "Fest-test contains the common FEST testing infrastructure.")
6917 (license license:asl2.0)))
6919 (define-public java-fest-assert
6921 (name "java-fest-assert")
6925 (uri (string-append "https://github.com/alexruiz/fest-assert-2.x/"
6926 "archive/fest-assert-core-" version ".tar.gz"))
6929 "1bi0iqavikzww6rxvz5jyg7y6bflv95s6ibryxx0xfcxrrw6i5lw"))))
6930 (build-system ant-build-system)
6932 `(#:jar-name "java-fest-assert.jar"
6933 #:source-dir "src/main/java"
6938 ;; Unable to set MockitoNamingPolicy on cglib generator which creates FastClasses
6939 "**/MessageFormatter_format_Test.java"
6940 "**/internal/*/*_assert*_Test.java")))
6942 `(("java-fest-util" ,java-fest-util)))
6944 `(("java-junit" ,java-junit)
6945 ("java-fest-test" ,java-fest-test)
6946 ("java-hamcrest-core" ,java-hamcrest-core)
6947 ("java-mockito" ,java-mockito-1)
6948 ("java-cglib" ,java-cglib)
6949 ("java-objenesis" ,java-objenesis)
6950 ("java-asm" ,java-asm)))
6951 (home-page "https://github.com/alexruiz/fest-assert-2.x")
6952 (synopsis "FEST fluent assertions")
6953 (description "FEST-Assert provides a fluent interface for assertions.")
6954 (license license:asl2.0)))
6956 (define-public java-testng
6958 (name "java-testng")
6963 (url "https://github.com/cbeust/testng.git")
6965 (file-name (string-append name "-" version "-checkout"))
6968 "0ngj88dpbqqdx9084cmiasmn9q3v5dgx45qbvxpip47nxc5x14xy"))))
6969 (build-system ant-build-system)
6971 `(#:jdk ,icedtea-8; java.util.function
6972 #:jar-name "java-testng.jar"
6973 #:source-dir "src/main/java"
6975 (modify-phases %standard-phases
6976 ;; FIXME: I don't know why these tests fail
6977 (add-after 'unpack 'delete-failing-tests
6979 (substitute* "src/test/resources/testng.xml"
6980 (("<class name=\"test.configuration.github1625.TestRunnerIssue1625\"/>") "")
6981 (("<class name=\"test.serviceloader.ServiceLoaderTest\" />") ""))
6983 ;; We don't have groovy
6984 (add-after 'unpack 'delete-groovy-tests
6986 (delete-file-recursively "src/test/java/test/dependent/issue1648/")
6987 (substitute* "src/test/resources/testng.xml"
6988 (("<class name=\"test.dependent.issue1648.TestRunner\"/>") ""))
6990 (add-before 'build 'copy-resources
6992 (copy-recursively "src/main/resources" "build/classes")
6994 (add-before 'check 'copy-test-resources
6996 (copy-recursively "src/test/resources" "build/test-classes")
7000 (system* "ant" "compile-tests")
7001 ;; we don't have groovy
7002 (substitute* "src/test/resources/testng.xml"
7003 (("<class name=\"test.groovy.GroovyTest\" />") ""))
7004 (zero? (system* "java" "-cp" (string-append (getenv "CLASSPATH")
7006 ":build/test-classes")
7007 "-Dtest.resources.dir=src/test/resources"
7008 "org.testng.TestNG" "src/test/resources/testng.xml")))))))
7010 `(("junit" ,java-junit)
7011 ("java-jsr305" ,java-jsr305)
7012 ("java-bsh" ,java-bsh)
7013 ("java-jcommander" ,java-jcommander)
7014 ("java-guice" ,java-guice)
7015 ("snakeyaml" ,java-snakeyaml)))
7017 `(("guava" ,java-guava)
7018 ("java-javax-inject" ,java-javax-inject)
7019 ("java-hamcrest" ,java-hamcrest-all)
7020 ("java-assertj" ,java-assertj)
7021 ("java-mockito" ,java-mockito-1)
7022 ("cglib" ,java-cglib)
7024 ("aopalliance" ,java-aopalliance)))
7025 (home-page "http://testng.org")
7026 (synopsis "Testing framework")
7027 (description "TestNG is a testing framework inspired from JUnit and NUnit
7028 but introducing some new functionalities that make it more powerful and easier
7030 (license license:asl2.0)))
7032 (define-public java-jnacl
7039 (url "https://github.com/neilalexander/jnacl")
7040 (commit "40c322e0a42637ab17cdf941138eeaf2494055f8")))
7043 "1pspnmp44q61a2q4bpslpxw86rfn8s5l0xgvyrikqgdvg7ypx597"))))
7044 (build-system ant-build-system)
7046 `(#:jar-name "java-jnacl.jar"
7047 #:source-dir "src/main/java"
7050 (modify-phases %standard-phases
7051 (add-before 'build 'fix-tests
7053 (substitute* "src/test/java/com/neilalexander/jnacl/NaClTest.java"
7054 (("assertions.Assertions") "assertions.api.Assertions"))
7055 (substitute* "src/test/java/com/neilalexander/jnacl/NaclSecretBoxTest.java"
7056 (("assertions.Assertions") "assertions.api.Assertions"))
7060 (system* "ant" "compile-tests")
7062 (zero? (system* "java" "-cp" (string-append (getenv "CLASSPATH")
7064 ":build/test-classes")
7065 "org.testng.TestNG" "-testclass"
7066 "build/test-classes/com/neilalexander/jnacl/NaclSecretBoxTest.class"))
7067 (zero? (system* "java" "-cp" (string-append (getenv "CLASSPATH")
7069 ":build/test-classes")
7070 "org.testng.TestNG" "-testclass"
7071 "build/test-classes/com/neilalexander/jnacl/NaClTest.class"))))))))
7073 `(("java-testng" ,java-testng)
7074 ("java-fest-util" ,java-fest-util)
7075 ("java-fest-assert" ,java-fest-assert)))
7076 (home-page "https://github.com/neilalexander/jnacl")
7077 (synopsis "Java implementation of NaCl")
7078 (description "Pure Java implementation of the NaCl: Networking and
7079 Cryptography library.")
7080 (license license:mpl2.0)))
7082 (define-public java-mvel2
7088 (uri (string-append "https://github.com/mvel/mvel/archive/mvel2-"
7089 version ".Final.tar.gz"))
7092 "01ph5s9gm16l2qz58lg21w6fna7xmmrj7f9bzqr1jim7h9557d3z"))))
7093 (build-system ant-build-system)
7095 `(#:jar-name "mvel2.jar"
7096 #:source-dir "src/main/java"
7098 (list "**/Abstract*.java"
7099 ;; Base class with no tests
7100 "**/MVELThreadTest.java")
7102 (modify-phases %standard-phases
7103 (add-after 'install 'install-bin
7104 (lambda* (#:key outputs #:allow-other-keys)
7105 (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
7107 (with-output-to-file (string-append bin "/mvel2")
7111 "#!" (which "bash") "\n"
7112 "if [ \"$#\" -ne \"2\" ]; then\n"
7113 "echo 'Usage: mvel2 <script> <out.dir>'\n"
7116 "java -Dout.dir=$2 -cp " (getenv "CLASSPATH")
7117 ":" (assoc-ref outputs "out") "/share/java/mvel2.jar"
7118 " org.mvel2.sh.Main $1"))))
7119 (chmod (string-append bin "/mvel2") #o755))
7122 `(("junit" ,java-junit)
7123 ("hamcrest" ,java-hamcrest-core)))
7124 (home-page "https://github.com/mvel/mvel")
7125 (synopsis "MVFLEX Expression Language")
7126 (description "MVEL has largely been inspired by Java syntax, but has some
7127 fundamental differences aimed at making it more efficient as an expression
7128 language, such as operators that directly support collection, array and string
7129 matching, as well as regular expressions. MVEL is used to evaluate expressions
7130 written using Java syntax.
7132 In addition to the expression language, MVEL serves as a templating language for
7133 configuration and string construction.")
7134 (license license:asl2.0)))
7136 (define-public java-commons-jexl-2
7138 (name "java-commons-jexl")
7142 (uri (string-append "mirror://apache/commons/jexl/source/"
7143 "commons-jexl-" version "-src.tar.gz"))
7146 "1ai7632bwwaxglb0nbpblpr2jw5g20afrsaq372ipkphi3ncy1jz"))))
7147 (build-system ant-build-system)
7149 `(#:jar-name "commons-jexl-2.jar"
7151 #:source-dir "src/main/java"
7153 (modify-phases %standard-phases
7154 (add-before 'check 'disable-broken-tests
7155 (lambda* (#:key inputs #:allow-other-keys)
7156 (with-directory-excursion "src/test/java/org/apache/commons/jexl2/"
7157 (substitute* "ArithmeticTest.java"
7158 (("asserter.assertExpression\\(\"3 / 0\"") "//")
7159 (("asserter.assertExpression\\(\"imanull") "//"))
7160 ;; This test fails with "ambiguous method invocation"
7161 (delete-file "CacheTest.java")
7162 ;; This test doesn't have access to the temp directory
7163 (substitute* "ClassCreatorTest.java"
7164 (("java.io.tmpdir") "user.dir"))
7165 ;; This test fails in trying to detect whether it can run.
7166 (substitute* "ClassCreator.java"
7167 (("boolean canRun =.*") "boolean canRun = false;\n"))
7168 ;; ...and these tests depend on it.
7169 (delete-file "scripting/JexlScriptEngineOptionalTest.java")
7170 (delete-file "scripting/JexlScriptEngineTest.java"))
7172 (add-before 'build 'run-javacc
7174 (with-directory-excursion "src/main/java/org/apache/commons/jexl2/parser/"
7175 (and (zero? (system* "java" "jjtree" "Parser.jjt"))
7176 (zero? (system* "java" "javacc" "Parser.jj")))))))))
7178 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)))
7180 `(("java-junit" ,java-junit)
7181 ("java-hamcrest-core" ,java-hamcrest-core)
7182 ("javacc" ,javacc-4)))
7183 (home-page "https://commons.apache.org/proper/commons-jexl/")
7184 (synopsis "Java Expression Language ")
7185 (description "JEXL is a library intended to facilitate the implementation
7186 of dynamic and scripting features in applications and frameworks written in
7187 Java. JEXL implements an Expression Language based on some extensions to the
7188 JSTL Expression Language supporting most of the constructs seen in
7189 shell-script or ECMAScript. Its goal is to expose scripting features usable
7190 by technical operatives or consultants working with enterprise platforms.")
7191 (license license:asl2.0)))
7193 (define-public java-lz4
7199 (uri (string-append "https://github.com/lz4/lz4-java/archive/"
7201 (file-name (string-append name "-" version ".tar.gz"))
7204 "096dm57p2lzqk28n0j2p52x2j3cvnsd2dfqn43n7vbwrkjsy7y54"))))
7205 (build-system ant-build-system)
7207 `(#:jar-name "lz4.jar"
7209 #:source-dir "src/java:src/java-unsafe"
7210 #:tests? #f; FIXME: requires more dependencies
7212 (modify-phases %standard-phases
7213 (add-before 'configure 'generate-source
7215 (with-directory-excursion "src/build/source_templates"
7216 (zero? (system* "mvel2" "../gen_sources.mvel" "../../java"))))))))
7218 `(("mvel" ,java-mvel2)))
7219 (home-page "https://jpountz.github.io/lz4-java")
7220 (synopsis "Compression algorithm")
7221 (description "LZ4 - Java is a Java port of the popular lz4 compression
7222 algorithms and xxHash hashing algorithm.")
7223 (license license:asl2.0)))
7225 (define-public java-bouncycastle-bcprov
7227 (name "java-bouncycastle-bcprov")
7231 (uri "https://bouncycastle.org/download/bcprov-jdk15on-158.tar.gz")
7234 "1hgkg96llbvgs8i0krwz2n0j7wlg6jfnq8w8kg0cc899j0wfmf3n"))))
7235 (build-system ant-build-system)
7237 `(#:jar-name "bouncycastle-bcprov.jar"
7238 #:tests? #f; no tests
7241 (modify-phases %standard-phases
7242 (add-before 'configure 'unzip-src
7245 (with-directory-excursion "src"
7246 (zero? (system* "unzip" "../src.zip"))))))))
7249 ("junit" ,java-junit)))
7250 (home-page "https://www.bouncycastle.org")
7251 (synopsis "Cryptographic library")
7252 (description "Bouncy Castle Provider (bcprov) is a cryptographic library
7253 for the Java programming language.")
7254 (license license:expat)))
7256 (define-public java-bouncycastle-bcpkix
7258 (name "java-bouncycastle-bcpkix")
7262 (uri "https://bouncycastle.org/download/bcpkix-jdk15on-158.tar.gz")
7265 "0is7qay02803s9f7lhnfcjlz61ni3hq5d7apg0iil7nbqkbfbcq2"))))
7266 (build-system ant-build-system)
7268 `(#:jar-name "bouncycastle-bcpkix.jar"
7269 #:tests? #f; no tests
7272 (modify-phases %standard-phases
7273 (add-before 'configure 'unzip-src
7276 (with-directory-excursion "src"
7277 (zero? (system* "unzip" "../src.zip"))))))))
7280 ("junit" ,java-junit)))
7282 `(("bcprov" ,java-bouncycastle-bcprov)))
7283 (home-page "https://www.bouncycastle.org")
7284 (synopsis "Cryptographic library")
7285 (description "Bouncy Castle Java API for PKIX, CMS, EAC, TSP, PKCS, OCSP,
7287 (license license:expat)))
7289 (define-public java-lmax-disruptor
7291 (name "java-lmax-disruptor")
7295 (uri (string-append "https://github.com/LMAX-Exchange/disruptor/"
7296 "archive/" version ".tar.gz"))
7297 (file-name (string-append name "-" version ".tar.gz"))
7300 "17da2gwj5abnlsfgn2xqjk5lgzbg4vkb0hdv2dvc8r2fx4bi7w3g"))))
7301 (build-system ant-build-system)
7303 `(#:jar-name "java-lmax-disruptor.jar"
7305 #:tests? #f)); tests hang
7307 `(("junit" ,java-junit)
7308 ("java-hdrhistogram" ,java-hdrhistogram)
7309 ("java-jmock" ,java-jmock)
7310 ("java-jmock-legacy" ,java-jmock-legacy)
7311 ("java-jmock-junit4" ,java-jmock-junit4)
7312 ("java-hamcrest-all" ,java-hamcrest-all)))
7314 `(("cglib" ,java-cglib)
7315 ("objenesis" ,java-objenesis)
7317 (home-page "https://www.lmax.com/disruptor")
7318 (synopsis "High performance inter-thread communication")
7319 (description "LMAX Disruptor is a software pattern and software component
7320 for high performance inter-thread communication that avoids the need for
7321 message queues or resource locking.")
7322 (license license:asl2.0)))
7324 (define-public java-commons-bcel
7326 (name "java-commons-bcel")
7330 (uri (string-append "mirror://apache/commons/bcel/source/bcel-"
7331 version "-src.tar.gz"))
7334 "0j3x1rxd673k07psclk8k13rqh0x0mf2yy5qiwkiw4z3afa568jy"))))
7335 (build-system ant-build-system)
7337 `(#:jar-name "bcel.jar"
7339 #:source-dir "src/main/java"
7340 #:test-dir "src/test/java"
7341 ;; FIXME: Tests require the unpackaged jna.
7343 (home-page "https://commons.apache.org/proper/commons-bcel/")
7344 (synopsis "Byte code engineering library")
7345 (description "The Byte Code Engineering Library (Apache Commons BCEL) is
7346 intended to give users a convenient way to analyze, create, and
7347 manipulate (binary) Java class files. Classes are represented by objects
7348 which contain all the symbolic information of the given class: methods, fields
7349 and byte code instructions, in particular.
7351 Such objects can be read from an existing file, be transformed by a
7352 program (e.g. a class loader at run-time) and written to a file again. An
7353 even more interesting application is the creation of classes from scratch at
7354 run-time. The @dfn{Byte Code Engineering Library} (BCEL) may be also useful
7355 if you want to learn about the @dfn{Java Virtual Machine} (JVM) and the format
7356 of Java @code{.class} files.")
7357 (license license:asl2.0)))
7359 (define-public java-xerial-core
7361 (name "java-xerial-core")
7365 (uri (string-append "https://github.com/xerial/xerial-java/archive/"
7367 (file-name (string-append name "-" version ".tar.gz"))
7370 "0d3g863i41bgalpa4xr3vm1h140l091n8iwgq5qvby5yivns9y8d"))))
7371 (build-system ant-build-system)
7373 `(#:jar-name "xerial-core.jar"
7374 #:source-dir "xerial-core/src/main/java"
7375 #:test-dir "xerial-core/src/test"
7377 (modify-phases %standard-phases
7378 (add-before 'build 'copy-resources
7380 (copy-recursively "xerial-core/src/main/resources"
7384 `(("junit" ,java-junit)
7385 ("hamcrest" ,java-hamcrest-core)))
7386 (home-page "https://github.com/xerial/xerial-java")
7387 (synopsis "Data management libraries for Java")
7388 (description "Xerial is a set of data management libraries for the Java
7389 programming language. The ultimate goal of the Xerial project is to manage
7390 everything as database, including class objects, text format data, data
7392 (license license:asl2.0)))
7394 (define-public java-powermock-reflect
7396 (name "java-powermock-reflect")
7400 (uri (string-append "https://github.com/powermock/powermock/"
7401 "archive/powermock-" version ".tar.gz"))
7402 (file-name (string-append name "-" version ".tar.gz"))
7405 "0sbgi5vqq7k72wzcdjb20s370vyd4hsbnx71pzb8ishml3gy7fwy"))
7407 (search-patches "java-powermock-fix-java-files.patch"))))
7408 (build-system ant-build-system)
7410 `(#:jar-name "java-powermock-reflect.jar"
7412 #:source-dir "powermock-reflect/src/main/java"
7413 #:test-dir "powermock-reflect/src/test"))
7415 `(("java-objenesis" ,java-objenesis)))
7417 `(("junit" ,java-junit)
7418 ("cglib" ,java-cglib)
7420 ("hamcrest" ,java-hamcrest-core)
7421 ("assertj" ,java-assertj)))
7422 (home-page "https://github.com/powermock/powermock")
7423 (synopsis "Mock library extension framework")
7424 (description "PowerMock is a framework that extends other mock libraries
7425 such as EasyMock with more powerful capabilities. PowerMock uses a custom
7426 classloader and bytecode manipulation to enable mocking of static methods,
7427 constructors, final classes and methods, private methods, removal of static
7428 initializers and more. By using a custom classloader no changes need to be
7429 done to the IDE or continuous integration servers which simplifies adoption.")
7430 (license license:asl2.0)))
7432 (define-public java-powermock-core
7434 (inherit java-powermock-reflect)
7435 (name "java-powermock-core")
7437 `(#:jar-name "java-powermock-core.jar"
7438 #:source-dir "powermock-core/src/main/java"
7439 #:test-dir "powermock-core/src/test"
7440 #:tests? #f; requires powermock-api
7443 (modify-phases %standard-phases
7444 (add-before 'build 'copy-resources
7446 (copy-recursively "powermock-core/src/main/resources"
7447 "build/classes"))))))
7449 `(("reflect" ,java-powermock-reflect)
7450 ("javassist" ,java-jboss-javassist)))
7452 `(("junit" ,java-junit)
7453 ("assertj" ,java-assertj)
7454 ("mockito" ,java-mockito-1)))))
7456 (define-public java-powermock-api-support
7458 (inherit java-powermock-reflect)
7459 (name "java-powermock-api-support")
7460 (build-system ant-build-system)
7462 `(#:jar-name "java-powermock-api-support.jar"
7464 #:source-dir "powermock-api/powermock-api-support/src/main/java"
7465 #:tests? #f)); no tests
7467 `(("core" ,java-powermock-core)
7468 ("reflect" ,java-powermock-reflect)))))
7470 (define-public java-powermock-modules-junit4-common
7472 (inherit java-powermock-reflect)
7473 (name "java-powermock-modules-junit4-common")
7474 (build-system ant-build-system)
7476 `(#:jar-name "java-powermock-modules-junit4-common.jar"
7478 #:source-dir "powermock-modules/powermock-module-junit4-common/src/main/java"
7479 #:test-dir "powermock-modules/powermock-module-junit4-common/src/test"))
7481 `(("core" ,java-powermock-core)
7482 ("easymock" ,java-easymock)
7483 ("reflect" ,java-powermock-reflect)
7484 ("hamcrest" ,java-hamcrest-core)
7485 ("cglib" ,java-cglib)))))
7487 (define-public java-powermock-modules-junit4
7489 (inherit java-powermock-reflect)
7490 (name "java-powermock-modules-junit4")
7491 (build-system ant-build-system)
7493 `(#:jar-name "java-powermock-modules-junit4.jar"
7495 #:source-dir "powermock-modules/powermock-module-junit4/src/main/java"
7496 #:test-dir "powermock-modules/powermock-module-junit4/src/test"
7498 (modify-phases %standard-phases
7499 (add-before 'build 'fix-junit-detection
7501 ;; Our junit version is 4.12-SNAPSHOT
7502 (substitute* (find-files "powermock-modules/powermock-module-junit4"
7503 "PowerMockJUnit4MethodValidator.java")
7504 (("4.12") "4.12-SNAPSHOT")))))))
7506 `(("core" ,java-powermock-core)
7507 ("reflect" ,java-powermock-reflect)
7508 ("common" ,java-powermock-modules-junit4-common)
7509 ("cglib" ,java-cglib)))
7511 `(("easymock" ,java-easymock)
7512 ("hamcrest" ,java-hamcrest-core)
7513 ("objenesis" ,java-objenesis)
7515 ("junit" ,java-junit)))))
7517 (define-public java-powermock-api-easymock
7519 (inherit java-powermock-reflect)
7520 (name "java-powermock-api-easymock")
7521 (build-system ant-build-system)
7523 `(#:jar-name "java-powermock-api-easymock.jar"
7525 #:source-dir "powermock-api/powermock-api-easymock/src/main/java"
7526 #:tests? #f; no tests
7528 (modify-phases %standard-phases
7529 (add-before 'build 'fix-file
7531 ;; FIXME: This looks wrong, but it fixes a build error.
7532 (with-directory-excursion "powermock-api/powermock-api-easymock"
7533 (substitute* "src/main/java/org/powermock/api/easymock/PowerMock.java"
7534 (("classLoader instanceof MockClassLoader") "false")
7535 (("\\(\\(MockClassLoader\\) classLoader\\).*;") ";")))
7538 `(("core" ,java-powermock-core)
7539 ("easymock" ,java-easymock)
7540 ("reflect" ,java-powermock-reflect)
7541 ("support" ,java-powermock-api-support)
7542 ("cglib" ,java-cglib)))))
7544 (define-public java-jboss-jms-api-spec
7546 (name "java-jboss-jms-api-spec")
7550 (uri (string-append "https://github.com/jboss/jboss-jms-api_spec/"
7551 "archive/jboss-jms-api_" version
7552 "_spec-1.0.1.Final.tar.gz"))
7555 "07bqblw9kq2i8q92bz70fvavq5xjfkaixl8xa0m0cypjgy82rb7m"))))
7556 (build-system ant-build-system)
7558 `(#:jar-name "java-jboss-jms-api_spec.jar"
7561 #:tests? #f)); no tests
7562 (home-page "https://github.com/jboss/jboss-jms-api_spec")
7563 (synopsis "Java Message Service API specification")
7564 (description "Java Message Service (JMS) API is used to send messages
7565 messages between two or more clients. It is a messaging standard that allows
7566 application components to create, send, receive, and read messages.")
7567 ; either gpl2 only with GPL Classpath Exception, or cddl.
7568 (license (list license:gpl2 license:cddl1.0))))
7570 (define-public java-mail
7576 (uri (string-append "https://github.com/javaee/javamail/archive/"
7577 "JAVAMAIL-1_6_0.tar.gz"))
7580 "1b4rg7fpj50ld90a71iz2m4gm3f5cnw18p3q3rbrrryjip46kx92"))))
7581 (build-system ant-build-system)
7583 `(#:jar-name "java-mail.jar"
7585 #:source-dir "mail/src/main/java"
7586 #:test-dir "mail/src/test"
7588 (list "**/CollectorFormatterTest.java"
7589 "**/CompactFormatterTest.java"
7590 "**/DurationFilterTest.java"
7591 "**/MailHandlerTest.java"
7592 "**/GetLocalAddressTest.java"
7593 ;; FIXME: both end with:
7594 ;; java.lang.ClassNotFoundException:
7595 ;; javax.mail.internet.MimeMultipartParseTest
7596 "**/MimeMultipartParseTest.java"
7597 "**/SearchTermSerializationTest.java")
7599 (modify-phases %standard-phases
7600 (add-before 'configure 'move-version.java
7602 (copy-file "mail/src/main/resources/javax/mail/Version.java"
7603 "mail/src/main/java/javax/mail/Version.java")
7605 (add-before 'build 'copy-resources
7607 (copy-recursively "mail/src/main/resources/META-INF"
7608 "build/classes/META-INF")
7611 `(("junit" ,java-junit)
7612 ("hamcrest" ,java-hamcrest-core)))
7613 (home-page "https://javaee.github.io/javamail/")
7614 (synopsis "Mail-related functionnalities in Java")
7615 (description "The JavaMail API provides a platform-independent and
7616 protocol-independent framework to build mail and messaging applications.")
7617 ;; General Public License Version 2 only ("GPL") or the Common Development
7618 ;; and Distribution License("CDDL")
7619 (license (list license:cddl1.1
7620 license:gpl2)))); with classpath exception
7622 (define-public java-jeromq
7624 (name "java-jeromq")
7629 (url "https://github.com/zeromq/jeromq.git")
7630 (commit (string-append "v" version))))
7631 (file-name (string-append name "-" version "-checkout"))
7634 "1gxkp7lv2ahymgrqdw94ncq54bmp4m4sw5m1x9gkp7l5bxn0xsyj"))))
7635 (build-system ant-build-system)
7637 `(#:jar-name "java-jeromq.jar"
7638 #:source-dir "src/main/java"
7644 "**/ZBeaconTest.java"
7646 "**/DealerSpecTest.java"
7647 "**/CustomDecoderTest.java"
7648 "**/CustomEncoderTest.java")))
7650 `(("java-jnacl" ,java-jnacl)))
7652 `(("java-hamcrest-core" ,java-hamcrest-core)
7653 ("junit" ,java-junit)))
7654 (home-page "http://zeromq.org/bindings:java")
7655 (synopsis "Java binding for 0MQ")
7656 (description "Jeromq provides the java bindings for 0MQ.")
7657 (license license:mpl2.0)))
7659 (define-public java-kafka-clients
7661 (name "java-kafka-clients")
7665 (uri (string-append "mirror://apache/kafka/" version "/kafka-"
7666 version "-src.tgz"))
7669 "1yxmnsmliwm7671q5yy9bl4jdqyyn00n26cggz9brwczx80w1vfq"))))
7670 (build-system ant-build-system)
7672 `(#:jar-name "java-kafka-clients.jar"
7674 #:source-dir "clients/src/main/java"
7675 #:test-dir "clients/src/test"
7678 ;; This file does not contain a class
7679 "**/IntegrationTest.java"
7681 "**/ClientUtilsTest.java"
7682 ;; End with errors that seem related to our powermock
7683 "**/KafkaProducerTest.java"
7684 "**/BufferPoolTest.java")))
7686 `(("java-slf4j-api" ,java-slf4j-api)
7687 ("java-lz4" ,java-lz4)))
7689 `(("junit" ,java-junit)
7690 ("hamcrest" ,java-hamcrest-all)
7691 ("objenesis" ,java-objenesis)
7693 ("cglib" ,java-cglib)
7694 ("javassist" ,java-jboss-javassist)
7695 ("snappy" ,java-snappy)
7696 ("easymock" ,java-easymock)
7697 ("powermock" ,java-powermock-core)
7698 ("powermock-easymock" ,java-powermock-api-easymock)
7699 ("powermock-junit4-common" ,java-powermock-modules-junit4-common)
7700 ("powermock-junit4" ,java-powermock-modules-junit4)
7701 ("powermock-support" ,java-powermock-api-support)
7702 ("bouncycastle" ,java-bouncycastle-bcprov)
7703 ("bouncycastle-bcpkix" ,java-bouncycastle-bcpkix)))
7704 (home-page "https://kafka.apache.org")
7705 (synopsis "Distributed streaming platform")
7706 (description "Kafka is a distributed streaming platform, which means:
7708 @item it can publish and subscribe to streams of records;
7709 @item it can store streams of records in a fault-tolerant way;
7710 @item it can process streams of records as they occur.
7712 ;; Either cddl or gpl2 only.
7713 (license (list license:cddl1.1; actually cddl1.1
7714 license:gpl2)))); with classpath exception
7716 (define-public java-jdom
7722 (uri (string-append "http://jdom.org/dist/binary/archive/jdom-"
7726 "07wdpm3jwwc9q38kmdw40fvbmv6jzjrkrf8m0zqs58f79a672wfl"))))
7727 (build-system ant-build-system)
7729 `(#:build-target "package"
7730 #:tests? #f; tests are run as part of the build process
7732 (modify-phases %standard-phases
7734 (install-jars "build")))))
7735 (home-page "http://jdom.org/")
7736 (synopsis "Access, manipulate, and output XML data")
7737 (description "Java-based solution for accessing, manipulating, and
7738 outputting XML data from Java code.")
7739 (license license:bsd-4)))
7741 (define-public java-geronimo-xbean-reflect
7743 (name "java-geronimo-xbean-reflect")
7748 (url "https://svn.apache.org/repos/asf/geronimo/xbean/tags/xbean-4.5/")
7749 (revision 1807396)))
7750 (file-name (string-append name "-" version))
7753 "18q3i6jgm6rkw8aysfgihgywrdc5nvijrwnslmi3ww497jvri6ja"))))
7754 (build-system ant-build-system)
7756 `(#:jar-name "geronimo-xbean-reflect.jar"
7757 #:source-dir "xbean-reflect/src/main/java"
7758 #:test-dir "xbean-reflect/src/test"
7761 (list "**/Abstract*.java" "**/AsmParameterNameLoaderTest.java"
7762 "**/ObjectRecipeTest.java" "**/ParameterNameLoaderTest.java"
7763 "**/RecipeHelperTest.java" "**/XbeanAsmParameterNameLoaderTest.java")
7765 (modify-phases %standard-phases
7766 (add-before 'build 'fix-source
7768 (let ((dir "xbean-reflect/src/main/java/org/apache/xbean/recipe/"))
7769 ;; org.apache.xbean.asm6 is actually repackaged java-asm
7770 (substitute* (string-append dir "XbeanAsmParameterNameLoader.java")
7771 (("org.apache.xbean.asm5") "org.objectweb.asm"))
7775 ("log4j" ,java-log4j-api)
7776 ("log4j-1.2" ,java-log4j-1.2-api)
7777 ("log4j-core" ,java-log4j-core)
7778 ("logging" ,java-commons-logging-minimal)))
7780 `(("junit" ,java-junit)))
7781 (home-page "https://geronimo.apache.org/maven/xbean/3.6/xbean-reflect/")
7782 (synopsis "Dependency injection helper")
7783 (description "Xbean-reflect provides very flexible ways to create objects
7784 and graphs of objects for dependency injection frameworks")
7785 (license license:asl2.0)))
7787 (define-public java-geronimo-xbean-bundleutils
7789 (inherit java-geronimo-xbean-reflect)
7790 (name "java-geronimo-xbean-bundleutils")
7792 `(#:jar-name "geronimo-xbean-bundleutils.jar"
7793 #:source-dir "xbean-bundleutils/src/main/java"
7794 #:test-dir "xbean-bundleutils/src/test"
7796 (modify-phases %standard-phases
7797 (add-before 'build 'fix-java
7799 ;; We use a more recent version of osgi, so this file requires
7800 ;; more interface method implementations.
7801 (substitute* "xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/DelegatingBundleContext.java"
7802 (("import org.osgi.framework.ServiceRegistration;")
7803 "import org.osgi.framework.ServiceRegistration;
7804 import org.osgi.framework.ServiceFactory;
7805 import java.util.Collection;
7806 import org.osgi.framework.ServiceObjects;")
7807 (("public Bundle getBundle\\(\\)")
7809 public <S> ServiceObjects<S> getServiceObjects(ServiceReference<S> reference) {
7810 throw new UnsupportedOperationException();
7813 public <S> ServiceRegistration<S> registerService(Class<S> clazz,
7814 ServiceFactory<S> factory, Dictionary<String, ?> properties) {
7815 throw new UnsupportedOperationException();
7817 public Bundle getBundle()"))
7820 `(("java-slf4j" ,java-slf4j-api)
7821 ("java-asm" ,java-asm)
7822 ("java-osgi-framework" ,java-osgi-framework)
7823 ("java-eclipse-osgi" ,java-eclipse-osgi)
7824 ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin)))))
7826 (define-public java-geronimo-xbean-asm-util
7828 (inherit java-geronimo-xbean-reflect)
7829 (name "java-geronimo-xbean-asm-util")
7831 `(#:jar-name "geronimo-xbean-asm-util.jar"
7832 #:source-dir "xbean-asm-util/src/main/java"
7833 #:tests? #f)); no tests
7835 `(("java-asm" ,java-asm)))
7836 (native-inputs '())))
7838 (define-public java-geronimo-xbean-finder
7840 (inherit java-geronimo-xbean-reflect)
7841 (name "java-geronimo-xbean-finder")
7843 `(#:jar-name "geronimo-xbean-finder.jar"
7844 #:source-dir "xbean-finder/src/main/java"
7845 #:test-dir "xbean-finder/src/test"))
7847 `(("java-slf4j-api" ,java-slf4j-api)
7848 ("java-asm" ,java-asm)
7849 ("java-geronimo-xbean-bundleutils" ,java-geronimo-xbean-bundleutils)
7850 ("java-geronimo-xbean-asm-util" ,java-geronimo-xbean-asm-util)
7851 ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin)
7852 ("java-osgi-framework" ,java-osgi-framework)))
7854 `(("java-junit" ,java-junit)
7855 ("java-hamcrest-core" ,java-hamcrest-core)))))
7857 (define-public java-gson
7863 (uri (string-append "https://github.com/google/gson/archive/"
7864 "gson-parent-" version ".tar.gz"))
7867 "1j4qnp7v046q0k48c4kyf69sxaasx2h949d3cqwsm3kzxms3x0f9"))))
7868 (build-system ant-build-system)
7870 `(#:jar-name "gson.jar"
7871 #:source-dir "gson/src/main/java"
7872 #:test-dir "gson/src/test"))
7874 `(("java-junit" ,java-junit)
7875 ("java-hamcrest-core" ,java-hamcrest-core)))
7876 (home-page "https://github.com/google/gson")
7877 (synopsis "Java serialization/deserialization library from/to JSON")
7878 (description "Gson is a Java library that can be used to convert Java
7879 Objects into their JSON representation. It can also be used to convert a JSON
7880 string to an equivalent Java object. Gson can work with arbitrary Java objects
7881 including pre-existing objects that you do not have source-code of.")
7882 (license license:asl2.0)))
7884 (define-public java-hawtjni
7886 (name "java-hawtjni")
7890 (uri (string-append "https://github.com/fusesource/hawtjni/archive/"
7891 "hawtjni-project-" version ".tar.gz"))
7894 "1bqfd732rmh6svyx17fpw9175gc9gzkcbyps2yyrf50c3zzjas6g"))))
7895 (build-system ant-build-system)
7897 `(#:jar-name "hawtjni.jar"
7898 #:source-dir "hawtjni-generator/src/main/java:hawtjni-runtime/src/main/java"
7899 #:tests? #f; no tests
7901 (modify-phases %standard-phases
7902 (add-before 'build 'build-native
7903 (lambda* (#:key inputs #:allow-other-keys)
7904 (with-directory-excursion "hawtjni-generator/src/main/resources/"
7906 (system* "gcc" "-c" "hawtjni.c" "-o" "hawtjni.o"
7908 (string-append "-I" (assoc-ref inputs "jdk") "/include/linux"))
7909 (system* "gcc" "-c" "hawtjni-callback.c" "-o" "hawtjni-callback.o"
7911 (string-append "-I" (assoc-ref inputs "jdk") "/include/linux"))
7912 (system* "gcc" "-o" "libhawtjni.so" "-shared"
7913 "hawtjni.o" "hawtjni-callback.o")))))
7914 (add-after 'install 'install-native
7915 (lambda* (#:key outputs #:allow-other-keys)
7916 (let* ((out (assoc-ref outputs "out"))
7917 (lib (string-append out "/lib"))
7918 (inc (string-append out "/include")))
7921 (with-directory-excursion "hawtjni-generator/src/main/resources/"
7922 (copy-file "libhawtjni.so" (string-append lib "/libhawtjni.so"))
7923 (copy-file "hawtjni.h" (string-append inc "/hawtjni.h"))))
7926 `(("java-commons-cli" ,java-commons-cli)
7927 ("java-asm" ,java-asm)
7928 ("java-geronimo-xbean-finder" ,java-geronimo-xbean-finder)))
7929 (home-page "https://fusesource.github.io/hawtjni/")
7930 (synopsis "JNI code generator")
7931 (description "HawtJNI is a code generator that produces the JNI code needed
7932 to implement Java native methods. It is based on the jnigen code generator
7933 that is part of the SWT Tools project.")
7934 (license license:asl2.0)))
7936 (define-public java-jansi-native
7938 (name "java-jansi-native")
7942 (uri (string-append "https://github.com/fusesource/jansi-native/"
7943 "archive/jansi-native-" version ".tar.gz"))
7946 "0j2ydlgxbzbgshqkwghbxxxnbnx1mmjgd6k5fw6xfvxw1z956yqf"))))
7947 (build-system ant-build-system)
7949 `(#:jar-name "jansi-native.jar"
7950 #:source-dir "src/main/java"
7951 #:tests? #f; no tests
7953 (modify-phases %standard-phases
7954 (add-before 'build 'build-native
7955 (lambda* (#:key inputs #:allow-other-keys)
7956 ;; there are more required files for windows in windows/
7957 (with-directory-excursion "src/main/native-package/src"
7958 (substitute* "jansi_ttyname.c"
7959 (("#include \"jansi_.*") ""))
7961 (system* "gcc" "-c" "jansi_ttyname.c" "-o" "jansi_ttyname.o"
7962 (string-append "-I" (assoc-ref inputs "java-hawtjni")
7964 (string-append "-I" (assoc-ref inputs "jdk")
7967 (system* "gcc" "-o" "libjansi.so" "-shared" "jansi_ttyname.o")))))
7968 (add-before 'build 'install-native
7970 (let ((dir (string-append "build/classes/META-INF/native/"
7971 ,(match (%current-system)
7972 ((or "i686-linux" "armhf-linux")
7974 ((or "x86_64-linux" "aarch64-linux")
7976 (install-file "src/main/native-package/src/libjansi.so" dir))
7978 (add-after 'install 'install-native
7979 (lambda* (#:key outputs #:allow-other-keys)
7980 (mkdir-p (string-append (assoc-ref outputs "out") "/include"))
7981 (install-file "src/main/native-package/src/jansi.h"
7982 (string-append (assoc-ref outputs "out") "/include"))
7985 `(("java-hawtjni" ,java-hawtjni)))
7986 (home-page "https://fusesource.github.io/jansi/")
7987 (synopsis "Native library for jansi")
7988 (description "Java-jansi-native contains the native library for the jansi
7989 frobnication library/framework.")
7990 (license license:asl2.0)))
7992 (define-public java-jansi
7998 (uri (string-append "https://github.com/fusesource/jansi/archive/"
7999 "jansi-project-" version ".tar.gz"))
8002 "11kh3144i3fzp21dpy8zg52mjmsr214k7km9p8ly0rqk2px0qq2z"))))
8003 (build-system ant-build-system)
8005 `(#:jar-name "jansi.jar"
8006 #:source-dir "jansi/src/main/java"
8007 #:test-dir "jansi/src/test"
8009 (modify-phases %standard-phases
8010 (add-after 'check 'clear-term
8012 (zero? (system* "echo" "-e" "\\e[0m")))))))
8014 `(("java-jansi-native" ,java-jansi-native)))
8016 `(("java-junit" ,java-junit)
8017 ("java-hamcrest-core" ,java-hamcrest-core)))
8018 (home-page "https://fusesource.github.io/jansi/")
8019 (synopsis "Portable ANSI escape sequences")
8020 (description "Jansi is a Java library that allows you to use ANSI escape
8021 sequences to format your console output which works on every platform.")
8022 (license license:asl2.0)))
8024 (define-public java-jboss-el-api-spec
8026 (name "java-jboss-el-api-spec")
8030 (uri (string-append "https://github.com/jboss/jboss-el-api_spec/"
8031 "archive/jboss-el-api_" version
8032 "_spec-1.0.7.Final.tar.gz"))
8035 "1j45ljxalwlibxl7g7iv952sjxkw275m8vyxxij8l6wdd5pf0pdh"))))
8036 (build-system ant-build-system)
8038 `(#:jar-name "java-jboss-el-api_spec.jar"
8041 `(("java-junit" ,java-junit)))
8042 (home-page "https://github.com/jboss/jboss-el-api_spec")
8043 (synopsis "JSR-341 expression language 3.0 API")
8044 (description "This package contains an implementation of the JSR-341
8045 specification for the expression language 3.0. It implements an expression
8046 language inspired by ECMAScript and XPath. This language is used with
8047 JavaServer Pages (JSP).")
8048 ;; Either GPL2 only or CDDL.
8049 (license (list license:gpl2 license:cddl1.1))))
8051 (define-public java-jboss-interceptors-api-spec
8053 (name "java-jboss-interceptors-api-spec")
8057 (uri (string-append "https://github.com/jboss/jboss-interceptors-api_spec/"
8058 "archive/jboss-interceptors-api_" version
8059 "_spec-1.0.0.Final.tar.gz"))
8062 "0wv8x0jp9a5qxlrgkhb5jdk2gr6vi87b4j4kjb8ryxiy9gn8g51z"))))
8063 (build-system ant-build-system)
8065 `(#:jar-name "java-jboss-interceptors-api_spec.jar"
8068 #:tests? #f)); no tests
8069 (home-page "https://github.com/jboss/jboss-interceptors-api_spec")
8070 (synopsis "Interceptors 1.2 API classes from JSR 318")
8071 (description "Java-jboss-interceptors-api-spec implements the Interceptors
8072 API. Interceptors are used to interpose on business method invocations and
8074 ;; Either GPL2 only or CDDL.
8075 (license (list license:gpl2 license:cddl1.1))))
8077 (define-public java-cdi-api
8079 (name "java-cdi-api")
8083 (uri (string-append "https://github.com/cdi-spec/cdi/archive/"
8085 (file-name (string-append name "-" version ".tar.gz"))
8088 "1iv8b8bp07c5kmqic14jsr868vycjv4qv02lf3pkgp9z21mnfg5y"))))
8089 (build-system ant-build-system)
8091 `(#:source-dir "api/src/main/java"
8092 #:jar-name "java-cdi-api.jar"
8093 #:test-dir "api/src/test"
8095 #:tests? #f)); Tests fail because we don't have a CDI provider yet
8097 `(("java-javax-inject" ,java-javax-inject)
8098 ("java-jboss-el-api-spec" ,java-jboss-el-api-spec)
8099 ("java-jboss-interceptors-api-spec" ,java-jboss-interceptors-api-spec)))
8101 `(("java-testng" ,java-testng)
8102 ("java-hamcrest-core" ,java-hamcrest-core)))
8103 (home-page "http://cdi-spec.org/")
8104 (synopsis "Contexts and Dependency Injection APIs")
8105 (description "Java-cdi-api contains the required APIs for Contexts and
8106 Dependency Injection (CDI).")
8107 (license license:asl2.0)))
8109 (define-public java-joda-convert
8111 (name "java-joda-convert")
8115 (uri (string-append "https://github.com/JodaOrg/joda-convert/archive/v"
8117 (file-name (string-append name "-" version ".tar.gz"))
8120 "0vp346xz7dh9br4q7xazhc7hvzf76a6hf95fki9bg67q5jr0kjh7"))))
8121 (build-system ant-build-system)
8123 `(#:jar-name (string-append ,name "-" ,version ".jar")
8124 #:source-dir "src/main/java"
8125 #:test-include (list "**/Test*.java")
8126 ;; Contains only interfaces and base classes (no test)
8127 #:test-exclude (list "**/test*/**.java")))
8129 `(("java-guava" ,java-guava)))
8131 `(("java-junit" ,java-junit)
8132 ("java-hamcrest-core" ,java-hamcrest-core)))
8133 (home-page "http://www.joda.org/joda-convert/")
8134 (synopsis "Conversion between Objects and Strings")
8135 (description "Joda-Convert provides a small set of classes to aid
8136 conversion between Objects and Strings. It is not intended to tackle the
8137 wider problem of Object to Object transformation.")
8138 (license license:asl2.0)))
8140 (define-public java-joda-time
8142 (name "java-joda-time")
8146 (uri (string-append "https://github.com/JodaOrg/joda-time/archive/v"
8148 (file-name (string-append name "-" version ".tar.gz"))
8151 "1i9x91mi7yg2pasl0k3912f1pg46n37sps6rdb0v1gs8hj9ppwc1"))))
8152 (build-system ant-build-system)
8154 `(#:jar-name "java-joda-time.jar"
8155 #:source-dir "src/main/java"
8156 #:test-include (list "**/Test*.java")
8157 ;; There is no runnable test in these files
8158 #:test-exclude (list "**/Test*Chronology.java" "**/Test*Field.java")
8160 (modify-phases %standard-phases
8161 (add-after 'build 'build-resources
8163 (mkdir-p "build/classes/org/joda/time/tz/data")
8164 (mkdir-p "build/classes/org/joda/time/format")
8165 ;; This will produce the following exception:
8166 ;; java.io.IOException: Resource not found: "org/joda/time/tz/data/ZoneInfoMap"
8167 ;; which is normal, because it doesn't exist yet. It still generates
8168 ;; the same file as in the binary one can find on maven.
8169 (invoke "java" "-cp"
8170 (string-append "build/classes:" (getenv "CLASSPATH"))
8171 "org.joda.time.tz.ZoneInfoCompiler"
8172 "-src" "src/main/java/org/joda/time/tz/src"
8173 "-dst" "build/classes/org/joda/time/tz/data"
8174 "africa" "antarctica" "asia" "australasia"
8175 "europe" "northamerica" "southamerica"
8176 "pacificnew" "etcetera" "backward" "systemv")
8177 (for-each (lambda (f)
8178 (copy-file f (string-append
8179 "build/classes/org/joda/time/format/"
8181 (find-files "src/main/java/org/joda/time/format" ".*.properties"))
8183 (add-before 'install 'regenerate-jar
8185 ;; We need to regenerate the jar file to add generated data.
8186 (delete-file "build/jar/java-joda-time.jar")
8187 (invoke "ant" "jar")))
8188 (add-before 'check 'copy-test-resources
8190 (mkdir-p "build/test-classes/org/joda/time/tz/data")
8191 (copy-file "src/test/resources/tzdata/ZoneInfoMap"
8192 "build/test-classes/org/joda/time/tz/data/ZoneInfoMap")
8193 (copy-recursively "src/test/resources" "build/test-classes")
8196 `(("java-joda-convert" ,java-joda-convert)))
8198 `(("java-junit" ,java-junit)
8199 ("java-hamcrest-core" ,java-hamcrest-core)
8200 ("tzdata" ,tzdata)))
8201 (home-page "http://www.joda.org/joda-time/")
8202 (synopsis "Replacement for the Java date and time classes")
8203 (description "Joda-Time is a replacement for the Java date and time
8204 classes prior to Java SE 8.")
8205 (license license:asl2.0)))
8207 (define-public java-xerces
8209 (name "java-xerces")
8214 (uri (string-append "mirror://apache/xerces/j/source/"
8215 "Xerces-J-src." version ".tar.gz"))
8217 (base32 "1006igwy2lqrmjvdk64v8dg6qbk9c29pm8xxx7r87n0vnpvmx6pm"))
8218 (patches (search-patches
8219 "java-xerces-xjavac_taskdef.patch"
8220 "java-xerces-build_dont_unzip.patch"
8221 "java-xerces-bootclasspath.patch"))))
8222 (build-system ant-build-system)
8224 `(#:tests? #f;; Test files are not present
8225 #:test-target "test"
8228 (modify-phases %standard-phases
8229 (add-after 'unpack 'create-build.properties
8230 (lambda* (#:key inputs #:allow-other-keys)
8231 (let ((jaxp (assoc-ref inputs "java-jaxp"))
8232 (resolver (assoc-ref inputs "java-apache-xml-commons-resolver")))
8233 (with-output-to-file "build.properties"
8236 "jar.jaxp = ~a/share/java/jaxp.jar~@
8237 jar.apis-ext = ~a/share/java/jaxp.jar~@
8238 jar.resolver = ~a/share/java/xml-resolver.jar~%"
8239 jaxp jaxp resolver)))
8240 ;; Make xerces use our version of jaxp in tests
8241 (substitute* "build.xml"
8243 (string-append jaxp "/share/java/jaxp.jar"))
8244 (("\\$\\{tools.dir\\}/\\$\\{jar.apis\\}")
8247 (replace 'install (install-jars "build")))))
8249 `(("java-apache-xml-commons-resolver" ,java-apache-xml-commons-resolver)
8250 ("java-jaxp" ,java-jaxp)))
8251 (home-page "https://xerces.apache.org/xerces2-j/")
8252 (synopsis "Validating XML parser for Java with DOM level 3 support")
8253 (description "The Xerces2 Java parser is the reference implementation of
8254 XNI, the Xerces Native Interface, and also a fully conforming XML Schema
8257 Xerces2-J supports the following standards and APIs:
8260 @item eXtensible Markup Language (XML) 1.0 Second Edition Recommendation
8261 @item Namespaces in XML Recommendation
8262 @item Document Object Model (DOM) Level 2 Core, Events, and Traversal and
8263 Range Recommendations
8264 @item Simple API for XML (SAX) 2.0.1 Core and Extension
8265 @item Java APIs for XML Processing (JAXP) 1.2.01
8266 @item XML Schema 1.0 Structures and Datatypes Recommendations
8267 @item Experimental implementation of the Document Object Model (DOM) Level 3
8268 Core and Load/Save Working Drafts
8269 @item Provides a partial implementation of the XML Inclusions (XInclude) W3C
8270 Candidate Recommendation
8273 Xerces is now able to parse documents written according to the XML 1.1
8274 Candidate Recommendation, except that it does not yet provide an option to
8275 enable normalization checking as described in section 2.13 of this
8276 specification. It also handles namespaces according to the XML Namespaces 1.1
8277 Candidate Recommendation, and will correctly serialize XML 1.1 documents if
8278 the DOM level 3 load/save API's are in use.")
8279 (license license:asl2.0)))
8281 (define-public java-jline
8287 (uri (string-append "https://github.com/jline/jline1/archive/jline-"
8291 "0bi3p6vrh7a6v0fbpb6rx9plpmx5zk3lr352xzdbz2jcxg499wir"))))
8292 (build-system ant-build-system)
8294 `(#:jar-name "jline.jar"
8295 #:source-dir "src/main/java"
8296 #:test-dir "src/test"
8298 (modify-phases %standard-phases
8299 (add-before 'build 'copy-resources
8301 (copy-recursively "src/main/resources" "build/classes")
8304 `(("java-junit" ,java-junit)))
8305 (home-page "https://jline.github.io")
8306 (synopsis "Console input handling library")
8307 (description "JLine is a Java library for handling console input. It is
8308 similar in functionality to BSD editline and GNU readline but with additional
8309 features that bring it on par with the Z shell line editor.")
8310 (license license:bsd-3)))
8312 (define-public java-xmlunit
8314 (name "java-xmlunit")
8318 (uri (string-append "https://github.com/xmlunit/xmlunit/archive/v"
8320 (file-name (string-append name "-" version ".tar.gz"))
8323 "035rivlnmwhfqj0fzviciv0bkh1h95ps1iwnh2kjcvdbk5nccm4z"))))
8324 (build-system ant-build-system)
8326 `(#:jar-name "java-xmlunit.jar"
8327 #:source-dir "xmlunit-core/src/main/java"
8328 #:test-dir "xmlunit-core/src/test"
8330 (modify-phases %standard-phases
8331 (add-before 'check 'copy-test-resources
8332 (lambda* (#:key inputs #:allow-other-keys)
8333 (copy-recursively (assoc-ref inputs "resources") "../test-resources")
8336 `(("java-junit" ,java-junit)
8337 ("java-mockito-1" ,java-mockito-1)
8338 ("java-hamcrest-all" ,java-hamcrest-all)
8339 ("java-objenesis" ,java-objenesis)
8340 ("java-asm" ,java-asm)
8341 ("java-cglib" ,java-cglib)
8346 (url "https://github.com/xmlunit/test-resources.git")
8347 (commit "a590d2ae865c3e0455691d76ba8eefccc2215aec")))
8348 (file-name "java-xmlunit-test-resources")
8351 "0r0glj37pg5l868yjz78gckr91cs8fysxxbp9p328dssssi91agr"))))))
8352 (home-page "http://www.xmlunit.org/")
8353 (synopsis "XML output testing")
8354 (description "XMLUnit provides you with the tools to verify the XML you
8355 emit is the one you want to create. It provides helpers to validate against
8356 an XML Schema, assert the values of XPath queries or compare XML documents
8357 against expected outcomes.")
8358 (license license:asl2.0)))
8360 (define-public java-xmlunit-legacy
8362 (inherit java-xmlunit)
8363 (name "java-xmlunit-legacy")
8365 `(#:jar-name "java-xmlunit-legacy.jar"
8366 #:source-dir "xmlunit-legacy/src/main/java"
8367 #:test-dir "xmlunit-legacy/src/test"))
8369 `(("java-xmlunit" ,java-xmlunit)
8370 ("java-junit" ,java-junit)))
8372 `(("java-mockito-1" ,java-mockito-1)))))