1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2015, 2016, 2017, 2018 Ricardo Wurmus <rekado@elephly.net>
3 ;;; Copyright © 2016 Leo Famulari <leo@famulari.name>
4 ;;; Copyright © 2016, 2017 Roel Janssen <roel@gnu.org>
5 ;;; Copyright © 2017 Carlo Zancanaro <carlo@zancanaro.id.au>
6 ;;; Copyright © 2017 Julien Lepiller <julien@lepiller.eu>
7 ;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be>
8 ;;; Copyright © 2016, 2017, 2018 Alex Vong <alexvong1995@gmail.com>
9 ;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr>
10 ;;; Copyright © 2018 Gábor Boskovits <boskovits@gmail.com>
11 ;;; Copyright © 2018 Chris Marusich <cmmarusich@gmail.com>
13 ;;; This file is part of GNU Guix.
15 ;;; GNU Guix is free software; you can redistribute it and/or modify it
16 ;;; under the terms of the GNU General Public License as published by
17 ;;; the Free Software Foundation; either version 3 of the License, or (at
18 ;;; your option) any later version.
20 ;;; GNU Guix is distributed in the hope that it will be useful, but
21 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
22 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 ;;; GNU General Public License for more details.
25 ;;; You should have received a copy of the GNU General Public License
26 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
28 (define-module (gnu packages java)
29 #:use-module ((guix licenses) #:prefix license:)
30 #:use-module (guix packages)
31 #:use-module (guix download)
32 #:use-module (guix hg-download)
33 #:use-module (guix git-download)
34 #:use-module (guix svn-download)
35 #:use-module (guix utils)
36 #:use-module (guix build-system ant)
37 #:use-module (guix build-system gnu)
38 #:use-module (guix build-system trivial)
39 #:use-module (gnu packages)
40 #:use-module (gnu packages attr)
41 #:use-module (gnu packages autotools)
42 #:use-module (gnu packages base)
43 #:use-module (gnu packages bash)
44 #:use-module (gnu packages certs)
45 #:use-module (gnu packages cpio)
46 #:use-module (gnu packages cups)
47 #:use-module (gnu packages compression)
48 #:use-module (gnu packages fontutils)
49 #:use-module (gnu packages gawk)
50 #:use-module (gnu packages gettext)
51 #:use-module (gnu packages gcc)
52 #:use-module (gnu packages gl)
53 #:use-module (gnu packages gnuzilla) ;nss
54 #:use-module (gnu packages ghostscript) ;lcms
55 #:use-module (gnu packages gnome)
56 #:use-module (gnu packages gtk)
57 #:use-module (gnu packages guile)
58 #:use-module (gnu packages icu4c)
59 #:use-module (gnu packages image)
60 #:use-module (gnu packages libffi)
61 #:use-module (gnu packages linux) ;alsa
62 #:use-module (gnu packages maths)
63 #:use-module (gnu packages web)
64 #:use-module (gnu packages wget)
65 #:use-module (gnu packages pkg-config)
66 #:use-module (gnu packages perl)
67 #:use-module (gnu packages popt)
68 #:use-module (gnu packages kerberos)
69 #:use-module (gnu packages xml)
70 #:use-module (gnu packages xorg)
71 #:use-module (gnu packages texinfo)
72 #:use-module ((srfi srfi-1) #:select (fold alist-delete))
73 #:use-module (srfi srfi-11)
74 #:use-module (ice-9 match))
78 ;;; Java bootstrap toolchain.
81 ;; The Java bootstrap begins with Jikes, a Java compiler written in C++. We
82 ;; use it to build the SableVM standard library and virtual machine, which are
83 ;; written in a simpler dialect of Java and C, respectively. This is
84 ;; sufficient to build an older version of Ant, which is needed to build an
85 ;; older version of ECJ, an incremental Java compiler, both of which are
88 ;; ECJ is needed to build the latest release of GNU Classpath (0.99).
89 ;; Classpath (> 0.98) is a requirement for JamVM, a more modern implementation
90 ;; of the Java virtual machine.
92 ;; With JamVM we can build the latest development version of GNU Classpath,
93 ;; which has much more support for Java 1.6 than the latest release. Since
94 ;; the previous build of JamVM is limited by the use of GNU Classpath 0.99 we
95 ;; rebuild it with the latest development version of GNU Classpath.
97 ;; Finally, we use the bootstrap toolchain to build the OpenJDK with the
98 ;; Icedtea 1.x build framework. We then build the more recent JDKs Icedtea
99 ;; 2.x and Icedtea 3.x.
107 (uri (string-append "mirror://sourceforge/jikes/Jikes/"
108 version "/jikes-" version ".tar.bz2"))
111 "1qqldrp74pzpy5ly421srqn30qppmm9cvjiqdngk8hf47dv2rc0c"))))
112 (build-system gnu-build-system)
113 (home-page "http://jikes.sourceforge.net/")
114 (synopsis "Compiler for the Java language")
115 (description "Jikes is a compiler that translates Java source files as
116 defined in The Java Language Specification into the bytecoded instruction set
117 and binary format defined in The Java Virtual Machine Specification.")
118 (license license:ibmpl1.0)))
120 (define sablevm-classpath
122 (name "sablevm-classpath")
126 (uri (string-append "mirror://sourceforge/sablevm/sablevm/"
127 version "/sablevm-classpath-" version ".tar.gz"))
130 "1qyhyfz8idghxdam16hdgpa24r2x4xbg9z8c8asa3chnd79h3zw2"))))
131 (build-system gnu-build-system)
148 ("pkg-config" ,pkg-config)))
149 (home-page "http://sablevm.org/")
150 (synopsis "Java Virtual Machine")
151 (description "SableVM is a clean-room, highly portable and efficient Java
152 virtual machine. Its goals are to be reasonably small, fast, and compliant
153 with the various specifications (JVM specification, JNI, invocation interface,
154 etc.). SableVM is no longer maintained.
156 This package provides the classpath library.")
157 (license license:lgpl2.1+)))
165 (uri (string-append "mirror://sourceforge/sablevm/sablevm/"
166 version "/sablevm-" version ".tar.gz"))
169 "1jyg4bsym6igz94wps5443c7wiwlzinqzkchcw972nz4kf1cql6g"))))
170 (build-system gnu-build-system)
173 (list "--with-threading=switch" ; slower but prevents segfault
174 "--with-internal-libffi=no"
175 "--with-internal-libpopt=no")
177 (modify-phases %standard-phases
178 (add-after 'unpack 'remove-timestamp-for-reproducibility
180 (substitute* "src/sablevm/Makefile.in"
181 (("\\$\\(SVMCOMPILETIME\\)") "(unknown)"))
183 (add-after 'unpack 'link-with-popt
185 (substitute* "src/sablevm/Makefile.in"
186 (("\\$\\(SVMADD\\)" match)
187 (string-append match " -lpopt")))
189 (add-after 'unpack 'patch-path-to-classpath
190 (lambda* (#:key inputs #:allow-other-keys)
191 (substitute* "Makefile.in"
192 (("@datadir@/sablevm-classpath")
193 (string-append (assoc-ref inputs "classpath")
194 "/share/sablevm-classpath")))
195 (substitute* "src/libsablevm/Makefile.in"
196 (("\\$\\(libdir\\)/sablevm-classpath")
197 (string-append (assoc-ref inputs "classpath")
198 "/lib/sablevm-classpath"))
199 (("\\$\\(datadir\\)/sablevm-classpath")
200 (string-append (assoc-ref inputs "classpath")
201 "/share/sablevm-classpath")))
204 `(("classpath" ,sablevm-classpath)
210 `(("libltdl" ,libltdl)))
211 (home-page "http://sablevm.org/")
212 (synopsis "Java Virtual Machine")
213 (description "SableVM is a clean-room, highly portable and efficient Java
214 virtual machine. Its goals are to be reasonably small, fast, and compliant
215 with the various specifications (JVM specification, JNI, invocation interface,
216 etc.). SableVM is no longer maintained.
218 This package provides the virtual machine.")
219 (license license:lgpl2.1+)))
221 (define ant-bootstrap
223 (name "ant-bootstrap")
224 ;; The 1.10.x series requires Java 8. 1.9.0 and later use generics, which
225 ;; are not supported. The 1.8.x series is the last to use only features
226 ;; supported by Jikes, but it cannot seem to be built with sablevm.
230 (uri (string-append "http://archive.apache.org/dist/"
231 "ant/source/apache-ant-"
232 version "-src.tar.bz2"))
235 "19pvqvgkxgpgsqm4lvbki5sm0z84kxmykdqicvfad47gc1r9mi2d"))))
236 (build-system gnu-build-system)
238 `(#:tests? #f ; no "check" target
240 (modify-phases %standard-phases
243 (lambda* (#:key inputs #:allow-other-keys)
245 (string-append (assoc-ref inputs "sablevm")
248 (string-append (assoc-ref inputs "sablevm")
249 "/bin/java-sablevm"))
251 (string-append (assoc-ref inputs "sablevm")
252 "/bin/javac-sablevm"))
254 ;; Use jikes instead of javac for <javac ...> tags in build.xml
255 (setenv "ANT_OPTS" "-Dbuild.compiler=jikes")
257 ;; jikes produces lots of warnings, but they are not very
258 ;; interesting, so we silence them.
259 (setenv "$BOOTJAVAC_OPTS" "-nowarn")
261 ;; Disable tests because we are bootstrapping and thus don't have
262 ;; any of the dependencies required to build and run the tests.
263 (substitute* "build.xml"
264 (("depends=\"jars,test-jar\"") "depends=\"jars\""))
265 (zero? (system* "bash" "bootstrap.sh"
266 (string-append "-Ddist.dir="
267 (assoc-ref %outputs "out"))))))
271 ("sablevm" ,sablevm)))
272 (home-page "http://ant.apache.org")
273 (synopsis "Build tool for Java")
275 "Ant is a platform-independent build tool for Java. It is similar to
276 make but is implemented using the Java language, requires the Java platform,
277 and is best suited to building Java projects. Ant uses XML to describe the
278 build process and its dependencies, whereas Make uses Makefile format.")
279 (license license:asl2.0)))
281 ;; Version 3.2.2 is the last version without a dependency on a full-fledged
282 ;; compiler for Java 1.5.
283 (define ecj-bootstrap
285 (name "ecj-bootstrap")
289 (uri (string-append "http://archive.eclipse.org/eclipse/"
290 "downloads/drops/R-" version
291 "-200702121330/ecjsrc.zip"))
294 "05hj82kxd23qaglsjkaqcj944riisjha7acf7h3ljhrjyljx8307"))))
295 ;; It would be so much easier if we could use the ant-build-system, but we
296 ;; cannot as we don't have ant at this point. We use ecj for
297 ;; bootstrapping the JDK.
298 (build-system gnu-build-system)
300 `(#:modules ((guix build gnu-build-system)
303 #:tests? #f ; there are no tests
305 (modify-phases %standard-phases
307 (lambda* (#:key inputs #:allow-other-keys)
310 (find-files (string-append (assoc-ref inputs "ant-bootstrap")
316 (lambda* (#:key inputs #:allow-other-keys)
317 ;; The unpack phase enters the "org" directory by mistake.
320 ;; Create a simple manifest to make ecj executable.
321 (with-output-to-file "manifest"
323 (display "Manifest-Version: 1.0
324 Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n")))
327 (and (zero? (apply system* "javac-sablevm"
328 (find-files "." "\\.java$")))
329 (zero? (system* "fastjar" "cvfm"
330 "ecj-bootstrap.jar" "manifest" ".")))))
332 (lambda* (#:key outputs #:allow-other-keys)
333 (let ((share (string-append (assoc-ref outputs "out")
336 (install-file "ecj-bootstrap.jar" share)
339 `(("ant-bootstrap" ,ant-bootstrap)
342 ("fastjar" ,fastjar)))
343 (home-page "https://eclipse.org")
344 (synopsis "Eclipse Java development tools core batch compiler")
345 (description "This package provides the Eclipse Java core batch compiler
346 for bootstrapping purposes. The @dfn{Eclipse compiler for Java} (ecj) is a
347 requirement for all GNU Classpath releases after version 0.93.")
348 (license license:epl1.0)))
350 (define ecj-javac-wrapper
351 (package (inherit ecj-bootstrap)
352 (name "ecj-javac-wrapper")
354 (build-system trivial-build-system)
356 `(#:modules ((guix build utils))
358 (let ((backend 'sablevm))
359 (use-modules (guix build utils))
360 (let* ((bin (string-append (assoc-ref %outputs "out") "/bin"))
361 (target (string-append bin "/javac"))
362 (guile (string-append (assoc-ref %build-inputs "guile")
364 (ecj (string-append (assoc-ref %build-inputs "ecj-bootstrap")
365 "/share/java/ecj-bootstrap.jar"))
368 (string-append (assoc-ref %build-inputs "sablevm")
369 "/lib/sablevm/bin/java"))
371 (string-append (assoc-ref %build-inputs "jamvm")
373 (bootcp (case backend
375 (let ((jvmlib (string-append
376 (assoc-ref %build-inputs "sablevm-classpath")
378 (string-append jvmlib "/jre/lib/rt.jar")))
380 (let ((jvmlib (string-append (assoc-ref %build-inputs "classpath")
381 "/share/classpath")))
382 (string-append jvmlib "/lib/glibj.zip:"
383 jvmlib "/lib/tools.zip"))))))
385 (with-output-to-file target
387 (format #t "#!~a --no-auto-compile\n!#\n" guile)
389 `(begin (use-modules (ice-9 match)
395 '(("-bootclasspath" ,bootcp)
400 (let ((classpath (getenv "CLASSPATH")))
404 (string-append ":" classpath)
406 (receive (vm-args other-args)
407 ;; Separate VM arguments from arguments to ECJ.
408 (partition (cut string-prefix? "-J" <>)
409 (fold (lambda (default acc)
410 (if (member (first default) acc)
411 acc (append default acc)))
415 ;; Remove "-J" prefix
416 (map (cut string-drop <> 2) vm-args)
417 '("org.eclipse.jdt.internal.compiler.batch.Main")
418 (cons "-nowarn" other-args)))))
420 (let ((args (cdr (command-line))))
422 (format (current-error-port) "javac: no arguments given!\n")
427 `(("guile" ,guile-2.2)
428 ("ecj-bootstrap" ,ecj-bootstrap)
430 ("sablevm-classpath" ,sablevm-classpath)))
431 (description "This package provides a wrapper around the @dfn{Eclipse
432 compiler for Java} (ecj) with a command line interface that is compatible with
433 the standard javac executable.")))
435 ;; Note: All the tool wrappers (e.g. for javah, javac, etc) fail with
436 ;; java.lang.UnsupportedClassVersionError. They simply won't run on the old
437 ;; sablevm. We use Classpath 0.99 to build JamVM, on which the Classpath
438 ;; tools do run. Using these Classpath tools on JamVM we can then build the
439 ;; development version of GNU Classpath.
440 (define classpath-on-sablevm
446 (uri (string-append "mirror://gnu/classpath/classpath-"
450 "1j7cby4k66f1nvckm48xcmh352b1d1b33qk7l6hi7dp9i9zjjagr"))))
451 (build-system gnu-build-system)
454 (list (string-append "--with-ecj-jar="
455 (assoc-ref %build-inputs "ecj-bootstrap")
456 "/share/java/ecj-bootstrap.jar")
457 (string-append "JAVAC="
458 (assoc-ref %build-inputs "ecj-javac-wrapper")
460 (string-append "JAVA="
461 (assoc-ref %build-inputs "sablevm")
464 "ac_cv_prog_java_works=yes" ; trust me
468 "--disable-gconf-peer"
474 (modify-phases %standard-phases
475 (add-after 'install 'install-data
476 (lambda _ (zero? (system* "make" "install-data")))))))
478 `(("ecj-bootstrap" ,ecj-bootstrap)
479 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
482 ("sablevm-classpath" ,sablevm-classpath)
484 ("pkg-config" ,pkg-config)))
485 (home-page "https://www.gnu.org/software/classpath/")
486 (synopsis "Essential libraries for Java")
487 (description "GNU Classpath is a project to create core class libraries
488 for use with runtimes, compilers and tools for the Java programming
490 ;; GPLv2 or later, with special linking exception.
491 (license license:gpl2+)))
493 (define jamvm-bootstrap
499 (uri (string-append "mirror://sourceforge/jamvm/jamvm/"
500 "JamVM%20" version "/jamvm-"
504 "1nl0zxz8y5x8gwsrm7n32bry4dx8x70p8z3s9jbdvs8avyb8whkn"))))
505 (build-system gnu-build-system)
508 (list (string-append "--with-classpath-install-dir="
509 (assoc-ref %build-inputs "classpath")))))
511 `(("classpath" ,classpath-on-sablevm)
512 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
514 (home-page "http://jamvm.sourceforge.net/")
515 (synopsis "Small Java Virtual Machine")
516 (description "JamVM is a Java Virtual Machine conforming to the JVM
517 specification edition 2 (blue book). It is extremely small. However, unlike
518 other small VMs it supports the full spec, including object finalisation and
520 (license license:gpl2+)))
522 ;; We need this because the tools provided by the latest release of GNU
523 ;; Classpath don't actually work with sablevm.
524 (define classpath-jamvm-wrappers
525 (package (inherit classpath-on-sablevm)
526 (name "classpath-jamvm-wrappers")
528 (build-system trivial-build-system)
530 `(#:modules ((guix build utils))
533 (use-modules (guix build utils))
534 (let* ((bash (assoc-ref %build-inputs "bash"))
535 (jamvm (assoc-ref %build-inputs "jamvm"))
536 (classpath (assoc-ref %build-inputs "classpath"))
537 (bin (string-append (assoc-ref %outputs "out")
540 (for-each (lambda (tool)
541 (with-output-to-file (string-append bin tool)
543 (format #t "#!~a/bin/sh
544 ~a/bin/jamvm -classpath ~a/share/classpath/tools.zip \
545 gnu.classpath.tools.~a.~a $@"
546 bash jamvm classpath tool
547 (if (string=? "native2ascii" tool)
548 "Native2ASCII" "Main"))))
549 (chmod (string-append bin tool) #o755))
559 ("jamvm" ,jamvm-bootstrap)
560 ("classpath" ,classpath-on-sablevm)))
562 (synopsis "Executables from GNU Classpath")
563 (description "This package provides wrappers around the tools provided by
564 the GNU Classpath library. They are executed by the JamVM virtual
567 (define ecj-javac-on-jamvm-wrapper
568 (package (inherit ecj-javac-wrapper)
569 (name "ecj-javac-on-jamvm-wrapper")
571 `(#:modules ((guix build utils))
573 ;; TODO: This builder is exactly the same as in ecj-javac-wrapper,
574 ;; except that the backend is 'jamvm here. Can we reuse the same
576 (let ((backend 'jamvm))
577 (use-modules (guix build utils))
578 (let* ((bin (string-append (assoc-ref %outputs "out") "/bin"))
579 (target (string-append bin "/javac"))
580 (guile (string-append (assoc-ref %build-inputs "guile")
582 (ecj (string-append (assoc-ref %build-inputs "ecj-bootstrap")
583 "/share/java/ecj-bootstrap.jar"))
586 (string-append (assoc-ref %build-inputs "sablevm")
587 "/lib/sablevm/bin/java"))
589 (string-append (assoc-ref %build-inputs "jamvm")
591 (bootcp (case backend
593 (let ((jvmlib (string-append
594 (assoc-ref %build-inputs "sablevm-classpath")
596 (string-append jvmlib "/jre/lib/rt.jar")))
598 (let ((jvmlib (string-append (assoc-ref %build-inputs "classpath")
599 "/share/classpath")))
600 (string-append jvmlib "/lib/glibj.zip:"
601 jvmlib "/lib/tools.zip"))))))
603 (with-output-to-file target
605 (format #t "#!~a --no-auto-compile\n!#\n" guile)
607 `(begin (use-modules (ice-9 match)
613 '(("-bootclasspath" ,bootcp)
618 (let ((classpath (getenv "CLASSPATH")))
622 (string-append ":" classpath)
624 (receive (vm-args other-args)
625 ;; Separate VM arguments from arguments to ECJ.
626 (partition (cut string-prefix? "-J" <>)
627 (fold (lambda (default acc)
628 (if (member (first default) acc)
629 acc (append default acc)))
633 ;; Remove "-J" prefix
634 (map (cut string-drop <> 2) vm-args)
635 '("org.eclipse.jdt.internal.compiler.batch.Main")
636 (cons "-nowarn" other-args)))))
638 (let ((args (cdr (command-line))))
640 (format (current-error-port) "javac: no arguments given!\n")
645 `(("guile" ,guile-2.2)
646 ("ecj-bootstrap" ,ecj-bootstrap)
647 ("jamvm" ,jamvm-bootstrap)
648 ("classpath" ,classpath-on-sablevm)))
649 (description "This package provides a wrapper around the @dfn{Eclipse
650 compiler for Java} (ecj) with a command line interface that is compatible with
651 the standard javac executable. The tool runs on JamVM instead of SableVM.")))
653 ;; The last release of GNU Classpath is 0.99 and it happened in 2012. Since
654 ;; then Classpath has gained much more support for Java 1.6.
655 (define-public classpath-devel
656 (let ((commit "e7c13ee0cf2005206fbec0eca677f8cf66d5a103")
658 (package (inherit classpath-on-sablevm)
659 (version (string-append "0.99-" revision "." (string-take commit 9)))
663 (url "https://git.savannah.gnu.org/git/classpath.git")
665 (file-name (string-append "classpath-" version "-checkout"))
668 "1v2rww76ww322mpg3s12a1kkc6gkp31bm9gcxs532h0wq285fiw4"))))
671 ;; Ensure that the initial heap size is smaller than the maximum
672 ;; size. By default only Xmx is set, which can lead to invalid
673 ;; memory settings on some machines with a lot of memory.
674 '("JAVAC_MEM_OPT=-J-Xms512M -J-Xmx768M")
676 (list (string-append "--with-ecj-jar="
677 (assoc-ref %build-inputs "ecj-bootstrap")
678 "/share/java/ecj-bootstrap.jar")
679 (string-append "--with-javac="
680 (assoc-ref %build-inputs "ecj-javac-wrapper")
682 (string-append "JAVA="
683 (assoc-ref %build-inputs "jamvm")
686 "ac_cv_prog_java_works=yes" ; trust me
690 "--disable-gconf-peer"
696 (modify-phases %standard-phases
697 (add-after 'unpack 'bootstrap
699 (zero? (system* "autoreconf" "-vif"))))
700 (add-after 'unpack 'remove-unsupported-annotations
702 (substitute* (find-files "java" "\\.java$")
705 (add-after 'install 'install-data
706 (lambda _ (zero? (system* "make" "install-data")))))))
708 `(("autoconf" ,autoconf)
709 ("automake" ,automake)
711 ("gettext" ,gettext-minimal)
713 ("classpath-jamvm-wrappers" ,classpath-jamvm-wrappers) ; for javah
714 ("ecj-bootstrap" ,ecj-bootstrap)
715 ("ecj-javac-wrapper" ,ecj-javac-on-jamvm-wrapper)
717 ("jamvm" ,jamvm-bootstrap)
719 ("pkg-config" ,pkg-config))))))
722 (package (inherit jamvm-bootstrap)
724 `(("classpath" ,classpath-devel)
725 ("ecj-javac-wrapper" ,ecj-javac-on-jamvm-wrapper)
728 (define ecj-javac-on-jamvm-wrapper-final
729 (package (inherit ecj-javac-on-jamvm-wrapper)
731 `(("guile" ,guile-2.2)
732 ("ecj-bootstrap" ,ecj-bootstrap)
734 ("classpath" ,classpath-devel)))))
736 ;; The bootstrap JDK consisting of jamvm, classpath-devel,
737 ;; ecj-javac-on-jamvm-wrapper-final cannot build Icedtea 2.x directly, because
738 ;; it's written in Java 7. It can, however, build the unmaintained Icedtea
739 ;; 1.x, which uses Java 6 only.
740 (define-public icedtea-6
747 "http://icedtea.wildebeest.org/download/source/icedtea6-"
751 "0bg9sb4f7qbq77c0zf9m17p47ga0kf0r9622g9p12ysg26jd1ksg"))
752 (modules '((guix build utils)))
754 '(substitute* "Makefile.in"
755 ;; do not leak information about the build host
756 (("DISTRIBUTION_ID=\"\\$\\(DIST_ID\\)\"")
757 "DISTRIBUTION_ID=\"\\\"guix\\\"\"")))))
758 (build-system gnu-build-system)
759 (outputs '("out" ; Java Runtime Environment
760 "jdk" ; Java Development Kit
761 "doc")) ; all documentation
763 `(;; There are many failing tests and many are known to fail upstream.
766 ;; The DSOs use $ORIGIN to refer to each other, but (guix build
767 ;; gremlin) doesn't support it yet, so skip this phase.
768 #:validate-runpath? #f
770 #:modules ((guix build utils)
771 (guix build gnu-build-system)
775 `("--enable-bootstrap"
778 "--with-parallel-jobs"
779 "--disable-downloading"
781 ,(string-append "--with-ecj="
782 (assoc-ref %build-inputs "ecj")
783 "/share/java/ecj-bootstrap.jar")
784 ,(string-append "--with-jar="
785 (assoc-ref %build-inputs "fastjar")
787 ,(string-append "--with-jdk-home="
788 (assoc-ref %build-inputs "classpath"))
789 ,(string-append "--with-java="
790 (assoc-ref %build-inputs "jamvm")
793 (modify-phases %standard-phases
795 (lambda* (#:key source inputs #:allow-other-keys)
796 (and (zero? (system* "tar" "xvf" source))
798 (chdir (string-append "icedtea6-" ,version))
800 (copy-recursively (assoc-ref inputs "openjdk-src") "openjdk")
801 ;; The convenient OpenJDK source bundle is no longer
802 ;; available for download, so we have to take the sources
803 ;; from the Mercurial repositories and change the Makefile
804 ;; to avoid tests for the OpenJDK zip archive.
805 (with-directory-excursion "openjdk"
806 (for-each (lambda (part)
810 (string-append part "-src"))
812 '("jdk" "hotspot" "corba"
813 "langtools" "jaxp" "jaxws")))
814 (substitute* "Makefile.in"
815 (("echo \"ERROR: No up-to-date OpenJDK zip available\"; exit -1;")
816 "echo \"trust me\";")
817 ;; The contents of the bootstrap directory must be
818 ;; writeable but when copying from the store they are
820 (("mkdir -p lib/rt" line)
821 (string-append line "; chmod -R u+w $(BOOT_DIR)")))
822 (zero? (system* "chmod" "-R" "u+w" "openjdk"))
824 (add-after 'unpack 'use-classpath
825 (lambda* (#:key inputs #:allow-other-keys)
826 (let ((jvmlib (assoc-ref inputs "classpath")))
827 ;; Classpath does not provide rt.jar.
828 (substitute* "Makefile.in"
829 (("\\$\\(SYSTEM_JDK_DIR\\)/jre/lib/rt.jar")
830 (string-append jvmlib "/share/classpath/glibj.zip")))
831 ;; Make sure we can find all classes.
833 (string-append jvmlib "/share/classpath/glibj.zip:"
834 jvmlib "/share/classpath/tools.zip"))
836 (string-append "-cp "
837 jvmlib "/share/classpath/glibj.zip:"
838 jvmlib "/share/classpath/tools.zip")))
840 (add-after 'unpack 'patch-patches
842 ;; shebang in patches so that they apply cleanly
843 (substitute* '("patches/jtreg-jrunscript.patch"
844 "patches/hotspot/hs23/drop_unlicensed_test.patch")
845 (("#!/bin/sh") (string-append "#!" (which "sh"))))
847 (add-after 'unpack 'patch-paths
848 (lambda* (#:key inputs #:allow-other-keys)
849 ;; buildtree.make generates shell scripts, so we need to replace
850 ;; the generated shebang
851 (substitute* '("openjdk/hotspot/make/linux/makefiles/buildtree.make")
852 (("/bin/sh") (which "bash")))
854 (let ((corebin (string-append
855 (assoc-ref inputs "coreutils") "/bin/"))
856 (binbin (string-append
857 (assoc-ref inputs "binutils") "/bin/"))
858 (grepbin (string-append
859 (assoc-ref inputs "grep") "/bin/")))
860 (substitute* '("openjdk/jdk/make/common/shared/Defs-linux.gmk"
861 "openjdk/corba/make/common/shared/Defs-linux.gmk")
862 (("UNIXCOMMAND_PATH = /bin/")
863 (string-append "UNIXCOMMAND_PATH = " corebin))
864 (("USRBIN_PATH = /usr/bin/")
865 (string-append "USRBIN_PATH = " corebin))
866 (("DEVTOOLS_PATH *= */usr/bin/")
867 (string-append "DEVTOOLS_PATH = " corebin))
868 (("COMPILER_PATH *= */usr/bin/")
869 (string-append "COMPILER_PATH = "
870 (assoc-ref inputs "gcc") "/bin/"))
871 (("DEF_OBJCOPY *=.*objcopy")
872 (string-append "DEF_OBJCOPY = " (which "objcopy"))))
874 ;; fix path to alsa header
875 (substitute* "openjdk/jdk/make/common/shared/Sanity.gmk"
876 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
877 (string-append "ALSA_INCLUDE="
878 (assoc-ref inputs "alsa-lib")
879 "/include/alsa/version.h")))
881 ;; fix hard-coded utility paths
882 (substitute* '("openjdk/jdk/make/common/shared/Defs-utils.gmk"
883 "openjdk/corba/make/common/shared/Defs-utils.gmk")
885 (string-append "ECHO = " (which "echo")))
887 (string-append "GREP = " (which "grep")))
889 (string-append "EGREP = " (which "egrep")))
891 (string-append "CPIO = " (which "cpio")))
892 (("READELF *=.*readelf")
893 (string-append "READELF = " (which "readelf")))
895 (string-append "AR = " (which "ar")))
897 (string-append "TAR = " (which "tar")))
899 (string-append "AS = " (which "as")))
901 (string-append "LD = " (which "ld")))
903 (string-append "STRIP = " (which "strip")))
905 (string-append "NM = " (which "nm")))
907 (string-append "SH = " (which "bash")))
909 (string-append "FIND = " (which "find")))
911 (string-append "LDD = " (which "ldd")))
912 (("NAWK *=.*(n|g)awk")
913 (string-append "NAWK = " (which "gawk")))
915 (string-append "XARGS = " (which "xargs")))
917 (string-append "UNZIP = " (which "unzip")))
919 (string-append "ZIPEXE = " (which "zip")))
921 (string-append "SED = " (which "sed"))))
923 ;; Some of these timestamps cause problems as they are more than
924 ;; 10 years ago, failing the build process.
926 "openjdk/jdk/src/share/classes/java/util/CurrencyData.properties"
927 (("AZ=AZM;2005-12-31-20-00-00;AZN") "AZ=AZN")
928 (("MZ=MZM;2006-06-30-22-00-00;MZN") "MZ=MZN")
929 (("RO=ROL;2005-06-30-21-00-00;RON") "RO=RON")
930 (("TR=TRL;2004-12-31-22-00-00;TRY") "TR=TRY"))
932 (add-before 'configure 'set-additional-paths
933 (lambda* (#:key inputs #:allow-other-keys)
935 (string-append (assoc-ref inputs "libxrender")
936 "/include/X11/extensions" ":"
937 (assoc-ref inputs "libxtst")
938 "/include/X11/extensions" ":"
939 (assoc-ref inputs "libxinerama")
940 "/include/X11/extensions" ":"
941 (or (getenv "CPATH") "")))
942 (setenv "ALT_CUPS_HEADERS_PATH"
943 (string-append (assoc-ref inputs "cups")
945 (setenv "ALT_FREETYPE_HEADERS_PATH"
946 (string-append (assoc-ref inputs "freetype")
948 (setenv "ALT_FREETYPE_LIB_PATH"
949 (string-append (assoc-ref inputs "freetype")
953 (lambda* (#:key outputs #:allow-other-keys)
954 (let ((doc (string-append (assoc-ref outputs "doc")
955 "/share/doc/icedtea"))
956 (jre (assoc-ref outputs "out"))
957 (jdk (assoc-ref outputs "jdk")))
958 (copy-recursively "openjdk.build/docs" doc)
959 (copy-recursively "openjdk.build/j2re-image" jre)
960 (copy-recursively "openjdk.build/j2sdk-image" jdk))
963 `(("ant" ,ant-bootstrap)
964 ("alsa-lib" ,alsa-lib)
966 ("classpath" ,classpath-devel)
967 ("coreutils" ,coreutils)
970 ("ecj" ,ecj-bootstrap)
971 ("ecj-javac" ,ecj-javac-on-jamvm-wrapper-final)
973 ("fontconfig" ,fontconfig)
974 ("freetype" ,freetype)
985 ("libxcomposite" ,libxcomposite)
987 ("libxinerama" ,libxinerama)
988 ("libxrender" ,libxrender)
989 ("libxslt" ,libxslt) ;for xsltproc
992 ("mit-krb5" ,mit-krb5)
994 ("nss-certs" ,nss-certs)
996 ("pkg-config" ,pkg-config)
997 ("procps" ,procps) ;for "free", even though I'm not sure we should use it
1007 (url "http://hg.openjdk.java.net/jdk6/jdk6/")
1008 (changeset "jdk6-b41")))
1011 "14q47yfg586fs64w30g8mk92m5dkxsvr36zzh0ra99xk5x0x96mv"))))
1016 (url "http://hg.openjdk.java.net/jdk6/jdk6/jdk/")
1017 (changeset "jdk6-b41")))
1020 "165824nhg1k1dx6zs9dny0j49rmk35jw5b13dmz8c77jfajml4v9"))))
1025 (url "http://hg.openjdk.java.net/jdk6/jdk6/hotspot/")
1026 (changeset "jdk6-b41")))
1029 "07lc1z4k5dj9nrc1wvwmpvxr3xgxrdkdh53xb95skk5ij49yagfd"))))
1034 (url "http://hg.openjdk.java.net/jdk6/jdk6/corba/")
1035 (changeset "jdk6-b41")))
1038 "1p9g1r9dnax2iwp7yb59qx7m4nmshqhwmrb2b8jj8zgbd9dl2i3q"))))
1043 (url "http://hg.openjdk.java.net/jdk6/jdk6/langtools/")
1044 (changeset "jdk6-b41")))
1047 "1x52wd67fynbbd9ild6fb4wvba3f5hhwk03qdjfazd0a1qr37z3d"))))
1052 (url "http://hg.openjdk.java.net/jdk6/jdk6/jaxp/")
1053 (changeset "jdk6-b41")))
1056 "0shlqrvzpr4nrkmv215lbxnby63s3yvbdh1yxcayznsyqwa4nlxm"))))
1061 (url "http://hg.openjdk.java.net/jdk6/jdk6/jaxws/")
1062 (changeset "jdk6-b41")))
1065 "0835lkw8vib1xhp8lxnybhlvzdh699hbi4mclxanydjk63zbpxk0"))))))
1066 (home-page "http://icedtea.classpath.org")
1067 (synopsis "Java development kit")
1069 "This package provides the OpenJDK built with the IcedTea build harness.
1070 This version of the OpenJDK is no longer maintained and is only used for
1071 bootstrapping purposes.")
1072 ;; IcedTea is released under the GPL2 + Classpath exception, which is the
1073 ;; same license as both GNU Classpath and OpenJDK.
1074 (license license:gpl2+)))
1076 (define-public icedtea-7
1077 (let* ((version "2.6.12")
1078 (drop (lambda (name hash)
1082 "http://icedtea.classpath.org/download/drops"
1083 "/icedtea7/" version "/" name ".tar.bz2"))
1084 (sha256 (base32 hash))))))
1091 "http://icedtea.wildebeest.org/download/source/icedtea-"
1095 "0s0zh0mj1sab99kb516lsgq3859vsc951phc565gwix4l5g9zppk"))
1096 (modules '((guix build utils)))
1098 '(substitute* "Makefile.in"
1099 ;; do not leak information about the build host
1100 (("DISTRIBUTION_ID=\"\\$\\(DIST_ID\\)\"")
1101 "DISTRIBUTION_ID=\"\\\"guix\\\"\"")))))
1102 (build-system gnu-build-system)
1103 (outputs '("out" ; Java Runtime Environment
1104 "jdk" ; Java Development Kit
1105 "doc")) ; all documentation
1107 `(;; There are many test failures. Some are known to
1108 ;; fail upstream, others relate to not having an X
1109 ;; server running at test time, yet others are a
1110 ;; complete mystery to me.
1112 ;; hotspot: passed: 241; failed: 45; error: 2
1113 ;; langtools: passed: 1,934; failed: 26
1117 ;; The DSOs use $ORIGIN to refer to each other, but (guix build
1118 ;; gremlin) doesn't support it yet, so skip this phase.
1119 #:validate-runpath? #f
1121 ;; Apparently, the C locale is needed for some of the tests.
1124 #:modules ((guix build utils)
1125 (guix build gnu-build-system)
1132 ;; TODO: package pcsc and sctp, and add to inputs
1133 `("--disable-system-pcsc"
1134 "--disable-system-sctp"
1135 "--enable-bootstrap"
1138 "--disable-downloading"
1139 "--disable-tests" ;they are run in the check phase instead
1140 "--with-openjdk-src-dir=./openjdk.src"
1141 ,(string-append "--with-jdk-home="
1142 (assoc-ref %build-inputs "jdk")))
1145 (modify-phases %standard-phases
1147 (lambda* (#:key source inputs #:allow-other-keys)
1148 (let ((target (string-append "icedtea-" ,version))
1149 (unpack (lambda* (name #:optional dir)
1151 (string-drop-right name 5))))
1153 (zero? (system* "tar" "xvf"
1154 (assoc-ref inputs name)
1156 "--strip-components=1"))))))
1159 (zero? (system* "tar" "xvf" source
1160 "-C" target "--strip-components=1"))
1162 (unpack "openjdk-src" "openjdk.src")
1163 (with-directory-excursion "openjdk.src"
1165 (filter (cut string-suffix? "-drop" <>)
1170 (add-after 'unpack 'fix-x11-extension-include-path
1171 (lambda* (#:key inputs #:allow-other-keys)
1172 (substitute* "openjdk.src/jdk/make/sun/awt/mawt.gmk"
1173 (((string-append "\\$\\(firstword \\$\\(wildcard "
1174 "\\$\\(OPENWIN_HOME\\)"
1175 "/include/X11/extensions\\).*$"))
1176 (string-append (assoc-ref inputs "libxrender")
1177 "/include/X11/extensions"
1178 " -I" (assoc-ref inputs "libxtst")
1179 "/include/X11/extensions"
1180 " -I" (assoc-ref inputs "libxinerama")
1181 "/include/X11/extensions"))
1182 (("\\$\\(wildcard /usr/include/X11/extensions\\)\\)") ""))
1184 (add-after 'unpack 'patch-paths
1186 ;; buildtree.make generates shell scripts, so we need to replace
1187 ;; the generated shebang
1188 (substitute* '("openjdk.src/hotspot/make/linux/makefiles/buildtree.make")
1189 (("/bin/sh") (which "bash")))
1191 (let ((corebin (string-append
1192 (assoc-ref %build-inputs "coreutils") "/bin/"))
1193 (binbin (string-append
1194 (assoc-ref %build-inputs "binutils") "/bin/"))
1195 (grepbin (string-append
1196 (assoc-ref %build-inputs "grep") "/bin/")))
1197 (substitute* '("openjdk.src/jdk/make/common/shared/Defs-linux.gmk"
1198 "openjdk.src/corba/make/common/shared/Defs-linux.gmk")
1199 (("UNIXCOMMAND_PATH = /bin/")
1200 (string-append "UNIXCOMMAND_PATH = " corebin))
1201 (("USRBIN_PATH = /usr/bin/")
1202 (string-append "USRBIN_PATH = " corebin))
1203 (("DEVTOOLS_PATH *= */usr/bin/")
1204 (string-append "DEVTOOLS_PATH = " corebin))
1205 (("COMPILER_PATH *= */usr/bin/")
1206 (string-append "COMPILER_PATH = "
1207 (assoc-ref %build-inputs "gcc") "/bin/"))
1208 (("DEF_OBJCOPY *=.*objcopy")
1209 (string-append "DEF_OBJCOPY = " (which "objcopy"))))
1211 ;; fix path to alsa header
1212 (substitute* "openjdk.src/jdk/make/common/shared/Sanity.gmk"
1213 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
1214 (string-append "ALSA_INCLUDE="
1215 (assoc-ref %build-inputs "alsa-lib")
1216 "/include/alsa/version.h")))
1218 ;; fix hard-coded utility paths
1219 (substitute* '("openjdk.src/jdk/make/common/shared/Defs-utils.gmk"
1220 "openjdk.src/corba/make/common/shared/Defs-utils.gmk")
1222 (string-append "ECHO = " (which "echo")))
1224 (string-append "GREP = " (which "grep")))
1225 (("EGREP *=.*egrep")
1226 (string-append "EGREP = " (which "egrep")))
1228 (string-append "CPIO = " (which "cpio")))
1229 (("READELF *=.*readelf")
1230 (string-append "READELF = " (which "readelf")))
1232 (string-append "AR = " (which "ar")))
1234 (string-append "TAR = " (which "tar")))
1236 (string-append "AS = " (which "as")))
1238 (string-append "LD = " (which "ld")))
1239 (("STRIP *=.*strip")
1240 (string-append "STRIP = " (which "strip")))
1242 (string-append "NM = " (which "nm")))
1244 (string-append "SH = " (which "bash")))
1246 (string-append "FIND = " (which "find")))
1248 (string-append "LDD = " (which "ldd")))
1249 (("NAWK *=.*(n|g)awk")
1250 (string-append "NAWK = " (which "gawk")))
1251 (("XARGS *=.*xargs")
1252 (string-append "XARGS = " (which "xargs")))
1253 (("UNZIP *=.*unzip")
1254 (string-append "UNZIP = " (which "unzip")))
1256 (string-append "ZIPEXE = " (which "zip")))
1258 (string-append "SED = " (which "sed"))))
1260 ;; Some of these timestamps cause problems as they are more than
1261 ;; 10 years ago, failing the build process.
1263 "openjdk.src/jdk/src/share/classes/java/util/CurrencyData.properties"
1264 (("AZ=AZM;2005-12-31-20-00-00;AZN") "AZ=AZN")
1265 (("MZ=MZM;2006-06-30-22-00-00;MZN") "MZ=MZN")
1266 (("RO=ROL;2005-06-30-21-00-00;RON") "RO=RON")
1267 (("TR=TRL;2004-12-31-22-00-00;TRY") "TR=TRY")))
1269 (add-before 'configure 'set-additional-paths
1270 (lambda* (#:key inputs #:allow-other-keys)
1271 (substitute* "openjdk.src/jdk/make/common/shared/Sanity.gmk"
1272 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
1273 (string-append "ALSA_INCLUDE="
1274 (assoc-ref inputs "alsa-lib")
1275 "/include/alsa/version.h")))
1278 (string-append (assoc-ref inputs "libxcomposite")
1279 "/include/X11/extensions" ":"
1280 (assoc-ref inputs "libxrender")
1281 "/include/X11/extensions" ":"
1282 (assoc-ref inputs "libxtst")
1283 "/include/X11/extensions" ":"
1284 (assoc-ref inputs "libxinerama")
1285 "/include/X11/extensions" ":"
1286 (or (getenv "CPATH") "")))
1287 (setenv "ALT_OBJCOPY" (which "objcopy"))
1288 (setenv "ALT_CUPS_HEADERS_PATH"
1289 (string-append (assoc-ref inputs "cups")
1291 (setenv "ALT_FREETYPE_HEADERS_PATH"
1292 (string-append (assoc-ref inputs "freetype")
1294 (setenv "ALT_FREETYPE_LIB_PATH"
1295 (string-append (assoc-ref inputs "freetype")
1298 (add-before 'check 'fix-test-framework
1300 ;; Fix PATH in test environment
1301 (substitute* "test/jtreg/com/sun/javatest/regtest/Main.java"
1302 (("PATH=/bin:/usr/bin")
1303 (string-append "PATH=" (getenv "PATH"))))
1304 (substitute* "test/jtreg/com/sun/javatest/util/SysEnv.java"
1305 (("/usr/bin/env") (which "env")))
1306 (substitute* "openjdk.src/hotspot/test/test_env.sh"
1307 (("/bin/rm") (which "rm"))
1308 (("/bin/cp") (which "cp"))
1309 (("/bin/mv") (which "mv")))
1311 (add-before 'check 'fix-hotspot-tests
1313 (with-directory-excursion "openjdk.src/hotspot/test/"
1314 (substitute* "jprt.config"
1315 (("PATH=\"\\$\\{path4sdk\\}\"")
1316 (string-append "PATH=" (getenv "PATH")))
1317 (("make=/usr/bin/make")
1318 (string-append "make=" (which "make"))))
1319 (substitute* '("runtime/6626217/Test6626217.sh"
1320 "runtime/7110720/Test7110720.sh")
1321 (("/bin/rm") (which "rm"))
1322 (("/bin/cp") (which "cp"))
1323 (("/bin/mv") (which "mv"))))
1325 (add-before 'check 'fix-jdk-tests
1327 (with-directory-excursion "openjdk.src/jdk/test/"
1328 (substitute* "com/sun/jdi/JdbReadTwiceTest.sh"
1329 (("/bin/pwd") (which "pwd")))
1330 (substitute* "com/sun/jdi/ShellScaffold.sh"
1331 (("/bin/kill") (which "kill")))
1332 (substitute* "start-Xvfb.sh"
1333 ;;(("/usr/bin/X11/Xvfb") (which "Xvfb"))
1334 (("/usr/bin/nohup") (which "nohup")))
1335 (substitute* "javax/security/auth/Subject/doAs/Test.sh"
1336 (("/bin/rm") (which "rm")))
1337 (substitute* "tools/launcher/MultipleJRE.sh"
1338 (("echo \"#!/bin/sh\"")
1339 (string-append "echo \"#!" (which "rm") "\""))
1340 (("/usr/bin/zip") (which "zip")))
1341 (substitute* "com/sun/jdi/OnThrowTest.java"
1342 (("#!/bin/sh") (string-append "#!" (which "sh"))))
1343 (substitute* "java/lang/management/OperatingSystemMXBean/GetSystemLoadAverage.java"
1344 (("/usr/bin/uptime") (which "uptime")))
1345 (substitute* "java/lang/ProcessBuilder/Basic.java"
1346 (("/usr/bin/env") (which "env"))
1347 (("/bin/false") (which "false"))
1348 (("/bin/true") (which "true"))
1349 (("/bin/cp") (which "cp"))
1350 (("/bin/sh") (which "sh")))
1351 (substitute* "java/lang/ProcessBuilder/FeelingLucky.java"
1352 (("/bin/sh") (which "sh")))
1353 (substitute* "java/lang/ProcessBuilder/Zombies.java"
1354 (("/usr/bin/perl") (which "perl"))
1355 (("/bin/ps") (which "ps"))
1356 (("/bin/true") (which "true")))
1357 (substitute* "java/lang/Runtime/exec/ConcurrentRead.java"
1358 (("/usr/bin/tee") (which "tee")))
1359 (substitute* "java/lang/Runtime/exec/ExecWithDir.java"
1360 (("/bin/true") (which "true")))
1361 (substitute* "java/lang/Runtime/exec/ExecWithInput.java"
1362 (("/bin/cat") (which "cat")))
1363 (substitute* "java/lang/Runtime/exec/ExitValue.java"
1364 (("/bin/sh") (which "sh"))
1365 (("/bin/true") (which "true"))
1366 (("/bin/kill") (which "kill")))
1367 (substitute* "java/lang/Runtime/exec/LotsOfDestroys.java"
1368 (("/usr/bin/echo") (which "echo")))
1369 (substitute* "java/lang/Runtime/exec/LotsOfOutput.java"
1370 (("/usr/bin/cat") (which "cat")))
1371 (substitute* "java/lang/Runtime/exec/SleepyCat.java"
1372 (("/bin/cat") (which "cat"))
1373 (("/bin/sleep") (which "sleep"))
1374 (("/bin/sh") (which "sh")))
1375 (substitute* "java/lang/Runtime/exec/StreamsSurviveDestroy.java"
1376 (("/bin/cat") (which "cat")))
1377 (substitute* "java/rmi/activation/CommandEnvironment/SetChildEnv.java"
1378 (("/bin/chmod") (which "chmod")))
1379 (substitute* "java/util/zip/ZipFile/Assortment.java"
1380 (("/bin/sh") (which "sh"))))
1384 ;; The "make check-*" targets always return zero, so we need to
1385 ;; check for errors in the associated log files to determine
1386 ;; whether any tests have failed.
1387 (use-modules (ice-9 rdelim))
1388 (let* ((error-pattern (make-regexp "^(Error|FAILED):.*"))
1389 (checker (lambda (port)
1391 (let ((line (read-line port)))
1393 ((eof-object? line) #t)
1394 ((regexp-exec error-pattern line) #f)
1396 (run-test (lambda (test)
1397 (system* "make" test)
1398 (call-with-input-file
1399 (string-append "test/" test ".log")
1402 (and (run-test "check-hotspot")
1403 (run-test "check-langtools")
1404 (run-test "check-jdk"))))))
1406 (lambda* (#:key outputs #:allow-other-keys)
1407 (let ((doc (string-append (assoc-ref outputs "doc")
1408 "/share/doc/icedtea"))
1409 (jre (assoc-ref outputs "out"))
1410 (jdk (assoc-ref outputs "jdk")))
1411 (copy-recursively "openjdk.build/docs" doc)
1412 (copy-recursively "openjdk.build/j2re-image" jre)
1413 (copy-recursively "openjdk.build/j2sdk-image" jdk))
1415 ;; Some of the libraries in the lib/amd64 folder link to libjvm.so.
1416 ;; But that shared object is located in the server/ folder, so it
1417 ;; cannot be found. This phase creates a symbolic link in the
1418 ;; lib/amd64 folder so that the other libraries can find it.
1421 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
1423 ;; FIXME: Find the bug in the build system, so that this symlink is
1425 (add-after 'install 'install-libjvm
1426 (lambda* (#:key inputs outputs #:allow-other-keys)
1427 (let* ((lib-path (string-append (assoc-ref outputs "out")
1429 (symlink (string-append lib-path "/server/libjvm.so")
1430 (string-append lib-path "/libjvm.so")))
1432 ;; By default IcedTea only generates an empty keystore. In order to
1433 ;; be able to use certificates in Java programs we need to generate a
1434 ;; keystore from a set of certificates. For convenience we use the
1435 ;; certificates from the nss-certs package.
1436 (add-after 'install 'install-keystore
1437 (lambda* (#:key inputs outputs #:allow-other-keys)
1438 (let* ((keystore "cacerts")
1439 (certs-dir (string-append (assoc-ref inputs "nss-certs")
1441 (keytool (string-append (assoc-ref outputs "jdk")
1443 (define (extract-cert file target)
1444 (call-with-input-file file
1446 (call-with-output-file target
1448 (let loop ((line (read-line in 'concat))
1451 ((eof-object? line) #t)
1452 ((string-prefix? "-----BEGIN" line)
1454 (loop (read-line in 'concat) #t))
1455 ((string-prefix? "-----END" line)
1459 (when copying? (display line out))
1460 (loop (read-line in 'concat) copying?)))))))))
1461 (define (import-cert cert)
1462 (format #t "Importing certificate ~a\n" (basename cert))
1463 (let ((temp "tmpcert"))
1464 (extract-cert cert temp)
1465 (let ((port (open-pipe* OPEN_WRITE keytool
1467 "-alias" (basename cert)
1468 "-keystore" keystore
1469 "-storepass" "changeit"
1471 (display "yes\n" port)
1472 (when (not (zero? (status:exit-val (close-pipe port))))
1473 (format #t "failed to import ~a\n" cert)))
1474 (delete-file temp)))
1476 ;; This is necessary because the certificate directory contains
1477 ;; files with non-ASCII characters in their names.
1478 (setlocale LC_ALL "en_US.utf8")
1479 (setenv "LC_ALL" "en_US.utf8")
1481 (for-each import-cert (find-files certs-dir "\\.pem$"))
1482 (mkdir-p (string-append (assoc-ref outputs "out")
1484 (mkdir-p (string-append (assoc-ref outputs "jdk")
1485 "/jre/lib/security"))
1487 ;; The cacerts files we are going to overwrite are chmod'ed as
1488 ;; read-only (444) in icedtea-8 (which derives from this
1489 ;; package). We have to change this so we can overwrite them.
1490 (chmod (string-append (assoc-ref outputs "out")
1491 "/lib/security/" keystore) #o644)
1492 (chmod (string-append (assoc-ref outputs "jdk")
1493 "/jre/lib/security/" keystore) #o644)
1495 (install-file keystore
1496 (string-append (assoc-ref outputs "out")
1498 (install-file keystore
1499 (string-append (assoc-ref outputs "jdk")
1500 "/jre/lib/security"))
1505 "15qf3nfidgnigh2zny6djfp8bhfwjnwk9i06mxs2jbq6na953ql2"))
1508 "1phvn8fyl5mw2n2sn97f17nm442k75xsz2023bfw4h66ywzkqhqy"))
1511 "0j4ms6lmnfa2cwfh9yfqdfg1bnn3fc40ay4x6k8zqa8yvspik5w5"))
1514 "09sddj73k7n29s39hvdk14r130mvlknbxkpd2w58f34sq5sgpdrg"))
1517 "0q896zz8wyswmksy225q1k27nz3v3l27052dcvvpv20ryykz8yp7"))
1520 "0niicyfccim4a9is4akh87jd7wbl8jrazdaab957mcv9l1x3bnqc"))
1523 "1jw42qhbm3wfavk39304m53lmqipcllrvjqiab2f42mjs10i8gfx"))
1524 ("ant" ,ant-bootstrap)
1526 ("coreutils" ,coreutils)
1527 ("diffutils" ,diffutils) ;for tests
1530 ("libtool" ,libtool)
1531 ("pkg-config" ,pkg-config)
1537 ("fastjar" ,fastjar)
1538 ("libxslt" ,libxslt) ;for xsltproc
1539 ("nss-certs" ,nss-certs)
1541 ("procps" ,procps) ;for "free", even though I'm not sure we should use it
1542 ("jdk" ,icedtea-6 "jdk")))
1544 `(("alsa-lib" ,alsa-lib)
1547 ("libxcomposite" ,libxcomposite)
1549 ("libxtst" ,libxtst)
1551 ("libxinerama" ,libxinerama)
1552 ("libxrender" ,libxrender)
1553 ("libjpeg" ,libjpeg)
1555 ("mit-krb5" ,mit-krb5)
1558 ("fontconfig" ,fontconfig)
1559 ("freetype" ,freetype)
1563 (home-page "http://icedtea.classpath.org")
1564 (synopsis "Java development kit")
1566 "This package provides the Java development kit OpenJDK built with the
1567 IcedTea build harness.")
1568 ;; IcedTea is released under the GPL2 + Classpath exception, which is the
1569 ;; same license as both GNU Classpath and OpenJDK.
1570 (license license:gpl2+))))
1572 (define-public icedtea-8
1573 (let* ((version "3.6.0")
1574 (drop (lambda (name hash)
1578 "http://icedtea.classpath.org/download/drops"
1579 "/icedtea8/" version "/" name ".tar.xz"))
1580 (sha256 (base32 hash))))))
1581 (package (inherit icedtea-7)
1586 "http://icedtea.wildebeest.org/download/source/icedtea-"
1590 "0zj192zrrxqh6j1ywc3399gk2ycay9w8pvzcvvr2kvdkb37ak86h"))
1591 (modules '((guix build utils)))
1594 (substitute* '("configure"
1596 ;; Do not embed build time
1597 (("(DIST_ID=\"Custom build).*$" _ prefix)
1598 (string-append prefix "\"\n"))
1599 ;; Do not leak information about the build host
1600 (("DIST_NAME=\"\\$build_os\"")
1601 "DIST_NAME=\"guix\""))
1604 `(#:imported-modules
1605 ((guix build ant-build-system)
1606 (guix build syscalls)
1607 ,@%gnu-build-system-modules)
1608 ,@(substitute-keyword-arguments (package-arguments icedtea-7)
1609 ((#:modules modules)
1610 `((guix build utils)
1611 (guix build gnu-build-system)
1612 ((guix build ant-build-system) #:prefix ant:)
1617 ((#:configure-flags flags)
1618 `(let ((jdk (assoc-ref %build-inputs "jdk")))
1619 `( ;;"--disable-bootstrap"
1620 "--enable-bootstrap"
1622 "--disable-downloading"
1623 "--disable-system-pcsc"
1624 "--disable-system-sctp"
1625 "--disable-tests" ;they are run in the check phase instead
1626 "--with-openjdk-src-dir=./openjdk.src"
1627 ,(string-append "--with-jdk-home=" jdk))))
1629 `(modify-phases ,phases
1630 (delete 'fix-x11-extension-include-path)
1631 (delete 'patch-paths)
1632 (delete 'set-additional-paths)
1633 (delete 'patch-patches)
1634 ;; Prevent the keytool from recording the current time when
1635 ;; adding certificates at build time.
1636 (add-after 'unpack 'patch-keystore
1638 (substitute* "openjdk.src/jdk/src/share/classes/sun/security/provider/JavaKeyStore.java"
1639 (("date = new Date\\(\\);")
1641 date = (System.getenv(\"SOURCE_DATE_EPOCH\") != null) ?\
1642 new Date(Long.parseLong(System.getenv(\"SOURCE_DATE_EPOCH\"))) :\
1645 (add-after 'unpack 'patch-jni-libs
1646 ;; Hardcode dynamically loaded libraries.
1648 (let* ((library-path (search-path-as-string->list
1649 (getenv "LIBRARY_PATH")))
1650 (find-library (lambda (name)
1653 (string-append "lib" name ".so")))))
1656 (catch 'decoding-error
1659 (("VERSIONED_JNI_LIB_NAME\\(\"(.*)\", \"(.*)\"\\)"
1661 (format #f "\"~a\"" (find-library name)))
1662 (("JNI_LIB_NAME\\(\"(.*)\"\\)" _ name)
1663 (format #f "\"~a\"" (find-library name)))))
1665 ;; Those are safe to skip.
1666 (format (current-error-port)
1667 "warning: failed to substitute: ~a~%"
1669 (find-files "openjdk.src/jdk/src/solaris/native"
1673 (lambda* (#:key outputs #:allow-other-keys)
1674 (let ((doc (string-append (assoc-ref outputs "doc")
1675 "/share/doc/icedtea"))
1676 (jre (assoc-ref outputs "out"))
1677 (jdk (assoc-ref outputs "jdk")))
1678 (copy-recursively "openjdk.build/docs" doc)
1679 (copy-recursively "openjdk.build/images/j2re-image" jre)
1680 (copy-recursively "openjdk.build/images/j2sdk-image" jdk)
1681 ;; Install the nss.cfg file to JRE to enable SSL/TLS
1683 (copy-file (string-append jdk "/jre/lib/security/nss.cfg")
1684 (string-append jre "/lib/security/nss.cfg"))
1686 (add-after 'install 'strip-jar-timestamps
1687 (assoc-ref ant:%standard-phases 'strip-jar-timestamps)))))))
1689 `(("jdk" ,icedtea-7 "jdk")
1692 "0mqxh81kq05z4wydkik0yrr81ibf84xmwsdcw9n2gfrzs4f5jxnb"))
1695 "0b207g2n6kn510zf5vwh58bsxgqrmkvrna4p20r74v9cwcwx83n2"))
1698 "0qinc1q4w01nkr9klhfyd8caxvyrrfxjrz32nd7kgyja2bj8x7dd"))
1701 "07azrp3g86vk2laybmr5xfn0yrljkxs0rlm1q48385br225bgdxi"))
1704 "018fd2hq57zp3pq06wlxy5pabqcyk36xi8hk0d6xk3a90wsjvyik"))
1707 "0vs488kq5j2cc6kplc78jbhfxwq4fn06l34xrbq4d6y17777arg8"))
1710 "04f6d1wvck5jrpvrcw5gsbzxnihcry9zrf1v85czdm959q21zv9c"))
1713 "1mfgpzyr6zzy9klf8nn3z6d41fydb9ghpfpqzjq3cl95axfbdl1g"))
1716 "1a26cmzbs50gkh4rmmmxls7zljx62vfp1wq02gsfd5jqs4xvlibj"))
1719 "11hmn9mwmvryfddcanzx3qffjm8bbiv18nwv3iy9cswrvxjy010f"))
1720 ,@(fold alist-delete (package-native-inputs icedtea-7)
1721 '("jdk" "openjdk-src" "corba-drop" "jaxp-drop" "jaxws-drop"
1722 "jdk-drop" "langtools-drop" "hotspot-drop")))))))
1724 (define-public icedtea icedtea-7)
1727 (define-public ant/java8
1728 (package (inherit ant-bootstrap)
1733 (uri (string-append "mirror://apache/ant/source/apache-ant-"
1734 version "-src.tar.gz"))
1737 "10p3dh77lkzzzcy32dk9azljixzadp46fggjfbvgkl8mmb8cxxv8"))
1738 (modules '((guix build utils)))
1741 (for-each delete-file
1742 (find-files "lib/optional" "\\.jar$"))
1745 (substitute-keyword-arguments (package-arguments ant-bootstrap)
1747 `(modify-phases ,phases
1748 (add-after 'unpack 'remove-scripts
1749 ;; Remove bat / cmd scripts for DOS as well as the antRun and runant
1752 (for-each delete-file
1753 (find-files "src/script"
1754 "(.*\\.(bat|cmd)|runant.*|antRun.*)"))
1757 (lambda* (#:key inputs outputs #:allow-other-keys)
1758 (setenv "JAVA_HOME" (assoc-ref inputs "jdk"))
1760 ;; Disable tests to avoid dependency on hamcrest-core, which needs
1761 ;; Ant to build. This is necessary in addition to disabling the
1762 ;; "check" phase, because the dependency on "test-jar" would always
1763 ;; result in the tests to be run.
1764 (substitute* "build.xml"
1765 (("depends=\"jars,test-jar\"") "depends=\"jars\""))
1766 (zero? (system* "bash" "bootstrap.sh"
1767 (string-append "-Ddist.dir="
1768 (assoc-ref outputs "out"))))))))))
1770 `(("jdk" ,icedtea-8 "jdk")))))
1772 ;; The 1.9.x series is the last that can be built with GCJ. The 1.10.x series
1775 (package (inherit ant/java8)
1779 (uri (string-append "mirror://apache/ant/source/apache-ant-"
1780 version "-src.tar.gz"))
1783 "1k28mka0m3isy9yr8gz84kz1f3f879rwaxrd44vdn9xbfwvwk86n"))))
1785 `(("jdk" ,icedtea-7 "jdk")))))
1787 (define-public ant-apache-bcel
1790 (name "ant-apache-bcel")
1792 (substitute-keyword-arguments (package-arguments ant/java8)
1794 `(modify-phases ,phases
1795 (add-after 'unpack 'link-bcel
1796 (lambda* (#:key inputs #:allow-other-keys)
1797 (for-each (lambda (file)
1799 (string-append "lib/optional/"
1801 (find-files (assoc-ref inputs "java-commons-bcel")
1804 (add-after 'build 'install
1805 (lambda* (#:key outputs #:allow-other-keys)
1806 (let* ((out (assoc-ref outputs "out"))
1807 (share (string-append out "/share/java"))
1808 (bin (string-append out "/bin"))
1809 (lib (string-append out "/lib")))
1811 (install-file (string-append lib "/ant-apache-bcel.jar") share)
1812 (delete-file-recursively bin)
1813 (delete-file-recursively lib)
1816 `(("java-commons-bcel" ,java-commons-bcel)
1817 ,@(package-inputs ant/java8)))))
1819 (define-public ant-junit
1824 (substitute-keyword-arguments (package-arguments ant/java8)
1826 `(modify-phases ,phases
1827 (add-after 'unpack 'link-junit
1828 (lambda* (#:key inputs #:allow-other-keys)
1829 (for-each (lambda (file)
1831 (string-append "lib/optional/"
1833 (find-files (assoc-ref inputs "java-junit")
1836 (add-after 'build 'install
1837 (lambda* (#:key outputs #:allow-other-keys)
1838 (let* ((out (assoc-ref outputs "out"))
1839 (share (string-append out "/share/java"))
1840 (bin (string-append out "/bin"))
1841 (lib (string-append out "/lib")))
1843 (install-file (string-append lib "/ant-junit.jar") share)
1844 (delete-file-recursively bin)
1845 (delete-file-recursively lib)
1848 `(("java-junit" ,java-junit)
1849 ,@(package-inputs ant/java8)))))
1851 (define-public clojure
1852 (let* ((remove-archives '(begin
1853 (for-each delete-file
1854 (find-files "." ".*\\.(jar|zip)"))
1856 (submodule (lambda (prefix version hash)
1859 (uri (string-append "https://github.com/clojure/"
1860 prefix version ".tar.gz"))
1861 (sha256 (base32 hash))
1862 (modules '((guix build utils)))
1863 (snippet remove-archives)))))
1871 (string-append "https://github.com/clojure/clojure/archive/clojure-"
1874 (base32 "0xjbzcw45z32vsn9pifp7ndysjzqswp5ig0jkjpivigh2ckkdzha"))
1875 (modules '((guix build utils)))
1876 (snippet remove-archives)))
1877 (build-system ant-build-system)
1879 `(#:modules ((guix build ant-build-system)
1885 #:test-target "test"
1887 (modify-phases %standard-phases
1888 (add-after 'unpack 'unpack-submodule-sources
1889 (lambda* (#:key inputs #:allow-other-keys)
1893 (with-directory-excursion name
1894 (or (zero? (system* "tar"
1895 ;; Use xz for repacked tarball.
1899 "--file" (assoc-ref inputs name)
1900 "--strip-components=1"))
1901 (error "failed to unpack tarball" name)))
1902 (copy-recursively (string-append name "/src/main/clojure/")
1904 '("core-specs-alpha-src"
1905 "data-generators-src"
1908 "test-generative-src"
1909 "tools-namespace-src"))
1911 ;; The javadoc target is not built by default.
1912 (add-after 'build 'build-doc
1914 (zero? (system* "ant" "javadoc"))))
1915 ;; Needed since no install target is provided.
1917 (lambda* (#:key outputs #:allow-other-keys)
1918 (let ((java-dir (string-append (assoc-ref outputs "out")
1920 ;; Install versioned to avoid collisions.
1921 (install-file (string-append "clojure-" ,version ".jar")
1924 ;; Needed since no install-doc target is provided.
1925 (add-after 'install 'install-doc
1926 (lambda* (#:key outputs #:allow-other-keys)
1927 (let ((doc-dir (string-append (assoc-ref outputs "out")
1928 "/share/doc/clojure-"
1930 (copy-recursively "doc/clojure" doc-dir)
1931 (copy-recursively "target/javadoc/"
1932 (string-append doc-dir "javadoc/"))
1933 (for-each (cut install-file <> doc-dir)
1934 (filter (cut string-match
1935 ".*\\.(html|markdown|md|txt)"
1939 ;; The native-inputs below are needed to run the tests.
1941 `(("core-specs-alpha-src"
1942 ,(submodule "core.specs.alpha/archive/core.specs.alpha-"
1944 "0v2a0svf1ar2y42ajxwsjr7zmm5j7pp2zwrd2jh3k7xzd1p9x1fv"))
1945 ("data-generators-src"
1946 ,(submodule "data.generators/archive/data.generators-"
1948 "0kki093jp4ckwxzfnw8ylflrfqs8b1i1wi9iapmwcsy328dmgzp1"))
1950 ,(submodule "spec.alpha/archive/spec.alpha-"
1952 "00alf0347licdn773w2jarpllyrbl52qz4d8mw61anjksacxylzz"))
1954 ,(submodule "test.check/archive/test.check-"
1956 "0p0mnyhr442bzkz0s4k5ra3i6l5lc7kp6ajaqkkyh4c2k5yck1md"))
1957 ("test-generative-src"
1958 ,(submodule "test.generative/archive/test.generative-"
1960 "1pjafy1i7yblc7ixmcpfq1lfbyf3jaljvkgrajn70sws9xs7a9f8"))
1961 ("tools-namespace-src"
1962 ,(submodule "tools.namespace/archive/tools.namespace-"
1964 "10baak8v0hnwz2hr33bavshm7y49mmn9zsyyms1dwjz45p5ymhy0"))))
1965 (home-page "https://clojure.org/")
1966 (synopsis "Lisp dialect running on the JVM")
1967 (description "Clojure is a dynamic, general-purpose programming language,
1968 combining the approachability and interactive development of a scripting
1969 language with an efficient and robust infrastructure for multithreaded
1970 programming. Clojure is a compiled language, yet remains completely dynamic
1971 – every feature supported by Clojure is supported at runtime. Clojure
1972 provides easy access to the Java frameworks, with optional type hints and type
1973 inference, to ensure that calls to Java can avoid reflection.
1975 Clojure is a dialect of Lisp, and shares with Lisp the code-as-data philosophy
1976 and a powerful macro system. Clojure is predominantly a functional programming
1977 language, and features a rich set of immutable, persistent data structures.
1978 When mutable state is needed, Clojure offers a software transactional memory
1979 system and reactive Agent system that ensure clean, correct, multithreaded
1981 ;; Clojure is licensed under EPL1.0
1982 ;; ASM bytecode manipulation library is licensed under BSD-3
1983 ;; Guava Murmur3 hash implementation is licensed under APL2.0
1984 ;; src/clj/repl.clj is licensed under CPL1.0
1986 ;; See readme.html or readme.txt for details.
1987 (license (list license:epl1.0
1992 (define-public javacc
1998 (uri (string-append "https://github.com/javacc/javacc/"
1999 "archive/" version ".tar.gz"))
2000 (file-name (string-append "javacc-" version ".tar.gz"))
2003 "111xc9mnmc5a6qz6x3xbhqc07y1lg2b996ggzw0hrblg42zya9xf"))))
2004 (build-system ant-build-system)
2006 `(#:test-target "test"
2008 (modify-phases %standard-phases
2009 (add-after 'unpack 'delete-bundled-libs
2011 (delete-file-recursively "lib") #t))
2012 (replace 'install (install-jars "target")))))
2013 (home-page "https://javacc.org/")
2014 (synopsis "Java parser generator")
2015 (description "Java Compiler Compiler (JavaCC) is the most popular parser
2016 generator for use with Java applications. A parser generator is a tool that
2017 reads a grammar specification and converts it to a Java program that can
2018 recognize matches to the grammar. In addition to the parser generator itself,
2019 JavaCC provides other standard capabilities related to parser generation such
2020 as tree building (via a tool called JJTree included with JavaCC), actions,
2022 (license license:bsd-3)))
2024 (define-public javacc-4
2025 (package (inherit javacc)
2030 (url "https://github.com/javacc/javacc.git")
2031 (commit "release_41")))
2032 (file-name (string-append "javacc-" version "-checkout"))
2035 "07ysav7j8r1c6h8qxrgqk6lwdp74ly0ad1935lragxml0qqc3ka0"))))
2037 ;; /tmp/guix-build-javacc-4.1.drv-0/source/test/javacodeLA/build.xml:60:
2042 (modify-phases %standard-phases
2043 (add-after 'unpack 'delete-bundled-libs
2045 (delete-file-recursively "lib") #t))
2046 (replace 'install (install-jars "bin/lib")))))))
2048 ;; This is the last 3.x release of ECJ
2049 (define-public java-ecj-3
2055 (uri (string-append "http://archive.eclipse.org/eclipse/"
2056 "downloads/drops/R-" version
2057 "-201301310800/ecjsrc-" version ".jar"))
2060 "01mdj14jw11g1jfnki4fi8229p0c6zzckd38zqy2w4m3cjcvsx04"))))
2061 (build-system ant-build-system)
2063 `(#:tests? #f ; none included
2064 #:jdk ,icedtea-7 ; doesn't build with JDK8+
2065 #:make-flags (list "-f" "src/build.xml")
2066 #:build-target "build"
2068 (modify-phases %standard-phases
2069 (add-after 'unpack 'fix-manifest
2071 ;; Record the main class to make ecj executable.
2072 (with-atomic-file-replacement "src/META-INF/MANIFEST.MF"
2074 (display "Manifest-Version: 1.0
2075 Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n"
2077 (replace 'install (install-jars ".")))))
2078 (home-page "https://eclipse.org")
2079 (synopsis "Eclipse Java development tools core batch compiler")
2080 (description "This package provides the Eclipse Java core batch compiler.")
2081 (license license:epl1.0)))
2083 ;; This is needed for java-cisd-args4j
2084 (define-public java-ecj-3.5
2085 (package (inherit java-ecj-3)
2088 (method url-fetch/zipbomb)
2089 (uri (string-append "http://archive.eclipse.org/eclipse/"
2090 "downloads/drops/R-" version
2091 "-200909170800/ecjsrc-" version ".zip"))
2094 "1vnl2mavisc567bip736xzsvvbjif5279wc4a7pbdik5wlir8qr7"))))
2095 (build-system ant-build-system)
2097 `(#:tests? #f ; none included
2098 #:jdk ,icedtea-7 ; doesn't build with JDK8+
2099 #:build-target "build"
2101 (modify-phases %standard-phases
2102 (add-after 'unpack 'fix-manifest
2104 ;; Record the main class to make ecj executable.
2105 (with-atomic-file-replacement "META-INF/MANIFEST.MF"
2108 (display "Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n"
2110 (replace 'install (install-jars ".")))))
2112 `(("unzip" ,unzip)))))
2114 (define-public java-cisd-base
2115 (let ((revision 38938)
2116 (base-version "14.12.0"))
2118 (name "java-cisd-base")
2119 (version (string-append base-version "-" (number->string revision)))
2123 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2124 "base/tags/release/"
2125 (version-major+minor base-version)
2126 ".x/" base-version "/base/"))
2127 (revision revision)))
2128 (file-name (string-append "java-cisd-base-" version "-checkout"))
2131 "1i5adyf7nzclb0wydgwa1az04qliid8035vpahaandmkmigbnxiy"))
2132 (modules '((guix build utils)))
2135 ;; Delete included gradle jar
2136 (delete-file-recursively "gradle/wrapper")
2137 ;; Delete pre-built native libraries
2138 (delete-file-recursively "libs")
2140 (build-system ant-build-system)
2142 `(#:make-flags '("-file" "build/build.xml")
2143 #:test-target "jar-test"
2146 (modify-phases %standard-phases
2147 (add-after 'unpack 'unpack-build-resources
2148 (lambda* (#:key inputs #:allow-other-keys)
2149 (copy-recursively (assoc-ref inputs "build-resources")
2150 "../build_resources")
2152 (add-after 'unpack-build-resources 'fix-dependencies
2153 (lambda* (#:key inputs #:allow-other-keys)
2154 (substitute* "build/build.xml"
2155 (("\\$\\{lib\\}/testng/testng-jdk15.jar")
2156 (string-append (assoc-ref inputs "java-testng")
2157 "/share/java/java-testng.jar"))
2158 (("\\$\\{lib\\}/commons-lang/commons-lang.jar")
2159 (string-append (assoc-ref inputs "java-commons-lang")
2160 "/share/java/commons-lang-"
2161 ,(package-version java-commons-lang) ".jar"))
2162 (("\\$\\{lib\\}/commons-io/commons-io.jar")
2163 (string-append (assoc-ref inputs "java-commons-io")
2164 "/share/java/commons-io-"
2165 ,(package-version java-commons-io)
2167 ;; Remove dependency on svn
2168 (("<build-info.*") "")
2169 (("\\$\\{revision.number\\}")
2170 ,(number->string revision))
2171 (("\\$\\{version.number\\}") ,base-version))
2172 ;; Remove dependency on classycle
2173 (substitute* "../build_resources/ant/build-common.xml"
2174 (("<taskdef name=\"dependency-checker.*") "")
2175 (("classname=\"classycle.*") "")
2176 (("classpath=\"\\$\\{lib\\}/classycle.*") ""))
2178 ;; A few tests fail because of the lack of a proper /etc/groups and
2179 ;; /etc/passwd file in the build container.
2180 (add-after 'unpack 'disable-broken-tests
2182 (substitute* "sourceTest/java/ch/systemsx/cisd/base/AllTests.java"
2183 (("Unix.isOperational\\(\\)") "false"))
2185 ;; These decorators are almost useless and pull in an unpackaged
2187 (add-after 'unpack 'remove-useless-decorators
2189 (substitute* "source/java/ch/systemsx/cisd/base/unix/Unix.java"
2191 (("import ch.rinn.restrictions.Private;") ""))
2192 (substitute* "sourceTest/java/ch/systemsx/cisd/base/unix/UnixTests.java"
2194 (("import ch.rinn.restrictions.Friend;") ""))
2196 (add-before 'configure 'build-native-code
2197 (lambda* (#:key inputs #:allow-other-keys)
2198 (let ((jdk (assoc-ref inputs "jdk"))
2199 (dir ,(match (%current-system)
2202 ((or "armhf-linux" "aarch64-linux")
2204 ((or "x86_64-linux")
2206 (_ "unknown-Linux"))))
2207 (with-directory-excursion "source/c"
2208 (invoke "gcc" "-shared" "-O3" "-fPIC" "unix.c"
2209 (string-append "-I" jdk "/include")
2210 (string-append "-I" jdk "/include/linux")
2212 (invoke "gcc" "-shared" "-O3" "-fPIC"
2213 "-DMACHINE_BYTE_ORDER=1"
2221 (string-append "-I" jdk "/include")
2222 (string-append "-I" jdk "/include/linux")
2223 "-o" "libnativedata.so"))
2224 (install-file "source/c/libunix.so"
2225 (string-append "libs/native/unix/" dir))
2226 (install-file "source/c/libnativedata.so"
2227 (string-append "libs/native/nativedata/" dir))
2229 ;; In the "check" phase we only build the test executable.
2230 (add-after 'check 'run-tests
2232 (invoke "java" "-jar" "targets/dist/sis-base-test.jar")
2233 (delete-file "targets/dist/sis-base-test.jar")
2235 (replace 'install (install-jars "targets/dist")))))
2237 `(("jdk" ,icedtea-8)
2238 ("java-commons-lang" ,java-commons-lang)
2239 ("java-commons-io" ,java-commons-io)
2240 ("java-testng" ,java-testng)
2245 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2246 "base/tags/release/"
2247 (version-major+minor base-version)
2249 "/build_resources/"))
2250 (revision revision)))
2253 "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk"))))))
2254 (home-page "http://svnsis.ethz.ch")
2255 (synopsis "Utility classes for libraries from ETH Zurich")
2256 (description "This library supplies some utility classes needed for
2257 libraries from the SIS division at ETH Zurich like jHDF5.")
2258 ;; The C sources are under a non-copyleft license, which looks like a
2259 ;; variant of the BSD licenses. The whole package is under the ASL2.0.
2260 (license (list license:asl2.0
2261 (license:non-copyleft "file://source/c/COPYING"))))))
2263 (define-public java-cisd-args4j
2264 (let ((revision 39162)
2265 (base-version "9.11.2"))
2267 (name "java-cisd-args4j")
2268 (version (string-append base-version "-" (number->string revision)))
2272 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2273 "args4j/tags/release/"
2274 (version-major+minor base-version)
2275 ".x/" base-version "/args4j/"))
2276 (revision revision)))
2277 (file-name (string-append "java-cisd-args4j-" version "-checkout"))
2280 "0hhqznjaivq7ips7mkwas78z42s6djsm20rrs7g1zd59rcsakxn2"))))
2281 (build-system ant-build-system)
2283 `(#:make-flags '("-file" "build/build.xml")
2284 #:tests? #f ; there are no tests
2285 ;; There are weird build failures with JDK8, such as: "The type
2286 ;; java.io.ObjectInputStream cannot be resolved. It is indirectly
2287 ;; referenced from required .class files"
2289 #:modules ((guix build ant-build-system)
2291 (guix build java-utils)
2296 (modify-phases %standard-phases
2297 (add-after 'unpack 'unpack-build-resources
2298 (lambda* (#:key inputs #:allow-other-keys)
2299 (mkdir-p "../build_resources")
2300 (invoke "tar" "xf" (assoc-ref inputs "build-resources")
2301 "-C" "../build_resources"
2302 "--strip-components=1")
2303 (mkdir-p "../build_resources/lib")
2305 (add-after 'unpack-build-resources 'fix-dependencies
2306 (lambda* (#:key inputs #:allow-other-keys)
2307 ;; FIXME: There should be a more convenient abstraction for
2308 ;; editing XML files.
2309 (with-directory-excursion "../build_resources/ant/"
2310 (chmod "build-common.xml" #o664)
2311 (call-with-output-file "build-common.xml.new"
2315 (with-input-from-file "build-common.xml"
2316 (lambda _ (xml->sxml #:trim-whitespace? #t)))
2317 `(;; Remove dependency on classycle and custom ant tasks
2318 (taskdef . ,(lambda (tag . kids)
2319 (let ((name ((sxpath '(name *text*)) kids)))
2320 (if (or (member "build-info" name)
2321 (member "dependency-checker" name)
2322 (member "build-java-subprojects" name)
2323 (member "project-classpath" name))
2326 (typedef . ,(lambda (tag . kids)
2327 (let ((name ((sxpath '(name *text*)) kids)))
2328 (if (member "recursive-jar" name)
2331 (build-java-subprojects . ,(lambda _ '()))
2332 ;; Ignore everything else
2333 (*default* . ,(lambda (tag . kids) `(,tag ,@kids)))
2334 (*text* . ,(lambda (_ txt) txt))))
2336 (rename-file "build-common.xml.new" "build-common.xml"))
2337 (substitute* "build/build.xml"
2338 (("\\$\\{lib\\}/cisd-base/cisd-base.jar")
2339 (string-append (assoc-ref inputs "java-cisd-base")
2340 "/share/java/sis-base.jar"))
2341 ;; Remove dependency on svn
2342 (("<build-info.*") "")
2343 (("\\$\\{revision.number\\}")
2344 ,(number->string revision))
2345 (("\\$\\{version.number\\}") ,base-version)
2346 ;; Don't use custom ant tasks.
2347 (("recursive-jar") "jar")
2348 (("<project-classpath.*") ""))
2350 (replace 'install (install-jars "targets/dist")))))
2352 `(("java-cisd-base" ,java-cisd-base)))
2354 `(("ecj" ,java-ecj-3.5)
2359 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2360 "args4j/tags/release/"
2361 (version-major+minor base-version)
2363 "/build_resources/"))
2364 (revision revision)))
2367 "056cam4k8pll7ass31sy6gwn8g8719njc41yf4l02b0342nilkyf"))
2368 (modules '((guix build utils)))
2369 ;; Delete bundled pre-built jars.
2371 '(begin (delete-file-recursively "lib/") #t))))))
2372 (home-page "http://svnsis.ethz.ch")
2373 (synopsis "Command line parser library")
2374 (description "This package provides a parser for command line arguments.")
2375 (license license:asl2.0))))
2377 (define-public java-cisd-jhdf5
2378 (let ((revision 39162)
2379 (base-version "14.12.6"))
2381 (name "java-cisd-jhdf5")
2382 (version (string-append base-version "-" (number->string revision)))
2386 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2387 "jhdf5/tags/release/"
2388 (version-major+minor base-version)
2389 ".x/" base-version "/jhdf5/"))
2390 (revision revision)))
2391 (file-name (string-append "java-cisd-jhdf5-" version "-checkout"))
2394 "13i17s2hn0q9drdqvp8csy7770p3hdbh9rp30ihln2ldkfawdmz0"))
2395 (modules '((guix build utils)))
2398 ;; Delete included gradle jar
2399 (delete-file-recursively "gradle/wrapper")
2400 ;; Delete pre-built native libraries
2401 (delete-file-recursively "libs")
2403 (build-system ant-build-system)
2405 `(#:make-flags '("-file" "build/build.xml")
2406 #:build-target "jar-all"
2407 #:test-target "jar-test"
2410 (modify-phases %standard-phases
2411 ;; Don't erase results from the build phase when building tests.
2412 (add-after 'unpack 'separate-test-target-from-clean
2414 (substitute* "build/build.xml"
2415 (("\"jar-test\" depends=\"clean, ")
2416 "\"jar-test\" depends=\""))
2418 (add-after 'unpack 'unpack-build-resources
2419 (lambda* (#:key inputs #:allow-other-keys)
2420 (copy-recursively (assoc-ref inputs "build-resources")
2421 "../build_resources")
2422 (delete-file-recursively "../build_resources/lib/")
2423 (mkdir-p "../build_resources/lib")
2424 ;; Remove dependency on classycle
2425 (substitute* "../build_resources/ant/build-common.xml"
2426 (("<taskdef name=\"dependency-checker.*") "")
2427 (("classname=\"classycle.*") "")
2428 (("classpath=\"\\$\\{lib\\}/classycle.*") ""))
2429 ;; Remove dependency on svn
2430 (substitute* "build/build.xml"
2431 (("<build-info.*") "")
2432 (("\\$\\{revision.number\\}")
2433 ,(number->string revision))
2434 (("\\$\\{version.number\\}") ,base-version))
2436 (add-after 'unpack-build-resources 'fix-dependencies
2437 (lambda* (#:key inputs #:allow-other-keys)
2438 (substitute* "../build_resources/ant/build-common.xml"
2439 (("../libraries/testng/testng-jdk15.jar")
2440 (string-append (assoc-ref inputs "java-testng")
2441 "/share/java/java-testng.jar")))
2442 (substitute* "build/build.xml"
2443 (("\\$\\{lib\\}/sis-base/sis-base.jar")
2444 (string-append (assoc-ref inputs "java-cisd-base")
2445 "/share/java/sis-base.jar"))
2446 (("\\$\\{lib\\}/cisd-args4j/cisd-args4j.jar")
2447 (string-append (assoc-ref inputs "java-cisd-args4j")
2448 "/share/java/cisd-args4j.jar"))
2449 (("\\$\\{lib\\}/commons-lang/commons-lang.jar")
2450 (string-append (assoc-ref inputs "java-commons-lang")
2451 "/share/java/commons-lang-"
2452 ,(package-version java-commons-lang) ".jar"))
2453 (("\\$\\{lib\\}/commons-io/commons-io.jar")
2454 (string-append (assoc-ref inputs "java-commons-io")
2455 "/share/java/commons-io-"
2456 ,(package-version java-commons-io)
2458 (("\\$\\{lib\\}/testng/testng-jdk15.jar")
2459 (string-append (assoc-ref inputs "java-testng")
2460 "/share/java/java-testng.jar"))
2461 (("\\$\\{lib\\}/junit4/junit.jar")
2462 (string-append (assoc-ref inputs "java-junit")
2463 "/share/java/junit.jar"))
2464 (("\\$\\{lib\\}/jmock/hamcrest/hamcrest-core.jar")
2465 (string-append (assoc-ref inputs "java-hamcrest-core")
2466 "/share/java/hamcrest-core.jar")))
2467 ;; Remove dependency on ch.rinn.restrictions
2468 (with-directory-excursion "source/java/ch/systemsx/cisd/hdf5/"
2469 (substitute* '("BitSetConversionUtils.java"
2471 (("import ch.rinn.restrictions.Private;") "")
2473 (with-directory-excursion "sourceTest/java/ch/systemsx/cisd/hdf5/"
2474 (substitute* '("BitSetConversionTest.java"
2475 "h5ar/HDF5ArchiverTest.java")
2476 (("import ch.rinn.restrictions.Friend;") "")
2478 ;; Remove leftovers from removing @Friend
2479 (substitute* "h5ar/HDF5ArchiverTest.java"
2480 (("\\{ HDF5Archiver.class, IdCache.class, LinkRecord.class \\}\\)")
2483 (add-before 'configure 'build-native-library
2484 (lambda* (#:key inputs #:allow-other-keys)
2485 (let ((jdk (assoc-ref inputs "jdk"))
2486 (hdf5 (assoc-ref inputs "hdf5"))
2487 (dir ,(match (%current-system)
2490 ((or "armhf-linux" "aarch64-linux")
2492 ((or "x86_64-linux")
2494 (_ "unknown-Linux"))))
2495 (with-directory-excursion "source/c"
2496 (apply invoke `("gcc" "-shared" "-O3"
2498 "-Wl,--exclude-libs,ALL"
2499 ,@(find-files "jhdf5" "\\.c$")
2500 ,@(find-files "hdf-java" "\\.c$")
2501 ,(string-append "-I" hdf5 "/include")
2502 ,(string-append "-I" jdk "/include")
2503 ,(string-append "-I" jdk "/include/linux")
2504 ,(string-append hdf5 "/lib/libhdf5.a")
2505 "-o" "libjhdf5.so" "-lz")))
2506 (install-file "source/c/libjhdf5.so"
2507 (string-append "libs/native/jhdf5/" dir))
2509 ;; In the "check" phase we only build the test executable.
2510 (add-after 'check 'run-tests
2512 (invoke "java" "-jar" "targets/dist/sis-jhdf5-test.jar")
2513 (delete-file "targets/dist/sis-jhdf5-test.jar")
2516 (install-jars "targets/dist")))))
2518 `(("java-cisd-base" ,java-cisd-base)
2519 ("java-cisd-args4j" ,java-cisd-args4j)
2520 ("java-commons-lang" ,java-commons-lang)
2521 ("java-commons-io" ,java-commons-io)
2525 `(("jdk" ,icedtea-8)
2526 ("java-testng" ,java-testng)
2527 ("java-junit" ,java-junit)
2528 ("java-jmock" ,java-jmock)
2529 ("java-hamcrest-core" ,java-hamcrest-core)
2534 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2535 "jhdf5/tags/release/"
2536 (version-major+minor base-version)
2538 "/build_resources/"))
2539 (revision revision)))
2542 "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk"))))))
2543 (home-page "https://wiki-bsse.ethz.ch/display/JHDF5/")
2544 (synopsis "Java binding for HDF5")
2545 (description "JHDF5 is a high-level API in Java for reading and writing
2546 HDF5 files, building on the libraries provided by the HDF Group.")
2547 ;; The C sources are under a non-copyleft license, which looks like a
2548 ;; variant of the BSD licenses. The whole package is under the ASL2.0.
2549 (license (list license:asl2.0
2550 (license:non-copyleft "file://source/c/COPYING"))))))
2552 (define-public java-classpathx-servletapi
2554 (name "java-classpathx-servletapi")
2558 (uri (string-append "mirror://gnu/classpathx/servletapi/"
2559 "servletapi-" version ".tar.gz"))
2562 "07d8h051siga2f33fra72hk12sbq1bxa4jifjg0qj0vfazjjff0x"))))
2563 (build-system ant-build-system)
2565 `(#:tests? #f ; there is no test target
2566 #:build-target "compile"
2568 (list "-Dbuild.compiler=javac1.8"
2569 (string-append "-Ddist=" (assoc-ref %outputs "out")))
2571 (modify-phases %standard-phases
2573 (lambda* (#:key make-flags #:allow-other-keys)
2574 (zero? (apply system* `("ant" "dist" ,@make-flags))))))))
2575 (home-page "https://www.gnu.org/software/classpathx/")
2576 (synopsis "Java servlet API implementation")
2577 (description "This is the GNU servlet API distribution, part of the
2578 ClasspathX project. It provides implementations of version 3.0 of the servlet
2579 API and version 2.1 of the Java ServerPages API.")
2580 (license license:gpl3+)))
2582 (define-public java-swt
2587 ;; The types of many variables and procedures differ in the sources
2588 ;; dependent on whether the target architecture is a 32-bit system or a
2589 ;; 64-bit system. Instead of patching the sources on demand in a build
2590 ;; phase we download either the 32-bit archive (which mostly uses "int"
2591 ;; types) or the 64-bit archive (which mostly uses "long" types).
2592 (let ((hash32 "09q0cbh90d90q3a7dx9430kc4m6bijrkr4lajrmzzvi0jjdpq4v9")
2593 (hash64 "17k5hs75a87ssmc5xhwdfdm2gn4zba0r837l2455za01krnkaa2q")
2596 (let-values (((hash file)
2597 (match (or (%current-target-system) (%current-system))
2598 ("x86_64-linux" (values hash64 file64))
2599 (_ (values hash32 file32)))))
2603 "http://download.eclipse.org/eclipse/downloads/drops4/"
2604 "R-" version "-201710090410/swt-" version
2605 "-gtk-linux-" file ".zip"))
2606 (sha256 (base32 hash))))))
2607 (build-system ant-build-system)
2609 `(#:jar-name "swt.jar"
2611 #:tests? #f ; no "check" target
2613 (modify-phases %standard-phases
2615 (lambda* (#:key source #:allow-other-keys)
2617 (zero? (system* "unzip" source "-d" "swt"))
2620 (zero? (system* "unzip" "src.zip" "-d" "src")))))
2621 ;; The classpath contains invalid icecat jars. Since we don't need
2622 ;; anything other than the JDK on the classpath, we can simply unset
2624 (add-after 'configure 'unset-classpath
2625 (lambda _ (unsetenv "CLASSPATH") #t))
2626 (add-before 'build 'build-native
2627 (lambda* (#:key inputs outputs #:allow-other-keys)
2628 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
2629 ;; Build shared libraries. Users of SWT have to set the system
2630 ;; property swt.library.path to the "lib" directory of this
2633 (setenv "OUTPUT_DIR" lib)
2634 (with-directory-excursion "src"
2635 (zero? (system* "bash" "build.sh"))))))
2636 (add-after 'install 'install-native
2637 (lambda* (#:key outputs #:allow-other-keys)
2638 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
2639 (for-each (lambda (file)
2640 (install-file file lib))
2641 (find-files "." "\\.so$"))
2645 ("libxtst" ,libxtst)
2650 `(("pkg-config" ,pkg-config)
2652 (home-page "https://www.eclipse.org/swt/")
2653 (synopsis "Widget toolkit for Java")
2655 "SWT is a widget toolkit for Java designed to provide efficient, portable
2656 access to the user-interface facilities of the operating systems on which it
2658 ;; SWT code is licensed under EPL1.0
2659 ;; Gnome and Gtk+ bindings contain code licensed under LGPLv2.1
2660 ;; Cairo bindings contain code under MPL1.1
2661 ;; XULRunner 1.9 bindings contain code under MPL2.0
2666 license:lgpl2.1+))))
2668 (define-public java-xz
2674 (uri (string-append "http://tukaani.org/xz/xz-java-" version ".zip"))
2677 "1z3p1ri1gvl07inxn0agx44ck8n7wrzfmvkz8nbq3njn8r9wba8x"))))
2678 (build-system ant-build-system)
2680 `(#:tests? #f ; There are no tests to run.
2681 #:jar-name ,(string-append "xz-" version ".jar")
2683 (modify-phases %standard-phases
2684 ;; The unpack phase enters the "maven" directory by accident.
2685 (add-after 'unpack 'chdir
2686 (lambda _ (chdir "..") #t)))))
2688 `(("unzip" ,unzip)))
2689 (home-page "https://tukaani.org/xz/java.html")
2690 (synopsis "Implementation of XZ data compression in pure Java")
2691 (description "This library aims to be a complete implementation of XZ data
2692 compression in pure Java. Single-threaded streamed compression and
2693 decompression and random access decompression have been fully implemented.")
2694 (license license:public-domain)))
2696 ;; java-hamcrest-core uses qdox version 1.12. We package this version instead
2697 ;; of the latest release.
2698 (define-public java-qdox-1.12
2704 (uri (string-append "http://central.maven.org/maven2/"
2705 "com/thoughtworks/qdox/qdox/" version
2706 "/qdox-" version "-sources.jar"))
2709 "0hlfbqq2avf5s26wxkksqmkdyk6zp9ggqn37c468m96mjv0n9xfl"))))
2710 (build-system ant-build-system)
2712 `(;; Tests require junit
2714 #:jar-name "qdox.jar"
2716 (modify-phases %standard-phases
2718 (lambda* (#:key source #:allow-other-keys)
2720 (with-directory-excursion "src"
2721 (zero? (system* "jar" "-xf" source)))))
2722 ;; At this point we don't have junit, so we must remove the API
2724 (add-after 'unpack 'delete-tests
2726 (delete-file-recursively "src/com/thoughtworks/qdox/junit")
2728 (home-page "http://qdox.codehaus.org/")
2729 (synopsis "Parse definitions from Java source files")
2731 "QDox is a high speed, small footprint parser for extracting
2732 class/interface/method definitions from source files complete with JavaDoc
2733 @code{@@tags}. It is designed to be used by active code generators or
2734 documentation tools.")
2735 (license license:asl2.0)))
2737 (define-public java-jarjar
2739 (name "java-jarjar")
2744 "https://storage.googleapis.com/google-code-archive-downloads/v2/"
2745 "code.google.com/jarjar/jarjar-src-" version ".zip"))
2748 "1v8irhni9cndcw1l1wxqgry013s2kpj0qqn57lj2ji28xjq8ndjl"))))
2749 (build-system ant-build-system)
2751 `(;; Tests require junit, which ultimately depends on this package.
2753 #:build-target "jar"
2755 (modify-phases %standard-phases
2757 (lambda* (#:key outputs #:allow-other-keys)
2758 (let ((target (string-append (assoc-ref outputs "out")
2760 (install-file (string-append "dist/jarjar-" ,version ".jar")
2764 `(("unzip" ,unzip)))
2765 (home-page "https://code.google.com/archive/p/jarjar/")
2766 (synopsis "Repackage Java libraries")
2768 "Jar Jar Links is a utility that makes it easy to repackage Java
2769 libraries and embed them into your own distribution. Jar Jar Links includes
2770 an Ant task that extends the built-in @code{jar} task.")
2771 (license license:asl2.0)))
2773 (define-public java-hamcrest-core
2775 (name "java-hamcrest-core")
2779 (uri (string-append "https://github.com/hamcrest/JavaHamcrest/"
2780 "archive/hamcrest-java-" version ".tar.gz"))
2783 "11g0s105fmwzijbv08lx8jlb521yravjmxnpgdx08fvg1kjivhva"))
2784 (modules '((guix build utils)))
2787 ;; Delete bundled thirds-party jar archives.
2788 (delete-file-recursively "lib")
2790 (build-system ant-build-system)
2792 `(#:tests? #f ; Tests require junit
2793 #:modules ((guix build ant-build-system)
2796 #:make-flags (list (string-append "-Dversion=" ,version))
2797 #:test-target "unit-test"
2798 #:build-target "core"
2800 (modify-phases %standard-phases
2801 ;; Disable unit tests, because they require junit, which requires
2802 ;; hamcrest-core. We also give a fixed value to the "Built-Date"
2803 ;; attribute from the manifest for reproducibility.
2804 (add-before 'configure 'patch-build.xml
2806 (substitute* "build.xml"
2807 (("unit-test, ") "")
2808 (("\\$\\{build.timestamp\\}") "guix"))
2810 ;; Java's "getMethods()" returns methods in an unpredictable order.
2811 ;; To make the output of the generated code deterministic we must
2812 ;; sort the array of methods.
2813 (add-after 'unpack 'make-method-order-deterministic
2815 (substitute* "hamcrest-generator/src/main/java/org/hamcrest/generator/ReflectiveFactoryReader.java"
2816 (("import java\\.util\\.Iterator;" line)
2817 (string-append line "\n"
2818 "import java.util.Arrays; import java.util.Comparator;"))
2819 (("allMethods = cls\\.getMethods\\(\\);" line)
2820 (string-append "_" line
2822 private Method[] getSortedMethods() {
2823 Arrays.sort(_allMethods, new Comparator<Method>() {
2825 public int compare(Method a, Method b) {
2826 return a.toString().compareTo(b.toString());
2832 private Method[] allMethods = getSortedMethods();")))))
2833 (add-before 'build 'do-not-use-bundled-qdox
2834 (lambda* (#:key inputs #:allow-other-keys)
2835 (substitute* "build.xml"
2836 (("lib/generator/qdox-1.12.jar")
2837 (string-append (assoc-ref inputs "java-qdox-1.12")
2838 "/share/java/qdox.jar")))
2840 ;; build.xml searches for .jar files in this directoy, which
2841 ;; we remove from the source archive.
2842 (add-before 'build 'create-dummy-directories
2844 (mkdir-p "lib/integration")
2847 (lambda* (#:key outputs #:allow-other-keys)
2848 (let* ((target (string-append (assoc-ref outputs "out")
2850 (version-suffix ,(string-append "-" version ".jar"))
2851 (install-without-version-suffix
2854 (string-append target
2855 (basename jar version-suffix)
2859 install-without-version-suffix
2862 (and (string-suffix? ".jar" name)
2863 (not (string-suffix? "-sources.jar" name)))))))
2866 `(("java-qdox-1.12" ,java-qdox-1.12)
2867 ("java-jarjar" ,java-jarjar)))
2868 (home-page "http://hamcrest.org/")
2869 (synopsis "Library of matchers for building test expressions")
2871 "This package provides a library of matcher objects (also known as
2872 constraints or predicates) allowing @code{match} rules to be defined
2873 declaratively, to be used in other frameworks. Typical scenarios include
2874 testing frameworks, mocking libraries and UI validation rules.")
2875 (license license:bsd-2)))
2877 (define-public java-junit
2883 (uri (string-append "https://github.com/junit-team/junit/"
2884 "archive/r" version ".tar.gz"))
2885 (file-name (string-append name "-" version ".tar.gz"))
2888 "090dn5v1vs0b3acyaqc0gjf6p8lmd2h24wfzsbq7sly6b214anws"))
2889 (modules '((guix build utils)))
2892 ;; Delete bundled jar archives.
2893 (delete-file-recursively "lib")
2895 (build-system ant-build-system)
2897 `(#:tests? #f ; no tests
2898 #:jar-name "junit.jar"))
2900 `(("java-hamcrest-core" ,java-hamcrest-core)))
2901 (home-page "http://junit.org/")
2902 (synopsis "Test framework for Java")
2904 "JUnit is a simple framework to write repeatable tests for Java projects.
2905 JUnit provides assertions for testing expected results, test fixtures for
2906 sharing common test data, and test runners for running tests.")
2907 (license license:epl1.0)))
2909 (define-public java-plexus-utils
2911 (name "java-plexus-utils")
2915 (uri (string-append "https://github.com/codehaus-plexus/"
2916 "plexus-utils/archive/plexus-utils-"
2920 "1mlwpc6fms24slygv5yvi6fi9hcha2fh0v73p5znpi78bg36i2js"))))
2921 (build-system ant-build-system)
2922 ;; FIXME: The default build.xml does not include a target to install
2925 `(#:jar-name "plexus-utils.jar"
2926 #:source-dir "src/main"
2928 (modify-phases %standard-phases
2929 (add-after 'unpack 'fix-reference-to-/bin-and-/usr
2931 (substitute* "src/main/java/org/codehaus/plexus/util/\
2932 cli/shell/BourneShell.java"
2933 (("/bin/sh") (which "sh"))
2934 (("/usr/") (getcwd)))
2936 (add-after 'unpack 'fix-or-disable-broken-tests
2938 (with-directory-excursion "src/test/java/org/codehaus/plexus/util"
2939 (substitute* '("cli/CommandlineTest.java"
2940 "cli/shell/BourneShellTest.java")
2941 (("/bin/sh") (which "sh"))
2942 (("/bin/echo") (which "echo")))
2944 ;; This test depends on MavenProjectStub, but we don't have
2945 ;; a package for Maven.
2946 (delete-file "introspection/ReflectionValueExtractorTest.java")
2948 ;; FIXME: The command line tests fail, maybe because they use
2950 (delete-file "cli/CommandlineTest.java"))
2953 `(("java-junit" ,java-junit)))
2954 (home-page "http://codehaus-plexus.github.io/plexus-utils/")
2955 (synopsis "Common utilities for the Plexus framework")
2956 (description "This package provides various Java utility classes for the
2957 Plexus framework to ease working with strings, files, command lines, XML and
2959 (license license:asl2.0)))
2961 (define-public java-plexus-interpolation
2963 (name "java-plexus-interpolation")
2967 (uri (string-append "https://github.com/codehaus-plexus/"
2968 "plexus-interpolation/archive/"
2969 "plexus-interpolation-" version ".tar.gz"))
2972 "03377yzlx5q440m6sxxgv6a5qb8fl30zzcgxgc0hxk5qgl2z1jjn"))))
2973 (build-system ant-build-system)
2975 `(#:jar-name "plexus-interpolation.jar"
2976 #:source-dir "src/main"))
2978 `(("java-junit" ,java-junit)
2979 ("java-hamcrest-core" ,java-hamcrest-core)))
2980 (home-page "http://codehaus-plexus.github.io/plexus-interpolation/")
2981 (synopsis "Java components for interpolating ${} strings and the like")
2982 (description "Plexus interpolator is a modular, flexible interpolation
2983 framework for the expression language style commonly seen in Maven, Plexus,
2984 and other related projects.
2986 It has its foundation in the @code{org.codehaus.plexus.utils.interpolation}
2987 package within @code{plexus-utils}, but has been separated in order to allow
2988 these two libraries to vary independently of one another.")
2989 (license license:asl2.0)))
2991 (define-public java-plexus-classworlds
2993 (name "java-plexus-classworlds")
2997 (uri (string-append "https://github.com/codehaus-plexus/"
2998 "plexus-classworlds/archive/plexus-classworlds-"
3002 "1qm4p0rl8d82lzhsiwnviw11jnq44s0gflg78zq152xyyr2xmh8g"))))
3003 (build-system ant-build-system)
3005 `(#:jar-name "plexus-classworlds.jar"
3006 #:source-dir "src/main"
3007 #:tests? #f));; FIXME: we need to generate some resources as in pom.xml
3009 `(("java-junit" ,java-junit)))
3010 (home-page "http://codehaus-plexus.github.io/plexus-classworlds/")
3011 (synopsis "Java class loader framework")
3012 (description "Plexus classworlds replaces the native @code{ClassLoader}
3013 mechanism of Java. It is especially useful for dynamic loading of application
3015 (license license:asl2.0)))
3017 (define java-plexus-container-default-bootstrap
3019 (name "java-plexus-container-default-bootstrap")
3023 (uri (string-append "https://github.com/codehaus-plexus/plexus-containers"
3024 "/archive/plexus-containers-" version ".tar.gz"))
3027 "0xw5g30qf4a83608rw9v2hv8pfsz7d69dkdhk6r0wia4q78hh1pc"))))
3028 (build-system ant-build-system)
3030 `(#:jar-name "container-default.jar"
3031 #:source-dir "plexus-container-default/src/main/java"
3032 #:test-dir "plexus-container-default/src/test"
3034 #:tests? #f; requires plexus-archiver, which depends on this package
3036 (modify-phases %standard-phases
3037 (add-before 'build 'copy-resources
3040 "plexus-container-default/src/main/resources/"
3044 `(("worldclass" ,java-plexus-classworlds)
3045 ("xbean" ,java-geronimo-xbean-reflect)
3046 ("utils" ,java-plexus-utils)
3047 ("junit" ,java-junit)
3048 ("guava" ,java-guava)))
3049 (home-page "https://github.com/codehaus-plexus/plexus-containers")
3050 (synopsis "Inversion-of-control container")
3051 (description "Plexus-default-container is Plexus' inversion-of-control
3052 (@dfn{IoC}) container. It is composed of its public API and its default
3054 (license license:asl2.0)))
3056 (define-public java-plexus-io
3058 (name "java-plexus-io")
3062 (uri (string-append "https://github.com/codehaus-plexus/plexus-io"
3063 "/archive/plexus-io-" version ".tar.gz"))
3066 "0f2j41kihaymxkpbm55smpxjja235vad8cgz94frfy3ppcp021dw"))))
3067 (build-system ant-build-system)
3069 `(#:jar-name "plexus-io.jar"
3070 #:source-dir "src/main/java"
3071 #:test-dir "src/test"
3074 (modify-phases %standard-phases
3075 (add-before 'build 'copy-resources
3077 (mkdir-p "build/classes/META-INF/plexus")
3078 (copy-file "src/main/resources/META-INF/plexus/components.xml"
3079 "build/classes/META-INF/plexus/components.xml")
3082 `(("utils" ,java-plexus-utils)
3083 ("commons-io" ,java-commons-io)
3084 ("java-jsr305" ,java-jsr305)))
3086 `(("junit" ,java-junit)
3087 ("hamcrest" ,java-hamcrest-core)
3088 ("guava" ,java-guava)
3089 ("classworlds" ,java-plexus-classworlds)
3090 ("xbean" ,java-geronimo-xbean-reflect)
3091 ("container-default" ,java-plexus-container-default-bootstrap)))
3092 (home-page "https://github.com/codehaus-plexus/plexus-io")
3093 (synopsis "I/O plexus components")
3094 (description "Plexus IO is a set of plexus components, which are designed
3095 for use in I/O operations. This implementation using plexus components allows
3096 reusing it in maven.")
3097 (license license:asl2.0)))
3099 (define-public java-plexus-archiver
3101 (name "java-plexus-archiver")
3105 (uri (string-append "https://github.com/codehaus-plexus/plexus-archiver"
3106 "/archive/plexus-archiver-" version ".tar.gz"))
3109 "0iv1j7khra6icqh3jndng3iipfmkc7l5jq2y802cm8r575v75pyv"))))
3110 (build-system ant-build-system)
3112 `(#:jar-name "plexus-archiver.jar"
3113 #:source-dir "src/main/java"
3115 #:test-dir "src/test"
3116 #:test-exclude (list "**/Abstract*.java" "**/Base*.java")
3118 (modify-phases %standard-phases
3119 (add-before 'check 'remove-failing
3121 ;; Requires an older version of plexus container
3123 "src/test/java/org/codehaus/plexus/archiver/DuplicateFilesTest.java")))
3124 (add-before 'build 'copy-resources
3126 (mkdir-p "build/classes/META-INF/plexus")
3127 (copy-file "src/main/resources/META-INF/plexus/components.xml"
3128 "build/classes/META-INF/plexus/components.xml")
3131 `(("utils" ,java-plexus-utils)
3132 ("commons-io" ,java-commons-io)
3133 ("snappy" ,java-iq80-snappy)
3134 ("io" ,java-plexus-io)
3135 ("compress" ,java-commons-compress)
3136 ("container-default" ,java-plexus-container-default-bootstrap)
3137 ("snappy" ,java-snappy)
3138 ("java-jsr305" ,java-jsr305)))
3140 `(("junit" ,java-junit)
3141 ("classworld" ,java-plexus-classworlds)
3142 ("xbean" ,java-geronimo-xbean-reflect)
3143 ("xz" ,java-tukaani-xz)
3144 ("guava" ,java-guava)))
3145 (home-page "https://github.com/codehaus-plexus/plexus-archiver")
3146 (synopsis "Archiver component of the Plexus project")
3147 (description "Plexus-archiver contains a component to deal with project
3149 (license license:asl2.0)))
3151 (define-public java-plexus-container-default
3153 (inherit java-plexus-container-default-bootstrap)
3154 (name "java-plexus-container-default")
3156 `(#:jar-name "container-default.jar"
3157 #:source-dir "plexus-container-default/src/main/java"
3158 #:test-dir "plexus-container-default/src/test"
3159 #:test-exclude (list ;"**/*Test.java"
3161 ;; Requires plexus-hierarchy
3162 "**/PlexusHierarchyTest.java"
3164 "**/ComponentRealmCompositionTest.java"
3165 "**/PlexusContainerTest.java")
3168 (modify-phases %standard-phases
3169 (add-before 'build 'copy-resources
3172 "plexus-container-default/src/main/resources/"
3175 (add-before 'check 'fix-paths
3177 (let ((dir "plexus-container-default/src/test/java/org/codehaus"))
3180 dir "/plexus/component/composition/"
3181 "ComponentRealmCompositionTest.java")
3182 (("src/test") "plexus-container-default/src/test"))
3185 `(("worldclass" ,java-plexus-classworlds)
3186 ("xbean" ,java-geronimo-xbean-reflect)
3187 ("utils" ,java-plexus-utils)
3188 ("junit" ,java-junit)
3189 ("guava" ,java-guava)))
3191 `(("archiver" ,java-plexus-archiver)
3192 ("hamcrest" ,java-hamcrest-core)))))
3194 (define-public java-plexus-component-annotations
3196 (inherit java-plexus-container-default)
3197 (name "java-plexus-component-annotations")
3199 `(#:jar-name "plexus-component-annotations.jar"
3200 #:source-dir "plexus-component-annotations/src/main/java"
3201 #:tests? #f)); no tests
3204 (synopsis "Plexus descriptors generator")
3205 (description "This package is a Maven plugin to generate Plexus descriptors
3206 from source tags and class annotations.")))
3208 (define-public java-plexus-cipher
3210 (name "java-plexus-cipher")
3214 (uri (string-append "https://github.com/codehaus-plexus/plexus-cipher"
3215 "/archive/plexus-cipher-" version ".tar.gz"))
3218 "1j3r8xzlxlk340snkjp6lk2ilkxlkn8qavsfiq01f43xmvv8ymk3"))))
3219 (build-system ant-build-system)
3221 `(#:jar-name "plexus-cipher.jar"
3222 #:source-dir "src/main/java"
3224 #:tests? #f; FIXME: requires sisu-inject-bean
3226 (modify-phases %standard-phases
3227 (add-before 'build 'copy-resources
3229 (copy-recursively "src/main/resources" "build/classes")
3230 (mkdir-p "build/classes/META-INF/sisu")
3231 (with-output-to-file "build/classes/META-INF/sisu/javax.inject.Named"
3233 (display "org.sonatype.plexus.components.cipher.DefaultPlexusCipher\n")))
3236 `(("java-cdi-api" ,java-cdi-api)
3237 ("java-javax-inject" ,java-javax-inject)))
3238 (home-page "https://github.com/sonatype/plexus-cipher")
3239 (synopsis "Encryption/decryption Component")
3240 (description "Plexus-cipher contains a component to deal with encryption
3242 (license license:asl2.0)))
3244 (define-public java-plexus-compiler-api
3246 (name "java-plexus-compiler-api")
3250 (uri (string-append "https://github.com/codehaus-plexus/plexus-compiler"
3251 "/archive/plexus-compiler-" version ".tar.gz"))
3254 "0g3x26pymcdnfnwv2a1i57pd5s26f5zqfi1rdy98z1bn01klx25k"))))
3255 (build-system ant-build-system)
3257 `(#:jar-name "plexus-compiler-api.jar"
3258 #:source-dir "plexus-compiler-api/src/main/java"
3260 #:test-dir "plexus-compiler-api/src/test"))
3262 `(("java-plexus-container-default" ,java-plexus-container-default)
3263 ("java-plexus-util" ,java-plexus-utils)))
3265 `(("java-junit" ,java-junit)))
3266 (home-page "https://github.com/codehaus-plexus/plexus-compiler")
3267 (synopsis "Plexus Compilers component's API to manipulate compilers")
3268 (description "This package contains the API used by components to manipulate
3270 (license (list license:asl2.0
3273 (define-public java-plexus-compiler-javac
3275 (inherit java-plexus-compiler-api)
3276 (name "java-plexus-compiler-javac")
3278 `(#:jar-name "plexus-compiler-javac.jar"
3279 #:source-dir "plexus-compilers/plexus-compiler-javac/src/main/java"
3281 #:tests? #f; depends on compiler-test -> maven-core -> ... -> this package.
3282 #:test-dir "plexus-compilers/plexus-compiler-javac/src/test"))
3284 `(("java-plexus-compiler-api" ,java-plexus-compiler-api)
3285 ("java-plexus-utils" ,java-plexus-utils)
3286 ("java-plexus-container-default" ,java-plexus-container-default)))
3288 `(("java-junit" ,java-junit)))
3289 (synopsis "Javac Compiler support for Plexus Compiler component")
3290 (description "This package contains the Javac Compiler support for Plexus
3291 Compiler component.")))
3293 (define-public java-plexus-sec-dispatcher
3295 (name "java-plexus-sec-dispatcher")
3296 (version "1.4") ;; Newest release listed at the Maven Central Repository.
3298 ;; This project doesn't tag releases or publish tarballs, so we take
3299 ;; the "prepare release plexus-sec-dispatcher-1.4" git commit.
3301 (uri (string-append "https://github.com/sonatype/plexus-sec-dispatcher/"
3302 "archive/7db8f88048.tar.gz"))
3305 "1smfrk4n7xbrsxpxcp2j4i0j8q86j73w0w6xg7qz83dp6dagdjgp"))
3306 (file-name (string-append name "-" version ".tar.gz"))))
3308 `(#:jar-name "plexus-sec-dispatcher.jar"
3309 #:source-dir "src/main/java"
3312 (modify-phases %standard-phases
3313 (add-before 'build 'generate-models
3314 (lambda* (#:key inputs #:allow-other-keys)
3315 (define (modello-single-mode file version mode)
3316 (zero? (system* "java"
3317 "org.codehaus.modello.ModelloCli"
3318 file mode "src/main/java" version
3320 (let ((file "src/main/mdo/settings-security.mdo"))
3322 (modello-single-mode file "1.0.0" "java")
3323 (modello-single-mode file "1.0.0" "xpp3-reader")
3324 (modello-single-mode file "1.0.0" "xpp3-writer")))))
3325 (add-before 'build 'generate-components.xml
3327 (mkdir-p "build/classes/META-INF/plexus")
3328 (with-output-to-file "build/classes/META-INF/plexus/components.xml"
3334 <role>org.sonatype.plexus.components.sec.dispatcher.SecDispatcher</role>\n
3335 <role-hint>default</role-hint>\n
3336 <implementation>org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher</implementation>\n
3337 <description></description>\n
3340 <role>org.sonatype.plexus.components.cipher.PlexusCipher</role>\n
3341 <field-name>_cipher</field-name>\n
3344 <role>org.sonatype.plexus.components.sec.dispatcher.PasswordDecryptor</role>\n
3345 <field-name>_decryptors</field-name>\n
3349 <_configuration-file>~/.settings-security.xml</_configuration-file>\n
3353 </component-set>\n")))))
3354 (add-before 'check 'fix-paths
3356 (copy-recursively "src/test/resources" "target"))))))
3358 `(("java-plexus-cipher" ,java-plexus-cipher)))
3360 `(("java-modello-core" ,java-modello-core)
3362 ("java-plexus-container-default" ,java-plexus-container-default)
3363 ("java-plexus-classworlds" ,java-plexus-classworlds)
3364 ("java-plexus-utils" ,java-plexus-utils)
3365 ("java-guava" ,java-guava)
3366 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
3367 ("java-sisu-build-api" ,java-sisu-build-api)
3369 ("java-modellop-plugins-java" ,java-modello-plugins-java)
3370 ("java-modellop-plugins-xml" ,java-modello-plugins-xml)
3371 ("java-modellop-plugins-xpp3" ,java-modello-plugins-xpp3)
3373 ("java-junit" ,java-junit)))
3374 (build-system ant-build-system)
3375 (home-page "https://github.com/sonatype/plexus-sec-dispatcher")
3376 (synopsis "Plexus Security Dispatcher Component")
3377 (description "This package is the Plexus Security Dispatcher Component.
3378 This component decrypts a string passed to it.")
3379 (license license:asl2.0)))
3381 (define-public java-sisu-build-api
3383 (name "java-sisu-build-api")
3387 (uri (string-append "https://github.com/sonatype/sisu-build-api/"
3388 "archive/plexus-build-api-" version ".tar.gz"))
3391 "1c3rrpma3x634xp2rm2p5iskfhzdyc7qfbhjzr70agrl1jwghgy2"))))
3392 (build-system ant-build-system)
3394 `(#:jar-name "sisu-build-api.jar"
3395 #:source-dir "src/main/java"
3397 #:tests? #f; FIXME: how to run the tests?
3399 (modify-phases %standard-phases
3400 (add-before 'build 'copy-resources
3402 (copy-recursively "src/main/resources" "build/classes")
3403 (substitute* (find-files "build/classes")
3404 (("\\$\\{project.version\\}") ,version))
3406 (add-before 'build 'generate-plexus-compontent
3408 (mkdir-p "build/classes/META-INF/plexus")
3409 ;; This file is required for plexus to inject this package.
3410 ;; FIXME: how is it generated?
3411 (with-output-to-file "build/classes/META-INF/plexus/components.xml"
3417 <role>org.sonatype.plexus.build.incremental.BuildContext</role>\n
3418 <role-hint>default</role-hint>\n
3419 <implementation>org.sonatype.plexus.build.incremental.DefaultBuildContext</implementation>\n
3420 <description>Filesystem based non-incremental build context implementation\n
3421 which behaves as if all files were just created.</description>\n
3424 </component-set>\n")))
3427 `(("java-plexus-utils" ,java-plexus-utils)
3428 ("java-plexus-container-default" ,java-plexus-container-default)))
3429 (home-page "https://github.com/sonatype/sisu-build-api/")
3430 (synopsis "Base build API for maven")
3431 (description "This package contains the base build API for maven and
3432 a default implementation of it. This API is about scanning files in a
3433 project and determining what files need to be rebuilt.")
3434 (license license:asl2.0)))
3436 (define-public java-modello-core
3438 (name "java-modello-core")
3442 (uri (string-append "https://github.com/codehaus-plexus/modello"
3443 "/archive/modello-" version ".tar.gz"))
3446 "0l2pvns8pmlrmjm3iknp7gpg3654y1m8qhy55b19sdwdchdcyxfh"))))
3447 (build-system ant-build-system)
3449 `(#:jar-name "modello-core.jar"
3450 #:source-dir "modello-core/src/main/java"
3451 #:test-dir "modello-core/src/test"
3452 #:main-class "org.codehaus.modello.ModelloCli"
3455 (modify-phases %standard-phases
3456 (add-before 'build 'copy-resources
3458 (mkdir-p "build/classes/META-INF/plexus")
3459 (copy-file "modello-core/src/main/resources/META-INF/plexus/components.xml"
3460 "build/classes/META-INF/plexus/components.xml")
3462 (add-before 'check 'fix-tests
3464 (with-directory-excursion "modello-core/src/test/java/org/codehaus"
3465 (substitute* '("modello/core/DefaultModelloCoreTest.java"
3466 "modello/core/io/ModelReaderTest.java")
3467 (("src/test") "modello-core/src/test")))
3470 `(("java-plexus-utils" ,java-plexus-utils)
3471 ("java-plexus-container-default" ,java-plexus-container-default)
3472 ("java-sisu-build-api" ,java-sisu-build-api)))
3474 `(("java-junit" ,java-junit)
3475 ("java-plexus-classworlds" ,java-plexus-classworlds)
3476 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
3477 ("java-guava" ,java-guava)))
3478 (home-page "http://codehaus-plexus.github.io/modello/")
3479 (synopsis "Framework for code generation from a simple model")
3480 (description "Modello is a framework for code generation from a simple model.
3482 Modello generates code from a simple model format: based on a plugin
3483 architecture, various types of code and descriptors can be generated from the
3484 single model, including Java POJOs, XML/JSON/YAML marshallers/unmarshallers,
3485 XSD and documentation.")
3488 ;; Although this package uses only files licensed under expat,
3489 ;; other parts of the source are licensed under different
3490 ;; licenses. We include them to be inherited by other packages.
3492 ;; Some files in modello-plugin-java are licensed under a
3493 ;; 5-clause BSD license.
3494 (license:non-copyleft
3495 (string-append "file:///modello-plugins/modello-plugin-java/"
3496 "src/main/java/org/codehaus/modello/plugin/"
3497 "java/javasource/JNaming.java"))))))
3499 (define-public java-modello-plugins-java
3501 (inherit java-modello-core)
3502 (name "java-modello-plugins-java")
3504 `(#:jar-name "modello-plugins-java.jar"
3505 #:source-dir "modello-plugins/modello-plugin-java/src/main/java"
3506 #:test-dir "modello-plugins/modello-plugin-java/src/test"
3508 #:tests? #f; requires maven-model, which depends on this package
3510 (modify-phases %standard-phases
3511 (add-before 'build 'copy-resources
3513 (mkdir-p "build/classes")
3514 (copy-recursively "modello-plugins/modello-plugin-java/src/main/resources"
3518 `(("java-modello-core" ,java-modello-core)
3519 ,@(package-inputs java-modello-core)))
3520 (synopsis "Modello Java Plugin")
3521 (description "Modello Java Plugin generates Java objects for the model.")))
3523 (define-public java-modello-plugins-xml
3525 (inherit java-modello-core)
3526 (name "java-modello-plugins-xml")
3528 `(#:jar-name "modello-plugins-xml.jar"
3529 #:source-dir "modello-plugins/modello-plugin-xml/src/main/java"
3530 #:test-dir "modello-plugins/modello-plugin-xml/src/test"
3533 (modify-phases %standard-phases
3534 (add-before 'build 'copy-resources
3536 (mkdir-p "build/classes")
3538 "modello-plugins/modello-plugin-xml/src/main/resources"
3541 (add-before 'check 'fix-paths
3543 (with-directory-excursion "modello-plugins/modello-plugin-xml/src/test"
3545 "java/org/codehaus/modello/plugins/xml/XmlModelloPluginTest.java"
3546 (("src/test") "modello-plugins/modello-plugin-xml/src/test"))))))))
3548 `(("java-modello-core" ,java-modello-core)
3549 ("java-modello-plugins-java" ,java-modello-plugins-java)
3550 ,@(package-inputs java-modello-core)))
3551 (synopsis "Modello XML Plugin")
3552 (description "Modello XML Plugin contains shared code for every plugins
3553 working on XML representation of the model.")))
3555 (define-public java-modello-test
3557 (inherit java-modello-core)
3558 (name "java-modello-test")
3560 `(#:jar-name "modello-test.jar"
3561 #:source-dir "modello-test/src/main/java"
3562 #:tests? #f; no tests
3565 `(("java-plexus-utils" ,java-plexus-utils)
3566 ("java-plexus-compiler-api" ,java-plexus-compiler-api)
3567 ("java-plexus-compiler-javac" ,java-plexus-compiler-javac)
3568 ("java-plexus-container-default" ,java-plexus-container-default)))
3569 (synopsis "Modello test package")
3570 (description "The modello test package contains the basis to create
3571 Modello generator unit-tests, including sample models and xml files to test
3572 every feature for every plugin.")))
3574 (define-public java-modello-plugins-xpp3
3576 (inherit java-modello-core)
3577 (name "java-modello-plugins-xpp3")
3579 `(#:jar-name "modello-plugins-xpp3.jar"
3580 #:source-dir "modello-plugins/modello-plugin-xpp3/src/main/java"
3581 #:test-dir "modello-plugins/modello-plugin-xpp3/src/test"
3582 ;; One of the test dependencies is maven-model which depends on this package.
3586 (modify-phases %standard-phases
3587 (add-before 'build 'copy-resources
3589 (mkdir-p "build/classes")
3590 (copy-recursively "modello-plugins/modello-plugin-xpp3/src/main/resources"
3594 `(("java-modello-core" ,java-modello-core)
3595 ("java-modello-plugins-java" ,java-modello-plugins-java)
3596 ("java-modello-plugins-xml" ,java-modello-plugins-xml)
3597 ,@(package-inputs java-modello-core)))
3599 `(("java-xmlunit" ,java-xmlunit)
3600 ("java-modello-test" ,java-modello-test)
3601 ,@(package-native-inputs java-modello-core)))
3602 (synopsis "Modello XPP3 Plugin")
3603 (description "The modello XPP3 plugin generates XML readers and writers based
3604 on the XPP3 API (XML Pull Parser).")))
3606 (define-public java-asm
3612 (uri (string-append "http://download.forge.ow2.org/asm/"
3613 "asm-" version ".tar.gz"))
3616 "115l5pqblirdkmzi32dxx7gbcm4jy0s14y5wircr6h8jdr9aix00"))))
3617 (build-system ant-build-system)
3619 `(("java-aqute-bndlib" ,java-aqute-bndlib)))
3621 `(#:build-target "compile"
3622 ;; The tests require an old version of Janino, which no longer compiles
3627 ;; We don't need these extra ant tasks, but the build system asks us to
3628 ;; provide a path anyway.
3629 "-Dobjectweb.ant.tasks.path=dummy-path"
3630 ;; The java-aqute.bndlib JAR file will be put onto the classpath and
3631 ;; used during the build automatically by ant-build-system, but
3632 ;; java-asm's build.xml fails unless we provide something here.
3633 "-Dbiz.aQute.bnd.path=dummy-path")
3635 (modify-phases %standard-phases
3636 (add-before 'install 'build-jars
3637 (lambda* (#:key make-flags #:allow-other-keys)
3638 ;; We cannot use the "jar" target because it depends on a couple
3639 ;; of unpackaged, complicated tools.
3641 (zero? (system* "jar"
3642 "-cf" (string-append "dist/asm-" ,version ".jar")
3643 "-C" "output/build/tmp" "."))))
3645 (install-jars "dist")))))
3647 `(("java-junit" ,java-junit)))
3648 (home-page "http://asm.ow2.org/")
3649 (synopsis "Very small and fast Java bytecode manipulation framework")
3650 (description "ASM is an all purpose Java bytecode manipulation and
3651 analysis framework. It can be used to modify existing classes or dynamically
3652 generate classes, directly in binary form. The provided common
3653 transformations and analysis algorithms allow to easily assemble custom
3654 complex transformations and code analysis tools.")
3655 (license license:bsd-3)))
3657 (define-public java-cglib
3664 "https://github.com/cglib/cglib/archive/RELEASE_"
3665 (string-map (lambda (c) (if (char=? c #\.) #\_ c)) version)
3667 (file-name (string-append "cglib-" version ".tar.gz"))
3670 "162dvd4fln76ai8prfharf66pn6r56p3sxx683j5vdyccrd5hi1q"))))
3671 (build-system ant-build-system)
3673 `(;; FIXME: tests fail because junit runs
3674 ;; "net.sf.cglib.transform.AbstractTransformTest", which does not seem
3675 ;; to describe a test at all.
3677 #:jar-name "cglib.jar"
3679 (modify-phases %standard-phases
3680 (add-after 'unpack 'chdir
3681 (lambda _ (chdir "cglib") #t)))))
3683 `(("java-asm" ,java-asm)
3684 ("java-junit" ,java-junit)))
3685 (home-page "https://github.com/cglib/cglib/")
3686 (synopsis "Java byte code generation library")
3687 (description "The byte code generation library CGLIB is a high level API
3688 to generate and transform Java byte code.")
3689 (license license:asl2.0)))
3691 (define-public java-objenesis
3693 (name "java-objenesis")
3697 (uri (string-append "https://github.com/easymock/objenesis/"
3698 "archive/" version ".tar.gz"))
3699 (file-name (string-append "objenesis-" version ".tar.gz"))
3702 "1va5qz1i2wawwavhnxfzxnfgrcaflz9p1pg03irrjh4nd3rz8wh6"))))
3703 (build-system ant-build-system)
3705 `(#:jar-name "objenesis.jar"
3706 #:source-dir "main/src/"
3707 #:test-dir "main/src/test/"))
3709 `(("java-junit" ,java-junit)
3710 ("java-hamcrest-core" ,java-hamcrest-core)))
3711 (home-page "http://objenesis.org/")
3712 (synopsis "Bypass the constructor when creating an object")
3713 (description "Objenesis is a small Java library that serves one purpose:
3714 to instantiate a new object of a particular class. It is common to see
3715 restrictions in libraries stating that classes must require a default
3716 constructor. Objenesis aims to overcome these restrictions by bypassing the
3717 constructor on object instantiation.")
3718 (license license:asl2.0)))
3720 (define-public java-easymock
3722 (name "java-easymock")
3726 (uri (string-append "https://github.com/easymock/easymock/"
3727 "archive/easymock-" version ".tar.gz"))
3730 "1yzg0kv256ndr57gpav46cyv4a1ns5sj722l50zpxk3j6sk9hnmi"))))
3731 (build-system ant-build-system)
3733 `(#:jar-name "easymock.jar"
3734 #:source-dir "core/src/main"
3735 #:test-dir "core/src/test"
3737 (modify-phases %standard-phases
3738 ;; FIXME: Android support requires the following packages to be
3739 ;; available: com.google.dexmaker.stock.ProxyBuilder
3740 (add-after 'unpack 'delete-android-support
3742 (with-directory-excursion "core/src/main/java/org/easymock/internal"
3743 (substitute* "MocksControl.java"
3744 (("AndroidSupport.isAndroid\\(\\)") "false")
3745 (("return classProxyFactory = new AndroidClassProxyFactory\\(\\);") ""))
3746 (delete-file "AndroidClassProxyFactory.java"))
3748 (add-after 'unpack 'delete-broken-tests
3750 (with-directory-excursion "core/src/test/java/org/easymock"
3751 ;; This test depends on dexmaker.
3752 (delete-file "tests2/ClassExtensionHelperTest.java")
3754 ;; This is not a test.
3755 (delete-file "tests/BaseEasyMockRunnerTest.java")
3757 ;; This test should be executed with a different runner...
3758 (delete-file "tests2/EasyMockAnnotationsTest.java")
3759 ;; ...but deleting it means that we also have to delete these
3761 (delete-file "tests2/EasyMockRunnerTest.java")
3762 (delete-file "tests2/EasyMockRuleTest.java")
3764 ;; This test fails because the file "easymock.properties" does
3766 (delete-file "tests2/EasyMockPropertiesTest.java"))
3769 `(("java-asm" ,java-asm)
3770 ("java-cglib" ,java-cglib)
3771 ("java-objenesis" ,java-objenesis)))
3773 `(("java-junit" ,java-junit)
3774 ("java-hamcrest-core" ,java-hamcrest-core)))
3775 (home-page "http://easymock.org")
3776 (synopsis "Java library providing mock objects for unit tests")
3777 (description "EasyMock is a Java library that provides an easy way to use
3778 mock objects in unit testing.")
3779 (license license:asl2.0)))
3781 (define-public java-jmock-1
3787 (uri (string-append "https://github.com/jmock-developers/"
3788 "jmock-library/archive/" version ".tar.gz"))
3789 (file-name (string-append "jmock-" version ".tar.gz"))
3792 "0xmrlhq0fszldkbv281k9463mv496143vvmqwpxp62yzjvdkx9w0"))))
3793 (build-system ant-build-system)
3795 `(#:build-target "jars"
3796 #:test-target "run.tests"
3798 (modify-phases %standard-phases
3799 (replace 'install (install-jars "build")))))
3800 (home-page "http://www.jmock.org")
3801 (synopsis "Mock object library for test-driven development")
3802 (description "JMock is a library that supports test-driven development of
3803 Java code with mock objects. Mock objects help you design and test the
3804 interactions between the objects in your programs.
3809 @item makes it quick and easy to define mock objects
3810 @item lets you precisely specify the interactions between
3811 your objects, reducing the brittleness of your tests
3812 @item plugs into your favourite test framework
3813 @item is easy to extend.
3815 (license license:bsd-3)))
3817 (define-public java-jmock
3819 (inherit java-jmock-1)
3824 (uri (string-append "https://github.com/jmock-developers/"
3825 "jmock-library/archive/" version ".tar.gz"))
3826 (file-name (string-append name "-" version ".tar.gz"))
3829 "18650a9g8xffcsdb6w91pbswa7f40fp2sh6s3nclkclz5dbzq8f0"))))
3831 `(("java-hamcrest-all" ,java-hamcrest-all)
3832 ("java-asm" ,java-asm)
3833 ("java-bsh" ,java-bsh)
3834 ("java-junit" ,java-junit)))
3836 `(("cglib" ,java-cglib)))
3838 `(#:jar-name "java-jmock.jar"
3839 #:source-dir "jmock/src/main/java"
3840 #:test-dir "jmock/src/test"))))
3842 (define-public java-jmock-junit4
3844 (inherit java-jmock)
3845 (name "java-jmock-junit4")
3847 `(#:jar-name "java-jmock-junit4.jar"
3848 #:source-dir "jmock-junit4/src/main/java"
3849 #:test-dir "jmock-junit4/src/test"))
3851 `(("java-hamcrest-all" ,java-hamcrest-all)
3852 ("java-asm" ,java-asm)
3853 ("java-bsh" ,java-bsh)
3854 ("java-jmock" ,java-jmock)
3855 ("java-jumit" ,java-junit)))))
3857 (define-public java-jmock-legacy
3859 (inherit java-jmock)
3860 (name "java-jmock-legacy")
3862 `(#:jar-name "java-jmock-legacy.jar"
3863 #:source-dir "jmock-legacy/src/main/java"
3864 #:test-dir "jmock-legacy/src/test"
3866 (modify-phases %standard-phases
3867 (add-before 'check 'copy-tests
3869 ;; This file is a dependancy of some tests
3870 (let ((file "org/jmock/test/acceptance/PackageProtectedType.java"))
3871 (copy-file (string-append "jmock/src/test/java/" file)
3872 (string-append "jmock-legacy/src/test/java/" file))
3875 `(("java-hamcrest-all" ,java-hamcrest-all)
3876 ("java-objenesis" ,java-objenesis)
3877 ("java-cglib" ,java-cglib)
3878 ("java-jmock" ,java-jmock)
3879 ("java-asm" ,java-asm)
3880 ("java-bsh" ,java-bsh)
3881 ("java-junit" ,java-junit)))
3883 `(("java-jmock-junit4" ,java-jmock-junit4)))))
3885 (define-public java-hamcrest-all
3886 (package (inherit java-hamcrest-core)
3887 (name "java-hamcrest-all")
3890 ,@(substitute-keyword-arguments (package-arguments java-hamcrest-core)
3891 ((#:build-target _) "bigjar")
3893 `(modify-phases ,phases
3894 ;; Some build targets override the classpath, so we need to patch
3895 ;; the build.xml to ensure that required dependencies are on the
3897 (add-after 'unpack 'patch-classpath-for-integration
3898 (lambda* (#:key inputs #:allow-other-keys)
3899 (substitute* "build.xml"
3900 ((" build/hamcrest-library-\\$\\{version\\}.jar" line)
3904 (find-files (assoc-ref inputs "java-junit") "\\.jar$")
3905 (find-files (assoc-ref inputs "java-jmock") "\\.jar$")
3906 (find-files (assoc-ref inputs "java-easymock") "\\.jar$")))
3910 `(("java-junit" ,java-junit)
3911 ("java-jmock" ,java-jmock-1)
3912 ("java-easymock" ,java-easymock)
3913 ,@(package-inputs java-hamcrest-core)))))
3915 (define-public java-jopt-simple
3917 (name "java-jopt-simple")
3921 (uri (string-append "http://repo1.maven.org/maven2/"
3922 "net/sf/jopt-simple/jopt-simple/"
3923 version "/jopt-simple-"
3924 version "-sources.jar"))
3927 "1v8bzmwmw6qq20gm42xyay6vrd567dra4vqwhgjnqqjz1gs9f8qa"))))
3928 (build-system ant-build-system)
3930 `(#:tests? #f ; there are no tests
3931 #:jar-name "jopt-simple.jar"))
3932 (home-page "https://pholser.github.io/jopt-simple/")
3933 (synopsis "Java library for parsing command line options")
3934 (description "JOpt Simple is a Java library for parsing command line
3935 options, such as those you might pass to an invocation of @code{javac}. In
3936 the interest of striving for simplicity, as closely as possible JOpt Simple
3937 attempts to honor the command line option syntaxes of POSIX @code{getopt} and
3938 GNU @code{getopt_long}. It also aims to make option parser configuration and
3939 retrieval of options and their arguments simple and expressive, without being
3941 (license license:expat)))
3943 (define-public java-commons-math3
3945 (name "java-commons-math3")
3949 (uri (string-append "mirror://apache/commons/math/source/"
3950 "commons-math3-" version "-src.tar.gz"))
3953 "19l6yp44qc5g7wg816nbn5z3zq3xxzwimvbm4a8pczgvpi4i85s6"))))
3954 (build-system ant-build-system)
3956 `(#:build-target "jar"
3957 #:test-target "test"
3959 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
3960 (junit (assoc-ref %build-inputs "java-junit")))
3961 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
3962 (string-append "-Dhamcrest.jar=" hamcrest
3963 "/share/java/hamcrest-core.jar")))
3965 (modify-phases %standard-phases
3966 ;; We want to build the jar in the build phase and run the tests
3967 ;; later in a separate phase.
3968 (add-after 'unpack 'untangle-targets
3970 (substitute* "build.xml"
3971 (("name=\"jar\" depends=\"test\"")
3972 "name=\"jar\" depends=\"compile\""))
3974 ;; There is no install target.
3976 (install-jars "target")))))
3978 `(("java-junit" ,java-junit)
3979 ("java-hamcrest-core" ,java-hamcrest-core)))
3980 (home-page "http://commons.apache.org/math/")
3981 (synopsis "Apache Commons mathematics library")
3982 (description "Commons Math is a library of lightweight, self-contained
3983 mathematics and statistics components addressing the most common problems not
3984 available in the Java programming language or Commons Lang.")
3985 (license license:asl2.0)))
3987 (define-public java-jmh
3994 (url "http://hg.openjdk.java.net/code-tools/jmh/")
3995 (changeset version)))
3996 (file-name (string-append name "-" version "-checkout"))
3999 "1fxyxhg9famwcg1prc4cgwb5wzyxqavn3cjm5vz8605xz7x5k084"))))
4000 (build-system ant-build-system)
4002 `(#:jar-name "jmh-core.jar"
4003 #:source-dir "jmh-core/src/main"
4004 #:test-dir "jmh-core/src/test"
4006 (modify-phases %standard-phases
4007 ;; This seems to be a bug in the JDK. It may not be necessary in
4008 ;; future versions of the JDK.
4009 (add-after 'unpack 'fix-bug
4011 (with-directory-excursion
4012 "jmh-core/src/main/java/org/openjdk/jmh/runner/options"
4013 (substitute* '("IntegerValueConverter.java"
4014 "ThreadsValueConverter.java")
4015 (("public Class<Integer> valueType")
4016 "public Class<? extends Integer> valueType")))
4019 `(("java-jopt-simple" ,java-jopt-simple)
4020 ("java-commons-math3" ,java-commons-math3)))
4022 `(("java-junit" ,java-junit)
4023 ("java-hamcrest-core" ,java-hamcrest-core)))
4024 (home-page "http://openjdk.java.net/projects/code-tools/jmh/")
4025 (synopsis "Benchmark harness for the JVM")
4026 (description "JMH is a Java harness for building, running, and analysing
4027 nano/micro/milli/macro benchmarks written in Java and other languages
4028 targeting the JVM.")
4030 (license license:gpl2)))
4032 (define-public java-commons-collections4
4034 (name "java-commons-collections4")
4038 (uri (string-append "mirror://apache/commons/collections/source/"
4039 "commons-collections4-" version "-src.tar.gz"))
4042 "1krfhvggympq4avk7gh6qafzf6b9ip6r1m4lmacikyx04039m0wl"))))
4043 (build-system ant-build-system)
4045 `(#:test-target "test"
4047 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
4048 (junit (assoc-ref %build-inputs "java-junit"))
4049 (easymock (assoc-ref %build-inputs "java-easymock")))
4050 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
4051 (string-append "-Dhamcrest.jar=" hamcrest
4052 "/share/java/hamcrest-core.jar")
4053 (string-append "-Deasymock.jar=" easymock
4054 "/share/java/easymock.jar")))
4056 (modify-phases %standard-phases
4058 (install-jars "target")))))
4060 `(("java-junit" ,java-junit)
4061 ("java-hamcrest-core" ,java-hamcrest-core)
4062 ("java-easymock" ,java-easymock)))
4063 (home-page "http://commons.apache.org/collections/")
4064 (synopsis "Collections framework")
4065 (description "The Java Collections Framework is the recognised standard
4066 for collection handling in Java. Commons-Collections seek to build upon the
4067 JDK classes by providing new interfaces, implementations and utilities. There
4068 are many features, including:
4071 @item @code{Bag} interface for collections that have a number of copies of
4073 @item @code{BidiMap} interface for maps that can be looked up from value to
4074 key as well and key to value
4075 @item @code{MapIterator} interface to provide simple and quick iteration over
4077 @item Transforming decorators that alter each object as it is added to the
4079 @item Composite collections that make multiple collections look like one
4080 @item Ordered maps and sets that retain the order elements are added in,
4081 including an LRU based map
4082 @item Reference map that allows keys and/or values to be garbage collected
4084 @item Many comparator implementations
4085 @item Many iterator implementations
4086 @item Adapter classes from array and enumerations to collections
4087 @item Utilities to test or create typical set-theory properties of collections
4088 such as union, intersection, and closure.
4090 (license license:asl2.0)))
4092 (define-public java-commons-collections
4094 (inherit java-commons-collections4)
4095 (name "java-commons-collections")
4099 (uri (string-append "mirror://apache/commons/collections/source/"
4100 "commons-collections-" version "-src.tar.gz"))
4103 "055r51a5lfc3z7rkxnxmnn1npvkvda7636hjpm4qk7cnfzz98387"))))
4105 (substitute-keyword-arguments (package-arguments java-commons-collections4)
4107 `(modify-phases ,phases
4108 ;; The manifest is required by the build procedure
4109 (add-before 'build 'add-manifest
4111 (mkdir-p "build/conf")
4112 (call-with-output-file "build/conf/MANIFEST.MF"
4114 (format file "Manifest-Version: 1.0\n")))))
4116 (install-jars "build"))))))))
4118 (define java-commons-collections-test-classes
4120 (inherit java-commons-collections)
4122 `(#:jar-name "commons-collections-test-classes.jar"
4123 #:source-dir "src/test"
4126 `(("collection" ,java-commons-collections)))))
4128 (define-public java-commons-beanutils
4130 (name "java-commons-beanutils")
4134 (uri (string-append "mirror://apache/commons/beanutils/source/"
4135 "commons-beanutils-" version "-src.tar.gz"))
4138 "03cs0bq3sl1sdc7py9g3qnf8n9h473nrkvd3d251kaqv6a2ab7qk"))))
4139 (build-system ant-build-system)
4141 `(#:test-target "test"
4144 (modify-phases %standard-phases
4146 (lambda* (#:key outputs #:allow-other-keys)
4147 (rename-file (string-append "dist/commons-beanutils-" ,version
4149 "commons-beanutils.jar")
4150 (install-file "commons-beanutils.jar"
4151 (string-append (assoc-ref outputs "out") "/share/java/"))
4154 `(("logging" ,java-commons-logging-minimal)
4155 ("collections" ,java-commons-collections)))
4157 `(("junit" ,java-junit)
4158 ("collections-test" ,java-commons-collections-test-classes)))
4159 (home-page "http://commons.apache.org/beanutils/")
4160 (synopsis "Dynamically set or get properties in Java")
4161 (description "BeanUtils provides a simplified interface to reflection and
4162 introspection to set or get dynamically determined properties through their
4163 setter and getter method.")
4164 (license license:asl2.0)))
4166 (define-public java-commons-io
4168 (name "java-commons-io")
4173 (uri (string-append "mirror://apache/commons/io/source/"
4174 "commons-io-" version "-src.tar.gz"))
4177 "0q5y41jrcjvx9hzs47x5kdhnasdy6rm4bzqd2jxl02w717m7a7v3"))))
4178 (build-system ant-build-system)
4179 (outputs '("out" "doc"))
4181 `(#:test-target "test"
4183 (list (string-append "-Djunit.jar="
4184 (assoc-ref %build-inputs "java-junit")
4185 "/share/java/junit.jar"))
4187 (modify-phases %standard-phases
4188 (add-after 'build 'build-javadoc ant-build-javadoc)
4189 (replace 'install (install-jars "target"))
4190 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
4192 `(("java-junit" ,java-junit)
4193 ("java-hamcrest-core" ,java-hamcrest-core)))
4194 (home-page "http://commons.apache.org/io/")
4195 (synopsis "Common useful IO related classes")
4196 (description "Commons-IO contains utility classes, stream implementations,
4197 file filters and endian classes.")
4198 (license license:asl2.0)))
4200 (define-public java-commons-lang
4202 (name "java-commons-lang")
4207 (uri (string-append "mirror://apache/commons/lang/source/"
4208 "commons-lang-" version "-src.tar.gz"))
4210 (base32 "1mxwagqadzx1b2al7i0z1v0r235aj2njdyijf02szq0vhmqrfiq5"))))
4211 (build-system ant-build-system)
4212 (outputs '("out" "doc"))
4214 `(#:test-target "test"
4215 #:test-exclude (list "**/Abstract*.java" "**/Random*.java")
4217 (modify-phases %standard-phases
4218 (add-after 'build 'build-javadoc ant-build-javadoc)
4219 (add-before 'check 'disable-failing-test
4221 ;; Disable a failing test
4222 (substitute* "src/test/java/org/apache/commons/lang/\
4223 time/FastDateFormatTest.java"
4224 (("public void testFormat\\(\\)")
4225 "public void disabled_testFormat()"))
4227 (replace 'install (install-jars "target"))
4228 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
4230 `(("java-junit" ,java-junit)))
4231 (home-page "http://commons.apache.org/lang/")
4232 (synopsis "Extension of the java.lang package")
4233 (description "The Commons Lang components contains a set of Java classes
4234 that provide helper methods for standard Java classes, especially those found
4235 in the @code{java.lang} package in the Sun JDK. The following classes are
4239 @item StringUtils - Helper for @code{java.lang.String}.
4240 @item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets
4241 of characters such as @code{[a-z]} and @code{[abcdez]}.
4242 @item RandomStringUtils - Helper for creating randomised strings.
4243 @item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
4244 @item NumberRange - A range of numbers with an upper and lower bound.
4245 @item ObjectUtils - Helper for @code{java.lang.Object}.
4246 @item SerializationUtils - Helper for serializing objects.
4247 @item SystemUtils - Utility class defining the Java system properties.
4248 @item NestedException package - A sub-package for the creation of nested
4250 @item Enum package - A sub-package for the creation of enumerated types.
4251 @item Builder package - A sub-package for the creation of @code{equals},
4252 @code{hashCode}, @code{compareTo} and @code{toString} methods.
4254 (license license:asl2.0)))
4256 (define-public java-commons-lang3
4258 (name "java-commons-lang3")
4263 (uri (string-append "mirror://apache/commons/lang/source/"
4264 "commons-lang3-" version "-src.tar.gz"))
4266 (base32 "0xpshb9spjhplq5a7mr0y1bgfw8190ik4xj8f569xidfcki1d6kg"))))
4267 (build-system ant-build-system)
4268 (outputs '("out" "doc"))
4270 `(#:test-target "test"
4272 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-all"))
4273 (junit (assoc-ref %build-inputs "java-junit"))
4274 (easymock (assoc-ref %build-inputs "java-easymock"))
4275 (io (assoc-ref %build-inputs "java-commons-io")))
4276 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
4277 (string-append "-Dhamcrest.jar=" hamcrest
4278 "/share/java/hamcrest-all.jar")
4279 (string-append "-Dcommons-io.jar=" io
4280 "/share/java/commons-io-"
4281 ,(package-version java-commons-io)
4283 (string-append "-Deasymock.jar=" easymock
4284 "/share/java/easymock.jar")))
4286 (modify-phases %standard-phases
4287 (add-after 'build 'build-javadoc ant-build-javadoc)
4288 (replace 'install (install-jars "target"))
4289 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
4291 `(("java-junit" ,java-junit)
4292 ("java-commons-io" ,java-commons-io)
4293 ("java-hamcrest-all" ,java-hamcrest-all)
4294 ("java-easymock" ,java-easymock)))
4295 (home-page "http://commons.apache.org/lang/")
4296 (synopsis "Extension of the java.lang package")
4297 (description "The Commons Lang components contains a set of Java classes
4298 that provide helper methods for standard Java classes, especially those found
4299 in the @code{java.lang} package. The following classes are included:
4302 @item StringUtils - Helper for @code{java.lang.String}.
4303 @item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets of
4304 characters such as @code{[a-z]} and @code{[abcdez]}.
4305 @item RandomStringUtils - Helper for creating randomised strings.
4306 @item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
4307 @item NumberRange - A range of numbers with an upper and lower bound.
4308 @item ObjectUtils - Helper for @code{java.lang.Object}.
4309 @item SerializationUtils - Helper for serializing objects.
4310 @item SystemUtils - Utility class defining the Java system properties.
4311 @item NestedException package - A sub-package for the creation of nested
4313 @item Enum package - A sub-package for the creation of enumerated types.
4314 @item Builder package - A sub-package for the creation of @code{equals},
4315 @code{hashCode}, @code{compareTo} and @code{toString} methods.
4317 (license license:asl2.0)))
4319 (define-public java-jsr305
4321 (name "java-jsr305")
4325 (uri (string-append "https://repo1.maven.org/maven2/"
4326 "com/google/code/findbugs/"
4327 "jsr305/" version "/jsr305-"
4328 version "-sources.jar"))
4331 "1rh6jin9v7jqpq3kf1swl868l8i94r636n03pzpsmgr8v0lh9j2n"))))
4332 (build-system ant-build-system)
4334 `(#:tests? #f ; no tests included
4335 #:jar-name "jsr305.jar"))
4336 (home-page "http://findbugs.sourceforge.net/")
4337 (synopsis "Annotations for the static analyzer called findbugs")
4338 (description "This package provides annotations for the findbugs package.
4339 It provides packages in the @code{javax.annotations} namespace.")
4340 (license license:asl2.0)))
4342 (define-public java-guava
4345 ;; This is the last release of Guava that can be built with Java 7.
4349 (uri (string-append "https://github.com/google/guava/"
4350 "releases/download/v" version
4351 "/guava-" version "-sources.jar"))
4354 "1gawrs5gi6j5hcfxdgpnfli75vb9pfi4sn09pnc8xacr669yajwr"))))
4355 (build-system ant-build-system)
4357 `(#:tests? #f ; no tests included
4358 #:jar-name "guava.jar"
4360 (modify-phases %standard-phases
4361 (add-after 'unpack 'trim-sources
4363 (with-directory-excursion "src/com/google/common"
4364 ;; Remove annotations to avoid extra dependencies:
4365 ;; * "j2objc" annotations are used when converting Java to
4367 ;; * "errorprone" annotations catch common Java mistakes at
4369 ;; * "IgnoreJRERequirement" is used for Android.
4370 (substitute* (find-files "." "\\.java$")
4371 (("import com.google.j2objc.*") "")
4372 (("import com.google.errorprone.annotation.*") "")
4373 (("import org.codehaus.mojo.animal_sniffer.*") "")
4374 (("@CanIgnoreReturnValue") "")
4377 (("@RetainedWith") "")
4379 (("@ForOverride") "")
4380 (("@J2ObjCIncompatible") "")
4381 (("@IgnoreJRERequirement") "")))
4384 `(("java-jsr305" ,java-jsr305)))
4385 (home-page "https://github.com/google/guava")
4386 (synopsis "Google core libraries for Java")
4387 (description "Guava is a set of core libraries that includes new
4388 collection types (such as multimap and multiset), immutable collections, a
4389 graph library, functional types, an in-memory cache, and APIs/utilities for
4390 concurrency, I/O, hashing, primitives, reflection, string processing, and much
4392 (license license:asl2.0)))
4394 ;; The java-commons-logging package provides adapters to many different
4395 ;; logging frameworks. To avoid an excessive dependency graph we try to build
4396 ;; it with only a minimal set of adapters.
4397 (define-public java-commons-logging-minimal
4399 (name "java-commons-logging-minimal")
4403 (uri (string-append "mirror://apache/commons/logging/source/"
4404 "commons-logging-" version "-src.tar.gz"))
4407 "10bwcy5w8d7y39n0krlwhnp8ds3kj5zhmzj0zxnkw0qdlsjmsrj9"))))
4408 (build-system ant-build-system)
4410 `(#:tests? #f ; avoid dependency on logging frameworks
4411 #:jar-name "commons-logging-minimal.jar"
4413 (modify-phases %standard-phases
4414 (add-after 'unpack 'delete-adapters-and-tests
4416 ;; Delete all adapters except for NoOpLog, SimpleLog, and
4417 ;; LogFactoryImpl. NoOpLog is required to build; LogFactoryImpl
4418 ;; is used by applications; SimpleLog is the only actually usable
4419 ;; implementation that does not depend on another logging
4423 (delete-file (string-append
4424 "src/main/java/org/apache/commons/logging/impl/" file)))
4425 (list "Jdk13LumberjackLogger.java"
4426 "WeakHashtable.java"
4428 "ServletContextCleaner.java"
4431 "LogKitLogger.java"))
4432 (delete-file-recursively "src/test")
4434 (home-page "http://commons.apache.org/logging/")
4435 (synopsis "Common API for logging implementations")
4436 (description "The Logging package is a thin bridge between different
4437 logging implementations. A library that uses the commons-logging API can be
4438 used with any logging implementation at runtime.")
4439 (license license:asl2.0)))
4441 ;; This is the last release of the 1.x series.
4442 (define-public java-mockito-1
4444 (name "java-mockito")
4448 (uri (string-append "http://repo1.maven.org/maven2/"
4449 "org/mockito/mockito-core/" version
4450 "/mockito-core-" version "-sources.jar"))
4453 "0vmiwnwpf83g2q7kj1rislmja8fpvqkixjhawh7nxnygx6pq11kc"))))
4454 (build-system ant-build-system)
4456 `(#:jar-name "mockito.jar"
4457 #:tests? #f ; no tests included
4458 ;; FIXME: patch-and-repack does not support jars, so we have to apply
4459 ;; patches in build phases.
4461 (modify-phases %standard-phases
4462 ;; Mockito was developed against a different version of hamcrest,
4463 ;; which does not require matcher implementations to provide an
4464 ;; implementation of the "describeMismatch" method. We add this
4465 ;; simple definition to pass the build with our version of hamcrest.
4466 (add-after 'unpack 'fix-hamcrest-build-error
4468 (substitute* "src/org/mockito/internal/matchers/LocalizedMatcher.java"
4469 (("public Matcher getActualMatcher\\(\\) .*" line)
4471 public void describeMismatch(Object item, Description description) {
4472 actualMatcher.describeMismatch(item, description);
4476 ;; Mockito bundles cglib. We have a cglib package, so let's use
4478 (add-after 'unpack 'use-system-libraries
4480 (with-directory-excursion "src/org/mockito/internal/creation/cglib"
4481 (substitute* '("CGLIBHacker.java"
4482 "CglibMockMaker.java"
4483 "ClassImposterizer.java"
4484 "DelegatingMockitoMethodProxy.java"
4485 "MethodInterceptorFilter.java"
4486 "MockitoNamingPolicy.java"
4487 "SerializableMockitoMethodProxy.java"
4488 "SerializableNoOp.java")
4489 (("import org.mockito.cglib") "import net.sf.cglib")))
4492 `(("java-junit" ,java-junit)
4493 ("java-objenesis" ,java-objenesis)
4494 ("java-cglib" ,java-cglib)
4495 ("java-hamcrest-core" ,java-hamcrest-core)))
4496 (home-page "http://mockito.org")
4497 (synopsis "Mockito is a mock library for Java")
4498 (description "Mockito is a mocking library for Java which lets you write
4499 tests with a clean and simple API. It generates mocks using reflection, and
4500 it records all mock invocations, including methods arguments.")
4501 (license license:asl2.0)))
4503 (define-public java-httpcomponents-httpcore
4505 (name "java-httpcomponents-httpcore")
4509 (uri (string-append "mirror://apache//httpcomponents/httpcore/"
4510 "source/httpcomponents-core-"
4511 version "-src.tar.gz"))
4514 "02bwcf38y4vgwq7kj2s6q7qrmma641r5lacivm16kgxvb2j6h1vy"))))
4515 (build-system ant-build-system)
4517 `(#:jar-name "httpcomponents-httpcore.jar"
4519 (modify-phases %standard-phases
4520 (add-after 'unpack 'chdir
4521 (lambda _ (chdir "httpcore") #t)))))
4523 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)
4524 ("java-commons-lang3" ,java-commons-lang3)))
4526 `(("java-junit" ,java-junit)
4527 ("java-mockito" ,java-mockito-1)))
4528 (home-page "https://hc.apache.org/httpcomponents-core-4.4.x/index.html")
4529 (synopsis "Low level HTTP transport components")
4530 (description "HttpCore is a set of low level HTTP transport components
4531 that can be used to build custom client and server side HTTP services with a
4532 minimal footprint. HttpCore supports two I/O models: blocking I/O model based
4533 on the classic Java I/O and non-blocking, event driven I/O model based on Java
4536 This package provides the blocking I/O model library.")
4537 (license license:asl2.0)))
4539 (define-public java-httpcomponents-httpcore-nio
4540 (package (inherit java-httpcomponents-httpcore)
4541 (name "java-httpcomponents-httpcore-nio")
4543 `(#:jar-name "httpcomponents-httpcore-nio.jar"
4545 (modify-phases %standard-phases
4546 (add-after 'unpack 'chdir
4547 (lambda _ (chdir "httpcore-nio") #t)))))
4549 `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
4550 ("java-hamcrest-core" ,java-hamcrest-core)
4551 ,@(package-inputs java-httpcomponents-httpcore)))
4552 (description "HttpCore is a set of low level HTTP transport components
4553 that can be used to build custom client and server side HTTP services with a
4554 minimal footprint. HttpCore supports two I/O models: blocking I/O model based
4555 on the classic Java I/O and non-blocking, event driven I/O model based on Java
4558 This package provides the non-blocking I/O model library based on Java
4561 (define-public java-httpcomponents-httpcore-ab
4562 (package (inherit java-httpcomponents-httpcore)
4563 (name "java-httpcomponents-httpcore-ab")
4565 `(#:jar-name "httpcomponents-httpcore-ab.jar"
4567 (modify-phases %standard-phases
4568 (add-after 'unpack 'chdir
4569 (lambda _ (chdir "httpcore-ab") #t)))))
4571 `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
4572 ("java-commons-cli" ,java-commons-cli)
4573 ("java-hamcrest-core" ,java-hamcrest-core)
4574 ,@(package-inputs java-httpcomponents-httpcore)))
4575 (synopsis "Apache HttpCore benchmarking tool")
4576 (description "This package provides the HttpCore benchmarking tool. It is
4577 an Apache AB clone based on HttpCore.")))
4579 (define-public java-httpcomponents-httpclient
4581 (name "java-httpcomponents-httpclient")
4585 (uri (string-append "mirror://apache/httpcomponents/httpclient/"
4586 "source/httpcomponents-client-"
4587 version "-src.tar.gz"))
4590 "1428399s7qy3cim5wc6f3ks4gl9nf9vkjpfmnlap3jflif7g2pj1"))))
4591 (build-system ant-build-system)
4593 `(#:jar-name "httpcomponents-httpclient.jar"
4595 (modify-phases %standard-phases
4596 (add-after 'unpack 'chdir
4597 (lambda _ (chdir "httpclient") #t)))))
4599 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)
4600 ("java-commons-codec" ,java-commons-codec)
4601 ("java-hamcrest-core" ,java-hamcrest-core)
4602 ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
4603 ("java-mockito" ,java-mockito-1)
4604 ("java-junit" ,java-junit)))
4605 (home-page "https://hc.apache.org/httpcomponents-client-ga/")
4606 (synopsis "HTTP client library for Java")
4607 (description "Although the @code{java.net} package provides basic
4608 functionality for accessing resources via HTTP, it doesn't provide the full
4609 flexibility or functionality needed by many applications. @code{HttpClient}
4610 seeks to fill this void by providing an efficient, up-to-date, and
4611 feature-rich package implementing the client side of the most recent HTTP
4612 standards and recommendations.")
4613 (license license:asl2.0)))
4615 (define-public java-httpcomponents-httpmime
4616 (package (inherit java-httpcomponents-httpclient)
4617 (name "java-httpcomponents-httpmime")
4619 `(#:jar-name "httpcomponents-httpmime.jar"
4621 (modify-phases %standard-phases
4622 (add-after 'unpack 'chdir
4623 (lambda _ (chdir "httpmime") #t)))))
4625 `(("java-httpcomponents-httpclient" ,java-httpcomponents-httpclient)
4626 ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
4627 ("java-junit" ,java-junit)
4628 ("java-hamcrest-core" ,java-hamcrest-core)))))
4630 (define-public java-commons-net
4632 (name "java-commons-net")
4636 (uri (string-append "mirror://apache/commons/net/source/"
4637 "commons-net-" version "-src.tar.gz"))
4640 "0n0cmnddk9qdqhjvka8pc6hd9mn2qi3166f1s6xk32h7rfy1adxr"))))
4641 (build-system ant-build-system)
4643 `(;; FIXME: MainTest.java tries to read "examples.properties" (which
4644 ;; should be "resources/examples/examples.properties"), but gets "null"
4647 #:jar-name "commons-net.jar"))
4649 `(("java-junit" ,java-junit)
4650 ("java-hamcrest-core" ,java-hamcrest-core)))
4651 (home-page "http://commons.apache.org/net/")
4652 (synopsis "Client library for many basic Internet protocols")
4653 (description "The Apache Commons Net library implements the client side of
4654 many basic Internet protocols. The purpose of the library is to provide
4655 fundamental protocol access, not higher-level abstractions.")
4656 (license license:asl2.0)))
4658 (define-public java-jsch
4664 (uri (string-append "mirror://sourceforge/jsch/jsch/"
4665 version "/jsch-" version ".zip"))
4668 "029rdddyq1mh3ghryh3ki99kba1xkf1d1swjv2vi6lk6zzjy2wdb"))))
4669 (build-system ant-build-system)
4671 `(#:build-target "dist"
4672 #:tests? #f ; no tests included
4674 (modify-phases %standard-phases
4675 (replace 'install (install-jars "dist")))))
4677 `(("unzip" ,unzip)))
4678 (home-page "http://www.jcraft.com/jsch/")
4679 (synopsis "Pure Java implementation of SSH2")
4680 (description "JSch is a pure Java implementation of SSH2. JSch allows you
4681 to connect to an SSH server and use port forwarding, X11 forwarding, file
4682 transfer, etc., and you can integrate its functionality into your own Java
4684 (license license:bsd-3)))
4686 (define-public java-commons-compress
4688 (name "java-commons-compress")
4692 (uri (string-append "mirror://apache/commons/compress/source/"
4693 "commons-compress-" version "-src.tar.gz"))
4696 "1vjqvavrn0babffn1kciz6v52ibwq2vwhzlb95hazis3lgllnxc8"))))
4697 (build-system ant-build-system)
4699 `(#:jar-name "commons-compress.jar"
4701 (modify-phases %standard-phases
4702 (add-after 'unpack 'delete-bad-tests
4704 (with-directory-excursion "src/test/java/org/apache/commons/compress/"
4705 ;; FIXME: These tests really should not fail. Maybe they are
4706 ;; indicative of problems with our Java packaging work.
4708 ;; This test fails with a null pointer exception.
4709 (delete-file "archivers/sevenz/SevenZOutputFileTest.java")
4710 ;; This test fails to open test resources.
4711 (delete-file "archivers/zip/ExplodeSupportTest.java")
4713 ;; FIXME: This test adds a dependency on powermock, which is hard to
4714 ;; package at this point.
4715 ;; https://github.com/powermock/powermock
4716 (delete-file "archivers/sevenz/SevenZNativeHeapTest.java"))
4719 `(("java-junit" ,java-junit)
4720 ("java-hamcrest-core" ,java-hamcrest-core)
4721 ("java-mockito" ,java-mockito-1)
4722 ("java-xz" ,java-xz)))
4723 (home-page "https://commons.apache.org/proper/commons-compress/")
4724 (synopsis "Java library for working with compressed files")
4725 (description "The Apache Commons Compress library defines an API for
4726 working with compressed files such as ar, cpio, Unix dump, tar, zip, gzip, XZ,
4727 Pack200, bzip2, 7z, arj, lzma, snappy, DEFLATE, lz4 and Z files.")
4728 (license license:asl2.0)))
4730 (define-public java-commons-csv
4732 (name "java-commons-csv")
4736 (uri (string-append "mirror://apache/commons/csv/source/"
4737 "commons-csv-" version "-src.tar.gz"))
4740 "1l89m0fm2s3xx3v3iynvangymfg2vlyngaj6fgsi457nmsw7m7ij"))))
4741 (build-system ant-build-system)
4743 `(#:jar-name "commons-csv.jar"
4744 #:source-dir "src/main/java"
4745 #:tests? #f)); FIXME: requires java-h2
4747 `(("java-hamcrest-core" ,java-hamcrest-core)
4748 ("java-commons-io" ,java-commons-io)
4749 ("java-commons-lang3" ,java-commons-lang3)
4750 ("junit" ,java-junit)))
4751 (home-page "https://commons.apache.org/proper/commons-csv/")
4752 (synopsis "Read and write CSV documents")
4753 (description "Commons CSV reads and writes files in variations of the Comma
4754 Separated Value (CSV) format. The most common CSV formats are predefined in the
4758 @item Microsoft Excel
4759 @item Informix UNLOAD
4760 @item Informix UNLOAD CSV
4766 Custom formats can be created using a fluent style API.")
4767 (license license:asl2.0)))
4769 (define-public java-osgi-annotation
4771 (name "java-osgi-annotation")
4775 (uri (string-append "https://repo1.maven.org/maven2/"
4776 "org/osgi/org.osgi.annotation/" version "/"
4777 "org.osgi.annotation-" version "-sources.jar"))
4780 "1q718mb7gqg726rh6pc2hcisn8v50nv35abbir0jypmffhiii85w"))))
4781 (build-system ant-build-system)
4783 `(#:tests? #f ; no tests
4784 #:jar-name "osgi-annotation.jar"))
4785 (home-page "https://www.osgi.org")
4786 (synopsis "Annotation module of OSGi framework")
4788 "OSGi, for Open Services Gateway initiative framework, is a module system
4789 and service platform for the Java programming language. This package contains
4790 the OSGi annotation module, providing additional services to help dynamic
4792 (license license:asl2.0)))
4794 (define-public java-osgi-core
4796 (name "java-osgi-core")
4800 (uri (string-append "https://repo1.maven.org/maven2/"
4801 "org/osgi/org.osgi.core/" version "/"
4802 "org.osgi.core-" version "-sources.jar"))
4805 "19bpf5jx32jq9789gyhin35q5v7flmw0p9mk7wbgqpxqfmxyiabv"))))
4806 (build-system ant-build-system)
4808 `(#:tests? #f ; no tests
4809 #:jar-name "osgi-core.jar"))
4811 `(("java-osgi-annotation" ,java-osgi-annotation)))
4812 (home-page "https://www.osgi.org")
4813 (synopsis "Core module of OSGi framework")
4815 "OSGi, for Open Services Gateway initiative framework, is a module system
4816 and service platform for the Java programming language. This package contains
4817 the OSGi Core module.")
4818 (license license:asl2.0)))
4820 (define-public java-osgi-service-event
4822 (name "java-osgi-service-event")
4826 (uri (string-append "https://repo1.maven.org/maven2/"
4827 "org/osgi/org.osgi.service.event/"
4828 version "/org.osgi.service.event-"
4829 version "-sources.jar"))
4832 "1nyhlgagwym75bycnjczwbnpymv2iw84zbhvvzk84g9q736i6qxm"))))
4833 (build-system ant-build-system)
4835 `(#:tests? #f ; no tests
4836 #:jar-name "osgi-service-event.jar"))
4838 `(("java-osgi-annotation" ,java-osgi-annotation)
4839 ("java-osgi-core" ,java-osgi-core)))
4840 (home-page "https://www.osgi.org")
4841 (synopsis "OSGi service event module")
4843 "OSGi, for Open Services Gateway initiative framework, is a module system
4844 and service platform for the Java programming language. This package contains
4845 the OSGi @code{org.osgi.service.event} module.")
4846 (license license:asl2.0)))
4848 (define-public java-eclipse-osgi
4850 (name "java-eclipse-osgi")
4854 (uri (string-append "https://repo1.maven.org/maven2/"
4855 "org/eclipse/platform/org.eclipse.osgi/"
4856 version "/org.eclipse.osgi-"
4857 version "-sources.jar"))
4860 "00cqc6lb29n0zv68b4l842vzkwawvbr7gshfdygsk8sicvcq2c7b"))))
4861 (build-system ant-build-system)
4863 `(#:tests? #f ; no tests included
4864 #:jar-name "eclipse-equinox-osgi.jar"))
4866 `(("java-osgi-annotation" ,java-osgi-annotation)))
4867 (home-page "http://www.eclipse.org/equinox/")
4868 (synopsis "Eclipse Equinox OSGi framework")
4869 (description "This package provides an implementation of the OSGi Core
4871 (license license:epl1.0)))
4873 (define-public java-eclipse-equinox-common
4875 (name "java-eclipse-equinox-common")
4879 (uri (string-append "https://repo1.maven.org/maven2/"
4880 "org/eclipse/platform/org.eclipse.equinox.common/"
4881 version "/org.eclipse.equinox.common-"
4882 version "-sources.jar"))
4885 "12aazpkgw46r1qj0pr421jzwhbmsizd97r37krd7njnbrdgfzksc"))))
4886 (build-system ant-build-system)
4888 `(#:tests? #f ; no tests included
4889 #:jar-name "eclipse-equinox-common.jar"))
4891 `(("java-eclipse-osgi" ,java-eclipse-osgi)))
4892 (home-page "http://www.eclipse.org/equinox/")
4893 (synopsis "Common Eclipse runtime")
4894 (description "This package provides the common Eclipse runtime.")
4895 (license license:epl1.0)))
4897 (define-public java-eclipse-core-jobs
4899 (name "java-eclipse-core-jobs")
4903 (uri (string-append "https://repo1.maven.org/maven2/"
4904 "org/eclipse/platform/org.eclipse.core.jobs/"
4905 version "/org.eclipse.core.jobs-"
4906 version "-sources.jar"))
4909 "0395b8lh0km8vhzjnchvs1rii1qz48hyvb2wqfaq4yhklbwihq4b"))))
4910 (build-system ant-build-system)
4912 `(#:tests? #f ; no tests included
4913 #:jar-name "eclipse-core-jobs.jar"))
4915 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
4916 ("java-eclipse-osgi" ,java-eclipse-osgi)))
4917 (home-page "http://www.eclipse.org/equinox/")
4918 (synopsis "Eclipse jobs mechanism")
4919 (description "This package provides the Eclipse jobs mechanism.")
4920 (license license:epl1.0)))
4922 (define-public java-eclipse-equinox-registry
4924 (name "java-eclipse-equinox-registry")
4928 (uri (string-append "https://repo1.maven.org/maven2/"
4929 "org/eclipse/platform/org.eclipse.equinox.registry/"
4930 version "/org.eclipse.equinox.registry-"
4931 version "-sources.jar"))
4934 "1i9sgymh2fy5vdgk5y7s3qvrlbgh4l93ddqi3v4zmca7hwrlhf9k"))))
4935 (build-system ant-build-system)
4937 `(#:tests? #f ; no tests included
4938 #:jar-name "eclipse-equinox-registry.jar"))
4940 `(("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
4941 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
4942 ("java-eclipse-osgi" ,java-eclipse-osgi)))
4943 (home-page "http://www.eclipse.org/equinox/")
4944 (synopsis "Eclipse extension registry support")
4945 (description "This package provides support for the Eclipse extension
4947 (license license:epl1.0)))
4949 (define-public java-eclipse-equinox-app
4951 (name "java-eclipse-equinox-app")
4955 (uri (string-append "https://repo1.maven.org/maven2/"
4956 "org/eclipse/platform/org.eclipse.equinox.app/"
4957 version "/org.eclipse.equinox.app-"
4958 version "-sources.jar"))
4961 "0nhvbp93y203ar7y59gb0mz3w2d3jlqhr0c9hii9bcfpmr7imdab"))))
4962 (build-system ant-build-system)
4964 `(#:tests? #f ; no tests included
4965 #:jar-name "eclipse-equinox-app.jar"))
4967 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
4968 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
4969 ("java-eclipse-osgi" ,java-eclipse-osgi)
4970 ("java-osgi-service-event" ,java-osgi-service-event)))
4971 (home-page "http://www.eclipse.org/equinox/")
4972 (synopsis "Equinox application container")
4973 (description "This package provides the Equinox application container for
4975 (license license:epl1.0)))
4977 (define-public java-eclipse-equinox-preferences
4979 (name "java-eclipse-equinox-preferences")
4983 (uri (string-append "https://repo1.maven.org/maven2/"
4984 "org/eclipse/platform/org.eclipse.equinox.preferences/"
4985 version "/org.eclipse.equinox.preferences-"
4986 version "-sources.jar"))
4989 "0k7w6c141sqym4fy3af0qkwpy4pdh2vsjpjba6rp5fxyqa24v0a2"))))
4990 (build-system ant-build-system)
4992 `(#:tests? #f ; no tests included
4993 #:jar-name "eclipse-equinox-preferences.jar"))
4995 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
4996 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
4997 ("java-eclipse-osgi" ,java-eclipse-osgi)))
4998 (home-page "http://www.eclipse.org/equinox/")
4999 (synopsis "Eclipse preferences mechanism")
5000 (description "This package provides the Eclipse preferences mechanism with
5001 the module @code{org.eclipse.equinox.preferences}.")
5002 (license license:epl1.0)))
5004 (define-public java-eclipse-core-contenttype
5006 (name "java-eclipse-core-contenttype")
5010 (uri (string-append "https://repo1.maven.org/maven2/"
5011 "org/eclipse/platform/org.eclipse.core.contenttype/"
5012 version "/org.eclipse.core.contenttype-"
5013 version "-sources.jar"))
5016 "1wcqcv7ijwv5rh748vz3x9pkmjl9w1r0k0026k56n8yjl4rrmspi"))))
5017 (build-system ant-build-system)
5019 `(#:tests? #f ; no tests included
5020 #:jar-name "eclipse-core-contenttype.jar"))
5022 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5023 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5024 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5025 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5026 (home-page "http://www.eclipse.org/")
5027 (synopsis "Eclipse content mechanism")
5028 (description "This package provides the Eclipse content mechanism in the
5029 @code{org.eclipse.core.contenttype} module.")
5030 (license license:epl1.0)))
5032 (define-public java-eclipse-core-runtime
5034 (name "java-eclipse-core-runtime")
5038 (uri (string-append "https://repo1.maven.org/maven2/"
5039 "org/eclipse/platform/org.eclipse.core.runtime/"
5040 version "/org.eclipse.core.runtime-"
5041 version "-sources.jar"))
5044 "16mkf8jgj35pgzms7w1gyfq0gfm4ixw6c5xbbxzdj1la56c758ya"))))
5045 (build-system ant-build-system)
5047 `(#:tests? #f ; no tests included
5048 #:jar-name "eclipse-core-runtime.jar"))
5050 `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
5051 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
5052 ("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
5053 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5054 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5055 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5056 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5057 (home-page "https://www.eclipse.org/")
5058 (synopsis "Eclipse core runtime")
5059 (description "This package provides the Eclipse core runtime with the
5060 module @code{org.eclipse.core.runtime}.")
5061 (license license:epl1.0)))
5063 (define-public java-eclipse-core-filesystem
5065 (name "java-eclipse-core-filesystem")
5069 (uri (string-append "https://repo1.maven.org/maven2/"
5070 "org/eclipse/platform/org.eclipse.core.filesystem/"
5071 version "/org.eclipse.core.filesystem-"
5072 version "-sources.jar"))
5075 "0km1bhwjim4rfy3pkvjhvy31kgsyf2ncx0mlkmbf5n6g57pphdyj"))))
5076 (build-system ant-build-system)
5078 `(#:tests? #f ; no tests included
5079 #:jar-name "eclipse-core-filesystem.jar"))
5081 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5082 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5083 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5084 (home-page "https://www.eclipse.org/")
5085 (synopsis "Eclipse core file system")
5086 (description "This package provides the Eclipse core file system with the
5087 module @code{org.eclipse.core.filesystem}.")
5088 (license license:epl1.0)))
5090 (define-public java-eclipse-core-expressions
5092 (name "java-eclipse-core-expressions")
5096 (uri (string-append "https://repo1.maven.org/maven2/"
5097 "org/eclipse/platform/org.eclipse.core.expressions/"
5098 version "/org.eclipse.core.expressions-"
5099 version "-sources.jar"))
5102 "18bw2l875gmygvpagpgk9l24qzbdjia4ag12nw6fi8v8yaq4987f"))))
5103 (build-system ant-build-system)
5105 `(#:tests? #f ; no tests included
5106 #:jar-name "eclipse-core-expressions.jar"))
5108 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5109 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5110 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5111 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5112 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5113 (home-page "https://www.eclipse.org/")
5114 (synopsis "Eclipse core expression language")
5115 (description "This package provides the Eclipse core expression language
5116 with the @code{org.eclipse.core.expressions} module.")
5117 (license license:epl1.0)))
5119 (define-public java-eclipse-core-variables
5121 (name "java-eclipse-core-variables")
5125 (uri (string-append "https://repo1.maven.org/maven2/"
5126 "org/eclipse/platform/org.eclipse.core.variables/"
5127 version "/org.eclipse.core.variables-"
5128 version "-sources.jar"))
5131 "12dirh03zi4n5x5cj07vzrhkmnqy6h9q10h9j605pagmpmifyxmy"))))
5132 (build-system ant-build-system)
5134 `(#:tests? #f ; no tests included
5135 #:jar-name "eclipse-core-variables.jar"))
5137 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5138 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5139 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5140 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5141 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5142 (home-page "https://www.eclipse.org/platform")
5143 (synopsis "Eclipse core variables")
5144 (description "This package provides the Eclipse core variables module
5145 @code{org.eclipse.core.variables}.")
5146 (license license:epl1.0)))
5148 (define-public java-eclipse-ant-core
5150 (name "java-eclipse-ant-core")
5154 (uri (string-append "https://repo1.maven.org/maven2/"
5155 "org/eclipse/platform/org.eclipse.ant.core/"
5156 version "/org.eclipse.ant.core-"
5157 version "-sources.jar"))
5160 "11g3if794qjlk98mz9zch22rr56sd7z63vn4i7k2icr8cq5bfqg7"))))
5161 (build-system ant-build-system)
5163 `(#:tests? #f ; no tests included
5164 #:jar-name "eclipse-ant-core.jar"))
5166 `(("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
5167 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5168 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5169 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5170 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
5171 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5172 ("java-eclipse-core-variables" ,java-eclipse-core-variables)
5173 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5174 (home-page "https://www.eclipse.org/platform")
5175 (synopsis "Ant build tool core libraries")
5176 (description "This package provides the ant build tool core libraries with
5177 the module @code{org.eclipse.ant.core}.")
5178 (license license:epl1.0)))
5180 (define-public java-eclipse-core-resources
5182 (name "java-eclipse-core-resources")
5186 (uri (string-append "https://repo1.maven.org/maven2/"
5187 "org/eclipse/platform/org.eclipse.core.resources/"
5188 version "/org.eclipse.core.resources-"
5189 version "-sources.jar"))
5192 "1hrfxrll6cpcagfksk2na1ypvkcnsp0fk6n3vcsrn97qayf9mx9l"))))
5193 (build-system ant-build-system)
5195 `(#:tests? #f ; no tests included
5196 #:jar-name "eclipse-core-resources.jar"))
5198 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5199 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5200 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5201 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
5202 ("java-eclipse-core-expressions" ,java-eclipse-core-expressions)
5203 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
5204 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
5205 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5206 ("java-eclipse-ant-core" ,java-eclipse-ant-core)
5207 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5208 (home-page "https://www.eclipse.org/")
5209 (synopsis "Eclipse core resource management")
5210 (description "This package provides the Eclipse core resource management
5211 module @code{org.eclipse.core.resources}.")
5212 (license license:epl1.0)))
5214 (define-public java-eclipse-compare-core
5216 (name "java-eclipse-compare-core")
5220 (uri (string-append "https://repo1.maven.org/maven2/"
5221 "org/eclipse/platform/org.eclipse.compare.core/"
5222 version "/org.eclipse.compare.core-"
5223 version "-sources.jar"))
5226 "10g37r0pbiffyv2wk35c6g5lwzkdipkl0kkjp41v84dln46xm4dg"))))
5227 (build-system ant-build-system)
5229 `(#:tests? #f ; no tests included
5230 #:jar-name "eclipse-compare-core.jar"))
5232 `(("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5233 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5234 ("java-eclipse-osgi" ,java-eclipse-osgi)
5235 ("java-icu4j" ,java-icu4j)))
5236 (home-page "https://www.eclipse.org/")
5237 (synopsis "Eclipse core compare support")
5238 (description "This package provides the Eclipse core compare support
5239 module @code{org.eclipse.compare.core}.")
5240 (license license:epl1.0)))
5242 (define-public java-eclipse-team-core
5244 (name "java-eclipse-team-core")
5248 (uri (string-append "https://repo1.maven.org/maven2/"
5249 "org/eclipse/platform/org.eclipse.team.core/"
5250 version "/org.eclipse.team.core-"
5251 version "-sources.jar"))
5254 "02j2jzqgb26zx2d5ahxmvijw6j4r0la90zl5c3i65x6z19ciyam7"))))
5255 (build-system ant-build-system)
5257 `(#:tests? #f ; no tests included
5258 #:jar-name "eclipse-team-core.jar"))
5260 `(("java-eclipse-compare-core" ,java-eclipse-compare-core)
5261 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
5262 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
5263 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
5264 ("java-eclipse-core-resources" ,java-eclipse-core-resources)
5265 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5266 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5267 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5268 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5269 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5270 (home-page "https://www.eclipse.org/platform")
5271 (synopsis "Eclipse team support core")
5272 (description "This package provides the Eclipse team support core module
5273 @code{org.eclipse.team.core}.")
5274 (license license:epl1.0)))
5276 (define-public java-eclipse-core-commands
5278 (name "java-eclipse-core-commands")
5282 (uri (string-append "https://repo1.maven.org/maven2/"
5283 "org/eclipse/platform/org.eclipse.core.commands/"
5284 version "/org.eclipse.core.commands-"
5285 version "-sources.jar"))
5288 "0yjn482qndcfrsq3jd6vnhcylp16420f5aqkrwr8spsprjigjcr9"))))
5289 (build-system ant-build-system)
5291 `(#:tests? #f ; no tests included
5292 #:jar-name "eclipse-core-commands.jar"))
5294 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)))
5295 (home-page "https://www.eclipse.org/platform")
5296 (synopsis "Eclipse core commands")
5297 (description "This package provides Eclipse core commands in the module
5298 @code{org.eclipse.core.commands}.")
5299 (license license:epl1.0)))
5301 (define-public java-eclipse-text
5303 (name "java-eclipse-text")
5307 (uri (string-append "https://repo1.maven.org/maven2/"
5308 "org/eclipse/platform/org.eclipse.text/"
5309 version "/org.eclipse.text-"
5310 version "-sources.jar"))
5313 "0scz70vzz5qs5caji9f5q01vkqnvip7dpri1q07l8wbbdcxn4cq1"))))
5314 (build-system ant-build-system)
5316 `(#:tests? #f ; no tests included
5317 #:jar-name "eclipse-text.jar"
5319 (modify-phases %standard-phases
5320 ;; When creating a new category we must make sure that the new list
5321 ;; matches List<Position>. By default it seems to be too generic
5322 ;; (ArrayList<Object>), so we specialize it to ArrayList<Position>.
5323 ;; Without this we get this error:
5325 ;; [javac] .../src/org/eclipse/jface/text/AbstractDocument.java:376:
5326 ;; error: method put in interface Map<K,V> cannot be applied to given types;
5327 ;; [javac] fPositions.put(category, new ArrayList<>());
5329 ;; [javac] required: String,List<Position>
5330 ;; [javac] found: String,ArrayList<Object>
5331 ;; [javac] reason: actual argument ArrayList<Object> cannot be converted
5332 ;; to List<Position> by method invocation conversion
5333 ;; [javac] where K,V are type-variables:
5334 ;; [javac] K extends Object declared in interface Map
5335 ;; [javac] V extends Object declared in interface Map
5337 ;; I don't know if this is a good fix. I suspect it is not, but it
5339 (add-after 'unpack 'fix-compilation-error
5341 (substitute* "src/org/eclipse/jface/text/AbstractDocument.java"
5342 (("Positions.put\\(category, new ArrayList<>\\(\\)\\);")
5343 "Positions.put(category, new ArrayList<Position>());"))
5346 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5347 ("java-eclipse-core-commands" ,java-eclipse-core-commands)
5348 ("java-icu4j" ,java-icu4j)))
5349 (home-page "http://www.eclipse.org/platform")
5350 (synopsis "Eclipse text library")
5351 (description "Platform Text is part of the Platform UI project and
5352 provides the basic building blocks for text and text editors within Eclipse
5353 and contributes the Eclipse default text editor.")
5354 (license license:epl1.0)))
5356 (define-public java-eclipse-jdt-core
5358 (name "java-eclipse-jdt-core")
5362 (uri (string-append "https://repo1.maven.org/maven2/"
5363 "org/eclipse/jdt/org.eclipse.jdt.core/"
5364 version "/org.eclipse.jdt.core-"
5365 version "-sources.jar"))
5368 "191xw4lc7mjjkprh4ji5vnpjvr5r4zvbpwkriy4bvsjqrz35vh1j"))))
5369 (build-system ant-build-system)
5371 `(#:tests? #f ; no tests included
5372 #:jar-name "eclipse-jdt-core.jar"))
5374 `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
5375 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
5376 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
5377 ("java-eclipse-core-resources" ,java-eclipse-core-resources)
5378 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5379 ("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
5380 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5381 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5382 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5383 ("java-eclipse-osgi" ,java-eclipse-osgi)
5384 ("java-eclipse-text" ,java-eclipse-text)))
5385 (home-page "https://www.eclipse.org/jdt")
5386 (synopsis "Java development tools core libraries")
5387 (description "This package provides the core libraries of the Eclipse Java
5388 development tools.")
5389 (license license:epl1.0)))
5391 (define-public java-javax-mail
5393 (name "java-javax-mail")
5397 (uri (string-append "https://repo1.maven.org/maven2/"
5398 "com/sun/mail/javax.mail/"
5399 version "/javax.mail-"
5400 version "-sources.jar"))
5403 "0sdlfgsc2b5s89xv1261y8i0jijcja019k2x1c8ngfn582w4jly9"))))
5404 (build-system ant-build-system)
5406 `(#:tests? #f ; no tests
5407 #:jar-name "javax-mail.jar"))
5408 (home-page "https://javamail.java.net")
5409 (synopsis "Reference implementation of the JavaMail API")
5411 "This package provides versions of the JavaMail API implementation, IMAP,
5412 SMTP, and POP3 service providers, some examples, and documentation for the
5414 ;; GPLv2 only with "classpath exception".
5415 (license license:gpl2)))
5417 (define-public java-log4j-api
5419 (name "java-log4j-api")
5423 (uri (string-append "mirror://apache/logging/log4j/" version
5424 "/apache-log4j-" version "-src.tar.gz"))
5427 "0j5p9gik0jysh37nlrckqbky12isy95cpwg2gv5fas1rcdqbraxd"))))
5428 (build-system ant-build-system)
5430 `(#:tests? #f ; tests require unpackaged software
5431 #:jar-name "log4j-api.jar"
5433 (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out")
5436 (modify-phases %standard-phases
5437 (add-after 'unpack 'enter-dir
5438 (lambda _ (chdir "log4j-api") #t))
5439 ;; FIXME: The tests require additional software that has not been
5440 ;; packaged yet, such as
5441 ;; * org.apache.maven
5442 ;; * org.apache.felix
5443 (add-after 'enter-dir 'delete-tests
5444 (lambda _ (delete-file-recursively "src/test") #t)))))
5446 `(("java-osgi-core" ,java-osgi-core)
5447 ("java-hamcrest-core" ,java-hamcrest-core)
5448 ("java-junit" ,java-junit)))
5449 (home-page "http://logging.apache.org/log4j/2.x/")
5450 (synopsis "API module of the Log4j logging framework for Java")
5452 "This package provides the API module of the Log4j logging framework for
5454 (license license:asl2.0)))
5456 (define-public java-log4j-core
5458 (inherit java-log4j-api)
5459 (name "java-log4j-core")
5461 `(("java-osgi-core" ,java-osgi-core)
5462 ("java-hamcrest-core" ,java-hamcrest-core)
5463 ("java-log4j-api" ,java-log4j-api)
5464 ("java-mail" ,java-mail)
5465 ("java-jboss-jms-api-spec" ,java-jboss-jms-api-spec)
5466 ("java-lmax-disruptor" ,java-lmax-disruptor)
5467 ("java-kafka" ,java-kafka-clients)
5468 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
5469 ("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
5470 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
5471 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)
5472 ("java-fasterxml-jackson-dataformat-xml" ,java-fasterxml-jackson-dataformat-xml)
5473 ("java-fasterxml-jackson-dataformat-yaml" ,java-fasterxml-jackson-dataformat-yaml)
5474 ("java-commons-compress" ,java-commons-compress)
5475 ("java-commons-csv" ,java-commons-csv)
5476 ("java-jeromq" ,java-jeromq)
5477 ("java-junit" ,java-junit)))
5479 `(("hamcrest" ,java-hamcrest-all)
5480 ("java-commons-io" ,java-commons-io)
5481 ("java-commons-lang3" ,java-commons-lang3)
5482 ("slf4j" ,java-slf4j-api)))
5484 `(#:tests? #f ; tests require more dependencies
5485 #:test-dir "src/test"
5486 #:source-dir "src/main/java"
5487 #:jar-name "log4j-core.jar"
5490 (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out")
5493 (modify-phases %standard-phases
5494 (add-after 'unpack 'enter-dir
5495 (lambda _ (chdir "log4j-core") #t)))))
5496 (synopsis "Core component of the Log4j framework")
5497 (description "This package provides the core component of the Log4j
5498 logging framework for Java.")))
5500 (define-public java-log4j-1.2-api
5502 (inherit java-log4j-api)
5503 (name "java-log4j-1.2-api")
5505 `(#:jar-name "java-log4j-1.2-api.jar"
5506 #:source-dir "log4j-1.2-api/src/main/java"
5508 ;; Tests require maven-model (and other maven subprojects), which is a
5509 ;; cyclic dependency.
5512 `(("log4j-api" ,java-log4j-api)
5513 ("log4j-core" ,java-log4j-core)
5514 ("osgi-core" ,java-osgi-core)
5515 ("eclipse-osgi" ,java-eclipse-osgi)
5516 ("java-lmax-disruptor" ,java-lmax-disruptor)))))
5518 (define-public java-commons-cli
5520 (name "java-commons-cli")
5524 (uri (string-append "mirror://apache/commons/cli/source/"
5525 "commons-cli-" version "-src.tar.gz"))
5528 "1fkjn552i12vp3xxk21ws4p70fi0lyjm004vzxsdaz7gdpgyxxyl"))))
5529 (build-system ant-build-system)
5532 `(#:jar-name "commons-cli.jar"))
5534 `(("java-junit" ,java-junit)
5535 ("java-hamcrest-core" ,java-hamcrest-core)))
5536 (home-page "http://commons.apache.org/cli/")
5537 (synopsis "Command line arguments and options parsing library")
5538 (description "The Apache Commons CLI library provides an API for parsing
5539 command line options passed to programs. It is also able to print help
5540 messages detailing the options available for a command line tool.
5542 Commons CLI supports different types of options:
5545 @item POSIX like options (ie. tar -zxvf foo.tar.gz)
5546 @item GNU like long options (ie. du --human-readable --max-depth=1)
5547 @item Java like properties (ie. java -Djava.awt.headless=true Foo)
5548 @item Short options with value attached (ie. gcc -O2 foo.c)
5549 @item long options with single hyphen (ie. ant -projecthelp)
5552 This is a part of the Apache Commons Project.")
5553 (license license:asl2.0)))
5555 (define-public java-commons-codec
5557 (name "java-commons-codec")
5561 (uri (string-append "mirror://apache/commons/codec/source/"
5562 "commons-codec-" version "-src.tar.gz"))
5565 "1w9qg30y4s0x8gnmr2fgj4lyplfn788jqxbcz27lf5kbr6n8xr65"))))
5566 (build-system ant-build-system)
5567 (outputs '("out" "doc"))
5569 `(#:test-target "test"
5571 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
5572 (junit (assoc-ref %build-inputs "java-junit")))
5573 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
5574 (string-append "-Dhamcrest.jar=" hamcrest
5575 "/share/java/hamcrest-core.jar")
5576 ;; Do not append version to jar.
5577 "-Dfinal.name=commons-codec"))
5579 (modify-phases %standard-phases
5580 (add-after 'build 'build-javadoc ant-build-javadoc)
5581 (replace 'install (install-jars "dist"))
5582 (add-after 'install 'install-doc (install-javadoc "dist/docs/api")))))
5584 `(("java-junit" ,java-junit)
5585 ("java-hamcrest-core" ,java-hamcrest-core)))
5586 (home-page "http://commons.apache.org/codec/")
5587 (synopsis "Common encoders and decoders such as Base64, Hex, Phonetic and URLs")
5588 (description "The codec package contains simple encoder and decoders for
5589 various formats such as Base64 and Hexadecimal. In addition to these widely
5590 used encoders and decoders, the codec package also maintains a collection of
5591 phonetic encoding utilities.
5593 This is a part of the Apache Commons Project.")
5594 (license license:asl2.0)))
5596 (define-public java-commons-daemon
5598 (name "java-commons-daemon")
5602 (uri (string-append "mirror://apache/commons/daemon/source/"
5603 "commons-daemon-" version "-src.tar.gz"))
5606 "0ci46kq8jpz084ccwq0mmkahcgsmh20ziclp2jf5i0djqv95gvhi"))))
5607 (build-system ant-build-system)
5609 `(#:test-target "test"
5611 (modify-phases %standard-phases
5612 (add-after 'build 'build-javadoc ant-build-javadoc)
5613 (replace 'install (install-jars "dist"))
5614 (add-after 'install 'install-doc (install-javadoc "dist/docs/api")))))
5616 `(("java-junit" ,java-junit)))
5617 (home-page "http://commons.apache.org/daemon/")
5618 (synopsis "Library to launch Java applications as daemons")
5619 (description "The Daemon package from Apache Commons can be used to
5620 implement Java applications which can be launched as daemons. For example the
5621 program will be notified about a shutdown so that it can perform cleanup tasks
5622 before its process of execution is destroyed by the operation system.
5624 This package contains the Java library. You will also need the actual binary
5625 for your architecture which is provided by the jsvc package.
5627 This is a part of the Apache Commons Project.")
5628 (license license:asl2.0)))
5630 (define-public java-javaewah
5632 (name "java-javaewah")
5636 (uri (string-append "https://github.com/lemire/javaewah/"
5637 "archive/JavaEWAH-" version ".tar.gz"))
5640 "1n7j1r1h24wlhwv9zdcj6yqjrhma2ixwyzm15l5vrv6yqjs6753b"))))
5641 (build-system ant-build-system)
5642 (arguments `(#:jar-name "javaewah.jar"))
5644 `(("java-junit" ,java-junit)
5645 ("java-hamcrest-core" ,java-hamcrest-core)))
5646 (home-page "https://github.com/lemire/javaewah")
5647 (synopsis "Compressed alternative to the Java @code{BitSet} class")
5648 (description "This is a word-aligned compressed variant of the Java
5649 @code{Bitset} class. It provides both a 64-bit and a 32-bit RLE-like
5650 compression scheme. It can be used to implement bitmap indexes.
5652 The goal of word-aligned compression is not to achieve the best compression,
5653 but rather to improve query processing time. Hence, JavaEWAH tries to save CPU
5654 cycles, maybe at the expense of storage. However, the EWAH scheme is always
5655 more efficient storage-wise than an uncompressed bitmap (as implemented in the
5656 @code{BitSet} class by Sun).")
5657 ;; GPL2.0 derivates are explicitly allowed.
5658 (license license:asl2.0)))
5660 (define-public java-slf4j-api
5662 (name "java-slf4j-api")
5666 (uri (string-append "https://www.slf4j.org/dist/slf4j-"
5670 "13j51sgzmhhdrfa74gkal5zpip7r1440dh7zsi2c8bpb2zs1v8kb"))
5671 (modules '((guix build utils)))
5672 ;; Delete bundled jars.
5675 (for-each delete-file (find-files "." "\\.jar$"))
5677 (build-system ant-build-system)
5679 `(#:jar-name "slf4j-api.jar"
5680 #:source-dir "slf4j-api/src/main"
5681 #:test-dir "slf4j-api/src/test"
5683 (modify-phases %standard-phases
5684 (add-after 'build 'regenerate-jar
5686 ;; pom.xml ignores these files in the jar creation process. If we don't,
5687 ;; we get the error "This code should have never made it into slf4j-api.jar"
5688 (delete-file-recursively "build/classes/org/slf4j/impl")
5689 (zero? (system* "jar" "-cf" "build/jar/slf4j-api.jar" "-C"
5690 "build/classes" "."))))
5691 (add-before 'check 'dont-test-abstract-classes
5693 ;; abstract classes are not meant to be run with junit
5694 (substitute* "build.xml"
5695 (("<include name=\"\\*\\*/\\*Test.java\" />")
5696 (string-append "<include name=\"**/*Test.java\" />"
5697 "<exclude name=\"**/MultithreadedInitializationTest"
5698 ".java\" />"))))))))
5700 `(("java-junit" ,java-junit)
5701 ("java-hamcrest-core" ,java-hamcrest-core)))
5702 (home-page "https://www.slf4j.org/")
5703 (synopsis "Simple logging facade for Java")
5704 (description "The Simple Logging Facade for Java (SLF4J) serves as a
5705 simple facade or abstraction for various logging
5706 frameworks (e.g. @code{java.util.logging}, @code{logback}, @code{log4j})
5707 allowing the end user to plug in the desired logging framework at deployment
5709 (license license:expat)))
5711 (define-public java-slf4j-simple
5713 (name "java-slf4j-simple")
5715 (source (package-source java-slf4j-api))
5716 (build-system ant-build-system)
5718 `(#:jar-name "slf4j-simple.jar"
5719 #:source-dir "slf4j-simple/src/main"
5720 #:test-dir "slf4j-simple/src/test"
5722 (modify-phases %standard-phases
5723 ;; The tests need some test classes from slf4j-api
5724 (add-before 'check 'build-slf4j-api-test-helpers
5726 ;; Add current dir to CLASSPATH ...
5728 (string-append (getcwd) ":" (getenv "CLASSPATH")))
5729 ;; ... and build test helper classes here:
5733 ,@(find-files "slf4j-api/src/test" ".*\\.java")))))))))
5735 `(("java-junit" ,java-junit)
5736 ("java-hamcrest-core" ,java-hamcrest-core)
5737 ("java-slf4j-api" ,java-slf4j-api)))
5738 (home-page "https://www.slf4j.org/")
5739 (synopsis "Simple implementation of simple logging facade for Java")
5740 (description "SLF4J binding for the Simple implementation, which outputs
5741 all events to System.err. Only messages of level INFO and higher are
5743 (license license:expat)))
5745 (define-public antlr2
5751 (uri (string-append "http://www.antlr2.org/download/antlr-"
5755 "1ffvcwdw73id0dk6pj2mlxjvbg0662qacx4ylayqcxgg381fnfl5"))
5756 (modules '((guix build utils)))
5759 (delete-file "antlr.jar")
5760 (substitute* "lib/cpp/antlr/CharScanner.hpp"
5764 "#define EOF (-1)\n"
5765 "#include <strings.h>")))
5766 (substitute* "configure"
5769 (build-system gnu-build-system)
5771 `(#:tests? #f ; no test target
5772 #:imported-modules ((guix build ant-build-system)
5773 (guix build syscalls)
5774 ,@%gnu-build-system-modules)
5775 #:modules (((guix build ant-build-system) #:prefix ant:)
5776 (guix build gnu-build-system)
5779 (modify-phases %standard-phases
5780 (add-after 'install 'strip-jar-timestamps
5781 (assoc-ref ant:%standard-phases 'strip-jar-timestamps))
5782 (add-after 'configure 'fix-bin-ls
5784 (substitute* (find-files "." "Makefile")
5790 ("java" ,icedtea "jdk")))
5792 `(("java" ,icedtea)))
5793 (home-page "http://www.antlr2.org")
5794 (synopsis "Framework for constructing recognizers, compilers, and translators")
5795 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
5796 is a language tool that provides a framework for constructing recognizers,
5797 compilers, and translators from grammatical descriptions containing Java, C#,
5798 C++, or Python actions. ANTLR provides excellent support for tree construction,
5799 tree walking, and translation.")
5800 (license license:public-domain)))
5802 (define-public java-stringtemplate-3
5804 (name "java-stringtemplate")
5808 (uri (string-append "https://github.com/antlr/website-st4/raw/"
5809 "gh-pages/download/stringtemplate-"
5813 "086yj68np1vqhkj7483diz3km6s6y4gmwqswa7524a0ca6vxn2is"))))
5814 (build-system ant-build-system)
5816 `(#:jar-name (string-append ,name "-" ,version ".jar")
5818 #:modules ((guix build ant-build-system)
5822 (modify-phases %standard-phases
5823 (add-before 'check 'fix-tests
5825 (substitute* "build.xml"
5826 (("\\$\\{test.home\\}/java")
5827 "${test.home}/org"))
5829 (add-before 'build 'generate-grammar
5831 (with-directory-excursion "src/org/antlr/stringtemplate/language/"
5832 (every (lambda (file)
5833 (format #t "~a\n" file)
5834 (zero? (system* "antlr" file)))
5835 '("template.g" "angle.bracket.template.g" "action.g"
5836 "eval.g" "group.g" "interface.g"))))))))
5839 ("java-junit" ,java-junit)))
5840 (home-page "http://www.stringtemplate.org")
5841 (synopsis "Template engine to generate formatted text output")
5842 (description "StringTemplate is a java template engine (with ports for C#,
5843 Objective-C, JavaScript, Scala) for generating source code, web pages, emails,
5844 or any other formatted text output. StringTemplate is particularly good at
5845 code generators, multiple site skins, and internationalization / localization.
5846 StringTemplate also powers ANTLR.")
5847 (license license:bsd-3)))
5849 ;; antlr3 is partially written using antlr3 grammar files. It also depends on
5850 ;; ST4 (stringtemplate4), which is also partially written using antlr3 grammar
5851 ;; files and uses antlr3 at runtime. The latest version requires a recent version
5852 ;; of antlr3 at runtime.
5853 ;; Fortunately, ST4 4.0.6 can be built with an older antlr3, and we use antlr3.3.
5854 ;; This version of ST4 is sufficient for the latest antlr3.
5855 ;; We use ST4 4.0.6 to build a boostrap antlr3 (latest version), and build
5856 ;; the latest ST4 with it. Then we build our final antlr3 that will be linked
5857 ;; against the latest ST4.
5858 ;; antlr3.3 still depends on antlr3 to generate some files, so we use an
5859 ;; even older version, antlr3.1, to generate them. Fortunately antlr3.1 uses
5860 ;; only grammar files with the antlr2 syntax.
5861 ;; So we build antlr3.1 -> antlr3.3 -> ST4.0.6 -> antlr3-bootstrap -> ST4 -> antlr3.
5863 (define-public java-stringtemplate
5864 (package (inherit java-stringtemplate-3)
5865 (name "java-stringtemplate")
5869 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/"
5871 (file-name (string-append name "-" version ".tar.gz"))
5874 "1pri8hqa95rfdkjy55icl5q1m09zwp5k67ib14abas39s4v3w087"))))
5875 (build-system ant-build-system)
5877 `(#:jar-name (string-append ,name "-" ,version ".jar")
5878 #:tests? #f ; FIXME: tests fail for unknown reasons
5880 #:modules ((guix build ant-build-system)
5884 (modify-phases %standard-phases
5885 (add-before 'check 'fix-test-target
5887 (substitute* "build.xml"
5888 (("\\$\\{test.home\\}/java") "${test.home}/")
5889 (("\\*Test.java") "Test*.java"))
5891 (add-before 'build 'generate-grammar
5893 (with-directory-excursion "src/org/stringtemplate/v4/compiler/"
5894 (every (lambda (file)
5895 (format #t "~a\n" file)
5896 (zero? (system* "antlr3" file)))
5897 '("STParser.g" "Group.g" "CodeGenerator.g"))))))))
5899 `(("antlr3" ,antlr3-bootstrap)
5901 ("java-stringtemplate" ,java-stringtemplate-3)
5902 ("java-junit" ,java-junit)))))
5904 (define java-stringtemplate-4.0.6
5905 (package (inherit java-stringtemplate)
5906 (name "java-stringtemplate")
5910 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/ST-"
5912 (file-name (string-append name "-" version ".tar.gz"))
5915 "0hjmh1ahdsh3w825i67mli9l4nncc4l6hdbf9ma91jvlj590sljp"))))
5917 `(("antlr3" ,antlr3-3.3)
5919 ("java-stringtemplate" ,java-stringtemplate-3)))))
5921 (define-public antlr3
5927 (uri (string-append "https://github.com/antlr/antlr3/archive/"
5929 (file-name (string-append name "-" version ".tar.gz"))
5932 "0218v683081lg54z9hvjxinhxd4dqp870jx6n39gslm0bkyi4vd6"))))
5933 (build-system ant-build-system)
5935 `(#:jar-name (string-append ,name "-" ,version ".jar")
5936 #:source-dir "tool/src/main/java:runtime/Java/src/main/java:tool/src/main/antlr3"
5939 (modify-phases %standard-phases
5940 (add-after 'install 'bin-install
5941 (lambda* (#:key inputs outputs #:allow-other-keys)
5942 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
5943 (bin (string-append (assoc-ref outputs "out") "/bin")))
5945 (with-output-to-file (string-append bin "/antlr3")
5948 (string-append "#!" (which "sh") "\n"
5949 "java -cp " jar "/" ,name "-" ,version ".jar:"
5951 (find-files (assoc-ref inputs "stringtemplate")
5955 (find-files (assoc-ref inputs "stringtemplate4")
5959 (find-files (string-append
5960 (assoc-ref inputs "antlr")
5963 " org.antlr.Tool $*"))))
5964 (chmod (string-append bin "/antlr3") #o755))))
5965 (add-before 'build 'generate-grammar
5967 (chdir "tool/src/main/antlr3/org/antlr/grammar/v3/")
5968 (for-each (lambda (file)
5971 (system* "antlr3" file))
5972 '("ANTLR.g" "ANTLRTreePrinter.g" "ActionAnalysis.g"
5973 "AssignTokenTypesWalker.g"
5974 "ActionTranslator.g" "TreeToNFAConverter.g"
5975 "ANTLRv3.g" "ANTLRv3Tree.g" "LeftRecursiveRuleWalker.g"
5976 "CodeGenTreeWalker.g" "DefineGrammarItemsWalker.g"))
5977 (substitute* "ANTLRParser.java"
5978 (("public Object getTree") "public GrammarAST getTree"))
5979 (substitute* "ANTLRv3Parser.java"
5980 (("public Object getTree") "public CommonTree getTree"))
5981 (chdir "../../../../../java")
5982 (system* "antlr" "-o" "org/antlr/tool"
5983 "org/antlr/tool/serialize.g")
5984 (substitute* "org/antlr/tool/LeftRecursiveRuleAnalyzer.java"
5985 (("import org.antlr.grammar.v3.\\*;") "import org.antlr.grammar.v3.*;
5986 import org.antlr.grammar.v3.ANTLRTreePrinter;"))
5987 (substitute* "org/antlr/tool/ErrorManager.java"
5988 (("case NO_SUCH_ATTRIBUTE_PASS_THROUGH:") ""))
5989 (chdir "../../../..")))
5990 (add-before 'build 'fix-build-xml
5992 (substitute* "build.xml"
5993 (("<exec") "<copy todir=\"${classes.dir}\">
5994 <fileset dir=\"tool/src/main/resources\">
5995 <include name=\"**/*.stg\"/>
5996 <include name=\"**/*.st\"/>
5997 <include name=\"**/*.sti\"/>
5998 <include name=\"**/STLexer.tokens\"/>
6000 </copy><exec")))))))
6003 ("antlr3" ,antlr3-bootstrap)))
6005 `(("junit" ,java-junit)
6006 ("stringtemplate" ,java-stringtemplate-3)
6007 ("stringtemplate4" ,java-stringtemplate)))
6009 `(("stringtemplate" ,java-stringtemplate-3)
6011 ("stringtemplate4" ,java-stringtemplate-4.0.6)))
6012 (home-page "http://www.antlr3.org")
6013 (synopsis "Framework for constructing recognizers, compilers, and translators")
6014 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
6015 is a language tool that provides a framework for constructing recognizers,
6016 compilers, and translators from grammatical descriptions containing Java, C#,
6017 C++, or Python actions. ANTLR provides excellent support for tree construction,
6018 tree walking, and translation.")
6019 (license license:bsd-3)))
6021 (define antlr3-bootstrap
6024 (name "antlr3-bootstrap")
6027 ("antlr3" ,antlr3-3.3)))
6029 `(("junit" ,java-junit)))))
6038 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
6039 "gh-pages/download/antlr-"
6043 "0qgg5vgsm4l1d6dj9pfbaa25dpv2ry2gny8ajy4vvgvfklw97b3m"))
6045 (search-patches "antlr3-3_3-fix-java8-compilation.patch"))))
6047 `(#:jar-name (string-append ,name "-" ,version ".jar")
6048 #:source-dir (string-join '("tool/src/main/java"
6049 "runtime/Java/src/main/java"
6050 "tool/src/main/antlr2"
6051 "tool/src/main/antlr3")
6053 #:tests? #f ; FIXME: tests seem to require maven plugin
6054 #:modules ((guix build ant-build-system)
6058 (modify-phases %standard-phases
6059 (add-after 'install 'bin-install
6060 (lambda* (#:key inputs outputs #:allow-other-keys)
6061 (let* ((out (assoc-ref outputs "out"))
6062 (jar (string-append out "/share/java"))
6063 (bin (string-append out "/bin")))
6065 (with-output-to-file (string-append bin "/antlr3")
6069 "#!" (which "sh") "\n"
6070 "java -cp " jar "/antlr3-3.3.jar:"
6072 (append (find-files (assoc-ref inputs "java-stringtemplate")
6074 (find-files (string-append (assoc-ref inputs "antlr")
6078 " org.antlr.Tool $*"))))
6079 (chmod (string-append bin "/antlr3") #o755)
6081 (add-before 'build 'generate-grammar
6083 (substitute* "tool/src/main/java/org/antlr/tool/Grammar.java"
6084 (("import org.antlr.grammar.v2.\\*;")
6085 "import org.antlr.grammar.v2.*;\n
6086 import org.antlr.grammar.v2.TreeToNFAConverter;\n
6087 import org.antlr.grammar.v2.DefineGrammarItemsWalker;\n
6088 import org.antlr.grammar.v2.ANTLRTreePrinter;"))
6090 (with-directory-excursion "tool/src/main/antlr2/org/antlr/grammar/v2/"
6091 (every (lambda (file)
6092 (format #t "~a\n" file)
6093 (zero? (system* "antlr" file)))
6094 '("antlr.g" "antlr.print.g" "assign.types.g"
6095 "buildnfa.g" "codegen.g" "define.g")))
6096 (with-directory-excursion "tool/src/main/antlr3/org/antlr/grammar/v3/"
6097 (every (lambda (file)
6098 (format #t "~a\n" file)
6099 (zero? (system* "antlr3" file)))
6100 '("ActionAnalysis.g" "ActionTranslator.g" "ANTLRv3.g"
6101 "ANTLRv3Tree.g"))))))
6102 (add-before 'build 'fix-build-xml
6104 (substitute* "build.xml"
6105 (("<exec") "<copy todir=\"${classes.dir}\">
6106 <fileset dir=\"tool/src/main/resources\">
6107 <include name=\"**/*.stg\"/>
6108 <include name=\"**/*.st\"/>
6109 <include name=\"**/*.sti\"/>
6110 <include name=\"**/STLexer.tokens\"/>
6116 ("antlr3" ,antlr3-3.1)))
6118 `(("junit" ,java-junit)))
6120 `(("java-stringtemplate" ,java-stringtemplate-3)
6122 ("antlr3" ,antlr3-3.1)))))
6130 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
6131 "gh-pages/download/antlr-"
6135 "0sfimc9cpbgrihz4giyygc8afgpma2c93yqpwb951giriri6x66z"))
6137 (search-patches "antlr3-3_1-fix-java8-compilation.patch"))))
6139 `(#:jar-name (string-append "antlr3-" ,version ".jar")
6140 #:source-dir "src:runtime/Java/src"
6143 (modify-phases %standard-phases
6144 (add-after 'install 'bin-install
6145 (lambda* (#:key inputs outputs #:allow-other-keys)
6146 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
6147 (bin (string-append (assoc-ref outputs "out") "/bin")))
6149 (with-output-to-file (string-append bin "/antlr3")
6152 (string-append "#!" (which "sh") "\n"
6153 "java -cp " jar "/antlr3-3.1-3.1.jar:"
6155 (find-files (assoc-ref inputs "stringtemplate")
6159 (find-files (string-append
6160 (assoc-ref inputs "antlr")
6163 " org.antlr.Tool $*"))))
6164 (chmod (string-append bin "/antlr3") #o755))))
6165 (add-before 'build 'generate-grammar
6167 (let ((dir "src/org/antlr/tool/"))
6168 (for-each (lambda (file)
6171 (invoke "antlr" "-o" dir (string-append dir file)))
6172 '("antlr.g" "antlr.print.g" "assign.types.g"
6173 "buildnfa.g" "define.g")))
6174 (format #t "codegen.g\n")
6175 (invoke "antlr" "-o" "src/org/antlr/codegen"
6176 "src/org/antlr/codegen/codegen.g")
6178 (add-before 'build 'fix-build-xml
6180 (substitute* "build.xml"
6181 (("<exec") "<copy todir=\"${classes.dir}\">
6182 <fileset dir=\"src\">
6183 <include name=\"**/*.stg\"/>
6184 <include name=\"**/*.st\"/>
6185 <include name=\"**/*.sti\"/>
6186 <include name=\"**/STLexer.tokens\"/>
6188 </copy><exec")))))))
6190 `(("antlr" ,antlr2)))
6192 `(("junit" ,java-junit)))
6194 `(("stringtemplate" ,java-stringtemplate-3)))))
6196 (define-public java-commons-cli-1.2
6197 ;; This is a bootstrap dependency for Maven2.
6199 (inherit java-commons-cli)
6203 (uri (string-append "mirror://apache/commons/cli/source/"
6204 "commons-cli-" version "-src.tar.gz"))
6207 "0rvfgzgv2pc1m091dfj3ih9ddsjjppr1f1wf0qmc3bk6b1kwv2dm"))))
6209 `(#:jar-name "commons-cli.jar"
6211 (modify-phases %standard-phases
6212 (add-before 'check 'fix-build-xml
6213 (lambda* (#:key inputs #:allow-other-keys)
6214 (substitute* "build.xml"
6215 (("dir=\"\\$\\{test.home\\}/java\"")
6216 "dir=\"${test.home}\""))
6219 `(("java-junit" ,java-junit)))))
6221 (define-public java-microemulator-cldc
6223 (name "java-microemulator-cldc")
6227 (uri (string-append "https://github.com/barteo/microemu/archive/"
6229 (string-map (lambda (c) (if (char=? c #\.) #\_ c))
6232 (file-name (string-append name "-" version ".tar.gz"))
6235 "1x1apmz38gkppxnwnygwmi12j54v4p258v8ddzn6dldkk7vak1ll"))))
6236 (build-system ant-build-system)
6238 `(#:jar-name "microemulator-cldc.jar"
6239 #:source-dir "microemu-cldc/src/main/java"
6240 #:tests? #f)); Requires even older software
6241 (home-page "https://github.com/barteo/microemu")
6242 (synopsis "J2ME CLDC emulator")
6243 (description "Microemulator is a Java 2 Micro Edition (J2ME) CLDC/MIDP
6244 Emulator. It allows to demonstrate MIDlet based applications in web browser
6245 applet and can be run as a standalone java application.")
6246 (license (list license:asl2.0
6248 license:lgpl2.1+))))
6250 (define-public java-datanucleus-javax-persistence
6252 (name "java-datanucleus-javax-persistence")
6256 (uri (string-append "https://github.com/datanucleus/"
6257 "javax.persistence/archive/javax.persistence-"
6258 version "-release.tar.gz"))
6261 "11jx0fjwgc2hhbqqgdd6m1pf2fplf9vslppygax0y1z5csnqjhpx"))))
6262 (build-system ant-build-system)
6264 `(#:jar-name "java-datanucleus-javax-persistence.jar"
6266 #:source-dir "src/main/java"
6267 #:tests? #f)); no tests
6268 (home-page "https://github.com/datanucleus/javax.persistence")
6269 (synopsis "JPA API")
6270 (description "This package contains a clean definition of JPA API intended
6271 for use with DataNucleus JPA since the JCP haven't provided an official JPA API
6272 jar. See @url{http://java.net/projects/jpa-spec/downloads} for the specification
6273 used to generate this API.")
6274 (license (list license:edl1.0 license:epl1.0))))
6276 (define-public java-osgi-cmpn
6278 (name "java-osgi-cmpn")
6282 (uri (string-append "http://central.maven.org/maven2/"
6283 "org/osgi/osgi.cmpn/" version "/osgi.cmpn-"
6284 version "-sources.jar"))
6287 "1lmb6xyrmkqdhv1kayf0514rlwq6ypvs4m44ibrck3snp8241wys"))))
6288 (build-system ant-build-system)
6290 `(#:jar-name "osgi-cmpn.jar"
6291 #:tests? #f)); no tests
6293 `(("annotation" ,java-osgi-annotation)
6294 ("core" ,java-osgi-core)
6295 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
6296 ("microemulator" ,java-microemulator-cldc)
6297 ("servlet" ,java-classpathx-servletapi)))
6298 (home-page "https://www.osgi.org")
6299 (synopsis "Compendium specification module of OSGi framework")
6301 "OSGi, for Open Services Gateway initiative framework, is a module system
6302 and service platform for the Java programming language. This package contains
6303 the compendium specification module, providing interfaces and classes for use
6304 in compiling bundles.")
6305 (license license:asl2.0)))
6307 (define-public java-osgi-service-component-annotations
6309 (name "java-osgi-service-component-annotations")
6313 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6314 "org.osgi.service.component.annotations/"
6315 version "/org.osgi.service.component.annotations-"
6316 version "-sources.jar"))
6319 "15rq9cmp4fpn74q44m4j35qsqmjf5lx3hcrk6pzvbhc08igic2f0"))))
6320 (build-system ant-build-system)
6322 `(#:jar-name "osgi-service-component-annotations.jar"
6323 #:tests? #f)); no tests
6325 `(("annotation" ,java-osgi-annotation)))
6326 (home-page "https://www.osgi.org")
6327 (synopsis "Support annotations for osgi-service-component")
6329 "OSGi, for Open Services Gateway initiative framework, is a module system
6330 and service platform for the Java programming language. This package contains
6331 the support annotations for osgi-service-component.")
6332 (license license:asl2.0)))
6334 (define-public java-osgi-dto
6336 (name "java-osgi-dto")
6340 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6341 "org.osgi.dto/" version "/org.osgi.dto-"
6342 version "-sources.jar"))
6345 "0f4bqjzadn0hwk6sd3h5gvbyfp3yci1s6r0v770cc15p0pg627yr"))))
6346 (build-system ant-build-system)
6348 `(#:jar-name "osgi-dto.jar"
6349 #:tests? #f)); no tests
6351 `(("annotation" ,java-osgi-annotation)))
6352 (home-page "https://www.osgi.org")
6353 (synopsis "Data Transfer Objects")
6355 "OSGi, for Open Services Gateway initiative framework, is a module system
6356 and service platform for the Java programming language. This package contains
6357 the Data Transfer Objects. It is easily serializable having only public fields
6358 of primitive types and their wrapper classes, Strings, and DTOs. List, Set,
6359 Map and array aggregates may also be used. The aggregates must only hold
6360 objects of the listed types or aggregates.")
6361 (license license:asl2.0)))
6363 (define-public java-osgi-resource
6365 (name "java-osgi-resource")
6369 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6370 "org.osgi.resource/"
6371 version "/org.osgi.resource-"
6372 version "-sources.jar"))
6375 "0hi0fsc5v99q22bd7lrkvpz1y0ds4w9arjldpwsrcpqvz2js7q2d"))))
6376 (build-system ant-build-system)
6378 `(#:jar-name "osgi-resource.jar"
6379 #:tests? #f)); no tests
6381 `(("annotation" ,java-osgi-annotation)
6382 ("dto" ,java-osgi-dto)))
6383 (home-page "https://www.osgi.org")
6384 (synopsis "OSGI Resource")
6386 "OSGi, for Open Services Gateway initiative framework, is a module system
6387 and service platform for the Java programming language. This package contains
6388 the definition of common types in osgi packages.")
6389 (license license:asl2.0)))
6391 (define-public java-osgi-namespace-contract
6393 (name "java-osgi-namespace-contract")
6397 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6398 "org.osgi.namespace.contract/"
6399 version "/org.osgi.namespace.contract-"
6400 version "-sources.jar"))
6403 "1iz4f2i0fvqrlq90ki9nfzcfpvy2av434ri25bglywqssx8mmp36"))))
6404 (build-system ant-build-system)
6406 `(("resource" ,java-osgi-resource)
6407 ("annotation" ,java-osgi-annotation)))
6409 `(#:jar-name "osgi-namespace-contract.jar"
6410 #:tests? #f)); no tests
6411 (home-page "https://www.osgi.org")
6412 (synopsis "Contract Capability and Requirement Namespace")
6414 "OSGi, for Open Services Gateway initiative framework, is a module system
6415 and service platform for the Java programming language. This package contains
6416 the names for the attributes and directives for a namespace with contracts.")
6417 (license license:asl2.0)))
6419 (define-public java-osgi-namespace-extender
6421 (name "java-osgi-namespace-extender")
6425 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6426 "org.osgi.namespace.extender/"
6427 version "/org.osgi.namespace.extender-"
6428 version "-sources.jar"))
6431 "0jgqiak2i05qv6j3gd33xlaifzzc0ylxxk376v2x0apfg3vvixmz"))))
6432 (build-system ant-build-system)
6434 `(("resource" ,java-osgi-resource)
6435 ("annotation" ,java-osgi-annotation)))
6437 `(#:jar-name "osgi-namespace-extendent.jar"
6438 #:tests? #f)); no tests
6439 (home-page "https://www.osgi.org")
6440 (synopsis "Extender Capability and Requirement Namespace")
6442 "OSGi, for Open Services Gateway initiative framework, is a module system
6443 and service platform for the Java programming language. This package contains
6444 the names for the attributes and directives for an extender namespace.")
6445 (license license:asl2.0)))
6447 (define-public java-osgi-namespace-service
6449 (name "java-osgi-namespace-service")
6453 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6454 "org.osgi.namespace.service/"
6455 version "/org.osgi.namespace.service-"
6456 version "-sources.jar"))
6459 "0qmw8n2449nkmm56d1znz9zhazb6ya3vsimd5bf5jg23zzhgl8c8"))))
6460 (build-system ant-build-system)
6462 `(("resource" ,java-osgi-resource)
6463 ("annotation" ,java-osgi-annotation)))
6465 `(#:jar-name "osgi-namespace-service.jar"
6466 #:tests? #f)); no tests
6467 (home-page "https://www.osgi.org")
6468 (synopsis "Service Capability and Requirement Namespace")
6470 "OSGi, for Open Services Gateway initiative framework, is a module system
6471 and service platform for the Java programming language. This package contains
6472 the names for the attributes and directives for a service namespace.")
6473 (license license:asl2.0)))
6475 (define-public java-osgi-util-function
6477 (name "java-osgi-util-function")
6481 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6482 "org.osgi.util.function/"
6483 version "/org.osgi.util.function-"
6484 version "-sources.jar"))
6487 "04l7j3hwmmj28w23m7paca0afzncs42j2mdr3liqq8kvp548sc6x"))))
6488 (build-system ant-build-system)
6490 `(#:jar-name "osgi-util-function.jar"
6491 #:tests? #f)); no tests
6493 `(("annotation" ,java-osgi-annotation)))
6494 (home-page "https://www.osgi.org")
6495 (synopsis "OSGI Util Function")
6497 "OSGi, for Open Services Gateway initiative framework, is a module system
6498 and service platform for the Java programming language. This package contains
6499 an interface for a function that accepts a single argument and produces a result.")
6500 (license license:asl2.0)))
6502 (define-public java-osgi-util-promise
6504 (name "java-osgi-util-promise")
6508 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6509 "org.osgi.util.promise/"
6510 version "/org.osgi.util.promise-"
6511 version "-sources.jar"))
6514 "0y34dwiflg1c4ahvkswpf9z02xph2sr9fm04ia5493x3lshpw22c"))))
6515 (build-system ant-build-system)
6517 `(#:jar-name "osgi-util-promise.jar"
6518 #:tests? #f)); no tests
6520 `(("annotation" ,java-osgi-annotation)
6521 ("function" ,java-osgi-util-function)))
6522 (home-page "https://www.osgi.org")
6523 (synopsis "Promise of a value")
6525 "OSGi, for Open Services Gateway initiative framework, is a module system
6526 and service platform for the Java programming language. This package contains
6527 an interface and utilitary classes for promises. A Promise represents a future
6528 value. It handles the interactions for asynchronous processing.")
6529 (license license:asl2.0)))
6531 (define-public java-osgi-service-metatype-annotations
6533 (name "java-osgi-service-metatype-annotations")
6537 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6538 "org.osgi.service.metatype.annotations/"
6539 version "/org.osgi.service.metatype.annotations-"
6540 version "-sources.jar"))
6543 "12rwm3349wk80vm88rcdgs4435m4jxkpkj5mrx326skkz2c6hyw6"))))
6544 (build-system ant-build-system)
6546 `(#:jar-name "osgi-service-metatype-annotations.jar"
6547 #:tests? #f)); no tests
6549 `(("annotation" ,java-osgi-annotation)))
6550 (home-page "https://www.osgi.org")
6551 (synopsis "Support annotations for metatype")
6553 "OSGi, for Open Services Gateway initiative framework, is a module system
6554 and service platform for the Java programming language. This package contains
6555 the support annotations for metatype.")
6556 (license license:asl2.0)))
6558 (define-public java-osgi-service-repository
6560 (name "java-osgi-service-repository")
6564 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6565 "org.osgi.service.repository/"
6566 version "/org.osgi.service.repository-"
6567 version "-sources.jar"))
6570 "1k41mhg7b58pd8nsghr2qwcjrxdnf1p9spsw9v11k4257g6rl06n"))))
6571 (build-system ant-build-system)
6573 `(#:jar-name "osgi-service-repository.jar"
6574 #:tests? #f)); no tests
6576 `(("annotation" ,java-osgi-annotation)
6577 ("promise" ,java-osgi-util-promise)
6578 ("resource" ,java-osgi-resource)))
6579 (home-page "https://www.osgi.org")
6580 (synopsis "OSGI service repository")
6582 "OSGi, for Open Services Gateway initiative framework, is a module system
6583 and service platform for the Java programming language. This package contains
6584 a repository service that contains resources.")
6585 (license license:asl2.0)))
6587 (define-public java-osgi-framework
6589 (name "java-osgi-framework")
6593 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6594 "org.osgi.framework/" version "/org.osgi.framework-"
6595 version "-sources.jar"))
6598 "1lwp2zfad3rybcc6q9bwz8xsgkc92ypzy5p6x54387f1qj65m73s"))))
6599 (build-system ant-build-system)
6601 `(#:jar-name "osgi-framework.jar"
6602 #:tests? #f)); no tests
6604 `(("annotation" ,java-osgi-annotation)
6605 ("resource" ,java-osgi-resource)
6606 ("dto" ,java-osgi-dto)))
6607 (home-page "https://www.osgi.org")
6608 (synopsis "OSGi framework")
6610 "OSGi, for Open Services Gateway initiative framework, is a module system
6611 and service platform for the Java programming language.")
6612 (license license:asl2.0)))
6614 (define-public java-osgi-service-log
6616 (name "java-osgi-service-log")
6620 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6621 "org.osgi.service.log/"
6622 version "/org.osgi.service.log-"
6623 version "-sources.jar"))
6626 "1029j30dzcwializzca0j3fkhwwz08kmmsha5agw1iccscimj6r0"))))
6627 (build-system ant-build-system)
6629 `(#:jar-name "osgi-service-log.jar"
6630 #:tests? #f)); no tests
6632 `(("java-osgi-framework" ,java-osgi-framework)))
6633 (home-page "https://www.osgi.org")
6634 (synopsis "Provides methods for bundles to write messages to the log")
6636 "OSGi, for Open Services Gateway initiative framework, is a module system
6637 and service platform for the Java programming language. This package contains
6639 (license license:asl2.0)))
6641 (define-public java-osgi-service-jdbc
6643 (name "java-osgi-service-jdbc")
6647 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6648 "org.osgi.service.jdbc/"
6649 version "/org.osgi.service.jdbc-"
6650 version "-sources.jar"))
6653 "11iln5v7bk469cgb9ddkrz9sa95b3733gqgaqw9xf5g6wq652yjz"))))
6654 (build-system ant-build-system)
6656 `(#:jar-name "osgi-service-jdbc.jar"
6657 #:tests? #f)); no tests
6658 (home-page "https://www.osgi.org")
6659 (synopsis "Factory for JDBC connection factories")
6661 "OSGi, for Open Services Gateway initiative framework, is a module system
6662 and service platform for the Java programming language. This package contains
6663 a factory for JDBC connection factories. There are 3 preferred connection
6664 factories for getting JDBC connections:
6667 @item @code{javax.sql.DataSource};
6668 @item @code{javax.sql.ConnectionPoolDataSource};
6669 @item @code{javax.sql.XADataSource}.
6671 (license license:asl2.0)))
6673 (define-public java-osgi-service-resolver
6675 (name "java-osgi-service-resolver")
6679 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6680 "org.osgi.service.resolver/"
6681 version "/org.osgi.service.resolver-"
6682 version "-sources.jar"))
6685 "1dzqn1ryfi2rq4zwsgp44bmj2wlfydjg1qbxw2b0z4xdjjy55vxd"))))
6686 (build-system ant-build-system)
6688 `(#:jar-name "osgi-service-resolver.jar"
6689 #:tests? #f)); no tests
6691 `(("annotation" ,java-osgi-annotation)
6692 ("resource" ,java-osgi-resource)))
6693 (home-page "https://www.osgi.org")
6694 (synopsis "OSGI Resolver service")
6696 "OSGi, for Open Services Gateway initiative framework, is a module system
6697 and service platform for the Java programming language. This package contains
6698 a resolver service that resolves the specified resources in the context supplied
6700 (license license:asl2.0)))
6702 (define-public java-osgi-util-tracker
6704 (name "java-osgi-util-tracker")
6708 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6709 "org.osgi.util.tracker/"
6710 version "/org.osgi.util.tracker-"
6711 version "-sources.jar"))
6714 "0c4fh9vxwzsx59r8dygda0gq2gx3z5vfhc3jsphlqwf5w0h403lz"))))
6715 (build-system ant-build-system)
6717 `(#:jar-name "osgi-util-tracker.jar"
6718 #:tests? #f)); no tests
6720 `(("framework" ,java-osgi-framework)
6721 ("annotation" ,java-osgi-annotation)))
6722 (home-page "https://www.osgi.org")
6723 (synopsis "Bundle tracking")
6725 "OSGi, for Open Services Gateway initiative framework, is a module system
6726 and service platform for the Java programming language. This package contains
6727 bundle tracking utility classes.")
6728 (license license:asl2.0)))
6730 (define-public java-osgi-service-cm
6732 (name "java-osgi-service-cm")
6736 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6737 "org.osgi.service.cm/"
6738 version "/org.osgi.service.cm-"
6739 version "-sources.jar"))
6742 "1z8kap48y3xi0ggj8v6czglfnpnd94mmismgi2wbqhj1nl5fzbp6"))))
6743 (build-system ant-build-system)
6745 `(#:jar-name "osgi-service-cm.jar"
6746 #:tests? #f)); no tests
6748 `(("framework" ,java-osgi-framework)
6749 ("annotation" ,java-osgi-annotation)))
6750 (home-page "https://www.osgi.org")
6751 (synopsis "OSGI Configuration Management")
6753 "OSGi, for Open Services Gateway initiative framework, is a module system
6754 and service platform for the Java programming language. This package contains
6755 utility classes for the configuration of services.")
6756 (license license:asl2.0)))
6758 (define-public java-osgi-service-packageadmin
6760 (name "java-osgi-service-packageadmin")
6764 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6765 "org.osgi.service.packageadmin/"
6766 version "/org.osgi.service.packageadmin-"
6767 version "-sources.jar"))
6770 "041mpxzi7g36wmcily6y4ccn3jx15akpdy8gmhyb7m98x7qfvn52"))))
6771 (build-system ant-build-system)
6773 `(#:jar-name "osgi-service-packageadmin.jar"
6774 #:tests? #f)); no tests
6776 `(("framework" ,java-osgi-framework)))
6777 (home-page "https://www.osgi.org")
6778 (synopsis "OSGI Package Administration")
6780 "OSGi, for Open Services Gateway initiative framework, is a module system
6781 and service platform for the Java programming language. This package contains
6782 the packageadmin service.")
6783 (license license:asl2.0)))
6785 (define-public java-ops4j-base-lang
6787 (name "java-ops4j-base-lang")
6791 (uri (string-append "https://github.com/ops4j/org.ops4j.base/"
6792 "archive/base-" version ".tar.gz"))
6795 "18hl3lpchgpv8yh5rlk39l2gif5dlfgb8gxjmncf39pr2dprkniw"))))
6796 (build-system ant-build-system)
6798 `(#:jar-name "java-ops4j-base-lang.jar"
6799 #:source-dir "ops4j-base-lang/src/main/java"
6800 #:tests? #f; no tests
6802 (modify-phases %standard-phases
6803 (add-before 'build 'add-test-file
6805 ;; That file is required by a test in ops4j-pax-exam-core-spi
6806 (mkdir-p "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang")
6807 (with-output-to-file "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang/pom.properties"
6811 "version=" ,version "\n"
6812 "groupId=org.ops4j.base"
6813 "artifactId=ops4j-base-lang\n")))))))))
6814 (home-page "https://ops4j1.jira.com/wiki/spaces/base/overview")
6815 (synopsis "Utility classes and extensions to be used in OPS4J projects")
6816 (description "OPS4J stands for Open Participation Software for Java. This
6817 package contains utilities and extensions related to @code{java.lang}.")
6818 (license license:asl2.0)))
6820 (define-public java-ops4j-base-monitors
6822 (inherit java-ops4j-base-lang)
6823 (name "java-ops4j-base-monitors")
6825 `(#:jar-name "java-ops4j-base-monitors.jar"
6826 #:source-dir "ops4j-base-monitors/src/main/java"
6827 #:tests? #f)); no tests
6829 `(("lang" ,java-ops4j-base-lang)))
6830 (description "OPS4J stands for Open Participation Software for Java. This
6831 package contains utilities and extensions related to monitoring.")))
6833 (define-public java-ops4j-base-io
6835 (inherit java-ops4j-base-lang)
6836 (name "java-ops4j-base-io")
6838 `(#:jar-name "java-ops4j-base-io.jar"
6839 #:source-dir "ops4j-base-io/src/main/java"
6840 #:test-dir "ops4j-base-io/src/test"
6842 (list "**/ListerTest.java")))
6844 `(("lang" ,java-ops4j-base-monitors)
6845 ("lang" ,java-ops4j-base-lang)))
6847 `(("junit" ,java-junit)
6848 ("hamcrest" ,java-hamcrest-core)))
6849 (description "OPS4J stands for Open Participation Software for Java. This
6850 package contains utilities and extensions related to handling streams and files.")))
6852 (define-public java-ops4j-base-util
6854 (inherit java-ops4j-base-lang)
6855 (name "java-ops4j-base-util")
6857 `(#:jar-name "java-ops4j-base-util.jar"
6858 #:source-dir "ops4j-base-util/src/main/java"
6859 #:test-dir "ops4j-base-util/src/test"))
6861 `(("lang" ,java-ops4j-base-lang)))
6863 `(("junit" ,java-junit)))
6864 (description "OPS4J stands for Open Participation Software for Java. This
6865 package contains utilities and extensions related to environment, i18n and
6868 (define-public java-ops4j-base-util-property
6870 (inherit java-ops4j-base-lang)
6871 (name "java-ops4j-base-util-property")
6873 `(#:jar-name "java-ops4j-base-util-property.jar"
6874 #:source-dir "ops4j-base-util-property/src/main/java"
6875 #:tests? #f)); no tests
6877 `(("lang" ,java-ops4j-base-lang)
6878 ("util" ,java-ops4j-base-util)))
6879 (description "OPS4J stands for Open Participation Software for Java. This
6880 package contains utilities and extensions related to resolving properties from
6881 different sources.")))
6883 (define-public java-ops4j-base-store
6885 (inherit java-ops4j-base-lang)
6886 (name "java-ops4j-base-store")
6888 `(#:jar-name "java-ops4j-base-store.jar"
6889 #:source-dir "ops4j-base-store/src/main/java"
6890 #:tests? #f)); no tests
6892 `(("lang" ,java-ops4j-base-lang)
6893 ("slf4j" ,java-slf4j-api)
6894 ("io" ,java-ops4j-base-io)))
6895 (description "OPS4J stands for Open Participation Software for Java. This
6896 package contains utilities for storing and retrieving data from an
6897 @code{InputStream}.")))
6899 (define-public java-ops4j-base-spi
6901 (inherit java-ops4j-base-lang)
6902 (name "java-ops4j-base-spi")
6904 `(#:jar-name "java-ops4j-base-spi.jar"
6905 #:source-dir "ops4j-base-spi/src/main/java"
6906 #:test-dir "ops4j-base-spi/src/test"))
6908 `(("junit" ,java-junit)
6909 ("hamcrest" ,java-hamcrest-core)))
6910 (description "OPS4J stands for Open Participation Software for Java. This
6911 package contains utilities for obtaining services via the Java SE 6
6912 @code{ServiceLoader}.")))
6914 (define-public java-aqute-bnd-annotation
6916 (name "java-aqute-bnd-annotation")
6920 (uri (string-append "https://github.com/bndtools/bnd/archive/"
6921 version ".REL.tar.gz"))
6922 (file-name (string-append name "-" version ".tar.gz"))
6925 "09vgb6axikbz66zi9falijbnzh1qnp9ysfns123dmzdb01cbza9q"))))
6926 (build-system ant-build-system)
6928 `(#:jar-name "java-aqute-bnd-annotation.jar"
6929 #:source-dir "biz.aQute.bnd.annotation/src"
6930 #:tests? #f)); empty test dir
6931 (home-page "http://bnd.bndtools.org/")
6932 (synopsis "Tools for OSGi")
6933 (description "Bnd is a swiss army knife for OSGi, it creates manifest
6934 headers based on analyzing the class code, it verifies the project settings,
6935 it manages project dependencies, gives diffs jars, and much more.")
6936 (license license:asl2.0)))
6938 (define-public java-aqute-libg
6940 (inherit java-aqute-bnd-annotation)
6941 (name "java-aqute-libg")
6943 `(#:jar-name "java-aqute-libg.jar"
6944 #:source-dir "aQute.libg/src"
6945 #:tests? #f)); FIXME: tests are in "aQute.libg/test", not in a java directory
6947 `(("slf4j" ,java-slf4j-api)
6948 ("osgi-annot" ,java-osgi-annotation)
6949 ("java-osgi-cmpn" ,java-osgi-cmpn)
6950 ("osgi" ,java-osgi-core)))))
6952 (define-public java-aqute-bndlib
6954 (inherit java-aqute-bnd-annotation)
6955 (name "java-aqute-bndlib")
6957 `(#:jar-name "java-bndlib.jar"
6958 #:source-dir "biz.aQute.bndlib/src"
6959 #:tests? #f)); no tests
6961 `(("slf4j" ,java-slf4j-api)
6962 ("osgi-annot" ,java-osgi-annotation)
6963 ("java-aqute-libg" ,java-aqute-libg)
6964 ("java-aqute-bnd-annotation" ,java-aqute-bnd-annotation)
6965 ("java-osgi-service-component-annotations" ,java-osgi-service-component-annotations)
6966 ("java-osgi-service-repository" ,java-osgi-service-repository)
6967 ("java-osgi-service-log" ,java-osgi-service-log)
6968 ("java-osgi-service-metatype-annotations" ,java-osgi-service-metatype-annotations)
6969 ("java-osgi-namespace-contract" ,java-osgi-namespace-contract)
6970 ("java-osgi-namespace-extender" ,java-osgi-namespace-extender)
6971 ("java-osgi-namespace-service" ,java-osgi-namespace-service)
6972 ("promise" ,java-osgi-util-promise)
6973 ("osgi" ,java-osgi-core)))))
6975 (define-public java-ops4j-pax-tinybundles
6977 (name "java-ops4j-pax-tinybundles")
6981 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.tinybundles/"
6982 "archive/tinybundles-" version ".tar.gz"))
6985 "0y0gq3pvv0iir2b885lmlwnvr724vv7vklzhhr4fs27d7mdkj871"))))
6987 `(#:jar-name "java-ops4j-pax-tinybundles.jar"
6988 #:source-dir "src/main/java"
6990 ;; Abstract base classes for other tests
6991 (list "**/BndTest.java" "**/CoreTest.java")
6993 (modify-phases %standard-phases
6994 (add-before 'check 'fix-version
6996 ;; This test has a reference to an old version of bndlib we are not
6997 ;; packaging. It uses the version referenced in pom.xml. We replace
6998 ;; it with our own version.
6999 (substitute* "src/test/java/org/ops4j/pax/tinybundles/bnd/BndTest.java"
7000 (("[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*")
7001 ,(package-version java-aqute-bndlib))))))))
7003 `(("lang" ,java-ops4j-base-lang)
7004 ("io" ,java-ops4j-base-io)
7005 ("store" ,java-ops4j-base-store)
7006 ("slf4j" ,java-slf4j-api)
7007 ("libg" ,java-aqute-libg)
7008 ("bndlib" ,java-aqute-bndlib)))
7010 `(("junit" ,java-junit)
7011 ("hamcrest" ,java-hamcrest-core)
7012 ("log4j" ,java-log4j-api)
7013 ("bndannotation" ,java-aqute-bnd-annotation)
7014 ("framework" ,java-osgi-framework)))
7015 (build-system ant-build-system)
7016 (home-page "https://ops4j1.jira.com/wiki/spaces/ops4j/pages/12060312/Tinybundles")
7017 (synopsis "Java APIs to create OSGi related artifacts")
7018 (description "Tinybundles is all about creating OSGi related artifacts like
7019 Bundles, Fragments and Deployment Packages with Java Api. It is very convinient
7020 to create such artifacts on-the-fly inside Tests (like in Pax Exam). On the
7021 other hand, this library can be a foundation of real end user tools that need
7022 to create those artifacts.")
7023 (license license:asl2.0)))
7025 (define-public java-ops4j-pax-exam-core
7027 (name "java-ops4j-pax-exam-core")
7031 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.exam2/"
7032 "archive/exam-reactor-" version ".tar.gz"))
7035 "08mzw8nkah3rj3vznlplnawspxhp61zgvb44ifqa1rni1cvbms2g"))))
7037 `(#:jar-name "java-ops4j-pax-exam-core.jar"
7038 #:source-dir "core/pax-exam/src/main/java"
7039 #:test-dir "core/pax-exam/src/test"))
7041 `(("slf4j" ,java-slf4j-api)
7042 ("lang" ,java-ops4j-base-lang)
7043 ("io" ,java-ops4j-base-io)
7044 ("util-property" ,java-ops4j-base-util-property)
7045 ("util-store" ,java-ops4j-base-store)
7046 ("java-osgi-core" ,java-osgi-core)))
7048 `(("junit" ,java-junit)
7049 ("hamcrest" ,java-hamcrest-core)))
7050 (build-system ant-build-system)
7051 (home-page "https://ops4j1.jira.com/wiki/spaces/PAXEXAM4/overview")
7052 (synopsis "In-Container Testing for OSGi, Java EE and CDI")
7053 (description "Pax Exam creates OSGi bundles for testing purposes. It lets
7054 the user take control of the OSGi framework, the test framework (e.g. JUnit) and
7055 the system under test at the same time.")
7056 (license license:asl2.0)))
7058 (define-public java-ops4j-pax-exam-core-spi
7060 (inherit java-ops4j-pax-exam-core)
7061 (name "java-ops4j-pax-exam-core-spi")
7063 `(#:jar-name "java-ops4j-pax-exam-spi.jar"
7064 #:source-dir "src/main/java"
7067 ;; Abstract base class, not a test
7068 "**/BaseStagedReactorTest.java"
7069 ;; Depends on org.mortbay.jetty.testwars:test-war-dump
7070 "**/WarBuilderTest.java")
7072 (modify-phases %standard-phases
7073 (add-before 'configure 'chdir
7075 ;; Tests assume we are in this directory
7076 (chdir "core/pax-exam-spi")))
7077 (add-before 'check 'fix-tests
7079 ;; One test checks that this file is present.
7080 (mkdir-p "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi")
7081 (with-output-to-file
7082 "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi/pom.properties"
7085 (string-append "artifactId = pax-exam-spi\n"
7086 "version = " ,(package-version java-ops4j-pax-exam-core-spi)))))
7087 ;; Maven puts compilation results in the target directory, while we
7088 ;; put them in the build directory.
7089 (substitute* '("src/test/java/org/ops4j/pax/exam/spi/war/WarBuilderTest.java"
7090 "src/test/java/org/ops4j/pax/exam/spi/war/WarTestProbeBuilderTest.java"
7091 "src/test/java/org/ops4j/pax/exam/spi/war/ZipBuilderTest.java")
7092 (("target") "build"))
7093 ;; One test is expected to fail, but it doesn't throw the expected exception
7094 (substitute* "src/test/java/org/ops4j/pax/exam/spi/reactors/BaseStagedReactorTest.java"
7095 (("AssertionError") "IllegalArgumentException")))))))
7097 `(("java-ops4j-pax-exam-core" ,java-ops4j-pax-exam-core)
7098 ("lang" ,java-ops4j-base-lang)
7099 ("monitors" ,java-ops4j-base-monitors)
7100 ("store" ,java-ops4j-base-store)
7101 ("io" ,java-ops4j-base-io)
7102 ("spi" ,java-ops4j-base-spi)
7103 ("osgi" ,java-osgi-core)
7104 ("slf4j" ,java-slf4j-api)
7105 ("tinybundles" ,java-ops4j-pax-tinybundles)))
7107 `(("mockito" ,java-mockito-1)
7108 ("junit" ,java-junit)
7109 ("hamcrest" ,java-hamcrest-core)
7110 ("cglib" ,java-cglib)
7111 ("objenesis" ,java-objenesis)
7112 ("asm" ,java-asm)))))
7114 (define-public java-ops4j-pax-exam-core-junit
7116 (inherit java-ops4j-pax-exam-core)
7117 (name "java-ops4j-pax-exam-core-junit")
7119 `(#:jar-name "ops4j-pax-exam-core-junit.jar"
7120 #:source-dir "drivers/pax-exam-junit4/src/main/java"
7121 #:tests? #f)); no tests
7123 `(("junit" ,java-junit)
7124 ("slf4j" ,java-slf4j-api)
7125 ("core" ,java-ops4j-pax-exam-core)
7126 ("spi" ,java-ops4j-pax-exam-core-spi)))
7127 (native-inputs '())))
7129 (define-public java-fasterxml-jackson-annotations
7131 (name "java-fasterxml-jackson-annotations")
7135 (uri (string-append "https://github.com/FasterXML/"
7136 "jackson-annotations/archive/"
7137 "jackson-annotations-" version ".tar.gz"))
7140 "0mr95xd0da6a4g95zvrl1ryk5n5zv2rc696w3xnsr5hxk2gicfc4"))))
7141 (build-system ant-build-system)
7143 `(#:jar-name "jackson-annotations.jar"
7144 #:source-dir "src/main/java"
7145 #:test-dir "src/test"))
7147 `(("junit" ,java-junit)))
7148 (home-page "https://github.com/FasterXML/jackson-annotations")
7149 (synopsis "General purpose annotations for the Jackson Data Processor")
7150 (description "This package contains general purpose annotations for the
7151 Jackson Data Processor, used on value and handler types. The only annotations
7152 not included are ones that require dependency to the Databind package.")
7153 (license license:asl2.0)))
7155 (define-public java-fasterxml-jackson-core
7157 (name "java-fasterxml-jackson-core")
7161 (uri (string-append "https://github.com/FasterXML/"
7162 "jackson-core/archive/"
7163 "jackson-core-" version ".tar.gz"))
7166 "159hsnk17jr1gyzkf01cxvsn45srnk37g949r7364qlsr527gjgd"))))
7167 (build-system ant-build-system)
7169 `(#:jar-name "jackson-core.jar"
7170 #:source-dir "src/main/java"
7171 #:test-dir "src/test"
7174 ;; Expected failure. pom.xml excludes these
7176 ;; Base classes that have no constructor for junit
7178 "**/ConcurrencyReadTest.java"
7179 "**/ManualCharAccessTest.java"
7180 "**/ManualCharAccessTest.java"
7181 "**/TrailingCommasTest.java"
7182 "**/AsyncMissingValuesInObjectTest.java"
7183 "**/AsyncMissingValuesInArrayTest.java")
7185 (modify-phases %standard-phases
7186 (add-before 'configure 'generate-PackageVersion.java
7188 (let* ((out "src/main/java/com/fasterxml/jackson/core/json/PackageVersion.java")
7189 (in (string-append out ".in")))
7192 (("@package@") "com.fasterxml.jackson.core.json")
7193 (("@projectversion@") ,version)
7194 (("@projectgroupid@") "com.fasterxml.jackson.core")
7195 (("@projectartifactid@") "jackson-core")))))
7196 (add-before 'build 'copy-resources
7198 (copy-recursively "src/main/resources"
7200 (add-before 'check 'copy-test-resources
7202 (copy-recursively "src/test/resources"
7203 "build/test-classes"))))))
7205 `(("junit" ,java-junit)
7206 ("hamcrest" ,java-hamcrest-core)))
7207 (home-page "https://github.com/FasterXML/jackson-core")
7210 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
7212 (define-public java-fasterxml-jackson-databind
7214 (name "java-fasterxml-jackson-databind")
7218 (uri (string-append "https://github.com/FasterXML/"
7219 "jackson-databind/archive/"
7220 "jackson-databind-" version ".tar.gz"))
7223 "1zd2cw4z6kdkbx8za96xh9pyicv2a2l7y0rkcx2fqd8hv6d47s08"))))
7224 (build-system ant-build-system)
7226 `(#:jar-name "jackson-databind.jar"
7227 #:source-dir "src/main/java"
7228 #:tests? #f; requires javax.measures for which I can't find a free implementation
7230 (modify-phases %standard-phases
7231 (add-before 'configure 'generate-PackageVersion.java
7233 (let* ((out "src/main/java/com/fasterxml/jackson/databind/cfg/PackageVersion.java")
7234 (in (string-append out ".in")))
7237 (("@package@") "com.fasterxml.jackson.databind.cfg")
7238 (("@projectversion@") ,version)
7239 (("@projectgroupid@") "com.fasterxml.jackson.databind")
7240 (("@projectartifactid@") "jackson-databind")))))
7241 (add-before 'build 'copy-resources
7243 (copy-recursively "src/main/resources" "build/classes"))))))
7245 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
7246 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)))
7247 (home-page "https://github.com/FasterXML/jackson-databind")
7248 (synopsis "Data-binding functionality and tree-model for the Jackson Data Processor")
7249 (description "This package contains the general-purpose data-binding
7250 functionality and tree-model for Jackson Data Processor. It builds on core
7251 streaming parser/generator package, and uses Jackson Annotations for
7253 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
7255 (define-public java-fasterxml-jackson-modules-base-jaxb
7257 (name "java-fasterxml-jackson-modules-base-jaxb")
7261 (uri (string-append "https://github.com/FasterXML/"
7262 "jackson-modules-base/archive/"
7263 "jackson-modules-base-" version ".tar.gz"))
7266 "1wws95xi8sppp6b0k2vvjdjyynl20r1a4dwrhai08lzlria6blp5"))))
7267 (build-system ant-build-system)
7269 `(#:jar-name "jackson-modules-base-jaxb.jar"
7270 #:source-dir "jaxb/src/main/java"
7271 #:test-dir "jaxb/src/test"
7273 ;; Base class for tests
7274 (list "**/BaseJaxbTest.java")
7276 (modify-phases %standard-phases
7277 (add-before 'configure 'generate-PackageVersion.java
7279 (let* ((out (string-append "jaxb/src/main/java/com/fasterxml/"
7280 "jackson/module/jaxb/PackageVersion.java"))
7281 (in (string-append out ".in")))
7284 (("@package@") "com.fasterxml.jackson.module.jaxb")
7285 (("@projectversion@") ,version)
7286 (("@projectgroupid@") "com.fasterxml.jackson.module.jaxb")
7287 (("@projectartifactid@") "jackson-module-jaxb")))))
7288 (add-before 'build 'copy-resources
7290 (copy-recursively "jaxb/src/main/resources" "build/classes"))))))
7292 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
7293 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
7294 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)))
7296 `(("java-junit" ,java-junit)))
7297 (home-page "https://github.com/FasterXML/jackson-modules-base")
7298 (synopsis "Jaxb annotations jackson module")
7299 (description "This package is the jaxb annotations module for jackson.")
7300 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
7302 (define-public java-snakeyaml
7304 (name "java-snakeyaml")
7308 (uri (string-append "https://bitbucket.org/asomov/snakeyaml/get/v"
7312 "0rf5ha6w0waz50jz2479jsrbgmd0dnx0gs337m126j5z7zlmg7mg"))))
7313 (build-system ant-build-system)
7315 `(#:jar-name "java-snakeyaml.jar"
7316 #:source-dir "src/main/java"
7317 ;; Tests require velocity, a cyclic dependency, and
7318 ;; java-spring-framework-context which is not packaged.
7320 (home-page "https://bitbucket.org/asomov/snakeyaml")
7321 (synopsis "YAML processor")
7322 (description "SnakeYAML is a YAML processor for the Java Virtual Machine.")
7323 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
7325 (define-public java-fasterxml-jackson-dataformat-yaml
7327 (name "java-fasterxml-jackson-dataformat-yaml")
7331 (uri (string-append "https://github.com/FasterXML/"
7332 "jackson-dataformats-text/archive/"
7333 "jackson-dataformats-text-" version ".tar.gz"))
7336 "1hikl06khaxbg439avf442qifcadap8w0lx13f0nnhp2vh3dkbz7"))))
7337 (build-system ant-build-system)
7339 `(#:jar-name "jackson-dataformat-yaml.jar"
7340 #:source-dir "yaml/src/main/java"
7341 #:test-dir "yaml/src/test"
7342 #:test-exclude (list "**/failing/**.java")
7344 (modify-phases %standard-phases
7345 (add-before 'configure 'generate-PackageVersion.java
7347 (let* ((out "yaml/src/main/java/com/fasterxml/jackson/dataformat/yaml/PackageVersion.java")
7348 (in (string-append out ".in")))
7351 (("@package@") "com.fasterxml.jackson.dataformat.yaml")
7352 (("@projectversion@") ,version)
7353 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.yaml")
7354 (("@projectartifactid@") "jackson-dataformat-yaml"))))))))
7356 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
7357 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
7358 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)
7359 ("java-snakeyaml" ,java-snakeyaml)))
7361 `(("junit" ,java-junit)
7362 ("hamcrest" ,java-hamcrest-core)
7363 ("java-ops4j-pax-exam-core-spi" ,java-ops4j-pax-exam-core-spi)
7364 ("java-ops4j-pax-exam-core-junit" ,java-ops4j-pax-exam-core-junit)
7365 ("java-ops4j-pax-exam" ,java-ops4j-pax-exam-core)))
7366 (home-page "https://github.com/FasterXML/jackson-dataformats-text")
7367 (synopsis "Yaml backend for Jackson")
7368 (description "Dataformat backends are used to support format alternatives
7369 to JSON, supported by default. This is done by sub-classing Jackson core
7371 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
7373 (define-public java-stax2-api
7375 (name "java-stax2-api")
7379 (uri (string-append "https://github.com/FasterXML/stax2-api/archive/"
7380 "stax2-api-" version ".tar.gz"))
7383 "1amc1si0l0hyyw2sawmnzy4hkna3z6fp195y4nm5m9wb9ld5awkq"))))
7384 (build-system ant-build-system)
7386 `(#:jar-name "java-stax2-api.jar"
7387 #:source-dir "src/main/java"
7388 #:tests? #f)); no tests
7389 (home-page "https://github.com/FasterXML/stax2-api")
7390 (synopsis "Stax2 API")
7391 (description "Stax2 API is an extension to basic Stax 1.0 API that adds
7392 significant new functionalities, such as full-featured bi-direction validation
7393 interface and high-performance Typed Access API.")
7394 (license license:bsd-2)))
7396 (define-public java-woodstox-core
7398 (name "java-woodstox-core")
7402 (uri (string-append "https://github.com/FasterXML/woodstox/archive/"
7403 "woodstox-core-" version ".tar.gz"))
7406 "1i7pdgb8jbw6gdy5kmm0l6rz109n2ns92pqalpyp24vb8vlvdfd4"))))
7407 (build-system ant-build-system)
7409 `(#:jar-name "woodstox.jar"
7411 (list "**/Base*.java" "failing/**")
7413 (modify-phases %standard-phases
7414 (add-before 'build 'remove-msv-dep
7416 ;; we don't need osgi, and it depends on msv
7417 (delete-file-recursively "src/main/java/com/ctc/wstx/osgi")
7418 ;; msv's latest release is from 2011 and we don't need it
7419 (delete-file-recursively "src/main/java/com/ctc/wstx/msv")
7420 (delete-file-recursively "src/test/java/wstxtest/osgi")
7421 (delete-file-recursively "src/test/java/wstxtest/msv")))
7422 (add-before 'build 'copy-resources
7424 (copy-recursively "src/main/resources" "build/classes"))))))
7426 `(("stax2" ,java-stax2-api)))
7428 `(("junit" ,java-junit)))
7429 (home-page "https://github.com/FasterXML/woodstox")
7430 (synopsis "Stax XML API implementation")
7431 (description "Woodstox is a stax XML API implementation.")
7432 (license license:asl2.0)))
7434 (define-public java-fasterxml-jackson-dataformat-xml
7436 (name "java-fasterxml-jackson-dataformat-xml")
7440 (uri (string-append "https://github.com/FasterXML/"
7441 "jackson-dataformat-xml/archive/"
7442 "jackson-dataformat-xml-" version ".tar.gz"))
7445 "111fkkl90w31jbf30kgj82qdcxlw4sxppki7i198liw0ck1jcavq"))))
7446 (build-system ant-build-system)
7448 `(#:jar-name "jackson-dataformat-xml.jar"
7449 #:source-dir "src/main/java"
7451 (list "**/failing/**")
7453 (modify-phases %standard-phases
7454 (add-before 'configure 'generate-PackageVersion.java
7456 (let* ((out "src/main/java/com/fasterxml/jackson/dataformat/xml/PackageVersion.java")
7457 (in (string-append out ".in")))
7461 (("@package@") "com.fasterxml.jackson.dataformat.xml")
7462 (("@projectversion@") ,version)
7463 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.xml")
7464 (("@projectartifactid@") "jackson-dataformat-xml")))))
7465 (add-before 'build 'copy-resources
7467 (copy-recursively "src/main/resources" "build/classes"))))))
7469 `(("jackson-annotations" ,java-fasterxml-jackson-annotations)
7470 ("jackson-core" ,java-fasterxml-jackson-core)
7471 ("jackson-modules-base-jaxb" ,java-fasterxml-jackson-modules-base-jaxb)
7472 ("jackson-databind" ,java-fasterxml-jackson-databind)
7473 ("stax2-api" ,java-stax2-api)
7474 ("woodstox" ,java-woodstox-core)))
7476 `(("junit" ,java-junit)
7477 ("hamcrest" ,java-hamcrest-core)))
7478 (home-page "https://github.com/FasterXML/jackson-dataformat-xml")
7479 (synopsis "Read and write XML")
7480 (description "This package contains Jackson extension component for reading
7481 and writing XML encoded data.
7483 Further, the goal is to emulate how JAXB data-binding works with \"Code-first\"
7484 approach (that is, no support is added for \"Schema-first\" approach). Support
7485 for JAXB annotations is provided by JAXB annotation module; this module
7486 provides low-level abstractions (@code{JsonParser}, @code{JsonGenerator},
7487 @code{JsonFactory}) as well as small number of higher level overrides needed to
7488 make data-binding work.")
7489 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
7491 (define-public java-hdrhistogram
7493 (name "java-hdrhistogram")
7497 (uri (string-append "https://github.com/HdrHistogram/HdrHistogram/"
7498 "archive/HdrHistogram-" version ".tar.gz"))
7501 "1sicbmc3sr42nw93qbkb26q9rn33ag33k6k77phjc3j5h5gjffqv"))))
7502 (build-system ant-build-system)
7504 `(#:jar-name "java-hdrhistogram.jar"
7505 #:source-dir "src/main/java"
7507 (modify-phases %standard-phases
7508 (add-before 'configure 'set-version
7510 (let* ((version-java "src/main/java/org/HdrHistogram/Version.java")
7511 (template (string-append version-java ".template")))
7512 (copy-file template version-java)
7513 (substitute* version-java
7514 (("\\$VERSION\\$") ,version)
7515 (("\\$BUILD_TIME\\$") "0"))
7518 `(("junit" ,java-junit)
7519 ("hamcrest" ,java-hamcrest-core)))
7520 (home-page "https://hdrhistogram.github.io/HdrHistogram")
7521 (synopsis "High dynamic range histogram")
7522 (description "Hdrhistogram allows to create histograms that support
7523 recording and analyzing sampled data value counts across a configurable integer
7524 value range with configurable value precision within the range. Value precision
7525 is expressed as the number of significant digits in the value recording, and
7526 provides control over value quantization behavior across the value range and
7527 the subsequent value resolution at any given level.")
7528 (license license:public-domain)))
7530 (define-public java-cofoja
7532 (name "java-cofoja")
7537 (url "https://github.com/nhatminhle/cofoja.git")
7538 (commit (string-append "v" version))))
7539 (file-name (string-append "java-cofoja-" version "-checkout"))
7542 "0p7sz8y5xgpi5rx1qwn6587fkd52qr3ha3ybh14gqcyxhikl525w"))))
7543 (build-system ant-build-system)
7545 `(#:build-target "dist"
7546 #:test-target "test"
7549 (list "-Ddist.dir=dist")
7550 #:modules ((guix build ant-build-system)
7551 (guix build java-utils)
7556 (modify-phases %standard-phases
7557 ;; The bulid system ignores the class path the ant-build-system sets
7558 ;; up and instead expects to find all dependencies in the "lib"
7560 (add-after 'unpack 'create-libdir
7561 (lambda* (#:key inputs #:allow-other-keys)
7565 (let ((target (string-append "lib/" (basename file))))
7566 (unless (file-exists? target)
7567 (symlink file target))))
7568 (append-map (match-lambda
7570 (find-files dir "\\.jar$")))
7573 (replace 'install (install-jars "dist")))))
7575 `(("java-asm" ,java-asm)))
7577 `(("java-junit" ,java-junit)))
7578 (home-page "https://github.com/nhatminhle/cofoja")
7579 (synopsis "Contracts for Java")
7580 (description "Contracts for Java, or Cofoja for short, is a contract
7581 programming framework and test tool for Java, which uses annotation processing
7582 and bytecode instrumentation to provide run-time checking. (In particular,
7583 this is not a static analysis tool.)")
7584 (license license:lgpl3+)))
7586 (define-public java-aopalliance
7588 (name "java-aopalliance")
7592 ;; Note: this git repository is not official, but contains the
7593 ;; source code that is in the CVS repository. Downloading the
7594 ;; tarball from sourceforge is undeterministic, and the cvs download
7597 (url "https://github.com/hoverruan/aopalliance")
7598 (commit "0d7757ae204e5876f69431421fe9bc2a4f01e8a0")))
7599 (file-name (string-append name "-" version))
7602 "0rsg2b0v3hxlq2yk1i3m2gw3xwq689j3cwx9wbxvqfpdcjbca0qr"))))
7603 (build-system ant-build-system)
7605 `(#:jar-name "java-aopalliance.jar"
7607 #:tests? #f; no tests
7608 #:source-dir "aopalliance/src/main"))
7609 (home-page "http://aopalliance.sourceforge.net")
7610 (synopsis "Aspect-Oriented Programming")
7611 (description "The AOP Alliance project is a joint project between several
7612 software engineering people who are interested in Aspect-Oriented Programming
7614 (license license:public-domain)))
7616 (define-public java-javax-inject
7618 (name "java-javax-inject")
7622 (uri (string-append "https://github.com/javax-inject/javax-inject/"
7623 "archive/javax.inject-" version ".tar.gz"))
7626 "1ydrlvh2r7vr1g7lhjwy3w2dggpj9h6pix1lakkkgdywb365n6g0"))))
7627 (build-system ant-build-system)
7629 `(#:jar-name "java-javax-inject.jar"
7631 #:tests? #f)); no tests
7632 (home-page "http://github.com/javax-inject/javax-inject")
7633 (synopsis "JSR-330: Dependency Injection for Java")
7634 (description "This package specifies a means for obtaining objects in such
7635 a way as to maximize reusability, testability and maintainability compared to
7636 traditional approaches such as constructors, factories, and service locators
7637 (e.g., JNDI). This process, known as dependency injection, is beneficial to
7638 most nontrivial applications.
7640 Many types depend on other types. For example, a @var{Stopwatch} might depend
7641 on a @var{TimeSource}. The types on which a type depends are known as its
7642 dependencies. The process of finding an instance of a dependency to use at run
7643 time is known as resolving the dependency. If no such instance can be found,
7644 the dependency is said to be unsatisfied, and the application is broken.")
7645 (license license:asl2.0)))
7647 (define-public java-guice
7653 (uri (string-append "https://github.com/google/guice/archive/"
7655 (file-name (string-append name "-" version ".tar.gz"))
7658 "0dwmqjzlavb144ywqqglj3h68hqszkff8ai0a42hyb5il0qh4rbp"))))
7659 (build-system ant-build-system)
7661 `(#:jar-name "java-guice.jar"
7663 #:tests? #f; FIXME: tests are not in a java sub directory
7664 #:source-dir "core/src"))
7666 `(("guava" ,java-guava)
7667 ("java-cglib" ,java-cglib)
7668 ("java-aopalliance" ,java-aopalliance)
7669 ("java-javax-inject" ,java-javax-inject)
7670 ("java-asm" ,java-asm)))
7671 (home-page "https://github.com/google/guice")
7672 (synopsis "Lightweight dependency injection framework")
7673 (description "Guice is a lightweight dependency injection framework fo
7675 (license license:asl2.0)))
7677 (define-public java-guice-servlet
7679 (inherit java-guice)
7680 (name "java-guice-servlet")
7682 `(#:jar-name "guice-servlet.jar"
7683 #:source-dir "extensions/servlet/src/"
7685 #:tests? #f)); FIXME: not in a java subdir
7687 `(("guice" ,java-guice)
7688 ("servlet" ,java-tomcat)
7689 ,@(package-inputs java-guice)))))
7691 (define-public java-assertj
7693 (name "java-assertj")
7697 (uri (string-append "https://github.com/joel-costigliola/"
7698 "assertj-core/archive/"
7699 "assertj-core-" version ".tar.gz"))
7702 "1kf124fxskf548rklkg86294w2x6ajqrff94rrhyqns31danqkfz"))))
7703 (build-system ant-build-system)
7705 `(#:jar-name "java-assertj.jar"
7707 #:source-dir "src/main/java"
7708 #:tests? #f)); depends on tng-junit which depends on assertj
7710 `(("cglib" ,java-cglib)
7711 ("junit" ,java-junit)
7712 ("hamcrest" ,java-hamcrest-core)))
7714 `(("mockito" ,java-mockito-1)))
7715 (home-page "https://joel-costigliola.github.io/assertj/index.html")
7716 (synopsis "Fluent assertions for java")
7717 (description "AssertJ core is a Java library that provides a fluent
7718 interface for writing assertions. Its main goal is to improve test code
7719 readability and make maintenance of tests easier.")
7720 (license license:asl2.0)))
7722 (define-public java-jboss-javassist
7724 (name "java-jboss-javassist")
7728 (uri (string-append "https://github.com/jboss-javassist/javassist/"
7730 (string-map (lambda (x) (if (eq? x #\.) #\_ x)) version)
7734 "10lpcr3sbf7y6fq6fc2h2ik7rqrivwcy4747bg0kxhwszil3cfmf"))))
7735 (build-system ant-build-system)
7737 `(#:jar-name "java-jboss-javassist.jar"
7739 #:source-dir "src/main"
7740 #:tests? #f; FIXME: requires junit-awtui and junit-swingui from junit3
7742 (modify-phases %standard-phases
7743 (add-before 'configure 'remove-binary
7745 (delete-file "javassist.jar")
7748 `(("junit" ,java-junit)))
7749 (home-page "https://github.com/jboss-javassist/javassist")
7750 (synopsis "Java bytecode engineering toolkit")
7751 (description "Javassist (JAVA programming ASSISTant) makes Java bytecode
7752 manipulation simple. It is a class library for editing bytecodes in Java; it
7753 enables Java programs to define a new class at runtime and to modify a class
7754 file when the JVM loads it.")
7755 (license (list license:gpl2 license:cddl1.0)))); either gpl2 only or cddl.
7757 (define-public java-jcommander
7759 (name "java-jcommander")
7763 (uri (string-append "https://github.com/cbeust/jcommander/archive/"
7765 (file-name (string-append name "-" version ".tar.gz"))
7768 "1f5k2ckay6qjc3d3w3d7bc0p3cx3c7n6p6zxvw1kibqdr0q98wlx"))))
7769 (build-system ant-build-system)
7771 `(#:jar-name "java-jcommander.jar"
7773 #:tests? #f; requires testng which depends on jcommander
7774 #:source-dir "src/main/java"))
7775 (home-page "http://jcommander.org")
7776 (synopsis "Command line parameters parser")
7777 (description "JCommander is a very small Java framework that makes it
7778 trivial to parse command line parameters. Parameters are declared with
7780 (license license:asl2.0)))
7782 (define-public java-bsh
7788 (uri (string-append "https://github.com/beanshell/beanshell/archive/"
7790 (file-name (string-append name "-" version ".tar.gz"))
7793 "1bawkxk6jyc75hxvzkpz689h73cn3f222m0ar3nvb0dal2b85kfv"))))
7794 (build-system ant-build-system)
7796 `(#:build-target "jarall"
7797 #:test-target "junit-tests-all"
7799 (modify-phases %standard-phases
7801 (lambda* (#:key outputs #:allow-other-keys)
7802 (let ((share (string-append (assoc-ref outputs "out") "/share/java")))
7804 (copy-file "dist/bsh-2.0b6.jar" (string-append share "/bsh-2.0b6.jar"))
7806 (home-page "http://beanshell.org/")
7807 (synopsis "Lightweight Scripting for Java")
7808 (description "BeanShell is a small, free, embeddable Java source
7809 interpreter with object scripting language features, written in Java.
7810 BeanShell dynamically executes standard Java syntax and extends it with common
7811 scripting conveniences such as loose types, commands, and method closures like
7812 those in Perl and JavaScript.")
7813 (license license:asl2.0)))
7815 (define-public java-fest-util
7817 (name "java-fest-util")
7821 (uri (string-append "https://github.com/alexruiz/fest-util/"
7822 "archive/fest-util-" version ".tar.gz"))
7825 "05g6hljz5mdaakk8d7g32klbhz9bdwp3qlj6rdaggdidxs3x1sb8"))))
7826 (build-system ant-build-system)
7828 `(#:jar-name "java-fest-util.jar"
7829 #:source-dir "src/main/java"))
7831 `(("junit" ,java-junit)
7832 ("hamcrest" ,java-hamcrest-core)))
7833 (home-page "https://github.com/alexruiz/fest-util")
7834 (synopsis "FEST common utilities")
7835 (description "Common utilities used in all FEST module.")
7836 (license license:asl2.0)))
7838 (define-public java-fest-test
7840 (name "java-fest-test")
7844 (uri (string-append "https://github.com/alexruiz/fest-test/"
7845 "archive/fest-test-" version ".tar.gz"))
7848 "1rxfbw6l9vc65iy1x3fb617qc6y4w2k430pgf1mfbxfdlxbm0f7g"))))
7849 (build-system ant-build-system)
7851 `(#:jar-name "java-fest-test.jar"
7852 #:source-dir "src/main/java"
7853 #:tests? #f)); no tests
7855 `(("junit" ,java-junit)))
7856 (home-page "https://github.com/alexruiz/fest-test")
7857 (synopsis "Common FEST testing infrastructure")
7858 (description "Fest-test contains the common FEST testing infrastructure.")
7859 (license license:asl2.0)))
7861 (define-public java-fest-assert
7863 (name "java-fest-assert")
7867 (uri (string-append "https://github.com/alexruiz/fest-assert-2.x/"
7868 "archive/fest-assert-core-" version ".tar.gz"))
7871 "1bi0iqavikzww6rxvz5jyg7y6bflv95s6ibryxx0xfcxrrw6i5lw"))))
7872 (build-system ant-build-system)
7874 `(#:jar-name "java-fest-assert.jar"
7875 #:source-dir "src/main/java"
7880 ;; Unable to set MockitoNamingPolicy on cglib generator which creates FastClasses
7881 "**/MessageFormatter_format_Test.java"
7882 "**/internal/*/*_assert*_Test.java")))
7884 `(("java-fest-util" ,java-fest-util)))
7886 `(("java-junit" ,java-junit)
7887 ("java-fest-test" ,java-fest-test)
7888 ("java-hamcrest-core" ,java-hamcrest-core)
7889 ("java-mockito" ,java-mockito-1)
7890 ("java-cglib" ,java-cglib)
7891 ("java-objenesis" ,java-objenesis)
7892 ("java-asm" ,java-asm)))
7893 (home-page "https://github.com/alexruiz/fest-assert-2.x")
7894 (synopsis "FEST fluent assertions")
7895 (description "FEST-Assert provides a fluent interface for assertions.")
7896 (license license:asl2.0)))
7898 (define-public java-testng
7900 (name "java-testng")
7905 (url "https://github.com/cbeust/testng.git")
7907 (file-name (string-append name "-" version "-checkout"))
7910 "0y6vq30i5g276kw0v2bhbvci22ijg7ax49ap2611yqlhbs4d6dqv"))))
7911 (build-system ant-build-system)
7913 `(#:jdk ,icedtea-8; java.util.function
7914 #:jar-name "java-testng.jar"
7915 #:source-dir "src/main/java"
7917 (modify-phases %standard-phases
7918 ;; FIXME: I don't know why these tests fail
7919 (add-after 'unpack 'delete-failing-tests
7921 (substitute* "src/test/resources/testng.xml"
7922 (("<class name=\"test.configuration.github1625.TestRunnerIssue1625\"/>") "")
7923 (("<class name=\"test.serviceloader.ServiceLoaderTest\" />") ""))
7925 ;; We don't have groovy
7926 (add-after 'unpack 'delete-groovy-tests
7928 (delete-file-recursively "src/test/java/test/dependent/issue1648/")
7929 (substitute* "src/test/resources/testng.xml"
7930 (("<class name=\"test.dependent.issue1648.TestRunner\"/>") ""))
7932 (add-before 'build 'copy-resources
7934 (copy-recursively "src/main/resources" "build/classes")
7936 (add-before 'check 'copy-test-resources
7938 (copy-recursively "src/test/resources" "build/test-classes")
7942 (system* "ant" "compile-tests")
7943 ;; we don't have groovy
7944 (substitute* "src/test/resources/testng.xml"
7945 (("<class name=\"test.groovy.GroovyTest\" />") ""))
7946 (zero? (system* "java" "-cp" (string-append (getenv "CLASSPATH")
7948 ":build/test-classes")
7949 "-Dtest.resources.dir=src/test/resources"
7950 "org.testng.TestNG" "src/test/resources/testng.xml")))))))
7952 `(("junit" ,java-junit)
7953 ("java-jsr305" ,java-jsr305)
7954 ("java-bsh" ,java-bsh)
7955 ("java-jcommander" ,java-jcommander)
7956 ("java-guice" ,java-guice)
7957 ("snakeyaml" ,java-snakeyaml)))
7959 `(("guava" ,java-guava)
7960 ("java-javax-inject" ,java-javax-inject)
7961 ("java-hamcrest" ,java-hamcrest-all)
7962 ("java-assertj" ,java-assertj)
7963 ("java-mockito" ,java-mockito-1)
7964 ("cglib" ,java-cglib)
7966 ("aopalliance" ,java-aopalliance)))
7967 (home-page "http://testng.org")
7968 (synopsis "Testing framework")
7969 (description "TestNG is a testing framework inspired from JUnit and NUnit
7970 but introducing some new functionalities that make it more powerful and easier
7972 (license license:asl2.0)))
7974 (define-public java-jnacl
7975 (let ((commit "094e819afdd63ea81a499b3bcb42a271006bebd9")
7979 (version (string-append "0.1.0-" revision "." (string-take commit 7)))
7983 (url "https://github.com/neilalexander/jnacl.git")
7987 "1d6g6xhn83byv5943n7935wwjsk0ibk0qdvqgr699qqgqqmwisbb"))))
7988 (build-system ant-build-system)
7990 `(#:jar-name "jnacl.jar"
7991 #:source-dir "src/main/java"
7994 (modify-phases %standard-phases
7995 (add-before 'build 'fix-tests
7997 (substitute* '("src/test/java/com/neilalexander/jnacl/NaClTest.java"
7998 "src/test/java/com/neilalexander/jnacl/NaclSecretBoxTest.java")
7999 (("assertions.Assertions") "assertions.api.Assertions"))
8003 (invoke "ant" "compile-tests")
8004 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
8006 ":build/test-classes")
8007 "org.testng.TestNG" "-testclass"
8008 "build/test-classes/com/neilalexander/jnacl/NaclSecretBoxTest.class")
8009 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
8011 ":build/test-classes")
8012 "org.testng.TestNG" "-testclass"
8013 "build/test-classes/com/neilalexander/jnacl/NaClTest.class")
8016 `(("java-testng" ,java-testng)
8017 ("java-fest-util" ,java-fest-util)
8018 ("java-fest-assert" ,java-fest-assert)))
8019 (home-page "https://github.com/neilalexander/jnacl")
8020 (synopsis "Java implementation of NaCl")
8021 (description "Pure Java implementation of the NaCl: Networking and
8022 Cryptography library.")
8023 (license license:bsd-2))))
8025 (define-public java-mvel2
8031 (uri (string-append "https://github.com/mvel/mvel/archive/mvel2-"
8032 version ".Final.tar.gz"))
8035 "01ph5s9gm16l2qz58lg21w6fna7xmmrj7f9bzqr1jim7h9557d3z"))))
8036 (build-system ant-build-system)
8038 `(#:jar-name "mvel2.jar"
8039 #:source-dir "src/main/java"
8041 (list "**/Abstract*.java"
8042 ;; Base class with no tests
8043 "**/MVELThreadTest.java")
8045 (modify-phases %standard-phases
8046 (add-after 'install 'install-bin
8047 (lambda* (#:key outputs #:allow-other-keys)
8048 (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
8050 (with-output-to-file (string-append bin "/mvel2")
8054 "#!" (which "bash") "\n"
8055 "if [ \"$#\" -ne \"2\" ]; then\n"
8056 "echo 'Usage: mvel2 <script> <out.dir>'\n"
8059 "java -Dout.dir=$2 -cp " (getenv "CLASSPATH")
8060 ":" (assoc-ref outputs "out") "/share/java/mvel2.jar"
8061 " org.mvel2.sh.Main $1"))))
8062 (chmod (string-append bin "/mvel2") #o755))
8065 `(("junit" ,java-junit)
8066 ("hamcrest" ,java-hamcrest-core)))
8067 (home-page "https://github.com/mvel/mvel")
8068 (synopsis "MVFLEX Expression Language")
8069 (description "MVEL has largely been inspired by Java syntax, but has some
8070 fundamental differences aimed at making it more efficient as an expression
8071 language, such as operators that directly support collection, array and string
8072 matching, as well as regular expressions. MVEL is used to evaluate expressions
8073 written using Java syntax.
8075 In addition to the expression language, MVEL serves as a templating language for
8076 configuration and string construction.")
8077 (license license:asl2.0)))
8079 (define-public java-commons-jexl-2
8081 (name "java-commons-jexl")
8085 (uri (string-append "mirror://apache/commons/jexl/source/"
8086 "commons-jexl-" version "-src.tar.gz"))
8089 "1ai7632bwwaxglb0nbpblpr2jw5g20afrsaq372ipkphi3ncy1jz"))))
8090 (build-system ant-build-system)
8092 `(#:jar-name "commons-jexl-2.jar"
8094 #:source-dir "src/main/java"
8096 (modify-phases %standard-phases
8097 (add-before 'check 'disable-broken-tests
8098 (lambda* (#:key inputs #:allow-other-keys)
8099 (with-directory-excursion "src/test/java/org/apache/commons/jexl2/"
8100 (substitute* "ArithmeticTest.java"
8101 (("asserter.assertExpression\\(\"3 / 0\"") "//")
8102 (("asserter.assertExpression\\(\"imanull") "//"))
8103 ;; This test fails with "ambiguous method invocation"
8104 (delete-file "CacheTest.java")
8105 ;; This test doesn't have access to the temp directory
8106 (substitute* "ClassCreatorTest.java"
8107 (("java.io.tmpdir") "user.dir"))
8108 ;; This test fails in trying to detect whether it can run.
8109 (substitute* "ClassCreator.java"
8110 (("boolean canRun =.*") "boolean canRun = false;\n"))
8111 ;; ...and these tests depend on it.
8112 (delete-file "scripting/JexlScriptEngineOptionalTest.java")
8113 (delete-file "scripting/JexlScriptEngineTest.java"))
8115 (add-before 'build 'run-javacc
8117 (with-directory-excursion "src/main/java/org/apache/commons/jexl2/parser/"
8118 (invoke "java" "jjtree" "Parser.jjt")
8119 (invoke "java" "javacc" "Parser.jj"))
8122 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)))
8124 `(("java-junit" ,java-junit)
8125 ("java-hamcrest-core" ,java-hamcrest-core)
8126 ("javacc" ,javacc-4)))
8127 (home-page "https://commons.apache.org/proper/commons-jexl/")
8128 (synopsis "Java Expression Language ")
8129 (description "JEXL is a library intended to facilitate the implementation
8130 of dynamic and scripting features in applications and frameworks written in
8131 Java. JEXL implements an Expression Language based on some extensions to the
8132 JSTL Expression Language supporting most of the constructs seen in
8133 shell-script or ECMAScript. Its goal is to expose scripting features usable
8134 by technical operatives or consultants working with enterprise platforms.")
8135 (license license:asl2.0)))
8137 (define-public java-lz4
8143 (uri (string-append "https://github.com/lz4/lz4-java/archive/"
8145 (file-name (string-append name "-" version ".tar.gz"))
8148 "096dm57p2lzqk28n0j2p52x2j3cvnsd2dfqn43n7vbwrkjsy7y54"))))
8149 (build-system ant-build-system)
8151 `(#:jar-name "lz4.jar"
8153 #:source-dir "src/java:src/java-unsafe"
8154 #:tests? #f; FIXME: requires more dependencies
8156 (modify-phases %standard-phases
8157 (add-before 'configure 'generate-source
8159 (with-directory-excursion "src/build/source_templates"
8160 (invoke "mvel2" "../gen_sources.mvel" "../../java"))
8163 `(("mvel" ,java-mvel2)))
8164 (home-page "https://jpountz.github.io/lz4-java")
8165 (synopsis "Compression algorithm")
8166 (description "LZ4 - Java is a Java port of the popular lz4 compression
8167 algorithms and xxHash hashing algorithm.")
8168 (license license:asl2.0)))
8170 (define-public java-bouncycastle-bcprov
8172 (name "java-bouncycastle-bcprov")
8176 (uri "https://bouncycastle.org/download/bcprov-jdk15on-158.tar.gz")
8179 "1hgkg96llbvgs8i0krwz2n0j7wlg6jfnq8w8kg0cc899j0wfmf3n"))))
8180 (build-system ant-build-system)
8182 `(#:jar-name "bouncycastle-bcprov.jar"
8183 #:tests? #f; no tests
8186 (modify-phases %standard-phases
8187 (add-before 'configure 'unzip-src
8190 (with-directory-excursion "src"
8191 (invoke "unzip" "../src.zip"))
8195 ("junit" ,java-junit)))
8196 (home-page "https://www.bouncycastle.org")
8197 (synopsis "Cryptographic library")
8198 (description "Bouncy Castle Provider (bcprov) is a cryptographic library
8199 for the Java programming language.")
8200 (license license:expat)))
8202 (define-public java-bouncycastle-bcpkix
8204 (name "java-bouncycastle-bcpkix")
8208 (uri "https://bouncycastle.org/download/bcpkix-jdk15on-158.tar.gz")
8211 "0is7qay02803s9f7lhnfcjlz61ni3hq5d7apg0iil7nbqkbfbcq2"))))
8212 (build-system ant-build-system)
8214 `(#:jar-name "bouncycastle-bcpkix.jar"
8215 #:tests? #f; no tests
8218 (modify-phases %standard-phases
8219 (add-before 'configure 'unzip-src
8222 (with-directory-excursion "src"
8223 (invoke "unzip" "../src.zip"))
8227 ("junit" ,java-junit)))
8229 `(("bcprov" ,java-bouncycastle-bcprov)))
8230 (home-page "https://www.bouncycastle.org")
8231 (synopsis "Cryptographic library")
8232 (description "Bouncy Castle Java API for PKIX, CMS, EAC, TSP, PKCS, OCSP,
8234 (license license:expat)))
8236 (define-public java-lmax-disruptor
8238 (name "java-lmax-disruptor")
8242 (uri (string-append "https://github.com/LMAX-Exchange/disruptor/"
8243 "archive/" version ".tar.gz"))
8244 (file-name (string-append name "-" version ".tar.gz"))
8247 "17da2gwj5abnlsfgn2xqjk5lgzbg4vkb0hdv2dvc8r2fx4bi7w3g"))))
8248 (build-system ant-build-system)
8250 `(#:jar-name "java-lmax-disruptor.jar"
8252 #:tests? #f)); tests hang
8254 `(("junit" ,java-junit)
8255 ("java-hdrhistogram" ,java-hdrhistogram)
8256 ("java-jmock" ,java-jmock)
8257 ("java-jmock-legacy" ,java-jmock-legacy)
8258 ("java-jmock-junit4" ,java-jmock-junit4)
8259 ("java-hamcrest-all" ,java-hamcrest-all)))
8261 `(("cglib" ,java-cglib)
8262 ("objenesis" ,java-objenesis)
8264 (home-page "https://www.lmax.com/disruptor")
8265 (synopsis "High performance inter-thread communication")
8266 (description "LMAX Disruptor is a software pattern and software component
8267 for high performance inter-thread communication that avoids the need for
8268 message queues or resource locking.")
8269 (license license:asl2.0)))
8271 (define-public java-commons-bcel
8273 (name "java-commons-bcel")
8277 (uri (string-append "mirror://apache/commons/bcel/source/bcel-"
8278 version "-src.tar.gz"))
8281 "0j3x1rxd673k07psclk8k13rqh0x0mf2yy5qiwkiw4z3afa568jy"))))
8282 (build-system ant-build-system)
8284 `(#:jar-name "bcel.jar"
8286 #:source-dir "src/main/java"
8287 #:test-dir "src/test/java"
8288 ;; FIXME: Tests require the unpackaged jna.
8290 (home-page "https://commons.apache.org/proper/commons-bcel/")
8291 (synopsis "Byte code engineering library")
8292 (description "The Byte Code Engineering Library (Apache Commons BCEL) is
8293 intended to give users a convenient way to analyze, create, and
8294 manipulate (binary) Java class files. Classes are represented by objects
8295 which contain all the symbolic information of the given class: methods, fields
8296 and byte code instructions, in particular.
8298 Such objects can be read from an existing file, be transformed by a
8299 program (e.g. a class loader at run-time) and written to a file again. An
8300 even more interesting application is the creation of classes from scratch at
8301 run-time. The @dfn{Byte Code Engineering Library} (BCEL) may be also useful
8302 if you want to learn about the @dfn{Java Virtual Machine} (JVM) and the format
8303 of Java @code{.class} files.")
8304 (license license:asl2.0)))
8306 (define-public java-xerial-core
8308 (name "java-xerial-core")
8312 (uri (string-append "https://github.com/xerial/xerial-java/archive/"
8314 (file-name (string-append name "-" version ".tar.gz"))
8317 "0d3g863i41bgalpa4xr3vm1h140l091n8iwgq5qvby5yivns9y8d"))))
8318 (build-system ant-build-system)
8320 `(#:jar-name "xerial-core.jar"
8321 #:source-dir "xerial-core/src/main/java"
8322 #:test-dir "xerial-core/src/test"
8324 (modify-phases %standard-phases
8325 (add-before 'build 'copy-resources
8327 (copy-recursively "xerial-core/src/main/resources"
8331 `(("junit" ,java-junit)
8332 ("hamcrest" ,java-hamcrest-core)))
8333 (home-page "https://github.com/xerial/xerial-java")
8334 (synopsis "Data management libraries for Java")
8335 (description "Xerial is a set of data management libraries for the Java
8336 programming language. The ultimate goal of the Xerial project is to manage
8337 everything as database, including class objects, text format data, data
8339 (license license:asl2.0)))
8341 (define-public java-powermock-reflect
8343 (name "java-powermock-reflect")
8347 (uri (string-append "https://github.com/powermock/powermock/"
8348 "archive/powermock-" version ".tar.gz"))
8349 (file-name (string-append name "-" version ".tar.gz"))
8352 "0sbgi5vqq7k72wzcdjb20s370vyd4hsbnx71pzb8ishml3gy7fwy"))
8354 (search-patches "java-powermock-fix-java-files.patch"))))
8355 (build-system ant-build-system)
8357 `(#:jar-name "java-powermock-reflect.jar"
8359 #:source-dir "powermock-reflect/src/main/java"
8360 #:test-dir "powermock-reflect/src/test"))
8362 `(("java-objenesis" ,java-objenesis)))
8364 `(("junit" ,java-junit)
8365 ("cglib" ,java-cglib)
8367 ("hamcrest" ,java-hamcrest-core)
8368 ("assertj" ,java-assertj)))
8369 (home-page "https://github.com/powermock/powermock")
8370 (synopsis "Mock library extension framework")
8371 (description "PowerMock is a framework that extends other mock libraries
8372 such as EasyMock with more powerful capabilities. PowerMock uses a custom
8373 classloader and bytecode manipulation to enable mocking of static methods,
8374 constructors, final classes and methods, private methods, removal of static
8375 initializers and more. By using a custom classloader no changes need to be
8376 done to the IDE or continuous integration servers which simplifies adoption.")
8377 (license license:asl2.0)))
8379 (define-public java-powermock-core
8381 (inherit java-powermock-reflect)
8382 (name "java-powermock-core")
8384 `(#:jar-name "java-powermock-core.jar"
8385 #:source-dir "powermock-core/src/main/java"
8386 #:test-dir "powermock-core/src/test"
8387 #:tests? #f; requires powermock-api
8390 (modify-phases %standard-phases
8391 (add-before 'build 'copy-resources
8393 (copy-recursively "powermock-core/src/main/resources"
8394 "build/classes"))))))
8396 `(("reflect" ,java-powermock-reflect)
8397 ("javassist" ,java-jboss-javassist)))
8399 `(("junit" ,java-junit)
8400 ("assertj" ,java-assertj)
8401 ("mockito" ,java-mockito-1)))))
8403 (define-public java-powermock-api-support
8405 (inherit java-powermock-reflect)
8406 (name "java-powermock-api-support")
8407 (build-system ant-build-system)
8409 `(#:jar-name "java-powermock-api-support.jar"
8411 #:source-dir "powermock-api/powermock-api-support/src/main/java"
8412 #:tests? #f)); no tests
8414 `(("core" ,java-powermock-core)
8415 ("reflect" ,java-powermock-reflect)))))
8417 (define-public java-powermock-modules-junit4-common
8419 (inherit java-powermock-reflect)
8420 (name "java-powermock-modules-junit4-common")
8421 (build-system ant-build-system)
8423 `(#:jar-name "java-powermock-modules-junit4-common.jar"
8425 #:source-dir "powermock-modules/powermock-module-junit4-common/src/main/java"
8426 #:test-dir "powermock-modules/powermock-module-junit4-common/src/test"))
8428 `(("core" ,java-powermock-core)
8429 ("easymock" ,java-easymock)
8430 ("reflect" ,java-powermock-reflect)
8431 ("hamcrest" ,java-hamcrest-core)
8432 ("cglib" ,java-cglib)))))
8434 (define-public java-powermock-modules-junit4
8436 (inherit java-powermock-reflect)
8437 (name "java-powermock-modules-junit4")
8438 (build-system ant-build-system)
8440 `(#:jar-name "java-powermock-modules-junit4.jar"
8442 #:source-dir "powermock-modules/powermock-module-junit4/src/main/java"
8443 #:test-dir "powermock-modules/powermock-module-junit4/src/test"
8445 (modify-phases %standard-phases
8446 (add-before 'build 'fix-junit-detection
8448 ;; Our junit version is 4.12-SNAPSHOT
8449 (substitute* (find-files "powermock-modules/powermock-module-junit4"
8450 "PowerMockJUnit4MethodValidator.java")
8451 (("4.12") "4.12-SNAPSHOT")))))))
8453 `(("core" ,java-powermock-core)
8454 ("reflect" ,java-powermock-reflect)
8455 ("common" ,java-powermock-modules-junit4-common)
8456 ("cglib" ,java-cglib)))
8458 `(("easymock" ,java-easymock)
8459 ("hamcrest" ,java-hamcrest-core)
8460 ("objenesis" ,java-objenesis)
8462 ("junit" ,java-junit)))))
8464 (define-public java-powermock-api-easymock
8466 (inherit java-powermock-reflect)
8467 (name "java-powermock-api-easymock")
8468 (build-system ant-build-system)
8470 `(#:jar-name "java-powermock-api-easymock.jar"
8472 #:source-dir "powermock-api/powermock-api-easymock/src/main/java"
8473 #:tests? #f; no tests
8475 (modify-phases %standard-phases
8476 (add-before 'build 'fix-file
8478 ;; FIXME: This looks wrong, but it fixes a build error.
8479 (with-directory-excursion "powermock-api/powermock-api-easymock"
8480 (substitute* "src/main/java/org/powermock/api/easymock/PowerMock.java"
8481 (("classLoader instanceof MockClassLoader") "false")
8482 (("\\(\\(MockClassLoader\\) classLoader\\).*;") ";")))
8485 `(("core" ,java-powermock-core)
8486 ("easymock" ,java-easymock)
8487 ("reflect" ,java-powermock-reflect)
8488 ("support" ,java-powermock-api-support)
8489 ("cglib" ,java-cglib)))))
8491 (define-public java-jboss-jms-api-spec
8493 (name "java-jboss-jms-api-spec")
8497 (uri (string-append "https://github.com/jboss/jboss-jms-api_spec/"
8498 "archive/jboss-jms-api_" version
8499 "_spec-1.0.1.Final.tar.gz"))
8502 "07bqblw9kq2i8q92bz70fvavq5xjfkaixl8xa0m0cypjgy82rb7m"))))
8503 (build-system ant-build-system)
8505 `(#:jar-name "java-jboss-jms-api_spec.jar"
8508 #:tests? #f)); no tests
8509 (home-page "https://github.com/jboss/jboss-jms-api_spec")
8510 (synopsis "Java Message Service API specification")
8511 (description "Java Message Service (JMS) API is used to send messages
8512 messages between two or more clients. It is a messaging standard that allows
8513 application components to create, send, receive, and read messages.")
8514 ; either gpl2 only with GPL Classpath Exception, or cddl.
8515 (license (list license:gpl2 license:cddl1.0))))
8517 (define-public java-mail
8523 (uri (string-append "https://github.com/javaee/javamail/archive/"
8524 "JAVAMAIL-1_6_0.tar.gz"))
8527 "1b4rg7fpj50ld90a71iz2m4gm3f5cnw18p3q3rbrrryjip46kx92"))))
8528 (build-system ant-build-system)
8530 `(#:jar-name "java-mail.jar"
8532 #:source-dir "mail/src/main/java"
8533 #:test-dir "mail/src/test"
8535 (list "**/CollectorFormatterTest.java"
8536 "**/CompactFormatterTest.java"
8537 "**/DurationFilterTest.java"
8538 "**/MailHandlerTest.java"
8539 "**/GetLocalAddressTest.java"
8540 ;; FIXME: both end with:
8541 ;; java.lang.ClassNotFoundException:
8542 ;; javax.mail.internet.MimeMultipartParseTest
8543 "**/MimeMultipartParseTest.java"
8544 "**/SearchTermSerializationTest.java")
8546 (modify-phases %standard-phases
8547 (add-before 'configure 'move-version.java
8549 (copy-file "mail/src/main/resources/javax/mail/Version.java"
8550 "mail/src/main/java/javax/mail/Version.java")
8552 (add-before 'build 'copy-resources
8554 (copy-recursively "mail/src/main/resources/META-INF"
8555 "build/classes/META-INF")
8558 `(("junit" ,java-junit)
8559 ("hamcrest" ,java-hamcrest-core)))
8560 (home-page "https://javaee.github.io/javamail/")
8561 (synopsis "Mail-related functionnalities in Java")
8562 (description "The JavaMail API provides a platform-independent and
8563 protocol-independent framework to build mail and messaging applications.")
8564 ;; General Public License Version 2 only ("GPL") or the Common Development
8565 ;; and Distribution License("CDDL")
8566 (license (list license:cddl1.1
8567 license:gpl2)))); with classpath exception
8569 (define-public java-jeromq
8571 (name "java-jeromq")
8576 (url "https://github.com/zeromq/jeromq.git")
8577 (commit (string-append "v" version))))
8578 (file-name (string-append name "-" version "-checkout"))
8581 "1gxkp7lv2ahymgrqdw94ncq54bmp4m4sw5m1x9gkp7l5bxn0xsyj"))
8582 (patches (search-patches "java-jeromq-fix-tests.patch"))))
8583 (build-system ant-build-system)
8585 `(#:jar-name "java-jeromq.jar"
8586 #:source-dir "src/main/java"
8592 "**/ZBeaconTest.java"
8594 "**/DealerSpecTest.java"
8595 "**/CustomDecoderTest.java"
8596 "**/CustomEncoderTest.java"
8597 "**/ConnectRidTest.java"
8598 "**/ReqSpecTest.java"
8599 "**/PushPullSpecTest.java"
8600 "**/PubSubHwmTest.java"
8601 "**/RouterSpecTest.java"
8602 "**/ProxyTest.java")))
8604 `(("java-jnacl" ,java-jnacl)))
8606 `(("java-hamcrest-core" ,java-hamcrest-core)
8607 ("junit" ,java-junit)))
8608 (home-page "http://zeromq.org/bindings:java")
8609 (synopsis "Java binding for 0MQ")
8610 (description "Jeromq provides the java bindings for 0MQ.")
8611 (license license:mpl2.0)))
8613 (define-public java-kafka-clients
8615 (name "java-kafka-clients")
8619 (uri (string-append "mirror://apache/kafka/" version "/kafka-"
8620 version "-src.tgz"))
8623 "1yxmnsmliwm7671q5yy9bl4jdqyyn00n26cggz9brwczx80w1vfq"))))
8624 (build-system ant-build-system)
8626 `(#:jar-name "java-kafka-clients.jar"
8628 #:source-dir "clients/src/main/java"
8629 #:test-dir "clients/src/test"
8632 ;; This file does not contain a class
8633 "**/IntegrationTest.java"
8635 "**/ClientUtilsTest.java"
8636 ;; End with errors that seem related to our powermock
8637 "**/KafkaProducerTest.java"
8638 "**/BufferPoolTest.java")))
8640 `(("java-slf4j-api" ,java-slf4j-api)
8641 ("java-lz4" ,java-lz4)))
8643 `(("junit" ,java-junit)
8644 ("hamcrest" ,java-hamcrest-all)
8645 ("objenesis" ,java-objenesis)
8647 ("cglib" ,java-cglib)
8648 ("javassist" ,java-jboss-javassist)
8649 ("snappy" ,java-snappy)
8650 ("easymock" ,java-easymock)
8651 ("powermock" ,java-powermock-core)
8652 ("powermock-easymock" ,java-powermock-api-easymock)
8653 ("powermock-junit4-common" ,java-powermock-modules-junit4-common)
8654 ("powermock-junit4" ,java-powermock-modules-junit4)
8655 ("powermock-support" ,java-powermock-api-support)
8656 ("bouncycastle" ,java-bouncycastle-bcprov)
8657 ("bouncycastle-bcpkix" ,java-bouncycastle-bcpkix)))
8658 (home-page "https://kafka.apache.org")
8659 (synopsis "Distributed streaming platform")
8660 (description "Kafka is a distributed streaming platform, which means:
8662 @item it can publish and subscribe to streams of records;
8663 @item it can store streams of records in a fault-tolerant way;
8664 @item it can process streams of records as they occur.
8666 ;; Either cddl or gpl2 only.
8667 (license (list license:cddl1.1; actually cddl1.1
8668 license:gpl2)))); with classpath exception
8670 (define-public java-jdom
8676 (uri (string-append "http://jdom.org/dist/binary/archive/jdom-"
8680 "07wdpm3jwwc9q38kmdw40fvbmv6jzjrkrf8m0zqs58f79a672wfl"))))
8681 (build-system ant-build-system)
8683 `(#:build-target "package"
8684 #:tests? #f; tests are run as part of the build process
8686 (modify-phases %standard-phases
8688 (install-jars "build")))))
8689 (home-page "http://jdom.org/")
8690 (synopsis "Access, manipulate, and output XML data")
8691 (description "Java-based solution for accessing, manipulating, and
8692 outputting XML data from Java code.")
8693 (license license:bsd-4)))
8695 (define-public java-geronimo-xbean-reflect
8697 (name "java-geronimo-xbean-reflect")
8702 (url "https://svn.apache.org/repos/asf/geronimo/xbean/tags/xbean-4.5/")
8703 (revision 1807396)))
8704 (file-name (string-append name "-" version))
8707 "18q3i6jgm6rkw8aysfgihgywrdc5nvijrwnslmi3ww497jvri6ja"))))
8708 (build-system ant-build-system)
8710 `(#:jar-name "geronimo-xbean-reflect.jar"
8711 #:source-dir "xbean-reflect/src/main/java"
8712 #:test-dir "xbean-reflect/src/test"
8715 (list "**/Abstract*.java" "**/AsmParameterNameLoaderTest.java"
8716 "**/ObjectRecipeTest.java" "**/ParameterNameLoaderTest.java"
8717 "**/RecipeHelperTest.java" "**/XbeanAsmParameterNameLoaderTest.java")
8719 (modify-phases %standard-phases
8720 (add-before 'build 'fix-source
8722 (let ((dir "xbean-reflect/src/main/java/org/apache/xbean/recipe/"))
8723 ;; org.apache.xbean.asm6 is actually repackaged java-asm
8724 (substitute* (string-append dir "XbeanAsmParameterNameLoader.java")
8725 (("org.apache.xbean.asm5") "org.objectweb.asm"))
8729 ("log4j" ,java-log4j-api)
8730 ("log4j-1.2" ,java-log4j-1.2-api)
8731 ("log4j-core" ,java-log4j-core)
8732 ("logging" ,java-commons-logging-minimal)))
8734 `(("junit" ,java-junit)))
8735 (home-page "https://geronimo.apache.org/maven/xbean/3.6/xbean-reflect/")
8736 (synopsis "Dependency injection helper")
8737 (description "Xbean-reflect provides very flexible ways to create objects
8738 and graphs of objects for dependency injection frameworks")
8739 (license license:asl2.0)))
8741 (define-public java-geronimo-xbean-bundleutils
8743 (inherit java-geronimo-xbean-reflect)
8744 (name "java-geronimo-xbean-bundleutils")
8746 `(#:jar-name "geronimo-xbean-bundleutils.jar"
8747 #:source-dir "xbean-bundleutils/src/main/java"
8748 #:test-dir "xbean-bundleutils/src/test"
8750 (modify-phases %standard-phases
8751 (add-before 'build 'fix-java
8753 ;; We use a more recent version of osgi, so this file requires
8754 ;; more interface method implementations.
8755 (substitute* "xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/DelegatingBundleContext.java"
8756 (("import org.osgi.framework.ServiceRegistration;")
8757 "import org.osgi.framework.ServiceRegistration;
8758 import org.osgi.framework.ServiceFactory;
8759 import java.util.Collection;
8760 import org.osgi.framework.ServiceObjects;")
8761 (("public Bundle getBundle\\(\\)")
8763 public <S> ServiceObjects<S> getServiceObjects(ServiceReference<S> reference) {
8764 throw new UnsupportedOperationException();
8767 public <S> ServiceRegistration<S> registerService(Class<S> clazz,
8768 ServiceFactory<S> factory, Dictionary<String, ?> properties) {
8769 throw new UnsupportedOperationException();
8771 public Bundle getBundle()"))
8774 `(("java-slf4j" ,java-slf4j-api)
8775 ("java-asm" ,java-asm)
8776 ("java-osgi-framework" ,java-osgi-framework)
8777 ("java-eclipse-osgi" ,java-eclipse-osgi)
8778 ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin)))))
8780 (define-public java-geronimo-xbean-asm-util
8782 (inherit java-geronimo-xbean-reflect)
8783 (name "java-geronimo-xbean-asm-util")
8785 `(#:jar-name "geronimo-xbean-asm-util.jar"
8786 #:source-dir "xbean-asm-util/src/main/java"
8787 #:tests? #f)); no tests
8789 `(("java-asm" ,java-asm)))
8790 (native-inputs '())))
8792 (define-public java-geronimo-xbean-finder
8794 (inherit java-geronimo-xbean-reflect)
8795 (name "java-geronimo-xbean-finder")
8797 `(#:jar-name "geronimo-xbean-finder.jar"
8798 #:source-dir "xbean-finder/src/main/java"
8799 #:test-dir "xbean-finder/src/test"))
8801 `(("java-slf4j-api" ,java-slf4j-api)
8802 ("java-asm" ,java-asm)
8803 ("java-geronimo-xbean-bundleutils" ,java-geronimo-xbean-bundleutils)
8804 ("java-geronimo-xbean-asm-util" ,java-geronimo-xbean-asm-util)
8805 ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin)
8806 ("java-osgi-framework" ,java-osgi-framework)))
8808 `(("java-junit" ,java-junit)
8809 ("java-hamcrest-core" ,java-hamcrest-core)))))
8811 (define-public java-gson
8817 (uri (string-append "https://github.com/google/gson/archive/"
8818 "gson-parent-" version ".tar.gz"))
8821 "1j4qnp7v046q0k48c4kyf69sxaasx2h949d3cqwsm3kzxms3x0f9"))))
8822 (build-system ant-build-system)
8824 `(#:jar-name "gson.jar"
8825 #:source-dir "gson/src/main/java"
8826 #:test-dir "gson/src/test"))
8828 `(("java-junit" ,java-junit)
8829 ("java-hamcrest-core" ,java-hamcrest-core)))
8830 (home-page "https://github.com/google/gson")
8831 (synopsis "Java serialization/deserialization library from/to JSON")
8832 (description "Gson is a Java library that can be used to convert Java
8833 Objects into their JSON representation. It can also be used to convert a JSON
8834 string to an equivalent Java object. Gson can work with arbitrary Java objects
8835 including pre-existing objects that you do not have source-code of.")
8836 (license license:asl2.0)))
8838 (define-public java-hawtjni
8840 (name "java-hawtjni")
8844 (uri (string-append "https://github.com/fusesource/hawtjni/archive/"
8845 "hawtjni-project-" version ".tar.gz"))
8848 "1bqfd732rmh6svyx17fpw9175gc9gzkcbyps2yyrf50c3zzjas6g"))))
8849 (build-system ant-build-system)
8851 `(#:jar-name "hawtjni.jar"
8852 #:source-dir "hawtjni-generator/src/main/java:hawtjni-runtime/src/main/java"
8853 #:tests? #f; no tests
8855 (modify-phases %standard-phases
8856 (add-before 'build 'build-native
8857 (lambda* (#:key inputs #:allow-other-keys)
8858 (let ((include (string-append "-I" (assoc-ref inputs "jdk") "/include/linux")))
8859 (with-directory-excursion "hawtjni-generator/src/main/resources/"
8860 (invoke "gcc" "-c" "hawtjni.c" "-o" "hawtjni.o"
8861 "-fPIC" "-O2" include)
8862 (invoke "gcc" "-c" "hawtjni-callback.c" "-o" "hawtjni-callback.o"
8863 "-fPIC" "-O2" include)
8864 (invoke "gcc" "-o" "libhawtjni.so" "-shared"
8865 "hawtjni.o" "hawtjni-callback.o")))
8867 (add-after 'install 'install-native
8868 (lambda* (#:key outputs #:allow-other-keys)
8869 (let* ((out (assoc-ref outputs "out"))
8870 (lib (string-append out "/lib"))
8871 (inc (string-append out "/include")))
8872 (with-directory-excursion "hawtjni-generator/src/main/resources/"
8873 (install-file "libhawtjni.so" lib)
8874 (install-file "hawtjni.h" inc)))
8877 `(("java-commons-cli" ,java-commons-cli)
8878 ("java-asm" ,java-asm)
8879 ("java-geronimo-xbean-finder" ,java-geronimo-xbean-finder)))
8880 (home-page "https://fusesource.github.io/hawtjni/")
8881 (synopsis "JNI code generator")
8882 (description "HawtJNI is a code generator that produces the JNI code needed
8883 to implement Java native methods. It is based on the jnigen code generator
8884 that is part of the SWT Tools project.")
8885 (license license:asl2.0)))
8887 (define-public java-jansi-native
8889 (name "java-jansi-native")
8893 (uri (string-append "https://github.com/fusesource/jansi-native/"
8894 "archive/jansi-native-" version ".tar.gz"))
8897 "0j2ydlgxbzbgshqkwghbxxxnbnx1mmjgd6k5fw6xfvxw1z956yqf"))))
8898 (build-system ant-build-system)
8900 `(#:jar-name "jansi-native.jar"
8901 #:source-dir "src/main/java"
8902 #:tests? #f; no tests
8904 (modify-phases %standard-phases
8905 (add-before 'build 'build-native
8906 (lambda* (#:key inputs #:allow-other-keys)
8907 ;; there are more required files for windows in windows/
8908 (with-directory-excursion "src/main/native-package/src"
8909 (substitute* "jansi_ttyname.c"
8910 (("#include \"jansi_.*") ""))
8911 (invoke "gcc" "-c" "jansi_ttyname.c" "-o" "jansi_ttyname.o"
8912 (string-append "-I" (assoc-ref inputs "java-hawtjni")
8914 (string-append "-I" (assoc-ref inputs "jdk")
8917 (invoke "gcc" "-o" "libjansi.so" "-shared" "jansi_ttyname.o")
8919 (add-before 'build 'install-native
8921 (let ((dir (string-append "build/classes/META-INF/native/"
8922 ,(match (%current-system)
8923 ((or "i686-linux" "armhf-linux")
8925 ((or "x86_64-linux" "aarch64-linux")
8927 (install-file "src/main/native-package/src/libjansi.so" dir))
8929 (add-after 'install 'install-native
8930 (lambda* (#:key outputs #:allow-other-keys)
8931 (install-file "src/main/native-package/src/jansi.h"
8932 (string-append (assoc-ref outputs "out") "/include"))
8935 `(("java-hawtjni" ,java-hawtjni)))
8936 (home-page "https://fusesource.github.io/jansi/")
8937 (synopsis "Native library for jansi")
8938 (description "This package provides the native library for jansi, a small
8939 Java library that allows you to use ANSI escape sequences to format your
8941 (license license:asl2.0)))
8943 (define-public java-jansi
8949 (uri (string-append "https://github.com/fusesource/jansi/archive/"
8950 "jansi-project-" version ".tar.gz"))
8953 "11kh3144i3fzp21dpy8zg52mjmsr214k7km9p8ly0rqk2px0qq2z"))))
8954 (build-system ant-build-system)
8956 `(#:jar-name "jansi.jar"
8957 #:source-dir "jansi/src/main/java"
8958 #:test-dir "jansi/src/test"
8960 (modify-phases %standard-phases
8961 (add-after 'check 'clear-term
8963 (zero? (system* "echo" "-e" "\\e[0m")))))))
8965 `(("java-jansi-native" ,java-jansi-native)))
8967 `(("java-junit" ,java-junit)
8968 ("java-hamcrest-core" ,java-hamcrest-core)))
8969 (home-page "https://fusesource.github.io/jansi/")
8970 (synopsis "Portable ANSI escape sequences")
8971 (description "Jansi is a Java library that allows you to use ANSI escape
8972 sequences to format your console output which works on every platform.")
8973 (license license:asl2.0)))
8975 (define-public java-jboss-el-api-spec
8977 (name "java-jboss-el-api-spec")
8981 (uri (string-append "https://github.com/jboss/jboss-el-api_spec/"
8982 "archive/jboss-el-api_" version
8983 "_spec-1.0.7.Final.tar.gz"))
8986 "1j45ljxalwlibxl7g7iv952sjxkw275m8vyxxij8l6wdd5pf0pdh"))))
8987 (build-system ant-build-system)
8989 `(#:jar-name "java-jboss-el-api_spec.jar"
8992 `(("java-junit" ,java-junit)))
8993 (home-page "https://github.com/jboss/jboss-el-api_spec")
8994 (synopsis "JSR-341 expression language 3.0 API")
8995 (description "This package contains an implementation of the JSR-341
8996 specification for the expression language 3.0. It implements an expression
8997 language inspired by ECMAScript and XPath. This language is used with
8998 JavaServer Pages (JSP).")
8999 ;; Either GPL2 only or CDDL.
9000 (license (list license:gpl2 license:cddl1.1))))
9002 (define-public java-jboss-interceptors-api-spec
9004 (name "java-jboss-interceptors-api-spec")
9008 (uri (string-append "https://github.com/jboss/jboss-interceptors-api_spec/"
9009 "archive/jboss-interceptors-api_" version
9010 "_spec-1.0.0.Final.tar.gz"))
9013 "0wv8x0jp9a5qxlrgkhb5jdk2gr6vi87b4j4kjb8ryxiy9gn8g51z"))))
9014 (build-system ant-build-system)
9016 `(#:jar-name "java-jboss-interceptors-api_spec.jar"
9019 #:tests? #f)); no tests
9020 (home-page "https://github.com/jboss/jboss-interceptors-api_spec")
9021 (synopsis "Interceptors 1.2 API classes from JSR 318")
9022 (description "Java-jboss-interceptors-api-spec implements the Interceptors
9023 API. Interceptors are used to interpose on business method invocations and
9025 ;; Either GPL2 only or CDDL.
9026 (license (list license:gpl2 license:cddl1.1))))
9028 (define-public java-cdi-api
9030 (name "java-cdi-api")
9034 (uri (string-append "https://github.com/cdi-spec/cdi/archive/"
9036 (file-name (string-append name "-" version ".tar.gz"))
9039 "1iv8b8bp07c5kmqic14jsr868vycjv4qv02lf3pkgp9z21mnfg5y"))))
9040 (build-system ant-build-system)
9042 `(#:source-dir "api/src/main/java"
9043 #:jar-name "java-cdi-api.jar"
9044 #:test-dir "api/src/test"
9046 #:tests? #f)); Tests fail because we don't have a CDI provider yet
9048 `(("java-javax-inject" ,java-javax-inject)
9049 ("java-jboss-el-api-spec" ,java-jboss-el-api-spec)
9050 ("java-jboss-interceptors-api-spec" ,java-jboss-interceptors-api-spec)))
9052 `(("java-testng" ,java-testng)
9053 ("java-hamcrest-core" ,java-hamcrest-core)))
9054 (home-page "http://cdi-spec.org/")
9055 (synopsis "Contexts and Dependency Injection APIs")
9056 (description "Java-cdi-api contains the required APIs for Contexts and
9057 Dependency Injection (CDI).")
9058 (license license:asl2.0)))
9060 (define-public java-joda-convert
9062 (name "java-joda-convert")
9066 (uri (string-append "https://github.com/JodaOrg/joda-convert/archive/v"
9068 (file-name (string-append name "-" version ".tar.gz"))
9071 "0vp346xz7dh9br4q7xazhc7hvzf76a6hf95fki9bg67q5jr0kjh7"))))
9072 (build-system ant-build-system)
9074 `(#:jar-name (string-append ,name "-" ,version ".jar")
9075 #:source-dir "src/main/java"
9076 #:test-include (list "**/Test*.java")
9077 ;; Contains only interfaces and base classes (no test)
9078 #:test-exclude (list "**/test*/**.java")))
9080 `(("java-guava" ,java-guava)))
9082 `(("java-junit" ,java-junit)
9083 ("java-hamcrest-core" ,java-hamcrest-core)))
9084 (home-page "http://www.joda.org/joda-convert/")
9085 (synopsis "Conversion between Objects and Strings")
9086 (description "Joda-Convert provides a small set of classes to aid
9087 conversion between Objects and Strings. It is not intended to tackle the
9088 wider problem of Object to Object transformation.")
9089 (license license:asl2.0)))
9091 (define-public java-joda-time
9093 (name "java-joda-time")
9097 (uri (string-append "https://github.com/JodaOrg/joda-time/archive/v"
9099 (file-name (string-append name "-" version ".tar.gz"))
9102 "1i9x91mi7yg2pasl0k3912f1pg46n37sps6rdb0v1gs8hj9ppwc1"))))
9103 (build-system ant-build-system)
9105 `(#:jar-name "java-joda-time.jar"
9106 #:source-dir "src/main/java"
9107 #:test-include (list "**/Test*.java")
9108 ;; There is no runnable test in these files
9109 #:test-exclude (list "**/Test*Chronology.java" "**/Test*Field.java")
9111 (modify-phases %standard-phases
9112 (add-after 'build 'build-resources
9114 (mkdir-p "build/classes/org/joda/time/tz/data")
9115 (mkdir-p "build/classes/org/joda/time/format")
9116 ;; This will produce the following exception:
9117 ;; java.io.IOException: Resource not found: "org/joda/time/tz/data/ZoneInfoMap"
9118 ;; which is normal, because it doesn't exist yet. It still generates
9119 ;; the same file as in the binary one can find on maven.
9120 (invoke "java" "-cp"
9121 (string-append "build/classes:" (getenv "CLASSPATH"))
9122 "org.joda.time.tz.ZoneInfoCompiler"
9123 "-src" "src/main/java/org/joda/time/tz/src"
9124 "-dst" "build/classes/org/joda/time/tz/data"
9125 "africa" "antarctica" "asia" "australasia"
9126 "europe" "northamerica" "southamerica"
9127 "pacificnew" "etcetera" "backward" "systemv")
9128 (for-each (lambda (f)
9129 (copy-file f (string-append
9130 "build/classes/org/joda/time/format/"
9132 (find-files "src/main/java/org/joda/time/format" ".*.properties"))
9134 (add-before 'install 'regenerate-jar
9136 ;; We need to regenerate the jar file to add generated data.
9137 (delete-file "build/jar/java-joda-time.jar")
9138 (invoke "ant" "jar")))
9139 (add-before 'check 'copy-test-resources
9141 (mkdir-p "build/test-classes/org/joda/time/tz/data")
9142 (copy-file "src/test/resources/tzdata/ZoneInfoMap"
9143 "build/test-classes/org/joda/time/tz/data/ZoneInfoMap")
9144 (copy-recursively "src/test/resources" "build/test-classes")
9147 `(("java-joda-convert" ,java-joda-convert)))
9149 `(("java-junit" ,java-junit)
9150 ("java-hamcrest-core" ,java-hamcrest-core)
9151 ("tzdata" ,tzdata)))
9152 (home-page "http://www.joda.org/joda-time/")
9153 (synopsis "Replacement for the Java date and time classes")
9154 (description "Joda-Time is a replacement for the Java date and time
9155 classes prior to Java SE 8.")
9156 (license license:asl2.0)))
9158 (define-public java-xerces
9160 (name "java-xerces")
9165 (uri (string-append "mirror://apache/xerces/j/source/"
9166 "Xerces-J-src." version ".tar.gz"))
9168 (base32 "1006igwy2lqrmjvdk64v8dg6qbk9c29pm8xxx7r87n0vnpvmx6pm"))
9169 (patches (search-patches
9170 "java-xerces-xjavac_taskdef.patch"
9171 "java-xerces-build_dont_unzip.patch"
9172 "java-xerces-bootclasspath.patch"))))
9173 (build-system ant-build-system)
9175 `(#:tests? #f;; Test files are not present
9176 #:test-target "test"
9179 (modify-phases %standard-phases
9180 (add-after 'unpack 'create-build.properties
9181 (lambda* (#:key inputs #:allow-other-keys)
9182 (let ((jaxp (assoc-ref inputs "java-jaxp"))
9183 (resolver (assoc-ref inputs "java-apache-xml-commons-resolver")))
9184 (with-output-to-file "build.properties"
9187 "jar.jaxp = ~a/share/java/jaxp.jar~@
9188 jar.apis-ext = ~a/share/java/jaxp.jar~@
9189 jar.resolver = ~a/share/java/xml-resolver.jar~%"
9190 jaxp jaxp resolver)))
9191 ;; Make xerces use our version of jaxp in tests
9192 (substitute* "build.xml"
9194 (string-append jaxp "/share/java/jaxp.jar"))
9195 (("\\$\\{tools.dir\\}/\\$\\{jar.apis\\}")
9198 (replace 'install (install-jars "build")))))
9200 `(("java-apache-xml-commons-resolver" ,java-apache-xml-commons-resolver)
9201 ("java-jaxp" ,java-jaxp)))
9202 (home-page "https://xerces.apache.org/xerces2-j/")
9203 (synopsis "Validating XML parser for Java with DOM level 3 support")
9204 (description "The Xerces2 Java parser is the reference implementation of
9205 XNI, the Xerces Native Interface, and also a fully conforming XML Schema
9208 Xerces2-J supports the following standards and APIs:
9211 @item eXtensible Markup Language (XML) 1.0 Second Edition Recommendation
9212 @item Namespaces in XML Recommendation
9213 @item Document Object Model (DOM) Level 2 Core, Events, and Traversal and
9214 Range Recommendations
9215 @item Simple API for XML (SAX) 2.0.1 Core and Extension
9216 @item Java APIs for XML Processing (JAXP) 1.2.01
9217 @item XML Schema 1.0 Structures and Datatypes Recommendations
9218 @item Experimental implementation of the Document Object Model (DOM) Level 3
9219 Core and Load/Save Working Drafts
9220 @item Provides a partial implementation of the XML Inclusions (XInclude) W3C
9221 Candidate Recommendation
9224 Xerces is now able to parse documents written according to the XML 1.1
9225 Candidate Recommendation, except that it does not yet provide an option to
9226 enable normalization checking as described in section 2.13 of this
9227 specification. It also handles namespaces according to the XML Namespaces 1.1
9228 Candidate Recommendation, and will correctly serialize XML 1.1 documents if
9229 the DOM level 3 load/save API's are in use.")
9230 (license license:asl2.0)))
9232 (define-public java-jline
9238 (uri (string-append "https://github.com/jline/jline1/archive/jline-"
9242 "0bi3p6vrh7a6v0fbpb6rx9plpmx5zk3lr352xzdbz2jcxg499wir"))))
9243 (build-system ant-build-system)
9245 `(#:jar-name "jline.jar"
9246 #:source-dir "src/main/java"
9247 #:test-dir "src/test"
9249 (modify-phases %standard-phases
9250 (add-before 'build 'copy-resources
9252 (copy-recursively "src/main/resources" "build/classes")
9255 `(("java-junit" ,java-junit)))
9256 (home-page "https://jline.github.io")
9257 (synopsis "Console input handling library")
9258 (description "JLine is a Java library for handling console input. It is
9259 similar in functionality to BSD editline and GNU readline but with additional
9260 features that bring it on par with the Z shell line editor.")
9261 (license license:bsd-3)))
9263 (define-public java-xmlunit
9265 (name "java-xmlunit")
9269 (uri (string-append "https://github.com/xmlunit/xmlunit/archive/v"
9271 (file-name (string-append name "-" version ".tar.gz"))
9274 "035rivlnmwhfqj0fzviciv0bkh1h95ps1iwnh2kjcvdbk5nccm4z"))))
9275 (build-system ant-build-system)
9277 `(#:jar-name "java-xmlunit.jar"
9278 #:source-dir "xmlunit-core/src/main/java"
9279 #:test-dir "xmlunit-core/src/test"
9281 (modify-phases %standard-phases
9282 (add-before 'check 'copy-test-resources
9283 (lambda* (#:key inputs #:allow-other-keys)
9284 (copy-recursively (assoc-ref inputs "resources") "../test-resources")
9287 `(("java-junit" ,java-junit)
9288 ("java-mockito-1" ,java-mockito-1)
9289 ("java-hamcrest-all" ,java-hamcrest-all)
9290 ("java-objenesis" ,java-objenesis)
9291 ("java-asm" ,java-asm)
9292 ("java-cglib" ,java-cglib)
9297 (url "https://github.com/xmlunit/test-resources.git")
9298 (commit "a590d2ae865c3e0455691d76ba8eefccc2215aec")))
9299 (file-name "java-xmlunit-test-resources")
9302 "0r0glj37pg5l868yjz78gckr91cs8fysxxbp9p328dssssi91agr"))))))
9303 (home-page "http://www.xmlunit.org/")
9304 (synopsis "XML output testing")
9305 (description "XMLUnit provides you with the tools to verify the XML you
9306 emit is the one you want to create. It provides helpers to validate against
9307 an XML Schema, assert the values of XPath queries or compare XML documents
9308 against expected outcomes.")
9309 (license license:asl2.0)))
9311 (define-public java-xmlunit-legacy
9313 (inherit java-xmlunit)
9314 (name "java-xmlunit-legacy")
9316 `(#:jar-name "java-xmlunit-legacy.jar"
9317 #:source-dir "xmlunit-legacy/src/main/java"
9318 #:test-dir "xmlunit-legacy/src/test"))
9320 `(("java-xmlunit" ,java-xmlunit)
9321 ("java-junit" ,java-junit)))
9323 `(("java-mockito-1" ,java-mockito-1)))))
9325 (define-public java-openchart2
9327 (name "java-openchart2")
9331 (uri (string-append "http://download.approximatrix.com/openchart2/"
9332 "openchart2-" version ".source.zip"))
9335 "1xq96zm5r02n1blja0072jmmsifmxc40lbyfbnmcnr6mw42frh4g"))))
9336 (build-system ant-build-system)
9338 `(#:test-target "test"
9340 (modify-phases %standard-phases
9341 (add-after 'unpack 'fix-junit-errors
9343 (with-directory-excursion "unittest/src/com/approximatrix/charting/"
9344 (substitute* '("coordsystem/ticklocator/NumericXTickLocatorTest.java"
9345 "coordsystem/ticklocator/NumericYTickLocatorTest.java"
9346 "coordsystem/ticklocator/ObjectXTickLocatorTest.java"
9347 "model/DefaultChartDataModelConstraintsTest.java"
9348 "model/MultiScatterDataModelConstraintsTest.java"
9349 "model/threedimensional/DotPlotDataModelConstraintsTest.java")
9350 (("(assertEquals[^;]+);" before _)
9351 (string-append (string-drop-right before 2) ", 1E-6);"))))
9353 (replace 'install (install-jars ".")))))
9356 ("java-junit" ,java-junit)
9357 ("java-hamcrest-core" ,java-hamcrest-core)))
9358 (home-page "http://approximatrix.com/products/openchart2/")
9359 (synopsis "Simple plotting for Java")
9360 (description "Openchart2 provides a simple, yet powerful, interface for
9361 Java programmers to create two-dimensional charts and plots. The library
9362 features an assortment of graph styles, including advanced scatter plots, bar
9363 graphs, and pie charts.")
9364 (license license:lgpl2.1+)))