1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2015, 2016, 2017, 2018 Ricardo Wurmus <rekado@elephly.net>
3 ;;; Copyright © 2016 Leo Famulari <leo@famulari.name>
4 ;;; Copyright © 2016, 2017 Roel Janssen <roel@gnu.org>
5 ;;; Copyright © 2017 Carlo Zancanaro <carlo@zancanaro.id.au>
6 ;;; Copyright © 2017 Julien Lepiller <julien@lepiller.eu>
7 ;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be>
8 ;;; Copyright © 2016, 2017, 2018 Alex Vong <alexvong1995@gmail.com>
9 ;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr>
10 ;;; Copyright © 2018 Gábor Boskovits <boskovits@gmail.com>
11 ;;; Copyright © 2018 Chris Marusich <cmmarusich@gmail.com>
13 ;;; This file is part of GNU Guix.
15 ;;; GNU Guix is free software; you can redistribute it and/or modify it
16 ;;; under the terms of the GNU General Public License as published by
17 ;;; the Free Software Foundation; either version 3 of the License, or (at
18 ;;; your option) any later version.
20 ;;; GNU Guix is distributed in the hope that it will be useful, but
21 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
22 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 ;;; GNU General Public License for more details.
25 ;;; You should have received a copy of the GNU General Public License
26 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
28 (define-module (gnu packages java)
29 #:use-module ((guix licenses) #:prefix license:)
30 #:use-module (guix packages)
31 #:use-module (guix download)
32 #:use-module (guix hg-download)
33 #:use-module (guix git-download)
34 #:use-module (guix svn-download)
35 #:use-module (guix utils)
36 #:use-module (guix build-system ant)
37 #:use-module (guix build-system gnu)
38 #:use-module (guix build-system trivial)
39 #:use-module (gnu packages)
40 #:use-module (gnu packages attr)
41 #:use-module (gnu packages autotools)
42 #:use-module (gnu packages base)
43 #:use-module (gnu packages bash)
44 #:use-module (gnu packages certs)
45 #:use-module (gnu packages cpio)
46 #:use-module (gnu packages cups)
47 #:use-module (gnu packages compression)
48 #:use-module (gnu packages fontutils)
49 #:use-module (gnu packages gawk)
50 #:use-module (gnu packages gettext)
51 #:use-module (gnu packages gcc)
52 #:use-module (gnu packages gl)
53 #:use-module (gnu packages gnuzilla) ;nss
54 #:use-module (gnu packages ghostscript) ;lcms
55 #:use-module (gnu packages gnome)
56 #:use-module (gnu packages gtk)
57 #:use-module (gnu packages guile)
58 #:use-module (gnu packages icu4c)
59 #:use-module (gnu packages image)
60 #:use-module (gnu packages libffi)
61 #:use-module (gnu packages linux) ;alsa
62 #:use-module (gnu packages maths)
63 #:use-module (gnu packages web)
64 #:use-module (gnu packages wget)
65 #:use-module (gnu packages pkg-config)
66 #:use-module (gnu packages perl)
67 #:use-module (gnu packages popt)
68 #:use-module (gnu packages kerberos)
69 #:use-module (gnu packages xml)
70 #:use-module (gnu packages xorg)
71 #:use-module (gnu packages texinfo)
72 #:use-module ((srfi srfi-1) #:select (fold alist-delete))
73 #:use-module (srfi srfi-11)
74 #:use-module (ice-9 match))
78 ;;; Java bootstrap toolchain.
81 ;; The Java bootstrap begins with Jikes, a Java compiler written in C++. We
82 ;; use it to build a simple version of GNU Classpath, the Java standard
83 ;; library. We chose version 0.93 because it is the last version that can be
84 ;; built with Jikes. With Jikes and this version of GNU Classpath we can
85 ;; build JamVM, a Java Virtual Machine. We build version 1.5.1 because it is
86 ;; the last version of JamVM that works with a version of GNU classpath that
87 ;; does not require ECJ. These three packages make up the bootstrap JDK.
89 ;; This is sufficient to build an older version of Ant, which is needed to
90 ;; build an older version of ECJ, an incremental Java compiler, both of which
91 ;; are written in Java.
93 ;; ECJ is needed to build the latest release (0.99) and the development
94 ;; version of GNU Classpath. The development version of GNU Classpath has
95 ;; much more support for Java 1.6 than the latest release, but we need to
96 ;; build 0.99 first to get a working version of javah. ECJ, the development
97 ;; version of GNU Classpath, and the latest version of JamVM make up the
98 ;; second stage JDK with which we can build the OpenJDK with the Icedtea 1.x
99 ;; build framework. We then build the more recent JDKs Icedtea 2.x and
108 (uri (string-append "mirror://sourceforge/jikes/Jikes/"
109 version "/jikes-" version ".tar.bz2"))
112 "1qqldrp74pzpy5ly421srqn30qppmm9cvjiqdngk8hf47dv2rc0c"))))
113 (build-system gnu-build-system)
114 (home-page "http://jikes.sourceforge.net/")
115 (synopsis "Compiler for the Java language")
116 (description "Jikes is a compiler that translates Java source files as
117 defined in The Java Language Specification into the bytecoded instruction set
118 and binary format defined in The Java Virtual Machine Specification.")
119 (license license:ibmpl1.0)))
121 ;; This is the last version of GNU Classpath that can be built without ECJ.
122 (define classpath-bootstrap
128 (uri (string-append "mirror://gnu/classpath/classpath-"
132 "0i99wf9xd3hw1sj2sazychb9prx8nadxh2clgvk3zlmb28v0jbfz"))
133 (patches (search-patches "classpath-aarch64-support.patch"))))
134 (build-system gnu-build-system)
137 (list (string-append "JAVAC="
138 (assoc-ref %build-inputs "jikes")
143 "--disable-gconf-peer"
149 (modify-phases %standard-phases
150 (add-after 'install 'install-data
151 (lambda _ (zero? (system* "make" "install-data")))))))
156 ("pkg-config" ,pkg-config)))
157 (home-page "https://www.gnu.org/software/classpath/")
158 (synopsis "Essential libraries for Java")
159 (description "GNU Classpath is a project to create core class libraries
160 for use with runtimes, compilers and tools for the Java programming
162 ;; GPLv2 or later, with special linking exception.
163 (license license:gpl2+)))
165 ;; This is the last version of JamVM that works with a version of GNU
166 ;; classpath that does not require ECJ.
167 (define jamvm-1-bootstrap
173 (uri (string-append "mirror://sourceforge/jamvm/jamvm/"
174 "JamVM%20" version "/jamvm-"
178 "06lhi03l3b0h48pc7x58bk9my2nrcf1flpmglvys3wyad6yraf36"))))
179 (build-system gnu-build-system)
182 (list (string-append "--with-classpath-install-dir="
183 (assoc-ref %build-inputs "classpath")))))
185 `(("classpath" ,classpath-bootstrap)
188 (home-page "http://jamvm.sourceforge.net/")
189 (synopsis "Small Java Virtual Machine")
190 (description "JamVM is a Java Virtual Machine conforming to the JVM
191 specification edition 2 (blue book). It is extremely small. However, unlike
192 other small VMs it supports the full spec, including object finalisation and
194 (license license:gpl2+)))
196 (define ant-bootstrap
198 (name "ant-bootstrap")
199 ;; The 1.10.x series requires Java 8. 1.9.0 and later use generics, which
200 ;; are not supported. The 1.8.x series is the last to use only features
201 ;; supported by Jikes.
205 (uri (string-append "http://archive.apache.org/dist/"
206 "ant/source/apache-ant-"
207 version "-src.tar.bz2"))
210 "1cg0lga887qz5iizh6mlkxp01lciymrhmp7wzxpl6zpnldxmzrjx"))))
211 (build-system gnu-build-system)
213 `(#:tests? #f ; no "check" target
215 (modify-phases %standard-phases
219 (lambda* (#:key inputs #:allow-other-keys)
220 (setenv "JAVA_HOME" (assoc-ref inputs "jamvm"))
222 (string-append (assoc-ref inputs "jamvm")
225 (string-append (assoc-ref inputs "jikes")
228 (string-append (assoc-ref inputs "jamvm")
231 ;; Ant complains if this file doesn't exist.
232 (setenv "HOME" "/tmp")
233 (with-output-to-file "/tmp/.ant.properties"
234 (lambda _ (display "")))
236 ;; Use jikes instead of javac for <javac ...> tags in build.xml
237 (setenv "ANT_OPTS" "-Dbuild.compiler=jikes")
239 ;; jikes produces lots of warnings, but they are not very
240 ;; interesting, so we silence them.
241 (setenv "$BOOTJAVAC_OPTS" "-nowarn")
243 ;; Without these JamVM options the build may freeze.
244 (substitute* "bootstrap.sh"
245 (("^\"\\$\\{JAVACMD\\}\" " m)
246 (string-append m "-Xnocompact -Xnoinlining ")))
248 ;; Disable tests because we are bootstrapping and thus don't have
249 ;; any of the dependencies required to build and run the tests.
250 (substitute* "build.xml"
251 (("depends=\"jars,test-jar\"") "depends=\"jars\""))
252 (zero? (system* "bash" "bootstrap.sh"
253 (string-append "-Ddist.dir="
254 (assoc-ref %outputs "out"))))))
258 ("jamvm" ,jamvm-1-bootstrap)))
259 (home-page "http://ant.apache.org")
260 (synopsis "Build tool for Java")
262 "Ant is a platform-independent build tool for Java. It is similar to
263 make but is implemented using the Java language, requires the Java platform,
264 and is best suited to building Java projects. Ant uses XML to describe the
265 build process and its dependencies, whereas Make uses Makefile format.")
266 (license license:asl2.0)))
268 ;; Version 3.2.2 is the last version without a dependency on a full-fledged
269 ;; compiler for Java 1.5.
270 (define ecj-bootstrap
272 (name "ecj-bootstrap")
276 (uri (string-append "http://archive.eclipse.org/eclipse/"
277 "downloads/drops/R-" version
278 "-200702121330/ecjsrc.zip"))
281 "05hj82kxd23qaglsjkaqcj944riisjha7acf7h3ljhrjyljx8307"))))
282 ;; It would be so much easier if we could use the ant-build-system, but we
283 ;; cannot as we don't have ant at this point. We use ecj for
284 ;; bootstrapping the JDK.
285 (build-system gnu-build-system)
287 `(#:modules ((guix build gnu-build-system)
290 #:tests? #f ; there are no tests
292 (modify-phases %standard-phases
294 (lambda* (#:key inputs #:allow-other-keys)
297 (cons (string-append (assoc-ref inputs "jamvm")
299 (find-files (string-append
300 (assoc-ref inputs "ant-bootstrap")
306 (lambda* (#:key inputs #:allow-other-keys)
307 ;; The unpack phase enters the "org" directory by mistake.
310 ;; Create a simple manifest to make ecj executable.
311 (with-output-to-file "manifest"
313 (display "Manifest-Version: 1.0
314 Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n")))
317 (and (zero? (apply system* "jikes"
318 (find-files "." "\\.java$")))
319 (zero? (system* "fastjar" "cvfm"
320 "ecj-bootstrap.jar" "manifest" ".")))))
322 (lambda* (#:key outputs #:allow-other-keys)
323 (let ((share (string-append (assoc-ref outputs "out")
326 (install-file "ecj-bootstrap.jar" share)
329 `(("ant-bootstrap" ,ant-bootstrap)
332 ("jamvm" ,jamvm-1-bootstrap)
333 ("fastjar" ,fastjar)))
334 (home-page "https://eclipse.org")
335 (synopsis "Eclipse Java development tools core batch compiler")
336 (description "This package provides the Eclipse Java core batch compiler
337 for bootstrapping purposes. The @dfn{Eclipse compiler for Java} (ecj) is a
338 requirement for all GNU Classpath releases after version 0.93.")
339 (license license:epl1.0)))
341 (define ecj-javac-wrapper
342 (package (inherit ecj-bootstrap)
343 (name "ecj-javac-wrapper")
345 (build-system trivial-build-system)
347 `(#:modules ((guix build utils))
350 (use-modules (guix build utils))
351 (let* ((bin (string-append (assoc-ref %outputs "out") "/bin"))
352 (target (string-append bin "/javac"))
353 (guile (string-append (assoc-ref %build-inputs "guile")
355 (ecj (string-append (assoc-ref %build-inputs "ecj-bootstrap")
356 "/share/java/ecj-bootstrap.jar"))
357 (java (string-append (assoc-ref %build-inputs "jamvm")
359 (bootcp (let ((jvmlib (string-append (assoc-ref %build-inputs "classpath")
360 "/share/classpath")))
361 (string-append jvmlib "/glibj.zip:"
362 jvmlib "/tools.zip"))))
364 (with-output-to-file target
366 (format #t "#!~a --no-auto-compile\n!#\n" guile)
368 `(begin (use-modules (ice-9 match)
374 '(("-bootclasspath" ,bootcp)
379 (let ((classpath (getenv "CLASSPATH")))
381 (string-join (list ,ecj
382 ,(string-append (assoc-ref %build-inputs "jamvm")
386 (receive (vm-args other-args)
387 ;; Separate VM arguments from arguments to ECJ.
388 (partition (cut string-prefix? "-J" <>)
389 (fold (lambda (default acc)
390 (if (member (first default) acc)
391 acc (append default acc)))
395 (list "-Xnocompact" "-Xnoinlining")
396 ;; Remove "-J" prefix
397 (map (cut string-drop <> 2) vm-args)
398 '("org.eclipse.jdt.internal.compiler.batch.Main")
399 (cons "-nowarn" other-args)))))
401 (let ((args (cdr (command-line))))
403 (format (current-error-port) "javac: no arguments given!\n")
408 `(("guile" ,guile-2.2)
409 ("ecj-bootstrap" ,ecj-bootstrap)
410 ("jamvm" ,jamvm-1-bootstrap)
411 ("classpath" ,classpath-bootstrap)))
412 (description "This package provides a wrapper around the @dfn{Eclipse
413 compiler for Java} (ecj) with a command line interface that is compatible with
414 the standard javac executable.")))
416 ;; The classpath-bootstrap was built without a virtual machine, so it does not
417 ;; provide a wrapper for javah. We cannot build the development version of
418 ;; Classpath without javah.
419 (define classpath-0.99
420 (package (inherit classpath-bootstrap)
424 (uri (string-append "mirror://gnu/classpath/classpath-"
428 "1j7cby4k66f1nvckm48xcmh352b1d1b33qk7l6hi7dp9i9zjjagr"))
429 (patches (search-patches "classpath-aarch64-support.patch"))))
432 (list (string-append "--with-ecj-jar="
433 (assoc-ref %build-inputs "ecj-bootstrap")
434 "/share/java/ecj-bootstrap.jar")
435 (string-append "JAVAC="
436 (assoc-ref %build-inputs "ecj-javac-wrapper")
438 (string-append "JAVA="
439 (assoc-ref %build-inputs "jamvm")
442 "ac_cv_prog_java_works=yes" ; trust me
446 "--disable-gconf-peer"
452 (modify-phases %standard-phases
453 (add-after 'install 'install-data
454 (lambda _ (zero? (system* "make" "install-data")))))))
456 `(("ecj-bootstrap" ,ecj-bootstrap)
457 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
459 ("jamvm" ,jamvm-1-bootstrap)
460 ("classpath" ,classpath-bootstrap)
462 ("pkg-config" ,pkg-config)))))
464 ;; We need this because classpath-bootstrap does not provide all of the tools
465 ;; we need to build classpath-devel.
466 (define classpath-jamvm-wrappers
467 (package (inherit classpath-0.99)
468 (name "classpath-jamvm-wrappers")
470 (build-system trivial-build-system)
472 `(#:modules ((guix build utils))
475 (use-modules (guix build utils))
476 (let* ((bash (assoc-ref %build-inputs "bash"))
477 (jamvm (assoc-ref %build-inputs "jamvm"))
478 (classpath (assoc-ref %build-inputs "classpath"))
479 (bin (string-append (assoc-ref %outputs "out")
482 (for-each (lambda (tool)
483 (with-output-to-file (string-append bin tool)
485 (format #t "#!~a/bin/sh
486 ~a/bin/jamvm -Xnocompact -Xnoinlining -classpath ~a/share/classpath/tools.zip \
487 gnu.classpath.tools.~a.~a $@"
488 bash jamvm classpath tool
489 (if (string=? "native2ascii" tool)
490 "Native2ASCII" "Main"))))
491 (chmod (string-append bin tool) #o755))
501 ("jamvm" ,jamvm-1-bootstrap)
502 ("classpath" ,classpath-0.99)))
504 (synopsis "Executables from GNU Classpath")
505 (description "This package provides wrappers around the tools provided by
506 the GNU Classpath library. They are executed by the JamVM virtual
509 ;; The last release of GNU Classpath is 0.99 and it happened in 2012. Since
510 ;; then Classpath has gained much more support for Java 1.6.
511 (define-public classpath-devel
512 (let ((commit "e7c13ee0cf2005206fbec0eca677f8cf66d5a103")
514 (package (inherit classpath-bootstrap)
515 (version (string-append "0.99-" revision "." (string-take commit 9)))
519 (url "https://git.savannah.gnu.org/git/classpath.git")
521 (file-name (string-append "classpath-" version "-checkout"))
524 "1v2rww76ww322mpg3s12a1kkc6gkp31bm9gcxs532h0wq285fiw4"))))
527 ;; Ensure that the initial heap size is smaller than the maximum
528 ;; size. By default only Xmx is set, which can lead to invalid
529 ;; memory settings on some machines with a lot of memory.
530 '("JAVAC_MEM_OPT=-J-Xms512M -J-Xmx768M")
532 (list (string-append "--with-ecj-jar="
533 (assoc-ref %build-inputs "ecj-bootstrap")
534 "/share/java/ecj-bootstrap.jar")
535 (string-append "--with-javac="
536 (assoc-ref %build-inputs "ecj-javac-wrapper")
538 (string-append "JAVA="
539 (assoc-ref %build-inputs "jamvm")
542 "ac_cv_prog_java_works=yes" ; trust me
546 "--disable-gconf-peer"
552 (modify-phases %standard-phases
553 (add-after 'unpack 'bootstrap
555 (zero? (system* "autoreconf" "-vif"))))
556 (add-after 'unpack 'remove-unsupported-annotations
558 (substitute* (find-files "java" "\\.java$")
561 (add-after 'install 'install-data
562 (lambda _ (zero? (system* "make" "install-data")))))))
564 `(("autoconf" ,autoconf)
565 ("automake" ,automake)
567 ("gettext" ,gettext-minimal)
569 ("classpath-jamvm-wrappers" ,classpath-jamvm-wrappers) ; for javah
570 ("ecj-bootstrap" ,ecj-bootstrap)
571 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
573 ("jamvm" ,jamvm-1-bootstrap)
575 ("pkg-config" ,pkg-config))))))
578 (package (inherit jamvm-1-bootstrap)
582 (uri (string-append "mirror://sourceforge/jamvm/jamvm/"
583 "JamVM%20" version "/jamvm-"
587 "1nl0zxz8y5x8gwsrm7n32bry4dx8x70p8z3s9jbdvs8avyb8whkn"))))
588 (build-system gnu-build-system)
591 (list (string-append "--with-classpath-install-dir="
592 (assoc-ref %build-inputs "classpath")))))
594 `(("classpath" ,classpath-devel)
595 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
598 (define ecj-javac-wrapper-final
599 (package (inherit ecj-javac-wrapper)
601 `(("guile" ,guile-2.2)
602 ("ecj-bootstrap" ,ecj-bootstrap)
604 ("classpath" ,classpath-devel)))))
606 ;; The bootstrap JDK consisting of jamvm, classpath-devel,
607 ;; ecj-javac-wrapper-final cannot build Icedtea 2.x directly, because it's
608 ;; written in Java 7. It can, however, build the unmaintained Icedtea 1.x,
609 ;; which uses Java 6 only.
610 (define-public icedtea-6
617 "http://icedtea.wildebeest.org/download/source/icedtea6-"
621 "0bg9sb4f7qbq77c0zf9m17p47ga0kf0r9622g9p12ysg26jd1ksg"))
622 (modules '((guix build utils)))
624 '(substitute* "Makefile.in"
625 ;; do not leak information about the build host
626 (("DISTRIBUTION_ID=\"\\$\\(DIST_ID\\)\"")
627 "DISTRIBUTION_ID=\"\\\"guix\\\"\"")))))
628 (build-system gnu-build-system)
629 (outputs '("out" ; Java Runtime Environment
630 "jdk" ; Java Development Kit
631 "doc")) ; all documentation
633 `(;; There are many failing tests and many are known to fail upstream.
636 ;; The DSOs use $ORIGIN to refer to each other, but (guix build
637 ;; gremlin) doesn't support it yet, so skip this phase.
638 #:validate-runpath? #f
640 #:modules ((guix build utils)
641 (guix build gnu-build-system)
645 `("--enable-bootstrap"
648 "--with-parallel-jobs"
649 "--disable-downloading"
651 ,(string-append "--with-ecj="
652 (assoc-ref %build-inputs "ecj")
653 "/share/java/ecj-bootstrap.jar")
654 ,(string-append "--with-jar="
655 (assoc-ref %build-inputs "fastjar")
657 ,(string-append "--with-jdk-home="
658 (assoc-ref %build-inputs "classpath"))
659 ,(string-append "--with-java="
660 (assoc-ref %build-inputs "jamvm")
663 (modify-phases %standard-phases
665 (lambda* (#:key source inputs #:allow-other-keys)
666 (and (zero? (system* "tar" "xvf" source))
668 (chdir (string-append "icedtea6-" ,version))
670 (copy-recursively (assoc-ref inputs "openjdk-src") "openjdk")
671 ;; The convenient OpenJDK source bundle is no longer
672 ;; available for download, so we have to take the sources
673 ;; from the Mercurial repositories and change the Makefile
674 ;; to avoid tests for the OpenJDK zip archive.
675 (with-directory-excursion "openjdk"
676 (for-each (lambda (part)
680 (string-append part "-src"))
682 '("jdk" "hotspot" "corba"
683 "langtools" "jaxp" "jaxws")))
684 (substitute* "Makefile.in"
685 (("echo \"ERROR: No up-to-date OpenJDK zip available\"; exit -1;")
686 "echo \"trust me\";")
687 ;; The contents of the bootstrap directory must be
688 ;; writeable but when copying from the store they are
690 (("mkdir -p lib/rt" line)
691 (string-append line "; chmod -R u+w $(BOOT_DIR)")))
692 (zero? (system* "chmod" "-R" "u+w" "openjdk"))
694 (add-after 'unpack 'use-classpath
695 (lambda* (#:key inputs #:allow-other-keys)
696 (let ((jvmlib (assoc-ref inputs "classpath"))
697 (jamvm (assoc-ref inputs "jamvm")))
698 ;; Classpath does not provide rt.jar.
699 (substitute* "Makefile.in"
700 (("\\$\\(SYSTEM_JDK_DIR\\)/jre/lib/rt.jar")
701 (string-append jvmlib "/share/classpath/glibj.zip")))
702 ;; Make sure we can find all classes.
704 (string-append jvmlib "/share/classpath/glibj.zip:"
705 jvmlib "/share/classpath/tools.zip:"
706 jamvm "/lib/rt.jar"))
708 (string-append "-cp "
709 jvmlib "/share/classpath/glibj.zip:"
710 jvmlib "/share/classpath/tools.zip")))
712 (add-after 'unpack 'patch-patches
714 ;; shebang in patches so that they apply cleanly
715 (substitute* '("patches/jtreg-jrunscript.patch"
716 "patches/hotspot/hs23/drop_unlicensed_test.patch")
717 (("#!/bin/sh") (string-append "#!" (which "sh"))))
719 (add-after 'unpack 'patch-paths
720 (lambda* (#:key inputs #:allow-other-keys)
721 ;; buildtree.make generates shell scripts, so we need to replace
722 ;; the generated shebang
723 (substitute* '("openjdk/hotspot/make/linux/makefiles/buildtree.make")
724 (("/bin/sh") (which "bash")))
726 (let ((corebin (string-append
727 (assoc-ref inputs "coreutils") "/bin/"))
728 (binbin (string-append
729 (assoc-ref inputs "binutils") "/bin/"))
730 (grepbin (string-append
731 (assoc-ref inputs "grep") "/bin/")))
732 (substitute* '("openjdk/jdk/make/common/shared/Defs-linux.gmk"
733 "openjdk/corba/make/common/shared/Defs-linux.gmk")
734 (("UNIXCOMMAND_PATH = /bin/")
735 (string-append "UNIXCOMMAND_PATH = " corebin))
736 (("USRBIN_PATH = /usr/bin/")
737 (string-append "USRBIN_PATH = " corebin))
738 (("DEVTOOLS_PATH *= */usr/bin/")
739 (string-append "DEVTOOLS_PATH = " corebin))
740 (("COMPILER_PATH *= */usr/bin/")
741 (string-append "COMPILER_PATH = "
742 (assoc-ref inputs "gcc") "/bin/"))
743 (("DEF_OBJCOPY *=.*objcopy")
744 (string-append "DEF_OBJCOPY = " (which "objcopy"))))
746 ;; fix path to alsa header
747 (substitute* "openjdk/jdk/make/common/shared/Sanity.gmk"
748 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
749 (string-append "ALSA_INCLUDE="
750 (assoc-ref inputs "alsa-lib")
751 "/include/alsa/version.h")))
753 ;; fix hard-coded utility paths
754 (substitute* '("openjdk/jdk/make/common/shared/Defs-utils.gmk"
755 "openjdk/corba/make/common/shared/Defs-utils.gmk")
757 (string-append "ECHO = " (which "echo")))
759 (string-append "GREP = " (which "grep")))
761 (string-append "EGREP = " (which "egrep")))
763 (string-append "CPIO = " (which "cpio")))
764 (("READELF *=.*readelf")
765 (string-append "READELF = " (which "readelf")))
767 (string-append "AR = " (which "ar")))
769 (string-append "TAR = " (which "tar")))
771 (string-append "AS = " (which "as")))
773 (string-append "LD = " (which "ld")))
775 (string-append "STRIP = " (which "strip")))
777 (string-append "NM = " (which "nm")))
779 (string-append "SH = " (which "bash")))
781 (string-append "FIND = " (which "find")))
783 (string-append "LDD = " (which "ldd")))
784 (("NAWK *=.*(n|g)awk")
785 (string-append "NAWK = " (which "gawk")))
787 (string-append "XARGS = " (which "xargs")))
789 (string-append "UNZIP = " (which "unzip")))
791 (string-append "ZIPEXE = " (which "zip")))
793 (string-append "SED = " (which "sed"))))
795 ;; Some of these timestamps cause problems as they are more than
796 ;; 10 years ago, failing the build process.
798 "openjdk/jdk/src/share/classes/java/util/CurrencyData.properties"
799 (("AZ=AZM;2005-12-31-20-00-00;AZN") "AZ=AZN")
800 (("MZ=MZM;2006-06-30-22-00-00;MZN") "MZ=MZN")
801 (("RO=ROL;2005-06-30-21-00-00;RON") "RO=RON")
802 (("TR=TRL;2004-12-31-22-00-00;TRY") "TR=TRY"))
804 (add-before 'configure 'set-additional-paths
805 (lambda* (#:key inputs #:allow-other-keys)
807 (string-append (assoc-ref inputs "libxrender")
808 "/include/X11/extensions" ":"
809 (assoc-ref inputs "libxtst")
810 "/include/X11/extensions" ":"
811 (assoc-ref inputs "libxinerama")
812 "/include/X11/extensions" ":"
813 (or (getenv "CPATH") "")))
814 (setenv "ALT_CUPS_HEADERS_PATH"
815 (string-append (assoc-ref inputs "cups")
817 (setenv "ALT_FREETYPE_HEADERS_PATH"
818 (string-append (assoc-ref inputs "freetype")
820 (setenv "ALT_FREETYPE_LIB_PATH"
821 (string-append (assoc-ref inputs "freetype")
825 (lambda* (#:key outputs #:allow-other-keys)
826 (let ((doc (string-append (assoc-ref outputs "doc")
827 "/share/doc/icedtea"))
828 (jre (assoc-ref outputs "out"))
829 (jdk (assoc-ref outputs "jdk")))
830 (copy-recursively "openjdk.build/docs" doc)
831 (copy-recursively "openjdk.build/j2re-image" jre)
832 (copy-recursively "openjdk.build/j2sdk-image" jdk))
835 `(("ant" ,ant-bootstrap)
836 ("alsa-lib" ,alsa-lib)
838 ("classpath" ,classpath-devel)
839 ("coreutils" ,coreutils)
842 ("ecj" ,ecj-bootstrap)
843 ("ecj-javac" ,ecj-javac-wrapper-final)
845 ("fontconfig" ,fontconfig)
846 ("freetype" ,freetype)
857 ("libxcomposite" ,libxcomposite)
859 ("libxinerama" ,libxinerama)
860 ("libxrender" ,libxrender)
861 ("libxslt" ,libxslt) ;for xsltproc
864 ("mit-krb5" ,mit-krb5)
866 ("nss-certs" ,nss-certs)
868 ("pkg-config" ,pkg-config)
869 ("procps" ,procps) ;for "free", even though I'm not sure we should use it
879 (url "http://hg.openjdk.java.net/jdk6/jdk6/")
880 (changeset "jdk6-b41")))
883 "14q47yfg586fs64w30g8mk92m5dkxsvr36zzh0ra99xk5x0x96mv"))))
888 (url "http://hg.openjdk.java.net/jdk6/jdk6/jdk/")
889 (changeset "jdk6-b41")))
892 "165824nhg1k1dx6zs9dny0j49rmk35jw5b13dmz8c77jfajml4v9"))))
897 (url "http://hg.openjdk.java.net/jdk6/jdk6/hotspot/")
898 (changeset "jdk6-b41")))
901 "07lc1z4k5dj9nrc1wvwmpvxr3xgxrdkdh53xb95skk5ij49yagfd"))))
906 (url "http://hg.openjdk.java.net/jdk6/jdk6/corba/")
907 (changeset "jdk6-b41")))
910 "1p9g1r9dnax2iwp7yb59qx7m4nmshqhwmrb2b8jj8zgbd9dl2i3q"))))
915 (url "http://hg.openjdk.java.net/jdk6/jdk6/langtools/")
916 (changeset "jdk6-b41")))
919 "1x52wd67fynbbd9ild6fb4wvba3f5hhwk03qdjfazd0a1qr37z3d"))))
924 (url "http://hg.openjdk.java.net/jdk6/jdk6/jaxp/")
925 (changeset "jdk6-b41")))
928 "0shlqrvzpr4nrkmv215lbxnby63s3yvbdh1yxcayznsyqwa4nlxm"))))
933 (url "http://hg.openjdk.java.net/jdk6/jdk6/jaxws/")
934 (changeset "jdk6-b41")))
937 "0835lkw8vib1xhp8lxnybhlvzdh699hbi4mclxanydjk63zbpxk0"))))))
938 (home-page "http://icedtea.classpath.org")
939 (synopsis "Java development kit")
941 "This package provides the OpenJDK built with the IcedTea build harness.
942 This version of the OpenJDK is no longer maintained and is only used for
943 bootstrapping purposes.")
944 ;; IcedTea is released under the GPL2 + Classpath exception, which is the
945 ;; same license as both GNU Classpath and OpenJDK.
946 (license license:gpl2+)))
948 (define-public icedtea-7
949 (let* ((version "2.6.13")
950 (drop (lambda (name hash)
954 "http://icedtea.classpath.org/download/drops"
955 "/icedtea7/" version "/" name ".tar.bz2"))
956 (sha256 (base32 hash))))))
963 "http://icedtea.wildebeest.org/download/source/icedtea-"
967 "1w331rdqx1dcx2xb0fmjmrkdc71xqn20fxsgw8by4xhiblh88khh"))
968 (modules '((guix build utils)))
970 '(substitute* "Makefile.in"
971 ;; do not leak information about the build host
972 (("DISTRIBUTION_ID=\"\\$\\(DIST_ID\\)\"")
973 "DISTRIBUTION_ID=\"\\\"guix\\\"\"")))))
974 (build-system gnu-build-system)
975 (outputs '("out" ; Java Runtime Environment
976 "jdk" ; Java Development Kit
977 "doc")) ; all documentation
979 `(;; There are many test failures. Some are known to
980 ;; fail upstream, others relate to not having an X
981 ;; server running at test time, yet others are a
982 ;; complete mystery to me.
984 ;; hotspot: passed: 241; failed: 45; error: 2
985 ;; langtools: passed: 1,934; failed: 26
989 ;; The DSOs use $ORIGIN to refer to each other, but (guix build
990 ;; gremlin) doesn't support it yet, so skip this phase.
991 #:validate-runpath? #f
993 ;; Apparently, the C locale is needed for some of the tests.
996 #:modules ((guix build utils)
997 (guix build gnu-build-system)
1004 ;; TODO: package pcsc and sctp, and add to inputs
1005 `("--disable-system-pcsc"
1006 "--disable-system-sctp"
1007 "--enable-bootstrap"
1010 "--disable-downloading"
1011 "--disable-tests" ;they are run in the check phase instead
1012 "--with-openjdk-src-dir=./openjdk.src"
1013 ,(string-append "--with-jdk-home="
1014 (assoc-ref %build-inputs "jdk")))
1017 (modify-phases %standard-phases
1019 (lambda* (#:key source inputs #:allow-other-keys)
1020 (let ((target (string-append "icedtea-" ,version))
1021 (unpack (lambda* (name #:optional dir)
1023 (string-drop-right name 5))))
1025 (zero? (system* "tar" "xvf"
1026 (assoc-ref inputs name)
1028 "--strip-components=1"))))))
1031 (zero? (system* "tar" "xvf" source
1032 "-C" target "--strip-components=1"))
1034 (unpack "openjdk-src" "openjdk.src")
1035 (with-directory-excursion "openjdk.src"
1037 (filter (cut string-suffix? "-drop" <>)
1042 (add-after 'unpack 'fix-x11-extension-include-path
1043 (lambda* (#:key inputs #:allow-other-keys)
1044 (substitute* "openjdk.src/jdk/make/sun/awt/mawt.gmk"
1045 (((string-append "\\$\\(firstword \\$\\(wildcard "
1046 "\\$\\(OPENWIN_HOME\\)"
1047 "/include/X11/extensions\\).*$"))
1048 (string-append (assoc-ref inputs "libxrender")
1049 "/include/X11/extensions"
1050 " -I" (assoc-ref inputs "libxtst")
1051 "/include/X11/extensions"
1052 " -I" (assoc-ref inputs "libxinerama")
1053 "/include/X11/extensions"))
1054 (("\\$\\(wildcard /usr/include/X11/extensions\\)\\)") ""))
1056 (add-after 'unpack 'patch-paths
1058 ;; buildtree.make generates shell scripts, so we need to replace
1059 ;; the generated shebang
1060 (substitute* '("openjdk.src/hotspot/make/linux/makefiles/buildtree.make")
1061 (("/bin/sh") (which "bash")))
1063 (let ((corebin (string-append
1064 (assoc-ref %build-inputs "coreutils") "/bin/"))
1065 (binbin (string-append
1066 (assoc-ref %build-inputs "binutils") "/bin/"))
1067 (grepbin (string-append
1068 (assoc-ref %build-inputs "grep") "/bin/")))
1069 (substitute* '("openjdk.src/jdk/make/common/shared/Defs-linux.gmk"
1070 "openjdk.src/corba/make/common/shared/Defs-linux.gmk")
1071 (("UNIXCOMMAND_PATH = /bin/")
1072 (string-append "UNIXCOMMAND_PATH = " corebin))
1073 (("USRBIN_PATH = /usr/bin/")
1074 (string-append "USRBIN_PATH = " corebin))
1075 (("DEVTOOLS_PATH *= */usr/bin/")
1076 (string-append "DEVTOOLS_PATH = " corebin))
1077 (("COMPILER_PATH *= */usr/bin/")
1078 (string-append "COMPILER_PATH = "
1079 (assoc-ref %build-inputs "gcc") "/bin/"))
1080 (("DEF_OBJCOPY *=.*objcopy")
1081 (string-append "DEF_OBJCOPY = " (which "objcopy"))))
1083 ;; fix path to alsa header
1084 (substitute* "openjdk.src/jdk/make/common/shared/Sanity.gmk"
1085 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
1086 (string-append "ALSA_INCLUDE="
1087 (assoc-ref %build-inputs "alsa-lib")
1088 "/include/alsa/version.h")))
1090 ;; fix hard-coded utility paths
1091 (substitute* '("openjdk.src/jdk/make/common/shared/Defs-utils.gmk"
1092 "openjdk.src/corba/make/common/shared/Defs-utils.gmk")
1094 (string-append "ECHO = " (which "echo")))
1096 (string-append "GREP = " (which "grep")))
1097 (("EGREP *=.*egrep")
1098 (string-append "EGREP = " (which "egrep")))
1100 (string-append "CPIO = " (which "cpio")))
1101 (("READELF *=.*readelf")
1102 (string-append "READELF = " (which "readelf")))
1104 (string-append "AR = " (which "ar")))
1106 (string-append "TAR = " (which "tar")))
1108 (string-append "AS = " (which "as")))
1110 (string-append "LD = " (which "ld")))
1111 (("STRIP *=.*strip")
1112 (string-append "STRIP = " (which "strip")))
1114 (string-append "NM = " (which "nm")))
1116 (string-append "SH = " (which "bash")))
1118 (string-append "FIND = " (which "find")))
1120 (string-append "LDD = " (which "ldd")))
1121 (("NAWK *=.*(n|g)awk")
1122 (string-append "NAWK = " (which "gawk")))
1123 (("XARGS *=.*xargs")
1124 (string-append "XARGS = " (which "xargs")))
1125 (("UNZIP *=.*unzip")
1126 (string-append "UNZIP = " (which "unzip")))
1128 (string-append "ZIPEXE = " (which "zip")))
1130 (string-append "SED = " (which "sed"))))
1132 ;; Some of these timestamps cause problems as they are more than
1133 ;; 10 years ago, failing the build process.
1135 "openjdk.src/jdk/src/share/classes/java/util/CurrencyData.properties"
1136 (("AZ=AZM;2005-12-31-20-00-00;AZN") "AZ=AZN")
1137 (("MZ=MZM;2006-06-30-22-00-00;MZN") "MZ=MZN")
1138 (("RO=ROL;2005-06-30-21-00-00;RON") "RO=RON")
1139 (("TR=TRL;2004-12-31-22-00-00;TRY") "TR=TRY")))
1141 (add-before 'configure 'set-additional-paths
1142 (lambda* (#:key inputs #:allow-other-keys)
1143 (substitute* "openjdk.src/jdk/make/common/shared/Sanity.gmk"
1144 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
1145 (string-append "ALSA_INCLUDE="
1146 (assoc-ref inputs "alsa-lib")
1147 "/include/alsa/version.h")))
1150 (string-append (assoc-ref inputs "libxcomposite")
1151 "/include/X11/extensions" ":"
1152 (assoc-ref inputs "libxrender")
1153 "/include/X11/extensions" ":"
1154 (assoc-ref inputs "libxtst")
1155 "/include/X11/extensions" ":"
1156 (assoc-ref inputs "libxinerama")
1157 "/include/X11/extensions" ":"
1158 (or (getenv "CPATH") "")))
1159 (setenv "ALT_OBJCOPY" (which "objcopy"))
1160 (setenv "ALT_CUPS_HEADERS_PATH"
1161 (string-append (assoc-ref inputs "cups")
1163 (setenv "ALT_FREETYPE_HEADERS_PATH"
1164 (string-append (assoc-ref inputs "freetype")
1166 (setenv "ALT_FREETYPE_LIB_PATH"
1167 (string-append (assoc-ref inputs "freetype")
1170 (add-before 'check 'fix-test-framework
1172 ;; Fix PATH in test environment
1173 (substitute* "test/jtreg/com/sun/javatest/regtest/Main.java"
1174 (("PATH=/bin:/usr/bin")
1175 (string-append "PATH=" (getenv "PATH"))))
1176 (substitute* "test/jtreg/com/sun/javatest/util/SysEnv.java"
1177 (("/usr/bin/env") (which "env")))
1178 (substitute* "openjdk.src/hotspot/test/test_env.sh"
1179 (("/bin/rm") (which "rm"))
1180 (("/bin/cp") (which "cp"))
1181 (("/bin/mv") (which "mv")))
1183 (add-before 'check 'fix-hotspot-tests
1185 (with-directory-excursion "openjdk.src/hotspot/test/"
1186 (substitute* "jprt.config"
1187 (("PATH=\"\\$\\{path4sdk\\}\"")
1188 (string-append "PATH=" (getenv "PATH")))
1189 (("make=/usr/bin/make")
1190 (string-append "make=" (which "make"))))
1191 (substitute* '("runtime/6626217/Test6626217.sh"
1192 "runtime/7110720/Test7110720.sh")
1193 (("/bin/rm") (which "rm"))
1194 (("/bin/cp") (which "cp"))
1195 (("/bin/mv") (which "mv"))))
1197 (add-before 'check 'fix-jdk-tests
1199 (with-directory-excursion "openjdk.src/jdk/test/"
1200 (substitute* "com/sun/jdi/JdbReadTwiceTest.sh"
1201 (("/bin/pwd") (which "pwd")))
1202 (substitute* "com/sun/jdi/ShellScaffold.sh"
1203 (("/bin/kill") (which "kill")))
1204 (substitute* "start-Xvfb.sh"
1205 ;;(("/usr/bin/X11/Xvfb") (which "Xvfb"))
1206 (("/usr/bin/nohup") (which "nohup")))
1207 (substitute* "javax/security/auth/Subject/doAs/Test.sh"
1208 (("/bin/rm") (which "rm")))
1209 (substitute* "tools/launcher/MultipleJRE.sh"
1210 (("echo \"#!/bin/sh\"")
1211 (string-append "echo \"#!" (which "rm") "\""))
1212 (("/usr/bin/zip") (which "zip")))
1213 (substitute* "com/sun/jdi/OnThrowTest.java"
1214 (("#!/bin/sh") (string-append "#!" (which "sh"))))
1215 (substitute* "java/lang/management/OperatingSystemMXBean/GetSystemLoadAverage.java"
1216 (("/usr/bin/uptime") (which "uptime")))
1217 (substitute* "java/lang/ProcessBuilder/Basic.java"
1218 (("/usr/bin/env") (which "env"))
1219 (("/bin/false") (which "false"))
1220 (("/bin/true") (which "true"))
1221 (("/bin/cp") (which "cp"))
1222 (("/bin/sh") (which "sh")))
1223 (substitute* "java/lang/ProcessBuilder/FeelingLucky.java"
1224 (("/bin/sh") (which "sh")))
1225 (substitute* "java/lang/ProcessBuilder/Zombies.java"
1226 (("/usr/bin/perl") (which "perl"))
1227 (("/bin/ps") (which "ps"))
1228 (("/bin/true") (which "true")))
1229 (substitute* "java/lang/Runtime/exec/ConcurrentRead.java"
1230 (("/usr/bin/tee") (which "tee")))
1231 (substitute* "java/lang/Runtime/exec/ExecWithDir.java"
1232 (("/bin/true") (which "true")))
1233 (substitute* "java/lang/Runtime/exec/ExecWithInput.java"
1234 (("/bin/cat") (which "cat")))
1235 (substitute* "java/lang/Runtime/exec/ExitValue.java"
1236 (("/bin/sh") (which "sh"))
1237 (("/bin/true") (which "true"))
1238 (("/bin/kill") (which "kill")))
1239 (substitute* "java/lang/Runtime/exec/LotsOfDestroys.java"
1240 (("/usr/bin/echo") (which "echo")))
1241 (substitute* "java/lang/Runtime/exec/LotsOfOutput.java"
1242 (("/usr/bin/cat") (which "cat")))
1243 (substitute* "java/lang/Runtime/exec/SleepyCat.java"
1244 (("/bin/cat") (which "cat"))
1245 (("/bin/sleep") (which "sleep"))
1246 (("/bin/sh") (which "sh")))
1247 (substitute* "java/lang/Runtime/exec/StreamsSurviveDestroy.java"
1248 (("/bin/cat") (which "cat")))
1249 (substitute* "java/rmi/activation/CommandEnvironment/SetChildEnv.java"
1250 (("/bin/chmod") (which "chmod")))
1251 (substitute* "java/util/zip/ZipFile/Assortment.java"
1252 (("/bin/sh") (which "sh"))))
1256 ;; The "make check-*" targets always return zero, so we need to
1257 ;; check for errors in the associated log files to determine
1258 ;; whether any tests have failed.
1259 (use-modules (ice-9 rdelim))
1260 (let* ((error-pattern (make-regexp "^(Error|FAILED):.*"))
1261 (checker (lambda (port)
1263 (let ((line (read-line port)))
1265 ((eof-object? line) #t)
1266 ((regexp-exec error-pattern line) #f)
1268 (run-test (lambda (test)
1269 (system* "make" test)
1270 (call-with-input-file
1271 (string-append "test/" test ".log")
1274 (and (run-test "check-hotspot")
1275 (run-test "check-langtools")
1276 (run-test "check-jdk"))))))
1278 (lambda* (#:key outputs #:allow-other-keys)
1279 (let ((doc (string-append (assoc-ref outputs "doc")
1280 "/share/doc/icedtea"))
1281 (jre (assoc-ref outputs "out"))
1282 (jdk (assoc-ref outputs "jdk")))
1283 (copy-recursively "openjdk.build/docs" doc)
1284 (copy-recursively "openjdk.build/j2re-image" jre)
1285 (copy-recursively "openjdk.build/j2sdk-image" jdk))
1287 ;; Some of the libraries in the lib/amd64 folder link to libjvm.so.
1288 ;; But that shared object is located in the server/ folder, so it
1289 ;; cannot be found. This phase creates a symbolic link in the
1290 ;; lib/amd64 folder so that the other libraries can find it.
1293 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
1295 ;; FIXME: Find the bug in the build system, so that this symlink is
1297 (add-after 'install 'install-libjvm
1298 (lambda* (#:key inputs outputs #:allow-other-keys)
1299 (let* ((lib-path (string-append (assoc-ref outputs "out")
1301 (symlink (string-append lib-path "/server/libjvm.so")
1302 (string-append lib-path "/libjvm.so")))
1304 ;; By default IcedTea only generates an empty keystore. In order to
1305 ;; be able to use certificates in Java programs we need to generate a
1306 ;; keystore from a set of certificates. For convenience we use the
1307 ;; certificates from the nss-certs package.
1308 (add-after 'install 'install-keystore
1309 (lambda* (#:key inputs outputs #:allow-other-keys)
1310 (let* ((keystore "cacerts")
1311 (certs-dir (string-append (assoc-ref inputs "nss-certs")
1313 (keytool (string-append (assoc-ref outputs "jdk")
1315 (define (extract-cert file target)
1316 (call-with-input-file file
1318 (call-with-output-file target
1320 (let loop ((line (read-line in 'concat))
1323 ((eof-object? line) #t)
1324 ((string-prefix? "-----BEGIN" line)
1326 (loop (read-line in 'concat) #t))
1327 ((string-prefix? "-----END" line)
1331 (when copying? (display line out))
1332 (loop (read-line in 'concat) copying?)))))))))
1333 (define (import-cert cert)
1334 (format #t "Importing certificate ~a\n" (basename cert))
1335 (let ((temp "tmpcert"))
1336 (extract-cert cert temp)
1337 (let ((port (open-pipe* OPEN_WRITE keytool
1339 "-alias" (basename cert)
1340 "-keystore" keystore
1341 "-storepass" "changeit"
1343 (display "yes\n" port)
1344 (when (not (zero? (status:exit-val (close-pipe port))))
1345 (format #t "failed to import ~a\n" cert)))
1346 (delete-file temp)))
1348 ;; This is necessary because the certificate directory contains
1349 ;; files with non-ASCII characters in their names.
1350 (setlocale LC_ALL "en_US.utf8")
1351 (setenv "LC_ALL" "en_US.utf8")
1353 (for-each import-cert (find-files certs-dir "\\.pem$"))
1354 (mkdir-p (string-append (assoc-ref outputs "out")
1356 (mkdir-p (string-append (assoc-ref outputs "jdk")
1357 "/jre/lib/security"))
1359 ;; The cacerts files we are going to overwrite are chmod'ed as
1360 ;; read-only (444) in icedtea-8 (which derives from this
1361 ;; package). We have to change this so we can overwrite them.
1362 (chmod (string-append (assoc-ref outputs "out")
1363 "/lib/security/" keystore) #o644)
1364 (chmod (string-append (assoc-ref outputs "jdk")
1365 "/jre/lib/security/" keystore) #o644)
1367 (install-file keystore
1368 (string-append (assoc-ref outputs "out")
1370 (install-file keystore
1371 (string-append (assoc-ref outputs "jdk")
1372 "/jre/lib/security"))
1377 "0l34ikyf62hbzlf9032alzkkqvf7bpmckz4gvirvph755w7gka8l"))
1380 "050gv2jbg1pi6qkn8w18bwpbklfa5b0kymjvan9pncddbj8m84fz"))
1383 "1k6yldwnxfzdg5926r1nlfv8d1r1j7rlp2nkz6gqh05vgyamnfhl"))
1386 "110j7jlz47x2gg6f7653x12mssan5kvj9l9h1m1c8c92drfxbqyk"))
1389 "0d1mca38ksxvdskp9im3pp7fdijhj1n3lwq9w13r9s4v3qyskgdd"))
1392 "0nq5236fzxn3p6x8cgncl56mzcmsj07q9gymysnws4c8byc6n0qj"))
1395 "17bdv39n4lh8l5737c96f3xgamx4y305m067p01cywgp7zaddqws"))
1396 ("ant" ,ant-bootstrap)
1398 ("coreutils" ,coreutils)
1399 ("diffutils" ,diffutils) ;for tests
1402 ("libtool" ,libtool)
1403 ("pkg-config" ,pkg-config)
1409 ("fastjar" ,fastjar)
1410 ("libxslt" ,libxslt) ;for xsltproc
1411 ("nss-certs" ,nss-certs)
1413 ("procps" ,procps) ;for "free", even though I'm not sure we should use it
1414 ("jdk" ,icedtea-6 "jdk")))
1416 `(("alsa-lib" ,alsa-lib)
1419 ("libxcomposite" ,libxcomposite)
1421 ("libxtst" ,libxtst)
1423 ("libxinerama" ,libxinerama)
1424 ("libxrender" ,libxrender)
1425 ("libjpeg" ,libjpeg)
1427 ("mit-krb5" ,mit-krb5)
1430 ("fontconfig" ,fontconfig)
1431 ("freetype" ,freetype)
1435 (home-page "http://icedtea.classpath.org")
1436 (synopsis "Java development kit")
1438 "This package provides the Java development kit OpenJDK built with the
1439 IcedTea build harness.")
1440 ;; IcedTea is released under the GPL2 + Classpath exception, which is the
1441 ;; same license as both GNU Classpath and OpenJDK.
1442 (license license:gpl2+))))
1444 (define-public icedtea-8
1445 (let* ((version "3.7.0")
1446 (drop (lambda (name hash)
1450 "http://icedtea.classpath.org/download/drops"
1451 "/icedtea8/" version "/" name ".tar.xz"))
1452 (sha256 (base32 hash))))))
1453 (package (inherit icedtea-7)
1458 "http://icedtea.wildebeest.org/download/source/icedtea-"
1462 "09yqzn8rpccs7cyv89hhy5zlznpgqw5x3jz0w1ccp0cz1vgs8l5w"))
1463 (modules '((guix build utils)))
1466 (substitute* '("configure"
1468 ;; Do not embed build time
1469 (("(DIST_ID=\"Custom build).*$" _ prefix)
1470 (string-append prefix "\"\n"))
1471 ;; Do not leak information about the build host
1472 (("DIST_NAME=\"\\$build_os\"")
1473 "DIST_NAME=\"guix\""))
1476 `(#:imported-modules
1477 ((guix build ant-build-system)
1478 (guix build syscalls)
1479 ,@%gnu-build-system-modules)
1480 ,@(substitute-keyword-arguments (package-arguments icedtea-7)
1481 ((#:modules modules)
1482 `((guix build utils)
1483 (guix build gnu-build-system)
1484 ((guix build ant-build-system) #:prefix ant:)
1489 ((#:configure-flags flags)
1490 `(let ((jdk (assoc-ref %build-inputs "jdk")))
1491 `( ;;"--disable-bootstrap"
1492 "--enable-bootstrap"
1494 "--disable-downloading"
1495 "--disable-system-pcsc"
1496 "--disable-system-sctp"
1497 "--disable-tests" ;they are run in the check phase instead
1498 "--with-openjdk-src-dir=./openjdk.src"
1499 ,(string-append "--with-jdk-home=" jdk))))
1501 `(modify-phases ,phases
1502 (delete 'fix-x11-extension-include-path)
1503 (delete 'patch-paths)
1504 (delete 'set-additional-paths)
1505 (delete 'patch-patches)
1506 ;; Prevent the keytool from recording the current time when
1507 ;; adding certificates at build time.
1508 (add-after 'unpack 'patch-keystore
1510 (substitute* "openjdk.src/jdk/src/share/classes/sun/security/provider/JavaKeyStore.java"
1511 (("date = new Date\\(\\);")
1513 date = (System.getenv(\"SOURCE_DATE_EPOCH\") != null) ?\
1514 new Date(Long.parseLong(System.getenv(\"SOURCE_DATE_EPOCH\"))) :\
1517 (add-after 'unpack 'patch-jni-libs
1518 ;; Hardcode dynamically loaded libraries.
1520 (let* ((library-path (search-path-as-string->list
1521 (getenv "LIBRARY_PATH")))
1522 (find-library (lambda (name)
1525 (string-append "lib" name ".so")))))
1528 (catch 'decoding-error
1531 (("VERSIONED_JNI_LIB_NAME\\(\"(.*)\", \"(.*)\"\\)"
1533 (format #f "\"~a\"" (find-library name)))
1534 (("JNI_LIB_NAME\\(\"(.*)\"\\)" _ name)
1535 (format #f "\"~a\"" (find-library name)))))
1537 ;; Those are safe to skip.
1538 (format (current-error-port)
1539 "warning: failed to substitute: ~a~%"
1541 (find-files "openjdk.src/jdk/src/solaris/native"
1545 (lambda* (#:key outputs #:allow-other-keys)
1546 (let ((doc (string-append (assoc-ref outputs "doc")
1547 "/share/doc/icedtea"))
1548 (jre (assoc-ref outputs "out"))
1549 (jdk (assoc-ref outputs "jdk")))
1550 (copy-recursively "openjdk.build/docs" doc)
1551 (copy-recursively "openjdk.build/images/j2re-image" jre)
1552 (copy-recursively "openjdk.build/images/j2sdk-image" jdk)
1553 ;; Install the nss.cfg file to JRE to enable SSL/TLS
1555 (copy-file (string-append jdk "/jre/lib/security/nss.cfg")
1556 (string-append jre "/lib/security/nss.cfg"))
1558 (add-after 'install 'strip-jar-timestamps
1559 (assoc-ref ant:%standard-phases 'strip-jar-timestamps)))))))
1561 `(("jdk" ,icedtea-7 "jdk")
1564 "1mj6xgmw31i6qd30qi9dmv7160fbcfq5ikz1jwjihdg2793il19p"))
1567 "1wb8k5zm40zld0986dvmlh5xh3gyixbg9h26sl662zy92amhmyyg"))
1570 "11ma4zz0599cy70xd219v7a8vin7p96xrhhz3wsaw6cjhkzpagah"))
1573 "14m1y0z0fbm5z5zjw3vnq85py8dma84bi3f9cw8rhdyc6skk8q4i"))
1576 "09andnm6xaasnp963hgx42yiflifiljp9z7z85jrfyc5z8a5whmf"))
1579 "0s6lcpc0zckz2fnq98aqf28nz9y3wbi41a3kyaqqa2abwbkm1zwl"))
1582 "15wizy123vhk40chl1b4p552jf2pw2hdww0myf11qab425axz4nw"))
1585 "1ciz1w9j0kz7s1dxdhyqq71nla9icyz6qvn0b9z2zgkklqa98qmm"))
1588 "19pzl3ppaw8j6r5cnyp8qiw3hxijh3hdc46l39g5yfhdl4pr4hpa"))
1591 "0k33anxdzw1icn072wynfmmdjhsv50hay0j1sfkfxny12rb3vgdy"))
1592 ,@(fold alist-delete (package-native-inputs icedtea-7)
1593 '("jdk" "openjdk-src" "corba-drop" "jaxp-drop" "jaxws-drop"
1594 "jdk-drop" "langtools-drop" "hotspot-drop")))))))
1596 (define-public icedtea icedtea-7)
1599 (define-public ant/java8
1600 (package (inherit ant-bootstrap)
1605 (uri (string-append "mirror://apache/ant/source/apache-ant-"
1606 version "-src.tar.gz"))
1609 "10p3dh77lkzzzcy32dk9azljixzadp46fggjfbvgkl8mmb8cxxv8"))
1610 (modules '((guix build utils)))
1613 (for-each delete-file
1614 (find-files "lib/optional" "\\.jar$"))
1617 (substitute-keyword-arguments (package-arguments ant-bootstrap)
1619 `(modify-phases ,phases
1620 (add-after 'unpack 'remove-scripts
1621 ;; Remove bat / cmd scripts for DOS as well as the antRun and runant
1624 (for-each delete-file
1625 (find-files "src/script"
1626 "(.*\\.(bat|cmd)|runant.*|antRun.*)"))
1629 (lambda* (#:key inputs outputs #:allow-other-keys)
1630 (setenv "JAVA_HOME" (assoc-ref inputs "jdk"))
1632 ;; Disable tests to avoid dependency on hamcrest-core, which needs
1633 ;; Ant to build. This is necessary in addition to disabling the
1634 ;; "check" phase, because the dependency on "test-jar" would always
1635 ;; result in the tests to be run.
1636 (substitute* "build.xml"
1637 (("depends=\"jars,test-jar\"") "depends=\"jars\""))
1638 (zero? (system* "bash" "bootstrap.sh"
1639 (string-append "-Ddist.dir="
1640 (assoc-ref outputs "out"))))))))))
1642 `(("jdk" ,icedtea-8 "jdk")))))
1644 ;; The 1.9.x series is the last that can be built with GCJ. The 1.10.x series
1647 (package (inherit ant/java8)
1651 (uri (string-append "mirror://apache/ant/source/apache-ant-"
1652 version "-src.tar.gz"))
1655 "1k28mka0m3isy9yr8gz84kz1f3f879rwaxrd44vdn9xbfwvwk86n"))))
1657 `(("jdk" ,icedtea-7 "jdk")))))
1659 (define-public ant-apache-bcel
1662 (name "ant-apache-bcel")
1664 (substitute-keyword-arguments (package-arguments ant/java8)
1666 `(modify-phases ,phases
1667 (add-after 'unpack 'link-bcel
1668 (lambda* (#:key inputs #:allow-other-keys)
1669 (for-each (lambda (file)
1671 (string-append "lib/optional/"
1673 (find-files (assoc-ref inputs "java-commons-bcel")
1676 (add-after 'build 'install
1677 (lambda* (#:key outputs #:allow-other-keys)
1678 (let* ((out (assoc-ref outputs "out"))
1679 (share (string-append out "/share/java"))
1680 (bin (string-append out "/bin"))
1681 (lib (string-append out "/lib")))
1683 (install-file (string-append lib "/ant-apache-bcel.jar") share)
1684 (delete-file-recursively bin)
1685 (delete-file-recursively lib)
1688 `(("java-commons-bcel" ,java-commons-bcel)
1689 ,@(package-inputs ant/java8)))))
1691 (define-public ant-junit
1696 (substitute-keyword-arguments (package-arguments ant/java8)
1698 `(modify-phases ,phases
1699 (add-after 'unpack 'link-junit
1700 (lambda* (#:key inputs #:allow-other-keys)
1701 (for-each (lambda (file)
1703 (string-append "lib/optional/"
1705 (find-files (assoc-ref inputs "java-junit")
1708 (add-after 'build 'install
1709 (lambda* (#:key outputs #:allow-other-keys)
1710 (let* ((out (assoc-ref outputs "out"))
1711 (share (string-append out "/share/java"))
1712 (bin (string-append out "/bin"))
1713 (lib (string-append out "/lib")))
1715 (install-file (string-append lib "/ant-junit.jar") share)
1716 (delete-file-recursively bin)
1717 (delete-file-recursively lib)
1720 `(("java-junit" ,java-junit)
1721 ,@(package-inputs ant/java8)))))
1723 (define-public clojure
1724 (let* ((remove-archives '(begin
1725 (for-each delete-file
1726 (find-files "." ".*\\.(jar|zip)"))
1728 (submodule (lambda (prefix version hash)
1731 (uri (string-append "https://github.com/clojure/"
1732 prefix version ".tar.gz"))
1733 (sha256 (base32 hash))
1734 (modules '((guix build utils)))
1735 (snippet remove-archives)))))
1743 (string-append "https://github.com/clojure/clojure/archive/clojure-"
1746 (base32 "0xjbzcw45z32vsn9pifp7ndysjzqswp5ig0jkjpivigh2ckkdzha"))
1747 (modules '((guix build utils)))
1748 (snippet remove-archives)))
1749 (build-system ant-build-system)
1751 `(#:modules ((guix build ant-build-system)
1757 #:test-target "test"
1759 (modify-phases %standard-phases
1760 (add-after 'unpack 'unpack-submodule-sources
1761 (lambda* (#:key inputs #:allow-other-keys)
1765 (with-directory-excursion name
1766 (or (zero? (system* "tar"
1767 ;; Use xz for repacked tarball.
1771 "--file" (assoc-ref inputs name)
1772 "--strip-components=1"))
1773 (error "failed to unpack tarball" name)))
1774 (copy-recursively (string-append name "/src/main/clojure/")
1776 '("core-specs-alpha-src"
1777 "data-generators-src"
1780 "test-generative-src"
1781 "tools-namespace-src"))
1783 ;; The javadoc target is not built by default.
1784 (add-after 'build 'build-doc
1786 (zero? (system* "ant" "javadoc"))))
1787 ;; Needed since no install target is provided.
1789 (lambda* (#:key outputs #:allow-other-keys)
1790 (let ((java-dir (string-append (assoc-ref outputs "out")
1792 ;; Install versioned to avoid collisions.
1793 (install-file (string-append "clojure-" ,version ".jar")
1796 ;; Needed since no install-doc target is provided.
1797 (add-after 'install 'install-doc
1798 (lambda* (#:key outputs #:allow-other-keys)
1799 (let ((doc-dir (string-append (assoc-ref outputs "out")
1800 "/share/doc/clojure-"
1802 (copy-recursively "doc/clojure" doc-dir)
1803 (copy-recursively "target/javadoc/"
1804 (string-append doc-dir "javadoc/"))
1805 (for-each (cut install-file <> doc-dir)
1806 (filter (cut string-match
1807 ".*\\.(html|markdown|md|txt)"
1811 ;; The native-inputs below are needed to run the tests.
1813 `(("core-specs-alpha-src"
1814 ,(submodule "core.specs.alpha/archive/core.specs.alpha-"
1816 "0v2a0svf1ar2y42ajxwsjr7zmm5j7pp2zwrd2jh3k7xzd1p9x1fv"))
1817 ("data-generators-src"
1818 ,(submodule "data.generators/archive/data.generators-"
1820 "0kki093jp4ckwxzfnw8ylflrfqs8b1i1wi9iapmwcsy328dmgzp1"))
1822 ,(submodule "spec.alpha/archive/spec.alpha-"
1824 "00alf0347licdn773w2jarpllyrbl52qz4d8mw61anjksacxylzz"))
1826 ,(submodule "test.check/archive/test.check-"
1828 "0p0mnyhr442bzkz0s4k5ra3i6l5lc7kp6ajaqkkyh4c2k5yck1md"))
1829 ("test-generative-src"
1830 ,(submodule "test.generative/archive/test.generative-"
1832 "1pjafy1i7yblc7ixmcpfq1lfbyf3jaljvkgrajn70sws9xs7a9f8"))
1833 ("tools-namespace-src"
1834 ,(submodule "tools.namespace/archive/tools.namespace-"
1836 "10baak8v0hnwz2hr33bavshm7y49mmn9zsyyms1dwjz45p5ymhy0"))))
1837 (home-page "https://clojure.org/")
1838 (synopsis "Lisp dialect running on the JVM")
1839 (description "Clojure is a dynamic, general-purpose programming language,
1840 combining the approachability and interactive development of a scripting
1841 language with an efficient and robust infrastructure for multithreaded
1842 programming. Clojure is a compiled language, yet remains completely dynamic
1843 – every feature supported by Clojure is supported at runtime. Clojure
1844 provides easy access to the Java frameworks, with optional type hints and type
1845 inference, to ensure that calls to Java can avoid reflection.
1847 Clojure is a dialect of Lisp, and shares with Lisp the code-as-data philosophy
1848 and a powerful macro system. Clojure is predominantly a functional programming
1849 language, and features a rich set of immutable, persistent data structures.
1850 When mutable state is needed, Clojure offers a software transactional memory
1851 system and reactive Agent system that ensure clean, correct, multithreaded
1853 ;; Clojure is licensed under EPL1.0
1854 ;; ASM bytecode manipulation library is licensed under BSD-3
1855 ;; Guava Murmur3 hash implementation is licensed under APL2.0
1856 ;; src/clj/repl.clj is licensed under CPL1.0
1858 ;; See readme.html or readme.txt for details.
1859 (license (list license:epl1.0
1864 (define-public javacc
1870 (uri (string-append "https://github.com/javacc/javacc/"
1871 "archive/" version ".tar.gz"))
1872 (file-name (string-append "javacc-" version ".tar.gz"))
1875 "111xc9mnmc5a6qz6x3xbhqc07y1lg2b996ggzw0hrblg42zya9xf"))))
1876 (build-system ant-build-system)
1878 `(#:test-target "test"
1880 (modify-phases %standard-phases
1881 (add-after 'unpack 'delete-bundled-libs
1883 (delete-file-recursively "lib") #t))
1884 (replace 'install (install-jars "target")))))
1885 (home-page "https://javacc.org/")
1886 (synopsis "Java parser generator")
1887 (description "Java Compiler Compiler (JavaCC) is the most popular parser
1888 generator for use with Java applications. A parser generator is a tool that
1889 reads a grammar specification and converts it to a Java program that can
1890 recognize matches to the grammar. In addition to the parser generator itself,
1891 JavaCC provides other standard capabilities related to parser generation such
1892 as tree building (via a tool called JJTree included with JavaCC), actions,
1894 (license license:bsd-3)))
1896 (define-public javacc-4
1897 (package (inherit javacc)
1902 (url "https://github.com/javacc/javacc.git")
1903 (commit "release_41")))
1904 (file-name (string-append "javacc-" version "-checkout"))
1907 "07ysav7j8r1c6h8qxrgqk6lwdp74ly0ad1935lragxml0qqc3ka0"))))
1909 ;; /tmp/guix-build-javacc-4.1.drv-0/source/test/javacodeLA/build.xml:60:
1914 (modify-phases %standard-phases
1915 (add-after 'unpack 'delete-bundled-libs
1917 (delete-file-recursively "lib") #t))
1918 (replace 'install (install-jars "bin/lib")))))))
1920 ;; This is the last 3.x release of ECJ
1921 (define-public java-ecj-3
1927 (uri (string-append "http://archive.eclipse.org/eclipse/"
1928 "downloads/drops/R-" version
1929 "-201301310800/ecjsrc-" version ".jar"))
1932 "01mdj14jw11g1jfnki4fi8229p0c6zzckd38zqy2w4m3cjcvsx04"))))
1933 (build-system ant-build-system)
1935 `(#:tests? #f ; none included
1936 #:jdk ,icedtea-7 ; doesn't build with JDK8+
1937 #:make-flags (list "-f" "src/build.xml")
1938 #:build-target "build"
1940 (modify-phases %standard-phases
1941 (add-after 'unpack 'fix-manifest
1943 ;; Record the main class to make ecj executable.
1944 (with-atomic-file-replacement "src/META-INF/MANIFEST.MF"
1946 (display "Manifest-Version: 1.0
1947 Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n"
1949 (replace 'install (install-jars ".")))))
1950 (home-page "https://eclipse.org")
1951 (synopsis "Eclipse Java development tools core batch compiler")
1952 (description "This package provides the Eclipse Java core batch compiler.")
1953 (license license:epl1.0)))
1955 ;; This is needed for java-cisd-args4j
1956 (define-public java-ecj-3.5
1957 (package (inherit java-ecj-3)
1960 (method url-fetch/zipbomb)
1961 (uri (string-append "http://archive.eclipse.org/eclipse/"
1962 "downloads/drops/R-" version
1963 "-200909170800/ecjsrc-" version ".zip"))
1966 "1vnl2mavisc567bip736xzsvvbjif5279wc4a7pbdik5wlir8qr7"))))
1967 (build-system ant-build-system)
1969 `(#:tests? #f ; none included
1970 #:jdk ,icedtea-7 ; doesn't build with JDK8+
1971 #:build-target "build"
1973 (modify-phases %standard-phases
1974 (add-after 'unpack 'fix-manifest
1976 ;; Record the main class to make ecj executable.
1977 (with-atomic-file-replacement "META-INF/MANIFEST.MF"
1980 (display "Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n"
1982 (replace 'install (install-jars ".")))))
1984 `(("unzip" ,unzip)))))
1986 (define-public java-cisd-base
1987 (let ((revision 38938)
1988 (base-version "14.12.0"))
1990 (name "java-cisd-base")
1991 (version (string-append base-version "-" (number->string revision)))
1995 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
1996 "base/tags/release/"
1997 (version-major+minor base-version)
1998 ".x/" base-version "/base/"))
1999 (revision revision)))
2000 (file-name (string-append "java-cisd-base-" version "-checkout"))
2003 "1i5adyf7nzclb0wydgwa1az04qliid8035vpahaandmkmigbnxiy"))
2004 (modules '((guix build utils)))
2007 ;; Delete included gradle jar
2008 (delete-file-recursively "gradle/wrapper")
2009 ;; Delete pre-built native libraries
2010 (delete-file-recursively "libs")
2012 (build-system ant-build-system)
2014 `(#:make-flags '("-file" "build/build.xml")
2015 #:test-target "jar-test"
2018 (modify-phases %standard-phases
2019 (add-after 'unpack 'unpack-build-resources
2020 (lambda* (#:key inputs #:allow-other-keys)
2021 (copy-recursively (assoc-ref inputs "build-resources")
2022 "../build_resources")
2024 (add-after 'unpack-build-resources 'fix-dependencies
2025 (lambda* (#:key inputs #:allow-other-keys)
2026 (substitute* "build/build.xml"
2027 (("\\$\\{lib\\}/testng/testng-jdk15.jar")
2028 (string-append (assoc-ref inputs "java-testng")
2029 "/share/java/java-testng.jar"))
2030 (("\\$\\{lib\\}/commons-lang/commons-lang.jar")
2031 (string-append (assoc-ref inputs "java-commons-lang")
2032 "/share/java/commons-lang-"
2033 ,(package-version java-commons-lang) ".jar"))
2034 (("\\$\\{lib\\}/commons-io/commons-io.jar")
2035 (string-append (assoc-ref inputs "java-commons-io")
2036 "/share/java/commons-io-"
2037 ,(package-version java-commons-io)
2039 ;; Remove dependency on svn
2040 (("<build-info.*") "")
2041 (("\\$\\{revision.number\\}")
2042 ,(number->string revision))
2043 (("\\$\\{version.number\\}") ,base-version))
2044 ;; Remove dependency on classycle
2045 (substitute* "../build_resources/ant/build-common.xml"
2046 (("<taskdef name=\"dependency-checker.*") "")
2047 (("classname=\"classycle.*") "")
2048 (("classpath=\"\\$\\{lib\\}/classycle.*") ""))
2050 ;; A few tests fail because of the lack of a proper /etc/groups and
2051 ;; /etc/passwd file in the build container.
2052 (add-after 'unpack 'disable-broken-tests
2054 (substitute* "sourceTest/java/ch/systemsx/cisd/base/AllTests.java"
2055 (("Unix.isOperational\\(\\)") "false"))
2057 ;; These decorators are almost useless and pull in an unpackaged
2059 (add-after 'unpack 'remove-useless-decorators
2061 (substitute* "source/java/ch/systemsx/cisd/base/unix/Unix.java"
2063 (("import ch.rinn.restrictions.Private;") ""))
2064 (substitute* "sourceTest/java/ch/systemsx/cisd/base/unix/UnixTests.java"
2066 (("import ch.rinn.restrictions.Friend;") ""))
2068 (add-before 'configure 'build-native-code
2069 (lambda* (#:key inputs #:allow-other-keys)
2070 (let ((jdk (assoc-ref inputs "jdk"))
2071 (dir ,(match (%current-system)
2074 ((or "armhf-linux" "aarch64-linux")
2076 ((or "x86_64-linux")
2078 (_ "unknown-Linux"))))
2079 (with-directory-excursion "source/c"
2080 (invoke "gcc" "-shared" "-O3" "-fPIC" "unix.c"
2081 (string-append "-I" jdk "/include")
2082 (string-append "-I" jdk "/include/linux")
2084 (invoke "gcc" "-shared" "-O3" "-fPIC"
2085 "-DMACHINE_BYTE_ORDER=1"
2093 (string-append "-I" jdk "/include")
2094 (string-append "-I" jdk "/include/linux")
2095 "-o" "libnativedata.so"))
2096 (install-file "source/c/libunix.so"
2097 (string-append "libs/native/unix/" dir))
2098 (install-file "source/c/libnativedata.so"
2099 (string-append "libs/native/nativedata/" dir))
2101 ;; In the "check" phase we only build the test executable.
2102 (add-after 'check 'run-tests
2104 (invoke "java" "-jar" "targets/dist/sis-base-test.jar")
2105 (delete-file "targets/dist/sis-base-test.jar")
2107 (replace 'install (install-jars "targets/dist")))))
2109 `(("jdk" ,icedtea-8)
2110 ("java-commons-lang" ,java-commons-lang)
2111 ("java-commons-io" ,java-commons-io)
2112 ("java-testng" ,java-testng)
2117 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2118 "base/tags/release/"
2119 (version-major+minor base-version)
2121 "/build_resources/"))
2122 (revision revision)))
2125 "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk"))))))
2126 (home-page "http://svnsis.ethz.ch")
2127 (synopsis "Utility classes for libraries from ETH Zurich")
2128 (description "This library supplies some utility classes needed for
2129 libraries from the SIS division at ETH Zurich like jHDF5.")
2130 ;; The C sources are under a non-copyleft license, which looks like a
2131 ;; variant of the BSD licenses. The whole package is under the ASL2.0.
2132 (license (list license:asl2.0
2133 (license:non-copyleft "file://source/c/COPYING"))))))
2135 (define-public java-cisd-args4j
2136 (let ((revision 39162)
2137 (base-version "9.11.2"))
2139 (name "java-cisd-args4j")
2140 (version (string-append base-version "-" (number->string revision)))
2144 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2145 "args4j/tags/release/"
2146 (version-major+minor base-version)
2147 ".x/" base-version "/args4j/"))
2148 (revision revision)))
2149 (file-name (string-append "java-cisd-args4j-" version "-checkout"))
2152 "0hhqznjaivq7ips7mkwas78z42s6djsm20rrs7g1zd59rcsakxn2"))))
2153 (build-system ant-build-system)
2155 `(#:make-flags '("-file" "build/build.xml")
2156 #:tests? #f ; there are no tests
2157 ;; There are weird build failures with JDK8, such as: "The type
2158 ;; java.io.ObjectInputStream cannot be resolved. It is indirectly
2159 ;; referenced from required .class files"
2161 #:modules ((guix build ant-build-system)
2163 (guix build java-utils)
2168 (modify-phases %standard-phases
2169 (add-after 'unpack 'unpack-build-resources
2170 (lambda* (#:key inputs #:allow-other-keys)
2171 (mkdir-p "../build_resources")
2172 (invoke "tar" "xf" (assoc-ref inputs "build-resources")
2173 "-C" "../build_resources"
2174 "--strip-components=1")
2175 (mkdir-p "../build_resources/lib")
2177 (add-after 'unpack-build-resources 'fix-dependencies
2178 (lambda* (#:key inputs #:allow-other-keys)
2179 ;; FIXME: There should be a more convenient abstraction for
2180 ;; editing XML files.
2181 (with-directory-excursion "../build_resources/ant/"
2182 (chmod "build-common.xml" #o664)
2183 (call-with-output-file "build-common.xml.new"
2187 (with-input-from-file "build-common.xml"
2188 (lambda _ (xml->sxml #:trim-whitespace? #t)))
2189 `(;; Remove dependency on classycle and custom ant tasks
2190 (taskdef . ,(lambda (tag . kids)
2191 (let ((name ((sxpath '(name *text*)) kids)))
2192 (if (or (member "build-info" name)
2193 (member "dependency-checker" name)
2194 (member "build-java-subprojects" name)
2195 (member "project-classpath" name))
2198 (typedef . ,(lambda (tag . kids)
2199 (let ((name ((sxpath '(name *text*)) kids)))
2200 (if (member "recursive-jar" name)
2203 (build-java-subprojects . ,(lambda _ '()))
2204 ;; Ignore everything else
2205 (*default* . ,(lambda (tag . kids) `(,tag ,@kids)))
2206 (*text* . ,(lambda (_ txt) txt))))
2208 (rename-file "build-common.xml.new" "build-common.xml"))
2209 (substitute* "build/build.xml"
2210 (("\\$\\{lib\\}/cisd-base/cisd-base.jar")
2211 (string-append (assoc-ref inputs "java-cisd-base")
2212 "/share/java/sis-base.jar"))
2213 ;; Remove dependency on svn
2214 (("<build-info.*") "")
2215 (("\\$\\{revision.number\\}")
2216 ,(number->string revision))
2217 (("\\$\\{version.number\\}") ,base-version)
2218 ;; Don't use custom ant tasks.
2219 (("recursive-jar") "jar")
2220 (("<project-classpath.*") ""))
2222 (replace 'install (install-jars "targets/dist")))))
2224 `(("java-cisd-base" ,java-cisd-base)))
2226 `(("ecj" ,java-ecj-3.5)
2231 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2232 "args4j/tags/release/"
2233 (version-major+minor base-version)
2235 "/build_resources/"))
2236 (revision revision)))
2239 "056cam4k8pll7ass31sy6gwn8g8719njc41yf4l02b0342nilkyf"))
2240 (modules '((guix build utils)))
2241 ;; Delete bundled pre-built jars.
2243 '(begin (delete-file-recursively "lib/") #t))))))
2244 (home-page "http://svnsis.ethz.ch")
2245 (synopsis "Command line parser library")
2246 (description "This package provides a parser for command line arguments.")
2247 (license license:asl2.0))))
2249 (define-public java-cisd-jhdf5
2250 (let ((revision 39162)
2251 (base-version "14.12.6"))
2253 (name "java-cisd-jhdf5")
2254 (version (string-append base-version "-" (number->string revision)))
2258 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2259 "jhdf5/tags/release/"
2260 (version-major+minor base-version)
2261 ".x/" base-version "/jhdf5/"))
2262 (revision revision)))
2263 (file-name (string-append "java-cisd-jhdf5-" version "-checkout"))
2266 "13i17s2hn0q9drdqvp8csy7770p3hdbh9rp30ihln2ldkfawdmz0"))
2267 (modules '((guix build utils)))
2270 ;; Delete included gradle jar
2271 (delete-file-recursively "gradle/wrapper")
2272 ;; Delete pre-built native libraries
2273 (delete-file-recursively "libs")
2275 (build-system ant-build-system)
2277 `(#:make-flags '("-file" "build/build.xml")
2278 #:build-target "jar-all"
2279 #:test-target "jar-test"
2282 (modify-phases %standard-phases
2283 ;; Don't erase results from the build phase when building tests.
2284 (add-after 'unpack 'separate-test-target-from-clean
2286 (substitute* "build/build.xml"
2287 (("\"jar-test\" depends=\"clean, ")
2288 "\"jar-test\" depends=\""))
2290 (add-after 'unpack 'unpack-build-resources
2291 (lambda* (#:key inputs #:allow-other-keys)
2292 (copy-recursively (assoc-ref inputs "build-resources")
2293 "../build_resources")
2294 (delete-file-recursively "../build_resources/lib/")
2295 (mkdir-p "../build_resources/lib")
2296 ;; Remove dependency on classycle
2297 (substitute* "../build_resources/ant/build-common.xml"
2298 (("<taskdef name=\"dependency-checker.*") "")
2299 (("classname=\"classycle.*") "")
2300 (("classpath=\"\\$\\{lib\\}/classycle.*") ""))
2301 ;; Remove dependency on svn
2302 (substitute* "build/build.xml"
2303 (("<build-info.*") "")
2304 (("\\$\\{revision.number\\}")
2305 ,(number->string revision))
2306 (("\\$\\{version.number\\}") ,base-version))
2308 (add-after 'unpack-build-resources 'fix-dependencies
2309 (lambda* (#:key inputs #:allow-other-keys)
2310 (substitute* "../build_resources/ant/build-common.xml"
2311 (("../libraries/testng/testng-jdk15.jar")
2312 (string-append (assoc-ref inputs "java-testng")
2313 "/share/java/java-testng.jar")))
2314 (substitute* "build/build.xml"
2315 (("\\$\\{lib\\}/sis-base/sis-base.jar")
2316 (string-append (assoc-ref inputs "java-cisd-base")
2317 "/share/java/sis-base.jar"))
2318 (("\\$\\{lib\\}/cisd-args4j/cisd-args4j.jar")
2319 (string-append (assoc-ref inputs "java-cisd-args4j")
2320 "/share/java/cisd-args4j.jar"))
2321 (("\\$\\{lib\\}/commons-lang/commons-lang.jar")
2322 (string-append (assoc-ref inputs "java-commons-lang")
2323 "/share/java/commons-lang-"
2324 ,(package-version java-commons-lang) ".jar"))
2325 (("\\$\\{lib\\}/commons-io/commons-io.jar")
2326 (string-append (assoc-ref inputs "java-commons-io")
2327 "/share/java/commons-io-"
2328 ,(package-version java-commons-io)
2330 (("\\$\\{lib\\}/testng/testng-jdk15.jar")
2331 (string-append (assoc-ref inputs "java-testng")
2332 "/share/java/java-testng.jar"))
2333 (("\\$\\{lib\\}/junit4/junit.jar")
2334 (string-append (assoc-ref inputs "java-junit")
2335 "/share/java/junit.jar"))
2336 (("\\$\\{lib\\}/jmock/hamcrest/hamcrest-core.jar")
2337 (string-append (assoc-ref inputs "java-hamcrest-core")
2338 "/share/java/hamcrest-core.jar")))
2339 ;; Remove dependency on ch.rinn.restrictions
2340 (with-directory-excursion "source/java/ch/systemsx/cisd/hdf5/"
2341 (substitute* '("BitSetConversionUtils.java"
2343 (("import ch.rinn.restrictions.Private;") "")
2345 (with-directory-excursion "sourceTest/java/ch/systemsx/cisd/hdf5/"
2346 (substitute* '("BitSetConversionTest.java"
2347 "h5ar/HDF5ArchiverTest.java")
2348 (("import ch.rinn.restrictions.Friend;") "")
2350 ;; Remove leftovers from removing @Friend
2351 (substitute* "h5ar/HDF5ArchiverTest.java"
2352 (("\\{ HDF5Archiver.class, IdCache.class, LinkRecord.class \\}\\)")
2355 (add-before 'configure 'build-native-library
2356 (lambda* (#:key inputs #:allow-other-keys)
2357 (let ((jdk (assoc-ref inputs "jdk"))
2358 (hdf5 (assoc-ref inputs "hdf5"))
2359 (dir ,(match (%current-system)
2362 ((or "armhf-linux" "aarch64-linux")
2364 ((or "x86_64-linux")
2366 (_ "unknown-Linux"))))
2367 (with-directory-excursion "source/c"
2368 (apply invoke `("gcc" "-shared" "-O3"
2370 "-Wl,--exclude-libs,ALL"
2371 ,@(find-files "jhdf5" "\\.c$")
2372 ,@(find-files "hdf-java" "\\.c$")
2373 ,(string-append "-I" hdf5 "/include")
2374 ,(string-append "-I" jdk "/include")
2375 ,(string-append "-I" jdk "/include/linux")
2376 ,(string-append hdf5 "/lib/libhdf5.a")
2377 "-o" "libjhdf5.so" "-lz")))
2378 (install-file "source/c/libjhdf5.so"
2379 (string-append "libs/native/jhdf5/" dir))
2381 ;; In the "check" phase we only build the test executable.
2382 (add-after 'check 'run-tests
2384 (invoke "java" "-jar" "targets/dist/sis-jhdf5-test.jar")
2385 (delete-file "targets/dist/sis-jhdf5-test.jar")
2388 (install-jars "targets/dist")))))
2390 `(("java-cisd-base" ,java-cisd-base)
2391 ("java-cisd-args4j" ,java-cisd-args4j)
2392 ("java-commons-lang" ,java-commons-lang)
2393 ("java-commons-io" ,java-commons-io)
2397 `(("jdk" ,icedtea-8)
2398 ("java-testng" ,java-testng)
2399 ("java-junit" ,java-junit)
2400 ("java-jmock" ,java-jmock)
2401 ("java-hamcrest-core" ,java-hamcrest-core)
2406 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2407 "jhdf5/tags/release/"
2408 (version-major+minor base-version)
2410 "/build_resources/"))
2411 (revision revision)))
2414 "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk"))))))
2415 (home-page "https://wiki-bsse.ethz.ch/display/JHDF5/")
2416 (synopsis "Java binding for HDF5")
2417 (description "JHDF5 is a high-level API in Java for reading and writing
2418 HDF5 files, building on the libraries provided by the HDF Group.")
2419 ;; The C sources are under a non-copyleft license, which looks like a
2420 ;; variant of the BSD licenses. The whole package is under the ASL2.0.
2421 (license (list license:asl2.0
2422 (license:non-copyleft "file://source/c/COPYING"))))))
2424 (define-public java-classpathx-servletapi
2426 (name "java-classpathx-servletapi")
2430 (uri (string-append "mirror://gnu/classpathx/servletapi/"
2431 "servletapi-" version ".tar.gz"))
2434 "07d8h051siga2f33fra72hk12sbq1bxa4jifjg0qj0vfazjjff0x"))))
2435 (build-system ant-build-system)
2437 `(#:tests? #f ; there is no test target
2438 #:build-target "compile"
2440 (list "-Dbuild.compiler=javac1.8"
2441 (string-append "-Ddist=" (assoc-ref %outputs "out")))
2443 (modify-phases %standard-phases
2445 (lambda* (#:key make-flags #:allow-other-keys)
2446 (zero? (apply system* `("ant" "dist" ,@make-flags))))))))
2447 (home-page "https://www.gnu.org/software/classpathx/")
2448 (synopsis "Java servlet API implementation")
2449 (description "This is the GNU servlet API distribution, part of the
2450 ClasspathX project. It provides implementations of version 3.0 of the servlet
2451 API and version 2.1 of the Java ServerPages API.")
2452 (license license:gpl3+)))
2454 (define-public java-swt
2459 ;; The types of many variables and procedures differ in the sources
2460 ;; dependent on whether the target architecture is a 32-bit system or a
2461 ;; 64-bit system. Instead of patching the sources on demand in a build
2462 ;; phase we download either the 32-bit archive (which mostly uses "int"
2463 ;; types) or the 64-bit archive (which mostly uses "long" types).
2464 (let ((hash32 "09q0cbh90d90q3a7dx9430kc4m6bijrkr4lajrmzzvi0jjdpq4v9")
2465 (hash64 "17k5hs75a87ssmc5xhwdfdm2gn4zba0r837l2455za01krnkaa2q")
2468 (let-values (((hash file)
2469 (match (or (%current-target-system) (%current-system))
2470 ("x86_64-linux" (values hash64 file64))
2471 (_ (values hash32 file32)))))
2475 "http://download.eclipse.org/eclipse/downloads/drops4/"
2476 "R-" version "-201710090410/swt-" version
2477 "-gtk-linux-" file ".zip"))
2478 (sha256 (base32 hash))))))
2479 (build-system ant-build-system)
2481 `(#:jar-name "swt.jar"
2483 #:tests? #f ; no "check" target
2485 (modify-phases %standard-phases
2487 (lambda* (#:key source #:allow-other-keys)
2489 (zero? (system* "unzip" source "-d" "swt"))
2492 (zero? (system* "unzip" "src.zip" "-d" "src")))))
2493 ;; The classpath contains invalid icecat jars. Since we don't need
2494 ;; anything other than the JDK on the classpath, we can simply unset
2496 (add-after 'configure 'unset-classpath
2497 (lambda _ (unsetenv "CLASSPATH") #t))
2498 (add-before 'build 'build-native
2499 (lambda* (#:key inputs outputs #:allow-other-keys)
2500 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
2501 ;; Build shared libraries. Users of SWT have to set the system
2502 ;; property swt.library.path to the "lib" directory of this
2505 (setenv "OUTPUT_DIR" lib)
2506 (with-directory-excursion "src"
2507 (zero? (system* "bash" "build.sh"))))))
2508 (add-after 'install 'install-native
2509 (lambda* (#:key outputs #:allow-other-keys)
2510 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
2511 (for-each (lambda (file)
2512 (install-file file lib))
2513 (find-files "." "\\.so$"))
2517 ("libxtst" ,libxtst)
2522 `(("pkg-config" ,pkg-config)
2524 (home-page "https://www.eclipse.org/swt/")
2525 (synopsis "Widget toolkit for Java")
2527 "SWT is a widget toolkit for Java designed to provide efficient, portable
2528 access to the user-interface facilities of the operating systems on which it
2530 ;; SWT code is licensed under EPL1.0
2531 ;; Gnome and Gtk+ bindings contain code licensed under LGPLv2.1
2532 ;; Cairo bindings contain code under MPL1.1
2533 ;; XULRunner 1.9 bindings contain code under MPL2.0
2538 license:lgpl2.1+))))
2540 (define-public java-xz
2546 (uri (string-append "http://tukaani.org/xz/xz-java-" version ".zip"))
2549 "1z3p1ri1gvl07inxn0agx44ck8n7wrzfmvkz8nbq3njn8r9wba8x"))))
2550 (build-system ant-build-system)
2552 `(#:tests? #f ; There are no tests to run.
2553 #:jar-name ,(string-append "xz-" version ".jar")
2555 (modify-phases %standard-phases
2556 ;; The unpack phase enters the "maven" directory by accident.
2557 (add-after 'unpack 'chdir
2558 (lambda _ (chdir "..") #t)))))
2560 `(("unzip" ,unzip)))
2561 (home-page "https://tukaani.org/xz/java.html")
2562 (synopsis "Implementation of XZ data compression in pure Java")
2563 (description "This library aims to be a complete implementation of XZ data
2564 compression in pure Java. Single-threaded streamed compression and
2565 decompression and random access decompression have been fully implemented.")
2566 (license license:public-domain)))
2568 ;; java-hamcrest-core uses qdox version 1.12. We package this version instead
2569 ;; of the latest release.
2570 (define-public java-qdox-1.12
2576 (uri (string-append "http://central.maven.org/maven2/"
2577 "com/thoughtworks/qdox/qdox/" version
2578 "/qdox-" version "-sources.jar"))
2581 "0hlfbqq2avf5s26wxkksqmkdyk6zp9ggqn37c468m96mjv0n9xfl"))))
2582 (build-system ant-build-system)
2584 `(;; Tests require junit
2586 #:jar-name "qdox.jar"
2588 (modify-phases %standard-phases
2590 (lambda* (#:key source #:allow-other-keys)
2592 (with-directory-excursion "src"
2593 (zero? (system* "jar" "-xf" source)))))
2594 ;; At this point we don't have junit, so we must remove the API
2596 (add-after 'unpack 'delete-tests
2598 (delete-file-recursively "src/com/thoughtworks/qdox/junit")
2600 (home-page "http://qdox.codehaus.org/")
2601 (synopsis "Parse definitions from Java source files")
2603 "QDox is a high speed, small footprint parser for extracting
2604 class/interface/method definitions from source files complete with JavaDoc
2605 @code{@@tags}. It is designed to be used by active code generators or
2606 documentation tools.")
2607 (license license:asl2.0)))
2609 (define-public java-jarjar
2611 (name "java-jarjar")
2616 "https://storage.googleapis.com/google-code-archive-downloads/v2/"
2617 "code.google.com/jarjar/jarjar-src-" version ".zip"))
2620 "1v8irhni9cndcw1l1wxqgry013s2kpj0qqn57lj2ji28xjq8ndjl"))))
2621 (build-system ant-build-system)
2623 `(;; Tests require junit, which ultimately depends on this package.
2625 #:build-target "jar"
2627 (modify-phases %standard-phases
2629 (lambda* (#:key outputs #:allow-other-keys)
2630 (let ((target (string-append (assoc-ref outputs "out")
2632 (install-file (string-append "dist/jarjar-" ,version ".jar")
2636 `(("unzip" ,unzip)))
2637 (home-page "https://code.google.com/archive/p/jarjar/")
2638 (synopsis "Repackage Java libraries")
2640 "Jar Jar Links is a utility that makes it easy to repackage Java
2641 libraries and embed them into your own distribution. Jar Jar Links includes
2642 an Ant task that extends the built-in @code{jar} task.")
2643 (license license:asl2.0)))
2645 (define-public java-hamcrest-core
2647 (name "java-hamcrest-core")
2651 (uri (string-append "https://github.com/hamcrest/JavaHamcrest/"
2652 "archive/hamcrest-java-" version ".tar.gz"))
2655 "11g0s105fmwzijbv08lx8jlb521yravjmxnpgdx08fvg1kjivhva"))
2656 (modules '((guix build utils)))
2659 ;; Delete bundled thirds-party jar archives.
2660 (delete-file-recursively "lib")
2662 (build-system ant-build-system)
2664 `(#:tests? #f ; Tests require junit
2665 #:modules ((guix build ant-build-system)
2668 #:make-flags (list (string-append "-Dversion=" ,version))
2669 #:test-target "unit-test"
2670 #:build-target "core"
2672 (modify-phases %standard-phases
2673 ;; Disable unit tests, because they require junit, which requires
2674 ;; hamcrest-core. We also give a fixed value to the "Built-Date"
2675 ;; attribute from the manifest for reproducibility.
2676 (add-before 'configure 'patch-build.xml
2678 (substitute* "build.xml"
2679 (("unit-test, ") "")
2680 (("\\$\\{build.timestamp\\}") "guix"))
2682 ;; Java's "getMethods()" returns methods in an unpredictable order.
2683 ;; To make the output of the generated code deterministic we must
2684 ;; sort the array of methods.
2685 (add-after 'unpack 'make-method-order-deterministic
2687 (substitute* "hamcrest-generator/src/main/java/org/hamcrest/generator/ReflectiveFactoryReader.java"
2688 (("import java\\.util\\.Iterator;" line)
2689 (string-append line "\n"
2690 "import java.util.Arrays; import java.util.Comparator;"))
2691 (("allMethods = cls\\.getMethods\\(\\);" line)
2692 (string-append "_" line
2694 private Method[] getSortedMethods() {
2695 Arrays.sort(_allMethods, new Comparator<Method>() {
2697 public int compare(Method a, Method b) {
2698 return a.toString().compareTo(b.toString());
2704 private Method[] allMethods = getSortedMethods();")))))
2705 (add-before 'build 'do-not-use-bundled-qdox
2706 (lambda* (#:key inputs #:allow-other-keys)
2707 (substitute* "build.xml"
2708 (("lib/generator/qdox-1.12.jar")
2709 (string-append (assoc-ref inputs "java-qdox-1.12")
2710 "/share/java/qdox.jar")))
2712 ;; build.xml searches for .jar files in this directoy, which
2713 ;; we remove from the source archive.
2714 (add-before 'build 'create-dummy-directories
2716 (mkdir-p "lib/integration")
2719 (lambda* (#:key outputs #:allow-other-keys)
2720 (let* ((target (string-append (assoc-ref outputs "out")
2722 (version-suffix ,(string-append "-" version ".jar"))
2723 (install-without-version-suffix
2726 (string-append target
2727 (basename jar version-suffix)
2731 install-without-version-suffix
2734 (and (string-suffix? ".jar" name)
2735 (not (string-suffix? "-sources.jar" name)))))))
2738 `(("java-qdox-1.12" ,java-qdox-1.12)
2739 ("java-jarjar" ,java-jarjar)))
2740 (home-page "http://hamcrest.org/")
2741 (synopsis "Library of matchers for building test expressions")
2743 "This package provides a library of matcher objects (also known as
2744 constraints or predicates) allowing @code{match} rules to be defined
2745 declaratively, to be used in other frameworks. Typical scenarios include
2746 testing frameworks, mocking libraries and UI validation rules.")
2747 (license license:bsd-2)))
2749 (define-public java-junit
2755 (uri (string-append "https://github.com/junit-team/junit/"
2756 "archive/r" version ".tar.gz"))
2757 (file-name (string-append name "-" version ".tar.gz"))
2760 "090dn5v1vs0b3acyaqc0gjf6p8lmd2h24wfzsbq7sly6b214anws"))
2761 (modules '((guix build utils)))
2764 ;; Delete bundled jar archives.
2765 (delete-file-recursively "lib")
2767 (build-system ant-build-system)
2769 `(#:tests? #f ; no tests
2770 #:jar-name "junit.jar"))
2772 `(("java-hamcrest-core" ,java-hamcrest-core)))
2773 (home-page "http://junit.org/")
2774 (synopsis "Test framework for Java")
2776 "JUnit is a simple framework to write repeatable tests for Java projects.
2777 JUnit provides assertions for testing expected results, test fixtures for
2778 sharing common test data, and test runners for running tests.")
2779 (license license:epl1.0)))
2781 (define-public java-plexus-utils
2783 (name "java-plexus-utils")
2787 (uri (string-append "https://github.com/codehaus-plexus/"
2788 "plexus-utils/archive/plexus-utils-"
2792 "1mlwpc6fms24slygv5yvi6fi9hcha2fh0v73p5znpi78bg36i2js"))))
2793 (build-system ant-build-system)
2794 ;; FIXME: The default build.xml does not include a target to install
2797 `(#:jar-name "plexus-utils.jar"
2798 #:source-dir "src/main"
2800 (modify-phases %standard-phases
2801 (add-after 'unpack 'fix-reference-to-/bin-and-/usr
2803 (substitute* "src/main/java/org/codehaus/plexus/util/\
2804 cli/shell/BourneShell.java"
2805 (("/bin/sh") (which "sh"))
2806 (("/usr/") (getcwd)))
2808 (add-after 'unpack 'fix-or-disable-broken-tests
2810 (with-directory-excursion "src/test/java/org/codehaus/plexus/util"
2811 (substitute* '("cli/CommandlineTest.java"
2812 "cli/shell/BourneShellTest.java")
2813 (("/bin/sh") (which "sh"))
2814 (("/bin/echo") (which "echo")))
2816 ;; This test depends on MavenProjectStub, but we don't have
2817 ;; a package for Maven.
2818 (delete-file "introspection/ReflectionValueExtractorTest.java")
2820 ;; FIXME: The command line tests fail, maybe because they use
2822 (delete-file "cli/CommandlineTest.java"))
2825 `(("java-junit" ,java-junit)))
2826 (home-page "http://codehaus-plexus.github.io/plexus-utils/")
2827 (synopsis "Common utilities for the Plexus framework")
2828 (description "This package provides various Java utility classes for the
2829 Plexus framework to ease working with strings, files, command lines, XML and
2831 (license license:asl2.0)))
2833 (define-public java-plexus-interpolation
2835 (name "java-plexus-interpolation")
2839 (uri (string-append "https://github.com/codehaus-plexus/"
2840 "plexus-interpolation/archive/"
2841 "plexus-interpolation-" version ".tar.gz"))
2844 "03377yzlx5q440m6sxxgv6a5qb8fl30zzcgxgc0hxk5qgl2z1jjn"))))
2845 (build-system ant-build-system)
2847 `(#:jar-name "plexus-interpolation.jar"
2848 #:source-dir "src/main"))
2850 `(("java-junit" ,java-junit)
2851 ("java-hamcrest-core" ,java-hamcrest-core)))
2852 (home-page "http://codehaus-plexus.github.io/plexus-interpolation/")
2853 (synopsis "Java components for interpolating ${} strings and the like")
2854 (description "Plexus interpolator is a modular, flexible interpolation
2855 framework for the expression language style commonly seen in Maven, Plexus,
2856 and other related projects.
2858 It has its foundation in the @code{org.codehaus.plexus.utils.interpolation}
2859 package within @code{plexus-utils}, but has been separated in order to allow
2860 these two libraries to vary independently of one another.")
2861 (license license:asl2.0)))
2863 (define-public java-plexus-classworlds
2865 (name "java-plexus-classworlds")
2869 (uri (string-append "https://github.com/codehaus-plexus/"
2870 "plexus-classworlds/archive/plexus-classworlds-"
2874 "1qm4p0rl8d82lzhsiwnviw11jnq44s0gflg78zq152xyyr2xmh8g"))))
2875 (build-system ant-build-system)
2877 `(#:jar-name "plexus-classworlds.jar"
2878 #:source-dir "src/main"
2879 #:tests? #f));; FIXME: we need to generate some resources as in pom.xml
2881 `(("java-junit" ,java-junit)))
2882 (home-page "http://codehaus-plexus.github.io/plexus-classworlds/")
2883 (synopsis "Java class loader framework")
2884 (description "Plexus classworlds replaces the native @code{ClassLoader}
2885 mechanism of Java. It is especially useful for dynamic loading of application
2887 (license license:asl2.0)))
2889 (define java-plexus-container-default-bootstrap
2891 (name "java-plexus-container-default-bootstrap")
2895 (uri (string-append "https://github.com/codehaus-plexus/plexus-containers"
2896 "/archive/plexus-containers-" version ".tar.gz"))
2899 "0xw5g30qf4a83608rw9v2hv8pfsz7d69dkdhk6r0wia4q78hh1pc"))))
2900 (build-system ant-build-system)
2902 `(#:jar-name "container-default.jar"
2903 #:source-dir "plexus-container-default/src/main/java"
2904 #:test-dir "plexus-container-default/src/test"
2906 #:tests? #f; requires plexus-archiver, which depends on this package
2908 (modify-phases %standard-phases
2909 (add-before 'build 'copy-resources
2912 "plexus-container-default/src/main/resources/"
2916 `(("worldclass" ,java-plexus-classworlds)
2917 ("xbean" ,java-geronimo-xbean-reflect)
2918 ("utils" ,java-plexus-utils)
2919 ("junit" ,java-junit)
2920 ("guava" ,java-guava)))
2921 (home-page "https://github.com/codehaus-plexus/plexus-containers")
2922 (synopsis "Inversion-of-control container")
2923 (description "Plexus-default-container is Plexus' inversion-of-control
2924 (@dfn{IoC}) container. It is composed of its public API and its default
2926 (license license:asl2.0)))
2928 (define-public java-plexus-io
2930 (name "java-plexus-io")
2934 (uri (string-append "https://github.com/codehaus-plexus/plexus-io"
2935 "/archive/plexus-io-" version ".tar.gz"))
2938 "0f2j41kihaymxkpbm55smpxjja235vad8cgz94frfy3ppcp021dw"))))
2939 (build-system ant-build-system)
2941 `(#:jar-name "plexus-io.jar"
2942 #:source-dir "src/main/java"
2943 #:test-dir "src/test"
2946 (modify-phases %standard-phases
2947 (add-before 'build 'copy-resources
2949 (mkdir-p "build/classes/META-INF/plexus")
2950 (copy-file "src/main/resources/META-INF/plexus/components.xml"
2951 "build/classes/META-INF/plexus/components.xml")
2954 `(("utils" ,java-plexus-utils)
2955 ("commons-io" ,java-commons-io)
2956 ("java-jsr305" ,java-jsr305)))
2958 `(("junit" ,java-junit)
2959 ("hamcrest" ,java-hamcrest-core)
2960 ("guava" ,java-guava)
2961 ("classworlds" ,java-plexus-classworlds)
2962 ("xbean" ,java-geronimo-xbean-reflect)
2963 ("container-default" ,java-plexus-container-default-bootstrap)))
2964 (home-page "https://github.com/codehaus-plexus/plexus-io")
2965 (synopsis "I/O plexus components")
2966 (description "Plexus IO is a set of plexus components, which are designed
2967 for use in I/O operations. This implementation using plexus components allows
2968 reusing it in maven.")
2969 (license license:asl2.0)))
2971 (define-public java-plexus-archiver
2973 (name "java-plexus-archiver")
2977 (uri (string-append "https://github.com/codehaus-plexus/plexus-archiver"
2978 "/archive/plexus-archiver-" version ".tar.gz"))
2981 "0iv1j7khra6icqh3jndng3iipfmkc7l5jq2y802cm8r575v75pyv"))))
2982 (build-system ant-build-system)
2984 `(#:jar-name "plexus-archiver.jar"
2985 #:source-dir "src/main/java"
2987 #:test-dir "src/test"
2988 #:test-exclude (list "**/Abstract*.java" "**/Base*.java")
2990 (modify-phases %standard-phases
2991 (add-before 'check 'remove-failing
2993 ;; Requires an older version of plexus container
2995 "src/test/java/org/codehaus/plexus/archiver/DuplicateFilesTest.java")))
2996 (add-before 'build 'copy-resources
2998 (mkdir-p "build/classes/META-INF/plexus")
2999 (copy-file "src/main/resources/META-INF/plexus/components.xml"
3000 "build/classes/META-INF/plexus/components.xml")
3003 `(("utils" ,java-plexus-utils)
3004 ("commons-io" ,java-commons-io)
3005 ("snappy" ,java-iq80-snappy)
3006 ("io" ,java-plexus-io)
3007 ("compress" ,java-commons-compress)
3008 ("container-default" ,java-plexus-container-default-bootstrap)
3009 ("snappy" ,java-snappy)
3010 ("java-jsr305" ,java-jsr305)))
3012 `(("junit" ,java-junit)
3013 ("classworld" ,java-plexus-classworlds)
3014 ("xbean" ,java-geronimo-xbean-reflect)
3015 ("xz" ,java-tukaani-xz)
3016 ("guava" ,java-guava)))
3017 (home-page "https://github.com/codehaus-plexus/plexus-archiver")
3018 (synopsis "Archiver component of the Plexus project")
3019 (description "Plexus-archiver contains a component to deal with project
3021 (license license:asl2.0)))
3023 (define-public java-plexus-container-default
3025 (inherit java-plexus-container-default-bootstrap)
3026 (name "java-plexus-container-default")
3028 `(#:jar-name "container-default.jar"
3029 #:source-dir "plexus-container-default/src/main/java"
3030 #:test-dir "plexus-container-default/src/test"
3031 #:test-exclude (list ;"**/*Test.java"
3033 ;; Requires plexus-hierarchy
3034 "**/PlexusHierarchyTest.java"
3036 "**/ComponentRealmCompositionTest.java"
3037 "**/PlexusContainerTest.java")
3040 (modify-phases %standard-phases
3041 (add-before 'build 'copy-resources
3044 "plexus-container-default/src/main/resources/"
3047 (add-before 'check 'fix-paths
3049 (let ((dir "plexus-container-default/src/test/java/org/codehaus"))
3052 dir "/plexus/component/composition/"
3053 "ComponentRealmCompositionTest.java")
3054 (("src/test") "plexus-container-default/src/test"))
3057 `(("worldclass" ,java-plexus-classworlds)
3058 ("xbean" ,java-geronimo-xbean-reflect)
3059 ("utils" ,java-plexus-utils)
3060 ("junit" ,java-junit)
3061 ("guava" ,java-guava)))
3063 `(("archiver" ,java-plexus-archiver)
3064 ("hamcrest" ,java-hamcrest-core)))))
3066 (define-public java-plexus-component-annotations
3068 (inherit java-plexus-container-default)
3069 (name "java-plexus-component-annotations")
3071 `(#:jar-name "plexus-component-annotations.jar"
3072 #:source-dir "plexus-component-annotations/src/main/java"
3073 #:tests? #f)); no tests
3076 (synopsis "Plexus descriptors generator")
3077 (description "This package is a Maven plugin to generate Plexus descriptors
3078 from source tags and class annotations.")))
3080 (define-public java-plexus-cipher
3082 (name "java-plexus-cipher")
3086 (uri (string-append "https://github.com/codehaus-plexus/plexus-cipher"
3087 "/archive/plexus-cipher-" version ".tar.gz"))
3090 "1j3r8xzlxlk340snkjp6lk2ilkxlkn8qavsfiq01f43xmvv8ymk3"))))
3091 (build-system ant-build-system)
3093 `(#:jar-name "plexus-cipher.jar"
3094 #:source-dir "src/main/java"
3096 #:tests? #f; FIXME: requires sisu-inject-bean
3098 (modify-phases %standard-phases
3099 (add-before 'build 'copy-resources
3101 (copy-recursively "src/main/resources" "build/classes")
3102 (mkdir-p "build/classes/META-INF/sisu")
3103 (with-output-to-file "build/classes/META-INF/sisu/javax.inject.Named"
3105 (display "org.sonatype.plexus.components.cipher.DefaultPlexusCipher\n")))
3108 `(("java-cdi-api" ,java-cdi-api)
3109 ("java-javax-inject" ,java-javax-inject)))
3110 (home-page "https://github.com/sonatype/plexus-cipher")
3111 (synopsis "Encryption/decryption Component")
3112 (description "Plexus-cipher contains a component to deal with encryption
3114 (license license:asl2.0)))
3116 (define-public java-plexus-compiler-api
3118 (name "java-plexus-compiler-api")
3122 (uri (string-append "https://github.com/codehaus-plexus/plexus-compiler"
3123 "/archive/plexus-compiler-" version ".tar.gz"))
3126 "0g3x26pymcdnfnwv2a1i57pd5s26f5zqfi1rdy98z1bn01klx25k"))))
3127 (build-system ant-build-system)
3129 `(#:jar-name "plexus-compiler-api.jar"
3130 #:source-dir "plexus-compiler-api/src/main/java"
3132 #:test-dir "plexus-compiler-api/src/test"))
3134 `(("java-plexus-container-default" ,java-plexus-container-default)
3135 ("java-plexus-util" ,java-plexus-utils)))
3137 `(("java-junit" ,java-junit)))
3138 (home-page "https://github.com/codehaus-plexus/plexus-compiler")
3139 (synopsis "Plexus Compilers component's API to manipulate compilers")
3140 (description "This package contains the API used by components to manipulate
3142 (license (list license:asl2.0
3145 (define-public java-plexus-compiler-javac
3147 (inherit java-plexus-compiler-api)
3148 (name "java-plexus-compiler-javac")
3150 `(#:jar-name "plexus-compiler-javac.jar"
3151 #:source-dir "plexus-compilers/plexus-compiler-javac/src/main/java"
3153 #:tests? #f; depends on compiler-test -> maven-core -> ... -> this package.
3154 #:test-dir "plexus-compilers/plexus-compiler-javac/src/test"))
3156 `(("java-plexus-compiler-api" ,java-plexus-compiler-api)
3157 ("java-plexus-utils" ,java-plexus-utils)
3158 ("java-plexus-container-default" ,java-plexus-container-default)))
3160 `(("java-junit" ,java-junit)))
3161 (synopsis "Javac Compiler support for Plexus Compiler component")
3162 (description "This package contains the Javac Compiler support for Plexus
3163 Compiler component.")))
3165 (define-public java-plexus-sec-dispatcher
3167 (name "java-plexus-sec-dispatcher")
3168 (version "1.4") ;; Newest release listed at the Maven Central Repository.
3170 ;; This project doesn't tag releases or publish tarballs, so we take
3171 ;; the "prepare release plexus-sec-dispatcher-1.4" git commit.
3173 (uri (string-append "https://github.com/sonatype/plexus-sec-dispatcher/"
3174 "archive/7db8f88048.tar.gz"))
3177 "1smfrk4n7xbrsxpxcp2j4i0j8q86j73w0w6xg7qz83dp6dagdjgp"))
3178 (file-name (string-append name "-" version ".tar.gz"))))
3180 `(#:jar-name "plexus-sec-dispatcher.jar"
3181 #:source-dir "src/main/java"
3184 (modify-phases %standard-phases
3185 (add-before 'build 'generate-models
3186 (lambda* (#:key inputs #:allow-other-keys)
3187 (define (modello-single-mode file version mode)
3188 (zero? (system* "java"
3189 "org.codehaus.modello.ModelloCli"
3190 file mode "src/main/java" version
3192 (let ((file "src/main/mdo/settings-security.mdo"))
3194 (modello-single-mode file "1.0.0" "java")
3195 (modello-single-mode file "1.0.0" "xpp3-reader")
3196 (modello-single-mode file "1.0.0" "xpp3-writer")))))
3197 (add-before 'build 'generate-components.xml
3199 (mkdir-p "build/classes/META-INF/plexus")
3200 (with-output-to-file "build/classes/META-INF/plexus/components.xml"
3206 <role>org.sonatype.plexus.components.sec.dispatcher.SecDispatcher</role>\n
3207 <role-hint>default</role-hint>\n
3208 <implementation>org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher</implementation>\n
3209 <description></description>\n
3212 <role>org.sonatype.plexus.components.cipher.PlexusCipher</role>\n
3213 <field-name>_cipher</field-name>\n
3216 <role>org.sonatype.plexus.components.sec.dispatcher.PasswordDecryptor</role>\n
3217 <field-name>_decryptors</field-name>\n
3221 <_configuration-file>~/.settings-security.xml</_configuration-file>\n
3225 </component-set>\n")))))
3226 (add-before 'check 'fix-paths
3228 (copy-recursively "src/test/resources" "target"))))))
3230 `(("java-plexus-cipher" ,java-plexus-cipher)))
3232 `(("java-modello-core" ,java-modello-core)
3234 ("java-plexus-container-default" ,java-plexus-container-default)
3235 ("java-plexus-classworlds" ,java-plexus-classworlds)
3236 ("java-plexus-utils" ,java-plexus-utils)
3237 ("java-guava" ,java-guava)
3238 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
3239 ("java-sisu-build-api" ,java-sisu-build-api)
3241 ("java-modellop-plugins-java" ,java-modello-plugins-java)
3242 ("java-modellop-plugins-xml" ,java-modello-plugins-xml)
3243 ("java-modellop-plugins-xpp3" ,java-modello-plugins-xpp3)
3245 ("java-junit" ,java-junit)))
3246 (build-system ant-build-system)
3247 (home-page "https://github.com/sonatype/plexus-sec-dispatcher")
3248 (synopsis "Plexus Security Dispatcher Component")
3249 (description "This package is the Plexus Security Dispatcher Component.
3250 This component decrypts a string passed to it.")
3251 (license license:asl2.0)))
3253 (define-public java-sisu-build-api
3255 (name "java-sisu-build-api")
3259 (uri (string-append "https://github.com/sonatype/sisu-build-api/"
3260 "archive/plexus-build-api-" version ".tar.gz"))
3263 "1c3rrpma3x634xp2rm2p5iskfhzdyc7qfbhjzr70agrl1jwghgy2"))))
3264 (build-system ant-build-system)
3266 `(#:jar-name "sisu-build-api.jar"
3267 #:source-dir "src/main/java"
3269 #:tests? #f; FIXME: how to run the tests?
3271 (modify-phases %standard-phases
3272 (add-before 'build 'copy-resources
3274 (copy-recursively "src/main/resources" "build/classes")
3275 (substitute* (find-files "build/classes")
3276 (("\\$\\{project.version\\}") ,version))
3278 (add-before 'build 'generate-plexus-compontent
3280 (mkdir-p "build/classes/META-INF/plexus")
3281 ;; This file is required for plexus to inject this package.
3282 ;; FIXME: how is it generated?
3283 (with-output-to-file "build/classes/META-INF/plexus/components.xml"
3289 <role>org.sonatype.plexus.build.incremental.BuildContext</role>\n
3290 <role-hint>default</role-hint>\n
3291 <implementation>org.sonatype.plexus.build.incremental.DefaultBuildContext</implementation>\n
3292 <description>Filesystem based non-incremental build context implementation\n
3293 which behaves as if all files were just created.</description>\n
3296 </component-set>\n")))
3299 `(("java-plexus-utils" ,java-plexus-utils)
3300 ("java-plexus-container-default" ,java-plexus-container-default)))
3301 (home-page "https://github.com/sonatype/sisu-build-api/")
3302 (synopsis "Base build API for maven")
3303 (description "This package contains the base build API for maven and
3304 a default implementation of it. This API is about scanning files in a
3305 project and determining what files need to be rebuilt.")
3306 (license license:asl2.0)))
3308 (define-public java-modello-core
3310 (name "java-modello-core")
3314 (uri (string-append "https://github.com/codehaus-plexus/modello"
3315 "/archive/modello-" version ".tar.gz"))
3318 "0l2pvns8pmlrmjm3iknp7gpg3654y1m8qhy55b19sdwdchdcyxfh"))))
3319 (build-system ant-build-system)
3321 `(#:jar-name "modello-core.jar"
3322 #:source-dir "modello-core/src/main/java"
3323 #:test-dir "modello-core/src/test"
3324 #:main-class "org.codehaus.modello.ModelloCli"
3327 (modify-phases %standard-phases
3328 (add-before 'build 'copy-resources
3330 (mkdir-p "build/classes/META-INF/plexus")
3331 (copy-file "modello-core/src/main/resources/META-INF/plexus/components.xml"
3332 "build/classes/META-INF/plexus/components.xml")
3334 (add-before 'check 'fix-tests
3336 (with-directory-excursion "modello-core/src/test/java/org/codehaus"
3337 (substitute* '("modello/core/DefaultModelloCoreTest.java"
3338 "modello/core/io/ModelReaderTest.java")
3339 (("src/test") "modello-core/src/test")))
3342 `(("java-plexus-utils" ,java-plexus-utils)
3343 ("java-plexus-container-default" ,java-plexus-container-default)
3344 ("java-sisu-build-api" ,java-sisu-build-api)))
3346 `(("java-junit" ,java-junit)
3347 ("java-plexus-classworlds" ,java-plexus-classworlds)
3348 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
3349 ("java-guava" ,java-guava)))
3350 (home-page "http://codehaus-plexus.github.io/modello/")
3351 (synopsis "Framework for code generation from a simple model")
3352 (description "Modello is a framework for code generation from a simple model.
3354 Modello generates code from a simple model format: based on a plugin
3355 architecture, various types of code and descriptors can be generated from the
3356 single model, including Java POJOs, XML/JSON/YAML marshallers/unmarshallers,
3357 XSD and documentation.")
3360 ;; Although this package uses only files licensed under expat,
3361 ;; other parts of the source are licensed under different
3362 ;; licenses. We include them to be inherited by other packages.
3364 ;; Some files in modello-plugin-java are licensed under a
3365 ;; 5-clause BSD license.
3366 (license:non-copyleft
3367 (string-append "file:///modello-plugins/modello-plugin-java/"
3368 "src/main/java/org/codehaus/modello/plugin/"
3369 "java/javasource/JNaming.java"))))))
3371 (define-public java-modello-plugins-java
3373 (inherit java-modello-core)
3374 (name "java-modello-plugins-java")
3376 `(#:jar-name "modello-plugins-java.jar"
3377 #:source-dir "modello-plugins/modello-plugin-java/src/main/java"
3378 #:test-dir "modello-plugins/modello-plugin-java/src/test"
3380 #:tests? #f; requires maven-model, which depends on this package
3382 (modify-phases %standard-phases
3383 (add-before 'build 'copy-resources
3385 (mkdir-p "build/classes")
3386 (copy-recursively "modello-plugins/modello-plugin-java/src/main/resources"
3390 `(("java-modello-core" ,java-modello-core)
3391 ,@(package-inputs java-modello-core)))
3392 (synopsis "Modello Java Plugin")
3393 (description "Modello Java Plugin generates Java objects for the model.")))
3395 (define-public java-modello-plugins-xml
3397 (inherit java-modello-core)
3398 (name "java-modello-plugins-xml")
3400 `(#:jar-name "modello-plugins-xml.jar"
3401 #:source-dir "modello-plugins/modello-plugin-xml/src/main/java"
3402 #:test-dir "modello-plugins/modello-plugin-xml/src/test"
3405 (modify-phases %standard-phases
3406 (add-before 'build 'copy-resources
3408 (mkdir-p "build/classes")
3410 "modello-plugins/modello-plugin-xml/src/main/resources"
3413 (add-before 'check 'fix-paths
3415 (with-directory-excursion "modello-plugins/modello-plugin-xml/src/test"
3417 "java/org/codehaus/modello/plugins/xml/XmlModelloPluginTest.java"
3418 (("src/test") "modello-plugins/modello-plugin-xml/src/test"))))))))
3420 `(("java-modello-core" ,java-modello-core)
3421 ("java-modello-plugins-java" ,java-modello-plugins-java)
3422 ,@(package-inputs java-modello-core)))
3423 (synopsis "Modello XML Plugin")
3424 (description "Modello XML Plugin contains shared code for every plugins
3425 working on XML representation of the model.")))
3427 (define-public java-modello-test
3429 (inherit java-modello-core)
3430 (name "java-modello-test")
3432 `(#:jar-name "modello-test.jar"
3433 #:source-dir "modello-test/src/main/java"
3434 #:tests? #f; no tests
3437 `(("java-plexus-utils" ,java-plexus-utils)
3438 ("java-plexus-compiler-api" ,java-plexus-compiler-api)
3439 ("java-plexus-compiler-javac" ,java-plexus-compiler-javac)
3440 ("java-plexus-container-default" ,java-plexus-container-default)))
3441 (synopsis "Modello test package")
3442 (description "The modello test package contains the basis to create
3443 Modello generator unit-tests, including sample models and xml files to test
3444 every feature for every plugin.")))
3446 (define-public java-modello-plugins-xpp3
3448 (inherit java-modello-core)
3449 (name "java-modello-plugins-xpp3")
3451 `(#:jar-name "modello-plugins-xpp3.jar"
3452 #:source-dir "modello-plugins/modello-plugin-xpp3/src/main/java"
3453 #:test-dir "modello-plugins/modello-plugin-xpp3/src/test"
3454 ;; One of the test dependencies is maven-model which depends on this package.
3458 (modify-phases %standard-phases
3459 (add-before 'build 'copy-resources
3461 (mkdir-p "build/classes")
3462 (copy-recursively "modello-plugins/modello-plugin-xpp3/src/main/resources"
3466 `(("java-modello-core" ,java-modello-core)
3467 ("java-modello-plugins-java" ,java-modello-plugins-java)
3468 ("java-modello-plugins-xml" ,java-modello-plugins-xml)
3469 ,@(package-inputs java-modello-core)))
3471 `(("java-xmlunit" ,java-xmlunit)
3472 ("java-modello-test" ,java-modello-test)
3473 ,@(package-native-inputs java-modello-core)))
3474 (synopsis "Modello XPP3 Plugin")
3475 (description "The modello XPP3 plugin generates XML readers and writers based
3476 on the XPP3 API (XML Pull Parser).")))
3478 (define-public java-asm
3484 (uri (string-append "http://download.forge.ow2.org/asm/"
3485 "asm-" version ".tar.gz"))
3488 "115l5pqblirdkmzi32dxx7gbcm4jy0s14y5wircr6h8jdr9aix00"))))
3489 (build-system ant-build-system)
3491 `(("java-aqute-bndlib" ,java-aqute-bndlib)))
3493 `(#:build-target "compile"
3494 ;; The tests require an old version of Janino, which no longer compiles
3499 ;; We don't need these extra ant tasks, but the build system asks us to
3500 ;; provide a path anyway.
3501 "-Dobjectweb.ant.tasks.path=dummy-path"
3502 ;; The java-aqute.bndlib JAR file will be put onto the classpath and
3503 ;; used during the build automatically by ant-build-system, but
3504 ;; java-asm's build.xml fails unless we provide something here.
3505 "-Dbiz.aQute.bnd.path=dummy-path")
3507 (modify-phases %standard-phases
3508 (add-before 'install 'build-jars
3509 (lambda* (#:key make-flags #:allow-other-keys)
3510 ;; We cannot use the "jar" target because it depends on a couple
3511 ;; of unpackaged, complicated tools.
3513 (zero? (system* "jar"
3514 "-cf" (string-append "dist/asm-" ,version ".jar")
3515 "-C" "output/build/tmp" "."))))
3517 (install-jars "dist")))))
3519 `(("java-junit" ,java-junit)))
3520 (home-page "http://asm.ow2.org/")
3521 (synopsis "Very small and fast Java bytecode manipulation framework")
3522 (description "ASM is an all purpose Java bytecode manipulation and
3523 analysis framework. It can be used to modify existing classes or dynamically
3524 generate classes, directly in binary form. The provided common
3525 transformations and analysis algorithms allow to easily assemble custom
3526 complex transformations and code analysis tools.")
3527 (license license:bsd-3)))
3529 (define-public java-cglib
3536 "https://github.com/cglib/cglib/archive/RELEASE_"
3537 (string-map (lambda (c) (if (char=? c #\.) #\_ c)) version)
3539 (file-name (string-append "cglib-" version ".tar.gz"))
3542 "162dvd4fln76ai8prfharf66pn6r56p3sxx683j5vdyccrd5hi1q"))))
3543 (build-system ant-build-system)
3545 `(;; FIXME: tests fail because junit runs
3546 ;; "net.sf.cglib.transform.AbstractTransformTest", which does not seem
3547 ;; to describe a test at all.
3549 #:jar-name "cglib.jar"
3551 (modify-phases %standard-phases
3552 (add-after 'unpack 'chdir
3553 (lambda _ (chdir "cglib") #t)))))
3555 `(("java-asm" ,java-asm)
3556 ("java-junit" ,java-junit)))
3557 (home-page "https://github.com/cglib/cglib/")
3558 (synopsis "Java byte code generation library")
3559 (description "The byte code generation library CGLIB is a high level API
3560 to generate and transform Java byte code.")
3561 (license license:asl2.0)))
3563 (define-public java-objenesis
3565 (name "java-objenesis")
3569 (uri (string-append "https://github.com/easymock/objenesis/"
3570 "archive/" version ".tar.gz"))
3571 (file-name (string-append "objenesis-" version ".tar.gz"))
3574 "1va5qz1i2wawwavhnxfzxnfgrcaflz9p1pg03irrjh4nd3rz8wh6"))))
3575 (build-system ant-build-system)
3577 `(#:jar-name "objenesis.jar"
3578 #:source-dir "main/src/"
3579 #:test-dir "main/src/test/"))
3581 `(("java-junit" ,java-junit)
3582 ("java-hamcrest-core" ,java-hamcrest-core)))
3583 (home-page "http://objenesis.org/")
3584 (synopsis "Bypass the constructor when creating an object")
3585 (description "Objenesis is a small Java library that serves one purpose:
3586 to instantiate a new object of a particular class. It is common to see
3587 restrictions in libraries stating that classes must require a default
3588 constructor. Objenesis aims to overcome these restrictions by bypassing the
3589 constructor on object instantiation.")
3590 (license license:asl2.0)))
3592 (define-public java-easymock
3594 (name "java-easymock")
3598 (uri (string-append "https://github.com/easymock/easymock/"
3599 "archive/easymock-" version ".tar.gz"))
3602 "1yzg0kv256ndr57gpav46cyv4a1ns5sj722l50zpxk3j6sk9hnmi"))))
3603 (build-system ant-build-system)
3605 `(#:jar-name "easymock.jar"
3606 #:source-dir "core/src/main"
3607 #:test-dir "core/src/test"
3609 (modify-phases %standard-phases
3610 ;; FIXME: Android support requires the following packages to be
3611 ;; available: com.google.dexmaker.stock.ProxyBuilder
3612 (add-after 'unpack 'delete-android-support
3614 (with-directory-excursion "core/src/main/java/org/easymock/internal"
3615 (substitute* "MocksControl.java"
3616 (("AndroidSupport.isAndroid\\(\\)") "false")
3617 (("return classProxyFactory = new AndroidClassProxyFactory\\(\\);") ""))
3618 (delete-file "AndroidClassProxyFactory.java"))
3620 (add-after 'unpack 'delete-broken-tests
3622 (with-directory-excursion "core/src/test/java/org/easymock"
3623 ;; This test depends on dexmaker.
3624 (delete-file "tests2/ClassExtensionHelperTest.java")
3626 ;; This is not a test.
3627 (delete-file "tests/BaseEasyMockRunnerTest.java")
3629 ;; This test should be executed with a different runner...
3630 (delete-file "tests2/EasyMockAnnotationsTest.java")
3631 ;; ...but deleting it means that we also have to delete these
3633 (delete-file "tests2/EasyMockRunnerTest.java")
3634 (delete-file "tests2/EasyMockRuleTest.java")
3636 ;; This test fails because the file "easymock.properties" does
3638 (delete-file "tests2/EasyMockPropertiesTest.java"))
3641 `(("java-asm" ,java-asm)
3642 ("java-cglib" ,java-cglib)
3643 ("java-objenesis" ,java-objenesis)))
3645 `(("java-junit" ,java-junit)
3646 ("java-hamcrest-core" ,java-hamcrest-core)))
3647 (home-page "http://easymock.org")
3648 (synopsis "Java library providing mock objects for unit tests")
3649 (description "EasyMock is a Java library that provides an easy way to use
3650 mock objects in unit testing.")
3651 (license license:asl2.0)))
3653 (define-public java-jmock-1
3659 (uri (string-append "https://github.com/jmock-developers/"
3660 "jmock-library/archive/" version ".tar.gz"))
3661 (file-name (string-append "jmock-" version ".tar.gz"))
3664 "0xmrlhq0fszldkbv281k9463mv496143vvmqwpxp62yzjvdkx9w0"))))
3665 (build-system ant-build-system)
3667 `(#:build-target "jars"
3668 #:test-target "run.tests"
3670 (modify-phases %standard-phases
3671 (replace 'install (install-jars "build")))))
3672 (home-page "http://www.jmock.org")
3673 (synopsis "Mock object library for test-driven development")
3674 (description "JMock is a library that supports test-driven development of
3675 Java code with mock objects. Mock objects help you design and test the
3676 interactions between the objects in your programs.
3681 @item makes it quick and easy to define mock objects
3682 @item lets you precisely specify the interactions between
3683 your objects, reducing the brittleness of your tests
3684 @item plugs into your favourite test framework
3685 @item is easy to extend.
3687 (license license:bsd-3)))
3689 (define-public java-jmock
3691 (inherit java-jmock-1)
3696 (uri (string-append "https://github.com/jmock-developers/"
3697 "jmock-library/archive/" version ".tar.gz"))
3698 (file-name (string-append name "-" version ".tar.gz"))
3701 "18650a9g8xffcsdb6w91pbswa7f40fp2sh6s3nclkclz5dbzq8f0"))))
3703 `(("java-hamcrest-all" ,java-hamcrest-all)
3704 ("java-asm" ,java-asm)
3705 ("java-bsh" ,java-bsh)
3706 ("java-junit" ,java-junit)))
3708 `(("cglib" ,java-cglib)))
3710 `(#:jar-name "java-jmock.jar"
3711 #:source-dir "jmock/src/main/java"
3712 #:test-dir "jmock/src/test"))))
3714 (define-public java-jmock-junit4
3716 (inherit java-jmock)
3717 (name "java-jmock-junit4")
3719 `(#:jar-name "java-jmock-junit4.jar"
3720 #:source-dir "jmock-junit4/src/main/java"
3721 #:test-dir "jmock-junit4/src/test"))
3723 `(("java-hamcrest-all" ,java-hamcrest-all)
3724 ("java-asm" ,java-asm)
3725 ("java-bsh" ,java-bsh)
3726 ("java-jmock" ,java-jmock)
3727 ("java-jumit" ,java-junit)))))
3729 (define-public java-jmock-legacy
3731 (inherit java-jmock)
3732 (name "java-jmock-legacy")
3734 `(#:jar-name "java-jmock-legacy.jar"
3735 #:source-dir "jmock-legacy/src/main/java"
3736 #:test-dir "jmock-legacy/src/test"
3738 (modify-phases %standard-phases
3739 (add-before 'check 'copy-tests
3741 ;; This file is a dependancy of some tests
3742 (let ((file "org/jmock/test/acceptance/PackageProtectedType.java"))
3743 (copy-file (string-append "jmock/src/test/java/" file)
3744 (string-append "jmock-legacy/src/test/java/" file))
3747 `(("java-hamcrest-all" ,java-hamcrest-all)
3748 ("java-objenesis" ,java-objenesis)
3749 ("java-cglib" ,java-cglib)
3750 ("java-jmock" ,java-jmock)
3751 ("java-asm" ,java-asm)
3752 ("java-bsh" ,java-bsh)
3753 ("java-junit" ,java-junit)))
3755 `(("java-jmock-junit4" ,java-jmock-junit4)))))
3757 (define-public java-hamcrest-all
3758 (package (inherit java-hamcrest-core)
3759 (name "java-hamcrest-all")
3762 ,@(substitute-keyword-arguments (package-arguments java-hamcrest-core)
3763 ((#:build-target _) "bigjar")
3765 `(modify-phases ,phases
3766 ;; Some build targets override the classpath, so we need to patch
3767 ;; the build.xml to ensure that required dependencies are on the
3769 (add-after 'unpack 'patch-classpath-for-integration
3770 (lambda* (#:key inputs #:allow-other-keys)
3771 (substitute* "build.xml"
3772 ((" build/hamcrest-library-\\$\\{version\\}.jar" line)
3776 (find-files (assoc-ref inputs "java-junit") "\\.jar$")
3777 (find-files (assoc-ref inputs "java-jmock") "\\.jar$")
3778 (find-files (assoc-ref inputs "java-easymock") "\\.jar$")))
3782 `(("java-junit" ,java-junit)
3783 ("java-jmock" ,java-jmock-1)
3784 ("java-easymock" ,java-easymock)
3785 ,@(package-inputs java-hamcrest-core)))))
3787 (define-public java-jopt-simple
3789 (name "java-jopt-simple")
3793 (uri (string-append "http://repo1.maven.org/maven2/"
3794 "net/sf/jopt-simple/jopt-simple/"
3795 version "/jopt-simple-"
3796 version "-sources.jar"))
3799 "1v8bzmwmw6qq20gm42xyay6vrd567dra4vqwhgjnqqjz1gs9f8qa"))))
3800 (build-system ant-build-system)
3802 `(#:tests? #f ; there are no tests
3803 #:jar-name "jopt-simple.jar"))
3804 (home-page "https://pholser.github.io/jopt-simple/")
3805 (synopsis "Java library for parsing command line options")
3806 (description "JOpt Simple is a Java library for parsing command line
3807 options, such as those you might pass to an invocation of @code{javac}. In
3808 the interest of striving for simplicity, as closely as possible JOpt Simple
3809 attempts to honor the command line option syntaxes of POSIX @code{getopt} and
3810 GNU @code{getopt_long}. It also aims to make option parser configuration and
3811 retrieval of options and their arguments simple and expressive, without being
3813 (license license:expat)))
3815 (define-public java-commons-math3
3817 (name "java-commons-math3")
3821 (uri (string-append "mirror://apache/commons/math/source/"
3822 "commons-math3-" version "-src.tar.gz"))
3825 "19l6yp44qc5g7wg816nbn5z3zq3xxzwimvbm4a8pczgvpi4i85s6"))))
3826 (build-system ant-build-system)
3828 `(#:build-target "jar"
3829 #:test-target "test"
3831 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
3832 (junit (assoc-ref %build-inputs "java-junit")))
3833 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
3834 (string-append "-Dhamcrest.jar=" hamcrest
3835 "/share/java/hamcrest-core.jar")))
3837 (modify-phases %standard-phases
3838 ;; We want to build the jar in the build phase and run the tests
3839 ;; later in a separate phase.
3840 (add-after 'unpack 'untangle-targets
3842 (substitute* "build.xml"
3843 (("name=\"jar\" depends=\"test\"")
3844 "name=\"jar\" depends=\"compile\""))
3846 ;; There is no install target.
3848 (install-jars "target")))))
3850 `(("java-junit" ,java-junit)
3851 ("java-hamcrest-core" ,java-hamcrest-core)))
3852 (home-page "http://commons.apache.org/math/")
3853 (synopsis "Apache Commons mathematics library")
3854 (description "Commons Math is a library of lightweight, self-contained
3855 mathematics and statistics components addressing the most common problems not
3856 available in the Java programming language or Commons Lang.")
3857 (license license:asl2.0)))
3859 (define-public java-jmh
3866 (url "http://hg.openjdk.java.net/code-tools/jmh/")
3867 (changeset version)))
3868 (file-name (string-append name "-" version "-checkout"))
3871 "1fxyxhg9famwcg1prc4cgwb5wzyxqavn3cjm5vz8605xz7x5k084"))))
3872 (build-system ant-build-system)
3874 `(#:jar-name "jmh-core.jar"
3875 #:source-dir "jmh-core/src/main"
3876 #:test-dir "jmh-core/src/test"
3878 (modify-phases %standard-phases
3879 ;; This seems to be a bug in the JDK. It may not be necessary in
3880 ;; future versions of the JDK.
3881 (add-after 'unpack 'fix-bug
3883 (with-directory-excursion
3884 "jmh-core/src/main/java/org/openjdk/jmh/runner/options"
3885 (substitute* '("IntegerValueConverter.java"
3886 "ThreadsValueConverter.java")
3887 (("public Class<Integer> valueType")
3888 "public Class<? extends Integer> valueType")))
3891 `(("java-jopt-simple" ,java-jopt-simple)
3892 ("java-commons-math3" ,java-commons-math3)))
3894 `(("java-junit" ,java-junit)
3895 ("java-hamcrest-core" ,java-hamcrest-core)))
3896 (home-page "http://openjdk.java.net/projects/code-tools/jmh/")
3897 (synopsis "Benchmark harness for the JVM")
3898 (description "JMH is a Java harness for building, running, and analysing
3899 nano/micro/milli/macro benchmarks written in Java and other languages
3900 targeting the JVM.")
3902 (license license:gpl2)))
3904 (define-public java-commons-collections4
3906 (name "java-commons-collections4")
3910 (uri (string-append "mirror://apache/commons/collections/source/"
3911 "commons-collections4-" version "-src.tar.gz"))
3914 "1krfhvggympq4avk7gh6qafzf6b9ip6r1m4lmacikyx04039m0wl"))))
3915 (build-system ant-build-system)
3917 `(#:test-target "test"
3919 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
3920 (junit (assoc-ref %build-inputs "java-junit"))
3921 (easymock (assoc-ref %build-inputs "java-easymock")))
3922 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
3923 (string-append "-Dhamcrest.jar=" hamcrest
3924 "/share/java/hamcrest-core.jar")
3925 (string-append "-Deasymock.jar=" easymock
3926 "/share/java/easymock.jar")))
3928 (modify-phases %standard-phases
3930 (install-jars "target")))))
3932 `(("java-junit" ,java-junit)
3933 ("java-hamcrest-core" ,java-hamcrest-core)
3934 ("java-easymock" ,java-easymock)))
3935 (home-page "http://commons.apache.org/collections/")
3936 (synopsis "Collections framework")
3937 (description "The Java Collections Framework is the recognised standard
3938 for collection handling in Java. Commons-Collections seek to build upon the
3939 JDK classes by providing new interfaces, implementations and utilities. There
3940 are many features, including:
3943 @item @code{Bag} interface for collections that have a number of copies of
3945 @item @code{BidiMap} interface for maps that can be looked up from value to
3946 key as well and key to value
3947 @item @code{MapIterator} interface to provide simple and quick iteration over
3949 @item Transforming decorators that alter each object as it is added to the
3951 @item Composite collections that make multiple collections look like one
3952 @item Ordered maps and sets that retain the order elements are added in,
3953 including an LRU based map
3954 @item Reference map that allows keys and/or values to be garbage collected
3956 @item Many comparator implementations
3957 @item Many iterator implementations
3958 @item Adapter classes from array and enumerations to collections
3959 @item Utilities to test or create typical set-theory properties of collections
3960 such as union, intersection, and closure.
3962 (license license:asl2.0)))
3964 (define-public java-commons-collections
3966 (inherit java-commons-collections4)
3967 (name "java-commons-collections")
3971 (uri (string-append "mirror://apache/commons/collections/source/"
3972 "commons-collections-" version "-src.tar.gz"))
3975 "055r51a5lfc3z7rkxnxmnn1npvkvda7636hjpm4qk7cnfzz98387"))))
3977 (substitute-keyword-arguments (package-arguments java-commons-collections4)
3979 `(modify-phases ,phases
3980 ;; The manifest is required by the build procedure
3981 (add-before 'build 'add-manifest
3983 (mkdir-p "build/conf")
3984 (call-with-output-file "build/conf/MANIFEST.MF"
3986 (format file "Manifest-Version: 1.0\n")))))
3988 (install-jars "build"))))))))
3990 (define java-commons-collections-test-classes
3992 (inherit java-commons-collections)
3994 `(#:jar-name "commons-collections-test-classes.jar"
3995 #:source-dir "src/test"
3998 `(("collection" ,java-commons-collections)))))
4000 (define-public java-commons-beanutils
4002 (name "java-commons-beanutils")
4006 (uri (string-append "mirror://apache/commons/beanutils/source/"
4007 "commons-beanutils-" version "-src.tar.gz"))
4010 "03cs0bq3sl1sdc7py9g3qnf8n9h473nrkvd3d251kaqv6a2ab7qk"))))
4011 (build-system ant-build-system)
4013 `(#:test-target "test"
4016 (modify-phases %standard-phases
4018 (lambda* (#:key outputs #:allow-other-keys)
4019 (rename-file (string-append "dist/commons-beanutils-" ,version
4021 "commons-beanutils.jar")
4022 (install-file "commons-beanutils.jar"
4023 (string-append (assoc-ref outputs "out") "/share/java/"))
4026 `(("logging" ,java-commons-logging-minimal)
4027 ("collections" ,java-commons-collections)))
4029 `(("junit" ,java-junit)
4030 ("collections-test" ,java-commons-collections-test-classes)))
4031 (home-page "http://commons.apache.org/beanutils/")
4032 (synopsis "Dynamically set or get properties in Java")
4033 (description "BeanUtils provides a simplified interface to reflection and
4034 introspection to set or get dynamically determined properties through their
4035 setter and getter method.")
4036 (license license:asl2.0)))
4038 (define-public java-commons-io
4040 (name "java-commons-io")
4045 (uri (string-append "mirror://apache/commons/io/source/"
4046 "commons-io-" version "-src.tar.gz"))
4049 "0q5y41jrcjvx9hzs47x5kdhnasdy6rm4bzqd2jxl02w717m7a7v3"))))
4050 (build-system ant-build-system)
4051 (outputs '("out" "doc"))
4053 `(#:test-target "test"
4055 (list (string-append "-Djunit.jar="
4056 (assoc-ref %build-inputs "java-junit")
4057 "/share/java/junit.jar"))
4059 (modify-phases %standard-phases
4060 (add-after 'build 'build-javadoc ant-build-javadoc)
4061 (replace 'install (install-jars "target"))
4062 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
4064 `(("java-junit" ,java-junit)
4065 ("java-hamcrest-core" ,java-hamcrest-core)))
4066 (home-page "http://commons.apache.org/io/")
4067 (synopsis "Common useful IO related classes")
4068 (description "Commons-IO contains utility classes, stream implementations,
4069 file filters and endian classes.")
4070 (license license:asl2.0)))
4072 (define-public java-commons-lang
4074 (name "java-commons-lang")
4079 (uri (string-append "mirror://apache/commons/lang/source/"
4080 "commons-lang-" version "-src.tar.gz"))
4082 (base32 "1mxwagqadzx1b2al7i0z1v0r235aj2njdyijf02szq0vhmqrfiq5"))))
4083 (build-system ant-build-system)
4084 (outputs '("out" "doc"))
4086 `(#:test-target "test"
4087 #:test-exclude (list "**/Abstract*.java" "**/Random*.java")
4089 (modify-phases %standard-phases
4090 (add-after 'build 'build-javadoc ant-build-javadoc)
4091 (add-before 'check 'disable-failing-test
4093 ;; Disable a failing test
4094 (substitute* "src/test/java/org/apache/commons/lang/\
4095 time/FastDateFormatTest.java"
4096 (("public void testFormat\\(\\)")
4097 "public void disabled_testFormat()"))
4099 (replace 'install (install-jars "target"))
4100 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
4102 `(("java-junit" ,java-junit)))
4103 (home-page "http://commons.apache.org/lang/")
4104 (synopsis "Extension of the java.lang package")
4105 (description "The Commons Lang components contains a set of Java classes
4106 that provide helper methods for standard Java classes, especially those found
4107 in the @code{java.lang} package in the Sun JDK. The following classes are
4111 @item StringUtils - Helper for @code{java.lang.String}.
4112 @item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets
4113 of characters such as @code{[a-z]} and @code{[abcdez]}.
4114 @item RandomStringUtils - Helper for creating randomised strings.
4115 @item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
4116 @item NumberRange - A range of numbers with an upper and lower bound.
4117 @item ObjectUtils - Helper for @code{java.lang.Object}.
4118 @item SerializationUtils - Helper for serializing objects.
4119 @item SystemUtils - Utility class defining the Java system properties.
4120 @item NestedException package - A sub-package for the creation of nested
4122 @item Enum package - A sub-package for the creation of enumerated types.
4123 @item Builder package - A sub-package for the creation of @code{equals},
4124 @code{hashCode}, @code{compareTo} and @code{toString} methods.
4126 (license license:asl2.0)))
4128 (define-public java-commons-lang3
4130 (name "java-commons-lang3")
4135 (uri (string-append "mirror://apache/commons/lang/source/"
4136 "commons-lang3-" version "-src.tar.gz"))
4138 (base32 "0xpshb9spjhplq5a7mr0y1bgfw8190ik4xj8f569xidfcki1d6kg"))))
4139 (build-system ant-build-system)
4140 (outputs '("out" "doc"))
4142 `(#:test-target "test"
4144 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-all"))
4145 (junit (assoc-ref %build-inputs "java-junit"))
4146 (easymock (assoc-ref %build-inputs "java-easymock"))
4147 (io (assoc-ref %build-inputs "java-commons-io")))
4148 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
4149 (string-append "-Dhamcrest.jar=" hamcrest
4150 "/share/java/hamcrest-all.jar")
4151 (string-append "-Dcommons-io.jar=" io
4152 "/share/java/commons-io-"
4153 ,(package-version java-commons-io)
4155 (string-append "-Deasymock.jar=" easymock
4156 "/share/java/easymock.jar")))
4158 (modify-phases %standard-phases
4159 (add-after 'build 'build-javadoc ant-build-javadoc)
4160 (replace 'install (install-jars "target"))
4161 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
4163 `(("java-junit" ,java-junit)
4164 ("java-commons-io" ,java-commons-io)
4165 ("java-hamcrest-all" ,java-hamcrest-all)
4166 ("java-easymock" ,java-easymock)))
4167 (home-page "http://commons.apache.org/lang/")
4168 (synopsis "Extension of the java.lang package")
4169 (description "The Commons Lang components contains a set of Java classes
4170 that provide helper methods for standard Java classes, especially those found
4171 in the @code{java.lang} package. The following classes are included:
4174 @item StringUtils - Helper for @code{java.lang.String}.
4175 @item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets of
4176 characters such as @code{[a-z]} and @code{[abcdez]}.
4177 @item RandomStringUtils - Helper for creating randomised strings.
4178 @item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
4179 @item NumberRange - A range of numbers with an upper and lower bound.
4180 @item ObjectUtils - Helper for @code{java.lang.Object}.
4181 @item SerializationUtils - Helper for serializing objects.
4182 @item SystemUtils - Utility class defining the Java system properties.
4183 @item NestedException package - A sub-package for the creation of nested
4185 @item Enum package - A sub-package for the creation of enumerated types.
4186 @item Builder package - A sub-package for the creation of @code{equals},
4187 @code{hashCode}, @code{compareTo} and @code{toString} methods.
4189 (license license:asl2.0)))
4191 (define-public java-jsr305
4193 (name "java-jsr305")
4197 (uri (string-append "https://repo1.maven.org/maven2/"
4198 "com/google/code/findbugs/"
4199 "jsr305/" version "/jsr305-"
4200 version "-sources.jar"))
4203 "1rh6jin9v7jqpq3kf1swl868l8i94r636n03pzpsmgr8v0lh9j2n"))))
4204 (build-system ant-build-system)
4206 `(#:tests? #f ; no tests included
4207 #:jar-name "jsr305.jar"))
4208 (home-page "http://findbugs.sourceforge.net/")
4209 (synopsis "Annotations for the static analyzer called findbugs")
4210 (description "This package provides annotations for the findbugs package.
4211 It provides packages in the @code{javax.annotations} namespace.")
4212 (license license:asl2.0)))
4214 (define-public java-guava
4217 ;; This is the last release of Guava that can be built with Java 7.
4221 (uri (string-append "https://github.com/google/guava/"
4222 "releases/download/v" version
4223 "/guava-" version "-sources.jar"))
4226 "1gawrs5gi6j5hcfxdgpnfli75vb9pfi4sn09pnc8xacr669yajwr"))))
4227 (build-system ant-build-system)
4229 `(#:tests? #f ; no tests included
4230 #:jar-name "guava.jar"
4232 (modify-phases %standard-phases
4233 (add-after 'unpack 'trim-sources
4235 (with-directory-excursion "src/com/google/common"
4236 ;; Remove annotations to avoid extra dependencies:
4237 ;; * "j2objc" annotations are used when converting Java to
4239 ;; * "errorprone" annotations catch common Java mistakes at
4241 ;; * "IgnoreJRERequirement" is used for Android.
4242 (substitute* (find-files "." "\\.java$")
4243 (("import com.google.j2objc.*") "")
4244 (("import com.google.errorprone.annotation.*") "")
4245 (("import org.codehaus.mojo.animal_sniffer.*") "")
4246 (("@CanIgnoreReturnValue") "")
4249 (("@RetainedWith") "")
4251 (("@ForOverride") "")
4252 (("@J2ObjCIncompatible") "")
4253 (("@IgnoreJRERequirement") "")))
4256 `(("java-jsr305" ,java-jsr305)))
4257 (home-page "https://github.com/google/guava")
4258 (synopsis "Google core libraries for Java")
4259 (description "Guava is a set of core libraries that includes new
4260 collection types (such as multimap and multiset), immutable collections, a
4261 graph library, functional types, an in-memory cache, and APIs/utilities for
4262 concurrency, I/O, hashing, primitives, reflection, string processing, and much
4264 (license license:asl2.0)))
4266 ;; The java-commons-logging package provides adapters to many different
4267 ;; logging frameworks. To avoid an excessive dependency graph we try to build
4268 ;; it with only a minimal set of adapters.
4269 (define-public java-commons-logging-minimal
4271 (name "java-commons-logging-minimal")
4275 (uri (string-append "mirror://apache/commons/logging/source/"
4276 "commons-logging-" version "-src.tar.gz"))
4279 "10bwcy5w8d7y39n0krlwhnp8ds3kj5zhmzj0zxnkw0qdlsjmsrj9"))))
4280 (build-system ant-build-system)
4282 `(#:tests? #f ; avoid dependency on logging frameworks
4283 #:jar-name "commons-logging-minimal.jar"
4285 (modify-phases %standard-phases
4286 (add-after 'unpack 'delete-adapters-and-tests
4288 ;; Delete all adapters except for NoOpLog, SimpleLog, and
4289 ;; LogFactoryImpl. NoOpLog is required to build; LogFactoryImpl
4290 ;; is used by applications; SimpleLog is the only actually usable
4291 ;; implementation that does not depend on another logging
4295 (delete-file (string-append
4296 "src/main/java/org/apache/commons/logging/impl/" file)))
4297 (list "Jdk13LumberjackLogger.java"
4298 "WeakHashtable.java"
4300 "ServletContextCleaner.java"
4303 "LogKitLogger.java"))
4304 (delete-file-recursively "src/test")
4306 (home-page "http://commons.apache.org/logging/")
4307 (synopsis "Common API for logging implementations")
4308 (description "The Logging package is a thin bridge between different
4309 logging implementations. A library that uses the commons-logging API can be
4310 used with any logging implementation at runtime.")
4311 (license license:asl2.0)))
4313 ;; This is the last release of the 1.x series.
4314 (define-public java-mockito-1
4316 (name "java-mockito")
4320 (uri (string-append "http://repo1.maven.org/maven2/"
4321 "org/mockito/mockito-core/" version
4322 "/mockito-core-" version "-sources.jar"))
4325 "0vmiwnwpf83g2q7kj1rislmja8fpvqkixjhawh7nxnygx6pq11kc"))))
4326 (build-system ant-build-system)
4328 `(#:jar-name "mockito.jar"
4329 #:tests? #f ; no tests included
4330 ;; FIXME: patch-and-repack does not support jars, so we have to apply
4331 ;; patches in build phases.
4333 (modify-phases %standard-phases
4334 ;; Mockito was developed against a different version of hamcrest,
4335 ;; which does not require matcher implementations to provide an
4336 ;; implementation of the "describeMismatch" method. We add this
4337 ;; simple definition to pass the build with our version of hamcrest.
4338 (add-after 'unpack 'fix-hamcrest-build-error
4340 (substitute* "src/org/mockito/internal/matchers/LocalizedMatcher.java"
4341 (("public Matcher getActualMatcher\\(\\) .*" line)
4343 public void describeMismatch(Object item, Description description) {
4344 actualMatcher.describeMismatch(item, description);
4348 ;; Mockito bundles cglib. We have a cglib package, so let's use
4350 (add-after 'unpack 'use-system-libraries
4352 (with-directory-excursion "src/org/mockito/internal/creation/cglib"
4353 (substitute* '("CGLIBHacker.java"
4354 "CglibMockMaker.java"
4355 "ClassImposterizer.java"
4356 "DelegatingMockitoMethodProxy.java"
4357 "MethodInterceptorFilter.java"
4358 "MockitoNamingPolicy.java"
4359 "SerializableMockitoMethodProxy.java"
4360 "SerializableNoOp.java")
4361 (("import org.mockito.cglib") "import net.sf.cglib")))
4364 `(("java-junit" ,java-junit)
4365 ("java-objenesis" ,java-objenesis)
4366 ("java-cglib" ,java-cglib)
4367 ("java-hamcrest-core" ,java-hamcrest-core)))
4368 (home-page "http://mockito.org")
4369 (synopsis "Mockito is a mock library for Java")
4370 (description "Mockito is a mocking library for Java which lets you write
4371 tests with a clean and simple API. It generates mocks using reflection, and
4372 it records all mock invocations, including methods arguments.")
4373 (license license:asl2.0)))
4375 (define-public java-httpcomponents-httpcore
4377 (name "java-httpcomponents-httpcore")
4381 (uri (string-append "mirror://apache//httpcomponents/httpcore/"
4382 "source/httpcomponents-core-"
4383 version "-src.tar.gz"))
4386 "02bwcf38y4vgwq7kj2s6q7qrmma641r5lacivm16kgxvb2j6h1vy"))))
4387 (build-system ant-build-system)
4389 `(#:jar-name "httpcomponents-httpcore.jar"
4391 (modify-phases %standard-phases
4392 (add-after 'unpack 'chdir
4393 (lambda _ (chdir "httpcore") #t)))))
4395 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)
4396 ("java-commons-lang3" ,java-commons-lang3)))
4398 `(("java-junit" ,java-junit)
4399 ("java-mockito" ,java-mockito-1)))
4400 (home-page "https://hc.apache.org/httpcomponents-core-4.4.x/index.html")
4401 (synopsis "Low level HTTP transport components")
4402 (description "HttpCore is a set of low level HTTP transport components
4403 that can be used to build custom client and server side HTTP services with a
4404 minimal footprint. HttpCore supports two I/O models: blocking I/O model based
4405 on the classic Java I/O and non-blocking, event driven I/O model based on Java
4408 This package provides the blocking I/O model library.")
4409 (license license:asl2.0)))
4411 (define-public java-httpcomponents-httpcore-nio
4412 (package (inherit java-httpcomponents-httpcore)
4413 (name "java-httpcomponents-httpcore-nio")
4415 `(#:jar-name "httpcomponents-httpcore-nio.jar"
4417 (modify-phases %standard-phases
4418 (add-after 'unpack 'chdir
4419 (lambda _ (chdir "httpcore-nio") #t)))))
4421 `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
4422 ("java-hamcrest-core" ,java-hamcrest-core)
4423 ,@(package-inputs java-httpcomponents-httpcore)))
4424 (description "HttpCore is a set of low level HTTP transport components
4425 that can be used to build custom client and server side HTTP services with a
4426 minimal footprint. HttpCore supports two I/O models: blocking I/O model based
4427 on the classic Java I/O and non-blocking, event driven I/O model based on Java
4430 This package provides the non-blocking I/O model library based on Java
4433 (define-public java-httpcomponents-httpcore-ab
4434 (package (inherit java-httpcomponents-httpcore)
4435 (name "java-httpcomponents-httpcore-ab")
4437 `(#:jar-name "httpcomponents-httpcore-ab.jar"
4439 (modify-phases %standard-phases
4440 (add-after 'unpack 'chdir
4441 (lambda _ (chdir "httpcore-ab") #t)))))
4443 `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
4444 ("java-commons-cli" ,java-commons-cli)
4445 ("java-hamcrest-core" ,java-hamcrest-core)
4446 ,@(package-inputs java-httpcomponents-httpcore)))
4447 (synopsis "Apache HttpCore benchmarking tool")
4448 (description "This package provides the HttpCore benchmarking tool. It is
4449 an Apache AB clone based on HttpCore.")))
4451 (define-public java-httpcomponents-httpclient
4453 (name "java-httpcomponents-httpclient")
4457 (uri (string-append "mirror://apache/httpcomponents/httpclient/"
4458 "source/httpcomponents-client-"
4459 version "-src.tar.gz"))
4462 "1428399s7qy3cim5wc6f3ks4gl9nf9vkjpfmnlap3jflif7g2pj1"))))
4463 (build-system ant-build-system)
4465 `(#:jar-name "httpcomponents-httpclient.jar"
4467 (modify-phases %standard-phases
4468 (add-after 'unpack 'chdir
4469 (lambda _ (chdir "httpclient") #t)))))
4471 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)
4472 ("java-commons-codec" ,java-commons-codec)
4473 ("java-hamcrest-core" ,java-hamcrest-core)
4474 ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
4475 ("java-mockito" ,java-mockito-1)
4476 ("java-junit" ,java-junit)))
4477 (home-page "https://hc.apache.org/httpcomponents-client-ga/")
4478 (synopsis "HTTP client library for Java")
4479 (description "Although the @code{java.net} package provides basic
4480 functionality for accessing resources via HTTP, it doesn't provide the full
4481 flexibility or functionality needed by many applications. @code{HttpClient}
4482 seeks to fill this void by providing an efficient, up-to-date, and
4483 feature-rich package implementing the client side of the most recent HTTP
4484 standards and recommendations.")
4485 (license license:asl2.0)))
4487 (define-public java-httpcomponents-httpmime
4488 (package (inherit java-httpcomponents-httpclient)
4489 (name "java-httpcomponents-httpmime")
4491 `(#:jar-name "httpcomponents-httpmime.jar"
4493 (modify-phases %standard-phases
4494 (add-after 'unpack 'chdir
4495 (lambda _ (chdir "httpmime") #t)))))
4497 `(("java-httpcomponents-httpclient" ,java-httpcomponents-httpclient)
4498 ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
4499 ("java-junit" ,java-junit)
4500 ("java-hamcrest-core" ,java-hamcrest-core)))))
4502 (define-public java-commons-net
4504 (name "java-commons-net")
4508 (uri (string-append "mirror://apache/commons/net/source/"
4509 "commons-net-" version "-src.tar.gz"))
4512 "0n0cmnddk9qdqhjvka8pc6hd9mn2qi3166f1s6xk32h7rfy1adxr"))))
4513 (build-system ant-build-system)
4515 `(;; FIXME: MainTest.java tries to read "examples.properties" (which
4516 ;; should be "resources/examples/examples.properties"), but gets "null"
4519 #:jar-name "commons-net.jar"))
4521 `(("java-junit" ,java-junit)
4522 ("java-hamcrest-core" ,java-hamcrest-core)))
4523 (home-page "http://commons.apache.org/net/")
4524 (synopsis "Client library for many basic Internet protocols")
4525 (description "The Apache Commons Net library implements the client side of
4526 many basic Internet protocols. The purpose of the library is to provide
4527 fundamental protocol access, not higher-level abstractions.")
4528 (license license:asl2.0)))
4530 (define-public java-jsch
4536 (uri (string-append "mirror://sourceforge/jsch/jsch/"
4537 version "/jsch-" version ".zip"))
4540 "029rdddyq1mh3ghryh3ki99kba1xkf1d1swjv2vi6lk6zzjy2wdb"))))
4541 (build-system ant-build-system)
4543 `(#:build-target "dist"
4544 #:tests? #f ; no tests included
4546 (modify-phases %standard-phases
4547 (replace 'install (install-jars "dist")))))
4549 `(("unzip" ,unzip)))
4550 (home-page "http://www.jcraft.com/jsch/")
4551 (synopsis "Pure Java implementation of SSH2")
4552 (description "JSch is a pure Java implementation of SSH2. JSch allows you
4553 to connect to an SSH server and use port forwarding, X11 forwarding, file
4554 transfer, etc., and you can integrate its functionality into your own Java
4556 (license license:bsd-3)))
4558 (define-public java-commons-compress
4560 (name "java-commons-compress")
4564 (uri (string-append "mirror://apache/commons/compress/source/"
4565 "commons-compress-" version "-src.tar.gz"))
4568 "1vjqvavrn0babffn1kciz6v52ibwq2vwhzlb95hazis3lgllnxc8"))))
4569 (build-system ant-build-system)
4571 `(#:jar-name "commons-compress.jar"
4573 (modify-phases %standard-phases
4574 (add-after 'unpack 'delete-bad-tests
4576 (with-directory-excursion "src/test/java/org/apache/commons/compress/"
4577 ;; FIXME: These tests really should not fail. Maybe they are
4578 ;; indicative of problems with our Java packaging work.
4580 ;; This test fails with a null pointer exception.
4581 (delete-file "archivers/sevenz/SevenZOutputFileTest.java")
4582 ;; This test fails to open test resources.
4583 (delete-file "archivers/zip/ExplodeSupportTest.java")
4585 ;; FIXME: This test adds a dependency on powermock, which is hard to
4586 ;; package at this point.
4587 ;; https://github.com/powermock/powermock
4588 (delete-file "archivers/sevenz/SevenZNativeHeapTest.java"))
4591 `(("java-junit" ,java-junit)
4592 ("java-hamcrest-core" ,java-hamcrest-core)
4593 ("java-mockito" ,java-mockito-1)
4594 ("java-xz" ,java-xz)))
4595 (home-page "https://commons.apache.org/proper/commons-compress/")
4596 (synopsis "Java library for working with compressed files")
4597 (description "The Apache Commons Compress library defines an API for
4598 working with compressed files such as ar, cpio, Unix dump, tar, zip, gzip, XZ,
4599 Pack200, bzip2, 7z, arj, lzma, snappy, DEFLATE, lz4 and Z files.")
4600 (license license:asl2.0)))
4602 (define-public java-commons-csv
4604 (name "java-commons-csv")
4608 (uri (string-append "mirror://apache/commons/csv/source/"
4609 "commons-csv-" version "-src.tar.gz"))
4612 "1l89m0fm2s3xx3v3iynvangymfg2vlyngaj6fgsi457nmsw7m7ij"))))
4613 (build-system ant-build-system)
4615 `(#:jar-name "commons-csv.jar"
4616 #:source-dir "src/main/java"
4617 #:tests? #f)); FIXME: requires java-h2
4619 `(("java-hamcrest-core" ,java-hamcrest-core)
4620 ("java-commons-io" ,java-commons-io)
4621 ("java-commons-lang3" ,java-commons-lang3)
4622 ("junit" ,java-junit)))
4623 (home-page "https://commons.apache.org/proper/commons-csv/")
4624 (synopsis "Read and write CSV documents")
4625 (description "Commons CSV reads and writes files in variations of the Comma
4626 Separated Value (CSV) format. The most common CSV formats are predefined in the
4630 @item Microsoft Excel
4631 @item Informix UNLOAD
4632 @item Informix UNLOAD CSV
4638 Custom formats can be created using a fluent style API.")
4639 (license license:asl2.0)))
4641 (define-public java-osgi-annotation
4643 (name "java-osgi-annotation")
4647 (uri (string-append "https://repo1.maven.org/maven2/"
4648 "org/osgi/org.osgi.annotation/" version "/"
4649 "org.osgi.annotation-" version "-sources.jar"))
4652 "1q718mb7gqg726rh6pc2hcisn8v50nv35abbir0jypmffhiii85w"))))
4653 (build-system ant-build-system)
4655 `(#:tests? #f ; no tests
4656 #:jar-name "osgi-annotation.jar"))
4657 (home-page "https://www.osgi.org")
4658 (synopsis "Annotation module of OSGi framework")
4660 "OSGi, for Open Services Gateway initiative framework, is a module system
4661 and service platform for the Java programming language. This package contains
4662 the OSGi annotation module, providing additional services to help dynamic
4664 (license license:asl2.0)))
4666 (define-public java-osgi-core
4668 (name "java-osgi-core")
4672 (uri (string-append "https://repo1.maven.org/maven2/"
4673 "org/osgi/org.osgi.core/" version "/"
4674 "org.osgi.core-" version "-sources.jar"))
4677 "19bpf5jx32jq9789gyhin35q5v7flmw0p9mk7wbgqpxqfmxyiabv"))))
4678 (build-system ant-build-system)
4680 `(#:tests? #f ; no tests
4681 #:jar-name "osgi-core.jar"))
4683 `(("java-osgi-annotation" ,java-osgi-annotation)))
4684 (home-page "https://www.osgi.org")
4685 (synopsis "Core module of OSGi framework")
4687 "OSGi, for Open Services Gateway initiative framework, is a module system
4688 and service platform for the Java programming language. This package contains
4689 the OSGi Core module.")
4690 (license license:asl2.0)))
4692 (define-public java-osgi-service-event
4694 (name "java-osgi-service-event")
4698 (uri (string-append "https://repo1.maven.org/maven2/"
4699 "org/osgi/org.osgi.service.event/"
4700 version "/org.osgi.service.event-"
4701 version "-sources.jar"))
4704 "1nyhlgagwym75bycnjczwbnpymv2iw84zbhvvzk84g9q736i6qxm"))))
4705 (build-system ant-build-system)
4707 `(#:tests? #f ; no tests
4708 #:jar-name "osgi-service-event.jar"))
4710 `(("java-osgi-annotation" ,java-osgi-annotation)
4711 ("java-osgi-core" ,java-osgi-core)))
4712 (home-page "https://www.osgi.org")
4713 (synopsis "OSGi service event module")
4715 "OSGi, for Open Services Gateway initiative framework, is a module system
4716 and service platform for the Java programming language. This package contains
4717 the OSGi @code{org.osgi.service.event} module.")
4718 (license license:asl2.0)))
4720 (define-public java-eclipse-osgi
4722 (name "java-eclipse-osgi")
4726 (uri (string-append "https://repo1.maven.org/maven2/"
4727 "org/eclipse/platform/org.eclipse.osgi/"
4728 version "/org.eclipse.osgi-"
4729 version "-sources.jar"))
4732 "00cqc6lb29n0zv68b4l842vzkwawvbr7gshfdygsk8sicvcq2c7b"))))
4733 (build-system ant-build-system)
4735 `(#:tests? #f ; no tests included
4736 #:jar-name "eclipse-equinox-osgi.jar"))
4738 `(("java-osgi-annotation" ,java-osgi-annotation)))
4739 (home-page "http://www.eclipse.org/equinox/")
4740 (synopsis "Eclipse Equinox OSGi framework")
4741 (description "This package provides an implementation of the OSGi Core
4743 (license license:epl1.0)))
4745 (define-public java-eclipse-equinox-common
4747 (name "java-eclipse-equinox-common")
4751 (uri (string-append "https://repo1.maven.org/maven2/"
4752 "org/eclipse/platform/org.eclipse.equinox.common/"
4753 version "/org.eclipse.equinox.common-"
4754 version "-sources.jar"))
4757 "12aazpkgw46r1qj0pr421jzwhbmsizd97r37krd7njnbrdgfzksc"))))
4758 (build-system ant-build-system)
4760 `(#:tests? #f ; no tests included
4761 #:jar-name "eclipse-equinox-common.jar"))
4763 `(("java-eclipse-osgi" ,java-eclipse-osgi)))
4764 (home-page "http://www.eclipse.org/equinox/")
4765 (synopsis "Common Eclipse runtime")
4766 (description "This package provides the common Eclipse runtime.")
4767 (license license:epl1.0)))
4769 (define-public java-eclipse-core-jobs
4771 (name "java-eclipse-core-jobs")
4775 (uri (string-append "https://repo1.maven.org/maven2/"
4776 "org/eclipse/platform/org.eclipse.core.jobs/"
4777 version "/org.eclipse.core.jobs-"
4778 version "-sources.jar"))
4781 "0395b8lh0km8vhzjnchvs1rii1qz48hyvb2wqfaq4yhklbwihq4b"))))
4782 (build-system ant-build-system)
4784 `(#:tests? #f ; no tests included
4785 #:jar-name "eclipse-core-jobs.jar"))
4787 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
4788 ("java-eclipse-osgi" ,java-eclipse-osgi)))
4789 (home-page "http://www.eclipse.org/equinox/")
4790 (synopsis "Eclipse jobs mechanism")
4791 (description "This package provides the Eclipse jobs mechanism.")
4792 (license license:epl1.0)))
4794 (define-public java-eclipse-equinox-registry
4796 (name "java-eclipse-equinox-registry")
4800 (uri (string-append "https://repo1.maven.org/maven2/"
4801 "org/eclipse/platform/org.eclipse.equinox.registry/"
4802 version "/org.eclipse.equinox.registry-"
4803 version "-sources.jar"))
4806 "1i9sgymh2fy5vdgk5y7s3qvrlbgh4l93ddqi3v4zmca7hwrlhf9k"))))
4807 (build-system ant-build-system)
4809 `(#:tests? #f ; no tests included
4810 #:jar-name "eclipse-equinox-registry.jar"))
4812 `(("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
4813 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
4814 ("java-eclipse-osgi" ,java-eclipse-osgi)))
4815 (home-page "http://www.eclipse.org/equinox/")
4816 (synopsis "Eclipse extension registry support")
4817 (description "This package provides support for the Eclipse extension
4819 (license license:epl1.0)))
4821 (define-public java-eclipse-equinox-app
4823 (name "java-eclipse-equinox-app")
4827 (uri (string-append "https://repo1.maven.org/maven2/"
4828 "org/eclipse/platform/org.eclipse.equinox.app/"
4829 version "/org.eclipse.equinox.app-"
4830 version "-sources.jar"))
4833 "0nhvbp93y203ar7y59gb0mz3w2d3jlqhr0c9hii9bcfpmr7imdab"))))
4834 (build-system ant-build-system)
4836 `(#:tests? #f ; no tests included
4837 #:jar-name "eclipse-equinox-app.jar"))
4839 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
4840 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
4841 ("java-eclipse-osgi" ,java-eclipse-osgi)
4842 ("java-osgi-service-event" ,java-osgi-service-event)))
4843 (home-page "http://www.eclipse.org/equinox/")
4844 (synopsis "Equinox application container")
4845 (description "This package provides the Equinox application container for
4847 (license license:epl1.0)))
4849 (define-public java-eclipse-equinox-preferences
4851 (name "java-eclipse-equinox-preferences")
4855 (uri (string-append "https://repo1.maven.org/maven2/"
4856 "org/eclipse/platform/org.eclipse.equinox.preferences/"
4857 version "/org.eclipse.equinox.preferences-"
4858 version "-sources.jar"))
4861 "0k7w6c141sqym4fy3af0qkwpy4pdh2vsjpjba6rp5fxyqa24v0a2"))))
4862 (build-system ant-build-system)
4864 `(#:tests? #f ; no tests included
4865 #:jar-name "eclipse-equinox-preferences.jar"))
4867 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
4868 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
4869 ("java-eclipse-osgi" ,java-eclipse-osgi)))
4870 (home-page "http://www.eclipse.org/equinox/")
4871 (synopsis "Eclipse preferences mechanism")
4872 (description "This package provides the Eclipse preferences mechanism with
4873 the module @code{org.eclipse.equinox.preferences}.")
4874 (license license:epl1.0)))
4876 (define-public java-eclipse-core-contenttype
4878 (name "java-eclipse-core-contenttype")
4882 (uri (string-append "https://repo1.maven.org/maven2/"
4883 "org/eclipse/platform/org.eclipse.core.contenttype/"
4884 version "/org.eclipse.core.contenttype-"
4885 version "-sources.jar"))
4888 "1wcqcv7ijwv5rh748vz3x9pkmjl9w1r0k0026k56n8yjl4rrmspi"))))
4889 (build-system ant-build-system)
4891 `(#:tests? #f ; no tests included
4892 #:jar-name "eclipse-core-contenttype.jar"))
4894 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
4895 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
4896 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
4897 ("java-eclipse-osgi" ,java-eclipse-osgi)))
4898 (home-page "http://www.eclipse.org/")
4899 (synopsis "Eclipse content mechanism")
4900 (description "This package provides the Eclipse content mechanism in the
4901 @code{org.eclipse.core.contenttype} module.")
4902 (license license:epl1.0)))
4904 (define-public java-eclipse-core-runtime
4906 (name "java-eclipse-core-runtime")
4910 (uri (string-append "https://repo1.maven.org/maven2/"
4911 "org/eclipse/platform/org.eclipse.core.runtime/"
4912 version "/org.eclipse.core.runtime-"
4913 version "-sources.jar"))
4916 "16mkf8jgj35pgzms7w1gyfq0gfm4ixw6c5xbbxzdj1la56c758ya"))))
4917 (build-system ant-build-system)
4919 `(#:tests? #f ; no tests included
4920 #:jar-name "eclipse-core-runtime.jar"))
4922 `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
4923 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
4924 ("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
4925 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
4926 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
4927 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
4928 ("java-eclipse-osgi" ,java-eclipse-osgi)))
4929 (home-page "https://www.eclipse.org/")
4930 (synopsis "Eclipse core runtime")
4931 (description "This package provides the Eclipse core runtime with the
4932 module @code{org.eclipse.core.runtime}.")
4933 (license license:epl1.0)))
4935 (define-public java-eclipse-core-filesystem
4937 (name "java-eclipse-core-filesystem")
4941 (uri (string-append "https://repo1.maven.org/maven2/"
4942 "org/eclipse/platform/org.eclipse.core.filesystem/"
4943 version "/org.eclipse.core.filesystem-"
4944 version "-sources.jar"))
4947 "0km1bhwjim4rfy3pkvjhvy31kgsyf2ncx0mlkmbf5n6g57pphdyj"))))
4948 (build-system ant-build-system)
4950 `(#:tests? #f ; no tests included
4951 #:jar-name "eclipse-core-filesystem.jar"))
4953 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
4954 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
4955 ("java-eclipse-osgi" ,java-eclipse-osgi)))
4956 (home-page "https://www.eclipse.org/")
4957 (synopsis "Eclipse core file system")
4958 (description "This package provides the Eclipse core file system with the
4959 module @code{org.eclipse.core.filesystem}.")
4960 (license license:epl1.0)))
4962 (define-public java-eclipse-core-expressions
4964 (name "java-eclipse-core-expressions")
4968 (uri (string-append "https://repo1.maven.org/maven2/"
4969 "org/eclipse/platform/org.eclipse.core.expressions/"
4970 version "/org.eclipse.core.expressions-"
4971 version "-sources.jar"))
4974 "18bw2l875gmygvpagpgk9l24qzbdjia4ag12nw6fi8v8yaq4987f"))))
4975 (build-system ant-build-system)
4977 `(#:tests? #f ; no tests included
4978 #:jar-name "eclipse-core-expressions.jar"))
4980 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
4981 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
4982 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
4983 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
4984 ("java-eclipse-osgi" ,java-eclipse-osgi)))
4985 (home-page "https://www.eclipse.org/")
4986 (synopsis "Eclipse core expression language")
4987 (description "This package provides the Eclipse core expression language
4988 with the @code{org.eclipse.core.expressions} module.")
4989 (license license:epl1.0)))
4991 (define-public java-eclipse-core-variables
4993 (name "java-eclipse-core-variables")
4997 (uri (string-append "https://repo1.maven.org/maven2/"
4998 "org/eclipse/platform/org.eclipse.core.variables/"
4999 version "/org.eclipse.core.variables-"
5000 version "-sources.jar"))
5003 "12dirh03zi4n5x5cj07vzrhkmnqy6h9q10h9j605pagmpmifyxmy"))))
5004 (build-system ant-build-system)
5006 `(#:tests? #f ; no tests included
5007 #:jar-name "eclipse-core-variables.jar"))
5009 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5010 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5011 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5012 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5013 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5014 (home-page "https://www.eclipse.org/platform")
5015 (synopsis "Eclipse core variables")
5016 (description "This package provides the Eclipse core variables module
5017 @code{org.eclipse.core.variables}.")
5018 (license license:epl1.0)))
5020 (define-public java-eclipse-ant-core
5022 (name "java-eclipse-ant-core")
5026 (uri (string-append "https://repo1.maven.org/maven2/"
5027 "org/eclipse/platform/org.eclipse.ant.core/"
5028 version "/org.eclipse.ant.core-"
5029 version "-sources.jar"))
5032 "11g3if794qjlk98mz9zch22rr56sd7z63vn4i7k2icr8cq5bfqg7"))))
5033 (build-system ant-build-system)
5035 `(#:tests? #f ; no tests included
5036 #:jar-name "eclipse-ant-core.jar"))
5038 `(("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
5039 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5040 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5041 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5042 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
5043 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5044 ("java-eclipse-core-variables" ,java-eclipse-core-variables)
5045 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5046 (home-page "https://www.eclipse.org/platform")
5047 (synopsis "Ant build tool core libraries")
5048 (description "This package provides the ant build tool core libraries with
5049 the module @code{org.eclipse.ant.core}.")
5050 (license license:epl1.0)))
5052 (define-public java-eclipse-core-resources
5054 (name "java-eclipse-core-resources")
5058 (uri (string-append "https://repo1.maven.org/maven2/"
5059 "org/eclipse/platform/org.eclipse.core.resources/"
5060 version "/org.eclipse.core.resources-"
5061 version "-sources.jar"))
5064 "1hrfxrll6cpcagfksk2na1ypvkcnsp0fk6n3vcsrn97qayf9mx9l"))))
5065 (build-system ant-build-system)
5067 `(#:tests? #f ; no tests included
5068 #:jar-name "eclipse-core-resources.jar"))
5070 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5071 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5072 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5073 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
5074 ("java-eclipse-core-expressions" ,java-eclipse-core-expressions)
5075 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
5076 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
5077 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5078 ("java-eclipse-ant-core" ,java-eclipse-ant-core)
5079 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5080 (home-page "https://www.eclipse.org/")
5081 (synopsis "Eclipse core resource management")
5082 (description "This package provides the Eclipse core resource management
5083 module @code{org.eclipse.core.resources}.")
5084 (license license:epl1.0)))
5086 (define-public java-eclipse-compare-core
5088 (name "java-eclipse-compare-core")
5092 (uri (string-append "https://repo1.maven.org/maven2/"
5093 "org/eclipse/platform/org.eclipse.compare.core/"
5094 version "/org.eclipse.compare.core-"
5095 version "-sources.jar"))
5098 "10g37r0pbiffyv2wk35c6g5lwzkdipkl0kkjp41v84dln46xm4dg"))))
5099 (build-system ant-build-system)
5101 `(#:tests? #f ; no tests included
5102 #:jar-name "eclipse-compare-core.jar"))
5104 `(("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5105 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5106 ("java-eclipse-osgi" ,java-eclipse-osgi)
5107 ("java-icu4j" ,java-icu4j)))
5108 (home-page "https://www.eclipse.org/")
5109 (synopsis "Eclipse core compare support")
5110 (description "This package provides the Eclipse core compare support
5111 module @code{org.eclipse.compare.core}.")
5112 (license license:epl1.0)))
5114 (define-public java-eclipse-team-core
5116 (name "java-eclipse-team-core")
5120 (uri (string-append "https://repo1.maven.org/maven2/"
5121 "org/eclipse/platform/org.eclipse.team.core/"
5122 version "/org.eclipse.team.core-"
5123 version "-sources.jar"))
5126 "02j2jzqgb26zx2d5ahxmvijw6j4r0la90zl5c3i65x6z19ciyam7"))))
5127 (build-system ant-build-system)
5129 `(#:tests? #f ; no tests included
5130 #:jar-name "eclipse-team-core.jar"))
5132 `(("java-eclipse-compare-core" ,java-eclipse-compare-core)
5133 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
5134 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
5135 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
5136 ("java-eclipse-core-resources" ,java-eclipse-core-resources)
5137 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5138 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5139 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5140 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5141 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5142 (home-page "https://www.eclipse.org/platform")
5143 (synopsis "Eclipse team support core")
5144 (description "This package provides the Eclipse team support core module
5145 @code{org.eclipse.team.core}.")
5146 (license license:epl1.0)))
5148 (define-public java-eclipse-core-commands
5150 (name "java-eclipse-core-commands")
5154 (uri (string-append "https://repo1.maven.org/maven2/"
5155 "org/eclipse/platform/org.eclipse.core.commands/"
5156 version "/org.eclipse.core.commands-"
5157 version "-sources.jar"))
5160 "0yjn482qndcfrsq3jd6vnhcylp16420f5aqkrwr8spsprjigjcr9"))))
5161 (build-system ant-build-system)
5163 `(#:tests? #f ; no tests included
5164 #:jar-name "eclipse-core-commands.jar"))
5166 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)))
5167 (home-page "https://www.eclipse.org/platform")
5168 (synopsis "Eclipse core commands")
5169 (description "This package provides Eclipse core commands in the module
5170 @code{org.eclipse.core.commands}.")
5171 (license license:epl1.0)))
5173 (define-public java-eclipse-text
5175 (name "java-eclipse-text")
5179 (uri (string-append "https://repo1.maven.org/maven2/"
5180 "org/eclipse/platform/org.eclipse.text/"
5181 version "/org.eclipse.text-"
5182 version "-sources.jar"))
5185 "0scz70vzz5qs5caji9f5q01vkqnvip7dpri1q07l8wbbdcxn4cq1"))))
5186 (build-system ant-build-system)
5188 `(#:tests? #f ; no tests included
5189 #:jar-name "eclipse-text.jar"
5191 (modify-phases %standard-phases
5192 ;; When creating a new category we must make sure that the new list
5193 ;; matches List<Position>. By default it seems to be too generic
5194 ;; (ArrayList<Object>), so we specialize it to ArrayList<Position>.
5195 ;; Without this we get this error:
5197 ;; [javac] .../src/org/eclipse/jface/text/AbstractDocument.java:376:
5198 ;; error: method put in interface Map<K,V> cannot be applied to given types;
5199 ;; [javac] fPositions.put(category, new ArrayList<>());
5201 ;; [javac] required: String,List<Position>
5202 ;; [javac] found: String,ArrayList<Object>
5203 ;; [javac] reason: actual argument ArrayList<Object> cannot be converted
5204 ;; to List<Position> by method invocation conversion
5205 ;; [javac] where K,V are type-variables:
5206 ;; [javac] K extends Object declared in interface Map
5207 ;; [javac] V extends Object declared in interface Map
5209 ;; I don't know if this is a good fix. I suspect it is not, but it
5211 (add-after 'unpack 'fix-compilation-error
5213 (substitute* "src/org/eclipse/jface/text/AbstractDocument.java"
5214 (("Positions.put\\(category, new ArrayList<>\\(\\)\\);")
5215 "Positions.put(category, new ArrayList<Position>());"))
5218 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5219 ("java-eclipse-core-commands" ,java-eclipse-core-commands)
5220 ("java-icu4j" ,java-icu4j)))
5221 (home-page "http://www.eclipse.org/platform")
5222 (synopsis "Eclipse text library")
5223 (description "Platform Text is part of the Platform UI project and
5224 provides the basic building blocks for text and text editors within Eclipse
5225 and contributes the Eclipse default text editor.")
5226 (license license:epl1.0)))
5228 (define-public java-eclipse-jdt-core
5230 (name "java-eclipse-jdt-core")
5234 (uri (string-append "https://repo1.maven.org/maven2/"
5235 "org/eclipse/jdt/org.eclipse.jdt.core/"
5236 version "/org.eclipse.jdt.core-"
5237 version "-sources.jar"))
5240 "191xw4lc7mjjkprh4ji5vnpjvr5r4zvbpwkriy4bvsjqrz35vh1j"))))
5241 (build-system ant-build-system)
5243 `(#:tests? #f ; no tests included
5244 #:jar-name "eclipse-jdt-core.jar"))
5246 `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
5247 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
5248 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
5249 ("java-eclipse-core-resources" ,java-eclipse-core-resources)
5250 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5251 ("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
5252 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5253 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5254 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5255 ("java-eclipse-osgi" ,java-eclipse-osgi)
5256 ("java-eclipse-text" ,java-eclipse-text)))
5257 (home-page "https://www.eclipse.org/jdt")
5258 (synopsis "Java development tools core libraries")
5259 (description "This package provides the core libraries of the Eclipse Java
5260 development tools.")
5261 (license license:epl1.0)))
5263 (define-public java-javax-mail
5265 (name "java-javax-mail")
5269 (uri (string-append "https://repo1.maven.org/maven2/"
5270 "com/sun/mail/javax.mail/"
5271 version "/javax.mail-"
5272 version "-sources.jar"))
5275 "0sdlfgsc2b5s89xv1261y8i0jijcja019k2x1c8ngfn582w4jly9"))))
5276 (build-system ant-build-system)
5278 `(#:tests? #f ; no tests
5279 #:jar-name "javax-mail.jar"))
5280 (home-page "https://javamail.java.net")
5281 (synopsis "Reference implementation of the JavaMail API")
5283 "This package provides versions of the JavaMail API implementation, IMAP,
5284 SMTP, and POP3 service providers, some examples, and documentation for the
5286 ;; GPLv2 only with "classpath exception".
5287 (license license:gpl2)))
5289 (define-public java-log4j-api
5291 (name "java-log4j-api")
5295 (uri (string-append "mirror://apache/logging/log4j/" version
5296 "/apache-log4j-" version "-src.tar.gz"))
5299 "0j5p9gik0jysh37nlrckqbky12isy95cpwg2gv5fas1rcdqbraxd"))))
5300 (build-system ant-build-system)
5302 `(#:tests? #f ; tests require unpackaged software
5303 #:jar-name "log4j-api.jar"
5305 (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out")
5308 (modify-phases %standard-phases
5309 (add-after 'unpack 'enter-dir
5310 (lambda _ (chdir "log4j-api") #t))
5311 ;; FIXME: The tests require additional software that has not been
5312 ;; packaged yet, such as
5313 ;; * org.apache.maven
5314 ;; * org.apache.felix
5315 (add-after 'enter-dir 'delete-tests
5316 (lambda _ (delete-file-recursively "src/test") #t)))))
5318 `(("java-osgi-core" ,java-osgi-core)
5319 ("java-hamcrest-core" ,java-hamcrest-core)
5320 ("java-junit" ,java-junit)))
5321 (home-page "http://logging.apache.org/log4j/2.x/")
5322 (synopsis "API module of the Log4j logging framework for Java")
5324 "This package provides the API module of the Log4j logging framework for
5326 (license license:asl2.0)))
5328 (define-public java-log4j-core
5330 (inherit java-log4j-api)
5331 (name "java-log4j-core")
5333 `(("java-osgi-core" ,java-osgi-core)
5334 ("java-hamcrest-core" ,java-hamcrest-core)
5335 ("java-log4j-api" ,java-log4j-api)
5336 ("java-mail" ,java-mail)
5337 ("java-jboss-jms-api-spec" ,java-jboss-jms-api-spec)
5338 ("java-lmax-disruptor" ,java-lmax-disruptor)
5339 ("java-kafka" ,java-kafka-clients)
5340 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
5341 ("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
5342 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
5343 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)
5344 ("java-fasterxml-jackson-dataformat-xml" ,java-fasterxml-jackson-dataformat-xml)
5345 ("java-fasterxml-jackson-dataformat-yaml" ,java-fasterxml-jackson-dataformat-yaml)
5346 ("java-commons-compress" ,java-commons-compress)
5347 ("java-commons-csv" ,java-commons-csv)
5348 ("java-jeromq" ,java-jeromq)
5349 ("java-junit" ,java-junit)))
5351 `(("hamcrest" ,java-hamcrest-all)
5352 ("java-commons-io" ,java-commons-io)
5353 ("java-commons-lang3" ,java-commons-lang3)
5354 ("slf4j" ,java-slf4j-api)))
5356 `(#:tests? #f ; tests require more dependencies
5357 #:test-dir "src/test"
5358 #:source-dir "src/main/java"
5359 #:jar-name "log4j-core.jar"
5362 (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out")
5365 (modify-phases %standard-phases
5366 (add-after 'unpack 'enter-dir
5367 (lambda _ (chdir "log4j-core") #t)))))
5368 (synopsis "Core component of the Log4j framework")
5369 (description "This package provides the core component of the Log4j
5370 logging framework for Java.")))
5372 (define-public java-log4j-1.2-api
5374 (inherit java-log4j-api)
5375 (name "java-log4j-1.2-api")
5377 `(#:jar-name "java-log4j-1.2-api.jar"
5378 #:source-dir "log4j-1.2-api/src/main/java"
5380 ;; Tests require maven-model (and other maven subprojects), which is a
5381 ;; cyclic dependency.
5384 `(("log4j-api" ,java-log4j-api)
5385 ("log4j-core" ,java-log4j-core)
5386 ("osgi-core" ,java-osgi-core)
5387 ("eclipse-osgi" ,java-eclipse-osgi)
5388 ("java-lmax-disruptor" ,java-lmax-disruptor)))))
5390 (define-public java-commons-cli
5392 (name "java-commons-cli")
5396 (uri (string-append "mirror://apache/commons/cli/source/"
5397 "commons-cli-" version "-src.tar.gz"))
5400 "1fkjn552i12vp3xxk21ws4p70fi0lyjm004vzxsdaz7gdpgyxxyl"))))
5401 (build-system ant-build-system)
5404 `(#:jar-name "commons-cli.jar"))
5406 `(("java-junit" ,java-junit)
5407 ("java-hamcrest-core" ,java-hamcrest-core)))
5408 (home-page "http://commons.apache.org/cli/")
5409 (synopsis "Command line arguments and options parsing library")
5410 (description "The Apache Commons CLI library provides an API for parsing
5411 command line options passed to programs. It is also able to print help
5412 messages detailing the options available for a command line tool.
5414 Commons CLI supports different types of options:
5417 @item POSIX like options (ie. tar -zxvf foo.tar.gz)
5418 @item GNU like long options (ie. du --human-readable --max-depth=1)
5419 @item Java like properties (ie. java -Djava.awt.headless=true Foo)
5420 @item Short options with value attached (ie. gcc -O2 foo.c)
5421 @item long options with single hyphen (ie. ant -projecthelp)
5424 This is a part of the Apache Commons Project.")
5425 (license license:asl2.0)))
5427 (define-public java-commons-codec
5429 (name "java-commons-codec")
5433 (uri (string-append "mirror://apache/commons/codec/source/"
5434 "commons-codec-" version "-src.tar.gz"))
5437 "1w9qg30y4s0x8gnmr2fgj4lyplfn788jqxbcz27lf5kbr6n8xr65"))))
5438 (build-system ant-build-system)
5439 (outputs '("out" "doc"))
5441 `(#:test-target "test"
5443 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
5444 (junit (assoc-ref %build-inputs "java-junit")))
5445 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
5446 (string-append "-Dhamcrest.jar=" hamcrest
5447 "/share/java/hamcrest-core.jar")
5448 ;; Do not append version to jar.
5449 "-Dfinal.name=commons-codec"))
5451 (modify-phases %standard-phases
5452 (add-after 'build 'build-javadoc ant-build-javadoc)
5453 (replace 'install (install-jars "dist"))
5454 (add-after 'install 'install-doc (install-javadoc "dist/docs/api")))))
5456 `(("java-junit" ,java-junit)
5457 ("java-hamcrest-core" ,java-hamcrest-core)))
5458 (home-page "http://commons.apache.org/codec/")
5459 (synopsis "Common encoders and decoders such as Base64, Hex, Phonetic and URLs")
5460 (description "The codec package contains simple encoder and decoders for
5461 various formats such as Base64 and Hexadecimal. In addition to these widely
5462 used encoders and decoders, the codec package also maintains a collection of
5463 phonetic encoding utilities.
5465 This is a part of the Apache Commons Project.")
5466 (license license:asl2.0)))
5468 (define-public java-commons-daemon
5470 (name "java-commons-daemon")
5474 (uri (string-append "mirror://apache/commons/daemon/source/"
5475 "commons-daemon-" version "-src.tar.gz"))
5478 "0ci46kq8jpz084ccwq0mmkahcgsmh20ziclp2jf5i0djqv95gvhi"))))
5479 (build-system ant-build-system)
5481 `(#:test-target "test"
5483 (modify-phases %standard-phases
5484 (add-after 'build 'build-javadoc ant-build-javadoc)
5485 (replace 'install (install-jars "dist"))
5486 (add-after 'install 'install-doc (install-javadoc "dist/docs/api")))))
5488 `(("java-junit" ,java-junit)))
5489 (home-page "http://commons.apache.org/daemon/")
5490 (synopsis "Library to launch Java applications as daemons")
5491 (description "The Daemon package from Apache Commons can be used to
5492 implement Java applications which can be launched as daemons. For example the
5493 program will be notified about a shutdown so that it can perform cleanup tasks
5494 before its process of execution is destroyed by the operation system.
5496 This package contains the Java library. You will also need the actual binary
5497 for your architecture which is provided by the jsvc package.
5499 This is a part of the Apache Commons Project.")
5500 (license license:asl2.0)))
5502 (define-public java-javaewah
5504 (name "java-javaewah")
5508 (uri (string-append "https://github.com/lemire/javaewah/"
5509 "archive/JavaEWAH-" version ".tar.gz"))
5512 "1n7j1r1h24wlhwv9zdcj6yqjrhma2ixwyzm15l5vrv6yqjs6753b"))))
5513 (build-system ant-build-system)
5514 (arguments `(#:jar-name "javaewah.jar"))
5516 `(("java-junit" ,java-junit)
5517 ("java-hamcrest-core" ,java-hamcrest-core)))
5518 (home-page "https://github.com/lemire/javaewah")
5519 (synopsis "Compressed alternative to the Java @code{BitSet} class")
5520 (description "This is a word-aligned compressed variant of the Java
5521 @code{Bitset} class. It provides both a 64-bit and a 32-bit RLE-like
5522 compression scheme. It can be used to implement bitmap indexes.
5524 The goal of word-aligned compression is not to achieve the best compression,
5525 but rather to improve query processing time. Hence, JavaEWAH tries to save CPU
5526 cycles, maybe at the expense of storage. However, the EWAH scheme is always
5527 more efficient storage-wise than an uncompressed bitmap (as implemented in the
5528 @code{BitSet} class by Sun).")
5529 ;; GPL2.0 derivates are explicitly allowed.
5530 (license license:asl2.0)))
5532 (define-public java-slf4j-api
5534 (name "java-slf4j-api")
5538 (uri (string-append "https://www.slf4j.org/dist/slf4j-"
5542 "13j51sgzmhhdrfa74gkal5zpip7r1440dh7zsi2c8bpb2zs1v8kb"))
5543 (modules '((guix build utils)))
5544 ;; Delete bundled jars.
5547 (for-each delete-file (find-files "." "\\.jar$"))
5549 (build-system ant-build-system)
5551 `(#:jar-name "slf4j-api.jar"
5552 #:source-dir "slf4j-api/src/main"
5553 #:test-dir "slf4j-api/src/test"
5555 (modify-phases %standard-phases
5556 (add-after 'build 'regenerate-jar
5558 ;; pom.xml ignores these files in the jar creation process. If we don't,
5559 ;; we get the error "This code should have never made it into slf4j-api.jar"
5560 (delete-file-recursively "build/classes/org/slf4j/impl")
5561 (zero? (system* "jar" "-cf" "build/jar/slf4j-api.jar" "-C"
5562 "build/classes" "."))))
5563 (add-before 'check 'dont-test-abstract-classes
5565 ;; abstract classes are not meant to be run with junit
5566 (substitute* "build.xml"
5567 (("<include name=\"\\*\\*/\\*Test.java\" />")
5568 (string-append "<include name=\"**/*Test.java\" />"
5569 "<exclude name=\"**/MultithreadedInitializationTest"
5570 ".java\" />"))))))))
5572 `(("java-junit" ,java-junit)
5573 ("java-hamcrest-core" ,java-hamcrest-core)))
5574 (home-page "https://www.slf4j.org/")
5575 (synopsis "Simple logging facade for Java")
5576 (description "The Simple Logging Facade for Java (SLF4J) serves as a
5577 simple facade or abstraction for various logging
5578 frameworks (e.g. @code{java.util.logging}, @code{logback}, @code{log4j})
5579 allowing the end user to plug in the desired logging framework at deployment
5581 (license license:expat)))
5583 (define-public java-slf4j-simple
5585 (name "java-slf4j-simple")
5587 (source (package-source java-slf4j-api))
5588 (build-system ant-build-system)
5590 `(#:jar-name "slf4j-simple.jar"
5591 #:source-dir "slf4j-simple/src/main"
5592 #:test-dir "slf4j-simple/src/test"
5594 (modify-phases %standard-phases
5595 ;; The tests need some test classes from slf4j-api
5596 (add-before 'check 'build-slf4j-api-test-helpers
5598 ;; Add current dir to CLASSPATH ...
5600 (string-append (getcwd) ":" (getenv "CLASSPATH")))
5601 ;; ... and build test helper classes here:
5605 ,@(find-files "slf4j-api/src/test" ".*\\.java")))))))))
5607 `(("java-junit" ,java-junit)
5608 ("java-hamcrest-core" ,java-hamcrest-core)
5609 ("java-slf4j-api" ,java-slf4j-api)))
5610 (home-page "https://www.slf4j.org/")
5611 (synopsis "Simple implementation of simple logging facade for Java")
5612 (description "SLF4J binding for the Simple implementation, which outputs
5613 all events to System.err. Only messages of level INFO and higher are
5615 (license license:expat)))
5617 (define-public antlr2
5623 (uri (string-append "http://www.antlr2.org/download/antlr-"
5627 "1ffvcwdw73id0dk6pj2mlxjvbg0662qacx4ylayqcxgg381fnfl5"))
5628 (modules '((guix build utils)))
5631 (delete-file "antlr.jar")
5632 (substitute* "lib/cpp/antlr/CharScanner.hpp"
5636 "#define EOF (-1)\n"
5637 "#include <strings.h>")))
5638 (substitute* "configure"
5641 (build-system gnu-build-system)
5643 `(#:tests? #f ; no test target
5644 #:imported-modules ((guix build ant-build-system)
5645 (guix build syscalls)
5646 ,@%gnu-build-system-modules)
5647 #:modules (((guix build ant-build-system) #:prefix ant:)
5648 (guix build gnu-build-system)
5651 (modify-phases %standard-phases
5652 (add-after 'install 'strip-jar-timestamps
5653 (assoc-ref ant:%standard-phases 'strip-jar-timestamps))
5654 (add-after 'configure 'fix-bin-ls
5656 (substitute* (find-files "." "Makefile")
5662 ("java" ,icedtea "jdk")))
5664 `(("java" ,icedtea)))
5665 (home-page "http://www.antlr2.org")
5666 (synopsis "Framework for constructing recognizers, compilers, and translators")
5667 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
5668 is a language tool that provides a framework for constructing recognizers,
5669 compilers, and translators from grammatical descriptions containing Java, C#,
5670 C++, or Python actions. ANTLR provides excellent support for tree construction,
5671 tree walking, and translation.")
5672 (license license:public-domain)))
5674 (define-public java-stringtemplate-3
5676 (name "java-stringtemplate")
5680 (uri (string-append "https://github.com/antlr/website-st4/raw/"
5681 "gh-pages/download/stringtemplate-"
5685 "086yj68np1vqhkj7483diz3km6s6y4gmwqswa7524a0ca6vxn2is"))))
5686 (build-system ant-build-system)
5688 `(#:jar-name (string-append ,name "-" ,version ".jar")
5690 #:modules ((guix build ant-build-system)
5694 (modify-phases %standard-phases
5695 (add-before 'check 'fix-tests
5697 (substitute* "build.xml"
5698 (("\\$\\{test.home\\}/java")
5699 "${test.home}/org"))
5701 (add-before 'build 'generate-grammar
5703 (with-directory-excursion "src/org/antlr/stringtemplate/language/"
5704 (every (lambda (file)
5705 (format #t "~a\n" file)
5706 (zero? (system* "antlr" file)))
5707 '("template.g" "angle.bracket.template.g" "action.g"
5708 "eval.g" "group.g" "interface.g"))))))))
5711 ("java-junit" ,java-junit)))
5712 (home-page "http://www.stringtemplate.org")
5713 (synopsis "Template engine to generate formatted text output")
5714 (description "StringTemplate is a java template engine (with ports for C#,
5715 Objective-C, JavaScript, Scala) for generating source code, web pages, emails,
5716 or any other formatted text output. StringTemplate is particularly good at
5717 code generators, multiple site skins, and internationalization / localization.
5718 StringTemplate also powers ANTLR.")
5719 (license license:bsd-3)))
5721 ;; antlr3 is partially written using antlr3 grammar files. It also depends on
5722 ;; ST4 (stringtemplate4), which is also partially written using antlr3 grammar
5723 ;; files and uses antlr3 at runtime. The latest version requires a recent version
5724 ;; of antlr3 at runtime.
5725 ;; Fortunately, ST4 4.0.6 can be built with an older antlr3, and we use antlr3.3.
5726 ;; This version of ST4 is sufficient for the latest antlr3.
5727 ;; We use ST4 4.0.6 to build a boostrap antlr3 (latest version), and build
5728 ;; the latest ST4 with it. Then we build our final antlr3 that will be linked
5729 ;; against the latest ST4.
5730 ;; antlr3.3 still depends on antlr3 to generate some files, so we use an
5731 ;; even older version, antlr3.1, to generate them. Fortunately antlr3.1 uses
5732 ;; only grammar files with the antlr2 syntax.
5733 ;; So we build antlr3.1 -> antlr3.3 -> ST4.0.6 -> antlr3-bootstrap -> ST4 -> antlr3.
5735 (define-public java-stringtemplate
5736 (package (inherit java-stringtemplate-3)
5737 (name "java-stringtemplate")
5741 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/"
5743 (file-name (string-append name "-" version ".tar.gz"))
5746 "1pri8hqa95rfdkjy55icl5q1m09zwp5k67ib14abas39s4v3w087"))))
5747 (build-system ant-build-system)
5749 `(#:jar-name (string-append ,name "-" ,version ".jar")
5750 #:tests? #f ; FIXME: tests fail for unknown reasons
5752 #:modules ((guix build ant-build-system)
5756 (modify-phases %standard-phases
5757 (add-before 'check 'fix-test-target
5759 (substitute* "build.xml"
5760 (("\\$\\{test.home\\}/java") "${test.home}/")
5761 (("\\*Test.java") "Test*.java"))
5763 (add-before 'build 'generate-grammar
5765 (with-directory-excursion "src/org/stringtemplate/v4/compiler/"
5766 (every (lambda (file)
5767 (format #t "~a\n" file)
5768 (zero? (system* "antlr3" file)))
5769 '("STParser.g" "Group.g" "CodeGenerator.g"))))))))
5771 `(("antlr3" ,antlr3-bootstrap)
5773 ("java-stringtemplate" ,java-stringtemplate-3)
5774 ("java-junit" ,java-junit)))))
5776 (define java-stringtemplate-4.0.6
5777 (package (inherit java-stringtemplate)
5778 (name "java-stringtemplate")
5782 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/ST-"
5784 (file-name (string-append name "-" version ".tar.gz"))
5787 "0hjmh1ahdsh3w825i67mli9l4nncc4l6hdbf9ma91jvlj590sljp"))))
5789 `(("antlr3" ,antlr3-3.3)
5791 ("java-stringtemplate" ,java-stringtemplate-3)))))
5793 (define-public antlr3
5799 (uri (string-append "https://github.com/antlr/antlr3/archive/"
5801 (file-name (string-append name "-" version ".tar.gz"))
5804 "0218v683081lg54z9hvjxinhxd4dqp870jx6n39gslm0bkyi4vd6"))))
5805 (build-system ant-build-system)
5807 `(#:jar-name (string-append ,name "-" ,version ".jar")
5808 #:source-dir "tool/src/main/java:runtime/Java/src/main/java:tool/src/main/antlr3"
5811 (modify-phases %standard-phases
5812 (add-after 'install 'bin-install
5813 (lambda* (#:key inputs outputs #:allow-other-keys)
5814 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
5815 (bin (string-append (assoc-ref outputs "out") "/bin")))
5817 (with-output-to-file (string-append bin "/antlr3")
5820 (string-append "#!" (which "sh") "\n"
5821 "java -cp " jar "/" ,name "-" ,version ".jar:"
5823 (find-files (assoc-ref inputs "stringtemplate")
5827 (find-files (assoc-ref inputs "stringtemplate4")
5831 (find-files (string-append
5832 (assoc-ref inputs "antlr")
5835 " org.antlr.Tool $*"))))
5836 (chmod (string-append bin "/antlr3") #o755))))
5837 (add-before 'build 'generate-grammar
5839 (chdir "tool/src/main/antlr3/org/antlr/grammar/v3/")
5840 (for-each (lambda (file)
5843 (system* "antlr3" file))
5844 '("ANTLR.g" "ANTLRTreePrinter.g" "ActionAnalysis.g"
5845 "AssignTokenTypesWalker.g"
5846 "ActionTranslator.g" "TreeToNFAConverter.g"
5847 "ANTLRv3.g" "ANTLRv3Tree.g" "LeftRecursiveRuleWalker.g"
5848 "CodeGenTreeWalker.g" "DefineGrammarItemsWalker.g"))
5849 (substitute* "ANTLRParser.java"
5850 (("public Object getTree") "public GrammarAST getTree"))
5851 (substitute* "ANTLRv3Parser.java"
5852 (("public Object getTree") "public CommonTree getTree"))
5853 (chdir "../../../../../java")
5854 (system* "antlr" "-o" "org/antlr/tool"
5855 "org/antlr/tool/serialize.g")
5856 (substitute* "org/antlr/tool/LeftRecursiveRuleAnalyzer.java"
5857 (("import org.antlr.grammar.v3.\\*;") "import org.antlr.grammar.v3.*;
5858 import org.antlr.grammar.v3.ANTLRTreePrinter;"))
5859 (substitute* "org/antlr/tool/ErrorManager.java"
5860 (("case NO_SUCH_ATTRIBUTE_PASS_THROUGH:") ""))
5861 (chdir "../../../..")))
5862 (add-before 'build 'fix-build-xml
5864 (substitute* "build.xml"
5865 (("<exec") "<copy todir=\"${classes.dir}\">
5866 <fileset dir=\"tool/src/main/resources\">
5867 <include name=\"**/*.stg\"/>
5868 <include name=\"**/*.st\"/>
5869 <include name=\"**/*.sti\"/>
5870 <include name=\"**/STLexer.tokens\"/>
5872 </copy><exec")))))))
5875 ("antlr3" ,antlr3-bootstrap)))
5877 `(("junit" ,java-junit)
5878 ("stringtemplate" ,java-stringtemplate-3)
5879 ("stringtemplate4" ,java-stringtemplate)))
5881 `(("stringtemplate" ,java-stringtemplate-3)
5883 ("stringtemplate4" ,java-stringtemplate-4.0.6)))
5884 (home-page "http://www.antlr3.org")
5885 (synopsis "Framework for constructing recognizers, compilers, and translators")
5886 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
5887 is a language tool that provides a framework for constructing recognizers,
5888 compilers, and translators from grammatical descriptions containing Java, C#,
5889 C++, or Python actions. ANTLR provides excellent support for tree construction,
5890 tree walking, and translation.")
5891 (license license:bsd-3)))
5893 (define antlr3-bootstrap
5896 (name "antlr3-bootstrap")
5899 ("antlr3" ,antlr3-3.3)))
5901 `(("junit" ,java-junit)))))
5910 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
5911 "gh-pages/download/antlr-"
5915 "0qgg5vgsm4l1d6dj9pfbaa25dpv2ry2gny8ajy4vvgvfklw97b3m"))
5917 (search-patches "antlr3-3_3-fix-java8-compilation.patch"))))
5919 `(#:jar-name (string-append ,name "-" ,version ".jar")
5920 #:source-dir (string-join '("tool/src/main/java"
5921 "runtime/Java/src/main/java"
5922 "tool/src/main/antlr2"
5923 "tool/src/main/antlr3")
5925 #:tests? #f ; FIXME: tests seem to require maven plugin
5926 #:modules ((guix build ant-build-system)
5930 (modify-phases %standard-phases
5931 (add-after 'install 'bin-install
5932 (lambda* (#:key inputs outputs #:allow-other-keys)
5933 (let* ((out (assoc-ref outputs "out"))
5934 (jar (string-append out "/share/java"))
5935 (bin (string-append out "/bin")))
5937 (with-output-to-file (string-append bin "/antlr3")
5941 "#!" (which "sh") "\n"
5942 "java -cp " jar "/antlr3-3.3.jar:"
5944 (append (find-files (assoc-ref inputs "java-stringtemplate")
5946 (find-files (string-append (assoc-ref inputs "antlr")
5950 " org.antlr.Tool $*"))))
5951 (chmod (string-append bin "/antlr3") #o755)
5953 (add-before 'build 'generate-grammar
5955 (substitute* "tool/src/main/java/org/antlr/tool/Grammar.java"
5956 (("import org.antlr.grammar.v2.\\*;")
5957 "import org.antlr.grammar.v2.*;\n
5958 import org.antlr.grammar.v2.TreeToNFAConverter;\n
5959 import org.antlr.grammar.v2.DefineGrammarItemsWalker;\n
5960 import org.antlr.grammar.v2.ANTLRTreePrinter;"))
5962 (with-directory-excursion "tool/src/main/antlr2/org/antlr/grammar/v2/"
5963 (every (lambda (file)
5964 (format #t "~a\n" file)
5965 (zero? (system* "antlr" file)))
5966 '("antlr.g" "antlr.print.g" "assign.types.g"
5967 "buildnfa.g" "codegen.g" "define.g")))
5968 (with-directory-excursion "tool/src/main/antlr3/org/antlr/grammar/v3/"
5969 (every (lambda (file)
5970 (format #t "~a\n" file)
5971 (zero? (system* "antlr3" file)))
5972 '("ActionAnalysis.g" "ActionTranslator.g" "ANTLRv3.g"
5973 "ANTLRv3Tree.g"))))))
5974 (add-before 'build 'fix-build-xml
5976 (substitute* "build.xml"
5977 (("<exec") "<copy todir=\"${classes.dir}\">
5978 <fileset dir=\"tool/src/main/resources\">
5979 <include name=\"**/*.stg\"/>
5980 <include name=\"**/*.st\"/>
5981 <include name=\"**/*.sti\"/>
5982 <include name=\"**/STLexer.tokens\"/>
5988 ("antlr3" ,antlr3-3.1)))
5990 `(("junit" ,java-junit)))
5992 `(("java-stringtemplate" ,java-stringtemplate-3)
5994 ("antlr3" ,antlr3-3.1)))))
6002 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
6003 "gh-pages/download/antlr-"
6007 "0sfimc9cpbgrihz4giyygc8afgpma2c93yqpwb951giriri6x66z"))
6009 (search-patches "antlr3-3_1-fix-java8-compilation.patch"))))
6011 `(#:jar-name (string-append "antlr3-" ,version ".jar")
6012 #:source-dir "src:runtime/Java/src"
6015 (modify-phases %standard-phases
6016 (add-after 'install 'bin-install
6017 (lambda* (#:key inputs outputs #:allow-other-keys)
6018 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
6019 (bin (string-append (assoc-ref outputs "out") "/bin")))
6021 (with-output-to-file (string-append bin "/antlr3")
6024 (string-append "#!" (which "sh") "\n"
6025 "java -cp " jar "/antlr3-3.1-3.1.jar:"
6027 (find-files (assoc-ref inputs "stringtemplate")
6031 (find-files (string-append
6032 (assoc-ref inputs "antlr")
6035 " org.antlr.Tool $*"))))
6036 (chmod (string-append bin "/antlr3") #o755))))
6037 (add-before 'build 'generate-grammar
6039 (let ((dir "src/org/antlr/tool/"))
6040 (for-each (lambda (file)
6043 (invoke "antlr" "-o" dir (string-append dir file)))
6044 '("antlr.g" "antlr.print.g" "assign.types.g"
6045 "buildnfa.g" "define.g")))
6046 (format #t "codegen.g\n")
6047 (invoke "antlr" "-o" "src/org/antlr/codegen"
6048 "src/org/antlr/codegen/codegen.g")
6050 (add-before 'build 'fix-build-xml
6052 (substitute* "build.xml"
6053 (("<exec") "<copy todir=\"${classes.dir}\">
6054 <fileset dir=\"src\">
6055 <include name=\"**/*.stg\"/>
6056 <include name=\"**/*.st\"/>
6057 <include name=\"**/*.sti\"/>
6058 <include name=\"**/STLexer.tokens\"/>
6060 </copy><exec")))))))
6062 `(("antlr" ,antlr2)))
6064 `(("junit" ,java-junit)))
6066 `(("stringtemplate" ,java-stringtemplate-3)))))
6068 (define-public java-commons-cli-1.2
6069 ;; This is a bootstrap dependency for Maven2.
6071 (inherit java-commons-cli)
6075 (uri (string-append "mirror://apache/commons/cli/source/"
6076 "commons-cli-" version "-src.tar.gz"))
6079 "0rvfgzgv2pc1m091dfj3ih9ddsjjppr1f1wf0qmc3bk6b1kwv2dm"))))
6081 `(#:jar-name "commons-cli.jar"
6083 (modify-phases %standard-phases
6084 (add-before 'check 'fix-build-xml
6085 (lambda* (#:key inputs #:allow-other-keys)
6086 (substitute* "build.xml"
6087 (("dir=\"\\$\\{test.home\\}/java\"")
6088 "dir=\"${test.home}\""))
6091 `(("java-junit" ,java-junit)))))
6093 (define-public java-microemulator-cldc
6095 (name "java-microemulator-cldc")
6099 (uri (string-append "https://github.com/barteo/microemu/archive/"
6101 (string-map (lambda (c) (if (char=? c #\.) #\_ c))
6104 (file-name (string-append name "-" version ".tar.gz"))
6107 "1x1apmz38gkppxnwnygwmi12j54v4p258v8ddzn6dldkk7vak1ll"))))
6108 (build-system ant-build-system)
6110 `(#:jar-name "microemulator-cldc.jar"
6111 #:source-dir "microemu-cldc/src/main/java"
6112 #:tests? #f)); Requires even older software
6113 (home-page "https://github.com/barteo/microemu")
6114 (synopsis "J2ME CLDC emulator")
6115 (description "Microemulator is a Java 2 Micro Edition (J2ME) CLDC/MIDP
6116 Emulator. It allows to demonstrate MIDlet based applications in web browser
6117 applet and can be run as a standalone java application.")
6118 (license (list license:asl2.0
6120 license:lgpl2.1+))))
6122 (define-public java-datanucleus-javax-persistence
6124 (name "java-datanucleus-javax-persistence")
6128 (uri (string-append "https://github.com/datanucleus/"
6129 "javax.persistence/archive/javax.persistence-"
6130 version "-release.tar.gz"))
6133 "11jx0fjwgc2hhbqqgdd6m1pf2fplf9vslppygax0y1z5csnqjhpx"))))
6134 (build-system ant-build-system)
6136 `(#:jar-name "java-datanucleus-javax-persistence.jar"
6138 #:source-dir "src/main/java"
6139 #:tests? #f)); no tests
6140 (home-page "https://github.com/datanucleus/javax.persistence")
6141 (synopsis "JPA API")
6142 (description "This package contains a clean definition of JPA API intended
6143 for use with DataNucleus JPA since the JCP haven't provided an official JPA API
6144 jar. See @url{http://java.net/projects/jpa-spec/downloads} for the specification
6145 used to generate this API.")
6146 (license (list license:edl1.0 license:epl1.0))))
6148 (define-public java-osgi-cmpn
6150 (name "java-osgi-cmpn")
6154 (uri (string-append "http://central.maven.org/maven2/"
6155 "org/osgi/osgi.cmpn/" version "/osgi.cmpn-"
6156 version "-sources.jar"))
6159 "1lmb6xyrmkqdhv1kayf0514rlwq6ypvs4m44ibrck3snp8241wys"))))
6160 (build-system ant-build-system)
6162 `(#:jar-name "osgi-cmpn.jar"
6163 #:tests? #f)); no tests
6165 `(("annotation" ,java-osgi-annotation)
6166 ("core" ,java-osgi-core)
6167 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
6168 ("microemulator" ,java-microemulator-cldc)
6169 ("servlet" ,java-classpathx-servletapi)))
6170 (home-page "https://www.osgi.org")
6171 (synopsis "Compendium specification module of OSGi framework")
6173 "OSGi, for Open Services Gateway initiative framework, is a module system
6174 and service platform for the Java programming language. This package contains
6175 the compendium specification module, providing interfaces and classes for use
6176 in compiling bundles.")
6177 (license license:asl2.0)))
6179 (define-public java-osgi-service-component-annotations
6181 (name "java-osgi-service-component-annotations")
6185 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6186 "org.osgi.service.component.annotations/"
6187 version "/org.osgi.service.component.annotations-"
6188 version "-sources.jar"))
6191 "15rq9cmp4fpn74q44m4j35qsqmjf5lx3hcrk6pzvbhc08igic2f0"))))
6192 (build-system ant-build-system)
6194 `(#:jar-name "osgi-service-component-annotations.jar"
6195 #:tests? #f)); no tests
6197 `(("annotation" ,java-osgi-annotation)))
6198 (home-page "https://www.osgi.org")
6199 (synopsis "Support annotations for osgi-service-component")
6201 "OSGi, for Open Services Gateway initiative framework, is a module system
6202 and service platform for the Java programming language. This package contains
6203 the support annotations for osgi-service-component.")
6204 (license license:asl2.0)))
6206 (define-public java-osgi-dto
6208 (name "java-osgi-dto")
6212 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6213 "org.osgi.dto/" version "/org.osgi.dto-"
6214 version "-sources.jar"))
6217 "0f4bqjzadn0hwk6sd3h5gvbyfp3yci1s6r0v770cc15p0pg627yr"))))
6218 (build-system ant-build-system)
6220 `(#:jar-name "osgi-dto.jar"
6221 #:tests? #f)); no tests
6223 `(("annotation" ,java-osgi-annotation)))
6224 (home-page "https://www.osgi.org")
6225 (synopsis "Data Transfer Objects")
6227 "OSGi, for Open Services Gateway initiative framework, is a module system
6228 and service platform for the Java programming language. This package contains
6229 the Data Transfer Objects. It is easily serializable having only public fields
6230 of primitive types and their wrapper classes, Strings, and DTOs. List, Set,
6231 Map and array aggregates may also be used. The aggregates must only hold
6232 objects of the listed types or aggregates.")
6233 (license license:asl2.0)))
6235 (define-public java-osgi-resource
6237 (name "java-osgi-resource")
6241 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6242 "org.osgi.resource/"
6243 version "/org.osgi.resource-"
6244 version "-sources.jar"))
6247 "0hi0fsc5v99q22bd7lrkvpz1y0ds4w9arjldpwsrcpqvz2js7q2d"))))
6248 (build-system ant-build-system)
6250 `(#:jar-name "osgi-resource.jar"
6251 #:tests? #f)); no tests
6253 `(("annotation" ,java-osgi-annotation)
6254 ("dto" ,java-osgi-dto)))
6255 (home-page "https://www.osgi.org")
6256 (synopsis "OSGI Resource")
6258 "OSGi, for Open Services Gateway initiative framework, is a module system
6259 and service platform for the Java programming language. This package contains
6260 the definition of common types in osgi packages.")
6261 (license license:asl2.0)))
6263 (define-public java-osgi-namespace-contract
6265 (name "java-osgi-namespace-contract")
6269 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6270 "org.osgi.namespace.contract/"
6271 version "/org.osgi.namespace.contract-"
6272 version "-sources.jar"))
6275 "1iz4f2i0fvqrlq90ki9nfzcfpvy2av434ri25bglywqssx8mmp36"))))
6276 (build-system ant-build-system)
6278 `(("resource" ,java-osgi-resource)
6279 ("annotation" ,java-osgi-annotation)))
6281 `(#:jar-name "osgi-namespace-contract.jar"
6282 #:tests? #f)); no tests
6283 (home-page "https://www.osgi.org")
6284 (synopsis "Contract Capability and Requirement Namespace")
6286 "OSGi, for Open Services Gateway initiative framework, is a module system
6287 and service platform for the Java programming language. This package contains
6288 the names for the attributes and directives for a namespace with contracts.")
6289 (license license:asl2.0)))
6291 (define-public java-osgi-namespace-extender
6293 (name "java-osgi-namespace-extender")
6297 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6298 "org.osgi.namespace.extender/"
6299 version "/org.osgi.namespace.extender-"
6300 version "-sources.jar"))
6303 "0jgqiak2i05qv6j3gd33xlaifzzc0ylxxk376v2x0apfg3vvixmz"))))
6304 (build-system ant-build-system)
6306 `(("resource" ,java-osgi-resource)
6307 ("annotation" ,java-osgi-annotation)))
6309 `(#:jar-name "osgi-namespace-extendent.jar"
6310 #:tests? #f)); no tests
6311 (home-page "https://www.osgi.org")
6312 (synopsis "Extender Capability and Requirement Namespace")
6314 "OSGi, for Open Services Gateway initiative framework, is a module system
6315 and service platform for the Java programming language. This package contains
6316 the names for the attributes and directives for an extender namespace.")
6317 (license license:asl2.0)))
6319 (define-public java-osgi-namespace-service
6321 (name "java-osgi-namespace-service")
6325 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6326 "org.osgi.namespace.service/"
6327 version "/org.osgi.namespace.service-"
6328 version "-sources.jar"))
6331 "0qmw8n2449nkmm56d1znz9zhazb6ya3vsimd5bf5jg23zzhgl8c8"))))
6332 (build-system ant-build-system)
6334 `(("resource" ,java-osgi-resource)
6335 ("annotation" ,java-osgi-annotation)))
6337 `(#:jar-name "osgi-namespace-service.jar"
6338 #:tests? #f)); no tests
6339 (home-page "https://www.osgi.org")
6340 (synopsis "Service Capability and Requirement Namespace")
6342 "OSGi, for Open Services Gateway initiative framework, is a module system
6343 and service platform for the Java programming language. This package contains
6344 the names for the attributes and directives for a service namespace.")
6345 (license license:asl2.0)))
6347 (define-public java-osgi-util-function
6349 (name "java-osgi-util-function")
6353 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6354 "org.osgi.util.function/"
6355 version "/org.osgi.util.function-"
6356 version "-sources.jar"))
6359 "04l7j3hwmmj28w23m7paca0afzncs42j2mdr3liqq8kvp548sc6x"))))
6360 (build-system ant-build-system)
6362 `(#:jar-name "osgi-util-function.jar"
6363 #:tests? #f)); no tests
6365 `(("annotation" ,java-osgi-annotation)))
6366 (home-page "https://www.osgi.org")
6367 (synopsis "OSGI Util Function")
6369 "OSGi, for Open Services Gateway initiative framework, is a module system
6370 and service platform for the Java programming language. This package contains
6371 an interface for a function that accepts a single argument and produces a result.")
6372 (license license:asl2.0)))
6374 (define-public java-osgi-util-promise
6376 (name "java-osgi-util-promise")
6380 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6381 "org.osgi.util.promise/"
6382 version "/org.osgi.util.promise-"
6383 version "-sources.jar"))
6386 "0y34dwiflg1c4ahvkswpf9z02xph2sr9fm04ia5493x3lshpw22c"))))
6387 (build-system ant-build-system)
6389 `(#:jar-name "osgi-util-promise.jar"
6390 #:tests? #f)); no tests
6392 `(("annotation" ,java-osgi-annotation)
6393 ("function" ,java-osgi-util-function)))
6394 (home-page "https://www.osgi.org")
6395 (synopsis "Promise of a value")
6397 "OSGi, for Open Services Gateway initiative framework, is a module system
6398 and service platform for the Java programming language. This package contains
6399 an interface and utilitary classes for promises. A Promise represents a future
6400 value. It handles the interactions for asynchronous processing.")
6401 (license license:asl2.0)))
6403 (define-public java-osgi-service-metatype-annotations
6405 (name "java-osgi-service-metatype-annotations")
6409 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6410 "org.osgi.service.metatype.annotations/"
6411 version "/org.osgi.service.metatype.annotations-"
6412 version "-sources.jar"))
6415 "12rwm3349wk80vm88rcdgs4435m4jxkpkj5mrx326skkz2c6hyw6"))))
6416 (build-system ant-build-system)
6418 `(#:jar-name "osgi-service-metatype-annotations.jar"
6419 #:tests? #f)); no tests
6421 `(("annotation" ,java-osgi-annotation)))
6422 (home-page "https://www.osgi.org")
6423 (synopsis "Support annotations for metatype")
6425 "OSGi, for Open Services Gateway initiative framework, is a module system
6426 and service platform for the Java programming language. This package contains
6427 the support annotations for metatype.")
6428 (license license:asl2.0)))
6430 (define-public java-osgi-service-repository
6432 (name "java-osgi-service-repository")
6436 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6437 "org.osgi.service.repository/"
6438 version "/org.osgi.service.repository-"
6439 version "-sources.jar"))
6442 "1k41mhg7b58pd8nsghr2qwcjrxdnf1p9spsw9v11k4257g6rl06n"))))
6443 (build-system ant-build-system)
6445 `(#:jar-name "osgi-service-repository.jar"
6446 #:tests? #f)); no tests
6448 `(("annotation" ,java-osgi-annotation)
6449 ("promise" ,java-osgi-util-promise)
6450 ("resource" ,java-osgi-resource)))
6451 (home-page "https://www.osgi.org")
6452 (synopsis "OSGI service repository")
6454 "OSGi, for Open Services Gateway initiative framework, is a module system
6455 and service platform for the Java programming language. This package contains
6456 a repository service that contains resources.")
6457 (license license:asl2.0)))
6459 (define-public java-osgi-framework
6461 (name "java-osgi-framework")
6465 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6466 "org.osgi.framework/" version "/org.osgi.framework-"
6467 version "-sources.jar"))
6470 "1lwp2zfad3rybcc6q9bwz8xsgkc92ypzy5p6x54387f1qj65m73s"))))
6471 (build-system ant-build-system)
6473 `(#:jar-name "osgi-framework.jar"
6474 #:tests? #f)); no tests
6476 `(("annotation" ,java-osgi-annotation)
6477 ("resource" ,java-osgi-resource)
6478 ("dto" ,java-osgi-dto)))
6479 (home-page "https://www.osgi.org")
6480 (synopsis "OSGi framework")
6482 "OSGi, for Open Services Gateway initiative framework, is a module system
6483 and service platform for the Java programming language.")
6484 (license license:asl2.0)))
6486 (define-public java-osgi-service-log
6488 (name "java-osgi-service-log")
6492 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6493 "org.osgi.service.log/"
6494 version "/org.osgi.service.log-"
6495 version "-sources.jar"))
6498 "1029j30dzcwializzca0j3fkhwwz08kmmsha5agw1iccscimj6r0"))))
6499 (build-system ant-build-system)
6501 `(#:jar-name "osgi-service-log.jar"
6502 #:tests? #f)); no tests
6504 `(("java-osgi-framework" ,java-osgi-framework)))
6505 (home-page "https://www.osgi.org")
6506 (synopsis "Provides methods for bundles to write messages to the log")
6508 "OSGi, for Open Services Gateway initiative framework, is a module system
6509 and service platform for the Java programming language. This package contains
6511 (license license:asl2.0)))
6513 (define-public java-osgi-service-jdbc
6515 (name "java-osgi-service-jdbc")
6519 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6520 "org.osgi.service.jdbc/"
6521 version "/org.osgi.service.jdbc-"
6522 version "-sources.jar"))
6525 "11iln5v7bk469cgb9ddkrz9sa95b3733gqgaqw9xf5g6wq652yjz"))))
6526 (build-system ant-build-system)
6528 `(#:jar-name "osgi-service-jdbc.jar"
6529 #:tests? #f)); no tests
6530 (home-page "https://www.osgi.org")
6531 (synopsis "Factory for JDBC connection factories")
6533 "OSGi, for Open Services Gateway initiative framework, is a module system
6534 and service platform for the Java programming language. This package contains
6535 a factory for JDBC connection factories. There are 3 preferred connection
6536 factories for getting JDBC connections:
6539 @item @code{javax.sql.DataSource};
6540 @item @code{javax.sql.ConnectionPoolDataSource};
6541 @item @code{javax.sql.XADataSource}.
6543 (license license:asl2.0)))
6545 (define-public java-osgi-service-resolver
6547 (name "java-osgi-service-resolver")
6551 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6552 "org.osgi.service.resolver/"
6553 version "/org.osgi.service.resolver-"
6554 version "-sources.jar"))
6557 "1dzqn1ryfi2rq4zwsgp44bmj2wlfydjg1qbxw2b0z4xdjjy55vxd"))))
6558 (build-system ant-build-system)
6560 `(#:jar-name "osgi-service-resolver.jar"
6561 #:tests? #f)); no tests
6563 `(("annotation" ,java-osgi-annotation)
6564 ("resource" ,java-osgi-resource)))
6565 (home-page "https://www.osgi.org")
6566 (synopsis "OSGI Resolver service")
6568 "OSGi, for Open Services Gateway initiative framework, is a module system
6569 and service platform for the Java programming language. This package contains
6570 a resolver service that resolves the specified resources in the context supplied
6572 (license license:asl2.0)))
6574 (define-public java-osgi-util-tracker
6576 (name "java-osgi-util-tracker")
6580 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6581 "org.osgi.util.tracker/"
6582 version "/org.osgi.util.tracker-"
6583 version "-sources.jar"))
6586 "0c4fh9vxwzsx59r8dygda0gq2gx3z5vfhc3jsphlqwf5w0h403lz"))))
6587 (build-system ant-build-system)
6589 `(#:jar-name "osgi-util-tracker.jar"
6590 #:tests? #f)); no tests
6592 `(("framework" ,java-osgi-framework)
6593 ("annotation" ,java-osgi-annotation)))
6594 (home-page "https://www.osgi.org")
6595 (synopsis "Bundle tracking")
6597 "OSGi, for Open Services Gateway initiative framework, is a module system
6598 and service platform for the Java programming language. This package contains
6599 bundle tracking utility classes.")
6600 (license license:asl2.0)))
6602 (define-public java-osgi-service-cm
6604 (name "java-osgi-service-cm")
6608 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6609 "org.osgi.service.cm/"
6610 version "/org.osgi.service.cm-"
6611 version "-sources.jar"))
6614 "1z8kap48y3xi0ggj8v6czglfnpnd94mmismgi2wbqhj1nl5fzbp6"))))
6615 (build-system ant-build-system)
6617 `(#:jar-name "osgi-service-cm.jar"
6618 #:tests? #f)); no tests
6620 `(("framework" ,java-osgi-framework)
6621 ("annotation" ,java-osgi-annotation)))
6622 (home-page "https://www.osgi.org")
6623 (synopsis "OSGI Configuration Management")
6625 "OSGi, for Open Services Gateway initiative framework, is a module system
6626 and service platform for the Java programming language. This package contains
6627 utility classes for the configuration of services.")
6628 (license license:asl2.0)))
6630 (define-public java-osgi-service-packageadmin
6632 (name "java-osgi-service-packageadmin")
6636 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6637 "org.osgi.service.packageadmin/"
6638 version "/org.osgi.service.packageadmin-"
6639 version "-sources.jar"))
6642 "041mpxzi7g36wmcily6y4ccn3jx15akpdy8gmhyb7m98x7qfvn52"))))
6643 (build-system ant-build-system)
6645 `(#:jar-name "osgi-service-packageadmin.jar"
6646 #:tests? #f)); no tests
6648 `(("framework" ,java-osgi-framework)))
6649 (home-page "https://www.osgi.org")
6650 (synopsis "OSGI Package Administration")
6652 "OSGi, for Open Services Gateway initiative framework, is a module system
6653 and service platform for the Java programming language. This package contains
6654 the packageadmin service.")
6655 (license license:asl2.0)))
6657 (define-public java-ops4j-base-lang
6659 (name "java-ops4j-base-lang")
6663 (uri (string-append "https://github.com/ops4j/org.ops4j.base/"
6664 "archive/base-" version ".tar.gz"))
6667 "18hl3lpchgpv8yh5rlk39l2gif5dlfgb8gxjmncf39pr2dprkniw"))))
6668 (build-system ant-build-system)
6670 `(#:jar-name "java-ops4j-base-lang.jar"
6671 #:source-dir "ops4j-base-lang/src/main/java"
6672 #:tests? #f; no tests
6674 (modify-phases %standard-phases
6675 (add-before 'build 'add-test-file
6677 ;; That file is required by a test in ops4j-pax-exam-core-spi
6678 (mkdir-p "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang")
6679 (with-output-to-file "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang/pom.properties"
6683 "version=" ,version "\n"
6684 "groupId=org.ops4j.base"
6685 "artifactId=ops4j-base-lang\n")))))))))
6686 (home-page "https://ops4j1.jira.com/wiki/spaces/base/overview")
6687 (synopsis "Utility classes and extensions to be used in OPS4J projects")
6688 (description "OPS4J stands for Open Participation Software for Java. This
6689 package contains utilities and extensions related to @code{java.lang}.")
6690 (license license:asl2.0)))
6692 (define-public java-ops4j-base-monitors
6694 (inherit java-ops4j-base-lang)
6695 (name "java-ops4j-base-monitors")
6697 `(#:jar-name "java-ops4j-base-monitors.jar"
6698 #:source-dir "ops4j-base-monitors/src/main/java"
6699 #:tests? #f)); no tests
6701 `(("lang" ,java-ops4j-base-lang)))
6702 (description "OPS4J stands for Open Participation Software for Java. This
6703 package contains utilities and extensions related to monitoring.")))
6705 (define-public java-ops4j-base-io
6707 (inherit java-ops4j-base-lang)
6708 (name "java-ops4j-base-io")
6710 `(#:jar-name "java-ops4j-base-io.jar"
6711 #:source-dir "ops4j-base-io/src/main/java"
6712 #:test-dir "ops4j-base-io/src/test"
6714 (list "**/ListerTest.java")))
6716 `(("lang" ,java-ops4j-base-monitors)
6717 ("lang" ,java-ops4j-base-lang)))
6719 `(("junit" ,java-junit)
6720 ("hamcrest" ,java-hamcrest-core)))
6721 (description "OPS4J stands for Open Participation Software for Java. This
6722 package contains utilities and extensions related to handling streams and files.")))
6724 (define-public java-ops4j-base-util
6726 (inherit java-ops4j-base-lang)
6727 (name "java-ops4j-base-util")
6729 `(#:jar-name "java-ops4j-base-util.jar"
6730 #:source-dir "ops4j-base-util/src/main/java"
6731 #:test-dir "ops4j-base-util/src/test"))
6733 `(("lang" ,java-ops4j-base-lang)))
6735 `(("junit" ,java-junit)))
6736 (description "OPS4J stands for Open Participation Software for Java. This
6737 package contains utilities and extensions related to environment, i18n and
6740 (define-public java-ops4j-base-util-property
6742 (inherit java-ops4j-base-lang)
6743 (name "java-ops4j-base-util-property")
6745 `(#:jar-name "java-ops4j-base-util-property.jar"
6746 #:source-dir "ops4j-base-util-property/src/main/java"
6747 #:tests? #f)); no tests
6749 `(("lang" ,java-ops4j-base-lang)
6750 ("util" ,java-ops4j-base-util)))
6751 (description "OPS4J stands for Open Participation Software for Java. This
6752 package contains utilities and extensions related to resolving properties from
6753 different sources.")))
6755 (define-public java-ops4j-base-store
6757 (inherit java-ops4j-base-lang)
6758 (name "java-ops4j-base-store")
6760 `(#:jar-name "java-ops4j-base-store.jar"
6761 #:source-dir "ops4j-base-store/src/main/java"
6762 #:tests? #f)); no tests
6764 `(("lang" ,java-ops4j-base-lang)
6765 ("slf4j" ,java-slf4j-api)
6766 ("io" ,java-ops4j-base-io)))
6767 (description "OPS4J stands for Open Participation Software for Java. This
6768 package contains utilities for storing and retrieving data from an
6769 @code{InputStream}.")))
6771 (define-public java-ops4j-base-spi
6773 (inherit java-ops4j-base-lang)
6774 (name "java-ops4j-base-spi")
6776 `(#:jar-name "java-ops4j-base-spi.jar"
6777 #:source-dir "ops4j-base-spi/src/main/java"
6778 #:test-dir "ops4j-base-spi/src/test"))
6780 `(("junit" ,java-junit)
6781 ("hamcrest" ,java-hamcrest-core)))
6782 (description "OPS4J stands for Open Participation Software for Java. This
6783 package contains utilities for obtaining services via the Java SE 6
6784 @code{ServiceLoader}.")))
6786 (define-public java-aqute-bnd-annotation
6788 (name "java-aqute-bnd-annotation")
6792 (uri (string-append "https://github.com/bndtools/bnd/archive/"
6793 version ".REL.tar.gz"))
6794 (file-name (string-append name "-" version ".tar.gz"))
6797 "1ggyiq0as0f6cz333a0dh98j72kmvv5pf2s47v9554yh905lfqdl"))))
6798 (build-system ant-build-system)
6800 `(#:jar-name "java-aqute-bnd-annotation.jar"
6801 #:source-dir "biz.aQute.bnd.annotation/src"
6802 #:tests? #f)); empty test dir
6803 (home-page "http://bnd.bndtools.org/")
6804 (synopsis "Tools for OSGi")
6805 (description "Bnd is a swiss army knife for OSGi, it creates manifest
6806 headers based on analyzing the class code, it verifies the project settings,
6807 it manages project dependencies, gives diffs jars, and much more.")
6808 (license license:asl2.0)))
6810 (define-public java-aqute-libg
6812 (inherit java-aqute-bnd-annotation)
6813 (name "java-aqute-libg")
6815 `(#:jar-name "java-aqute-libg.jar"
6816 #:source-dir "aQute.libg/src"
6817 #:tests? #f)); FIXME: tests are in "aQute.libg/test", not in a java directory
6819 `(("slf4j" ,java-slf4j-api)
6820 ("osgi-annot" ,java-osgi-annotation)
6821 ("java-osgi-cmpn" ,java-osgi-cmpn)
6822 ("osgi" ,java-osgi-core)))))
6824 (define-public java-aqute-bndlib
6826 (inherit java-aqute-bnd-annotation)
6827 (name "java-aqute-bndlib")
6829 `(#:jar-name "java-bndlib.jar"
6830 #:source-dir "biz.aQute.bndlib/src"
6831 #:tests? #f)); no tests
6833 `(("slf4j" ,java-slf4j-api)
6834 ("osgi-annot" ,java-osgi-annotation)
6835 ("java-aqute-libg" ,java-aqute-libg)
6836 ("java-aqute-bnd-annotation" ,java-aqute-bnd-annotation)
6837 ("java-osgi-service-component-annotations" ,java-osgi-service-component-annotations)
6838 ("java-osgi-service-repository" ,java-osgi-service-repository)
6839 ("java-osgi-service-log" ,java-osgi-service-log)
6840 ("java-osgi-service-metatype-annotations" ,java-osgi-service-metatype-annotations)
6841 ("java-osgi-namespace-contract" ,java-osgi-namespace-contract)
6842 ("java-osgi-namespace-extender" ,java-osgi-namespace-extender)
6843 ("java-osgi-namespace-service" ,java-osgi-namespace-service)
6844 ("promise" ,java-osgi-util-promise)
6845 ("osgi" ,java-osgi-core)))))
6847 (define-public java-ops4j-pax-tinybundles
6849 (name "java-ops4j-pax-tinybundles")
6853 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.tinybundles/"
6854 "archive/tinybundles-" version ".tar.gz"))
6857 "0y0gq3pvv0iir2b885lmlwnvr724vv7vklzhhr4fs27d7mdkj871"))))
6859 `(#:jar-name "java-ops4j-pax-tinybundles.jar"
6860 #:source-dir "src/main/java"
6862 ;; Abstract base classes for other tests
6863 (list "**/BndTest.java" "**/CoreTest.java")
6865 (modify-phases %standard-phases
6866 (add-before 'check 'fix-version
6868 ;; This test has a reference to an old version of bndlib we are not
6869 ;; packaging. It uses the version referenced in pom.xml. We replace
6870 ;; it with our own version.
6871 (substitute* "src/test/java/org/ops4j/pax/tinybundles/bnd/BndTest.java"
6872 (("[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*")
6873 ,(package-version java-aqute-bndlib))))))))
6875 `(("lang" ,java-ops4j-base-lang)
6876 ("io" ,java-ops4j-base-io)
6877 ("store" ,java-ops4j-base-store)
6878 ("slf4j" ,java-slf4j-api)
6879 ("libg" ,java-aqute-libg)
6880 ("bndlib" ,java-aqute-bndlib)))
6882 `(("junit" ,java-junit)
6883 ("hamcrest" ,java-hamcrest-core)
6884 ("log4j" ,java-log4j-api)
6885 ("bndannotation" ,java-aqute-bnd-annotation)
6886 ("framework" ,java-osgi-framework)))
6887 (build-system ant-build-system)
6888 (home-page "https://ops4j1.jira.com/wiki/spaces/ops4j/pages/12060312/Tinybundles")
6889 (synopsis "Java APIs to create OSGi related artifacts")
6890 (description "Tinybundles is all about creating OSGi related artifacts like
6891 Bundles, Fragments and Deployment Packages with Java Api. It is very convinient
6892 to create such artifacts on-the-fly inside Tests (like in Pax Exam). On the
6893 other hand, this library can be a foundation of real end user tools that need
6894 to create those artifacts.")
6895 (license license:asl2.0)))
6897 (define-public java-ops4j-pax-exam-core
6899 (name "java-ops4j-pax-exam-core")
6903 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.exam2/"
6904 "archive/exam-reactor-" version ".tar.gz"))
6907 "08mzw8nkah3rj3vznlplnawspxhp61zgvb44ifqa1rni1cvbms2g"))))
6909 `(#:jar-name "java-ops4j-pax-exam-core.jar"
6910 #:source-dir "core/pax-exam/src/main/java"
6911 #:test-dir "core/pax-exam/src/test"))
6913 `(("slf4j" ,java-slf4j-api)
6914 ("lang" ,java-ops4j-base-lang)
6915 ("io" ,java-ops4j-base-io)
6916 ("util-property" ,java-ops4j-base-util-property)
6917 ("util-store" ,java-ops4j-base-store)
6918 ("java-osgi-core" ,java-osgi-core)))
6920 `(("junit" ,java-junit)
6921 ("hamcrest" ,java-hamcrest-core)))
6922 (build-system ant-build-system)
6923 (home-page "https://ops4j1.jira.com/wiki/spaces/PAXEXAM4/overview")
6924 (synopsis "In-Container Testing for OSGi, Java EE and CDI")
6925 (description "Pax Exam creates OSGi bundles for testing purposes. It lets
6926 the user take control of the OSGi framework, the test framework (e.g. JUnit) and
6927 the system under test at the same time.")
6928 (license license:asl2.0)))
6930 (define-public java-ops4j-pax-exam-core-spi
6932 (inherit java-ops4j-pax-exam-core)
6933 (name "java-ops4j-pax-exam-core-spi")
6935 `(#:jar-name "java-ops4j-pax-exam-spi.jar"
6936 #:source-dir "src/main/java"
6939 ;; Abstract base class, not a test
6940 "**/BaseStagedReactorTest.java"
6941 ;; Depends on org.mortbay.jetty.testwars:test-war-dump
6942 "**/WarBuilderTest.java")
6944 (modify-phases %standard-phases
6945 (add-before 'configure 'chdir
6947 ;; Tests assume we are in this directory
6948 (chdir "core/pax-exam-spi")))
6949 (add-before 'check 'fix-tests
6951 ;; One test checks that this file is present.
6952 (mkdir-p "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi")
6953 (with-output-to-file
6954 "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi/pom.properties"
6957 (string-append "artifactId = pax-exam-spi\n"
6958 "version = " ,(package-version java-ops4j-pax-exam-core-spi)))))
6959 ;; Maven puts compilation results in the target directory, while we
6960 ;; put them in the build directory.
6961 (substitute* '("src/test/java/org/ops4j/pax/exam/spi/war/WarBuilderTest.java"
6962 "src/test/java/org/ops4j/pax/exam/spi/war/WarTestProbeBuilderTest.java"
6963 "src/test/java/org/ops4j/pax/exam/spi/war/ZipBuilderTest.java")
6964 (("target") "build"))
6965 ;; One test is expected to fail, but it doesn't throw the expected exception
6966 (substitute* "src/test/java/org/ops4j/pax/exam/spi/reactors/BaseStagedReactorTest.java"
6967 (("AssertionError") "IllegalArgumentException")))))))
6969 `(("java-ops4j-pax-exam-core" ,java-ops4j-pax-exam-core)
6970 ("lang" ,java-ops4j-base-lang)
6971 ("monitors" ,java-ops4j-base-monitors)
6972 ("store" ,java-ops4j-base-store)
6973 ("io" ,java-ops4j-base-io)
6974 ("spi" ,java-ops4j-base-spi)
6975 ("osgi" ,java-osgi-core)
6976 ("slf4j" ,java-slf4j-api)
6977 ("tinybundles" ,java-ops4j-pax-tinybundles)))
6979 `(("mockito" ,java-mockito-1)
6980 ("junit" ,java-junit)
6981 ("hamcrest" ,java-hamcrest-core)
6982 ("cglib" ,java-cglib)
6983 ("objenesis" ,java-objenesis)
6984 ("asm" ,java-asm)))))
6986 (define-public java-ops4j-pax-exam-core-junit
6988 (inherit java-ops4j-pax-exam-core)
6989 (name "java-ops4j-pax-exam-core-junit")
6991 `(#:jar-name "ops4j-pax-exam-core-junit.jar"
6992 #:source-dir "drivers/pax-exam-junit4/src/main/java"
6993 #:tests? #f)); no tests
6995 `(("junit" ,java-junit)
6996 ("slf4j" ,java-slf4j-api)
6997 ("core" ,java-ops4j-pax-exam-core)
6998 ("spi" ,java-ops4j-pax-exam-core-spi)))
6999 (native-inputs '())))
7001 (define-public java-fasterxml-jackson-annotations
7003 (name "java-fasterxml-jackson-annotations")
7007 (uri (string-append "https://github.com/FasterXML/"
7008 "jackson-annotations/archive/"
7009 "jackson-annotations-" version ".tar.gz"))
7012 "0mr95xd0da6a4g95zvrl1ryk5n5zv2rc696w3xnsr5hxk2gicfc4"))))
7013 (build-system ant-build-system)
7015 `(#:jar-name "jackson-annotations.jar"
7016 #:source-dir "src/main/java"
7017 #:test-dir "src/test"))
7019 `(("junit" ,java-junit)))
7020 (home-page "https://github.com/FasterXML/jackson-annotations")
7021 (synopsis "General purpose annotations for the Jackson Data Processor")
7022 (description "This package contains general purpose annotations for the
7023 Jackson Data Processor, used on value and handler types. The only annotations
7024 not included are ones that require dependency to the Databind package.")
7025 (license license:asl2.0)))
7027 (define-public java-fasterxml-jackson-core
7029 (name "java-fasterxml-jackson-core")
7033 (uri (string-append "https://github.com/FasterXML/"
7034 "jackson-core/archive/"
7035 "jackson-core-" version ".tar.gz"))
7038 "159hsnk17jr1gyzkf01cxvsn45srnk37g949r7364qlsr527gjgd"))))
7039 (build-system ant-build-system)
7041 `(#:jar-name "jackson-core.jar"
7042 #:source-dir "src/main/java"
7043 #:test-dir "src/test"
7046 ;; Expected failure. pom.xml excludes these
7048 ;; Base classes that have no constructor for junit
7050 "**/ConcurrencyReadTest.java"
7051 "**/ManualCharAccessTest.java"
7052 "**/ManualCharAccessTest.java"
7053 "**/TrailingCommasTest.java"
7054 "**/AsyncMissingValuesInObjectTest.java"
7055 "**/AsyncMissingValuesInArrayTest.java")
7057 (modify-phases %standard-phases
7058 (add-before 'configure 'generate-PackageVersion.java
7060 (let* ((out "src/main/java/com/fasterxml/jackson/core/json/PackageVersion.java")
7061 (in (string-append out ".in")))
7064 (("@package@") "com.fasterxml.jackson.core.json")
7065 (("@projectversion@") ,version)
7066 (("@projectgroupid@") "com.fasterxml.jackson.core")
7067 (("@projectartifactid@") "jackson-core")))))
7068 (add-before 'build 'copy-resources
7070 (copy-recursively "src/main/resources"
7072 (add-before 'check 'copy-test-resources
7074 (copy-recursively "src/test/resources"
7075 "build/test-classes"))))))
7077 `(("junit" ,java-junit)
7078 ("hamcrest" ,java-hamcrest-core)))
7079 (home-page "https://github.com/FasterXML/jackson-core")
7082 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
7084 (define-public java-fasterxml-jackson-databind
7086 (name "java-fasterxml-jackson-databind")
7090 (uri (string-append "https://github.com/FasterXML/"
7091 "jackson-databind/archive/"
7092 "jackson-databind-" version ".tar.gz"))
7095 "1zd2cw4z6kdkbx8za96xh9pyicv2a2l7y0rkcx2fqd8hv6d47s08"))))
7096 (build-system ant-build-system)
7098 `(#:jar-name "jackson-databind.jar"
7099 #:source-dir "src/main/java"
7100 #:tests? #f; requires javax.measures for which I can't find a free implementation
7102 (modify-phases %standard-phases
7103 (add-before 'configure 'generate-PackageVersion.java
7105 (let* ((out "src/main/java/com/fasterxml/jackson/databind/cfg/PackageVersion.java")
7106 (in (string-append out ".in")))
7109 (("@package@") "com.fasterxml.jackson.databind.cfg")
7110 (("@projectversion@") ,version)
7111 (("@projectgroupid@") "com.fasterxml.jackson.databind")
7112 (("@projectartifactid@") "jackson-databind")))))
7113 (add-before 'build 'copy-resources
7115 (copy-recursively "src/main/resources" "build/classes"))))))
7117 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
7118 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)))
7119 (home-page "https://github.com/FasterXML/jackson-databind")
7120 (synopsis "Data-binding functionality and tree-model for the Jackson Data Processor")
7121 (description "This package contains the general-purpose data-binding
7122 functionality and tree-model for Jackson Data Processor. It builds on core
7123 streaming parser/generator package, and uses Jackson Annotations for
7125 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
7127 (define-public java-fasterxml-jackson-modules-base-jaxb
7129 (name "java-fasterxml-jackson-modules-base-jaxb")
7133 (uri (string-append "https://github.com/FasterXML/"
7134 "jackson-modules-base/archive/"
7135 "jackson-modules-base-" version ".tar.gz"))
7138 "1wws95xi8sppp6b0k2vvjdjyynl20r1a4dwrhai08lzlria6blp5"))))
7139 (build-system ant-build-system)
7141 `(#:jar-name "jackson-modules-base-jaxb.jar"
7142 #:source-dir "jaxb/src/main/java"
7143 #:test-dir "jaxb/src/test"
7145 ;; Base class for tests
7146 (list "**/BaseJaxbTest.java")
7148 (modify-phases %standard-phases
7149 (add-before 'configure 'generate-PackageVersion.java
7151 (let* ((out (string-append "jaxb/src/main/java/com/fasterxml/"
7152 "jackson/module/jaxb/PackageVersion.java"))
7153 (in (string-append out ".in")))
7156 (("@package@") "com.fasterxml.jackson.module.jaxb")
7157 (("@projectversion@") ,version)
7158 (("@projectgroupid@") "com.fasterxml.jackson.module.jaxb")
7159 (("@projectartifactid@") "jackson-module-jaxb")))))
7160 (add-before 'build 'copy-resources
7162 (copy-recursively "jaxb/src/main/resources" "build/classes"))))))
7164 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
7165 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
7166 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)))
7168 `(("java-junit" ,java-junit)))
7169 (home-page "https://github.com/FasterXML/jackson-modules-base")
7170 (synopsis "Jaxb annotations jackson module")
7171 (description "This package is the jaxb annotations module for jackson.")
7172 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
7174 (define-public java-snakeyaml
7176 (name "java-snakeyaml")
7180 (uri (string-append "https://bitbucket.org/asomov/snakeyaml/get/v"
7182 (file-name (string-append name "-" version ".tar.gz"))
7185 "0rf5ha6w0waz50jz2479jsrbgmd0dnx0gs337m126j5z7zlmg7mg"))))
7186 (build-system ant-build-system)
7188 `(#:jar-name "java-snakeyaml.jar"
7189 #:source-dir "src/main/java"
7190 ;; Tests require velocity, a cyclic dependency, and
7191 ;; java-spring-framework-context which is not packaged.
7193 (home-page "https://bitbucket.org/asomov/snakeyaml")
7194 (synopsis "YAML processor")
7195 (description "SnakeYAML is a YAML processor for the Java Virtual Machine.")
7196 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
7198 (define-public java-fasterxml-jackson-dataformat-yaml
7200 (name "java-fasterxml-jackson-dataformat-yaml")
7204 (uri (string-append "https://github.com/FasterXML/"
7205 "jackson-dataformats-text/archive/"
7206 "jackson-dataformats-text-" version ".tar.gz"))
7209 "1hikl06khaxbg439avf442qifcadap8w0lx13f0nnhp2vh3dkbz7"))))
7210 (build-system ant-build-system)
7212 `(#:jar-name "jackson-dataformat-yaml.jar"
7213 #:source-dir "yaml/src/main/java"
7214 #:test-dir "yaml/src/test"
7215 #:test-exclude (list "**/failing/**.java")
7217 (modify-phases %standard-phases
7218 (add-before 'configure 'generate-PackageVersion.java
7220 (let* ((out "yaml/src/main/java/com/fasterxml/jackson/dataformat/yaml/PackageVersion.java")
7221 (in (string-append out ".in")))
7224 (("@package@") "com.fasterxml.jackson.dataformat.yaml")
7225 (("@projectversion@") ,version)
7226 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.yaml")
7227 (("@projectartifactid@") "jackson-dataformat-yaml"))))))))
7229 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
7230 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
7231 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)
7232 ("java-snakeyaml" ,java-snakeyaml)))
7234 `(("junit" ,java-junit)
7235 ("hamcrest" ,java-hamcrest-core)
7236 ("java-ops4j-pax-exam-core-spi" ,java-ops4j-pax-exam-core-spi)
7237 ("java-ops4j-pax-exam-core-junit" ,java-ops4j-pax-exam-core-junit)
7238 ("java-ops4j-pax-exam" ,java-ops4j-pax-exam-core)))
7239 (home-page "https://github.com/FasterXML/jackson-dataformats-text")
7240 (synopsis "Yaml backend for Jackson")
7241 (description "Dataformat backends are used to support format alternatives
7242 to JSON, supported by default. This is done by sub-classing Jackson core
7244 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
7246 (define-public java-stax2-api
7248 (name "java-stax2-api")
7252 (uri (string-append "https://github.com/FasterXML/stax2-api/archive/"
7253 "stax2-api-" version ".tar.gz"))
7256 "1amc1si0l0hyyw2sawmnzy4hkna3z6fp195y4nm5m9wb9ld5awkq"))))
7257 (build-system ant-build-system)
7259 `(#:jar-name "java-stax2-api.jar"
7260 #:source-dir "src/main/java"
7261 #:tests? #f)); no tests
7262 (home-page "https://github.com/FasterXML/stax2-api")
7263 (synopsis "Stax2 API")
7264 (description "Stax2 API is an extension to basic Stax 1.0 API that adds
7265 significant new functionalities, such as full-featured bi-direction validation
7266 interface and high-performance Typed Access API.")
7267 (license license:bsd-2)))
7269 (define-public java-woodstox-core
7271 (name "java-woodstox-core")
7275 (uri (string-append "https://github.com/FasterXML/woodstox/archive/"
7276 "woodstox-core-" version ".tar.gz"))
7279 "1i7pdgb8jbw6gdy5kmm0l6rz109n2ns92pqalpyp24vb8vlvdfd4"))))
7280 (build-system ant-build-system)
7282 `(#:jar-name "woodstox.jar"
7284 (list "**/Base*.java" "failing/**")
7286 (modify-phases %standard-phases
7287 (add-before 'build 'remove-msv-dep
7289 ;; we don't need osgi, and it depends on msv
7290 (delete-file-recursively "src/main/java/com/ctc/wstx/osgi")
7291 ;; msv's latest release is from 2011 and we don't need it
7292 (delete-file-recursively "src/main/java/com/ctc/wstx/msv")
7293 (delete-file-recursively "src/test/java/wstxtest/osgi")
7294 (delete-file-recursively "src/test/java/wstxtest/msv")))
7295 (add-before 'build 'copy-resources
7297 (copy-recursively "src/main/resources" "build/classes"))))))
7299 `(("stax2" ,java-stax2-api)))
7301 `(("junit" ,java-junit)))
7302 (home-page "https://github.com/FasterXML/woodstox")
7303 (synopsis "Stax XML API implementation")
7304 (description "Woodstox is a stax XML API implementation.")
7305 (license license:asl2.0)))
7307 (define-public java-fasterxml-jackson-dataformat-xml
7309 (name "java-fasterxml-jackson-dataformat-xml")
7313 (uri (string-append "https://github.com/FasterXML/"
7314 "jackson-dataformat-xml/archive/"
7315 "jackson-dataformat-xml-" version ".tar.gz"))
7318 "111fkkl90w31jbf30kgj82qdcxlw4sxppki7i198liw0ck1jcavq"))))
7319 (build-system ant-build-system)
7321 `(#:jar-name "jackson-dataformat-xml.jar"
7322 #:source-dir "src/main/java"
7324 (list "**/failing/**")
7326 (modify-phases %standard-phases
7327 (add-before 'configure 'generate-PackageVersion.java
7329 (let* ((out "src/main/java/com/fasterxml/jackson/dataformat/xml/PackageVersion.java")
7330 (in (string-append out ".in")))
7334 (("@package@") "com.fasterxml.jackson.dataformat.xml")
7335 (("@projectversion@") ,version)
7336 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.xml")
7337 (("@projectartifactid@") "jackson-dataformat-xml")))))
7338 (add-before 'build 'copy-resources
7340 (copy-recursively "src/main/resources" "build/classes"))))))
7342 `(("jackson-annotations" ,java-fasterxml-jackson-annotations)
7343 ("jackson-core" ,java-fasterxml-jackson-core)
7344 ("jackson-modules-base-jaxb" ,java-fasterxml-jackson-modules-base-jaxb)
7345 ("jackson-databind" ,java-fasterxml-jackson-databind)
7346 ("stax2-api" ,java-stax2-api)
7347 ("woodstox" ,java-woodstox-core)))
7349 `(("junit" ,java-junit)
7350 ("hamcrest" ,java-hamcrest-core)))
7351 (home-page "https://github.com/FasterXML/jackson-dataformat-xml")
7352 (synopsis "Read and write XML")
7353 (description "This package contains Jackson extension component for reading
7354 and writing XML encoded data.
7356 Further, the goal is to emulate how JAXB data-binding works with \"Code-first\"
7357 approach (that is, no support is added for \"Schema-first\" approach). Support
7358 for JAXB annotations is provided by JAXB annotation module; this module
7359 provides low-level abstractions (@code{JsonParser}, @code{JsonGenerator},
7360 @code{JsonFactory}) as well as small number of higher level overrides needed to
7361 make data-binding work.")
7362 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
7364 (define-public java-hdrhistogram
7366 (name "java-hdrhistogram")
7370 (uri (string-append "https://github.com/HdrHistogram/HdrHistogram/"
7371 "archive/HdrHistogram-" version ".tar.gz"))
7374 "1sicbmc3sr42nw93qbkb26q9rn33ag33k6k77phjc3j5h5gjffqv"))))
7375 (build-system ant-build-system)
7377 `(#:jar-name "java-hdrhistogram.jar"
7378 #:source-dir "src/main/java"
7380 (modify-phases %standard-phases
7381 (add-before 'configure 'set-version
7383 (let* ((version-java "src/main/java/org/HdrHistogram/Version.java")
7384 (template (string-append version-java ".template")))
7385 (copy-file template version-java)
7386 (substitute* version-java
7387 (("\\$VERSION\\$") ,version)
7388 (("\\$BUILD_TIME\\$") "0"))
7391 `(("junit" ,java-junit)
7392 ("hamcrest" ,java-hamcrest-core)))
7393 (home-page "https://hdrhistogram.github.io/HdrHistogram")
7394 (synopsis "High dynamic range histogram")
7395 (description "Hdrhistogram allows to create histograms that support
7396 recording and analyzing sampled data value counts across a configurable integer
7397 value range with configurable value precision within the range. Value precision
7398 is expressed as the number of significant digits in the value recording, and
7399 provides control over value quantization behavior across the value range and
7400 the subsequent value resolution at any given level.")
7401 (license license:public-domain)))
7403 (define-public java-cofoja
7405 (name "java-cofoja")
7410 (url "https://github.com/nhatminhle/cofoja.git")
7411 (commit (string-append "v" version))))
7412 (file-name (string-append "java-cofoja-" version "-checkout"))
7415 "0p7sz8y5xgpi5rx1qwn6587fkd52qr3ha3ybh14gqcyxhikl525w"))))
7416 (build-system ant-build-system)
7418 `(#:build-target "dist"
7419 #:test-target "test"
7422 (list "-Ddist.dir=dist")
7423 #:modules ((guix build ant-build-system)
7424 (guix build java-utils)
7429 (modify-phases %standard-phases
7430 ;; The bulid system ignores the class path the ant-build-system sets
7431 ;; up and instead expects to find all dependencies in the "lib"
7433 (add-after 'unpack 'create-libdir
7434 (lambda* (#:key inputs #:allow-other-keys)
7438 (let ((target (string-append "lib/" (basename file))))
7439 (unless (file-exists? target)
7440 (symlink file target))))
7441 (append-map (match-lambda
7443 (find-files dir "\\.jar$")))
7446 (replace 'install (install-jars "dist")))))
7448 `(("java-asm" ,java-asm)))
7450 `(("java-junit" ,java-junit)))
7451 (home-page "https://github.com/nhatminhle/cofoja")
7452 (synopsis "Contracts for Java")
7453 (description "Contracts for Java, or Cofoja for short, is a contract
7454 programming framework and test tool for Java, which uses annotation processing
7455 and bytecode instrumentation to provide run-time checking. (In particular,
7456 this is not a static analysis tool.)")
7457 (license license:lgpl3+)))
7459 (define-public java-aopalliance
7461 (name "java-aopalliance")
7465 ;; Note: this git repository is not official, but contains the
7466 ;; source code that is in the CVS repository. Downloading the
7467 ;; tarball from sourceforge is undeterministic, and the cvs download
7470 (url "https://github.com/hoverruan/aopalliance")
7471 (commit "0d7757ae204e5876f69431421fe9bc2a4f01e8a0")))
7472 (file-name (string-append name "-" version))
7475 "0rsg2b0v3hxlq2yk1i3m2gw3xwq689j3cwx9wbxvqfpdcjbca0qr"))))
7476 (build-system ant-build-system)
7478 `(#:jar-name "java-aopalliance.jar"
7480 #:tests? #f; no tests
7481 #:source-dir "aopalliance/src/main"))
7482 (home-page "http://aopalliance.sourceforge.net")
7483 (synopsis "Aspect-Oriented Programming")
7484 (description "The AOP Alliance project is a joint project between several
7485 software engineering people who are interested in Aspect-Oriented Programming
7487 (license license:public-domain)))
7489 (define-public java-javax-inject
7491 (name "java-javax-inject")
7495 (uri (string-append "https://github.com/javax-inject/javax-inject/"
7496 "archive/javax.inject-" version ".tar.gz"))
7499 "1ydrlvh2r7vr1g7lhjwy3w2dggpj9h6pix1lakkkgdywb365n6g0"))))
7500 (build-system ant-build-system)
7502 `(#:jar-name "java-javax-inject.jar"
7504 #:tests? #f)); no tests
7505 (home-page "http://github.com/javax-inject/javax-inject")
7506 (synopsis "JSR-330: Dependency Injection for Java")
7507 (description "This package specifies a means for obtaining objects in such
7508 a way as to maximize reusability, testability and maintainability compared to
7509 traditional approaches such as constructors, factories, and service locators
7510 (e.g., JNDI). This process, known as dependency injection, is beneficial to
7511 most nontrivial applications.
7513 Many types depend on other types. For example, a @var{Stopwatch} might depend
7514 on a @var{TimeSource}. The types on which a type depends are known as its
7515 dependencies. The process of finding an instance of a dependency to use at run
7516 time is known as resolving the dependency. If no such instance can be found,
7517 the dependency is said to be unsatisfied, and the application is broken.")
7518 (license license:asl2.0)))
7520 (define-public java-guice
7526 (uri (string-append "https://github.com/google/guice/archive/"
7528 (file-name (string-append name "-" version ".tar.gz"))
7531 "0dwmqjzlavb144ywqqglj3h68hqszkff8ai0a42hyb5il0qh4rbp"))))
7532 (build-system ant-build-system)
7534 `(#:jar-name "java-guice.jar"
7536 #:tests? #f; FIXME: tests are not in a java sub directory
7537 #:source-dir "core/src"))
7539 `(("guava" ,java-guava)
7540 ("java-cglib" ,java-cglib)
7541 ("java-aopalliance" ,java-aopalliance)
7542 ("java-javax-inject" ,java-javax-inject)
7543 ("java-asm" ,java-asm)))
7544 (home-page "https://github.com/google/guice")
7545 (synopsis "Lightweight dependency injection framework")
7546 (description "Guice is a lightweight dependency injection framework fo
7548 (license license:asl2.0)))
7550 (define-public java-guice-servlet
7552 (inherit java-guice)
7553 (name "java-guice-servlet")
7555 `(#:jar-name "guice-servlet.jar"
7556 #:source-dir "extensions/servlet/src/"
7558 #:tests? #f)); FIXME: not in a java subdir
7560 `(("guice" ,java-guice)
7561 ("servlet" ,java-tomcat)
7562 ,@(package-inputs java-guice)))))
7564 (define-public java-assertj
7566 (name "java-assertj")
7570 (uri (string-append "https://github.com/joel-costigliola/"
7571 "assertj-core/archive/"
7572 "assertj-core-" version ".tar.gz"))
7575 "1kf124fxskf548rklkg86294w2x6ajqrff94rrhyqns31danqkfz"))))
7576 (build-system ant-build-system)
7578 `(#:jar-name "java-assertj.jar"
7580 #:source-dir "src/main/java"
7581 #:tests? #f)); depends on tng-junit which depends on assertj
7583 `(("cglib" ,java-cglib)
7584 ("junit" ,java-junit)
7585 ("hamcrest" ,java-hamcrest-core)))
7587 `(("mockito" ,java-mockito-1)))
7588 (home-page "https://joel-costigliola.github.io/assertj/index.html")
7589 (synopsis "Fluent assertions for java")
7590 (description "AssertJ core is a Java library that provides a fluent
7591 interface for writing assertions. Its main goal is to improve test code
7592 readability and make maintenance of tests easier.")
7593 (license license:asl2.0)))
7595 (define-public java-jboss-javassist
7597 (name "java-jboss-javassist")
7601 (uri (string-append "https://github.com/jboss-javassist/javassist/"
7603 (string-map (lambda (x) (if (eq? x #\.) #\_ x)) version)
7607 "10lpcr3sbf7y6fq6fc2h2ik7rqrivwcy4747bg0kxhwszil3cfmf"))))
7608 (build-system ant-build-system)
7610 `(#:jar-name "java-jboss-javassist.jar"
7612 #:source-dir "src/main"
7613 #:tests? #f; FIXME: requires junit-awtui and junit-swingui from junit3
7615 (modify-phases %standard-phases
7616 (add-before 'configure 'remove-binary
7618 (delete-file "javassist.jar")
7621 `(("junit" ,java-junit)))
7622 (home-page "https://github.com/jboss-javassist/javassist")
7623 (synopsis "Java bytecode engineering toolkit")
7624 (description "Javassist (JAVA programming ASSISTant) makes Java bytecode
7625 manipulation simple. It is a class library for editing bytecodes in Java; it
7626 enables Java programs to define a new class at runtime and to modify a class
7627 file when the JVM loads it.")
7628 (license (list license:gpl2 license:cddl1.0)))); either gpl2 only or cddl.
7630 (define-public java-jcommander
7632 (name "java-jcommander")
7636 (uri (string-append "https://github.com/cbeust/jcommander/archive/"
7638 (file-name (string-append name "-" version ".tar.gz"))
7641 "1f5k2ckay6qjc3d3w3d7bc0p3cx3c7n6p6zxvw1kibqdr0q98wlx"))))
7642 (build-system ant-build-system)
7644 `(#:jar-name "java-jcommander.jar"
7646 #:tests? #f; requires testng which depends on jcommander
7647 #:source-dir "src/main/java"))
7648 (home-page "http://jcommander.org")
7649 (synopsis "Command line parameters parser")
7650 (description "JCommander is a very small Java framework that makes it
7651 trivial to parse command line parameters. Parameters are declared with
7653 (license license:asl2.0)))
7655 (define-public java-bsh
7661 (uri (string-append "https://github.com/beanshell/beanshell/archive/"
7663 (file-name (string-append name "-" version ".tar.gz"))
7666 "1bawkxk6jyc75hxvzkpz689h73cn3f222m0ar3nvb0dal2b85kfv"))))
7667 (build-system ant-build-system)
7669 `(#:build-target "jarall"
7670 #:test-target "junit-tests-all"
7672 (modify-phases %standard-phases
7674 (lambda* (#:key outputs #:allow-other-keys)
7675 (let ((share (string-append (assoc-ref outputs "out") "/share/java")))
7677 (copy-file "dist/bsh-2.0b6.jar" (string-append share "/bsh-2.0b6.jar"))
7679 (home-page "http://beanshell.org/")
7680 (synopsis "Lightweight Scripting for Java")
7681 (description "BeanShell is a small, free, embeddable Java source
7682 interpreter with object scripting language features, written in Java.
7683 BeanShell dynamically executes standard Java syntax and extends it with common
7684 scripting conveniences such as loose types, commands, and method closures like
7685 those in Perl and JavaScript.")
7686 (license license:asl2.0)))
7688 (define-public java-fest-util
7690 (name "java-fest-util")
7694 (uri (string-append "https://github.com/alexruiz/fest-util/"
7695 "archive/fest-util-" version ".tar.gz"))
7698 "05g6hljz5mdaakk8d7g32klbhz9bdwp3qlj6rdaggdidxs3x1sb8"))))
7699 (build-system ant-build-system)
7701 `(#:jar-name "java-fest-util.jar"
7702 #:source-dir "src/main/java"))
7704 `(("junit" ,java-junit)
7705 ("hamcrest" ,java-hamcrest-core)))
7706 (home-page "https://github.com/alexruiz/fest-util")
7707 (synopsis "FEST common utilities")
7708 (description "Common utilities used in all FEST module.")
7709 (license license:asl2.0)))
7711 (define-public java-fest-test
7713 (name "java-fest-test")
7717 (uri (string-append "https://github.com/alexruiz/fest-test/"
7718 "archive/fest-test-" version ".tar.gz"))
7721 "1rxfbw6l9vc65iy1x3fb617qc6y4w2k430pgf1mfbxfdlxbm0f7g"))))
7722 (build-system ant-build-system)
7724 `(#:jar-name "java-fest-test.jar"
7725 #:source-dir "src/main/java"
7726 #:tests? #f)); no tests
7728 `(("junit" ,java-junit)))
7729 (home-page "https://github.com/alexruiz/fest-test")
7730 (synopsis "Common FEST testing infrastructure")
7731 (description "Fest-test contains the common FEST testing infrastructure.")
7732 (license license:asl2.0)))
7734 (define-public java-fest-assert
7736 (name "java-fest-assert")
7740 (uri (string-append "https://github.com/alexruiz/fest-assert-2.x/"
7741 "archive/fest-assert-core-" version ".tar.gz"))
7744 "1bi0iqavikzww6rxvz5jyg7y6bflv95s6ibryxx0xfcxrrw6i5lw"))))
7745 (build-system ant-build-system)
7747 `(#:jar-name "java-fest-assert.jar"
7748 #:source-dir "src/main/java"
7753 ;; Unable to set MockitoNamingPolicy on cglib generator which creates FastClasses
7754 "**/MessageFormatter_format_Test.java"
7755 "**/internal/*/*_assert*_Test.java")))
7757 `(("java-fest-util" ,java-fest-util)))
7759 `(("java-junit" ,java-junit)
7760 ("java-fest-test" ,java-fest-test)
7761 ("java-hamcrest-core" ,java-hamcrest-core)
7762 ("java-mockito" ,java-mockito-1)
7763 ("java-cglib" ,java-cglib)
7764 ("java-objenesis" ,java-objenesis)
7765 ("java-asm" ,java-asm)))
7766 (home-page "https://github.com/alexruiz/fest-assert-2.x")
7767 (synopsis "FEST fluent assertions")
7768 (description "FEST-Assert provides a fluent interface for assertions.")
7769 (license license:asl2.0)))
7771 (define-public java-testng
7773 (name "java-testng")
7778 (url "https://github.com/cbeust/testng.git")
7780 (file-name (string-append name "-" version "-checkout"))
7783 "0y6vq30i5g276kw0v2bhbvci22ijg7ax49ap2611yqlhbs4d6dqv"))))
7784 (build-system ant-build-system)
7786 `(#:jdk ,icedtea-8; java.util.function
7787 #:jar-name "java-testng.jar"
7788 #:source-dir "src/main/java"
7790 (modify-phases %standard-phases
7791 ;; FIXME: I don't know why these tests fail
7792 (add-after 'unpack 'delete-failing-tests
7794 (substitute* "src/test/resources/testng.xml"
7795 (("<class name=\"test.configuration.github1625.TestRunnerIssue1625\"/>") "")
7796 (("<class name=\"test.serviceloader.ServiceLoaderTest\" />") ""))
7798 ;; We don't have groovy
7799 (add-after 'unpack 'delete-groovy-tests
7801 (delete-file-recursively "src/test/java/test/dependent/issue1648/")
7802 (substitute* "src/test/resources/testng.xml"
7803 (("<class name=\"test.dependent.issue1648.TestRunner\"/>") ""))
7805 (add-before 'build 'copy-resources
7807 (copy-recursively "src/main/resources" "build/classes")
7809 (add-before 'check 'copy-test-resources
7811 (copy-recursively "src/test/resources" "build/test-classes")
7815 (system* "ant" "compile-tests")
7816 ;; we don't have groovy
7817 (substitute* "src/test/resources/testng.xml"
7818 (("<class name=\"test.groovy.GroovyTest\" />") ""))
7819 (zero? (system* "java" "-cp" (string-append (getenv "CLASSPATH")
7821 ":build/test-classes")
7822 "-Dtest.resources.dir=src/test/resources"
7823 "org.testng.TestNG" "src/test/resources/testng.xml")))))))
7825 `(("junit" ,java-junit)
7826 ("java-jsr305" ,java-jsr305)
7827 ("java-bsh" ,java-bsh)
7828 ("java-jcommander" ,java-jcommander)
7829 ("java-guice" ,java-guice)
7830 ("snakeyaml" ,java-snakeyaml)))
7832 `(("guava" ,java-guava)
7833 ("java-javax-inject" ,java-javax-inject)
7834 ("java-hamcrest" ,java-hamcrest-all)
7835 ("java-assertj" ,java-assertj)
7836 ("java-mockito" ,java-mockito-1)
7837 ("cglib" ,java-cglib)
7839 ("aopalliance" ,java-aopalliance)))
7840 (home-page "http://testng.org")
7841 (synopsis "Testing framework")
7842 (description "TestNG is a testing framework inspired from JUnit and NUnit
7843 but introducing some new functionalities that make it more powerful and easier
7845 (license license:asl2.0)))
7847 (define-public java-jnacl
7848 (let ((commit "094e819afdd63ea81a499b3bcb42a271006bebd9")
7852 (version (string-append "0.1.0-" revision "." (string-take commit 7)))
7856 (url "https://github.com/neilalexander/jnacl.git")
7858 (file-name (git-file-name name version))
7861 "1d6g6xhn83byv5943n7935wwjsk0ibk0qdvqgr699qqgqqmwisbb"))))
7862 (build-system ant-build-system)
7864 `(#:jar-name "jnacl.jar"
7865 #:source-dir "src/main/java"
7868 (modify-phases %standard-phases
7869 (add-before 'build 'fix-tests
7871 (substitute* '("src/test/java/com/neilalexander/jnacl/NaClTest.java"
7872 "src/test/java/com/neilalexander/jnacl/NaclSecretBoxTest.java")
7873 (("assertions.Assertions") "assertions.api.Assertions"))
7877 (invoke "ant" "compile-tests")
7878 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
7880 ":build/test-classes")
7881 "org.testng.TestNG" "-testclass"
7882 "build/test-classes/com/neilalexander/jnacl/NaclSecretBoxTest.class")
7883 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
7885 ":build/test-classes")
7886 "org.testng.TestNG" "-testclass"
7887 "build/test-classes/com/neilalexander/jnacl/NaClTest.class")
7890 `(("java-testng" ,java-testng)
7891 ("java-fest-util" ,java-fest-util)
7892 ("java-fest-assert" ,java-fest-assert)))
7893 (home-page "https://github.com/neilalexander/jnacl")
7894 (synopsis "Java implementation of NaCl")
7895 (description "Pure Java implementation of the NaCl: Networking and
7896 Cryptography library.")
7897 (license license:bsd-2))))
7899 (define-public java-mvel2
7905 (uri (string-append "https://github.com/mvel/mvel/archive/mvel2-"
7906 version ".Final.tar.gz"))
7909 "01ph5s9gm16l2qz58lg21w6fna7xmmrj7f9bzqr1jim7h9557d3z"))))
7910 (build-system ant-build-system)
7912 `(#:jar-name "mvel2.jar"
7913 #:source-dir "src/main/java"
7915 (list "**/Abstract*.java"
7916 ;; Base class with no tests
7917 "**/MVELThreadTest.java")
7919 (modify-phases %standard-phases
7920 (add-after 'install 'install-bin
7921 (lambda* (#:key outputs #:allow-other-keys)
7922 (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
7924 (with-output-to-file (string-append bin "/mvel2")
7928 "#!" (which "bash") "\n"
7929 "if [ \"$#\" -ne \"2\" ]; then\n"
7930 "echo 'Usage: mvel2 <script> <out.dir>'\n"
7933 "java -Dout.dir=$2 -cp " (getenv "CLASSPATH")
7934 ":" (assoc-ref outputs "out") "/share/java/mvel2.jar"
7935 " org.mvel2.sh.Main $1"))))
7936 (chmod (string-append bin "/mvel2") #o755))
7939 `(("junit" ,java-junit)
7940 ("hamcrest" ,java-hamcrest-core)))
7941 (home-page "https://github.com/mvel/mvel")
7942 (synopsis "MVFLEX Expression Language")
7943 (description "MVEL has largely been inspired by Java syntax, but has some
7944 fundamental differences aimed at making it more efficient as an expression
7945 language, such as operators that directly support collection, array and string
7946 matching, as well as regular expressions. MVEL is used to evaluate expressions
7947 written using Java syntax.
7949 In addition to the expression language, MVEL serves as a templating language for
7950 configuration and string construction.")
7951 (license license:asl2.0)))
7953 (define-public java-commons-jexl-2
7955 (name "java-commons-jexl")
7959 (uri (string-append "mirror://apache/commons/jexl/source/"
7960 "commons-jexl-" version "-src.tar.gz"))
7963 "1ai7632bwwaxglb0nbpblpr2jw5g20afrsaq372ipkphi3ncy1jz"))))
7964 (build-system ant-build-system)
7966 `(#:jar-name "commons-jexl-2.jar"
7968 #:source-dir "src/main/java"
7970 (modify-phases %standard-phases
7971 (add-before 'check 'disable-broken-tests
7972 (lambda* (#:key inputs #:allow-other-keys)
7973 (with-directory-excursion "src/test/java/org/apache/commons/jexl2/"
7974 (substitute* "ArithmeticTest.java"
7975 (("asserter.assertExpression\\(\"3 / 0\"") "//")
7976 (("asserter.assertExpression\\(\"imanull") "//"))
7977 ;; This test fails with "ambiguous method invocation"
7978 (delete-file "CacheTest.java")
7979 ;; This test doesn't have access to the temp directory
7980 (substitute* "ClassCreatorTest.java"
7981 (("java.io.tmpdir") "user.dir"))
7982 ;; This test fails in trying to detect whether it can run.
7983 (substitute* "ClassCreator.java"
7984 (("boolean canRun =.*") "boolean canRun = false;\n"))
7985 ;; ...and these tests depend on it.
7986 (delete-file "scripting/JexlScriptEngineOptionalTest.java")
7987 (delete-file "scripting/JexlScriptEngineTest.java"))
7989 (add-before 'build 'run-javacc
7991 (with-directory-excursion "src/main/java/org/apache/commons/jexl2/parser/"
7992 (invoke "java" "jjtree" "Parser.jjt")
7993 (invoke "java" "javacc" "Parser.jj"))
7996 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)))
7998 `(("java-junit" ,java-junit)
7999 ("java-hamcrest-core" ,java-hamcrest-core)
8000 ("javacc" ,javacc-4)))
8001 (home-page "https://commons.apache.org/proper/commons-jexl/")
8002 (synopsis "Java Expression Language ")
8003 (description "JEXL is a library intended to facilitate the implementation
8004 of dynamic and scripting features in applications and frameworks written in
8005 Java. JEXL implements an Expression Language based on some extensions to the
8006 JSTL Expression Language supporting most of the constructs seen in
8007 shell-script or ECMAScript. Its goal is to expose scripting features usable
8008 by technical operatives or consultants working with enterprise platforms.")
8009 (license license:asl2.0)))
8011 (define-public java-lz4
8017 (uri (string-append "https://github.com/lz4/lz4-java/archive/"
8019 (file-name (string-append name "-" version ".tar.gz"))
8022 "096dm57p2lzqk28n0j2p52x2j3cvnsd2dfqn43n7vbwrkjsy7y54"))))
8023 (build-system ant-build-system)
8025 `(#:jar-name "lz4.jar"
8027 #:source-dir "src/java:src/java-unsafe"
8028 #:tests? #f; FIXME: requires more dependencies
8030 (modify-phases %standard-phases
8031 (add-before 'configure 'generate-source
8033 (with-directory-excursion "src/build/source_templates"
8034 (invoke "mvel2" "../gen_sources.mvel" "../../java"))
8037 `(("mvel" ,java-mvel2)))
8038 (home-page "https://jpountz.github.io/lz4-java")
8039 (synopsis "Compression algorithm")
8040 (description "LZ4 - Java is a Java port of the popular lz4 compression
8041 algorithms and xxHash hashing algorithm.")
8042 (license license:asl2.0)))
8044 (define-public java-bouncycastle-bcprov
8046 (name "java-bouncycastle-bcprov")
8050 (uri "https://bouncycastle.org/download/bcprov-jdk15on-158.tar.gz")
8053 "1hgkg96llbvgs8i0krwz2n0j7wlg6jfnq8w8kg0cc899j0wfmf3n"))))
8054 (build-system ant-build-system)
8056 `(#:jar-name "bouncycastle-bcprov.jar"
8057 #:tests? #f; no tests
8060 (modify-phases %standard-phases
8061 (add-before 'configure 'unzip-src
8064 (with-directory-excursion "src"
8065 (invoke "unzip" "../src.zip"))
8069 ("junit" ,java-junit)))
8070 (home-page "https://www.bouncycastle.org")
8071 (synopsis "Cryptographic library")
8072 (description "Bouncy Castle Provider (bcprov) is a cryptographic library
8073 for the Java programming language.")
8074 (license license:expat)))
8076 (define-public java-bouncycastle-bcpkix
8078 (name "java-bouncycastle-bcpkix")
8082 (uri "https://bouncycastle.org/download/bcpkix-jdk15on-158.tar.gz")
8085 "0is7qay02803s9f7lhnfcjlz61ni3hq5d7apg0iil7nbqkbfbcq2"))))
8086 (build-system ant-build-system)
8088 `(#:jar-name "bouncycastle-bcpkix.jar"
8089 #:tests? #f; no tests
8092 (modify-phases %standard-phases
8093 (add-before 'configure 'unzip-src
8096 (with-directory-excursion "src"
8097 (invoke "unzip" "../src.zip"))
8101 ("junit" ,java-junit)))
8103 `(("bcprov" ,java-bouncycastle-bcprov)))
8104 (home-page "https://www.bouncycastle.org")
8105 (synopsis "Cryptographic library")
8106 (description "Bouncy Castle Java API for PKIX, CMS, EAC, TSP, PKCS, OCSP,
8108 (license license:expat)))
8110 (define-public java-lmax-disruptor
8112 (name "java-lmax-disruptor")
8116 (uri (string-append "https://github.com/LMAX-Exchange/disruptor/"
8117 "archive/" version ".tar.gz"))
8118 (file-name (string-append name "-" version ".tar.gz"))
8121 "17da2gwj5abnlsfgn2xqjk5lgzbg4vkb0hdv2dvc8r2fx4bi7w3g"))))
8122 (build-system ant-build-system)
8124 `(#:jar-name "java-lmax-disruptor.jar"
8126 #:tests? #f)); tests hang
8128 `(("junit" ,java-junit)
8129 ("java-hdrhistogram" ,java-hdrhistogram)
8130 ("java-jmock" ,java-jmock)
8131 ("java-jmock-legacy" ,java-jmock-legacy)
8132 ("java-jmock-junit4" ,java-jmock-junit4)
8133 ("java-hamcrest-all" ,java-hamcrest-all)))
8135 `(("cglib" ,java-cglib)
8136 ("objenesis" ,java-objenesis)
8138 (home-page "https://www.lmax.com/disruptor")
8139 (synopsis "High performance inter-thread communication")
8140 (description "LMAX Disruptor is a software pattern and software component
8141 for high performance inter-thread communication that avoids the need for
8142 message queues or resource locking.")
8143 (license license:asl2.0)))
8145 (define-public java-commons-bcel
8147 (name "java-commons-bcel")
8151 (uri (string-append "mirror://apache/commons/bcel/source/bcel-"
8152 version "-src.tar.gz"))
8155 "0j3x1rxd673k07psclk8k13rqh0x0mf2yy5qiwkiw4z3afa568jy"))))
8156 (build-system ant-build-system)
8158 `(#:jar-name "bcel.jar"
8160 #:source-dir "src/main/java"
8161 #:test-dir "src/test/java"
8162 ;; FIXME: Tests require the unpackaged jna.
8164 (home-page "https://commons.apache.org/proper/commons-bcel/")
8165 (synopsis "Byte code engineering library")
8166 (description "The Byte Code Engineering Library (Apache Commons BCEL) is
8167 intended to give users a convenient way to analyze, create, and
8168 manipulate (binary) Java class files. Classes are represented by objects
8169 which contain all the symbolic information of the given class: methods, fields
8170 and byte code instructions, in particular.
8172 Such objects can be read from an existing file, be transformed by a
8173 program (e.g. a class loader at run-time) and written to a file again. An
8174 even more interesting application is the creation of classes from scratch at
8175 run-time. The @dfn{Byte Code Engineering Library} (BCEL) may be also useful
8176 if you want to learn about the @dfn{Java Virtual Machine} (JVM) and the format
8177 of Java @code{.class} files.")
8178 (license license:asl2.0)))
8180 (define-public java-xerial-core
8182 (name "java-xerial-core")
8186 (uri (string-append "https://github.com/xerial/xerial-java/archive/"
8188 (file-name (string-append name "-" version ".tar.gz"))
8191 "0d3g863i41bgalpa4xr3vm1h140l091n8iwgq5qvby5yivns9y8d"))))
8192 (build-system ant-build-system)
8194 `(#:jar-name "xerial-core.jar"
8195 #:source-dir "xerial-core/src/main/java"
8196 #:test-dir "xerial-core/src/test"
8198 (modify-phases %standard-phases
8199 (add-before 'build 'copy-resources
8201 (copy-recursively "xerial-core/src/main/resources"
8205 `(("junit" ,java-junit)
8206 ("hamcrest" ,java-hamcrest-core)))
8207 (home-page "https://github.com/xerial/xerial-java")
8208 (synopsis "Data management libraries for Java")
8209 (description "Xerial is a set of data management libraries for the Java
8210 programming language. The ultimate goal of the Xerial project is to manage
8211 everything as database, including class objects, text format data, data
8213 (license license:asl2.0)))
8215 (define-public java-powermock-reflect
8217 (name "java-powermock-reflect")
8221 (uri (string-append "https://github.com/powermock/powermock/"
8222 "archive/powermock-" version ".tar.gz"))
8223 (file-name (string-append name "-" version ".tar.gz"))
8226 "0sbgi5vqq7k72wzcdjb20s370vyd4hsbnx71pzb8ishml3gy7fwy"))
8228 (search-patches "java-powermock-fix-java-files.patch"))))
8229 (build-system ant-build-system)
8231 `(#:jar-name "java-powermock-reflect.jar"
8233 #:source-dir "powermock-reflect/src/main/java"
8234 #:test-dir "powermock-reflect/src/test"))
8236 `(("java-objenesis" ,java-objenesis)))
8238 `(("junit" ,java-junit)
8239 ("cglib" ,java-cglib)
8241 ("hamcrest" ,java-hamcrest-core)
8242 ("assertj" ,java-assertj)))
8243 (home-page "https://github.com/powermock/powermock")
8244 (synopsis "Mock library extension framework")
8245 (description "PowerMock is a framework that extends other mock libraries
8246 such as EasyMock with more powerful capabilities. PowerMock uses a custom
8247 classloader and bytecode manipulation to enable mocking of static methods,
8248 constructors, final classes and methods, private methods, removal of static
8249 initializers and more. By using a custom classloader no changes need to be
8250 done to the IDE or continuous integration servers which simplifies adoption.")
8251 (license license:asl2.0)))
8253 (define-public java-powermock-core
8255 (inherit java-powermock-reflect)
8256 (name "java-powermock-core")
8258 `(#:jar-name "java-powermock-core.jar"
8259 #:source-dir "powermock-core/src/main/java"
8260 #:test-dir "powermock-core/src/test"
8261 #:tests? #f; requires powermock-api
8264 (modify-phases %standard-phases
8265 (add-before 'build 'copy-resources
8267 (copy-recursively "powermock-core/src/main/resources"
8268 "build/classes"))))))
8270 `(("reflect" ,java-powermock-reflect)
8271 ("javassist" ,java-jboss-javassist)))
8273 `(("junit" ,java-junit)
8274 ("assertj" ,java-assertj)
8275 ("mockito" ,java-mockito-1)))))
8277 (define-public java-powermock-api-support
8279 (inherit java-powermock-reflect)
8280 (name "java-powermock-api-support")
8281 (build-system ant-build-system)
8283 `(#:jar-name "java-powermock-api-support.jar"
8285 #:source-dir "powermock-api/powermock-api-support/src/main/java"
8286 #:tests? #f)); no tests
8288 `(("core" ,java-powermock-core)
8289 ("reflect" ,java-powermock-reflect)))))
8291 (define-public java-powermock-modules-junit4-common
8293 (inherit java-powermock-reflect)
8294 (name "java-powermock-modules-junit4-common")
8295 (build-system ant-build-system)
8297 `(#:jar-name "java-powermock-modules-junit4-common.jar"
8299 #:source-dir "powermock-modules/powermock-module-junit4-common/src/main/java"
8300 #:test-dir "powermock-modules/powermock-module-junit4-common/src/test"))
8302 `(("core" ,java-powermock-core)
8303 ("easymock" ,java-easymock)
8304 ("reflect" ,java-powermock-reflect)
8305 ("hamcrest" ,java-hamcrest-core)
8306 ("cglib" ,java-cglib)))))
8308 (define-public java-powermock-modules-junit4
8310 (inherit java-powermock-reflect)
8311 (name "java-powermock-modules-junit4")
8312 (build-system ant-build-system)
8314 `(#:jar-name "java-powermock-modules-junit4.jar"
8316 #:source-dir "powermock-modules/powermock-module-junit4/src/main/java"
8317 #:test-dir "powermock-modules/powermock-module-junit4/src/test"
8319 (modify-phases %standard-phases
8320 (add-before 'build 'fix-junit-detection
8322 ;; Our junit version is 4.12-SNAPSHOT
8323 (substitute* (find-files "powermock-modules/powermock-module-junit4"
8324 "PowerMockJUnit4MethodValidator.java")
8325 (("4.12") "4.12-SNAPSHOT")))))))
8327 `(("core" ,java-powermock-core)
8328 ("reflect" ,java-powermock-reflect)
8329 ("common" ,java-powermock-modules-junit4-common)
8330 ("cglib" ,java-cglib)))
8332 `(("easymock" ,java-easymock)
8333 ("hamcrest" ,java-hamcrest-core)
8334 ("objenesis" ,java-objenesis)
8336 ("junit" ,java-junit)))))
8338 (define-public java-powermock-api-easymock
8340 (inherit java-powermock-reflect)
8341 (name "java-powermock-api-easymock")
8342 (build-system ant-build-system)
8344 `(#:jar-name "java-powermock-api-easymock.jar"
8346 #:source-dir "powermock-api/powermock-api-easymock/src/main/java"
8347 #:tests? #f; no tests
8349 (modify-phases %standard-phases
8350 (add-before 'build 'fix-file
8352 ;; FIXME: This looks wrong, but it fixes a build error.
8353 (with-directory-excursion "powermock-api/powermock-api-easymock"
8354 (substitute* "src/main/java/org/powermock/api/easymock/PowerMock.java"
8355 (("classLoader instanceof MockClassLoader") "false")
8356 (("\\(\\(MockClassLoader\\) classLoader\\).*;") ";")))
8359 `(("core" ,java-powermock-core)
8360 ("easymock" ,java-easymock)
8361 ("reflect" ,java-powermock-reflect)
8362 ("support" ,java-powermock-api-support)
8363 ("cglib" ,java-cglib)))))
8365 (define-public java-jboss-jms-api-spec
8367 (name "java-jboss-jms-api-spec")
8371 (uri (string-append "https://github.com/jboss/jboss-jms-api_spec/"
8372 "archive/jboss-jms-api_" version
8373 "_spec-1.0.1.Final.tar.gz"))
8376 "07bqblw9kq2i8q92bz70fvavq5xjfkaixl8xa0m0cypjgy82rb7m"))))
8377 (build-system ant-build-system)
8379 `(#:jar-name "java-jboss-jms-api_spec.jar"
8382 #:tests? #f)); no tests
8383 (home-page "https://github.com/jboss/jboss-jms-api_spec")
8384 (synopsis "Java Message Service API specification")
8385 (description "Java Message Service (JMS) API is used to send messages
8386 messages between two or more clients. It is a messaging standard that allows
8387 application components to create, send, receive, and read messages.")
8388 ; either gpl2 only with GPL Classpath Exception, or cddl.
8389 (license (list license:gpl2 license:cddl1.0))))
8391 (define-public java-mail
8397 (uri (string-append "https://github.com/javaee/javamail/archive/"
8398 "JAVAMAIL-1_6_0.tar.gz"))
8401 "1b4rg7fpj50ld90a71iz2m4gm3f5cnw18p3q3rbrrryjip46kx92"))))
8402 (build-system ant-build-system)
8404 `(#:jar-name "java-mail.jar"
8406 #:source-dir "mail/src/main/java"
8407 #:test-dir "mail/src/test"
8409 (list "**/CollectorFormatterTest.java"
8410 "**/CompactFormatterTest.java"
8411 "**/DurationFilterTest.java"
8412 "**/MailHandlerTest.java"
8413 "**/GetLocalAddressTest.java"
8414 ;; FIXME: both end with:
8415 ;; java.lang.ClassNotFoundException:
8416 ;; javax.mail.internet.MimeMultipartParseTest
8417 "**/MimeMultipartParseTest.java"
8418 "**/SearchTermSerializationTest.java")
8420 (modify-phases %standard-phases
8421 (add-before 'configure 'move-version.java
8423 (copy-file "mail/src/main/resources/javax/mail/Version.java"
8424 "mail/src/main/java/javax/mail/Version.java")
8426 (add-before 'build 'copy-resources
8428 (copy-recursively "mail/src/main/resources/META-INF"
8429 "build/classes/META-INF")
8432 `(("junit" ,java-junit)
8433 ("hamcrest" ,java-hamcrest-core)))
8434 (home-page "https://javaee.github.io/javamail/")
8435 (synopsis "Mail-related functionnalities in Java")
8436 (description "The JavaMail API provides a platform-independent and
8437 protocol-independent framework to build mail and messaging applications.")
8438 ;; General Public License Version 2 only ("GPL") or the Common Development
8439 ;; and Distribution License("CDDL")
8440 (license (list license:cddl1.1
8441 license:gpl2)))); with classpath exception
8443 (define-public java-jeromq
8445 (name "java-jeromq")
8450 (url "https://github.com/zeromq/jeromq.git")
8451 (commit (string-append "v" version))))
8452 (file-name (string-append name "-" version "-checkout"))
8455 "1gxkp7lv2ahymgrqdw94ncq54bmp4m4sw5m1x9gkp7l5bxn0xsyj"))
8456 (patches (search-patches "java-jeromq-fix-tests.patch"))))
8457 (build-system ant-build-system)
8459 `(#:jar-name "java-jeromq.jar"
8460 #:source-dir "src/main/java"
8466 "**/ZBeaconTest.java"
8468 "**/DealerSpecTest.java"
8469 "**/CustomDecoderTest.java"
8470 "**/CustomEncoderTest.java"
8471 "**/ConnectRidTest.java"
8472 "**/ReqSpecTest.java"
8473 "**/PushPullSpecTest.java"
8474 "**/PubSubHwmTest.java"
8475 "**/RouterSpecTest.java"
8476 "**/ProxyTest.java")))
8478 `(("java-jnacl" ,java-jnacl)))
8480 `(("java-hamcrest-core" ,java-hamcrest-core)
8481 ("junit" ,java-junit)))
8482 (home-page "http://zeromq.org/bindings:java")
8483 (synopsis "Java binding for 0MQ")
8484 (description "Jeromq provides the java bindings for 0MQ.")
8485 (license license:mpl2.0)))
8487 (define-public java-kafka-clients
8489 (name "java-kafka-clients")
8493 (uri (string-append "mirror://apache/kafka/" version "/kafka-"
8494 version "-src.tgz"))
8497 "1yxmnsmliwm7671q5yy9bl4jdqyyn00n26cggz9brwczx80w1vfq"))))
8498 (build-system ant-build-system)
8500 `(#:jar-name "java-kafka-clients.jar"
8502 #:source-dir "clients/src/main/java"
8503 #:test-dir "clients/src/test"
8506 ;; This file does not contain a class
8507 "**/IntegrationTest.java"
8509 "**/ClientUtilsTest.java"
8510 ;; End with errors that seem related to our powermock
8511 "**/KafkaProducerTest.java"
8512 "**/BufferPoolTest.java")))
8514 `(("java-slf4j-api" ,java-slf4j-api)
8515 ("java-lz4" ,java-lz4)))
8517 `(("junit" ,java-junit)
8518 ("hamcrest" ,java-hamcrest-all)
8519 ("objenesis" ,java-objenesis)
8521 ("cglib" ,java-cglib)
8522 ("javassist" ,java-jboss-javassist)
8523 ("snappy" ,java-snappy)
8524 ("easymock" ,java-easymock)
8525 ("powermock" ,java-powermock-core)
8526 ("powermock-easymock" ,java-powermock-api-easymock)
8527 ("powermock-junit4-common" ,java-powermock-modules-junit4-common)
8528 ("powermock-junit4" ,java-powermock-modules-junit4)
8529 ("powermock-support" ,java-powermock-api-support)
8530 ("bouncycastle" ,java-bouncycastle-bcprov)
8531 ("bouncycastle-bcpkix" ,java-bouncycastle-bcpkix)))
8532 (home-page "https://kafka.apache.org")
8533 (synopsis "Distributed streaming platform")
8534 (description "Kafka is a distributed streaming platform, which means:
8536 @item it can publish and subscribe to streams of records;
8537 @item it can store streams of records in a fault-tolerant way;
8538 @item it can process streams of records as they occur.
8540 ;; Either cddl or gpl2 only.
8541 (license (list license:cddl1.1; actually cddl1.1
8542 license:gpl2)))); with classpath exception
8544 (define-public java-jdom
8550 (uri (string-append "http://jdom.org/dist/binary/archive/jdom-"
8554 "07wdpm3jwwc9q38kmdw40fvbmv6jzjrkrf8m0zqs58f79a672wfl"))))
8555 (build-system ant-build-system)
8557 `(#:build-target "package"
8558 #:tests? #f; tests are run as part of the build process
8560 (modify-phases %standard-phases
8562 (install-jars "build")))))
8563 (home-page "http://jdom.org/")
8564 (synopsis "Access, manipulate, and output XML data")
8565 (description "Java-based solution for accessing, manipulating, and
8566 outputting XML data from Java code.")
8567 (license license:bsd-4)))
8569 (define-public java-geronimo-xbean-reflect
8571 (name "java-geronimo-xbean-reflect")
8576 (url "https://svn.apache.org/repos/asf/geronimo/xbean/tags/xbean-4.5/")
8577 (revision 1807396)))
8578 (file-name (string-append name "-" version))
8581 "18q3i6jgm6rkw8aysfgihgywrdc5nvijrwnslmi3ww497jvri6ja"))))
8582 (build-system ant-build-system)
8584 `(#:jar-name "geronimo-xbean-reflect.jar"
8585 #:source-dir "xbean-reflect/src/main/java"
8586 #:test-dir "xbean-reflect/src/test"
8589 (list "**/Abstract*.java" "**/AsmParameterNameLoaderTest.java"
8590 "**/ObjectRecipeTest.java" "**/ParameterNameLoaderTest.java"
8591 "**/RecipeHelperTest.java" "**/XbeanAsmParameterNameLoaderTest.java")
8593 (modify-phases %standard-phases
8594 (add-before 'build 'fix-source
8596 (let ((dir "xbean-reflect/src/main/java/org/apache/xbean/recipe/"))
8597 ;; org.apache.xbean.asm6 is actually repackaged java-asm
8598 (substitute* (string-append dir "XbeanAsmParameterNameLoader.java")
8599 (("org.apache.xbean.asm5") "org.objectweb.asm"))
8603 ("log4j" ,java-log4j-api)
8604 ("log4j-1.2" ,java-log4j-1.2-api)
8605 ("log4j-core" ,java-log4j-core)
8606 ("logging" ,java-commons-logging-minimal)))
8608 `(("junit" ,java-junit)))
8609 (home-page "https://geronimo.apache.org/maven/xbean/3.6/xbean-reflect/")
8610 (synopsis "Dependency injection helper")
8611 (description "Xbean-reflect provides very flexible ways to create objects
8612 and graphs of objects for dependency injection frameworks")
8613 (license license:asl2.0)))
8615 (define-public java-geronimo-xbean-bundleutils
8617 (inherit java-geronimo-xbean-reflect)
8618 (name "java-geronimo-xbean-bundleutils")
8620 `(#:jar-name "geronimo-xbean-bundleutils.jar"
8621 #:source-dir "xbean-bundleutils/src/main/java"
8622 #:test-dir "xbean-bundleutils/src/test"
8624 (modify-phases %standard-phases
8625 (add-before 'build 'fix-java
8627 ;; We use a more recent version of osgi, so this file requires
8628 ;; more interface method implementations.
8629 (substitute* "xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/DelegatingBundleContext.java"
8630 (("import org.osgi.framework.ServiceRegistration;")
8631 "import org.osgi.framework.ServiceRegistration;
8632 import org.osgi.framework.ServiceFactory;
8633 import java.util.Collection;
8634 import org.osgi.framework.ServiceObjects;")
8635 (("public Bundle getBundle\\(\\)")
8637 public <S> ServiceObjects<S> getServiceObjects(ServiceReference<S> reference) {
8638 throw new UnsupportedOperationException();
8641 public <S> ServiceRegistration<S> registerService(Class<S> clazz,
8642 ServiceFactory<S> factory, Dictionary<String, ?> properties) {
8643 throw new UnsupportedOperationException();
8645 public Bundle getBundle()"))
8648 `(("java-slf4j" ,java-slf4j-api)
8649 ("java-asm" ,java-asm)
8650 ("java-osgi-framework" ,java-osgi-framework)
8651 ("java-eclipse-osgi" ,java-eclipse-osgi)
8652 ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin)))))
8654 (define-public java-geronimo-xbean-asm-util
8656 (inherit java-geronimo-xbean-reflect)
8657 (name "java-geronimo-xbean-asm-util")
8659 `(#:jar-name "geronimo-xbean-asm-util.jar"
8660 #:source-dir "xbean-asm-util/src/main/java"
8661 #:tests? #f)); no tests
8663 `(("java-asm" ,java-asm)))
8664 (native-inputs '())))
8666 (define-public java-geronimo-xbean-finder
8668 (inherit java-geronimo-xbean-reflect)
8669 (name "java-geronimo-xbean-finder")
8671 `(#:jar-name "geronimo-xbean-finder.jar"
8672 #:source-dir "xbean-finder/src/main/java"
8673 #:test-dir "xbean-finder/src/test"))
8675 `(("java-slf4j-api" ,java-slf4j-api)
8676 ("java-asm" ,java-asm)
8677 ("java-geronimo-xbean-bundleutils" ,java-geronimo-xbean-bundleutils)
8678 ("java-geronimo-xbean-asm-util" ,java-geronimo-xbean-asm-util)
8679 ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin)
8680 ("java-osgi-framework" ,java-osgi-framework)))
8682 `(("java-junit" ,java-junit)
8683 ("java-hamcrest-core" ,java-hamcrest-core)))))
8685 (define-public java-gson
8691 (uri (string-append "https://github.com/google/gson/archive/"
8692 "gson-parent-" version ".tar.gz"))
8695 "1j4qnp7v046q0k48c4kyf69sxaasx2h949d3cqwsm3kzxms3x0f9"))))
8696 (build-system ant-build-system)
8698 `(#:jar-name "gson.jar"
8699 #:source-dir "gson/src/main/java"
8700 #:test-dir "gson/src/test"))
8702 `(("java-junit" ,java-junit)
8703 ("java-hamcrest-core" ,java-hamcrest-core)))
8704 (home-page "https://github.com/google/gson")
8705 (synopsis "Java serialization/deserialization library from/to JSON")
8706 (description "Gson is a Java library that can be used to convert Java
8707 Objects into their JSON representation. It can also be used to convert a JSON
8708 string to an equivalent Java object. Gson can work with arbitrary Java objects
8709 including pre-existing objects that you do not have source-code of.")
8710 (license license:asl2.0)))
8712 (define-public java-hawtjni
8714 (name "java-hawtjni")
8718 (uri (string-append "https://github.com/fusesource/hawtjni/archive/"
8719 "hawtjni-project-" version ".tar.gz"))
8722 "1bqfd732rmh6svyx17fpw9175gc9gzkcbyps2yyrf50c3zzjas6g"))))
8723 (build-system ant-build-system)
8725 `(#:jar-name "hawtjni.jar"
8726 #:source-dir "hawtjni-generator/src/main/java:hawtjni-runtime/src/main/java"
8727 #:tests? #f; no tests
8729 (modify-phases %standard-phases
8730 (add-before 'build 'build-native
8731 (lambda* (#:key inputs #:allow-other-keys)
8732 (let ((include (string-append "-I" (assoc-ref inputs "jdk") "/include/linux")))
8733 (with-directory-excursion "hawtjni-generator/src/main/resources/"
8734 (invoke "gcc" "-c" "hawtjni.c" "-o" "hawtjni.o"
8735 "-fPIC" "-O2" include)
8736 (invoke "gcc" "-c" "hawtjni-callback.c" "-o" "hawtjni-callback.o"
8737 "-fPIC" "-O2" include)
8738 (invoke "gcc" "-o" "libhawtjni.so" "-shared"
8739 "hawtjni.o" "hawtjni-callback.o")))
8741 (add-after 'install 'install-native
8742 (lambda* (#:key outputs #:allow-other-keys)
8743 (let* ((out (assoc-ref outputs "out"))
8744 (lib (string-append out "/lib"))
8745 (inc (string-append out "/include")))
8746 (with-directory-excursion "hawtjni-generator/src/main/resources/"
8747 (install-file "libhawtjni.so" lib)
8748 (install-file "hawtjni.h" inc)))
8751 `(("java-commons-cli" ,java-commons-cli)
8752 ("java-asm" ,java-asm)
8753 ("java-geronimo-xbean-finder" ,java-geronimo-xbean-finder)))
8754 (home-page "https://fusesource.github.io/hawtjni/")
8755 (synopsis "JNI code generator")
8756 (description "HawtJNI is a code generator that produces the JNI code needed
8757 to implement Java native methods. It is based on the jnigen code generator
8758 that is part of the SWT Tools project.")
8759 (license license:asl2.0)))
8761 (define-public java-jansi-native
8763 (name "java-jansi-native")
8767 (uri (string-append "https://github.com/fusesource/jansi-native/"
8768 "archive/jansi-native-" version ".tar.gz"))
8771 "0j2ydlgxbzbgshqkwghbxxxnbnx1mmjgd6k5fw6xfvxw1z956yqf"))))
8772 (build-system ant-build-system)
8774 `(#:jar-name "jansi-native.jar"
8775 #:source-dir "src/main/java"
8776 #:tests? #f; no tests
8778 (modify-phases %standard-phases
8779 (add-before 'build 'build-native
8780 (lambda* (#:key inputs #:allow-other-keys)
8781 ;; there are more required files for windows in windows/
8782 (with-directory-excursion "src/main/native-package/src"
8783 (substitute* "jansi_ttyname.c"
8784 (("#include \"jansi_.*") ""))
8785 (invoke "gcc" "-c" "jansi_ttyname.c" "-o" "jansi_ttyname.o"
8786 (string-append "-I" (assoc-ref inputs "java-hawtjni")
8788 (string-append "-I" (assoc-ref inputs "jdk")
8791 (invoke "gcc" "-o" "libjansi.so" "-shared" "jansi_ttyname.o")
8793 (add-before 'build 'install-native
8795 (let ((dir (string-append "build/classes/META-INF/native/"
8796 ,(match (%current-system)
8797 ((or "i686-linux" "armhf-linux")
8799 ((or "x86_64-linux" "aarch64-linux")
8801 (install-file "src/main/native-package/src/libjansi.so" dir))
8803 (add-after 'install 'install-native
8804 (lambda* (#:key outputs #:allow-other-keys)
8805 (install-file "src/main/native-package/src/jansi.h"
8806 (string-append (assoc-ref outputs "out") "/include"))
8809 `(("java-hawtjni" ,java-hawtjni)))
8810 (home-page "https://fusesource.github.io/jansi/")
8811 (synopsis "Native library for jansi")
8812 (description "This package provides the native library for jansi, a small
8813 Java library that allows you to use ANSI escape sequences to format your
8815 (license license:asl2.0)))
8817 (define-public java-jansi
8823 (uri (string-append "https://github.com/fusesource/jansi/archive/"
8824 "jansi-project-" version ".tar.gz"))
8827 "11kh3144i3fzp21dpy8zg52mjmsr214k7km9p8ly0rqk2px0qq2z"))))
8828 (build-system ant-build-system)
8830 `(#:jar-name "jansi.jar"
8831 #:source-dir "jansi/src/main/java"
8832 #:test-dir "jansi/src/test"
8834 (modify-phases %standard-phases
8835 (add-after 'check 'clear-term
8837 (zero? (system* "echo" "-e" "\\e[0m")))))))
8839 `(("java-jansi-native" ,java-jansi-native)))
8841 `(("java-junit" ,java-junit)
8842 ("java-hamcrest-core" ,java-hamcrest-core)))
8843 (home-page "https://fusesource.github.io/jansi/")
8844 (synopsis "Portable ANSI escape sequences")
8845 (description "Jansi is a Java library that allows you to use ANSI escape
8846 sequences to format your console output which works on every platform.")
8847 (license license:asl2.0)))
8849 (define-public java-jboss-el-api-spec
8851 (name "java-jboss-el-api-spec")
8855 (uri (string-append "https://github.com/jboss/jboss-el-api_spec/"
8856 "archive/jboss-el-api_" version
8857 "_spec-1.0.7.Final.tar.gz"))
8860 "1j45ljxalwlibxl7g7iv952sjxkw275m8vyxxij8l6wdd5pf0pdh"))))
8861 (build-system ant-build-system)
8863 `(#:jar-name "java-jboss-el-api_spec.jar"
8866 `(("java-junit" ,java-junit)))
8867 (home-page "https://github.com/jboss/jboss-el-api_spec")
8868 (synopsis "JSR-341 expression language 3.0 API")
8869 (description "This package contains an implementation of the JSR-341
8870 specification for the expression language 3.0. It implements an expression
8871 language inspired by ECMAScript and XPath. This language is used with
8872 JavaServer Pages (JSP).")
8873 ;; Either GPL2 only or CDDL.
8874 (license (list license:gpl2 license:cddl1.1))))
8876 (define-public java-jboss-interceptors-api-spec
8878 (name "java-jboss-interceptors-api-spec")
8882 (uri (string-append "https://github.com/jboss/jboss-interceptors-api_spec/"
8883 "archive/jboss-interceptors-api_" version
8884 "_spec-1.0.0.Final.tar.gz"))
8887 "0wv8x0jp9a5qxlrgkhb5jdk2gr6vi87b4j4kjb8ryxiy9gn8g51z"))))
8888 (build-system ant-build-system)
8890 `(#:jar-name "java-jboss-interceptors-api_spec.jar"
8893 #:tests? #f)); no tests
8894 (home-page "https://github.com/jboss/jboss-interceptors-api_spec")
8895 (synopsis "Interceptors 1.2 API classes from JSR 318")
8896 (description "Java-jboss-interceptors-api-spec implements the Interceptors
8897 API. Interceptors are used to interpose on business method invocations and
8899 ;; Either GPL2 only or CDDL.
8900 (license (list license:gpl2 license:cddl1.1))))
8902 (define-public java-cdi-api
8904 (name "java-cdi-api")
8908 (uri (string-append "https://github.com/cdi-spec/cdi/archive/"
8910 (file-name (string-append name "-" version ".tar.gz"))
8913 "1iv8b8bp07c5kmqic14jsr868vycjv4qv02lf3pkgp9z21mnfg5y"))))
8914 (build-system ant-build-system)
8916 `(#:source-dir "api/src/main/java"
8917 #:jar-name "java-cdi-api.jar"
8918 #:test-dir "api/src/test"
8920 #:tests? #f)); Tests fail because we don't have a CDI provider yet
8922 `(("java-javax-inject" ,java-javax-inject)
8923 ("java-jboss-el-api-spec" ,java-jboss-el-api-spec)
8924 ("java-jboss-interceptors-api-spec" ,java-jboss-interceptors-api-spec)))
8926 `(("java-testng" ,java-testng)
8927 ("java-hamcrest-core" ,java-hamcrest-core)))
8928 (home-page "http://cdi-spec.org/")
8929 (synopsis "Contexts and Dependency Injection APIs")
8930 (description "Java-cdi-api contains the required APIs for Contexts and
8931 Dependency Injection (CDI).")
8932 (license license:asl2.0)))
8934 (define-public java-joda-convert
8936 (name "java-joda-convert")
8940 (uri (string-append "https://github.com/JodaOrg/joda-convert/archive/v"
8942 (file-name (string-append name "-" version ".tar.gz"))
8945 "0vp346xz7dh9br4q7xazhc7hvzf76a6hf95fki9bg67q5jr0kjh7"))))
8946 (build-system ant-build-system)
8948 `(#:jar-name (string-append ,name "-" ,version ".jar")
8949 #:source-dir "src/main/java"
8950 #:test-include (list "**/Test*.java")
8951 ;; Contains only interfaces and base classes (no test)
8952 #:test-exclude (list "**/test*/**.java")))
8954 `(("java-guava" ,java-guava)))
8956 `(("java-junit" ,java-junit)
8957 ("java-hamcrest-core" ,java-hamcrest-core)))
8958 (home-page "http://www.joda.org/joda-convert/")
8959 (synopsis "Conversion between Objects and Strings")
8960 (description "Joda-Convert provides a small set of classes to aid
8961 conversion between Objects and Strings. It is not intended to tackle the
8962 wider problem of Object to Object transformation.")
8963 (license license:asl2.0)))
8965 (define-public java-joda-time
8967 (name "java-joda-time")
8971 (uri (string-append "https://github.com/JodaOrg/joda-time/archive/v"
8973 (file-name (string-append name "-" version ".tar.gz"))
8976 "1i9x91mi7yg2pasl0k3912f1pg46n37sps6rdb0v1gs8hj9ppwc1"))))
8977 (build-system ant-build-system)
8979 `(#:jar-name "java-joda-time.jar"
8980 #:source-dir "src/main/java"
8981 #:test-include (list "**/Test*.java")
8982 ;; There is no runnable test in these files
8983 #:test-exclude (list "**/Test*Chronology.java" "**/Test*Field.java")
8985 (modify-phases %standard-phases
8986 (add-after 'build 'build-resources
8988 (mkdir-p "build/classes/org/joda/time/tz/data")
8989 (mkdir-p "build/classes/org/joda/time/format")
8990 ;; This will produce the following exception:
8991 ;; java.io.IOException: Resource not found: "org/joda/time/tz/data/ZoneInfoMap"
8992 ;; which is normal, because it doesn't exist yet. It still generates
8993 ;; the same file as in the binary one can find on maven.
8994 (invoke "java" "-cp"
8995 (string-append "build/classes:" (getenv "CLASSPATH"))
8996 "org.joda.time.tz.ZoneInfoCompiler"
8997 "-src" "src/main/java/org/joda/time/tz/src"
8998 "-dst" "build/classes/org/joda/time/tz/data"
8999 "africa" "antarctica" "asia" "australasia"
9000 "europe" "northamerica" "southamerica"
9001 "pacificnew" "etcetera" "backward" "systemv")
9002 (for-each (lambda (f)
9003 (copy-file f (string-append
9004 "build/classes/org/joda/time/format/"
9006 (find-files "src/main/java/org/joda/time/format" ".*.properties"))
9008 (add-before 'install 'regenerate-jar
9010 ;; We need to regenerate the jar file to add generated data.
9011 (delete-file "build/jar/java-joda-time.jar")
9012 (invoke "ant" "jar")))
9013 (add-before 'check 'copy-test-resources
9015 (mkdir-p "build/test-classes/org/joda/time/tz/data")
9016 (copy-file "src/test/resources/tzdata/ZoneInfoMap"
9017 "build/test-classes/org/joda/time/tz/data/ZoneInfoMap")
9018 (copy-recursively "src/test/resources" "build/test-classes")
9021 `(("java-joda-convert" ,java-joda-convert)))
9023 `(("java-junit" ,java-junit)
9024 ("java-hamcrest-core" ,java-hamcrest-core)
9025 ("tzdata" ,tzdata)))
9026 (home-page "http://www.joda.org/joda-time/")
9027 (synopsis "Replacement for the Java date and time classes")
9028 (description "Joda-Time is a replacement for the Java date and time
9029 classes prior to Java SE 8.")
9030 (license license:asl2.0)))
9032 (define-public java-xerces
9034 (name "java-xerces")
9039 (uri (string-append "mirror://apache/xerces/j/source/"
9040 "Xerces-J-src." version ".tar.gz"))
9042 (base32 "1006igwy2lqrmjvdk64v8dg6qbk9c29pm8xxx7r87n0vnpvmx6pm"))
9043 (patches (search-patches
9044 "java-xerces-xjavac_taskdef.patch"
9045 "java-xerces-build_dont_unzip.patch"
9046 "java-xerces-bootclasspath.patch"))))
9047 (build-system ant-build-system)
9049 `(#:tests? #f;; Test files are not present
9050 #:test-target "test"
9053 (modify-phases %standard-phases
9054 (add-after 'unpack 'create-build.properties
9055 (lambda* (#:key inputs #:allow-other-keys)
9056 (let ((jaxp (assoc-ref inputs "java-jaxp"))
9057 (resolver (assoc-ref inputs "java-apache-xml-commons-resolver")))
9058 (with-output-to-file "build.properties"
9061 "jar.jaxp = ~a/share/java/jaxp.jar~@
9062 jar.apis-ext = ~a/share/java/jaxp.jar~@
9063 jar.resolver = ~a/share/java/xml-resolver.jar~%"
9064 jaxp jaxp resolver)))
9065 ;; Make xerces use our version of jaxp in tests
9066 (substitute* "build.xml"
9068 (string-append jaxp "/share/java/jaxp.jar"))
9069 (("\\$\\{tools.dir\\}/\\$\\{jar.apis\\}")
9072 (replace 'install (install-jars "build")))))
9074 `(("java-apache-xml-commons-resolver" ,java-apache-xml-commons-resolver)
9075 ("java-jaxp" ,java-jaxp)))
9076 (home-page "https://xerces.apache.org/xerces2-j/")
9077 (synopsis "Validating XML parser for Java with DOM level 3 support")
9078 (description "The Xerces2 Java parser is the reference implementation of
9079 XNI, the Xerces Native Interface, and also a fully conforming XML Schema
9082 Xerces2-J supports the following standards and APIs:
9085 @item eXtensible Markup Language (XML) 1.0 Second Edition Recommendation
9086 @item Namespaces in XML Recommendation
9087 @item Document Object Model (DOM) Level 2 Core, Events, and Traversal and
9088 Range Recommendations
9089 @item Simple API for XML (SAX) 2.0.1 Core and Extension
9090 @item Java APIs for XML Processing (JAXP) 1.2.01
9091 @item XML Schema 1.0 Structures and Datatypes Recommendations
9092 @item Experimental implementation of the Document Object Model (DOM) Level 3
9093 Core and Load/Save Working Drafts
9094 @item Provides a partial implementation of the XML Inclusions (XInclude) W3C
9095 Candidate Recommendation
9098 Xerces is now able to parse documents written according to the XML 1.1
9099 Candidate Recommendation, except that it does not yet provide an option to
9100 enable normalization checking as described in section 2.13 of this
9101 specification. It also handles namespaces according to the XML Namespaces 1.1
9102 Candidate Recommendation, and will correctly serialize XML 1.1 documents if
9103 the DOM level 3 load/save API's are in use.")
9104 (license license:asl2.0)))
9106 (define-public java-jline
9112 (uri (string-append "https://github.com/jline/jline1/archive/jline-"
9116 "0bi3p6vrh7a6v0fbpb6rx9plpmx5zk3lr352xzdbz2jcxg499wir"))))
9117 (build-system ant-build-system)
9119 `(#:jar-name "jline.jar"
9120 #:source-dir "src/main/java"
9121 #:test-dir "src/test"
9123 (modify-phases %standard-phases
9124 (add-before 'build 'copy-resources
9126 (copy-recursively "src/main/resources" "build/classes")
9129 `(("java-junit" ,java-junit)))
9130 (home-page "https://jline.github.io")
9131 (synopsis "Console input handling library")
9132 (description "JLine is a Java library for handling console input. It is
9133 similar in functionality to BSD editline and GNU readline but with additional
9134 features that bring it on par with the Z shell line editor.")
9135 (license license:bsd-3)))
9137 (define-public java-xmlunit
9139 (name "java-xmlunit")
9143 (uri (string-append "https://github.com/xmlunit/xmlunit/archive/v"
9145 (file-name (string-append name "-" version ".tar.gz"))
9148 "035rivlnmwhfqj0fzviciv0bkh1h95ps1iwnh2kjcvdbk5nccm4z"))))
9149 (build-system ant-build-system)
9151 `(#:jar-name "java-xmlunit.jar"
9152 #:source-dir "xmlunit-core/src/main/java"
9153 #:test-dir "xmlunit-core/src/test"
9155 (modify-phases %standard-phases
9156 (add-before 'check 'copy-test-resources
9157 (lambda* (#:key inputs #:allow-other-keys)
9158 (copy-recursively (assoc-ref inputs "resources") "../test-resources")
9161 `(("java-junit" ,java-junit)
9162 ("java-mockito-1" ,java-mockito-1)
9163 ("java-hamcrest-all" ,java-hamcrest-all)
9164 ("java-objenesis" ,java-objenesis)
9165 ("java-asm" ,java-asm)
9166 ("java-cglib" ,java-cglib)
9171 (url "https://github.com/xmlunit/test-resources.git")
9172 (commit "a590d2ae865c3e0455691d76ba8eefccc2215aec")))
9173 (file-name "java-xmlunit-test-resources")
9176 "0r0glj37pg5l868yjz78gckr91cs8fysxxbp9p328dssssi91agr"))))))
9177 (home-page "http://www.xmlunit.org/")
9178 (synopsis "XML output testing")
9179 (description "XMLUnit provides you with the tools to verify the XML you
9180 emit is the one you want to create. It provides helpers to validate against
9181 an XML Schema, assert the values of XPath queries or compare XML documents
9182 against expected outcomes.")
9183 (license license:asl2.0)))
9185 (define-public java-xmlunit-legacy
9187 (inherit java-xmlunit)
9188 (name "java-xmlunit-legacy")
9190 `(#:jar-name "java-xmlunit-legacy.jar"
9191 #:source-dir "xmlunit-legacy/src/main/java"
9192 #:test-dir "xmlunit-legacy/src/test"))
9194 `(("java-xmlunit" ,java-xmlunit)
9195 ("java-junit" ,java-junit)))
9197 `(("java-mockito-1" ,java-mockito-1)))))
9199 (define-public java-openchart2
9201 (name "java-openchart2")
9205 (uri (string-append "http://download.approximatrix.com/openchart2/"
9206 "openchart2-" version ".source.zip"))
9209 "1xq96zm5r02n1blja0072jmmsifmxc40lbyfbnmcnr6mw42frh4g"))))
9210 (build-system ant-build-system)
9212 `(#:test-target "test"
9214 (modify-phases %standard-phases
9215 (add-after 'unpack 'fix-junit-errors
9217 (with-directory-excursion "unittest/src/com/approximatrix/charting/"
9218 (substitute* '("coordsystem/ticklocator/NumericXTickLocatorTest.java"
9219 "coordsystem/ticklocator/NumericYTickLocatorTest.java"
9220 "coordsystem/ticklocator/ObjectXTickLocatorTest.java"
9221 "model/DefaultChartDataModelConstraintsTest.java"
9222 "model/MultiScatterDataModelConstraintsTest.java"
9223 "model/threedimensional/DotPlotDataModelConstraintsTest.java")
9224 (("(assertEquals[^;]+);" before _)
9225 (string-append (string-drop-right before 2) ", 1E-6);"))))
9227 (replace 'install (install-jars ".")))))
9230 ("java-junit" ,java-junit)
9231 ("java-hamcrest-core" ,java-hamcrest-core)))
9232 (home-page "http://approximatrix.com/products/openchart2/")
9233 (synopsis "Simple plotting for Java")
9234 (description "Openchart2 provides a simple, yet powerful, interface for
9235 Java programmers to create two-dimensional charts and plots. The library
9236 features an assortment of graph styles, including advanced scatter plots, bar
9237 graphs, and pie charts.")
9238 (license license:lgpl2.1+)))