1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2015, 2016, 2017, 2018, 2019 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, 2019 Carlo Zancanaro <carlo@zancanaro.id.au>
6 ;;; Copyright © 2017, 2018, 2019 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, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
10 ;;; Copyright © 2018, 2019 Gábor Boskovits <boskovits@gmail.com>
11 ;;; Copyright © 2018 Chris Marusich <cmmarusich@gmail.com>
12 ;;; Copyright © 2018, 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
13 ;;; Copyright © 2019, 2020 Björn Höfling <bjoern.hoefling@bjoernhoefling.de>
14 ;;; Copyright © 2020 Raghav Gururajan <raghavgururajan@disroot.org>
15 ;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
18 ;;; This file is part of GNU Guix.
20 ;;; GNU Guix is free software; you can redistribute it and/or modify it
21 ;;; under the terms of the GNU General Public License as published by
22 ;;; the Free Software Foundation; either version 3 of the License, or (at
23 ;;; your option) any later version.
25 ;;; GNU Guix is distributed in the hope that it will be useful, but
26 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
27 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28 ;;; GNU General Public License for more details.
30 ;;; You should have received a copy of the GNU General Public License
31 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
33 (define-module (gnu packages java)
34 #:use-module ((guix licenses) #:prefix license:)
35 #:use-module (guix packages)
36 #:use-module (guix download)
37 #:use-module (guix hg-download)
38 #:use-module (guix git-download)
39 #:use-module (guix svn-download)
40 #:use-module (guix utils)
41 #:use-module (guix build-system ant)
42 #:use-module (guix build-system gnu)
43 #:use-module (guix build-system trivial)
44 #:use-module (gnu packages)
45 #:use-module (gnu packages attr)
46 #:use-module (gnu packages autotools)
47 #:use-module (gnu packages base)
48 #:use-module (gnu packages bash)
49 #:use-module (gnu packages certs)
50 #:use-module (gnu packages cpio)
51 #:use-module (gnu packages cups)
52 #:use-module (gnu packages compression)
53 #:use-module (gnu packages elf)
54 #:use-module (gnu packages fontutils)
55 #:use-module (gnu packages gawk)
56 #:use-module (gnu packages gettext)
57 #:use-module (gnu packages gcc)
58 #:use-module (gnu packages gl)
59 #:use-module (gnu packages ghostscript) ;lcms
60 #:use-module (gnu packages gnome)
61 #:use-module (gnu packages groovy)
62 #:use-module (gnu packages gtk)
63 #:use-module (gnu packages guile)
64 #:use-module (gnu packages icu4c)
65 #:use-module (gnu packages image)
66 #:use-module (gnu packages java-compression)
67 #:use-module (gnu packages libffi)
68 #:use-module (gnu packages linux) ;alsa
69 #:use-module (gnu packages maths)
70 #:use-module (gnu packages nss)
71 #:use-module (gnu packages onc-rpc)
72 #:use-module (gnu packages web)
73 #:use-module (gnu packages wget)
74 #:use-module (gnu packages pkg-config)
75 #:use-module (gnu packages perl)
76 #:use-module (gnu packages popt)
77 #:use-module (gnu packages kerberos)
78 #:use-module (gnu packages xml)
79 #:use-module (gnu packages xorg)
80 #:use-module (gnu packages texinfo)
81 #:use-module ((srfi srfi-1) #:select (fold alist-delete))
82 #:use-module (srfi srfi-11)
83 #:use-module (ice-9 match))
87 ;;; Java bootstrap toolchain.
90 ;; The Java bootstrap begins with Jikes, a Java compiler written in C++. We
91 ;; use it to build a simple version of GNU Classpath, the Java standard
92 ;; library. We chose version 0.93 because it is the last version that can be
93 ;; built with Jikes. With Jikes and this version of GNU Classpath we can
94 ;; build JamVM, a Java Virtual Machine. We build version 1.5.1 because it is
95 ;; the last version of JamVM that works with a version of GNU classpath that
96 ;; does not require ECJ. These three packages make up the bootstrap JDK.
98 ;; This is sufficient to build an older version of Ant, which is needed to
99 ;; build an older version of ECJ, an incremental Java compiler, both of which
100 ;; are written in Java.
102 ;; ECJ is needed to build the latest release (0.99) and the development
103 ;; version of GNU Classpath. The development version of GNU Classpath has
104 ;; much more support for Java 1.6 than the latest release, but we need to
105 ;; build 0.99 first to get a working version of javah. ECJ, the development
106 ;; version of GNU Classpath, and the latest version of JamVM make up the
107 ;; second stage JDK with which we can build the OpenJDK with the Icedtea 1.x
108 ;; build framework. We then build the more recent JDKs Icedtea 2.x and
111 (define-public libantlr3c
119 (string-append "https://www.antlr3.org/download/C/"
120 name "-" version ".tar.gz"))
122 (base32 "0lpbnb4dq4azmsvlhp6khq1gy42kyqyjv8gww74g5lm2y6blm4fa"))))
123 (build-system gnu-build-system)
125 `(#:configure-flags (list "--enable-debuginfo" "--disable-static")
126 #:phases (modify-phases %standard-phases
128 (lambda* (#:key build target native-inputs inputs outputs
129 (configure-flags '()) out-of-source? system
131 (let ((configure (assoc-ref %standard-phases 'configure))
132 (enable-64bit? (member system '("aarch64-linux"
135 (configure #:build build #:target target
136 #:native-inputs native-inputs
137 #:inputs inputs #:outputs outputs
138 #:configure-flags `(,(if enable-64bit?
142 #:out-of-source? out-of-source?)))))))
143 (synopsis "ANTLR C Library")
144 (description "LIBANTLR3C provides run-time C libraries for ANTLR3 (ANother
145 Tool for Language Recognition v3).")
146 (home-page "https://www.antlr3.org/")
147 (license license:bsd-3)))
155 (uri (string-append "mirror://sourceforge/jikes/Jikes/"
156 version "/jikes-" version ".tar.bz2"))
159 "1qqldrp74pzpy5ly421srqn30qppmm9cvjiqdngk8hf47dv2rc0c"))))
160 (build-system gnu-build-system)
161 (home-page "http://jikes.sourceforge.net/")
162 (synopsis "Compiler for the Java language")
163 (description "Jikes is a compiler that translates Java source files as
164 defined in The Java Language Specification into the bytecoded instruction set
165 and binary format defined in The Java Virtual Machine Specification.")
166 (license license:ibmpl1.0)))
168 ;; This is the last version of GNU Classpath that can be built without ECJ.
169 (define classpath-bootstrap
175 (uri (string-append "mirror://gnu/classpath/classpath-"
179 "0i99wf9xd3hw1sj2sazychb9prx8nadxh2clgvk3zlmb28v0jbfz"))
180 (patches (search-patches "classpath-aarch64-support.patch"))))
181 (build-system gnu-build-system)
184 (list (string-append "JAVAC="
185 (assoc-ref %build-inputs "jikes")
190 "--disable-gconf-peer"
196 (modify-phases %standard-phases
197 ;; XXX: This introduces a memory leak as we remove a call to free up
198 ;; memory for the file name string. This was necessary because of a
199 ;; runtime error that would have prevented us from building
200 ;; ant-bootstrap later. See https://issues.guix.gnu.org/issue/36685
201 ;; for the gnarly details.
202 (add-after 'unpack 'remove-call-to-free
204 (substitute* "native/jni/java-io/java_io_VMFile.c"
205 (("result = cpio_isFileExists.*" m)
206 (string-append m "\n//")))
208 (add-after 'install 'install-data
209 (lambda _ (invoke "make" "install-data"))))))
214 ("pkg-config" ,pkg-config)))
215 (home-page "https://www.gnu.org/software/classpath/")
216 (synopsis "Essential libraries for Java")
217 (description "GNU Classpath is a project to create core class libraries
218 for use with runtimes, compilers and tools for the Java programming
220 ;; GPLv2 or later, with special linking exception.
221 (license license:gpl2+)))
223 ;; This is the last version of JamVM that works with a version of GNU
224 ;; classpath that does not require ECJ.
225 (define jamvm-1-bootstrap
231 (uri (string-append "mirror://sourceforge/jamvm/jamvm/"
232 "JamVM%20" version "/jamvm-"
234 (patches (search-patches "jamvm-arm.patch"))
237 "06lhi03l3b0h48pc7x58bk9my2nrcf1flpmglvys3wyad6yraf36"))
240 ;; Remove precompiled software.
241 (delete-file "lib/classes.zip")
243 (build-system gnu-build-system)
246 (list (string-append "--with-classpath-install-dir="
247 (assoc-ref %build-inputs "classpath"))
248 "--disable-int-caching"
249 "--enable-runtime-reloc-checks"
252 `(("classpath" ,classpath-bootstrap)
257 ;; When built with a recent GCC and glibc the configure step of icedtea-6
258 ;; fails with an invalid instruction error.
261 ("libc" ,glibc-2.28)))
262 (home-page "http://jamvm.sourceforge.net/")
263 (synopsis "Small Java Virtual Machine")
264 (description "JamVM is a Java Virtual Machine conforming to the JVM
265 specification edition 2 (blue book). It is extremely small. However, unlike
266 other small VMs it supports the full spec, including object finalisation and
268 (license license:gpl2+)))
270 (define ant-bootstrap
272 (name "ant-bootstrap")
273 ;; The 1.10.x series requires Java 8. 1.9.0 and later use generics, which
274 ;; are not supported. The 1.8.x series is the last to use only features
275 ;; supported by Jikes.
279 (uri (string-append "http://archive.apache.org/dist/"
280 "ant/source/apache-ant-"
281 version "-src.tar.bz2"))
284 "1cg0lga887qz5iizh6mlkxp01lciymrhmp7wzxpl6zpnldxmzrjx"))))
285 (build-system gnu-build-system)
287 `(#:imported-modules ((guix build syscalls)
288 ,@%gnu-build-system-modules)
289 #:modules ((srfi srfi-1)
290 (guix build gnu-build-system)
292 (guix build syscalls))
293 #:tests? #f ; no "check" target
295 (modify-phases %standard-phases
299 (lambda* (#:key inputs #:allow-other-keys)
300 (setenv "JAVA_HOME" (assoc-ref inputs "jamvm"))
302 (string-append (assoc-ref inputs "jamvm")
305 (string-append (assoc-ref inputs "jikes")
308 (string-append (assoc-ref inputs "jamvm")
311 ;; Ant complains if this file doesn't exist.
312 (setenv "HOME" "/tmp")
313 (with-output-to-file "/tmp/.ant.properties"
314 (lambda _ (display "")))
316 ;; Use jikes instead of javac for <javac ...> tags in build.xml
317 (setenv "ANT_OPTS" "-Dbuild.compiler=jikes")
319 ;; jikes produces lots of warnings, but they are not very
320 ;; interesting, so we silence them.
321 (setenv "$BOOTJAVAC_OPTS" "-nowarn")
323 ;; Without these JamVM options the build may freeze.
324 (substitute* "bootstrap.sh"
325 (("^\"\\$\\{JAVACMD\\}\" " m)
326 ,@(if (string-prefix? "armhf" (or (%current-system)
327 (%current-target-system)))
328 `((string-append m "-Xnocompact "))
329 `((string-append m "-Xnocompact -Xnoinlining ")))))
331 ;; Disable tests because we are bootstrapping and thus don't have
332 ;; any of the dependencies required to build and run the tests.
333 (substitute* "build.xml"
334 (("depends=\"jars,test-jar\"") "depends=\"jars\""))
335 (invoke "bash" "bootstrap.sh"
336 (string-append "-Ddist.dir="
337 (assoc-ref %outputs "out")))))
338 (add-after 'build 'strip-jar-timestamps ;based on ant-build-system
339 (lambda* (#:key outputs #:allow-other-keys)
340 (define (repack-archive jar)
341 (let* ((dir (mkdtemp! "jar-contents.XXXXXX"))
342 (manifest (string-append dir "/META-INF/MANIFESTS.MF")))
343 (with-directory-excursion dir
344 (invoke "unzip" jar))
346 ;; XXX: copied from (gnu build install)
347 (for-each (lambda (file)
348 (let ((s (lstat file)))
349 (unless (eq? (stat:type s) 'symlink)
350 (utime file 0 0 0 0))))
351 (find-files dir #:directories? #t))
352 ;; It is important that the manifest appears first.
353 (with-directory-excursion dir
354 (let* ((files (find-files "." ".*" #:directories? #t))
355 ;; To ensure that the reference scanner can
356 ;; detect all store references in the jars
357 ;; we disable compression with the "-0" option.
358 (command (if (file-exists? manifest)
359 `("zip" "-0" "-X" ,jar ,manifest
361 `("zip" "-0" "-X" ,jar ,@files))))
362 (apply invoke command)))))
363 (for-each repack-archive
365 (string-append (assoc-ref %outputs "out") "/lib")
371 ("jamvm" ,jamvm-1-bootstrap)
374 (home-page "https://ant.apache.org")
375 (synopsis "Build tool for Java")
377 "Ant is a platform-independent build tool for Java. It is similar to
378 make but is implemented using the Java language, requires the Java platform,
379 and is best suited to building Java projects. Ant uses XML to describe the
380 build process and its dependencies, whereas Make uses Makefile format.")
381 (license license:asl2.0)))
383 ;; Version 3.2.2 is the last version without a dependency on a full-fledged
384 ;; compiler for Java 1.5.
385 (define ecj-bootstrap
387 (name "ecj-bootstrap")
391 (uri (string-append "http://archive.eclipse.org/eclipse/"
392 "downloads/drops/R-" version
393 "-200702121330/ecjsrc.zip"))
396 "05hj82kxd23qaglsjkaqcj944riisjha7acf7h3ljhrjyljx8307"))))
397 ;; It would be so much easier if we could use the ant-build-system, but we
398 ;; cannot as we don't have ant at this point. We use ecj for
399 ;; bootstrapping the JDK.
400 (build-system gnu-build-system)
402 `(#:modules ((guix build gnu-build-system)
405 #:tests? #f ; there are no tests
407 (modify-phases %standard-phases
409 (lambda* (#:key inputs #:allow-other-keys)
412 (cons (string-append (assoc-ref inputs "jamvm")
414 (find-files (string-append
415 (assoc-ref inputs "ant-bootstrap")
421 (lambda* (#:key inputs #:allow-other-keys)
422 ;; The unpack phase enters the "org" directory by mistake.
425 ;; Create a simple manifest to make ecj executable.
426 (with-output-to-file "manifest"
428 (display "Manifest-Version: 1.0
429 Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n")))
432 (and (apply invoke "jikes"
433 (find-files "." "\\.java$"))
434 (invoke "fastjar" "cvfm"
435 "ecj-bootstrap.jar" "manifest" "."))))
437 (lambda* (#:key outputs #:allow-other-keys)
438 (let ((share (string-append (assoc-ref outputs "out")
441 (install-file "ecj-bootstrap.jar" share)
444 `(("ant-bootstrap" ,ant-bootstrap)
447 ("jamvm" ,jamvm-1-bootstrap)
448 ("fastjar" ,fastjar)))
449 (home-page "https://eclipse.org")
450 (synopsis "Eclipse Java development tools core batch compiler")
451 (description "This package provides the Eclipse Java core batch compiler
452 for bootstrapping purposes. The @dfn{Eclipse compiler for Java} (ecj) is a
453 requirement for all GNU Classpath releases after version 0.93.")
454 (license license:epl1.0)))
456 (define ecj-javac-wrapper
457 (package (inherit ecj-bootstrap)
458 (name "ecj-javac-wrapper")
460 (build-system trivial-build-system)
462 `(#:modules ((guix build utils))
465 (use-modules (guix build utils))
466 (let* ((bin (string-append (assoc-ref %outputs "out") "/bin"))
467 (target (string-append bin "/javac"))
468 (guile (string-append (assoc-ref %build-inputs "guile")
470 (ecj (string-append (assoc-ref %build-inputs "ecj-bootstrap")
471 "/share/java/ecj-bootstrap.jar"))
472 (java (string-append (assoc-ref %build-inputs "jamvm")
474 (bootcp (let ((jvmlib (string-append (assoc-ref %build-inputs "classpath")
475 "/share/classpath")))
476 (string-append jvmlib "/glibj.zip:"
477 jvmlib "/tools.zip"))))
479 (with-output-to-file target
481 (format #t "#!~a --no-auto-compile\n!#\n" guile)
483 `(begin (use-modules (ice-9 match)
489 '(("-bootclasspath" ,bootcp)
494 (let ((classpath (getenv "CLASSPATH")))
496 (string-join (list ,ecj
497 ,(string-append (assoc-ref %build-inputs "jamvm")
501 (receive (vm-args other-args)
502 ;; Separate VM arguments from arguments to ECJ.
503 (partition (cut string-prefix? "-J" <>)
504 (fold (lambda (default acc)
505 (if (member (first default) acc)
506 acc (append default acc)))
510 ;; Remove "-J" prefix
511 (map (cut string-drop <> 2) vm-args)
512 '("org.eclipse.jdt.internal.compiler.batch.Main")
513 (cons "-nowarn" other-args)))))
515 (let ((args (cdr (command-line))))
517 (format (current-error-port) "javac: no arguments given!\n")
522 `(("guile" ,guile-2.2)
523 ("ecj-bootstrap" ,ecj-bootstrap)
524 ("jamvm" ,jamvm-1-bootstrap)
525 ("classpath" ,classpath-bootstrap)))
526 (description "This package provides a wrapper around the @dfn{Eclipse
527 compiler for Java} (ecj) with a command line interface that is compatible with
528 the standard javac executable.")))
530 ;; The classpath-bootstrap was built without a virtual machine, so it does not
531 ;; provide a wrapper for javah. We cannot build the development version of
532 ;; Classpath without javah.
533 (define classpath-0.99
534 (package (inherit classpath-bootstrap)
538 (uri (string-append "mirror://gnu/classpath/classpath-"
542 "1j7cby4k66f1nvckm48xcmh352b1d1b33qk7l6hi7dp9i9zjjagr"))
543 (patches (search-patches "classpath-aarch64-support.patch"))))
546 (list (string-append "--with-ecj-jar="
547 (assoc-ref %build-inputs "ecj-bootstrap")
548 "/share/java/ecj-bootstrap.jar")
549 (string-append "JAVAC="
550 (assoc-ref %build-inputs "ecj-javac-wrapper")
552 (string-append "JAVA="
553 (assoc-ref %build-inputs "jamvm")
556 "ac_cv_prog_java_works=yes" ; trust me
560 "--disable-gconf-peer"
566 (modify-phases %standard-phases
567 (add-after 'install 'install-data
568 (lambda _ (invoke "make" "install-data"))))))
570 `(("ecj-bootstrap" ,ecj-bootstrap)
571 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
573 ("jamvm" ,jamvm-1-bootstrap)
574 ("classpath" ,classpath-bootstrap)
576 ("pkg-config" ,pkg-config)))))
578 ;; We need this because classpath-bootstrap does not provide all of the tools
579 ;; we need to build classpath-devel.
580 (define classpath-jamvm-wrappers
581 (package (inherit classpath-0.99)
582 (name "classpath-jamvm-wrappers")
584 (build-system trivial-build-system)
586 `(#:modules ((guix build utils))
589 (use-modules (guix build utils))
590 (let* ((bash (assoc-ref %build-inputs "bash"))
591 (jamvm (assoc-ref %build-inputs "jamvm"))
592 (classpath (assoc-ref %build-inputs "classpath"))
593 (bin (string-append (assoc-ref %outputs "out")
596 (for-each (lambda (tool)
597 (with-output-to-file (string-append bin tool)
599 ,@(if (string-prefix? "armhf" (or (%current-system)
600 (%current-target-system)))
601 `((format #t "#!~a/bin/sh
602 ~a/bin/jamvm -Xnocompact -classpath ~a/share/classpath/tools.zip \
603 gnu.classpath.tools.~a.~a $@"
604 bash jamvm classpath tool
605 (if (string=? "native2ascii" tool)
606 "Native2ASCII" "Main")))
607 `((format #t "#!~a/bin/sh
608 ~a/bin/jamvm -Xnocompact -Xnoinlining -classpath ~a/share/classpath/tools.zip \
609 gnu.classpath.tools.~a.~a $@"
610 bash jamvm classpath tool
611 (if (string=? "native2ascii" tool)
612 "Native2ASCII" "Main"))))))
613 (chmod (string-append bin tool) #o755))
623 ("jamvm" ,jamvm-1-bootstrap)
624 ("classpath" ,classpath-0.99)))
626 (synopsis "Executables from GNU Classpath")
627 (description "This package provides wrappers around the tools provided by
628 the GNU Classpath library. They are executed by the JamVM virtual
631 ;; The last release of GNU Classpath is 0.99 and it happened in 2012. Since
632 ;; then Classpath has gained much more support for Java 1.6.
633 (define-public classpath-devel
634 (let ((commit "e7c13ee0cf2005206fbec0eca677f8cf66d5a103")
636 (package (inherit classpath-bootstrap)
637 (version (string-append "0.99-" revision "." (string-take commit 9)))
641 (url "https://git.savannah.gnu.org/git/classpath.git")
643 (file-name (string-append "classpath-" version "-checkout"))
646 "1v2rww76ww322mpg3s12a1kkc6gkp31bm9gcxs532h0wq285fiw4"))))
649 ;; Ensure that the initial heap size is smaller than the maximum
650 ;; size. By default only Xmx is set, which can lead to invalid
651 ;; memory settings on some machines with a lot of memory.
652 '("JAVAC_MEM_OPT=-J-Xms512M -J-Xmx768M")
654 (list (string-append "--with-ecj-jar="
655 (assoc-ref %build-inputs "ecj-bootstrap")
656 "/share/java/ecj-bootstrap.jar")
657 (string-append "--with-javac="
658 (assoc-ref %build-inputs "ecj-javac-wrapper")
660 (string-append "JAVA="
661 (assoc-ref %build-inputs "jamvm")
664 "ac_cv_prog_java_works=yes" ; trust me
668 "--disable-gconf-peer"
674 (modify-phases %standard-phases
675 ;; XXX The bootstrap phase executes autogen.sh, which fails after
676 ;; complaining about the lack of gettext.
678 (lambda _ (invoke "autoreconf" "-vif")))
679 (add-after 'unpack 'remove-unsupported-annotations
681 (substitute* (find-files "java" "\\.java$")
684 (add-after 'install 'install-data
685 (lambda _ (invoke "make" "install-data"))))))
687 `(("autoconf" ,autoconf)
688 ("automake" ,automake)
690 ("gettext" ,gettext-minimal)
692 ("classpath-jamvm-wrappers" ,classpath-jamvm-wrappers) ; for javah
693 ("ecj-bootstrap" ,ecj-bootstrap)
694 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
696 ("jamvm" ,jamvm-1-bootstrap)
698 ("pkg-config" ,pkg-config))))))
701 (package (inherit jamvm-1-bootstrap)
705 (uri (string-append "mirror://sourceforge/jamvm/jamvm/"
706 "JamVM%20" version "/jamvm-"
710 "1nl0zxz8y5x8gwsrm7n32bry4dx8x70p8z3s9jbdvs8avyb8whkn"))
713 ;; Remove precompiled software.
714 (delete-file "src/classlib/gnuclasspath/lib/classes.zip")
716 (build-system gnu-build-system)
719 (list (string-append "--with-classpath-install-dir="
720 (assoc-ref %build-inputs "classpath")))))
722 `(("classpath" ,classpath-devel)
723 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
727 (define ecj-javac-wrapper-final
728 (package (inherit ecj-javac-wrapper)
730 `(("guile" ,guile-2.2)
731 ("ecj-bootstrap" ,ecj-bootstrap)
733 ("classpath" ,classpath-devel)))))
735 ;; The bootstrap JDK consisting of jamvm, classpath-devel,
736 ;; ecj-javac-wrapper-final cannot build Icedtea 2.x directly, because it's
737 ;; written in Java 7. It can, however, build the unmaintained Icedtea 1.x,
738 ;; which uses Java 6 only.
739 (define-public icedtea-6
746 "http://icedtea.wildebeest.org/download/source/icedtea6-"
750 "0bg9sb4f7qbq77c0zf9m17p47ga0kf0r9622g9p12ysg26jd1ksg"))
751 (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\\\"\""))
759 (build-system gnu-build-system)
760 (outputs '("out" ; Java Runtime Environment
761 "jdk" ; Java Development Kit
762 "doc")) ; all documentation
764 `(;; There are many failing tests and many are known to fail upstream.
767 ;; The DSOs use $ORIGIN to refer to each other, but (guix build
768 ;; gremlin) doesn't support it yet, so skip this phase.
769 #:validate-runpath? #f
771 #:modules ((guix build utils)
772 (guix build gnu-build-system)
776 `("--enable-bootstrap"
779 "--with-parallel-jobs"
780 "--disable-downloading"
782 ,(string-append "--with-ecj="
783 (assoc-ref %build-inputs "ecj")
784 "/share/java/ecj-bootstrap.jar")
785 ,(string-append "--with-jar="
786 (assoc-ref %build-inputs "fastjar")
788 ,(string-append "--with-jdk-home="
789 (assoc-ref %build-inputs "classpath"))
790 ,(string-append "--with-java="
791 (assoc-ref %build-inputs "jamvm")
794 (modify-phases %standard-phases
796 (lambda* (#:key source inputs #:allow-other-keys)
797 (invoke "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"))
813 "langtools" "jaxp" "jaxws")))
814 (with-directory-excursion "openjdk"
815 (invoke "tar" "xvf" (assoc-ref inputs "hotspot-src"))
816 (rename-file "hg-checkout" "hotspot"))
817 (substitute* "patches/freetypeversion.patch"
818 (("REQUIRED_FREETYPE_VERSION = 2.2.1")
819 "REQUIRED_FREETYPE_VERSION = 2.10.1"))
820 (substitute* "Makefile.in"
821 (("echo \"ERROR: No up-to-date OpenJDK zip available\"; exit -1;")
822 "echo \"trust me\";")
823 ;; The contents of the bootstrap directory must be
824 ;; writeable but when copying from the store they are
826 (("mkdir -p lib/rt" line)
827 (string-append line "; chmod -R u+w $(BOOT_DIR)")))
828 (invoke "chmod" "-R" "u+w" "openjdk")))
829 (add-after 'unpack 'use-classpath
830 (lambda* (#:key inputs #:allow-other-keys)
831 (let ((jvmlib (assoc-ref inputs "classpath"))
832 (jamvm (assoc-ref inputs "jamvm")))
833 ;; Classpath does not provide rt.jar.
834 (substitute* "Makefile.in"
835 (("\\$\\(SYSTEM_JDK_DIR\\)/jre/lib/rt.jar")
836 (string-append jvmlib "/share/classpath/glibj.zip")))
837 ;; Make sure we can find all classes.
839 (string-append jvmlib "/share/classpath/glibj.zip:"
840 jvmlib "/share/classpath/tools.zip:"
841 jamvm "/lib/rt.jar"))
843 (string-append "-cp "
844 jvmlib "/share/classpath/glibj.zip:"
845 jvmlib "/share/classpath/tools.zip")))
847 (add-after 'unpack 'patch-patches
849 ;; shebang in patches so that they apply cleanly
850 (substitute* '("patches/jtreg-jrunscript.patch"
851 "patches/hotspot/hs23/drop_unlicensed_test.patch")
852 (("#!/bin/sh") (string-append "#!" (which "sh"))))
854 (add-after 'unpack 'patch-paths
855 (lambda* (#:key inputs #:allow-other-keys)
856 ;; buildtree.make generates shell scripts, so we need to replace
857 ;; the generated shebang
858 (substitute* '("openjdk/hotspot/make/linux/makefiles/buildtree.make")
859 (("/bin/sh") (which "bash")))
861 (let ((corebin (string-append
862 (assoc-ref inputs "coreutils") "/bin/"))
863 (binbin (string-append
864 (assoc-ref inputs "binutils") "/bin/"))
865 (grepbin (string-append
866 (assoc-ref inputs "grep") "/bin/")))
867 (substitute* '("openjdk/jdk/make/common/shared/Defs-linux.gmk"
868 "openjdk/corba/make/common/shared/Defs-linux.gmk")
869 (("UNIXCOMMAND_PATH = /bin/")
870 (string-append "UNIXCOMMAND_PATH = " corebin))
871 (("USRBIN_PATH = /usr/bin/")
872 (string-append "USRBIN_PATH = " corebin))
873 (("DEVTOOLS_PATH *= */usr/bin/")
874 (string-append "DEVTOOLS_PATH = " corebin))
875 (("COMPILER_PATH *= */usr/bin/")
876 (string-append "COMPILER_PATH = "
877 (assoc-ref inputs "gcc") "/bin/"))
878 (("DEF_OBJCOPY *=.*objcopy")
879 (string-append "DEF_OBJCOPY = " (which "objcopy"))))
881 ;; fix path to alsa header
882 (substitute* "openjdk/jdk/make/common/shared/Sanity.gmk"
883 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
884 (string-append "ALSA_INCLUDE="
885 (assoc-ref inputs "alsa-lib")
886 "/include/alsa/version.h")))
888 ;; fix hard-coded utility paths
889 (substitute* '("openjdk/jdk/make/common/shared/Defs-utils.gmk"
890 "openjdk/corba/make/common/shared/Defs-utils.gmk")
892 (string-append "ECHO = " (which "echo")))
894 (string-append "GREP = " (which "grep")))
896 (string-append "EGREP = " (which "egrep")))
898 (string-append "CPIO = " (which "cpio")))
899 (("READELF *=.*readelf")
900 (string-append "READELF = " (which "readelf")))
902 (string-append "AR = " (which "ar")))
904 (string-append "TAR = " (which "tar")))
906 (string-append "AS = " (which "as")))
908 (string-append "LD = " (which "ld")))
910 (string-append "STRIP = " (which "strip")))
912 (string-append "NM = " (which "nm")))
914 (string-append "SH = " (which "bash")))
916 (string-append "FIND = " (which "find")))
918 (string-append "LDD = " (which "ldd")))
919 (("NAWK *=.*(n|g)awk")
920 (string-append "NAWK = " (which "gawk")))
922 (string-append "XARGS = " (which "xargs")))
924 (string-append "UNZIP = " (which "unzip")))
926 (string-append "ZIPEXE = " (which "zip")))
928 (string-append "SED = " (which "sed"))))
930 ;; Some of these timestamps cause problems as they are more than
931 ;; 10 years ago, failing the build process.
933 "openjdk/jdk/src/share/classes/java/util/CurrencyData.properties"
934 (("AZ=AZM;2005-12-31-20-00-00;AZN") "AZ=AZN")
935 (("MZ=MZM;2006-06-30-22-00-00;MZN") "MZ=MZN")
936 (("RO=ROL;2005-06-30-21-00-00;RON") "RO=RON")
937 (("TR=TRL;2004-12-31-22-00-00;TRY") "TR=TRY"))
939 (add-before 'configure 'set-additional-paths
940 (lambda* (#:key inputs #:allow-other-keys)
942 (string-append (assoc-ref inputs "libxrender")
943 "/include/X11/extensions" ":"
944 (assoc-ref inputs "libxtst")
945 "/include/X11/extensions" ":"
946 (assoc-ref inputs "libxinerama")
947 "/include/X11/extensions" ":"
948 (or (getenv "CPATH") "")))
949 (setenv "ALT_CUPS_HEADERS_PATH"
950 (string-append (assoc-ref inputs "cups")
952 (setenv "ALT_FREETYPE_HEADERS_PATH"
953 (string-append (assoc-ref inputs "freetype")
955 (setenv "ALT_FREETYPE_LIB_PATH"
956 (string-append (assoc-ref inputs "freetype")
959 (add-before 'build 'disable-os-version-check
960 ;; allow build on linux major version change
962 (setenv "DISABLE_HOTSPOT_OS_VERSION_CHECK" "ok")
965 (lambda* (#:key outputs #:allow-other-keys)
966 (let ((doc (string-append (assoc-ref outputs "doc")
967 "/share/doc/icedtea"))
968 (jre (assoc-ref outputs "out"))
969 (jdk (assoc-ref outputs "jdk")))
970 (copy-recursively "openjdk.build/docs" doc)
971 (copy-recursively "openjdk.build/j2re-image" jre)
972 (copy-recursively "openjdk.build/j2sdk-image" jdk))
975 `(("ant" ,ant-bootstrap)
976 ("alsa-lib" ,alsa-lib)
978 ("classpath" ,classpath-devel)
979 ("coreutils" ,coreutils)
982 ("ecj" ,ecj-bootstrap)
983 ("ecj-javac" ,ecj-javac-wrapper-final)
985 ("fontconfig" ,fontconfig)
986 ("freetype" ,freetype)
998 ("libxcomposite" ,libxcomposite)
1000 ("libxinerama" ,libxinerama)
1001 ("libxrender" ,libxrender)
1002 ("libxslt" ,libxslt) ;for xsltproc
1004 ("libxtst" ,libxtst)
1005 ("mit-krb5" ,mit-krb5)
1007 ("nss-certs" ,nss-certs)
1009 ("pkg-config" ,pkg-config)
1010 ("procps" ,procps) ;for "free", even though I'm not sure we should use it
1020 (url "http://hg.openjdk.java.net/jdk6/jdk6/")
1021 (changeset "jdk6-b41")))
1024 "14q47yfg586fs64w30g8mk92m5dkxsvr36zzh0ra99xk5x0x96mv"))))
1029 (url "http://hg.openjdk.java.net/jdk6/jdk6/jdk/")
1030 (changeset "jdk6-b41")))
1033 "165824nhg1k1dx6zs9dny0j49rmk35jw5b13dmz8c77jfajml4v9"))))
1038 (url "http://hg.openjdk.java.net/jdk6/jdk6/hotspot/")
1039 (changeset "jdk6-b41")))
1042 "07lc1z4k5dj9nrc1wvwmpvxr3xgxrdkdh53xb95skk5ij49yagfd"))
1044 (search-patches "icedtea-6-hotspot-gcc-segfault-workaround.patch"))))
1049 (url "http://hg.openjdk.java.net/jdk6/jdk6/corba/")
1050 (changeset "jdk6-b41")))
1053 "1p9g1r9dnax2iwp7yb59qx7m4nmshqhwmrb2b8jj8zgbd9dl2i3q"))))
1058 (url "http://hg.openjdk.java.net/jdk6/jdk6/langtools/")
1059 (changeset "jdk6-b41")))
1062 "1x52wd67fynbbd9ild6fb4wvba3f5hhwk03qdjfazd0a1qr37z3d"))))
1067 (url "http://hg.openjdk.java.net/jdk6/jdk6/jaxp/")
1068 (changeset "jdk6-b41")))
1071 "0shlqrvzpr4nrkmv215lbxnby63s3yvbdh1yxcayznsyqwa4nlxm"))))
1076 (url "http://hg.openjdk.java.net/jdk6/jdk6/jaxws/")
1077 (changeset "jdk6-b41")))
1080 "0835lkw8vib1xhp8lxnybhlvzdh699hbi4mclxanydjk63zbpxk0"))))))
1081 (home-page "http://icedtea.classpath.org")
1082 (synopsis "Java development kit")
1084 "This package provides the OpenJDK built with the IcedTea build harness.
1085 This version of the OpenJDK is no longer maintained and is only used for
1086 bootstrapping purposes.")
1087 ;; IcedTea is released under the GPL2 + Classpath exception, which is the
1088 ;; same license as both GNU Classpath and OpenJDK.
1089 (license license:gpl2+)))
1091 (define-public icedtea-7
1092 (let* ((version "2.6.13")
1093 (drop (lambda (name hash)
1097 "http://icedtea.classpath.org/download/drops"
1098 "/icedtea7/" version "/" name ".tar.bz2"))
1099 (sha256 (base32 hash))))))
1106 "http://icedtea.wildebeest.org/download/source/icedtea-"
1110 "1w331rdqx1dcx2xb0fmjmrkdc71xqn20fxsgw8by4xhiblh88khh"))
1111 (modules '((guix build utils)))
1114 (substitute* "Makefile.in"
1115 ;; do not leak information about the build host
1116 (("DISTRIBUTION_ID=\"\\$\\(DIST_ID\\)\"")
1117 "DISTRIBUTION_ID=\"\\\"guix\\\"\""))
1119 (build-system gnu-build-system)
1120 (outputs '("out" ; Java Runtime Environment
1121 "jdk" ; Java Development Kit
1122 "doc")) ; all documentation
1124 `(;; There are many test failures. Some are known to
1125 ;; fail upstream, others relate to not having an X
1126 ;; server running at test time, yet others are a
1127 ;; complete mystery to me.
1129 ;; hotspot: passed: 241; failed: 45; error: 2
1130 ;; langtools: passed: 1,934; failed: 26
1134 ;; The DSOs use $ORIGIN to refer to each other, but (guix build
1135 ;; gremlin) doesn't support it yet, so skip this phase.
1136 #:validate-runpath? #f
1138 ;; Apparently, the C locale is needed for some of the tests.
1141 #:modules ((guix build utils)
1142 (guix build gnu-build-system)
1149 ;; TODO: package pcsc and sctp, and add to inputs
1150 `("--disable-system-pcsc"
1151 "--disable-system-sctp"
1152 "--enable-bootstrap"
1155 "--disable-downloading"
1156 "--disable-tests" ;they are run in the check phase instead
1157 "--with-openjdk-src-dir=./openjdk.src"
1158 ,(string-append "--with-jdk-home="
1159 (assoc-ref %build-inputs "jdk")))
1162 (modify-phases %standard-phases
1164 (lambda* (#:key source inputs #:allow-other-keys)
1165 (let ((target (string-append "icedtea-" ,version))
1166 (unpack (lambda* (name #:optional dir)
1168 (string-drop-right name 5))))
1171 (assoc-ref inputs name)
1173 "--strip-components=1")))))
1175 (invoke "tar" "xvf" source
1176 "-C" target "--strip-components=1")
1178 (unpack "openjdk-src" "openjdk.src")
1179 (with-directory-excursion "openjdk.src"
1181 (filter (cut string-suffix? "-drop" <>)
1186 (add-after 'unpack 'patch-bitrot
1188 (substitute* '("patches/boot/revert-6973616.patch"
1189 "openjdk.src/jdk/make/common/shared/Defs-versions.gmk")
1190 (("REQUIRED_FREETYPE_VERSION = 2.2.1")
1191 "REQUIRED_FREETYPE_VERSION = 2.10.1"))
1192 ;; As of attr 2.4.48 this header is no longer
1193 ;; included. It is provided by the libc instead.
1194 (substitute* '("configure"
1195 "openjdk.src/jdk/src/solaris/native/sun/nio/fs/LinuxNativeDispatcher.c")
1196 (("attr/xattr.h") "sys/xattr.h"))
1198 (add-after 'unpack 'fix-x11-extension-include-path
1199 (lambda* (#:key inputs #:allow-other-keys)
1200 (substitute* "openjdk.src/jdk/make/sun/awt/mawt.gmk"
1201 (((string-append "\\$\\(firstword \\$\\(wildcard "
1202 "\\$\\(OPENWIN_HOME\\)"
1203 "/include/X11/extensions\\).*$"))
1204 (string-append (assoc-ref inputs "libxrender")
1205 "/include/X11/extensions"
1206 " -I" (assoc-ref inputs "libxtst")
1207 "/include/X11/extensions"
1208 " -I" (assoc-ref inputs "libxinerama")
1209 "/include/X11/extensions"))
1210 (("\\$\\(wildcard /usr/include/X11/extensions\\)\\)") ""))
1212 (add-after 'unpack 'patch-paths
1214 ;; buildtree.make generates shell scripts, so we need to replace
1215 ;; the generated shebang
1216 (substitute* '("openjdk.src/hotspot/make/linux/makefiles/buildtree.make")
1217 (("/bin/sh") (which "bash")))
1219 (let ((corebin (string-append
1220 (assoc-ref %build-inputs "coreutils") "/bin/"))
1221 (binbin (string-append
1222 (assoc-ref %build-inputs "binutils") "/bin/"))
1223 (grepbin (string-append
1224 (assoc-ref %build-inputs "grep") "/bin/")))
1225 (substitute* '("openjdk.src/jdk/make/common/shared/Defs-linux.gmk"
1226 "openjdk.src/corba/make/common/shared/Defs-linux.gmk")
1227 (("UNIXCOMMAND_PATH = /bin/")
1228 (string-append "UNIXCOMMAND_PATH = " corebin))
1229 (("USRBIN_PATH = /usr/bin/")
1230 (string-append "USRBIN_PATH = " corebin))
1231 (("DEVTOOLS_PATH *= */usr/bin/")
1232 (string-append "DEVTOOLS_PATH = " corebin))
1233 (("COMPILER_PATH *= */usr/bin/")
1234 (string-append "COMPILER_PATH = "
1235 (assoc-ref %build-inputs "gcc") "/bin/"))
1236 (("DEF_OBJCOPY *=.*objcopy")
1237 (string-append "DEF_OBJCOPY = " (which "objcopy"))))
1239 ;; fix path to alsa header
1240 (substitute* "openjdk.src/jdk/make/common/shared/Sanity.gmk"
1241 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
1242 (string-append "ALSA_INCLUDE="
1243 (assoc-ref %build-inputs "alsa-lib")
1244 "/include/alsa/version.h")))
1246 ;; fix hard-coded utility paths
1247 (substitute* '("openjdk.src/jdk/make/common/shared/Defs-utils.gmk"
1248 "openjdk.src/corba/make/common/shared/Defs-utils.gmk")
1250 (string-append "ECHO = " (which "echo")))
1252 (string-append "GREP = " (which "grep")))
1253 (("EGREP *=.*egrep")
1254 (string-append "EGREP = " (which "egrep")))
1256 (string-append "CPIO = " (which "cpio")))
1257 (("READELF *=.*readelf")
1258 (string-append "READELF = " (which "readelf")))
1260 (string-append "AR = " (which "ar")))
1262 (string-append "TAR = " (which "tar")))
1264 (string-append "AS = " (which "as")))
1266 (string-append "LD = " (which "ld")))
1267 (("STRIP *=.*strip")
1268 (string-append "STRIP = " (which "strip")))
1270 (string-append "NM = " (which "nm")))
1272 (string-append "SH = " (which "bash")))
1274 (string-append "FIND = " (which "find")))
1276 (string-append "LDD = " (which "ldd")))
1277 (("NAWK *=.*(n|g)awk")
1278 (string-append "NAWK = " (which "gawk")))
1279 (("XARGS *=.*xargs")
1280 (string-append "XARGS = " (which "xargs")))
1281 (("UNZIP *=.*unzip")
1282 (string-append "UNZIP = " (which "unzip")))
1284 (string-append "ZIPEXE = " (which "zip")))
1286 (string-append "SED = " (which "sed"))))
1288 ;; Some of these timestamps cause problems as they are more than
1289 ;; 10 years ago, failing the build process.
1291 "openjdk.src/jdk/src/share/classes/java/util/CurrencyData.properties"
1292 (("AZ=AZM;2005-12-31-20-00-00;AZN") "AZ=AZN")
1293 (("MZ=MZM;2006-06-30-22-00-00;MZN") "MZ=MZN")
1294 (("RO=ROL;2005-06-30-21-00-00;RON") "RO=RON")
1295 (("TR=TRL;2004-12-31-22-00-00;TRY") "TR=TRY")))
1297 (add-before 'configure 'set-additional-paths
1298 (lambda* (#:key inputs #:allow-other-keys)
1299 (substitute* "openjdk.src/jdk/make/common/shared/Sanity.gmk"
1300 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
1301 (string-append "ALSA_INCLUDE="
1302 (assoc-ref inputs "alsa-lib")
1303 "/include/alsa/version.h")))
1306 (string-append (assoc-ref inputs "libxcomposite")
1307 "/include/X11/extensions" ":"
1308 (assoc-ref inputs "libxrender")
1309 "/include/X11/extensions" ":"
1310 (assoc-ref inputs "libxtst")
1311 "/include/X11/extensions" ":"
1312 (assoc-ref inputs "libxinerama")
1313 "/include/X11/extensions" ":"
1314 (or (getenv "CPATH") "")))
1315 (setenv "ALT_OBJCOPY" (which "objcopy"))
1316 (setenv "ALT_CUPS_HEADERS_PATH"
1317 (string-append (assoc-ref inputs "cups")
1319 (setenv "ALT_FREETYPE_HEADERS_PATH"
1320 (string-append (assoc-ref inputs "freetype")
1322 (setenv "ALT_FREETYPE_LIB_PATH"
1323 (string-append (assoc-ref inputs "freetype")
1326 (add-before 'build 'disable-os-version-check
1327 ;; allow build on linux major version change
1329 (setenv "DISABLE_HOTSPOT_OS_VERSION_CHECK" "ok")
1331 (add-before 'check 'fix-test-framework
1333 ;; Fix PATH in test environment
1334 (substitute* "test/jtreg/com/sun/javatest/regtest/Main.java"
1335 (("PATH=/bin:/usr/bin")
1336 (string-append "PATH=" (getenv "PATH"))))
1337 (substitute* "test/jtreg/com/sun/javatest/util/SysEnv.java"
1338 (("/usr/bin/env") (which "env")))
1339 (substitute* "openjdk.src/hotspot/test/test_env.sh"
1340 (("/bin/rm") (which "rm"))
1341 (("/bin/cp") (which "cp"))
1342 (("/bin/mv") (which "mv")))
1344 (add-before 'check 'fix-hotspot-tests
1346 (with-directory-excursion "openjdk.src/hotspot/test/"
1347 (substitute* "jprt.config"
1348 (("PATH=\"\\$\\{path4sdk\\}\"")
1349 (string-append "PATH=" (getenv "PATH")))
1350 (("make=/usr/bin/make")
1351 (string-append "make=" (which "make"))))
1352 (substitute* '("runtime/6626217/Test6626217.sh"
1353 "runtime/7110720/Test7110720.sh")
1354 (("/bin/rm") (which "rm"))
1355 (("/bin/cp") (which "cp"))
1356 (("/bin/mv") (which "mv"))))
1358 (add-before 'check 'fix-jdk-tests
1360 (with-directory-excursion "openjdk.src/jdk/test/"
1361 (substitute* "com/sun/jdi/JdbReadTwiceTest.sh"
1362 (("/bin/pwd") (which "pwd")))
1363 (substitute* "com/sun/jdi/ShellScaffold.sh"
1364 (("/bin/kill") (which "kill")))
1365 (substitute* "start-Xvfb.sh"
1366 ;;(("/usr/bin/X11/Xvfb") (which "Xvfb"))
1367 (("/usr/bin/nohup") (which "nohup")))
1368 (substitute* "javax/security/auth/Subject/doAs/Test.sh"
1369 (("/bin/rm") (which "rm")))
1370 (substitute* "tools/launcher/MultipleJRE.sh"
1371 (("echo \"#!/bin/sh\"")
1372 (string-append "echo \"#!" (which "rm") "\""))
1373 (("/usr/bin/zip") (which "zip")))
1374 (substitute* "com/sun/jdi/OnThrowTest.java"
1375 (("#!/bin/sh") (string-append "#!" (which "sh"))))
1376 (substitute* "java/lang/management/OperatingSystemMXBean/GetSystemLoadAverage.java"
1377 (("/usr/bin/uptime") (which "uptime")))
1378 (substitute* "java/lang/ProcessBuilder/Basic.java"
1379 (("/usr/bin/env") (which "env"))
1380 (("/bin/false") (which "false"))
1381 (("/bin/true") (which "true"))
1382 (("/bin/cp") (which "cp"))
1383 (("/bin/sh") (which "sh")))
1384 (substitute* "java/lang/ProcessBuilder/FeelingLucky.java"
1385 (("/bin/sh") (which "sh")))
1386 (substitute* "java/lang/ProcessBuilder/Zombies.java"
1387 (("/usr/bin/perl") (which "perl"))
1388 (("/bin/ps") (which "ps"))
1389 (("/bin/true") (which "true")))
1390 (substitute* "java/lang/Runtime/exec/ConcurrentRead.java"
1391 (("/usr/bin/tee") (which "tee")))
1392 (substitute* "java/lang/Runtime/exec/ExecWithDir.java"
1393 (("/bin/true") (which "true")))
1394 (substitute* "java/lang/Runtime/exec/ExecWithInput.java"
1395 (("/bin/cat") (which "cat")))
1396 (substitute* "java/lang/Runtime/exec/ExitValue.java"
1397 (("/bin/sh") (which "sh"))
1398 (("/bin/true") (which "true"))
1399 (("/bin/kill") (which "kill")))
1400 (substitute* "java/lang/Runtime/exec/LotsOfDestroys.java"
1401 (("/usr/bin/echo") (which "echo")))
1402 (substitute* "java/lang/Runtime/exec/LotsOfOutput.java"
1403 (("/usr/bin/cat") (which "cat")))
1404 (substitute* "java/lang/Runtime/exec/SleepyCat.java"
1405 (("/bin/cat") (which "cat"))
1406 (("/bin/sleep") (which "sleep"))
1407 (("/bin/sh") (which "sh")))
1408 (substitute* "java/lang/Runtime/exec/StreamsSurviveDestroy.java"
1409 (("/bin/cat") (which "cat")))
1410 (substitute* "java/rmi/activation/CommandEnvironment/SetChildEnv.java"
1411 (("/bin/chmod") (which "chmod")))
1412 (substitute* "java/util/zip/ZipFile/Assortment.java"
1413 (("/bin/sh") (which "sh"))))
1417 ;; The "make check-*" targets always return zero, so we need to
1418 ;; check for errors in the associated log files to determine
1419 ;; whether any tests have failed.
1420 (use-modules (ice-9 rdelim))
1421 (let* ((error-pattern (make-regexp "^(Error|FAILED):.*"))
1422 (checker (lambda (port)
1424 (let ((line (read-line port)))
1426 ((eof-object? line) #t)
1427 ((regexp-exec error-pattern line)
1428 (error "test failed"))
1430 (run-test (lambda (test)
1431 (invoke "make" test)
1432 (call-with-input-file
1433 (string-append "test/" test ".log")
1435 (when #f ; skip tests
1436 (run-test "check-hotspot")
1437 (run-test "check-langtools")
1438 (run-test "check-jdk"))
1441 (lambda* (#:key outputs #:allow-other-keys)
1442 (let ((doc (string-append (assoc-ref outputs "doc")
1443 "/share/doc/icedtea"))
1444 (jre (assoc-ref outputs "out"))
1445 (jdk (assoc-ref outputs "jdk")))
1446 (copy-recursively "openjdk.build/docs" doc)
1447 (copy-recursively "openjdk.build/j2re-image" jre)
1448 (copy-recursively "openjdk.build/j2sdk-image" jdk))
1450 ;; Some of the libraries in the lib/amd64 folder link to libjvm.so.
1451 ;; But that shared object is located in the server/ folder, so it
1452 ;; cannot be found. This phase creates a symbolic link in the
1453 ;; lib/amd64 folder so that the other libraries can find it.
1456 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
1458 ;; FIXME: Find the bug in the build system, so that this symlink is
1460 (add-after 'install 'install-libjvm
1461 (lambda* (#:key inputs outputs #:allow-other-keys)
1462 (let* ((lib-path (string-append (assoc-ref outputs "out")
1463 ;; See 'INSTALL_ARCH_DIR' in
1465 ,(match (%current-system)
1474 ;; We need a catch-all, dropping
1475 ;; '-linux' works in most cases.
1480 (%current-system) 6)))))))
1481 (symlink (string-append lib-path "/server/libjvm.so")
1482 (string-append lib-path "/libjvm.so")))
1484 ;; By default IcedTea only generates an empty keystore. In order to
1485 ;; be able to use certificates in Java programs we need to generate a
1486 ;; keystore from a set of certificates. For convenience we use the
1487 ;; certificates from the nss-certs package.
1488 (add-after 'install 'install-keystore
1489 (lambda* (#:key inputs outputs #:allow-other-keys)
1490 (let* ((keystore "cacerts")
1491 (certs-dir (string-append (assoc-ref inputs "nss-certs")
1493 (keytool (string-append (assoc-ref outputs "jdk")
1495 (define (extract-cert file target)
1496 (call-with-input-file file
1498 (call-with-output-file target
1500 (let loop ((line (read-line in 'concat))
1503 ((eof-object? line) #t)
1504 ((string-prefix? "-----BEGIN" line)
1506 (loop (read-line in 'concat) #t))
1507 ((string-prefix? "-----END" line)
1511 (when copying? (display line out))
1512 (loop (read-line in 'concat) copying?)))))))))
1513 (define (import-cert cert)
1514 (format #t "Importing certificate ~a\n" (basename cert))
1515 (let ((temp "tmpcert"))
1516 (extract-cert cert temp)
1517 (let ((port (open-pipe* OPEN_WRITE keytool
1519 "-alias" (basename cert)
1520 "-keystore" keystore
1521 "-storepass" "changeit"
1523 (display "yes\n" port)
1524 (when (not (zero? (status:exit-val (close-pipe port))))
1525 (format #t "failed to import ~a\n" cert)))
1526 (delete-file temp)))
1528 ;; This is necessary because the certificate directory contains
1529 ;; files with non-ASCII characters in their names.
1530 (setlocale LC_ALL "en_US.utf8")
1531 (setenv "LC_ALL" "en_US.utf8")
1533 (for-each import-cert (find-files certs-dir "\\.pem$"))
1534 (mkdir-p (string-append (assoc-ref outputs "out")
1536 (mkdir-p (string-append (assoc-ref outputs "jdk")
1537 "/jre/lib/security"))
1539 ;; The cacerts files we are going to overwrite are chmod'ed as
1540 ;; read-only (444) in icedtea-8 (which derives from this
1541 ;; package). We have to change this so we can overwrite them.
1542 (chmod (string-append (assoc-ref outputs "out")
1543 "/lib/security/" keystore) #o644)
1544 (chmod (string-append (assoc-ref outputs "jdk")
1545 "/jre/lib/security/" keystore) #o644)
1547 (install-file keystore
1548 (string-append (assoc-ref outputs "out")
1550 (install-file keystore
1551 (string-append (assoc-ref outputs "jdk")
1552 "/jre/lib/security"))
1557 "0l34ikyf62hbzlf9032alzkkqvf7bpmckz4gvirvph755w7gka8l"))
1560 "050gv2jbg1pi6qkn8w18bwpbklfa5b0kymjvan9pncddbj8m84fz"))
1563 "1k6yldwnxfzdg5926r1nlfv8d1r1j7rlp2nkz6gqh05vgyamnfhl"))
1566 "110j7jlz47x2gg6f7653x12mssan5kvj9l9h1m1c8c92drfxbqyk"))
1569 "0d1mca38ksxvdskp9im3pp7fdijhj1n3lwq9w13r9s4v3qyskgdd"))
1572 "0nq5236fzxn3p6x8cgncl56mzcmsj07q9gymysnws4c8byc6n0qj"))
1577 "http://icedtea.classpath.org/downloads/drops"
1578 "/icedtea7/" version "/hotspot.tar.bz2"))
1581 "17bdv39n4lh8l5737c96f3xgamx4y305m067p01cywgp7zaddqws"))
1582 (patches (search-patches
1583 "icedtea-7-hotspot-gcc-segfault-workaround.patch"))))
1584 ("ant" ,ant-bootstrap)
1586 ("coreutils" ,coreutils)
1587 ("diffutils" ,diffutils) ;for tests
1590 ("libtool" ,libtool)
1591 ("pkg-config" ,pkg-config)
1597 ("fastjar" ,fastjar)
1598 ("libxslt" ,libxslt) ;for xsltproc
1599 ("nss-certs" ,nss-certs)
1601 ("procps" ,procps) ;for "free", even though I'm not sure we should use it
1602 ("jdk" ,icedtea-6 "jdk")))
1604 `(("alsa-lib" ,alsa-lib)
1607 ("libxcomposite" ,libxcomposite)
1609 ("libxtst" ,libxtst)
1611 ("libxinerama" ,libxinerama)
1612 ("libxrender" ,libxrender)
1613 ("libjpeg" ,libjpeg)
1615 ("mit-krb5" ,mit-krb5)
1618 ("fontconfig" ,fontconfig)
1619 ("freetype" ,freetype)
1623 (home-page "http://icedtea.classpath.org")
1624 (synopsis "Java development kit")
1626 "This package provides the Java development kit OpenJDK built with the
1627 IcedTea build harness.")
1629 ;; 'configure' lists "mips" and "mipsel", but not "mips64el'.
1630 (supported-systems (delete "mips64el-linux" %supported-systems))
1632 ;; IcedTea is released under the GPL2 + Classpath exception, which is the
1633 ;; same license as both GNU Classpath and OpenJDK.
1634 (license license:gpl2+))))
1636 (define-public icedtea-8
1637 (let* ((version "3.7.0")
1638 (drop (lambda (name hash)
1642 "http://icedtea.classpath.org/download/drops"
1643 "/icedtea8/" version "/" name ".tar.xz"))
1644 (sha256 (base32 hash))))))
1645 (package (inherit icedtea-7)
1650 "http://icedtea.wildebeest.org/download/source/icedtea-"
1654 "09yqzn8rpccs7cyv89hhy5zlznpgqw5x3jz0w1ccp0cz1vgs8l5w"))
1655 (modules '((guix build utils)))
1658 (substitute* '("configure"
1660 ;; Do not embed build time
1661 (("(DIST_ID=\"Custom build).*$" _ prefix)
1662 (string-append prefix "\"\n"))
1663 ;; Do not leak information about the build host
1664 (("DIST_NAME=\"\\$build_os\"")
1665 "DIST_NAME=\"guix\""))
1668 `(#:imported-modules
1669 ((guix build ant-build-system)
1670 (guix build syscalls)
1671 ,@%gnu-build-system-modules)
1672 ,@(substitute-keyword-arguments (package-arguments icedtea-7)
1673 ((#:modules modules)
1674 `((guix build utils)
1675 (guix build gnu-build-system)
1676 ((guix build ant-build-system) #:prefix ant:)
1681 ((#:configure-flags flags)
1682 `(let ((jdk (assoc-ref %build-inputs "jdk")))
1683 `( ;;"--disable-bootstrap"
1684 "--enable-bootstrap"
1686 "--disable-downloading"
1687 "--disable-system-pcsc"
1688 "--disable-system-sctp"
1689 "--disable-tests" ;they are run in the check phase instead
1690 "--with-openjdk-src-dir=./openjdk.src"
1691 ,(string-append "--with-jdk-home=" jdk))))
1693 `(modify-phases ,phases
1694 (delete 'fix-x11-extension-include-path)
1695 (delete 'patch-paths)
1696 (delete 'set-additional-paths)
1697 (delete 'patch-patches)
1698 (delete 'patch-bitrot)
1699 ;; Prevent the keytool from recording the current time when
1700 ;; adding certificates at build time.
1701 (add-after 'unpack 'patch-keystore
1703 (substitute* "openjdk.src/jdk/src/share/classes/sun/security/provider/JavaKeyStore.java"
1704 (("date = new Date\\(\\);")
1706 date = (System.getenv(\"SOURCE_DATE_EPOCH\") != null) ?\
1707 new Date(Long.parseLong(System.getenv(\"SOURCE_DATE_EPOCH\"))) :\
1710 (add-after 'unpack 'patch-jni-libs
1711 ;; Hardcode dynamically loaded libraries.
1713 (let* ((library-path (search-path-as-string->list
1714 (getenv "LIBRARY_PATH")))
1715 (find-library (lambda (name)
1718 (string-append "lib" name ".so")))))
1721 (catch 'decoding-error
1724 (("VERSIONED_JNI_LIB_NAME\\(\"(.*)\", \"(.*)\"\\)"
1726 (format #f "\"~a\"" (find-library name)))
1727 (("JNI_LIB_NAME\\(\"(.*)\"\\)" _ name)
1728 (format #f "\"~a\"" (find-library name)))))
1730 ;; Those are safe to skip.
1731 (format (current-error-port)
1732 "warning: failed to substitute: ~a~%"
1734 (find-files "openjdk.src/jdk/src/solaris/native"
1738 (lambda* (#:key outputs #:allow-other-keys)
1739 (let ((doc (string-append (assoc-ref outputs "doc")
1740 "/share/doc/icedtea"))
1741 (jre (assoc-ref outputs "out"))
1742 (jdk (assoc-ref outputs "jdk")))
1743 (copy-recursively "openjdk.build/docs" doc)
1744 (copy-recursively "openjdk.build/images/j2re-image" jre)
1745 (copy-recursively "openjdk.build/images/j2sdk-image" jdk)
1746 ;; Install the nss.cfg file to JRE to enable SSL/TLS
1748 (copy-file (string-append jdk "/jre/lib/security/nss.cfg")
1749 (string-append jre "/lib/security/nss.cfg"))
1751 (add-after 'install 'strip-jar-timestamps
1752 (assoc-ref ant:%standard-phases 'strip-jar-timestamps)))))))
1754 `(("jdk" ,icedtea-7 "jdk")
1757 "1mj6xgmw31i6qd30qi9dmv7160fbcfq5ikz1jwjihdg2793il19p"))
1760 "1wb8k5zm40zld0986dvmlh5xh3gyixbg9h26sl662zy92amhmyyg"))
1763 "11ma4zz0599cy70xd219v7a8vin7p96xrhhz3wsaw6cjhkzpagah"))
1766 "14m1y0z0fbm5z5zjw3vnq85py8dma84bi3f9cw8rhdyc6skk8q4i"))
1769 "09andnm6xaasnp963hgx42yiflifiljp9z7z85jrfyc5z8a5whmf"))
1772 "0s6lcpc0zckz2fnq98aqf28nz9y3wbi41a3kyaqqa2abwbkm1zwl"))
1775 "15wizy123vhk40chl1b4p552jf2pw2hdww0myf11qab425axz4nw"))
1780 "http://icedtea.classpath.org/download/drops"
1781 "/icedtea8/" version "/hotspot.tar.xz"))
1784 "1ciz1w9j0kz7s1dxdhyqq71nla9icyz6qvn0b9z2zgkklqa98qmm"))
1785 (patches (search-patches
1786 "icedtea-7-hotspot-gcc-segfault-workaround.patch"))))
1789 "19pzl3ppaw8j6r5cnyp8qiw3hxijh3hdc46l39g5yfhdl4pr4hpa"))
1792 "0k33anxdzw1icn072wynfmmdjhsv50hay0j1sfkfxny12rb3vgdy"))
1793 ,@(fold alist-delete (package-native-inputs icedtea-7)
1794 '("jdk" "openjdk-src" "corba-drop" "jaxp-drop" "jaxws-drop"
1795 "jdk-drop" "langtools-drop" "hotspot-drop")))))))
1797 (define-public openjdk9
1803 (uri "https://hg.openjdk.java.net/jdk/jdk/archive/3cc80be736f2.tar.bz2")
1804 (file-name (string-append name "-" version ".tar.bz2"))
1807 "01ihmyf7k5z17wbr7xig7y40l9f01d5zjgkcmawn1102hw5kchpq"))
1808 (modules '((guix build utils)))
1811 (for-each delete-file (find-files "." ".*.bin$"))
1812 (for-each delete-file (find-files "." ".*.exe$"))
1813 (for-each delete-file (find-files "." ".*.jar$"))
1815 (build-system gnu-build-system)
1816 (outputs '("out" "jdk" "doc"))
1818 `(#:tests? #f; require jtreg
1820 ((guix build syscalls)
1821 ,@%gnu-build-system-modules)
1823 (modify-phases %standard-phases
1824 (add-after 'patch-source-shebangs 'fix-java-shebangs
1826 ;; This file was "fixed" by patch-source-shebangs, but it requires
1827 ;; this exact first line.
1828 (substitute* "jdk/make/data/blacklistedcertsconverter/blacklisted.certs.pem"
1829 (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))
1832 (lambda* (#:key inputs outputs #:allow-other-keys)
1833 ;; TODO: unbundle libpng and lcms
1834 (invoke "bash" "./configure"
1835 (string-append "--with-freetype=" (assoc-ref inputs "freetype"))
1836 "--disable-freetype-bundling"
1837 "--disable-warnings-as-errors"
1838 "--disable-hotspot-gtest"
1839 "--with-giflib=system"
1840 "--with-libjpeg=system"
1841 (string-append "--prefix=" (assoc-ref outputs "out")))
1845 (with-output-to-file ".src-rev"
1847 (display ,version)))
1848 (setenv "GUIX_LD_WRAPPER_ALLOW_IMPURITIES" "yes")
1849 (invoke "make" "all")
1851 ;; Some of the libraries in the lib/ folder link to libjvm.so.
1852 ;; But that shared object is located in the server/ folder, so it
1853 ;; cannot be found. This phase creates a symbolic link in the
1854 ;; lib/ folder so that the other libraries can find it.
1857 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
1859 ;; FIXME: Find the bug in the build system, so that this symlink is
1861 (add-after 'install 'install-libjvm
1862 (lambda* (#:key inputs outputs #:allow-other-keys)
1863 (let* ((lib-out (string-append (assoc-ref outputs "out")
1865 (lib-jdk (string-append (assoc-ref outputs "jdk")
1867 (symlink (string-append lib-jdk "/server/libjvm.so")
1868 (string-append lib-jdk "/libjvm.so"))
1869 (symlink (string-append lib-out "/server/libjvm.so")
1870 (string-append lib-out "/libjvm.so")))
1873 (lambda* (#:key outputs #:allow-other-keys)
1874 (let ((out (assoc-ref outputs "out"))
1875 (jdk (assoc-ref outputs "jdk"))
1876 (doc (assoc-ref outputs "doc"))
1877 (images (car (find-files "build" ".*-server-release"
1878 #:directories? #t))))
1879 (copy-recursively (string-append images "/images/jdk") jdk)
1880 (copy-recursively (string-append images "/images/jre") out)
1881 (copy-recursively (string-append images "/images/docs") doc))
1883 (add-after 'install 'strip-zip-timestamps
1884 (lambda* (#:key outputs #:allow-other-keys)
1885 (use-modules (guix build syscalls))
1886 (for-each (lambda (zip)
1887 (let ((dir (mkdtemp! "zip-contents.XXXXXX")))
1888 (with-directory-excursion dir
1889 (invoke "unzip" zip))
1891 (for-each (lambda (file)
1892 (let ((s (lstat file)))
1893 (unless (eq? (stat:type s) 'symlink)
1894 (format #t "reset ~a~%" file)
1895 (utime file 0 0 0 0))))
1896 (find-files dir #:directories? #t))
1897 (with-directory-excursion dir
1898 (let ((files (find-files "." ".*" #:directories? #t)))
1899 (apply invoke "zip" "-0" "-X" zip files)))))
1900 (find-files (assoc-ref outputs "doc") ".*.zip$"))
1903 `(("alsa-lib" ,alsa-lib)
1905 ("fontconfig" ,fontconfig)
1906 ("freetype" ,freetype)
1910 ("libjpeg" ,libjpeg)
1914 ("libxcomposite" ,libxcomposite)
1916 ("libxinerama" ,libxinerama)
1917 ("libxrender" ,libxrender)
1919 ("libxtst" ,libxtst)))
1921 `(("icedtea-8" ,icedtea-8)
1922 ("icedtea-8:jdk" ,icedtea-8 "jdk")
1926 (home-page "https://openjdk.java.net/projects/jdk9/")
1927 (synopsis "Java development kit")
1929 "This package provides the Java development kit OpenJDK.")
1930 (license license:gpl2+)))
1932 (define-public openjdk10
1939 (uri "http://hg.openjdk.java.net/jdk/jdk/archive/6fa770f9f8ab.tar.bz2")
1940 (file-name (string-append name "-" version ".tar.bz2"))
1943 "0zywq2203b4hx4jms9vbwvjcj1d3k2v3qpx4s33729fkpmid97r4"))
1944 (patches (search-patches
1945 "openjdk-10-idlj-reproducibility.patch"))
1946 (modules '((guix build utils)))
1949 (for-each delete-file (find-files "." ".*.bin$"))
1950 (for-each delete-file (find-files "." ".*.exe$"))
1951 (for-each delete-file (find-files "." ".*.jar$"))
1954 (substitute-keyword-arguments (package-arguments openjdk9)
1956 `(modify-phases ,phases
1957 (replace 'fix-java-shebangs
1959 ;; This file was "fixed" by patch-source-shebangs, but it requires
1960 ;; this exact first line.
1961 (substitute* "make/data/blacklistedcertsconverter/blacklisted.certs.pem"
1962 (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))
1965 (lambda* (#:key inputs outputs #:allow-other-keys)
1966 (invoke "bash" "./configure"
1967 (string-append "--with-freetype=" (assoc-ref inputs "freetype"))
1968 "--disable-freetype-bundling"
1969 "--disable-warnings-as-errors"
1970 "--disable-hotspot-gtest"
1971 "--with-giflib=system"
1972 "--with-libjpeg=system"
1973 "--with-native-debug-symbols=zipped"
1974 (string-append "--prefix=" (assoc-ref outputs "out")))
1977 `(("openjdk9" ,openjdk9)
1978 ("openjdk9:jdk" ,openjdk9 "jdk")
1983 (define-public openjdk11
1989 (uri "http://hg.openjdk.java.net/jdk/jdk/archive/76072a077ee1.tar.bz2")
1990 (file-name (string-append name "-" version ".tar.bz2"))
1993 "0v705w1s9lrqalzahir78pk397rkk9gfvzq821yv8h3xha0bqi6w"))
1994 (modules '((guix build utils)))
1997 (for-each delete-file (find-files "." ".*.bin$"))
1998 (for-each delete-file (find-files "." ".*.exe$"))
1999 (for-each delete-file (find-files "." ".*.jar$"))
2001 (build-system gnu-build-system)
2002 (outputs '("out" "jdk" "doc"))
2004 `(#:imported-modules
2005 ((guix build syscalls)
2006 (ice-9 binary-ports)
2008 ,@%gnu-build-system-modules)
2009 #:tests? #f; requires jtreg
2010 ;; TODO package jtreg
2011 ;; disable parallel builds, as the openjdk build system does not like -j
2012 #:parallel-build? #f
2013 #:parallel-tests? #f
2014 ;; reenable parallel builds and tests by adding the flags manually
2015 #:make-flags (list (string-append "JOBS=" (number->string (parallel-job-count))))
2017 `("--disable-option-checking" ; --enable-fast-install default flag errors otherwise
2018 "--disable-warnings-as-errors"
2019 ;; make validate-runpath pass, see: http://issues.guix.info/issue/32894
2020 "--with-native-debug-symbols=zipped"
2021 ;; do not use the bundled libraries
2022 "--with-giflib=system"
2023 "--with-lcms=system"
2024 "--with-libjpeg=system"
2025 "--with-libpng=system"
2026 "--with-version-pre="
2027 ;; allow the build system to locate the system freetype
2028 ,(string-append "--with-freetype-include="
2029 (assoc-ref %build-inputs "freetype") "/include")
2030 ,(string-append "--with-freetype-lib="
2031 (assoc-ref %build-inputs "freetype") "/lib"))
2034 (modify-phases %standard-phases
2035 (add-after 'patch-source-shebangs 'fix-java-shebangs
2037 ;; This file was "fixed" by patch-source-shebangs, but it requires
2038 ;; this exact first line.
2039 (substitute* "make/data/blacklistedcertsconverter/blacklisted.certs.pem"
2040 (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))
2044 (with-output-to-file ".src-rev"
2046 (display ,version)))
2047 (setenv "GUIX_LD_WRAPPER_ALLOW_IMPURITIES" "yes")
2048 (invoke "make" "all")
2050 ;; jdk 11 does not build jre by default any more
2051 ;; building it anyways
2052 ;; for further information see:
2053 ;; https://github.com/AdoptOpenJDK/openjdk-build/issues/356
2054 (add-after 'build 'build-jre
2056 (invoke "make" "legacy-jre-image")
2059 (lambda* (#:key outputs #:allow-other-keys)
2060 (let ((out (assoc-ref outputs "out"))
2061 (jdk (assoc-ref outputs "jdk"))
2062 (doc (assoc-ref outputs "doc"))
2063 (images (car (find-files "build" ".*-server-release"
2064 #:directories? #t))))
2065 (copy-recursively (string-append images "/images/jdk") jdk)
2066 (copy-recursively (string-append images "/images/jre") out)
2067 (copy-recursively (string-append images "/images/docs") doc))
2069 ;; Some of the libraries in the lib/ folder link to libjvm.so.
2070 ;; But that shared object is located in the server/ folder, so it
2071 ;; cannot be found. This phase creates a symbolic link in the
2072 ;; lib/ folder so that the other libraries can find it.
2075 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
2077 ;; FIXME: Find the bug in the build system, so that this symlink is
2079 (add-after 'install 'install-libjvm
2080 (lambda* (#:key inputs outputs #:allow-other-keys)
2081 (let* ((lib-out (string-append (assoc-ref outputs "out")
2083 (lib-jdk (string-append (assoc-ref outputs "jdk")
2085 (symlink (string-append lib-jdk "/server/libjvm.so")
2086 (string-append lib-jdk "/libjvm.so"))
2087 (symlink (string-append lib-out "/server/libjvm.so")
2088 (string-append lib-out "/libjvm.so")))
2090 (add-after 'install 'strip-character-data-timestamps
2091 (lambda* (#:key outputs #:allow-other-keys)
2092 (use-modules (guix build syscalls))
2093 (let ((archive (string-append
2094 (assoc-ref outputs "jdk") "/lib/src.zip"))
2095 (dir (mkdtemp! "zip-contents.XXXXXX")))
2096 (with-directory-excursion dir
2097 (invoke "unzip" archive))
2098 (delete-file archive)
2099 (with-directory-excursion dir
2100 (let ((char-data-files (find-files "." "CharacterData.*")))
2101 (for-each (lambda (file)
2103 (((string-append "This file was generated "
2104 "AUTOMATICALLY from a template "
2106 (string-append "This file was generated "
2107 "AUTOMATICALLY from a template "
2110 (with-directory-excursion dir
2111 (let ((files (find-files "." ".*" #:directories? #t)))
2112 (apply invoke "zip" "-0" "-X" archive files))))))
2113 (add-after 'strip-character-data-timestamps 'strip-archive-timestamps
2114 (lambda* (#:key outputs #:allow-other-keys)
2115 (use-modules (guix build syscalls)
2116 (ice-9 binary-ports)
2118 (letrec ((repack-archive
2120 (let ((dir (mkdtemp! "zip-contents.XXXXXX")))
2121 (with-directory-excursion dir
2122 (invoke "unzip" archive))
2123 (delete-file archive)
2124 (for-each (compose repack-archive canonicalize-path)
2125 (find-files dir "(ct.sym|.*.jar)$"))
2126 (let ((reset-file-timestamp
2128 (let ((s (lstat file)))
2129 (unless (eq? (stat:type s) 'symlink)
2130 (format #t "reset ~a~%" file)
2131 (utime file 0 0 0 0))))))
2132 (for-each reset-file-timestamp
2133 (find-files dir #:directories? #t)))
2134 (with-directory-excursion dir
2135 (let ((files (find-files "." ".*" #:directories? #t)))
2136 (apply invoke "zip" "-0" "-X" archive files)))))))
2137 (for-each repack-archive
2138 (find-files (assoc-ref outputs "doc") ".*.zip$"))
2139 (for-each repack-archive
2140 (find-files (assoc-ref outputs "jdk")
2141 ".*.(zip|jar|diz)$"))
2142 (repack-archive (string-append (assoc-ref outputs "jdk") "/lib/ct.sym"))
2145 (call-with-input-file file-name
2147 (let ((header #vu8(#x4a #x4d #x01 #x00)))
2148 (if (equal? (get-bytevector-n
2149 file (bytevector-length header))
2151 (let* ((header-length (bytevector-length header))
2152 (temp-file (mkstemp!
2154 "temp-file.XXXXXX")))
2155 (temp-filename (port-filename temp-file))
2157 (- (stat:size (stat file))
2159 (sendfile temp-file file content-length header-length)
2160 (delete-file file-name)
2161 (close-port temp-file)
2162 (repack-archive (canonicalize-path temp-filename))
2163 (call-with-output-file file-name
2165 (put-bytevector file header)
2166 (call-with-input-file temp-filename
2170 (stat:size (stat temp-file)) 0)))))))))))))
2171 (for-each repack-jmod
2172 (find-files (assoc-ref outputs "jdk") ".*.jmod$")))
2174 (add-after 'install 'remove-timestamp-from-api-summary
2175 (lambda* (#:key outputs #:allow-other-keys)
2176 (substitute* (string-append (assoc-ref outputs "doc")
2177 "/api/overview-summary.html")
2178 (("Generated by javadoc \\(11-internal\\).*$")
2179 "Generated by javadoc (11-internal) -->\n"))
2182 `(("alsa-lib" ,alsa-lib)
2184 ("fontconfig" ,fontconfig)
2185 ("freetype" ,freetype)
2188 ("libjpeg" ,libjpeg)
2191 ("libxext" ,libxext)
2192 ("libxrender" ,libxrender)
2194 ("libxtst" ,libxtst)))
2196 `(("autoconf" ,autoconf)
2197 ("openjdk10" ,openjdk10)
2198 ("openjdk10:jdk" ,openjdk10 "jdk")
2199 ("pkg-config" ,pkg-config)
2203 (home-page "https://openjdk.java.net/projects/jdk/11/")
2204 (synopsis "Java development kit")
2206 "This package provides the Java development kit OpenJDK.")
2207 (license license:gpl2+)))
2209 (define-public openjdk12
2216 (uri "http://hg.openjdk.java.net/jdk/jdk/archive/0276cba45aac.tar.bz2")
2217 (file-name (string-append name "-" version ".tar.bz2"))
2220 "0mbhdrk12b6878kby0flnbak7444dlpm0ihlmf92vk59y1c02bc2"))
2221 (modules '((guix build utils)))
2224 (for-each delete-file (find-files "." ".*.bin$"))
2225 (for-each delete-file (find-files "." ".*.exe$"))
2226 (for-each delete-file (find-files "." ".*.jar$"))
2229 `(("alsa-lib" ,alsa-lib)
2231 ("fontconfig" ,fontconfig)
2232 ("freetype" ,freetype)
2235 ("libjpeg" ,libjpeg)
2238 ("libxext" ,libxext)
2239 ("libxrandr" ,libxrandr)
2240 ("libxrender" ,libxrender)
2242 ("libxtst" ,libxtst)))
2244 `(("autoconf" ,autoconf)
2245 ("openjdk11" ,openjdk11)
2246 ("openjdk11:jdk" ,openjdk11 "jdk")
2247 ("pkg-config" ,pkg-config)
2251 (home-page "https://openjdk.java.net/projects/jdk/12")))
2253 (define-public icedtea icedtea-8)
2256 (define-public ant/java8
2257 (package (inherit ant-bootstrap)
2262 (uri (string-append "mirror://apache/ant/source/apache-ant-"
2263 version "-src.tar.gz"))
2266 "10p3dh77lkzzzcy32dk9azljixzadp46fggjfbvgkl8mmb8cxxv8"))
2267 (modules '((guix build utils)))
2270 (for-each delete-file
2271 (find-files "lib/optional" "\\.jar$"))
2274 (substitute-keyword-arguments (package-arguments ant-bootstrap)
2276 `(modify-phases ,phases
2277 (add-after 'unpack 'remove-scripts
2278 ;; Remove bat / cmd scripts for DOS as well as the antRun and runant
2281 (for-each delete-file
2282 (find-files "src/script"
2283 "(.*\\.(bat|cmd)|runant.*|antRun.*)"))
2286 (lambda* (#:key inputs outputs #:allow-other-keys)
2287 (setenv "JAVA_HOME" (assoc-ref inputs "jdk"))
2289 ;; Disable tests to avoid dependency on hamcrest-core, which needs
2290 ;; Ant to build. This is necessary in addition to disabling the
2291 ;; "check" phase, because the dependency on "test-jar" would always
2292 ;; result in the tests to be run.
2293 (substitute* "build.xml"
2294 (("depends=\"jars,test-jar\"") "depends=\"jars\""))
2295 (invoke "bash" "bootstrap.sh"
2296 (string-append "-Ddist.dir="
2297 (assoc-ref outputs "out")))))))))
2299 `(("jdk" ,icedtea-8 "jdk")
2301 ("unzip" ,unzip)))))
2303 ;; The 1.9.x series is the last that can be built with GCJ. The 1.10.x series
2306 (package (inherit ant/java8)
2310 (uri (string-append "mirror://apache/ant/source/apache-ant-"
2311 version "-src.tar.gz"))
2314 "1k28mka0m3isy9yr8gz84kz1f3f879rwaxrd44vdn9xbfwvwk86n"))))
2316 `(("jdk" ,icedtea-7 "jdk")
2318 ("unzip" ,unzip)))))
2320 (define-public ant-apache-bcel
2323 (name "ant-apache-bcel")
2325 (substitute-keyword-arguments (package-arguments ant/java8)
2327 `(modify-phases ,phases
2328 (add-after 'unpack 'link-bcel
2329 (lambda* (#:key inputs #:allow-other-keys)
2330 (for-each (lambda (file)
2332 (string-append "lib/optional/"
2334 (find-files (assoc-ref inputs "java-commons-bcel")
2337 (add-after 'build 'install
2338 (lambda* (#:key outputs #:allow-other-keys)
2339 (let* ((out (assoc-ref outputs "out"))
2340 (share (string-append out "/share/java"))
2341 (bin (string-append out "/bin"))
2342 (lib (string-append out "/lib")))
2344 (install-file (string-append lib "/ant-apache-bcel.jar") share)
2345 (delete-file-recursively bin)
2346 (delete-file-recursively lib)
2349 `(("java-commons-bcel" ,java-commons-bcel)
2350 ,@(package-inputs ant/java8)))))
2352 (define-public ant-junit
2357 (substitute-keyword-arguments (package-arguments ant/java8)
2359 `(modify-phases ,phases
2360 (add-after 'unpack 'link-junit
2361 (lambda* (#:key inputs #:allow-other-keys)
2362 (for-each (lambda (file)
2364 (string-append "lib/optional/"
2366 (find-files (assoc-ref inputs "java-junit")
2369 (add-after 'build 'install
2370 (lambda* (#:key outputs #:allow-other-keys)
2371 (let* ((out (assoc-ref outputs "out"))
2372 (share (string-append out "/share/java"))
2373 (bin (string-append out "/bin"))
2374 (lib (string-append out "/lib")))
2376 (install-file (string-append lib "/ant-junit.jar") share)
2377 (delete-file-recursively bin)
2378 (delete-file-recursively lib)
2381 `(("java-junit" ,java-junit)
2382 ,@(package-inputs ant/java8)))))
2384 (define-public java-openjfx-build
2386 (name "java-openjfx-build")
2387 ;; This is a java-8 version
2392 (url "http://hg.openjdk.java.net/openjfx/8u-dev/rt")
2393 (changeset (string-append
2394 (string-join (string-split version #\.) "u")
2396 (file-name (string-append name "-" version "-checkout"))
2397 (modules '((guix build utils)))
2400 ;; Delete included gradle jar
2401 (delete-file-recursively "gradle/wrapper")
2405 "0yg38mwpivswccv9n96k06x3iv82i4px1a9xg9l8dswzwmfj259f"))))
2406 (build-system ant-build-system)
2408 `(#:jar-name "java-openjfx.jar"
2409 #:source-dir "buildSrc/src/main/java"
2410 #:test-dir "buildSrc/src/test"
2412 (modify-phases %standard-phases
2413 (add-before 'configure 'generate-jsl-parser
2415 (invoke "antlr3" "-o"
2416 "buildSrc/src/main/java/com/sun/scenario/effect/compiler"
2417 "buildSrc/src/main/antlr/JSL.g"))))))
2419 `(("antlr3" ,antlr3)
2420 ("java-stringtemplate" ,java-stringtemplate)))
2422 `(("java-junit" ,java-junit)
2423 ("java-hamcrest-core" ,java-hamcrest-core)))
2424 (home-page "https://openjfx.io")
2425 (synopsis "Graphical application toolkit in Java")
2426 (description "OpenJFX is a client application platform for desktop,
2427 mobile and embedded systems built on Java. Its goal is to produce a
2428 modern, efficient, and fully featured toolkit for developing rich client
2429 applications. This package contains base classes for the OpenJFX
2430 distribution and helper classes for building other parts of the
2432 (license license:gpl2))) ;gpl2 only, with classpath exception
2434 (define-public java-openjfx-base
2435 (package (inherit java-openjfx-build)
2436 (name "java-openjfx-base")
2438 `(#:jar-name "java-openjfx-base.jar"
2439 #:source-dir "modules/base/src/main/java:modules/base/src/main/java8:modules/base/src/main/version-info"
2440 #:test-dir "modules/base/src/test"
2442 (modify-phases %standard-phases
2443 (add-before 'check 'remove-empty-file
2445 (with-directory-excursion "modules/base/src/test/java"
2446 ;; These files are completely commented, but junit expects them to
2447 ;; contain a class, so tests fail.
2449 "com/sun/javafx/property/adapter/PropertyDescriptorTest.java")
2451 "com/sun/javafx/property/adapter/ReadOnlyPropertyDescriptorTest.java")
2452 (delete-file "javafx/beans/property/PropertiesTest.java")
2454 "javafx/beans/property/adapter/ReadOnlyJavaBeanPropertyBuilder_General_Test.java")
2456 (delete-file "com/sun/javafx/runtime/VersionInfoTest.java"))
2459 `(("java-openjfx-build" ,java-openjfx-build)))
2460 (description "OpenJFX is a client application platform for desktop,
2461 mobile and embedded systems built on Java. Its goal is to produce a
2462 modern, efficient, and fully featured toolkit for developing rich client
2463 applications. This package contains base classes for the OpenJFX
2466 (define-public java-openjfx-graphics
2467 (package (inherit java-openjfx-build)
2468 (name "java-openjfx-graphics")
2470 `(#:jar-name "java-openjfx-graphics.jar"
2471 #:source-dir "modules/graphics/src/main/java"
2472 #:tests? #f; require X
2473 #:test-dir "modules/graphics/src/test"))
2475 `(("java-openjfx-base" ,java-openjfx-base)
2476 ("java-swt" ,java-swt)))
2477 (description "OpenJFX is a client application platform for desktop,
2478 mobile and embedded systems built on Java. Its goal is to produce a
2479 modern, efficient, and fully featured toolkit for developing rich client
2480 applications. This package contains graphics-related classes for the
2481 OpenJFX distribution.")))
2483 (define-public java-openjfx-media
2484 (package (inherit java-openjfx-build)
2485 (name "java-openjfx-media")
2487 `(("java-openjxf-graphics" ,java-openjfx-graphics)))
2489 `(#:jar-name "java-openjfx-media.jar"
2490 #:source-dir "modules/media/src/main/java"
2491 #:tests? #f)); no tests
2492 (description "OpenJFX is a client application platform for desktop,
2493 mobile and embedded systems built on Java. Its goal is to produce a
2494 modern, efficient, and fully featured toolkit for developing rich client
2495 applications. This package contains media-related classes for the
2496 OpenJFX distribution.")))
2498 (define-public javacc-4
2505 (url "https://github.com/javacc/javacc.git")
2506 (commit "release_41")))
2507 (file-name (string-append "javacc-" version "-checkout"))
2510 "07ysav7j8r1c6h8qxrgqk6lwdp74ly0ad1935lragxml0qqc3ka0"))
2511 (modules '((guix build utils)))
2512 ;; delete bundled jars
2513 (snippet '(begin (delete-file-recursively "lib") #t))))
2514 (build-system ant-build-system)
2516 ;; /tmp/guix-build-javacc-4.1.drv-0/source/test/javacodeLA/build.xml:60:
2521 (modify-phases %standard-phases
2522 ;; Delete tests to avoid build failure (we don't run them anyway).
2523 (add-after 'unpack 'delete-tests
2525 (for-each delete-file
2526 '("src/org/javacc/JavaCCTestCase.java"
2527 "src/org/javacc/parser/ExpansionTest.java"
2528 "src/org/javacc/parser/OptionsTest.java"
2529 "src/org/javacc/jjtree/JJTreeOptionsTest.java"))
2530 (for-each delete-file-recursively
2531 '("src/org/javacc/parser/test"
2532 "src/org/javacc/jjdoc/test"))
2534 (replace 'install (install-jars "bin/lib")))))
2535 (home-page "https://javacc.org/")
2536 (synopsis "Java parser generator")
2537 (description "Java Compiler Compiler (JavaCC) is the most popular parser
2538 generator for use with Java applications. A parser generator is a tool that
2539 reads a grammar specification and converts it to a Java program that can
2540 recognize matches to the grammar. In addition to the parser generator itself,
2541 JavaCC provides other standard capabilities related to parser generation such
2542 as tree building (via a tool called JJTree included with JavaCC), actions,
2544 (license license:bsd-3)))
2546 (define-public javacc
2554 (url "https://github.com/javacc/javacc.git")
2556 (file-name (git-file-name "javacc" version))
2558 (base32 "18kkak3gda93gr25jrgy6q00g0jr8i24ri2wk4kybz1v234fxx9i"))
2559 (modules '((guix build utils)))
2560 ;; Delete bundled jars.
2561 (snippet '(begin (for-each delete-file-recursively
2562 '("bootstrap" "lib"))
2565 `(#:make-flags ; bootstrap from javacc-4
2566 (list (string-append "-Dbootstrap-jar="
2567 (assoc-ref %build-inputs "javacc")
2568 "/share/java/javacc.jar"))
2569 #:test-target "test"
2571 (modify-phases %standard-phases
2572 (replace 'install (install-jars "target"))
2573 (add-after 'install 'install-bin
2574 (lambda* (#:key outputs inputs #:allow-other-keys)
2575 (let* ((out (assoc-ref outputs "out"))
2576 (dir (string-append out "/share/java"))
2577 (bin (string-append out "/bin"))
2578 (javacc (string-append bin "/javacc")))
2580 (with-output-to-file javacc
2583 (string-append "#!/bin/sh\n"
2584 (assoc-ref inputs "jdk") "/bin/java"
2585 " -cp " dir "/javacc.jar" " `basename $0`" " $*"))))
2586 (chmod javacc #o755)
2587 ;; symlink to different names to affect the first argument and
2588 ;; change the behavior of the jar file.
2589 (symlink javacc (string-append bin "/jjdoc"))
2590 (symlink javacc (string-append bin "/jjtree"))
2594 `(("javacc" ,javacc-4)))))
2596 ;; This is the last 3.x release of ECJ
2597 (define-public java-ecj-3
2603 (uri (string-append "http://archive.eclipse.org/eclipse/"
2604 "downloads/drops/R-" version
2605 "-201301310800/ecjsrc-" version ".jar"))
2608 "01mdj14jw11g1jfnki4fi8229p0c6zzckd38zqy2w4m3cjcvsx04"))))
2609 (build-system ant-build-system)
2611 `(#:tests? #f ; none included
2612 #:jdk ,icedtea-7 ; doesn't build with JDK8+
2613 #:make-flags (list "-f" "src/build.xml")
2614 #:build-target "build"
2616 (modify-phases %standard-phases
2617 (add-after 'unpack 'fix-manifest
2619 ;; Record the main class to make ecj executable.
2620 (with-atomic-file-replacement "src/META-INF/MANIFEST.MF"
2622 (display "Manifest-Version: 1.0
2623 Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n"
2626 (replace 'install (install-jars ".")))))
2627 (home-page "https://eclipse.org")
2628 (synopsis "Eclipse Java development tools core batch compiler")
2629 (description "This package provides the Eclipse Java core batch compiler.")
2630 (license license:epl1.0)))
2632 ;; This is needed for java-cisd-args4j
2633 (define-public java-ecj-3.5
2634 (package (inherit java-ecj-3)
2637 (method url-fetch/zipbomb)
2638 (uri (string-append "http://archive.eclipse.org/eclipse/"
2639 "downloads/drops/R-" version
2640 "-200909170800/ecjsrc-" version ".zip"))
2643 "1vnl2mavisc567bip736xzsvvbjif5279wc4a7pbdik5wlir8qr7"))))
2644 (build-system ant-build-system)
2646 `(#:tests? #f ; none included
2647 #:jdk ,icedtea-7 ; doesn't build with JDK8+
2648 #:build-target "build"
2650 (modify-phases %standard-phases
2651 (add-after 'unpack 'fix-manifest
2653 ;; Record the main class to make ecj executable.
2654 (with-atomic-file-replacement "META-INF/MANIFEST.MF"
2657 (display "Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n"
2660 (replace 'install (install-jars ".")))))
2662 `(("unzip" ,unzip)))))
2664 (define-public java-ecj
2665 (package (inherit java-ecj-3)
2671 "http://archive.eclipse.org/eclipse/downloads/drops4/R-"
2673 "-201703010400/ecjsrc-"
2678 "11cfgsdgznja1pvlxkjbqykxd7pcd5655vkm7s44xmahmap15gpl"))))
2680 `(#:tests? #f ; none included
2681 #:build-target "build"
2683 (modify-phases %standard-phases
2684 (add-after 'unpack 'fix-build.xml
2686 (substitute* "src/build.xml"
2690 (add-after 'unpack 'fix-prop
2692 (substitute* "src/build.xml"
2693 (("^.*properties.*$")
2694 "<include name=\"**/*.properties\"/>
2695 <include name=\"**/*.props\"/>"))
2697 (add-before 'build 'chdir
2701 (replace 'install (install-jars ".")))))))
2703 (define-public java-cisd-base
2704 (let ((revision 38938)
2705 (base-version "14.12.0"))
2707 (name "java-cisd-base")
2708 (version (string-append base-version "-" (number->string revision)))
2712 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2713 "base/tags/release/"
2714 (version-major+minor base-version)
2715 ".x/" base-version "/base/"))
2716 (revision revision)))
2717 (file-name (string-append "java-cisd-base-" version "-checkout"))
2720 "1i5adyf7nzclb0wydgwa1az04qliid8035vpahaandmkmigbnxiy"))
2721 (modules '((guix build utils)))
2724 ;; Delete included gradle jar
2725 (delete-file-recursively "gradle/wrapper")
2726 ;; Delete pre-built native libraries
2727 (delete-file-recursively "libs")
2729 (build-system ant-build-system)
2731 `(#:make-flags '("-file" "build/build.xml")
2732 #:test-target "jar-test"
2735 (modify-phases %standard-phases
2736 (add-after 'unpack 'unpack-build-resources
2737 (lambda* (#:key inputs #:allow-other-keys)
2738 (copy-recursively (assoc-ref inputs "build-resources")
2739 "../build_resources")
2741 (add-after 'unpack-build-resources 'fix-dependencies
2742 (lambda* (#:key inputs #:allow-other-keys)
2743 (substitute* "build/build.xml"
2744 (("\\$\\{lib\\}/testng/testng-jdk15.jar")
2745 (string-append (assoc-ref inputs "java-testng")
2746 "/share/java/java-testng.jar"))
2747 (("\\$\\{lib\\}/commons-lang/commons-lang.jar")
2748 (string-append (assoc-ref inputs "java-commons-lang")
2749 "/share/java/commons-lang-"
2750 ,(package-version java-commons-lang) ".jar"))
2751 (("\\$\\{lib\\}/commons-io/commons-io.jar")
2752 (string-append (assoc-ref inputs "java-commons-io")
2753 "/share/java/commons-io-"
2754 ,(package-version java-commons-io)
2756 ;; Remove dependency on svn
2757 (("<build-info.*") "")
2758 (("\\$\\{revision.number\\}")
2759 ,(number->string revision))
2760 (("\\$\\{version.number\\}") ,base-version))
2761 ;; Remove dependency on classycle
2762 (substitute* "../build_resources/ant/build-common.xml"
2763 (("<taskdef name=\"dependency-checker.*") "")
2764 (("classname=\"classycle.*") "")
2765 (("classpath=\"\\$\\{lib\\}/classycle.*") ""))
2767 ;; A few tests fail because of the lack of a proper /etc/groups and
2768 ;; /etc/passwd file in the build container.
2769 (add-after 'unpack 'disable-broken-tests
2771 (substitute* "sourceTest/java/ch/systemsx/cisd/base/AllTests.java"
2772 (("Unix.isOperational\\(\\)") "false"))
2774 ;; These decorators are almost useless and pull in an unpackaged
2776 (add-after 'unpack 'remove-useless-decorators
2778 (substitute* "source/java/ch/systemsx/cisd/base/unix/Unix.java"
2780 (("import ch.rinn.restrictions.Private;") ""))
2781 (substitute* "sourceTest/java/ch/systemsx/cisd/base/unix/UnixTests.java"
2783 (("import ch.rinn.restrictions.Friend;") ""))
2785 (add-before 'configure 'build-native-code
2786 (lambda* (#:key inputs #:allow-other-keys)
2787 (let ((jdk (assoc-ref inputs "jdk"))
2788 (dir ,(match (%current-system)
2791 ((or "armhf-linux" "aarch64-linux")
2793 ((or "x86_64-linux")
2795 (_ "unknown-Linux"))))
2796 (with-directory-excursion "source/c"
2797 (invoke "gcc" "-shared" "-O3" "-fPIC" "unix.c"
2798 (string-append "-I" jdk "/include")
2799 (string-append "-I" jdk "/include/linux")
2801 (invoke "gcc" "-shared" "-O3" "-fPIC"
2802 "-DMACHINE_BYTE_ORDER=1"
2810 (string-append "-I" jdk "/include")
2811 (string-append "-I" jdk "/include/linux")
2812 "-o" "libnativedata.so"))
2813 (install-file "source/c/libunix.so"
2814 (string-append "libs/native/unix/" dir))
2815 (install-file "source/c/libnativedata.so"
2816 (string-append "libs/native/nativedata/" dir))
2818 ;; In the "check" phase we only build the test executable.
2819 (add-after 'check 'run-tests
2821 (invoke "java" "-jar" "targets/dist/sis-base-test.jar")
2822 (delete-file "targets/dist/sis-base-test.jar")
2824 (replace 'install (install-jars "targets/dist")))))
2826 `(("jdk" ,icedtea-8)
2827 ("java-commons-lang" ,java-commons-lang)
2828 ("java-commons-io" ,java-commons-io)
2829 ("java-testng" ,java-testng)
2834 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2835 "base/tags/release/"
2836 (version-major+minor base-version)
2838 "/build_resources/"))
2839 (revision revision)))
2842 "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk"))))))
2843 (home-page "http://svnsis.ethz.ch")
2844 (synopsis "Utility classes for libraries from ETH Zurich")
2845 (description "This library supplies some utility classes needed for
2846 libraries from the SIS division at ETH Zurich like jHDF5.")
2847 ;; The C sources are under a non-copyleft license, which looks like a
2848 ;; variant of the BSD licenses. The whole package is under the ASL2.0.
2849 (license (list license:asl2.0
2850 (license:non-copyleft "file://source/c/COPYING"))))))
2852 (define-public java-cisd-args4j
2853 (let ((revision 39162)
2854 (base-version "9.11.2"))
2856 (name "java-cisd-args4j")
2857 (version (string-append base-version "-" (number->string revision)))
2861 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2862 "args4j/tags/release/"
2863 (version-major+minor base-version)
2864 ".x/" base-version "/args4j/"))
2865 (revision revision)))
2866 (file-name (string-append "java-cisd-args4j-" version "-checkout"))
2869 "0hhqznjaivq7ips7mkwas78z42s6djsm20rrs7g1zd59rcsakxn2"))))
2870 (build-system ant-build-system)
2872 `(#:make-flags '("-file" "build/build.xml")
2873 #:tests? #f ; there are no tests
2874 ;; There are weird build failures with JDK8, such as: "The type
2875 ;; java.io.ObjectInputStream cannot be resolved. It is indirectly
2876 ;; referenced from required .class files"
2878 #:modules ((guix build ant-build-system)
2880 (guix build java-utils)
2885 (modify-phases %standard-phases
2886 (add-after 'unpack 'unpack-build-resources
2887 (lambda* (#:key inputs #:allow-other-keys)
2888 (mkdir-p "../build_resources")
2889 (invoke "tar" "xf" (assoc-ref inputs "build-resources")
2890 "-C" "../build_resources"
2891 "--strip-components=1")
2892 (mkdir-p "../build_resources/lib")
2894 (add-after 'unpack-build-resources 'fix-dependencies
2895 (lambda* (#:key inputs #:allow-other-keys)
2896 ;; FIXME: There should be a more convenient abstraction for
2897 ;; editing XML files.
2898 (with-directory-excursion "../build_resources/ant/"
2899 (chmod "build-common.xml" #o664)
2900 (call-with-output-file "build-common.xml.new"
2904 (with-input-from-file "build-common.xml"
2905 (lambda _ (xml->sxml #:trim-whitespace? #t)))
2906 `(;; Remove dependency on classycle and custom ant tasks
2907 (taskdef . ,(lambda (tag . kids)
2908 (let ((name ((sxpath '(name *text*)) kids)))
2909 (if (or (member "build-info" name)
2910 (member "dependency-checker" name)
2911 (member "build-java-subprojects" name)
2912 (member "project-classpath" name))
2915 (typedef . ,(lambda (tag . kids)
2916 (let ((name ((sxpath '(name *text*)) kids)))
2917 (if (member "recursive-jar" name)
2920 (build-java-subprojects . ,(lambda _ '()))
2921 ;; Ignore everything else
2922 (*default* . ,(lambda (tag . kids) `(,tag ,@kids)))
2923 (*text* . ,(lambda (_ txt) txt))))
2925 (rename-file "build-common.xml.new" "build-common.xml"))
2926 (substitute* "build/build.xml"
2927 (("\\$\\{lib\\}/cisd-base/cisd-base.jar")
2928 (string-append (assoc-ref inputs "java-cisd-base")
2929 "/share/java/sis-base.jar"))
2930 ;; Remove dependency on svn
2931 (("<build-info.*") "")
2932 (("\\$\\{revision.number\\}")
2933 ,(number->string revision))
2934 (("\\$\\{version.number\\}") ,base-version)
2935 ;; Don't use custom ant tasks.
2936 (("recursive-jar") "jar")
2937 (("<project-classpath.*") ""))
2939 (replace 'install (install-jars "targets/dist")))))
2941 `(("java-cisd-base" ,java-cisd-base)))
2943 `(("ecj" ,java-ecj-3.5)
2948 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2949 "args4j/tags/release/"
2950 (version-major+minor base-version)
2952 "/build_resources/"))
2953 (revision revision)))
2956 "056cam4k8pll7ass31sy6gwn8g8719njc41yf4l02b0342nilkyf"))
2957 (modules '((guix build utils)))
2958 ;; Delete bundled pre-built jars.
2960 '(begin (delete-file-recursively "lib/") #t))))))
2961 (home-page "http://svnsis.ethz.ch")
2962 (synopsis "Command line parser library")
2963 (description "This package provides a parser for command line arguments.")
2964 (license license:asl2.0))))
2966 (define-public java-cisd-jhdf5
2967 (let ((revision 39162)
2968 (base-version "14.12.6"))
2970 (name "java-cisd-jhdf5")
2971 (version (string-append base-version "-" (number->string revision)))
2975 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2976 "jhdf5/tags/release/"
2977 (version-major+minor base-version)
2978 ".x/" base-version "/jhdf5/"))
2979 (revision revision)))
2980 (file-name (string-append "java-cisd-jhdf5-" version "-checkout"))
2983 "13i17s2hn0q9drdqvp8csy7770p3hdbh9rp30ihln2ldkfawdmz0"))
2984 (modules '((guix build utils)))
2987 ;; Delete included gradle jar
2988 (delete-file-recursively "gradle/wrapper")
2989 ;; Delete pre-built native libraries
2990 (delete-file-recursively "libs")
2992 (build-system ant-build-system)
2994 `(#:make-flags '("-file" "build/build.xml")
2995 #:build-target "jar-all"
2996 #:test-target "jar-test"
2999 (modify-phases %standard-phases
3000 ;; FIXME: this build phase fails.
3001 (delete 'generate-jar-indices)
3002 ;; Don't erase results from the build phase when building tests.
3003 (add-after 'unpack 'separate-test-target-from-clean
3005 (substitute* "build/build.xml"
3006 (("\"jar-test\" depends=\"clean, ")
3007 "\"jar-test\" depends=\""))
3009 (add-after 'unpack 'unpack-build-resources
3010 (lambda* (#:key inputs #:allow-other-keys)
3011 (copy-recursively (assoc-ref inputs "build-resources")
3012 "../build_resources")
3013 (delete-file-recursively "../build_resources/lib/")
3014 (mkdir-p "../build_resources/lib")
3015 ;; Remove dependency on classycle
3016 (substitute* "../build_resources/ant/build-common.xml"
3017 (("<taskdef name=\"dependency-checker.*") "")
3018 (("classname=\"classycle.*") "")
3019 (("classpath=\"\\$\\{lib\\}/classycle.*") ""))
3020 ;; Remove dependency on svn
3021 (substitute* "build/build.xml"
3022 (("<build-info.*") "")
3023 (("\\$\\{revision.number\\}")
3024 ,(number->string revision))
3025 (("\\$\\{version.number\\}") ,base-version))
3027 (add-after 'unpack-build-resources 'fix-dependencies
3028 (lambda* (#:key inputs #:allow-other-keys)
3029 (substitute* "../build_resources/ant/build-common.xml"
3030 (("../libraries/testng/testng-jdk15.jar")
3031 (string-append (assoc-ref inputs "java-testng")
3032 "/share/java/java-testng.jar")))
3033 (substitute* "build/build.xml"
3034 (("\\$\\{lib\\}/sis-base/sis-base.jar")
3035 (string-append (assoc-ref inputs "java-cisd-base")
3036 "/share/java/sis-base.jar"))
3037 (("\\$\\{lib\\}/cisd-args4j/cisd-args4j.jar")
3038 (string-append (assoc-ref inputs "java-cisd-args4j")
3039 "/share/java/cisd-args4j.jar"))
3040 (("\\$\\{lib\\}/commons-lang/commons-lang.jar")
3041 (string-append (assoc-ref inputs "java-commons-lang")
3042 "/share/java/commons-lang-"
3043 ,(package-version java-commons-lang) ".jar"))
3044 (("\\$\\{lib\\}/commons-io/commons-io.jar")
3045 (string-append (assoc-ref inputs "java-commons-io")
3046 "/share/java/commons-io-"
3047 ,(package-version java-commons-io)
3049 (("\\$\\{lib\\}/testng/testng-jdk15.jar")
3050 (string-append (assoc-ref inputs "java-testng")
3051 "/share/java/java-testng.jar"))
3052 (("\\$\\{lib\\}/junit4/junit.jar")
3053 (string-append (assoc-ref inputs "java-junit")
3054 "/share/java/junit.jar"))
3055 (("\\$\\{lib\\}/jmock/hamcrest/hamcrest-core.jar")
3056 (string-append (assoc-ref inputs "java-hamcrest-core")
3057 "/share/java/hamcrest-core.jar")))
3058 ;; Remove dependency on ch.rinn.restrictions
3059 (with-directory-excursion "source/java/ch/systemsx/cisd/hdf5/"
3060 (substitute* '("BitSetConversionUtils.java"
3062 (("import ch.rinn.restrictions.Private;") "")
3064 (with-directory-excursion "sourceTest/java/ch/systemsx/cisd/hdf5/"
3065 (substitute* '("BitSetConversionTest.java"
3066 "h5ar/HDF5ArchiverTest.java")
3067 (("import ch.rinn.restrictions.Friend;") "")
3069 ;; Remove leftovers from removing @Friend
3070 (substitute* "h5ar/HDF5ArchiverTest.java"
3071 (("\\{ HDF5Archiver.class, IdCache.class, LinkRecord.class \\}\\)")
3074 (add-before 'configure 'build-native-library
3075 (lambda* (#:key inputs #:allow-other-keys)
3076 (let ((jdk (assoc-ref inputs "jdk"))
3077 (hdf5 (assoc-ref inputs "hdf5"))
3078 (dir ,(match (%current-system)
3081 ((or "armhf-linux" "aarch64-linux")
3083 ((or "x86_64-linux")
3085 (_ "unknown-Linux"))))
3086 (with-directory-excursion "source/c"
3087 (apply invoke `("gcc" "-shared" "-O3"
3089 "-Wl,--exclude-libs,ALL"
3090 ,@(find-files "jhdf5" "\\.c$")
3091 ,@(find-files "hdf-java" "\\.c$")
3092 ,(string-append "-I" hdf5 "/include")
3093 ,(string-append "-I" jdk "/include")
3094 ,(string-append "-I" jdk "/include/linux")
3095 ,(string-append hdf5 "/lib/libhdf5.a")
3096 "-o" "libjhdf5.so" "-lz")))
3097 (install-file "source/c/libjhdf5.so"
3098 (string-append "libs/native/jhdf5/" dir))
3100 ;; In the "check" phase we only build the test executable.
3101 (add-after 'check 'run-tests
3103 (invoke "java" "-jar" "targets/dist/sis-jhdf5-test.jar")
3104 (delete-file "targets/dist/sis-jhdf5-test.jar")
3107 (install-jars "targets/dist")))))
3109 `(("java-cisd-base" ,java-cisd-base)
3110 ("java-cisd-args4j" ,java-cisd-args4j)
3111 ("java-commons-lang" ,java-commons-lang)
3112 ("java-commons-io" ,java-commons-io)
3116 `(("jdk" ,icedtea-8)
3117 ("java-testng" ,java-testng)
3118 ("java-junit" ,java-junit)
3119 ("java-jmock" ,java-jmock)
3120 ("java-hamcrest-core" ,java-hamcrest-core)
3125 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
3126 "jhdf5/tags/release/"
3127 (version-major+minor base-version)
3129 "/build_resources/"))
3130 (revision revision)))
3133 "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk"))))))
3134 (home-page "https://wiki-bsse.ethz.ch/display/JHDF5/")
3135 (synopsis "Java binding for HDF5")
3136 (description "JHDF5 is a high-level API in Java for reading and writing
3137 HDF5 files, building on the libraries provided by the HDF Group.")
3138 ;; The C sources are under a non-copyleft license, which looks like a
3139 ;; variant of the BSD licenses. The whole package is under the ASL2.0.
3140 (license (list license:asl2.0
3141 (license:non-copyleft "file://source/c/COPYING"))))))
3143 (define-public java-classpathx-servletapi
3145 (name "java-classpathx-servletapi")
3149 (uri (string-append "mirror://gnu/classpathx/servletapi/"
3150 "servletapi-" version ".tar.gz"))
3153 "07d8h051siga2f33fra72hk12sbq1bxa4jifjg0qj0vfazjjff0x"))))
3154 (build-system ant-build-system)
3156 `(#:tests? #f ; there is no test target
3157 #:build-target "compile"
3159 (list "-Dbuild.compiler=javac1.8"
3160 (string-append "-Ddist=" (assoc-ref %outputs "out")))
3162 (modify-phases %standard-phases
3164 (lambda* (#:key make-flags #:allow-other-keys)
3165 (apply invoke `("ant" "dist" ,@make-flags)))))))
3166 (home-page "https://www.gnu.org/software/classpathx/")
3167 (synopsis "Java servlet API implementation")
3168 (description "This is the GNU servlet API distribution, part of the
3169 ClasspathX project. It provides implementations of version 3.0 of the servlet
3170 API and version 2.1 of the Java ServerPages API.")
3171 (license license:gpl3+)))
3173 (define-public java-javaee-servletapi
3175 (name "java-javaee-servletapi")
3180 (url "https://github.com/javaee/servlet-spec.git")
3182 (file-name (git-file-name name version))
3185 "0s03lj8w5an70lkqbjycgfrfk0kc07vbfav91jzk87gh3awf9ksl"))))
3186 (build-system ant-build-system)
3188 `(#:jar-name "javax-servletapi.jar"
3191 #:source-dir "src/main/java"
3193 (modify-phases %standard-phases
3194 (add-before 'build 'copy-resources
3196 (mkdir-p "build/classes/javax/servlet/http")
3197 (let ((from-prefix "src/main/java/javax/servlet/")
3198 (to-prefix "build/classes/javax/servlet/"))
3199 (for-each (lambda (f)
3200 (copy-file (string-append from-prefix f)
3201 (string-append to-prefix f)))
3202 (list "LocalStrings_ja.properties"
3203 "LocalStrings.properties"
3204 "LocalStrings_fr.properties"
3205 "http/LocalStrings_es.properties"
3206 "http/LocalStrings_ja.properties"
3207 "http/LocalStrings.properties"
3208 "http/LocalStrings_fr.properties")))
3211 `(("unzip" ,unzip)))
3212 (home-page "https://javaee.github.io/servlet-spec/")
3213 (synopsis "Java servlet API")
3214 (description "Java Servlet is the foundation web specification in the
3215 Java Enterprise Platform. Developers can build web applications using the
3216 Servlet API to interact with the request/response workflow. This project
3217 provides information on the continued development of the Java Servlet
3219 ;; Main code is dual-licensed by Oracle under either GLP2 or CDDL 1.1.
3220 ;; Some files are licensed under ASL 2.0.
3221 (license (list license:asl2.0 license:gpl2 license:cddl1.1))))
3223 (define-public java-swt
3228 ;; The types of many variables and procedures differ in the sources
3229 ;; dependent on whether the target architecture is a 32-bit system or a
3230 ;; 64-bit system. Instead of patching the sources on demand in a build
3231 ;; phase we download either the 32-bit archive (which mostly uses "int"
3232 ;; types) or the 64-bit archive (which mostly uses "long" types).
3233 (let ((hash32 "09q0cbh90d90q3a7dx9430kc4m6bijrkr4lajrmzzvi0jjdpq4v9")
3234 (hash64 "17k5hs75a87ssmc5xhwdfdm2gn4zba0r837l2455za01krnkaa2q")
3237 (let-values (((hash file)
3238 (match (or (%current-target-system) (%current-system))
3239 ("x86_64-linux" (values hash64 file64))
3240 (_ (values hash32 file32)))))
3244 "http://download.eclipse.org/eclipse/downloads/drops4/"
3245 "R-" version "-201710090410/swt-" version
3246 "-gtk-linux-" file ".zip"))
3247 (sha256 (base32 hash))))))
3248 (build-system ant-build-system)
3250 `(#:jar-name "swt.jar"
3252 #:tests? #f ; no "check" target
3254 (modify-phases %standard-phases
3256 (lambda* (#:key source #:allow-other-keys)
3258 (invoke "unzip" source "-d" "swt")
3261 (invoke "unzip" "src.zip" "-d" "src")))
3262 ;; The classpath contains invalid icecat jars. Since we don't need
3263 ;; anything other than the JDK on the classpath, we can simply unset
3265 (add-after 'configure 'unset-classpath
3266 (lambda _ (unsetenv "CLASSPATH") #t))
3267 (add-before 'build 'build-native
3268 (lambda* (#:key inputs outputs #:allow-other-keys)
3269 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
3270 ;; Build shared libraries. Users of SWT have to set the system
3271 ;; property swt.library.path to the "lib" directory of this
3274 (setenv "OUTPUT_DIR" lib)
3275 (with-directory-excursion "src"
3276 (invoke "bash" "build.sh")))))
3277 (add-after 'install 'install-native
3278 (lambda* (#:key outputs #:allow-other-keys)
3279 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
3280 (for-each (lambda (file)
3281 (install-file file lib))
3282 (find-files "." "\\.so$"))
3286 ("libxtst" ,libxtst)
3291 `(("pkg-config" ,pkg-config)
3293 (home-page "https://www.eclipse.org/swt/")
3294 (synopsis "Widget toolkit for Java")
3296 "SWT is a widget toolkit for Java designed to provide efficient, portable
3297 access to the user-interface facilities of the operating systems on which it
3299 ;; SWT code is licensed under EPL1.0
3300 ;; Gnome and Gtk+ bindings contain code licensed under LGPLv2.1
3301 ;; Cairo bindings contain code under MPL1.1
3302 ;; XULRunner 1.9 bindings contain code under MPL2.0
3307 license:lgpl2.1+))))
3309 (define-public java-xz
3315 (uri (string-append "http://tukaani.org/xz/xz-java-" version ".zip"))
3318 "1z3p1ri1gvl07inxn0agx44ck8n7wrzfmvkz8nbq3njn8r9wba8x"))))
3319 (build-system ant-build-system)
3321 `(#:tests? #f ; There are no tests to run.
3322 #:jar-name ,(string-append "xz-" version ".jar")
3324 (modify-phases %standard-phases
3325 ;; The unpack phase enters the "maven" directory by accident.
3326 (add-after 'unpack 'chdir
3327 (lambda _ (chdir "..") #t)))))
3329 `(("unzip" ,unzip)))
3330 (home-page "https://tukaani.org/xz/java.html")
3331 (synopsis "Implementation of XZ data compression in pure Java")
3332 (description "This library aims to be a complete implementation of XZ data
3333 compression in pure Java. Single-threaded streamed compression and
3334 decompression and random access decompression have been fully implemented.")
3335 (license license:public-domain)))
3337 ;; java-hamcrest-core uses qdox version 1.12. We package this version instead
3338 ;; of the latest release.
3339 (define-public java-qdox-1.12
3345 (uri (string-append "https://repo1.maven.org/maven2/"
3346 "com/thoughtworks/qdox/qdox/" version
3347 "/qdox-" version "-sources.jar"))
3350 "0hlfbqq2avf5s26wxkksqmkdyk6zp9ggqn37c468m96mjv0n9xfl"))))
3351 (build-system ant-build-system)
3353 `(;; Tests require junit
3355 #:jar-name "qdox.jar"
3357 (modify-phases %standard-phases
3359 (lambda* (#:key source #:allow-other-keys)
3361 (with-directory-excursion "src"
3362 (invoke "jar" "-xf" source))))
3363 ;; At this point we don't have junit, so we must remove the API
3365 (add-after 'unpack 'delete-tests
3367 (delete-file-recursively "src/com/thoughtworks/qdox/junit")
3369 (home-page "https://github.com/codehaus/qdox")
3370 (synopsis "Parse definitions from Java source files")
3372 "QDox is a high speed, small footprint parser for extracting
3373 class/interface/method definitions from source files complete with JavaDoc
3374 @code{@@tags}. It is designed to be used by active code generators or
3375 documentation tools.")
3376 (license license:asl2.0)))
3378 (define-public java-qdox
3381 ; Newer version exists, but this version is required by java-plexus-component-metadata
3385 ;; 2.0-M4, -M5 at https://github.com/paul-hammant/qdox
3386 ;; Older releases at https://github.com/codehaus/qdox/
3387 ;; Note: The release at maven is pre-generated. The release at
3388 ;; github requires jflex.
3389 (uri (string-append "https://repo1.maven.org/maven2/"
3390 "com/thoughtworks/qdox/qdox/" version
3391 "/qdox-" version "-sources.jar"))
3394 "10xxrcaicq6axszcr2jpygisa4ch4sinyx5q7kqqxv4lknrmxp5x"))))
3395 (build-system ant-build-system)
3397 `(#:jar-name "qdox.jar"
3398 #:tests? #f)); no tests
3399 (home-page "https://github.com/codehaus/qdox")
3400 (synopsis "Parse definitions from Java source files")
3401 (description "QDox is a high speed, small footprint parser for extracting
3402 class/interface/method definitions from source files complete with JavaDoc
3403 @code{@@tags}. It is designed to be used by active code generators or
3404 documentation tools.")
3405 (license license:asl2.0)))
3407 (define-public java-jarjar
3409 (name "java-jarjar")
3414 "https://storage.googleapis.com/google-code-archive-downloads/v2/"
3415 "code.google.com/jarjar/jarjar-src-" version ".zip"))
3418 "1v8irhni9cndcw1l1wxqgry013s2kpj0qqn57lj2ji28xjq8ndjl"))
3419 (modules '((guix build utils)))
3422 ;; Delete bundled thirds-party jar archives.
3423 ;; TODO: unbundle maven-plugin-api.
3424 (delete-file "lib/asm-4.0.jar")
3425 (delete-file "lib/asm-commons-4.0.jar")
3426 (delete-file "lib/junit-4.8.1.jar")
3428 (build-system ant-build-system)
3430 `(;; Tests require junit, which ultimately depends on this package.
3432 #:build-target "jar"
3434 (modify-phases %standard-phases
3435 (add-before 'build 'do-not-use-bundled-asm
3436 (lambda* (#:key inputs #:allow-other-keys)
3437 (substitute* "build.xml"
3438 (("<path id=\"path.build\">")
3439 (string-append "<path id=\"path.build\"><fileset dir=\""
3440 (assoc-ref inputs "java-asm-bootstrap")
3441 "/share/java\" includes=\"**/*.jar\"/>"))
3442 (("<zipfileset src=\"lib/asm-4.0.jar\"/>") "")
3443 (("lib/asm-commons-4.0.jar")
3444 (string-append (assoc-ref inputs "java-asm-bootstrap")
3445 "/share/java/asm-6.0.jar"))
3446 (("<include name=\"org/objectweb/asm/commons/Remap\\*\\.class\"/>")
3447 (string-append "<include name=\"org/objectweb/asm/"
3448 "commons/Remap*.class\"/>"
3449 "<include name=\"org/objectweb/asm/*.class\"/>"
3450 "<include name=\"org/objectweb/asm/"
3451 "signature/*.class\"/>"
3452 "<include name=\"org/objectweb/asm/"
3453 "commons/SignatureRemapper.class\"/>")))
3456 (lambda* (#:key outputs #:allow-other-keys)
3457 (let ((target (string-append (assoc-ref outputs "out")
3459 (install-file (string-append "dist/jarjar-" ,version ".jar")
3463 `(("java-asm-bootstrap" ,java-asm-bootstrap)))
3465 `(("unzip" ,unzip)))
3466 (home-page "https://code.google.com/archive/p/jarjar/")
3467 (synopsis "Repackage Java libraries")
3469 "Jar Jar Links is a utility that makes it easy to repackage Java
3470 libraries and embed them into your own distribution. Jar Jar Links includes
3471 an Ant task that extends the built-in @code{jar} task.")
3472 (license license:asl2.0)))
3474 (define-public java-hamcrest-core
3476 (name "java-hamcrest-core")
3481 (url "https://github.com/hamcrest/JavaHamcrest/")
3482 (commit (string-append "hamcrest-java-" version))))
3483 (file-name (git-file-name name version))
3486 "16fxxkrd31ahqvcaby30jgh3z1i0zxh51m24hxgz0z2agxj6bc63"))
3487 (modules '((guix build utils)))
3490 ;; Delete bundled thirds-party jar archives.
3491 (delete-file-recursively "lib")
3493 (build-system ant-build-system)
3495 `(#:tests? #f ; Tests require junit
3496 #:modules ((guix build ant-build-system)
3499 #:make-flags (list (string-append "-Dversion=" ,version))
3500 #:test-target "unit-test"
3501 #:build-target "core"
3503 (modify-phases %standard-phases
3504 ;; Disable unit tests, because they require junit, which requires
3505 ;; hamcrest-core. We also give a fixed value to the "Built-Date"
3506 ;; attribute from the manifest for reproducibility.
3507 (add-before 'configure 'patch-build.xml
3509 (substitute* "build.xml"
3510 (("unit-test, ") "")
3511 (("\\$\\{build.timestamp\\}") "guix"))
3513 ;; Java's "getMethods()" returns methods in an unpredictable order.
3514 ;; To make the output of the generated code deterministic we must
3515 ;; sort the array of methods.
3516 (add-after 'unpack 'make-method-order-deterministic
3518 (substitute* "hamcrest-generator/src/main/java/org/hamcrest/generator/ReflectiveFactoryReader.java"
3519 (("import java\\.util\\.Iterator;" line)
3520 (string-append line "\n"
3521 "import java.util.Arrays; import java.util.Comparator;"))
3522 (("allMethods = cls\\.getMethods\\(\\);" line)
3523 (string-append "_" line
3525 private Method[] getSortedMethods() {
3526 Arrays.sort(_allMethods, new Comparator<Method>() {
3528 public int compare(Method a, Method b) {
3529 return a.toString().compareTo(b.toString());
3535 private Method[] allMethods = getSortedMethods();")))
3537 (add-before 'build 'do-not-use-bundled-qdox
3538 (lambda* (#:key inputs #:allow-other-keys)
3539 (substitute* "build.xml"
3540 (("lib/generator/qdox-1.12.jar")
3541 (string-append (assoc-ref inputs "java-qdox-1.12")
3542 "/share/java/qdox.jar")))
3544 ;; build.xml searches for .jar files in this directoy, which
3545 ;; we remove from the source archive.
3546 (add-before 'build 'create-dummy-directories
3548 (mkdir-p "lib/integration")
3551 (lambda* (#:key outputs #:allow-other-keys)
3552 (let* ((target (string-append (assoc-ref outputs "out")
3554 (version-suffix ,(string-append "-" version ".jar"))
3555 (install-without-version-suffix
3558 (string-append target
3559 (basename jar version-suffix)
3563 install-without-version-suffix
3566 (and (string-suffix? ".jar" name)
3567 (not (string-suffix? "-sources.jar" name)))))))
3570 `(("java-qdox-1.12" ,java-qdox-1.12)
3571 ("java-jarjar" ,java-jarjar)))
3572 (home-page "http://hamcrest.org/")
3573 (synopsis "Library of matchers for building test expressions")
3575 "This package provides a library of matcher objects (also known as
3576 constraints or predicates) allowing @code{match} rules to be defined
3577 declaratively, to be used in other frameworks. Typical scenarios include
3578 testing frameworks, mocking libraries and UI validation rules.")
3579 (license license:bsd-2)))
3581 (define-public java-junit
3588 (url "https://github.com/junit-team/junit/")
3589 (commit (string-append "r" version))))
3590 (file-name (git-file-name name version))
3593 "1j8avi91px1z8rjc89cfikwrvfifdmmsarwiyrcnr59ynvpz0v8h"))
3594 (modules '((guix build utils)))
3597 ;; Delete bundled jar archives.
3598 (delete-file-recursively "lib")
3600 (build-system ant-build-system)
3602 `(#:tests? #f ; no tests
3603 #:jar-name "junit.jar"))
3605 `(("java-hamcrest-core" ,java-hamcrest-core)))
3606 (home-page "https://junit.org/junit4/")
3607 (synopsis "Test framework for Java")
3609 "JUnit is a simple framework to write repeatable tests for Java projects.
3610 JUnit provides assertions for testing expected results, test fixtures for
3611 sharing common test data, and test runners for running tests.")
3612 (license license:epl1.0)))
3614 (define-public java-plexus-utils
3616 (name "java-plexus-utils")
3621 (url "https://github.com/codehaus-plexus/plexus-utils")
3622 (commit (string-append "plexus-utils-" version))))
3623 (file-name (git-file-name name version))
3626 "1mlx7xrq7lgqjqcpg7y4hi1ghavf28vvk3har82037dqx61n0f15"))))
3627 (build-system ant-build-system)
3628 ;; FIXME: The default build.xml does not include a target to install
3631 `(#:jar-name "plexus-utils.jar"
3632 #:source-dir "src/main"
3634 (modify-phases %standard-phases
3635 (add-after 'unpack 'fix-reference-to-/bin-and-/usr
3637 (substitute* "src/main/java/org/codehaus/plexus/util/\
3638 cli/shell/BourneShell.java"
3639 (("/bin/sh") (which "sh"))
3640 (("/usr/") (getcwd)))
3642 (add-after 'unpack 'fix-or-disable-broken-tests
3644 (with-directory-excursion "src/test/java/org/codehaus/plexus/util"
3645 (substitute* '("cli/CommandlineTest.java"
3646 "cli/shell/BourneShellTest.java")
3647 (("/bin/sh") (which "sh"))
3648 (("/bin/echo") (which "echo")))
3650 ;; This test depends on MavenProjectStub, but we don't have
3651 ;; a package for Maven.
3652 (delete-file "introspection/ReflectionValueExtractorTest.java")
3654 ;; FIXME: The command line tests fail, maybe because they use
3656 (delete-file "cli/CommandlineTest.java"))
3659 `(("java-hamcrest-core" ,java-hamcrest-core)
3660 ("java-junit" ,java-junit)))
3661 (home-page "https://codehaus-plexus.github.io/plexus-utils/")
3662 (synopsis "Common utilities for the Plexus framework")
3663 (description "This package provides various Java utility classes for the
3664 Plexus framework to ease working with strings, files, command lines, XML and
3666 (license license:asl2.0)))
3668 (define-public java-plexus-interpolation
3670 (name "java-plexus-interpolation")
3675 (url "https://github.com/codehaus-plexus/plexus-interpolation")
3676 (commit (string-append "plexus-interpolation-" version))))
3677 (file-name (git-file-name name version))
3680 "005hxxg1adv71a96lz4vp65bk3v1pi76j4c45z29xzizclib16vl"))))
3681 (build-system ant-build-system)
3683 `(#:jar-name "plexus-interpolation.jar"
3684 #:source-dir "src/main"))
3686 `(("java-junit" ,java-junit)
3687 ("java-hamcrest-core" ,java-hamcrest-core)))
3688 (home-page "https://codehaus-plexus.github.io/plexus-interpolation/")
3689 (synopsis "Java components for interpolating ${} strings and the like")
3690 (description "Plexus interpolator is a modular, flexible interpolation
3691 framework for the expression language style commonly seen in Maven, Plexus,
3692 and other related projects.
3694 It has its foundation in the @code{org.codehaus.plexus.utils.interpolation}
3695 package within @code{plexus-utils}, but has been separated in order to allow
3696 these two libraries to vary independently of one another.")
3697 (license license:asl2.0)))
3699 (define-public java-plexus-classworlds
3701 (name "java-plexus-classworlds")
3706 (url "https://github.com/codehaus-plexus/plexus-classworlds")
3707 (commit (string-append "plexus-classworlds-" version))))
3708 (file-name (git-file-name name version))
3711 "1iv8x55fbni2hg4l7pdpbwfq75xmvq1f25g6nxma8rcdpihsh13r"))))
3712 (build-system ant-build-system)
3714 `(#:jar-name "plexus-classworlds.jar"
3715 #:source-dir "src/main"
3716 #:tests? #f));; FIXME: we need to generate some resources as in pom.xml
3718 `(("java-junit" ,java-junit)))
3719 (home-page "https://codehaus-plexus.github.io/plexus-classworlds/")
3720 (synopsis "Java class loader framework")
3721 (description "Plexus classworlds replaces the native @code{ClassLoader}
3722 mechanism of Java. It is especially useful for dynamic loading of application
3724 (license license:asl2.0)))
3726 (define java-plexus-container-default-bootstrap
3728 (name "java-plexus-container-default-bootstrap")
3733 (url "https://github.com/codehaus-plexus/plexus-containers")
3734 (commit (string-append "plexus-containers-" version))))
3735 (file-name (git-file-name name version))
3738 "1316hrp5vqfv0aw7miq2fp0wwy833h66h502h29vnh5sxj27x228"))))
3739 (build-system ant-build-system)
3741 `(#:jar-name "container-default.jar"
3742 #:source-dir "plexus-container-default/src/main/java"
3743 #:test-dir "plexus-container-default/src/test"
3745 #:tests? #f; requires plexus-archiver, which depends on this package
3747 (modify-phases %standard-phases
3748 (add-before 'build 'copy-resources
3751 "plexus-container-default/src/main/resources/"
3755 `(("worldclass" ,java-plexus-classworlds)
3756 ("xbean" ,java-geronimo-xbean-reflect)
3757 ("utils" ,java-plexus-utils)
3758 ("junit" ,java-junit)
3759 ("guava" ,java-guava)))
3760 (home-page "https://github.com/codehaus-plexus/plexus-containers")
3761 (synopsis "Inversion-of-control container")
3762 (description "Plexus-default-container is Plexus' inversion-of-control
3763 (@dfn{IoC}) container. It is composed of its public API and its default
3765 (license license:asl2.0)))
3767 (define-public java-plexus-io
3769 (name "java-plexus-io")
3774 (url "https://github.com/codehaus-plexus/plexus-io")
3775 (commit (string-append "plexus-io-" version))))
3776 (file-name (git-file-name name version))
3779 "1h4q9l2j9sfbscvxpnyy2hazi0r83h3am86y4r959wrl1b24xxwd"))))
3780 (build-system ant-build-system)
3782 `(#:jar-name "plexus-io.jar"
3783 #:source-dir "src/main/java"
3784 #:test-dir "src/test"
3787 (modify-phases %standard-phases
3788 (add-before 'build 'copy-resources
3790 (mkdir-p "build/classes/META-INF/plexus")
3791 (copy-file "src/main/resources/META-INF/plexus/components.xml"
3792 "build/classes/META-INF/plexus/components.xml")
3795 `(("utils" ,java-plexus-utils)
3796 ("commons-io" ,java-commons-io)
3797 ("java-jsr305" ,java-jsr305)))
3799 `(("junit" ,java-junit)
3800 ("hamcrest" ,java-hamcrest-core)
3801 ("guava" ,java-guava)
3802 ("classworlds" ,java-plexus-classworlds)
3803 ("xbean" ,java-geronimo-xbean-reflect)
3804 ("container-default" ,java-plexus-container-default-bootstrap)))
3805 (home-page "https://github.com/codehaus-plexus/plexus-io")
3806 (synopsis "I/O plexus components")
3807 (description "Plexus IO is a set of plexus components, which are designed
3808 for use in I/O operations. This implementation using plexus components allows
3809 reusing it in maven.")
3810 (license license:asl2.0)))
3812 (define-public java-plexus-archiver
3814 (name "java-plexus-archiver")
3818 (uri (string-append "https://github.com/codehaus-plexus/plexus-archiver"
3819 "/archive/plexus-archiver-" version ".tar.gz"))
3822 "0ry6i92gli0mvdmfih2vgs0lkf9yvx18h2ajxim66yg6yipnp0hg"))))
3823 (build-system ant-build-system)
3825 `(#:jar-name "plexus-archiver.jar"
3826 #:source-dir "src/main/java"
3828 #:test-dir "src/test"
3829 #:test-exclude (list "**/Abstract*.java" "**/Base*.java")
3831 (modify-phases %standard-phases
3832 (add-before 'check 'remove-failing
3834 ;; Requires an older version of plexus container
3836 "src/test/java/org/codehaus/plexus/archiver/DuplicateFilesTest.java")
3838 (add-before 'check 'fix-test-building
3840 (substitute* "build.xml"
3841 (("srcdir=\"src/test\"") "srcdir=\"src/test/java\""))
3843 (add-before 'build 'copy-resources
3845 (mkdir-p "build/classes/META-INF/plexus")
3846 (copy-file "src/main/resources/META-INF/plexus/components.xml"
3847 "build/classes/META-INF/plexus/components.xml")
3850 `(("utils" ,java-plexus-utils)
3851 ("commons-io" ,java-commons-io)
3852 ("snappy" ,java-iq80-snappy)
3853 ("io" ,java-plexus-io)
3854 ("compress" ,java-commons-compress)
3855 ("container-default" ,java-plexus-container-default-bootstrap)
3856 ("snappy" ,java-snappy)
3857 ("java-jsr305" ,java-jsr305)))
3859 `(("java-hamcrest-core" ,java-hamcrest-core)
3860 ("junit" ,java-junit)
3861 ("classworld" ,java-plexus-classworlds)
3862 ("xbean" ,java-geronimo-xbean-reflect)
3863 ("xz" ,java-tukaani-xz)
3864 ("guava" ,java-guava)))
3865 (home-page "https://github.com/codehaus-plexus/plexus-archiver")
3866 (synopsis "Archiver component of the Plexus project")
3867 (description "Plexus-archiver contains a component to deal with project
3869 (license license:asl2.0)))
3871 (define-public java-plexus-container-default
3873 (inherit java-plexus-container-default-bootstrap)
3874 (name "java-plexus-container-default")
3876 `(#:jar-name "container-default.jar"
3877 #:source-dir "plexus-container-default/src/main/java"
3878 #:test-dir "plexus-container-default/src/test"
3879 #:test-exclude (list ;"**/*Test.java"
3881 ;; Requires plexus-hierarchy
3882 "**/PlexusHierarchyTest.java"
3884 "**/ComponentRealmCompositionTest.java"
3885 "**/PlexusContainerTest.java")
3888 (modify-phases %standard-phases
3889 (add-before 'build 'copy-resources
3892 "plexus-container-default/src/main/resources/"
3895 (add-before 'check 'fix-paths
3897 (let ((dir "plexus-container-default/src/test/java/org/codehaus"))
3900 dir "/plexus/component/composition/"
3901 "ComponentRealmCompositionTest.java")
3902 (("src/test") "plexus-container-default/src/test"))
3905 `(("worldclass" ,java-plexus-classworlds)
3906 ("xbean" ,java-geronimo-xbean-reflect)
3907 ("utils" ,java-plexus-utils)
3908 ("junit" ,java-junit)
3909 ("guava" ,java-guava)))
3911 `(("archiver" ,java-plexus-archiver)
3912 ("hamcrest" ,java-hamcrest-core)))))
3914 (define-public java-plexus-component-annotations
3916 (inherit java-plexus-container-default)
3917 (name "java-plexus-component-annotations")
3919 `(#:jar-name "plexus-component-annotations.jar"
3920 #:source-dir "plexus-component-annotations/src/main/java"
3921 #:tests? #f)); no tests
3924 (synopsis "Plexus descriptors generator")
3925 (description "This package is a Maven plugin to generate Plexus descriptors
3926 from source tags and class annotations.")))
3928 (define-public java-plexus-cipher
3930 (name "java-plexus-cipher")
3935 (url "https://github.com/codehaus-plexus/plexus-cipher")
3936 (commit (string-append "plexus-cipher-" version))))
3937 (file-name (git-file-name name version))
3940 "0m638nzlxbmnbcj5cwdpgs326ab584yv0k803zlx37r6iqwvf6b0"))))
3941 (build-system ant-build-system)
3943 `(#:jar-name "plexus-cipher.jar"
3944 #:source-dir "src/main/java"
3946 #:tests? #f; FIXME: requires sisu-inject-bean
3948 (modify-phases %standard-phases
3949 (add-before 'build 'copy-resources
3951 (copy-recursively "src/main/resources" "build/classes")
3952 (mkdir-p "build/classes/META-INF/sisu")
3953 (with-output-to-file "build/classes/META-INF/sisu/javax.inject.Named"
3955 (display "org.sonatype.plexus.components.cipher.DefaultPlexusCipher\n")))
3958 `(("java-cdi-api" ,java-cdi-api)
3959 ("java-javax-inject" ,java-javax-inject)))
3960 (home-page "https://github.com/sonatype/plexus-cipher")
3961 (synopsis "Encryption/decryption Component")
3962 (description "Plexus-cipher contains a component to deal with encryption
3964 (license license:asl2.0)))
3966 (define-public java-plexus-compiler-api
3968 (name "java-plexus-compiler-api")
3973 (url "https://github.com/codehaus-plexus/plexus-compiler")
3974 (commit (string-append "plexus-compiler-" version))))
3975 (file-name (git-file-name name version))
3978 "1nq1gnn3s6z1j29gmi1hqbklsmm8b1lmnafb0191914f95mn18gk"))))
3979 (build-system ant-build-system)
3981 `(#:jar-name "plexus-compiler-api.jar"
3982 #:source-dir "plexus-compiler-api/src/main/java"
3984 #:test-dir "plexus-compiler-api/src/test"))
3986 `(("java-plexus-container-default" ,java-plexus-container-default)
3987 ("java-plexus-util" ,java-plexus-utils)))
3989 `(("java-junit" ,java-junit)))
3990 (home-page "https://github.com/codehaus-plexus/plexus-compiler")
3991 (synopsis "Plexus Compilers component's API to manipulate compilers")
3992 (description "This package contains the API used by components to manipulate
3994 (license (list license:asl2.0
3997 (define-public java-plexus-compiler-javac
3999 (inherit java-plexus-compiler-api)
4000 (name "java-plexus-compiler-javac")
4002 `(#:jar-name "plexus-compiler-javac.jar"
4003 #:source-dir "plexus-compilers/plexus-compiler-javac/src/main/java"
4005 #:tests? #f; depends on compiler-test -> maven-core -> ... -> this package.
4006 #:test-dir "plexus-compilers/plexus-compiler-javac/src/test"))
4008 `(("java-plexus-compiler-api" ,java-plexus-compiler-api)
4009 ("java-plexus-utils" ,java-plexus-utils)
4010 ("java-plexus-container-default" ,java-plexus-container-default)))
4012 `(("java-junit" ,java-junit)))
4013 (synopsis "Javac Compiler support for Plexus Compiler component")
4014 (description "This package contains the Javac Compiler support for Plexus
4015 Compiler component.")))
4017 (define-public java-plexus-sec-dispatcher
4019 (name "java-plexus-sec-dispatcher")
4020 (version "1.4") ;; Newest release listed at the Maven Central Repository.
4022 ;; This project doesn't tag releases or publish tarballs, so we take
4023 ;; the "prepare release plexus-sec-dispatcher-1.4" git commit.
4026 (url "https://github.com/sonatype/plexus-sec-dispatcher/")
4027 (commit "7db8f880486e192a1c5ea9544e01e756c3d49d0f")))
4030 "1ng4yliy4cqpjr4fxxjbpwyk1wkch5f8vblm1kvwf328s4gibszs"))
4031 (file-name (git-file-name name version))))
4033 `(#:jar-name "plexus-sec-dispatcher.jar"
4034 #:source-dir "src/main/java"
4037 (modify-phases %standard-phases
4038 (add-before 'build 'generate-models
4039 (lambda* (#:key inputs #:allow-other-keys)
4040 (define (modello-single-mode file version mode)
4042 "org.codehaus.modello.ModelloCli"
4043 file mode "src/main/java" version
4045 (let ((file "src/main/mdo/settings-security.mdo"))
4046 (modello-single-mode file "1.0.0" "java")
4047 (modello-single-mode file "1.0.0" "xpp3-reader")
4048 (modello-single-mode file "1.0.0" "xpp3-writer"))
4050 (add-before 'build 'generate-components.xml
4052 (mkdir-p "build/classes/META-INF/plexus")
4053 (with-output-to-file "build/classes/META-INF/plexus/components.xml"
4059 <role>org.sonatype.plexus.components.sec.dispatcher.SecDispatcher</role>\n
4060 <role-hint>default</role-hint>\n
4061 <implementation>org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher</implementation>\n
4062 <description></description>\n
4065 <role>org.sonatype.plexus.components.cipher.PlexusCipher</role>\n
4066 <field-name>_cipher</field-name>\n
4069 <role>org.sonatype.plexus.components.sec.dispatcher.PasswordDecryptor</role>\n
4070 <field-name>_decryptors</field-name>\n
4074 <_configuration-file>~/.settings-security.xml</_configuration-file>\n
4078 </component-set>\n")))
4080 (add-before 'check 'fix-paths
4082 (copy-recursively "src/test/resources" "target")
4085 `(("java-plexus-cipher" ,java-plexus-cipher)))
4087 `(("java-modello-core" ,java-modello-core)
4089 ("java-plexus-container-default" ,java-plexus-container-default)
4090 ("java-plexus-classworlds" ,java-plexus-classworlds)
4091 ("java-plexus-utils" ,java-plexus-utils)
4092 ("java-guava" ,java-guava)
4093 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
4094 ("java-sisu-build-api" ,java-sisu-build-api)
4096 ("java-modellop-plugins-java" ,java-modello-plugins-java)
4097 ("java-modellop-plugins-xml" ,java-modello-plugins-xml)
4098 ("java-modellop-plugins-xpp3" ,java-modello-plugins-xpp3)
4100 ("java-junit" ,java-junit)))
4101 (build-system ant-build-system)
4102 (home-page "https://github.com/sonatype/plexus-sec-dispatcher")
4103 (synopsis "Plexus Security Dispatcher Component")
4104 (description "This package is the Plexus Security Dispatcher Component.
4105 This component decrypts a string passed to it.")
4106 (license license:asl2.0)))
4108 (define-public java-plexus-cli
4110 (name "java-plexus-cli")
4115 (url "https://github.com/sonatype/plexus-cli")
4116 (commit "a776afa6bca84e5107bedb69440329cdb24ed645")))
4117 (file-name (string-append name "-" version))
4120 "0xjrlay605rypv3zd7y24vlwf0039bil3n2cqw54r1ddpysq46vx"))))
4121 (build-system ant-build-system)
4123 `(#:jar-name "plexus-cli.jar"
4124 #:source-dir "src/main/java"
4126 #:test-dir "src/test"))
4128 `(("java-commons-cli" ,java-commons-cli)
4129 ("java-plexus-container-default" ,java-plexus-container-default)
4130 ("java-plexus-classworlds" ,java-plexus-classworlds)))
4132 `(("java-plexus-utils" ,java-plexus-utils)
4133 ("java-junit" ,java-junit)
4134 ("java-guava" ,java-guava)))
4135 (home-page "https://codehaus-plexus.github.io/plexus-cli")
4136 (synopsis "CLI building library for plexus")
4137 (description "This package is a library to help creating CLI around
4138 Plexus components.")
4139 (license license:asl2.0)))
4141 (define-public java-sisu-build-api
4143 (name "java-sisu-build-api")
4148 (url "https://github.com/sonatype/sisu-build-api")
4149 (commit (string-append "plexus-build-api-" version))))
4150 (file-name (git-file-name name version))
4153 "1d5w6c58gkx30d51v7qwv1xrhc0ly76848gihmgshj19yf6yhca0"))))
4154 (build-system ant-build-system)
4156 `(#:jar-name "sisu-build-api.jar"
4157 #:source-dir "src/main/java"
4159 #:tests? #f; FIXME: how to run the tests?
4161 (modify-phases %standard-phases
4162 (add-before 'build 'copy-resources
4164 (copy-recursively "src/main/resources" "build/classes")
4165 (substitute* (find-files "build/classes")
4166 (("\\$\\{project.version\\}") ,version))
4168 (add-before 'build 'generate-plexus-compontent
4170 (mkdir-p "build/classes/META-INF/plexus")
4171 ;; This file is required for plexus to inject this package.
4172 ;; FIXME: how is it generated?
4173 (with-output-to-file "build/classes/META-INF/plexus/components.xml"
4179 <role>org.sonatype.plexus.build.incremental.BuildContext</role>\n
4180 <role-hint>default</role-hint>\n
4181 <implementation>org.sonatype.plexus.build.incremental.DefaultBuildContext</implementation>\n
4182 <description>Filesystem based non-incremental build context implementation\n
4183 which behaves as if all files were just created.</description>\n
4186 </component-set>\n")))
4189 `(("java-plexus-utils" ,java-plexus-utils)
4190 ("java-plexus-container-default" ,java-plexus-container-default)))
4191 (home-page "https://github.com/sonatype/sisu-build-api/")
4192 (synopsis "Base build API for maven")
4193 (description "This package contains the base build API for maven and
4194 a default implementation of it. This API is about scanning files in a
4195 project and determining what files need to be rebuilt.")
4196 (license license:asl2.0)))
4198 (define-public java-modello-core
4200 (name "java-modello-core")
4205 (url "https://github.com/codehaus-plexus/modello")
4206 (commit (string-append "modello-" version))))
4207 (file-name (git-file-name name version))
4210 "1di6ni42aqllpdvkpyfcw70352vr2i8wf6hd5nhd9kmqjb5dj5j4"))))
4211 (build-system ant-build-system)
4213 `(#:jar-name "modello-core.jar"
4214 #:source-dir "modello-core/src/main/java"
4215 #:test-dir "modello-core/src/test"
4216 #:main-class "org.codehaus.modello.ModelloCli"
4219 (modify-phases %standard-phases
4220 (add-before 'build 'copy-resources
4222 (mkdir-p "build/classes/META-INF/plexus")
4223 (copy-file "modello-core/src/main/resources/META-INF/plexus/components.xml"
4224 "build/classes/META-INF/plexus/components.xml")
4226 (add-before 'check 'fix-tests
4228 (with-directory-excursion "modello-core/src/test/java/org/codehaus"
4229 (substitute* '("modello/core/DefaultModelloCoreTest.java"
4230 "modello/core/io/ModelReaderTest.java")
4231 (("src/test") "modello-core/src/test")))
4234 `(("java-plexus-utils" ,java-plexus-utils)
4235 ("java-plexus-container-default" ,java-plexus-container-default)
4236 ("java-sisu-build-api" ,java-sisu-build-api)))
4238 `(("java-junit" ,java-junit)
4239 ("java-plexus-classworlds" ,java-plexus-classworlds)
4240 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
4241 ("java-guava" ,java-guava)))
4242 (home-page "https://codehaus-plexus.github.io/modello/")
4243 (synopsis "Framework for code generation from a simple model")
4244 (description "Modello is a framework for code generation from a simple model.
4246 Modello generates code from a simple model format: based on a plugin
4247 architecture, various types of code and descriptors can be generated from the
4248 single model, including Java POJOs, XML/JSON/YAML marshallers/unmarshallers,
4249 XSD and documentation.")
4252 ;; Although this package uses only files licensed under expat,
4253 ;; other parts of the source are licensed under different
4254 ;; licenses. We include them to be inherited by other packages.
4256 ;; Some files in modello-plugin-java are licensed under a
4257 ;; 5-clause BSD license.
4258 (license:non-copyleft
4259 (string-append "file:///modello-plugins/modello-plugin-java/"
4260 "src/main/java/org/codehaus/modello/plugin/"
4261 "java/javasource/JNaming.java"))))))
4263 (define-public java-modello-plugins-java
4265 (inherit java-modello-core)
4266 (name "java-modello-plugins-java")
4268 `(#:jar-name "modello-plugins-java.jar"
4269 #:source-dir "modello-plugins/modello-plugin-java/src/main/java"
4270 #:test-dir "modello-plugins/modello-plugin-java/src/test"
4272 #:tests? #f; requires maven-model, which depends on this package
4274 (modify-phases %standard-phases
4275 (add-before 'build 'copy-resources
4277 (mkdir-p "build/classes")
4278 (copy-recursively "modello-plugins/modello-plugin-java/src/main/resources"
4282 `(("java-modello-core" ,java-modello-core)
4283 ,@(package-inputs java-modello-core)))
4284 (synopsis "Modello Java Plugin")
4285 (description "Modello Java Plugin generates Java objects for the model.")))
4287 (define-public java-modello-plugins-xml
4289 (inherit java-modello-core)
4290 (name "java-modello-plugins-xml")
4292 `(#:jar-name "modello-plugins-xml.jar"
4293 #:source-dir "modello-plugins/modello-plugin-xml/src/main/java"
4294 #:test-dir "modello-plugins/modello-plugin-xml/src/test"
4297 (modify-phases %standard-phases
4298 (add-before 'build 'copy-resources
4300 (mkdir-p "build/classes")
4302 "modello-plugins/modello-plugin-xml/src/main/resources"
4305 (add-before 'check 'fix-paths
4307 (with-directory-excursion "modello-plugins/modello-plugin-xml/src/test"
4309 "java/org/codehaus/modello/plugins/xml/XmlModelloPluginTest.java"
4310 (("src/test") "modello-plugins/modello-plugin-xml/src/test")))
4313 `(("java-modello-core" ,java-modello-core)
4314 ("java-modello-plugins-java" ,java-modello-plugins-java)
4315 ,@(package-inputs java-modello-core)))
4316 (synopsis "Modello XML Plugin")
4317 (description "Modello XML Plugin contains shared code for every plugins
4318 working on XML representation of the model.")))
4320 (define-public java-modello-test
4322 (inherit java-modello-core)
4323 (name "java-modello-test")
4325 `(#:jar-name "modello-test.jar"
4326 #:source-dir "modello-test/src/main/java"
4327 #:tests? #f; no tests
4330 `(("java-plexus-utils" ,java-plexus-utils)
4331 ("java-plexus-compiler-api" ,java-plexus-compiler-api)
4332 ("java-plexus-compiler-javac" ,java-plexus-compiler-javac)
4333 ("java-plexus-container-default" ,java-plexus-container-default)))
4334 (synopsis "Modello test package")
4335 (description "The modello test package contains the basis to create
4336 Modello generator unit-tests, including sample models and xml files to test
4337 every feature for every plugin.")))
4339 (define-public java-modello-plugins-xpp3
4341 (inherit java-modello-core)
4342 (name "java-modello-plugins-xpp3")
4344 `(#:jar-name "modello-plugins-xpp3.jar"
4345 #:source-dir "modello-plugins/modello-plugin-xpp3/src/main/java"
4346 #:test-dir "modello-plugins/modello-plugin-xpp3/src/test"
4347 ;; One of the test dependencies is maven-model which depends on this package.
4351 (modify-phases %standard-phases
4352 (add-before 'build 'copy-resources
4354 (mkdir-p "build/classes")
4355 (copy-recursively "modello-plugins/modello-plugin-xpp3/src/main/resources"
4359 `(("java-modello-core" ,java-modello-core)
4360 ("java-modello-plugins-java" ,java-modello-plugins-java)
4361 ("java-modello-plugins-xml" ,java-modello-plugins-xml)
4362 ,@(package-inputs java-modello-core)))
4364 `(("java-xmlunit" ,java-xmlunit)
4365 ("java-modello-test" ,java-modello-test)
4366 ,@(package-native-inputs java-modello-core)))
4367 (synopsis "Modello XPP3 Plugin")
4368 (description "The modello XPP3 plugin generates XML readers and writers based
4369 on the XPP3 API (XML Pull Parser).")))
4371 (define-public java-asm
4377 (uri (string-append "https://download.forge.ow2.org/asm/"
4378 "asm-" version ".tar.gz"))
4381 "115l5pqblirdkmzi32dxx7gbcm4jy0s14y5wircr6h8jdr9aix00"))))
4382 (build-system ant-build-system)
4384 `(("java-aqute-bndlib" ,java-aqute-bndlib)
4385 ("java-aqute-libg" ,java-aqute-libg)))
4387 `(#:build-target "compile"
4388 ;; The tests require an old version of Janino, which no longer compiles
4393 ;; We don't need these extra ant tasks, but the build system asks us to
4394 ;; provide a path anyway.
4395 "-Dobjectweb.ant.tasks.path=dummy-path"
4396 ;; The java-aqute.bndlib JAR file will be put onto the classpath and
4397 ;; used during the build automatically by ant-build-system, but
4398 ;; java-asm's build.xml fails unless we provide something here.
4399 "-Dbiz.aQute.bnd.path=dummy-path")
4401 (modify-phases %standard-phases
4402 (add-before 'install 'build-jars
4403 (lambda* (#:key make-flags #:allow-other-keys)
4404 ;; We cannot use the "jar" target because it depends on a couple
4405 ;; of unpackaged, complicated tools.
4408 "-cf" (string-append "dist/asm-" ,version ".jar")
4409 "-C" "output/build/tmp" ".")))
4411 (install-jars "dist")))))
4413 `(("java-junit" ,java-junit)))
4414 (home-page "https://asm.ow2.io/")
4415 (synopsis "Very small and fast Java bytecode manipulation framework")
4416 (description "ASM is an all purpose Java bytecode manipulation and
4417 analysis framework. It can be used to modify existing classes or dynamically
4418 generate classes, directly in binary form. The provided common
4419 transformations and analysis algorithms allow easily assembling custom
4420 complex transformations and code analysis tools.")
4421 (license license:bsd-3)))
4423 (define java-asm-bootstrap
4426 (name "java-asm-bootstrap")
4428 (substitute-keyword-arguments (package-arguments java-asm)
4432 `(("java-aqute-bndlib" ,java-aqute-bndlib-bootstrap)
4433 ("java-aqute-libg" ,java-aqute-libg-bootstrap)
4434 ,@(delete `("java-aqute-bndlib" ,java-aqute-bndlib)
4435 (delete `("java-aqute-libg" ,java-aqute-libg)
4436 (package-inputs java-asm)))))))
4438 (define-public java-cglib
4446 (url "https://github.com/cglib/cglib.git")
4447 (commit (string-append
4449 (string-map (lambda (c) (if (char=? c #\.) #\_ c))
4451 (file-name (git-file-name name version))
4453 (base32 "186451jms2zfp47yd8kxd77az2cqal1my2br7klgyp8fpl4qfg8v"))))
4454 (build-system ant-build-system)
4456 `(;; FIXME: tests fail because junit runs
4457 ;; "net.sf.cglib.transform.AbstractTransformTest", which does not seem
4458 ;; to describe a test at all.
4460 #:jar-name "cglib.jar"
4462 (modify-phases %standard-phases
4463 (add-after 'unpack 'chdir
4464 (lambda _ (chdir "cglib") #t)))))
4466 `(("java-asm" ,java-asm)
4467 ("java-junit" ,java-junit)))
4468 (home-page "https://github.com/cglib/cglib/")
4469 (synopsis "Java byte code generation library")
4470 (description "The byte code generation library CGLIB is a high level API
4471 to generate and transform Java byte code.")
4472 (license license:asl2.0)))
4474 (define-public java-objenesis
4476 (name "java-objenesis")
4481 (url "https://github.com/easymock/objenesis")
4483 (file-name (git-file-name name version))
4486 "054yi200wj00x6dp1sxfrwgndwywadsbn8d8ij1j0v45j9g2vdya"))))
4487 (build-system ant-build-system)
4489 `(#:jar-name "objenesis.jar"
4490 #:source-dir "main/src/"
4491 #:test-dir "main/src/test/"))
4493 `(("java-junit" ,java-junit)
4494 ("java-hamcrest-core" ,java-hamcrest-core)))
4495 (home-page "http://objenesis.org/")
4496 (synopsis "Bypass the constructor when creating an object")
4497 (description "Objenesis is a small Java library that serves one purpose:
4498 to instantiate a new object of a particular class. It is common to see
4499 restrictions in libraries stating that classes must require a default
4500 constructor. Objenesis aims to overcome these restrictions by bypassing the
4501 constructor on object instantiation.")
4502 (license license:asl2.0)))
4504 (define-public java-easymock
4506 (name "java-easymock")
4511 (url "https://github.com/easymock/easymock/")
4512 (commit (string-append "easymock-" version))))
4513 (file-name (git-file-name name version))
4516 "02vybm8hc0i0n9sp2f2iiqn54zwqhq835f76wc6b2m7819z5a8dq"))))
4517 (build-system ant-build-system)
4519 `(#:jar-name "easymock.jar"
4520 #:source-dir "core/src/main"
4521 #:test-dir "core/src/test"
4523 (modify-phases %standard-phases
4524 ;; FIXME: Android support requires the following packages to be
4525 ;; available: com.google.dexmaker.stock.ProxyBuilder
4526 (add-after 'unpack 'delete-android-support
4528 (with-directory-excursion "core/src/main/java/org/easymock/internal"
4529 (substitute* "MocksControl.java"
4530 (("AndroidSupport.isAndroid\\(\\)") "false")
4531 (("return classProxyFactory = new AndroidClassProxyFactory\\(\\);") ""))
4532 (delete-file "AndroidClassProxyFactory.java"))
4534 (add-after 'unpack 'delete-broken-tests
4536 (with-directory-excursion "core/src/test/java/org/easymock"
4537 ;; This test depends on dexmaker.
4538 (delete-file "tests2/ClassExtensionHelperTest.java")
4540 ;; This is not a test.
4541 (delete-file "tests/BaseEasyMockRunnerTest.java")
4543 ;; This test should be executed with a different runner...
4544 (delete-file "tests2/EasyMockAnnotationsTest.java")
4545 ;; ...but deleting it means that we also have to delete these
4547 (delete-file "tests2/EasyMockRunnerTest.java")
4548 (delete-file "tests2/EasyMockRuleTest.java")
4550 ;; This test fails because the file "easymock.properties" does
4552 (delete-file "tests2/EasyMockPropertiesTest.java"))
4555 `(("java-asm" ,java-asm)
4556 ("java-cglib" ,java-cglib)
4557 ("java-objenesis" ,java-objenesis)))
4559 `(("java-junit" ,java-junit)
4560 ("java-hamcrest-core" ,java-hamcrest-core)))
4561 (home-page "https://easymock.org/")
4562 (synopsis "Java library providing mock objects for unit tests")
4563 (description "EasyMock is a Java library that provides an easy way to use
4564 mock objects in unit testing.")
4565 (license license:asl2.0)))
4567 (define-public java-jmock-1
4574 (url "https://github.com/jmock-developers/jmock-library")
4576 (file-name (git-file-name name version))
4579 "0lkga995xd9b9mmzxmcd301hlw83p1h78nibh7djlx7wydscr85z"))))
4580 (build-system ant-build-system)
4582 `(#:build-target "jars"
4583 #:test-target "run.tests"
4585 (modify-phases %standard-phases
4586 (replace 'install (install-jars "build")))))
4587 (home-page "http://jmock.org/")
4588 (synopsis "Mock object library for test-driven development")
4589 (description "JMock is a library that supports test-driven development of
4590 Java code with mock objects. Mock objects help you design and test the
4591 interactions between the objects in your programs.
4596 @item makes it quick and easy to define mock objects
4597 @item lets you precisely specify the interactions between
4598 your objects, reducing the brittleness of your tests
4599 @item plugs into your favourite test framework
4600 @item is easy to extend.
4602 (license license:bsd-3)))
4604 (define-public java-jmock
4606 (inherit java-jmock-1)
4612 (url "https://github.com/jmock-developers/jmock-library")
4614 (file-name (git-file-name name version))
4617 "12b7l22g3nrjvf2dzcw3z03fpd2chrgp0d8xkvn8w55rwb57pax6"))))
4619 `(("java-hamcrest-all" ,java-hamcrest-all)
4620 ("java-asm" ,java-asm)
4621 ("java-bsh" ,java-bsh)
4622 ("java-junit" ,java-junit)))
4624 `(("cglib" ,java-cglib)))
4626 `(#:jar-name "java-jmock.jar"
4627 #:source-dir "jmock/src/main/java"
4628 #:test-dir "jmock/src/test"))))
4630 (define-public java-jmock-junit4
4632 (inherit java-jmock)
4633 (name "java-jmock-junit4")
4635 `(#:jar-name "java-jmock-junit4.jar"
4636 #:source-dir "jmock-junit4/src/main/java"
4637 #:test-dir "jmock-junit4/src/test"))
4639 `(("java-hamcrest-all" ,java-hamcrest-all)
4640 ("java-asm" ,java-asm)
4641 ("java-bsh" ,java-bsh)
4642 ("java-jmock" ,java-jmock)
4643 ("java-jumit" ,java-junit)))))
4645 (define-public java-jmock-legacy
4647 (inherit java-jmock)
4648 (name "java-jmock-legacy")
4650 `(#:jar-name "java-jmock-legacy.jar"
4651 #:source-dir "jmock-legacy/src/main/java"
4652 #:test-dir "jmock-legacy/src/test"
4654 (modify-phases %standard-phases
4655 (add-before 'check 'copy-tests
4657 ;; This file is a dependancy of some tests
4658 (let ((file "org/jmock/test/acceptance/PackageProtectedType.java"))
4659 (copy-file (string-append "jmock/src/test/java/" file)
4660 (string-append "jmock-legacy/src/test/java/" file))
4663 `(("java-hamcrest-all" ,java-hamcrest-all)
4664 ("java-objenesis" ,java-objenesis)
4665 ("java-cglib" ,java-cglib)
4666 ("java-jmock" ,java-jmock)
4667 ("java-asm" ,java-asm)
4668 ("java-bsh" ,java-bsh)
4669 ("java-junit" ,java-junit)))
4671 `(("java-jmock-junit4" ,java-jmock-junit4)))))
4673 (define-public java-hamcrest-all
4674 (package (inherit java-hamcrest-core)
4675 (name "java-hamcrest-all")
4678 ,@(substitute-keyword-arguments (package-arguments java-hamcrest-core)
4679 ((#:build-target _) "bigjar")
4681 `(modify-phases ,phases
4682 ;; Some build targets override the classpath, so we need to patch
4683 ;; the build.xml to ensure that required dependencies are on the
4685 (add-after 'unpack 'patch-classpath-for-integration
4686 (lambda* (#:key inputs #:allow-other-keys)
4687 (substitute* "build.xml"
4688 ((" build/hamcrest-library-\\$\\{version\\}.jar" line)
4692 (find-files (assoc-ref inputs "java-junit") "\\.jar$")
4693 (find-files (assoc-ref inputs "java-jmock") "\\.jar$")
4694 (find-files (assoc-ref inputs "java-easymock") "\\.jar$")))
4696 (("build/hamcrest-core-\\$\\{version\\}\\.jar")
4697 (string-append (assoc-ref inputs "java-hamcrest-core")
4698 "/share/java/hamcrest-core.jar")))
4701 `(("java-junit" ,java-junit)
4702 ("java-jmock" ,java-jmock-1)
4703 ;; This is necessary because of what seems to be a race condition.
4704 ;; This package would sometimes fail to build because hamcrest-core.jar
4705 ;; could not be found, even though it is built as part of this package.
4706 ;; Adding java-hamcrest-core appears to fix this problem. See
4707 ;; https://debbugs.gnu.org/31390 for more information.
4708 ("java-hamcrest-core" ,java-hamcrest-core)
4709 ("java-easymock" ,java-easymock)
4710 ,@(package-inputs java-hamcrest-core)))))
4712 (define-public java-jopt-simple
4714 (name "java-jopt-simple")
4718 (uri (string-append "http://repo1.maven.org/maven2/"
4719 "net/sf/jopt-simple/jopt-simple/"
4720 version "/jopt-simple-"
4721 version "-sources.jar"))
4724 "1v8bzmwmw6qq20gm42xyay6vrd567dra4vqwhgjnqqjz1gs9f8qa"))))
4725 (build-system ant-build-system)
4727 `(#:tests? #f ; there are no tests
4728 #:jar-name "jopt-simple.jar"))
4729 (home-page "https://pholser.github.io/jopt-simple/")
4730 (synopsis "Java library for parsing command line options")
4731 (description "JOpt Simple is a Java library for parsing command line
4732 options, such as those you might pass to an invocation of @code{javac}. In
4733 the interest of striving for simplicity, as closely as possible JOpt Simple
4734 attempts to honor the command line option syntaxes of POSIX @code{getopt} and
4735 GNU @code{getopt_long}. It also aims to make option parser configuration and
4736 retrieval of options and their arguments simple and expressive, without being
4738 (license license:expat)))
4740 (define-public java-commons-math3
4742 (name "java-commons-math3")
4746 (uri (string-append "mirror://apache/commons/math/source/"
4747 "commons-math3-" version "-src.tar.gz"))
4750 "19l6yp44qc5g7wg816nbn5z3zq3xxzwimvbm4a8pczgvpi4i85s6"))))
4751 (build-system ant-build-system)
4753 `(#:build-target "jar"
4754 #:test-target "test"
4756 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
4757 (junit (assoc-ref %build-inputs "java-junit")))
4758 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
4759 (string-append "-Dhamcrest.jar=" hamcrest
4760 "/share/java/hamcrest-core.jar")))
4762 (modify-phases %standard-phases
4763 ;; We want to build the jar in the build phase and run the tests
4764 ;; later in a separate phase.
4765 (add-after 'unpack 'untangle-targets
4767 (substitute* "build.xml"
4768 (("name=\"jar\" depends=\"test\"")
4769 "name=\"jar\" depends=\"compile\""))
4771 ;; There is no install target.
4773 (install-jars "target")))))
4775 `(("java-junit" ,java-junit)
4776 ("java-hamcrest-core" ,java-hamcrest-core)))
4777 (home-page "https://commons.apache.org/math/")
4778 (synopsis "Apache Commons mathematics library")
4779 (description "Commons Math is a library of lightweight, self-contained
4780 mathematics and statistics components addressing the most common problems not
4781 available in the Java programming language or Commons Lang.")
4782 (license license:asl2.0)))
4784 (define-public java-jmh
4791 (url "http://hg.openjdk.java.net/code-tools/jmh/")
4792 (changeset version)))
4793 (file-name (string-append name "-" version "-checkout"))
4796 "1fxyxhg9famwcg1prc4cgwb5wzyxqavn3cjm5vz8605xz7x5k084"))))
4797 (build-system ant-build-system)
4799 `(#:jar-name "jmh-core.jar"
4800 #:source-dir "jmh-core/src/main"
4801 #:test-dir "jmh-core/src/test"
4803 (modify-phases %standard-phases
4804 ;; This seems to be a bug in the JDK. It may not be necessary in
4805 ;; future versions of the JDK.
4806 (add-after 'unpack 'fix-bug
4808 (with-directory-excursion
4809 "jmh-core/src/main/java/org/openjdk/jmh/runner/options"
4810 (substitute* '("IntegerValueConverter.java"
4811 "ThreadsValueConverter.java")
4812 (("public Class<Integer> valueType")
4813 "public Class<? extends Integer> valueType")))
4816 `(("java-jopt-simple" ,java-jopt-simple)
4817 ("java-commons-math3" ,java-commons-math3)))
4819 `(("java-junit" ,java-junit)
4820 ("java-hamcrest-core" ,java-hamcrest-core)))
4821 (home-page "https://openjdk.java.net/projects/code-tools/jmh/")
4822 (synopsis "Benchmark harness for the JVM")
4823 (description "JMH is a Java harness for building, running, and analysing
4824 nano/micro/milli/macro benchmarks written in Java and other languages
4825 targeting the JVM.")
4827 (license license:gpl2)))
4829 (define-public java-commons-collections4
4831 (name "java-commons-collections4")
4835 (uri (string-append "mirror://apache/commons/collections/source/"
4836 "commons-collections4-" version "-src.tar.gz"))
4839 "1krfhvggympq4avk7gh6qafzf6b9ip6r1m4lmacikyx04039m0wl"))))
4840 (build-system ant-build-system)
4842 `(#:test-target "test"
4844 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
4845 (junit (assoc-ref %build-inputs "java-junit"))
4846 (easymock (assoc-ref %build-inputs "java-easymock")))
4847 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
4848 (string-append "-Dhamcrest.jar=" hamcrest
4849 "/share/java/hamcrest-core.jar")
4850 (string-append "-Deasymock.jar=" easymock
4851 "/share/java/easymock.jar")))
4853 (modify-phases %standard-phases
4855 (install-jars "target")))))
4857 `(("java-junit" ,java-junit)
4858 ("java-hamcrest-core" ,java-hamcrest-core)
4859 ("java-easymock" ,java-easymock)))
4860 (home-page "https://commons.apache.org/collections/")
4861 (synopsis "Collections framework")
4862 (description "The Java Collections Framework is the recognised standard
4863 for collection handling in Java. Commons-Collections seek to build upon the
4864 JDK classes by providing new interfaces, implementations and utilities. There
4865 are many features, including:
4868 @item @code{Bag} interface for collections that have a number of copies of
4870 @item @code{BidiMap} interface for maps that can be looked up from value to
4871 key as well and key to value
4872 @item @code{MapIterator} interface to provide simple and quick iteration over
4874 @item Transforming decorators that alter each object as it is added to the
4876 @item Composite collections that make multiple collections look like one
4877 @item Ordered maps and sets that retain the order elements are added in,
4878 including an LRU based map
4879 @item Reference map that allows keys and/or values to be garbage collected
4881 @item Many comparator implementations
4882 @item Many iterator implementations
4883 @item Adapter classes from array and enumerations to collections
4884 @item Utilities to test or create typical set-theory properties of collections
4885 such as union, intersection, and closure.
4887 (license license:asl2.0)))
4889 (define-public java-commons-collections
4891 (inherit java-commons-collections4)
4892 (name "java-commons-collections")
4896 (uri (string-append "mirror://apache/commons/collections/source/"
4897 "commons-collections-" version "-src.tar.gz"))
4900 "055r51a5lfc3z7rkxnxmnn1npvkvda7636hjpm4qk7cnfzz98387"))
4902 (search-patches "java-commons-collections-fix-java8.patch"))))
4904 (substitute-keyword-arguments (package-arguments java-commons-collections4)
4906 `(modify-phases ,phases
4907 ;; The manifest is required by the build procedure
4908 (add-before 'build 'add-manifest
4910 (mkdir-p "build/conf")
4911 (call-with-output-file "build/conf/MANIFEST.MF"
4913 (format file "Manifest-Version: 1.0\n")))
4916 (install-jars "build"))))))))
4918 (define java-commons-collections-test-classes
4920 (inherit java-commons-collections)
4922 `(#:jar-name "commons-collections-test-classes.jar"
4923 #:source-dir "src/test"
4926 `(("collection" ,java-commons-collections)))))
4928 (define-public java-commons-beanutils
4930 (name "java-commons-beanutils")
4934 (uri (string-append "mirror://apache/commons/beanutils/source/"
4935 "commons-beanutils-" version "-src.tar.gz"))
4938 "03cs0bq3sl1sdc7py9g3qnf8n9h473nrkvd3d251kaqv6a2ab7qk"))))
4939 (build-system ant-build-system)
4941 `(#:test-target "test"
4944 (modify-phases %standard-phases
4946 (lambda* (#:key outputs #:allow-other-keys)
4947 (rename-file (string-append "dist/commons-beanutils-" ,version
4949 "commons-beanutils.jar")
4950 (install-file "commons-beanutils.jar"
4951 (string-append (assoc-ref outputs "out") "/share/java/"))
4954 `(("logging" ,java-commons-logging-minimal)
4955 ("collections" ,java-commons-collections)))
4957 `(("junit" ,java-junit)
4958 ("collections-test" ,java-commons-collections-test-classes)))
4959 (home-page "https://commons.apache.org/beanutils/")
4960 (synopsis "Dynamically set or get properties in Java")
4961 (description "BeanUtils provides a simplified interface to reflection and
4962 introspection to set or get dynamically determined properties through their
4963 setter and getter method.")
4964 (license license:asl2.0)))
4966 (define-public java-commons-io
4968 (name "java-commons-io")
4973 (uri (string-append "mirror://apache/commons/io/source/"
4974 "commons-io-" version "-src.tar.gz"))
4977 "0q5y41jrcjvx9hzs47x5kdhnasdy6rm4bzqd2jxl02w717m7a7v3"))))
4978 (build-system ant-build-system)
4979 (outputs '("out" "doc"))
4981 `(#:test-target "test"
4983 (list (string-append "-Djunit.jar="
4984 (assoc-ref %build-inputs "java-junit")
4985 "/share/java/junit.jar"))
4987 (modify-phases %standard-phases
4988 (add-after 'build 'build-javadoc ant-build-javadoc)
4989 (replace 'install (install-jars "target"))
4990 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
4992 `(("java-junit" ,java-junit)
4993 ("java-hamcrest-core" ,java-hamcrest-core)))
4994 (home-page "https://commons.apache.org/io/")
4995 (synopsis "Common useful IO related classes")
4996 (description "Commons-IO contains utility classes, stream implementations,
4997 file filters and endian classes.")
4998 (license license:asl2.0)))
5000 (define-public java-commons-exec-1.1
5002 (name "java-commons-exec")
5007 (uri (string-append "mirror://apache/commons/exec/source/"
5008 "commons-exec-" version "-src.tar.gz"))
5011 "025dk8xgj10lxwwwqp0hng2rn7fr4vcirxzydqzx9k4dim667alk"))))
5012 (build-system ant-build-system)
5014 `(#:test-target "test"
5016 (list (string-append "-Dmaven.junit.jar="
5017 (assoc-ref %build-inputs "java-junit")
5018 "/share/java/junit.jar"))
5020 (modify-phases %standard-phases
5021 (add-before 'build 'delete-network-tests
5023 (delete-file "src/test/java/org/apache/commons/exec/DefaultExecutorTest.java")
5024 (substitute* "src/test/java/org/apache/commons/exec/TestRunner.java"
5025 (("suite\\.addTestSuite\\(DefaultExecutorTest\\.class\\);") ""))
5027 ;; The "build" phase automatically tests.
5029 (replace 'install (install-jars "target")))))
5031 `(("java-junit" ,java-junit)))
5032 (home-page "https://commons.apache.org/proper/commons-exec/")
5033 (synopsis "Common program execution related classes")
5034 (description "Commons-Exec simplifies executing external processes.")
5035 (license license:asl2.0)))
5037 (define-public java-commons-exec
5039 (inherit java-commons-exec-1.1)
5044 (uri (string-append "mirror://apache/commons/exec/source/"
5045 "commons-exec-" version "-src.tar.gz"))
5048 "17yb4h6f8l49c5iyyvda4z2nmw0bxrx857nrwmsr7mmpb7x441yv"))))
5050 `(#:test-target "test"
5052 (list (string-append "-Dmaven.junit.jar="
5053 (assoc-ref %build-inputs "java-junit")
5054 "/share/java/junit.jar")
5055 "-Dmaven.compiler.source=1.7"
5056 "-Dmaven.compiler.target=1.7")
5058 (modify-phases %standard-phases
5059 (add-before 'build 'delete-network-tests
5060 (lambda* (#:key inputs #:allow-other-keys)
5061 ;; This test hangs indefinitely.
5062 (delete-file "src/test/java/org/apache/commons/exec/issues/Exec60Test.java")
5063 (substitute* "src/test/java/org/apache/commons/exec/issues/Exec41Test.java"
5064 (("ping -c 10 127.0.0.1") "sleep 10"))
5065 (substitute* "src/test/java/org/apache/commons/exec/issues/Exec49Test.java"
5067 (call-with-output-file "src/test/scripts/ping.sh"
5069 (format port "#!~a/bin/sh\nsleep $1\n"
5070 (assoc-ref inputs "bash"))))
5072 ;; The "build" phase automatically tests.
5074 (replace 'install (install-jars "target")))))
5076 `(("java-junit" ,java-junit)
5077 ("java-hamcrest-core" ,java-hamcrest-core)))))
5079 (define-public java-commons-lang
5081 (name "java-commons-lang")
5086 (uri (string-append "mirror://apache/commons/lang/source/"
5087 "commons-lang-" version "-src.tar.gz"))
5089 (base32 "1mxwagqadzx1b2al7i0z1v0r235aj2njdyijf02szq0vhmqrfiq5"))))
5090 (build-system ant-build-system)
5091 (outputs '("out" "doc"))
5093 `(#:test-target "test"
5094 #:test-exclude (list "**/Abstract*.java" "**/Random*.java")
5096 (modify-phases %standard-phases
5097 (add-after 'build 'build-javadoc ant-build-javadoc)
5098 (add-before 'check 'disable-failing-test
5100 ;; Disable a failing test
5101 (substitute* "src/test/java/org/apache/commons/lang/\
5102 time/FastDateFormatTest.java"
5103 (("public void testFormat\\(\\)")
5104 "public void disabled_testFormat()"))
5106 (replace 'install (install-jars "target"))
5107 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
5109 `(("java-junit" ,java-junit)))
5110 (home-page "https://commons.apache.org/lang/")
5111 (synopsis "Extension of the java.lang package")
5112 (description "The Commons Lang components contains a set of Java classes
5113 that provide helper methods for standard Java classes, especially those found
5114 in the @code{java.lang} package in the Sun JDK. The following classes are
5118 @item StringUtils - Helper for @code{java.lang.String}.
5119 @item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets
5120 of characters such as @code{[a-z]} and @code{[abcdez]}.
5121 @item RandomStringUtils - Helper for creating randomised strings.
5122 @item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
5123 @item NumberRange - A range of numbers with an upper and lower bound.
5124 @item ObjectUtils - Helper for @code{java.lang.Object}.
5125 @item SerializationUtils - Helper for serializing objects.
5126 @item SystemUtils - Utility class defining the Java system properties.
5127 @item NestedException package - A sub-package for the creation of nested
5129 @item Enum package - A sub-package for the creation of enumerated types.
5130 @item Builder package - A sub-package for the creation of @code{equals},
5131 @code{hashCode}, @code{compareTo} and @code{toString} methods.
5133 (license license:asl2.0)))
5135 (define-public java-commons-lang3
5137 (name "java-commons-lang3")
5142 (uri (string-append "mirror://apache/commons/lang/source/"
5143 "commons-lang3-" version "-src.tar.gz"))
5145 (base32 "0xpshb9spjhplq5a7mr0y1bgfw8190ik4xj8f569xidfcki1d6kg"))))
5146 (build-system ant-build-system)
5147 (outputs '("out" "doc"))
5149 `(#:test-target "test"
5151 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-all"))
5152 (junit (assoc-ref %build-inputs "java-junit"))
5153 (easymock (assoc-ref %build-inputs "java-easymock"))
5154 (io (assoc-ref %build-inputs "java-commons-io")))
5155 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
5156 (string-append "-Dhamcrest.jar=" hamcrest
5157 "/share/java/hamcrest-all.jar")
5158 (string-append "-Dcommons-io.jar=" io
5159 "/share/java/commons-io-"
5160 ,(package-version java-commons-io)
5162 (string-append "-Deasymock.jar=" easymock
5163 "/share/java/easymock.jar")))
5165 (modify-phases %standard-phases
5166 (add-after 'build 'build-javadoc ant-build-javadoc)
5167 (replace 'install (install-jars "target"))
5168 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
5170 `(("java-junit" ,java-junit)
5171 ("java-commons-io" ,java-commons-io)
5172 ("java-hamcrest-all" ,java-hamcrest-all)
5173 ("java-easymock" ,java-easymock)))
5174 (home-page "https://commons.apache.org/lang/")
5175 (synopsis "Extension of the java.lang package")
5176 (description "The Commons Lang components contains a set of Java classes
5177 that provide helper methods for standard Java classes, especially those found
5178 in the @code{java.lang} package. The following classes are included:
5181 @item StringUtils - Helper for @code{java.lang.String}.
5182 @item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets of
5183 characters such as @code{[a-z]} and @code{[abcdez]}.
5184 @item RandomStringUtils - Helper for creating randomised strings.
5185 @item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
5186 @item NumberRange - A range of numbers with an upper and lower bound.
5187 @item ObjectUtils - Helper for @code{java.lang.Object}.
5188 @item SerializationUtils - Helper for serializing objects.
5189 @item SystemUtils - Utility class defining the Java system properties.
5190 @item NestedException package - A sub-package for the creation of nested
5192 @item Enum package - A sub-package for the creation of enumerated types.
5193 @item Builder package - A sub-package for the creation of @code{equals},
5194 @code{hashCode}, @code{compareTo} and @code{toString} methods.
5196 (license license:asl2.0)))
5198 (define-public java-commons-bsf
5200 (name "java-commons-bsf")
5204 (uri (string-append "mirror://apache/commons/bsf/source/bsf-src-"
5208 "1sbamr8jl32p1jgf59nw0b2w9qivyg145954hm6ly54cfgsqrdas"))
5209 (modules '((guix build utils)))
5212 (for-each delete-file
5213 (find-files "." "\\.jar$"))
5215 (build-system ant-build-system)
5217 `(#:build-target "jar"
5218 #:tests? #f; No test file
5219 #:modules ((guix build ant-build-system)
5221 (guix build java-utils)
5224 (modify-phases %standard-phases
5225 (add-before 'build 'create-properties
5227 ;; This file is missing from the distribution
5228 (call-with-output-file "build-properties.xml"
5231 `(project (@ (basedir ".") (name "build-properties") (default ""))
5232 (property (@ (name "project.name") (value "bsf")))
5233 (property (@ (name "source.level") (value "1.5")))
5234 (property (@ (name "build.lib") (value "build/jar")))
5235 (property (@ (name "src.dir") (value "src")))
5236 (property (@ (name "tests.dir") (value "src/org/apache/bsf/test")))
5237 (property (@ (name "build.tests") (value "build/test-classes")))
5238 (property (@ (name "build.dest") (value "build/classes"))))
5241 (replace 'install (install-jars "build")))))
5243 `(("java-junit" ,java-junit)))
5245 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)))
5246 (home-page "https://commons.apache.org/proper/commons-bsf")
5247 (synopsis "Bean Scripting Framework")
5248 (description "The Bean Scripting Framework (BSF) is a set of Java classes
5249 which provides scripting language support within Java applications, and access
5250 to Java objects and methods from scripting languages. BSF allows one to write
5251 JSPs in languages other than Java while providing access to the Java class
5252 library. In addition, BSF permits any Java application to be implemented in
5253 part (or dynamically extended) by a language that is embedded within it. This
5254 is achieved by providing an API that permits calling scripting language engines
5255 from within Java, as well as an object registry that exposes Java objects to
5256 these scripting language engines.")
5257 (license license:asl2.0)))
5259 (define-public java-commons-jxpath
5261 (name "java-commons-jxpath")
5265 (uri (string-append "mirror://apache/commons/jxpath/source/"
5266 "commons-jxpath-" version "-src.tar.gz"))
5269 "1rpgg31ayn9fwr4bfi2i1ij0npcg79ad2fv0w9hacvawsyc42cfs"))))
5270 (build-system ant-build-system)
5272 `(#:jar-name "commons-jxpath.jar"
5273 ;; tests require more dependencies, including mockrunner which depends on old software
5275 #:source-dir "src/java"))
5277 `(("servlet" ,java-classpathx-servletapi)
5278 ("java-jdom" ,java-jdom)
5279 ("java-commons-beanutils" ,java-commons-beanutils)))
5281 `(("java-junit" ,java-junit)))
5282 (home-page "https://commons.apache.org/jxpath/")
5283 (synopsis "Simple interpreter of an expression language called XPath.")
5284 (description "The org.apache.commons.jxpath package defines a simple
5285 interpreter of an expression language called XPath. JXPath applies XPath
5286 expressions to graphs of objects of all kinds: JavaBeans, Maps, Servlet
5287 contexts, DOM etc, including mixtures thereof.")
5288 (license license:asl2.0)))
5290 (define-public java-commons-pool
5292 (name "java-commons-pool")
5296 (uri (string-append "mirror://apache/commons/pool/source/"
5297 "commons-pool2-" version "-src.tar.gz"))
5300 "1fi1hgqmq01bs6azbj3sfswxzadp2r8sjjfiq6ryilz1m50kvrv6"))))
5302 `(#:jar-name "common-pool.jar"
5303 #:source-dir "src/main/java"
5305 (list "**/PerformanceTest.java")))
5306 (build-system ant-build-system)
5308 `(("java-cglib" ,java-cglib)))
5310 `(("java-junit" ,java-junit)
5311 ("java-hamcrest-core" ,java-hamcrest-core)
5312 ("java-asm" ,java-asm)
5313 ("java-objenesis" ,java-objenesis)))
5314 (home-page "https://commons.apache.org/proper/commons-pool/")
5315 (synopsis "Object-pooling API in Java")
5316 (description "The commons-pool package provides an object-pooling API
5317 and a number of object pool implementations. This package defines a
5318 handful of pooling interfaces and some base classes that may be useful when
5319 creating new pool implementations.")
5320 (license license:asl2.0)))
5322 (define-public java-commons-dbcp
5324 (name "java-commons-dbcp")
5328 (uri (string-append "mirror://apache/commons/dbcp/source/"
5329 "commons-dbcp2-" version "-src.tar.gz"))
5332 "0axbvcbnf2l70fc3ybrlp3siw2w4ka9mia2pnx4py8gz54cpw3rc"))))
5334 `(#:source-dir "src/main/java"
5335 #:jar-name "java-commons-dbcp.jar"
5336 #:tests? #f)); requires apache-geronimo
5338 `(("java-commons-pool" ,java-commons-pool)
5339 ("java-commons-logging" ,java-commons-logging-minimal)
5340 ("java-jboss-transaction-api-spec" ,java-jboss-transaction-api-spec)))
5342 `(("java-junit" ,java-junit)))
5343 (build-system ant-build-system)
5344 (home-page "https://commons.apache.org/proper/commons-dbcp/")
5345 (synopsis "Database Connection Pool for Java")
5346 (description "Commons-dbcp allows you to share a pool of database
5347 connections between users. Creating a new connection for each user can be
5348 time consuming and even unfeasible when the number of simultaneous users is
5349 very large. This package provides a way to share a poole of connections to
5351 (license license:asl2.0)))
5353 (define-public java-commons-jcs
5355 (name "java-commons-jcs")
5359 (uri (string-append "mirror://apache/commons/jcs/source/"
5360 "commons-jcs-dist-" version "-src.tar.gz"))
5363 "0syhq2npjbrl0azqfjm0gvash1qd5qjy4qmysxcrqjsk0nf9fa1q"))))
5364 (build-system ant-build-system)
5366 `(#:jar-name "commons-jcs.jar"
5367 #:source-dir "commons-jcs-core/src/main/java"
5368 #:test-dir "commons-jcs-core/src/test"
5369 #:tests? #f; requires hsqldb
5371 (modify-phases %standard-phases
5372 (add-before 'build 'prepare
5374 (with-directory-excursion
5375 "commons-jcs-core/src/main/java/org/apache/commons/jcs"
5377 "auxiliary/disk/jdbc/dsfactory/SharedPoolDataSourceFactory.java"
5378 (("commons.dbcp") "commons.dbcp2")
5379 ((".*\\.setMaxActive.*") ""))
5380 ;;; Remove dependency on velocity-tools
5381 (delete-file "admin/servlet/JCSAdminServlet.java"))
5384 `(("java-classpathx-servletapi" ,java-classpathx-servletapi)
5385 ("java-commons-logging-minimal" ,java-commons-logging-minimal)
5386 ("java-commons-httpclient" ,java-commons-httpclient)
5387 ("java-commons-dbcp" ,java-commons-dbcp)))
5389 `(("java-junit" ,java-junit)))
5390 (home-page "https://commons.apache.org/proper/commons-jcs/")
5391 (synopsis "Distributed caching system in Java")
5392 (description "JCS is a distributed caching system written in Java. It
5393 is intended to speed up applications by providing a means to manage cached
5394 data of various dynamic natures. Like any caching system, JCS is most useful
5395 for high read, low put applications. Latency times drop sharply and
5396 bottlenecks move away from the database in an effectively cached system.")
5397 (license license:asl2.0)))
5399 (define-public java-jsr250
5401 (name "java-jsr250")
5405 (uri (string-append "https://repo1.maven.org/maven2/"
5406 "javax/annotation/javax.annotation-api/"
5407 version "/javax.annotation-api-"
5408 version "-sources.jar"))
5411 "08clh8n4n9wfglf75qsqfjs6yf79f7x6hqx38cn856pksszv50kz"))))
5412 (build-system ant-build-system)
5414 `(#:tests? #f ; no tests included
5416 #:jar-name "jsr250.jar"))
5417 (home-page "https://jcp.org/en/jsr/detail?id=250")
5418 (synopsis "Security-related annotations")
5419 (description "This package provides annotations for security. It provides
5420 packages in the @code{javax.annotation} and @code{javax.annotation.security}
5422 ;; either cddl or gpl2 only, with classpath exception
5423 (license (list license:cddl1.0
5426 (define-public java-jsr305
5428 (name "java-jsr305")
5432 (uri (string-append "https://repo1.maven.org/maven2/"
5433 "com/google/code/findbugs/"
5434 "jsr305/" version "/jsr305-"
5435 version "-sources.jar"))
5438 "1rh6jin9v7jqpq3kf1swl868l8i94r636n03pzpsmgr8v0lh9j2n"))))
5439 (build-system ant-build-system)
5441 `(#:tests? #f ; no tests included
5442 #:jar-name "jsr305.jar"))
5443 (home-page "http://findbugs.sourceforge.net/")
5444 (synopsis "Annotations for the static analyzer called findbugs")
5445 (description "This package provides annotations for the findbugs package.
5446 It provides packages in the @code{javax.annotations} namespace.")
5447 (license license:asl2.0)))
5449 (define-public java-guava
5452 ;; This is the last release of Guava that can be built with Java 7.
5456 (uri (string-append "https://github.com/google/guava/"
5457 "releases/download/v" version
5458 "/guava-" version "-sources.jar"))
5461 "1gawrs5gi6j5hcfxdgpnfli75vb9pfi4sn09pnc8xacr669yajwr"))))
5462 (build-system ant-build-system)
5464 `(#:tests? #f ; no tests included
5465 #:jar-name "guava.jar"
5467 (modify-phases %standard-phases
5468 (add-after 'unpack 'trim-sources
5470 (with-directory-excursion "src/com/google/common"
5471 ;; Remove annotations to avoid extra dependencies:
5472 ;; * "j2objc" annotations are used when converting Java to
5474 ;; * "errorprone" annotations catch common Java mistakes at
5476 ;; * "IgnoreJRERequirement" is used for Android.
5477 (substitute* (find-files "." "\\.java$")
5478 (("import com.google.j2objc.*") "")
5479 (("import com.google.errorprone.annotation.*") "")
5480 (("import org.codehaus.mojo.animal_sniffer.*") "")
5481 (("@CanIgnoreReturnValue") "")
5484 (("@RetainedWith") "")
5486 (("@ForOverride") "")
5487 (("@J2ObjCIncompatible") "")
5488 (("@IgnoreJRERequirement") "")))
5491 `(("java-jsr305" ,java-jsr305)))
5492 (home-page "https://github.com/google/guava")
5493 (synopsis "Google core libraries for Java")
5494 (description "Guava is a set of core libraries that includes new
5495 collection types (such as multimap and multiset), immutable collections, a
5496 graph library, functional types, an in-memory cache, and APIs/utilities for
5497 concurrency, I/O, hashing, primitives, reflection, string processing, and much
5499 (license license:asl2.0)))
5501 ;; The java-commons-logging package provides adapters to many different
5502 ;; logging frameworks. To avoid an excessive dependency graph we try to build
5503 ;; it with only a minimal set of adapters.
5504 (define-public java-commons-logging-minimal
5506 (name "java-commons-logging-minimal")
5510 (uri (string-append "mirror://apache/commons/logging/source/"
5511 "commons-logging-" version "-src.tar.gz"))
5514 "10bwcy5w8d7y39n0krlwhnp8ds3kj5zhmzj0zxnkw0qdlsjmsrj9"))))
5515 (build-system ant-build-system)
5517 `(#:tests? #f ; avoid dependency on logging frameworks
5518 #:jar-name "commons-logging-minimal.jar"
5520 (modify-phases %standard-phases
5521 (add-after 'unpack 'delete-adapters-and-tests
5523 ;; Delete all adapters except for NoOpLog, SimpleLog, and
5524 ;; LogFactoryImpl. NoOpLog is required to build; LogFactoryImpl
5525 ;; is used by applications; SimpleLog is the only actually usable
5526 ;; implementation that does not depend on another logging
5530 (delete-file (string-append
5531 "src/main/java/org/apache/commons/logging/impl/" file)))
5532 (list "Jdk13LumberjackLogger.java"
5533 "WeakHashtable.java"
5535 "ServletContextCleaner.java"
5538 "LogKitLogger.java"))
5539 (delete-file-recursively "src/test")
5541 (home-page "https://commons.apache.org/logging/")
5542 (synopsis "Common API for logging implementations")
5543 (description "The Logging package is a thin bridge between different
5544 logging implementations. A library that uses the commons-logging API can be
5545 used with any logging implementation at runtime.")
5546 (license license:asl2.0)))
5548 ;; This is the last release of the 1.x series.
5549 (define-public java-mockito-1
5551 (name "java-mockito")
5555 (uri (string-append "http://repo1.maven.org/maven2/"
5556 "org/mockito/mockito-core/" version
5557 "/mockito-core-" version "-sources.jar"))
5560 "0vmiwnwpf83g2q7kj1rislmja8fpvqkixjhawh7nxnygx6pq11kc"))))
5561 (build-system ant-build-system)
5563 `(#:jar-name "mockito.jar"
5564 #:tests? #f ; no tests included
5565 ;; FIXME: patch-and-repack does not support jars, so we have to apply
5566 ;; patches in build phases.
5568 (modify-phases %standard-phases
5569 ;; Mockito was developed against a different version of hamcrest,
5570 ;; which does not require matcher implementations to provide an
5571 ;; implementation of the "describeMismatch" method. We add this
5572 ;; simple definition to pass the build with our version of hamcrest.
5573 (add-after 'unpack 'fix-hamcrest-build-error
5575 (substitute* "src/org/mockito/internal/matchers/LocalizedMatcher.java"
5576 (("public Matcher getActualMatcher\\(\\) .*" line)
5578 public void describeMismatch(Object item, Description description) {
5579 actualMatcher.describeMismatch(item, description);
5583 ;; Mockito bundles cglib. We have a cglib package, so let's use
5585 (add-after 'unpack 'use-system-libraries
5587 (with-directory-excursion "src/org/mockito/internal/creation/cglib"
5588 (substitute* '("CGLIBHacker.java"
5589 "CglibMockMaker.java"
5590 "ClassImposterizer.java"
5591 "DelegatingMockitoMethodProxy.java"
5592 "MethodInterceptorFilter.java"
5593 "MockitoNamingPolicy.java"
5594 "SerializableMockitoMethodProxy.java"
5595 "SerializableNoOp.java")
5596 (("import org.mockito.cglib") "import net.sf.cglib")))
5599 `(("java-junit" ,java-junit)
5600 ("java-objenesis" ,java-objenesis)
5601 ("java-cglib" ,java-cglib)
5602 ("java-hamcrest-core" ,java-hamcrest-core)))
5603 (home-page "http://mockito.org")
5604 (synopsis "Mockito is a mock library for Java")
5605 (description "Mockito is a mocking library for Java which lets you write
5606 tests with a clean and simple API. It generates mocks using reflection, and
5607 it records all mock invocations, including methods arguments.")
5608 (license license:asl2.0)))
5610 (define-public java-httpcomponents-httpcore
5612 (name "java-httpcomponents-httpcore")
5616 (uri (string-append "mirror://apache//httpcomponents/httpcore/"
5617 "source/httpcomponents-core-"
5618 version "-src.tar.gz"))
5621 "02bwcf38y4vgwq7kj2s6q7qrmma641r5lacivm16kgxvb2j6h1vy"))))
5622 (build-system ant-build-system)
5624 `(#:jar-name "httpcomponents-httpcore.jar"
5626 (modify-phases %standard-phases
5627 (add-after 'unpack 'chdir
5628 (lambda _ (chdir "httpcore") #t)))))
5630 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)
5631 ("java-commons-lang3" ,java-commons-lang3)))
5633 `(("java-junit" ,java-junit)
5634 ("java-mockito" ,java-mockito-1)))
5635 (home-page "https://hc.apache.org/httpcomponents-core-4.4.x/index.html")
5636 (synopsis "Low level HTTP transport components")
5637 (description "HttpCore is a set of low level HTTP transport components
5638 that can be used to build custom client and server side HTTP services with a
5639 minimal footprint. HttpCore supports two I/O models: blocking I/O model based
5640 on the classic Java I/O and non-blocking, event driven I/O model based on Java
5643 This package provides the blocking I/O model library.")
5644 (license license:asl2.0)))
5646 (define-public java-httpcomponents-httpcore-nio
5647 (package (inherit java-httpcomponents-httpcore)
5648 (name "java-httpcomponents-httpcore-nio")
5650 `(#:jar-name "httpcomponents-httpcore-nio.jar"
5652 (modify-phases %standard-phases
5653 (add-after 'unpack 'chdir
5654 (lambda _ (chdir "httpcore-nio") #t)))))
5656 `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
5657 ("java-hamcrest-core" ,java-hamcrest-core)
5658 ,@(package-inputs java-httpcomponents-httpcore)))
5659 (description "HttpCore is a set of low level HTTP transport components
5660 that can be used to build custom client and server side HTTP services with a
5661 minimal footprint. HttpCore supports two I/O models: blocking I/O model based
5662 on the classic Java I/O and non-blocking, event driven I/O model based on Java
5665 This package provides the non-blocking I/O model library based on Java
5668 (define-public java-httpcomponents-httpcore-ab
5669 (package (inherit java-httpcomponents-httpcore)
5670 (name "java-httpcomponents-httpcore-ab")
5672 `(#:jar-name "httpcomponents-httpcore-ab.jar"
5674 (modify-phases %standard-phases
5675 (add-after 'unpack 'chdir
5676 (lambda _ (chdir "httpcore-ab") #t)))))
5678 `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
5679 ("java-commons-cli" ,java-commons-cli)
5680 ("java-hamcrest-core" ,java-hamcrest-core)
5681 ,@(package-inputs java-httpcomponents-httpcore)))
5682 (synopsis "Apache HttpCore benchmarking tool")
5683 (description "This package provides the HttpCore benchmarking tool. It is
5684 an Apache AB clone based on HttpCore.")))
5686 (define-public java-httpcomponents-httpclient
5688 (name "java-httpcomponents-httpclient")
5692 (uri (string-append "mirror://apache/httpcomponents/httpclient/"
5693 "source/httpcomponents-client-"
5694 version "-src.tar.gz"))
5697 "1428399s7qy3cim5wc6f3ks4gl9nf9vkjpfmnlap3jflif7g2pj1"))))
5698 (build-system ant-build-system)
5700 `(#:jar-name "httpcomponents-httpclient.jar"
5702 (modify-phases %standard-phases
5703 (add-after 'unpack 'chdir
5704 (lambda _ (chdir "httpclient") #t)))))
5706 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)
5707 ("java-commons-codec" ,java-commons-codec)
5708 ("java-hamcrest-core" ,java-hamcrest-core)
5709 ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
5710 ("java-mockito" ,java-mockito-1)
5711 ("java-junit" ,java-junit)))
5712 (home-page "https://hc.apache.org/httpcomponents-client-ga/")
5713 (synopsis "HTTP client library for Java")
5714 (description "Although the @code{java.net} package provides basic
5715 functionality for accessing resources via HTTP, it doesn't provide the full
5716 flexibility or functionality needed by many applications. @code{HttpClient}
5717 seeks to fill this void by providing an efficient, up-to-date, and
5718 feature-rich package implementing the client side of the most recent HTTP
5719 standards and recommendations.")
5720 (license license:asl2.0)))
5722 (define-public java-httpcomponents-httpmime
5723 (package (inherit java-httpcomponents-httpclient)
5724 (name "java-httpcomponents-httpmime")
5726 `(#:jar-name "httpcomponents-httpmime.jar"
5728 (modify-phases %standard-phases
5729 (add-after 'unpack 'chdir
5730 (lambda _ (chdir "httpmime") #t)))))
5732 `(("java-httpcomponents-httpclient" ,java-httpcomponents-httpclient)
5733 ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
5734 ("java-junit" ,java-junit)
5735 ("java-hamcrest-core" ,java-hamcrest-core)))))
5737 (define-public java-commons-net
5739 (name "java-commons-net")
5743 (uri (string-append "mirror://apache/commons/net/source/"
5744 "commons-net-" version "-src.tar.gz"))
5747 "0n0cmnddk9qdqhjvka8pc6hd9mn2qi3166f1s6xk32h7rfy1adxr"))))
5748 (build-system ant-build-system)
5750 `(;; FIXME: MainTest.java tries to read "examples.properties" (which
5751 ;; should be "resources/examples/examples.properties"), but gets "null"
5754 #:jar-name "commons-net.jar"))
5756 `(("java-junit" ,java-junit)
5757 ("java-hamcrest-core" ,java-hamcrest-core)))
5758 (home-page "https://commons.apache.org/net/")
5759 (synopsis "Client library for many basic Internet protocols")
5760 (description "The Apache Commons Net library implements the client side of
5761 many basic Internet protocols. The purpose of the library is to provide
5762 fundamental protocol access, not higher-level abstractions.")
5763 (license license:asl2.0)))
5765 (define-public java-jsch
5771 (uri (string-append "mirror://sourceforge/jsch/jsch/"
5772 version "/jsch-" version ".zip"))
5775 "1lxyjwvmwa723wcf3bqn816hkvc03vz4xhbsi7bvfhrz2rpgcfq6"))))
5776 (build-system ant-build-system)
5778 `(#:build-target "dist"
5779 #:tests? #f ; no tests included
5781 (modify-phases %standard-phases
5782 (replace 'install (install-jars "dist")))))
5784 `(("unzip" ,unzip)))
5785 (home-page "http://www.jcraft.com/jsch/")
5786 (synopsis "Pure Java implementation of SSH2")
5787 (description "JSch is a pure Java implementation of SSH2. JSch allows you
5788 to connect to an SSH server and use port forwarding, X11 forwarding, file
5789 transfer, etc., and you can integrate its functionality into your own Java
5791 (license license:bsd-3)))
5793 (define-public java-commons-compress
5795 (name "java-commons-compress")
5799 (uri (string-append "mirror://apache/commons/compress/source/"
5800 "commons-compress-" version "-src.tar.gz"))
5803 "1vjqvavrn0babffn1kciz6v52ibwq2vwhzlb95hazis3lgllnxc8"))))
5804 (build-system ant-build-system)
5806 `(#:jar-name "commons-compress.jar"
5808 (modify-phases %standard-phases
5809 (add-after 'unpack 'delete-bad-tests
5811 (with-directory-excursion "src/test/java/org/apache/commons/compress/"
5812 ;; FIXME: These tests really should not fail. Maybe they are
5813 ;; indicative of problems with our Java packaging work.
5815 ;; This test fails with a null pointer exception.
5816 (delete-file "archivers/sevenz/SevenZOutputFileTest.java")
5817 ;; This test fails to open test resources.
5818 (delete-file "archivers/zip/ExplodeSupportTest.java")
5820 ;; FIXME: This test adds a dependency on powermock, which is hard to
5821 ;; package at this point.
5822 ;; https://github.com/powermock/powermock
5823 (delete-file "archivers/sevenz/SevenZNativeHeapTest.java"))
5826 `(("java-junit" ,java-junit)
5827 ("java-hamcrest-core" ,java-hamcrest-core)
5828 ("java-mockito" ,java-mockito-1)
5829 ("java-xz" ,java-xz)))
5830 (home-page "https://commons.apache.org/proper/commons-compress/")
5831 (synopsis "Java library for working with compressed files")
5832 (description "The Apache Commons Compress library defines an API for
5833 working with compressed files such as ar, cpio, Unix dump, tar, zip, gzip, XZ,
5834 Pack200, bzip2, 7z, arj, lzma, snappy, DEFLATE, lz4 and Z files.")
5835 (license license:asl2.0)))
5837 (define-public java-commons-csv
5839 (name "java-commons-csv")
5843 (uri (string-append "mirror://apache/commons/csv/source/"
5844 "commons-csv-" version "-src.tar.gz"))
5847 "1l89m0fm2s3xx3v3iynvangymfg2vlyngaj6fgsi457nmsw7m7ij"))))
5848 (build-system ant-build-system)
5850 `(#:jar-name "commons-csv.jar"
5851 #:source-dir "src/main/java"
5852 #:tests? #f)); FIXME: requires java-h2
5854 `(("java-hamcrest-core" ,java-hamcrest-core)
5855 ("java-commons-io" ,java-commons-io)
5856 ("java-commons-lang3" ,java-commons-lang3)
5857 ("junit" ,java-junit)))
5858 (home-page "https://commons.apache.org/proper/commons-csv/")
5859 (synopsis "Read and write CSV documents")
5860 (description "Commons CSV reads and writes files in variations of the Comma
5861 Separated Value (CSV) format. The most common CSV formats are predefined in the
5865 @item Microsoft Excel
5866 @item Informix UNLOAD
5867 @item Informix UNLOAD CSV
5873 Custom formats can be created using a fluent style API.")
5874 (license license:asl2.0)))
5876 (define-public java-osgi-annotation
5878 (name "java-osgi-annotation")
5882 (uri (string-append "https://repo1.maven.org/maven2/"
5883 "org/osgi/org.osgi.annotation/" version "/"
5884 "org.osgi.annotation-" version "-sources.jar"))
5887 "1q718mb7gqg726rh6pc2hcisn8v50nv35abbir0jypmffhiii85w"))))
5888 (build-system ant-build-system)
5890 `(#:tests? #f ; no tests
5891 #:jar-name "osgi-annotation.jar"))
5892 (home-page "https://www.osgi.org")
5893 (synopsis "Annotation module of OSGi framework")
5895 "OSGi, for Open Services Gateway initiative framework, is a module system
5896 and service platform for the Java programming language. This package contains
5897 the OSGi annotation module, providing additional services to help dynamic
5899 (license license:asl2.0)))
5901 (define-public java-osgi-core
5903 (name "java-osgi-core")
5907 (uri (string-append "https://repo1.maven.org/maven2/"
5908 "org/osgi/org.osgi.core/" version "/"
5909 "org.osgi.core-" version "-sources.jar"))
5912 "19bpf5jx32jq9789gyhin35q5v7flmw0p9mk7wbgqpxqfmxyiabv"))))
5913 (build-system ant-build-system)
5915 `(#:tests? #f ; no tests
5916 #:jar-name "osgi-core.jar"))
5918 `(("java-osgi-annotation" ,java-osgi-annotation)))
5919 (home-page "https://www.osgi.org")
5920 (synopsis "Core module of OSGi framework")
5922 "OSGi, for Open Services Gateway initiative framework, is a module system
5923 and service platform for the Java programming language. This package contains
5924 the OSGi Core module.")
5925 (license license:asl2.0)))
5927 (define-public java-osgi-service-event
5929 (name "java-osgi-service-event")
5933 (uri (string-append "https://repo1.maven.org/maven2/"
5934 "org/osgi/org.osgi.service.event/"
5935 version "/org.osgi.service.event-"
5936 version "-sources.jar"))
5939 "1nyhlgagwym75bycnjczwbnpymv2iw84zbhvvzk84g9q736i6qxm"))))
5940 (build-system ant-build-system)
5942 `(#:tests? #f ; no tests
5943 #:jar-name "osgi-service-event.jar"))
5945 `(("java-osgi-annotation" ,java-osgi-annotation)
5946 ("java-osgi-core" ,java-osgi-core)))
5947 (home-page "https://www.osgi.org")
5948 (synopsis "OSGi service event module")
5950 "OSGi, for Open Services Gateway initiative framework, is a module system
5951 and service platform for the Java programming language. This package contains
5952 the OSGi @code{org.osgi.service.event} module.")
5953 (license license:asl2.0)))
5955 (define-public java-eclipse-osgi
5957 (name "java-eclipse-osgi")
5961 (uri (string-append "https://repo1.maven.org/maven2/"
5962 "org/eclipse/platform/org.eclipse.osgi/"
5963 version "/org.eclipse.osgi-"
5964 version "-sources.jar"))
5967 "00cqc6lb29n0zv68b4l842vzkwawvbr7gshfdygsk8sicvcq2c7b"))))
5968 (build-system ant-build-system)
5970 `(#:tests? #f ; no tests included
5971 #:jar-name "eclipse-equinox-osgi.jar"))
5973 `(("java-osgi-annotation" ,java-osgi-annotation)))
5974 (home-page "http://www.eclipse.org/equinox/")
5975 (synopsis "Eclipse Equinox OSGi framework")
5976 (description "This package provides an implementation of the OSGi Core
5978 (license license:epl1.0)))
5980 (define-public java-eclipse-equinox-common
5982 (name "java-eclipse-equinox-common")
5983 (version "3.10.200")
5986 (uri (string-append "https://repo1.maven.org/maven2/"
5987 "org/eclipse/platform/org.eclipse.equinox.common/"
5988 version "/org.eclipse.equinox.common-"
5989 version "-sources.jar"))
5992 "1yn8ij6xsljlf35sr2l7wvyvc0ss4n1rv0ry5zkgb49dj4hyrqrj"))))
5993 (build-system ant-build-system)
5995 `(#:tests? #f ; no tests included
5996 #:jar-name "eclipse-equinox-common.jar"))
5998 `(("java-eclipse-osgi" ,java-eclipse-osgi)))
5999 (home-page "http://www.eclipse.org/equinox/")
6000 (synopsis "Common Eclipse runtime")
6001 (description "This package provides the common Eclipse runtime.")
6002 (license license:epl1.0)))
6004 (define-public java-eclipse-core-jobs
6006 (name "java-eclipse-core-jobs")
6010 (uri (string-append "https://repo1.maven.org/maven2/"
6011 "org/eclipse/platform/org.eclipse.core.jobs/"
6012 version "/org.eclipse.core.jobs-"
6013 version "-sources.jar"))
6016 "0395b8lh0km8vhzjnchvs1rii1qz48hyvb2wqfaq4yhklbwihq4b"))))
6017 (build-system ant-build-system)
6019 `(#:tests? #f ; no tests included
6020 #:jar-name "eclipse-core-jobs.jar"))
6022 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6023 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6024 (home-page "http://www.eclipse.org/equinox/")
6025 (synopsis "Eclipse jobs mechanism")
6026 (description "This package provides the Eclipse jobs mechanism.")
6027 (license license:epl1.0)))
6029 (define-public java-eclipse-equinox-registry
6031 (name "java-eclipse-equinox-registry")
6035 (uri (string-append "https://repo1.maven.org/maven2/"
6036 "org/eclipse/platform/org.eclipse.equinox.registry/"
6037 version "/org.eclipse.equinox.registry-"
6038 version "-sources.jar"))
6041 "1i9sgymh2fy5vdgk5y7s3qvrlbgh4l93ddqi3v4zmca7hwrlhf9k"))))
6042 (build-system ant-build-system)
6044 `(#:tests? #f ; no tests included
6045 #:jar-name "eclipse-equinox-registry.jar"))
6047 `(("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
6048 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6049 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6050 (home-page "http://www.eclipse.org/equinox/")
6051 (synopsis "Eclipse extension registry support")
6052 (description "This package provides support for the Eclipse extension
6054 (license license:epl1.0)))
6056 (define-public java-eclipse-equinox-app
6058 (name "java-eclipse-equinox-app")
6062 (uri (string-append "https://repo1.maven.org/maven2/"
6063 "org/eclipse/platform/org.eclipse.equinox.app/"
6064 version "/org.eclipse.equinox.app-"
6065 version "-sources.jar"))
6068 "0nhvbp93y203ar7y59gb0mz3w2d3jlqhr0c9hii9bcfpmr7imdab"))))
6069 (build-system ant-build-system)
6071 `(#:tests? #f ; no tests included
6072 #:jar-name "eclipse-equinox-app.jar"))
6074 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6075 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6076 ("java-eclipse-osgi" ,java-eclipse-osgi)
6077 ("java-osgi-service-event" ,java-osgi-service-event)))
6078 (home-page "http://www.eclipse.org/equinox/")
6079 (synopsis "Equinox application container")
6080 (description "This package provides the Equinox application container for
6082 (license license:epl1.0)))
6084 (define-public java-eclipse-equinox-preferences
6086 (name "java-eclipse-equinox-preferences")
6090 (uri (string-append "https://repo1.maven.org/maven2/"
6091 "org/eclipse/platform/org.eclipse.equinox.preferences/"
6092 version "/org.eclipse.equinox.preferences-"
6093 version "-sources.jar"))
6096 "0k7w6c141sqym4fy3af0qkwpy4pdh2vsjpjba6rp5fxyqa24v0a2"))))
6097 (build-system ant-build-system)
6099 `(#:tests? #f ; no tests included
6100 #:jar-name "eclipse-equinox-preferences.jar"))
6102 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6103 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6104 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6105 (home-page "http://www.eclipse.org/equinox/")
6106 (synopsis "Eclipse preferences mechanism")
6107 (description "This package provides the Eclipse preferences mechanism with
6108 the module @code{org.eclipse.equinox.preferences}.")
6109 (license license:epl1.0)))
6111 (define-public java-eclipse-core-contenttype
6113 (name "java-eclipse-core-contenttype")
6117 (uri (string-append "https://repo1.maven.org/maven2/"
6118 "org/eclipse/platform/org.eclipse.core.contenttype/"
6119 version "/org.eclipse.core.contenttype-"
6120 version "-sources.jar"))
6123 "1wcqcv7ijwv5rh748vz3x9pkmjl9w1r0k0026k56n8yjl4rrmspi"))))
6124 (build-system ant-build-system)
6126 `(#:tests? #f ; no tests included
6127 #:jar-name "eclipse-core-contenttype.jar"))
6129 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6130 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6131 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6132 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6133 (home-page "http://www.eclipse.org/")
6134 (synopsis "Eclipse content mechanism")
6135 (description "This package provides the Eclipse content mechanism in the
6136 @code{org.eclipse.core.contenttype} module.")
6137 (license license:epl1.0)))
6139 (define-public java-eclipse-core-runtime
6141 (name "java-eclipse-core-runtime")
6142 (version "3.15.100")
6145 (uri (string-append "https://repo1.maven.org/maven2/"
6146 "org/eclipse/platform/org.eclipse.core.runtime/"
6147 version "/org.eclipse.core.runtime-"
6148 version "-sources.jar"))
6151 "0l8xayacsbjvz5hypx2fv47vpw2n4dspamcfb3hx30x9hj8vmg7r"))))
6152 (build-system ant-build-system)
6154 `(#:tests? #f ; no tests included
6155 #:jar-name "eclipse-core-runtime.jar"))
6157 `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
6158 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
6159 ("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
6160 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6161 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6162 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6163 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6164 (home-page "https://www.eclipse.org/")
6165 (synopsis "Eclipse core runtime")
6166 (description "This package provides the Eclipse core runtime with the
6167 module @code{org.eclipse.core.runtime}.")
6168 (license license:epl1.0)))
6170 (define-public java-eclipse-core-filesystem
6172 (name "java-eclipse-core-filesystem")
6176 (uri (string-append "https://repo1.maven.org/maven2/"
6177 "org/eclipse/platform/org.eclipse.core.filesystem/"
6178 version "/org.eclipse.core.filesystem-"
6179 version "-sources.jar"))
6182 "0km1bhwjim4rfy3pkvjhvy31kgsyf2ncx0mlkmbf5n6g57pphdyj"))))
6183 (build-system ant-build-system)
6185 `(#:tests? #f ; no tests included
6186 #:jar-name "eclipse-core-filesystem.jar"))
6188 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6189 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6190 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6191 (home-page "https://www.eclipse.org/")
6192 (synopsis "Eclipse core file system")
6193 (description "This package provides the Eclipse core file system with the
6194 module @code{org.eclipse.core.filesystem}.")
6195 (license license:epl1.0)))
6197 (define-public java-eclipse-core-expressions
6199 (name "java-eclipse-core-expressions")
6203 (uri (string-append "https://repo1.maven.org/maven2/"
6204 "org/eclipse/platform/org.eclipse.core.expressions/"
6205 version "/org.eclipse.core.expressions-"
6206 version "-sources.jar"))
6209 "18bw2l875gmygvpagpgk9l24qzbdjia4ag12nw6fi8v8yaq4987f"))))
6210 (build-system ant-build-system)
6212 `(#:tests? #f ; no tests included
6213 #:jar-name "eclipse-core-expressions.jar"))
6215 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6216 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6217 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6218 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
6219 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6220 (home-page "https://www.eclipse.org/")
6221 (synopsis "Eclipse core expression language")
6222 (description "This package provides the Eclipse core expression language
6223 with the @code{org.eclipse.core.expressions} module.")
6224 (license license:epl1.0)))
6226 (define-public java-eclipse-core-variables
6228 (name "java-eclipse-core-variables")
6232 (uri (string-append "https://repo1.maven.org/maven2/"
6233 "org/eclipse/platform/org.eclipse.core.variables/"
6234 version "/org.eclipse.core.variables-"
6235 version "-sources.jar"))
6238 "12dirh03zi4n5x5cj07vzrhkmnqy6h9q10h9j605pagmpmifyxmy"))))
6239 (build-system ant-build-system)
6241 `(#:tests? #f ; no tests included
6242 #:jar-name "eclipse-core-variables.jar"))
6244 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6245 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6246 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6247 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
6248 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6249 (home-page "https://www.eclipse.org/platform")
6250 (synopsis "Eclipse core variables")
6251 (description "This package provides the Eclipse core variables module
6252 @code{org.eclipse.core.variables}.")
6253 (license license:epl1.0)))
6255 (define-public java-eclipse-ant-core
6257 (name "java-eclipse-ant-core")
6261 (uri (string-append "https://repo1.maven.org/maven2/"
6262 "org/eclipse/platform/org.eclipse.ant.core/"
6263 version "/org.eclipse.ant.core-"
6264 version "-sources.jar"))
6267 "11g3if794qjlk98mz9zch22rr56sd7z63vn4i7k2icr8cq5bfqg7"))))
6268 (build-system ant-build-system)
6270 `(#:tests? #f ; no tests included
6271 #:jar-name "eclipse-ant-core.jar"))
6273 `(("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
6274 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6275 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6276 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6277 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
6278 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
6279 ("java-eclipse-core-variables" ,java-eclipse-core-variables)
6280 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6281 (home-page "https://www.eclipse.org/platform")
6282 (synopsis "Ant build tool core libraries")
6283 (description "This package provides the ant build tool core libraries with
6284 the module @code{org.eclipse.ant.core}.")
6285 (license license:epl1.0)))
6287 (define-public java-eclipse-core-resources
6289 (name "java-eclipse-core-resources")
6290 (version "3.13.200")
6293 (uri (string-append "https://repo1.maven.org/maven2/"
6294 "org/eclipse/platform/org.eclipse.core.resources/"
6295 version "/org.eclipse.core.resources-"
6296 version "-sources.jar"))
6299 "1sn3b6ky72hkvxcgf9b2jkpbdh3y8lbhi9xxwv1dsiddpkkq91hs"))))
6300 (build-system ant-build-system)
6302 `(#:tests? #f ; no tests included
6303 #:jar-name "eclipse-core-resources.jar"))
6305 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6306 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6307 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6308 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
6309 ("java-eclipse-core-expressions" ,java-eclipse-core-expressions)
6310 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
6311 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
6312 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
6313 ("java-eclipse-ant-core" ,java-eclipse-ant-core)
6314 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6315 (home-page "https://www.eclipse.org/")
6316 (synopsis "Eclipse core resource management")
6317 (description "This package provides the Eclipse core resource management
6318 module @code{org.eclipse.core.resources}.")
6319 (license license:epl1.0)))
6321 (define-public java-eclipse-compare-core
6323 (name "java-eclipse-compare-core")
6327 (uri (string-append "https://repo1.maven.org/maven2/"
6328 "org/eclipse/platform/org.eclipse.compare.core/"
6329 version "/org.eclipse.compare.core-"
6330 version "-sources.jar"))
6333 "10g37r0pbiffyv2wk35c6g5lwzkdipkl0kkjp41v84dln46xm4dg"))))
6334 (build-system ant-build-system)
6336 `(#:tests? #f ; no tests included
6337 #:jar-name "eclipse-compare-core.jar"))
6339 `(("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
6340 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6341 ("java-eclipse-osgi" ,java-eclipse-osgi)
6342 ("java-icu4j" ,java-icu4j)))
6343 (home-page "https://www.eclipse.org/")
6344 (synopsis "Eclipse core compare support")
6345 (description "This package provides the Eclipse core compare support
6346 module @code{org.eclipse.compare.core}.")
6347 (license license:epl1.0)))
6349 (define-public java-eclipse-team-core
6351 (name "java-eclipse-team-core")
6355 (uri (string-append "https://repo1.maven.org/maven2/"
6356 "org/eclipse/platform/org.eclipse.team.core/"
6357 version "/org.eclipse.team.core-"
6358 version "-sources.jar"))
6361 "02j2jzqgb26zx2d5ahxmvijw6j4r0la90zl5c3i65x6z19ciyam7"))))
6362 (build-system ant-build-system)
6364 `(#:tests? #f ; no tests included
6365 #:jar-name "eclipse-team-core.jar"))
6367 `(("java-eclipse-compare-core" ,java-eclipse-compare-core)
6368 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
6369 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
6370 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
6371 ("java-eclipse-core-resources" ,java-eclipse-core-resources)
6372 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
6373 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6374 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6375 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6376 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6377 (home-page "https://www.eclipse.org/platform")
6378 (synopsis "Eclipse team support core")
6379 (description "This package provides the Eclipse team support core module
6380 @code{org.eclipse.team.core}.")
6381 (license license:epl1.0)))
6383 (define-public java-eclipse-core-commands
6385 (name "java-eclipse-core-commands")
6389 (uri (string-append "https://repo1.maven.org/maven2/"
6390 "org/eclipse/platform/org.eclipse.core.commands/"
6391 version "/org.eclipse.core.commands-"
6392 version "-sources.jar"))
6395 "0yjn482qndcfrsq3jd6vnhcylp16420f5aqkrwr8spsprjigjcr9"))))
6396 (build-system ant-build-system)
6398 `(#:tests? #f ; no tests included
6399 #:jar-name "eclipse-core-commands.jar"))
6401 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)))
6402 (home-page "https://www.eclipse.org/platform")
6403 (synopsis "Eclipse core commands")
6404 (description "This package provides Eclipse core commands in the module
6405 @code{org.eclipse.core.commands}.")
6406 (license license:epl1.0)))
6408 (define-public java-eclipse-text
6410 (name "java-eclipse-text")
6414 (uri (string-append "https://repo1.maven.org/maven2/"
6415 "org/eclipse/platform/org.eclipse.text/"
6416 version "/org.eclipse.text-"
6417 version "-sources.jar"))
6420 "0scz70vzz5qs5caji9f5q01vkqnvip7dpri1q07l8wbbdcxn4cq1"))))
6421 (build-system ant-build-system)
6423 `(#:tests? #f ; no tests included
6424 #:jar-name "eclipse-text.jar"
6426 (modify-phases %standard-phases
6427 ;; When creating a new category we must make sure that the new list
6428 ;; matches List<Position>. By default it seems to be too generic
6429 ;; (ArrayList<Object>), so we specialize it to ArrayList<Position>.
6430 ;; Without this we get this error:
6432 ;; [javac] .../src/org/eclipse/jface/text/AbstractDocument.java:376:
6433 ;; error: method put in interface Map<K,V> cannot be applied to given types;
6434 ;; [javac] fPositions.put(category, new ArrayList<>());
6436 ;; [javac] required: String,List<Position>
6437 ;; [javac] found: String,ArrayList<Object>
6438 ;; [javac] reason: actual argument ArrayList<Object> cannot be converted
6439 ;; to List<Position> by method invocation conversion
6440 ;; [javac] where K,V are type-variables:
6441 ;; [javac] K extends Object declared in interface Map
6442 ;; [javac] V extends Object declared in interface Map
6444 ;; I don't know if this is a good fix. I suspect it is not, but it
6446 (add-after 'unpack 'fix-compilation-error
6448 (substitute* "src/org/eclipse/jface/text/AbstractDocument.java"
6449 (("Positions.put\\(category, new ArrayList<>\\(\\)\\);")
6450 "Positions.put(category, new ArrayList<Position>());"))
6453 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6454 ("java-eclipse-core-commands" ,java-eclipse-core-commands)
6455 ("java-icu4j" ,java-icu4j)))
6456 (home-page "http://www.eclipse.org/platform")
6457 (synopsis "Eclipse text library")
6458 (description "Platform Text is part of the Platform UI project and
6459 provides the basic building blocks for text and text editors within Eclipse
6460 and contributes the Eclipse default text editor.")
6461 (license license:epl1.0)))
6463 (define-public java-eclipse-jdt-core
6465 (name "java-eclipse-jdt-core")
6469 (uri (string-append "https://repo1.maven.org/maven2/"
6470 "org/eclipse/jdt/org.eclipse.jdt.core/"
6471 version "/org.eclipse.jdt.core-"
6472 version "-sources.jar"))
6475 "1g560yr9v2kzv34gc2m3ifpgnj7krcdd6h4gd4z83pwqacwkfz0k"))))
6476 (build-system ant-build-system)
6478 `(#:tests? #f ; no tests included
6479 #:jar-name "eclipse-jdt-core.jar"
6481 (modify-phases %standard-phases
6482 (add-after 'unpack 'move-sources
6484 (with-directory-excursion "src/jdtCompilerAdaptersrc/"
6485 (for-each (lambda (file)
6486 (install-file file (string-append "../" (dirname file))))
6487 (find-files "." ".*")))
6488 (delete-file-recursively "src/jdtCompilerAdaptersrc/")
6490 (add-before 'build 'copy-resources
6492 (with-directory-excursion "src"
6493 (for-each (lambda (file)
6494 (install-file file (string-append "../build/classes/" (dirname file))))
6495 (find-files "." ".*.(props|properties|rsc)")))
6498 `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
6499 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
6500 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
6501 ("java-eclipse-core-resources" ,java-eclipse-core-resources)
6502 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
6503 ("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
6504 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6505 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6506 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6507 ("java-eclipse-osgi" ,java-eclipse-osgi)
6508 ("java-eclipse-text" ,java-eclipse-text)))
6509 (home-page "https://www.eclipse.org/jdt")
6510 (synopsis "Java development tools core libraries")
6511 (description "This package provides the core libraries of the Eclipse Java
6512 development tools.")
6513 (license license:epl1.0)))
6515 (define-public java-eclipse-jdt-compiler-apt
6517 (name "java-eclipse-jdt-compiler-apt")
6521 (uri (string-append "https://repo1.maven.org/maven2/"
6522 "org/eclipse/jdt/org.eclipse.jdt.compiler.apt/"
6523 version "/org.eclipse.jdt.compiler.apt-"
6524 version "-sources.jar"))
6527 "1s285k9p2ixdqrknb40jbbvw682n9a7l5lqpn583a8pvlzg2l6r8"))))
6528 (build-system ant-build-system)
6530 `(#:tests? #f ; no tests included
6531 #:jar-name "eclipse-jdt-compiler-apt.jar"
6534 `(("java-eclipse-jdt-core" ,java-eclipse-jdt-core)))
6535 (home-page "https://www.eclipse.org/jdt/apt/")
6536 (synopsis "Annotation processing tool")
6537 (description "APT stands for Annotation Processing Tool. APT provides a
6538 means for generating files and compiling new Java classes based on annotations
6539 found in your source code.")
6540 (license license:epl2.0)))
6542 (define-public java-javax-mail
6544 (name "java-javax-mail")
6548 (uri (string-append "https://repo1.maven.org/maven2/"
6549 "com/sun/mail/javax.mail/"
6550 version "/javax.mail-"
6551 version "-sources.jar"))
6554 "0sdlfgsc2b5s89xv1261y8i0jijcja019k2x1c8ngfn582w4jly9"))))
6555 (build-system ant-build-system)
6557 `(#:tests? #f ; no tests
6558 #:jar-name "javax-mail.jar"))
6559 (home-page "https://javamail.java.net")
6560 (synopsis "Reference implementation of the JavaMail API")
6562 "This package provides versions of the JavaMail API implementation, IMAP,
6563 SMTP, and POP3 service providers, some examples, and documentation for the
6565 ;; GPLv2 only with "classpath exception".
6566 (license license:gpl2)))
6568 (define-public java-log4j-api
6570 (name "java-log4j-api")
6574 (uri (string-append "mirror://apache/logging/log4j/" version
6575 "/apache-log4j-" version "-src.tar.gz"))
6578 "0j5p9gik0jysh37nlrckqbky12isy95cpwg2gv5fas1rcdqbraxd"))))
6579 (build-system ant-build-system)
6581 `(#:tests? #f ; tests require unpackaged software
6582 #:jar-name "log4j-api.jar"
6584 (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out")
6587 (modify-phases %standard-phases
6588 (add-after 'unpack 'enter-dir
6589 (lambda _ (chdir "log4j-api") #t))
6590 ;; FIXME: The tests require additional software that has not been
6591 ;; packaged yet, such as
6592 ;; * org.apache.maven
6593 ;; * org.apache.felix
6594 (add-after 'enter-dir 'delete-tests
6595 (lambda _ (delete-file-recursively "src/test") #t)))))
6597 `(("java-osgi-core" ,java-osgi-core)
6598 ("java-hamcrest-core" ,java-hamcrest-core)
6599 ("java-junit" ,java-junit)))
6600 (home-page "https://logging.apache.org/log4j/2.x/")
6601 (synopsis "API module of the Log4j logging framework for Java")
6603 "This package provides the API module of the Log4j logging framework for
6605 (license license:asl2.0)))
6607 (define-public java-log4j-core
6609 (inherit java-log4j-api)
6610 (name "java-log4j-core")
6612 `(("java-osgi-core" ,java-osgi-core)
6613 ("java-hamcrest-core" ,java-hamcrest-core)
6614 ("java-log4j-api" ,java-log4j-api)
6615 ("java-mail" ,java-mail)
6616 ("java-jboss-jms-api-spec" ,java-jboss-jms-api-spec)
6617 ("java-lmax-disruptor" ,java-lmax-disruptor)
6618 ("java-kafka" ,java-kafka-clients)
6619 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
6620 ("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
6621 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
6622 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)
6623 ("java-fasterxml-jackson-dataformat-xml" ,java-fasterxml-jackson-dataformat-xml)
6624 ("java-fasterxml-jackson-dataformat-yaml" ,java-fasterxml-jackson-dataformat-yaml)
6625 ("java-commons-compress" ,java-commons-compress)
6626 ("java-commons-csv" ,java-commons-csv)
6627 ("java-jeromq" ,java-jeromq)
6628 ("java-junit" ,java-junit)))
6630 `(("hamcrest" ,java-hamcrest-all)
6631 ("java-commons-io" ,java-commons-io)
6632 ("java-commons-lang3" ,java-commons-lang3)
6633 ("slf4j" ,java-slf4j-api)))
6635 `(#:tests? #f ; tests require more dependencies
6636 #:test-dir "src/test"
6637 #:source-dir "src/main/java"
6638 #:jar-name "log4j-core.jar"
6641 (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out")
6644 (modify-phases %standard-phases
6645 (add-after 'unpack 'enter-dir
6646 (lambda _ (chdir "log4j-core") #t)))))
6647 (synopsis "Core component of the Log4j framework")
6648 (description "This package provides the core component of the Log4j
6649 logging framework for Java.")))
6651 (define-public java-log4j-1.2-api
6653 (inherit java-log4j-api)
6654 (name "java-log4j-1.2-api")
6656 `(#:jar-name "java-log4j-1.2-api.jar"
6657 #:source-dir "log4j-1.2-api/src/main/java"
6659 ;; Tests require maven-model (and other maven subprojects), which is a
6660 ;; cyclic dependency.
6663 `(("log4j-api" ,java-log4j-api)
6664 ("log4j-core" ,java-log4j-core)
6665 ("osgi-core" ,java-osgi-core)
6666 ("eclipse-osgi" ,java-eclipse-osgi)
6667 ("java-lmax-disruptor" ,java-lmax-disruptor)))))
6669 (define-public java-commons-cli
6671 (name "java-commons-cli")
6675 (uri (string-append "mirror://apache/commons/cli/source/"
6676 "commons-cli-" version "-src.tar.gz"))
6679 "05hgi2z01fqz374y719gl1dxzqvzci5af071zm7vxrjg9vczipm1"))))
6680 (build-system ant-build-system)
6683 `(#:jar-name "commons-cli.jar"))
6685 `(("java-junit" ,java-junit)
6686 ("java-hamcrest-core" ,java-hamcrest-core)))
6687 (home-page "https://commons.apache.org/cli/")
6688 (synopsis "Command line arguments and options parsing library")
6689 (description "The Apache Commons CLI library provides an API for parsing
6690 command line options passed to programs. It is also able to print help
6691 messages detailing the options available for a command line tool.
6693 Commons CLI supports different types of options:
6696 @item POSIX like options (ie. tar -zxvf foo.tar.gz)
6697 @item GNU like long options (ie. du --human-readable --max-depth=1)
6698 @item Java like properties (ie. java -Djava.awt.headless=true Foo)
6699 @item Short options with value attached (ie. gcc -O2 foo.c)
6700 @item long options with single hyphen (ie. ant -projecthelp)
6703 This is a part of the Apache Commons Project.")
6704 (license license:asl2.0)))
6706 (define-public java-commons-codec
6708 (name "java-commons-codec")
6712 (uri (string-append "mirror://apache/commons/codec/source/"
6713 "commons-codec-" version "-src.tar.gz"))
6716 "1w9qg30y4s0x8gnmr2fgj4lyplfn788jqxbcz27lf5kbr6n8xr65"))))
6717 (build-system ant-build-system)
6718 (outputs '("out" "doc"))
6720 `(#:test-target "test"
6722 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
6723 (junit (assoc-ref %build-inputs "java-junit")))
6724 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
6725 (string-append "-Dhamcrest.jar=" hamcrest
6726 "/share/java/hamcrest-core.jar")
6727 ;; Do not append version to jar.
6728 "-Dfinal.name=commons-codec"))
6730 (modify-phases %standard-phases
6731 (add-after 'build 'build-javadoc ant-build-javadoc)
6732 (replace 'install (install-jars "dist"))
6733 (add-after 'install 'install-doc (install-javadoc "dist/docs/api")))))
6735 `(("java-junit" ,java-junit)
6736 ("java-hamcrest-core" ,java-hamcrest-core)))
6737 (home-page "https://commons.apache.org/codec/")
6738 (synopsis "Common encoders and decoders such as Base64, Hex, Phonetic and URLs")
6739 (description "The codec package contains simple encoder and decoders for
6740 various formats such as Base64 and Hexadecimal. In addition to these widely
6741 used encoders and decoders, the codec package also maintains a collection of
6742 phonetic encoding utilities.
6744 This is a part of the Apache Commons Project.")
6745 (license license:asl2.0)))
6747 (define-public java-commons-daemon
6749 (name "java-commons-daemon")
6753 (uri (string-append "mirror://apache/commons/daemon/source/"
6754 "commons-daemon-" version "-src.tar.gz"))
6757 "141gkhfzv5v3pdhic6y4ardq2dhsa3v36j8wmmhy6f8mac48fp7n"))))
6758 (build-system ant-build-system)
6760 `(#:test-target "test"
6762 (modify-phases %standard-phases
6763 (add-after 'build 'build-javadoc ant-build-javadoc)
6764 (replace 'install (install-jars "dist"))
6765 (add-after 'install 'install-doc (install-javadoc "dist/docs/api")))))
6767 `(("java-junit" ,java-junit)))
6768 (home-page "https://commons.apache.org/daemon/")
6769 (synopsis "Library to launch Java applications as daemons")
6770 (description "The Daemon package from Apache Commons can be used to
6771 implement Java applications which can be launched as daemons. For example the
6772 program will be notified about a shutdown so that it can perform cleanup tasks
6773 before its process of execution is destroyed by the operation system.
6775 This package contains the Java library. You will also need the actual binary
6776 for your architecture which is provided by the jsvc package.
6778 This is a part of the Apache Commons Project.")
6779 (license license:asl2.0)))
6781 (define-public java-javaewah
6783 (name "java-javaewah")
6788 (url "https://github.com/lemire/javaewah/")
6789 (commit (string-append "JavaEWAH-" version))))
6790 (file-name (git-file-name name version))
6793 "1m8qcb1py76v7avbjjrkvyy6fhr5dk2ywy73gbsxqry04gkm2nhw"))))
6794 (build-system ant-build-system)
6795 (arguments `(#:jar-name "javaewah.jar"))
6797 `(("java-junit" ,java-junit)
6798 ("java-hamcrest-core" ,java-hamcrest-core)))
6799 (home-page "https://github.com/lemire/javaewah")
6800 (synopsis "Compressed alternative to the Java @code{BitSet} class")
6801 (description "This is a word-aligned compressed variant of the Java
6802 @code{Bitset} class. It provides both a 64-bit and a 32-bit RLE-like
6803 compression scheme. It can be used to implement bitmap indexes.
6805 The goal of word-aligned compression is not to achieve the best compression,
6806 but rather to improve query processing time. Hence, JavaEWAH tries to save CPU
6807 cycles, maybe at the expense of storage. However, the EWAH scheme is always
6808 more efficient storage-wise than an uncompressed bitmap (as implemented in the
6809 @code{BitSet} class by Sun).")
6810 ;; GPL2.0 derivates are explicitly allowed.
6811 (license license:asl2.0)))
6813 (define-public java-slf4j-api
6815 (name "java-slf4j-api")
6819 (uri (string-append "https://www.slf4j.org/dist/slf4j-"
6823 "13j51sgzmhhdrfa74gkal5zpip7r1440dh7zsi2c8bpb2zs1v8kb"))
6824 (modules '((guix build utils)))
6825 ;; Delete bundled jars.
6828 (for-each delete-file (find-files "." "\\.jar$"))
6830 (build-system ant-build-system)
6832 `(#:jar-name "slf4j-api.jar"
6833 #:source-dir "slf4j-api/src/main"
6834 #:test-dir "slf4j-api/src/test"
6836 (modify-phases %standard-phases
6837 (add-after 'build 'regenerate-jar
6839 ;; pom.xml ignores these files in the jar creation process. If we don't,
6840 ;; we get the error "This code should have never made it into slf4j-api.jar"
6841 (delete-file-recursively "build/classes/org/slf4j/impl")
6842 (invoke "jar" "-cf" "build/jar/slf4j-api.jar" "-C"
6843 "build/classes" ".")))
6844 (add-before 'check 'dont-test-abstract-classes
6846 ;; abstract classes are not meant to be run with junit
6847 (substitute* "build.xml"
6848 (("<include name=\"\\*\\*/\\*Test.java\" />")
6849 (string-append "<include name=\"**/*Test.java\" />"
6850 "<exclude name=\"**/MultithreadedInitializationTest"
6854 `(("java-junit" ,java-junit)
6855 ("java-hamcrest-core" ,java-hamcrest-core)))
6856 (home-page "https://www.slf4j.org/")
6857 (synopsis "Simple logging facade for Java")
6858 (description "The Simple Logging Facade for Java (SLF4J) serves as a
6859 simple facade or abstraction for various logging
6860 frameworks (e.g. @code{java.util.logging}, @code{logback}, @code{log4j})
6861 allowing the end user to plug in the desired logging framework at deployment
6863 (license license:expat)))
6865 (define java-slf4j-api-bootstrap
6867 (inherit java-slf4j-api)
6868 (name "java-slf4j-api-bootstrap")
6871 (substitute-keyword-arguments (package-arguments java-slf4j-api)
6872 ((#:tests? _ #f) #f)))))
6874 (define-public java-slf4j-simple
6876 (name "java-slf4j-simple")
6878 (source (package-source java-slf4j-api))
6879 (build-system ant-build-system)
6881 `(#:jar-name "slf4j-simple.jar"
6882 #:source-dir "slf4j-simple/src/main"
6883 #:test-dir "slf4j-simple/src/test"
6885 (modify-phases %standard-phases
6886 ;; The tests need some test classes from slf4j-api
6887 (add-before 'check 'build-slf4j-api-test-helpers
6889 ;; Add current dir to CLASSPATH ...
6891 (string-append (getcwd) ":" (getenv "CLASSPATH")))
6892 ;; ... and build test helper classes here:
6895 ,@(find-files "slf4j-api/src/test" ".*\\.java"))))))))
6897 `(("java-junit" ,java-junit)
6898 ("java-hamcrest-core" ,java-hamcrest-core)
6899 ("java-slf4j-api" ,java-slf4j-api)))
6900 (home-page "https://www.slf4j.org/")
6901 (synopsis "Simple implementation of simple logging facade for Java")
6902 (description "SLF4J binding for the Simple implementation, which outputs
6903 all events to System.err. Only messages of level INFO and higher are
6905 (license license:expat)))
6907 (define-public antlr2
6913 (uri (string-append "https://www.antlr2.org/download/antlr-"
6917 "1ffvcwdw73id0dk6pj2mlxjvbg0662qacx4ylayqcxgg381fnfl5"))
6918 (modules '((guix build utils)))
6921 (delete-file "antlr.jar")
6922 (substitute* "lib/cpp/antlr/CharScanner.hpp"
6926 "#define EOF (-1)\n"
6927 "#include <strings.h>")))
6928 (substitute* "configure"
6931 (build-system gnu-build-system)
6933 `(#:tests? #f ; no test target
6934 #:imported-modules ((guix build ant-build-system)
6935 (guix build syscalls)
6936 ,@%gnu-build-system-modules)
6937 #:modules (((guix build ant-build-system) #:prefix ant:)
6938 (guix build gnu-build-system)
6941 (modify-phases %standard-phases
6942 (add-after 'install 'strip-jar-timestamps
6943 (assoc-ref ant:%standard-phases 'strip-jar-timestamps))
6944 (add-before 'configure 'fix-timestamp
6946 (substitute* "configure"
6947 (("^TIMESTAMP.*") "TIMESTAMP=19700101\n"))
6949 (add-after 'configure 'fix-bin-ls
6951 (substitute* (find-files "." "Makefile")
6957 ("java" ,icedtea "jdk")))
6959 `(("java" ,icedtea)))
6960 (home-page "https://www.antlr2.org")
6961 (synopsis "Framework for constructing recognizers, compilers, and translators")
6962 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
6963 is a language tool that provides a framework for constructing recognizers,
6964 compilers, and translators from grammatical descriptions containing Java, C#,
6965 C++, or Python actions. ANTLR provides excellent support for tree construction,
6966 tree walking, and translation.")
6967 (license license:public-domain)))
6969 (define-public java-stringtemplate-3
6971 (name "java-stringtemplate")
6975 (uri (string-append "https://github.com/antlr/website-st4/raw/"
6976 "gh-pages/download/stringtemplate-"
6980 "086yj68np1vqhkj7483diz3km6s6y4gmwqswa7524a0ca6vxn2is"))))
6981 (build-system ant-build-system)
6983 `(#:jar-name (string-append ,name "-" ,version ".jar")
6985 #:modules ((guix build ant-build-system)
6989 (modify-phases %standard-phases
6990 (add-before 'check 'fix-tests
6992 (substitute* "build.xml"
6993 (("\\$\\{test.home\\}/java")
6994 "${test.home}/org"))
6996 (add-before 'build 'generate-grammar
6998 (with-directory-excursion "src/org/antlr/stringtemplate/language/"
6999 (for-each (lambda (file)
7000 (format #t "~a\n" file)
7001 (invoke "antlr" file))
7002 '("template.g" "angle.bracket.template.g" "action.g"
7003 "eval.g" "group.g" "interface.g")))
7007 ("java-junit" ,java-junit)))
7008 (home-page "https://www.stringtemplate.org")
7009 (synopsis "Template engine to generate formatted text output")
7010 (description "StringTemplate is a java template engine (with ports for C#,
7011 Objective-C, JavaScript, Scala) for generating source code, web pages, emails,
7012 or any other formatted text output. StringTemplate is particularly good at
7013 code generators, multiple site skins, and internationalization / localization.
7014 StringTemplate also powers ANTLR.")
7015 (license license:bsd-3)))
7017 ;; antlr3 is partially written using antlr3 grammar files. It also depends on
7018 ;; ST4 (stringtemplate4), which is also partially written using antlr3 grammar
7019 ;; files and uses antlr3 at runtime. The latest version requires a recent version
7020 ;; of antlr3 at runtime.
7021 ;; Fortunately, ST4 4.0.6 can be built with an older antlr3, and we use antlr3.3.
7022 ;; This version of ST4 is sufficient for the latest antlr3.
7023 ;; We use ST4 4.0.6 to build a boostrap antlr3 (latest version), and build
7024 ;; the latest ST4 with it. Then we build our final antlr3 that will be linked
7025 ;; against the latest ST4.
7026 ;; antlr3.3 still depends on antlr3 to generate some files, so we use an
7027 ;; even older version, antlr3.1, to generate them. Fortunately antlr3.1 uses
7028 ;; only grammar files with the antlr2 syntax.
7029 ;; So we build antlr3.1 -> antlr3.3 -> ST4.0.6 -> antlr3-bootstrap -> ST4 -> antlr3.
7031 (define-public java-stringtemplate
7032 (package (inherit java-stringtemplate-3)
7033 (name "java-stringtemplate")
7037 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/"
7039 (file-name (string-append name "-" version ".tar.gz"))
7042 "1pri8hqa95rfdkjy55icl5q1m09zwp5k67ib14abas39s4v3w087"))))
7043 (build-system ant-build-system)
7045 `(#:jar-name (string-append ,name "-" ,version ".jar")
7046 #:tests? #f ; FIXME: tests fail for unknown reasons
7048 #:modules ((guix build ant-build-system)
7052 (modify-phases %standard-phases
7053 (add-before 'check 'fix-test-target
7055 (substitute* "build.xml"
7056 (("\\$\\{test.home\\}/java") "${test.home}/")
7057 (("\\*Test.java") "Test*.java"))
7059 (add-before 'build 'generate-grammar
7061 (with-directory-excursion "src/org/stringtemplate/v4/compiler/"
7062 (for-each (lambda (file)
7063 (format #t "~a\n" file)
7064 (invoke "antlr3" file))
7065 '("STParser.g" "Group.g" "CodeGenerator.g")))
7068 `(("antlr3" ,antlr3-bootstrap)
7070 ("java-stringtemplate" ,java-stringtemplate-3)
7071 ("java-junit" ,java-junit)))))
7073 (define java-stringtemplate-4.0.6
7074 (package (inherit java-stringtemplate)
7075 (name "java-stringtemplate")
7079 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/ST-"
7081 (file-name (string-append name "-" version ".tar.gz"))
7084 "0hjmh1ahdsh3w825i67mli9l4nncc4l6hdbf9ma91jvlj590sljp"))))
7086 `(("antlr3" ,antlr3-3.3)
7088 ("java-stringtemplate" ,java-stringtemplate-3)))))
7090 (define-public antlr3
7097 (url "https://github.com/antlr/antlr3")
7099 (file-name (git-file-name name version))
7102 "0cafavrjmzqhklghrk8c2jqxkdwxgzskm20pbrfd3r41cn00dpnf"))))
7103 (build-system ant-build-system)
7105 `(#:jar-name (string-append ,name "-" ,version ".jar")
7106 #:source-dir "tool/src/main/java:runtime/Java/src/main/java:tool/src/main/antlr3"
7109 (modify-phases %standard-phases
7110 (add-after 'install 'bin-install
7111 (lambda* (#:key inputs outputs #:allow-other-keys)
7112 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
7113 (bin (string-append (assoc-ref outputs "out") "/bin")))
7115 (with-output-to-file (string-append bin "/antlr3")
7118 (string-append "#!" (which "sh") "\n"
7119 "java -cp " jar "/" ,name "-" ,version ".jar:"
7121 (find-files (assoc-ref inputs "stringtemplate")
7125 (find-files (assoc-ref inputs "stringtemplate4")
7129 (find-files (string-append
7130 (assoc-ref inputs "antlr")
7133 " org.antlr.Tool $*"))))
7134 (chmod (string-append bin "/antlr3") #o755))
7136 (add-before 'build 'generate-grammar
7138 (chdir "tool/src/main/antlr3/org/antlr/grammar/v3/")
7139 (for-each (lambda (file)
7142 (invoke "antlr3" file))
7143 '("ANTLR.g" "ANTLRTreePrinter.g" "ActionAnalysis.g"
7144 "AssignTokenTypesWalker.g"
7145 "ActionTranslator.g" "TreeToNFAConverter.g"
7146 "ANTLRv3.g" "ANTLRv3Tree.g" "LeftRecursiveRuleWalker.g"
7147 "CodeGenTreeWalker.g" "DefineGrammarItemsWalker.g"))
7148 (substitute* "ANTLRParser.java"
7149 (("public Object getTree") "public GrammarAST getTree"))
7150 (substitute* "ANTLRv3Parser.java"
7151 (("public Object getTree") "public CommonTree getTree"))
7152 (chdir "../../../../../java")
7153 (substitute* "org/antlr/tool/LeftRecursiveRuleAnalyzer.java"
7154 (("import org.antlr.grammar.v3.\\*;") "import org.antlr.grammar.v3.*;
7155 import org.antlr.grammar.v3.ANTLRTreePrinter;"))
7156 (substitute* "org/antlr/tool/ErrorManager.java"
7157 (("case NO_SUCH_ATTRIBUTE_PASS_THROUGH:") ""))
7158 (chdir "../../../..")
7160 (add-before 'build 'fix-build-xml
7162 (substitute* "build.xml"
7163 (("target name=\"compile\">")
7164 "target name=\"compile\">
7165 <copy todir=\"${classes.dir}\">
7166 <fileset dir=\"tool/src/main/resources\">
7167 <include name=\"**/*.stg\"/>
7168 <include name=\"**/*.st\"/>
7169 <include name=\"**/*.sti\"/>
7170 <include name=\"**/STLexer.tokens\"/>
7176 ("antlr3" ,antlr3-bootstrap)))
7178 `(("junit" ,java-junit)
7179 ("stringtemplate" ,java-stringtemplate-3)
7180 ("stringtemplate4" ,java-stringtemplate)))
7182 `(("stringtemplate" ,java-stringtemplate-3)
7184 ("stringtemplate4" ,java-stringtemplate-4.0.6)))
7185 (home-page "https://www.antlr3.org")
7186 (synopsis "Framework for constructing recognizers, compilers, and translators")
7187 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
7188 is a language tool that provides a framework for constructing recognizers,
7189 compilers, and translators from grammatical descriptions containing Java, C#,
7190 C++, or Python actions. ANTLR provides excellent support for tree construction,
7191 tree walking, and translation.")
7192 (license license:bsd-3)))
7194 (define antlr3-bootstrap
7197 (name "antlr3-bootstrap")
7200 ("antlr3" ,antlr3-3.3)))
7202 `(("junit" ,java-junit)))))
7204 (define-public antlr3-3.3
7211 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
7212 "gh-pages/download/antlr-"
7216 "0qgg5vgsm4l1d6dj9pfbaa25dpv2ry2gny8ajy4vvgvfklw97b3m"))
7218 (search-patches "antlr3-3_3-fix-java8-compilation.patch"))))
7220 `(#:jar-name (string-append ,name "-" ,version ".jar")
7221 #:source-dir (string-join '("tool/src/main/java"
7222 "runtime/Java/src/main/java"
7223 "tool/src/main/antlr2"
7224 "tool/src/main/antlr3")
7226 #:tests? #f ; FIXME: tests seem to require maven plugin
7227 #:modules ((guix build ant-build-system)
7231 (modify-phases %standard-phases
7232 (add-after 'install 'bin-install
7233 (lambda* (#:key inputs outputs #:allow-other-keys)
7234 (let* ((out (assoc-ref outputs "out"))
7235 (jar (string-append out "/share/java"))
7236 (bin (string-append out "/bin")))
7238 (with-output-to-file (string-append bin "/antlr3")
7242 "#!" (which "sh") "\n"
7243 "java -cp " jar "/antlr3-3.3.jar:"
7245 (append (find-files (assoc-ref inputs "java-stringtemplate")
7247 (find-files (string-append (assoc-ref inputs "antlr")
7251 " org.antlr.Tool $*"))))
7252 (chmod (string-append bin "/antlr3") #o755)
7254 (add-before 'build 'generate-grammar
7256 (substitute* "tool/src/main/java/org/antlr/tool/Grammar.java"
7257 (("import org.antlr.grammar.v2.\\*;")
7258 "import org.antlr.grammar.v2.*;\n
7259 import org.antlr.grammar.v2.TreeToNFAConverter;\n
7260 import org.antlr.grammar.v2.DefineGrammarItemsWalker;\n
7261 import org.antlr.grammar.v2.ANTLRTreePrinter;"))
7262 (with-directory-excursion "tool/src/main/antlr2/org/antlr/grammar/v2/"
7263 (for-each (lambda (file)
7264 (format #t "~a\n" file)
7265 (invoke "antlr" file))
7266 '("antlr.g" "antlr.print.g" "assign.types.g"
7267 "buildnfa.g" "codegen.g" "define.g")))
7268 (with-directory-excursion "tool/src/main/antlr3/org/antlr/grammar/v3/"
7269 (for-each (lambda (file)
7270 (format #t "~a\n" file)
7271 (invoke "antlr3" file))
7272 '("ActionAnalysis.g" "ActionTranslator.g" "ANTLRv3.g"
7275 (add-before 'build 'fix-build-xml
7277 (substitute* "build.xml"
7278 (("target name=\"compile\">")
7279 "target name=\"compile\">
7280 <copy todir=\"${classes.dir}\">
7281 <fileset dir=\"tool/src/main/resources\">
7282 <include name=\"**/*.stg\"/>
7283 <include name=\"**/*.st\"/>
7284 <include name=\"**/*.sti\"/>
7285 <include name=\"**/STLexer.tokens\"/>
7291 ("antlr3" ,antlr3-3.1)))
7293 `(("junit" ,java-junit)))
7295 `(("java-stringtemplate" ,java-stringtemplate-3)
7297 ("antlr3" ,antlr3-3.1)))))
7299 (define-public antlr3-3.1
7305 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
7306 "gh-pages/download/antlr-"
7310 "0sfimc9cpbgrihz4giyygc8afgpma2c93yqpwb951giriri6x66z"))
7312 (search-patches "antlr3-3_1-fix-java8-compilation.patch"))))
7314 `(#:jar-name (string-append "antlr3-" ,version ".jar")
7315 #:source-dir "src:runtime/Java/src"
7318 (modify-phases %standard-phases
7319 (add-after 'install 'bin-install
7320 (lambda* (#:key inputs outputs #:allow-other-keys)
7321 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
7322 (bin (string-append (assoc-ref outputs "out") "/bin")))
7324 (with-output-to-file (string-append bin "/antlr3")
7327 (string-append "#!" (which "sh") "\n"
7328 "java -cp " jar "/antlr3-3.1.jar:"
7330 (find-files (assoc-ref inputs "stringtemplate")
7334 (find-files (string-append
7335 (assoc-ref inputs "antlr")
7338 " org.antlr.Tool $*"))))
7339 (chmod (string-append bin "/antlr3") #o755))
7341 (add-before 'build 'generate-grammar
7343 (let ((dir "src/org/antlr/tool/"))
7344 (for-each (lambda (file)
7347 (invoke "antlr" "-o" dir (string-append dir file)))
7348 '("antlr.g" "antlr.print.g" "assign.types.g"
7349 "buildnfa.g" "define.g")))
7350 (format #t "codegen.g\n")
7351 (invoke "antlr" "-o" "src/org/antlr/codegen"
7352 "src/org/antlr/codegen/codegen.g")
7354 (add-before 'build 'fix-build-xml
7356 (substitute* "build.xml"
7357 (("target name=\"compile\">")
7358 "target name=\"compile\">
7359 <copy todir=\"${classes.dir}\">
7360 <fileset dir=\"src\">
7361 <include name=\"**/*.stg\"/>
7362 <include name=\"**/*.st\"/>
7363 <include name=\"**/*.sti\"/>
7364 <include name=\"**/STLexer.tokens\"/>
7369 `(("antlr" ,antlr2)))
7371 `(("junit" ,java-junit)))
7373 `(("stringtemplate" ,java-stringtemplate-3)))))
7375 (define-public java-commons-cli-1.2
7376 ;; This is a bootstrap dependency for Maven2.
7378 (inherit java-commons-cli)
7382 (uri (string-append "mirror://apache/commons/cli/source/"
7383 "commons-cli-" version "-src.tar.gz"))
7386 "0rvfgzgv2pc1m091dfj3ih9ddsjjppr1f1wf0qmc3bk6b1kwv2dm"))))
7388 `(#:jar-name "commons-cli.jar"
7390 (modify-phases %standard-phases
7391 (add-before 'check 'fix-build-xml
7392 (lambda* (#:key inputs #:allow-other-keys)
7393 (substitute* "build.xml"
7394 (("dir=\"\\$\\{test.home\\}/java\"")
7395 "dir=\"${test.home}\""))
7398 `(("java-junit" ,java-junit)))))
7400 (define-public java-microemulator-cldc
7402 (name "java-microemulator-cldc")
7406 (uri (string-append "https://github.com/barteo/microemu/archive/"
7408 (string-map (lambda (c) (if (char=? c #\.) #\_ c))
7411 (file-name (string-append name "-" version ".tar.gz"))
7414 "1x1apmz38gkppxnwnygwmi12j54v4p258v8ddzn6dldkk7vak1ll"))))
7415 (build-system ant-build-system)
7417 `(#:jar-name "microemulator-cldc.jar"
7418 #:source-dir "microemu-cldc/src/main/java"
7419 #:tests? #f)); Requires even older software
7420 (home-page "https://github.com/barteo/microemu")
7421 (synopsis "J2ME CLDC emulator")
7422 (description "Microemulator is a Java 2 Micro Edition (J2ME) CLDC/MIDP
7423 Emulator. It demonstrates MIDlet based applications in web browser
7424 applet and can be run as a standalone java application.")
7425 (license (list license:asl2.0
7427 license:lgpl2.1+))))
7429 (define-public java-datanucleus-javax-persistence
7431 (name "java-datanucleus-javax-persistence")
7435 (uri (string-append "https://github.com/datanucleus/"
7436 "javax.persistence/archive/javax.persistence-"
7437 version "-release.tar.gz"))
7440 "11jx0fjwgc2hhbqqgdd6m1pf2fplf9vslppygax0y1z5csnqjhpx"))))
7441 (build-system ant-build-system)
7443 `(#:jar-name "java-datanucleus-javax-persistence.jar"
7445 #:source-dir "src/main/java"
7446 #:tests? #f)); no tests
7447 (home-page "https://github.com/datanucleus/javax.persistence")
7448 (synopsis "JPA API")
7449 (description "This package contains a clean definition of JPA API intended
7450 for use with DataNucleus JPA since the JCP haven't provided an official JPA API
7451 jar. See @url{http://java.net/projects/jpa-spec/downloads} for the specification
7452 used to generate this API.")
7453 (license (list license:edl1.0 license:epl1.0))))
7455 (define-public java-osgi-cmpn
7457 (name "java-osgi-cmpn")
7461 (uri (string-append "https://repo1.maven.org/maven2/"
7462 "org/osgi/osgi.cmpn/" version "/osgi.cmpn-"
7463 version "-sources.jar"))
7466 "1lmb6xyrmkqdhv1kayf0514rlwq6ypvs4m44ibrck3snp8241wys"))))
7467 (build-system ant-build-system)
7469 `(#:jar-name "osgi-cmpn.jar"
7470 #:tests? #f)); no tests
7472 `(("annotation" ,java-osgi-annotation)
7473 ("core" ,java-osgi-core)
7474 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
7475 ("microemulator" ,java-microemulator-cldc)
7476 ("servlet" ,java-classpathx-servletapi)))
7477 (home-page "https://www.osgi.org")
7478 (synopsis "Compendium specification module of OSGi framework")
7480 "OSGi, for Open Services Gateway initiative framework, is a module system
7481 and service platform for the Java programming language. This package contains
7482 the compendium specification module, providing interfaces and classes for use
7483 in compiling bundles.")
7484 (license license:asl2.0)))
7486 (define-public java-osgi-service-component-annotations
7488 (name "java-osgi-service-component-annotations")
7492 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
7493 "org.osgi.service.component.annotations/"
7494 version "/org.osgi.service.component.annotations-"
7495 version "-sources.jar"))
7498 "15rq9cmp4fpn74q44m4j35qsqmjf5lx3hcrk6pzvbhc08igic2f0"))))
7499 (build-system ant-build-system)
7501 `(#:jar-name "osgi-service-component-annotations.jar"
7502 #:tests? #f)); no tests
7504 `(("annotation" ,java-osgi-annotation)))
7505 (home-page "https://www.osgi.org")
7506 (synopsis "Support annotations for osgi-service-component")
7508 "OSGi, for Open Services Gateway initiative framework, is a module system
7509 and service platform for the Java programming language. This package contains
7510 the support annotations for osgi-service-component.")
7511 (license license:asl2.0)))
7513 (define-public java-osgi-dto
7515 (name "java-osgi-dto")
7519 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
7520 "org.osgi.dto/" version "/org.osgi.dto-"
7521 version "-sources.jar"))
7524 "0f4bqjzadn0hwk6sd3h5gvbyfp3yci1s6r0v770cc15p0pg627yr"))))
7525 (build-system ant-build-system)
7527 `(#:jar-name "osgi-dto.jar"
7528 #:tests? #f)); no tests
7530 `(("annotation" ,java-osgi-annotation)))
7531 (home-page "https://www.osgi.org")
7532 (synopsis "Data Transfer Objects")
7534 "OSGi, for Open Services Gateway initiative framework, is a module system
7535 and service platform for the Java programming language. This package contains
7536 the Data Transfer Objects. It is easily serializable having only public fields
7537 of primitive types and their wrapper classes, Strings, and DTOs. List, Set,
7538 Map and array aggregates may also be used. The aggregates must only hold
7539 objects of the listed types or aggregates.")
7540 (license license:asl2.0)))
7542 (define-public java-osgi-resource
7544 (name "java-osgi-resource")
7548 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
7549 "org.osgi.resource/"
7550 version "/org.osgi.resource-"
7551 version "-sources.jar"))
7554 "0hi0fsc5v99q22bd7lrkvpz1y0ds4w9arjldpwsrcpqvz2js7q2d"))))
7555 (build-system ant-build-system)
7557 `(#:jar-name "osgi-resource.jar"
7558 #:tests? #f)); no tests
7560 `(("annotation" ,java-osgi-annotation)
7561 ("dto" ,java-osgi-dto)))
7562 (home-page "https://www.osgi.org")
7563 (synopsis "OSGI Resource")
7565 "OSGi, for Open Services Gateway initiative framework, is a module system
7566 and service platform for the Java programming language. This package contains
7567 the definition of common types in osgi packages.")
7568 (license license:asl2.0)))
7570 (define-public java-osgi-namespace-contract
7572 (name "java-osgi-namespace-contract")
7576 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
7577 "org.osgi.namespace.contract/"
7578 version "/org.osgi.namespace.contract-"
7579 version "-sources.jar"))
7582 "1iz4f2i0fvqrlq90ki9nfzcfpvy2av434ri25bglywqssx8mmp36"))))
7583 (build-system ant-build-system)
7585 `(("resource" ,java-osgi-resource)
7586 ("annotation" ,java-osgi-annotation)))
7588 `(#:jar-name "osgi-namespace-contract.jar"
7589 #:tests? #f)); no tests
7590 (home-page "https://www.osgi.org")
7591 (synopsis "Contract Capability and Requirement Namespace")
7593 "OSGi, for Open Services Gateway initiative framework, is a module system
7594 and service platform for the Java programming language. This package contains
7595 the names for the attributes and directives for a namespace with contracts.")
7596 (license license:asl2.0)))
7598 (define-public java-osgi-namespace-extender
7600 (name "java-osgi-namespace-extender")
7604 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
7605 "org.osgi.namespace.extender/"
7606 version "/org.osgi.namespace.extender-"
7607 version "-sources.jar"))
7610 "0jgqiak2i05qv6j3gd33xlaifzzc0ylxxk376v2x0apfg3vvixmz"))))
7611 (build-system ant-build-system)
7613 `(("resource" ,java-osgi-resource)
7614 ("annotation" ,java-osgi-annotation)))
7616 `(#:jar-name "osgi-namespace-extendent.jar"
7617 #:tests? #f)); no tests
7618 (home-page "https://www.osgi.org")
7619 (synopsis "Extender Capability and Requirement Namespace")
7621 "OSGi, for Open Services Gateway initiative framework, is a module system
7622 and service platform for the Java programming language. This package contains
7623 the names for the attributes and directives for an extender namespace.")
7624 (license license:asl2.0)))
7626 (define-public java-osgi-namespace-service
7628 (name "java-osgi-namespace-service")
7632 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
7633 "org.osgi.namespace.service/"
7634 version "/org.osgi.namespace.service-"
7635 version "-sources.jar"))
7638 "0qmw8n2449nkmm56d1znz9zhazb6ya3vsimd5bf5jg23zzhgl8c8"))))
7639 (build-system ant-build-system)
7641 `(("resource" ,java-osgi-resource)
7642 ("annotation" ,java-osgi-annotation)))
7644 `(#:jar-name "osgi-namespace-service.jar"
7645 #:tests? #f)); no tests
7646 (home-page "https://www.osgi.org")
7647 (synopsis "Service Capability and Requirement Namespace")
7649 "OSGi, for Open Services Gateway initiative framework, is a module system
7650 and service platform for the Java programming language. This package contains
7651 the names for the attributes and directives for a service namespace.")
7652 (license license:asl2.0)))
7654 (define-public java-osgi-util-function
7656 (name "java-osgi-util-function")
7660 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
7661 "org.osgi.util.function/"
7662 version "/org.osgi.util.function-"
7663 version "-sources.jar"))
7666 "04l7j3hwmmj28w23m7paca0afzncs42j2mdr3liqq8kvp548sc6x"))))
7667 (build-system ant-build-system)
7669 `(#:jar-name "osgi-util-function.jar"
7670 #:tests? #f)); no tests
7672 `(("annotation" ,java-osgi-annotation)))
7673 (home-page "https://www.osgi.org")
7674 (synopsis "OSGI Util Function")
7676 "OSGi, for Open Services Gateway initiative framework, is a module system
7677 and service platform for the Java programming language. This package contains
7678 an interface for a function that accepts a single argument and produces a result.")
7679 (license license:asl2.0)))
7681 (define-public java-osgi-util-promise
7683 (name "java-osgi-util-promise")
7687 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
7688 "org.osgi.util.promise/"
7689 version "/org.osgi.util.promise-"
7690 version "-sources.jar"))
7693 "0y34dwiflg1c4ahvkswpf9z02xph2sr9fm04ia5493x3lshpw22c"))))
7694 (build-system ant-build-system)
7696 `(#:jar-name "osgi-util-promise.jar"
7697 #:tests? #f)); no tests
7699 `(("annotation" ,java-osgi-annotation)
7700 ("function" ,java-osgi-util-function)))
7701 (home-page "https://www.osgi.org")
7702 (synopsis "Promise of a value")
7704 "OSGi, for Open Services Gateway initiative framework, is a module system
7705 and service platform for the Java programming language. This package contains
7706 an interface and utilitary classes for promises. A Promise represents a future
7707 value. It handles the interactions for asynchronous processing.")
7708 (license license:asl2.0)))
7710 (define-public java-osgi-service-metatype-annotations
7712 (name "java-osgi-service-metatype-annotations")
7716 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
7717 "org.osgi.service.metatype.annotations/"
7718 version "/org.osgi.service.metatype.annotations-"
7719 version "-sources.jar"))
7722 "12rwm3349wk80vm88rcdgs4435m4jxkpkj5mrx326skkz2c6hyw6"))))
7723 (build-system ant-build-system)
7725 `(#:jar-name "osgi-service-metatype-annotations.jar"
7726 #:tests? #f)); no tests
7728 `(("annotation" ,java-osgi-annotation)))
7729 (home-page "https://www.osgi.org")
7730 (synopsis "Support annotations for metatype")
7732 "OSGi, for Open Services Gateway initiative framework, is a module system
7733 and service platform for the Java programming language. This package contains
7734 the support annotations for metatype.")
7735 (license license:asl2.0)))
7737 (define-public java-osgi-service-repository
7739 (name "java-osgi-service-repository")
7743 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
7744 "org.osgi.service.repository/"
7745 version "/org.osgi.service.repository-"
7746 version "-sources.jar"))
7749 "1k41mhg7b58pd8nsghr2qwcjrxdnf1p9spsw9v11k4257g6rl06n"))))
7750 (build-system ant-build-system)
7752 `(#:jar-name "osgi-service-repository.jar"
7753 #:tests? #f)); no tests
7755 `(("annotation" ,java-osgi-annotation)
7756 ("promise" ,java-osgi-util-promise)
7757 ("resource" ,java-osgi-resource)))
7758 (home-page "https://www.osgi.org")
7759 (synopsis "OSGI service repository")
7761 "OSGi, for Open Services Gateway initiative framework, is a module system
7762 and service platform for the Java programming language. This package contains
7763 a repository service that contains resources.")
7764 (license license:asl2.0)))
7766 (define-public java-osgi-framework
7768 (name "java-osgi-framework")
7772 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
7773 "org.osgi.framework/" version "/org.osgi.framework-"
7774 version "-sources.jar"))
7777 "1lwp2zfad3rybcc6q9bwz8xsgkc92ypzy5p6x54387f1qj65m73s"))))
7778 (build-system ant-build-system)
7780 `(#:jar-name "osgi-framework.jar"
7781 #:tests? #f)); no tests
7783 `(("annotation" ,java-osgi-annotation)
7784 ("resource" ,java-osgi-resource)
7785 ("dto" ,java-osgi-dto)))
7786 (home-page "https://www.osgi.org")
7787 (synopsis "OSGi framework")
7789 "OSGi, for Open Services Gateway initiative framework, is a module system
7790 and service platform for the Java programming language.")
7791 (license license:asl2.0)))
7793 (define-public java-osgi-service-log
7795 (name "java-osgi-service-log")
7799 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
7800 "org.osgi.service.log/"
7801 version "/org.osgi.service.log-"
7802 version "-sources.jar"))
7805 "1029j30dzcwializzca0j3fkhwwz08kmmsha5agw1iccscimj6r0"))))
7806 (build-system ant-build-system)
7808 `(#:jar-name "osgi-service-log.jar"
7809 #:tests? #f)); no tests
7811 `(("java-osgi-framework" ,java-osgi-framework)))
7812 (home-page "https://www.osgi.org")
7813 (synopsis "Provides methods for bundles to write messages to the log")
7815 "OSGi, for Open Services Gateway initiative framework, is a module system
7816 and service platform for the Java programming language. This package contains
7818 (license license:asl2.0)))
7820 (define-public java-osgi-service-jdbc
7822 (name "java-osgi-service-jdbc")
7826 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
7827 "org.osgi.service.jdbc/"
7828 version "/org.osgi.service.jdbc-"
7829 version "-sources.jar"))
7832 "11iln5v7bk469cgb9ddkrz9sa95b3733gqgaqw9xf5g6wq652yjz"))))
7833 (build-system ant-build-system)
7835 `(#:jar-name "osgi-service-jdbc.jar"
7836 #:tests? #f)); no tests
7837 (home-page "https://www.osgi.org")
7838 (synopsis "Factory for JDBC connection factories")
7840 "OSGi, for Open Services Gateway initiative framework, is a module system
7841 and service platform for the Java programming language. This package contains
7842 a factory for JDBC connection factories. There are 3 preferred connection
7843 factories for getting JDBC connections:
7846 @item @code{javax.sql.DataSource};
7847 @item @code{javax.sql.ConnectionPoolDataSource};
7848 @item @code{javax.sql.XADataSource}.
7850 (license license:asl2.0)))
7852 (define-public java-osgi-service-resolver
7854 (name "java-osgi-service-resolver")
7858 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
7859 "org.osgi.service.resolver/"
7860 version "/org.osgi.service.resolver-"
7861 version "-sources.jar"))
7864 "1dzqn1ryfi2rq4zwsgp44bmj2wlfydjg1qbxw2b0z4xdjjy55vxd"))))
7865 (build-system ant-build-system)
7867 `(#:jar-name "osgi-service-resolver.jar"
7868 #:tests? #f)); no tests
7870 `(("annotation" ,java-osgi-annotation)
7871 ("resource" ,java-osgi-resource)))
7872 (home-page "https://www.osgi.org")
7873 (synopsis "OSGI Resolver service")
7875 "OSGi, for Open Services Gateway initiative framework, is a module system
7876 and service platform for the Java programming language. This package contains
7877 a resolver service that resolves the specified resources in the context supplied
7879 (license license:asl2.0)))
7881 (define-public java-osgi-util-tracker
7883 (name "java-osgi-util-tracker")
7887 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
7888 "org.osgi.util.tracker/"
7889 version "/org.osgi.util.tracker-"
7890 version "-sources.jar"))
7893 "0c4fh9vxwzsx59r8dygda0gq2gx3z5vfhc3jsphlqwf5w0h403lz"))))
7894 (build-system ant-build-system)
7896 `(#:jar-name "osgi-util-tracker.jar"
7897 #:tests? #f)); no tests
7899 `(("framework" ,java-osgi-framework)
7900 ("annotation" ,java-osgi-annotation)))
7901 (home-page "https://www.osgi.org")
7902 (synopsis "Bundle tracking")
7904 "OSGi, for Open Services Gateway initiative framework, is a module system
7905 and service platform for the Java programming language. This package contains
7906 bundle tracking utility classes.")
7907 (license license:asl2.0)))
7909 (define-public java-osgi-service-cm
7911 (name "java-osgi-service-cm")
7915 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
7916 "org.osgi.service.cm/"
7917 version "/org.osgi.service.cm-"
7918 version "-sources.jar"))
7921 "1z8kap48y3xi0ggj8v6czglfnpnd94mmismgi2wbqhj1nl5fzbp6"))))
7922 (build-system ant-build-system)
7924 `(#:jar-name "osgi-service-cm.jar"
7925 #:tests? #f)); no tests
7927 `(("framework" ,java-osgi-framework)
7928 ("annotation" ,java-osgi-annotation)))
7929 (home-page "https://www.osgi.org")
7930 (synopsis "OSGI Configuration Management")
7932 "OSGi, for Open Services Gateway initiative framework, is a module system
7933 and service platform for the Java programming language. This package contains
7934 utility classes for the configuration of services.")
7935 (license license:asl2.0)))
7937 (define-public java-osgi-service-packageadmin
7939 (name "java-osgi-service-packageadmin")
7943 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
7944 "org.osgi.service.packageadmin/"
7945 version "/org.osgi.service.packageadmin-"
7946 version "-sources.jar"))
7949 "041mpxzi7g36wmcily6y4ccn3jx15akpdy8gmhyb7m98x7qfvn52"))))
7950 (build-system ant-build-system)
7952 `(#:jar-name "osgi-service-packageadmin.jar"
7953 #:tests? #f)); no tests
7955 `(("framework" ,java-osgi-framework)))
7956 (home-page "https://www.osgi.org")
7957 (synopsis "OSGI Package Administration")
7959 "OSGi, for Open Services Gateway initiative framework, is a module system
7960 and service platform for the Java programming language. This package contains
7961 the packageadmin service.")
7962 (license license:asl2.0)))
7964 (define-public java-ops4j-base-lang
7966 (name "java-ops4j-base-lang")
7970 (uri (string-append "https://github.com/ops4j/org.ops4j.base/"
7971 "archive/base-" version ".tar.gz"))
7974 "18hl3lpchgpv8yh5rlk39l2gif5dlfgb8gxjmncf39pr2dprkniw"))))
7975 (build-system ant-build-system)
7977 `(#:jar-name "java-ops4j-base-lang.jar"
7978 #:source-dir "ops4j-base-lang/src/main/java"
7979 #:tests? #f; no tests
7981 (modify-phases %standard-phases
7982 (add-before 'build 'add-test-file
7984 ;; That file is required by a test in ops4j-pax-exam-core-spi
7985 (mkdir-p "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang")
7986 (with-output-to-file "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang/pom.properties"
7990 "version=" ,version "\n"
7991 "groupId=org.ops4j.base"
7992 "artifactId=ops4j-base-lang\n"))))
7994 (home-page "https://ops4j1.jira.com/wiki/spaces/base/overview")
7995 (synopsis "Utility classes and extensions to be used in OPS4J projects")
7996 (description "OPS4J stands for Open Participation Software for Java. This
7997 package contains utilities and extensions related to @code{java.lang}.")
7998 (license license:asl2.0)))
8000 (define-public java-ops4j-base-monitors
8002 (inherit java-ops4j-base-lang)
8003 (name "java-ops4j-base-monitors")
8005 `(#:jar-name "java-ops4j-base-monitors.jar"
8006 #:source-dir "ops4j-base-monitors/src/main/java"
8007 #:tests? #f)); no tests
8009 `(("lang" ,java-ops4j-base-lang)))
8010 (description "OPS4J stands for Open Participation Software for Java. This
8011 package contains utilities and extensions related to monitoring.")))
8013 (define-public java-ops4j-base-io
8015 (inherit java-ops4j-base-lang)
8016 (name "java-ops4j-base-io")
8018 `(#:jar-name "java-ops4j-base-io.jar"
8019 #:source-dir "ops4j-base-io/src/main/java"
8020 #:test-dir "ops4j-base-io/src/test"
8022 (list "**/ListerTest.java")))
8024 `(("lang" ,java-ops4j-base-monitors)
8025 ("lang" ,java-ops4j-base-lang)))
8027 `(("junit" ,java-junit)
8028 ("hamcrest" ,java-hamcrest-core)))
8029 (description "OPS4J stands for Open Participation Software for Java. This
8030 package contains utilities and extensions related to handling streams and files.")))
8032 (define-public java-ops4j-base-util
8034 (inherit java-ops4j-base-lang)
8035 (name "java-ops4j-base-util")
8037 `(#:jar-name "java-ops4j-base-util.jar"
8038 #:source-dir "ops4j-base-util/src/main/java"
8039 #:test-dir "ops4j-base-util/src/test"))
8041 `(("lang" ,java-ops4j-base-lang)))
8043 `(("junit" ,java-junit)))
8044 (description "OPS4J stands for Open Participation Software for Java. This
8045 package contains utilities and extensions related to environment, i18n and
8048 (define-public java-ops4j-base-util-property
8050 (inherit java-ops4j-base-lang)
8051 (name "java-ops4j-base-util-property")
8053 `(#:jar-name "java-ops4j-base-util-property.jar"
8054 #:source-dir "ops4j-base-util-property/src/main/java"
8055 #:tests? #f)); no tests
8057 `(("lang" ,java-ops4j-base-lang)
8058 ("util" ,java-ops4j-base-util)))
8059 (description "OPS4J stands for Open Participation Software for Java. This
8060 package contains utilities and extensions related to resolving properties from
8061 different sources.")))
8063 (define-public java-ops4j-base-store
8065 (inherit java-ops4j-base-lang)
8066 (name "java-ops4j-base-store")
8068 `(#:jar-name "java-ops4j-base-store.jar"
8069 #:source-dir "ops4j-base-store/src/main/java"
8070 #:tests? #f)); no tests
8072 `(("lang" ,java-ops4j-base-lang)
8073 ("slf4j" ,java-slf4j-api)
8074 ("io" ,java-ops4j-base-io)))
8075 (description "OPS4J stands for Open Participation Software for Java. This
8076 package contains utilities for storing and retrieving data from an
8077 @code{InputStream}.")))
8079 (define-public java-ops4j-base-spi
8081 (inherit java-ops4j-base-lang)
8082 (name "java-ops4j-base-spi")
8084 `(#:jar-name "java-ops4j-base-spi.jar"
8085 #:source-dir "ops4j-base-spi/src/main/java"
8086 #:test-dir "ops4j-base-spi/src/test"))
8088 `(("junit" ,java-junit)
8089 ("hamcrest" ,java-hamcrest-core)))
8090 (description "OPS4J stands for Open Participation Software for Java. This
8091 package contains utilities for obtaining services via the Java SE 6
8092 @code{ServiceLoader}.")))
8094 (define-public java-aqute-bnd-annotation
8096 (name "java-aqute-bnd-annotation")
8100 (uri (string-append "https://github.com/bndtools/bnd/archive/"
8101 version ".REL.tar.gz"))
8102 (file-name (string-append name "-" version ".tar.gz"))
8105 "1ggyiq0as0f6cz333a0dh98j72kmvv5pf2s47v9554yh905lfqdl"))))
8106 (build-system ant-build-system)
8108 `(#:jar-name "java-aqute-bnd-annotation.jar"
8109 #:source-dir "biz.aQute.bnd.annotation/src"
8110 #:tests? #f)); empty test dir
8111 (home-page "https://bnd.bndtools.org/")
8112 (synopsis "Tools for OSGi")
8113 (description "Bnd is a swiss army knife for OSGi, it creates manifest
8114 headers based on analyzing the class code, it verifies the project settings,
8115 it manages project dependencies, gives diffs jars, and much more.")
8116 (license license:asl2.0)))
8118 (define-public java-aqute-libg
8120 (inherit java-aqute-bnd-annotation)
8121 (name "java-aqute-libg")
8123 `(#:jar-name "java-aqute-libg.jar"
8124 ;; The build fails when source/target more recent than 1.7. This
8125 ;; is a known issue. See: https://github.com/bndtools/bnd/issues/1327
8127 ;; It is closed as won't fix. There is no way to change the source
8128 ;; so that it works on 1.8, and still works on 1.6, the upstream
8129 ;; target. It work fine on 1.7, so we use 1.7.
8130 #:make-flags (list "-Dant.build.javac.source=1.7"
8131 "-Dant.build.javac.target=1.7")
8133 (modify-phases %standard-phases
8134 (add-before 'configure 'chdir
8135 ;; Change to aQute.libg directory, so that the relative
8136 ;; paths in the tests aren't broken.
8138 (chdir "aQute.libg")
8140 (add-before 'check 'create-test-directory
8141 ;; Copy the test directory to test/java, since that's where
8142 ;; ant-build-system's default project in build.xml expects to find
8143 ;; the test classes. Leave a copy in the original place to not
8144 ;; break paths in tests.
8147 (copy-recursively "test" "src/test/java")
8150 `(("slf4j" ,java-slf4j-api)
8151 ("osgi-annot" ,java-osgi-annotation)
8152 ("java-osgi-cmpn" ,java-osgi-cmpn)
8153 ("osgi" ,java-osgi-core)))
8155 `(("hamcrest" ,java-hamcrest-core)
8156 ("java-junit" ,java-junit)))))
8158 (define java-aqute-libg-bootstrap
8160 (inherit java-aqute-libg)
8161 (name "java-aqute-libg-bootstrap")
8163 ;; Disable tests, at this stage of bootstrap we have no test frameworks.
8164 (substitute-keyword-arguments (package-arguments java-aqute-libg)
8165 ((#:tests? _ #f) #f)))
8167 `(("slf4j-bootstrap" ,java-slf4j-api-bootstrap)
8168 ,@(delete `("slf4j" ,java-slf4j-api)
8169 (package-inputs java-aqute-libg))))
8170 (native-inputs '())))
8172 (define-public java-aqute-bndlib
8174 (inherit java-aqute-bnd-annotation)
8175 (name "java-aqute-bndlib")
8177 `(#:jar-name "java-bndlib.jar"
8178 #:source-dir "biz.aQute.bndlib/src"
8179 #:tests? #f)); no tests
8181 `(("slf4j" ,java-slf4j-api)
8182 ("osgi-annot" ,java-osgi-annotation)
8183 ("java-aqute-libg" ,java-aqute-libg)
8184 ("java-aqute-bnd-annotation" ,java-aqute-bnd-annotation)
8185 ("java-osgi-service-component-annotations" ,java-osgi-service-component-annotations)
8186 ("java-osgi-service-repository" ,java-osgi-service-repository)
8187 ("java-osgi-service-log" ,java-osgi-service-log)
8188 ("java-osgi-service-metatype-annotations" ,java-osgi-service-metatype-annotations)
8189 ("java-osgi-namespace-contract" ,java-osgi-namespace-contract)
8190 ("java-osgi-namespace-extender" ,java-osgi-namespace-extender)
8191 ("java-osgi-namespace-service" ,java-osgi-namespace-service)
8192 ("promise" ,java-osgi-util-promise)
8193 ("osgi" ,java-osgi-core)))))
8195 (define java-aqute-bndlib-bootstrap
8197 (inherit java-aqute-bndlib)
8198 (name "java-aqute-bndlib-bootstrap")
8200 `(("slf4j-bootstrap" ,java-slf4j-api-bootstrap)
8201 ("java-aqute-libg-bootstrap" ,java-aqute-libg-bootstrap)
8202 ,@(delete `("slf4j" ,java-slf4j-api)
8203 (delete `("java-aqute-libg" ,java-aqute-libg)
8204 (package-inputs java-aqute-bndlib)))))))
8206 (define-public java-ops4j-pax-tinybundles
8208 (name "java-ops4j-pax-tinybundles")
8212 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.tinybundles/"
8213 "archive/tinybundles-" version ".tar.gz"))
8216 "0y0gq3pvv0iir2b885lmlwnvr724vv7vklzhhr4fs27d7mdkj871"))))
8218 `(#:jar-name "java-ops4j-pax-tinybundles.jar"
8219 #:source-dir "src/main/java"
8221 ;; Abstract base classes for other tests
8222 (list "**/BndTest.java" "**/CoreTest.java")
8224 (modify-phases %standard-phases
8225 (add-before 'check 'fix-version
8227 ;; This test has a reference to an old version of bndlib we are not
8228 ;; packaging. It uses the version referenced in pom.xml. We replace
8229 ;; it with our own version.
8230 (substitute* "src/test/java/org/ops4j/pax/tinybundles/bnd/BndTest.java"
8231 (("[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*")
8232 ,(package-version java-aqute-bndlib)))
8235 `(("lang" ,java-ops4j-base-lang)
8236 ("io" ,java-ops4j-base-io)
8237 ("store" ,java-ops4j-base-store)
8238 ("slf4j" ,java-slf4j-api)
8239 ("libg" ,java-aqute-libg)
8240 ("bndlib" ,java-aqute-bndlib)))
8242 `(("junit" ,java-junit)
8243 ("hamcrest" ,java-hamcrest-core)
8244 ("log4j" ,java-log4j-api)
8245 ("bndannotation" ,java-aqute-bnd-annotation)
8246 ("framework" ,java-osgi-framework)))
8247 (build-system ant-build-system)
8248 (home-page "https://ops4j1.jira.com/wiki/spaces/ops4j/pages/12060312/Tinybundles")
8249 (synopsis "Java APIs to create OSGi related artifacts")
8250 (description "Tinybundles is all about creating OSGi related artifacts like
8251 Bundles, Fragments and Deployment Packages with Java Api. It is very convenient
8252 to create such artifacts on-the-fly inside Tests (like in Pax Exam). On the
8253 other hand, this library can be a foundation of real end user tools that need
8254 to create those artifacts.")
8255 (license license:asl2.0)))
8257 (define-public java-ops4j-pax-exam-core
8259 (name "java-ops4j-pax-exam-core")
8263 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.exam2/"
8264 "archive/exam-reactor-" version ".tar.gz"))
8267 "08mzw8nkah3rj3vznlplnawspxhp61zgvb44ifqa1rni1cvbms2g"))))
8269 `(#:jar-name "java-ops4j-pax-exam-core.jar"
8270 #:source-dir "core/pax-exam/src/main/java"
8271 #:test-dir "core/pax-exam/src/test"))
8273 `(("slf4j" ,java-slf4j-api)
8274 ("lang" ,java-ops4j-base-lang)
8275 ("io" ,java-ops4j-base-io)
8276 ("util-property" ,java-ops4j-base-util-property)
8277 ("util-store" ,java-ops4j-base-store)
8278 ("java-osgi-core" ,java-osgi-core)))
8280 `(("junit" ,java-junit)
8281 ("hamcrest" ,java-hamcrest-core)))
8282 (build-system ant-build-system)
8283 (home-page "https://ops4j1.jira.com/wiki/spaces/PAXEXAM4/overview")
8284 (synopsis "In-Container Testing for OSGi, Java EE and CDI")
8285 (description "Pax Exam creates OSGi bundles for testing purposes. It lets
8286 the user take control of the OSGi framework, the test framework (e.g. JUnit) and
8287 the system under test at the same time.")
8288 (license license:asl2.0)))
8290 (define-public java-ops4j-pax-exam-core-spi
8292 (inherit java-ops4j-pax-exam-core)
8293 (name "java-ops4j-pax-exam-core-spi")
8295 `(#:jar-name "java-ops4j-pax-exam-spi.jar"
8296 #:source-dir "src/main/java"
8299 ;; Abstract base class, not a test
8300 "**/BaseStagedReactorTest.java"
8301 ;; Depends on org.mortbay.jetty.testwars:test-war-dump
8302 "**/WarBuilderTest.java")
8304 (modify-phases %standard-phases
8305 (add-before 'configure 'chdir
8307 ;; Tests assume we are in this directory
8308 (chdir "core/pax-exam-spi")
8310 (add-before 'check 'fix-tests
8312 ;; One test checks that this file is present.
8313 (mkdir-p "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi")
8314 (with-output-to-file
8315 "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi/pom.properties"
8318 (string-append "artifactId = pax-exam-spi\n"
8319 "version = " ,(package-version java-ops4j-pax-exam-core-spi)))))
8320 ;; Maven puts compilation results in the target directory, while we
8321 ;; put them in the build directory.
8322 (substitute* '("src/test/java/org/ops4j/pax/exam/spi/war/WarBuilderTest.java"
8323 "src/test/java/org/ops4j/pax/exam/spi/war/WarTestProbeBuilderTest.java"
8324 "src/test/java/org/ops4j/pax/exam/spi/war/ZipBuilderTest.java")
8325 (("target") "build"))
8326 ;; One test is expected to fail, but it doesn't throw the expected exception
8327 (substitute* "src/test/java/org/ops4j/pax/exam/spi/reactors/BaseStagedReactorTest.java"
8328 (("AssertionError") "IllegalArgumentException"))
8331 `(("java-ops4j-pax-exam-core" ,java-ops4j-pax-exam-core)
8332 ("lang" ,java-ops4j-base-lang)
8333 ("monitors" ,java-ops4j-base-monitors)
8334 ("store" ,java-ops4j-base-store)
8335 ("io" ,java-ops4j-base-io)
8336 ("spi" ,java-ops4j-base-spi)
8337 ("osgi" ,java-osgi-core)
8338 ("slf4j" ,java-slf4j-api)
8339 ("tinybundles" ,java-ops4j-pax-tinybundles)))
8341 `(("mockito" ,java-mockito-1)
8342 ("junit" ,java-junit)
8343 ("hamcrest" ,java-hamcrest-core)
8344 ("cglib" ,java-cglib)
8345 ("objenesis" ,java-objenesis)
8346 ("asm" ,java-asm)))))
8348 (define-public java-ops4j-pax-exam-core-junit
8350 (inherit java-ops4j-pax-exam-core)
8351 (name "java-ops4j-pax-exam-core-junit")
8353 `(#:jar-name "ops4j-pax-exam-core-junit.jar"
8354 #:source-dir "drivers/pax-exam-junit4/src/main/java"
8355 #:tests? #f)); no tests
8357 `(("junit" ,java-junit)
8358 ("slf4j" ,java-slf4j-api)
8359 ("core" ,java-ops4j-pax-exam-core)
8360 ("spi" ,java-ops4j-pax-exam-core-spi)))
8361 (native-inputs '())))
8363 (define-public java-fasterxml-jackson-annotations
8365 (name "java-fasterxml-jackson-annotations")
8369 (uri (string-append "https://github.com/FasterXML/"
8370 "jackson-annotations/archive/"
8371 "jackson-annotations-" version ".tar.gz"))
8374 "0mr95xd0da6a4g95zvrl1ryk5n5zv2rc696w3xnsr5hxk2gicfc4"))))
8375 (build-system ant-build-system)
8377 `(#:jar-name "jackson-annotations.jar"
8378 #:source-dir "src/main/java"
8379 #:test-dir "src/test"))
8381 `(("junit" ,java-junit)))
8382 (home-page "https://github.com/FasterXML/jackson-annotations")
8383 (synopsis "General purpose annotations for the Jackson Data Processor")
8384 (description "This package contains general purpose annotations for the
8385 Jackson Data Processor, used on value and handler types. The only annotations
8386 not included are ones that require dependency to the Databind package.")
8387 (license license:asl2.0)))
8389 (define-public java-fasterxml-jackson-core
8391 (name "java-fasterxml-jackson-core")
8395 (uri (string-append "https://github.com/FasterXML/"
8396 "jackson-core/archive/"
8397 "jackson-core-" version ".tar.gz"))
8400 "159hsnk17jr1gyzkf01cxvsn45srnk37g949r7364qlsr527gjgd"))))
8401 (build-system ant-build-system)
8403 `(#:jar-name "jackson-core.jar"
8404 #:source-dir "src/main/java"
8405 #:test-dir "src/test"
8408 ;; Expected failure. pom.xml excludes these
8410 ;; Base classes that have no constructor for junit
8412 "**/ConcurrencyReadTest.java"
8413 "**/ManualCharAccessTest.java"
8414 "**/ManualCharAccessTest.java"
8415 "**/TrailingCommasTest.java"
8416 "**/AsyncMissingValuesInObjectTest.java"
8417 "**/AsyncMissingValuesInArrayTest.java")
8419 (modify-phases %standard-phases
8420 (add-before 'configure 'generate-PackageVersion.java
8422 (let* ((out "src/main/java/com/fasterxml/jackson/core/json/PackageVersion.java")
8423 (in (string-append out ".in")))
8426 (("@package@") "com.fasterxml.jackson.core.json")
8427 (("@projectversion@") ,version)
8428 (("@projectgroupid@") "com.fasterxml.jackson.core")
8429 (("@projectartifactid@") "jackson-core")))
8431 (add-before 'build 'copy-resources
8433 (copy-recursively "src/main/resources"
8436 (add-before 'check 'copy-test-resources
8438 (copy-recursively "src/test/resources"
8439 "build/test-classes")
8442 `(("junit" ,java-junit)
8443 ("hamcrest" ,java-hamcrest-core)))
8444 (home-page "https://github.com/FasterXML/jackson-core")
8447 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
8449 (define-public java-fasterxml-jackson-databind
8451 (name "java-fasterxml-jackson-databind")
8455 (uri (string-append "https://github.com/FasterXML/"
8456 "jackson-databind/archive/"
8457 "jackson-databind-" version ".tar.gz"))
8460 "1zd2cw4z6kdkbx8za96xh9pyicv2a2l7y0rkcx2fqd8hv6d47s08"))))
8461 (build-system ant-build-system)
8463 `(#:jar-name "jackson-databind.jar"
8464 #:source-dir "src/main/java"
8465 #:tests? #f; requires javax.measures for which I can't find a free implementation
8467 (modify-phases %standard-phases
8468 (add-before 'configure 'generate-PackageVersion.java
8470 (let* ((out "src/main/java/com/fasterxml/jackson/databind/cfg/PackageVersion.java")
8471 (in (string-append out ".in")))
8474 (("@package@") "com.fasterxml.jackson.databind.cfg")
8475 (("@projectversion@") ,version)
8476 (("@projectgroupid@") "com.fasterxml.jackson.databind")
8477 (("@projectartifactid@") "jackson-databind")))
8479 (add-before 'build 'copy-resources
8481 (copy-recursively "src/main/resources" "build/classes")
8484 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
8485 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)))
8486 (home-page "https://github.com/FasterXML/jackson-databind")
8487 (synopsis "Data-binding functionality and tree-model for the Jackson Data Processor")
8488 (description "This package contains the general-purpose data-binding
8489 functionality and tree-model for Jackson Data Processor. It builds on core
8490 streaming parser/generator package, and uses Jackson Annotations for
8492 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
8494 (define-public java-fasterxml-jackson-modules-base-jaxb
8496 (name "java-fasterxml-jackson-modules-base-jaxb")
8500 (uri (string-append "https://github.com/FasterXML/"
8501 "jackson-modules-base/archive/"
8502 "jackson-modules-base-" version ".tar.gz"))
8505 "1wws95xi8sppp6b0k2vvjdjyynl20r1a4dwrhai08lzlria6blp5"))))
8506 (build-system ant-build-system)
8508 `(#:jar-name "jackson-modules-base-jaxb.jar"
8509 #:source-dir "jaxb/src/main/java"
8510 #:test-dir "jaxb/src/test"
8512 ;; Base class for tests
8513 (list "**/BaseJaxbTest.java")
8515 (modify-phases %standard-phases
8516 (add-before 'configure 'generate-PackageVersion.java
8518 (let* ((out (string-append "jaxb/src/main/java/com/fasterxml/"
8519 "jackson/module/jaxb/PackageVersion.java"))
8520 (in (string-append out ".in")))
8523 (("@package@") "com.fasterxml.jackson.module.jaxb")
8524 (("@projectversion@") ,version)
8525 (("@projectgroupid@") "com.fasterxml.jackson.module.jaxb")
8526 (("@projectartifactid@") "jackson-module-jaxb")))
8528 (add-before 'build 'copy-resources
8530 (copy-recursively "jaxb/src/main/resources" "build/classes")
8533 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
8534 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
8535 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)))
8537 `(("java-junit" ,java-junit)))
8538 (home-page "https://github.com/FasterXML/jackson-modules-base")
8539 (synopsis "Jaxb annotations jackson module")
8540 (description "This package is the jaxb annotations module for jackson.")
8541 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
8543 (define-public java-fasterxml-jackson-modules-base-mrbean
8545 (name "java-fasterxml-jackson-modules-base-mrbean")
8549 (uri (string-append "https://github.com/FasterXML/"
8550 "jackson-modules-base/archive/"
8551 "jackson-modules-base-" version ".tar.gz"))
8554 "1wws95xi8sppp6b0k2vvjdjyynl20r1a4dwrhai08lzlria6blp5"))))
8555 (build-system ant-build-system)
8557 `(#:jar-name "jackson-modules-base-mrbean.jar"
8558 #:source-dir "mrbean/src/main/java"
8559 #:test-dir "mrbean/src/test"
8561 ;; Base class for tests
8562 (list "**/BaseTest.java")
8564 (modify-phases %standard-phases
8565 (add-before 'configure 'generate-PackageVersion.java
8567 (let* ((out (string-append "mrbean/src/main/java/com/fasterxml/"
8568 "jackson/module/mrbean/PackageVersion.java"))
8569 (in (string-append out ".in")))
8572 (("@package@") "com.fasterxml.jackson.module.mrbean")
8573 (("@projectversion@") ,version)
8574 (("@projectgroupid@") "com.fasterxml.jackson.module.mrbean")
8575 (("@projectartifactid@") "jackson-module-mrbean")))
8578 `(("java-asm" ,java-asm)
8579 ("java-fasterxml-jackson-annotations"
8580 ,java-fasterxml-jackson-annotations)
8581 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
8582 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)))
8584 `(("java-junit" ,java-junit)))
8585 (home-page "https://github.com/FasterXML/jackson-modules-base")
8586 (synopsis "POJO type materialization for Java")
8587 (description "This package implements POJO type materialization.
8588 Databinders can construct implementation classes for Java interfaces as part
8589 of deserialization.")
8590 (license license:asl2.0)))
8592 (define-public java-snakeyaml
8594 (name "java-snakeyaml")
8598 (uri (string-append "https://bitbucket.org/asomov/snakeyaml/get/v"
8600 (file-name (string-append name "-" version ".tar.gz"))
8603 "0474cqcv46zgv9bhms2vgawakq1vyj0hp3h3f1bfys46msia90bh"))))
8604 (build-system ant-build-system)
8606 `(#:jar-name "java-snakeyaml.jar"
8607 #:source-dir "src/main/java"
8608 ;; Tests require velocity, a cyclic dependency, and
8609 ;; java-spring-framework-context which is not packaged.
8611 (home-page "https://bitbucket.org/asomov/snakeyaml")
8612 (synopsis "YAML processor")
8613 (description "SnakeYAML is a YAML processor for the Java Virtual Machine.")
8614 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
8616 (define-public java-fasterxml-jackson-dataformat-yaml
8618 (name "java-fasterxml-jackson-dataformat-yaml")
8622 (uri (string-append "https://github.com/FasterXML/"
8623 "jackson-dataformats-text/archive/"
8624 "jackson-dataformats-text-" version ".tar.gz"))
8627 "1hikl06khaxbg439avf442qifcadap8w0lx13f0nnhp2vh3dkbz7"))))
8628 (build-system ant-build-system)
8630 `(#:jar-name "jackson-dataformat-yaml.jar"
8631 #:source-dir "yaml/src/main/java"
8632 #:test-dir "yaml/src/test"
8633 #:test-exclude (list "**/failing/**.java")
8635 (modify-phases %standard-phases
8636 (add-before 'configure 'generate-PackageVersion.java
8638 (let* ((out "yaml/src/main/java/com/fasterxml/jackson/dataformat/yaml/PackageVersion.java")
8639 (in (string-append out ".in")))
8642 (("@package@") "com.fasterxml.jackson.dataformat.yaml")
8643 (("@projectversion@") ,version)
8644 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.yaml")
8645 (("@projectartifactid@") "jackson-dataformat-yaml")))
8648 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
8649 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
8650 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)
8651 ("java-snakeyaml" ,java-snakeyaml)))
8653 `(("junit" ,java-junit)
8654 ("hamcrest" ,java-hamcrest-core)
8655 ("java-ops4j-pax-exam-core-spi" ,java-ops4j-pax-exam-core-spi)
8656 ("java-ops4j-pax-exam-core-junit" ,java-ops4j-pax-exam-core-junit)
8657 ("java-ops4j-pax-exam" ,java-ops4j-pax-exam-core)))
8658 (home-page "https://github.com/FasterXML/jackson-dataformats-text")
8659 (synopsis "Yaml backend for Jackson")
8660 (description "Dataformat backends are used to support format alternatives
8661 to JSON, supported by default. This is done by sub-classing Jackson core
8663 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
8665 (define-public java-stax2-api
8667 (name "java-stax2-api")
8671 (uri (string-append "https://github.com/FasterXML/stax2-api/archive/"
8672 "stax2-api-" version ".tar.gz"))
8675 "1amc1si0l0hyyw2sawmnzy4hkna3z6fp195y4nm5m9wb9ld5awkq"))))
8676 (build-system ant-build-system)
8678 `(#:jar-name "java-stax2-api.jar"
8679 #:source-dir "src/main/java"
8680 #:tests? #f)); no tests
8681 (home-page "https://github.com/FasterXML/stax2-api")
8682 (synopsis "Stax2 API")
8683 (description "Stax2 API is an extension to basic Stax 1.0 API that adds
8684 significant new functionalities, such as full-featured bi-direction validation
8685 interface and high-performance Typed Access API.")
8686 (license license:bsd-2)))
8688 (define-public java-woodstox-core
8690 (name "java-woodstox-core")
8694 (uri (string-append "https://github.com/FasterXML/woodstox/archive/"
8695 "woodstox-core-" version ".tar.gz"))
8698 "1i7pdgb8jbw6gdy5kmm0l6rz109n2ns92pqalpyp24vb8vlvdfd4"))))
8699 (build-system ant-build-system)
8701 `(#:jar-name "woodstox.jar"
8703 (list "**/Base*.java" "failing/**")
8705 (modify-phases %standard-phases
8706 (add-before 'build 'remove-msv-dep
8708 ;; we don't need osgi, and it depends on msv
8709 (delete-file-recursively "src/main/java/com/ctc/wstx/osgi")
8710 ;; msv's latest release is from 2011 and we don't need it
8711 (delete-file-recursively "src/main/java/com/ctc/wstx/msv")
8712 (delete-file-recursively "src/test/java/wstxtest/osgi")
8713 (delete-file-recursively "src/test/java/wstxtest/msv")
8715 (add-before 'build 'copy-resources
8717 (copy-recursively "src/main/resources" "build/classes")
8720 `(("stax2" ,java-stax2-api)))
8722 `(("junit" ,java-junit)))
8723 (home-page "https://github.com/FasterXML/woodstox")
8724 (synopsis "Stax XML API implementation")
8725 (description "Woodstox is a stax XML API implementation.")
8726 (license license:asl2.0)))
8728 (define-public java-fasterxml-jackson-dataformat-xml
8730 (name "java-fasterxml-jackson-dataformat-xml")
8734 (uri (string-append "https://github.com/FasterXML/"
8735 "jackson-dataformat-xml/archive/"
8736 "jackson-dataformat-xml-" version ".tar.gz"))
8739 "111fkkl90w31jbf30kgj82qdcxlw4sxppki7i198liw0ck1jcavq"))))
8740 (build-system ant-build-system)
8742 `(#:jar-name "jackson-dataformat-xml.jar"
8743 #:source-dir "src/main/java"
8745 (list "**/failing/**")
8747 (modify-phases %standard-phases
8748 (add-before 'configure 'generate-PackageVersion.java
8750 (let* ((out "src/main/java/com/fasterxml/jackson/dataformat/xml/PackageVersion.java")
8751 (in (string-append out ".in")))
8755 (("@package@") "com.fasterxml.jackson.dataformat.xml")
8756 (("@projectversion@") ,version)
8757 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.xml")
8758 (("@projectartifactid@") "jackson-dataformat-xml")))
8760 (add-before 'build 'copy-resources
8762 (copy-recursively "src/main/resources" "build/classes")
8765 `(("jackson-annotations" ,java-fasterxml-jackson-annotations)
8766 ("jackson-core" ,java-fasterxml-jackson-core)
8767 ("jackson-modules-base-jaxb" ,java-fasterxml-jackson-modules-base-jaxb)
8768 ("jackson-databind" ,java-fasterxml-jackson-databind)
8769 ("stax2-api" ,java-stax2-api)
8770 ("woodstox" ,java-woodstox-core)))
8772 `(("junit" ,java-junit)
8773 ("hamcrest" ,java-hamcrest-core)))
8774 (home-page "https://github.com/FasterXML/jackson-dataformat-xml")
8775 (synopsis "Read and write XML")
8776 (description "This package contains Jackson extension component for reading
8777 and writing XML encoded data.
8779 Further, the goal is to emulate how JAXB data-binding works with \"Code-first\"
8780 approach (that is, no support is added for \"Schema-first\" approach). Support
8781 for JAXB annotations is provided by JAXB annotation module; this module
8782 provides low-level abstractions (@code{JsonParser}, @code{JsonGenerator},
8783 @code{JsonFactory}) as well as small number of higher level overrides needed to
8784 make data-binding work.")
8785 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
8787 (define-public java-hdrhistogram
8789 (name "java-hdrhistogram")
8793 (uri (string-append "https://github.com/HdrHistogram/HdrHistogram/"
8794 "archive/HdrHistogram-" version ".tar.gz"))
8797 "1sicbmc3sr42nw93qbkb26q9rn33ag33k6k77phjc3j5h5gjffqv"))))
8798 (build-system ant-build-system)
8800 `(#:jar-name "java-hdrhistogram.jar"
8801 #:source-dir "src/main/java"
8803 (modify-phases %standard-phases
8804 (add-before 'configure 'set-version
8806 (let* ((version-java "src/main/java/org/HdrHistogram/Version.java")
8807 (template (string-append version-java ".template")))
8808 (copy-file template version-java)
8809 (substitute* version-java
8810 (("\\$VERSION\\$") ,version)
8811 (("\\$BUILD_TIME\\$") "0"))
8814 `(("junit" ,java-junit)
8815 ("hamcrest" ,java-hamcrest-core)))
8816 (home-page "https://hdrhistogram.github.io/HdrHistogram")
8817 (synopsis "High dynamic range histogram")
8818 (description "Hdrhistogram creates histograms that support
8819 recording and analyzing sampled data value counts across a configurable integer
8820 value range with configurable value precision within the range. Value precision
8821 is expressed as the number of significant digits in the value recording, and
8822 provides control over value quantization behavior across the value range and
8823 the subsequent value resolution at any given level.")
8824 (license license:public-domain)))
8826 (define-public java-cofoja
8828 (name "java-cofoja")
8833 (url "https://github.com/nhatminhle/cofoja.git")
8834 (commit (string-append "v" version))))
8835 (file-name (string-append "java-cofoja-" version "-checkout"))
8838 "0p7sz8y5xgpi5rx1qwn6587fkd52qr3ha3ybh14gqcyxhikl525w"))))
8839 (build-system ant-build-system)
8841 `(#:build-target "dist"
8842 #:test-target "test"
8845 (list "-Ddist.dir=dist")
8846 #:modules ((guix build ant-build-system)
8847 (guix build java-utils)
8852 (modify-phases %standard-phases
8853 ;; The bulid system ignores the class path the ant-build-system sets
8854 ;; up and instead expects to find all dependencies in the "lib"
8856 (add-after 'unpack 'create-libdir
8857 (lambda* (#:key inputs #:allow-other-keys)
8861 (let ((target (string-append "lib/" (basename file))))
8862 (unless (file-exists? target)
8863 (symlink file target))))
8864 (append-map (match-lambda
8866 (find-files dir "\\.jar$")))
8869 (replace 'install (install-jars "dist")))))
8871 `(("java-asm" ,java-asm)))
8873 `(("java-junit" ,java-junit)))
8874 (home-page "https://github.com/nhatminhle/cofoja")
8875 (synopsis "Contracts for Java")
8876 (description "Contracts for Java, or Cofoja for short, is a contract
8877 programming framework and test tool for Java, which uses annotation processing
8878 and bytecode instrumentation to provide run-time checking. (In particular,
8879 this is not a static analysis tool.)")
8880 (license license:lgpl3+)))
8882 (define-public java-aopalliance
8884 (name "java-aopalliance")
8888 ;; Note: this git repository is not official, but contains the
8889 ;; source code that is in the CVS repository. Downloading the
8890 ;; tarball from sourceforge is undeterministic, and the cvs download
8893 (url "https://github.com/hoverruan/aopalliance")
8894 (commit "0d7757ae204e5876f69431421fe9bc2a4f01e8a0")))
8895 (file-name (string-append name "-" version))
8898 "0rsg2b0v3hxlq2yk1i3m2gw3xwq689j3cwx9wbxvqfpdcjbca0qr"))))
8899 (build-system ant-build-system)
8901 `(#:jar-name "java-aopalliance.jar"
8903 #:tests? #f; no tests
8904 #:source-dir "aopalliance/src/main"))
8905 (home-page "http://aopalliance.sourceforge.net")
8906 (synopsis "Aspect-Oriented Programming")
8907 (description "The AOP Alliance project is a joint project between several
8908 software engineering people who are interested in Aspect-Oriented Programming
8910 (license license:public-domain)))
8912 (define-public java-javax-inject
8914 (name "java-javax-inject")
8918 (uri (string-append "https://github.com/javax-inject/javax-inject/"
8919 "archive/javax.inject-" version ".tar.gz"))
8922 "1ydrlvh2r7vr1g7lhjwy3w2dggpj9h6pix1lakkkgdywb365n6g0"))))
8923 (build-system ant-build-system)
8925 `(#:jar-name "java-javax-inject.jar"
8927 #:tests? #f)); no tests
8928 (home-page "http://github.com/javax-inject/javax-inject")
8929 (synopsis "JSR-330: Dependency Injection for Java")
8930 (description "This package specifies a means for obtaining objects in such
8931 a way as to maximize reusability, testability and maintainability compared to
8932 traditional approaches such as constructors, factories, and service locators
8933 (e.g., JNDI). This process, known as dependency injection, is beneficial to
8934 most nontrivial applications.
8936 Many types depend on other types. For example, a @var{Stopwatch} might depend
8937 on a @var{TimeSource}. The types on which a type depends are known as its
8938 dependencies. The process of finding an instance of a dependency to use at run
8939 time is known as resolving the dependency. If no such instance can be found,
8940 the dependency is said to be unsatisfied, and the application is broken.")
8941 (license license:asl2.0)))
8943 (define-public java-guice
8949 (uri (string-append "https://github.com/google/guice/archive/"
8951 (file-name (string-append name "-" version ".tar.gz"))
8952 (modules '((guix build utils)))
8955 (for-each delete-file (find-files "." ".*.jar"))))
8958 "0dwmqjzlavb144ywqqglj3h68hqszkff8ai0a42hyb5il0qh4rbp"))))
8959 (build-system ant-build-system)
8961 `(#:jar-name "java-guice.jar"
8963 #:tests? #f; FIXME: tests are not in a java sub directory
8964 #:source-dir "core/src"))
8966 `(("guava" ,java-guava)
8967 ("java-cglib" ,java-cglib)
8968 ("java-aopalliance" ,java-aopalliance)
8969 ("java-javax-inject" ,java-javax-inject)
8970 ("java-asm" ,java-asm)))
8971 (home-page "https://github.com/google/guice")
8972 (synopsis "Lightweight dependency injection framework")
8973 (description "Guice is a lightweight dependency injection framework fo
8975 (license license:asl2.0)))
8977 (define-public java-guice-servlet
8979 (inherit java-guice)
8980 (name "java-guice-servlet")
8982 `(#:jar-name "guice-servlet.jar"
8983 #:source-dir "extensions/servlet/src/"
8985 #:tests? #f)); FIXME: not in a java subdir
8987 `(("guice" ,java-guice)
8988 ("servlet" ,java-classpathx-servletapi)
8989 ,@(package-inputs java-guice)))))
8991 (define-public java-assertj
8993 (name "java-assertj")
8997 (uri (string-append "https://github.com/joel-costigliola/"
8998 "assertj-core/archive/"
8999 "assertj-core-" version ".tar.gz"))
9002 "1kf124fxskf548rklkg86294w2x6ajqrff94rrhyqns31danqkfz"))))
9003 (build-system ant-build-system)
9005 `(#:jar-name "java-assertj.jar"
9007 #:source-dir "src/main/java"
9008 #:tests? #f)); depends on tng-junit which depends on assertj
9010 `(("cglib" ,java-cglib)
9011 ("junit" ,java-junit)
9012 ("hamcrest" ,java-hamcrest-core)))
9014 `(("mockito" ,java-mockito-1)))
9015 (home-page "https://joel-costigliola.github.io/assertj/index.html")
9016 (synopsis "Fluent assertions for java")
9017 (description "AssertJ core is a Java library that provides a fluent
9018 interface for writing assertions. Its main goal is to improve test code
9019 readability and make maintenance of tests easier.")
9020 (license license:asl2.0)))
9022 (define-public java-jboss-javassist
9024 (name "java-jboss-javassist")
9028 (uri (string-append "https://github.com/jboss-javassist/javassist/"
9030 (string-map (lambda (x) (if (eq? x #\.) #\_ x)) version)
9034 "10lpcr3sbf7y6fq6fc2h2ik7rqrivwcy4747bg0kxhwszil3cfmf"))))
9035 (build-system ant-build-system)
9037 `(#:jar-name "java-jboss-javassist.jar"
9039 #:source-dir "src/main"
9040 #:tests? #f; FIXME: requires junit-awtui and junit-swingui from junit3
9042 (modify-phases %standard-phases
9043 (add-before 'configure 'remove-binary
9045 (delete-file "javassist.jar")
9048 `(("junit" ,java-junit)))
9049 (home-page "https://github.com/jboss-javassist/javassist")
9050 (synopsis "Java bytecode engineering toolkit")
9051 (description "Javassist (JAVA programming ASSISTant) makes Java bytecode
9052 manipulation simple. It is a class library for editing bytecodes in Java; it
9053 enables Java programs to define a new class at runtime and to modify a class
9054 file when the JVM loads it.")
9055 (license (list license:gpl2 license:cddl1.0)))); either gpl2 only or cddl.
9057 (define-public java-jcommander
9059 (name "java-jcommander")
9063 (uri (string-append "https://github.com/cbeust/jcommander/archive/"
9065 (file-name (string-append name "-" version ".tar.gz"))
9068 "1f5k2ckay6qjc3d3w3d7bc0p3cx3c7n6p6zxvw1kibqdr0q98wlx"))))
9069 (build-system ant-build-system)
9071 `(#:jar-name "java-jcommander.jar"
9073 #:tests? #f; requires testng which depends on jcommander
9074 #:source-dir "src/main/java"))
9075 (home-page "https://jcommander.org")
9076 (synopsis "Command line parameters parser")
9077 (description "JCommander is a very small Java framework that makes it
9078 trivial to parse command line parameters. Parameters are declared with
9080 (license license:asl2.0)))
9082 (define-public java-bsh
9088 (uri (string-append "https://github.com/beanshell/beanshell/archive/"
9090 (file-name (string-append name "-" version ".tar.gz"))
9093 "1bawkxk6jyc75hxvzkpz689h73cn3f222m0ar3nvb0dal2b85kfv"))))
9094 (build-system ant-build-system)
9096 `(#:build-target "jarall"
9097 #:test-target "junit-tests-all"
9099 (modify-phases %standard-phases
9101 (lambda* (#:key outputs #:allow-other-keys)
9102 (let ((share (string-append (assoc-ref outputs "out") "/share/java")))
9104 (copy-file "dist/bsh-2.0b6.jar" (string-append share "/bsh-2.0b6.jar"))
9106 (home-page "http://beanshell.org/")
9107 (synopsis "Lightweight Scripting for Java")
9108 (description "BeanShell is a small, free, embeddable Java source
9109 interpreter with object scripting language features, written in Java.
9110 BeanShell dynamically executes standard Java syntax and extends it with common
9111 scripting conveniences such as loose types, commands, and method closures like
9112 those in Perl and JavaScript.")
9113 (license license:asl2.0)))
9115 (define-public java-fest-util
9117 (name "java-fest-util")
9122 (url "https://github.com/alexruiz/fest-util/")
9123 (commit (string-append "fest-util-" version))))
9124 (file-name (git-file-name name version))
9127 "02kgal7v85snyyvcsxvn4qphid455f4smh2wri1il8d9asw0djbz"))))
9128 (build-system ant-build-system)
9130 `(#:jar-name "java-fest-util.jar"
9131 #:source-dir "src/main/java"))
9133 `(("junit" ,java-junit)
9134 ("hamcrest" ,java-hamcrest-core)))
9135 (home-page "https://github.com/alexruiz/fest-util")
9136 (synopsis "FEST common utilities")
9137 (description "Common utilities used in all FEST module.")
9138 (license license:asl2.0)))
9140 (define-public java-fest-test
9142 (name "java-fest-test")
9147 (url "https://github.com/alexruiz/fest-test/")
9148 (commit (string-append "fest-test-" version))))
9149 (file-name (git-file-name name version))
9152 "0mg1d2jfh7kbx2c40dchbjr6d8pv59snsyb13mfxsr7xk5n69qbn"))))
9153 (build-system ant-build-system)
9155 `(#:jar-name "java-fest-test.jar"
9156 #:source-dir "src/main/java"
9157 #:tests? #f)); no tests
9159 `(("junit" ,java-junit)))
9160 (home-page "https://github.com/alexruiz/fest-test")
9161 (synopsis "Common FEST testing infrastructure")
9162 (description "Fest-test contains the common FEST testing infrastructure.")
9163 (license license:asl2.0)))
9165 (define-public java-fest-assert
9167 (name "java-fest-assert")
9172 (url "https://github.com/alexruiz/fest-assert-2.x/")
9173 (commit (string-append "fest-assert-core-" version))))
9174 (file-name (git-file-name name version))
9177 "1cp8zzyag3s85fz2w68sda9zzaal1y5f9wl8g72wkm12an40w6by"))))
9178 (build-system ant-build-system)
9180 `(#:jar-name "java-fest-assert.jar"
9181 #:source-dir "src/main/java"
9186 ;; Unable to set MockitoNamingPolicy on cglib generator which creates FastClasses
9187 "**/MessageFormatter_format_Test.java"
9188 "**/internal/*/*_assert*_Test.java")))
9190 `(("java-fest-util" ,java-fest-util)))
9192 `(("java-junit" ,java-junit)
9193 ("java-fest-test" ,java-fest-test)
9194 ("java-hamcrest-core" ,java-hamcrest-core)
9195 ("java-mockito" ,java-mockito-1)
9196 ("java-cglib" ,java-cglib)
9197 ("java-objenesis" ,java-objenesis)
9198 ("java-asm" ,java-asm)))
9199 (home-page "https://github.com/alexruiz/fest-assert-2.x")
9200 (synopsis "FEST fluent assertions")
9201 (description "FEST-Assert provides a fluent interface for assertions.")
9202 (license license:asl2.0)))
9204 (define-public java-testng
9206 (name "java-testng")
9211 (url "https://github.com/cbeust/testng.git")
9213 (file-name (string-append name "-" version "-checkout"))
9216 "0y6vq30i5g276kw0v2bhbvci22ijg7ax49ap2611yqlhbs4d6dqv"))))
9217 (build-system ant-build-system)
9219 `(#:jdk ,icedtea-8; java.util.function
9220 #:jar-name "java-testng.jar"
9221 #:source-dir "src/main/java"
9223 (modify-phases %standard-phases
9224 ;; FIXME: I don't know why these tests fail
9225 (add-after 'unpack 'delete-failing-tests
9227 (substitute* "src/test/resources/testng.xml"
9228 (("<class name=\"test.configuration.github1625.TestRunnerIssue1625\"/>") "")
9229 (("<class name=\"test.serviceloader.ServiceLoaderTest\" />") ""))
9231 ;; We don't have groovy
9232 (add-after 'unpack 'delete-groovy-tests
9234 (delete-file-recursively "src/test/java/test/dependent/issue1648/")
9235 (substitute* "src/test/resources/testng.xml"
9236 (("<class name=\"test.dependent.issue1648.TestRunner\"/>") ""))
9238 (add-before 'build 'copy-resources
9240 (copy-recursively "src/main/resources" "build/classes")
9242 (add-before 'check 'copy-test-resources
9244 (copy-recursively "src/test/resources" "build/test-classes")
9248 (invoke "ant" "compile-tests")
9249 ;; we don't have groovy
9250 (substitute* "src/test/resources/testng.xml"
9251 (("<class name=\"test.groovy.GroovyTest\" />") ""))
9252 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
9254 ":build/test-classes")
9255 "-Dtest.resources.dir=src/test/resources"
9256 "org.testng.TestNG" "src/test/resources/testng.xml"))))))
9258 `(("junit" ,java-junit)
9259 ("java-jsr305" ,java-jsr305)
9260 ("java-bsh" ,java-bsh)
9261 ("java-jcommander" ,java-jcommander)
9262 ("java-guice" ,java-guice)
9263 ("snakeyaml" ,java-snakeyaml)))
9265 `(("guava" ,java-guava)
9266 ("java-javax-inject" ,java-javax-inject)
9267 ("java-hamcrest" ,java-hamcrest-all)
9268 ("java-assertj" ,java-assertj)
9269 ("java-mockito" ,java-mockito-1)
9270 ("cglib" ,java-cglib)
9272 ("aopalliance" ,java-aopalliance)))
9273 (home-page "https://testng.org")
9274 (synopsis "Testing framework")
9275 (description "TestNG is a testing framework inspired from JUnit and NUnit
9276 but introducing some new functionalities that make it more powerful and easier
9278 (license license:asl2.0)))
9280 (define-public java-jnacl
9281 (let ((commit "094e819afdd63ea81a499b3bcb42a271006bebd9")
9285 (version (string-append "0.1.0-" revision "." (string-take commit 7)))
9289 (url "https://github.com/neilalexander/jnacl.git")
9291 (file-name (git-file-name name version))
9294 "1d6g6xhn83byv5943n7935wwjsk0ibk0qdvqgr699qqgqqmwisbb"))))
9295 (build-system ant-build-system)
9297 `(#:jar-name "jnacl.jar"
9298 #:source-dir "src/main/java"
9301 (modify-phases %standard-phases
9302 (add-before 'build 'fix-tests
9304 (substitute* '("src/test/java/com/neilalexander/jnacl/NaClTest.java"
9305 "src/test/java/com/neilalexander/jnacl/NaclSecretBoxTest.java")
9306 (("assertions.Assertions") "assertions.api.Assertions"))
9310 (invoke "ant" "compile-tests")
9311 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
9313 ":build/test-classes")
9314 "org.testng.TestNG" "-testclass"
9315 "build/test-classes/com/neilalexander/jnacl/NaclSecretBoxTest.class")
9316 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
9318 ":build/test-classes")
9319 "org.testng.TestNG" "-testclass"
9320 "build/test-classes/com/neilalexander/jnacl/NaClTest.class"))))))
9322 `(("java-testng" ,java-testng)
9323 ("java-fest-util" ,java-fest-util)
9324 ("java-fest-assert" ,java-fest-assert)))
9325 (home-page "https://github.com/neilalexander/jnacl")
9326 (synopsis "Java implementation of NaCl")
9327 (description "Pure Java implementation of the NaCl: Networking and
9328 Cryptography library.")
9329 (license license:bsd-2))))
9331 (define-public java-mvel2
9337 (uri (string-append "https://github.com/mvel/mvel/archive/mvel2-"
9338 version ".Final.tar.gz"))
9341 "01ph5s9gm16l2qz58lg21w6fna7xmmrj7f9bzqr1jim7h9557d3z"))))
9342 (build-system ant-build-system)
9344 `(#:jar-name "mvel2.jar"
9345 #:source-dir "src/main/java"
9347 (list "**/Abstract*.java"
9348 ;; Base class with no tests
9349 "**/MVELThreadTest.java")
9351 (modify-phases %standard-phases
9352 (add-after 'install 'install-bin
9353 (lambda* (#:key outputs #:allow-other-keys)
9354 (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
9356 (with-output-to-file (string-append bin "/mvel2")
9360 "#!" (which "bash") "\n"
9361 "if [ \"$#\" -ne \"2\" ]; then\n"
9362 "echo 'Usage: mvel2 <script> <out.dir>'\n"
9365 "java -Dout.dir=$2 -cp " (getenv "CLASSPATH")
9366 ":" (assoc-ref outputs "out") "/share/java/mvel2.jar"
9367 " org.mvel2.sh.Main $1"))))
9368 (chmod (string-append bin "/mvel2") #o755))
9371 `(("junit" ,java-junit)
9372 ("hamcrest" ,java-hamcrest-core)))
9373 (home-page "https://github.com/mvel/mvel")
9374 (synopsis "MVFLEX Expression Language")
9375 (description "MVEL has largely been inspired by Java syntax, but has some
9376 fundamental differences aimed at making it more efficient as an expression
9377 language, such as operators that directly support collection, array and string
9378 matching, as well as regular expressions. MVEL is used to evaluate expressions
9379 written using Java syntax.
9381 In addition to the expression language, MVEL serves as a templating language for
9382 configuration and string construction.")
9383 (license license:asl2.0)))
9385 (define-public java-commons-jexl-2
9387 (name "java-commons-jexl")
9391 (uri (string-append "mirror://apache/commons/jexl/source/"
9392 "commons-jexl-" version "-src.tar.gz"))
9395 "1ai7632bwwaxglb0nbpblpr2jw5g20afrsaq372ipkphi3ncy1jz"))))
9396 (build-system ant-build-system)
9398 `(#:jar-name "commons-jexl-2.jar"
9400 #:source-dir "src/main/java"
9402 (modify-phases %standard-phases
9403 (add-before 'check 'disable-broken-tests
9404 (lambda* (#:key inputs #:allow-other-keys)
9405 (with-directory-excursion "src/test/java/org/apache/commons/jexl2/"
9406 (substitute* "ArithmeticTest.java"
9407 (("asserter.assertExpression\\(\"3 / 0\"") "//")
9408 (("asserter.assertExpression\\(\"imanull") "//"))
9409 ;; This test fails with "ambiguous method invocation"
9410 (delete-file "CacheTest.java")
9411 ;; This test doesn't have access to the temp directory
9412 (substitute* "ClassCreatorTest.java"
9413 (("java.io.tmpdir") "user.dir"))
9414 ;; This test fails in trying to detect whether it can run.
9415 (substitute* "ClassCreator.java"
9416 (("boolean canRun =.*") "boolean canRun = false;\n"))
9417 ;; ...and these tests depend on it.
9418 (delete-file "scripting/JexlScriptEngineOptionalTest.java")
9419 (delete-file "scripting/JexlScriptEngineTest.java"))
9421 (add-before 'build 'run-javacc
9423 (with-directory-excursion "src/main/java/org/apache/commons/jexl2/parser/"
9424 (invoke "java" "jjtree" "Parser.jjt")
9425 (invoke "java" "javacc" "Parser.jj"))
9428 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)))
9430 `(("java-junit" ,java-junit)
9431 ("java-hamcrest-core" ,java-hamcrest-core)
9432 ("javacc" ,javacc-4)))
9433 (home-page "https://commons.apache.org/proper/commons-jexl/")
9434 (synopsis "Java Expression Language ")
9435 (description "JEXL is a library intended to facilitate the implementation
9436 of dynamic and scripting features in applications and frameworks written in
9437 Java. JEXL implements an Expression Language based on some extensions to the
9438 JSTL Expression Language supporting most of the constructs seen in
9439 shell-script or ECMAScript. Its goal is to expose scripting features usable
9440 by technical operatives or consultants working with enterprise platforms.")
9441 (license license:asl2.0)))
9443 (define-public java-lz4
9450 (url "https://github.com/lz4/lz4-java")
9452 (file-name (git-file-name name version))
9455 "0ydjakhv3cz34mfvv14qrh2ksdxifgjwwagjy7r46qr3f68hnf6y"))))
9456 (build-system ant-build-system)
9458 `(#:jar-name "lz4.jar"
9460 #:source-dir "src/java:src/java-unsafe"
9461 #:tests? #f; FIXME: requires more dependencies
9463 (modify-phases %standard-phases
9464 (add-after 'unpack 'make-files-writable
9466 (for-each make-file-writable (find-files "."))
9468 (add-before 'configure 'generate-source
9470 (with-directory-excursion "src/build/source_templates"
9471 (invoke "mvel2" "../gen_sources.mvel" "../../java"))
9474 `(("mvel" ,java-mvel2)))
9475 (home-page "https://jpountz.github.io/lz4-java")
9476 (synopsis "Compression algorithm")
9477 (description "LZ4 - Java is a Java port of the popular lz4 compression
9478 algorithms and xxHash hashing algorithm.")
9479 (license license:asl2.0)))
9481 (define-public java-bouncycastle
9483 (name "java-bouncycastle")
9488 (url "http://git.bouncycastle.org/repositories/bc-java")
9489 ;(url "https://github.com/bcgit/bc-java")
9490 (commit (string-append "r1rv" (substring version 2 4)))))
9491 (file-name (git-file-name name version))
9494 "1m921a1ac2dl797ffzg3d4j97ch308f25spb4jgsj3npfmmys5gb"))
9495 (modules '((guix build utils)))
9498 (for-each delete-file
9499 (find-files "." "\\.jar$"))
9501 (build-system ant-build-system)
9506 (modify-phases %standard-phases
9509 (invoke "ant" "-f" "ant/jdk15+.xml" "build-provider")
9510 (invoke "ant" "-f" "ant/jdk15+.xml" "build")))
9511 ;; FIXME: the tests freeze.
9514 ;; (invoke "ant" "-f" "ant/jdk15+.xml" "test")))
9516 (install-jars "build/artifacts/jdk1.5/jars")))))
9518 `(("java-javax-mail" ,java-javax-mail)))
9521 ("junit" ,java-junit)
9522 ("java-native-access" ,java-native-access)
9523 ("java-native-access-platform" ,java-native-access-platform)))
9524 (home-page "https://www.bouncycastle.org")
9525 (synopsis "Cryptographic library")
9526 (description "Bouncy Castle is a cryptographic library for the Java
9527 programming language.")
9528 (license license:expat)))
9530 (define-public java-lmax-disruptor
9532 (name "java-lmax-disruptor")
9536 (uri (string-append "https://github.com/LMAX-Exchange/disruptor/"
9537 "archive/" version ".tar.gz"))
9538 (file-name (string-append name "-" version ".tar.gz"))
9541 "17da2gwj5abnlsfgn2xqjk5lgzbg4vkb0hdv2dvc8r2fx4bi7w3g"))))
9542 (build-system ant-build-system)
9544 `(#:jar-name "java-lmax-disruptor.jar"
9546 #:tests? #f)); tests hang
9548 `(("junit" ,java-junit)
9549 ("java-hdrhistogram" ,java-hdrhistogram)
9550 ("java-jmock" ,java-jmock)
9551 ("java-jmock-legacy" ,java-jmock-legacy)
9552 ("java-jmock-junit4" ,java-jmock-junit4)
9553 ("java-hamcrest-all" ,java-hamcrest-all)))
9555 `(("cglib" ,java-cglib)
9556 ("objenesis" ,java-objenesis)
9558 (home-page "https://www.lmax.com/disruptor")
9559 (synopsis "High performance inter-thread communication")
9560 (description "LMAX Disruptor is a software pattern and software component
9561 for high performance inter-thread communication that avoids the need for
9562 message queues or resource locking.")
9563 (license license:asl2.0)))
9565 (define-public java-commons-bcel
9567 (name "java-commons-bcel")
9571 (uri (string-append "mirror://apache/commons/bcel/source/bcel-"
9572 version "-src.tar.gz"))
9575 "0j3x1rxd673k07psclk8k13rqh0x0mf2yy5qiwkiw4z3afa568jy"))))
9576 (build-system ant-build-system)
9578 `(#:jar-name "bcel.jar"
9580 #:source-dir "src/main/java"
9581 #:test-dir "src/test/java"
9582 ;; FIXME: Tests require the unpackaged jna.
9584 (home-page "https://commons.apache.org/proper/commons-bcel/")
9585 (synopsis "Byte code engineering library")
9586 (description "The Byte Code Engineering Library (Apache Commons BCEL) is
9587 intended to give users a convenient way to analyze, create, and
9588 manipulate (binary) Java class files. Classes are represented by objects
9589 which contain all the symbolic information of the given class: methods, fields
9590 and byte code instructions, in particular.
9592 Such objects can be read from an existing file, be transformed by a
9593 program (e.g. a class loader at run-time) and written to a file again. An
9594 even more interesting application is the creation of classes from scratch at
9595 run-time. The @dfn{Byte Code Engineering Library} (BCEL) may be also useful
9596 if you want to learn about the @dfn{Java Virtual Machine} (JVM) and the format
9597 of Java @code{.class} files.")
9598 (license license:asl2.0)))
9600 (define-public java-xerial-core
9602 (name "java-xerial-core")
9606 (uri (string-append "https://github.com/xerial/xerial-java/archive/"
9608 (file-name (string-append name "-" version ".tar.gz"))
9611 "0d3g863i41bgalpa4xr3vm1h140l091n8iwgq5qvby5yivns9y8d"))))
9612 (build-system ant-build-system)
9614 `(#:jar-name "xerial-core.jar"
9615 #:source-dir "xerial-core/src/main/java"
9616 #:test-dir "xerial-core/src/test"
9618 (modify-phases %standard-phases
9619 (add-before 'build 'copy-resources
9621 (copy-recursively "xerial-core/src/main/resources"
9625 `(("junit" ,java-junit)
9626 ("hamcrest" ,java-hamcrest-core)))
9627 (home-page "https://github.com/xerial/xerial-java")
9628 (synopsis "Data management libraries for Java")
9629 (description "Xerial is a set of data management libraries for the Java
9630 programming language. The ultimate goal of the Xerial project is to manage
9631 everything as database, including class objects, text format data, data
9633 (license license:asl2.0)))
9635 (define-public java-powermock-reflect
9637 (name "java-powermock-reflect")
9641 (uri (string-append "https://github.com/powermock/powermock/"
9642 "archive/powermock-" version ".tar.gz"))
9643 (file-name (string-append name "-" version ".tar.gz"))
9646 "0sbgi5vqq7k72wzcdjb20s370vyd4hsbnx71pzb8ishml3gy7fwy"))
9648 (search-patches "java-powermock-fix-java-files.patch"))))
9649 (build-system ant-build-system)
9651 `(#:jar-name "java-powermock-reflect.jar"
9653 #:source-dir "powermock-reflect/src/main/java"
9654 #:test-dir "powermock-reflect/src/test"))
9656 `(("java-objenesis" ,java-objenesis)))
9658 `(("junit" ,java-junit)
9659 ("cglib" ,java-cglib)
9661 ("hamcrest" ,java-hamcrest-core)
9662 ("assertj" ,java-assertj)))
9663 (home-page "https://github.com/powermock/powermock")
9664 (synopsis "Mock library extension framework")
9665 (description "PowerMock is a framework that extends other mock libraries
9666 such as EasyMock with more powerful capabilities. PowerMock uses a custom
9667 classloader and bytecode manipulation to enable mocking of static methods,
9668 constructors, final classes and methods, private methods, removal of static
9669 initializers and more. By using a custom classloader no changes need to be
9670 done to the IDE or continuous integration servers which simplifies adoption.")
9671 (license license:asl2.0)))
9673 (define-public java-powermock-core
9675 (inherit java-powermock-reflect)
9676 (name "java-powermock-core")
9678 `(#:jar-name "java-powermock-core.jar"
9679 #:source-dir "powermock-core/src/main/java"
9680 #:test-dir "powermock-core/src/test"
9681 #:tests? #f; requires powermock-api
9684 (modify-phases %standard-phases
9685 (add-before 'build 'copy-resources
9687 (copy-recursively "powermock-core/src/main/resources"
9691 `(("reflect" ,java-powermock-reflect)
9692 ("javassist" ,java-jboss-javassist)))
9694 `(("junit" ,java-junit)
9695 ("assertj" ,java-assertj)
9696 ("mockito" ,java-mockito-1)))))
9698 (define-public java-powermock-api-support
9700 (inherit java-powermock-reflect)
9701 (name "java-powermock-api-support")
9702 (build-system ant-build-system)
9704 `(#:jar-name "java-powermock-api-support.jar"
9706 #:source-dir "powermock-api/powermock-api-support/src/main/java"
9707 #:tests? #f)); no tests
9709 `(("core" ,java-powermock-core)
9710 ("reflect" ,java-powermock-reflect)))))
9712 (define-public java-powermock-modules-junit4-common
9714 (inherit java-powermock-reflect)
9715 (name "java-powermock-modules-junit4-common")
9716 (build-system ant-build-system)
9718 `(#:jar-name "java-powermock-modules-junit4-common.jar"
9720 #:source-dir "powermock-modules/powermock-module-junit4-common/src/main/java"
9721 #:test-dir "powermock-modules/powermock-module-junit4-common/src/test"))
9723 `(("core" ,java-powermock-core)
9724 ("easymock" ,java-easymock)
9725 ("reflect" ,java-powermock-reflect)
9726 ("hamcrest" ,java-hamcrest-core)
9727 ("cglib" ,java-cglib)))))
9729 (define-public java-powermock-modules-junit4
9731 (inherit java-powermock-reflect)
9732 (name "java-powermock-modules-junit4")
9733 (build-system ant-build-system)
9735 `(#:jar-name "java-powermock-modules-junit4.jar"
9737 #:source-dir "powermock-modules/powermock-module-junit4/src/main/java"
9738 #:test-dir "powermock-modules/powermock-module-junit4/src/test"
9740 (modify-phases %standard-phases
9741 (add-before 'build 'fix-junit-detection
9743 ;; Our junit version is 4.12-SNAPSHOT
9744 (substitute* (find-files "powermock-modules/powermock-module-junit4"
9745 "PowerMockJUnit4MethodValidator.java")
9746 (("4.12") "4.12-SNAPSHOT"))
9749 `(("core" ,java-powermock-core)
9750 ("reflect" ,java-powermock-reflect)
9751 ("common" ,java-powermock-modules-junit4-common)
9752 ("cglib" ,java-cglib)))
9754 `(("easymock" ,java-easymock)
9755 ("hamcrest" ,java-hamcrest-core)
9756 ("objenesis" ,java-objenesis)
9758 ("junit" ,java-junit)))))
9760 (define-public java-powermock-api-easymock
9762 (inherit java-powermock-reflect)
9763 (name "java-powermock-api-easymock")
9764 (build-system ant-build-system)
9766 `(#:jar-name "java-powermock-api-easymock.jar"
9768 #:source-dir "powermock-api/powermock-api-easymock/src/main/java"
9769 #:tests? #f; no tests
9771 (modify-phases %standard-phases
9772 (add-before 'build 'fix-file
9774 ;; FIXME: This looks wrong, but it fixes a build error.
9775 (with-directory-excursion "powermock-api/powermock-api-easymock"
9776 (substitute* "src/main/java/org/powermock/api/easymock/PowerMock.java"
9777 (("classLoader instanceof MockClassLoader") "false")
9778 (("\\(\\(MockClassLoader\\) classLoader\\).*;") ";")))
9781 `(("core" ,java-powermock-core)
9782 ("easymock" ,java-easymock)
9783 ("reflect" ,java-powermock-reflect)
9784 ("support" ,java-powermock-api-support)
9785 ("cglib" ,java-cglib)))))
9787 (define-public java-jboss-jms-api-spec
9789 (name "java-jboss-jms-api-spec")
9793 (uri (string-append "https://github.com/jboss/jboss-jms-api_spec/"
9794 "archive/jboss-jms-api_" version
9795 "_spec-1.0.1.Final.tar.gz"))
9798 "07bqblw9kq2i8q92bz70fvavq5xjfkaixl8xa0m0cypjgy82rb7m"))))
9799 (build-system ant-build-system)
9801 `(#:jar-name "java-jboss-jms-api_spec.jar"
9804 #:tests? #f)); no tests
9805 (home-page "https://github.com/jboss/jboss-jms-api_spec")
9806 (synopsis "Java Message Service API specification")
9807 (description "Java Message Service (JMS) API is used to send messages
9808 messages between two or more clients. It is a messaging standard that allows
9809 application components to create, send, receive, and read messages.")
9810 ; either gpl2 only with GPL Classpath Exception, or cddl.
9811 (license (list license:gpl2 license:cddl1.0))))
9813 (define-public java-mail
9819 (uri (string-append "https://github.com/javaee/javamail/archive/"
9820 "JAVAMAIL-1_6_0.tar.gz"))
9823 "1b4rg7fpj50ld90a71iz2m4gm3f5cnw18p3q3rbrrryjip46kx92"))))
9824 (build-system ant-build-system)
9826 `(#:jar-name "java-mail.jar"
9828 #:source-dir "mail/src/main/java"
9829 #:test-dir "mail/src/test"
9831 (list "**/CollectorFormatterTest.java"
9832 "**/CompactFormatterTest.java"
9833 "**/DurationFilterTest.java"
9834 "**/MailHandlerTest.java"
9835 "**/GetLocalAddressTest.java"
9836 ;; FIXME: both end with:
9837 ;; java.lang.ClassNotFoundException:
9838 ;; javax.mail.internet.MimeMultipartParseTest
9839 "**/MimeMultipartParseTest.java"
9840 "**/SearchTermSerializationTest.java")
9842 (modify-phases %standard-phases
9843 (add-before 'configure 'move-version.java
9845 (copy-file "mail/src/main/resources/javax/mail/Version.java"
9846 "mail/src/main/java/javax/mail/Version.java")
9848 (add-before 'build 'copy-resources
9850 (copy-recursively "mail/src/main/resources/META-INF"
9851 "build/classes/META-INF")
9854 `(("junit" ,java-junit)
9855 ("hamcrest" ,java-hamcrest-core)))
9856 (home-page "https://javaee.github.io/javamail/")
9857 (synopsis "Mail-related functionnalities in Java")
9858 (description "The JavaMail API provides a platform-independent and
9859 protocol-independent framework to build mail and messaging applications.")
9860 ;; General Public License Version 2 only ("GPL") or the Common Development
9861 ;; and Distribution License("CDDL")
9862 (license (list license:cddl1.1
9863 license:gpl2)))); with classpath exception
9865 (define-public java-jeromq
9867 (name "java-jeromq")
9872 (url "https://github.com/zeromq/jeromq.git")
9873 (commit (string-append "v" version))))
9874 (file-name (string-append name "-" version "-checkout"))
9877 "1gxkp7lv2ahymgrqdw94ncq54bmp4m4sw5m1x9gkp7l5bxn0xsyj"))
9878 (patches (search-patches "java-jeromq-fix-tests.patch"))))
9879 (build-system ant-build-system)
9881 `(#:jar-name "java-jeromq.jar"
9882 #:source-dir "src/main/java"
9888 "**/ZBeaconTest.java"
9890 "**/DealerSpecTest.java"
9891 "**/CustomDecoderTest.java"
9892 "**/CustomEncoderTest.java"
9893 "**/ConnectRidTest.java"
9894 "**/ReqSpecTest.java"
9895 "**/PushPullSpecTest.java"
9896 "**/PubSubHwmTest.java"
9897 "**/RouterSpecTest.java"
9898 "**/ProxyTest.java")))
9900 `(("java-jnacl" ,java-jnacl)))
9902 `(("java-hamcrest-core" ,java-hamcrest-core)
9903 ("junit" ,java-junit)))
9904 (home-page "http://zeromq.org/bindings:java")
9905 (synopsis "Java binding for 0MQ")
9906 (description "Jeromq provides the java bindings for 0MQ.")
9907 (license license:mpl2.0)))
9909 (define-public java-kafka-clients
9911 (name "java-kafka-clients")
9915 (uri (string-append "mirror://apache/kafka/" version "/kafka-"
9916 version "-src.tgz"))
9919 "1yxmnsmliwm7671q5yy9bl4jdqyyn00n26cggz9brwczx80w1vfq"))))
9920 (build-system ant-build-system)
9922 `(#:jar-name "java-kafka-clients.jar"
9924 #:source-dir "clients/src/main/java"
9925 #:test-dir "clients/src/test"
9928 ;; This file does not contain a class
9929 "**/IntegrationTest.java"
9931 "**/ClientUtilsTest.java"
9932 ;; End with errors that seem related to our powermock
9933 "**/KafkaProducerTest.java"
9934 "**/BufferPoolTest.java")))
9936 `(("java-slf4j-api" ,java-slf4j-api)
9937 ("java-lz4" ,java-lz4)))
9939 `(("junit" ,java-junit)
9940 ("hamcrest" ,java-hamcrest-all)
9941 ("objenesis" ,java-objenesis)
9943 ("cglib" ,java-cglib)
9944 ("javassist" ,java-jboss-javassist)
9945 ("snappy" ,java-snappy)
9946 ("easymock" ,java-easymock)
9947 ("powermock" ,java-powermock-core)
9948 ("powermock-easymock" ,java-powermock-api-easymock)
9949 ("powermock-junit4-common" ,java-powermock-modules-junit4-common)
9950 ("powermock-junit4" ,java-powermock-modules-junit4)
9951 ("powermock-support" ,java-powermock-api-support)
9952 ("java-bouncycastle" ,java-bouncycastle)))
9953 (home-page "https://kafka.apache.org")
9954 (synopsis "Distributed streaming platform")
9955 (description "Kafka is a distributed streaming platform, which means:
9957 @item it can publish and subscribe to streams of records;
9958 @item it can store streams of records in a fault-tolerant way;
9959 @item it can process streams of records as they occur.
9961 ;; Either cddl or gpl2 only.
9962 (license (list license:cddl1.1; actually cddl1.1
9963 license:gpl2)))); with classpath exception
9965 (define-public java-jdom
9971 (uri (string-append "http://jdom.org/dist/binary/archive/jdom-"
9975 "07wdpm3jwwc9q38kmdw40fvbmv6jzjrkrf8m0zqs58f79a672wfl"))))
9976 (build-system ant-build-system)
9978 `(#:build-target "package"
9979 #:tests? #f; tests are run as part of the build process
9981 (modify-phases %standard-phases
9983 (install-jars "build")))))
9984 (home-page "http://jdom.org/")
9985 (synopsis "Access, manipulate, and output XML data")
9986 (description "Java-based solution for accessing, manipulating, and
9987 outputting XML data from Java code.")
9988 (license license:bsd-4)))
9990 (define-public java-geronimo-xbean-reflect
9992 (name "java-geronimo-xbean-reflect")
9997 (url "https://svn.apache.org/repos/asf/geronimo/xbean/tags/xbean-4.5/")
9998 (revision 1807396)))
9999 (file-name (string-append name "-" version))
10002 "18q3i6jgm6rkw8aysfgihgywrdc5nvijrwnslmi3ww497jvri6ja"))))
10003 (build-system ant-build-system)
10005 `(#:jar-name "geronimo-xbean-reflect.jar"
10006 #:source-dir "xbean-reflect/src/main/java"
10007 #:test-dir "xbean-reflect/src/test"
10010 (list "**/Abstract*.java" "**/AsmParameterNameLoaderTest.java"
10011 "**/ObjectRecipeTest.java" "**/ParameterNameLoaderTest.java"
10012 "**/RecipeHelperTest.java" "**/XbeanAsmParameterNameLoaderTest.java")
10014 (modify-phases %standard-phases
10015 (add-before 'build 'fix-source
10017 (let ((dir "xbean-reflect/src/main/java/org/apache/xbean/recipe/"))
10018 ;; org.apache.xbean.asm6 is actually repackaged java-asm
10019 (substitute* (string-append dir "XbeanAsmParameterNameLoader.java")
10020 (("org.apache.xbean.asm5") "org.objectweb.asm"))
10023 `(("asm" ,java-asm)
10024 ("log4j" ,java-log4j-api)
10025 ("log4j-1.2" ,java-log4j-1.2-api)
10026 ("log4j-core" ,java-log4j-core)
10027 ("logging" ,java-commons-logging-minimal)))
10029 `(("junit" ,java-junit)))
10030 (home-page "https://geronimo.apache.org/maven/xbean/3.6/xbean-reflect/")
10031 (synopsis "Dependency injection helper")
10032 (description "Xbean-reflect provides very flexible ways to create objects
10033 and graphs of objects for dependency injection frameworks")
10034 (license license:asl2.0)))
10036 (define-public java-geronimo-xbean-bundleutils
10038 (inherit java-geronimo-xbean-reflect)
10039 (name "java-geronimo-xbean-bundleutils")
10041 `(#:jar-name "geronimo-xbean-bundleutils.jar"
10042 #:source-dir "xbean-bundleutils/src/main/java"
10043 #:test-dir "xbean-bundleutils/src/test"
10045 (modify-phases %standard-phases
10046 (add-before 'build 'fix-java
10048 ;; We use a more recent version of osgi, so this file requires
10049 ;; more interface method implementations.
10050 (substitute* "xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/DelegatingBundleContext.java"
10051 (("import org.osgi.framework.ServiceRegistration;")
10052 "import org.osgi.framework.ServiceRegistration;
10053 import org.osgi.framework.ServiceFactory;
10054 import java.util.Collection;
10055 import org.osgi.framework.ServiceObjects;")
10056 (("public Bundle getBundle\\(\\)")
10058 public <S> ServiceObjects<S> getServiceObjects(ServiceReference<S> reference) {
10059 throw new UnsupportedOperationException();
10062 public <S> ServiceRegistration<S> registerService(Class<S> clazz,
10063 ServiceFactory<S> factory, Dictionary<String, ?> properties) {
10064 throw new UnsupportedOperationException();
10066 public Bundle getBundle()"))
10069 `(("java-slf4j" ,java-slf4j-api)
10070 ("java-asm" ,java-asm)
10071 ("java-osgi-framework" ,java-osgi-framework)
10072 ("java-eclipse-osgi" ,java-eclipse-osgi)
10073 ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin)))))
10075 (define-public java-geronimo-xbean-asm-util
10077 (inherit java-geronimo-xbean-reflect)
10078 (name "java-geronimo-xbean-asm-util")
10080 `(#:jar-name "geronimo-xbean-asm-util.jar"
10081 #:source-dir "xbean-asm-util/src/main/java"
10082 #:tests? #f)); no tests
10084 `(("java-asm" ,java-asm)))
10085 (native-inputs '())))
10087 (define-public java-geronimo-xbean-finder
10089 (inherit java-geronimo-xbean-reflect)
10090 (name "java-geronimo-xbean-finder")
10092 `(#:jar-name "geronimo-xbean-finder.jar"
10093 #:source-dir "xbean-finder/src/main/java"
10094 #:test-dir "xbean-finder/src/test"))
10096 `(("java-slf4j-api" ,java-slf4j-api)
10097 ("java-asm" ,java-asm)
10098 ("java-geronimo-xbean-bundleutils" ,java-geronimo-xbean-bundleutils)
10099 ("java-geronimo-xbean-asm-util" ,java-geronimo-xbean-asm-util)
10100 ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin)
10101 ("java-osgi-framework" ,java-osgi-framework)))
10103 `(("java-junit" ,java-junit)
10104 ("java-hamcrest-core" ,java-hamcrest-core)))))
10106 (define-public java-gson
10112 (uri (string-append "https://github.com/google/gson/archive/"
10113 "gson-parent-" version ".tar.gz"))
10116 "1j4qnp7v046q0k48c4kyf69sxaasx2h949d3cqwsm3kzxms3x0f9"))))
10117 (build-system ant-build-system)
10119 `(#:jar-name "gson.jar"
10120 #:source-dir "gson/src/main/java"
10121 #:test-dir "gson/src/test"))
10123 `(("java-junit" ,java-junit)
10124 ("java-hamcrest-core" ,java-hamcrest-core)))
10125 (home-page "https://github.com/google/gson")
10126 (synopsis "Java serialization/deserialization library from/to JSON")
10127 (description "Gson is a Java library that can be used to convert Java
10128 Objects into their JSON representation. It can also be used to convert a JSON
10129 string to an equivalent Java object. Gson can work with arbitrary Java objects
10130 including pre-existing objects that you do not have source-code of.")
10131 (license license:asl2.0)))
10133 (define-public java-hawtjni
10135 (name "java-hawtjni")
10139 (uri (string-append "https://github.com/fusesource/hawtjni/archive/"
10140 "hawtjni-project-" version ".tar.gz"))
10143 "1bqfd732rmh6svyx17fpw9175gc9gzkcbyps2yyrf50c3zzjas6g"))))
10144 (build-system ant-build-system)
10146 `(#:jar-name "hawtjni.jar"
10147 #:source-dir "hawtjni-generator/src/main/java:hawtjni-runtime/src/main/java"
10148 #:tests? #f; no tests
10150 (modify-phases %standard-phases
10151 (add-before 'build 'build-native
10152 (lambda* (#:key inputs #:allow-other-keys)
10153 (let ((include (string-append "-I" (assoc-ref inputs "jdk") "/include/linux")))
10154 (with-directory-excursion "hawtjni-generator/src/main/resources/"
10155 (invoke "gcc" "-c" "hawtjni.c" "-o" "hawtjni.o"
10156 "-fPIC" "-O2" include)
10157 (invoke "gcc" "-c" "hawtjni-callback.c" "-o" "hawtjni-callback.o"
10158 "-fPIC" "-O2" include)
10159 (invoke "gcc" "-o" "libhawtjni.so" "-shared"
10160 "hawtjni.o" "hawtjni-callback.o")))
10162 (add-after 'install 'install-native
10163 (lambda* (#:key outputs #:allow-other-keys)
10164 (let* ((out (assoc-ref outputs "out"))
10165 (lib (string-append out "/lib"))
10166 (inc (string-append out "/include")))
10167 (with-directory-excursion "hawtjni-generator/src/main/resources/"
10168 (install-file "libhawtjni.so" lib)
10169 (install-file "hawtjni.h" inc)))
10172 `(("java-commons-cli" ,java-commons-cli)
10173 ("java-asm" ,java-asm)
10174 ("java-geronimo-xbean-finder" ,java-geronimo-xbean-finder)))
10175 (home-page "https://fusesource.github.io/hawtjni/")
10176 (synopsis "JNI code generator")
10177 (description "HawtJNI is a code generator that produces the JNI code needed
10178 to implement Java native methods. It is based on the jnigen code generator
10179 that is part of the SWT Tools project.")
10180 (license license:asl2.0)))
10182 (define-public java-jansi-native
10184 (name "java-jansi-native")
10188 (uri (string-append "https://github.com/fusesource/jansi-native/"
10189 "archive/jansi-native-" version ".tar.gz"))
10192 "0j2ydlgxbzbgshqkwghbxxxnbnx1mmjgd6k5fw6xfvxw1z956yqf"))))
10193 (build-system ant-build-system)
10195 `(#:jar-name "jansi-native.jar"
10196 #:source-dir "src/main/java"
10197 #:tests? #f; no tests
10199 (modify-phases %standard-phases
10200 (add-before 'build 'build-native
10201 (lambda* (#:key inputs #:allow-other-keys)
10202 ;; there are more required files for windows in windows/
10203 (with-directory-excursion "src/main/native-package/src"
10204 (substitute* "jansi_ttyname.c"
10205 (("#include \"jansi_.*") ""))
10206 (invoke "gcc" "-c" "jansi_ttyname.c" "-o" "jansi_ttyname.o"
10207 (string-append "-I" (assoc-ref inputs "java-hawtjni")
10209 (string-append "-I" (assoc-ref inputs "jdk")
10212 (invoke "gcc" "-o" "libjansi.so" "-shared" "jansi_ttyname.o"))))
10213 (add-before 'build 'install-native
10215 (let ((dir (string-append "build/classes/META-INF/native/"
10216 ,(match (%current-system)
10217 ((or "i686-linux" "armhf-linux")
10219 ((or "x86_64-linux" "aarch64-linux"
10222 (install-file "src/main/native-package/src/libjansi.so" dir))
10224 (add-after 'install 'install-native
10225 (lambda* (#:key outputs #:allow-other-keys)
10226 (install-file "src/main/native-package/src/jansi.h"
10227 (string-append (assoc-ref outputs "out") "/include"))
10230 `(("java-hawtjni" ,java-hawtjni)))
10231 (home-page "https://fusesource.github.io/jansi/")
10232 (synopsis "Native library for jansi")
10233 (description "This package provides the native library for jansi, a small
10234 Java library that allows you to use ANSI escape sequences to format your
10236 (license license:asl2.0)))
10238 (define-public java-jansi
10240 (name "java-jansi")
10244 (uri (string-append "https://github.com/fusesource/jansi/archive/"
10245 "jansi-project-" version ".tar.gz"))
10248 "11kh3144i3fzp21dpy8zg52mjmsr214k7km9p8ly0rqk2px0qq2z"))))
10249 (build-system ant-build-system)
10251 `(#:jar-name "jansi.jar"
10252 #:source-dir "jansi/src/main/java"
10253 #:test-dir "jansi/src/test"
10255 (modify-phases %standard-phases
10256 (add-after 'check 'clear-term
10258 (invoke "echo" "-e" "\\e[0m"))))))
10260 `(("java-jansi-native" ,java-jansi-native)))
10262 `(("java-junit" ,java-junit)
10263 ("java-hamcrest-core" ,java-hamcrest-core)))
10264 (home-page "https://fusesource.github.io/jansi/")
10265 (synopsis "Portable ANSI escape sequences")
10266 (description "Jansi is a Java library that allows you to use ANSI escape
10267 sequences to format your console output which works on every platform.")
10268 (license license:asl2.0)))
10270 (define-public java-jboss-el-api-spec
10272 (name "java-jboss-el-api-spec")
10276 (uri (string-append "https://github.com/jboss/jboss-el-api_spec/"
10277 "archive/jboss-el-api_" version
10278 "_spec-1.0.7.Final.tar.gz"))
10281 "1j45ljxalwlibxl7g7iv952sjxkw275m8vyxxij8l6wdd5pf0pdh"))))
10282 (build-system ant-build-system)
10284 `(#:jar-name "java-jboss-el-api_spec.jar"
10287 `(("java-junit" ,java-junit)))
10288 (home-page "https://github.com/jboss/jboss-el-api_spec")
10289 (synopsis "JSR-341 expression language 3.0 API")
10290 (description "This package contains an implementation of the JSR-341
10291 specification for the expression language 3.0. It implements an expression
10292 language inspired by ECMAScript and XPath. This language is used with
10293 JavaServer Pages (JSP).")
10294 ;; Either GPL2 only or CDDL.
10295 (license (list license:gpl2 license:cddl1.1))))
10297 (define-public java-jboss-interceptors-api-spec
10299 (name "java-jboss-interceptors-api-spec")
10303 (uri (string-append "https://github.com/jboss/jboss-interceptors-api_spec/"
10304 "archive/jboss-interceptors-api_" version
10305 "_spec-1.0.0.Final.tar.gz"))
10308 "0wv8x0jp9a5qxlrgkhb5jdk2gr6vi87b4j4kjb8ryxiy9gn8g51z"))))
10309 (build-system ant-build-system)
10311 `(#:jar-name "java-jboss-interceptors-api_spec.jar"
10314 #:tests? #f)); no tests
10315 (home-page "https://github.com/jboss/jboss-interceptors-api_spec")
10316 (synopsis "Interceptors 1.2 API classes from JSR 318")
10317 (description "Java-jboss-interceptors-api-spec implements the Interceptors
10318 API. Interceptors are used to interpose on business method invocations and
10320 ;; Either GPL2 only or CDDL.
10321 (license (list license:gpl2 license:cddl1.1))))
10323 (define-public java-cdi-api
10325 (name "java-cdi-api")
10329 (uri (string-append "https://github.com/cdi-spec/cdi/archive/"
10330 version ".tar.gz"))
10331 (file-name (string-append name "-" version ".tar.gz"))
10334 "1iv8b8bp07c5kmqic14jsr868vycjv4qv02lf3pkgp9z21mnfg5y"))))
10335 (build-system ant-build-system)
10337 `(#:source-dir "api/src/main/java"
10338 #:jar-name "java-cdi-api.jar"
10339 #:test-dir "api/src/test"
10341 #:tests? #f)); Tests fail because we don't have a CDI provider yet
10343 `(("java-javax-inject" ,java-javax-inject)
10344 ("java-jboss-el-api-spec" ,java-jboss-el-api-spec)
10345 ("java-jboss-interceptors-api-spec" ,java-jboss-interceptors-api-spec)))
10347 `(("java-testng" ,java-testng)
10348 ("java-hamcrest-core" ,java-hamcrest-core)))
10349 (home-page "http://cdi-spec.org/")
10350 (synopsis "Contexts and Dependency Injection APIs")
10351 (description "Java-cdi-api contains the required APIs for Contexts and
10352 Dependency Injection (CDI).")
10353 (license license:asl2.0)))
10355 (define-public java-joda-convert
10357 (name "java-joda-convert")
10361 (uri (string-append "https://github.com/JodaOrg/joda-convert/archive/v"
10362 version ".tar.gz"))
10363 (file-name (string-append name "-" version ".tar.gz"))
10366 "0vp346xz7dh9br4q7xazhc7hvzf76a6hf95fki9bg67q5jr0kjh7"))))
10367 (build-system ant-build-system)
10369 `(#:jar-name (string-append ,name "-" ,version ".jar")
10370 #:source-dir "src/main/java"
10371 #:test-include (list "**/Test*.java")
10372 ;; Contains only interfaces and base classes (no test)
10373 #:test-exclude (list "**/test*/**.java")))
10375 `(("java-guava" ,java-guava)))
10377 `(("java-junit" ,java-junit)
10378 ("java-hamcrest-core" ,java-hamcrest-core)))
10379 (home-page "https://www.joda.org/joda-convert/")
10380 (synopsis "Conversion between Objects and Strings")
10381 (description "Joda-Convert provides a small set of classes to aid
10382 conversion between Objects and Strings. It is not intended to tackle the
10383 wider problem of Object to Object transformation.")
10384 (license license:asl2.0)))
10386 (define-public java-joda-time
10388 (name "java-joda-time")
10392 (uri (string-append "https://github.com/JodaOrg/joda-time/archive/v"
10393 version ".tar.gz"))
10394 (file-name (string-append name "-" version ".tar.gz"))
10397 "1i9x91mi7yg2pasl0k3912f1pg46n37sps6rdb0v1gs8hj9ppwc1"))))
10398 (build-system ant-build-system)
10400 `(#:jar-name "java-joda-time.jar"
10401 #:source-dir "src/main/java"
10402 #:test-include (list "**/Test*.java")
10403 ;; There is no runnable test in these files
10404 #:test-exclude (list "**/Test*Chronology.java" "**/Test*Field.java")
10406 (modify-phases %standard-phases
10407 (add-after 'build 'build-resources
10409 (mkdir-p "build/classes/org/joda/time/tz/data")
10410 (mkdir-p "build/classes/org/joda/time/format")
10411 ;; This will produce the following exception:
10412 ;; java.io.IOException: Resource not found: "org/joda/time/tz/data/ZoneInfoMap"
10413 ;; which is normal, because it doesn't exist yet. It still generates
10414 ;; the same file as in the binary one can find on maven.
10415 (invoke "java" "-cp"
10416 (string-append "build/classes:" (getenv "CLASSPATH"))
10417 "org.joda.time.tz.ZoneInfoCompiler"
10418 "-src" "src/main/java/org/joda/time/tz/src"
10419 "-dst" "build/classes/org/joda/time/tz/data"
10420 "africa" "antarctica" "asia" "australasia"
10421 "europe" "northamerica" "southamerica"
10422 "pacificnew" "etcetera" "backward" "systemv")
10423 (for-each (lambda (f)
10424 (copy-file f (string-append
10425 "build/classes/org/joda/time/format/"
10427 (find-files "src/main/java/org/joda/time/format" ".*.properties"))
10429 (add-before 'install 'regenerate-jar
10431 ;; We need to regenerate the jar file to add generated data.
10432 (delete-file "build/jar/java-joda-time.jar")
10433 (invoke "ant" "jar")))
10434 (add-before 'check 'copy-test-resources
10436 (mkdir-p "build/test-classes/org/joda/time/tz/data")
10437 (copy-file "src/test/resources/tzdata/ZoneInfoMap"
10438 "build/test-classes/org/joda/time/tz/data/ZoneInfoMap")
10439 (copy-recursively "src/test/resources" "build/test-classes")
10442 `(("java-joda-convert" ,java-joda-convert)))
10444 `(("java-junit" ,java-junit)
10445 ("java-hamcrest-core" ,java-hamcrest-core)
10446 ("tzdata" ,tzdata)))
10447 (home-page "https://www.joda.org/joda-time/")
10448 (synopsis "Replacement for the Java date and time classes")
10449 (description "Joda-Time is a replacement for the Java date and time
10450 classes prior to Java SE 8.")
10451 (license license:asl2.0)))
10453 (define-public java-xerces
10455 (name "java-xerces")
10460 (uri (string-append "mirror://apache/xerces/j/source/"
10461 "Xerces-J-src." version ".tar.gz"))
10463 (base32 "1006igwy2lqrmjvdk64v8dg6qbk9c29pm8xxx7r87n0vnpvmx6pm"))
10464 (patches (search-patches
10465 "java-xerces-xjavac_taskdef.patch"
10466 "java-xerces-build_dont_unzip.patch"
10467 "java-xerces-bootclasspath.patch"))))
10468 (build-system ant-build-system)
10470 `(#:tests? #f;; Test files are not present
10471 #:test-target "test"
10474 (modify-phases %standard-phases
10475 (add-after 'unpack 'create-build.properties
10476 (lambda* (#:key inputs #:allow-other-keys)
10477 (let ((jaxp (assoc-ref inputs "java-jaxp"))
10478 (resolver (assoc-ref inputs "java-apache-xml-commons-resolver")))
10479 (with-output-to-file "build.properties"
10482 "jar.jaxp = ~a/share/java/jaxp.jar~@
10483 jar.apis-ext = ~a/share/java/jaxp.jar~@
10484 jar.resolver = ~a/share/java/xml-resolver.jar~%"
10485 jaxp jaxp resolver)))
10486 ;; Make xerces use our version of jaxp in tests
10487 (substitute* "build.xml"
10489 (string-append jaxp "/share/java/jaxp.jar"))
10490 (("\\$\\{tools.dir\\}/\\$\\{jar.apis\\}")
10493 (replace 'install (install-jars "build")))))
10495 `(("java-apache-xml-commons-resolver" ,java-apache-xml-commons-resolver)
10496 ("java-jaxp" ,java-jaxp)))
10497 (home-page "https://xerces.apache.org/xerces2-j/")
10498 (synopsis "Validating XML parser for Java with DOM level 3 support")
10499 (description "The Xerces2 Java parser is the reference implementation of
10500 XNI, the Xerces Native Interface, and also a fully conforming XML Schema
10503 Xerces2-J supports the following standards and APIs:
10506 @item eXtensible Markup Language (XML) 1.0 Second Edition Recommendation
10507 @item Namespaces in XML Recommendation
10508 @item Document Object Model (DOM) Level 2 Core, Events, and Traversal and
10509 Range Recommendations
10510 @item Simple API for XML (SAX) 2.0.1 Core and Extension
10511 @item Java APIs for XML Processing (JAXP) 1.2.01
10512 @item XML Schema 1.0 Structures and Datatypes Recommendations
10513 @item Experimental implementation of the Document Object Model (DOM) Level 3
10514 Core and Load/Save Working Drafts
10515 @item Provides a partial implementation of the XML Inclusions (XInclude) W3C
10516 Candidate Recommendation
10519 Xerces is now able to parse documents written according to the XML 1.1
10520 Candidate Recommendation, except that it does not yet provide an option to
10521 enable normalization checking as described in section 2.13 of this
10522 specification. It also handles namespaces according to the XML Namespaces 1.1
10523 Candidate Recommendation, and will correctly serialize XML 1.1 documents if
10524 the DOM level 3 load/save API's are in use.")
10525 (license license:asl2.0)))
10527 (define-public java-jakarta-regexp
10529 (name "java-jakarta-regexp")
10534 (uri (string-append
10535 "https://archive.apache.org/dist/jakarta/regexp/jakarta-regexp-"
10536 version ".tar.gz"))
10539 "0zg9rmyif48dck0cv6ynpxv23mmcsx265am1fnnxss7brgw0ms3r"))))
10540 (build-system ant-build-system)
10542 `(#:test-target "test"
10544 (modify-phases %standard-phases
10546 (lambda* (#:key outputs #:allow-other-keys)
10547 (let* ((out (assoc-ref outputs "out"))
10548 (out-share (string-append out "/share/java")))
10549 (mkdir-p out-share)
10550 (for-each (lambda (name)
10551 (install-file name out-share))
10552 (find-files "build" "^jakarta-regexp-.*\\.jar$"))
10554 (home-page "https://attic.apache.org/projects/jakarta-regexp.html")
10555 (synopsis "Regular expression parser generator for Java.")
10556 (description "@code{jakarta-regexp} is an old regular expression parser
10557 generator for Java.")
10558 (license license:asl2.0)))
10560 (define-public java-jline
10562 (name "java-jline")
10566 (uri (string-append "https://github.com/jline/jline1/archive/jline-"
10567 version ".tar.gz"))
10570 "0bi3p6vrh7a6v0fbpb6rx9plpmx5zk3lr352xzdbz2jcxg499wir"))))
10571 (build-system ant-build-system)
10573 `(#:jar-name "jline.jar"
10574 #:source-dir "src/main/java"
10575 #:test-dir "src/test"
10577 (modify-phases %standard-phases
10578 (add-before 'build 'copy-resources
10580 (copy-recursively "src/main/resources" "build/classes")
10583 `(("java-junit" ,java-junit)))
10584 (home-page "https://jline.github.io")
10585 (synopsis "Console input handling library")
10586 (description "JLine is a Java library for handling console input. It is
10587 similar in functionality to BSD editline and GNU readline but with additional
10588 features that bring it on par with the Z shell line editor.")
10589 (license license:bsd-3)))
10591 (define-public java-jline-2
10593 (inherit java-jline)
10597 (uri (string-append "https://github.com/jline/jline2/archive/jline-"
10598 version ".tar.gz"))
10601 "1c6qa26mf0viw8hg4jnv72s7i1qb1gh1l8rrzcdvqhqhx82rkdlf"))))
10604 ,@(package-arguments java-jline)))
10606 `(("java-jansi" ,java-jansi)
10607 ("java-jansi-native" ,java-jansi-native)))
10609 `(("java-powermock-modules-junit4" ,java-powermock-modules-junit4)
10610 ("java-powermock-modules-junit4-common" ,java-powermock-modules-junit4-common)
10611 ("java-powermock-api-easymock" ,java-powermock-api-easymock)
10612 ("java-powermock-api-support" ,java-powermock-api-support)
10613 ("java-powermock-core" ,java-powermock-core)
10614 ("java-powermock-reflect" ,java-powermock-reflect)
10615 ("java-easymock" ,java-easymock)
10616 ("java-jboss-javassist" ,java-jboss-javassist)
10617 ("java-objenesis" ,java-objenesis)
10618 ("java-asm" ,java-asm)
10619 ("java-hamcrest-core" ,java-hamcrest-core)
10620 ("java-cglib" ,java-cglib)
10621 ("java-junit" ,java-junit)
10622 ("java-hawtjni" ,java-hawtjni)))))
10624 (define-public java-xmlunit
10626 (name "java-xmlunit")
10630 (uri (string-append "https://github.com/xmlunit/xmlunit/archive/v"
10631 version ".tar.gz"))
10632 (file-name (string-append name "-" version ".tar.gz"))
10635 "035rivlnmwhfqj0fzviciv0bkh1h95ps1iwnh2kjcvdbk5nccm4z"))))
10636 (build-system ant-build-system)
10638 `(#:jar-name "java-xmlunit.jar"
10639 #:source-dir "xmlunit-core/src/main/java"
10640 #:test-dir "xmlunit-core/src/test"
10642 (modify-phases %standard-phases
10643 (add-before 'check 'copy-test-resources
10644 (lambda* (#:key inputs #:allow-other-keys)
10645 (copy-recursively (assoc-ref inputs "resources") "../test-resources")
10648 `(("java-junit" ,java-junit)
10649 ("java-mockito-1" ,java-mockito-1)
10650 ("java-hamcrest-all" ,java-hamcrest-all)
10651 ("java-objenesis" ,java-objenesis)
10652 ("java-asm" ,java-asm)
10653 ("java-cglib" ,java-cglib)
10657 (uri (git-reference
10658 (url "https://github.com/xmlunit/test-resources.git")
10659 (commit "a590d2ae865c3e0455691d76ba8eefccc2215aec")))
10660 (file-name "java-xmlunit-test-resources")
10663 "0r0glj37pg5l868yjz78gckr91cs8fysxxbp9p328dssssi91agr"))))))
10664 (home-page "http://www.xmlunit.org/")
10665 (synopsis "XML output testing")
10666 (description "XMLUnit provides you with the tools to verify the XML you
10667 emit is the one you want to create. It provides helpers to validate against
10668 an XML Schema, assert the values of XPath queries or compare XML documents
10669 against expected outcomes.")
10670 (license license:asl2.0)))
10672 (define-public java-xmlunit-legacy
10674 (inherit java-xmlunit)
10675 (name "java-xmlunit-legacy")
10677 `(#:jar-name "java-xmlunit-legacy.jar"
10678 #:source-dir "xmlunit-legacy/src/main/java"
10679 #:test-dir "xmlunit-legacy/src/test"))
10681 `(("java-xmlunit" ,java-xmlunit)
10682 ("java-junit" ,java-junit)))
10684 `(("java-mockito-1" ,java-mockito-1)))))
10686 (define-public java-xmlunit-matchers
10688 (inherit java-xmlunit)
10689 (name "java-xmlunit-matchers")
10691 `(#:jar-name "java-xmlunit-matchers.jar"
10692 #:source-dir "xmlunit-matchers/src/main/java"
10693 #:test-dir "xmlunit-matchers/src/test"
10695 ;; Cannot open xsd for http://www.xmlunit.org/test-support/Book.xsd
10696 (list "**/ValidationMatcherTest.java")
10698 (modify-phases %standard-phases
10699 (add-before 'build 'copy-test-class
10701 (copy-file "xmlunit-core/src/test/java/org/xmlunit/TestResources.java"
10702 "xmlunit-matchers/src/test/java/org/xmlunit/TestResources.java")
10704 (add-before 'build 'fix-test-resources-path
10706 (substitute* (find-files "xmlunit-matchers/src/test" ".*.java")
10707 (("../test-resources") "test-resources"))
10709 (add-before 'check 'copy-test-resources
10710 (lambda* (#:key inputs #:allow-other-keys)
10711 (copy-recursively (assoc-ref inputs "resources") "test-resources")
10714 `(("java-xmlunit" ,java-xmlunit)
10715 ("java-junit" ,java-junit)))))
10717 (define-public java-openchart2
10719 (name "java-openchart2")
10723 (uri (string-append "http://download.approximatrix.com/openchart2/"
10724 "openchart2-" version ".source.zip"))
10727 "1xq96zm5r02n1blja0072jmmsifmxc40lbyfbnmcnr6mw42frh4g"))))
10728 (build-system ant-build-system)
10730 `(#:test-target "test"
10732 (modify-phases %standard-phases
10733 (add-after 'unpack 'fix-junit-errors
10735 (with-directory-excursion "unittest/src/com/approximatrix/charting/"
10736 (substitute* '("coordsystem/ticklocator/NumericXTickLocatorTest.java"
10737 "coordsystem/ticklocator/NumericYTickLocatorTest.java"
10738 "coordsystem/ticklocator/ObjectXTickLocatorTest.java"
10739 "model/DefaultChartDataModelConstraintsTest.java"
10740 "model/MultiScatterDataModelConstraintsTest.java"
10741 "model/threedimensional/DotPlotDataModelConstraintsTest.java")
10742 (("(assertEquals[^;]+);" before _)
10743 (string-append (string-drop-right before 2) ", 1E-6);"))))
10745 (replace 'install (install-jars ".")))))
10748 ("java-junit" ,java-junit)
10749 ("java-hamcrest-core" ,java-hamcrest-core)))
10750 (home-page "https://approximatrix.com/products/openchart2/")
10751 (synopsis "Simple plotting for Java")
10752 (description "Openchart2 provides a simple, yet powerful, interface for
10753 Java programmers to create two-dimensional charts and plots. The library
10754 features an assortment of graph styles, including advanced scatter plots, bar
10755 graphs, and pie charts.")
10756 (license license:lgpl2.1+)))
10758 (define-public java-commons-httpclient
10760 (name "java-commons-httpclient")
10764 (uri (string-append "https://archive.apache.org/dist/httpcomponents/"
10765 "commons-httpclient/source/commons-httpclient-"
10766 version "-src.tar.gz"))
10769 "1wlpn3cfy3d4inxy6g7wxcsa8p7sshn6aldk9y4ia3lb879rd97r"))))
10770 (build-system ant-build-system)
10772 `(#:build-target "compile"
10773 #:test-target "test"
10774 #:tests? #f; requires junit-textui (junit 3)
10776 (modify-phases %standard-phases
10777 (add-before 'build 'fix-accent
10779 (for-each (lambda (file)
10780 (with-fluids ((%default-port-encoding "ISO-8859-1"))
10782 (("\\* @author Ortwin .*") "* @author Ortwin Glueck\n"))))
10783 '("src/java/org/apache/commons/httpclient/HttpContentTooLargeException.java"
10784 "src/examples/TrivialApp.java" "src/examples/ClientApp.java"
10785 "src/test/org/apache/commons/httpclient/TestHttps.java"
10786 "src/test/org/apache/commons/httpclient/TestURIUtil2.java"))
10789 (lambda* (#:key outputs #:allow-other-keys)
10790 (invoke "ant" "dist"
10791 (string-append "-Ddist.home=" (assoc-ref outputs "out")
10795 `(("java-commons-logging" ,java-commons-logging-minimal)
10796 ("java-commons-codec" ,java-commons-codec)))
10797 (home-page "https://hc.apache.org")
10798 (synopsis "HTTP/1.1 compliant HTTP agent implementation")
10799 (description "This package contains an HTTP/1.1 compliant HTTP agent
10800 implementation. It also provides reusable components for client-side
10801 authentication, HTTP state management, and HTTP connection management.")
10802 (license license:asl2.0)))
10804 (define-public java-commons-vfs
10806 (name "java-commons-vfs")
10810 (uri (string-append "mirror://apache/commons/vfs/source/"
10811 "commons-vfs2-distribution-" version "-src.tar.gz"))
10812 (file-name (string-append name "-" version ".tar.gz"))
10815 "1cnq1iaghbp4cslpnvwbp83i5v234x87irssqynhwpfgw7caf1s3"))
10816 (modules '((guix build utils)))
10819 (for-each delete-file
10820 (find-files "." "\\.jar$"))
10822 (build-system ant-build-system)
10824 `(#:jar-name "commons-vfs.jar"
10825 #:source-dir "commons-vfs2/src/main/java"
10826 #:test-dir "commons-vfs2/src/test"
10827 ; FIXME: tests depend on many things: apache sshd, hadoop, ftpserver, ...
10830 (modify-phases %standard-phases
10831 (add-before 'build 'remove-hadoop-and-webdav
10832 ; Remove these files as they are not required and depend on difficult
10835 (for-each delete-file-recursively
10836 '("commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/webdav"
10837 "commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/hdfs"))
10840 `(("java-commons-collections4" ,java-commons-collections4)
10841 ("java-commons-compress" ,java-commons-compress)
10842 ("java-commons-httpclient" ,java-commons-httpclient)
10843 ("java-commons-logging-minimal" ,java-commons-logging-minimal)
10844 ("java-commons-net" ,java-commons-net)
10845 ("java-jsch" ,java-jsch)))
10846 (home-page "https://commons.apache.org/proper/commons-vfs/")
10847 (synopsis "Java file system library")
10848 (description "Commons VFS provides a single API for accessing various
10849 different file systems. It presents a uniform view of the files from various
10850 different sources, such as the files on local disk, on an HTTP server, or
10851 inside a Zip archive.")
10852 (license license:asl2.0)))
10854 (define-public java-jakarta-oro
10856 (name "java-jakarta-oro")
10860 (uri (string-append "https://archive.apache.org/dist/jakarta/oro/"
10861 "jakarta-oro-" version ".tar.gz"))
10864 "0rpmnsskiwmsy8r0sckz5n5dbvh3vkxx8hpm177c754r8xy3qksc"))
10865 (modules '((guix build utils)))
10868 (delete-file (string-append "jakarta-oro-" ,version ".jar"))
10870 (build-system ant-build-system)
10872 `(#:build-target "package"
10873 #:tests? #f; tests are run as part of the build process
10875 (modify-phases %standard-phases
10877 (install-jars ,(string-append "jakarta-oro-" version))))))
10878 (home-page "https://jakarta.apache.org/oro/")
10879 (synopsis "Text-processing for Java")
10880 (description "The Jakarta-ORO Java classes are a set of text-processing
10881 Java classes that provide Perl5 compatible regular expressions, AWK-like
10882 regular expressions, glob expressions, and utility classes for performing
10883 substitutions, splits, filtering filenames, etc. This library is the successor
10884 of the OROMatcher, AwkTools, PerlTools, and TextTools libraries originally
10886 (license license:asl1.1)))
10888 (define-public java-native-access
10890 (name "java-native-access")
10894 (uri (string-append "https://github.com/java-native-access/jna/"
10895 "archive/" version ".tar.gz"))
10896 (file-name (string-append name "-" version ".tar.gz"))
10899 "0zrpzkib6b905i018a9pqlzkqinphywr6y4jwv6mwp63jjqvqkd9"))
10900 (modules '((guix build utils)))
10903 (for-each delete-file (find-files "." ".*.jar"))
10904 (delete-file-recursively "native/libffi")
10905 (delete-file-recursively "dist")
10907 (build-system ant-build-system)
10909 `(#:tests? #f; FIXME: tests require reflections.jar
10910 #:test-target "test"
10911 #:make-flags (list "-Ddynlink.native=true")
10913 (modify-phases %standard-phases
10914 (add-before 'build 'fix-build.xml
10915 (lambda* (#:key inputs #:allow-other-keys)
10916 (substitute* "build.xml"
10917 ;; Since we removed the bundled ant.jar, give the correct path
10918 (("lib/ant.jar") (string-append (assoc-ref inputs "ant") "/lib/ant.jar"))
10919 ;; We removed generated native libraries. We can only rebuild one
10920 ;; so don't fail if we can't find a native library for another architecture.
10921 (("zipfileset") "zipfileset erroronmissingarchive=\"false\""))
10922 ;; Copy test dependencies
10923 (copy-file (string-append (assoc-ref inputs "java-junit")
10924 "/share/java/junit.jar")
10926 (copy-file (string-append (assoc-ref inputs "java-hamcrest-core")
10927 "/share/java/hamcrest-core.jar")
10928 "lib/hamcrest-core.jar")
10929 ;; FIXME: once reflections.jar is built, copy it to lib/test.
10931 (add-before 'build 'build-native
10933 (invoke "ant" "-Ddynlink.native=true" "native")
10936 (install-jars "build")))))
10938 `(("libffi" ,libffi)
10942 `(("java-junit" ,java-junit)
10943 ("java-hamcrest-core" ,java-hamcrest-core)))
10944 (home-page "https://github.com/java-native-access/jna")
10945 (synopsis "Access to native shared libraries from Java")
10946 (description "JNA provides Java programs easy access to native shared
10947 libraries without writing anything but Java code - no JNI or native code is
10948 required. JNA allows you to call directly into native functions using natural
10949 Java method invocation.")
10950 ;; Java Native Access project (JNA) is dual-licensed under 2
10951 ;; alternative Free licenses: LGPL 2.1 or later and Apache License 2.0.
10954 license:lgpl2.1+))))
10956 (define-public java-native-access-platform
10958 (inherit java-native-access)
10959 (name "java-native-access-platform")
10961 `(#:test-target "test"
10962 #:tests? #f; require jna-test.jar
10964 (modify-phases %standard-phases
10965 (add-before 'build 'chdir
10967 (chdir "contrib/platform")
10969 (add-after 'chdir 'fix-ant
10970 (lambda* (#:key inputs #:allow-other-keys)
10971 (substitute* "nbproject/project.properties"
10972 (("../../build/jna.jar")
10973 (string-append (assoc-ref inputs "java-native-access")
10974 "/share/java/jna.jar"))
10975 (("../../lib/hamcrest-core-.*.jar")
10976 (string-append (assoc-ref inputs "java-hamcrest-core")
10977 "/share/java/hamcrest-core.jar"))
10978 (("../../lib/junit.jar")
10979 (string-append (assoc-ref inputs "java-junit")
10980 "/share/java/junit.jar")))
10983 (install-jars "dist")))))
10985 `(("java-native-access" ,java-native-access)))
10986 (synopsis "Cross-platform mappings for jna")
10987 (description "java-native-access-platfrom has cross-platform mappings
10988 and mappings for a number of commonly used platform functions, including a
10989 large number of Win32 mappings as well as a set of utility classes that
10990 simplify native access.")))
10992 (define-public java-jsch-agentproxy-core
10994 (name "java-jsch-agentproxy-core")
10998 (uri (string-append "https://github.com/ymnk/jsch-agent-proxy/archive/"
10999 version ".tar.gz"))
11000 (file-name (string-append name "-" version ".tar.gz"))
11003 "02iqg6jbc1kxvfzqcg6wy9ygqxfm82bw5rf6vnswqy4y572niz4q"))))
11004 (build-system ant-build-system)
11006 `(#:jar-name "jsch-agentproxy-core.jar"
11007 #:source-dir "jsch-agent-proxy-core/src/main/java"
11008 #:tests? #f)); no tests
11009 (home-page "https://github.com/ymnk/jsch-agent-proxy")
11010 (synopsis "Core component of the proxy to ssh-agent and Pageant in Java")
11011 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
11012 and Pageant included Putty. It will be easily integrated into JSch, and users
11013 will be allowed to use these programs for authentication.")
11014 (license license:bsd-3)))
11016 (define-public java-jsch-agentproxy-sshagent
11018 (inherit java-jsch-agentproxy-core)
11019 (name "java-jsch-agentproxy-sshagent")
11021 `(#:jar-name "jsch-agentproxy-sshagent.jar"
11022 #:source-dir "jsch-agent-proxy-sshagent/src/main/java"
11023 #:tests? #f)); no tests
11025 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
11026 (synopsis "Proxy to ssh-agent")
11027 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
11028 and Pageant included in Putty. This component contains the code for a proxy to
11031 (define-public java-jsch-agentproxy-usocket-jna
11033 (inherit java-jsch-agentproxy-core)
11034 (name "java-jsch-agentproxy-usocket-jna")
11036 `(#:jar-name "jsch-agentproxy-usocket-jna.jar"
11037 #:source-dir "jsch-agent-proxy-usocket-jna/src/main/java"
11038 #:tests? #f)); no tests
11040 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
11041 ("java-native-access" ,java-native-access)))
11042 (synopsis "USocketFactory implementation using JNA")
11043 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
11044 and Pageant included in Putty. This component contains an implementation of
11045 USocketFactory using @dfn{JNA} (Java Native Access).")))
11047 (define-public java-jsch-agentproxy-pageant
11049 (inherit java-jsch-agentproxy-core)
11050 (name "java-jsch-agentproxy-pageant")
11052 `(#:jar-name "jsch-agentproxy-pageant.jar"
11053 #:source-dir "jsch-agent-proxy-pageant/src/main/java"
11054 #:tests? #f)); no tests
11056 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
11057 ("java-native-access" ,java-native-access)
11058 ("java-native-access-platform" ,java-native-access-platform)))
11059 (synopsis "Proxy to pageant")
11060 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
11061 and Pageant included in Putty. This component contains the code for a proxy to
11064 (define-public java-jsch-agentproxy-usocket-nc
11066 (inherit java-jsch-agentproxy-core)
11067 (name "java-jsch-agentproxy-usocket-nc")
11069 `(#:jar-name "jsch-agentproxy-usocket-nc.jar"
11070 #:source-dir "jsch-agent-proxy-usocket-nc/src/main/java"
11071 #:tests? #f)); no tests
11073 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
11074 (synopsis "USocketFactory implementation using netcat")
11075 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
11076 and Pageant included in Putty. This component contains an implementation of
11077 USocketFactory using netcat.")))
11079 (define-public java-jsch-agentproxy-connector-factory
11081 (inherit java-jsch-agentproxy-core)
11082 (name "java-jsch-agentproxy-connector-factory")
11084 `(#:jar-name "jsch-agentproxy-connector-factory.jar"
11085 #:source-dir "jsch-agent-proxy-connector-factory/src/main/java"
11086 #:tests? #f)); no tests
11088 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
11089 ("java-jsch-agentproxy-sshagent" ,java-jsch-agentproxy-sshagent)
11090 ("java-jsch-agentproxy-usocket-jna" ,java-jsch-agentproxy-usocket-jna)
11091 ("java-jsch-agentproxy-pageant" ,java-jsch-agentproxy-pageant)
11092 ("java-jsch-agentproxy-usocket-nc" ,java-jsch-agentproxy-usocket-nc)))
11093 (synopsis "Connector factory for jsch agent proxy")
11094 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
11095 and Pageant included in Putty. This component contains a connector factory.")))
11097 (define-public java-jsch-agentproxy-jsch
11099 (inherit java-jsch-agentproxy-core)
11100 (name "java-jsch-agentproxy-jsch")
11102 `(#:jar-name "jsch-agentproxy-jsch.jar"
11103 #:source-dir "jsch-agent-proxy-jsch/src/main/java"
11104 #:tests? #f)); no tests
11106 `(("java-jsch" ,java-jsch)
11107 ("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
11108 (synopsis "JSch integration library for agentproxy")
11109 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
11110 and Pageant included in Putty. This component contains a library to use
11111 jsch-agent-proxy with JSch.")))
11113 (define-public java-apache-ivy
11115 (name "java-apache-ivy")
11119 (uri (string-append "mirror://apache//ant/ivy/" version
11120 "/apache-ivy-" version "-src.tar.gz"))
11123 "1xkfn57g2m7l6y0xdq75x5rnrgk52m9jx2xah70g3ggl8750hbr0"))
11126 "java-apache-ivy-port-to-latest-bouncycastle.patch"))))
11127 (build-system ant-build-system)
11129 `(#:jar-name "ivy.jar"
11132 (modify-phases %standard-phases
11133 (add-before 'build 'remove-example
11135 (delete-file-recursively "src/example")
11137 (add-before 'build 'copy-resources
11139 (with-directory-excursion "src/java"
11140 (for-each (lambda (file)
11141 (install-file file (string-append "../../build/classes/" (dirname file))))
11143 (find-files "." ".*.css")
11144 (find-files "." ".*.ent")
11145 (find-files "." ".*.html")
11146 (find-files "." ".*.properties")
11147 (find-files "." ".*.xsd")
11148 (find-files "." ".*.xsl")
11149 (find-files "." ".*.xml"))))
11151 (add-before 'build 'fix-vfs
11154 '("src/java/org/apache/ivy/plugins/repository/vfs/VfsRepository.java"
11155 "src/java/org/apache/ivy/plugins/repository/vfs/VfsResource.java")
11156 (("import org.apache.commons.vfs") "import org.apache.commons.vfs2"))
11158 (add-before 'install 'copy-manifest
11160 (install-file "META-INF/MANIFEST.MF" "build/classes/META-INF")
11162 (add-before 'install 'repack
11164 (invoke "jar" "-cmf" "build/classes/META-INF/MANIFEST.MF" "build/jar/ivy.jar"
11165 "-C" "build/classes" ".")))
11166 (add-after 'install 'install-bin
11167 (lambda* (#:key outputs #:allow-other-keys)
11168 (let* ((bin (string-append (assoc-ref outputs "out") "/bin"))
11169 (ivy (string-append bin "/ivy"))
11170 (jar (string-append (assoc-ref outputs "out") "/share/java/ivy.jar")))
11172 (with-output-to-file ivy
11174 (display (string-append
11175 "#!" (which "sh") "\n"
11176 "if [[ -z $CLASSPATH ]]; then\n"
11177 " cp=\"" (getenv "CLASSPATH") ":" jar "\"\n"
11179 " cp=\"" (getenv "CLASSPATH") ":" jar ":$CLASSPATH\"\n"
11181 (which "java") " -cp $cp org.apache.ivy.Main $@\n"))))
11185 `(("java-bouncycastle" ,java-bouncycastle)
11186 ("java-commons-cli" ,java-commons-cli)
11187 ("java-commons-collections" ,java-commons-collections)
11188 ("java-commons-httpclient" ,java-commons-httpclient)
11189 ("java-commons-lang" ,java-commons-lang)
11190 ("java-commons-vfs" ,java-commons-vfs)
11191 ("java-jakarta-oro" ,java-jakarta-oro)
11192 ("java-jsch" ,java-jsch)
11193 ("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
11194 ("java-jsch-agentproxy-connector-factory" ,java-jsch-agentproxy-connector-factory)
11195 ("java-jsch-agentproxy-jsch" ,java-jsch-agentproxy-jsch)
11196 ("java-junit" ,java-junit)))
11197 (home-page "https://ant.apache.org/ivy")
11198 (synopsis "Dependency manager for the Java programming language")
11199 (description "Ivy is a tool for managing (recording, tracking, resolving
11200 and reporting) project dependencies. It is characterized by the following:
11203 @item flexibility and configurability - Ivy is essentially process agnostic
11204 and is not tied to any methodology or structure. Instead it provides the
11205 necessary flexibility and configurability to be adapted to a broad range
11206 of dependency management and build processes.
11207 @item tight integration with Apache Ant - while available as a standalone tool,
11208 Ivy works particularly well with Apache Ant providing a number of
11209 powerful Ant tasks ranging from dependency resolution to dependency
11210 reporting and publication.
11212 (license license:asl2.0)))
11214 (define-public java-eclipse-sisu-inject
11216 (name "java-eclipse-sisu-inject")
11220 (uri (git-reference
11221 (url "https://github.com/eclipse/sisu.inject/")
11222 (commit "releases/0.3.3")))
11223 (file-name (git-file-name name version))
11226 "0gibc9x0bw0f4ls086fx73610fcspz9g2as7kcpcfhvl5znysvg7"))))
11227 (build-system ant-build-system)
11229 `(#:jar-name "eclipse-sisu-inject.jar"
11230 #:source-dir "org.eclipse.sisu.inject/src"
11232 #:tests? #f)); no tests
11234 `(("java-guice" ,java-guice)
11235 ("java-guice-servlet" ,java-guice-servlet)
11236 ("java-javax-inject" ,java-javax-inject)
11237 ("java-javaee-servletapi" ,java-javaee-servletapi)
11238 ("java-junit" ,java-junit)
11239 ("java-slf4j-api" ,java-slf4j-api)
11240 ("java-jsr305" ,java-jsr305)
11241 ("java-jsr250" ,java-jsr250)
11242 ("java-cdi-api" ,java-cdi-api)
11243 ("java-osgi-framework" ,java-osgi-framework)
11244 ("java-osgi-util-tracker" ,java-osgi-util-tracker)
11245 ("java-testng" ,java-testng)))
11246 (home-page "https://www.eclipse.org/sisu/")
11247 (synopsis "Classpath scanning, auto-binding, and dynamic auto-wiring")
11248 (description "Sisu is a modular JSR330-based container that supports
11249 classpath scanning, auto-binding, and dynamic auto-wiring. Sisu uses
11250 Google-Guice to perform dependency injection and provide the core JSR330
11251 support, but removes the need to write explicit bindings in Guice modules.
11252 Integration with other containers via the Eclipse Extension Registry and the
11253 OSGi Service Registry is a goal of this project.")
11254 (license license:epl1.0)))
11256 (define-public java-eclipse-sisu-plexus
11258 (name "java-eclipse-sisu-plexus")
11262 (uri (git-reference
11263 (url "https://github.com/eclipse/sisu.plexus.git")
11264 (commit (string-append "releases/" version))))
11265 (file-name (git-file-name name version))
11268 "17mjlajnsqnk07cc58h1qpxrif85yb2m2y0pyba48yjjgikk8r9f"))
11269 (modules '((guix build utils)))
11272 (for-each delete-file (find-files "." ".*.jar"))
11273 (rename-file "org.eclipse.sisu.plexus.tests/src"
11274 "org.eclipse.sisu.plexus.tests/java")
11276 (build-system ant-build-system)
11278 `(#:jar-name "eclipse-sisu-plexus.jar"
11279 #:source-dir "org.eclipse.sisu.plexus/src"
11280 #:test-dir "org.eclipse.sisu.plexus.tests"
11283 ;; This test fails probably because we can't generate the necessary
11285 "**/PlexusLoggingTest.*"
11286 ;; FIXME: This test fails because of some injection error
11287 "**/PlexusRequirementTest.*")
11290 (modify-phases %standard-phases
11291 (add-before 'build 'copy-resources
11293 (install-file "org.eclipse.sisu.plexus/META-INF/plexus/components.xml"
11294 "build/classes/META-INF/plexus")
11296 (add-before 'check 'build-test-jar
11298 (with-directory-excursion "org.eclipse.sisu.plexus.tests/resources/component-jar/src/main/"
11300 (with-directory-excursion "java"
11301 (apply invoke "javac" "-cp"
11302 (string-append (getenv "CLASSPATH")
11303 ":../../../../../build/classes")
11304 (find-files "." ".*.java"))
11305 (for-each (lambda (file) (install-file file (string-append "../build/" file)))
11306 (find-files "." ".*.jar")))
11307 (mkdir-p "build/META-INF/plexus")
11308 (copy-file "resources/META-INF/plexus/components.xml"
11309 "build/META-INF/plexus/components.xml")
11310 (with-directory-excursion "build"
11311 (invoke "jar" "cf" "../../../component-jar-0.1.jar" ".")))
11312 (with-directory-excursion "org.eclipse.sisu.plexus.tests/"
11313 (copy-recursively "META-INF" "../build/test-classes/META-INF")
11314 (substitute* "java/org/eclipse/sisu/plexus/DefaultPlexusContainerTest.java"
11315 (("resources/component-jar")
11316 "org.eclipse.sisu.plexus.tests/resources/component-jar")))
11319 `(("java-plexus-classworlds" ,java-plexus-classworlds)
11320 ("java-plexus-util" ,java-plexus-utils)
11321 ("java-plexus-component-annotations" ,java-plexus-component-annotations)
11322 ("java-osgi-framework" ,java-osgi-framework)
11323 ("java-eclipse-sisu-inject" ,java-eclipse-sisu-inject)
11324 ("java-guice" ,java-guice)
11325 ("java-javax-inject" ,java-javax-inject)
11326 ("java-slf4j-api" ,java-slf4j-api)
11327 ("java-junit" ,java-junit)))
11329 `(("java-guava" ,java-guava)
11330 ("java-aopalliance" ,java-aopalliance)
11331 ("java-cglib" ,java-cglib)
11332 ("java-asm" ,java-asm)))
11333 (home-page "https://www.eclipse.org/sisu/")
11334 (synopsis "Plexus support for the sisu container")
11335 (description "Sisu is a modular JSR330-based container that supports
11336 classpath scanning, auto-binding, and dynamic auto-wiring. This package
11337 adds Plexus support to the Sisu-Inject container.")
11338 (license license:epl1.0)))
11340 (define-public java-commons-compiler
11342 (name "java-commons-compiler")
11346 (uri (git-reference
11347 (url "https://github.com/janino-compiler/janino")
11348 (commit "91aa95686d1e4ca3b16a984a03a38686572331b2")))
11349 (file-name (string-append name "-" version))
11352 "04hfdl59sgh20qkxzgnibvs8f9hy6n7znxwpk611y5d89977y62r"))
11353 (modules '((guix build utils)))
11356 (for-each delete-file
11357 (find-files "." "\\.jar$"))
11359 (build-system ant-build-system)
11361 `(#:jar-name "commons-compiler.jar"
11362 #:source-dir "commons-compiler/src/main"
11363 #:tests? #f)); no tests
11364 (home-page "https://github.com/janino-compiler/janino")
11365 (synopsis "Java compiler")
11366 (description "Commons-compiler contains an API for janino, including the
11367 @code{IExpressionEvaluator}, @code{IScriptEvaluator}, @code{IClassBodyEvaluator}
11368 and @code{ISimpleCompiler} interfaces.")
11369 (license license:bsd-3)))
11371 (define-public java-janino
11373 (inherit java-commons-compiler)
11374 (name "java-janino")
11376 `(#:jar-name "janino.jar"
11377 #:source-dir "src/main/java"
11379 (modify-phases %standard-phases
11380 (add-before 'configure 'chdir
11385 `(("java-commons-compiler" ,java-commons-compiler)))
11387 `(("java-junit" ,java-junit)
11388 ("java-hamcrest-core" ,java-hamcrest-core)))
11389 (description "Janino is a Java compiler. Janino can compile a set of
11390 source files to a set of class files like @code{javac}, but also compile a
11391 Java expression, block, class body or source file in memory, load the bytecode
11392 and execute it directly in the same JVM. @code{janino} can also be used for
11393 static code analysis or code manipulation.")))
11395 (define-public java-logback-core
11397 (name "java-logback-core")
11401 (uri (string-append "https://github.com/qos-ch/logback/archive/v_"
11402 version ".tar.gz"))
11403 (file-name (string-append name "-" version ".tar.gz"))
11406 "1x6ga74yfgm94cfx98gybakbrlilx8i2gn6dx13l40kasmys06mi"))
11407 (modules '((guix build utils)))
11410 (delete-file-recursively "logback-access/lib")
11412 (build-system ant-build-system)
11414 `(#:jar-name "logback.jar"
11415 #:source-dir "src/main/java"
11416 #:test-dir "src/test"
11418 ;; These tests fail with Unable to set MockitoNamingPolicy on cglib generator
11419 ;; which creates FastClasses
11420 (list "**/AllCoreTest.*"
11421 "**/AutoFlushingObjectWriterTest.*"
11423 "**/ResilientOutputStreamTest.*"
11424 ;; And we still don't want to run abstract classes
11427 (modify-phases %standard-phases
11428 (add-before 'configure 'chdir
11430 (chdir "logback-core")
11433 `(("java-javax-mail" ,java-javax-mail)
11434 ("servlet" ,java-javaee-servletapi)
11435 ("java-commons-compiler" ,java-commons-compiler)
11436 ("java-janino" ,java-janino)))
11438 `(("java-junit" ,java-junit)
11439 ("java-hamcrest-core" ,java-hamcrest-core)
11440 ("java-mockito-1" ,java-mockito-1)
11441 ("java-cglib" ,java-cglib)
11442 ("java-asm" ,java-asm)
11443 ("java-objenesis" ,java-objenesis)
11444 ("java-joda-time" ,java-joda-time)))
11445 (home-page "https://logback.qos.ch")
11446 (synopsis "Logging for java")
11447 (description "Logback is intended as a successor to the popular log4j project.
11448 This module lays the groundwork for the other two modules.")
11449 ;; Either epl1.0 or lgpl2.1
11450 (license (list license:epl1.0
11451 license:lgpl2.1))))
11453 (define-public java-logback-classic
11455 (inherit java-logback-core)
11456 (name "java-logback-classic")
11458 `(#:jar-name "logback-classic.jar"
11459 #:source-dir "src/main/java"
11460 #:test-dir "src/test"
11461 #:tests? #f; tests require more packages: h2, greenmail, hsql, subethamail, slf4j, log4j, felix
11464 (modify-phases %standard-phases
11465 (add-before 'configure 'chdir
11467 (chdir "logback-classic")
11470 (lambda* (#:key inputs #:allow-other-keys)
11471 (mkdir-p "build/classes")
11472 (setenv "CLASSPATH"
11474 (apply append (map (lambda (input)
11475 (find-files (assoc-ref inputs input)
11477 '("java-logback-core" "java-slf4j-api"
11478 "java-commons-compiler" "servlet"
11481 (apply invoke "groovyc" "-d" "build/classes" "-j"
11482 (find-files "src/main/" ".*\\.(groovy|java)$"))
11483 (invoke "ant" "jar")
11486 `(("java-logback-core" ,java-logback-core)
11487 ("java-slf4j-api" ,java-slf4j-api)
11488 ,@(package-inputs java-logback-core)))
11490 `(("groovy" ,groovy)))
11491 (description "Logback is intended as a successor to the popular log4j project.
11492 This module can be assimilated to a significantly improved version of log4j.
11493 Moreover, @code{logback-classic} natively implements the slf4j API so that you
11494 can readily switch back and forth between logback and other logging frameworks
11495 such as log4j or @code{java.util.logging} (JUL).")))
11497 (define-public java-jgit
11500 (version "4.7.0.201704051617-r")
11503 (uri (string-append "https://repo1.maven.org/maven2/"
11504 "org/eclipse/jgit/org.eclipse.jgit/"
11505 version "/org.eclipse.jgit-"
11506 version "-sources.jar"))
11509 "13ii4jn02ynzq6i7gsyi21k2i94jpc85wf6bcm31q4cyvzv0mk4k"))))
11510 (build-system ant-build-system)
11512 `(#:tests? #f ; There are no tests to run.
11513 #:jar-name "jgit.jar"
11514 ;; JGit must be built with a JDK supporting Java 8.
11516 ;; Target our older default JDK.
11517 #:make-flags (list "-Dtarget=1.7")
11519 (modify-phases %standard-phases
11520 ;; The jar file generated by the default build.xml does not include
11521 ;; the text properties files, so we need to add them.
11522 (add-after 'build 'add-properties
11523 (lambda* (#:key jar-name #:allow-other-keys)
11524 (with-directory-excursion "src"
11525 (apply invoke "jar" "-uf"
11526 (string-append "../build/jar/" jar-name)
11527 (find-files "." "\\.properties$")))
11530 `(("java-classpathx-servletapi" ,java-classpathx-servletapi)
11531 ("java-javaewah" ,java-javaewah)
11532 ("java-jsch" ,java-jsch)
11533 ("java-slf4j-api" ,java-slf4j-api)))
11534 (home-page "https://eclipse.org/jgit/")
11535 (synopsis "Java library implementing the Git version control system")
11536 (description "JGit is a lightweight, pure Java library implementing the
11537 Git version control system, providing repository access routines, support for
11538 network protocols, and core version control algorithms.")
11539 (license license:edl1.0)))
11541 ;; For axoloti. This package can still be built with icedtea-7, which is
11542 ;; currently used as the default JDK.
11543 (define-public java-jgit-4.2
11544 (package (inherit java-jgit)
11545 (version "4.2.0.201601211800-r")
11548 (uri (string-append "https://repo1.maven.org/maven2/"
11549 "org/eclipse/jgit/org.eclipse.jgit/"
11550 version "/org.eclipse.jgit-"
11551 version "-sources.jar"))
11554 "15gm537iivhnzlkjym4x3wn5jqdjdragsw9pdpzqqg21nrc817mm"))))
11555 (build-system ant-build-system)
11557 (substitute-keyword-arguments (package-arguments java-jgit)
11558 ;; Build for default JDK.
11559 ((#:jdk _) icedtea-7)
11561 `(modify-phases ,phases
11562 (add-after 'unpack 'use-latest-javaewah-API
11564 (substitute* "src/org/eclipse/jgit/internal/storage/file/BitmapIndexImpl.java"
11565 (("wordinbits") "WORD_IN_BITS"))
11568 `(("java-javaewah" ,java-javaewah)
11569 ("java-jsch" ,java-jsch)
11570 ("java-slf4j-api" ,java-slf4j-api)))))
11572 (define-public abcl
11579 (uri (string-append "https://abcl.org/releases/"
11580 version "/abcl-src-" version ".tar.gz"))
11583 "0hvbcsffr8n2xwdixc8wyw1bfl9fxn2gyy0c4nma7j9zbn0wwgw9"))
11586 "abcl-fix-build-xml.patch"))))
11587 (build-system ant-build-system)
11589 `(("java-junit" ,java-junit)))
11591 `(#:build-target "abcl.jar"
11592 #:test-target "abcl.test"
11594 (modify-phases %standard-phases
11596 (lambda* (#:key outputs #:allow-other-keys)
11597 (let ((share (string-append (assoc-ref outputs "out")
11599 (bin (string-append (assoc-ref outputs "out")
11602 (install-file "dist/abcl.jar" share)
11603 (install-file "dist/abcl-contrib.jar" share)
11605 (with-output-to-file (string-append bin "abcl")
11607 (let ((classpath (string-append
11610 share "abcl-contrib.jar")))
11611 (display (string-append
11612 "#!" (which "sh") "\n"
11613 "if [[ -z $CLASSPATH ]]; then\n"
11614 " cp=\"" classpath "\"\n"
11616 " cp=\"" classpath ":$CLASSPATH\"\n"
11618 "exec " (which "java")
11619 " -cp $cp org.armedbear.lisp.Main $@\n")))))
11620 (chmod (string-append bin "abcl") #o755)
11622 (home-page "https://abcl.org/")
11623 (synopsis "Common Lisp Implementation on the JVM")
11625 "@dfn{Armed Bear Common Lisp} (ABCL) is a full implementation of the Common
11626 Lisp language featuring both an interpreter and a compiler, running in the
11627 JVM. It supports JSR-223 (Java scripting API): it can be a scripting engine
11628 in any Java application. Additionally, it can be used to implement (parts of)
11629 the application using Java to Lisp integration APIs.")
11630 (license (list license:gpl2+
11631 ;; named-readtables is released under 3 clause BSD
11633 ;; jfli is released under CPL 1.0
11636 (define-public java-jsonp-api
11638 (name "java-jsonp-api")
11642 (uri (git-reference
11643 (url "https://github.com/eclipse-ee4j/jsonp")
11644 (commit (string-append "1.1-" version "-RELEASE"))))
11645 (file-name (git-file-name name version))
11648 "0zrj03hkr3jdmqlb4ipjr37cqpp2q2814qpmxi7srlwpdqs0ibgc"))))
11649 (build-system ant-build-system)
11651 `(#:jar-name "jsonp-api.jar"
11653 #:source-dir "api/src/main/java"
11654 #:test-dir "api/src/test"))
11655 (home-page "https://eclipse-ee4j.github.io/jsonp/")
11656 (synopsis "JSON Processing in Java")
11657 (description "JSON Processing (JSON-P) is a Java API to process (e.g.
11658 parse, generate, transform and query) JSON messages. It produces and
11659 consumes JSON text in a streaming fashion (similar to StAX API for XML)
11660 and allows building a Java object model for JSON text using API classes
11661 (similar to DOM API for XML).")
11662 ;; either gpl2 only with classpath exception, or epl2.0.
11663 (license (list license:gpl2
11666 (define-public java-jsonp-impl
11668 (inherit java-jsonp-api)
11669 (name "java-jsonp-impl")
11671 `(#:jar-name "jsonp-impl.jar"
11673 #:source-dir "impl/src/main/java"
11674 #:test-dir "impl/src/test"
11676 (modify-phases %standard-phases
11677 (add-before 'build 'copy-resources
11680 "impl/src/main/resources/"
11684 `(("java-jsonp-api" ,java-jsonp-api)))
11685 (description "JSON Processing (JSON-P) is a Java API to process (e.g.
11686 parse, generate, transform and query) JSON messages. This package contains
11687 a reference implementation of that API.")))
11689 (define-public java-xmp
11695 (uri (string-append "http://download.macromedia.com/pub/developer"
11696 "/xmp/sdk/XMPCoreJava-" version ".zip"))
11699 "14nai2mmsg7l5ya2y5mx4w4lr1az3sk2fjz6hiy4zdrsavgvl1g7"))))
11700 (build-system ant-build-system)
11702 `(#:build-target "build"
11703 #:tests? #f; no tests
11705 (modify-phases %standard-phases
11706 (add-after 'unpack 'chdir
11710 (add-before 'build 'fix-timestamp
11712 (substitute* "build.xml"
11713 (("\\$\\{BuildDate\\}") "1970 Jan 01 00:00:00-GMT"))
11716 (install-jars "."))
11717 (add-after 'install 'install-doc
11718 (lambda* (#:key outputs #:allow-other-keys)
11721 (string-append (assoc-ref outputs "out") "/share/doc/java-xmp"))
11724 `(("unzip" ,unzip)))
11725 (home-page "https://www.adobe.com/devnet/xmp.html")
11726 (synopsis "Extensible Metadat Platform (XMP) support in Java")
11727 (description "Adobe's Extensible Metadata Platform (XMP) is a labeling
11728 technology that allows you to embed data about a file, known as metadata,
11729 into the file itself. The XMP Toolkit for Java is based on the C++ XMPCore
11730 library and the API is similar.")
11731 (license license:bsd-3)))
11733 (define-public java-metadata-extractor
11735 (name "java-metadata-extractor")
11739 (uri (git-reference
11740 (url "https://github.com/drewnoakes/metadata-extractor")
11742 (file-name (git-file-name name version))
11745 "06yrq0swrl1r40yjbk5kqzjxr04jlkq9lfi711jvfgjf5kp2qinj"))))
11746 (build-system ant-build-system)
11748 `(#:jar-name "metadata-extractor.jar"
11749 #:source-dir "Source"
11752 (modify-phases %standard-phases
11753 (add-before 'check 'fix-test-dir
11755 (substitute* "build.xml"
11756 (("/java\">") "\">"))
11759 `(("java-xmp" ,java-xmp)))
11761 `(("java-hamcrest-core" ,java-hamcrest-core)
11762 ("java-junit" ,java-junit)))
11763 (home-page "https://github.com/drewnoakes/metadata-extractor")
11764 (synopsis "Extract metadata from image and video files")
11765 (description "Metadata-extractor is a straightforward Java library for
11766 reading metadata from image files. It is able to read metadata in Exif,
11767 IPTC, XMP, ICC and more formats.")
11768 (license license:asl2.0)))
11770 (define-public java-svg-salamander
11772 (name "java-svg-salamander")
11776 (uri (git-reference
11777 (url "https://github.com/blackears/svgSalamander")
11778 (commit (string-append "v" version))))
11779 (file-name (git-file-name name version))
11782 "1zv3kjdkf6iqf02x6ln76254y634j2ji448y706a65lsbfjmmicf"))
11783 (modules '((guix build utils)))
11786 (for-each delete-file (find-files "." ".*.jar"))
11789 (search-patches "java-svg-salamander-Fix-non-det.patch"))))
11790 (build-system ant-build-system)
11792 `(#:tests? #f; no tests
11794 (modify-phases %standard-phases
11795 (add-after 'unpack 'chdir
11799 (add-before 'build 'copy-jars
11800 (lambda* (#:key inputs #:allow-other-keys)
11801 (copy-file (car (find-files (assoc-ref inputs "javacc") "\\.jar$"))
11802 "../libraries/javacc.jar")
11803 (copy-file (car (find-files (assoc-ref inputs "ant") "ant\\.jar$"))
11804 "../libraries/ant.jar")
11807 (install-jars "dist")))))
11809 `(("javacc" ,javacc)))
11810 (home-page "https://github.com/blackears/svgSalamander")
11811 (synopsis "SVG engine for Java")
11812 (description "SVG Salamander is an SVG engine for Java that's designed
11813 to be small, fast, and allow programmers to use it with a minimum of fuss.
11814 It's in particular targeted for making it easy to integrate SVG into Java
11815 games and making it much easier for artists to design 2D game content - from
11816 rich interactive menus to charts and graphcs to complex animations.")
11817 (license license:bsd-2)))
11819 (define-public java-jboss-transaction-api-spec
11821 (name "java-jboss-transaction-api-spec")
11822 (version "1.2+1.1.1")
11825 (uri (git-reference
11826 (url "https://github.com/jboss/jboss-transaction-api_spec")
11827 (commit "jboss-transaction-api_1.2_spec-1.1.1.Final")))
11828 (file-name (git-file-name name version))
11831 "1xbfq5hvb86izflydxrqqv3k26c1ba2m0ap6m97shqrsdi9by4wy"))))
11832 (build-system ant-build-system)
11834 `(#:jar-name "java-jboss-transaction-api_spec.jar"
11835 #:source-dir "src/main/java"
11836 #:tests? #f)); no tests
11838 `(("java-cdi-api" ,java-cdi-api)
11839 ("java-jboss-interceptors-api-spec" ,java-jboss-interceptors-api-spec)))
11840 (home-page "https://github.com/jboss/jboss-transaction-api_spec")
11841 (synopsis "Generic transaction management API in Java")
11842 (description "Java-jboss-transaction-api-spec implements the Transactions
11843 API. A transaction is a unit of work containing one or more operations
11844 involving one or more shared resources having ACID (Atomicity, Consistency,
11845 Isolation and Durability) properties.")
11846 ;; either gpl2 only with classpath exception or cddl.
11847 (license (list license:gpl2 license:cddl1.0))))