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 Alex Vong <alexvong1995@gmail.com>
10 ;;; This file is part of GNU Guix.
12 ;;; GNU Guix is free software; you can redistribute it and/or modify it
13 ;;; under the terms of the GNU General Public License as published by
14 ;;; the Free Software Foundation; either version 3 of the License, or (at
15 ;;; your option) any later version.
17 ;;; GNU Guix is distributed in the hope that it will be useful, but
18 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
19 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 ;;; GNU General Public License for more details.
22 ;;; You should have received a copy of the GNU General Public License
23 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
25 (define-module (gnu packages java)
26 #:use-module ((guix licenses) #:prefix license:)
27 #:use-module (guix packages)
28 #:use-module (guix download)
29 #:use-module (guix hg-download)
30 #:use-module (guix git-download)
31 #:use-module (guix svn-download)
32 #:use-module (guix utils)
33 #:use-module (guix build-system ant)
34 #:use-module (guix build-system gnu)
35 #:use-module (guix build-system trivial)
36 #:use-module (gnu packages)
37 #:use-module (gnu packages attr)
38 #:use-module (gnu packages autotools)
39 #:use-module (gnu packages base)
40 #:use-module (gnu packages bash)
41 #:use-module (gnu packages certs)
42 #:use-module (gnu packages cpio)
43 #:use-module (gnu packages cups)
44 #:use-module (gnu packages compression)
45 #:use-module (gnu packages fontutils)
46 #:use-module (gnu packages gawk)
47 #:use-module (gnu packages gettext)
48 #:use-module (gnu packages gcc)
49 #:use-module (gnu packages gl)
50 #:use-module (gnu packages gnuzilla) ;nss
51 #:use-module (gnu packages ghostscript) ;lcms
52 #:use-module (gnu packages gnome)
53 #:use-module (gnu packages gtk)
54 #:use-module (gnu packages guile)
55 #:use-module (gnu packages icu4c)
56 #:use-module (gnu packages image)
57 #:use-module (gnu packages libffi)
58 #:use-module (gnu packages linux) ;alsa
59 #:use-module (gnu packages web)
60 #:use-module (gnu packages wget)
61 #:use-module (gnu packages pkg-config)
62 #:use-module (gnu packages perl)
63 #:use-module (gnu packages popt)
64 #:use-module (gnu packages kerberos)
65 #:use-module (gnu packages xml)
66 #:use-module (gnu packages xorg)
67 #:use-module (gnu packages texinfo)
68 #:use-module ((srfi srfi-1) #:select (fold alist-delete))
69 #:use-module (srfi srfi-11)
70 #:use-module (ice-9 match))
74 ;;; Java bootstrap toolchain.
77 ;; The Java bootstrap begins with Jikes, a Java compiler written in C++. We
78 ;; use it to build the SableVM standard library and virtual machine, which are
79 ;; written in a simpler dialect of Java and C, respectively. This is
80 ;; sufficient to build an older version of Ant, which is needed to build an
81 ;; older version of ECJ, an incremental Java compiler, both of which are
84 ;; ECJ is needed to build the latest release of GNU Classpath (0.99).
85 ;; Classpath (> 0.98) is a requirement for JamVM, a more modern implementation
86 ;; of the Java virtual machine.
88 ;; With JamVM we can build the latest development version of GNU Classpath,
89 ;; which has much more support for Java 1.6 than the latest release. Since
90 ;; the previous build of JamVM is limited by the use of GNU Classpath 0.99 we
91 ;; rebuild it with the latest development version of GNU Classpath.
93 ;; Finally, we use the bootstrap toolchain to build the OpenJDK with the
94 ;; Icedtea 1.x build framework. We then build the more recent JDKs Icedtea
95 ;; 2.x and Icedtea 3.x.
103 (uri (string-append "mirror://sourceforge/jikes/Jikes/"
104 version "/jikes-" version ".tar.bz2"))
107 "1qqldrp74pzpy5ly421srqn30qppmm9cvjiqdngk8hf47dv2rc0c"))))
108 (build-system gnu-build-system)
109 (home-page "http://jikes.sourceforge.net/")
110 (synopsis "Compiler for the Java language")
111 (description "Jikes is a compiler that translates Java source files as
112 defined in The Java Language Specification into the bytecoded instruction set
113 and binary format defined in The Java Virtual Machine Specification.")
114 (license license:ibmpl1.0)))
116 (define sablevm-classpath
118 (name "sablevm-classpath")
122 (uri (string-append "mirror://sourceforge/sablevm/sablevm/"
123 version "/sablevm-classpath-" version ".tar.gz"))
126 "1qyhyfz8idghxdam16hdgpa24r2x4xbg9z8c8asa3chnd79h3zw2"))))
127 (build-system gnu-build-system)
144 ("pkg-config" ,pkg-config)))
145 (home-page "http://sablevm.org/")
146 (synopsis "Java Virtual Machine")
147 (description "SableVM is a clean-room, highly portable and efficient Java
148 virtual machine. Its goals are to be reasonably small, fast, and compliant
149 with the various specifications (JVM specification, JNI, invocation interface,
150 etc.). SableVM is no longer maintained.
152 This package provides the classpath library.")
153 (license license:lgpl2.1+)))
161 (uri (string-append "mirror://sourceforge/sablevm/sablevm/"
162 version "/sablevm-" version ".tar.gz"))
165 "1jyg4bsym6igz94wps5443c7wiwlzinqzkchcw972nz4kf1cql6g"))))
166 (build-system gnu-build-system)
169 (list "--with-internal-libffi=no"
170 "--with-internal-libpopt=no")
172 (modify-phases %standard-phases
173 (add-after 'unpack 'remove-timestamp-for-reproducibility
175 (substitute* "src/sablevm/Makefile.in"
176 (("\\$\\(SVMCOMPILETIME\\)") "(unknown)"))
178 (add-after 'unpack 'link-with-popt
180 (substitute* "src/sablevm/Makefile.in"
181 (("\\$\\(SVMADD\\)" match)
182 (string-append match " -lpopt")))
184 (add-after 'unpack 'patch-path-to-classpath
185 (lambda* (#:key inputs #:allow-other-keys)
186 (substitute* "Makefile.in"
187 (("@datadir@/sablevm-classpath")
188 (string-append (assoc-ref inputs "classpath")
189 "/share/sablevm-classpath")))
190 (substitute* "src/libsablevm/Makefile.in"
191 (("\\$\\(libdir\\)/sablevm-classpath")
192 (string-append (assoc-ref inputs "classpath")
193 "/lib/sablevm-classpath"))
194 (("\\$\\(datadir\\)/sablevm-classpath")
195 (string-append (assoc-ref inputs "classpath")
196 "/share/sablevm-classpath")))
199 `(("classpath" ,sablevm-classpath)
205 `(("libltdl" ,libltdl)))
206 (home-page "http://sablevm.org/")
207 (synopsis "Java Virtual Machine")
208 (description "SableVM is a clean-room, highly portable and efficient Java
209 virtual machine. Its goals are to be reasonably small, fast, and compliant
210 with the various specifications (JVM specification, JNI, invocation interface,
211 etc.). SableVM is no longer maintained.
213 This package provides the virtual machine.")
214 (license license:lgpl2.1+)))
216 (define ant-bootstrap
218 (name "ant-bootstrap")
219 ;; The 1.10.x series requires Java 8. 1.9.0 and later use generics, which
220 ;; are not supported. The 1.8.x series is the last to use only features
221 ;; supported by Jikes, but it cannot seem to be built with sablevm.
225 (uri (string-append "http://archive.apache.org/dist/"
226 "ant/source/apache-ant-"
227 version "-src.tar.bz2"))
230 "19pvqvgkxgpgsqm4lvbki5sm0z84kxmykdqicvfad47gc1r9mi2d"))))
231 (build-system gnu-build-system)
233 `(#:tests? #f ; no "check" target
235 (modify-phases %standard-phases
238 (lambda* (#:key inputs #:allow-other-keys)
240 (string-append (assoc-ref inputs "sablevm")
243 (string-append (assoc-ref inputs "sablevm")
244 "/bin/java-sablevm"))
246 (string-append (assoc-ref inputs "sablevm")
247 "/bin/javac-sablevm"))
249 ;; Use jikes instead of javac for <javac ...> tags in build.xml
250 (setenv "ANT_OPTS" "-Dbuild.compiler=jikes")
252 ;; jikes produces lots of warnings, but they are not very
253 ;; interesting, so we silence them.
254 (setenv "$BOOTJAVAC_OPTS" "-nowarn")
256 ;; Disable tests because we are bootstrapping and thus don't have
257 ;; any of the dependencies required to build and run the tests.
258 (substitute* "build.xml"
259 (("depends=\"jars,test-jar\"") "depends=\"jars\""))
260 (zero? (system* "bash" "bootstrap.sh"
261 (string-append "-Ddist.dir="
262 (assoc-ref %outputs "out"))))))
266 ("sablevm" ,sablevm)))
267 (home-page "http://ant.apache.org")
268 (synopsis "Build tool for Java")
270 "Ant is a platform-independent build tool for Java. It is similar to
271 make but is implemented using the Java language, requires the Java platform,
272 and is best suited to building Java projects. Ant uses XML to describe the
273 build process and its dependencies, whereas Make uses Makefile format.")
274 (license license:asl2.0)))
276 ;; Version 3.2.2 is the last version without a dependency on a full-fledged
277 ;; compiler for Java 1.5.
278 (define ecj-bootstrap
280 (name "ecj-bootstrap")
284 (uri (string-append "http://archive.eclipse.org/eclipse/"
285 "downloads/drops/R-" version
286 "-200702121330/ecjsrc.zip"))
289 "05hj82kxd23qaglsjkaqcj944riisjha7acf7h3ljhrjyljx8307"))))
290 ;; It would be so much easier if we could use the ant-build-system, but we
291 ;; cannot as we don't have ant at this point. We use ecj for
292 ;; bootstrapping the JDK.
293 (build-system gnu-build-system)
295 `(#:modules ((guix build gnu-build-system)
298 #:tests? #f ; there are no tests
300 (modify-phases %standard-phases
302 (lambda* (#:key inputs #:allow-other-keys)
305 (find-files (string-append (assoc-ref inputs "ant-bootstrap")
311 (lambda* (#:key inputs #:allow-other-keys)
312 ;; The unpack phase enters the "org" directory by mistake.
315 ;; Create a simple manifest to make ecj executable.
316 (with-output-to-file "manifest"
318 (display "Manifest-Version: 1.0
319 Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n")))
322 (and (zero? (apply system* "javac-sablevm"
323 (find-files "." "\\.java$")))
324 (zero? (system* "fastjar" "cvfm"
325 "ecj-bootstrap.jar" "manifest" ".")))))
327 (lambda* (#:key outputs #:allow-other-keys)
328 (let ((share (string-append (assoc-ref outputs "out")
331 (install-file "ecj-bootstrap.jar" share)
334 `(("ant-bootstrap" ,ant-bootstrap)
337 ("fastjar" ,fastjar)))
338 (home-page "https://eclipse.org")
339 (synopsis "Eclipse Java development tools core batch compiler")
340 (description "This package provides the Eclipse Java core batch compiler
341 for bootstrapping purposes. The @dfn{Eclipse compiler for Java} (ecj) is a
342 requirement for all GNU Classpath releases after version 0.93.")
343 (license license:epl1.0)))
345 (define ecj-javac-wrapper
346 (package (inherit ecj-bootstrap)
347 (name "ecj-javac-wrapper")
349 (build-system trivial-build-system)
351 `(#:modules ((guix build utils))
353 (let ((backend 'sablevm))
354 (use-modules (guix build utils))
355 (let* ((bin (string-append (assoc-ref %outputs "out") "/bin"))
356 (target (string-append bin "/javac"))
357 (guile (string-append (assoc-ref %build-inputs "guile")
359 (ecj (string-append (assoc-ref %build-inputs "ecj-bootstrap")
360 "/share/java/ecj-bootstrap.jar"))
363 (string-append (assoc-ref %build-inputs "sablevm")
364 "/lib/sablevm/bin/java"))
366 (string-append (assoc-ref %build-inputs "jamvm")
368 (bootcp (case backend
370 (let ((jvmlib (string-append
371 (assoc-ref %build-inputs "sablevm-classpath")
373 (string-append jvmlib "/jre/lib/rt.jar")))
375 (let ((jvmlib (string-append (assoc-ref %build-inputs "classpath")
376 "/share/classpath")))
377 (string-append jvmlib "/lib/glibj.zip:"
378 jvmlib "/lib/tools.zip"))))))
380 (with-output-to-file target
382 (format #t "#!~a --no-auto-compile\n!#\n" guile)
384 `(begin (use-modules (ice-9 match)
390 '(("-bootclasspath" ,bootcp)
395 (let ((classpath (getenv "CLASSPATH")))
399 (string-append ":" classpath)
401 (receive (vm-args other-args)
402 ;; Separate VM arguments from arguments to ECJ.
403 (partition (cut string-prefix? "-J" <>)
404 (fold (lambda (default acc)
405 (if (member (first default) acc)
406 acc (append default acc)))
410 ;; Remove "-J" prefix
411 (map (cut string-drop <> 2) vm-args)
412 '("org.eclipse.jdt.internal.compiler.batch.Main")
413 (cons "-nowarn" other-args)))))
415 (let ((args (cdr (command-line))))
417 (format (current-error-port) "javac: no arguments given!\n")
422 `(("guile" ,guile-2.2)
423 ("ecj-bootstrap" ,ecj-bootstrap)
425 ("sablevm-classpath" ,sablevm-classpath)))
426 (description "This package provides a wrapper around the @dfn{Eclipse
427 compiler for Java} (ecj) with a command line interface that is compatible with
428 the standard javac executable.")))
430 ;; Note: All the tool wrappers (e.g. for javah, javac, etc) fail with
431 ;; java.lang.UnsupportedClassVersionError. They simply won't run on the old
432 ;; sablevm. We use Classpath 0.99 to build JamVM, on which the Classpath
433 ;; tools do run. Using these Classpath tools on JamVM we can then build the
434 ;; development version of GNU Classpath.
435 (define classpath-on-sablevm
441 (uri (string-append "mirror://gnu/classpath/classpath-"
445 "1j7cby4k66f1nvckm48xcmh352b1d1b33qk7l6hi7dp9i9zjjagr"))))
446 (build-system gnu-build-system)
449 (list (string-append "--with-ecj-jar="
450 (assoc-ref %build-inputs "ecj-bootstrap")
451 "/share/java/ecj-bootstrap.jar")
452 (string-append "JAVAC="
453 (assoc-ref %build-inputs "ecj-javac-wrapper")
455 (string-append "JAVA="
456 (assoc-ref %build-inputs "sablevm")
459 "ac_cv_prog_java_works=yes" ; trust me
463 "--disable-gconf-peer"
469 (modify-phases %standard-phases
470 (add-after 'install 'install-data
471 (lambda _ (zero? (system* "make" "install-data")))))))
473 `(("ecj-bootstrap" ,ecj-bootstrap)
474 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
477 ("sablevm-classpath" ,sablevm-classpath)
479 ("pkg-config" ,pkg-config)))
480 (home-page "https://www.gnu.org/software/classpath/")
481 (synopsis "Essential libraries for Java")
482 (description "GNU Classpath is a project to create core class libraries
483 for use with runtimes, compilers and tools for the Java programming
485 ;; GPLv2 or later, with special linking exception.
486 (license license:gpl2+)))
488 (define jamvm-bootstrap
494 (uri (string-append "mirror://sourceforge/jamvm/jamvm/"
495 "JamVM%20" version "/jamvm-"
499 "1nl0zxz8y5x8gwsrm7n32bry4dx8x70p8z3s9jbdvs8avyb8whkn"))))
500 (build-system gnu-build-system)
503 (list (string-append "--with-classpath-install-dir="
504 (assoc-ref %build-inputs "classpath")))))
506 `(("classpath" ,classpath-on-sablevm)
507 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
509 (home-page "http://jamvm.sourceforge.net/")
510 (synopsis "Small Java Virtual Machine")
511 (description "JamVM is a Java Virtual Machine conforming to the JVM
512 specification edition 2 (blue book). It is extremely small. However, unlike
513 other small VMs it supports the full spec, including object finalisation and
515 (license license:gpl2+)))
517 ;; We need this because the tools provided by the latest release of GNU
518 ;; Classpath don't actually work with sablevm.
519 (define classpath-jamvm-wrappers
520 (package (inherit classpath-on-sablevm)
521 (name "classpath-jamvm-wrappers")
523 (build-system trivial-build-system)
525 `(#:modules ((guix build utils))
528 (use-modules (guix build utils))
529 (let* ((bash (assoc-ref %build-inputs "bash"))
530 (jamvm (assoc-ref %build-inputs "jamvm"))
531 (classpath (assoc-ref %build-inputs "classpath"))
532 (bin (string-append (assoc-ref %outputs "out")
535 (for-each (lambda (tool)
536 (with-output-to-file (string-append bin tool)
538 (format #t "#!~a/bin/sh
539 ~a/bin/jamvm -classpath ~a/share/classpath/tools.zip \
540 gnu.classpath.tools.~a.~a $@"
541 bash jamvm classpath tool
542 (if (string=? "native2ascii" tool)
543 "Native2ASCII" "Main"))))
544 (chmod (string-append bin tool) #o755))
554 ("jamvm" ,jamvm-bootstrap)
555 ("classpath" ,classpath-on-sablevm)))
557 (synopsis "Executables from GNU Classpath")
558 (description "This package provides wrappers around the tools provided by
559 the GNU Classpath library. They are executed by the JamVM virtual
562 (define ecj-javac-on-jamvm-wrapper
563 (package (inherit ecj-javac-wrapper)
564 (name "ecj-javac-on-jamvm-wrapper")
566 `(#:modules ((guix build utils))
568 ;; TODO: This builder is exactly the same as in ecj-javac-wrapper,
569 ;; except that the backend is 'jamvm here. Can we reuse the same
571 (let ((backend 'jamvm))
572 (use-modules (guix build utils))
573 (let* ((bin (string-append (assoc-ref %outputs "out") "/bin"))
574 (target (string-append bin "/javac"))
575 (guile (string-append (assoc-ref %build-inputs "guile")
577 (ecj (string-append (assoc-ref %build-inputs "ecj-bootstrap")
578 "/share/java/ecj-bootstrap.jar"))
581 (string-append (assoc-ref %build-inputs "sablevm")
582 "/lib/sablevm/bin/java"))
584 (string-append (assoc-ref %build-inputs "jamvm")
586 (bootcp (case backend
588 (let ((jvmlib (string-append
589 (assoc-ref %build-inputs "sablevm-classpath")
591 (string-append jvmlib "/jre/lib/rt.jar")))
593 (let ((jvmlib (string-append (assoc-ref %build-inputs "classpath")
594 "/share/classpath")))
595 (string-append jvmlib "/lib/glibj.zip:"
596 jvmlib "/lib/tools.zip"))))))
598 (with-output-to-file target
600 (format #t "#!~a --no-auto-compile\n!#\n" guile)
602 `(begin (use-modules (ice-9 match)
608 '(("-bootclasspath" ,bootcp)
613 (let ((classpath (getenv "CLASSPATH")))
617 (string-append ":" classpath)
619 (receive (vm-args other-args)
620 ;; Separate VM arguments from arguments to ECJ.
621 (partition (cut string-prefix? "-J" <>)
622 (fold (lambda (default acc)
623 (if (member (first default) acc)
624 acc (append default acc)))
628 ;; Remove "-J" prefix
629 (map (cut string-drop <> 2) vm-args)
630 '("org.eclipse.jdt.internal.compiler.batch.Main")
631 (cons "-nowarn" other-args)))))
633 (let ((args (cdr (command-line))))
635 (format (current-error-port) "javac: no arguments given!\n")
640 `(("guile" ,guile-2.2)
641 ("ecj-bootstrap" ,ecj-bootstrap)
642 ("jamvm" ,jamvm-bootstrap)
643 ("classpath" ,classpath-on-sablevm)))
644 (description "This package provides a wrapper around the @dfn{Eclipse
645 compiler for Java} (ecj) with a command line interface that is compatible with
646 the standard javac executable. The tool runs on JamVM instead of SableVM.")))
648 ;; The last release of GNU Classpath is 0.99 and it happened in 2012. Since
649 ;; then Classpath has gained much more support for Java 1.6.
650 (define-public classpath-devel
651 (let ((commit "e7c13ee0cf2005206fbec0eca677f8cf66d5a103")
653 (package (inherit classpath-on-sablevm)
654 (version (string-append "0.99-" revision "." (string-take commit 9)))
658 (url "https://git.savannah.gnu.org/git/classpath.git")
660 (file-name (string-append "classpath-" version "-checkout"))
663 "1v2rww76ww322mpg3s12a1kkc6gkp31bm9gcxs532h0wq285fiw4"))))
666 ;; Ensure that the initial heap size is smaller than the maximum
667 ;; size. By default only Xmx is set, which can lead to invalid
668 ;; memory settings on some machines with a lot of memory.
669 '("JAVAC_MEM_OPT=-J-Xms512M -J-Xmx768M")
671 (list (string-append "--with-ecj-jar="
672 (assoc-ref %build-inputs "ecj-bootstrap")
673 "/share/java/ecj-bootstrap.jar")
674 (string-append "--with-javac="
675 (assoc-ref %build-inputs "ecj-javac-wrapper")
677 (string-append "JAVA="
678 (assoc-ref %build-inputs "jamvm")
681 "ac_cv_prog_java_works=yes" ; trust me
685 "--disable-gconf-peer"
691 (modify-phases %standard-phases
692 (add-after 'unpack 'bootstrap
694 (zero? (system* "autoreconf" "-vif"))))
695 (add-after 'unpack 'remove-unsupported-annotations
697 (substitute* (find-files "java" "\\.java$")
700 (add-after 'install 'install-data
701 (lambda _ (zero? (system* "make" "install-data")))))))
703 `(("autoconf" ,autoconf)
704 ("automake" ,automake)
706 ("gettext" ,gettext-minimal)
708 ("classpath-jamvm-wrappers" ,classpath-jamvm-wrappers) ; for javah
709 ("ecj-bootstrap" ,ecj-bootstrap)
710 ("ecj-javac-wrapper" ,ecj-javac-on-jamvm-wrapper)
712 ("jamvm" ,jamvm-bootstrap)
714 ("pkg-config" ,pkg-config))))))
717 (package (inherit jamvm-bootstrap)
719 `(("classpath" ,classpath-devel)
720 ("ecj-javac-wrapper" ,ecj-javac-on-jamvm-wrapper)
723 (define ecj-javac-on-jamvm-wrapper-final
724 (package (inherit ecj-javac-on-jamvm-wrapper)
726 `(("guile" ,guile-2.2)
727 ("ecj-bootstrap" ,ecj-bootstrap)
729 ("classpath" ,classpath-devel)))))
731 ;; The bootstrap JDK consisting of jamvm, classpath-devel,
732 ;; ecj-javac-on-jamvm-wrapper-final cannot build Icedtea 2.x directly, because
733 ;; it's written in Java 7. It can, however, build the unmaintained Icedtea
734 ;; 1.x, which uses Java 6 only.
735 (define-public icedtea-6
742 "http://icedtea.wildebeest.org/download/source/icedtea6-"
746 "0bg9sb4f7qbq77c0zf9m17p47ga0kf0r9622g9p12ysg26jd1ksg"))
747 (modules '((guix build utils)))
749 '(substitute* "Makefile.in"
750 ;; do not leak information about the build host
751 (("DISTRIBUTION_ID=\"\\$\\(DIST_ID\\)\"")
752 "DISTRIBUTION_ID=\"\\\"guix\\\"\"")))))
753 (build-system gnu-build-system)
754 (outputs '("out" ; Java Runtime Environment
755 "jdk" ; Java Development Kit
756 "doc")) ; all documentation
758 `(;; There are many failing tests and many are known to fail upstream.
761 ;; The DSOs use $ORIGIN to refer to each other, but (guix build
762 ;; gremlin) doesn't support it yet, so skip this phase.
763 #:validate-runpath? #f
765 #:modules ((guix build utils)
766 (guix build gnu-build-system)
770 `("--enable-bootstrap"
773 "--with-parallel-jobs"
774 "--disable-downloading"
776 ,(string-append "--with-ecj="
777 (assoc-ref %build-inputs "ecj")
778 "/share/java/ecj-bootstrap.jar")
779 ,(string-append "--with-jar="
780 (assoc-ref %build-inputs "fastjar")
782 ,(string-append "--with-jdk-home="
783 (assoc-ref %build-inputs "classpath"))
784 ,(string-append "--with-java="
785 (assoc-ref %build-inputs "jamvm")
788 (modify-phases %standard-phases
790 (lambda* (#:key source inputs #:allow-other-keys)
791 (and (zero? (system* "tar" "xvf" source))
793 (chdir (string-append "icedtea6-" ,version))
795 (copy-recursively (assoc-ref inputs "openjdk-src") "openjdk")
796 ;; The convenient OpenJDK source bundle is no longer
797 ;; available for download, so we have to take the sources
798 ;; from the Mercurial repositories and change the Makefile
799 ;; to avoid tests for the OpenJDK zip archive.
800 (with-directory-excursion "openjdk"
801 (for-each (lambda (part)
805 (string-append part "-src"))
807 '("jdk" "hotspot" "corba"
808 "langtools" "jaxp" "jaxws")))
809 (substitute* "Makefile.in"
810 (("echo \"ERROR: No up-to-date OpenJDK zip available\"; exit -1;")
811 "echo \"trust me\";")
812 ;; The contents of the bootstrap directory must be
813 ;; writeable but when copying from the store they are
815 (("mkdir -p lib/rt" line)
816 (string-append line "; chmod -R u+w $(BOOT_DIR)")))
817 (zero? (system* "chmod" "-R" "u+w" "openjdk"))
819 (add-after 'unpack 'use-classpath
820 (lambda* (#:key inputs #:allow-other-keys)
821 (let ((jvmlib (assoc-ref inputs "classpath")))
822 ;; Classpath does not provide rt.jar.
823 (substitute* "Makefile.in"
824 (("\\$\\(SYSTEM_JDK_DIR\\)/jre/lib/rt.jar")
825 (string-append jvmlib "/share/classpath/glibj.zip")))
826 ;; Make sure we can find all classes.
828 (string-append jvmlib "/share/classpath/glibj.zip:"
829 jvmlib "/share/classpath/tools.zip"))
831 (string-append "-cp "
832 jvmlib "/share/classpath/glibj.zip:"
833 jvmlib "/share/classpath/tools.zip")))
835 (add-after 'unpack 'patch-patches
837 ;; shebang in patches so that they apply cleanly
838 (substitute* '("patches/jtreg-jrunscript.patch"
839 "patches/hotspot/hs23/drop_unlicensed_test.patch")
840 (("#!/bin/sh") (string-append "#!" (which "sh"))))
842 (add-after 'unpack 'patch-paths
843 (lambda* (#:key inputs #:allow-other-keys)
844 ;; buildtree.make generates shell scripts, so we need to replace
845 ;; the generated shebang
846 (substitute* '("openjdk/hotspot/make/linux/makefiles/buildtree.make")
847 (("/bin/sh") (which "bash")))
849 (let ((corebin (string-append
850 (assoc-ref inputs "coreutils") "/bin/"))
851 (binbin (string-append
852 (assoc-ref inputs "binutils") "/bin/"))
853 (grepbin (string-append
854 (assoc-ref inputs "grep") "/bin/")))
855 (substitute* '("openjdk/jdk/make/common/shared/Defs-linux.gmk"
856 "openjdk/corba/make/common/shared/Defs-linux.gmk")
857 (("UNIXCOMMAND_PATH = /bin/")
858 (string-append "UNIXCOMMAND_PATH = " corebin))
859 (("USRBIN_PATH = /usr/bin/")
860 (string-append "USRBIN_PATH = " corebin))
861 (("DEVTOOLS_PATH *= */usr/bin/")
862 (string-append "DEVTOOLS_PATH = " corebin))
863 (("COMPILER_PATH *= */usr/bin/")
864 (string-append "COMPILER_PATH = "
865 (assoc-ref inputs "gcc") "/bin/"))
866 (("DEF_OBJCOPY *=.*objcopy")
867 (string-append "DEF_OBJCOPY = " (which "objcopy"))))
869 ;; fix path to alsa header
870 (substitute* "openjdk/jdk/make/common/shared/Sanity.gmk"
871 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
872 (string-append "ALSA_INCLUDE="
873 (assoc-ref inputs "alsa-lib")
874 "/include/alsa/version.h")))
876 ;; fix hard-coded utility paths
877 (substitute* '("openjdk/jdk/make/common/shared/Defs-utils.gmk"
878 "openjdk/corba/make/common/shared/Defs-utils.gmk")
880 (string-append "ECHO = " (which "echo")))
882 (string-append "GREP = " (which "grep")))
884 (string-append "EGREP = " (which "egrep")))
886 (string-append "CPIO = " (which "cpio")))
887 (("READELF *=.*readelf")
888 (string-append "READELF = " (which "readelf")))
890 (string-append "AR = " (which "ar")))
892 (string-append "TAR = " (which "tar")))
894 (string-append "AS = " (which "as")))
896 (string-append "LD = " (which "ld")))
898 (string-append "STRIP = " (which "strip")))
900 (string-append "NM = " (which "nm")))
902 (string-append "SH = " (which "bash")))
904 (string-append "FIND = " (which "find")))
906 (string-append "LDD = " (which "ldd")))
907 (("NAWK *=.*(n|g)awk")
908 (string-append "NAWK = " (which "gawk")))
910 (string-append "XARGS = " (which "xargs")))
912 (string-append "UNZIP = " (which "unzip")))
914 (string-append "ZIPEXE = " (which "zip")))
916 (string-append "SED = " (which "sed"))))
918 ;; Some of these timestamps cause problems as they are more than
919 ;; 10 years ago, failing the build process.
921 "openjdk/jdk/src/share/classes/java/util/CurrencyData.properties"
922 (("AZ=AZM;2005-12-31-20-00-00;AZN") "AZ=AZN")
923 (("MZ=MZM;2006-06-30-22-00-00;MZN") "MZ=MZN")
924 (("RO=ROL;2005-06-30-21-00-00;RON") "RO=RON")
925 (("TR=TRL;2004-12-31-22-00-00;TRY") "TR=TRY"))
927 (add-before 'configure 'set-additional-paths
928 (lambda* (#:key inputs #:allow-other-keys)
930 (string-append (assoc-ref inputs "libxrender")
931 "/include/X11/extensions" ":"
932 (assoc-ref inputs "libxtst")
933 "/include/X11/extensions" ":"
934 (assoc-ref inputs "libxinerama")
935 "/include/X11/extensions" ":"
936 (or (getenv "CPATH") "")))
937 (setenv "ALT_CUPS_HEADERS_PATH"
938 (string-append (assoc-ref inputs "cups")
940 (setenv "ALT_FREETYPE_HEADERS_PATH"
941 (string-append (assoc-ref inputs "freetype")
943 (setenv "ALT_FREETYPE_LIB_PATH"
944 (string-append (assoc-ref inputs "freetype")
948 (lambda* (#:key outputs #:allow-other-keys)
949 (let ((doc (string-append (assoc-ref outputs "doc")
950 "/share/doc/icedtea"))
951 (jre (assoc-ref outputs "out"))
952 (jdk (assoc-ref outputs "jdk")))
953 (copy-recursively "openjdk.build/docs" doc)
954 (copy-recursively "openjdk.build/j2re-image" jre)
955 (copy-recursively "openjdk.build/j2sdk-image" jdk))
958 `(("ant" ,ant-bootstrap)
959 ("alsa-lib" ,alsa-lib)
961 ("classpath" ,classpath-devel)
962 ("coreutils" ,coreutils)
965 ("ecj" ,ecj-bootstrap)
966 ("ecj-javac" ,ecj-javac-on-jamvm-wrapper-final)
968 ("fontconfig" ,fontconfig)
969 ("freetype" ,freetype)
980 ("libxcomposite" ,libxcomposite)
982 ("libxinerama" ,libxinerama)
983 ("libxrender" ,libxrender)
984 ("libxslt" ,libxslt) ;for xsltproc
987 ("mit-krb5" ,mit-krb5)
989 ("nss-certs" ,nss-certs)
991 ("pkg-config" ,pkg-config)
992 ("procps" ,procps) ;for "free", even though I'm not sure we should use it
1002 (url "http://hg.openjdk.java.net/jdk6/jdk6/")
1003 (changeset "jdk6-b41")))
1006 "14q47yfg586fs64w30g8mk92m5dkxsvr36zzh0ra99xk5x0x96mv"))))
1011 (url "http://hg.openjdk.java.net/jdk6/jdk6/jdk/")
1012 (changeset "jdk6-b41")))
1015 "165824nhg1k1dx6zs9dny0j49rmk35jw5b13dmz8c77jfajml4v9"))))
1020 (url "http://hg.openjdk.java.net/jdk6/jdk6/hotspot/")
1021 (changeset "jdk6-b41")))
1024 "07lc1z4k5dj9nrc1wvwmpvxr3xgxrdkdh53xb95skk5ij49yagfd"))))
1029 (url "http://hg.openjdk.java.net/jdk6/jdk6/corba/")
1030 (changeset "jdk6-b41")))
1033 "1p9g1r9dnax2iwp7yb59qx7m4nmshqhwmrb2b8jj8zgbd9dl2i3q"))))
1038 (url "http://hg.openjdk.java.net/jdk6/jdk6/langtools/")
1039 (changeset "jdk6-b41")))
1042 "1x52wd67fynbbd9ild6fb4wvba3f5hhwk03qdjfazd0a1qr37z3d"))))
1047 (url "http://hg.openjdk.java.net/jdk6/jdk6/jaxp/")
1048 (changeset "jdk6-b41")))
1051 "0shlqrvzpr4nrkmv215lbxnby63s3yvbdh1yxcayznsyqwa4nlxm"))))
1056 (url "http://hg.openjdk.java.net/jdk6/jdk6/jaxws/")
1057 (changeset "jdk6-b41")))
1060 "0835lkw8vib1xhp8lxnybhlvzdh699hbi4mclxanydjk63zbpxk0"))))))
1061 (home-page "http://icedtea.classpath.org")
1062 (synopsis "Java development kit")
1064 "This package provides the OpenJDK built with the IcedTea build harness.
1065 This version of the OpenJDK is no longer maintained and is only used for
1066 bootstrapping purposes.")
1067 ;; IcedTea is released under the GPL2 + Classpath exception, which is the
1068 ;; same license as both GNU Classpath and OpenJDK.
1069 (license license:gpl2+)))
1071 (define-public icedtea-7
1072 (let* ((version "2.6.11")
1073 (drop (lambda (name hash)
1077 "http://icedtea.classpath.org/download/drops"
1078 "/icedtea7/" version "/" name ".tar.bz2"))
1079 (sha256 (base32 hash))))))
1086 "http://icedtea.wildebeest.org/download/source/icedtea-"
1090 "1ibp6ybqnf8g7mbs45bkbv44dwz4h2w9gr4rh15yvr1m8lqkq1i0"))
1091 (modules '((guix build utils)))
1093 '(substitute* "Makefile.in"
1094 ;; do not leak information about the build host
1095 (("DISTRIBUTION_ID=\"\\$\\(DIST_ID\\)\"")
1096 "DISTRIBUTION_ID=\"\\\"guix\\\"\"")))))
1097 (build-system gnu-build-system)
1098 (outputs '("out" ; Java Runtime Environment
1099 "jdk" ; Java Development Kit
1100 "doc")) ; all documentation
1102 `(;; There are many test failures. Some are known to
1103 ;; fail upstream, others relate to not having an X
1104 ;; server running at test time, yet others are a
1105 ;; complete mystery to me.
1107 ;; hotspot: passed: 241; failed: 45; error: 2
1108 ;; langtools: passed: 1,934; failed: 26
1112 ;; The DSOs use $ORIGIN to refer to each other, but (guix build
1113 ;; gremlin) doesn't support it yet, so skip this phase.
1114 #:validate-runpath? #f
1116 ;; Apparently, the C locale is needed for some of the tests.
1119 #:modules ((guix build utils)
1120 (guix build gnu-build-system)
1127 ;; TODO: package pcsc and sctp, and add to inputs
1128 `("--disable-system-pcsc"
1129 "--disable-system-sctp"
1130 "--enable-bootstrap"
1133 "--disable-downloading"
1134 "--disable-tests" ;they are run in the check phase instead
1135 "--with-openjdk-src-dir=./openjdk.src"
1136 ,(string-append "--with-jdk-home="
1137 (assoc-ref %build-inputs "jdk")))
1140 (modify-phases %standard-phases
1142 (lambda* (#:key source inputs #:allow-other-keys)
1143 (let ((target (string-append "icedtea-" ,version))
1144 (unpack (lambda* (name #:optional dir)
1146 (string-drop-right name 5))))
1148 (zero? (system* "tar" "xvf"
1149 (assoc-ref inputs name)
1151 "--strip-components=1"))))))
1154 (zero? (system* "tar" "xvf" source
1155 "-C" target "--strip-components=1"))
1157 (unpack "openjdk-src" "openjdk.src")
1158 (with-directory-excursion "openjdk.src"
1160 (filter (cut string-suffix? "-drop" <>)
1165 (add-after 'unpack 'fix-x11-extension-include-path
1166 (lambda* (#:key inputs #:allow-other-keys)
1167 (substitute* "openjdk.src/jdk/make/sun/awt/mawt.gmk"
1168 (((string-append "\\$\\(firstword \\$\\(wildcard "
1169 "\\$\\(OPENWIN_HOME\\)"
1170 "/include/X11/extensions\\).*$"))
1171 (string-append (assoc-ref inputs "libxrender")
1172 "/include/X11/extensions"
1173 " -I" (assoc-ref inputs "libxtst")
1174 "/include/X11/extensions"
1175 " -I" (assoc-ref inputs "libxinerama")
1176 "/include/X11/extensions"))
1177 (("\\$\\(wildcard /usr/include/X11/extensions\\)\\)") ""))
1179 (add-after 'unpack 'patch-paths
1181 ;; buildtree.make generates shell scripts, so we need to replace
1182 ;; the generated shebang
1183 (substitute* '("openjdk.src/hotspot/make/linux/makefiles/buildtree.make")
1184 (("/bin/sh") (which "bash")))
1186 (let ((corebin (string-append
1187 (assoc-ref %build-inputs "coreutils") "/bin/"))
1188 (binbin (string-append
1189 (assoc-ref %build-inputs "binutils") "/bin/"))
1190 (grepbin (string-append
1191 (assoc-ref %build-inputs "grep") "/bin/")))
1192 (substitute* '("openjdk.src/jdk/make/common/shared/Defs-linux.gmk"
1193 "openjdk.src/corba/make/common/shared/Defs-linux.gmk")
1194 (("UNIXCOMMAND_PATH = /bin/")
1195 (string-append "UNIXCOMMAND_PATH = " corebin))
1196 (("USRBIN_PATH = /usr/bin/")
1197 (string-append "USRBIN_PATH = " corebin))
1198 (("DEVTOOLS_PATH *= */usr/bin/")
1199 (string-append "DEVTOOLS_PATH = " corebin))
1200 (("COMPILER_PATH *= */usr/bin/")
1201 (string-append "COMPILER_PATH = "
1202 (assoc-ref %build-inputs "gcc") "/bin/"))
1203 (("DEF_OBJCOPY *=.*objcopy")
1204 (string-append "DEF_OBJCOPY = " (which "objcopy"))))
1206 ;; fix path to alsa header
1207 (substitute* "openjdk.src/jdk/make/common/shared/Sanity.gmk"
1208 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
1209 (string-append "ALSA_INCLUDE="
1210 (assoc-ref %build-inputs "alsa-lib")
1211 "/include/alsa/version.h")))
1213 ;; fix hard-coded utility paths
1214 (substitute* '("openjdk.src/jdk/make/common/shared/Defs-utils.gmk"
1215 "openjdk.src/corba/make/common/shared/Defs-utils.gmk")
1217 (string-append "ECHO = " (which "echo")))
1219 (string-append "GREP = " (which "grep")))
1220 (("EGREP *=.*egrep")
1221 (string-append "EGREP = " (which "egrep")))
1223 (string-append "CPIO = " (which "cpio")))
1224 (("READELF *=.*readelf")
1225 (string-append "READELF = " (which "readelf")))
1227 (string-append "AR = " (which "ar")))
1229 (string-append "TAR = " (which "tar")))
1231 (string-append "AS = " (which "as")))
1233 (string-append "LD = " (which "ld")))
1234 (("STRIP *=.*strip")
1235 (string-append "STRIP = " (which "strip")))
1237 (string-append "NM = " (which "nm")))
1239 (string-append "SH = " (which "bash")))
1241 (string-append "FIND = " (which "find")))
1243 (string-append "LDD = " (which "ldd")))
1244 (("NAWK *=.*(n|g)awk")
1245 (string-append "NAWK = " (which "gawk")))
1246 (("XARGS *=.*xargs")
1247 (string-append "XARGS = " (which "xargs")))
1248 (("UNZIP *=.*unzip")
1249 (string-append "UNZIP = " (which "unzip")))
1251 (string-append "ZIPEXE = " (which "zip")))
1253 (string-append "SED = " (which "sed"))))
1255 ;; Some of these timestamps cause problems as they are more than
1256 ;; 10 years ago, failing the build process.
1258 "openjdk.src/jdk/src/share/classes/java/util/CurrencyData.properties"
1259 (("AZ=AZM;2005-12-31-20-00-00;AZN") "AZ=AZN")
1260 (("MZ=MZM;2006-06-30-22-00-00;MZN") "MZ=MZN")
1261 (("RO=ROL;2005-06-30-21-00-00;RON") "RO=RON")
1262 (("TR=TRL;2004-12-31-22-00-00;TRY") "TR=TRY")))
1264 (add-before 'configure 'set-additional-paths
1265 (lambda* (#:key inputs #:allow-other-keys)
1266 (substitute* "openjdk.src/jdk/make/common/shared/Sanity.gmk"
1267 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
1268 (string-append "ALSA_INCLUDE="
1269 (assoc-ref inputs "alsa-lib")
1270 "/include/alsa/version.h")))
1273 (string-append (assoc-ref inputs "libxcomposite")
1274 "/include/X11/extensions" ":"
1275 (assoc-ref inputs "libxrender")
1276 "/include/X11/extensions" ":"
1277 (assoc-ref inputs "libxtst")
1278 "/include/X11/extensions" ":"
1279 (assoc-ref inputs "libxinerama")
1280 "/include/X11/extensions" ":"
1281 (or (getenv "CPATH") "")))
1282 (setenv "ALT_OBJCOPY" (which "objcopy"))
1283 (setenv "ALT_CUPS_HEADERS_PATH"
1284 (string-append (assoc-ref inputs "cups")
1286 (setenv "ALT_FREETYPE_HEADERS_PATH"
1287 (string-append (assoc-ref inputs "freetype")
1289 (setenv "ALT_FREETYPE_LIB_PATH"
1290 (string-append (assoc-ref inputs "freetype")
1293 (add-before 'check 'fix-test-framework
1295 ;; Fix PATH in test environment
1296 (substitute* "test/jtreg/com/sun/javatest/regtest/Main.java"
1297 (("PATH=/bin:/usr/bin")
1298 (string-append "PATH=" (getenv "PATH"))))
1299 (substitute* "test/jtreg/com/sun/javatest/util/SysEnv.java"
1300 (("/usr/bin/env") (which "env")))
1301 (substitute* "openjdk.src/hotspot/test/test_env.sh"
1302 (("/bin/rm") (which "rm"))
1303 (("/bin/cp") (which "cp"))
1304 (("/bin/mv") (which "mv")))
1306 (add-before 'check 'fix-hotspot-tests
1308 (with-directory-excursion "openjdk.src/hotspot/test/"
1309 (substitute* "jprt.config"
1310 (("PATH=\"\\$\\{path4sdk\\}\"")
1311 (string-append "PATH=" (getenv "PATH")))
1312 (("make=/usr/bin/make")
1313 (string-append "make=" (which "make"))))
1314 (substitute* '("runtime/6626217/Test6626217.sh"
1315 "runtime/7110720/Test7110720.sh")
1316 (("/bin/rm") (which "rm"))
1317 (("/bin/cp") (which "cp"))
1318 (("/bin/mv") (which "mv"))))
1320 (add-before 'check 'fix-jdk-tests
1322 (with-directory-excursion "openjdk.src/jdk/test/"
1323 (substitute* "com/sun/jdi/JdbReadTwiceTest.sh"
1324 (("/bin/pwd") (which "pwd")))
1325 (substitute* "com/sun/jdi/ShellScaffold.sh"
1326 (("/bin/kill") (which "kill")))
1327 (substitute* "start-Xvfb.sh"
1328 ;;(("/usr/bin/X11/Xvfb") (which "Xvfb"))
1329 (("/usr/bin/nohup") (which "nohup")))
1330 (substitute* "javax/security/auth/Subject/doAs/Test.sh"
1331 (("/bin/rm") (which "rm")))
1332 (substitute* "tools/launcher/MultipleJRE.sh"
1333 (("echo \"#!/bin/sh\"")
1334 (string-append "echo \"#!" (which "rm") "\""))
1335 (("/usr/bin/zip") (which "zip")))
1336 (substitute* "com/sun/jdi/OnThrowTest.java"
1337 (("#!/bin/sh") (string-append "#!" (which "sh"))))
1338 (substitute* "java/lang/management/OperatingSystemMXBean/GetSystemLoadAverage.java"
1339 (("/usr/bin/uptime") (which "uptime")))
1340 (substitute* "java/lang/ProcessBuilder/Basic.java"
1341 (("/usr/bin/env") (which "env"))
1342 (("/bin/false") (which "false"))
1343 (("/bin/true") (which "true"))
1344 (("/bin/cp") (which "cp"))
1345 (("/bin/sh") (which "sh")))
1346 (substitute* "java/lang/ProcessBuilder/FeelingLucky.java"
1347 (("/bin/sh") (which "sh")))
1348 (substitute* "java/lang/ProcessBuilder/Zombies.java"
1349 (("/usr/bin/perl") (which "perl"))
1350 (("/bin/ps") (which "ps"))
1351 (("/bin/true") (which "true")))
1352 (substitute* "java/lang/Runtime/exec/ConcurrentRead.java"
1353 (("/usr/bin/tee") (which "tee")))
1354 (substitute* "java/lang/Runtime/exec/ExecWithDir.java"
1355 (("/bin/true") (which "true")))
1356 (substitute* "java/lang/Runtime/exec/ExecWithInput.java"
1357 (("/bin/cat") (which "cat")))
1358 (substitute* "java/lang/Runtime/exec/ExitValue.java"
1359 (("/bin/sh") (which "sh"))
1360 (("/bin/true") (which "true"))
1361 (("/bin/kill") (which "kill")))
1362 (substitute* "java/lang/Runtime/exec/LotsOfDestroys.java"
1363 (("/usr/bin/echo") (which "echo")))
1364 (substitute* "java/lang/Runtime/exec/LotsOfOutput.java"
1365 (("/usr/bin/cat") (which "cat")))
1366 (substitute* "java/lang/Runtime/exec/SleepyCat.java"
1367 (("/bin/cat") (which "cat"))
1368 (("/bin/sleep") (which "sleep"))
1369 (("/bin/sh") (which "sh")))
1370 (substitute* "java/lang/Runtime/exec/StreamsSurviveDestroy.java"
1371 (("/bin/cat") (which "cat")))
1372 (substitute* "java/rmi/activation/CommandEnvironment/SetChildEnv.java"
1373 (("/bin/chmod") (which "chmod")))
1374 (substitute* "java/util/zip/ZipFile/Assortment.java"
1375 (("/bin/sh") (which "sh"))))
1379 ;; The "make check-*" targets always return zero, so we need to
1380 ;; check for errors in the associated log files to determine
1381 ;; whether any tests have failed.
1382 (use-modules (ice-9 rdelim))
1383 (let* ((error-pattern (make-regexp "^(Error|FAILED):.*"))
1384 (checker (lambda (port)
1386 (let ((line (read-line port)))
1388 ((eof-object? line) #t)
1389 ((regexp-exec error-pattern line) #f)
1391 (run-test (lambda (test)
1392 (system* "make" test)
1393 (call-with-input-file
1394 (string-append "test/" test ".log")
1397 (and (run-test "check-hotspot")
1398 (run-test "check-langtools")
1399 (run-test "check-jdk"))))))
1401 (lambda* (#:key outputs #:allow-other-keys)
1402 (let ((doc (string-append (assoc-ref outputs "doc")
1403 "/share/doc/icedtea"))
1404 (jre (assoc-ref outputs "out"))
1405 (jdk (assoc-ref outputs "jdk")))
1406 (copy-recursively "openjdk.build/docs" doc)
1407 (copy-recursively "openjdk.build/j2re-image" jre)
1408 (copy-recursively "openjdk.build/j2sdk-image" jdk))
1410 ;; Some of the libraries in the lib/amd64 folder link to libjvm.so.
1411 ;; But that shared object is located in the server/ folder, so it
1412 ;; cannot be found. This phase creates a symbolic link in the
1413 ;; lib/amd64 folder so that the other libraries can find it.
1416 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
1418 ;; FIXME: Find the bug in the build system, so that this symlink is
1420 (add-after 'install 'install-libjvm
1421 (lambda* (#:key inputs outputs #:allow-other-keys)
1422 (let* ((lib-path (string-append (assoc-ref outputs "out")
1424 (symlink (string-append lib-path "/server/libjvm.so")
1425 (string-append lib-path "/libjvm.so")))
1427 ;; By default IcedTea only generates an empty keystore. In order to
1428 ;; be able to use certificates in Java programs we need to generate a
1429 ;; keystore from a set of certificates. For convenience we use the
1430 ;; certificates from the nss-certs package.
1431 (add-after 'install 'install-keystore
1432 (lambda* (#:key inputs outputs #:allow-other-keys)
1433 (let* ((keystore "cacerts")
1434 (certs-dir (string-append (assoc-ref inputs "nss-certs")
1436 (keytool (string-append (assoc-ref outputs "jdk")
1438 (define (extract-cert file target)
1439 (call-with-input-file file
1441 (call-with-output-file target
1443 (let loop ((line (read-line in 'concat))
1446 ((eof-object? line) #t)
1447 ((string-prefix? "-----BEGIN" line)
1449 (loop (read-line in 'concat) #t))
1450 ((string-prefix? "-----END" line)
1454 (when copying? (display line out))
1455 (loop (read-line in 'concat) copying?)))))))))
1456 (define (import-cert cert)
1457 (format #t "Importing certificate ~a\n" (basename cert))
1458 (let ((temp "tmpcert"))
1459 (extract-cert cert temp)
1460 (let ((port (open-pipe* OPEN_WRITE keytool
1462 "-alias" (basename cert)
1463 "-keystore" keystore
1464 "-storepass" "changeit"
1466 (display "yes\n" port)
1467 (when (not (zero? (status:exit-val (close-pipe port))))
1468 (format #t "failed to import ~a\n" cert)))
1469 (delete-file temp)))
1471 ;; This is necessary because the certificate directory contains
1472 ;; files with non-ASCII characters in their names.
1473 (setlocale LC_ALL "en_US.utf8")
1474 (setenv "LC_ALL" "en_US.utf8")
1476 (for-each import-cert (find-files certs-dir "\\.pem$"))
1477 (mkdir-p (string-append (assoc-ref outputs "out")
1479 (mkdir-p (string-append (assoc-ref outputs "jdk")
1480 "/jre/lib/security"))
1482 ;; The cacerts files we are going to overwrite are chmod'ed as
1483 ;; read-only (444) in icedtea-8 (which derives from this
1484 ;; package). We have to change this so we can overwrite them.
1485 (chmod (string-append (assoc-ref outputs "out")
1486 "/lib/security/" keystore) #o644)
1487 (chmod (string-append (assoc-ref outputs "jdk")
1488 "/jre/lib/security/" keystore) #o644)
1490 (install-file keystore
1491 (string-append (assoc-ref outputs "out")
1493 (install-file keystore
1494 (string-append (assoc-ref outputs "jdk")
1495 "/jre/lib/security"))
1500 "1zhr4l9kxnbzghcsgjk3vmih9qpg1wrr9qry7fx04l97svp1ylhd"))
1503 "108v15ncb2rnsyzgzncjlm1f57d1sv60zd9qbpas8kqmvpp8r0gz"))
1506 "0zcpcmm3g1s7m31glrbw3ys7azi97ixcvbyxd40y9xzdja3jyr52"))
1509 "1gkqm0p3sr8d0xpki3fhf7cvmgqxx8ambgl5f3jx2plfnhsg96d2"))
1512 "1d9fjnzdx4m6gwkvmj2n097ag0mvkhm3lldaxjki8x8c6a5clknf"))
1515 "0zscdp9arcq7gr8j7jq4m75gq0w1i3ryxpdnrc8fl0msh4w2s2k5"))
1518 "1y6vnssn5y50x27g4ypdb5wwpmi7zf7jdi8gqbymkwf6n8p5y1d6"))
1519 ("ant" ,ant-bootstrap)
1521 ("coreutils" ,coreutils)
1522 ("diffutils" ,diffutils) ;for tests
1525 ("libtool" ,libtool)
1526 ("pkg-config" ,pkg-config)
1532 ("fastjar" ,fastjar)
1533 ("libxslt" ,libxslt) ;for xsltproc
1534 ("nss-certs" ,nss-certs)
1536 ("procps" ,procps) ;for "free", even though I'm not sure we should use it
1537 ("jdk" ,icedtea-6 "jdk")))
1539 `(("alsa-lib" ,alsa-lib)
1542 ("libxcomposite" ,libxcomposite)
1544 ("libxtst" ,libxtst)
1546 ("libxinerama" ,libxinerama)
1547 ("libxrender" ,libxrender)
1548 ("libjpeg" ,libjpeg)
1550 ("mit-krb5" ,mit-krb5)
1553 ("fontconfig" ,fontconfig)
1554 ("freetype" ,freetype)
1558 (home-page "http://icedtea.classpath.org")
1559 (synopsis "Java development kit")
1561 "This package provides the Java development kit OpenJDK built with the
1562 IcedTea build harness.")
1563 ;; IcedTea is released under the GPL2 + Classpath exception, which is the
1564 ;; same license as both GNU Classpath and OpenJDK.
1565 (license license:gpl2+))))
1567 (define-public icedtea-8
1568 (let* ((version "3.6.0")
1569 (drop (lambda (name hash)
1573 "http://icedtea.classpath.org/download/drops"
1574 "/icedtea8/" version "/" name ".tar.xz"))
1575 (sha256 (base32 hash))))))
1576 (package (inherit icedtea-7)
1581 "http://icedtea.wildebeest.org/download/source/icedtea-"
1585 "0zj192zrrxqh6j1ywc3399gk2ycay9w8pvzcvvr2kvdkb37ak86h"))
1586 (modules '((guix build utils)))
1589 (substitute* "acinclude.m4"
1590 ;; Do not embed build time
1591 (("(DIST_ID=\"Custom build).*$" _ prefix)
1592 (string-append prefix "\"\n"))
1593 ;; Do not leak information about the build host
1594 (("DIST_NAME=\"\\$build_os\"")
1595 "DIST_NAME=\"guix\""))
1598 (substitute-keyword-arguments (package-arguments icedtea-7)
1599 ((#:configure-flags flags)
1600 `(let ((jdk (assoc-ref %build-inputs "jdk")))
1601 `(;;"--disable-bootstrap"
1602 "--enable-bootstrap"
1604 "--disable-downloading"
1605 "--disable-system-pcsc"
1606 "--disable-system-sctp"
1607 "--disable-tests" ;they are run in the check phase instead
1608 "--with-openjdk-src-dir=./openjdk.src"
1609 ,(string-append "--with-jdk-home=" jdk))))
1611 `(modify-phases ,phases
1612 (delete 'fix-x11-extension-include-path)
1613 (delete 'patch-paths)
1614 (delete 'set-additional-paths)
1615 (delete 'patch-patches)
1616 (add-after 'unpack 'patch-jni-libs
1617 ;; Hardcode dynamically loaded libraries.
1619 (let* ((library-path (search-path-as-string->list
1620 (getenv "LIBRARY_PATH")))
1621 (find-library (lambda (name)
1624 (string-append "lib" name ".so")))))
1627 (catch 'decoding-error
1630 (("VERSIONED_JNI_LIB_NAME\\(\"(.*)\", \"(.*)\"\\)"
1632 (format #f "\"~a\"" (find-library name)))
1633 (("JNI_LIB_NAME\\(\"(.*)\"\\)" _ name)
1634 (format #f "\"~a\"" (find-library name)))))
1636 ;; Those are safe to skip.
1637 (format (current-error-port)
1638 "warning: failed to substitute: ~a~%"
1640 (find-files "openjdk.src/jdk/src/solaris/native"
1644 (lambda* (#:key outputs #:allow-other-keys)
1645 (let ((doc (string-append (assoc-ref outputs "doc")
1646 "/share/doc/icedtea"))
1647 (jre (assoc-ref outputs "out"))
1648 (jdk (assoc-ref outputs "jdk")))
1649 (copy-recursively "openjdk.build/docs" doc)
1650 (copy-recursively "openjdk.build/images/j2re-image" jre)
1651 (copy-recursively "openjdk.build/images/j2sdk-image" jdk)
1652 ;; Install the nss.cfg file to JRE to enable SSL/TLS
1654 (copy-file (string-append jdk "/jre/lib/security/nss.cfg")
1655 (string-append jre "/lib/security/nss.cfg"))
1658 `(("jdk" ,icedtea-7 "jdk")
1661 "0mqxh81kq05z4wydkik0yrr81ibf84xmwsdcw9n2gfrzs4f5jxnb"))
1664 "0b207g2n6kn510zf5vwh58bsxgqrmkvrna4p20r74v9cwcwx83n2"))
1667 "0qinc1q4w01nkr9klhfyd8caxvyrrfxjrz32nd7kgyja2bj8x7dd"))
1670 "07azrp3g86vk2laybmr5xfn0yrljkxs0rlm1q48385br225bgdxi"))
1673 "018fd2hq57zp3pq06wlxy5pabqcyk36xi8hk0d6xk3a90wsjvyik"))
1676 "0vs488kq5j2cc6kplc78jbhfxwq4fn06l34xrbq4d6y17777arg8"))
1679 "04f6d1wvck5jrpvrcw5gsbzxnihcry9zrf1v85czdm959q21zv9c"))
1682 "1mfgpzyr6zzy9klf8nn3z6d41fydb9ghpfpqzjq3cl95axfbdl1g"))
1685 "1a26cmzbs50gkh4rmmmxls7zljx62vfp1wq02gsfd5jqs4xvlibj"))
1688 "11hmn9mwmvryfddcanzx3qffjm8bbiv18nwv3iy9cswrvxjy010f"))
1689 ,@(fold alist-delete (package-native-inputs icedtea-7)
1690 '("jdk" "openjdk-src" "corba-drop" "jaxp-drop" "jaxws-drop"
1691 "jdk-drop" "langtools-drop" "hotspot-drop")))))))
1693 (define-public icedtea icedtea-7)
1696 (define-public ant/java8
1697 (package (inherit ant-bootstrap)
1702 (uri (string-append "mirror://apache/ant/source/apache-ant-"
1703 version "-src.tar.gz"))
1706 "10p3dh77lkzzzcy32dk9azljixzadp46fggjfbvgkl8mmb8cxxv8"))
1707 (modules '((guix build utils)))
1710 (for-each delete-file
1711 (find-files "lib/optional" "\\.jar$"))
1714 (substitute-keyword-arguments (package-arguments ant-bootstrap)
1716 `(modify-phases ,phases
1717 (add-after 'unpack 'remove-scripts
1718 ;; Remove bat / cmd scripts for DOS as well as the antRun and runant
1721 (for-each delete-file
1722 (find-files "src/script"
1723 "(.*\\.(bat|cmd)|runant.*|antRun.*)"))
1726 (lambda* (#:key inputs outputs #:allow-other-keys)
1727 (setenv "JAVA_HOME" (assoc-ref inputs "jdk"))
1729 ;; Disable tests to avoid dependency on hamcrest-core, which needs
1730 ;; Ant to build. This is necessary in addition to disabling the
1731 ;; "check" phase, because the dependency on "test-jar" would always
1732 ;; result in the tests to be run.
1733 (substitute* "build.xml"
1734 (("depends=\"jars,test-jar\"") "depends=\"jars\""))
1735 (zero? (system* "bash" "bootstrap.sh"
1736 (string-append "-Ddist.dir="
1737 (assoc-ref outputs "out"))))))))))
1739 `(("jdk" ,icedtea-8 "jdk")))))
1741 ;; The 1.9.x series is the last that can be built with GCJ. The 1.10.x series
1744 (package (inherit ant/java8)
1748 (uri (string-append "mirror://apache/ant/source/apache-ant-"
1749 version "-src.tar.gz"))
1752 "1k28mka0m3isy9yr8gz84kz1f3f879rwaxrd44vdn9xbfwvwk86n"))))
1754 `(("jdk" ,icedtea-7 "jdk")))))
1756 (define-public ant-apache-bcel
1759 (name "ant-apache-bcel")
1761 (substitute-keyword-arguments (package-arguments ant/java8)
1763 `(modify-phases ,phases
1764 (add-after 'unpack 'link-bcel
1765 (lambda* (#:key inputs #:allow-other-keys)
1766 (for-each (lambda (file)
1768 (string-append "lib/optional/"
1770 (find-files (assoc-ref inputs "java-commons-bcel")
1773 (add-after 'build 'install
1774 (lambda* (#:key outputs #:allow-other-keys)
1775 (let* ((out (assoc-ref outputs "out"))
1776 (share (string-append out "/share/java"))
1777 (bin (string-append out "/bin"))
1778 (lib (string-append out "/lib")))
1780 (install-file (string-append lib "/ant-apache-bcel.jar") share)
1781 (delete-file-recursively bin)
1782 (delete-file-recursively lib)
1785 `(("java-commons-bcel" ,java-commons-bcel)
1786 ,@(package-inputs ant/java8)))))
1788 (define-public clojure
1789 (let* ((remove-archives '(begin
1790 (for-each delete-file
1791 (find-files "." ".*\\.(jar|zip)"))
1793 (submodule (lambda (prefix version hash)
1796 (uri (string-append "https://github.com/clojure/"
1797 prefix version ".tar.gz"))
1798 (sha256 (base32 hash))
1799 (modules '((guix build utils)))
1800 (snippet remove-archives)))))
1808 (string-append "http://repo1.maven.org/maven2/org/clojure/clojure/"
1809 version "/clojure-" version ".zip"))
1811 (base32 "1nip095fz5c492sw15skril60i1vd21ibg6szin4jcvyy3xr6cym"))
1812 (modules '((guix build utils)))
1813 (snippet remove-archives)))
1814 (build-system ant-build-system)
1816 `(#:modules ((guix build ant-build-system)
1822 #:test-target "test"
1824 (modify-phases %standard-phases
1825 (add-after 'unpack 'unpack-submodule-sources
1826 (lambda* (#:key inputs #:allow-other-keys)
1830 (with-directory-excursion name
1831 (or (zero? (system* "tar"
1832 ;; Use xz for repacked tarball.
1836 "--file" (assoc-ref inputs name)
1837 "--strip-components=1"))
1838 (error "failed to unpack tarball" name)))
1839 (copy-recursively (string-append name "/src/main/clojure/")
1841 '("data-generators-src"
1842 "java-classpath-src"
1844 "test-generative-src"
1845 "tools-namespace-src"
1846 "tools-reader-src"))
1848 ;; The javadoc target is not built by default.
1849 (add-after 'build 'build-doc
1851 (zero? (system* "ant" "javadoc"))))
1852 ;; Needed since no install target is provided.
1854 (lambda* (#:key outputs #:allow-other-keys)
1855 (let ((java-dir (string-append (assoc-ref outputs "out")
1857 ;; Install versioned to avoid collisions.
1858 (install-file (string-append "clojure-" ,version ".jar")
1861 ;; Needed since no install-doc target is provided.
1862 (add-after 'install 'install-doc
1863 (lambda* (#:key outputs #:allow-other-keys)
1864 (let ((doc-dir (string-append (assoc-ref outputs "out")
1865 "/share/doc/clojure-"
1867 (copy-recursively "doc/clojure" doc-dir)
1868 (copy-recursively "target/javadoc/"
1869 (string-append doc-dir "javadoc/"))
1870 (for-each (cut install-file <> doc-dir)
1871 (filter (cut string-match
1872 ".*\\.(html|markdown|md|txt)"
1876 ;; The native-inputs below are needed to run the tests.
1878 `(("data-generators-src"
1879 ,(submodule "data.generators/archive/data.generators-"
1881 "0kki093jp4ckwxzfnw8ylflrfqs8b1i1wi9iapmwcsy328dmgzp1"))
1882 ("java-classpath-src"
1883 ,(submodule "java.classpath/archive/java.classpath-"
1885 "0sjymly9xh1lkvwn5ygygpsfwz4dabblnlq0c9bx76rkvq62fyng"))
1887 ,(submodule "test.check/archive/test.check-"
1889 "0p0mnyhr442bzkz0s4k5ra3i6l5lc7kp6ajaqkkyh4c2k5yck1md"))
1890 ("test-generative-src"
1891 ,(submodule "test.generative/archive/test.generative-"
1893 "1pjafy1i7yblc7ixmcpfq1lfbyf3jaljvkgrajn70sws9xs7a9f8"))
1894 ("tools-namespace-src"
1895 ,(submodule "tools.namespace/archive/tools.namespace-"
1897 "10baak8v0hnwz2hr33bavshm7y49mmn9zsyyms1dwjz45p5ymhy0"))
1899 ,(submodule "tools.reader/archive/tools.reader-"
1901 "1lafblmmj4hkg0aqrf19qkdw9wdcsh3qxmn6cbkmnzbhffpyv2lv"))))
1902 (home-page "https://clojure.org/")
1903 (synopsis "Lisp dialect running on the JVM")
1904 (description "Clojure is a dynamic, general-purpose programming language,
1905 combining the approachability and interactive development of a scripting
1906 language with an efficient and robust infrastructure for multithreaded
1907 programming. Clojure is a compiled language, yet remains completely dynamic
1908 – every feature supported by Clojure is supported at runtime. Clojure
1909 provides easy access to the Java frameworks, with optional type hints and type
1910 inference, to ensure that calls to Java can avoid reflection.
1912 Clojure is a dialect of Lisp, and shares with Lisp the code-as-data philosophy
1913 and a powerful macro system. Clojure is predominantly a functional programming
1914 language, and features a rich set of immutable, persistent data structures.
1915 When mutable state is needed, Clojure offers a software transactional memory
1916 system and reactive Agent system that ensure clean, correct, multithreaded
1918 ;; Clojure is licensed under EPL1.0
1919 ;; ASM bytecode manipulation library is licensed under BSD-3
1920 ;; Guava Murmur3 hash implementation is licensed under APL2.0
1921 ;; src/clj/repl.clj is licensed under CPL1.0
1923 ;; See readme.html or readme.txt for details.
1924 (license (list license:epl1.0
1929 (define-public javacc
1935 (uri (string-append "https://github.com/javacc/javacc/"
1936 "archive/" version ".tar.gz"))
1937 (file-name (string-append "javacc-" version ".tar.gz"))
1940 "111xc9mnmc5a6qz6x3xbhqc07y1lg2b996ggzw0hrblg42zya9xf"))))
1941 (build-system ant-build-system)
1943 `(#:test-target "test"
1945 (modify-phases %standard-phases
1946 (add-after 'unpack 'delete-bundled-libs
1948 (delete-file-recursively "lib") #t))
1949 (replace 'install (install-jars "target")))))
1950 (home-page "https://javacc.org/")
1951 (synopsis "Java parser generator")
1952 (description "Java Compiler Compiler (JavaCC) is the most popular parser
1953 generator for use with Java applications. A parser generator is a tool that
1954 reads a grammar specification and converts it to a Java program that can
1955 recognize matches to the grammar. In addition to the parser generator itself,
1956 JavaCC provides other standard capabilities related to parser generation such
1957 as tree building (via a tool called JJTree included with JavaCC), actions,
1959 (license license:bsd-3)))
1961 (define-public javacc-4
1962 (package (inherit javacc)
1967 (url "https://github.com/javacc/javacc.git")
1968 (commit "release_41")))
1969 (file-name (string-append "javacc-" version "-checkout"))
1972 "07ysav7j8r1c6h8qxrgqk6lwdp74ly0ad1935lragxml0qqc3ka0"))))
1974 ;; /tmp/guix-build-javacc-4.1.drv-0/source/test/javacodeLA/build.xml:60:
1979 (modify-phases %standard-phases
1980 (add-after 'unpack 'delete-bundled-libs
1982 (delete-file-recursively "lib") #t))
1983 (replace 'install (install-jars "bin/lib")))))))
1985 (define-public java-classpathx-servletapi
1987 (name "java-classpathx-servletapi")
1991 (uri (string-append "mirror://gnu/classpathx/servletapi/"
1992 "servletapi-" version ".tar.gz"))
1995 "0y9489pk4as9q6x300sk3ycc0psqfxcd4b0xvbmf3rhgli8q1kx3"))))
1996 (build-system ant-build-system)
1998 `(#:tests? #f ; there is no test target
1999 #:build-target "compile"
2000 ;; NOTE: This package does not build with Java 8 because of a type
2002 ;; "source/javax/servlet/jsp/el/ImplicitObjectELResolver.java". It
2003 ;; defines the return value of ScopeMap's "remove" method to be of type
2004 ;; "Object", whereas Map's "remove" method returns boolean.
2006 (list "-Dbuild.compiler=javac1.7"
2007 (string-append "-Ddist=" (assoc-ref %outputs "out")))
2009 (modify-phases %standard-phases
2011 (lambda* (#:key make-flags #:allow-other-keys)
2012 (zero? (apply system* `("ant" "dist" ,@make-flags))))))))
2013 (home-page "https://www.gnu.org/software/classpathx/")
2014 (synopsis "Java servlet API implementation")
2015 (description "This is the GNU servlet API distribution, part of the
2016 ClasspathX project. It provides implementations of version 3.0 of the servlet
2017 API and version 2.1 of the Java ServerPages API.")
2018 (license license:gpl3+)))
2020 (define-public java-swt
2025 ;; The types of many variables and procedures differ in the sources
2026 ;; dependent on whether the target architecture is a 32-bit system or a
2027 ;; 64-bit system. Instead of patching the sources on demand in a build
2028 ;; phase we download either the 32-bit archive (which mostly uses "int"
2029 ;; types) or the 64-bit archive (which mostly uses "long" types).
2030 (let ((hash32 "09q0cbh90d90q3a7dx9430kc4m6bijrkr4lajrmzzvi0jjdpq4v9")
2031 (hash64 "17k5hs75a87ssmc5xhwdfdm2gn4zba0r837l2455za01krnkaa2q")
2034 (let-values (((hash file)
2035 (match (or (%current-target-system) (%current-system))
2036 ("x86_64-linux" (values hash64 file64))
2037 (_ (values hash32 file32)))))
2041 "http://download.eclipse.org/eclipse/downloads/drops4/"
2042 "R-" version "-201710090410/swt-" version
2043 "-gtk-linux-" file ".zip"))
2044 (sha256 (base32 hash))))))
2045 (build-system ant-build-system)
2047 `(#:jar-name "swt.jar"
2049 #:tests? #f ; no "check" target
2051 (modify-phases %standard-phases
2053 (lambda* (#:key source #:allow-other-keys)
2055 (zero? (system* "unzip" source "-d" "swt"))
2058 (zero? (system* "unzip" "src.zip" "-d" "src")))))
2059 ;; The classpath contains invalid icecat jars. Since we don't need
2060 ;; anything other than the JDK on the classpath, we can simply unset
2062 (add-after 'configure 'unset-classpath
2063 (lambda _ (unsetenv "CLASSPATH") #t))
2064 (add-before 'build 'build-native
2065 (lambda* (#:key inputs outputs #:allow-other-keys)
2066 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
2067 ;; Build shared libraries. Users of SWT have to set the system
2068 ;; property swt.library.path to the "lib" directory of this
2071 (setenv "OUTPUT_DIR" lib)
2072 (with-directory-excursion "src"
2073 (zero? (system* "bash" "build.sh"))))))
2074 (add-after 'install 'install-native
2075 (lambda* (#:key outputs #:allow-other-keys)
2076 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
2077 (for-each (lambda (file)
2078 (install-file file lib))
2079 (find-files "." "\\.so$"))
2083 ("libxtst" ,libxtst)
2088 `(("pkg-config" ,pkg-config)
2090 (home-page "https://www.eclipse.org/swt/")
2091 (synopsis "Widget toolkit for Java")
2093 "SWT is a widget toolkit for Java designed to provide efficient, portable
2094 access to the user-interface facilities of the operating systems on which it
2096 ;; SWT code is licensed under EPL1.0
2097 ;; Gnome and Gtk+ bindings contain code licensed under LGPLv2.1
2098 ;; Cairo bindings contain code under MPL1.1
2099 ;; XULRunner 1.9 bindings contain code under MPL2.0
2104 license:lgpl2.1+))))
2106 (define-public java-xz
2112 (uri (string-append "http://tukaani.org/xz/xz-java-" version ".zip"))
2115 "1z3p1ri1gvl07inxn0agx44ck8n7wrzfmvkz8nbq3njn8r9wba8x"))))
2116 (build-system ant-build-system)
2118 `(#:tests? #f ; There are no tests to run.
2119 #:jar-name ,(string-append "xz-" version ".jar")
2121 (modify-phases %standard-phases
2122 ;; The unpack phase enters the "maven" directory by accident.
2123 (add-after 'unpack 'chdir
2124 (lambda _ (chdir "..") #t)))))
2126 `(("unzip" ,unzip)))
2127 (home-page "http://tukaani.org/xz/java.html")
2128 (synopsis "Implementation of XZ data compression in pure Java")
2129 (description "This library aims to be a complete implementation of XZ data
2130 compression in pure Java. Single-threaded streamed compression and
2131 decompression and random access decompression have been fully implemented.")
2132 (license license:public-domain)))
2134 ;; java-hamcrest-core uses qdox version 1.12. We package this version instead
2135 ;; of the latest release.
2136 (define-public java-qdox-1.12
2142 (uri (string-append "http://central.maven.org/maven2/"
2143 "com/thoughtworks/qdox/qdox/" version
2144 "/qdox-" version "-sources.jar"))
2147 "0hlfbqq2avf5s26wxkksqmkdyk6zp9ggqn37c468m96mjv0n9xfl"))))
2148 (build-system ant-build-system)
2150 `(;; Tests require junit
2152 #:jar-name "qdox.jar"
2154 (modify-phases %standard-phases
2156 (lambda* (#:key source #:allow-other-keys)
2158 (with-directory-excursion "src"
2159 (zero? (system* "jar" "-xf" source)))))
2160 ;; At this point we don't have junit, so we must remove the API
2162 (add-after 'unpack 'delete-tests
2164 (delete-file-recursively "src/com/thoughtworks/qdox/junit")
2166 (home-page "http://qdox.codehaus.org/")
2167 (synopsis "Parse definitions from Java source files")
2169 "QDox is a high speed, small footprint parser for extracting
2170 class/interface/method definitions from source files complete with JavaDoc
2171 @code{@@tags}. It is designed to be used by active code generators or
2172 documentation tools.")
2173 (license license:asl2.0)))
2175 (define-public java-jarjar
2177 (name "java-jarjar")
2182 "https://storage.googleapis.com/google-code-archive-downloads/v2/"
2183 "code.google.com/jarjar/jarjar-src-" version ".zip"))
2186 "1v8irhni9cndcw1l1wxqgry013s2kpj0qqn57lj2ji28xjq8ndjl"))))
2187 (build-system ant-build-system)
2189 `(;; Tests require junit, which ultimately depends on this package.
2191 #:build-target "jar"
2193 (modify-phases %standard-phases
2195 (lambda* (#:key outputs #:allow-other-keys)
2196 (let ((target (string-append (assoc-ref outputs "out")
2198 (install-file (string-append "dist/jarjar-" ,version ".jar")
2202 `(("unzip" ,unzip)))
2203 (home-page "https://code.google.com/archive/p/jarjar/")
2204 (synopsis "Repackage Java libraries")
2206 "Jar Jar Links is a utility that makes it easy to repackage Java
2207 libraries and embed them into your own distribution. Jar Jar Links includes
2208 an Ant task that extends the built-in @code{jar} task.")
2209 (license license:asl2.0)))
2211 (define-public java-hamcrest-core
2213 (name "java-hamcrest-core")
2217 (uri (string-append "https://github.com/hamcrest/JavaHamcrest/"
2218 "archive/hamcrest-java-" version ".tar.gz"))
2221 "11g0s105fmwzijbv08lx8jlb521yravjmxnpgdx08fvg1kjivhva"))
2222 (modules '((guix build utils)))
2225 ;; Delete bundled thirds-party jar archives.
2226 (delete-file-recursively "lib")
2228 (build-system ant-build-system)
2230 `(#:tests? #f ; Tests require junit
2231 #:modules ((guix build ant-build-system)
2234 #:make-flags (list (string-append "-Dversion=" ,version))
2235 #:test-target "unit-test"
2236 #:build-target "core"
2238 (modify-phases %standard-phases
2239 ;; Disable unit tests, because they require junit, which requires
2240 ;; hamcrest-core. We also give a fixed value to the "Built-Date"
2241 ;; attribute from the manifest for reproducibility.
2242 (add-before 'configure 'patch-build.xml
2244 (substitute* "build.xml"
2245 (("unit-test, ") "")
2246 (("\\$\\{build.timestamp\\}") "guix"))
2248 ;; Java's "getMethods()" returns methods in an unpredictable order.
2249 ;; To make the output of the generated code deterministic we must
2250 ;; sort the array of methods.
2251 (add-after 'unpack 'make-method-order-deterministic
2253 (substitute* "hamcrest-generator/src/main/java/org/hamcrest/generator/ReflectiveFactoryReader.java"
2254 (("import java\\.util\\.Iterator;" line)
2255 (string-append line "\n"
2256 "import java.util.Arrays; import java.util.Comparator;"))
2257 (("allMethods = cls\\.getMethods\\(\\);" line)
2258 (string-append "_" line
2260 private Method[] getSortedMethods() {
2261 Arrays.sort(_allMethods, new Comparator<Method>() {
2263 public int compare(Method a, Method b) {
2264 return a.toString().compareTo(b.toString());
2270 private Method[] allMethods = getSortedMethods();")))))
2271 (add-before 'build 'do-not-use-bundled-qdox
2272 (lambda* (#:key inputs #:allow-other-keys)
2273 (substitute* "build.xml"
2274 (("lib/generator/qdox-1.12.jar")
2275 (string-append (assoc-ref inputs "java-qdox-1.12")
2276 "/share/java/qdox.jar")))
2278 ;; build.xml searches for .jar files in this directoy, which
2279 ;; we remove from the source archive.
2280 (add-before 'build 'create-dummy-directories
2282 (mkdir-p "lib/integration")
2285 (lambda* (#:key outputs #:allow-other-keys)
2286 (let* ((target (string-append (assoc-ref outputs "out")
2288 (version-suffix ,(string-append "-" version ".jar"))
2289 (install-without-version-suffix
2292 (string-append target
2293 (basename jar version-suffix)
2297 install-without-version-suffix
2300 (and (string-suffix? ".jar" name)
2301 (not (string-suffix? "-sources.jar" name)))))))
2304 `(("java-qdox-1.12" ,java-qdox-1.12)
2305 ("java-jarjar" ,java-jarjar)))
2306 (home-page "http://hamcrest.org/")
2307 (synopsis "Library of matchers for building test expressions")
2309 "This package provides a library of matcher objects (also known as
2310 constraints or predicates) allowing @code{match} rules to be defined
2311 declaratively, to be used in other frameworks. Typical scenarios include
2312 testing frameworks, mocking libraries and UI validation rules.")
2313 (license license:bsd-2)))
2315 (define-public java-junit
2321 (uri (string-append "https://github.com/junit-team/junit/"
2322 "archive/r" version ".tar.gz"))
2323 (file-name (string-append name "-" version ".tar.gz"))
2326 "090dn5v1vs0b3acyaqc0gjf6p8lmd2h24wfzsbq7sly6b214anws"))
2327 (modules '((guix build utils)))
2330 ;; Delete bundled jar archives.
2331 (delete-file-recursively "lib")
2333 (build-system ant-build-system)
2335 `(#:tests? #f ; no tests
2336 #:jar-name "junit.jar"))
2338 `(("java-hamcrest-core" ,java-hamcrest-core)))
2339 (home-page "http://junit.org/")
2340 (synopsis "Test framework for Java")
2342 "JUnit is a simple framework to write repeatable tests for Java projects.
2343 JUnit provides assertions for testing expected results, test fixtures for
2344 sharing common test data, and test runners for running tests.")
2345 (license license:epl1.0)))
2347 (define-public java-plexus-utils
2349 (name "java-plexus-utils")
2353 (uri (string-append "https://github.com/codehaus-plexus/"
2354 "plexus-utils/archive/plexus-utils-"
2358 "1mlwpc6fms24slygv5yvi6fi9hcha2fh0v73p5znpi78bg36i2js"))))
2359 (build-system ant-build-system)
2360 ;; FIXME: The default build.xml does not include a target to install
2363 `(#:jar-name "plexus-utils.jar"
2364 #:source-dir "src/main"
2366 (modify-phases %standard-phases
2367 (add-after 'unpack 'fix-reference-to-/bin-and-/usr
2369 (substitute* "src/main/java/org/codehaus/plexus/util/\
2370 cli/shell/BourneShell.java"
2371 (("/bin/sh") (which "sh"))
2372 (("/usr/") (getcwd)))
2374 (add-after 'unpack 'fix-or-disable-broken-tests
2376 (with-directory-excursion "src/test/java/org/codehaus/plexus/util"
2377 (substitute* '("cli/CommandlineTest.java"
2378 "cli/shell/BourneShellTest.java")
2379 (("/bin/sh") (which "sh"))
2380 (("/bin/echo") (which "echo")))
2382 ;; This test depends on MavenProjectStub, but we don't have
2383 ;; a package for Maven.
2384 (delete-file "introspection/ReflectionValueExtractorTest.java")
2386 ;; FIXME: The command line tests fail, maybe because they use
2388 (delete-file "cli/CommandlineTest.java"))
2391 `(("java-junit" ,java-junit)))
2392 (home-page "http://codehaus-plexus.github.io/plexus-utils/")
2393 (synopsis "Common utilities for the Plexus framework")
2394 (description "This package provides various Java utility classes for the
2395 Plexus framework to ease working with strings, files, command lines, XML and
2397 (license license:asl2.0)))
2399 (define-public java-plexus-interpolation
2401 (name "java-plexus-interpolation")
2405 (uri (string-append "https://github.com/codehaus-plexus/"
2406 "plexus-interpolation/archive/"
2407 "plexus-interpolation-" version ".tar.gz"))
2410 "03377yzlx5q440m6sxxgv6a5qb8fl30zzcgxgc0hxk5qgl2z1jjn"))))
2411 (build-system ant-build-system)
2413 `(#:jar-name "plexus-interpolation.jar"
2414 #:source-dir "src/main"))
2416 `(("java-junit" ,java-junit)
2417 ("java-hamcrest-core" ,java-hamcrest-core)))
2418 (home-page "http://codehaus-plexus.github.io/plexus-interpolation/")
2419 (synopsis "Java components for interpolating ${} strings and the like")
2420 (description "Plexus interpolator is a modular, flexible interpolation
2421 framework for the expression language style commonly seen in Maven, Plexus,
2422 and other related projects.
2424 It has its foundation in the @code{org.codehaus.plexus.utils.interpolation}
2425 package within @code{plexus-utils}, but has been separated in order to allow
2426 these two libraries to vary independently of one another.")
2427 (license license:asl2.0)))
2429 (define-public java-plexus-classworlds
2431 (name "java-plexus-classworlds")
2435 (uri (string-append "https://github.com/codehaus-plexus/"
2436 "plexus-classworlds/archive/plexus-classworlds-"
2440 "1qm4p0rl8d82lzhsiwnviw11jnq44s0gflg78zq152xyyr2xmh8g"))))
2441 (build-system ant-build-system)
2443 `(#:jar-name "plexus-classworlds.jar"
2444 #:source-dir "src/main"
2445 #:tests? #f));; FIXME: we need to generate some resources as in pom.xml
2447 `(("java-junit" ,java-junit)))
2448 (home-page "http://codehaus-plexus.github.io/plexus-classworlds/")
2449 (synopsis "Java class loader framework")
2450 (description "Plexus classworlds replaces the native ClassLoader mechanism
2451 of Java. It is especially usefull for dynamic loading of application
2453 (license license:asl2.0)))
2455 (define-public java-plexus-container-default-bootstrap
2457 (name "java-plexus-container-default-bootstrap")
2461 (uri (string-append "https://github.com/codehaus-plexus/plexus-containers"
2462 "/archive/plexus-containers-" version ".tar.gz"))
2465 "0xw5g30qf4a83608rw9v2hv8pfsz7d69dkdhk6r0wia4q78hh1pc"))))
2466 (build-system ant-build-system)
2468 `(#:jar-name "container-default.jar"
2469 #:source-dir "plexus-container-default/src/main/java"
2470 #:test-dir "plexus-container-default/src/test"
2472 #:tests? #f; requires plexus-archiver, which depends on this package
2474 (modify-phases %standard-phases
2475 (add-before 'build 'copy-resources
2478 "plexus-container-default/src/main/resources/"
2482 `(("worldclass" ,java-plexus-classworlds)
2483 ("xbean" ,java-geronimo-xbean-reflect)
2484 ("utils" ,java-plexus-utils)
2485 ("junit" ,java-junit)
2486 ("guava" ,java-guava)))
2487 (home-page "https://github.com/codehaus-plexus/plexus-containers")
2488 (synopsis "Inversion of controll container")
2489 (description "Plexus-default-container is Plexus' inversion-of-control
2490 (IoC) container. It is composed of its public API and its default
2492 (license license:asl2.0)))
2494 (define-public java-plexus-io
2496 (name "java-plexus-io")
2500 (uri (string-append "https://github.com/codehaus-plexus/plexus-io"
2501 "/archive/plexus-io-" version ".tar.gz"))
2504 "0f2j41kihaymxkpbm55smpxjja235vad8cgz94frfy3ppcp021dw"))))
2505 (build-system ant-build-system)
2507 `(#:jar-name "plexus-io.jar"
2508 #:source-dir "src/main/java"
2509 #:test-dir "src/test"
2512 (modify-phases %standard-phases
2513 (add-before 'build 'copy-resources
2515 (mkdir-p "build/classes/META-INF/plexus")
2516 (copy-file "src/main/resources/META-INF/plexus/components.xml"
2517 "build/classes/META-INF/plexus/components.xml")
2520 `(("utils" ,java-plexus-utils)
2521 ("commons-io" ,java-commons-io)
2522 ("java-jsr305" ,java-jsr305)))
2524 `(("junit" ,java-junit)
2525 ("hamcrest" ,java-hamcrest-core)
2526 ("guava" ,java-guava)
2527 ("classworlds" ,java-plexus-classworlds)
2528 ("xbean" ,java-geronimo-xbean-reflect)
2529 ("container-default" ,java-plexus-container-default-bootstrap)))
2530 (home-page "https://github.com/codehaus-plexus/plexus-io")
2531 (synopsis "I/O plexus components")
2532 (description "Plexus IO is a set of plexus components, which are designed
2533 for use in I/O operations. This implementation using plexus components allows
2534 reusing it in maven.")
2535 (license license:asl2.0)))
2537 (define-public java-plexus-archiver
2539 (name "java-plexus-archiver")
2543 (uri (string-append "https://github.com/codehaus-plexus/plexus-archiver"
2544 "/archive/plexus-archiver-" version ".tar.gz"))
2547 "0iv1j7khra6icqh3jndng3iipfmkc7l5jq2y802cm8r575v75pyv"))))
2548 (build-system ant-build-system)
2550 `(#:jar-name "plexus-archiver.jar"
2551 #:source-dir "src/main/java"
2553 #:test-dir "src/test"
2554 #:test-exclude (list "**/Abstract*.java" "**/Base*.java")
2556 (modify-phases %standard-phases
2557 (add-before 'check 'remove-failing
2559 ;; Requires an older version of plexus container
2561 "src/test/java/org/codehaus/plexus/archiver/DuplicateFilesTest.java")))
2562 (add-before 'build 'copy-resources
2564 (mkdir-p "build/classes/META-INF/plexus")
2565 (copy-file "src/main/resources/META-INF/plexus/components.xml"
2566 "build/classes/META-INF/plexus/components.xml")
2569 `(("utils" ,java-plexus-utils)
2570 ("commons-io" ,java-commons-io)
2571 ("snappy" ,java-iq80-snappy)
2572 ("io" ,java-plexus-io)
2573 ("compress" ,java-commons-compress)
2574 ("container-default" ,java-plexus-container-default-bootstrap)
2575 ("snappy" ,java-snappy)
2576 ("java-jsr305" ,java-jsr305)))
2578 `(("junit" ,java-junit)
2579 ("classworld" ,java-plexus-classworlds)
2580 ("xbean" ,java-geronimo-xbean-reflect)
2581 ("xz" ,java-tukaani-xz)
2582 ("guava" ,java-guava)))
2583 (home-page "https://github.com/codehaus-plexus/plexus-archiver")
2584 (synopsis "Archiver component of the Plexus project")
2585 (description "Plexus-archiver contains a component to deal with project
2587 (license license:asl2.0)))
2589 (define-public java-plexus-container-default
2591 (inherit java-plexus-container-default-bootstrap)
2592 (name "java-plexus-container-default")
2594 `(#:jar-name "container-default.jar"
2595 #:source-dir "plexus-container-default/src/main/java"
2596 #:test-dir "plexus-container-default/src/test"
2597 #:test-exclude (list ;"**/*Test.java"
2599 ;; Requires plexus-hierarchy
2600 "**/PlexusHierarchyTest.java"
2602 "**/ComponentRealmCompositionTest.java"
2603 "**/PlexusContainerTest.java")
2606 (modify-phases %standard-phases
2607 (add-before 'build 'copy-resources
2610 "plexus-container-default/src/main/resources/"
2613 (add-before 'check 'fix-paths
2615 (let ((dir "plexus-container-default/src/test/java/org/codehaus"))
2618 dir "/plexus/component/composition/"
2619 "ComponentRealmCompositionTest.java")
2620 (("src/test") "plexus-container-default/src/test"))
2623 `(("worldclass" ,java-plexus-classworlds)
2624 ("xbean" ,java-geronimo-xbean-reflect)
2625 ("utils" ,java-plexus-utils)
2626 ("junit" ,java-junit)
2627 ("guava" ,java-guava)))
2629 `(("archiver" ,java-plexus-archiver)
2630 ("hamcrest" ,java-hamcrest-core)))))
2632 (define-public java-asm
2638 (uri (string-append "http://download.forge.ow2.org/asm/"
2639 "asm-" version ".tar.gz"))
2642 "0kxvmv5275rnjl7jv0442k3wjnq03ngkb7sghs78avf45pzm4qgr"))))
2643 (build-system ant-build-system)
2645 `(#:build-target "compile"
2646 ;; The tests require an old version of Janino, which no longer compiles
2649 ;; We don't need these extra ant tasks, but the build system asks us to
2650 ;; provide a path anyway.
2651 #:make-flags (list (string-append "-Dobjectweb.ant.tasks.path=foo"))
2653 (modify-phases %standard-phases
2654 (add-before 'install 'build-jars
2655 (lambda* (#:key make-flags #:allow-other-keys)
2656 ;; We cannot use the "jar" target because it depends on a couple
2657 ;; of unpackaged, complicated tools.
2659 (zero? (system* "jar"
2660 "-cf" (string-append "dist/asm-" ,version ".jar")
2661 "-C" "output/build/tmp" "."))))
2663 (install-jars "dist")))))
2665 `(("java-junit" ,java-junit)))
2666 (home-page "http://asm.ow2.org/")
2667 (synopsis "Very small and fast Java bytecode manipulation framework")
2668 (description "ASM is an all purpose Java bytecode manipulation and
2669 analysis framework. It can be used to modify existing classes or dynamically
2670 generate classes, directly in binary form. The provided common
2671 transformations and analysis algorithms allow to easily assemble custom
2672 complex transformations and code analysis tools.")
2673 (license license:bsd-3)))
2675 (define-public java-cglib
2682 "https://github.com/cglib/cglib/archive/RELEASE_"
2683 (string-map (lambda (c) (if (char=? c #\.) #\_ c)) version)
2685 (file-name (string-append "cglib-" version ".tar.gz"))
2688 "162dvd4fln76ai8prfharf66pn6r56p3sxx683j5vdyccrd5hi1q"))))
2689 (build-system ant-build-system)
2691 `(;; FIXME: tests fail because junit runs
2692 ;; "net.sf.cglib.transform.AbstractTransformTest", which does not seem
2693 ;; to describe a test at all.
2695 #:jar-name "cglib.jar"
2697 (modify-phases %standard-phases
2698 (add-after 'unpack 'chdir
2699 (lambda _ (chdir "cglib") #t)))))
2701 `(("java-asm" ,java-asm)
2702 ("java-junit" ,java-junit)))
2703 (home-page "https://github.com/cglib/cglib/")
2704 (synopsis "Java byte code generation library")
2705 (description "The byte code generation library CGLIB is a high level API
2706 to generate and transform Java byte code.")
2707 (license license:asl2.0)))
2709 (define-public java-objenesis
2711 (name "java-objenesis")
2715 (uri (string-append "https://github.com/easymock/objenesis/"
2716 "archive/" version ".tar.gz"))
2717 (file-name (string-append "objenesis-" version ".tar.gz"))
2720 "1va5qz1i2wawwavhnxfzxnfgrcaflz9p1pg03irrjh4nd3rz8wh6"))))
2721 (build-system ant-build-system)
2723 `(#:jar-name "objenesis.jar"
2724 #:source-dir "main/src/"
2725 #:test-dir "main/src/test/"))
2727 `(("java-junit" ,java-junit)
2728 ("java-hamcrest-core" ,java-hamcrest-core)))
2729 (home-page "http://objenesis.org/")
2730 (synopsis "Bypass the constructor when creating an object")
2731 (description "Objenesis is a small Java library that serves one purpose:
2732 to instantiate a new object of a particular class. It is common to see
2733 restrictions in libraries stating that classes must require a default
2734 constructor. Objenesis aims to overcome these restrictions by bypassing the
2735 constructor on object instantiation.")
2736 (license license:asl2.0)))
2738 (define-public java-easymock
2740 (name "java-easymock")
2744 (uri (string-append "https://github.com/easymock/easymock/"
2745 "archive/easymock-" version ".tar.gz"))
2748 "1yzg0kv256ndr57gpav46cyv4a1ns5sj722l50zpxk3j6sk9hnmi"))))
2749 (build-system ant-build-system)
2751 `(#:jar-name "easymock.jar"
2752 #:source-dir "core/src/main"
2753 #:test-dir "core/src/test"
2755 (modify-phases %standard-phases
2756 ;; FIXME: Android support requires the following packages to be
2757 ;; available: com.google.dexmaker.stock.ProxyBuilder
2758 (add-after 'unpack 'delete-android-support
2760 (with-directory-excursion "core/src/main/java/org/easymock/internal"
2761 (substitute* "MocksControl.java"
2762 (("AndroidSupport.isAndroid\\(\\)") "false")
2763 (("return classProxyFactory = new AndroidClassProxyFactory\\(\\);") ""))
2764 (delete-file "AndroidClassProxyFactory.java"))
2766 (add-after 'unpack 'delete-broken-tests
2768 (with-directory-excursion "core/src/test/java/org/easymock"
2769 ;; This test depends on dexmaker.
2770 (delete-file "tests2/ClassExtensionHelperTest.java")
2772 ;; This is not a test.
2773 (delete-file "tests/BaseEasyMockRunnerTest.java")
2775 ;; This test should be executed with a different runner...
2776 (delete-file "tests2/EasyMockAnnotationsTest.java")
2777 ;; ...but deleting it means that we also have to delete these
2779 (delete-file "tests2/EasyMockRunnerTest.java")
2780 (delete-file "tests2/EasyMockRuleTest.java")
2782 ;; This test fails because the file "easymock.properties" does
2784 (delete-file "tests2/EasyMockPropertiesTest.java"))
2787 `(("java-asm" ,java-asm)
2788 ("java-cglib" ,java-cglib)
2789 ("java-objenesis" ,java-objenesis)))
2791 `(("java-junit" ,java-junit)
2792 ("java-hamcrest-core" ,java-hamcrest-core)))
2793 (home-page "http://easymock.org")
2794 (synopsis "Java library providing mock objects for unit tests")
2795 (description "EasyMock is a Java library that provides an easy way to use
2796 mock objects in unit testing.")
2797 (license license:asl2.0)))
2799 (define-public java-jmock-1
2805 (uri (string-append "https://github.com/jmock-developers/"
2806 "jmock-library/archive/" version ".tar.gz"))
2807 (file-name (string-append "jmock-" version ".tar.gz"))
2810 "0xmrlhq0fszldkbv281k9463mv496143vvmqwpxp62yzjvdkx9w0"))))
2811 (build-system ant-build-system)
2813 `(#:build-target "jars"
2814 #:test-target "run.tests"
2816 (modify-phases %standard-phases
2817 (replace 'install (install-jars "build")))))
2818 (home-page "http://www.jmock.org")
2819 (synopsis "Mock object library for test-driven development")
2820 (description "JMock is a library that supports test-driven development of
2821 Java code with mock objects. Mock objects help you design and test the
2822 interactions between the objects in your programs.
2827 @item makes it quick and easy to define mock objects
2828 @item lets you precisely specify the interactions between
2829 your objects, reducing the brittleness of your tests
2830 @item plugs into your favourite test framework
2831 @item is easy to extend.
2833 (license license:bsd-3)))
2835 (define-public java-jmock
2837 (inherit java-jmock-1)
2842 (uri (string-append "https://github.com/jmock-developers/"
2843 "jmock-library/archive/" version ".tar.gz"))
2844 (file-name (string-append name "-" version ".tar.gz"))
2847 "18650a9g8xffcsdb6w91pbswa7f40fp2sh6s3nclkclz5dbzq8f0"))))
2849 `(("java-hamcrest-all" ,java-hamcrest-all)
2850 ("java-asm" ,java-asm)
2851 ("java-bsh" ,java-bsh)
2852 ("java-junit" ,java-junit)))
2854 `(("cglib" ,java-cglib)))
2856 `(#:jar-name "java-jmock.jar"
2857 #:source-dir "jmock/src/main/java"
2858 #:test-dir "jmock/src/test"))))
2860 (define-public java-jmock-junit4
2862 (inherit java-jmock)
2863 (name "java-jmock-junit4")
2865 `(#:jar-name "java-jmock-junit4.jar"
2866 #:source-dir "jmock-junit4/src/main/java"
2867 #:test-dir "jmock-junit4/src/test"))
2869 `(("java-hamcrest-all" ,java-hamcrest-all)
2870 ("java-asm" ,java-asm)
2871 ("java-bsh" ,java-bsh)
2872 ("java-jmock" ,java-jmock)
2873 ("java-jumit" ,java-junit)))))
2875 (define-public java-jmock-legacy
2877 (inherit java-jmock)
2878 (name "java-jmock-legacy")
2880 `(#:jar-name "java-jmock-legacy.jar"
2881 #:source-dir "jmock-legacy/src/main/java"
2882 #:test-dir "jmock-legacy/src/test"
2884 (modify-phases %standard-phases
2885 (add-before 'check 'copy-tests
2887 ;; This file is a dependancy of some tests
2888 (let ((file "org/jmock/test/acceptance/PackageProtectedType.java"))
2889 (copy-file (string-append "jmock/src/test/java/" file)
2890 (string-append "jmock-legacy/src/test/java/" file))
2893 `(("java-hamcrest-all" ,java-hamcrest-all)
2894 ("java-objenesis" ,java-objenesis)
2895 ("java-cglib" ,java-cglib)
2896 ("java-jmock" ,java-jmock)
2897 ("java-asm" ,java-asm)
2898 ("java-bsh" ,java-bsh)
2899 ("java-junit" ,java-junit)))
2901 `(("java-jmock-junit4" ,java-jmock-junit4)))))
2903 (define-public java-hamcrest-all
2904 (package (inherit java-hamcrest-core)
2905 (name "java-hamcrest-all")
2907 (substitute-keyword-arguments (package-arguments java-hamcrest-core)
2908 ;; FIXME: a unit test fails because org.hamcrest.SelfDescribing is not
2909 ;; found, although it is part of the hamcrest-core library that has
2912 ;; Fixing this one test is insufficient, though, and upstream confirmed
2913 ;; that the latest hamcrest release fails its unit tests when built
2914 ;; with Java 7. See https://github.com/hamcrest/JavaHamcrest/issues/30
2916 ((#:build-target _) "bigjar")
2918 `(modify-phases ,phases
2919 ;; Some build targets override the classpath, so we need to patch
2920 ;; the build.xml to ensure that required dependencies are on the
2922 (add-after 'unpack 'patch-classpath-for-integration
2923 (lambda* (#:key inputs #:allow-other-keys)
2924 (substitute* "build.xml"
2925 ((" build/hamcrest-library-\\$\\{version\\}.jar" line)
2929 (find-files (assoc-ref inputs "java-hamcrest-core") "\\.jar$")
2930 (find-files (assoc-ref inputs "java-junit") "\\.jar$")
2931 (find-files (assoc-ref inputs "java-jmock") "\\.jar$")
2932 (find-files (assoc-ref inputs "java-easymock") "\\.jar$")))
2936 `(("java-junit" ,java-junit)
2937 ("java-jmock" ,java-jmock-1)
2938 ("java-easymock" ,java-easymock)
2939 ("java-hamcrest-core" ,java-hamcrest-core)
2940 ,@(package-inputs java-hamcrest-core)))))
2942 (define-public java-jopt-simple
2944 (name "java-jopt-simple")
2948 (uri (string-append "http://repo1.maven.org/maven2/"
2949 "net/sf/jopt-simple/jopt-simple/"
2950 version "/jopt-simple-"
2951 version "-sources.jar"))
2954 "1v8bzmwmw6qq20gm42xyay6vrd567dra4vqwhgjnqqjz1gs9f8qa"))))
2955 (build-system ant-build-system)
2957 `(#:tests? #f ; there are no tests
2958 #:jar-name "jopt-simple.jar"))
2959 (home-page "https://pholser.github.io/jopt-simple/")
2960 (synopsis "Java library for parsing command line options")
2961 (description "JOpt Simple is a Java library for parsing command line
2962 options, such as those you might pass to an invocation of @code{javac}. In
2963 the interest of striving for simplicity, as closely as possible JOpt Simple
2964 attempts to honor the command line option syntaxes of POSIX @code{getopt} and
2965 GNU @code{getopt_long}. It also aims to make option parser configuration and
2966 retrieval of options and their arguments simple and expressive, without being
2968 (license license:expat)))
2970 (define-public java-commons-math3
2972 (name "java-commons-math3")
2976 (uri (string-append "mirror://apache/commons/math/source/"
2977 "commons-math3-" version "-src.tar.gz"))
2980 "19l6yp44qc5g7wg816nbn5z3zq3xxzwimvbm4a8pczgvpi4i85s6"))))
2981 (build-system ant-build-system)
2983 `(#:build-target "jar"
2984 #:test-target "test"
2986 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
2987 (junit (assoc-ref %build-inputs "java-junit")))
2988 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
2989 (string-append "-Dhamcrest.jar=" hamcrest
2990 "/share/java/hamcrest-core.jar")))
2992 (modify-phases %standard-phases
2993 ;; We want to build the jar in the build phase and run the tests
2994 ;; later in a separate phase.
2995 (add-after 'unpack 'untangle-targets
2997 (substitute* "build.xml"
2998 (("name=\"jar\" depends=\"test\"")
2999 "name=\"jar\" depends=\"compile\""))
3001 ;; There is no install target.
3003 (install-jars "target")))))
3005 `(("java-junit" ,java-junit)
3006 ("java-hamcrest-core" ,java-hamcrest-core)))
3007 (home-page "http://commons.apache.org/math/")
3008 (synopsis "Apache Commons mathematics library")
3009 (description "Commons Math is a library of lightweight, self-contained
3010 mathematics and statistics components addressing the most common problems not
3011 available in the Java programming language or Commons Lang.")
3012 (license license:asl2.0)))
3014 (define-public java-jmh
3021 (url "http://hg.openjdk.java.net/code-tools/jmh/")
3022 (changeset version)))
3023 (file-name (string-append name "-" version "-checkout"))
3026 "1fxyxhg9famwcg1prc4cgwb5wzyxqavn3cjm5vz8605xz7x5k084"))))
3027 (build-system ant-build-system)
3029 `(#:jar-name "jmh-core.jar"
3030 #:source-dir "jmh-core/src/main"
3031 #:test-dir "jmh-core/src/test"
3033 (modify-phases %standard-phases
3034 ;; This seems to be a bug in the JDK. It may not be necessary in
3035 ;; future versions of the JDK.
3036 (add-after 'unpack 'fix-bug
3038 (with-directory-excursion
3039 "jmh-core/src/main/java/org/openjdk/jmh/runner/options"
3040 (substitute* '("IntegerValueConverter.java"
3041 "ThreadsValueConverter.java")
3042 (("public Class<Integer> valueType")
3043 "public Class<? extends Integer> valueType")))
3046 `(("java-jopt-simple" ,java-jopt-simple)
3047 ("java-commons-math3" ,java-commons-math3)))
3049 `(("java-junit" ,java-junit)
3050 ("java-hamcrest-core" ,java-hamcrest-core)))
3051 (home-page "http://openjdk.java.net/projects/code-tools/jmh/")
3052 (synopsis "Benchmark harness for the JVM")
3053 (description "JMH is a Java harness for building, running, and analysing
3054 nano/micro/milli/macro benchmarks written in Java and other languages
3055 targetting the JVM.")
3057 (license license:gpl2)))
3059 (define-public java-commons-collections4
3061 (name "java-commons-collections4")
3065 (uri (string-append "mirror://apache/commons/collections/source/"
3066 "commons-collections4-" version "-src.tar.gz"))
3069 "1krfhvggympq4avk7gh6qafzf6b9ip6r1m4lmacikyx04039m0wl"))))
3070 (build-system ant-build-system)
3072 `(#:test-target "test"
3074 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
3075 (junit (assoc-ref %build-inputs "java-junit"))
3076 (easymock (assoc-ref %build-inputs "java-easymock")))
3077 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
3078 (string-append "-Dhamcrest.jar=" hamcrest
3079 "/share/java/hamcrest-core.jar")
3080 (string-append "-Deasymock.jar=" easymock
3081 "/share/java/easymock.jar")))
3083 (modify-phases %standard-phases
3085 (install-jars "target")))))
3087 `(("java-junit" ,java-junit)
3088 ("java-hamcrest-core" ,java-hamcrest-core)
3089 ("java-easymock" ,java-easymock)))
3090 (home-page "http://commons.apache.org/collections/")
3091 (synopsis "Collections framework")
3092 (description "The Java Collections Framework is the recognised standard
3093 for collection handling in Java. Commons-Collections seek to build upon the
3094 JDK classes by providing new interfaces, implementations and utilities. There
3095 are many features, including:
3098 @item @code{Bag} interface for collections that have a number of copies of
3100 @item @code{BidiMap} interface for maps that can be looked up from value to
3101 key as well and key to value
3102 @item @code{MapIterator} interface to provide simple and quick iteration over
3104 @item Transforming decorators that alter each object as it is added to the
3106 @item Composite collections that make multiple collections look like one
3107 @item Ordered maps and sets that retain the order elements are added in,
3108 including an LRU based map
3109 @item Reference map that allows keys and/or values to be garbage collected
3111 @item Many comparator implementations
3112 @item Many iterator implementations
3113 @item Adapter classes from array and enumerations to collections
3114 @item Utilities to test or create typical set-theory properties of collections
3115 such as union, intersection, and closure.
3117 (license license:asl2.0)))
3119 (define-public java-commons-collections
3121 (inherit java-commons-collections4)
3122 (name "java-commons-collections")
3126 (uri (string-append "mirror://apache/commons/collections/source/"
3127 "commons-collections-" version "-src.tar.gz"))
3130 "055r51a5lfc3z7rkxnxmnn1npvkvda7636hjpm4qk7cnfzz98387"))))
3132 (substitute-keyword-arguments (package-arguments java-commons-collections4)
3134 `(modify-phases ,phases
3135 ;; The manifest is required by the build procedure
3136 (add-before 'build 'add-manifest
3138 (mkdir-p "build/conf")
3139 (call-with-output-file "build/conf/MANIFEST.MF"
3141 (format file "Manifest-Version: 1.0\n")))))
3143 (install-jars "build"))))))))
3145 (define java-commons-collections-test-classes
3147 (inherit java-commons-collections)
3149 `(#:jar-name "commons-collections-test-classes.jar"
3150 #:source-dir "src/test"
3153 `(("collection" ,java-commons-collections)))))
3155 (define-public java-commons-beanutils
3157 (name "java-commons-beanutils")
3161 (uri (string-append "mirror://apache/commons/beanutils/source/"
3162 "commons-beanutils-" version "-src.tar.gz"))
3165 "03cs0bq3sl1sdc7py9g3qnf8n9h473nrkvd3d251kaqv6a2ab7qk"))))
3166 (build-system ant-build-system)
3168 `(#:test-target "test"
3171 (modify-phases %standard-phases
3173 (lambda* (#:key outputs #:allow-other-keys)
3174 (rename-file (string-append "dist/commons-beanutils-" ,version
3176 "commons-beanutils.jar")
3177 (install-file "commons-beanutils.jar"
3178 (string-append (assoc-ref outputs "out") "/share/java/"))
3181 `(("logging" ,java-commons-logging-minimal)
3182 ("collections" ,java-commons-collections)))
3184 `(("junit" ,java-junit)
3185 ("collections-test" ,java-commons-collections-test-classes)))
3186 (home-page "http://commons.apache.org/beanutils/")
3187 (synopsis "Dynamically set or get properties in Java")
3188 (description "BeanUtils provides a simplified interface to reflection and
3189 introspection to set or get dynamically determined properties through their
3190 setter and getter method.")
3191 (license license:asl2.0)))
3193 (define-public java-commons-io
3195 (name "java-commons-io")
3200 (uri (string-append "mirror://apache/commons/io/source/"
3201 "commons-io-" version "-src.tar.gz"))
3204 "0q5y41jrcjvx9hzs47x5kdhnasdy6rm4bzqd2jxl02w717m7a7v3"))))
3205 (build-system ant-build-system)
3206 (outputs '("out" "doc"))
3208 `(#:test-target "test"
3210 (list (string-append "-Djunit.jar="
3211 (assoc-ref %build-inputs "java-junit")
3212 "/share/java/junit.jar"))
3214 (modify-phases %standard-phases
3215 (add-after 'build 'build-javadoc ant-build-javadoc)
3216 (replace 'install (install-jars "target"))
3217 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
3219 `(("java-junit" ,java-junit)
3220 ("java-hamcrest-core" ,java-hamcrest-core)))
3221 (home-page "http://commons.apache.org/io/")
3222 (synopsis "Common useful IO related classes")
3223 (description "Commons-IO contains utility classes, stream implementations,
3224 file filters and endian classes.")
3225 (license license:asl2.0)))
3227 (define-public java-commons-lang
3229 (name "java-commons-lang")
3234 (uri (string-append "mirror://apache/commons/lang/source/"
3235 "commons-lang-" version "-src.tar.gz"))
3237 (base32 "1mxwagqadzx1b2al7i0z1v0r235aj2njdyijf02szq0vhmqrfiq5"))))
3238 (build-system ant-build-system)
3239 (outputs '("out" "doc"))
3241 `(#:test-target "test"
3243 (modify-phases %standard-phases
3244 (add-after 'build 'build-javadoc ant-build-javadoc)
3245 (add-before 'check 'disable-failing-test
3247 ;; Disable a failing test
3248 (substitute* "src/test/java/org/apache/commons/lang/\
3249 time/FastDateFormatTest.java"
3250 (("public void testFormat\\(\\)")
3251 "public void disabled_testFormat()"))
3253 (replace 'install (install-jars "target"))
3254 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
3256 `(("java-junit" ,java-junit)))
3257 (home-page "http://commons.apache.org/lang/")
3258 (synopsis "Extension of the java.lang package")
3259 (description "The Commons Lang components contains a set of Java classes
3260 that provide helper methods for standard Java classes, especially those found
3261 in the @code{java.lang} package in the Sun JDK. The following classes are
3265 @item StringUtils - Helper for @code{java.lang.String}.
3266 @item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets
3267 of characters such as @code{[a-z]} and @code{[abcdez]}.
3268 @item RandomStringUtils - Helper for creating randomised strings.
3269 @item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
3270 @item NumberRange - A range of numbers with an upper and lower bound.
3271 @item ObjectUtils - Helper for @code{java.lang.Object}.
3272 @item SerializationUtils - Helper for serializing objects.
3273 @item SystemUtils - Utility class defining the Java system properties.
3274 @item NestedException package - A sub-package for the creation of nested
3276 @item Enum package - A sub-package for the creation of enumerated types.
3277 @item Builder package - A sub-package for the creation of @code{equals},
3278 @code{hashCode}, @code{compareTo} and @code{toString} methods.
3280 (license license:asl2.0)))
3282 (define-public java-commons-lang3
3284 (name "java-commons-lang3")
3289 (uri (string-append "mirror://apache/commons/lang/source/"
3290 "commons-lang3-" version "-src.tar.gz"))
3292 (base32 "0xpshb9spjhplq5a7mr0y1bgfw8190ik4xj8f569xidfcki1d6kg"))))
3293 (build-system ant-build-system)
3294 (outputs '("out" "doc"))
3296 `(#:test-target "test"
3298 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-all"))
3299 (junit (assoc-ref %build-inputs "java-junit"))
3300 (easymock (assoc-ref %build-inputs "java-easymock"))
3301 (io (assoc-ref %build-inputs "java-commons-io")))
3302 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
3303 (string-append "-Dhamcrest.jar=" hamcrest
3304 "/share/java/hamcrest-all.jar")
3305 (string-append "-Dcommons-io.jar=" io
3306 "/share/java/commons-io-"
3307 ,(package-version java-commons-io)
3309 (string-append "-Deasymock.jar=" easymock
3310 "/share/java/easymock.jar")))
3312 (modify-phases %standard-phases
3313 (add-after 'build 'build-javadoc ant-build-javadoc)
3314 (replace 'install (install-jars "target"))
3315 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
3317 `(("java-junit" ,java-junit)
3318 ("java-commons-io" ,java-commons-io)
3319 ("java-hamcrest-all" ,java-hamcrest-all)
3320 ("java-easymock" ,java-easymock)))
3321 (home-page "http://commons.apache.org/lang/")
3322 (synopsis "Extension of the java.lang package")
3323 (description "The Commons Lang components contains a set of Java classes
3324 that provide helper methods for standard Java classes, especially those found
3325 in the @code{java.lang} package. The following classes are included:
3328 @item StringUtils - Helper for @code{java.lang.String}.
3329 @item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets of
3330 characters such as @code{[a-z]} and @code{[abcdez]}.
3331 @item RandomStringUtils - Helper for creating randomised strings.
3332 @item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
3333 @item NumberRange - A range of numbers with an upper and lower bound.
3334 @item ObjectUtils - Helper for @code{java.lang.Object}.
3335 @item SerializationUtils - Helper for serializing objects.
3336 @item SystemUtils - Utility class defining the Java system properties.
3337 @item NestedException package - A sub-package for the creation of nested
3339 @item Enum package - A sub-package for the creation of enumerated types.
3340 @item Builder package - A sub-package for the creation of @code{equals},
3341 @code{hashCode}, @code{compareTo} and @code{toString} methods.
3343 (license license:asl2.0)))
3345 (define-public java-jsr305
3347 (name "java-jsr305")
3351 (uri (string-append "https://repo1.maven.org/maven2/"
3352 "com/google/code/findbugs/"
3353 "jsr305/" version "/jsr305-"
3354 version "-sources.jar"))
3357 "1rh6jin9v7jqpq3kf1swl868l8i94r636n03pzpsmgr8v0lh9j2n"))))
3358 (build-system ant-build-system)
3360 `(#:tests? #f ; no tests included
3361 #:jar-name "jsr305.jar"))
3362 (home-page "http://findbugs.sourceforge.net/")
3363 (synopsis "Annotations for the static analyzer called findbugs")
3364 (description "This package provides annotations for the findbugs package.
3365 It provides packages in the @code{javax.annotations} namespace.")
3366 (license license:asl2.0)))
3368 (define-public java-guava
3371 ;; This is the last release of Guava that can be built with Java 7.
3375 (uri (string-append "https://github.com/google/guava/"
3376 "releases/download/v" version
3377 "/guava-" version "-sources.jar"))
3380 "1gawrs5gi6j5hcfxdgpnfli75vb9pfi4sn09pnc8xacr669yajwr"))))
3381 (build-system ant-build-system)
3383 `(#:tests? #f ; no tests included
3384 #:jar-name "guava.jar"
3386 (modify-phases %standard-phases
3387 (add-after 'unpack 'trim-sources
3389 (with-directory-excursion "src/com/google/common"
3390 ;; Remove annotations to avoid extra dependencies:
3391 ;; * "j2objc" annotations are used when converting Java to
3393 ;; * "errorprone" annotations catch common Java mistakes at
3395 ;; * "IgnoreJRERequirement" is used for Android.
3396 (substitute* (find-files "." "\\.java$")
3397 (("import com.google.j2objc.*") "")
3398 (("import com.google.errorprone.annotation.*") "")
3399 (("import org.codehaus.mojo.animal_sniffer.*") "")
3400 (("@CanIgnoreReturnValue") "")
3403 (("@RetainedWith") "")
3405 (("@ForOverride") "")
3406 (("@J2ObjCIncompatible") "")
3407 (("@IgnoreJRERequirement") "")))
3410 `(("java-jsr305" ,java-jsr305)))
3411 (home-page "https://github.com/google/guava")
3412 (synopsis "Google core libraries for Java")
3413 (description "Guava is a set of core libraries that includes new
3414 collection types (such as multimap and multiset), immutable collections, a
3415 graph library, functional types, an in-memory cache, and APIs/utilities for
3416 concurrency, I/O, hashing, primitives, reflection, string processing, and much
3418 (license license:asl2.0)))
3420 ;; The java-commons-logging package provides adapters to many different
3421 ;; logging frameworks. To avoid an excessive dependency graph we try to build
3422 ;; it with only a minimal set of adapters.
3423 (define-public java-commons-logging-minimal
3425 (name "java-commons-logging-minimal")
3429 (uri (string-append "mirror://apache/commons/logging/source/"
3430 "commons-logging-" version "-src.tar.gz"))
3433 "10bwcy5w8d7y39n0krlwhnp8ds3kj5zhmzj0zxnkw0qdlsjmsrj9"))))
3434 (build-system ant-build-system)
3436 `(#:tests? #f ; avoid dependency on logging frameworks
3437 #:jar-name "commons-logging-minimal.jar"
3439 (modify-phases %standard-phases
3440 (add-after 'unpack 'delete-adapters-and-tests
3442 ;; Delete all adapters except for NoOpLog, SimpleLog, and
3443 ;; LogFactoryImpl. NoOpLog is required to build; LogFactoryImpl
3444 ;; is used by applications; SimpleLog is the only actually usable
3445 ;; implementation that does not depend on another logging
3449 (delete-file (string-append
3450 "src/main/java/org/apache/commons/logging/impl/" file)))
3451 (list "Jdk13LumberjackLogger.java"
3452 "WeakHashtable.java"
3454 "ServletContextCleaner.java"
3457 "LogKitLogger.java"))
3458 (delete-file-recursively "src/test")
3460 (home-page "http://commons.apache.org/logging/")
3461 (synopsis "Common API for logging implementations")
3462 (description "The Logging package is a thin bridge between different
3463 logging implementations. A library that uses the commons-logging API can be
3464 used with any logging implementation at runtime.")
3465 (license license:asl2.0)))
3467 ;; This is the last release of the 1.x series.
3468 (define-public java-mockito-1
3470 (name "java-mockito")
3474 (uri (string-append "http://repo1.maven.org/maven2/"
3475 "org/mockito/mockito-core/" version
3476 "/mockito-core-" version "-sources.jar"))
3479 "0vmiwnwpf83g2q7kj1rislmja8fpvqkixjhawh7nxnygx6pq11kc"))))
3480 (build-system ant-build-system)
3482 `(#:jar-name "mockito.jar"
3483 #:tests? #f ; no tests included
3484 ;; FIXME: patch-and-repack does not support jars, so we have to apply
3485 ;; patches in build phases.
3487 (modify-phases %standard-phases
3488 ;; Mockito was developed against a different version of hamcrest,
3489 ;; which does not require matcher implementations to provide an
3490 ;; implementation of the "describeMismatch" method. We add this
3491 ;; simple definition to pass the build with our version of hamcrest.
3492 (add-after 'unpack 'fix-hamcrest-build-error
3494 (substitute* "src/org/mockito/internal/matchers/LocalizedMatcher.java"
3495 (("public Matcher getActualMatcher\\(\\) .*" line)
3497 public void describeMismatch(Object item, Description description) {
3498 actualMatcher.describeMismatch(item, description);
3502 ;; Mockito bundles cglib. We have a cglib package, so let's use
3504 (add-after 'unpack 'use-system-libraries
3506 (with-directory-excursion "src/org/mockito/internal/creation/cglib"
3507 (substitute* '("CGLIBHacker.java"
3508 "CglibMockMaker.java"
3509 "ClassImposterizer.java"
3510 "DelegatingMockitoMethodProxy.java"
3511 "MethodInterceptorFilter.java"
3512 "MockitoNamingPolicy.java"
3513 "SerializableMockitoMethodProxy.java"
3514 "SerializableNoOp.java")
3515 (("import org.mockito.cglib") "import net.sf.cglib")))
3518 `(("java-junit" ,java-junit)
3519 ("java-objenesis" ,java-objenesis)
3520 ("java-cglib" ,java-cglib)
3521 ("java-hamcrest-core" ,java-hamcrest-core)))
3522 (home-page "http://mockito.org")
3523 (synopsis "Mockito is a mock library for Java")
3524 (description "Mockito is a mocking library for Java which lets you write
3525 tests with a clean and simple API. It generates mocks using reflection, and
3526 it records all mock invocations, including methods arguments.")
3527 (license license:asl2.0)))
3529 (define-public java-httpcomponents-httpcore
3531 (name "java-httpcomponents-httpcore")
3535 (uri (string-append "mirror://apache//httpcomponents/httpcore/"
3536 "source/httpcomponents-core-"
3537 version "-src.tar.gz"))
3540 "02bwcf38y4vgwq7kj2s6q7qrmma641r5lacivm16kgxvb2j6h1vy"))))
3541 (build-system ant-build-system)
3543 `(#:jar-name "httpcomponents-httpcore.jar"
3545 (modify-phases %standard-phases
3546 (add-after 'unpack 'chdir
3547 (lambda _ (chdir "httpcore") #t)))))
3549 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)
3550 ("java-commons-lang3" ,java-commons-lang3)))
3552 `(("java-junit" ,java-junit)
3553 ("java-mockito" ,java-mockito-1)))
3554 (home-page "https://hc.apache.org/httpcomponents-core-4.4.x/index.html")
3555 (synopsis "Low level HTTP transport components")
3556 (description "HttpCore is a set of low level HTTP transport components
3557 that can be used to build custom client and server side HTTP services with a
3558 minimal footprint. HttpCore supports two I/O models: blocking I/O model based
3559 on the classic Java I/O and non-blocking, event driven I/O model based on Java
3562 This package provides the blocking I/O model library.")
3563 (license license:asl2.0)))
3565 (define-public java-httpcomponents-httpcore-nio
3566 (package (inherit java-httpcomponents-httpcore)
3567 (name "java-httpcomponents-httpcore-nio")
3569 `(#:jar-name "httpcomponents-httpcore-nio.jar"
3571 (modify-phases %standard-phases
3572 (add-after 'unpack 'chdir
3573 (lambda _ (chdir "httpcore-nio") #t)))))
3575 `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
3576 ("java-hamcrest-core" ,java-hamcrest-core)
3577 ,@(package-inputs java-httpcomponents-httpcore)))
3578 (description "HttpCore is a set of low level HTTP transport components
3579 that can be used to build custom client and server side HTTP services with a
3580 minimal footprint. HttpCore supports two I/O models: blocking I/O model based
3581 on the classic Java I/O and non-blocking, event driven I/O model based on Java
3584 This package provides the non-blocking I/O model library based on Java
3587 (define-public java-httpcomponents-httpcore-ab
3588 (package (inherit java-httpcomponents-httpcore)
3589 (name "java-httpcomponents-httpcore-ab")
3591 `(#:jar-name "httpcomponents-httpcore-ab.jar"
3593 (modify-phases %standard-phases
3594 (add-after 'unpack 'chdir
3595 (lambda _ (chdir "httpcore-ab") #t)))))
3597 `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
3598 ("java-commons-cli" ,java-commons-cli)
3599 ("java-hamcrest-core" ,java-hamcrest-core)
3600 ,@(package-inputs java-httpcomponents-httpcore)))
3601 (synopsis "Apache HttpCore benchmarking tool")
3602 (description "This package provides the HttpCore benchmarking tool. It is
3603 an Apache AB clone based on HttpCore.")))
3605 (define-public java-httpcomponents-httpclient
3607 (name "java-httpcomponents-httpclient")
3611 (uri (string-append "mirror://apache/httpcomponents/httpclient/"
3612 "source/httpcomponents-client-"
3613 version "-src.tar.gz"))
3616 "1428399s7qy3cim5wc6f3ks4gl9nf9vkjpfmnlap3jflif7g2pj1"))))
3617 (build-system ant-build-system)
3619 `(#:jar-name "httpcomponents-httpclient.jar"
3621 (modify-phases %standard-phases
3622 (add-after 'unpack 'chdir
3623 (lambda _ (chdir "httpclient") #t)))))
3625 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)
3626 ("java-commons-codec" ,java-commons-codec)
3627 ("java-hamcrest-core" ,java-hamcrest-core)
3628 ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
3629 ("java-mockito" ,java-mockito-1)
3630 ("java-junit" ,java-junit)))
3631 (home-page "https://hc.apache.org/httpcomponents-client-ga/")
3632 (synopsis "HTTP client library for Java")
3633 (description "Although the @code{java.net} package provides basic
3634 functionality for accessing resources via HTTP, it doesn't provide the full
3635 flexibility or functionality needed by many applications. @code{HttpClient}
3636 seeks to fill this void by providing an efficient, up-to-date, and
3637 feature-rich package implementing the client side of the most recent HTTP
3638 standards and recommendations.")
3639 (license license:asl2.0)))
3641 (define-public java-httpcomponents-httpmime
3642 (package (inherit java-httpcomponents-httpclient)
3643 (name "java-httpcomponents-httpmime")
3645 `(#:jar-name "httpcomponents-httpmime.jar"
3647 (modify-phases %standard-phases
3648 (add-after 'unpack 'chdir
3649 (lambda _ (chdir "httpmime") #t)))))
3651 `(("java-httpcomponents-httpclient" ,java-httpcomponents-httpclient)
3652 ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
3653 ("java-junit" ,java-junit)
3654 ("java-hamcrest-core" ,java-hamcrest-core)))))
3656 (define-public java-commons-net
3658 (name "java-commons-net")
3662 (uri (string-append "mirror://apache/commons/net/source/"
3663 "commons-net-" version "-src.tar.gz"))
3666 "0n0cmnddk9qdqhjvka8pc6hd9mn2qi3166f1s6xk32h7rfy1adxr"))))
3667 (build-system ant-build-system)
3669 `(;; FIXME: MainTest.java tries to read "examples.properties" (which
3670 ;; should be "resources/examples/examples.properties"), but gets "null"
3673 #:jar-name "commons-net.jar"))
3675 `(("java-junit" ,java-junit)
3676 ("java-hamcrest-core" ,java-hamcrest-core)))
3677 (home-page "http://commons.apache.org/net/")
3678 (synopsis "Client library for many basic Internet protocols")
3679 (description "The Apache Commons Net library implements the client side of
3680 many basic Internet protocols. The purpose of the library is to provide
3681 fundamental protocol access, not higher-level abstractions.")
3682 (license license:asl2.0)))
3684 (define-public java-jsch
3690 (uri (string-append "mirror://sourceforge/jsch/jsch/"
3691 version "/jsch-" version ".zip"))
3694 "029rdddyq1mh3ghryh3ki99kba1xkf1d1swjv2vi6lk6zzjy2wdb"))))
3695 (build-system ant-build-system)
3697 `(#:build-target "dist"
3698 #:tests? #f ; no tests included
3700 (modify-phases %standard-phases
3701 (replace 'install (install-jars "dist")))))
3703 `(("unzip" ,unzip)))
3704 (home-page "http://www.jcraft.com/jsch/")
3705 (synopsis "Pure Java implementation of SSH2")
3706 (description "JSch is a pure Java implementation of SSH2. JSch allows you
3707 to connect to an SSH server and use port forwarding, X11 forwarding, file
3708 transfer, etc., and you can integrate its functionality into your own Java
3710 (license license:bsd-3)))
3712 (define-public java-commons-compress
3714 (name "java-commons-compress")
3718 (uri (string-append "mirror://apache/commons/compress/source/"
3719 "commons-compress-" version "-src.tar.gz"))
3722 "1vjqvavrn0babffn1kciz6v52ibwq2vwhzlb95hazis3lgllnxc8"))))
3723 (build-system ant-build-system)
3725 `(#:jar-name "commons-compress.jar"
3727 (modify-phases %standard-phases
3728 (add-after 'unpack 'delete-bad-tests
3730 (with-directory-excursion "src/test/java/org/apache/commons/compress/"
3731 ;; FIXME: These tests really should not fail. Maybe they are
3732 ;; indicative of problems with our Java packaging work.
3734 ;; This test fails with a null pointer exception.
3735 (delete-file "archivers/sevenz/SevenZOutputFileTest.java")
3736 ;; This test fails to open test resources.
3737 (delete-file "archivers/zip/ExplodeSupportTest.java")
3739 ;; FIXME: This test adds a dependency on powermock, which is hard to
3740 ;; package at this point.
3741 ;; https://github.com/powermock/powermock
3742 (delete-file "archivers/sevenz/SevenZNativeHeapTest.java"))
3745 `(("java-junit" ,java-junit)
3746 ("java-hamcrest-core" ,java-hamcrest-core)
3747 ("java-mockito" ,java-mockito-1)
3748 ("java-xz" ,java-xz)))
3749 (home-page "https://commons.apache.org/proper/commons-compress/")
3750 (synopsis "Java library for working with compressed files")
3751 (description "The Apache Commons Compress library defines an API for
3752 working with compressed files such as ar, cpio, Unix dump, tar, zip, gzip, XZ,
3753 Pack200, bzip2, 7z, arj, lzma, snappy, DEFLATE, lz4 and Z files.")
3754 (license license:asl2.0)))
3756 (define-public java-commons-csv
3758 (name "java-commons-csv")
3762 (uri (string-append "mirror://apache/commons/csv/source/"
3763 "commons-csv-" version "-src.tar.gz"))
3766 "1l89m0fm2s3xx3v3iynvangymfg2vlyngaj6fgsi457nmsw7m7ij"))))
3767 (build-system ant-build-system)
3769 `(#:jar-name "commons-csv.jar"
3770 #:source-dir "src/main/java"
3771 #:tests? #f)); FIXME: requires java-h2
3773 `(("java-hamcrest-core" ,java-hamcrest-core)
3774 ("java-commons-io" ,java-commons-io)
3775 ("java-commons-lang3" ,java-commons-lang3)
3776 ("junit" ,java-junit)))
3777 (home-page "https://commons.apache.org/proper/commons-csv/")
3778 (synopsis "Read and write CSV documents")
3779 (description "Commons CSV reads and writes files in variations of the Comma
3780 Separated Value (CSV) format. The most common CSV formats are predefined in the
3784 @item Microsoft Excel
3785 @item Informix UNLOAD
3786 @item Informix UNLOAD CSV
3792 Custom formats can be created using a fluent style API.")
3793 (license license:asl2.0)))
3795 (define-public java-osgi-annotation
3797 (name "java-osgi-annotation")
3801 (uri (string-append "https://repo1.maven.org/maven2/"
3802 "org/osgi/org.osgi.annotation/" version "/"
3803 "org.osgi.annotation-" version "-sources.jar"))
3806 "1q718mb7gqg726rh6pc2hcisn8v50nv35abbir0jypmffhiii85w"))))
3807 (build-system ant-build-system)
3809 `(#:tests? #f ; no tests
3810 #:jar-name "osgi-annotation.jar"))
3811 (home-page "http://www.osgi.org")
3812 (synopsis "Annotation module of OSGi framework")
3814 "OSGi, for Open Services Gateway initiative framework, is a module system
3815 and service platform for the Java programming language. This package contains
3816 the OSGi annotation module, providing additional services to help dynamic
3818 (license license:asl2.0)))
3820 (define-public java-osgi-core
3822 (name "java-osgi-core")
3826 (uri (string-append "https://repo1.maven.org/maven2/"
3827 "org/osgi/org.osgi.core/" version "/"
3828 "org.osgi.core-" version "-sources.jar"))
3831 "19bpf5jx32jq9789gyhin35q5v7flmw0p9mk7wbgqpxqfmxyiabv"))))
3832 (build-system ant-build-system)
3834 `(#:tests? #f ; no tests
3835 #:jar-name "osgi-core.jar"))
3837 `(("java-osgi-annotation" ,java-osgi-annotation)))
3838 (home-page "http://www.osgi.org")
3839 (synopsis "Core module of OSGi framework")
3841 "OSGi, for Open Services Gateway initiative framework, is a module system
3842 and service platform for the Java programming language. This package contains
3843 the OSGi Core module.")
3844 (license license:asl2.0)))
3846 (define-public java-osgi-service-event
3848 (name "java-osgi-service-event")
3852 (uri (string-append "https://repo1.maven.org/maven2/"
3853 "org/osgi/org.osgi.service.event/"
3854 version "/org.osgi.service.event-"
3855 version "-sources.jar"))
3858 "1nyhlgagwym75bycnjczwbnpymv2iw84zbhvvzk84g9q736i6qxm"))))
3859 (build-system ant-build-system)
3861 `(#:tests? #f ; no tests
3862 #:jar-name "osgi-service-event.jar"))
3864 `(("java-osgi-annotation" ,java-osgi-annotation)
3865 ("java-osgi-core" ,java-osgi-core)))
3866 (home-page "http://www.osgi.org")
3867 (synopsis "OSGi service event module")
3869 "OSGi, for Open Services Gateway initiative framework, is a module system
3870 and service platform for the Java programming language. This package contains
3871 the OSGi @code{org.osgi.service.event} module.")
3872 (license license:asl2.0)))
3874 (define-public java-eclipse-osgi
3876 (name "java-eclipse-osgi")
3880 (uri (string-append "https://repo1.maven.org/maven2/"
3881 "org/eclipse/platform/org.eclipse.osgi/"
3882 version "/org.eclipse.osgi-"
3883 version "-sources.jar"))
3886 "00cqc6lb29n0zv68b4l842vzkwawvbr7gshfdygsk8sicvcq2c7b"))))
3887 (build-system ant-build-system)
3889 `(#:tests? #f ; no tests included
3890 #:jar-name "eclipse-equinox-osgi.jar"))
3892 `(("java-osgi-annotation" ,java-osgi-annotation)))
3893 (home-page "http://www.eclipse.org/equinox/")
3894 (synopsis "Eclipse Equinox OSGi framework")
3895 (description "This package provides an implementation of the OSGi Core
3897 (license license:epl1.0)))
3899 (define-public java-eclipse-equinox-common
3901 (name "java-eclipse-equinox-common")
3905 (uri (string-append "https://repo1.maven.org/maven2/"
3906 "org/eclipse/platform/org.eclipse.equinox.common/"
3907 version "/org.eclipse.equinox.common-"
3908 version "-sources.jar"))
3911 "12aazpkgw46r1qj0pr421jzwhbmsizd97r37krd7njnbrdgfzksc"))))
3912 (build-system ant-build-system)
3914 `(#:tests? #f ; no tests included
3915 #:jar-name "eclipse-equinox-common.jar"))
3917 `(("java-eclipse-osgi" ,java-eclipse-osgi)))
3918 (home-page "http://www.eclipse.org/equinox/")
3919 (synopsis "Common Eclipse runtime")
3920 (description "This package provides the common Eclipse runtime.")
3921 (license license:epl1.0)))
3923 (define-public java-eclipse-core-jobs
3925 (name "java-eclipse-core-jobs")
3929 (uri (string-append "https://repo1.maven.org/maven2/"
3930 "org/eclipse/platform/org.eclipse.core.jobs/"
3931 version "/org.eclipse.core.jobs-"
3932 version "-sources.jar"))
3935 "0395b8lh0km8vhzjnchvs1rii1qz48hyvb2wqfaq4yhklbwihq4b"))))
3936 (build-system ant-build-system)
3938 `(#:tests? #f ; no tests included
3939 #:jar-name "eclipse-core-jobs.jar"))
3941 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
3942 ("java-eclipse-osgi" ,java-eclipse-osgi)))
3943 (home-page "http://www.eclipse.org/equinox/")
3944 (synopsis "Eclipse jobs mechanism")
3945 (description "This package provides the Eclipse jobs mechanism.")
3946 (license license:epl1.0)))
3948 (define-public java-eclipse-equinox-registry
3950 (name "java-eclipse-equinox-registry")
3954 (uri (string-append "https://repo1.maven.org/maven2/"
3955 "org/eclipse/platform/org.eclipse.equinox.registry/"
3956 version "/org.eclipse.equinox.registry-"
3957 version "-sources.jar"))
3960 "1i9sgymh2fy5vdgk5y7s3qvrlbgh4l93ddqi3v4zmca7hwrlhf9k"))))
3961 (build-system ant-build-system)
3963 `(#:tests? #f ; no tests included
3964 #:jar-name "eclipse-equinox-registry.jar"))
3966 `(("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
3967 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
3968 ("java-eclipse-osgi" ,java-eclipse-osgi)))
3969 (home-page "http://www.eclipse.org/equinox/")
3970 (synopsis "Eclipse extension registry support")
3971 (description "This package provides support for the Eclipse extension
3973 (license license:epl1.0)))
3975 (define-public java-eclipse-equinox-app
3977 (name "java-eclipse-equinox-app")
3981 (uri (string-append "https://repo1.maven.org/maven2/"
3982 "org/eclipse/platform/org.eclipse.equinox.app/"
3983 version "/org.eclipse.equinox.app-"
3984 version "-sources.jar"))
3987 "0nhvbp93y203ar7y59gb0mz3w2d3jlqhr0c9hii9bcfpmr7imdab"))))
3988 (build-system ant-build-system)
3990 `(#:tests? #f ; no tests included
3991 #:jar-name "eclipse-equinox-app.jar"))
3993 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
3994 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
3995 ("java-eclipse-osgi" ,java-eclipse-osgi)
3996 ("java-osgi-service-event" ,java-osgi-service-event)))
3997 (home-page "http://www.eclipse.org/equinox/")
3998 (synopsis "Equinox application container")
3999 (description "This package provides the Equinox application container for
4001 (license license:epl1.0)))
4003 (define-public java-eclipse-equinox-preferences
4005 (name "java-eclipse-equinox-preferences")
4009 (uri (string-append "https://repo1.maven.org/maven2/"
4010 "org/eclipse/platform/org.eclipse.equinox.preferences/"
4011 version "/org.eclipse.equinox.preferences-"
4012 version "-sources.jar"))
4015 "0k7w6c141sqym4fy3af0qkwpy4pdh2vsjpjba6rp5fxyqa24v0a2"))))
4016 (build-system ant-build-system)
4018 `(#:tests? #f ; no tests included
4019 #:jar-name "eclipse-equinox-preferences.jar"))
4021 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
4022 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
4023 ("java-eclipse-osgi" ,java-eclipse-osgi)))
4024 (home-page "http://www.eclipse.org/equinox/")
4025 (synopsis "Eclipse preferences mechanism")
4026 (description "This package provides the Eclipse preferences mechanism with
4027 the module @code{org.eclipse.equinox.preferences}.")
4028 (license license:epl1.0)))
4030 (define-public java-eclipse-core-contenttype
4032 (name "java-eclipse-core-contenttype")
4036 (uri (string-append "https://repo1.maven.org/maven2/"
4037 "org/eclipse/platform/org.eclipse.core.contenttype/"
4038 version "/org.eclipse.core.contenttype-"
4039 version "-sources.jar"))
4042 "1wcqcv7ijwv5rh748vz3x9pkmjl9w1r0k0026k56n8yjl4rrmspi"))))
4043 (build-system ant-build-system)
4045 `(#:tests? #f ; no tests included
4046 #:jar-name "eclipse-core-contenttype.jar"))
4048 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
4049 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
4050 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
4051 ("java-eclipse-osgi" ,java-eclipse-osgi)))
4052 (home-page "http://www.eclipse.org/")
4053 (synopsis "Eclipse content mechanism")
4054 (description "This package provides the Eclipse content mechanism in the
4055 @code{org.eclipse.core.contenttype} module.")
4056 (license license:epl1.0)))
4058 (define-public java-eclipse-core-runtime
4060 (name "java-eclipse-core-runtime")
4064 (uri (string-append "https://repo1.maven.org/maven2/"
4065 "org/eclipse/platform/org.eclipse.core.runtime/"
4066 version "/org.eclipse.core.runtime-"
4067 version "-sources.jar"))
4070 "16mkf8jgj35pgzms7w1gyfq0gfm4ixw6c5xbbxzdj1la56c758ya"))))
4071 (build-system ant-build-system)
4073 `(#:tests? #f ; no tests included
4074 #:jar-name "eclipse-core-runtime.jar"))
4076 `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
4077 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
4078 ("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
4079 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
4080 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
4081 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
4082 ("java-eclipse-osgi" ,java-eclipse-osgi)))
4083 (home-page "https://www.eclipse.org/")
4084 (synopsis "Eclipse core runtime")
4085 (description "This package provides the Eclipse core runtime with the
4086 module @code{org.eclipse.core.runtime}.")
4087 (license license:epl1.0)))
4089 (define-public java-eclipse-core-filesystem
4091 (name "java-eclipse-core-filesystem")
4095 (uri (string-append "https://repo1.maven.org/maven2/"
4096 "org/eclipse/platform/org.eclipse.core.filesystem/"
4097 version "/org.eclipse.core.filesystem-"
4098 version "-sources.jar"))
4101 "0km1bhwjim4rfy3pkvjhvy31kgsyf2ncx0mlkmbf5n6g57pphdyj"))))
4102 (build-system ant-build-system)
4104 `(#:tests? #f ; no tests included
4105 #:jar-name "eclipse-core-filesystem.jar"))
4107 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
4108 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
4109 ("java-eclipse-osgi" ,java-eclipse-osgi)))
4110 (home-page "https://www.eclipse.org/")
4111 (synopsis "Eclipse core file system")
4112 (description "This package provides the Eclipse core file system with the
4113 module @code{org.eclipse.core.filesystem}.")
4114 (license license:epl1.0)))
4116 (define-public java-eclipse-core-expressions
4118 (name "java-eclipse-core-expressions")
4122 (uri (string-append "https://repo1.maven.org/maven2/"
4123 "org/eclipse/platform/org.eclipse.core.expressions/"
4124 version "/org.eclipse.core.expressions-"
4125 version "-sources.jar"))
4128 "18bw2l875gmygvpagpgk9l24qzbdjia4ag12nw6fi8v8yaq4987f"))))
4129 (build-system ant-build-system)
4131 `(#:tests? #f ; no tests included
4132 #:jar-name "eclipse-core-expressions.jar"))
4134 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
4135 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
4136 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
4137 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
4138 ("java-eclipse-osgi" ,java-eclipse-osgi)))
4139 (home-page "https://www.eclipse.org/")
4140 (synopsis "Eclipse core expression language")
4141 (description "This package provides the Eclipse core expression language
4142 with the @code{org.eclipse.core.expressions} module.")
4143 (license license:epl1.0)))
4145 (define-public java-eclipse-core-variables
4147 (name "java-eclipse-core-variables")
4151 (uri (string-append "https://repo1.maven.org/maven2/"
4152 "org/eclipse/platform/org.eclipse.core.variables/"
4153 version "/org.eclipse.core.variables-"
4154 version "-sources.jar"))
4157 "12dirh03zi4n5x5cj07vzrhkmnqy6h9q10h9j605pagmpmifyxmy"))))
4158 (build-system ant-build-system)
4160 `(#:tests? #f ; no tests included
4161 #:jar-name "eclipse-core-variables.jar"))
4163 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
4164 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
4165 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
4166 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
4167 ("java-eclipse-osgi" ,java-eclipse-osgi)))
4168 (home-page "https://www.eclipse.org/platform")
4169 (synopsis "Eclipse core variables")
4170 (description "This package provides the Eclipse core variables module
4171 @code{org.eclipse.core.variables}.")
4172 (license license:epl1.0)))
4174 (define-public java-eclipse-ant-core
4176 (name "java-eclipse-ant-core")
4180 (uri (string-append "https://repo1.maven.org/maven2/"
4181 "org/eclipse/platform/org.eclipse.ant.core/"
4182 version "/org.eclipse.ant.core-"
4183 version "-sources.jar"))
4186 "11g3if794qjlk98mz9zch22rr56sd7z63vn4i7k2icr8cq5bfqg7"))))
4187 (build-system ant-build-system)
4189 `(#:tests? #f ; no tests included
4190 #:jar-name "eclipse-ant-core.jar"))
4192 `(("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
4193 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
4194 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
4195 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
4196 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
4197 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
4198 ("java-eclipse-core-variables" ,java-eclipse-core-variables)
4199 ("java-eclipse-osgi" ,java-eclipse-osgi)))
4200 (home-page "https://www.eclipse.org/platform")
4201 (synopsis "Ant build tool core libraries")
4202 (description "This package provides the ant build tool core libraries with
4203 the module @code{org.eclipse.ant.core}.")
4204 (license license:epl1.0)))
4206 (define-public java-eclipse-core-resources
4208 (name "java-eclipse-core-resources")
4212 (uri (string-append "https://repo1.maven.org/maven2/"
4213 "org/eclipse/platform/org.eclipse.core.resources/"
4214 version "/org.eclipse.core.resources-"
4215 version "-sources.jar"))
4218 "1hrfxrll6cpcagfksk2na1ypvkcnsp0fk6n3vcsrn97qayf9mx9l"))))
4219 (build-system ant-build-system)
4221 `(#:tests? #f ; no tests included
4222 #:jar-name "eclipse-core-resources.jar"))
4224 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
4225 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
4226 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
4227 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
4228 ("java-eclipse-core-expressions" ,java-eclipse-core-expressions)
4229 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
4230 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
4231 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
4232 ("java-eclipse-ant-core" ,java-eclipse-ant-core)
4233 ("java-eclipse-osgi" ,java-eclipse-osgi)))
4234 (home-page "https://www.eclipse.org/")
4235 (synopsis "Eclipse core resource management")
4236 (description "This package provides the Eclipse core resource management
4237 module @code{org.eclipse.core.resources}.")
4238 (license license:epl1.0)))
4240 (define-public java-eclipse-compare-core
4242 (name "java-eclipse-compare-core")
4246 (uri (string-append "https://repo1.maven.org/maven2/"
4247 "org/eclipse/platform/org.eclipse.compare.core/"
4248 version "/org.eclipse.compare.core-"
4249 version "-sources.jar"))
4252 "10g37r0pbiffyv2wk35c6g5lwzkdipkl0kkjp41v84dln46xm4dg"))))
4253 (build-system ant-build-system)
4255 `(#:tests? #f ; no tests included
4256 #:jar-name "eclipse-compare-core.jar"))
4258 `(("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
4259 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
4260 ("java-eclipse-osgi" ,java-eclipse-osgi)
4261 ("java-icu4j" ,java-icu4j)))
4262 (home-page "https://www.eclipse.org/")
4263 (synopsis "Eclipse core compare support")
4264 (description "This package provides the Eclipse core compare support
4265 module @code{org.eclipse.compare.core}.")
4266 (license license:epl1.0)))
4268 (define-public java-eclipse-team-core
4270 (name "java-eclipse-team-core")
4274 (uri (string-append "https://repo1.maven.org/maven2/"
4275 "org/eclipse/platform/org.eclipse.team.core/"
4276 version "/org.eclipse.team.core-"
4277 version "-sources.jar"))
4280 "02j2jzqgb26zx2d5ahxmvijw6j4r0la90zl5c3i65x6z19ciyam7"))))
4281 (build-system ant-build-system)
4283 `(#:tests? #f ; no tests included
4284 #:jar-name "eclipse-team-core.jar"))
4286 `(("java-eclipse-compare-core" ,java-eclipse-compare-core)
4287 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
4288 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
4289 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
4290 ("java-eclipse-core-resources" ,java-eclipse-core-resources)
4291 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
4292 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
4293 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
4294 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
4295 ("java-eclipse-osgi" ,java-eclipse-osgi)))
4296 (home-page "https://www.eclipse.org/platform")
4297 (synopsis "Eclipse team support core")
4298 (description "This package provides the Eclipse team support core module
4299 @code{org.eclipse.team.core}.")
4300 (license license:epl1.0)))
4302 (define-public java-eclipse-core-commands
4304 (name "java-eclipse-core-commands")
4308 (uri (string-append "https://repo1.maven.org/maven2/"
4309 "org/eclipse/platform/org.eclipse.core.commands/"
4310 version "/org.eclipse.core.commands-"
4311 version "-sources.jar"))
4314 "0yjn482qndcfrsq3jd6vnhcylp16420f5aqkrwr8spsprjigjcr9"))))
4315 (build-system ant-build-system)
4317 `(#:tests? #f ; no tests included
4318 #:jar-name "eclipse-core-commands.jar"))
4320 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)))
4321 (home-page "https://www.eclipse.org/platform")
4322 (synopsis "Eclipse core commands")
4323 (description "This package provides Eclipse core commands in the module
4324 @code{org.eclipse.core.commands}.")
4325 (license license:epl1.0)))
4327 (define-public java-eclipse-text
4329 (name "java-eclipse-text")
4333 (uri (string-append "https://repo1.maven.org/maven2/"
4334 "org/eclipse/platform/org.eclipse.text/"
4335 version "/org.eclipse.text-"
4336 version "-sources.jar"))
4339 "0scz70vzz5qs5caji9f5q01vkqnvip7dpri1q07l8wbbdcxn4cq1"))))
4340 (build-system ant-build-system)
4342 `(#:tests? #f ; no tests included
4343 #:jar-name "eclipse-text.jar"
4345 (modify-phases %standard-phases
4346 ;; When creating a new category we must make sure that the new list
4347 ;; matches List<Position>. By default it seems to be too generic
4348 ;; (ArrayList<Object>), so we specialize it to ArrayList<Position>.
4349 ;; Without this we get this error:
4351 ;; [javac] .../src/org/eclipse/jface/text/AbstractDocument.java:376:
4352 ;; error: method put in interface Map<K,V> cannot be applied to given types;
4353 ;; [javac] fPositions.put(category, new ArrayList<>());
4355 ;; [javac] required: String,List<Position>
4356 ;; [javac] found: String,ArrayList<Object>
4357 ;; [javac] reason: actual argument ArrayList<Object> cannot be converted
4358 ;; to List<Position> by method invocation conversion
4359 ;; [javac] where K,V are type-variables:
4360 ;; [javac] K extends Object declared in interface Map
4361 ;; [javac] V extends Object declared in interface Map
4363 ;; I don't know if this is a good fix. I suspect it is not, but it
4365 (add-after 'unpack 'fix-compilation-error
4367 (substitute* "src/org/eclipse/jface/text/AbstractDocument.java"
4368 (("Positions.put\\(category, new ArrayList<>\\(\\)\\);")
4369 "Positions.put(category, new ArrayList<Position>());"))
4372 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
4373 ("java-eclipse-core-commands" ,java-eclipse-core-commands)
4374 ("java-icu4j" ,java-icu4j)))
4375 (home-page "http://www.eclipse.org/platform")
4376 (synopsis "Eclipse text library")
4377 (description "Platform Text is part of the Platform UI project and
4378 provides the basic building blocks for text and text editors within Eclipse
4379 and contributes the Eclipse default text editor.")
4380 (license license:epl1.0)))
4382 (define-public java-eclipse-jdt-core
4384 (name "java-eclipse-jdt-core")
4388 (uri (string-append "https://repo1.maven.org/maven2/"
4389 "org/eclipse/jdt/org.eclipse.jdt.core/"
4390 version "/org.eclipse.jdt.core-"
4391 version "-sources.jar"))
4394 "191xw4lc7mjjkprh4ji5vnpjvr5r4zvbpwkriy4bvsjqrz35vh1j"))))
4395 (build-system ant-build-system)
4397 `(#:tests? #f ; no tests included
4398 #:jar-name "eclipse-jdt-core.jar"))
4400 `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
4401 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
4402 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
4403 ("java-eclipse-core-resources" ,java-eclipse-core-resources)
4404 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
4405 ("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
4406 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
4407 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
4408 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
4409 ("java-eclipse-osgi" ,java-eclipse-osgi)
4410 ("java-eclipse-text" ,java-eclipse-text)))
4411 (home-page "https://www.eclipse.org/jdt")
4412 (synopsis "Java development tools core libraries")
4413 (description "This package provides the core libraries of the Eclipse Java
4414 development tools.")
4415 (license license:epl1.0)))
4417 (define-public java-javax-mail
4419 (name "java-javax-mail")
4423 (uri (string-append "https://repo1.maven.org/maven2/"
4424 "com/sun/mail/javax.mail/"
4425 version "/javax.mail-"
4426 version "-sources.jar"))
4429 "0sdlfgsc2b5s89xv1261y8i0jijcja019k2x1c8ngfn582w4jly9"))))
4430 (build-system ant-build-system)
4432 `(#:tests? #f ; no tests
4433 #:jar-name "javax-mail.jar"))
4434 (home-page "https://javamail.java.net")
4435 (synopsis "Reference implementation of the JavaMail API")
4437 "This package provides versions of the JavaMail API implementation, IMAP,
4438 SMTP, and POP3 service providers, some examples, and documentation for the
4440 ;; GPLv2 only with "classpath exception".
4441 (license license:gpl2)))
4443 (define-public java-log4j-api
4445 (name "java-log4j-api")
4449 (uri (string-append "mirror://apache/logging/log4j/" version
4450 "/apache-log4j-" version "-src.tar.gz"))
4453 "0j5p9gik0jysh37nlrckqbky12isy95cpwg2gv5fas1rcdqbraxd"))))
4454 (build-system ant-build-system)
4456 `(#:tests? #f ; tests require unpackaged software
4457 #:jar-name "log4j-api.jar"
4459 (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out")
4462 (modify-phases %standard-phases
4463 (add-after 'unpack 'enter-dir
4464 (lambda _ (chdir "log4j-api") #t))
4465 ;; FIXME: The tests require additional software that has not been
4466 ;; packaged yet, such as
4467 ;; * org.apache.maven
4468 ;; * org.apache.felix
4469 (add-after 'enter-dir 'delete-tests
4470 (lambda _ (delete-file-recursively "src/test") #t)))))
4472 `(("java-osgi-core" ,java-osgi-core)
4473 ("java-hamcrest-core" ,java-hamcrest-core)
4474 ("java-junit" ,java-junit)))
4475 (home-page "http://logging.apache.org/log4j/2.x/")
4476 (synopsis "API module of the Log4j logging framework for Java")
4478 "This package provides the API module of the Log4j logging framework for
4480 (license license:asl2.0)))
4482 (define-public java-log4j-core
4484 (inherit java-log4j-api)
4485 (name "java-log4j-core")
4487 `(("java-osgi-core" ,java-osgi-core)
4488 ("java-hamcrest-core" ,java-hamcrest-core)
4489 ("java-log4j-api" ,java-log4j-api)
4490 ("java-mail" ,java-mail)
4491 ("java-jboss-jms-api-spec" ,java-jboss-jms-api-spec)
4492 ("java-lmax-disruptor" ,java-lmax-disruptor)
4493 ("java-kafka" ,java-kafka-clients)
4494 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
4495 ("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
4496 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
4497 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)
4498 ("java-fasterxml-jackson-dataformat-xml" ,java-fasterxml-jackson-dataformat-xml)
4499 ("java-fasterxml-jackson-dataformat-yaml" ,java-fasterxml-jackson-dataformat-yaml)
4500 ("java-commons-compress" ,java-commons-compress)
4501 ("java-commons-csv" ,java-commons-csv)
4502 ("java-jeromq" ,java-jeromq)
4503 ("java-junit" ,java-junit)))
4505 `(("hamcrest" ,java-hamcrest-all)
4506 ("java-commons-io" ,java-commons-io)
4507 ("java-commons-lang3" ,java-commons-lang3)
4508 ("slf4j" ,java-slf4j-api)))
4510 `(#:tests? #f ; tests require more dependencies
4511 #:test-dir "src/test"
4512 #:source-dir "src/main/java"
4513 #:jar-name "log4j-core.jar"
4516 (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out")
4519 (modify-phases %standard-phases
4520 (add-after 'unpack 'enter-dir
4521 (lambda _ (chdir "log4j-core") #t)))))
4522 (synopsis "Core component of the Log4j framework")
4523 (description "This package provides the core component of the Log4j
4524 logging framework for Java.")))
4526 (define-public java-log4j-1.2-api
4528 (inherit java-log4j-api)
4529 (name "java-log4j-1.2-api")
4531 `(#:jar-name "java-log4j-1.2-api.jar"
4532 #:source-dir "log4j-1.2-api/src/main/java"
4534 ;; Tests require maven-model (and other maven subprojects), which is a
4535 ;; cyclic dependency.
4538 `(("log4j-api" ,java-log4j-api)
4539 ("log4j-core" ,java-log4j-core)
4540 ("osgi-core" ,java-osgi-core)
4541 ("eclipse-osgi" ,java-eclipse-osgi)
4542 ("java-lmax-disruptor" ,java-lmax-disruptor)))))
4544 (define-public java-commons-cli
4546 (name "java-commons-cli")
4550 (uri (string-append "mirror://apache/commons/cli/source/"
4551 "commons-cli-" version "-src.tar.gz"))
4554 "1fkjn552i12vp3xxk21ws4p70fi0lyjm004vzxsdaz7gdpgyxxyl"))))
4555 (build-system ant-build-system)
4558 `(#:jar-name "commons-cli.jar"))
4560 `(("java-junit" ,java-junit)
4561 ("java-hamcrest-core" ,java-hamcrest-core)))
4562 (home-page "http://commons.apache.org/cli/")
4563 (synopsis "Command line arguments and options parsing library")
4564 (description "The Apache Commons CLI library provides an API for parsing
4565 command line options passed to programs. It is also able to print help
4566 messages detailing the options available for a command line tool.
4568 Commons CLI supports different types of options:
4571 @item POSIX like options (ie. tar -zxvf foo.tar.gz)
4572 @item GNU like long options (ie. du --human-readable --max-depth=1)
4573 @item Java like properties (ie. java -Djava.awt.headless=true Foo)
4574 @item Short options with value attached (ie. gcc -O2 foo.c)
4575 @item long options with single hyphen (ie. ant -projecthelp)
4578 This is a part of the Apache Commons Project.")
4579 (license license:asl2.0)))
4581 (define-public java-commons-codec
4583 (name "java-commons-codec")
4587 (uri (string-append "mirror://apache/commons/codec/source/"
4588 "commons-codec-" version "-src.tar.gz"))
4591 "1w9qg30y4s0x8gnmr2fgj4lyplfn788jqxbcz27lf5kbr6n8xr65"))))
4592 (build-system ant-build-system)
4593 (outputs '("out" "doc"))
4595 `(#:test-target "test"
4597 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
4598 (junit (assoc-ref %build-inputs "java-junit")))
4599 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
4600 (string-append "-Dhamcrest.jar=" hamcrest
4601 "/share/java/hamcrest-core.jar")
4602 ;; Do not append version to jar.
4603 "-Dfinal.name=commons-codec"))
4605 (modify-phases %standard-phases
4606 (add-after 'build 'build-javadoc ant-build-javadoc)
4607 (replace 'install (install-jars "dist"))
4608 (add-after 'install 'install-doc (install-javadoc "dist/docs/api")))))
4610 `(("java-junit" ,java-junit)
4611 ("java-hamcrest-core" ,java-hamcrest-core)))
4612 (home-page "http://commons.apache.org/codec/")
4613 (synopsis "Common encoders and decoders such as Base64, Hex, Phonetic and URLs")
4614 (description "The codec package contains simple encoder and decoders for
4615 various formats such as Base64 and Hexadecimal. In addition to these widely
4616 used encoders and decoders, the codec package also maintains a collection of
4617 phonetic encoding utilities.
4619 This is a part of the Apache Commons Project.")
4620 (license license:asl2.0)))
4622 (define-public java-commons-daemon
4624 (name "java-commons-daemon")
4628 (uri (string-append "mirror://apache/commons/daemon/source/"
4629 "commons-daemon-" version "-src.tar.gz"))
4632 "0ci46kq8jpz084ccwq0mmkahcgsmh20ziclp2jf5i0djqv95gvhi"))))
4633 (build-system ant-build-system)
4635 `(#:test-target "test"
4637 (modify-phases %standard-phases
4638 (add-after 'build 'build-javadoc ant-build-javadoc)
4639 (replace 'install (install-jars "dist"))
4640 (add-after 'install 'install-doc (install-javadoc "dist/docs/api")))))
4642 `(("java-junit" ,java-junit)))
4643 (home-page "http://commons.apache.org/daemon/")
4644 (synopsis "Library to launch Java applications as daemons")
4645 (description "The Daemon package from Apache Commons can be used to
4646 implement Java applications which can be launched as daemons. For example the
4647 program will be notified about a shutdown so that it can perform cleanup tasks
4648 before its process of execution is destroyed by the operation system.
4650 This package contains the Java library. You will also need the actual binary
4651 for your architecture which is provided by the jsvc package.
4653 This is a part of the Apache Commons Project.")
4654 (license license:asl2.0)))
4656 (define-public java-javaewah
4658 (name "java-javaewah")
4662 (uri (string-append "https://github.com/lemire/javaewah/"
4663 "archive/JavaEWAH-" version ".tar.gz"))
4666 "1n7j1r1h24wlhwv9zdcj6yqjrhma2ixwyzm15l5vrv6yqjs6753b"))))
4667 (build-system ant-build-system)
4668 (arguments `(#:jar-name "javaewah.jar"))
4670 `(("java-junit" ,java-junit)
4671 ("java-hamcrest-core" ,java-hamcrest-core)))
4672 (home-page "https://github.com/lemire/javaewah")
4673 (synopsis "Compressed alternative to the Java @code{BitSet} class")
4674 (description "This is a word-aligned compressed variant of the Java
4675 @code{Bitset} class. It provides both a 64-bit and a 32-bit RLE-like
4676 compression scheme. It can be used to implement bitmap indexes.
4678 The goal of word-aligned compression is not to achieve the best compression,
4679 but rather to improve query processing time. Hence, JavaEWAH tries to save CPU
4680 cycles, maybe at the expense of storage. However, the EWAH scheme is always
4681 more efficient storage-wise than an uncompressed bitmap (as implemented in the
4682 @code{BitSet} class by Sun).")
4683 ;; GPL2.0 derivates are explicitly allowed.
4684 (license license:asl2.0)))
4686 (define-public java-slf4j-api
4688 (name "java-slf4j-api")
4692 (uri (string-append "https://www.slf4j.org/dist/slf4j-"
4696 "13j51sgzmhhdrfa74gkal5zpip7r1440dh7zsi2c8bpb2zs1v8kb"))
4697 (modules '((guix build utils)))
4698 ;; Delete bundled jars.
4701 (for-each delete-file (find-files "." "\\.jar$"))
4703 (build-system ant-build-system)
4705 `(#:jar-name "slf4j-api.jar"
4706 #:source-dir "slf4j-api/src/main"
4707 #:test-dir "slf4j-api/src/test"
4709 (modify-phases %standard-phases
4710 (add-after 'build 'regenerate-jar
4712 ;; pom.xml ignores these files in the jar creation process. If we don't,
4713 ;; we get the error "This code should have never made it into slf4j-api.jar"
4714 (delete-file-recursively "build/classes/org/slf4j/impl")
4715 (zero? (system* "jar" "-cf" "build/jar/slf4j-api.jar" "-C"
4716 "build/classes" "."))))
4717 (add-before 'check 'dont-test-abstract-classes
4719 ;; abstract classes are not meant to be run with junit
4720 (substitute* "build.xml"
4721 (("<include name=\"\\*\\*/\\*Test.java\" />")
4722 (string-append "<include name=\"**/*Test.java\" />"
4723 "<exclude name=\"**/MultithreadedInitializationTest"
4724 ".java\" />"))))))))
4726 `(("java-junit" ,java-junit)
4727 ("java-hamcrest-core" ,java-hamcrest-core)))
4728 (home-page "https://www.slf4j.org/")
4729 (synopsis "Simple logging facade for Java")
4730 (description "The Simple Logging Facade for Java (SLF4J) serves as a
4731 simple facade or abstraction for various logging
4732 frameworks (e.g. @code{java.util.logging}, @code{logback}, @code{log4j})
4733 allowing the end user to plug in the desired logging framework at deployment
4735 (license license:expat)))
4737 (define-public java-slf4j-simple
4739 (name "java-slf4j-simple")
4741 (source (package-source java-slf4j-api))
4742 (build-system ant-build-system)
4744 `(#:jar-name "slf4j-simple.jar"
4745 #:source-dir "slf4j-simple/src/main"
4746 #:test-dir "slf4j-simple/src/test"
4748 (modify-phases %standard-phases
4749 ;; The tests need some test classes from slf4j-api
4750 (add-before 'check 'build-slf4j-api-test-helpers
4752 ;; Add current dir to CLASSPATH ...
4754 (string-append (getcwd) ":" (getenv "CLASSPATH")))
4755 ;; ... and build test helper classes here:
4759 ,@(find-files "slf4j-api/src/test" ".*\\.java")))))))))
4761 `(("java-junit" ,java-junit)
4762 ("java-hamcrest-core" ,java-hamcrest-core)
4763 ("java-slf4j-api" ,java-slf4j-api)))
4764 (home-page "https://www.slf4j.org/")
4765 (synopsis "Simple implementation of simple logging facade for Java")
4766 (description "SLF4J binding for the Simple implementation, which outputs
4767 all events to System.err. Only messages of level INFO and higher are
4769 (license license:expat)))
4771 (define-public antlr2
4777 (uri (string-append "http://www.antlr2.org/download/antlr-"
4781 "1ffvcwdw73id0dk6pj2mlxjvbg0662qacx4ylayqcxgg381fnfl5"))
4782 (modules '((guix build utils)))
4785 (delete-file "antlr.jar")
4786 (substitute* "lib/cpp/antlr/CharScanner.hpp"
4790 "#define EOF (-1)\n"
4791 "#include <strings.h>")))
4792 (substitute* "configure"
4795 (build-system gnu-build-system)
4797 `(#:tests? #f ; no test target
4798 #:imported-modules ((guix build ant-build-system)
4799 (guix build syscalls)
4800 ,@%gnu-build-system-modules)
4801 #:modules (((guix build ant-build-system) #:prefix ant:)
4802 (guix build gnu-build-system)
4805 (modify-phases %standard-phases
4806 (add-after 'install 'strip-jar-timestamps
4807 (assoc-ref ant:%standard-phases 'strip-jar-timestamps))
4808 (add-after 'configure 'fix-bin-ls
4810 (substitute* (find-files "." "Makefile")
4816 ("java" ,icedtea "jdk")))
4818 `(("java" ,icedtea)))
4819 (home-page "http://www.antlr2.org")
4820 (synopsis "Framework for constructing recognizers, compilers, and translators")
4821 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
4822 is a language tool that provides a framework for constructing recognizers,
4823 compilers, and translators from grammatical descriptions containing Java, C#,
4824 C++, or Python actions. ANTLR provides excellent support for tree construction,
4825 tree walking, and translation.")
4826 (license license:public-domain)))
4828 (define-public java-stringtemplate-3
4830 (name "java-stringtemplate")
4834 (uri (string-append "https://github.com/antlr/website-st4/raw/"
4835 "gh-pages/download/stringtemplate-"
4839 "086yj68np1vqhkj7483diz3km6s6y4gmwqswa7524a0ca6vxn2is"))))
4840 (build-system ant-build-system)
4842 `(#:jar-name (string-append ,name "-" ,version ".jar")
4844 #:modules ((guix build ant-build-system)
4848 (modify-phases %standard-phases
4849 (add-before 'check 'fix-tests
4851 (substitute* "build.xml"
4852 (("\\$\\{test.home\\}/java")
4853 "${test.home}/org"))
4855 (add-before 'build 'generate-grammar
4857 (with-directory-excursion "src/org/antlr/stringtemplate/language/"
4858 (every (lambda (file)
4859 (format #t "~a\n" file)
4860 (zero? (system* "antlr" file)))
4861 '("template.g" "angle.bracket.template.g" "action.g"
4862 "eval.g" "group.g" "interface.g"))))))))
4865 ("java-junit" ,java-junit)))
4866 (home-page "http://www.stringtemplate.org")
4867 (synopsis "Template engine to generate formatted text output")
4868 (description "StringTemplate is a java template engine (with ports for C#,
4869 Objective-C, JavaScript, Scala) for generating source code, web pages, emails,
4870 or any other formatted text output. StringTemplate is particularly good at
4871 code generators, multiple site skins, and internationalization / localization.
4872 StringTemplate also powers ANTLR.")
4873 (license license:bsd-3)))
4875 ;; antlr3 is partially written using antlr3 grammar files. It also depends on
4876 ;; ST4 (stringtemplate4), which is also partially written using antlr3 grammar
4877 ;; files and uses antlr3 at runtime. The latest version requires a recent version
4878 ;; of antlr3 at runtime.
4879 ;; Fortunately, ST4 4.0.6 can be built with an older antlr3, and we use antlr3.3.
4880 ;; This version of ST4 is sufficient for the latest antlr3.
4881 ;; We use ST4 4.0.6 to build a boostrap antlr3 (latest version), and build
4882 ;; the latest ST4 with it. Then we build our final antlr3 that will be linked
4883 ;; against the latest ST4.
4884 ;; antlr3.3 still depends on antlr3 to generate some files, so we use an
4885 ;; even older version, antlr3.1, to generate them. Fortunately antlr3.1 uses
4886 ;; only grammar files with the antlr2 syntax.
4887 ;; So we build antlr3.1 -> antlr3.3 -> ST4.0.6 -> antlr3-bootstrap -> ST4 -> antlr3.
4889 (define-public java-stringtemplate
4890 (package (inherit java-stringtemplate-3)
4891 (name "java-stringtemplate")
4895 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/"
4897 (file-name (string-append name "-" version ".tar.gz"))
4900 "1pri8hqa95rfdkjy55icl5q1m09zwp5k67ib14abas39s4v3w087"))))
4901 (build-system ant-build-system)
4903 `(#:jar-name (string-append ,name "-" ,version ".jar")
4904 #:tests? #f ; FIXME: tests fail for unknown reasons
4906 #:modules ((guix build ant-build-system)
4910 (modify-phases %standard-phases
4911 (add-before 'check 'fix-test-target
4913 (substitute* "build.xml"
4914 (("\\$\\{test.home\\}/java") "${test.home}/")
4915 (("\\*Test.java") "Test*.java"))
4917 (add-before 'build 'generate-grammar
4919 (with-directory-excursion "src/org/stringtemplate/v4/compiler/"
4920 (every (lambda (file)
4921 (format #t "~a\n" file)
4922 (zero? (system* "antlr3" file)))
4923 '("STParser.g" "Group.g" "CodeGenerator.g"))))))))
4925 `(("antlr3" ,antlr3-bootstrap)
4927 ("java-stringtemplate" ,java-stringtemplate-3)
4928 ("java-junit" ,java-junit)))))
4930 (define java-stringtemplate-4.0.6
4931 (package (inherit java-stringtemplate)
4932 (name "java-stringtemplate")
4936 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/ST-"
4938 (file-name (string-append name "-" version ".tar.gz"))
4941 "0hjmh1ahdsh3w825i67mli9l4nncc4l6hdbf9ma91jvlj590sljp"))))
4943 `(("antlr3" ,antlr3-3.3)
4945 ("java-stringtemplate" ,java-stringtemplate-3)))))
4947 (define-public antlr3
4953 (uri (string-append "https://github.com/antlr/antlr3/archive/"
4955 (file-name (string-append name "-" version ".tar.gz"))
4958 "0218v683081lg54z9hvjxinhxd4dqp870jx6n39gslm0bkyi4vd6"))))
4959 (build-system ant-build-system)
4961 `(#:jar-name (string-append ,name "-" ,version ".jar")
4962 #:source-dir "tool/src/main/java:runtime/Java/src/main/java:tool/src/main/antlr3"
4965 (modify-phases %standard-phases
4966 (add-after 'install 'bin-install
4967 (lambda* (#:key inputs outputs #:allow-other-keys)
4968 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
4969 (bin (string-append (assoc-ref outputs "out") "/bin")))
4971 (with-output-to-file (string-append bin "/antlr3")
4974 (string-append "#!" (which "sh") "\n"
4975 "java -cp " jar "/" ,name "-" ,version ".jar:"
4977 (find-files (assoc-ref inputs "stringtemplate")
4981 (find-files (assoc-ref inputs "stringtemplate4")
4985 (find-files (string-append
4986 (assoc-ref inputs "antlr")
4989 " org.antlr.Tool $*"))))
4990 (chmod (string-append bin "/antlr3") #o755))))
4991 (add-before 'build 'generate-grammar
4993 (chdir "tool/src/main/antlr3/org/antlr/grammar/v3/")
4994 (for-each (lambda (file)
4997 (system* "antlr3" file))
4998 '("ANTLR.g" "ANTLRTreePrinter.g" "ActionAnalysis.g"
4999 "AssignTokenTypesWalker.g"
5000 "ActionTranslator.g" "TreeToNFAConverter.g"
5001 "ANTLRv3.g" "ANTLRv3Tree.g" "LeftRecursiveRuleWalker.g"
5002 "CodeGenTreeWalker.g" "DefineGrammarItemsWalker.g"))
5003 (substitute* "ANTLRParser.java"
5004 (("public Object getTree") "public GrammarAST getTree"))
5005 (substitute* "ANTLRv3Parser.java"
5006 (("public Object getTree") "public CommonTree getTree"))
5007 (chdir "../../../../../java")
5008 (system* "antlr" "-o" "org/antlr/tool"
5009 "org/antlr/tool/serialize.g")
5010 (substitute* "org/antlr/tool/LeftRecursiveRuleAnalyzer.java"
5011 (("import org.antlr.grammar.v3.\\*;") "import org.antlr.grammar.v3.*;
5012 import org.antlr.grammar.v3.ANTLRTreePrinter;"))
5013 (substitute* "org/antlr/tool/ErrorManager.java"
5014 (("case NO_SUCH_ATTRIBUTE_PASS_THROUGH:") ""))
5015 (chdir "../../../..")))
5016 (add-before 'build 'fix-build-xml
5018 (substitute* "build.xml"
5019 (("<exec") "<copy todir=\"${classes.dir}\">
5020 <fileset dir=\"tool/src/main/resources\">
5021 <include name=\"**/*.stg\"/>
5022 <include name=\"**/*.st\"/>
5023 <include name=\"**/*.sti\"/>
5024 <include name=\"**/STLexer.tokens\"/>
5026 </copy><exec")))))))
5029 ("antlr3" ,antlr3-bootstrap)))
5031 `(("junit" ,java-junit)
5032 ("stringtemplate" ,java-stringtemplate-3)
5033 ("stringtemplate4" ,java-stringtemplate)))
5035 `(("stringtemplate" ,java-stringtemplate-3)
5037 ("stringtemplate4" ,java-stringtemplate-4.0.6)))
5038 (home-page "http://www.antlr3.org")
5039 (synopsis "Framework for constructing recognizers, compilers, and translators")
5040 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
5041 is a language tool that provides a framework for constructing recognizers,
5042 compilers, and translators from grammatical descriptions containing Java, C#,
5043 C++, or Python actions. ANTLR provides excellent support for tree construction,
5044 tree walking, and translation.")
5045 (license license:bsd-3)))
5047 (define antlr3-bootstrap
5050 (name "antlr3-bootstrap")
5053 ("antlr3" ,antlr3-3.3)))
5055 `(("junit" ,java-junit)))))
5064 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
5065 "gh-pages/download/antlr-"
5069 "0qgg5vgsm4l1d6dj9pfbaa25dpv2ry2gny8ajy4vvgvfklw97b3m"))))
5071 `(#:jar-name (string-append ,name "-" ,version ".jar")
5072 #:source-dir (string-join '("tool/src/main/java"
5073 "runtime/Java/src/main/java"
5074 "tool/src/main/antlr2"
5075 "tool/src/main/antlr3")
5077 #:tests? #f ; FIXME: tests seem to require maven plugin
5078 #:modules ((guix build ant-build-system)
5082 (modify-phases %standard-phases
5083 (add-after 'install 'bin-install
5084 (lambda* (#:key inputs outputs #:allow-other-keys)
5085 (let* ((out (assoc-ref outputs "out"))
5086 (jar (string-append out "/share/java"))
5087 (bin (string-append out "/bin")))
5089 (with-output-to-file (string-append bin "/antlr3")
5093 "#!" (which "sh") "\n"
5094 "java -cp " jar "/antlr3-3.3.jar:"
5096 (append (find-files (assoc-ref inputs "java-stringtemplate")
5098 (find-files (string-append (assoc-ref inputs "antlr")
5102 " org.antlr.Tool $*"))))
5103 (chmod (string-append bin "/antlr3") #o755)
5105 (add-before 'build 'generate-grammar
5107 (substitute* "tool/src/main/java/org/antlr/tool/Grammar.java"
5108 (("import org.antlr.grammar.v2.\\*;")
5109 "import org.antlr.grammar.v2.*;\n
5110 import org.antlr.grammar.v2.TreeToNFAConverter;\n
5111 import org.antlr.grammar.v2.DefineGrammarItemsWalker;\n
5112 import org.antlr.grammar.v2.ANTLRTreePrinter;"))
5114 (with-directory-excursion "tool/src/main/antlr2/org/antlr/grammar/v2/"
5115 (every (lambda (file)
5116 (format #t "~a\n" file)
5117 (zero? (system* "antlr" file)))
5118 '("antlr.g" "antlr.print.g" "assign.types.g"
5119 "buildnfa.g" "codegen.g" "define.g")))
5120 (with-directory-excursion "tool/src/main/antlr3/org/antlr/grammar/v3/"
5121 (every (lambda (file)
5122 (format #t "~a\n" file)
5123 (zero? (system* "antlr3" file)))
5124 '("ActionAnalysis.g" "ActionTranslator.g" "ANTLRv3.g"
5125 "ANTLRv3Tree.g"))))))
5126 (add-before 'build 'fix-build-xml
5128 (substitute* "build.xml"
5129 (("<exec") "<copy todir=\"${classes.dir}\">
5130 <fileset dir=\"tool/src/main/resources\">
5131 <include name=\"**/*.stg\"/>
5132 <include name=\"**/*.st\"/>
5133 <include name=\"**/*.sti\"/>
5134 <include name=\"**/STLexer.tokens\"/>
5140 ("antlr3" ,antlr3-3.1)))
5142 `(("junit" ,java-junit)))
5144 `(("java-stringtemplate" ,java-stringtemplate-3)
5146 ("antlr3" ,antlr3-3.1)))))
5155 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
5156 "gh-pages/download/antlr-"
5160 "0sfimc9cpbgrihz4giyygc8afgpma2c93yqpwb951giriri6x66z"))))
5162 `(#:jar-name (string-append ,name "-" ,version ".jar")
5163 #:source-dir "src:runtime/Java/src"
5166 (modify-phases %standard-phases
5167 (add-after 'install 'bin-install
5168 (lambda* (#:key inputs outputs #:allow-other-keys)
5169 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
5170 (bin (string-append (assoc-ref outputs "out") "/bin")))
5172 (with-output-to-file (string-append bin "/antlr3")
5175 (string-append "#!" (which "sh") "\n"
5176 "java -cp " jar "/antlr3-3.1-3.1.jar:"
5178 (find-files (assoc-ref inputs "stringtemplate")
5182 (find-files (string-append
5183 (assoc-ref inputs "antlr")
5186 " org.antlr.Tool $*"))))
5187 (chmod (string-append bin "/antlr3") #o755))))
5188 (add-before 'build 'generate-grammar
5190 (let ((dir "src/org/antlr/tool/"))
5191 (for-each (lambda (file)
5194 (system* "antlr" "-o" dir (string-append dir file)))
5195 '("antlr.g" "antlr.print.g" "assign.types.g"
5196 "buildnfa.g" "define.g")))
5197 (format #t "codegen.g\n")
5198 (system* "antlr" "-o" "src/org/antlr/codegen"
5199 "src/org/antlr/codegen/codegen.g")))
5200 (add-before 'build 'fix-build-xml
5202 (substitute* "build.xml"
5203 (("<exec") "<copy todir=\"${classes.dir}\">
5204 <fileset dir=\"src\">
5205 <include name=\"**/*.stg\"/>
5206 <include name=\"**/*.st\"/>
5207 <include name=\"**/*.sti\"/>
5208 <include name=\"**/STLexer.tokens\"/>
5210 </copy><exec")))))))
5212 `(("antlr" ,antlr2)))
5214 `(("junit" ,java-junit)))
5216 `(("stringtemplate" ,java-stringtemplate-3)))))
5218 (define-public java-commons-cli-1.2
5219 ;; This is a bootstrap dependency for Maven2.
5221 (inherit java-commons-cli)
5225 (uri (string-append "mirror://apache/commons/cli/source/"
5226 "commons-cli-" version "-src.tar.gz"))
5229 "0rvfgzgv2pc1m091dfj3ih9ddsjjppr1f1wf0qmc3bk6b1kwv2dm"))))
5231 `(#:jar-name "commons-cli.jar"
5233 (modify-phases %standard-phases
5234 (add-before 'check 'fix-build-xml
5235 (lambda* (#:key inputs #:allow-other-keys)
5236 (substitute* "build.xml"
5237 (("dir=\"\\$\\{test.home\\}/java\"")
5238 "dir=\"${test.home}\""))
5241 `(("java-junit" ,java-junit)))))
5243 (define-public java-microemulator-cldc
5245 (name "java-microemulator-cldc")
5249 (uri (string-append "https://github.com/barteo/microemu/archive/"
5251 (string-map (lambda (c) (if (char=? c #\.) #\_ c))
5254 (file-name (string-append name "-" version ".tar.gz"))
5257 "1x1apmz38gkppxnwnygwmi12j54v4p258v8ddzn6dldkk7vak1ll"))))
5258 (build-system ant-build-system)
5260 `(#:jar-name "microemulator-cldc.jar"
5261 #:source-dir "microemu-cldc/src/main/java"
5262 #:tests? #f)); Requires even older software
5263 (home-page "https://github.com/barteo/microemu")
5264 (synopsis "J2ME CLDC emulator")
5265 (description "Microemulator is a Java 2 Micro Edition (J2ME) CLDC/MIDP
5266 Emulator. It allows to demonstrate MIDlet based applications in web browser
5267 applet and can be run as a standalone java application.")
5268 (license (list license:asl2.0
5270 license:lgpl2.1+))))
5272 (define-public java-datanucleus-javax-persistence
5274 (name "java-datanucleus-javax-persistence")
5278 (uri (string-append "https://github.com/datanucleus/"
5279 "javax.persistence/archive/javax.persistence-"
5280 version "-release.tar.gz"))
5283 "11jx0fjwgc2hhbqqgdd6m1pf2fplf9vslppygax0y1z5csnqjhpx"))))
5284 (build-system ant-build-system)
5286 `(#:jar-name "java-datanucleus-javax-persistence.jar"
5288 #:source-dir "src/main/java"
5289 #:tests? #f)); no tests
5290 (home-page "https://github.com/datanucleus/javax.persistence")
5291 (synopsis "JPA API")
5292 (description "This package contains a clean definition of JPA API intended
5293 for use with DataNucleus JPA since the JCP haven't provided an official JPA API
5294 jar. See @url{http://java.net/projects/jpa-spec/downloads} for the specification
5295 used to generate this API.")
5296 (license (list license:edl1.0 license:epl1.0))))
5298 (define-public java-osgi-cmpn
5300 (name "java-osgi-cmpn")
5304 (uri (string-append "http://central.maven.org/maven2/"
5305 "org/osgi/osgi.cmpn/" version "/osgi.cmpn-"
5306 version "-sources.jar"))
5309 "1lmb6xyrmkqdhv1kayf0514rlwq6ypvs4m44ibrck3snp8241wys"))))
5310 (build-system ant-build-system)
5312 `(#:jar-name "osgi-cmpn.jar"
5313 #:tests? #f)); no tests
5315 `(("annotation" ,java-osgi-annotation)
5316 ("core" ,java-osgi-core)
5317 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
5318 ("microemulator" ,java-microemulator-cldc)
5319 ("servlet" ,java-classpathx-servletapi)))
5320 (home-page "http://www.osgi.org")
5321 (synopsis "Compendium specification module of OSGi framework")
5323 "OSGi, for Open Services Gateway initiative framework, is a module system
5324 and service platform for the Java programming language. This package contains
5325 the compendium specification module, providing interfaces and classes for use
5326 in compiling bundles.")
5327 (license license:asl2.0)))
5329 (define-public java-osgi-service-component-annotations
5331 (name "java-osgi-service-component-annotations")
5335 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
5336 "org.osgi.service.component.annotations/"
5337 version "/org.osgi.service.component.annotations-"
5338 version "-sources.jar"))
5341 "15rq9cmp4fpn74q44m4j35qsqmjf5lx3hcrk6pzvbhc08igic2f0"))))
5342 (build-system ant-build-system)
5344 `(#:jar-name "osgi-service-component-annotations.jar"
5345 #:tests? #f)); no tests
5347 `(("annotation" ,java-osgi-annotation)))
5348 (home-page "http://www.osgi.org")
5349 (synopsis "Support annotations for osgi-service-component")
5351 "OSGi, for Open Services Gateway initiative framework, is a module system
5352 and service platform for the Java programming language. This package contains
5353 the support annotations for osgi-service-component.")
5354 (license license:asl2.0)))
5356 (define-public java-osgi-dto
5358 (name "java-osgi-dto")
5362 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
5363 "org.osgi.dto/" version "/org.osgi.dto-"
5364 version "-sources.jar"))
5367 "0f4bqjzadn0hwk6sd3h5gvbyfp3yci1s6r0v770cc15p0pg627yr"))))
5368 (build-system ant-build-system)
5370 `(#:jar-name "osgi-dto.jar"
5371 #:tests? #f)); no tests
5373 `(("annotation" ,java-osgi-annotation)))
5374 (home-page "http://www.osgi.org")
5375 (synopsis "Data Transfer Objects")
5377 "OSGi, for Open Services Gateway initiative framework, is a module system
5378 and service platform for the Java programming language. This package contains
5379 the Data Transfer Objects. It is easily serializable having only public fields
5380 of primitive types and their wrapper classes, Strings, and DTOs. List, Set,
5381 Map and array aggregates may also be used. The aggregates must only hold
5382 objects of the listed types or aggregates.")
5383 (license license:asl2.0)))
5385 (define-public java-osgi-resource
5387 (name "java-osgi-resource")
5391 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
5392 "org.osgi.resource/"
5393 version "/org.osgi.resource-"
5394 version "-sources.jar"))
5397 "0hi0fsc5v99q22bd7lrkvpz1y0ds4w9arjldpwsrcpqvz2js7q2d"))))
5398 (build-system ant-build-system)
5400 `(#:jar-name "osgi-resource.jar"
5401 #:tests? #f)); no tests
5403 `(("annotation" ,java-osgi-annotation)
5404 ("dto" ,java-osgi-dto)))
5405 (home-page "http://www.osgi.org")
5406 (synopsis "OSGI Resource")
5408 "OSGi, for Open Services Gateway initiative framework, is a module system
5409 and service platform for the Java programming language. This package contains
5410 the definition of common types in osgi packages.")
5411 (license license:asl2.0)))
5413 (define-public java-osgi-namespace-contract
5415 (name "java-osgi-namespace-contract")
5419 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
5420 "org.osgi.namespace.contract/"
5421 version "/org.osgi.namespace.contract-"
5422 version "-sources.jar"))
5425 "1iz4f2i0fvqrlq90ki9nfzcfpvy2av434ri25bglywqssx8mmp36"))))
5426 (build-system ant-build-system)
5428 `(("resource" ,java-osgi-resource)
5429 ("annotation" ,java-osgi-annotation)))
5431 `(#:jar-name "osgi-namespace-contract.jar"
5432 #:tests? #f)); no tests
5433 (home-page "http://www.osgi.org")
5434 (synopsis "Contract Capability and Requirement Namespace")
5436 "OSGi, for Open Services Gateway initiative framework, is a module system
5437 and service platform for the Java programming language. This package contains
5438 the names for the attributes and directives for a namespace with contracts.")
5439 (license license:asl2.0)))
5441 (define-public java-osgi-namespace-extender
5443 (name "java-osgi-namespace-extender")
5447 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
5448 "org.osgi.namespace.extender/"
5449 version "/org.osgi.namespace.extender-"
5450 version "-sources.jar"))
5453 "0jgqiak2i05qv6j3gd33xlaifzzc0ylxxk376v2x0apfg3vvixmz"))))
5454 (build-system ant-build-system)
5456 `(("resource" ,java-osgi-resource)
5457 ("annotation" ,java-osgi-annotation)))
5459 `(#:jar-name "osgi-namespace-extendent.jar"
5460 #:tests? #f)); no tests
5461 (home-page "http://www.osgi.org")
5462 (synopsis "Extender Capability and Requirement Namespace")
5464 "OSGi, for Open Services Gateway initiative framework, is a module system
5465 and service platform for the Java programming language. This package contains
5466 the names for the attributes and directives for an extender namespace.")
5467 (license license:asl2.0)))
5469 (define-public java-osgi-namespace-service
5471 (name "java-osgi-namespace-service")
5475 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
5476 "org.osgi.namespace.service/"
5477 version "/org.osgi.namespace.service-"
5478 version "-sources.jar"))
5481 "0qmw8n2449nkmm56d1znz9zhazb6ya3vsimd5bf5jg23zzhgl8c8"))))
5482 (build-system ant-build-system)
5484 `(("resource" ,java-osgi-resource)
5485 ("annotation" ,java-osgi-annotation)))
5487 `(#:jar-name "osgi-namespace-service.jar"
5488 #:tests? #f)); no tests
5489 (home-page "http://www.osgi.org")
5490 (synopsis "Service Capability and Requirement Namespace")
5492 "OSGi, for Open Services Gateway initiative framework, is a module system
5493 and service platform for the Java programming language. This package contains
5494 the names for the attributes and directives for a service namespace.")
5495 (license license:asl2.0)))
5497 (define-public java-osgi-util-function
5499 (name "java-osgi-util-function")
5503 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
5504 "org.osgi.util.function/"
5505 version "/org.osgi.util.function-"
5506 version "-sources.jar"))
5509 "04l7j3hwmmj28w23m7paca0afzncs42j2mdr3liqq8kvp548sc6x"))))
5510 (build-system ant-build-system)
5512 `(#:jar-name "osgi-util-function.jar"
5513 #:tests? #f)); no tests
5515 `(("annotation" ,java-osgi-annotation)))
5516 (home-page "http://www.osgi.org")
5517 (synopsis "OSGI Util Function")
5519 "OSGi, for Open Services Gateway initiative framework, is a module system
5520 and service platform for the Java programming language. This package contains
5521 an interface for a function that accepts a single argument and produces a result.")
5522 (license license:asl2.0)))
5524 (define-public java-osgi-util-promise
5526 (name "java-osgi-util-promise")
5530 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
5531 "org.osgi.util.promise/"
5532 version "/org.osgi.util.promise-"
5533 version "-sources.jar"))
5536 "0y34dwiflg1c4ahvkswpf9z02xph2sr9fm04ia5493x3lshpw22c"))))
5537 (build-system ant-build-system)
5539 `(#:jar-name "osgi-util-promise.jar"
5540 #:tests? #f)); no tests
5542 `(("annotation" ,java-osgi-annotation)
5543 ("function" ,java-osgi-util-function)))
5544 (home-page "http://www.osgi.org")
5545 (synopsis "Promise of a value")
5547 "OSGi, for Open Services Gateway initiative framework, is a module system
5548 and service platform for the Java programming language. This package contains
5549 an interface and utilitary classes for promises. A Promise represents a future
5550 value. It handles the interactions for asynchronous processing.")
5551 (license license:asl2.0)))
5553 (define-public java-osgi-service-metatype-annotations
5555 (name "java-osgi-service-metatype-annotations")
5559 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
5560 "org.osgi.service.metatype.annotations/"
5561 version "/org.osgi.service.metatype.annotations-"
5562 version "-sources.jar"))
5565 "12rwm3349wk80vm88rcdgs4435m4jxkpkj5mrx326skkz2c6hyw6"))))
5566 (build-system ant-build-system)
5568 `(#:jar-name "osgi-service-metatype-annotations.jar"
5569 #:tests? #f)); no tests
5571 `(("annotation" ,java-osgi-annotation)))
5572 (home-page "http://www.osgi.org")
5573 (synopsis "Support annotations for metatype")
5575 "OSGi, for Open Services Gateway initiative framework, is a module system
5576 and service platform for the Java programming language. This package contains
5577 the support annotations for metatype.")
5578 (license license:asl2.0)))
5580 (define-public java-osgi-service-repository
5582 (name "java-osgi-service-repository")
5586 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
5587 "org.osgi.service.repository/"
5588 version "/org.osgi.service.repository-"
5589 version "-sources.jar"))
5592 "1k41mhg7b58pd8nsghr2qwcjrxdnf1p9spsw9v11k4257g6rl06n"))))
5593 (build-system ant-build-system)
5595 `(#:jar-name "osgi-service-repository.jar"
5596 #:tests? #f)); no tests
5598 `(("annotation" ,java-osgi-annotation)
5599 ("promise" ,java-osgi-util-promise)
5600 ("resource" ,java-osgi-resource)))
5601 (home-page "http://www.osgi.org")
5602 (synopsis "OSGI service repository")
5604 "OSGi, for Open Services Gateway initiative framework, is a module system
5605 and service platform for the Java programming language. This package contains
5606 a repository service that contains resources.")
5607 (license license:asl2.0)))
5609 (define-public java-osgi-framework
5611 (name "java-osgi-framework")
5615 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
5616 "org.osgi.framework/" version "/org.osgi.framework-"
5617 version "-sources.jar"))
5620 "1lwp2zfad3rybcc6q9bwz8xsgkc92ypzy5p6x54387f1qj65m73s"))))
5621 (build-system ant-build-system)
5623 `(#:jar-name "osgi-framework.jar"
5624 #:tests? #f)); no tests
5626 `(("annotation" ,java-osgi-annotation)
5627 ("resource" ,java-osgi-resource)
5628 ("dto" ,java-osgi-dto)))
5629 (home-page "http://www.osgi.org")
5630 (synopsis "OSGi framework")
5632 "OSGi, for Open Services Gateway initiative framework, is a module system
5633 and service platform for the Java programming language.")
5634 (license license:asl2.0)))
5636 (define-public java-osgi-service-log
5638 (name "java-osgi-service-log")
5642 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
5643 "org.osgi.service.log/"
5644 version "/org.osgi.service.log-"
5645 version "-sources.jar"))
5648 "1029j30dzcwializzca0j3fkhwwz08kmmsha5agw1iccscimj6r0"))))
5649 (build-system ant-build-system)
5651 `(#:jar-name "osgi-service-log.jar"
5652 #:tests? #f)); no tests
5654 `(("java-osgi-framework" ,java-osgi-framework)))
5655 (home-page "http://www.osgi.org")
5656 (synopsis "Provides methods for bundles to write messages to the log")
5658 "OSGi, for Open Services Gateway initiative framework, is a module system
5659 and service platform for the Java programming language. This package contains
5661 (license license:asl2.0)))
5663 (define-public java-osgi-service-jdbc
5665 (name "java-osgi-service-jdbc")
5669 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
5670 "org.osgi.service.jdbc/"
5671 version "/org.osgi.service.jdbc-"
5672 version "-sources.jar"))
5675 "11iln5v7bk469cgb9ddkrz9sa95b3733gqgaqw9xf5g6wq652yjz"))))
5676 (build-system ant-build-system)
5678 `(#:jar-name "osgi-service-jdbc.jar"
5679 #:tests? #f)); no tests
5680 (home-page "http://www.osgi.org")
5681 (synopsis "Factory for JDBC connection factories")
5683 "OSGi, for Open Services Gateway initiative framework, is a module system
5684 and service platform for the Java programming language. This package contains
5685 a factory for JDBC connection factories. There are 3 preferred connection
5686 factories for getting JDBC connections:
5689 @item @code{javax.sql.DataSource};
5690 @item @code{javax.sql.ConnectionPoolDataSource};
5691 @item @code{javax.sql.XADataSource}.
5693 (license license:asl2.0)))
5695 (define-public java-osgi-service-resolver
5697 (name "java-osgi-service-resolver")
5701 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
5702 "org.osgi.service.resolver/"
5703 version "/org.osgi.service.resolver-"
5704 version "-sources.jar"))
5707 "1dzqn1ryfi2rq4zwsgp44bmj2wlfydjg1qbxw2b0z4xdjjy55vxd"))))
5708 (build-system ant-build-system)
5710 `(#:jar-name "osgi-service-resolver.jar"
5711 #:tests? #f)); no tests
5713 `(("annotation" ,java-osgi-annotation)
5714 ("resource" ,java-osgi-resource)))
5715 (home-page "http://www.osgi.org")
5716 (synopsis "OSGI Resolver service")
5718 "OSGi, for Open Services Gateway initiative framework, is a module system
5719 and service platform for the Java programming language. This package contains
5720 a resolver service that resolves the specified resources in the context supplied
5722 (license license:asl2.0)))
5724 (define-public java-osgi-util-tracker
5726 (name "java-osgi-util-tracker")
5730 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
5731 "org.osgi.util.tracker/"
5732 version "/org.osgi.util.tracker-"
5733 version "-sources.jar"))
5736 "0c4fh9vxwzsx59r8dygda0gq2gx3z5vfhc3jsphlqwf5w0h403lz"))))
5737 (build-system ant-build-system)
5739 `(#:jar-name "osgi-util-tracker.jar"
5740 #:tests? #f)); no tests
5742 `(("framework" ,java-osgi-framework)
5743 ("annotation" ,java-osgi-annotation)))
5744 (home-page "http://www.osgi.org")
5745 (synopsis "Bundle tracking")
5747 "OSGi, for Open Services Gateway initiative framework, is a module system
5748 and service platform for the Java programming language. This package contains
5749 bundle tracking utility classes.")
5750 (license license:asl2.0)))
5752 (define-public java-osgi-service-cm
5754 (name "java-osgi-service-cm")
5758 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
5759 "org.osgi.service.cm/"
5760 version "/org.osgi.service.cm-"
5761 version "-sources.jar"))
5764 "1z8kap48y3xi0ggj8v6czglfnpnd94mmismgi2wbqhj1nl5fzbp6"))))
5765 (build-system ant-build-system)
5767 `(#:jar-name "osgi-service-cm.jar"
5768 #:tests? #f)); no tests
5770 `(("framework" ,java-osgi-framework)
5771 ("annotation" ,java-osgi-annotation)))
5772 (home-page "http://www.osgi.org")
5773 (synopsis "OSGI Configuration Management")
5775 "OSGi, for Open Services Gateway initiative framework, is a module system
5776 and service platform for the Java programming language. This package contains
5777 utility classes for the configuration of services.")
5778 (license license:asl2.0)))
5780 (define-public java-osgi-service-packageadmin
5782 (name "java-osgi-service-packageadmin")
5786 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
5787 "org.osgi.service.packageadmin/"
5788 version "/org.osgi.service.packageadmin-"
5789 version "-sources.jar"))
5792 "041mpxzi7g36wmcily6y4ccn3jx15akpdy8gmhyb7m98x7qfvn52"))))
5793 (build-system ant-build-system)
5795 `(#:jar-name "osgi-service-packageadmin.jar"
5796 #:tests? #f)); no tests
5798 `(("framework" ,java-osgi-framework)))
5799 (home-page "http://www.osgi.org")
5800 (synopsis "OSGI Package Administration")
5802 "OSGi, for Open Services Gateway initiative framework, is a module system
5803 and service platform for the Java programming language. This package contains
5804 the packageadmin service.")
5805 (license license:asl2.0)))
5807 (define-public java-ops4j-base-lang
5809 (name "java-ops4j-base-lang")
5813 (uri (string-append "https://github.com/ops4j/org.ops4j.base/"
5814 "archive/base-" version ".tar.gz"))
5817 "18hl3lpchgpv8yh5rlk39l2gif5dlfgb8gxjmncf39pr2dprkniw"))))
5818 (build-system ant-build-system)
5820 `(#:jar-name "java-ops4j-base-lang.jar"
5821 #:source-dir "ops4j-base-lang/src/main/java"
5822 #:tests? #f; no tests
5824 (modify-phases %standard-phases
5825 (add-before 'build 'add-test-file
5827 ;; That file is required by a test in ops4j-pax-exam-core-spi
5828 (mkdir-p "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang")
5829 (with-output-to-file "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang/pom.properties"
5833 "version=" ,version "\n"
5834 "groupId=org.ops4j.base"
5835 "artifactId=ops4j-base-lang\n")))))))))
5836 (home-page "https://ops4j1.jira.com/wiki/spaces/base/overview")
5837 (synopsis "Utility classes and extensions to be used in OPS4J projects")
5838 (description "OPS4J stands for Open Participation Software for Java. This
5839 package contains utilities and extensions related to @code{java.lang}.")
5840 (license license:asl2.0)))
5842 (define-public java-ops4j-base-monitors
5844 (inherit java-ops4j-base-lang)
5845 (name "java-ops4j-base-monitors")
5847 `(#:jar-name "java-ops4j-base-monitors.jar"
5848 #:source-dir "ops4j-base-monitors/src/main/java"
5849 #:tests? #f)); no tests
5851 `(("lang" ,java-ops4j-base-lang)))
5852 (description "OPS4J stands for Open Participation Software for Java. This
5853 package contains utilities and extensions related to monitoring.")))
5855 (define-public java-ops4j-base-io
5857 (inherit java-ops4j-base-lang)
5858 (name "java-ops4j-base-io")
5860 `(#:jar-name "java-ops4j-base-io.jar"
5861 #:source-dir "ops4j-base-io/src/main/java"
5862 #:test-dir "ops4j-base-io/src/test"
5864 (list "**/ListerTest.java")))
5866 `(("lang" ,java-ops4j-base-monitors)
5867 ("lang" ,java-ops4j-base-lang)))
5869 `(("junit" ,java-junit)
5870 ("hamcrest" ,java-hamcrest-core)))
5871 (description "OPS4J stands for Open Participation Software for Java. This
5872 package contains utilities and extensions related to handling streams and files.")))
5874 (define-public java-ops4j-base-util
5876 (inherit java-ops4j-base-lang)
5877 (name "java-ops4j-base-util")
5879 `(#:jar-name "java-ops4j-base-util.jar"
5880 #:source-dir "ops4j-base-util/src/main/java"
5881 #:test-dir "ops4j-base-util/src/test"))
5883 `(("lang" ,java-ops4j-base-lang)))
5885 `(("junit" ,java-junit)))
5886 (description "OPS4J stands for Open Participation Software for Java. This
5887 package contains utilities and extensions related to environment, i18n and
5890 (define-public java-ops4j-base-util-property
5892 (inherit java-ops4j-base-lang)
5893 (name "java-ops4j-base-util-property")
5895 `(#:jar-name "java-ops4j-base-util-property.jar"
5896 #:source-dir "ops4j-base-util-property/src/main/java"
5897 #:tests? #f)); no tests
5899 `(("lang" ,java-ops4j-base-lang)
5900 ("util" ,java-ops4j-base-util)))
5901 (description "OPS4J stands for Open Participation Software for Java. This
5902 package contains utilities and extensions related to resolving properties from
5903 different sources.")))
5905 (define-public java-ops4j-base-store
5907 (inherit java-ops4j-base-lang)
5908 (name "java-ops4j-base-store")
5910 `(#:jar-name "java-ops4j-base-store.jar"
5911 #:source-dir "ops4j-base-store/src/main/java"
5912 #:tests? #f)); no tests
5914 `(("lang" ,java-ops4j-base-lang)
5915 ("slf4j" ,java-slf4j-api)
5916 ("io" ,java-ops4j-base-io)))
5917 (description "OPS4J stands for Open Participation Software for Java. This
5918 package contains utilities for storing and retrieving data from an
5919 @code{InputStream}.")))
5921 (define-public java-ops4j-base-spi
5923 (inherit java-ops4j-base-lang)
5924 (name "java-ops4j-base-spi")
5926 `(#:jar-name "java-ops4j-base-spi.jar"
5927 #:source-dir "ops4j-base-spi/src/main/java"
5928 #:test-dir "ops4j-base-spi/src/test"))
5930 `(("junit" ,java-junit)
5931 ("hamcrest" ,java-hamcrest-core)))
5932 (description "OPS4J stands for Open Participation Software for Java. This
5933 package contains utilities for obtaining services via the Java SE 6
5934 @code{ServiceLoader}.")))
5936 (define-public java-aqute-bnd-annotation
5938 (name "java-aqute-bnd-annotation")
5942 (uri (string-append "https://github.com/bndtools/bnd/archive/"
5943 version ".REL.tar.gz"))
5944 (file-name (string-append name "-" version ".tar.gz"))
5947 "09vgb6axikbz66zi9falijbnzh1qnp9ysfns123dmzdb01cbza9q"))))
5948 (build-system ant-build-system)
5950 `(#:jar-name "java-aqute-bnd-annotation.jar"
5951 #:source-dir "biz.aQute.bnd.annotation/src"
5952 #:tests? #f)); empty test dir
5953 (home-page "http://bnd.bndtools.org/")
5954 (synopsis "Tools for OSGi")
5955 (description "Bnd is a swiss army knife for OSGi, it creates manifest
5956 headers based on analyzing the class code, it verifies the project settings,
5957 it manages project dependencies, gives diffs jars, and much more.")
5958 (license license:asl2.0)))
5960 (define-public java-aqute-libg
5962 (inherit java-aqute-bnd-annotation)
5963 (name "java-aqute-libg")
5965 `(#:jar-name "java-aqute-libg.jar"
5966 #:source-dir "aQute.libg/src"
5967 #:tests? #f)); FIXME: tests are in "aQute.libg/test", not in a java directory
5969 `(("slf4j" ,java-slf4j-api)
5970 ("osgi-annot" ,java-osgi-annotation)
5971 ("java-osgi-cmpn" ,java-osgi-cmpn)
5972 ("osgi" ,java-osgi-core)))))
5974 (define-public java-aqute-bndlib
5976 (inherit java-aqute-bnd-annotation)
5977 (name "java-aqute-bndlib")
5979 `(#:jar-name "java-bndlib.jar"
5980 #:source-dir "biz.aQute.bndlib/src"
5981 #:tests? #f)); no tests
5983 `(("slf4j" ,java-slf4j-api)
5984 ("osgi-annot" ,java-osgi-annotation)
5985 ("java-aqute-libg" ,java-aqute-libg)
5986 ("java-aqute-bnd-annotation" ,java-aqute-bnd-annotation)
5987 ("java-osgi-service-component-annotations" ,java-osgi-service-component-annotations)
5988 ("java-osgi-service-repository" ,java-osgi-service-repository)
5989 ("java-osgi-service-log" ,java-osgi-service-log)
5990 ("java-osgi-service-metatype-annotations" ,java-osgi-service-metatype-annotations)
5991 ("java-osgi-namespace-contract" ,java-osgi-namespace-contract)
5992 ("java-osgi-namespace-extender" ,java-osgi-namespace-extender)
5993 ("java-osgi-namespace-service" ,java-osgi-namespace-service)
5994 ("promise" ,java-osgi-util-promise)
5995 ("osgi" ,java-osgi-core)))))
5997 (define-public java-ops4j-pax-tinybundles
5999 (name "java-ops4j-pax-tinybundles")
6003 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.tinybundles/"
6004 "archive/tinybundles-" version ".tar.gz"))
6007 "0y0gq3pvv0iir2b885lmlwnvr724vv7vklzhhr4fs27d7mdkj871"))))
6009 `(#:jar-name "java-ops4j-pax-tinybundles.jar"
6010 #:source-dir "src/main/java"
6012 ;; Abstract base classes for other tests
6013 (list "**/BndTest.java" "**/CoreTest.java")
6015 (modify-phases %standard-phases
6016 (add-before 'check 'fix-version
6018 ;; This test has a reference to an old version of bndlib we are not
6019 ;; packaging. It uses the version referenced in pom.xml. We replace
6020 ;; it with our own version.
6021 (substitute* "src/test/java/org/ops4j/pax/tinybundles/bnd/BndTest.java"
6022 (("2.4.0.201411031534") "3.4.0")))))))
6024 `(("lang" ,java-ops4j-base-lang)
6025 ("io" ,java-ops4j-base-io)
6026 ("store" ,java-ops4j-base-store)
6027 ("slf4j" ,java-slf4j-api)
6028 ("libg" ,java-aqute-libg)
6029 ("bndlib" ,java-aqute-bndlib)))
6031 `(("junit" ,java-junit)
6032 ("hamcrest" ,java-hamcrest-core)
6033 ("log4j" ,java-log4j-api)
6034 ("bndannotation" ,java-aqute-bnd-annotation)
6035 ("framework" ,java-osgi-framework)))
6036 (build-system ant-build-system)
6037 (home-page "https://ops4j1.jira.com/wiki/spaces/ops4j/pages/12060312/Tinybundles")
6038 (synopsis "Java APIs to create OSGi related artifacts")
6039 (description "Tinybundles is all about creating OSGi related artifacts like
6040 Bundles, Fragments and Deployment Packages with Java Api. It is very convinient
6041 to create such artifacts on-the-fly inside Tests (like in Pax Exam). On the
6042 other hand, this library can be a foundation of real end user tools that need
6043 to create those artifacts.")
6044 (license license:asl2.0)))
6046 (define-public java-ops4j-pax-exam-core
6048 (name "java-ops4j-pax-exam-core")
6052 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.exam2/"
6053 "archive/exam-reactor-" version ".tar.gz"))
6056 "08mzw8nkah3rj3vznlplnawspxhp61zgvb44ifqa1rni1cvbms2g"))))
6058 `(#:jar-name "java-ops4j-pax-exam-core.jar"
6059 #:source-dir "core/pax-exam/src/main/java"
6060 #:test-dir "core/pax-exam/src/test"))
6062 `(("slf4j" ,java-slf4j-api)
6063 ("lang" ,java-ops4j-base-lang)
6064 ("io" ,java-ops4j-base-io)
6065 ("util-property" ,java-ops4j-base-util-property)
6066 ("util-store" ,java-ops4j-base-store)
6067 ("java-osgi-core" ,java-osgi-core)))
6069 `(("junit" ,java-junit)
6070 ("hamcrest" ,java-hamcrest-core)))
6071 (build-system ant-build-system)
6072 (home-page "https://ops4j1.jira.com/wiki/spaces/PAXEXAM4/overview")
6073 (synopsis "In-Container Testing for OSGi, Java EE and CDI")
6074 (description "Pax Exam creates OSGi bundles for testing purposes. It lets
6075 the user take control of the OSGi framework, the test framework (e.g. JUnit) and
6076 the system under test at the same time.")
6077 (license license:asl2.0)))
6079 (define-public java-ops4j-pax-exam-core-spi
6081 (inherit java-ops4j-pax-exam-core)
6082 (name "java-ops4j-pax-exam-core-spi")
6084 `(#:jar-name "java-ops4j-pax-exam-spi.jar"
6085 #:source-dir "src/main/java"
6088 ;; Abstract base class, not a test
6089 "**/BaseStagedReactorTest.java"
6090 ;; Depends on org.mortbay.jetty.testwars:test-war-dump
6091 "**/WarBuilderTest.java")
6093 (modify-phases %standard-phases
6094 (add-before 'configure 'chdir
6096 ;; Tests assume we are in this directory
6097 (chdir "core/pax-exam-spi")))
6098 (add-before 'check 'fix-tests
6100 ;; One test checks that this file is present.
6101 (mkdir-p "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi")
6102 (with-output-to-file
6103 "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi/pom.properties"
6106 (string-append "artifactId = pax-exam-spi\n"
6107 "version = " ,(package-version java-ops4j-pax-exam-core-spi)))))
6108 ;; Maven puts compilation results in the target directory, while we
6109 ;; put them in the build directory.
6110 (substitute* '("src/test/java/org/ops4j/pax/exam/spi/war/WarBuilderTest.java"
6111 "src/test/java/org/ops4j/pax/exam/spi/war/WarTestProbeBuilderTest.java"
6112 "src/test/java/org/ops4j/pax/exam/spi/war/ZipBuilderTest.java")
6113 (("target") "build"))
6114 ;; One test is expected to fail, but it doesn't throw the expected exception
6115 (substitute* "src/test/java/org/ops4j/pax/exam/spi/reactors/BaseStagedReactorTest.java"
6116 (("AssertionError") "IllegalArgumentException")))))))
6118 `(("java-ops4j-pax-exam-core" ,java-ops4j-pax-exam-core)
6119 ("lang" ,java-ops4j-base-lang)
6120 ("monitors" ,java-ops4j-base-monitors)
6121 ("store" ,java-ops4j-base-store)
6122 ("io" ,java-ops4j-base-io)
6123 ("spi" ,java-ops4j-base-spi)
6124 ("osgi" ,java-osgi-core)
6125 ("slf4j" ,java-slf4j-api)
6126 ("tinybundles" ,java-ops4j-pax-tinybundles)))
6128 `(("mockito" ,java-mockito-1)
6129 ("junit" ,java-junit)
6130 ("hamcrest" ,java-hamcrest-core)
6131 ("cglib" ,java-cglib)
6132 ("objenesis" ,java-objenesis)
6133 ("asm" ,java-asm)))))
6135 (define-public java-ops4j-pax-exam-core-junit
6137 (inherit java-ops4j-pax-exam-core)
6138 (name "java-ops4j-pax-exam-core-junit")
6140 `(#:jar-name "ops4j-pax-exam-core-junit.jar"
6141 #:source-dir "drivers/pax-exam-junit4/src/main/java"
6142 #:tests? #f)); no tests
6144 `(("junit" ,java-junit)
6145 ("slf4j" ,java-slf4j-api)
6146 ("core" ,java-ops4j-pax-exam-core)
6147 ("spi" ,java-ops4j-pax-exam-core-spi)))
6148 (native-inputs '())))
6150 (define-public java-fasterxml-jackson-annotations
6152 (name "java-fasterxml-jackson-annotations")
6156 (uri (string-append "https://github.com/FasterXML/"
6157 "jackson-annotations/archive/"
6158 "jackson-annotations-" version ".tar.gz"))
6161 "0b4wdxjxfbl3gkilylfdbl7fzimfpyih676jiwdf19i4056j8lqw"))))
6162 (build-system ant-build-system)
6164 `(#:jar-name "jackson-annotations.jar"
6165 #:source-dir "src/main/java"
6166 #:test-dir "src/test"))
6168 `(("junit" ,java-junit)))
6169 (home-page "https://github.com/FasterXML/jackson-annotations")
6170 (synopsis "General purpose annotations for the Jackson Data Processor")
6171 (description "This package contains general purpose annotations for the
6172 Jackson Data Processor, used on value and handler types. The only annotations
6173 not included are ones that require dependency to the Databind package.")
6174 (license license:asl2.0)))
6176 (define-public java-fasterxml-jackson-core
6178 (name "java-fasterxml-jackson-core")
6182 (uri (string-append "https://github.com/FasterXML/"
6183 "jackson-core/archive/"
6184 "jackson-core-" version ".tar.gz"))
6187 "0q2d6qnylyxj5jh0sam1b095b5486f7ipzhxgwcgbm254ls7fqc1"))))
6188 (build-system ant-build-system)
6190 `(#:jar-name "jackson-core.jar"
6191 #:source-dir "src/main/java"
6192 #:test-dir "src/test"
6195 ;; Expected failure. pom.xml excludes these
6197 ;; Base classes that have no constructor for junit
6199 "**/ConcurrencyReadTest.java"
6200 "**/ManualCharAccessTest.java"
6201 "**/ManualCharAccessTest.java"
6202 "**/TrailingCommasTest.java"
6203 "**/AsyncMissingValuesInObjectTest.java"
6204 "**/AsyncMissingValuesInArrayTest.java")
6206 (modify-phases %standard-phases
6207 (add-before 'configure 'generate-PackageVersion.java
6209 (let* ((out "src/main/java/com/fasterxml/jackson/core/json/PackageVersion.java")
6210 (in (string-append out ".in")))
6213 (("@package@") "com.fasterxml.jackson.core.json")
6214 (("@projectversion@") ,version)
6215 (("@projectgroupid@") "com.fasterxml.jackson.core")
6216 (("@projectartifactid@") "jackson-core")))))
6217 (add-before 'build 'copy-resources
6219 (copy-recursively "src/main/resources"
6221 (add-before 'check 'copy-test-resources
6223 (copy-recursively "src/test/resources"
6224 "build/test-classes"))))))
6226 `(("junit" ,java-junit)
6227 ("hamcrest" ,java-hamcrest-core)))
6228 (home-page "https://github.com/FasterXML/jackson-core")
6231 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
6233 (define-public java-fasterxml-jackson-databind
6235 (name "java-fasterxml-jackson-databind")
6239 (uri (string-append "https://github.com/FasterXML/"
6240 "jackson-databind/archive/"
6241 "jackson-databind-" version ".tar.gz"))
6244 "1d5ns8ypqhdy8d94i8q560ip9kka6q8lhnk6q7nfh2g9mr22cc4w"))))
6245 (build-system ant-build-system)
6247 `(#:jar-name "jackson-databind.jar"
6248 #:source-dir "src/main/java"
6249 #:tests? #f; requires javax.measures for which I can't find a free implementation
6251 (modify-phases %standard-phases
6252 (add-before 'configure 'generate-PackageVersion.java
6254 (let* ((out "src/main/java/com/fasterxml/jackson/databind/cfg/PackageVersion.java")
6255 (in (string-append out ".in")))
6258 (("@package@") "com.fasterxml.jackson.databind.cfg")
6259 (("@projectversion@") ,version)
6260 (("@projectgroupid@") "com.fasterxml.jackson.databind")
6261 (("@projectartifactid@") "jackson-databind")))))
6262 (add-before 'build 'copy-resources
6264 (copy-recursively "src/main/resources" "build/classes"))))))
6266 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
6267 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)))
6268 (home-page "https://github.com/FasterXML/jackson-databind")
6269 (synopsis "Data-binding functionality and tree-model for the Jackson Data Processor")
6270 (description "This package contains the general-purpose data-binding
6271 functionality and tree-model for Jackson Data Processor. It builds on core
6272 streaming parser/generator package, and uses Jackson Annotations for
6274 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
6276 (define-public java-fasterxml-jackson-modules-base-jaxb
6278 (name "java-fasterxml-jackson-modules-base-jaxb")
6282 (uri (string-append "https://github.com/FasterXML/"
6283 "jackson-modules-base/archive/"
6284 "jackson-modules-base-" version ".tar.gz"))
6287 "0kc19n5a188g4vpyay44xfb7qcabcbfnwzhx1g84lg0sac8lf0ng"))))
6288 (build-system ant-build-system)
6290 `(#:jar-name "jackson-modules-base-jaxb.jar"
6291 #:source-dir "jaxb/src/main/java"
6292 #:test-dir "jaxb/src/test"
6294 ;; Base class for tests
6295 (list "**/BaseJaxbTest.java")
6297 (modify-phases %standard-phases
6298 (add-before 'configure 'generate-PackageVersion.java
6300 (let* ((out (string-append "jaxb/src/main/java/com/fasterxml/"
6301 "jackson/module/jaxb/PackageVersion.java"))
6302 (in (string-append out ".in")))
6305 (("@package@") "com.fasterxml.jackson.module.jaxb")
6306 (("@projectversion@") ,version)
6307 (("@projectgroupid@") "com.fasterxml.jackson.module.jaxb")
6308 (("@projectartifactid@") "jackson-module-jaxb")))))
6309 (add-before 'build 'copy-resources
6311 (copy-recursively "jaxb/src/main/resources" "build/classes"))))))
6313 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
6314 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
6315 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)))
6317 `(("java-junit" ,java-junit)))
6318 (home-page "https://github.com/FasterXML/jackson-modules-base")
6319 (synopsis "Jaxb annotations jackson module")
6320 (description "This package is the jaxb annotations module for jackson.")
6321 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
6323 (define-public java-snakeyaml
6325 (name "java-snakeyaml")
6329 (uri (string-append "https://bitbucket.org/asomov/snakeyaml/get/v"
6333 "0rf5ha6w0waz50jz2479jsrbgmd0dnx0gs337m126j5z7zlmg7mg"))))
6334 (build-system ant-build-system)
6336 `(#:jar-name "java-snakeyaml.jar"
6337 #:source-dir "src/main/java"
6338 ;; Tests require velocity, a cyclic dependency, and
6339 ;; java-spring-framework-context which is not packaged.
6341 (home-page "https://bitbucket.org/asomov/snakeyaml")
6342 (synopsis "YAML processor")
6343 (description "SnakeYAML is a YAML processor for the Java Virtual Machine.")
6344 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
6346 (define-public java-fasterxml-jackson-dataformat-yaml
6348 (name "java-fasterxml-jackson-dataformat-yaml")
6352 (uri (string-append "https://github.com/FasterXML/"
6353 "jackson-dataformats-text/archive/"
6354 "jackson-dataformats-text-" version ".tar.gz"))
6357 "1x7c7v201jpb8ynjsmmq7jj7hyqzzp39jvpr053ggdndm022yzc7"))))
6358 (build-system ant-build-system)
6360 `(#:jar-name "jackson-dataformat-yaml.jar"
6361 #:source-dir "yaml/src/main/java"
6362 #:test-dir "yaml/src/test"
6363 #:test-exclude (list "**/failing/**.java")
6365 (modify-phases %standard-phases
6366 (add-before 'configure 'generate-PackageVersion.java
6368 (let* ((out "yaml/src/main/java/com/fasterxml/jackson/dataformat/yaml/PackageVersion.java")
6369 (in (string-append out ".in")))
6372 (("@package@") "com.fasterxml.jackson.dataformat.yaml")
6373 (("@projectversion@") ,version)
6374 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.yaml")
6375 (("@projectartifactid@") "jackson-dataformat-yaml"))))))))
6377 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
6378 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
6379 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)
6380 ("java-snakeyaml" ,java-snakeyaml)))
6382 `(("junit" ,java-junit)
6383 ("hamcrest" ,java-hamcrest-core)
6384 ("java-ops4j-pax-exam-core-spi" ,java-ops4j-pax-exam-core-spi)
6385 ("java-ops4j-pax-exam-core-junit" ,java-ops4j-pax-exam-core-junit)
6386 ("java-ops4j-pax-exam" ,java-ops4j-pax-exam-core)))
6387 (home-page "https://github.com/FasterXML/jackson-dataformats-text")
6388 (synopsis "Yaml backend for Jackson")
6389 (description "Dataformat backends are used to support format alternatives
6390 to JSON, supported by default. This is done by sub-classing Jackson core
6392 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
6394 (define-public java-stax2-api
6396 (name "java-stax2-api")
6400 (uri (string-append "https://github.com/FasterXML/stax2-api/archive/"
6401 "stax2-api-" version ".tar.gz"))
6404 "1amc1si0l0hyyw2sawmnzy4hkna3z6fp195y4nm5m9wb9ld5awkq"))))
6405 (build-system ant-build-system)
6407 `(#:jar-name "java-stax2-api.jar"
6408 #:source-dir "src/main/java"
6409 #:tests? #f)); no tests
6410 (home-page "https://github.com/FasterXML/stax2-api")
6411 (synopsis "Stax2 API")
6412 (description "Stax2 API is an extension to basic Stax 1.0 API that adds
6413 significant new functionalities, such as full-featured bi-direction validation
6414 interface and high-performance Typed Access API.")
6415 (license license:bsd-2)))
6417 (define-public java-woodstox-core
6419 (name "java-woodstox-core")
6423 (uri (string-append "https://github.com/FasterXML/woodstox/archive/"
6424 "woodstox-core-" version ".tar.gz"))
6427 "1i7pdgb8jbw6gdy5kmm0l6rz109n2ns92pqalpyp24vb8vlvdfd4"))))
6428 (build-system ant-build-system)
6430 `(#:jar-name "woodstox.jar"
6432 (list "**/Base*.java" "failing/**")
6434 (modify-phases %standard-phases
6435 (add-before 'build 'remove-msv-dep
6437 ;; we don't need osgi, and it depends on msv
6438 (delete-file-recursively "src/main/java/com/ctc/wstx/osgi")
6439 ;; msv's latest release is from 2011 and we don't need it
6440 (delete-file-recursively "src/main/java/com/ctc/wstx/msv")
6441 (delete-file-recursively "src/test/java/wstxtest/osgi")
6442 (delete-file-recursively "src/test/java/wstxtest/msv")))
6443 (add-before 'build 'copy-resources
6445 (copy-recursively "src/main/resources" "build/classes"))))))
6447 `(("stax2" ,java-stax2-api)))
6449 `(("junit" ,java-junit)))
6450 (home-page "https://github.com/FasterXML/woodstox")
6451 (synopsis "Stax XML API implementation")
6452 (description "Woodstox is a stax XML API implementation.")
6453 (license license:asl2.0)))
6455 (define-public java-fasterxml-jackson-dataformat-xml
6457 (name "java-fasterxml-jackson-dataformat-xml")
6461 (uri (string-append "https://github.com/FasterXML/"
6462 "jackson-dataformat-xml/archive/"
6463 "jackson-dataformat-xml-" version ".tar.gz"))
6466 "1j1qanvcdh6afagr67zqrlypjkf0n6wr1qzpbvkw79lii72j6pbr"))))
6467 (build-system ant-build-system)
6469 `(#:jar-name "jackson-dataformat-xml.jar"
6470 #:source-dir "src/main/java"
6472 (list "**/failing/**")
6474 (modify-phases %standard-phases
6475 (add-before 'configure 'generate-PackageVersion.java
6477 (let* ((out "src/main/java/com/fasterxml/jackson/dataformat/xml/PackageVersion.java")
6478 (in (string-append out ".in")))
6482 (("@package@") "com.fasterxml.jackson.dataformat.xml")
6483 (("@projectversion@") ,version)
6484 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.xml")
6485 (("@projectartifactid@") "jackson-dataformat-xml")))))
6486 (add-before 'build 'copy-resources
6488 (copy-recursively "src/main/resources" "build/classes"))))))
6490 `(("jackson-annotations" ,java-fasterxml-jackson-annotations)
6491 ("jackson-core" ,java-fasterxml-jackson-core)
6492 ("jackson-modules-base-jaxb" ,java-fasterxml-jackson-modules-base-jaxb)
6493 ("jackson-databind" ,java-fasterxml-jackson-databind)
6494 ("stax2-api" ,java-stax2-api)
6495 ("woodstox" ,java-woodstox-core)))
6497 `(("junit" ,java-junit)
6498 ("hamcrest" ,java-hamcrest-core)))
6499 (home-page "https://github.com/FasterXML/jackson-dataformat-xml")
6500 (synopsis "Read and write XML")
6501 (description "This package contains Jackson extension component for reading
6502 and writing XML encoded data.
6504 Further, the goal is to emulate how JAXB data-binding works with \"Code-first\"
6505 approach (that is, no support is added for \"Schema-first\" approach). Support
6506 for JAXB annotations is provided by JAXB annotation module; this module
6507 provides low-level abstractions (@code{JsonParser}, @code{JsonGenerator},
6508 @code{JsonFactory}) as well as small number of higher level overrides needed to
6509 make data-binding work.")
6510 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
6512 (define-public java-hdrhistogram
6514 (name "java-hdrhistogram")
6518 (uri (string-append "https://github.com/HdrHistogram/HdrHistogram/"
6519 "archive/HdrHistogram-" version ".tar.gz"))
6522 "1sicbmc3sr42nw93qbkb26q9rn33ag33k6k77phjc3j5h5gjffqv"))))
6523 (build-system ant-build-system)
6525 `(#:jar-name "java-hdrhistogram.jar"
6526 #:source-dir "src/main/java"
6528 (modify-phases %standard-phases
6529 (add-before 'configure 'set-version
6531 (let* ((version-java "src/main/java/org/HdrHistogram/Version.java")
6532 (template (string-append version-java ".template")))
6533 (copy-file template version-java)
6534 (substitute* version-java
6535 (("\\$VERSION\\$") ,version)
6536 (("\\$BUILD_TIME\\$") "0"))
6539 `(("junit" ,java-junit)
6540 ("hamcrest" ,java-hamcrest-core)))
6541 (home-page "https://hdrhistogram.github.io/HdrHistogram")
6542 (synopsis "High dynamic range histogram")
6543 (description "Hdrhistogram allows to create histograms that support
6544 recording and analyzing sampled data value counts across a configurable integer
6545 value range with configurable value precision within the range. Value precision
6546 is expressed as the number of significant digits in the value recording, and
6547 provides control over value quantization behavior across the value range and
6548 the subsequent value resolution at any given level.")
6549 (license license:public-domain)))
6551 (define-public java-cofoja
6553 (name "java-cofoja")
6558 (url "https://github.com/nhatminhle/cofoja.git")
6559 (commit (string-append "v" version))))
6560 (file-name (string-append "java-cofoja-" version "-checkout"))
6563 "0p7sz8y5xgpi5rx1qwn6587fkd52qr3ha3ybh14gqcyxhikl525w"))))
6564 (build-system ant-build-system)
6566 `(#:build-target "dist"
6567 #:test-target "test"
6570 (list "-Ddist.dir=dist")
6571 #:modules ((guix build ant-build-system)
6572 (guix build java-utils)
6577 (modify-phases %standard-phases
6578 ;; The bulid system ignores the class path the ant-build-system sets
6579 ;; up and instead expects to find all dependencies in the "lib"
6581 (add-after 'unpack 'create-libdir
6582 (lambda* (#:key inputs #:allow-other-keys)
6586 (let ((target (string-append "lib/" (basename file))))
6587 (unless (file-exists? target)
6588 (symlink file target))))
6589 (append-map (match-lambda
6591 (find-files dir "\\.jar$")))
6594 (replace 'install (install-jars "dist")))))
6596 `(("java-asm" ,java-asm)))
6598 `(("java-junit" ,java-junit)))
6599 (home-page "https://github.com/nhatminhle/cofoja")
6600 (synopsis "Contracts for Java")
6601 (description "Contracts for Java, or Cofoja for short, is a contract
6602 programming framework and test tool for Java, which uses annotation processing
6603 and bytecode instrumentation to provide run-time checking. (In particular,
6604 this is not a static analysis tool.)")
6605 (license license:lgpl3+)))
6607 (define-public java-aopalliance
6609 (name "java-aopalliance")
6613 ;; Note: this git repository is not official, but contains the
6614 ;; source code that is in the CVS repository. Downloading the
6615 ;; tarball from sourceforge is undeterministic, and the cvs download
6618 (url "https://github.com/hoverruan/aopalliance")
6619 (commit "0d7757ae204e5876f69431421fe9bc2a4f01e8a0")))
6620 (file-name (string-append name "-" version))
6623 "0rsg2b0v3hxlq2yk1i3m2gw3xwq689j3cwx9wbxvqfpdcjbca0qr"))))
6624 (build-system ant-build-system)
6626 `(#:jar-name "java-aopalliance.jar"
6628 #:tests? #f; no tests
6629 #:source-dir "aopalliance/src/main"))
6630 (home-page "http://aopalliance.sourceforge.net")
6631 (synopsis "Aspect-Oriented Programming")
6632 (description "The AOP Alliance project is a joint project between several
6633 software engineering people who are interested in Aspect-Oriented Programming
6635 (license license:public-domain)))
6637 (define-public java-javax-inject
6639 (name "java-javax-inject")
6643 (uri (string-append "https://github.com/javax-inject/javax-inject/"
6644 "archive/javax.inject-" version ".tar.gz"))
6647 "1ydrlvh2r7vr1g7lhjwy3w2dggpj9h6pix1lakkkgdywb365n6g0"))))
6648 (build-system ant-build-system)
6650 `(#:jar-name "java-javax-inject.jar"
6652 #:tests? #f)); no tests
6653 (home-page "http://github.com/javax-inject/javax-inject")
6654 (synopsis "JSR-330: Dependency Injection for Java")
6655 (description "This package specifies a means for obtaining objects in such
6656 a way as to maximize reusability, testability and maintainability compared to
6657 traditional approaches such as constructors, factories, and service locators
6658 (e.g., JNDI). This process, known as dependency injection, is beneficial to
6659 most nontrivial applications.
6661 Many types depend on other types. For example, a @var{Stopwatch} might depend
6662 on a @var{TimeSource}. The types on which a type depends are known as its
6663 dependencies. The process of finding an instance of a dependency to use at run
6664 time is known as resolving the dependency. If no such instance can be found,
6665 the dependency is said to be unsatisfied, and the application is broken.")
6666 (license license:asl2.0)))
6668 (define-public java-guice
6674 (uri (string-append "https://github.com/google/guice/archive/"
6676 (file-name (string-append name "-" version ".tar.gz"))
6679 "0dwmqjzlavb144ywqqglj3h68hqszkff8ai0a42hyb5il0qh4rbp"))))
6680 (build-system ant-build-system)
6682 `(#:jar-name "java-guice.jar"
6684 #:tests? #f; FIXME: tests are not in a java sub directory
6685 #:source-dir "core/src"))
6687 `(("guava" ,java-guava)
6688 ("java-cglib" ,java-cglib)
6689 ("java-aopalliance" ,java-aopalliance)
6690 ("java-javax-inject" ,java-javax-inject)
6691 ("java-asm" ,java-asm)))
6692 (home-page "https://github.com/google/guice")
6693 (synopsis "Lightweight dependency injection framework")
6694 (description "Guice is a lightweight dependency injection framework fo
6696 (license license:asl2.0)))
6698 (define-public java-guice-servlet
6700 (inherit java-guice)
6701 (name "java-guice-servlet")
6703 `(#:jar-name "guice-servlet.jar"
6704 #:source-dir "extensions/servlet/src/"
6706 #:tests? #f)); FIXME: not in a java subdir
6708 `(("guice" ,java-guice)
6709 ("servlet" ,java-tomcat)
6710 ,@(package-inputs java-guice)))))
6712 (define-public java-assertj
6714 (name "java-assertj")
6718 (uri (string-append "https://github.com/joel-costigliola/"
6719 "assertj-core/archive/"
6720 "assertj-core-" version ".tar.gz"))
6723 "1kf124fxskf548rklkg86294w2x6ajqrff94rrhyqns31danqkfz"))))
6724 (build-system ant-build-system)
6726 `(#:jar-name "java-assertj.jar"
6728 #:source-dir "src/main/java"
6729 #:tests? #f)); depends on tng-junit which depends on assertj
6731 `(("cglib" ,java-cglib)
6732 ("junit" ,java-junit)
6733 ("hamcrest" ,java-hamcrest-core)))
6735 `(("mockito" ,java-mockito-1)))
6736 (home-page "https://joel-costigliola.github.io/assertj/index.html")
6737 (synopsis "Fluent assertions for java")
6738 (description "AssertJ core is a Java library that provides a fluent
6739 interface for writing assertions. Its main goal is to improve test code
6740 readability and make maintenance of tests easier.")
6741 (license license:asl2.0)))
6743 (define-public java-jboss-javassist
6745 (name "java-jboss-javassist")
6749 (uri (string-append "https://github.com/jboss-javassist/javassist/"
6751 (string-map (lambda (x) (if (eq? x #\.) #\_ x)) version)
6755 "10lpcr3sbf7y6fq6fc2h2ik7rqrivwcy4747bg0kxhwszil3cfmf"))))
6756 (build-system ant-build-system)
6758 `(#:jar-name "java-jboss-javassist.jar"
6760 #:source-dir "src/main"
6761 #:tests? #f; FIXME: requires junit-awtui and junit-swingui from junit3
6763 (modify-phases %standard-phases
6764 (add-before 'configure 'remove-binary
6766 (delete-file "javassist.jar")
6769 `(("junit" ,java-junit)))
6770 (home-page "https://github.com/jboss-javassist/javassist")
6771 (synopsis "Java bytecode engineering toolkit")
6772 (description "Javassist (JAVA programming ASSISTant) makes Java bytecode
6773 manipulation simple. It is a class library for editing bytecodes in Java; it
6774 enables Java programs to define a new class at runtime and to modify a class
6775 file when the JVM loads it.")
6776 (license (list license:gpl2 license:cddl1.0)))); either gpl2 only or cddl.
6778 (define-public java-jcommander
6780 (name "java-jcommander")
6784 (uri (string-append "https://github.com/cbeust/jcommander/archive/"
6786 (file-name (string-append name "-" version ".tar.gz"))
6789 "1f5k2ckay6qjc3d3w3d7bc0p3cx3c7n6p6zxvw1kibqdr0q98wlx"))))
6790 (build-system ant-build-system)
6792 `(#:jar-name "java-jcommander.jar"
6794 #:tests? #f; requires testng which depends on jcommander
6795 #:source-dir "src/main/java"))
6796 (home-page "http://jcommander.org")
6797 (synopsis "Command line parameters parser")
6798 (description "JCommander is a very small Java framework that makes it
6799 trivial to parse command line parameters. Parameters are declared with
6801 (license license:asl2.0)))
6803 (define-public java-bsh
6809 (uri (string-append "https://github.com/beanshell/beanshell/archive/"
6811 (file-name (string-append name "-" version ".tar.gz"))
6814 "1bawkxk6jyc75hxvzkpz689h73cn3f222m0ar3nvb0dal2b85kfv"))))
6815 (build-system ant-build-system)
6817 `(#:build-target "jarall"
6818 #:test-target "junit-tests-all"
6820 (modify-phases %standard-phases
6822 (lambda* (#:key outputs #:allow-other-keys)
6823 (let ((share (string-append (assoc-ref outputs "out") "/share/java")))
6825 (copy-file "dist/bsh-2.0b6.jar" (string-append share "/bsh-2.0b6.jar"))
6827 (home-page "http://beanshell.org/")
6828 (synopsis "Lightweight Scripting for Java")
6829 (description "BeanShell is a small, free, embeddable Java source
6830 interpreter with object scripting language features, written in Java.
6831 BeanShell dynamically executes standard Java syntax and extends it with common
6832 scripting conveniences such as loose types, commands, and method closures like
6833 those in Perl and JavaScript.")
6834 (license license:asl2.0)))
6836 (define-public java-fest-util
6838 (name "java-fest-util")
6842 (uri (string-append "https://github.com/alexruiz/fest-util/"
6843 "archive/fest-util-" version ".tar.gz"))
6846 "05g6hljz5mdaakk8d7g32klbhz9bdwp3qlj6rdaggdidxs3x1sb8"))))
6847 (build-system ant-build-system)
6849 `(#:jar-name "java-fest-util.jar"
6850 #:source-dir "src/main/java"))
6852 `(("junit" ,java-junit)
6853 ("hamcrest" ,java-hamcrest-core)))
6854 (home-page "https://github.com/alexruiz/fest-util")
6855 (synopsis "FEST common utilities")
6856 (description "Common utilities used in all FEST module.")
6857 (license license:asl2.0)))
6859 (define-public java-fest-test
6861 (name "java-fest-test")
6865 (uri (string-append "https://github.com/alexruiz/fest-test/"
6866 "archive/fest-test-" version ".tar.gz"))
6869 "1rxfbw6l9vc65iy1x3fb617qc6y4w2k430pgf1mfbxfdlxbm0f7g"))))
6870 (build-system ant-build-system)
6872 `(#:jar-name "java-fest-test.jar"
6873 #:source-dir "src/main/java"
6874 #:tests? #f)); no tests
6876 `(("junit" ,java-junit)))
6877 (home-page "https://github.com/alexruiz/fest-test")
6878 (synopsis "Common FEST testing infrastructure")
6879 (description "Fest-test contains the common FEST testing infrastructure.")
6880 (license license:asl2.0)))
6882 (define-public java-fest-assert
6884 (name "java-fest-assert")
6888 (uri (string-append "https://github.com/alexruiz/fest-assert-2.x/"
6889 "archive/fest-assert-core-" version ".tar.gz"))
6892 "1bi0iqavikzww6rxvz5jyg7y6bflv95s6ibryxx0xfcxrrw6i5lw"))))
6893 (build-system ant-build-system)
6895 `(#:jar-name "java-fest-assert.jar"
6896 #:source-dir "src/main/java"
6901 ;; Unable to set MockitoNamingPolicy on cglib generator which creates FastClasses
6902 "**/MessageFormatter_format_Test.java"
6903 "**/internal/*/*_assert*_Test.java")))
6905 `(("java-fest-util" ,java-fest-util)))
6907 `(("java-junit" ,java-junit)
6908 ("java-fest-test" ,java-fest-test)
6909 ("java-hamcrest-core" ,java-hamcrest-core)
6910 ("java-mockito" ,java-mockito-1)
6911 ("java-cglib" ,java-cglib)
6912 ("java-objenesis" ,java-objenesis)
6913 ("java-asm" ,java-asm)))
6914 (home-page "https://github.com/alexruiz/fest-assert-2.x")
6915 (synopsis "FEST fluent assertions")
6916 (description "FEST-Assert provides a fluent interface for assertions.")
6917 (license license:asl2.0)))
6919 (define-public java-testng
6921 (name "java-testng")
6925 (uri (string-append "https://github.com/cbeust/testng/archive/"
6927 (file-name (string-append name "-" version ".tar.gz"))
6930 "01j2x47wkj7n5w6gpcjfbwgc88ai5654b23lb87w7nsrj63m3by6"))))
6931 (build-system ant-build-system)
6933 `(#:jdk ,icedtea-8; java.util.function
6934 #:jar-name "java-testng.jar"
6935 #:source-dir "src/main/java"
6937 (modify-phases %standard-phases
6938 (add-before 'build 'copy-resources
6940 (copy-recursively "src/main/resources" "build/classes")
6942 (add-before 'check 'copy-test-resources
6944 (copy-recursively "src/test/resources" "build/test-classes")
6948 (system* "ant" "compile-tests")
6949 ;; we don't have groovy
6950 (substitute* "src/test/resources/testng.xml"
6951 (("<class name=\"test.groovy.GroovyTest\" />") ""))
6952 (zero? (system* "java" "-cp" (string-append (getenv "CLASSPATH")
6954 ":build/test-classes")
6955 "-Dtest.resources.dir=src/test/resources"
6956 "org.testng.TestNG" "src/test/resources/testng.xml")))))))
6958 `(("junit" ,java-junit)
6959 ("java-jsr305" ,java-jsr305)
6960 ("java-bsh" ,java-bsh)
6961 ("java-jcommander" ,java-jcommander)
6962 ("java-guice" ,java-guice)
6963 ("snakeyaml" ,java-snakeyaml)))
6965 `(("guava" ,java-guava)
6966 ("java-javax-inject" ,java-javax-inject)
6967 ("java-hamcrest" ,java-hamcrest-all)
6968 ("java-assertj" ,java-assertj)
6969 ("cglib" ,java-cglib)
6971 ("aopalliance" ,java-aopalliance)))
6972 (home-page "http://testng.org")
6973 (synopsis "Testing framework")
6974 (description "TestNG is a testing framework inspired from JUnit and NUnit
6975 but introducing some new functionalities that make it more powerful and easier
6977 (license license:asl2.0)))
6979 (define-public java-jnacl
6986 (url "https://github.com/neilalexander/jnacl")
6987 (commit "40c322e0a42637ab17cdf941138eeaf2494055f8")))
6990 "1pspnmp44q61a2q4bpslpxw86rfn8s5l0xgvyrikqgdvg7ypx597"))))
6991 (build-system ant-build-system)
6993 `(#:jar-name "java-jnacl.jar"
6994 #:source-dir "src/main/java"
6997 (modify-phases %standard-phases
6998 (add-before 'build 'fix-tests
7000 (substitute* "src/test/java/com/neilalexander/jnacl/NaClTest.java"
7001 (("assertions.Assertions") "assertions.api.Assertions"))
7002 (substitute* "src/test/java/com/neilalexander/jnacl/NaclSecretBoxTest.java"
7003 (("assertions.Assertions") "assertions.api.Assertions"))
7007 (system* "ant" "compile-tests")
7009 (zero? (system* "java" "-cp" (string-append (getenv "CLASSPATH")
7011 ":build/test-classes")
7012 "org.testng.TestNG" "-testclass"
7013 "build/test-classes/com/neilalexander/jnacl/NaclSecretBoxTest.class"))
7014 (zero? (system* "java" "-cp" (string-append (getenv "CLASSPATH")
7016 ":build/test-classes")
7017 "org.testng.TestNG" "-testclass"
7018 "build/test-classes/com/neilalexander/jnacl/NaClTest.class"))))))))
7020 `(("java-testng" ,java-testng)
7021 ("java-fest-util" ,java-fest-util)
7022 ("java-fest-assert" ,java-fest-assert)))
7023 (home-page "https://github.com/neilalexander/jnacl")
7024 (synopsis "Java implementation of NaCl")
7025 (description "Pure Java implementation of the NaCl: Networking and
7026 Cryptography library.")
7027 (license license:mpl2.0)))
7029 (define-public java-mvel2
7035 (uri (string-append "https://github.com/mvel/mvel/archive/mvel2-"
7036 version ".Final.tar.gz"))
7039 "01ph5s9gm16l2qz58lg21w6fna7xmmrj7f9bzqr1jim7h9557d3z"))))
7040 (build-system ant-build-system)
7042 `(#:jar-name "mvel2.jar"
7043 #:source-dir "src/main/java"
7045 (list "**/Abstract*.java"
7046 ;; Base class with no tests
7047 "**/MVELThreadTest.java")
7049 (modify-phases %standard-phases
7050 (add-after 'install 'install-bin
7051 (lambda* (#:key outputs #:allow-other-keys)
7052 (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
7054 (with-output-to-file (string-append bin "/mvel2")
7058 "#!" (which "bash") "\n"
7059 "if [ \"$#\" -ne \"2\" ]; then\n"
7060 "echo 'Usage: mvel2 <script> <out.dir>'\n"
7063 "java -Dout.dir=$2 -cp " (getenv "CLASSPATH")
7064 ":" (assoc-ref outputs "out") "/share/java/mvel2.jar"
7065 " org.mvel2.sh.Main $1"))))
7066 (chmod (string-append bin "/mvel2") #o755))
7069 `(("junit" ,java-junit)
7070 ("hamcrest" ,java-hamcrest-core)))
7071 (home-page "https://github.com/mvel/mvel")
7072 (synopsis "MVFLEX Expression Language")
7073 (description "MVEL has largely been inspired by Java syntax, but has some
7074 fundamental differences aimed at making it more efficient as an expression
7075 language, such as operators that directly support collection, array and string
7076 matching, as well as regular expressions. MVEL is used to evaluate expressions
7077 written using Java syntax.
7079 In addition to the expression language, MVEL serves as a templating language for
7080 configuration and string construction.")
7081 (license license:asl2.0)))
7083 (define-public java-commons-jexl-2
7085 (name "java-commons-jexl")
7089 (uri (string-append "mirror://apache/commons/jexl/source/"
7090 "commons-jexl-" version "-src.tar.gz"))
7093 "1ai7632bwwaxglb0nbpblpr2jw5g20afrsaq372ipkphi3ncy1jz"))))
7094 (build-system ant-build-system)
7096 `(#:jar-name "commons-jexl-2.jar"
7098 #:source-dir "src/main/java"
7100 (modify-phases %standard-phases
7101 (add-before 'check 'disable-broken-tests
7102 (lambda* (#:key inputs #:allow-other-keys)
7103 (with-directory-excursion "src/test/java/org/apache/commons/jexl2/"
7104 (substitute* "ArithmeticTest.java"
7105 (("asserter.assertExpression\\(\"3 / 0\"") "//")
7106 (("asserter.assertExpression\\(\"imanull") "//"))
7107 ;; This test fails with "ambiguous method invocation"
7108 (delete-file "CacheTest.java")
7109 ;; This test doesn't have access to the temp directory
7110 (substitute* "ClassCreatorTest.java"
7111 (("java.io.tmpdir") "user.dir"))
7112 ;; This test fails in trying to detect whether it can run.
7113 (substitute* "ClassCreator.java"
7114 (("boolean canRun =.*") "boolean canRun = false;\n"))
7115 ;; ...and these tests depend on it.
7116 (delete-file "scripting/JexlScriptEngineOptionalTest.java")
7117 (delete-file "scripting/JexlScriptEngineTest.java"))
7119 (add-before 'build 'run-javacc
7121 (with-directory-excursion "src/main/java/org/apache/commons/jexl2/parser/"
7122 (and (zero? (system* "java" "jjtree" "Parser.jjt"))
7123 (zero? (system* "java" "javacc" "Parser.jj")))))))))
7125 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)))
7127 `(("java-junit" ,java-junit)
7128 ("java-hamcrest-core" ,java-hamcrest-core)
7129 ("javacc" ,javacc-4)))
7130 (home-page "https://commons.apache.org/proper/commons-jexl/")
7131 (synopsis "Java Expression Language ")
7132 (description "JEXL is a library intended to facilitate the implementation
7133 of dynamic and scripting features in applications and frameworks written in
7134 Java. JEXL implements an Expression Language based on some extensions to the
7135 JSTL Expression Language supporting most of the constructs seen in
7136 shell-script or ECMAScript. Its goal is to expose scripting features usable
7137 by technical operatives or consultants working with enterprise platforms.")
7138 (license license:asl2.0)))
7140 (define-public java-lz4
7146 (uri (string-append "https://github.com/lz4/lz4-java/archive/"
7148 (file-name (string-append name "-" version ".tar.gz"))
7151 "096dm57p2lzqk28n0j2p52x2j3cvnsd2dfqn43n7vbwrkjsy7y54"))))
7152 (build-system ant-build-system)
7154 `(#:jar-name "lz4.jar"
7156 #:source-dir "src/java:src/java-unsafe"
7157 #:tests? #f; FIXME: requires more dependencies
7159 (modify-phases %standard-phases
7160 (add-before 'configure 'generate-source
7162 (with-directory-excursion "src/build/source_templates"
7163 (zero? (system* "mvel2" "../gen_sources.mvel" "../../java"))))))))
7165 `(("mvel" ,java-mvel2)))
7166 (home-page "https://jpountz.github.io/lz4-java")
7167 (synopsis "Compression algorithm")
7168 (description "LZ4 - Java is a Java port of the popular lz4 compression
7169 algorithms and xxHash hashing algorithm.")
7170 (license license:asl2.0)))
7172 (define-public java-bouncycastle-bcprov
7174 (name "java-bouncycastle-bcprov")
7178 (uri "https://bouncycastle.org/download/bcprov-jdk15on-158.tar.gz")
7181 "1hgkg96llbvgs8i0krwz2n0j7wlg6jfnq8w8kg0cc899j0wfmf3n"))))
7182 (build-system ant-build-system)
7184 `(#:jar-name "bouncycastle-bcprov.jar"
7185 #:tests? #f; no tests
7188 (modify-phases %standard-phases
7189 (add-before 'configure 'unzip-src
7192 (with-directory-excursion "src"
7193 (zero? (system* "unzip" "../src.zip"))))))))
7196 ("junit" ,java-junit)))
7197 (home-page "https://www.bouncycastle.org")
7198 (synopsis "Cryptographic library")
7199 (description "Bouncy Castle Provider (bcprov) is a cryptographic library
7200 for the Java programming language.")
7201 (license license:expat)))
7203 (define-public java-bouncycastle-bcpkix
7205 (name "java-bouncycastle-bcpkix")
7209 (uri "https://bouncycastle.org/download/bcpkix-jdk15on-158.tar.gz")
7212 "0is7qay02803s9f7lhnfcjlz61ni3hq5d7apg0iil7nbqkbfbcq2"))))
7213 (build-system ant-build-system)
7215 `(#:jar-name "bouncycastle-bcpkix.jar"
7216 #:tests? #f; no tests
7219 (modify-phases %standard-phases
7220 (add-before 'configure 'unzip-src
7223 (with-directory-excursion "src"
7224 (zero? (system* "unzip" "../src.zip"))))))))
7227 ("junit" ,java-junit)))
7229 `(("bcprov" ,java-bouncycastle-bcprov)))
7230 (home-page "https://www.bouncycastle.org")
7231 (synopsis "Cryptographic library")
7232 (description "Bouncy Castle Java API for PKIX, CMS, EAC, TSP, PKCS, OCSP,
7234 (license license:expat)))
7236 (define-public java-lmax-disruptor
7238 (name "java-lmax-disruptor")
7242 (uri (string-append "https://github.com/LMAX-Exchange/disruptor/"
7243 "archive/" version ".tar.gz"))
7244 (file-name (string-append name "-" version ".tar.gz"))
7247 "17da2gwj5abnlsfgn2xqjk5lgzbg4vkb0hdv2dvc8r2fx4bi7w3g"))))
7248 (build-system ant-build-system)
7250 `(#:jar-name "java-lmax-disruptor.jar"
7252 #:tests? #f)); tests hang
7254 `(("junit" ,java-junit)
7255 ("java-hdrhistogram" ,java-hdrhistogram)
7256 ("java-jmock" ,java-jmock)
7257 ("java-jmock-legacy" ,java-jmock-legacy)
7258 ("java-jmock-junit4" ,java-jmock-junit4)
7259 ("java-hamcrest-all" ,java-hamcrest-all)))
7261 `(("cglib" ,java-cglib)
7262 ("objenesis" ,java-objenesis)
7264 (home-page "https://www.lmax.com/disruptor")
7265 (synopsis "High performance inter-thread communication")
7266 (description "LMAX Disruptor is a software pattern and software component
7267 for high performance inter-thread communication that avoids the need for
7268 message queues or resource locking.")
7269 (license license:asl2.0)))
7271 (define-public java-commons-bcel
7273 (name "java-commons-bcel")
7277 (uri (string-append "mirror://apache/commons/bcel/source/bcel-"
7278 version "-src.tar.gz"))
7281 "0j3x1rxd673k07psclk8k13rqh0x0mf2yy5qiwkiw4z3afa568jy"))))
7282 (build-system ant-build-system)
7284 `(#:jar-name "bcel.jar"
7286 #:source-dir "src/main/java"
7287 #:test-dir "src/test/java"
7288 ;; FIXME: Tests require the unpackaged jna.
7290 (home-page "https://commons.apache.org/proper/commons-bcel/")
7291 (synopsis "Byte code engineering library")
7292 (description "The Byte Code Engineering Library (Apache Commons BCEL) is
7293 intended to give users a convenient way to analyze, create, and
7294 manipulate (binary) Java class files. Classes are represented by objects
7295 which contain all the symbolic information of the given class: methods, fields
7296 and byte code instructions, in particular.
7298 Such objects can be read from an existing file, be transformed by a
7299 program (e.g. a class loader at run-time) and written to a file again. An
7300 even more interesting application is the creation of classes from scratch at
7301 run-time. The @dfn{Byte Code Engineering Library} (BCEL) may be also useful
7302 if you want to learn about the @dfn{Java Virtual Machine} (JVM) and the format
7303 of Java @code{.class} files.")
7304 (license license:asl2.0)))
7306 (define-public java-xerial-core
7308 (name "java-xerial-core")
7312 (uri (string-append "https://github.com/xerial/xerial-java/archive/"
7314 (file-name (string-append name "-" version ".tar.gz"))
7317 "0d3g863i41bgalpa4xr3vm1h140l091n8iwgq5qvby5yivns9y8d"))))
7318 (build-system ant-build-system)
7320 `(#:jar-name "xerial-core.jar"
7321 #:source-dir "xerial-core/src/main/java"
7322 #:test-dir "xerial-core/src/test"
7324 (modify-phases %standard-phases
7325 (add-before 'build 'copy-resources
7327 (copy-recursively "xerial-core/src/main/resources"
7331 `(("junit" ,java-junit)
7332 ("hamcrest" ,java-hamcrest-core)))
7333 (home-page "https://github.com/xerial/xerial-java")
7334 (synopsis "Data managment libraries for Java")
7335 (description "Xerial is a set of data management libraries for the Java
7336 programming language. The ulitimate goal of the Xerial project is to manage
7337 everything as database, including class objects, text format data, data
7339 (license license:asl2.0)))
7341 (define-public java-powermock-reflect
7343 (name "java-powermock-reflect")
7347 (uri (string-append "https://github.com/powermock/powermock/"
7348 "archive/powermock-" version ".tar.gz"))
7349 (file-name (string-append name "-" version ".tar.gz"))
7352 "0sbgi5vqq7k72wzcdjb20s370vyd4hsbnx71pzb8ishml3gy7fwy"))
7354 (search-patches "java-powermock-fix-java-files.patch"))))
7355 (build-system ant-build-system)
7357 `(#:jar-name "java-powermock-reflect.jar"
7359 #:source-dir "powermock-reflect/src/main/java"
7360 #:test-dir "powermock-reflect/src/test"))
7362 `(("java-objenesis" ,java-objenesis)))
7364 `(("junit" ,java-junit)
7365 ("cglib" ,java-cglib)
7367 ("hamcrest" ,java-hamcrest-core)
7368 ("assertj" ,java-assertj)))
7369 (home-page "https://github.com/powermock/powermock")
7370 (synopsis "Mock library extension framework")
7371 (description "PowerMock is a framework that extends other mock libraries
7372 such as EasyMock with more powerful capabilities. PowerMock uses a custom
7373 classloader and bytecode manipulation to enable mocking of static methods,
7374 constructors, final classes and methods, private methods, removal of static
7375 initializers and more. By using a custom classloader no changes need to be
7376 done to the IDE or continuous integration servers which simplifies adoption.")
7377 (license license:asl2.0)))
7379 (define-public java-powermock-core
7381 (inherit java-powermock-reflect)
7382 (name "java-powermock-core")
7384 `(#:jar-name "java-powermock-core.jar"
7385 #:source-dir "powermock-core/src/main/java"
7386 #:test-dir "powermock-core/src/test"
7387 #:tests? #f; requires powermock-api
7390 `(("reflect" ,java-powermock-reflect)
7391 ("javassist" ,java-jboss-javassist)))
7393 `(("junit" ,java-junit)
7394 ("assertj" ,java-assertj)
7395 ("mockito" ,java-mockito-1)))))
7397 (define-public java-powermock-api-support
7399 (inherit java-powermock-reflect)
7400 (name "java-powermock-api-support")
7401 (build-system ant-build-system)
7403 `(#:jar-name "java-powermock-api-support.jar"
7405 #:source-dir "powermock-api/powermock-api-support/src/main/java"
7406 #:tests? #f)); no tests
7408 `(("core" ,java-powermock-core)
7409 ("reflect" ,java-powermock-reflect)))))
7411 (define-public java-powermock-modules-junit4-common
7413 (inherit java-powermock-reflect)
7414 (name "java-powermock-modules-junit4-common")
7415 (build-system ant-build-system)
7417 `(#:jar-name "java-powermock-modules-junit4-common.jar"
7419 #:source-dir "powermock-modules/powermock-module-junit4-common/src/main/java"
7420 #:test-dir "powermock-modules/powermock-module-junit4-common/src/test"))
7422 `(("core" ,java-powermock-core)
7423 ("easymock" ,java-easymock)
7424 ("reflect" ,java-powermock-reflect)
7425 ("hamcrest" ,java-hamcrest-core)
7426 ("cglib" ,java-cglib)))))
7428 (define-public java-powermock-modules-junit4
7430 (inherit java-powermock-reflect)
7431 (name "java-powermock-modules-junit4")
7432 (build-system ant-build-system)
7434 `(#:jar-name "java-powermock-modules-junit4.jar"
7436 #:source-dir "powermock-modules/powermock-module-junit4/src/main/java"
7437 #:test-dir "powermock-modules/powermock-module-junit4/src/test"))
7439 `(("core" ,java-powermock-core)
7440 ("reflect" ,java-powermock-reflect)
7441 ("common" ,java-powermock-modules-junit4-common)
7442 ("cglib" ,java-cglib)))
7444 `(("easymock" ,java-easymock)
7445 ("hamcrest" ,java-hamcrest-core)
7446 ("objenesis" ,java-objenesis)
7448 ("junit" ,java-junit)))))
7450 (define-public java-powermock-api-easymock
7452 (inherit java-powermock-reflect)
7453 (name "java-powermock-api-easymock")
7454 (build-system ant-build-system)
7456 `(#:jar-name "java-powermock-api-easymock.jar"
7458 #:source-dir "powermock-api/powermock-api-easymock/src/main/java"
7459 #:tests? #f; no tests
7461 (modify-phases %standard-phases
7462 (add-before 'build 'fix-file
7464 ;; FIXME: This looks wrong, but it fixes a build error.
7465 (with-directory-excursion "powermock-api/powermock-api-easymock"
7466 (substitute* "src/main/java/org/powermock/api/easymock/PowerMock.java"
7467 (("classLoader instanceof MockClassLoader") "false")
7468 (("\\(\\(MockClassLoader\\) classLoader\\).*;") ";")))
7471 `(("core" ,java-powermock-core)
7472 ("easymock" ,java-easymock)
7473 ("reflect" ,java-powermock-reflect)
7474 ("support" ,java-powermock-api-support)
7475 ("cglib" ,java-cglib)))))
7477 (define-public java-jboss-jms-api-spec
7479 (name "java-jboss-jms-api-spec")
7483 (uri (string-append "https://github.com/jboss/jboss-jms-api_spec/"
7484 "archive/jboss-jms-api_" version
7485 "_spec-1.0.1.Final.tar.gz"))
7488 "07bqblw9kq2i8q92bz70fvavq5xjfkaixl8xa0m0cypjgy82rb7m"))))
7489 (build-system ant-build-system)
7491 `(#:jar-name "java-jboss-jms-api_spec.jar"
7494 #:tests? #f)); no tests
7495 (home-page "https://github.com/jboss/jboss-jms-api_spec")
7496 (synopsis "Java Message Service API specification")
7497 (description "Java Message Service (JMS) API is used to send messages
7498 messages between two or more clients. It is a messaging standard that allows
7499 application components to create, send, receive, and read messages.")
7500 ; either gpl2 only with GPL Classpath Exception, or cddl.
7501 (license (list license:gpl2 license:cddl1.0))))
7503 (define-public java-mail
7509 (uri (string-append "https://github.com/javaee/javamail/archive/"
7510 "JAVAMAIL-1_6_0.tar.gz"))
7513 "1b4rg7fpj50ld90a71iz2m4gm3f5cnw18p3q3rbrrryjip46kx92"))))
7514 (build-system ant-build-system)
7516 `(#:jar-name "java-mail.jar"
7518 #:source-dir "mail/src/main/java"
7519 #:test-dir "mail/src/test"
7521 (list "**/CollectorFormatterTest.java"
7522 "**/CompactFormatterTest.java"
7523 "**/DurationFilterTest.java"
7524 "**/MailHandlerTest.java"
7525 "**/GetLocalAddressTest.java"
7526 ;; FIXME: both end with:
7527 ;; java.lang.ClassNotFoundException:
7528 ;; javax.mail.internet.MimeMultipartParseTest
7529 "**/MimeMultipartParseTest.java"
7530 "**/SearchTermSerializationTest.java")
7532 (modify-phases %standard-phases
7533 (add-before 'configure 'move-version.java
7535 (copy-file "mail/src/main/resources/javax/mail/Version.java"
7536 "mail/src/main/java/javax/mail/Version.java")
7538 (add-before 'build 'copy-resources
7540 (copy-recursively "mail/src/main/resources/META-INF"
7541 "build/classes/META-INF")
7544 `(("junit" ,java-junit)
7545 ("hamcrest" ,java-hamcrest-core)))
7546 (home-page "https://javaee.github.io/javamail/")
7547 (synopsis "Mail-related functionnalities in Java")
7548 (description "The JavaMail API provides a platform-independent and
7549 protocol-independent framework to build mail and messaging applications.")
7550 ;; General Public License Version 2 only ("GPL") or the Common Development
7551 ;; and Distribution License("CDDL")
7552 (license (list license:cddl1.1
7553 license:gpl2)))); with classpath exception
7555 (define-public java-jeromq
7557 (name "java-jeromq")
7561 (uri (string-append "https://github.com/zeromq/jeromq/archive/v"
7563 (file-name (string-append name "-" version ".tar.gz"))
7566 "17wx8dlyqmbw77xf6d6wxnhiyky6181zpf1a48jqzz9hidz0j841"))))
7567 (build-system ant-build-system)
7569 `(#:jar-name "java-jeromq.jar"
7570 #:source-dir "src/main/java"
7576 "**/ZBeaconTest.java"
7578 "**/CustomDecoderTest.java"
7579 "**/CustomEncoderTest.java")))
7581 `(("java-jnacl" ,java-jnacl)))
7583 `(("java-hamcrest-core" ,java-hamcrest-core)
7584 ("junit" ,java-junit)))
7585 (home-page "http://zeromq.org/bindings:java")
7586 (synopsis "Java binding for 0MQ")
7587 (description "Jeromq provides the java bindings for 0MQ.")
7588 (license license:mpl2.0)))
7590 (define-public java-kafka-clients
7592 (name "java-kafka-clients")
7596 (uri (string-append "mirror://apache/kafka/" version "/kafka-"
7597 version "-src.tgz"))
7600 "1yxmnsmliwm7671q5yy9bl4jdqyyn00n26cggz9brwczx80w1vfq"))))
7601 (build-system ant-build-system)
7603 `(#:jar-name "java-kafka-clients.jar"
7605 #:source-dir "clients/src/main/java"
7606 #:test-dir "clients/src/test"
7609 ;; This file does not contain a class
7610 "**/IntegrationTest.java"
7612 "**/ClientUtilsTest.java"
7613 ;; End with errors that seem related to our powermock
7614 "**/KafkaProducerTest.java"
7615 "**/BufferPoolTest.java")))
7617 `(("java-slf4j-api" ,java-slf4j-api)
7618 ("java-lz4" ,java-lz4)))
7620 `(("junit" ,java-junit)
7621 ("hamcrest" ,java-hamcrest-all)
7622 ("objenesis" ,java-objenesis)
7624 ("cglib" ,java-cglib)
7625 ("javassist" ,java-jboss-javassist)
7626 ("snappy" ,java-snappy)
7627 ("easymock" ,java-easymock)
7628 ("powermock" ,java-powermock-core)
7629 ("powermock-easymock" ,java-powermock-api-easymock)
7630 ("powermock-junit4-common" ,java-powermock-modules-junit4-common)
7631 ("powermock-junit4" ,java-powermock-modules-junit4)
7632 ("powermock-support" ,java-powermock-api-support)
7633 ("bouncycastle" ,java-bouncycastle-bcprov)
7634 ("bouncycastle-bcpkix" ,java-bouncycastle-bcpkix)))
7635 (home-page "https://kafka.apache.org")
7636 (synopsis "Distributed streaming platform")
7637 (description "Kafka is a distributed streaming platform, which means:
7639 @item it can publish and subscribe to streams of records;
7640 @item it can store streams of records in a fault-tolerant way;
7641 @item it can process streams of records as they occur.
7643 ;; Either cddl or gpl2 only.
7644 (license (list license:cddl1.1; actually cddl1.1
7645 license:gpl2)))); with classpath exception
7647 (define-public java-jdom
7653 (uri (string-append "http://jdom.org/dist/binary/archive/jdom-"
7657 "07wdpm3jwwc9q38kmdw40fvbmv6jzjrkrf8m0zqs58f79a672wfl"))))
7658 (build-system ant-build-system)
7660 `(#:build-target "package"
7661 #:tests? #f; tests are run as part of the build process
7663 (modify-phases %standard-phases
7665 (install-jars "build")))))
7666 (home-page "http://jdom.org/")
7667 (synopsis "Access, manipulate, and output XML data")
7668 (description "Java-based solution for accessing, manipulating, and
7669 outputting XML data from Java code.")
7670 (license license:bsd-4)))
7672 (define-public java-geronimo-xbean-reflect
7674 (name "java-geronimo-xbean-reflect")
7679 (url "https://svn.apache.org/repos/asf/geronimo/xbean/tags/xbean-4.5/")
7680 (revision 1807396)))
7681 (file-name (string-append name "-" version))
7684 "18q3i6jgm6rkw8aysfgihgywrdc5nvijrwnslmi3ww497jvri6ja"))))
7685 (build-system ant-build-system)
7687 `(#:jar-name "geronimo-xbean-reflect.jar"
7688 #:source-dir "xbean-reflect/src/main/java"
7689 #:test-dir "xbean-reflect/src/test"
7692 (list "**/Abstract*.java" "**/AsmParameterNameLoaderTest.java"
7693 "**/ObjectRecipeTest.java" "**/ParameterNameLoaderTest.java"
7694 "**/RecipeHelperTest.java" "**/XbeanAsmParameterNameLoaderTest.java")
7696 (modify-phases %standard-phases
7697 (add-before 'build 'fix-source
7699 (let ((dir "xbean-reflect/src/main/java/org/apache/xbean/recipe/"))
7700 ;; org.apache.xbean.asm6 is actually repackaged java-asm
7701 (substitute* (string-append dir "XbeanAsmParameterNameLoader.java")
7702 (("org.apache.xbean.asm5") "org.objectweb.asm"))
7706 ("log4j" ,java-log4j-api)
7707 ("log4j-1.2" ,java-log4j-1.2-api)
7708 ("log4j-core" ,java-log4j-core)
7709 ("logging" ,java-commons-logging-minimal)))
7711 `(("junit" ,java-junit)))
7712 (home-page "https://geronimo.apache.org/maven/xbean/3.6/xbean-reflect/")
7713 (synopsis "Dependency injection helper")
7714 (description "Xbean-reflect provides very flexible ways to create objects
7715 and graphs of objects for dependency injection frameworks")
7716 (license license:asl2.0)))