1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ricardo Wurmus <rekado@elephly.net>
3 ;;; Copyright © 2016 Leo Famulari <leo@famulari.name>
4 ;;; Copyright © 2016, 2017 Roel Janssen <roel@gnu.org>
5 ;;; Copyright © 2017, 2019, 2021 Carlo Zancanaro <carlo@zancanaro.id.au>
6 ;;; Copyright © 2017-2020 Julien Lepiller <julien@lepiller.eu>
7 ;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be>
8 ;;; Copyright © 2016, 2017, 2018 Alex Vong <alexvong1995@gmail.com>
9 ;;; Copyright © 2017, 2019, 2021 Tobias Geerinckx-Rice <me@tobias.gr>
10 ;;; Copyright © 2018, 2019 Gábor Boskovits <boskovits@gmail.com>
11 ;;; Copyright © 2018 Chris Marusich <cmmarusich@gmail.com>
12 ;;; Copyright © 2018, 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
13 ;;; Copyright © 2019, 2020, 2021 Björn Höfling <bjoern.hoefling@bjoernhoefling.de>
14 ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
15 ;;; Copyright © 2020 Raghav Gururajan <raghavgururajan@disroot.org>
16 ;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
17 ;;; Copyright © 2021 Vincent Legoll <vincent.legoll@gmail.com>
19 ;;; This file is part of GNU Guix.
21 ;;; GNU Guix is free software; you can redistribute it and/or modify it
22 ;;; under the terms of the GNU General Public License as published by
23 ;;; the Free Software Foundation; either version 3 of the License, or (at
24 ;;; your option) any later version.
26 ;;; GNU Guix is distributed in the hope that it will be useful, but
27 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
28 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
29 ;;; GNU General Public License for more details.
31 ;;; You should have received a copy of the GNU General Public License
32 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
34 (define-module (gnu packages java)
35 #:use-module ((guix licenses) #:prefix license:)
36 #:use-module (guix packages)
37 #:use-module (guix download)
38 #:use-module (guix hg-download)
39 #:use-module (guix git-download)
40 #:use-module (guix svn-download)
41 #:use-module ((guix build utils) #:select (alist-replace))
42 #:use-module (guix utils)
43 #:use-module (guix build-system ant)
44 #:use-module (guix build-system gnu)
45 #:use-module (guix build-system trivial)
46 #:use-module (gnu packages)
47 #:use-module (gnu packages attr)
48 #:use-module (gnu packages autotools)
49 #:use-module (gnu packages base)
50 #:use-module (gnu packages bash)
51 #:use-module (gnu packages certs)
52 #:use-module (gnu packages cpio)
53 #:use-module (gnu packages cups)
54 #:use-module (gnu packages compression)
55 #:use-module (gnu packages elf)
56 #:use-module (gnu packages fontutils)
57 #:use-module (gnu packages gawk)
58 #:use-module (gnu packages gettext)
59 #:use-module (gnu packages gl)
60 #:use-module (gnu packages ghostscript) ;lcms
61 #:use-module (gnu packages gnome)
62 #:use-module (gnu packages groovy)
63 #:use-module (gnu packages gtk)
64 #:use-module (gnu packages guile)
65 #:use-module (gnu packages icu4c)
66 #:use-module (gnu packages image)
67 #:use-module (gnu packages java-compression)
68 #:use-module (gnu packages libffi)
69 #:use-module (gnu packages linux) ;alsa
70 #:use-module (gnu packages maths)
71 #:use-module (gnu packages maven)
72 #:use-module (gnu packages maven-parent-pom)
73 #:use-module (gnu packages nss)
74 #:use-module (gnu packages onc-rpc)
75 #:use-module (gnu packages web)
76 #:use-module (gnu packages wget)
77 #:use-module (gnu packages pkg-config)
78 #:use-module (gnu packages perl)
79 #:use-module (gnu packages popt)
80 #:use-module (gnu packages kerberos)
81 #:use-module (gnu packages xml)
82 #:use-module (gnu packages xorg)
83 #:use-module (gnu packages texinfo)
84 #:use-module ((srfi srfi-1) #:select (fold alist-delete))
85 #:use-module (srfi srfi-11)
86 #:use-module (ice-9 match))
90 ;;; Java bootstrap toolchain.
93 ;; The Java bootstrap begins with Jikes, a Java compiler written in C++. We
94 ;; use it to build a simple version of GNU Classpath, the Java standard
95 ;; library. We chose version 0.93 because it is the last version that can be
96 ;; built with Jikes. With Jikes and this version of GNU Classpath we can
97 ;; build JamVM, a Java Virtual Machine. We build version 1.5.1 because it is
98 ;; the last version of JamVM that works with a version of GNU classpath that
99 ;; does not require ECJ. These three packages make up the bootstrap JDK.
101 ;; This is sufficient to build an older version of Ant, which is needed to
102 ;; build an older version of ECJ, an incremental Java compiler, both of which
103 ;; are written in Java.
105 ;; ECJ is needed to build the latest release (0.99) and the development
106 ;; version of GNU Classpath. The development version of GNU Classpath has
107 ;; much more support for Java 1.6 than the latest release, but we need to
108 ;; build 0.99 first to get a working version of javah. ECJ, the development
109 ;; version of GNU Classpath, and the latest version of JamVM make up the
110 ;; second stage JDK with which we can build the OpenJDK with the Icedtea 1.x
111 ;; build framework. We then build the more recent JDKs Icedtea 2.x and
114 (define-public libantlr3c
122 (string-append "https://www.antlr3.org/download/C/"
123 name "-" version ".tar.gz"))
125 (base32 "0lpbnb4dq4azmsvlhp6khq1gy42kyqyjv8gww74g5lm2y6blm4fa"))))
126 (build-system gnu-build-system)
128 `(#:configure-flags (list "--enable-debuginfo" "--disable-static")
129 #:phases (modify-phases %standard-phases
131 (lambda* (#:key build target native-inputs inputs outputs
132 (configure-flags '()) out-of-source? system
134 (let ((configure (assoc-ref %standard-phases 'configure))
135 (enable-64bit? (member system '("aarch64-linux"
138 (configure #:build build #:target target
139 #:native-inputs native-inputs
140 #:inputs inputs #:outputs outputs
141 #:configure-flags `(,(if enable-64bit?
145 #:out-of-source? out-of-source?)))))))
146 (synopsis "ANTLR C Library")
147 (description "LIBANTLR3C provides run-time C libraries for ANTLR3 (ANother
148 Tool for Language Recognition v3).")
149 (home-page "https://www.antlr3.org/")
150 (license license:bsd-3)))
158 (uri (string-append "mirror://sourceforge/jikes/Jikes/"
159 version "/jikes-" version ".tar.bz2"))
162 "1qqldrp74pzpy5ly421srqn30qppmm9cvjiqdngk8hf47dv2rc0c"))))
163 (build-system gnu-build-system)
164 (home-page "http://jikes.sourceforge.net/")
165 (synopsis "Compiler for the Java language")
166 (description "Jikes is a compiler that translates Java source files as
167 defined in The Java Language Specification into the bytecoded instruction set
168 and binary format defined in The Java Virtual Machine Specification.")
169 (license license:ibmpl1.0)))
172 ;; Last release is from 2014, with a few important commits afterwards.
173 (let ((commit "a4bd00df0199e78243847f06cc04ecaea31f8f08"))
176 (version (git-version "0.2.4" "1" commit))
180 (url "https://github.com/ninjudd/drip")
182 (file-name (git-file-name name version))
185 "0wzmjwfyldr3jn49517xd8yn7dgdk8h88qkga3kjyg1zc375ylg2"))))
186 (build-system gnu-build-system)
188 `(("jdk" ,icedtea "jdk")))
190 `(#:tests? #f ; No tests.
192 (modify-phases %standard-phases
194 (add-before 'install 'fix-wrapper
195 (lambda* (#:key inputs #:allow-other-keys)
196 (let ((jps (string-append (assoc-ref inputs "jdk") "/bin/jps")))
197 (substitute* "bin/drip"
199 (("brew update && brew upgrade drip") "guix pull && guix install drip")
201 (("\\(cd -- \"\\$drip_dir\" && make -s\\) \\|\\| exit 1") "")
202 ;; No need to include source:
203 (("\\[\\[ -r \\$drip_dir/src/org/flatland/drip/Main\\.java \\]\\]")
207 (lambda* (#:key outputs #:allow-other-keys)
208 (let* ((out (assoc-ref outputs "out"))
209 (bin (string-append out "/bin"))
210 (share (string-append out "/share/drip")))
214 (install-file (string-append "bin/" file) bin))
215 '("drip" "drip_daemon" "drip_proxy"))
216 (install-file "drip.jar" share)
217 (substitute* (string-append bin "/drip")
218 (("drip_dir=\\$bin_dir/..")
219 (string-append "drip_dir=" share)))
221 (home-page "https://github.com/ninjudd/drip")
222 (synopsis "Faster Java Virtual Machine launching")
223 (description "Drip is a launcher for the Java Virtual Machine that
224 provides much faster startup times than the @command{java} command. The @command{drip}
225 script is intended to be a drop-in replacement for the @command{java} command,
227 (license license:epl1.0))))
229 ;; This is the last version of GNU Classpath that can be built without ECJ.
230 (define classpath-bootstrap
236 (uri (string-append "mirror://gnu/classpath/classpath-"
240 "0i99wf9xd3hw1sj2sazychb9prx8nadxh2clgvk3zlmb28v0jbfz"))
241 (patches (search-patches "classpath-aarch64-support.patch"))))
242 (build-system gnu-build-system)
245 (list (string-append "JAVAC="
246 (assoc-ref %build-inputs "jikes")
251 "--disable-gconf-peer"
257 (modify-phases %standard-phases
258 ;; XXX: This introduces a memory leak as we remove a call to free up
259 ;; memory for the file name string. This was necessary because of a
260 ;; runtime error that would have prevented us from building
261 ;; ant-bootstrap later. See https://issues.guix.gnu.org/issue/36685
262 ;; for the gnarly details.
263 (add-after 'unpack 'remove-call-to-free
265 (substitute* "native/jni/java-io/java_io_VMFile.c"
266 (("result = cpio_isFileExists.*" m)
267 (string-append m "\n//")))
269 (add-after 'install 'install-data
270 (lambda _ (invoke "make" "install-data"))))))
275 ("pkg-config" ,pkg-config)))
276 (home-page "https://www.gnu.org/software/classpath/")
277 (synopsis "Essential libraries for Java")
278 (description "GNU Classpath is a project to create core class libraries
279 for use with runtimes, compilers and tools for the Java programming
281 ;; GPLv2 or later, with special linking exception.
282 (license license:gpl2+)))
284 ;; This is the last version of JamVM that works with a version of GNU
285 ;; classpath that does not require ECJ.
286 (define jamvm-1-bootstrap
292 (uri (string-append "mirror://sourceforge/jamvm/jamvm/"
293 "JamVM%20" version "/jamvm-"
295 (patches (search-patches "jamvm-1.5.1-aarch64-support.patch"
296 "jamvm-1.5.1-armv7-support.patch"))
299 "06lhi03l3b0h48pc7x58bk9my2nrcf1flpmglvys3wyad6yraf36"))
302 ;; Remove precompiled software.
303 (delete-file "lib/classes.zip")
305 (build-system gnu-build-system)
308 (list (string-append "--with-classpath-install-dir="
309 (assoc-ref %build-inputs "classpath"))
310 "--disable-int-caching"
311 "--enable-runtime-reloc-checks"
314 ,(if (string-prefix? "aarch64" (or (%current-system)
315 (%current-target-system)))
316 ;; Makefiles and the configure script need to be regenerated to
317 ;; incorporate support for AArch64.
318 '(modify-phases %standard-phases
320 (lambda _ (invoke "autoreconf" "-vif"))))
323 `(("classpath" ,classpath-bootstrap)
329 (if (string-prefix? "aarch64" (or (%current-system)
330 (%current-target-system)))
331 ;; Additional packages needed for autoreconf.
332 `(("autoconf" ,autoconf)
333 ("automake" ,automake)
334 ("libtool" ,libtool))
336 (home-page "http://jamvm.sourceforge.net/")
337 (synopsis "Small Java Virtual Machine")
338 (description "JamVM is a Java Virtual Machine conforming to the JVM
339 specification edition 2 (blue book). It is extremely small. However, unlike
340 other small VMs it supports the full spec, including object finalisation and
342 (license license:gpl2+)))
344 (define ant-bootstrap
346 (name "ant-bootstrap")
347 ;; The 1.10.x series requires Java 8. 1.9.0 and later use generics, which
348 ;; are not supported. The 1.8.x series is the last to use only features
349 ;; supported by Jikes.
353 (uri (string-append "mirror://apache/"
354 "ant/source/apache-ant-"
355 version "-src.tar.bz2"))
358 "1cg0lga887qz5iizh6mlkxp01lciymrhmp7wzxpl6zpnldxmzrjx"))))
359 (build-system gnu-build-system)
361 `(#:imported-modules ((guix build syscalls)
362 ,@%gnu-build-system-modules)
363 #:modules ((srfi srfi-1)
364 (guix build gnu-build-system)
366 (guix build syscalls))
367 #:tests? #f ; no "check" target
369 (modify-phases %standard-phases
373 (lambda* (#:key inputs #:allow-other-keys)
374 (setenv "JAVA_HOME" (assoc-ref inputs "jamvm"))
376 (string-append (assoc-ref inputs "jamvm")
379 (string-append (assoc-ref inputs "jikes")
382 (string-append (assoc-ref inputs "jamvm")
385 ;; Ant complains if this file doesn't exist.
386 (setenv "HOME" "/tmp")
387 (with-output-to-file "/tmp/.ant.properties"
388 (lambda _ (display "")))
390 ;; Use jikes instead of javac for <javac ...> tags in build.xml
391 (setenv "ANT_OPTS" "-Dbuild.compiler=jikes")
393 ;; jikes produces lots of warnings, but they are not very
394 ;; interesting, so we silence them.
395 (setenv "$BOOTJAVAC_OPTS" "-nowarn")
397 ;; Without these JamVM options the build may freeze.
398 (substitute* "bootstrap.sh"
399 (("^\"\\$\\{JAVACMD\\}\" " m)
400 ,@(if (string-prefix? "armhf" (or (%current-system)
401 (%current-target-system)))
402 `((string-append m "-Xnocompact "))
403 `((string-append m "-Xnocompact -Xnoinlining ")))))
405 ;; Disable tests because we are bootstrapping and thus don't have
406 ;; any of the dependencies required to build and run the tests.
407 (substitute* "build.xml"
408 (("depends=\"jars,test-jar\"") "depends=\"jars\""))
409 (invoke "bash" "bootstrap.sh"
410 (string-append "-Ddist.dir="
411 (assoc-ref %outputs "out")))))
412 (add-after 'build 'strip-jar-timestamps ;based on ant-build-system
413 (lambda* (#:key outputs #:allow-other-keys)
414 (define (repack-archive jar)
415 (let* ((dir (mkdtemp! "jar-contents.XXXXXX"))
416 (manifest (string-append dir "/META-INF/MANIFESTS.MF")))
417 (with-directory-excursion dir
418 (invoke "unzip" jar))
420 ;; XXX: copied from (gnu build install)
421 (for-each (lambda (file)
422 (let ((s (lstat file)))
423 (unless (eq? (stat:type s) 'symlink)
424 (utime file 0 0 0 0))))
425 (find-files dir #:directories? #t))
426 ;; It is important that the manifest appears first.
427 (with-directory-excursion dir
428 (let* ((files (find-files "." ".*" #:directories? #t))
429 ;; To ensure that the reference scanner can
430 ;; detect all store references in the jars
431 ;; we disable compression with the "-0" option.
432 (command (if (file-exists? manifest)
433 `("zip" "-0" "-X" ,jar ,manifest
435 `("zip" "-0" "-X" ,jar ,@files))))
436 (apply invoke command)))))
437 (for-each repack-archive
439 (string-append (assoc-ref %outputs "out") "/lib")
445 ("jamvm" ,jamvm-1-bootstrap)
448 (home-page "https://ant.apache.org")
449 (synopsis "Build tool for Java")
451 "Ant is a platform-independent build tool for Java. It is similar to
452 make but is implemented using the Java language, requires the Java platform,
453 and is best suited to building Java projects. Ant uses XML to describe the
454 build process and its dependencies, whereas Make uses Makefile format.")
455 (license license:asl2.0)))
457 ;; Version 3.2.2 is the last version without a dependency on a full-fledged
458 ;; compiler for Java 1.5.
459 (define ecj-bootstrap
461 (name "ecj-bootstrap")
465 (uri (string-append "http://archive.eclipse.org/eclipse/"
466 "downloads/drops/R-" version
467 "-200702121330/ecjsrc.zip"))
470 "05hj82kxd23qaglsjkaqcj944riisjha7acf7h3ljhrjyljx8307"))))
471 ;; It would be so much easier if we could use the ant-build-system, but we
472 ;; cannot as we don't have ant at this point. We use ecj for
473 ;; bootstrapping the JDK.
474 (build-system gnu-build-system)
476 `(#:modules ((guix build gnu-build-system)
479 #:tests? #f ; there are no tests
481 (modify-phases %standard-phases
483 (lambda* (#:key inputs #:allow-other-keys)
486 (cons (string-append (assoc-ref inputs "jamvm")
488 (find-files (string-append
489 (assoc-ref inputs "ant-bootstrap")
495 (lambda* (#:key inputs #:allow-other-keys)
496 ;; The unpack phase enters the "org" directory by mistake.
499 ;; Create a simple manifest to make ecj executable.
500 (with-output-to-file "manifest"
502 (display "Manifest-Version: 1.0
503 Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n")))
506 (and (apply invoke "jikes"
507 (find-files "." "\\.java$"))
508 (invoke "fastjar" "cvfm"
509 "ecj-bootstrap.jar" "manifest" "."))))
511 (lambda* (#:key outputs #:allow-other-keys)
512 (let ((share (string-append (assoc-ref outputs "out")
515 (install-file "ecj-bootstrap.jar" share)
518 `(("ant-bootstrap" ,ant-bootstrap)
521 ("jamvm" ,jamvm-1-bootstrap)
522 ("fastjar" ,fastjar)))
523 (home-page "https://eclipse.org")
524 (synopsis "Eclipse Java development tools core batch compiler")
525 (description "This package provides the Eclipse Java core batch compiler
526 for bootstrapping purposes. The @dfn{Eclipse compiler for Java} (ecj) is a
527 requirement for all GNU Classpath releases after version 0.93.")
528 (license license:epl1.0)))
530 (define ecj-javac-wrapper
531 (package (inherit ecj-bootstrap)
532 (name "ecj-javac-wrapper")
534 (build-system trivial-build-system)
536 `(#:modules ((guix build utils))
539 (use-modules (guix build utils))
540 (let* ((bin (string-append (assoc-ref %outputs "out") "/bin"))
541 (target (string-append bin "/javac"))
542 (guile (string-append (assoc-ref %build-inputs "guile")
544 (ecj (string-append (assoc-ref %build-inputs "ecj-bootstrap")
545 "/share/java/ecj-bootstrap.jar"))
546 (java (string-append (assoc-ref %build-inputs "jamvm")
548 (bootcp (let ((jvmlib (string-append (assoc-ref %build-inputs "classpath")
549 "/share/classpath")))
550 (string-append jvmlib "/glibj.zip:"
551 jvmlib "/tools.zip"))))
553 (with-output-to-file target
555 (format #t "#!~a --no-auto-compile\n!#\n" guile)
557 `(begin (use-modules (ice-9 match)
563 '(("-bootclasspath" ,bootcp)
568 (let ((classpath (getenv "CLASSPATH")))
570 (string-join (list ,ecj
571 ,(string-append (assoc-ref %build-inputs "jamvm")
575 (receive (vm-args other-args)
576 ;; Separate VM arguments from arguments to ECJ.
577 (partition (cut string-prefix? "-J" <>)
578 (fold (lambda (default acc)
579 (if (member (first default) acc)
580 acc (append default acc)))
584 ;; Remove "-J" prefix
585 (map (cut string-drop <> 2) vm-args)
586 '("org.eclipse.jdt.internal.compiler.batch.Main")
587 (cons "-nowarn" other-args)))))
589 (let ((args (cdr (command-line))))
591 (format (current-error-port) "javac: no arguments given!\n")
596 `(("guile" ,guile-2.2)
597 ("ecj-bootstrap" ,ecj-bootstrap)
598 ("jamvm" ,jamvm-1-bootstrap)
599 ("classpath" ,classpath-bootstrap)))
600 (description "This package provides a wrapper around the @dfn{Eclipse
601 compiler for Java} (ecj) with a command line interface that is compatible with
602 the standard javac executable.")))
604 ;; The classpath-bootstrap was built without a virtual machine, so it does not
605 ;; provide a wrapper for javah. We cannot build the development version of
606 ;; Classpath without javah.
607 (define classpath-0.99
608 (package (inherit classpath-bootstrap)
612 (uri (string-append "mirror://gnu/classpath/classpath-"
616 "1j7cby4k66f1nvckm48xcmh352b1d1b33qk7l6hi7dp9i9zjjagr"))
617 (patches (search-patches "classpath-aarch64-support.patch"))))
620 (list (string-append "--with-ecj-jar="
621 (assoc-ref %build-inputs "ecj-bootstrap")
622 "/share/java/ecj-bootstrap.jar")
623 (string-append "JAVAC="
624 (assoc-ref %build-inputs "ecj-javac-wrapper")
626 (string-append "JAVA="
627 (assoc-ref %build-inputs "jamvm")
630 "ac_cv_prog_java_works=yes" ; trust me
634 "--disable-gconf-peer"
640 (modify-phases %standard-phases
641 (add-after 'install 'install-data
642 (lambda _ (invoke "make" "install-data"))))))
644 `(("ecj-bootstrap" ,ecj-bootstrap)
645 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
647 ("jamvm" ,jamvm-1-bootstrap)
648 ("classpath" ,classpath-bootstrap)
650 ("pkg-config" ,pkg-config)))))
652 ;; We need this because classpath-bootstrap does not provide all of the tools
653 ;; we need to build classpath-devel.
654 (define classpath-jamvm-wrappers
655 (package (inherit classpath-0.99)
656 (name "classpath-jamvm-wrappers")
658 (build-system trivial-build-system)
660 `(#:modules ((guix build utils))
663 (use-modules (guix build utils))
664 (let* ((bash (assoc-ref %build-inputs "bash"))
665 (jamvm (assoc-ref %build-inputs "jamvm"))
666 (classpath (assoc-ref %build-inputs "classpath"))
667 (bin (string-append (assoc-ref %outputs "out")
670 (for-each (lambda (tool)
671 (with-output-to-file (string-append bin tool)
673 ,@(if (string-prefix? "armhf" (or (%current-system)
674 (%current-target-system)))
675 `((format #t "#!~a/bin/sh
676 ~a/bin/jamvm -Xnocompact -classpath ~a/share/classpath/tools.zip \
677 gnu.classpath.tools.~a.~a $@"
678 bash jamvm classpath tool
679 (if (string=? "native2ascii" tool)
680 "Native2ASCII" "Main")))
681 `((format #t "#!~a/bin/sh
682 ~a/bin/jamvm -Xnocompact -Xnoinlining -classpath ~a/share/classpath/tools.zip \
683 gnu.classpath.tools.~a.~a $@"
684 bash jamvm classpath tool
685 (if (string=? "native2ascii" tool)
686 "Native2ASCII" "Main"))))))
687 (chmod (string-append bin tool) #o755))
697 ("jamvm" ,jamvm-1-bootstrap)
698 ("classpath" ,classpath-0.99)))
700 (synopsis "Executables from GNU Classpath")
701 (description "This package provides wrappers around the tools provided by
702 the GNU Classpath library. They are executed by the JamVM virtual
705 ;; The last release of GNU Classpath is 0.99 and it happened in 2012. Since
706 ;; then Classpath has gained much more support for Java 1.6.
707 (define-public classpath-devel
708 (let ((commit "e7c13ee0cf2005206fbec0eca677f8cf66d5a103")
710 (package (inherit classpath-bootstrap)
711 (version (string-append "0.99-" revision "." (string-take commit 9)))
715 (url "https://git.savannah.gnu.org/git/classpath.git")
717 (file-name (string-append "classpath-" version "-checkout"))
720 "1v2rww76ww322mpg3s12a1kkc6gkp31bm9gcxs532h0wq285fiw4"))
721 (patches (search-patches "classpath-aarch64-support.patch"))))
724 ;; Ensure that the initial heap size is smaller than the maximum
725 ;; size. By default only Xmx is set, which can lead to invalid
726 ;; memory settings on some machines with a lot of memory.
727 '("JAVAC_MEM_OPT=-J-Xms512M -J-Xmx768M")
729 (list (string-append "--with-ecj-jar="
730 (assoc-ref %build-inputs "ecj-bootstrap")
731 "/share/java/ecj-bootstrap.jar")
732 (string-append "--with-javac="
733 (assoc-ref %build-inputs "ecj-javac-wrapper")
735 (string-append "JAVA="
736 (assoc-ref %build-inputs "jamvm")
739 "ac_cv_prog_java_works=yes" ; trust me
743 "--disable-gconf-peer"
749 (modify-phases %standard-phases
750 ;; XXX The bootstrap phase executes autogen.sh, which fails after
751 ;; complaining about the lack of gettext.
753 (lambda _ (invoke "autoreconf" "-vif")))
754 (add-after 'unpack 'remove-unsupported-annotations
756 (substitute* (find-files "java" "\\.java$")
759 (add-after 'install 'install-data
760 (lambda _ (invoke "make" "install-data"))))))
762 `(("autoconf" ,autoconf)
763 ("automake" ,automake)
765 ("gettext" ,gettext-minimal)
767 ("classpath-jamvm-wrappers" ,classpath-jamvm-wrappers) ; for javah
768 ("ecj-bootstrap" ,ecj-bootstrap)
769 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
771 ("jamvm" ,jamvm-1-bootstrap)
773 ("pkg-config" ,pkg-config))))))
776 (package (inherit jamvm-1-bootstrap)
780 (uri (string-append "mirror://sourceforge/jamvm/jamvm/"
781 "JamVM%20" version "/jamvm-"
785 "1nl0zxz8y5x8gwsrm7n32bry4dx8x70p8z3s9jbdvs8avyb8whkn"))
787 (search-patches "jamvm-2.0.0-disable-branch-patching.patch"
788 "jamvm-2.0.0-opcode-guard.patch"
789 "jamvm-2.0.0-aarch64-support.patch"))
792 ;; Remove precompiled software.
793 (delete-file "src/classlib/gnuclasspath/lib/classes.zip")
795 (build-system gnu-build-system)
797 (substitute-keyword-arguments (package-arguments jamvm-1-bootstrap)
798 ((#:configure-flags _)
799 '(list (string-append "--with-classpath-install-dir="
800 (assoc-ref %build-inputs "classpath"))))))
802 `(("classpath" ,classpath-devel)
803 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
807 (define ecj-javac-wrapper-final
808 (package (inherit ecj-javac-wrapper)
810 `(("guile" ,guile-2.2)
811 ("ecj-bootstrap" ,ecj-bootstrap)
813 ("classpath" ,classpath-devel)))))
815 ;; The bootstrap JDK consisting of jamvm, classpath-devel,
816 ;; ecj-javac-wrapper-final cannot build Icedtea 2.x directly, because it's
817 ;; written in Java 7. It can, however, build the unmaintained Icedtea 1.x,
818 ;; which uses Java 6 only.
819 (define-public icedtea-6
826 "http://icedtea.wildebeest.org/download/source/icedtea6-"
830 "0bg9sb4f7qbq77c0zf9m17p47ga0kf0r9622g9p12ysg26jd1ksg"))
831 (patches (search-patches
832 "icedtea-6-extend-hotspot-aarch64-support.patch"))
833 (modules '((guix build utils)))
836 (substitute* "Makefile.in"
837 ;; do not leak information about the build host
838 (("DISTRIBUTION_ID=\"\\$\\(DIST_ID\\)\"")
839 "DISTRIBUTION_ID=\"\\\"guix\\\"\""))
841 (build-system gnu-build-system)
842 (outputs '("out" ; Java Runtime Environment
843 "jdk" ; Java Development Kit
844 "doc")) ; all documentation
846 `(;; There are many failing tests and many are known to fail upstream.
849 ;; The DSOs use $ORIGIN to refer to each other, but (guix build
850 ;; gremlin) doesn't support it yet, so skip this phase.
851 #:validate-runpath? #f
853 #:modules ((guix build utils)
854 (guix build gnu-build-system)
858 `("--enable-bootstrap"
861 ,(string-append "--with-parallel-jobs="
862 (number->string (parallel-job-count)))
863 "--disable-downloading"
865 ,(string-append "--with-ecj="
866 (assoc-ref %build-inputs "ecj")
867 "/share/java/ecj-bootstrap.jar")
868 ,(string-append "--with-jar="
869 (assoc-ref %build-inputs "fastjar")
871 ,(string-append "--with-jdk-home="
872 (assoc-ref %build-inputs "classpath"))
873 ,(string-append "--with-java="
874 (assoc-ref %build-inputs "jamvm")
877 (modify-phases %standard-phases
879 (lambda* (#:key source inputs #:allow-other-keys)
880 (invoke "tar" "xvf" source)
881 (chdir (string-append "icedtea6-" ,version))
883 (copy-recursively (assoc-ref inputs "openjdk-src") "openjdk")
884 ;; The convenient OpenJDK source bundle is no longer
885 ;; available for download, so we have to take the sources
886 ;; from the Mercurial repositories and change the Makefile
887 ;; to avoid tests for the OpenJDK zip archive.
888 (with-directory-excursion "openjdk"
889 (for-each (lambda (part)
893 (string-append part "-src"))
895 '("jdk" "hotspot" "corba"
896 "langtools" "jaxp" "jaxws")))
897 (substitute* "patches/freetypeversion.patch"
898 (("REQUIRED_FREETYPE_VERSION = 2.2.1")
899 "REQUIRED_FREETYPE_VERSION = 2.10.1"))
900 (substitute* "Makefile.in"
901 (("echo \"ERROR: No up-to-date OpenJDK zip available\"; exit -1;")
902 "echo \"trust me\";")
903 ;; The contents of the bootstrap directory must be
904 ;; writeable but when copying from the store they are
906 (("mkdir -p lib/rt" line)
907 (string-append line "; chmod -R u+w $(BOOT_DIR)")))
908 (invoke "chmod" "-R" "u+w" "openjdk")))
909 (add-after 'unpack 'use-classpath
910 (lambda* (#:key inputs #:allow-other-keys)
911 (let ((jvmlib (assoc-ref inputs "classpath"))
912 (jamvm (assoc-ref inputs "jamvm")))
913 ;; Classpath does not provide rt.jar.
914 (substitute* "Makefile.in"
915 (("\\$\\(SYSTEM_JDK_DIR\\)/jre/lib/rt.jar")
916 (string-append jvmlib "/share/classpath/glibj.zip")))
917 ;; Make sure we can find all classes.
919 (string-append jvmlib "/share/classpath/glibj.zip:"
920 jvmlib "/share/classpath/tools.zip:"
921 jamvm "/lib/rt.jar"))
923 (string-append "-cp "
924 jvmlib "/share/classpath/glibj.zip:"
925 jvmlib "/share/classpath/tools.zip")))
927 (add-after 'unpack 'patch-patches
929 ;; shebang in patches so that they apply cleanly
930 (substitute* '("patches/jtreg-jrunscript.patch"
931 "patches/hotspot/hs23/drop_unlicensed_test.patch")
932 (("#!/bin/sh") (string-append "#!" (which "sh"))))
934 (add-after 'unpack 'patch-paths
935 (lambda* (#:key inputs #:allow-other-keys)
936 ;; buildtree.make generates shell scripts, so we need to replace
937 ;; the generated shebang
938 (substitute* '("openjdk/hotspot/make/linux/makefiles/buildtree.make")
939 (("/bin/sh") (which "bash")))
941 (let ((corebin (string-append
942 (assoc-ref inputs "coreutils") "/bin/"))
943 (binbin (string-append
944 (assoc-ref inputs "binutils") "/bin/"))
945 (grepbin (string-append
946 (assoc-ref inputs "grep") "/bin/")))
947 (substitute* '("openjdk/jdk/make/common/shared/Defs-linux.gmk"
948 "openjdk/corba/make/common/shared/Defs-linux.gmk")
949 (("UNIXCOMMAND_PATH = /bin/")
950 (string-append "UNIXCOMMAND_PATH = " corebin))
951 (("USRBIN_PATH = /usr/bin/")
952 (string-append "USRBIN_PATH = " corebin))
953 (("DEVTOOLS_PATH *= */usr/bin/")
954 (string-append "DEVTOOLS_PATH = " corebin))
955 (("COMPILER_PATH *= */usr/bin/")
956 (string-append "COMPILER_PATH = "
957 (assoc-ref inputs "gcc") "/bin/"))
958 (("DEF_OBJCOPY *=.*objcopy")
959 (string-append "DEF_OBJCOPY = " (which "objcopy"))))
961 ;; fix path to alsa header
962 (substitute* "openjdk/jdk/make/common/shared/Sanity.gmk"
963 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
964 (string-append "ALSA_INCLUDE="
965 (assoc-ref inputs "alsa-lib")
966 "/include/alsa/version.h")))
968 ;; fix hard-coded utility paths
969 (substitute* '("openjdk/jdk/make/common/shared/Defs-utils.gmk"
970 "openjdk/corba/make/common/shared/Defs-utils.gmk")
972 (string-append "ECHO = " (which "echo")))
974 (string-append "GREP = " (which "grep")))
976 (string-append "EGREP = " (which "egrep")))
978 (string-append "CPIO = " (which "cpio")))
979 (("READELF *=.*readelf")
980 (string-append "READELF = " (which "readelf")))
982 (string-append "AR = " (which "ar")))
984 (string-append "TAR = " (which "tar")))
986 (string-append "AS = " (which "as")))
988 (string-append "LD = " (which "ld")))
990 (string-append "STRIP = " (which "strip")))
992 (string-append "NM = " (which "nm")))
994 (string-append "SH = " (which "bash")))
996 (string-append "FIND = " (which "find")))
998 (string-append "LDD = " (which "ldd")))
999 (("NAWK *=.*(n|g)awk")
1000 (string-append "NAWK = " (which "gawk")))
1001 (("XARGS *=.*xargs")
1002 (string-append "XARGS = " (which "xargs")))
1003 (("UNZIP *=.*unzip")
1004 (string-append "UNZIP = " (which "unzip")))
1006 (string-append "ZIPEXE = " (which "zip")))
1008 (string-append "SED = " (which "sed"))))
1010 ;; Some of these timestamps cause problems as they are more than
1011 ;; 10 years ago, failing the build process.
1013 "openjdk/jdk/src/share/classes/java/util/CurrencyData.properties"
1014 (("AZ=AZM;2005-12-31-20-00-00;AZN") "AZ=AZN")
1015 (("MZ=MZM;2006-06-30-22-00-00;MZN") "MZ=MZN")
1016 (("RO=ROL;2005-06-30-21-00-00;RON") "RO=RON")
1017 (("TR=TRL;2004-12-31-22-00-00;TRY") "TR=TRY"))
1019 (add-before 'configure 'set-additional-paths
1020 (lambda* (#:key inputs #:allow-other-keys)
1022 (string-append (assoc-ref inputs "libxrender")
1023 "/include/X11/extensions" ":"
1024 (assoc-ref inputs "libxtst")
1025 "/include/X11/extensions" ":"
1026 (assoc-ref inputs "libxinerama")
1027 "/include/X11/extensions" ":"
1028 (or (getenv "CPATH") "")))
1029 (setenv "ALT_CUPS_HEADERS_PATH"
1030 (string-append (assoc-ref inputs "cups")
1032 (setenv "ALT_FREETYPE_HEADERS_PATH"
1033 (string-append (assoc-ref inputs "freetype")
1035 (setenv "ALT_FREETYPE_LIB_PATH"
1036 (string-append (assoc-ref inputs "freetype")
1039 (add-before 'build 'disable-os-version-check
1040 ;; allow build on linux major version change
1042 (setenv "DISABLE_HOTSPOT_OS_VERSION_CHECK" "ok")
1045 (lambda* (#:key outputs #:allow-other-keys)
1046 (let ((doc (string-append (assoc-ref outputs "doc")
1047 "/share/doc/icedtea"))
1048 (jre (assoc-ref outputs "out"))
1049 (jdk (assoc-ref outputs "jdk")))
1050 (copy-recursively "openjdk.build/docs" doc)
1051 (copy-recursively "openjdk.build/j2re-image" jre)
1052 (copy-recursively "openjdk.build/j2sdk-image" jdk))
1055 `(("ant" ,ant-bootstrap)
1056 ("alsa-lib" ,alsa-lib)
1058 ("classpath" ,classpath-devel)
1059 ("coreutils" ,coreutils)
1062 ("ecj" ,ecj-bootstrap)
1063 ("ecj-javac" ,ecj-javac-wrapper-final)
1064 ("fastjar" ,fastjar)
1065 ("fontconfig" ,fontconfig)
1066 ("freetype" ,freetype)
1073 ("libjpeg" ,libjpeg-turbo)
1076 ("libtool" ,libtool)
1078 ("libxcomposite" ,libxcomposite)
1080 ("libxinerama" ,libxinerama)
1081 ("libxrender" ,libxrender)
1082 ("libxslt" ,libxslt) ;for xsltproc
1084 ("libxtst" ,libxtst)
1085 ("mit-krb5" ,mit-krb5)
1087 ("nss-certs" ,nss-certs)
1089 ("pkg-config" ,pkg-config)
1090 ("procps" ,procps) ;for "free", even though I'm not sure we should use it
1100 (url "http://hg.openjdk.java.net/jdk6/jdk6/")
1101 (changeset "jdk6-b41")))
1104 "14q47yfg586fs64w30g8mk92m5dkxsvr36zzh0ra99xk5x0x96mv"))))
1109 (url "http://hg.openjdk.java.net/jdk6/jdk6/jdk/")
1110 (changeset "jdk6-b41")))
1113 "165824nhg1k1dx6zs9dny0j49rmk35jw5b13dmz8c77jfajml4v9"))))
1118 (url "http://hg.openjdk.java.net/jdk6/jdk6/hotspot/")
1119 (changeset "jdk6-b41")))
1122 "07lc1z4k5dj9nrc1wvwmpvxr3xgxrdkdh53xb95skk5ij49yagfd"))))
1127 (url "http://hg.openjdk.java.net/jdk6/jdk6/corba/")
1128 (changeset "jdk6-b41")))
1131 "1p9g1r9dnax2iwp7yb59qx7m4nmshqhwmrb2b8jj8zgbd9dl2i3q"))))
1136 (url "http://hg.openjdk.java.net/jdk6/jdk6/langtools/")
1137 (changeset "jdk6-b41")))
1140 "1x52wd67fynbbd9ild6fb4wvba3f5hhwk03qdjfazd0a1qr37z3d"))))
1145 (url "http://hg.openjdk.java.net/jdk6/jdk6/jaxp/")
1146 (changeset "jdk6-b41")))
1149 "0shlqrvzpr4nrkmv215lbxnby63s3yvbdh1yxcayznsyqwa4nlxm"))))
1154 (url "http://hg.openjdk.java.net/jdk6/jdk6/jaxws/")
1155 (changeset "jdk6-b41")))
1158 "0835lkw8vib1xhp8lxnybhlvzdh699hbi4mclxanydjk63zbpxk0"))))))
1159 (home-page "http://icedtea.classpath.org")
1160 (synopsis "Java development kit")
1162 "This package provides the OpenJDK built with the IcedTea build harness.
1163 This version of the OpenJDK is no longer maintained and is only used for
1164 bootstrapping purposes.")
1165 ;; IcedTea is released under the GPL2 + Classpath exception, which is the
1166 ;; same license as both GNU Classpath and OpenJDK.
1167 (license license:gpl2+)))
1169 (define-public icedtea-7
1170 (let* ((version "2.6.13")
1171 (drop (lambda (name hash)
1175 "http://icedtea.classpath.org/download/drops"
1176 "/icedtea7/" version "/" name ".tar.bz2"))
1177 (sha256 (base32 hash))))))
1184 "http://icedtea.wildebeest.org/download/source/icedtea-"
1188 "1w331rdqx1dcx2xb0fmjmrkdc71xqn20fxsgw8by4xhiblh88khh"))
1189 (modules '((guix build utils)))
1192 (substitute* "Makefile.in"
1193 ;; do not leak information about the build host
1194 (("DISTRIBUTION_ID=\"\\$\\(DIST_ID\\)\"")
1195 "DISTRIBUTION_ID=\"\\\"guix\\\"\""))
1197 (build-system gnu-build-system)
1198 (outputs '("out" ; Java Runtime Environment
1199 "jdk" ; Java Development Kit
1200 "doc")) ; all documentation
1202 `(;; There are many test failures. Some are known to
1203 ;; fail upstream, others relate to not having an X
1204 ;; server running at test time, yet others are a
1205 ;; complete mystery to me.
1207 ;; hotspot: passed: 241; failed: 45; error: 2
1208 ;; langtools: passed: 1,934; failed: 26
1212 ;; The DSOs use $ORIGIN to refer to each other, but (guix build
1213 ;; gremlin) doesn't support it yet, so skip this phase.
1214 #:validate-runpath? #f
1216 ;; Apparently, the C locale is needed for some of the tests.
1219 #:modules ((guix build utils)
1220 (guix build gnu-build-system)
1227 ;; TODO: package pcsc and sctp, and add to inputs
1228 `("--disable-system-pcsc"
1229 "--disable-system-sctp"
1230 "--enable-bootstrap"
1233 ,(string-append "--with-parallel-jobs="
1234 (number->string (parallel-job-count)))
1235 "--disable-downloading"
1236 "--disable-tests" ;they are run in the check phase instead
1237 "--with-openjdk-src-dir=./openjdk.src"
1238 ,(string-append "--with-jdk-home="
1239 (assoc-ref %build-inputs "jdk")))
1242 (modify-phases %standard-phases
1244 (lambda* (#:key source inputs #:allow-other-keys)
1245 (let ((target (string-append "icedtea-" ,version))
1246 (unpack (lambda* (name #:optional dir)
1248 (string-drop-right name 5))))
1251 (assoc-ref inputs name)
1253 "--strip-components=1")))))
1255 (invoke "tar" "xvf" source
1256 "-C" target "--strip-components=1")
1258 (unpack "openjdk-src" "openjdk.src")
1259 (with-directory-excursion "openjdk.src"
1261 (filter (cut string-suffix? "-drop" <>)
1266 (add-after 'unpack 'patch-bitrot
1268 (substitute* '("patches/boot/revert-6973616.patch"
1269 "openjdk.src/jdk/make/common/shared/Defs-versions.gmk")
1270 (("REQUIRED_FREETYPE_VERSION = 2.2.1")
1271 "REQUIRED_FREETYPE_VERSION = 2.10.1"))
1272 ;; As of attr 2.4.48 this header is no longer
1273 ;; included. It is provided by the libc instead.
1274 (substitute* '("configure"
1275 "openjdk.src/jdk/src/solaris/native/sun/nio/fs/LinuxNativeDispatcher.c")
1276 (("attr/xattr.h") "sys/xattr.h"))
1278 (add-after 'unpack 'fix-x11-extension-include-path
1279 (lambda* (#:key inputs #:allow-other-keys)
1280 (substitute* "openjdk.src/jdk/make/sun/awt/mawt.gmk"
1281 (((string-append "\\$\\(firstword \\$\\(wildcard "
1282 "\\$\\(OPENWIN_HOME\\)"
1283 "/include/X11/extensions\\).*$"))
1284 (string-append (assoc-ref inputs "libxrender")
1285 "/include/X11/extensions"
1286 " -I" (assoc-ref inputs "libxtst")
1287 "/include/X11/extensions"
1288 " -I" (assoc-ref inputs "libxinerama")
1289 "/include/X11/extensions"))
1290 (("\\$\\(wildcard /usr/include/X11/extensions\\)\\)") ""))
1292 (add-after 'unpack 'patch-paths
1294 ;; buildtree.make generates shell scripts, so we need to replace
1295 ;; the generated shebang
1296 (substitute* '("openjdk.src/hotspot/make/linux/makefiles/buildtree.make")
1297 (("/bin/sh") (which "bash")))
1299 (let ((corebin (string-append
1300 (assoc-ref %build-inputs "coreutils") "/bin/"))
1301 (binbin (string-append
1302 (assoc-ref %build-inputs "binutils") "/bin/"))
1303 (grepbin (string-append
1304 (assoc-ref %build-inputs "grep") "/bin/")))
1305 (substitute* '("openjdk.src/jdk/make/common/shared/Defs-linux.gmk"
1306 "openjdk.src/corba/make/common/shared/Defs-linux.gmk")
1307 (("UNIXCOMMAND_PATH = /bin/")
1308 (string-append "UNIXCOMMAND_PATH = " corebin))
1309 (("USRBIN_PATH = /usr/bin/")
1310 (string-append "USRBIN_PATH = " corebin))
1311 (("DEVTOOLS_PATH *= */usr/bin/")
1312 (string-append "DEVTOOLS_PATH = " corebin))
1313 (("COMPILER_PATH *= */usr/bin/")
1314 (string-append "COMPILER_PATH = "
1315 (assoc-ref %build-inputs "gcc") "/bin/"))
1316 (("DEF_OBJCOPY *=.*objcopy")
1317 (string-append "DEF_OBJCOPY = " (which "objcopy"))))
1319 ;; fix path to alsa header
1320 (substitute* "openjdk.src/jdk/make/common/shared/Sanity.gmk"
1321 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
1322 (string-append "ALSA_INCLUDE="
1323 (assoc-ref %build-inputs "alsa-lib")
1324 "/include/alsa/version.h")))
1326 ;; fix hard-coded utility paths
1327 (substitute* '("openjdk.src/jdk/make/common/shared/Defs-utils.gmk"
1328 "openjdk.src/corba/make/common/shared/Defs-utils.gmk")
1330 (string-append "ECHO = " (which "echo")))
1332 (string-append "GREP = " (which "grep")))
1333 (("EGREP *=.*egrep")
1334 (string-append "EGREP = " (which "egrep")))
1336 (string-append "CPIO = " (which "cpio")))
1337 (("READELF *=.*readelf")
1338 (string-append "READELF = " (which "readelf")))
1340 (string-append "AR = " (which "ar")))
1342 (string-append "TAR = " (which "tar")))
1344 (string-append "AS = " (which "as")))
1346 (string-append "LD = " (which "ld")))
1347 (("STRIP *=.*strip")
1348 (string-append "STRIP = " (which "strip")))
1350 (string-append "NM = " (which "nm")))
1352 (string-append "SH = " (which "bash")))
1354 (string-append "FIND = " (which "find")))
1356 (string-append "LDD = " (which "ldd")))
1357 (("NAWK *=.*(n|g)awk")
1358 (string-append "NAWK = " (which "gawk")))
1359 (("XARGS *=.*xargs")
1360 (string-append "XARGS = " (which "xargs")))
1361 (("UNZIP *=.*unzip")
1362 (string-append "UNZIP = " (which "unzip")))
1364 (string-append "ZIPEXE = " (which "zip")))
1366 (string-append "SED = " (which "sed"))))
1368 ;; Some of these timestamps cause problems as they are more than
1369 ;; 10 years ago, failing the build process.
1371 "openjdk.src/jdk/src/share/classes/java/util/CurrencyData.properties"
1372 (("AZ=AZM;2005-12-31-20-00-00;AZN") "AZ=AZN")
1373 (("MZ=MZM;2006-06-30-22-00-00;MZN") "MZ=MZN")
1374 (("RO=ROL;2005-06-30-21-00-00;RON") "RO=RON")
1375 (("TR=TRL;2004-12-31-22-00-00;TRY") "TR=TRY")))
1377 (add-before 'configure 'set-additional-paths
1378 (lambda* (#:key inputs #:allow-other-keys)
1379 (substitute* "openjdk.src/jdk/make/common/shared/Sanity.gmk"
1380 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
1381 (string-append "ALSA_INCLUDE="
1382 (assoc-ref inputs "alsa-lib")
1383 "/include/alsa/version.h")))
1386 (string-append (assoc-ref inputs "libxcomposite")
1387 "/include/X11/extensions" ":"
1388 (assoc-ref inputs "libxrender")
1389 "/include/X11/extensions" ":"
1390 (assoc-ref inputs "libxtst")
1391 "/include/X11/extensions" ":"
1392 (assoc-ref inputs "libxinerama")
1393 "/include/X11/extensions" ":"
1394 (or (getenv "CPATH") "")))
1395 (setenv "ALT_OBJCOPY" (which "objcopy"))
1396 (setenv "ALT_CUPS_HEADERS_PATH"
1397 (string-append (assoc-ref inputs "cups")
1399 (setenv "ALT_FREETYPE_HEADERS_PATH"
1400 (string-append (assoc-ref inputs "freetype")
1402 (setenv "ALT_FREETYPE_LIB_PATH"
1403 (string-append (assoc-ref inputs "freetype")
1406 (add-before 'build 'disable-os-version-check
1407 ;; allow build on linux major version change
1409 (setenv "DISABLE_HOTSPOT_OS_VERSION_CHECK" "ok")
1411 (add-before 'check 'fix-test-framework
1413 ;; Fix PATH in test environment
1414 (substitute* "test/jtreg/com/sun/javatest/regtest/Main.java"
1415 (("PATH=/bin:/usr/bin")
1416 (string-append "PATH=" (getenv "PATH"))))
1417 (substitute* "test/jtreg/com/sun/javatest/util/SysEnv.java"
1418 (("/usr/bin/env") (which "env")))
1419 (substitute* "openjdk.src/hotspot/test/test_env.sh"
1420 (("/bin/rm") (which "rm"))
1421 (("/bin/cp") (which "cp"))
1422 (("/bin/mv") (which "mv")))
1424 (add-before 'check 'fix-hotspot-tests
1426 (with-directory-excursion "openjdk.src/hotspot/test/"
1427 (substitute* "jprt.config"
1428 (("PATH=\"\\$\\{path4sdk\\}\"")
1429 (string-append "PATH=" (getenv "PATH")))
1430 (("make=/usr/bin/make")
1431 (string-append "make=" (which "make"))))
1432 (substitute* '("runtime/6626217/Test6626217.sh"
1433 "runtime/7110720/Test7110720.sh")
1434 (("/bin/rm") (which "rm"))
1435 (("/bin/cp") (which "cp"))
1436 (("/bin/mv") (which "mv"))))
1438 (add-before 'check 'fix-jdk-tests
1440 (with-directory-excursion "openjdk.src/jdk/test/"
1441 (substitute* "com/sun/jdi/JdbReadTwiceTest.sh"
1442 (("/bin/pwd") (which "pwd")))
1443 (substitute* "com/sun/jdi/ShellScaffold.sh"
1444 (("/bin/kill") (which "kill")))
1445 (substitute* "start-Xvfb.sh"
1446 ;;(("/usr/bin/X11/Xvfb") (which "Xvfb"))
1447 (("/usr/bin/nohup") (which "nohup")))
1448 (substitute* "javax/security/auth/Subject/doAs/Test.sh"
1449 (("/bin/rm") (which "rm")))
1450 (substitute* "tools/launcher/MultipleJRE.sh"
1451 (("echo \"#!/bin/sh\"")
1452 (string-append "echo \"#!" (which "rm") "\""))
1453 (("/usr/bin/zip") (which "zip")))
1454 (substitute* "com/sun/jdi/OnThrowTest.java"
1455 (("#!/bin/sh") (string-append "#!" (which "sh"))))
1456 (substitute* "java/lang/management/OperatingSystemMXBean/GetSystemLoadAverage.java"
1457 (("/usr/bin/uptime") (which "uptime")))
1458 (substitute* "java/lang/ProcessBuilder/Basic.java"
1459 (("/usr/bin/env") (which "env"))
1460 (("/bin/false") (which "false"))
1461 (("/bin/true") (which "true"))
1462 (("/bin/cp") (which "cp"))
1463 (("/bin/sh") (which "sh")))
1464 (substitute* "java/lang/ProcessBuilder/FeelingLucky.java"
1465 (("/bin/sh") (which "sh")))
1466 (substitute* "java/lang/ProcessBuilder/Zombies.java"
1467 (("/usr/bin/perl") (which "perl"))
1468 (("/bin/ps") (which "ps"))
1469 (("/bin/true") (which "true")))
1470 (substitute* "java/lang/Runtime/exec/ConcurrentRead.java"
1471 (("/usr/bin/tee") (which "tee")))
1472 (substitute* "java/lang/Runtime/exec/ExecWithDir.java"
1473 (("/bin/true") (which "true")))
1474 (substitute* "java/lang/Runtime/exec/ExecWithInput.java"
1475 (("/bin/cat") (which "cat")))
1476 (substitute* "java/lang/Runtime/exec/ExitValue.java"
1477 (("/bin/sh") (which "sh"))
1478 (("/bin/true") (which "true"))
1479 (("/bin/kill") (which "kill")))
1480 (substitute* "java/lang/Runtime/exec/LotsOfDestroys.java"
1481 (("/usr/bin/echo") (which "echo")))
1482 (substitute* "java/lang/Runtime/exec/LotsOfOutput.java"
1483 (("/usr/bin/cat") (which "cat")))
1484 (substitute* "java/lang/Runtime/exec/SleepyCat.java"
1485 (("/bin/cat") (which "cat"))
1486 (("/bin/sleep") (which "sleep"))
1487 (("/bin/sh") (which "sh")))
1488 (substitute* "java/lang/Runtime/exec/StreamsSurviveDestroy.java"
1489 (("/bin/cat") (which "cat")))
1490 (substitute* "java/rmi/activation/CommandEnvironment/SetChildEnv.java"
1491 (("/bin/chmod") (which "chmod")))
1492 (substitute* "java/util/zip/ZipFile/Assortment.java"
1493 (("/bin/sh") (which "sh"))))
1497 ;; The "make check-*" targets always return zero, so we need to
1498 ;; check for errors in the associated log files to determine
1499 ;; whether any tests have failed.
1500 (use-modules (ice-9 rdelim))
1501 (let* ((error-pattern (make-regexp "^(Error|FAILED):.*"))
1502 (checker (lambda (port)
1504 (let ((line (read-line port)))
1506 ((eof-object? line) #t)
1507 ((regexp-exec error-pattern line)
1508 (error "test failed"))
1510 (run-test (lambda (test)
1511 (invoke "make" test)
1512 (call-with-input-file
1513 (string-append "test/" test ".log")
1515 (when #f ; skip tests
1516 (run-test "check-hotspot")
1517 (run-test "check-langtools")
1518 (run-test "check-jdk"))
1521 (lambda* (#:key outputs #:allow-other-keys)
1522 (let ((doc (string-append (assoc-ref outputs "doc")
1523 "/share/doc/icedtea"))
1524 (jre (assoc-ref outputs "out"))
1525 (jdk (assoc-ref outputs "jdk")))
1526 (copy-recursively "openjdk.build/docs" doc)
1527 (copy-recursively "openjdk.build/j2re-image" jre)
1528 (copy-recursively "openjdk.build/j2sdk-image" jdk))
1530 ;; Some of the libraries in the lib/amd64 folder link to libjvm.so.
1531 ;; But that shared object is located in the server/ folder, so it
1532 ;; cannot be found. This phase creates a symbolic link in the
1533 ;; lib/amd64 folder so that the other libraries can find it.
1536 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
1538 ;; FIXME: Find the bug in the build system, so that this symlink is
1540 (add-after 'install 'install-libjvm
1541 (lambda* (#:key inputs outputs #:allow-other-keys)
1542 (let* ((lib-path (string-append (assoc-ref outputs "out")
1543 ;; See 'INSTALL_ARCH_DIR' in
1545 ,(match (%current-system)
1554 ;; We need a catch-all, dropping
1555 ;; '-linux' works in most cases.
1560 (%current-system) 6)))))))
1561 (symlink (string-append lib-path "/server/libjvm.so")
1562 (string-append lib-path "/libjvm.so")))
1564 ;; By default IcedTea only generates an empty keystore. In order to
1565 ;; be able to use certificates in Java programs we need to generate a
1566 ;; keystore from a set of certificates. For convenience we use the
1567 ;; certificates from the nss-certs package.
1568 (add-after 'install 'install-keystore
1569 (lambda* (#:key inputs outputs #:allow-other-keys)
1570 (let* ((keystore "cacerts")
1571 (certs-dir (string-append (assoc-ref inputs "nss-certs")
1573 (keytool (string-append (assoc-ref outputs "jdk")
1575 (define (extract-cert file target)
1576 (call-with-input-file file
1578 (call-with-output-file target
1580 (let loop ((line (read-line in 'concat))
1583 ((eof-object? line) #t)
1584 ((string-prefix? "-----BEGIN" line)
1586 (loop (read-line in 'concat) #t))
1587 ((string-prefix? "-----END" line)
1591 (when copying? (display line out))
1592 (loop (read-line in 'concat) copying?)))))))))
1593 (define (import-cert cert)
1594 (format #t "Importing certificate ~a\n" (basename cert))
1595 (let ((temp "tmpcert"))
1596 (extract-cert cert temp)
1597 (let ((port (open-pipe* OPEN_WRITE keytool
1599 "-alias" (basename cert)
1600 "-keystore" keystore
1601 "-storepass" "changeit"
1603 (display "yes\n" port)
1604 (when (not (zero? (status:exit-val (close-pipe port))))
1605 (format #t "failed to import ~a\n" cert)))
1606 (delete-file temp)))
1608 ;; This is necessary because the certificate directory contains
1609 ;; files with non-ASCII characters in their names.
1610 (setlocale LC_ALL "en_US.utf8")
1611 (setenv "LC_ALL" "en_US.utf8")
1613 (for-each import-cert (find-files certs-dir "\\.pem$"))
1614 (mkdir-p (string-append (assoc-ref outputs "out")
1616 (mkdir-p (string-append (assoc-ref outputs "jdk")
1617 "/jre/lib/security"))
1619 ;; The cacerts files we are going to overwrite are chmod'ed as
1620 ;; read-only (444) in icedtea-8 (which derives from this
1621 ;; package). We have to change this so we can overwrite them.
1622 (chmod (string-append (assoc-ref outputs "out")
1623 "/lib/security/" keystore) #o644)
1624 (chmod (string-append (assoc-ref outputs "jdk")
1625 "/jre/lib/security/" keystore) #o644)
1627 (install-file keystore
1628 (string-append (assoc-ref outputs "out")
1630 (install-file keystore
1631 (string-append (assoc-ref outputs "jdk")
1632 "/jre/lib/security"))
1637 "0l34ikyf62hbzlf9032alzkkqvf7bpmckz4gvirvph755w7gka8l"))
1640 "050gv2jbg1pi6qkn8w18bwpbklfa5b0kymjvan9pncddbj8m84fz"))
1643 "1k6yldwnxfzdg5926r1nlfv8d1r1j7rlp2nkz6gqh05vgyamnfhl"))
1646 "110j7jlz47x2gg6f7653x12mssan5kvj9l9h1m1c8c92drfxbqyk"))
1649 "0d1mca38ksxvdskp9im3pp7fdijhj1n3lwq9w13r9s4v3qyskgdd"))
1652 "0nq5236fzxn3p6x8cgncl56mzcmsj07q9gymysnws4c8byc6n0qj"))
1657 "http://icedtea.classpath.org/downloads/drops"
1658 "/icedtea7/" version "/hotspot.tar.bz2"))
1661 "17bdv39n4lh8l5737c96f3xgamx4y305m067p01cywgp7zaddqws"))
1662 (patches (search-patches
1663 "icedtea-7-hotspot-aarch64-use-c++98.patch"))))
1664 ("ant" ,ant-bootstrap)
1666 ("coreutils" ,coreutils)
1667 ("diffutils" ,diffutils) ;for tests
1670 ("libtool" ,libtool)
1671 ("pkg-config" ,pkg-config)
1677 ("fastjar" ,fastjar)
1678 ("libxslt" ,libxslt) ;for xsltproc
1679 ("nss-certs" ,nss-certs)
1681 ("procps" ,procps) ;for "free", even though I'm not sure we should use it
1682 ("jdk" ,icedtea-6 "jdk")))
1684 `(("alsa-lib" ,alsa-lib)
1687 ("libxcomposite" ,libxcomposite)
1689 ("libxtst" ,libxtst)
1691 ("libxinerama" ,libxinerama)
1692 ("libxrender" ,libxrender)
1693 ("libjpeg" ,libjpeg-turbo)
1695 ("mit-krb5" ,mit-krb5)
1698 ("fontconfig" ,fontconfig)
1699 ("freetype" ,freetype)
1703 (home-page "http://icedtea.classpath.org")
1704 (synopsis "Java development kit")
1706 "This package provides the Java development kit OpenJDK built with the
1707 IcedTea build harness.")
1709 ;; 'configure' lists "mips" and "mipsel", but not "mips64el'.
1710 (supported-systems (delete "mips64el-linux" %supported-systems))
1712 ;; IcedTea is released under the GPL2 + Classpath exception, which is the
1713 ;; same license as both GNU Classpath and OpenJDK.
1714 (license license:gpl2+))))
1716 (define-public icedtea-8
1717 (let* ((version "3.7.0")
1718 (drop (lambda (name hash)
1722 "http://icedtea.classpath.org/download/drops"
1723 "/icedtea8/" version "/" name ".tar.xz"))
1724 (sha256 (base32 hash))))))
1725 (package (inherit icedtea-7)
1730 "http://icedtea.wildebeest.org/download/source/icedtea-"
1734 "09yqzn8rpccs7cyv89hhy5zlznpgqw5x3jz0w1ccp0cz1vgs8l5w"))
1735 (modules '((guix build utils)))
1738 (substitute* '("configure"
1740 ;; Do not embed build time
1741 (("(DIST_ID=\"Custom build).*$" _ prefix)
1742 (string-append prefix "\"\n"))
1743 ;; Do not leak information about the build host
1744 (("DIST_NAME=\"\\$build_os\"")
1745 "DIST_NAME=\"guix\""))
1748 `(#:imported-modules
1749 ((guix build ant-build-system)
1750 (guix build syscalls)
1751 ,@%gnu-build-system-modules)
1753 #:disallowed-references ((,icedtea-7 "jdk"))
1755 ,@(substitute-keyword-arguments (package-arguments icedtea-7)
1756 ((#:modules modules)
1757 `((guix build utils)
1758 (guix build gnu-build-system)
1759 ((guix build ant-build-system) #:prefix ant:)
1764 ((#:configure-flags flags)
1765 `(let ((jdk (assoc-ref %build-inputs "jdk")))
1766 `( ;;"--disable-bootstrap"
1767 "--enable-bootstrap"
1769 ,(string-append "--with-parallel-jobs="
1770 (number->string (parallel-job-count)))
1771 "--disable-downloading"
1772 "--disable-system-pcsc"
1773 "--disable-system-sctp"
1774 "--disable-tests" ;they are run in the check phase instead
1775 "--with-openjdk-src-dir=./openjdk.src"
1776 ,(string-append "--with-jdk-home=" jdk))))
1778 `(modify-phases ,phases
1779 (delete 'fix-x11-extension-include-path)
1780 (delete 'patch-paths)
1781 (delete 'set-additional-paths)
1782 (delete 'patch-patches)
1783 (delete 'patch-bitrot)
1784 ;; Prevent the keytool from recording the current time when
1785 ;; adding certificates at build time.
1786 (add-after 'unpack 'patch-keystore
1788 (substitute* "openjdk.src/jdk/src/share/classes/sun/security/provider/JavaKeyStore.java"
1789 (("date = new Date\\(\\);")
1791 date = (System.getenv(\"SOURCE_DATE_EPOCH\") != null) ?\
1792 new Date(Long.parseLong(System.getenv(\"SOURCE_DATE_EPOCH\"))) :\
1795 (add-after 'unpack 'patch-jni-libs
1796 ;; Hardcode dynamically loaded libraries.
1799 (@ (srfi srfi-1) remove))
1801 (define (icedtea-or-openjdk? path)
1802 (or (string-contains path "openjdk")
1803 (string-contains path "icedtea")))
1805 (let* ((library-path (remove icedtea-or-openjdk?
1806 (search-path-as-string->list
1807 (getenv "LIBRARY_PATH"))))
1808 (find-library (lambda (name)
1811 (string-append "lib" name ".so"))
1812 (string-append "lib" name ".so")))))
1815 (catch 'decoding-error
1818 (("VERSIONED_JNI_LIB_NAME\\(\"(.*)\", \"(.*)\"\\)"
1820 (string-append "\"" (find-library name) "\""))
1821 (("JNI_LIB_NAME\\(\"(.*)\"\\)" _ name)
1822 (string-append "\"" (find-library name) "\""))))
1824 ;; Those are safe to skip.
1825 (format (current-error-port)
1826 "warning: failed to substitute: ~a~%"
1828 (find-files "openjdk.src/jdk/src/solaris/native"
1832 (lambda* (#:key outputs #:allow-other-keys)
1833 (let ((doc (string-append (assoc-ref outputs "doc")
1834 "/share/doc/icedtea"))
1835 (jre (assoc-ref outputs "out"))
1836 (jdk (assoc-ref outputs "jdk")))
1837 (copy-recursively "openjdk.build/docs" doc)
1838 (copy-recursively "openjdk.build/images/j2re-image" jre)
1839 (copy-recursively "openjdk.build/images/j2sdk-image" jdk)
1840 ;; Install the nss.cfg file to JRE to enable SSL/TLS
1842 (copy-file (string-append jdk "/jre/lib/security/nss.cfg")
1843 (string-append jre "/lib/security/nss.cfg"))
1845 (add-after 'install 'strip-jar-timestamps
1846 (assoc-ref ant:%standard-phases 'strip-jar-timestamps)))))))
1848 `(("jdk" ,icedtea-7 "jdk")
1851 "1mj6xgmw31i6qd30qi9dmv7160fbcfq5ikz1jwjihdg2793il19p"))
1854 "1wb8k5zm40zld0986dvmlh5xh3gyixbg9h26sl662zy92amhmyyg"))
1857 "11ma4zz0599cy70xd219v7a8vin7p96xrhhz3wsaw6cjhkzpagah"))
1860 "14m1y0z0fbm5z5zjw3vnq85py8dma84bi3f9cw8rhdyc6skk8q4i"))
1863 "09andnm6xaasnp963hgx42yiflifiljp9z7z85jrfyc5z8a5whmf"))
1866 "0s6lcpc0zckz2fnq98aqf28nz9y3wbi41a3kyaqqa2abwbkm1zwl"))
1869 "15wizy123vhk40chl1b4p552jf2pw2hdww0myf11qab425axz4nw"))
1872 "1ciz1w9j0kz7s1dxdhyqq71nla9icyz6qvn0b9z2zgkklqa98qmm"))
1875 "19pzl3ppaw8j6r5cnyp8qiw3hxijh3hdc46l39g5yfhdl4pr4hpa"))
1878 "0k33anxdzw1icn072wynfmmdjhsv50hay0j1sfkfxny12rb3vgdy"))
1879 ,@(fold alist-delete (package-native-inputs icedtea-7)
1880 '("jdk" "openjdk-src" "corba-drop" "jaxp-drop" "jaxws-drop"
1881 "jdk-drop" "langtools-drop" "hotspot-drop")))))))
1883 (define-public openjdk9
1889 (uri "https://hg.openjdk.java.net/jdk/jdk/archive/3cc80be736f2.tar.bz2")
1890 (file-name (string-append name "-" version ".tar.bz2"))
1893 "01ihmyf7k5z17wbr7xig7y40l9f01d5zjgkcmawn1102hw5kchpq"))
1894 (modules '((guix build utils)))
1897 (for-each delete-file
1898 (find-files "." ".*.(bin|exe|jar)$"))
1900 (build-system gnu-build-system)
1901 (outputs '("out" "jdk" "doc"))
1903 `(#:tests? #f; require jtreg
1904 #:make-flags '("all")
1906 ((guix build syscalls)
1907 ,@%gnu-build-system-modules)
1909 #:disallowed-references (,icedtea-8 (,icedtea-8 "jdk"))
1912 (modify-phases %standard-phases
1913 (add-after 'patch-source-shebangs 'fix-java-shebangs
1915 ;; This file was "fixed" by patch-source-shebangs, but it requires
1916 ;; this exact first line.
1917 (substitute* "jdk/make/data/blacklistedcertsconverter/blacklisted.certs.pem"
1918 (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))
1921 (lambda* (#:key inputs outputs #:allow-other-keys)
1922 ;; TODO: unbundle libpng and lcms
1923 (invoke "bash" "./configure"
1924 (string-append "--with-freetype=" (assoc-ref inputs "freetype"))
1925 "--disable-freetype-bundling"
1926 "--disable-warnings-as-errors"
1927 "--disable-hotspot-gtest"
1928 "--with-giflib=system"
1929 "--with-libjpeg=system"
1930 (string-append "--prefix=" (assoc-ref outputs "out")))
1932 (add-before 'build 'write-source-revision-file
1934 (with-output-to-file ".src-rev"
1936 (display ,version)))
1939 (lambda* (#:key make-flags parallel-build? #:allow-other-keys)
1940 (apply invoke "make"
1941 `(,@(if parallel-build?
1942 (list (string-append "JOBS="
1943 (number->string (parallel-job-count))))
1946 (add-after 'unpack 'patch-jni-libs
1947 ;; Hardcode dynamically loaded libraries.
1950 (@ (srfi srfi-1) remove))
1952 (define (icedtea-or-openjdk? path)
1953 (or (string-contains path "openjdk")
1954 (string-contains path "icedtea")))
1956 (let* ((library-path (remove icedtea-or-openjdk?
1957 (search-path-as-string->list
1958 (getenv "LIBRARY_PATH"))))
1959 (find-library (lambda (name)
1962 (string-append "lib" name ".so"))
1963 (string-append "lib" name ".so")))))
1966 (catch 'decoding-error
1969 (("VERSIONED_JNI_LIB_NAME\\(\"(.*)\", \"(.*)\"\\)"
1971 (string-append "\"" (find-library name) "\""))
1972 (("JNI_LIB_NAME\\(\"(.*)\"\\)" _ name)
1973 (string-append "\"" (find-library name) "\""))))
1975 ;; Those are safe to skip.
1976 (format (current-error-port)
1977 "warning: failed to substitute: ~a~%"
1982 ;; Some of the libraries in the lib/ folder link to libjvm.so.
1983 ;; But that shared object is located in the server/ folder, so it
1984 ;; cannot be found. This phase creates a symbolic link in the
1985 ;; lib/ folder so that the other libraries can find it.
1988 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
1990 ;; FIXME: Find the bug in the build system, so that this symlink is
1992 (add-after 'install 'install-libjvm
1993 (lambda* (#:key inputs outputs #:allow-other-keys)
1994 (let* ((lib-out (string-append (assoc-ref outputs "out")
1996 (lib-jdk (string-append (assoc-ref outputs "jdk")
1998 (symlink (string-append lib-jdk "/server/libjvm.so")
1999 (string-append lib-jdk "/libjvm.so"))
2000 (symlink (string-append lib-out "/server/libjvm.so")
2001 (string-append lib-out "/libjvm.so")))
2004 (lambda* (#:key outputs #:allow-other-keys)
2005 (let ((out (assoc-ref outputs "out"))
2006 (jdk (assoc-ref outputs "jdk"))
2007 (doc (assoc-ref outputs "doc"))
2008 (images (car (find-files "build" ".*-server-release"
2009 #:directories? #t))))
2010 (copy-recursively (string-append images "/images/jdk") jdk)
2011 (copy-recursively (string-append images "/images/jre") out)
2012 (copy-recursively (string-append images "/images/docs") doc))
2014 (add-after 'install 'strip-zip-timestamps
2015 (lambda* (#:key outputs #:allow-other-keys)
2016 (use-modules (guix build syscalls))
2017 (for-each (lambda (zip)
2018 (let ((dir (mkdtemp! "zip-contents.XXXXXX")))
2019 (with-directory-excursion dir
2020 (invoke "unzip" zip))
2022 (for-each (lambda (file)
2023 (let ((s (lstat file)))
2024 (unless (eq? (stat:type s) 'symlink)
2025 (format #t "reset ~a~%" file)
2026 (utime file 0 0 0 0))))
2027 (find-files dir #:directories? #t))
2028 (with-directory-excursion dir
2029 (let ((files (find-files "." ".*" #:directories? #t)))
2030 (apply invoke "zip" "-0" "-X" zip files)))))
2031 (find-files (assoc-ref outputs "doc") ".*.zip$"))
2034 `(("alsa-lib" ,alsa-lib)
2036 ("fontconfig" ,fontconfig)
2037 ("freetype" ,freetype)
2041 ("libjpeg" ,libjpeg-turbo)
2045 ("libxcomposite" ,libxcomposite)
2047 ("libxinerama" ,libxinerama)
2048 ("libxrender" ,libxrender)
2050 ("libxtst" ,libxtst)))
2052 `(("icedtea-8" ,icedtea-8)
2053 ("icedtea-8:jdk" ,icedtea-8 "jdk")
2054 ;; XXX: The build system fails with newer versions of GNU Make.
2055 ("make@4.2" ,gnu-make-4.2)
2059 (home-page "https://openjdk.java.net/projects/jdk9/")
2060 (synopsis "Java development kit")
2062 "This package provides the Java development kit OpenJDK.")
2063 (license license:gpl2+)))
2065 (define-public openjdk10
2072 (uri "http://hg.openjdk.java.net/jdk/jdk/archive/6fa770f9f8ab.tar.bz2")
2073 (file-name (string-append name "-" version ".tar.bz2"))
2076 "0zywq2203b4hx4jms9vbwvjcj1d3k2v3qpx4s33729fkpmid97r4"))
2077 (patches (search-patches
2078 "openjdk-10-idlj-reproducibility.patch"))
2079 (modules '((guix build utils)))
2082 (for-each delete-file (find-files "." ".*.(bin|exe|jar)$"))
2085 (substitute-keyword-arguments (package-arguments openjdk9)
2087 `(modify-phases ,phases
2088 (replace 'fix-java-shebangs
2090 ;; This file was "fixed" by patch-source-shebangs, but it requires
2091 ;; this exact first line.
2092 (substitute* "make/data/blacklistedcertsconverter/blacklisted.certs.pem"
2093 (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))
2096 (lambda* (#:key inputs outputs #:allow-other-keys)
2097 (invoke "bash" "./configure"
2098 (string-append "--with-freetype=" (assoc-ref inputs "freetype"))
2099 "--disable-freetype-bundling"
2100 "--disable-warnings-as-errors"
2101 "--disable-hotspot-gtest"
2102 "--with-giflib=system"
2103 "--with-libjpeg=system"
2104 "--with-native-debug-symbols=zipped"
2105 (string-append "--prefix=" (assoc-ref outputs "out")))
2107 ((#:disallowed-references _ '())
2108 `(,openjdk9 (,openjdk9 "jdk")))))
2110 `(("openjdk9" ,openjdk9)
2111 ("openjdk9:jdk" ,openjdk9 "jdk")
2112 ("make@4.2" ,gnu-make-4.2)
2117 (define-public openjdk11
2123 (uri "http://hg.openjdk.java.net/jdk/jdk/archive/76072a077ee1.tar.bz2")
2124 (file-name (string-append name "-" version ".tar.bz2"))
2127 "0v705w1s9lrqalzahir78pk397rkk9gfvzq821yv8h3xha0bqi6w"))
2128 (modules '((guix build utils)))
2131 (for-each delete-file (find-files "." ".*.(bin|exe|jar)$"))
2133 (build-system gnu-build-system)
2134 (outputs '("out" "jdk" "doc"))
2136 `(#:imported-modules ((guix build syscalls)
2137 ,@%gnu-build-system-modules)
2139 #:disallowed-references (,openjdk10 (,openjdk10 "jdk"))
2141 #:tests? #f; requires jtreg
2142 ;; TODO package jtreg
2144 `("--disable-option-checking" ; --enable-fast-install default flag errors otherwise
2145 "--disable-warnings-as-errors"
2146 ;; make validate-runpath pass, see: http://issues.guix.info/issue/32894
2147 "--with-native-debug-symbols=zipped"
2148 ;; do not use the bundled libraries
2149 "--with-giflib=system"
2150 "--with-lcms=system"
2151 "--with-libjpeg=system"
2152 "--with-libpng=system"
2153 "--with-version-pre="
2154 ;; allow the build system to locate the system freetype
2155 ,(string-append "--with-freetype-include="
2156 (assoc-ref %build-inputs "freetype") "/include")
2157 ,(string-append "--with-freetype-lib="
2158 (assoc-ref %build-inputs "freetype") "/lib"))
2160 (modify-phases %standard-phases
2161 (add-after 'patch-source-shebangs 'fix-java-shebangs
2163 ;; This file was "fixed" by patch-source-shebangs, but it requires
2164 ;; this exact first line.
2165 (substitute* "make/data/blacklistedcertsconverter/blacklisted.certs.pem"
2166 (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))
2168 (add-after 'unpack 'patch-jni-libs
2169 ;; Hardcode dynamically loaded libraries.
2172 (@ (srfi srfi-1) remove))
2174 (define (icedtea-or-openjdk? path)
2175 (or (string-contains path "openjdk")
2176 (string-contains path "icedtea")))
2178 (let* ((library-path (remove icedtea-or-openjdk?
2179 (search-path-as-string->list
2180 (getenv "LIBRARY_PATH"))))
2181 (find-library (lambda (name)
2184 (string-append "lib" name ".so"))
2185 (string-append "lib" name ".so")))))
2188 (catch 'decoding-error
2191 (("VERSIONED_JNI_LIB_NAME\\(\"(.*)\", \"(.*)\"\\)"
2193 (string-append "\"" (find-library name) "\""))
2194 (("JNI_LIB_NAME\\(\"(.*)\"\\)" _ name)
2195 (string-append "\"" (find-library name) "\""))))
2197 ;; Those are safe to skip.
2198 (format (current-error-port)
2199 "warning: failed to substitute: ~a~%"
2204 (add-before 'build 'write-source-revision-file
2206 (with-output-to-file ".src-rev"
2208 (display ,version)))
2211 (lambda* (#:key parallel-build? make-flags #:allow-other-keys)
2212 (apply invoke "make" "all"
2213 `(,@(if parallel-build?
2214 (list (string-append "JOBS="
2215 (number->string (parallel-job-count))))
2218 ;; jdk 11 does not build jre by default any more
2219 ;; building it anyways
2220 ;; for further information see:
2221 ;; https://github.com/AdoptOpenJDK/openjdk-build/issues/356
2222 (add-after 'build 'build-jre
2223 (lambda* (#:key parallel-build? make-flags #:allow-other-keys)
2224 (apply invoke "make" "legacy-jre-image"
2225 `(,@(if parallel-build?
2226 (list (string-append "JOBS="
2227 (number->string (parallel-job-count))))
2231 (lambda* (#:key outputs #:allow-other-keys)
2232 (let ((out (assoc-ref outputs "out"))
2233 (jdk (assoc-ref outputs "jdk"))
2234 (doc (assoc-ref outputs "doc"))
2235 (images (car (find-files "build" ".*-server-release"
2236 #:directories? #t))))
2237 (copy-recursively (string-append images "/images/jdk") jdk)
2238 (copy-recursively (string-append images "/images/jre") out)
2239 (copy-recursively (string-append images "/images/docs") doc))
2241 ;; Some of the libraries in the lib/ folder link to libjvm.so.
2242 ;; But that shared object is located in the server/ folder, so it
2243 ;; cannot be found. This phase creates a symbolic link in the
2244 ;; lib/ folder so that the other libraries can find it.
2247 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
2249 ;; FIXME: Find the bug in the build system, so that this symlink is
2251 (add-after 'install 'install-libjvm
2252 (lambda* (#:key inputs outputs #:allow-other-keys)
2253 (let* ((lib-out (string-append (assoc-ref outputs "out")
2255 (lib-jdk (string-append (assoc-ref outputs "jdk")
2257 (symlink (string-append lib-jdk "/server/libjvm.so")
2258 (string-append lib-jdk "/libjvm.so"))
2259 (symlink (string-append lib-out "/server/libjvm.so")
2260 (string-append lib-out "/libjvm.so")))
2262 (add-after 'install 'strip-character-data-timestamps
2263 (lambda* (#:key outputs #:allow-other-keys)
2264 (use-modules (guix build syscalls))
2265 (let ((archive (string-append
2266 (assoc-ref outputs "jdk") "/lib/src.zip"))
2267 (dir (mkdtemp! "zip-contents.XXXXXX")))
2268 (with-directory-excursion dir
2269 (invoke "unzip" archive))
2270 (delete-file archive)
2271 (with-directory-excursion dir
2272 (let ((char-data-files (find-files "." "CharacterData.*")))
2273 (for-each (lambda (file)
2275 (((string-append "This file was generated "
2276 "AUTOMATICALLY from a template "
2278 (string-append "This file was generated "
2279 "AUTOMATICALLY from a template "
2282 (with-directory-excursion dir
2283 (let ((files (find-files "." ".*" #:directories? #t)))
2284 (apply invoke "zip" "-0" "-X" archive files))))))
2285 (add-after 'strip-character-data-timestamps 'strip-archive-timestamps
2286 (lambda* (#:key outputs #:allow-other-keys)
2287 (use-modules (guix build syscalls)
2288 (ice-9 binary-ports)
2290 (letrec ((repack-archive
2292 (let ((dir (mkdtemp! "zip-contents.XXXXXX")))
2293 (with-directory-excursion dir
2294 (invoke "unzip" archive))
2295 (delete-file archive)
2296 (for-each (compose repack-archive canonicalize-path)
2297 (find-files dir "(ct.sym|.*.jar)$"))
2298 (let ((reset-file-timestamp
2300 (let ((s (lstat file)))
2301 (unless (eq? (stat:type s) 'symlink)
2302 (format #t "reset ~a~%" file)
2303 (utime file 0 0 0 0))))))
2304 (for-each reset-file-timestamp
2305 (find-files dir #:directories? #t)))
2306 (with-directory-excursion dir
2307 (let ((files (find-files "." ".*" #:directories? #t)))
2308 (apply invoke "zip" "-0" "-X" archive files)))))))
2309 (for-each repack-archive
2310 (find-files (assoc-ref outputs "doc") ".*.zip$"))
2311 (for-each repack-archive
2312 (find-files (assoc-ref outputs "jdk")
2313 ".*.(zip|jar|diz)$"))
2314 (repack-archive (string-append (assoc-ref outputs "jdk") "/lib/ct.sym"))
2317 (call-with-input-file file-name
2319 (let ((header #vu8(#x4a #x4d #x01 #x00)))
2320 (if (equal? (get-bytevector-n
2321 file (bytevector-length header))
2323 (let* ((header-length (bytevector-length header))
2324 (temp-file (mkstemp!
2326 "temp-file.XXXXXX")))
2327 (temp-filename (port-filename temp-file))
2329 (- (stat:size (stat file))
2331 (sendfile temp-file file content-length header-length)
2332 (delete-file file-name)
2333 (close-port temp-file)
2334 (repack-archive (canonicalize-path temp-filename))
2335 (call-with-output-file file-name
2337 (put-bytevector file header)
2338 (call-with-input-file temp-filename
2342 (stat:size (stat temp-file)) 0)))))))))))))
2343 (for-each repack-jmod
2344 (find-files (assoc-ref outputs "jdk") ".*.jmod$")))
2346 (add-after 'install 'remove-timestamp-from-api-summary
2347 (lambda* (#:key outputs #:allow-other-keys)
2348 (substitute* (string-append (assoc-ref outputs "doc")
2349 "/api/overview-summary.html")
2350 (("Generated by javadoc \\(11-internal\\).*$")
2351 "Generated by javadoc (11-internal) -->\n"))
2354 `(("alsa-lib" ,alsa-lib)
2356 ("fontconfig" ,fontconfig)
2357 ("freetype" ,freetype)
2360 ("libjpeg" ,libjpeg-turbo)
2363 ("libxext" ,libxext)
2364 ("libxrender" ,libxrender)
2366 ("libxtst" ,libxtst)))
2368 `(("autoconf" ,autoconf)
2369 ("openjdk10" ,openjdk10)
2370 ("openjdk10:jdk" ,openjdk10 "jdk")
2371 ("make" ,gnu-make-4.2)
2372 ("pkg-config" ,pkg-config)
2376 (home-page "https://openjdk.java.net/projects/jdk/11/")
2377 (synopsis "Java development kit")
2379 "This package provides the Java development kit OpenJDK.")
2380 (license license:gpl2+)))
2382 (define-public openjdk12
2389 (uri "http://hg.openjdk.java.net/jdk/jdk/archive/0276cba45aac.tar.bz2")
2390 (file-name (string-append name "-" version ".tar.bz2"))
2393 "0mbhdrk12b6878kby0flnbak7444dlpm0ihlmf92vk59y1c02bc2"))
2394 (modules '((guix build utils)))
2397 (for-each delete-file (find-files "." ".*.(bin|exe|jar)$"))
2400 `(("alsa-lib" ,alsa-lib)
2402 ("fontconfig" ,fontconfig)
2403 ("freetype" ,freetype)
2406 ("libjpeg" ,libjpeg-turbo)
2409 ("libxext" ,libxext)
2410 ("libxrandr" ,libxrandr)
2411 ("libxrender" ,libxrender)
2413 ("libxtst" ,libxtst)))
2415 `(("autoconf" ,autoconf)
2416 ("openjdk11" ,openjdk11)
2417 ("openjdk11:jdk" ,openjdk11 "jdk")
2418 ("make@4.2" ,gnu-make-4.2)
2419 ("pkg-config" ,pkg-config)
2423 (home-page "https://openjdk.java.net/projects/jdk/12")))
2425 (define-public openjdk13
2432 (uri "http://hg.openjdk.java.net/jdk/jdk13/archive/9c250a7600e1.tar.bz2")
2433 (file-name (string-append name "-" version ".tar.bz2"))
2436 "0v0ljvx5dyzp96dw4z4ksw3pvasil7783mgnmd1wk9gads5ab8iq"))
2437 (modules '((guix build utils)))
2440 (for-each delete-file (find-files "." ".*.(bin|exe|jar)$"))
2443 `(("alsa-lib" ,alsa-lib)
2445 ("fontconfig" ,fontconfig)
2446 ("freetype" ,freetype)
2449 ("libjpeg" ,libjpeg-turbo)
2452 ("libxext" ,libxext)
2453 ("libxrandr" ,libxrandr)
2454 ("libxrender" ,libxrender)
2456 ("libxtst" ,libxtst)))
2458 `(("autoconf" ,autoconf)
2459 ("openjdk12:jdk" ,openjdk12 "jdk")
2460 ("make@4.2" ,gnu-make-4.2)
2461 ("pkg-config" ,pkg-config)
2465 (home-page "https://openjdk.java.net/projects/jdk/13")))
2467 (define-public openjdk14
2474 (uri "http://hg.openjdk.java.net/jdk/jdk14/archive/bc54620a3848.tar.bz2")
2475 (file-name (string-append name "-" version ".tar.bz2"))
2478 "0z485pk7r1xpw8004g4nrwrzj17sabgx8yfdbxwfvzkjp8qyajch"))
2479 (modules '((guix build utils)))
2482 ;; The m4 macro uses 'help' to search for builtins, which is
2483 ;; not available in bash-minimal
2484 (substitute* "make/autoconf/basics.m4"
2485 (("if help") "if command -v"))
2486 (for-each delete-file (find-files "." ".*.(bin|exe|jar)$"))
2489 `(("alsa-lib" ,alsa-lib)
2491 ("fontconfig" ,fontconfig)
2492 ("freetype" ,freetype)
2495 ("libjpeg" ,libjpeg-turbo)
2498 ("libxext" ,libxext)
2499 ("libxrandr" ,libxrandr)
2500 ("libxrender" ,libxrender)
2502 ("libxtst" ,libxtst)))
2504 `(("autoconf" ,autoconf)
2505 ("make@4.2" ,gnu-make-4.2)
2506 ("openjdk13:jdk" ,openjdk13 "jdk")
2507 ("pkg-config" ,pkg-config)
2511 (home-page "https://openjdk.java.net/projects/jdk/14")))
2513 (define-public icedtea icedtea-8)
2516 (define-public ant/java8
2517 (package (inherit ant-bootstrap)
2522 (uri (string-append "mirror://apache/ant/source/apache-ant-"
2523 version "-src.tar.gz"))
2526 "1dhkk9ajc378cln6sj9q0ya8bl9dpyji5xcrl1zq41zx1k6j54g5"))
2527 (modules '((guix build utils)))
2530 (for-each delete-file
2531 (find-files "lib/optional" "\\.jar$"))
2534 (substitute-keyword-arguments (package-arguments ant-bootstrap)
2536 `(modify-phases ,phases
2537 (add-after 'unpack 'remove-scripts
2538 ;; Remove bat / cmd scripts for DOS as well as the antRun and runant
2541 (for-each delete-file
2542 (find-files "src/script"
2543 "(.*\\.(bat|cmd)|runant.*|antRun.*)"))
2546 (lambda* (#:key inputs outputs #:allow-other-keys)
2547 (setenv "JAVA_HOME" (assoc-ref inputs "jdk"))
2549 ;; Disable tests to avoid dependency on hamcrest-core, which needs
2550 ;; Ant to build. This is necessary in addition to disabling the
2551 ;; "check" phase, because the dependency on "test-jar" would always
2552 ;; result in the tests to be run.
2553 (substitute* "build.xml"
2554 (("depends=\"jars,test-jar") "depends=\"jars"))
2555 (invoke "bash" "bootstrap.sh"
2556 (string-append "-Ddist.dir="
2557 (assoc-ref outputs "out")))))))))
2559 `(("jdk" ,icedtea-8 "jdk")
2561 ("unzip" ,unzip)))))
2563 ;; The 1.9.x series is the last that can be built with GCJ. The 1.10.x series
2566 (package (inherit ant/java8)
2570 (uri (string-append "mirror://apache/ant/source/apache-ant-"
2571 version "-src.tar.gz"))
2574 "1xy30f1w5gaqk6g3f0vw7ygix4rb6032qkcw42y4z8wd9jihgygd"))))
2576 `(("jdk" ,icedtea-7 "jdk")
2578 ("unzip" ,unzip)))))
2580 (define-public ant-apache-bcel
2583 (name "ant-apache-bcel")
2585 (substitute-keyword-arguments (package-arguments ant/java8)
2587 `(modify-phases ,phases
2588 (add-after 'unpack 'link-bcel
2589 (lambda* (#:key inputs #:allow-other-keys)
2590 (for-each (lambda (file)
2592 (string-append "lib/optional/"
2594 (find-files (assoc-ref inputs "java-commons-bcel")
2597 (add-after 'build 'install
2598 (lambda* (#:key outputs #:allow-other-keys)
2599 (let* ((out (assoc-ref outputs "out"))
2600 (share (string-append out "/share/java"))
2601 (bin (string-append out "/bin"))
2602 (lib (string-append out "/lib")))
2604 (install-file (string-append lib "/ant-apache-bcel.jar") share)
2605 (delete-file-recursively bin)
2606 (delete-file-recursively lib)
2609 `(("java-commons-bcel" ,java-commons-bcel)
2610 ,@(package-inputs ant/java8)))))
2612 (define-public ant-junit
2617 (substitute-keyword-arguments (package-arguments ant/java8)
2619 `(modify-phases ,phases
2620 (add-after 'unpack 'link-junit
2621 (lambda* (#:key inputs #:allow-other-keys)
2622 (for-each (lambda (file)
2624 (string-append "lib/optional/"
2626 (find-files (assoc-ref inputs "java-junit")
2629 (add-after 'build 'install
2630 (lambda* (#:key outputs #:allow-other-keys)
2631 (let* ((out (assoc-ref outputs "out"))
2632 (share (string-append out "/share/java"))
2633 (bin (string-append out "/bin"))
2634 (lib (string-append out "/lib")))
2636 (install-file (string-append lib "/ant-junit.jar") share)
2637 (delete-file-recursively bin)
2638 (delete-file-recursively lib)
2641 `(("java-junit" ,java-junit)
2642 ,@(package-inputs ant/java8)))))
2644 (define-public java-openjfx-build
2646 (name "java-openjfx-build")
2647 ;; This is a java-8 version
2652 (url "http://hg.openjdk.java.net/openjfx/8u-dev/rt")
2653 (changeset (string-append
2654 (string-join (string-split version #\.) "u")
2656 (file-name (string-append name "-" version "-checkout"))
2657 (modules '((guix build utils)))
2660 ;; Delete included gradle jar
2661 (delete-file-recursively "gradle/wrapper")
2665 "0yg38mwpivswccv9n96k06x3iv82i4px1a9xg9l8dswzwmfj259f"))
2666 (patches (search-patches "java-openjfx-build-jdk_version.patch"))))
2667 (build-system ant-build-system)
2669 `(#:jar-name "java-openjfx.jar"
2670 #:source-dir "buildSrc/src/main/java"
2671 #:test-dir "buildSrc/src/test"
2673 (modify-phases %standard-phases
2674 (add-before 'configure 'generate-jsl-parser
2676 (invoke "antlr3" "-o"
2677 "buildSrc/src/main/java/com/sun/scenario/effect/compiler"
2678 "buildSrc/src/main/antlr/JSL.g"))))))
2680 `(("antlr3" ,antlr3)
2681 ("java-stringtemplate" ,java-stringtemplate)))
2683 `(("java-junit" ,java-junit)
2684 ("java-hamcrest-core" ,java-hamcrest-core)))
2685 (home-page "https://openjfx.io")
2686 (synopsis "Graphical application toolkit in Java")
2687 (description "OpenJFX is a client application platform for desktop,
2688 mobile and embedded systems built on Java. Its goal is to produce a
2689 modern, efficient, and fully featured toolkit for developing rich client
2690 applications. This package contains base classes for the OpenJFX
2691 distribution and helper classes for building other parts of the
2693 (license license:gpl2))) ;gpl2 only, with classpath exception
2695 (define-public java-openjfx-base
2696 (package (inherit java-openjfx-build)
2697 (name "java-openjfx-base")
2699 `(#:jar-name "java-openjfx-base.jar"
2700 #:source-dir "modules/base/src/main/java:modules/base/src/main/java8:modules/base/src/main/version-info"
2701 #:test-dir "modules/base/src/test"
2703 (modify-phases %standard-phases
2704 (add-before 'check 'remove-empty-file
2706 (with-directory-excursion "modules/base/src/test/java"
2707 ;; These files are completely commented, but junit expects them to
2708 ;; contain a class, so tests fail.
2710 "com/sun/javafx/property/adapter/PropertyDescriptorTest.java")
2712 "com/sun/javafx/property/adapter/ReadOnlyPropertyDescriptorTest.java")
2713 (delete-file "javafx/beans/property/PropertiesTest.java")
2715 "javafx/beans/property/adapter/ReadOnlyJavaBeanPropertyBuilder_General_Test.java")
2717 (delete-file "com/sun/javafx/runtime/VersionInfoTest.java"))
2720 `(("java-openjfx-build" ,java-openjfx-build)))
2721 (description "OpenJFX is a client application platform for desktop,
2722 mobile and embedded systems built on Java. Its goal is to produce a
2723 modern, efficient, and fully featured toolkit for developing rich client
2724 applications. This package contains base classes for the OpenJFX
2727 (define-public java-openjfx-graphics
2728 (package (inherit java-openjfx-build)
2729 (name "java-openjfx-graphics")
2731 `(#:jar-name "java-openjfx-graphics.jar"
2732 #:source-dir "modules/graphics/src/main/java"
2733 #:tests? #f; require X
2734 #:test-dir "modules/graphics/src/test"
2736 (modify-phases %standard-phases
2737 (add-after 'unpack 'copy-missing-file
2738 (lambda* (#:key inputs #:allow-other-keys)
2739 (let ((target "modules/graphics/src/main/native-prism-sw/JNativeSurface.c"))
2740 (copy-file (assoc-ref inputs "JNativeSurface.c") target)
2741 ;; XXX: looks like the missing file we found isn't *quite*
2744 (("case TYPE_INT_ARGB:") "")))))
2745 (add-after 'build 'build-native
2746 (lambda* (#:key inputs outputs #:allow-other-keys)
2747 (let ((jdk (assoc-ref inputs "jdk"))
2748 (class-file->class-name
2749 (lambda (class-file)
2750 (string-map (lambda (c)
2751 (if (char=? c #\/) #\. c))
2752 (string-drop-right class-file
2753 (string-length ".class"))))))
2755 (string-append "-DINLINE=inline "
2757 "-I" jdk "/include "
2758 "-I" jdk "/include/linux "
2759 "-I " (getcwd) "/build/classes/include "
2760 "-I " (getcwd) "/modules/graphics/src/main/native-prism-sw"))
2762 ;; Instructions have been adapted from buildSrc/linux.gradle
2763 (with-directory-excursion "build/classes"
2767 ;; Generate headers for prism
2768 (apply invoke "javah" "-d" "include" "-cp" "."
2769 (map class-file->class-name
2770 (append (find-files "com/sun/prism/impl" "\\.class$")
2771 (find-files "com/sun/prism" "PresentableState.*\\.class$"))))
2773 ;; ...then for prism_sw
2774 (apply invoke "javah" "-d" "include" "-cp" "."
2775 (map class-file->class-name
2776 (find-files "com/sun/pisces" "\\.class$")))
2778 ;; ...and for prism_es2
2779 (apply invoke "javah" "-d" "include" "-cp" "."
2780 (map class-file->class-name
2781 (find-files "com/sun/prism/es2" "\\.class$")))))
2783 (with-directory-excursion "netbeans/native-prism"
2784 (invoke "make" "CONF=Release"))
2785 (with-directory-excursion "netbeans/native-prism-sw"
2786 (invoke "make" "CONF=Release"))
2787 ;; TODO: This fails due to unknown EGL procedure names
2789 (with-directory-excursion "netbeans/native-prism-es2"
2790 (invoke "make" "CONF=Release"))
2792 (let* ((out (assoc-ref outputs "out"))
2793 (dir ,(match (%current-system)
2796 ((or "armhf-linux" "aarch64-linux")
2798 ((or "x86_64-linux")
2801 (target (string-append out "/share/" dir "/")))
2803 (for-each (lambda (file)
2805 (string-append "lib"
2808 (if (char=? c #\-) #\_ c))
2809 (string-drop (basename file)
2810 (string-length "libnative-"))))))
2812 (string-append target new-name))))
2813 (find-files "netbeans" "\\.so$"))))))))
2815 `(("java-openjfx-base" ,java-openjfx-base)
2816 ("java-swt" ,java-swt)))
2817 ;; XXX: for unknown reasons
2818 ;; modules/graphics/src/main/native-prism-sw/JNativeSurface.c is missing
2819 ;; in this revision.
2821 `(("JNativeSurface.c"
2824 (uri "https://raw.githubusercontent.com/openjdk/jfx/8u20-b02\
2825 /modules/graphics/src/main/native-prism-sw/JNativeSurface.c")
2828 "1kp15wbnd6rn0nciczp5ibq0ikby2yysvx1gnz5fa05vl2mm8mbm"))))))
2829 (description "OpenJFX is a client application platform for desktop,
2830 mobile and embedded systems built on Java. Its goal is to produce a
2831 modern, efficient, and fully featured toolkit for developing rich client
2832 applications. This package contains graphics-related classes for the
2833 OpenJFX distribution.")))
2835 (define-public java-openjfx-media
2836 (package (inherit java-openjfx-build)
2837 (name "java-openjfx-media")
2839 `(("java-openjxf-graphics" ,java-openjfx-graphics)))
2841 `(#:jar-name "java-openjfx-media.jar"
2842 #:source-dir "modules/media/src/main/java"
2843 #:tests? #f)); no tests
2844 (description "OpenJFX is a client application platform for desktop,
2845 mobile and embedded systems built on Java. Its goal is to produce a
2846 modern, efficient, and fully featured toolkit for developing rich client
2847 applications. This package contains media-related classes for the
2848 OpenJFX distribution.")))
2850 (define-public java-openjfx-controls
2851 (package (inherit java-openjfx-build)
2852 (name "java-openjfx-controls")
2854 `(("java-openjxf-graphics" ,java-openjfx-graphics)))
2856 `(#:jar-name "java-openjfx-controls.jar"
2857 #:source-dir "modules/controls/src/main/java"
2858 #:test-dir "modules/controls/src/test"
2859 ;; TODO: tests require com.sun.javafx.pgstub,
2860 ;; javafx.collections.MockSetObserver, and
2861 ;; com.sun.javafx.binding.ExpressionHelperUtility
2864 (modify-phases %standard-phases
2865 (add-after 'unpack 'copy-resources
2867 (copy-recursively "modules/controls/src/test/resources"
2868 "build/test-classes")
2869 (copy-recursively "modules/controls/src/main/resources"
2870 "build/classes"))))))
2871 (description "OpenJFX is a client application platform for desktop,
2872 mobile and embedded systems built on Java. Its goal is to produce a
2873 modern, efficient, and fully featured toolkit for developing rich client
2874 applications. This package contains UI control classes for the
2875 OpenJFX distribution.")))
2877 (define-public javacc-4
2884 (url "https://github.com/javacc/javacc")
2885 (commit "release_41")))
2886 (file-name (string-append "javacc-" version "-checkout"))
2889 "07ysav7j8r1c6h8qxrgqk6lwdp74ly0ad1935lragxml0qqc3ka0"))
2890 (modules '((guix build utils)))
2891 ;; delete bundled jars
2892 (snippet '(begin (delete-file-recursively "lib") #t))))
2893 (build-system ant-build-system)
2895 ;; /tmp/guix-build-javacc-4.1.drv-0/source/test/javacodeLA/build.xml:60:
2900 (modify-phases %standard-phases
2901 ;; Delete tests to avoid build failure (we don't run them anyway).
2902 (add-after 'unpack 'delete-tests
2904 (for-each delete-file
2905 '("src/org/javacc/JavaCCTestCase.java"
2906 "src/org/javacc/parser/ExpansionTest.java"
2907 "src/org/javacc/parser/OptionsTest.java"
2908 "src/org/javacc/jjtree/JJTreeOptionsTest.java"))
2909 (for-each delete-file-recursively
2910 '("src/org/javacc/parser/test"
2911 "src/org/javacc/jjdoc/test"))
2913 (replace 'install (install-jars "bin/lib")))))
2914 (home-page "https://javacc.org/")
2915 (synopsis "Java parser generator")
2916 (description "Java Compiler Compiler (JavaCC) is the most popular parser
2917 generator for use with Java applications. A parser generator is a tool that
2918 reads a grammar specification and converts it to a Java program that can
2919 recognize matches to the grammar. In addition to the parser generator itself,
2920 JavaCC provides other standard capabilities related to parser generation such
2921 as tree building (via a tool called JJTree included with JavaCC), actions,
2923 (license license:bsd-3)))
2925 ;; javacc-3, as javacc-4 is not properly bootstrapped: is contains a javacc.jar
2926 ;; in the bootstrap/ directory.
2927 (define-public javacc-3
2934 (url "https://github.com/javacc/javacc")
2935 (commit "release_32")))
2936 (file-name (string-append "javacc-" version "-checkout"))
2939 "1pyf1xyh8gk83nxqn2v2mdws32l68ydznha41cxa4l2kkbq1v1g3"))))
2943 (modify-phases %standard-phases
2944 (add-before 'build 'set-java-version
2949 (("debug=") "source=\"1.4\" debug=")))
2950 (find-files "." "build.xml"))
2952 (replace 'install (install-jars "bin/lib")))))))
2954 (define-public javacc
2962 (url "https://github.com/javacc/javacc")
2964 (file-name (git-file-name "javacc" version))
2966 (base32 "18kkak3gda93gr25jrgy6q00g0jr8i24ri2wk4kybz1v234fxx9i"))
2967 (modules '((guix build utils)))
2968 ;; Delete bundled jars.
2969 (snippet '(begin (for-each delete-file-recursively
2970 '("bootstrap" "lib"))
2973 `(#:make-flags ; bootstrap from javacc-4
2974 (list (string-append "-Dbootstrap-jar="
2975 (assoc-ref %build-inputs "javacc")
2976 "/share/java/javacc.jar"))
2977 #:test-target "test"
2979 (modify-phases %standard-phases
2980 (replace 'install (install-jars "target"))
2981 (add-after 'install 'install-bin
2982 (lambda* (#:key outputs inputs #:allow-other-keys)
2983 (let* ((out (assoc-ref outputs "out"))
2984 (dir (string-append out "/share/java"))
2985 (bin (string-append out "/bin"))
2986 (javacc (string-append bin "/javacc")))
2988 (with-output-to-file javacc
2991 (string-append "#!/bin/sh\n"
2992 (assoc-ref inputs "jdk") "/bin/java"
2993 " -cp " dir "/javacc.jar" " `basename $0`" " $*"))))
2994 (chmod javacc #o755)
2995 ;; symlink to different names to affect the first argument and
2996 ;; change the behavior of the jar file.
2997 (symlink javacc (string-append bin "/jjdoc"))
2998 (symlink javacc (string-append bin "/jjtree"))
3002 `(("javacc" ,javacc-4)))))
3004 ;; This is the last 3.x release of ECJ
3005 (define-public java-ecj-3
3011 (uri (string-append "http://archive.eclipse.org/eclipse/"
3012 "downloads/drops/R-" version
3013 "-201301310800/ecjsrc-" version ".jar"))
3016 "01mdj14jw11g1jfnki4fi8229p0c6zzckd38zqy2w4m3cjcvsx04"))))
3017 (build-system ant-build-system)
3019 `(#:tests? #f ; none included
3020 #:jdk ,icedtea-7 ; doesn't build with JDK8+
3021 #:make-flags (list "-f" "src/build.xml")
3022 #:build-target "build"
3024 (modify-phases %standard-phases
3025 (add-after 'unpack 'fix-manifest
3027 ;; Record the main class to make ecj executable.
3028 (with-atomic-file-replacement "src/META-INF/MANIFEST.MF"
3030 (display "Manifest-Version: 1.0
3031 Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n"
3034 (replace 'install (install-jars ".")))))
3035 (home-page "https://eclipse.org")
3036 (synopsis "Eclipse Java development tools core batch compiler")
3037 (description "This package provides the Eclipse Java core batch compiler.")
3038 (license license:epl1.0)))
3040 ;; This is needed for java-cisd-args4j
3041 (define-public java-ecj-3.5
3042 (package (inherit java-ecj-3)
3045 (method url-fetch/zipbomb)
3046 (uri (string-append "http://archive.eclipse.org/eclipse/"
3047 "downloads/drops/R-" version
3048 "-200909170800/ecjsrc-" version ".zip"))
3051 "1vnl2mavisc567bip736xzsvvbjif5279wc4a7pbdik5wlir8qr7"))))
3052 (build-system ant-build-system)
3054 `(#:tests? #f ; none included
3055 #:jdk ,icedtea-7 ; doesn't build with JDK8+
3056 #:build-target "build"
3058 (modify-phases %standard-phases
3059 (add-after 'unpack 'fix-manifest
3061 ;; Record the main class to make ecj executable.
3062 (with-atomic-file-replacement "META-INF/MANIFEST.MF"
3065 (display "Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n"
3068 (replace 'install (install-jars ".")))))
3070 `(("unzip" ,unzip)))))
3072 (define-public java-ecj
3073 (package (inherit java-ecj-3)
3079 "http://archive.eclipse.org/eclipse/downloads/drops4/R-"
3081 "-201703010400/ecjsrc-"
3086 "11cfgsdgznja1pvlxkjbqykxd7pcd5655vkm7s44xmahmap15gpl"))))
3088 `(#:tests? #f ; none included
3089 #:build-target "build"
3091 (modify-phases %standard-phases
3092 (add-after 'unpack 'fix-build.xml
3094 (substitute* "src/build.xml"
3098 (add-after 'unpack 'fix-prop
3100 (substitute* "src/build.xml"
3101 (("^.*properties.*$")
3102 "<include name=\"**/*.properties\"/>
3103 <include name=\"**/*.props\"/>"))
3105 (add-before 'build 'chdir
3109 (replace 'install (install-jars ".")))))))
3111 (define-public java-cisd-base
3112 (let ((revision 38938)
3113 (base-version "14.12.0"))
3115 (name "java-cisd-base")
3116 (version (string-append base-version "-" (number->string revision)))
3120 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
3121 "base/tags/release/"
3122 (version-major+minor base-version)
3123 ".x/" base-version "/base/"))
3124 (revision revision)))
3125 (file-name (string-append "java-cisd-base-" version "-checkout"))
3128 "1i5adyf7nzclb0wydgwa1az04qliid8035vpahaandmkmigbnxiy"))
3129 (modules '((guix build utils)))
3132 ;; Delete included gradle jar
3133 (delete-file-recursively "gradle/wrapper")
3134 ;; Delete pre-built native libraries
3135 (delete-file-recursively "libs")
3137 (build-system ant-build-system)
3139 `(#:make-flags '("-file" "build/build.xml")
3140 #:test-target "jar-test"
3143 (modify-phases %standard-phases
3144 (add-after 'unpack 'unpack-build-resources
3145 (lambda* (#:key inputs #:allow-other-keys)
3146 (copy-recursively (assoc-ref inputs "build-resources")
3147 "../build_resources")
3149 (add-after 'unpack-build-resources 'fix-dependencies
3150 (lambda* (#:key inputs #:allow-other-keys)
3151 (substitute* "build/build.xml"
3152 (("\\$\\{lib\\}/testng/testng-jdk15.jar")
3153 (string-append (assoc-ref inputs "java-testng")
3154 "/share/java/java-testng.jar"))
3155 (("\\$\\{lib\\}/commons-lang/commons-lang.jar")
3156 (string-append (assoc-ref inputs "java-commons-lang")
3157 "/share/java/commons-lang-"
3158 ,(package-version java-commons-lang) ".jar"))
3159 (("\\$\\{lib\\}/commons-io/commons-io.jar")
3160 (string-append (assoc-ref inputs "java-commons-io")
3161 "/lib/m2/commons-io/commons-io/"
3162 ,(package-version java-commons-io)
3164 ,(package-version java-commons-io)
3166 ;; Remove dependency on svn
3167 (("<build-info.*") "")
3168 (("\\$\\{revision.number\\}")
3169 ,(number->string revision))
3170 (("\\$\\{version.number\\}") ,base-version))
3171 ;; Remove dependency on classycle
3172 (substitute* "../build_resources/ant/build-common.xml"
3173 (("<taskdef name=\"dependency-checker.*") "")
3174 (("classname=\"classycle.*") "")
3175 (("classpath=\"\\$\\{lib\\}/classycle.*") ""))
3177 ;; A few tests fail because of the lack of a proper /etc/groups and
3178 ;; /etc/passwd file in the build container.
3179 (add-after 'unpack 'disable-broken-tests
3181 (substitute* "sourceTest/java/ch/systemsx/cisd/base/AllTests.java"
3182 (("Unix.isOperational\\(\\)") "false"))
3184 ;; These decorators are almost useless and pull in an unpackaged
3186 (add-after 'unpack 'remove-useless-decorators
3188 (substitute* "source/java/ch/systemsx/cisd/base/unix/Unix.java"
3190 (("import ch.rinn.restrictions.Private;") ""))
3191 (substitute* "sourceTest/java/ch/systemsx/cisd/base/unix/UnixTests.java"
3193 (("import ch.rinn.restrictions.Friend;") ""))
3195 (add-before 'configure 'build-native-code
3196 (lambda* (#:key inputs #:allow-other-keys)
3197 (let ((jdk (assoc-ref inputs "jdk"))
3198 (dir ,(match (%current-system)
3201 ((or "armhf-linux" "aarch64-linux")
3203 ((or "x86_64-linux")
3205 (_ "unknown-Linux"))))
3206 (with-directory-excursion "source/c"
3207 (invoke "gcc" "-shared" "-O3" "-fPIC" "unix.c"
3208 (string-append "-I" jdk "/include")
3209 (string-append "-I" jdk "/include/linux")
3211 (invoke "gcc" "-shared" "-O3" "-fPIC"
3212 "-DMACHINE_BYTE_ORDER=1"
3220 (string-append "-I" jdk "/include")
3221 (string-append "-I" jdk "/include/linux")
3222 "-o" "libnativedata.so"))
3223 (install-file "source/c/libunix.so"
3224 (string-append "libs/native/unix/" dir))
3225 (install-file "source/c/libnativedata.so"
3226 (string-append "libs/native/nativedata/" dir))
3228 ;; In the "check" phase we only build the test executable.
3229 (add-after 'check 'run-tests
3231 (invoke "java" "-jar" "targets/dist/sis-base-test.jar")
3232 (delete-file "targets/dist/sis-base-test.jar")
3234 (replace 'install (install-jars "targets/dist")))))
3236 `(("jdk" ,icedtea-8)
3237 ("java-commons-lang" ,java-commons-lang)
3238 ("java-commons-io" ,java-commons-io)
3239 ("java-testng" ,java-testng)
3244 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
3245 "base/tags/release/"
3246 (version-major+minor base-version)
3248 "/build_resources/"))
3249 (revision revision)))
3252 "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk"))))))
3253 (home-page "http://svnsis.ethz.ch")
3254 (synopsis "Utility classes for libraries from ETH Zurich")
3255 (description "This library supplies some utility classes needed for
3256 libraries from the SIS division at ETH Zurich like jHDF5.")
3257 ;; The C sources are under a non-copyleft license, which looks like a
3258 ;; variant of the BSD licenses. The whole package is under the ASL2.0.
3259 (license (list license:asl2.0
3260 (license:non-copyleft "file://source/c/COPYING"))))))
3262 (define-public java-cisd-args4j
3263 (let ((revision 39162)
3264 (base-version "9.11.2"))
3266 (name "java-cisd-args4j")
3267 (version (string-append base-version "-" (number->string revision)))
3271 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
3272 "args4j/tags/release/"
3273 (version-major+minor base-version)
3274 ".x/" base-version "/args4j/"))
3275 (revision revision)))
3276 (file-name (string-append "java-cisd-args4j-" version "-checkout"))
3279 "0hhqznjaivq7ips7mkwas78z42s6djsm20rrs7g1zd59rcsakxn2"))))
3280 (build-system ant-build-system)
3282 `(#:make-flags '("-file" "build/build.xml")
3283 #:tests? #f ; there are no tests
3284 ;; There are weird build failures with JDK8, such as: "The type
3285 ;; java.io.ObjectInputStream cannot be resolved. It is indirectly
3286 ;; referenced from required .class files"
3288 #:modules ((guix build ant-build-system)
3290 (guix build java-utils)
3295 (modify-phases %standard-phases
3296 (add-after 'unpack 'unpack-build-resources
3297 (lambda* (#:key inputs #:allow-other-keys)
3298 (mkdir-p "../build_resources")
3299 (invoke "tar" "xf" (assoc-ref inputs "build-resources")
3300 "-C" "../build_resources"
3301 "--strip-components=1")
3302 (mkdir-p "../build_resources/lib")
3304 (add-after 'unpack-build-resources 'fix-dependencies
3305 (lambda* (#:key inputs #:allow-other-keys)
3306 ;; FIXME: There should be a more convenient abstraction for
3307 ;; editing XML files.
3308 (with-directory-excursion "../build_resources/ant/"
3309 (chmod "build-common.xml" #o664)
3310 (call-with-output-file "build-common.xml.new"
3314 (with-input-from-file "build-common.xml"
3315 (lambda _ (xml->sxml #:trim-whitespace? #t)))
3316 `(;; Remove dependency on classycle and custom ant tasks
3317 (taskdef . ,(lambda (tag . kids)
3318 (let ((name ((sxpath '(name *text*)) kids)))
3319 (if (or (member "build-info" name)
3320 (member "dependency-checker" name)
3321 (member "build-java-subprojects" name)
3322 (member "project-classpath" name))
3325 (typedef . ,(lambda (tag . kids)
3326 (let ((name ((sxpath '(name *text*)) kids)))
3327 (if (member "recursive-jar" name)
3330 (build-java-subprojects . ,(lambda _ '()))
3331 ;; Ignore everything else
3332 (*default* . ,(lambda (tag . kids) `(,tag ,@kids)))
3333 (*text* . ,(lambda (_ txt) txt))))
3335 (rename-file "build-common.xml.new" "build-common.xml"))
3336 (substitute* "build/build.xml"
3337 (("\\$\\{lib\\}/cisd-base/cisd-base.jar")
3338 (string-append (assoc-ref inputs "java-cisd-base")
3339 "/share/java/sis-base.jar"))
3340 ;; Remove dependency on svn
3341 (("<build-info.*") "")
3342 (("\\$\\{revision.number\\}")
3343 ,(number->string revision))
3344 (("\\$\\{version.number\\}") ,base-version)
3345 ;; Don't use custom ant tasks.
3346 (("recursive-jar") "jar")
3347 (("<project-classpath.*") ""))
3349 (replace 'install (install-jars "targets/dist")))))
3351 `(("java-cisd-base" ,java-cisd-base)))
3353 `(("ecj" ,java-ecj-3.5)
3358 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
3359 "args4j/tags/release/"
3360 (version-major+minor base-version)
3362 "/build_resources/"))
3363 (revision revision)))
3366 "056cam4k8pll7ass31sy6gwn8g8719njc41yf4l02b0342nilkyf"))
3367 (modules '((guix build utils)))
3368 ;; Delete bundled pre-built jars.
3370 '(begin (delete-file-recursively "lib/") #t))))))
3371 (home-page "http://svnsis.ethz.ch")
3372 (synopsis "Command line parser library")
3373 (description "This package provides a parser for command line arguments.")
3374 (license license:asl2.0))))
3376 (define-public java-cisd-jhdf5
3377 (let ((revision 39162)
3378 (base-version "14.12.6"))
3380 (name "java-cisd-jhdf5")
3381 (version (string-append base-version "-" (number->string revision)))
3385 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
3386 "jhdf5/tags/release/"
3387 (version-major+minor base-version)
3388 ".x/" base-version "/jhdf5/"))
3389 (revision revision)))
3390 (file-name (string-append "java-cisd-jhdf5-" version "-checkout"))
3393 "13i17s2hn0q9drdqvp8csy7770p3hdbh9rp30ihln2ldkfawdmz0"))
3394 (modules '((guix build utils)))
3397 ;; Delete included gradle jar
3398 (delete-file-recursively "gradle/wrapper")
3399 ;; Delete pre-built native libraries
3400 (delete-file-recursively "libs")
3402 (build-system ant-build-system)
3404 `(#:make-flags '("-file" "build/build.xml")
3405 #:build-target "jar-all"
3406 #:test-target "jar-test"
3409 (modify-phases %standard-phases
3410 ;; FIXME: this build phase fails.
3411 (delete 'generate-jar-indices)
3412 ;; Don't erase results from the build phase when building tests.
3413 (add-after 'unpack 'separate-test-target-from-clean
3415 (substitute* "build/build.xml"
3416 (("\"jar-test\" depends=\"clean, ")
3417 "\"jar-test\" depends=\""))
3419 (add-after 'unpack 'unpack-build-resources
3420 (lambda* (#:key inputs #:allow-other-keys)
3421 (copy-recursively (assoc-ref inputs "build-resources")
3422 "../build_resources")
3423 (delete-file-recursively "../build_resources/lib/")
3424 (mkdir-p "../build_resources/lib")
3425 ;; Remove dependency on classycle
3426 (substitute* "../build_resources/ant/build-common.xml"
3427 (("<taskdef name=\"dependency-checker.*") "")
3428 (("classname=\"classycle.*") "")
3429 (("classpath=\"\\$\\{lib\\}/classycle.*") ""))
3430 ;; Remove dependency on svn
3431 (substitute* "build/build.xml"
3432 (("<build-info.*") "")
3433 (("\\$\\{revision.number\\}")
3434 ,(number->string revision))
3435 (("\\$\\{version.number\\}") ,base-version))
3437 (add-after 'unpack-build-resources 'fix-dependencies
3438 (lambda* (#:key inputs #:allow-other-keys)
3439 (substitute* "../build_resources/ant/build-common.xml"
3440 (("../libraries/testng/testng-jdk15.jar")
3441 (string-append (assoc-ref inputs "java-testng")
3442 "/share/java/java-testng.jar")))
3443 (substitute* "build/build.xml"
3444 (("\\$\\{lib\\}/sis-base/sis-base.jar")
3445 (string-append (assoc-ref inputs "java-cisd-base")
3446 "/share/java/sis-base.jar"))
3447 (("\\$\\{lib\\}/cisd-args4j/cisd-args4j.jar")
3448 (string-append (assoc-ref inputs "java-cisd-args4j")
3449 "/share/java/cisd-args4j.jar"))
3450 (("\\$\\{lib\\}/commons-lang/commons-lang.jar")
3451 (string-append (assoc-ref inputs "java-commons-lang")
3452 "/share/java/commons-lang-"
3453 ,(package-version java-commons-lang) ".jar"))
3454 (("\\$\\{lib\\}/commons-io/commons-io.jar")
3455 (string-append (assoc-ref inputs "java-commons-io")
3456 "/lib/m2/commons-io/commons-io/"
3457 ,(package-version java-commons-io)
3459 ,(package-version java-commons-io)
3461 (("\\$\\{lib\\}/testng/testng-jdk15.jar")
3462 (string-append (assoc-ref inputs "java-testng")
3463 "/share/java/java-testng.jar"))
3464 (("\\$\\{lib\\}/junit4/junit.jar")
3465 (car (find-files (assoc-ref inputs "java-junit") "jar$")))
3466 (("\\$\\{lib\\}/jmock/hamcrest/hamcrest-core.jar")
3467 (car (find-files (assoc-ref inputs "java-hamcrest-core")
3469 ;; Remove dependency on ch.rinn.restrictions
3470 (with-directory-excursion "source/java/ch/systemsx/cisd/hdf5/"
3471 (substitute* '("BitSetConversionUtils.java"
3473 (("import ch.rinn.restrictions.Private;") "")
3475 (with-directory-excursion "sourceTest/java/ch/systemsx/cisd/hdf5/"
3476 (substitute* '("BitSetConversionTest.java"
3477 "h5ar/HDF5ArchiverTest.java")
3478 (("import ch.rinn.restrictions.Friend;") "")
3480 ;; Remove leftovers from removing @Friend
3481 (substitute* "h5ar/HDF5ArchiverTest.java"
3482 (("\\{ HDF5Archiver.class, IdCache.class, LinkRecord.class \\}\\)")
3485 (add-before 'configure 'build-native-library
3486 (lambda* (#:key inputs #:allow-other-keys)
3487 (let ((jdk (assoc-ref inputs "jdk"))
3488 (hdf5 (assoc-ref inputs "hdf5"))
3489 (dir ,(match (%current-system)
3492 ((or "armhf-linux" "aarch64-linux")
3494 ((or "x86_64-linux")
3496 (_ "unknown-Linux"))))
3497 (with-directory-excursion "source/c"
3498 (apply invoke `("gcc" "-shared" "-O3"
3500 "-Wl,--exclude-libs,ALL"
3501 ,@(find-files "jhdf5" "\\.c$")
3502 ,@(find-files "hdf-java" "\\.c$")
3503 ,(string-append "-I" hdf5 "/include")
3504 ,(string-append "-I" jdk "/include")
3505 ,(string-append "-I" jdk "/include/linux")
3506 ,(string-append hdf5 "/lib/libhdf5.a")
3507 "-o" "libjhdf5.so" "-lz")))
3508 (install-file "source/c/libjhdf5.so"
3509 (string-append "libs/native/jhdf5/" dir))
3511 ;; In the "check" phase we only build the test executable.
3512 (add-after 'check 'run-tests
3514 (invoke "java" "-jar" "targets/dist/sis-jhdf5-test.jar")
3515 (delete-file "targets/dist/sis-jhdf5-test.jar")
3518 (install-jars "targets/dist")))))
3520 `(("java-cisd-base" ,java-cisd-base)
3521 ("java-cisd-args4j" ,java-cisd-args4j)
3522 ("java-commons-lang" ,java-commons-lang)
3523 ("java-commons-io" ,java-commons-io)
3527 `(("jdk" ,icedtea-8)
3528 ("java-testng" ,java-testng)
3529 ("java-junit" ,java-junit)
3530 ("java-jmock" ,java-jmock)
3531 ("java-hamcrest-core" ,java-hamcrest-core)
3536 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
3537 "jhdf5/tags/release/"
3538 (version-major+minor base-version)
3540 "/build_resources/"))
3541 (revision revision)))
3544 "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk"))))))
3545 (home-page "https://wiki-bsse.ethz.ch/display/JHDF5/")
3546 (synopsis "Java binding for HDF5")
3547 (description "JHDF5 is a high-level API in Java for reading and writing
3548 HDF5 files, building on the libraries provided by the HDF Group.")
3549 ;; The C sources are under a non-copyleft license, which looks like a
3550 ;; variant of the BSD licenses. The whole package is under the ASL2.0.
3551 (license (list license:asl2.0
3552 (license:non-copyleft "file://source/c/COPYING"))))))
3554 (define-public java-classpathx-servletapi
3556 (name "java-classpathx-servletapi")
3560 (uri (string-append "mirror://gnu/classpathx/servletapi/"
3561 "servletapi-" version ".tar.gz"))
3564 "07d8h051siga2f33fra72hk12sbq1bxa4jifjg0qj0vfazjjff0x"))))
3565 (build-system ant-build-system)
3567 `(#:tests? #f ; there is no test target
3568 #:build-target "compile"
3570 (list "-Dbuild.compiler=javac1.8"
3571 (string-append "-Ddist=" (assoc-ref %outputs "out")))
3573 (modify-phases %standard-phases
3575 (lambda* (#:key make-flags #:allow-other-keys)
3576 (apply invoke `("ant" "dist" ,@make-flags)))))))
3577 (home-page "https://www.gnu.org/software/classpathx/")
3578 (synopsis "Java servlet API implementation")
3579 (description "This is the GNU servlet API distribution, part of the
3580 ClasspathX project. It provides implementations of version 3.0 of the servlet
3581 API and version 2.1 of the Java ServerPages API.")
3582 (license license:gpl3+)))
3584 (define-public java-javaee-servletapi
3586 (name "java-javaee-servletapi")
3591 (url "https://github.com/javaee/servlet-spec")
3593 (file-name (git-file-name name version))
3596 "0s03lj8w5an70lkqbjycgfrfk0kc07vbfav91jzk87gh3awf9ksl"))))
3597 (build-system ant-build-system)
3599 `(#:jar-name "javax-servletapi.jar"
3602 #:source-dir "src/main/java"
3604 (modify-phases %standard-phases
3605 (add-before 'build 'copy-resources
3607 (mkdir-p "build/classes/javax/servlet/http")
3608 (let ((from-prefix "src/main/java/javax/servlet/")
3609 (to-prefix "build/classes/javax/servlet/"))
3610 (for-each (lambda (f)
3611 (copy-file (string-append from-prefix f)
3612 (string-append to-prefix f)))
3613 (list "LocalStrings_ja.properties"
3614 "LocalStrings.properties"
3615 "LocalStrings_fr.properties"
3616 "http/LocalStrings_es.properties"
3617 "http/LocalStrings_ja.properties"
3618 "http/LocalStrings.properties"
3619 "http/LocalStrings_fr.properties")))
3622 `(("unzip" ,unzip)))
3623 (home-page "https://javaee.github.io/servlet-spec/")
3624 (synopsis "Java servlet API")
3625 (description "Java Servlet is the foundation web specification in the
3626 Java Enterprise Platform. Developers can build web applications using the
3627 Servlet API to interact with the request/response workflow. This project
3628 provides information on the continued development of the Java Servlet
3630 ;; Main code is dual-licensed by Oracle under either GLP2 or CDDL 1.1.
3631 ;; Some files are licensed under ASL 2.0.
3632 (license (list license:asl2.0 license:gpl2 license:cddl1.1))))
3634 (define-public java-swt
3639 ;; The types of many variables and procedures differ in the sources
3640 ;; dependent on whether the target architecture is a 32-bit system or a
3641 ;; 64-bit system. Instead of patching the sources on demand in a build
3642 ;; phase we download either the 32-bit archive (which mostly uses "int"
3643 ;; types) or the 64-bit archive (which mostly uses "long" types).
3644 (let ((hash32 "09q0cbh90d90q3a7dx9430kc4m6bijrkr4lajrmzzvi0jjdpq4v9")
3645 (hash64 "17k5hs75a87ssmc5xhwdfdm2gn4zba0r837l2455za01krnkaa2q")
3648 (let-values (((hash file)
3649 (match (or (%current-target-system) (%current-system))
3650 ("x86_64-linux" (values hash64 file64))
3651 (_ (values hash32 file32)))))
3655 "http://download.eclipse.org/eclipse/downloads/drops4/"
3656 "R-" version "-201710090410/swt-" version
3657 "-gtk-linux-" file ".zip"))
3658 (sha256 (base32 hash))))))
3659 (build-system ant-build-system)
3661 `(#:jar-name "swt.jar"
3663 #:tests? #f ; no "check" target
3665 (modify-phases %standard-phases
3667 (lambda* (#:key source #:allow-other-keys)
3669 (invoke "unzip" source "-d" "swt")
3672 (invoke "unzip" "src.zip" "-d" "src")))
3673 ;; The classpath contains invalid icecat jars. Since we don't need
3674 ;; anything other than the JDK on the classpath, we can simply unset
3676 (add-after 'configure 'unset-classpath
3677 (lambda _ (unsetenv "CLASSPATH") #t))
3678 (add-before 'build 'build-native
3679 (lambda* (#:key inputs outputs #:allow-other-keys)
3680 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
3681 ;; Build shared libraries. Users of SWT have to set the system
3682 ;; property swt.library.path to the "lib" directory of this
3685 (setenv "OUTPUT_DIR" lib)
3686 (with-directory-excursion "src"
3687 (invoke "bash" "build.sh")))))
3688 (add-after 'install 'install-native
3689 (lambda* (#:key outputs #:allow-other-keys)
3690 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
3691 (for-each (lambda (file)
3692 (install-file file lib))
3693 (find-files "." "\\.so$"))
3697 ("libxtst" ,libxtst)
3702 `(("pkg-config" ,pkg-config)
3704 (home-page "https://www.eclipse.org/swt/")
3705 (synopsis "Widget toolkit for Java")
3707 "SWT is a widget toolkit for Java designed to provide efficient, portable
3708 access to the user-interface facilities of the operating systems on which it
3710 ;; SWT code is licensed under EPL1.0
3711 ;; Gnome and Gtk+ bindings contain code licensed under LGPLv2.1
3712 ;; Cairo bindings contain code under MPL1.1
3713 ;; XULRunner 1.9 bindings contain code under MPL2.0
3718 license:lgpl2.1+))))
3720 ;; java-hamcrest-core uses qdox version 1.12. We package this version instead
3721 ;; of the latest release.
3722 (define-public java-qdox-1.12
3728 (uri (string-append "https://repo1.maven.org/maven2/"
3729 "com/thoughtworks/qdox/qdox/" version
3730 "/qdox-" version "-sources.jar"))
3733 "0hlfbqq2avf5s26wxkksqmkdyk6zp9ggqn37c468m96mjv0n9xfl"))))
3734 (build-system ant-build-system)
3736 `(;; Tests require junit
3738 #:jar-name "qdox.jar"
3740 (modify-phases %standard-phases
3742 (lambda* (#:key source #:allow-other-keys)
3744 (with-directory-excursion "src"
3745 (invoke "jar" "-xf" source))))
3746 ;; At this point we don't have junit, so we must remove the API
3748 (add-after 'unpack 'delete-tests
3750 (delete-file-recursively "src/com/thoughtworks/qdox/junit")
3752 (home-page "https://github.com/codehaus/qdox")
3753 (synopsis "Parse definitions from Java source files")
3755 "QDox is a high speed, small footprint parser for extracting
3756 class/interface/method definitions from source files complete with JavaDoc
3757 @code{@@tags}. It is designed to be used by active code generators or
3758 documentation tools.")
3759 (license license:asl2.0)))
3761 (define-public java-qdox
3764 ; Newer version exists, but this version is required by java-plexus-component-metadata
3768 ;; 2.0-M4, -M5 at https://github.com/paul-hammant/qdox
3769 ;; Older releases at https://github.com/codehaus/qdox/
3770 ;; Note: The release at maven is pre-generated. The release at
3771 ;; github requires jflex.
3772 (uri (string-append "https://repo1.maven.org/maven2/"
3773 "com/thoughtworks/qdox/qdox/" version
3774 "/qdox-" version "-sources.jar"))
3777 "10xxrcaicq6axszcr2jpygisa4ch4sinyx5q7kqqxv4lknrmxp5x"))))
3778 (build-system ant-build-system)
3780 `(#:jar-name "qdox.jar"
3781 #:tests? #f; no tests
3783 ((guix build ant-build-system)
3784 (guix build java-utils)
3788 (modify-phases %standard-phases
3789 (add-before 'install 'create-pom
3791 (with-output-to-file "pom.xml"
3795 (modelVersion "4.0.0")
3797 (groupId "com.thoughtworks.qdox")
3799 (version ,,version))))))
3802 (install-from-pom "pom.xml")))))
3803 (home-page "https://github.com/codehaus/qdox")
3804 (synopsis "Parse definitions from Java source files")
3805 (description "QDox is a high speed, small footprint parser for extracting
3806 class/interface/method definitions from source files complete with JavaDoc
3807 @code{@@tags}. It is designed to be used by active code generators or
3808 documentation tools.")
3809 (license license:asl2.0)))
3811 (define-public java-qdox-2-M9
3814 (version "2.0-M9"); required by plexus-java
3817 ;; 2.0-M4, -M5 at https://github.com/paul-hammant/qdox
3818 ;; Older releases at https://github.com/codehaus/qdox/
3819 ;; Note: The release at maven is pre-generated. The release at
3820 ;; github requires jflex.
3821 (uri (string-append "https://repo1.maven.org/maven2/"
3822 "com/thoughtworks/qdox/qdox/" version
3823 "/qdox-" version "-sources.jar"))
3826 "1s2jnmx2dkwnaha12lcj26aynywgwa8sslc47z82wx8xai13y4fg"))))))
3828 (define-public java-jarjar
3830 (name "java-jarjar")
3835 "https://storage.googleapis.com/google-code-archive-downloads/v2/"
3836 "code.google.com/jarjar/jarjar-src-" version ".zip"))
3839 "1v8irhni9cndcw1l1wxqgry013s2kpj0qqn57lj2ji28xjq8ndjl"))
3840 (modules '((guix build utils)))
3843 ;; Delete bundled thirds-party jar archives.
3844 (delete-file-recursively "lib")
3845 (delete-file "src/test/enumtest.jar")
3846 ;; the CLASSPATH needs this directory, create an empty one
3849 (build-system ant-build-system)
3851 `(;; Tests require junit, which ultimately depends on this package.
3853 #:build-target "jar"
3855 (modify-phases %standard-phases
3856 (add-before 'build 'do-not-use-bundled-asm
3857 (lambda* (#:key inputs #:allow-other-keys)
3858 (substitute* "build.xml"
3859 (("<path id=\"path.build\">")
3860 (string-append "<path id=\"path.build\"><fileset dir=\""
3861 (assoc-ref inputs "java-asm-bootstrap")
3862 "/lib/m2\" includes=\"**/*.jar\"/>"))
3863 (("<zipfileset src=\"lib/asm-4.0.jar\"/>") "")
3864 (("lib/asm-commons-4.0.jar")
3865 (car (find-files (assoc-ref inputs "java-asm-bootstrap")
3867 (("<include name=\"org/objectweb/asm/commons/Remap\\*\\.class\"/>")
3868 (string-append "<include name=\"org/objectweb/asm/"
3869 "commons/Remap*.class\"/>"
3870 "<include name=\"org/objectweb/asm/*.class\"/>"
3871 "<include name=\"org/objectweb/asm/"
3872 "signature/*.class\"/>"
3873 "<include name=\"org/objectweb/asm/"
3874 "commons/SignatureRemapper.class\"/>")))
3876 (add-before 'build 'remove-maven-dependency
3878 ;; We do not need to build jarjar as a maven plugin just yet, so
3879 ;; remove this file. Maven requires jarjar (but not that plugin),
3880 ;; so removing it improves the bootstrap.
3881 (delete-file "src/main/com/tonicsystems/jarjar/JarJarMojo.java")
3884 (lambda* (#:key outputs #:allow-other-keys)
3885 (let ((target (string-append (assoc-ref outputs "out")
3887 (install-file (string-append "dist/jarjar-" ,version ".jar")
3891 `(("java-asm-bootstrap" ,java-asm-bootstrap)))
3893 `(("unzip" ,unzip)))
3894 (home-page "https://code.google.com/archive/p/jarjar/")
3895 (synopsis "Repackage Java libraries")
3897 "Jar Jar Links is a utility that makes it easy to repackage Java
3898 libraries and embed them into your own distribution. Jar Jar Links includes
3899 an Ant task that extends the built-in @code{jar} task.")
3900 (license license:asl2.0)))
3902 (define-public java-hamcrest-core
3904 (name "java-hamcrest-core")
3909 (url "https://github.com/hamcrest/JavaHamcrest/")
3910 (commit (string-append "hamcrest-java-" version))))
3911 (file-name (git-file-name name version))
3914 "16fxxkrd31ahqvcaby30jgh3z1i0zxh51m24hxgz0z2agxj6bc63"))
3915 (modules '((guix build utils)))
3918 ;; Delete bundled thirds-party jar archives.
3919 (delete-file-recursively "lib")
3921 (build-system ant-build-system)
3923 `(#:tests? #f ; Tests require junit
3924 #:modules ((guix build ant-build-system)
3925 (guix build java-utils)
3928 #:make-flags (list (string-append "-Dversion=" ,version))
3929 #:test-target "unit-test"
3930 #:build-target "core"
3932 (modify-phases %standard-phases
3933 ;; Disable unit tests, because they require junit, which requires
3934 ;; hamcrest-core. We also give a fixed value to the "Built-Date"
3935 ;; attribute from the manifest for reproducibility.
3936 (add-before 'configure 'patch-build.xml
3938 (substitute* "build.xml"
3939 (("unit-test, ") "")
3940 (("\\$\\{build.timestamp\\}") "guix"))
3942 ;; Java's "getMethods()" returns methods in an unpredictable order.
3943 ;; To make the output of the generated code deterministic we must
3944 ;; sort the array of methods.
3945 (add-after 'unpack 'make-method-order-deterministic
3947 (substitute* "hamcrest-generator/src/main/java/org/hamcrest/generator/ReflectiveFactoryReader.java"
3948 (("import java\\.util\\.Iterator;" line)
3949 (string-append line "\n"
3950 "import java.util.Arrays; import java.util.Comparator;"))
3951 (("allMethods = cls\\.getMethods\\(\\);" line)
3952 (string-append "_" line
3954 private Method[] getSortedMethods() {
3955 Arrays.sort(_allMethods, new Comparator<Method>() {
3957 public int compare(Method a, Method b) {
3958 return a.toString().compareTo(b.toString());
3964 private Method[] allMethods = getSortedMethods();")))
3966 (add-before 'build 'do-not-use-bundled-qdox
3967 (lambda* (#:key inputs #:allow-other-keys)
3968 (substitute* "build.xml"
3969 (("lib/generator/qdox-1.12.jar")
3970 (string-append (assoc-ref inputs "java-qdox-1.12")
3971 "/share/java/qdox.jar")))
3973 ;; build.xml searches for .jar files in this directoy, which
3974 ;; we remove from the source archive.
3975 (add-before 'build 'create-dummy-directories
3977 (mkdir-p "lib/integration")
3979 (add-before 'build 'create-pom
3981 (substitute* "pom/hamcrest-core.pom"
3982 (("@VERSION@") ,version))
3985 (install-from-pom "pom/hamcrest-core.pom")))))
3987 `(("java-qdox-1.12" ,java-qdox-1.12)
3988 ("java-jarjar" ,java-jarjar)))
3990 `(("java-hamcrest-parent-pom" ,java-hamcrest-parent-pom)))
3991 (home-page "http://hamcrest.org/")
3992 (synopsis "Library of matchers for building test expressions")
3994 "This package provides a library of matcher objects (also known as
3995 constraints or predicates) allowing @code{match} rules to be defined
3996 declaratively, to be used in other frameworks. Typical scenarios include
3997 testing frameworks, mocking libraries and UI validation rules.")
3998 (license license:bsd-2)))
4000 (define java-hamcrest-parent-pom
4002 (inherit java-hamcrest-core)
4003 (name "java-hamcrest-parent-pom")
4004 (propagated-inputs '())
4009 (modify-phases %standard-phases
4013 (substitute* "pom/hamcrest-parent.pom"
4014 (("@VERSION@") ,(package-version java-hamcrest-core)))
4017 (install-pom-file "pom/hamcrest-parent.pom")))))))
4019 (define-public java-hamcrest-library
4021 (inherit java-hamcrest-core)
4022 (name "java-hamcrest-library")
4024 (substitute-keyword-arguments (package-arguments java-hamcrest-core)
4025 ((#:build-target _) "library")
4027 `(modify-phases ,phases
4028 (add-after 'unpack 'patch-classpath-for-integration
4029 (lambda* (#:key inputs #:allow-other-keys)
4030 (substitute* "build.xml"
4031 (("build/hamcrest-core-\\$\\{version\\}\\.jar")
4032 (car (find-files (assoc-ref inputs "java-hamcrest-core")
4035 (replace 'create-pom
4037 (substitute* "pom/hamcrest-library.pom"
4038 (("@VERSION@") ,(package-version java-hamcrest-core)))
4041 (install-from-pom "pom/hamcrest-library.pom"))))))
4043 `(("java-hamcrest-core" ,java-hamcrest-core)
4044 ("java-hamcrest-parent-pom" ,java-hamcrest-parent-pom)))))
4046 (define-public java-junit
4053 (url "https://github.com/junit-team/junit/")
4054 (commit (string-append "r" version))))
4055 (file-name (git-file-name name version))
4058 "1j8avi91px1z8rjc89cfikwrvfifdmmsarwiyrcnr59ynvpz0v8h"))
4059 (modules '((guix build utils)))
4062 ;; Delete bundled jar archives.
4063 (delete-file-recursively "lib")
4065 (build-system ant-build-system)
4067 `(#:jar-name "junit.jar"
4068 #:source-dir "src/main/java"
4069 #:test-dir "src/test"
4070 #:test-exclude (list "**/SimpleTest.java" "**/StackTracesTest.java"
4071 "**/RuleChainTest.java" "**/TestWatchmanTest.java")
4073 (modify-phases %standard-phases
4074 (add-before 'check 'copy-test-resources
4076 (copy-recursively "src/test/resources" "build/test-classes")
4079 (install-from-pom "pom.xml")))))
4081 `(("java-hamcrest-core" ,java-hamcrest-core)))
4083 `(("java-hamcrest-library" ,java-hamcrest-library)))
4084 (home-page "https://junit.org/junit4/")
4085 (synopsis "Test framework for Java")
4087 "JUnit is a simple framework to write repeatable tests for Java projects.
4088 JUnit provides assertions for testing expected results, test fixtures for
4089 sharing common test data, and test runners for running tests.")
4090 (license license:epl1.0)))
4092 (define-public java-junitparams
4094 (name "java-junitparams")
4099 (url "https://github.com/Pragmatists/JUnitParams")
4100 (commit (string-append "JUnitParams-" version))))
4101 (file-name (git-file-name name version))
4104 "0rb52xdfp99invyjrras3w0bf0a81cz30yd47rkkiyqcqj0y1q9b"))))
4105 (build-system ant-build-system)
4107 `(#:jar-name "junitparams.jar"
4108 #:source-dir "src/main/java"
4109 #:test-dir "src/test"
4110 #:test-exclude (list "**/SuperclassTest.java")))
4112 `(("java-junit" ,java-junit)))
4114 `(("java-junit" ,java-junit)
4115 ("java-hamcrest-core" ,java-hamcrest-core)
4116 ("java-assertj" ,java-assertj)))
4117 (home-page "https://github.com/Pragmatists/JUnitParams")
4118 (synopsis "Parameterised test support for JUnit")
4119 (description "The JUnitParams project adds a new runner to JUnit and
4120 provides much easier and readable parametrised tests for JUnit.")
4121 (license license:asl2.0)))
4123 (define-public java-plexus-utils
4125 (name "java-plexus-utils")
4126 ;; sisu-build-api needs this version, later versions don't work
4131 (url "https://github.com/codehaus-plexus/plexus-utils")
4132 (commit (string-append "plexus-utils-" version))))
4133 (file-name (git-file-name name version))
4136 "1w169glixyk94jbczj8jzg897lsab46jihiaa3dhw0p06g35va8b"))))
4137 (build-system ant-build-system)
4138 ;; FIXME: The default build.xml does not include a target to install
4141 `(#:jar-name "plexus-utils.jar"
4142 #:source-dir "src/main"
4144 (modify-phases %standard-phases
4145 (add-after 'unpack 'fix-reference-to-/bin-and-/usr
4147 (substitute* "src/main/java/org/codehaus/plexus/util/\
4148 cli/shell/BourneShell.java"
4149 (("/bin/sh") (which "sh"))
4150 (("/usr/") (getcwd)))
4152 (add-after 'unpack 'fix-or-disable-broken-tests
4154 (with-directory-excursion "src/test/java/org/codehaus/plexus/util"
4155 (substitute* '("cli/CommandlineTest.java"
4156 "cli/shell/BourneShellTest.java")
4157 (("/bin/sh") (which "sh"))
4158 (("/bin/echo") (which "echo")))
4160 ;; This test depends on MavenProjectStub, but we don't have
4161 ;; a package for Maven.
4162 (delete-file "introspection/ReflectionValueExtractorTest.java")
4164 ;; FIXME: The command line tests fail, maybe because they use
4166 (delete-file "cli/CommandlineTest.java")
4168 ;; These tests require openjdk jmh, which is not packaged yet
4169 (for-each delete-file (find-files "." "PerfTest.java$")))
4171 (add-before 'build 'copy-resources
4173 (copy-recursively "src/main/resources" "build/classes")
4175 (replace 'install (install-from-pom "pom.xml")))))
4177 `(("java-hamcrest-core" ,java-hamcrest-core)
4178 ("java-junit" ,java-junit)))
4180 `(("plexus-parent-pom" ,plexus-parent-pom-5.1)))
4181 (home-page "https://codehaus-plexus.github.io/plexus-utils/")
4182 (synopsis "Common utilities for the Plexus framework")
4183 (description "This package provides various Java utility classes for the
4184 Plexus framework to ease working with strings, files, command lines, XML and
4186 (license license:asl2.0)))
4188 (define-public java-plexus-utils-3.3.0
4190 (inherit java-plexus-utils)
4195 (url "https://github.com/codehaus-plexus/plexus-utils")
4196 (commit (string-append "plexus-utils-" version))))
4197 (file-name (git-file-name "java-plexus-utils" version))
4200 "0d0fq21rzjy0j55kcp8w9k1rbq9rwr0r7cc8239p9jbz54vihp0g"))))))
4202 (define-public java-plexus-interpolation
4204 (name "java-plexus-interpolation")
4209 (url "https://github.com/codehaus-plexus/plexus-interpolation")
4210 (commit (string-append "plexus-interpolation-" version))))
4211 (file-name (git-file-name name version))
4214 "1rahjmhywf6d5m32qzlc9izawyvcd71abfm9k03f13rs2xmfxzlh"))))
4215 (build-system ant-build-system)
4217 `(#:jar-name "plexus-interpolation.jar"
4218 #:source-dir "src/main"
4220 (modify-phases %standard-phases
4221 (replace 'install (install-from-pom "pom.xml")))))
4223 `(("plexus-parent-pom-5.1" ,plexus-parent-pom-5.1)))
4225 `(("java-junit" ,java-junit)
4226 ("java-hamcrest-core" ,java-hamcrest-core)))
4227 (home-page "https://codehaus-plexus.github.io/plexus-interpolation/")
4228 (synopsis "Java components for interpolating ${} strings and the like")
4229 (description "Plexus interpolator is a modular, flexible interpolation
4230 framework for the expression language style commonly seen in Maven, Plexus,
4231 and other related projects.
4233 It has its foundation in the @code{org.codehaus.plexus.utils.interpolation}
4234 package within @code{plexus-utils}, but has been separated in order to allow
4235 these two libraries to vary independently of one another.")
4236 (license license:asl2.0)))
4238 (define-public java-plexus-classworlds
4240 (name "java-plexus-classworlds")
4245 (url "https://github.com/codehaus-plexus/plexus-classworlds")
4246 (commit (string-append "plexus-classworlds-" version))))
4247 (file-name (git-file-name name version))
4250 "034k2hgvj1saalwbnzrbg4n0zgzwcpz1lhlb8q4kgglsp9pmm03s"))))
4251 (build-system ant-build-system)
4253 `(#:jar-name "plexus-classworlds.jar"
4254 #:source-dir "src/main"
4255 #:tests? #f;; FIXME: we need to generate some resources as in pom.xml
4257 (modify-phases %standard-phases
4258 (replace 'install (install-from-pom "pom.xml")))))
4260 `(("plexus-parent-pom-5.1" ,plexus-parent-pom-5.1)))
4262 `(("java-junit" ,java-junit)))
4263 (home-page "https://codehaus-plexus.github.io/plexus-classworlds/")
4264 (synopsis "Java class loader framework")
4265 (description "Plexus classworlds replaces the native @code{ClassLoader}
4266 mechanism of Java. It is especially useful for dynamic loading of application
4268 (license license:asl2.0)))
4270 (define java-plexus-container-default-bootstrap
4272 (name "java-plexus-container-default-bootstrap")
4277 (url "https://github.com/codehaus-plexus/plexus-containers")
4278 (commit (string-append "plexus-containers-" version))))
4279 (file-name (git-file-name name version))
4282 "1316hrp5vqfv0aw7miq2fp0wwy833h66h502h29vnh5sxj27x228"))))
4283 (build-system ant-build-system)
4285 `(#:jar-name "container-default.jar"
4286 #:source-dir "plexus-container-default/src/main/java"
4287 #:test-dir "plexus-container-default/src/test"
4288 #:tests? #f; requires plexus-archiver, which depends on this package
4290 (modify-phases %standard-phases
4291 (add-before 'build 'fix-google-collections
4293 ;; Google collections are now replaced with guava
4294 (substitute* "plexus-container-default/pom.xml"
4295 (("google-collections") "guava")
4296 (("com.google.collections") "com.google.guava"))
4298 (add-before 'build 'copy-resources
4301 "plexus-container-default/src/main/resources/"
4305 (install-from-pom "plexus-container-default/pom.xml")))))
4307 `(("java-plexus-worldclass" ,java-plexus-classworlds)
4308 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
4309 ("java-plexus-utils" ,java-plexus-utils)
4310 ("java-junit" ,java-junit)
4311 ("java-guava" ,java-guava)
4312 ("java-plexus-containers-parent-pom" ,java-plexus-containers-parent-pom)))
4313 (home-page "https://github.com/codehaus-plexus/plexus-containers")
4314 (synopsis "Inversion-of-control container")
4315 (description "Plexus-default-container is Plexus' inversion-of-control
4316 (@dfn{IoC}) container. It is composed of its public API and its default
4318 (license license:asl2.0)))
4320 (define java-plexus-containers-parent-pom
4322 (inherit java-plexus-container-default-bootstrap)
4323 (name "java-plexus-containers-parent-pom")
4327 (modify-phases %standard-phases
4331 (install-pom-file "pom.xml")))))
4333 `(("plexus-parent-pom" ,plexus-parent-pom-4.0)))))
4335 (define-public java-plexus-io
4337 (name "java-plexus-io")
4342 (url "https://github.com/codehaus-plexus/plexus-io")
4343 (commit (string-append "plexus-io-" version))))
4344 (file-name (git-file-name name version))
4347 "1r3wqfpbxq8vp4p914i8p88r0994rmcjw02hz14n11cfb6gsyvlr"))))
4348 (build-system ant-build-system)
4350 `(#:jar-name "plexus-io.jar"
4351 #:source-dir "src/main/java"
4352 #:test-dir "src/test"
4354 (modify-phases %standard-phases
4355 (add-before 'build 'copy-resources
4357 (mkdir-p "build/classes")
4358 (copy-recursively "src/main/resources" "build/classes")
4359 (mkdir-p "build/test-classes")
4360 (copy-recursively "src/test/resources" "build/test-classes")
4362 (replace 'install (install-from-pom "pom.xml")))))
4364 `(("java-plexus-utils" ,java-plexus-utils-3.3.0)
4365 ("java-commons-io" ,java-commons-io)
4366 ("plexus-parent-pom" ,plexus-parent-pom-5.1)))
4368 `(("java-jsr305" ,java-jsr305)))
4370 `(("junit" ,java-junit)
4371 ("hamcrest" ,java-hamcrest-core)
4372 ("guava" ,java-guava)
4373 ("classworlds" ,java-plexus-classworlds)
4374 ("xbean" ,java-geronimo-xbean-reflect)
4375 ("container-default" ,java-plexus-container-default-bootstrap)))
4376 (home-page "https://github.com/codehaus-plexus/plexus-io")
4377 (synopsis "I/O plexus components")
4378 (description "Plexus IO is a set of plexus components, which are designed
4379 for use in I/O operations. This implementation using plexus components allows
4380 reusing it in maven.")
4381 (license license:asl2.0)))
4383 (define-public java-plexus-archiver
4385 (name "java-plexus-archiver")
4389 (uri (string-append "https://github.com/codehaus-plexus/plexus-archiver"
4390 "/archive/plexus-archiver-" version ".tar.gz"))
4393 "144n971r3lfrx3l12nf2scm80x4xdvgbkk4bjpa4vcvvdrll6qys"))))
4394 (build-system ant-build-system)
4396 `(#:jar-name "plexus-archiver.jar"
4397 #:source-dir "src/main/java"
4398 #:test-dir "src/test"
4399 #:test-exclude (list "**/Abstract*.java" "**/Base*.java")
4401 (modify-phases %standard-phases
4402 (add-before 'check 'remove-failing
4404 ;; Requires an older version of plexus container
4406 "src/test/java/org/codehaus/plexus/archiver/DuplicateFilesTest.java")
4408 (add-before 'check 'fix-test-building
4410 (substitute* "build.xml"
4411 (("srcdir=\"src/test\"") "srcdir=\"src/test/java\""))
4413 (add-before 'build 'copy-resources
4415 (mkdir-p "build/classes")
4416 (copy-recursively "src/main/resources" "build/classes")
4417 (mkdir-p "build/test-classes")
4418 (copy-recursively "src/test/resources" "build/test-classes")
4420 (replace 'install (install-from-pom "pom.xml")))))
4422 `(("java-plexus-utils" ,java-plexus-utils-3.3.0)
4423 ("java-plexus-io" ,java-plexus-io)
4424 ("java-iq80-snappy" ,java-iq80-snappy)
4425 ("java-commons-compress" ,java-commons-compress)
4426 ("plexus-parent-pom" ,plexus-parent-pom-6.1)))
4428 `(("java-jsr305" ,java-jsr305)
4429 ("java-plexus-container-default"
4430 ,java-plexus-container-default-bootstrap)))
4432 `(("java-hamcrest-core" ,java-hamcrest-core)
4433 ("junit" ,java-junit)
4434 ("classworld" ,java-plexus-classworlds)
4435 ("xbean" ,java-geronimo-xbean-reflect)
4437 ("guava" ,java-guava)))
4438 (home-page "https://github.com/codehaus-plexus/plexus-archiver")
4439 (synopsis "Archiver component of the Plexus project")
4440 (description "Plexus-archiver contains a component to deal with project
4442 (license license:asl2.0)))
4444 (define-public java-plexus-container-default
4446 (inherit java-plexus-container-default-bootstrap)
4447 (name "java-plexus-container-default")
4449 `(#:jar-name "container-default.jar"
4450 #:source-dir "plexus-container-default/src/main/java"
4451 #:test-dir "plexus-container-default/src/test"
4452 #:test-exclude (list ;"**/*Test.java"
4454 ;; Requires plexus-hierarchy
4455 "**/PlexusHierarchyTest.java"
4457 "**/ComponentRealmCompositionTest.java"
4458 "**/PlexusContainerTest.java")
4460 (modify-phases %standard-phases
4461 (add-before 'build 'fix-google-collections
4463 ;; Google collections are now replaced with guava
4464 (substitute* "plexus-container-default/pom.xml"
4465 (("google-collections") "guava")
4466 (("com.google.collections") "com.google.guava"))
4468 (add-before 'build 'copy-resources
4471 "plexus-container-default/src/main/resources/"
4474 (add-before 'check 'fix-paths
4476 (let ((dir "plexus-container-default/src/test/java/org/codehaus"))
4479 dir "/plexus/component/composition/"
4480 "ComponentRealmCompositionTest.java")
4481 (("src/test") "plexus-container-default/src/test"))
4484 (install-from-pom "plexus-container-default/pom.xml")))))
4486 `(("worldclass" ,java-plexus-classworlds)
4487 ("xbean" ,java-geronimo-xbean-reflect)
4488 ("utils" ,java-plexus-utils)
4489 ("junit" ,java-junit)
4490 ("guava" ,java-guava)))
4492 `(("archiver" ,java-plexus-archiver)
4493 ("hamcrest" ,java-hamcrest-core)))))
4495 (define-public java-plexus-component-annotations
4497 (inherit java-plexus-container-default)
4498 (name "java-plexus-component-annotations")
4500 `(#:jar-name "plexus-component-annotations.jar"
4501 #:source-dir "plexus-component-annotations/src/main/java"
4502 #:tests? #f; no tests
4504 (modify-phases %standard-phases
4506 (install-from-pom "plexus-component-annotations/pom.xml")))))
4508 `(("java-plexus-containers-parent-pom" ,java-plexus-containers-parent-pom)))
4511 (synopsis "Plexus descriptors generator")
4512 (description "This package is a Maven plugin to generate Plexus descriptors
4513 from source tags and class annotations.")))
4515 (define-public java-plexus-component-metadata
4517 (inherit java-plexus-container-default)
4518 (name "java-plexus-component-metadata")
4520 `(#:jar-name "plexus-component-metadata.jar"
4521 #:source-dir "src/main/java"
4522 #:test-dir "src/test"
4525 (modify-phases %standard-phases
4526 (add-before 'configure 'chdir
4528 (chdir "plexus-component-metadata")
4530 (add-before 'build 'copy-resources
4532 (copy-recursively "src/main/resources"
4536 `(("java-plexus-container-default" ,java-plexus-container-default)
4537 ("java-plexu-component-annotations" ,java-plexus-component-annotations)
4538 ("java-plexus-utils" ,java-plexus-utils)
4539 ("java-plexus-cli" ,java-plexus-cli)
4540 ("java-plexus-classworlds" ,java-plexus-classworlds)
4541 ("maven-plugin-api" ,maven-plugin-api)
4542 ("maven-plugin-annotations" ,maven-plugin-annotations)
4543 ("maven-core-bootstrap" ,maven-core-bootstrap)
4544 ("maven-model" ,maven-model)
4545 ("java-commons-cli" ,java-commons-cli)
4546 ("java-qdox" ,java-qdox)
4547 ("java-jdom2" ,java-jdom2)
4548 ("java-asm" ,java-asm)))
4550 `(("java-junit" ,java-junit)
4551 ("java-guava" ,java-guava)
4552 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)))
4553 (synopsis "Inversion-of-control container for Maven")
4554 (description "The Plexus project provides a full software stack for creating
4555 and executing software projects. Based on the Plexus container, the
4556 applications can utilise component-oriented programming to build modular,
4557 reusable components that can easily be assembled and reused. This package
4558 provides the Maven plugin generating the component metadata.")))
4560 (define-public java-plexus-cipher
4562 (name "java-plexus-cipher")
4567 (url "https://github.com/codehaus-plexus/plexus-cipher")
4568 (commit (string-append "plexus-cipher-" version))))
4569 (file-name (git-file-name name version))
4572 "0m638nzlxbmnbcj5cwdpgs326ab584yv0k803zlx37r6iqwvf6b0"))))
4573 (build-system ant-build-system)
4575 `(#:jar-name "plexus-cipher.jar"
4576 #:source-dir "src/main/java"
4577 #:tests? #f; FIXME: requires sisu-inject-bean
4579 (modify-phases %standard-phases
4580 (add-before 'build 'copy-resources
4582 (copy-recursively "src/main/resources" "build/classes")
4583 (mkdir-p "build/classes/META-INF/sisu")
4584 (with-output-to-file "build/classes/META-INF/sisu/javax.inject.Named"
4586 (display "org.sonatype.plexus.components.cipher.DefaultPlexusCipher\n")))
4588 (add-before 'install 'fix-test-dependency
4590 ;; sisu-inject-bean is only used for tests, but its scope is "provided".
4591 (substitute* "pom.xml"
4592 (("provided") "test"))
4594 (replace 'install (install-from-pom "pom.xml")))))
4596 `(("java-cdi-api" ,java-cdi-api)
4597 ("java-javax-inject" ,java-javax-inject)))
4599 `(("java-sonatype-spice-parent-pom" ,java-sonatype-spice-parent-pom-15)))
4601 `(("java-junit" ,java-junit)))
4602 (home-page "https://github.com/sonatype/plexus-cipher")
4603 (synopsis "Encryption/decryption Component")
4604 (description "Plexus-cipher contains a component to deal with encryption
4606 (license license:asl2.0)))
4608 (define-public java-plexus-java
4610 (name "java-plexus-java")
4615 (url "https://github.com/codehaus-plexus/plexus-languages")
4616 (commit (string-append "plexus-languages-" version))))
4617 (file-name (git-file-name name version))
4620 "0vmvgq5hfxs90yyxgssfpwq78l7vwx1ljwpkk594mrdr8sm668b5"))
4621 (modules '((guix build utils)))
4624 (for-each delete-file (find-files "." ".*.jar$"))
4626 (build-system ant-build-system)
4628 `(#:jar-name "plexus-java.java"
4629 #:source-dir "plexus-java/src/main/java"
4630 #:test-dir "plexus-java/src/test"
4631 #:tests? #f; require mockito 2
4633 (modify-phases %standard-phases
4634 (add-after 'build 'generate-metadata
4636 (invoke "java" "-cp" (string-append (getenv "CLASSPATH") ":build/classes")
4637 "org.codehaus.plexus.metadata.PlexusMetadataGeneratorCli"
4638 "--source" "plexus-java/src/main/java"
4639 "--output" "build/classes/META-INF/plexus/components.xml"
4640 "--classes" "build/classes"
4641 "--descriptors" "build/classes/META-INF")
4642 (invoke "ant" "jar")
4644 (add-before 'install 'install-parent
4645 (install-pom-file "pom.xml"))
4647 (install-from-pom "plexus-java/pom.xml")))))
4649 `(("java-asm" ,java-asm)
4650 ("java-qdox" ,java-qdox-2-M9)
4651 ("java-javax-inject" ,java-javax-inject)
4652 ("plexus-parent-pom" ,plexus-parent-pom-4.0)))
4654 `(("java-plexus-component-annotations" ,java-plexus-component-annotations)))
4656 `(("java-plexus-component-metadata" ,java-plexus-component-metadata)
4657 ("java-junit" ,java-junit)))
4658 (home-page "https://codehaus-plexus.github.io/plexus-languages/plexus-java")
4659 (synopsis "Shared language features for Java")
4660 (description "This package contains shared language features of the Java
4661 language, for the plexus project.")
4662 (license license:asl2.0)))
4664 (define-public java-plexus-compiler-api
4666 (name "java-plexus-compiler-api")
4671 (url "https://github.com/codehaus-plexus/plexus-compiler")
4672 (commit (string-append "plexus-compiler-" version))))
4673 (file-name (git-file-name name version))
4676 "1nq1gnn3s6z1j29gmi1hqbklsmm8b1lmnafb0191914f95mn18gk"))))
4677 (build-system ant-build-system)
4679 `(#:jar-name "plexus-compiler-api.jar"
4680 #:source-dir "plexus-compiler-api/src/main/java"
4681 #:test-dir "plexus-compiler-api/src/test"
4683 (modify-phases %standard-phases
4685 (install-from-pom "plexus-compiler-api/pom.xml")))))
4687 `(("java-plexus-container-default" ,java-plexus-container-default)
4688 ("java-plexus-compiler-pom" ,java-plexus-compiler-pom)
4689 ("java-plexus-util" ,java-plexus-utils)))
4691 `(("java-junit" ,java-junit)))
4692 (home-page "https://github.com/codehaus-plexus/plexus-compiler")
4693 (synopsis "Plexus Compilers component's API to manipulate compilers")
4694 (description "This package contains the API used by components to manipulate
4696 (license (list license:asl2.0
4699 (define java-plexus-compiler-pom
4701 (inherit java-plexus-compiler-api)
4702 (name "java-plexus-compiler-pom")
4706 (modify-phases %standard-phases
4710 (install-pom-file "pom.xml"))
4711 (add-after 'install 'install-compilers
4712 (install-pom-file "plexus-compilers/pom.xml")))))
4714 `(("plexus-components-parent-pom-4.0" ,plexus-components-parent-pom-4.0)))))
4716 (define plexus-components-parent-pom-4.0
4718 (name "plexus-components-parent-pom")
4723 (url "https://github.com/codehaus-plexus/plexus-components")
4724 (commit (string-append "plexus-components-" version))))
4725 (file-name (git-file-name name version))
4728 "041bm8yv0m2i17mqg8zljib4ykpha7ijls2qfdwvkma4d39lhysi"))))
4729 (build-system ant-build-system)
4733 (modify-phases %standard-phases
4737 (install-pom-file "pom.xml")))))
4739 `(("plexus-parent-pom-4.0" ,plexus-parent-pom-4.0)))
4740 (home-page "https://codehaus-plexus.github.io/plexus-components")
4741 (synopsis "Plexus parent pom")
4742 (description "This package contains the Plexus components parent POM.")
4743 (license license:asl2.0)))
4745 (define-public java-plexus-compiler-manager
4747 (inherit java-plexus-compiler-api)
4748 (name "java-plexus-compiler-manager")
4750 `(#:jar-name "compiler-compiler-manager.java"
4751 #:source-dir "plexus-compiler-manager/src/main/java"
4752 #:test-dir "plexus-compiler-manager/src/test"
4755 (modify-phases %standard-phases
4756 (add-after 'build 'generate-metadata
4758 (invoke "java" "-cp" (string-append (getenv "CLASSPATH") ":build/classes")
4759 "org.codehaus.plexus.metadata.PlexusMetadataGeneratorCli"
4760 "--source" "plexus-compiler-manager/src/main/java"
4761 "--output" "build/classes/META-INF/plexus/components.xml"
4762 "--classes" "build/classes"
4763 "--descriptors" "build/classes/META-INF")
4764 (invoke "ant" "jar")
4766 (add-after 'generate-metadata 'rebuild
4768 (invoke "ant" "jar")
4771 (install-from-pom "plexus-compiler-manager/pom.xml")))))
4773 `(("java-plexus-compiler-api" ,java-plexus-compiler-api)
4774 ("java-plexus-compiler-pom" ,java-plexus-compiler-pom)
4775 ("java-plexus-container-default" ,java-plexus-container-default)))
4778 ("java-plexus-component-metadata" ,java-plexus-component-metadata)))
4779 (synopsis "Compiler management for Plexus Compiler component")
4780 (description "Plexus Compiler is a Plexus component to use different
4781 compilers through a uniform API. This component chooses the compiler
4782 implementation to use in a project.")))
4784 (define-public java-plexus-compiler-javac
4786 (inherit java-plexus-compiler-api)
4787 (name "java-plexus-compiler-javac")
4789 `(#:jar-name "plexus-compiler-javac.jar"
4790 #:source-dir "plexus-compilers/plexus-compiler-javac/src/main/java"
4792 #:tests? #f; depends on compiler-test -> maven-core -> ... -> this package.
4793 #:test-dir "plexus-compilers/plexus-compiler-javac/src/test"
4794 #:modules ((guix build ant-build-system)
4796 (guix build java-utils)
4799 (modify-phases %standard-phases
4800 ;; We cannot use java-plexus-component-metadata to generate the metadata
4801 ;; because it ultimately depends on this package.
4802 ;; Create it manually instead
4803 (add-before 'build 'create-metadata
4805 (let* ((dir "build/classes/META-INF/plexus")
4806 (file (string-append dir "/components.xml")))
4808 (with-output-to-file file
4814 (role "org.codehaus.plexus.compiler.Compiler")
4816 (implementation "org.codehaus.plexus.compiler.javac.JavacCompiler")
4817 (isolated-realm "false"))))))))
4820 (install-from-pom "plexus-compilers/plexus-compiler-javac/pom.xml")))))
4822 `(("java-plexus-compiler-api" ,java-plexus-compiler-api)
4823 ("java-plexus-utils" ,java-plexus-utils)
4824 ("java-plexus-container-default" ,java-plexus-container-default)))
4825 (synopsis "Javac Compiler support for Plexus Compiler component")
4826 (description "This package contains the Javac Compiler support for Plexus
4827 Compiler component.")))
4829 (define plexus-components-pom-1.1.20
4831 (name "plexus-components-pom-1.1.20")
4836 (url "https://github.com/codehaus-plexus/plexus-components")
4837 (commit (string-append "plexus-components-" version))))
4838 (file-name (git-file-name name version))
4841 "1q254k95m9icyfsvaw8c226midg8v6v436wvivhv7im825mnp5yb"))))
4842 (build-system ant-build-system)
4846 (modify-phases %standard-phases
4850 (install-pom-file "pom.xml")))))
4852 `(("plexus-parent-pom" ,plexus-parent-pom-3.1)))
4853 (home-page "https://github.com/codehaus-plexus/plexus-components")
4854 (synopsis "Maven parent pom for plexus packages")
4855 (description "This package contains the parent pom for plexus component
4857 (license license:asl2.0)))
4859 (define-public java-plexus-digest
4861 (name "java-plexus-digest")
4866 (url "https://github.com/codehaus-plexus/plexus-digest")
4867 (commit "2a52ad1bda8297fa0e287163d2fa37245ec6a430")))
4868 (file-name (git-file-name name version))
4871 "19w5wxsliz8r42niry68qa665kvjsb8081dazg9vgd3pca72w07x"))))
4872 (build-system ant-build-system)
4874 `(#:jar-name "plexus-digest.jar"
4875 #:source-dir "src/main/java"
4878 (modify-phases %standard-phases
4880 (install-from-pom "pom.xml")))))
4882 `(("java-plexus-utils" ,java-plexus-utils)
4883 ("plexus-components-pom-1.1.20" ,plexus-components-pom-1.1.20)))
4885 `(("java-junit" ,java-junit)))
4886 (home-page "https://github.com/codehaus-plexus/plexus-digest")
4887 (synopsis "Hash function utilities for Java")
4888 (description "This package is a plexus component that contains hash
4889 function utilities.")
4890 (license license:asl2.0)))
4892 (define-public java-plexus-sec-dispatcher
4894 (name "java-plexus-sec-dispatcher")
4895 (version "1.4") ;; Newest release listed at the Maven Central Repository.
4897 ;; This project doesn't tag releases or publish tarballs, so we take
4898 ;; the "prepare release plexus-sec-dispatcher-1.4" git commit.
4901 (url "https://github.com/sonatype/plexus-sec-dispatcher/")
4902 (commit "7db8f880486e192a1c5ea9544e01e756c3d49d0f")))
4905 "1ng4yliy4cqpjr4fxxjbpwyk1wkch5f8vblm1kvwf328s4gibszs"))
4906 (file-name (git-file-name name version))))
4908 `(#:jar-name "plexus-sec-dispatcher.jar"
4909 #:source-dir "src/main/java"
4911 (modify-phases %standard-phases
4912 (add-before 'build 'generate-models
4913 (lambda* (#:key inputs #:allow-other-keys)
4914 (define (modello-single-mode file version mode)
4916 "org.codehaus.modello.ModelloCli"
4917 file mode "src/main/java" version
4919 (let ((file "src/main/mdo/settings-security.mdo"))
4920 (modello-single-mode file "1.0.0" "java")
4921 (modello-single-mode file "1.0.0" "xpp3-reader")
4922 (modello-single-mode file "1.0.0" "xpp3-writer"))
4924 (add-before 'build 'generate-components.xml
4926 (mkdir-p "build/classes/META-INF/plexus")
4927 (with-output-to-file "build/classes/META-INF/plexus/components.xml"
4933 <role>org.sonatype.plexus.components.sec.dispatcher.SecDispatcher</role>\n
4934 <role-hint>default</role-hint>\n
4935 <implementation>org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher</implementation>\n
4936 <description></description>\n
4939 <role>org.sonatype.plexus.components.cipher.PlexusCipher</role>\n
4940 <field-name>_cipher</field-name>\n
4943 <role>org.sonatype.plexus.components.sec.dispatcher.PasswordDecryptor</role>\n
4944 <field-name>_decryptors</field-name>\n
4948 <_configuration-file>~/.settings-security.xml</_configuration-file>\n
4952 </component-set>\n")))
4954 (add-before 'check 'fix-paths
4956 (copy-recursively "src/test/resources" "target")
4958 (replace 'install (install-from-pom "pom.xml")))))
4960 `(("java-plexus-utils" ,java-plexus-utils)
4961 ("java-plexus-cipher" ,java-plexus-cipher)
4962 ("java-sonatype-spice-parent-pom" ,java-sonatype-spice-parent-pom-12)))
4964 `(("java-modello-core" ,java-modello-core)
4966 ("java-plexus-container-default" ,java-plexus-container-default)
4967 ("java-plexus-classworlds" ,java-plexus-classworlds)
4968 ("java-plexus-utils" ,java-plexus-utils)
4969 ("java-guava" ,java-guava)
4970 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
4971 ("java-sisu-build-api" ,java-sisu-build-api)
4973 ("java-modellop-plugins-java" ,java-modello-plugins-java)
4974 ("java-modellop-plugins-xml" ,java-modello-plugins-xml)
4975 ("java-modellop-plugins-xpp3" ,java-modello-plugins-xpp3)
4977 ("java-junit" ,java-junit)))
4978 (build-system ant-build-system)
4979 (home-page "https://github.com/sonatype/plexus-sec-dispatcher")
4980 (synopsis "Plexus Security Dispatcher Component")
4981 (description "This package is the Plexus Security Dispatcher Component.
4982 This component decrypts a string passed to it.")
4983 (license license:asl2.0)))
4985 (define-public java-plexus-cli
4987 (name "java-plexus-cli")
4992 (url "https://github.com/sonatype/plexus-cli")
4993 (commit "a776afa6bca84e5107bedb69440329cdb24ed645")))
4994 (file-name (string-append name "-" version))
4997 "0xjrlay605rypv3zd7y24vlwf0039bil3n2cqw54r1ddpysq46vx"))))
4998 (build-system ant-build-system)
5000 `(#:jar-name "plexus-cli.jar"
5001 #:source-dir "src/main/java"
5003 #:test-dir "src/test"))
5005 `(("java-commons-cli" ,java-commons-cli)
5006 ("java-plexus-container-default" ,java-plexus-container-default)
5007 ("java-plexus-classworlds" ,java-plexus-classworlds)))
5009 `(("java-plexus-utils" ,java-plexus-utils)
5010 ("java-junit" ,java-junit)
5011 ("java-guava" ,java-guava)))
5012 (home-page "https://codehaus-plexus.github.io/plexus-cli")
5013 (synopsis "CLI building library for plexus")
5014 (description "This package is a library to help creating CLI around
5015 Plexus components.")
5016 (license license:asl2.0)))
5018 (define-public java-sisu-build-api
5020 (name "java-sisu-build-api")
5025 (url "https://github.com/sonatype/sisu-build-api")
5026 (commit (string-append "plexus-build-api-" version))))
5027 (file-name (git-file-name name version))
5030 "1d5w6c58gkx30d51v7qwv1xrhc0ly76848gihmgshj19yf6yhca0"))))
5031 (build-system ant-build-system)
5033 `(#:jar-name "sisu-build-api.jar"
5034 #:source-dir "src/main/java"
5036 #:tests? #f; FIXME: how to run the tests?
5038 (modify-phases %standard-phases
5039 (add-before 'build 'copy-resources
5041 (copy-recursively "src/main/resources" "build/classes")
5042 (substitute* (find-files "build/classes")
5043 (("\\$\\{project.version\\}") ,version))
5045 (add-before 'build 'generate-plexus-compontent
5047 (mkdir-p "build/classes/META-INF/plexus")
5048 ;; This file is required for plexus to inject this package.
5049 ;; FIXME: how is it generated?
5050 (with-output-to-file "build/classes/META-INF/plexus/components.xml"
5056 <role>org.sonatype.plexus.build.incremental.BuildContext</role>\n
5057 <role-hint>default</role-hint>\n
5058 <implementation>org.sonatype.plexus.build.incremental.DefaultBuildContext</implementation>\n
5059 <description>Filesystem based non-incremental build context implementation\n
5060 which behaves as if all files were just created.</description>\n
5063 </component-set>\n")))
5066 (install-from-pom "pom.xml")))))
5068 `(("java-plexus-utils" ,java-plexus-utils)
5069 ("java-plexus-container-default" ,java-plexus-container-default)))
5070 (home-page "https://github.com/sonatype/sisu-build-api/")
5071 (synopsis "Base build API for maven")
5072 (description "This package contains the base build API for maven and
5073 a default implementation of it. This API is about scanning files in a
5074 project and determining what files need to be rebuilt.")
5075 (license license:asl2.0)))
5077 (define-public java-modello-core
5079 (name "java-modello-core")
5084 (url "https://github.com/codehaus-plexus/modello")
5085 (commit (string-append "modello-" version))))
5086 (file-name (git-file-name name version))
5089 "1di6ni42aqllpdvkpyfcw70352vr2i8wf6hd5nhd9kmqjb5dj5j4"))))
5090 (build-system ant-build-system)
5092 `(#:jar-name "modello-core.jar"
5093 #:source-dir "modello-core/src/main/java"
5094 #:test-dir "modello-core/src/test"
5095 #:main-class "org.codehaus.modello.ModelloCli"
5098 (modify-phases %standard-phases
5099 (add-before 'build 'copy-resources
5101 (mkdir-p "build/classes/META-INF/plexus")
5102 (copy-file "modello-core/src/main/resources/META-INF/plexus/components.xml"
5103 "build/classes/META-INF/plexus/components.xml")
5105 (add-before 'check 'fix-tests
5107 (with-directory-excursion "modello-core/src/test/java/org/codehaus"
5108 (substitute* '("modello/core/DefaultModelloCoreTest.java"
5109 "modello/core/io/ModelReaderTest.java")
5110 (("src/test") "modello-core/src/test")))
5113 `(("java-plexus-utils" ,java-plexus-utils)
5114 ("java-plexus-container-default" ,java-plexus-container-default)
5115 ("java-sisu-build-api" ,java-sisu-build-api)))
5117 `(("java-junit" ,java-junit)
5118 ("java-plexus-classworlds" ,java-plexus-classworlds)
5119 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
5120 ("java-guava" ,java-guava)))
5121 (home-page "https://codehaus-plexus.github.io/modello/")
5122 (synopsis "Framework for code generation from a simple model")
5123 (description "Modello is a framework for code generation from a simple model.
5125 Modello generates code from a simple model format: based on a plugin
5126 architecture, various types of code and descriptors can be generated from the
5127 single model, including Java POJOs, XML/JSON/YAML marshallers/unmarshallers,
5128 XSD and documentation.")
5131 ;; Although this package uses only files licensed under expat,
5132 ;; other parts of the source are licensed under different
5133 ;; licenses. We include them to be inherited by other packages.
5135 ;; Some files in modello-plugin-java are licensed under a
5136 ;; 5-clause BSD license.
5137 (license:non-copyleft
5138 (string-append "file:///modello-plugins/modello-plugin-java/"
5139 "src/main/java/org/codehaus/modello/plugin/"
5140 "java/javasource/JNaming.java"))))))
5142 (define-public java-modello-plugins-java
5144 (inherit java-modello-core)
5145 (name "java-modello-plugins-java")
5147 `(#:jar-name "modello-plugins-java.jar"
5148 #:source-dir "modello-plugins/modello-plugin-java/src/main/java"
5149 #:test-dir "modello-plugins/modello-plugin-java/src/test"
5151 #:tests? #f; requires maven-model, which depends on this package
5153 (modify-phases %standard-phases
5154 (add-before 'build 'copy-resources
5156 (mkdir-p "build/classes")
5157 (copy-recursively "modello-plugins/modello-plugin-java/src/main/resources"
5161 `(("java-modello-core" ,java-modello-core)))
5162 (synopsis "Modello Java Plugin")
5163 (description "Modello Java Plugin generates Java objects for the model.")))
5165 (define-public java-modello-plugins-xml
5167 (inherit java-modello-core)
5168 (name "java-modello-plugins-xml")
5170 `(#:jar-name "modello-plugins-xml.jar"
5171 #:source-dir "modello-plugins/modello-plugin-xml/src/main/java"
5172 #:test-dir "modello-plugins/modello-plugin-xml/src/test"
5175 (modify-phases %standard-phases
5176 (add-before 'build 'copy-resources
5178 (mkdir-p "build/classes")
5180 "modello-plugins/modello-plugin-xml/src/main/resources"
5183 (add-before 'check 'fix-paths
5185 (with-directory-excursion "modello-plugins/modello-plugin-xml/src/test"
5187 "java/org/codehaus/modello/plugins/xml/XmlModelloPluginTest.java"
5188 (("src/test") "modello-plugins/modello-plugin-xml/src/test")))
5191 `(("java-modello-core" ,java-modello-core)
5192 ("java-modello-plugins-java" ,java-modello-plugins-java)))
5193 (synopsis "Modello XML Plugin")
5194 (description "Modello XML Plugin contains shared code for every plugins
5195 working on XML representation of the model.")))
5197 (define-public java-modello-test
5199 (inherit java-modello-core)
5200 (name "java-modello-test")
5202 `(#:jar-name "modello-test.jar"
5203 #:source-dir "modello-test/src/main/java"
5204 #:tests? #f; no tests
5207 `(("java-plexus-utils" ,java-plexus-utils)
5208 ("java-plexus-compiler-api" ,java-plexus-compiler-api)
5209 ("java-plexus-compiler-javac" ,java-plexus-compiler-javac)
5210 ("java-plexus-container-default" ,java-plexus-container-default)))
5211 (synopsis "Modello test package")
5212 (description "The modello test package contains the basis to create
5213 Modello generator unit-tests, including sample models and xml files to test
5214 every feature for every plugin.")))
5216 (define-public java-modello-plugins-xpp3
5218 (inherit java-modello-core)
5219 (name "java-modello-plugins-xpp3")
5221 `(#:jar-name "modello-plugins-xpp3.jar"
5222 #:source-dir "modello-plugins/modello-plugin-xpp3/src/main/java"
5223 #:test-dir "modello-plugins/modello-plugin-xpp3/src/test"
5224 ;; One of the test dependencies is maven-model which depends on this package.
5228 (modify-phases %standard-phases
5229 (add-before 'build 'copy-resources
5231 (mkdir-p "build/classes")
5232 (copy-recursively "modello-plugins/modello-plugin-xpp3/src/main/resources"
5236 `(("java-modello-core" ,java-modello-core)
5237 ("java-modello-plugins-java" ,java-modello-plugins-java)
5238 ("java-modello-plugins-xml" ,java-modello-plugins-xml)))
5240 `(("java-xmlunit" ,java-xmlunit)
5241 ("java-modello-test" ,java-modello-test)
5242 ,@(package-native-inputs java-modello-core)))
5243 (synopsis "Modello XPP3 Plugin")
5244 (description "The modello XPP3 plugin generates XML readers and writers based
5245 on the XPP3 API (XML Pull Parser).")))
5247 (define-public java-asm
5253 (uri (string-append "https://download.forge.ow2.org/asm/"
5254 "asm-" version ".tar.gz"))
5257 "115l5pqblirdkmzi32dxx7gbcm4jy0s14y5wircr6h8jdr9aix00"))))
5258 (build-system ant-build-system)
5260 `(#:build-target "compile"
5261 ;; The tests require an old version of Janino, which no longer compiles
5266 ;; We don't need these extra ant tasks, but the build system asks us to
5267 ;; provide a path anyway.
5268 "-Dobjectweb.ant.tasks.path=dummy-path"
5269 ;; The java-aqute.bndlib JAR file will be put onto the classpath and
5270 ;; used during the build automatically by ant-build-system, but
5271 ;; java-asm's build.xml fails unless we provide something here.
5272 "-Dbiz.aQute.bnd.path=dummy-path")
5274 (modify-phases %standard-phases
5275 (add-before 'build 'remove-bnd-dependency
5277 ;; This file is the only one to require bnd, and is not needed
5278 ;; because we don't build a bundle.
5279 (delete-file "src/org/objectweb/asm/tools/ModuleInfoBndPlugin.java")
5281 (add-before 'install 'build-jars
5282 (lambda* (#:key make-flags #:allow-other-keys)
5283 ;; We cannot use the "jar" target because it depends on a couple
5284 ;; of unpackaged, complicated tools.
5287 "-cf" (string-append "dist/asm-" ,version ".jar")
5288 "-C" "output/build/tmp" ".")))
5289 (add-before 'install 'fix-pom
5291 (substitute* (find-files "archive" "\\.pom$")
5292 (("@product.artifact@") ,version))
5294 (add-before 'install 'install-parent
5295 (install-pom-file "archive/asm-parent.pom"))
5297 (install-from-pom "archive/asm.pom")))))
5299 `(("java-junit" ,java-junit)))
5301 `(("java-org-ow2-parent-pom" ,java-org-ow2-parent-pom-1.3)))
5302 (home-page "https://asm.ow2.io/")
5303 (synopsis "Very small and fast Java bytecode manipulation framework")
5304 (description "ASM is an all purpose Java bytecode manipulation and
5305 analysis framework. It can be used to modify existing classes or dynamically
5306 generate classes, directly in binary form. The provided common
5307 transformations and analysis algorithms allow easily assembling custom
5308 complex transformations and code analysis tools.")
5309 (license license:bsd-3)))
5311 (define java-org-ow2-parent-pom-1.3
5313 (name "java-org-ow2-parent-pom")
5317 (uri "https://repo1.maven.org/maven2/org/ow2/ow2/1.3/ow2-1.3.pom")
5320 "1yr8hfx8gffpppa4ii6cvrsq029a6x8hzy7nsavxhs60s9kmq8ai"))))
5321 (build-system ant-build-system)
5325 (modify-phases %standard-phases
5330 (install-pom-file (assoc-ref %build-inputs "source"))))))
5331 (home-page "https://ow2.org")
5332 (synopsis "Ow2.org parent pom")
5333 (description "This package contains the parent pom for projects from ow2.org,
5334 including java-asm.")
5335 (license license:lgpl2.1+)))
5337 (define java-asm-bootstrap
5340 (name "java-asm-bootstrap")
5342 (substitute-keyword-arguments (package-arguments java-asm)
5344 (native-inputs `())))
5346 (define-public java-asm-8
5353 (url "https://gitlab.ow2.org/asm/asm")
5354 (commit (string-append
5355 "ASM_" (string-join (string-split version #\.)
5357 (file-name (git-file-name "java-asm" version))
5360 "1s6j27zc1i76gh891w2g48b1c3abp9w8zp5j54yb1vm5h8djkd69"))))
5362 `(#:jar-name "asm8.jar"
5363 #:source-dir "asm/src/main/java"
5364 #:test-dir "asm/src/test"
5365 ;; tests depend on junit5
5367 (propagated-inputs '())
5368 (native-inputs '())))
5370 (define-public java-asm-tree-8
5372 (inherit java-asm-8)
5373 (name "java-asm-tree")
5375 `(#:jar-name "asm-tree.jar"
5376 #:source-dir "asm-tree/src/main/java"
5377 #:test-dir "asm-tree/src/test"
5378 ;; tests depend on junit5
5381 `(("java-asm" ,java-asm-8)))))
5383 (define-public java-asm-analysis-8
5385 (inherit java-asm-8)
5386 (name "java-asm-analysis")
5388 `(#:jar-name "asm-analysis.jar"
5389 #:source-dir "asm-analysis/src/main/java"
5390 #:test-dir "asm-analysis/src/test"
5391 ;; tests depend on junit5
5394 `(("java-asm" ,java-asm-8)
5395 ("java-asm-tree" ,java-asm-tree-8)))))
5397 (define-public java-asm-util-8
5399 (inherit java-asm-8)
5400 (name "java-asm-util")
5402 `(#:jar-name "asm-util8.jar"
5403 #:source-dir "asm-util/src/main/java"
5404 #:test-dir "asm-util/src/test"
5405 ;; tests depend on junit5
5408 `(("java-asm" ,java-asm-8)
5409 ("java-asm-analysis" ,java-asm-analysis-8)
5410 ("java-asm-tree" ,java-asm-tree-8)))))
5412 (define-public java-cglib
5420 (url "https://github.com/cglib/cglib")
5421 (commit (string-append
5423 (string-map (lambda (c) (if (char=? c #\.) #\_ c))
5425 (file-name (git-file-name name version))
5427 (base32 "186451jms2zfp47yd8kxd77az2cqal1my2br7klgyp8fpl4qfg8v"))))
5428 (build-system ant-build-system)
5430 `(;; FIXME: tests fail because junit runs
5431 ;; "net.sf.cglib.transform.AbstractTransformTest", which does not seem
5432 ;; to describe a test at all.
5434 #:jar-name "cglib.jar"
5436 (modify-phases %standard-phases
5437 (add-after 'unpack 'chdir
5438 (lambda _ (chdir "cglib") #t)))))
5440 `(("java-asm" ,java-asm)
5441 ("java-junit" ,java-junit)))
5442 (home-page "https://github.com/cglib/cglib/")
5443 (synopsis "Java byte code generation library")
5444 (description "The byte code generation library CGLIB is a high level API
5445 to generate and transform Java byte code.")
5446 (license license:asl2.0)))
5448 (define-public java-objenesis
5450 (name "java-objenesis")
5455 (url "https://github.com/easymock/objenesis")
5457 (file-name (git-file-name name version))
5460 "054yi200wj00x6dp1sxfrwgndwywadsbn8d8ij1j0v45j9g2vdya"))))
5461 (build-system ant-build-system)
5463 `(#:jar-name "objenesis.jar"
5464 #:source-dir "main/src/"
5465 #:test-dir "main/src/test/"))
5467 `(("java-junit" ,java-junit)
5468 ("java-hamcrest-core" ,java-hamcrest-core)))
5469 (home-page "http://objenesis.org/")
5470 (synopsis "Bypass the constructor when creating an object")
5471 (description "Objenesis is a small Java library that serves one purpose:
5472 to instantiate a new object of a particular class. It is common to see
5473 restrictions in libraries stating that classes must require a default
5474 constructor. Objenesis aims to overcome these restrictions by bypassing the
5475 constructor on object instantiation.")
5476 (license license:asl2.0)))
5478 (define-public java-easymock
5480 (name "java-easymock")
5485 (url "https://github.com/easymock/easymock/")
5486 (commit (string-append "easymock-" version))))
5487 (file-name (git-file-name name version))
5490 "02vybm8hc0i0n9sp2f2iiqn54zwqhq835f76wc6b2m7819z5a8dq"))))
5491 (build-system ant-build-system)
5493 `(#:jar-name "easymock.jar"
5494 #:source-dir "core/src/main"
5495 #:test-dir "core/src/test"
5497 (modify-phases %standard-phases
5498 ;; FIXME: Android support requires the following packages to be
5499 ;; available: com.google.dexmaker.stock.ProxyBuilder
5500 (add-after 'unpack 'delete-android-support
5502 (with-directory-excursion "core/src/main/java/org/easymock/internal"
5503 (substitute* "MocksControl.java"
5504 (("AndroidSupport.isAndroid\\(\\)") "false")
5505 (("return classProxyFactory = new AndroidClassProxyFactory\\(\\);") ""))
5506 (delete-file "AndroidClassProxyFactory.java"))
5508 (add-after 'unpack 'delete-broken-tests
5510 (with-directory-excursion "core/src/test/java/org/easymock"
5511 ;; This test depends on dexmaker.
5512 (delete-file "tests2/ClassExtensionHelperTest.java")
5514 ;; This is not a test.
5515 (delete-file "tests/BaseEasyMockRunnerTest.java")
5517 ;; This test should be executed with a different runner...
5518 (delete-file "tests2/EasyMockAnnotationsTest.java")
5519 ;; ...but deleting it means that we also have to delete these
5521 (delete-file "tests2/EasyMockRunnerTest.java")
5522 (delete-file "tests2/EasyMockRuleTest.java")
5524 ;; This test fails because the file "easymock.properties" does
5526 (delete-file "tests2/EasyMockPropertiesTest.java"))
5529 `(("java-asm" ,java-asm)
5530 ("java-cglib" ,java-cglib)
5531 ("java-objenesis" ,java-objenesis)))
5533 `(("java-junit" ,java-junit)
5534 ("java-hamcrest-core" ,java-hamcrest-core)))
5535 (home-page "https://easymock.org/")
5536 (synopsis "Java library providing mock objects for unit tests")
5537 (description "EasyMock is a Java library that provides an easy way to use
5538 mock objects in unit testing.")
5539 (license license:asl2.0)))
5541 (define-public java-jmock-1
5548 (url "https://github.com/jmock-developers/jmock-library")
5550 (file-name (git-file-name name version))
5553 "0lkga995xd9b9mmzxmcd301hlw83p1h78nibh7djlx7wydscr85z"))))
5554 (build-system ant-build-system)
5556 `(#:build-target "jars"
5557 #:test-target "run.tests"
5559 (modify-phases %standard-phases
5560 (replace 'install (install-jars "build")))))
5561 (home-page "http://jmock.org/")
5562 (synopsis "Mock object library for test-driven development")
5563 (description "JMock is a library that supports test-driven development of
5564 Java code with mock objects. Mock objects help you design and test the
5565 interactions between the objects in your programs.
5570 @item makes it quick and easy to define mock objects
5571 @item lets you precisely specify the interactions between
5572 your objects, reducing the brittleness of your tests
5573 @item plugs into your favourite test framework
5574 @item is easy to extend.
5576 (license license:bsd-3)))
5578 (define-public java-jmock
5580 (inherit java-jmock-1)
5586 (url "https://github.com/jmock-developers/jmock-library")
5588 (file-name (git-file-name name version))
5591 "12b7l22g3nrjvf2dzcw3z03fpd2chrgp0d8xkvn8w55rwb57pax6"))))
5593 `(("java-hamcrest-all" ,java-hamcrest-all)
5594 ("java-asm" ,java-asm)
5595 ("java-bsh" ,java-bsh)
5596 ("java-junit" ,java-junit)))
5598 `(("cglib" ,java-cglib)))
5600 `(#:jar-name "java-jmock.jar"
5601 #:source-dir "jmock/src/main/java"
5602 #:test-dir "jmock/src/test"))))
5604 (define-public java-jmock-junit4
5606 (inherit java-jmock)
5607 (name "java-jmock-junit4")
5609 `(#:jar-name "java-jmock-junit4.jar"
5610 #:source-dir "jmock-junit4/src/main/java"
5611 #:test-dir "jmock-junit4/src/test"))
5613 `(("java-hamcrest-all" ,java-hamcrest-all)
5614 ("java-asm" ,java-asm)
5615 ("java-bsh" ,java-bsh)
5616 ("java-jmock" ,java-jmock)
5617 ("java-jumit" ,java-junit)))))
5619 (define-public java-jmock-legacy
5621 (inherit java-jmock)
5622 (name "java-jmock-legacy")
5624 `(#:jar-name "java-jmock-legacy.jar"
5625 #:source-dir "jmock-legacy/src/main/java"
5626 #:test-dir "jmock-legacy/src/test"
5628 (modify-phases %standard-phases
5629 (add-before 'check 'copy-tests
5631 ;; This file is a dependancy of some tests
5632 (let ((file "org/jmock/test/acceptance/PackageProtectedType.java"))
5633 (copy-file (string-append "jmock/src/test/java/" file)
5634 (string-append "jmock-legacy/src/test/java/" file))
5637 `(("java-hamcrest-all" ,java-hamcrest-all)
5638 ("java-objenesis" ,java-objenesis)
5639 ("java-cglib" ,java-cglib)
5640 ("java-jmock" ,java-jmock)
5641 ("java-asm" ,java-asm)
5642 ("java-bsh" ,java-bsh)
5643 ("java-junit" ,java-junit)))
5645 `(("java-jmock-junit4" ,java-jmock-junit4)))))
5647 (define-public java-hamcrest-all
5648 (package (inherit java-hamcrest-core)
5649 (name "java-hamcrest-all")
5652 ,@(substitute-keyword-arguments (package-arguments java-hamcrest-core)
5653 ((#:build-target _) "bigjar")
5655 `(modify-phases ,phases
5656 ;; Some build targets override the classpath, so we need to patch
5657 ;; the build.xml to ensure that required dependencies are on the
5659 (add-after 'unpack 'patch-classpath-for-integration
5660 (lambda* (#:key inputs #:allow-other-keys)
5661 (substitute* "build.xml"
5662 ((" build/hamcrest-library-\\$\\{version\\}.jar" line)
5666 (find-files (assoc-ref inputs "java-junit") "\\.jar$")
5667 (find-files (assoc-ref inputs "java-jmock") "\\.jar$")
5668 (find-files (assoc-ref inputs "java-easymock") "\\.jar$")))
5670 (("build/hamcrest-core-\\$\\{version\\}\\.jar")
5671 (car (find-files (assoc-ref inputs "java-hamcrest-core")
5675 (lambda* (#:key outputs #:allow-other-keys)
5676 (let* ((target (string-append (assoc-ref outputs "out")
5680 "-" (package-version java-hamcrest-core) ".jar"))
5681 (install-without-version-suffix
5684 (string-append target
5685 (basename jar version-suffix)
5689 install-without-version-suffix
5692 (and (string-suffix? ".jar" name)
5693 (not (string-suffix? "-sources.jar" name)))))))
5696 `(("java-junit" ,java-junit)
5697 ("java-jmock" ,java-jmock-1)
5698 ;; This is necessary because of what seems to be a race condition.
5699 ;; This package would sometimes fail to build because hamcrest-core.jar
5700 ;; could not be found, even though it is built as part of this package.
5701 ;; Adding java-hamcrest-core appears to fix this problem. See
5702 ;; https://debbugs.gnu.org/31390 for more information.
5703 ("java-hamcrest-core" ,java-hamcrest-core)
5704 ("java-easymock" ,java-easymock)
5705 ,@(package-inputs java-hamcrest-core)))))
5707 (define-public java-jopt-simple
5709 (name "java-jopt-simple")
5713 (uri (string-append "http://repo1.maven.org/maven2/"
5714 "net/sf/jopt-simple/jopt-simple/"
5715 version "/jopt-simple-"
5716 version "-sources.jar"))
5719 "1v8bzmwmw6qq20gm42xyay6vrd567dra4vqwhgjnqqjz1gs9f8qa"))))
5720 (build-system ant-build-system)
5722 `(#:tests? #f ; there are no tests
5723 #:jar-name "jopt-simple.jar"))
5724 (home-page "https://pholser.github.io/jopt-simple/")
5725 (synopsis "Java library for parsing command line options")
5726 (description "JOpt Simple is a Java library for parsing command line
5727 options, such as those you might pass to an invocation of @code{javac}. In
5728 the interest of striving for simplicity, as closely as possible JOpt Simple
5729 attempts to honor the command line option syntaxes of POSIX @code{getopt} and
5730 GNU @code{getopt_long}. It also aims to make option parser configuration and
5731 retrieval of options and their arguments simple and expressive, without being
5733 (license license:expat)))
5735 (define-public java-commons-math3
5737 (name "java-commons-math3")
5741 (uri (string-append "mirror://apache/commons/math/source/"
5742 "commons-math3-" version "-src.tar.gz"))
5745 "19l6yp44qc5g7wg816nbn5z3zq3xxzwimvbm4a8pczgvpi4i85s6"))))
5746 (build-system ant-build-system)
5748 `(#:build-target "jar"
5749 #:test-target "test"
5751 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
5752 (junit (assoc-ref %build-inputs "java-junit")))
5753 (list (string-append "-Djunit.jar="
5754 (car (find-files junit "jar$")))
5755 (string-append "-Dhamcrest.jar="
5756 (car (find-files hamcrest ".*.jar$")))))
5758 (modify-phases %standard-phases
5759 ;; We want to build the jar in the build phase and run the tests
5760 ;; later in a separate phase.
5761 (add-after 'unpack 'untangle-targets
5763 (substitute* "build.xml"
5764 (("name=\"jar\" depends=\"test\"")
5765 "name=\"jar\" depends=\"compile\""))
5767 ;; There is no install target.
5769 (install-jars "target")))))
5771 `(("java-junit" ,java-junit)
5772 ("java-hamcrest-core" ,java-hamcrest-core)))
5773 (home-page "https://commons.apache.org/math/")
5774 (synopsis "Apache Commons mathematics library")
5775 (description "Commons Math is a library of lightweight, self-contained
5776 mathematics and statistics components addressing the most common problems not
5777 available in the Java programming language or Commons Lang.")
5778 (license license:asl2.0)))
5780 (define-public java-jmh
5787 (url "http://hg.openjdk.java.net/code-tools/jmh/")
5788 (changeset version)))
5789 (file-name (string-append name "-" version "-checkout"))
5792 "1fxyxhg9famwcg1prc4cgwb5wzyxqavn3cjm5vz8605xz7x5k084"))))
5793 (build-system ant-build-system)
5795 `(#:jar-name "jmh-core.jar"
5796 #:source-dir "jmh-core/src/main"
5797 #:test-dir "jmh-core/src/test"
5799 (modify-phases %standard-phases
5800 ;; This seems to be a bug in the JDK. It may not be necessary in
5801 ;; future versions of the JDK.
5802 (add-after 'unpack 'fix-bug
5804 (with-directory-excursion
5805 "jmh-core/src/main/java/org/openjdk/jmh/runner/options"
5806 (substitute* '("IntegerValueConverter.java"
5807 "ThreadsValueConverter.java")
5808 (("public Class<Integer> valueType")
5809 "public Class<? extends Integer> valueType")))
5812 `(("java-jopt-simple" ,java-jopt-simple)
5813 ("java-commons-math3" ,java-commons-math3)))
5815 `(("java-junit" ,java-junit)
5816 ("java-hamcrest-core" ,java-hamcrest-core)))
5817 (home-page "https://openjdk.java.net/projects/code-tools/jmh/")
5818 (synopsis "Benchmark harness for the JVM")
5819 (description "JMH is a Java harness for building, running, and analysing
5820 nano/micro/milli/macro benchmarks written in Java and other languages
5821 targeting the JVM.")
5823 (license license:gpl2)))
5825 (define-public java-commons-collections4
5827 (name "java-commons-collections4")
5831 (uri (string-append "mirror://apache/commons/collections/source/"
5832 "commons-collections4-" version "-src.tar.gz"))
5835 "1krfhvggympq4avk7gh6qafzf6b9ip6r1m4lmacikyx04039m0wl"))))
5836 (build-system ant-build-system)
5838 `(#:test-target "test"
5840 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
5841 (junit (assoc-ref %build-inputs "java-junit"))
5842 (easymock (assoc-ref %build-inputs "java-easymock")))
5843 (list (string-append "-Djunit.jar="
5844 (car (find-files junit "jar$")))
5845 (string-append "-Dhamcrest.jar="
5846 (car (find-files hamcrest "jar$")))
5847 (string-append "-Deasymock.jar=" easymock
5848 "/share/java/easymock.jar")))
5850 (modify-phases %standard-phases
5852 (install-jars "target")))))
5854 `(("java-junit" ,java-junit)
5855 ("java-hamcrest-core" ,java-hamcrest-core)
5856 ("java-easymock" ,java-easymock)))
5857 (home-page "https://commons.apache.org/collections/")
5858 (synopsis "Collections framework")
5859 (description "The Java Collections Framework is the recognised standard
5860 for collection handling in Java. Commons-Collections seek to build upon the
5861 JDK classes by providing new interfaces, implementations and utilities. There
5862 are many features, including:
5865 @item @code{Bag} interface for collections that have a number of copies of
5867 @item @code{BidiMap} interface for maps that can be looked up from value to
5868 key as well and key to value
5869 @item @code{MapIterator} interface to provide simple and quick iteration over
5871 @item Transforming decorators that alter each object as it is added to the
5873 @item Composite collections that make multiple collections look like one
5874 @item Ordered maps and sets that retain the order elements are added in,
5875 including an LRU based map
5876 @item Reference map that allows keys and/or values to be garbage collected
5878 @item Many comparator implementations
5879 @item Many iterator implementations
5880 @item Adapter classes from array and enumerations to collections
5881 @item Utilities to test or create typical set-theory properties of collections
5882 such as union, intersection, and closure.
5884 (license license:asl2.0)))
5886 (define-public java-commons-collections
5888 (inherit java-commons-collections4)
5889 (name "java-commons-collections")
5893 (uri (string-append "mirror://apache/commons/collections/source/"
5894 "commons-collections-" version "-src.tar.gz"))
5897 "055r51a5lfc3z7rkxnxmnn1npvkvda7636hjpm4qk7cnfzz98387"))
5899 (search-patches "java-commons-collections-fix-java8.patch"))))
5901 (substitute-keyword-arguments (package-arguments java-commons-collections4)
5903 `(modify-phases ,phases
5904 ;; The manifest is required by the build procedure
5905 (add-before 'build 'add-manifest
5907 (mkdir-p "build/conf")
5908 (call-with-output-file "build/conf/MANIFEST.MF"
5910 (format file "Manifest-Version: 1.0\n")))
5913 (install-jars "build"))))))))
5915 (define java-commons-collections-test-classes
5917 (inherit java-commons-collections)
5919 `(#:jar-name "commons-collections-test-classes.jar"
5920 #:source-dir "src/test"
5923 `(("collection" ,java-commons-collections)))))
5925 (define-public java-commons-beanutils
5927 (name "java-commons-beanutils")
5931 (uri (string-append "mirror://apache/commons/beanutils/source/"
5932 "commons-beanutils-" version "-src.tar.gz"))
5935 "03cs0bq3sl1sdc7py9g3qnf8n9h473nrkvd3d251kaqv6a2ab7qk"))))
5936 (build-system ant-build-system)
5938 `(#:test-target "test"
5941 (modify-phases %standard-phases
5943 (lambda* (#:key outputs #:allow-other-keys)
5944 (rename-file (string-append "dist/commons-beanutils-" ,version
5946 "commons-beanutils.jar")
5947 (install-file "commons-beanutils.jar"
5948 (string-append (assoc-ref outputs "out") "/share/java/"))
5951 `(("logging" ,java-commons-logging-minimal)
5952 ("collections" ,java-commons-collections)))
5954 `(("junit" ,java-junit)
5955 ("collections-test" ,java-commons-collections-test-classes)))
5956 (home-page "https://commons.apache.org/beanutils/")
5957 (synopsis "Dynamically set or get properties in Java")
5958 (description "BeanUtils provides a simplified interface to reflection and
5959 introspection to set or get dynamically determined properties through their
5960 setter and getter method.")
5961 (license license:asl2.0)))
5963 (define-public java-commons-io
5965 (name "java-commons-io")
5970 (uri (string-append "mirror://apache/commons/io/source/"
5971 "commons-io-" version "-src.tar.gz"))
5974 "0q5y41jrcjvx9hzs47x5kdhnasdy6rm4bzqd2jxl02w717m7a7v3"))))
5975 (build-system ant-build-system)
5976 (outputs '("out" "doc"))
5978 `(#:test-target "test"
5980 (list (string-append "-Djunit.jar="
5981 (car (find-files (assoc-ref %build-inputs "java-junit")
5984 (modify-phases %standard-phases
5985 (add-after 'build 'build-javadoc ant-build-javadoc)
5986 (replace 'install (install-from-pom "pom.xml"))
5987 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
5989 `(("java-junit" ,java-junit)
5990 ("java-hamcrest-core" ,java-hamcrest-core)))
5992 `(("apache-commons-parent-pom" ,apache-commons-parent-pom-39)))
5993 (home-page "https://commons.apache.org/io/")
5994 (synopsis "Common useful IO related classes")
5995 (description "Commons-IO contains utility classes, stream implementations,
5996 file filters and endian classes.")
5997 (license license:asl2.0)))
5999 (define-public java-commons-exec-1.1
6001 (name "java-commons-exec")
6006 (uri (string-append "mirror://apache/commons/exec/source/"
6007 "commons-exec-" version "-src.tar.gz"))
6010 "025dk8xgj10lxwwwqp0hng2rn7fr4vcirxzydqzx9k4dim667alk"))))
6011 (build-system ant-build-system)
6013 `(#:test-target "test"
6015 (list (string-append "-Dmaven.junit.jar="
6016 (car (find-files (assoc-ref %build-inputs "java-junit")
6019 (modify-phases %standard-phases
6020 (add-before 'build 'delete-network-tests
6022 (delete-file "src/test/java/org/apache/commons/exec/DefaultExecutorTest.java")
6023 (substitute* "src/test/java/org/apache/commons/exec/TestRunner.java"
6024 (("suite\\.addTestSuite\\(DefaultExecutorTest\\.class\\);") ""))
6026 ;; The "build" phase automatically tests.
6028 (replace 'install (install-jars "target")))))
6030 `(("java-junit" ,java-junit)))
6031 (home-page "https://commons.apache.org/proper/commons-exec/")
6032 (synopsis "Common program execution related classes")
6033 (description "Commons-Exec simplifies executing external processes.")
6034 (license license:asl2.0)))
6036 (define-public java-commons-exec
6038 (inherit java-commons-exec-1.1)
6043 (uri (string-append "mirror://apache/commons/exec/source/"
6044 "commons-exec-" version "-src.tar.gz"))
6047 "17yb4h6f8l49c5iyyvda4z2nmw0bxrx857nrwmsr7mmpb7x441yv"))))
6049 `(#:test-target "test"
6051 (list (string-append "-Dmaven.junit.jar="
6052 (car (find-files (assoc-ref %build-inputs "java-junit")
6054 "-Dmaven.compiler.source=1.7"
6055 "-Dmaven.compiler.target=1.7")
6057 (modify-phases %standard-phases
6058 (add-before 'build 'delete-network-tests
6059 (lambda* (#:key inputs #:allow-other-keys)
6060 ;; This test hangs indefinitely.
6061 (delete-file "src/test/java/org/apache/commons/exec/issues/Exec60Test.java")
6062 (substitute* "src/test/java/org/apache/commons/exec/issues/Exec41Test.java"
6063 (("ping -c 10 127.0.0.1") "sleep 10"))
6064 (substitute* "src/test/java/org/apache/commons/exec/issues/Exec49Test.java"
6066 (call-with-output-file "src/test/scripts/ping.sh"
6068 (format port "#!~a/bin/sh\nsleep $1\n"
6069 (assoc-ref inputs "bash"))))
6071 ;; The "build" phase automatically tests.
6073 (replace 'install (install-jars "target")))))
6075 `(("java-junit" ,java-junit)
6076 ("java-hamcrest-core" ,java-hamcrest-core)))))
6078 (define-public java-commons-lang
6080 (name "java-commons-lang")
6085 (uri (string-append "mirror://apache/commons/lang/source/"
6086 "commons-lang-" version "-src.tar.gz"))
6088 (base32 "1mxwagqadzx1b2al7i0z1v0r235aj2njdyijf02szq0vhmqrfiq5"))))
6089 (build-system ant-build-system)
6090 (outputs '("out" "doc"))
6092 `(#:test-target "test"
6093 #:test-exclude (list "**/Abstract*.java" "**/Random*.java")
6095 (modify-phases %standard-phases
6096 (add-after 'build 'build-javadoc ant-build-javadoc)
6097 (add-before 'check 'disable-failing-test
6099 ;; Disable a failing test
6100 (substitute* "src/test/java/org/apache/commons/lang/\
6101 time/FastDateFormatTest.java"
6102 (("public void testFormat\\(\\)")
6103 "public void disabled_testFormat()"))
6105 (replace 'install (install-jars "target"))
6106 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
6108 `(("java-junit" ,java-junit)))
6109 (home-page "https://commons.apache.org/lang/")
6110 (synopsis "Extension of the java.lang package")
6111 (description "The Commons Lang components contains a set of Java classes
6112 that provide helper methods for standard Java classes, especially those found
6113 in the @code{java.lang} package in the Sun JDK. The following classes are
6117 @item StringUtils - Helper for @code{java.lang.String}.
6118 @item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets
6119 of characters such as @code{[a-z]} and @code{[abcdez]}.
6120 @item RandomStringUtils - Helper for creating randomised strings.
6121 @item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
6122 @item NumberRange - A range of numbers with an upper and lower bound.
6123 @item ObjectUtils - Helper for @code{java.lang.Object}.
6124 @item SerializationUtils - Helper for serializing objects.
6125 @item SystemUtils - Utility class defining the Java system properties.
6126 @item NestedException package - A sub-package for the creation of nested
6128 @item Enum package - A sub-package for the creation of enumerated types.
6129 @item Builder package - A sub-package for the creation of @code{equals},
6130 @code{hashCode}, @code{compareTo} and @code{toString} methods.
6132 (license license:asl2.0)))
6134 (define-public java-commons-lang3
6136 (name "java-commons-lang3")
6141 (uri (string-append "mirror://apache/commons/lang/source/"
6142 "commons-lang3-" version "-src.tar.gz"))
6144 (base32 "0s4ffbvsyl16c90l45ximsg4dwd8hmz7wsza3p308fw43h6mwhb6"))))
6145 (build-system ant-build-system)
6147 `(#:jar-name "commons-lang3.jar"
6148 #:source-dir "src/main/java"
6149 #:tests? #f; require junit5
6151 (modify-phases %standard-phases
6152 (replace 'install (install-from-pom "pom.xml")))))
6154 `(("apache-commons-parent-pom" ,apache-commons-parent-pom-48)))
6155 (home-page "https://commons.apache.org/lang/")
6156 (synopsis "Extension of the java.lang package")
6157 (description "The Commons Lang components contains a set of Java classes
6158 that provide helper methods for standard Java classes, especially those found
6159 in the @code{java.lang} package. The following classes are included:
6162 @item StringUtils - Helper for @code{java.lang.String}.
6163 @item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets of
6164 characters such as @code{[a-z]} and @code{[abcdez]}.
6165 @item RandomStringUtils - Helper for creating randomised strings.
6166 @item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
6167 @item NumberRange - A range of numbers with an upper and lower bound.
6168 @item ObjectUtils - Helper for @code{java.lang.Object}.
6169 @item SerializationUtils - Helper for serializing objects.
6170 @item SystemUtils - Utility class defining the Java system properties.
6171 @item NestedException package - A sub-package for the creation of nested
6173 @item Enum package - A sub-package for the creation of enumerated types.
6174 @item Builder package - A sub-package for the creation of @code{equals},
6175 @code{hashCode}, @code{compareTo} and @code{toString} methods.
6177 (license license:asl2.0)))
6179 (define-public java-commons-bsf
6181 (name "java-commons-bsf")
6185 (uri (string-append "mirror://apache/commons/bsf/source/bsf-src-"
6189 "1sbamr8jl32p1jgf59nw0b2w9qivyg145954hm6ly54cfgsqrdas"))
6190 (modules '((guix build utils)))
6193 (for-each delete-file
6194 (find-files "." "\\.jar$"))
6196 (build-system ant-build-system)
6198 `(#:build-target "jar"
6199 #:tests? #f; No test file
6200 #:modules ((guix build ant-build-system)
6202 (guix build java-utils)
6205 (modify-phases %standard-phases
6206 (add-before 'build 'create-properties
6208 ;; This file is missing from the distribution
6209 (call-with-output-file "build-properties.xml"
6212 `(project (@ (basedir ".") (name "build-properties") (default ""))
6213 (property (@ (name "project.name") (value "bsf")))
6214 (property (@ (name "source.level") (value "1.5")))
6215 (property (@ (name "build.lib") (value "build/jar")))
6216 (property (@ (name "src.dir") (value "src")))
6217 (property (@ (name "tests.dir") (value "src/org/apache/bsf/test")))
6218 (property (@ (name "build.tests") (value "build/test-classes")))
6219 (property (@ (name "build.dest") (value "build/classes"))))
6222 (replace 'install (install-jars "build")))))
6224 `(("java-junit" ,java-junit)))
6226 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)))
6227 (home-page "https://commons.apache.org/proper/commons-bsf")
6228 (synopsis "Bean Scripting Framework")
6229 (description "The Bean Scripting Framework (BSF) is a set of Java classes
6230 which provides scripting language support within Java applications, and access
6231 to Java objects and methods from scripting languages. BSF allows one to write
6232 JSPs in languages other than Java while providing access to the Java class
6233 library. In addition, BSF permits any Java application to be implemented in
6234 part (or dynamically extended) by a language that is embedded within it. This
6235 is achieved by providing an API that permits calling scripting language engines
6236 from within Java, as well as an object registry that exposes Java objects to
6237 these scripting language engines.")
6238 (license license:asl2.0)))
6240 (define-public java-commons-jxpath
6242 (name "java-commons-jxpath")
6246 (uri (string-append "mirror://apache/commons/jxpath/source/"
6247 "commons-jxpath-" version "-src.tar.gz"))
6250 "1rpgg31ayn9fwr4bfi2i1ij0npcg79ad2fv0w9hacvawsyc42cfs"))))
6251 (build-system ant-build-system)
6253 `(#:jar-name "commons-jxpath.jar"
6254 ;; tests require more dependencies, including mockrunner which depends on old software
6256 #:source-dir "src/java"))
6258 `(("servlet" ,java-classpathx-servletapi)
6259 ("java-jdom" ,java-jdom)
6260 ("java-commons-beanutils" ,java-commons-beanutils)))
6262 `(("java-junit" ,java-junit)))
6263 (home-page "https://commons.apache.org/jxpath/")
6264 (synopsis "Simple interpreter of an expression language called XPath.")
6265 (description "The org.apache.commons.jxpath package defines a simple
6266 interpreter of an expression language called XPath. JXPath applies XPath
6267 expressions to graphs of objects of all kinds: JavaBeans, Maps, Servlet
6268 contexts, DOM etc, including mixtures thereof.")
6269 (license license:asl2.0)))
6271 (define-public java-commons-pool
6273 (name "java-commons-pool")
6277 (uri (string-append "mirror://apache/commons/pool/source/"
6278 "commons-pool2-" version "-src.tar.gz"))
6281 "1fi1hgqmq01bs6azbj3sfswxzadp2r8sjjfiq6ryilz1m50kvrv6"))))
6283 `(#:jar-name "common-pool.jar"
6284 #:source-dir "src/main/java"
6286 (list "**/PerformanceTest.java")))
6287 (build-system ant-build-system)
6289 `(("java-cglib" ,java-cglib)))
6291 `(("java-junit" ,java-junit)
6292 ("java-hamcrest-core" ,java-hamcrest-core)
6293 ("java-asm" ,java-asm)
6294 ("java-objenesis" ,java-objenesis)))
6295 (home-page "https://commons.apache.org/proper/commons-pool/")
6296 (synopsis "Object-pooling API in Java")
6297 (description "The commons-pool package provides an object-pooling API
6298 and a number of object pool implementations. This package defines a
6299 handful of pooling interfaces and some base classes that may be useful when
6300 creating new pool implementations.")
6301 (license license:asl2.0)))
6303 (define-public java-commons-dbcp
6305 (name "java-commons-dbcp")
6309 (uri (string-append "mirror://apache/commons/dbcp/source/"
6310 "commons-dbcp2-" version "-src.tar.gz"))
6313 "0axbvcbnf2l70fc3ybrlp3siw2w4ka9mia2pnx4py8gz54cpw3rc"))))
6315 `(#:source-dir "src/main/java"
6316 #:jar-name "java-commons-dbcp.jar"
6317 #:tests? #f)); requires apache-geronimo
6319 `(("java-commons-pool" ,java-commons-pool)
6320 ("java-commons-logging" ,java-commons-logging-minimal)
6321 ("java-jboss-transaction-api-spec" ,java-jboss-transaction-api-spec)))
6323 `(("java-junit" ,java-junit)))
6324 (build-system ant-build-system)
6325 (home-page "https://commons.apache.org/proper/commons-dbcp/")
6326 (synopsis "Database Connection Pool for Java")
6327 (description "Commons-dbcp allows you to share a pool of database
6328 connections between users. Creating a new connection for each user can be
6329 time consuming and even unfeasible when the number of simultaneous users is
6330 very large. This package provides a way to share a poole of connections to
6332 (license license:asl2.0)))
6334 (define-public java-commons-jcs
6336 (name "java-commons-jcs")
6340 (uri (string-append "mirror://apache/commons/jcs/source/"
6341 "commons-jcs-dist-" version "-src.tar.gz"))
6344 "0syhq2npjbrl0azqfjm0gvash1qd5qjy4qmysxcrqjsk0nf9fa1q"))))
6345 (build-system ant-build-system)
6347 `(#:jar-name "commons-jcs.jar"
6348 #:source-dir "commons-jcs-core/src/main/java"
6349 #:test-dir "commons-jcs-core/src/test"
6350 #:tests? #f; requires hsqldb
6352 (modify-phases %standard-phases
6353 (add-before 'build 'prepare
6355 (with-directory-excursion
6356 "commons-jcs-core/src/main/java/org/apache/commons/jcs"
6358 "auxiliary/disk/jdbc/dsfactory/SharedPoolDataSourceFactory.java"
6359 (("commons.dbcp") "commons.dbcp2")
6360 ((".*\\.setMaxActive.*") ""))
6361 ;;; Remove dependency on velocity-tools
6362 (delete-file "admin/servlet/JCSAdminServlet.java"))
6365 `(("java-classpathx-servletapi" ,java-classpathx-servletapi)
6366 ("java-commons-logging-minimal" ,java-commons-logging-minimal)
6367 ("java-commons-httpclient" ,java-commons-httpclient)
6368 ("java-commons-dbcp" ,java-commons-dbcp)))
6370 `(("java-junit" ,java-junit)))
6371 (home-page "https://commons.apache.org/proper/commons-jcs/")
6372 (synopsis "Distributed caching system in Java")
6373 (description "JCS is a distributed caching system written in Java. It
6374 is intended to speed up applications by providing a means to manage cached
6375 data of various dynamic natures. Like any caching system, JCS is most useful
6376 for high read, low put applications. Latency times drop sharply and
6377 bottlenecks move away from the database in an effectively cached system.")
6378 (license license:asl2.0)))
6380 (define-public java-jsr250
6382 (name "java-jsr250")
6386 (uri (string-append "https://repo1.maven.org/maven2/"
6387 "javax/annotation/javax.annotation-api/"
6388 version "/javax.annotation-api-"
6389 version "-sources.jar"))
6392 "08clh8n4n9wfglf75qsqfjs6yf79f7x6hqx38cn856pksszv50kz"))))
6393 (build-system ant-build-system)
6395 `(#:tests? #f ; no tests included
6397 #:jar-name "jsr250.jar"
6398 #:modules ((guix build ant-build-system)
6400 (guix build maven pom)
6401 (guix build java-utils)
6404 (modify-phases %standard-phases
6405 (add-before 'install 'create-pom
6407 (with-output-to-file "pom.xml"
6411 (modelVersion "4.0.0")
6413 (groupId "javax.annotation")
6414 (artifactId "jsr250-api")
6415 (version ,,version))))))
6418 (install-from-pom "pom.xml")))))
6419 (home-page "https://jcp.org/en/jsr/detail?id=250")
6420 (synopsis "Security-related annotations")
6421 (description "This package provides annotations for security. It provides
6422 packages in the @code{javax.annotation} and @code{javax.annotation.security}
6424 ;; either cddl or gpl2 only, with classpath exception
6425 (license (list license:cddl1.0
6428 (define-public java-jsr305
6430 (name "java-jsr305")
6434 (uri (string-append "https://repo1.maven.org/maven2/"
6435 "com/google/code/findbugs/"
6436 "jsr305/" version "/jsr305-"
6437 version "-sources.jar"))
6440 "1rh6jin9v7jqpq3kf1swl868l8i94r636n03pzpsmgr8v0lh9j2n"))))
6441 (build-system ant-build-system)
6443 `(#:tests? #f ; no tests included
6444 #:jar-name "jsr305.jar"
6445 #:modules ((guix build ant-build-system)
6446 (guix build java-utils)
6447 (guix build maven pom)
6451 (modify-phases %standard-phases
6452 (add-before 'install 'create-pom
6454 (with-output-to-file "pom.xml"
6458 (modelVersion "4.0.0")
6460 (groupId "com.google.code.findbugs")
6461 (artifactId "jsr305")
6462 (version ,,version))))))
6465 (install-from-pom "pom.xml")))))
6466 (home-page "http://findbugs.sourceforge.net/")
6467 (synopsis "Annotations for the static analyzer called findbugs")
6468 (description "This package provides annotations for the findbugs package.
6469 It provides packages in the @code{javax.annotations} namespace.")
6470 (license license:asl2.0)))
6472 (define-public java-guava
6475 ;; This is the last release of Guava that can be built with Java 7.
6480 (url "https://github.com/google/guava/")
6481 (commit (string-append "v" version))))
6482 (file-name (git-file-name name version))
6485 "00h5cawdjic1vind3yivzh1f58flvm1yfmhsyqwyvmbvj1vakysp"))))
6486 (build-system ant-build-system)
6488 `(#:tests? #f ; no tests included
6489 #:jar-name "guava.jar"
6490 #:source-dir "guava/src"
6492 (modify-phases %standard-phases
6493 (add-after 'unpack 'trim-sources
6495 (with-directory-excursion "guava/src/com/google/common"
6496 ;; Remove annotations to avoid extra dependencies:
6497 ;; * "j2objc" annotations are used when converting Java to
6499 ;; * "errorprone" annotations catch common Java mistakes at
6501 ;; * "IgnoreJRERequirement" is used for Android.
6502 (substitute* (find-files "." "\\.java$")
6503 (("import com.google.j2objc.*") "")
6504 (("import com.google.errorprone.annotation.*") "")
6505 (("import org.codehaus.mojo.animal_sniffer.*") "")
6506 (("@CanIgnoreReturnValue") "")
6509 (("@RetainedWith") "")
6511 (("@ForOverride") "")
6512 (("@J2ObjCIncompatible") "")
6513 (("@IgnoreJRERequirement") "")))
6515 (replace 'install (install-from-pom "guava/pom.xml")))))
6517 `(("java-jsr305" ,java-jsr305)))
6519 `(("java-guava-parent-pom" ,java-guava-parent-pom)))
6520 (home-page "https://github.com/google/guava")
6521 (synopsis "Google core libraries for Java")
6522 (description "Guava is a set of core libraries that includes new
6523 collection types (such as multimap and multiset), immutable collections, a
6524 graph library, functional types, an in-memory cache, and APIs/utilities for
6525 concurrency, I/O, hashing, primitives, reflection, string processing, and much
6527 (license license:asl2.0)))
6529 (define java-guava-parent-pom
6531 (inherit java-guava)
6532 (name "java-guava-parent-pom")
6536 (modify-phases %standard-phases
6540 (install-pom-file "pom.xml")))))
6542 `(("java-sonatype-oss-parent-pom" ,java-sonatype-oss-parent-pom-7)))))
6544 ;; The java-commons-logging package provides adapters to many different
6545 ;; logging frameworks. To avoid an excessive dependency graph we try to build
6546 ;; it with only a minimal set of adapters.
6547 (define-public java-commons-logging-minimal
6549 (name "java-commons-logging-minimal")
6553 (uri (string-append "mirror://apache/commons/logging/source/"
6554 "commons-logging-" version "-src.tar.gz"))
6557 "10bwcy5w8d7y39n0krlwhnp8ds3kj5zhmzj0zxnkw0qdlsjmsrj9"))))
6558 (build-system ant-build-system)
6560 `(#:tests? #f ; avoid dependency on logging frameworks
6561 #:jar-name "commons-logging-minimal.jar"
6563 (modify-phases %standard-phases
6564 (add-after 'unpack 'delete-adapters-and-tests
6566 ;; Delete all adapters except for NoOpLog, SimpleLog, and
6567 ;; LogFactoryImpl. NoOpLog is required to build; LogFactoryImpl
6568 ;; is used by applications; SimpleLog is the only actually usable
6569 ;; implementation that does not depend on another logging
6573 (delete-file (string-append
6574 "src/main/java/org/apache/commons/logging/impl/" file)))
6575 (list "Jdk13LumberjackLogger.java"
6576 "WeakHashtable.java"
6578 "ServletContextCleaner.java"
6581 "LogKitLogger.java"))
6582 (delete-file-recursively "src/test")
6584 (home-page "https://commons.apache.org/logging/")
6585 (synopsis "Common API for logging implementations")
6586 (description "The Logging package is a thin bridge between different
6587 logging implementations. A library that uses the commons-logging API can be
6588 used with any logging implementation at runtime.")
6589 (license license:asl2.0)))
6591 ;; This is the last release of the 1.x series.
6592 (define-public java-mockito-1
6594 (name "java-mockito")
6598 (uri (string-append "http://repo1.maven.org/maven2/"
6599 "org/mockito/mockito-core/" version
6600 "/mockito-core-" version "-sources.jar"))
6603 "0vmiwnwpf83g2q7kj1rislmja8fpvqkixjhawh7nxnygx6pq11kc"))))
6604 (build-system ant-build-system)
6606 `(#:jar-name "mockito.jar"
6607 #:tests? #f ; no tests included
6608 ;; FIXME: patch-and-repack does not support jars, so we have to apply
6609 ;; patches in build phases.
6611 (modify-phases %standard-phases
6612 ;; Mockito was developed against a different version of hamcrest,
6613 ;; which does not require matcher implementations to provide an
6614 ;; implementation of the "describeMismatch" method. We add this
6615 ;; simple definition to pass the build with our version of hamcrest.
6616 (add-after 'unpack 'fix-hamcrest-build-error
6618 (substitute* "src/org/mockito/internal/matchers/LocalizedMatcher.java"
6619 (("public Matcher getActualMatcher\\(\\) .*" line)
6621 public void describeMismatch(Object item, Description description) {
6622 actualMatcher.describeMismatch(item, description);
6626 ;; Mockito bundles cglib. We have a cglib package, so let's use
6628 (add-after 'unpack 'use-system-libraries
6630 (with-directory-excursion "src/org/mockito/internal/creation/cglib"
6631 (substitute* '("CGLIBHacker.java"
6632 "CglibMockMaker.java"
6633 "ClassImposterizer.java"
6634 "DelegatingMockitoMethodProxy.java"
6635 "MethodInterceptorFilter.java"
6636 "MockitoNamingPolicy.java"
6637 "SerializableMockitoMethodProxy.java"
6638 "SerializableNoOp.java")
6639 (("import org.mockito.cglib") "import net.sf.cglib")))
6642 `(("java-junit" ,java-junit)
6643 ("java-objenesis" ,java-objenesis)
6644 ("java-cglib" ,java-cglib)
6645 ("java-hamcrest-core" ,java-hamcrest-core)))
6646 (home-page "http://mockito.org")
6647 (synopsis "Mockito is a mock library for Java")
6648 (description "Mockito is a mocking library for Java which lets you write
6649 tests with a clean and simple API. It generates mocks using reflection, and
6650 it records all mock invocations, including methods arguments.")
6651 (license license:asl2.0)))
6653 (define-public java-httpcomponents-httpcore
6655 (name "java-httpcomponents-httpcore")
6659 (uri (string-append "mirror://apache//httpcomponents/httpcore/"
6660 "source/httpcomponents-core-"
6661 version "-src.tar.gz"))
6664 "02bwcf38y4vgwq7kj2s6q7qrmma641r5lacivm16kgxvb2j6h1vy"))))
6665 (build-system ant-build-system)
6667 `(#:jar-name "httpcomponents-httpcore.jar"
6669 (modify-phases %standard-phases
6670 (add-after 'unpack 'chdir
6671 (lambda _ (chdir "httpcore") #t)))))
6673 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)
6674 ("java-commons-lang3" ,java-commons-lang3)))
6676 `(("java-junit" ,java-junit)
6677 ("java-mockito" ,java-mockito-1)))
6678 (home-page "https://hc.apache.org/httpcomponents-core-4.4.x/index.html")
6679 (synopsis "Low level HTTP transport components")
6680 (description "HttpCore is a set of low level HTTP transport components
6681 that can be used to build custom client and server side HTTP services with a
6682 minimal footprint. HttpCore supports two I/O models: blocking I/O model based
6683 on the classic Java I/O and non-blocking, event driven I/O model based on Java
6686 This package provides the blocking I/O model library.")
6687 (license license:asl2.0)))
6689 (define-public java-httpcomponents-httpcore-nio
6690 (package (inherit java-httpcomponents-httpcore)
6691 (name "java-httpcomponents-httpcore-nio")
6693 `(#:jar-name "httpcomponents-httpcore-nio.jar"
6695 (modify-phases %standard-phases
6696 (add-after 'unpack 'chdir
6697 (lambda _ (chdir "httpcore-nio") #t)))))
6699 `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
6700 ("java-hamcrest-core" ,java-hamcrest-core)
6701 ,@(package-inputs java-httpcomponents-httpcore)))
6702 (description "HttpCore is a set of low level HTTP transport components
6703 that can be used to build custom client and server side HTTP services with a
6704 minimal footprint. HttpCore supports two I/O models: blocking I/O model based
6705 on the classic Java I/O and non-blocking, event driven I/O model based on Java
6708 This package provides the non-blocking I/O model library based on Java
6711 (define-public java-httpcomponents-httpcore-ab
6712 (package (inherit java-httpcomponents-httpcore)
6713 (name "java-httpcomponents-httpcore-ab")
6715 `(#:jar-name "httpcomponents-httpcore-ab.jar"
6717 (modify-phases %standard-phases
6718 (add-after 'unpack 'chdir
6719 (lambda _ (chdir "httpcore-ab") #t)))))
6721 `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
6722 ("java-commons-cli" ,java-commons-cli)
6723 ("java-hamcrest-core" ,java-hamcrest-core)
6724 ,@(package-inputs java-httpcomponents-httpcore)))
6725 (synopsis "Apache HttpCore benchmarking tool")
6726 (description "This package provides the HttpCore benchmarking tool. It is
6727 an Apache AB clone based on HttpCore.")))
6729 (define-public java-httpcomponents-httpclient
6731 (name "java-httpcomponents-httpclient")
6735 (uri (string-append "mirror://apache/httpcomponents/httpclient/"
6736 "source/httpcomponents-client-"
6737 version "-src.tar.gz"))
6740 "1va99m2zc2liv0v9vn72p5ja8yz4s5wq7zpahaai5nr966kvxzkb"))))
6741 (build-system ant-build-system)
6743 `(#:jar-name "httpcomponents-httpclient.jar"
6745 (modify-phases %standard-phases
6746 (add-after 'unpack 'chdir
6747 (lambda _ (chdir "httpclient") #t)))))
6749 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)
6750 ("java-commons-codec" ,java-commons-codec)
6751 ("java-hamcrest-core" ,java-hamcrest-core)
6752 ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
6753 ("java-mockito" ,java-mockito-1)
6754 ("java-junit" ,java-junit)))
6755 (home-page "https://hc.apache.org/httpcomponents-client-ga/")
6756 (synopsis "HTTP client library for Java")
6757 (description "Although the @code{java.net} package provides basic
6758 functionality for accessing resources via HTTP, it doesn't provide the full
6759 flexibility or functionality needed by many applications. @code{HttpClient}
6760 seeks to fill this void by providing an efficient, up-to-date, and
6761 feature-rich package implementing the client side of the most recent HTTP
6762 standards and recommendations.")
6763 (license license:asl2.0)))
6765 (define-public java-httpcomponents-httpmime
6766 (package (inherit java-httpcomponents-httpclient)
6767 (name "java-httpcomponents-httpmime")
6769 `(#:jar-name "httpcomponents-httpmime.jar"
6771 (modify-phases %standard-phases
6772 (add-after 'unpack 'chdir
6773 (lambda _ (chdir "httpmime") #t)))))
6775 `(("java-httpcomponents-httpclient" ,java-httpcomponents-httpclient)
6776 ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
6777 ("java-junit" ,java-junit)
6778 ("java-hamcrest-core" ,java-hamcrest-core)))))
6780 (define-public java-commons-net
6782 (name "java-commons-net")
6786 (uri (string-append "mirror://apache/commons/net/source/"
6787 "commons-net-" version "-src.tar.gz"))
6790 "0n0cmnddk9qdqhjvka8pc6hd9mn2qi3166f1s6xk32h7rfy1adxr"))))
6791 (build-system ant-build-system)
6793 `(;; FIXME: MainTest.java tries to read "examples.properties" (which
6794 ;; should be "resources/examples/examples.properties"), but gets "null"
6797 #:jar-name "commons-net.jar"))
6799 `(("java-junit" ,java-junit)
6800 ("java-hamcrest-core" ,java-hamcrest-core)))
6801 (home-page "https://commons.apache.org/net/")
6802 (synopsis "Client library for many basic Internet protocols")
6803 (description "The Apache Commons Net library implements the client side of
6804 many basic Internet protocols. The purpose of the library is to provide
6805 fundamental protocol access, not higher-level abstractions.")
6806 (license license:asl2.0)))
6808 (define-public java-jsch
6814 (uri (string-append "mirror://sourceforge/jsch/jsch/"
6815 version "/jsch-" version ".zip"))
6818 "1lxyjwvmwa723wcf3bqn816hkvc03vz4xhbsi7bvfhrz2rpgcfq6"))))
6819 (build-system ant-build-system)
6821 `(#:build-target "dist"
6822 #:tests? #f ; no tests included
6824 (modify-phases %standard-phases
6825 (replace 'install (install-jars "dist")))))
6827 `(("unzip" ,unzip)))
6828 (home-page "http://www.jcraft.com/jsch/")
6829 (synopsis "Pure Java implementation of SSH2")
6830 (description "JSch is a pure Java implementation of SSH2. JSch allows you
6831 to connect to an SSH server and use port forwarding, X11 forwarding, file
6832 transfer, etc., and you can integrate its functionality into your own Java
6834 (license license:bsd-3)))
6836 (define-public java-commons-compress
6838 (name "java-commons-compress")
6842 (uri (string-append "mirror://apache/commons/compress/source/"
6843 "commons-compress-" version "-src.tar.gz"))
6846 "1vjqvavrn0babffn1kciz6v52ibwq2vwhzlb95hazis3lgllnxc8"))))
6847 (build-system ant-build-system)
6849 `(#:jar-name "commons-compress.jar"
6851 (modify-phases %standard-phases
6852 (add-after 'unpack 'delete-bad-tests
6854 (with-directory-excursion "src/test/java/org/apache/commons/compress/"
6855 ;; FIXME: These tests really should not fail. Maybe they are
6856 ;; indicative of problems with our Java packaging work.
6858 ;; This test fails with a null pointer exception.
6859 (delete-file "archivers/sevenz/SevenZOutputFileTest.java")
6860 ;; This test fails to open test resources.
6861 (delete-file "archivers/zip/ExplodeSupportTest.java")
6863 ;; FIXME: This test adds a dependency on powermock, which is hard to
6864 ;; package at this point.
6865 ;; https://github.com/powermock/powermock
6866 (delete-file "archivers/sevenz/SevenZNativeHeapTest.java"))
6868 (replace 'install (install-from-pom "pom.xml")))))
6870 `(("java-xz" ,java-xz)
6871 ("apache-commons-parent-pom" ,apache-commons-parent-pom-41)))
6873 `(("java-junit" ,java-junit)
6874 ("java-mockito" ,java-mockito-1)))
6875 (home-page "https://commons.apache.org/proper/commons-compress/")
6876 (synopsis "Java library for working with compressed files")
6877 (description "The Apache Commons Compress library defines an API for
6878 working with compressed files such as ar, cpio, Unix dump, tar, zip, gzip, XZ,
6879 Pack200, bzip2, 7z, arj, lzma, snappy, DEFLATE, lz4 and Z files.")
6880 (license license:asl2.0)))
6882 (define-public java-commons-csv
6884 (name "java-commons-csv")
6888 (uri (string-append "mirror://apache/commons/csv/source/"
6889 "commons-csv-" version "-src.tar.gz"))
6892 "1l89m0fm2s3xx3v3iynvangymfg2vlyngaj6fgsi457nmsw7m7ij"))))
6893 (build-system ant-build-system)
6895 `(#:jar-name "commons-csv.jar"
6896 #:source-dir "src/main/java"
6897 #:tests? #f)); FIXME: requires java-h2
6899 `(("java-hamcrest-core" ,java-hamcrest-core)
6900 ("java-commons-io" ,java-commons-io)
6901 ("java-commons-lang3" ,java-commons-lang3)
6902 ("junit" ,java-junit)))
6903 (home-page "https://commons.apache.org/proper/commons-csv/")
6904 (synopsis "Read and write CSV documents")
6905 (description "Commons CSV reads and writes files in variations of the Comma
6906 Separated Value (CSV) format. The most common CSV formats are predefined in the
6910 @item Microsoft Excel
6911 @item Informix UNLOAD
6912 @item Informix UNLOAD CSV
6918 Custom formats can be created using a fluent style API.")
6919 (license license:asl2.0)))
6921 (define-public java-osgi-annotation
6923 (name "java-osgi-annotation")
6927 (uri (string-append "https://repo1.maven.org/maven2/"
6928 "org/osgi/org.osgi.annotation/" version "/"
6929 "org.osgi.annotation-" version "-sources.jar"))
6932 "1q718mb7gqg726rh6pc2hcisn8v50nv35abbir0jypmffhiii85w"))))
6933 (build-system ant-build-system)
6935 `(#:tests? #f ; no tests
6936 #:jar-name "osgi-annotation.jar"))
6937 (home-page "https://www.osgi.org")
6938 (synopsis "Annotation module of OSGi framework")
6940 "OSGi, for Open Services Gateway initiative framework, is a module system
6941 and service platform for the Java programming language. This package contains
6942 the OSGi annotation module, providing additional services to help dynamic
6944 (license license:asl2.0)))
6946 (define-public java-osgi-core
6948 (name "java-osgi-core")
6952 (uri (string-append "https://repo1.maven.org/maven2/"
6953 "org/osgi/org.osgi.core/" version "/"
6954 "org.osgi.core-" version "-sources.jar"))
6957 "19bpf5jx32jq9789gyhin35q5v7flmw0p9mk7wbgqpxqfmxyiabv"))))
6958 (build-system ant-build-system)
6960 `(#:tests? #f ; no tests
6961 #:jar-name "osgi-core.jar"))
6963 `(("java-osgi-annotation" ,java-osgi-annotation)))
6964 (home-page "https://www.osgi.org")
6965 (synopsis "Core module of OSGi framework")
6967 "OSGi, for Open Services Gateway initiative framework, is a module system
6968 and service platform for the Java programming language. This package contains
6969 the OSGi Core module.")
6970 (license license:asl2.0)))
6972 (define-public java-osgi-service-event
6974 (name "java-osgi-service-event")
6978 (uri (string-append "https://repo1.maven.org/maven2/"
6979 "org/osgi/org.osgi.service.event/"
6980 version "/org.osgi.service.event-"
6981 version "-sources.jar"))
6984 "1nyhlgagwym75bycnjczwbnpymv2iw84zbhvvzk84g9q736i6qxm"))))
6985 (build-system ant-build-system)
6987 `(#:tests? #f ; no tests
6988 #:jar-name "osgi-service-event.jar"))
6990 `(("java-osgi-annotation" ,java-osgi-annotation)
6991 ("java-osgi-core" ,java-osgi-core)))
6992 (home-page "https://www.osgi.org")
6993 (synopsis "OSGi service event module")
6995 "OSGi, for Open Services Gateway initiative framework, is a module system
6996 and service platform for the Java programming language. This package contains
6997 the OSGi @code{org.osgi.service.event} module.")
6998 (license license:asl2.0)))
7000 (define-public java-eclipse-osgi
7002 (name "java-eclipse-osgi")
7006 (uri (string-append "https://repo1.maven.org/maven2/"
7007 "org/eclipse/platform/org.eclipse.osgi/"
7008 version "/org.eclipse.osgi-"
7009 version "-sources.jar"))
7012 "00cqc6lb29n0zv68b4l842vzkwawvbr7gshfdygsk8sicvcq2c7b"))))
7013 (build-system ant-build-system)
7015 `(#:tests? #f ; no tests included
7016 #:jar-name "eclipse-equinox-osgi.jar"))
7018 `(("java-osgi-annotation" ,java-osgi-annotation)))
7019 (home-page "http://www.eclipse.org/equinox/")
7020 (synopsis "Eclipse Equinox OSGi framework")
7021 (description "This package provides an implementation of the OSGi Core
7023 (license license:epl1.0)))
7025 (define-public java-eclipse-equinox-common
7027 (name "java-eclipse-equinox-common")
7028 (version "3.10.200")
7031 (uri (string-append "https://repo1.maven.org/maven2/"
7032 "org/eclipse/platform/org.eclipse.equinox.common/"
7033 version "/org.eclipse.equinox.common-"
7034 version "-sources.jar"))
7037 "1yn8ij6xsljlf35sr2l7wvyvc0ss4n1rv0ry5zkgb49dj4hyrqrj"))))
7038 (build-system ant-build-system)
7040 `(#:tests? #f ; no tests included
7041 #:jar-name "eclipse-equinox-common.jar"))
7043 `(("java-eclipse-osgi" ,java-eclipse-osgi)))
7044 (home-page "http://www.eclipse.org/equinox/")
7045 (synopsis "Common Eclipse runtime")
7046 (description "This package provides the common Eclipse runtime.")
7047 (license license:epl1.0)))
7049 (define-public java-eclipse-core-jobs
7051 (name "java-eclipse-core-jobs")
7055 (uri (string-append "https://repo1.maven.org/maven2/"
7056 "org/eclipse/platform/org.eclipse.core.jobs/"
7057 version "/org.eclipse.core.jobs-"
7058 version "-sources.jar"))
7061 "0395b8lh0km8vhzjnchvs1rii1qz48hyvb2wqfaq4yhklbwihq4b"))))
7062 (build-system ant-build-system)
7064 `(#:tests? #f ; no tests included
7065 #:jar-name "eclipse-core-jobs.jar"))
7067 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7068 ("java-eclipse-osgi" ,java-eclipse-osgi)))
7069 (home-page "http://www.eclipse.org/equinox/")
7070 (synopsis "Eclipse jobs mechanism")
7071 (description "This package provides the Eclipse jobs mechanism.")
7072 (license license:epl1.0)))
7074 (define-public java-eclipse-equinox-registry
7076 (name "java-eclipse-equinox-registry")
7080 (uri (string-append "https://repo1.maven.org/maven2/"
7081 "org/eclipse/platform/org.eclipse.equinox.registry/"
7082 version "/org.eclipse.equinox.registry-"
7083 version "-sources.jar"))
7086 "1i9sgymh2fy5vdgk5y7s3qvrlbgh4l93ddqi3v4zmca7hwrlhf9k"))))
7087 (build-system ant-build-system)
7089 `(#:tests? #f ; no tests included
7090 #:jar-name "eclipse-equinox-registry.jar"))
7092 `(("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
7093 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7094 ("java-eclipse-osgi" ,java-eclipse-osgi)))
7095 (home-page "http://www.eclipse.org/equinox/")
7096 (synopsis "Eclipse extension registry support")
7097 (description "This package provides support for the Eclipse extension
7099 (license license:epl1.0)))
7101 (define-public java-eclipse-equinox-app
7103 (name "java-eclipse-equinox-app")
7107 (uri (string-append "https://repo1.maven.org/maven2/"
7108 "org/eclipse/platform/org.eclipse.equinox.app/"
7109 version "/org.eclipse.equinox.app-"
7110 version "-sources.jar"))
7113 "0nhvbp93y203ar7y59gb0mz3w2d3jlqhr0c9hii9bcfpmr7imdab"))))
7114 (build-system ant-build-system)
7116 `(#:tests? #f ; no tests included
7117 #:jar-name "eclipse-equinox-app.jar"))
7119 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7120 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
7121 ("java-eclipse-osgi" ,java-eclipse-osgi)
7122 ("java-osgi-service-event" ,java-osgi-service-event)))
7123 (home-page "http://www.eclipse.org/equinox/")
7124 (synopsis "Equinox application container")
7125 (description "This package provides the Equinox application container for
7127 (license license:epl1.0)))
7129 (define-public java-eclipse-equinox-preferences
7131 (name "java-eclipse-equinox-preferences")
7135 (uri (string-append "https://repo1.maven.org/maven2/"
7136 "org/eclipse/platform/org.eclipse.equinox.preferences/"
7137 version "/org.eclipse.equinox.preferences-"
7138 version "-sources.jar"))
7141 "0k7w6c141sqym4fy3af0qkwpy4pdh2vsjpjba6rp5fxyqa24v0a2"))))
7142 (build-system ant-build-system)
7144 `(#:tests? #f ; no tests included
7145 #:jar-name "eclipse-equinox-preferences.jar"))
7147 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7148 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
7149 ("java-eclipse-osgi" ,java-eclipse-osgi)))
7150 (home-page "http://www.eclipse.org/equinox/")
7151 (synopsis "Eclipse preferences mechanism")
7152 (description "This package provides the Eclipse preferences mechanism with
7153 the module @code{org.eclipse.equinox.preferences}.")
7154 (license license:epl1.0)))
7156 (define-public java-eclipse-core-contenttype
7158 (name "java-eclipse-core-contenttype")
7162 (uri (string-append "https://repo1.maven.org/maven2/"
7163 "org/eclipse/platform/org.eclipse.core.contenttype/"
7164 version "/org.eclipse.core.contenttype-"
7165 version "-sources.jar"))
7168 "1wcqcv7ijwv5rh748vz3x9pkmjl9w1r0k0026k56n8yjl4rrmspi"))))
7169 (build-system ant-build-system)
7171 `(#:tests? #f ; no tests included
7172 #:jar-name "eclipse-core-contenttype.jar"))
7174 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7175 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
7176 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
7177 ("java-eclipse-osgi" ,java-eclipse-osgi)))
7178 (home-page "http://www.eclipse.org/")
7179 (synopsis "Eclipse content mechanism")
7180 (description "This package provides the Eclipse content mechanism in the
7181 @code{org.eclipse.core.contenttype} module.")
7182 (license license:epl1.0)))
7184 (define-public java-eclipse-core-runtime
7186 (name "java-eclipse-core-runtime")
7187 (version "3.15.100")
7190 (uri (string-append "https://repo1.maven.org/maven2/"
7191 "org/eclipse/platform/org.eclipse.core.runtime/"
7192 version "/org.eclipse.core.runtime-"
7193 version "-sources.jar"))
7196 "0l8xayacsbjvz5hypx2fv47vpw2n4dspamcfb3hx30x9hj8vmg7r"))))
7197 (build-system ant-build-system)
7199 `(#:tests? #f ; no tests included
7200 #:jar-name "eclipse-core-runtime.jar"))
7202 `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
7203 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
7204 ("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
7205 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7206 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
7207 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
7208 ("java-eclipse-osgi" ,java-eclipse-osgi)))
7209 (home-page "https://www.eclipse.org/")
7210 (synopsis "Eclipse core runtime")
7211 (description "This package provides the Eclipse core runtime with the
7212 module @code{org.eclipse.core.runtime}.")
7213 (license license:epl1.0)))
7215 (define-public java-eclipse-core-filesystem
7217 (name "java-eclipse-core-filesystem")
7221 (uri (string-append "https://repo1.maven.org/maven2/"
7222 "org/eclipse/platform/org.eclipse.core.filesystem/"
7223 version "/org.eclipse.core.filesystem-"
7224 version "-sources.jar"))
7227 "0km1bhwjim4rfy3pkvjhvy31kgsyf2ncx0mlkmbf5n6g57pphdyj"))))
7228 (build-system ant-build-system)
7230 `(#:tests? #f ; no tests included
7231 #:jar-name "eclipse-core-filesystem.jar"))
7233 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7234 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
7235 ("java-eclipse-osgi" ,java-eclipse-osgi)))
7236 (home-page "https://www.eclipse.org/")
7237 (synopsis "Eclipse core file system")
7238 (description "This package provides the Eclipse core file system with the
7239 module @code{org.eclipse.core.filesystem}.")
7240 (license license:epl1.0)))
7242 (define-public java-eclipse-core-expressions
7244 (name "java-eclipse-core-expressions")
7248 (uri (string-append "https://repo1.maven.org/maven2/"
7249 "org/eclipse/platform/org.eclipse.core.expressions/"
7250 version "/org.eclipse.core.expressions-"
7251 version "-sources.jar"))
7254 "18bw2l875gmygvpagpgk9l24qzbdjia4ag12nw6fi8v8yaq4987f"))))
7255 (build-system ant-build-system)
7257 `(#:tests? #f ; no tests included
7258 #:jar-name "eclipse-core-expressions.jar"))
7260 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7261 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
7262 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
7263 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
7264 ("java-eclipse-osgi" ,java-eclipse-osgi)))
7265 (home-page "https://www.eclipse.org/")
7266 (synopsis "Eclipse core expression language")
7267 (description "This package provides the Eclipse core expression language
7268 with the @code{org.eclipse.core.expressions} module.")
7269 (license license:epl1.0)))
7271 (define-public java-eclipse-core-variables
7273 (name "java-eclipse-core-variables")
7277 (uri (string-append "https://repo1.maven.org/maven2/"
7278 "org/eclipse/platform/org.eclipse.core.variables/"
7279 version "/org.eclipse.core.variables-"
7280 version "-sources.jar"))
7283 "12dirh03zi4n5x5cj07vzrhkmnqy6h9q10h9j605pagmpmifyxmy"))))
7284 (build-system ant-build-system)
7286 `(#:tests? #f ; no tests included
7287 #:jar-name "eclipse-core-variables.jar"))
7289 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7290 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
7291 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
7292 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
7293 ("java-eclipse-osgi" ,java-eclipse-osgi)))
7294 (home-page "https://www.eclipse.org/platform")
7295 (synopsis "Eclipse core variables")
7296 (description "This package provides the Eclipse core variables module
7297 @code{org.eclipse.core.variables}.")
7298 (license license:epl1.0)))
7300 (define-public java-eclipse-ant-core
7302 (name "java-eclipse-ant-core")
7306 (uri (string-append "https://repo1.maven.org/maven2/"
7307 "org/eclipse/platform/org.eclipse.ant.core/"
7308 version "/org.eclipse.ant.core-"
7309 version "-sources.jar"))
7312 "11g3if794qjlk98mz9zch22rr56sd7z63vn4i7k2icr8cq5bfqg7"))))
7313 (build-system ant-build-system)
7315 `(#:tests? #f ; no tests included
7316 #:jar-name "eclipse-ant-core.jar"))
7318 `(("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
7319 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7320 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
7321 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
7322 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
7323 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
7324 ("java-eclipse-core-variables" ,java-eclipse-core-variables)
7325 ("java-eclipse-osgi" ,java-eclipse-osgi)))
7326 (home-page "https://www.eclipse.org/platform")
7327 (synopsis "Ant build tool core libraries")
7328 (description "This package provides the ant build tool core libraries with
7329 the module @code{org.eclipse.ant.core}.")
7330 (license license:epl1.0)))
7332 (define-public java-eclipse-core-resources
7334 (name "java-eclipse-core-resources")
7335 (version "3.13.200")
7338 (uri (string-append "https://repo1.maven.org/maven2/"
7339 "org/eclipse/platform/org.eclipse.core.resources/"
7340 version "/org.eclipse.core.resources-"
7341 version "-sources.jar"))
7344 "1sn3b6ky72hkvxcgf9b2jkpbdh3y8lbhi9xxwv1dsiddpkkq91hs"))))
7345 (build-system ant-build-system)
7347 `(#:tests? #f ; no tests included
7348 #:jar-name "eclipse-core-resources.jar"))
7350 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7351 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
7352 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
7353 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
7354 ("java-eclipse-core-expressions" ,java-eclipse-core-expressions)
7355 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
7356 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
7357 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
7358 ("java-eclipse-ant-core" ,java-eclipse-ant-core)
7359 ("java-eclipse-osgi" ,java-eclipse-osgi)))
7360 (home-page "https://www.eclipse.org/")
7361 (synopsis "Eclipse core resource management")
7362 (description "This package provides the Eclipse core resource management
7363 module @code{org.eclipse.core.resources}.")
7364 (license license:epl1.0)))
7366 (define-public java-eclipse-compare-core
7368 (name "java-eclipse-compare-core")
7372 (uri (string-append "https://repo1.maven.org/maven2/"
7373 "org/eclipse/platform/org.eclipse.compare.core/"
7374 version "/org.eclipse.compare.core-"
7375 version "-sources.jar"))
7378 "10g37r0pbiffyv2wk35c6g5lwzkdipkl0kkjp41v84dln46xm4dg"))))
7379 (build-system ant-build-system)
7381 `(#:tests? #f ; no tests included
7382 #:jar-name "eclipse-compare-core.jar"))
7384 `(("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
7385 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7386 ("java-eclipse-osgi" ,java-eclipse-osgi)
7387 ("java-icu4j" ,java-icu4j)))
7388 (home-page "https://www.eclipse.org/")
7389 (synopsis "Eclipse core compare support")
7390 (description "This package provides the Eclipse core compare support
7391 module @code{org.eclipse.compare.core}.")
7392 (license license:epl1.0)))
7394 (define-public java-eclipse-team-core
7396 (name "java-eclipse-team-core")
7400 (uri (string-append "https://repo1.maven.org/maven2/"
7401 "org/eclipse/platform/org.eclipse.team.core/"
7402 version "/org.eclipse.team.core-"
7403 version "-sources.jar"))
7406 "02j2jzqgb26zx2d5ahxmvijw6j4r0la90zl5c3i65x6z19ciyam7"))))
7407 (build-system ant-build-system)
7409 `(#:tests? #f ; no tests included
7410 #:jar-name "eclipse-team-core.jar"))
7412 `(("java-eclipse-compare-core" ,java-eclipse-compare-core)
7413 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
7414 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
7415 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
7416 ("java-eclipse-core-resources" ,java-eclipse-core-resources)
7417 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
7418 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7419 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
7420 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
7421 ("java-eclipse-osgi" ,java-eclipse-osgi)))
7422 (home-page "https://www.eclipse.org/platform")
7423 (synopsis "Eclipse team support core")
7424 (description "This package provides the Eclipse team support core module
7425 @code{org.eclipse.team.core}.")
7426 (license license:epl1.0)))
7428 (define-public java-eclipse-core-commands
7430 (name "java-eclipse-core-commands")
7434 (uri (string-append "https://repo1.maven.org/maven2/"
7435 "org/eclipse/platform/org.eclipse.core.commands/"
7436 version "/org.eclipse.core.commands-"
7437 version "-sources.jar"))
7440 "0yjn482qndcfrsq3jd6vnhcylp16420f5aqkrwr8spsprjigjcr9"))))
7441 (build-system ant-build-system)
7443 `(#:tests? #f ; no tests included
7444 #:jar-name "eclipse-core-commands.jar"))
7446 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)))
7447 (home-page "https://www.eclipse.org/platform")
7448 (synopsis "Eclipse core commands")
7449 (description "This package provides Eclipse core commands in the module
7450 @code{org.eclipse.core.commands}.")
7451 (license license:epl1.0)))
7453 (define-public java-eclipse-text
7455 (name "java-eclipse-text")
7459 (uri (string-append "https://repo1.maven.org/maven2/"
7460 "org/eclipse/platform/org.eclipse.text/"
7461 version "/org.eclipse.text-"
7462 version "-sources.jar"))
7465 "0scz70vzz5qs5caji9f5q01vkqnvip7dpri1q07l8wbbdcxn4cq1"))))
7466 (build-system ant-build-system)
7468 `(#:tests? #f ; no tests included
7469 #:jar-name "eclipse-text.jar"
7471 (modify-phases %standard-phases
7472 ;; When creating a new category we must make sure that the new list
7473 ;; matches List<Position>. By default it seems to be too generic
7474 ;; (ArrayList<Object>), so we specialize it to ArrayList<Position>.
7475 ;; Without this we get this error:
7477 ;; [javac] .../src/org/eclipse/jface/text/AbstractDocument.java:376:
7478 ;; error: method put in interface Map<K,V> cannot be applied to given types;
7479 ;; [javac] fPositions.put(category, new ArrayList<>());
7481 ;; [javac] required: String,List<Position>
7482 ;; [javac] found: String,ArrayList<Object>
7483 ;; [javac] reason: actual argument ArrayList<Object> cannot be converted
7484 ;; to List<Position> by method invocation conversion
7485 ;; [javac] where K,V are type-variables:
7486 ;; [javac] K extends Object declared in interface Map
7487 ;; [javac] V extends Object declared in interface Map
7489 ;; I don't know if this is a good fix. I suspect it is not, but it
7491 (add-after 'unpack 'fix-compilation-error
7493 (substitute* "src/org/eclipse/jface/text/AbstractDocument.java"
7494 (("Positions.put\\(category, new ArrayList<>\\(\\)\\);")
7495 "Positions.put(category, new ArrayList<Position>());"))
7498 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7499 ("java-eclipse-core-commands" ,java-eclipse-core-commands)
7500 ("java-icu4j" ,java-icu4j)))
7501 (home-page "http://www.eclipse.org/platform")
7502 (synopsis "Eclipse text library")
7503 (description "Platform Text is part of the Platform UI project and
7504 provides the basic building blocks for text and text editors within Eclipse
7505 and contributes the Eclipse default text editor.")
7506 (license license:epl1.0)))
7508 (define-public java-eclipse-jdt-core
7510 (name "java-eclipse-jdt-core")
7514 (uri (string-append "https://repo1.maven.org/maven2/"
7515 "org/eclipse/jdt/org.eclipse.jdt.core/"
7516 version "/org.eclipse.jdt.core-"
7517 version "-sources.jar"))
7520 "1g560yr9v2kzv34gc2m3ifpgnj7krcdd6h4gd4z83pwqacwkfz0k"))))
7521 (build-system ant-build-system)
7523 `(#:tests? #f ; no tests included
7524 #:jar-name "eclipse-jdt-core.jar"
7526 (modify-phases %standard-phases
7527 (add-after 'unpack 'move-sources
7529 (with-directory-excursion "src/jdtCompilerAdaptersrc/"
7530 (for-each (lambda (file)
7531 (install-file file (string-append "../" (dirname file))))
7532 (find-files "." ".*")))
7533 (delete-file-recursively "src/jdtCompilerAdaptersrc/")
7535 (add-before 'build 'copy-resources
7537 (with-directory-excursion "src"
7538 (for-each (lambda (file)
7539 (install-file file (string-append "../build/classes/" (dirname file))))
7540 (find-files "." ".*.(props|properties|rsc)")))
7543 `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
7544 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
7545 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
7546 ("java-eclipse-core-resources" ,java-eclipse-core-resources)
7547 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
7548 ("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
7549 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7550 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
7551 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
7552 ("java-eclipse-osgi" ,java-eclipse-osgi)
7553 ("java-eclipse-text" ,java-eclipse-text)))
7554 (home-page "https://www.eclipse.org/jdt")
7555 (synopsis "Java development tools core libraries")
7556 (description "This package provides the core libraries of the Eclipse Java
7557 development tools.")
7558 (license license:epl1.0)))
7560 (define-public java-eclipse-jdt-compiler-apt
7562 (name "java-eclipse-jdt-compiler-apt")
7566 (uri (string-append "https://repo1.maven.org/maven2/"
7567 "org/eclipse/jdt/org.eclipse.jdt.compiler.apt/"
7568 version "/org.eclipse.jdt.compiler.apt-"
7569 version "-sources.jar"))
7572 "1s285k9p2ixdqrknb40jbbvw682n9a7l5lqpn583a8pvlzg2l6r8"))))
7573 (build-system ant-build-system)
7575 `(#:tests? #f ; no tests included
7576 #:jar-name "eclipse-jdt-compiler-apt.jar"
7579 `(("java-eclipse-jdt-core" ,java-eclipse-jdt-core)))
7580 (home-page "https://www.eclipse.org/jdt/apt/")
7581 (synopsis "Annotation processing tool")
7582 (description "APT stands for Annotation Processing Tool. APT provides a
7583 means for generating files and compiling new Java classes based on annotations
7584 found in your source code.")
7585 (license license:epl2.0)))
7587 (define-public java-javax-mail
7589 (name "java-javax-mail")
7593 (uri (string-append "https://repo1.maven.org/maven2/"
7594 "com/sun/mail/javax.mail/"
7595 version "/javax.mail-"
7596 version "-sources.jar"))
7599 "0sdlfgsc2b5s89xv1261y8i0jijcja019k2x1c8ngfn582w4jly9"))))
7600 (build-system ant-build-system)
7602 `(#:tests? #f ; no tests
7603 #:jar-name "javax-mail.jar"))
7604 (home-page "https://javamail.java.net")
7605 (synopsis "Reference implementation of the JavaMail API")
7607 "This package provides versions of the JavaMail API implementation, IMAP,
7608 SMTP, and POP3 service providers, some examples, and documentation for the
7610 ;; GPLv2 only with "classpath exception".
7611 (license license:gpl2)))
7613 (define-public java-log4j-api
7615 (name "java-log4j-api")
7619 (uri (string-append "mirror://apache/logging/log4j/" version
7620 "/apache-log4j-" version "-src.tar.gz"))
7623 "0j5p9gik0jysh37nlrckqbky12isy95cpwg2gv5fas1rcdqbraxd"))))
7624 (build-system ant-build-system)
7626 `(#:tests? #f ; tests require unpackaged software
7627 #:jar-name "log4j-api.jar"
7629 (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out")
7632 (modify-phases %standard-phases
7633 (add-after 'unpack 'enter-dir
7634 (lambda _ (chdir "log4j-api") #t))
7635 ;; FIXME: The tests require additional software that has not been
7636 ;; packaged yet, such as
7637 ;; * org.apache.maven
7638 ;; * org.apache.felix
7639 (add-after 'enter-dir 'delete-tests
7640 (lambda _ (delete-file-recursively "src/test") #t)))))
7642 `(("java-osgi-core" ,java-osgi-core)
7643 ("java-hamcrest-core" ,java-hamcrest-core)
7644 ("java-junit" ,java-junit)))
7645 (home-page "https://logging.apache.org/log4j/2.x/")
7646 (synopsis "API module of the Log4j logging framework for Java")
7648 "This package provides the API module of the Log4j logging framework for
7650 (license license:asl2.0)))
7652 (define-public java-log4j-core
7654 (inherit java-log4j-api)
7655 (name "java-log4j-core")
7657 `(("java-osgi-core" ,java-osgi-core)
7658 ("java-hamcrest-core" ,java-hamcrest-core)
7659 ("java-log4j-api" ,java-log4j-api)
7660 ("java-mail" ,java-mail)
7661 ("java-jboss-jms-api-spec" ,java-jboss-jms-api-spec)
7662 ("java-lmax-disruptor" ,java-lmax-disruptor)
7663 ("java-kafka" ,java-kafka-clients)
7664 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
7665 ("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
7666 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
7667 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)
7668 ("java-fasterxml-jackson-dataformat-xml" ,java-fasterxml-jackson-dataformat-xml)
7669 ("java-fasterxml-jackson-dataformat-yaml" ,java-fasterxml-jackson-dataformat-yaml)
7670 ("java-commons-compress" ,java-commons-compress)
7671 ("java-commons-csv" ,java-commons-csv)
7672 ("java-jeromq" ,java-jeromq)
7673 ("java-junit" ,java-junit)))
7675 `(("hamcrest" ,java-hamcrest-all)
7676 ("java-commons-io" ,java-commons-io)
7677 ("java-commons-lang3" ,java-commons-lang3)
7678 ("slf4j" ,java-slf4j-api)))
7680 `(#:tests? #f ; tests require more dependencies
7681 #:test-dir "src/test"
7682 #:source-dir "src/main/java"
7683 #:jar-name "log4j-core.jar"
7686 (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out")
7689 (modify-phases %standard-phases
7690 (add-after 'unpack 'enter-dir
7691 (lambda _ (chdir "log4j-core") #t)))))
7692 (synopsis "Core component of the Log4j framework")
7693 (description "This package provides the core component of the Log4j
7694 logging framework for Java.")))
7696 (define-public java-log4j-1.2-api
7698 (inherit java-log4j-api)
7699 (name "java-log4j-1.2-api")
7701 `(#:jar-name "java-log4j-1.2-api.jar"
7702 #:source-dir "log4j-1.2-api/src/main/java"
7704 ;; Tests require maven-model (and other maven subprojects), which is a
7705 ;; cyclic dependency.
7708 `(("log4j-api" ,java-log4j-api)
7709 ("log4j-core" ,java-log4j-core)
7710 ("osgi-core" ,java-osgi-core)
7711 ("eclipse-osgi" ,java-eclipse-osgi)
7712 ("java-lmax-disruptor" ,java-lmax-disruptor)))))
7714 (define-public java-commons-cli
7716 (name "java-commons-cli")
7720 (uri (string-append "mirror://apache/commons/cli/source/"
7721 "commons-cli-" version "-src.tar.gz"))
7724 "05hgi2z01fqz374y719gl1dxzqvzci5af071zm7vxrjg9vczipm1"))))
7725 (build-system ant-build-system)
7728 `(#:jar-name "commons-cli.jar"
7730 (modify-phases %standard-phases
7732 (install-from-pom "pom.xml")))))
7734 `(("java-junit" ,java-junit)
7735 ("java-hamcrest-core" ,java-hamcrest-core)))
7736 (home-page "https://commons.apache.org/cli/")
7737 (synopsis "Command line arguments and options parsing library")
7738 (description "The Apache Commons CLI library provides an API for parsing
7739 command line options passed to programs. It is also able to print help
7740 messages detailing the options available for a command line tool.
7742 Commons CLI supports different types of options:
7745 @item POSIX like options (ie. tar -zxvf foo.tar.gz)
7746 @item GNU like long options (ie. du --human-readable --max-depth=1)
7747 @item Java like properties (ie. java -Djava.awt.headless=true Foo)
7748 @item Short options with value attached (ie. gcc -O2 foo.c)
7749 @item long options with single hyphen (ie. ant -projecthelp)
7752 This is a part of the Apache Commons Project.")
7753 (license license:asl2.0)))
7755 (define-public java-commons-codec
7757 (name "java-commons-codec")
7761 (uri (string-append "mirror://apache/commons/codec/source/"
7762 "commons-codec-" version "-src.tar.gz"))
7765 "11xr0agckkhm91pb5akf2mbk84yd54gyr178wj57gsm97fi7nkh9"))))
7766 (build-system ant-build-system)
7768 `(#:jar-name "java-commons-codec.jar"
7769 #:source-dir "src/main/java"
7770 #:test-dir "src/test"
7771 #:test-exclude (list "**/*AbstractTest.java")
7773 (modify-phases %standard-phases
7774 (add-before 'build 'copy-resources
7776 (copy-recursively "src/main/resources"
7779 (add-before 'check 'copy-test-resources
7781 (copy-recursively "src/test/resources"
7782 "build/test-classes")
7784 (replace 'install (install-from-pom "pom.xml")))))
7786 `(("java-commons-lang3" ,java-commons-lang3)
7787 ("java-junit" ,java-junit)))
7789 `(("apache-commons-parent-pom" ,apache-commons-parent-pom-50)))
7790 (home-page "https://commons.apache.org/codec/")
7791 (synopsis "Common encoders and decoders such as Base64, Hex, Phonetic and URLs")
7792 (description "The codec package contains simple encoder and decoders for
7793 various formats such as Base64 and Hexadecimal. In addition to these widely
7794 used encoders and decoders, the codec package also maintains a collection of
7795 phonetic encoding utilities.
7797 This is a part of the Apache Commons Project.")
7798 (license license:asl2.0)))
7800 (define-public java-commons-daemon
7802 (name "java-commons-daemon")
7806 (uri (string-append "mirror://apache/commons/daemon/source/"
7807 "commons-daemon-" version "-src.tar.gz"))
7810 "141gkhfzv5v3pdhic6y4ardq2dhsa3v36j8wmmhy6f8mac48fp7n"))))
7811 (build-system ant-build-system)
7813 `(#:test-target "test"
7815 (modify-phases %standard-phases
7816 (add-after 'build 'build-javadoc ant-build-javadoc)
7817 (replace 'install (install-jars "dist"))
7818 (add-after 'install 'install-doc (install-javadoc "dist/docs/api")))))
7820 `(("java-junit" ,java-junit)))
7821 (home-page "https://commons.apache.org/daemon/")
7822 (synopsis "Library to launch Java applications as daemons")
7823 (description "The Daemon package from Apache Commons can be used to
7824 implement Java applications which can be launched as daemons. For example the
7825 program will be notified about a shutdown so that it can perform cleanup tasks
7826 before its process of execution is destroyed by the operation system.
7828 This package contains the Java library. You will also need the actual binary
7829 for your architecture which is provided by the jsvc package.
7831 This is a part of the Apache Commons Project.")
7832 (license license:asl2.0)))
7834 (define-public java-javaewah
7836 (name "java-javaewah")
7841 (url "https://github.com/lemire/javaewah/")
7842 (commit (string-append "JavaEWAH-" version))))
7843 (file-name (git-file-name name version))
7846 "1m8qcb1py76v7avbjjrkvyy6fhr5dk2ywy73gbsxqry04gkm2nhw"))))
7847 (build-system ant-build-system)
7848 (arguments `(#:jar-name "javaewah.jar"))
7850 `(("java-junit" ,java-junit)
7851 ("java-hamcrest-core" ,java-hamcrest-core)))
7852 (home-page "https://github.com/lemire/javaewah")
7853 (synopsis "Compressed alternative to the Java @code{BitSet} class")
7854 (description "This is a word-aligned compressed variant of the Java
7855 @code{Bitset} class. It provides both a 64-bit and a 32-bit RLE-like
7856 compression scheme. It can be used to implement bitmap indexes.
7858 The goal of word-aligned compression is not to achieve the best compression,
7859 but rather to improve query processing time. Hence, JavaEWAH tries to save CPU
7860 cycles, maybe at the expense of storage. However, the EWAH scheme is always
7861 more efficient storage-wise than an uncompressed bitmap (as implemented in the
7862 @code{BitSet} class by Sun).")
7863 ;; GPL2.0 derivates are explicitly allowed.
7864 (license license:asl2.0)))
7866 (define-public java-slf4j-api
7868 (name "java-slf4j-api")
7872 (uri (string-append "https://www.slf4j.org/dist/slf4j-"
7876 "13j51sgzmhhdrfa74gkal5zpip7r1440dh7zsi2c8bpb2zs1v8kb"))
7877 (modules '((guix build utils)))
7878 ;; Delete bundled jars.
7881 (for-each delete-file (find-files "." "\\.jar$"))
7883 (build-system ant-build-system)
7885 `(#:jar-name "slf4j-api.jar"
7886 #:source-dir "slf4j-api/src/main"
7887 #:test-dir "slf4j-api/src/test"
7889 (modify-phases %standard-phases
7890 (add-after 'build 'regenerate-jar
7892 ;; pom.xml ignores these files in the jar creation process. If we don't,
7893 ;; we get the error "This code should have never made it into slf4j-api.jar"
7894 (delete-file-recursively "build/classes/org/slf4j/impl")
7895 (invoke "jar" "-cf" "build/jar/slf4j-api.jar" "-C"
7896 "build/classes" ".")))
7897 (add-before 'check 'dont-test-abstract-classes
7899 ;; abstract classes are not meant to be run with junit
7900 (substitute* "build.xml"
7901 (("<include name=\"\\*\\*/\\*Test.java\" />")
7902 (string-append "<include name=\"**/*Test.java\" />"
7903 "<exclude name=\"**/MultithreadedInitializationTest"
7907 (install-from-pom "slf4j-api/pom.xml")))))
7909 `(("java-slf4j-parent" ,java-slf4j-parent)))
7911 `(("java-junit" ,java-junit)
7912 ("java-hamcrest-core" ,java-hamcrest-core)))
7913 (home-page "https://www.slf4j.org/")
7914 (synopsis "Simple logging facade for Java")
7915 (description "The Simple Logging Facade for Java (SLF4J) serves as a
7916 simple facade or abstraction for various logging
7917 frameworks (e.g. @code{java.util.logging}, @code{logback}, @code{log4j})
7918 allowing the end user to plug in the desired logging framework at deployment
7920 (license license:expat)))
7922 (define java-slf4j-parent
7924 (inherit java-slf4j-api)
7925 (name "java-slf4j-parent")
7927 (propagated-inputs '())
7931 (modify-phases %standard-phases
7935 (install-pom-file "pom.xml")))))))
7937 (define-public java-slf4j-simple
7939 (name "java-slf4j-simple")
7941 (source (package-source java-slf4j-api))
7942 (build-system ant-build-system)
7944 `(#:jar-name "slf4j-simple.jar"
7945 #:source-dir "slf4j-simple/src/main"
7946 #:test-dir "slf4j-simple/src/test"
7948 (modify-phases %standard-phases
7949 ;; The tests need some test classes from slf4j-api
7950 (add-before 'check 'build-slf4j-api-test-helpers
7952 ;; Add current dir to CLASSPATH ...
7954 (string-append (getcwd) ":" (getenv "CLASSPATH")))
7955 ;; ... and build test helper classes here:
7958 ,@(find-files "slf4j-api/src/test" ".*\\.java")))))
7960 (install-from-pom "slf4j-simple/pom.xml")))))
7962 `(("java-slf4j-api" ,java-slf4j-api)))
7964 `(("java-junit" ,java-junit)
7965 ("java-hamcrest-core" ,java-hamcrest-core)))
7966 (home-page "https://www.slf4j.org/")
7967 (synopsis "Simple implementation of simple logging facade for Java")
7968 (description "SLF4J binding for the Simple implementation, which outputs
7969 all events to System.err. Only messages of level INFO and higher are
7971 (license license:expat)))
7973 (define-public antlr2
7979 (uri (string-append "https://www.antlr2.org/download/antlr-"
7983 "1ffvcwdw73id0dk6pj2mlxjvbg0662qacx4ylayqcxgg381fnfl5"))
7984 (modules '((guix build utils)))
7987 (delete-file "antlr.jar")
7988 (substitute* "lib/cpp/antlr/CharScanner.hpp"
7992 "#define EOF (-1)\n"
7993 "#include <strings.h>")))
7994 (substitute* "configure"
7997 (build-system gnu-build-system)
7999 `(#:tests? #f ; no test target
8000 #:imported-modules ((guix build ant-build-system)
8001 (guix build syscalls)
8002 ,@%gnu-build-system-modules)
8003 #:modules (((guix build ant-build-system) #:prefix ant:)
8004 (guix build gnu-build-system)
8007 (modify-phases %standard-phases
8008 (add-after 'install 'strip-jar-timestamps
8009 (assoc-ref ant:%standard-phases 'strip-jar-timestamps))
8010 (add-before 'configure 'fix-timestamp
8012 (substitute* "configure"
8013 (("^TIMESTAMP.*") "TIMESTAMP=19700101\n"))
8015 (add-after 'configure 'fix-bin-ls
8017 (substitute* (find-files "." "Makefile")
8023 ("java" ,icedtea "jdk")))
8025 `(("java" ,icedtea)))
8026 (home-page "https://www.antlr2.org")
8027 (synopsis "Framework for constructing recognizers, compilers, and translators")
8028 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
8029 is a language tool that provides a framework for constructing recognizers,
8030 compilers, and translators from grammatical descriptions containing Java, C#,
8031 C++, or Python actions. ANTLR provides excellent support for tree construction,
8032 tree walking, and translation.")
8033 (license license:public-domain)))
8035 (define-public java-stringtemplate-3
8037 (name "java-stringtemplate")
8041 (uri (string-append "https://github.com/antlr/website-st4/raw/"
8042 "gh-pages/download/stringtemplate-"
8046 "086yj68np1vqhkj7483diz3km6s6y4gmwqswa7524a0ca6vxn2is"))))
8047 (build-system ant-build-system)
8049 `(#:jar-name (string-append ,name "-" ,version ".jar")
8051 #:modules ((guix build ant-build-system)
8055 (modify-phases %standard-phases
8056 (add-before 'check 'fix-tests
8058 (substitute* "build.xml"
8059 (("\\$\\{test.home\\}/java")
8060 "${test.home}/org"))
8062 (add-before 'build 'generate-grammar
8064 (with-directory-excursion "src/org/antlr/stringtemplate/language/"
8065 (for-each (lambda (file)
8066 (format #t "~a\n" file)
8067 (invoke "antlr" file))
8068 '("template.g" "angle.bracket.template.g" "action.g"
8069 "eval.g" "group.g" "interface.g")))
8073 ("java-junit" ,java-junit)))
8074 (home-page "https://www.stringtemplate.org")
8075 (synopsis "Template engine to generate formatted text output")
8076 (description "StringTemplate is a java template engine (with ports for C#,
8077 Objective-C, JavaScript, Scala) for generating source code, web pages, emails,
8078 or any other formatted text output. StringTemplate is particularly good at
8079 code generators, multiple site skins, and internationalization / localization.
8080 StringTemplate also powers ANTLR.")
8081 (license license:bsd-3)))
8083 ;; antlr3 is partially written using antlr3 grammar files. It also depends on
8084 ;; ST4 (stringtemplate4), which is also partially written using antlr3 grammar
8085 ;; files and uses antlr3 at runtime. The latest version requires a recent version
8086 ;; of antlr3 at runtime.
8087 ;; Fortunately, ST4 4.0.6 can be built with an older antlr3, and we use antlr3.3.
8088 ;; This version of ST4 is sufficient for the latest antlr3.
8089 ;; We use ST4 4.0.6 to build a boostrap antlr3 (latest version), and build
8090 ;; the latest ST4 with it. Then we build our final antlr3 that will be linked
8091 ;; against the latest ST4.
8092 ;; antlr3.3 still depends on antlr3 to generate some files, so we use an
8093 ;; even older version, antlr3.1, to generate them. Fortunately antlr3.1 uses
8094 ;; only grammar files with the antlr2 syntax.
8095 ;; So we build antlr3.1 -> antlr3.3 -> ST4.0.6 -> antlr3-bootstrap -> ST4 -> antlr3.
8097 (define-public java-stringtemplate
8098 (package (inherit java-stringtemplate-3)
8099 (name "java-stringtemplate")
8103 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/"
8105 (file-name (string-append name "-" version ".tar.gz"))
8108 "1pri8hqa95rfdkjy55icl5q1m09zwp5k67ib14abas39s4v3w087"))))
8109 (build-system ant-build-system)
8111 `(#:jar-name (string-append ,name "-" ,version ".jar")
8112 #:tests? #f ; FIXME: tests fail for unknown reasons
8114 #:modules ((guix build ant-build-system)
8118 (modify-phases %standard-phases
8119 (add-before 'check 'fix-test-target
8121 (substitute* "build.xml"
8122 (("\\$\\{test.home\\}/java") "${test.home}/")
8123 (("\\*Test.java") "Test*.java"))
8125 (add-before 'build 'generate-grammar
8127 (with-directory-excursion "src/org/stringtemplate/v4/compiler/"
8128 (for-each (lambda (file)
8129 (format #t "~a\n" file)
8130 (invoke "antlr3" file))
8131 '("STParser.g" "Group.g" "CodeGenerator.g")))
8134 `(("antlr3" ,antlr3-bootstrap)
8136 ("java-stringtemplate" ,java-stringtemplate-3)
8137 ("java-junit" ,java-junit)))))
8139 (define java-stringtemplate-4.0.6
8140 (package (inherit java-stringtemplate)
8141 (name "java-stringtemplate")
8145 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/ST-"
8147 (file-name (string-append name "-" version ".tar.gz"))
8150 "0hjmh1ahdsh3w825i67mli9l4nncc4l6hdbf9ma91jvlj590sljp"))))
8152 `(("antlr3" ,antlr3-3.3)
8154 ("java-stringtemplate" ,java-stringtemplate-3)))))
8156 (define-public antlr3
8163 (url "https://github.com/antlr/antlr3")
8165 (file-name (git-file-name name version))
8168 "0cafavrjmzqhklghrk8c2jqxkdwxgzskm20pbrfd3r41cn00dpnf"))))
8169 (build-system ant-build-system)
8171 `(#:jar-name (string-append ,name "-" ,version ".jar")
8172 #:source-dir "tool/src/main/java:runtime/Java/src/main/java:tool/src/main/antlr3"
8175 (modify-phases %standard-phases
8176 (add-after 'install 'bin-install
8177 (lambda* (#:key inputs outputs #:allow-other-keys)
8178 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
8179 (bin (string-append (assoc-ref outputs "out") "/bin")))
8181 (with-output-to-file (string-append bin "/antlr3")
8184 (string-append "#!" (which "sh") "\n"
8185 "java -cp " jar "/" ,name "-" ,version ".jar:"
8187 (find-files (assoc-ref inputs "stringtemplate")
8191 (find-files (assoc-ref inputs "stringtemplate4")
8195 (find-files (string-append
8196 (assoc-ref inputs "antlr")
8199 " org.antlr.Tool $*"))))
8200 (chmod (string-append bin "/antlr3") #o755))
8202 (add-before 'build 'generate-grammar
8204 (chdir "tool/src/main/antlr3/org/antlr/grammar/v3/")
8205 (for-each (lambda (file)
8208 (invoke "antlr3" file))
8209 '("ANTLR.g" "ANTLRTreePrinter.g" "ActionAnalysis.g"
8210 "AssignTokenTypesWalker.g"
8211 "ActionTranslator.g" "TreeToNFAConverter.g"
8212 "ANTLRv3.g" "ANTLRv3Tree.g" "LeftRecursiveRuleWalker.g"
8213 "CodeGenTreeWalker.g" "DefineGrammarItemsWalker.g"))
8214 (substitute* "ANTLRParser.java"
8215 (("public Object getTree") "public GrammarAST getTree"))
8216 (substitute* "ANTLRv3Parser.java"
8217 (("public Object getTree") "public CommonTree getTree"))
8218 (chdir "../../../../../java")
8219 (substitute* "org/antlr/tool/LeftRecursiveRuleAnalyzer.java"
8220 (("import org.antlr.grammar.v3.\\*;") "import org.antlr.grammar.v3.*;
8221 import org.antlr.grammar.v3.ANTLRTreePrinter;"))
8222 (substitute* "org/antlr/tool/ErrorManager.java"
8223 (("case NO_SUCH_ATTRIBUTE_PASS_THROUGH:") ""))
8224 (chdir "../../../..")
8226 (add-before 'build 'fix-build-xml
8228 (substitute* "build.xml"
8229 (("target name=\"compile\">")
8230 "target name=\"compile\">
8231 <copy todir=\"${classes.dir}\">
8232 <fileset dir=\"tool/src/main/resources\">
8233 <include name=\"**/*.stg\"/>
8234 <include name=\"**/*.st\"/>
8235 <include name=\"**/*.sti\"/>
8236 <include name=\"**/STLexer.tokens\"/>
8242 ("antlr3" ,antlr3-bootstrap)))
8244 `(("junit" ,java-junit)
8245 ("stringtemplate" ,java-stringtemplate-3)
8246 ("stringtemplate4" ,java-stringtemplate)))
8248 `(("stringtemplate" ,java-stringtemplate-3)
8250 ("stringtemplate4" ,java-stringtemplate-4.0.6)))
8251 (home-page "https://www.antlr3.org")
8252 (synopsis "Framework for constructing recognizers, compilers, and translators")
8253 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
8254 is a language tool that provides a framework for constructing recognizers,
8255 compilers, and translators from grammatical descriptions containing Java, C#,
8256 C++, or Python actions. ANTLR provides excellent support for tree construction,
8257 tree walking, and translation.")
8258 (license license:bsd-3)))
8260 (define antlr3-bootstrap
8263 (name "antlr3-bootstrap")
8266 ("antlr3" ,antlr3-3.3)))
8268 `(("junit" ,java-junit)))))
8270 (define-public antlr3-3.3
8277 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
8278 "gh-pages/download/antlr-"
8282 "0qgg5vgsm4l1d6dj9pfbaa25dpv2ry2gny8ajy4vvgvfklw97b3m"))
8284 (search-patches "antlr3-3_3-fix-java8-compilation.patch"))))
8286 `(#:jar-name (string-append ,name "-" ,version ".jar")
8287 #:source-dir (string-join '("tool/src/main/java"
8288 "runtime/Java/src/main/java"
8289 "tool/src/main/antlr2"
8290 "tool/src/main/antlr3")
8292 #:tests? #f ; FIXME: tests seem to require maven plugin
8293 #:modules ((guix build ant-build-system)
8297 (modify-phases %standard-phases
8298 (add-after 'install 'bin-install
8299 (lambda* (#:key inputs outputs #:allow-other-keys)
8300 (let* ((out (assoc-ref outputs "out"))
8301 (jar (string-append out "/share/java"))
8302 (bin (string-append out "/bin")))
8304 (with-output-to-file (string-append bin "/antlr3")
8308 "#!" (which "sh") "\n"
8309 "java -cp " jar "/antlr3-3.3.jar:"
8311 (append (find-files (assoc-ref inputs "java-stringtemplate")
8313 (find-files (string-append (assoc-ref inputs "antlr")
8317 " org.antlr.Tool $*"))))
8318 (chmod (string-append bin "/antlr3") #o755)
8320 (add-before 'build 'generate-grammar
8322 (substitute* "tool/src/main/java/org/antlr/tool/Grammar.java"
8323 (("import org.antlr.grammar.v2.\\*;")
8324 "import org.antlr.grammar.v2.*;\n
8325 import org.antlr.grammar.v2.TreeToNFAConverter;\n
8326 import org.antlr.grammar.v2.DefineGrammarItemsWalker;\n
8327 import org.antlr.grammar.v2.ANTLRTreePrinter;"))
8328 (with-directory-excursion "tool/src/main/antlr2/org/antlr/grammar/v2/"
8329 (for-each (lambda (file)
8330 (format #t "~a\n" file)
8331 (invoke "antlr" file))
8332 '("antlr.g" "antlr.print.g" "assign.types.g"
8333 "buildnfa.g" "codegen.g" "define.g")))
8334 (with-directory-excursion "tool/src/main/antlr3/org/antlr/grammar/v3/"
8335 (for-each (lambda (file)
8336 (format #t "~a\n" file)
8337 (invoke "antlr3" file))
8338 '("ActionAnalysis.g" "ActionTranslator.g" "ANTLRv3.g"
8341 (add-before 'build 'fix-build-xml
8343 (substitute* "build.xml"
8344 (("target name=\"compile\">")
8345 "target name=\"compile\">
8346 <copy todir=\"${classes.dir}\">
8347 <fileset dir=\"tool/src/main/resources\">
8348 <include name=\"**/*.stg\"/>
8349 <include name=\"**/*.st\"/>
8350 <include name=\"**/*.sti\"/>
8351 <include name=\"**/STLexer.tokens\"/>
8357 ("antlr3" ,antlr3-3.1)))
8359 `(("junit" ,java-junit)))
8361 `(("java-stringtemplate" ,java-stringtemplate-3)
8362 ("antlr" ,antlr2)))))
8364 (define-public antlr3-3.1
8370 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
8371 "gh-pages/download/antlr-"
8375 "0sfimc9cpbgrihz4giyygc8afgpma2c93yqpwb951giriri6x66z"))
8377 (search-patches "antlr3-3_1-fix-java8-compilation.patch"))))
8379 `(#:jar-name (string-append "antlr3-" ,version ".jar")
8380 #:source-dir "src:runtime/Java/src"
8383 (modify-phases %standard-phases
8384 (add-after 'install 'bin-install
8385 (lambda* (#:key inputs outputs #:allow-other-keys)
8386 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
8387 (bin (string-append (assoc-ref outputs "out") "/bin")))
8389 (with-output-to-file (string-append bin "/antlr3")
8392 (string-append "#!" (which "sh") "\n"
8393 "java -cp " jar "/antlr3-3.1.jar:"
8395 (find-files (assoc-ref inputs "stringtemplate")
8399 (find-files (string-append
8400 (assoc-ref inputs "antlr")
8403 " org.antlr.Tool $*"))))
8404 (chmod (string-append bin "/antlr3") #o755))
8406 (add-before 'build 'generate-grammar
8408 (let ((dir "src/org/antlr/tool/"))
8409 (for-each (lambda (file)
8412 (invoke "antlr" "-o" dir (string-append dir file)))
8413 '("antlr.g" "antlr.print.g" "assign.types.g"
8414 "buildnfa.g" "define.g")))
8415 (format #t "codegen.g\n")
8416 (invoke "antlr" "-o" "src/org/antlr/codegen"
8417 "src/org/antlr/codegen/codegen.g")
8419 (add-before 'build 'fix-build-xml
8421 (substitute* "build.xml"
8422 (("target name=\"compile\">")
8423 "target name=\"compile\">
8424 <copy todir=\"${classes.dir}\">
8425 <fileset dir=\"src\">
8426 <include name=\"**/*.stg\"/>
8427 <include name=\"**/*.st\"/>
8428 <include name=\"**/*.sti\"/>
8429 <include name=\"**/STLexer.tokens\"/>
8434 `(("antlr" ,antlr2)))
8436 `(("junit" ,java-junit)))
8438 `(("stringtemplate" ,java-stringtemplate-3)))))
8440 (define-public java-treelayout
8442 (name "java-treelayout")
8447 (url "https://github.com/abego/treelayout")
8448 (commit (string-append "v" version))))
8449 (file-name (git-file-name name version))
8452 "18my8ql9b1y0n0zrvkih7xfhf3dpgfhyfifvkcfhmwcvw3divxak"))))
8453 (build-system ant-build-system)
8455 `(#:jar-name (string-append ,name "-" ,version ".jar")
8456 #:source-dir "org.abego.treelayout/src/main/java"
8457 #:test-dir "org.abego.treelayout/src/test"))
8459 `(("java-junit" ,java-junit)))
8461 `(("java-hamcrest-core" ,java-hamcrest-core)))
8462 (home-page "http://treelayout.sourceforge.net")
8463 (synopsis "Tree Layout Algorithm in Java")
8464 (description "TreeLayout creates tree layouts for arbitrary trees. It is
8465 not restricted to a specific output or format, but can be used for any kind of
8466 two dimensional diagram. Examples are Swing based components, SVG files, etc.
8467 This is possible because TreeLayout separates the layout of a tree from the
8469 (license license:bsd-3)))
8471 (define-public java-antlr4-runtime
8473 (name "java-antlr4-runtime")
8478 (url "https://github.com/antlr/antlr4")
8480 (file-name (git-file-name name version))
8483 "1qal3add26qxskm85nk7r758arladn5rcyjinmhlhznmpbbv9j8m"))
8485 (search-patches "java-antlr4-Add-standalone-generator.patch"
8486 "java-antlr4-fix-code-too-large.java"))))
8487 (build-system ant-build-system)
8489 `(#:jar-name "java-antlr4-runtime.jar"
8490 #:source-dir "runtime/Java/src/org"
8491 #:tests? #f; tests depend on java-antlr4 itself
8493 (modify-phases %standard-phases
8494 (add-before 'build 'copy-resources
8496 (copy-recursively "runtime/Java/src/main/dot"
8499 (home-page "https://www.antlr.org")
8500 (synopsis "ANTLR runtime library")
8501 (description "This package contains the runtime library used with generated
8503 (license license:bsd-3)))
8505 (define-public antlr4
8507 (inherit java-antlr4-runtime)
8510 `(#:jar-name "antlr4.jar"
8511 #:source-dir "tool/src"
8512 #:test-dir "tool-testsuite/test:runtime-testsuite/test:runtime-testsuite/annotations/src"
8513 #:test-include (list "**/Test*.java")
8514 #:test-exclude (list
8515 ;; no runnable method
8516 "**/TestOutputReading.java"
8518 "**/TestParserErrors.java"
8519 "**/TestSemPredEvalParser.java"
8521 "**/TestListeners.java"
8522 "**/TestParseTrees.java"
8523 "**/TestParserExec.java"
8524 "**/TestLexerErrors.java"
8525 "**/TestPerformance.java"
8526 "**/TestCompositeParsers.java"
8527 "**/TestLexerExec.java"
8528 "**/TestSemPredEvalLexer.java"
8529 "**/TestLeftRecursion.java"
8530 "**/TestFullContextParsing.java"
8531 "**/TestCompositeLexers.java"
8532 ;; Null pointer exception
8533 "**/TestCompositeGrammars.java"
8534 ;; Wrong assumption on emoji
8535 "**/TestUnicodeData.java")
8537 (modify-phases %standard-phases
8538 (add-before 'build 'fix-build.xml
8540 ;; tests are not in a java subdirectory
8541 (substitute* "build.xml"
8542 (("\\$\\{test.home\\}/java") "${test.home}"))
8544 ;; tests require to have a working antlr4 binary
8546 (add-after 'bin-install 'check
8548 (invoke "ant" "compile-tests")
8549 (invoke "ant" "check" "-Dtest.home=runtime-testsuite/annotations/src")
8550 (invoke "ant" "check" "-Dtest.home=runtime-testsuite/test")
8551 (invoke "ant" "check" "-Dtest.home=tool-testsuite/test")
8553 (add-before 'check 'remove-unrelated-languages
8555 ;; There are tests for other languages that ANTLR can generate, but
8556 ;; we don't have the infrastructure for that yet. Let's test Java
8560 (delete-file-recursively
8561 (string-append "runtime-testsuite/test/org/antlr/v4/test/runtime/"
8563 '("cpp" "csharp" "go" "javascript" "php" "python" "python2"
8566 (add-before 'check 'generate-test-parsers
8567 (lambda* (#:key outputs #:allow-other-keys)
8568 (define (run-antlr dir filename package)
8569 (invoke "antlr4" "-lib" dir "-visitor" "-no-listener"
8570 "-package" package (string-append dir "/" filename)
8572 (setenv "PATH" (string-append (getenv "PATH") ":"
8573 (assoc-ref outputs "out") "/bin"))
8574 (run-antlr "runtime-testsuite/test/org/antlr/v4/test/runtime/java/api"
8575 "Java.g4" "org.antlr.v4.test.runtime.java.api")
8576 (run-antlr "runtime-testsuite/test/org/antlr/v4/test/runtime/java/api"
8577 "VisitorBasic.g4" "org.antlr.v4.test.runtime.java.api")
8578 (run-antlr "runtime-testsuite/test/org/antlr/v4/test/runtime/java/api"
8579 "VisitorCalc.g4" "org.antlr.v4.test.runtime.java.api")
8581 (add-before 'check 'remove-graphemes
8583 ;; When running antlr on grahemes.g4, we get a runtime exception:
8584 ;; set is empty. So delete the file that depends on it.
8586 "runtime-testsuite/test/org/antlr/v4/test/runtime/java/api/perf/TimeLexerSpeed.java")
8588 (add-after 'install 'bin-install
8589 (lambda* (#:key inputs outputs #:allow-other-keys)
8590 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
8591 (bin (string-append (assoc-ref outputs "out") "/bin")))
8593 (with-output-to-file (string-append bin "/antlr4")
8596 (string-append "#!" (which "sh") "\n"
8597 "java -cp " jar "/antlr4.jar:"
8603 (find-files (assoc-ref inputs input)
8605 '("antlr3" "java-stringtemplate"
8606 "java-antlr4-runtime" "java-treelayout"
8607 "java-jsonp-api" "java-icu4j")))
8609 " org.antlr.v4.Tool $*"))))
8610 (chmod (string-append bin "/antlr4") #o755)
8612 (add-before 'build 'copy-resources
8614 (copy-recursively "tool/resources/" "build/classes")
8616 (add-before 'build 'generate-unicode
8618 ;; First: build the generator
8619 (invoke "javac" "-cp" (getenv "CLASSPATH")
8620 "tool/src/org/antlr/v4/unicode/UnicodeRenderer.java"
8621 "tool/src/org/antlr/v4/unicode/UnicodeDataTemplateController.java")
8623 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
8624 ":tool/src:runtime/Java")
8625 "org.antlr.v4.unicode.UnicodeRenderer"
8626 "tool/resources/org/antlr/v4/tool/templates"
8628 "tool/src/org/antlr/v4/unicode/UnicodeData.java")
8629 ;; It seems there is a bug with our ST4
8630 (substitute* "tool/src/org/antlr/v4/unicode/UnicodeData.java"
8632 ;; Remove the additional file
8633 (delete-file "tool/src/org/antlr/v4/unicode/UnicodeRenderer.java")
8635 (add-before 'build 'generate-grammar
8636 (lambda* (#:key inputs #:allow-other-keys)
8637 (with-directory-excursion "tool/src/org/antlr/v4/parse"
8638 (for-each (lambda (file)
8641 (invoke "antlr3" file))
8642 '("ANTLRLexer.g" "ANTLRParser.g" "BlockSetTransformer.g"
8643 "GrammarTreeVisitor.g" "ATNBuilder.g"
8644 "ActionSplitter.g" "LeftRecursiveRuleWalker.g")))
8645 (with-directory-excursion "tool/src/org/antlr/v4/codegen"
8646 (install-file "../parse/ANTLRParser.tokens" ".")
8647 (display "SourceGenTriggers.g\n")
8648 (invoke "antlr3" "SourceGenTriggers.g"))
8651 `(("antlr3" ,antlr3)
8652 ("java-antlr4-runtime" ,java-antlr4-runtime)
8653 ("java-icu4j" ,java-icu4j)
8654 ("java-jsonp-api" ,java-jsonp-api)
8655 ("java-stringtemplate" ,java-stringtemplate)
8656 ("java-treelayout" ,java-treelayout)))
8658 `(("java-junit" ,java-junit)))
8659 (synopsis "Parser and lexer generator in Java")
8660 (description "ANTLR (ANother Tool for Language Recognition) is a powerful
8661 parser generator for reading, processing, executing, or translating structured
8662 text or binary files. It's widely used to build languages, tools, and
8663 frameworks. From a grammar, ANTLR generates a parser that can build and walk
8666 (define-public java-antlr4-runtime-4.1
8668 (inherit java-antlr4-runtime)
8673 (url "https://github.com/antlr/antlr4")
8675 (file-name (git-file-name "antlr4" version))
8678 "1i8hmx5an58cjyvhji0xgpvd6lq00z1k1mjys025q2wqc25wv4c1"))))
8680 (substitute-keyword-arguments (package-arguments java-antlr4-runtime)
8682 `(modify-phases ,phases
8683 (add-before 'configure 'chmod
8685 (chmod "build.xml" #o644)
8688 `(("java-treelayout" ,java-treelayout)))))
8690 (define-public antlr4-4.1
8693 (version (package-version java-antlr4-runtime-4.1))
8694 (source (package-source java-antlr4-runtime-4.1))
8696 (substitute-keyword-arguments (package-arguments antlr4)
8699 ((#:test-exclude excludes)
8700 `(list "**/TestParseErrors.java"
8701 "**/TestTopologicalSort.java"
8704 `(modify-phases ,phases
8705 (delete 'generate-unicode)
8708 (invoke "ant" "check")
8710 (add-before 'configure 'chmod
8712 (chmod "build.xml" #o644)
8714 (delete 'remove-graphemes)
8715 (delete 'remove-unrelated-languages)
8716 (delete 'generate-test-parsers)))))
8719 "java-antlr4-runtime" (list java-antlr4-runtime-4.1)
8720 (package-inputs antlr4)))))
8722 (define-public java-tunnelvisionlabs-antlr4-runtime-annotations
8724 (inherit java-antlr4-runtime)
8725 (name "java-tunnelvisionlabs-antlr4-runtime-annotations")
8730 (url "https://github.com/tunnelvisionlabs/antlr4")
8731 (commit (string-append version "-opt"))))
8732 (file-name (git-file-name "java-tunnelvisionlabs-antlr4" version))
8735 "1mf2lvvsszpialsk23ma83pwp50nd32lrbjpa847zlm5gmranbr8"))
8737 (search-patches "java-antlr4-Add-standalone-generator.patch"
8738 "java-tunnelvisionlabs-antlr-code-too-large.patch"))))
8740 `(#:jar-name "java-antlr4-runtime-annotations.jar"
8741 #:source-dir "runtime/JavaAnnotations/src"
8742 #:tests? #f; no tests
8744 (modify-phases %standard-phases
8745 (add-after 'build 'copy-resources
8747 (copy-recursively "runtime/JavaAnnotations/resources"
8750 (add-after 'copy-resources 'rebuild-jar
8752 (invoke "ant" "jar")
8756 (synopsis "Annotations for ANTLR's runtime library")
8757 (description "This package contains annotations used during the build of
8758 the runtime library of ANTLR.")))
8760 ;; the runtime of this library requires a lexer that is generated by antlr4.
8761 ;; However, antlr4 itself requires this library at build and run-time. We
8762 ;; use antlr4@4.1, the closest version of antlr that doesn't need this
8763 ;; bootstrap process, to generate the lexer. The generated lexer is built
8764 ;; for the 4.1 runtime, which is slightly different from this runtime.
8765 ;; So, we build the runtime with antlr 4.1, with a broken xml lexer, that we
8766 ;; use to build antlr4. We then re-use this antlr4 to build the runtime, and
8767 ;; the proper, working, runtime to build antlr4 again.
8768 (define java-tunnelvisionlabs-antlr4-runtime-bootstrap
8770 (inherit java-antlr4-runtime)
8771 (name "java-tunnelvisionlabs-antlr4-runtime")
8772 (version (package-version java-tunnelvisionlabs-antlr4-runtime-annotations))
8773 (source (package-source java-tunnelvisionlabs-antlr4-runtime-annotations))
8775 `(#:jar-name "java-antlr4-runtime.jar"
8776 #:source-dir "runtime/Java/src"
8777 #:tests? #f; tests require antlr4, but antlr4 depends on this package
8779 (modify-phases %standard-phases
8780 (add-before 'build 'generate-xpath-lexer
8782 (invoke "antlr4" "-lib" "runtime/Java/src/org/antlr/v4/runtime/tree/xpath"
8783 "-visitor" "-no-listener"
8784 "-package" "org.antlr.v4.runtime.tree.xpath"
8785 "runtime/Java/src/org/antlr/v4/runtime/tree/xpath/XPathLexer.g4")
8786 ;; Generated code is for an incompatible version of the runtime
8787 (substitute* "runtime/Java/src/org/antlr/v4/runtime/tree/xpath/XPathLexer.java"
8788 (("LexerATNSimulator\\(this,_ATN,_decisionToDFA,_sharedContextCache\\)")
8789 "LexerATNSimulator(this,_ATN)"))
8791 (add-before 'build 'copy-resources
8793 (copy-recursively "runtime/Java/src/main/dot"
8797 `(("antlr4" ,antlr4-4.1)
8798 ("java-tunnelvisionlabs-antlr4-runtime-annotations"
8799 ,java-tunnelvisionlabs-antlr4-runtime-annotations)))))
8801 (define java-tunnelvisionlabs-antlr4-bootstrap
8804 (name "java-tunnelvisionlabs-antlr4")
8805 (version (package-version java-tunnelvisionlabs-antlr4-runtime-annotations))
8806 (source (package-source java-tunnelvisionlabs-antlr4-runtime-annotations))
8808 (substitute-keyword-arguments (package-arguments antlr4)
8810 "tool/test:runtime-testsuite/src")
8812 `(modify-phases ,phases
8813 (delete 'remove-unrelated-languages)
8814 (delete 'remove-graphemes)
8815 (delete 'generate-test-parsers)
8819 `(("antlr3" ,antlr3)
8820 ("java-antlr4-runtime" ,java-tunnelvisionlabs-antlr4-runtime-bootstrap)
8821 ("java-tunnelvisionlabs-antlr4-runtime-annotations"
8822 ,java-tunnelvisionlabs-antlr4-runtime-annotations)
8823 ("java-icu4j" ,java-icu4j)
8824 ("java-jsonp-api" ,java-jsonp-api)
8825 ("java-stringtemplate" ,java-stringtemplate)
8826 ("java-treelayout" ,java-treelayout)))))
8828 (define-public java-tunnelvisionlabs-antlr4-runtime
8830 (inherit java-tunnelvisionlabs-antlr4-runtime-bootstrap)
8833 "antlr4" (list java-tunnelvisionlabs-antlr4-bootstrap)
8834 (package-native-inputs java-tunnelvisionlabs-antlr4-runtime-bootstrap)))))
8836 (define-public java-tunnelvisionlabs-antlr4
8838 (inherit java-tunnelvisionlabs-antlr4-bootstrap)
8841 "java-antlr4-runtime" (list java-tunnelvisionlabs-antlr4-runtime)
8842 (package-inputs java-tunnelvisionlabs-antlr4-bootstrap)))))
8844 (define-public java-commons-cli-1.2
8845 ;; This is a bootstrap dependency for Maven2.
8847 (inherit java-commons-cli)
8851 (uri (string-append "mirror://apache/commons/cli/source/"
8852 "commons-cli-" version "-src.tar.gz"))
8855 "0rvfgzgv2pc1m091dfj3ih9ddsjjppr1f1wf0qmc3bk6b1kwv2dm"))))
8857 `(#:jar-name "commons-cli.jar"
8859 (modify-phases %standard-phases
8860 (add-before 'check 'fix-build-xml
8861 (lambda* (#:key inputs #:allow-other-keys)
8862 (substitute* "build.xml"
8863 (("dir=\"\\$\\{test.home\\}/java\"")
8864 "dir=\"${test.home}\""))
8867 `(("java-junit" ,java-junit)))))
8869 (define-public java-microemulator-cldc
8871 (name "java-microemulator-cldc")
8875 (uri (string-append "https://github.com/barteo/microemu/archive/"
8877 (string-map (lambda (c) (if (char=? c #\.) #\_ c))
8880 (file-name (string-append name "-" version ".tar.gz"))
8883 "1x1apmz38gkppxnwnygwmi12j54v4p258v8ddzn6dldkk7vak1ll"))))
8884 (build-system ant-build-system)
8886 `(#:jar-name "microemulator-cldc.jar"
8887 #:source-dir "microemu-cldc/src/main/java"
8888 #:tests? #f)); Requires even older software
8889 (home-page "https://github.com/barteo/microemu")
8890 (synopsis "J2ME CLDC emulator")
8891 (description "Microemulator is a Java 2 Micro Edition (J2ME) CLDC/MIDP
8892 Emulator. It demonstrates MIDlet based applications in web browser
8893 applet and can be run as a standalone java application.")
8894 (license (list license:asl2.0
8896 license:lgpl2.1+))))
8898 (define-public java-datanucleus-javax-persistence
8900 (name "java-datanucleus-javax-persistence")
8904 (uri (string-append "https://github.com/datanucleus/"
8905 "javax.persistence/archive/javax.persistence-"
8906 version "-release.tar.gz"))
8909 "11jx0fjwgc2hhbqqgdd6m1pf2fplf9vslppygax0y1z5csnqjhpx"))))
8910 (build-system ant-build-system)
8912 `(#:jar-name "java-datanucleus-javax-persistence.jar"
8914 #:source-dir "src/main/java"
8915 #:tests? #f)); no tests
8916 (home-page "https://github.com/datanucleus/javax.persistence")
8917 (synopsis "JPA API")
8918 (description "This package contains a clean definition of JPA API intended
8919 for use with DataNucleus JPA since the JCP haven't provided an official JPA API
8920 jar. See @url{http://java.net/projects/jpa-spec/downloads} for the specification
8921 used to generate this API.")
8922 (license (list license:edl1.0 license:epl1.0))))
8924 (define-public java-osgi-cmpn
8926 (name "java-osgi-cmpn")
8930 (uri (string-append "https://repo1.maven.org/maven2/"
8931 "org/osgi/osgi.cmpn/" version "/osgi.cmpn-"
8932 version "-sources.jar"))
8935 "1lmb6xyrmkqdhv1kayf0514rlwq6ypvs4m44ibrck3snp8241wys"))))
8936 (build-system ant-build-system)
8938 `(#:jar-name "osgi-cmpn.jar"
8939 #:tests? #f)); no tests
8941 `(("annotation" ,java-osgi-annotation)
8942 ("core" ,java-osgi-core)
8943 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
8944 ("microemulator" ,java-microemulator-cldc)
8945 ("servlet" ,java-classpathx-servletapi)))
8946 (home-page "https://www.osgi.org")
8947 (synopsis "Compendium specification module of OSGi framework")
8949 "OSGi, for Open Services Gateway initiative framework, is a module system
8950 and service platform for the Java programming language. This package contains
8951 the compendium specification module, providing interfaces and classes for use
8952 in compiling bundles.")
8953 (license license:asl2.0)))
8955 (define-public java-osgi-service-component-annotations
8957 (name "java-osgi-service-component-annotations")
8961 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8962 "org.osgi.service.component.annotations/"
8963 version "/org.osgi.service.component.annotations-"
8964 version "-sources.jar"))
8967 "15rq9cmp4fpn74q44m4j35qsqmjf5lx3hcrk6pzvbhc08igic2f0"))))
8968 (build-system ant-build-system)
8970 `(#:jar-name "osgi-service-component-annotations.jar"
8971 #:tests? #f)); no tests
8973 `(("annotation" ,java-osgi-annotation)))
8974 (home-page "https://www.osgi.org")
8975 (synopsis "Support annotations for osgi-service-component")
8977 "OSGi, for Open Services Gateway initiative framework, is a module system
8978 and service platform for the Java programming language. This package contains
8979 the support annotations for osgi-service-component.")
8980 (license license:asl2.0)))
8982 (define-public java-osgi-dto
8984 (name "java-osgi-dto")
8988 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8989 "org.osgi.dto/" version "/org.osgi.dto-"
8990 version "-sources.jar"))
8993 "0f4bqjzadn0hwk6sd3h5gvbyfp3yci1s6r0v770cc15p0pg627yr"))))
8994 (build-system ant-build-system)
8996 `(#:jar-name "osgi-dto.jar"
8997 #:tests? #f)); no tests
8999 `(("annotation" ,java-osgi-annotation)))
9000 (home-page "https://www.osgi.org")
9001 (synopsis "Data Transfer Objects")
9003 "OSGi, for Open Services Gateway initiative framework, is a module system
9004 and service platform for the Java programming language. This package contains
9005 the Data Transfer Objects. It is easily serializable having only public fields
9006 of primitive types and their wrapper classes, Strings, and DTOs. List, Set,
9007 Map and array aggregates may also be used. The aggregates must only hold
9008 objects of the listed types or aggregates.")
9009 (license license:asl2.0)))
9011 (define-public java-osgi-resource
9013 (name "java-osgi-resource")
9017 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9018 "org.osgi.resource/"
9019 version "/org.osgi.resource-"
9020 version "-sources.jar"))
9023 "0hi0fsc5v99q22bd7lrkvpz1y0ds4w9arjldpwsrcpqvz2js7q2d"))))
9024 (build-system ant-build-system)
9026 `(#:jar-name "osgi-resource.jar"
9027 #:tests? #f)); no tests
9029 `(("annotation" ,java-osgi-annotation)
9030 ("dto" ,java-osgi-dto)))
9031 (home-page "https://www.osgi.org")
9032 (synopsis "OSGI Resource")
9034 "OSGi, for Open Services Gateway initiative framework, is a module system
9035 and service platform for the Java programming language. This package contains
9036 the definition of common types in osgi packages.")
9037 (license license:asl2.0)))
9039 (define-public java-osgi-namespace-contract
9041 (name "java-osgi-namespace-contract")
9045 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9046 "org.osgi.namespace.contract/"
9047 version "/org.osgi.namespace.contract-"
9048 version "-sources.jar"))
9051 "1iz4f2i0fvqrlq90ki9nfzcfpvy2av434ri25bglywqssx8mmp36"))))
9052 (build-system ant-build-system)
9054 `(("resource" ,java-osgi-resource)
9055 ("annotation" ,java-osgi-annotation)))
9057 `(#:jar-name "osgi-namespace-contract.jar"
9058 #:tests? #f)); no tests
9059 (home-page "https://www.osgi.org")
9060 (synopsis "Contract Capability and Requirement Namespace")
9062 "OSGi, for Open Services Gateway initiative framework, is a module system
9063 and service platform for the Java programming language. This package contains
9064 the names for the attributes and directives for a namespace with contracts.")
9065 (license license:asl2.0)))
9067 (define-public java-osgi-namespace-extender
9069 (name "java-osgi-namespace-extender")
9073 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9074 "org.osgi.namespace.extender/"
9075 version "/org.osgi.namespace.extender-"
9076 version "-sources.jar"))
9079 "0jgqiak2i05qv6j3gd33xlaifzzc0ylxxk376v2x0apfg3vvixmz"))))
9080 (build-system ant-build-system)
9082 `(("resource" ,java-osgi-resource)
9083 ("annotation" ,java-osgi-annotation)))
9085 `(#:jar-name "osgi-namespace-extendent.jar"
9086 #:tests? #f)); no tests
9087 (home-page "https://www.osgi.org")
9088 (synopsis "Extender Capability and Requirement Namespace")
9090 "OSGi, for Open Services Gateway initiative framework, is a module system
9091 and service platform for the Java programming language. This package contains
9092 the names for the attributes and directives for an extender namespace.")
9093 (license license:asl2.0)))
9095 (define-public java-osgi-namespace-service
9097 (name "java-osgi-namespace-service")
9101 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9102 "org.osgi.namespace.service/"
9103 version "/org.osgi.namespace.service-"
9104 version "-sources.jar"))
9107 "0qmw8n2449nkmm56d1znz9zhazb6ya3vsimd5bf5jg23zzhgl8c8"))))
9108 (build-system ant-build-system)
9110 `(("resource" ,java-osgi-resource)
9111 ("annotation" ,java-osgi-annotation)))
9113 `(#:jar-name "osgi-namespace-service.jar"
9114 #:tests? #f)); no tests
9115 (home-page "https://www.osgi.org")
9116 (synopsis "Service Capability and Requirement Namespace")
9118 "OSGi, for Open Services Gateway initiative framework, is a module system
9119 and service platform for the Java programming language. This package contains
9120 the names for the attributes and directives for a service namespace.")
9121 (license license:asl2.0)))
9123 (define-public java-osgi-util-function
9125 (name "java-osgi-util-function")
9129 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9130 "org.osgi.util.function/"
9131 version "/org.osgi.util.function-"
9132 version "-sources.jar"))
9135 "04l7j3hwmmj28w23m7paca0afzncs42j2mdr3liqq8kvp548sc6x"))))
9136 (build-system ant-build-system)
9138 `(#:jar-name "osgi-util-function.jar"
9139 #:tests? #f)); no tests
9141 `(("annotation" ,java-osgi-annotation)))
9142 (home-page "https://www.osgi.org")
9143 (synopsis "OSGI Util Function")
9145 "OSGi, for Open Services Gateway initiative framework, is a module system
9146 and service platform for the Java programming language. This package contains
9147 an interface for a function that accepts a single argument and produces a result.")
9148 (license license:asl2.0)))
9150 (define-public java-osgi-util-promise
9152 (name "java-osgi-util-promise")
9156 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9157 "org.osgi.util.promise/"
9158 version "/org.osgi.util.promise-"
9159 version "-sources.jar"))
9162 "0y34dwiflg1c4ahvkswpf9z02xph2sr9fm04ia5493x3lshpw22c"))))
9163 (build-system ant-build-system)
9165 `(#:jar-name "osgi-util-promise.jar"
9166 #:tests? #f)); no tests
9168 `(("annotation" ,java-osgi-annotation)
9169 ("function" ,java-osgi-util-function)))
9170 (home-page "https://www.osgi.org")
9171 (synopsis "Promise of a value")
9173 "OSGi, for Open Services Gateway initiative framework, is a module system
9174 and service platform for the Java programming language. This package contains
9175 an interface and utilitary classes for promises. A Promise represents a future
9176 value. It handles the interactions for asynchronous processing.")
9177 (license license:asl2.0)))
9179 (define-public java-osgi-service-metatype-annotations
9181 (name "java-osgi-service-metatype-annotations")
9185 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9186 "org.osgi.service.metatype.annotations/"
9187 version "/org.osgi.service.metatype.annotations-"
9188 version "-sources.jar"))
9191 "12rwm3349wk80vm88rcdgs4435m4jxkpkj5mrx326skkz2c6hyw6"))))
9192 (build-system ant-build-system)
9194 `(#:jar-name "osgi-service-metatype-annotations.jar"
9195 #:tests? #f)); no tests
9197 `(("annotation" ,java-osgi-annotation)))
9198 (home-page "https://www.osgi.org")
9199 (synopsis "Support annotations for metatype")
9201 "OSGi, for Open Services Gateway initiative framework, is a module system
9202 and service platform for the Java programming language. This package contains
9203 the support annotations for metatype.")
9204 (license license:asl2.0)))
9206 (define-public java-osgi-service-repository
9208 (name "java-osgi-service-repository")
9212 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9213 "org.osgi.service.repository/"
9214 version "/org.osgi.service.repository-"
9215 version "-sources.jar"))
9218 "1k41mhg7b58pd8nsghr2qwcjrxdnf1p9spsw9v11k4257g6rl06n"))))
9219 (build-system ant-build-system)
9221 `(#:jar-name "osgi-service-repository.jar"
9222 #:tests? #f)); no tests
9224 `(("annotation" ,java-osgi-annotation)
9225 ("promise" ,java-osgi-util-promise)
9226 ("resource" ,java-osgi-resource)))
9227 (home-page "https://www.osgi.org")
9228 (synopsis "OSGI service repository")
9230 "OSGi, for Open Services Gateway initiative framework, is a module system
9231 and service platform for the Java programming language. This package contains
9232 a repository service that contains resources.")
9233 (license license:asl2.0)))
9235 (define-public java-osgi-framework
9237 (name "java-osgi-framework")
9241 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9242 "org.osgi.framework/" version "/org.osgi.framework-"
9243 version "-sources.jar"))
9246 "1lwp2zfad3rybcc6q9bwz8xsgkc92ypzy5p6x54387f1qj65m73s"))))
9247 (build-system ant-build-system)
9249 `(#:jar-name "osgi-framework.jar"
9250 #:tests? #f)); no tests
9252 `(("annotation" ,java-osgi-annotation)
9253 ("resource" ,java-osgi-resource)
9254 ("dto" ,java-osgi-dto)))
9255 (home-page "https://www.osgi.org")
9256 (synopsis "OSGi framework")
9258 "OSGi, for Open Services Gateway initiative framework, is a module system
9259 and service platform for the Java programming language.")
9260 (license license:asl2.0)))
9262 (define-public java-osgi-service-log
9264 (name "java-osgi-service-log")
9268 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9269 "org.osgi.service.log/"
9270 version "/org.osgi.service.log-"
9271 version "-sources.jar"))
9274 "1029j30dzcwializzca0j3fkhwwz08kmmsha5agw1iccscimj6r0"))))
9275 (build-system ant-build-system)
9277 `(#:jar-name "osgi-service-log.jar"
9278 #:tests? #f)); no tests
9280 `(("java-osgi-framework" ,java-osgi-framework)))
9281 (home-page "https://www.osgi.org")
9282 (synopsis "Provides methods for bundles to write messages to the log")
9284 "OSGi, for Open Services Gateway initiative framework, is a module system
9285 and service platform for the Java programming language. This package contains
9287 (license license:asl2.0)))
9289 (define-public java-osgi-service-jdbc
9291 (name "java-osgi-service-jdbc")
9295 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9296 "org.osgi.service.jdbc/"
9297 version "/org.osgi.service.jdbc-"
9298 version "-sources.jar"))
9301 "11iln5v7bk469cgb9ddkrz9sa95b3733gqgaqw9xf5g6wq652yjz"))))
9302 (build-system ant-build-system)
9304 `(#:jar-name "osgi-service-jdbc.jar"
9305 #:tests? #f)); no tests
9306 (home-page "https://www.osgi.org")
9307 (synopsis "Factory for JDBC connection factories")
9309 "OSGi, for Open Services Gateway initiative framework, is a module system
9310 and service platform for the Java programming language. This package contains
9311 a factory for JDBC connection factories. There are 3 preferred connection
9312 factories for getting JDBC connections:
9315 @item @code{javax.sql.DataSource};
9316 @item @code{javax.sql.ConnectionPoolDataSource};
9317 @item @code{javax.sql.XADataSource}.
9319 (license license:asl2.0)))
9321 (define-public java-osgi-service-resolver
9323 (name "java-osgi-service-resolver")
9327 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9328 "org.osgi.service.resolver/"
9329 version "/org.osgi.service.resolver-"
9330 version "-sources.jar"))
9333 "1dzqn1ryfi2rq4zwsgp44bmj2wlfydjg1qbxw2b0z4xdjjy55vxd"))))
9334 (build-system ant-build-system)
9336 `(#:jar-name "osgi-service-resolver.jar"
9337 #:tests? #f)); no tests
9339 `(("annotation" ,java-osgi-annotation)
9340 ("resource" ,java-osgi-resource)))
9341 (home-page "https://www.osgi.org")
9342 (synopsis "OSGI Resolver service")
9344 "OSGi, for Open Services Gateway initiative framework, is a module system
9345 and service platform for the Java programming language. This package contains
9346 a resolver service that resolves the specified resources in the context supplied
9348 (license license:asl2.0)))
9350 (define-public java-osgi-util-tracker
9352 (name "java-osgi-util-tracker")
9356 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9357 "org.osgi.util.tracker/"
9358 version "/org.osgi.util.tracker-"
9359 version "-sources.jar"))
9362 "0c4fh9vxwzsx59r8dygda0gq2gx3z5vfhc3jsphlqwf5w0h403lz"))))
9363 (build-system ant-build-system)
9365 `(#:jar-name "osgi-util-tracker.jar"
9366 #:tests? #f)); no tests
9368 `(("framework" ,java-osgi-framework)
9369 ("annotation" ,java-osgi-annotation)))
9370 (home-page "https://www.osgi.org")
9371 (synopsis "Bundle tracking")
9373 "OSGi, for Open Services Gateway initiative framework, is a module system
9374 and service platform for the Java programming language. This package contains
9375 bundle tracking utility classes.")
9376 (license license:asl2.0)))
9378 (define-public java-osgi-service-cm
9380 (name "java-osgi-service-cm")
9384 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9385 "org.osgi.service.cm/"
9386 version "/org.osgi.service.cm-"
9387 version "-sources.jar"))
9390 "1z8kap48y3xi0ggj8v6czglfnpnd94mmismgi2wbqhj1nl5fzbp6"))))
9391 (build-system ant-build-system)
9393 `(#:jar-name "osgi-service-cm.jar"
9394 #:tests? #f)); no tests
9396 `(("framework" ,java-osgi-framework)
9397 ("annotation" ,java-osgi-annotation)))
9398 (home-page "https://www.osgi.org")
9399 (synopsis "OSGI Configuration Management")
9401 "OSGi, for Open Services Gateway initiative framework, is a module system
9402 and service platform for the Java programming language. This package contains
9403 utility classes for the configuration of services.")
9404 (license license:asl2.0)))
9406 (define-public java-osgi-service-packageadmin
9408 (name "java-osgi-service-packageadmin")
9412 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9413 "org.osgi.service.packageadmin/"
9414 version "/org.osgi.service.packageadmin-"
9415 version "-sources.jar"))
9418 "041mpxzi7g36wmcily6y4ccn3jx15akpdy8gmhyb7m98x7qfvn52"))))
9419 (build-system ant-build-system)
9421 `(#:jar-name "osgi-service-packageadmin.jar"
9422 #:tests? #f)); no tests
9424 `(("framework" ,java-osgi-framework)))
9425 (home-page "https://www.osgi.org")
9426 (synopsis "OSGI Package Administration")
9428 "OSGi, for Open Services Gateway initiative framework, is a module system
9429 and service platform for the Java programming language. This package contains
9430 the packageadmin service.")
9431 (license license:asl2.0)))
9433 (define-public java-ops4j-base-lang
9435 (name "java-ops4j-base-lang")
9439 (uri (string-append "https://github.com/ops4j/org.ops4j.base/"
9440 "archive/base-" version ".tar.gz"))
9443 "18hl3lpchgpv8yh5rlk39l2gif5dlfgb8gxjmncf39pr2dprkniw"))))
9444 (build-system ant-build-system)
9446 `(#:jar-name "java-ops4j-base-lang.jar"
9447 #:source-dir "ops4j-base-lang/src/main/java"
9448 #:tests? #f; no tests
9450 (modify-phases %standard-phases
9451 (add-before 'build 'add-test-file
9453 ;; That file is required by a test in ops4j-pax-exam-core-spi
9454 (mkdir-p "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang")
9455 (with-output-to-file "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang/pom.properties"
9459 "version=" ,version "\n"
9460 "groupId=org.ops4j.base"
9461 "artifactId=ops4j-base-lang\n"))))
9463 (home-page "https://ops4j1.jira.com/wiki/spaces/base/overview")
9464 (synopsis "Utility classes and extensions to be used in OPS4J projects")
9465 (description "OPS4J stands for Open Participation Software for Java. This
9466 package contains utilities and extensions related to @code{java.lang}.")
9467 (license license:asl2.0)))
9469 (define-public java-ops4j-base-monitors
9471 (inherit java-ops4j-base-lang)
9472 (name "java-ops4j-base-monitors")
9474 `(#:jar-name "java-ops4j-base-monitors.jar"
9475 #:source-dir "ops4j-base-monitors/src/main/java"
9476 #:tests? #f)); no tests
9478 `(("lang" ,java-ops4j-base-lang)))
9479 (description "OPS4J stands for Open Participation Software for Java. This
9480 package contains utilities and extensions related to monitoring.")))
9482 (define-public java-ops4j-base-io
9484 (inherit java-ops4j-base-lang)
9485 (name "java-ops4j-base-io")
9487 `(#:jar-name "java-ops4j-base-io.jar"
9488 #:source-dir "ops4j-base-io/src/main/java"
9489 #:test-dir "ops4j-base-io/src/test"
9491 (list "**/ListerTest.java")))
9493 `(("lang" ,java-ops4j-base-monitors)
9494 ("lang" ,java-ops4j-base-lang)))
9496 `(("junit" ,java-junit)
9497 ("hamcrest" ,java-hamcrest-core)))
9498 (description "OPS4J stands for Open Participation Software for Java. This
9499 package contains utilities and extensions related to handling streams and files.")))
9501 (define-public java-ops4j-base-util
9503 (inherit java-ops4j-base-lang)
9504 (name "java-ops4j-base-util")
9506 `(#:jar-name "java-ops4j-base-util.jar"
9507 #:source-dir "ops4j-base-util/src/main/java"
9508 #:test-dir "ops4j-base-util/src/test"))
9510 `(("lang" ,java-ops4j-base-lang)))
9512 `(("junit" ,java-junit)))
9513 (description "OPS4J stands for Open Participation Software for Java. This
9514 package contains utilities and extensions related to environment, i18n and
9517 (define-public java-ops4j-base-util-property
9519 (inherit java-ops4j-base-lang)
9520 (name "java-ops4j-base-util-property")
9522 `(#:jar-name "java-ops4j-base-util-property.jar"
9523 #:source-dir "ops4j-base-util-property/src/main/java"
9524 #:tests? #f)); no tests
9526 `(("lang" ,java-ops4j-base-lang)
9527 ("util" ,java-ops4j-base-util)))
9528 (description "OPS4J stands for Open Participation Software for Java. This
9529 package contains utilities and extensions related to resolving properties from
9530 different sources.")))
9532 (define-public java-ops4j-base-store
9534 (inherit java-ops4j-base-lang)
9535 (name "java-ops4j-base-store")
9537 `(#:jar-name "java-ops4j-base-store.jar"
9538 #:source-dir "ops4j-base-store/src/main/java"
9539 #:tests? #f)); no tests
9541 `(("lang" ,java-ops4j-base-lang)
9542 ("slf4j" ,java-slf4j-api)
9543 ("io" ,java-ops4j-base-io)))
9544 (description "OPS4J stands for Open Participation Software for Java. This
9545 package contains utilities for storing and retrieving data from an
9546 @code{InputStream}.")))
9548 (define-public java-ops4j-base-spi
9550 (inherit java-ops4j-base-lang)
9551 (name "java-ops4j-base-spi")
9553 `(#:jar-name "java-ops4j-base-spi.jar"
9554 #:source-dir "ops4j-base-spi/src/main/java"
9555 #:test-dir "ops4j-base-spi/src/test"))
9557 `(("junit" ,java-junit)
9558 ("hamcrest" ,java-hamcrest-core)))
9559 (description "OPS4J stands for Open Participation Software for Java. This
9560 package contains utilities for obtaining services via the Java SE 6
9561 @code{ServiceLoader}.")))
9563 (define-public java-aqute-bnd-annotation
9565 (name "java-aqute-bnd-annotation")
9569 (uri (string-append "https://github.com/bndtools/bnd/archive/"
9570 version ".REL.tar.gz"))
9571 (file-name (string-append name "-" version ".tar.gz"))
9574 "1ggyiq0as0f6cz333a0dh98j72kmvv5pf2s47v9554yh905lfqdl"))))
9575 (build-system ant-build-system)
9577 `(#:jar-name "java-aqute-bnd-annotation.jar"
9578 #:source-dir "biz.aQute.bnd.annotation/src"
9579 #:tests? #f)); empty test dir
9580 (home-page "https://bnd.bndtools.org/")
9581 (synopsis "Tools for OSGi")
9582 (description "Bnd is a swiss army knife for OSGi, it creates manifest
9583 headers based on analyzing the class code, it verifies the project settings,
9584 it manages project dependencies, gives diffs jars, and much more.")
9585 (license license:asl2.0)))
9587 (define-public java-aqute-libg
9589 (inherit java-aqute-bnd-annotation)
9590 (name "java-aqute-libg")
9592 `(#:jar-name "java-aqute-libg.jar"
9593 ;; The build fails when source/target more recent than 1.7. This
9594 ;; is a known issue. See: https://github.com/bndtools/bnd/issues/1327
9596 ;; It is closed as won't fix. There is no way to change the source
9597 ;; so that it works on 1.8, and still works on 1.6, the upstream
9598 ;; target. It work fine on 1.7, so we use 1.7.
9599 #:make-flags (list "-Dant.build.javac.source=1.7"
9600 "-Dant.build.javac.target=1.7")
9602 (modify-phases %standard-phases
9603 (add-before 'configure 'chdir
9604 ;; Change to aQute.libg directory, so that the relative
9605 ;; paths in the tests aren't broken.
9607 (chdir "aQute.libg")
9609 (add-before 'check 'create-test-directory
9610 ;; Copy the test directory to test/java, since that's where
9611 ;; ant-build-system's default project in build.xml expects to find
9612 ;; the test classes. Leave a copy in the original place to not
9613 ;; break paths in tests.
9616 (copy-recursively "test" "src/test/java")
9619 `(("slf4j" ,java-slf4j-api)
9620 ("osgi-annot" ,java-osgi-annotation)
9621 ("java-osgi-cmpn" ,java-osgi-cmpn)
9622 ("osgi" ,java-osgi-core)))
9624 `(("hamcrest" ,java-hamcrest-core)
9625 ("java-junit" ,java-junit)))))
9627 (define-public java-aqute-bndlib
9629 (inherit java-aqute-bnd-annotation)
9630 (name "java-aqute-bndlib")
9632 `(#:jar-name "java-bndlib.jar"
9633 #:source-dir "biz.aQute.bndlib/src"
9634 #:tests? #f)); no tests
9636 `(("slf4j" ,java-slf4j-api)
9637 ("osgi-annot" ,java-osgi-annotation)
9638 ("java-aqute-libg" ,java-aqute-libg)
9639 ("java-aqute-bnd-annotation" ,java-aqute-bnd-annotation)
9640 ("java-osgi-service-component-annotations" ,java-osgi-service-component-annotations)
9641 ("java-osgi-service-repository" ,java-osgi-service-repository)
9642 ("java-osgi-service-log" ,java-osgi-service-log)
9643 ("java-osgi-service-metatype-annotations" ,java-osgi-service-metatype-annotations)
9644 ("java-osgi-namespace-contract" ,java-osgi-namespace-contract)
9645 ("java-osgi-namespace-extender" ,java-osgi-namespace-extender)
9646 ("java-osgi-namespace-service" ,java-osgi-namespace-service)
9647 ("promise" ,java-osgi-util-promise)
9648 ("osgi" ,java-osgi-core)))))
9650 (define-public java-ops4j-pax-tinybundles
9652 (name "java-ops4j-pax-tinybundles")
9656 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.tinybundles/"
9657 "archive/tinybundles-" version ".tar.gz"))
9660 "0y0gq3pvv0iir2b885lmlwnvr724vv7vklzhhr4fs27d7mdkj871"))))
9662 `(#:jar-name "java-ops4j-pax-tinybundles.jar"
9663 #:source-dir "src/main/java"
9665 ;; Abstract base classes for other tests
9666 (list "**/BndTest.java" "**/CoreTest.java")
9668 (modify-phases %standard-phases
9669 (add-before 'check 'fix-version
9671 ;; This test has a reference to an old version of bndlib we are not
9672 ;; packaging. It uses the version referenced in pom.xml. We replace
9673 ;; it with our own version.
9674 (substitute* "src/test/java/org/ops4j/pax/tinybundles/bnd/BndTest.java"
9675 (("[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*")
9676 ,(package-version java-aqute-bndlib)))
9679 `(("lang" ,java-ops4j-base-lang)
9680 ("io" ,java-ops4j-base-io)
9681 ("store" ,java-ops4j-base-store)
9682 ("slf4j" ,java-slf4j-api)
9683 ("libg" ,java-aqute-libg)
9684 ("bndlib" ,java-aqute-bndlib)))
9686 `(("junit" ,java-junit)
9687 ("hamcrest" ,java-hamcrest-core)
9688 ("log4j" ,java-log4j-api)
9689 ("bndannotation" ,java-aqute-bnd-annotation)
9690 ("framework" ,java-osgi-framework)))
9691 (build-system ant-build-system)
9692 (home-page "https://ops4j1.jira.com/wiki/spaces/ops4j/pages/12060312/Tinybundles")
9693 (synopsis "Java APIs to create OSGi related artifacts")
9694 (description "Tinybundles is all about creating OSGi related artifacts like
9695 Bundles, Fragments and Deployment Packages with Java Api. It is very convenient
9696 to create such artifacts on-the-fly inside Tests (like in Pax Exam). On the
9697 other hand, this library can be a foundation of real end user tools that need
9698 to create those artifacts.")
9699 (license license:asl2.0)))
9701 (define-public java-ops4j-pax-exam-core
9703 (name "java-ops4j-pax-exam-core")
9707 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.exam2/"
9708 "archive/exam-reactor-" version ".tar.gz"))
9711 "08mzw8nkah3rj3vznlplnawspxhp61zgvb44ifqa1rni1cvbms2g"))))
9713 `(#:jar-name "java-ops4j-pax-exam-core.jar"
9714 #:source-dir "core/pax-exam/src/main/java"
9715 #:test-dir "core/pax-exam/src/test"))
9717 `(("slf4j" ,java-slf4j-api)
9718 ("lang" ,java-ops4j-base-lang)
9719 ("io" ,java-ops4j-base-io)
9720 ("util-property" ,java-ops4j-base-util-property)
9721 ("util-store" ,java-ops4j-base-store)
9722 ("java-osgi-core" ,java-osgi-core)))
9724 `(("junit" ,java-junit)
9725 ("hamcrest" ,java-hamcrest-core)))
9726 (build-system ant-build-system)
9727 (home-page "https://ops4j1.jira.com/wiki/spaces/PAXEXAM4/overview")
9728 (synopsis "In-Container Testing for OSGi, Java EE and CDI")
9729 (description "Pax Exam creates OSGi bundles for testing purposes. It lets
9730 the user take control of the OSGi framework, the test framework (e.g. JUnit) and
9731 the system under test at the same time.")
9732 (license license:asl2.0)))
9734 (define-public java-ops4j-pax-exam-core-spi
9736 (inherit java-ops4j-pax-exam-core)
9737 (name "java-ops4j-pax-exam-core-spi")
9739 `(#:jar-name "java-ops4j-pax-exam-spi.jar"
9740 #:source-dir "src/main/java"
9743 ;; Abstract base class, not a test
9744 "**/BaseStagedReactorTest.java"
9745 ;; Depends on org.mortbay.jetty.testwars:test-war-dump
9746 "**/WarBuilderTest.java")
9748 (modify-phases %standard-phases
9749 (add-before 'configure 'chdir
9751 ;; Tests assume we are in this directory
9752 (chdir "core/pax-exam-spi")
9754 (add-before 'check 'fix-tests
9756 ;; One test checks that this file is present.
9757 (mkdir-p "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi")
9758 (with-output-to-file
9759 "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi/pom.properties"
9762 (string-append "artifactId = pax-exam-spi\n"
9763 "version = " ,(package-version java-ops4j-pax-exam-core-spi)))))
9764 ;; Maven puts compilation results in the target directory, while we
9765 ;; put them in the build directory.
9766 (substitute* '("src/test/java/org/ops4j/pax/exam/spi/war/WarBuilderTest.java"
9767 "src/test/java/org/ops4j/pax/exam/spi/war/WarTestProbeBuilderTest.java"
9768 "src/test/java/org/ops4j/pax/exam/spi/war/ZipBuilderTest.java")
9769 (("target") "build"))
9770 ;; One test is expected to fail, but it doesn't throw the expected exception
9771 (substitute* "src/test/java/org/ops4j/pax/exam/spi/reactors/BaseStagedReactorTest.java"
9772 (("AssertionError") "IllegalArgumentException"))
9775 `(("java-ops4j-pax-exam-core" ,java-ops4j-pax-exam-core)
9776 ("lang" ,java-ops4j-base-lang)
9777 ("monitors" ,java-ops4j-base-monitors)
9778 ("store" ,java-ops4j-base-store)
9779 ("io" ,java-ops4j-base-io)
9780 ("spi" ,java-ops4j-base-spi)
9781 ("osgi" ,java-osgi-core)
9782 ("slf4j" ,java-slf4j-api)
9783 ("tinybundles" ,java-ops4j-pax-tinybundles)))
9785 `(("mockito" ,java-mockito-1)
9786 ("junit" ,java-junit)
9787 ("hamcrest" ,java-hamcrest-core)
9788 ("cglib" ,java-cglib)
9789 ("objenesis" ,java-objenesis)
9790 ("asm" ,java-asm)))))
9792 (define-public java-ops4j-pax-exam-core-junit
9794 (inherit java-ops4j-pax-exam-core)
9795 (name "java-ops4j-pax-exam-core-junit")
9797 `(#:jar-name "ops4j-pax-exam-core-junit.jar"
9798 #:source-dir "drivers/pax-exam-junit4/src/main/java"
9799 #:tests? #f)); no tests
9801 `(("junit" ,java-junit)
9802 ("slf4j" ,java-slf4j-api)
9803 ("core" ,java-ops4j-pax-exam-core)
9804 ("spi" ,java-ops4j-pax-exam-core-spi)))
9805 (native-inputs '())))
9807 (define-public java-fasterxml-jackson-annotations
9809 (name "java-fasterxml-jackson-annotations")
9813 (uri (string-append "https://github.com/FasterXML/"
9814 "jackson-annotations/archive/"
9815 "jackson-annotations-" version ".tar.gz"))
9818 "0mr95xd0da6a4g95zvrl1ryk5n5zv2rc696w3xnsr5hxk2gicfc4"))))
9819 (build-system ant-build-system)
9821 `(#:jar-name "jackson-annotations.jar"
9822 #:source-dir "src/main/java"
9823 #:test-dir "src/test"))
9825 `(("junit" ,java-junit)))
9826 (home-page "https://github.com/FasterXML/jackson-annotations")
9827 (synopsis "General purpose annotations for the Jackson Data Processor")
9828 (description "This package contains general purpose annotations for the
9829 Jackson Data Processor, used on value and handler types. The only annotations
9830 not included are ones that require dependency to the Databind package.")
9831 (license license:asl2.0)))
9833 (define-public java-fasterxml-jackson-core
9835 (name "java-fasterxml-jackson-core")
9839 (uri (string-append "https://github.com/FasterXML/"
9840 "jackson-core/archive/"
9841 "jackson-core-" version ".tar.gz"))
9844 "159hsnk17jr1gyzkf01cxvsn45srnk37g949r7364qlsr527gjgd"))))
9845 (build-system ant-build-system)
9847 `(#:jar-name "jackson-core.jar"
9848 #:source-dir "src/main/java"
9849 #:test-dir "src/test"
9852 ;; Expected failure. pom.xml excludes these
9854 ;; Base classes that have no constructor for junit
9856 "**/ConcurrencyReadTest.java"
9857 "**/ManualCharAccessTest.java"
9858 "**/ManualCharAccessTest.java"
9859 "**/TrailingCommasTest.java"
9860 "**/AsyncMissingValuesInObjectTest.java"
9861 "**/AsyncMissingValuesInArrayTest.java")
9863 (modify-phases %standard-phases
9864 (add-before 'configure 'generate-PackageVersion.java
9866 (let* ((out "src/main/java/com/fasterxml/jackson/core/json/PackageVersion.java")
9867 (in (string-append out ".in")))
9870 (("@package@") "com.fasterxml.jackson.core.json")
9871 (("@projectversion@") ,version)
9872 (("@projectgroupid@") "com.fasterxml.jackson.core")
9873 (("@projectartifactid@") "jackson-core")))
9875 (add-before 'build 'copy-resources
9877 (copy-recursively "src/main/resources"
9880 (add-before 'check 'copy-test-resources
9882 (copy-recursively "src/test/resources"
9883 "build/test-classes")
9886 `(("junit" ,java-junit)
9887 ("hamcrest" ,java-hamcrest-core)))
9888 (home-page "https://github.com/FasterXML/jackson-core")
9889 (synopsis "Low-level streaming parser and generator abstractions")
9890 (description "This package contains core low-level incremental
9891 (streaming) parser and generator abstractions used by the Jackson Data
9892 Processor. It also includes the default implementation of handler types
9893 (parser, generator) that handle JSON format.")
9894 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
9896 (define-public java-fasterxml-jackson-databind
9898 (name "java-fasterxml-jackson-databind")
9902 (uri (string-append "https://github.com/FasterXML/"
9903 "jackson-databind/archive/"
9904 "jackson-databind-" version ".tar.gz"))
9907 "1zd2cw4z6kdkbx8za96xh9pyicv2a2l7y0rkcx2fqd8hv6d47s08"))))
9908 (build-system ant-build-system)
9910 `(#:jar-name "jackson-databind.jar"
9911 #:source-dir "src/main/java"
9912 #:tests? #f; requires javax.measures for which I can't find a free implementation
9914 (modify-phases %standard-phases
9915 (add-before 'configure 'generate-PackageVersion.java
9917 (let* ((out "src/main/java/com/fasterxml/jackson/databind/cfg/PackageVersion.java")
9918 (in (string-append out ".in")))
9921 (("@package@") "com.fasterxml.jackson.databind.cfg")
9922 (("@projectversion@") ,version)
9923 (("@projectgroupid@") "com.fasterxml.jackson.databind")
9924 (("@projectartifactid@") "jackson-databind")))
9926 (add-before 'build 'copy-resources
9928 (copy-recursively "src/main/resources" "build/classes")
9931 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
9932 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)))
9933 (home-page "https://github.com/FasterXML/jackson-databind")
9934 (synopsis "Data-binding functionality and tree-model for the Jackson Data Processor")
9935 (description "This package contains the general-purpose data-binding
9936 functionality and tree-model for Jackson Data Processor. It builds on core
9937 streaming parser/generator package, and uses Jackson Annotations for
9939 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
9941 (define-public java-fasterxml-jackson-modules-base-jaxb
9943 (name "java-fasterxml-jackson-modules-base-jaxb")
9947 (uri (string-append "https://github.com/FasterXML/"
9948 "jackson-modules-base/archive/"
9949 "jackson-modules-base-" version ".tar.gz"))
9952 "1wws95xi8sppp6b0k2vvjdjyynl20r1a4dwrhai08lzlria6blp5"))))
9953 (build-system ant-build-system)
9955 `(#:jar-name "jackson-modules-base-jaxb.jar"
9956 #:source-dir "jaxb/src/main/java"
9957 #:test-dir "jaxb/src/test"
9959 ;; Base class for tests
9960 (list "**/BaseJaxbTest.java")
9962 (modify-phases %standard-phases
9963 (add-before 'configure 'generate-PackageVersion.java
9965 (let* ((out (string-append "jaxb/src/main/java/com/fasterxml/"
9966 "jackson/module/jaxb/PackageVersion.java"))
9967 (in (string-append out ".in")))
9970 (("@package@") "com.fasterxml.jackson.module.jaxb")
9971 (("@projectversion@") ,version)
9972 (("@projectgroupid@") "com.fasterxml.jackson.module.jaxb")
9973 (("@projectartifactid@") "jackson-module-jaxb")))
9975 (add-before 'build 'copy-resources
9977 (copy-recursively "jaxb/src/main/resources" "build/classes")
9980 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
9981 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
9982 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)))
9984 `(("java-junit" ,java-junit)))
9985 (home-page "https://github.com/FasterXML/jackson-modules-base")
9986 (synopsis "Jaxb annotations jackson module")
9987 (description "This package is the jaxb annotations module for jackson.")
9988 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
9990 (define-public java-fasterxml-jackson-modules-base-mrbean
9992 (name "java-fasterxml-jackson-modules-base-mrbean")
9996 (uri (string-append "https://github.com/FasterXML/"
9997 "jackson-modules-base/archive/"
9998 "jackson-modules-base-" version ".tar.gz"))
10001 "1wws95xi8sppp6b0k2vvjdjyynl20r1a4dwrhai08lzlria6blp5"))))
10002 (build-system ant-build-system)
10004 `(#:jar-name "jackson-modules-base-mrbean.jar"
10005 #:source-dir "mrbean/src/main/java"
10006 #:test-dir "mrbean/src/test"
10008 ;; Base class for tests
10009 (list "**/BaseTest.java")
10011 (modify-phases %standard-phases
10012 (add-before 'configure 'generate-PackageVersion.java
10014 (let* ((out (string-append "mrbean/src/main/java/com/fasterxml/"
10015 "jackson/module/mrbean/PackageVersion.java"))
10016 (in (string-append out ".in")))
10019 (("@package@") "com.fasterxml.jackson.module.mrbean")
10020 (("@projectversion@") ,version)
10021 (("@projectgroupid@") "com.fasterxml.jackson.module.mrbean")
10022 (("@projectartifactid@") "jackson-module-mrbean")))
10025 `(("java-asm" ,java-asm)
10026 ("java-fasterxml-jackson-annotations"
10027 ,java-fasterxml-jackson-annotations)
10028 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
10029 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)))
10031 `(("java-junit" ,java-junit)))
10032 (home-page "https://github.com/FasterXML/jackson-modules-base")
10033 (synopsis "POJO type materialization for Java")
10034 (description "This package implements POJO type materialization.
10035 Databinders can construct implementation classes for Java interfaces as part
10036 of deserialization.")
10037 (license license:asl2.0)))
10039 (define-public java-snakeyaml
10041 (name "java-snakeyaml")
10045 (uri (string-append "https://bitbucket.org/asomov/snakeyaml/get/v"
10046 version ".tar.gz"))
10047 (file-name (string-append name "-" version ".tar.gz"))
10050 "0474cqcv46zgv9bhms2vgawakq1vyj0hp3h3f1bfys46msia90bh"))))
10051 (build-system ant-build-system)
10053 `(#:jar-name "java-snakeyaml.jar"
10054 #:source-dir "src/main/java"
10055 ;; Tests require velocity, a cyclic dependency, and
10056 ;; java-spring-framework-context which is not packaged.
10058 (home-page "https://bitbucket.org/asomov/snakeyaml")
10059 (synopsis "YAML processor")
10060 (description "SnakeYAML is a YAML processor for the Java Virtual Machine.")
10061 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
10063 (define-public java-fasterxml-jackson-dataformat-yaml
10065 (name "java-fasterxml-jackson-dataformat-yaml")
10069 (uri (string-append "https://github.com/FasterXML/"
10070 "jackson-dataformats-text/archive/"
10071 "jackson-dataformats-text-" version ".tar.gz"))
10074 "1hikl06khaxbg439avf442qifcadap8w0lx13f0nnhp2vh3dkbz7"))))
10075 (build-system ant-build-system)
10077 `(#:jar-name "jackson-dataformat-yaml.jar"
10078 #:source-dir "yaml/src/main/java"
10079 #:test-dir "yaml/src/test"
10080 #:test-exclude (list "**/failing/**.java")
10082 (modify-phases %standard-phases
10083 (add-before 'configure 'generate-PackageVersion.java
10085 (let* ((out "yaml/src/main/java/com/fasterxml/jackson/dataformat/yaml/PackageVersion.java")
10086 (in (string-append out ".in")))
10089 (("@package@") "com.fasterxml.jackson.dataformat.yaml")
10090 (("@projectversion@") ,version)
10091 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.yaml")
10092 (("@projectartifactid@") "jackson-dataformat-yaml")))
10095 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
10096 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
10097 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)
10098 ("java-snakeyaml" ,java-snakeyaml)))
10100 `(("junit" ,java-junit)
10101 ("hamcrest" ,java-hamcrest-core)
10102 ("java-ops4j-pax-exam-core-spi" ,java-ops4j-pax-exam-core-spi)
10103 ("java-ops4j-pax-exam-core-junit" ,java-ops4j-pax-exam-core-junit)
10104 ("java-ops4j-pax-exam" ,java-ops4j-pax-exam-core)))
10105 (home-page "https://github.com/FasterXML/jackson-dataformats-text")
10106 (synopsis "Yaml backend for Jackson")
10107 (description "Dataformat backends are used to support format alternatives
10108 to JSON, supported by default. This is done by sub-classing Jackson core
10110 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
10112 (define-public java-stax2-api
10114 (name "java-stax2-api")
10118 (uri (string-append "https://github.com/FasterXML/stax2-api/archive/"
10119 "stax2-api-" version ".tar.gz"))
10122 "1amc1si0l0hyyw2sawmnzy4hkna3z6fp195y4nm5m9wb9ld5awkq"))))
10123 (build-system ant-build-system)
10125 `(#:jar-name "java-stax2-api.jar"
10126 #:source-dir "src/main/java"
10127 #:tests? #f)); no tests
10128 (home-page "https://github.com/FasterXML/stax2-api")
10129 (synopsis "Stax2 API")
10130 (description "Stax2 API is an extension to basic Stax 1.0 API that adds
10131 significant new functionalities, such as full-featured bi-direction validation
10132 interface and high-performance Typed Access API.")
10133 (license license:bsd-2)))
10135 (define-public java-woodstox-core
10137 (name "java-woodstox-core")
10141 (uri (git-reference
10142 (url "https://github.com/FasterXML/woodstox")
10143 (commit (string-append "woodstox-core-" version))))
10144 (file-name (git-file-name name version))
10147 "0bfylk24a967hwxprxqbg6cdvm6n4ldcarp54yg980viwvjiglyp"))))
10148 (build-system ant-build-system)
10150 `(#:jar-name "woodstox.jar"
10152 (list "**/Base*.java" "failing/**")
10154 (modify-phases %standard-phases
10155 (add-before 'build 'remove-msv-dep
10157 ;; we don't need osgi, and it depends on msv
10158 (delete-file-recursively "src/main/java/com/ctc/wstx/osgi")
10159 ;; msv's latest release is from 2011 and we don't need it
10160 (delete-file-recursively "src/main/java/com/ctc/wstx/msv")
10161 (delete-file-recursively "src/test/java/wstxtest/osgi")
10162 (delete-file-recursively "src/test/java/wstxtest/msv")
10164 (add-before 'build 'copy-resources
10166 (copy-recursively "src/main/resources" "build/classes")
10169 `(("stax2" ,java-stax2-api)))
10171 `(("junit" ,java-junit)))
10172 (home-page "https://github.com/FasterXML/woodstox")
10173 (synopsis "Stax XML API implementation")
10174 (description "Woodstox is a stax XML API implementation.")
10175 (license license:asl2.0)))
10177 (define-public java-fasterxml-jackson-dataformat-xml
10179 (name "java-fasterxml-jackson-dataformat-xml")
10183 (uri (git-reference
10184 (url "https://github.com/FasterXML/jackson-dataformat-xml")
10185 (commit (string-append "jackson-dataformat-xml-" version))))
10186 (file-name (git-file-name name version))
10189 "0s1wl65mbs57c2hz2v8rnh8i04y5lpyyvnjz562j5j6b83vwwpfx"))))
10190 (build-system ant-build-system)
10192 `(#:jar-name "jackson-dataformat-xml.jar"
10193 #:source-dir "src/main/java"
10195 (list "**/failing/**")
10197 (modify-phases %standard-phases
10198 (add-before 'configure 'generate-PackageVersion.java
10200 (let* ((out "src/main/java/com/fasterxml/jackson/dataformat/xml/PackageVersion.java")
10201 (in (string-append out ".in")))
10205 (("@package@") "com.fasterxml.jackson.dataformat.xml")
10206 (("@projectversion@") ,version)
10207 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.xml")
10208 (("@projectartifactid@") "jackson-dataformat-xml")))
10210 (add-before 'build 'copy-resources
10212 (copy-recursively "src/main/resources" "build/classes")
10215 `(("jackson-annotations" ,java-fasterxml-jackson-annotations)
10216 ("jackson-core" ,java-fasterxml-jackson-core)
10217 ("jackson-modules-base-jaxb" ,java-fasterxml-jackson-modules-base-jaxb)
10218 ("jackson-databind" ,java-fasterxml-jackson-databind)
10219 ("stax2-api" ,java-stax2-api)
10220 ("woodstox" ,java-woodstox-core)))
10222 `(("junit" ,java-junit)
10223 ("hamcrest" ,java-hamcrest-core)))
10224 (home-page "https://github.com/FasterXML/jackson-dataformat-xml")
10225 (synopsis "Read and write XML")
10226 (description "This package contains Jackson extension component for reading
10227 and writing XML encoded data.
10229 Further, the goal is to emulate how JAXB data-binding works with \"Code-first\"
10230 approach (that is, no support is added for \"Schema-first\" approach). Support
10231 for JAXB annotations is provided by JAXB annotation module; this module
10232 provides low-level abstractions (@code{JsonParser}, @code{JsonGenerator},
10233 @code{JsonFactory}) as well as small number of higher level overrides needed to
10234 make data-binding work.")
10235 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
10237 (define-public java-hdrhistogram
10239 (name "java-hdrhistogram")
10243 (uri (git-reference
10244 (url "https://github.com/HdrHistogram/HdrHistogram")
10245 (commit (string-append "HdrHistogram-" version))))
10246 (file-name (git-file-name name version))
10249 "1cw8aa1vk258k42xs6wpy72m4gbai540jq032qsa7c5586iawx2d"))))
10250 (build-system ant-build-system)
10252 `(#:jar-name "java-hdrhistogram.jar"
10253 #:source-dir "src/main/java"
10255 (modify-phases %standard-phases
10256 (add-after 'unpack 'make-files-writable
10258 (for-each make-file-writable (find-files "."))
10260 (add-before 'configure 'set-version
10262 (let* ((version-java "src/main/java/org/HdrHistogram/Version.java")
10263 (template (string-append version-java ".template")))
10264 (copy-file template version-java)
10265 (substitute* version-java
10266 (("\\$VERSION\\$") ,version)
10267 (("\\$BUILD_TIME\\$") "0"))
10270 `(("junit" ,java-junit)
10271 ("hamcrest" ,java-hamcrest-core)))
10272 (home-page "https://hdrhistogram.github.io/HdrHistogram")
10273 (synopsis "High dynamic range histogram")
10274 (description "Hdrhistogram creates histograms that support
10275 recording and analyzing sampled data value counts across a configurable integer
10276 value range with configurable value precision within the range. Value precision
10277 is expressed as the number of significant digits in the value recording, and
10278 provides control over value quantization behavior across the value range and
10279 the subsequent value resolution at any given level.")
10280 (license license:public-domain)))
10282 (define-public java-cofoja
10284 (name "java-cofoja")
10288 (uri (git-reference
10289 (url "https://github.com/nhatminhle/cofoja")
10290 (commit (string-append "v" version))))
10291 (file-name (string-append "java-cofoja-" version "-checkout"))
10294 "0p7sz8y5xgpi5rx1qwn6587fkd52qr3ha3ybh14gqcyxhikl525w"))))
10295 (build-system ant-build-system)
10297 `(#:build-target "dist"
10298 #:test-target "test"
10301 (list "-Ddist.dir=dist")
10302 #:modules ((guix build ant-build-system)
10303 (guix build java-utils)
10308 (modify-phases %standard-phases
10309 ;; The bulid system ignores the class path the ant-build-system sets
10310 ;; up and instead expects to find all dependencies in the "lib"
10312 (add-after 'unpack 'create-libdir
10313 (lambda* (#:key inputs #:allow-other-keys)
10317 (let ((target (string-append "lib/" (basename file))))
10318 (unless (file-exists? target)
10319 (symlink file target))))
10320 (append-map (match-lambda
10322 (find-files dir "\\.jar$")))
10325 (replace 'install (install-jars "dist")))))
10327 `(("java-asm" ,java-asm)))
10329 `(("java-junit" ,java-junit)))
10330 (home-page "https://github.com/nhatminhle/cofoja")
10331 (synopsis "Contracts for Java")
10332 (description "Contracts for Java, or Cofoja for short, is a contract
10333 programming framework and test tool for Java, which uses annotation processing
10334 and bytecode instrumentation to provide run-time checking. (In particular,
10335 this is not a static analysis tool.)")
10336 (license license:lgpl3+)))
10338 (define-public java-aopalliance
10340 (name "java-aopalliance")
10344 ;; Note: this git repository is not official, but contains the
10345 ;; source code that is in the CVS repository. Downloading the
10346 ;; tarball from sourceforge is undeterministic, and the cvs download
10348 (uri (git-reference
10349 (url "https://github.com/hoverruan/aopalliance")
10350 (commit "0d7757ae204e5876f69431421fe9bc2a4f01e8a0")))
10351 (file-name (string-append name "-" version))
10354 "0rsg2b0v3hxlq2yk1i3m2gw3xwq689j3cwx9wbxvqfpdcjbca0qr"))))
10355 (build-system ant-build-system)
10357 `(#:jar-name "java-aopalliance.jar"
10359 #:tests? #f; no tests
10360 #:source-dir "aopalliance/src/main"
10361 #:modules ((guix build ant-build-system)
10363 (guix build maven pom)
10364 (guix build java-utils)
10367 (modify-phases %standard-phases
10368 (add-before 'install 'create-pom
10370 (with-output-to-file "pom.xml"
10374 (modelVersion "4.0.0")
10375 (name "aopalliance")
10376 (groupId "aopalliance")
10377 (artifactId "aopalliance")
10378 (version "1.0"))))))
10381 (install-from-pom "pom.xml")))))
10382 (home-page "http://aopalliance.sourceforge.net")
10383 (synopsis "Aspect-Oriented Programming")
10384 (description "The AOP Alliance project is a joint project between several
10385 software engineering people who are interested in Aspect-Oriented Programming
10387 (license license:public-domain)))
10389 (define-public java-javax-inject
10391 (name "java-javax-inject")
10395 (uri (git-reference
10396 (url "https://github.com/javax-inject/javax-inject")
10398 (file-name (git-file-name name version))
10401 "1rspl0nkvk1jif6nccikw93xic6ljj2b6kpy2mffwi2mnvc13j7x"))))
10402 (build-system ant-build-system)
10404 `(#:jar-name "java-javax-inject.jar"
10405 #:tests? #f; no tests
10407 (modify-phases %standard-phases
10409 (install-from-pom "pom.xml")))))
10410 (home-page "https://github.com/javax-inject/javax-inject")
10411 (synopsis "JSR-330: Dependency Injection for Java")
10412 (description "This package specifies a means for obtaining objects in such
10413 a way as to maximize reusability, testability and maintainability compared to
10414 traditional approaches such as constructors, factories, and service locators
10415 (e.g., JNDI). This process, known as dependency injection, is beneficial to
10416 most nontrivial applications.
10418 Many types depend on other types. For example, a @var{Stopwatch} might depend
10419 on a @var{TimeSource}. The types on which a type depends are known as its
10420 dependencies. The process of finding an instance of a dependency to use at run
10421 time is known as resolving the dependency. If no such instance can be found,
10422 the dependency is said to be unsatisfied, and the application is broken.")
10423 (license license:asl2.0)))
10425 (define-public java-guice
10427 (name "java-guice")
10431 (uri (git-reference
10432 (url "https://github.com/google/guice")
10434 (file-name (git-file-name name version))
10435 (modules '((guix build utils)))
10438 (for-each delete-file (find-files "." ".*.jar")) #t))
10441 "18im5hdfl4q1b9chww2s1ii60sn3ydyyar32a2sf2p2g8zlbdswq"))))
10442 (build-system ant-build-system)
10444 `(#:jar-name "java-guice.jar"
10446 #:tests? #f; FIXME: tests are not in a java sub directory
10447 #:source-dir "core/src"
10449 (modify-phases %standard-phases
10450 (add-after 'unpack 'make-files-writable
10452 (for-each make-file-writable (find-files "."))
10455 (install-from-pom "core/pom.xml")))))
10457 `(("java-aopalliance" ,java-aopalliance)
10458 ("java-asm" ,java-asm)
10459 ("java-cglib" ,java-cglib)
10460 ("java-guava" ,java-guava)
10461 ("java-javax-inject" ,java-javax-inject)
10462 ("java-guice-parent-pom" ,java-guice-parent-pom)))
10463 (home-page "https://github.com/google/guice")
10464 (synopsis "Lightweight dependency injection framework")
10465 (description "Guice is a lightweight dependency injection framework for
10466 Java 6 and above.")
10467 (license license:asl2.0)))
10469 (define-public java-guice-servlet
10471 (inherit java-guice)
10472 (name "java-guice-servlet")
10474 `(#:jar-name "guice-servlet.jar"
10475 #:source-dir "extensions/servlet/src/"
10477 #:tests? #f ; FIXME: not in a java subdir
10479 (modify-phases %standard-phases
10480 (add-after 'unpack 'make-files-writable
10482 (for-each make-file-writable (find-files "."))
10485 `(("guice" ,java-guice)
10486 ("servlet" ,java-classpathx-servletapi)
10487 ,@(package-inputs java-guice)))))
10489 (define java-guice-parent-pom
10491 (inherit java-guice)
10492 (name "java-guice-parent-pom")
10496 (modify-phases %standard-phases
10497 (delete 'configure)
10499 (add-after 'install 'install-extensions
10500 (install-pom-file "extensions/pom.xml"))
10502 (install-pom-file "pom.xml")))))
10504 `(("java-google-parent-pom" ,java-google-parent-pom-5)))))
10506 (define java-google-parent-pom-5
10508 (name "java-google-parent-pom")
10512 (uri (git-reference
10513 (url "https://github.com/google/google-maven-parents")
10514 (commit (string-append "google-" version))))
10515 (file-name (git-file-name name version))
10518 "0zb7hx24p8k8rfdvix2vsbfqn73jhrycdndvhf8j5gbii9wbqibv"))))
10519 (build-system ant-build-system)
10523 (modify-phases %standard-phases
10524 (delete 'configure)
10527 (install-pom-file "pom.xml")))))
10528 (home-page "https://github.com/google/google-maven-parents")
10529 (synopsis "Google parent pom")
10530 (description "This package contains the Maven parent POM for other Google
10532 (license license:asl2.0)))
10534 (define-public java-assertj
10536 (name "java-assertj")
10540 (uri (git-reference
10541 (url "https://github.com/joel-costigliola/assertj-core")
10542 (commit (string-append "assertj-core-" version))))
10543 (file-name (git-file-name name version))
10546 "1k35cg2in7pzk4pbdjryr0pll5lgk1r6ngrn0j8cdlgi7w8zh2d1"))))
10547 (build-system ant-build-system)
10549 `(#:jar-name "java-assertj.jar"
10551 #:source-dir "src/main/java"
10552 #:tests? #f)); depends on tng-junit which depends on assertj
10554 `(("cglib" ,java-cglib)
10555 ("junit" ,java-junit)
10556 ("hamcrest" ,java-hamcrest-core)))
10558 `(("mockito" ,java-mockito-1)))
10559 (home-page "https://joel-costigliola.github.io/assertj/index.html")
10560 (synopsis "Fluent assertions for java")
10561 (description "AssertJ core is a Java library that provides a fluent
10562 interface for writing assertions. Its main goal is to improve test code
10563 readability and make maintenance of tests easier.")
10564 (license license:asl2.0)))
10566 (define-public java-jboss-javassist
10568 (name "java-jboss-javassist")
10572 (uri (git-reference
10573 (url "https://github.com/jboss-javassist/javassist")
10575 (string-append "rel_"
10577 (lambda (x) (if (eq? x #\.) #\_ x)) version)
10579 (file-name (git-file-name name version))
10582 "0h3zlcyqiaq01fspm69h7vki67raw305w89p4ha8vlhpzw02qifm"))
10583 (modules '((guix build utils)))
10586 (delete-file "javassist.jar")))))
10587 (build-system ant-build-system)
10589 `(#:jar-name "java-jboss-javassist.jar"
10591 #:source-dir "src/main"
10592 #:tests? #f; FIXME: requires junit-awtui and junit-swingui from junit3
10594 (modify-phases %standard-phases
10595 (add-after 'unpack 'make-files-writable
10597 (for-each make-file-writable (find-files "."))
10600 `(("junit" ,java-junit)))
10601 (home-page "https://github.com/jboss-javassist/javassist")
10602 (synopsis "Java bytecode engineering toolkit")
10603 (description "Javassist (JAVA programming ASSISTant) makes Java bytecode
10604 manipulation simple. It is a class library for editing bytecodes in Java; it
10605 enables Java programs to define a new class at runtime and to modify a class
10606 file when the JVM loads it.")
10607 (license (list license:gpl2 license:cddl1.0)))); either gpl2 only or cddl.
10609 (define-public java-jcommander
10611 (name "java-jcommander")
10615 (uri (git-reference
10616 (url "https://github.com/cbeust/jcommander")
10618 (file-name (git-file-name name version))
10621 "12vcpc19sd7jhvjgp7xz1qjanfix162xb3x2q5zah93rjklj1h57"))))
10622 (build-system ant-build-system)
10624 `(#:jar-name "java-jcommander.jar"
10626 #:tests? #f; requires testng which depends on jcommander
10627 #:source-dir "src/main/java"))
10628 (home-page "https://jcommander.org")
10629 (synopsis "Command line parameters parser")
10630 (description "JCommander is a very small Java framework that makes it
10631 trivial to parse command line parameters. Parameters are declared with
10633 (license license:asl2.0)))
10635 (define-public java-bsh
10641 (uri (git-reference
10642 (url "https://github.com/beanshell/beanshell")
10644 (file-name (git-file-name name version))
10647 "0kz3f0xjack6c9syssi4qjw1rbd3q5963sk5pmr143hiibxa9csw"))
10648 (modules '((guix build utils)))
10651 ;; Delete bundled third-party jar archives.
10652 (for-each delete-file (find-files "." ".*.jar$"))
10653 (for-each (lambda (file) (chmod file #o644))
10654 (find-files "." "."))
10656 (build-system ant-build-system)
10658 `(#:build-target "jarall"
10659 #:test-target "junit-tests-all"
10660 #:make-flags (list "-DDATE" "(no date for reproducibility)")
10662 (modify-phases %standard-phases
10663 (add-before 'install 'fix-pom
10665 (substitute* "pom.xml"
10666 (("org.apache-extras.beanshell") "org.beanshell"))
10669 (install-from-pom "pom.xml")))))
10671 `(("java-classpathx-servletapi" ,java-classpathx-servletapi)
10672 ("java-commons-bsf" ,java-commons-bsf)))
10674 `(("java-junit" ,java-junit)
10675 ("javacc" ,javacc-3)))
10676 (home-page "http://beanshell.org/")
10677 (synopsis "Lightweight Scripting for Java")
10678 (description "BeanShell is a small, free, embeddable Java source
10679 interpreter with object scripting language features, written in Java.
10680 BeanShell dynamically executes standard Java syntax and extends it with common
10681 scripting conveniences such as loose types, commands, and method closures like
10682 those in Perl and JavaScript.")
10683 (license license:asl2.0)))
10685 (define-public java-fest-util
10687 (name "java-fest-util")
10691 (uri (git-reference
10692 (url "https://github.com/alexruiz/fest-util/")
10693 (commit (string-append "fest-util-" version))))
10694 (file-name (git-file-name name version))
10697 "02kgal7v85snyyvcsxvn4qphid455f4smh2wri1il8d9asw0djbz"))))
10698 (build-system ant-build-system)
10700 `(#:jar-name "java-fest-util.jar"
10701 #:source-dir "src/main/java"))
10703 `(("junit" ,java-junit)
10704 ("hamcrest" ,java-hamcrest-core)))
10705 (home-page "https://github.com/alexruiz/fest-util")
10706 (synopsis "FEST common utilities")
10707 (description "Common utilities used in all FEST module.")
10708 (license license:asl2.0)))
10710 (define-public java-fest-test
10712 (name "java-fest-test")
10716 (uri (git-reference
10717 (url "https://github.com/alexruiz/fest-test/")
10718 (commit (string-append "fest-test-" version))))
10719 (file-name (git-file-name name version))
10722 "0mg1d2jfh7kbx2c40dchbjr6d8pv59snsyb13mfxsr7xk5n69qbn"))))
10723 (build-system ant-build-system)
10725 `(#:jar-name "java-fest-test.jar"
10726 #:source-dir "src/main/java"
10727 #:tests? #f)); no tests
10729 `(("junit" ,java-junit)))
10730 (home-page "https://github.com/alexruiz/fest-test")
10731 (synopsis "Common FEST testing infrastructure")
10732 (description "Fest-test contains the common FEST testing infrastructure.")
10733 (license license:asl2.0)))
10735 (define-public java-fest-assert
10737 (name "java-fest-assert")
10741 (uri (git-reference
10742 (url "https://github.com/alexruiz/fest-assert-2.x/")
10743 (commit (string-append "fest-assert-core-" version))))
10744 (file-name (git-file-name name version))
10747 "1cp8zzyag3s85fz2w68sda9zzaal1y5f9wl8g72wkm12an40w6by"))))
10748 (build-system ant-build-system)
10750 `(#:jar-name "java-fest-assert.jar"
10751 #:source-dir "src/main/java"
10754 "**/Abstract*.java"
10755 "**/*BaseTest.java"
10756 ;; Unable to set MockitoNamingPolicy on cglib generator which creates FastClasses
10757 "**/MessageFormatter_format_Test.java"
10758 "**/internal/*/*_assert*_Test.java")))
10760 `(("java-fest-util" ,java-fest-util)))
10762 `(("java-junit" ,java-junit)
10763 ("java-fest-test" ,java-fest-test)
10764 ("java-hamcrest-core" ,java-hamcrest-core)
10765 ("java-mockito" ,java-mockito-1)
10766 ("java-cglib" ,java-cglib)
10767 ("java-objenesis" ,java-objenesis)
10768 ("java-asm" ,java-asm)))
10769 (home-page "https://github.com/alexruiz/fest-assert-2.x")
10770 (synopsis "FEST fluent assertions")
10771 (description "FEST-Assert provides a fluent interface for assertions.")
10772 (license license:asl2.0)))
10774 (define-public java-testng
10776 (name "java-testng")
10780 (uri (git-reference
10781 (url "https://github.com/cbeust/testng")
10783 (file-name (string-append name "-" version "-checkout"))
10786 "0y6vq30i5g276kw0v2bhbvci22ijg7ax49ap2611yqlhbs4d6dqv"))))
10787 (build-system ant-build-system)
10789 `(#:jdk ,icedtea-8; java.util.function
10790 #:jar-name "java-testng.jar"
10791 #:source-dir "src/main/java"
10793 (modify-phases %standard-phases
10794 ;; FIXME: I don't know why these tests fail
10795 (add-after 'unpack 'delete-failing-tests
10797 (substitute* "src/test/resources/testng.xml"
10798 (("<class name=\"test.configuration.github1625.TestRunnerIssue1625\"/>") "")
10799 (("<class name=\"test.serviceloader.ServiceLoaderTest\" />") ""))
10801 ;; We don't have groovy
10802 (add-after 'unpack 'delete-groovy-tests
10804 (delete-file-recursively "src/test/java/test/dependent/issue1648/")
10805 (substitute* "src/test/resources/testng.xml"
10806 (("<class name=\"test.dependent.issue1648.TestRunner\"/>") ""))
10808 (add-before 'build 'copy-resources
10810 (copy-recursively "src/main/resources" "build/classes")
10812 (add-before 'check 'copy-test-resources
10814 (copy-recursively "src/test/resources" "build/test-classes")
10818 (invoke "ant" "compile-tests")
10819 ;; we don't have groovy
10820 (substitute* "src/test/resources/testng.xml"
10821 (("<class name=\"test.groovy.GroovyTest\" />") ""))
10822 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
10824 ":build/test-classes")
10825 "-Dtest.resources.dir=src/test/resources"
10826 "org.testng.TestNG" "src/test/resources/testng.xml"))))))
10828 `(("junit" ,java-junit)
10829 ("java-jsr305" ,java-jsr305)
10830 ("java-bsh" ,java-bsh)
10831 ("java-jcommander" ,java-jcommander)
10832 ("java-guice" ,java-guice)
10833 ("snakeyaml" ,java-snakeyaml)))
10835 `(("guava" ,java-guava)
10836 ("java-javax-inject" ,java-javax-inject)
10837 ("java-hamcrest" ,java-hamcrest-all)
10838 ("java-assertj" ,java-assertj)
10839 ("java-mockito" ,java-mockito-1)
10840 ("cglib" ,java-cglib)
10842 ("aopalliance" ,java-aopalliance)))
10843 (home-page "https://testng.org")
10844 (synopsis "Testing framework")
10845 (description "TestNG is a testing framework inspired from JUnit and NUnit
10846 but introducing some new functionalities that make it more powerful and easier
10848 (license license:asl2.0)))
10850 (define-public java-jnacl
10851 (let ((commit "094e819afdd63ea81a499b3bcb42a271006bebd9")
10854 (name "java-jnacl")
10855 (version (string-append "0.1.0-" revision "." (string-take commit 7)))
10858 (uri (git-reference
10859 (url "https://github.com/neilalexander/jnacl")
10861 (file-name (git-file-name name version))
10864 "1d6g6xhn83byv5943n7935wwjsk0ibk0qdvqgr699qqgqqmwisbb"))))
10865 (build-system ant-build-system)
10867 `(#:jar-name "jnacl.jar"
10868 #:source-dir "src/main/java"
10871 (modify-phases %standard-phases
10872 (add-before 'build 'fix-tests
10874 (substitute* '("src/test/java/com/neilalexander/jnacl/NaClTest.java"
10875 "src/test/java/com/neilalexander/jnacl/NaclSecretBoxTest.java")
10876 (("assertions.Assertions") "assertions.api.Assertions"))
10880 (invoke "ant" "compile-tests")
10881 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
10883 ":build/test-classes")
10884 "org.testng.TestNG" "-testclass"
10885 "build/test-classes/com/neilalexander/jnacl/NaclSecretBoxTest.class")
10886 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
10888 ":build/test-classes")
10889 "org.testng.TestNG" "-testclass"
10890 "build/test-classes/com/neilalexander/jnacl/NaClTest.class"))))))
10892 `(("java-testng" ,java-testng)
10893 ("java-fest-util" ,java-fest-util)
10894 ("java-fest-assert" ,java-fest-assert)))
10895 (home-page "https://github.com/neilalexander/jnacl")
10896 (synopsis "Java implementation of NaCl")
10897 (description "Pure Java implementation of the NaCl: Networking and
10898 Cryptography library.")
10899 (license license:bsd-2))))
10901 (define-public java-mvel2
10903 (name "java-mvel2")
10907 (uri (string-append "https://github.com/mvel/mvel/archive/mvel2-"
10908 version ".Final.tar.gz"))
10911 "01ph5s9gm16l2qz58lg21w6fna7xmmrj7f9bzqr1jim7h9557d3z"))))
10912 (build-system ant-build-system)
10914 `(#:jar-name "mvel2.jar"
10915 #:source-dir "src/main/java"
10917 (list "**/Abstract*.java"
10918 ;; Base class with no tests
10919 "**/MVELThreadTest.java")
10921 (modify-phases %standard-phases
10922 (add-after 'install 'install-bin
10923 (lambda* (#:key outputs #:allow-other-keys)
10924 (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
10926 (with-output-to-file (string-append bin "/mvel2")
10930 "#!" (which "bash") "\n"
10931 "if [ \"$#\" -ne \"2\" ]; then\n"
10932 "echo 'Usage: mvel2 <script> <out.dir>'\n"
10935 "java -Dout.dir=$2 -cp " (getenv "CLASSPATH")
10936 ":" (assoc-ref outputs "out") "/share/java/mvel2.jar"
10937 " org.mvel2.sh.Main $1"))))
10938 (chmod (string-append bin "/mvel2") #o755))
10941 `(("junit" ,java-junit)
10942 ("hamcrest" ,java-hamcrest-core)))
10943 (home-page "https://github.com/mvel/mvel")
10944 (synopsis "MVFLEX Expression Language")
10945 (description "MVEL has largely been inspired by Java syntax, but has some
10946 fundamental differences aimed at making it more efficient as an expression
10947 language, such as operators that directly support collection, array and string
10948 matching, as well as regular expressions. MVEL is used to evaluate expressions
10949 written using Java syntax.
10951 In addition to the expression language, MVEL serves as a templating language for
10952 configuration and string construction.")
10953 (license license:asl2.0)))
10955 (define-public java-commons-jexl-2
10957 (name "java-commons-jexl")
10961 (uri (string-append "mirror://apache/commons/jexl/source/"
10962 "commons-jexl-" version "-src.tar.gz"))
10965 "1ai7632bwwaxglb0nbpblpr2jw5g20afrsaq372ipkphi3ncy1jz"))))
10966 (build-system ant-build-system)
10968 `(#:jar-name "commons-jexl-2.jar"
10970 #:source-dir "src/main/java"
10972 (modify-phases %standard-phases
10973 (add-before 'check 'disable-broken-tests
10974 (lambda* (#:key inputs #:allow-other-keys)
10975 (with-directory-excursion "src/test/java/org/apache/commons/jexl2/"
10976 (substitute* "ArithmeticTest.java"
10977 (("asserter.assertExpression\\(\"3 / 0\"") "//")
10978 (("asserter.assertExpression\\(\"imanull") "//"))
10979 ;; This test fails with "ambiguous method invocation"
10980 (delete-file "CacheTest.java")
10981 ;; This test doesn't have access to the temp directory
10982 (substitute* "ClassCreatorTest.java"
10983 (("java.io.tmpdir") "user.dir"))
10984 ;; This test fails in trying to detect whether it can run.
10985 (substitute* "ClassCreator.java"
10986 (("boolean canRun =.*") "boolean canRun = false;\n"))
10987 ;; ...and these tests depend on it.
10988 (delete-file "scripting/JexlScriptEngineOptionalTest.java")
10989 (delete-file "scripting/JexlScriptEngineTest.java"))
10991 (add-before 'build 'run-javacc
10993 (with-directory-excursion "src/main/java/org/apache/commons/jexl2/parser/"
10994 (invoke "java" "jjtree" "Parser.jjt")
10995 (invoke "java" "javacc" "Parser.jj"))
10998 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)))
11000 `(("java-junit" ,java-junit)
11001 ("java-hamcrest-core" ,java-hamcrest-core)
11002 ("javacc" ,javacc-4)))
11003 (home-page "https://commons.apache.org/proper/commons-jexl/")
11004 (synopsis "Java Expression Language ")
11005 (description "JEXL is a library intended to facilitate the implementation
11006 of dynamic and scripting features in applications and frameworks written in
11007 Java. JEXL implements an Expression Language based on some extensions to the
11008 JSTL Expression Language supporting most of the constructs seen in
11009 shell-script or ECMAScript. Its goal is to expose scripting features usable
11010 by technical operatives or consultants working with enterprise platforms.")
11011 (license license:asl2.0)))
11013 (define-public java-lz4
11019 (uri (git-reference
11020 (url "https://github.com/lz4/lz4-java")
11022 (file-name (git-file-name name version))
11025 "0ydjakhv3cz34mfvv14qrh2ksdxifgjwwagjy7r46qr3f68hnf6y"))))
11026 (build-system ant-build-system)
11028 `(#:jar-name "lz4.jar"
11030 #:source-dir "src/java:src/java-unsafe"
11031 #:tests? #f; FIXME: requires more dependencies
11033 (modify-phases %standard-phases
11034 (add-after 'unpack 'make-files-writable
11036 (for-each make-file-writable (find-files "."))
11038 (add-before 'configure 'generate-source
11040 (with-directory-excursion "src/build/source_templates"
11041 (invoke "mvel2" "../gen_sources.mvel" "../../java"))
11044 `(("mvel" ,java-mvel2)))
11045 (home-page "https://jpountz.github.io/lz4-java")
11046 (synopsis "Compression algorithm")
11047 (description "LZ4 - Java is a Java port of the popular lz4 compression
11048 algorithms and xxHash hashing algorithm.")
11049 (license license:asl2.0)))
11051 (define-public java-bouncycastle
11053 (name "java-bouncycastle")
11057 (uri (git-reference
11058 (url "http://git.bouncycastle.org/repositories/bc-java")
11059 ;(url "https://github.com/bcgit/bc-java")
11060 (commit (string-append "r1rv" (substring version 2 4)))))
11061 (file-name (git-file-name name version))
11064 "1449q7fyh03s1q0bqljcrhgacwcyqmg2bbvb3z084avgapwsainz"))
11065 (modules '((guix build utils)))
11068 (for-each delete-file
11069 (find-files "." "\\.jar$"))
11071 (build-system ant-build-system)
11076 (modify-phases %standard-phases
11079 (invoke "ant" "-f" "ant/jdk15+.xml" "build-provider")
11080 (invoke "ant" "-f" "ant/jdk15+.xml" "build")))
11081 ;; FIXME: the tests freeze.
11084 ;; (invoke "ant" "-f" "ant/jdk15+.xml" "test")))
11086 (install-jars "build/artifacts/jdk1.5/jars")))))
11088 `(("java-javax-mail" ,java-javax-mail)))
11091 ("junit" ,java-junit)
11092 ("java-native-access" ,java-native-access)
11093 ("java-native-access-platform" ,java-native-access-platform)))
11094 (home-page "https://www.bouncycastle.org")
11095 (synopsis "Cryptographic library")
11096 (description "Bouncy Castle is a cryptographic library for the Java
11097 programming language.")
11098 (license license:expat)))
11100 (define-public java-lmax-disruptor
11102 (name "java-lmax-disruptor")
11106 (uri (string-append "https://github.com/LMAX-Exchange/disruptor/"
11107 "archive/" version ".tar.gz"))
11108 (file-name (string-append name "-" version ".tar.gz"))
11111 "17da2gwj5abnlsfgn2xqjk5lgzbg4vkb0hdv2dvc8r2fx4bi7w3g"))))
11112 (build-system ant-build-system)
11114 `(#:jar-name "java-lmax-disruptor.jar"
11116 #:tests? #f)); tests hang
11118 `(("junit" ,java-junit)
11119 ("java-hdrhistogram" ,java-hdrhistogram)
11120 ("java-jmock" ,java-jmock)
11121 ("java-jmock-legacy" ,java-jmock-legacy)
11122 ("java-jmock-junit4" ,java-jmock-junit4)
11123 ("java-hamcrest-all" ,java-hamcrest-all)))
11125 `(("cglib" ,java-cglib)
11126 ("objenesis" ,java-objenesis)
11127 ("asm" ,java-asm)))
11128 (home-page "https://www.lmax.com/disruptor")
11129 (synopsis "High performance inter-thread communication")
11130 (description "LMAX Disruptor is a software pattern and software component
11131 for high performance inter-thread communication that avoids the need for
11132 message queues or resource locking.")
11133 (license license:asl2.0)))
11135 (define-public java-commons-bcel
11137 (name "java-commons-bcel")
11141 (uri (string-append "mirror://apache/commons/bcel/source/bcel-"
11142 version "-src.tar.gz"))
11145 "0j3x1rxd673k07psclk8k13rqh0x0mf2yy5qiwkiw4z3afa568jy"))))
11146 (build-system ant-build-system)
11148 `(#:jar-name "bcel.jar"
11150 #:source-dir "src/main/java"
11151 #:test-dir "src/test/java"
11152 ;; FIXME: Tests require the unpackaged jna.
11154 (home-page "https://commons.apache.org/proper/commons-bcel/")
11155 (synopsis "Byte code engineering library")
11156 (description "The Byte Code Engineering Library (Apache Commons BCEL) is
11157 intended to give users a convenient way to analyze, create, and
11158 manipulate (binary) Java class files. Classes are represented by objects
11159 which contain all the symbolic information of the given class: methods, fields
11160 and byte code instructions, in particular.
11162 Such objects can be read from an existing file, be transformed by a
11163 program (e.g. a class loader at run-time) and written to a file again. An
11164 even more interesting application is the creation of classes from scratch at
11165 run-time. The @dfn{Byte Code Engineering Library} (BCEL) may be also useful
11166 if you want to learn about the @dfn{Java Virtual Machine} (JVM) and the format
11167 of Java @code{.class} files.")
11168 (license license:asl2.0)))
11170 (define-public java-xerial-core
11172 (name "java-xerial-core")
11176 (uri (string-append "https://github.com/xerial/xerial-java/archive/"
11177 version ".tar.gz"))
11178 (file-name (string-append name "-" version ".tar.gz"))
11181 "0d3g863i41bgalpa4xr3vm1h140l091n8iwgq5qvby5yivns9y8d"))))
11182 (build-system ant-build-system)
11184 `(#:jar-name "xerial-core.jar"
11185 #:source-dir "xerial-core/src/main/java"
11186 #:test-dir "xerial-core/src/test"
11188 (modify-phases %standard-phases
11189 (add-before 'build 'copy-resources
11191 (copy-recursively "xerial-core/src/main/resources"
11195 `(("junit" ,java-junit)
11196 ("hamcrest" ,java-hamcrest-core)))
11197 (home-page "https://github.com/xerial/xerial-java")
11198 (synopsis "Data management libraries for Java")
11199 (description "Xerial is a set of data management libraries for the Java
11200 programming language. The ultimate goal of the Xerial project is to manage
11201 everything as database, including class objects, text format data, data
11203 (license license:asl2.0)))
11205 (define-public java-powermock-reflect
11207 (name "java-powermock-reflect")
11211 (uri (string-append "https://github.com/powermock/powermock/"
11212 "archive/powermock-" version ".tar.gz"))
11213 (file-name (string-append name "-" version ".tar.gz"))
11216 "0sbgi5vqq7k72wzcdjb20s370vyd4hsbnx71pzb8ishml3gy7fwy"))
11218 (search-patches "java-powermock-fix-java-files.patch"))))
11219 (build-system ant-build-system)
11221 `(#:jar-name "java-powermock-reflect.jar"
11223 #:source-dir "powermock-reflect/src/main/java"
11224 #:test-dir "powermock-reflect/src/test"))
11226 `(("java-objenesis" ,java-objenesis)))
11228 `(("junit" ,java-junit)
11229 ("cglib" ,java-cglib)
11231 ("hamcrest" ,java-hamcrest-core)
11232 ("assertj" ,java-assertj)))
11233 (home-page "https://github.com/powermock/powermock")
11234 (synopsis "Mock library extension framework")
11235 (description "PowerMock is a framework that extends other mock libraries
11236 such as EasyMock with more powerful capabilities. PowerMock uses a custom
11237 classloader and bytecode manipulation to enable mocking of static methods,
11238 constructors, final classes and methods, private methods, removal of static
11239 initializers and more. By using a custom classloader no changes need to be
11240 done to the IDE or continuous integration servers which simplifies adoption.")
11241 (license license:asl2.0)))
11243 (define-public java-powermock-core
11245 (inherit java-powermock-reflect)
11246 (name "java-powermock-core")
11248 `(#:jar-name "java-powermock-core.jar"
11249 #:source-dir "powermock-core/src/main/java"
11250 #:test-dir "powermock-core/src/test"
11251 #:tests? #f; requires powermock-api
11254 (modify-phases %standard-phases
11255 (add-before 'build 'copy-resources
11257 (copy-recursively "powermock-core/src/main/resources"
11261 `(("reflect" ,java-powermock-reflect)
11262 ("javassist" ,java-jboss-javassist)))
11264 `(("junit" ,java-junit)
11265 ("assertj" ,java-assertj)
11266 ("mockito" ,java-mockito-1)))))
11268 (define-public java-powermock-api-support
11270 (inherit java-powermock-reflect)
11271 (name "java-powermock-api-support")
11272 (build-system ant-build-system)
11274 `(#:jar-name "java-powermock-api-support.jar"
11276 #:source-dir "powermock-api/powermock-api-support/src/main/java"
11277 #:tests? #f)); no tests
11279 `(("core" ,java-powermock-core)
11280 ("reflect" ,java-powermock-reflect)))))
11282 (define-public java-powermock-modules-junit4-common
11284 (inherit java-powermock-reflect)
11285 (name "java-powermock-modules-junit4-common")
11286 (build-system ant-build-system)
11288 `(#:jar-name "java-powermock-modules-junit4-common.jar"
11290 #:source-dir "powermock-modules/powermock-module-junit4-common/src/main/java"
11291 #:test-dir "powermock-modules/powermock-module-junit4-common/src/test"))
11293 `(("core" ,java-powermock-core)
11294 ("easymock" ,java-easymock)
11295 ("reflect" ,java-powermock-reflect)
11296 ("hamcrest" ,java-hamcrest-core)
11297 ("cglib" ,java-cglib)))))
11299 (define-public java-powermock-modules-junit4
11301 (inherit java-powermock-reflect)
11302 (name "java-powermock-modules-junit4")
11303 (build-system ant-build-system)
11305 `(#:jar-name "java-powermock-modules-junit4.jar"
11307 #:source-dir "powermock-modules/powermock-module-junit4/src/main/java"
11308 #:test-dir "powermock-modules/powermock-module-junit4/src/test"
11310 (modify-phases %standard-phases
11311 (add-before 'build 'fix-junit-detection
11313 ;; Our junit version is 4.12-SNAPSHOT
11314 (substitute* (find-files "powermock-modules/powermock-module-junit4"
11315 "PowerMockJUnit4MethodValidator.java")
11316 (("4.12") "4.12-SNAPSHOT"))
11319 `(("core" ,java-powermock-core)
11320 ("reflect" ,java-powermock-reflect)
11321 ("common" ,java-powermock-modules-junit4-common)
11322 ("cglib" ,java-cglib)))
11324 `(("easymock" ,java-easymock)
11325 ("hamcrest" ,java-hamcrest-core)
11326 ("objenesis" ,java-objenesis)
11328 ("junit" ,java-junit)))))
11330 (define-public java-powermock-api-easymock
11332 (inherit java-powermock-reflect)
11333 (name "java-powermock-api-easymock")
11334 (build-system ant-build-system)
11336 `(#:jar-name "java-powermock-api-easymock.jar"
11338 #:source-dir "powermock-api/powermock-api-easymock/src/main/java"
11339 #:tests? #f; no tests
11341 (modify-phases %standard-phases
11342 (add-before 'build 'fix-file
11344 ;; FIXME: This looks wrong, but it fixes a build error.
11345 (with-directory-excursion "powermock-api/powermock-api-easymock"
11346 (substitute* "src/main/java/org/powermock/api/easymock/PowerMock.java"
11347 (("classLoader instanceof MockClassLoader") "false")
11348 (("\\(\\(MockClassLoader\\) classLoader\\).*;") ";")))
11351 `(("core" ,java-powermock-core)
11352 ("easymock" ,java-easymock)
11353 ("reflect" ,java-powermock-reflect)
11354 ("support" ,java-powermock-api-support)
11355 ("cglib" ,java-cglib)))))
11357 (define-public java-jboss-jms-api-spec
11359 (name "java-jboss-jms-api-spec")
11363 (uri (string-append "https://github.com/jboss/jboss-jms-api_spec/"
11364 "archive/jboss-jms-api_" version
11365 "_spec-1.0.1.Final.tar.gz"))
11368 "07bqblw9kq2i8q92bz70fvavq5xjfkaixl8xa0m0cypjgy82rb7m"))))
11369 (build-system ant-build-system)
11371 `(#:jar-name "java-jboss-jms-api_spec.jar"
11374 #:tests? #f)); no tests
11375 (home-page "https://github.com/jboss/jboss-jms-api_spec")
11376 (synopsis "Java Message Service API specification")
11377 (description "Java Message Service (JMS) API is used to send messages
11378 messages between two or more clients. It is a messaging standard that allows
11379 application components to create, send, receive, and read messages.")
11380 ; either gpl2 only with GPL Classpath Exception, or cddl.
11381 (license (list license:gpl2 license:cddl1.0))))
11383 (define-public java-mail
11389 (uri (string-append "https://github.com/javaee/javamail/archive/"
11390 "JAVAMAIL-1_6_0.tar.gz"))
11393 "1b4rg7fpj50ld90a71iz2m4gm3f5cnw18p3q3rbrrryjip46kx92"))))
11394 (build-system ant-build-system)
11396 `(#:jar-name "java-mail.jar"
11398 #:source-dir "mail/src/main/java"
11399 #:test-dir "mail/src/test"
11401 (list "**/CollectorFormatterTest.java"
11402 "**/CompactFormatterTest.java"
11403 "**/DurationFilterTest.java"
11404 "**/MailHandlerTest.java"
11405 "**/GetLocalAddressTest.java"
11406 ;; FIXME: both end with:
11407 ;; java.lang.ClassNotFoundException:
11408 ;; javax.mail.internet.MimeMultipartParseTest
11409 "**/MimeMultipartParseTest.java"
11410 "**/SearchTermSerializationTest.java")
11412 (modify-phases %standard-phases
11413 (add-before 'configure 'move-version.java
11415 (copy-file "mail/src/main/resources/javax/mail/Version.java"
11416 "mail/src/main/java/javax/mail/Version.java")
11418 (add-before 'build 'copy-resources
11420 (copy-recursively "mail/src/main/resources/META-INF"
11421 "build/classes/META-INF")
11424 `(("junit" ,java-junit)
11425 ("hamcrest" ,java-hamcrest-core)))
11426 (home-page "https://javaee.github.io/javamail/")
11427 (synopsis "Mail-related functionality in Java")
11428 (description "The JavaMail API provides a platform-independent and
11429 protocol-independent framework to build mail and messaging applications.")
11430 ;; General Public License Version 2 only ("GPL") or the Common Development
11431 ;; and Distribution License("CDDL")
11432 (license (list license:cddl1.1
11433 license:gpl2)))); with classpath exception
11435 (define-public java-jeromq
11437 (name "java-jeromq")
11441 (uri (git-reference
11442 (url "https://github.com/zeromq/jeromq")
11443 (commit (string-append "v" version))))
11444 (file-name (string-append name "-" version "-checkout"))
11447 "1gxkp7lv2ahymgrqdw94ncq54bmp4m4sw5m1x9gkp7l5bxn0xsyj"))
11448 (patches (search-patches "java-jeromq-fix-tests.patch"))))
11449 (build-system ant-build-system)
11451 `(#:jar-name "java-jeromq.jar"
11452 #:source-dir "src/main/java"
11456 "**/Abstract*.java"
11457 ;; Requires network
11458 "**/ZBeaconTest.java"
11460 "**/DealerSpecTest.java"
11461 "**/CustomDecoderTest.java"
11462 "**/CustomEncoderTest.java"
11463 "**/ConnectRidTest.java"
11464 "**/ReqSpecTest.java"
11465 "**/PushPullSpecTest.java"
11466 "**/PubSubHwmTest.java"
11467 "**/RouterSpecTest.java"
11468 "**/ProxyTest.java")))
11470 `(("java-jnacl" ,java-jnacl)))
11472 `(("java-hamcrest-core" ,java-hamcrest-core)
11473 ("junit" ,java-junit)))
11474 (home-page "http://zeromq.org/bindings:java")
11475 (synopsis "Java binding for 0MQ")
11476 (description "Jeromq provides the java bindings for 0MQ.")
11477 (license license:mpl2.0)))
11479 (define-public java-kafka-clients
11481 (name "java-kafka-clients")
11485 (uri (string-append "mirror://apache/kafka/" version "/kafka-"
11486 version "-src.tgz"))
11489 "1yxmnsmliwm7671q5yy9bl4jdqyyn00n26cggz9brwczx80w1vfq"))))
11490 (build-system ant-build-system)
11492 `(#:jar-name "java-kafka-clients.jar"
11494 #:source-dir "clients/src/main/java"
11495 #:test-dir "clients/src/test"
11498 ;; This file does not contain a class
11499 "**/IntegrationTest.java"
11500 ;; Requires network
11501 "**/ClientUtilsTest.java"
11502 ;; End with errors that seem related to our powermock
11503 "**/KafkaProducerTest.java"
11504 "**/BufferPoolTest.java")))
11506 `(("java-slf4j-api" ,java-slf4j-api)
11507 ("java-lz4" ,java-lz4)))
11509 `(("junit" ,java-junit)
11510 ("hamcrest" ,java-hamcrest-all)
11511 ("objenesis" ,java-objenesis)
11513 ("cglib" ,java-cglib)
11514 ("javassist" ,java-jboss-javassist)
11515 ("snappy" ,java-snappy)
11516 ("easymock" ,java-easymock)
11517 ("powermock" ,java-powermock-core)
11518 ("powermock-easymock" ,java-powermock-api-easymock)
11519 ("powermock-junit4-common" ,java-powermock-modules-junit4-common)
11520 ("powermock-junit4" ,java-powermock-modules-junit4)
11521 ("powermock-support" ,java-powermock-api-support)
11522 ("java-bouncycastle" ,java-bouncycastle)))
11523 (home-page "https://kafka.apache.org")
11524 (synopsis "Distributed streaming platform")
11525 (description "Kafka is a distributed streaming platform, which means:
11527 @item it can publish and subscribe to streams of records;
11528 @item it can store streams of records in a fault-tolerant way;
11529 @item it can process streams of records as they occur.
11531 ;; Either cddl or gpl2 only.
11532 (license (list license:cddl1.1; actually cddl1.1
11533 license:gpl2)))); with classpath exception
11535 (define-public java-jdom
11541 (uri (string-append "http://jdom.org/dist/binary/archive/jdom-"
11542 version ".tar.gz"))
11545 "07wdpm3jwwc9q38kmdw40fvbmv6jzjrkrf8m0zqs58f79a672wfl"))))
11546 (build-system ant-build-system)
11548 `(#:build-target "package"
11549 #:tests? #f; tests are run as part of the build process
11551 (modify-phases %standard-phases
11553 (install-jars "build")))))
11554 (home-page "http://jdom.org/")
11555 (synopsis "Access, manipulate, and output XML data")
11556 (description "Java-based solution for accessing, manipulating, and
11557 outputting XML data from Java code.")
11558 (license license:bsd-4)))
11560 (define-public java-geronimo-xbean-reflect
11562 (name "java-geronimo-xbean-reflect")
11566 (uri (svn-reference
11567 (url "https://svn.apache.org/repos/asf/geronimo/xbean/tags/xbean-4.5/")
11568 (revision 1807396)))
11569 (file-name (string-append name "-" version))
11572 "18q3i6jgm6rkw8aysfgihgywrdc5nvijrwnslmi3ww497jvri6ja"))))
11573 (build-system ant-build-system)
11575 `(#:jar-name "geronimo-xbean-reflect.jar"
11576 #:source-dir "xbean-reflect/src/main/java"
11577 #:test-dir "xbean-reflect/src/test"
11580 (list "**/Abstract*.java" "**/AsmParameterNameLoaderTest.java"
11581 "**/ObjectRecipeTest.java" "**/ParameterNameLoaderTest.java"
11582 "**/RecipeHelperTest.java" "**/XbeanAsmParameterNameLoaderTest.java")
11584 (modify-phases %standard-phases
11585 (add-before 'build 'fix-source
11587 (let ((dir "xbean-reflect/src/main/java/org/apache/xbean/recipe/"))
11588 ;; org.apache.xbean.asm6 is actually repackaged java-asm
11589 (substitute* (string-append dir "XbeanAsmParameterNameLoader.java")
11590 (("org.apache.xbean.asm5") "org.objectweb.asm"))
11592 (replace 'install (install-from-pom "xbean-reflect/pom.xml")))))
11594 `(("asm" ,java-asm)
11595 ("log4j" ,java-log4j-api)
11596 ("log4j-1.2" ,java-log4j-1.2-api)
11597 ("log4j-core" ,java-log4j-core)
11598 ("logging" ,java-commons-logging-minimal)))
11600 `(("java-geronimo-parent-pom" ,java-geronimo-parent-pom)))
11602 `(("junit" ,java-junit)))
11603 (home-page "https://geronimo.apache.org/maven/xbean/3.6/xbean-reflect/")
11604 (synopsis "Dependency injection helper")
11605 (description "Xbean-reflect provides very flexible ways to create objects
11606 and graphs of objects for dependency injection frameworks")
11607 (license license:asl2.0)))
11609 (define java-geronimo-genesis-2.1
11611 (name "java-geronimo-genesis")
11615 (uri (svn-reference
11616 (url (string-append "https://svn.apache.org/repos/asf/"
11617 "geronimo/genesis/tags/genesis-"
11619 (revision 1807396)))
11620 (file-name (string-append name "-" version "-source"))
11623 "119yn795jvnjf52si84q192s8wag1k013iabg78b7wnadssnnh31"))))
11624 (build-system ant-build-system)
11628 (modify-phases %standard-phases
11629 (delete 'configure)
11632 (install-pom-file "pom.xml"))
11633 (add-after 'install 'install-enforcer-rules
11634 (install-pom-file "genesis-enforcer-rules/pom.xml"))
11635 (add-after 'install 'install-flava
11636 (install-pom-file "genesis-default-flava/pom.xml"))
11637 (add-after 'install 'install-packaging
11638 (install-pom-file "genesis-packaging/pom.xml"))
11639 (add-after 'install-flava 'install-flava-java4
11640 (install-pom-file "genesis-default-flava/genesis-java1.4-flava/pom.xml"))
11641 (add-after 'install-flava 'install-flava-java5
11642 (install-pom-file "genesis-default-flava/genesis-java5-flava/pom.xml"))
11643 (add-after 'install-flava 'install-flava-java6
11644 (install-pom-file "genesis-default-flava/genesis-java6-flava/pom.xml")))))
11646 `(("apache-parent-pom" ,apache-parent-pom-13)))
11647 (home-page "https://geronimo.apache.org")
11648 (synopsis "Collection of maven POM files for the Geronimo project")
11649 (description "Apache Geronimo is a server runtime. This package contains
11650 only pom files used by other components in the Geronimo project.")
11651 (license license:asl2.0)))
11653 (define java-geronimo-parent-pom
11655 (inherit java-geronimo-xbean-reflect)
11656 (name "java-geronimo-parent-pom")
11660 (modify-phases %standard-phases
11661 (delete 'configure)
11664 (install-pom-file "pom.xml")))))
11666 `(("java-geronimo-genesis" ,java-geronimo-genesis-2.1)))))
11668 (define-public java-geronimo-xbean-bundleutils
11670 (inherit java-geronimo-xbean-reflect)
11671 (name "java-geronimo-xbean-bundleutils")
11673 `(#:jar-name "geronimo-xbean-bundleutils.jar"
11674 #:source-dir "xbean-bundleutils/src/main/java"
11675 #:test-dir "xbean-bundleutils/src/test"
11677 (modify-phases %standard-phases
11678 (add-before 'build 'fix-java
11680 ;; We use a more recent version of osgi, so this file requires
11681 ;; more interface method implementations.
11682 (substitute* "xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/DelegatingBundleContext.java"
11683 (("import org.osgi.framework.ServiceRegistration;")
11684 "import org.osgi.framework.ServiceRegistration;
11685 import org.osgi.framework.ServiceFactory;
11686 import java.util.Collection;
11687 import org.osgi.framework.ServiceObjects;")
11688 (("public Bundle getBundle\\(\\)")
11690 public <S> ServiceObjects<S> getServiceObjects(ServiceReference<S> reference) {
11691 throw new UnsupportedOperationException();
11694 public <S> ServiceRegistration<S> registerService(Class<S> clazz,
11695 ServiceFactory<S> factory, Dictionary<String, ?> properties) {
11696 throw new UnsupportedOperationException();
11698 public Bundle getBundle()"))
11701 `(("java-slf4j" ,java-slf4j-api)
11702 ("java-asm" ,java-asm)
11703 ("java-osgi-framework" ,java-osgi-framework)
11704 ("java-eclipse-osgi" ,java-eclipse-osgi)
11705 ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin)))))
11707 (define-public java-geronimo-xbean-asm-util
11709 (inherit java-geronimo-xbean-reflect)
11710 (name "java-geronimo-xbean-asm-util")
11712 `(#:jar-name "geronimo-xbean-asm-util.jar"
11713 #:source-dir "xbean-asm-util/src/main/java"
11714 #:tests? #f)); no tests
11716 `(("java-asm" ,java-asm)))
11717 (native-inputs '())))
11719 (define-public java-geronimo-xbean-finder
11721 (inherit java-geronimo-xbean-reflect)
11722 (name "java-geronimo-xbean-finder")
11724 `(#:jar-name "geronimo-xbean-finder.jar"
11725 #:source-dir "xbean-finder/src/main/java"
11726 #:test-dir "xbean-finder/src/test"))
11728 `(("java-slf4j-api" ,java-slf4j-api)
11729 ("java-asm" ,java-asm)
11730 ("java-geronimo-xbean-bundleutils" ,java-geronimo-xbean-bundleutils)
11731 ("java-geronimo-xbean-asm-util" ,java-geronimo-xbean-asm-util)
11732 ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin)
11733 ("java-osgi-framework" ,java-osgi-framework)))
11735 `(("java-junit" ,java-junit)
11736 ("java-hamcrest-core" ,java-hamcrest-core)))))
11738 (define-public java-gson
11744 (uri (string-append "https://github.com/google/gson/archive/"
11745 "gson-parent-" version ".tar.gz"))
11748 "1j4qnp7v046q0k48c4kyf69sxaasx2h949d3cqwsm3kzxms3x0f9"))))
11749 (build-system ant-build-system)
11751 `(#:jar-name "gson.jar"
11752 #:source-dir "gson/src/main/java"
11753 #:test-dir "gson/src/test"))
11755 `(("java-junit" ,java-junit)
11756 ("java-hamcrest-core" ,java-hamcrest-core)))
11757 (home-page "https://github.com/google/gson")
11758 (synopsis "Java serialization/deserialization library from/to JSON")
11759 (description "Gson is a Java library that can be used to convert Java
11760 Objects into their JSON representation. It can also be used to convert a JSON
11761 string to an equivalent Java object. Gson can work with arbitrary Java objects
11762 including pre-existing objects that you do not have source-code of.")
11763 (license license:asl2.0)))
11765 (define-public java-hawtjni
11767 (name "java-hawtjni")
11771 (uri (string-append "https://github.com/fusesource/hawtjni/archive/"
11772 "hawtjni-project-" version ".tar.gz"))
11775 "1bqfd732rmh6svyx17fpw9175gc9gzkcbyps2yyrf50c3zzjas6g"))))
11776 (build-system ant-build-system)
11778 `(#:jar-name "hawtjni.jar"
11779 #:source-dir "hawtjni-generator/src/main/java:hawtjni-runtime/src/main/java"
11780 #:tests? #f; no tests
11782 (modify-phases %standard-phases
11783 (add-before 'build 'build-native
11784 (lambda* (#:key inputs #:allow-other-keys)
11785 (let ((include (string-append "-I" (assoc-ref inputs "jdk") "/include/linux")))
11786 (with-directory-excursion "hawtjni-generator/src/main/resources/"
11787 (invoke "gcc" "-c" "hawtjni.c" "-o" "hawtjni.o"
11788 "-fPIC" "-O2" include)
11789 (invoke "gcc" "-c" "hawtjni-callback.c" "-o" "hawtjni-callback.o"
11790 "-fPIC" "-O2" include)
11791 (invoke "gcc" "-o" "libhawtjni.so" "-shared"
11792 "hawtjni.o" "hawtjni-callback.o")))
11794 (add-after 'install 'install-native
11795 (lambda* (#:key outputs #:allow-other-keys)
11796 (let* ((out (assoc-ref outputs "out"))
11797 (lib (string-append out "/lib"))
11798 (inc (string-append out "/include")))
11799 (with-directory-excursion "hawtjni-generator/src/main/resources/"
11800 (install-file "libhawtjni.so" lib)
11801 (install-file "hawtjni.h" inc)))
11803 (add-before 'install 'install-parent
11804 (install-pom-file "pom.xml"))
11806 (install-from-pom "hawtjni-runtime/pom.xml")))))
11808 `(("java-commons-cli" ,java-commons-cli)
11809 ("java-asm" ,java-asm)
11810 ("java-geronimo-xbean-finder" ,java-geronimo-xbean-finder)))
11811 (home-page "https://fusesource.github.io/hawtjni/")
11812 (synopsis "JNI code generator")
11813 (description "HawtJNI is a code generator that produces the JNI code needed
11814 to implement Java native methods. It is based on the jnigen code generator
11815 that is part of the SWT Tools project.")
11816 (license license:asl2.0)))
11818 (define-public java-jansi-native
11820 (name "java-jansi-native")
11824 (uri (string-append "https://github.com/fusesource/jansi-native/"
11825 "archive/jansi-native-" version ".tar.gz"))
11828 "0j2ydlgxbzbgshqkwghbxxxnbnx1mmjgd6k5fw6xfvxw1z956yqf"))))
11829 (build-system ant-build-system)
11831 `(#:jar-name "jansi-native.jar"
11832 #:source-dir "src/main/java"
11833 #:tests? #f; no tests
11835 (modify-phases %standard-phases
11836 (add-before 'build 'build-native
11837 (lambda* (#:key inputs #:allow-other-keys)
11838 ;; there are more required files for windows in windows/
11839 (with-directory-excursion "src/main/native-package/src"
11840 (substitute* "jansi_ttyname.c"
11841 (("#include \"jansi_.*") ""))
11842 (invoke "gcc" "-c" "jansi_ttyname.c" "-o" "jansi_ttyname.o"
11843 (string-append "-I" (assoc-ref inputs "java-hawtjni")
11845 (string-append "-I" (assoc-ref inputs "jdk")
11848 (invoke "gcc" "-o" "libjansi.so" "-shared" "jansi_ttyname.o"))))
11849 (add-before 'build 'install-native
11851 (let ((dir (string-append "build/classes/META-INF/native/"
11852 ,(match (%current-system)
11853 ((or "i686-linux" "armhf-linux")
11855 ((or "x86_64-linux" "aarch64-linux"
11858 (_ "unknown-kernel")))))
11859 (install-file "src/main/native-package/src/libjansi.so" dir))
11861 (add-after 'install 'install-native
11862 (lambda* (#:key outputs #:allow-other-keys)
11863 (install-file "src/main/native-package/src/jansi.h"
11864 (string-append (assoc-ref outputs "out") "/include"))
11866 (add-before 'install 'fix-pom
11868 ;; pom contains variables to complete name, but we don't support that
11869 (substitute* "pom.xml"
11870 (("\\$\\{platform\\}") "native"))
11873 (install-from-pom "pom.xml")))))
11875 `(("java-hawtjni" ,java-hawtjni)))
11876 (home-page "https://fusesource.github.io/jansi/")
11877 (synopsis "Native library for jansi")
11878 (description "This package provides the native library for jansi, a small
11879 Java library that allows you to use ANSI escape sequences to format your
11881 (license license:asl2.0)))
11883 (define-public java-jansi
11885 (name "java-jansi")
11889 (uri (string-append "https://github.com/fusesource/jansi/archive/"
11890 "jansi-project-" version ".tar.gz"))
11893 "11kh3144i3fzp21dpy8zg52mjmsr214k7km9p8ly0rqk2px0qq2z"))))
11894 (build-system ant-build-system)
11896 `(#:jar-name "jansi.jar"
11897 #:source-dir "jansi/src/main/java"
11898 #:test-dir "jansi/src/test"
11900 (modify-phases %standard-phases
11901 (add-after 'check 'clear-term
11903 (invoke "echo" "-e" "\\e[0m")))
11904 (add-before 'install 'install-parent
11905 (install-pom-file "pom.xml"))
11906 (add-before 'install 'fix-pom
11908 ;; pom adds jansi native versions for different platforms, but we
11909 ;; only need one, so use native instead
11910 (substitute* "jansi/pom.xml"
11911 (("windows32") "native")
11912 (("windows64") "native")
11914 (("linux32") "native")
11915 (("linux64") "native")
11916 (("freebsd32") "native")
11917 (("freebsd64") "native"))
11920 (install-from-pom "jansi/pom.xml")))))
11922 `(("java-jansi-native" ,java-jansi-native)))
11924 `(("java-junit" ,java-junit)
11925 ("java-hamcrest-core" ,java-hamcrest-core)))
11926 (home-page "https://fusesource.github.io/jansi/")
11927 (synopsis "Portable ANSI escape sequences")
11928 (description "Jansi is a Java library that allows you to use ANSI escape
11929 sequences to format your console output which works on every platform.")
11930 (license license:asl2.0)))
11932 (define-public java-jboss-el-api-spec
11934 (name "java-jboss-el-api-spec")
11938 (uri (string-append "https://github.com/jboss/jboss-el-api_spec/"
11939 "archive/jboss-el-api_" version
11940 "_spec-1.0.7.Final.tar.gz"))
11943 "1j45ljxalwlibxl7g7iv952sjxkw275m8vyxxij8l6wdd5pf0pdh"))))
11944 (build-system ant-build-system)
11946 `(#:jar-name "java-jboss-el-api_spec.jar"
11947 #:modules ((guix build ant-build-system)
11949 (guix build maven pom)
11950 (guix build java-utils)
11953 (modify-phases %standard-phases
11954 ;; the origin of javax.el:javax.el-api is unknown, so we use this package
11955 ;; instead, which implements the same thing. We override the pom file
11956 ;; to "rename" the package so it can be found by maven.
11957 (add-before 'install 'override-pom
11959 (delete-file "pom.xml")
11960 (with-output-to-file "pom.xml"
11964 (modelVersion "4.0.0")
11966 (groupId "javax.el")
11967 (artifactId "javax.el-api")
11968 (version "3.0")))))
11971 (install-from-pom "pom.xml")))))
11973 `(("java-junit" ,java-junit)))
11974 (home-page "https://github.com/jboss/jboss-el-api_spec")
11975 (synopsis "JSR-341 expression language 3.0 API")
11976 (description "This package contains an implementation of the JSR-341
11977 specification for the expression language 3.0. It implements an expression
11978 language inspired by ECMAScript and XPath. This language is used with
11979 JavaServer Pages (JSP).")
11980 ;; Either GPL2 only or CDDL.
11981 (license (list license:gpl2 license:cddl1.1))))
11983 (define-public java-jboss-interceptors-api-spec
11985 (name "java-jboss-interceptors-api-spec")
11989 (uri (string-append "https://github.com/jboss/jboss-interceptors-api_spec/"
11990 "archive/jboss-interceptors-api_" version
11991 "_spec-1.0.0.Final.tar.gz"))
11994 "0wv8x0jp9a5qxlrgkhb5jdk2gr6vi87b4j4kjb8ryxiy9gn8g51z"))))
11995 (build-system ant-build-system)
11997 `(#:jar-name "java-jboss-interceptors-api_spec.jar"
12000 #:tests? #f; no tests
12001 #:modules ((guix build ant-build-system)
12003 (guix build maven pom)
12004 (guix build java-utils)
12007 (modify-phases %standard-phases
12008 ;; the origin of javax.interceptor:javax.interceptor-api is unknown,
12009 ;; so we use this package instead, which implements the same thing.
12010 ;; We override the pom file to "rename" the package so it can be found
12012 (add-before 'install 'override-pom
12014 (delete-file "pom.xml")
12015 (with-output-to-file "pom.xml"
12019 (modelVersion "4.0.0")
12020 (name "interceptor-api")
12021 (groupId "javax.interceptor")
12022 (artifactId "javax.interceptor-api")
12023 (version "3.0")))))
12026 (install-from-pom "pom.xml")))))
12027 (home-page "https://github.com/jboss/jboss-interceptors-api_spec")
12028 (synopsis "Interceptors 1.2 API classes from JSR 318")
12029 (description "Java-jboss-interceptors-api-spec implements the Interceptors
12030 API. Interceptors are used to interpose on business method invocations and
12032 ;; Either GPL2 only or CDDL.
12033 (license (list license:gpl2 license:cddl1.1))))
12035 (define-public java-cdi-api
12037 (name "java-cdi-api")
12041 (uri (string-append "https://github.com/cdi-spec/cdi/archive/"
12042 version ".tar.gz"))
12043 (file-name (string-append name "-" version ".tar.gz"))
12046 "1iv8b8bp07c5kmqic14jsr868vycjv4qv02lf3pkgp9z21mnfg5y"))))
12047 (build-system ant-build-system)
12049 `(#:source-dir "api/src/main/java"
12050 #:jar-name "java-cdi-api.jar"
12051 #:test-dir "api/src/test"
12053 #:tests? #f; Tests fail because we don't have a CDI provider yet
12055 (modify-phases %standard-phases
12057 (install-from-pom "api/pom.xml")))))
12059 `(("java-javax-inject" ,java-javax-inject)
12060 ("java-jboss-el-api-spec" ,java-jboss-el-api-spec)
12061 ("java-jboss-interceptors-api-spec" ,java-jboss-interceptors-api-spec)
12062 ("java-weld-parent-pom" ,java-weld-parent-pom)))
12064 `(("java-testng" ,java-testng)
12065 ("java-hamcrest-core" ,java-hamcrest-core)))
12066 (home-page "http://cdi-spec.org/")
12067 (synopsis "Contexts and Dependency Injection APIs")
12068 (description "Java-cdi-api contains the required APIs for Contexts and
12069 Dependency Injection (CDI).")
12070 (license license:asl2.0)))
12072 (define-public java-joda-convert
12074 (name "java-joda-convert")
12078 (uri (string-append "https://github.com/JodaOrg/joda-convert/archive/v"
12079 version ".tar.gz"))
12080 (file-name (string-append name "-" version ".tar.gz"))
12083 "0vp346xz7dh9br4q7xazhc7hvzf76a6hf95fki9bg67q5jr0kjh7"))))
12084 (build-system ant-build-system)
12086 `(#:jar-name (string-append ,name "-" ,version ".jar")
12087 #:source-dir "src/main/java"
12088 #:test-include (list "**/Test*.java")
12089 ;; Contains only interfaces and base classes (no test)
12090 #:test-exclude (list "**/test*/**.java")))
12092 `(("java-guava" ,java-guava)))
12094 `(("java-junit" ,java-junit)
12095 ("java-hamcrest-core" ,java-hamcrest-core)))
12096 (home-page "https://www.joda.org/joda-convert/")
12097 (synopsis "Conversion between Objects and Strings")
12098 (description "Joda-Convert provides a small set of classes to aid
12099 conversion between Objects and Strings. It is not intended to tackle the
12100 wider problem of Object to Object transformation.")
12101 (license license:asl2.0)))
12103 (define-public java-joda-time
12105 (name "java-joda-time")
12109 (uri (string-append "https://github.com/JodaOrg/joda-time/archive/v"
12110 version ".tar.gz"))
12111 (file-name (string-append name "-" version ".tar.gz"))
12114 "1i9x91mi7yg2pasl0k3912f1pg46n37sps6rdb0v1gs8hj9ppwc1"))))
12115 (build-system ant-build-system)
12117 `(#:jar-name "java-joda-time.jar"
12118 #:source-dir "src/main/java"
12119 #:test-include (list "**/Test*.java")
12120 ;; There is no runnable test in these files
12121 #:test-exclude (list "**/Test*Chronology.java" "**/Test*Field.java")
12123 (modify-phases %standard-phases
12124 (add-after 'build 'build-resources
12126 (mkdir-p "build/classes/org/joda/time/tz/data")
12127 (mkdir-p "build/classes/org/joda/time/format")
12128 ;; This will produce the following exception:
12129 ;; java.io.IOException: Resource not found: "org/joda/time/tz/data/ZoneInfoMap"
12130 ;; which is normal, because it doesn't exist yet. It still generates
12131 ;; the same file as in the binary one can find on maven.
12132 (invoke "java" "-cp"
12133 (string-append "build/classes:" (getenv "CLASSPATH"))
12134 "org.joda.time.tz.ZoneInfoCompiler"
12135 "-src" "src/main/java/org/joda/time/tz/src"
12136 "-dst" "build/classes/org/joda/time/tz/data"
12137 "africa" "antarctica" "asia" "australasia"
12138 "europe" "northamerica" "southamerica"
12139 "pacificnew" "etcetera" "backward" "systemv")
12140 (for-each (lambda (f)
12141 (copy-file f (string-append
12142 "build/classes/org/joda/time/format/"
12144 (find-files "src/main/java/org/joda/time/format" ".*.properties"))
12146 (add-before 'install 'regenerate-jar
12148 ;; We need to regenerate the jar file to add generated data.
12149 (delete-file "build/jar/java-joda-time.jar")
12150 (invoke "ant" "jar")))
12151 (add-before 'check 'copy-test-resources
12153 (mkdir-p "build/test-classes/org/joda/time/tz/data")
12154 (copy-file "src/test/resources/tzdata/ZoneInfoMap"
12155 "build/test-classes/org/joda/time/tz/data/ZoneInfoMap")
12156 (copy-recursively "src/test/resources" "build/test-classes")
12159 `(("java-joda-convert" ,java-joda-convert)))
12161 `(("java-junit" ,java-junit)
12162 ("java-hamcrest-core" ,java-hamcrest-core)
12163 ("tzdata" ,tzdata)))
12164 (home-page "https://www.joda.org/joda-time/")
12165 (synopsis "Replacement for the Java date and time classes")
12166 (description "Joda-Time is a replacement for the Java date and time
12167 classes prior to Java SE 8.")
12168 (license license:asl2.0)))
12170 (define-public java-xerces
12172 (name "java-xerces")
12177 (uri (string-append "mirror://apache/xerces/j/source/"
12178 "Xerces-J-src." version ".tar.gz"))
12180 (base32 "0494kq36gw3nah19ifb720vwxbpg4ww0k6m3zq6wyanw6a083p6s"))
12181 (patches (search-patches
12182 "java-xerces-xjavac_taskdef.patch"
12183 "java-xerces-build_dont_unzip.patch"
12184 "java-xerces-bootclasspath.patch"))))
12185 (build-system ant-build-system)
12187 `(#:tests? #f;; Test files are not present
12188 #:test-target "test"
12191 (modify-phases %standard-phases
12192 (add-after 'unpack 'create-build.properties
12193 (lambda* (#:key inputs #:allow-other-keys)
12194 (let ((jaxp (assoc-ref inputs "java-jaxp"))
12195 (resolver (assoc-ref inputs "java-apache-xml-commons-resolver")))
12196 (with-output-to-file "build.properties"
12199 "jar.jaxp = ~a/share/java/jaxp.jar~@
12200 jar.apis-ext = ~a/share/java/jaxp.jar~@
12201 jar.resolver = ~a/share/java/xml-resolver.jar~%"
12202 jaxp jaxp resolver)))
12203 ;; Make xerces use our version of jaxp in tests
12204 (substitute* "build.xml"
12206 (string-append jaxp "/share/java/jaxp.jar"))
12207 (("\\$\\{tools.dir\\}/\\$\\{jar.apis\\}")
12210 (replace 'install (install-jars "build")))))
12212 `(("java-apache-xml-commons-resolver" ,java-apache-xml-commons-resolver)
12213 ("java-jaxp" ,java-jaxp)))
12214 (home-page "https://xerces.apache.org/xerces2-j/")
12215 (synopsis "Validating XML parser for Java with DOM level 3 support")
12216 (description "The Xerces2 Java parser is the reference implementation of
12217 XNI, the Xerces Native Interface, and also a fully conforming XML Schema
12220 Xerces2-J supports the following standards and APIs:
12223 @item eXtensible Markup Language (XML) 1.0 Second Edition Recommendation
12224 @item Namespaces in XML Recommendation
12225 @item Document Object Model (DOM) Level 2 Core, Events, and Traversal and
12226 Range Recommendations
12227 @item Simple API for XML (SAX) 2.0.1 Core and Extension
12228 @item Java APIs for XML Processing (JAXP) 1.2.01
12229 @item XML Schema 1.0 Structures and Datatypes Recommendations
12230 @item Experimental implementation of the Document Object Model (DOM) Level 3
12231 Core and Load/Save Working Drafts
12232 @item Provides a partial implementation of the XML Inclusions (XInclude) W3C
12233 Candidate Recommendation
12236 Xerces is now able to parse documents written according to the XML 1.1
12237 Candidate Recommendation, except that it does not yet provide an option to
12238 enable normalization checking as described in section 2.13 of this
12239 specification. It also handles namespaces according to the XML Namespaces 1.1
12240 Candidate Recommendation, and will correctly serialize XML 1.1 documents if
12241 the DOM level 3 load/save API's are in use.")
12242 (license license:asl2.0)))
12244 (define-public java-jakarta-regexp
12246 (name "java-jakarta-regexp")
12251 (uri (string-append
12252 "https://archive.apache.org/dist/jakarta/regexp/jakarta-regexp-"
12253 version ".tar.gz"))
12256 "0zg9rmyif48dck0cv6ynpxv23mmcsx265am1fnnxss7brgw0ms3r"))))
12257 (build-system ant-build-system)
12259 `(#:test-target "test"
12261 (modify-phases %standard-phases
12263 (lambda* (#:key outputs #:allow-other-keys)
12264 (let* ((out (assoc-ref outputs "out"))
12265 (out-share (string-append out "/share/java")))
12266 (mkdir-p out-share)
12267 (for-each (lambda (name)
12268 (install-file name out-share))
12269 (find-files "build" "^jakarta-regexp-.*\\.jar$"))
12271 (home-page "https://attic.apache.org/projects/jakarta-regexp.html")
12272 (synopsis "Regular expression parser generator for Java.")
12273 (description "@code{jakarta-regexp} is an old regular expression parser
12274 generator for Java.")
12275 (license license:asl2.0)))
12277 (define-public java-jline
12279 (name "java-jline")
12283 (uri (string-append "https://github.com/jline/jline1/archive/jline-"
12284 version ".tar.gz"))
12287 "0bi3p6vrh7a6v0fbpb6rx9plpmx5zk3lr352xzdbz2jcxg499wir"))))
12288 (build-system ant-build-system)
12290 `(#:jar-name "jline.jar"
12291 #:source-dir "src/main/java"
12292 #:test-dir "src/test"
12294 (modify-phases %standard-phases
12295 (add-before 'build 'copy-resources
12297 (copy-recursively "src/main/resources" "build/classes")
12300 `(("java-junit" ,java-junit)))
12301 (home-page "https://jline.github.io")
12302 (synopsis "Console input handling library")
12303 (description "JLine is a Java library for handling console input. It is
12304 similar in functionality to BSD editline and GNU readline but with additional
12305 features that bring it on par with the Z shell line editor.")
12306 (license license:bsd-3)))
12308 (define-public java-jline-2
12310 (inherit java-jline)
12314 (uri (string-append "https://github.com/jline/jline2/archive/jline-"
12315 version ".tar.gz"))
12318 "1c6qa26mf0viw8hg4jnv72s7i1qb1gh1l8rrzcdvqhqhx82rkdlf"))))
12321 ,@(package-arguments java-jline)))
12323 `(("java-jansi" ,java-jansi)
12324 ("java-jansi-native" ,java-jansi-native)))
12326 `(("java-powermock-modules-junit4" ,java-powermock-modules-junit4)
12327 ("java-powermock-modules-junit4-common" ,java-powermock-modules-junit4-common)
12328 ("java-powermock-api-easymock" ,java-powermock-api-easymock)
12329 ("java-powermock-api-support" ,java-powermock-api-support)
12330 ("java-powermock-core" ,java-powermock-core)
12331 ("java-powermock-reflect" ,java-powermock-reflect)
12332 ("java-easymock" ,java-easymock)
12333 ("java-jboss-javassist" ,java-jboss-javassist)
12334 ("java-objenesis" ,java-objenesis)
12335 ("java-asm" ,java-asm)
12336 ("java-hamcrest-core" ,java-hamcrest-core)
12337 ("java-cglib" ,java-cglib)
12338 ("java-junit" ,java-junit)
12339 ("java-hawtjni" ,java-hawtjni)))))
12341 (define-public java-xmlunit
12343 (name "java-xmlunit")
12347 (uri (string-append "https://github.com/xmlunit/xmlunit/archive/v"
12348 version ".tar.gz"))
12349 (file-name (string-append name "-" version ".tar.gz"))
12352 "035rivlnmwhfqj0fzviciv0bkh1h95ps1iwnh2kjcvdbk5nccm4z"))))
12353 (build-system ant-build-system)
12355 `(#:jar-name "java-xmlunit.jar"
12356 #:source-dir "xmlunit-core/src/main/java"
12357 #:test-dir "xmlunit-core/src/test"
12359 (modify-phases %standard-phases
12360 (add-before 'check 'copy-test-resources
12361 (lambda* (#:key inputs #:allow-other-keys)
12362 (copy-recursively (assoc-ref inputs "resources") "../test-resources")
12365 `(("java-junit" ,java-junit)
12366 ("java-mockito-1" ,java-mockito-1)
12367 ("java-hamcrest-all" ,java-hamcrest-all)
12368 ("java-objenesis" ,java-objenesis)
12369 ("java-asm" ,java-asm)
12370 ("java-cglib" ,java-cglib)
12374 (uri (git-reference
12375 (url "https://github.com/xmlunit/test-resources")
12376 (commit "a590d2ae865c3e0455691d76ba8eefccc2215aec")))
12377 (file-name "java-xmlunit-test-resources")
12380 "0r0glj37pg5l868yjz78gckr91cs8fysxxbp9p328dssssi91agr"))))))
12381 (home-page "https://www.xmlunit.org/")
12382 (synopsis "XML output testing")
12383 (description "XMLUnit provides you with the tools to verify the XML you
12384 emit is the one you want to create. It provides helpers to validate against
12385 an XML Schema, assert the values of XPath queries or compare XML documents
12386 against expected outcomes.")
12387 (license license:asl2.0)))
12389 (define-public java-xmlunit-legacy
12391 (inherit java-xmlunit)
12392 (name "java-xmlunit-legacy")
12394 `(#:jar-name "java-xmlunit-legacy.jar"
12395 #:source-dir "xmlunit-legacy/src/main/java"
12396 #:test-dir "xmlunit-legacy/src/test"))
12398 `(("java-xmlunit" ,java-xmlunit)
12399 ("java-junit" ,java-junit)))
12401 `(("java-mockito-1" ,java-mockito-1)))))
12403 (define-public java-xmlunit-matchers
12405 (inherit java-xmlunit)
12406 (name "java-xmlunit-matchers")
12408 `(#:jar-name "java-xmlunit-matchers.jar"
12409 #:source-dir "xmlunit-matchers/src/main/java"
12410 #:test-dir "xmlunit-matchers/src/test"
12412 ;; Cannot open xsd for http://www.xmlunit.org/test-support/Book.xsd
12413 (list "**/ValidationMatcherTest.java")
12415 (modify-phases %standard-phases
12416 (add-before 'build 'copy-test-class
12418 (copy-file "xmlunit-core/src/test/java/org/xmlunit/TestResources.java"
12419 "xmlunit-matchers/src/test/java/org/xmlunit/TestResources.java")
12421 (add-before 'build 'fix-test-resources-path
12423 (substitute* (find-files "xmlunit-matchers/src/test" ".*.java")
12424 (("../test-resources") "test-resources"))
12426 (add-before 'check 'copy-test-resources
12427 (lambda* (#:key inputs #:allow-other-keys)
12428 (copy-recursively (assoc-ref inputs "resources") "test-resources")
12431 `(("java-xmlunit" ,java-xmlunit)
12432 ("java-junit" ,java-junit)))))
12434 (define-public java-openchart2
12436 (name "java-openchart2")
12440 (uri (string-append "http://download.approximatrix.com/openchart2/"
12441 "openchart2-" version ".source.zip"))
12444 "1xq96zm5r02n1blja0072jmmsifmxc40lbyfbnmcnr6mw42frh4g"))))
12445 (build-system ant-build-system)
12447 `(#:test-target "test"
12449 (modify-phases %standard-phases
12450 (add-after 'unpack 'fix-junit-errors
12452 (with-directory-excursion "unittest/src/com/approximatrix/charting/"
12453 (substitute* '("coordsystem/ticklocator/NumericXTickLocatorTest.java"
12454 "coordsystem/ticklocator/NumericYTickLocatorTest.java"
12455 "coordsystem/ticklocator/ObjectXTickLocatorTest.java"
12456 "model/DefaultChartDataModelConstraintsTest.java"
12457 "model/MultiScatterDataModelConstraintsTest.java"
12458 "model/threedimensional/DotPlotDataModelConstraintsTest.java")
12459 (("(assertEquals[^;]+);" before _)
12460 (string-append (string-drop-right before 2) ", 1E-6);"))))
12462 (replace 'install (install-jars ".")))))
12465 ("java-junit" ,java-junit)
12466 ("java-hamcrest-core" ,java-hamcrest-core)))
12467 (home-page "https://approximatrix.com/products/openchart2/")
12468 (synopsis "Simple plotting for Java")
12469 (description "Openchart2 provides a simple, yet powerful, interface for
12470 Java programmers to create two-dimensional charts and plots. The library
12471 features an assortment of graph styles, including advanced scatter plots, bar
12472 graphs, and pie charts.")
12473 (license license:lgpl2.1+)))
12475 (define-public java-commons-httpclient
12477 (name "java-commons-httpclient")
12481 (uri (string-append "mirror://apache/httpcomponents/"
12482 "commons-httpclient/source/commons-httpclient-"
12483 version "-src.tar.gz"))
12486 "1wlpn3cfy3d4inxy6g7wxcsa8p7sshn6aldk9y4ia3lb879rd97r"))))
12487 (build-system ant-build-system)
12489 `(#:build-target "compile"
12490 #:test-target "test"
12491 #:tests? #f; requires junit-textui (junit 3)
12493 (modify-phases %standard-phases
12494 (add-before 'build 'fix-accent
12496 (for-each (lambda (file)
12497 (with-fluids ((%default-port-encoding "ISO-8859-1"))
12499 (("\\* @author Ortwin .*") "* @author Ortwin Glueck\n"))))
12500 '("src/java/org/apache/commons/httpclient/HttpContentTooLargeException.java"
12501 "src/examples/TrivialApp.java" "src/examples/ClientApp.java"
12502 "src/test/org/apache/commons/httpclient/TestHttps.java"
12503 "src/test/org/apache/commons/httpclient/TestURIUtil2.java"))
12506 (lambda* (#:key outputs #:allow-other-keys)
12507 (invoke "ant" "dist"
12508 (string-append "-Ddist.home=" (assoc-ref outputs "out")
12512 `(("java-commons-logging" ,java-commons-logging-minimal)
12513 ("java-commons-codec" ,java-commons-codec)))
12514 (home-page "https://hc.apache.org")
12515 (synopsis "HTTP/1.1 compliant HTTP agent implementation")
12516 (description "This package contains an HTTP/1.1 compliant HTTP agent
12517 implementation. It also provides reusable components for client-side
12518 authentication, HTTP state management, and HTTP connection management.")
12519 (license license:asl2.0)))
12521 (define-public java-commons-vfs
12523 (name "java-commons-vfs")
12527 (uri (string-append "mirror://apache/commons/vfs/source/"
12528 "commons-vfs2-distribution-" version "-src.tar.gz"))
12529 (file-name (string-append name "-" version ".tar.gz"))
12532 "1cnq1iaghbp4cslpnvwbp83i5v234x87irssqynhwpfgw7caf1s3"))
12533 (modules '((guix build utils)))
12536 (for-each delete-file
12537 (find-files "." "\\.jar$"))
12539 (build-system ant-build-system)
12541 `(#:jar-name "commons-vfs.jar"
12542 #:source-dir "commons-vfs2/src/main/java"
12543 #:test-dir "commons-vfs2/src/test"
12544 ; FIXME: tests depend on many things: apache sshd, hadoop, ftpserver, ...
12547 (modify-phases %standard-phases
12548 (add-before 'build 'remove-hadoop-and-webdav
12549 ; Remove these files as they are not required and depend on difficult
12552 (for-each delete-file-recursively
12553 '("commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/webdav"
12554 "commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/hdfs"))
12557 `(("java-commons-collections4" ,java-commons-collections4)
12558 ("java-commons-compress" ,java-commons-compress)
12559 ("java-commons-httpclient" ,java-commons-httpclient)
12560 ("java-commons-logging-minimal" ,java-commons-logging-minimal)
12561 ("java-commons-net" ,java-commons-net)
12562 ("java-jsch" ,java-jsch)))
12563 (home-page "https://commons.apache.org/proper/commons-vfs/")
12564 (synopsis "Java file system library")
12565 (description "Commons VFS provides a single API for accessing various
12566 different file systems. It presents a uniform view of the files from various
12567 different sources, such as the files on local disk, on an HTTP server, or
12568 inside a Zip archive.")
12569 (license license:asl2.0)))
12571 (define-public java-jakarta-oro
12573 (name "java-jakarta-oro")
12577 (uri (string-append "mirror://apache/jakarta/oro/"
12578 "jakarta-oro-" version ".tar.gz"))
12581 "0rpmnsskiwmsy8r0sckz5n5dbvh3vkxx8hpm177c754r8xy3qksc"))
12582 (modules '((guix build utils)))
12585 (delete-file (string-append "jakarta-oro-" ,version ".jar"))
12587 (build-system ant-build-system)
12589 `(#:build-target "package"
12590 #:make-flags (list "-DDATE" "(no recorded date for reproducibility)")
12591 #:tests? #f; tests are run as part of the build process
12593 (modify-phases %standard-phases
12595 (install-jars ,(string-append "jakarta-oro-" version))))))
12596 (home-page "https://jakarta.apache.org/oro/")
12597 (synopsis "Text-processing for Java")
12598 (description "The Jakarta-ORO Java classes are a set of text-processing
12599 Java classes that provide Perl5 compatible regular expressions, AWK-like
12600 regular expressions, glob expressions, and utility classes for performing
12601 substitutions, splits, filtering filenames, etc. This library is the successor
12602 of the OROMatcher, AwkTools, PerlTools, and TextTools libraries originally
12604 (license license:asl1.1)))
12606 (define-public java-native-access
12608 (name "java-native-access")
12612 (uri (string-append "https://github.com/java-native-access/jna/"
12613 "archive/" version ".tar.gz"))
12614 (file-name (string-append name "-" version ".tar.gz"))
12617 "0zrpzkib6b905i018a9pqlzkqinphywr6y4jwv6mwp63jjqvqkd9"))
12618 (modules '((guix build utils)))
12621 (for-each delete-file (find-files "." ".*.jar"))
12622 (delete-file-recursively "native/libffi")
12623 (delete-file-recursively "dist")
12625 (build-system ant-build-system)
12627 `(#:tests? #f; FIXME: tests require reflections.jar
12628 #:test-target "test"
12629 #:make-flags (list "-Ddynlink.native=true")
12631 (modify-phases %standard-phases
12632 (add-before 'build 'fix-build.xml
12633 (lambda* (#:key inputs #:allow-other-keys)
12634 (substitute* "build.xml"
12635 ;; Since we removed the bundled ant.jar, give the correct path
12636 (("lib/ant.jar") (string-append (assoc-ref inputs "ant") "/lib/ant.jar"))
12637 ;; We removed generated native libraries. We can only rebuild one
12638 ;; so don't fail if we can't find a native library for another architecture.
12639 (("zipfileset") "zipfileset erroronmissingarchive=\"false\""))
12640 ;; Copy test dependencies
12641 (copy-file (car (find-files (assoc-ref inputs "java-junit") "jar$"))
12643 (copy-file (car (find-files (assoc-ref inputs "java-hamcrest-core")
12645 "lib/hamcrest-core.jar")
12646 ;; FIXME: once reflections.jar is built, copy it to lib/test.
12648 (add-before 'build 'build-native
12650 (invoke "ant" "-Ddynlink.native=true" "native")
12653 (install-jars "build")))))
12655 `(("libffi" ,libffi)
12659 `(("java-junit" ,java-junit)
12660 ("java-hamcrest-core" ,java-hamcrest-core)))
12661 (home-page "https://github.com/java-native-access/jna")
12662 (synopsis "Access to native shared libraries from Java")
12663 (description "JNA provides Java programs easy access to native shared
12664 libraries without writing anything but Java code - no JNI or native code is
12665 required. JNA allows you to call directly into native functions using natural
12666 Java method invocation.")
12667 ;; Java Native Access project (JNA) is dual-licensed under 2
12668 ;; alternative Free licenses: LGPL 2.1 or later and Apache License 2.0.
12671 license:lgpl2.1+))))
12673 (define-public java-native-access-platform
12675 (inherit java-native-access)
12676 (name "java-native-access-platform")
12678 `(#:test-target "test"
12679 #:tests? #f; require jna-test.jar
12681 (modify-phases %standard-phases
12682 (add-before 'build 'chdir
12684 (chdir "contrib/platform")
12686 (add-after 'chdir 'fix-ant
12687 (lambda* (#:key inputs #:allow-other-keys)
12688 (substitute* "nbproject/project.properties"
12689 (("../../build/jna.jar")
12690 (string-append (assoc-ref inputs "java-native-access")
12691 "/share/java/jna.jar"))
12692 (("../../lib/hamcrest-core-.*.jar")
12693 (car (find-files (assoc-ref inputs "java-hamcrest-core")
12695 (("../../lib/junit.jar")
12696 (car (find-files (assoc-ref inputs "java-junit")
12700 (install-jars "dist")))))
12702 `(("java-native-access" ,java-native-access)))
12703 (synopsis "Cross-platform mappings for jna")
12704 (description "java-native-access-platform has cross-platform mappings
12705 and mappings for a number of commonly used platform functions, including a
12706 large number of Win32 mappings as well as a set of utility classes that
12707 simplify native access.")))
12709 (define-public java-jsch-agentproxy-core
12711 (name "java-jsch-agentproxy-core")
12715 (uri (string-append "https://github.com/ymnk/jsch-agent-proxy/archive/"
12716 version ".tar.gz"))
12717 (file-name (string-append name "-" version ".tar.gz"))
12720 "02iqg6jbc1kxvfzqcg6wy9ygqxfm82bw5rf6vnswqy4y572niz4q"))))
12721 (build-system ant-build-system)
12723 `(#:jar-name "jsch-agentproxy-core.jar"
12724 #:source-dir "jsch-agent-proxy-core/src/main/java"
12725 #:tests? #f)); no tests
12726 (home-page "https://github.com/ymnk/jsch-agent-proxy")
12727 (synopsis "Core component of the proxy to ssh-agent and Pageant in Java")
12728 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
12729 and Pageant included Putty. It will be easily integrated into JSch, and users
12730 will be allowed to use these programs for authentication.")
12731 (license license:bsd-3)))
12733 (define-public java-jsch-agentproxy-sshagent
12735 (inherit java-jsch-agentproxy-core)
12736 (name "java-jsch-agentproxy-sshagent")
12738 `(#:jar-name "jsch-agentproxy-sshagent.jar"
12739 #:source-dir "jsch-agent-proxy-sshagent/src/main/java"
12740 #:tests? #f)); no tests
12742 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
12743 (synopsis "Proxy to ssh-agent")
12744 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
12745 and Pageant included in Putty. This component contains the code for a proxy to
12748 (define-public java-jsch-agentproxy-usocket-jna
12750 (inherit java-jsch-agentproxy-core)
12751 (name "java-jsch-agentproxy-usocket-jna")
12753 `(#:jar-name "jsch-agentproxy-usocket-jna.jar"
12754 #:source-dir "jsch-agent-proxy-usocket-jna/src/main/java"
12755 #:tests? #f)); no tests
12757 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
12758 ("java-native-access" ,java-native-access)))
12759 (synopsis "USocketFactory implementation using JNA")
12760 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
12761 and Pageant included in Putty. This component contains an implementation of
12762 USocketFactory using @dfn{JNA} (Java Native Access).")))
12764 (define-public java-jsch-agentproxy-pageant
12766 (inherit java-jsch-agentproxy-core)
12767 (name "java-jsch-agentproxy-pageant")
12769 `(#:jar-name "jsch-agentproxy-pageant.jar"
12770 #:source-dir "jsch-agent-proxy-pageant/src/main/java"
12771 #:tests? #f)); no tests
12773 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
12774 ("java-native-access" ,java-native-access)
12775 ("java-native-access-platform" ,java-native-access-platform)))
12776 (synopsis "Proxy to pageant")
12777 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
12778 and Pageant included in Putty. This component contains the code for a proxy to
12781 (define-public java-jsch-agentproxy-usocket-nc
12783 (inherit java-jsch-agentproxy-core)
12784 (name "java-jsch-agentproxy-usocket-nc")
12786 `(#:jar-name "jsch-agentproxy-usocket-nc.jar"
12787 #:source-dir "jsch-agent-proxy-usocket-nc/src/main/java"
12788 #:tests? #f)); no tests
12790 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
12791 (synopsis "USocketFactory implementation using netcat")
12792 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
12793 and Pageant included in Putty. This component contains an implementation of
12794 USocketFactory using netcat.")))
12796 (define-public java-jsch-agentproxy-connector-factory
12798 (inherit java-jsch-agentproxy-core)
12799 (name "java-jsch-agentproxy-connector-factory")
12801 `(#:jar-name "jsch-agentproxy-connector-factory.jar"
12802 #:source-dir "jsch-agent-proxy-connector-factory/src/main/java"
12803 #:tests? #f)); no tests
12805 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
12806 ("java-jsch-agentproxy-sshagent" ,java-jsch-agentproxy-sshagent)
12807 ("java-jsch-agentproxy-usocket-jna" ,java-jsch-agentproxy-usocket-jna)
12808 ("java-jsch-agentproxy-pageant" ,java-jsch-agentproxy-pageant)
12809 ("java-jsch-agentproxy-usocket-nc" ,java-jsch-agentproxy-usocket-nc)))
12810 (synopsis "Connector factory for jsch agent proxy")
12811 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
12812 and Pageant included in Putty. This component contains a connector factory.")))
12814 (define-public java-jsch-agentproxy-jsch
12816 (inherit java-jsch-agentproxy-core)
12817 (name "java-jsch-agentproxy-jsch")
12819 `(#:jar-name "jsch-agentproxy-jsch.jar"
12820 #:source-dir "jsch-agent-proxy-jsch/src/main/java"
12821 #:tests? #f)); no tests
12823 `(("java-jsch" ,java-jsch)
12824 ("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
12825 (synopsis "JSch integration library for agentproxy")
12826 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
12827 and Pageant included in Putty. This component contains a library to use
12828 jsch-agent-proxy with JSch.")))
12830 (define-public java-apache-ivy
12832 (name "java-apache-ivy")
12836 (uri (string-append "mirror://apache//ant/ivy/" version
12837 "/apache-ivy-" version "-src.tar.gz"))
12840 "1xkfn57g2m7l6y0xdq75x5rnrgk52m9jx2xah70g3ggl8750hbr0"))
12843 "java-apache-ivy-port-to-latest-bouncycastle.patch"))))
12844 (build-system ant-build-system)
12846 `(#:jar-name "ivy.jar"
12849 (modify-phases %standard-phases
12850 (add-before 'build 'remove-example
12852 (delete-file-recursively "src/example")
12854 (add-before 'build 'copy-resources
12856 (with-directory-excursion "src/java"
12857 (for-each (lambda (file)
12858 (install-file file (string-append "../../build/classes/" (dirname file))))
12860 (find-files "." ".*.css")
12861 (find-files "." ".*.ent")
12862 (find-files "." ".*.html")
12863 (find-files "." ".*.properties")
12864 (find-files "." ".*.xsd")
12865 (find-files "." ".*.xsl")
12866 (find-files "." ".*.xml"))))
12868 (add-before 'build 'fix-vfs
12871 '("src/java/org/apache/ivy/plugins/repository/vfs/VfsRepository.java"
12872 "src/java/org/apache/ivy/plugins/repository/vfs/VfsResource.java")
12873 (("import org.apache.commons.vfs") "import org.apache.commons.vfs2"))
12875 (add-before 'install 'copy-manifest
12877 (install-file "META-INF/MANIFEST.MF" "build/classes/META-INF")
12879 (add-before 'install 'repack
12881 (invoke "jar" "-cmf" "build/classes/META-INF/MANIFEST.MF" "build/jar/ivy.jar"
12882 "-C" "build/classes" ".")))
12883 (add-after 'install 'install-bin
12884 (lambda* (#:key outputs #:allow-other-keys)
12885 (let* ((bin (string-append (assoc-ref outputs "out") "/bin"))
12886 (ivy (string-append bin "/ivy"))
12887 (jar (string-append (assoc-ref outputs "out") "/share/java/ivy.jar")))
12889 (with-output-to-file ivy
12891 (display (string-append
12892 "#!" (which "sh") "\n"
12893 "if [[ -z $CLASSPATH ]]; then\n"
12894 " cp=\"" (getenv "CLASSPATH") ":" jar "\"\n"
12896 " cp=\"" (getenv "CLASSPATH") ":" jar ":$CLASSPATH\"\n"
12898 (which "java") " -cp $cp org.apache.ivy.Main $@\n"))))
12902 `(("java-bouncycastle" ,java-bouncycastle)
12903 ("java-commons-cli" ,java-commons-cli)
12904 ("java-commons-collections" ,java-commons-collections)
12905 ("java-commons-httpclient" ,java-commons-httpclient)
12906 ("java-commons-lang" ,java-commons-lang)
12907 ("java-commons-vfs" ,java-commons-vfs)
12908 ("java-jakarta-oro" ,java-jakarta-oro)
12909 ("java-jsch" ,java-jsch)
12910 ("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
12911 ("java-jsch-agentproxy-connector-factory" ,java-jsch-agentproxy-connector-factory)
12912 ("java-jsch-agentproxy-jsch" ,java-jsch-agentproxy-jsch)
12913 ("java-junit" ,java-junit)))
12914 (home-page "https://ant.apache.org/ivy")
12915 (synopsis "Dependency manager for the Java programming language")
12916 (description "Ivy is a tool for managing (recording, tracking, resolving
12917 and reporting) project dependencies. It is characterized by the following:
12920 @item flexibility and configurability - Ivy is essentially process agnostic
12921 and is not tied to any methodology or structure. Instead it provides the
12922 necessary flexibility and configurability to be adapted to a broad range
12923 of dependency management and build processes.
12924 @item tight integration with Apache Ant - while available as a standalone tool,
12925 Ivy works particularly well with Apache Ant providing a number of
12926 powerful Ant tasks ranging from dependency resolution to dependency
12927 reporting and publication.
12929 (license license:asl2.0)))
12931 (define-public java-eclipse-sisu-inject
12933 (name "java-eclipse-sisu-inject")
12937 (uri (git-reference
12938 (url "https://github.com/eclipse/sisu.inject/")
12939 (commit (string-append "releases/" version))))
12940 (file-name (git-file-name name version))
12943 "16044sizdb0rjbhlfbmcnpds5y7by7dyn9b0c11606aikqi8k3x6"))))
12944 (build-system ant-build-system)
12946 `(#:jar-name "eclipse-sisu-inject.jar"
12947 #:source-dir "org.eclipse.sisu.inject/src"
12948 #:tests? #f; no tests
12950 (modify-phases %standard-phases
12952 (install-from-pom "org.eclipse.sisu.inject/pom.xml")))))
12954 `(("java-guice" ,java-guice)
12955 ("java-sisu-inject-parent-pom" ,java-sisu-inject-parent-pom)))
12957 `(("java-guice-servlet" ,java-guice-servlet)
12958 ("java-javax-inject" ,java-javax-inject)
12959 ("java-javaee-servletapi" ,java-javaee-servletapi)
12960 ("java-junit" ,java-junit)
12961 ("java-slf4j-api" ,java-slf4j-api)
12962 ("java-jsr305" ,java-jsr305)
12963 ("java-jsr250" ,java-jsr250)
12964 ("java-cdi-api" ,java-cdi-api)
12965 ("java-osgi-framework" ,java-osgi-framework)
12966 ("java-osgi-util-tracker" ,java-osgi-util-tracker)
12967 ("java-testng" ,java-testng)))
12968 (home-page "https://www.eclipse.org/sisu/")
12969 (synopsis "Classpath scanning, auto-binding, and dynamic auto-wiring")
12970 (description "Sisu is a modular JSR330-based container that supports
12971 classpath scanning, auto-binding, and dynamic auto-wiring. Sisu uses
12972 Google-Guice to perform dependency injection and provide the core JSR330
12973 support, but removes the need to write explicit bindings in Guice modules.
12974 Integration with other containers via the Eclipse Extension Registry and the
12975 OSGi Service Registry is a goal of this project.")
12976 (license license:epl1.0)))
12978 (define java-sisu-inject-parent-pom
12980 (inherit java-eclipse-sisu-inject)
12981 (name "java-sisu-inject-parent-pom")
12985 (modify-phases %standard-phases
12986 (delete 'configure)
12989 (install-pom-file "pom.xml")))))
12990 (propagated-inputs '())))
12992 (define-public java-eclipse-sisu-plexus
12994 (name "java-eclipse-sisu-plexus")
12998 (uri (git-reference
12999 (url "https://github.com/eclipse/sisu.plexus")
13000 (commit (string-append "releases/" version))))
13001 (file-name (git-file-name name version))
13004 "17mjlajnsqnk07cc58h1qpxrif85yb2m2y0pyba48yjjgikk8r9f"))
13005 (modules '((guix build utils)))
13008 (for-each delete-file (find-files "." ".*.jar"))
13009 (rename-file "org.eclipse.sisu.plexus.tests/src"
13010 "org.eclipse.sisu.plexus.tests/java")
13012 (build-system ant-build-system)
13014 `(#:jar-name "eclipse-sisu-plexus.jar"
13015 #:source-dir "org.eclipse.sisu.plexus/src"
13016 #:test-dir "org.eclipse.sisu.plexus.tests"
13019 ;; This test fails probably because we can't generate the necessary
13021 "**/PlexusLoggingTest.*"
13022 ;; FIXME: This test fails because of some injection error
13023 "**/PlexusRequirementTest.*")
13026 (modify-phases %standard-phases
13027 (add-before 'build 'copy-resources
13029 (install-file "org.eclipse.sisu.plexus/META-INF/plexus/components.xml"
13030 "build/classes/META-INF/plexus")
13032 (add-before 'check 'build-test-jar
13034 (with-directory-excursion "org.eclipse.sisu.plexus.tests/resources/component-jar/src/main/"
13036 (with-directory-excursion "java"
13037 (apply invoke "javac" "-cp"
13038 (string-append (getenv "CLASSPATH")
13039 ":../../../../../build/classes")
13040 (find-files "." ".*.java"))
13041 (for-each (lambda (file) (install-file file (string-append "../build/" file)))
13042 (find-files "." ".*.jar")))
13043 (mkdir-p "build/META-INF/plexus")
13044 (copy-file "resources/META-INF/plexus/components.xml"
13045 "build/META-INF/plexus/components.xml")
13046 (with-directory-excursion "build"
13047 (invoke "jar" "cf" "../../../component-jar-0.1.jar" ".")))
13048 (with-directory-excursion "org.eclipse.sisu.plexus.tests/"
13049 (copy-recursively "META-INF" "../build/test-classes/META-INF")
13050 (substitute* "java/org/eclipse/sisu/plexus/DefaultPlexusContainerTest.java"
13051 (("resources/component-jar")
13052 "org.eclipse.sisu.plexus.tests/resources/component-jar")))
13055 (install-from-pom "org.eclipse.sisu.plexus/pom.xml")))))
13057 `(("java-plexus-classworlds" ,java-plexus-classworlds)
13058 ("java-plexus-utils" ,java-plexus-utils)
13059 ("java-plexus-component-annotations" ,java-plexus-component-annotations)
13060 ("java-cdi-api" ,java-cdi-api)
13061 ("java-eclipse-sisu-inject" ,java-eclipse-sisu-inject)
13062 ("java-sisu-plexus-parent-pom" ,java-sisu-plexus-parent-pom)))
13064 `(("java-osgi-framework" ,java-osgi-framework)
13065 ("java-slf4j-api" ,java-slf4j-api)
13066 ("java-javax-inject" ,java-javax-inject)
13067 ("java-guice" ,java-guice)
13068 ("java-guava" ,java-guava)
13069 ("java-aopalliance" ,java-aopalliance)
13070 ("java-asm" ,java-asm)
13071 ("java-cglib" ,java-cglib)))
13073 `(("java-junit" ,java-junit)))
13074 (home-page "https://www.eclipse.org/sisu/")
13075 (synopsis "Plexus support for the sisu container")
13076 (description "Sisu is a modular JSR330-based container that supports
13077 classpath scanning, auto-binding, and dynamic auto-wiring. This package
13078 adds Plexus support to the Sisu-Inject container.")
13079 (license license:epl1.0)))
13081 (define java-sisu-plexus-parent-pom
13083 (inherit java-eclipse-sisu-plexus)
13084 (name "java-sisu-plexus-parent-pom")
13088 (modify-phases %standard-phases
13089 (delete 'configure)
13092 (install-pom-file "pom.xml")))))
13094 `(("java-sonatype-oss-parent-pom-9" ,java-sonatype-oss-parent-pom-9)))))
13096 (define-public java-commons-compiler
13098 (name "java-commons-compiler")
13102 (uri (git-reference
13103 (url "https://github.com/janino-compiler/janino")
13104 (commit "91aa95686d1e4ca3b16a984a03a38686572331b2")))
13105 (file-name (string-append name "-" version))
13108 "04hfdl59sgh20qkxzgnibvs8f9hy6n7znxwpk611y5d89977y62r"))
13109 (modules '((guix build utils)))
13112 (for-each delete-file
13113 (find-files "." "\\.jar$"))
13115 (build-system ant-build-system)
13117 `(#:jar-name "commons-compiler.jar"
13118 #:source-dir "commons-compiler/src/main"
13119 #:tests? #f)); no tests
13120 (home-page "https://github.com/janino-compiler/janino")
13121 (synopsis "Java compiler")
13122 (description "Commons-compiler contains an API for janino, including the
13123 @code{IExpressionEvaluator}, @code{IScriptEvaluator}, @code{IClassBodyEvaluator}
13124 and @code{ISimpleCompiler} interfaces.")
13125 (license license:bsd-3)))
13127 (define-public java-janino
13129 (inherit java-commons-compiler)
13130 (name "java-janino")
13132 `(#:jar-name "janino.jar"
13133 #:source-dir "src/main/java"
13135 (modify-phases %standard-phases
13136 (add-before 'configure 'chdir
13141 `(("java-commons-compiler" ,java-commons-compiler)))
13143 `(("java-junit" ,java-junit)
13144 ("java-hamcrest-core" ,java-hamcrest-core)))
13145 (description "Janino is a Java compiler. Janino can compile a set of
13146 source files to a set of class files like @code{javac}, but also compile a
13147 Java expression, block, class body or source file in memory, load the bytecode
13148 and execute it directly in the same JVM. @code{janino} can also be used for
13149 static code analysis or code manipulation.")))
13151 (define-public java-logback-core
13153 (name "java-logback-core")
13157 (uri (string-append "https://github.com/qos-ch/logback/archive/v_"
13158 version ".tar.gz"))
13159 (file-name (string-append name "-" version ".tar.gz"))
13162 "1x6ga74yfgm94cfx98gybakbrlilx8i2gn6dx13l40kasmys06mi"))
13163 (modules '((guix build utils)))
13166 (delete-file-recursively "logback-access/lib")
13168 (build-system ant-build-system)
13170 `(#:jar-name "logback.jar"
13171 #:source-dir "src/main/java"
13172 #:test-dir "src/test"
13174 ;; These tests fail with Unable to set MockitoNamingPolicy on cglib generator
13175 ;; which creates FastClasses
13176 (list "**/AllCoreTest.*"
13177 "**/AutoFlushingObjectWriterTest.*"
13179 "**/ResilientOutputStreamTest.*"
13180 ;; And we still don't want to run abstract classes
13183 (modify-phases %standard-phases
13184 (add-before 'configure 'chdir
13186 (chdir "logback-core")
13189 `(("java-javax-mail" ,java-javax-mail)
13190 ("servlet" ,java-javaee-servletapi)
13191 ("java-commons-compiler" ,java-commons-compiler)
13192 ("java-janino" ,java-janino)))
13194 `(("java-junit" ,java-junit)
13195 ("java-hamcrest-core" ,java-hamcrest-core)
13196 ("java-mockito-1" ,java-mockito-1)
13197 ("java-cglib" ,java-cglib)
13198 ("java-asm" ,java-asm)
13199 ("java-objenesis" ,java-objenesis)
13200 ("java-joda-time" ,java-joda-time)))
13201 (home-page "https://logback.qos.ch")
13202 (synopsis "Logging for java")
13203 (description "Logback is intended as a successor to the popular log4j project.
13204 This module lays the groundwork for the other two modules.")
13205 ;; Either epl1.0 or lgpl2.1
13206 (license (list license:epl1.0
13207 license:lgpl2.1))))
13209 (define-public java-logback-classic
13211 (inherit java-logback-core)
13212 (name "java-logback-classic")
13214 `(#:jar-name "logback-classic.jar"
13215 #:source-dir "src/main/java"
13216 #:test-dir "src/test"
13217 #:tests? #f; tests require more packages: h2, greenmail, hsql, subethamail, slf4j, log4j, felix
13220 (modify-phases %standard-phases
13221 (add-before 'configure 'chdir
13223 (chdir "logback-classic")
13226 (lambda* (#:key inputs #:allow-other-keys)
13227 (mkdir-p "build/classes")
13228 (setenv "CLASSPATH"
13230 (apply append (map (lambda (input)
13231 (find-files (assoc-ref inputs input)
13233 '("java-logback-core" "java-slf4j-api"
13234 "java-commons-compiler" "servlet"
13237 (apply invoke "groovyc" "-d" "build/classes" "-j"
13238 (find-files "src/main/" ".*\\.(groovy|java)$"))
13239 (invoke "ant" "jar")
13242 `(("java-logback-core" ,java-logback-core)
13243 ("java-slf4j-api" ,java-slf4j-api)
13244 ,@(package-inputs java-logback-core)))
13246 `(("groovy" ,groovy)))
13247 (description "Logback is intended as a successor to the popular log4j project.
13248 This module can be assimilated to a significantly improved version of log4j.
13249 Moreover, @code{logback-classic} natively implements the slf4j API so that you
13250 can readily switch back and forth between logback and other logging frameworks
13251 such as log4j or @code{java.util.logging} (JUL).")))
13253 (define-public java-jgit
13256 (version "4.7.0.201704051617-r")
13259 (uri (string-append "https://repo1.maven.org/maven2/"
13260 "org/eclipse/jgit/org.eclipse.jgit/"
13261 version "/org.eclipse.jgit-"
13262 version "-sources.jar"))
13265 "13ii4jn02ynzq6i7gsyi21k2i94jpc85wf6bcm31q4cyvzv0mk4k"))))
13266 (build-system ant-build-system)
13268 `(#:tests? #f ; There are no tests to run.
13269 #:jar-name "jgit.jar"
13270 ;; JGit must be built with a JDK supporting Java 8.
13272 ;; Target our older default JDK.
13273 #:make-flags (list "-Dtarget=1.7")
13275 (modify-phases %standard-phases
13276 ;; The jar file generated by the default build.xml does not include
13277 ;; the text properties files, so we need to add them.
13278 (add-after 'build 'add-properties
13279 (lambda* (#:key jar-name #:allow-other-keys)
13280 (with-directory-excursion "src"
13281 (apply invoke "jar" "-uf"
13282 (string-append "../build/jar/" jar-name)
13283 (find-files "." "\\.properties$")))
13286 `(("java-classpathx-servletapi" ,java-classpathx-servletapi)
13287 ("java-javaewah" ,java-javaewah)
13288 ("java-jsch" ,java-jsch)
13289 ("java-slf4j-api" ,java-slf4j-api)))
13290 (home-page "https://eclipse.org/jgit/")
13291 (synopsis "Java library implementing the Git version control system")
13292 (description "JGit is a lightweight, pure Java library implementing the
13293 Git version control system, providing repository access routines, support for
13294 network protocols, and core version control algorithms.")
13295 (license license:edl1.0)))
13297 ;; For axoloti. This package can still be built with icedtea-7, which is
13298 ;; currently used as the default JDK.
13299 (define-public java-jgit-4.2
13300 (package (inherit java-jgit)
13301 (version "4.2.0.201601211800-r")
13304 (uri (string-append "https://repo1.maven.org/maven2/"
13305 "org/eclipse/jgit/org.eclipse.jgit/"
13306 version "/org.eclipse.jgit-"
13307 version "-sources.jar"))
13310 "15gm537iivhnzlkjym4x3wn5jqdjdragsw9pdpzqqg21nrc817mm"))))
13311 (build-system ant-build-system)
13313 (substitute-keyword-arguments (package-arguments java-jgit)
13314 ;; Build for default JDK.
13315 ((#:jdk _) icedtea-7)
13317 `(modify-phases ,phases
13318 (add-after 'unpack 'use-latest-javaewah-API
13320 (substitute* "src/org/eclipse/jgit/internal/storage/file/BitmapIndexImpl.java"
13321 (("wordinbits") "WORD_IN_BITS"))
13324 `(("java-javaewah" ,java-javaewah)
13325 ("java-jsch" ,java-jsch)
13326 ("java-slf4j-api" ,java-slf4j-api)))))
13328 (define-public abcl
13335 (uri (string-append "https://abcl.org/releases/"
13336 version "/abcl-src-" version ".tar.gz"))
13339 "0zr5mmqyj484vza089l8vc88d07g0m8ymxzglvar3ydwyvi1x1qx"))
13342 "abcl-fix-build-xml.patch"))))
13343 (build-system ant-build-system)
13345 `(("java-junit" ,java-junit)))
13347 `(#:build-target "abcl.jar"
13348 #:test-target "abcl.test"
13350 (modify-phases %standard-phases
13352 (lambda* (#:key outputs #:allow-other-keys)
13353 (let ((share (string-append (assoc-ref outputs "out")
13355 (bin (string-append (assoc-ref outputs "out")
13358 (install-file "dist/abcl.jar" share)
13359 (install-file "dist/abcl-contrib.jar" share)
13361 (with-output-to-file (string-append bin "abcl")
13363 (let ((classpath (string-append
13366 share "abcl-contrib.jar")))
13367 (display (string-append
13368 "#!" (which "sh") "\n"
13369 "if [[ -z $CLASSPATH ]]; then\n"
13370 " cp=\"" classpath "\"\n"
13372 " cp=\"" classpath ":$CLASSPATH\"\n"
13374 "exec " (which "java")
13375 " -cp $cp org.armedbear.lisp.Main $@\n")))))
13376 (chmod (string-append bin "abcl") #o755)
13378 (home-page "https://abcl.org/")
13379 (synopsis "Common Lisp Implementation on the JVM")
13381 "@dfn{Armed Bear Common Lisp} (ABCL) is a full implementation of the Common
13382 Lisp language featuring both an interpreter and a compiler, running in the
13383 JVM. It supports JSR-223 (Java scripting API): it can be a scripting engine
13384 in any Java application. Additionally, it can be used to implement (parts of)
13385 the application using Java to Lisp integration APIs.")
13386 (license (list license:gpl2+
13387 ;; named-readtables is released under 3 clause BSD
13389 ;; jfli is released under CPL 1.0
13392 (define-public java-jsonp-api
13394 (name "java-jsonp-api")
13398 (uri (git-reference
13399 (url "https://github.com/eclipse-ee4j/jsonp")
13400 (commit (string-append "1.1-" version "-RELEASE"))))
13401 (file-name (git-file-name name version))
13404 "0zrj03hkr3jdmqlb4ipjr37cqpp2q2814qpmxi7srlwpdqs0ibgc"))))
13405 (build-system ant-build-system)
13407 `(#:jar-name "jsonp-api.jar"
13409 #:source-dir "api/src/main/java"
13410 #:test-dir "api/src/test"))
13411 (home-page "https://eclipse-ee4j.github.io/jsonp/")
13412 (synopsis "JSON Processing in Java")
13413 (description "JSON Processing (JSON-P) is a Java API to process (e.g.
13414 parse, generate, transform and query) JSON messages. It produces and
13415 consumes JSON text in a streaming fashion (similar to StAX API for XML)
13416 and allows building a Java object model for JSON text using API classes
13417 (similar to DOM API for XML).")
13418 ;; either gpl2 only with classpath exception, or epl2.0.
13419 (license (list license:gpl2
13422 (define-public java-jsonp-impl
13424 (inherit java-jsonp-api)
13425 (name "java-jsonp-impl")
13427 `(#:jar-name "jsonp-impl.jar"
13429 #:source-dir "impl/src/main/java"
13430 #:test-dir "impl/src/test"
13432 (modify-phases %standard-phases
13433 (add-before 'build 'copy-resources
13436 "impl/src/main/resources/"
13440 `(("java-jsonp-api" ,java-jsonp-api)))
13441 (description "JSON Processing (JSON-P) is a Java API to process (e.g.
13442 parse, generate, transform and query) JSON messages. This package contains
13443 a reference implementation of that API.")))
13445 (define-public java-xmp
13451 (uri (string-append "http://download.macromedia.com/pub/developer"
13452 "/xmp/sdk/XMPCoreJava-" version ".zip"))
13455 "14nai2mmsg7l5ya2y5mx4w4lr1az3sk2fjz6hiy4zdrsavgvl1g7"))))
13456 (build-system ant-build-system)
13458 `(#:build-target "build"
13459 #:tests? #f; no tests
13461 (modify-phases %standard-phases
13462 (add-after 'unpack 'chdir
13466 (add-before 'build 'fix-timestamp
13468 (substitute* "build.xml"
13469 (("\\$\\{BuildDate\\}") "1970 Jan 01 00:00:00-GMT"))
13472 (install-jars "."))
13473 (add-after 'install 'install-doc
13474 (lambda* (#:key outputs #:allow-other-keys)
13477 (string-append (assoc-ref outputs "out") "/share/doc/java-xmp"))
13480 `(("unzip" ,unzip)))
13481 (home-page "https://www.adobe.com/devnet/xmp.html")
13482 (synopsis "Extensible Metadat Platform (XMP) support in Java")
13483 (description "Adobe's Extensible Metadata Platform (XMP) is a labeling
13484 technology that allows you to embed data about a file, known as metadata,
13485 into the file itself. The XMP Toolkit for Java is based on the C++ XMPCore
13486 library and the API is similar.")
13487 (license license:bsd-3)))
13489 (define-public java-args4j
13491 (name "java-args4j")
13495 (uri (git-reference
13496 (url "https://github.com/kohsuke/args4j")
13497 (commit (string-append "args4j-site-" version))))
13498 (file-name (git-file-name name version))
13501 "0w061fg65qrsm1a0lz0vyprsyidj31krjb459qi2lw0y78xza26s"))))
13502 (build-system ant-build-system)
13504 `(#:jar-name "args4j.jar"
13505 #:source-dir "args4j/src"
13506 #:test-dir "args4j/test"
13508 (list "**/ExampleTest.*"
13509 "**/ExternalConfiguredTest.*" ; fails to find a file
13510 ;; We still don't want to run abstract classes
13513 (modify-phases %standard-phases
13514 (add-before 'check 'fix-test-dir
13516 (substitute* "build.xml"
13517 (("/java\">") "\">"))
13519 (add-before 'build 'copy-resources
13521 (let ((from-prefix "args4j/src/org/kohsuke/args4j/")
13522 (to-prefix "build/classes/org/kohsuke/args4j/"))
13523 (for-each (lambda (f)
13525 (string-append from-prefix f)
13526 (string-append to-prefix (dirname f))))
13527 (list "Messages.properties"
13528 "Messages_de.properties"
13529 "Messages_en.properties"
13530 "Messages_ru.properties"
13531 "spi/Messages.properties"
13532 "spi/Messages_de.properties"
13533 "spi/Messages_en.properties"
13534 "spi/Messages_ru.properties")))
13537 `(("java-junit" ,java-junit)))
13538 (home-page "https://args4j.kohsuke.org/")
13539 (synopsis "Command line parser library")
13540 (description "Args4j is a small Java class library that makes it easy to
13541 parse command line options/arguments in your CUI application.")
13542 (license license:expat)))
13544 (define-public java-metadata-extractor
13546 (name "java-metadata-extractor")
13550 (uri (git-reference
13551 (url "https://github.com/drewnoakes/metadata-extractor")
13553 (file-name (git-file-name name version))
13556 "06yrq0swrl1r40yjbk5kqzjxr04jlkq9lfi711jvfgjf5kp2qinj"))))
13557 (build-system ant-build-system)
13559 `(#:jar-name "metadata-extractor.jar"
13560 #:source-dir "Source"
13563 (modify-phases %standard-phases
13564 (add-before 'check 'fix-test-dir
13566 (substitute* "build.xml"
13567 (("/java\">") "\">"))
13570 `(("java-xmp" ,java-xmp)))
13572 `(("java-hamcrest-core" ,java-hamcrest-core)
13573 ("java-junit" ,java-junit)))
13574 (home-page "https://github.com/drewnoakes/metadata-extractor")
13575 (synopsis "Extract metadata from image and video files")
13576 (description "Metadata-extractor is a straightforward Java library for
13577 reading metadata from image files. It is able to read metadata in Exif,
13578 IPTC, XMP, ICC and more formats.")
13579 (license license:asl2.0)))
13581 (define-public java-svg-salamander
13583 (name "java-svg-salamander")
13587 (uri (git-reference
13588 (url "https://github.com/blackears/svgSalamander")
13589 (commit (string-append "v" version))))
13590 (file-name (git-file-name name version))
13593 "1zv3kjdkf6iqf02x6ln76254y634j2ji448y706a65lsbfjmmicf"))
13594 (modules '((guix build utils)))
13597 (for-each delete-file (find-files "." ".*.jar"))
13600 (search-patches "java-svg-salamander-Fix-non-det.patch"))))
13601 (build-system ant-build-system)
13603 `(#:tests? #f; no tests
13605 (modify-phases %standard-phases
13606 (add-after 'unpack 'chdir
13610 (add-before 'build 'copy-jars
13611 (lambda* (#:key inputs #:allow-other-keys)
13612 (copy-file (car (find-files (assoc-ref inputs "javacc") "\\.jar$"))
13613 "../libraries/javacc.jar")
13614 (copy-file (car (find-files (assoc-ref inputs "ant") "ant\\.jar$"))
13615 "../libraries/ant.jar")
13618 (install-jars "dist")))))
13620 `(("javacc" ,javacc)))
13621 (home-page "https://github.com/blackears/svgSalamander")
13622 (synopsis "SVG engine for Java")
13623 (description "SVG Salamander is an SVG engine for Java that's designed
13624 to be small, fast, and allow programmers to use it with a minimum of fuss.
13625 It's in particular targeted for making it easy to integrate SVG into Java
13626 games and making it much easier for artists to design 2D game content - from
13627 rich interactive menus to charts and graphcs to complex animations.")
13628 (license license:bsd-2)))
13630 (define-public java-jboss-transaction-api-spec
13632 (name "java-jboss-transaction-api-spec")
13633 (version "1.2+1.1.1")
13636 (uri (git-reference
13637 (url "https://github.com/jboss/jboss-transaction-api_spec")
13638 (commit "jboss-transaction-api_1.2_spec-1.1.1.Final")))
13639 (file-name (git-file-name name version))
13642 "1xbfq5hvb86izflydxrqqv3k26c1ba2m0ap6m97shqrsdi9by4wy"))))
13643 (build-system ant-build-system)
13645 `(#:jar-name "java-jboss-transaction-api_spec.jar"
13646 #:source-dir "src/main/java"
13647 #:tests? #f)); no tests
13649 `(("java-cdi-api" ,java-cdi-api)
13650 ("java-jboss-interceptors-api-spec" ,java-jboss-interceptors-api-spec)))
13651 (home-page "https://github.com/jboss/jboss-transaction-api_spec")
13652 (synopsis "Generic transaction management API in Java")
13653 (description "Java-jboss-transaction-api-spec implements the Transactions
13654 API. A transaction is a unit of work containing one or more operations
13655 involving one or more shared resources having ACID (Atomicity, Consistency,
13656 Isolation and Durability) properties.")
13657 ;; either gpl2 only with classpath exception or cddl.
13658 (license (list license:gpl2 license:cddl1.0))))
13660 (define-public java-picocli
13662 (name "java-picocli")
13666 (uri (git-reference
13667 (url "https://github.com/remkop/picocli")
13668 (commit (string-append "v" version))))
13669 (file-name (git-file-name name version))
13672 "1sxp6rxjfgjd98ly14b3d15dvxkm5wg4g46w12jyhmr0kmkaca3c"))))
13673 (build-system ant-build-system)
13675 `(#:jar-name "picocli.jar"
13676 #:source-dir "src/main/java"
13677 ;; Tests require missing dependencies (junitparams, system-rules)
13679 (home-page "https://picocli.info")
13680 (synopsis "REPL for the JVM")
13681 (description "Picocli is a framework for building command line applications
13682 for the JVM. It supports colors, autocompletion, subcommands, and more. Written
13683 in Java, usable from Groovy, Kotlin, Scala, etc.")
13684 (license license:asl2.0)))
13686 (define-public java-jetbrains-annotations
13688 (name "java-jetbrains-annotations")
13692 (uri (git-reference
13693 (url "https://github.com/JetBrains/java-annotations")
13695 (file-name (git-file-name name version))
13698 "0z6i1xs60cd5ffz23c49sq68wn5mphhs3xpar1n93ppama2ng80v"))))
13699 (build-system ant-build-system)
13701 `(#:jar-name "jetbrains-annotations.jar"
13702 #:source-dir "common/src/main/java:java8/src/main/java"
13703 #:tests? #f)); no tests
13704 (home-page "https://github.com/JetBrains/java-annotations")
13705 (synopsis "Annotations for Java and other JVM languages")
13706 (description "This package contains a set of Java annotations which can be
13707 used in JVM-based languages. They serve as an additional documentation and
13708 can be interpreted by IDEs and static analysis tools to improve code analysis.")
13709 (license license:expat)))
13711 (define-public java-javaparser
13713 (name "java-javaparser")
13717 (uri (git-reference
13718 (url "https://github.com/javaparser/javaparser")
13719 (commit (string-append "javaparser-parent-" version))))
13720 (file-name (git-file-name name version))
13723 "1a4jk12ffa31fa0y8vda0739vpfj1206p0nha842b7bixbvwamv9"))
13724 (modules '((guix build utils)))
13727 (for-each delete-file
13728 (find-files "." "\\.jar$"))
13730 (build-system ant-build-system)
13732 `(#:tests? #f; tests require jbehave and junit5
13734 (modify-phases %standard-phases
13735 (add-before 'build 'fill-template
13737 (with-directory-excursion "javaparser-core/src/main"
13738 (copy-file "java-templates/com/github/javaparser/JavaParserBuild.java"
13739 "java/com/github/javaparser/JavaParserBuild.java")
13740 (substitute* "java/com/github/javaparser/JavaParserBuild.java"
13741 (("\\$\\{project.version\\}") ,version)
13742 (("\\$\\{project.name\\}") "javaparser")
13743 (("\\$\\{project.build.finalName\\}") "javaparser")
13744 (("\\$\\{maven.version\\}") "fake")
13745 (("\\$\\{maven.build.version\\}") "fake")
13746 (("\\$\\{build.timestamp\\}") "0")
13747 (("\\$\\{java.vendor\\}") "Guix")
13748 (("\\$\\{java.vendor.url\\}") "https://gnu.org/software/guix")
13749 (("\\$\\{java.version\\}") "1.8")
13750 (("\\$\\{os.arch\\}") "any")
13751 (("\\$\\{os.name\\}") "GuixSD")
13752 (("\\$\\{os.version\\}") "not available")))
13754 (add-before 'build 'generate-javacc
13756 (with-directory-excursion "javaparser-core/src/main/java"
13757 (invoke "java" "javacc" "../javacc/java.jj"))
13759 (add-before 'build 'copy-javacc-support
13761 (with-directory-excursion "javaparser-core/src/main"
13762 (copy-recursively "javacc-support" "java"))
13766 (define (build name)
13767 (format #t "Building ~a~%" name)
13768 (delete-file-recursively "build/classes")
13769 (mkdir-p "build/classes")
13770 (apply invoke "javac"
13771 "-cp" (string-append (getenv "CLASSPATH") ":"
13772 (string-join (find-files "build/jar" ".")
13774 "-d" "build/classes"
13775 (find-files (string-append name "/src/main/java")
13777 (invoke "jar" "-cf" (string-append "build/jar/" name ".jar")
13778 "-C" "build/classes" "."))
13779 (mkdir-p "build/classes")
13780 (mkdir-p "build/test-classes")
13781 (mkdir-p "build/jar")
13782 (build "javaparser-core")
13783 (build "javaparser-core-serialization")
13784 (build "javaparser-core-generators")
13785 (build "javaparser-core-metamodel-generator")
13786 (build "javaparser-symbol-solver-core")
13789 (install-jars "build/jar")))))
13791 `(("java-guava" ,java-guava)
13792 ("java-jboss-javassist" ,java-jboss-javassist)
13793 ("java-jsonp-api" ,java-jsonp-api)))
13795 `(("javacc" ,javacc)))
13796 (home-page "http://javaparser.org/")
13797 (synopsis "Parser for Java")
13799 "This project contains a set of libraries implementing a Java 1.0 - Java
13800 11 Parser with advanced analysis functionalities.")
13802 ;; either lgpl or asl