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 Efraim Flashner <efraim@flashner.co.il>
13 ;;; Copyright © 2019, 2020 Björn Höfling <bjoern.hoefling@bjoernhoefling.de>
15 ;;; This file is part of GNU Guix.
17 ;;; GNU Guix is free software; you can redistribute it and/or modify it
18 ;;; under the terms of the GNU General Public License as published by
19 ;;; the Free Software Foundation; either version 3 of the License, or (at
20 ;;; your option) any later version.
22 ;;; GNU Guix is distributed in the hope that it will be useful, but
23 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
24 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25 ;;; GNU General Public License for more details.
27 ;;; You should have received a copy of the GNU General Public License
28 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
30 (define-module (gnu packages java)
31 #:use-module ((guix licenses) #:prefix license:)
32 #:use-module (guix packages)
33 #:use-module (guix download)
34 #:use-module (guix hg-download)
35 #:use-module (guix git-download)
36 #:use-module (guix svn-download)
37 #:use-module (guix utils)
38 #:use-module (guix build-system ant)
39 #:use-module (guix build-system gnu)
40 #:use-module (guix build-system trivial)
41 #:use-module (gnu packages)
42 #:use-module (gnu packages attr)
43 #:use-module (gnu packages autotools)
44 #:use-module (gnu packages base)
45 #:use-module (gnu packages bash)
46 #:use-module (gnu packages certs)
47 #:use-module (gnu packages cpio)
48 #:use-module (gnu packages cups)
49 #:use-module (gnu packages compression)
50 #:use-module (gnu packages elf)
51 #:use-module (gnu packages fontutils)
52 #:use-module (gnu packages gawk)
53 #:use-module (gnu packages gettext)
54 #:use-module (gnu packages gcc)
55 #:use-module (gnu packages gl)
56 #:use-module (gnu packages ghostscript) ;lcms
57 #:use-module (gnu packages gnome)
58 #:use-module (gnu packages groovy)
59 #:use-module (gnu packages gtk)
60 #:use-module (gnu packages guile)
61 #:use-module (gnu packages icu4c)
62 #:use-module (gnu packages image)
63 #:use-module (gnu packages java-compression)
64 #:use-module (gnu packages libffi)
65 #:use-module (gnu packages linux) ;alsa
66 #:use-module (gnu packages maths)
67 #:use-module (gnu packages nss)
68 #:use-module (gnu packages onc-rpc)
69 #:use-module (gnu packages web)
70 #:use-module (gnu packages wget)
71 #:use-module (gnu packages pkg-config)
72 #:use-module (gnu packages perl)
73 #:use-module (gnu packages popt)
74 #:use-module (gnu packages kerberos)
75 #:use-module (gnu packages xml)
76 #:use-module (gnu packages xorg)
77 #:use-module (gnu packages texinfo)
78 #:use-module ((srfi srfi-1) #:select (fold alist-delete))
79 #:use-module (srfi srfi-11)
80 #:use-module (ice-9 match))
84 ;;; Java bootstrap toolchain.
87 ;; The Java bootstrap begins with Jikes, a Java compiler written in C++. We
88 ;; use it to build a simple version of GNU Classpath, the Java standard
89 ;; library. We chose version 0.93 because it is the last version that can be
90 ;; built with Jikes. With Jikes and this version of GNU Classpath we can
91 ;; build JamVM, a Java Virtual Machine. We build version 1.5.1 because it is
92 ;; the last version of JamVM that works with a version of GNU classpath that
93 ;; does not require ECJ. These three packages make up the bootstrap JDK.
95 ;; This is sufficient to build an older version of Ant, which is needed to
96 ;; build an older version of ECJ, an incremental Java compiler, both of which
97 ;; are written in Java.
99 ;; ECJ is needed to build the latest release (0.99) and the development
100 ;; version of GNU Classpath. The development version of GNU Classpath has
101 ;; much more support for Java 1.6 than the latest release, but we need to
102 ;; build 0.99 first to get a working version of javah. ECJ, the development
103 ;; version of GNU Classpath, and the latest version of JamVM make up the
104 ;; second stage JDK with which we can build the OpenJDK with the Icedtea 1.x
105 ;; build framework. We then build the more recent JDKs Icedtea 2.x and
114 (uri (string-append "mirror://sourceforge/jikes/Jikes/"
115 version "/jikes-" version ".tar.bz2"))
118 "1qqldrp74pzpy5ly421srqn30qppmm9cvjiqdngk8hf47dv2rc0c"))))
119 (build-system gnu-build-system)
120 (home-page "http://jikes.sourceforge.net/")
121 (synopsis "Compiler for the Java language")
122 (description "Jikes is a compiler that translates Java source files as
123 defined in The Java Language Specification into the bytecoded instruction set
124 and binary format defined in The Java Virtual Machine Specification.")
125 (license license:ibmpl1.0)))
127 ;; This is the last version of GNU Classpath that can be built without ECJ.
128 (define classpath-bootstrap
134 (uri (string-append "mirror://gnu/classpath/classpath-"
138 "0i99wf9xd3hw1sj2sazychb9prx8nadxh2clgvk3zlmb28v0jbfz"))
139 (patches (search-patches "classpath-aarch64-support.patch"))))
140 (build-system gnu-build-system)
143 (list (string-append "JAVAC="
144 (assoc-ref %build-inputs "jikes")
149 "--disable-gconf-peer"
155 (modify-phases %standard-phases
156 ;; XXX: This introduces a memory leak as we remove a call to free up
157 ;; memory for the file name string. This was necessary because of a
158 ;; runtime error that would have prevented us from building
159 ;; ant-bootstrap later. See https://issues.guix.gnu.org/issue/36685
160 ;; for the gnarly details.
161 (add-after 'unpack 'remove-call-to-free
163 (substitute* "native/jni/java-io/java_io_VMFile.c"
164 (("result = cpio_isFileExists.*" m)
165 (string-append m "\n//")))
167 (add-after 'install 'install-data
168 (lambda _ (invoke "make" "install-data"))))))
173 ("pkg-config" ,pkg-config)))
174 (home-page "https://www.gnu.org/software/classpath/")
175 (synopsis "Essential libraries for Java")
176 (description "GNU Classpath is a project to create core class libraries
177 for use with runtimes, compilers and tools for the Java programming
179 ;; GPLv2 or later, with special linking exception.
180 (license license:gpl2+)))
182 ;; This is the last version of JamVM that works with a version of GNU
183 ;; classpath that does not require ECJ.
184 (define jamvm-1-bootstrap
190 (uri (string-append "mirror://sourceforge/jamvm/jamvm/"
191 "JamVM%20" version "/jamvm-"
193 (patches (search-patches "jamvm-arm.patch"))
196 "06lhi03l3b0h48pc7x58bk9my2nrcf1flpmglvys3wyad6yraf36"))
199 ;; Remove precompiled software.
200 (delete-file "lib/classes.zip")
202 (build-system gnu-build-system)
205 (list (string-append "--with-classpath-install-dir="
206 (assoc-ref %build-inputs "classpath"))
207 "--disable-int-caching"
208 "--enable-runtime-reloc-checks"
211 `(("classpath" ,classpath-bootstrap)
216 ;; When built with a recent GCC and glibc the configure step of icedtea-6
217 ;; fails with an invalid instruction error.
220 ("libc" ,glibc-2.28)))
221 (home-page "http://jamvm.sourceforge.net/")
222 (synopsis "Small Java Virtual Machine")
223 (description "JamVM is a Java Virtual Machine conforming to the JVM
224 specification edition 2 (blue book). It is extremely small. However, unlike
225 other small VMs it supports the full spec, including object finalisation and
227 (license license:gpl2+)))
229 (define ant-bootstrap
231 (name "ant-bootstrap")
232 ;; The 1.10.x series requires Java 8. 1.9.0 and later use generics, which
233 ;; are not supported. The 1.8.x series is the last to use only features
234 ;; supported by Jikes.
238 (uri (string-append "http://archive.apache.org/dist/"
239 "ant/source/apache-ant-"
240 version "-src.tar.bz2"))
243 "1cg0lga887qz5iizh6mlkxp01lciymrhmp7wzxpl6zpnldxmzrjx"))))
244 (build-system gnu-build-system)
246 `(#:imported-modules ((guix build syscalls)
247 ,@%gnu-build-system-modules)
248 #:modules ((srfi srfi-1)
249 (guix build gnu-build-system)
251 (guix build syscalls))
252 #:tests? #f ; no "check" target
254 (modify-phases %standard-phases
258 (lambda* (#:key inputs #:allow-other-keys)
259 (setenv "JAVA_HOME" (assoc-ref inputs "jamvm"))
261 (string-append (assoc-ref inputs "jamvm")
264 (string-append (assoc-ref inputs "jikes")
267 (string-append (assoc-ref inputs "jamvm")
270 ;; Ant complains if this file doesn't exist.
271 (setenv "HOME" "/tmp")
272 (with-output-to-file "/tmp/.ant.properties"
273 (lambda _ (display "")))
275 ;; Use jikes instead of javac for <javac ...> tags in build.xml
276 (setenv "ANT_OPTS" "-Dbuild.compiler=jikes")
278 ;; jikes produces lots of warnings, but they are not very
279 ;; interesting, so we silence them.
280 (setenv "$BOOTJAVAC_OPTS" "-nowarn")
282 ;; Without these JamVM options the build may freeze.
283 (substitute* "bootstrap.sh"
284 (("^\"\\$\\{JAVACMD\\}\" " m)
285 ,@(if (string-prefix? "armhf" (or (%current-system)
286 (%current-target-system)))
287 `((string-append m "-Xnocompact "))
288 `((string-append m "-Xnocompact -Xnoinlining ")))))
290 ;; Disable tests because we are bootstrapping and thus don't have
291 ;; any of the dependencies required to build and run the tests.
292 (substitute* "build.xml"
293 (("depends=\"jars,test-jar\"") "depends=\"jars\""))
294 (invoke "bash" "bootstrap.sh"
295 (string-append "-Ddist.dir="
296 (assoc-ref %outputs "out")))))
297 (add-after 'build 'strip-jar-timestamps ;based on ant-build-system
298 (lambda* (#:key outputs #:allow-other-keys)
299 (define (repack-archive jar)
300 (let* ((dir (mkdtemp! "jar-contents.XXXXXX"))
301 (manifest (string-append dir "/META-INF/MANIFESTS.MF")))
302 (with-directory-excursion dir
303 (invoke "unzip" jar))
305 ;; XXX: copied from (gnu build install)
306 (for-each (lambda (file)
307 (let ((s (lstat file)))
308 (unless (eq? (stat:type s) 'symlink)
309 (utime file 0 0 0 0))))
310 (find-files dir #:directories? #t))
311 ;; It is important that the manifest appears first.
312 (with-directory-excursion dir
313 (let* ((files (find-files "." ".*" #:directories? #t))
314 ;; To ensure that the reference scanner can
315 ;; detect all store references in the jars
316 ;; we disable compression with the "-0" option.
317 (command (if (file-exists? manifest)
318 `("zip" "-0" "-X" ,jar ,manifest
320 `("zip" "-0" "-X" ,jar ,@files))))
321 (apply invoke command)))))
322 (for-each repack-archive
324 (string-append (assoc-ref %outputs "out") "/lib")
330 ("jamvm" ,jamvm-1-bootstrap)
333 (home-page "https://ant.apache.org")
334 (synopsis "Build tool for Java")
336 "Ant is a platform-independent build tool for Java. It is similar to
337 make but is implemented using the Java language, requires the Java platform,
338 and is best suited to building Java projects. Ant uses XML to describe the
339 build process and its dependencies, whereas Make uses Makefile format.")
340 (license license:asl2.0)))
342 ;; Version 3.2.2 is the last version without a dependency on a full-fledged
343 ;; compiler for Java 1.5.
344 (define ecj-bootstrap
346 (name "ecj-bootstrap")
350 (uri (string-append "http://archive.eclipse.org/eclipse/"
351 "downloads/drops/R-" version
352 "-200702121330/ecjsrc.zip"))
355 "05hj82kxd23qaglsjkaqcj944riisjha7acf7h3ljhrjyljx8307"))))
356 ;; It would be so much easier if we could use the ant-build-system, but we
357 ;; cannot as we don't have ant at this point. We use ecj for
358 ;; bootstrapping the JDK.
359 (build-system gnu-build-system)
361 `(#:modules ((guix build gnu-build-system)
364 #:tests? #f ; there are no tests
366 (modify-phases %standard-phases
368 (lambda* (#:key inputs #:allow-other-keys)
371 (cons (string-append (assoc-ref inputs "jamvm")
373 (find-files (string-append
374 (assoc-ref inputs "ant-bootstrap")
380 (lambda* (#:key inputs #:allow-other-keys)
381 ;; The unpack phase enters the "org" directory by mistake.
384 ;; Create a simple manifest to make ecj executable.
385 (with-output-to-file "manifest"
387 (display "Manifest-Version: 1.0
388 Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n")))
391 (and (apply invoke "jikes"
392 (find-files "." "\\.java$"))
393 (invoke "fastjar" "cvfm"
394 "ecj-bootstrap.jar" "manifest" "."))))
396 (lambda* (#:key outputs #:allow-other-keys)
397 (let ((share (string-append (assoc-ref outputs "out")
400 (install-file "ecj-bootstrap.jar" share)
403 `(("ant-bootstrap" ,ant-bootstrap)
406 ("jamvm" ,jamvm-1-bootstrap)
407 ("fastjar" ,fastjar)))
408 (home-page "https://eclipse.org")
409 (synopsis "Eclipse Java development tools core batch compiler")
410 (description "This package provides the Eclipse Java core batch compiler
411 for bootstrapping purposes. The @dfn{Eclipse compiler for Java} (ecj) is a
412 requirement for all GNU Classpath releases after version 0.93.")
413 (license license:epl1.0)))
415 (define ecj-javac-wrapper
416 (package (inherit ecj-bootstrap)
417 (name "ecj-javac-wrapper")
419 (build-system trivial-build-system)
421 `(#:modules ((guix build utils))
424 (use-modules (guix build utils))
425 (let* ((bin (string-append (assoc-ref %outputs "out") "/bin"))
426 (target (string-append bin "/javac"))
427 (guile (string-append (assoc-ref %build-inputs "guile")
429 (ecj (string-append (assoc-ref %build-inputs "ecj-bootstrap")
430 "/share/java/ecj-bootstrap.jar"))
431 (java (string-append (assoc-ref %build-inputs "jamvm")
433 (bootcp (let ((jvmlib (string-append (assoc-ref %build-inputs "classpath")
434 "/share/classpath")))
435 (string-append jvmlib "/glibj.zip:"
436 jvmlib "/tools.zip"))))
438 (with-output-to-file target
440 (format #t "#!~a --no-auto-compile\n!#\n" guile)
442 `(begin (use-modules (ice-9 match)
448 '(("-bootclasspath" ,bootcp)
453 (let ((classpath (getenv "CLASSPATH")))
455 (string-join (list ,ecj
456 ,(string-append (assoc-ref %build-inputs "jamvm")
460 (receive (vm-args other-args)
461 ;; Separate VM arguments from arguments to ECJ.
462 (partition (cut string-prefix? "-J" <>)
463 (fold (lambda (default acc)
464 (if (member (first default) acc)
465 acc (append default acc)))
469 ;; Remove "-J" prefix
470 (map (cut string-drop <> 2) vm-args)
471 '("org.eclipse.jdt.internal.compiler.batch.Main")
472 (cons "-nowarn" other-args)))))
474 (let ((args (cdr (command-line))))
476 (format (current-error-port) "javac: no arguments given!\n")
481 `(("guile" ,guile-2.2)
482 ("ecj-bootstrap" ,ecj-bootstrap)
483 ("jamvm" ,jamvm-1-bootstrap)
484 ("classpath" ,classpath-bootstrap)))
485 (description "This package provides a wrapper around the @dfn{Eclipse
486 compiler for Java} (ecj) with a command line interface that is compatible with
487 the standard javac executable.")))
489 ;; The classpath-bootstrap was built without a virtual machine, so it does not
490 ;; provide a wrapper for javah. We cannot build the development version of
491 ;; Classpath without javah.
492 (define classpath-0.99
493 (package (inherit classpath-bootstrap)
497 (uri (string-append "mirror://gnu/classpath/classpath-"
501 "1j7cby4k66f1nvckm48xcmh352b1d1b33qk7l6hi7dp9i9zjjagr"))
502 (patches (search-patches "classpath-aarch64-support.patch"))))
505 (list (string-append "--with-ecj-jar="
506 (assoc-ref %build-inputs "ecj-bootstrap")
507 "/share/java/ecj-bootstrap.jar")
508 (string-append "JAVAC="
509 (assoc-ref %build-inputs "ecj-javac-wrapper")
511 (string-append "JAVA="
512 (assoc-ref %build-inputs "jamvm")
515 "ac_cv_prog_java_works=yes" ; trust me
519 "--disable-gconf-peer"
525 (modify-phases %standard-phases
526 (add-after 'install 'install-data
527 (lambda _ (invoke "make" "install-data"))))))
529 `(("ecj-bootstrap" ,ecj-bootstrap)
530 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
532 ("jamvm" ,jamvm-1-bootstrap)
533 ("classpath" ,classpath-bootstrap)
535 ("pkg-config" ,pkg-config)))))
537 ;; We need this because classpath-bootstrap does not provide all of the tools
538 ;; we need to build classpath-devel.
539 (define classpath-jamvm-wrappers
540 (package (inherit classpath-0.99)
541 (name "classpath-jamvm-wrappers")
543 (build-system trivial-build-system)
545 `(#:modules ((guix build utils))
548 (use-modules (guix build utils))
549 (let* ((bash (assoc-ref %build-inputs "bash"))
550 (jamvm (assoc-ref %build-inputs "jamvm"))
551 (classpath (assoc-ref %build-inputs "classpath"))
552 (bin (string-append (assoc-ref %outputs "out")
555 (for-each (lambda (tool)
556 (with-output-to-file (string-append bin tool)
558 ,@(if (string-prefix? "armhf" (or (%current-system)
559 (%current-target-system)))
560 `((format #t "#!~a/bin/sh
561 ~a/bin/jamvm -Xnocompact -classpath ~a/share/classpath/tools.zip \
562 gnu.classpath.tools.~a.~a $@"
563 bash jamvm classpath tool
564 (if (string=? "native2ascii" tool)
565 "Native2ASCII" "Main")))
566 `((format #t "#!~a/bin/sh
567 ~a/bin/jamvm -Xnocompact -Xnoinlining -classpath ~a/share/classpath/tools.zip \
568 gnu.classpath.tools.~a.~a $@"
569 bash jamvm classpath tool
570 (if (string=? "native2ascii" tool)
571 "Native2ASCII" "Main"))))))
572 (chmod (string-append bin tool) #o755))
582 ("jamvm" ,jamvm-1-bootstrap)
583 ("classpath" ,classpath-0.99)))
585 (synopsis "Executables from GNU Classpath")
586 (description "This package provides wrappers around the tools provided by
587 the GNU Classpath library. They are executed by the JamVM virtual
590 ;; The last release of GNU Classpath is 0.99 and it happened in 2012. Since
591 ;; then Classpath has gained much more support for Java 1.6.
592 (define-public classpath-devel
593 (let ((commit "e7c13ee0cf2005206fbec0eca677f8cf66d5a103")
595 (package (inherit classpath-bootstrap)
596 (version (string-append "0.99-" revision "." (string-take commit 9)))
600 (url "https://git.savannah.gnu.org/git/classpath.git")
602 (file-name (string-append "classpath-" version "-checkout"))
605 "1v2rww76ww322mpg3s12a1kkc6gkp31bm9gcxs532h0wq285fiw4"))))
608 ;; Ensure that the initial heap size is smaller than the maximum
609 ;; size. By default only Xmx is set, which can lead to invalid
610 ;; memory settings on some machines with a lot of memory.
611 '("JAVAC_MEM_OPT=-J-Xms512M -J-Xmx768M")
613 (list (string-append "--with-ecj-jar="
614 (assoc-ref %build-inputs "ecj-bootstrap")
615 "/share/java/ecj-bootstrap.jar")
616 (string-append "--with-javac="
617 (assoc-ref %build-inputs "ecj-javac-wrapper")
619 (string-append "JAVA="
620 (assoc-ref %build-inputs "jamvm")
623 "ac_cv_prog_java_works=yes" ; trust me
627 "--disable-gconf-peer"
633 (modify-phases %standard-phases
634 ;; XXX The bootstrap phase executes autogen.sh, which fails after
635 ;; complaining about the lack of gettext.
637 (lambda _ (invoke "autoreconf" "-vif")))
638 (add-after 'unpack 'remove-unsupported-annotations
640 (substitute* (find-files "java" "\\.java$")
643 (add-after 'install 'install-data
644 (lambda _ (invoke "make" "install-data"))))))
646 `(("autoconf" ,autoconf)
647 ("automake" ,automake)
649 ("gettext" ,gettext-minimal)
651 ("classpath-jamvm-wrappers" ,classpath-jamvm-wrappers) ; for javah
652 ("ecj-bootstrap" ,ecj-bootstrap)
653 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
655 ("jamvm" ,jamvm-1-bootstrap)
657 ("pkg-config" ,pkg-config))))))
660 (package (inherit jamvm-1-bootstrap)
664 (uri (string-append "mirror://sourceforge/jamvm/jamvm/"
665 "JamVM%20" version "/jamvm-"
669 "1nl0zxz8y5x8gwsrm7n32bry4dx8x70p8z3s9jbdvs8avyb8whkn"))
672 ;; Remove precompiled software.
673 (delete-file "src/classlib/gnuclasspath/lib/classes.zip")
675 (build-system gnu-build-system)
678 (list (string-append "--with-classpath-install-dir="
679 (assoc-ref %build-inputs "classpath")))))
681 `(("classpath" ,classpath-devel)
682 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
686 (define ecj-javac-wrapper-final
687 (package (inherit ecj-javac-wrapper)
689 `(("guile" ,guile-2.2)
690 ("ecj-bootstrap" ,ecj-bootstrap)
692 ("classpath" ,classpath-devel)))))
694 ;; The bootstrap JDK consisting of jamvm, classpath-devel,
695 ;; ecj-javac-wrapper-final cannot build Icedtea 2.x directly, because it's
696 ;; written in Java 7. It can, however, build the unmaintained Icedtea 1.x,
697 ;; which uses Java 6 only.
698 (define-public icedtea-6
705 "http://icedtea.wildebeest.org/download/source/icedtea6-"
709 "0bg9sb4f7qbq77c0zf9m17p47ga0kf0r9622g9p12ysg26jd1ksg"))
710 (modules '((guix build utils)))
713 (substitute* "Makefile.in"
714 ;; do not leak information about the build host
715 (("DISTRIBUTION_ID=\"\\$\\(DIST_ID\\)\"")
716 "DISTRIBUTION_ID=\"\\\"guix\\\"\""))
718 (build-system gnu-build-system)
719 (outputs '("out" ; Java Runtime Environment
720 "jdk" ; Java Development Kit
721 "doc")) ; all documentation
723 `(;; There are many failing tests and many are known to fail upstream.
726 ;; The DSOs use $ORIGIN to refer to each other, but (guix build
727 ;; gremlin) doesn't support it yet, so skip this phase.
728 #:validate-runpath? #f
730 #:modules ((guix build utils)
731 (guix build gnu-build-system)
735 `("--enable-bootstrap"
738 "--with-parallel-jobs"
739 "--disable-downloading"
741 ,(string-append "--with-ecj="
742 (assoc-ref %build-inputs "ecj")
743 "/share/java/ecj-bootstrap.jar")
744 ,(string-append "--with-jar="
745 (assoc-ref %build-inputs "fastjar")
747 ,(string-append "--with-jdk-home="
748 (assoc-ref %build-inputs "classpath"))
749 ,(string-append "--with-java="
750 (assoc-ref %build-inputs "jamvm")
753 (modify-phases %standard-phases
755 (lambda* (#:key source inputs #:allow-other-keys)
756 (invoke "tar" "xvf" source)
757 (chdir (string-append "icedtea6-" ,version))
759 (copy-recursively (assoc-ref inputs "openjdk-src") "openjdk")
760 ;; The convenient OpenJDK source bundle is no longer
761 ;; available for download, so we have to take the sources
762 ;; from the Mercurial repositories and change the Makefile
763 ;; to avoid tests for the OpenJDK zip archive.
764 (with-directory-excursion "openjdk"
765 (for-each (lambda (part)
769 (string-append part "-src"))
772 "langtools" "jaxp" "jaxws")))
773 (with-directory-excursion "openjdk"
774 (invoke "tar" "xvf" (assoc-ref inputs "hotspot-src"))
775 (rename-file "hg-checkout" "hotspot"))
776 (substitute* "patches/freetypeversion.patch"
777 (("REQUIRED_FREETYPE_VERSION = 2.2.1")
778 "REQUIRED_FREETYPE_VERSION = 2.10.1"))
779 (substitute* "Makefile.in"
780 (("echo \"ERROR: No up-to-date OpenJDK zip available\"; exit -1;")
781 "echo \"trust me\";")
782 ;; The contents of the bootstrap directory must be
783 ;; writeable but when copying from the store they are
785 (("mkdir -p lib/rt" line)
786 (string-append line "; chmod -R u+w $(BOOT_DIR)")))
787 (invoke "chmod" "-R" "u+w" "openjdk")))
788 (add-after 'unpack 'use-classpath
789 (lambda* (#:key inputs #:allow-other-keys)
790 (let ((jvmlib (assoc-ref inputs "classpath"))
791 (jamvm (assoc-ref inputs "jamvm")))
792 ;; Classpath does not provide rt.jar.
793 (substitute* "Makefile.in"
794 (("\\$\\(SYSTEM_JDK_DIR\\)/jre/lib/rt.jar")
795 (string-append jvmlib "/share/classpath/glibj.zip")))
796 ;; Make sure we can find all classes.
798 (string-append jvmlib "/share/classpath/glibj.zip:"
799 jvmlib "/share/classpath/tools.zip:"
800 jamvm "/lib/rt.jar"))
802 (string-append "-cp "
803 jvmlib "/share/classpath/glibj.zip:"
804 jvmlib "/share/classpath/tools.zip")))
806 (add-after 'unpack 'patch-patches
808 ;; shebang in patches so that they apply cleanly
809 (substitute* '("patches/jtreg-jrunscript.patch"
810 "patches/hotspot/hs23/drop_unlicensed_test.patch")
811 (("#!/bin/sh") (string-append "#!" (which "sh"))))
813 (add-after 'unpack 'patch-paths
814 (lambda* (#:key inputs #:allow-other-keys)
815 ;; buildtree.make generates shell scripts, so we need to replace
816 ;; the generated shebang
817 (substitute* '("openjdk/hotspot/make/linux/makefiles/buildtree.make")
818 (("/bin/sh") (which "bash")))
820 (let ((corebin (string-append
821 (assoc-ref inputs "coreutils") "/bin/"))
822 (binbin (string-append
823 (assoc-ref inputs "binutils") "/bin/"))
824 (grepbin (string-append
825 (assoc-ref inputs "grep") "/bin/")))
826 (substitute* '("openjdk/jdk/make/common/shared/Defs-linux.gmk"
827 "openjdk/corba/make/common/shared/Defs-linux.gmk")
828 (("UNIXCOMMAND_PATH = /bin/")
829 (string-append "UNIXCOMMAND_PATH = " corebin))
830 (("USRBIN_PATH = /usr/bin/")
831 (string-append "USRBIN_PATH = " corebin))
832 (("DEVTOOLS_PATH *= */usr/bin/")
833 (string-append "DEVTOOLS_PATH = " corebin))
834 (("COMPILER_PATH *= */usr/bin/")
835 (string-append "COMPILER_PATH = "
836 (assoc-ref inputs "gcc") "/bin/"))
837 (("DEF_OBJCOPY *=.*objcopy")
838 (string-append "DEF_OBJCOPY = " (which "objcopy"))))
840 ;; fix path to alsa header
841 (substitute* "openjdk/jdk/make/common/shared/Sanity.gmk"
842 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
843 (string-append "ALSA_INCLUDE="
844 (assoc-ref inputs "alsa-lib")
845 "/include/alsa/version.h")))
847 ;; fix hard-coded utility paths
848 (substitute* '("openjdk/jdk/make/common/shared/Defs-utils.gmk"
849 "openjdk/corba/make/common/shared/Defs-utils.gmk")
851 (string-append "ECHO = " (which "echo")))
853 (string-append "GREP = " (which "grep")))
855 (string-append "EGREP = " (which "egrep")))
857 (string-append "CPIO = " (which "cpio")))
858 (("READELF *=.*readelf")
859 (string-append "READELF = " (which "readelf")))
861 (string-append "AR = " (which "ar")))
863 (string-append "TAR = " (which "tar")))
865 (string-append "AS = " (which "as")))
867 (string-append "LD = " (which "ld")))
869 (string-append "STRIP = " (which "strip")))
871 (string-append "NM = " (which "nm")))
873 (string-append "SH = " (which "bash")))
875 (string-append "FIND = " (which "find")))
877 (string-append "LDD = " (which "ldd")))
878 (("NAWK *=.*(n|g)awk")
879 (string-append "NAWK = " (which "gawk")))
881 (string-append "XARGS = " (which "xargs")))
883 (string-append "UNZIP = " (which "unzip")))
885 (string-append "ZIPEXE = " (which "zip")))
887 (string-append "SED = " (which "sed"))))
889 ;; Some of these timestamps cause problems as they are more than
890 ;; 10 years ago, failing the build process.
892 "openjdk/jdk/src/share/classes/java/util/CurrencyData.properties"
893 (("AZ=AZM;2005-12-31-20-00-00;AZN") "AZ=AZN")
894 (("MZ=MZM;2006-06-30-22-00-00;MZN") "MZ=MZN")
895 (("RO=ROL;2005-06-30-21-00-00;RON") "RO=RON")
896 (("TR=TRL;2004-12-31-22-00-00;TRY") "TR=TRY"))
898 (add-before 'configure 'set-additional-paths
899 (lambda* (#:key inputs #:allow-other-keys)
901 (string-append (assoc-ref inputs "libxrender")
902 "/include/X11/extensions" ":"
903 (assoc-ref inputs "libxtst")
904 "/include/X11/extensions" ":"
905 (assoc-ref inputs "libxinerama")
906 "/include/X11/extensions" ":"
907 (or (getenv "CPATH") "")))
908 (setenv "ALT_CUPS_HEADERS_PATH"
909 (string-append (assoc-ref inputs "cups")
911 (setenv "ALT_FREETYPE_HEADERS_PATH"
912 (string-append (assoc-ref inputs "freetype")
914 (setenv "ALT_FREETYPE_LIB_PATH"
915 (string-append (assoc-ref inputs "freetype")
918 (add-before 'build 'disable-os-version-check
919 ;; allow build on linux major version change
921 (setenv "DISABLE_HOTSPOT_OS_VERSION_CHECK" "ok")
924 (lambda* (#:key outputs #:allow-other-keys)
925 (let ((doc (string-append (assoc-ref outputs "doc")
926 "/share/doc/icedtea"))
927 (jre (assoc-ref outputs "out"))
928 (jdk (assoc-ref outputs "jdk")))
929 (copy-recursively "openjdk.build/docs" doc)
930 (copy-recursively "openjdk.build/j2re-image" jre)
931 (copy-recursively "openjdk.build/j2sdk-image" jdk))
934 `(("ant" ,ant-bootstrap)
935 ("alsa-lib" ,alsa-lib)
937 ("classpath" ,classpath-devel)
938 ("coreutils" ,coreutils)
941 ("ecj" ,ecj-bootstrap)
942 ("ecj-javac" ,ecj-javac-wrapper-final)
944 ("fontconfig" ,fontconfig)
945 ("freetype" ,freetype)
957 ("libxcomposite" ,libxcomposite)
959 ("libxinerama" ,libxinerama)
960 ("libxrender" ,libxrender)
961 ("libxslt" ,libxslt) ;for xsltproc
964 ("mit-krb5" ,mit-krb5)
966 ("nss-certs" ,nss-certs)
968 ("pkg-config" ,pkg-config)
969 ("procps" ,procps) ;for "free", even though I'm not sure we should use it
979 (url "http://hg.openjdk.java.net/jdk6/jdk6/")
980 (changeset "jdk6-b41")))
983 "14q47yfg586fs64w30g8mk92m5dkxsvr36zzh0ra99xk5x0x96mv"))))
988 (url "http://hg.openjdk.java.net/jdk6/jdk6/jdk/")
989 (changeset "jdk6-b41")))
992 "165824nhg1k1dx6zs9dny0j49rmk35jw5b13dmz8c77jfajml4v9"))))
997 (url "http://hg.openjdk.java.net/jdk6/jdk6/hotspot/")
998 (changeset "jdk6-b41")))
1001 "07lc1z4k5dj9nrc1wvwmpvxr3xgxrdkdh53xb95skk5ij49yagfd"))
1003 (search-patches "icedtea-6-hotspot-gcc-segfault-workaround.patch"))))
1008 (url "http://hg.openjdk.java.net/jdk6/jdk6/corba/")
1009 (changeset "jdk6-b41")))
1012 "1p9g1r9dnax2iwp7yb59qx7m4nmshqhwmrb2b8jj8zgbd9dl2i3q"))))
1017 (url "http://hg.openjdk.java.net/jdk6/jdk6/langtools/")
1018 (changeset "jdk6-b41")))
1021 "1x52wd67fynbbd9ild6fb4wvba3f5hhwk03qdjfazd0a1qr37z3d"))))
1026 (url "http://hg.openjdk.java.net/jdk6/jdk6/jaxp/")
1027 (changeset "jdk6-b41")))
1030 "0shlqrvzpr4nrkmv215lbxnby63s3yvbdh1yxcayznsyqwa4nlxm"))))
1035 (url "http://hg.openjdk.java.net/jdk6/jdk6/jaxws/")
1036 (changeset "jdk6-b41")))
1039 "0835lkw8vib1xhp8lxnybhlvzdh699hbi4mclxanydjk63zbpxk0"))))))
1040 (home-page "http://icedtea.classpath.org")
1041 (synopsis "Java development kit")
1043 "This package provides the OpenJDK built with the IcedTea build harness.
1044 This version of the OpenJDK is no longer maintained and is only used for
1045 bootstrapping purposes.")
1046 ;; IcedTea is released under the GPL2 + Classpath exception, which is the
1047 ;; same license as both GNU Classpath and OpenJDK.
1048 (license license:gpl2+)))
1050 (define-public icedtea-7
1051 (let* ((version "2.6.13")
1052 (drop (lambda (name hash)
1056 "http://icedtea.classpath.org/download/drops"
1057 "/icedtea7/" version "/" name ".tar.bz2"))
1058 (sha256 (base32 hash))))))
1065 "http://icedtea.wildebeest.org/download/source/icedtea-"
1069 "1w331rdqx1dcx2xb0fmjmrkdc71xqn20fxsgw8by4xhiblh88khh"))
1070 (modules '((guix build utils)))
1073 (substitute* "Makefile.in"
1074 ;; do not leak information about the build host
1075 (("DISTRIBUTION_ID=\"\\$\\(DIST_ID\\)\"")
1076 "DISTRIBUTION_ID=\"\\\"guix\\\"\""))
1078 (build-system gnu-build-system)
1079 (outputs '("out" ; Java Runtime Environment
1080 "jdk" ; Java Development Kit
1081 "doc")) ; all documentation
1083 `(;; There are many test failures. Some are known to
1084 ;; fail upstream, others relate to not having an X
1085 ;; server running at test time, yet others are a
1086 ;; complete mystery to me.
1088 ;; hotspot: passed: 241; failed: 45; error: 2
1089 ;; langtools: passed: 1,934; failed: 26
1093 ;; The DSOs use $ORIGIN to refer to each other, but (guix build
1094 ;; gremlin) doesn't support it yet, so skip this phase.
1095 #:validate-runpath? #f
1097 ;; Apparently, the C locale is needed for some of the tests.
1100 #:modules ((guix build utils)
1101 (guix build gnu-build-system)
1108 ;; TODO: package pcsc and sctp, and add to inputs
1109 `("--disable-system-pcsc"
1110 "--disable-system-sctp"
1111 "--enable-bootstrap"
1114 "--disable-downloading"
1115 "--disable-tests" ;they are run in the check phase instead
1116 "--with-openjdk-src-dir=./openjdk.src"
1117 ,(string-append "--with-jdk-home="
1118 (assoc-ref %build-inputs "jdk")))
1121 (modify-phases %standard-phases
1123 (lambda* (#:key source inputs #:allow-other-keys)
1124 (let ((target (string-append "icedtea-" ,version))
1125 (unpack (lambda* (name #:optional dir)
1127 (string-drop-right name 5))))
1130 (assoc-ref inputs name)
1132 "--strip-components=1")))))
1134 (invoke "tar" "xvf" source
1135 "-C" target "--strip-components=1")
1137 (unpack "openjdk-src" "openjdk.src")
1138 (with-directory-excursion "openjdk.src"
1140 (filter (cut string-suffix? "-drop" <>)
1145 (add-after 'unpack 'patch-bitrot
1147 (substitute* '("patches/boot/revert-6973616.patch"
1148 "openjdk.src/jdk/make/common/shared/Defs-versions.gmk")
1149 (("REQUIRED_FREETYPE_VERSION = 2.2.1")
1150 "REQUIRED_FREETYPE_VERSION = 2.10.1"))
1151 ;; As of attr 2.4.48 this header is no longer
1152 ;; included. It is provided by the libc instead.
1153 (substitute* '("configure"
1154 "openjdk.src/jdk/src/solaris/native/sun/nio/fs/LinuxNativeDispatcher.c")
1155 (("attr/xattr.h") "sys/xattr.h"))
1157 (add-after 'unpack 'fix-x11-extension-include-path
1158 (lambda* (#:key inputs #:allow-other-keys)
1159 (substitute* "openjdk.src/jdk/make/sun/awt/mawt.gmk"
1160 (((string-append "\\$\\(firstword \\$\\(wildcard "
1161 "\\$\\(OPENWIN_HOME\\)"
1162 "/include/X11/extensions\\).*$"))
1163 (string-append (assoc-ref inputs "libxrender")
1164 "/include/X11/extensions"
1165 " -I" (assoc-ref inputs "libxtst")
1166 "/include/X11/extensions"
1167 " -I" (assoc-ref inputs "libxinerama")
1168 "/include/X11/extensions"))
1169 (("\\$\\(wildcard /usr/include/X11/extensions\\)\\)") ""))
1171 (add-after 'unpack 'patch-paths
1173 ;; buildtree.make generates shell scripts, so we need to replace
1174 ;; the generated shebang
1175 (substitute* '("openjdk.src/hotspot/make/linux/makefiles/buildtree.make")
1176 (("/bin/sh") (which "bash")))
1178 (let ((corebin (string-append
1179 (assoc-ref %build-inputs "coreutils") "/bin/"))
1180 (binbin (string-append
1181 (assoc-ref %build-inputs "binutils") "/bin/"))
1182 (grepbin (string-append
1183 (assoc-ref %build-inputs "grep") "/bin/")))
1184 (substitute* '("openjdk.src/jdk/make/common/shared/Defs-linux.gmk"
1185 "openjdk.src/corba/make/common/shared/Defs-linux.gmk")
1186 (("UNIXCOMMAND_PATH = /bin/")
1187 (string-append "UNIXCOMMAND_PATH = " corebin))
1188 (("USRBIN_PATH = /usr/bin/")
1189 (string-append "USRBIN_PATH = " corebin))
1190 (("DEVTOOLS_PATH *= */usr/bin/")
1191 (string-append "DEVTOOLS_PATH = " corebin))
1192 (("COMPILER_PATH *= */usr/bin/")
1193 (string-append "COMPILER_PATH = "
1194 (assoc-ref %build-inputs "gcc") "/bin/"))
1195 (("DEF_OBJCOPY *=.*objcopy")
1196 (string-append "DEF_OBJCOPY = " (which "objcopy"))))
1198 ;; fix path to alsa header
1199 (substitute* "openjdk.src/jdk/make/common/shared/Sanity.gmk"
1200 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
1201 (string-append "ALSA_INCLUDE="
1202 (assoc-ref %build-inputs "alsa-lib")
1203 "/include/alsa/version.h")))
1205 ;; fix hard-coded utility paths
1206 (substitute* '("openjdk.src/jdk/make/common/shared/Defs-utils.gmk"
1207 "openjdk.src/corba/make/common/shared/Defs-utils.gmk")
1209 (string-append "ECHO = " (which "echo")))
1211 (string-append "GREP = " (which "grep")))
1212 (("EGREP *=.*egrep")
1213 (string-append "EGREP = " (which "egrep")))
1215 (string-append "CPIO = " (which "cpio")))
1216 (("READELF *=.*readelf")
1217 (string-append "READELF = " (which "readelf")))
1219 (string-append "AR = " (which "ar")))
1221 (string-append "TAR = " (which "tar")))
1223 (string-append "AS = " (which "as")))
1225 (string-append "LD = " (which "ld")))
1226 (("STRIP *=.*strip")
1227 (string-append "STRIP = " (which "strip")))
1229 (string-append "NM = " (which "nm")))
1231 (string-append "SH = " (which "bash")))
1233 (string-append "FIND = " (which "find")))
1235 (string-append "LDD = " (which "ldd")))
1236 (("NAWK *=.*(n|g)awk")
1237 (string-append "NAWK = " (which "gawk")))
1238 (("XARGS *=.*xargs")
1239 (string-append "XARGS = " (which "xargs")))
1240 (("UNZIP *=.*unzip")
1241 (string-append "UNZIP = " (which "unzip")))
1243 (string-append "ZIPEXE = " (which "zip")))
1245 (string-append "SED = " (which "sed"))))
1247 ;; Some of these timestamps cause problems as they are more than
1248 ;; 10 years ago, failing the build process.
1250 "openjdk.src/jdk/src/share/classes/java/util/CurrencyData.properties"
1251 (("AZ=AZM;2005-12-31-20-00-00;AZN") "AZ=AZN")
1252 (("MZ=MZM;2006-06-30-22-00-00;MZN") "MZ=MZN")
1253 (("RO=ROL;2005-06-30-21-00-00;RON") "RO=RON")
1254 (("TR=TRL;2004-12-31-22-00-00;TRY") "TR=TRY")))
1256 (add-before 'configure 'set-additional-paths
1257 (lambda* (#:key inputs #:allow-other-keys)
1258 (substitute* "openjdk.src/jdk/make/common/shared/Sanity.gmk"
1259 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
1260 (string-append "ALSA_INCLUDE="
1261 (assoc-ref inputs "alsa-lib")
1262 "/include/alsa/version.h")))
1265 (string-append (assoc-ref inputs "libxcomposite")
1266 "/include/X11/extensions" ":"
1267 (assoc-ref inputs "libxrender")
1268 "/include/X11/extensions" ":"
1269 (assoc-ref inputs "libxtst")
1270 "/include/X11/extensions" ":"
1271 (assoc-ref inputs "libxinerama")
1272 "/include/X11/extensions" ":"
1273 (or (getenv "CPATH") "")))
1274 (setenv "ALT_OBJCOPY" (which "objcopy"))
1275 (setenv "ALT_CUPS_HEADERS_PATH"
1276 (string-append (assoc-ref inputs "cups")
1278 (setenv "ALT_FREETYPE_HEADERS_PATH"
1279 (string-append (assoc-ref inputs "freetype")
1281 (setenv "ALT_FREETYPE_LIB_PATH"
1282 (string-append (assoc-ref inputs "freetype")
1285 (add-before 'build 'disable-os-version-check
1286 ;; allow build on linux major version change
1288 (setenv "DISABLE_HOTSPOT_OS_VERSION_CHECK" "ok")
1290 (add-before 'check 'fix-test-framework
1292 ;; Fix PATH in test environment
1293 (substitute* "test/jtreg/com/sun/javatest/regtest/Main.java"
1294 (("PATH=/bin:/usr/bin")
1295 (string-append "PATH=" (getenv "PATH"))))
1296 (substitute* "test/jtreg/com/sun/javatest/util/SysEnv.java"
1297 (("/usr/bin/env") (which "env")))
1298 (substitute* "openjdk.src/hotspot/test/test_env.sh"
1299 (("/bin/rm") (which "rm"))
1300 (("/bin/cp") (which "cp"))
1301 (("/bin/mv") (which "mv")))
1303 (add-before 'check 'fix-hotspot-tests
1305 (with-directory-excursion "openjdk.src/hotspot/test/"
1306 (substitute* "jprt.config"
1307 (("PATH=\"\\$\\{path4sdk\\}\"")
1308 (string-append "PATH=" (getenv "PATH")))
1309 (("make=/usr/bin/make")
1310 (string-append "make=" (which "make"))))
1311 (substitute* '("runtime/6626217/Test6626217.sh"
1312 "runtime/7110720/Test7110720.sh")
1313 (("/bin/rm") (which "rm"))
1314 (("/bin/cp") (which "cp"))
1315 (("/bin/mv") (which "mv"))))
1317 (add-before 'check 'fix-jdk-tests
1319 (with-directory-excursion "openjdk.src/jdk/test/"
1320 (substitute* "com/sun/jdi/JdbReadTwiceTest.sh"
1321 (("/bin/pwd") (which "pwd")))
1322 (substitute* "com/sun/jdi/ShellScaffold.sh"
1323 (("/bin/kill") (which "kill")))
1324 (substitute* "start-Xvfb.sh"
1325 ;;(("/usr/bin/X11/Xvfb") (which "Xvfb"))
1326 (("/usr/bin/nohup") (which "nohup")))
1327 (substitute* "javax/security/auth/Subject/doAs/Test.sh"
1328 (("/bin/rm") (which "rm")))
1329 (substitute* "tools/launcher/MultipleJRE.sh"
1330 (("echo \"#!/bin/sh\"")
1331 (string-append "echo \"#!" (which "rm") "\""))
1332 (("/usr/bin/zip") (which "zip")))
1333 (substitute* "com/sun/jdi/OnThrowTest.java"
1334 (("#!/bin/sh") (string-append "#!" (which "sh"))))
1335 (substitute* "java/lang/management/OperatingSystemMXBean/GetSystemLoadAverage.java"
1336 (("/usr/bin/uptime") (which "uptime")))
1337 (substitute* "java/lang/ProcessBuilder/Basic.java"
1338 (("/usr/bin/env") (which "env"))
1339 (("/bin/false") (which "false"))
1340 (("/bin/true") (which "true"))
1341 (("/bin/cp") (which "cp"))
1342 (("/bin/sh") (which "sh")))
1343 (substitute* "java/lang/ProcessBuilder/FeelingLucky.java"
1344 (("/bin/sh") (which "sh")))
1345 (substitute* "java/lang/ProcessBuilder/Zombies.java"
1346 (("/usr/bin/perl") (which "perl"))
1347 (("/bin/ps") (which "ps"))
1348 (("/bin/true") (which "true")))
1349 (substitute* "java/lang/Runtime/exec/ConcurrentRead.java"
1350 (("/usr/bin/tee") (which "tee")))
1351 (substitute* "java/lang/Runtime/exec/ExecWithDir.java"
1352 (("/bin/true") (which "true")))
1353 (substitute* "java/lang/Runtime/exec/ExecWithInput.java"
1354 (("/bin/cat") (which "cat")))
1355 (substitute* "java/lang/Runtime/exec/ExitValue.java"
1356 (("/bin/sh") (which "sh"))
1357 (("/bin/true") (which "true"))
1358 (("/bin/kill") (which "kill")))
1359 (substitute* "java/lang/Runtime/exec/LotsOfDestroys.java"
1360 (("/usr/bin/echo") (which "echo")))
1361 (substitute* "java/lang/Runtime/exec/LotsOfOutput.java"
1362 (("/usr/bin/cat") (which "cat")))
1363 (substitute* "java/lang/Runtime/exec/SleepyCat.java"
1364 (("/bin/cat") (which "cat"))
1365 (("/bin/sleep") (which "sleep"))
1366 (("/bin/sh") (which "sh")))
1367 (substitute* "java/lang/Runtime/exec/StreamsSurviveDestroy.java"
1368 (("/bin/cat") (which "cat")))
1369 (substitute* "java/rmi/activation/CommandEnvironment/SetChildEnv.java"
1370 (("/bin/chmod") (which "chmod")))
1371 (substitute* "java/util/zip/ZipFile/Assortment.java"
1372 (("/bin/sh") (which "sh"))))
1376 ;; The "make check-*" targets always return zero, so we need to
1377 ;; check for errors in the associated log files to determine
1378 ;; whether any tests have failed.
1379 (use-modules (ice-9 rdelim))
1380 (let* ((error-pattern (make-regexp "^(Error|FAILED):.*"))
1381 (checker (lambda (port)
1383 (let ((line (read-line port)))
1385 ((eof-object? line) #t)
1386 ((regexp-exec error-pattern line)
1387 (error "test failed"))
1389 (run-test (lambda (test)
1390 (invoke "make" test)
1391 (call-with-input-file
1392 (string-append "test/" test ".log")
1394 (when #f ; skip tests
1395 (run-test "check-hotspot")
1396 (run-test "check-langtools")
1397 (run-test "check-jdk"))
1400 (lambda* (#:key outputs #:allow-other-keys)
1401 (let ((doc (string-append (assoc-ref outputs "doc")
1402 "/share/doc/icedtea"))
1403 (jre (assoc-ref outputs "out"))
1404 (jdk (assoc-ref outputs "jdk")))
1405 (copy-recursively "openjdk.build/docs" doc)
1406 (copy-recursively "openjdk.build/j2re-image" jre)
1407 (copy-recursively "openjdk.build/j2sdk-image" jdk))
1409 ;; Some of the libraries in the lib/amd64 folder link to libjvm.so.
1410 ;; But that shared object is located in the server/ folder, so it
1411 ;; cannot be found. This phase creates a symbolic link in the
1412 ;; lib/amd64 folder so that the other libraries can find it.
1415 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
1417 ;; FIXME: Find the bug in the build system, so that this symlink is
1419 (add-after 'install 'install-libjvm
1420 (lambda* (#:key inputs outputs #:allow-other-keys)
1421 (let* ((lib-path (string-append (assoc-ref outputs "out")
1422 ;; See 'INSTALL_ARCH_DIR' in
1424 ,(match (%current-system)
1433 ;; We need a catch-all, dropping
1434 ;; '-linux' works in most cases.
1439 (%current-system) 6)))))))
1440 (symlink (string-append lib-path "/server/libjvm.so")
1441 (string-append lib-path "/libjvm.so")))
1443 ;; By default IcedTea only generates an empty keystore. In order to
1444 ;; be able to use certificates in Java programs we need to generate a
1445 ;; keystore from a set of certificates. For convenience we use the
1446 ;; certificates from the nss-certs package.
1447 (add-after 'install 'install-keystore
1448 (lambda* (#:key inputs outputs #:allow-other-keys)
1449 (let* ((keystore "cacerts")
1450 (certs-dir (string-append (assoc-ref inputs "nss-certs")
1452 (keytool (string-append (assoc-ref outputs "jdk")
1454 (define (extract-cert file target)
1455 (call-with-input-file file
1457 (call-with-output-file target
1459 (let loop ((line (read-line in 'concat))
1462 ((eof-object? line) #t)
1463 ((string-prefix? "-----BEGIN" line)
1465 (loop (read-line in 'concat) #t))
1466 ((string-prefix? "-----END" line)
1470 (when copying? (display line out))
1471 (loop (read-line in 'concat) copying?)))))))))
1472 (define (import-cert cert)
1473 (format #t "Importing certificate ~a\n" (basename cert))
1474 (let ((temp "tmpcert"))
1475 (extract-cert cert temp)
1476 (let ((port (open-pipe* OPEN_WRITE keytool
1478 "-alias" (basename cert)
1479 "-keystore" keystore
1480 "-storepass" "changeit"
1482 (display "yes\n" port)
1483 (when (not (zero? (status:exit-val (close-pipe port))))
1484 (format #t "failed to import ~a\n" cert)))
1485 (delete-file temp)))
1487 ;; This is necessary because the certificate directory contains
1488 ;; files with non-ASCII characters in their names.
1489 (setlocale LC_ALL "en_US.utf8")
1490 (setenv "LC_ALL" "en_US.utf8")
1492 (for-each import-cert (find-files certs-dir "\\.pem$"))
1493 (mkdir-p (string-append (assoc-ref outputs "out")
1495 (mkdir-p (string-append (assoc-ref outputs "jdk")
1496 "/jre/lib/security"))
1498 ;; The cacerts files we are going to overwrite are chmod'ed as
1499 ;; read-only (444) in icedtea-8 (which derives from this
1500 ;; package). We have to change this so we can overwrite them.
1501 (chmod (string-append (assoc-ref outputs "out")
1502 "/lib/security/" keystore) #o644)
1503 (chmod (string-append (assoc-ref outputs "jdk")
1504 "/jre/lib/security/" keystore) #o644)
1506 (install-file keystore
1507 (string-append (assoc-ref outputs "out")
1509 (install-file keystore
1510 (string-append (assoc-ref outputs "jdk")
1511 "/jre/lib/security"))
1516 "0l34ikyf62hbzlf9032alzkkqvf7bpmckz4gvirvph755w7gka8l"))
1519 "050gv2jbg1pi6qkn8w18bwpbklfa5b0kymjvan9pncddbj8m84fz"))
1522 "1k6yldwnxfzdg5926r1nlfv8d1r1j7rlp2nkz6gqh05vgyamnfhl"))
1525 "110j7jlz47x2gg6f7653x12mssan5kvj9l9h1m1c8c92drfxbqyk"))
1528 "0d1mca38ksxvdskp9im3pp7fdijhj1n3lwq9w13r9s4v3qyskgdd"))
1531 "0nq5236fzxn3p6x8cgncl56mzcmsj07q9gymysnws4c8byc6n0qj"))
1536 "http://icedtea.classpath.org/downloads/drops"
1537 "/icedtea7/" version "/hotspot.tar.bz2"))
1540 "17bdv39n4lh8l5737c96f3xgamx4y305m067p01cywgp7zaddqws"))
1541 (patches (search-patches
1542 "icedtea-7-hotspot-gcc-segfault-workaround.patch"))))
1543 ("ant" ,ant-bootstrap)
1545 ("coreutils" ,coreutils)
1546 ("diffutils" ,diffutils) ;for tests
1549 ("libtool" ,libtool)
1550 ("pkg-config" ,pkg-config)
1556 ("fastjar" ,fastjar)
1557 ("libxslt" ,libxslt) ;for xsltproc
1558 ("nss-certs" ,nss-certs)
1560 ("procps" ,procps) ;for "free", even though I'm not sure we should use it
1561 ("jdk" ,icedtea-6 "jdk")))
1563 `(("alsa-lib" ,alsa-lib)
1566 ("libxcomposite" ,libxcomposite)
1568 ("libxtst" ,libxtst)
1570 ("libxinerama" ,libxinerama)
1571 ("libxrender" ,libxrender)
1572 ("libjpeg" ,libjpeg)
1574 ("mit-krb5" ,mit-krb5)
1577 ("fontconfig" ,fontconfig)
1578 ("freetype" ,freetype)
1582 (home-page "http://icedtea.classpath.org")
1583 (synopsis "Java development kit")
1585 "This package provides the Java development kit OpenJDK built with the
1586 IcedTea build harness.")
1588 ;; 'configure' lists "mips" and "mipsel", but not "mips64el'.
1589 (supported-systems (delete "mips64el-linux" %supported-systems))
1591 ;; IcedTea is released under the GPL2 + Classpath exception, which is the
1592 ;; same license as both GNU Classpath and OpenJDK.
1593 (license license:gpl2+))))
1595 (define-public icedtea-8
1596 (let* ((version "3.7.0")
1597 (drop (lambda (name hash)
1601 "http://icedtea.classpath.org/download/drops"
1602 "/icedtea8/" version "/" name ".tar.xz"))
1603 (sha256 (base32 hash))))))
1604 (package (inherit icedtea-7)
1609 "http://icedtea.wildebeest.org/download/source/icedtea-"
1613 "09yqzn8rpccs7cyv89hhy5zlznpgqw5x3jz0w1ccp0cz1vgs8l5w"))
1614 (modules '((guix build utils)))
1617 (substitute* '("configure"
1619 ;; Do not embed build time
1620 (("(DIST_ID=\"Custom build).*$" _ prefix)
1621 (string-append prefix "\"\n"))
1622 ;; Do not leak information about the build host
1623 (("DIST_NAME=\"\\$build_os\"")
1624 "DIST_NAME=\"guix\""))
1627 `(#:imported-modules
1628 ((guix build ant-build-system)
1629 (guix build syscalls)
1630 ,@%gnu-build-system-modules)
1631 ,@(substitute-keyword-arguments (package-arguments icedtea-7)
1632 ((#:modules modules)
1633 `((guix build utils)
1634 (guix build gnu-build-system)
1635 ((guix build ant-build-system) #:prefix ant:)
1640 ((#:configure-flags flags)
1641 `(let ((jdk (assoc-ref %build-inputs "jdk")))
1642 `( ;;"--disable-bootstrap"
1643 "--enable-bootstrap"
1645 "--disable-downloading"
1646 "--disable-system-pcsc"
1647 "--disable-system-sctp"
1648 "--disable-tests" ;they are run in the check phase instead
1649 "--with-openjdk-src-dir=./openjdk.src"
1650 ,(string-append "--with-jdk-home=" jdk))))
1652 `(modify-phases ,phases
1653 (delete 'fix-x11-extension-include-path)
1654 (delete 'patch-paths)
1655 (delete 'set-additional-paths)
1656 (delete 'patch-patches)
1657 (delete 'patch-bitrot)
1658 ;; Prevent the keytool from recording the current time when
1659 ;; adding certificates at build time.
1660 (add-after 'unpack 'patch-keystore
1662 (substitute* "openjdk.src/jdk/src/share/classes/sun/security/provider/JavaKeyStore.java"
1663 (("date = new Date\\(\\);")
1665 date = (System.getenv(\"SOURCE_DATE_EPOCH\") != null) ?\
1666 new Date(Long.parseLong(System.getenv(\"SOURCE_DATE_EPOCH\"))) :\
1669 (add-after 'unpack 'patch-jni-libs
1670 ;; Hardcode dynamically loaded libraries.
1672 (let* ((library-path (search-path-as-string->list
1673 (getenv "LIBRARY_PATH")))
1674 (find-library (lambda (name)
1677 (string-append "lib" name ".so")))))
1680 (catch 'decoding-error
1683 (("VERSIONED_JNI_LIB_NAME\\(\"(.*)\", \"(.*)\"\\)"
1685 (format #f "\"~a\"" (find-library name)))
1686 (("JNI_LIB_NAME\\(\"(.*)\"\\)" _ name)
1687 (format #f "\"~a\"" (find-library name)))))
1689 ;; Those are safe to skip.
1690 (format (current-error-port)
1691 "warning: failed to substitute: ~a~%"
1693 (find-files "openjdk.src/jdk/src/solaris/native"
1697 (lambda* (#:key outputs #:allow-other-keys)
1698 (let ((doc (string-append (assoc-ref outputs "doc")
1699 "/share/doc/icedtea"))
1700 (jre (assoc-ref outputs "out"))
1701 (jdk (assoc-ref outputs "jdk")))
1702 (copy-recursively "openjdk.build/docs" doc)
1703 (copy-recursively "openjdk.build/images/j2re-image" jre)
1704 (copy-recursively "openjdk.build/images/j2sdk-image" jdk)
1705 ;; Install the nss.cfg file to JRE to enable SSL/TLS
1707 (copy-file (string-append jdk "/jre/lib/security/nss.cfg")
1708 (string-append jre "/lib/security/nss.cfg"))
1710 (add-after 'install 'strip-jar-timestamps
1711 (assoc-ref ant:%standard-phases 'strip-jar-timestamps)))))))
1713 `(("jdk" ,icedtea-7 "jdk")
1716 "1mj6xgmw31i6qd30qi9dmv7160fbcfq5ikz1jwjihdg2793il19p"))
1719 "1wb8k5zm40zld0986dvmlh5xh3gyixbg9h26sl662zy92amhmyyg"))
1722 "11ma4zz0599cy70xd219v7a8vin7p96xrhhz3wsaw6cjhkzpagah"))
1725 "14m1y0z0fbm5z5zjw3vnq85py8dma84bi3f9cw8rhdyc6skk8q4i"))
1728 "09andnm6xaasnp963hgx42yiflifiljp9z7z85jrfyc5z8a5whmf"))
1731 "0s6lcpc0zckz2fnq98aqf28nz9y3wbi41a3kyaqqa2abwbkm1zwl"))
1734 "15wizy123vhk40chl1b4p552jf2pw2hdww0myf11qab425axz4nw"))
1739 "http://icedtea.classpath.org/download/drops"
1740 "/icedtea8/" version "/hotspot.tar.xz"))
1743 "1ciz1w9j0kz7s1dxdhyqq71nla9icyz6qvn0b9z2zgkklqa98qmm"))
1744 (patches (search-patches
1745 "icedtea-7-hotspot-gcc-segfault-workaround.patch"))))
1748 "19pzl3ppaw8j6r5cnyp8qiw3hxijh3hdc46l39g5yfhdl4pr4hpa"))
1751 "0k33anxdzw1icn072wynfmmdjhsv50hay0j1sfkfxny12rb3vgdy"))
1752 ,@(fold alist-delete (package-native-inputs icedtea-7)
1753 '("jdk" "openjdk-src" "corba-drop" "jaxp-drop" "jaxws-drop"
1754 "jdk-drop" "langtools-drop" "hotspot-drop")))))))
1756 (define-public openjdk9
1762 (uri "https://hg.openjdk.java.net/jdk/jdk/archive/3cc80be736f2.tar.bz2")
1763 (file-name (string-append name "-" version ".tar.bz2"))
1766 "01ihmyf7k5z17wbr7xig7y40l9f01d5zjgkcmawn1102hw5kchpq"))
1767 (modules '((guix build utils)))
1770 (for-each delete-file (find-files "." ".*.bin$"))
1771 (for-each delete-file (find-files "." ".*.exe$"))
1772 (for-each delete-file (find-files "." ".*.jar$"))
1774 (build-system gnu-build-system)
1775 (outputs '("out" "jdk" "doc"))
1777 `(#:tests? #f; require jtreg
1779 ((guix build syscalls)
1780 ,@%gnu-build-system-modules)
1782 (modify-phases %standard-phases
1783 (add-after 'patch-source-shebangs 'fix-java-shebangs
1785 ;; This file was "fixed" by patch-source-shebangs, but it requires
1786 ;; this exact first line.
1787 (substitute* "jdk/make/data/blacklistedcertsconverter/blacklisted.certs.pem"
1788 (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))
1791 (lambda* (#:key inputs outputs #:allow-other-keys)
1792 ;; TODO: unbundle libpng and lcms
1793 (invoke "bash" "./configure"
1794 (string-append "--with-freetype=" (assoc-ref inputs "freetype"))
1795 "--disable-freetype-bundling"
1796 "--disable-warnings-as-errors"
1797 "--disable-hotspot-gtest"
1798 "--with-giflib=system"
1799 "--with-libjpeg=system"
1800 (string-append "--prefix=" (assoc-ref outputs "out")))
1804 (with-output-to-file ".src-rev"
1806 (display ,version)))
1807 (setenv "GUIX_LD_WRAPPER_ALLOW_IMPURITIES" "yes")
1808 (invoke "make" "all")
1810 ;; Some of the libraries in the lib/ folder link to libjvm.so.
1811 ;; But that shared object is located in the server/ folder, so it
1812 ;; cannot be found. This phase creates a symbolic link in the
1813 ;; lib/ folder so that the other libraries can find it.
1816 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
1818 ;; FIXME: Find the bug in the build system, so that this symlink is
1820 (add-after 'install 'install-libjvm
1821 (lambda* (#:key inputs outputs #:allow-other-keys)
1822 (let* ((lib-out (string-append (assoc-ref outputs "out")
1824 (lib-jdk (string-append (assoc-ref outputs "jdk")
1826 (symlink (string-append lib-jdk "/server/libjvm.so")
1827 (string-append lib-jdk "/libjvm.so"))
1828 (symlink (string-append lib-out "/server/libjvm.so")
1829 (string-append lib-out "/libjvm.so")))
1832 (lambda* (#:key outputs #:allow-other-keys)
1833 (let ((out (assoc-ref outputs "out"))
1834 (jdk (assoc-ref outputs "jdk"))
1835 (doc (assoc-ref outputs "doc"))
1836 (images (car (find-files "build" ".*-server-release"
1837 #:directories? #t))))
1838 (copy-recursively (string-append images "/images/jdk") jdk)
1839 (copy-recursively (string-append images "/images/jre") out)
1840 (copy-recursively (string-append images "/images/docs") doc))
1842 (add-after 'install 'strip-zip-timestamps
1843 (lambda* (#:key outputs #:allow-other-keys)
1844 (use-modules (guix build syscalls))
1845 (for-each (lambda (zip)
1846 (let ((dir (mkdtemp! "zip-contents.XXXXXX")))
1847 (with-directory-excursion dir
1848 (invoke "unzip" zip))
1850 (for-each (lambda (file)
1851 (let ((s (lstat file)))
1852 (unless (eq? (stat:type s) 'symlink)
1853 (format #t "reset ~a~%" file)
1854 (utime file 0 0 0 0))))
1855 (find-files dir #:directories? #t))
1856 (with-directory-excursion dir
1857 (let ((files (find-files "." ".*" #:directories? #t)))
1858 (apply invoke "zip" "-0" "-X" zip files)))))
1859 (find-files (assoc-ref outputs "doc") ".*.zip$"))
1862 `(("alsa-lib" ,alsa-lib)
1864 ("fontconfig" ,fontconfig)
1865 ("freetype" ,freetype)
1869 ("libjpeg" ,libjpeg)
1873 ("libxcomposite" ,libxcomposite)
1875 ("libxinerama" ,libxinerama)
1876 ("libxrender" ,libxrender)
1878 ("libxtst" ,libxtst)))
1880 `(("icedtea-8" ,icedtea-8)
1881 ("icedtea-8:jdk" ,icedtea-8 "jdk")
1885 (home-page "https://openjdk.java.net/projects/jdk9/")
1886 (synopsis "Java development kit")
1888 "This package provides the Java development kit OpenJDK.")
1889 (license license:gpl2+)))
1891 (define-public openjdk10
1898 (uri "http://hg.openjdk.java.net/jdk/jdk/archive/6fa770f9f8ab.tar.bz2")
1899 (file-name (string-append name "-" version ".tar.bz2"))
1902 "0zywq2203b4hx4jms9vbwvjcj1d3k2v3qpx4s33729fkpmid97r4"))
1903 (patches (search-patches
1904 "openjdk-10-idlj-reproducibility.patch"))
1905 (modules '((guix build utils)))
1908 (for-each delete-file (find-files "." ".*.bin$"))
1909 (for-each delete-file (find-files "." ".*.exe$"))
1910 (for-each delete-file (find-files "." ".*.jar$"))
1913 (substitute-keyword-arguments (package-arguments openjdk9)
1915 `(modify-phases ,phases
1916 (replace 'fix-java-shebangs
1918 ;; This file was "fixed" by patch-source-shebangs, but it requires
1919 ;; this exact first line.
1920 (substitute* "make/data/blacklistedcertsconverter/blacklisted.certs.pem"
1921 (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))
1924 (lambda* (#:key inputs outputs #:allow-other-keys)
1925 (invoke "bash" "./configure"
1926 (string-append "--with-freetype=" (assoc-ref inputs "freetype"))
1927 "--disable-freetype-bundling"
1928 "--disable-warnings-as-errors"
1929 "--disable-hotspot-gtest"
1930 "--with-giflib=system"
1931 "--with-libjpeg=system"
1932 "--with-native-debug-symbols=zipped"
1933 (string-append "--prefix=" (assoc-ref outputs "out")))
1936 `(("openjdk9" ,openjdk9)
1937 ("openjdk9:jdk" ,openjdk9 "jdk")
1942 (define-public openjdk11
1948 (uri "http://hg.openjdk.java.net/jdk/jdk/archive/76072a077ee1.tar.bz2")
1949 (file-name (string-append name "-" version ".tar.bz2"))
1952 "0v705w1s9lrqalzahir78pk397rkk9gfvzq821yv8h3xha0bqi6w"))
1953 (modules '((guix build utils)))
1956 (for-each delete-file (find-files "." ".*.bin$"))
1957 (for-each delete-file (find-files "." ".*.exe$"))
1958 (for-each delete-file (find-files "." ".*.jar$"))
1960 (build-system gnu-build-system)
1961 (outputs '("out" "jdk" "doc"))
1963 `(#:imported-modules
1964 ((guix build syscalls)
1965 (ice-9 binary-ports)
1967 ,@%gnu-build-system-modules)
1968 #:tests? #f; requires jtreg
1969 ;; TODO package jtreg
1970 ;; disable parallel builds, as the openjdk build system does not like -j
1971 #:parallel-build? #f
1972 #:parallel-tests? #f
1973 ;; reenable parallel builds and tests by adding the flags manually
1974 #:make-flags (list (string-append "JOBS=" (number->string (parallel-job-count))))
1976 `("--disable-option-checking" ; --enable-fast-install default flag errors otherwise
1977 "--disable-warnings-as-errors"
1978 ;; make validate-runpath pass, see: http://issues.guix.info/issue/32894
1979 "--with-native-debug-symbols=zipped"
1980 ;; do not use the bundled libraries
1981 "--with-giflib=system"
1982 "--with-lcms=system"
1983 "--with-libjpeg=system"
1984 "--with-libpng=system"
1985 "--with-version-pre="
1986 ;; allow the build system to locate the system freetype
1987 ,(string-append "--with-freetype-include="
1988 (assoc-ref %build-inputs "freetype") "/include")
1989 ,(string-append "--with-freetype-lib="
1990 (assoc-ref %build-inputs "freetype") "/lib"))
1993 (modify-phases %standard-phases
1994 (add-after 'patch-source-shebangs 'fix-java-shebangs
1996 ;; This file was "fixed" by patch-source-shebangs, but it requires
1997 ;; this exact first line.
1998 (substitute* "make/data/blacklistedcertsconverter/blacklisted.certs.pem"
1999 (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))
2003 (with-output-to-file ".src-rev"
2005 (display ,version)))
2006 (setenv "GUIX_LD_WRAPPER_ALLOW_IMPURITIES" "yes")
2007 (invoke "make" "all")
2009 ;; jdk 11 does not build jre by default any more
2010 ;; building it anyways
2011 ;; for further information see:
2012 ;; https://github.com/AdoptOpenJDK/openjdk-build/issues/356
2013 (add-after 'build 'build-jre
2015 (invoke "make" "legacy-jre-image")
2018 (lambda* (#:key outputs #:allow-other-keys)
2019 (let ((out (assoc-ref outputs "out"))
2020 (jdk (assoc-ref outputs "jdk"))
2021 (doc (assoc-ref outputs "doc"))
2022 (images (car (find-files "build" ".*-server-release"
2023 #:directories? #t))))
2024 (copy-recursively (string-append images "/images/jdk") jdk)
2025 (copy-recursively (string-append images "/images/jre") out)
2026 (copy-recursively (string-append images "/images/docs") doc))
2028 ;; Some of the libraries in the lib/ folder link to libjvm.so.
2029 ;; But that shared object is located in the server/ folder, so it
2030 ;; cannot be found. This phase creates a symbolic link in the
2031 ;; lib/ folder so that the other libraries can find it.
2034 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
2036 ;; FIXME: Find the bug in the build system, so that this symlink is
2038 (add-after 'install 'install-libjvm
2039 (lambda* (#:key inputs outputs #:allow-other-keys)
2040 (let* ((lib-out (string-append (assoc-ref outputs "out")
2042 (lib-jdk (string-append (assoc-ref outputs "jdk")
2044 (symlink (string-append lib-jdk "/server/libjvm.so")
2045 (string-append lib-jdk "/libjvm.so"))
2046 (symlink (string-append lib-out "/server/libjvm.so")
2047 (string-append lib-out "/libjvm.so")))
2049 (add-after 'install 'strip-character-data-timestamps
2050 (lambda* (#:key outputs #:allow-other-keys)
2051 (use-modules (guix build syscalls))
2052 (let ((archive (string-append
2053 (assoc-ref outputs "jdk") "/lib/src.zip"))
2054 (dir (mkdtemp! "zip-contents.XXXXXX")))
2055 (with-directory-excursion dir
2056 (invoke "unzip" archive))
2057 (delete-file archive)
2058 (with-directory-excursion dir
2059 (let ((char-data-files (find-files "." "CharacterData.*")))
2060 (for-each (lambda (file)
2062 (((string-append "This file was generated "
2063 "AUTOMATICALLY from a template "
2065 (string-append "This file was generated "
2066 "AUTOMATICALLY from a template "
2069 (with-directory-excursion dir
2070 (let ((files (find-files "." ".*" #:directories? #t)))
2071 (apply invoke "zip" "-0" "-X" archive files))))))
2072 (add-after 'strip-character-data-timestamps 'strip-archive-timestamps
2073 (lambda* (#:key outputs #:allow-other-keys)
2074 (use-modules (guix build syscalls)
2075 (ice-9 binary-ports)
2077 (letrec ((repack-archive
2079 (let ((dir (mkdtemp! "zip-contents.XXXXXX")))
2080 (with-directory-excursion dir
2081 (invoke "unzip" archive))
2082 (delete-file archive)
2083 (for-each (compose repack-archive canonicalize-path)
2084 (find-files dir "(ct.sym|.*.jar)$"))
2085 (let ((reset-file-timestamp
2087 (let ((s (lstat file)))
2088 (unless (eq? (stat:type s) 'symlink)
2089 (format #t "reset ~a~%" file)
2090 (utime file 0 0 0 0))))))
2091 (for-each reset-file-timestamp
2092 (find-files dir #:directories? #t)))
2093 (with-directory-excursion dir
2094 (let ((files (find-files "." ".*" #:directories? #t)))
2095 (apply invoke "zip" "-0" "-X" archive files)))))))
2096 (for-each repack-archive
2097 (find-files (assoc-ref outputs "doc") ".*.zip$"))
2098 (for-each repack-archive
2099 (find-files (assoc-ref outputs "jdk")
2100 ".*.(zip|jar|diz)$"))
2101 (repack-archive (string-append (assoc-ref outputs "jdk") "/lib/ct.sym"))
2104 (call-with-input-file file-name
2106 (let ((header #vu8(#x4a #x4d #x01 #x00)))
2107 (if (equal? (get-bytevector-n
2108 file (bytevector-length header))
2110 (let* ((header-length (bytevector-length header))
2111 (temp-file (mkstemp!
2113 "temp-file.XXXXXX")))
2114 (temp-filename (port-filename temp-file))
2116 (- (stat:size (stat file))
2118 (sendfile temp-file file content-length header-length)
2119 (delete-file file-name)
2120 (close-port temp-file)
2121 (repack-archive (canonicalize-path temp-filename))
2122 (call-with-output-file file-name
2124 (put-bytevector file header)
2125 (call-with-input-file temp-filename
2129 (stat:size (stat temp-file)) 0)))))))))))))
2130 (for-each repack-jmod
2131 (find-files (assoc-ref outputs "jdk") ".*.jmod$")))
2133 (add-after 'install 'remove-timestamp-from-api-summary
2134 (lambda* (#:key outputs #:allow-other-keys)
2135 (substitute* (string-append (assoc-ref outputs "doc")
2136 "/api/overview-summary.html")
2137 (("Generated by javadoc \\(11-internal\\).*$")
2138 "Generated by javadoc (11-internal) -->\n"))
2141 `(("alsa-lib" ,alsa-lib)
2143 ("fontconfig" ,fontconfig)
2144 ("freetype" ,freetype)
2147 ("libjpeg" ,libjpeg)
2150 ("libxext" ,libxext)
2151 ("libxrender" ,libxrender)
2153 ("libxtst" ,libxtst)))
2155 `(("autoconf" ,autoconf)
2156 ("openjdk10" ,openjdk10)
2157 ("openjdk10:jdk" ,openjdk10 "jdk")
2158 ("pkg-config" ,pkg-config)
2162 (home-page "https://openjdk.java.net/projects/jdk/11/")
2163 (synopsis "Java development kit")
2165 "This package provides the Java development kit OpenJDK.")
2166 (license license:gpl2+)))
2168 (define-public openjdk12
2175 (uri "http://hg.openjdk.java.net/jdk/jdk/archive/0276cba45aac.tar.bz2")
2176 (file-name (string-append name "-" version ".tar.bz2"))
2179 "0mbhdrk12b6878kby0flnbak7444dlpm0ihlmf92vk59y1c02bc2"))
2180 (modules '((guix build utils)))
2183 (for-each delete-file (find-files "." ".*.bin$"))
2184 (for-each delete-file (find-files "." ".*.exe$"))
2185 (for-each delete-file (find-files "." ".*.jar$"))
2188 `(("alsa-lib" ,alsa-lib)
2190 ("fontconfig" ,fontconfig)
2191 ("freetype" ,freetype)
2194 ("libjpeg" ,libjpeg)
2197 ("libxext" ,libxext)
2198 ("libxrandr" ,libxrandr)
2199 ("libxrender" ,libxrender)
2201 ("libxtst" ,libxtst)))
2203 `(("autoconf" ,autoconf)
2204 ("openjdk11" ,openjdk11)
2205 ("openjdk11:jdk" ,openjdk11 "jdk")
2206 ("pkg-config" ,pkg-config)
2210 (home-page "https://openjdk.java.net/projects/jdk/12")))
2212 (define-public icedtea icedtea-8)
2215 (define-public ant/java8
2216 (package (inherit ant-bootstrap)
2221 (uri (string-append "mirror://apache/ant/source/apache-ant-"
2222 version "-src.tar.gz"))
2225 "10p3dh77lkzzzcy32dk9azljixzadp46fggjfbvgkl8mmb8cxxv8"))
2226 (modules '((guix build utils)))
2229 (for-each delete-file
2230 (find-files "lib/optional" "\\.jar$"))
2233 (substitute-keyword-arguments (package-arguments ant-bootstrap)
2235 `(modify-phases ,phases
2236 (add-after 'unpack 'remove-scripts
2237 ;; Remove bat / cmd scripts for DOS as well as the antRun and runant
2240 (for-each delete-file
2241 (find-files "src/script"
2242 "(.*\\.(bat|cmd)|runant.*|antRun.*)"))
2245 (lambda* (#:key inputs outputs #:allow-other-keys)
2246 (setenv "JAVA_HOME" (assoc-ref inputs "jdk"))
2248 ;; Disable tests to avoid dependency on hamcrest-core, which needs
2249 ;; Ant to build. This is necessary in addition to disabling the
2250 ;; "check" phase, because the dependency on "test-jar" would always
2251 ;; result in the tests to be run.
2252 (substitute* "build.xml"
2253 (("depends=\"jars,test-jar\"") "depends=\"jars\""))
2254 (invoke "bash" "bootstrap.sh"
2255 (string-append "-Ddist.dir="
2256 (assoc-ref outputs "out")))))))))
2258 `(("jdk" ,icedtea-8 "jdk")
2260 ("unzip" ,unzip)))))
2262 ;; The 1.9.x series is the last that can be built with GCJ. The 1.10.x series
2265 (package (inherit ant/java8)
2269 (uri (string-append "mirror://apache/ant/source/apache-ant-"
2270 version "-src.tar.gz"))
2273 "1k28mka0m3isy9yr8gz84kz1f3f879rwaxrd44vdn9xbfwvwk86n"))))
2275 `(("jdk" ,icedtea-7 "jdk")
2277 ("unzip" ,unzip)))))
2279 (define-public ant-apache-bcel
2282 (name "ant-apache-bcel")
2284 (substitute-keyword-arguments (package-arguments ant/java8)
2286 `(modify-phases ,phases
2287 (add-after 'unpack 'link-bcel
2288 (lambda* (#:key inputs #:allow-other-keys)
2289 (for-each (lambda (file)
2291 (string-append "lib/optional/"
2293 (find-files (assoc-ref inputs "java-commons-bcel")
2296 (add-after 'build 'install
2297 (lambda* (#:key outputs #:allow-other-keys)
2298 (let* ((out (assoc-ref outputs "out"))
2299 (share (string-append out "/share/java"))
2300 (bin (string-append out "/bin"))
2301 (lib (string-append out "/lib")))
2303 (install-file (string-append lib "/ant-apache-bcel.jar") share)
2304 (delete-file-recursively bin)
2305 (delete-file-recursively lib)
2308 `(("java-commons-bcel" ,java-commons-bcel)
2309 ,@(package-inputs ant/java8)))))
2311 (define-public ant-junit
2316 (substitute-keyword-arguments (package-arguments ant/java8)
2318 `(modify-phases ,phases
2319 (add-after 'unpack 'link-junit
2320 (lambda* (#:key inputs #:allow-other-keys)
2321 (for-each (lambda (file)
2323 (string-append "lib/optional/"
2325 (find-files (assoc-ref inputs "java-junit")
2328 (add-after 'build 'install
2329 (lambda* (#:key outputs #:allow-other-keys)
2330 (let* ((out (assoc-ref outputs "out"))
2331 (share (string-append out "/share/java"))
2332 (bin (string-append out "/bin"))
2333 (lib (string-append out "/lib")))
2335 (install-file (string-append lib "/ant-junit.jar") share)
2336 (delete-file-recursively bin)
2337 (delete-file-recursively lib)
2340 `(("java-junit" ,java-junit)
2341 ,@(package-inputs ant/java8)))))
2343 (define-public java-openjfx-build
2345 (name "java-openjfx-build")
2346 ;; This is a java-8 version
2351 (url "http://hg.openjdk.java.net/openjfx/8u-dev/rt")
2352 (changeset (string-append
2353 (string-join (string-split version #\.) "u")
2355 (file-name (string-append name "-" version "-checkout"))
2356 (modules '((guix build utils)))
2359 ;; Delete included gradle jar
2360 (delete-file-recursively "gradle/wrapper")
2364 "0yg38mwpivswccv9n96k06x3iv82i4px1a9xg9l8dswzwmfj259f"))))
2365 (build-system ant-build-system)
2367 `(#:jar-name "java-openjfx.jar"
2368 #:source-dir "buildSrc/src/main/java"
2369 #:test-dir "buildSrc/src/test"
2371 (modify-phases %standard-phases
2372 (add-before 'configure 'generate-jsl-parser
2374 (invoke "antlr3" "-o"
2375 "buildSrc/src/main/java/com/sun/scenario/effect/compiler"
2376 "buildSrc/src/main/antlr/JSL.g"))))))
2378 `(("antlr3" ,antlr3)
2379 ("java-stringtemplate" ,java-stringtemplate)))
2381 `(("java-junit" ,java-junit)
2382 ("java-hamcrest-core" ,java-hamcrest-core)))
2383 (home-page "https://openjfx.io")
2384 (synopsis "Graphical application toolkit in Java")
2385 (description "OpenJFX is a client application platform for desktop,
2386 mobile and embedded systems built on Java. Its goal is to produce a
2387 modern, efficient, and fully featured toolkit for developing rich client
2388 applications. This package contains base classes for the OpenJFX
2389 distribution and helper classes for building other parts of the
2391 (license license:gpl2))) ;gpl2 only, with classpath exception
2393 (define-public java-openjfx-base
2394 (package (inherit java-openjfx-build)
2395 (name "java-openjfx-base")
2397 `(#:jar-name "java-openjfx-base.jar"
2398 #:source-dir "modules/base/src/main/java:modules/base/src/main/java8:modules/base/src/main/version-info"
2399 #:test-dir "modules/base/src/test"
2401 (modify-phases %standard-phases
2402 (add-before 'check 'remove-empty-file
2404 (with-directory-excursion "modules/base/src/test/java"
2405 ;; These files are completely commented, but junit expects them to
2406 ;; contain a class, so tests fail.
2408 "com/sun/javafx/property/adapter/PropertyDescriptorTest.java")
2410 "com/sun/javafx/property/adapter/ReadOnlyPropertyDescriptorTest.java")
2411 (delete-file "javafx/beans/property/PropertiesTest.java")
2413 "javafx/beans/property/adapter/ReadOnlyJavaBeanPropertyBuilder_General_Test.java")
2415 (delete-file "com/sun/javafx/runtime/VersionInfoTest.java"))
2418 `(("java-openjfx-build" ,java-openjfx-build)))
2419 (description "OpenJFX is a client application platform for desktop,
2420 mobile and embedded systems built on Java. Its goal is to produce a
2421 modern, efficient, and fully featured toolkit for developing rich client
2422 applications. This package contains base classes for the OpenJFX
2425 (define-public java-openjfx-graphics
2426 (package (inherit java-openjfx-build)
2427 (name "java-openjfx-graphics")
2429 `(#:jar-name "java-openjfx-graphics.jar"
2430 #:source-dir "modules/graphics/src/main/java"
2431 #:tests? #f; require X
2432 #:test-dir "modules/graphics/src/test"))
2434 `(("java-openjfx-base" ,java-openjfx-base)
2435 ("java-swt" ,java-swt)))
2436 (description "OpenJFX is a client application platform for desktop,
2437 mobile and embedded systems built on Java. Its goal is to produce a
2438 modern, efficient, and fully featured toolkit for developing rich client
2439 applications. This package contains graphics-related classes for the
2440 OpenJFX distribution.")))
2442 (define-public java-openjfx-media
2443 (package (inherit java-openjfx-build)
2444 (name "java-openjfx-media")
2446 `(("java-openjxf-graphics" ,java-openjfx-graphics)))
2448 `(#:jar-name "java-openjfx-media.jar"
2449 #:source-dir "modules/media/src/main/java"
2450 #:tests? #f)); no tests
2451 (description "OpenJFX is a client application platform for desktop,
2452 mobile and embedded systems built on Java. Its goal is to produce a
2453 modern, efficient, and fully featured toolkit for developing rich client
2454 applications. This package contains media-related classes for the
2455 OpenJFX distribution.")))
2457 (define-public javacc-4
2464 (url "https://github.com/javacc/javacc.git")
2465 (commit "release_41")))
2466 (file-name (string-append "javacc-" version "-checkout"))
2469 "07ysav7j8r1c6h8qxrgqk6lwdp74ly0ad1935lragxml0qqc3ka0"))
2470 (modules '((guix build utils)))
2471 ;; delete bundled jars
2472 (snippet '(begin (delete-file-recursively "lib") #t))))
2473 (build-system ant-build-system)
2475 ;; /tmp/guix-build-javacc-4.1.drv-0/source/test/javacodeLA/build.xml:60:
2480 (modify-phases %standard-phases
2481 ;; Delete tests to avoid build failure (we don't run them anyway).
2482 (add-after 'unpack 'delete-tests
2484 (for-each delete-file
2485 '("src/org/javacc/JavaCCTestCase.java"
2486 "src/org/javacc/parser/ExpansionTest.java"
2487 "src/org/javacc/parser/OptionsTest.java"
2488 "src/org/javacc/jjtree/JJTreeOptionsTest.java"))
2489 (for-each delete-file-recursively
2490 '("src/org/javacc/parser/test"
2491 "src/org/javacc/jjdoc/test"))
2493 (replace 'install (install-jars "bin/lib")))))
2494 (home-page "https://javacc.org/")
2495 (synopsis "Java parser generator")
2496 (description "Java Compiler Compiler (JavaCC) is the most popular parser
2497 generator for use with Java applications. A parser generator is a tool that
2498 reads a grammar specification and converts it to a Java program that can
2499 recognize matches to the grammar. In addition to the parser generator itself,
2500 JavaCC provides other standard capabilities related to parser generation such
2501 as tree building (via a tool called JJTree included with JavaCC), actions,
2503 (license license:bsd-3)))
2505 (define-public javacc
2513 (url "https://github.com/javacc/javacc.git")
2515 (file-name (git-file-name "javacc" version))
2517 (base32 "18kkak3gda93gr25jrgy6q00g0jr8i24ri2wk4kybz1v234fxx9i"))
2518 (modules '((guix build utils)))
2519 ;; Delete bundled jars.
2520 (snippet '(begin (for-each delete-file-recursively
2521 '("bootstrap" "lib"))
2524 `(#:make-flags ; bootstrap from javacc-4
2525 (list (string-append "-Dbootstrap-jar="
2526 (assoc-ref %build-inputs "javacc")
2527 "/share/java/javacc.jar"))
2528 #:test-target "test"
2530 (modify-phases %standard-phases
2531 (replace 'install (install-jars "target"))
2532 (add-after 'install 'install-bin
2533 (lambda* (#:key outputs inputs #:allow-other-keys)
2534 (let* ((out (assoc-ref outputs "out"))
2535 (dir (string-append out "/share/java"))
2536 (bin (string-append out "/bin"))
2537 (javacc (string-append bin "/javacc")))
2539 (with-output-to-file javacc
2542 (string-append "#!/bin/sh\n"
2543 (assoc-ref inputs "jdk") "/bin/java"
2544 " -cp " dir "/javacc.jar" " `basename $0`" " $*"))))
2545 (chmod javacc #o755)
2546 ;; symlink to different names to affect the first argument and
2547 ;; change the behavior of the jar file.
2548 (symlink javacc (string-append bin "/jjdoc"))
2549 (symlink javacc (string-append bin "/jjtree"))
2553 `(("javacc" ,javacc-4)))))
2555 ;; This is the last 3.x release of ECJ
2556 (define-public java-ecj-3
2562 (uri (string-append "http://archive.eclipse.org/eclipse/"
2563 "downloads/drops/R-" version
2564 "-201301310800/ecjsrc-" version ".jar"))
2567 "01mdj14jw11g1jfnki4fi8229p0c6zzckd38zqy2w4m3cjcvsx04"))))
2568 (build-system ant-build-system)
2570 `(#:tests? #f ; none included
2571 #:jdk ,icedtea-7 ; doesn't build with JDK8+
2572 #:make-flags (list "-f" "src/build.xml")
2573 #:build-target "build"
2575 (modify-phases %standard-phases
2576 (add-after 'unpack 'fix-manifest
2578 ;; Record the main class to make ecj executable.
2579 (with-atomic-file-replacement "src/META-INF/MANIFEST.MF"
2581 (display "Manifest-Version: 1.0
2582 Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n"
2585 (replace 'install (install-jars ".")))))
2586 (home-page "https://eclipse.org")
2587 (synopsis "Eclipse Java development tools core batch compiler")
2588 (description "This package provides the Eclipse Java core batch compiler.")
2589 (license license:epl1.0)))
2591 ;; This is needed for java-cisd-args4j
2592 (define-public java-ecj-3.5
2593 (package (inherit java-ecj-3)
2596 (method url-fetch/zipbomb)
2597 (uri (string-append "http://archive.eclipse.org/eclipse/"
2598 "downloads/drops/R-" version
2599 "-200909170800/ecjsrc-" version ".zip"))
2602 "1vnl2mavisc567bip736xzsvvbjif5279wc4a7pbdik5wlir8qr7"))))
2603 (build-system ant-build-system)
2605 `(#:tests? #f ; none included
2606 #:jdk ,icedtea-7 ; doesn't build with JDK8+
2607 #:build-target "build"
2609 (modify-phases %standard-phases
2610 (add-after 'unpack 'fix-manifest
2612 ;; Record the main class to make ecj executable.
2613 (with-atomic-file-replacement "META-INF/MANIFEST.MF"
2616 (display "Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n"
2619 (replace 'install (install-jars ".")))))
2621 `(("unzip" ,unzip)))))
2623 (define-public java-ecj
2624 (package (inherit java-ecj-3)
2630 "http://archive.eclipse.org/eclipse/downloads/drops4/R-"
2632 "-201703010400/ecjsrc-"
2637 "11cfgsdgznja1pvlxkjbqykxd7pcd5655vkm7s44xmahmap15gpl"))))
2639 `(#:tests? #f ; none included
2640 #:build-target "build"
2642 (modify-phases %standard-phases
2643 (add-after 'unpack 'fix-build.xml
2645 (substitute* "src/build.xml"
2649 (add-after 'unpack 'fix-prop
2651 (substitute* "src/build.xml"
2652 (("^.*properties.*$")
2653 "<include name=\"**/*.properties\"/>
2654 <include name=\"**/*.props\"/>"))
2656 (add-before 'build 'chdir
2660 (replace 'install (install-jars ".")))))))
2662 (define-public java-cisd-base
2663 (let ((revision 38938)
2664 (base-version "14.12.0"))
2666 (name "java-cisd-base")
2667 (version (string-append base-version "-" (number->string revision)))
2671 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2672 "base/tags/release/"
2673 (version-major+minor base-version)
2674 ".x/" base-version "/base/"))
2675 (revision revision)))
2676 (file-name (string-append "java-cisd-base-" version "-checkout"))
2679 "1i5adyf7nzclb0wydgwa1az04qliid8035vpahaandmkmigbnxiy"))
2680 (modules '((guix build utils)))
2683 ;; Delete included gradle jar
2684 (delete-file-recursively "gradle/wrapper")
2685 ;; Delete pre-built native libraries
2686 (delete-file-recursively "libs")
2688 (build-system ant-build-system)
2690 `(#:make-flags '("-file" "build/build.xml")
2691 #:test-target "jar-test"
2694 (modify-phases %standard-phases
2695 (add-after 'unpack 'unpack-build-resources
2696 (lambda* (#:key inputs #:allow-other-keys)
2697 (copy-recursively (assoc-ref inputs "build-resources")
2698 "../build_resources")
2700 (add-after 'unpack-build-resources 'fix-dependencies
2701 (lambda* (#:key inputs #:allow-other-keys)
2702 (substitute* "build/build.xml"
2703 (("\\$\\{lib\\}/testng/testng-jdk15.jar")
2704 (string-append (assoc-ref inputs "java-testng")
2705 "/share/java/java-testng.jar"))
2706 (("\\$\\{lib\\}/commons-lang/commons-lang.jar")
2707 (string-append (assoc-ref inputs "java-commons-lang")
2708 "/share/java/commons-lang-"
2709 ,(package-version java-commons-lang) ".jar"))
2710 (("\\$\\{lib\\}/commons-io/commons-io.jar")
2711 (string-append (assoc-ref inputs "java-commons-io")
2712 "/share/java/commons-io-"
2713 ,(package-version java-commons-io)
2715 ;; Remove dependency on svn
2716 (("<build-info.*") "")
2717 (("\\$\\{revision.number\\}")
2718 ,(number->string revision))
2719 (("\\$\\{version.number\\}") ,base-version))
2720 ;; Remove dependency on classycle
2721 (substitute* "../build_resources/ant/build-common.xml"
2722 (("<taskdef name=\"dependency-checker.*") "")
2723 (("classname=\"classycle.*") "")
2724 (("classpath=\"\\$\\{lib\\}/classycle.*") ""))
2726 ;; A few tests fail because of the lack of a proper /etc/groups and
2727 ;; /etc/passwd file in the build container.
2728 (add-after 'unpack 'disable-broken-tests
2730 (substitute* "sourceTest/java/ch/systemsx/cisd/base/AllTests.java"
2731 (("Unix.isOperational\\(\\)") "false"))
2733 ;; These decorators are almost useless and pull in an unpackaged
2735 (add-after 'unpack 'remove-useless-decorators
2737 (substitute* "source/java/ch/systemsx/cisd/base/unix/Unix.java"
2739 (("import ch.rinn.restrictions.Private;") ""))
2740 (substitute* "sourceTest/java/ch/systemsx/cisd/base/unix/UnixTests.java"
2742 (("import ch.rinn.restrictions.Friend;") ""))
2744 (add-before 'configure 'build-native-code
2745 (lambda* (#:key inputs #:allow-other-keys)
2746 (let ((jdk (assoc-ref inputs "jdk"))
2747 (dir ,(match (%current-system)
2750 ((or "armhf-linux" "aarch64-linux")
2752 ((or "x86_64-linux")
2754 (_ "unknown-Linux"))))
2755 (with-directory-excursion "source/c"
2756 (invoke "gcc" "-shared" "-O3" "-fPIC" "unix.c"
2757 (string-append "-I" jdk "/include")
2758 (string-append "-I" jdk "/include/linux")
2760 (invoke "gcc" "-shared" "-O3" "-fPIC"
2761 "-DMACHINE_BYTE_ORDER=1"
2769 (string-append "-I" jdk "/include")
2770 (string-append "-I" jdk "/include/linux")
2771 "-o" "libnativedata.so"))
2772 (install-file "source/c/libunix.so"
2773 (string-append "libs/native/unix/" dir))
2774 (install-file "source/c/libnativedata.so"
2775 (string-append "libs/native/nativedata/" dir))
2777 ;; In the "check" phase we only build the test executable.
2778 (add-after 'check 'run-tests
2780 (invoke "java" "-jar" "targets/dist/sis-base-test.jar")
2781 (delete-file "targets/dist/sis-base-test.jar")
2783 (replace 'install (install-jars "targets/dist")))))
2785 `(("jdk" ,icedtea-8)
2786 ("java-commons-lang" ,java-commons-lang)
2787 ("java-commons-io" ,java-commons-io)
2788 ("java-testng" ,java-testng)
2793 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2794 "base/tags/release/"
2795 (version-major+minor base-version)
2797 "/build_resources/"))
2798 (revision revision)))
2801 "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk"))))))
2802 (home-page "http://svnsis.ethz.ch")
2803 (synopsis "Utility classes for libraries from ETH Zurich")
2804 (description "This library supplies some utility classes needed for
2805 libraries from the SIS division at ETH Zurich like jHDF5.")
2806 ;; The C sources are under a non-copyleft license, which looks like a
2807 ;; variant of the BSD licenses. The whole package is under the ASL2.0.
2808 (license (list license:asl2.0
2809 (license:non-copyleft "file://source/c/COPYING"))))))
2811 (define-public java-cisd-args4j
2812 (let ((revision 39162)
2813 (base-version "9.11.2"))
2815 (name "java-cisd-args4j")
2816 (version (string-append base-version "-" (number->string revision)))
2820 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2821 "args4j/tags/release/"
2822 (version-major+minor base-version)
2823 ".x/" base-version "/args4j/"))
2824 (revision revision)))
2825 (file-name (string-append "java-cisd-args4j-" version "-checkout"))
2828 "0hhqznjaivq7ips7mkwas78z42s6djsm20rrs7g1zd59rcsakxn2"))))
2829 (build-system ant-build-system)
2831 `(#:make-flags '("-file" "build/build.xml")
2832 #:tests? #f ; there are no tests
2833 ;; There are weird build failures with JDK8, such as: "The type
2834 ;; java.io.ObjectInputStream cannot be resolved. It is indirectly
2835 ;; referenced from required .class files"
2837 #:modules ((guix build ant-build-system)
2839 (guix build java-utils)
2844 (modify-phases %standard-phases
2845 (add-after 'unpack 'unpack-build-resources
2846 (lambda* (#:key inputs #:allow-other-keys)
2847 (mkdir-p "../build_resources")
2848 (invoke "tar" "xf" (assoc-ref inputs "build-resources")
2849 "-C" "../build_resources"
2850 "--strip-components=1")
2851 (mkdir-p "../build_resources/lib")
2853 (add-after 'unpack-build-resources 'fix-dependencies
2854 (lambda* (#:key inputs #:allow-other-keys)
2855 ;; FIXME: There should be a more convenient abstraction for
2856 ;; editing XML files.
2857 (with-directory-excursion "../build_resources/ant/"
2858 (chmod "build-common.xml" #o664)
2859 (call-with-output-file "build-common.xml.new"
2863 (with-input-from-file "build-common.xml"
2864 (lambda _ (xml->sxml #:trim-whitespace? #t)))
2865 `(;; Remove dependency on classycle and custom ant tasks
2866 (taskdef . ,(lambda (tag . kids)
2867 (let ((name ((sxpath '(name *text*)) kids)))
2868 (if (or (member "build-info" name)
2869 (member "dependency-checker" name)
2870 (member "build-java-subprojects" name)
2871 (member "project-classpath" name))
2874 (typedef . ,(lambda (tag . kids)
2875 (let ((name ((sxpath '(name *text*)) kids)))
2876 (if (member "recursive-jar" name)
2879 (build-java-subprojects . ,(lambda _ '()))
2880 ;; Ignore everything else
2881 (*default* . ,(lambda (tag . kids) `(,tag ,@kids)))
2882 (*text* . ,(lambda (_ txt) txt))))
2884 (rename-file "build-common.xml.new" "build-common.xml"))
2885 (substitute* "build/build.xml"
2886 (("\\$\\{lib\\}/cisd-base/cisd-base.jar")
2887 (string-append (assoc-ref inputs "java-cisd-base")
2888 "/share/java/sis-base.jar"))
2889 ;; Remove dependency on svn
2890 (("<build-info.*") "")
2891 (("\\$\\{revision.number\\}")
2892 ,(number->string revision))
2893 (("\\$\\{version.number\\}") ,base-version)
2894 ;; Don't use custom ant tasks.
2895 (("recursive-jar") "jar")
2896 (("<project-classpath.*") ""))
2898 (replace 'install (install-jars "targets/dist")))))
2900 `(("java-cisd-base" ,java-cisd-base)))
2902 `(("ecj" ,java-ecj-3.5)
2907 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2908 "args4j/tags/release/"
2909 (version-major+minor base-version)
2911 "/build_resources/"))
2912 (revision revision)))
2915 "056cam4k8pll7ass31sy6gwn8g8719njc41yf4l02b0342nilkyf"))
2916 (modules '((guix build utils)))
2917 ;; Delete bundled pre-built jars.
2919 '(begin (delete-file-recursively "lib/") #t))))))
2920 (home-page "http://svnsis.ethz.ch")
2921 (synopsis "Command line parser library")
2922 (description "This package provides a parser for command line arguments.")
2923 (license license:asl2.0))))
2925 (define-public java-cisd-jhdf5
2926 (let ((revision 39162)
2927 (base-version "14.12.6"))
2929 (name "java-cisd-jhdf5")
2930 (version (string-append base-version "-" (number->string revision)))
2934 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2935 "jhdf5/tags/release/"
2936 (version-major+minor base-version)
2937 ".x/" base-version "/jhdf5/"))
2938 (revision revision)))
2939 (file-name (string-append "java-cisd-jhdf5-" version "-checkout"))
2942 "13i17s2hn0q9drdqvp8csy7770p3hdbh9rp30ihln2ldkfawdmz0"))
2943 (modules '((guix build utils)))
2946 ;; Delete included gradle jar
2947 (delete-file-recursively "gradle/wrapper")
2948 ;; Delete pre-built native libraries
2949 (delete-file-recursively "libs")
2951 (build-system ant-build-system)
2953 `(#:make-flags '("-file" "build/build.xml")
2954 #:build-target "jar-all"
2955 #:test-target "jar-test"
2958 (modify-phases %standard-phases
2959 ;; FIXME: this build phase fails.
2960 (delete 'generate-jar-indices)
2961 ;; Don't erase results from the build phase when building tests.
2962 (add-after 'unpack 'separate-test-target-from-clean
2964 (substitute* "build/build.xml"
2965 (("\"jar-test\" depends=\"clean, ")
2966 "\"jar-test\" depends=\""))
2968 (add-after 'unpack 'unpack-build-resources
2969 (lambda* (#:key inputs #:allow-other-keys)
2970 (copy-recursively (assoc-ref inputs "build-resources")
2971 "../build_resources")
2972 (delete-file-recursively "../build_resources/lib/")
2973 (mkdir-p "../build_resources/lib")
2974 ;; Remove dependency on classycle
2975 (substitute* "../build_resources/ant/build-common.xml"
2976 (("<taskdef name=\"dependency-checker.*") "")
2977 (("classname=\"classycle.*") "")
2978 (("classpath=\"\\$\\{lib\\}/classycle.*") ""))
2979 ;; Remove dependency on svn
2980 (substitute* "build/build.xml"
2981 (("<build-info.*") "")
2982 (("\\$\\{revision.number\\}")
2983 ,(number->string revision))
2984 (("\\$\\{version.number\\}") ,base-version))
2986 (add-after 'unpack-build-resources 'fix-dependencies
2987 (lambda* (#:key inputs #:allow-other-keys)
2988 (substitute* "../build_resources/ant/build-common.xml"
2989 (("../libraries/testng/testng-jdk15.jar")
2990 (string-append (assoc-ref inputs "java-testng")
2991 "/share/java/java-testng.jar")))
2992 (substitute* "build/build.xml"
2993 (("\\$\\{lib\\}/sis-base/sis-base.jar")
2994 (string-append (assoc-ref inputs "java-cisd-base")
2995 "/share/java/sis-base.jar"))
2996 (("\\$\\{lib\\}/cisd-args4j/cisd-args4j.jar")
2997 (string-append (assoc-ref inputs "java-cisd-args4j")
2998 "/share/java/cisd-args4j.jar"))
2999 (("\\$\\{lib\\}/commons-lang/commons-lang.jar")
3000 (string-append (assoc-ref inputs "java-commons-lang")
3001 "/share/java/commons-lang-"
3002 ,(package-version java-commons-lang) ".jar"))
3003 (("\\$\\{lib\\}/commons-io/commons-io.jar")
3004 (string-append (assoc-ref inputs "java-commons-io")
3005 "/share/java/commons-io-"
3006 ,(package-version java-commons-io)
3008 (("\\$\\{lib\\}/testng/testng-jdk15.jar")
3009 (string-append (assoc-ref inputs "java-testng")
3010 "/share/java/java-testng.jar"))
3011 (("\\$\\{lib\\}/junit4/junit.jar")
3012 (string-append (assoc-ref inputs "java-junit")
3013 "/share/java/junit.jar"))
3014 (("\\$\\{lib\\}/jmock/hamcrest/hamcrest-core.jar")
3015 (string-append (assoc-ref inputs "java-hamcrest-core")
3016 "/share/java/hamcrest-core.jar")))
3017 ;; Remove dependency on ch.rinn.restrictions
3018 (with-directory-excursion "source/java/ch/systemsx/cisd/hdf5/"
3019 (substitute* '("BitSetConversionUtils.java"
3021 (("import ch.rinn.restrictions.Private;") "")
3023 (with-directory-excursion "sourceTest/java/ch/systemsx/cisd/hdf5/"
3024 (substitute* '("BitSetConversionTest.java"
3025 "h5ar/HDF5ArchiverTest.java")
3026 (("import ch.rinn.restrictions.Friend;") "")
3028 ;; Remove leftovers from removing @Friend
3029 (substitute* "h5ar/HDF5ArchiverTest.java"
3030 (("\\{ HDF5Archiver.class, IdCache.class, LinkRecord.class \\}\\)")
3033 (add-before 'configure 'build-native-library
3034 (lambda* (#:key inputs #:allow-other-keys)
3035 (let ((jdk (assoc-ref inputs "jdk"))
3036 (hdf5 (assoc-ref inputs "hdf5"))
3037 (dir ,(match (%current-system)
3040 ((or "armhf-linux" "aarch64-linux")
3042 ((or "x86_64-linux")
3044 (_ "unknown-Linux"))))
3045 (with-directory-excursion "source/c"
3046 (apply invoke `("gcc" "-shared" "-O3"
3048 "-Wl,--exclude-libs,ALL"
3049 ,@(find-files "jhdf5" "\\.c$")
3050 ,@(find-files "hdf-java" "\\.c$")
3051 ,(string-append "-I" hdf5 "/include")
3052 ,(string-append "-I" jdk "/include")
3053 ,(string-append "-I" jdk "/include/linux")
3054 ,(string-append hdf5 "/lib/libhdf5.a")
3055 "-o" "libjhdf5.so" "-lz")))
3056 (install-file "source/c/libjhdf5.so"
3057 (string-append "libs/native/jhdf5/" dir))
3059 ;; In the "check" phase we only build the test executable.
3060 (add-after 'check 'run-tests
3062 (invoke "java" "-jar" "targets/dist/sis-jhdf5-test.jar")
3063 (delete-file "targets/dist/sis-jhdf5-test.jar")
3066 (install-jars "targets/dist")))))
3068 `(("java-cisd-base" ,java-cisd-base)
3069 ("java-cisd-args4j" ,java-cisd-args4j)
3070 ("java-commons-lang" ,java-commons-lang)
3071 ("java-commons-io" ,java-commons-io)
3075 `(("jdk" ,icedtea-8)
3076 ("java-testng" ,java-testng)
3077 ("java-junit" ,java-junit)
3078 ("java-jmock" ,java-jmock)
3079 ("java-hamcrest-core" ,java-hamcrest-core)
3084 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
3085 "jhdf5/tags/release/"
3086 (version-major+minor base-version)
3088 "/build_resources/"))
3089 (revision revision)))
3092 "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk"))))))
3093 (home-page "https://wiki-bsse.ethz.ch/display/JHDF5/")
3094 (synopsis "Java binding for HDF5")
3095 (description "JHDF5 is a high-level API in Java for reading and writing
3096 HDF5 files, building on the libraries provided by the HDF Group.")
3097 ;; The C sources are under a non-copyleft license, which looks like a
3098 ;; variant of the BSD licenses. The whole package is under the ASL2.0.
3099 (license (list license:asl2.0
3100 (license:non-copyleft "file://source/c/COPYING"))))))
3102 (define-public java-classpathx-servletapi
3104 (name "java-classpathx-servletapi")
3108 (uri (string-append "mirror://gnu/classpathx/servletapi/"
3109 "servletapi-" version ".tar.gz"))
3112 "07d8h051siga2f33fra72hk12sbq1bxa4jifjg0qj0vfazjjff0x"))))
3113 (build-system ant-build-system)
3115 `(#:tests? #f ; there is no test target
3116 #:build-target "compile"
3118 (list "-Dbuild.compiler=javac1.8"
3119 (string-append "-Ddist=" (assoc-ref %outputs "out")))
3121 (modify-phases %standard-phases
3123 (lambda* (#:key make-flags #:allow-other-keys)
3124 (apply invoke `("ant" "dist" ,@make-flags)))))))
3125 (home-page "https://www.gnu.org/software/classpathx/")
3126 (synopsis "Java servlet API implementation")
3127 (description "This is the GNU servlet API distribution, part of the
3128 ClasspathX project. It provides implementations of version 3.0 of the servlet
3129 API and version 2.1 of the Java ServerPages API.")
3130 (license license:gpl3+)))
3132 (define-public java-javaee-servletapi
3134 (name "java-javaee-servletapi")
3139 (url "https://github.com/javaee/servlet-spec.git")
3141 (file-name (git-file-name name version))
3144 "0s03lj8w5an70lkqbjycgfrfk0kc07vbfav91jzk87gh3awf9ksl"))))
3145 (build-system ant-build-system)
3147 `(#:jar-name "javax-servletapi.jar"
3150 #:source-dir "src/main/java"
3152 (modify-phases %standard-phases
3153 (add-before 'build 'copy-resources
3155 (mkdir-p "build/classes/javax/servlet/http")
3156 (let ((from-prefix "src/main/java/javax/servlet/")
3157 (to-prefix "build/classes/javax/servlet/"))
3158 (for-each (lambda (f)
3159 (copy-file (string-append from-prefix f)
3160 (string-append to-prefix f)))
3161 (list "LocalStrings_ja.properties"
3162 "LocalStrings.properties"
3163 "LocalStrings_fr.properties"
3164 "http/LocalStrings_es.properties"
3165 "http/LocalStrings_ja.properties"
3166 "http/LocalStrings.properties"
3167 "http/LocalStrings_fr.properties")))
3170 `(("unzip" ,unzip)))
3171 (home-page "https://javaee.github.io/servlet-spec/")
3172 (synopsis "Java servlet API")
3173 (description "Java Servlet is the foundation web specification in the
3174 Java Enterprise Platform. Developers can build web applications using the
3175 Servlet API to interact with the request/response workflow. This project
3176 provides information on the continued development of the Java Servlet
3178 ;; Main code is dual-licensed by Oracle under either GLP2 or CDDL 1.1.
3179 ;; Some files are licensed under ASL 2.0.
3180 (license (list license:asl2.0 license:gpl2 license:cddl1.1))))
3182 (define-public java-swt
3187 ;; The types of many variables and procedures differ in the sources
3188 ;; dependent on whether the target architecture is a 32-bit system or a
3189 ;; 64-bit system. Instead of patching the sources on demand in a build
3190 ;; phase we download either the 32-bit archive (which mostly uses "int"
3191 ;; types) or the 64-bit archive (which mostly uses "long" types).
3192 (let ((hash32 "09q0cbh90d90q3a7dx9430kc4m6bijrkr4lajrmzzvi0jjdpq4v9")
3193 (hash64 "17k5hs75a87ssmc5xhwdfdm2gn4zba0r837l2455za01krnkaa2q")
3196 (let-values (((hash file)
3197 (match (or (%current-target-system) (%current-system))
3198 ("x86_64-linux" (values hash64 file64))
3199 (_ (values hash32 file32)))))
3203 "http://download.eclipse.org/eclipse/downloads/drops4/"
3204 "R-" version "-201710090410/swt-" version
3205 "-gtk-linux-" file ".zip"))
3206 (sha256 (base32 hash))))))
3207 (build-system ant-build-system)
3209 `(#:jar-name "swt.jar"
3211 #:tests? #f ; no "check" target
3213 (modify-phases %standard-phases
3215 (lambda* (#:key source #:allow-other-keys)
3217 (invoke "unzip" source "-d" "swt")
3220 (invoke "unzip" "src.zip" "-d" "src")))
3221 ;; The classpath contains invalid icecat jars. Since we don't need
3222 ;; anything other than the JDK on the classpath, we can simply unset
3224 (add-after 'configure 'unset-classpath
3225 (lambda _ (unsetenv "CLASSPATH") #t))
3226 (add-before 'build 'build-native
3227 (lambda* (#:key inputs outputs #:allow-other-keys)
3228 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
3229 ;; Build shared libraries. Users of SWT have to set the system
3230 ;; property swt.library.path to the "lib" directory of this
3233 (setenv "OUTPUT_DIR" lib)
3234 (with-directory-excursion "src"
3235 (invoke "bash" "build.sh")))))
3236 (add-after 'install 'install-native
3237 (lambda* (#:key outputs #:allow-other-keys)
3238 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
3239 (for-each (lambda (file)
3240 (install-file file lib))
3241 (find-files "." "\\.so$"))
3245 ("libxtst" ,libxtst)
3250 `(("pkg-config" ,pkg-config)
3252 (home-page "https://www.eclipse.org/swt/")
3253 (synopsis "Widget toolkit for Java")
3255 "SWT is a widget toolkit for Java designed to provide efficient, portable
3256 access to the user-interface facilities of the operating systems on which it
3258 ;; SWT code is licensed under EPL1.0
3259 ;; Gnome and Gtk+ bindings contain code licensed under LGPLv2.1
3260 ;; Cairo bindings contain code under MPL1.1
3261 ;; XULRunner 1.9 bindings contain code under MPL2.0
3266 license:lgpl2.1+))))
3268 (define-public java-xz
3274 (uri (string-append "http://tukaani.org/xz/xz-java-" version ".zip"))
3277 "1z3p1ri1gvl07inxn0agx44ck8n7wrzfmvkz8nbq3njn8r9wba8x"))))
3278 (build-system ant-build-system)
3280 `(#:tests? #f ; There are no tests to run.
3281 #:jar-name ,(string-append "xz-" version ".jar")
3283 (modify-phases %standard-phases
3284 ;; The unpack phase enters the "maven" directory by accident.
3285 (add-after 'unpack 'chdir
3286 (lambda _ (chdir "..") #t)))))
3288 `(("unzip" ,unzip)))
3289 (home-page "https://tukaani.org/xz/java.html")
3290 (synopsis "Implementation of XZ data compression in pure Java")
3291 (description "This library aims to be a complete implementation of XZ data
3292 compression in pure Java. Single-threaded streamed compression and
3293 decompression and random access decompression have been fully implemented.")
3294 (license license:public-domain)))
3296 ;; java-hamcrest-core uses qdox version 1.12. We package this version instead
3297 ;; of the latest release.
3298 (define-public java-qdox-1.12
3304 (uri (string-append "https://repo1.maven.org/maven2/"
3305 "com/thoughtworks/qdox/qdox/" version
3306 "/qdox-" version "-sources.jar"))
3309 "0hlfbqq2avf5s26wxkksqmkdyk6zp9ggqn37c468m96mjv0n9xfl"))))
3310 (build-system ant-build-system)
3312 `(;; Tests require junit
3314 #:jar-name "qdox.jar"
3316 (modify-phases %standard-phases
3318 (lambda* (#:key source #:allow-other-keys)
3320 (with-directory-excursion "src"
3321 (invoke "jar" "-xf" source))))
3322 ;; At this point we don't have junit, so we must remove the API
3324 (add-after 'unpack 'delete-tests
3326 (delete-file-recursively "src/com/thoughtworks/qdox/junit")
3328 (home-page "https://github.com/codehaus/qdox")
3329 (synopsis "Parse definitions from Java source files")
3331 "QDox is a high speed, small footprint parser for extracting
3332 class/interface/method definitions from source files complete with JavaDoc
3333 @code{@@tags}. It is designed to be used by active code generators or
3334 documentation tools.")
3335 (license license:asl2.0)))
3337 (define-public java-jarjar
3339 (name "java-jarjar")
3344 "https://storage.googleapis.com/google-code-archive-downloads/v2/"
3345 "code.google.com/jarjar/jarjar-src-" version ".zip"))
3348 "1v8irhni9cndcw1l1wxqgry013s2kpj0qqn57lj2ji28xjq8ndjl"))
3349 (modules '((guix build utils)))
3352 ;; Delete bundled thirds-party jar archives.
3353 ;; TODO: unbundle maven-plugin-api.
3354 (delete-file "lib/asm-4.0.jar")
3355 (delete-file "lib/asm-commons-4.0.jar")
3356 (delete-file "lib/junit-4.8.1.jar")
3358 (build-system ant-build-system)
3360 `(;; Tests require junit, which ultimately depends on this package.
3362 #:build-target "jar"
3364 (modify-phases %standard-phases
3365 (add-before 'build 'do-not-use-bundled-asm
3366 (lambda* (#:key inputs #:allow-other-keys)
3367 (substitute* "build.xml"
3368 (("<path id=\"path.build\">")
3369 (string-append "<path id=\"path.build\"><fileset dir=\""
3370 (assoc-ref inputs "java-asm-bootstrap")
3371 "/share/java\" includes=\"**/*.jar\"/>"))
3372 (("<zipfileset src=\"lib/asm-4.0.jar\"/>") "")
3373 (("lib/asm-commons-4.0.jar")
3374 (string-append (assoc-ref inputs "java-asm-bootstrap")
3375 "/share/java/asm-6.0.jar"))
3376 (("<include name=\"org/objectweb/asm/commons/Remap\\*\\.class\"/>")
3377 (string-append "<include name=\"org/objectweb/asm/"
3378 "commons/Remap*.class\"/>"
3379 "<include name=\"org/objectweb/asm/*.class\"/>"
3380 "<include name=\"org/objectweb/asm/"
3381 "signature/*.class\"/>"
3382 "<include name=\"org/objectweb/asm/"
3383 "commons/SignatureRemapper.class\"/>")))
3386 (lambda* (#:key outputs #:allow-other-keys)
3387 (let ((target (string-append (assoc-ref outputs "out")
3389 (install-file (string-append "dist/jarjar-" ,version ".jar")
3393 `(("java-asm-bootstrap" ,java-asm-bootstrap)))
3395 `(("unzip" ,unzip)))
3396 (home-page "https://code.google.com/archive/p/jarjar/")
3397 (synopsis "Repackage Java libraries")
3399 "Jar Jar Links is a utility that makes it easy to repackage Java
3400 libraries and embed them into your own distribution. Jar Jar Links includes
3401 an Ant task that extends the built-in @code{jar} task.")
3402 (license license:asl2.0)))
3404 (define-public java-hamcrest-core
3406 (name "java-hamcrest-core")
3410 (uri (string-append "https://github.com/hamcrest/JavaHamcrest/"
3411 "archive/hamcrest-java-" version ".tar.gz"))
3414 "11g0s105fmwzijbv08lx8jlb521yravjmxnpgdx08fvg1kjivhva"))
3415 (modules '((guix build utils)))
3418 ;; Delete bundled thirds-party jar archives.
3419 (delete-file-recursively "lib")
3421 (build-system ant-build-system)
3423 `(#:tests? #f ; Tests require junit
3424 #:modules ((guix build ant-build-system)
3427 #:make-flags (list (string-append "-Dversion=" ,version))
3428 #:test-target "unit-test"
3429 #:build-target "core"
3431 (modify-phases %standard-phases
3432 ;; Disable unit tests, because they require junit, which requires
3433 ;; hamcrest-core. We also give a fixed value to the "Built-Date"
3434 ;; attribute from the manifest for reproducibility.
3435 (add-before 'configure 'patch-build.xml
3437 (substitute* "build.xml"
3438 (("unit-test, ") "")
3439 (("\\$\\{build.timestamp\\}") "guix"))
3441 ;; Java's "getMethods()" returns methods in an unpredictable order.
3442 ;; To make the output of the generated code deterministic we must
3443 ;; sort the array of methods.
3444 (add-after 'unpack 'make-method-order-deterministic
3446 (substitute* "hamcrest-generator/src/main/java/org/hamcrest/generator/ReflectiveFactoryReader.java"
3447 (("import java\\.util\\.Iterator;" line)
3448 (string-append line "\n"
3449 "import java.util.Arrays; import java.util.Comparator;"))
3450 (("allMethods = cls\\.getMethods\\(\\);" line)
3451 (string-append "_" line
3453 private Method[] getSortedMethods() {
3454 Arrays.sort(_allMethods, new Comparator<Method>() {
3456 public int compare(Method a, Method b) {
3457 return a.toString().compareTo(b.toString());
3463 private Method[] allMethods = getSortedMethods();")))
3465 (add-before 'build 'do-not-use-bundled-qdox
3466 (lambda* (#:key inputs #:allow-other-keys)
3467 (substitute* "build.xml"
3468 (("lib/generator/qdox-1.12.jar")
3469 (string-append (assoc-ref inputs "java-qdox-1.12")
3470 "/share/java/qdox.jar")))
3472 ;; build.xml searches for .jar files in this directoy, which
3473 ;; we remove from the source archive.
3474 (add-before 'build 'create-dummy-directories
3476 (mkdir-p "lib/integration")
3479 (lambda* (#:key outputs #:allow-other-keys)
3480 (let* ((target (string-append (assoc-ref outputs "out")
3482 (version-suffix ,(string-append "-" version ".jar"))
3483 (install-without-version-suffix
3486 (string-append target
3487 (basename jar version-suffix)
3491 install-without-version-suffix
3494 (and (string-suffix? ".jar" name)
3495 (not (string-suffix? "-sources.jar" name)))))))
3498 `(("java-qdox-1.12" ,java-qdox-1.12)
3499 ("java-jarjar" ,java-jarjar)))
3500 (home-page "http://hamcrest.org/")
3501 (synopsis "Library of matchers for building test expressions")
3503 "This package provides a library of matcher objects (also known as
3504 constraints or predicates) allowing @code{match} rules to be defined
3505 declaratively, to be used in other frameworks. Typical scenarios include
3506 testing frameworks, mocking libraries and UI validation rules.")
3507 (license license:bsd-2)))
3509 (define-public java-junit
3515 (uri (string-append "https://github.com/junit-team/junit/"
3516 "archive/r" version ".tar.gz"))
3517 (file-name (string-append name "-" version ".tar.gz"))
3520 "090dn5v1vs0b3acyaqc0gjf6p8lmd2h24wfzsbq7sly6b214anws"))
3521 (modules '((guix build utils)))
3524 ;; Delete bundled jar archives.
3525 (delete-file-recursively "lib")
3527 (build-system ant-build-system)
3529 `(#:tests? #f ; no tests
3530 #:jar-name "junit.jar"))
3532 `(("java-hamcrest-core" ,java-hamcrest-core)))
3533 (home-page "https://junit.org/")
3534 (synopsis "Test framework for Java")
3536 "JUnit is a simple framework to write repeatable tests for Java projects.
3537 JUnit provides assertions for testing expected results, test fixtures for
3538 sharing common test data, and test runners for running tests.")
3539 (license license:epl1.0)))
3541 (define-public java-plexus-utils
3543 (name "java-plexus-utils")
3547 (uri (string-append "https://github.com/codehaus-plexus/"
3548 "plexus-utils/archive/plexus-utils-"
3552 "1ihfigar20lvk4pinii7dq05i173xphhw4iyrk6gjfy04m01j2lz"))))
3553 (build-system ant-build-system)
3554 ;; FIXME: The default build.xml does not include a target to install
3557 `(#:jar-name "plexus-utils.jar"
3558 #:source-dir "src/main"
3560 (modify-phases %standard-phases
3561 (add-after 'unpack 'fix-reference-to-/bin-and-/usr
3563 (substitute* "src/main/java/org/codehaus/plexus/util/\
3564 cli/shell/BourneShell.java"
3565 (("/bin/sh") (which "sh"))
3566 (("/usr/") (getcwd)))
3568 (add-after 'unpack 'fix-or-disable-broken-tests
3570 (with-directory-excursion "src/test/java/org/codehaus/plexus/util"
3571 (substitute* '("cli/CommandlineTest.java"
3572 "cli/shell/BourneShellTest.java")
3573 (("/bin/sh") (which "sh"))
3574 (("/bin/echo") (which "echo")))
3576 ;; This test depends on MavenProjectStub, but we don't have
3577 ;; a package for Maven.
3578 (delete-file "introspection/ReflectionValueExtractorTest.java")
3580 ;; FIXME: The command line tests fail, maybe because they use
3582 (delete-file "cli/CommandlineTest.java"))
3585 `(("java-hamcrest-core" ,java-hamcrest-core)
3586 ("java-junit" ,java-junit)))
3587 (home-page "https://codehaus-plexus.github.io/plexus-utils/")
3588 (synopsis "Common utilities for the Plexus framework")
3589 (description "This package provides various Java utility classes for the
3590 Plexus framework to ease working with strings, files, command lines, XML and
3592 (license license:asl2.0)))
3594 (define-public java-plexus-interpolation
3596 (name "java-plexus-interpolation")
3600 (uri (string-append "https://github.com/codehaus-plexus/"
3601 "plexus-interpolation/archive/"
3602 "plexus-interpolation-" version ".tar.gz"))
3605 "03377yzlx5q440m6sxxgv6a5qb8fl30zzcgxgc0hxk5qgl2z1jjn"))))
3606 (build-system ant-build-system)
3608 `(#:jar-name "plexus-interpolation.jar"
3609 #:source-dir "src/main"))
3611 `(("java-junit" ,java-junit)
3612 ("java-hamcrest-core" ,java-hamcrest-core)))
3613 (home-page "https://codehaus-plexus.github.io/plexus-interpolation/")
3614 (synopsis "Java components for interpolating ${} strings and the like")
3615 (description "Plexus interpolator is a modular, flexible interpolation
3616 framework for the expression language style commonly seen in Maven, Plexus,
3617 and other related projects.
3619 It has its foundation in the @code{org.codehaus.plexus.utils.interpolation}
3620 package within @code{plexus-utils}, but has been separated in order to allow
3621 these two libraries to vary independently of one another.")
3622 (license license:asl2.0)))
3624 (define-public java-plexus-classworlds
3626 (name "java-plexus-classworlds")
3630 (uri (string-append "https://github.com/codehaus-plexus/"
3631 "plexus-classworlds/archive/plexus-classworlds-"
3635 "1qm4p0rl8d82lzhsiwnviw11jnq44s0gflg78zq152xyyr2xmh8g"))))
3636 (build-system ant-build-system)
3638 `(#:jar-name "plexus-classworlds.jar"
3639 #:source-dir "src/main"
3640 #:tests? #f));; FIXME: we need to generate some resources as in pom.xml
3642 `(("java-junit" ,java-junit)))
3643 (home-page "http://codehaus-plexus.github.io/plexus-classworlds/")
3644 (synopsis "Java class loader framework")
3645 (description "Plexus classworlds replaces the native @code{ClassLoader}
3646 mechanism of Java. It is especially useful for dynamic loading of application
3648 (license license:asl2.0)))
3650 (define java-plexus-container-default-bootstrap
3652 (name "java-plexus-container-default-bootstrap")
3656 (uri (string-append "https://github.com/codehaus-plexus/plexus-containers"
3657 "/archive/plexus-containers-" version ".tar.gz"))
3660 "0xw5g30qf4a83608rw9v2hv8pfsz7d69dkdhk6r0wia4q78hh1pc"))))
3661 (build-system ant-build-system)
3663 `(#:jar-name "container-default.jar"
3664 #:source-dir "plexus-container-default/src/main/java"
3665 #:test-dir "plexus-container-default/src/test"
3667 #:tests? #f; requires plexus-archiver, which depends on this package
3669 (modify-phases %standard-phases
3670 (add-before 'build 'copy-resources
3673 "plexus-container-default/src/main/resources/"
3677 `(("worldclass" ,java-plexus-classworlds)
3678 ("xbean" ,java-geronimo-xbean-reflect)
3679 ("utils" ,java-plexus-utils)
3680 ("junit" ,java-junit)
3681 ("guava" ,java-guava)))
3682 (home-page "https://github.com/codehaus-plexus/plexus-containers")
3683 (synopsis "Inversion-of-control container")
3684 (description "Plexus-default-container is Plexus' inversion-of-control
3685 (@dfn{IoC}) container. It is composed of its public API and its default
3687 (license license:asl2.0)))
3689 (define-public java-plexus-io
3691 (name "java-plexus-io")
3695 (uri (string-append "https://github.com/codehaus-plexus/plexus-io"
3696 "/archive/plexus-io-" version ".tar.gz"))
3699 "0f2j41kihaymxkpbm55smpxjja235vad8cgz94frfy3ppcp021dw"))))
3700 (build-system ant-build-system)
3702 `(#:jar-name "plexus-io.jar"
3703 #:source-dir "src/main/java"
3704 #:test-dir "src/test"
3707 (modify-phases %standard-phases
3708 (add-before 'build 'copy-resources
3710 (mkdir-p "build/classes/META-INF/plexus")
3711 (copy-file "src/main/resources/META-INF/plexus/components.xml"
3712 "build/classes/META-INF/plexus/components.xml")
3715 `(("utils" ,java-plexus-utils)
3716 ("commons-io" ,java-commons-io)
3717 ("java-jsr305" ,java-jsr305)))
3719 `(("junit" ,java-junit)
3720 ("hamcrest" ,java-hamcrest-core)
3721 ("guava" ,java-guava)
3722 ("classworlds" ,java-plexus-classworlds)
3723 ("xbean" ,java-geronimo-xbean-reflect)
3724 ("container-default" ,java-plexus-container-default-bootstrap)))
3725 (home-page "https://github.com/codehaus-plexus/plexus-io")
3726 (synopsis "I/O plexus components")
3727 (description "Plexus IO is a set of plexus components, which are designed
3728 for use in I/O operations. This implementation using plexus components allows
3729 reusing it in maven.")
3730 (license license:asl2.0)))
3732 (define-public java-plexus-archiver
3734 (name "java-plexus-archiver")
3738 (uri (string-append "https://github.com/codehaus-plexus/plexus-archiver"
3739 "/archive/plexus-archiver-" version ".tar.gz"))
3742 "0ry6i92gli0mvdmfih2vgs0lkf9yvx18h2ajxim66yg6yipnp0hg"))))
3743 (build-system ant-build-system)
3745 `(#:jar-name "plexus-archiver.jar"
3746 #:source-dir "src/main/java"
3748 #:test-dir "src/test"
3749 #:test-exclude (list "**/Abstract*.java" "**/Base*.java")
3751 (modify-phases %standard-phases
3752 (add-before 'check 'remove-failing
3754 ;; Requires an older version of plexus container
3756 "src/test/java/org/codehaus/plexus/archiver/DuplicateFilesTest.java")
3758 (add-before 'check 'fix-test-building
3760 (substitute* "build.xml"
3761 (("srcdir=\"src/test\"") "srcdir=\"src/test/java\""))
3763 (add-before 'build 'copy-resources
3765 (mkdir-p "build/classes/META-INF/plexus")
3766 (copy-file "src/main/resources/META-INF/plexus/components.xml"
3767 "build/classes/META-INF/plexus/components.xml")
3770 `(("utils" ,java-plexus-utils)
3771 ("commons-io" ,java-commons-io)
3772 ("snappy" ,java-iq80-snappy)
3773 ("io" ,java-plexus-io)
3774 ("compress" ,java-commons-compress)
3775 ("container-default" ,java-plexus-container-default-bootstrap)
3776 ("snappy" ,java-snappy)
3777 ("java-jsr305" ,java-jsr305)))
3779 `(("java-hamcrest-core" ,java-hamcrest-core)
3780 ("junit" ,java-junit)
3781 ("classworld" ,java-plexus-classworlds)
3782 ("xbean" ,java-geronimo-xbean-reflect)
3783 ("xz" ,java-tukaani-xz)
3784 ("guava" ,java-guava)))
3785 (home-page "https://github.com/codehaus-plexus/plexus-archiver")
3786 (synopsis "Archiver component of the Plexus project")
3787 (description "Plexus-archiver contains a component to deal with project
3789 (license license:asl2.0)))
3791 (define-public java-plexus-container-default
3793 (inherit java-plexus-container-default-bootstrap)
3794 (name "java-plexus-container-default")
3796 `(#:jar-name "container-default.jar"
3797 #:source-dir "plexus-container-default/src/main/java"
3798 #:test-dir "plexus-container-default/src/test"
3799 #:test-exclude (list ;"**/*Test.java"
3801 ;; Requires plexus-hierarchy
3802 "**/PlexusHierarchyTest.java"
3804 "**/ComponentRealmCompositionTest.java"
3805 "**/PlexusContainerTest.java")
3808 (modify-phases %standard-phases
3809 (add-before 'build 'copy-resources
3812 "plexus-container-default/src/main/resources/"
3815 (add-before 'check 'fix-paths
3817 (let ((dir "plexus-container-default/src/test/java/org/codehaus"))
3820 dir "/plexus/component/composition/"
3821 "ComponentRealmCompositionTest.java")
3822 (("src/test") "plexus-container-default/src/test"))
3825 `(("worldclass" ,java-plexus-classworlds)
3826 ("xbean" ,java-geronimo-xbean-reflect)
3827 ("utils" ,java-plexus-utils)
3828 ("junit" ,java-junit)
3829 ("guava" ,java-guava)))
3831 `(("archiver" ,java-plexus-archiver)
3832 ("hamcrest" ,java-hamcrest-core)))))
3834 (define-public java-plexus-component-annotations
3836 (inherit java-plexus-container-default)
3837 (name "java-plexus-component-annotations")
3839 `(#:jar-name "plexus-component-annotations.jar"
3840 #:source-dir "plexus-component-annotations/src/main/java"
3841 #:tests? #f)); no tests
3844 (synopsis "Plexus descriptors generator")
3845 (description "This package is a Maven plugin to generate Plexus descriptors
3846 from source tags and class annotations.")))
3848 (define-public java-plexus-cipher
3850 (name "java-plexus-cipher")
3854 (uri (string-append "https://github.com/codehaus-plexus/plexus-cipher"
3855 "/archive/plexus-cipher-" version ".tar.gz"))
3858 "1j3r8xzlxlk340snkjp6lk2ilkxlkn8qavsfiq01f43xmvv8ymk3"))))
3859 (build-system ant-build-system)
3861 `(#:jar-name "plexus-cipher.jar"
3862 #:source-dir "src/main/java"
3864 #:tests? #f; FIXME: requires sisu-inject-bean
3866 (modify-phases %standard-phases
3867 (add-before 'build 'copy-resources
3869 (copy-recursively "src/main/resources" "build/classes")
3870 (mkdir-p "build/classes/META-INF/sisu")
3871 (with-output-to-file "build/classes/META-INF/sisu/javax.inject.Named"
3873 (display "org.sonatype.plexus.components.cipher.DefaultPlexusCipher\n")))
3876 `(("java-cdi-api" ,java-cdi-api)
3877 ("java-javax-inject" ,java-javax-inject)))
3878 (home-page "https://github.com/sonatype/plexus-cipher")
3879 (synopsis "Encryption/decryption Component")
3880 (description "Plexus-cipher contains a component to deal with encryption
3882 (license license:asl2.0)))
3884 (define-public java-plexus-compiler-api
3886 (name "java-plexus-compiler-api")
3890 (uri (string-append "https://github.com/codehaus-plexus/plexus-compiler"
3891 "/archive/plexus-compiler-" version ".tar.gz"))
3894 "09vmxs0807wsd26nbrwwj5l8ycmzazqycj52l7w6wjvkryywi69h"))))
3895 (build-system ant-build-system)
3897 `(#:jar-name "plexus-compiler-api.jar"
3898 #:source-dir "plexus-compiler-api/src/main/java"
3900 #:test-dir "plexus-compiler-api/src/test"))
3902 `(("java-plexus-container-default" ,java-plexus-container-default)
3903 ("java-plexus-util" ,java-plexus-utils)))
3905 `(("java-junit" ,java-junit)))
3906 (home-page "https://github.com/codehaus-plexus/plexus-compiler")
3907 (synopsis "Plexus Compilers component's API to manipulate compilers")
3908 (description "This package contains the API used by components to manipulate
3910 (license (list license:asl2.0
3913 (define-public java-plexus-compiler-javac
3915 (inherit java-plexus-compiler-api)
3916 (name "java-plexus-compiler-javac")
3918 `(#:jar-name "plexus-compiler-javac.jar"
3919 #:source-dir "plexus-compilers/plexus-compiler-javac/src/main/java"
3921 #:tests? #f; depends on compiler-test -> maven-core -> ... -> this package.
3922 #:test-dir "plexus-compilers/plexus-compiler-javac/src/test"))
3924 `(("java-plexus-compiler-api" ,java-plexus-compiler-api)
3925 ("java-plexus-utils" ,java-plexus-utils)
3926 ("java-plexus-container-default" ,java-plexus-container-default)))
3928 `(("java-junit" ,java-junit)))
3929 (synopsis "Javac Compiler support for Plexus Compiler component")
3930 (description "This package contains the Javac Compiler support for Plexus
3931 Compiler component.")))
3933 (define-public java-plexus-sec-dispatcher
3935 (name "java-plexus-sec-dispatcher")
3936 (version "1.4") ;; Newest release listed at the Maven Central Repository.
3938 ;; This project doesn't tag releases or publish tarballs, so we take
3939 ;; the "prepare release plexus-sec-dispatcher-1.4" git commit.
3941 (uri (string-append "https://github.com/sonatype/plexus-sec-dispatcher/"
3942 "archive/7db8f88048.tar.gz"))
3945 "1smfrk4n7xbrsxpxcp2j4i0j8q86j73w0w6xg7qz83dp6dagdjgp"))
3946 (file-name (string-append name "-" version ".tar.gz"))))
3948 `(#:jar-name "plexus-sec-dispatcher.jar"
3949 #:source-dir "src/main/java"
3952 (modify-phases %standard-phases
3953 (add-before 'build 'generate-models
3954 (lambda* (#:key inputs #:allow-other-keys)
3955 (define (modello-single-mode file version mode)
3957 "org.codehaus.modello.ModelloCli"
3958 file mode "src/main/java" version
3960 (let ((file "src/main/mdo/settings-security.mdo"))
3961 (modello-single-mode file "1.0.0" "java")
3962 (modello-single-mode file "1.0.0" "xpp3-reader")
3963 (modello-single-mode file "1.0.0" "xpp3-writer"))
3965 (add-before 'build 'generate-components.xml
3967 (mkdir-p "build/classes/META-INF/plexus")
3968 (with-output-to-file "build/classes/META-INF/plexus/components.xml"
3974 <role>org.sonatype.plexus.components.sec.dispatcher.SecDispatcher</role>\n
3975 <role-hint>default</role-hint>\n
3976 <implementation>org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher</implementation>\n
3977 <description></description>\n
3980 <role>org.sonatype.plexus.components.cipher.PlexusCipher</role>\n
3981 <field-name>_cipher</field-name>\n
3984 <role>org.sonatype.plexus.components.sec.dispatcher.PasswordDecryptor</role>\n
3985 <field-name>_decryptors</field-name>\n
3989 <_configuration-file>~/.settings-security.xml</_configuration-file>\n
3993 </component-set>\n")))
3995 (add-before 'check 'fix-paths
3997 (copy-recursively "src/test/resources" "target")
4000 `(("java-plexus-cipher" ,java-plexus-cipher)))
4002 `(("java-modello-core" ,java-modello-core)
4004 ("java-plexus-container-default" ,java-plexus-container-default)
4005 ("java-plexus-classworlds" ,java-plexus-classworlds)
4006 ("java-plexus-utils" ,java-plexus-utils)
4007 ("java-guava" ,java-guava)
4008 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
4009 ("java-sisu-build-api" ,java-sisu-build-api)
4011 ("java-modellop-plugins-java" ,java-modello-plugins-java)
4012 ("java-modellop-plugins-xml" ,java-modello-plugins-xml)
4013 ("java-modellop-plugins-xpp3" ,java-modello-plugins-xpp3)
4015 ("java-junit" ,java-junit)))
4016 (build-system ant-build-system)
4017 (home-page "https://github.com/sonatype/plexus-sec-dispatcher")
4018 (synopsis "Plexus Security Dispatcher Component")
4019 (description "This package is the Plexus Security Dispatcher Component.
4020 This component decrypts a string passed to it.")
4021 (license license:asl2.0)))
4023 (define-public java-plexus-cli
4025 (name "java-plexus-cli")
4030 (url "https://github.com/sonatype/plexus-cli")
4031 (commit "a776afa6bca84e5107bedb69440329cdb24ed645")))
4032 (file-name (string-append name "-" version))
4035 "0xjrlay605rypv3zd7y24vlwf0039bil3n2cqw54r1ddpysq46vx"))))
4036 (build-system ant-build-system)
4038 `(#:jar-name "plexus-cli.jar"
4039 #:source-dir "src/main/java"
4041 #:test-dir "src/test"))
4043 `(("java-commons-cli" ,java-commons-cli)
4044 ("java-plexus-container-default" ,java-plexus-container-default)
4045 ("java-plexus-classworlds" ,java-plexus-classworlds)))
4047 `(("java-plexus-utils" ,java-plexus-utils)
4048 ("java-junit" ,java-junit)
4049 ("java-guava" ,java-guava)))
4050 (home-page "https://codehaus-plexus.github.io/plexus-cli")
4051 (synopsis "CLI building library for plexus")
4052 (description "This package is a library to help creating CLI around
4053 Plexus components.")
4054 (license license:asl2.0)))
4056 (define-public java-sisu-build-api
4058 (name "java-sisu-build-api")
4062 (uri (string-append "https://github.com/sonatype/sisu-build-api/"
4063 "archive/plexus-build-api-" version ".tar.gz"))
4066 "1c3rrpma3x634xp2rm2p5iskfhzdyc7qfbhjzr70agrl1jwghgy2"))))
4067 (build-system ant-build-system)
4069 `(#:jar-name "sisu-build-api.jar"
4070 #:source-dir "src/main/java"
4072 #:tests? #f; FIXME: how to run the tests?
4074 (modify-phases %standard-phases
4075 (add-before 'build 'copy-resources
4077 (copy-recursively "src/main/resources" "build/classes")
4078 (substitute* (find-files "build/classes")
4079 (("\\$\\{project.version\\}") ,version))
4081 (add-before 'build 'generate-plexus-compontent
4083 (mkdir-p "build/classes/META-INF/plexus")
4084 ;; This file is required for plexus to inject this package.
4085 ;; FIXME: how is it generated?
4086 (with-output-to-file "build/classes/META-INF/plexus/components.xml"
4092 <role>org.sonatype.plexus.build.incremental.BuildContext</role>\n
4093 <role-hint>default</role-hint>\n
4094 <implementation>org.sonatype.plexus.build.incremental.DefaultBuildContext</implementation>\n
4095 <description>Filesystem based non-incremental build context implementation\n
4096 which behaves as if all files were just created.</description>\n
4099 </component-set>\n")))
4102 `(("java-plexus-utils" ,java-plexus-utils)
4103 ("java-plexus-container-default" ,java-plexus-container-default)))
4104 (home-page "https://github.com/sonatype/sisu-build-api/")
4105 (synopsis "Base build API for maven")
4106 (description "This package contains the base build API for maven and
4107 a default implementation of it. This API is about scanning files in a
4108 project and determining what files need to be rebuilt.")
4109 (license license:asl2.0)))
4111 (define-public java-modello-core
4113 (name "java-modello-core")
4117 (uri (string-append "https://github.com/codehaus-plexus/modello"
4118 "/archive/modello-" version ".tar.gz"))
4121 "0l2pvns8pmlrmjm3iknp7gpg3654y1m8qhy55b19sdwdchdcyxfh"))))
4122 (build-system ant-build-system)
4124 `(#:jar-name "modello-core.jar"
4125 #:source-dir "modello-core/src/main/java"
4126 #:test-dir "modello-core/src/test"
4127 #:main-class "org.codehaus.modello.ModelloCli"
4130 (modify-phases %standard-phases
4131 (add-before 'build 'copy-resources
4133 (mkdir-p "build/classes/META-INF/plexus")
4134 (copy-file "modello-core/src/main/resources/META-INF/plexus/components.xml"
4135 "build/classes/META-INF/plexus/components.xml")
4137 (add-before 'check 'fix-tests
4139 (with-directory-excursion "modello-core/src/test/java/org/codehaus"
4140 (substitute* '("modello/core/DefaultModelloCoreTest.java"
4141 "modello/core/io/ModelReaderTest.java")
4142 (("src/test") "modello-core/src/test")))
4145 `(("java-plexus-utils" ,java-plexus-utils)
4146 ("java-plexus-container-default" ,java-plexus-container-default)
4147 ("java-sisu-build-api" ,java-sisu-build-api)))
4149 `(("java-junit" ,java-junit)
4150 ("java-plexus-classworlds" ,java-plexus-classworlds)
4151 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
4152 ("java-guava" ,java-guava)))
4153 (home-page "http://codehaus-plexus.github.io/modello/")
4154 (synopsis "Framework for code generation from a simple model")
4155 (description "Modello is a framework for code generation from a simple model.
4157 Modello generates code from a simple model format: based on a plugin
4158 architecture, various types of code and descriptors can be generated from the
4159 single model, including Java POJOs, XML/JSON/YAML marshallers/unmarshallers,
4160 XSD and documentation.")
4163 ;; Although this package uses only files licensed under expat,
4164 ;; other parts of the source are licensed under different
4165 ;; licenses. We include them to be inherited by other packages.
4167 ;; Some files in modello-plugin-java are licensed under a
4168 ;; 5-clause BSD license.
4169 (license:non-copyleft
4170 (string-append "file:///modello-plugins/modello-plugin-java/"
4171 "src/main/java/org/codehaus/modello/plugin/"
4172 "java/javasource/JNaming.java"))))))
4174 (define-public java-modello-plugins-java
4176 (inherit java-modello-core)
4177 (name "java-modello-plugins-java")
4179 `(#:jar-name "modello-plugins-java.jar"
4180 #:source-dir "modello-plugins/modello-plugin-java/src/main/java"
4181 #:test-dir "modello-plugins/modello-plugin-java/src/test"
4183 #:tests? #f; requires maven-model, which depends on this package
4185 (modify-phases %standard-phases
4186 (add-before 'build 'copy-resources
4188 (mkdir-p "build/classes")
4189 (copy-recursively "modello-plugins/modello-plugin-java/src/main/resources"
4193 `(("java-modello-core" ,java-modello-core)
4194 ,@(package-inputs java-modello-core)))
4195 (synopsis "Modello Java Plugin")
4196 (description "Modello Java Plugin generates Java objects for the model.")))
4198 (define-public java-modello-plugins-xml
4200 (inherit java-modello-core)
4201 (name "java-modello-plugins-xml")
4203 `(#:jar-name "modello-plugins-xml.jar"
4204 #:source-dir "modello-plugins/modello-plugin-xml/src/main/java"
4205 #:test-dir "modello-plugins/modello-plugin-xml/src/test"
4208 (modify-phases %standard-phases
4209 (add-before 'build 'copy-resources
4211 (mkdir-p "build/classes")
4213 "modello-plugins/modello-plugin-xml/src/main/resources"
4216 (add-before 'check 'fix-paths
4218 (with-directory-excursion "modello-plugins/modello-plugin-xml/src/test"
4220 "java/org/codehaus/modello/plugins/xml/XmlModelloPluginTest.java"
4221 (("src/test") "modello-plugins/modello-plugin-xml/src/test")))
4224 `(("java-modello-core" ,java-modello-core)
4225 ("java-modello-plugins-java" ,java-modello-plugins-java)
4226 ,@(package-inputs java-modello-core)))
4227 (synopsis "Modello XML Plugin")
4228 (description "Modello XML Plugin contains shared code for every plugins
4229 working on XML representation of the model.")))
4231 (define-public java-modello-test
4233 (inherit java-modello-core)
4234 (name "java-modello-test")
4236 `(#:jar-name "modello-test.jar"
4237 #:source-dir "modello-test/src/main/java"
4238 #:tests? #f; no tests
4241 `(("java-plexus-utils" ,java-plexus-utils)
4242 ("java-plexus-compiler-api" ,java-plexus-compiler-api)
4243 ("java-plexus-compiler-javac" ,java-plexus-compiler-javac)
4244 ("java-plexus-container-default" ,java-plexus-container-default)))
4245 (synopsis "Modello test package")
4246 (description "The modello test package contains the basis to create
4247 Modello generator unit-tests, including sample models and xml files to test
4248 every feature for every plugin.")))
4250 (define-public java-modello-plugins-xpp3
4252 (inherit java-modello-core)
4253 (name "java-modello-plugins-xpp3")
4255 `(#:jar-name "modello-plugins-xpp3.jar"
4256 #:source-dir "modello-plugins/modello-plugin-xpp3/src/main/java"
4257 #:test-dir "modello-plugins/modello-plugin-xpp3/src/test"
4258 ;; One of the test dependencies is maven-model which depends on this package.
4262 (modify-phases %standard-phases
4263 (add-before 'build 'copy-resources
4265 (mkdir-p "build/classes")
4266 (copy-recursively "modello-plugins/modello-plugin-xpp3/src/main/resources"
4270 `(("java-modello-core" ,java-modello-core)
4271 ("java-modello-plugins-java" ,java-modello-plugins-java)
4272 ("java-modello-plugins-xml" ,java-modello-plugins-xml)
4273 ,@(package-inputs java-modello-core)))
4275 `(("java-xmlunit" ,java-xmlunit)
4276 ("java-modello-test" ,java-modello-test)
4277 ,@(package-native-inputs java-modello-core)))
4278 (synopsis "Modello XPP3 Plugin")
4279 (description "The modello XPP3 plugin generates XML readers and writers based
4280 on the XPP3 API (XML Pull Parser).")))
4282 (define-public java-asm
4288 (uri (string-append "http://download.forge.ow2.org/asm/"
4289 "asm-" version ".tar.gz"))
4292 "115l5pqblirdkmzi32dxx7gbcm4jy0s14y5wircr6h8jdr9aix00"))))
4293 (build-system ant-build-system)
4295 `(("java-aqute-bndlib" ,java-aqute-bndlib)
4296 ("java-aqute-libg" ,java-aqute-libg)))
4298 `(#:build-target "compile"
4299 ;; The tests require an old version of Janino, which no longer compiles
4304 ;; We don't need these extra ant tasks, but the build system asks us to
4305 ;; provide a path anyway.
4306 "-Dobjectweb.ant.tasks.path=dummy-path"
4307 ;; The java-aqute.bndlib JAR file will be put onto the classpath and
4308 ;; used during the build automatically by ant-build-system, but
4309 ;; java-asm's build.xml fails unless we provide something here.
4310 "-Dbiz.aQute.bnd.path=dummy-path")
4312 (modify-phases %standard-phases
4313 (add-before 'install 'build-jars
4314 (lambda* (#:key make-flags #:allow-other-keys)
4315 ;; We cannot use the "jar" target because it depends on a couple
4316 ;; of unpackaged, complicated tools.
4319 "-cf" (string-append "dist/asm-" ,version ".jar")
4320 "-C" "output/build/tmp" ".")))
4322 (install-jars "dist")))))
4324 `(("java-junit" ,java-junit)))
4325 (home-page "https://asm.ow2.io/")
4326 (synopsis "Very small and fast Java bytecode manipulation framework")
4327 (description "ASM is an all purpose Java bytecode manipulation and
4328 analysis framework. It can be used to modify existing classes or dynamically
4329 generate classes, directly in binary form. The provided common
4330 transformations and analysis algorithms allow to easily assemble custom
4331 complex transformations and code analysis tools.")
4332 (license license:bsd-3)))
4334 (define java-asm-bootstrap
4337 (name "java-asm-bootstrap")
4339 (substitute-keyword-arguments (package-arguments java-asm)
4343 `(("java-aqute-bndlib" ,java-aqute-bndlib-bootstrap)
4344 ("java-aqute-libg" ,java-aqute-libg-bootstrap)
4345 ,@(delete `("java-aqute-bndlib" ,java-aqute-bndlib)
4346 (delete `("java-aqute-libg" ,java-aqute-libg)
4347 (package-inputs java-asm)))))))
4349 (define-public java-cglib
4357 (url "https://github.com/cglib/cglib.git")
4358 (commit (string-append
4360 (string-map (lambda (c) (if (char=? c #\.) #\_ c))
4362 (file-name (git-file-name name version))
4364 (base32 "186451jms2zfp47yd8kxd77az2cqal1my2br7klgyp8fpl4qfg8v"))))
4365 (build-system ant-build-system)
4367 `(;; FIXME: tests fail because junit runs
4368 ;; "net.sf.cglib.transform.AbstractTransformTest", which does not seem
4369 ;; to describe a test at all.
4371 #:jar-name "cglib.jar"
4373 (modify-phases %standard-phases
4374 (add-after 'unpack 'chdir
4375 (lambda _ (chdir "cglib") #t)))))
4377 `(("java-asm" ,java-asm)
4378 ("java-junit" ,java-junit)))
4379 (home-page "https://github.com/cglib/cglib/")
4380 (synopsis "Java byte code generation library")
4381 (description "The byte code generation library CGLIB is a high level API
4382 to generate and transform Java byte code.")
4383 (license license:asl2.0)))
4385 (define-public java-objenesis
4387 (name "java-objenesis")
4391 (uri (string-append "https://github.com/easymock/objenesis/"
4392 "archive/" version ".tar.gz"))
4393 (file-name (string-append "objenesis-" version ".tar.gz"))
4396 "1va5qz1i2wawwavhnxfzxnfgrcaflz9p1pg03irrjh4nd3rz8wh6"))))
4397 (build-system ant-build-system)
4399 `(#:jar-name "objenesis.jar"
4400 #:source-dir "main/src/"
4401 #:test-dir "main/src/test/"))
4403 `(("java-junit" ,java-junit)
4404 ("java-hamcrest-core" ,java-hamcrest-core)))
4405 (home-page "http://objenesis.org/")
4406 (synopsis "Bypass the constructor when creating an object")
4407 (description "Objenesis is a small Java library that serves one purpose:
4408 to instantiate a new object of a particular class. It is common to see
4409 restrictions in libraries stating that classes must require a default
4410 constructor. Objenesis aims to overcome these restrictions by bypassing the
4411 constructor on object instantiation.")
4412 (license license:asl2.0)))
4414 (define-public java-easymock
4416 (name "java-easymock")
4420 (uri (string-append "https://github.com/easymock/easymock/"
4421 "archive/easymock-" version ".tar.gz"))
4424 "1yzg0kv256ndr57gpav46cyv4a1ns5sj722l50zpxk3j6sk9hnmi"))))
4425 (build-system ant-build-system)
4427 `(#:jar-name "easymock.jar"
4428 #:source-dir "core/src/main"
4429 #:test-dir "core/src/test"
4431 (modify-phases %standard-phases
4432 ;; FIXME: Android support requires the following packages to be
4433 ;; available: com.google.dexmaker.stock.ProxyBuilder
4434 (add-after 'unpack 'delete-android-support
4436 (with-directory-excursion "core/src/main/java/org/easymock/internal"
4437 (substitute* "MocksControl.java"
4438 (("AndroidSupport.isAndroid\\(\\)") "false")
4439 (("return classProxyFactory = new AndroidClassProxyFactory\\(\\);") ""))
4440 (delete-file "AndroidClassProxyFactory.java"))
4442 (add-after 'unpack 'delete-broken-tests
4444 (with-directory-excursion "core/src/test/java/org/easymock"
4445 ;; This test depends on dexmaker.
4446 (delete-file "tests2/ClassExtensionHelperTest.java")
4448 ;; This is not a test.
4449 (delete-file "tests/BaseEasyMockRunnerTest.java")
4451 ;; This test should be executed with a different runner...
4452 (delete-file "tests2/EasyMockAnnotationsTest.java")
4453 ;; ...but deleting it means that we also have to delete these
4455 (delete-file "tests2/EasyMockRunnerTest.java")
4456 (delete-file "tests2/EasyMockRuleTest.java")
4458 ;; This test fails because the file "easymock.properties" does
4460 (delete-file "tests2/EasyMockPropertiesTest.java"))
4463 `(("java-asm" ,java-asm)
4464 ("java-cglib" ,java-cglib)
4465 ("java-objenesis" ,java-objenesis)))
4467 `(("java-junit" ,java-junit)
4468 ("java-hamcrest-core" ,java-hamcrest-core)))
4469 (home-page "http://easymock.org")
4470 (synopsis "Java library providing mock objects for unit tests")
4471 (description "EasyMock is a Java library that provides an easy way to use
4472 mock objects in unit testing.")
4473 (license license:asl2.0)))
4475 (define-public java-jmock-1
4481 (uri (string-append "https://github.com/jmock-developers/"
4482 "jmock-library/archive/" version ".tar.gz"))
4483 (file-name (string-append "jmock-" version ".tar.gz"))
4486 "0xmrlhq0fszldkbv281k9463mv496143vvmqwpxp62yzjvdkx9w0"))))
4487 (build-system ant-build-system)
4489 `(#:build-target "jars"
4490 #:test-target "run.tests"
4492 (modify-phases %standard-phases
4493 (replace 'install (install-jars "build")))))
4494 (home-page "http://www.jmock.org")
4495 (synopsis "Mock object library for test-driven development")
4496 (description "JMock is a library that supports test-driven development of
4497 Java code with mock objects. Mock objects help you design and test the
4498 interactions between the objects in your programs.
4503 @item makes it quick and easy to define mock objects
4504 @item lets you precisely specify the interactions between
4505 your objects, reducing the brittleness of your tests
4506 @item plugs into your favourite test framework
4507 @item is easy to extend.
4509 (license license:bsd-3)))
4511 (define-public java-jmock
4513 (inherit java-jmock-1)
4518 (uri (string-append "https://github.com/jmock-developers/"
4519 "jmock-library/archive/" version ".tar.gz"))
4520 (file-name (string-append name "-" version ".tar.gz"))
4523 "18650a9g8xffcsdb6w91pbswa7f40fp2sh6s3nclkclz5dbzq8f0"))))
4525 `(("java-hamcrest-all" ,java-hamcrest-all)
4526 ("java-asm" ,java-asm)
4527 ("java-bsh" ,java-bsh)
4528 ("java-junit" ,java-junit)))
4530 `(("cglib" ,java-cglib)))
4532 `(#:jar-name "java-jmock.jar"
4533 #:source-dir "jmock/src/main/java"
4534 #:test-dir "jmock/src/test"))))
4536 (define-public java-jmock-junit4
4538 (inherit java-jmock)
4539 (name "java-jmock-junit4")
4541 `(#:jar-name "java-jmock-junit4.jar"
4542 #:source-dir "jmock-junit4/src/main/java"
4543 #:test-dir "jmock-junit4/src/test"))
4545 `(("java-hamcrest-all" ,java-hamcrest-all)
4546 ("java-asm" ,java-asm)
4547 ("java-bsh" ,java-bsh)
4548 ("java-jmock" ,java-jmock)
4549 ("java-jumit" ,java-junit)))))
4551 (define-public java-jmock-legacy
4553 (inherit java-jmock)
4554 (name "java-jmock-legacy")
4556 `(#:jar-name "java-jmock-legacy.jar"
4557 #:source-dir "jmock-legacy/src/main/java"
4558 #:test-dir "jmock-legacy/src/test"
4560 (modify-phases %standard-phases
4561 (add-before 'check 'copy-tests
4563 ;; This file is a dependancy of some tests
4564 (let ((file "org/jmock/test/acceptance/PackageProtectedType.java"))
4565 (copy-file (string-append "jmock/src/test/java/" file)
4566 (string-append "jmock-legacy/src/test/java/" file))
4569 `(("java-hamcrest-all" ,java-hamcrest-all)
4570 ("java-objenesis" ,java-objenesis)
4571 ("java-cglib" ,java-cglib)
4572 ("java-jmock" ,java-jmock)
4573 ("java-asm" ,java-asm)
4574 ("java-bsh" ,java-bsh)
4575 ("java-junit" ,java-junit)))
4577 `(("java-jmock-junit4" ,java-jmock-junit4)))))
4579 (define-public java-hamcrest-all
4580 (package (inherit java-hamcrest-core)
4581 (name "java-hamcrest-all")
4584 ,@(substitute-keyword-arguments (package-arguments java-hamcrest-core)
4585 ((#:build-target _) "bigjar")
4587 `(modify-phases ,phases
4588 ;; Some build targets override the classpath, so we need to patch
4589 ;; the build.xml to ensure that required dependencies are on the
4591 (add-after 'unpack 'patch-classpath-for-integration
4592 (lambda* (#:key inputs #:allow-other-keys)
4593 (substitute* "build.xml"
4594 ((" build/hamcrest-library-\\$\\{version\\}.jar" line)
4598 (find-files (assoc-ref inputs "java-junit") "\\.jar$")
4599 (find-files (assoc-ref inputs "java-jmock") "\\.jar$")
4600 (find-files (assoc-ref inputs "java-easymock") "\\.jar$")))
4602 (("build/hamcrest-core-\\$\\{version\\}\\.jar")
4603 (string-append (assoc-ref inputs "java-hamcrest-core")
4604 "/share/java/hamcrest-core.jar")))
4607 `(("java-junit" ,java-junit)
4608 ("java-jmock" ,java-jmock-1)
4609 ;; This is necessary because of what seems to be a race condition.
4610 ;; This package would sometimes fail to build because hamcrest-core.jar
4611 ;; could not be found, even though it is built as part of this package.
4612 ;; Adding java-hamcrest-core appears to fix this problem. See
4613 ;; https://debbugs.gnu.org/31390 for more information.
4614 ("java-hamcrest-core" ,java-hamcrest-core)
4615 ("java-easymock" ,java-easymock)
4616 ,@(package-inputs java-hamcrest-core)))))
4618 (define-public java-jopt-simple
4620 (name "java-jopt-simple")
4624 (uri (string-append "http://repo1.maven.org/maven2/"
4625 "net/sf/jopt-simple/jopt-simple/"
4626 version "/jopt-simple-"
4627 version "-sources.jar"))
4630 "1v8bzmwmw6qq20gm42xyay6vrd567dra4vqwhgjnqqjz1gs9f8qa"))))
4631 (build-system ant-build-system)
4633 `(#:tests? #f ; there are no tests
4634 #:jar-name "jopt-simple.jar"))
4635 (home-page "https://pholser.github.io/jopt-simple/")
4636 (synopsis "Java library for parsing command line options")
4637 (description "JOpt Simple is a Java library for parsing command line
4638 options, such as those you might pass to an invocation of @code{javac}. In
4639 the interest of striving for simplicity, as closely as possible JOpt Simple
4640 attempts to honor the command line option syntaxes of POSIX @code{getopt} and
4641 GNU @code{getopt_long}. It also aims to make option parser configuration and
4642 retrieval of options and their arguments simple and expressive, without being
4644 (license license:expat)))
4646 (define-public java-commons-math3
4648 (name "java-commons-math3")
4652 (uri (string-append "mirror://apache/commons/math/source/"
4653 "commons-math3-" version "-src.tar.gz"))
4656 "19l6yp44qc5g7wg816nbn5z3zq3xxzwimvbm4a8pczgvpi4i85s6"))))
4657 (build-system ant-build-system)
4659 `(#:build-target "jar"
4660 #:test-target "test"
4662 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
4663 (junit (assoc-ref %build-inputs "java-junit")))
4664 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
4665 (string-append "-Dhamcrest.jar=" hamcrest
4666 "/share/java/hamcrest-core.jar")))
4668 (modify-phases %standard-phases
4669 ;; We want to build the jar in the build phase and run the tests
4670 ;; later in a separate phase.
4671 (add-after 'unpack 'untangle-targets
4673 (substitute* "build.xml"
4674 (("name=\"jar\" depends=\"test\"")
4675 "name=\"jar\" depends=\"compile\""))
4677 ;; There is no install target.
4679 (install-jars "target")))))
4681 `(("java-junit" ,java-junit)
4682 ("java-hamcrest-core" ,java-hamcrest-core)))
4683 (home-page "https://commons.apache.org/math/")
4684 (synopsis "Apache Commons mathematics library")
4685 (description "Commons Math is a library of lightweight, self-contained
4686 mathematics and statistics components addressing the most common problems not
4687 available in the Java programming language or Commons Lang.")
4688 (license license:asl2.0)))
4690 (define-public java-jmh
4697 (url "http://hg.openjdk.java.net/code-tools/jmh/")
4698 (changeset version)))
4699 (file-name (string-append name "-" version "-checkout"))
4702 "1fxyxhg9famwcg1prc4cgwb5wzyxqavn3cjm5vz8605xz7x5k084"))))
4703 (build-system ant-build-system)
4705 `(#:jar-name "jmh-core.jar"
4706 #:source-dir "jmh-core/src/main"
4707 #:test-dir "jmh-core/src/test"
4709 (modify-phases %standard-phases
4710 ;; This seems to be a bug in the JDK. It may not be necessary in
4711 ;; future versions of the JDK.
4712 (add-after 'unpack 'fix-bug
4714 (with-directory-excursion
4715 "jmh-core/src/main/java/org/openjdk/jmh/runner/options"
4716 (substitute* '("IntegerValueConverter.java"
4717 "ThreadsValueConverter.java")
4718 (("public Class<Integer> valueType")
4719 "public Class<? extends Integer> valueType")))
4722 `(("java-jopt-simple" ,java-jopt-simple)
4723 ("java-commons-math3" ,java-commons-math3)))
4725 `(("java-junit" ,java-junit)
4726 ("java-hamcrest-core" ,java-hamcrest-core)))
4727 (home-page "http://openjdk.java.net/projects/code-tools/jmh/")
4728 (synopsis "Benchmark harness for the JVM")
4729 (description "JMH is a Java harness for building, running, and analysing
4730 nano/micro/milli/macro benchmarks written in Java and other languages
4731 targeting the JVM.")
4733 (license license:gpl2)))
4735 (define-public java-commons-collections4
4737 (name "java-commons-collections4")
4741 (uri (string-append "mirror://apache/commons/collections/source/"
4742 "commons-collections4-" version "-src.tar.gz"))
4745 "1krfhvggympq4avk7gh6qafzf6b9ip6r1m4lmacikyx04039m0wl"))))
4746 (build-system ant-build-system)
4748 `(#:test-target "test"
4750 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
4751 (junit (assoc-ref %build-inputs "java-junit"))
4752 (easymock (assoc-ref %build-inputs "java-easymock")))
4753 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
4754 (string-append "-Dhamcrest.jar=" hamcrest
4755 "/share/java/hamcrest-core.jar")
4756 (string-append "-Deasymock.jar=" easymock
4757 "/share/java/easymock.jar")))
4759 (modify-phases %standard-phases
4761 (install-jars "target")))))
4763 `(("java-junit" ,java-junit)
4764 ("java-hamcrest-core" ,java-hamcrest-core)
4765 ("java-easymock" ,java-easymock)))
4766 (home-page "https://commons.apache.org/collections/")
4767 (synopsis "Collections framework")
4768 (description "The Java Collections Framework is the recognised standard
4769 for collection handling in Java. Commons-Collections seek to build upon the
4770 JDK classes by providing new interfaces, implementations and utilities. There
4771 are many features, including:
4774 @item @code{Bag} interface for collections that have a number of copies of
4776 @item @code{BidiMap} interface for maps that can be looked up from value to
4777 key as well and key to value
4778 @item @code{MapIterator} interface to provide simple and quick iteration over
4780 @item Transforming decorators that alter each object as it is added to the
4782 @item Composite collections that make multiple collections look like one
4783 @item Ordered maps and sets that retain the order elements are added in,
4784 including an LRU based map
4785 @item Reference map that allows keys and/or values to be garbage collected
4787 @item Many comparator implementations
4788 @item Many iterator implementations
4789 @item Adapter classes from array and enumerations to collections
4790 @item Utilities to test or create typical set-theory properties of collections
4791 such as union, intersection, and closure.
4793 (license license:asl2.0)))
4795 (define-public java-commons-collections
4797 (inherit java-commons-collections4)
4798 (name "java-commons-collections")
4802 (uri (string-append "mirror://apache/commons/collections/source/"
4803 "commons-collections-" version "-src.tar.gz"))
4806 "055r51a5lfc3z7rkxnxmnn1npvkvda7636hjpm4qk7cnfzz98387"))
4808 (search-patches "java-commons-collections-fix-java8.patch"))))
4810 (substitute-keyword-arguments (package-arguments java-commons-collections4)
4812 `(modify-phases ,phases
4813 ;; The manifest is required by the build procedure
4814 (add-before 'build 'add-manifest
4816 (mkdir-p "build/conf")
4817 (call-with-output-file "build/conf/MANIFEST.MF"
4819 (format file "Manifest-Version: 1.0\n")))
4822 (install-jars "build"))))))))
4824 (define java-commons-collections-test-classes
4826 (inherit java-commons-collections)
4828 `(#:jar-name "commons-collections-test-classes.jar"
4829 #:source-dir "src/test"
4832 `(("collection" ,java-commons-collections)))))
4834 (define-public java-commons-beanutils
4836 (name "java-commons-beanutils")
4840 (uri (string-append "mirror://apache/commons/beanutils/source/"
4841 "commons-beanutils-" version "-src.tar.gz"))
4844 "03cs0bq3sl1sdc7py9g3qnf8n9h473nrkvd3d251kaqv6a2ab7qk"))))
4845 (build-system ant-build-system)
4847 `(#:test-target "test"
4850 (modify-phases %standard-phases
4852 (lambda* (#:key outputs #:allow-other-keys)
4853 (rename-file (string-append "dist/commons-beanutils-" ,version
4855 "commons-beanutils.jar")
4856 (install-file "commons-beanutils.jar"
4857 (string-append (assoc-ref outputs "out") "/share/java/"))
4860 `(("logging" ,java-commons-logging-minimal)
4861 ("collections" ,java-commons-collections)))
4863 `(("junit" ,java-junit)
4864 ("collections-test" ,java-commons-collections-test-classes)))
4865 (home-page "https://commons.apache.org/beanutils/")
4866 (synopsis "Dynamically set or get properties in Java")
4867 (description "BeanUtils provides a simplified interface to reflection and
4868 introspection to set or get dynamically determined properties through their
4869 setter and getter method.")
4870 (license license:asl2.0)))
4872 (define-public java-commons-io
4874 (name "java-commons-io")
4879 (uri (string-append "mirror://apache/commons/io/source/"
4880 "commons-io-" version "-src.tar.gz"))
4883 "0q5y41jrcjvx9hzs47x5kdhnasdy6rm4bzqd2jxl02w717m7a7v3"))))
4884 (build-system ant-build-system)
4885 (outputs '("out" "doc"))
4887 `(#:test-target "test"
4889 (list (string-append "-Djunit.jar="
4890 (assoc-ref %build-inputs "java-junit")
4891 "/share/java/junit.jar"))
4893 (modify-phases %standard-phases
4894 (add-after 'build 'build-javadoc ant-build-javadoc)
4895 (replace 'install (install-jars "target"))
4896 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
4898 `(("java-junit" ,java-junit)
4899 ("java-hamcrest-core" ,java-hamcrest-core)))
4900 (home-page "https://commons.apache.org/io/")
4901 (synopsis "Common useful IO related classes")
4902 (description "Commons-IO contains utility classes, stream implementations,
4903 file filters and endian classes.")
4904 (license license:asl2.0)))
4906 (define-public java-commons-exec-1.1
4908 (name "java-commons-exec")
4913 (uri (string-append "mirror://apache/commons/exec/source/"
4914 "commons-exec-" version "-src.tar.gz"))
4917 "025dk8xgj10lxwwwqp0hng2rn7fr4vcirxzydqzx9k4dim667alk"))))
4918 (build-system ant-build-system)
4920 `(#:test-target "test"
4922 (list (string-append "-Dmaven.junit.jar="
4923 (assoc-ref %build-inputs "java-junit")
4924 "/share/java/junit.jar"))
4926 (modify-phases %standard-phases
4927 (add-before 'build 'delete-network-tests
4929 (delete-file "src/test/java/org/apache/commons/exec/DefaultExecutorTest.java")
4930 (substitute* "src/test/java/org/apache/commons/exec/TestRunner.java"
4931 (("suite\\.addTestSuite\\(DefaultExecutorTest\\.class\\);") ""))
4933 ;; The "build" phase automatically tests.
4935 (replace 'install (install-jars "target")))))
4937 `(("java-junit" ,java-junit)))
4938 (home-page "https://commons.apache.org/proper/commons-exec/")
4939 (synopsis "Common program execution related classes")
4940 (description "Commons-Exec simplifies executing external processes.")
4941 (license license:asl2.0)))
4943 (define-public java-commons-exec
4945 (inherit java-commons-exec-1.1)
4950 (uri (string-append "mirror://apache/commons/exec/source/"
4951 "commons-exec-" version "-src.tar.gz"))
4954 "17yb4h6f8l49c5iyyvda4z2nmw0bxrx857nrwmsr7mmpb7x441yv"))))
4956 `(#:test-target "test"
4958 (list (string-append "-Dmaven.junit.jar="
4959 (assoc-ref %build-inputs "java-junit")
4960 "/share/java/junit.jar")
4961 "-Dmaven.compiler.source=1.7"
4962 "-Dmaven.compiler.target=1.7")
4964 (modify-phases %standard-phases
4965 (add-before 'build 'delete-network-tests
4966 (lambda* (#:key inputs #:allow-other-keys)
4967 ;; This test hangs indefinitely.
4968 (delete-file "src/test/java/org/apache/commons/exec/issues/Exec60Test.java")
4969 (substitute* "src/test/java/org/apache/commons/exec/issues/Exec41Test.java"
4970 (("ping -c 10 127.0.0.1") "sleep 10"))
4971 (substitute* "src/test/java/org/apache/commons/exec/issues/Exec49Test.java"
4973 (call-with-output-file "src/test/scripts/ping.sh"
4975 (format port "#!~a/bin/sh\nsleep $1\n"
4976 (assoc-ref inputs "bash"))))
4978 ;; The "build" phase automatically tests.
4980 (replace 'install (install-jars "target")))))
4982 `(("java-junit" ,java-junit)
4983 ("java-hamcrest-core" ,java-hamcrest-core)))))
4985 (define-public java-commons-lang
4987 (name "java-commons-lang")
4992 (uri (string-append "mirror://apache/commons/lang/source/"
4993 "commons-lang-" version "-src.tar.gz"))
4995 (base32 "1mxwagqadzx1b2al7i0z1v0r235aj2njdyijf02szq0vhmqrfiq5"))))
4996 (build-system ant-build-system)
4997 (outputs '("out" "doc"))
4999 `(#:test-target "test"
5000 #:test-exclude (list "**/Abstract*.java" "**/Random*.java")
5002 (modify-phases %standard-phases
5003 (add-after 'build 'build-javadoc ant-build-javadoc)
5004 (add-before 'check 'disable-failing-test
5006 ;; Disable a failing test
5007 (substitute* "src/test/java/org/apache/commons/lang/\
5008 time/FastDateFormatTest.java"
5009 (("public void testFormat\\(\\)")
5010 "public void disabled_testFormat()"))
5012 (replace 'install (install-jars "target"))
5013 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
5015 `(("java-junit" ,java-junit)))
5016 (home-page "https://commons.apache.org/lang/")
5017 (synopsis "Extension of the java.lang package")
5018 (description "The Commons Lang components contains a set of Java classes
5019 that provide helper methods for standard Java classes, especially those found
5020 in the @code{java.lang} package in the Sun JDK. The following classes are
5024 @item StringUtils - Helper for @code{java.lang.String}.
5025 @item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets
5026 of characters such as @code{[a-z]} and @code{[abcdez]}.
5027 @item RandomStringUtils - Helper for creating randomised strings.
5028 @item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
5029 @item NumberRange - A range of numbers with an upper and lower bound.
5030 @item ObjectUtils - Helper for @code{java.lang.Object}.
5031 @item SerializationUtils - Helper for serializing objects.
5032 @item SystemUtils - Utility class defining the Java system properties.
5033 @item NestedException package - A sub-package for the creation of nested
5035 @item Enum package - A sub-package for the creation of enumerated types.
5036 @item Builder package - A sub-package for the creation of @code{equals},
5037 @code{hashCode}, @code{compareTo} and @code{toString} methods.
5039 (license license:asl2.0)))
5041 (define-public java-commons-lang3
5043 (name "java-commons-lang3")
5048 (uri (string-append "mirror://apache/commons/lang/source/"
5049 "commons-lang3-" version "-src.tar.gz"))
5051 (base32 "0xpshb9spjhplq5a7mr0y1bgfw8190ik4xj8f569xidfcki1d6kg"))))
5052 (build-system ant-build-system)
5053 (outputs '("out" "doc"))
5055 `(#:test-target "test"
5057 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-all"))
5058 (junit (assoc-ref %build-inputs "java-junit"))
5059 (easymock (assoc-ref %build-inputs "java-easymock"))
5060 (io (assoc-ref %build-inputs "java-commons-io")))
5061 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
5062 (string-append "-Dhamcrest.jar=" hamcrest
5063 "/share/java/hamcrest-all.jar")
5064 (string-append "-Dcommons-io.jar=" io
5065 "/share/java/commons-io-"
5066 ,(package-version java-commons-io)
5068 (string-append "-Deasymock.jar=" easymock
5069 "/share/java/easymock.jar")))
5071 (modify-phases %standard-phases
5072 (add-after 'build 'build-javadoc ant-build-javadoc)
5073 (replace 'install (install-jars "target"))
5074 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
5076 `(("java-junit" ,java-junit)
5077 ("java-commons-io" ,java-commons-io)
5078 ("java-hamcrest-all" ,java-hamcrest-all)
5079 ("java-easymock" ,java-easymock)))
5080 (home-page "https://commons.apache.org/lang/")
5081 (synopsis "Extension of the java.lang package")
5082 (description "The Commons Lang components contains a set of Java classes
5083 that provide helper methods for standard Java classes, especially those found
5084 in the @code{java.lang} package. The following classes are included:
5087 @item StringUtils - Helper for @code{java.lang.String}.
5088 @item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets of
5089 characters such as @code{[a-z]} and @code{[abcdez]}.
5090 @item RandomStringUtils - Helper for creating randomised strings.
5091 @item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
5092 @item NumberRange - A range of numbers with an upper and lower bound.
5093 @item ObjectUtils - Helper for @code{java.lang.Object}.
5094 @item SerializationUtils - Helper for serializing objects.
5095 @item SystemUtils - Utility class defining the Java system properties.
5096 @item NestedException package - A sub-package for the creation of nested
5098 @item Enum package - A sub-package for the creation of enumerated types.
5099 @item Builder package - A sub-package for the creation of @code{equals},
5100 @code{hashCode}, @code{compareTo} and @code{toString} methods.
5102 (license license:asl2.0)))
5104 (define-public java-commons-bsf
5106 (name "java-commons-bsf")
5110 (uri (string-append "mirror://apache/commons/bsf/source/bsf-src-"
5114 "1sbamr8jl32p1jgf59nw0b2w9qivyg145954hm6ly54cfgsqrdas"))
5115 (modules '((guix build utils)))
5118 (for-each delete-file
5119 (find-files "." "\\.jar$"))
5121 (build-system ant-build-system)
5123 `(#:build-target "jar"
5124 #:tests? #f; No test file
5125 #:modules ((guix build ant-build-system)
5127 (guix build java-utils)
5130 (modify-phases %standard-phases
5131 (add-before 'build 'create-properties
5133 ;; This file is missing from the distribution
5134 (call-with-output-file "build-properties.xml"
5137 `(project (@ (basedir ".") (name "build-properties") (default ""))
5138 (property (@ (name "project.name") (value "bsf")))
5139 (property (@ (name "source.level") (value "1.5")))
5140 (property (@ (name "build.lib") (value "build/jar")))
5141 (property (@ (name "src.dir") (value "src")))
5142 (property (@ (name "tests.dir") (value "src/org/apache/bsf/test")))
5143 (property (@ (name "build.tests") (value "build/test-classes")))
5144 (property (@ (name "build.dest") (value "build/classes"))))
5147 (replace 'install (install-jars "build")))))
5149 `(("java-junit" ,java-junit)))
5151 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)))
5152 (home-page "https://commons.apache.org/proper/commons-bsf")
5153 (synopsis "Bean Scripting Framework")
5154 (description "The Bean Scripting Framework (BSF) is a set of Java classes
5155 which provides scripting language support within Java applications, and access
5156 to Java objects and methods from scripting languages. BSF allows one to write
5157 JSPs in languages other than Java while providing access to the Java class
5158 library. In addition, BSF permits any Java application to be implemented in
5159 part (or dynamically extended) by a language that is embedded within it. This
5160 is achieved by providing an API that permits calling scripting language engines
5161 from within Java, as well as an object registry that exposes Java objects to
5162 these scripting language engines.")
5163 (license license:asl2.0)))
5165 (define-public java-commons-jxpath
5167 (name "java-commons-jxpath")
5171 (uri (string-append "mirror://apache/commons/jxpath/source/"
5172 "commons-jxpath-" version "-src.tar.gz"))
5175 "1rpgg31ayn9fwr4bfi2i1ij0npcg79ad2fv0w9hacvawsyc42cfs"))))
5176 (build-system ant-build-system)
5178 `(#:jar-name "commons-jxpath.jar"
5179 ;; tests require more dependencies, including mockrunner which depends on old software
5181 #:source-dir "src/java"))
5183 `(("servlet" ,java-classpathx-servletapi)
5184 ("java-jdom" ,java-jdom)
5185 ("java-commons-beanutils" ,java-commons-beanutils)))
5187 `(("java-junit" ,java-junit)))
5188 (home-page "https://commons.apache.org/jxpath/")
5189 (synopsis "Simple interpreter of an expression language called XPath.")
5190 (description "The org.apache.commons.jxpath package defines a simple
5191 interpreter of an expression language called XPath. JXPath applies XPath
5192 expressions to graphs of objects of all kinds: JavaBeans, Maps, Servlet
5193 contexts, DOM etc, including mixtures thereof.")
5194 (license license:asl2.0)))
5196 (define-public java-commons-pool
5198 (name "java-commons-pool")
5202 (uri (string-append "mirror://apache/commons/pool/source/"
5203 "commons-pool2-" version "-src.tar.gz"))
5206 "1fi1hgqmq01bs6azbj3sfswxzadp2r8sjjfiq6ryilz1m50kvrv6"))))
5208 `(#:jar-name "common-pool.jar"
5209 #:source-dir "src/main/java"
5211 (list "**/PerformanceTest.java")))
5212 (build-system ant-build-system)
5214 `(("java-cglib" ,java-cglib)))
5216 `(("java-junit" ,java-junit)
5217 ("java-hamcrest-core" ,java-hamcrest-core)
5218 ("java-asm" ,java-asm)
5219 ("java-objenesis" ,java-objenesis)))
5220 (home-page "https://commons.apache.org/proper/commons-pool/")
5221 (synopsis "Object-pooling API in Java")
5222 (description "The commons-pool package provides an object-pooling API
5223 and a number of object pool implementations. This package defines a
5224 handful of pooling interfaces and some base classes that may be useful when
5225 creating new pool implementations.")
5226 (license license:asl2.0)))
5228 (define-public java-commons-dbcp
5230 (name "java-commons-dbcp")
5234 (uri (string-append "mirror://apache/commons/dbcp/source/"
5235 "commons-dbcp2-" version "-src.tar.gz"))
5238 "0axbvcbnf2l70fc3ybrlp3siw2w4ka9mia2pnx4py8gz54cpw3rc"))))
5240 `(#:source-dir "src/main/java"
5241 #:jar-name "java-commons-dbcp.jar"
5242 #:tests? #f)); requires apache-geronimo
5244 `(("java-commons-pool" ,java-commons-pool)
5245 ("java-commons-logging" ,java-commons-logging-minimal)
5246 ("java-jboss-transaction-api-spec" ,java-jboss-transaction-api-spec)))
5248 `(("java-junit" ,java-junit)))
5249 (build-system ant-build-system)
5250 (home-page "https://commons.apache.org/proper/commons-dbcp/")
5251 (synopsis "Database Connection Pool for Java")
5252 (description "Commons-dbcp allows you to share a pool of database
5253 connections between users. Creating a new connection for each user can be
5254 time consuming and even unfeasible when the number of simultaneous users is
5255 very large. This package provides a way to share a poole of connections to
5257 (license license:asl2.0)))
5259 (define-public java-commons-jcs
5261 (name "java-commons-jcs")
5265 (uri (string-append "mirror://apache/commons/jcs/source/"
5266 "commons-jcs-dist-" version "-src.tar.gz"))
5269 "0syhq2npjbrl0azqfjm0gvash1qd5qjy4qmysxcrqjsk0nf9fa1q"))))
5270 (build-system ant-build-system)
5272 `(#:jar-name "commons-jcs.jar"
5273 #:source-dir "commons-jcs-core/src/main/java"
5274 #:test-dir "commons-jcs-core/src/test"
5275 #:tests? #f; requires hsqldb
5277 (modify-phases %standard-phases
5278 (add-before 'build 'prepare
5280 (with-directory-excursion
5281 "commons-jcs-core/src/main/java/org/apache/commons/jcs"
5283 "auxiliary/disk/jdbc/dsfactory/SharedPoolDataSourceFactory.java"
5284 (("commons.dbcp") "commons.dbcp2")
5285 ((".*\\.setMaxActive.*") ""))
5286 ;;; Remove dependency on velocity-tools
5287 (delete-file "admin/servlet/JCSAdminServlet.java"))
5290 `(("java-classpathx-servletapi" ,java-classpathx-servletapi)
5291 ("java-commons-logging-minimal" ,java-commons-logging-minimal)
5292 ("java-commons-httpclient" ,java-commons-httpclient)
5293 ("java-commons-dbcp" ,java-commons-dbcp)))
5295 `(("java-junit" ,java-junit)))
5296 (home-page "https://commons.apache.org/proper/commons-jcs/")
5297 (synopsis "Distributed caching system in Java")
5298 (description "JCS is a distributed caching system written in Java. It
5299 is intended to speed up applications by providing a means to manage cached
5300 data of various dynamic natures. Like any caching system, JCS is most useful
5301 for high read, low put applications. Latency times drop sharply and
5302 bottlenecks move away from the database in an effectively cached system.")
5303 (license license:asl2.0)))
5305 (define-public java-jsr250
5307 (name "java-jsr250")
5311 (uri (string-append "https://repo1.maven.org/maven2/"
5312 "javax/annotation/javax.annotation-api/"
5313 version "/javax.annotation-api-"
5314 version "-sources.jar"))
5317 "08clh8n4n9wfglf75qsqfjs6yf79f7x6hqx38cn856pksszv50kz"))))
5318 (build-system ant-build-system)
5320 `(#:tests? #f ; no tests included
5322 #:jar-name "jsr250.jar"))
5323 (home-page "https://jcp.org/en/jsr/detail?id=250")
5324 (synopsis "Security-related annotations")
5325 (description "This package provides annotations for security. It provides
5326 packages in the @code{javax.annotation} and @code{javax.annotation.security}
5328 ;; either cddl or gpl2 only, with classpath exception
5329 (license (list license:cddl1.0
5332 (define-public java-jsr305
5334 (name "java-jsr305")
5338 (uri (string-append "https://repo1.maven.org/maven2/"
5339 "com/google/code/findbugs/"
5340 "jsr305/" version "/jsr305-"
5341 version "-sources.jar"))
5344 "1rh6jin9v7jqpq3kf1swl868l8i94r636n03pzpsmgr8v0lh9j2n"))))
5345 (build-system ant-build-system)
5347 `(#:tests? #f ; no tests included
5348 #:jar-name "jsr305.jar"))
5349 (home-page "http://findbugs.sourceforge.net/")
5350 (synopsis "Annotations for the static analyzer called findbugs")
5351 (description "This package provides annotations for the findbugs package.
5352 It provides packages in the @code{javax.annotations} namespace.")
5353 (license license:asl2.0)))
5355 (define-public java-guava
5358 ;; This is the last release of Guava that can be built with Java 7.
5362 (uri (string-append "https://github.com/google/guava/"
5363 "releases/download/v" version
5364 "/guava-" version "-sources.jar"))
5367 "1gawrs5gi6j5hcfxdgpnfli75vb9pfi4sn09pnc8xacr669yajwr"))))
5368 (build-system ant-build-system)
5370 `(#:tests? #f ; no tests included
5371 #:jar-name "guava.jar"
5373 (modify-phases %standard-phases
5374 (add-after 'unpack 'trim-sources
5376 (with-directory-excursion "src/com/google/common"
5377 ;; Remove annotations to avoid extra dependencies:
5378 ;; * "j2objc" annotations are used when converting Java to
5380 ;; * "errorprone" annotations catch common Java mistakes at
5382 ;; * "IgnoreJRERequirement" is used for Android.
5383 (substitute* (find-files "." "\\.java$")
5384 (("import com.google.j2objc.*") "")
5385 (("import com.google.errorprone.annotation.*") "")
5386 (("import org.codehaus.mojo.animal_sniffer.*") "")
5387 (("@CanIgnoreReturnValue") "")
5390 (("@RetainedWith") "")
5392 (("@ForOverride") "")
5393 (("@J2ObjCIncompatible") "")
5394 (("@IgnoreJRERequirement") "")))
5397 `(("java-jsr305" ,java-jsr305)))
5398 (home-page "https://github.com/google/guava")
5399 (synopsis "Google core libraries for Java")
5400 (description "Guava is a set of core libraries that includes new
5401 collection types (such as multimap and multiset), immutable collections, a
5402 graph library, functional types, an in-memory cache, and APIs/utilities for
5403 concurrency, I/O, hashing, primitives, reflection, string processing, and much
5405 (license license:asl2.0)))
5407 ;; The java-commons-logging package provides adapters to many different
5408 ;; logging frameworks. To avoid an excessive dependency graph we try to build
5409 ;; it with only a minimal set of adapters.
5410 (define-public java-commons-logging-minimal
5412 (name "java-commons-logging-minimal")
5416 (uri (string-append "mirror://apache/commons/logging/source/"
5417 "commons-logging-" version "-src.tar.gz"))
5420 "10bwcy5w8d7y39n0krlwhnp8ds3kj5zhmzj0zxnkw0qdlsjmsrj9"))))
5421 (build-system ant-build-system)
5423 `(#:tests? #f ; avoid dependency on logging frameworks
5424 #:jar-name "commons-logging-minimal.jar"
5426 (modify-phases %standard-phases
5427 (add-after 'unpack 'delete-adapters-and-tests
5429 ;; Delete all adapters except for NoOpLog, SimpleLog, and
5430 ;; LogFactoryImpl. NoOpLog is required to build; LogFactoryImpl
5431 ;; is used by applications; SimpleLog is the only actually usable
5432 ;; implementation that does not depend on another logging
5436 (delete-file (string-append
5437 "src/main/java/org/apache/commons/logging/impl/" file)))
5438 (list "Jdk13LumberjackLogger.java"
5439 "WeakHashtable.java"
5441 "ServletContextCleaner.java"
5444 "LogKitLogger.java"))
5445 (delete-file-recursively "src/test")
5447 (home-page "https://commons.apache.org/logging/")
5448 (synopsis "Common API for logging implementations")
5449 (description "The Logging package is a thin bridge between different
5450 logging implementations. A library that uses the commons-logging API can be
5451 used with any logging implementation at runtime.")
5452 (license license:asl2.0)))
5454 ;; This is the last release of the 1.x series.
5455 (define-public java-mockito-1
5457 (name "java-mockito")
5461 (uri (string-append "http://repo1.maven.org/maven2/"
5462 "org/mockito/mockito-core/" version
5463 "/mockito-core-" version "-sources.jar"))
5466 "0vmiwnwpf83g2q7kj1rislmja8fpvqkixjhawh7nxnygx6pq11kc"))))
5467 (build-system ant-build-system)
5469 `(#:jar-name "mockito.jar"
5470 #:tests? #f ; no tests included
5471 ;; FIXME: patch-and-repack does not support jars, so we have to apply
5472 ;; patches in build phases.
5474 (modify-phases %standard-phases
5475 ;; Mockito was developed against a different version of hamcrest,
5476 ;; which does not require matcher implementations to provide an
5477 ;; implementation of the "describeMismatch" method. We add this
5478 ;; simple definition to pass the build with our version of hamcrest.
5479 (add-after 'unpack 'fix-hamcrest-build-error
5481 (substitute* "src/org/mockito/internal/matchers/LocalizedMatcher.java"
5482 (("public Matcher getActualMatcher\\(\\) .*" line)
5484 public void describeMismatch(Object item, Description description) {
5485 actualMatcher.describeMismatch(item, description);
5489 ;; Mockito bundles cglib. We have a cglib package, so let's use
5491 (add-after 'unpack 'use-system-libraries
5493 (with-directory-excursion "src/org/mockito/internal/creation/cglib"
5494 (substitute* '("CGLIBHacker.java"
5495 "CglibMockMaker.java"
5496 "ClassImposterizer.java"
5497 "DelegatingMockitoMethodProxy.java"
5498 "MethodInterceptorFilter.java"
5499 "MockitoNamingPolicy.java"
5500 "SerializableMockitoMethodProxy.java"
5501 "SerializableNoOp.java")
5502 (("import org.mockito.cglib") "import net.sf.cglib")))
5505 `(("java-junit" ,java-junit)
5506 ("java-objenesis" ,java-objenesis)
5507 ("java-cglib" ,java-cglib)
5508 ("java-hamcrest-core" ,java-hamcrest-core)))
5509 (home-page "http://mockito.org")
5510 (synopsis "Mockito is a mock library for Java")
5511 (description "Mockito is a mocking library for Java which lets you write
5512 tests with a clean and simple API. It generates mocks using reflection, and
5513 it records all mock invocations, including methods arguments.")
5514 (license license:asl2.0)))
5516 (define-public java-httpcomponents-httpcore
5518 (name "java-httpcomponents-httpcore")
5522 (uri (string-append "mirror://apache//httpcomponents/httpcore/"
5523 "source/httpcomponents-core-"
5524 version "-src.tar.gz"))
5527 "02bwcf38y4vgwq7kj2s6q7qrmma641r5lacivm16kgxvb2j6h1vy"))))
5528 (build-system ant-build-system)
5530 `(#:jar-name "httpcomponents-httpcore.jar"
5532 (modify-phases %standard-phases
5533 (add-after 'unpack 'chdir
5534 (lambda _ (chdir "httpcore") #t)))))
5536 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)
5537 ("java-commons-lang3" ,java-commons-lang3)))
5539 `(("java-junit" ,java-junit)
5540 ("java-mockito" ,java-mockito-1)))
5541 (home-page "https://hc.apache.org/httpcomponents-core-4.4.x/index.html")
5542 (synopsis "Low level HTTP transport components")
5543 (description "HttpCore is a set of low level HTTP transport components
5544 that can be used to build custom client and server side HTTP services with a
5545 minimal footprint. HttpCore supports two I/O models: blocking I/O model based
5546 on the classic Java I/O and non-blocking, event driven I/O model based on Java
5549 This package provides the blocking I/O model library.")
5550 (license license:asl2.0)))
5552 (define-public java-httpcomponents-httpcore-nio
5553 (package (inherit java-httpcomponents-httpcore)
5554 (name "java-httpcomponents-httpcore-nio")
5556 `(#:jar-name "httpcomponents-httpcore-nio.jar"
5558 (modify-phases %standard-phases
5559 (add-after 'unpack 'chdir
5560 (lambda _ (chdir "httpcore-nio") #t)))))
5562 `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
5563 ("java-hamcrest-core" ,java-hamcrest-core)
5564 ,@(package-inputs java-httpcomponents-httpcore)))
5565 (description "HttpCore is a set of low level HTTP transport components
5566 that can be used to build custom client and server side HTTP services with a
5567 minimal footprint. HttpCore supports two I/O models: blocking I/O model based
5568 on the classic Java I/O and non-blocking, event driven I/O model based on Java
5571 This package provides the non-blocking I/O model library based on Java
5574 (define-public java-httpcomponents-httpcore-ab
5575 (package (inherit java-httpcomponents-httpcore)
5576 (name "java-httpcomponents-httpcore-ab")
5578 `(#:jar-name "httpcomponents-httpcore-ab.jar"
5580 (modify-phases %standard-phases
5581 (add-after 'unpack 'chdir
5582 (lambda _ (chdir "httpcore-ab") #t)))))
5584 `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
5585 ("java-commons-cli" ,java-commons-cli)
5586 ("java-hamcrest-core" ,java-hamcrest-core)
5587 ,@(package-inputs java-httpcomponents-httpcore)))
5588 (synopsis "Apache HttpCore benchmarking tool")
5589 (description "This package provides the HttpCore benchmarking tool. It is
5590 an Apache AB clone based on HttpCore.")))
5592 (define-public java-httpcomponents-httpclient
5594 (name "java-httpcomponents-httpclient")
5598 (uri (string-append "mirror://apache/httpcomponents/httpclient/"
5599 "source/httpcomponents-client-"
5600 version "-src.tar.gz"))
5603 "1428399s7qy3cim5wc6f3ks4gl9nf9vkjpfmnlap3jflif7g2pj1"))))
5604 (build-system ant-build-system)
5606 `(#:jar-name "httpcomponents-httpclient.jar"
5608 (modify-phases %standard-phases
5609 (add-after 'unpack 'chdir
5610 (lambda _ (chdir "httpclient") #t)))))
5612 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)
5613 ("java-commons-codec" ,java-commons-codec)
5614 ("java-hamcrest-core" ,java-hamcrest-core)
5615 ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
5616 ("java-mockito" ,java-mockito-1)
5617 ("java-junit" ,java-junit)))
5618 (home-page "https://hc.apache.org/httpcomponents-client-ga/")
5619 (synopsis "HTTP client library for Java")
5620 (description "Although the @code{java.net} package provides basic
5621 functionality for accessing resources via HTTP, it doesn't provide the full
5622 flexibility or functionality needed by many applications. @code{HttpClient}
5623 seeks to fill this void by providing an efficient, up-to-date, and
5624 feature-rich package implementing the client side of the most recent HTTP
5625 standards and recommendations.")
5626 (license license:asl2.0)))
5628 (define-public java-httpcomponents-httpmime
5629 (package (inherit java-httpcomponents-httpclient)
5630 (name "java-httpcomponents-httpmime")
5632 `(#:jar-name "httpcomponents-httpmime.jar"
5634 (modify-phases %standard-phases
5635 (add-after 'unpack 'chdir
5636 (lambda _ (chdir "httpmime") #t)))))
5638 `(("java-httpcomponents-httpclient" ,java-httpcomponents-httpclient)
5639 ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
5640 ("java-junit" ,java-junit)
5641 ("java-hamcrest-core" ,java-hamcrest-core)))))
5643 (define-public java-commons-net
5645 (name "java-commons-net")
5649 (uri (string-append "mirror://apache/commons/net/source/"
5650 "commons-net-" version "-src.tar.gz"))
5653 "0n0cmnddk9qdqhjvka8pc6hd9mn2qi3166f1s6xk32h7rfy1adxr"))))
5654 (build-system ant-build-system)
5656 `(;; FIXME: MainTest.java tries to read "examples.properties" (which
5657 ;; should be "resources/examples/examples.properties"), but gets "null"
5660 #:jar-name "commons-net.jar"))
5662 `(("java-junit" ,java-junit)
5663 ("java-hamcrest-core" ,java-hamcrest-core)))
5664 (home-page "https://commons.apache.org/net/")
5665 (synopsis "Client library for many basic Internet protocols")
5666 (description "The Apache Commons Net library implements the client side of
5667 many basic Internet protocols. The purpose of the library is to provide
5668 fundamental protocol access, not higher-level abstractions.")
5669 (license license:asl2.0)))
5671 (define-public java-jsch
5677 (uri (string-append "mirror://sourceforge/jsch/jsch/"
5678 version "/jsch-" version ".zip"))
5681 "1lxyjwvmwa723wcf3bqn816hkvc03vz4xhbsi7bvfhrz2rpgcfq6"))))
5682 (build-system ant-build-system)
5684 `(#:build-target "dist"
5685 #:tests? #f ; no tests included
5687 (modify-phases %standard-phases
5688 (replace 'install (install-jars "dist")))))
5690 `(("unzip" ,unzip)))
5691 (home-page "http://www.jcraft.com/jsch/")
5692 (synopsis "Pure Java implementation of SSH2")
5693 (description "JSch is a pure Java implementation of SSH2. JSch allows you
5694 to connect to an SSH server and use port forwarding, X11 forwarding, file
5695 transfer, etc., and you can integrate its functionality into your own Java
5697 (license license:bsd-3)))
5699 (define-public java-commons-compress
5701 (name "java-commons-compress")
5705 (uri (string-append "mirror://apache/commons/compress/source/"
5706 "commons-compress-" version "-src.tar.gz"))
5709 "1vjqvavrn0babffn1kciz6v52ibwq2vwhzlb95hazis3lgllnxc8"))))
5710 (build-system ant-build-system)
5712 `(#:jar-name "commons-compress.jar"
5714 (modify-phases %standard-phases
5715 (add-after 'unpack 'delete-bad-tests
5717 (with-directory-excursion "src/test/java/org/apache/commons/compress/"
5718 ;; FIXME: These tests really should not fail. Maybe they are
5719 ;; indicative of problems with our Java packaging work.
5721 ;; This test fails with a null pointer exception.
5722 (delete-file "archivers/sevenz/SevenZOutputFileTest.java")
5723 ;; This test fails to open test resources.
5724 (delete-file "archivers/zip/ExplodeSupportTest.java")
5726 ;; FIXME: This test adds a dependency on powermock, which is hard to
5727 ;; package at this point.
5728 ;; https://github.com/powermock/powermock
5729 (delete-file "archivers/sevenz/SevenZNativeHeapTest.java"))
5732 `(("java-junit" ,java-junit)
5733 ("java-hamcrest-core" ,java-hamcrest-core)
5734 ("java-mockito" ,java-mockito-1)
5735 ("java-xz" ,java-xz)))
5736 (home-page "https://commons.apache.org/proper/commons-compress/")
5737 (synopsis "Java library for working with compressed files")
5738 (description "The Apache Commons Compress library defines an API for
5739 working with compressed files such as ar, cpio, Unix dump, tar, zip, gzip, XZ,
5740 Pack200, bzip2, 7z, arj, lzma, snappy, DEFLATE, lz4 and Z files.")
5741 (license license:asl2.0)))
5743 (define-public java-commons-csv
5745 (name "java-commons-csv")
5749 (uri (string-append "mirror://apache/commons/csv/source/"
5750 "commons-csv-" version "-src.tar.gz"))
5753 "1l89m0fm2s3xx3v3iynvangymfg2vlyngaj6fgsi457nmsw7m7ij"))))
5754 (build-system ant-build-system)
5756 `(#:jar-name "commons-csv.jar"
5757 #:source-dir "src/main/java"
5758 #:tests? #f)); FIXME: requires java-h2
5760 `(("java-hamcrest-core" ,java-hamcrest-core)
5761 ("java-commons-io" ,java-commons-io)
5762 ("java-commons-lang3" ,java-commons-lang3)
5763 ("junit" ,java-junit)))
5764 (home-page "https://commons.apache.org/proper/commons-csv/")
5765 (synopsis "Read and write CSV documents")
5766 (description "Commons CSV reads and writes files in variations of the Comma
5767 Separated Value (CSV) format. The most common CSV formats are predefined in the
5771 @item Microsoft Excel
5772 @item Informix UNLOAD
5773 @item Informix UNLOAD CSV
5779 Custom formats can be created using a fluent style API.")
5780 (license license:asl2.0)))
5782 (define-public java-osgi-annotation
5784 (name "java-osgi-annotation")
5788 (uri (string-append "https://repo1.maven.org/maven2/"
5789 "org/osgi/org.osgi.annotation/" version "/"
5790 "org.osgi.annotation-" version "-sources.jar"))
5793 "1q718mb7gqg726rh6pc2hcisn8v50nv35abbir0jypmffhiii85w"))))
5794 (build-system ant-build-system)
5796 `(#:tests? #f ; no tests
5797 #:jar-name "osgi-annotation.jar"))
5798 (home-page "https://www.osgi.org")
5799 (synopsis "Annotation module of OSGi framework")
5801 "OSGi, for Open Services Gateway initiative framework, is a module system
5802 and service platform for the Java programming language. This package contains
5803 the OSGi annotation module, providing additional services to help dynamic
5805 (license license:asl2.0)))
5807 (define-public java-osgi-core
5809 (name "java-osgi-core")
5813 (uri (string-append "https://repo1.maven.org/maven2/"
5814 "org/osgi/org.osgi.core/" version "/"
5815 "org.osgi.core-" version "-sources.jar"))
5818 "19bpf5jx32jq9789gyhin35q5v7flmw0p9mk7wbgqpxqfmxyiabv"))))
5819 (build-system ant-build-system)
5821 `(#:tests? #f ; no tests
5822 #:jar-name "osgi-core.jar"))
5824 `(("java-osgi-annotation" ,java-osgi-annotation)))
5825 (home-page "https://www.osgi.org")
5826 (synopsis "Core module of OSGi framework")
5828 "OSGi, for Open Services Gateway initiative framework, is a module system
5829 and service platform for the Java programming language. This package contains
5830 the OSGi Core module.")
5831 (license license:asl2.0)))
5833 (define-public java-osgi-service-event
5835 (name "java-osgi-service-event")
5839 (uri (string-append "https://repo1.maven.org/maven2/"
5840 "org/osgi/org.osgi.service.event/"
5841 version "/org.osgi.service.event-"
5842 version "-sources.jar"))
5845 "1nyhlgagwym75bycnjczwbnpymv2iw84zbhvvzk84g9q736i6qxm"))))
5846 (build-system ant-build-system)
5848 `(#:tests? #f ; no tests
5849 #:jar-name "osgi-service-event.jar"))
5851 `(("java-osgi-annotation" ,java-osgi-annotation)
5852 ("java-osgi-core" ,java-osgi-core)))
5853 (home-page "https://www.osgi.org")
5854 (synopsis "OSGi service event module")
5856 "OSGi, for Open Services Gateway initiative framework, is a module system
5857 and service platform for the Java programming language. This package contains
5858 the OSGi @code{org.osgi.service.event} module.")
5859 (license license:asl2.0)))
5861 (define-public java-eclipse-osgi
5863 (name "java-eclipse-osgi")
5867 (uri (string-append "https://repo1.maven.org/maven2/"
5868 "org/eclipse/platform/org.eclipse.osgi/"
5869 version "/org.eclipse.osgi-"
5870 version "-sources.jar"))
5873 "00cqc6lb29n0zv68b4l842vzkwawvbr7gshfdygsk8sicvcq2c7b"))))
5874 (build-system ant-build-system)
5876 `(#:tests? #f ; no tests included
5877 #:jar-name "eclipse-equinox-osgi.jar"))
5879 `(("java-osgi-annotation" ,java-osgi-annotation)))
5880 (home-page "http://www.eclipse.org/equinox/")
5881 (synopsis "Eclipse Equinox OSGi framework")
5882 (description "This package provides an implementation of the OSGi Core
5884 (license license:epl1.0)))
5886 (define-public java-eclipse-equinox-common
5888 (name "java-eclipse-equinox-common")
5889 (version "3.10.200")
5892 (uri (string-append "https://repo1.maven.org/maven2/"
5893 "org/eclipse/platform/org.eclipse.equinox.common/"
5894 version "/org.eclipse.equinox.common-"
5895 version "-sources.jar"))
5898 "1yn8ij6xsljlf35sr2l7wvyvc0ss4n1rv0ry5zkgb49dj4hyrqrj"))))
5899 (build-system ant-build-system)
5901 `(#:tests? #f ; no tests included
5902 #:jar-name "eclipse-equinox-common.jar"))
5904 `(("java-eclipse-osgi" ,java-eclipse-osgi)))
5905 (home-page "http://www.eclipse.org/equinox/")
5906 (synopsis "Common Eclipse runtime")
5907 (description "This package provides the common Eclipse runtime.")
5908 (license license:epl1.0)))
5910 (define-public java-eclipse-core-jobs
5912 (name "java-eclipse-core-jobs")
5916 (uri (string-append "https://repo1.maven.org/maven2/"
5917 "org/eclipse/platform/org.eclipse.core.jobs/"
5918 version "/org.eclipse.core.jobs-"
5919 version "-sources.jar"))
5922 "0395b8lh0km8vhzjnchvs1rii1qz48hyvb2wqfaq4yhklbwihq4b"))))
5923 (build-system ant-build-system)
5925 `(#:tests? #f ; no tests included
5926 #:jar-name "eclipse-core-jobs.jar"))
5928 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5929 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5930 (home-page "http://www.eclipse.org/equinox/")
5931 (synopsis "Eclipse jobs mechanism")
5932 (description "This package provides the Eclipse jobs mechanism.")
5933 (license license:epl1.0)))
5935 (define-public java-eclipse-equinox-registry
5937 (name "java-eclipse-equinox-registry")
5941 (uri (string-append "https://repo1.maven.org/maven2/"
5942 "org/eclipse/platform/org.eclipse.equinox.registry/"
5943 version "/org.eclipse.equinox.registry-"
5944 version "-sources.jar"))
5947 "1i9sgymh2fy5vdgk5y7s3qvrlbgh4l93ddqi3v4zmca7hwrlhf9k"))))
5948 (build-system ant-build-system)
5950 `(#:tests? #f ; no tests included
5951 #:jar-name "eclipse-equinox-registry.jar"))
5953 `(("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
5954 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5955 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5956 (home-page "http://www.eclipse.org/equinox/")
5957 (synopsis "Eclipse extension registry support")
5958 (description "This package provides support for the Eclipse extension
5960 (license license:epl1.0)))
5962 (define-public java-eclipse-equinox-app
5964 (name "java-eclipse-equinox-app")
5968 (uri (string-append "https://repo1.maven.org/maven2/"
5969 "org/eclipse/platform/org.eclipse.equinox.app/"
5970 version "/org.eclipse.equinox.app-"
5971 version "-sources.jar"))
5974 "0nhvbp93y203ar7y59gb0mz3w2d3jlqhr0c9hii9bcfpmr7imdab"))))
5975 (build-system ant-build-system)
5977 `(#:tests? #f ; no tests included
5978 #:jar-name "eclipse-equinox-app.jar"))
5980 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5981 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5982 ("java-eclipse-osgi" ,java-eclipse-osgi)
5983 ("java-osgi-service-event" ,java-osgi-service-event)))
5984 (home-page "http://www.eclipse.org/equinox/")
5985 (synopsis "Equinox application container")
5986 (description "This package provides the Equinox application container for
5988 (license license:epl1.0)))
5990 (define-public java-eclipse-equinox-preferences
5992 (name "java-eclipse-equinox-preferences")
5996 (uri (string-append "https://repo1.maven.org/maven2/"
5997 "org/eclipse/platform/org.eclipse.equinox.preferences/"
5998 version "/org.eclipse.equinox.preferences-"
5999 version "-sources.jar"))
6002 "0k7w6c141sqym4fy3af0qkwpy4pdh2vsjpjba6rp5fxyqa24v0a2"))))
6003 (build-system ant-build-system)
6005 `(#:tests? #f ; no tests included
6006 #:jar-name "eclipse-equinox-preferences.jar"))
6008 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6009 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6010 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6011 (home-page "http://www.eclipse.org/equinox/")
6012 (synopsis "Eclipse preferences mechanism")
6013 (description "This package provides the Eclipse preferences mechanism with
6014 the module @code{org.eclipse.equinox.preferences}.")
6015 (license license:epl1.0)))
6017 (define-public java-eclipse-core-contenttype
6019 (name "java-eclipse-core-contenttype")
6023 (uri (string-append "https://repo1.maven.org/maven2/"
6024 "org/eclipse/platform/org.eclipse.core.contenttype/"
6025 version "/org.eclipse.core.contenttype-"
6026 version "-sources.jar"))
6029 "1wcqcv7ijwv5rh748vz3x9pkmjl9w1r0k0026k56n8yjl4rrmspi"))))
6030 (build-system ant-build-system)
6032 `(#:tests? #f ; no tests included
6033 #:jar-name "eclipse-core-contenttype.jar"))
6035 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6036 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6037 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6038 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6039 (home-page "http://www.eclipse.org/")
6040 (synopsis "Eclipse content mechanism")
6041 (description "This package provides the Eclipse content mechanism in the
6042 @code{org.eclipse.core.contenttype} module.")
6043 (license license:epl1.0)))
6045 (define-public java-eclipse-core-runtime
6047 (name "java-eclipse-core-runtime")
6048 (version "3.15.100")
6051 (uri (string-append "https://repo1.maven.org/maven2/"
6052 "org/eclipse/platform/org.eclipse.core.runtime/"
6053 version "/org.eclipse.core.runtime-"
6054 version "-sources.jar"))
6057 "0l8xayacsbjvz5hypx2fv47vpw2n4dspamcfb3hx30x9hj8vmg7r"))))
6058 (build-system ant-build-system)
6060 `(#:tests? #f ; no tests included
6061 #:jar-name "eclipse-core-runtime.jar"))
6063 `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
6064 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
6065 ("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
6066 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6067 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6068 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6069 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6070 (home-page "https://www.eclipse.org/")
6071 (synopsis "Eclipse core runtime")
6072 (description "This package provides the Eclipse core runtime with the
6073 module @code{org.eclipse.core.runtime}.")
6074 (license license:epl1.0)))
6076 (define-public java-eclipse-core-filesystem
6078 (name "java-eclipse-core-filesystem")
6082 (uri (string-append "https://repo1.maven.org/maven2/"
6083 "org/eclipse/platform/org.eclipse.core.filesystem/"
6084 version "/org.eclipse.core.filesystem-"
6085 version "-sources.jar"))
6088 "0km1bhwjim4rfy3pkvjhvy31kgsyf2ncx0mlkmbf5n6g57pphdyj"))))
6089 (build-system ant-build-system)
6091 `(#:tests? #f ; no tests included
6092 #:jar-name "eclipse-core-filesystem.jar"))
6094 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6095 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6096 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6097 (home-page "https://www.eclipse.org/")
6098 (synopsis "Eclipse core file system")
6099 (description "This package provides the Eclipse core file system with the
6100 module @code{org.eclipse.core.filesystem}.")
6101 (license license:epl1.0)))
6103 (define-public java-eclipse-core-expressions
6105 (name "java-eclipse-core-expressions")
6109 (uri (string-append "https://repo1.maven.org/maven2/"
6110 "org/eclipse/platform/org.eclipse.core.expressions/"
6111 version "/org.eclipse.core.expressions-"
6112 version "-sources.jar"))
6115 "18bw2l875gmygvpagpgk9l24qzbdjia4ag12nw6fi8v8yaq4987f"))))
6116 (build-system ant-build-system)
6118 `(#:tests? #f ; no tests included
6119 #:jar-name "eclipse-core-expressions.jar"))
6121 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6122 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6123 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6124 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
6125 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6126 (home-page "https://www.eclipse.org/")
6127 (synopsis "Eclipse core expression language")
6128 (description "This package provides the Eclipse core expression language
6129 with the @code{org.eclipse.core.expressions} module.")
6130 (license license:epl1.0)))
6132 (define-public java-eclipse-core-variables
6134 (name "java-eclipse-core-variables")
6138 (uri (string-append "https://repo1.maven.org/maven2/"
6139 "org/eclipse/platform/org.eclipse.core.variables/"
6140 version "/org.eclipse.core.variables-"
6141 version "-sources.jar"))
6144 "12dirh03zi4n5x5cj07vzrhkmnqy6h9q10h9j605pagmpmifyxmy"))))
6145 (build-system ant-build-system)
6147 `(#:tests? #f ; no tests included
6148 #:jar-name "eclipse-core-variables.jar"))
6150 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6151 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6152 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6153 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
6154 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6155 (home-page "https://www.eclipse.org/platform")
6156 (synopsis "Eclipse core variables")
6157 (description "This package provides the Eclipse core variables module
6158 @code{org.eclipse.core.variables}.")
6159 (license license:epl1.0)))
6161 (define-public java-eclipse-ant-core
6163 (name "java-eclipse-ant-core")
6167 (uri (string-append "https://repo1.maven.org/maven2/"
6168 "org/eclipse/platform/org.eclipse.ant.core/"
6169 version "/org.eclipse.ant.core-"
6170 version "-sources.jar"))
6173 "11g3if794qjlk98mz9zch22rr56sd7z63vn4i7k2icr8cq5bfqg7"))))
6174 (build-system ant-build-system)
6176 `(#:tests? #f ; no tests included
6177 #:jar-name "eclipse-ant-core.jar"))
6179 `(("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
6180 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6181 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6182 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6183 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
6184 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
6185 ("java-eclipse-core-variables" ,java-eclipse-core-variables)
6186 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6187 (home-page "https://www.eclipse.org/platform")
6188 (synopsis "Ant build tool core libraries")
6189 (description "This package provides the ant build tool core libraries with
6190 the module @code{org.eclipse.ant.core}.")
6191 (license license:epl1.0)))
6193 (define-public java-eclipse-core-resources
6195 (name "java-eclipse-core-resources")
6196 (version "3.13.200")
6199 (uri (string-append "https://repo1.maven.org/maven2/"
6200 "org/eclipse/platform/org.eclipse.core.resources/"
6201 version "/org.eclipse.core.resources-"
6202 version "-sources.jar"))
6205 "1sn3b6ky72hkvxcgf9b2jkpbdh3y8lbhi9xxwv1dsiddpkkq91hs"))))
6206 (build-system ant-build-system)
6208 `(#:tests? #f ; no tests included
6209 #:jar-name "eclipse-core-resources.jar"))
6211 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6212 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6213 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6214 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
6215 ("java-eclipse-core-expressions" ,java-eclipse-core-expressions)
6216 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
6217 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
6218 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
6219 ("java-eclipse-ant-core" ,java-eclipse-ant-core)
6220 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6221 (home-page "https://www.eclipse.org/")
6222 (synopsis "Eclipse core resource management")
6223 (description "This package provides the Eclipse core resource management
6224 module @code{org.eclipse.core.resources}.")
6225 (license license:epl1.0)))
6227 (define-public java-eclipse-compare-core
6229 (name "java-eclipse-compare-core")
6233 (uri (string-append "https://repo1.maven.org/maven2/"
6234 "org/eclipse/platform/org.eclipse.compare.core/"
6235 version "/org.eclipse.compare.core-"
6236 version "-sources.jar"))
6239 "10g37r0pbiffyv2wk35c6g5lwzkdipkl0kkjp41v84dln46xm4dg"))))
6240 (build-system ant-build-system)
6242 `(#:tests? #f ; no tests included
6243 #:jar-name "eclipse-compare-core.jar"))
6245 `(("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
6246 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6247 ("java-eclipse-osgi" ,java-eclipse-osgi)
6248 ("java-icu4j" ,java-icu4j)))
6249 (home-page "https://www.eclipse.org/")
6250 (synopsis "Eclipse core compare support")
6251 (description "This package provides the Eclipse core compare support
6252 module @code{org.eclipse.compare.core}.")
6253 (license license:epl1.0)))
6255 (define-public java-eclipse-team-core
6257 (name "java-eclipse-team-core")
6261 (uri (string-append "https://repo1.maven.org/maven2/"
6262 "org/eclipse/platform/org.eclipse.team.core/"
6263 version "/org.eclipse.team.core-"
6264 version "-sources.jar"))
6267 "02j2jzqgb26zx2d5ahxmvijw6j4r0la90zl5c3i65x6z19ciyam7"))))
6268 (build-system ant-build-system)
6270 `(#:tests? #f ; no tests included
6271 #:jar-name "eclipse-team-core.jar"))
6273 `(("java-eclipse-compare-core" ,java-eclipse-compare-core)
6274 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
6275 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
6276 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
6277 ("java-eclipse-core-resources" ,java-eclipse-core-resources)
6278 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
6279 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6280 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6281 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6282 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6283 (home-page "https://www.eclipse.org/platform")
6284 (synopsis "Eclipse team support core")
6285 (description "This package provides the Eclipse team support core module
6286 @code{org.eclipse.team.core}.")
6287 (license license:epl1.0)))
6289 (define-public java-eclipse-core-commands
6291 (name "java-eclipse-core-commands")
6295 (uri (string-append "https://repo1.maven.org/maven2/"
6296 "org/eclipse/platform/org.eclipse.core.commands/"
6297 version "/org.eclipse.core.commands-"
6298 version "-sources.jar"))
6301 "0yjn482qndcfrsq3jd6vnhcylp16420f5aqkrwr8spsprjigjcr9"))))
6302 (build-system ant-build-system)
6304 `(#:tests? #f ; no tests included
6305 #:jar-name "eclipse-core-commands.jar"))
6307 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)))
6308 (home-page "https://www.eclipse.org/platform")
6309 (synopsis "Eclipse core commands")
6310 (description "This package provides Eclipse core commands in the module
6311 @code{org.eclipse.core.commands}.")
6312 (license license:epl1.0)))
6314 (define-public java-eclipse-text
6316 (name "java-eclipse-text")
6320 (uri (string-append "https://repo1.maven.org/maven2/"
6321 "org/eclipse/platform/org.eclipse.text/"
6322 version "/org.eclipse.text-"
6323 version "-sources.jar"))
6326 "0scz70vzz5qs5caji9f5q01vkqnvip7dpri1q07l8wbbdcxn4cq1"))))
6327 (build-system ant-build-system)
6329 `(#:tests? #f ; no tests included
6330 #:jar-name "eclipse-text.jar"
6332 (modify-phases %standard-phases
6333 ;; When creating a new category we must make sure that the new list
6334 ;; matches List<Position>. By default it seems to be too generic
6335 ;; (ArrayList<Object>), so we specialize it to ArrayList<Position>.
6336 ;; Without this we get this error:
6338 ;; [javac] .../src/org/eclipse/jface/text/AbstractDocument.java:376:
6339 ;; error: method put in interface Map<K,V> cannot be applied to given types;
6340 ;; [javac] fPositions.put(category, new ArrayList<>());
6342 ;; [javac] required: String,List<Position>
6343 ;; [javac] found: String,ArrayList<Object>
6344 ;; [javac] reason: actual argument ArrayList<Object> cannot be converted
6345 ;; to List<Position> by method invocation conversion
6346 ;; [javac] where K,V are type-variables:
6347 ;; [javac] K extends Object declared in interface Map
6348 ;; [javac] V extends Object declared in interface Map
6350 ;; I don't know if this is a good fix. I suspect it is not, but it
6352 (add-after 'unpack 'fix-compilation-error
6354 (substitute* "src/org/eclipse/jface/text/AbstractDocument.java"
6355 (("Positions.put\\(category, new ArrayList<>\\(\\)\\);")
6356 "Positions.put(category, new ArrayList<Position>());"))
6359 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6360 ("java-eclipse-core-commands" ,java-eclipse-core-commands)
6361 ("java-icu4j" ,java-icu4j)))
6362 (home-page "http://www.eclipse.org/platform")
6363 (synopsis "Eclipse text library")
6364 (description "Platform Text is part of the Platform UI project and
6365 provides the basic building blocks for text and text editors within Eclipse
6366 and contributes the Eclipse default text editor.")
6367 (license license:epl1.0)))
6369 (define-public java-eclipse-jdt-core
6371 (name "java-eclipse-jdt-core")
6375 (uri (string-append "https://repo1.maven.org/maven2/"
6376 "org/eclipse/jdt/org.eclipse.jdt.core/"
6377 version "/org.eclipse.jdt.core-"
6378 version "-sources.jar"))
6381 "1g560yr9v2kzv34gc2m3ifpgnj7krcdd6h4gd4z83pwqacwkfz0k"))))
6382 (build-system ant-build-system)
6384 `(#:tests? #f ; no tests included
6385 #:jar-name "eclipse-jdt-core.jar"
6387 (modify-phases %standard-phases
6388 (add-after 'unpack 'move-sources
6390 (with-directory-excursion "src/jdtCompilerAdaptersrc/"
6391 (for-each (lambda (file)
6392 (install-file file (string-append "../" (dirname file))))
6393 (find-files "." ".*")))
6394 (delete-file-recursively "src/jdtCompilerAdaptersrc/")
6396 (add-before 'build 'copy-resources
6398 (with-directory-excursion "src"
6399 (for-each (lambda (file)
6400 (install-file file (string-append "../build/classes/" (dirname file))))
6401 (find-files "." ".*.(props|properties|rsc)")))
6404 `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
6405 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
6406 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
6407 ("java-eclipse-core-resources" ,java-eclipse-core-resources)
6408 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
6409 ("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
6410 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6411 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6412 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6413 ("java-eclipse-osgi" ,java-eclipse-osgi)
6414 ("java-eclipse-text" ,java-eclipse-text)))
6415 (home-page "https://www.eclipse.org/jdt")
6416 (synopsis "Java development tools core libraries")
6417 (description "This package provides the core libraries of the Eclipse Java
6418 development tools.")
6419 (license license:epl1.0)))
6421 (define-public java-eclipse-jdt-compiler-apt
6423 (name "java-eclipse-jdt-compiler-apt")
6427 (uri (string-append "https://repo1.maven.org/maven2/"
6428 "org/eclipse/jdt/org.eclipse.jdt.compiler.apt/"
6429 version "/org.eclipse.jdt.compiler.apt-"
6430 version "-sources.jar"))
6433 "1s285k9p2ixdqrknb40jbbvw682n9a7l5lqpn583a8pvlzg2l6r8"))))
6434 (build-system ant-build-system)
6436 `(#:tests? #f ; no tests included
6437 #:jar-name "eclipse-jdt-compiler-apt.jar"
6440 `(("java-eclipse-jdt-core" ,java-eclipse-jdt-core)))
6441 (home-page "https://www.eclipse.org/jdt/apt/")
6442 (synopsis "Annotation processing tool")
6443 (description "APT stands for Annotation Processing Tool. APT provides a
6444 means for generating files and compiling new Java classes based on annotations
6445 found in your source code.")
6446 (license license:epl2.0)))
6448 (define-public java-javax-mail
6450 (name "java-javax-mail")
6454 (uri (string-append "https://repo1.maven.org/maven2/"
6455 "com/sun/mail/javax.mail/"
6456 version "/javax.mail-"
6457 version "-sources.jar"))
6460 "0sdlfgsc2b5s89xv1261y8i0jijcja019k2x1c8ngfn582w4jly9"))))
6461 (build-system ant-build-system)
6463 `(#:tests? #f ; no tests
6464 #:jar-name "javax-mail.jar"))
6465 (home-page "https://javamail.java.net")
6466 (synopsis "Reference implementation of the JavaMail API")
6468 "This package provides versions of the JavaMail API implementation, IMAP,
6469 SMTP, and POP3 service providers, some examples, and documentation for the
6471 ;; GPLv2 only with "classpath exception".
6472 (license license:gpl2)))
6474 (define-public java-log4j-api
6476 (name "java-log4j-api")
6480 (uri (string-append "mirror://apache/logging/log4j/" version
6481 "/apache-log4j-" version "-src.tar.gz"))
6484 "0j5p9gik0jysh37nlrckqbky12isy95cpwg2gv5fas1rcdqbraxd"))))
6485 (build-system ant-build-system)
6487 `(#:tests? #f ; tests require unpackaged software
6488 #:jar-name "log4j-api.jar"
6490 (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out")
6493 (modify-phases %standard-phases
6494 (add-after 'unpack 'enter-dir
6495 (lambda _ (chdir "log4j-api") #t))
6496 ;; FIXME: The tests require additional software that has not been
6497 ;; packaged yet, such as
6498 ;; * org.apache.maven
6499 ;; * org.apache.felix
6500 (add-after 'enter-dir 'delete-tests
6501 (lambda _ (delete-file-recursively "src/test") #t)))))
6503 `(("java-osgi-core" ,java-osgi-core)
6504 ("java-hamcrest-core" ,java-hamcrest-core)
6505 ("java-junit" ,java-junit)))
6506 (home-page "https://logging.apache.org/log4j/2.x/")
6507 (synopsis "API module of the Log4j logging framework for Java")
6509 "This package provides the API module of the Log4j logging framework for
6511 (license license:asl2.0)))
6513 (define-public java-log4j-core
6515 (inherit java-log4j-api)
6516 (name "java-log4j-core")
6518 `(("java-osgi-core" ,java-osgi-core)
6519 ("java-hamcrest-core" ,java-hamcrest-core)
6520 ("java-log4j-api" ,java-log4j-api)
6521 ("java-mail" ,java-mail)
6522 ("java-jboss-jms-api-spec" ,java-jboss-jms-api-spec)
6523 ("java-lmax-disruptor" ,java-lmax-disruptor)
6524 ("java-kafka" ,java-kafka-clients)
6525 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
6526 ("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
6527 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
6528 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)
6529 ("java-fasterxml-jackson-dataformat-xml" ,java-fasterxml-jackson-dataformat-xml)
6530 ("java-fasterxml-jackson-dataformat-yaml" ,java-fasterxml-jackson-dataformat-yaml)
6531 ("java-commons-compress" ,java-commons-compress)
6532 ("java-commons-csv" ,java-commons-csv)
6533 ("java-jeromq" ,java-jeromq)
6534 ("java-junit" ,java-junit)))
6536 `(("hamcrest" ,java-hamcrest-all)
6537 ("java-commons-io" ,java-commons-io)
6538 ("java-commons-lang3" ,java-commons-lang3)
6539 ("slf4j" ,java-slf4j-api)))
6541 `(#:tests? #f ; tests require more dependencies
6542 #:test-dir "src/test"
6543 #:source-dir "src/main/java"
6544 #:jar-name "log4j-core.jar"
6547 (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out")
6550 (modify-phases %standard-phases
6551 (add-after 'unpack 'enter-dir
6552 (lambda _ (chdir "log4j-core") #t)))))
6553 (synopsis "Core component of the Log4j framework")
6554 (description "This package provides the core component of the Log4j
6555 logging framework for Java.")))
6557 (define-public java-log4j-1.2-api
6559 (inherit java-log4j-api)
6560 (name "java-log4j-1.2-api")
6562 `(#:jar-name "java-log4j-1.2-api.jar"
6563 #:source-dir "log4j-1.2-api/src/main/java"
6565 ;; Tests require maven-model (and other maven subprojects), which is a
6566 ;; cyclic dependency.
6569 `(("log4j-api" ,java-log4j-api)
6570 ("log4j-core" ,java-log4j-core)
6571 ("osgi-core" ,java-osgi-core)
6572 ("eclipse-osgi" ,java-eclipse-osgi)
6573 ("java-lmax-disruptor" ,java-lmax-disruptor)))))
6575 (define-public java-commons-cli
6577 (name "java-commons-cli")
6581 (uri (string-append "mirror://apache/commons/cli/source/"
6582 "commons-cli-" version "-src.tar.gz"))
6585 "05hgi2z01fqz374y719gl1dxzqvzci5af071zm7vxrjg9vczipm1"))))
6586 (build-system ant-build-system)
6589 `(#:jar-name "commons-cli.jar"))
6591 `(("java-junit" ,java-junit)
6592 ("java-hamcrest-core" ,java-hamcrest-core)))
6593 (home-page "https://commons.apache.org/cli/")
6594 (synopsis "Command line arguments and options parsing library")
6595 (description "The Apache Commons CLI library provides an API for parsing
6596 command line options passed to programs. It is also able to print help
6597 messages detailing the options available for a command line tool.
6599 Commons CLI supports different types of options:
6602 @item POSIX like options (ie. tar -zxvf foo.tar.gz)
6603 @item GNU like long options (ie. du --human-readable --max-depth=1)
6604 @item Java like properties (ie. java -Djava.awt.headless=true Foo)
6605 @item Short options with value attached (ie. gcc -O2 foo.c)
6606 @item long options with single hyphen (ie. ant -projecthelp)
6609 This is a part of the Apache Commons Project.")
6610 (license license:asl2.0)))
6612 (define-public java-commons-codec
6614 (name "java-commons-codec")
6618 (uri (string-append "mirror://apache/commons/codec/source/"
6619 "commons-codec-" version "-src.tar.gz"))
6622 "1w9qg30y4s0x8gnmr2fgj4lyplfn788jqxbcz27lf5kbr6n8xr65"))))
6623 (build-system ant-build-system)
6624 (outputs '("out" "doc"))
6626 `(#:test-target "test"
6628 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
6629 (junit (assoc-ref %build-inputs "java-junit")))
6630 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
6631 (string-append "-Dhamcrest.jar=" hamcrest
6632 "/share/java/hamcrest-core.jar")
6633 ;; Do not append version to jar.
6634 "-Dfinal.name=commons-codec"))
6636 (modify-phases %standard-phases
6637 (add-after 'build 'build-javadoc ant-build-javadoc)
6638 (replace 'install (install-jars "dist"))
6639 (add-after 'install 'install-doc (install-javadoc "dist/docs/api")))))
6641 `(("java-junit" ,java-junit)
6642 ("java-hamcrest-core" ,java-hamcrest-core)))
6643 (home-page "https://commons.apache.org/codec/")
6644 (synopsis "Common encoders and decoders such as Base64, Hex, Phonetic and URLs")
6645 (description "The codec package contains simple encoder and decoders for
6646 various formats such as Base64 and Hexadecimal. In addition to these widely
6647 used encoders and decoders, the codec package also maintains a collection of
6648 phonetic encoding utilities.
6650 This is a part of the Apache Commons Project.")
6651 (license license:asl2.0)))
6653 (define-public java-commons-daemon
6655 (name "java-commons-daemon")
6659 (uri (string-append "mirror://apache/commons/daemon/source/"
6660 "commons-daemon-" version "-src.tar.gz"))
6663 "141gkhfzv5v3pdhic6y4ardq2dhsa3v36j8wmmhy6f8mac48fp7n"))))
6664 (build-system ant-build-system)
6666 `(#:test-target "test"
6668 (modify-phases %standard-phases
6669 (add-after 'build 'build-javadoc ant-build-javadoc)
6670 (replace 'install (install-jars "dist"))
6671 (add-after 'install 'install-doc (install-javadoc "dist/docs/api")))))
6673 `(("java-junit" ,java-junit)))
6674 (home-page "https://commons.apache.org/daemon/")
6675 (synopsis "Library to launch Java applications as daemons")
6676 (description "The Daemon package from Apache Commons can be used to
6677 implement Java applications which can be launched as daemons. For example the
6678 program will be notified about a shutdown so that it can perform cleanup tasks
6679 before its process of execution is destroyed by the operation system.
6681 This package contains the Java library. You will also need the actual binary
6682 for your architecture which is provided by the jsvc package.
6684 This is a part of the Apache Commons Project.")
6685 (license license:asl2.0)))
6687 (define-public java-javaewah
6689 (name "java-javaewah")
6693 (uri (string-append "https://github.com/lemire/javaewah/"
6694 "archive/JavaEWAH-" version ".tar.gz"))
6697 "1n7j1r1h24wlhwv9zdcj6yqjrhma2ixwyzm15l5vrv6yqjs6753b"))))
6698 (build-system ant-build-system)
6699 (arguments `(#:jar-name "javaewah.jar"))
6701 `(("java-junit" ,java-junit)
6702 ("java-hamcrest-core" ,java-hamcrest-core)))
6703 (home-page "https://github.com/lemire/javaewah")
6704 (synopsis "Compressed alternative to the Java @code{BitSet} class")
6705 (description "This is a word-aligned compressed variant of the Java
6706 @code{Bitset} class. It provides both a 64-bit and a 32-bit RLE-like
6707 compression scheme. It can be used to implement bitmap indexes.
6709 The goal of word-aligned compression is not to achieve the best compression,
6710 but rather to improve query processing time. Hence, JavaEWAH tries to save CPU
6711 cycles, maybe at the expense of storage. However, the EWAH scheme is always
6712 more efficient storage-wise than an uncompressed bitmap (as implemented in the
6713 @code{BitSet} class by Sun).")
6714 ;; GPL2.0 derivates are explicitly allowed.
6715 (license license:asl2.0)))
6717 (define-public java-slf4j-api
6719 (name "java-slf4j-api")
6723 (uri (string-append "https://www.slf4j.org/dist/slf4j-"
6727 "13j51sgzmhhdrfa74gkal5zpip7r1440dh7zsi2c8bpb2zs1v8kb"))
6728 (modules '((guix build utils)))
6729 ;; Delete bundled jars.
6732 (for-each delete-file (find-files "." "\\.jar$"))
6734 (build-system ant-build-system)
6736 `(#:jar-name "slf4j-api.jar"
6737 #:source-dir "slf4j-api/src/main"
6738 #:test-dir "slf4j-api/src/test"
6740 (modify-phases %standard-phases
6741 (add-after 'build 'regenerate-jar
6743 ;; pom.xml ignores these files in the jar creation process. If we don't,
6744 ;; we get the error "This code should have never made it into slf4j-api.jar"
6745 (delete-file-recursively "build/classes/org/slf4j/impl")
6746 (invoke "jar" "-cf" "build/jar/slf4j-api.jar" "-C"
6747 "build/classes" ".")))
6748 (add-before 'check 'dont-test-abstract-classes
6750 ;; abstract classes are not meant to be run with junit
6751 (substitute* "build.xml"
6752 (("<include name=\"\\*\\*/\\*Test.java\" />")
6753 (string-append "<include name=\"**/*Test.java\" />"
6754 "<exclude name=\"**/MultithreadedInitializationTest"
6758 `(("java-junit" ,java-junit)
6759 ("java-hamcrest-core" ,java-hamcrest-core)))
6760 (home-page "https://www.slf4j.org/")
6761 (synopsis "Simple logging facade for Java")
6762 (description "The Simple Logging Facade for Java (SLF4J) serves as a
6763 simple facade or abstraction for various logging
6764 frameworks (e.g. @code{java.util.logging}, @code{logback}, @code{log4j})
6765 allowing the end user to plug in the desired logging framework at deployment
6767 (license license:expat)))
6769 (define java-slf4j-api-bootstrap
6771 (inherit java-slf4j-api)
6772 (name "java-slf4j-api-bootstrap")
6775 (substitute-keyword-arguments (package-arguments java-slf4j-api)
6776 ((#:tests? _ #f) #f)))))
6778 (define-public java-slf4j-simple
6780 (name "java-slf4j-simple")
6782 (source (package-source java-slf4j-api))
6783 (build-system ant-build-system)
6785 `(#:jar-name "slf4j-simple.jar"
6786 #:source-dir "slf4j-simple/src/main"
6787 #:test-dir "slf4j-simple/src/test"
6789 (modify-phases %standard-phases
6790 ;; The tests need some test classes from slf4j-api
6791 (add-before 'check 'build-slf4j-api-test-helpers
6793 ;; Add current dir to CLASSPATH ...
6795 (string-append (getcwd) ":" (getenv "CLASSPATH")))
6796 ;; ... and build test helper classes here:
6799 ,@(find-files "slf4j-api/src/test" ".*\\.java"))))))))
6801 `(("java-junit" ,java-junit)
6802 ("java-hamcrest-core" ,java-hamcrest-core)
6803 ("java-slf4j-api" ,java-slf4j-api)))
6804 (home-page "https://www.slf4j.org/")
6805 (synopsis "Simple implementation of simple logging facade for Java")
6806 (description "SLF4J binding for the Simple implementation, which outputs
6807 all events to System.err. Only messages of level INFO and higher are
6809 (license license:expat)))
6811 (define-public antlr2
6817 (uri (string-append "https://www.antlr2.org/download/antlr-"
6821 "1ffvcwdw73id0dk6pj2mlxjvbg0662qacx4ylayqcxgg381fnfl5"))
6822 (modules '((guix build utils)))
6825 (delete-file "antlr.jar")
6826 (substitute* "lib/cpp/antlr/CharScanner.hpp"
6830 "#define EOF (-1)\n"
6831 "#include <strings.h>")))
6832 (substitute* "configure"
6835 (build-system gnu-build-system)
6837 `(#:tests? #f ; no test target
6838 #:imported-modules ((guix build ant-build-system)
6839 (guix build syscalls)
6840 ,@%gnu-build-system-modules)
6841 #:modules (((guix build ant-build-system) #:prefix ant:)
6842 (guix build gnu-build-system)
6845 (modify-phases %standard-phases
6846 (add-after 'install 'strip-jar-timestamps
6847 (assoc-ref ant:%standard-phases 'strip-jar-timestamps))
6848 (add-before 'configure 'fix-timestamp
6850 (substitute* "configure"
6851 (("^TIMESTAMP.*") "TIMESTAMP=19700101\n"))
6853 (add-after 'configure 'fix-bin-ls
6855 (substitute* (find-files "." "Makefile")
6861 ("java" ,icedtea "jdk")))
6863 `(("java" ,icedtea)))
6864 (home-page "https://www.antlr2.org")
6865 (synopsis "Framework for constructing recognizers, compilers, and translators")
6866 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
6867 is a language tool that provides a framework for constructing recognizers,
6868 compilers, and translators from grammatical descriptions containing Java, C#,
6869 C++, or Python actions. ANTLR provides excellent support for tree construction,
6870 tree walking, and translation.")
6871 (license license:public-domain)))
6873 (define-public java-stringtemplate-3
6875 (name "java-stringtemplate")
6879 (uri (string-append "https://github.com/antlr/website-st4/raw/"
6880 "gh-pages/download/stringtemplate-"
6884 "086yj68np1vqhkj7483diz3km6s6y4gmwqswa7524a0ca6vxn2is"))))
6885 (build-system ant-build-system)
6887 `(#:jar-name (string-append ,name "-" ,version ".jar")
6889 #:modules ((guix build ant-build-system)
6893 (modify-phases %standard-phases
6894 (add-before 'check 'fix-tests
6896 (substitute* "build.xml"
6897 (("\\$\\{test.home\\}/java")
6898 "${test.home}/org"))
6900 (add-before 'build 'generate-grammar
6902 (with-directory-excursion "src/org/antlr/stringtemplate/language/"
6903 (for-each (lambda (file)
6904 (format #t "~a\n" file)
6905 (invoke "antlr" file))
6906 '("template.g" "angle.bracket.template.g" "action.g"
6907 "eval.g" "group.g" "interface.g")))
6911 ("java-junit" ,java-junit)))
6912 (home-page "https://www.stringtemplate.org")
6913 (synopsis "Template engine to generate formatted text output")
6914 (description "StringTemplate is a java template engine (with ports for C#,
6915 Objective-C, JavaScript, Scala) for generating source code, web pages, emails,
6916 or any other formatted text output. StringTemplate is particularly good at
6917 code generators, multiple site skins, and internationalization / localization.
6918 StringTemplate also powers ANTLR.")
6919 (license license:bsd-3)))
6921 ;; antlr3 is partially written using antlr3 grammar files. It also depends on
6922 ;; ST4 (stringtemplate4), which is also partially written using antlr3 grammar
6923 ;; files and uses antlr3 at runtime. The latest version requires a recent version
6924 ;; of antlr3 at runtime.
6925 ;; Fortunately, ST4 4.0.6 can be built with an older antlr3, and we use antlr3.3.
6926 ;; This version of ST4 is sufficient for the latest antlr3.
6927 ;; We use ST4 4.0.6 to build a boostrap antlr3 (latest version), and build
6928 ;; the latest ST4 with it. Then we build our final antlr3 that will be linked
6929 ;; against the latest ST4.
6930 ;; antlr3.3 still depends on antlr3 to generate some files, so we use an
6931 ;; even older version, antlr3.1, to generate them. Fortunately antlr3.1 uses
6932 ;; only grammar files with the antlr2 syntax.
6933 ;; So we build antlr3.1 -> antlr3.3 -> ST4.0.6 -> antlr3-bootstrap -> ST4 -> antlr3.
6935 (define-public java-stringtemplate
6936 (package (inherit java-stringtemplate-3)
6937 (name "java-stringtemplate")
6941 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/"
6943 (file-name (string-append name "-" version ".tar.gz"))
6946 "1pri8hqa95rfdkjy55icl5q1m09zwp5k67ib14abas39s4v3w087"))))
6947 (build-system ant-build-system)
6949 `(#:jar-name (string-append ,name "-" ,version ".jar")
6950 #:tests? #f ; FIXME: tests fail for unknown reasons
6952 #:modules ((guix build ant-build-system)
6956 (modify-phases %standard-phases
6957 (add-before 'check 'fix-test-target
6959 (substitute* "build.xml"
6960 (("\\$\\{test.home\\}/java") "${test.home}/")
6961 (("\\*Test.java") "Test*.java"))
6963 (add-before 'build 'generate-grammar
6965 (with-directory-excursion "src/org/stringtemplate/v4/compiler/"
6966 (for-each (lambda (file)
6967 (format #t "~a\n" file)
6968 (invoke "antlr3" file))
6969 '("STParser.g" "Group.g" "CodeGenerator.g")))
6972 `(("antlr3" ,antlr3-bootstrap)
6974 ("java-stringtemplate" ,java-stringtemplate-3)
6975 ("java-junit" ,java-junit)))))
6977 (define java-stringtemplate-4.0.6
6978 (package (inherit java-stringtemplate)
6979 (name "java-stringtemplate")
6983 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/ST-"
6985 (file-name (string-append name "-" version ".tar.gz"))
6988 "0hjmh1ahdsh3w825i67mli9l4nncc4l6hdbf9ma91jvlj590sljp"))))
6990 `(("antlr3" ,antlr3-3.3)
6992 ("java-stringtemplate" ,java-stringtemplate-3)))))
6994 (define-public antlr3
7000 (uri (string-append "https://github.com/antlr/antlr3/archive/"
7002 (file-name (string-append name "-" version ".tar.gz"))
7005 "0218v683081lg54z9hvjxinhxd4dqp870jx6n39gslm0bkyi4vd6"))))
7006 (build-system ant-build-system)
7008 `(#:jar-name (string-append ,name "-" ,version ".jar")
7009 #:source-dir "tool/src/main/java:runtime/Java/src/main/java:tool/src/main/antlr3"
7012 (modify-phases %standard-phases
7013 (add-after 'install 'bin-install
7014 (lambda* (#:key inputs outputs #:allow-other-keys)
7015 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
7016 (bin (string-append (assoc-ref outputs "out") "/bin")))
7018 (with-output-to-file (string-append bin "/antlr3")
7021 (string-append "#!" (which "sh") "\n"
7022 "java -cp " jar "/" ,name "-" ,version ".jar:"
7024 (find-files (assoc-ref inputs "stringtemplate")
7028 (find-files (assoc-ref inputs "stringtemplate4")
7032 (find-files (string-append
7033 (assoc-ref inputs "antlr")
7036 " org.antlr.Tool $*"))))
7037 (chmod (string-append bin "/antlr3") #o755))
7039 (add-before 'build 'generate-grammar
7041 (chdir "tool/src/main/antlr3/org/antlr/grammar/v3/")
7042 (for-each (lambda (file)
7045 (invoke "antlr3" file))
7046 '("ANTLR.g" "ANTLRTreePrinter.g" "ActionAnalysis.g"
7047 "AssignTokenTypesWalker.g"
7048 "ActionTranslator.g" "TreeToNFAConverter.g"
7049 "ANTLRv3.g" "ANTLRv3Tree.g" "LeftRecursiveRuleWalker.g"
7050 "CodeGenTreeWalker.g" "DefineGrammarItemsWalker.g"))
7051 (substitute* "ANTLRParser.java"
7052 (("public Object getTree") "public GrammarAST getTree"))
7053 (substitute* "ANTLRv3Parser.java"
7054 (("public Object getTree") "public CommonTree getTree"))
7055 (chdir "../../../../../java")
7056 (substitute* "org/antlr/tool/LeftRecursiveRuleAnalyzer.java"
7057 (("import org.antlr.grammar.v3.\\*;") "import org.antlr.grammar.v3.*;
7058 import org.antlr.grammar.v3.ANTLRTreePrinter;"))
7059 (substitute* "org/antlr/tool/ErrorManager.java"
7060 (("case NO_SUCH_ATTRIBUTE_PASS_THROUGH:") ""))
7061 (chdir "../../../..")
7063 (add-before 'build 'fix-build-xml
7065 (substitute* "build.xml"
7066 (("target name=\"compile\">")
7067 "target name=\"compile\">
7068 <copy todir=\"${classes.dir}\">
7069 <fileset dir=\"tool/src/main/resources\">
7070 <include name=\"**/*.stg\"/>
7071 <include name=\"**/*.st\"/>
7072 <include name=\"**/*.sti\"/>
7073 <include name=\"**/STLexer.tokens\"/>
7079 ("antlr3" ,antlr3-bootstrap)))
7081 `(("junit" ,java-junit)
7082 ("stringtemplate" ,java-stringtemplate-3)
7083 ("stringtemplate4" ,java-stringtemplate)))
7085 `(("stringtemplate" ,java-stringtemplate-3)
7087 ("stringtemplate4" ,java-stringtemplate-4.0.6)))
7088 (home-page "https://www.antlr3.org")
7089 (synopsis "Framework for constructing recognizers, compilers, and translators")
7090 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
7091 is a language tool that provides a framework for constructing recognizers,
7092 compilers, and translators from grammatical descriptions containing Java, C#,
7093 C++, or Python actions. ANTLR provides excellent support for tree construction,
7094 tree walking, and translation.")
7095 (license license:bsd-3)))
7097 (define antlr3-bootstrap
7100 (name "antlr3-bootstrap")
7103 ("antlr3" ,antlr3-3.3)))
7105 `(("junit" ,java-junit)))))
7114 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
7115 "gh-pages/download/antlr-"
7119 "0qgg5vgsm4l1d6dj9pfbaa25dpv2ry2gny8ajy4vvgvfklw97b3m"))
7121 (search-patches "antlr3-3_3-fix-java8-compilation.patch"))))
7123 `(#:jar-name (string-append ,name "-" ,version ".jar")
7124 #:source-dir (string-join '("tool/src/main/java"
7125 "runtime/Java/src/main/java"
7126 "tool/src/main/antlr2"
7127 "tool/src/main/antlr3")
7129 #:tests? #f ; FIXME: tests seem to require maven plugin
7130 #:modules ((guix build ant-build-system)
7134 (modify-phases %standard-phases
7135 (add-after 'install 'bin-install
7136 (lambda* (#:key inputs outputs #:allow-other-keys)
7137 (let* ((out (assoc-ref outputs "out"))
7138 (jar (string-append out "/share/java"))
7139 (bin (string-append out "/bin")))
7141 (with-output-to-file (string-append bin "/antlr3")
7145 "#!" (which "sh") "\n"
7146 "java -cp " jar "/antlr3-3.3.jar:"
7148 (append (find-files (assoc-ref inputs "java-stringtemplate")
7150 (find-files (string-append (assoc-ref inputs "antlr")
7154 " org.antlr.Tool $*"))))
7155 (chmod (string-append bin "/antlr3") #o755)
7157 (add-before 'build 'generate-grammar
7159 (substitute* "tool/src/main/java/org/antlr/tool/Grammar.java"
7160 (("import org.antlr.grammar.v2.\\*;")
7161 "import org.antlr.grammar.v2.*;\n
7162 import org.antlr.grammar.v2.TreeToNFAConverter;\n
7163 import org.antlr.grammar.v2.DefineGrammarItemsWalker;\n
7164 import org.antlr.grammar.v2.ANTLRTreePrinter;"))
7165 (with-directory-excursion "tool/src/main/antlr2/org/antlr/grammar/v2/"
7166 (for-each (lambda (file)
7167 (format #t "~a\n" file)
7168 (invoke "antlr" file))
7169 '("antlr.g" "antlr.print.g" "assign.types.g"
7170 "buildnfa.g" "codegen.g" "define.g")))
7171 (with-directory-excursion "tool/src/main/antlr3/org/antlr/grammar/v3/"
7172 (for-each (lambda (file)
7173 (format #t "~a\n" file)
7174 (invoke "antlr3" file))
7175 '("ActionAnalysis.g" "ActionTranslator.g" "ANTLRv3.g"
7178 (add-before 'build 'fix-build-xml
7180 (substitute* "build.xml"
7181 (("target name=\"compile\">")
7182 "target name=\"compile\">
7183 <copy todir=\"${classes.dir}\">
7184 <fileset dir=\"tool/src/main/resources\">
7185 <include name=\"**/*.stg\"/>
7186 <include name=\"**/*.st\"/>
7187 <include name=\"**/*.sti\"/>
7188 <include name=\"**/STLexer.tokens\"/>
7194 ("antlr3" ,antlr3-3.1)))
7196 `(("junit" ,java-junit)))
7198 `(("java-stringtemplate" ,java-stringtemplate-3)
7200 ("antlr3" ,antlr3-3.1)))))
7202 (define-public antlr3-3.1
7208 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
7209 "gh-pages/download/antlr-"
7213 "0sfimc9cpbgrihz4giyygc8afgpma2c93yqpwb951giriri6x66z"))
7215 (search-patches "antlr3-3_1-fix-java8-compilation.patch"))))
7217 `(#:jar-name (string-append "antlr3-" ,version ".jar")
7218 #:source-dir "src:runtime/Java/src"
7221 (modify-phases %standard-phases
7222 (add-after 'install 'bin-install
7223 (lambda* (#:key inputs outputs #:allow-other-keys)
7224 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
7225 (bin (string-append (assoc-ref outputs "out") "/bin")))
7227 (with-output-to-file (string-append bin "/antlr3")
7230 (string-append "#!" (which "sh") "\n"
7231 "java -cp " jar "/antlr3-3.1.jar:"
7233 (find-files (assoc-ref inputs "stringtemplate")
7237 (find-files (string-append
7238 (assoc-ref inputs "antlr")
7241 " org.antlr.Tool $*"))))
7242 (chmod (string-append bin "/antlr3") #o755))
7244 (add-before 'build 'generate-grammar
7246 (let ((dir "src/org/antlr/tool/"))
7247 (for-each (lambda (file)
7250 (invoke "antlr" "-o" dir (string-append dir file)))
7251 '("antlr.g" "antlr.print.g" "assign.types.g"
7252 "buildnfa.g" "define.g")))
7253 (format #t "codegen.g\n")
7254 (invoke "antlr" "-o" "src/org/antlr/codegen"
7255 "src/org/antlr/codegen/codegen.g")
7257 (add-before 'build 'fix-build-xml
7259 (substitute* "build.xml"
7260 (("target name=\"compile\">")
7261 "target name=\"compile\">
7262 <copy todir=\"${classes.dir}\">
7263 <fileset dir=\"src\">
7264 <include name=\"**/*.stg\"/>
7265 <include name=\"**/*.st\"/>
7266 <include name=\"**/*.sti\"/>
7267 <include name=\"**/STLexer.tokens\"/>
7272 `(("antlr" ,antlr2)))
7274 `(("junit" ,java-junit)))
7276 `(("stringtemplate" ,java-stringtemplate-3)))))
7278 (define-public java-commons-cli-1.2
7279 ;; This is a bootstrap dependency for Maven2.
7281 (inherit java-commons-cli)
7285 (uri (string-append "mirror://apache/commons/cli/source/"
7286 "commons-cli-" version "-src.tar.gz"))
7289 "0rvfgzgv2pc1m091dfj3ih9ddsjjppr1f1wf0qmc3bk6b1kwv2dm"))))
7291 `(#:jar-name "commons-cli.jar"
7293 (modify-phases %standard-phases
7294 (add-before 'check 'fix-build-xml
7295 (lambda* (#:key inputs #:allow-other-keys)
7296 (substitute* "build.xml"
7297 (("dir=\"\\$\\{test.home\\}/java\"")
7298 "dir=\"${test.home}\""))
7301 `(("java-junit" ,java-junit)))))
7303 (define-public java-microemulator-cldc
7305 (name "java-microemulator-cldc")
7309 (uri (string-append "https://github.com/barteo/microemu/archive/"
7311 (string-map (lambda (c) (if (char=? c #\.) #\_ c))
7314 (file-name (string-append name "-" version ".tar.gz"))
7317 "1x1apmz38gkppxnwnygwmi12j54v4p258v8ddzn6dldkk7vak1ll"))))
7318 (build-system ant-build-system)
7320 `(#:jar-name "microemulator-cldc.jar"
7321 #:source-dir "microemu-cldc/src/main/java"
7322 #:tests? #f)); Requires even older software
7323 (home-page "https://github.com/barteo/microemu")
7324 (synopsis "J2ME CLDC emulator")
7325 (description "Microemulator is a Java 2 Micro Edition (J2ME) CLDC/MIDP
7326 Emulator. It allows to demonstrate MIDlet based applications in web browser
7327 applet and can be run as a standalone java application.")
7328 (license (list license:asl2.0
7330 license:lgpl2.1+))))
7332 (define-public java-datanucleus-javax-persistence
7334 (name "java-datanucleus-javax-persistence")
7338 (uri (string-append "https://github.com/datanucleus/"
7339 "javax.persistence/archive/javax.persistence-"
7340 version "-release.tar.gz"))
7343 "11jx0fjwgc2hhbqqgdd6m1pf2fplf9vslppygax0y1z5csnqjhpx"))))
7344 (build-system ant-build-system)
7346 `(#:jar-name "java-datanucleus-javax-persistence.jar"
7348 #:source-dir "src/main/java"
7349 #:tests? #f)); no tests
7350 (home-page "https://github.com/datanucleus/javax.persistence")
7351 (synopsis "JPA API")
7352 (description "This package contains a clean definition of JPA API intended
7353 for use with DataNucleus JPA since the JCP haven't provided an official JPA API
7354 jar. See @url{http://java.net/projects/jpa-spec/downloads} for the specification
7355 used to generate this API.")
7356 (license (list license:edl1.0 license:epl1.0))))
7358 (define-public java-osgi-cmpn
7360 (name "java-osgi-cmpn")
7364 (uri (string-append "https://repo1.maven.org/maven2/"
7365 "org/osgi/osgi.cmpn/" version "/osgi.cmpn-"
7366 version "-sources.jar"))
7369 "1lmb6xyrmkqdhv1kayf0514rlwq6ypvs4m44ibrck3snp8241wys"))))
7370 (build-system ant-build-system)
7372 `(#:jar-name "osgi-cmpn.jar"
7373 #:tests? #f)); no tests
7375 `(("annotation" ,java-osgi-annotation)
7376 ("core" ,java-osgi-core)
7377 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
7378 ("microemulator" ,java-microemulator-cldc)
7379 ("servlet" ,java-classpathx-servletapi)))
7380 (home-page "https://www.osgi.org")
7381 (synopsis "Compendium specification module of OSGi framework")
7383 "OSGi, for Open Services Gateway initiative framework, is a module system
7384 and service platform for the Java programming language. This package contains
7385 the compendium specification module, providing interfaces and classes for use
7386 in compiling bundles.")
7387 (license license:asl2.0)))
7389 (define-public java-osgi-service-component-annotations
7391 (name "java-osgi-service-component-annotations")
7395 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
7396 "org.osgi.service.component.annotations/"
7397 version "/org.osgi.service.component.annotations-"
7398 version "-sources.jar"))
7401 "15rq9cmp4fpn74q44m4j35qsqmjf5lx3hcrk6pzvbhc08igic2f0"))))
7402 (build-system ant-build-system)
7404 `(#:jar-name "osgi-service-component-annotations.jar"
7405 #:tests? #f)); no tests
7407 `(("annotation" ,java-osgi-annotation)))
7408 (home-page "https://www.osgi.org")
7409 (synopsis "Support annotations for osgi-service-component")
7411 "OSGi, for Open Services Gateway initiative framework, is a module system
7412 and service platform for the Java programming language. This package contains
7413 the support annotations for osgi-service-component.")
7414 (license license:asl2.0)))
7416 (define-public java-osgi-dto
7418 (name "java-osgi-dto")
7422 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
7423 "org.osgi.dto/" version "/org.osgi.dto-"
7424 version "-sources.jar"))
7427 "0f4bqjzadn0hwk6sd3h5gvbyfp3yci1s6r0v770cc15p0pg627yr"))))
7428 (build-system ant-build-system)
7430 `(#:jar-name "osgi-dto.jar"
7431 #:tests? #f)); no tests
7433 `(("annotation" ,java-osgi-annotation)))
7434 (home-page "https://www.osgi.org")
7435 (synopsis "Data Transfer Objects")
7437 "OSGi, for Open Services Gateway initiative framework, is a module system
7438 and service platform for the Java programming language. This package contains
7439 the Data Transfer Objects. It is easily serializable having only public fields
7440 of primitive types and their wrapper classes, Strings, and DTOs. List, Set,
7441 Map and array aggregates may also be used. The aggregates must only hold
7442 objects of the listed types or aggregates.")
7443 (license license:asl2.0)))
7445 (define-public java-osgi-resource
7447 (name "java-osgi-resource")
7451 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
7452 "org.osgi.resource/"
7453 version "/org.osgi.resource-"
7454 version "-sources.jar"))
7457 "0hi0fsc5v99q22bd7lrkvpz1y0ds4w9arjldpwsrcpqvz2js7q2d"))))
7458 (build-system ant-build-system)
7460 `(#:jar-name "osgi-resource.jar"
7461 #:tests? #f)); no tests
7463 `(("annotation" ,java-osgi-annotation)
7464 ("dto" ,java-osgi-dto)))
7465 (home-page "https://www.osgi.org")
7466 (synopsis "OSGI Resource")
7468 "OSGi, for Open Services Gateway initiative framework, is a module system
7469 and service platform for the Java programming language. This package contains
7470 the definition of common types in osgi packages.")
7471 (license license:asl2.0)))
7473 (define-public java-osgi-namespace-contract
7475 (name "java-osgi-namespace-contract")
7479 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
7480 "org.osgi.namespace.contract/"
7481 version "/org.osgi.namespace.contract-"
7482 version "-sources.jar"))
7485 "1iz4f2i0fvqrlq90ki9nfzcfpvy2av434ri25bglywqssx8mmp36"))))
7486 (build-system ant-build-system)
7488 `(("resource" ,java-osgi-resource)
7489 ("annotation" ,java-osgi-annotation)))
7491 `(#:jar-name "osgi-namespace-contract.jar"
7492 #:tests? #f)); no tests
7493 (home-page "https://www.osgi.org")
7494 (synopsis "Contract Capability and Requirement Namespace")
7496 "OSGi, for Open Services Gateway initiative framework, is a module system
7497 and service platform for the Java programming language. This package contains
7498 the names for the attributes and directives for a namespace with contracts.")
7499 (license license:asl2.0)))
7501 (define-public java-osgi-namespace-extender
7503 (name "java-osgi-namespace-extender")
7507 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7508 "org.osgi.namespace.extender/"
7509 version "/org.osgi.namespace.extender-"
7510 version "-sources.jar"))
7513 "0jgqiak2i05qv6j3gd33xlaifzzc0ylxxk376v2x0apfg3vvixmz"))))
7514 (build-system ant-build-system)
7516 `(("resource" ,java-osgi-resource)
7517 ("annotation" ,java-osgi-annotation)))
7519 `(#:jar-name "osgi-namespace-extendent.jar"
7520 #:tests? #f)); no tests
7521 (home-page "https://www.osgi.org")
7522 (synopsis "Extender Capability and Requirement Namespace")
7524 "OSGi, for Open Services Gateway initiative framework, is a module system
7525 and service platform for the Java programming language. This package contains
7526 the names for the attributes and directives for an extender namespace.")
7527 (license license:asl2.0)))
7529 (define-public java-osgi-namespace-service
7531 (name "java-osgi-namespace-service")
7535 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7536 "org.osgi.namespace.service/"
7537 version "/org.osgi.namespace.service-"
7538 version "-sources.jar"))
7541 "0qmw8n2449nkmm56d1znz9zhazb6ya3vsimd5bf5jg23zzhgl8c8"))))
7542 (build-system ant-build-system)
7544 `(("resource" ,java-osgi-resource)
7545 ("annotation" ,java-osgi-annotation)))
7547 `(#:jar-name "osgi-namespace-service.jar"
7548 #:tests? #f)); no tests
7549 (home-page "https://www.osgi.org")
7550 (synopsis "Service Capability and Requirement Namespace")
7552 "OSGi, for Open Services Gateway initiative framework, is a module system
7553 and service platform for the Java programming language. This package contains
7554 the names for the attributes and directives for a service namespace.")
7555 (license license:asl2.0)))
7557 (define-public java-osgi-util-function
7559 (name "java-osgi-util-function")
7563 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7564 "org.osgi.util.function/"
7565 version "/org.osgi.util.function-"
7566 version "-sources.jar"))
7569 "04l7j3hwmmj28w23m7paca0afzncs42j2mdr3liqq8kvp548sc6x"))))
7570 (build-system ant-build-system)
7572 `(#:jar-name "osgi-util-function.jar"
7573 #:tests? #f)); no tests
7575 `(("annotation" ,java-osgi-annotation)))
7576 (home-page "https://www.osgi.org")
7577 (synopsis "OSGI Util Function")
7579 "OSGi, for Open Services Gateway initiative framework, is a module system
7580 and service platform for the Java programming language. This package contains
7581 an interface for a function that accepts a single argument and produces a result.")
7582 (license license:asl2.0)))
7584 (define-public java-osgi-util-promise
7586 (name "java-osgi-util-promise")
7590 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7591 "org.osgi.util.promise/"
7592 version "/org.osgi.util.promise-"
7593 version "-sources.jar"))
7596 "0y34dwiflg1c4ahvkswpf9z02xph2sr9fm04ia5493x3lshpw22c"))))
7597 (build-system ant-build-system)
7599 `(#:jar-name "osgi-util-promise.jar"
7600 #:tests? #f)); no tests
7602 `(("annotation" ,java-osgi-annotation)
7603 ("function" ,java-osgi-util-function)))
7604 (home-page "https://www.osgi.org")
7605 (synopsis "Promise of a value")
7607 "OSGi, for Open Services Gateway initiative framework, is a module system
7608 and service platform for the Java programming language. This package contains
7609 an interface and utilitary classes for promises. A Promise represents a future
7610 value. It handles the interactions for asynchronous processing.")
7611 (license license:asl2.0)))
7613 (define-public java-osgi-service-metatype-annotations
7615 (name "java-osgi-service-metatype-annotations")
7619 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7620 "org.osgi.service.metatype.annotations/"
7621 version "/org.osgi.service.metatype.annotations-"
7622 version "-sources.jar"))
7625 "12rwm3349wk80vm88rcdgs4435m4jxkpkj5mrx326skkz2c6hyw6"))))
7626 (build-system ant-build-system)
7628 `(#:jar-name "osgi-service-metatype-annotations.jar"
7629 #:tests? #f)); no tests
7631 `(("annotation" ,java-osgi-annotation)))
7632 (home-page "https://www.osgi.org")
7633 (synopsis "Support annotations for metatype")
7635 "OSGi, for Open Services Gateway initiative framework, is a module system
7636 and service platform for the Java programming language. This package contains
7637 the support annotations for metatype.")
7638 (license license:asl2.0)))
7640 (define-public java-osgi-service-repository
7642 (name "java-osgi-service-repository")
7646 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7647 "org.osgi.service.repository/"
7648 version "/org.osgi.service.repository-"
7649 version "-sources.jar"))
7652 "1k41mhg7b58pd8nsghr2qwcjrxdnf1p9spsw9v11k4257g6rl06n"))))
7653 (build-system ant-build-system)
7655 `(#:jar-name "osgi-service-repository.jar"
7656 #:tests? #f)); no tests
7658 `(("annotation" ,java-osgi-annotation)
7659 ("promise" ,java-osgi-util-promise)
7660 ("resource" ,java-osgi-resource)))
7661 (home-page "https://www.osgi.org")
7662 (synopsis "OSGI service repository")
7664 "OSGi, for Open Services Gateway initiative framework, is a module system
7665 and service platform for the Java programming language. This package contains
7666 a repository service that contains resources.")
7667 (license license:asl2.0)))
7669 (define-public java-osgi-framework
7671 (name "java-osgi-framework")
7675 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7676 "org.osgi.framework/" version "/org.osgi.framework-"
7677 version "-sources.jar"))
7680 "1lwp2zfad3rybcc6q9bwz8xsgkc92ypzy5p6x54387f1qj65m73s"))))
7681 (build-system ant-build-system)
7683 `(#:jar-name "osgi-framework.jar"
7684 #:tests? #f)); no tests
7686 `(("annotation" ,java-osgi-annotation)
7687 ("resource" ,java-osgi-resource)
7688 ("dto" ,java-osgi-dto)))
7689 (home-page "https://www.osgi.org")
7690 (synopsis "OSGi framework")
7692 "OSGi, for Open Services Gateway initiative framework, is a module system
7693 and service platform for the Java programming language.")
7694 (license license:asl2.0)))
7696 (define-public java-osgi-service-log
7698 (name "java-osgi-service-log")
7702 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7703 "org.osgi.service.log/"
7704 version "/org.osgi.service.log-"
7705 version "-sources.jar"))
7708 "1029j30dzcwializzca0j3fkhwwz08kmmsha5agw1iccscimj6r0"))))
7709 (build-system ant-build-system)
7711 `(#:jar-name "osgi-service-log.jar"
7712 #:tests? #f)); no tests
7714 `(("java-osgi-framework" ,java-osgi-framework)))
7715 (home-page "https://www.osgi.org")
7716 (synopsis "Provides methods for bundles to write messages to the log")
7718 "OSGi, for Open Services Gateway initiative framework, is a module system
7719 and service platform for the Java programming language. This package contains
7721 (license license:asl2.0)))
7723 (define-public java-osgi-service-jdbc
7725 (name "java-osgi-service-jdbc")
7729 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7730 "org.osgi.service.jdbc/"
7731 version "/org.osgi.service.jdbc-"
7732 version "-sources.jar"))
7735 "11iln5v7bk469cgb9ddkrz9sa95b3733gqgaqw9xf5g6wq652yjz"))))
7736 (build-system ant-build-system)
7738 `(#:jar-name "osgi-service-jdbc.jar"
7739 #:tests? #f)); no tests
7740 (home-page "https://www.osgi.org")
7741 (synopsis "Factory for JDBC connection factories")
7743 "OSGi, for Open Services Gateway initiative framework, is a module system
7744 and service platform for the Java programming language. This package contains
7745 a factory for JDBC connection factories. There are 3 preferred connection
7746 factories for getting JDBC connections:
7749 @item @code{javax.sql.DataSource};
7750 @item @code{javax.sql.ConnectionPoolDataSource};
7751 @item @code{javax.sql.XADataSource}.
7753 (license license:asl2.0)))
7755 (define-public java-osgi-service-resolver
7757 (name "java-osgi-service-resolver")
7761 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7762 "org.osgi.service.resolver/"
7763 version "/org.osgi.service.resolver-"
7764 version "-sources.jar"))
7767 "1dzqn1ryfi2rq4zwsgp44bmj2wlfydjg1qbxw2b0z4xdjjy55vxd"))))
7768 (build-system ant-build-system)
7770 `(#:jar-name "osgi-service-resolver.jar"
7771 #:tests? #f)); no tests
7773 `(("annotation" ,java-osgi-annotation)
7774 ("resource" ,java-osgi-resource)))
7775 (home-page "https://www.osgi.org")
7776 (synopsis "OSGI Resolver service")
7778 "OSGi, for Open Services Gateway initiative framework, is a module system
7779 and service platform for the Java programming language. This package contains
7780 a resolver service that resolves the specified resources in the context supplied
7782 (license license:asl2.0)))
7784 (define-public java-osgi-util-tracker
7786 (name "java-osgi-util-tracker")
7790 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7791 "org.osgi.util.tracker/"
7792 version "/org.osgi.util.tracker-"
7793 version "-sources.jar"))
7796 "0c4fh9vxwzsx59r8dygda0gq2gx3z5vfhc3jsphlqwf5w0h403lz"))))
7797 (build-system ant-build-system)
7799 `(#:jar-name "osgi-util-tracker.jar"
7800 #:tests? #f)); no tests
7802 `(("framework" ,java-osgi-framework)
7803 ("annotation" ,java-osgi-annotation)))
7804 (home-page "https://www.osgi.org")
7805 (synopsis "Bundle tracking")
7807 "OSGi, for Open Services Gateway initiative framework, is a module system
7808 and service platform for the Java programming language. This package contains
7809 bundle tracking utility classes.")
7810 (license license:asl2.0)))
7812 (define-public java-osgi-service-cm
7814 (name "java-osgi-service-cm")
7818 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7819 "org.osgi.service.cm/"
7820 version "/org.osgi.service.cm-"
7821 version "-sources.jar"))
7824 "1z8kap48y3xi0ggj8v6czglfnpnd94mmismgi2wbqhj1nl5fzbp6"))))
7825 (build-system ant-build-system)
7827 `(#:jar-name "osgi-service-cm.jar"
7828 #:tests? #f)); no tests
7830 `(("framework" ,java-osgi-framework)
7831 ("annotation" ,java-osgi-annotation)))
7832 (home-page "https://www.osgi.org")
7833 (synopsis "OSGI Configuration Management")
7835 "OSGi, for Open Services Gateway initiative framework, is a module system
7836 and service platform for the Java programming language. This package contains
7837 utility classes for the configuration of services.")
7838 (license license:asl2.0)))
7840 (define-public java-osgi-service-packageadmin
7842 (name "java-osgi-service-packageadmin")
7846 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7847 "org.osgi.service.packageadmin/"
7848 version "/org.osgi.service.packageadmin-"
7849 version "-sources.jar"))
7852 "041mpxzi7g36wmcily6y4ccn3jx15akpdy8gmhyb7m98x7qfvn52"))))
7853 (build-system ant-build-system)
7855 `(#:jar-name "osgi-service-packageadmin.jar"
7856 #:tests? #f)); no tests
7858 `(("framework" ,java-osgi-framework)))
7859 (home-page "https://www.osgi.org")
7860 (synopsis "OSGI Package Administration")
7862 "OSGi, for Open Services Gateway initiative framework, is a module system
7863 and service platform for the Java programming language. This package contains
7864 the packageadmin service.")
7865 (license license:asl2.0)))
7867 (define-public java-ops4j-base-lang
7869 (name "java-ops4j-base-lang")
7873 (uri (string-append "https://github.com/ops4j/org.ops4j.base/"
7874 "archive/base-" version ".tar.gz"))
7877 "18hl3lpchgpv8yh5rlk39l2gif5dlfgb8gxjmncf39pr2dprkniw"))))
7878 (build-system ant-build-system)
7880 `(#:jar-name "java-ops4j-base-lang.jar"
7881 #:source-dir "ops4j-base-lang/src/main/java"
7882 #:tests? #f; no tests
7884 (modify-phases %standard-phases
7885 (add-before 'build 'add-test-file
7887 ;; That file is required by a test in ops4j-pax-exam-core-spi
7888 (mkdir-p "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang")
7889 (with-output-to-file "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang/pom.properties"
7893 "version=" ,version "\n"
7894 "groupId=org.ops4j.base"
7895 "artifactId=ops4j-base-lang\n"))))
7897 (home-page "https://ops4j1.jira.com/wiki/spaces/base/overview")
7898 (synopsis "Utility classes and extensions to be used in OPS4J projects")
7899 (description "OPS4J stands for Open Participation Software for Java. This
7900 package contains utilities and extensions related to @code{java.lang}.")
7901 (license license:asl2.0)))
7903 (define-public java-ops4j-base-monitors
7905 (inherit java-ops4j-base-lang)
7906 (name "java-ops4j-base-monitors")
7908 `(#:jar-name "java-ops4j-base-monitors.jar"
7909 #:source-dir "ops4j-base-monitors/src/main/java"
7910 #:tests? #f)); no tests
7912 `(("lang" ,java-ops4j-base-lang)))
7913 (description "OPS4J stands for Open Participation Software for Java. This
7914 package contains utilities and extensions related to monitoring.")))
7916 (define-public java-ops4j-base-io
7918 (inherit java-ops4j-base-lang)
7919 (name "java-ops4j-base-io")
7921 `(#:jar-name "java-ops4j-base-io.jar"
7922 #:source-dir "ops4j-base-io/src/main/java"
7923 #:test-dir "ops4j-base-io/src/test"
7925 (list "**/ListerTest.java")))
7927 `(("lang" ,java-ops4j-base-monitors)
7928 ("lang" ,java-ops4j-base-lang)))
7930 `(("junit" ,java-junit)
7931 ("hamcrest" ,java-hamcrest-core)))
7932 (description "OPS4J stands for Open Participation Software for Java. This
7933 package contains utilities and extensions related to handling streams and files.")))
7935 (define-public java-ops4j-base-util
7937 (inherit java-ops4j-base-lang)
7938 (name "java-ops4j-base-util")
7940 `(#:jar-name "java-ops4j-base-util.jar"
7941 #:source-dir "ops4j-base-util/src/main/java"
7942 #:test-dir "ops4j-base-util/src/test"))
7944 `(("lang" ,java-ops4j-base-lang)))
7946 `(("junit" ,java-junit)))
7947 (description "OPS4J stands for Open Participation Software for Java. This
7948 package contains utilities and extensions related to environment, i18n and
7951 (define-public java-ops4j-base-util-property
7953 (inherit java-ops4j-base-lang)
7954 (name "java-ops4j-base-util-property")
7956 `(#:jar-name "java-ops4j-base-util-property.jar"
7957 #:source-dir "ops4j-base-util-property/src/main/java"
7958 #:tests? #f)); no tests
7960 `(("lang" ,java-ops4j-base-lang)
7961 ("util" ,java-ops4j-base-util)))
7962 (description "OPS4J stands for Open Participation Software for Java. This
7963 package contains utilities and extensions related to resolving properties from
7964 different sources.")))
7966 (define-public java-ops4j-base-store
7968 (inherit java-ops4j-base-lang)
7969 (name "java-ops4j-base-store")
7971 `(#:jar-name "java-ops4j-base-store.jar"
7972 #:source-dir "ops4j-base-store/src/main/java"
7973 #:tests? #f)); no tests
7975 `(("lang" ,java-ops4j-base-lang)
7976 ("slf4j" ,java-slf4j-api)
7977 ("io" ,java-ops4j-base-io)))
7978 (description "OPS4J stands for Open Participation Software for Java. This
7979 package contains utilities for storing and retrieving data from an
7980 @code{InputStream}.")))
7982 (define-public java-ops4j-base-spi
7984 (inherit java-ops4j-base-lang)
7985 (name "java-ops4j-base-spi")
7987 `(#:jar-name "java-ops4j-base-spi.jar"
7988 #:source-dir "ops4j-base-spi/src/main/java"
7989 #:test-dir "ops4j-base-spi/src/test"))
7991 `(("junit" ,java-junit)
7992 ("hamcrest" ,java-hamcrest-core)))
7993 (description "OPS4J stands for Open Participation Software for Java. This
7994 package contains utilities for obtaining services via the Java SE 6
7995 @code{ServiceLoader}.")))
7997 (define-public java-aqute-bnd-annotation
7999 (name "java-aqute-bnd-annotation")
8003 (uri (string-append "https://github.com/bndtools/bnd/archive/"
8004 version ".REL.tar.gz"))
8005 (file-name (string-append name "-" version ".tar.gz"))
8008 "1ggyiq0as0f6cz333a0dh98j72kmvv5pf2s47v9554yh905lfqdl"))))
8009 (build-system ant-build-system)
8011 `(#:jar-name "java-aqute-bnd-annotation.jar"
8012 #:source-dir "biz.aQute.bnd.annotation/src"
8013 #:tests? #f)); empty test dir
8014 (home-page "http://bnd.bndtools.org/")
8015 (synopsis "Tools for OSGi")
8016 (description "Bnd is a swiss army knife for OSGi, it creates manifest
8017 headers based on analyzing the class code, it verifies the project settings,
8018 it manages project dependencies, gives diffs jars, and much more.")
8019 (license license:asl2.0)))
8021 (define-public java-aqute-libg
8023 (inherit java-aqute-bnd-annotation)
8024 (name "java-aqute-libg")
8026 `(#:jar-name "java-aqute-libg.jar"
8027 ;; The build fails when source/target more recent than 1.7. This
8028 ;; is a known issue. See: https://github.com/bndtools/bnd/issues/1327
8030 ;; It is closed as won't fix. There is no way to change the source
8031 ;; so that it works on 1.8, and still works on 1.6, the upstream
8032 ;; target. It work fine on 1.7, so we use 1.7.
8033 #:make-flags (list "-Dant.build.javac.source=1.7"
8034 "-Dant.build.javac.target=1.7")
8036 (modify-phases %standard-phases
8037 (add-before 'configure 'chdir
8038 ;; Change to aQute.libg directory, so that the relative
8039 ;; paths in the tests aren't broken.
8041 (chdir "aQute.libg")
8043 (add-before 'check 'create-test-directory
8044 ;; Copy the test directory to test/java, since that's where
8045 ;; ant-build-system's default project in build.xml expects to find
8046 ;; the test classes. Leave a copy in the original place to not
8047 ;; break paths in tests.
8050 (copy-recursively "test" "src/test/java")
8053 `(("slf4j" ,java-slf4j-api)
8054 ("osgi-annot" ,java-osgi-annotation)
8055 ("java-osgi-cmpn" ,java-osgi-cmpn)
8056 ("osgi" ,java-osgi-core)))
8058 `(("hamcrest" ,java-hamcrest-core)
8059 ("java-junit" ,java-junit)))))
8061 (define java-aqute-libg-bootstrap
8063 (inherit java-aqute-libg)
8064 (name "java-aqute-libg-bootstrap")
8066 ;; Disable tests, at this stage of bootstrap we have no test frameworks.
8067 (substitute-keyword-arguments (package-arguments java-aqute-libg)
8068 ((#:tests? _ #f) #f)))
8070 `(("slf4j-bootstrap" ,java-slf4j-api-bootstrap)
8071 ,@(delete `("slf4j" ,java-slf4j-api)
8072 (package-inputs java-aqute-libg))))
8073 (native-inputs '())))
8075 (define-public java-aqute-bndlib
8077 (inherit java-aqute-bnd-annotation)
8078 (name "java-aqute-bndlib")
8080 `(#:jar-name "java-bndlib.jar"
8081 #:source-dir "biz.aQute.bndlib/src"
8082 #:tests? #f)); no tests
8084 `(("slf4j" ,java-slf4j-api)
8085 ("osgi-annot" ,java-osgi-annotation)
8086 ("java-aqute-libg" ,java-aqute-libg)
8087 ("java-aqute-bnd-annotation" ,java-aqute-bnd-annotation)
8088 ("java-osgi-service-component-annotations" ,java-osgi-service-component-annotations)
8089 ("java-osgi-service-repository" ,java-osgi-service-repository)
8090 ("java-osgi-service-log" ,java-osgi-service-log)
8091 ("java-osgi-service-metatype-annotations" ,java-osgi-service-metatype-annotations)
8092 ("java-osgi-namespace-contract" ,java-osgi-namespace-contract)
8093 ("java-osgi-namespace-extender" ,java-osgi-namespace-extender)
8094 ("java-osgi-namespace-service" ,java-osgi-namespace-service)
8095 ("promise" ,java-osgi-util-promise)
8096 ("osgi" ,java-osgi-core)))))
8098 (define java-aqute-bndlib-bootstrap
8100 (inherit java-aqute-bndlib)
8101 (name "java-aqute-bndlib-bootstrap")
8103 `(("slf4j-bootstrap" ,java-slf4j-api-bootstrap)
8104 ("java-aqute-libg-bootstrap" ,java-aqute-libg-bootstrap)
8105 ,@(delete `("slf4j" ,java-slf4j-api)
8106 (delete `("java-aqute-libg" ,java-aqute-libg)
8107 (package-inputs java-aqute-bndlib)))))))
8109 (define-public java-ops4j-pax-tinybundles
8111 (name "java-ops4j-pax-tinybundles")
8115 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.tinybundles/"
8116 "archive/tinybundles-" version ".tar.gz"))
8119 "0y0gq3pvv0iir2b885lmlwnvr724vv7vklzhhr4fs27d7mdkj871"))))
8121 `(#:jar-name "java-ops4j-pax-tinybundles.jar"
8122 #:source-dir "src/main/java"
8124 ;; Abstract base classes for other tests
8125 (list "**/BndTest.java" "**/CoreTest.java")
8127 (modify-phases %standard-phases
8128 (add-before 'check 'fix-version
8130 ;; This test has a reference to an old version of bndlib we are not
8131 ;; packaging. It uses the version referenced in pom.xml. We replace
8132 ;; it with our own version.
8133 (substitute* "src/test/java/org/ops4j/pax/tinybundles/bnd/BndTest.java"
8134 (("[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*")
8135 ,(package-version java-aqute-bndlib)))
8138 `(("lang" ,java-ops4j-base-lang)
8139 ("io" ,java-ops4j-base-io)
8140 ("store" ,java-ops4j-base-store)
8141 ("slf4j" ,java-slf4j-api)
8142 ("libg" ,java-aqute-libg)
8143 ("bndlib" ,java-aqute-bndlib)))
8145 `(("junit" ,java-junit)
8146 ("hamcrest" ,java-hamcrest-core)
8147 ("log4j" ,java-log4j-api)
8148 ("bndannotation" ,java-aqute-bnd-annotation)
8149 ("framework" ,java-osgi-framework)))
8150 (build-system ant-build-system)
8151 (home-page "https://ops4j1.jira.com/wiki/spaces/ops4j/pages/12060312/Tinybundles")
8152 (synopsis "Java APIs to create OSGi related artifacts")
8153 (description "Tinybundles is all about creating OSGi related artifacts like
8154 Bundles, Fragments and Deployment Packages with Java Api. It is very convenient
8155 to create such artifacts on-the-fly inside Tests (like in Pax Exam). On the
8156 other hand, this library can be a foundation of real end user tools that need
8157 to create those artifacts.")
8158 (license license:asl2.0)))
8160 (define-public java-ops4j-pax-exam-core
8162 (name "java-ops4j-pax-exam-core")
8166 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.exam2/"
8167 "archive/exam-reactor-" version ".tar.gz"))
8170 "08mzw8nkah3rj3vznlplnawspxhp61zgvb44ifqa1rni1cvbms2g"))))
8172 `(#:jar-name "java-ops4j-pax-exam-core.jar"
8173 #:source-dir "core/pax-exam/src/main/java"
8174 #:test-dir "core/pax-exam/src/test"))
8176 `(("slf4j" ,java-slf4j-api)
8177 ("lang" ,java-ops4j-base-lang)
8178 ("io" ,java-ops4j-base-io)
8179 ("util-property" ,java-ops4j-base-util-property)
8180 ("util-store" ,java-ops4j-base-store)
8181 ("java-osgi-core" ,java-osgi-core)))
8183 `(("junit" ,java-junit)
8184 ("hamcrest" ,java-hamcrest-core)))
8185 (build-system ant-build-system)
8186 (home-page "https://ops4j1.jira.com/wiki/spaces/PAXEXAM4/overview")
8187 (synopsis "In-Container Testing for OSGi, Java EE and CDI")
8188 (description "Pax Exam creates OSGi bundles for testing purposes. It lets
8189 the user take control of the OSGi framework, the test framework (e.g. JUnit) and
8190 the system under test at the same time.")
8191 (license license:asl2.0)))
8193 (define-public java-ops4j-pax-exam-core-spi
8195 (inherit java-ops4j-pax-exam-core)
8196 (name "java-ops4j-pax-exam-core-spi")
8198 `(#:jar-name "java-ops4j-pax-exam-spi.jar"
8199 #:source-dir "src/main/java"
8202 ;; Abstract base class, not a test
8203 "**/BaseStagedReactorTest.java"
8204 ;; Depends on org.mortbay.jetty.testwars:test-war-dump
8205 "**/WarBuilderTest.java")
8207 (modify-phases %standard-phases
8208 (add-before 'configure 'chdir
8210 ;; Tests assume we are in this directory
8211 (chdir "core/pax-exam-spi")
8213 (add-before 'check 'fix-tests
8215 ;; One test checks that this file is present.
8216 (mkdir-p "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi")
8217 (with-output-to-file
8218 "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi/pom.properties"
8221 (string-append "artifactId = pax-exam-spi\n"
8222 "version = " ,(package-version java-ops4j-pax-exam-core-spi)))))
8223 ;; Maven puts compilation results in the target directory, while we
8224 ;; put them in the build directory.
8225 (substitute* '("src/test/java/org/ops4j/pax/exam/spi/war/WarBuilderTest.java"
8226 "src/test/java/org/ops4j/pax/exam/spi/war/WarTestProbeBuilderTest.java"
8227 "src/test/java/org/ops4j/pax/exam/spi/war/ZipBuilderTest.java")
8228 (("target") "build"))
8229 ;; One test is expected to fail, but it doesn't throw the expected exception
8230 (substitute* "src/test/java/org/ops4j/pax/exam/spi/reactors/BaseStagedReactorTest.java"
8231 (("AssertionError") "IllegalArgumentException"))
8234 `(("java-ops4j-pax-exam-core" ,java-ops4j-pax-exam-core)
8235 ("lang" ,java-ops4j-base-lang)
8236 ("monitors" ,java-ops4j-base-monitors)
8237 ("store" ,java-ops4j-base-store)
8238 ("io" ,java-ops4j-base-io)
8239 ("spi" ,java-ops4j-base-spi)
8240 ("osgi" ,java-osgi-core)
8241 ("slf4j" ,java-slf4j-api)
8242 ("tinybundles" ,java-ops4j-pax-tinybundles)))
8244 `(("mockito" ,java-mockito-1)
8245 ("junit" ,java-junit)
8246 ("hamcrest" ,java-hamcrest-core)
8247 ("cglib" ,java-cglib)
8248 ("objenesis" ,java-objenesis)
8249 ("asm" ,java-asm)))))
8251 (define-public java-ops4j-pax-exam-core-junit
8253 (inherit java-ops4j-pax-exam-core)
8254 (name "java-ops4j-pax-exam-core-junit")
8256 `(#:jar-name "ops4j-pax-exam-core-junit.jar"
8257 #:source-dir "drivers/pax-exam-junit4/src/main/java"
8258 #:tests? #f)); no tests
8260 `(("junit" ,java-junit)
8261 ("slf4j" ,java-slf4j-api)
8262 ("core" ,java-ops4j-pax-exam-core)
8263 ("spi" ,java-ops4j-pax-exam-core-spi)))
8264 (native-inputs '())))
8266 (define-public java-fasterxml-jackson-annotations
8268 (name "java-fasterxml-jackson-annotations")
8272 (uri (string-append "https://github.com/FasterXML/"
8273 "jackson-annotations/archive/"
8274 "jackson-annotations-" version ".tar.gz"))
8277 "0mr95xd0da6a4g95zvrl1ryk5n5zv2rc696w3xnsr5hxk2gicfc4"))))
8278 (build-system ant-build-system)
8280 `(#:jar-name "jackson-annotations.jar"
8281 #:source-dir "src/main/java"
8282 #:test-dir "src/test"))
8284 `(("junit" ,java-junit)))
8285 (home-page "https://github.com/FasterXML/jackson-annotations")
8286 (synopsis "General purpose annotations for the Jackson Data Processor")
8287 (description "This package contains general purpose annotations for the
8288 Jackson Data Processor, used on value and handler types. The only annotations
8289 not included are ones that require dependency to the Databind package.")
8290 (license license:asl2.0)))
8292 (define-public java-fasterxml-jackson-core
8294 (name "java-fasterxml-jackson-core")
8298 (uri (string-append "https://github.com/FasterXML/"
8299 "jackson-core/archive/"
8300 "jackson-core-" version ".tar.gz"))
8303 "159hsnk17jr1gyzkf01cxvsn45srnk37g949r7364qlsr527gjgd"))))
8304 (build-system ant-build-system)
8306 `(#:jar-name "jackson-core.jar"
8307 #:source-dir "src/main/java"
8308 #:test-dir "src/test"
8311 ;; Expected failure. pom.xml excludes these
8313 ;; Base classes that have no constructor for junit
8315 "**/ConcurrencyReadTest.java"
8316 "**/ManualCharAccessTest.java"
8317 "**/ManualCharAccessTest.java"
8318 "**/TrailingCommasTest.java"
8319 "**/AsyncMissingValuesInObjectTest.java"
8320 "**/AsyncMissingValuesInArrayTest.java")
8322 (modify-phases %standard-phases
8323 (add-before 'configure 'generate-PackageVersion.java
8325 (let* ((out "src/main/java/com/fasterxml/jackson/core/json/PackageVersion.java")
8326 (in (string-append out ".in")))
8329 (("@package@") "com.fasterxml.jackson.core.json")
8330 (("@projectversion@") ,version)
8331 (("@projectgroupid@") "com.fasterxml.jackson.core")
8332 (("@projectartifactid@") "jackson-core")))
8334 (add-before 'build 'copy-resources
8336 (copy-recursively "src/main/resources"
8339 (add-before 'check 'copy-test-resources
8341 (copy-recursively "src/test/resources"
8342 "build/test-classes")
8345 `(("junit" ,java-junit)
8346 ("hamcrest" ,java-hamcrest-core)))
8347 (home-page "https://github.com/FasterXML/jackson-core")
8350 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
8352 (define-public java-fasterxml-jackson-databind
8354 (name "java-fasterxml-jackson-databind")
8358 (uri (string-append "https://github.com/FasterXML/"
8359 "jackson-databind/archive/"
8360 "jackson-databind-" version ".tar.gz"))
8363 "1zd2cw4z6kdkbx8za96xh9pyicv2a2l7y0rkcx2fqd8hv6d47s08"))))
8364 (build-system ant-build-system)
8366 `(#:jar-name "jackson-databind.jar"
8367 #:source-dir "src/main/java"
8368 #:tests? #f; requires javax.measures for which I can't find a free implementation
8370 (modify-phases %standard-phases
8371 (add-before 'configure 'generate-PackageVersion.java
8373 (let* ((out "src/main/java/com/fasterxml/jackson/databind/cfg/PackageVersion.java")
8374 (in (string-append out ".in")))
8377 (("@package@") "com.fasterxml.jackson.databind.cfg")
8378 (("@projectversion@") ,version)
8379 (("@projectgroupid@") "com.fasterxml.jackson.databind")
8380 (("@projectartifactid@") "jackson-databind")))
8382 (add-before 'build 'copy-resources
8384 (copy-recursively "src/main/resources" "build/classes")
8387 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
8388 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)))
8389 (home-page "https://github.com/FasterXML/jackson-databind")
8390 (synopsis "Data-binding functionality and tree-model for the Jackson Data Processor")
8391 (description "This package contains the general-purpose data-binding
8392 functionality and tree-model for Jackson Data Processor. It builds on core
8393 streaming parser/generator package, and uses Jackson Annotations for
8395 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
8397 (define-public java-fasterxml-jackson-modules-base-jaxb
8399 (name "java-fasterxml-jackson-modules-base-jaxb")
8403 (uri (string-append "https://github.com/FasterXML/"
8404 "jackson-modules-base/archive/"
8405 "jackson-modules-base-" version ".tar.gz"))
8408 "1wws95xi8sppp6b0k2vvjdjyynl20r1a4dwrhai08lzlria6blp5"))))
8409 (build-system ant-build-system)
8411 `(#:jar-name "jackson-modules-base-jaxb.jar"
8412 #:source-dir "jaxb/src/main/java"
8413 #:test-dir "jaxb/src/test"
8415 ;; Base class for tests
8416 (list "**/BaseJaxbTest.java")
8418 (modify-phases %standard-phases
8419 (add-before 'configure 'generate-PackageVersion.java
8421 (let* ((out (string-append "jaxb/src/main/java/com/fasterxml/"
8422 "jackson/module/jaxb/PackageVersion.java"))
8423 (in (string-append out ".in")))
8426 (("@package@") "com.fasterxml.jackson.module.jaxb")
8427 (("@projectversion@") ,version)
8428 (("@projectgroupid@") "com.fasterxml.jackson.module.jaxb")
8429 (("@projectartifactid@") "jackson-module-jaxb")))
8431 (add-before 'build 'copy-resources
8433 (copy-recursively "jaxb/src/main/resources" "build/classes")
8436 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
8437 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
8438 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)))
8440 `(("java-junit" ,java-junit)))
8441 (home-page "https://github.com/FasterXML/jackson-modules-base")
8442 (synopsis "Jaxb annotations jackson module")
8443 (description "This package is the jaxb annotations module for jackson.")
8444 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
8446 (define-public java-fasterxml-jackson-modules-base-mrbean
8448 (name "java-fasterxml-jackson-modules-base-mrbean")
8452 (uri (string-append "https://github.com/FasterXML/"
8453 "jackson-modules-base/archive/"
8454 "jackson-modules-base-" version ".tar.gz"))
8457 "1wws95xi8sppp6b0k2vvjdjyynl20r1a4dwrhai08lzlria6blp5"))))
8458 (build-system ant-build-system)
8460 `(#:jar-name "jackson-modules-base-mrbean.jar"
8461 #:source-dir "mrbean/src/main/java"
8462 #:test-dir "mrbean/src/test"
8464 ;; Base class for tests
8465 (list "**/BaseTest.java")
8467 (modify-phases %standard-phases
8468 (add-before 'configure 'generate-PackageVersion.java
8470 (let* ((out (string-append "mrbean/src/main/java/com/fasterxml/"
8471 "jackson/module/mrbean/PackageVersion.java"))
8472 (in (string-append out ".in")))
8475 (("@package@") "com.fasterxml.jackson.module.mrbean")
8476 (("@projectversion@") ,version)
8477 (("@projectgroupid@") "com.fasterxml.jackson.module.mrbean")
8478 (("@projectartifactid@") "jackson-module-mrbean")))
8481 `(("java-asm" ,java-asm)
8482 ("java-fasterxml-jackson-annotations"
8483 ,java-fasterxml-jackson-annotations)
8484 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
8485 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)))
8487 `(("java-junit" ,java-junit)))
8488 (home-page "https://github.com/FasterXML/jackson-modules-base")
8489 (synopsis "POJO type materialization for Java")
8490 (description "This package implements POJO type materialization.
8491 Databinders can construct implementation classes for Java interfaces as part
8492 of deserialization.")
8493 (license license:asl2.0)))
8495 (define-public java-snakeyaml
8497 (name "java-snakeyaml")
8501 (uri (string-append "https://bitbucket.org/asomov/snakeyaml/get/v"
8503 (file-name (string-append name "-" version ".tar.gz"))
8506 "0rf5ha6w0waz50jz2479jsrbgmd0dnx0gs337m126j5z7zlmg7mg"))))
8507 (build-system ant-build-system)
8509 `(#:jar-name "java-snakeyaml.jar"
8510 #:source-dir "src/main/java"
8511 ;; Tests require velocity, a cyclic dependency, and
8512 ;; java-spring-framework-context which is not packaged.
8514 (home-page "https://bitbucket.org/asomov/snakeyaml")
8515 (synopsis "YAML processor")
8516 (description "SnakeYAML is a YAML processor for the Java Virtual Machine.")
8517 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
8519 (define-public java-fasterxml-jackson-dataformat-yaml
8521 (name "java-fasterxml-jackson-dataformat-yaml")
8525 (uri (string-append "https://github.com/FasterXML/"
8526 "jackson-dataformats-text/archive/"
8527 "jackson-dataformats-text-" version ".tar.gz"))
8530 "1hikl06khaxbg439avf442qifcadap8w0lx13f0nnhp2vh3dkbz7"))))
8531 (build-system ant-build-system)
8533 `(#:jar-name "jackson-dataformat-yaml.jar"
8534 #:source-dir "yaml/src/main/java"
8535 #:test-dir "yaml/src/test"
8536 #:test-exclude (list "**/failing/**.java")
8538 (modify-phases %standard-phases
8539 (add-before 'configure 'generate-PackageVersion.java
8541 (let* ((out "yaml/src/main/java/com/fasterxml/jackson/dataformat/yaml/PackageVersion.java")
8542 (in (string-append out ".in")))
8545 (("@package@") "com.fasterxml.jackson.dataformat.yaml")
8546 (("@projectversion@") ,version)
8547 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.yaml")
8548 (("@projectartifactid@") "jackson-dataformat-yaml")))
8551 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
8552 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
8553 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)
8554 ("java-snakeyaml" ,java-snakeyaml)))
8556 `(("junit" ,java-junit)
8557 ("hamcrest" ,java-hamcrest-core)
8558 ("java-ops4j-pax-exam-core-spi" ,java-ops4j-pax-exam-core-spi)
8559 ("java-ops4j-pax-exam-core-junit" ,java-ops4j-pax-exam-core-junit)
8560 ("java-ops4j-pax-exam" ,java-ops4j-pax-exam-core)))
8561 (home-page "https://github.com/FasterXML/jackson-dataformats-text")
8562 (synopsis "Yaml backend for Jackson")
8563 (description "Dataformat backends are used to support format alternatives
8564 to JSON, supported by default. This is done by sub-classing Jackson core
8566 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
8568 (define-public java-stax2-api
8570 (name "java-stax2-api")
8574 (uri (string-append "https://github.com/FasterXML/stax2-api/archive/"
8575 "stax2-api-" version ".tar.gz"))
8578 "1amc1si0l0hyyw2sawmnzy4hkna3z6fp195y4nm5m9wb9ld5awkq"))))
8579 (build-system ant-build-system)
8581 `(#:jar-name "java-stax2-api.jar"
8582 #:source-dir "src/main/java"
8583 #:tests? #f)); no tests
8584 (home-page "https://github.com/FasterXML/stax2-api")
8585 (synopsis "Stax2 API")
8586 (description "Stax2 API is an extension to basic Stax 1.0 API that adds
8587 significant new functionalities, such as full-featured bi-direction validation
8588 interface and high-performance Typed Access API.")
8589 (license license:bsd-2)))
8591 (define-public java-woodstox-core
8593 (name "java-woodstox-core")
8597 (uri (string-append "https://github.com/FasterXML/woodstox/archive/"
8598 "woodstox-core-" version ".tar.gz"))
8601 "1i7pdgb8jbw6gdy5kmm0l6rz109n2ns92pqalpyp24vb8vlvdfd4"))))
8602 (build-system ant-build-system)
8604 `(#:jar-name "woodstox.jar"
8606 (list "**/Base*.java" "failing/**")
8608 (modify-phases %standard-phases
8609 (add-before 'build 'remove-msv-dep
8611 ;; we don't need osgi, and it depends on msv
8612 (delete-file-recursively "src/main/java/com/ctc/wstx/osgi")
8613 ;; msv's latest release is from 2011 and we don't need it
8614 (delete-file-recursively "src/main/java/com/ctc/wstx/msv")
8615 (delete-file-recursively "src/test/java/wstxtest/osgi")
8616 (delete-file-recursively "src/test/java/wstxtest/msv")
8618 (add-before 'build 'copy-resources
8620 (copy-recursively "src/main/resources" "build/classes")
8623 `(("stax2" ,java-stax2-api)))
8625 `(("junit" ,java-junit)))
8626 (home-page "https://github.com/FasterXML/woodstox")
8627 (synopsis "Stax XML API implementation")
8628 (description "Woodstox is a stax XML API implementation.")
8629 (license license:asl2.0)))
8631 (define-public java-fasterxml-jackson-dataformat-xml
8633 (name "java-fasterxml-jackson-dataformat-xml")
8637 (uri (string-append "https://github.com/FasterXML/"
8638 "jackson-dataformat-xml/archive/"
8639 "jackson-dataformat-xml-" version ".tar.gz"))
8642 "111fkkl90w31jbf30kgj82qdcxlw4sxppki7i198liw0ck1jcavq"))))
8643 (build-system ant-build-system)
8645 `(#:jar-name "jackson-dataformat-xml.jar"
8646 #:source-dir "src/main/java"
8648 (list "**/failing/**")
8650 (modify-phases %standard-phases
8651 (add-before 'configure 'generate-PackageVersion.java
8653 (let* ((out "src/main/java/com/fasterxml/jackson/dataformat/xml/PackageVersion.java")
8654 (in (string-append out ".in")))
8658 (("@package@") "com.fasterxml.jackson.dataformat.xml")
8659 (("@projectversion@") ,version)
8660 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.xml")
8661 (("@projectartifactid@") "jackson-dataformat-xml")))
8663 (add-before 'build 'copy-resources
8665 (copy-recursively "src/main/resources" "build/classes")
8668 `(("jackson-annotations" ,java-fasterxml-jackson-annotations)
8669 ("jackson-core" ,java-fasterxml-jackson-core)
8670 ("jackson-modules-base-jaxb" ,java-fasterxml-jackson-modules-base-jaxb)
8671 ("jackson-databind" ,java-fasterxml-jackson-databind)
8672 ("stax2-api" ,java-stax2-api)
8673 ("woodstox" ,java-woodstox-core)))
8675 `(("junit" ,java-junit)
8676 ("hamcrest" ,java-hamcrest-core)))
8677 (home-page "https://github.com/FasterXML/jackson-dataformat-xml")
8678 (synopsis "Read and write XML")
8679 (description "This package contains Jackson extension component for reading
8680 and writing XML encoded data.
8682 Further, the goal is to emulate how JAXB data-binding works with \"Code-first\"
8683 approach (that is, no support is added for \"Schema-first\" approach). Support
8684 for JAXB annotations is provided by JAXB annotation module; this module
8685 provides low-level abstractions (@code{JsonParser}, @code{JsonGenerator},
8686 @code{JsonFactory}) as well as small number of higher level overrides needed to
8687 make data-binding work.")
8688 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
8690 (define-public java-hdrhistogram
8692 (name "java-hdrhistogram")
8696 (uri (string-append "https://github.com/HdrHistogram/HdrHistogram/"
8697 "archive/HdrHistogram-" version ".tar.gz"))
8700 "1sicbmc3sr42nw93qbkb26q9rn33ag33k6k77phjc3j5h5gjffqv"))))
8701 (build-system ant-build-system)
8703 `(#:jar-name "java-hdrhistogram.jar"
8704 #:source-dir "src/main/java"
8706 (modify-phases %standard-phases
8707 (add-before 'configure 'set-version
8709 (let* ((version-java "src/main/java/org/HdrHistogram/Version.java")
8710 (template (string-append version-java ".template")))
8711 (copy-file template version-java)
8712 (substitute* version-java
8713 (("\\$VERSION\\$") ,version)
8714 (("\\$BUILD_TIME\\$") "0"))
8717 `(("junit" ,java-junit)
8718 ("hamcrest" ,java-hamcrest-core)))
8719 (home-page "https://hdrhistogram.github.io/HdrHistogram")
8720 (synopsis "High dynamic range histogram")
8721 (description "Hdrhistogram allows to create histograms that support
8722 recording and analyzing sampled data value counts across a configurable integer
8723 value range with configurable value precision within the range. Value precision
8724 is expressed as the number of significant digits in the value recording, and
8725 provides control over value quantization behavior across the value range and
8726 the subsequent value resolution at any given level.")
8727 (license license:public-domain)))
8729 (define-public java-cofoja
8731 (name "java-cofoja")
8736 (url "https://github.com/nhatminhle/cofoja.git")
8737 (commit (string-append "v" version))))
8738 (file-name (string-append "java-cofoja-" version "-checkout"))
8741 "0p7sz8y5xgpi5rx1qwn6587fkd52qr3ha3ybh14gqcyxhikl525w"))))
8742 (build-system ant-build-system)
8744 `(#:build-target "dist"
8745 #:test-target "test"
8748 (list "-Ddist.dir=dist")
8749 #:modules ((guix build ant-build-system)
8750 (guix build java-utils)
8755 (modify-phases %standard-phases
8756 ;; The bulid system ignores the class path the ant-build-system sets
8757 ;; up and instead expects to find all dependencies in the "lib"
8759 (add-after 'unpack 'create-libdir
8760 (lambda* (#:key inputs #:allow-other-keys)
8764 (let ((target (string-append "lib/" (basename file))))
8765 (unless (file-exists? target)
8766 (symlink file target))))
8767 (append-map (match-lambda
8769 (find-files dir "\\.jar$")))
8772 (replace 'install (install-jars "dist")))))
8774 `(("java-asm" ,java-asm)))
8776 `(("java-junit" ,java-junit)))
8777 (home-page "https://github.com/nhatminhle/cofoja")
8778 (synopsis "Contracts for Java")
8779 (description "Contracts for Java, or Cofoja for short, is a contract
8780 programming framework and test tool for Java, which uses annotation processing
8781 and bytecode instrumentation to provide run-time checking. (In particular,
8782 this is not a static analysis tool.)")
8783 (license license:lgpl3+)))
8785 (define-public java-aopalliance
8787 (name "java-aopalliance")
8791 ;; Note: this git repository is not official, but contains the
8792 ;; source code that is in the CVS repository. Downloading the
8793 ;; tarball from sourceforge is undeterministic, and the cvs download
8796 (url "https://github.com/hoverruan/aopalliance")
8797 (commit "0d7757ae204e5876f69431421fe9bc2a4f01e8a0")))
8798 (file-name (string-append name "-" version))
8801 "0rsg2b0v3hxlq2yk1i3m2gw3xwq689j3cwx9wbxvqfpdcjbca0qr"))))
8802 (build-system ant-build-system)
8804 `(#:jar-name "java-aopalliance.jar"
8806 #:tests? #f; no tests
8807 #:source-dir "aopalliance/src/main"))
8808 (home-page "http://aopalliance.sourceforge.net")
8809 (synopsis "Aspect-Oriented Programming")
8810 (description "The AOP Alliance project is a joint project between several
8811 software engineering people who are interested in Aspect-Oriented Programming
8813 (license license:public-domain)))
8815 (define-public java-javax-inject
8817 (name "java-javax-inject")
8821 (uri (string-append "https://github.com/javax-inject/javax-inject/"
8822 "archive/javax.inject-" version ".tar.gz"))
8825 "1ydrlvh2r7vr1g7lhjwy3w2dggpj9h6pix1lakkkgdywb365n6g0"))))
8826 (build-system ant-build-system)
8828 `(#:jar-name "java-javax-inject.jar"
8830 #:tests? #f)); no tests
8831 (home-page "http://github.com/javax-inject/javax-inject")
8832 (synopsis "JSR-330: Dependency Injection for Java")
8833 (description "This package specifies a means for obtaining objects in such
8834 a way as to maximize reusability, testability and maintainability compared to
8835 traditional approaches such as constructors, factories, and service locators
8836 (e.g., JNDI). This process, known as dependency injection, is beneficial to
8837 most nontrivial applications.
8839 Many types depend on other types. For example, a @var{Stopwatch} might depend
8840 on a @var{TimeSource}. The types on which a type depends are known as its
8841 dependencies. The process of finding an instance of a dependency to use at run
8842 time is known as resolving the dependency. If no such instance can be found,
8843 the dependency is said to be unsatisfied, and the application is broken.")
8844 (license license:asl2.0)))
8846 (define-public java-guice
8852 (uri (string-append "https://github.com/google/guice/archive/"
8854 (file-name (string-append name "-" version ".tar.gz"))
8855 (modules '((guix build utils)))
8858 (for-each delete-file (find-files "." ".*.jar"))))
8861 "0dwmqjzlavb144ywqqglj3h68hqszkff8ai0a42hyb5il0qh4rbp"))))
8862 (build-system ant-build-system)
8864 `(#:jar-name "java-guice.jar"
8866 #:tests? #f; FIXME: tests are not in a java sub directory
8867 #:source-dir "core/src"))
8869 `(("guava" ,java-guava)
8870 ("java-cglib" ,java-cglib)
8871 ("java-aopalliance" ,java-aopalliance)
8872 ("java-javax-inject" ,java-javax-inject)
8873 ("java-asm" ,java-asm)))
8874 (home-page "https://github.com/google/guice")
8875 (synopsis "Lightweight dependency injection framework")
8876 (description "Guice is a lightweight dependency injection framework fo
8878 (license license:asl2.0)))
8880 (define-public java-guice-servlet
8882 (inherit java-guice)
8883 (name "java-guice-servlet")
8885 `(#:jar-name "guice-servlet.jar"
8886 #:source-dir "extensions/servlet/src/"
8888 #:tests? #f)); FIXME: not in a java subdir
8890 `(("guice" ,java-guice)
8891 ("servlet" ,java-classpathx-servletapi)
8892 ,@(package-inputs java-guice)))))
8894 (define-public java-assertj
8896 (name "java-assertj")
8900 (uri (string-append "https://github.com/joel-costigliola/"
8901 "assertj-core/archive/"
8902 "assertj-core-" version ".tar.gz"))
8905 "1kf124fxskf548rklkg86294w2x6ajqrff94rrhyqns31danqkfz"))))
8906 (build-system ant-build-system)
8908 `(#:jar-name "java-assertj.jar"
8910 #:source-dir "src/main/java"
8911 #:tests? #f)); depends on tng-junit which depends on assertj
8913 `(("cglib" ,java-cglib)
8914 ("junit" ,java-junit)
8915 ("hamcrest" ,java-hamcrest-core)))
8917 `(("mockito" ,java-mockito-1)))
8918 (home-page "https://joel-costigliola.github.io/assertj/index.html")
8919 (synopsis "Fluent assertions for java")
8920 (description "AssertJ core is a Java library that provides a fluent
8921 interface for writing assertions. Its main goal is to improve test code
8922 readability and make maintenance of tests easier.")
8923 (license license:asl2.0)))
8925 (define-public java-jboss-javassist
8927 (name "java-jboss-javassist")
8931 (uri (string-append "https://github.com/jboss-javassist/javassist/"
8933 (string-map (lambda (x) (if (eq? x #\.) #\_ x)) version)
8937 "10lpcr3sbf7y6fq6fc2h2ik7rqrivwcy4747bg0kxhwszil3cfmf"))))
8938 (build-system ant-build-system)
8940 `(#:jar-name "java-jboss-javassist.jar"
8942 #:source-dir "src/main"
8943 #:tests? #f; FIXME: requires junit-awtui and junit-swingui from junit3
8945 (modify-phases %standard-phases
8946 (add-before 'configure 'remove-binary
8948 (delete-file "javassist.jar")
8951 `(("junit" ,java-junit)))
8952 (home-page "https://github.com/jboss-javassist/javassist")
8953 (synopsis "Java bytecode engineering toolkit")
8954 (description "Javassist (JAVA programming ASSISTant) makes Java bytecode
8955 manipulation simple. It is a class library for editing bytecodes in Java; it
8956 enables Java programs to define a new class at runtime and to modify a class
8957 file when the JVM loads it.")
8958 (license (list license:gpl2 license:cddl1.0)))); either gpl2 only or cddl.
8960 (define-public java-jcommander
8962 (name "java-jcommander")
8966 (uri (string-append "https://github.com/cbeust/jcommander/archive/"
8968 (file-name (string-append name "-" version ".tar.gz"))
8971 "1f5k2ckay6qjc3d3w3d7bc0p3cx3c7n6p6zxvw1kibqdr0q98wlx"))))
8972 (build-system ant-build-system)
8974 `(#:jar-name "java-jcommander.jar"
8976 #:tests? #f; requires testng which depends on jcommander
8977 #:source-dir "src/main/java"))
8978 (home-page "https://jcommander.org")
8979 (synopsis "Command line parameters parser")
8980 (description "JCommander is a very small Java framework that makes it
8981 trivial to parse command line parameters. Parameters are declared with
8983 (license license:asl2.0)))
8985 (define-public java-bsh
8991 (uri (string-append "https://github.com/beanshell/beanshell/archive/"
8993 (file-name (string-append name "-" version ".tar.gz"))
8996 "1bawkxk6jyc75hxvzkpz689h73cn3f222m0ar3nvb0dal2b85kfv"))))
8997 (build-system ant-build-system)
8999 `(#:build-target "jarall"
9000 #:test-target "junit-tests-all"
9002 (modify-phases %standard-phases
9004 (lambda* (#:key outputs #:allow-other-keys)
9005 (let ((share (string-append (assoc-ref outputs "out") "/share/java")))
9007 (copy-file "dist/bsh-2.0b6.jar" (string-append share "/bsh-2.0b6.jar"))
9009 (home-page "http://beanshell.org/")
9010 (synopsis "Lightweight Scripting for Java")
9011 (description "BeanShell is a small, free, embeddable Java source
9012 interpreter with object scripting language features, written in Java.
9013 BeanShell dynamically executes standard Java syntax and extends it with common
9014 scripting conveniences such as loose types, commands, and method closures like
9015 those in Perl and JavaScript.")
9016 (license license:asl2.0)))
9018 (define-public java-fest-util
9020 (name "java-fest-util")
9024 (uri (string-append "https://github.com/alexruiz/fest-util/"
9025 "archive/fest-util-" version ".tar.gz"))
9028 "05g6hljz5mdaakk8d7g32klbhz9bdwp3qlj6rdaggdidxs3x1sb8"))))
9029 (build-system ant-build-system)
9031 `(#:jar-name "java-fest-util.jar"
9032 #:source-dir "src/main/java"))
9034 `(("junit" ,java-junit)
9035 ("hamcrest" ,java-hamcrest-core)))
9036 (home-page "https://github.com/alexruiz/fest-util")
9037 (synopsis "FEST common utilities")
9038 (description "Common utilities used in all FEST module.")
9039 (license license:asl2.0)))
9041 (define-public java-fest-test
9043 (name "java-fest-test")
9047 (uri (string-append "https://github.com/alexruiz/fest-test/"
9048 "archive/fest-test-" version ".tar.gz"))
9051 "1rxfbw6l9vc65iy1x3fb617qc6y4w2k430pgf1mfbxfdlxbm0f7g"))))
9052 (build-system ant-build-system)
9054 `(#:jar-name "java-fest-test.jar"
9055 #:source-dir "src/main/java"
9056 #:tests? #f)); no tests
9058 `(("junit" ,java-junit)))
9059 (home-page "https://github.com/alexruiz/fest-test")
9060 (synopsis "Common FEST testing infrastructure")
9061 (description "Fest-test contains the common FEST testing infrastructure.")
9062 (license license:asl2.0)))
9064 (define-public java-fest-assert
9066 (name "java-fest-assert")
9070 (uri (string-append "https://github.com/alexruiz/fest-assert-2.x/"
9071 "archive/fest-assert-core-" version ".tar.gz"))
9074 "1bi0iqavikzww6rxvz5jyg7y6bflv95s6ibryxx0xfcxrrw6i5lw"))))
9075 (build-system ant-build-system)
9077 `(#:jar-name "java-fest-assert.jar"
9078 #:source-dir "src/main/java"
9083 ;; Unable to set MockitoNamingPolicy on cglib generator which creates FastClasses
9084 "**/MessageFormatter_format_Test.java"
9085 "**/internal/*/*_assert*_Test.java")))
9087 `(("java-fest-util" ,java-fest-util)))
9089 `(("java-junit" ,java-junit)
9090 ("java-fest-test" ,java-fest-test)
9091 ("java-hamcrest-core" ,java-hamcrest-core)
9092 ("java-mockito" ,java-mockito-1)
9093 ("java-cglib" ,java-cglib)
9094 ("java-objenesis" ,java-objenesis)
9095 ("java-asm" ,java-asm)))
9096 (home-page "https://github.com/alexruiz/fest-assert-2.x")
9097 (synopsis "FEST fluent assertions")
9098 (description "FEST-Assert provides a fluent interface for assertions.")
9099 (license license:asl2.0)))
9101 (define-public java-testng
9103 (name "java-testng")
9108 (url "https://github.com/cbeust/testng.git")
9110 (file-name (string-append name "-" version "-checkout"))
9113 "0y6vq30i5g276kw0v2bhbvci22ijg7ax49ap2611yqlhbs4d6dqv"))))
9114 (build-system ant-build-system)
9116 `(#:jdk ,icedtea-8; java.util.function
9117 #:jar-name "java-testng.jar"
9118 #:source-dir "src/main/java"
9120 (modify-phases %standard-phases
9121 ;; FIXME: I don't know why these tests fail
9122 (add-after 'unpack 'delete-failing-tests
9124 (substitute* "src/test/resources/testng.xml"
9125 (("<class name=\"test.configuration.github1625.TestRunnerIssue1625\"/>") "")
9126 (("<class name=\"test.serviceloader.ServiceLoaderTest\" />") ""))
9128 ;; We don't have groovy
9129 (add-after 'unpack 'delete-groovy-tests
9131 (delete-file-recursively "src/test/java/test/dependent/issue1648/")
9132 (substitute* "src/test/resources/testng.xml"
9133 (("<class name=\"test.dependent.issue1648.TestRunner\"/>") ""))
9135 (add-before 'build 'copy-resources
9137 (copy-recursively "src/main/resources" "build/classes")
9139 (add-before 'check 'copy-test-resources
9141 (copy-recursively "src/test/resources" "build/test-classes")
9145 (invoke "ant" "compile-tests")
9146 ;; we don't have groovy
9147 (substitute* "src/test/resources/testng.xml"
9148 (("<class name=\"test.groovy.GroovyTest\" />") ""))
9149 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
9151 ":build/test-classes")
9152 "-Dtest.resources.dir=src/test/resources"
9153 "org.testng.TestNG" "src/test/resources/testng.xml"))))))
9155 `(("junit" ,java-junit)
9156 ("java-jsr305" ,java-jsr305)
9157 ("java-bsh" ,java-bsh)
9158 ("java-jcommander" ,java-jcommander)
9159 ("java-guice" ,java-guice)
9160 ("snakeyaml" ,java-snakeyaml)))
9162 `(("guava" ,java-guava)
9163 ("java-javax-inject" ,java-javax-inject)
9164 ("java-hamcrest" ,java-hamcrest-all)
9165 ("java-assertj" ,java-assertj)
9166 ("java-mockito" ,java-mockito-1)
9167 ("cglib" ,java-cglib)
9169 ("aopalliance" ,java-aopalliance)))
9170 (home-page "https://testng.org")
9171 (synopsis "Testing framework")
9172 (description "TestNG is a testing framework inspired from JUnit and NUnit
9173 but introducing some new functionalities that make it more powerful and easier
9175 (license license:asl2.0)))
9177 (define-public java-jnacl
9178 (let ((commit "094e819afdd63ea81a499b3bcb42a271006bebd9")
9182 (version (string-append "0.1.0-" revision "." (string-take commit 7)))
9186 (url "https://github.com/neilalexander/jnacl.git")
9188 (file-name (git-file-name name version))
9191 "1d6g6xhn83byv5943n7935wwjsk0ibk0qdvqgr699qqgqqmwisbb"))))
9192 (build-system ant-build-system)
9194 `(#:jar-name "jnacl.jar"
9195 #:source-dir "src/main/java"
9198 (modify-phases %standard-phases
9199 (add-before 'build 'fix-tests
9201 (substitute* '("src/test/java/com/neilalexander/jnacl/NaClTest.java"
9202 "src/test/java/com/neilalexander/jnacl/NaclSecretBoxTest.java")
9203 (("assertions.Assertions") "assertions.api.Assertions"))
9207 (invoke "ant" "compile-tests")
9208 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
9210 ":build/test-classes")
9211 "org.testng.TestNG" "-testclass"
9212 "build/test-classes/com/neilalexander/jnacl/NaclSecretBoxTest.class")
9213 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
9215 ":build/test-classes")
9216 "org.testng.TestNG" "-testclass"
9217 "build/test-classes/com/neilalexander/jnacl/NaClTest.class"))))))
9219 `(("java-testng" ,java-testng)
9220 ("java-fest-util" ,java-fest-util)
9221 ("java-fest-assert" ,java-fest-assert)))
9222 (home-page "https://github.com/neilalexander/jnacl")
9223 (synopsis "Java implementation of NaCl")
9224 (description "Pure Java implementation of the NaCl: Networking and
9225 Cryptography library.")
9226 (license license:bsd-2))))
9228 (define-public java-mvel2
9234 (uri (string-append "https://github.com/mvel/mvel/archive/mvel2-"
9235 version ".Final.tar.gz"))
9238 "01ph5s9gm16l2qz58lg21w6fna7xmmrj7f9bzqr1jim7h9557d3z"))))
9239 (build-system ant-build-system)
9241 `(#:jar-name "mvel2.jar"
9242 #:source-dir "src/main/java"
9244 (list "**/Abstract*.java"
9245 ;; Base class with no tests
9246 "**/MVELThreadTest.java")
9248 (modify-phases %standard-phases
9249 (add-after 'install 'install-bin
9250 (lambda* (#:key outputs #:allow-other-keys)
9251 (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
9253 (with-output-to-file (string-append bin "/mvel2")
9257 "#!" (which "bash") "\n"
9258 "if [ \"$#\" -ne \"2\" ]; then\n"
9259 "echo 'Usage: mvel2 <script> <out.dir>'\n"
9262 "java -Dout.dir=$2 -cp " (getenv "CLASSPATH")
9263 ":" (assoc-ref outputs "out") "/share/java/mvel2.jar"
9264 " org.mvel2.sh.Main $1"))))
9265 (chmod (string-append bin "/mvel2") #o755))
9268 `(("junit" ,java-junit)
9269 ("hamcrest" ,java-hamcrest-core)))
9270 (home-page "https://github.com/mvel/mvel")
9271 (synopsis "MVFLEX Expression Language")
9272 (description "MVEL has largely been inspired by Java syntax, but has some
9273 fundamental differences aimed at making it more efficient as an expression
9274 language, such as operators that directly support collection, array and string
9275 matching, as well as regular expressions. MVEL is used to evaluate expressions
9276 written using Java syntax.
9278 In addition to the expression language, MVEL serves as a templating language for
9279 configuration and string construction.")
9280 (license license:asl2.0)))
9282 (define-public java-commons-jexl-2
9284 (name "java-commons-jexl")
9288 (uri (string-append "mirror://apache/commons/jexl/source/"
9289 "commons-jexl-" version "-src.tar.gz"))
9292 "1ai7632bwwaxglb0nbpblpr2jw5g20afrsaq372ipkphi3ncy1jz"))))
9293 (build-system ant-build-system)
9295 `(#:jar-name "commons-jexl-2.jar"
9297 #:source-dir "src/main/java"
9299 (modify-phases %standard-phases
9300 (add-before 'check 'disable-broken-tests
9301 (lambda* (#:key inputs #:allow-other-keys)
9302 (with-directory-excursion "src/test/java/org/apache/commons/jexl2/"
9303 (substitute* "ArithmeticTest.java"
9304 (("asserter.assertExpression\\(\"3 / 0\"") "//")
9305 (("asserter.assertExpression\\(\"imanull") "//"))
9306 ;; This test fails with "ambiguous method invocation"
9307 (delete-file "CacheTest.java")
9308 ;; This test doesn't have access to the temp directory
9309 (substitute* "ClassCreatorTest.java"
9310 (("java.io.tmpdir") "user.dir"))
9311 ;; This test fails in trying to detect whether it can run.
9312 (substitute* "ClassCreator.java"
9313 (("boolean canRun =.*") "boolean canRun = false;\n"))
9314 ;; ...and these tests depend on it.
9315 (delete-file "scripting/JexlScriptEngineOptionalTest.java")
9316 (delete-file "scripting/JexlScriptEngineTest.java"))
9318 (add-before 'build 'run-javacc
9320 (with-directory-excursion "src/main/java/org/apache/commons/jexl2/parser/"
9321 (invoke "java" "jjtree" "Parser.jjt")
9322 (invoke "java" "javacc" "Parser.jj"))
9325 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)))
9327 `(("java-junit" ,java-junit)
9328 ("java-hamcrest-core" ,java-hamcrest-core)
9329 ("javacc" ,javacc-4)))
9330 (home-page "https://commons.apache.org/proper/commons-jexl/")
9331 (synopsis "Java Expression Language ")
9332 (description "JEXL is a library intended to facilitate the implementation
9333 of dynamic and scripting features in applications and frameworks written in
9334 Java. JEXL implements an Expression Language based on some extensions to the
9335 JSTL Expression Language supporting most of the constructs seen in
9336 shell-script or ECMAScript. Its goal is to expose scripting features usable
9337 by technical operatives or consultants working with enterprise platforms.")
9338 (license license:asl2.0)))
9340 (define-public java-lz4
9346 (uri (string-append "https://github.com/lz4/lz4-java/archive/"
9348 (file-name (string-append name "-" version ".tar.gz"))
9351 "096dm57p2lzqk28n0j2p52x2j3cvnsd2dfqn43n7vbwrkjsy7y54"))))
9352 (build-system ant-build-system)
9354 `(#:jar-name "lz4.jar"
9356 #:source-dir "src/java:src/java-unsafe"
9357 #:tests? #f; FIXME: requires more dependencies
9359 (modify-phases %standard-phases
9360 (add-before 'configure 'generate-source
9362 (with-directory-excursion "src/build/source_templates"
9363 (invoke "mvel2" "../gen_sources.mvel" "../../java"))
9366 `(("mvel" ,java-mvel2)))
9367 (home-page "https://jpountz.github.io/lz4-java")
9368 (synopsis "Compression algorithm")
9369 (description "LZ4 - Java is a Java port of the popular lz4 compression
9370 algorithms and xxHash hashing algorithm.")
9371 (license license:asl2.0)))
9373 (define-public java-bouncycastle
9375 (name "java-bouncycastle")
9379 (uri (string-append "https://github.com/bcgit/bc-java/archive/r"
9380 (substring version 0 1) "v"
9381 (substring version 2 4) ".tar.gz"))
9384 "0v434513y708qc87k4xz13p2kzydc736lk3ks67df9mg11s7hchv"))
9385 (modules '((guix build utils)))
9388 (for-each delete-file
9389 (find-files "." "\\.jar$"))
9391 (build-system ant-build-system)
9396 (modify-phases %standard-phases
9399 (invoke "ant" "-f" "ant/jdk15+.xml" "build-provider")
9400 (invoke "ant" "-f" "ant/jdk15+.xml" "build")))
9401 ;; FIXME: the tests freeze.
9404 ;; (invoke "ant" "-f" "ant/jdk15+.xml" "test")))
9406 (install-jars "build/artifacts/jdk1.5/jars")))))
9408 `(("java-javax-mail" ,java-javax-mail)))
9411 ("junit" ,java-junit)
9412 ("java-native-access" ,java-native-access)
9413 ("java-native-access-platform" ,java-native-access-platform)))
9414 (home-page "https://www.bouncycastle.org")
9415 (synopsis "Cryptographic library")
9416 (description "Bouncy Castle is a cryptographic library for the Java
9417 programming language.")
9418 (license license:expat)))
9420 (define-public java-lmax-disruptor
9422 (name "java-lmax-disruptor")
9426 (uri (string-append "https://github.com/LMAX-Exchange/disruptor/"
9427 "archive/" version ".tar.gz"))
9428 (file-name (string-append name "-" version ".tar.gz"))
9431 "17da2gwj5abnlsfgn2xqjk5lgzbg4vkb0hdv2dvc8r2fx4bi7w3g"))))
9432 (build-system ant-build-system)
9434 `(#:jar-name "java-lmax-disruptor.jar"
9436 #:tests? #f)); tests hang
9438 `(("junit" ,java-junit)
9439 ("java-hdrhistogram" ,java-hdrhistogram)
9440 ("java-jmock" ,java-jmock)
9441 ("java-jmock-legacy" ,java-jmock-legacy)
9442 ("java-jmock-junit4" ,java-jmock-junit4)
9443 ("java-hamcrest-all" ,java-hamcrest-all)))
9445 `(("cglib" ,java-cglib)
9446 ("objenesis" ,java-objenesis)
9448 (home-page "https://www.lmax.com/disruptor")
9449 (synopsis "High performance inter-thread communication")
9450 (description "LMAX Disruptor is a software pattern and software component
9451 for high performance inter-thread communication that avoids the need for
9452 message queues or resource locking.")
9453 (license license:asl2.0)))
9455 (define-public java-commons-bcel
9457 (name "java-commons-bcel")
9461 (uri (string-append "mirror://apache/commons/bcel/source/bcel-"
9462 version "-src.tar.gz"))
9465 "0j3x1rxd673k07psclk8k13rqh0x0mf2yy5qiwkiw4z3afa568jy"))))
9466 (build-system ant-build-system)
9468 `(#:jar-name "bcel.jar"
9470 #:source-dir "src/main/java"
9471 #:test-dir "src/test/java"
9472 ;; FIXME: Tests require the unpackaged jna.
9474 (home-page "https://commons.apache.org/proper/commons-bcel/")
9475 (synopsis "Byte code engineering library")
9476 (description "The Byte Code Engineering Library (Apache Commons BCEL) is
9477 intended to give users a convenient way to analyze, create, and
9478 manipulate (binary) Java class files. Classes are represented by objects
9479 which contain all the symbolic information of the given class: methods, fields
9480 and byte code instructions, in particular.
9482 Such objects can be read from an existing file, be transformed by a
9483 program (e.g. a class loader at run-time) and written to a file again. An
9484 even more interesting application is the creation of classes from scratch at
9485 run-time. The @dfn{Byte Code Engineering Library} (BCEL) may be also useful
9486 if you want to learn about the @dfn{Java Virtual Machine} (JVM) and the format
9487 of Java @code{.class} files.")
9488 (license license:asl2.0)))
9490 (define-public java-xerial-core
9492 (name "java-xerial-core")
9496 (uri (string-append "https://github.com/xerial/xerial-java/archive/"
9498 (file-name (string-append name "-" version ".tar.gz"))
9501 "0d3g863i41bgalpa4xr3vm1h140l091n8iwgq5qvby5yivns9y8d"))))
9502 (build-system ant-build-system)
9504 `(#:jar-name "xerial-core.jar"
9505 #:source-dir "xerial-core/src/main/java"
9506 #:test-dir "xerial-core/src/test"
9508 (modify-phases %standard-phases
9509 (add-before 'build 'copy-resources
9511 (copy-recursively "xerial-core/src/main/resources"
9515 `(("junit" ,java-junit)
9516 ("hamcrest" ,java-hamcrest-core)))
9517 (home-page "https://github.com/xerial/xerial-java")
9518 (synopsis "Data management libraries for Java")
9519 (description "Xerial is a set of data management libraries for the Java
9520 programming language. The ultimate goal of the Xerial project is to manage
9521 everything as database, including class objects, text format data, data
9523 (license license:asl2.0)))
9525 (define-public java-powermock-reflect
9527 (name "java-powermock-reflect")
9531 (uri (string-append "https://github.com/powermock/powermock/"
9532 "archive/powermock-" version ".tar.gz"))
9533 (file-name (string-append name "-" version ".tar.gz"))
9536 "0sbgi5vqq7k72wzcdjb20s370vyd4hsbnx71pzb8ishml3gy7fwy"))
9538 (search-patches "java-powermock-fix-java-files.patch"))))
9539 (build-system ant-build-system)
9541 `(#:jar-name "java-powermock-reflect.jar"
9543 #:source-dir "powermock-reflect/src/main/java"
9544 #:test-dir "powermock-reflect/src/test"))
9546 `(("java-objenesis" ,java-objenesis)))
9548 `(("junit" ,java-junit)
9549 ("cglib" ,java-cglib)
9551 ("hamcrest" ,java-hamcrest-core)
9552 ("assertj" ,java-assertj)))
9553 (home-page "https://github.com/powermock/powermock")
9554 (synopsis "Mock library extension framework")
9555 (description "PowerMock is a framework that extends other mock libraries
9556 such as EasyMock with more powerful capabilities. PowerMock uses a custom
9557 classloader and bytecode manipulation to enable mocking of static methods,
9558 constructors, final classes and methods, private methods, removal of static
9559 initializers and more. By using a custom classloader no changes need to be
9560 done to the IDE or continuous integration servers which simplifies adoption.")
9561 (license license:asl2.0)))
9563 (define-public java-powermock-core
9565 (inherit java-powermock-reflect)
9566 (name "java-powermock-core")
9568 `(#:jar-name "java-powermock-core.jar"
9569 #:source-dir "powermock-core/src/main/java"
9570 #:test-dir "powermock-core/src/test"
9571 #:tests? #f; requires powermock-api
9574 (modify-phases %standard-phases
9575 (add-before 'build 'copy-resources
9577 (copy-recursively "powermock-core/src/main/resources"
9581 `(("reflect" ,java-powermock-reflect)
9582 ("javassist" ,java-jboss-javassist)))
9584 `(("junit" ,java-junit)
9585 ("assertj" ,java-assertj)
9586 ("mockito" ,java-mockito-1)))))
9588 (define-public java-powermock-api-support
9590 (inherit java-powermock-reflect)
9591 (name "java-powermock-api-support")
9592 (build-system ant-build-system)
9594 `(#:jar-name "java-powermock-api-support.jar"
9596 #:source-dir "powermock-api/powermock-api-support/src/main/java"
9597 #:tests? #f)); no tests
9599 `(("core" ,java-powermock-core)
9600 ("reflect" ,java-powermock-reflect)))))
9602 (define-public java-powermock-modules-junit4-common
9604 (inherit java-powermock-reflect)
9605 (name "java-powermock-modules-junit4-common")
9606 (build-system ant-build-system)
9608 `(#:jar-name "java-powermock-modules-junit4-common.jar"
9610 #:source-dir "powermock-modules/powermock-module-junit4-common/src/main/java"
9611 #:test-dir "powermock-modules/powermock-module-junit4-common/src/test"))
9613 `(("core" ,java-powermock-core)
9614 ("easymock" ,java-easymock)
9615 ("reflect" ,java-powermock-reflect)
9616 ("hamcrest" ,java-hamcrest-core)
9617 ("cglib" ,java-cglib)))))
9619 (define-public java-powermock-modules-junit4
9621 (inherit java-powermock-reflect)
9622 (name "java-powermock-modules-junit4")
9623 (build-system ant-build-system)
9625 `(#:jar-name "java-powermock-modules-junit4.jar"
9627 #:source-dir "powermock-modules/powermock-module-junit4/src/main/java"
9628 #:test-dir "powermock-modules/powermock-module-junit4/src/test"
9630 (modify-phases %standard-phases
9631 (add-before 'build 'fix-junit-detection
9633 ;; Our junit version is 4.12-SNAPSHOT
9634 (substitute* (find-files "powermock-modules/powermock-module-junit4"
9635 "PowerMockJUnit4MethodValidator.java")
9636 (("4.12") "4.12-SNAPSHOT"))
9639 `(("core" ,java-powermock-core)
9640 ("reflect" ,java-powermock-reflect)
9641 ("common" ,java-powermock-modules-junit4-common)
9642 ("cglib" ,java-cglib)))
9644 `(("easymock" ,java-easymock)
9645 ("hamcrest" ,java-hamcrest-core)
9646 ("objenesis" ,java-objenesis)
9648 ("junit" ,java-junit)))))
9650 (define-public java-powermock-api-easymock
9652 (inherit java-powermock-reflect)
9653 (name "java-powermock-api-easymock")
9654 (build-system ant-build-system)
9656 `(#:jar-name "java-powermock-api-easymock.jar"
9658 #:source-dir "powermock-api/powermock-api-easymock/src/main/java"
9659 #:tests? #f; no tests
9661 (modify-phases %standard-phases
9662 (add-before 'build 'fix-file
9664 ;; FIXME: This looks wrong, but it fixes a build error.
9665 (with-directory-excursion "powermock-api/powermock-api-easymock"
9666 (substitute* "src/main/java/org/powermock/api/easymock/PowerMock.java"
9667 (("classLoader instanceof MockClassLoader") "false")
9668 (("\\(\\(MockClassLoader\\) classLoader\\).*;") ";")))
9671 `(("core" ,java-powermock-core)
9672 ("easymock" ,java-easymock)
9673 ("reflect" ,java-powermock-reflect)
9674 ("support" ,java-powermock-api-support)
9675 ("cglib" ,java-cglib)))))
9677 (define-public java-jboss-jms-api-spec
9679 (name "java-jboss-jms-api-spec")
9683 (uri (string-append "https://github.com/jboss/jboss-jms-api_spec/"
9684 "archive/jboss-jms-api_" version
9685 "_spec-1.0.1.Final.tar.gz"))
9688 "07bqblw9kq2i8q92bz70fvavq5xjfkaixl8xa0m0cypjgy82rb7m"))))
9689 (build-system ant-build-system)
9691 `(#:jar-name "java-jboss-jms-api_spec.jar"
9694 #:tests? #f)); no tests
9695 (home-page "https://github.com/jboss/jboss-jms-api_spec")
9696 (synopsis "Java Message Service API specification")
9697 (description "Java Message Service (JMS) API is used to send messages
9698 messages between two or more clients. It is a messaging standard that allows
9699 application components to create, send, receive, and read messages.")
9700 ; either gpl2 only with GPL Classpath Exception, or cddl.
9701 (license (list license:gpl2 license:cddl1.0))))
9703 (define-public java-mail
9709 (uri (string-append "https://github.com/javaee/javamail/archive/"
9710 "JAVAMAIL-1_6_0.tar.gz"))
9713 "1b4rg7fpj50ld90a71iz2m4gm3f5cnw18p3q3rbrrryjip46kx92"))))
9714 (build-system ant-build-system)
9716 `(#:jar-name "java-mail.jar"
9718 #:source-dir "mail/src/main/java"
9719 #:test-dir "mail/src/test"
9721 (list "**/CollectorFormatterTest.java"
9722 "**/CompactFormatterTest.java"
9723 "**/DurationFilterTest.java"
9724 "**/MailHandlerTest.java"
9725 "**/GetLocalAddressTest.java"
9726 ;; FIXME: both end with:
9727 ;; java.lang.ClassNotFoundException:
9728 ;; javax.mail.internet.MimeMultipartParseTest
9729 "**/MimeMultipartParseTest.java"
9730 "**/SearchTermSerializationTest.java")
9732 (modify-phases %standard-phases
9733 (add-before 'configure 'move-version.java
9735 (copy-file "mail/src/main/resources/javax/mail/Version.java"
9736 "mail/src/main/java/javax/mail/Version.java")
9738 (add-before 'build 'copy-resources
9740 (copy-recursively "mail/src/main/resources/META-INF"
9741 "build/classes/META-INF")
9744 `(("junit" ,java-junit)
9745 ("hamcrest" ,java-hamcrest-core)))
9746 (home-page "https://javaee.github.io/javamail/")
9747 (synopsis "Mail-related functionnalities in Java")
9748 (description "The JavaMail API provides a platform-independent and
9749 protocol-independent framework to build mail and messaging applications.")
9750 ;; General Public License Version 2 only ("GPL") or the Common Development
9751 ;; and Distribution License("CDDL")
9752 (license (list license:cddl1.1
9753 license:gpl2)))); with classpath exception
9755 (define-public java-jeromq
9757 (name "java-jeromq")
9762 (url "https://github.com/zeromq/jeromq.git")
9763 (commit (string-append "v" version))))
9764 (file-name (string-append name "-" version "-checkout"))
9767 "1gxkp7lv2ahymgrqdw94ncq54bmp4m4sw5m1x9gkp7l5bxn0xsyj"))
9768 (patches (search-patches "java-jeromq-fix-tests.patch"))))
9769 (build-system ant-build-system)
9771 `(#:jar-name "java-jeromq.jar"
9772 #:source-dir "src/main/java"
9778 "**/ZBeaconTest.java"
9780 "**/DealerSpecTest.java"
9781 "**/CustomDecoderTest.java"
9782 "**/CustomEncoderTest.java"
9783 "**/ConnectRidTest.java"
9784 "**/ReqSpecTest.java"
9785 "**/PushPullSpecTest.java"
9786 "**/PubSubHwmTest.java"
9787 "**/RouterSpecTest.java"
9788 "**/ProxyTest.java")))
9790 `(("java-jnacl" ,java-jnacl)))
9792 `(("java-hamcrest-core" ,java-hamcrest-core)
9793 ("junit" ,java-junit)))
9794 (home-page "http://zeromq.org/bindings:java")
9795 (synopsis "Java binding for 0MQ")
9796 (description "Jeromq provides the java bindings for 0MQ.")
9797 (license license:mpl2.0)))
9799 (define-public java-kafka-clients
9801 (name "java-kafka-clients")
9805 (uri (string-append "mirror://apache/kafka/" version "/kafka-"
9806 version "-src.tgz"))
9809 "1yxmnsmliwm7671q5yy9bl4jdqyyn00n26cggz9brwczx80w1vfq"))))
9810 (build-system ant-build-system)
9812 `(#:jar-name "java-kafka-clients.jar"
9814 #:source-dir "clients/src/main/java"
9815 #:test-dir "clients/src/test"
9818 ;; This file does not contain a class
9819 "**/IntegrationTest.java"
9821 "**/ClientUtilsTest.java"
9822 ;; End with errors that seem related to our powermock
9823 "**/KafkaProducerTest.java"
9824 "**/BufferPoolTest.java")))
9826 `(("java-slf4j-api" ,java-slf4j-api)
9827 ("java-lz4" ,java-lz4)))
9829 `(("junit" ,java-junit)
9830 ("hamcrest" ,java-hamcrest-all)
9831 ("objenesis" ,java-objenesis)
9833 ("cglib" ,java-cglib)
9834 ("javassist" ,java-jboss-javassist)
9835 ("snappy" ,java-snappy)
9836 ("easymock" ,java-easymock)
9837 ("powermock" ,java-powermock-core)
9838 ("powermock-easymock" ,java-powermock-api-easymock)
9839 ("powermock-junit4-common" ,java-powermock-modules-junit4-common)
9840 ("powermock-junit4" ,java-powermock-modules-junit4)
9841 ("powermock-support" ,java-powermock-api-support)
9842 ("java-bouncycastle" ,java-bouncycastle)))
9843 (home-page "https://kafka.apache.org")
9844 (synopsis "Distributed streaming platform")
9845 (description "Kafka is a distributed streaming platform, which means:
9847 @item it can publish and subscribe to streams of records;
9848 @item it can store streams of records in a fault-tolerant way;
9849 @item it can process streams of records as they occur.
9851 ;; Either cddl or gpl2 only.
9852 (license (list license:cddl1.1; actually cddl1.1
9853 license:gpl2)))); with classpath exception
9855 (define-public java-jdom
9861 (uri (string-append "http://jdom.org/dist/binary/archive/jdom-"
9865 "07wdpm3jwwc9q38kmdw40fvbmv6jzjrkrf8m0zqs58f79a672wfl"))))
9866 (build-system ant-build-system)
9868 `(#:build-target "package"
9869 #:tests? #f; tests are run as part of the build process
9871 (modify-phases %standard-phases
9873 (install-jars "build")))))
9874 (home-page "http://jdom.org/")
9875 (synopsis "Access, manipulate, and output XML data")
9876 (description "Java-based solution for accessing, manipulating, and
9877 outputting XML data from Java code.")
9878 (license license:bsd-4)))
9880 (define-public java-geronimo-xbean-reflect
9882 (name "java-geronimo-xbean-reflect")
9887 (url "https://svn.apache.org/repos/asf/geronimo/xbean/tags/xbean-4.5/")
9888 (revision 1807396)))
9889 (file-name (string-append name "-" version))
9892 "18q3i6jgm6rkw8aysfgihgywrdc5nvijrwnslmi3ww497jvri6ja"))))
9893 (build-system ant-build-system)
9895 `(#:jar-name "geronimo-xbean-reflect.jar"
9896 #:source-dir "xbean-reflect/src/main/java"
9897 #:test-dir "xbean-reflect/src/test"
9900 (list "**/Abstract*.java" "**/AsmParameterNameLoaderTest.java"
9901 "**/ObjectRecipeTest.java" "**/ParameterNameLoaderTest.java"
9902 "**/RecipeHelperTest.java" "**/XbeanAsmParameterNameLoaderTest.java")
9904 (modify-phases %standard-phases
9905 (add-before 'build 'fix-source
9907 (let ((dir "xbean-reflect/src/main/java/org/apache/xbean/recipe/"))
9908 ;; org.apache.xbean.asm6 is actually repackaged java-asm
9909 (substitute* (string-append dir "XbeanAsmParameterNameLoader.java")
9910 (("org.apache.xbean.asm5") "org.objectweb.asm"))
9914 ("log4j" ,java-log4j-api)
9915 ("log4j-1.2" ,java-log4j-1.2-api)
9916 ("log4j-core" ,java-log4j-core)
9917 ("logging" ,java-commons-logging-minimal)))
9919 `(("junit" ,java-junit)))
9920 (home-page "https://geronimo.apache.org/maven/xbean/3.6/xbean-reflect/")
9921 (synopsis "Dependency injection helper")
9922 (description "Xbean-reflect provides very flexible ways to create objects
9923 and graphs of objects for dependency injection frameworks")
9924 (license license:asl2.0)))
9926 (define-public java-geronimo-xbean-bundleutils
9928 (inherit java-geronimo-xbean-reflect)
9929 (name "java-geronimo-xbean-bundleutils")
9931 `(#:jar-name "geronimo-xbean-bundleutils.jar"
9932 #:source-dir "xbean-bundleutils/src/main/java"
9933 #:test-dir "xbean-bundleutils/src/test"
9935 (modify-phases %standard-phases
9936 (add-before 'build 'fix-java
9938 ;; We use a more recent version of osgi, so this file requires
9939 ;; more interface method implementations.
9940 (substitute* "xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/DelegatingBundleContext.java"
9941 (("import org.osgi.framework.ServiceRegistration;")
9942 "import org.osgi.framework.ServiceRegistration;
9943 import org.osgi.framework.ServiceFactory;
9944 import java.util.Collection;
9945 import org.osgi.framework.ServiceObjects;")
9946 (("public Bundle getBundle\\(\\)")
9948 public <S> ServiceObjects<S> getServiceObjects(ServiceReference<S> reference) {
9949 throw new UnsupportedOperationException();
9952 public <S> ServiceRegistration<S> registerService(Class<S> clazz,
9953 ServiceFactory<S> factory, Dictionary<String, ?> properties) {
9954 throw new UnsupportedOperationException();
9956 public Bundle getBundle()"))
9959 `(("java-slf4j" ,java-slf4j-api)
9960 ("java-asm" ,java-asm)
9961 ("java-osgi-framework" ,java-osgi-framework)
9962 ("java-eclipse-osgi" ,java-eclipse-osgi)
9963 ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin)))))
9965 (define-public java-geronimo-xbean-asm-util
9967 (inherit java-geronimo-xbean-reflect)
9968 (name "java-geronimo-xbean-asm-util")
9970 `(#:jar-name "geronimo-xbean-asm-util.jar"
9971 #:source-dir "xbean-asm-util/src/main/java"
9972 #:tests? #f)); no tests
9974 `(("java-asm" ,java-asm)))
9975 (native-inputs '())))
9977 (define-public java-geronimo-xbean-finder
9979 (inherit java-geronimo-xbean-reflect)
9980 (name "java-geronimo-xbean-finder")
9982 `(#:jar-name "geronimo-xbean-finder.jar"
9983 #:source-dir "xbean-finder/src/main/java"
9984 #:test-dir "xbean-finder/src/test"))
9986 `(("java-slf4j-api" ,java-slf4j-api)
9987 ("java-asm" ,java-asm)
9988 ("java-geronimo-xbean-bundleutils" ,java-geronimo-xbean-bundleutils)
9989 ("java-geronimo-xbean-asm-util" ,java-geronimo-xbean-asm-util)
9990 ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin)
9991 ("java-osgi-framework" ,java-osgi-framework)))
9993 `(("java-junit" ,java-junit)
9994 ("java-hamcrest-core" ,java-hamcrest-core)))))
9996 (define-public java-gson
10002 (uri (string-append "https://github.com/google/gson/archive/"
10003 "gson-parent-" version ".tar.gz"))
10006 "1j4qnp7v046q0k48c4kyf69sxaasx2h949d3cqwsm3kzxms3x0f9"))))
10007 (build-system ant-build-system)
10009 `(#:jar-name "gson.jar"
10010 #:source-dir "gson/src/main/java"
10011 #:test-dir "gson/src/test"))
10013 `(("java-junit" ,java-junit)
10014 ("java-hamcrest-core" ,java-hamcrest-core)))
10015 (home-page "https://github.com/google/gson")
10016 (synopsis "Java serialization/deserialization library from/to JSON")
10017 (description "Gson is a Java library that can be used to convert Java
10018 Objects into their JSON representation. It can also be used to convert a JSON
10019 string to an equivalent Java object. Gson can work with arbitrary Java objects
10020 including pre-existing objects that you do not have source-code of.")
10021 (license license:asl2.0)))
10023 (define-public java-hawtjni
10025 (name "java-hawtjni")
10029 (uri (string-append "https://github.com/fusesource/hawtjni/archive/"
10030 "hawtjni-project-" version ".tar.gz"))
10033 "1bqfd732rmh6svyx17fpw9175gc9gzkcbyps2yyrf50c3zzjas6g"))))
10034 (build-system ant-build-system)
10036 `(#:jar-name "hawtjni.jar"
10037 #:source-dir "hawtjni-generator/src/main/java:hawtjni-runtime/src/main/java"
10038 #:tests? #f; no tests
10040 (modify-phases %standard-phases
10041 (add-before 'build 'build-native
10042 (lambda* (#:key inputs #:allow-other-keys)
10043 (let ((include (string-append "-I" (assoc-ref inputs "jdk") "/include/linux")))
10044 (with-directory-excursion "hawtjni-generator/src/main/resources/"
10045 (invoke "gcc" "-c" "hawtjni.c" "-o" "hawtjni.o"
10046 "-fPIC" "-O2" include)
10047 (invoke "gcc" "-c" "hawtjni-callback.c" "-o" "hawtjni-callback.o"
10048 "-fPIC" "-O2" include)
10049 (invoke "gcc" "-o" "libhawtjni.so" "-shared"
10050 "hawtjni.o" "hawtjni-callback.o")))
10052 (add-after 'install 'install-native
10053 (lambda* (#:key outputs #:allow-other-keys)
10054 (let* ((out (assoc-ref outputs "out"))
10055 (lib (string-append out "/lib"))
10056 (inc (string-append out "/include")))
10057 (with-directory-excursion "hawtjni-generator/src/main/resources/"
10058 (install-file "libhawtjni.so" lib)
10059 (install-file "hawtjni.h" inc)))
10062 `(("java-commons-cli" ,java-commons-cli)
10063 ("java-asm" ,java-asm)
10064 ("java-geronimo-xbean-finder" ,java-geronimo-xbean-finder)))
10065 (home-page "https://fusesource.github.io/hawtjni/")
10066 (synopsis "JNI code generator")
10067 (description "HawtJNI is a code generator that produces the JNI code needed
10068 to implement Java native methods. It is based on the jnigen code generator
10069 that is part of the SWT Tools project.")
10070 (license license:asl2.0)))
10072 (define-public java-jansi-native
10074 (name "java-jansi-native")
10078 (uri (string-append "https://github.com/fusesource/jansi-native/"
10079 "archive/jansi-native-" version ".tar.gz"))
10082 "0j2ydlgxbzbgshqkwghbxxxnbnx1mmjgd6k5fw6xfvxw1z956yqf"))))
10083 (build-system ant-build-system)
10085 `(#:jar-name "jansi-native.jar"
10086 #:source-dir "src/main/java"
10087 #:tests? #f; no tests
10089 (modify-phases %standard-phases
10090 (add-before 'build 'build-native
10091 (lambda* (#:key inputs #:allow-other-keys)
10092 ;; there are more required files for windows in windows/
10093 (with-directory-excursion "src/main/native-package/src"
10094 (substitute* "jansi_ttyname.c"
10095 (("#include \"jansi_.*") ""))
10096 (invoke "gcc" "-c" "jansi_ttyname.c" "-o" "jansi_ttyname.o"
10097 (string-append "-I" (assoc-ref inputs "java-hawtjni")
10099 (string-append "-I" (assoc-ref inputs "jdk")
10102 (invoke "gcc" "-o" "libjansi.so" "-shared" "jansi_ttyname.o"))))
10103 (add-before 'build 'install-native
10105 (let ((dir (string-append "build/classes/META-INF/native/"
10106 ,(match (%current-system)
10107 ((or "i686-linux" "armhf-linux")
10109 ((or "x86_64-linux" "aarch64-linux"
10112 (install-file "src/main/native-package/src/libjansi.so" dir))
10114 (add-after 'install 'install-native
10115 (lambda* (#:key outputs #:allow-other-keys)
10116 (install-file "src/main/native-package/src/jansi.h"
10117 (string-append (assoc-ref outputs "out") "/include"))
10120 `(("java-hawtjni" ,java-hawtjni)))
10121 (home-page "https://fusesource.github.io/jansi/")
10122 (synopsis "Native library for jansi")
10123 (description "This package provides the native library for jansi, a small
10124 Java library that allows you to use ANSI escape sequences to format your
10126 (license license:asl2.0)))
10128 (define-public java-jansi
10130 (name "java-jansi")
10134 (uri (string-append "https://github.com/fusesource/jansi/archive/"
10135 "jansi-project-" version ".tar.gz"))
10138 "11kh3144i3fzp21dpy8zg52mjmsr214k7km9p8ly0rqk2px0qq2z"))))
10139 (build-system ant-build-system)
10141 `(#:jar-name "jansi.jar"
10142 #:source-dir "jansi/src/main/java"
10143 #:test-dir "jansi/src/test"
10145 (modify-phases %standard-phases
10146 (add-after 'check 'clear-term
10148 (invoke "echo" "-e" "\\e[0m"))))))
10150 `(("java-jansi-native" ,java-jansi-native)))
10152 `(("java-junit" ,java-junit)
10153 ("java-hamcrest-core" ,java-hamcrest-core)))
10154 (home-page "https://fusesource.github.io/jansi/")
10155 (synopsis "Portable ANSI escape sequences")
10156 (description "Jansi is a Java library that allows you to use ANSI escape
10157 sequences to format your console output which works on every platform.")
10158 (license license:asl2.0)))
10160 (define-public java-jboss-el-api-spec
10162 (name "java-jboss-el-api-spec")
10166 (uri (string-append "https://github.com/jboss/jboss-el-api_spec/"
10167 "archive/jboss-el-api_" version
10168 "_spec-1.0.7.Final.tar.gz"))
10171 "1j45ljxalwlibxl7g7iv952sjxkw275m8vyxxij8l6wdd5pf0pdh"))))
10172 (build-system ant-build-system)
10174 `(#:jar-name "java-jboss-el-api_spec.jar"
10177 `(("java-junit" ,java-junit)))
10178 (home-page "https://github.com/jboss/jboss-el-api_spec")
10179 (synopsis "JSR-341 expression language 3.0 API")
10180 (description "This package contains an implementation of the JSR-341
10181 specification for the expression language 3.0. It implements an expression
10182 language inspired by ECMAScript and XPath. This language is used with
10183 JavaServer Pages (JSP).")
10184 ;; Either GPL2 only or CDDL.
10185 (license (list license:gpl2 license:cddl1.1))))
10187 (define-public java-jboss-interceptors-api-spec
10189 (name "java-jboss-interceptors-api-spec")
10193 (uri (string-append "https://github.com/jboss/jboss-interceptors-api_spec/"
10194 "archive/jboss-interceptors-api_" version
10195 "_spec-1.0.0.Final.tar.gz"))
10198 "0wv8x0jp9a5qxlrgkhb5jdk2gr6vi87b4j4kjb8ryxiy9gn8g51z"))))
10199 (build-system ant-build-system)
10201 `(#:jar-name "java-jboss-interceptors-api_spec.jar"
10204 #:tests? #f)); no tests
10205 (home-page "https://github.com/jboss/jboss-interceptors-api_spec")
10206 (synopsis "Interceptors 1.2 API classes from JSR 318")
10207 (description "Java-jboss-interceptors-api-spec implements the Interceptors
10208 API. Interceptors are used to interpose on business method invocations and
10210 ;; Either GPL2 only or CDDL.
10211 (license (list license:gpl2 license:cddl1.1))))
10213 (define-public java-cdi-api
10215 (name "java-cdi-api")
10219 (uri (string-append "https://github.com/cdi-spec/cdi/archive/"
10220 version ".tar.gz"))
10221 (file-name (string-append name "-" version ".tar.gz"))
10224 "1iv8b8bp07c5kmqic14jsr868vycjv4qv02lf3pkgp9z21mnfg5y"))))
10225 (build-system ant-build-system)
10227 `(#:source-dir "api/src/main/java"
10228 #:jar-name "java-cdi-api.jar"
10229 #:test-dir "api/src/test"
10231 #:tests? #f)); Tests fail because we don't have a CDI provider yet
10233 `(("java-javax-inject" ,java-javax-inject)
10234 ("java-jboss-el-api-spec" ,java-jboss-el-api-spec)
10235 ("java-jboss-interceptors-api-spec" ,java-jboss-interceptors-api-spec)))
10237 `(("java-testng" ,java-testng)
10238 ("java-hamcrest-core" ,java-hamcrest-core)))
10239 (home-page "http://cdi-spec.org/")
10240 (synopsis "Contexts and Dependency Injection APIs")
10241 (description "Java-cdi-api contains the required APIs for Contexts and
10242 Dependency Injection (CDI).")
10243 (license license:asl2.0)))
10245 (define-public java-joda-convert
10247 (name "java-joda-convert")
10251 (uri (string-append "https://github.com/JodaOrg/joda-convert/archive/v"
10252 version ".tar.gz"))
10253 (file-name (string-append name "-" version ".tar.gz"))
10256 "0vp346xz7dh9br4q7xazhc7hvzf76a6hf95fki9bg67q5jr0kjh7"))))
10257 (build-system ant-build-system)
10259 `(#:jar-name (string-append ,name "-" ,version ".jar")
10260 #:source-dir "src/main/java"
10261 #:test-include (list "**/Test*.java")
10262 ;; Contains only interfaces and base classes (no test)
10263 #:test-exclude (list "**/test*/**.java")))
10265 `(("java-guava" ,java-guava)))
10267 `(("java-junit" ,java-junit)
10268 ("java-hamcrest-core" ,java-hamcrest-core)))
10269 (home-page "https://www.joda.org/joda-convert/")
10270 (synopsis "Conversion between Objects and Strings")
10271 (description "Joda-Convert provides a small set of classes to aid
10272 conversion between Objects and Strings. It is not intended to tackle the
10273 wider problem of Object to Object transformation.")
10274 (license license:asl2.0)))
10276 (define-public java-joda-time
10278 (name "java-joda-time")
10282 (uri (string-append "https://github.com/JodaOrg/joda-time/archive/v"
10283 version ".tar.gz"))
10284 (file-name (string-append name "-" version ".tar.gz"))
10287 "1i9x91mi7yg2pasl0k3912f1pg46n37sps6rdb0v1gs8hj9ppwc1"))))
10288 (build-system ant-build-system)
10290 `(#:jar-name "java-joda-time.jar"
10291 #:source-dir "src/main/java"
10292 #:test-include (list "**/Test*.java")
10293 ;; There is no runnable test in these files
10294 #:test-exclude (list "**/Test*Chronology.java" "**/Test*Field.java")
10296 (modify-phases %standard-phases
10297 (add-after 'build 'build-resources
10299 (mkdir-p "build/classes/org/joda/time/tz/data")
10300 (mkdir-p "build/classes/org/joda/time/format")
10301 ;; This will produce the following exception:
10302 ;; java.io.IOException: Resource not found: "org/joda/time/tz/data/ZoneInfoMap"
10303 ;; which is normal, because it doesn't exist yet. It still generates
10304 ;; the same file as in the binary one can find on maven.
10305 (invoke "java" "-cp"
10306 (string-append "build/classes:" (getenv "CLASSPATH"))
10307 "org.joda.time.tz.ZoneInfoCompiler"
10308 "-src" "src/main/java/org/joda/time/tz/src"
10309 "-dst" "build/classes/org/joda/time/tz/data"
10310 "africa" "antarctica" "asia" "australasia"
10311 "europe" "northamerica" "southamerica"
10312 "pacificnew" "etcetera" "backward" "systemv")
10313 (for-each (lambda (f)
10314 (copy-file f (string-append
10315 "build/classes/org/joda/time/format/"
10317 (find-files "src/main/java/org/joda/time/format" ".*.properties"))
10319 (add-before 'install 'regenerate-jar
10321 ;; We need to regenerate the jar file to add generated data.
10322 (delete-file "build/jar/java-joda-time.jar")
10323 (invoke "ant" "jar")))
10324 (add-before 'check 'copy-test-resources
10326 (mkdir-p "build/test-classes/org/joda/time/tz/data")
10327 (copy-file "src/test/resources/tzdata/ZoneInfoMap"
10328 "build/test-classes/org/joda/time/tz/data/ZoneInfoMap")
10329 (copy-recursively "src/test/resources" "build/test-classes")
10332 `(("java-joda-convert" ,java-joda-convert)))
10334 `(("java-junit" ,java-junit)
10335 ("java-hamcrest-core" ,java-hamcrest-core)
10336 ("tzdata" ,tzdata)))
10337 (home-page "http://www.joda.org/joda-time/")
10338 (synopsis "Replacement for the Java date and time classes")
10339 (description "Joda-Time is a replacement for the Java date and time
10340 classes prior to Java SE 8.")
10341 (license license:asl2.0)))
10343 (define-public java-xerces
10345 (name "java-xerces")
10350 (uri (string-append "mirror://apache/xerces/j/source/"
10351 "Xerces-J-src." version ".tar.gz"))
10353 (base32 "1006igwy2lqrmjvdk64v8dg6qbk9c29pm8xxx7r87n0vnpvmx6pm"))
10354 (patches (search-patches
10355 "java-xerces-xjavac_taskdef.patch"
10356 "java-xerces-build_dont_unzip.patch"
10357 "java-xerces-bootclasspath.patch"))))
10358 (build-system ant-build-system)
10360 `(#:tests? #f;; Test files are not present
10361 #:test-target "test"
10364 (modify-phases %standard-phases
10365 (add-after 'unpack 'create-build.properties
10366 (lambda* (#:key inputs #:allow-other-keys)
10367 (let ((jaxp (assoc-ref inputs "java-jaxp"))
10368 (resolver (assoc-ref inputs "java-apache-xml-commons-resolver")))
10369 (with-output-to-file "build.properties"
10372 "jar.jaxp = ~a/share/java/jaxp.jar~@
10373 jar.apis-ext = ~a/share/java/jaxp.jar~@
10374 jar.resolver = ~a/share/java/xml-resolver.jar~%"
10375 jaxp jaxp resolver)))
10376 ;; Make xerces use our version of jaxp in tests
10377 (substitute* "build.xml"
10379 (string-append jaxp "/share/java/jaxp.jar"))
10380 (("\\$\\{tools.dir\\}/\\$\\{jar.apis\\}")
10383 (replace 'install (install-jars "build")))))
10385 `(("java-apache-xml-commons-resolver" ,java-apache-xml-commons-resolver)
10386 ("java-jaxp" ,java-jaxp)))
10387 (home-page "https://xerces.apache.org/xerces2-j/")
10388 (synopsis "Validating XML parser for Java with DOM level 3 support")
10389 (description "The Xerces2 Java parser is the reference implementation of
10390 XNI, the Xerces Native Interface, and also a fully conforming XML Schema
10393 Xerces2-J supports the following standards and APIs:
10396 @item eXtensible Markup Language (XML) 1.0 Second Edition Recommendation
10397 @item Namespaces in XML Recommendation
10398 @item Document Object Model (DOM) Level 2 Core, Events, and Traversal and
10399 Range Recommendations
10400 @item Simple API for XML (SAX) 2.0.1 Core and Extension
10401 @item Java APIs for XML Processing (JAXP) 1.2.01
10402 @item XML Schema 1.0 Structures and Datatypes Recommendations
10403 @item Experimental implementation of the Document Object Model (DOM) Level 3
10404 Core and Load/Save Working Drafts
10405 @item Provides a partial implementation of the XML Inclusions (XInclude) W3C
10406 Candidate Recommendation
10409 Xerces is now able to parse documents written according to the XML 1.1
10410 Candidate Recommendation, except that it does not yet provide an option to
10411 enable normalization checking as described in section 2.13 of this
10412 specification. It also handles namespaces according to the XML Namespaces 1.1
10413 Candidate Recommendation, and will correctly serialize XML 1.1 documents if
10414 the DOM level 3 load/save API's are in use.")
10415 (license license:asl2.0)))
10417 (define-public java-jakarta-regexp
10419 (name "java-jakarta-regexp")
10424 (uri (string-append
10425 "https://archive.apache.org/dist/jakarta/regexp/jakarta-regexp-"
10426 version ".tar.gz"))
10429 "0zg9rmyif48dck0cv6ynpxv23mmcsx265am1fnnxss7brgw0ms3r"))))
10430 (build-system ant-build-system)
10432 `(#:test-target "test"
10434 (modify-phases %standard-phases
10436 (lambda* (#:key outputs #:allow-other-keys)
10437 (let* ((out (assoc-ref outputs "out"))
10438 (out-share (string-append out "/share/java")))
10439 (mkdir-p out-share)
10440 (for-each (lambda (name)
10441 (install-file name out-share))
10442 (find-files "build" "^jakarta-regexp-.*\\.jar$"))
10444 (home-page "https://attic.apache.org/projects/jakarta-regexp.html")
10445 (synopsis "Regular expression parser generator for Java.")
10446 (description "@code{jakarta-regexp} is an old regular expression parser
10447 generator for Java.")
10448 (license license:asl2.0)))
10450 (define-public java-jline
10452 (name "java-jline")
10456 (uri (string-append "https://github.com/jline/jline1/archive/jline-"
10457 version ".tar.gz"))
10460 "0bi3p6vrh7a6v0fbpb6rx9plpmx5zk3lr352xzdbz2jcxg499wir"))))
10461 (build-system ant-build-system)
10463 `(#:jar-name "jline.jar"
10464 #:source-dir "src/main/java"
10465 #:test-dir "src/test"
10467 (modify-phases %standard-phases
10468 (add-before 'build 'copy-resources
10470 (copy-recursively "src/main/resources" "build/classes")
10473 `(("java-junit" ,java-junit)))
10474 (home-page "https://jline.github.io")
10475 (synopsis "Console input handling library")
10476 (description "JLine is a Java library for handling console input. It is
10477 similar in functionality to BSD editline and GNU readline but with additional
10478 features that bring it on par with the Z shell line editor.")
10479 (license license:bsd-3)))
10481 (define-public java-jline-2
10483 (inherit java-jline)
10487 (uri (string-append "https://github.com/jline/jline2/archive/jline-"
10488 version ".tar.gz"))
10491 "1c6qa26mf0viw8hg4jnv72s7i1qb1gh1l8rrzcdvqhqhx82rkdlf"))))
10494 ,@(package-arguments java-jline)))
10496 `(("java-jansi" ,java-jansi)
10497 ("java-jansi-native" ,java-jansi-native)))
10499 `(("java-powermock-modules-junit4" ,java-powermock-modules-junit4)
10500 ("java-powermock-modules-junit4-common" ,java-powermock-modules-junit4-common)
10501 ("java-powermock-api-easymock" ,java-powermock-api-easymock)
10502 ("java-powermock-api-support" ,java-powermock-api-support)
10503 ("java-powermock-core" ,java-powermock-core)
10504 ("java-powermock-reflect" ,java-powermock-reflect)
10505 ("java-easymock" ,java-easymock)
10506 ("java-jboss-javassist" ,java-jboss-javassist)
10507 ("java-objenesis" ,java-objenesis)
10508 ("java-asm" ,java-asm)
10509 ("java-hamcrest-core" ,java-hamcrest-core)
10510 ("java-cglib" ,java-cglib)
10511 ("java-junit" ,java-junit)
10512 ("java-hawtjni" ,java-hawtjni)))))
10514 (define-public java-xmlunit
10516 (name "java-xmlunit")
10520 (uri (string-append "https://github.com/xmlunit/xmlunit/archive/v"
10521 version ".tar.gz"))
10522 (file-name (string-append name "-" version ".tar.gz"))
10525 "035rivlnmwhfqj0fzviciv0bkh1h95ps1iwnh2kjcvdbk5nccm4z"))))
10526 (build-system ant-build-system)
10528 `(#:jar-name "java-xmlunit.jar"
10529 #:source-dir "xmlunit-core/src/main/java"
10530 #:test-dir "xmlunit-core/src/test"
10532 (modify-phases %standard-phases
10533 (add-before 'check 'copy-test-resources
10534 (lambda* (#:key inputs #:allow-other-keys)
10535 (copy-recursively (assoc-ref inputs "resources") "../test-resources")
10538 `(("java-junit" ,java-junit)
10539 ("java-mockito-1" ,java-mockito-1)
10540 ("java-hamcrest-all" ,java-hamcrest-all)
10541 ("java-objenesis" ,java-objenesis)
10542 ("java-asm" ,java-asm)
10543 ("java-cglib" ,java-cglib)
10547 (uri (git-reference
10548 (url "https://github.com/xmlunit/test-resources.git")
10549 (commit "a590d2ae865c3e0455691d76ba8eefccc2215aec")))
10550 (file-name "java-xmlunit-test-resources")
10553 "0r0glj37pg5l868yjz78gckr91cs8fysxxbp9p328dssssi91agr"))))))
10554 (home-page "http://www.xmlunit.org/")
10555 (synopsis "XML output testing")
10556 (description "XMLUnit provides you with the tools to verify the XML you
10557 emit is the one you want to create. It provides helpers to validate against
10558 an XML Schema, assert the values of XPath queries or compare XML documents
10559 against expected outcomes.")
10560 (license license:asl2.0)))
10562 (define-public java-xmlunit-legacy
10564 (inherit java-xmlunit)
10565 (name "java-xmlunit-legacy")
10567 `(#:jar-name "java-xmlunit-legacy.jar"
10568 #:source-dir "xmlunit-legacy/src/main/java"
10569 #:test-dir "xmlunit-legacy/src/test"))
10571 `(("java-xmlunit" ,java-xmlunit)
10572 ("java-junit" ,java-junit)))
10574 `(("java-mockito-1" ,java-mockito-1)))))
10576 (define-public java-xmlunit-matchers
10578 (inherit java-xmlunit)
10579 (name "java-xmlunit-matchers")
10581 `(#:jar-name "java-xmlunit-matchers.jar"
10582 #:source-dir "xmlunit-matchers/src/main/java"
10583 #:test-dir "xmlunit-matchers/src/test"
10585 ;; Cannot open xsd for http://www.xmlunit.org/test-support/Book.xsd
10586 (list "**/ValidationMatcherTest.java")
10588 (modify-phases %standard-phases
10589 (add-before 'build 'copy-test-class
10591 (copy-file "xmlunit-core/src/test/java/org/xmlunit/TestResources.java"
10592 "xmlunit-matchers/src/test/java/org/xmlunit/TestResources.java")
10594 (add-before 'build 'fix-test-resources-path
10596 (substitute* (find-files "xmlunit-matchers/src/test" ".*.java")
10597 (("../test-resources") "test-resources"))
10599 (add-before 'check 'copy-test-resources
10600 (lambda* (#:key inputs #:allow-other-keys)
10601 (copy-recursively (assoc-ref inputs "resources") "test-resources")
10604 `(("java-xmlunit" ,java-xmlunit)
10605 ("java-junit" ,java-junit)))))
10607 (define-public java-openchart2
10609 (name "java-openchart2")
10613 (uri (string-append "http://download.approximatrix.com/openchart2/"
10614 "openchart2-" version ".source.zip"))
10617 "1xq96zm5r02n1blja0072jmmsifmxc40lbyfbnmcnr6mw42frh4g"))))
10618 (build-system ant-build-system)
10620 `(#:test-target "test"
10622 (modify-phases %standard-phases
10623 (add-after 'unpack 'fix-junit-errors
10625 (with-directory-excursion "unittest/src/com/approximatrix/charting/"
10626 (substitute* '("coordsystem/ticklocator/NumericXTickLocatorTest.java"
10627 "coordsystem/ticklocator/NumericYTickLocatorTest.java"
10628 "coordsystem/ticklocator/ObjectXTickLocatorTest.java"
10629 "model/DefaultChartDataModelConstraintsTest.java"
10630 "model/MultiScatterDataModelConstraintsTest.java"
10631 "model/threedimensional/DotPlotDataModelConstraintsTest.java")
10632 (("(assertEquals[^;]+);" before _)
10633 (string-append (string-drop-right before 2) ", 1E-6);"))))
10635 (replace 'install (install-jars ".")))))
10638 ("java-junit" ,java-junit)
10639 ("java-hamcrest-core" ,java-hamcrest-core)))
10640 (home-page "https://approximatrix.com/products/openchart2/")
10641 (synopsis "Simple plotting for Java")
10642 (description "Openchart2 provides a simple, yet powerful, interface for
10643 Java programmers to create two-dimensional charts and plots. The library
10644 features an assortment of graph styles, including advanced scatter plots, bar
10645 graphs, and pie charts.")
10646 (license license:lgpl2.1+)))
10648 (define-public java-commons-httpclient
10650 (name "java-commons-httpclient")
10654 (uri (string-append "https://archive.apache.org/dist/httpcomponents/"
10655 "commons-httpclient/source/commons-httpclient-"
10656 version "-src.tar.gz"))
10659 "1wlpn3cfy3d4inxy6g7wxcsa8p7sshn6aldk9y4ia3lb879rd97r"))))
10660 (build-system ant-build-system)
10662 `(#:build-target "compile"
10663 #:test-target "test"
10664 #:tests? #f; requires junit-textui (junit 3)
10666 (modify-phases %standard-phases
10667 (add-before 'build 'fix-accent
10669 (for-each (lambda (file)
10670 (with-fluids ((%default-port-encoding "ISO-8859-1"))
10672 (("\\* @author Ortwin .*") "* @author Ortwin Glueck\n"))))
10673 '("src/java/org/apache/commons/httpclient/HttpContentTooLargeException.java"
10674 "src/examples/TrivialApp.java" "src/examples/ClientApp.java"
10675 "src/test/org/apache/commons/httpclient/TestHttps.java"
10676 "src/test/org/apache/commons/httpclient/TestURIUtil2.java"))
10679 (lambda* (#:key outputs #:allow-other-keys)
10680 (invoke "ant" "dist"
10681 (string-append "-Ddist.home=" (assoc-ref outputs "out")
10685 `(("java-commons-logging" ,java-commons-logging-minimal)
10686 ("java-commons-codec" ,java-commons-codec)))
10687 (home-page "https://hc.apache.org")
10688 (synopsis "HTTP/1.1 compliant HTTP agent implementation")
10689 (description "This package contains an HTTP/1.1 compliant HTTP agent
10690 implementation. It also provides reusable components for client-side
10691 authentication, HTTP state management, and HTTP connection management.")
10692 (license license:asl2.0)))
10694 (define-public java-commons-vfs
10696 (name "java-commons-vfs")
10700 (uri (string-append "mirror://apache/commons/vfs/source/"
10701 "commons-vfs2-distribution-" version "-src.tar.gz"))
10702 (file-name (string-append name "-" version ".tar.gz"))
10705 "1cnq1iaghbp4cslpnvwbp83i5v234x87irssqynhwpfgw7caf1s3"))
10706 (modules '((guix build utils)))
10709 (for-each delete-file
10710 (find-files "." "\\.jar$"))
10712 (build-system ant-build-system)
10714 `(#:jar-name "commons-vfs.jar"
10715 #:source-dir "commons-vfs2/src/main/java"
10716 #:test-dir "commons-vfs2/src/test"
10717 ; FIXME: tests depend on many things: apache sshd, hadoop, ftpserver, ...
10720 (modify-phases %standard-phases
10721 (add-before 'build 'remove-hadoop-and-webdav
10722 ; Remove these files as they are not required and depend on difficult
10725 (for-each delete-file-recursively
10726 '("commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/webdav"
10727 "commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/hdfs"))
10730 `(("java-commons-collections4" ,java-commons-collections4)
10731 ("java-commons-compress" ,java-commons-compress)
10732 ("java-commons-httpclient" ,java-commons-httpclient)
10733 ("java-commons-logging-minimal" ,java-commons-logging-minimal)
10734 ("java-commons-net" ,java-commons-net)
10735 ("java-jsch" ,java-jsch)))
10736 (home-page "https://commons.apache.org/proper/commons-vfs/")
10737 (synopsis "Java file system library")
10738 (description "Commons VFS provides a single API for accessing various
10739 different file systems. It presents a uniform view of the files from various
10740 different sources, such as the files on local disk, on an HTTP server, or
10741 inside a Zip archive.")
10742 (license license:asl2.0)))
10744 (define-public java-jakarta-oro
10746 (name "java-jakarta-oro")
10750 (uri (string-append "https://archive.apache.org/dist/jakarta/oro/"
10751 "jakarta-oro-" version ".tar.gz"))
10754 "0rpmnsskiwmsy8r0sckz5n5dbvh3vkxx8hpm177c754r8xy3qksc"))
10755 (modules '((guix build utils)))
10758 (delete-file (string-append "jakarta-oro-" ,version ".jar"))
10760 (build-system ant-build-system)
10762 `(#:build-target "package"
10763 #:tests? #f; tests are run as part of the build process
10765 (modify-phases %standard-phases
10767 (install-jars ,(string-append "jakarta-oro-" version))))))
10768 (home-page "https://jakarta.apache.org/oro/")
10769 (synopsis "Text-processing for Java")
10770 (description "The Jakarta-ORO Java classes are a set of text-processing
10771 Java classes that provide Perl5 compatible regular expressions, AWK-like
10772 regular expressions, glob expressions, and utility classes for performing
10773 substitutions, splits, filtering filenames, etc. This library is the successor
10774 of the OROMatcher, AwkTools, PerlTools, and TextTools libraries originally
10776 (license license:asl1.1)))
10778 (define-public java-native-access
10780 (name "java-native-access")
10784 (uri (string-append "https://github.com/java-native-access/jna/"
10785 "archive/" version ".tar.gz"))
10786 (file-name (string-append name "-" version ".tar.gz"))
10789 "0zrpzkib6b905i018a9pqlzkqinphywr6y4jwv6mwp63jjqvqkd9"))
10790 (modules '((guix build utils)))
10793 (for-each delete-file (find-files "." ".*.jar"))
10794 (delete-file-recursively "native/libffi")
10795 (delete-file-recursively "dist")
10797 (build-system ant-build-system)
10799 `(#:tests? #f; FIXME: tests require reflections.jar
10800 #:test-target "test"
10801 #:make-flags (list "-Ddynlink.native=true")
10803 (modify-phases %standard-phases
10804 (add-before 'build 'fix-build.xml
10805 (lambda* (#:key inputs #:allow-other-keys)
10806 (substitute* "build.xml"
10807 ;; Since we removed the bundled ant.jar, give the correct path
10808 (("lib/ant.jar") (string-append (assoc-ref inputs "ant") "/lib/ant.jar"))
10809 ;; We removed generated native libraries. We can only rebuild one
10810 ;; so don't fail if we can't find a native library for another architecture.
10811 (("zipfileset") "zipfileset erroronmissingarchive=\"false\""))
10812 ;; Copy test dependencies
10813 (copy-file (string-append (assoc-ref inputs "java-junit")
10814 "/share/java/junit.jar")
10816 (copy-file (string-append (assoc-ref inputs "java-hamcrest-core")
10817 "/share/java/hamcrest-core.jar")
10818 "lib/hamcrest-core.jar")
10819 ;; FIXME: once reflections.jar is built, copy it to lib/test.
10821 (add-before 'build 'build-native
10823 (invoke "ant" "-Ddynlink.native=true" "native")
10826 (install-jars "build")))))
10828 `(("libffi" ,libffi)
10832 `(("java-junit" ,java-junit)
10833 ("java-hamcrest-core" ,java-hamcrest-core)))
10834 (home-page "https://github.com/java-native-access/jna")
10835 (synopsis "Access to native shared libraries from Java")
10836 (description "JNA provides Java programs easy access to native shared
10837 libraries without writing anything but Java code - no JNI or native code is
10838 required. JNA allows you to call directly into native functions using natural
10839 Java method invocation.")
10840 ;; Java Native Access project (JNA) is dual-licensed under 2
10841 ;; alternative Free licenses: LGPL 2.1 or later and Apache License 2.0.
10844 license:lgpl2.1+))))
10846 (define-public java-native-access-platform
10848 (inherit java-native-access)
10849 (name "java-native-access-platform")
10851 `(#:test-target "test"
10852 #:tests? #f; require jna-test.jar
10854 (modify-phases %standard-phases
10855 (add-before 'build 'chdir
10857 (chdir "contrib/platform")
10859 (add-after 'chdir 'fix-ant
10860 (lambda* (#:key inputs #:allow-other-keys)
10861 (substitute* "nbproject/project.properties"
10862 (("../../build/jna.jar")
10863 (string-append (assoc-ref inputs "java-native-access")
10864 "/share/java/jna.jar"))
10865 (("../../lib/hamcrest-core-.*.jar")
10866 (string-append (assoc-ref inputs "java-hamcrest-core")
10867 "/share/java/hamcrest-core.jar"))
10868 (("../../lib/junit.jar")
10869 (string-append (assoc-ref inputs "java-junit")
10870 "/share/java/junit.jar")))
10873 (install-jars "dist")))))
10875 `(("java-native-access" ,java-native-access)))
10876 (synopsis "Cross-platform mappings for jna")
10877 (description "java-native-access-platfrom has cross-platform mappings
10878 and mappings for a number of commonly used platform functions, including a
10879 large number of Win32 mappings as well as a set of utility classes that
10880 simplify native access.")))
10882 (define-public java-jsch-agentproxy-core
10884 (name "java-jsch-agentproxy-core")
10888 (uri (string-append "https://github.com/ymnk/jsch-agent-proxy/archive/"
10889 version ".tar.gz"))
10890 (file-name (string-append name "-" version ".tar.gz"))
10893 "02iqg6jbc1kxvfzqcg6wy9ygqxfm82bw5rf6vnswqy4y572niz4q"))))
10894 (build-system ant-build-system)
10896 `(#:jar-name "jsch-agentproxy-core.jar"
10897 #:source-dir "jsch-agent-proxy-core/src/main/java"
10898 #:tests? #f)); no tests
10899 (home-page "https://github.com/ymnk/jsch-agent-proxy")
10900 (synopsis "Core component of the proxy to ssh-agent and Pageant in Java")
10901 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10902 and Pageant included Putty. It will be easily integrated into JSch, and users
10903 will be allowed to use these programs for authentication.")
10904 (license license:bsd-3)))
10906 (define-public java-jsch-agentproxy-sshagent
10908 (inherit java-jsch-agentproxy-core)
10909 (name "java-jsch-agentproxy-sshagent")
10911 `(#:jar-name "jsch-agentproxy-sshagent.jar"
10912 #:source-dir "jsch-agent-proxy-sshagent/src/main/java"
10913 #:tests? #f)); no tests
10915 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
10916 (synopsis "Proxy to ssh-agent")
10917 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10918 and Pageant included in Putty. This component contains the code for a proxy to
10921 (define-public java-jsch-agentproxy-usocket-jna
10923 (inherit java-jsch-agentproxy-core)
10924 (name "java-jsch-agentproxy-usocket-jna")
10926 `(#:jar-name "jsch-agentproxy-usocket-jna.jar"
10927 #:source-dir "jsch-agent-proxy-usocket-jna/src/main/java"
10928 #:tests? #f)); no tests
10930 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
10931 ("java-native-access" ,java-native-access)))
10932 (synopsis "USocketFactory implementation using JNA")
10933 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10934 and Pageant included in Putty. This component contains an implementation of
10935 USocketFactory using @dfn{JNA} (Java Native Access).")))
10937 (define-public java-jsch-agentproxy-pageant
10939 (inherit java-jsch-agentproxy-core)
10940 (name "java-jsch-agentproxy-pageant")
10942 `(#:jar-name "jsch-agentproxy-pageant.jar"
10943 #:source-dir "jsch-agent-proxy-pageant/src/main/java"
10944 #:tests? #f)); no tests
10946 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
10947 ("java-native-access" ,java-native-access)
10948 ("java-native-access-platform" ,java-native-access-platform)))
10949 (synopsis "Proxy to pageant")
10950 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10951 and Pageant included in Putty. This component contains the code for a proxy to
10954 (define-public java-jsch-agentproxy-usocket-nc
10956 (inherit java-jsch-agentproxy-core)
10957 (name "java-jsch-agentproxy-usocket-nc")
10959 `(#:jar-name "jsch-agentproxy-usocket-nc.jar"
10960 #:source-dir "jsch-agent-proxy-usocket-nc/src/main/java"
10961 #:tests? #f)); no tests
10963 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
10964 (synopsis "USocketFactory implementation using netcat")
10965 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10966 and Pageant included in Putty. This component contains an implementation of
10967 USocketFactory using netcat.")))
10969 (define-public java-jsch-agentproxy-connector-factory
10971 (inherit java-jsch-agentproxy-core)
10972 (name "java-jsch-agentproxy-connector-factory")
10974 `(#:jar-name "jsch-agentproxy-connector-factory.jar"
10975 #:source-dir "jsch-agent-proxy-connector-factory/src/main/java"
10976 #:tests? #f)); no tests
10978 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
10979 ("java-jsch-agentproxy-sshagent" ,java-jsch-agentproxy-sshagent)
10980 ("java-jsch-agentproxy-usocket-jna" ,java-jsch-agentproxy-usocket-jna)
10981 ("java-jsch-agentproxy-pageant" ,java-jsch-agentproxy-pageant)
10982 ("java-jsch-agentproxy-usocket-nc" ,java-jsch-agentproxy-usocket-nc)))
10983 (synopsis "Connector factory for jsch agent proxy")
10984 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10985 and Pageant included in Putty. This component contains a connector factory.")))
10987 (define-public java-jsch-agentproxy-jsch
10989 (inherit java-jsch-agentproxy-core)
10990 (name "java-jsch-agentproxy-jsch")
10992 `(#:jar-name "jsch-agentproxy-jsch.jar"
10993 #:source-dir "jsch-agent-proxy-jsch/src/main/java"
10994 #:tests? #f)); no tests
10996 `(("java-jsch" ,java-jsch)
10997 ("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
10998 (synopsis "JSch integration library for agentproxy")
10999 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
11000 and Pageant included in Putty. This component contains a library to use
11001 jsch-agent-proxy with JSch.")))
11003 (define-public java-apache-ivy
11005 (name "java-apache-ivy")
11009 (uri (string-append "mirror://apache//ant/ivy/" version
11010 "/apache-ivy-" version "-src.tar.gz"))
11013 "1xkfn57g2m7l6y0xdq75x5rnrgk52m9jx2xah70g3ggl8750hbr0"))
11016 "java-apache-ivy-port-to-latest-bouncycastle.patch"))))
11017 (build-system ant-build-system)
11019 `(#:jar-name "ivy.jar"
11022 (modify-phases %standard-phases
11023 (add-before 'build 'remove-example
11025 (delete-file-recursively "src/example")
11027 (add-before 'build 'copy-resources
11029 (with-directory-excursion "src/java"
11030 (for-each (lambda (file)
11031 (install-file file (string-append "../../build/classes/" (dirname file))))
11033 (find-files "." ".*.css")
11034 (find-files "." ".*.ent")
11035 (find-files "." ".*.html")
11036 (find-files "." ".*.properties")
11037 (find-files "." ".*.xsd")
11038 (find-files "." ".*.xsl")
11039 (find-files "." ".*.xml"))))
11041 (add-before 'build 'fix-vfs
11044 '("src/java/org/apache/ivy/plugins/repository/vfs/VfsRepository.java"
11045 "src/java/org/apache/ivy/plugins/repository/vfs/VfsResource.java")
11046 (("import org.apache.commons.vfs") "import org.apache.commons.vfs2"))
11048 (add-before 'install 'copy-manifest
11050 (install-file "META-INF/MANIFEST.MF" "build/classes/META-INF")
11052 (add-before 'install 'repack
11054 (invoke "jar" "-cmf" "build/classes/META-INF/MANIFEST.MF" "build/jar/ivy.jar"
11055 "-C" "build/classes" ".")))
11056 (add-after 'install 'install-bin
11057 (lambda* (#:key outputs #:allow-other-keys)
11058 (let* ((bin (string-append (assoc-ref outputs "out") "/bin"))
11059 (ivy (string-append bin "/ivy"))
11060 (jar (string-append (assoc-ref outputs "out") "/share/java/ivy.jar")))
11062 (with-output-to-file ivy
11064 (display (string-append
11065 "#!" (which "sh") "\n"
11066 "if [[ -z $CLASSPATH ]]; then\n"
11067 " cp=\"" (getenv "CLASSPATH") ":" jar "\"\n"
11069 " cp=\"" (getenv "CLASSPATH") ":" jar ":$CLASSPATH\"\n"
11071 (which "java") " -cp $cp org.apache.ivy.Main $@\n"))))
11075 `(("java-bouncycastle" ,java-bouncycastle)
11076 ("java-commons-cli" ,java-commons-cli)
11077 ("java-commons-collections" ,java-commons-collections)
11078 ("java-commons-httpclient" ,java-commons-httpclient)
11079 ("java-commons-lang" ,java-commons-lang)
11080 ("java-commons-vfs" ,java-commons-vfs)
11081 ("java-jakarta-oro" ,java-jakarta-oro)
11082 ("java-jsch" ,java-jsch)
11083 ("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
11084 ("java-jsch-agentproxy-connector-factory" ,java-jsch-agentproxy-connector-factory)
11085 ("java-jsch-agentproxy-jsch" ,java-jsch-agentproxy-jsch)
11086 ("java-junit" ,java-junit)))
11087 (home-page "https://ant.apache.org/ivy")
11088 (synopsis "Dependency manager for the Java programming language")
11089 (description "Ivy is a tool for managing (recording, tracking, resolving
11090 and reporting) project dependencies. It is characterized by the following:
11093 @item flexibility and configurability - Ivy is essentially process agnostic
11094 and is not tied to any methodology or structure. Instead it provides the
11095 necessary flexibility and configurability to be adapted to a broad range
11096 of dependency management and build processes.
11097 @item tight integration with Apache Ant - while available as a standalone tool,
11098 Ivy works particularly well with Apache Ant providing a number of
11099 powerful Ant tasks ranging from dependency resolution to dependency
11100 reporting and publication.
11102 (license license:asl2.0)))
11104 (define-public java-eclipse-sisu-inject
11106 (name "java-eclipse-sisu-inject")
11110 (uri (git-reference
11111 (url "https://github.com/eclipse/sisu.inject/")
11112 (commit "releases/0.3.3")))
11113 (file-name (git-file-name name version))
11116 "0gibc9x0bw0f4ls086fx73610fcspz9g2as7kcpcfhvl5znysvg7"))))
11117 (build-system ant-build-system)
11119 `(#:jar-name "eclipse-sisu-inject.jar"
11120 #:source-dir "org.eclipse.sisu.inject/src"
11122 #:tests? #f)); no tests
11124 `(("java-guice" ,java-guice)
11125 ("java-guice-servlet" ,java-guice-servlet)
11126 ("java-javax-inject" ,java-javax-inject)
11127 ("java-javaee-servletapi" ,java-javaee-servletapi)
11128 ("java-junit" ,java-junit)
11129 ("java-slf4j-api" ,java-slf4j-api)
11130 ("java-jsr305" ,java-jsr305)
11131 ("java-jsr250" ,java-jsr250)
11132 ("java-cdi-api" ,java-cdi-api)
11133 ("java-osgi-framework" ,java-osgi-framework)
11134 ("java-osgi-util-tracker" ,java-osgi-util-tracker)
11135 ("java-testng" ,java-testng)))
11136 (home-page "https://www.eclipse.org/sisu/")
11137 (synopsis "Classpath scanning, auto-binding, and dynamic auto-wiring")
11138 (description "Sisu is a modular JSR330-based container that supports
11139 classpath scanning, auto-binding, and dynamic auto-wiring. Sisu uses
11140 Google-Guice to perform dependency injection and provide the core JSR330
11141 support, but removes the need to write explicit bindings in Guice modules.
11142 Integration with other containers via the Eclipse Extension Registry and the
11143 OSGi Service Registry is a goal of this project.")
11144 (license license:epl1.0)))
11146 (define-public java-eclipse-sisu-plexus
11148 (name "java-eclipse-sisu-plexus")
11152 (uri (git-reference
11153 (url "https://github.com/eclipse/sisu.plexus.git")
11154 (commit (string-append "releases/" version))))
11155 (file-name (git-file-name name version))
11158 "17mjlajnsqnk07cc58h1qpxrif85yb2m2y0pyba48yjjgikk8r9f"))
11159 (modules '((guix build utils)))
11162 (for-each delete-file (find-files "." ".*.jar"))
11163 (rename-file "org.eclipse.sisu.plexus.tests/src"
11164 "org.eclipse.sisu.plexus.tests/java")
11166 (build-system ant-build-system)
11168 `(#:jar-name "eclipse-sisu-plexus.jar"
11169 #:source-dir "org.eclipse.sisu.plexus/src"
11170 #:test-dir "org.eclipse.sisu.plexus.tests"
11173 ;; This test fails probably because we can't generate the necessary
11175 "**/PlexusLoggingTest.*"
11176 ;; FIXME: This test fails because of some injection error
11177 "**/PlexusRequirementTest.*")
11180 (modify-phases %standard-phases
11181 (add-before 'build 'copy-resources
11183 (install-file "org.eclipse.sisu.plexus/META-INF/plexus/components.xml"
11184 "build/classes/META-INF/plexus")
11186 (add-before 'check 'build-test-jar
11188 (with-directory-excursion "org.eclipse.sisu.plexus.tests/resources/component-jar/src/main/"
11190 (with-directory-excursion "java"
11191 (apply invoke "javac" "-cp"
11192 (string-append (getenv "CLASSPATH")
11193 ":../../../../../build/classes")
11194 (find-files "." ".*.java"))
11195 (for-each (lambda (file) (install-file file (string-append "../build/" file)))
11196 (find-files "." ".*.jar")))
11197 (mkdir-p "build/META-INF/plexus")
11198 (copy-file "resources/META-INF/plexus/components.xml"
11199 "build/META-INF/plexus/components.xml")
11200 (with-directory-excursion "build"
11201 (invoke "jar" "cf" "../../../component-jar-0.1.jar" ".")))
11202 (with-directory-excursion "org.eclipse.sisu.plexus.tests/"
11203 (copy-recursively "META-INF" "../build/test-classes/META-INF")
11204 (substitute* "java/org/eclipse/sisu/plexus/DefaultPlexusContainerTest.java"
11205 (("resources/component-jar")
11206 "org.eclipse.sisu.plexus.tests/resources/component-jar")))
11209 `(("java-plexus-classworlds" ,java-plexus-classworlds)
11210 ("java-plexus-util" ,java-plexus-utils)
11211 ("java-plexus-component-annotations" ,java-plexus-component-annotations)
11212 ("java-osgi-framework" ,java-osgi-framework)
11213 ("java-eclipse-sisu-inject" ,java-eclipse-sisu-inject)
11214 ("java-guice" ,java-guice)
11215 ("java-javax-inject" ,java-javax-inject)
11216 ("java-slf4j-api" ,java-slf4j-api)
11217 ("java-junit" ,java-junit)))
11219 `(("java-guava" ,java-guava)
11220 ("java-aopalliance" ,java-aopalliance)
11221 ("java-cglib" ,java-cglib)
11222 ("java-asm" ,java-asm)))
11223 (home-page "https://www.eclipse.org/sisu/")
11224 (synopsis "Plexus support for the sisu container")
11225 (description "Sisu is a modular JSR330-based container that supports
11226 classpath scanning, auto-binding, and dynamic auto-wiring. This package
11227 adds Plexus support to the Sisu-Inject container.")
11228 (license license:epl1.0)))
11230 (define-public java-commons-compiler
11232 (name "java-commons-compiler")
11236 (uri (git-reference
11237 (url "https://github.com/janino-compiler/janino")
11238 (commit "91aa95686d1e4ca3b16a984a03a38686572331b2")))
11239 (file-name (string-append name "-" version))
11242 "04hfdl59sgh20qkxzgnibvs8f9hy6n7znxwpk611y5d89977y62r"))
11243 (modules '((guix build utils)))
11246 (for-each delete-file
11247 (find-files "." "\\.jar$"))
11249 (build-system ant-build-system)
11251 `(#:jar-name "commons-compiler.jar"
11252 #:source-dir "commons-compiler/src/main"
11253 #:tests? #f)); no tests
11254 (home-page "https://github.com/janino-compiler/janino")
11255 (synopsis "Java compiler")
11256 (description "Commons-compiler contains an API for janino, including the
11257 @code{IExpressionEvaluator}, @code{IScriptEvaluator}, @code{IClassBodyEvaluator}
11258 and @code{ISimpleCompiler} interfaces.")
11259 (license license:bsd-3)))
11261 (define-public java-janino
11263 (inherit java-commons-compiler)
11264 (name "java-janino")
11266 `(#:jar-name "janino.jar"
11267 #:source-dir "src/main/java"
11269 (modify-phases %standard-phases
11270 (add-before 'configure 'chdir
11275 `(("java-commons-compiler" ,java-commons-compiler)))
11277 `(("java-junit" ,java-junit)
11278 ("java-hamcrest-core" ,java-hamcrest-core)))
11279 (description "Janino is a Java compiler. Janino can compile a set of
11280 source files to a set of class files like @code{javac}, but also compile a
11281 Java expression, block, class body or source file in memory, load the bytecode
11282 and execute it directly in the same JVM. @code{janino} can also be used for
11283 static code analysis or code manipulation.")))
11285 (define-public java-logback-core
11287 (name "java-logback-core")
11291 (uri (string-append "https://github.com/qos-ch/logback/archive/v_"
11292 version ".tar.gz"))
11293 (file-name (string-append name "-" version ".tar.gz"))
11296 "1x6ga74yfgm94cfx98gybakbrlilx8i2gn6dx13l40kasmys06mi"))
11297 (modules '((guix build utils)))
11300 (delete-file-recursively "logback-access/lib")
11302 (build-system ant-build-system)
11304 `(#:jar-name "logback.jar"
11305 #:source-dir "src/main/java"
11306 #:test-dir "src/test"
11308 ;; These tests fail with Unable to set MockitoNamingPolicy on cglib generator
11309 ;; which creates FastClasses
11310 (list "**/AllCoreTest.*"
11311 "**/AutoFlushingObjectWriterTest.*"
11313 "**/ResilientOutputStreamTest.*"
11314 ;; And we still don't want to run abstract classes
11317 (modify-phases %standard-phases
11318 (add-before 'configure 'chdir
11320 (chdir "logback-core")
11323 `(("java-javax-mail" ,java-javax-mail)
11324 ("servlet" ,java-javaee-servletapi)
11325 ("java-commons-compiler" ,java-commons-compiler)
11326 ("java-janino" ,java-janino)))
11328 `(("java-junit" ,java-junit)
11329 ("java-hamcrest-core" ,java-hamcrest-core)
11330 ("java-mockito-1" ,java-mockito-1)
11331 ("java-cglib" ,java-cglib)
11332 ("java-asm" ,java-asm)
11333 ("java-objenesis" ,java-objenesis)
11334 ("java-joda-time" ,java-joda-time)))
11335 (home-page "https://logback.qos.ch")
11336 (synopsis "Logging for java")
11337 (description "Logback is intended as a successor to the popular log4j project.
11338 This module lays the groundwork for the other two modules.")
11339 ;; Either epl1.0 or lgpl2.1
11340 (license (list license:epl1.0
11341 license:lgpl2.1))))
11343 (define-public java-logback-classic
11345 (inherit java-logback-core)
11346 (name "java-logback-classic")
11348 `(#:jar-name "logback-classic.jar"
11349 #:source-dir "src/main/java"
11350 #:test-dir "src/test"
11351 #:tests? #f; tests require more packages: h2, greenmail, hsql, subethamail, slf4j, log4j, felix
11354 (modify-phases %standard-phases
11355 (add-before 'configure 'chdir
11357 (chdir "logback-classic")
11360 (lambda* (#:key inputs #:allow-other-keys)
11361 (mkdir-p "build/classes")
11362 (setenv "CLASSPATH"
11364 (apply append (map (lambda (input)
11365 (find-files (assoc-ref inputs input)
11367 '("java-logback-core" "java-slf4j-api"
11368 "java-commons-compiler" "servlet"
11371 (apply invoke "groovyc" "-d" "build/classes" "-j"
11372 (find-files "src/main/" ".*\\.(groovy|java)$"))
11373 (invoke "ant" "jar")
11376 `(("java-logback-core" ,java-logback-core)
11377 ("java-slf4j-api" ,java-slf4j-api)
11378 ,@(package-inputs java-logback-core)))
11380 `(("groovy" ,groovy)))
11381 (description "Logback is intended as a successor to the popular log4j project.
11382 This module can be assimilated to a significantly improved version of log4j.
11383 Moreover, @code{logback-classic} natively implements the slf4j API so that you
11384 can readily switch back and forth between logback and other logging frameworks
11385 such as log4j or @code{java.util.logging} (JUL).")))
11387 (define-public java-qdox
11390 ; Newer version exists, but this version is required by java-plexus-component-metadata
11394 ;; 2.0-M4, -M5 at https://github.com/paul-hammant/qdox
11395 ;; Older releases at https://github.com/codehaus/qdox/
11396 ;; Note: The release at maven is pre-generated. The release at
11397 ;; github requires jflex.
11398 (uri (string-append "http://central.maven.org/maven2/"
11399 "com/thoughtworks/qdox/qdox/" version
11400 "/qdox-" version "-sources.jar"))
11403 "10xxrcaicq6axszcr2jpygisa4ch4sinyx5q7kqqxv4lknrmxp5x"))))
11404 (build-system ant-build-system)
11406 `(#:jar-name "qdox.jar"
11407 #:tests? #f)); no tests
11408 (home-page "http://qdox.codehaus.org/")
11409 (synopsis "Parse definitions from Java source files")
11410 (description "QDox is a high speed, small footprint parser for extracting
11411 class/interface/method definitions from source files complete with JavaDoc
11412 @code{@@tags}. It is designed to be used by active code generators or
11413 documentation tools.")
11414 (license license:asl2.0)))
11416 (define-public java-jgit
11419 (version "4.7.0.201704051617-r")
11422 (uri (string-append "https://repo1.maven.org/maven2/"
11423 "org/eclipse/jgit/org.eclipse.jgit/"
11424 version "/org.eclipse.jgit-"
11425 version "-sources.jar"))
11428 "13ii4jn02ynzq6i7gsyi21k2i94jpc85wf6bcm31q4cyvzv0mk4k"))))
11429 (build-system ant-build-system)
11431 `(#:tests? #f ; There are no tests to run.
11432 #:jar-name "jgit.jar"
11433 ;; JGit must be built with a JDK supporting Java 8.
11435 ;; Target our older default JDK.
11436 #:make-flags (list "-Dtarget=1.7")
11438 (modify-phases %standard-phases
11439 ;; The jar file generated by the default build.xml does not include
11440 ;; the text properties files, so we need to add them.
11441 (add-after 'build 'add-properties
11442 (lambda* (#:key jar-name #:allow-other-keys)
11443 (with-directory-excursion "src"
11444 (apply invoke "jar" "-uf"
11445 (string-append "../build/jar/" jar-name)
11446 (find-files "." "\\.properties$")))
11449 `(("java-classpathx-servletapi" ,java-classpathx-servletapi)
11450 ("java-javaewah" ,java-javaewah)
11451 ("java-jsch" ,java-jsch)
11452 ("java-slf4j-api" ,java-slf4j-api)))
11453 (home-page "https://eclipse.org/jgit/")
11454 (synopsis "Java library implementing the Git version control system")
11455 (description "JGit is a lightweight, pure Java library implementing the
11456 Git version control system, providing repository access routines, support for
11457 network protocols, and core version control algorithms.")
11458 (license license:edl1.0)))
11460 ;; For axoloti. This package can still be built with icedtea-7, which is
11461 ;; currently used as the default JDK.
11462 (define-public java-jgit-4.2
11463 (package (inherit java-jgit)
11464 (version "4.2.0.201601211800-r")
11467 (uri (string-append "https://repo1.maven.org/maven2/"
11468 "org/eclipse/jgit/org.eclipse.jgit/"
11469 version "/org.eclipse.jgit-"
11470 version "-sources.jar"))
11473 "15gm537iivhnzlkjym4x3wn5jqdjdragsw9pdpzqqg21nrc817mm"))))
11474 (build-system ant-build-system)
11476 (substitute-keyword-arguments (package-arguments java-jgit)
11477 ;; Build for default JDK.
11478 ((#:jdk _) icedtea-7)
11480 `(modify-phases ,phases
11481 (add-after 'unpack 'use-latest-javaewah-API
11483 (substitute* "src/org/eclipse/jgit/internal/storage/file/BitmapIndexImpl.java"
11484 (("wordinbits") "WORD_IN_BITS"))
11487 `(("java-javaewah" ,java-javaewah)
11488 ("java-jsch" ,java-jsch)
11489 ("java-slf4j-api" ,java-slf4j-api)))))
11491 (define-public abcl
11498 (uri (string-append "https://abcl.org/releases/"
11499 version "/abcl-src-" version ".tar.gz"))
11502 "0hvbcsffr8n2xwdixc8wyw1bfl9fxn2gyy0c4nma7j9zbn0wwgw9"))
11505 "abcl-fix-build-xml.patch"))))
11506 (build-system ant-build-system)
11508 `(("java-junit" ,java-junit)))
11510 `(#:build-target "abcl.jar"
11511 #:test-target "abcl.test"
11513 (modify-phases %standard-phases
11515 (lambda* (#:key outputs #:allow-other-keys)
11516 (let ((share (string-append (assoc-ref outputs "out")
11518 (bin (string-append (assoc-ref outputs "out")
11521 (install-file "dist/abcl.jar" share)
11522 (install-file "dist/abcl-contrib.jar" share)
11524 (with-output-to-file (string-append bin "abcl")
11526 (let ((classpath (string-append
11529 share "abcl-contrib.jar")))
11530 (display (string-append
11531 "#!" (which "sh") "\n"
11532 "if [[ -z $CLASSPATH ]]; then\n"
11533 " cp=\"" classpath "\"\n"
11535 " cp=\"" classpath ":$CLASSPATH\"\n"
11537 "exec " (which "java")
11538 " -cp $cp org.armedbear.lisp.Main $@\n")))))
11539 (chmod (string-append bin "abcl") #o755)
11541 (home-page "https://abcl.org/")
11542 (synopsis "Common Lisp Implementation on the JVM")
11544 "@dfn{Armed Bear Common Lisp} (ABCL) is a full implementation of the Common
11545 Lisp language featuring both an interpreter and a compiler, running in the
11546 JVM. It supports JSR-223 (Java scripting API): it can be a scripting engine
11547 in any Java application. Additionally, it can be used to implement (parts of)
11548 the application using Java to Lisp integration APIs.")
11549 (license (list license:gpl2+
11550 ;; named-readtables is released under 3 clause BSD
11552 ;; jfli is released under CPL 1.0
11555 (define-public java-jsonp-api
11557 (name "java-jsonp-api")
11561 (uri (git-reference
11562 (url "https://github.com/eclipse-ee4j/jsonp")
11563 (commit (string-append "1.1-" version "-RELEASE"))))
11564 (file-name (git-file-name name version))
11567 "0zrj03hkr3jdmqlb4ipjr37cqpp2q2814qpmxi7srlwpdqs0ibgc"))))
11568 (build-system ant-build-system)
11570 `(#:jar-name "jsonp-api.jar"
11572 #:source-dir "api/src/main/java"
11573 #:test-dir "api/src/test"))
11574 (home-page "https://eclipse-ee4j.github.io/jsonp/")
11575 (synopsis "JSON Processing in Java")
11576 (description "JSON Processing (JSON-P) is a Java API to process (e.g.
11577 parse, generate, transform and query) JSON messages. It produces and
11578 consumes JSON text in a streaming fashion (similar to StAX API for XML)
11579 and allows to build a Java object model for JSON text using API classes
11580 (similar to DOM API for XML).")
11581 ;; either gpl2 only with classpath exception, or epl2.0.
11582 (license (list license:gpl2
11585 (define-public java-jsonp-impl
11587 (inherit java-jsonp-api)
11588 (name "java-jsonp-impl")
11590 `(#:jar-name "jsonp-impl.jar"
11592 #:source-dir "impl/src/main/java"
11593 #:test-dir "impl/src/test"
11595 (modify-phases %standard-phases
11596 (add-before 'build 'copy-resources
11599 "impl/src/main/resources/"
11603 `(("java-jsonp-api" ,java-jsonp-api)))
11604 (description "JSON Processing (JSON-P) is a Java API to process (e.g.
11605 parse, generate, transform and query) JSON messages. This package contains
11606 a reference implementation of that API.")))
11608 (define-public java-xmp
11614 (uri (string-append "http://download.macromedia.com/pub/developer"
11615 "/xmp/sdk/XMPCoreJava-" version ".zip"))
11618 "14nai2mmsg7l5ya2y5mx4w4lr1az3sk2fjz6hiy4zdrsavgvl1g7"))))
11619 (build-system ant-build-system)
11621 `(#:build-target "build"
11622 #:tests? #f; no tests
11624 (modify-phases %standard-phases
11625 (add-after 'unpack 'chdir
11629 (add-before 'build 'fix-timestamp
11631 (substitute* "build.xml"
11632 (("\\$\\{BuildDate\\}") "1970 Jan 01 00:00:00-GMT"))
11635 (install-jars "."))
11636 (add-after 'install 'install-doc
11637 (lambda* (#:key outputs #:allow-other-keys)
11640 (string-append (assoc-ref outputs "out") "/share/doc/java-xmp"))
11643 `(("unzip" ,unzip)))
11644 (home-page "https://www.adobe.com/devnet/xmp.html")
11645 (synopsis "Extensible Metadat Platform (XMP) support in Java")
11646 (description "Adobe's Extensible Metadata Platform (XMP) is a labeling
11647 technology that allows you to embed data about a file, known as metadata,
11648 into the file itself. The XMP Toolkit for Java is based on the C++ XMPCore
11649 library and the API is similar.")
11650 (license license:bsd-3)))
11652 (define-public java-metadata-extractor
11654 (name "java-metadata-extractor")
11658 (uri (git-reference
11659 (url "https://github.com/drewnoakes/metadata-extractor")
11661 (file-name (git-file-name name version))
11664 "06yrq0swrl1r40yjbk5kqzjxr04jlkq9lfi711jvfgjf5kp2qinj"))))
11665 (build-system ant-build-system)
11667 `(#:jar-name "metadata-extractor.jar"
11668 #:source-dir "Source"
11671 (modify-phases %standard-phases
11672 (add-before 'check 'fix-test-dir
11674 (substitute* "build.xml"
11675 (("/java\">") "\">"))
11678 `(("java-xmp" ,java-xmp)))
11680 `(("java-hamcrest-core" ,java-hamcrest-core)
11681 ("java-junit" ,java-junit)))
11682 (home-page "https://github.com/drewnoakes/metadata-extractor")
11683 (synopsis "Extract metadata from image and video files")
11684 (description "Metadata-extractor is a straightforward Java library for
11685 reading metadata from image files. It is able to read metadata in Exif,
11686 IPTC, XMP, ICC and more formats.")
11687 (license license:asl2.0)))
11689 (define-public java-svg-salamander
11691 (name "java-svg-salamander")
11695 (uri (git-reference
11696 (url "https://github.com/blackears/svgSalamander")
11697 (commit (string-append "v" version))))
11698 (file-name (git-file-name name version))
11701 "1zv3kjdkf6iqf02x6ln76254y634j2ji448y706a65lsbfjmmicf"))
11702 (modules '((guix build utils)))
11705 (for-each delete-file (find-files "." ".*.jar"))
11708 (search-patches "java-svg-salamander-Fix-non-det.patch"))))
11709 (build-system ant-build-system)
11711 `(#:tests? #f; no tests
11713 (modify-phases %standard-phases
11714 (add-after 'unpack 'chdir
11718 (add-before 'build 'copy-jars
11719 (lambda* (#:key inputs #:allow-other-keys)
11720 (copy-file (car (find-files (assoc-ref inputs "javacc") "\\.jar$"))
11721 "../libraries/javacc.jar")
11722 (copy-file (car (find-files (assoc-ref inputs "ant") "ant\\.jar$"))
11723 "../libraries/ant.jar")
11726 (install-jars "dist")))))
11728 `(("javacc" ,javacc)))
11729 (home-page "https://github.com/blackears/svgSalamander")
11730 (synopsis "SVG engine for Java")
11731 (description "SVG Salamander is an SVG engine for Java that's designed
11732 to be small, fast, and allow programmers to use it with a minimum of fuss.
11733 It's in particular targeted for making it easy to integrate SVG into Java
11734 games and making it much easier for artists to design 2D game content - from
11735 rich interactive menus to charts and graphcs to complex animations.")
11736 (license license:bsd-2)))
11738 (define-public java-jboss-transaction-api-spec
11740 (name "java-jboss-transaction-api-spec")
11741 (version "1.2+1.1.1")
11744 (uri (git-reference
11745 (url "https://github.com/jboss/jboss-transaction-api_spec")
11746 (commit "jboss-transaction-api_1.2_spec-1.1.1.Final")))
11747 (file-name (git-file-name name version))
11750 "1xbfq5hvb86izflydxrqqv3k26c1ba2m0ap6m97shqrsdi9by4wy"))))
11751 (build-system ant-build-system)
11753 `(#:jar-name "java-jboss-transaction-api_spec.jar"
11754 #:source-dir "src/main/java"
11755 #:tests? #f)); no tests
11757 `(("java-cdi-api" ,java-cdi-api)
11758 ("java-jboss-interceptors-api-spec" ,java-jboss-interceptors-api-spec)))
11759 (home-page "https://github.com/jboss/jboss-transaction-api_spec")
11760 (synopsis "Generic transaction management API in Java")
11761 (description "Java-jboss-transaction-api-spec implements the Transactions
11762 API. A transaction is a unit of work containing one or more operations
11763 involving one or more shared resources having ACID (Atomicity, Consistency,
11764 Isolation and Durability) properties.")
11765 ;; either gpl2 only with classpath exception or cddl.
11766 (license (list license:gpl2 license:cddl1.0))))