1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2015, 2016, 2017 Ricardo Wurmus <rekado@elephly.net>
3 ;;; Copyright © 2016 Leo Famulari <leo@famulari.name>
4 ;;; Copyright © 2016, 2017 Roel Janssen <roel@gnu.org>
5 ;;; Copyright © 2017 Carlo Zancanaro <carlo@zancanaro.id.au>
6 ;;; Copyright © 2017 Julien Lepiller <julien@lepiller.eu>
7 ;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be>
8 ;;; Copyright © 2016, 2017, 2018 Alex Vong <alexvong1995@gmail.com>
9 ;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr>
11 ;;; This file is part of GNU Guix.
13 ;;; GNU Guix is free software; you can redistribute it and/or modify it
14 ;;; under the terms of the GNU General Public License as published by
15 ;;; the Free Software Foundation; either version 3 of the License, or (at
16 ;;; your option) any later version.
18 ;;; GNU Guix is distributed in the hope that it will be useful, but
19 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
20 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 ;;; GNU General Public License for more details.
23 ;;; You should have received a copy of the GNU General Public License
24 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
26 (define-module (gnu packages java)
27 #:use-module ((guix licenses) #:prefix license:)
28 #:use-module (guix packages)
29 #:use-module (guix download)
30 #:use-module (guix hg-download)
31 #:use-module (guix git-download)
32 #:use-module (guix svn-download)
33 #:use-module (guix utils)
34 #:use-module (guix build-system ant)
35 #:use-module (guix build-system gnu)
36 #:use-module (guix build-system trivial)
37 #:use-module (gnu packages)
38 #:use-module (gnu packages attr)
39 #:use-module (gnu packages autotools)
40 #:use-module (gnu packages base)
41 #:use-module (gnu packages bash)
42 #:use-module (gnu packages certs)
43 #:use-module (gnu packages cpio)
44 #:use-module (gnu packages cups)
45 #:use-module (gnu packages compression)
46 #:use-module (gnu packages fontutils)
47 #:use-module (gnu packages gawk)
48 #:use-module (gnu packages gettext)
49 #:use-module (gnu packages gcc)
50 #:use-module (gnu packages gl)
51 #:use-module (gnu packages gnuzilla) ;nss
52 #:use-module (gnu packages ghostscript) ;lcms
53 #:use-module (gnu packages gnome)
54 #:use-module (gnu packages gtk)
55 #:use-module (gnu packages guile)
56 #:use-module (gnu packages icu4c)
57 #:use-module (gnu packages image)
58 #:use-module (gnu packages libffi)
59 #:use-module (gnu packages linux) ;alsa
60 #:use-module (gnu packages web)
61 #:use-module (gnu packages wget)
62 #:use-module (gnu packages pkg-config)
63 #:use-module (gnu packages perl)
64 #:use-module (gnu packages popt)
65 #:use-module (gnu packages kerberos)
66 #:use-module (gnu packages xml)
67 #:use-module (gnu packages xorg)
68 #:use-module (gnu packages texinfo)
69 #:use-module ((srfi srfi-1) #:select (fold alist-delete))
70 #:use-module (srfi srfi-11)
71 #:use-module (ice-9 match))
75 ;;; Java bootstrap toolchain.
78 ;; The Java bootstrap begins with Jikes, a Java compiler written in C++. We
79 ;; use it to build the SableVM standard library and virtual machine, which are
80 ;; written in a simpler dialect of Java and C, respectively. This is
81 ;; sufficient to build an older version of Ant, which is needed to build an
82 ;; older version of ECJ, an incremental Java compiler, both of which are
85 ;; ECJ is needed to build the latest release of GNU Classpath (0.99).
86 ;; Classpath (> 0.98) is a requirement for JamVM, a more modern implementation
87 ;; of the Java virtual machine.
89 ;; With JamVM we can build the latest development version of GNU Classpath,
90 ;; which has much more support for Java 1.6 than the latest release. Since
91 ;; the previous build of JamVM is limited by the use of GNU Classpath 0.99 we
92 ;; rebuild it with the latest development version of GNU Classpath.
94 ;; Finally, we use the bootstrap toolchain to build the OpenJDK with the
95 ;; Icedtea 1.x build framework. We then build the more recent JDKs Icedtea
96 ;; 2.x and Icedtea 3.x.
104 (uri (string-append "mirror://sourceforge/jikes/Jikes/"
105 version "/jikes-" version ".tar.bz2"))
108 "1qqldrp74pzpy5ly421srqn30qppmm9cvjiqdngk8hf47dv2rc0c"))))
109 (build-system gnu-build-system)
110 (home-page "http://jikes.sourceforge.net/")
111 (synopsis "Compiler for the Java language")
112 (description "Jikes is a compiler that translates Java source files as
113 defined in The Java Language Specification into the bytecoded instruction set
114 and binary format defined in The Java Virtual Machine Specification.")
115 (license license:ibmpl1.0)))
117 (define sablevm-classpath
119 (name "sablevm-classpath")
123 (uri (string-append "mirror://sourceforge/sablevm/sablevm/"
124 version "/sablevm-classpath-" version ".tar.gz"))
127 "1qyhyfz8idghxdam16hdgpa24r2x4xbg9z8c8asa3chnd79h3zw2"))))
128 (build-system gnu-build-system)
145 ("pkg-config" ,pkg-config)))
146 (home-page "http://sablevm.org/")
147 (synopsis "Java Virtual Machine")
148 (description "SableVM is a clean-room, highly portable and efficient Java
149 virtual machine. Its goals are to be reasonably small, fast, and compliant
150 with the various specifications (JVM specification, JNI, invocation interface,
151 etc.). SableVM is no longer maintained.
153 This package provides the classpath library.")
154 (license license:lgpl2.1+)))
162 (uri (string-append "mirror://sourceforge/sablevm/sablevm/"
163 version "/sablevm-" version ".tar.gz"))
166 "1jyg4bsym6igz94wps5443c7wiwlzinqzkchcw972nz4kf1cql6g"))))
167 (build-system gnu-build-system)
170 (list "--with-internal-libffi=no"
171 "--with-internal-libpopt=no")
173 (modify-phases %standard-phases
174 (add-after 'unpack 'remove-timestamp-for-reproducibility
176 (substitute* "src/sablevm/Makefile.in"
177 (("\\$\\(SVMCOMPILETIME\\)") "(unknown)"))
179 (add-after 'unpack 'link-with-popt
181 (substitute* "src/sablevm/Makefile.in"
182 (("\\$\\(SVMADD\\)" match)
183 (string-append match " -lpopt")))
185 (add-after 'unpack 'patch-path-to-classpath
186 (lambda* (#:key inputs #:allow-other-keys)
187 (substitute* "Makefile.in"
188 (("@datadir@/sablevm-classpath")
189 (string-append (assoc-ref inputs "classpath")
190 "/share/sablevm-classpath")))
191 (substitute* "src/libsablevm/Makefile.in"
192 (("\\$\\(libdir\\)/sablevm-classpath")
193 (string-append (assoc-ref inputs "classpath")
194 "/lib/sablevm-classpath"))
195 (("\\$\\(datadir\\)/sablevm-classpath")
196 (string-append (assoc-ref inputs "classpath")
197 "/share/sablevm-classpath")))
200 `(("classpath" ,sablevm-classpath)
206 `(("libltdl" ,libltdl)))
207 (home-page "http://sablevm.org/")
208 (synopsis "Java Virtual Machine")
209 (description "SableVM is a clean-room, highly portable and efficient Java
210 virtual machine. Its goals are to be reasonably small, fast, and compliant
211 with the various specifications (JVM specification, JNI, invocation interface,
212 etc.). SableVM is no longer maintained.
214 This package provides the virtual machine.")
215 (license license:lgpl2.1+)))
217 (define ant-bootstrap
219 (name "ant-bootstrap")
220 ;; The 1.10.x series requires Java 8. 1.9.0 and later use generics, which
221 ;; are not supported. The 1.8.x series is the last to use only features
222 ;; supported by Jikes, but it cannot seem to be built with sablevm.
226 (uri (string-append "http://archive.apache.org/dist/"
227 "ant/source/apache-ant-"
228 version "-src.tar.bz2"))
231 "19pvqvgkxgpgsqm4lvbki5sm0z84kxmykdqicvfad47gc1r9mi2d"))))
232 (build-system gnu-build-system)
234 `(#:tests? #f ; no "check" target
236 (modify-phases %standard-phases
239 (lambda* (#:key inputs #:allow-other-keys)
241 (string-append (assoc-ref inputs "sablevm")
244 (string-append (assoc-ref inputs "sablevm")
245 "/bin/java-sablevm"))
247 (string-append (assoc-ref inputs "sablevm")
248 "/bin/javac-sablevm"))
250 ;; Use jikes instead of javac for <javac ...> tags in build.xml
251 (setenv "ANT_OPTS" "-Dbuild.compiler=jikes")
253 ;; jikes produces lots of warnings, but they are not very
254 ;; interesting, so we silence them.
255 (setenv "$BOOTJAVAC_OPTS" "-nowarn")
257 ;; Disable tests because we are bootstrapping and thus don't have
258 ;; any of the dependencies required to build and run the tests.
259 (substitute* "build.xml"
260 (("depends=\"jars,test-jar\"") "depends=\"jars\""))
261 (zero? (system* "bash" "bootstrap.sh"
262 (string-append "-Ddist.dir="
263 (assoc-ref %outputs "out"))))))
267 ("sablevm" ,sablevm)))
268 (home-page "http://ant.apache.org")
269 (synopsis "Build tool for Java")
271 "Ant is a platform-independent build tool for Java. It is similar to
272 make but is implemented using the Java language, requires the Java platform,
273 and is best suited to building Java projects. Ant uses XML to describe the
274 build process and its dependencies, whereas Make uses Makefile format.")
275 (license license:asl2.0)))
277 ;; Version 3.2.2 is the last version without a dependency on a full-fledged
278 ;; compiler for Java 1.5.
279 (define ecj-bootstrap
281 (name "ecj-bootstrap")
285 (uri (string-append "http://archive.eclipse.org/eclipse/"
286 "downloads/drops/R-" version
287 "-200702121330/ecjsrc.zip"))
290 "05hj82kxd23qaglsjkaqcj944riisjha7acf7h3ljhrjyljx8307"))))
291 ;; It would be so much easier if we could use the ant-build-system, but we
292 ;; cannot as we don't have ant at this point. We use ecj for
293 ;; bootstrapping the JDK.
294 (build-system gnu-build-system)
296 `(#:modules ((guix build gnu-build-system)
299 #:tests? #f ; there are no tests
301 (modify-phases %standard-phases
303 (lambda* (#:key inputs #:allow-other-keys)
306 (find-files (string-append (assoc-ref inputs "ant-bootstrap")
312 (lambda* (#:key inputs #:allow-other-keys)
313 ;; The unpack phase enters the "org" directory by mistake.
316 ;; Create a simple manifest to make ecj executable.
317 (with-output-to-file "manifest"
319 (display "Manifest-Version: 1.0
320 Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n")))
323 (and (zero? (apply system* "javac-sablevm"
324 (find-files "." "\\.java$")))
325 (zero? (system* "fastjar" "cvfm"
326 "ecj-bootstrap.jar" "manifest" ".")))))
328 (lambda* (#:key outputs #:allow-other-keys)
329 (let ((share (string-append (assoc-ref outputs "out")
332 (install-file "ecj-bootstrap.jar" share)
335 `(("ant-bootstrap" ,ant-bootstrap)
338 ("fastjar" ,fastjar)))
339 (home-page "https://eclipse.org")
340 (synopsis "Eclipse Java development tools core batch compiler")
341 (description "This package provides the Eclipse Java core batch compiler
342 for bootstrapping purposes. The @dfn{Eclipse compiler for Java} (ecj) is a
343 requirement for all GNU Classpath releases after version 0.93.")
344 (license license:epl1.0)))
346 (define ecj-javac-wrapper
347 (package (inherit ecj-bootstrap)
348 (name "ecj-javac-wrapper")
350 (build-system trivial-build-system)
352 `(#:modules ((guix build utils))
354 (let ((backend 'sablevm))
355 (use-modules (guix build utils))
356 (let* ((bin (string-append (assoc-ref %outputs "out") "/bin"))
357 (target (string-append bin "/javac"))
358 (guile (string-append (assoc-ref %build-inputs "guile")
360 (ecj (string-append (assoc-ref %build-inputs "ecj-bootstrap")
361 "/share/java/ecj-bootstrap.jar"))
364 (string-append (assoc-ref %build-inputs "sablevm")
365 "/lib/sablevm/bin/java"))
367 (string-append (assoc-ref %build-inputs "jamvm")
369 (bootcp (case backend
371 (let ((jvmlib (string-append
372 (assoc-ref %build-inputs "sablevm-classpath")
374 (string-append jvmlib "/jre/lib/rt.jar")))
376 (let ((jvmlib (string-append (assoc-ref %build-inputs "classpath")
377 "/share/classpath")))
378 (string-append jvmlib "/lib/glibj.zip:"
379 jvmlib "/lib/tools.zip"))))))
381 (with-output-to-file target
383 (format #t "#!~a --no-auto-compile\n!#\n" guile)
385 `(begin (use-modules (ice-9 match)
391 '(("-bootclasspath" ,bootcp)
396 (let ((classpath (getenv "CLASSPATH")))
400 (string-append ":" classpath)
402 (receive (vm-args other-args)
403 ;; Separate VM arguments from arguments to ECJ.
404 (partition (cut string-prefix? "-J" <>)
405 (fold (lambda (default acc)
406 (if (member (first default) acc)
407 acc (append default acc)))
411 ;; Remove "-J" prefix
412 (map (cut string-drop <> 2) vm-args)
413 '("org.eclipse.jdt.internal.compiler.batch.Main")
414 (cons "-nowarn" other-args)))))
416 (let ((args (cdr (command-line))))
418 (format (current-error-port) "javac: no arguments given!\n")
423 `(("guile" ,guile-2.2)
424 ("ecj-bootstrap" ,ecj-bootstrap)
426 ("sablevm-classpath" ,sablevm-classpath)))
427 (description "This package provides a wrapper around the @dfn{Eclipse
428 compiler for Java} (ecj) with a command line interface that is compatible with
429 the standard javac executable.")))
431 ;; Note: All the tool wrappers (e.g. for javah, javac, etc) fail with
432 ;; java.lang.UnsupportedClassVersionError. They simply won't run on the old
433 ;; sablevm. We use Classpath 0.99 to build JamVM, on which the Classpath
434 ;; tools do run. Using these Classpath tools on JamVM we can then build the
435 ;; development version of GNU Classpath.
436 (define classpath-on-sablevm
442 (uri (string-append "mirror://gnu/classpath/classpath-"
446 "1j7cby4k66f1nvckm48xcmh352b1d1b33qk7l6hi7dp9i9zjjagr"))))
447 (build-system gnu-build-system)
450 (list (string-append "--with-ecj-jar="
451 (assoc-ref %build-inputs "ecj-bootstrap")
452 "/share/java/ecj-bootstrap.jar")
453 (string-append "JAVAC="
454 (assoc-ref %build-inputs "ecj-javac-wrapper")
456 (string-append "JAVA="
457 (assoc-ref %build-inputs "sablevm")
460 "ac_cv_prog_java_works=yes" ; trust me
464 "--disable-gconf-peer"
470 (modify-phases %standard-phases
471 (add-after 'install 'install-data
472 (lambda _ (zero? (system* "make" "install-data")))))))
474 `(("ecj-bootstrap" ,ecj-bootstrap)
475 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
478 ("sablevm-classpath" ,sablevm-classpath)
480 ("pkg-config" ,pkg-config)))
481 (home-page "https://www.gnu.org/software/classpath/")
482 (synopsis "Essential libraries for Java")
483 (description "GNU Classpath is a project to create core class libraries
484 for use with runtimes, compilers and tools for the Java programming
486 ;; GPLv2 or later, with special linking exception.
487 (license license:gpl2+)))
489 (define jamvm-bootstrap
495 (uri (string-append "mirror://sourceforge/jamvm/jamvm/"
496 "JamVM%20" version "/jamvm-"
500 "1nl0zxz8y5x8gwsrm7n32bry4dx8x70p8z3s9jbdvs8avyb8whkn"))))
501 (build-system gnu-build-system)
504 (list (string-append "--with-classpath-install-dir="
505 (assoc-ref %build-inputs "classpath")))))
507 `(("classpath" ,classpath-on-sablevm)
508 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
510 (home-page "http://jamvm.sourceforge.net/")
511 (synopsis "Small Java Virtual Machine")
512 (description "JamVM is a Java Virtual Machine conforming to the JVM
513 specification edition 2 (blue book). It is extremely small. However, unlike
514 other small VMs it supports the full spec, including object finalisation and
516 (license license:gpl2+)))
518 ;; We need this because the tools provided by the latest release of GNU
519 ;; Classpath don't actually work with sablevm.
520 (define classpath-jamvm-wrappers
521 (package (inherit classpath-on-sablevm)
522 (name "classpath-jamvm-wrappers")
524 (build-system trivial-build-system)
526 `(#:modules ((guix build utils))
529 (use-modules (guix build utils))
530 (let* ((bash (assoc-ref %build-inputs "bash"))
531 (jamvm (assoc-ref %build-inputs "jamvm"))
532 (classpath (assoc-ref %build-inputs "classpath"))
533 (bin (string-append (assoc-ref %outputs "out")
536 (for-each (lambda (tool)
537 (with-output-to-file (string-append bin tool)
539 (format #t "#!~a/bin/sh
540 ~a/bin/jamvm -classpath ~a/share/classpath/tools.zip \
541 gnu.classpath.tools.~a.~a $@"
542 bash jamvm classpath tool
543 (if (string=? "native2ascii" tool)
544 "Native2ASCII" "Main"))))
545 (chmod (string-append bin tool) #o755))
555 ("jamvm" ,jamvm-bootstrap)
556 ("classpath" ,classpath-on-sablevm)))
558 (synopsis "Executables from GNU Classpath")
559 (description "This package provides wrappers around the tools provided by
560 the GNU Classpath library. They are executed by the JamVM virtual
563 (define ecj-javac-on-jamvm-wrapper
564 (package (inherit ecj-javac-wrapper)
565 (name "ecj-javac-on-jamvm-wrapper")
567 `(#:modules ((guix build utils))
569 ;; TODO: This builder is exactly the same as in ecj-javac-wrapper,
570 ;; except that the backend is 'jamvm here. Can we reuse the same
572 (let ((backend 'jamvm))
573 (use-modules (guix build utils))
574 (let* ((bin (string-append (assoc-ref %outputs "out") "/bin"))
575 (target (string-append bin "/javac"))
576 (guile (string-append (assoc-ref %build-inputs "guile")
578 (ecj (string-append (assoc-ref %build-inputs "ecj-bootstrap")
579 "/share/java/ecj-bootstrap.jar"))
582 (string-append (assoc-ref %build-inputs "sablevm")
583 "/lib/sablevm/bin/java"))
585 (string-append (assoc-ref %build-inputs "jamvm")
587 (bootcp (case backend
589 (let ((jvmlib (string-append
590 (assoc-ref %build-inputs "sablevm-classpath")
592 (string-append jvmlib "/jre/lib/rt.jar")))
594 (let ((jvmlib (string-append (assoc-ref %build-inputs "classpath")
595 "/share/classpath")))
596 (string-append jvmlib "/lib/glibj.zip:"
597 jvmlib "/lib/tools.zip"))))))
599 (with-output-to-file target
601 (format #t "#!~a --no-auto-compile\n!#\n" guile)
603 `(begin (use-modules (ice-9 match)
609 '(("-bootclasspath" ,bootcp)
614 (let ((classpath (getenv "CLASSPATH")))
618 (string-append ":" classpath)
620 (receive (vm-args other-args)
621 ;; Separate VM arguments from arguments to ECJ.
622 (partition (cut string-prefix? "-J" <>)
623 (fold (lambda (default acc)
624 (if (member (first default) acc)
625 acc (append default acc)))
629 ;; Remove "-J" prefix
630 (map (cut string-drop <> 2) vm-args)
631 '("org.eclipse.jdt.internal.compiler.batch.Main")
632 (cons "-nowarn" other-args)))))
634 (let ((args (cdr (command-line))))
636 (format (current-error-port) "javac: no arguments given!\n")
641 `(("guile" ,guile-2.2)
642 ("ecj-bootstrap" ,ecj-bootstrap)
643 ("jamvm" ,jamvm-bootstrap)
644 ("classpath" ,classpath-on-sablevm)))
645 (description "This package provides a wrapper around the @dfn{Eclipse
646 compiler for Java} (ecj) with a command line interface that is compatible with
647 the standard javac executable. The tool runs on JamVM instead of SableVM.")))
649 ;; The last release of GNU Classpath is 0.99 and it happened in 2012. Since
650 ;; then Classpath has gained much more support for Java 1.6.
651 (define-public classpath-devel
652 (let ((commit "e7c13ee0cf2005206fbec0eca677f8cf66d5a103")
654 (package (inherit classpath-on-sablevm)
655 (version (string-append "0.99-" revision "." (string-take commit 9)))
659 (url "https://git.savannah.gnu.org/git/classpath.git")
661 (file-name (string-append "classpath-" version "-checkout"))
664 "1v2rww76ww322mpg3s12a1kkc6gkp31bm9gcxs532h0wq285fiw4"))))
667 ;; Ensure that the initial heap size is smaller than the maximum
668 ;; size. By default only Xmx is set, which can lead to invalid
669 ;; memory settings on some machines with a lot of memory.
670 '("JAVAC_MEM_OPT=-J-Xms512M -J-Xmx768M")
672 (list (string-append "--with-ecj-jar="
673 (assoc-ref %build-inputs "ecj-bootstrap")
674 "/share/java/ecj-bootstrap.jar")
675 (string-append "--with-javac="
676 (assoc-ref %build-inputs "ecj-javac-wrapper")
678 (string-append "JAVA="
679 (assoc-ref %build-inputs "jamvm")
682 "ac_cv_prog_java_works=yes" ; trust me
686 "--disable-gconf-peer"
692 (modify-phases %standard-phases
693 (add-after 'unpack 'bootstrap
695 (zero? (system* "autoreconf" "-vif"))))
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 "0y9489pk4as9q6x300sk3ycc0psqfxcd4b0xvbmf3rhgli8q1kx3"))))
2029 (build-system ant-build-system)
2031 `(#:tests? #f ; there is no test target
2032 #:build-target "compile"
2033 ;; NOTE: This package does not build with Java 8 because of a type
2035 ;; "source/javax/servlet/jsp/el/ImplicitObjectELResolver.java". It
2036 ;; defines the return value of ScopeMap's "remove" method to be of type
2037 ;; "Object", whereas Map's "remove" method returns boolean.
2039 (list "-Dbuild.compiler=javac1.7"
2040 (string-append "-Ddist=" (assoc-ref %outputs "out")))
2042 (modify-phases %standard-phases
2044 (lambda* (#:key make-flags #:allow-other-keys)
2045 (zero? (apply system* `("ant" "dist" ,@make-flags))))))))
2046 (home-page "https://www.gnu.org/software/classpathx/")
2047 (synopsis "Java servlet API implementation")
2048 (description "This is the GNU servlet API distribution, part of the
2049 ClasspathX project. It provides implementations of version 3.0 of the servlet
2050 API and version 2.1 of the Java ServerPages API.")
2051 (license license:gpl3+)))
2053 (define-public java-swt
2058 ;; The types of many variables and procedures differ in the sources
2059 ;; dependent on whether the target architecture is a 32-bit system or a
2060 ;; 64-bit system. Instead of patching the sources on demand in a build
2061 ;; phase we download either the 32-bit archive (which mostly uses "int"
2062 ;; types) or the 64-bit archive (which mostly uses "long" types).
2063 (let ((hash32 "09q0cbh90d90q3a7dx9430kc4m6bijrkr4lajrmzzvi0jjdpq4v9")
2064 (hash64 "17k5hs75a87ssmc5xhwdfdm2gn4zba0r837l2455za01krnkaa2q")
2067 (let-values (((hash file)
2068 (match (or (%current-target-system) (%current-system))
2069 ("x86_64-linux" (values hash64 file64))
2070 (_ (values hash32 file32)))))
2074 "http://download.eclipse.org/eclipse/downloads/drops4/"
2075 "R-" version "-201710090410/swt-" version
2076 "-gtk-linux-" file ".zip"))
2077 (sha256 (base32 hash))))))
2078 (build-system ant-build-system)
2080 `(#:jar-name "swt.jar"
2082 #:tests? #f ; no "check" target
2084 (modify-phases %standard-phases
2086 (lambda* (#:key source #:allow-other-keys)
2088 (zero? (system* "unzip" source "-d" "swt"))
2091 (zero? (system* "unzip" "src.zip" "-d" "src")))))
2092 ;; The classpath contains invalid icecat jars. Since we don't need
2093 ;; anything other than the JDK on the classpath, we can simply unset
2095 (add-after 'configure 'unset-classpath
2096 (lambda _ (unsetenv "CLASSPATH") #t))
2097 (add-before 'build 'build-native
2098 (lambda* (#:key inputs outputs #:allow-other-keys)
2099 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
2100 ;; Build shared libraries. Users of SWT have to set the system
2101 ;; property swt.library.path to the "lib" directory of this
2104 (setenv "OUTPUT_DIR" lib)
2105 (with-directory-excursion "src"
2106 (zero? (system* "bash" "build.sh"))))))
2107 (add-after 'install 'install-native
2108 (lambda* (#:key outputs #:allow-other-keys)
2109 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
2110 (for-each (lambda (file)
2111 (install-file file lib))
2112 (find-files "." "\\.so$"))
2116 ("libxtst" ,libxtst)
2121 `(("pkg-config" ,pkg-config)
2123 (home-page "https://www.eclipse.org/swt/")
2124 (synopsis "Widget toolkit for Java")
2126 "SWT is a widget toolkit for Java designed to provide efficient, portable
2127 access to the user-interface facilities of the operating systems on which it
2129 ;; SWT code is licensed under EPL1.0
2130 ;; Gnome and Gtk+ bindings contain code licensed under LGPLv2.1
2131 ;; Cairo bindings contain code under MPL1.1
2132 ;; XULRunner 1.9 bindings contain code under MPL2.0
2137 license:lgpl2.1+))))
2139 (define-public java-xz
2145 (uri (string-append "http://tukaani.org/xz/xz-java-" version ".zip"))
2148 "1z3p1ri1gvl07inxn0agx44ck8n7wrzfmvkz8nbq3njn8r9wba8x"))))
2149 (build-system ant-build-system)
2151 `(#:tests? #f ; There are no tests to run.
2152 #:jar-name ,(string-append "xz-" version ".jar")
2154 (modify-phases %standard-phases
2155 ;; The unpack phase enters the "maven" directory by accident.
2156 (add-after 'unpack 'chdir
2157 (lambda _ (chdir "..") #t)))))
2159 `(("unzip" ,unzip)))
2160 (home-page "https://tukaani.org/xz/java.html")
2161 (synopsis "Implementation of XZ data compression in pure Java")
2162 (description "This library aims to be a complete implementation of XZ data
2163 compression in pure Java. Single-threaded streamed compression and
2164 decompression and random access decompression have been fully implemented.")
2165 (license license:public-domain)))
2167 ;; java-hamcrest-core uses qdox version 1.12. We package this version instead
2168 ;; of the latest release.
2169 (define-public java-qdox-1.12
2175 (uri (string-append "http://central.maven.org/maven2/"
2176 "com/thoughtworks/qdox/qdox/" version
2177 "/qdox-" version "-sources.jar"))
2180 "0hlfbqq2avf5s26wxkksqmkdyk6zp9ggqn37c468m96mjv0n9xfl"))))
2181 (build-system ant-build-system)
2183 `(;; Tests require junit
2185 #:jar-name "qdox.jar"
2187 (modify-phases %standard-phases
2189 (lambda* (#:key source #:allow-other-keys)
2191 (with-directory-excursion "src"
2192 (zero? (system* "jar" "-xf" source)))))
2193 ;; At this point we don't have junit, so we must remove the API
2195 (add-after 'unpack 'delete-tests
2197 (delete-file-recursively "src/com/thoughtworks/qdox/junit")
2199 (home-page "http://qdox.codehaus.org/")
2200 (synopsis "Parse definitions from Java source files")
2202 "QDox is a high speed, small footprint parser for extracting
2203 class/interface/method definitions from source files complete with JavaDoc
2204 @code{@@tags}. It is designed to be used by active code generators or
2205 documentation tools.")
2206 (license license:asl2.0)))
2208 (define-public java-jarjar
2210 (name "java-jarjar")
2215 "https://storage.googleapis.com/google-code-archive-downloads/v2/"
2216 "code.google.com/jarjar/jarjar-src-" version ".zip"))
2219 "1v8irhni9cndcw1l1wxqgry013s2kpj0qqn57lj2ji28xjq8ndjl"))))
2220 (build-system ant-build-system)
2222 `(;; Tests require junit, which ultimately depends on this package.
2224 #:build-target "jar"
2226 (modify-phases %standard-phases
2228 (lambda* (#:key outputs #:allow-other-keys)
2229 (let ((target (string-append (assoc-ref outputs "out")
2231 (install-file (string-append "dist/jarjar-" ,version ".jar")
2235 `(("unzip" ,unzip)))
2236 (home-page "https://code.google.com/archive/p/jarjar/")
2237 (synopsis "Repackage Java libraries")
2239 "Jar Jar Links is a utility that makes it easy to repackage Java
2240 libraries and embed them into your own distribution. Jar Jar Links includes
2241 an Ant task that extends the built-in @code{jar} task.")
2242 (license license:asl2.0)))
2244 (define-public java-hamcrest-core
2246 (name "java-hamcrest-core")
2250 (uri (string-append "https://github.com/hamcrest/JavaHamcrest/"
2251 "archive/hamcrest-java-" version ".tar.gz"))
2254 "11g0s105fmwzijbv08lx8jlb521yravjmxnpgdx08fvg1kjivhva"))
2255 (modules '((guix build utils)))
2258 ;; Delete bundled thirds-party jar archives.
2259 (delete-file-recursively "lib")
2261 (build-system ant-build-system)
2263 `(#:tests? #f ; Tests require junit
2264 #:modules ((guix build ant-build-system)
2267 #:make-flags (list (string-append "-Dversion=" ,version))
2268 #:test-target "unit-test"
2269 #:build-target "core"
2271 (modify-phases %standard-phases
2272 ;; Disable unit tests, because they require junit, which requires
2273 ;; hamcrest-core. We also give a fixed value to the "Built-Date"
2274 ;; attribute from the manifest for reproducibility.
2275 (add-before 'configure 'patch-build.xml
2277 (substitute* "build.xml"
2278 (("unit-test, ") "")
2279 (("\\$\\{build.timestamp\\}") "guix"))
2281 ;; Java's "getMethods()" returns methods in an unpredictable order.
2282 ;; To make the output of the generated code deterministic we must
2283 ;; sort the array of methods.
2284 (add-after 'unpack 'make-method-order-deterministic
2286 (substitute* "hamcrest-generator/src/main/java/org/hamcrest/generator/ReflectiveFactoryReader.java"
2287 (("import java\\.util\\.Iterator;" line)
2288 (string-append line "\n"
2289 "import java.util.Arrays; import java.util.Comparator;"))
2290 (("allMethods = cls\\.getMethods\\(\\);" line)
2291 (string-append "_" line
2293 private Method[] getSortedMethods() {
2294 Arrays.sort(_allMethods, new Comparator<Method>() {
2296 public int compare(Method a, Method b) {
2297 return a.toString().compareTo(b.toString());
2303 private Method[] allMethods = getSortedMethods();")))))
2304 (add-before 'build 'do-not-use-bundled-qdox
2305 (lambda* (#:key inputs #:allow-other-keys)
2306 (substitute* "build.xml"
2307 (("lib/generator/qdox-1.12.jar")
2308 (string-append (assoc-ref inputs "java-qdox-1.12")
2309 "/share/java/qdox.jar")))
2311 ;; build.xml searches for .jar files in this directoy, which
2312 ;; we remove from the source archive.
2313 (add-before 'build 'create-dummy-directories
2315 (mkdir-p "lib/integration")
2318 (lambda* (#:key outputs #:allow-other-keys)
2319 (let* ((target (string-append (assoc-ref outputs "out")
2321 (version-suffix ,(string-append "-" version ".jar"))
2322 (install-without-version-suffix
2325 (string-append target
2326 (basename jar version-suffix)
2330 install-without-version-suffix
2333 (and (string-suffix? ".jar" name)
2334 (not (string-suffix? "-sources.jar" name)))))))
2337 `(("java-qdox-1.12" ,java-qdox-1.12)
2338 ("java-jarjar" ,java-jarjar)))
2339 (home-page "http://hamcrest.org/")
2340 (synopsis "Library of matchers for building test expressions")
2342 "This package provides a library of matcher objects (also known as
2343 constraints or predicates) allowing @code{match} rules to be defined
2344 declaratively, to be used in other frameworks. Typical scenarios include
2345 testing frameworks, mocking libraries and UI validation rules.")
2346 (license license:bsd-2)))
2348 (define-public java-junit
2354 (uri (string-append "https://github.com/junit-team/junit/"
2355 "archive/r" version ".tar.gz"))
2356 (file-name (string-append name "-" version ".tar.gz"))
2359 "090dn5v1vs0b3acyaqc0gjf6p8lmd2h24wfzsbq7sly6b214anws"))
2360 (modules '((guix build utils)))
2363 ;; Delete bundled jar archives.
2364 (delete-file-recursively "lib")
2366 (build-system ant-build-system)
2368 `(#:tests? #f ; no tests
2369 #:jar-name "junit.jar"))
2371 `(("java-hamcrest-core" ,java-hamcrest-core)))
2372 (home-page "http://junit.org/")
2373 (synopsis "Test framework for Java")
2375 "JUnit is a simple framework to write repeatable tests for Java projects.
2376 JUnit provides assertions for testing expected results, test fixtures for
2377 sharing common test data, and test runners for running tests.")
2378 (license license:epl1.0)))
2380 (define-public java-plexus-utils
2382 (name "java-plexus-utils")
2386 (uri (string-append "https://github.com/codehaus-plexus/"
2387 "plexus-utils/archive/plexus-utils-"
2391 "1mlwpc6fms24slygv5yvi6fi9hcha2fh0v73p5znpi78bg36i2js"))))
2392 (build-system ant-build-system)
2393 ;; FIXME: The default build.xml does not include a target to install
2396 `(#:jar-name "plexus-utils.jar"
2397 #:source-dir "src/main"
2399 (modify-phases %standard-phases
2400 (add-after 'unpack 'fix-reference-to-/bin-and-/usr
2402 (substitute* "src/main/java/org/codehaus/plexus/util/\
2403 cli/shell/BourneShell.java"
2404 (("/bin/sh") (which "sh"))
2405 (("/usr/") (getcwd)))
2407 (add-after 'unpack 'fix-or-disable-broken-tests
2409 (with-directory-excursion "src/test/java/org/codehaus/plexus/util"
2410 (substitute* '("cli/CommandlineTest.java"
2411 "cli/shell/BourneShellTest.java")
2412 (("/bin/sh") (which "sh"))
2413 (("/bin/echo") (which "echo")))
2415 ;; This test depends on MavenProjectStub, but we don't have
2416 ;; a package for Maven.
2417 (delete-file "introspection/ReflectionValueExtractorTest.java")
2419 ;; FIXME: The command line tests fail, maybe because they use
2421 (delete-file "cli/CommandlineTest.java"))
2424 `(("java-junit" ,java-junit)))
2425 (home-page "http://codehaus-plexus.github.io/plexus-utils/")
2426 (synopsis "Common utilities for the Plexus framework")
2427 (description "This package provides various Java utility classes for the
2428 Plexus framework to ease working with strings, files, command lines, XML and
2430 (license license:asl2.0)))
2432 (define-public java-plexus-interpolation
2434 (name "java-plexus-interpolation")
2438 (uri (string-append "https://github.com/codehaus-plexus/"
2439 "plexus-interpolation/archive/"
2440 "plexus-interpolation-" version ".tar.gz"))
2443 "03377yzlx5q440m6sxxgv6a5qb8fl30zzcgxgc0hxk5qgl2z1jjn"))))
2444 (build-system ant-build-system)
2446 `(#:jar-name "plexus-interpolation.jar"
2447 #:source-dir "src/main"))
2449 `(("java-junit" ,java-junit)
2450 ("java-hamcrest-core" ,java-hamcrest-core)))
2451 (home-page "http://codehaus-plexus.github.io/plexus-interpolation/")
2452 (synopsis "Java components for interpolating ${} strings and the like")
2453 (description "Plexus interpolator is a modular, flexible interpolation
2454 framework for the expression language style commonly seen in Maven, Plexus,
2455 and other related projects.
2457 It has its foundation in the @code{org.codehaus.plexus.utils.interpolation}
2458 package within @code{plexus-utils}, but has been separated in order to allow
2459 these two libraries to vary independently of one another.")
2460 (license license:asl2.0)))
2462 (define-public java-plexus-classworlds
2464 (name "java-plexus-classworlds")
2468 (uri (string-append "https://github.com/codehaus-plexus/"
2469 "plexus-classworlds/archive/plexus-classworlds-"
2473 "1qm4p0rl8d82lzhsiwnviw11jnq44s0gflg78zq152xyyr2xmh8g"))))
2474 (build-system ant-build-system)
2476 `(#:jar-name "plexus-classworlds.jar"
2477 #:source-dir "src/main"
2478 #:tests? #f));; FIXME: we need to generate some resources as in pom.xml
2480 `(("java-junit" ,java-junit)))
2481 (home-page "http://codehaus-plexus.github.io/plexus-classworlds/")
2482 (synopsis "Java class loader framework")
2483 (description "Plexus classworlds replaces the native @code{ClassLoader}
2484 mechanism of Java. It is especially useful for dynamic loading of application
2486 (license license:asl2.0)))
2488 (define-public java-plexus-container-default-bootstrap
2490 (name "java-plexus-container-default-bootstrap")
2494 (uri (string-append "https://github.com/codehaus-plexus/plexus-containers"
2495 "/archive/plexus-containers-" version ".tar.gz"))
2498 "0xw5g30qf4a83608rw9v2hv8pfsz7d69dkdhk6r0wia4q78hh1pc"))))
2499 (build-system ant-build-system)
2501 `(#:jar-name "container-default.jar"
2502 #:source-dir "plexus-container-default/src/main/java"
2503 #:test-dir "plexus-container-default/src/test"
2505 #:tests? #f; requires plexus-archiver, which depends on this package
2507 (modify-phases %standard-phases
2508 (add-before 'build 'copy-resources
2511 "plexus-container-default/src/main/resources/"
2515 `(("worldclass" ,java-plexus-classworlds)
2516 ("xbean" ,java-geronimo-xbean-reflect)
2517 ("utils" ,java-plexus-utils)
2518 ("junit" ,java-junit)
2519 ("guava" ,java-guava)))
2520 (home-page "https://github.com/codehaus-plexus/plexus-containers")
2521 (synopsis "Inversion-of-control container")
2522 (description "Plexus-default-container is Plexus' inversion-of-control
2523 (@dfn{IoC}) container. It is composed of its public API and its default
2525 (license license:asl2.0)))
2527 (define-public java-plexus-io
2529 (name "java-plexus-io")
2533 (uri (string-append "https://github.com/codehaus-plexus/plexus-io"
2534 "/archive/plexus-io-" version ".tar.gz"))
2537 "0f2j41kihaymxkpbm55smpxjja235vad8cgz94frfy3ppcp021dw"))))
2538 (build-system ant-build-system)
2540 `(#:jar-name "plexus-io.jar"
2541 #:source-dir "src/main/java"
2542 #:test-dir "src/test"
2545 (modify-phases %standard-phases
2546 (add-before 'build 'copy-resources
2548 (mkdir-p "build/classes/META-INF/plexus")
2549 (copy-file "src/main/resources/META-INF/plexus/components.xml"
2550 "build/classes/META-INF/plexus/components.xml")
2553 `(("utils" ,java-plexus-utils)
2554 ("commons-io" ,java-commons-io)
2555 ("java-jsr305" ,java-jsr305)))
2557 `(("junit" ,java-junit)
2558 ("hamcrest" ,java-hamcrest-core)
2559 ("guava" ,java-guava)
2560 ("classworlds" ,java-plexus-classworlds)
2561 ("xbean" ,java-geronimo-xbean-reflect)
2562 ("container-default" ,java-plexus-container-default-bootstrap)))
2563 (home-page "https://github.com/codehaus-plexus/plexus-io")
2564 (synopsis "I/O plexus components")
2565 (description "Plexus IO is a set of plexus components, which are designed
2566 for use in I/O operations. This implementation using plexus components allows
2567 reusing it in maven.")
2568 (license license:asl2.0)))
2570 (define-public java-plexus-archiver
2572 (name "java-plexus-archiver")
2576 (uri (string-append "https://github.com/codehaus-plexus/plexus-archiver"
2577 "/archive/plexus-archiver-" version ".tar.gz"))
2580 "0iv1j7khra6icqh3jndng3iipfmkc7l5jq2y802cm8r575v75pyv"))))
2581 (build-system ant-build-system)
2583 `(#:jar-name "plexus-archiver.jar"
2584 #:source-dir "src/main/java"
2586 #:test-dir "src/test"
2587 #:test-exclude (list "**/Abstract*.java" "**/Base*.java")
2589 (modify-phases %standard-phases
2590 (add-before 'check 'remove-failing
2592 ;; Requires an older version of plexus container
2594 "src/test/java/org/codehaus/plexus/archiver/DuplicateFilesTest.java")))
2595 (add-before 'build 'copy-resources
2597 (mkdir-p "build/classes/META-INF/plexus")
2598 (copy-file "src/main/resources/META-INF/plexus/components.xml"
2599 "build/classes/META-INF/plexus/components.xml")
2602 `(("utils" ,java-plexus-utils)
2603 ("commons-io" ,java-commons-io)
2604 ("snappy" ,java-iq80-snappy)
2605 ("io" ,java-plexus-io)
2606 ("compress" ,java-commons-compress)
2607 ("container-default" ,java-plexus-container-default-bootstrap)
2608 ("snappy" ,java-snappy)
2609 ("java-jsr305" ,java-jsr305)))
2611 `(("junit" ,java-junit)
2612 ("classworld" ,java-plexus-classworlds)
2613 ("xbean" ,java-geronimo-xbean-reflect)
2614 ("xz" ,java-tukaani-xz)
2615 ("guava" ,java-guava)))
2616 (home-page "https://github.com/codehaus-plexus/plexus-archiver")
2617 (synopsis "Archiver component of the Plexus project")
2618 (description "Plexus-archiver contains a component to deal with project
2620 (license license:asl2.0)))
2622 (define-public java-plexus-container-default
2624 (inherit java-plexus-container-default-bootstrap)
2625 (name "java-plexus-container-default")
2627 `(#:jar-name "container-default.jar"
2628 #:source-dir "plexus-container-default/src/main/java"
2629 #:test-dir "plexus-container-default/src/test"
2630 #:test-exclude (list ;"**/*Test.java"
2632 ;; Requires plexus-hierarchy
2633 "**/PlexusHierarchyTest.java"
2635 "**/ComponentRealmCompositionTest.java"
2636 "**/PlexusContainerTest.java")
2639 (modify-phases %standard-phases
2640 (add-before 'build 'copy-resources
2643 "plexus-container-default/src/main/resources/"
2646 (add-before 'check 'fix-paths
2648 (let ((dir "plexus-container-default/src/test/java/org/codehaus"))
2651 dir "/plexus/component/composition/"
2652 "ComponentRealmCompositionTest.java")
2653 (("src/test") "plexus-container-default/src/test"))
2656 `(("worldclass" ,java-plexus-classworlds)
2657 ("xbean" ,java-geronimo-xbean-reflect)
2658 ("utils" ,java-plexus-utils)
2659 ("junit" ,java-junit)
2660 ("guava" ,java-guava)))
2662 `(("archiver" ,java-plexus-archiver)
2663 ("hamcrest" ,java-hamcrest-core)))))
2665 (define-public java-asm
2671 (uri (string-append "http://download.forge.ow2.org/asm/"
2672 "asm-" version ".tar.gz"))
2675 "0kxvmv5275rnjl7jv0442k3wjnq03ngkb7sghs78avf45pzm4qgr"))))
2676 (build-system ant-build-system)
2678 `(#:build-target "compile"
2679 ;; The tests require an old version of Janino, which no longer compiles
2682 ;; We don't need these extra ant tasks, but the build system asks us to
2683 ;; provide a path anyway.
2684 #:make-flags (list (string-append "-Dobjectweb.ant.tasks.path=foo"))
2686 (modify-phases %standard-phases
2687 (add-before 'install 'build-jars
2688 (lambda* (#:key make-flags #:allow-other-keys)
2689 ;; We cannot use the "jar" target because it depends on a couple
2690 ;; of unpackaged, complicated tools.
2692 (zero? (system* "jar"
2693 "-cf" (string-append "dist/asm-" ,version ".jar")
2694 "-C" "output/build/tmp" "."))))
2696 (install-jars "dist")))))
2698 `(("java-junit" ,java-junit)))
2699 (home-page "http://asm.ow2.org/")
2700 (synopsis "Very small and fast Java bytecode manipulation framework")
2701 (description "ASM is an all purpose Java bytecode manipulation and
2702 analysis framework. It can be used to modify existing classes or dynamically
2703 generate classes, directly in binary form. The provided common
2704 transformations and analysis algorithms allow to easily assemble custom
2705 complex transformations and code analysis tools.")
2706 (license license:bsd-3)))
2708 (define-public java-cglib
2715 "https://github.com/cglib/cglib/archive/RELEASE_"
2716 (string-map (lambda (c) (if (char=? c #\.) #\_ c)) version)
2718 (file-name (string-append "cglib-" version ".tar.gz"))
2721 "162dvd4fln76ai8prfharf66pn6r56p3sxx683j5vdyccrd5hi1q"))))
2722 (build-system ant-build-system)
2724 `(;; FIXME: tests fail because junit runs
2725 ;; "net.sf.cglib.transform.AbstractTransformTest", which does not seem
2726 ;; to describe a test at all.
2728 #:jar-name "cglib.jar"
2730 (modify-phases %standard-phases
2731 (add-after 'unpack 'chdir
2732 (lambda _ (chdir "cglib") #t)))))
2734 `(("java-asm" ,java-asm)
2735 ("java-junit" ,java-junit)))
2736 (home-page "https://github.com/cglib/cglib/")
2737 (synopsis "Java byte code generation library")
2738 (description "The byte code generation library CGLIB is a high level API
2739 to generate and transform Java byte code.")
2740 (license license:asl2.0)))
2742 (define-public java-objenesis
2744 (name "java-objenesis")
2748 (uri (string-append "https://github.com/easymock/objenesis/"
2749 "archive/" version ".tar.gz"))
2750 (file-name (string-append "objenesis-" version ".tar.gz"))
2753 "1va5qz1i2wawwavhnxfzxnfgrcaflz9p1pg03irrjh4nd3rz8wh6"))))
2754 (build-system ant-build-system)
2756 `(#:jar-name "objenesis.jar"
2757 #:source-dir "main/src/"
2758 #:test-dir "main/src/test/"))
2760 `(("java-junit" ,java-junit)
2761 ("java-hamcrest-core" ,java-hamcrest-core)))
2762 (home-page "http://objenesis.org/")
2763 (synopsis "Bypass the constructor when creating an object")
2764 (description "Objenesis is a small Java library that serves one purpose:
2765 to instantiate a new object of a particular class. It is common to see
2766 restrictions in libraries stating that classes must require a default
2767 constructor. Objenesis aims to overcome these restrictions by bypassing the
2768 constructor on object instantiation.")
2769 (license license:asl2.0)))
2771 (define-public java-easymock
2773 (name "java-easymock")
2777 (uri (string-append "https://github.com/easymock/easymock/"
2778 "archive/easymock-" version ".tar.gz"))
2781 "1yzg0kv256ndr57gpav46cyv4a1ns5sj722l50zpxk3j6sk9hnmi"))))
2782 (build-system ant-build-system)
2784 `(#:jar-name "easymock.jar"
2785 #:source-dir "core/src/main"
2786 #:test-dir "core/src/test"
2788 (modify-phases %standard-phases
2789 ;; FIXME: Android support requires the following packages to be
2790 ;; available: com.google.dexmaker.stock.ProxyBuilder
2791 (add-after 'unpack 'delete-android-support
2793 (with-directory-excursion "core/src/main/java/org/easymock/internal"
2794 (substitute* "MocksControl.java"
2795 (("AndroidSupport.isAndroid\\(\\)") "false")
2796 (("return classProxyFactory = new AndroidClassProxyFactory\\(\\);") ""))
2797 (delete-file "AndroidClassProxyFactory.java"))
2799 (add-after 'unpack 'delete-broken-tests
2801 (with-directory-excursion "core/src/test/java/org/easymock"
2802 ;; This test depends on dexmaker.
2803 (delete-file "tests2/ClassExtensionHelperTest.java")
2805 ;; This is not a test.
2806 (delete-file "tests/BaseEasyMockRunnerTest.java")
2808 ;; This test should be executed with a different runner...
2809 (delete-file "tests2/EasyMockAnnotationsTest.java")
2810 ;; ...but deleting it means that we also have to delete these
2812 (delete-file "tests2/EasyMockRunnerTest.java")
2813 (delete-file "tests2/EasyMockRuleTest.java")
2815 ;; This test fails because the file "easymock.properties" does
2817 (delete-file "tests2/EasyMockPropertiesTest.java"))
2820 `(("java-asm" ,java-asm)
2821 ("java-cglib" ,java-cglib)
2822 ("java-objenesis" ,java-objenesis)))
2824 `(("java-junit" ,java-junit)
2825 ("java-hamcrest-core" ,java-hamcrest-core)))
2826 (home-page "http://easymock.org")
2827 (synopsis "Java library providing mock objects for unit tests")
2828 (description "EasyMock is a Java library that provides an easy way to use
2829 mock objects in unit testing.")
2830 (license license:asl2.0)))
2832 (define-public java-jmock-1
2838 (uri (string-append "https://github.com/jmock-developers/"
2839 "jmock-library/archive/" version ".tar.gz"))
2840 (file-name (string-append "jmock-" version ".tar.gz"))
2843 "0xmrlhq0fszldkbv281k9463mv496143vvmqwpxp62yzjvdkx9w0"))))
2844 (build-system ant-build-system)
2846 `(#:build-target "jars"
2847 #:test-target "run.tests"
2849 (modify-phases %standard-phases
2850 (replace 'install (install-jars "build")))))
2851 (home-page "http://www.jmock.org")
2852 (synopsis "Mock object library for test-driven development")
2853 (description "JMock is a library that supports test-driven development of
2854 Java code with mock objects. Mock objects help you design and test the
2855 interactions between the objects in your programs.
2860 @item makes it quick and easy to define mock objects
2861 @item lets you precisely specify the interactions between
2862 your objects, reducing the brittleness of your tests
2863 @item plugs into your favourite test framework
2864 @item is easy to extend.
2866 (license license:bsd-3)))
2868 (define-public java-jmock
2870 (inherit java-jmock-1)
2875 (uri (string-append "https://github.com/jmock-developers/"
2876 "jmock-library/archive/" version ".tar.gz"))
2877 (file-name (string-append name "-" version ".tar.gz"))
2880 "18650a9g8xffcsdb6w91pbswa7f40fp2sh6s3nclkclz5dbzq8f0"))))
2882 `(("java-hamcrest-all" ,java-hamcrest-all)
2883 ("java-asm" ,java-asm)
2884 ("java-bsh" ,java-bsh)
2885 ("java-junit" ,java-junit)))
2887 `(("cglib" ,java-cglib)))
2889 `(#:jar-name "java-jmock.jar"
2890 #:source-dir "jmock/src/main/java"
2891 #:test-dir "jmock/src/test"))))
2893 (define-public java-jmock-junit4
2895 (inherit java-jmock)
2896 (name "java-jmock-junit4")
2898 `(#:jar-name "java-jmock-junit4.jar"
2899 #:source-dir "jmock-junit4/src/main/java"
2900 #:test-dir "jmock-junit4/src/test"))
2902 `(("java-hamcrest-all" ,java-hamcrest-all)
2903 ("java-asm" ,java-asm)
2904 ("java-bsh" ,java-bsh)
2905 ("java-jmock" ,java-jmock)
2906 ("java-jumit" ,java-junit)))))
2908 (define-public java-jmock-legacy
2910 (inherit java-jmock)
2911 (name "java-jmock-legacy")
2913 `(#:jar-name "java-jmock-legacy.jar"
2914 #:source-dir "jmock-legacy/src/main/java"
2915 #:test-dir "jmock-legacy/src/test"
2917 (modify-phases %standard-phases
2918 (add-before 'check 'copy-tests
2920 ;; This file is a dependancy of some tests
2921 (let ((file "org/jmock/test/acceptance/PackageProtectedType.java"))
2922 (copy-file (string-append "jmock/src/test/java/" file)
2923 (string-append "jmock-legacy/src/test/java/" file))
2926 `(("java-hamcrest-all" ,java-hamcrest-all)
2927 ("java-objenesis" ,java-objenesis)
2928 ("java-cglib" ,java-cglib)
2929 ("java-jmock" ,java-jmock)
2930 ("java-asm" ,java-asm)
2931 ("java-bsh" ,java-bsh)
2932 ("java-junit" ,java-junit)))
2934 `(("java-jmock-junit4" ,java-jmock-junit4)))))
2936 (define-public java-hamcrest-all
2937 (package (inherit java-hamcrest-core)
2938 (name "java-hamcrest-all")
2940 (substitute-keyword-arguments (package-arguments java-hamcrest-core)
2941 ;; FIXME: a unit test fails because org.hamcrest.SelfDescribing is not
2942 ;; found, although it is part of the hamcrest-core library that has
2945 ;; Fixing this one test is insufficient, though, and upstream confirmed
2946 ;; that the latest hamcrest release fails its unit tests when built
2947 ;; with Java 7. See https://github.com/hamcrest/JavaHamcrest/issues/30
2949 ((#:build-target _) "bigjar")
2951 `(modify-phases ,phases
2952 ;; Some build targets override the classpath, so we need to patch
2953 ;; the build.xml to ensure that required dependencies are on the
2955 (add-after 'unpack 'patch-classpath-for-integration
2956 (lambda* (#:key inputs #:allow-other-keys)
2957 (substitute* "build.xml"
2958 ((" build/hamcrest-library-\\$\\{version\\}.jar" line)
2962 (find-files (assoc-ref inputs "java-hamcrest-core") "\\.jar$")
2963 (find-files (assoc-ref inputs "java-junit") "\\.jar$")
2964 (find-files (assoc-ref inputs "java-jmock") "\\.jar$")
2965 (find-files (assoc-ref inputs "java-easymock") "\\.jar$")))
2969 `(("java-junit" ,java-junit)
2970 ("java-jmock" ,java-jmock-1)
2971 ("java-easymock" ,java-easymock)
2972 ("java-hamcrest-core" ,java-hamcrest-core)
2973 ,@(package-inputs java-hamcrest-core)))))
2975 (define-public java-jopt-simple
2977 (name "java-jopt-simple")
2981 (uri (string-append "http://repo1.maven.org/maven2/"
2982 "net/sf/jopt-simple/jopt-simple/"
2983 version "/jopt-simple-"
2984 version "-sources.jar"))
2987 "1v8bzmwmw6qq20gm42xyay6vrd567dra4vqwhgjnqqjz1gs9f8qa"))))
2988 (build-system ant-build-system)
2990 `(#:tests? #f ; there are no tests
2991 #:jar-name "jopt-simple.jar"))
2992 (home-page "https://pholser.github.io/jopt-simple/")
2993 (synopsis "Java library for parsing command line options")
2994 (description "JOpt Simple is a Java library for parsing command line
2995 options, such as those you might pass to an invocation of @code{javac}. In
2996 the interest of striving for simplicity, as closely as possible JOpt Simple
2997 attempts to honor the command line option syntaxes of POSIX @code{getopt} and
2998 GNU @code{getopt_long}. It also aims to make option parser configuration and
2999 retrieval of options and their arguments simple and expressive, without being
3001 (license license:expat)))
3003 (define-public java-commons-math3
3005 (name "java-commons-math3")
3009 (uri (string-append "mirror://apache/commons/math/source/"
3010 "commons-math3-" version "-src.tar.gz"))
3013 "19l6yp44qc5g7wg816nbn5z3zq3xxzwimvbm4a8pczgvpi4i85s6"))))
3014 (build-system ant-build-system)
3016 `(#:build-target "jar"
3017 #:test-target "test"
3019 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
3020 (junit (assoc-ref %build-inputs "java-junit")))
3021 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
3022 (string-append "-Dhamcrest.jar=" hamcrest
3023 "/share/java/hamcrest-core.jar")))
3025 (modify-phases %standard-phases
3026 ;; We want to build the jar in the build phase and run the tests
3027 ;; later in a separate phase.
3028 (add-after 'unpack 'untangle-targets
3030 (substitute* "build.xml"
3031 (("name=\"jar\" depends=\"test\"")
3032 "name=\"jar\" depends=\"compile\""))
3034 ;; There is no install target.
3036 (install-jars "target")))))
3038 `(("java-junit" ,java-junit)
3039 ("java-hamcrest-core" ,java-hamcrest-core)))
3040 (home-page "http://commons.apache.org/math/")
3041 (synopsis "Apache Commons mathematics library")
3042 (description "Commons Math is a library of lightweight, self-contained
3043 mathematics and statistics components addressing the most common problems not
3044 available in the Java programming language or Commons Lang.")
3045 (license license:asl2.0)))
3047 (define-public java-jmh
3054 (url "http://hg.openjdk.java.net/code-tools/jmh/")
3055 (changeset version)))
3056 (file-name (string-append name "-" version "-checkout"))
3059 "1fxyxhg9famwcg1prc4cgwb5wzyxqavn3cjm5vz8605xz7x5k084"))))
3060 (build-system ant-build-system)
3062 `(#:jar-name "jmh-core.jar"
3063 #:source-dir "jmh-core/src/main"
3064 #:test-dir "jmh-core/src/test"
3066 (modify-phases %standard-phases
3067 ;; This seems to be a bug in the JDK. It may not be necessary in
3068 ;; future versions of the JDK.
3069 (add-after 'unpack 'fix-bug
3071 (with-directory-excursion
3072 "jmh-core/src/main/java/org/openjdk/jmh/runner/options"
3073 (substitute* '("IntegerValueConverter.java"
3074 "ThreadsValueConverter.java")
3075 (("public Class<Integer> valueType")
3076 "public Class<? extends Integer> valueType")))
3079 `(("java-jopt-simple" ,java-jopt-simple)
3080 ("java-commons-math3" ,java-commons-math3)))
3082 `(("java-junit" ,java-junit)
3083 ("java-hamcrest-core" ,java-hamcrest-core)))
3084 (home-page "http://openjdk.java.net/projects/code-tools/jmh/")
3085 (synopsis "Benchmark harness for the JVM")
3086 (description "JMH is a Java harness for building, running, and analysing
3087 nano/micro/milli/macro benchmarks written in Java and other languages
3088 targeting the JVM.")
3090 (license license:gpl2)))
3092 (define-public java-commons-collections4
3094 (name "java-commons-collections4")
3098 (uri (string-append "mirror://apache/commons/collections/source/"
3099 "commons-collections4-" version "-src.tar.gz"))
3102 "1krfhvggympq4avk7gh6qafzf6b9ip6r1m4lmacikyx04039m0wl"))))
3103 (build-system ant-build-system)
3105 `(#:test-target "test"
3107 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
3108 (junit (assoc-ref %build-inputs "java-junit"))
3109 (easymock (assoc-ref %build-inputs "java-easymock")))
3110 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
3111 (string-append "-Dhamcrest.jar=" hamcrest
3112 "/share/java/hamcrest-core.jar")
3113 (string-append "-Deasymock.jar=" easymock
3114 "/share/java/easymock.jar")))
3116 (modify-phases %standard-phases
3118 (install-jars "target")))))
3120 `(("java-junit" ,java-junit)
3121 ("java-hamcrest-core" ,java-hamcrest-core)
3122 ("java-easymock" ,java-easymock)))
3123 (home-page "http://commons.apache.org/collections/")
3124 (synopsis "Collections framework")
3125 (description "The Java Collections Framework is the recognised standard
3126 for collection handling in Java. Commons-Collections seek to build upon the
3127 JDK classes by providing new interfaces, implementations and utilities. There
3128 are many features, including:
3131 @item @code{Bag} interface for collections that have a number of copies of
3133 @item @code{BidiMap} interface for maps that can be looked up from value to
3134 key as well and key to value
3135 @item @code{MapIterator} interface to provide simple and quick iteration over
3137 @item Transforming decorators that alter each object as it is added to the
3139 @item Composite collections that make multiple collections look like one
3140 @item Ordered maps and sets that retain the order elements are added in,
3141 including an LRU based map
3142 @item Reference map that allows keys and/or values to be garbage collected
3144 @item Many comparator implementations
3145 @item Many iterator implementations
3146 @item Adapter classes from array and enumerations to collections
3147 @item Utilities to test or create typical set-theory properties of collections
3148 such as union, intersection, and closure.
3150 (license license:asl2.0)))
3152 (define-public java-commons-collections
3154 (inherit java-commons-collections4)
3155 (name "java-commons-collections")
3159 (uri (string-append "mirror://apache/commons/collections/source/"
3160 "commons-collections-" version "-src.tar.gz"))
3163 "055r51a5lfc3z7rkxnxmnn1npvkvda7636hjpm4qk7cnfzz98387"))))
3165 (substitute-keyword-arguments (package-arguments java-commons-collections4)
3167 `(modify-phases ,phases
3168 ;; The manifest is required by the build procedure
3169 (add-before 'build 'add-manifest
3171 (mkdir-p "build/conf")
3172 (call-with-output-file "build/conf/MANIFEST.MF"
3174 (format file "Manifest-Version: 1.0\n")))))
3176 (install-jars "build"))))))))
3178 (define java-commons-collections-test-classes
3180 (inherit java-commons-collections)
3182 `(#:jar-name "commons-collections-test-classes.jar"
3183 #:source-dir "src/test"
3186 `(("collection" ,java-commons-collections)))))
3188 (define-public java-commons-beanutils
3190 (name "java-commons-beanutils")
3194 (uri (string-append "mirror://apache/commons/beanutils/source/"
3195 "commons-beanutils-" version "-src.tar.gz"))
3198 "03cs0bq3sl1sdc7py9g3qnf8n9h473nrkvd3d251kaqv6a2ab7qk"))))
3199 (build-system ant-build-system)
3201 `(#:test-target "test"
3204 (modify-phases %standard-phases
3206 (lambda* (#:key outputs #:allow-other-keys)
3207 (rename-file (string-append "dist/commons-beanutils-" ,version
3209 "commons-beanutils.jar")
3210 (install-file "commons-beanutils.jar"
3211 (string-append (assoc-ref outputs "out") "/share/java/"))
3214 `(("logging" ,java-commons-logging-minimal)
3215 ("collections" ,java-commons-collections)))
3217 `(("junit" ,java-junit)
3218 ("collections-test" ,java-commons-collections-test-classes)))
3219 (home-page "http://commons.apache.org/beanutils/")
3220 (synopsis "Dynamically set or get properties in Java")
3221 (description "BeanUtils provides a simplified interface to reflection and
3222 introspection to set or get dynamically determined properties through their
3223 setter and getter method.")
3224 (license license:asl2.0)))
3226 (define-public java-commons-io
3228 (name "java-commons-io")
3233 (uri (string-append "mirror://apache/commons/io/source/"
3234 "commons-io-" version "-src.tar.gz"))
3237 "0q5y41jrcjvx9hzs47x5kdhnasdy6rm4bzqd2jxl02w717m7a7v3"))))
3238 (build-system ant-build-system)
3239 (outputs '("out" "doc"))
3241 `(#:test-target "test"
3243 (list (string-append "-Djunit.jar="
3244 (assoc-ref %build-inputs "java-junit")
3245 "/share/java/junit.jar"))
3247 (modify-phases %standard-phases
3248 (add-after 'build 'build-javadoc ant-build-javadoc)
3249 (replace 'install (install-jars "target"))
3250 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
3252 `(("java-junit" ,java-junit)
3253 ("java-hamcrest-core" ,java-hamcrest-core)))
3254 (home-page "http://commons.apache.org/io/")
3255 (synopsis "Common useful IO related classes")
3256 (description "Commons-IO contains utility classes, stream implementations,
3257 file filters and endian classes.")
3258 (license license:asl2.0)))
3260 (define-public java-commons-lang
3262 (name "java-commons-lang")
3267 (uri (string-append "mirror://apache/commons/lang/source/"
3268 "commons-lang-" version "-src.tar.gz"))
3270 (base32 "1mxwagqadzx1b2al7i0z1v0r235aj2njdyijf02szq0vhmqrfiq5"))))
3271 (build-system ant-build-system)
3272 (outputs '("out" "doc"))
3274 `(#:test-target "test"
3276 (modify-phases %standard-phases
3277 (add-after 'build 'build-javadoc ant-build-javadoc)
3278 (add-before 'check 'disable-failing-test
3280 ;; Disable a failing test
3281 (substitute* "src/test/java/org/apache/commons/lang/\
3282 time/FastDateFormatTest.java"
3283 (("public void testFormat\\(\\)")
3284 "public void disabled_testFormat()"))
3286 (replace 'install (install-jars "target"))
3287 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
3289 `(("java-junit" ,java-junit)))
3290 (home-page "http://commons.apache.org/lang/")
3291 (synopsis "Extension of the java.lang package")
3292 (description "The Commons Lang components contains a set of Java classes
3293 that provide helper methods for standard Java classes, especially those found
3294 in the @code{java.lang} package in the Sun JDK. The following classes are
3298 @item StringUtils - Helper for @code{java.lang.String}.
3299 @item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets
3300 of characters such as @code{[a-z]} and @code{[abcdez]}.
3301 @item RandomStringUtils - Helper for creating randomised strings.
3302 @item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
3303 @item NumberRange - A range of numbers with an upper and lower bound.
3304 @item ObjectUtils - Helper for @code{java.lang.Object}.
3305 @item SerializationUtils - Helper for serializing objects.
3306 @item SystemUtils - Utility class defining the Java system properties.
3307 @item NestedException package - A sub-package for the creation of nested
3309 @item Enum package - A sub-package for the creation of enumerated types.
3310 @item Builder package - A sub-package for the creation of @code{equals},
3311 @code{hashCode}, @code{compareTo} and @code{toString} methods.
3313 (license license:asl2.0)))
3315 (define-public java-commons-lang3
3317 (name "java-commons-lang3")
3322 (uri (string-append "mirror://apache/commons/lang/source/"
3323 "commons-lang3-" version "-src.tar.gz"))
3325 (base32 "0xpshb9spjhplq5a7mr0y1bgfw8190ik4xj8f569xidfcki1d6kg"))))
3326 (build-system ant-build-system)
3327 (outputs '("out" "doc"))
3329 `(#:test-target "test"
3331 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-all"))
3332 (junit (assoc-ref %build-inputs "java-junit"))
3333 (easymock (assoc-ref %build-inputs "java-easymock"))
3334 (io (assoc-ref %build-inputs "java-commons-io")))
3335 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
3336 (string-append "-Dhamcrest.jar=" hamcrest
3337 "/share/java/hamcrest-all.jar")
3338 (string-append "-Dcommons-io.jar=" io
3339 "/share/java/commons-io-"
3340 ,(package-version java-commons-io)
3342 (string-append "-Deasymock.jar=" easymock
3343 "/share/java/easymock.jar")))
3345 (modify-phases %standard-phases
3346 (add-after 'build 'build-javadoc ant-build-javadoc)
3347 (replace 'install (install-jars "target"))
3348 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
3350 `(("java-junit" ,java-junit)
3351 ("java-commons-io" ,java-commons-io)
3352 ("java-hamcrest-all" ,java-hamcrest-all)
3353 ("java-easymock" ,java-easymock)))
3354 (home-page "http://commons.apache.org/lang/")
3355 (synopsis "Extension of the java.lang package")
3356 (description "The Commons Lang components contains a set of Java classes
3357 that provide helper methods for standard Java classes, especially those found
3358 in the @code{java.lang} package. The following classes are included:
3361 @item StringUtils - Helper for @code{java.lang.String}.
3362 @item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets of
3363 characters such as @code{[a-z]} and @code{[abcdez]}.
3364 @item RandomStringUtils - Helper for creating randomised strings.
3365 @item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
3366 @item NumberRange - A range of numbers with an upper and lower bound.
3367 @item ObjectUtils - Helper for @code{java.lang.Object}.
3368 @item SerializationUtils - Helper for serializing objects.
3369 @item SystemUtils - Utility class defining the Java system properties.
3370 @item NestedException package - A sub-package for the creation of nested
3372 @item Enum package - A sub-package for the creation of enumerated types.
3373 @item Builder package - A sub-package for the creation of @code{equals},
3374 @code{hashCode}, @code{compareTo} and @code{toString} methods.
3376 (license license:asl2.0)))
3378 (define-public java-jsr305
3380 (name "java-jsr305")
3384 (uri (string-append "https://repo1.maven.org/maven2/"
3385 "com/google/code/findbugs/"
3386 "jsr305/" version "/jsr305-"
3387 version "-sources.jar"))
3390 "1rh6jin9v7jqpq3kf1swl868l8i94r636n03pzpsmgr8v0lh9j2n"))))
3391 (build-system ant-build-system)
3393 `(#:tests? #f ; no tests included
3394 #:jar-name "jsr305.jar"))
3395 (home-page "http://findbugs.sourceforge.net/")
3396 (synopsis "Annotations for the static analyzer called findbugs")
3397 (description "This package provides annotations for the findbugs package.
3398 It provides packages in the @code{javax.annotations} namespace.")
3399 (license license:asl2.0)))
3401 (define-public java-guava
3404 ;; This is the last release of Guava that can be built with Java 7.
3408 (uri (string-append "https://github.com/google/guava/"
3409 "releases/download/v" version
3410 "/guava-" version "-sources.jar"))
3413 "1gawrs5gi6j5hcfxdgpnfli75vb9pfi4sn09pnc8xacr669yajwr"))))
3414 (build-system ant-build-system)
3416 `(#:tests? #f ; no tests included
3417 #:jar-name "guava.jar"
3419 (modify-phases %standard-phases
3420 (add-after 'unpack 'trim-sources
3422 (with-directory-excursion "src/com/google/common"
3423 ;; Remove annotations to avoid extra dependencies:
3424 ;; * "j2objc" annotations are used when converting Java to
3426 ;; * "errorprone" annotations catch common Java mistakes at
3428 ;; * "IgnoreJRERequirement" is used for Android.
3429 (substitute* (find-files "." "\\.java$")
3430 (("import com.google.j2objc.*") "")
3431 (("import com.google.errorprone.annotation.*") "")
3432 (("import org.codehaus.mojo.animal_sniffer.*") "")
3433 (("@CanIgnoreReturnValue") "")
3436 (("@RetainedWith") "")
3438 (("@ForOverride") "")
3439 (("@J2ObjCIncompatible") "")
3440 (("@IgnoreJRERequirement") "")))
3443 `(("java-jsr305" ,java-jsr305)))
3444 (home-page "https://github.com/google/guava")
3445 (synopsis "Google core libraries for Java")
3446 (description "Guava is a set of core libraries that includes new
3447 collection types (such as multimap and multiset), immutable collections, a
3448 graph library, functional types, an in-memory cache, and APIs/utilities for
3449 concurrency, I/O, hashing, primitives, reflection, string processing, and much
3451 (license license:asl2.0)))
3453 ;; The java-commons-logging package provides adapters to many different
3454 ;; logging frameworks. To avoid an excessive dependency graph we try to build
3455 ;; it with only a minimal set of adapters.
3456 (define-public java-commons-logging-minimal
3458 (name "java-commons-logging-minimal")
3462 (uri (string-append "mirror://apache/commons/logging/source/"
3463 "commons-logging-" version "-src.tar.gz"))
3466 "10bwcy5w8d7y39n0krlwhnp8ds3kj5zhmzj0zxnkw0qdlsjmsrj9"))))
3467 (build-system ant-build-system)
3469 `(#:tests? #f ; avoid dependency on logging frameworks
3470 #:jar-name "commons-logging-minimal.jar"
3472 (modify-phases %standard-phases
3473 (add-after 'unpack 'delete-adapters-and-tests
3475 ;; Delete all adapters except for NoOpLog, SimpleLog, and
3476 ;; LogFactoryImpl. NoOpLog is required to build; LogFactoryImpl
3477 ;; is used by applications; SimpleLog is the only actually usable
3478 ;; implementation that does not depend on another logging
3482 (delete-file (string-append
3483 "src/main/java/org/apache/commons/logging/impl/" file)))
3484 (list "Jdk13LumberjackLogger.java"
3485 "WeakHashtable.java"
3487 "ServletContextCleaner.java"
3490 "LogKitLogger.java"))
3491 (delete-file-recursively "src/test")
3493 (home-page "http://commons.apache.org/logging/")
3494 (synopsis "Common API for logging implementations")
3495 (description "The Logging package is a thin bridge between different
3496 logging implementations. A library that uses the commons-logging API can be
3497 used with any logging implementation at runtime.")
3498 (license license:asl2.0)))
3500 ;; This is the last release of the 1.x series.
3501 (define-public java-mockito-1
3503 (name "java-mockito")
3507 (uri (string-append "http://repo1.maven.org/maven2/"
3508 "org/mockito/mockito-core/" version
3509 "/mockito-core-" version "-sources.jar"))
3512 "0vmiwnwpf83g2q7kj1rislmja8fpvqkixjhawh7nxnygx6pq11kc"))))
3513 (build-system ant-build-system)
3515 `(#:jar-name "mockito.jar"
3516 #:tests? #f ; no tests included
3517 ;; FIXME: patch-and-repack does not support jars, so we have to apply
3518 ;; patches in build phases.
3520 (modify-phases %standard-phases
3521 ;; Mockito was developed against a different version of hamcrest,
3522 ;; which does not require matcher implementations to provide an
3523 ;; implementation of the "describeMismatch" method. We add this
3524 ;; simple definition to pass the build with our version of hamcrest.
3525 (add-after 'unpack 'fix-hamcrest-build-error
3527 (substitute* "src/org/mockito/internal/matchers/LocalizedMatcher.java"
3528 (("public Matcher getActualMatcher\\(\\) .*" line)
3530 public void describeMismatch(Object item, Description description) {
3531 actualMatcher.describeMismatch(item, description);
3535 ;; Mockito bundles cglib. We have a cglib package, so let's use
3537 (add-after 'unpack 'use-system-libraries
3539 (with-directory-excursion "src/org/mockito/internal/creation/cglib"
3540 (substitute* '("CGLIBHacker.java"
3541 "CglibMockMaker.java"
3542 "ClassImposterizer.java"
3543 "DelegatingMockitoMethodProxy.java"
3544 "MethodInterceptorFilter.java"
3545 "MockitoNamingPolicy.java"
3546 "SerializableMockitoMethodProxy.java"
3547 "SerializableNoOp.java")
3548 (("import org.mockito.cglib") "import net.sf.cglib")))
3551 `(("java-junit" ,java-junit)
3552 ("java-objenesis" ,java-objenesis)
3553 ("java-cglib" ,java-cglib)
3554 ("java-hamcrest-core" ,java-hamcrest-core)))
3555 (home-page "http://mockito.org")
3556 (synopsis "Mockito is a mock library for Java")
3557 (description "Mockito is a mocking library for Java which lets you write
3558 tests with a clean and simple API. It generates mocks using reflection, and
3559 it records all mock invocations, including methods arguments.")
3560 (license license:asl2.0)))
3562 (define-public java-httpcomponents-httpcore
3564 (name "java-httpcomponents-httpcore")
3568 (uri (string-append "mirror://apache//httpcomponents/httpcore/"
3569 "source/httpcomponents-core-"
3570 version "-src.tar.gz"))
3573 "02bwcf38y4vgwq7kj2s6q7qrmma641r5lacivm16kgxvb2j6h1vy"))))
3574 (build-system ant-build-system)
3576 `(#:jar-name "httpcomponents-httpcore.jar"
3578 (modify-phases %standard-phases
3579 (add-after 'unpack 'chdir
3580 (lambda _ (chdir "httpcore") #t)))))
3582 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)
3583 ("java-commons-lang3" ,java-commons-lang3)))
3585 `(("java-junit" ,java-junit)
3586 ("java-mockito" ,java-mockito-1)))
3587 (home-page "https://hc.apache.org/httpcomponents-core-4.4.x/index.html")
3588 (synopsis "Low level HTTP transport components")
3589 (description "HttpCore is a set of low level HTTP transport components
3590 that can be used to build custom client and server side HTTP services with a
3591 minimal footprint. HttpCore supports two I/O models: blocking I/O model based
3592 on the classic Java I/O and non-blocking, event driven I/O model based on Java
3595 This package provides the blocking I/O model library.")
3596 (license license:asl2.0)))
3598 (define-public java-httpcomponents-httpcore-nio
3599 (package (inherit java-httpcomponents-httpcore)
3600 (name "java-httpcomponents-httpcore-nio")
3602 `(#:jar-name "httpcomponents-httpcore-nio.jar"
3604 (modify-phases %standard-phases
3605 (add-after 'unpack 'chdir
3606 (lambda _ (chdir "httpcore-nio") #t)))))
3608 `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
3609 ("java-hamcrest-core" ,java-hamcrest-core)
3610 ,@(package-inputs java-httpcomponents-httpcore)))
3611 (description "HttpCore is a set of low level HTTP transport components
3612 that can be used to build custom client and server side HTTP services with a
3613 minimal footprint. HttpCore supports two I/O models: blocking I/O model based
3614 on the classic Java I/O and non-blocking, event driven I/O model based on Java
3617 This package provides the non-blocking I/O model library based on Java
3620 (define-public java-httpcomponents-httpcore-ab
3621 (package (inherit java-httpcomponents-httpcore)
3622 (name "java-httpcomponents-httpcore-ab")
3624 `(#:jar-name "httpcomponents-httpcore-ab.jar"
3626 (modify-phases %standard-phases
3627 (add-after 'unpack 'chdir
3628 (lambda _ (chdir "httpcore-ab") #t)))))
3630 `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
3631 ("java-commons-cli" ,java-commons-cli)
3632 ("java-hamcrest-core" ,java-hamcrest-core)
3633 ,@(package-inputs java-httpcomponents-httpcore)))
3634 (synopsis "Apache HttpCore benchmarking tool")
3635 (description "This package provides the HttpCore benchmarking tool. It is
3636 an Apache AB clone based on HttpCore.")))
3638 (define-public java-httpcomponents-httpclient
3640 (name "java-httpcomponents-httpclient")
3644 (uri (string-append "mirror://apache/httpcomponents/httpclient/"
3645 "source/httpcomponents-client-"
3646 version "-src.tar.gz"))
3649 "1428399s7qy3cim5wc6f3ks4gl9nf9vkjpfmnlap3jflif7g2pj1"))))
3650 (build-system ant-build-system)
3652 `(#:jar-name "httpcomponents-httpclient.jar"
3654 (modify-phases %standard-phases
3655 (add-after 'unpack 'chdir
3656 (lambda _ (chdir "httpclient") #t)))))
3658 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)
3659 ("java-commons-codec" ,java-commons-codec)
3660 ("java-hamcrest-core" ,java-hamcrest-core)
3661 ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
3662 ("java-mockito" ,java-mockito-1)
3663 ("java-junit" ,java-junit)))
3664 (home-page "https://hc.apache.org/httpcomponents-client-ga/")
3665 (synopsis "HTTP client library for Java")
3666 (description "Although the @code{java.net} package provides basic
3667 functionality for accessing resources via HTTP, it doesn't provide the full
3668 flexibility or functionality needed by many applications. @code{HttpClient}
3669 seeks to fill this void by providing an efficient, up-to-date, and
3670 feature-rich package implementing the client side of the most recent HTTP
3671 standards and recommendations.")
3672 (license license:asl2.0)))
3674 (define-public java-httpcomponents-httpmime
3675 (package (inherit java-httpcomponents-httpclient)
3676 (name "java-httpcomponents-httpmime")
3678 `(#:jar-name "httpcomponents-httpmime.jar"
3680 (modify-phases %standard-phases
3681 (add-after 'unpack 'chdir
3682 (lambda _ (chdir "httpmime") #t)))))
3684 `(("java-httpcomponents-httpclient" ,java-httpcomponents-httpclient)
3685 ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
3686 ("java-junit" ,java-junit)
3687 ("java-hamcrest-core" ,java-hamcrest-core)))))
3689 (define-public java-commons-net
3691 (name "java-commons-net")
3695 (uri (string-append "mirror://apache/commons/net/source/"
3696 "commons-net-" version "-src.tar.gz"))
3699 "0n0cmnddk9qdqhjvka8pc6hd9mn2qi3166f1s6xk32h7rfy1adxr"))))
3700 (build-system ant-build-system)
3702 `(;; FIXME: MainTest.java tries to read "examples.properties" (which
3703 ;; should be "resources/examples/examples.properties"), but gets "null"
3706 #:jar-name "commons-net.jar"))
3708 `(("java-junit" ,java-junit)
3709 ("java-hamcrest-core" ,java-hamcrest-core)))
3710 (home-page "http://commons.apache.org/net/")
3711 (synopsis "Client library for many basic Internet protocols")
3712 (description "The Apache Commons Net library implements the client side of
3713 many basic Internet protocols. The purpose of the library is to provide
3714 fundamental protocol access, not higher-level abstractions.")
3715 (license license:asl2.0)))
3717 (define-public java-jsch
3723 (uri (string-append "mirror://sourceforge/jsch/jsch/"
3724 version "/jsch-" version ".zip"))
3727 "029rdddyq1mh3ghryh3ki99kba1xkf1d1swjv2vi6lk6zzjy2wdb"))))
3728 (build-system ant-build-system)
3730 `(#:build-target "dist"
3731 #:tests? #f ; no tests included
3733 (modify-phases %standard-phases
3734 (replace 'install (install-jars "dist")))))
3736 `(("unzip" ,unzip)))
3737 (home-page "http://www.jcraft.com/jsch/")
3738 (synopsis "Pure Java implementation of SSH2")
3739 (description "JSch is a pure Java implementation of SSH2. JSch allows you
3740 to connect to an SSH server and use port forwarding, X11 forwarding, file
3741 transfer, etc., and you can integrate its functionality into your own Java
3743 (license license:bsd-3)))
3745 (define-public java-commons-compress
3747 (name "java-commons-compress")
3751 (uri (string-append "mirror://apache/commons/compress/source/"
3752 "commons-compress-" version "-src.tar.gz"))
3755 "1vjqvavrn0babffn1kciz6v52ibwq2vwhzlb95hazis3lgllnxc8"))))
3756 (build-system ant-build-system)
3758 `(#:jar-name "commons-compress.jar"
3760 (modify-phases %standard-phases
3761 (add-after 'unpack 'delete-bad-tests
3763 (with-directory-excursion "src/test/java/org/apache/commons/compress/"
3764 ;; FIXME: These tests really should not fail. Maybe they are
3765 ;; indicative of problems with our Java packaging work.
3767 ;; This test fails with a null pointer exception.
3768 (delete-file "archivers/sevenz/SevenZOutputFileTest.java")
3769 ;; This test fails to open test resources.
3770 (delete-file "archivers/zip/ExplodeSupportTest.java")
3772 ;; FIXME: This test adds a dependency on powermock, which is hard to
3773 ;; package at this point.
3774 ;; https://github.com/powermock/powermock
3775 (delete-file "archivers/sevenz/SevenZNativeHeapTest.java"))
3778 `(("java-junit" ,java-junit)
3779 ("java-hamcrest-core" ,java-hamcrest-core)
3780 ("java-mockito" ,java-mockito-1)
3781 ("java-xz" ,java-xz)))
3782 (home-page "https://commons.apache.org/proper/commons-compress/")
3783 (synopsis "Java library for working with compressed files")
3784 (description "The Apache Commons Compress library defines an API for
3785 working with compressed files such as ar, cpio, Unix dump, tar, zip, gzip, XZ,
3786 Pack200, bzip2, 7z, arj, lzma, snappy, DEFLATE, lz4 and Z files.")
3787 (license license:asl2.0)))
3789 (define-public java-commons-csv
3791 (name "java-commons-csv")
3795 (uri (string-append "mirror://apache/commons/csv/source/"
3796 "commons-csv-" version "-src.tar.gz"))
3799 "1l89m0fm2s3xx3v3iynvangymfg2vlyngaj6fgsi457nmsw7m7ij"))))
3800 (build-system ant-build-system)
3802 `(#:jar-name "commons-csv.jar"
3803 #:source-dir "src/main/java"
3804 #:tests? #f)); FIXME: requires java-h2
3806 `(("java-hamcrest-core" ,java-hamcrest-core)
3807 ("java-commons-io" ,java-commons-io)
3808 ("java-commons-lang3" ,java-commons-lang3)
3809 ("junit" ,java-junit)))
3810 (home-page "https://commons.apache.org/proper/commons-csv/")
3811 (synopsis "Read and write CSV documents")
3812 (description "Commons CSV reads and writes files in variations of the Comma
3813 Separated Value (CSV) format. The most common CSV formats are predefined in the
3817 @item Microsoft Excel
3818 @item Informix UNLOAD
3819 @item Informix UNLOAD CSV
3825 Custom formats can be created using a fluent style API.")
3826 (license license:asl2.0)))
3828 (define-public java-osgi-annotation
3830 (name "java-osgi-annotation")
3834 (uri (string-append "https://repo1.maven.org/maven2/"
3835 "org/osgi/org.osgi.annotation/" version "/"
3836 "org.osgi.annotation-" version "-sources.jar"))
3839 "1q718mb7gqg726rh6pc2hcisn8v50nv35abbir0jypmffhiii85w"))))
3840 (build-system ant-build-system)
3842 `(#:tests? #f ; no tests
3843 #:jar-name "osgi-annotation.jar"))
3844 (home-page "https://www.osgi.org")
3845 (synopsis "Annotation module of OSGi framework")
3847 "OSGi, for Open Services Gateway initiative framework, is a module system
3848 and service platform for the Java programming language. This package contains
3849 the OSGi annotation module, providing additional services to help dynamic
3851 (license license:asl2.0)))
3853 (define-public java-osgi-core
3855 (name "java-osgi-core")
3859 (uri (string-append "https://repo1.maven.org/maven2/"
3860 "org/osgi/org.osgi.core/" version "/"
3861 "org.osgi.core-" version "-sources.jar"))
3864 "19bpf5jx32jq9789gyhin35q5v7flmw0p9mk7wbgqpxqfmxyiabv"))))
3865 (build-system ant-build-system)
3867 `(#:tests? #f ; no tests
3868 #:jar-name "osgi-core.jar"))
3870 `(("java-osgi-annotation" ,java-osgi-annotation)))
3871 (home-page "https://www.osgi.org")
3872 (synopsis "Core module of OSGi framework")
3874 "OSGi, for Open Services Gateway initiative framework, is a module system
3875 and service platform for the Java programming language. This package contains
3876 the OSGi Core module.")
3877 (license license:asl2.0)))
3879 (define-public java-osgi-service-event
3881 (name "java-osgi-service-event")
3885 (uri (string-append "https://repo1.maven.org/maven2/"
3886 "org/osgi/org.osgi.service.event/"
3887 version "/org.osgi.service.event-"
3888 version "-sources.jar"))
3891 "1nyhlgagwym75bycnjczwbnpymv2iw84zbhvvzk84g9q736i6qxm"))))
3892 (build-system ant-build-system)
3894 `(#:tests? #f ; no tests
3895 #:jar-name "osgi-service-event.jar"))
3897 `(("java-osgi-annotation" ,java-osgi-annotation)
3898 ("java-osgi-core" ,java-osgi-core)))
3899 (home-page "https://www.osgi.org")
3900 (synopsis "OSGi service event module")
3902 "OSGi, for Open Services Gateway initiative framework, is a module system
3903 and service platform for the Java programming language. This package contains
3904 the OSGi @code{org.osgi.service.event} module.")
3905 (license license:asl2.0)))
3907 (define-public java-eclipse-osgi
3909 (name "java-eclipse-osgi")
3913 (uri (string-append "https://repo1.maven.org/maven2/"
3914 "org/eclipse/platform/org.eclipse.osgi/"
3915 version "/org.eclipse.osgi-"
3916 version "-sources.jar"))
3919 "00cqc6lb29n0zv68b4l842vzkwawvbr7gshfdygsk8sicvcq2c7b"))))
3920 (build-system ant-build-system)
3922 `(#:tests? #f ; no tests included
3923 #:jar-name "eclipse-equinox-osgi.jar"))
3925 `(("java-osgi-annotation" ,java-osgi-annotation)))
3926 (home-page "http://www.eclipse.org/equinox/")
3927 (synopsis "Eclipse Equinox OSGi framework")
3928 (description "This package provides an implementation of the OSGi Core
3930 (license license:epl1.0)))
3932 (define-public java-eclipse-equinox-common
3934 (name "java-eclipse-equinox-common")
3938 (uri (string-append "https://repo1.maven.org/maven2/"
3939 "org/eclipse/platform/org.eclipse.equinox.common/"
3940 version "/org.eclipse.equinox.common-"
3941 version "-sources.jar"))
3944 "12aazpkgw46r1qj0pr421jzwhbmsizd97r37krd7njnbrdgfzksc"))))
3945 (build-system ant-build-system)
3947 `(#:tests? #f ; no tests included
3948 #:jar-name "eclipse-equinox-common.jar"))
3950 `(("java-eclipse-osgi" ,java-eclipse-osgi)))
3951 (home-page "http://www.eclipse.org/equinox/")
3952 (synopsis "Common Eclipse runtime")
3953 (description "This package provides the common Eclipse runtime.")
3954 (license license:epl1.0)))
3956 (define-public java-eclipse-core-jobs
3958 (name "java-eclipse-core-jobs")
3962 (uri (string-append "https://repo1.maven.org/maven2/"
3963 "org/eclipse/platform/org.eclipse.core.jobs/"
3964 version "/org.eclipse.core.jobs-"
3965 version "-sources.jar"))
3968 "0395b8lh0km8vhzjnchvs1rii1qz48hyvb2wqfaq4yhklbwihq4b"))))
3969 (build-system ant-build-system)
3971 `(#:tests? #f ; no tests included
3972 #:jar-name "eclipse-core-jobs.jar"))
3974 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
3975 ("java-eclipse-osgi" ,java-eclipse-osgi)))
3976 (home-page "http://www.eclipse.org/equinox/")
3977 (synopsis "Eclipse jobs mechanism")
3978 (description "This package provides the Eclipse jobs mechanism.")
3979 (license license:epl1.0)))
3981 (define-public java-eclipse-equinox-registry
3983 (name "java-eclipse-equinox-registry")
3987 (uri (string-append "https://repo1.maven.org/maven2/"
3988 "org/eclipse/platform/org.eclipse.equinox.registry/"
3989 version "/org.eclipse.equinox.registry-"
3990 version "-sources.jar"))
3993 "1i9sgymh2fy5vdgk5y7s3qvrlbgh4l93ddqi3v4zmca7hwrlhf9k"))))
3994 (build-system ant-build-system)
3996 `(#:tests? #f ; no tests included
3997 #:jar-name "eclipse-equinox-registry.jar"))
3999 `(("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
4000 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
4001 ("java-eclipse-osgi" ,java-eclipse-osgi)))
4002 (home-page "http://www.eclipse.org/equinox/")
4003 (synopsis "Eclipse extension registry support")
4004 (description "This package provides support for the Eclipse extension
4006 (license license:epl1.0)))
4008 (define-public java-eclipse-equinox-app
4010 (name "java-eclipse-equinox-app")
4014 (uri (string-append "https://repo1.maven.org/maven2/"
4015 "org/eclipse/platform/org.eclipse.equinox.app/"
4016 version "/org.eclipse.equinox.app-"
4017 version "-sources.jar"))
4020 "0nhvbp93y203ar7y59gb0mz3w2d3jlqhr0c9hii9bcfpmr7imdab"))))
4021 (build-system ant-build-system)
4023 `(#:tests? #f ; no tests included
4024 #:jar-name "eclipse-equinox-app.jar"))
4026 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
4027 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
4028 ("java-eclipse-osgi" ,java-eclipse-osgi)
4029 ("java-osgi-service-event" ,java-osgi-service-event)))
4030 (home-page "http://www.eclipse.org/equinox/")
4031 (synopsis "Equinox application container")
4032 (description "This package provides the Equinox application container for
4034 (license license:epl1.0)))
4036 (define-public java-eclipse-equinox-preferences
4038 (name "java-eclipse-equinox-preferences")
4042 (uri (string-append "https://repo1.maven.org/maven2/"
4043 "org/eclipse/platform/org.eclipse.equinox.preferences/"
4044 version "/org.eclipse.equinox.preferences-"
4045 version "-sources.jar"))
4048 "0k7w6c141sqym4fy3af0qkwpy4pdh2vsjpjba6rp5fxyqa24v0a2"))))
4049 (build-system ant-build-system)
4051 `(#:tests? #f ; no tests included
4052 #:jar-name "eclipse-equinox-preferences.jar"))
4054 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
4055 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
4056 ("java-eclipse-osgi" ,java-eclipse-osgi)))
4057 (home-page "http://www.eclipse.org/equinox/")
4058 (synopsis "Eclipse preferences mechanism")
4059 (description "This package provides the Eclipse preferences mechanism with
4060 the module @code{org.eclipse.equinox.preferences}.")
4061 (license license:epl1.0)))
4063 (define-public java-eclipse-core-contenttype
4065 (name "java-eclipse-core-contenttype")
4069 (uri (string-append "https://repo1.maven.org/maven2/"
4070 "org/eclipse/platform/org.eclipse.core.contenttype/"
4071 version "/org.eclipse.core.contenttype-"
4072 version "-sources.jar"))
4075 "1wcqcv7ijwv5rh748vz3x9pkmjl9w1r0k0026k56n8yjl4rrmspi"))))
4076 (build-system ant-build-system)
4078 `(#:tests? #f ; no tests included
4079 #:jar-name "eclipse-core-contenttype.jar"))
4081 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
4082 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
4083 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
4084 ("java-eclipse-osgi" ,java-eclipse-osgi)))
4085 (home-page "http://www.eclipse.org/")
4086 (synopsis "Eclipse content mechanism")
4087 (description "This package provides the Eclipse content mechanism in the
4088 @code{org.eclipse.core.contenttype} module.")
4089 (license license:epl1.0)))
4091 (define-public java-eclipse-core-runtime
4093 (name "java-eclipse-core-runtime")
4097 (uri (string-append "https://repo1.maven.org/maven2/"
4098 "org/eclipse/platform/org.eclipse.core.runtime/"
4099 version "/org.eclipse.core.runtime-"
4100 version "-sources.jar"))
4103 "16mkf8jgj35pgzms7w1gyfq0gfm4ixw6c5xbbxzdj1la56c758ya"))))
4104 (build-system ant-build-system)
4106 `(#:tests? #f ; no tests included
4107 #:jar-name "eclipse-core-runtime.jar"))
4109 `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
4110 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
4111 ("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
4112 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
4113 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
4114 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
4115 ("java-eclipse-osgi" ,java-eclipse-osgi)))
4116 (home-page "https://www.eclipse.org/")
4117 (synopsis "Eclipse core runtime")
4118 (description "This package provides the Eclipse core runtime with the
4119 module @code{org.eclipse.core.runtime}.")
4120 (license license:epl1.0)))
4122 (define-public java-eclipse-core-filesystem
4124 (name "java-eclipse-core-filesystem")
4128 (uri (string-append "https://repo1.maven.org/maven2/"
4129 "org/eclipse/platform/org.eclipse.core.filesystem/"
4130 version "/org.eclipse.core.filesystem-"
4131 version "-sources.jar"))
4134 "0km1bhwjim4rfy3pkvjhvy31kgsyf2ncx0mlkmbf5n6g57pphdyj"))))
4135 (build-system ant-build-system)
4137 `(#:tests? #f ; no tests included
4138 #:jar-name "eclipse-core-filesystem.jar"))
4140 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
4141 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
4142 ("java-eclipse-osgi" ,java-eclipse-osgi)))
4143 (home-page "https://www.eclipse.org/")
4144 (synopsis "Eclipse core file system")
4145 (description "This package provides the Eclipse core file system with the
4146 module @code{org.eclipse.core.filesystem}.")
4147 (license license:epl1.0)))
4149 (define-public java-eclipse-core-expressions
4151 (name "java-eclipse-core-expressions")
4155 (uri (string-append "https://repo1.maven.org/maven2/"
4156 "org/eclipse/platform/org.eclipse.core.expressions/"
4157 version "/org.eclipse.core.expressions-"
4158 version "-sources.jar"))
4161 "18bw2l875gmygvpagpgk9l24qzbdjia4ag12nw6fi8v8yaq4987f"))))
4162 (build-system ant-build-system)
4164 `(#:tests? #f ; no tests included
4165 #:jar-name "eclipse-core-expressions.jar"))
4167 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
4168 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
4169 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
4170 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
4171 ("java-eclipse-osgi" ,java-eclipse-osgi)))
4172 (home-page "https://www.eclipse.org/")
4173 (synopsis "Eclipse core expression language")
4174 (description "This package provides the Eclipse core expression language
4175 with the @code{org.eclipse.core.expressions} module.")
4176 (license license:epl1.0)))
4178 (define-public java-eclipse-core-variables
4180 (name "java-eclipse-core-variables")
4184 (uri (string-append "https://repo1.maven.org/maven2/"
4185 "org/eclipse/platform/org.eclipse.core.variables/"
4186 version "/org.eclipse.core.variables-"
4187 version "-sources.jar"))
4190 "12dirh03zi4n5x5cj07vzrhkmnqy6h9q10h9j605pagmpmifyxmy"))))
4191 (build-system ant-build-system)
4193 `(#:tests? #f ; no tests included
4194 #:jar-name "eclipse-core-variables.jar"))
4196 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
4197 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
4198 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
4199 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
4200 ("java-eclipse-osgi" ,java-eclipse-osgi)))
4201 (home-page "https://www.eclipse.org/platform")
4202 (synopsis "Eclipse core variables")
4203 (description "This package provides the Eclipse core variables module
4204 @code{org.eclipse.core.variables}.")
4205 (license license:epl1.0)))
4207 (define-public java-eclipse-ant-core
4209 (name "java-eclipse-ant-core")
4213 (uri (string-append "https://repo1.maven.org/maven2/"
4214 "org/eclipse/platform/org.eclipse.ant.core/"
4215 version "/org.eclipse.ant.core-"
4216 version "-sources.jar"))
4219 "11g3if794qjlk98mz9zch22rr56sd7z63vn4i7k2icr8cq5bfqg7"))))
4220 (build-system ant-build-system)
4222 `(#:tests? #f ; no tests included
4223 #:jar-name "eclipse-ant-core.jar"))
4225 `(("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
4226 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
4227 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
4228 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
4229 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
4230 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
4231 ("java-eclipse-core-variables" ,java-eclipse-core-variables)
4232 ("java-eclipse-osgi" ,java-eclipse-osgi)))
4233 (home-page "https://www.eclipse.org/platform")
4234 (synopsis "Ant build tool core libraries")
4235 (description "This package provides the ant build tool core libraries with
4236 the module @code{org.eclipse.ant.core}.")
4237 (license license:epl1.0)))
4239 (define-public java-eclipse-core-resources
4241 (name "java-eclipse-core-resources")
4245 (uri (string-append "https://repo1.maven.org/maven2/"
4246 "org/eclipse/platform/org.eclipse.core.resources/"
4247 version "/org.eclipse.core.resources-"
4248 version "-sources.jar"))
4251 "1hrfxrll6cpcagfksk2na1ypvkcnsp0fk6n3vcsrn97qayf9mx9l"))))
4252 (build-system ant-build-system)
4254 `(#:tests? #f ; no tests included
4255 #:jar-name "eclipse-core-resources.jar"))
4257 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
4258 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
4259 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
4260 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
4261 ("java-eclipse-core-expressions" ,java-eclipse-core-expressions)
4262 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
4263 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
4264 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
4265 ("java-eclipse-ant-core" ,java-eclipse-ant-core)
4266 ("java-eclipse-osgi" ,java-eclipse-osgi)))
4267 (home-page "https://www.eclipse.org/")
4268 (synopsis "Eclipse core resource management")
4269 (description "This package provides the Eclipse core resource management
4270 module @code{org.eclipse.core.resources}.")
4271 (license license:epl1.0)))
4273 (define-public java-eclipse-compare-core
4275 (name "java-eclipse-compare-core")
4279 (uri (string-append "https://repo1.maven.org/maven2/"
4280 "org/eclipse/platform/org.eclipse.compare.core/"
4281 version "/org.eclipse.compare.core-"
4282 version "-sources.jar"))
4285 "10g37r0pbiffyv2wk35c6g5lwzkdipkl0kkjp41v84dln46xm4dg"))))
4286 (build-system ant-build-system)
4288 `(#:tests? #f ; no tests included
4289 #:jar-name "eclipse-compare-core.jar"))
4291 `(("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
4292 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
4293 ("java-eclipse-osgi" ,java-eclipse-osgi)
4294 ("java-icu4j" ,java-icu4j)))
4295 (home-page "https://www.eclipse.org/")
4296 (synopsis "Eclipse core compare support")
4297 (description "This package provides the Eclipse core compare support
4298 module @code{org.eclipse.compare.core}.")
4299 (license license:epl1.0)))
4301 (define-public java-eclipse-team-core
4303 (name "java-eclipse-team-core")
4307 (uri (string-append "https://repo1.maven.org/maven2/"
4308 "org/eclipse/platform/org.eclipse.team.core/"
4309 version "/org.eclipse.team.core-"
4310 version "-sources.jar"))
4313 "02j2jzqgb26zx2d5ahxmvijw6j4r0la90zl5c3i65x6z19ciyam7"))))
4314 (build-system ant-build-system)
4316 `(#:tests? #f ; no tests included
4317 #:jar-name "eclipse-team-core.jar"))
4319 `(("java-eclipse-compare-core" ,java-eclipse-compare-core)
4320 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
4321 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
4322 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
4323 ("java-eclipse-core-resources" ,java-eclipse-core-resources)
4324 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
4325 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
4326 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
4327 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
4328 ("java-eclipse-osgi" ,java-eclipse-osgi)))
4329 (home-page "https://www.eclipse.org/platform")
4330 (synopsis "Eclipse team support core")
4331 (description "This package provides the Eclipse team support core module
4332 @code{org.eclipse.team.core}.")
4333 (license license:epl1.0)))
4335 (define-public java-eclipse-core-commands
4337 (name "java-eclipse-core-commands")
4341 (uri (string-append "https://repo1.maven.org/maven2/"
4342 "org/eclipse/platform/org.eclipse.core.commands/"
4343 version "/org.eclipse.core.commands-"
4344 version "-sources.jar"))
4347 "0yjn482qndcfrsq3jd6vnhcylp16420f5aqkrwr8spsprjigjcr9"))))
4348 (build-system ant-build-system)
4350 `(#:tests? #f ; no tests included
4351 #:jar-name "eclipse-core-commands.jar"))
4353 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)))
4354 (home-page "https://www.eclipse.org/platform")
4355 (synopsis "Eclipse core commands")
4356 (description "This package provides Eclipse core commands in the module
4357 @code{org.eclipse.core.commands}.")
4358 (license license:epl1.0)))
4360 (define-public java-eclipse-text
4362 (name "java-eclipse-text")
4366 (uri (string-append "https://repo1.maven.org/maven2/"
4367 "org/eclipse/platform/org.eclipse.text/"
4368 version "/org.eclipse.text-"
4369 version "-sources.jar"))
4372 "0scz70vzz5qs5caji9f5q01vkqnvip7dpri1q07l8wbbdcxn4cq1"))))
4373 (build-system ant-build-system)
4375 `(#:tests? #f ; no tests included
4376 #:jar-name "eclipse-text.jar"
4378 (modify-phases %standard-phases
4379 ;; When creating a new category we must make sure that the new list
4380 ;; matches List<Position>. By default it seems to be too generic
4381 ;; (ArrayList<Object>), so we specialize it to ArrayList<Position>.
4382 ;; Without this we get this error:
4384 ;; [javac] .../src/org/eclipse/jface/text/AbstractDocument.java:376:
4385 ;; error: method put in interface Map<K,V> cannot be applied to given types;
4386 ;; [javac] fPositions.put(category, new ArrayList<>());
4388 ;; [javac] required: String,List<Position>
4389 ;; [javac] found: String,ArrayList<Object>
4390 ;; [javac] reason: actual argument ArrayList<Object> cannot be converted
4391 ;; to List<Position> by method invocation conversion
4392 ;; [javac] where K,V are type-variables:
4393 ;; [javac] K extends Object declared in interface Map
4394 ;; [javac] V extends Object declared in interface Map
4396 ;; I don't know if this is a good fix. I suspect it is not, but it
4398 (add-after 'unpack 'fix-compilation-error
4400 (substitute* "src/org/eclipse/jface/text/AbstractDocument.java"
4401 (("Positions.put\\(category, new ArrayList<>\\(\\)\\);")
4402 "Positions.put(category, new ArrayList<Position>());"))
4405 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
4406 ("java-eclipse-core-commands" ,java-eclipse-core-commands)
4407 ("java-icu4j" ,java-icu4j)))
4408 (home-page "http://www.eclipse.org/platform")
4409 (synopsis "Eclipse text library")
4410 (description "Platform Text is part of the Platform UI project and
4411 provides the basic building blocks for text and text editors within Eclipse
4412 and contributes the Eclipse default text editor.")
4413 (license license:epl1.0)))
4415 (define-public java-eclipse-jdt-core
4417 (name "java-eclipse-jdt-core")
4421 (uri (string-append "https://repo1.maven.org/maven2/"
4422 "org/eclipse/jdt/org.eclipse.jdt.core/"
4423 version "/org.eclipse.jdt.core-"
4424 version "-sources.jar"))
4427 "191xw4lc7mjjkprh4ji5vnpjvr5r4zvbpwkriy4bvsjqrz35vh1j"))))
4428 (build-system ant-build-system)
4430 `(#:tests? #f ; no tests included
4431 #:jar-name "eclipse-jdt-core.jar"))
4433 `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
4434 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
4435 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
4436 ("java-eclipse-core-resources" ,java-eclipse-core-resources)
4437 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
4438 ("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
4439 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
4440 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
4441 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
4442 ("java-eclipse-osgi" ,java-eclipse-osgi)
4443 ("java-eclipse-text" ,java-eclipse-text)))
4444 (home-page "https://www.eclipse.org/jdt")
4445 (synopsis "Java development tools core libraries")
4446 (description "This package provides the core libraries of the Eclipse Java
4447 development tools.")
4448 (license license:epl1.0)))
4450 (define-public java-javax-mail
4452 (name "java-javax-mail")
4456 (uri (string-append "https://repo1.maven.org/maven2/"
4457 "com/sun/mail/javax.mail/"
4458 version "/javax.mail-"
4459 version "-sources.jar"))
4462 "0sdlfgsc2b5s89xv1261y8i0jijcja019k2x1c8ngfn582w4jly9"))))
4463 (build-system ant-build-system)
4465 `(#:tests? #f ; no tests
4466 #:jar-name "javax-mail.jar"))
4467 (home-page "https://javamail.java.net")
4468 (synopsis "Reference implementation of the JavaMail API")
4470 "This package provides versions of the JavaMail API implementation, IMAP,
4471 SMTP, and POP3 service providers, some examples, and documentation for the
4473 ;; GPLv2 only with "classpath exception".
4474 (license license:gpl2)))
4476 (define-public java-log4j-api
4478 (name "java-log4j-api")
4482 (uri (string-append "mirror://apache/logging/log4j/" version
4483 "/apache-log4j-" version "-src.tar.gz"))
4486 "0j5p9gik0jysh37nlrckqbky12isy95cpwg2gv5fas1rcdqbraxd"))))
4487 (build-system ant-build-system)
4489 `(#:tests? #f ; tests require unpackaged software
4490 #:jar-name "log4j-api.jar"
4492 (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out")
4495 (modify-phases %standard-phases
4496 (add-after 'unpack 'enter-dir
4497 (lambda _ (chdir "log4j-api") #t))
4498 ;; FIXME: The tests require additional software that has not been
4499 ;; packaged yet, such as
4500 ;; * org.apache.maven
4501 ;; * org.apache.felix
4502 (add-after 'enter-dir 'delete-tests
4503 (lambda _ (delete-file-recursively "src/test") #t)))))
4505 `(("java-osgi-core" ,java-osgi-core)
4506 ("java-hamcrest-core" ,java-hamcrest-core)
4507 ("java-junit" ,java-junit)))
4508 (home-page "http://logging.apache.org/log4j/2.x/")
4509 (synopsis "API module of the Log4j logging framework for Java")
4511 "This package provides the API module of the Log4j logging framework for
4513 (license license:asl2.0)))
4515 (define-public java-log4j-core
4517 (inherit java-log4j-api)
4518 (name "java-log4j-core")
4520 `(("java-osgi-core" ,java-osgi-core)
4521 ("java-hamcrest-core" ,java-hamcrest-core)
4522 ("java-log4j-api" ,java-log4j-api)
4523 ("java-mail" ,java-mail)
4524 ("java-jboss-jms-api-spec" ,java-jboss-jms-api-spec)
4525 ("java-lmax-disruptor" ,java-lmax-disruptor)
4526 ("java-kafka" ,java-kafka-clients)
4527 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
4528 ("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
4529 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
4530 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)
4531 ("java-fasterxml-jackson-dataformat-xml" ,java-fasterxml-jackson-dataformat-xml)
4532 ("java-fasterxml-jackson-dataformat-yaml" ,java-fasterxml-jackson-dataformat-yaml)
4533 ("java-commons-compress" ,java-commons-compress)
4534 ("java-commons-csv" ,java-commons-csv)
4535 ("java-jeromq" ,java-jeromq)
4536 ("java-junit" ,java-junit)))
4538 `(("hamcrest" ,java-hamcrest-all)
4539 ("java-commons-io" ,java-commons-io)
4540 ("java-commons-lang3" ,java-commons-lang3)
4541 ("slf4j" ,java-slf4j-api)))
4543 `(#:tests? #f ; tests require more dependencies
4544 #:test-dir "src/test"
4545 #:source-dir "src/main/java"
4546 #:jar-name "log4j-core.jar"
4549 (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out")
4552 (modify-phases %standard-phases
4553 (add-after 'unpack 'enter-dir
4554 (lambda _ (chdir "log4j-core") #t)))))
4555 (synopsis "Core component of the Log4j framework")
4556 (description "This package provides the core component of the Log4j
4557 logging framework for Java.")))
4559 (define-public java-log4j-1.2-api
4561 (inherit java-log4j-api)
4562 (name "java-log4j-1.2-api")
4564 `(#:jar-name "java-log4j-1.2-api.jar"
4565 #:source-dir "log4j-1.2-api/src/main/java"
4567 ;; Tests require maven-model (and other maven subprojects), which is a
4568 ;; cyclic dependency.
4571 `(("log4j-api" ,java-log4j-api)
4572 ("log4j-core" ,java-log4j-core)
4573 ("osgi-core" ,java-osgi-core)
4574 ("eclipse-osgi" ,java-eclipse-osgi)
4575 ("java-lmax-disruptor" ,java-lmax-disruptor)))))
4577 (define-public java-commons-cli
4579 (name "java-commons-cli")
4583 (uri (string-append "mirror://apache/commons/cli/source/"
4584 "commons-cli-" version "-src.tar.gz"))
4587 "1fkjn552i12vp3xxk21ws4p70fi0lyjm004vzxsdaz7gdpgyxxyl"))))
4588 (build-system ant-build-system)
4591 `(#:jar-name "commons-cli.jar"))
4593 `(("java-junit" ,java-junit)
4594 ("java-hamcrest-core" ,java-hamcrest-core)))
4595 (home-page "http://commons.apache.org/cli/")
4596 (synopsis "Command line arguments and options parsing library")
4597 (description "The Apache Commons CLI library provides an API for parsing
4598 command line options passed to programs. It is also able to print help
4599 messages detailing the options available for a command line tool.
4601 Commons CLI supports different types of options:
4604 @item POSIX like options (ie. tar -zxvf foo.tar.gz)
4605 @item GNU like long options (ie. du --human-readable --max-depth=1)
4606 @item Java like properties (ie. java -Djava.awt.headless=true Foo)
4607 @item Short options with value attached (ie. gcc -O2 foo.c)
4608 @item long options with single hyphen (ie. ant -projecthelp)
4611 This is a part of the Apache Commons Project.")
4612 (license license:asl2.0)))
4614 (define-public java-commons-codec
4616 (name "java-commons-codec")
4620 (uri (string-append "mirror://apache/commons/codec/source/"
4621 "commons-codec-" version "-src.tar.gz"))
4624 "1w9qg30y4s0x8gnmr2fgj4lyplfn788jqxbcz27lf5kbr6n8xr65"))))
4625 (build-system ant-build-system)
4626 (outputs '("out" "doc"))
4628 `(#:test-target "test"
4630 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
4631 (junit (assoc-ref %build-inputs "java-junit")))
4632 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
4633 (string-append "-Dhamcrest.jar=" hamcrest
4634 "/share/java/hamcrest-core.jar")
4635 ;; Do not append version to jar.
4636 "-Dfinal.name=commons-codec"))
4638 (modify-phases %standard-phases
4639 (add-after 'build 'build-javadoc ant-build-javadoc)
4640 (replace 'install (install-jars "dist"))
4641 (add-after 'install 'install-doc (install-javadoc "dist/docs/api")))))
4643 `(("java-junit" ,java-junit)
4644 ("java-hamcrest-core" ,java-hamcrest-core)))
4645 (home-page "http://commons.apache.org/codec/")
4646 (synopsis "Common encoders and decoders such as Base64, Hex, Phonetic and URLs")
4647 (description "The codec package contains simple encoder and decoders for
4648 various formats such as Base64 and Hexadecimal. In addition to these widely
4649 used encoders and decoders, the codec package also maintains a collection of
4650 phonetic encoding utilities.
4652 This is a part of the Apache Commons Project.")
4653 (license license:asl2.0)))
4655 (define-public java-commons-daemon
4657 (name "java-commons-daemon")
4661 (uri (string-append "mirror://apache/commons/daemon/source/"
4662 "commons-daemon-" version "-src.tar.gz"))
4665 "0ci46kq8jpz084ccwq0mmkahcgsmh20ziclp2jf5i0djqv95gvhi"))))
4666 (build-system ant-build-system)
4668 `(#:test-target "test"
4670 (modify-phases %standard-phases
4671 (add-after 'build 'build-javadoc ant-build-javadoc)
4672 (replace 'install (install-jars "dist"))
4673 (add-after 'install 'install-doc (install-javadoc "dist/docs/api")))))
4675 `(("java-junit" ,java-junit)))
4676 (home-page "http://commons.apache.org/daemon/")
4677 (synopsis "Library to launch Java applications as daemons")
4678 (description "The Daemon package from Apache Commons can be used to
4679 implement Java applications which can be launched as daemons. For example the
4680 program will be notified about a shutdown so that it can perform cleanup tasks
4681 before its process of execution is destroyed by the operation system.
4683 This package contains the Java library. You will also need the actual binary
4684 for your architecture which is provided by the jsvc package.
4686 This is a part of the Apache Commons Project.")
4687 (license license:asl2.0)))
4689 (define-public java-javaewah
4691 (name "java-javaewah")
4695 (uri (string-append "https://github.com/lemire/javaewah/"
4696 "archive/JavaEWAH-" version ".tar.gz"))
4699 "1n7j1r1h24wlhwv9zdcj6yqjrhma2ixwyzm15l5vrv6yqjs6753b"))))
4700 (build-system ant-build-system)
4701 (arguments `(#:jar-name "javaewah.jar"))
4703 `(("java-junit" ,java-junit)
4704 ("java-hamcrest-core" ,java-hamcrest-core)))
4705 (home-page "https://github.com/lemire/javaewah")
4706 (synopsis "Compressed alternative to the Java @code{BitSet} class")
4707 (description "This is a word-aligned compressed variant of the Java
4708 @code{Bitset} class. It provides both a 64-bit and a 32-bit RLE-like
4709 compression scheme. It can be used to implement bitmap indexes.
4711 The goal of word-aligned compression is not to achieve the best compression,
4712 but rather to improve query processing time. Hence, JavaEWAH tries to save CPU
4713 cycles, maybe at the expense of storage. However, the EWAH scheme is always
4714 more efficient storage-wise than an uncompressed bitmap (as implemented in the
4715 @code{BitSet} class by Sun).")
4716 ;; GPL2.0 derivates are explicitly allowed.
4717 (license license:asl2.0)))
4719 (define-public java-slf4j-api
4721 (name "java-slf4j-api")
4725 (uri (string-append "https://www.slf4j.org/dist/slf4j-"
4729 "13j51sgzmhhdrfa74gkal5zpip7r1440dh7zsi2c8bpb2zs1v8kb"))
4730 (modules '((guix build utils)))
4731 ;; Delete bundled jars.
4734 (for-each delete-file (find-files "." "\\.jar$"))
4736 (build-system ant-build-system)
4738 `(#:jar-name "slf4j-api.jar"
4739 #:source-dir "slf4j-api/src/main"
4740 #:test-dir "slf4j-api/src/test"
4742 (modify-phases %standard-phases
4743 (add-after 'build 'regenerate-jar
4745 ;; pom.xml ignores these files in the jar creation process. If we don't,
4746 ;; we get the error "This code should have never made it into slf4j-api.jar"
4747 (delete-file-recursively "build/classes/org/slf4j/impl")
4748 (zero? (system* "jar" "-cf" "build/jar/slf4j-api.jar" "-C"
4749 "build/classes" "."))))
4750 (add-before 'check 'dont-test-abstract-classes
4752 ;; abstract classes are not meant to be run with junit
4753 (substitute* "build.xml"
4754 (("<include name=\"\\*\\*/\\*Test.java\" />")
4755 (string-append "<include name=\"**/*Test.java\" />"
4756 "<exclude name=\"**/MultithreadedInitializationTest"
4757 ".java\" />"))))))))
4759 `(("java-junit" ,java-junit)
4760 ("java-hamcrest-core" ,java-hamcrest-core)))
4761 (home-page "https://www.slf4j.org/")
4762 (synopsis "Simple logging facade for Java")
4763 (description "The Simple Logging Facade for Java (SLF4J) serves as a
4764 simple facade or abstraction for various logging
4765 frameworks (e.g. @code{java.util.logging}, @code{logback}, @code{log4j})
4766 allowing the end user to plug in the desired logging framework at deployment
4768 (license license:expat)))
4770 (define-public java-slf4j-simple
4772 (name "java-slf4j-simple")
4774 (source (package-source java-slf4j-api))
4775 (build-system ant-build-system)
4777 `(#:jar-name "slf4j-simple.jar"
4778 #:source-dir "slf4j-simple/src/main"
4779 #:test-dir "slf4j-simple/src/test"
4781 (modify-phases %standard-phases
4782 ;; The tests need some test classes from slf4j-api
4783 (add-before 'check 'build-slf4j-api-test-helpers
4785 ;; Add current dir to CLASSPATH ...
4787 (string-append (getcwd) ":" (getenv "CLASSPATH")))
4788 ;; ... and build test helper classes here:
4792 ,@(find-files "slf4j-api/src/test" ".*\\.java")))))))))
4794 `(("java-junit" ,java-junit)
4795 ("java-hamcrest-core" ,java-hamcrest-core)
4796 ("java-slf4j-api" ,java-slf4j-api)))
4797 (home-page "https://www.slf4j.org/")
4798 (synopsis "Simple implementation of simple logging facade for Java")
4799 (description "SLF4J binding for the Simple implementation, which outputs
4800 all events to System.err. Only messages of level INFO and higher are
4802 (license license:expat)))
4804 (define-public antlr2
4810 (uri (string-append "http://www.antlr2.org/download/antlr-"
4814 "1ffvcwdw73id0dk6pj2mlxjvbg0662qacx4ylayqcxgg381fnfl5"))
4815 (modules '((guix build utils)))
4818 (delete-file "antlr.jar")
4819 (substitute* "lib/cpp/antlr/CharScanner.hpp"
4823 "#define EOF (-1)\n"
4824 "#include <strings.h>")))
4825 (substitute* "configure"
4828 (build-system gnu-build-system)
4830 `(#:tests? #f ; no test target
4831 #:imported-modules ((guix build ant-build-system)
4832 (guix build syscalls)
4833 ,@%gnu-build-system-modules)
4834 #:modules (((guix build ant-build-system) #:prefix ant:)
4835 (guix build gnu-build-system)
4838 (modify-phases %standard-phases
4839 (add-after 'install 'strip-jar-timestamps
4840 (assoc-ref ant:%standard-phases 'strip-jar-timestamps))
4841 (add-after 'configure 'fix-bin-ls
4843 (substitute* (find-files "." "Makefile")
4849 ("java" ,icedtea "jdk")))
4851 `(("java" ,icedtea)))
4852 (home-page "http://www.antlr2.org")
4853 (synopsis "Framework for constructing recognizers, compilers, and translators")
4854 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
4855 is a language tool that provides a framework for constructing recognizers,
4856 compilers, and translators from grammatical descriptions containing Java, C#,
4857 C++, or Python actions. ANTLR provides excellent support for tree construction,
4858 tree walking, and translation.")
4859 (license license:public-domain)))
4861 (define-public java-stringtemplate-3
4863 (name "java-stringtemplate")
4867 (uri (string-append "https://github.com/antlr/website-st4/raw/"
4868 "gh-pages/download/stringtemplate-"
4872 "086yj68np1vqhkj7483diz3km6s6y4gmwqswa7524a0ca6vxn2is"))))
4873 (build-system ant-build-system)
4875 `(#:jar-name (string-append ,name "-" ,version ".jar")
4877 #:modules ((guix build ant-build-system)
4881 (modify-phases %standard-phases
4882 (add-before 'check 'fix-tests
4884 (substitute* "build.xml"
4885 (("\\$\\{test.home\\}/java")
4886 "${test.home}/org"))
4888 (add-before 'build 'generate-grammar
4890 (with-directory-excursion "src/org/antlr/stringtemplate/language/"
4891 (every (lambda (file)
4892 (format #t "~a\n" file)
4893 (zero? (system* "antlr" file)))
4894 '("template.g" "angle.bracket.template.g" "action.g"
4895 "eval.g" "group.g" "interface.g"))))))))
4898 ("java-junit" ,java-junit)))
4899 (home-page "http://www.stringtemplate.org")
4900 (synopsis "Template engine to generate formatted text output")
4901 (description "StringTemplate is a java template engine (with ports for C#,
4902 Objective-C, JavaScript, Scala) for generating source code, web pages, emails,
4903 or any other formatted text output. StringTemplate is particularly good at
4904 code generators, multiple site skins, and internationalization / localization.
4905 StringTemplate also powers ANTLR.")
4906 (license license:bsd-3)))
4908 ;; antlr3 is partially written using antlr3 grammar files. It also depends on
4909 ;; ST4 (stringtemplate4), which is also partially written using antlr3 grammar
4910 ;; files and uses antlr3 at runtime. The latest version requires a recent version
4911 ;; of antlr3 at runtime.
4912 ;; Fortunately, ST4 4.0.6 can be built with an older antlr3, and we use antlr3.3.
4913 ;; This version of ST4 is sufficient for the latest antlr3.
4914 ;; We use ST4 4.0.6 to build a boostrap antlr3 (latest version), and build
4915 ;; the latest ST4 with it. Then we build our final antlr3 that will be linked
4916 ;; against the latest ST4.
4917 ;; antlr3.3 still depends on antlr3 to generate some files, so we use an
4918 ;; even older version, antlr3.1, to generate them. Fortunately antlr3.1 uses
4919 ;; only grammar files with the antlr2 syntax.
4920 ;; So we build antlr3.1 -> antlr3.3 -> ST4.0.6 -> antlr3-bootstrap -> ST4 -> antlr3.
4922 (define-public java-stringtemplate
4923 (package (inherit java-stringtemplate-3)
4924 (name "java-stringtemplate")
4928 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/"
4930 (file-name (string-append name "-" version ".tar.gz"))
4933 "1pri8hqa95rfdkjy55icl5q1m09zwp5k67ib14abas39s4v3w087"))))
4934 (build-system ant-build-system)
4936 `(#:jar-name (string-append ,name "-" ,version ".jar")
4937 #:tests? #f ; FIXME: tests fail for unknown reasons
4939 #:modules ((guix build ant-build-system)
4943 (modify-phases %standard-phases
4944 (add-before 'check 'fix-test-target
4946 (substitute* "build.xml"
4947 (("\\$\\{test.home\\}/java") "${test.home}/")
4948 (("\\*Test.java") "Test*.java"))
4950 (add-before 'build 'generate-grammar
4952 (with-directory-excursion "src/org/stringtemplate/v4/compiler/"
4953 (every (lambda (file)
4954 (format #t "~a\n" file)
4955 (zero? (system* "antlr3" file)))
4956 '("STParser.g" "Group.g" "CodeGenerator.g"))))))))
4958 `(("antlr3" ,antlr3-bootstrap)
4960 ("java-stringtemplate" ,java-stringtemplate-3)
4961 ("java-junit" ,java-junit)))))
4963 (define java-stringtemplate-4.0.6
4964 (package (inherit java-stringtemplate)
4965 (name "java-stringtemplate")
4969 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/ST-"
4971 (file-name (string-append name "-" version ".tar.gz"))
4974 "0hjmh1ahdsh3w825i67mli9l4nncc4l6hdbf9ma91jvlj590sljp"))))
4976 `(("antlr3" ,antlr3-3.3)
4978 ("java-stringtemplate" ,java-stringtemplate-3)))))
4980 (define-public antlr3
4986 (uri (string-append "https://github.com/antlr/antlr3/archive/"
4988 (file-name (string-append name "-" version ".tar.gz"))
4991 "0218v683081lg54z9hvjxinhxd4dqp870jx6n39gslm0bkyi4vd6"))))
4992 (build-system ant-build-system)
4994 `(#:jar-name (string-append ,name "-" ,version ".jar")
4995 #:source-dir "tool/src/main/java:runtime/Java/src/main/java:tool/src/main/antlr3"
4998 (modify-phases %standard-phases
4999 (add-after 'install 'bin-install
5000 (lambda* (#:key inputs outputs #:allow-other-keys)
5001 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
5002 (bin (string-append (assoc-ref outputs "out") "/bin")))
5004 (with-output-to-file (string-append bin "/antlr3")
5007 (string-append "#!" (which "sh") "\n"
5008 "java -cp " jar "/" ,name "-" ,version ".jar:"
5010 (find-files (assoc-ref inputs "stringtemplate")
5014 (find-files (assoc-ref inputs "stringtemplate4")
5018 (find-files (string-append
5019 (assoc-ref inputs "antlr")
5022 " org.antlr.Tool $*"))))
5023 (chmod (string-append bin "/antlr3") #o755))))
5024 (add-before 'build 'generate-grammar
5026 (chdir "tool/src/main/antlr3/org/antlr/grammar/v3/")
5027 (for-each (lambda (file)
5030 (system* "antlr3" file))
5031 '("ANTLR.g" "ANTLRTreePrinter.g" "ActionAnalysis.g"
5032 "AssignTokenTypesWalker.g"
5033 "ActionTranslator.g" "TreeToNFAConverter.g"
5034 "ANTLRv3.g" "ANTLRv3Tree.g" "LeftRecursiveRuleWalker.g"
5035 "CodeGenTreeWalker.g" "DefineGrammarItemsWalker.g"))
5036 (substitute* "ANTLRParser.java"
5037 (("public Object getTree") "public GrammarAST getTree"))
5038 (substitute* "ANTLRv3Parser.java"
5039 (("public Object getTree") "public CommonTree getTree"))
5040 (chdir "../../../../../java")
5041 (system* "antlr" "-o" "org/antlr/tool"
5042 "org/antlr/tool/serialize.g")
5043 (substitute* "org/antlr/tool/LeftRecursiveRuleAnalyzer.java"
5044 (("import org.antlr.grammar.v3.\\*;") "import org.antlr.grammar.v3.*;
5045 import org.antlr.grammar.v3.ANTLRTreePrinter;"))
5046 (substitute* "org/antlr/tool/ErrorManager.java"
5047 (("case NO_SUCH_ATTRIBUTE_PASS_THROUGH:") ""))
5048 (chdir "../../../..")))
5049 (add-before 'build 'fix-build-xml
5051 (substitute* "build.xml"
5052 (("<exec") "<copy todir=\"${classes.dir}\">
5053 <fileset dir=\"tool/src/main/resources\">
5054 <include name=\"**/*.stg\"/>
5055 <include name=\"**/*.st\"/>
5056 <include name=\"**/*.sti\"/>
5057 <include name=\"**/STLexer.tokens\"/>
5059 </copy><exec")))))))
5062 ("antlr3" ,antlr3-bootstrap)))
5064 `(("junit" ,java-junit)
5065 ("stringtemplate" ,java-stringtemplate-3)
5066 ("stringtemplate4" ,java-stringtemplate)))
5068 `(("stringtemplate" ,java-stringtemplate-3)
5070 ("stringtemplate4" ,java-stringtemplate-4.0.6)))
5071 (home-page "http://www.antlr3.org")
5072 (synopsis "Framework for constructing recognizers, compilers, and translators")
5073 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
5074 is a language tool that provides a framework for constructing recognizers,
5075 compilers, and translators from grammatical descriptions containing Java, C#,
5076 C++, or Python actions. ANTLR provides excellent support for tree construction,
5077 tree walking, and translation.")
5078 (license license:bsd-3)))
5080 (define antlr3-bootstrap
5083 (name "antlr3-bootstrap")
5086 ("antlr3" ,antlr3-3.3)))
5088 `(("junit" ,java-junit)))))
5097 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
5098 "gh-pages/download/antlr-"
5102 "0qgg5vgsm4l1d6dj9pfbaa25dpv2ry2gny8ajy4vvgvfklw97b3m"))))
5104 `(#:jar-name (string-append ,name "-" ,version ".jar")
5105 #:source-dir (string-join '("tool/src/main/java"
5106 "runtime/Java/src/main/java"
5107 "tool/src/main/antlr2"
5108 "tool/src/main/antlr3")
5110 #:tests? #f ; FIXME: tests seem to require maven plugin
5111 #:modules ((guix build ant-build-system)
5115 (modify-phases %standard-phases
5116 (add-after 'install 'bin-install
5117 (lambda* (#:key inputs outputs #:allow-other-keys)
5118 (let* ((out (assoc-ref outputs "out"))
5119 (jar (string-append out "/share/java"))
5120 (bin (string-append out "/bin")))
5122 (with-output-to-file (string-append bin "/antlr3")
5126 "#!" (which "sh") "\n"
5127 "java -cp " jar "/antlr3-3.3.jar:"
5129 (append (find-files (assoc-ref inputs "java-stringtemplate")
5131 (find-files (string-append (assoc-ref inputs "antlr")
5135 " org.antlr.Tool $*"))))
5136 (chmod (string-append bin "/antlr3") #o755)
5138 (add-before 'build 'generate-grammar
5140 (substitute* "tool/src/main/java/org/antlr/tool/Grammar.java"
5141 (("import org.antlr.grammar.v2.\\*;")
5142 "import org.antlr.grammar.v2.*;\n
5143 import org.antlr.grammar.v2.TreeToNFAConverter;\n
5144 import org.antlr.grammar.v2.DefineGrammarItemsWalker;\n
5145 import org.antlr.grammar.v2.ANTLRTreePrinter;"))
5147 (with-directory-excursion "tool/src/main/antlr2/org/antlr/grammar/v2/"
5148 (every (lambda (file)
5149 (format #t "~a\n" file)
5150 (zero? (system* "antlr" file)))
5151 '("antlr.g" "antlr.print.g" "assign.types.g"
5152 "buildnfa.g" "codegen.g" "define.g")))
5153 (with-directory-excursion "tool/src/main/antlr3/org/antlr/grammar/v3/"
5154 (every (lambda (file)
5155 (format #t "~a\n" file)
5156 (zero? (system* "antlr3" file)))
5157 '("ActionAnalysis.g" "ActionTranslator.g" "ANTLRv3.g"
5158 "ANTLRv3Tree.g"))))))
5159 (add-before 'build 'fix-build-xml
5161 (substitute* "build.xml"
5162 (("<exec") "<copy todir=\"${classes.dir}\">
5163 <fileset dir=\"tool/src/main/resources\">
5164 <include name=\"**/*.stg\"/>
5165 <include name=\"**/*.st\"/>
5166 <include name=\"**/*.sti\"/>
5167 <include name=\"**/STLexer.tokens\"/>
5173 ("antlr3" ,antlr3-3.1)))
5175 `(("junit" ,java-junit)))
5177 `(("java-stringtemplate" ,java-stringtemplate-3)
5179 ("antlr3" ,antlr3-3.1)))))
5188 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
5189 "gh-pages/download/antlr-"
5193 "0sfimc9cpbgrihz4giyygc8afgpma2c93yqpwb951giriri6x66z"))))
5195 `(#:jar-name (string-append ,name "-" ,version ".jar")
5196 #:source-dir "src:runtime/Java/src"
5199 (modify-phases %standard-phases
5200 (add-after 'install 'bin-install
5201 (lambda* (#:key inputs outputs #:allow-other-keys)
5202 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
5203 (bin (string-append (assoc-ref outputs "out") "/bin")))
5205 (with-output-to-file (string-append bin "/antlr3")
5208 (string-append "#!" (which "sh") "\n"
5209 "java -cp " jar "/antlr3-3.1-3.1.jar:"
5211 (find-files (assoc-ref inputs "stringtemplate")
5215 (find-files (string-append
5216 (assoc-ref inputs "antlr")
5219 " org.antlr.Tool $*"))))
5220 (chmod (string-append bin "/antlr3") #o755))))
5221 (add-before 'build 'generate-grammar
5223 (let ((dir "src/org/antlr/tool/"))
5224 (for-each (lambda (file)
5227 (system* "antlr" "-o" dir (string-append dir file)))
5228 '("antlr.g" "antlr.print.g" "assign.types.g"
5229 "buildnfa.g" "define.g")))
5230 (format #t "codegen.g\n")
5231 (system* "antlr" "-o" "src/org/antlr/codegen"
5232 "src/org/antlr/codegen/codegen.g")))
5233 (add-before 'build 'fix-build-xml
5235 (substitute* "build.xml"
5236 (("<exec") "<copy todir=\"${classes.dir}\">
5237 <fileset dir=\"src\">
5238 <include name=\"**/*.stg\"/>
5239 <include name=\"**/*.st\"/>
5240 <include name=\"**/*.sti\"/>
5241 <include name=\"**/STLexer.tokens\"/>
5243 </copy><exec")))))))
5245 `(("antlr" ,antlr2)))
5247 `(("junit" ,java-junit)))
5249 `(("stringtemplate" ,java-stringtemplate-3)))))
5251 (define-public java-commons-cli-1.2
5252 ;; This is a bootstrap dependency for Maven2.
5254 (inherit java-commons-cli)
5258 (uri (string-append "mirror://apache/commons/cli/source/"
5259 "commons-cli-" version "-src.tar.gz"))
5262 "0rvfgzgv2pc1m091dfj3ih9ddsjjppr1f1wf0qmc3bk6b1kwv2dm"))))
5264 `(#:jar-name "commons-cli.jar"
5266 (modify-phases %standard-phases
5267 (add-before 'check 'fix-build-xml
5268 (lambda* (#:key inputs #:allow-other-keys)
5269 (substitute* "build.xml"
5270 (("dir=\"\\$\\{test.home\\}/java\"")
5271 "dir=\"${test.home}\""))
5274 `(("java-junit" ,java-junit)))))
5276 (define-public java-microemulator-cldc
5278 (name "java-microemulator-cldc")
5282 (uri (string-append "https://github.com/barteo/microemu/archive/"
5284 (string-map (lambda (c) (if (char=? c #\.) #\_ c))
5287 (file-name (string-append name "-" version ".tar.gz"))
5290 "1x1apmz38gkppxnwnygwmi12j54v4p258v8ddzn6dldkk7vak1ll"))))
5291 (build-system ant-build-system)
5293 `(#:jar-name "microemulator-cldc.jar"
5294 #:source-dir "microemu-cldc/src/main/java"
5295 #:tests? #f)); Requires even older software
5296 (home-page "https://github.com/barteo/microemu")
5297 (synopsis "J2ME CLDC emulator")
5298 (description "Microemulator is a Java 2 Micro Edition (J2ME) CLDC/MIDP
5299 Emulator. It allows to demonstrate MIDlet based applications in web browser
5300 applet and can be run as a standalone java application.")
5301 (license (list license:asl2.0
5303 license:lgpl2.1+))))
5305 (define-public java-datanucleus-javax-persistence
5307 (name "java-datanucleus-javax-persistence")
5311 (uri (string-append "https://github.com/datanucleus/"
5312 "javax.persistence/archive/javax.persistence-"
5313 version "-release.tar.gz"))
5316 "11jx0fjwgc2hhbqqgdd6m1pf2fplf9vslppygax0y1z5csnqjhpx"))))
5317 (build-system ant-build-system)
5319 `(#:jar-name "java-datanucleus-javax-persistence.jar"
5321 #:source-dir "src/main/java"
5322 #:tests? #f)); no tests
5323 (home-page "https://github.com/datanucleus/javax.persistence")
5324 (synopsis "JPA API")
5325 (description "This package contains a clean definition of JPA API intended
5326 for use with DataNucleus JPA since the JCP haven't provided an official JPA API
5327 jar. See @url{http://java.net/projects/jpa-spec/downloads} for the specification
5328 used to generate this API.")
5329 (license (list license:edl1.0 license:epl1.0))))
5331 (define-public java-osgi-cmpn
5333 (name "java-osgi-cmpn")
5337 (uri (string-append "http://central.maven.org/maven2/"
5338 "org/osgi/osgi.cmpn/" version "/osgi.cmpn-"
5339 version "-sources.jar"))
5342 "1lmb6xyrmkqdhv1kayf0514rlwq6ypvs4m44ibrck3snp8241wys"))))
5343 (build-system ant-build-system)
5345 `(#:jar-name "osgi-cmpn.jar"
5346 #:tests? #f)); no tests
5348 `(("annotation" ,java-osgi-annotation)
5349 ("core" ,java-osgi-core)
5350 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
5351 ("microemulator" ,java-microemulator-cldc)
5352 ("servlet" ,java-classpathx-servletapi)))
5353 (home-page "https://www.osgi.org")
5354 (synopsis "Compendium specification module of OSGi framework")
5356 "OSGi, for Open Services Gateway initiative framework, is a module system
5357 and service platform for the Java programming language. This package contains
5358 the compendium specification module, providing interfaces and classes for use
5359 in compiling bundles.")
5360 (license license:asl2.0)))
5362 (define-public java-osgi-service-component-annotations
5364 (name "java-osgi-service-component-annotations")
5368 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
5369 "org.osgi.service.component.annotations/"
5370 version "/org.osgi.service.component.annotations-"
5371 version "-sources.jar"))
5374 "15rq9cmp4fpn74q44m4j35qsqmjf5lx3hcrk6pzvbhc08igic2f0"))))
5375 (build-system ant-build-system)
5377 `(#:jar-name "osgi-service-component-annotations.jar"
5378 #:tests? #f)); no tests
5380 `(("annotation" ,java-osgi-annotation)))
5381 (home-page "https://www.osgi.org")
5382 (synopsis "Support annotations for osgi-service-component")
5384 "OSGi, for Open Services Gateway initiative framework, is a module system
5385 and service platform for the Java programming language. This package contains
5386 the support annotations for osgi-service-component.")
5387 (license license:asl2.0)))
5389 (define-public java-osgi-dto
5391 (name "java-osgi-dto")
5395 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
5396 "org.osgi.dto/" version "/org.osgi.dto-"
5397 version "-sources.jar"))
5400 "0f4bqjzadn0hwk6sd3h5gvbyfp3yci1s6r0v770cc15p0pg627yr"))))
5401 (build-system ant-build-system)
5403 `(#:jar-name "osgi-dto.jar"
5404 #:tests? #f)); no tests
5406 `(("annotation" ,java-osgi-annotation)))
5407 (home-page "https://www.osgi.org")
5408 (synopsis "Data Transfer Objects")
5410 "OSGi, for Open Services Gateway initiative framework, is a module system
5411 and service platform for the Java programming language. This package contains
5412 the Data Transfer Objects. It is easily serializable having only public fields
5413 of primitive types and their wrapper classes, Strings, and DTOs. List, Set,
5414 Map and array aggregates may also be used. The aggregates must only hold
5415 objects of the listed types or aggregates.")
5416 (license license:asl2.0)))
5418 (define-public java-osgi-resource
5420 (name "java-osgi-resource")
5424 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
5425 "org.osgi.resource/"
5426 version "/org.osgi.resource-"
5427 version "-sources.jar"))
5430 "0hi0fsc5v99q22bd7lrkvpz1y0ds4w9arjldpwsrcpqvz2js7q2d"))))
5431 (build-system ant-build-system)
5433 `(#:jar-name "osgi-resource.jar"
5434 #:tests? #f)); no tests
5436 `(("annotation" ,java-osgi-annotation)
5437 ("dto" ,java-osgi-dto)))
5438 (home-page "https://www.osgi.org")
5439 (synopsis "OSGI Resource")
5441 "OSGi, for Open Services Gateway initiative framework, is a module system
5442 and service platform for the Java programming language. This package contains
5443 the definition of common types in osgi packages.")
5444 (license license:asl2.0)))
5446 (define-public java-osgi-namespace-contract
5448 (name "java-osgi-namespace-contract")
5452 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
5453 "org.osgi.namespace.contract/"
5454 version "/org.osgi.namespace.contract-"
5455 version "-sources.jar"))
5458 "1iz4f2i0fvqrlq90ki9nfzcfpvy2av434ri25bglywqssx8mmp36"))))
5459 (build-system ant-build-system)
5461 `(("resource" ,java-osgi-resource)
5462 ("annotation" ,java-osgi-annotation)))
5464 `(#:jar-name "osgi-namespace-contract.jar"
5465 #:tests? #f)); no tests
5466 (home-page "https://www.osgi.org")
5467 (synopsis "Contract Capability and Requirement Namespace")
5469 "OSGi, for Open Services Gateway initiative framework, is a module system
5470 and service platform for the Java programming language. This package contains
5471 the names for the attributes and directives for a namespace with contracts.")
5472 (license license:asl2.0)))
5474 (define-public java-osgi-namespace-extender
5476 (name "java-osgi-namespace-extender")
5480 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
5481 "org.osgi.namespace.extender/"
5482 version "/org.osgi.namespace.extender-"
5483 version "-sources.jar"))
5486 "0jgqiak2i05qv6j3gd33xlaifzzc0ylxxk376v2x0apfg3vvixmz"))))
5487 (build-system ant-build-system)
5489 `(("resource" ,java-osgi-resource)
5490 ("annotation" ,java-osgi-annotation)))
5492 `(#:jar-name "osgi-namespace-extendent.jar"
5493 #:tests? #f)); no tests
5494 (home-page "https://www.osgi.org")
5495 (synopsis "Extender Capability and Requirement Namespace")
5497 "OSGi, for Open Services Gateway initiative framework, is a module system
5498 and service platform for the Java programming language. This package contains
5499 the names for the attributes and directives for an extender namespace.")
5500 (license license:asl2.0)))
5502 (define-public java-osgi-namespace-service
5504 (name "java-osgi-namespace-service")
5508 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
5509 "org.osgi.namespace.service/"
5510 version "/org.osgi.namespace.service-"
5511 version "-sources.jar"))
5514 "0qmw8n2449nkmm56d1znz9zhazb6ya3vsimd5bf5jg23zzhgl8c8"))))
5515 (build-system ant-build-system)
5517 `(("resource" ,java-osgi-resource)
5518 ("annotation" ,java-osgi-annotation)))
5520 `(#:jar-name "osgi-namespace-service.jar"
5521 #:tests? #f)); no tests
5522 (home-page "https://www.osgi.org")
5523 (synopsis "Service Capability and Requirement Namespace")
5525 "OSGi, for Open Services Gateway initiative framework, is a module system
5526 and service platform for the Java programming language. This package contains
5527 the names for the attributes and directives for a service namespace.")
5528 (license license:asl2.0)))
5530 (define-public java-osgi-util-function
5532 (name "java-osgi-util-function")
5536 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
5537 "org.osgi.util.function/"
5538 version "/org.osgi.util.function-"
5539 version "-sources.jar"))
5542 "04l7j3hwmmj28w23m7paca0afzncs42j2mdr3liqq8kvp548sc6x"))))
5543 (build-system ant-build-system)
5545 `(#:jar-name "osgi-util-function.jar"
5546 #:tests? #f)); no tests
5548 `(("annotation" ,java-osgi-annotation)))
5549 (home-page "https://www.osgi.org")
5550 (synopsis "OSGI Util Function")
5552 "OSGi, for Open Services Gateway initiative framework, is a module system
5553 and service platform for the Java programming language. This package contains
5554 an interface for a function that accepts a single argument and produces a result.")
5555 (license license:asl2.0)))
5557 (define-public java-osgi-util-promise
5559 (name "java-osgi-util-promise")
5563 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
5564 "org.osgi.util.promise/"
5565 version "/org.osgi.util.promise-"
5566 version "-sources.jar"))
5569 "0y34dwiflg1c4ahvkswpf9z02xph2sr9fm04ia5493x3lshpw22c"))))
5570 (build-system ant-build-system)
5572 `(#:jar-name "osgi-util-promise.jar"
5573 #:tests? #f)); no tests
5575 `(("annotation" ,java-osgi-annotation)
5576 ("function" ,java-osgi-util-function)))
5577 (home-page "https://www.osgi.org")
5578 (synopsis "Promise of a value")
5580 "OSGi, for Open Services Gateway initiative framework, is a module system
5581 and service platform for the Java programming language. This package contains
5582 an interface and utilitary classes for promises. A Promise represents a future
5583 value. It handles the interactions for asynchronous processing.")
5584 (license license:asl2.0)))
5586 (define-public java-osgi-service-metatype-annotations
5588 (name "java-osgi-service-metatype-annotations")
5592 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
5593 "org.osgi.service.metatype.annotations/"
5594 version "/org.osgi.service.metatype.annotations-"
5595 version "-sources.jar"))
5598 "12rwm3349wk80vm88rcdgs4435m4jxkpkj5mrx326skkz2c6hyw6"))))
5599 (build-system ant-build-system)
5601 `(#:jar-name "osgi-service-metatype-annotations.jar"
5602 #:tests? #f)); no tests
5604 `(("annotation" ,java-osgi-annotation)))
5605 (home-page "https://www.osgi.org")
5606 (synopsis "Support annotations for metatype")
5608 "OSGi, for Open Services Gateway initiative framework, is a module system
5609 and service platform for the Java programming language. This package contains
5610 the support annotations for metatype.")
5611 (license license:asl2.0)))
5613 (define-public java-osgi-service-repository
5615 (name "java-osgi-service-repository")
5619 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
5620 "org.osgi.service.repository/"
5621 version "/org.osgi.service.repository-"
5622 version "-sources.jar"))
5625 "1k41mhg7b58pd8nsghr2qwcjrxdnf1p9spsw9v11k4257g6rl06n"))))
5626 (build-system ant-build-system)
5628 `(#:jar-name "osgi-service-repository.jar"
5629 #:tests? #f)); no tests
5631 `(("annotation" ,java-osgi-annotation)
5632 ("promise" ,java-osgi-util-promise)
5633 ("resource" ,java-osgi-resource)))
5634 (home-page "https://www.osgi.org")
5635 (synopsis "OSGI service repository")
5637 "OSGi, for Open Services Gateway initiative framework, is a module system
5638 and service platform for the Java programming language. This package contains
5639 a repository service that contains resources.")
5640 (license license:asl2.0)))
5642 (define-public java-osgi-framework
5644 (name "java-osgi-framework")
5648 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
5649 "org.osgi.framework/" version "/org.osgi.framework-"
5650 version "-sources.jar"))
5653 "1lwp2zfad3rybcc6q9bwz8xsgkc92ypzy5p6x54387f1qj65m73s"))))
5654 (build-system ant-build-system)
5656 `(#:jar-name "osgi-framework.jar"
5657 #:tests? #f)); no tests
5659 `(("annotation" ,java-osgi-annotation)
5660 ("resource" ,java-osgi-resource)
5661 ("dto" ,java-osgi-dto)))
5662 (home-page "https://www.osgi.org")
5663 (synopsis "OSGi framework")
5665 "OSGi, for Open Services Gateway initiative framework, is a module system
5666 and service platform for the Java programming language.")
5667 (license license:asl2.0)))
5669 (define-public java-osgi-service-log
5671 (name "java-osgi-service-log")
5675 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
5676 "org.osgi.service.log/"
5677 version "/org.osgi.service.log-"
5678 version "-sources.jar"))
5681 "1029j30dzcwializzca0j3fkhwwz08kmmsha5agw1iccscimj6r0"))))
5682 (build-system ant-build-system)
5684 `(#:jar-name "osgi-service-log.jar"
5685 #:tests? #f)); no tests
5687 `(("java-osgi-framework" ,java-osgi-framework)))
5688 (home-page "https://www.osgi.org")
5689 (synopsis "Provides methods for bundles to write messages to the log")
5691 "OSGi, for Open Services Gateway initiative framework, is a module system
5692 and service platform for the Java programming language. This package contains
5694 (license license:asl2.0)))
5696 (define-public java-osgi-service-jdbc
5698 (name "java-osgi-service-jdbc")
5702 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
5703 "org.osgi.service.jdbc/"
5704 version "/org.osgi.service.jdbc-"
5705 version "-sources.jar"))
5708 "11iln5v7bk469cgb9ddkrz9sa95b3733gqgaqw9xf5g6wq652yjz"))))
5709 (build-system ant-build-system)
5711 `(#:jar-name "osgi-service-jdbc.jar"
5712 #:tests? #f)); no tests
5713 (home-page "https://www.osgi.org")
5714 (synopsis "Factory for JDBC connection factories")
5716 "OSGi, for Open Services Gateway initiative framework, is a module system
5717 and service platform for the Java programming language. This package contains
5718 a factory for JDBC connection factories. There are 3 preferred connection
5719 factories for getting JDBC connections:
5722 @item @code{javax.sql.DataSource};
5723 @item @code{javax.sql.ConnectionPoolDataSource};
5724 @item @code{javax.sql.XADataSource}.
5726 (license license:asl2.0)))
5728 (define-public java-osgi-service-resolver
5730 (name "java-osgi-service-resolver")
5734 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
5735 "org.osgi.service.resolver/"
5736 version "/org.osgi.service.resolver-"
5737 version "-sources.jar"))
5740 "1dzqn1ryfi2rq4zwsgp44bmj2wlfydjg1qbxw2b0z4xdjjy55vxd"))))
5741 (build-system ant-build-system)
5743 `(#:jar-name "osgi-service-resolver.jar"
5744 #:tests? #f)); no tests
5746 `(("annotation" ,java-osgi-annotation)
5747 ("resource" ,java-osgi-resource)))
5748 (home-page "https://www.osgi.org")
5749 (synopsis "OSGI Resolver service")
5751 "OSGi, for Open Services Gateway initiative framework, is a module system
5752 and service platform for the Java programming language. This package contains
5753 a resolver service that resolves the specified resources in the context supplied
5755 (license license:asl2.0)))
5757 (define-public java-osgi-util-tracker
5759 (name "java-osgi-util-tracker")
5763 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
5764 "org.osgi.util.tracker/"
5765 version "/org.osgi.util.tracker-"
5766 version "-sources.jar"))
5769 "0c4fh9vxwzsx59r8dygda0gq2gx3z5vfhc3jsphlqwf5w0h403lz"))))
5770 (build-system ant-build-system)
5772 `(#:jar-name "osgi-util-tracker.jar"
5773 #:tests? #f)); no tests
5775 `(("framework" ,java-osgi-framework)
5776 ("annotation" ,java-osgi-annotation)))
5777 (home-page "https://www.osgi.org")
5778 (synopsis "Bundle tracking")
5780 "OSGi, for Open Services Gateway initiative framework, is a module system
5781 and service platform for the Java programming language. This package contains
5782 bundle tracking utility classes.")
5783 (license license:asl2.0)))
5785 (define-public java-osgi-service-cm
5787 (name "java-osgi-service-cm")
5791 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
5792 "org.osgi.service.cm/"
5793 version "/org.osgi.service.cm-"
5794 version "-sources.jar"))
5797 "1z8kap48y3xi0ggj8v6czglfnpnd94mmismgi2wbqhj1nl5fzbp6"))))
5798 (build-system ant-build-system)
5800 `(#:jar-name "osgi-service-cm.jar"
5801 #:tests? #f)); no tests
5803 `(("framework" ,java-osgi-framework)
5804 ("annotation" ,java-osgi-annotation)))
5805 (home-page "https://www.osgi.org")
5806 (synopsis "OSGI Configuration Management")
5808 "OSGi, for Open Services Gateway initiative framework, is a module system
5809 and service platform for the Java programming language. This package contains
5810 utility classes for the configuration of services.")
5811 (license license:asl2.0)))
5813 (define-public java-osgi-service-packageadmin
5815 (name "java-osgi-service-packageadmin")
5819 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
5820 "org.osgi.service.packageadmin/"
5821 version "/org.osgi.service.packageadmin-"
5822 version "-sources.jar"))
5825 "041mpxzi7g36wmcily6y4ccn3jx15akpdy8gmhyb7m98x7qfvn52"))))
5826 (build-system ant-build-system)
5828 `(#:jar-name "osgi-service-packageadmin.jar"
5829 #:tests? #f)); no tests
5831 `(("framework" ,java-osgi-framework)))
5832 (home-page "https://www.osgi.org")
5833 (synopsis "OSGI Package Administration")
5835 "OSGi, for Open Services Gateway initiative framework, is a module system
5836 and service platform for the Java programming language. This package contains
5837 the packageadmin service.")
5838 (license license:asl2.0)))
5840 (define-public java-ops4j-base-lang
5842 (name "java-ops4j-base-lang")
5846 (uri (string-append "https://github.com/ops4j/org.ops4j.base/"
5847 "archive/base-" version ".tar.gz"))
5850 "18hl3lpchgpv8yh5rlk39l2gif5dlfgb8gxjmncf39pr2dprkniw"))))
5851 (build-system ant-build-system)
5853 `(#:jar-name "java-ops4j-base-lang.jar"
5854 #:source-dir "ops4j-base-lang/src/main/java"
5855 #:tests? #f; no tests
5857 (modify-phases %standard-phases
5858 (add-before 'build 'add-test-file
5860 ;; That file is required by a test in ops4j-pax-exam-core-spi
5861 (mkdir-p "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang")
5862 (with-output-to-file "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang/pom.properties"
5866 "version=" ,version "\n"
5867 "groupId=org.ops4j.base"
5868 "artifactId=ops4j-base-lang\n")))))))))
5869 (home-page "https://ops4j1.jira.com/wiki/spaces/base/overview")
5870 (synopsis "Utility classes and extensions to be used in OPS4J projects")
5871 (description "OPS4J stands for Open Participation Software for Java. This
5872 package contains utilities and extensions related to @code{java.lang}.")
5873 (license license:asl2.0)))
5875 (define-public java-ops4j-base-monitors
5877 (inherit java-ops4j-base-lang)
5878 (name "java-ops4j-base-monitors")
5880 `(#:jar-name "java-ops4j-base-monitors.jar"
5881 #:source-dir "ops4j-base-monitors/src/main/java"
5882 #:tests? #f)); no tests
5884 `(("lang" ,java-ops4j-base-lang)))
5885 (description "OPS4J stands for Open Participation Software for Java. This
5886 package contains utilities and extensions related to monitoring.")))
5888 (define-public java-ops4j-base-io
5890 (inherit java-ops4j-base-lang)
5891 (name "java-ops4j-base-io")
5893 `(#:jar-name "java-ops4j-base-io.jar"
5894 #:source-dir "ops4j-base-io/src/main/java"
5895 #:test-dir "ops4j-base-io/src/test"
5897 (list "**/ListerTest.java")))
5899 `(("lang" ,java-ops4j-base-monitors)
5900 ("lang" ,java-ops4j-base-lang)))
5902 `(("junit" ,java-junit)
5903 ("hamcrest" ,java-hamcrest-core)))
5904 (description "OPS4J stands for Open Participation Software for Java. This
5905 package contains utilities and extensions related to handling streams and files.")))
5907 (define-public java-ops4j-base-util
5909 (inherit java-ops4j-base-lang)
5910 (name "java-ops4j-base-util")
5912 `(#:jar-name "java-ops4j-base-util.jar"
5913 #:source-dir "ops4j-base-util/src/main/java"
5914 #:test-dir "ops4j-base-util/src/test"))
5916 `(("lang" ,java-ops4j-base-lang)))
5918 `(("junit" ,java-junit)))
5919 (description "OPS4J stands for Open Participation Software for Java. This
5920 package contains utilities and extensions related to environment, i18n and
5923 (define-public java-ops4j-base-util-property
5925 (inherit java-ops4j-base-lang)
5926 (name "java-ops4j-base-util-property")
5928 `(#:jar-name "java-ops4j-base-util-property.jar"
5929 #:source-dir "ops4j-base-util-property/src/main/java"
5930 #:tests? #f)); no tests
5932 `(("lang" ,java-ops4j-base-lang)
5933 ("util" ,java-ops4j-base-util)))
5934 (description "OPS4J stands for Open Participation Software for Java. This
5935 package contains utilities and extensions related to resolving properties from
5936 different sources.")))
5938 (define-public java-ops4j-base-store
5940 (inherit java-ops4j-base-lang)
5941 (name "java-ops4j-base-store")
5943 `(#:jar-name "java-ops4j-base-store.jar"
5944 #:source-dir "ops4j-base-store/src/main/java"
5945 #:tests? #f)); no tests
5947 `(("lang" ,java-ops4j-base-lang)
5948 ("slf4j" ,java-slf4j-api)
5949 ("io" ,java-ops4j-base-io)))
5950 (description "OPS4J stands for Open Participation Software for Java. This
5951 package contains utilities for storing and retrieving data from an
5952 @code{InputStream}.")))
5954 (define-public java-ops4j-base-spi
5956 (inherit java-ops4j-base-lang)
5957 (name "java-ops4j-base-spi")
5959 `(#:jar-name "java-ops4j-base-spi.jar"
5960 #:source-dir "ops4j-base-spi/src/main/java"
5961 #:test-dir "ops4j-base-spi/src/test"))
5963 `(("junit" ,java-junit)
5964 ("hamcrest" ,java-hamcrest-core)))
5965 (description "OPS4J stands for Open Participation Software for Java. This
5966 package contains utilities for obtaining services via the Java SE 6
5967 @code{ServiceLoader}.")))
5969 (define-public java-aqute-bnd-annotation
5971 (name "java-aqute-bnd-annotation")
5975 (uri (string-append "https://github.com/bndtools/bnd/archive/"
5976 version ".REL.tar.gz"))
5977 (file-name (string-append name "-" version ".tar.gz"))
5980 "09vgb6axikbz66zi9falijbnzh1qnp9ysfns123dmzdb01cbza9q"))))
5981 (build-system ant-build-system)
5983 `(#:jar-name "java-aqute-bnd-annotation.jar"
5984 #:source-dir "biz.aQute.bnd.annotation/src"
5985 #:tests? #f)); empty test dir
5986 (home-page "http://bnd.bndtools.org/")
5987 (synopsis "Tools for OSGi")
5988 (description "Bnd is a swiss army knife for OSGi, it creates manifest
5989 headers based on analyzing the class code, it verifies the project settings,
5990 it manages project dependencies, gives diffs jars, and much more.")
5991 (license license:asl2.0)))
5993 (define-public java-aqute-libg
5995 (inherit java-aqute-bnd-annotation)
5996 (name "java-aqute-libg")
5998 `(#:jar-name "java-aqute-libg.jar"
5999 #:source-dir "aQute.libg/src"
6000 #:tests? #f)); FIXME: tests are in "aQute.libg/test", not in a java directory
6002 `(("slf4j" ,java-slf4j-api)
6003 ("osgi-annot" ,java-osgi-annotation)
6004 ("java-osgi-cmpn" ,java-osgi-cmpn)
6005 ("osgi" ,java-osgi-core)))))
6007 (define-public java-aqute-bndlib
6009 (inherit java-aqute-bnd-annotation)
6010 (name "java-aqute-bndlib")
6012 `(#:jar-name "java-bndlib.jar"
6013 #:source-dir "biz.aQute.bndlib/src"
6014 #:tests? #f)); no tests
6016 `(("slf4j" ,java-slf4j-api)
6017 ("osgi-annot" ,java-osgi-annotation)
6018 ("java-aqute-libg" ,java-aqute-libg)
6019 ("java-aqute-bnd-annotation" ,java-aqute-bnd-annotation)
6020 ("java-osgi-service-component-annotations" ,java-osgi-service-component-annotations)
6021 ("java-osgi-service-repository" ,java-osgi-service-repository)
6022 ("java-osgi-service-log" ,java-osgi-service-log)
6023 ("java-osgi-service-metatype-annotations" ,java-osgi-service-metatype-annotations)
6024 ("java-osgi-namespace-contract" ,java-osgi-namespace-contract)
6025 ("java-osgi-namespace-extender" ,java-osgi-namespace-extender)
6026 ("java-osgi-namespace-service" ,java-osgi-namespace-service)
6027 ("promise" ,java-osgi-util-promise)
6028 ("osgi" ,java-osgi-core)))))
6030 (define-public java-ops4j-pax-tinybundles
6032 (name "java-ops4j-pax-tinybundles")
6036 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.tinybundles/"
6037 "archive/tinybundles-" version ".tar.gz"))
6040 "0y0gq3pvv0iir2b885lmlwnvr724vv7vklzhhr4fs27d7mdkj871"))))
6042 `(#:jar-name "java-ops4j-pax-tinybundles.jar"
6043 #:source-dir "src/main/java"
6045 ;; Abstract base classes for other tests
6046 (list "**/BndTest.java" "**/CoreTest.java")
6048 (modify-phases %standard-phases
6049 (add-before 'check 'fix-version
6051 ;; This test has a reference to an old version of bndlib we are not
6052 ;; packaging. It uses the version referenced in pom.xml. We replace
6053 ;; it with our own version.
6054 (substitute* "src/test/java/org/ops4j/pax/tinybundles/bnd/BndTest.java"
6055 (("2.4.0.201411031534") "3.4.0")))))))
6057 `(("lang" ,java-ops4j-base-lang)
6058 ("io" ,java-ops4j-base-io)
6059 ("store" ,java-ops4j-base-store)
6060 ("slf4j" ,java-slf4j-api)
6061 ("libg" ,java-aqute-libg)
6062 ("bndlib" ,java-aqute-bndlib)))
6064 `(("junit" ,java-junit)
6065 ("hamcrest" ,java-hamcrest-core)
6066 ("log4j" ,java-log4j-api)
6067 ("bndannotation" ,java-aqute-bnd-annotation)
6068 ("framework" ,java-osgi-framework)))
6069 (build-system ant-build-system)
6070 (home-page "https://ops4j1.jira.com/wiki/spaces/ops4j/pages/12060312/Tinybundles")
6071 (synopsis "Java APIs to create OSGi related artifacts")
6072 (description "Tinybundles is all about creating OSGi related artifacts like
6073 Bundles, Fragments and Deployment Packages with Java Api. It is very convinient
6074 to create such artifacts on-the-fly inside Tests (like in Pax Exam). On the
6075 other hand, this library can be a foundation of real end user tools that need
6076 to create those artifacts.")
6077 (license license:asl2.0)))
6079 (define-public java-ops4j-pax-exam-core
6081 (name "java-ops4j-pax-exam-core")
6085 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.exam2/"
6086 "archive/exam-reactor-" version ".tar.gz"))
6089 "08mzw8nkah3rj3vznlplnawspxhp61zgvb44ifqa1rni1cvbms2g"))))
6091 `(#:jar-name "java-ops4j-pax-exam-core.jar"
6092 #:source-dir "core/pax-exam/src/main/java"
6093 #:test-dir "core/pax-exam/src/test"))
6095 `(("slf4j" ,java-slf4j-api)
6096 ("lang" ,java-ops4j-base-lang)
6097 ("io" ,java-ops4j-base-io)
6098 ("util-property" ,java-ops4j-base-util-property)
6099 ("util-store" ,java-ops4j-base-store)
6100 ("java-osgi-core" ,java-osgi-core)))
6102 `(("junit" ,java-junit)
6103 ("hamcrest" ,java-hamcrest-core)))
6104 (build-system ant-build-system)
6105 (home-page "https://ops4j1.jira.com/wiki/spaces/PAXEXAM4/overview")
6106 (synopsis "In-Container Testing for OSGi, Java EE and CDI")
6107 (description "Pax Exam creates OSGi bundles for testing purposes. It lets
6108 the user take control of the OSGi framework, the test framework (e.g. JUnit) and
6109 the system under test at the same time.")
6110 (license license:asl2.0)))
6112 (define-public java-ops4j-pax-exam-core-spi
6114 (inherit java-ops4j-pax-exam-core)
6115 (name "java-ops4j-pax-exam-core-spi")
6117 `(#:jar-name "java-ops4j-pax-exam-spi.jar"
6118 #:source-dir "src/main/java"
6121 ;; Abstract base class, not a test
6122 "**/BaseStagedReactorTest.java"
6123 ;; Depends on org.mortbay.jetty.testwars:test-war-dump
6124 "**/WarBuilderTest.java")
6126 (modify-phases %standard-phases
6127 (add-before 'configure 'chdir
6129 ;; Tests assume we are in this directory
6130 (chdir "core/pax-exam-spi")))
6131 (add-before 'check 'fix-tests
6133 ;; One test checks that this file is present.
6134 (mkdir-p "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi")
6135 (with-output-to-file
6136 "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi/pom.properties"
6139 (string-append "artifactId = pax-exam-spi\n"
6140 "version = " ,(package-version java-ops4j-pax-exam-core-spi)))))
6141 ;; Maven puts compilation results in the target directory, while we
6142 ;; put them in the build directory.
6143 (substitute* '("src/test/java/org/ops4j/pax/exam/spi/war/WarBuilderTest.java"
6144 "src/test/java/org/ops4j/pax/exam/spi/war/WarTestProbeBuilderTest.java"
6145 "src/test/java/org/ops4j/pax/exam/spi/war/ZipBuilderTest.java")
6146 (("target") "build"))
6147 ;; One test is expected to fail, but it doesn't throw the expected exception
6148 (substitute* "src/test/java/org/ops4j/pax/exam/spi/reactors/BaseStagedReactorTest.java"
6149 (("AssertionError") "IllegalArgumentException")))))))
6151 `(("java-ops4j-pax-exam-core" ,java-ops4j-pax-exam-core)
6152 ("lang" ,java-ops4j-base-lang)
6153 ("monitors" ,java-ops4j-base-monitors)
6154 ("store" ,java-ops4j-base-store)
6155 ("io" ,java-ops4j-base-io)
6156 ("spi" ,java-ops4j-base-spi)
6157 ("osgi" ,java-osgi-core)
6158 ("slf4j" ,java-slf4j-api)
6159 ("tinybundles" ,java-ops4j-pax-tinybundles)))
6161 `(("mockito" ,java-mockito-1)
6162 ("junit" ,java-junit)
6163 ("hamcrest" ,java-hamcrest-core)
6164 ("cglib" ,java-cglib)
6165 ("objenesis" ,java-objenesis)
6166 ("asm" ,java-asm)))))
6168 (define-public java-ops4j-pax-exam-core-junit
6170 (inherit java-ops4j-pax-exam-core)
6171 (name "java-ops4j-pax-exam-core-junit")
6173 `(#:jar-name "ops4j-pax-exam-core-junit.jar"
6174 #:source-dir "drivers/pax-exam-junit4/src/main/java"
6175 #:tests? #f)); no tests
6177 `(("junit" ,java-junit)
6178 ("slf4j" ,java-slf4j-api)
6179 ("core" ,java-ops4j-pax-exam-core)
6180 ("spi" ,java-ops4j-pax-exam-core-spi)))
6181 (native-inputs '())))
6183 (define-public java-fasterxml-jackson-annotations
6185 (name "java-fasterxml-jackson-annotations")
6189 (uri (string-append "https://github.com/FasterXML/"
6190 "jackson-annotations/archive/"
6191 "jackson-annotations-" version ".tar.gz"))
6194 "0b4wdxjxfbl3gkilylfdbl7fzimfpyih676jiwdf19i4056j8lqw"))))
6195 (build-system ant-build-system)
6197 `(#:jar-name "jackson-annotations.jar"
6198 #:source-dir "src/main/java"
6199 #:test-dir "src/test"))
6201 `(("junit" ,java-junit)))
6202 (home-page "https://github.com/FasterXML/jackson-annotations")
6203 (synopsis "General purpose annotations for the Jackson Data Processor")
6204 (description "This package contains general purpose annotations for the
6205 Jackson Data Processor, used on value and handler types. The only annotations
6206 not included are ones that require dependency to the Databind package.")
6207 (license license:asl2.0)))
6209 (define-public java-fasterxml-jackson-core
6211 (name "java-fasterxml-jackson-core")
6215 (uri (string-append "https://github.com/FasterXML/"
6216 "jackson-core/archive/"
6217 "jackson-core-" version ".tar.gz"))
6220 "0q2d6qnylyxj5jh0sam1b095b5486f7ipzhxgwcgbm254ls7fqc1"))))
6221 (build-system ant-build-system)
6223 `(#:jar-name "jackson-core.jar"
6224 #:source-dir "src/main/java"
6225 #:test-dir "src/test"
6228 ;; Expected failure. pom.xml excludes these
6230 ;; Base classes that have no constructor for junit
6232 "**/ConcurrencyReadTest.java"
6233 "**/ManualCharAccessTest.java"
6234 "**/ManualCharAccessTest.java"
6235 "**/TrailingCommasTest.java"
6236 "**/AsyncMissingValuesInObjectTest.java"
6237 "**/AsyncMissingValuesInArrayTest.java")
6239 (modify-phases %standard-phases
6240 (add-before 'configure 'generate-PackageVersion.java
6242 (let* ((out "src/main/java/com/fasterxml/jackson/core/json/PackageVersion.java")
6243 (in (string-append out ".in")))
6246 (("@package@") "com.fasterxml.jackson.core.json")
6247 (("@projectversion@") ,version)
6248 (("@projectgroupid@") "com.fasterxml.jackson.core")
6249 (("@projectartifactid@") "jackson-core")))))
6250 (add-before 'build 'copy-resources
6252 (copy-recursively "src/main/resources"
6254 (add-before 'check 'copy-test-resources
6256 (copy-recursively "src/test/resources"
6257 "build/test-classes"))))))
6259 `(("junit" ,java-junit)
6260 ("hamcrest" ,java-hamcrest-core)))
6261 (home-page "https://github.com/FasterXML/jackson-core")
6264 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
6266 (define-public java-fasterxml-jackson-databind
6268 (name "java-fasterxml-jackson-databind")
6272 (uri (string-append "https://github.com/FasterXML/"
6273 "jackson-databind/archive/"
6274 "jackson-databind-" version ".tar.gz"))
6277 "1d5ns8ypqhdy8d94i8q560ip9kka6q8lhnk6q7nfh2g9mr22cc4w"))))
6278 (build-system ant-build-system)
6280 `(#:jar-name "jackson-databind.jar"
6281 #:source-dir "src/main/java"
6282 #:tests? #f; requires javax.measures for which I can't find a free implementation
6284 (modify-phases %standard-phases
6285 (add-before 'configure 'generate-PackageVersion.java
6287 (let* ((out "src/main/java/com/fasterxml/jackson/databind/cfg/PackageVersion.java")
6288 (in (string-append out ".in")))
6291 (("@package@") "com.fasterxml.jackson.databind.cfg")
6292 (("@projectversion@") ,version)
6293 (("@projectgroupid@") "com.fasterxml.jackson.databind")
6294 (("@projectartifactid@") "jackson-databind")))))
6295 (add-before 'build 'copy-resources
6297 (copy-recursively "src/main/resources" "build/classes"))))))
6299 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
6300 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)))
6301 (home-page "https://github.com/FasterXML/jackson-databind")
6302 (synopsis "Data-binding functionality and tree-model for the Jackson Data Processor")
6303 (description "This package contains the general-purpose data-binding
6304 functionality and tree-model for Jackson Data Processor. It builds on core
6305 streaming parser/generator package, and uses Jackson Annotations for
6307 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
6309 (define-public java-fasterxml-jackson-modules-base-jaxb
6311 (name "java-fasterxml-jackson-modules-base-jaxb")
6315 (uri (string-append "https://github.com/FasterXML/"
6316 "jackson-modules-base/archive/"
6317 "jackson-modules-base-" version ".tar.gz"))
6320 "0kc19n5a188g4vpyay44xfb7qcabcbfnwzhx1g84lg0sac8lf0ng"))))
6321 (build-system ant-build-system)
6323 `(#:jar-name "jackson-modules-base-jaxb.jar"
6324 #:source-dir "jaxb/src/main/java"
6325 #:test-dir "jaxb/src/test"
6327 ;; Base class for tests
6328 (list "**/BaseJaxbTest.java")
6330 (modify-phases %standard-phases
6331 (add-before 'configure 'generate-PackageVersion.java
6333 (let* ((out (string-append "jaxb/src/main/java/com/fasterxml/"
6334 "jackson/module/jaxb/PackageVersion.java"))
6335 (in (string-append out ".in")))
6338 (("@package@") "com.fasterxml.jackson.module.jaxb")
6339 (("@projectversion@") ,version)
6340 (("@projectgroupid@") "com.fasterxml.jackson.module.jaxb")
6341 (("@projectartifactid@") "jackson-module-jaxb")))))
6342 (add-before 'build 'copy-resources
6344 (copy-recursively "jaxb/src/main/resources" "build/classes"))))))
6346 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
6347 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
6348 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)))
6350 `(("java-junit" ,java-junit)))
6351 (home-page "https://github.com/FasterXML/jackson-modules-base")
6352 (synopsis "Jaxb annotations jackson module")
6353 (description "This package is the jaxb annotations module for jackson.")
6354 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
6356 (define-public java-snakeyaml
6358 (name "java-snakeyaml")
6362 (uri (string-append "https://bitbucket.org/asomov/snakeyaml/get/v"
6366 "0rf5ha6w0waz50jz2479jsrbgmd0dnx0gs337m126j5z7zlmg7mg"))))
6367 (build-system ant-build-system)
6369 `(#:jar-name "java-snakeyaml.jar"
6370 #:source-dir "src/main/java"
6371 ;; Tests require velocity, a cyclic dependency, and
6372 ;; java-spring-framework-context which is not packaged.
6374 (home-page "https://bitbucket.org/asomov/snakeyaml")
6375 (synopsis "YAML processor")
6376 (description "SnakeYAML is a YAML processor for the Java Virtual Machine.")
6377 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
6379 (define-public java-fasterxml-jackson-dataformat-yaml
6381 (name "java-fasterxml-jackson-dataformat-yaml")
6385 (uri (string-append "https://github.com/FasterXML/"
6386 "jackson-dataformats-text/archive/"
6387 "jackson-dataformats-text-" version ".tar.gz"))
6390 "1x7c7v201jpb8ynjsmmq7jj7hyqzzp39jvpr053ggdndm022yzc7"))))
6391 (build-system ant-build-system)
6393 `(#:jar-name "jackson-dataformat-yaml.jar"
6394 #:source-dir "yaml/src/main/java"
6395 #:test-dir "yaml/src/test"
6396 #:test-exclude (list "**/failing/**.java")
6398 (modify-phases %standard-phases
6399 (add-before 'configure 'generate-PackageVersion.java
6401 (let* ((out "yaml/src/main/java/com/fasterxml/jackson/dataformat/yaml/PackageVersion.java")
6402 (in (string-append out ".in")))
6405 (("@package@") "com.fasterxml.jackson.dataformat.yaml")
6406 (("@projectversion@") ,version)
6407 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.yaml")
6408 (("@projectartifactid@") "jackson-dataformat-yaml"))))))))
6410 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
6411 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
6412 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)
6413 ("java-snakeyaml" ,java-snakeyaml)))
6415 `(("junit" ,java-junit)
6416 ("hamcrest" ,java-hamcrest-core)
6417 ("java-ops4j-pax-exam-core-spi" ,java-ops4j-pax-exam-core-spi)
6418 ("java-ops4j-pax-exam-core-junit" ,java-ops4j-pax-exam-core-junit)
6419 ("java-ops4j-pax-exam" ,java-ops4j-pax-exam-core)))
6420 (home-page "https://github.com/FasterXML/jackson-dataformats-text")
6421 (synopsis "Yaml backend for Jackson")
6422 (description "Dataformat backends are used to support format alternatives
6423 to JSON, supported by default. This is done by sub-classing Jackson core
6425 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
6427 (define-public java-stax2-api
6429 (name "java-stax2-api")
6433 (uri (string-append "https://github.com/FasterXML/stax2-api/archive/"
6434 "stax2-api-" version ".tar.gz"))
6437 "1amc1si0l0hyyw2sawmnzy4hkna3z6fp195y4nm5m9wb9ld5awkq"))))
6438 (build-system ant-build-system)
6440 `(#:jar-name "java-stax2-api.jar"
6441 #:source-dir "src/main/java"
6442 #:tests? #f)); no tests
6443 (home-page "https://github.com/FasterXML/stax2-api")
6444 (synopsis "Stax2 API")
6445 (description "Stax2 API is an extension to basic Stax 1.0 API that adds
6446 significant new functionalities, such as full-featured bi-direction validation
6447 interface and high-performance Typed Access API.")
6448 (license license:bsd-2)))
6450 (define-public java-woodstox-core
6452 (name "java-woodstox-core")
6456 (uri (string-append "https://github.com/FasterXML/woodstox/archive/"
6457 "woodstox-core-" version ".tar.gz"))
6460 "1i7pdgb8jbw6gdy5kmm0l6rz109n2ns92pqalpyp24vb8vlvdfd4"))))
6461 (build-system ant-build-system)
6463 `(#:jar-name "woodstox.jar"
6465 (list "**/Base*.java" "failing/**")
6467 (modify-phases %standard-phases
6468 (add-before 'build 'remove-msv-dep
6470 ;; we don't need osgi, and it depends on msv
6471 (delete-file-recursively "src/main/java/com/ctc/wstx/osgi")
6472 ;; msv's latest release is from 2011 and we don't need it
6473 (delete-file-recursively "src/main/java/com/ctc/wstx/msv")
6474 (delete-file-recursively "src/test/java/wstxtest/osgi")
6475 (delete-file-recursively "src/test/java/wstxtest/msv")))
6476 (add-before 'build 'copy-resources
6478 (copy-recursively "src/main/resources" "build/classes"))))))
6480 `(("stax2" ,java-stax2-api)))
6482 `(("junit" ,java-junit)))
6483 (home-page "https://github.com/FasterXML/woodstox")
6484 (synopsis "Stax XML API implementation")
6485 (description "Woodstox is a stax XML API implementation.")
6486 (license license:asl2.0)))
6488 (define-public java-fasterxml-jackson-dataformat-xml
6490 (name "java-fasterxml-jackson-dataformat-xml")
6494 (uri (string-append "https://github.com/FasterXML/"
6495 "jackson-dataformat-xml/archive/"
6496 "jackson-dataformat-xml-" version ".tar.gz"))
6499 "1j1qanvcdh6afagr67zqrlypjkf0n6wr1qzpbvkw79lii72j6pbr"))))
6500 (build-system ant-build-system)
6502 `(#:jar-name "jackson-dataformat-xml.jar"
6503 #:source-dir "src/main/java"
6505 (list "**/failing/**")
6507 (modify-phases %standard-phases
6508 (add-before 'configure 'generate-PackageVersion.java
6510 (let* ((out "src/main/java/com/fasterxml/jackson/dataformat/xml/PackageVersion.java")
6511 (in (string-append out ".in")))
6515 (("@package@") "com.fasterxml.jackson.dataformat.xml")
6516 (("@projectversion@") ,version)
6517 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.xml")
6518 (("@projectartifactid@") "jackson-dataformat-xml")))))
6519 (add-before 'build 'copy-resources
6521 (copy-recursively "src/main/resources" "build/classes"))))))
6523 `(("jackson-annotations" ,java-fasterxml-jackson-annotations)
6524 ("jackson-core" ,java-fasterxml-jackson-core)
6525 ("jackson-modules-base-jaxb" ,java-fasterxml-jackson-modules-base-jaxb)
6526 ("jackson-databind" ,java-fasterxml-jackson-databind)
6527 ("stax2-api" ,java-stax2-api)
6528 ("woodstox" ,java-woodstox-core)))
6530 `(("junit" ,java-junit)
6531 ("hamcrest" ,java-hamcrest-core)))
6532 (home-page "https://github.com/FasterXML/jackson-dataformat-xml")
6533 (synopsis "Read and write XML")
6534 (description "This package contains Jackson extension component for reading
6535 and writing XML encoded data.
6537 Further, the goal is to emulate how JAXB data-binding works with \"Code-first\"
6538 approach (that is, no support is added for \"Schema-first\" approach). Support
6539 for JAXB annotations is provided by JAXB annotation module; this module
6540 provides low-level abstractions (@code{JsonParser}, @code{JsonGenerator},
6541 @code{JsonFactory}) as well as small number of higher level overrides needed to
6542 make data-binding work.")
6543 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
6545 (define-public java-hdrhistogram
6547 (name "java-hdrhistogram")
6551 (uri (string-append "https://github.com/HdrHistogram/HdrHistogram/"
6552 "archive/HdrHistogram-" version ".tar.gz"))
6555 "1sicbmc3sr42nw93qbkb26q9rn33ag33k6k77phjc3j5h5gjffqv"))))
6556 (build-system ant-build-system)
6558 `(#:jar-name "java-hdrhistogram.jar"
6559 #:source-dir "src/main/java"
6561 (modify-phases %standard-phases
6562 (add-before 'configure 'set-version
6564 (let* ((version-java "src/main/java/org/HdrHistogram/Version.java")
6565 (template (string-append version-java ".template")))
6566 (copy-file template version-java)
6567 (substitute* version-java
6568 (("\\$VERSION\\$") ,version)
6569 (("\\$BUILD_TIME\\$") "0"))
6572 `(("junit" ,java-junit)
6573 ("hamcrest" ,java-hamcrest-core)))
6574 (home-page "https://hdrhistogram.github.io/HdrHistogram")
6575 (synopsis "High dynamic range histogram")
6576 (description "Hdrhistogram allows to create histograms that support
6577 recording and analyzing sampled data value counts across a configurable integer
6578 value range with configurable value precision within the range. Value precision
6579 is expressed as the number of significant digits in the value recording, and
6580 provides control over value quantization behavior across the value range and
6581 the subsequent value resolution at any given level.")
6582 (license license:public-domain)))
6584 (define-public java-cofoja
6586 (name "java-cofoja")
6591 (url "https://github.com/nhatminhle/cofoja.git")
6592 (commit (string-append "v" version))))
6593 (file-name (string-append "java-cofoja-" version "-checkout"))
6596 "0p7sz8y5xgpi5rx1qwn6587fkd52qr3ha3ybh14gqcyxhikl525w"))))
6597 (build-system ant-build-system)
6599 `(#:build-target "dist"
6600 #:test-target "test"
6603 (list "-Ddist.dir=dist")
6604 #:modules ((guix build ant-build-system)
6605 (guix build java-utils)
6610 (modify-phases %standard-phases
6611 ;; The bulid system ignores the class path the ant-build-system sets
6612 ;; up and instead expects to find all dependencies in the "lib"
6614 (add-after 'unpack 'create-libdir
6615 (lambda* (#:key inputs #:allow-other-keys)
6619 (let ((target (string-append "lib/" (basename file))))
6620 (unless (file-exists? target)
6621 (symlink file target))))
6622 (append-map (match-lambda
6624 (find-files dir "\\.jar$")))
6627 (replace 'install (install-jars "dist")))))
6629 `(("java-asm" ,java-asm)))
6631 `(("java-junit" ,java-junit)))
6632 (home-page "https://github.com/nhatminhle/cofoja")
6633 (synopsis "Contracts for Java")
6634 (description "Contracts for Java, or Cofoja for short, is a contract
6635 programming framework and test tool for Java, which uses annotation processing
6636 and bytecode instrumentation to provide run-time checking. (In particular,
6637 this is not a static analysis tool.)")
6638 (license license:lgpl3+)))
6640 (define-public java-aopalliance
6642 (name "java-aopalliance")
6646 ;; Note: this git repository is not official, but contains the
6647 ;; source code that is in the CVS repository. Downloading the
6648 ;; tarball from sourceforge is undeterministic, and the cvs download
6651 (url "https://github.com/hoverruan/aopalliance")
6652 (commit "0d7757ae204e5876f69431421fe9bc2a4f01e8a0")))
6653 (file-name (string-append name "-" version))
6656 "0rsg2b0v3hxlq2yk1i3m2gw3xwq689j3cwx9wbxvqfpdcjbca0qr"))))
6657 (build-system ant-build-system)
6659 `(#:jar-name "java-aopalliance.jar"
6661 #:tests? #f; no tests
6662 #:source-dir "aopalliance/src/main"))
6663 (home-page "http://aopalliance.sourceforge.net")
6664 (synopsis "Aspect-Oriented Programming")
6665 (description "The AOP Alliance project is a joint project between several
6666 software engineering people who are interested in Aspect-Oriented Programming
6668 (license license:public-domain)))
6670 (define-public java-javax-inject
6672 (name "java-javax-inject")
6676 (uri (string-append "https://github.com/javax-inject/javax-inject/"
6677 "archive/javax.inject-" version ".tar.gz"))
6680 "1ydrlvh2r7vr1g7lhjwy3w2dggpj9h6pix1lakkkgdywb365n6g0"))))
6681 (build-system ant-build-system)
6683 `(#:jar-name "java-javax-inject.jar"
6685 #:tests? #f)); no tests
6686 (home-page "http://github.com/javax-inject/javax-inject")
6687 (synopsis "JSR-330: Dependency Injection for Java")
6688 (description "This package specifies a means for obtaining objects in such
6689 a way as to maximize reusability, testability and maintainability compared to
6690 traditional approaches such as constructors, factories, and service locators
6691 (e.g., JNDI). This process, known as dependency injection, is beneficial to
6692 most nontrivial applications.
6694 Many types depend on other types. For example, a @var{Stopwatch} might depend
6695 on a @var{TimeSource}. The types on which a type depends are known as its
6696 dependencies. The process of finding an instance of a dependency to use at run
6697 time is known as resolving the dependency. If no such instance can be found,
6698 the dependency is said to be unsatisfied, and the application is broken.")
6699 (license license:asl2.0)))
6701 (define-public java-guice
6707 (uri (string-append "https://github.com/google/guice/archive/"
6709 (file-name (string-append name "-" version ".tar.gz"))
6712 "0dwmqjzlavb144ywqqglj3h68hqszkff8ai0a42hyb5il0qh4rbp"))))
6713 (build-system ant-build-system)
6715 `(#:jar-name "java-guice.jar"
6717 #:tests? #f; FIXME: tests are not in a java sub directory
6718 #:source-dir "core/src"))
6720 `(("guava" ,java-guava)
6721 ("java-cglib" ,java-cglib)
6722 ("java-aopalliance" ,java-aopalliance)
6723 ("java-javax-inject" ,java-javax-inject)
6724 ("java-asm" ,java-asm)))
6725 (home-page "https://github.com/google/guice")
6726 (synopsis "Lightweight dependency injection framework")
6727 (description "Guice is a lightweight dependency injection framework fo
6729 (license license:asl2.0)))
6731 (define-public java-guice-servlet
6733 (inherit java-guice)
6734 (name "java-guice-servlet")
6736 `(#:jar-name "guice-servlet.jar"
6737 #:source-dir "extensions/servlet/src/"
6739 #:tests? #f)); FIXME: not in a java subdir
6741 `(("guice" ,java-guice)
6742 ("servlet" ,java-tomcat)
6743 ,@(package-inputs java-guice)))))
6745 (define-public java-assertj
6747 (name "java-assertj")
6751 (uri (string-append "https://github.com/joel-costigliola/"
6752 "assertj-core/archive/"
6753 "assertj-core-" version ".tar.gz"))
6756 "1kf124fxskf548rklkg86294w2x6ajqrff94rrhyqns31danqkfz"))))
6757 (build-system ant-build-system)
6759 `(#:jar-name "java-assertj.jar"
6761 #:source-dir "src/main/java"
6762 #:tests? #f)); depends on tng-junit which depends on assertj
6764 `(("cglib" ,java-cglib)
6765 ("junit" ,java-junit)
6766 ("hamcrest" ,java-hamcrest-core)))
6768 `(("mockito" ,java-mockito-1)))
6769 (home-page "https://joel-costigliola.github.io/assertj/index.html")
6770 (synopsis "Fluent assertions for java")
6771 (description "AssertJ core is a Java library that provides a fluent
6772 interface for writing assertions. Its main goal is to improve test code
6773 readability and make maintenance of tests easier.")
6774 (license license:asl2.0)))
6776 (define-public java-jboss-javassist
6778 (name "java-jboss-javassist")
6782 (uri (string-append "https://github.com/jboss-javassist/javassist/"
6784 (string-map (lambda (x) (if (eq? x #\.) #\_ x)) version)
6788 "10lpcr3sbf7y6fq6fc2h2ik7rqrivwcy4747bg0kxhwszil3cfmf"))))
6789 (build-system ant-build-system)
6791 `(#:jar-name "java-jboss-javassist.jar"
6793 #:source-dir "src/main"
6794 #:tests? #f; FIXME: requires junit-awtui and junit-swingui from junit3
6796 (modify-phases %standard-phases
6797 (add-before 'configure 'remove-binary
6799 (delete-file "javassist.jar")
6802 `(("junit" ,java-junit)))
6803 (home-page "https://github.com/jboss-javassist/javassist")
6804 (synopsis "Java bytecode engineering toolkit")
6805 (description "Javassist (JAVA programming ASSISTant) makes Java bytecode
6806 manipulation simple. It is a class library for editing bytecodes in Java; it
6807 enables Java programs to define a new class at runtime and to modify a class
6808 file when the JVM loads it.")
6809 (license (list license:gpl2 license:cddl1.0)))); either gpl2 only or cddl.
6811 (define-public java-jcommander
6813 (name "java-jcommander")
6817 (uri (string-append "https://github.com/cbeust/jcommander/archive/"
6819 (file-name (string-append name "-" version ".tar.gz"))
6822 "1f5k2ckay6qjc3d3w3d7bc0p3cx3c7n6p6zxvw1kibqdr0q98wlx"))))
6823 (build-system ant-build-system)
6825 `(#:jar-name "java-jcommander.jar"
6827 #:tests? #f; requires testng which depends on jcommander
6828 #:source-dir "src/main/java"))
6829 (home-page "http://jcommander.org")
6830 (synopsis "Command line parameters parser")
6831 (description "JCommander is a very small Java framework that makes it
6832 trivial to parse command line parameters. Parameters are declared with
6834 (license license:asl2.0)))
6836 (define-public java-bsh
6842 (uri (string-append "https://github.com/beanshell/beanshell/archive/"
6844 (file-name (string-append name "-" version ".tar.gz"))
6847 "1bawkxk6jyc75hxvzkpz689h73cn3f222m0ar3nvb0dal2b85kfv"))))
6848 (build-system ant-build-system)
6850 `(#:build-target "jarall"
6851 #:test-target "junit-tests-all"
6853 (modify-phases %standard-phases
6855 (lambda* (#:key outputs #:allow-other-keys)
6856 (let ((share (string-append (assoc-ref outputs "out") "/share/java")))
6858 (copy-file "dist/bsh-2.0b6.jar" (string-append share "/bsh-2.0b6.jar"))
6860 (home-page "http://beanshell.org/")
6861 (synopsis "Lightweight Scripting for Java")
6862 (description "BeanShell is a small, free, embeddable Java source
6863 interpreter with object scripting language features, written in Java.
6864 BeanShell dynamically executes standard Java syntax and extends it with common
6865 scripting conveniences such as loose types, commands, and method closures like
6866 those in Perl and JavaScript.")
6867 (license license:asl2.0)))
6869 (define-public java-fest-util
6871 (name "java-fest-util")
6875 (uri (string-append "https://github.com/alexruiz/fest-util/"
6876 "archive/fest-util-" version ".tar.gz"))
6879 "05g6hljz5mdaakk8d7g32klbhz9bdwp3qlj6rdaggdidxs3x1sb8"))))
6880 (build-system ant-build-system)
6882 `(#:jar-name "java-fest-util.jar"
6883 #:source-dir "src/main/java"))
6885 `(("junit" ,java-junit)
6886 ("hamcrest" ,java-hamcrest-core)))
6887 (home-page "https://github.com/alexruiz/fest-util")
6888 (synopsis "FEST common utilities")
6889 (description "Common utilities used in all FEST module.")
6890 (license license:asl2.0)))
6892 (define-public java-fest-test
6894 (name "java-fest-test")
6898 (uri (string-append "https://github.com/alexruiz/fest-test/"
6899 "archive/fest-test-" version ".tar.gz"))
6902 "1rxfbw6l9vc65iy1x3fb617qc6y4w2k430pgf1mfbxfdlxbm0f7g"))))
6903 (build-system ant-build-system)
6905 `(#:jar-name "java-fest-test.jar"
6906 #:source-dir "src/main/java"
6907 #:tests? #f)); no tests
6909 `(("junit" ,java-junit)))
6910 (home-page "https://github.com/alexruiz/fest-test")
6911 (synopsis "Common FEST testing infrastructure")
6912 (description "Fest-test contains the common FEST testing infrastructure.")
6913 (license license:asl2.0)))
6915 (define-public java-fest-assert
6917 (name "java-fest-assert")
6921 (uri (string-append "https://github.com/alexruiz/fest-assert-2.x/"
6922 "archive/fest-assert-core-" version ".tar.gz"))
6925 "1bi0iqavikzww6rxvz5jyg7y6bflv95s6ibryxx0xfcxrrw6i5lw"))))
6926 (build-system ant-build-system)
6928 `(#:jar-name "java-fest-assert.jar"
6929 #:source-dir "src/main/java"
6934 ;; Unable to set MockitoNamingPolicy on cglib generator which creates FastClasses
6935 "**/MessageFormatter_format_Test.java"
6936 "**/internal/*/*_assert*_Test.java")))
6938 `(("java-fest-util" ,java-fest-util)))
6940 `(("java-junit" ,java-junit)
6941 ("java-fest-test" ,java-fest-test)
6942 ("java-hamcrest-core" ,java-hamcrest-core)
6943 ("java-mockito" ,java-mockito-1)
6944 ("java-cglib" ,java-cglib)
6945 ("java-objenesis" ,java-objenesis)
6946 ("java-asm" ,java-asm)))
6947 (home-page "https://github.com/alexruiz/fest-assert-2.x")
6948 (synopsis "FEST fluent assertions")
6949 (description "FEST-Assert provides a fluent interface for assertions.")
6950 (license license:asl2.0)))
6952 (define-public java-testng
6954 (name "java-testng")
6958 (uri (string-append "https://github.com/cbeust/testng/archive/"
6960 (file-name (string-append name "-" version ".tar.gz"))
6963 "01j2x47wkj7n5w6gpcjfbwgc88ai5654b23lb87w7nsrj63m3by6"))))
6964 (build-system ant-build-system)
6966 `(#:jdk ,icedtea-8; java.util.function
6967 #:jar-name "java-testng.jar"
6968 #:source-dir "src/main/java"
6970 (modify-phases %standard-phases
6971 (add-before 'build 'copy-resources
6973 (copy-recursively "src/main/resources" "build/classes")
6975 (add-before 'check 'copy-test-resources
6977 (copy-recursively "src/test/resources" "build/test-classes")
6981 (system* "ant" "compile-tests")
6982 ;; we don't have groovy
6983 (substitute* "src/test/resources/testng.xml"
6984 (("<class name=\"test.groovy.GroovyTest\" />") ""))
6985 (zero? (system* "java" "-cp" (string-append (getenv "CLASSPATH")
6987 ":build/test-classes")
6988 "-Dtest.resources.dir=src/test/resources"
6989 "org.testng.TestNG" "src/test/resources/testng.xml")))))))
6991 `(("junit" ,java-junit)
6992 ("java-jsr305" ,java-jsr305)
6993 ("java-bsh" ,java-bsh)
6994 ("java-jcommander" ,java-jcommander)
6995 ("java-guice" ,java-guice)
6996 ("snakeyaml" ,java-snakeyaml)))
6998 `(("guava" ,java-guava)
6999 ("java-javax-inject" ,java-javax-inject)
7000 ("java-hamcrest" ,java-hamcrest-all)
7001 ("java-assertj" ,java-assertj)
7002 ("cglib" ,java-cglib)
7004 ("aopalliance" ,java-aopalliance)))
7005 (home-page "http://testng.org")
7006 (synopsis "Testing framework")
7007 (description "TestNG is a testing framework inspired from JUnit and NUnit
7008 but introducing some new functionalities that make it more powerful and easier
7010 (license license:asl2.0)))
7012 (define-public java-jnacl
7019 (url "https://github.com/neilalexander/jnacl")
7020 (commit "40c322e0a42637ab17cdf941138eeaf2494055f8")))
7023 "1pspnmp44q61a2q4bpslpxw86rfn8s5l0xgvyrikqgdvg7ypx597"))))
7024 (build-system ant-build-system)
7026 `(#:jar-name "java-jnacl.jar"
7027 #:source-dir "src/main/java"
7030 (modify-phases %standard-phases
7031 (add-before 'build 'fix-tests
7033 (substitute* "src/test/java/com/neilalexander/jnacl/NaClTest.java"
7034 (("assertions.Assertions") "assertions.api.Assertions"))
7035 (substitute* "src/test/java/com/neilalexander/jnacl/NaclSecretBoxTest.java"
7036 (("assertions.Assertions") "assertions.api.Assertions"))
7040 (system* "ant" "compile-tests")
7042 (zero? (system* "java" "-cp" (string-append (getenv "CLASSPATH")
7044 ":build/test-classes")
7045 "org.testng.TestNG" "-testclass"
7046 "build/test-classes/com/neilalexander/jnacl/NaclSecretBoxTest.class"))
7047 (zero? (system* "java" "-cp" (string-append (getenv "CLASSPATH")
7049 ":build/test-classes")
7050 "org.testng.TestNG" "-testclass"
7051 "build/test-classes/com/neilalexander/jnacl/NaClTest.class"))))))))
7053 `(("java-testng" ,java-testng)
7054 ("java-fest-util" ,java-fest-util)
7055 ("java-fest-assert" ,java-fest-assert)))
7056 (home-page "https://github.com/neilalexander/jnacl")
7057 (synopsis "Java implementation of NaCl")
7058 (description "Pure Java implementation of the NaCl: Networking and
7059 Cryptography library.")
7060 (license license:mpl2.0)))
7062 (define-public java-mvel2
7068 (uri (string-append "https://github.com/mvel/mvel/archive/mvel2-"
7069 version ".Final.tar.gz"))
7072 "01ph5s9gm16l2qz58lg21w6fna7xmmrj7f9bzqr1jim7h9557d3z"))))
7073 (build-system ant-build-system)
7075 `(#:jar-name "mvel2.jar"
7076 #:source-dir "src/main/java"
7078 (list "**/Abstract*.java"
7079 ;; Base class with no tests
7080 "**/MVELThreadTest.java")
7082 (modify-phases %standard-phases
7083 (add-after 'install 'install-bin
7084 (lambda* (#:key outputs #:allow-other-keys)
7085 (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
7087 (with-output-to-file (string-append bin "/mvel2")
7091 "#!" (which "bash") "\n"
7092 "if [ \"$#\" -ne \"2\" ]; then\n"
7093 "echo 'Usage: mvel2 <script> <out.dir>'\n"
7096 "java -Dout.dir=$2 -cp " (getenv "CLASSPATH")
7097 ":" (assoc-ref outputs "out") "/share/java/mvel2.jar"
7098 " org.mvel2.sh.Main $1"))))
7099 (chmod (string-append bin "/mvel2") #o755))
7102 `(("junit" ,java-junit)
7103 ("hamcrest" ,java-hamcrest-core)))
7104 (home-page "https://github.com/mvel/mvel")
7105 (synopsis "MVFLEX Expression Language")
7106 (description "MVEL has largely been inspired by Java syntax, but has some
7107 fundamental differences aimed at making it more efficient as an expression
7108 language, such as operators that directly support collection, array and string
7109 matching, as well as regular expressions. MVEL is used to evaluate expressions
7110 written using Java syntax.
7112 In addition to the expression language, MVEL serves as a templating language for
7113 configuration and string construction.")
7114 (license license:asl2.0)))
7116 (define-public java-commons-jexl-2
7118 (name "java-commons-jexl")
7122 (uri (string-append "mirror://apache/commons/jexl/source/"
7123 "commons-jexl-" version "-src.tar.gz"))
7126 "1ai7632bwwaxglb0nbpblpr2jw5g20afrsaq372ipkphi3ncy1jz"))))
7127 (build-system ant-build-system)
7129 `(#:jar-name "commons-jexl-2.jar"
7131 #:source-dir "src/main/java"
7133 (modify-phases %standard-phases
7134 (add-before 'check 'disable-broken-tests
7135 (lambda* (#:key inputs #:allow-other-keys)
7136 (with-directory-excursion "src/test/java/org/apache/commons/jexl2/"
7137 (substitute* "ArithmeticTest.java"
7138 (("asserter.assertExpression\\(\"3 / 0\"") "//")
7139 (("asserter.assertExpression\\(\"imanull") "//"))
7140 ;; This test fails with "ambiguous method invocation"
7141 (delete-file "CacheTest.java")
7142 ;; This test doesn't have access to the temp directory
7143 (substitute* "ClassCreatorTest.java"
7144 (("java.io.tmpdir") "user.dir"))
7145 ;; This test fails in trying to detect whether it can run.
7146 (substitute* "ClassCreator.java"
7147 (("boolean canRun =.*") "boolean canRun = false;\n"))
7148 ;; ...and these tests depend on it.
7149 (delete-file "scripting/JexlScriptEngineOptionalTest.java")
7150 (delete-file "scripting/JexlScriptEngineTest.java"))
7152 (add-before 'build 'run-javacc
7154 (with-directory-excursion "src/main/java/org/apache/commons/jexl2/parser/"
7155 (and (zero? (system* "java" "jjtree" "Parser.jjt"))
7156 (zero? (system* "java" "javacc" "Parser.jj")))))))))
7158 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)))
7160 `(("java-junit" ,java-junit)
7161 ("java-hamcrest-core" ,java-hamcrest-core)
7162 ("javacc" ,javacc-4)))
7163 (home-page "https://commons.apache.org/proper/commons-jexl/")
7164 (synopsis "Java Expression Language ")
7165 (description "JEXL is a library intended to facilitate the implementation
7166 of dynamic and scripting features in applications and frameworks written in
7167 Java. JEXL implements an Expression Language based on some extensions to the
7168 JSTL Expression Language supporting most of the constructs seen in
7169 shell-script or ECMAScript. Its goal is to expose scripting features usable
7170 by technical operatives or consultants working with enterprise platforms.")
7171 (license license:asl2.0)))
7173 (define-public java-lz4
7179 (uri (string-append "https://github.com/lz4/lz4-java/archive/"
7181 (file-name (string-append name "-" version ".tar.gz"))
7184 "096dm57p2lzqk28n0j2p52x2j3cvnsd2dfqn43n7vbwrkjsy7y54"))))
7185 (build-system ant-build-system)
7187 `(#:jar-name "lz4.jar"
7189 #:source-dir "src/java:src/java-unsafe"
7190 #:tests? #f; FIXME: requires more dependencies
7192 (modify-phases %standard-phases
7193 (add-before 'configure 'generate-source
7195 (with-directory-excursion "src/build/source_templates"
7196 (zero? (system* "mvel2" "../gen_sources.mvel" "../../java"))))))))
7198 `(("mvel" ,java-mvel2)))
7199 (home-page "https://jpountz.github.io/lz4-java")
7200 (synopsis "Compression algorithm")
7201 (description "LZ4 - Java is a Java port of the popular lz4 compression
7202 algorithms and xxHash hashing algorithm.")
7203 (license license:asl2.0)))
7205 (define-public java-bouncycastle-bcprov
7207 (name "java-bouncycastle-bcprov")
7211 (uri "https://bouncycastle.org/download/bcprov-jdk15on-158.tar.gz")
7214 "1hgkg96llbvgs8i0krwz2n0j7wlg6jfnq8w8kg0cc899j0wfmf3n"))))
7215 (build-system ant-build-system)
7217 `(#:jar-name "bouncycastle-bcprov.jar"
7218 #:tests? #f; no tests
7221 (modify-phases %standard-phases
7222 (add-before 'configure 'unzip-src
7225 (with-directory-excursion "src"
7226 (zero? (system* "unzip" "../src.zip"))))))))
7229 ("junit" ,java-junit)))
7230 (home-page "https://www.bouncycastle.org")
7231 (synopsis "Cryptographic library")
7232 (description "Bouncy Castle Provider (bcprov) is a cryptographic library
7233 for the Java programming language.")
7234 (license license:expat)))
7236 (define-public java-bouncycastle-bcpkix
7238 (name "java-bouncycastle-bcpkix")
7242 (uri "https://bouncycastle.org/download/bcpkix-jdk15on-158.tar.gz")
7245 "0is7qay02803s9f7lhnfcjlz61ni3hq5d7apg0iil7nbqkbfbcq2"))))
7246 (build-system ant-build-system)
7248 `(#:jar-name "bouncycastle-bcpkix.jar"
7249 #:tests? #f; no tests
7252 (modify-phases %standard-phases
7253 (add-before 'configure 'unzip-src
7256 (with-directory-excursion "src"
7257 (zero? (system* "unzip" "../src.zip"))))))))
7260 ("junit" ,java-junit)))
7262 `(("bcprov" ,java-bouncycastle-bcprov)))
7263 (home-page "https://www.bouncycastle.org")
7264 (synopsis "Cryptographic library")
7265 (description "Bouncy Castle Java API for PKIX, CMS, EAC, TSP, PKCS, OCSP,
7267 (license license:expat)))
7269 (define-public java-lmax-disruptor
7271 (name "java-lmax-disruptor")
7275 (uri (string-append "https://github.com/LMAX-Exchange/disruptor/"
7276 "archive/" version ".tar.gz"))
7277 (file-name (string-append name "-" version ".tar.gz"))
7280 "17da2gwj5abnlsfgn2xqjk5lgzbg4vkb0hdv2dvc8r2fx4bi7w3g"))))
7281 (build-system ant-build-system)
7283 `(#:jar-name "java-lmax-disruptor.jar"
7285 #:tests? #f)); tests hang
7287 `(("junit" ,java-junit)
7288 ("java-hdrhistogram" ,java-hdrhistogram)
7289 ("java-jmock" ,java-jmock)
7290 ("java-jmock-legacy" ,java-jmock-legacy)
7291 ("java-jmock-junit4" ,java-jmock-junit4)
7292 ("java-hamcrest-all" ,java-hamcrest-all)))
7294 `(("cglib" ,java-cglib)
7295 ("objenesis" ,java-objenesis)
7297 (home-page "https://www.lmax.com/disruptor")
7298 (synopsis "High performance inter-thread communication")
7299 (description "LMAX Disruptor is a software pattern and software component
7300 for high performance inter-thread communication that avoids the need for
7301 message queues or resource locking.")
7302 (license license:asl2.0)))
7304 (define-public java-commons-bcel
7306 (name "java-commons-bcel")
7310 (uri (string-append "mirror://apache/commons/bcel/source/bcel-"
7311 version "-src.tar.gz"))
7314 "0j3x1rxd673k07psclk8k13rqh0x0mf2yy5qiwkiw4z3afa568jy"))))
7315 (build-system ant-build-system)
7317 `(#:jar-name "bcel.jar"
7319 #:source-dir "src/main/java"
7320 #:test-dir "src/test/java"
7321 ;; FIXME: Tests require the unpackaged jna.
7323 (home-page "https://commons.apache.org/proper/commons-bcel/")
7324 (synopsis "Byte code engineering library")
7325 (description "The Byte Code Engineering Library (Apache Commons BCEL) is
7326 intended to give users a convenient way to analyze, create, and
7327 manipulate (binary) Java class files. Classes are represented by objects
7328 which contain all the symbolic information of the given class: methods, fields
7329 and byte code instructions, in particular.
7331 Such objects can be read from an existing file, be transformed by a
7332 program (e.g. a class loader at run-time) and written to a file again. An
7333 even more interesting application is the creation of classes from scratch at
7334 run-time. The @dfn{Byte Code Engineering Library} (BCEL) may be also useful
7335 if you want to learn about the @dfn{Java Virtual Machine} (JVM) and the format
7336 of Java @code{.class} files.")
7337 (license license:asl2.0)))
7339 (define-public java-xerial-core
7341 (name "java-xerial-core")
7345 (uri (string-append "https://github.com/xerial/xerial-java/archive/"
7347 (file-name (string-append name "-" version ".tar.gz"))
7350 "0d3g863i41bgalpa4xr3vm1h140l091n8iwgq5qvby5yivns9y8d"))))
7351 (build-system ant-build-system)
7353 `(#:jar-name "xerial-core.jar"
7354 #:source-dir "xerial-core/src/main/java"
7355 #:test-dir "xerial-core/src/test"
7357 (modify-phases %standard-phases
7358 (add-before 'build 'copy-resources
7360 (copy-recursively "xerial-core/src/main/resources"
7364 `(("junit" ,java-junit)
7365 ("hamcrest" ,java-hamcrest-core)))
7366 (home-page "https://github.com/xerial/xerial-java")
7367 (synopsis "Data management libraries for Java")
7368 (description "Xerial is a set of data management libraries for the Java
7369 programming language. The ultimate goal of the Xerial project is to manage
7370 everything as database, including class objects, text format data, data
7372 (license license:asl2.0)))
7374 (define-public java-powermock-reflect
7376 (name "java-powermock-reflect")
7380 (uri (string-append "https://github.com/powermock/powermock/"
7381 "archive/powermock-" version ".tar.gz"))
7382 (file-name (string-append name "-" version ".tar.gz"))
7385 "0sbgi5vqq7k72wzcdjb20s370vyd4hsbnx71pzb8ishml3gy7fwy"))
7387 (search-patches "java-powermock-fix-java-files.patch"))))
7388 (build-system ant-build-system)
7390 `(#:jar-name "java-powermock-reflect.jar"
7392 #:source-dir "powermock-reflect/src/main/java"
7393 #:test-dir "powermock-reflect/src/test"))
7395 `(("java-objenesis" ,java-objenesis)))
7397 `(("junit" ,java-junit)
7398 ("cglib" ,java-cglib)
7400 ("hamcrest" ,java-hamcrest-core)
7401 ("assertj" ,java-assertj)))
7402 (home-page "https://github.com/powermock/powermock")
7403 (synopsis "Mock library extension framework")
7404 (description "PowerMock is a framework that extends other mock libraries
7405 such as EasyMock with more powerful capabilities. PowerMock uses a custom
7406 classloader and bytecode manipulation to enable mocking of static methods,
7407 constructors, final classes and methods, private methods, removal of static
7408 initializers and more. By using a custom classloader no changes need to be
7409 done to the IDE or continuous integration servers which simplifies adoption.")
7410 (license license:asl2.0)))
7412 (define-public java-powermock-core
7414 (inherit java-powermock-reflect)
7415 (name "java-powermock-core")
7417 `(#:jar-name "java-powermock-core.jar"
7418 #:source-dir "powermock-core/src/main/java"
7419 #:test-dir "powermock-core/src/test"
7420 #:tests? #f; requires powermock-api
7423 (modify-phases %standard-phases
7424 (add-before 'build 'copy-resources
7426 (copy-recursively "powermock-core/src/main/resources"
7427 "build/classes"))))))
7429 `(("reflect" ,java-powermock-reflect)
7430 ("javassist" ,java-jboss-javassist)))
7432 `(("junit" ,java-junit)
7433 ("assertj" ,java-assertj)
7434 ("mockito" ,java-mockito-1)))))
7436 (define-public java-powermock-api-support
7438 (inherit java-powermock-reflect)
7439 (name "java-powermock-api-support")
7440 (build-system ant-build-system)
7442 `(#:jar-name "java-powermock-api-support.jar"
7444 #:source-dir "powermock-api/powermock-api-support/src/main/java"
7445 #:tests? #f)); no tests
7447 `(("core" ,java-powermock-core)
7448 ("reflect" ,java-powermock-reflect)))))
7450 (define-public java-powermock-modules-junit4-common
7452 (inherit java-powermock-reflect)
7453 (name "java-powermock-modules-junit4-common")
7454 (build-system ant-build-system)
7456 `(#:jar-name "java-powermock-modules-junit4-common.jar"
7458 #:source-dir "powermock-modules/powermock-module-junit4-common/src/main/java"
7459 #:test-dir "powermock-modules/powermock-module-junit4-common/src/test"))
7461 `(("core" ,java-powermock-core)
7462 ("easymock" ,java-easymock)
7463 ("reflect" ,java-powermock-reflect)
7464 ("hamcrest" ,java-hamcrest-core)
7465 ("cglib" ,java-cglib)))))
7467 (define-public java-powermock-modules-junit4
7469 (inherit java-powermock-reflect)
7470 (name "java-powermock-modules-junit4")
7471 (build-system ant-build-system)
7473 `(#:jar-name "java-powermock-modules-junit4.jar"
7475 #:source-dir "powermock-modules/powermock-module-junit4/src/main/java"
7476 #:test-dir "powermock-modules/powermock-module-junit4/src/test"
7478 (modify-phases %standard-phases
7479 (add-before 'build 'fix-junit-detection
7481 ;; Our junit version is 4.12-SNAPSHOT
7482 (substitute* (find-files "powermock-modules/powermock-module-junit4"
7483 "PowerMockJUnit4MethodValidator.java")
7484 (("4.12") "4.12-SNAPSHOT")))))))
7486 `(("core" ,java-powermock-core)
7487 ("reflect" ,java-powermock-reflect)
7488 ("common" ,java-powermock-modules-junit4-common)
7489 ("cglib" ,java-cglib)))
7491 `(("easymock" ,java-easymock)
7492 ("hamcrest" ,java-hamcrest-core)
7493 ("objenesis" ,java-objenesis)
7495 ("junit" ,java-junit)))))
7497 (define-public java-powermock-api-easymock
7499 (inherit java-powermock-reflect)
7500 (name "java-powermock-api-easymock")
7501 (build-system ant-build-system)
7503 `(#:jar-name "java-powermock-api-easymock.jar"
7505 #:source-dir "powermock-api/powermock-api-easymock/src/main/java"
7506 #:tests? #f; no tests
7508 (modify-phases %standard-phases
7509 (add-before 'build 'fix-file
7511 ;; FIXME: This looks wrong, but it fixes a build error.
7512 (with-directory-excursion "powermock-api/powermock-api-easymock"
7513 (substitute* "src/main/java/org/powermock/api/easymock/PowerMock.java"
7514 (("classLoader instanceof MockClassLoader") "false")
7515 (("\\(\\(MockClassLoader\\) classLoader\\).*;") ";")))
7518 `(("core" ,java-powermock-core)
7519 ("easymock" ,java-easymock)
7520 ("reflect" ,java-powermock-reflect)
7521 ("support" ,java-powermock-api-support)
7522 ("cglib" ,java-cglib)))))
7524 (define-public java-jboss-jms-api-spec
7526 (name "java-jboss-jms-api-spec")
7530 (uri (string-append "https://github.com/jboss/jboss-jms-api_spec/"
7531 "archive/jboss-jms-api_" version
7532 "_spec-1.0.1.Final.tar.gz"))
7535 "07bqblw9kq2i8q92bz70fvavq5xjfkaixl8xa0m0cypjgy82rb7m"))))
7536 (build-system ant-build-system)
7538 `(#:jar-name "java-jboss-jms-api_spec.jar"
7541 #:tests? #f)); no tests
7542 (home-page "https://github.com/jboss/jboss-jms-api_spec")
7543 (synopsis "Java Message Service API specification")
7544 (description "Java Message Service (JMS) API is used to send messages
7545 messages between two or more clients. It is a messaging standard that allows
7546 application components to create, send, receive, and read messages.")
7547 ; either gpl2 only with GPL Classpath Exception, or cddl.
7548 (license (list license:gpl2 license:cddl1.0))))
7550 (define-public java-mail
7556 (uri (string-append "https://github.com/javaee/javamail/archive/"
7557 "JAVAMAIL-1_6_0.tar.gz"))
7560 "1b4rg7fpj50ld90a71iz2m4gm3f5cnw18p3q3rbrrryjip46kx92"))))
7561 (build-system ant-build-system)
7563 `(#:jar-name "java-mail.jar"
7565 #:source-dir "mail/src/main/java"
7566 #:test-dir "mail/src/test"
7568 (list "**/CollectorFormatterTest.java"
7569 "**/CompactFormatterTest.java"
7570 "**/DurationFilterTest.java"
7571 "**/MailHandlerTest.java"
7572 "**/GetLocalAddressTest.java"
7573 ;; FIXME: both end with:
7574 ;; java.lang.ClassNotFoundException:
7575 ;; javax.mail.internet.MimeMultipartParseTest
7576 "**/MimeMultipartParseTest.java"
7577 "**/SearchTermSerializationTest.java")
7579 (modify-phases %standard-phases
7580 (add-before 'configure 'move-version.java
7582 (copy-file "mail/src/main/resources/javax/mail/Version.java"
7583 "mail/src/main/java/javax/mail/Version.java")
7585 (add-before 'build 'copy-resources
7587 (copy-recursively "mail/src/main/resources/META-INF"
7588 "build/classes/META-INF")
7591 `(("junit" ,java-junit)
7592 ("hamcrest" ,java-hamcrest-core)))
7593 (home-page "https://javaee.github.io/javamail/")
7594 (synopsis "Mail-related functionnalities in Java")
7595 (description "The JavaMail API provides a platform-independent and
7596 protocol-independent framework to build mail and messaging applications.")
7597 ;; General Public License Version 2 only ("GPL") or the Common Development
7598 ;; and Distribution License("CDDL")
7599 (license (list license:cddl1.1
7600 license:gpl2)))); with classpath exception
7602 (define-public java-jeromq
7604 (name "java-jeromq")
7608 (uri (string-append "https://github.com/zeromq/jeromq/archive/v"
7610 (file-name (string-append name "-" version ".tar.gz"))
7613 "17wx8dlyqmbw77xf6d6wxnhiyky6181zpf1a48jqzz9hidz0j841"))))
7614 (build-system ant-build-system)
7616 `(#:jar-name "java-jeromq.jar"
7617 #:source-dir "src/main/java"
7623 "**/ZBeaconTest.java"
7625 "**/CustomDecoderTest.java"
7626 "**/CustomEncoderTest.java")))
7628 `(("java-jnacl" ,java-jnacl)))
7630 `(("java-hamcrest-core" ,java-hamcrest-core)
7631 ("junit" ,java-junit)))
7632 (home-page "http://zeromq.org/bindings:java")
7633 (synopsis "Java binding for 0MQ")
7634 (description "Jeromq provides the java bindings for 0MQ.")
7635 (license license:mpl2.0)))
7637 (define-public java-kafka-clients
7639 (name "java-kafka-clients")
7643 (uri (string-append "mirror://apache/kafka/" version "/kafka-"
7644 version "-src.tgz"))
7647 "1yxmnsmliwm7671q5yy9bl4jdqyyn00n26cggz9brwczx80w1vfq"))))
7648 (build-system ant-build-system)
7650 `(#:jar-name "java-kafka-clients.jar"
7652 #:source-dir "clients/src/main/java"
7653 #:test-dir "clients/src/test"
7656 ;; This file does not contain a class
7657 "**/IntegrationTest.java"
7659 "**/ClientUtilsTest.java"
7660 ;; End with errors that seem related to our powermock
7661 "**/KafkaProducerTest.java"
7662 "**/BufferPoolTest.java")))
7664 `(("java-slf4j-api" ,java-slf4j-api)
7665 ("java-lz4" ,java-lz4)))
7667 `(("junit" ,java-junit)
7668 ("hamcrest" ,java-hamcrest-all)
7669 ("objenesis" ,java-objenesis)
7671 ("cglib" ,java-cglib)
7672 ("javassist" ,java-jboss-javassist)
7673 ("snappy" ,java-snappy)
7674 ("easymock" ,java-easymock)
7675 ("powermock" ,java-powermock-core)
7676 ("powermock-easymock" ,java-powermock-api-easymock)
7677 ("powermock-junit4-common" ,java-powermock-modules-junit4-common)
7678 ("powermock-junit4" ,java-powermock-modules-junit4)
7679 ("powermock-support" ,java-powermock-api-support)
7680 ("bouncycastle" ,java-bouncycastle-bcprov)
7681 ("bouncycastle-bcpkix" ,java-bouncycastle-bcpkix)))
7682 (home-page "https://kafka.apache.org")
7683 (synopsis "Distributed streaming platform")
7684 (description "Kafka is a distributed streaming platform, which means:
7686 @item it can publish and subscribe to streams of records;
7687 @item it can store streams of records in a fault-tolerant way;
7688 @item it can process streams of records as they occur.
7690 ;; Either cddl or gpl2 only.
7691 (license (list license:cddl1.1; actually cddl1.1
7692 license:gpl2)))); with classpath exception
7694 (define-public java-jdom
7700 (uri (string-append "http://jdom.org/dist/binary/archive/jdom-"
7704 "07wdpm3jwwc9q38kmdw40fvbmv6jzjrkrf8m0zqs58f79a672wfl"))))
7705 (build-system ant-build-system)
7707 `(#:build-target "package"
7708 #:tests? #f; tests are run as part of the build process
7710 (modify-phases %standard-phases
7712 (install-jars "build")))))
7713 (home-page "http://jdom.org/")
7714 (synopsis "Access, manipulate, and output XML data")
7715 (description "Java-based solution for accessing, manipulating, and
7716 outputting XML data from Java code.")
7717 (license license:bsd-4)))
7719 (define-public java-geronimo-xbean-reflect
7721 (name "java-geronimo-xbean-reflect")
7726 (url "https://svn.apache.org/repos/asf/geronimo/xbean/tags/xbean-4.5/")
7727 (revision 1807396)))
7728 (file-name (string-append name "-" version))
7731 "18q3i6jgm6rkw8aysfgihgywrdc5nvijrwnslmi3ww497jvri6ja"))))
7732 (build-system ant-build-system)
7734 `(#:jar-name "geronimo-xbean-reflect.jar"
7735 #:source-dir "xbean-reflect/src/main/java"
7736 #:test-dir "xbean-reflect/src/test"
7739 (list "**/Abstract*.java" "**/AsmParameterNameLoaderTest.java"
7740 "**/ObjectRecipeTest.java" "**/ParameterNameLoaderTest.java"
7741 "**/RecipeHelperTest.java" "**/XbeanAsmParameterNameLoaderTest.java")
7743 (modify-phases %standard-phases
7744 (add-before 'build 'fix-source
7746 (let ((dir "xbean-reflect/src/main/java/org/apache/xbean/recipe/"))
7747 ;; org.apache.xbean.asm6 is actually repackaged java-asm
7748 (substitute* (string-append dir "XbeanAsmParameterNameLoader.java")
7749 (("org.apache.xbean.asm5") "org.objectweb.asm"))
7753 ("log4j" ,java-log4j-api)
7754 ("log4j-1.2" ,java-log4j-1.2-api)
7755 ("log4j-core" ,java-log4j-core)
7756 ("logging" ,java-commons-logging-minimal)))
7758 `(("junit" ,java-junit)))
7759 (home-page "https://geronimo.apache.org/maven/xbean/3.6/xbean-reflect/")
7760 (synopsis "Dependency injection helper")
7761 (description "Xbean-reflect provides very flexible ways to create objects
7762 and graphs of objects for dependency injection frameworks")
7763 (license license:asl2.0)))