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 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 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)
1752 ,@(substitute-keyword-arguments (package-arguments icedtea-7)
1753 ((#:modules modules)
1754 `((guix build utils)
1755 (guix build gnu-build-system)
1756 ((guix build ant-build-system) #:prefix ant:)
1761 ((#:configure-flags flags)
1762 `(let ((jdk (assoc-ref %build-inputs "jdk")))
1763 `( ;;"--disable-bootstrap"
1764 "--enable-bootstrap"
1766 ,(string-append "--with-parallel-jobs="
1767 (number->string (parallel-job-count)))
1768 "--disable-downloading"
1769 "--disable-system-pcsc"
1770 "--disable-system-sctp"
1771 "--disable-tests" ;they are run in the check phase instead
1772 "--with-openjdk-src-dir=./openjdk.src"
1773 ,(string-append "--with-jdk-home=" jdk))))
1775 `(modify-phases ,phases
1776 (delete 'fix-x11-extension-include-path)
1777 (delete 'patch-paths)
1778 (delete 'set-additional-paths)
1779 (delete 'patch-patches)
1780 (delete 'patch-bitrot)
1781 ;; Prevent the keytool from recording the current time when
1782 ;; adding certificates at build time.
1783 (add-after 'unpack 'patch-keystore
1785 (substitute* "openjdk.src/jdk/src/share/classes/sun/security/provider/JavaKeyStore.java"
1786 (("date = new Date\\(\\);")
1788 date = (System.getenv(\"SOURCE_DATE_EPOCH\") != null) ?\
1789 new Date(Long.parseLong(System.getenv(\"SOURCE_DATE_EPOCH\"))) :\
1792 (add-after 'unpack 'patch-jni-libs
1793 ;; Hardcode dynamically loaded libraries.
1795 (let* ((library-path (search-path-as-string->list
1796 (getenv "LIBRARY_PATH")))
1797 (find-library (lambda (name)
1800 (string-append "lib" name ".so")))))
1803 (catch 'decoding-error
1806 (("VERSIONED_JNI_LIB_NAME\\(\"(.*)\", \"(.*)\"\\)"
1808 (format #f "\"~a\"" (find-library name)))
1809 (("JNI_LIB_NAME\\(\"(.*)\"\\)" _ name)
1810 (format #f "\"~a\"" (find-library name)))))
1812 ;; Those are safe to skip.
1813 (format (current-error-port)
1814 "warning: failed to substitute: ~a~%"
1816 (find-files "openjdk.src/jdk/src/solaris/native"
1820 (lambda* (#:key outputs #:allow-other-keys)
1821 (let ((doc (string-append (assoc-ref outputs "doc")
1822 "/share/doc/icedtea"))
1823 (jre (assoc-ref outputs "out"))
1824 (jdk (assoc-ref outputs "jdk")))
1825 (copy-recursively "openjdk.build/docs" doc)
1826 (copy-recursively "openjdk.build/images/j2re-image" jre)
1827 (copy-recursively "openjdk.build/images/j2sdk-image" jdk)
1828 ;; Install the nss.cfg file to JRE to enable SSL/TLS
1830 (copy-file (string-append jdk "/jre/lib/security/nss.cfg")
1831 (string-append jre "/lib/security/nss.cfg"))
1833 (add-after 'install 'strip-jar-timestamps
1834 (assoc-ref ant:%standard-phases 'strip-jar-timestamps)))))))
1836 `(("jdk" ,icedtea-7 "jdk")
1839 "1mj6xgmw31i6qd30qi9dmv7160fbcfq5ikz1jwjihdg2793il19p"))
1842 "1wb8k5zm40zld0986dvmlh5xh3gyixbg9h26sl662zy92amhmyyg"))
1845 "11ma4zz0599cy70xd219v7a8vin7p96xrhhz3wsaw6cjhkzpagah"))
1848 "14m1y0z0fbm5z5zjw3vnq85py8dma84bi3f9cw8rhdyc6skk8q4i"))
1851 "09andnm6xaasnp963hgx42yiflifiljp9z7z85jrfyc5z8a5whmf"))
1854 "0s6lcpc0zckz2fnq98aqf28nz9y3wbi41a3kyaqqa2abwbkm1zwl"))
1857 "15wizy123vhk40chl1b4p552jf2pw2hdww0myf11qab425axz4nw"))
1860 "1ciz1w9j0kz7s1dxdhyqq71nla9icyz6qvn0b9z2zgkklqa98qmm"))
1863 "19pzl3ppaw8j6r5cnyp8qiw3hxijh3hdc46l39g5yfhdl4pr4hpa"))
1866 "0k33anxdzw1icn072wynfmmdjhsv50hay0j1sfkfxny12rb3vgdy"))
1867 ,@(fold alist-delete (package-native-inputs icedtea-7)
1868 '("jdk" "openjdk-src" "corba-drop" "jaxp-drop" "jaxws-drop"
1869 "jdk-drop" "langtools-drop" "hotspot-drop")))))))
1871 (define-public openjdk9
1877 (uri "https://hg.openjdk.java.net/jdk/jdk/archive/3cc80be736f2.tar.bz2")
1878 (file-name (string-append name "-" version ".tar.bz2"))
1881 "01ihmyf7k5z17wbr7xig7y40l9f01d5zjgkcmawn1102hw5kchpq"))
1882 (modules '((guix build utils)))
1885 (for-each delete-file
1886 (find-files "." ".*.(bin|exe|jar)$"))
1888 (build-system gnu-build-system)
1889 (outputs '("out" "jdk" "doc"))
1891 `(#:tests? #f; require jtreg
1892 #:make-flags '("all")
1894 ((guix build syscalls)
1895 ,@%gnu-build-system-modules)
1897 (modify-phases %standard-phases
1898 (add-after 'patch-source-shebangs 'fix-java-shebangs
1900 ;; This file was "fixed" by patch-source-shebangs, but it requires
1901 ;; this exact first line.
1902 (substitute* "jdk/make/data/blacklistedcertsconverter/blacklisted.certs.pem"
1903 (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))
1906 (lambda* (#:key inputs outputs #:allow-other-keys)
1907 ;; TODO: unbundle libpng and lcms
1908 (invoke "bash" "./configure"
1909 (string-append "--with-freetype=" (assoc-ref inputs "freetype"))
1910 "--disable-freetype-bundling"
1911 "--disable-warnings-as-errors"
1912 "--disable-hotspot-gtest"
1913 "--with-giflib=system"
1914 "--with-libjpeg=system"
1915 (string-append "--prefix=" (assoc-ref outputs "out")))
1917 (add-before 'build 'write-source-revision-file
1919 (with-output-to-file ".src-rev"
1921 (display ,version)))
1924 (lambda* (#:key make-flags parallel-build? #:allow-other-keys)
1925 (apply invoke "make"
1926 `(,@(if parallel-build?
1927 (list (string-append "JOBS="
1928 (number->string (parallel-job-count))))
1931 (add-after 'unpack 'patch-jni-libs
1932 ;; Hardcode dynamically loaded libraries.
1934 (let* ((library-path (search-path-as-string->list
1935 (getenv "LIBRARY_PATH")))
1936 (find-library (lambda (name)
1939 (string-append "lib" name ".so")))))
1942 (catch 'decoding-error
1945 (("VERSIONED_JNI_LIB_NAME\\(\"(.*)\", \"(.*)\"\\)"
1947 (format #f "\"~a\"" (find-library name)))
1948 (("JNI_LIB_NAME\\(\"(.*)\"\\)" _ name)
1949 (format #f "\"~a\"" (find-library name)))))
1951 ;; Those are safe to skip.
1952 (format (current-error-port)
1953 "warning: failed to substitute: ~a~%"
1958 ;; Some of the libraries in the lib/ folder link to libjvm.so.
1959 ;; But that shared object is located in the server/ folder, so it
1960 ;; cannot be found. This phase creates a symbolic link in the
1961 ;; lib/ folder so that the other libraries can find it.
1964 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
1966 ;; FIXME: Find the bug in the build system, so that this symlink is
1968 (add-after 'install 'install-libjvm
1969 (lambda* (#:key inputs outputs #:allow-other-keys)
1970 (let* ((lib-out (string-append (assoc-ref outputs "out")
1972 (lib-jdk (string-append (assoc-ref outputs "jdk")
1974 (symlink (string-append lib-jdk "/server/libjvm.so")
1975 (string-append lib-jdk "/libjvm.so"))
1976 (symlink (string-append lib-out "/server/libjvm.so")
1977 (string-append lib-out "/libjvm.so")))
1980 (lambda* (#:key outputs #:allow-other-keys)
1981 (let ((out (assoc-ref outputs "out"))
1982 (jdk (assoc-ref outputs "jdk"))
1983 (doc (assoc-ref outputs "doc"))
1984 (images (car (find-files "build" ".*-server-release"
1985 #:directories? #t))))
1986 (copy-recursively (string-append images "/images/jdk") jdk)
1987 (copy-recursively (string-append images "/images/jre") out)
1988 (copy-recursively (string-append images "/images/docs") doc))
1990 (add-after 'install 'strip-zip-timestamps
1991 (lambda* (#:key outputs #:allow-other-keys)
1992 (use-modules (guix build syscalls))
1993 (for-each (lambda (zip)
1994 (let ((dir (mkdtemp! "zip-contents.XXXXXX")))
1995 (with-directory-excursion dir
1996 (invoke "unzip" zip))
1998 (for-each (lambda (file)
1999 (let ((s (lstat file)))
2000 (unless (eq? (stat:type s) 'symlink)
2001 (format #t "reset ~a~%" file)
2002 (utime file 0 0 0 0))))
2003 (find-files dir #:directories? #t))
2004 (with-directory-excursion dir
2005 (let ((files (find-files "." ".*" #:directories? #t)))
2006 (apply invoke "zip" "-0" "-X" zip files)))))
2007 (find-files (assoc-ref outputs "doc") ".*.zip$"))
2010 `(("alsa-lib" ,alsa-lib)
2012 ("fontconfig" ,fontconfig)
2013 ("freetype" ,freetype)
2017 ("libjpeg" ,libjpeg-turbo)
2021 ("libxcomposite" ,libxcomposite)
2023 ("libxinerama" ,libxinerama)
2024 ("libxrender" ,libxrender)
2026 ("libxtst" ,libxtst)))
2028 `(("icedtea-8" ,icedtea-8)
2029 ("icedtea-8:jdk" ,icedtea-8 "jdk")
2030 ;; XXX: The build system fails with newer versions of GNU Make.
2031 ("make@4.2" ,gnu-make-4.2)
2035 (home-page "https://openjdk.java.net/projects/jdk9/")
2036 (synopsis "Java development kit")
2038 "This package provides the Java development kit OpenJDK.")
2039 (license license:gpl2+)))
2041 (define-public openjdk10
2048 (uri "http://hg.openjdk.java.net/jdk/jdk/archive/6fa770f9f8ab.tar.bz2")
2049 (file-name (string-append name "-" version ".tar.bz2"))
2052 "0zywq2203b4hx4jms9vbwvjcj1d3k2v3qpx4s33729fkpmid97r4"))
2053 (patches (search-patches
2054 "openjdk-10-idlj-reproducibility.patch"))
2055 (modules '((guix build utils)))
2058 (for-each delete-file (find-files "." ".*.(bin|exe|jar)$"))
2061 (substitute-keyword-arguments (package-arguments openjdk9)
2063 `(modify-phases ,phases
2064 (replace 'fix-java-shebangs
2066 ;; This file was "fixed" by patch-source-shebangs, but it requires
2067 ;; this exact first line.
2068 (substitute* "make/data/blacklistedcertsconverter/blacklisted.certs.pem"
2069 (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))
2072 (lambda* (#:key inputs outputs #:allow-other-keys)
2073 (invoke "bash" "./configure"
2074 (string-append "--with-freetype=" (assoc-ref inputs "freetype"))
2075 "--disable-freetype-bundling"
2076 "--disable-warnings-as-errors"
2077 "--disable-hotspot-gtest"
2078 "--with-giflib=system"
2079 "--with-libjpeg=system"
2080 "--with-native-debug-symbols=zipped"
2081 (string-append "--prefix=" (assoc-ref outputs "out")))
2084 `(("openjdk9" ,openjdk9)
2085 ("openjdk9:jdk" ,openjdk9 "jdk")
2086 ("make@4.2" ,gnu-make-4.2)
2091 (define-public openjdk11
2097 (uri "http://hg.openjdk.java.net/jdk/jdk/archive/76072a077ee1.tar.bz2")
2098 (file-name (string-append name "-" version ".tar.bz2"))
2101 "0v705w1s9lrqalzahir78pk397rkk9gfvzq821yv8h3xha0bqi6w"))
2102 (modules '((guix build utils)))
2105 (for-each delete-file (find-files "." ".*.(bin|exe|jar)$"))
2107 (build-system gnu-build-system)
2108 (outputs '("out" "jdk" "doc"))
2110 `(#:imported-modules
2111 ((guix build syscalls)
2112 (ice-9 binary-ports)
2114 ,@%gnu-build-system-modules)
2115 #:tests? #f; requires jtreg
2116 ;; TODO package jtreg
2118 `("--disable-option-checking" ; --enable-fast-install default flag errors otherwise
2119 "--disable-warnings-as-errors"
2120 ;; make validate-runpath pass, see: http://issues.guix.info/issue/32894
2121 "--with-native-debug-symbols=zipped"
2122 ;; do not use the bundled libraries
2123 "--with-giflib=system"
2124 "--with-lcms=system"
2125 "--with-libjpeg=system"
2126 "--with-libpng=system"
2127 "--with-version-pre="
2128 ;; allow the build system to locate the system freetype
2129 ,(string-append "--with-freetype-include="
2130 (assoc-ref %build-inputs "freetype") "/include")
2131 ,(string-append "--with-freetype-lib="
2132 (assoc-ref %build-inputs "freetype") "/lib"))
2134 (modify-phases %standard-phases
2135 (add-after 'patch-source-shebangs 'fix-java-shebangs
2137 ;; This file was "fixed" by patch-source-shebangs, but it requires
2138 ;; this exact first line.
2139 (substitute* "make/data/blacklistedcertsconverter/blacklisted.certs.pem"
2140 (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))
2142 (add-after 'unpack 'patch-jni-libs
2143 ;; Hardcode dynamically loaded libraries.
2145 (let* ((library-path (search-path-as-string->list
2146 (getenv "LIBRARY_PATH")))
2147 (find-library (lambda (name)
2150 (string-append "lib" name ".so")))))
2153 (catch 'decoding-error
2156 (("VERSIONED_JNI_LIB_NAME\\(\"(.*)\", \"(.*)\"\\)"
2158 (format #f "\"~a\"" (find-library name)))
2159 (("JNI_LIB_NAME\\(\"(.*)\"\\)" _ name)
2160 (format #f "\"~a\"" (find-library name)))))
2162 ;; Those are safe to skip.
2163 (format (current-error-port)
2164 "warning: failed to substitute: ~a~%"
2169 (add-before 'build 'write-source-revision-file
2171 (with-output-to-file ".src-rev"
2173 (display ,version)))
2176 (lambda* (#:key parallel-build? make-flags #:allow-other-keys)
2177 (apply invoke "make" "all"
2178 `(,@(if parallel-build?
2179 (list (string-append "JOBS="
2180 (number->string (parallel-job-count))))
2183 ;; jdk 11 does not build jre by default any more
2184 ;; building it anyways
2185 ;; for further information see:
2186 ;; https://github.com/AdoptOpenJDK/openjdk-build/issues/356
2187 (add-after 'build 'build-jre
2188 (lambda* (#:key parallel-build? make-flags #:allow-other-keys)
2189 (apply invoke "make" "legacy-jre-image"
2190 `(,@(if parallel-build?
2191 (list (string-append "JOBS="
2192 (number->string (parallel-job-count))))
2196 (lambda* (#:key outputs #:allow-other-keys)
2197 (let ((out (assoc-ref outputs "out"))
2198 (jdk (assoc-ref outputs "jdk"))
2199 (doc (assoc-ref outputs "doc"))
2200 (images (car (find-files "build" ".*-server-release"
2201 #:directories? #t))))
2202 (copy-recursively (string-append images "/images/jdk") jdk)
2203 (copy-recursively (string-append images "/images/jre") out)
2204 (copy-recursively (string-append images "/images/docs") doc))
2206 ;; Some of the libraries in the lib/ folder link to libjvm.so.
2207 ;; But that shared object is located in the server/ folder, so it
2208 ;; cannot be found. This phase creates a symbolic link in the
2209 ;; lib/ folder so that the other libraries can find it.
2212 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
2214 ;; FIXME: Find the bug in the build system, so that this symlink is
2216 (add-after 'install 'install-libjvm
2217 (lambda* (#:key inputs outputs #:allow-other-keys)
2218 (let* ((lib-out (string-append (assoc-ref outputs "out")
2220 (lib-jdk (string-append (assoc-ref outputs "jdk")
2222 (symlink (string-append lib-jdk "/server/libjvm.so")
2223 (string-append lib-jdk "/libjvm.so"))
2224 (symlink (string-append lib-out "/server/libjvm.so")
2225 (string-append lib-out "/libjvm.so")))
2227 (add-after 'install 'strip-character-data-timestamps
2228 (lambda* (#:key outputs #:allow-other-keys)
2229 (use-modules (guix build syscalls))
2230 (let ((archive (string-append
2231 (assoc-ref outputs "jdk") "/lib/src.zip"))
2232 (dir (mkdtemp! "zip-contents.XXXXXX")))
2233 (with-directory-excursion dir
2234 (invoke "unzip" archive))
2235 (delete-file archive)
2236 (with-directory-excursion dir
2237 (let ((char-data-files (find-files "." "CharacterData.*")))
2238 (for-each (lambda (file)
2240 (((string-append "This file was generated "
2241 "AUTOMATICALLY from a template "
2243 (string-append "This file was generated "
2244 "AUTOMATICALLY from a template "
2247 (with-directory-excursion dir
2248 (let ((files (find-files "." ".*" #:directories? #t)))
2249 (apply invoke "zip" "-0" "-X" archive files))))))
2250 (add-after 'strip-character-data-timestamps 'strip-archive-timestamps
2251 (lambda* (#:key outputs #:allow-other-keys)
2252 (use-modules (guix build syscalls)
2253 (ice-9 binary-ports)
2255 (letrec ((repack-archive
2257 (let ((dir (mkdtemp! "zip-contents.XXXXXX")))
2258 (with-directory-excursion dir
2259 (invoke "unzip" archive))
2260 (delete-file archive)
2261 (for-each (compose repack-archive canonicalize-path)
2262 (find-files dir "(ct.sym|.*.jar)$"))
2263 (let ((reset-file-timestamp
2265 (let ((s (lstat file)))
2266 (unless (eq? (stat:type s) 'symlink)
2267 (format #t "reset ~a~%" file)
2268 (utime file 0 0 0 0))))))
2269 (for-each reset-file-timestamp
2270 (find-files dir #:directories? #t)))
2271 (with-directory-excursion dir
2272 (let ((files (find-files "." ".*" #:directories? #t)))
2273 (apply invoke "zip" "-0" "-X" archive files)))))))
2274 (for-each repack-archive
2275 (find-files (assoc-ref outputs "doc") ".*.zip$"))
2276 (for-each repack-archive
2277 (find-files (assoc-ref outputs "jdk")
2278 ".*.(zip|jar|diz)$"))
2279 (repack-archive (string-append (assoc-ref outputs "jdk") "/lib/ct.sym"))
2282 (call-with-input-file file-name
2284 (let ((header #vu8(#x4a #x4d #x01 #x00)))
2285 (if (equal? (get-bytevector-n
2286 file (bytevector-length header))
2288 (let* ((header-length (bytevector-length header))
2289 (temp-file (mkstemp!
2291 "temp-file.XXXXXX")))
2292 (temp-filename (port-filename temp-file))
2294 (- (stat:size (stat file))
2296 (sendfile temp-file file content-length header-length)
2297 (delete-file file-name)
2298 (close-port temp-file)
2299 (repack-archive (canonicalize-path temp-filename))
2300 (call-with-output-file file-name
2302 (put-bytevector file header)
2303 (call-with-input-file temp-filename
2307 (stat:size (stat temp-file)) 0)))))))))))))
2308 (for-each repack-jmod
2309 (find-files (assoc-ref outputs "jdk") ".*.jmod$")))
2311 (add-after 'install 'remove-timestamp-from-api-summary
2312 (lambda* (#:key outputs #:allow-other-keys)
2313 (substitute* (string-append (assoc-ref outputs "doc")
2314 "/api/overview-summary.html")
2315 (("Generated by javadoc \\(11-internal\\).*$")
2316 "Generated by javadoc (11-internal) -->\n"))
2319 `(("alsa-lib" ,alsa-lib)
2321 ("fontconfig" ,fontconfig)
2322 ("freetype" ,freetype)
2325 ("libjpeg" ,libjpeg-turbo)
2328 ("libxext" ,libxext)
2329 ("libxrender" ,libxrender)
2331 ("libxtst" ,libxtst)))
2333 `(("autoconf" ,autoconf)
2334 ("openjdk10" ,openjdk10)
2335 ("openjdk10:jdk" ,openjdk10 "jdk")
2336 ("make" ,gnu-make-4.2)
2337 ("pkg-config" ,pkg-config)
2341 (home-page "https://openjdk.java.net/projects/jdk/11/")
2342 (synopsis "Java development kit")
2344 "This package provides the Java development kit OpenJDK.")
2345 (license license:gpl2+)))
2347 (define-public openjdk12
2354 (uri "http://hg.openjdk.java.net/jdk/jdk/archive/0276cba45aac.tar.bz2")
2355 (file-name (string-append name "-" version ".tar.bz2"))
2358 "0mbhdrk12b6878kby0flnbak7444dlpm0ihlmf92vk59y1c02bc2"))
2359 (modules '((guix build utils)))
2362 (for-each delete-file (find-files "." ".*.(bin|exe|jar)$"))
2365 `(("alsa-lib" ,alsa-lib)
2367 ("fontconfig" ,fontconfig)
2368 ("freetype" ,freetype)
2371 ("libjpeg" ,libjpeg-turbo)
2374 ("libxext" ,libxext)
2375 ("libxrandr" ,libxrandr)
2376 ("libxrender" ,libxrender)
2378 ("libxtst" ,libxtst)))
2380 `(("autoconf" ,autoconf)
2381 ("openjdk11" ,openjdk11)
2382 ("openjdk11:jdk" ,openjdk11 "jdk")
2383 ("make@4.2" ,gnu-make-4.2)
2384 ("pkg-config" ,pkg-config)
2388 (home-page "https://openjdk.java.net/projects/jdk/12")))
2390 (define-public openjdk13
2397 (uri "http://hg.openjdk.java.net/jdk/jdk13/archive/9c250a7600e1.tar.bz2")
2398 (file-name (string-append name "-" version ".tar.bz2"))
2401 "0v0ljvx5dyzp96dw4z4ksw3pvasil7783mgnmd1wk9gads5ab8iq"))
2402 (modules '((guix build utils)))
2405 (for-each delete-file (find-files "." ".*.(bin|exe|jar)$"))
2408 `(("alsa-lib" ,alsa-lib)
2410 ("fontconfig" ,fontconfig)
2411 ("freetype" ,freetype)
2414 ("libjpeg" ,libjpeg-turbo)
2417 ("libxext" ,libxext)
2418 ("libxrandr" ,libxrandr)
2419 ("libxrender" ,libxrender)
2421 ("libxtst" ,libxtst)))
2423 `(("autoconf" ,autoconf)
2424 ("openjdk12:jdk" ,openjdk12 "jdk")
2425 ("make@4.2" ,gnu-make-4.2)
2426 ("pkg-config" ,pkg-config)
2430 (home-page "https://openjdk.java.net/projects/jdk/13")))
2432 (define-public openjdk14
2439 (uri "http://hg.openjdk.java.net/jdk/jdk14/archive/bc54620a3848.tar.bz2")
2440 (file-name (string-append name "-" version ".tar.bz2"))
2443 "0z485pk7r1xpw8004g4nrwrzj17sabgx8yfdbxwfvzkjp8qyajch"))
2444 (modules '((guix build utils)))
2447 ;; The m4 macro uses 'help' to search for builtins, which is
2448 ;; not available in bash-minimal
2449 (substitute* "make/autoconf/basics.m4"
2450 (("if help") "if command -v"))
2451 (for-each delete-file (find-files "." ".*.(bin|exe|jar)$"))
2454 `(("alsa-lib" ,alsa-lib)
2456 ("fontconfig" ,fontconfig)
2457 ("freetype" ,freetype)
2460 ("libjpeg" ,libjpeg-turbo)
2463 ("libxext" ,libxext)
2464 ("libxrandr" ,libxrandr)
2465 ("libxrender" ,libxrender)
2467 ("libxtst" ,libxtst)))
2469 `(("autoconf" ,autoconf)
2470 ("make@4.2" ,gnu-make-4.2)
2471 ("openjdk13:jdk" ,openjdk13 "jdk")
2472 ("pkg-config" ,pkg-config)
2476 (home-page "https://openjdk.java.net/projects/jdk/14")))
2478 (define-public icedtea icedtea-8)
2481 (define-public ant/java8
2482 (package (inherit ant-bootstrap)
2487 (uri (string-append "mirror://apache/ant/source/apache-ant-"
2488 version "-src.tar.gz"))
2491 "0x78434q5ab193ma7ys27m9kwpdgrfzqj00hrf1szwcgk0lzw01z"))
2492 (modules '((guix build utils)))
2495 (for-each delete-file
2496 (find-files "lib/optional" "\\.jar$"))
2499 (substitute-keyword-arguments (package-arguments ant-bootstrap)
2501 `(modify-phases ,phases
2502 (add-after 'unpack 'remove-scripts
2503 ;; Remove bat / cmd scripts for DOS as well as the antRun and runant
2506 (for-each delete-file
2507 (find-files "src/script"
2508 "(.*\\.(bat|cmd)|runant.*|antRun.*)"))
2511 (lambda* (#:key inputs outputs #:allow-other-keys)
2512 (setenv "JAVA_HOME" (assoc-ref inputs "jdk"))
2514 ;; Disable tests to avoid dependency on hamcrest-core, which needs
2515 ;; Ant to build. This is necessary in addition to disabling the
2516 ;; "check" phase, because the dependency on "test-jar" would always
2517 ;; result in the tests to be run.
2518 (substitute* "build.xml"
2519 (("depends=\"jars,test-jar") "depends=\"jars"))
2520 (invoke "bash" "bootstrap.sh"
2521 (string-append "-Ddist.dir="
2522 (assoc-ref outputs "out")))))))))
2524 `(("jdk" ,icedtea-8 "jdk")
2526 ("unzip" ,unzip)))))
2528 ;; The 1.9.x series is the last that can be built with GCJ. The 1.10.x series
2531 (package (inherit ant/java8)
2535 (uri (string-append "mirror://apache/ant/source/apache-ant-"
2536 version "-src.tar.gz"))
2539 "1xy30f1w5gaqk6g3f0vw7ygix4rb6032qkcw42y4z8wd9jihgygd"))))
2541 `(("jdk" ,icedtea-7 "jdk")
2543 ("unzip" ,unzip)))))
2545 (define-public ant-apache-bcel
2548 (name "ant-apache-bcel")
2550 (substitute-keyword-arguments (package-arguments ant/java8)
2552 `(modify-phases ,phases
2553 (add-after 'unpack 'link-bcel
2554 (lambda* (#:key inputs #:allow-other-keys)
2555 (for-each (lambda (file)
2557 (string-append "lib/optional/"
2559 (find-files (assoc-ref inputs "java-commons-bcel")
2562 (add-after 'build 'install
2563 (lambda* (#:key outputs #:allow-other-keys)
2564 (let* ((out (assoc-ref outputs "out"))
2565 (share (string-append out "/share/java"))
2566 (bin (string-append out "/bin"))
2567 (lib (string-append out "/lib")))
2569 (install-file (string-append lib "/ant-apache-bcel.jar") share)
2570 (delete-file-recursively bin)
2571 (delete-file-recursively lib)
2574 `(("java-commons-bcel" ,java-commons-bcel)
2575 ,@(package-inputs ant/java8)))))
2577 (define-public ant-junit
2582 (substitute-keyword-arguments (package-arguments ant/java8)
2584 `(modify-phases ,phases
2585 (add-after 'unpack 'link-junit
2586 (lambda* (#:key inputs #:allow-other-keys)
2587 (for-each (lambda (file)
2589 (string-append "lib/optional/"
2591 (find-files (assoc-ref inputs "java-junit")
2594 (add-after 'build 'install
2595 (lambda* (#:key outputs #:allow-other-keys)
2596 (let* ((out (assoc-ref outputs "out"))
2597 (share (string-append out "/share/java"))
2598 (bin (string-append out "/bin"))
2599 (lib (string-append out "/lib")))
2601 (install-file (string-append lib "/ant-junit.jar") share)
2602 (delete-file-recursively bin)
2603 (delete-file-recursively lib)
2606 `(("java-junit" ,java-junit)
2607 ,@(package-inputs ant/java8)))))
2609 (define-public java-openjfx-build
2611 (name "java-openjfx-build")
2612 ;; This is a java-8 version
2617 (url "http://hg.openjdk.java.net/openjfx/8u-dev/rt")
2618 (changeset (string-append
2619 (string-join (string-split version #\.) "u")
2621 (file-name (string-append name "-" version "-checkout"))
2622 (modules '((guix build utils)))
2625 ;; Delete included gradle jar
2626 (delete-file-recursively "gradle/wrapper")
2630 "0yg38mwpivswccv9n96k06x3iv82i4px1a9xg9l8dswzwmfj259f"))
2631 (patches (search-patches "java-openjfx-build-jdk_version.patch"))))
2632 (build-system ant-build-system)
2634 `(#:jar-name "java-openjfx.jar"
2635 #:source-dir "buildSrc/src/main/java"
2636 #:test-dir "buildSrc/src/test"
2638 (modify-phases %standard-phases
2639 (add-before 'configure 'generate-jsl-parser
2641 (invoke "antlr3" "-o"
2642 "buildSrc/src/main/java/com/sun/scenario/effect/compiler"
2643 "buildSrc/src/main/antlr/JSL.g"))))))
2645 `(("antlr3" ,antlr3)
2646 ("java-stringtemplate" ,java-stringtemplate)))
2648 `(("java-junit" ,java-junit)
2649 ("java-hamcrest-core" ,java-hamcrest-core)))
2650 (home-page "https://openjfx.io")
2651 (synopsis "Graphical application toolkit in Java")
2652 (description "OpenJFX is a client application platform for desktop,
2653 mobile and embedded systems built on Java. Its goal is to produce a
2654 modern, efficient, and fully featured toolkit for developing rich client
2655 applications. This package contains base classes for the OpenJFX
2656 distribution and helper classes for building other parts of the
2658 (license license:gpl2))) ;gpl2 only, with classpath exception
2660 (define-public java-openjfx-base
2661 (package (inherit java-openjfx-build)
2662 (name "java-openjfx-base")
2664 `(#:jar-name "java-openjfx-base.jar"
2665 #:source-dir "modules/base/src/main/java:modules/base/src/main/java8:modules/base/src/main/version-info"
2666 #:test-dir "modules/base/src/test"
2668 (modify-phases %standard-phases
2669 (add-before 'check 'remove-empty-file
2671 (with-directory-excursion "modules/base/src/test/java"
2672 ;; These files are completely commented, but junit expects them to
2673 ;; contain a class, so tests fail.
2675 "com/sun/javafx/property/adapter/PropertyDescriptorTest.java")
2677 "com/sun/javafx/property/adapter/ReadOnlyPropertyDescriptorTest.java")
2678 (delete-file "javafx/beans/property/PropertiesTest.java")
2680 "javafx/beans/property/adapter/ReadOnlyJavaBeanPropertyBuilder_General_Test.java")
2682 (delete-file "com/sun/javafx/runtime/VersionInfoTest.java"))
2685 `(("java-openjfx-build" ,java-openjfx-build)))
2686 (description "OpenJFX is a client application platform for desktop,
2687 mobile and embedded systems built on Java. Its goal is to produce a
2688 modern, efficient, and fully featured toolkit for developing rich client
2689 applications. This package contains base classes for the OpenJFX
2692 (define-public java-openjfx-graphics
2693 (package (inherit java-openjfx-build)
2694 (name "java-openjfx-graphics")
2696 `(#:jar-name "java-openjfx-graphics.jar"
2697 #:source-dir "modules/graphics/src/main/java"
2698 #:tests? #f; require X
2699 #:test-dir "modules/graphics/src/test"
2701 (modify-phases %standard-phases
2702 (add-after 'unpack 'copy-missing-file
2703 (lambda* (#:key inputs #:allow-other-keys)
2704 (let ((target "modules/graphics/src/main/native-prism-sw/JNativeSurface.c"))
2705 (copy-file (assoc-ref inputs "JNativeSurface.c") target)
2706 ;; XXX: looks like the missing file we found isn't *quite*
2709 (("case TYPE_INT_ARGB:") "")))))
2710 (add-after 'build 'build-native
2711 (lambda* (#:key inputs outputs #:allow-other-keys)
2712 (let ((jdk (assoc-ref inputs "jdk"))
2713 (class-file->class-name
2714 (lambda (class-file)
2715 (string-map (lambda (c)
2716 (if (char=? c #\/) #\. c))
2717 (string-drop-right class-file
2718 (string-length ".class"))))))
2720 (string-append "-DINLINE=inline "
2722 "-I" jdk "/include "
2723 "-I" jdk "/include/linux "
2724 "-I " (getcwd) "/build/classes/include "
2725 "-I " (getcwd) "/modules/graphics/src/main/native-prism-sw"))
2727 ;; Instructions have been adapted from buildSrc/linux.gradle
2728 (with-directory-excursion "build/classes"
2732 ;; Generate headers for prism
2733 (apply invoke "javah" "-d" "include" "-cp" "."
2734 (map class-file->class-name
2735 (append (find-files "com/sun/prism/impl" "\\.class$")
2736 (find-files "com/sun/prism" "PresentableState.*\\.class$"))))
2738 ;; ...then for prism_sw
2739 (apply invoke "javah" "-d" "include" "-cp" "."
2740 (map class-file->class-name
2741 (find-files "com/sun/pisces" "\\.class$")))
2743 ;; ...and for prism_es2
2744 (apply invoke "javah" "-d" "include" "-cp" "."
2745 (map class-file->class-name
2746 (find-files "com/sun/prism/es2" "\\.class$")))))
2748 (with-directory-excursion "netbeans/native-prism"
2749 (invoke "make" "CONF=Release"))
2750 (with-directory-excursion "netbeans/native-prism-sw"
2751 (invoke "make" "CONF=Release"))
2752 ;; TODO: This fails due to unknown EGL procedure names
2754 (with-directory-excursion "netbeans/native-prism-es2"
2755 (invoke "make" "CONF=Release"))
2757 (let* ((out (assoc-ref outputs "out"))
2758 (dir ,(match (%current-system)
2761 ((or "armhf-linux" "aarch64-linux")
2763 ((or "x86_64-linux")
2766 (target (string-append out "/share/" dir "/")))
2768 (for-each (lambda (file)
2770 (string-append "lib"
2773 (if (char=? c #\-) #\_ c))
2774 (string-drop (basename file)
2775 (string-length "libnative-"))))))
2777 (string-append target new-name))))
2778 (find-files "netbeans" "\\.so$"))))))))
2780 `(("java-openjfx-base" ,java-openjfx-base)
2781 ("java-swt" ,java-swt)))
2782 ;; XXX: for unknown reasons
2783 ;; modules/graphics/src/main/native-prism-sw/JNativeSurface.c is missing
2784 ;; in this revision.
2786 `(("JNativeSurface.c"
2789 (uri "https://raw.githubusercontent.com/openjdk/jfx/8u20-b02\
2790 /modules/graphics/src/main/native-prism-sw/JNativeSurface.c")
2793 "1kp15wbnd6rn0nciczp5ibq0ikby2yysvx1gnz5fa05vl2mm8mbm"))))))
2794 (description "OpenJFX is a client application platform for desktop,
2795 mobile and embedded systems built on Java. Its goal is to produce a
2796 modern, efficient, and fully featured toolkit for developing rich client
2797 applications. This package contains graphics-related classes for the
2798 OpenJFX distribution.")))
2800 (define-public java-openjfx-media
2801 (package (inherit java-openjfx-build)
2802 (name "java-openjfx-media")
2804 `(("java-openjxf-graphics" ,java-openjfx-graphics)))
2806 `(#:jar-name "java-openjfx-media.jar"
2807 #:source-dir "modules/media/src/main/java"
2808 #:tests? #f)); no tests
2809 (description "OpenJFX is a client application platform for desktop,
2810 mobile and embedded systems built on Java. Its goal is to produce a
2811 modern, efficient, and fully featured toolkit for developing rich client
2812 applications. This package contains media-related classes for the
2813 OpenJFX distribution.")))
2815 (define-public java-openjfx-controls
2816 (package (inherit java-openjfx-build)
2817 (name "java-openjfx-controls")
2819 `(("java-openjxf-graphics" ,java-openjfx-graphics)))
2821 `(#:jar-name "java-openjfx-controls.jar"
2822 #:source-dir "modules/controls/src/main/java"
2823 #:test-dir "modules/controls/src/test"
2824 ;; TODO: tests require com.sun.javafx.pgstub,
2825 ;; javafx.collections.MockSetObserver, and
2826 ;; com.sun.javafx.binding.ExpressionHelperUtility
2829 (modify-phases %standard-phases
2830 (add-after 'unpack 'copy-resources
2832 (copy-recursively "modules/controls/src/test/resources"
2833 "build/test-classes")
2834 (copy-recursively "modules/controls/src/main/resources"
2835 "build/classes"))))))
2836 (description "OpenJFX is a client application platform for desktop,
2837 mobile and embedded systems built on Java. Its goal is to produce a
2838 modern, efficient, and fully featured toolkit for developing rich client
2839 applications. This package contains UI control classes for the
2840 OpenJFX distribution.")))
2842 (define-public javacc-4
2849 (url "https://github.com/javacc/javacc")
2850 (commit "release_41")))
2851 (file-name (string-append "javacc-" version "-checkout"))
2854 "07ysav7j8r1c6h8qxrgqk6lwdp74ly0ad1935lragxml0qqc3ka0"))
2855 (modules '((guix build utils)))
2856 ;; delete bundled jars
2857 (snippet '(begin (delete-file-recursively "lib") #t))))
2858 (build-system ant-build-system)
2860 ;; /tmp/guix-build-javacc-4.1.drv-0/source/test/javacodeLA/build.xml:60:
2865 (modify-phases %standard-phases
2866 ;; Delete tests to avoid build failure (we don't run them anyway).
2867 (add-after 'unpack 'delete-tests
2869 (for-each delete-file
2870 '("src/org/javacc/JavaCCTestCase.java"
2871 "src/org/javacc/parser/ExpansionTest.java"
2872 "src/org/javacc/parser/OptionsTest.java"
2873 "src/org/javacc/jjtree/JJTreeOptionsTest.java"))
2874 (for-each delete-file-recursively
2875 '("src/org/javacc/parser/test"
2876 "src/org/javacc/jjdoc/test"))
2878 (replace 'install (install-jars "bin/lib")))))
2879 (home-page "https://javacc.org/")
2880 (synopsis "Java parser generator")
2881 (description "Java Compiler Compiler (JavaCC) is the most popular parser
2882 generator for use with Java applications. A parser generator is a tool that
2883 reads a grammar specification and converts it to a Java program that can
2884 recognize matches to the grammar. In addition to the parser generator itself,
2885 JavaCC provides other standard capabilities related to parser generation such
2886 as tree building (via a tool called JJTree included with JavaCC), actions,
2888 (license license:bsd-3)))
2890 ;; javacc-3, as javacc-4 is not properly bootstrapped: is contains a javacc.jar
2891 ;; in the bootstrap/ directory.
2892 (define-public javacc-3
2899 (url "https://github.com/javacc/javacc")
2900 (commit "release_32")))
2901 (file-name (string-append "javacc-" version "-checkout"))
2904 "1pyf1xyh8gk83nxqn2v2mdws32l68ydznha41cxa4l2kkbq1v1g3"))))
2908 (modify-phases %standard-phases
2909 (add-before 'build 'set-java-version
2914 (("debug=") "source=\"1.4\" debug=")))
2915 (find-files "." "build.xml"))
2917 (replace 'install (install-jars "bin/lib")))))))
2919 (define-public javacc
2927 (url "https://github.com/javacc/javacc")
2929 (file-name (git-file-name "javacc" version))
2931 (base32 "18kkak3gda93gr25jrgy6q00g0jr8i24ri2wk4kybz1v234fxx9i"))
2932 (modules '((guix build utils)))
2933 ;; Delete bundled jars.
2934 (snippet '(begin (for-each delete-file-recursively
2935 '("bootstrap" "lib"))
2938 `(#:make-flags ; bootstrap from javacc-4
2939 (list (string-append "-Dbootstrap-jar="
2940 (assoc-ref %build-inputs "javacc")
2941 "/share/java/javacc.jar"))
2942 #:test-target "test"
2944 (modify-phases %standard-phases
2945 (replace 'install (install-jars "target"))
2946 (add-after 'install 'install-bin
2947 (lambda* (#:key outputs inputs #:allow-other-keys)
2948 (let* ((out (assoc-ref outputs "out"))
2949 (dir (string-append out "/share/java"))
2950 (bin (string-append out "/bin"))
2951 (javacc (string-append bin "/javacc")))
2953 (with-output-to-file javacc
2956 (string-append "#!/bin/sh\n"
2957 (assoc-ref inputs "jdk") "/bin/java"
2958 " -cp " dir "/javacc.jar" " `basename $0`" " $*"))))
2959 (chmod javacc #o755)
2960 ;; symlink to different names to affect the first argument and
2961 ;; change the behavior of the jar file.
2962 (symlink javacc (string-append bin "/jjdoc"))
2963 (symlink javacc (string-append bin "/jjtree"))
2967 `(("javacc" ,javacc-4)))))
2969 ;; This is the last 3.x release of ECJ
2970 (define-public java-ecj-3
2976 (uri (string-append "http://archive.eclipse.org/eclipse/"
2977 "downloads/drops/R-" version
2978 "-201301310800/ecjsrc-" version ".jar"))
2981 "01mdj14jw11g1jfnki4fi8229p0c6zzckd38zqy2w4m3cjcvsx04"))))
2982 (build-system ant-build-system)
2984 `(#:tests? #f ; none included
2985 #:jdk ,icedtea-7 ; doesn't build with JDK8+
2986 #:make-flags (list "-f" "src/build.xml")
2987 #:build-target "build"
2989 (modify-phases %standard-phases
2990 (add-after 'unpack 'fix-manifest
2992 ;; Record the main class to make ecj executable.
2993 (with-atomic-file-replacement "src/META-INF/MANIFEST.MF"
2995 (display "Manifest-Version: 1.0
2996 Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n"
2999 (replace 'install (install-jars ".")))))
3000 (home-page "https://eclipse.org")
3001 (synopsis "Eclipse Java development tools core batch compiler")
3002 (description "This package provides the Eclipse Java core batch compiler.")
3003 (license license:epl1.0)))
3005 ;; This is needed for java-cisd-args4j
3006 (define-public java-ecj-3.5
3007 (package (inherit java-ecj-3)
3010 (method url-fetch/zipbomb)
3011 (uri (string-append "http://archive.eclipse.org/eclipse/"
3012 "downloads/drops/R-" version
3013 "-200909170800/ecjsrc-" version ".zip"))
3016 "1vnl2mavisc567bip736xzsvvbjif5279wc4a7pbdik5wlir8qr7"))))
3017 (build-system ant-build-system)
3019 `(#:tests? #f ; none included
3020 #:jdk ,icedtea-7 ; doesn't build with JDK8+
3021 #:build-target "build"
3023 (modify-phases %standard-phases
3024 (add-after 'unpack 'fix-manifest
3026 ;; Record the main class to make ecj executable.
3027 (with-atomic-file-replacement "META-INF/MANIFEST.MF"
3030 (display "Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n"
3033 (replace 'install (install-jars ".")))))
3035 `(("unzip" ,unzip)))))
3037 (define-public java-ecj
3038 (package (inherit java-ecj-3)
3044 "http://archive.eclipse.org/eclipse/downloads/drops4/R-"
3046 "-201703010400/ecjsrc-"
3051 "11cfgsdgznja1pvlxkjbqykxd7pcd5655vkm7s44xmahmap15gpl"))))
3053 `(#:tests? #f ; none included
3054 #:build-target "build"
3056 (modify-phases %standard-phases
3057 (add-after 'unpack 'fix-build.xml
3059 (substitute* "src/build.xml"
3063 (add-after 'unpack 'fix-prop
3065 (substitute* "src/build.xml"
3066 (("^.*properties.*$")
3067 "<include name=\"**/*.properties\"/>
3068 <include name=\"**/*.props\"/>"))
3070 (add-before 'build 'chdir
3074 (replace 'install (install-jars ".")))))))
3076 (define-public java-cisd-base
3077 (let ((revision 38938)
3078 (base-version "14.12.0"))
3080 (name "java-cisd-base")
3081 (version (string-append base-version "-" (number->string revision)))
3085 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
3086 "base/tags/release/"
3087 (version-major+minor base-version)
3088 ".x/" base-version "/base/"))
3089 (revision revision)))
3090 (file-name (string-append "java-cisd-base-" version "-checkout"))
3093 "1i5adyf7nzclb0wydgwa1az04qliid8035vpahaandmkmigbnxiy"))
3094 (modules '((guix build utils)))
3097 ;; Delete included gradle jar
3098 (delete-file-recursively "gradle/wrapper")
3099 ;; Delete pre-built native libraries
3100 (delete-file-recursively "libs")
3102 (build-system ant-build-system)
3104 `(#:make-flags '("-file" "build/build.xml")
3105 #:test-target "jar-test"
3108 (modify-phases %standard-phases
3109 (add-after 'unpack 'unpack-build-resources
3110 (lambda* (#:key inputs #:allow-other-keys)
3111 (copy-recursively (assoc-ref inputs "build-resources")
3112 "../build_resources")
3114 (add-after 'unpack-build-resources 'fix-dependencies
3115 (lambda* (#:key inputs #:allow-other-keys)
3116 (substitute* "build/build.xml"
3117 (("\\$\\{lib\\}/testng/testng-jdk15.jar")
3118 (string-append (assoc-ref inputs "java-testng")
3119 "/share/java/java-testng.jar"))
3120 (("\\$\\{lib\\}/commons-lang/commons-lang.jar")
3121 (string-append (assoc-ref inputs "java-commons-lang")
3122 "/share/java/commons-lang-"
3123 ,(package-version java-commons-lang) ".jar"))
3124 (("\\$\\{lib\\}/commons-io/commons-io.jar")
3125 (string-append (assoc-ref inputs "java-commons-io")
3126 "/lib/m2/commons-io/commons-io/"
3127 ,(package-version java-commons-io)
3129 ,(package-version java-commons-io)
3131 ;; Remove dependency on svn
3132 (("<build-info.*") "")
3133 (("\\$\\{revision.number\\}")
3134 ,(number->string revision))
3135 (("\\$\\{version.number\\}") ,base-version))
3136 ;; Remove dependency on classycle
3137 (substitute* "../build_resources/ant/build-common.xml"
3138 (("<taskdef name=\"dependency-checker.*") "")
3139 (("classname=\"classycle.*") "")
3140 (("classpath=\"\\$\\{lib\\}/classycle.*") ""))
3142 ;; A few tests fail because of the lack of a proper /etc/groups and
3143 ;; /etc/passwd file in the build container.
3144 (add-after 'unpack 'disable-broken-tests
3146 (substitute* "sourceTest/java/ch/systemsx/cisd/base/AllTests.java"
3147 (("Unix.isOperational\\(\\)") "false"))
3149 ;; These decorators are almost useless and pull in an unpackaged
3151 (add-after 'unpack 'remove-useless-decorators
3153 (substitute* "source/java/ch/systemsx/cisd/base/unix/Unix.java"
3155 (("import ch.rinn.restrictions.Private;") ""))
3156 (substitute* "sourceTest/java/ch/systemsx/cisd/base/unix/UnixTests.java"
3158 (("import ch.rinn.restrictions.Friend;") ""))
3160 (add-before 'configure 'build-native-code
3161 (lambda* (#:key inputs #:allow-other-keys)
3162 (let ((jdk (assoc-ref inputs "jdk"))
3163 (dir ,(match (%current-system)
3166 ((or "armhf-linux" "aarch64-linux")
3168 ((or "x86_64-linux")
3170 (_ "unknown-Linux"))))
3171 (with-directory-excursion "source/c"
3172 (invoke "gcc" "-shared" "-O3" "-fPIC" "unix.c"
3173 (string-append "-I" jdk "/include")
3174 (string-append "-I" jdk "/include/linux")
3176 (invoke "gcc" "-shared" "-O3" "-fPIC"
3177 "-DMACHINE_BYTE_ORDER=1"
3185 (string-append "-I" jdk "/include")
3186 (string-append "-I" jdk "/include/linux")
3187 "-o" "libnativedata.so"))
3188 (install-file "source/c/libunix.so"
3189 (string-append "libs/native/unix/" dir))
3190 (install-file "source/c/libnativedata.so"
3191 (string-append "libs/native/nativedata/" dir))
3193 ;; In the "check" phase we only build the test executable.
3194 (add-after 'check 'run-tests
3196 (invoke "java" "-jar" "targets/dist/sis-base-test.jar")
3197 (delete-file "targets/dist/sis-base-test.jar")
3199 (replace 'install (install-jars "targets/dist")))))
3201 `(("jdk" ,icedtea-8)
3202 ("java-commons-lang" ,java-commons-lang)
3203 ("java-commons-io" ,java-commons-io)
3204 ("java-testng" ,java-testng)
3209 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
3210 "base/tags/release/"
3211 (version-major+minor base-version)
3213 "/build_resources/"))
3214 (revision revision)))
3217 "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk"))))))
3218 (home-page "http://svnsis.ethz.ch")
3219 (synopsis "Utility classes for libraries from ETH Zurich")
3220 (description "This library supplies some utility classes needed for
3221 libraries from the SIS division at ETH Zurich like jHDF5.")
3222 ;; The C sources are under a non-copyleft license, which looks like a
3223 ;; variant of the BSD licenses. The whole package is under the ASL2.0.
3224 (license (list license:asl2.0
3225 (license:non-copyleft "file://source/c/COPYING"))))))
3227 (define-public java-cisd-args4j
3228 (let ((revision 39162)
3229 (base-version "9.11.2"))
3231 (name "java-cisd-args4j")
3232 (version (string-append base-version "-" (number->string revision)))
3236 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
3237 "args4j/tags/release/"
3238 (version-major+minor base-version)
3239 ".x/" base-version "/args4j/"))
3240 (revision revision)))
3241 (file-name (string-append "java-cisd-args4j-" version "-checkout"))
3244 "0hhqznjaivq7ips7mkwas78z42s6djsm20rrs7g1zd59rcsakxn2"))))
3245 (build-system ant-build-system)
3247 `(#:make-flags '("-file" "build/build.xml")
3248 #:tests? #f ; there are no tests
3249 ;; There are weird build failures with JDK8, such as: "The type
3250 ;; java.io.ObjectInputStream cannot be resolved. It is indirectly
3251 ;; referenced from required .class files"
3253 #:modules ((guix build ant-build-system)
3255 (guix build java-utils)
3260 (modify-phases %standard-phases
3261 (add-after 'unpack 'unpack-build-resources
3262 (lambda* (#:key inputs #:allow-other-keys)
3263 (mkdir-p "../build_resources")
3264 (invoke "tar" "xf" (assoc-ref inputs "build-resources")
3265 "-C" "../build_resources"
3266 "--strip-components=1")
3267 (mkdir-p "../build_resources/lib")
3269 (add-after 'unpack-build-resources 'fix-dependencies
3270 (lambda* (#:key inputs #:allow-other-keys)
3271 ;; FIXME: There should be a more convenient abstraction for
3272 ;; editing XML files.
3273 (with-directory-excursion "../build_resources/ant/"
3274 (chmod "build-common.xml" #o664)
3275 (call-with-output-file "build-common.xml.new"
3279 (with-input-from-file "build-common.xml"
3280 (lambda _ (xml->sxml #:trim-whitespace? #t)))
3281 `(;; Remove dependency on classycle and custom ant tasks
3282 (taskdef . ,(lambda (tag . kids)
3283 (let ((name ((sxpath '(name *text*)) kids)))
3284 (if (or (member "build-info" name)
3285 (member "dependency-checker" name)
3286 (member "build-java-subprojects" name)
3287 (member "project-classpath" name))
3290 (typedef . ,(lambda (tag . kids)
3291 (let ((name ((sxpath '(name *text*)) kids)))
3292 (if (member "recursive-jar" name)
3295 (build-java-subprojects . ,(lambda _ '()))
3296 ;; Ignore everything else
3297 (*default* . ,(lambda (tag . kids) `(,tag ,@kids)))
3298 (*text* . ,(lambda (_ txt) txt))))
3300 (rename-file "build-common.xml.new" "build-common.xml"))
3301 (substitute* "build/build.xml"
3302 (("\\$\\{lib\\}/cisd-base/cisd-base.jar")
3303 (string-append (assoc-ref inputs "java-cisd-base")
3304 "/share/java/sis-base.jar"))
3305 ;; Remove dependency on svn
3306 (("<build-info.*") "")
3307 (("\\$\\{revision.number\\}")
3308 ,(number->string revision))
3309 (("\\$\\{version.number\\}") ,base-version)
3310 ;; Don't use custom ant tasks.
3311 (("recursive-jar") "jar")
3312 (("<project-classpath.*") ""))
3314 (replace 'install (install-jars "targets/dist")))))
3316 `(("java-cisd-base" ,java-cisd-base)))
3318 `(("ecj" ,java-ecj-3.5)
3323 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
3324 "args4j/tags/release/"
3325 (version-major+minor base-version)
3327 "/build_resources/"))
3328 (revision revision)))
3331 "056cam4k8pll7ass31sy6gwn8g8719njc41yf4l02b0342nilkyf"))
3332 (modules '((guix build utils)))
3333 ;; Delete bundled pre-built jars.
3335 '(begin (delete-file-recursively "lib/") #t))))))
3336 (home-page "http://svnsis.ethz.ch")
3337 (synopsis "Command line parser library")
3338 (description "This package provides a parser for command line arguments.")
3339 (license license:asl2.0))))
3341 (define-public java-cisd-jhdf5
3342 (let ((revision 39162)
3343 (base-version "14.12.6"))
3345 (name "java-cisd-jhdf5")
3346 (version (string-append base-version "-" (number->string revision)))
3350 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
3351 "jhdf5/tags/release/"
3352 (version-major+minor base-version)
3353 ".x/" base-version "/jhdf5/"))
3354 (revision revision)))
3355 (file-name (string-append "java-cisd-jhdf5-" version "-checkout"))
3358 "13i17s2hn0q9drdqvp8csy7770p3hdbh9rp30ihln2ldkfawdmz0"))
3359 (modules '((guix build utils)))
3362 ;; Delete included gradle jar
3363 (delete-file-recursively "gradle/wrapper")
3364 ;; Delete pre-built native libraries
3365 (delete-file-recursively "libs")
3367 (build-system ant-build-system)
3369 `(#:make-flags '("-file" "build/build.xml")
3370 #:build-target "jar-all"
3371 #:test-target "jar-test"
3374 (modify-phases %standard-phases
3375 ;; FIXME: this build phase fails.
3376 (delete 'generate-jar-indices)
3377 ;; Don't erase results from the build phase when building tests.
3378 (add-after 'unpack 'separate-test-target-from-clean
3380 (substitute* "build/build.xml"
3381 (("\"jar-test\" depends=\"clean, ")
3382 "\"jar-test\" depends=\""))
3384 (add-after 'unpack 'unpack-build-resources
3385 (lambda* (#:key inputs #:allow-other-keys)
3386 (copy-recursively (assoc-ref inputs "build-resources")
3387 "../build_resources")
3388 (delete-file-recursively "../build_resources/lib/")
3389 (mkdir-p "../build_resources/lib")
3390 ;; Remove dependency on classycle
3391 (substitute* "../build_resources/ant/build-common.xml"
3392 (("<taskdef name=\"dependency-checker.*") "")
3393 (("classname=\"classycle.*") "")
3394 (("classpath=\"\\$\\{lib\\}/classycle.*") ""))
3395 ;; Remove dependency on svn
3396 (substitute* "build/build.xml"
3397 (("<build-info.*") "")
3398 (("\\$\\{revision.number\\}")
3399 ,(number->string revision))
3400 (("\\$\\{version.number\\}") ,base-version))
3402 (add-after 'unpack-build-resources 'fix-dependencies
3403 (lambda* (#:key inputs #:allow-other-keys)
3404 (substitute* "../build_resources/ant/build-common.xml"
3405 (("../libraries/testng/testng-jdk15.jar")
3406 (string-append (assoc-ref inputs "java-testng")
3407 "/share/java/java-testng.jar")))
3408 (substitute* "build/build.xml"
3409 (("\\$\\{lib\\}/sis-base/sis-base.jar")
3410 (string-append (assoc-ref inputs "java-cisd-base")
3411 "/share/java/sis-base.jar"))
3412 (("\\$\\{lib\\}/cisd-args4j/cisd-args4j.jar")
3413 (string-append (assoc-ref inputs "java-cisd-args4j")
3414 "/share/java/cisd-args4j.jar"))
3415 (("\\$\\{lib\\}/commons-lang/commons-lang.jar")
3416 (string-append (assoc-ref inputs "java-commons-lang")
3417 "/share/java/commons-lang-"
3418 ,(package-version java-commons-lang) ".jar"))
3419 (("\\$\\{lib\\}/commons-io/commons-io.jar")
3420 (string-append (assoc-ref inputs "java-commons-io")
3421 "/lib/m2/commons-io/commons-io/"
3422 ,(package-version java-commons-io)
3424 ,(package-version java-commons-io)
3426 (("\\$\\{lib\\}/testng/testng-jdk15.jar")
3427 (string-append (assoc-ref inputs "java-testng")
3428 "/share/java/java-testng.jar"))
3429 (("\\$\\{lib\\}/junit4/junit.jar")
3430 (car (find-files (assoc-ref inputs "java-junit") "jar$")))
3431 (("\\$\\{lib\\}/jmock/hamcrest/hamcrest-core.jar")
3432 (car (find-files (assoc-ref inputs "java-hamcrest-core")
3434 ;; Remove dependency on ch.rinn.restrictions
3435 (with-directory-excursion "source/java/ch/systemsx/cisd/hdf5/"
3436 (substitute* '("BitSetConversionUtils.java"
3438 (("import ch.rinn.restrictions.Private;") "")
3440 (with-directory-excursion "sourceTest/java/ch/systemsx/cisd/hdf5/"
3441 (substitute* '("BitSetConversionTest.java"
3442 "h5ar/HDF5ArchiverTest.java")
3443 (("import ch.rinn.restrictions.Friend;") "")
3445 ;; Remove leftovers from removing @Friend
3446 (substitute* "h5ar/HDF5ArchiverTest.java"
3447 (("\\{ HDF5Archiver.class, IdCache.class, LinkRecord.class \\}\\)")
3450 (add-before 'configure 'build-native-library
3451 (lambda* (#:key inputs #:allow-other-keys)
3452 (let ((jdk (assoc-ref inputs "jdk"))
3453 (hdf5 (assoc-ref inputs "hdf5"))
3454 (dir ,(match (%current-system)
3457 ((or "armhf-linux" "aarch64-linux")
3459 ((or "x86_64-linux")
3461 (_ "unknown-Linux"))))
3462 (with-directory-excursion "source/c"
3463 (apply invoke `("gcc" "-shared" "-O3"
3465 "-Wl,--exclude-libs,ALL"
3466 ,@(find-files "jhdf5" "\\.c$")
3467 ,@(find-files "hdf-java" "\\.c$")
3468 ,(string-append "-I" hdf5 "/include")
3469 ,(string-append "-I" jdk "/include")
3470 ,(string-append "-I" jdk "/include/linux")
3471 ,(string-append hdf5 "/lib/libhdf5.a")
3472 "-o" "libjhdf5.so" "-lz")))
3473 (install-file "source/c/libjhdf5.so"
3474 (string-append "libs/native/jhdf5/" dir))
3476 ;; In the "check" phase we only build the test executable.
3477 (add-after 'check 'run-tests
3479 (invoke "java" "-jar" "targets/dist/sis-jhdf5-test.jar")
3480 (delete-file "targets/dist/sis-jhdf5-test.jar")
3483 (install-jars "targets/dist")))))
3485 `(("java-cisd-base" ,java-cisd-base)
3486 ("java-cisd-args4j" ,java-cisd-args4j)
3487 ("java-commons-lang" ,java-commons-lang)
3488 ("java-commons-io" ,java-commons-io)
3492 `(("jdk" ,icedtea-8)
3493 ("java-testng" ,java-testng)
3494 ("java-junit" ,java-junit)
3495 ("java-jmock" ,java-jmock)
3496 ("java-hamcrest-core" ,java-hamcrest-core)
3501 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
3502 "jhdf5/tags/release/"
3503 (version-major+minor base-version)
3505 "/build_resources/"))
3506 (revision revision)))
3509 "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk"))))))
3510 (home-page "https://wiki-bsse.ethz.ch/display/JHDF5/")
3511 (synopsis "Java binding for HDF5")
3512 (description "JHDF5 is a high-level API in Java for reading and writing
3513 HDF5 files, building on the libraries provided by the HDF Group.")
3514 ;; The C sources are under a non-copyleft license, which looks like a
3515 ;; variant of the BSD licenses. The whole package is under the ASL2.0.
3516 (license (list license:asl2.0
3517 (license:non-copyleft "file://source/c/COPYING"))))))
3519 (define-public java-classpathx-servletapi
3521 (name "java-classpathx-servletapi")
3525 (uri (string-append "mirror://gnu/classpathx/servletapi/"
3526 "servletapi-" version ".tar.gz"))
3529 "07d8h051siga2f33fra72hk12sbq1bxa4jifjg0qj0vfazjjff0x"))))
3530 (build-system ant-build-system)
3532 `(#:tests? #f ; there is no test target
3533 #:build-target "compile"
3535 (list "-Dbuild.compiler=javac1.8"
3536 (string-append "-Ddist=" (assoc-ref %outputs "out")))
3538 (modify-phases %standard-phases
3540 (lambda* (#:key make-flags #:allow-other-keys)
3541 (apply invoke `("ant" "dist" ,@make-flags)))))))
3542 (home-page "https://www.gnu.org/software/classpathx/")
3543 (synopsis "Java servlet API implementation")
3544 (description "This is the GNU servlet API distribution, part of the
3545 ClasspathX project. It provides implementations of version 3.0 of the servlet
3546 API and version 2.1 of the Java ServerPages API.")
3547 (license license:gpl3+)))
3549 (define-public java-javaee-servletapi
3551 (name "java-javaee-servletapi")
3556 (url "https://github.com/javaee/servlet-spec")
3558 (file-name (git-file-name name version))
3561 "0s03lj8w5an70lkqbjycgfrfk0kc07vbfav91jzk87gh3awf9ksl"))))
3562 (build-system ant-build-system)
3564 `(#:jar-name "javax-servletapi.jar"
3567 #:source-dir "src/main/java"
3569 (modify-phases %standard-phases
3570 (add-before 'build 'copy-resources
3572 (mkdir-p "build/classes/javax/servlet/http")
3573 (let ((from-prefix "src/main/java/javax/servlet/")
3574 (to-prefix "build/classes/javax/servlet/"))
3575 (for-each (lambda (f)
3576 (copy-file (string-append from-prefix f)
3577 (string-append to-prefix f)))
3578 (list "LocalStrings_ja.properties"
3579 "LocalStrings.properties"
3580 "LocalStrings_fr.properties"
3581 "http/LocalStrings_es.properties"
3582 "http/LocalStrings_ja.properties"
3583 "http/LocalStrings.properties"
3584 "http/LocalStrings_fr.properties")))
3587 `(("unzip" ,unzip)))
3588 (home-page "https://javaee.github.io/servlet-spec/")
3589 (synopsis "Java servlet API")
3590 (description "Java Servlet is the foundation web specification in the
3591 Java Enterprise Platform. Developers can build web applications using the
3592 Servlet API to interact with the request/response workflow. This project
3593 provides information on the continued development of the Java Servlet
3595 ;; Main code is dual-licensed by Oracle under either GLP2 or CDDL 1.1.
3596 ;; Some files are licensed under ASL 2.0.
3597 (license (list license:asl2.0 license:gpl2 license:cddl1.1))))
3599 (define-public java-swt
3604 ;; The types of many variables and procedures differ in the sources
3605 ;; dependent on whether the target architecture is a 32-bit system or a
3606 ;; 64-bit system. Instead of patching the sources on demand in a build
3607 ;; phase we download either the 32-bit archive (which mostly uses "int"
3608 ;; types) or the 64-bit archive (which mostly uses "long" types).
3609 (let ((hash32 "09q0cbh90d90q3a7dx9430kc4m6bijrkr4lajrmzzvi0jjdpq4v9")
3610 (hash64 "17k5hs75a87ssmc5xhwdfdm2gn4zba0r837l2455za01krnkaa2q")
3613 (let-values (((hash file)
3614 (match (or (%current-target-system) (%current-system))
3615 ("x86_64-linux" (values hash64 file64))
3616 (_ (values hash32 file32)))))
3620 "http://download.eclipse.org/eclipse/downloads/drops4/"
3621 "R-" version "-201710090410/swt-" version
3622 "-gtk-linux-" file ".zip"))
3623 (sha256 (base32 hash))))))
3624 (build-system ant-build-system)
3626 `(#:jar-name "swt.jar"
3628 #:tests? #f ; no "check" target
3630 (modify-phases %standard-phases
3632 (lambda* (#:key source #:allow-other-keys)
3634 (invoke "unzip" source "-d" "swt")
3637 (invoke "unzip" "src.zip" "-d" "src")))
3638 ;; The classpath contains invalid icecat jars. Since we don't need
3639 ;; anything other than the JDK on the classpath, we can simply unset
3641 (add-after 'configure 'unset-classpath
3642 (lambda _ (unsetenv "CLASSPATH") #t))
3643 (add-before 'build 'build-native
3644 (lambda* (#:key inputs outputs #:allow-other-keys)
3645 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
3646 ;; Build shared libraries. Users of SWT have to set the system
3647 ;; property swt.library.path to the "lib" directory of this
3650 (setenv "OUTPUT_DIR" lib)
3651 (with-directory-excursion "src"
3652 (invoke "bash" "build.sh")))))
3653 (add-after 'install 'install-native
3654 (lambda* (#:key outputs #:allow-other-keys)
3655 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
3656 (for-each (lambda (file)
3657 (install-file file lib))
3658 (find-files "." "\\.so$"))
3662 ("libxtst" ,libxtst)
3667 `(("pkg-config" ,pkg-config)
3669 (home-page "https://www.eclipse.org/swt/")
3670 (synopsis "Widget toolkit for Java")
3672 "SWT is a widget toolkit for Java designed to provide efficient, portable
3673 access to the user-interface facilities of the operating systems on which it
3675 ;; SWT code is licensed under EPL1.0
3676 ;; Gnome and Gtk+ bindings contain code licensed under LGPLv2.1
3677 ;; Cairo bindings contain code under MPL1.1
3678 ;; XULRunner 1.9 bindings contain code under MPL2.0
3683 license:lgpl2.1+))))
3685 ;; java-hamcrest-core uses qdox version 1.12. We package this version instead
3686 ;; of the latest release.
3687 (define-public java-qdox-1.12
3693 (uri (string-append "https://repo1.maven.org/maven2/"
3694 "com/thoughtworks/qdox/qdox/" version
3695 "/qdox-" version "-sources.jar"))
3698 "0hlfbqq2avf5s26wxkksqmkdyk6zp9ggqn37c468m96mjv0n9xfl"))))
3699 (build-system ant-build-system)
3701 `(;; Tests require junit
3703 #:jar-name "qdox.jar"
3705 (modify-phases %standard-phases
3707 (lambda* (#:key source #:allow-other-keys)
3709 (with-directory-excursion "src"
3710 (invoke "jar" "-xf" source))))
3711 ;; At this point we don't have junit, so we must remove the API
3713 (add-after 'unpack 'delete-tests
3715 (delete-file-recursively "src/com/thoughtworks/qdox/junit")
3717 (home-page "https://github.com/codehaus/qdox")
3718 (synopsis "Parse definitions from Java source files")
3720 "QDox is a high speed, small footprint parser for extracting
3721 class/interface/method definitions from source files complete with JavaDoc
3722 @code{@@tags}. It is designed to be used by active code generators or
3723 documentation tools.")
3724 (license license:asl2.0)))
3726 (define-public java-qdox
3729 ; Newer version exists, but this version is required by java-plexus-component-metadata
3733 ;; 2.0-M4, -M5 at https://github.com/paul-hammant/qdox
3734 ;; Older releases at https://github.com/codehaus/qdox/
3735 ;; Note: The release at maven is pre-generated. The release at
3736 ;; github requires jflex.
3737 (uri (string-append "https://repo1.maven.org/maven2/"
3738 "com/thoughtworks/qdox/qdox/" version
3739 "/qdox-" version "-sources.jar"))
3742 "10xxrcaicq6axszcr2jpygisa4ch4sinyx5q7kqqxv4lknrmxp5x"))))
3743 (build-system ant-build-system)
3745 `(#:jar-name "qdox.jar"
3746 #:tests? #f; no tests
3748 ((guix build ant-build-system)
3749 (guix build java-utils)
3753 (modify-phases %standard-phases
3754 (add-before 'install 'create-pom
3756 (with-output-to-file "pom.xml"
3760 (modelVersion "4.0.0")
3762 (groupId "com.thoughtworks.qdox")
3764 (version ,,version))))))
3767 (install-from-pom "pom.xml")))))
3768 (home-page "https://github.com/codehaus/qdox")
3769 (synopsis "Parse definitions from Java source files")
3770 (description "QDox is a high speed, small footprint parser for extracting
3771 class/interface/method definitions from source files complete with JavaDoc
3772 @code{@@tags}. It is designed to be used by active code generators or
3773 documentation tools.")
3774 (license license:asl2.0)))
3776 (define-public java-qdox-2-M9
3779 (version "2.0-M9"); required by plexus-java
3782 ;; 2.0-M4, -M5 at https://github.com/paul-hammant/qdox
3783 ;; Older releases at https://github.com/codehaus/qdox/
3784 ;; Note: The release at maven is pre-generated. The release at
3785 ;; github requires jflex.
3786 (uri (string-append "https://repo1.maven.org/maven2/"
3787 "com/thoughtworks/qdox/qdox/" version
3788 "/qdox-" version "-sources.jar"))
3791 "1s2jnmx2dkwnaha12lcj26aynywgwa8sslc47z82wx8xai13y4fg"))))))
3793 (define-public java-jarjar
3795 (name "java-jarjar")
3800 "https://storage.googleapis.com/google-code-archive-downloads/v2/"
3801 "code.google.com/jarjar/jarjar-src-" version ".zip"))
3804 "1v8irhni9cndcw1l1wxqgry013s2kpj0qqn57lj2ji28xjq8ndjl"))
3805 (modules '((guix build utils)))
3808 ;; Delete bundled thirds-party jar archives.
3809 (delete-file-recursively "lib")
3810 (delete-file "src/test/enumtest.jar")
3811 ;; the CLASSPATH needs this directory, create an empty one
3814 (build-system ant-build-system)
3816 `(;; Tests require junit, which ultimately depends on this package.
3818 #:build-target "jar"
3820 (modify-phases %standard-phases
3821 (add-before 'build 'do-not-use-bundled-asm
3822 (lambda* (#:key inputs #:allow-other-keys)
3823 (substitute* "build.xml"
3824 (("<path id=\"path.build\">")
3825 (string-append "<path id=\"path.build\"><fileset dir=\""
3826 (assoc-ref inputs "java-asm-bootstrap")
3827 "/lib/m2\" includes=\"**/*.jar\"/>"))
3828 (("<zipfileset src=\"lib/asm-4.0.jar\"/>") "")
3829 (("lib/asm-commons-4.0.jar")
3830 (car (find-files (assoc-ref inputs "java-asm-bootstrap")
3832 (("<include name=\"org/objectweb/asm/commons/Remap\\*\\.class\"/>")
3833 (string-append "<include name=\"org/objectweb/asm/"
3834 "commons/Remap*.class\"/>"
3835 "<include name=\"org/objectweb/asm/*.class\"/>"
3836 "<include name=\"org/objectweb/asm/"
3837 "signature/*.class\"/>"
3838 "<include name=\"org/objectweb/asm/"
3839 "commons/SignatureRemapper.class\"/>")))
3841 (add-before 'build 'remove-maven-dependency
3843 ;; We do not need to build jarjar as a maven plugin just yet, so
3844 ;; remove this file. Maven requires jarjar (but not that plugin),
3845 ;; so removing it improves the bootstrap.
3846 (delete-file "src/main/com/tonicsystems/jarjar/JarJarMojo.java")
3849 (lambda* (#:key outputs #:allow-other-keys)
3850 (let ((target (string-append (assoc-ref outputs "out")
3852 (install-file (string-append "dist/jarjar-" ,version ".jar")
3856 `(("java-asm-bootstrap" ,java-asm-bootstrap)))
3858 `(("unzip" ,unzip)))
3859 (home-page "https://code.google.com/archive/p/jarjar/")
3860 (synopsis "Repackage Java libraries")
3862 "Jar Jar Links is a utility that makes it easy to repackage Java
3863 libraries and embed them into your own distribution. Jar Jar Links includes
3864 an Ant task that extends the built-in @code{jar} task.")
3865 (license license:asl2.0)))
3867 (define-public java-hamcrest-core
3869 (name "java-hamcrest-core")
3874 (url "https://github.com/hamcrest/JavaHamcrest/")
3875 (commit (string-append "hamcrest-java-" version))))
3876 (file-name (git-file-name name version))
3879 "16fxxkrd31ahqvcaby30jgh3z1i0zxh51m24hxgz0z2agxj6bc63"))
3880 (modules '((guix build utils)))
3883 ;; Delete bundled thirds-party jar archives.
3884 (delete-file-recursively "lib")
3886 (build-system ant-build-system)
3888 `(#:tests? #f ; Tests require junit
3889 #:modules ((guix build ant-build-system)
3890 (guix build java-utils)
3893 #:make-flags (list (string-append "-Dversion=" ,version))
3894 #:test-target "unit-test"
3895 #:build-target "core"
3897 (modify-phases %standard-phases
3898 ;; Disable unit tests, because they require junit, which requires
3899 ;; hamcrest-core. We also give a fixed value to the "Built-Date"
3900 ;; attribute from the manifest for reproducibility.
3901 (add-before 'configure 'patch-build.xml
3903 (substitute* "build.xml"
3904 (("unit-test, ") "")
3905 (("\\$\\{build.timestamp\\}") "guix"))
3907 ;; Java's "getMethods()" returns methods in an unpredictable order.
3908 ;; To make the output of the generated code deterministic we must
3909 ;; sort the array of methods.
3910 (add-after 'unpack 'make-method-order-deterministic
3912 (substitute* "hamcrest-generator/src/main/java/org/hamcrest/generator/ReflectiveFactoryReader.java"
3913 (("import java\\.util\\.Iterator;" line)
3914 (string-append line "\n"
3915 "import java.util.Arrays; import java.util.Comparator;"))
3916 (("allMethods = cls\\.getMethods\\(\\);" line)
3917 (string-append "_" line
3919 private Method[] getSortedMethods() {
3920 Arrays.sort(_allMethods, new Comparator<Method>() {
3922 public int compare(Method a, Method b) {
3923 return a.toString().compareTo(b.toString());
3929 private Method[] allMethods = getSortedMethods();")))
3931 (add-before 'build 'do-not-use-bundled-qdox
3932 (lambda* (#:key inputs #:allow-other-keys)
3933 (substitute* "build.xml"
3934 (("lib/generator/qdox-1.12.jar")
3935 (string-append (assoc-ref inputs "java-qdox-1.12")
3936 "/share/java/qdox.jar")))
3938 ;; build.xml searches for .jar files in this directoy, which
3939 ;; we remove from the source archive.
3940 (add-before 'build 'create-dummy-directories
3942 (mkdir-p "lib/integration")
3944 (add-before 'build 'create-pom
3946 (substitute* "pom/hamcrest-core.pom"
3947 (("@VERSION@") ,version))
3950 (install-from-pom "pom/hamcrest-core.pom")))))
3952 `(("java-qdox-1.12" ,java-qdox-1.12)
3953 ("java-jarjar" ,java-jarjar)))
3955 `(("java-hamcrest-parent-pom" ,java-hamcrest-parent-pom)))
3956 (home-page "http://hamcrest.org/")
3957 (synopsis "Library of matchers for building test expressions")
3959 "This package provides a library of matcher objects (also known as
3960 constraints or predicates) allowing @code{match} rules to be defined
3961 declaratively, to be used in other frameworks. Typical scenarios include
3962 testing frameworks, mocking libraries and UI validation rules.")
3963 (license license:bsd-2)))
3965 (define java-hamcrest-parent-pom
3967 (inherit java-hamcrest-core)
3968 (name "java-hamcrest-parent-pom")
3969 (propagated-inputs '())
3974 (modify-phases %standard-phases
3978 (substitute* "pom/hamcrest-parent.pom"
3979 (("@VERSION@") ,(package-version java-hamcrest-core)))
3982 (install-pom-file "pom/hamcrest-parent.pom")))))))
3984 (define-public java-hamcrest-library
3986 (inherit java-hamcrest-core)
3987 (name "java-hamcrest-library")
3989 (substitute-keyword-arguments (package-arguments java-hamcrest-core)
3990 ((#:build-target _) "library")
3992 `(modify-phases ,phases
3993 (add-after 'unpack 'patch-classpath-for-integration
3994 (lambda* (#:key inputs #:allow-other-keys)
3995 (substitute* "build.xml"
3996 (("build/hamcrest-core-\\$\\{version\\}\\.jar")
3997 (car (find-files (assoc-ref inputs "java-hamcrest-core")
4000 (replace 'create-pom
4002 (substitute* "pom/hamcrest-library.pom"
4003 (("@VERSION@") ,(package-version java-hamcrest-core)))
4006 (install-from-pom "pom/hamcrest-library.pom"))))))
4008 `(("java-hamcrest-core" ,java-hamcrest-core)
4009 ("java-hamcrest-parent-pom" ,java-hamcrest-parent-pom)))))
4011 (define-public java-junit
4018 (url "https://github.com/junit-team/junit/")
4019 (commit (string-append "r" version))))
4020 (file-name (git-file-name name version))
4023 "1j8avi91px1z8rjc89cfikwrvfifdmmsarwiyrcnr59ynvpz0v8h"))
4024 (modules '((guix build utils)))
4027 ;; Delete bundled jar archives.
4028 (delete-file-recursively "lib")
4030 (build-system ant-build-system)
4032 `(#:jar-name "junit.jar"
4033 #:source-dir "src/main/java"
4034 #:test-dir "src/test"
4035 #:test-exclude (list "**/SimpleTest.java" "**/StackTracesTest.java"
4036 "**/RuleChainTest.java" "**/TestWatchmanTest.java")
4038 (modify-phases %standard-phases
4039 (add-before 'check 'copy-test-resources
4041 (copy-recursively "src/test/resources" "build/test-classes")
4044 (install-from-pom "pom.xml")))))
4046 `(("java-hamcrest-core" ,java-hamcrest-core)))
4048 `(("java-hamcrest-library" ,java-hamcrest-library)))
4049 (home-page "https://junit.org/junit4/")
4050 (synopsis "Test framework for Java")
4052 "JUnit is a simple framework to write repeatable tests for Java projects.
4053 JUnit provides assertions for testing expected results, test fixtures for
4054 sharing common test data, and test runners for running tests.")
4055 (license license:epl1.0)))
4057 (define-public java-junitparams
4059 (name "java-junitparams")
4064 (url "https://github.com/Pragmatists/JUnitParams")
4065 (commit (string-append "JUnitParams-" version))))
4066 (file-name (git-file-name name version))
4069 "0rb52xdfp99invyjrras3w0bf0a81cz30yd47rkkiyqcqj0y1q9b"))))
4070 (build-system ant-build-system)
4072 `(#:jar-name "junitparams.jar"
4073 #:source-dir "src/main/java"
4074 #:test-dir "src/test"
4075 #:test-exclude (list "**/SuperclassTest.java")))
4077 `(("java-junit" ,java-junit)))
4079 `(("java-junit" ,java-junit)
4080 ("java-hamcrest-core" ,java-hamcrest-core)
4081 ("java-assertj" ,java-assertj)))
4082 (home-page "https://github.com/Pragmatists/JUnitParams")
4083 (synopsis "Parameterised test support for JUnit")
4084 (description "The JUnitParams project adds a new runner to JUnit and
4085 provides much easier and readable parametrised tests for JUnit.")
4086 (license license:asl2.0)))
4088 (define-public java-plexus-utils
4090 (name "java-plexus-utils")
4091 ;; sisu-build-api needs this version, later versions don't work
4096 (url "https://github.com/codehaus-plexus/plexus-utils")
4097 (commit (string-append "plexus-utils-" version))))
4098 (file-name (git-file-name name version))
4101 "1w169glixyk94jbczj8jzg897lsab46jihiaa3dhw0p06g35va8b"))))
4102 (build-system ant-build-system)
4103 ;; FIXME: The default build.xml does not include a target to install
4106 `(#:jar-name "plexus-utils.jar"
4107 #:source-dir "src/main"
4109 (modify-phases %standard-phases
4110 (add-after 'unpack 'fix-reference-to-/bin-and-/usr
4112 (substitute* "src/main/java/org/codehaus/plexus/util/\
4113 cli/shell/BourneShell.java"
4114 (("/bin/sh") (which "sh"))
4115 (("/usr/") (getcwd)))
4117 (add-after 'unpack 'fix-or-disable-broken-tests
4119 (with-directory-excursion "src/test/java/org/codehaus/plexus/util"
4120 (substitute* '("cli/CommandlineTest.java"
4121 "cli/shell/BourneShellTest.java")
4122 (("/bin/sh") (which "sh"))
4123 (("/bin/echo") (which "echo")))
4125 ;; This test depends on MavenProjectStub, but we don't have
4126 ;; a package for Maven.
4127 (delete-file "introspection/ReflectionValueExtractorTest.java")
4129 ;; FIXME: The command line tests fail, maybe because they use
4131 (delete-file "cli/CommandlineTest.java")
4133 ;; These tests require openjdk jmh, which is not packaged yet
4134 (for-each delete-file (find-files "." "PerfTest.java$")))
4136 (add-before 'build 'copy-resources
4138 (copy-recursively "src/main/resources" "build/classes")
4140 (replace 'install (install-from-pom "pom.xml")))))
4142 `(("java-hamcrest-core" ,java-hamcrest-core)
4143 ("java-junit" ,java-junit)))
4145 `(("plexus-parent-pom" ,plexus-parent-pom-5.1)))
4146 (home-page "https://codehaus-plexus.github.io/plexus-utils/")
4147 (synopsis "Common utilities for the Plexus framework")
4148 (description "This package provides various Java utility classes for the
4149 Plexus framework to ease working with strings, files, command lines, XML and
4151 (license license:asl2.0)))
4153 (define-public java-plexus-utils-3.3.0
4155 (inherit java-plexus-utils)
4160 (url "https://github.com/codehaus-plexus/plexus-utils")
4161 (commit (string-append "plexus-utils-" version))))
4162 (file-name (git-file-name "java-plexus-utils" version))
4165 "0d0fq21rzjy0j55kcp8w9k1rbq9rwr0r7cc8239p9jbz54vihp0g"))))))
4167 (define-public java-plexus-interpolation
4169 (name "java-plexus-interpolation")
4174 (url "https://github.com/codehaus-plexus/plexus-interpolation")
4175 (commit (string-append "plexus-interpolation-" version))))
4176 (file-name (git-file-name name version))
4179 "1rahjmhywf6d5m32qzlc9izawyvcd71abfm9k03f13rs2xmfxzlh"))))
4180 (build-system ant-build-system)
4182 `(#:jar-name "plexus-interpolation.jar"
4183 #:source-dir "src/main"
4185 (modify-phases %standard-phases
4186 (replace 'install (install-from-pom "pom.xml")))))
4188 `(("plexus-parent-pom-5.1" ,plexus-parent-pom-5.1)))
4190 `(("java-junit" ,java-junit)
4191 ("java-hamcrest-core" ,java-hamcrest-core)))
4192 (home-page "https://codehaus-plexus.github.io/plexus-interpolation/")
4193 (synopsis "Java components for interpolating ${} strings and the like")
4194 (description "Plexus interpolator is a modular, flexible interpolation
4195 framework for the expression language style commonly seen in Maven, Plexus,
4196 and other related projects.
4198 It has its foundation in the @code{org.codehaus.plexus.utils.interpolation}
4199 package within @code{plexus-utils}, but has been separated in order to allow
4200 these two libraries to vary independently of one another.")
4201 (license license:asl2.0)))
4203 (define-public java-plexus-classworlds
4205 (name "java-plexus-classworlds")
4210 (url "https://github.com/codehaus-plexus/plexus-classworlds")
4211 (commit (string-append "plexus-classworlds-" version))))
4212 (file-name (git-file-name name version))
4215 "034k2hgvj1saalwbnzrbg4n0zgzwcpz1lhlb8q4kgglsp9pmm03s"))))
4216 (build-system ant-build-system)
4218 `(#:jar-name "plexus-classworlds.jar"
4219 #:source-dir "src/main"
4220 #:tests? #f;; FIXME: we need to generate some resources as in pom.xml
4222 (modify-phases %standard-phases
4223 (replace 'install (install-from-pom "pom.xml")))))
4225 `(("plexus-parent-pom-5.1" ,plexus-parent-pom-5.1)))
4227 `(("java-junit" ,java-junit)))
4228 (home-page "https://codehaus-plexus.github.io/plexus-classworlds/")
4229 (synopsis "Java class loader framework")
4230 (description "Plexus classworlds replaces the native @code{ClassLoader}
4231 mechanism of Java. It is especially useful for dynamic loading of application
4233 (license license:asl2.0)))
4235 (define java-plexus-container-default-bootstrap
4237 (name "java-plexus-container-default-bootstrap")
4242 (url "https://github.com/codehaus-plexus/plexus-containers")
4243 (commit (string-append "plexus-containers-" version))))
4244 (file-name (git-file-name name version))
4247 "1316hrp5vqfv0aw7miq2fp0wwy833h66h502h29vnh5sxj27x228"))))
4248 (build-system ant-build-system)
4250 `(#:jar-name "container-default.jar"
4251 #:source-dir "plexus-container-default/src/main/java"
4252 #:test-dir "plexus-container-default/src/test"
4253 #:tests? #f; requires plexus-archiver, which depends on this package
4255 (modify-phases %standard-phases
4256 (add-before 'build 'fix-google-collections
4258 ;; Google collections are now replaced with guava
4259 (substitute* "plexus-container-default/pom.xml"
4260 (("google-collections") "guava")
4261 (("com.google.collections") "com.google.guava"))
4263 (add-before 'build 'copy-resources
4266 "plexus-container-default/src/main/resources/"
4270 (install-from-pom "plexus-container-default/pom.xml")))))
4272 `(("java-plexus-worldclass" ,java-plexus-classworlds)
4273 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
4274 ("java-plexus-utils" ,java-plexus-utils)
4275 ("java-junit" ,java-junit)
4276 ("java-guava" ,java-guava)
4277 ("java-plexus-containers-parent-pom" ,java-plexus-containers-parent-pom)))
4278 (home-page "https://github.com/codehaus-plexus/plexus-containers")
4279 (synopsis "Inversion-of-control container")
4280 (description "Plexus-default-container is Plexus' inversion-of-control
4281 (@dfn{IoC}) container. It is composed of its public API and its default
4283 (license license:asl2.0)))
4285 (define java-plexus-containers-parent-pom
4287 (inherit java-plexus-container-default-bootstrap)
4288 (name "java-plexus-containers-parent-pom")
4292 (modify-phases %standard-phases
4296 (install-pom-file "pom.xml")))))
4298 `(("plexus-parent-pom" ,plexus-parent-pom-4.0)))))
4300 (define-public java-plexus-io
4302 (name "java-plexus-io")
4307 (url "https://github.com/codehaus-plexus/plexus-io")
4308 (commit (string-append "plexus-io-" version))))
4309 (file-name (git-file-name name version))
4312 "1r3wqfpbxq8vp4p914i8p88r0994rmcjw02hz14n11cfb6gsyvlr"))))
4313 (build-system ant-build-system)
4315 `(#:jar-name "plexus-io.jar"
4316 #:source-dir "src/main/java"
4317 #:test-dir "src/test"
4319 (modify-phases %standard-phases
4320 (add-before 'build 'copy-resources
4322 (mkdir-p "build/classes")
4323 (copy-recursively "src/main/resources" "build/classes")
4324 (mkdir-p "build/test-classes")
4325 (copy-recursively "src/test/resources" "build/test-classes")
4327 (replace 'install (install-from-pom "pom.xml")))))
4329 `(("java-plexus-utils" ,java-plexus-utils-3.3.0)
4330 ("java-commons-io" ,java-commons-io)
4331 ("plexus-parent-pom" ,plexus-parent-pom-5.1)))
4333 `(("java-jsr305" ,java-jsr305)))
4335 `(("junit" ,java-junit)
4336 ("hamcrest" ,java-hamcrest-core)
4337 ("guava" ,java-guava)
4338 ("classworlds" ,java-plexus-classworlds)
4339 ("xbean" ,java-geronimo-xbean-reflect)
4340 ("container-default" ,java-plexus-container-default-bootstrap)))
4341 (home-page "https://github.com/codehaus-plexus/plexus-io")
4342 (synopsis "I/O plexus components")
4343 (description "Plexus IO is a set of plexus components, which are designed
4344 for use in I/O operations. This implementation using plexus components allows
4345 reusing it in maven.")
4346 (license license:asl2.0)))
4348 (define-public java-plexus-archiver
4350 (name "java-plexus-archiver")
4354 (uri (string-append "https://github.com/codehaus-plexus/plexus-archiver"
4355 "/archive/plexus-archiver-" version ".tar.gz"))
4358 "144n971r3lfrx3l12nf2scm80x4xdvgbkk4bjpa4vcvvdrll6qys"))))
4359 (build-system ant-build-system)
4361 `(#:jar-name "plexus-archiver.jar"
4362 #:source-dir "src/main/java"
4363 #:test-dir "src/test"
4364 #:test-exclude (list "**/Abstract*.java" "**/Base*.java")
4366 (modify-phases %standard-phases
4367 (add-before 'check 'remove-failing
4369 ;; Requires an older version of plexus container
4371 "src/test/java/org/codehaus/plexus/archiver/DuplicateFilesTest.java")
4373 (add-before 'check 'fix-test-building
4375 (substitute* "build.xml"
4376 (("srcdir=\"src/test\"") "srcdir=\"src/test/java\""))
4378 (add-before 'build 'copy-resources
4380 (mkdir-p "build/classes")
4381 (copy-recursively "src/main/resources" "build/classes")
4382 (mkdir-p "build/test-classes")
4383 (copy-recursively "src/test/resources" "build/test-classes")
4385 (replace 'install (install-from-pom "pom.xml")))))
4387 `(("java-plexus-utils" ,java-plexus-utils-3.3.0)
4388 ("java-plexus-io" ,java-plexus-io)
4389 ("java-iq80-snappy" ,java-iq80-snappy)
4390 ("java-commons-compress" ,java-commons-compress)
4391 ("plexus-parent-pom" ,plexus-parent-pom-6.1)))
4393 `(("java-jsr305" ,java-jsr305)
4394 ("java-plexus-container-default"
4395 ,java-plexus-container-default-bootstrap)))
4397 `(("java-hamcrest-core" ,java-hamcrest-core)
4398 ("junit" ,java-junit)
4399 ("classworld" ,java-plexus-classworlds)
4400 ("xbean" ,java-geronimo-xbean-reflect)
4402 ("guava" ,java-guava)))
4403 (home-page "https://github.com/codehaus-plexus/plexus-archiver")
4404 (synopsis "Archiver component of the Plexus project")
4405 (description "Plexus-archiver contains a component to deal with project
4407 (license license:asl2.0)))
4409 (define-public java-plexus-container-default
4411 (inherit java-plexus-container-default-bootstrap)
4412 (name "java-plexus-container-default")
4414 `(#:jar-name "container-default.jar"
4415 #:source-dir "plexus-container-default/src/main/java"
4416 #:test-dir "plexus-container-default/src/test"
4417 #:test-exclude (list ;"**/*Test.java"
4419 ;; Requires plexus-hierarchy
4420 "**/PlexusHierarchyTest.java"
4422 "**/ComponentRealmCompositionTest.java"
4423 "**/PlexusContainerTest.java")
4425 (modify-phases %standard-phases
4426 (add-before 'build 'fix-google-collections
4428 ;; Google collections are now replaced with guava
4429 (substitute* "plexus-container-default/pom.xml"
4430 (("google-collections") "guava")
4431 (("com.google.collections") "com.google.guava"))
4433 (add-before 'build 'copy-resources
4436 "plexus-container-default/src/main/resources/"
4439 (add-before 'check 'fix-paths
4441 (let ((dir "plexus-container-default/src/test/java/org/codehaus"))
4444 dir "/plexus/component/composition/"
4445 "ComponentRealmCompositionTest.java")
4446 (("src/test") "plexus-container-default/src/test"))
4449 (install-from-pom "plexus-container-default/pom.xml")))))
4451 `(("worldclass" ,java-plexus-classworlds)
4452 ("xbean" ,java-geronimo-xbean-reflect)
4453 ("utils" ,java-plexus-utils)
4454 ("junit" ,java-junit)
4455 ("guava" ,java-guava)))
4457 `(("archiver" ,java-plexus-archiver)
4458 ("hamcrest" ,java-hamcrest-core)))))
4460 (define-public java-plexus-component-annotations
4462 (inherit java-plexus-container-default)
4463 (name "java-plexus-component-annotations")
4465 `(#:jar-name "plexus-component-annotations.jar"
4466 #:source-dir "plexus-component-annotations/src/main/java"
4467 #:tests? #f; no tests
4469 (modify-phases %standard-phases
4471 (install-from-pom "plexus-component-annotations/pom.xml")))))
4473 `(("java-plexus-containers-parent-pom" ,java-plexus-containers-parent-pom)))
4476 (synopsis "Plexus descriptors generator")
4477 (description "This package is a Maven plugin to generate Plexus descriptors
4478 from source tags and class annotations.")))
4480 (define-public java-plexus-component-metadata
4482 (inherit java-plexus-container-default)
4483 (name "java-plexus-component-metadata")
4485 `(#:jar-name "plexus-component-metadata.jar"
4486 #:source-dir "src/main/java"
4487 #:test-dir "src/test"
4490 (modify-phases %standard-phases
4491 (add-before 'configure 'chdir
4493 (chdir "plexus-component-metadata")
4495 (add-before 'build 'copy-resources
4497 (copy-recursively "src/main/resources"
4501 `(("java-plexus-container-default" ,java-plexus-container-default)
4502 ("java-plexu-component-annotations" ,java-plexus-component-annotations)
4503 ("java-plexus-utils" ,java-plexus-utils)
4504 ("java-plexus-cli" ,java-plexus-cli)
4505 ("java-plexus-classworlds" ,java-plexus-classworlds)
4506 ("maven-plugin-api" ,maven-plugin-api)
4507 ("maven-plugin-annotations" ,maven-plugin-annotations)
4508 ("maven-core-bootstrap" ,maven-core-bootstrap)
4509 ("maven-model" ,maven-model)
4510 ("java-commons-cli" ,java-commons-cli)
4511 ("java-qdox" ,java-qdox)
4512 ("java-jdom2" ,java-jdom2)
4513 ("java-asm" ,java-asm)))
4515 `(("java-junit" ,java-junit)
4516 ("java-guava" ,java-guava)
4517 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)))
4518 (synopsis "Inversion-of-control container for Maven")
4519 (description "The Plexus project provides a full software stack for creating
4520 and executing software projects. Based on the Plexus container, the
4521 applications can utilise component-oriented programming to build modular,
4522 reusable components that can easily be assembled and reused. This package
4523 provides the Maven plugin generating the component metadata.")))
4525 (define-public java-plexus-cipher
4527 (name "java-plexus-cipher")
4532 (url "https://github.com/codehaus-plexus/plexus-cipher")
4533 (commit (string-append "plexus-cipher-" version))))
4534 (file-name (git-file-name name version))
4537 "0m638nzlxbmnbcj5cwdpgs326ab584yv0k803zlx37r6iqwvf6b0"))))
4538 (build-system ant-build-system)
4540 `(#:jar-name "plexus-cipher.jar"
4541 #:source-dir "src/main/java"
4542 #:tests? #f; FIXME: requires sisu-inject-bean
4544 (modify-phases %standard-phases
4545 (add-before 'build 'copy-resources
4547 (copy-recursively "src/main/resources" "build/classes")
4548 (mkdir-p "build/classes/META-INF/sisu")
4549 (with-output-to-file "build/classes/META-INF/sisu/javax.inject.Named"
4551 (display "org.sonatype.plexus.components.cipher.DefaultPlexusCipher\n")))
4553 (add-before 'install 'fix-test-dependency
4555 ;; sisu-inject-bean is only used for tests, but its scope is "provided".
4556 (substitute* "pom.xml"
4557 (("provided") "test"))
4559 (replace 'install (install-from-pom "pom.xml")))))
4561 `(("java-cdi-api" ,java-cdi-api)
4562 ("java-javax-inject" ,java-javax-inject)))
4564 `(("java-sonatype-spice-parent-pom" ,java-sonatype-spice-parent-pom-15)))
4566 `(("java-junit" ,java-junit)))
4567 (home-page "https://github.com/sonatype/plexus-cipher")
4568 (synopsis "Encryption/decryption Component")
4569 (description "Plexus-cipher contains a component to deal with encryption
4571 (license license:asl2.0)))
4573 (define-public java-plexus-java
4575 (name "java-plexus-java")
4580 (url "https://github.com/codehaus-plexus/plexus-languages")
4581 (commit (string-append "plexus-languages-" version))))
4582 (file-name (git-file-name name version))
4585 "0vmvgq5hfxs90yyxgssfpwq78l7vwx1ljwpkk594mrdr8sm668b5"))
4586 (modules '((guix build utils)))
4589 (for-each delete-file (find-files "." ".*.jar$"))
4591 (build-system ant-build-system)
4593 `(#:jar-name "plexus-java.java"
4594 #:source-dir "plexus-java/src/main/java"
4595 #:test-dir "plexus-java/src/test"
4596 #:tests? #f; require mockito 2
4598 (modify-phases %standard-phases
4599 (add-after 'build 'generate-metadata
4601 (invoke "java" "-cp" (string-append (getenv "CLASSPATH") ":build/classes")
4602 "org.codehaus.plexus.metadata.PlexusMetadataGeneratorCli"
4603 "--source" "plexus-java/src/main/java"
4604 "--output" "build/classes/META-INF/plexus/components.xml"
4605 "--classes" "build/classes"
4606 "--descriptors" "build/classes/META-INF")
4607 (invoke "ant" "jar")
4609 (add-before 'install 'install-parent
4610 (install-pom-file "pom.xml"))
4612 (install-from-pom "plexus-java/pom.xml")))))
4614 `(("java-asm" ,java-asm)
4615 ("java-qdox" ,java-qdox-2-M9)
4616 ("java-javax-inject" ,java-javax-inject)
4617 ("plexus-parent-pom" ,plexus-parent-pom-4.0)))
4619 `(("java-plexus-component-annotations" ,java-plexus-component-annotations)))
4621 `(("java-plexus-component-metadata" ,java-plexus-component-metadata)
4622 ("java-junit" ,java-junit)))
4623 (home-page "https://codehaus-plexus.github.io/plexus-languages/plexus-java")
4624 (synopsis "Shared language features for Java")
4625 (description "This package contains shared language features of the Java
4626 language, for the plexus project.")
4627 (license license:asl2.0)))
4629 (define-public java-plexus-compiler-api
4631 (name "java-plexus-compiler-api")
4636 (url "https://github.com/codehaus-plexus/plexus-compiler")
4637 (commit (string-append "plexus-compiler-" version))))
4638 (file-name (git-file-name name version))
4641 "1nq1gnn3s6z1j29gmi1hqbklsmm8b1lmnafb0191914f95mn18gk"))))
4642 (build-system ant-build-system)
4644 `(#:jar-name "plexus-compiler-api.jar"
4645 #:source-dir "plexus-compiler-api/src/main/java"
4646 #:test-dir "plexus-compiler-api/src/test"
4648 (modify-phases %standard-phases
4650 (install-from-pom "plexus-compiler-api/pom.xml")))))
4652 `(("java-plexus-container-default" ,java-plexus-container-default)
4653 ("java-plexus-compiler-pom" ,java-plexus-compiler-pom)
4654 ("java-plexus-util" ,java-plexus-utils)))
4656 `(("java-junit" ,java-junit)))
4657 (home-page "https://github.com/codehaus-plexus/plexus-compiler")
4658 (synopsis "Plexus Compilers component's API to manipulate compilers")
4659 (description "This package contains the API used by components to manipulate
4661 (license (list license:asl2.0
4664 (define java-plexus-compiler-pom
4666 (inherit java-plexus-compiler-api)
4667 (name "java-plexus-compiler-pom")
4671 (modify-phases %standard-phases
4675 (install-pom-file "pom.xml"))
4676 (add-after 'install 'install-compilers
4677 (install-pom-file "plexus-compilers/pom.xml")))))
4679 `(("plexus-components-parent-pom-4.0" ,plexus-components-parent-pom-4.0)))))
4681 (define plexus-components-parent-pom-4.0
4683 (name "plexus-components-parent-pom")
4688 (url "https://github.com/codehaus-plexus/plexus-components")
4689 (commit (string-append "plexus-components-" version))))
4690 (file-name (git-file-name name version))
4693 "041bm8yv0m2i17mqg8zljib4ykpha7ijls2qfdwvkma4d39lhysi"))))
4694 (build-system ant-build-system)
4698 (modify-phases %standard-phases
4702 (install-pom-file "pom.xml")))))
4704 `(("plexus-parent-pom-4.0" ,plexus-parent-pom-4.0)))
4705 (home-page "https://codehaus-plexus.github.io/plexus-components")
4706 (synopsis "Plexus parent pom")
4707 (description "This package contains the Plexus components parent POM.")
4708 (license license:asl2.0)))
4710 (define-public java-plexus-compiler-manager
4712 (inherit java-plexus-compiler-api)
4713 (name "java-plexus-compiler-manager")
4715 `(#:jar-name "compiler-compiler-manager.java"
4716 #:source-dir "plexus-compiler-manager/src/main/java"
4717 #:test-dir "plexus-compiler-manager/src/test"
4720 (modify-phases %standard-phases
4721 (add-after 'build 'generate-metadata
4723 (invoke "java" "-cp" (string-append (getenv "CLASSPATH") ":build/classes")
4724 "org.codehaus.plexus.metadata.PlexusMetadataGeneratorCli"
4725 "--source" "plexus-compiler-manager/src/main/java"
4726 "--output" "build/classes/META-INF/plexus/components.xml"
4727 "--classes" "build/classes"
4728 "--descriptors" "build/classes/META-INF")
4729 (invoke "ant" "jar")
4731 (add-after 'generate-metadata 'rebuild
4733 (invoke "ant" "jar")
4736 (install-from-pom "plexus-compiler-manager/pom.xml")))))
4738 `(("java-plexus-compiler-api" ,java-plexus-compiler-api)
4739 ("java-plexus-compiler-pom" ,java-plexus-compiler-pom)
4740 ("java-plexus-container-default" ,java-plexus-container-default)))
4743 ("java-plexus-component-metadata" ,java-plexus-component-metadata)))
4744 (synopsis "Compiler management for Plexus Compiler component")
4745 (description "Plexus Compiler is a Plexus component to use different
4746 compilers through a uniform API. This component chooses the compiler
4747 implementation to use in a project.")))
4749 (define-public java-plexus-compiler-javac
4751 (inherit java-plexus-compiler-api)
4752 (name "java-plexus-compiler-javac")
4754 `(#:jar-name "plexus-compiler-javac.jar"
4755 #:source-dir "plexus-compilers/plexus-compiler-javac/src/main/java"
4757 #:tests? #f; depends on compiler-test -> maven-core -> ... -> this package.
4758 #:test-dir "plexus-compilers/plexus-compiler-javac/src/test"
4759 #:modules ((guix build ant-build-system)
4761 (guix build java-utils)
4764 (modify-phases %standard-phases
4765 ;; We cannot use java-plexus-component-metadata to generate the metadata
4766 ;; because it ultimately depends on this package.
4767 ;; Create it manually instead
4768 (add-before 'build 'create-metadata
4770 (let* ((dir "build/classes/META-INF/plexus")
4771 (file (string-append dir "/components.xml")))
4773 (with-output-to-file file
4779 (role "org.codehaus.plexus.compiler.Compiler")
4781 (implementation "org.codehaus.plexus.compiler.javac.JavacCompiler")
4782 (isolated-realm "false"))))))))
4785 (install-from-pom "plexus-compilers/plexus-compiler-javac/pom.xml")))))
4787 `(("java-plexus-compiler-api" ,java-plexus-compiler-api)
4788 ("java-plexus-utils" ,java-plexus-utils)
4789 ("java-plexus-container-default" ,java-plexus-container-default)))
4790 (synopsis "Javac Compiler support for Plexus Compiler component")
4791 (description "This package contains the Javac Compiler support for Plexus
4792 Compiler component.")))
4794 (define plexus-components-pom-1.1.20
4796 (name "plexus-components-pom-1.1.20")
4801 (url "https://github.com/codehaus-plexus/plexus-components")
4802 (commit (string-append "plexus-components-" version))))
4803 (file-name (git-file-name name version))
4806 "1q254k95m9icyfsvaw8c226midg8v6v436wvivhv7im825mnp5yb"))))
4807 (build-system ant-build-system)
4811 (modify-phases %standard-phases
4815 (install-pom-file "pom.xml")))))
4817 `(("plexus-parent-pom" ,plexus-parent-pom-3.1)))
4818 (home-page "https://github.com/codehaus-plexus/plexus-components")
4819 (synopsis "Maven parent pom for plexus packages")
4820 (description "This package contains the parent pom for plexus component
4822 (license license:asl2.0)))
4824 (define-public java-plexus-digest
4826 (name "java-plexus-digest")
4831 (url "https://github.com/codehaus-plexus/plexus-digest")
4832 (commit "2a52ad1bda8297fa0e287163d2fa37245ec6a430")))
4833 (file-name (git-file-name name version))
4836 "19w5wxsliz8r42niry68qa665kvjsb8081dazg9vgd3pca72w07x"))))
4837 (build-system ant-build-system)
4839 `(#:jar-name "plexus-digest.jar"
4840 #:source-dir "src/main/java"
4843 (modify-phases %standard-phases
4845 (install-from-pom "pom.xml")))))
4847 `(("java-plexus-utils" ,java-plexus-utils)
4848 ("plexus-components-pom-1.1.20" ,plexus-components-pom-1.1.20)))
4850 `(("java-junit" ,java-junit)))
4851 (home-page "https://github.com/codehaus-plexus/plexus-digest")
4852 (synopsis "Hash function utilities for Java")
4853 (description "This package is a plexus component that contains hash
4854 function utilities.")
4855 (license license:asl2.0)))
4857 (define-public java-plexus-sec-dispatcher
4859 (name "java-plexus-sec-dispatcher")
4860 (version "1.4") ;; Newest release listed at the Maven Central Repository.
4862 ;; This project doesn't tag releases or publish tarballs, so we take
4863 ;; the "prepare release plexus-sec-dispatcher-1.4" git commit.
4866 (url "https://github.com/sonatype/plexus-sec-dispatcher/")
4867 (commit "7db8f880486e192a1c5ea9544e01e756c3d49d0f")))
4870 "1ng4yliy4cqpjr4fxxjbpwyk1wkch5f8vblm1kvwf328s4gibszs"))
4871 (file-name (git-file-name name version))))
4873 `(#:jar-name "plexus-sec-dispatcher.jar"
4874 #:source-dir "src/main/java"
4876 (modify-phases %standard-phases
4877 (add-before 'build 'generate-models
4878 (lambda* (#:key inputs #:allow-other-keys)
4879 (define (modello-single-mode file version mode)
4881 "org.codehaus.modello.ModelloCli"
4882 file mode "src/main/java" version
4884 (let ((file "src/main/mdo/settings-security.mdo"))
4885 (modello-single-mode file "1.0.0" "java")
4886 (modello-single-mode file "1.0.0" "xpp3-reader")
4887 (modello-single-mode file "1.0.0" "xpp3-writer"))
4889 (add-before 'build 'generate-components.xml
4891 (mkdir-p "build/classes/META-INF/plexus")
4892 (with-output-to-file "build/classes/META-INF/plexus/components.xml"
4898 <role>org.sonatype.plexus.components.sec.dispatcher.SecDispatcher</role>\n
4899 <role-hint>default</role-hint>\n
4900 <implementation>org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher</implementation>\n
4901 <description></description>\n
4904 <role>org.sonatype.plexus.components.cipher.PlexusCipher</role>\n
4905 <field-name>_cipher</field-name>\n
4908 <role>org.sonatype.plexus.components.sec.dispatcher.PasswordDecryptor</role>\n
4909 <field-name>_decryptors</field-name>\n
4913 <_configuration-file>~/.settings-security.xml</_configuration-file>\n
4917 </component-set>\n")))
4919 (add-before 'check 'fix-paths
4921 (copy-recursively "src/test/resources" "target")
4923 (replace 'install (install-from-pom "pom.xml")))))
4925 `(("java-plexus-utils" ,java-plexus-utils)
4926 ("java-plexus-cipher" ,java-plexus-cipher)
4927 ("java-sonatype-spice-parent-pom" ,java-sonatype-spice-parent-pom-12)))
4929 `(("java-modello-core" ,java-modello-core)
4931 ("java-plexus-container-default" ,java-plexus-container-default)
4932 ("java-plexus-classworlds" ,java-plexus-classworlds)
4933 ("java-plexus-utils" ,java-plexus-utils)
4934 ("java-guava" ,java-guava)
4935 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
4936 ("java-sisu-build-api" ,java-sisu-build-api)
4938 ("java-modellop-plugins-java" ,java-modello-plugins-java)
4939 ("java-modellop-plugins-xml" ,java-modello-plugins-xml)
4940 ("java-modellop-plugins-xpp3" ,java-modello-plugins-xpp3)
4942 ("java-junit" ,java-junit)))
4943 (build-system ant-build-system)
4944 (home-page "https://github.com/sonatype/plexus-sec-dispatcher")
4945 (synopsis "Plexus Security Dispatcher Component")
4946 (description "This package is the Plexus Security Dispatcher Component.
4947 This component decrypts a string passed to it.")
4948 (license license:asl2.0)))
4950 (define-public java-plexus-cli
4952 (name "java-plexus-cli")
4957 (url "https://github.com/sonatype/plexus-cli")
4958 (commit "a776afa6bca84e5107bedb69440329cdb24ed645")))
4959 (file-name (string-append name "-" version))
4962 "0xjrlay605rypv3zd7y24vlwf0039bil3n2cqw54r1ddpysq46vx"))))
4963 (build-system ant-build-system)
4965 `(#:jar-name "plexus-cli.jar"
4966 #:source-dir "src/main/java"
4968 #:test-dir "src/test"))
4970 `(("java-commons-cli" ,java-commons-cli)
4971 ("java-plexus-container-default" ,java-plexus-container-default)
4972 ("java-plexus-classworlds" ,java-plexus-classworlds)))
4974 `(("java-plexus-utils" ,java-plexus-utils)
4975 ("java-junit" ,java-junit)
4976 ("java-guava" ,java-guava)))
4977 (home-page "https://codehaus-plexus.github.io/plexus-cli")
4978 (synopsis "CLI building library for plexus")
4979 (description "This package is a library to help creating CLI around
4980 Plexus components.")
4981 (license license:asl2.0)))
4983 (define-public java-sisu-build-api
4985 (name "java-sisu-build-api")
4990 (url "https://github.com/sonatype/sisu-build-api")
4991 (commit (string-append "plexus-build-api-" version))))
4992 (file-name (git-file-name name version))
4995 "1d5w6c58gkx30d51v7qwv1xrhc0ly76848gihmgshj19yf6yhca0"))))
4996 (build-system ant-build-system)
4998 `(#:jar-name "sisu-build-api.jar"
4999 #:source-dir "src/main/java"
5001 #:tests? #f; FIXME: how to run the tests?
5003 (modify-phases %standard-phases
5004 (add-before 'build 'copy-resources
5006 (copy-recursively "src/main/resources" "build/classes")
5007 (substitute* (find-files "build/classes")
5008 (("\\$\\{project.version\\}") ,version))
5010 (add-before 'build 'generate-plexus-compontent
5012 (mkdir-p "build/classes/META-INF/plexus")
5013 ;; This file is required for plexus to inject this package.
5014 ;; FIXME: how is it generated?
5015 (with-output-to-file "build/classes/META-INF/plexus/components.xml"
5021 <role>org.sonatype.plexus.build.incremental.BuildContext</role>\n
5022 <role-hint>default</role-hint>\n
5023 <implementation>org.sonatype.plexus.build.incremental.DefaultBuildContext</implementation>\n
5024 <description>Filesystem based non-incremental build context implementation\n
5025 which behaves as if all files were just created.</description>\n
5028 </component-set>\n")))
5031 (install-from-pom "pom.xml")))))
5033 `(("java-plexus-utils" ,java-plexus-utils)
5034 ("java-plexus-container-default" ,java-plexus-container-default)))
5035 (home-page "https://github.com/sonatype/sisu-build-api/")
5036 (synopsis "Base build API for maven")
5037 (description "This package contains the base build API for maven and
5038 a default implementation of it. This API is about scanning files in a
5039 project and determining what files need to be rebuilt.")
5040 (license license:asl2.0)))
5042 (define-public java-modello-core
5044 (name "java-modello-core")
5049 (url "https://github.com/codehaus-plexus/modello")
5050 (commit (string-append "modello-" version))))
5051 (file-name (git-file-name name version))
5054 "1di6ni42aqllpdvkpyfcw70352vr2i8wf6hd5nhd9kmqjb5dj5j4"))))
5055 (build-system ant-build-system)
5057 `(#:jar-name "modello-core.jar"
5058 #:source-dir "modello-core/src/main/java"
5059 #:test-dir "modello-core/src/test"
5060 #:main-class "org.codehaus.modello.ModelloCli"
5063 (modify-phases %standard-phases
5064 (add-before 'build 'copy-resources
5066 (mkdir-p "build/classes/META-INF/plexus")
5067 (copy-file "modello-core/src/main/resources/META-INF/plexus/components.xml"
5068 "build/classes/META-INF/plexus/components.xml")
5070 (add-before 'check 'fix-tests
5072 (with-directory-excursion "modello-core/src/test/java/org/codehaus"
5073 (substitute* '("modello/core/DefaultModelloCoreTest.java"
5074 "modello/core/io/ModelReaderTest.java")
5075 (("src/test") "modello-core/src/test")))
5078 `(("java-plexus-utils" ,java-plexus-utils)
5079 ("java-plexus-container-default" ,java-plexus-container-default)
5080 ("java-sisu-build-api" ,java-sisu-build-api)))
5082 `(("java-junit" ,java-junit)
5083 ("java-plexus-classworlds" ,java-plexus-classworlds)
5084 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
5085 ("java-guava" ,java-guava)))
5086 (home-page "https://codehaus-plexus.github.io/modello/")
5087 (synopsis "Framework for code generation from a simple model")
5088 (description "Modello is a framework for code generation from a simple model.
5090 Modello generates code from a simple model format: based on a plugin
5091 architecture, various types of code and descriptors can be generated from the
5092 single model, including Java POJOs, XML/JSON/YAML marshallers/unmarshallers,
5093 XSD and documentation.")
5096 ;; Although this package uses only files licensed under expat,
5097 ;; other parts of the source are licensed under different
5098 ;; licenses. We include them to be inherited by other packages.
5100 ;; Some files in modello-plugin-java are licensed under a
5101 ;; 5-clause BSD license.
5102 (license:non-copyleft
5103 (string-append "file:///modello-plugins/modello-plugin-java/"
5104 "src/main/java/org/codehaus/modello/plugin/"
5105 "java/javasource/JNaming.java"))))))
5107 (define-public java-modello-plugins-java
5109 (inherit java-modello-core)
5110 (name "java-modello-plugins-java")
5112 `(#:jar-name "modello-plugins-java.jar"
5113 #:source-dir "modello-plugins/modello-plugin-java/src/main/java"
5114 #:test-dir "modello-plugins/modello-plugin-java/src/test"
5116 #:tests? #f; requires maven-model, which depends on this package
5118 (modify-phases %standard-phases
5119 (add-before 'build 'copy-resources
5121 (mkdir-p "build/classes")
5122 (copy-recursively "modello-plugins/modello-plugin-java/src/main/resources"
5126 `(("java-modello-core" ,java-modello-core)))
5127 (synopsis "Modello Java Plugin")
5128 (description "Modello Java Plugin generates Java objects for the model.")))
5130 (define-public java-modello-plugins-xml
5132 (inherit java-modello-core)
5133 (name "java-modello-plugins-xml")
5135 `(#:jar-name "modello-plugins-xml.jar"
5136 #:source-dir "modello-plugins/modello-plugin-xml/src/main/java"
5137 #:test-dir "modello-plugins/modello-plugin-xml/src/test"
5140 (modify-phases %standard-phases
5141 (add-before 'build 'copy-resources
5143 (mkdir-p "build/classes")
5145 "modello-plugins/modello-plugin-xml/src/main/resources"
5148 (add-before 'check 'fix-paths
5150 (with-directory-excursion "modello-plugins/modello-plugin-xml/src/test"
5152 "java/org/codehaus/modello/plugins/xml/XmlModelloPluginTest.java"
5153 (("src/test") "modello-plugins/modello-plugin-xml/src/test")))
5156 `(("java-modello-core" ,java-modello-core)
5157 ("java-modello-plugins-java" ,java-modello-plugins-java)))
5158 (synopsis "Modello XML Plugin")
5159 (description "Modello XML Plugin contains shared code for every plugins
5160 working on XML representation of the model.")))
5162 (define-public java-modello-test
5164 (inherit java-modello-core)
5165 (name "java-modello-test")
5167 `(#:jar-name "modello-test.jar"
5168 #:source-dir "modello-test/src/main/java"
5169 #:tests? #f; no tests
5172 `(("java-plexus-utils" ,java-plexus-utils)
5173 ("java-plexus-compiler-api" ,java-plexus-compiler-api)
5174 ("java-plexus-compiler-javac" ,java-plexus-compiler-javac)
5175 ("java-plexus-container-default" ,java-plexus-container-default)))
5176 (synopsis "Modello test package")
5177 (description "The modello test package contains the basis to create
5178 Modello generator unit-tests, including sample models and xml files to test
5179 every feature for every plugin.")))
5181 (define-public java-modello-plugins-xpp3
5183 (inherit java-modello-core)
5184 (name "java-modello-plugins-xpp3")
5186 `(#:jar-name "modello-plugins-xpp3.jar"
5187 #:source-dir "modello-plugins/modello-plugin-xpp3/src/main/java"
5188 #:test-dir "modello-plugins/modello-plugin-xpp3/src/test"
5189 ;; One of the test dependencies is maven-model which depends on this package.
5193 (modify-phases %standard-phases
5194 (add-before 'build 'copy-resources
5196 (mkdir-p "build/classes")
5197 (copy-recursively "modello-plugins/modello-plugin-xpp3/src/main/resources"
5201 `(("java-modello-core" ,java-modello-core)
5202 ("java-modello-plugins-java" ,java-modello-plugins-java)
5203 ("java-modello-plugins-xml" ,java-modello-plugins-xml)))
5205 `(("java-xmlunit" ,java-xmlunit)
5206 ("java-modello-test" ,java-modello-test)
5207 ,@(package-native-inputs java-modello-core)))
5208 (synopsis "Modello XPP3 Plugin")
5209 (description "The modello XPP3 plugin generates XML readers and writers based
5210 on the XPP3 API (XML Pull Parser).")))
5212 (define-public java-asm
5218 (uri (string-append "https://download.forge.ow2.org/asm/"
5219 "asm-" version ".tar.gz"))
5222 "115l5pqblirdkmzi32dxx7gbcm4jy0s14y5wircr6h8jdr9aix00"))))
5223 (build-system ant-build-system)
5225 `(#:build-target "compile"
5226 ;; The tests require an old version of Janino, which no longer compiles
5231 ;; We don't need these extra ant tasks, but the build system asks us to
5232 ;; provide a path anyway.
5233 "-Dobjectweb.ant.tasks.path=dummy-path"
5234 ;; The java-aqute.bndlib JAR file will be put onto the classpath and
5235 ;; used during the build automatically by ant-build-system, but
5236 ;; java-asm's build.xml fails unless we provide something here.
5237 "-Dbiz.aQute.bnd.path=dummy-path")
5239 (modify-phases %standard-phases
5240 (add-before 'build 'remove-bnd-dependency
5242 ;; This file is the only one to require bnd, and is not needed
5243 ;; because we don't build a bundle.
5244 (delete-file "src/org/objectweb/asm/tools/ModuleInfoBndPlugin.java")
5246 (add-before 'install 'build-jars
5247 (lambda* (#:key make-flags #:allow-other-keys)
5248 ;; We cannot use the "jar" target because it depends on a couple
5249 ;; of unpackaged, complicated tools.
5252 "-cf" (string-append "dist/asm-" ,version ".jar")
5253 "-C" "output/build/tmp" ".")))
5254 (add-before 'install 'fix-pom
5256 (substitute* (find-files "archive" "\\.pom$")
5257 (("@product.artifact@") ,version))
5259 (add-before 'install 'install-parent
5260 (install-pom-file "archive/asm-parent.pom"))
5262 (install-from-pom "archive/asm.pom")))))
5264 `(("java-junit" ,java-junit)))
5266 `(("java-org-ow2-parent-pom" ,java-org-ow2-parent-pom-1.3)))
5267 (home-page "https://asm.ow2.io/")
5268 (synopsis "Very small and fast Java bytecode manipulation framework")
5269 (description "ASM is an all purpose Java bytecode manipulation and
5270 analysis framework. It can be used to modify existing classes or dynamically
5271 generate classes, directly in binary form. The provided common
5272 transformations and analysis algorithms allow easily assembling custom
5273 complex transformations and code analysis tools.")
5274 (license license:bsd-3)))
5276 (define java-org-ow2-parent-pom-1.3
5278 (name "java-org-ow2-parent-pom")
5282 (uri "https://repo1.maven.org/maven2/org/ow2/ow2/1.3/ow2-1.3.pom")
5285 "1yr8hfx8gffpppa4ii6cvrsq029a6x8hzy7nsavxhs60s9kmq8ai"))))
5286 (build-system ant-build-system)
5290 (modify-phases %standard-phases
5295 (install-pom-file (assoc-ref %build-inputs "source"))))))
5296 (home-page "https://ow2.org")
5297 (synopsis "Ow2.org parent pom")
5298 (description "This package contains the parent pom for projects from ow2.org,
5299 including java-asm.")
5300 (license license:lgpl2.1+)))
5302 (define java-asm-bootstrap
5305 (name "java-asm-bootstrap")
5307 (substitute-keyword-arguments (package-arguments java-asm)
5309 (native-inputs `())))
5311 (define-public java-asm-8
5318 (url "https://gitlab.ow2.org/asm/asm")
5319 (commit (string-append
5320 "ASM_" (string-join (string-split version #\.)
5322 (file-name (git-file-name "java-asm" version))
5325 "1s6j27zc1i76gh891w2g48b1c3abp9w8zp5j54yb1vm5h8djkd69"))))
5327 `(#:jar-name "asm8.jar"
5328 #:source-dir "asm/src/main/java"
5329 #:test-dir "asm/src/test"
5330 ;; tests depend on junit5
5332 (propagated-inputs '())
5333 (native-inputs '())))
5335 (define-public java-asm-tree-8
5337 (inherit java-asm-8)
5338 (name "java-asm-tree")
5340 `(#:jar-name "asm-tree.jar"
5341 #:source-dir "asm-tree/src/main/java"
5342 #:test-dir "asm-tree/src/test"
5343 ;; tests depend on junit5
5346 `(("java-asm" ,java-asm-8)))))
5348 (define-public java-asm-analysis-8
5350 (inherit java-asm-8)
5351 (name "java-asm-analysis")
5353 `(#:jar-name "asm-analysis.jar"
5354 #:source-dir "asm-analysis/src/main/java"
5355 #:test-dir "asm-analysis/src/test"
5356 ;; tests depend on junit5
5359 `(("java-asm" ,java-asm-8)
5360 ("java-asm-tree" ,java-asm-tree-8)))))
5362 (define-public java-asm-util-8
5364 (inherit java-asm-8)
5365 (name "java-asm-util")
5367 `(#:jar-name "asm-util8.jar"
5368 #:source-dir "asm-util/src/main/java"
5369 #:test-dir "asm-util/src/test"
5370 ;; tests depend on junit5
5373 `(("java-asm" ,java-asm-8)
5374 ("java-asm-analysis" ,java-asm-analysis-8)
5375 ("java-asm-tree" ,java-asm-tree-8)))))
5377 (define-public java-cglib
5385 (url "https://github.com/cglib/cglib")
5386 (commit (string-append
5388 (string-map (lambda (c) (if (char=? c #\.) #\_ c))
5390 (file-name (git-file-name name version))
5392 (base32 "186451jms2zfp47yd8kxd77az2cqal1my2br7klgyp8fpl4qfg8v"))))
5393 (build-system ant-build-system)
5395 `(;; FIXME: tests fail because junit runs
5396 ;; "net.sf.cglib.transform.AbstractTransformTest", which does not seem
5397 ;; to describe a test at all.
5399 #:jar-name "cglib.jar"
5401 (modify-phases %standard-phases
5402 (add-after 'unpack 'chdir
5403 (lambda _ (chdir "cglib") #t)))))
5405 `(("java-asm" ,java-asm)
5406 ("java-junit" ,java-junit)))
5407 (home-page "https://github.com/cglib/cglib/")
5408 (synopsis "Java byte code generation library")
5409 (description "The byte code generation library CGLIB is a high level API
5410 to generate and transform Java byte code.")
5411 (license license:asl2.0)))
5413 (define-public java-objenesis
5415 (name "java-objenesis")
5420 (url "https://github.com/easymock/objenesis")
5422 (file-name (git-file-name name version))
5425 "054yi200wj00x6dp1sxfrwgndwywadsbn8d8ij1j0v45j9g2vdya"))))
5426 (build-system ant-build-system)
5428 `(#:jar-name "objenesis.jar"
5429 #:source-dir "main/src/"
5430 #:test-dir "main/src/test/"))
5432 `(("java-junit" ,java-junit)
5433 ("java-hamcrest-core" ,java-hamcrest-core)))
5434 (home-page "http://objenesis.org/")
5435 (synopsis "Bypass the constructor when creating an object")
5436 (description "Objenesis is a small Java library that serves one purpose:
5437 to instantiate a new object of a particular class. It is common to see
5438 restrictions in libraries stating that classes must require a default
5439 constructor. Objenesis aims to overcome these restrictions by bypassing the
5440 constructor on object instantiation.")
5441 (license license:asl2.0)))
5443 (define-public java-easymock
5445 (name "java-easymock")
5450 (url "https://github.com/easymock/easymock/")
5451 (commit (string-append "easymock-" version))))
5452 (file-name (git-file-name name version))
5455 "02vybm8hc0i0n9sp2f2iiqn54zwqhq835f76wc6b2m7819z5a8dq"))))
5456 (build-system ant-build-system)
5458 `(#:jar-name "easymock.jar"
5459 #:source-dir "core/src/main"
5460 #:test-dir "core/src/test"
5462 (modify-phases %standard-phases
5463 ;; FIXME: Android support requires the following packages to be
5464 ;; available: com.google.dexmaker.stock.ProxyBuilder
5465 (add-after 'unpack 'delete-android-support
5467 (with-directory-excursion "core/src/main/java/org/easymock/internal"
5468 (substitute* "MocksControl.java"
5469 (("AndroidSupport.isAndroid\\(\\)") "false")
5470 (("return classProxyFactory = new AndroidClassProxyFactory\\(\\);") ""))
5471 (delete-file "AndroidClassProxyFactory.java"))
5473 (add-after 'unpack 'delete-broken-tests
5475 (with-directory-excursion "core/src/test/java/org/easymock"
5476 ;; This test depends on dexmaker.
5477 (delete-file "tests2/ClassExtensionHelperTest.java")
5479 ;; This is not a test.
5480 (delete-file "tests/BaseEasyMockRunnerTest.java")
5482 ;; This test should be executed with a different runner...
5483 (delete-file "tests2/EasyMockAnnotationsTest.java")
5484 ;; ...but deleting it means that we also have to delete these
5486 (delete-file "tests2/EasyMockRunnerTest.java")
5487 (delete-file "tests2/EasyMockRuleTest.java")
5489 ;; This test fails because the file "easymock.properties" does
5491 (delete-file "tests2/EasyMockPropertiesTest.java"))
5494 `(("java-asm" ,java-asm)
5495 ("java-cglib" ,java-cglib)
5496 ("java-objenesis" ,java-objenesis)))
5498 `(("java-junit" ,java-junit)
5499 ("java-hamcrest-core" ,java-hamcrest-core)))
5500 (home-page "https://easymock.org/")
5501 (synopsis "Java library providing mock objects for unit tests")
5502 (description "EasyMock is a Java library that provides an easy way to use
5503 mock objects in unit testing.")
5504 (license license:asl2.0)))
5506 (define-public java-jmock-1
5513 (url "https://github.com/jmock-developers/jmock-library")
5515 (file-name (git-file-name name version))
5518 "0lkga995xd9b9mmzxmcd301hlw83p1h78nibh7djlx7wydscr85z"))))
5519 (build-system ant-build-system)
5521 `(#:build-target "jars"
5522 #:test-target "run.tests"
5524 (modify-phases %standard-phases
5525 (replace 'install (install-jars "build")))))
5526 (home-page "http://jmock.org/")
5527 (synopsis "Mock object library for test-driven development")
5528 (description "JMock is a library that supports test-driven development of
5529 Java code with mock objects. Mock objects help you design and test the
5530 interactions between the objects in your programs.
5535 @item makes it quick and easy to define mock objects
5536 @item lets you precisely specify the interactions between
5537 your objects, reducing the brittleness of your tests
5538 @item plugs into your favourite test framework
5539 @item is easy to extend.
5541 (license license:bsd-3)))
5543 (define-public java-jmock
5545 (inherit java-jmock-1)
5551 (url "https://github.com/jmock-developers/jmock-library")
5553 (file-name (git-file-name name version))
5556 "12b7l22g3nrjvf2dzcw3z03fpd2chrgp0d8xkvn8w55rwb57pax6"))))
5558 `(("java-hamcrest-all" ,java-hamcrest-all)
5559 ("java-asm" ,java-asm)
5560 ("java-bsh" ,java-bsh)
5561 ("java-junit" ,java-junit)))
5563 `(("cglib" ,java-cglib)))
5565 `(#:jar-name "java-jmock.jar"
5566 #:source-dir "jmock/src/main/java"
5567 #:test-dir "jmock/src/test"))))
5569 (define-public java-jmock-junit4
5571 (inherit java-jmock)
5572 (name "java-jmock-junit4")
5574 `(#:jar-name "java-jmock-junit4.jar"
5575 #:source-dir "jmock-junit4/src/main/java"
5576 #:test-dir "jmock-junit4/src/test"))
5578 `(("java-hamcrest-all" ,java-hamcrest-all)
5579 ("java-asm" ,java-asm)
5580 ("java-bsh" ,java-bsh)
5581 ("java-jmock" ,java-jmock)
5582 ("java-jumit" ,java-junit)))))
5584 (define-public java-jmock-legacy
5586 (inherit java-jmock)
5587 (name "java-jmock-legacy")
5589 `(#:jar-name "java-jmock-legacy.jar"
5590 #:source-dir "jmock-legacy/src/main/java"
5591 #:test-dir "jmock-legacy/src/test"
5593 (modify-phases %standard-phases
5594 (add-before 'check 'copy-tests
5596 ;; This file is a dependancy of some tests
5597 (let ((file "org/jmock/test/acceptance/PackageProtectedType.java"))
5598 (copy-file (string-append "jmock/src/test/java/" file)
5599 (string-append "jmock-legacy/src/test/java/" file))
5602 `(("java-hamcrest-all" ,java-hamcrest-all)
5603 ("java-objenesis" ,java-objenesis)
5604 ("java-cglib" ,java-cglib)
5605 ("java-jmock" ,java-jmock)
5606 ("java-asm" ,java-asm)
5607 ("java-bsh" ,java-bsh)
5608 ("java-junit" ,java-junit)))
5610 `(("java-jmock-junit4" ,java-jmock-junit4)))))
5612 (define-public java-hamcrest-all
5613 (package (inherit java-hamcrest-core)
5614 (name "java-hamcrest-all")
5617 ,@(substitute-keyword-arguments (package-arguments java-hamcrest-core)
5618 ((#:build-target _) "bigjar")
5620 `(modify-phases ,phases
5621 ;; Some build targets override the classpath, so we need to patch
5622 ;; the build.xml to ensure that required dependencies are on the
5624 (add-after 'unpack 'patch-classpath-for-integration
5625 (lambda* (#:key inputs #:allow-other-keys)
5626 (substitute* "build.xml"
5627 ((" build/hamcrest-library-\\$\\{version\\}.jar" line)
5631 (find-files (assoc-ref inputs "java-junit") "\\.jar$")
5632 (find-files (assoc-ref inputs "java-jmock") "\\.jar$")
5633 (find-files (assoc-ref inputs "java-easymock") "\\.jar$")))
5635 (("build/hamcrest-core-\\$\\{version\\}\\.jar")
5636 (car (find-files (assoc-ref inputs "java-hamcrest-core")
5640 (lambda* (#:key outputs #:allow-other-keys)
5641 (let* ((target (string-append (assoc-ref outputs "out")
5645 "-" (package-version java-hamcrest-core) ".jar"))
5646 (install-without-version-suffix
5649 (string-append target
5650 (basename jar version-suffix)
5654 install-without-version-suffix
5657 (and (string-suffix? ".jar" name)
5658 (not (string-suffix? "-sources.jar" name)))))))
5661 `(("java-junit" ,java-junit)
5662 ("java-jmock" ,java-jmock-1)
5663 ;; This is necessary because of what seems to be a race condition.
5664 ;; This package would sometimes fail to build because hamcrest-core.jar
5665 ;; could not be found, even though it is built as part of this package.
5666 ;; Adding java-hamcrest-core appears to fix this problem. See
5667 ;; https://debbugs.gnu.org/31390 for more information.
5668 ("java-hamcrest-core" ,java-hamcrest-core)
5669 ("java-easymock" ,java-easymock)
5670 ,@(package-inputs java-hamcrest-core)))))
5672 (define-public java-jopt-simple
5674 (name "java-jopt-simple")
5678 (uri (string-append "http://repo1.maven.org/maven2/"
5679 "net/sf/jopt-simple/jopt-simple/"
5680 version "/jopt-simple-"
5681 version "-sources.jar"))
5684 "1v8bzmwmw6qq20gm42xyay6vrd567dra4vqwhgjnqqjz1gs9f8qa"))))
5685 (build-system ant-build-system)
5687 `(#:tests? #f ; there are no tests
5688 #:jar-name "jopt-simple.jar"))
5689 (home-page "https://pholser.github.io/jopt-simple/")
5690 (synopsis "Java library for parsing command line options")
5691 (description "JOpt Simple is a Java library for parsing command line
5692 options, such as those you might pass to an invocation of @code{javac}. In
5693 the interest of striving for simplicity, as closely as possible JOpt Simple
5694 attempts to honor the command line option syntaxes of POSIX @code{getopt} and
5695 GNU @code{getopt_long}. It also aims to make option parser configuration and
5696 retrieval of options and their arguments simple and expressive, without being
5698 (license license:expat)))
5700 (define-public java-commons-math3
5702 (name "java-commons-math3")
5706 (uri (string-append "mirror://apache/commons/math/source/"
5707 "commons-math3-" version "-src.tar.gz"))
5710 "19l6yp44qc5g7wg816nbn5z3zq3xxzwimvbm4a8pczgvpi4i85s6"))))
5711 (build-system ant-build-system)
5713 `(#:build-target "jar"
5714 #:test-target "test"
5716 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
5717 (junit (assoc-ref %build-inputs "java-junit")))
5718 (list (string-append "-Djunit.jar="
5719 (car (find-files junit "jar$")))
5720 (string-append "-Dhamcrest.jar="
5721 (car (find-files hamcrest ".*.jar$")))))
5723 (modify-phases %standard-phases
5724 ;; We want to build the jar in the build phase and run the tests
5725 ;; later in a separate phase.
5726 (add-after 'unpack 'untangle-targets
5728 (substitute* "build.xml"
5729 (("name=\"jar\" depends=\"test\"")
5730 "name=\"jar\" depends=\"compile\""))
5732 ;; There is no install target.
5734 (install-jars "target")))))
5736 `(("java-junit" ,java-junit)
5737 ("java-hamcrest-core" ,java-hamcrest-core)))
5738 (home-page "https://commons.apache.org/math/")
5739 (synopsis "Apache Commons mathematics library")
5740 (description "Commons Math is a library of lightweight, self-contained
5741 mathematics and statistics components addressing the most common problems not
5742 available in the Java programming language or Commons Lang.")
5743 (license license:asl2.0)))
5745 (define-public java-jmh
5752 (url "http://hg.openjdk.java.net/code-tools/jmh/")
5753 (changeset version)))
5754 (file-name (string-append name "-" version "-checkout"))
5757 "1fxyxhg9famwcg1prc4cgwb5wzyxqavn3cjm5vz8605xz7x5k084"))))
5758 (build-system ant-build-system)
5760 `(#:jar-name "jmh-core.jar"
5761 #:source-dir "jmh-core/src/main"
5762 #:test-dir "jmh-core/src/test"
5764 (modify-phases %standard-phases
5765 ;; This seems to be a bug in the JDK. It may not be necessary in
5766 ;; future versions of the JDK.
5767 (add-after 'unpack 'fix-bug
5769 (with-directory-excursion
5770 "jmh-core/src/main/java/org/openjdk/jmh/runner/options"
5771 (substitute* '("IntegerValueConverter.java"
5772 "ThreadsValueConverter.java")
5773 (("public Class<Integer> valueType")
5774 "public Class<? extends Integer> valueType")))
5777 `(("java-jopt-simple" ,java-jopt-simple)
5778 ("java-commons-math3" ,java-commons-math3)))
5780 `(("java-junit" ,java-junit)
5781 ("java-hamcrest-core" ,java-hamcrest-core)))
5782 (home-page "https://openjdk.java.net/projects/code-tools/jmh/")
5783 (synopsis "Benchmark harness for the JVM")
5784 (description "JMH is a Java harness for building, running, and analysing
5785 nano/micro/milli/macro benchmarks written in Java and other languages
5786 targeting the JVM.")
5788 (license license:gpl2)))
5790 (define-public java-commons-collections4
5792 (name "java-commons-collections4")
5796 (uri (string-append "mirror://apache/commons/collections/source/"
5797 "commons-collections4-" version "-src.tar.gz"))
5800 "1krfhvggympq4avk7gh6qafzf6b9ip6r1m4lmacikyx04039m0wl"))))
5801 (build-system ant-build-system)
5803 `(#:test-target "test"
5805 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
5806 (junit (assoc-ref %build-inputs "java-junit"))
5807 (easymock (assoc-ref %build-inputs "java-easymock")))
5808 (list (string-append "-Djunit.jar="
5809 (car (find-files junit "jar$")))
5810 (string-append "-Dhamcrest.jar="
5811 (car (find-files hamcrest "jar$")))
5812 (string-append "-Deasymock.jar=" easymock
5813 "/share/java/easymock.jar")))
5815 (modify-phases %standard-phases
5817 (install-jars "target")))))
5819 `(("java-junit" ,java-junit)
5820 ("java-hamcrest-core" ,java-hamcrest-core)
5821 ("java-easymock" ,java-easymock)))
5822 (home-page "https://commons.apache.org/collections/")
5823 (synopsis "Collections framework")
5824 (description "The Java Collections Framework is the recognised standard
5825 for collection handling in Java. Commons-Collections seek to build upon the
5826 JDK classes by providing new interfaces, implementations and utilities. There
5827 are many features, including:
5830 @item @code{Bag} interface for collections that have a number of copies of
5832 @item @code{BidiMap} interface for maps that can be looked up from value to
5833 key as well and key to value
5834 @item @code{MapIterator} interface to provide simple and quick iteration over
5836 @item Transforming decorators that alter each object as it is added to the
5838 @item Composite collections that make multiple collections look like one
5839 @item Ordered maps and sets that retain the order elements are added in,
5840 including an LRU based map
5841 @item Reference map that allows keys and/or values to be garbage collected
5843 @item Many comparator implementations
5844 @item Many iterator implementations
5845 @item Adapter classes from array and enumerations to collections
5846 @item Utilities to test or create typical set-theory properties of collections
5847 such as union, intersection, and closure.
5849 (license license:asl2.0)))
5851 (define-public java-commons-collections
5853 (inherit java-commons-collections4)
5854 (name "java-commons-collections")
5858 (uri (string-append "mirror://apache/commons/collections/source/"
5859 "commons-collections-" version "-src.tar.gz"))
5862 "055r51a5lfc3z7rkxnxmnn1npvkvda7636hjpm4qk7cnfzz98387"))
5864 (search-patches "java-commons-collections-fix-java8.patch"))))
5866 (substitute-keyword-arguments (package-arguments java-commons-collections4)
5868 `(modify-phases ,phases
5869 ;; The manifest is required by the build procedure
5870 (add-before 'build 'add-manifest
5872 (mkdir-p "build/conf")
5873 (call-with-output-file "build/conf/MANIFEST.MF"
5875 (format file "Manifest-Version: 1.0\n")))
5878 (install-jars "build"))))))))
5880 (define java-commons-collections-test-classes
5882 (inherit java-commons-collections)
5884 `(#:jar-name "commons-collections-test-classes.jar"
5885 #:source-dir "src/test"
5888 `(("collection" ,java-commons-collections)))))
5890 (define-public java-commons-beanutils
5892 (name "java-commons-beanutils")
5896 (uri (string-append "mirror://apache/commons/beanutils/source/"
5897 "commons-beanutils-" version "-src.tar.gz"))
5900 "03cs0bq3sl1sdc7py9g3qnf8n9h473nrkvd3d251kaqv6a2ab7qk"))))
5901 (build-system ant-build-system)
5903 `(#:test-target "test"
5906 (modify-phases %standard-phases
5908 (lambda* (#:key outputs #:allow-other-keys)
5909 (rename-file (string-append "dist/commons-beanutils-" ,version
5911 "commons-beanutils.jar")
5912 (install-file "commons-beanutils.jar"
5913 (string-append (assoc-ref outputs "out") "/share/java/"))
5916 `(("logging" ,java-commons-logging-minimal)
5917 ("collections" ,java-commons-collections)))
5919 `(("junit" ,java-junit)
5920 ("collections-test" ,java-commons-collections-test-classes)))
5921 (home-page "https://commons.apache.org/beanutils/")
5922 (synopsis "Dynamically set or get properties in Java")
5923 (description "BeanUtils provides a simplified interface to reflection and
5924 introspection to set or get dynamically determined properties through their
5925 setter and getter method.")
5926 (license license:asl2.0)))
5928 (define-public java-commons-io
5930 (name "java-commons-io")
5935 (uri (string-append "mirror://apache/commons/io/source/"
5936 "commons-io-" version "-src.tar.gz"))
5939 "0q5y41jrcjvx9hzs47x5kdhnasdy6rm4bzqd2jxl02w717m7a7v3"))))
5940 (build-system ant-build-system)
5941 (outputs '("out" "doc"))
5943 `(#:test-target "test"
5945 (list (string-append "-Djunit.jar="
5946 (car (find-files (assoc-ref %build-inputs "java-junit")
5949 (modify-phases %standard-phases
5950 (add-after 'build 'build-javadoc ant-build-javadoc)
5951 (replace 'install (install-from-pom "pom.xml"))
5952 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
5954 `(("java-junit" ,java-junit)
5955 ("java-hamcrest-core" ,java-hamcrest-core)))
5957 `(("apache-commons-parent-pom" ,apache-commons-parent-pom-39)))
5958 (home-page "https://commons.apache.org/io/")
5959 (synopsis "Common useful IO related classes")
5960 (description "Commons-IO contains utility classes, stream implementations,
5961 file filters and endian classes.")
5962 (license license:asl2.0)))
5964 (define-public java-commons-exec-1.1
5966 (name "java-commons-exec")
5971 (uri (string-append "mirror://apache/commons/exec/source/"
5972 "commons-exec-" version "-src.tar.gz"))
5975 "025dk8xgj10lxwwwqp0hng2rn7fr4vcirxzydqzx9k4dim667alk"))))
5976 (build-system ant-build-system)
5978 `(#:test-target "test"
5980 (list (string-append "-Dmaven.junit.jar="
5981 (car (find-files (assoc-ref %build-inputs "java-junit")
5984 (modify-phases %standard-phases
5985 (add-before 'build 'delete-network-tests
5987 (delete-file "src/test/java/org/apache/commons/exec/DefaultExecutorTest.java")
5988 (substitute* "src/test/java/org/apache/commons/exec/TestRunner.java"
5989 (("suite\\.addTestSuite\\(DefaultExecutorTest\\.class\\);") ""))
5991 ;; The "build" phase automatically tests.
5993 (replace 'install (install-jars "target")))))
5995 `(("java-junit" ,java-junit)))
5996 (home-page "https://commons.apache.org/proper/commons-exec/")
5997 (synopsis "Common program execution related classes")
5998 (description "Commons-Exec simplifies executing external processes.")
5999 (license license:asl2.0)))
6001 (define-public java-commons-exec
6003 (inherit java-commons-exec-1.1)
6008 (uri (string-append "mirror://apache/commons/exec/source/"
6009 "commons-exec-" version "-src.tar.gz"))
6012 "17yb4h6f8l49c5iyyvda4z2nmw0bxrx857nrwmsr7mmpb7x441yv"))))
6014 `(#:test-target "test"
6016 (list (string-append "-Dmaven.junit.jar="
6017 (car (find-files (assoc-ref %build-inputs "java-junit")
6019 "-Dmaven.compiler.source=1.7"
6020 "-Dmaven.compiler.target=1.7")
6022 (modify-phases %standard-phases
6023 (add-before 'build 'delete-network-tests
6024 (lambda* (#:key inputs #:allow-other-keys)
6025 ;; This test hangs indefinitely.
6026 (delete-file "src/test/java/org/apache/commons/exec/issues/Exec60Test.java")
6027 (substitute* "src/test/java/org/apache/commons/exec/issues/Exec41Test.java"
6028 (("ping -c 10 127.0.0.1") "sleep 10"))
6029 (substitute* "src/test/java/org/apache/commons/exec/issues/Exec49Test.java"
6031 (call-with-output-file "src/test/scripts/ping.sh"
6033 (format port "#!~a/bin/sh\nsleep $1\n"
6034 (assoc-ref inputs "bash"))))
6036 ;; The "build" phase automatically tests.
6038 (replace 'install (install-jars "target")))))
6040 `(("java-junit" ,java-junit)
6041 ("java-hamcrest-core" ,java-hamcrest-core)))))
6043 (define-public java-commons-lang
6045 (name "java-commons-lang")
6050 (uri (string-append "mirror://apache/commons/lang/source/"
6051 "commons-lang-" version "-src.tar.gz"))
6053 (base32 "1mxwagqadzx1b2al7i0z1v0r235aj2njdyijf02szq0vhmqrfiq5"))))
6054 (build-system ant-build-system)
6055 (outputs '("out" "doc"))
6057 `(#:test-target "test"
6058 #:test-exclude (list "**/Abstract*.java" "**/Random*.java")
6060 (modify-phases %standard-phases
6061 (add-after 'build 'build-javadoc ant-build-javadoc)
6062 (add-before 'check 'disable-failing-test
6064 ;; Disable a failing test
6065 (substitute* "src/test/java/org/apache/commons/lang/\
6066 time/FastDateFormatTest.java"
6067 (("public void testFormat\\(\\)")
6068 "public void disabled_testFormat()"))
6070 (replace 'install (install-jars "target"))
6071 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
6073 `(("java-junit" ,java-junit)))
6074 (home-page "https://commons.apache.org/lang/")
6075 (synopsis "Extension of the java.lang package")
6076 (description "The Commons Lang components contains a set of Java classes
6077 that provide helper methods for standard Java classes, especially those found
6078 in the @code{java.lang} package in the Sun JDK. The following classes are
6082 @item StringUtils - Helper for @code{java.lang.String}.
6083 @item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets
6084 of characters such as @code{[a-z]} and @code{[abcdez]}.
6085 @item RandomStringUtils - Helper for creating randomised strings.
6086 @item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
6087 @item NumberRange - A range of numbers with an upper and lower bound.
6088 @item ObjectUtils - Helper for @code{java.lang.Object}.
6089 @item SerializationUtils - Helper for serializing objects.
6090 @item SystemUtils - Utility class defining the Java system properties.
6091 @item NestedException package - A sub-package for the creation of nested
6093 @item Enum package - A sub-package for the creation of enumerated types.
6094 @item Builder package - A sub-package for the creation of @code{equals},
6095 @code{hashCode}, @code{compareTo} and @code{toString} methods.
6097 (license license:asl2.0)))
6099 (define-public java-commons-lang3
6101 (name "java-commons-lang3")
6106 (uri (string-append "mirror://apache/commons/lang/source/"
6107 "commons-lang3-" version "-src.tar.gz"))
6109 (base32 "0s4ffbvsyl16c90l45ximsg4dwd8hmz7wsza3p308fw43h6mwhb6"))))
6110 (build-system ant-build-system)
6112 `(#:jar-name "commons-lang3.jar"
6113 #:source-dir "src/main/java"
6114 #:tests? #f; require junit5
6116 (modify-phases %standard-phases
6117 (replace 'install (install-from-pom "pom.xml")))))
6119 `(("apache-commons-parent-pom" ,apache-commons-parent-pom-48)))
6120 (home-page "https://commons.apache.org/lang/")
6121 (synopsis "Extension of the java.lang package")
6122 (description "The Commons Lang components contains a set of Java classes
6123 that provide helper methods for standard Java classes, especially those found
6124 in the @code{java.lang} package. The following classes are included:
6127 @item StringUtils - Helper for @code{java.lang.String}.
6128 @item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets of
6129 characters such as @code{[a-z]} and @code{[abcdez]}.
6130 @item RandomStringUtils - Helper for creating randomised strings.
6131 @item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
6132 @item NumberRange - A range of numbers with an upper and lower bound.
6133 @item ObjectUtils - Helper for @code{java.lang.Object}.
6134 @item SerializationUtils - Helper for serializing objects.
6135 @item SystemUtils - Utility class defining the Java system properties.
6136 @item NestedException package - A sub-package for the creation of nested
6138 @item Enum package - A sub-package for the creation of enumerated types.
6139 @item Builder package - A sub-package for the creation of @code{equals},
6140 @code{hashCode}, @code{compareTo} and @code{toString} methods.
6142 (license license:asl2.0)))
6144 (define-public java-commons-bsf
6146 (name "java-commons-bsf")
6150 (uri (string-append "mirror://apache/commons/bsf/source/bsf-src-"
6154 "1sbamr8jl32p1jgf59nw0b2w9qivyg145954hm6ly54cfgsqrdas"))
6155 (modules '((guix build utils)))
6158 (for-each delete-file
6159 (find-files "." "\\.jar$"))
6161 (build-system ant-build-system)
6163 `(#:build-target "jar"
6164 #:tests? #f; No test file
6165 #:modules ((guix build ant-build-system)
6167 (guix build java-utils)
6170 (modify-phases %standard-phases
6171 (add-before 'build 'create-properties
6173 ;; This file is missing from the distribution
6174 (call-with-output-file "build-properties.xml"
6177 `(project (@ (basedir ".") (name "build-properties") (default ""))
6178 (property (@ (name "project.name") (value "bsf")))
6179 (property (@ (name "source.level") (value "1.5")))
6180 (property (@ (name "build.lib") (value "build/jar")))
6181 (property (@ (name "src.dir") (value "src")))
6182 (property (@ (name "tests.dir") (value "src/org/apache/bsf/test")))
6183 (property (@ (name "build.tests") (value "build/test-classes")))
6184 (property (@ (name "build.dest") (value "build/classes"))))
6187 (replace 'install (install-jars "build")))))
6189 `(("java-junit" ,java-junit)))
6191 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)))
6192 (home-page "https://commons.apache.org/proper/commons-bsf")
6193 (synopsis "Bean Scripting Framework")
6194 (description "The Bean Scripting Framework (BSF) is a set of Java classes
6195 which provides scripting language support within Java applications, and access
6196 to Java objects and methods from scripting languages. BSF allows one to write
6197 JSPs in languages other than Java while providing access to the Java class
6198 library. In addition, BSF permits any Java application to be implemented in
6199 part (or dynamically extended) by a language that is embedded within it. This
6200 is achieved by providing an API that permits calling scripting language engines
6201 from within Java, as well as an object registry that exposes Java objects to
6202 these scripting language engines.")
6203 (license license:asl2.0)))
6205 (define-public java-commons-jxpath
6207 (name "java-commons-jxpath")
6211 (uri (string-append "mirror://apache/commons/jxpath/source/"
6212 "commons-jxpath-" version "-src.tar.gz"))
6215 "1rpgg31ayn9fwr4bfi2i1ij0npcg79ad2fv0w9hacvawsyc42cfs"))))
6216 (build-system ant-build-system)
6218 `(#:jar-name "commons-jxpath.jar"
6219 ;; tests require more dependencies, including mockrunner which depends on old software
6221 #:source-dir "src/java"))
6223 `(("servlet" ,java-classpathx-servletapi)
6224 ("java-jdom" ,java-jdom)
6225 ("java-commons-beanutils" ,java-commons-beanutils)))
6227 `(("java-junit" ,java-junit)))
6228 (home-page "https://commons.apache.org/jxpath/")
6229 (synopsis "Simple interpreter of an expression language called XPath.")
6230 (description "The org.apache.commons.jxpath package defines a simple
6231 interpreter of an expression language called XPath. JXPath applies XPath
6232 expressions to graphs of objects of all kinds: JavaBeans, Maps, Servlet
6233 contexts, DOM etc, including mixtures thereof.")
6234 (license license:asl2.0)))
6236 (define-public java-commons-pool
6238 (name "java-commons-pool")
6242 (uri (string-append "mirror://apache/commons/pool/source/"
6243 "commons-pool2-" version "-src.tar.gz"))
6246 "1fi1hgqmq01bs6azbj3sfswxzadp2r8sjjfiq6ryilz1m50kvrv6"))))
6248 `(#:jar-name "common-pool.jar"
6249 #:source-dir "src/main/java"
6251 (list "**/PerformanceTest.java")))
6252 (build-system ant-build-system)
6254 `(("java-cglib" ,java-cglib)))
6256 `(("java-junit" ,java-junit)
6257 ("java-hamcrest-core" ,java-hamcrest-core)
6258 ("java-asm" ,java-asm)
6259 ("java-objenesis" ,java-objenesis)))
6260 (home-page "https://commons.apache.org/proper/commons-pool/")
6261 (synopsis "Object-pooling API in Java")
6262 (description "The commons-pool package provides an object-pooling API
6263 and a number of object pool implementations. This package defines a
6264 handful of pooling interfaces and some base classes that may be useful when
6265 creating new pool implementations.")
6266 (license license:asl2.0)))
6268 (define-public java-commons-dbcp
6270 (name "java-commons-dbcp")
6274 (uri (string-append "mirror://apache/commons/dbcp/source/"
6275 "commons-dbcp2-" version "-src.tar.gz"))
6278 "0axbvcbnf2l70fc3ybrlp3siw2w4ka9mia2pnx4py8gz54cpw3rc"))))
6280 `(#:source-dir "src/main/java"
6281 #:jar-name "java-commons-dbcp.jar"
6282 #:tests? #f)); requires apache-geronimo
6284 `(("java-commons-pool" ,java-commons-pool)
6285 ("java-commons-logging" ,java-commons-logging-minimal)
6286 ("java-jboss-transaction-api-spec" ,java-jboss-transaction-api-spec)))
6288 `(("java-junit" ,java-junit)))
6289 (build-system ant-build-system)
6290 (home-page "https://commons.apache.org/proper/commons-dbcp/")
6291 (synopsis "Database Connection Pool for Java")
6292 (description "Commons-dbcp allows you to share a pool of database
6293 connections between users. Creating a new connection for each user can be
6294 time consuming and even unfeasible when the number of simultaneous users is
6295 very large. This package provides a way to share a poole of connections to
6297 (license license:asl2.0)))
6299 (define-public java-commons-jcs
6301 (name "java-commons-jcs")
6305 (uri (string-append "mirror://apache/commons/jcs/source/"
6306 "commons-jcs-dist-" version "-src.tar.gz"))
6309 "0syhq2npjbrl0azqfjm0gvash1qd5qjy4qmysxcrqjsk0nf9fa1q"))))
6310 (build-system ant-build-system)
6312 `(#:jar-name "commons-jcs.jar"
6313 #:source-dir "commons-jcs-core/src/main/java"
6314 #:test-dir "commons-jcs-core/src/test"
6315 #:tests? #f; requires hsqldb
6317 (modify-phases %standard-phases
6318 (add-before 'build 'prepare
6320 (with-directory-excursion
6321 "commons-jcs-core/src/main/java/org/apache/commons/jcs"
6323 "auxiliary/disk/jdbc/dsfactory/SharedPoolDataSourceFactory.java"
6324 (("commons.dbcp") "commons.dbcp2")
6325 ((".*\\.setMaxActive.*") ""))
6326 ;;; Remove dependency on velocity-tools
6327 (delete-file "admin/servlet/JCSAdminServlet.java"))
6330 `(("java-classpathx-servletapi" ,java-classpathx-servletapi)
6331 ("java-commons-logging-minimal" ,java-commons-logging-minimal)
6332 ("java-commons-httpclient" ,java-commons-httpclient)
6333 ("java-commons-dbcp" ,java-commons-dbcp)))
6335 `(("java-junit" ,java-junit)))
6336 (home-page "https://commons.apache.org/proper/commons-jcs/")
6337 (synopsis "Distributed caching system in Java")
6338 (description "JCS is a distributed caching system written in Java. It
6339 is intended to speed up applications by providing a means to manage cached
6340 data of various dynamic natures. Like any caching system, JCS is most useful
6341 for high read, low put applications. Latency times drop sharply and
6342 bottlenecks move away from the database in an effectively cached system.")
6343 (license license:asl2.0)))
6345 (define-public java-jsr250
6347 (name "java-jsr250")
6351 (uri (string-append "https://repo1.maven.org/maven2/"
6352 "javax/annotation/javax.annotation-api/"
6353 version "/javax.annotation-api-"
6354 version "-sources.jar"))
6357 "08clh8n4n9wfglf75qsqfjs6yf79f7x6hqx38cn856pksszv50kz"))))
6358 (build-system ant-build-system)
6360 `(#:tests? #f ; no tests included
6362 #:jar-name "jsr250.jar"
6363 #:modules ((guix build ant-build-system)
6365 (guix build maven pom)
6366 (guix build java-utils)
6369 (modify-phases %standard-phases
6370 (add-before 'install 'create-pom
6372 (with-output-to-file "pom.xml"
6376 (modelVersion "4.0.0")
6378 (groupId "javax.annotation")
6379 (artifactId "jsr250-api")
6380 (version ,,version))))))
6383 (install-from-pom "pom.xml")))))
6384 (home-page "https://jcp.org/en/jsr/detail?id=250")
6385 (synopsis "Security-related annotations")
6386 (description "This package provides annotations for security. It provides
6387 packages in the @code{javax.annotation} and @code{javax.annotation.security}
6389 ;; either cddl or gpl2 only, with classpath exception
6390 (license (list license:cddl1.0
6393 (define-public java-jsr305
6395 (name "java-jsr305")
6399 (uri (string-append "https://repo1.maven.org/maven2/"
6400 "com/google/code/findbugs/"
6401 "jsr305/" version "/jsr305-"
6402 version "-sources.jar"))
6405 "1rh6jin9v7jqpq3kf1swl868l8i94r636n03pzpsmgr8v0lh9j2n"))))
6406 (build-system ant-build-system)
6408 `(#:tests? #f ; no tests included
6409 #:jar-name "jsr305.jar"
6410 #:modules ((guix build ant-build-system)
6411 (guix build java-utils)
6412 (guix build maven pom)
6416 (modify-phases %standard-phases
6417 (add-before 'install 'create-pom
6419 (with-output-to-file "pom.xml"
6423 (modelVersion "4.0.0")
6425 (groupId "com.google.code.findbugs")
6426 (artifactId "jsr305")
6427 (version ,,version))))))
6430 (install-from-pom "pom.xml")))))
6431 (home-page "http://findbugs.sourceforge.net/")
6432 (synopsis "Annotations for the static analyzer called findbugs")
6433 (description "This package provides annotations for the findbugs package.
6434 It provides packages in the @code{javax.annotations} namespace.")
6435 (license license:asl2.0)))
6437 (define-public java-guava
6440 ;; This is the last release of Guava that can be built with Java 7.
6445 (url "https://github.com/google/guava/")
6446 (commit (string-append "v" version))))
6447 (file-name (git-file-name name version))
6450 "00h5cawdjic1vind3yivzh1f58flvm1yfmhsyqwyvmbvj1vakysp"))))
6451 (build-system ant-build-system)
6453 `(#:tests? #f ; no tests included
6454 #:jar-name "guava.jar"
6455 #:source-dir "guava/src"
6457 (modify-phases %standard-phases
6458 (add-after 'unpack 'trim-sources
6460 (with-directory-excursion "guava/src/com/google/common"
6461 ;; Remove annotations to avoid extra dependencies:
6462 ;; * "j2objc" annotations are used when converting Java to
6464 ;; * "errorprone" annotations catch common Java mistakes at
6466 ;; * "IgnoreJRERequirement" is used for Android.
6467 (substitute* (find-files "." "\\.java$")
6468 (("import com.google.j2objc.*") "")
6469 (("import com.google.errorprone.annotation.*") "")
6470 (("import org.codehaus.mojo.animal_sniffer.*") "")
6471 (("@CanIgnoreReturnValue") "")
6474 (("@RetainedWith") "")
6476 (("@ForOverride") "")
6477 (("@J2ObjCIncompatible") "")
6478 (("@IgnoreJRERequirement") "")))
6480 (replace 'install (install-from-pom "guava/pom.xml")))))
6482 `(("java-jsr305" ,java-jsr305)))
6484 `(("java-guava-parent-pom" ,java-guava-parent-pom)))
6485 (home-page "https://github.com/google/guava")
6486 (synopsis "Google core libraries for Java")
6487 (description "Guava is a set of core libraries that includes new
6488 collection types (such as multimap and multiset), immutable collections, a
6489 graph library, functional types, an in-memory cache, and APIs/utilities for
6490 concurrency, I/O, hashing, primitives, reflection, string processing, and much
6492 (license license:asl2.0)))
6494 (define java-guava-parent-pom
6496 (inherit java-guava)
6497 (name "java-guava-parent-pom")
6501 (modify-phases %standard-phases
6505 (install-pom-file "pom.xml")))))
6507 `(("java-sonatype-oss-parent-pom" ,java-sonatype-oss-parent-pom-7)))))
6509 ;; The java-commons-logging package provides adapters to many different
6510 ;; logging frameworks. To avoid an excessive dependency graph we try to build
6511 ;; it with only a minimal set of adapters.
6512 (define-public java-commons-logging-minimal
6514 (name "java-commons-logging-minimal")
6518 (uri (string-append "mirror://apache/commons/logging/source/"
6519 "commons-logging-" version "-src.tar.gz"))
6522 "10bwcy5w8d7y39n0krlwhnp8ds3kj5zhmzj0zxnkw0qdlsjmsrj9"))))
6523 (build-system ant-build-system)
6525 `(#:tests? #f ; avoid dependency on logging frameworks
6526 #:jar-name "commons-logging-minimal.jar"
6528 (modify-phases %standard-phases
6529 (add-after 'unpack 'delete-adapters-and-tests
6531 ;; Delete all adapters except for NoOpLog, SimpleLog, and
6532 ;; LogFactoryImpl. NoOpLog is required to build; LogFactoryImpl
6533 ;; is used by applications; SimpleLog is the only actually usable
6534 ;; implementation that does not depend on another logging
6538 (delete-file (string-append
6539 "src/main/java/org/apache/commons/logging/impl/" file)))
6540 (list "Jdk13LumberjackLogger.java"
6541 "WeakHashtable.java"
6543 "ServletContextCleaner.java"
6546 "LogKitLogger.java"))
6547 (delete-file-recursively "src/test")
6549 (home-page "https://commons.apache.org/logging/")
6550 (synopsis "Common API for logging implementations")
6551 (description "The Logging package is a thin bridge between different
6552 logging implementations. A library that uses the commons-logging API can be
6553 used with any logging implementation at runtime.")
6554 (license license:asl2.0)))
6556 ;; This is the last release of the 1.x series.
6557 (define-public java-mockito-1
6559 (name "java-mockito")
6563 (uri (string-append "http://repo1.maven.org/maven2/"
6564 "org/mockito/mockito-core/" version
6565 "/mockito-core-" version "-sources.jar"))
6568 "0vmiwnwpf83g2q7kj1rislmja8fpvqkixjhawh7nxnygx6pq11kc"))))
6569 (build-system ant-build-system)
6571 `(#:jar-name "mockito.jar"
6572 #:tests? #f ; no tests included
6573 ;; FIXME: patch-and-repack does not support jars, so we have to apply
6574 ;; patches in build phases.
6576 (modify-phases %standard-phases
6577 ;; Mockito was developed against a different version of hamcrest,
6578 ;; which does not require matcher implementations to provide an
6579 ;; implementation of the "describeMismatch" method. We add this
6580 ;; simple definition to pass the build with our version of hamcrest.
6581 (add-after 'unpack 'fix-hamcrest-build-error
6583 (substitute* "src/org/mockito/internal/matchers/LocalizedMatcher.java"
6584 (("public Matcher getActualMatcher\\(\\) .*" line)
6586 public void describeMismatch(Object item, Description description) {
6587 actualMatcher.describeMismatch(item, description);
6591 ;; Mockito bundles cglib. We have a cglib package, so let's use
6593 (add-after 'unpack 'use-system-libraries
6595 (with-directory-excursion "src/org/mockito/internal/creation/cglib"
6596 (substitute* '("CGLIBHacker.java"
6597 "CglibMockMaker.java"
6598 "ClassImposterizer.java"
6599 "DelegatingMockitoMethodProxy.java"
6600 "MethodInterceptorFilter.java"
6601 "MockitoNamingPolicy.java"
6602 "SerializableMockitoMethodProxy.java"
6603 "SerializableNoOp.java")
6604 (("import org.mockito.cglib") "import net.sf.cglib")))
6607 `(("java-junit" ,java-junit)
6608 ("java-objenesis" ,java-objenesis)
6609 ("java-cglib" ,java-cglib)
6610 ("java-hamcrest-core" ,java-hamcrest-core)))
6611 (home-page "http://mockito.org")
6612 (synopsis "Mockito is a mock library for Java")
6613 (description "Mockito is a mocking library for Java which lets you write
6614 tests with a clean and simple API. It generates mocks using reflection, and
6615 it records all mock invocations, including methods arguments.")
6616 (license license:asl2.0)))
6618 (define-public java-httpcomponents-httpcore
6620 (name "java-httpcomponents-httpcore")
6624 (uri (string-append "mirror://apache//httpcomponents/httpcore/"
6625 "source/httpcomponents-core-"
6626 version "-src.tar.gz"))
6629 "02bwcf38y4vgwq7kj2s6q7qrmma641r5lacivm16kgxvb2j6h1vy"))))
6630 (build-system ant-build-system)
6632 `(#:jar-name "httpcomponents-httpcore.jar"
6634 (modify-phases %standard-phases
6635 (add-after 'unpack 'chdir
6636 (lambda _ (chdir "httpcore") #t)))))
6638 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)
6639 ("java-commons-lang3" ,java-commons-lang3)))
6641 `(("java-junit" ,java-junit)
6642 ("java-mockito" ,java-mockito-1)))
6643 (home-page "https://hc.apache.org/httpcomponents-core-4.4.x/index.html")
6644 (synopsis "Low level HTTP transport components")
6645 (description "HttpCore is a set of low level HTTP transport components
6646 that can be used to build custom client and server side HTTP services with a
6647 minimal footprint. HttpCore supports two I/O models: blocking I/O model based
6648 on the classic Java I/O and non-blocking, event driven I/O model based on Java
6651 This package provides the blocking I/O model library.")
6652 (license license:asl2.0)))
6654 (define-public java-httpcomponents-httpcore-nio
6655 (package (inherit java-httpcomponents-httpcore)
6656 (name "java-httpcomponents-httpcore-nio")
6658 `(#:jar-name "httpcomponents-httpcore-nio.jar"
6660 (modify-phases %standard-phases
6661 (add-after 'unpack 'chdir
6662 (lambda _ (chdir "httpcore-nio") #t)))))
6664 `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
6665 ("java-hamcrest-core" ,java-hamcrest-core)
6666 ,@(package-inputs java-httpcomponents-httpcore)))
6667 (description "HttpCore is a set of low level HTTP transport components
6668 that can be used to build custom client and server side HTTP services with a
6669 minimal footprint. HttpCore supports two I/O models: blocking I/O model based
6670 on the classic Java I/O and non-blocking, event driven I/O model based on Java
6673 This package provides the non-blocking I/O model library based on Java
6676 (define-public java-httpcomponents-httpcore-ab
6677 (package (inherit java-httpcomponents-httpcore)
6678 (name "java-httpcomponents-httpcore-ab")
6680 `(#:jar-name "httpcomponents-httpcore-ab.jar"
6682 (modify-phases %standard-phases
6683 (add-after 'unpack 'chdir
6684 (lambda _ (chdir "httpcore-ab") #t)))))
6686 `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
6687 ("java-commons-cli" ,java-commons-cli)
6688 ("java-hamcrest-core" ,java-hamcrest-core)
6689 ,@(package-inputs java-httpcomponents-httpcore)))
6690 (synopsis "Apache HttpCore benchmarking tool")
6691 (description "This package provides the HttpCore benchmarking tool. It is
6692 an Apache AB clone based on HttpCore.")))
6694 (define-public java-httpcomponents-httpclient
6696 (name "java-httpcomponents-httpclient")
6700 (uri (string-append "mirror://apache/httpcomponents/httpclient/"
6701 "source/httpcomponents-client-"
6702 version "-src.tar.gz"))
6705 "1va99m2zc2liv0v9vn72p5ja8yz4s5wq7zpahaai5nr966kvxzkb"))))
6706 (build-system ant-build-system)
6708 `(#:jar-name "httpcomponents-httpclient.jar"
6710 (modify-phases %standard-phases
6711 (add-after 'unpack 'chdir
6712 (lambda _ (chdir "httpclient") #t)))))
6714 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)
6715 ("java-commons-codec" ,java-commons-codec)
6716 ("java-hamcrest-core" ,java-hamcrest-core)
6717 ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
6718 ("java-mockito" ,java-mockito-1)
6719 ("java-junit" ,java-junit)))
6720 (home-page "https://hc.apache.org/httpcomponents-client-ga/")
6721 (synopsis "HTTP client library for Java")
6722 (description "Although the @code{java.net} package provides basic
6723 functionality for accessing resources via HTTP, it doesn't provide the full
6724 flexibility or functionality needed by many applications. @code{HttpClient}
6725 seeks to fill this void by providing an efficient, up-to-date, and
6726 feature-rich package implementing the client side of the most recent HTTP
6727 standards and recommendations.")
6728 (license license:asl2.0)))
6730 (define-public java-httpcomponents-httpmime
6731 (package (inherit java-httpcomponents-httpclient)
6732 (name "java-httpcomponents-httpmime")
6734 `(#:jar-name "httpcomponents-httpmime.jar"
6736 (modify-phases %standard-phases
6737 (add-after 'unpack 'chdir
6738 (lambda _ (chdir "httpmime") #t)))))
6740 `(("java-httpcomponents-httpclient" ,java-httpcomponents-httpclient)
6741 ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
6742 ("java-junit" ,java-junit)
6743 ("java-hamcrest-core" ,java-hamcrest-core)))))
6745 (define-public java-commons-net
6747 (name "java-commons-net")
6751 (uri (string-append "mirror://apache/commons/net/source/"
6752 "commons-net-" version "-src.tar.gz"))
6755 "0n0cmnddk9qdqhjvka8pc6hd9mn2qi3166f1s6xk32h7rfy1adxr"))))
6756 (build-system ant-build-system)
6758 `(;; FIXME: MainTest.java tries to read "examples.properties" (which
6759 ;; should be "resources/examples/examples.properties"), but gets "null"
6762 #:jar-name "commons-net.jar"))
6764 `(("java-junit" ,java-junit)
6765 ("java-hamcrest-core" ,java-hamcrest-core)))
6766 (home-page "https://commons.apache.org/net/")
6767 (synopsis "Client library for many basic Internet protocols")
6768 (description "The Apache Commons Net library implements the client side of
6769 many basic Internet protocols. The purpose of the library is to provide
6770 fundamental protocol access, not higher-level abstractions.")
6771 (license license:asl2.0)))
6773 (define-public java-jsch
6779 (uri (string-append "mirror://sourceforge/jsch/jsch/"
6780 version "/jsch-" version ".zip"))
6783 "1lxyjwvmwa723wcf3bqn816hkvc03vz4xhbsi7bvfhrz2rpgcfq6"))))
6784 (build-system ant-build-system)
6786 `(#:build-target "dist"
6787 #:tests? #f ; no tests included
6789 (modify-phases %standard-phases
6790 (replace 'install (install-jars "dist")))))
6792 `(("unzip" ,unzip)))
6793 (home-page "http://www.jcraft.com/jsch/")
6794 (synopsis "Pure Java implementation of SSH2")
6795 (description "JSch is a pure Java implementation of SSH2. JSch allows you
6796 to connect to an SSH server and use port forwarding, X11 forwarding, file
6797 transfer, etc., and you can integrate its functionality into your own Java
6799 (license license:bsd-3)))
6801 (define-public java-commons-compress
6803 (name "java-commons-compress")
6807 (uri (string-append "mirror://apache/commons/compress/source/"
6808 "commons-compress-" version "-src.tar.gz"))
6811 "1vjqvavrn0babffn1kciz6v52ibwq2vwhzlb95hazis3lgllnxc8"))))
6812 (build-system ant-build-system)
6814 `(#:jar-name "commons-compress.jar"
6816 (modify-phases %standard-phases
6817 (add-after 'unpack 'delete-bad-tests
6819 (with-directory-excursion "src/test/java/org/apache/commons/compress/"
6820 ;; FIXME: These tests really should not fail. Maybe they are
6821 ;; indicative of problems with our Java packaging work.
6823 ;; This test fails with a null pointer exception.
6824 (delete-file "archivers/sevenz/SevenZOutputFileTest.java")
6825 ;; This test fails to open test resources.
6826 (delete-file "archivers/zip/ExplodeSupportTest.java")
6828 ;; FIXME: This test adds a dependency on powermock, which is hard to
6829 ;; package at this point.
6830 ;; https://github.com/powermock/powermock
6831 (delete-file "archivers/sevenz/SevenZNativeHeapTest.java"))
6833 (replace 'install (install-from-pom "pom.xml")))))
6835 `(("java-xz" ,java-xz)
6836 ("apache-commons-parent-pom" ,apache-commons-parent-pom-41)))
6838 `(("java-junit" ,java-junit)
6839 ("java-mockito" ,java-mockito-1)))
6840 (home-page "https://commons.apache.org/proper/commons-compress/")
6841 (synopsis "Java library for working with compressed files")
6842 (description "The Apache Commons Compress library defines an API for
6843 working with compressed files such as ar, cpio, Unix dump, tar, zip, gzip, XZ,
6844 Pack200, bzip2, 7z, arj, lzma, snappy, DEFLATE, lz4 and Z files.")
6845 (license license:asl2.0)))
6847 (define-public java-commons-csv
6849 (name "java-commons-csv")
6853 (uri (string-append "mirror://apache/commons/csv/source/"
6854 "commons-csv-" version "-src.tar.gz"))
6857 "1l89m0fm2s3xx3v3iynvangymfg2vlyngaj6fgsi457nmsw7m7ij"))))
6858 (build-system ant-build-system)
6860 `(#:jar-name "commons-csv.jar"
6861 #:source-dir "src/main/java"
6862 #:tests? #f)); FIXME: requires java-h2
6864 `(("java-hamcrest-core" ,java-hamcrest-core)
6865 ("java-commons-io" ,java-commons-io)
6866 ("java-commons-lang3" ,java-commons-lang3)
6867 ("junit" ,java-junit)))
6868 (home-page "https://commons.apache.org/proper/commons-csv/")
6869 (synopsis "Read and write CSV documents")
6870 (description "Commons CSV reads and writes files in variations of the Comma
6871 Separated Value (CSV) format. The most common CSV formats are predefined in the
6875 @item Microsoft Excel
6876 @item Informix UNLOAD
6877 @item Informix UNLOAD CSV
6883 Custom formats can be created using a fluent style API.")
6884 (license license:asl2.0)))
6886 (define-public java-osgi-annotation
6888 (name "java-osgi-annotation")
6892 (uri (string-append "https://repo1.maven.org/maven2/"
6893 "org/osgi/org.osgi.annotation/" version "/"
6894 "org.osgi.annotation-" version "-sources.jar"))
6897 "1q718mb7gqg726rh6pc2hcisn8v50nv35abbir0jypmffhiii85w"))))
6898 (build-system ant-build-system)
6900 `(#:tests? #f ; no tests
6901 #:jar-name "osgi-annotation.jar"))
6902 (home-page "https://www.osgi.org")
6903 (synopsis "Annotation module of OSGi framework")
6905 "OSGi, for Open Services Gateway initiative framework, is a module system
6906 and service platform for the Java programming language. This package contains
6907 the OSGi annotation module, providing additional services to help dynamic
6909 (license license:asl2.0)))
6911 (define-public java-osgi-core
6913 (name "java-osgi-core")
6917 (uri (string-append "https://repo1.maven.org/maven2/"
6918 "org/osgi/org.osgi.core/" version "/"
6919 "org.osgi.core-" version "-sources.jar"))
6922 "19bpf5jx32jq9789gyhin35q5v7flmw0p9mk7wbgqpxqfmxyiabv"))))
6923 (build-system ant-build-system)
6925 `(#:tests? #f ; no tests
6926 #:jar-name "osgi-core.jar"))
6928 `(("java-osgi-annotation" ,java-osgi-annotation)))
6929 (home-page "https://www.osgi.org")
6930 (synopsis "Core module of OSGi framework")
6932 "OSGi, for Open Services Gateway initiative framework, is a module system
6933 and service platform for the Java programming language. This package contains
6934 the OSGi Core module.")
6935 (license license:asl2.0)))
6937 (define-public java-osgi-service-event
6939 (name "java-osgi-service-event")
6943 (uri (string-append "https://repo1.maven.org/maven2/"
6944 "org/osgi/org.osgi.service.event/"
6945 version "/org.osgi.service.event-"
6946 version "-sources.jar"))
6949 "1nyhlgagwym75bycnjczwbnpymv2iw84zbhvvzk84g9q736i6qxm"))))
6950 (build-system ant-build-system)
6952 `(#:tests? #f ; no tests
6953 #:jar-name "osgi-service-event.jar"))
6955 `(("java-osgi-annotation" ,java-osgi-annotation)
6956 ("java-osgi-core" ,java-osgi-core)))
6957 (home-page "https://www.osgi.org")
6958 (synopsis "OSGi service event module")
6960 "OSGi, for Open Services Gateway initiative framework, is a module system
6961 and service platform for the Java programming language. This package contains
6962 the OSGi @code{org.osgi.service.event} module.")
6963 (license license:asl2.0)))
6965 (define-public java-eclipse-osgi
6967 (name "java-eclipse-osgi")
6971 (uri (string-append "https://repo1.maven.org/maven2/"
6972 "org/eclipse/platform/org.eclipse.osgi/"
6973 version "/org.eclipse.osgi-"
6974 version "-sources.jar"))
6977 "00cqc6lb29n0zv68b4l842vzkwawvbr7gshfdygsk8sicvcq2c7b"))))
6978 (build-system ant-build-system)
6980 `(#:tests? #f ; no tests included
6981 #:jar-name "eclipse-equinox-osgi.jar"))
6983 `(("java-osgi-annotation" ,java-osgi-annotation)))
6984 (home-page "http://www.eclipse.org/equinox/")
6985 (synopsis "Eclipse Equinox OSGi framework")
6986 (description "This package provides an implementation of the OSGi Core
6988 (license license:epl1.0)))
6990 (define-public java-eclipse-equinox-common
6992 (name "java-eclipse-equinox-common")
6993 (version "3.10.200")
6996 (uri (string-append "https://repo1.maven.org/maven2/"
6997 "org/eclipse/platform/org.eclipse.equinox.common/"
6998 version "/org.eclipse.equinox.common-"
6999 version "-sources.jar"))
7002 "1yn8ij6xsljlf35sr2l7wvyvc0ss4n1rv0ry5zkgb49dj4hyrqrj"))))
7003 (build-system ant-build-system)
7005 `(#:tests? #f ; no tests included
7006 #:jar-name "eclipse-equinox-common.jar"))
7008 `(("java-eclipse-osgi" ,java-eclipse-osgi)))
7009 (home-page "http://www.eclipse.org/equinox/")
7010 (synopsis "Common Eclipse runtime")
7011 (description "This package provides the common Eclipse runtime.")
7012 (license license:epl1.0)))
7014 (define-public java-eclipse-core-jobs
7016 (name "java-eclipse-core-jobs")
7020 (uri (string-append "https://repo1.maven.org/maven2/"
7021 "org/eclipse/platform/org.eclipse.core.jobs/"
7022 version "/org.eclipse.core.jobs-"
7023 version "-sources.jar"))
7026 "0395b8lh0km8vhzjnchvs1rii1qz48hyvb2wqfaq4yhklbwihq4b"))))
7027 (build-system ant-build-system)
7029 `(#:tests? #f ; no tests included
7030 #:jar-name "eclipse-core-jobs.jar"))
7032 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7033 ("java-eclipse-osgi" ,java-eclipse-osgi)))
7034 (home-page "http://www.eclipse.org/equinox/")
7035 (synopsis "Eclipse jobs mechanism")
7036 (description "This package provides the Eclipse jobs mechanism.")
7037 (license license:epl1.0)))
7039 (define-public java-eclipse-equinox-registry
7041 (name "java-eclipse-equinox-registry")
7045 (uri (string-append "https://repo1.maven.org/maven2/"
7046 "org/eclipse/platform/org.eclipse.equinox.registry/"
7047 version "/org.eclipse.equinox.registry-"
7048 version "-sources.jar"))
7051 "1i9sgymh2fy5vdgk5y7s3qvrlbgh4l93ddqi3v4zmca7hwrlhf9k"))))
7052 (build-system ant-build-system)
7054 `(#:tests? #f ; no tests included
7055 #:jar-name "eclipse-equinox-registry.jar"))
7057 `(("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
7058 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7059 ("java-eclipse-osgi" ,java-eclipse-osgi)))
7060 (home-page "http://www.eclipse.org/equinox/")
7061 (synopsis "Eclipse extension registry support")
7062 (description "This package provides support for the Eclipse extension
7064 (license license:epl1.0)))
7066 (define-public java-eclipse-equinox-app
7068 (name "java-eclipse-equinox-app")
7072 (uri (string-append "https://repo1.maven.org/maven2/"
7073 "org/eclipse/platform/org.eclipse.equinox.app/"
7074 version "/org.eclipse.equinox.app-"
7075 version "-sources.jar"))
7078 "0nhvbp93y203ar7y59gb0mz3w2d3jlqhr0c9hii9bcfpmr7imdab"))))
7079 (build-system ant-build-system)
7081 `(#:tests? #f ; no tests included
7082 #:jar-name "eclipse-equinox-app.jar"))
7084 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7085 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
7086 ("java-eclipse-osgi" ,java-eclipse-osgi)
7087 ("java-osgi-service-event" ,java-osgi-service-event)))
7088 (home-page "http://www.eclipse.org/equinox/")
7089 (synopsis "Equinox application container")
7090 (description "This package provides the Equinox application container for
7092 (license license:epl1.0)))
7094 (define-public java-eclipse-equinox-preferences
7096 (name "java-eclipse-equinox-preferences")
7100 (uri (string-append "https://repo1.maven.org/maven2/"
7101 "org/eclipse/platform/org.eclipse.equinox.preferences/"
7102 version "/org.eclipse.equinox.preferences-"
7103 version "-sources.jar"))
7106 "0k7w6c141sqym4fy3af0qkwpy4pdh2vsjpjba6rp5fxyqa24v0a2"))))
7107 (build-system ant-build-system)
7109 `(#:tests? #f ; no tests included
7110 #:jar-name "eclipse-equinox-preferences.jar"))
7112 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7113 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
7114 ("java-eclipse-osgi" ,java-eclipse-osgi)))
7115 (home-page "http://www.eclipse.org/equinox/")
7116 (synopsis "Eclipse preferences mechanism")
7117 (description "This package provides the Eclipse preferences mechanism with
7118 the module @code{org.eclipse.equinox.preferences}.")
7119 (license license:epl1.0)))
7121 (define-public java-eclipse-core-contenttype
7123 (name "java-eclipse-core-contenttype")
7127 (uri (string-append "https://repo1.maven.org/maven2/"
7128 "org/eclipse/platform/org.eclipse.core.contenttype/"
7129 version "/org.eclipse.core.contenttype-"
7130 version "-sources.jar"))
7133 "1wcqcv7ijwv5rh748vz3x9pkmjl9w1r0k0026k56n8yjl4rrmspi"))))
7134 (build-system ant-build-system)
7136 `(#:tests? #f ; no tests included
7137 #:jar-name "eclipse-core-contenttype.jar"))
7139 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7140 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
7141 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
7142 ("java-eclipse-osgi" ,java-eclipse-osgi)))
7143 (home-page "http://www.eclipse.org/")
7144 (synopsis "Eclipse content mechanism")
7145 (description "This package provides the Eclipse content mechanism in the
7146 @code{org.eclipse.core.contenttype} module.")
7147 (license license:epl1.0)))
7149 (define-public java-eclipse-core-runtime
7151 (name "java-eclipse-core-runtime")
7152 (version "3.15.100")
7155 (uri (string-append "https://repo1.maven.org/maven2/"
7156 "org/eclipse/platform/org.eclipse.core.runtime/"
7157 version "/org.eclipse.core.runtime-"
7158 version "-sources.jar"))
7161 "0l8xayacsbjvz5hypx2fv47vpw2n4dspamcfb3hx30x9hj8vmg7r"))))
7162 (build-system ant-build-system)
7164 `(#:tests? #f ; no tests included
7165 #:jar-name "eclipse-core-runtime.jar"))
7167 `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
7168 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
7169 ("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
7170 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7171 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
7172 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
7173 ("java-eclipse-osgi" ,java-eclipse-osgi)))
7174 (home-page "https://www.eclipse.org/")
7175 (synopsis "Eclipse core runtime")
7176 (description "This package provides the Eclipse core runtime with the
7177 module @code{org.eclipse.core.runtime}.")
7178 (license license:epl1.0)))
7180 (define-public java-eclipse-core-filesystem
7182 (name "java-eclipse-core-filesystem")
7186 (uri (string-append "https://repo1.maven.org/maven2/"
7187 "org/eclipse/platform/org.eclipse.core.filesystem/"
7188 version "/org.eclipse.core.filesystem-"
7189 version "-sources.jar"))
7192 "0km1bhwjim4rfy3pkvjhvy31kgsyf2ncx0mlkmbf5n6g57pphdyj"))))
7193 (build-system ant-build-system)
7195 `(#:tests? #f ; no tests included
7196 #:jar-name "eclipse-core-filesystem.jar"))
7198 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7199 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
7200 ("java-eclipse-osgi" ,java-eclipse-osgi)))
7201 (home-page "https://www.eclipse.org/")
7202 (synopsis "Eclipse core file system")
7203 (description "This package provides the Eclipse core file system with the
7204 module @code{org.eclipse.core.filesystem}.")
7205 (license license:epl1.0)))
7207 (define-public java-eclipse-core-expressions
7209 (name "java-eclipse-core-expressions")
7213 (uri (string-append "https://repo1.maven.org/maven2/"
7214 "org/eclipse/platform/org.eclipse.core.expressions/"
7215 version "/org.eclipse.core.expressions-"
7216 version "-sources.jar"))
7219 "18bw2l875gmygvpagpgk9l24qzbdjia4ag12nw6fi8v8yaq4987f"))))
7220 (build-system ant-build-system)
7222 `(#:tests? #f ; no tests included
7223 #:jar-name "eclipse-core-expressions.jar"))
7225 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7226 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
7227 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
7228 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
7229 ("java-eclipse-osgi" ,java-eclipse-osgi)))
7230 (home-page "https://www.eclipse.org/")
7231 (synopsis "Eclipse core expression language")
7232 (description "This package provides the Eclipse core expression language
7233 with the @code{org.eclipse.core.expressions} module.")
7234 (license license:epl1.0)))
7236 (define-public java-eclipse-core-variables
7238 (name "java-eclipse-core-variables")
7242 (uri (string-append "https://repo1.maven.org/maven2/"
7243 "org/eclipse/platform/org.eclipse.core.variables/"
7244 version "/org.eclipse.core.variables-"
7245 version "-sources.jar"))
7248 "12dirh03zi4n5x5cj07vzrhkmnqy6h9q10h9j605pagmpmifyxmy"))))
7249 (build-system ant-build-system)
7251 `(#:tests? #f ; no tests included
7252 #:jar-name "eclipse-core-variables.jar"))
7254 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7255 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
7256 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
7257 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
7258 ("java-eclipse-osgi" ,java-eclipse-osgi)))
7259 (home-page "https://www.eclipse.org/platform")
7260 (synopsis "Eclipse core variables")
7261 (description "This package provides the Eclipse core variables module
7262 @code{org.eclipse.core.variables}.")
7263 (license license:epl1.0)))
7265 (define-public java-eclipse-ant-core
7267 (name "java-eclipse-ant-core")
7271 (uri (string-append "https://repo1.maven.org/maven2/"
7272 "org/eclipse/platform/org.eclipse.ant.core/"
7273 version "/org.eclipse.ant.core-"
7274 version "-sources.jar"))
7277 "11g3if794qjlk98mz9zch22rr56sd7z63vn4i7k2icr8cq5bfqg7"))))
7278 (build-system ant-build-system)
7280 `(#:tests? #f ; no tests included
7281 #:jar-name "eclipse-ant-core.jar"))
7283 `(("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
7284 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7285 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
7286 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
7287 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
7288 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
7289 ("java-eclipse-core-variables" ,java-eclipse-core-variables)
7290 ("java-eclipse-osgi" ,java-eclipse-osgi)))
7291 (home-page "https://www.eclipse.org/platform")
7292 (synopsis "Ant build tool core libraries")
7293 (description "This package provides the ant build tool core libraries with
7294 the module @code{org.eclipse.ant.core}.")
7295 (license license:epl1.0)))
7297 (define-public java-eclipse-core-resources
7299 (name "java-eclipse-core-resources")
7300 (version "3.13.200")
7303 (uri (string-append "https://repo1.maven.org/maven2/"
7304 "org/eclipse/platform/org.eclipse.core.resources/"
7305 version "/org.eclipse.core.resources-"
7306 version "-sources.jar"))
7309 "1sn3b6ky72hkvxcgf9b2jkpbdh3y8lbhi9xxwv1dsiddpkkq91hs"))))
7310 (build-system ant-build-system)
7312 `(#:tests? #f ; no tests included
7313 #:jar-name "eclipse-core-resources.jar"))
7315 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7316 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
7317 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
7318 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
7319 ("java-eclipse-core-expressions" ,java-eclipse-core-expressions)
7320 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
7321 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
7322 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
7323 ("java-eclipse-ant-core" ,java-eclipse-ant-core)
7324 ("java-eclipse-osgi" ,java-eclipse-osgi)))
7325 (home-page "https://www.eclipse.org/")
7326 (synopsis "Eclipse core resource management")
7327 (description "This package provides the Eclipse core resource management
7328 module @code{org.eclipse.core.resources}.")
7329 (license license:epl1.0)))
7331 (define-public java-eclipse-compare-core
7333 (name "java-eclipse-compare-core")
7337 (uri (string-append "https://repo1.maven.org/maven2/"
7338 "org/eclipse/platform/org.eclipse.compare.core/"
7339 version "/org.eclipse.compare.core-"
7340 version "-sources.jar"))
7343 "10g37r0pbiffyv2wk35c6g5lwzkdipkl0kkjp41v84dln46xm4dg"))))
7344 (build-system ant-build-system)
7346 `(#:tests? #f ; no tests included
7347 #:jar-name "eclipse-compare-core.jar"))
7349 `(("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
7350 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7351 ("java-eclipse-osgi" ,java-eclipse-osgi)
7352 ("java-icu4j" ,java-icu4j)))
7353 (home-page "https://www.eclipse.org/")
7354 (synopsis "Eclipse core compare support")
7355 (description "This package provides the Eclipse core compare support
7356 module @code{org.eclipse.compare.core}.")
7357 (license license:epl1.0)))
7359 (define-public java-eclipse-team-core
7361 (name "java-eclipse-team-core")
7365 (uri (string-append "https://repo1.maven.org/maven2/"
7366 "org/eclipse/platform/org.eclipse.team.core/"
7367 version "/org.eclipse.team.core-"
7368 version "-sources.jar"))
7371 "02j2jzqgb26zx2d5ahxmvijw6j4r0la90zl5c3i65x6z19ciyam7"))))
7372 (build-system ant-build-system)
7374 `(#:tests? #f ; no tests included
7375 #:jar-name "eclipse-team-core.jar"))
7377 `(("java-eclipse-compare-core" ,java-eclipse-compare-core)
7378 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
7379 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
7380 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
7381 ("java-eclipse-core-resources" ,java-eclipse-core-resources)
7382 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
7383 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7384 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
7385 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
7386 ("java-eclipse-osgi" ,java-eclipse-osgi)))
7387 (home-page "https://www.eclipse.org/platform")
7388 (synopsis "Eclipse team support core")
7389 (description "This package provides the Eclipse team support core module
7390 @code{org.eclipse.team.core}.")
7391 (license license:epl1.0)))
7393 (define-public java-eclipse-core-commands
7395 (name "java-eclipse-core-commands")
7399 (uri (string-append "https://repo1.maven.org/maven2/"
7400 "org/eclipse/platform/org.eclipse.core.commands/"
7401 version "/org.eclipse.core.commands-"
7402 version "-sources.jar"))
7405 "0yjn482qndcfrsq3jd6vnhcylp16420f5aqkrwr8spsprjigjcr9"))))
7406 (build-system ant-build-system)
7408 `(#:tests? #f ; no tests included
7409 #:jar-name "eclipse-core-commands.jar"))
7411 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)))
7412 (home-page "https://www.eclipse.org/platform")
7413 (synopsis "Eclipse core commands")
7414 (description "This package provides Eclipse core commands in the module
7415 @code{org.eclipse.core.commands}.")
7416 (license license:epl1.0)))
7418 (define-public java-eclipse-text
7420 (name "java-eclipse-text")
7424 (uri (string-append "https://repo1.maven.org/maven2/"
7425 "org/eclipse/platform/org.eclipse.text/"
7426 version "/org.eclipse.text-"
7427 version "-sources.jar"))
7430 "0scz70vzz5qs5caji9f5q01vkqnvip7dpri1q07l8wbbdcxn4cq1"))))
7431 (build-system ant-build-system)
7433 `(#:tests? #f ; no tests included
7434 #:jar-name "eclipse-text.jar"
7436 (modify-phases %standard-phases
7437 ;; When creating a new category we must make sure that the new list
7438 ;; matches List<Position>. By default it seems to be too generic
7439 ;; (ArrayList<Object>), so we specialize it to ArrayList<Position>.
7440 ;; Without this we get this error:
7442 ;; [javac] .../src/org/eclipse/jface/text/AbstractDocument.java:376:
7443 ;; error: method put in interface Map<K,V> cannot be applied to given types;
7444 ;; [javac] fPositions.put(category, new ArrayList<>());
7446 ;; [javac] required: String,List<Position>
7447 ;; [javac] found: String,ArrayList<Object>
7448 ;; [javac] reason: actual argument ArrayList<Object> cannot be converted
7449 ;; to List<Position> by method invocation conversion
7450 ;; [javac] where K,V are type-variables:
7451 ;; [javac] K extends Object declared in interface Map
7452 ;; [javac] V extends Object declared in interface Map
7454 ;; I don't know if this is a good fix. I suspect it is not, but it
7456 (add-after 'unpack 'fix-compilation-error
7458 (substitute* "src/org/eclipse/jface/text/AbstractDocument.java"
7459 (("Positions.put\\(category, new ArrayList<>\\(\\)\\);")
7460 "Positions.put(category, new ArrayList<Position>());"))
7463 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7464 ("java-eclipse-core-commands" ,java-eclipse-core-commands)
7465 ("java-icu4j" ,java-icu4j)))
7466 (home-page "http://www.eclipse.org/platform")
7467 (synopsis "Eclipse text library")
7468 (description "Platform Text is part of the Platform UI project and
7469 provides the basic building blocks for text and text editors within Eclipse
7470 and contributes the Eclipse default text editor.")
7471 (license license:epl1.0)))
7473 (define-public java-eclipse-jdt-core
7475 (name "java-eclipse-jdt-core")
7479 (uri (string-append "https://repo1.maven.org/maven2/"
7480 "org/eclipse/jdt/org.eclipse.jdt.core/"
7481 version "/org.eclipse.jdt.core-"
7482 version "-sources.jar"))
7485 "1g560yr9v2kzv34gc2m3ifpgnj7krcdd6h4gd4z83pwqacwkfz0k"))))
7486 (build-system ant-build-system)
7488 `(#:tests? #f ; no tests included
7489 #:jar-name "eclipse-jdt-core.jar"
7491 (modify-phases %standard-phases
7492 (add-after 'unpack 'move-sources
7494 (with-directory-excursion "src/jdtCompilerAdaptersrc/"
7495 (for-each (lambda (file)
7496 (install-file file (string-append "../" (dirname file))))
7497 (find-files "." ".*")))
7498 (delete-file-recursively "src/jdtCompilerAdaptersrc/")
7500 (add-before 'build 'copy-resources
7502 (with-directory-excursion "src"
7503 (for-each (lambda (file)
7504 (install-file file (string-append "../build/classes/" (dirname file))))
7505 (find-files "." ".*.(props|properties|rsc)")))
7508 `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
7509 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
7510 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
7511 ("java-eclipse-core-resources" ,java-eclipse-core-resources)
7512 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
7513 ("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
7514 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7515 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
7516 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
7517 ("java-eclipse-osgi" ,java-eclipse-osgi)
7518 ("java-eclipse-text" ,java-eclipse-text)))
7519 (home-page "https://www.eclipse.org/jdt")
7520 (synopsis "Java development tools core libraries")
7521 (description "This package provides the core libraries of the Eclipse Java
7522 development tools.")
7523 (license license:epl1.0)))
7525 (define-public java-eclipse-jdt-compiler-apt
7527 (name "java-eclipse-jdt-compiler-apt")
7531 (uri (string-append "https://repo1.maven.org/maven2/"
7532 "org/eclipse/jdt/org.eclipse.jdt.compiler.apt/"
7533 version "/org.eclipse.jdt.compiler.apt-"
7534 version "-sources.jar"))
7537 "1s285k9p2ixdqrknb40jbbvw682n9a7l5lqpn583a8pvlzg2l6r8"))))
7538 (build-system ant-build-system)
7540 `(#:tests? #f ; no tests included
7541 #:jar-name "eclipse-jdt-compiler-apt.jar"
7544 `(("java-eclipse-jdt-core" ,java-eclipse-jdt-core)))
7545 (home-page "https://www.eclipse.org/jdt/apt/")
7546 (synopsis "Annotation processing tool")
7547 (description "APT stands for Annotation Processing Tool. APT provides a
7548 means for generating files and compiling new Java classes based on annotations
7549 found in your source code.")
7550 (license license:epl2.0)))
7552 (define-public java-javax-mail
7554 (name "java-javax-mail")
7558 (uri (string-append "https://repo1.maven.org/maven2/"
7559 "com/sun/mail/javax.mail/"
7560 version "/javax.mail-"
7561 version "-sources.jar"))
7564 "0sdlfgsc2b5s89xv1261y8i0jijcja019k2x1c8ngfn582w4jly9"))))
7565 (build-system ant-build-system)
7567 `(#:tests? #f ; no tests
7568 #:jar-name "javax-mail.jar"))
7569 (home-page "https://javamail.java.net")
7570 (synopsis "Reference implementation of the JavaMail API")
7572 "This package provides versions of the JavaMail API implementation, IMAP,
7573 SMTP, and POP3 service providers, some examples, and documentation for the
7575 ;; GPLv2 only with "classpath exception".
7576 (license license:gpl2)))
7578 (define-public java-log4j-api
7580 (name "java-log4j-api")
7584 (uri (string-append "mirror://apache/logging/log4j/" version
7585 "/apache-log4j-" version "-src.tar.gz"))
7588 "0j5p9gik0jysh37nlrckqbky12isy95cpwg2gv5fas1rcdqbraxd"))))
7589 (build-system ant-build-system)
7591 `(#:tests? #f ; tests require unpackaged software
7592 #:jar-name "log4j-api.jar"
7594 (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out")
7597 (modify-phases %standard-phases
7598 (add-after 'unpack 'enter-dir
7599 (lambda _ (chdir "log4j-api") #t))
7600 ;; FIXME: The tests require additional software that has not been
7601 ;; packaged yet, such as
7602 ;; * org.apache.maven
7603 ;; * org.apache.felix
7604 (add-after 'enter-dir 'delete-tests
7605 (lambda _ (delete-file-recursively "src/test") #t)))))
7607 `(("java-osgi-core" ,java-osgi-core)
7608 ("java-hamcrest-core" ,java-hamcrest-core)
7609 ("java-junit" ,java-junit)))
7610 (home-page "https://logging.apache.org/log4j/2.x/")
7611 (synopsis "API module of the Log4j logging framework for Java")
7613 "This package provides the API module of the Log4j logging framework for
7615 (license license:asl2.0)))
7617 (define-public java-log4j-core
7619 (inherit java-log4j-api)
7620 (name "java-log4j-core")
7622 `(("java-osgi-core" ,java-osgi-core)
7623 ("java-hamcrest-core" ,java-hamcrest-core)
7624 ("java-log4j-api" ,java-log4j-api)
7625 ("java-mail" ,java-mail)
7626 ("java-jboss-jms-api-spec" ,java-jboss-jms-api-spec)
7627 ("java-lmax-disruptor" ,java-lmax-disruptor)
7628 ("java-kafka" ,java-kafka-clients)
7629 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
7630 ("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
7631 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
7632 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)
7633 ("java-fasterxml-jackson-dataformat-xml" ,java-fasterxml-jackson-dataformat-xml)
7634 ("java-fasterxml-jackson-dataformat-yaml" ,java-fasterxml-jackson-dataformat-yaml)
7635 ("java-commons-compress" ,java-commons-compress)
7636 ("java-commons-csv" ,java-commons-csv)
7637 ("java-jeromq" ,java-jeromq)
7638 ("java-junit" ,java-junit)))
7640 `(("hamcrest" ,java-hamcrest-all)
7641 ("java-commons-io" ,java-commons-io)
7642 ("java-commons-lang3" ,java-commons-lang3)
7643 ("slf4j" ,java-slf4j-api)))
7645 `(#:tests? #f ; tests require more dependencies
7646 #:test-dir "src/test"
7647 #:source-dir "src/main/java"
7648 #:jar-name "log4j-core.jar"
7651 (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out")
7654 (modify-phases %standard-phases
7655 (add-after 'unpack 'enter-dir
7656 (lambda _ (chdir "log4j-core") #t)))))
7657 (synopsis "Core component of the Log4j framework")
7658 (description "This package provides the core component of the Log4j
7659 logging framework for Java.")))
7661 (define-public java-log4j-1.2-api
7663 (inherit java-log4j-api)
7664 (name "java-log4j-1.2-api")
7666 `(#:jar-name "java-log4j-1.2-api.jar"
7667 #:source-dir "log4j-1.2-api/src/main/java"
7669 ;; Tests require maven-model (and other maven subprojects), which is a
7670 ;; cyclic dependency.
7673 `(("log4j-api" ,java-log4j-api)
7674 ("log4j-core" ,java-log4j-core)
7675 ("osgi-core" ,java-osgi-core)
7676 ("eclipse-osgi" ,java-eclipse-osgi)
7677 ("java-lmax-disruptor" ,java-lmax-disruptor)))))
7679 (define-public java-commons-cli
7681 (name "java-commons-cli")
7685 (uri (string-append "mirror://apache/commons/cli/source/"
7686 "commons-cli-" version "-src.tar.gz"))
7689 "05hgi2z01fqz374y719gl1dxzqvzci5af071zm7vxrjg9vczipm1"))))
7690 (build-system ant-build-system)
7693 `(#:jar-name "commons-cli.jar"
7695 (modify-phases %standard-phases
7697 (install-from-pom "pom.xml")))))
7699 `(("java-junit" ,java-junit)
7700 ("java-hamcrest-core" ,java-hamcrest-core)))
7701 (home-page "https://commons.apache.org/cli/")
7702 (synopsis "Command line arguments and options parsing library")
7703 (description "The Apache Commons CLI library provides an API for parsing
7704 command line options passed to programs. It is also able to print help
7705 messages detailing the options available for a command line tool.
7707 Commons CLI supports different types of options:
7710 @item POSIX like options (ie. tar -zxvf foo.tar.gz)
7711 @item GNU like long options (ie. du --human-readable --max-depth=1)
7712 @item Java like properties (ie. java -Djava.awt.headless=true Foo)
7713 @item Short options with value attached (ie. gcc -O2 foo.c)
7714 @item long options with single hyphen (ie. ant -projecthelp)
7717 This is a part of the Apache Commons Project.")
7718 (license license:asl2.0)))
7720 (define-public java-commons-codec
7722 (name "java-commons-codec")
7726 (uri (string-append "mirror://apache/commons/codec/source/"
7727 "commons-codec-" version "-src.tar.gz"))
7730 "11xr0agckkhm91pb5akf2mbk84yd54gyr178wj57gsm97fi7nkh9"))))
7731 (build-system ant-build-system)
7733 `(#:jar-name "java-commons-codec.jar"
7734 #:source-dir "src/main/java"
7735 #:test-dir "src/test"
7736 #:test-exclude (list "**/*AbstractTest.java")
7738 (modify-phases %standard-phases
7739 (add-before 'build 'copy-resources
7741 (copy-recursively "src/main/resources"
7744 (add-before 'check 'copy-test-resources
7746 (copy-recursively "src/test/resources"
7747 "build/test-classes")
7749 (replace 'install (install-from-pom "pom.xml")))))
7751 `(("java-commons-lang3" ,java-commons-lang3)
7752 ("java-junit" ,java-junit)))
7754 `(("apache-commons-parent-pom" ,apache-commons-parent-pom-50)))
7755 (home-page "https://commons.apache.org/codec/")
7756 (synopsis "Common encoders and decoders such as Base64, Hex, Phonetic and URLs")
7757 (description "The codec package contains simple encoder and decoders for
7758 various formats such as Base64 and Hexadecimal. In addition to these widely
7759 used encoders and decoders, the codec package also maintains a collection of
7760 phonetic encoding utilities.
7762 This is a part of the Apache Commons Project.")
7763 (license license:asl2.0)))
7765 (define-public java-commons-daemon
7767 (name "java-commons-daemon")
7771 (uri (string-append "mirror://apache/commons/daemon/source/"
7772 "commons-daemon-" version "-src.tar.gz"))
7775 "141gkhfzv5v3pdhic6y4ardq2dhsa3v36j8wmmhy6f8mac48fp7n"))))
7776 (build-system ant-build-system)
7778 `(#:test-target "test"
7780 (modify-phases %standard-phases
7781 (add-after 'build 'build-javadoc ant-build-javadoc)
7782 (replace 'install (install-jars "dist"))
7783 (add-after 'install 'install-doc (install-javadoc "dist/docs/api")))))
7785 `(("java-junit" ,java-junit)))
7786 (home-page "https://commons.apache.org/daemon/")
7787 (synopsis "Library to launch Java applications as daemons")
7788 (description "The Daemon package from Apache Commons can be used to
7789 implement Java applications which can be launched as daemons. For example the
7790 program will be notified about a shutdown so that it can perform cleanup tasks
7791 before its process of execution is destroyed by the operation system.
7793 This package contains the Java library. You will also need the actual binary
7794 for your architecture which is provided by the jsvc package.
7796 This is a part of the Apache Commons Project.")
7797 (license license:asl2.0)))
7799 (define-public java-javaewah
7801 (name "java-javaewah")
7806 (url "https://github.com/lemire/javaewah/")
7807 (commit (string-append "JavaEWAH-" version))))
7808 (file-name (git-file-name name version))
7811 "1m8qcb1py76v7avbjjrkvyy6fhr5dk2ywy73gbsxqry04gkm2nhw"))))
7812 (build-system ant-build-system)
7813 (arguments `(#:jar-name "javaewah.jar"))
7815 `(("java-junit" ,java-junit)
7816 ("java-hamcrest-core" ,java-hamcrest-core)))
7817 (home-page "https://github.com/lemire/javaewah")
7818 (synopsis "Compressed alternative to the Java @code{BitSet} class")
7819 (description "This is a word-aligned compressed variant of the Java
7820 @code{Bitset} class. It provides both a 64-bit and a 32-bit RLE-like
7821 compression scheme. It can be used to implement bitmap indexes.
7823 The goal of word-aligned compression is not to achieve the best compression,
7824 but rather to improve query processing time. Hence, JavaEWAH tries to save CPU
7825 cycles, maybe at the expense of storage. However, the EWAH scheme is always
7826 more efficient storage-wise than an uncompressed bitmap (as implemented in the
7827 @code{BitSet} class by Sun).")
7828 ;; GPL2.0 derivates are explicitly allowed.
7829 (license license:asl2.0)))
7831 (define-public java-slf4j-api
7833 (name "java-slf4j-api")
7837 (uri (string-append "https://www.slf4j.org/dist/slf4j-"
7841 "13j51sgzmhhdrfa74gkal5zpip7r1440dh7zsi2c8bpb2zs1v8kb"))
7842 (modules '((guix build utils)))
7843 ;; Delete bundled jars.
7846 (for-each delete-file (find-files "." "\\.jar$"))
7848 (build-system ant-build-system)
7850 `(#:jar-name "slf4j-api.jar"
7851 #:source-dir "slf4j-api/src/main"
7852 #:test-dir "slf4j-api/src/test"
7854 (modify-phases %standard-phases
7855 (add-after 'build 'regenerate-jar
7857 ;; pom.xml ignores these files in the jar creation process. If we don't,
7858 ;; we get the error "This code should have never made it into slf4j-api.jar"
7859 (delete-file-recursively "build/classes/org/slf4j/impl")
7860 (invoke "jar" "-cf" "build/jar/slf4j-api.jar" "-C"
7861 "build/classes" ".")))
7862 (add-before 'check 'dont-test-abstract-classes
7864 ;; abstract classes are not meant to be run with junit
7865 (substitute* "build.xml"
7866 (("<include name=\"\\*\\*/\\*Test.java\" />")
7867 (string-append "<include name=\"**/*Test.java\" />"
7868 "<exclude name=\"**/MultithreadedInitializationTest"
7872 (install-from-pom "slf4j-api/pom.xml")))))
7874 `(("java-slf4j-parent" ,java-slf4j-parent)))
7876 `(("java-junit" ,java-junit)
7877 ("java-hamcrest-core" ,java-hamcrest-core)))
7878 (home-page "https://www.slf4j.org/")
7879 (synopsis "Simple logging facade for Java")
7880 (description "The Simple Logging Facade for Java (SLF4J) serves as a
7881 simple facade or abstraction for various logging
7882 frameworks (e.g. @code{java.util.logging}, @code{logback}, @code{log4j})
7883 allowing the end user to plug in the desired logging framework at deployment
7885 (license license:expat)))
7887 (define java-slf4j-parent
7889 (inherit java-slf4j-api)
7890 (name "java-slf4j-parent")
7892 (propagated-inputs '())
7896 (modify-phases %standard-phases
7900 (install-pom-file "pom.xml")))))))
7902 (define-public java-slf4j-simple
7904 (name "java-slf4j-simple")
7906 (source (package-source java-slf4j-api))
7907 (build-system ant-build-system)
7909 `(#:jar-name "slf4j-simple.jar"
7910 #:source-dir "slf4j-simple/src/main"
7911 #:test-dir "slf4j-simple/src/test"
7913 (modify-phases %standard-phases
7914 ;; The tests need some test classes from slf4j-api
7915 (add-before 'check 'build-slf4j-api-test-helpers
7917 ;; Add current dir to CLASSPATH ...
7919 (string-append (getcwd) ":" (getenv "CLASSPATH")))
7920 ;; ... and build test helper classes here:
7923 ,@(find-files "slf4j-api/src/test" ".*\\.java")))))
7925 (install-from-pom "slf4j-simple/pom.xml")))))
7927 `(("java-slf4j-api" ,java-slf4j-api)))
7929 `(("java-junit" ,java-junit)
7930 ("java-hamcrest-core" ,java-hamcrest-core)))
7931 (home-page "https://www.slf4j.org/")
7932 (synopsis "Simple implementation of simple logging facade for Java")
7933 (description "SLF4J binding for the Simple implementation, which outputs
7934 all events to System.err. Only messages of level INFO and higher are
7936 (license license:expat)))
7938 (define-public antlr2
7944 (uri (string-append "https://www.antlr2.org/download/antlr-"
7948 "1ffvcwdw73id0dk6pj2mlxjvbg0662qacx4ylayqcxgg381fnfl5"))
7949 (modules '((guix build utils)))
7952 (delete-file "antlr.jar")
7953 (substitute* "lib/cpp/antlr/CharScanner.hpp"
7957 "#define EOF (-1)\n"
7958 "#include <strings.h>")))
7959 (substitute* "configure"
7962 (build-system gnu-build-system)
7964 `(#:tests? #f ; no test target
7965 #:imported-modules ((guix build ant-build-system)
7966 (guix build syscalls)
7967 ,@%gnu-build-system-modules)
7968 #:modules (((guix build ant-build-system) #:prefix ant:)
7969 (guix build gnu-build-system)
7972 (modify-phases %standard-phases
7973 (add-after 'install 'strip-jar-timestamps
7974 (assoc-ref ant:%standard-phases 'strip-jar-timestamps))
7975 (add-before 'configure 'fix-timestamp
7977 (substitute* "configure"
7978 (("^TIMESTAMP.*") "TIMESTAMP=19700101\n"))
7980 (add-after 'configure 'fix-bin-ls
7982 (substitute* (find-files "." "Makefile")
7988 ("java" ,icedtea "jdk")))
7990 `(("java" ,icedtea)))
7991 (home-page "https://www.antlr2.org")
7992 (synopsis "Framework for constructing recognizers, compilers, and translators")
7993 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
7994 is a language tool that provides a framework for constructing recognizers,
7995 compilers, and translators from grammatical descriptions containing Java, C#,
7996 C++, or Python actions. ANTLR provides excellent support for tree construction,
7997 tree walking, and translation.")
7998 (license license:public-domain)))
8000 (define-public java-stringtemplate-3
8002 (name "java-stringtemplate")
8006 (uri (string-append "https://github.com/antlr/website-st4/raw/"
8007 "gh-pages/download/stringtemplate-"
8011 "086yj68np1vqhkj7483diz3km6s6y4gmwqswa7524a0ca6vxn2is"))))
8012 (build-system ant-build-system)
8014 `(#:jar-name (string-append ,name "-" ,version ".jar")
8016 #:modules ((guix build ant-build-system)
8020 (modify-phases %standard-phases
8021 (add-before 'check 'fix-tests
8023 (substitute* "build.xml"
8024 (("\\$\\{test.home\\}/java")
8025 "${test.home}/org"))
8027 (add-before 'build 'generate-grammar
8029 (with-directory-excursion "src/org/antlr/stringtemplate/language/"
8030 (for-each (lambda (file)
8031 (format #t "~a\n" file)
8032 (invoke "antlr" file))
8033 '("template.g" "angle.bracket.template.g" "action.g"
8034 "eval.g" "group.g" "interface.g")))
8038 ("java-junit" ,java-junit)))
8039 (home-page "https://www.stringtemplate.org")
8040 (synopsis "Template engine to generate formatted text output")
8041 (description "StringTemplate is a java template engine (with ports for C#,
8042 Objective-C, JavaScript, Scala) for generating source code, web pages, emails,
8043 or any other formatted text output. StringTemplate is particularly good at
8044 code generators, multiple site skins, and internationalization / localization.
8045 StringTemplate also powers ANTLR.")
8046 (license license:bsd-3)))
8048 ;; antlr3 is partially written using antlr3 grammar files. It also depends on
8049 ;; ST4 (stringtemplate4), which is also partially written using antlr3 grammar
8050 ;; files and uses antlr3 at runtime. The latest version requires a recent version
8051 ;; of antlr3 at runtime.
8052 ;; Fortunately, ST4 4.0.6 can be built with an older antlr3, and we use antlr3.3.
8053 ;; This version of ST4 is sufficient for the latest antlr3.
8054 ;; We use ST4 4.0.6 to build a boostrap antlr3 (latest version), and build
8055 ;; the latest ST4 with it. Then we build our final antlr3 that will be linked
8056 ;; against the latest ST4.
8057 ;; antlr3.3 still depends on antlr3 to generate some files, so we use an
8058 ;; even older version, antlr3.1, to generate them. Fortunately antlr3.1 uses
8059 ;; only grammar files with the antlr2 syntax.
8060 ;; So we build antlr3.1 -> antlr3.3 -> ST4.0.6 -> antlr3-bootstrap -> ST4 -> antlr3.
8062 (define-public java-stringtemplate
8063 (package (inherit java-stringtemplate-3)
8064 (name "java-stringtemplate")
8068 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/"
8070 (file-name (string-append name "-" version ".tar.gz"))
8073 "1pri8hqa95rfdkjy55icl5q1m09zwp5k67ib14abas39s4v3w087"))))
8074 (build-system ant-build-system)
8076 `(#:jar-name (string-append ,name "-" ,version ".jar")
8077 #:tests? #f ; FIXME: tests fail for unknown reasons
8079 #:modules ((guix build ant-build-system)
8083 (modify-phases %standard-phases
8084 (add-before 'check 'fix-test-target
8086 (substitute* "build.xml"
8087 (("\\$\\{test.home\\}/java") "${test.home}/")
8088 (("\\*Test.java") "Test*.java"))
8090 (add-before 'build 'generate-grammar
8092 (with-directory-excursion "src/org/stringtemplate/v4/compiler/"
8093 (for-each (lambda (file)
8094 (format #t "~a\n" file)
8095 (invoke "antlr3" file))
8096 '("STParser.g" "Group.g" "CodeGenerator.g")))
8099 `(("antlr3" ,antlr3-bootstrap)
8101 ("java-stringtemplate" ,java-stringtemplate-3)
8102 ("java-junit" ,java-junit)))))
8104 (define java-stringtemplate-4.0.6
8105 (package (inherit java-stringtemplate)
8106 (name "java-stringtemplate")
8110 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/ST-"
8112 (file-name (string-append name "-" version ".tar.gz"))
8115 "0hjmh1ahdsh3w825i67mli9l4nncc4l6hdbf9ma91jvlj590sljp"))))
8117 `(("antlr3" ,antlr3-3.3)
8119 ("java-stringtemplate" ,java-stringtemplate-3)))))
8121 (define-public antlr3
8128 (url "https://github.com/antlr/antlr3")
8130 (file-name (git-file-name name version))
8133 "0cafavrjmzqhklghrk8c2jqxkdwxgzskm20pbrfd3r41cn00dpnf"))))
8134 (build-system ant-build-system)
8136 `(#:jar-name (string-append ,name "-" ,version ".jar")
8137 #:source-dir "tool/src/main/java:runtime/Java/src/main/java:tool/src/main/antlr3"
8140 (modify-phases %standard-phases
8141 (add-after 'install 'bin-install
8142 (lambda* (#:key inputs outputs #:allow-other-keys)
8143 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
8144 (bin (string-append (assoc-ref outputs "out") "/bin")))
8146 (with-output-to-file (string-append bin "/antlr3")
8149 (string-append "#!" (which "sh") "\n"
8150 "java -cp " jar "/" ,name "-" ,version ".jar:"
8152 (find-files (assoc-ref inputs "stringtemplate")
8156 (find-files (assoc-ref inputs "stringtemplate4")
8160 (find-files (string-append
8161 (assoc-ref inputs "antlr")
8164 " org.antlr.Tool $*"))))
8165 (chmod (string-append bin "/antlr3") #o755))
8167 (add-before 'build 'generate-grammar
8169 (chdir "tool/src/main/antlr3/org/antlr/grammar/v3/")
8170 (for-each (lambda (file)
8173 (invoke "antlr3" file))
8174 '("ANTLR.g" "ANTLRTreePrinter.g" "ActionAnalysis.g"
8175 "AssignTokenTypesWalker.g"
8176 "ActionTranslator.g" "TreeToNFAConverter.g"
8177 "ANTLRv3.g" "ANTLRv3Tree.g" "LeftRecursiveRuleWalker.g"
8178 "CodeGenTreeWalker.g" "DefineGrammarItemsWalker.g"))
8179 (substitute* "ANTLRParser.java"
8180 (("public Object getTree") "public GrammarAST getTree"))
8181 (substitute* "ANTLRv3Parser.java"
8182 (("public Object getTree") "public CommonTree getTree"))
8183 (chdir "../../../../../java")
8184 (substitute* "org/antlr/tool/LeftRecursiveRuleAnalyzer.java"
8185 (("import org.antlr.grammar.v3.\\*;") "import org.antlr.grammar.v3.*;
8186 import org.antlr.grammar.v3.ANTLRTreePrinter;"))
8187 (substitute* "org/antlr/tool/ErrorManager.java"
8188 (("case NO_SUCH_ATTRIBUTE_PASS_THROUGH:") ""))
8189 (chdir "../../../..")
8191 (add-before 'build 'fix-build-xml
8193 (substitute* "build.xml"
8194 (("target name=\"compile\">")
8195 "target name=\"compile\">
8196 <copy todir=\"${classes.dir}\">
8197 <fileset dir=\"tool/src/main/resources\">
8198 <include name=\"**/*.stg\"/>
8199 <include name=\"**/*.st\"/>
8200 <include name=\"**/*.sti\"/>
8201 <include name=\"**/STLexer.tokens\"/>
8207 ("antlr3" ,antlr3-bootstrap)))
8209 `(("junit" ,java-junit)
8210 ("stringtemplate" ,java-stringtemplate-3)
8211 ("stringtemplate4" ,java-stringtemplate)))
8213 `(("stringtemplate" ,java-stringtemplate-3)
8215 ("stringtemplate4" ,java-stringtemplate-4.0.6)))
8216 (home-page "https://www.antlr3.org")
8217 (synopsis "Framework for constructing recognizers, compilers, and translators")
8218 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
8219 is a language tool that provides a framework for constructing recognizers,
8220 compilers, and translators from grammatical descriptions containing Java, C#,
8221 C++, or Python actions. ANTLR provides excellent support for tree construction,
8222 tree walking, and translation.")
8223 (license license:bsd-3)))
8225 (define antlr3-bootstrap
8228 (name "antlr3-bootstrap")
8231 ("antlr3" ,antlr3-3.3)))
8233 `(("junit" ,java-junit)))))
8235 (define-public antlr3-3.3
8242 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
8243 "gh-pages/download/antlr-"
8247 "0qgg5vgsm4l1d6dj9pfbaa25dpv2ry2gny8ajy4vvgvfklw97b3m"))
8249 (search-patches "antlr3-3_3-fix-java8-compilation.patch"))))
8251 `(#:jar-name (string-append ,name "-" ,version ".jar")
8252 #:source-dir (string-join '("tool/src/main/java"
8253 "runtime/Java/src/main/java"
8254 "tool/src/main/antlr2"
8255 "tool/src/main/antlr3")
8257 #:tests? #f ; FIXME: tests seem to require maven plugin
8258 #:modules ((guix build ant-build-system)
8262 (modify-phases %standard-phases
8263 (add-after 'install 'bin-install
8264 (lambda* (#:key inputs outputs #:allow-other-keys)
8265 (let* ((out (assoc-ref outputs "out"))
8266 (jar (string-append out "/share/java"))
8267 (bin (string-append out "/bin")))
8269 (with-output-to-file (string-append bin "/antlr3")
8273 "#!" (which "sh") "\n"
8274 "java -cp " jar "/antlr3-3.3.jar:"
8276 (append (find-files (assoc-ref inputs "java-stringtemplate")
8278 (find-files (string-append (assoc-ref inputs "antlr")
8282 " org.antlr.Tool $*"))))
8283 (chmod (string-append bin "/antlr3") #o755)
8285 (add-before 'build 'generate-grammar
8287 (substitute* "tool/src/main/java/org/antlr/tool/Grammar.java"
8288 (("import org.antlr.grammar.v2.\\*;")
8289 "import org.antlr.grammar.v2.*;\n
8290 import org.antlr.grammar.v2.TreeToNFAConverter;\n
8291 import org.antlr.grammar.v2.DefineGrammarItemsWalker;\n
8292 import org.antlr.grammar.v2.ANTLRTreePrinter;"))
8293 (with-directory-excursion "tool/src/main/antlr2/org/antlr/grammar/v2/"
8294 (for-each (lambda (file)
8295 (format #t "~a\n" file)
8296 (invoke "antlr" file))
8297 '("antlr.g" "antlr.print.g" "assign.types.g"
8298 "buildnfa.g" "codegen.g" "define.g")))
8299 (with-directory-excursion "tool/src/main/antlr3/org/antlr/grammar/v3/"
8300 (for-each (lambda (file)
8301 (format #t "~a\n" file)
8302 (invoke "antlr3" file))
8303 '("ActionAnalysis.g" "ActionTranslator.g" "ANTLRv3.g"
8306 (add-before 'build 'fix-build-xml
8308 (substitute* "build.xml"
8309 (("target name=\"compile\">")
8310 "target name=\"compile\">
8311 <copy todir=\"${classes.dir}\">
8312 <fileset dir=\"tool/src/main/resources\">
8313 <include name=\"**/*.stg\"/>
8314 <include name=\"**/*.st\"/>
8315 <include name=\"**/*.sti\"/>
8316 <include name=\"**/STLexer.tokens\"/>
8322 ("antlr3" ,antlr3-3.1)))
8324 `(("junit" ,java-junit)))
8326 `(("java-stringtemplate" ,java-stringtemplate-3)
8327 ("antlr" ,antlr2)))))
8329 (define-public antlr3-3.1
8335 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
8336 "gh-pages/download/antlr-"
8340 "0sfimc9cpbgrihz4giyygc8afgpma2c93yqpwb951giriri6x66z"))
8342 (search-patches "antlr3-3_1-fix-java8-compilation.patch"))))
8344 `(#:jar-name (string-append "antlr3-" ,version ".jar")
8345 #:source-dir "src:runtime/Java/src"
8348 (modify-phases %standard-phases
8349 (add-after 'install 'bin-install
8350 (lambda* (#:key inputs outputs #:allow-other-keys)
8351 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
8352 (bin (string-append (assoc-ref outputs "out") "/bin")))
8354 (with-output-to-file (string-append bin "/antlr3")
8357 (string-append "#!" (which "sh") "\n"
8358 "java -cp " jar "/antlr3-3.1.jar:"
8360 (find-files (assoc-ref inputs "stringtemplate")
8364 (find-files (string-append
8365 (assoc-ref inputs "antlr")
8368 " org.antlr.Tool $*"))))
8369 (chmod (string-append bin "/antlr3") #o755))
8371 (add-before 'build 'generate-grammar
8373 (let ((dir "src/org/antlr/tool/"))
8374 (for-each (lambda (file)
8377 (invoke "antlr" "-o" dir (string-append dir file)))
8378 '("antlr.g" "antlr.print.g" "assign.types.g"
8379 "buildnfa.g" "define.g")))
8380 (format #t "codegen.g\n")
8381 (invoke "antlr" "-o" "src/org/antlr/codegen"
8382 "src/org/antlr/codegen/codegen.g")
8384 (add-before 'build 'fix-build-xml
8386 (substitute* "build.xml"
8387 (("target name=\"compile\">")
8388 "target name=\"compile\">
8389 <copy todir=\"${classes.dir}\">
8390 <fileset dir=\"src\">
8391 <include name=\"**/*.stg\"/>
8392 <include name=\"**/*.st\"/>
8393 <include name=\"**/*.sti\"/>
8394 <include name=\"**/STLexer.tokens\"/>
8399 `(("antlr" ,antlr2)))
8401 `(("junit" ,java-junit)))
8403 `(("stringtemplate" ,java-stringtemplate-3)))))
8405 (define-public java-treelayout
8407 (name "java-treelayout")
8412 (url "https://github.com/abego/treelayout")
8413 (commit (string-append "v" version))))
8414 (file-name (git-file-name name version))
8417 "18my8ql9b1y0n0zrvkih7xfhf3dpgfhyfifvkcfhmwcvw3divxak"))))
8418 (build-system ant-build-system)
8420 `(#:jar-name (string-append ,name "-" ,version ".jar")
8421 #:source-dir "org.abego.treelayout/src/main/java"
8422 #:test-dir "org.abego.treelayout/src/test"))
8424 `(("java-junit" ,java-junit)))
8426 `(("java-hamcrest-core" ,java-hamcrest-core)))
8427 (home-page "http://treelayout.sourceforge.net")
8428 (synopsis "Tree Layout Algorithm in Java")
8429 (description "TreeLayout creates tree layouts for arbitrary trees. It is
8430 not restricted to a specific output or format, but can be used for any kind of
8431 two dimensional diagram. Examples are Swing based components, SVG files, etc.
8432 This is possible because TreeLayout separates the layout of a tree from the
8434 (license license:bsd-3)))
8436 (define-public java-antlr4-runtime
8438 (name "java-antlr4-runtime")
8443 (url "https://github.com/antlr/antlr4")
8445 (file-name (git-file-name name version))
8448 "1qal3add26qxskm85nk7r758arladn5rcyjinmhlhznmpbbv9j8m"))
8450 (search-patches "java-antlr4-Add-standalone-generator.patch"
8451 "java-antlr4-fix-code-too-large.java"))))
8452 (build-system ant-build-system)
8454 `(#:jar-name "java-antlr4-runtime.jar"
8455 #:source-dir "runtime/Java/src/org"
8456 #:tests? #f; tests depend on java-antlr4 itself
8458 (modify-phases %standard-phases
8459 (add-before 'build 'copy-resources
8461 (copy-recursively "runtime/Java/src/main/dot"
8464 (home-page "https://www.antlr.org")
8465 (synopsis "ANTLR runtime library")
8466 (description "This package contains the runtime library used with generated
8468 (license license:bsd-3)))
8470 (define-public antlr4
8472 (inherit java-antlr4-runtime)
8475 `(#:jar-name "antlr4.jar"
8476 #:source-dir "tool/src"
8477 #:test-dir "tool-testsuite/test:runtime-testsuite/test:runtime-testsuite/annotations/src"
8478 #:test-include (list "**/Test*.java")
8479 #:test-exclude (list
8480 ;; no runnable method
8481 "**/TestOutputReading.java"
8483 "**/TestParserErrors.java"
8484 "**/TestSemPredEvalParser.java"
8486 "**/TestListeners.java"
8487 "**/TestParseTrees.java"
8488 "**/TestParserExec.java"
8489 "**/TestLexerErrors.java"
8490 "**/TestPerformance.java"
8491 "**/TestCompositeParsers.java"
8492 "**/TestLexerExec.java"
8493 "**/TestSemPredEvalLexer.java"
8494 "**/TestLeftRecursion.java"
8495 "**/TestFullContextParsing.java"
8496 "**/TestCompositeLexers.java"
8497 ;; Null pointer exception
8498 "**/TestCompositeGrammars.java"
8499 ;; Wrong assumption on emoji
8500 "**/TestUnicodeData.java")
8502 (modify-phases %standard-phases
8503 (add-before 'build 'fix-build.xml
8505 ;; tests are not in a java subdirectory
8506 (substitute* "build.xml"
8507 (("\\$\\{test.home\\}/java") "${test.home}"))
8509 ;; tests require to have a working antlr4 binary
8511 (add-after 'bin-install 'check
8513 (invoke "ant" "compile-tests")
8514 (invoke "ant" "check" "-Dtest.home=runtime-testsuite/annotations/src")
8515 (invoke "ant" "check" "-Dtest.home=runtime-testsuite/test")
8516 (invoke "ant" "check" "-Dtest.home=tool-testsuite/test")
8518 (add-before 'check 'remove-unrelated-languages
8520 ;; There are tests for other languages that ANTLR can generate, but
8521 ;; we don't have the infrastructure for that yet. Let's test Java
8525 (delete-file-recursively
8526 (string-append "runtime-testsuite/test/org/antlr/v4/test/runtime/"
8528 '("cpp" "csharp" "go" "javascript" "php" "python" "python2"
8531 (add-before 'check 'generate-test-parsers
8532 (lambda* (#:key outputs #:allow-other-keys)
8533 (define (run-antlr dir filename package)
8534 (invoke "antlr4" "-lib" dir "-visitor" "-no-listener"
8535 "-package" package (string-append dir "/" filename)
8537 (setenv "PATH" (string-append (getenv "PATH") ":"
8538 (assoc-ref outputs "out") "/bin"))
8539 (run-antlr "runtime-testsuite/test/org/antlr/v4/test/runtime/java/api"
8540 "Java.g4" "org.antlr.v4.test.runtime.java.api")
8541 (run-antlr "runtime-testsuite/test/org/antlr/v4/test/runtime/java/api"
8542 "VisitorBasic.g4" "org.antlr.v4.test.runtime.java.api")
8543 (run-antlr "runtime-testsuite/test/org/antlr/v4/test/runtime/java/api"
8544 "VisitorCalc.g4" "org.antlr.v4.test.runtime.java.api")
8546 (add-before 'check 'remove-graphemes
8548 ;; When running antlr on grahemes.g4, we get a runtime exception:
8549 ;; set is empty. So delete the file that depends on it.
8551 "runtime-testsuite/test/org/antlr/v4/test/runtime/java/api/perf/TimeLexerSpeed.java")
8553 (add-after 'install 'bin-install
8554 (lambda* (#:key inputs outputs #:allow-other-keys)
8555 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
8556 (bin (string-append (assoc-ref outputs "out") "/bin")))
8558 (with-output-to-file (string-append bin "/antlr4")
8561 (string-append "#!" (which "sh") "\n"
8562 "java -cp " jar "/antlr4.jar:"
8568 (find-files (assoc-ref inputs input)
8570 '("antlr3" "java-stringtemplate"
8571 "java-antlr4-runtime" "java-treelayout"
8572 "java-jsonp-api" "java-icu4j")))
8574 " org.antlr.v4.Tool $*"))))
8575 (chmod (string-append bin "/antlr4") #o755)
8577 (add-before 'build 'copy-resources
8579 (copy-recursively "tool/resources/" "build/classes")
8581 (add-before 'build 'generate-unicode
8583 ;; First: build the generator
8584 (invoke "javac" "-cp" (getenv "CLASSPATH")
8585 "tool/src/org/antlr/v4/unicode/UnicodeRenderer.java"
8586 "tool/src/org/antlr/v4/unicode/UnicodeDataTemplateController.java")
8588 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
8589 ":tool/src:runtime/Java")
8590 "org.antlr.v4.unicode.UnicodeRenderer"
8591 "tool/resources/org/antlr/v4/tool/templates"
8593 "tool/src/org/antlr/v4/unicode/UnicodeData.java")
8594 ;; It seems there is a bug with our ST4
8595 (substitute* "tool/src/org/antlr/v4/unicode/UnicodeData.java"
8597 ;; Remove the additional file
8598 (delete-file "tool/src/org/antlr/v4/unicode/UnicodeRenderer.java")
8600 (add-before 'build 'generate-grammar
8601 (lambda* (#:key inputs #:allow-other-keys)
8602 (with-directory-excursion "tool/src/org/antlr/v4/parse"
8603 (for-each (lambda (file)
8606 (invoke "antlr3" file))
8607 '("ANTLRLexer.g" "ANTLRParser.g" "BlockSetTransformer.g"
8608 "GrammarTreeVisitor.g" "ATNBuilder.g"
8609 "ActionSplitter.g" "LeftRecursiveRuleWalker.g")))
8610 (with-directory-excursion "tool/src/org/antlr/v4/codegen"
8611 (install-file "../parse/ANTLRParser.tokens" ".")
8612 (display "SourceGenTriggers.g\n")
8613 (invoke "antlr3" "SourceGenTriggers.g"))
8616 `(("antlr3" ,antlr3)
8617 ("java-antlr4-runtime" ,java-antlr4-runtime)
8618 ("java-icu4j" ,java-icu4j)
8619 ("java-jsonp-api" ,java-jsonp-api)
8620 ("java-stringtemplate" ,java-stringtemplate)
8621 ("java-treelayout" ,java-treelayout)))
8623 `(("java-junit" ,java-junit)))
8624 (synopsis "Parser and lexer generator in Java")
8625 (description "ANTLR (ANother Tool for Language Recognition) is a powerful
8626 parser generator for reading, processing, executing, or translating structured
8627 text or binary files. It's widely used to build languages, tools, and
8628 frameworks. From a grammar, ANTLR generates a parser that can build and walk
8631 (define-public java-antlr4-runtime-4.1
8633 (inherit java-antlr4-runtime)
8638 (url "https://github.com/antlr/antlr4")
8640 (file-name (git-file-name "antlr4" version))
8643 "1i8hmx5an58cjyvhji0xgpvd6lq00z1k1mjys025q2wqc25wv4c1"))))
8645 (substitute-keyword-arguments (package-arguments java-antlr4-runtime)
8647 `(modify-phases ,phases
8648 (add-before 'configure 'chmod
8650 (chmod "build.xml" #o644)
8653 `(("java-treelayout" ,java-treelayout)))))
8655 (define-public antlr4-4.1
8658 (version (package-version java-antlr4-runtime-4.1))
8659 (source (package-source java-antlr4-runtime-4.1))
8661 (substitute-keyword-arguments (package-arguments antlr4)
8664 ((#:test-exclude excludes)
8665 `(list "**/TestParseErrors.java"
8666 "**/TestTopologicalSort.java"
8669 `(modify-phases ,phases
8670 (delete 'generate-unicode)
8673 (invoke "ant" "check")
8675 (add-before 'configure 'chmod
8677 (chmod "build.xml" #o644)
8679 (delete 'remove-graphemes)
8680 (delete 'remove-unrelated-languages)
8681 (delete 'generate-test-parsers)))))
8684 "java-antlr4-runtime" (list java-antlr4-runtime-4.1)
8685 (package-inputs antlr4)))))
8687 (define-public java-tunnelvisionlabs-antlr4-runtime-annotations
8689 (inherit java-antlr4-runtime)
8690 (name "java-tunnelvisionlabs-antlr4-runtime-annotations")
8695 (url "https://github.com/tunnelvisionlabs/antlr4")
8696 (commit (string-append version "-opt"))))
8697 (file-name (git-file-name "java-tunnelvisionlabs-antlr4" version))
8700 "1mf2lvvsszpialsk23ma83pwp50nd32lrbjpa847zlm5gmranbr8"))
8702 (search-patches "java-antlr4-Add-standalone-generator.patch"
8703 "java-tunnelvisionlabs-antlr-code-too-large.patch"))))
8705 `(#:jar-name "java-antlr4-runtime-annotations.jar"
8706 #:source-dir "runtime/JavaAnnotations/src"
8707 #:tests? #f; no tests
8709 (modify-phases %standard-phases
8710 (add-after 'build 'copy-resources
8712 (copy-recursively "runtime/JavaAnnotations/resources"
8715 (add-after 'copy-resources 'rebuild-jar
8717 (invoke "ant" "jar")
8721 (synopsis "Annotations for ANTLR's runtime library")
8722 (description "This package contains annotations used during the build of
8723 the runtime library of ANTLR.")))
8725 ;; the runtime of this library requires a lexer that is generated by antlr4.
8726 ;; However, antlr4 itself requires this library at build and run-time. We
8727 ;; use antlr4@4.1, the closest version of antlr that doesn't need this
8728 ;; bootstrap process, to generate the lexer. The generated lexer is built
8729 ;; for the 4.1 runtime, which is slightly different from this runtime.
8730 ;; So, we build the runtime with antlr 4.1, with a broken xml lexer, that we
8731 ;; use to build antlr4. We then re-use this antlr4 to build the runtime, and
8732 ;; the proper, working, runtime to build antlr4 again.
8733 (define java-tunnelvisionlabs-antlr4-runtime-bootstrap
8735 (inherit java-antlr4-runtime)
8736 (name "java-tunnelvisionlabs-antlr4-runtime")
8737 (version (package-version java-tunnelvisionlabs-antlr4-runtime-annotations))
8738 (source (package-source java-tunnelvisionlabs-antlr4-runtime-annotations))
8740 `(#:jar-name "java-antlr4-runtime.jar"
8741 #:source-dir "runtime/Java/src"
8742 #:tests? #f; tests require antlr4, but antlr4 depends on this package
8744 (modify-phases %standard-phases
8745 (add-before 'build 'generate-xpath-lexer
8747 (invoke "antlr4" "-lib" "runtime/Java/src/org/antlr/v4/runtime/tree/xpath"
8748 "-visitor" "-no-listener"
8749 "-package" "org.antlr.v4.runtime.tree.xpath"
8750 "runtime/Java/src/org/antlr/v4/runtime/tree/xpath/XPathLexer.g4")
8751 ;; Generated code is for an incompatible version of the runtime
8752 (substitute* "runtime/Java/src/org/antlr/v4/runtime/tree/xpath/XPathLexer.java"
8753 (("LexerATNSimulator\\(this,_ATN,_decisionToDFA,_sharedContextCache\\)")
8754 "LexerATNSimulator(this,_ATN)"))
8756 (add-before 'build 'copy-resources
8758 (copy-recursively "runtime/Java/src/main/dot"
8762 `(("antlr4" ,antlr4-4.1)
8763 ("java-tunnelvisionlabs-antlr4-runtime-annotations"
8764 ,java-tunnelvisionlabs-antlr4-runtime-annotations)))))
8766 (define java-tunnelvisionlabs-antlr4-bootstrap
8769 (name "java-tunnelvisionlabs-antlr4")
8770 (version (package-version java-tunnelvisionlabs-antlr4-runtime-annotations))
8771 (source (package-source java-tunnelvisionlabs-antlr4-runtime-annotations))
8773 (substitute-keyword-arguments (package-arguments antlr4)
8775 "tool/test:runtime-testsuite/src")
8777 `(modify-phases ,phases
8778 (delete 'remove-unrelated-languages)
8779 (delete 'remove-graphemes)
8780 (delete 'generate-test-parsers)
8784 `(("antlr3" ,antlr3)
8785 ("java-antlr4-runtime" ,java-tunnelvisionlabs-antlr4-runtime-bootstrap)
8786 ("java-tunnelvisionlabs-antlr4-runtime-annotations"
8787 ,java-tunnelvisionlabs-antlr4-runtime-annotations)
8788 ("java-icu4j" ,java-icu4j)
8789 ("java-jsonp-api" ,java-jsonp-api)
8790 ("java-stringtemplate" ,java-stringtemplate)
8791 ("java-treelayout" ,java-treelayout)))))
8793 (define-public java-tunnelvisionlabs-antlr4-runtime
8795 (inherit java-tunnelvisionlabs-antlr4-runtime-bootstrap)
8798 "antlr4" (list java-tunnelvisionlabs-antlr4-bootstrap)
8799 (package-native-inputs java-tunnelvisionlabs-antlr4-runtime-bootstrap)))))
8801 (define-public java-tunnelvisionlabs-antlr4
8803 (inherit java-tunnelvisionlabs-antlr4-bootstrap)
8806 "java-antlr4-runtime" (list java-tunnelvisionlabs-antlr4-runtime)
8807 (package-inputs java-tunnelvisionlabs-antlr4-bootstrap)))))
8809 (define-public java-commons-cli-1.2
8810 ;; This is a bootstrap dependency for Maven2.
8812 (inherit java-commons-cli)
8816 (uri (string-append "mirror://apache/commons/cli/source/"
8817 "commons-cli-" version "-src.tar.gz"))
8820 "0rvfgzgv2pc1m091dfj3ih9ddsjjppr1f1wf0qmc3bk6b1kwv2dm"))))
8822 `(#:jar-name "commons-cli.jar"
8824 (modify-phases %standard-phases
8825 (add-before 'check 'fix-build-xml
8826 (lambda* (#:key inputs #:allow-other-keys)
8827 (substitute* "build.xml"
8828 (("dir=\"\\$\\{test.home\\}/java\"")
8829 "dir=\"${test.home}\""))
8832 `(("java-junit" ,java-junit)))))
8834 (define-public java-microemulator-cldc
8836 (name "java-microemulator-cldc")
8840 (uri (string-append "https://github.com/barteo/microemu/archive/"
8842 (string-map (lambda (c) (if (char=? c #\.) #\_ c))
8845 (file-name (string-append name "-" version ".tar.gz"))
8848 "1x1apmz38gkppxnwnygwmi12j54v4p258v8ddzn6dldkk7vak1ll"))))
8849 (build-system ant-build-system)
8851 `(#:jar-name "microemulator-cldc.jar"
8852 #:source-dir "microemu-cldc/src/main/java"
8853 #:tests? #f)); Requires even older software
8854 (home-page "https://github.com/barteo/microemu")
8855 (synopsis "J2ME CLDC emulator")
8856 (description "Microemulator is a Java 2 Micro Edition (J2ME) CLDC/MIDP
8857 Emulator. It demonstrates MIDlet based applications in web browser
8858 applet and can be run as a standalone java application.")
8859 (license (list license:asl2.0
8861 license:lgpl2.1+))))
8863 (define-public java-datanucleus-javax-persistence
8865 (name "java-datanucleus-javax-persistence")
8869 (uri (string-append "https://github.com/datanucleus/"
8870 "javax.persistence/archive/javax.persistence-"
8871 version "-release.tar.gz"))
8874 "11jx0fjwgc2hhbqqgdd6m1pf2fplf9vslppygax0y1z5csnqjhpx"))))
8875 (build-system ant-build-system)
8877 `(#:jar-name "java-datanucleus-javax-persistence.jar"
8879 #:source-dir "src/main/java"
8880 #:tests? #f)); no tests
8881 (home-page "https://github.com/datanucleus/javax.persistence")
8882 (synopsis "JPA API")
8883 (description "This package contains a clean definition of JPA API intended
8884 for use with DataNucleus JPA since the JCP haven't provided an official JPA API
8885 jar. See @url{http://java.net/projects/jpa-spec/downloads} for the specification
8886 used to generate this API.")
8887 (license (list license:edl1.0 license:epl1.0))))
8889 (define-public java-osgi-cmpn
8891 (name "java-osgi-cmpn")
8895 (uri (string-append "https://repo1.maven.org/maven2/"
8896 "org/osgi/osgi.cmpn/" version "/osgi.cmpn-"
8897 version "-sources.jar"))
8900 "1lmb6xyrmkqdhv1kayf0514rlwq6ypvs4m44ibrck3snp8241wys"))))
8901 (build-system ant-build-system)
8903 `(#:jar-name "osgi-cmpn.jar"
8904 #:tests? #f)); no tests
8906 `(("annotation" ,java-osgi-annotation)
8907 ("core" ,java-osgi-core)
8908 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
8909 ("microemulator" ,java-microemulator-cldc)
8910 ("servlet" ,java-classpathx-servletapi)))
8911 (home-page "https://www.osgi.org")
8912 (synopsis "Compendium specification module of OSGi framework")
8914 "OSGi, for Open Services Gateway initiative framework, is a module system
8915 and service platform for the Java programming language. This package contains
8916 the compendium specification module, providing interfaces and classes for use
8917 in compiling bundles.")
8918 (license license:asl2.0)))
8920 (define-public java-osgi-service-component-annotations
8922 (name "java-osgi-service-component-annotations")
8926 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8927 "org.osgi.service.component.annotations/"
8928 version "/org.osgi.service.component.annotations-"
8929 version "-sources.jar"))
8932 "15rq9cmp4fpn74q44m4j35qsqmjf5lx3hcrk6pzvbhc08igic2f0"))))
8933 (build-system ant-build-system)
8935 `(#:jar-name "osgi-service-component-annotations.jar"
8936 #:tests? #f)); no tests
8938 `(("annotation" ,java-osgi-annotation)))
8939 (home-page "https://www.osgi.org")
8940 (synopsis "Support annotations for osgi-service-component")
8942 "OSGi, for Open Services Gateway initiative framework, is a module system
8943 and service platform for the Java programming language. This package contains
8944 the support annotations for osgi-service-component.")
8945 (license license:asl2.0)))
8947 (define-public java-osgi-dto
8949 (name "java-osgi-dto")
8953 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8954 "org.osgi.dto/" version "/org.osgi.dto-"
8955 version "-sources.jar"))
8958 "0f4bqjzadn0hwk6sd3h5gvbyfp3yci1s6r0v770cc15p0pg627yr"))))
8959 (build-system ant-build-system)
8961 `(#:jar-name "osgi-dto.jar"
8962 #:tests? #f)); no tests
8964 `(("annotation" ,java-osgi-annotation)))
8965 (home-page "https://www.osgi.org")
8966 (synopsis "Data Transfer Objects")
8968 "OSGi, for Open Services Gateway initiative framework, is a module system
8969 and service platform for the Java programming language. This package contains
8970 the Data Transfer Objects. It is easily serializable having only public fields
8971 of primitive types and their wrapper classes, Strings, and DTOs. List, Set,
8972 Map and array aggregates may also be used. The aggregates must only hold
8973 objects of the listed types or aggregates.")
8974 (license license:asl2.0)))
8976 (define-public java-osgi-resource
8978 (name "java-osgi-resource")
8982 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8983 "org.osgi.resource/"
8984 version "/org.osgi.resource-"
8985 version "-sources.jar"))
8988 "0hi0fsc5v99q22bd7lrkvpz1y0ds4w9arjldpwsrcpqvz2js7q2d"))))
8989 (build-system ant-build-system)
8991 `(#:jar-name "osgi-resource.jar"
8992 #:tests? #f)); no tests
8994 `(("annotation" ,java-osgi-annotation)
8995 ("dto" ,java-osgi-dto)))
8996 (home-page "https://www.osgi.org")
8997 (synopsis "OSGI Resource")
8999 "OSGi, for Open Services Gateway initiative framework, is a module system
9000 and service platform for the Java programming language. This package contains
9001 the definition of common types in osgi packages.")
9002 (license license:asl2.0)))
9004 (define-public java-osgi-namespace-contract
9006 (name "java-osgi-namespace-contract")
9010 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9011 "org.osgi.namespace.contract/"
9012 version "/org.osgi.namespace.contract-"
9013 version "-sources.jar"))
9016 "1iz4f2i0fvqrlq90ki9nfzcfpvy2av434ri25bglywqssx8mmp36"))))
9017 (build-system ant-build-system)
9019 `(("resource" ,java-osgi-resource)
9020 ("annotation" ,java-osgi-annotation)))
9022 `(#:jar-name "osgi-namespace-contract.jar"
9023 #:tests? #f)); no tests
9024 (home-page "https://www.osgi.org")
9025 (synopsis "Contract Capability and Requirement Namespace")
9027 "OSGi, for Open Services Gateway initiative framework, is a module system
9028 and service platform for the Java programming language. This package contains
9029 the names for the attributes and directives for a namespace with contracts.")
9030 (license license:asl2.0)))
9032 (define-public java-osgi-namespace-extender
9034 (name "java-osgi-namespace-extender")
9038 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9039 "org.osgi.namespace.extender/"
9040 version "/org.osgi.namespace.extender-"
9041 version "-sources.jar"))
9044 "0jgqiak2i05qv6j3gd33xlaifzzc0ylxxk376v2x0apfg3vvixmz"))))
9045 (build-system ant-build-system)
9047 `(("resource" ,java-osgi-resource)
9048 ("annotation" ,java-osgi-annotation)))
9050 `(#:jar-name "osgi-namespace-extendent.jar"
9051 #:tests? #f)); no tests
9052 (home-page "https://www.osgi.org")
9053 (synopsis "Extender Capability and Requirement Namespace")
9055 "OSGi, for Open Services Gateway initiative framework, is a module system
9056 and service platform for the Java programming language. This package contains
9057 the names for the attributes and directives for an extender namespace.")
9058 (license license:asl2.0)))
9060 (define-public java-osgi-namespace-service
9062 (name "java-osgi-namespace-service")
9066 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9067 "org.osgi.namespace.service/"
9068 version "/org.osgi.namespace.service-"
9069 version "-sources.jar"))
9072 "0qmw8n2449nkmm56d1znz9zhazb6ya3vsimd5bf5jg23zzhgl8c8"))))
9073 (build-system ant-build-system)
9075 `(("resource" ,java-osgi-resource)
9076 ("annotation" ,java-osgi-annotation)))
9078 `(#:jar-name "osgi-namespace-service.jar"
9079 #:tests? #f)); no tests
9080 (home-page "https://www.osgi.org")
9081 (synopsis "Service Capability and Requirement Namespace")
9083 "OSGi, for Open Services Gateway initiative framework, is a module system
9084 and service platform for the Java programming language. This package contains
9085 the names for the attributes and directives for a service namespace.")
9086 (license license:asl2.0)))
9088 (define-public java-osgi-util-function
9090 (name "java-osgi-util-function")
9094 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9095 "org.osgi.util.function/"
9096 version "/org.osgi.util.function-"
9097 version "-sources.jar"))
9100 "04l7j3hwmmj28w23m7paca0afzncs42j2mdr3liqq8kvp548sc6x"))))
9101 (build-system ant-build-system)
9103 `(#:jar-name "osgi-util-function.jar"
9104 #:tests? #f)); no tests
9106 `(("annotation" ,java-osgi-annotation)))
9107 (home-page "https://www.osgi.org")
9108 (synopsis "OSGI Util Function")
9110 "OSGi, for Open Services Gateway initiative framework, is a module system
9111 and service platform for the Java programming language. This package contains
9112 an interface for a function that accepts a single argument and produces a result.")
9113 (license license:asl2.0)))
9115 (define-public java-osgi-util-promise
9117 (name "java-osgi-util-promise")
9121 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9122 "org.osgi.util.promise/"
9123 version "/org.osgi.util.promise-"
9124 version "-sources.jar"))
9127 "0y34dwiflg1c4ahvkswpf9z02xph2sr9fm04ia5493x3lshpw22c"))))
9128 (build-system ant-build-system)
9130 `(#:jar-name "osgi-util-promise.jar"
9131 #:tests? #f)); no tests
9133 `(("annotation" ,java-osgi-annotation)
9134 ("function" ,java-osgi-util-function)))
9135 (home-page "https://www.osgi.org")
9136 (synopsis "Promise of a value")
9138 "OSGi, for Open Services Gateway initiative framework, is a module system
9139 and service platform for the Java programming language. This package contains
9140 an interface and utilitary classes for promises. A Promise represents a future
9141 value. It handles the interactions for asynchronous processing.")
9142 (license license:asl2.0)))
9144 (define-public java-osgi-service-metatype-annotations
9146 (name "java-osgi-service-metatype-annotations")
9150 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9151 "org.osgi.service.metatype.annotations/"
9152 version "/org.osgi.service.metatype.annotations-"
9153 version "-sources.jar"))
9156 "12rwm3349wk80vm88rcdgs4435m4jxkpkj5mrx326skkz2c6hyw6"))))
9157 (build-system ant-build-system)
9159 `(#:jar-name "osgi-service-metatype-annotations.jar"
9160 #:tests? #f)); no tests
9162 `(("annotation" ,java-osgi-annotation)))
9163 (home-page "https://www.osgi.org")
9164 (synopsis "Support annotations for metatype")
9166 "OSGi, for Open Services Gateway initiative framework, is a module system
9167 and service platform for the Java programming language. This package contains
9168 the support annotations for metatype.")
9169 (license license:asl2.0)))
9171 (define-public java-osgi-service-repository
9173 (name "java-osgi-service-repository")
9177 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9178 "org.osgi.service.repository/"
9179 version "/org.osgi.service.repository-"
9180 version "-sources.jar"))
9183 "1k41mhg7b58pd8nsghr2qwcjrxdnf1p9spsw9v11k4257g6rl06n"))))
9184 (build-system ant-build-system)
9186 `(#:jar-name "osgi-service-repository.jar"
9187 #:tests? #f)); no tests
9189 `(("annotation" ,java-osgi-annotation)
9190 ("promise" ,java-osgi-util-promise)
9191 ("resource" ,java-osgi-resource)))
9192 (home-page "https://www.osgi.org")
9193 (synopsis "OSGI service repository")
9195 "OSGi, for Open Services Gateway initiative framework, is a module system
9196 and service platform for the Java programming language. This package contains
9197 a repository service that contains resources.")
9198 (license license:asl2.0)))
9200 (define-public java-osgi-framework
9202 (name "java-osgi-framework")
9206 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9207 "org.osgi.framework/" version "/org.osgi.framework-"
9208 version "-sources.jar"))
9211 "1lwp2zfad3rybcc6q9bwz8xsgkc92ypzy5p6x54387f1qj65m73s"))))
9212 (build-system ant-build-system)
9214 `(#:jar-name "osgi-framework.jar"
9215 #:tests? #f)); no tests
9217 `(("annotation" ,java-osgi-annotation)
9218 ("resource" ,java-osgi-resource)
9219 ("dto" ,java-osgi-dto)))
9220 (home-page "https://www.osgi.org")
9221 (synopsis "OSGi framework")
9223 "OSGi, for Open Services Gateway initiative framework, is a module system
9224 and service platform for the Java programming language.")
9225 (license license:asl2.0)))
9227 (define-public java-osgi-service-log
9229 (name "java-osgi-service-log")
9233 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9234 "org.osgi.service.log/"
9235 version "/org.osgi.service.log-"
9236 version "-sources.jar"))
9239 "1029j30dzcwializzca0j3fkhwwz08kmmsha5agw1iccscimj6r0"))))
9240 (build-system ant-build-system)
9242 `(#:jar-name "osgi-service-log.jar"
9243 #:tests? #f)); no tests
9245 `(("java-osgi-framework" ,java-osgi-framework)))
9246 (home-page "https://www.osgi.org")
9247 (synopsis "Provides methods for bundles to write messages to the log")
9249 "OSGi, for Open Services Gateway initiative framework, is a module system
9250 and service platform for the Java programming language. This package contains
9252 (license license:asl2.0)))
9254 (define-public java-osgi-service-jdbc
9256 (name "java-osgi-service-jdbc")
9260 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9261 "org.osgi.service.jdbc/"
9262 version "/org.osgi.service.jdbc-"
9263 version "-sources.jar"))
9266 "11iln5v7bk469cgb9ddkrz9sa95b3733gqgaqw9xf5g6wq652yjz"))))
9267 (build-system ant-build-system)
9269 `(#:jar-name "osgi-service-jdbc.jar"
9270 #:tests? #f)); no tests
9271 (home-page "https://www.osgi.org")
9272 (synopsis "Factory for JDBC connection factories")
9274 "OSGi, for Open Services Gateway initiative framework, is a module system
9275 and service platform for the Java programming language. This package contains
9276 a factory for JDBC connection factories. There are 3 preferred connection
9277 factories for getting JDBC connections:
9280 @item @code{javax.sql.DataSource};
9281 @item @code{javax.sql.ConnectionPoolDataSource};
9282 @item @code{javax.sql.XADataSource}.
9284 (license license:asl2.0)))
9286 (define-public java-osgi-service-resolver
9288 (name "java-osgi-service-resolver")
9292 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9293 "org.osgi.service.resolver/"
9294 version "/org.osgi.service.resolver-"
9295 version "-sources.jar"))
9298 "1dzqn1ryfi2rq4zwsgp44bmj2wlfydjg1qbxw2b0z4xdjjy55vxd"))))
9299 (build-system ant-build-system)
9301 `(#:jar-name "osgi-service-resolver.jar"
9302 #:tests? #f)); no tests
9304 `(("annotation" ,java-osgi-annotation)
9305 ("resource" ,java-osgi-resource)))
9306 (home-page "https://www.osgi.org")
9307 (synopsis "OSGI Resolver service")
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 resolver service that resolves the specified resources in the context supplied
9313 (license license:asl2.0)))
9315 (define-public java-osgi-util-tracker
9317 (name "java-osgi-util-tracker")
9321 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9322 "org.osgi.util.tracker/"
9323 version "/org.osgi.util.tracker-"
9324 version "-sources.jar"))
9327 "0c4fh9vxwzsx59r8dygda0gq2gx3z5vfhc3jsphlqwf5w0h403lz"))))
9328 (build-system ant-build-system)
9330 `(#:jar-name "osgi-util-tracker.jar"
9331 #:tests? #f)); no tests
9333 `(("framework" ,java-osgi-framework)
9334 ("annotation" ,java-osgi-annotation)))
9335 (home-page "https://www.osgi.org")
9336 (synopsis "Bundle tracking")
9338 "OSGi, for Open Services Gateway initiative framework, is a module system
9339 and service platform for the Java programming language. This package contains
9340 bundle tracking utility classes.")
9341 (license license:asl2.0)))
9343 (define-public java-osgi-service-cm
9345 (name "java-osgi-service-cm")
9349 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9350 "org.osgi.service.cm/"
9351 version "/org.osgi.service.cm-"
9352 version "-sources.jar"))
9355 "1z8kap48y3xi0ggj8v6czglfnpnd94mmismgi2wbqhj1nl5fzbp6"))))
9356 (build-system ant-build-system)
9358 `(#:jar-name "osgi-service-cm.jar"
9359 #:tests? #f)); no tests
9361 `(("framework" ,java-osgi-framework)
9362 ("annotation" ,java-osgi-annotation)))
9363 (home-page "https://www.osgi.org")
9364 (synopsis "OSGI Configuration Management")
9366 "OSGi, for Open Services Gateway initiative framework, is a module system
9367 and service platform for the Java programming language. This package contains
9368 utility classes for the configuration of services.")
9369 (license license:asl2.0)))
9371 (define-public java-osgi-service-packageadmin
9373 (name "java-osgi-service-packageadmin")
9377 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9378 "org.osgi.service.packageadmin/"
9379 version "/org.osgi.service.packageadmin-"
9380 version "-sources.jar"))
9383 "041mpxzi7g36wmcily6y4ccn3jx15akpdy8gmhyb7m98x7qfvn52"))))
9384 (build-system ant-build-system)
9386 `(#:jar-name "osgi-service-packageadmin.jar"
9387 #:tests? #f)); no tests
9389 `(("framework" ,java-osgi-framework)))
9390 (home-page "https://www.osgi.org")
9391 (synopsis "OSGI Package Administration")
9393 "OSGi, for Open Services Gateway initiative framework, is a module system
9394 and service platform for the Java programming language. This package contains
9395 the packageadmin service.")
9396 (license license:asl2.0)))
9398 (define-public java-ops4j-base-lang
9400 (name "java-ops4j-base-lang")
9404 (uri (string-append "https://github.com/ops4j/org.ops4j.base/"
9405 "archive/base-" version ".tar.gz"))
9408 "18hl3lpchgpv8yh5rlk39l2gif5dlfgb8gxjmncf39pr2dprkniw"))))
9409 (build-system ant-build-system)
9411 `(#:jar-name "java-ops4j-base-lang.jar"
9412 #:source-dir "ops4j-base-lang/src/main/java"
9413 #:tests? #f; no tests
9415 (modify-phases %standard-phases
9416 (add-before 'build 'add-test-file
9418 ;; That file is required by a test in ops4j-pax-exam-core-spi
9419 (mkdir-p "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang")
9420 (with-output-to-file "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang/pom.properties"
9424 "version=" ,version "\n"
9425 "groupId=org.ops4j.base"
9426 "artifactId=ops4j-base-lang\n"))))
9428 (home-page "https://ops4j1.jira.com/wiki/spaces/base/overview")
9429 (synopsis "Utility classes and extensions to be used in OPS4J projects")
9430 (description "OPS4J stands for Open Participation Software for Java. This
9431 package contains utilities and extensions related to @code{java.lang}.")
9432 (license license:asl2.0)))
9434 (define-public java-ops4j-base-monitors
9436 (inherit java-ops4j-base-lang)
9437 (name "java-ops4j-base-monitors")
9439 `(#:jar-name "java-ops4j-base-monitors.jar"
9440 #:source-dir "ops4j-base-monitors/src/main/java"
9441 #:tests? #f)); no tests
9443 `(("lang" ,java-ops4j-base-lang)))
9444 (description "OPS4J stands for Open Participation Software for Java. This
9445 package contains utilities and extensions related to monitoring.")))
9447 (define-public java-ops4j-base-io
9449 (inherit java-ops4j-base-lang)
9450 (name "java-ops4j-base-io")
9452 `(#:jar-name "java-ops4j-base-io.jar"
9453 #:source-dir "ops4j-base-io/src/main/java"
9454 #:test-dir "ops4j-base-io/src/test"
9456 (list "**/ListerTest.java")))
9458 `(("lang" ,java-ops4j-base-monitors)
9459 ("lang" ,java-ops4j-base-lang)))
9461 `(("junit" ,java-junit)
9462 ("hamcrest" ,java-hamcrest-core)))
9463 (description "OPS4J stands for Open Participation Software for Java. This
9464 package contains utilities and extensions related to handling streams and files.")))
9466 (define-public java-ops4j-base-util
9468 (inherit java-ops4j-base-lang)
9469 (name "java-ops4j-base-util")
9471 `(#:jar-name "java-ops4j-base-util.jar"
9472 #:source-dir "ops4j-base-util/src/main/java"
9473 #:test-dir "ops4j-base-util/src/test"))
9475 `(("lang" ,java-ops4j-base-lang)))
9477 `(("junit" ,java-junit)))
9478 (description "OPS4J stands for Open Participation Software for Java. This
9479 package contains utilities and extensions related to environment, i18n and
9482 (define-public java-ops4j-base-util-property
9484 (inherit java-ops4j-base-lang)
9485 (name "java-ops4j-base-util-property")
9487 `(#:jar-name "java-ops4j-base-util-property.jar"
9488 #:source-dir "ops4j-base-util-property/src/main/java"
9489 #:tests? #f)); no tests
9491 `(("lang" ,java-ops4j-base-lang)
9492 ("util" ,java-ops4j-base-util)))
9493 (description "OPS4J stands for Open Participation Software for Java. This
9494 package contains utilities and extensions related to resolving properties from
9495 different sources.")))
9497 (define-public java-ops4j-base-store
9499 (inherit java-ops4j-base-lang)
9500 (name "java-ops4j-base-store")
9502 `(#:jar-name "java-ops4j-base-store.jar"
9503 #:source-dir "ops4j-base-store/src/main/java"
9504 #:tests? #f)); no tests
9506 `(("lang" ,java-ops4j-base-lang)
9507 ("slf4j" ,java-slf4j-api)
9508 ("io" ,java-ops4j-base-io)))
9509 (description "OPS4J stands for Open Participation Software for Java. This
9510 package contains utilities for storing and retrieving data from an
9511 @code{InputStream}.")))
9513 (define-public java-ops4j-base-spi
9515 (inherit java-ops4j-base-lang)
9516 (name "java-ops4j-base-spi")
9518 `(#:jar-name "java-ops4j-base-spi.jar"
9519 #:source-dir "ops4j-base-spi/src/main/java"
9520 #:test-dir "ops4j-base-spi/src/test"))
9522 `(("junit" ,java-junit)
9523 ("hamcrest" ,java-hamcrest-core)))
9524 (description "OPS4J stands for Open Participation Software for Java. This
9525 package contains utilities for obtaining services via the Java SE 6
9526 @code{ServiceLoader}.")))
9528 (define-public java-aqute-bnd-annotation
9530 (name "java-aqute-bnd-annotation")
9534 (uri (string-append "https://github.com/bndtools/bnd/archive/"
9535 version ".REL.tar.gz"))
9536 (file-name (string-append name "-" version ".tar.gz"))
9539 "1ggyiq0as0f6cz333a0dh98j72kmvv5pf2s47v9554yh905lfqdl"))))
9540 (build-system ant-build-system)
9542 `(#:jar-name "java-aqute-bnd-annotation.jar"
9543 #:source-dir "biz.aQute.bnd.annotation/src"
9544 #:tests? #f)); empty test dir
9545 (home-page "https://bnd.bndtools.org/")
9546 (synopsis "Tools for OSGi")
9547 (description "Bnd is a swiss army knife for OSGi, it creates manifest
9548 headers based on analyzing the class code, it verifies the project settings,
9549 it manages project dependencies, gives diffs jars, and much more.")
9550 (license license:asl2.0)))
9552 (define-public java-aqute-libg
9554 (inherit java-aqute-bnd-annotation)
9555 (name "java-aqute-libg")
9557 `(#:jar-name "java-aqute-libg.jar"
9558 ;; The build fails when source/target more recent than 1.7. This
9559 ;; is a known issue. See: https://github.com/bndtools/bnd/issues/1327
9561 ;; It is closed as won't fix. There is no way to change the source
9562 ;; so that it works on 1.8, and still works on 1.6, the upstream
9563 ;; target. It work fine on 1.7, so we use 1.7.
9564 #:make-flags (list "-Dant.build.javac.source=1.7"
9565 "-Dant.build.javac.target=1.7")
9567 (modify-phases %standard-phases
9568 (add-before 'configure 'chdir
9569 ;; Change to aQute.libg directory, so that the relative
9570 ;; paths in the tests aren't broken.
9572 (chdir "aQute.libg")
9574 (add-before 'check 'create-test-directory
9575 ;; Copy the test directory to test/java, since that's where
9576 ;; ant-build-system's default project in build.xml expects to find
9577 ;; the test classes. Leave a copy in the original place to not
9578 ;; break paths in tests.
9581 (copy-recursively "test" "src/test/java")
9584 `(("slf4j" ,java-slf4j-api)
9585 ("osgi-annot" ,java-osgi-annotation)
9586 ("java-osgi-cmpn" ,java-osgi-cmpn)
9587 ("osgi" ,java-osgi-core)))
9589 `(("hamcrest" ,java-hamcrest-core)
9590 ("java-junit" ,java-junit)))))
9592 (define-public java-aqute-bndlib
9594 (inherit java-aqute-bnd-annotation)
9595 (name "java-aqute-bndlib")
9597 `(#:jar-name "java-bndlib.jar"
9598 #:source-dir "biz.aQute.bndlib/src"
9599 #:tests? #f)); no tests
9601 `(("slf4j" ,java-slf4j-api)
9602 ("osgi-annot" ,java-osgi-annotation)
9603 ("java-aqute-libg" ,java-aqute-libg)
9604 ("java-aqute-bnd-annotation" ,java-aqute-bnd-annotation)
9605 ("java-osgi-service-component-annotations" ,java-osgi-service-component-annotations)
9606 ("java-osgi-service-repository" ,java-osgi-service-repository)
9607 ("java-osgi-service-log" ,java-osgi-service-log)
9608 ("java-osgi-service-metatype-annotations" ,java-osgi-service-metatype-annotations)
9609 ("java-osgi-namespace-contract" ,java-osgi-namespace-contract)
9610 ("java-osgi-namespace-extender" ,java-osgi-namespace-extender)
9611 ("java-osgi-namespace-service" ,java-osgi-namespace-service)
9612 ("promise" ,java-osgi-util-promise)
9613 ("osgi" ,java-osgi-core)))))
9615 (define-public java-ops4j-pax-tinybundles
9617 (name "java-ops4j-pax-tinybundles")
9621 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.tinybundles/"
9622 "archive/tinybundles-" version ".tar.gz"))
9625 "0y0gq3pvv0iir2b885lmlwnvr724vv7vklzhhr4fs27d7mdkj871"))))
9627 `(#:jar-name "java-ops4j-pax-tinybundles.jar"
9628 #:source-dir "src/main/java"
9630 ;; Abstract base classes for other tests
9631 (list "**/BndTest.java" "**/CoreTest.java")
9633 (modify-phases %standard-phases
9634 (add-before 'check 'fix-version
9636 ;; This test has a reference to an old version of bndlib we are not
9637 ;; packaging. It uses the version referenced in pom.xml. We replace
9638 ;; it with our own version.
9639 (substitute* "src/test/java/org/ops4j/pax/tinybundles/bnd/BndTest.java"
9640 (("[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*")
9641 ,(package-version java-aqute-bndlib)))
9644 `(("lang" ,java-ops4j-base-lang)
9645 ("io" ,java-ops4j-base-io)
9646 ("store" ,java-ops4j-base-store)
9647 ("slf4j" ,java-slf4j-api)
9648 ("libg" ,java-aqute-libg)
9649 ("bndlib" ,java-aqute-bndlib)))
9651 `(("junit" ,java-junit)
9652 ("hamcrest" ,java-hamcrest-core)
9653 ("log4j" ,java-log4j-api)
9654 ("bndannotation" ,java-aqute-bnd-annotation)
9655 ("framework" ,java-osgi-framework)))
9656 (build-system ant-build-system)
9657 (home-page "https://ops4j1.jira.com/wiki/spaces/ops4j/pages/12060312/Tinybundles")
9658 (synopsis "Java APIs to create OSGi related artifacts")
9659 (description "Tinybundles is all about creating OSGi related artifacts like
9660 Bundles, Fragments and Deployment Packages with Java Api. It is very convenient
9661 to create such artifacts on-the-fly inside Tests (like in Pax Exam). On the
9662 other hand, this library can be a foundation of real end user tools that need
9663 to create those artifacts.")
9664 (license license:asl2.0)))
9666 (define-public java-ops4j-pax-exam-core
9668 (name "java-ops4j-pax-exam-core")
9672 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.exam2/"
9673 "archive/exam-reactor-" version ".tar.gz"))
9676 "08mzw8nkah3rj3vznlplnawspxhp61zgvb44ifqa1rni1cvbms2g"))))
9678 `(#:jar-name "java-ops4j-pax-exam-core.jar"
9679 #:source-dir "core/pax-exam/src/main/java"
9680 #:test-dir "core/pax-exam/src/test"))
9682 `(("slf4j" ,java-slf4j-api)
9683 ("lang" ,java-ops4j-base-lang)
9684 ("io" ,java-ops4j-base-io)
9685 ("util-property" ,java-ops4j-base-util-property)
9686 ("util-store" ,java-ops4j-base-store)
9687 ("java-osgi-core" ,java-osgi-core)))
9689 `(("junit" ,java-junit)
9690 ("hamcrest" ,java-hamcrest-core)))
9691 (build-system ant-build-system)
9692 (home-page "https://ops4j1.jira.com/wiki/spaces/PAXEXAM4/overview")
9693 (synopsis "In-Container Testing for OSGi, Java EE and CDI")
9694 (description "Pax Exam creates OSGi bundles for testing purposes. It lets
9695 the user take control of the OSGi framework, the test framework (e.g. JUnit) and
9696 the system under test at the same time.")
9697 (license license:asl2.0)))
9699 (define-public java-ops4j-pax-exam-core-spi
9701 (inherit java-ops4j-pax-exam-core)
9702 (name "java-ops4j-pax-exam-core-spi")
9704 `(#:jar-name "java-ops4j-pax-exam-spi.jar"
9705 #:source-dir "src/main/java"
9708 ;; Abstract base class, not a test
9709 "**/BaseStagedReactorTest.java"
9710 ;; Depends on org.mortbay.jetty.testwars:test-war-dump
9711 "**/WarBuilderTest.java")
9713 (modify-phases %standard-phases
9714 (add-before 'configure 'chdir
9716 ;; Tests assume we are in this directory
9717 (chdir "core/pax-exam-spi")
9719 (add-before 'check 'fix-tests
9721 ;; One test checks that this file is present.
9722 (mkdir-p "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi")
9723 (with-output-to-file
9724 "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi/pom.properties"
9727 (string-append "artifactId = pax-exam-spi\n"
9728 "version = " ,(package-version java-ops4j-pax-exam-core-spi)))))
9729 ;; Maven puts compilation results in the target directory, while we
9730 ;; put them in the build directory.
9731 (substitute* '("src/test/java/org/ops4j/pax/exam/spi/war/WarBuilderTest.java"
9732 "src/test/java/org/ops4j/pax/exam/spi/war/WarTestProbeBuilderTest.java"
9733 "src/test/java/org/ops4j/pax/exam/spi/war/ZipBuilderTest.java")
9734 (("target") "build"))
9735 ;; One test is expected to fail, but it doesn't throw the expected exception
9736 (substitute* "src/test/java/org/ops4j/pax/exam/spi/reactors/BaseStagedReactorTest.java"
9737 (("AssertionError") "IllegalArgumentException"))
9740 `(("java-ops4j-pax-exam-core" ,java-ops4j-pax-exam-core)
9741 ("lang" ,java-ops4j-base-lang)
9742 ("monitors" ,java-ops4j-base-monitors)
9743 ("store" ,java-ops4j-base-store)
9744 ("io" ,java-ops4j-base-io)
9745 ("spi" ,java-ops4j-base-spi)
9746 ("osgi" ,java-osgi-core)
9747 ("slf4j" ,java-slf4j-api)
9748 ("tinybundles" ,java-ops4j-pax-tinybundles)))
9750 `(("mockito" ,java-mockito-1)
9751 ("junit" ,java-junit)
9752 ("hamcrest" ,java-hamcrest-core)
9753 ("cglib" ,java-cglib)
9754 ("objenesis" ,java-objenesis)
9755 ("asm" ,java-asm)))))
9757 (define-public java-ops4j-pax-exam-core-junit
9759 (inherit java-ops4j-pax-exam-core)
9760 (name "java-ops4j-pax-exam-core-junit")
9762 `(#:jar-name "ops4j-pax-exam-core-junit.jar"
9763 #:source-dir "drivers/pax-exam-junit4/src/main/java"
9764 #:tests? #f)); no tests
9766 `(("junit" ,java-junit)
9767 ("slf4j" ,java-slf4j-api)
9768 ("core" ,java-ops4j-pax-exam-core)
9769 ("spi" ,java-ops4j-pax-exam-core-spi)))
9770 (native-inputs '())))
9772 (define-public java-fasterxml-jackson-annotations
9774 (name "java-fasterxml-jackson-annotations")
9778 (uri (string-append "https://github.com/FasterXML/"
9779 "jackson-annotations/archive/"
9780 "jackson-annotations-" version ".tar.gz"))
9783 "0mr95xd0da6a4g95zvrl1ryk5n5zv2rc696w3xnsr5hxk2gicfc4"))))
9784 (build-system ant-build-system)
9786 `(#:jar-name "jackson-annotations.jar"
9787 #:source-dir "src/main/java"
9788 #:test-dir "src/test"))
9790 `(("junit" ,java-junit)))
9791 (home-page "https://github.com/FasterXML/jackson-annotations")
9792 (synopsis "General purpose annotations for the Jackson Data Processor")
9793 (description "This package contains general purpose annotations for the
9794 Jackson Data Processor, used on value and handler types. The only annotations
9795 not included are ones that require dependency to the Databind package.")
9796 (license license:asl2.0)))
9798 (define-public java-fasterxml-jackson-core
9800 (name "java-fasterxml-jackson-core")
9804 (uri (string-append "https://github.com/FasterXML/"
9805 "jackson-core/archive/"
9806 "jackson-core-" version ".tar.gz"))
9809 "159hsnk17jr1gyzkf01cxvsn45srnk37g949r7364qlsr527gjgd"))))
9810 (build-system ant-build-system)
9812 `(#:jar-name "jackson-core.jar"
9813 #:source-dir "src/main/java"
9814 #:test-dir "src/test"
9817 ;; Expected failure. pom.xml excludes these
9819 ;; Base classes that have no constructor for junit
9821 "**/ConcurrencyReadTest.java"
9822 "**/ManualCharAccessTest.java"
9823 "**/ManualCharAccessTest.java"
9824 "**/TrailingCommasTest.java"
9825 "**/AsyncMissingValuesInObjectTest.java"
9826 "**/AsyncMissingValuesInArrayTest.java")
9828 (modify-phases %standard-phases
9829 (add-before 'configure 'generate-PackageVersion.java
9831 (let* ((out "src/main/java/com/fasterxml/jackson/core/json/PackageVersion.java")
9832 (in (string-append out ".in")))
9835 (("@package@") "com.fasterxml.jackson.core.json")
9836 (("@projectversion@") ,version)
9837 (("@projectgroupid@") "com.fasterxml.jackson.core")
9838 (("@projectartifactid@") "jackson-core")))
9840 (add-before 'build 'copy-resources
9842 (copy-recursively "src/main/resources"
9845 (add-before 'check 'copy-test-resources
9847 (copy-recursively "src/test/resources"
9848 "build/test-classes")
9851 `(("junit" ,java-junit)
9852 ("hamcrest" ,java-hamcrest-core)))
9853 (home-page "https://github.com/FasterXML/jackson-core")
9854 (synopsis "Low-level streaming parser and generator abstractions")
9855 (description "This package contains core low-level incremental
9856 (streaming) parser and generator abstractions used by the Jackson Data
9857 Processor. It also includes the default implementation of handler types
9858 (parser, generator) that handle JSON format.")
9859 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
9861 (define-public java-fasterxml-jackson-databind
9863 (name "java-fasterxml-jackson-databind")
9867 (uri (string-append "https://github.com/FasterXML/"
9868 "jackson-databind/archive/"
9869 "jackson-databind-" version ".tar.gz"))
9872 "1zd2cw4z6kdkbx8za96xh9pyicv2a2l7y0rkcx2fqd8hv6d47s08"))))
9873 (build-system ant-build-system)
9875 `(#:jar-name "jackson-databind.jar"
9876 #:source-dir "src/main/java"
9877 #:tests? #f; requires javax.measures for which I can't find a free implementation
9879 (modify-phases %standard-phases
9880 (add-before 'configure 'generate-PackageVersion.java
9882 (let* ((out "src/main/java/com/fasterxml/jackson/databind/cfg/PackageVersion.java")
9883 (in (string-append out ".in")))
9886 (("@package@") "com.fasterxml.jackson.databind.cfg")
9887 (("@projectversion@") ,version)
9888 (("@projectgroupid@") "com.fasterxml.jackson.databind")
9889 (("@projectartifactid@") "jackson-databind")))
9891 (add-before 'build 'copy-resources
9893 (copy-recursively "src/main/resources" "build/classes")
9896 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
9897 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)))
9898 (home-page "https://github.com/FasterXML/jackson-databind")
9899 (synopsis "Data-binding functionality and tree-model for the Jackson Data Processor")
9900 (description "This package contains the general-purpose data-binding
9901 functionality and tree-model for Jackson Data Processor. It builds on core
9902 streaming parser/generator package, and uses Jackson Annotations for
9904 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
9906 (define-public java-fasterxml-jackson-modules-base-jaxb
9908 (name "java-fasterxml-jackson-modules-base-jaxb")
9912 (uri (string-append "https://github.com/FasterXML/"
9913 "jackson-modules-base/archive/"
9914 "jackson-modules-base-" version ".tar.gz"))
9917 "1wws95xi8sppp6b0k2vvjdjyynl20r1a4dwrhai08lzlria6blp5"))))
9918 (build-system ant-build-system)
9920 `(#:jar-name "jackson-modules-base-jaxb.jar"
9921 #:source-dir "jaxb/src/main/java"
9922 #:test-dir "jaxb/src/test"
9924 ;; Base class for tests
9925 (list "**/BaseJaxbTest.java")
9927 (modify-phases %standard-phases
9928 (add-before 'configure 'generate-PackageVersion.java
9930 (let* ((out (string-append "jaxb/src/main/java/com/fasterxml/"
9931 "jackson/module/jaxb/PackageVersion.java"))
9932 (in (string-append out ".in")))
9935 (("@package@") "com.fasterxml.jackson.module.jaxb")
9936 (("@projectversion@") ,version)
9937 (("@projectgroupid@") "com.fasterxml.jackson.module.jaxb")
9938 (("@projectartifactid@") "jackson-module-jaxb")))
9940 (add-before 'build 'copy-resources
9942 (copy-recursively "jaxb/src/main/resources" "build/classes")
9945 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
9946 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
9947 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)))
9949 `(("java-junit" ,java-junit)))
9950 (home-page "https://github.com/FasterXML/jackson-modules-base")
9951 (synopsis "Jaxb annotations jackson module")
9952 (description "This package is the jaxb annotations module for jackson.")
9953 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
9955 (define-public java-fasterxml-jackson-modules-base-mrbean
9957 (name "java-fasterxml-jackson-modules-base-mrbean")
9961 (uri (string-append "https://github.com/FasterXML/"
9962 "jackson-modules-base/archive/"
9963 "jackson-modules-base-" version ".tar.gz"))
9966 "1wws95xi8sppp6b0k2vvjdjyynl20r1a4dwrhai08lzlria6blp5"))))
9967 (build-system ant-build-system)
9969 `(#:jar-name "jackson-modules-base-mrbean.jar"
9970 #:source-dir "mrbean/src/main/java"
9971 #:test-dir "mrbean/src/test"
9973 ;; Base class for tests
9974 (list "**/BaseTest.java")
9976 (modify-phases %standard-phases
9977 (add-before 'configure 'generate-PackageVersion.java
9979 (let* ((out (string-append "mrbean/src/main/java/com/fasterxml/"
9980 "jackson/module/mrbean/PackageVersion.java"))
9981 (in (string-append out ".in")))
9984 (("@package@") "com.fasterxml.jackson.module.mrbean")
9985 (("@projectversion@") ,version)
9986 (("@projectgroupid@") "com.fasterxml.jackson.module.mrbean")
9987 (("@projectartifactid@") "jackson-module-mrbean")))
9990 `(("java-asm" ,java-asm)
9991 ("java-fasterxml-jackson-annotations"
9992 ,java-fasterxml-jackson-annotations)
9993 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
9994 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)))
9996 `(("java-junit" ,java-junit)))
9997 (home-page "https://github.com/FasterXML/jackson-modules-base")
9998 (synopsis "POJO type materialization for Java")
9999 (description "This package implements POJO type materialization.
10000 Databinders can construct implementation classes for Java interfaces as part
10001 of deserialization.")
10002 (license license:asl2.0)))
10004 (define-public java-snakeyaml
10006 (name "java-snakeyaml")
10010 (uri (string-append "https://bitbucket.org/asomov/snakeyaml/get/v"
10011 version ".tar.gz"))
10012 (file-name (string-append name "-" version ".tar.gz"))
10015 "0474cqcv46zgv9bhms2vgawakq1vyj0hp3h3f1bfys46msia90bh"))))
10016 (build-system ant-build-system)
10018 `(#:jar-name "java-snakeyaml.jar"
10019 #:source-dir "src/main/java"
10020 ;; Tests require velocity, a cyclic dependency, and
10021 ;; java-spring-framework-context which is not packaged.
10023 (home-page "https://bitbucket.org/asomov/snakeyaml")
10024 (synopsis "YAML processor")
10025 (description "SnakeYAML is a YAML processor for the Java Virtual Machine.")
10026 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
10028 (define-public java-fasterxml-jackson-dataformat-yaml
10030 (name "java-fasterxml-jackson-dataformat-yaml")
10034 (uri (string-append "https://github.com/FasterXML/"
10035 "jackson-dataformats-text/archive/"
10036 "jackson-dataformats-text-" version ".tar.gz"))
10039 "1hikl06khaxbg439avf442qifcadap8w0lx13f0nnhp2vh3dkbz7"))))
10040 (build-system ant-build-system)
10042 `(#:jar-name "jackson-dataformat-yaml.jar"
10043 #:source-dir "yaml/src/main/java"
10044 #:test-dir "yaml/src/test"
10045 #:test-exclude (list "**/failing/**.java")
10047 (modify-phases %standard-phases
10048 (add-before 'configure 'generate-PackageVersion.java
10050 (let* ((out "yaml/src/main/java/com/fasterxml/jackson/dataformat/yaml/PackageVersion.java")
10051 (in (string-append out ".in")))
10054 (("@package@") "com.fasterxml.jackson.dataformat.yaml")
10055 (("@projectversion@") ,version)
10056 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.yaml")
10057 (("@projectartifactid@") "jackson-dataformat-yaml")))
10060 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
10061 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
10062 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)
10063 ("java-snakeyaml" ,java-snakeyaml)))
10065 `(("junit" ,java-junit)
10066 ("hamcrest" ,java-hamcrest-core)
10067 ("java-ops4j-pax-exam-core-spi" ,java-ops4j-pax-exam-core-spi)
10068 ("java-ops4j-pax-exam-core-junit" ,java-ops4j-pax-exam-core-junit)
10069 ("java-ops4j-pax-exam" ,java-ops4j-pax-exam-core)))
10070 (home-page "https://github.com/FasterXML/jackson-dataformats-text")
10071 (synopsis "Yaml backend for Jackson")
10072 (description "Dataformat backends are used to support format alternatives
10073 to JSON, supported by default. This is done by sub-classing Jackson core
10075 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
10077 (define-public java-stax2-api
10079 (name "java-stax2-api")
10083 (uri (string-append "https://github.com/FasterXML/stax2-api/archive/"
10084 "stax2-api-" version ".tar.gz"))
10087 "1amc1si0l0hyyw2sawmnzy4hkna3z6fp195y4nm5m9wb9ld5awkq"))))
10088 (build-system ant-build-system)
10090 `(#:jar-name "java-stax2-api.jar"
10091 #:source-dir "src/main/java"
10092 #:tests? #f)); no tests
10093 (home-page "https://github.com/FasterXML/stax2-api")
10094 (synopsis "Stax2 API")
10095 (description "Stax2 API is an extension to basic Stax 1.0 API that adds
10096 significant new functionalities, such as full-featured bi-direction validation
10097 interface and high-performance Typed Access API.")
10098 (license license:bsd-2)))
10100 (define-public java-woodstox-core
10102 (name "java-woodstox-core")
10106 (uri (git-reference
10107 (url "https://github.com/FasterXML/woodstox")
10108 (commit (string-append "woodstox-core-" version))))
10109 (file-name (git-file-name name version))
10112 "0bfylk24a967hwxprxqbg6cdvm6n4ldcarp54yg980viwvjiglyp"))))
10113 (build-system ant-build-system)
10115 `(#:jar-name "woodstox.jar"
10117 (list "**/Base*.java" "failing/**")
10119 (modify-phases %standard-phases
10120 (add-before 'build 'remove-msv-dep
10122 ;; we don't need osgi, and it depends on msv
10123 (delete-file-recursively "src/main/java/com/ctc/wstx/osgi")
10124 ;; msv's latest release is from 2011 and we don't need it
10125 (delete-file-recursively "src/main/java/com/ctc/wstx/msv")
10126 (delete-file-recursively "src/test/java/wstxtest/osgi")
10127 (delete-file-recursively "src/test/java/wstxtest/msv")
10129 (add-before 'build 'copy-resources
10131 (copy-recursively "src/main/resources" "build/classes")
10134 `(("stax2" ,java-stax2-api)))
10136 `(("junit" ,java-junit)))
10137 (home-page "https://github.com/FasterXML/woodstox")
10138 (synopsis "Stax XML API implementation")
10139 (description "Woodstox is a stax XML API implementation.")
10140 (license license:asl2.0)))
10142 (define-public java-fasterxml-jackson-dataformat-xml
10144 (name "java-fasterxml-jackson-dataformat-xml")
10148 (uri (git-reference
10149 (url "https://github.com/FasterXML/jackson-dataformat-xml")
10150 (commit (string-append "jackson-dataformat-xml-" version))))
10151 (file-name (git-file-name name version))
10154 "0s1wl65mbs57c2hz2v8rnh8i04y5lpyyvnjz562j5j6b83vwwpfx"))))
10155 (build-system ant-build-system)
10157 `(#:jar-name "jackson-dataformat-xml.jar"
10158 #:source-dir "src/main/java"
10160 (list "**/failing/**")
10162 (modify-phases %standard-phases
10163 (add-before 'configure 'generate-PackageVersion.java
10165 (let* ((out "src/main/java/com/fasterxml/jackson/dataformat/xml/PackageVersion.java")
10166 (in (string-append out ".in")))
10170 (("@package@") "com.fasterxml.jackson.dataformat.xml")
10171 (("@projectversion@") ,version)
10172 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.xml")
10173 (("@projectartifactid@") "jackson-dataformat-xml")))
10175 (add-before 'build 'copy-resources
10177 (copy-recursively "src/main/resources" "build/classes")
10180 `(("jackson-annotations" ,java-fasterxml-jackson-annotations)
10181 ("jackson-core" ,java-fasterxml-jackson-core)
10182 ("jackson-modules-base-jaxb" ,java-fasterxml-jackson-modules-base-jaxb)
10183 ("jackson-databind" ,java-fasterxml-jackson-databind)
10184 ("stax2-api" ,java-stax2-api)
10185 ("woodstox" ,java-woodstox-core)))
10187 `(("junit" ,java-junit)
10188 ("hamcrest" ,java-hamcrest-core)))
10189 (home-page "https://github.com/FasterXML/jackson-dataformat-xml")
10190 (synopsis "Read and write XML")
10191 (description "This package contains Jackson extension component for reading
10192 and writing XML encoded data.
10194 Further, the goal is to emulate how JAXB data-binding works with \"Code-first\"
10195 approach (that is, no support is added for \"Schema-first\" approach). Support
10196 for JAXB annotations is provided by JAXB annotation module; this module
10197 provides low-level abstractions (@code{JsonParser}, @code{JsonGenerator},
10198 @code{JsonFactory}) as well as small number of higher level overrides needed to
10199 make data-binding work.")
10200 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
10202 (define-public java-hdrhistogram
10204 (name "java-hdrhistogram")
10208 (uri (git-reference
10209 (url "https://github.com/HdrHistogram/HdrHistogram")
10210 (commit (string-append "HdrHistogram-" version))))
10211 (file-name (git-file-name name version))
10214 "1cw8aa1vk258k42xs6wpy72m4gbai540jq032qsa7c5586iawx2d"))))
10215 (build-system ant-build-system)
10217 `(#:jar-name "java-hdrhistogram.jar"
10218 #:source-dir "src/main/java"
10220 (modify-phases %standard-phases
10221 (add-after 'unpack 'make-files-writable
10223 (for-each make-file-writable (find-files "."))
10225 (add-before 'configure 'set-version
10227 (let* ((version-java "src/main/java/org/HdrHistogram/Version.java")
10228 (template (string-append version-java ".template")))
10229 (copy-file template version-java)
10230 (substitute* version-java
10231 (("\\$VERSION\\$") ,version)
10232 (("\\$BUILD_TIME\\$") "0"))
10235 `(("junit" ,java-junit)
10236 ("hamcrest" ,java-hamcrest-core)))
10237 (home-page "https://hdrhistogram.github.io/HdrHistogram")
10238 (synopsis "High dynamic range histogram")
10239 (description "Hdrhistogram creates histograms that support
10240 recording and analyzing sampled data value counts across a configurable integer
10241 value range with configurable value precision within the range. Value precision
10242 is expressed as the number of significant digits in the value recording, and
10243 provides control over value quantization behavior across the value range and
10244 the subsequent value resolution at any given level.")
10245 (license license:public-domain)))
10247 (define-public java-cofoja
10249 (name "java-cofoja")
10253 (uri (git-reference
10254 (url "https://github.com/nhatminhle/cofoja")
10255 (commit (string-append "v" version))))
10256 (file-name (string-append "java-cofoja-" version "-checkout"))
10259 "0p7sz8y5xgpi5rx1qwn6587fkd52qr3ha3ybh14gqcyxhikl525w"))))
10260 (build-system ant-build-system)
10262 `(#:build-target "dist"
10263 #:test-target "test"
10266 (list "-Ddist.dir=dist")
10267 #:modules ((guix build ant-build-system)
10268 (guix build java-utils)
10273 (modify-phases %standard-phases
10274 ;; The bulid system ignores the class path the ant-build-system sets
10275 ;; up and instead expects to find all dependencies in the "lib"
10277 (add-after 'unpack 'create-libdir
10278 (lambda* (#:key inputs #:allow-other-keys)
10282 (let ((target (string-append "lib/" (basename file))))
10283 (unless (file-exists? target)
10284 (symlink file target))))
10285 (append-map (match-lambda
10287 (find-files dir "\\.jar$")))
10290 (replace 'install (install-jars "dist")))))
10292 `(("java-asm" ,java-asm)))
10294 `(("java-junit" ,java-junit)))
10295 (home-page "https://github.com/nhatminhle/cofoja")
10296 (synopsis "Contracts for Java")
10297 (description "Contracts for Java, or Cofoja for short, is a contract
10298 programming framework and test tool for Java, which uses annotation processing
10299 and bytecode instrumentation to provide run-time checking. (In particular,
10300 this is not a static analysis tool.)")
10301 (license license:lgpl3+)))
10303 (define-public java-aopalliance
10305 (name "java-aopalliance")
10309 ;; Note: this git repository is not official, but contains the
10310 ;; source code that is in the CVS repository. Downloading the
10311 ;; tarball from sourceforge is undeterministic, and the cvs download
10313 (uri (git-reference
10314 (url "https://github.com/hoverruan/aopalliance")
10315 (commit "0d7757ae204e5876f69431421fe9bc2a4f01e8a0")))
10316 (file-name (string-append name "-" version))
10319 "0rsg2b0v3hxlq2yk1i3m2gw3xwq689j3cwx9wbxvqfpdcjbca0qr"))))
10320 (build-system ant-build-system)
10322 `(#:jar-name "java-aopalliance.jar"
10324 #:tests? #f; no tests
10325 #:source-dir "aopalliance/src/main"
10326 #:modules ((guix build ant-build-system)
10328 (guix build maven pom)
10329 (guix build java-utils)
10332 (modify-phases %standard-phases
10333 (add-before 'install 'create-pom
10335 (with-output-to-file "pom.xml"
10339 (modelVersion "4.0.0")
10340 (name "aopalliance")
10341 (groupId "aopalliance")
10342 (artifactId "aopalliance")
10343 (version "1.0"))))))
10346 (install-from-pom "pom.xml")))))
10347 (home-page "http://aopalliance.sourceforge.net")
10348 (synopsis "Aspect-Oriented Programming")
10349 (description "The AOP Alliance project is a joint project between several
10350 software engineering people who are interested in Aspect-Oriented Programming
10352 (license license:public-domain)))
10354 (define-public java-javax-inject
10356 (name "java-javax-inject")
10360 (uri (git-reference
10361 (url "https://github.com/javax-inject/javax-inject")
10363 (file-name (git-file-name name version))
10366 "1rspl0nkvk1jif6nccikw93xic6ljj2b6kpy2mffwi2mnvc13j7x"))))
10367 (build-system ant-build-system)
10369 `(#:jar-name "java-javax-inject.jar"
10370 #:tests? #f; no tests
10372 (modify-phases %standard-phases
10374 (install-from-pom "pom.xml")))))
10375 (home-page "https://github.com/javax-inject/javax-inject")
10376 (synopsis "JSR-330: Dependency Injection for Java")
10377 (description "This package specifies a means for obtaining objects in such
10378 a way as to maximize reusability, testability and maintainability compared to
10379 traditional approaches such as constructors, factories, and service locators
10380 (e.g., JNDI). This process, known as dependency injection, is beneficial to
10381 most nontrivial applications.
10383 Many types depend on other types. For example, a @var{Stopwatch} might depend
10384 on a @var{TimeSource}. The types on which a type depends are known as its
10385 dependencies. The process of finding an instance of a dependency to use at run
10386 time is known as resolving the dependency. If no such instance can be found,
10387 the dependency is said to be unsatisfied, and the application is broken.")
10388 (license license:asl2.0)))
10390 (define-public java-guice
10392 (name "java-guice")
10396 (uri (git-reference
10397 (url "https://github.com/google/guice")
10399 (file-name (git-file-name name version))
10400 (modules '((guix build utils)))
10403 (for-each delete-file (find-files "." ".*.jar")) #t))
10406 "18im5hdfl4q1b9chww2s1ii60sn3ydyyar32a2sf2p2g8zlbdswq"))))
10407 (build-system ant-build-system)
10409 `(#:jar-name "java-guice.jar"
10411 #:tests? #f; FIXME: tests are not in a java sub directory
10412 #:source-dir "core/src"
10414 (modify-phases %standard-phases
10415 (add-after 'unpack 'make-files-writable
10417 (for-each make-file-writable (find-files "."))
10420 (install-from-pom "core/pom.xml")))))
10422 `(("java-aopalliance" ,java-aopalliance)
10423 ("java-asm" ,java-asm)
10424 ("java-cglib" ,java-cglib)
10425 ("java-guava" ,java-guava)
10426 ("java-javax-inject" ,java-javax-inject)
10427 ("java-guice-parent-pom" ,java-guice-parent-pom)))
10428 (home-page "https://github.com/google/guice")
10429 (synopsis "Lightweight dependency injection framework")
10430 (description "Guice is a lightweight dependency injection framework for
10431 Java 6 and above.")
10432 (license license:asl2.0)))
10434 (define-public java-guice-servlet
10436 (inherit java-guice)
10437 (name "java-guice-servlet")
10439 `(#:jar-name "guice-servlet.jar"
10440 #:source-dir "extensions/servlet/src/"
10442 #:tests? #f ; FIXME: not in a java subdir
10444 (modify-phases %standard-phases
10445 (add-after 'unpack 'make-files-writable
10447 (for-each make-file-writable (find-files "."))
10450 `(("guice" ,java-guice)
10451 ("servlet" ,java-classpathx-servletapi)
10452 ,@(package-inputs java-guice)))))
10454 (define java-guice-parent-pom
10456 (inherit java-guice)
10457 (name "java-guice-parent-pom")
10461 (modify-phases %standard-phases
10462 (delete 'configure)
10464 (add-after 'install 'install-extensions
10465 (install-pom-file "extensions/pom.xml"))
10467 (install-pom-file "pom.xml")))))
10469 `(("java-google-parent-pom" ,java-google-parent-pom-5)))))
10471 (define java-google-parent-pom-5
10473 (name "java-google-parent-pom")
10477 (uri (git-reference
10478 (url "https://github.com/google/google-maven-parents")
10479 (commit (string-append "google-" version))))
10480 (file-name (git-file-name name version))
10483 "0zb7hx24p8k8rfdvix2vsbfqn73jhrycdndvhf8j5gbii9wbqibv"))))
10484 (build-system ant-build-system)
10488 (modify-phases %standard-phases
10489 (delete 'configure)
10492 (install-pom-file "pom.xml")))))
10493 (home-page "https://github.com/google/google-maven-parents")
10494 (synopsis "Google parent pom")
10495 (description "This package contains the Maven parent POM for other Google
10497 (license license:asl2.0)))
10499 (define-public java-assertj
10501 (name "java-assertj")
10505 (uri (git-reference
10506 (url "https://github.com/joel-costigliola/assertj-core")
10507 (commit (string-append "assertj-core-" version))))
10508 (file-name (git-file-name name version))
10511 "1k35cg2in7pzk4pbdjryr0pll5lgk1r6ngrn0j8cdlgi7w8zh2d1"))))
10512 (build-system ant-build-system)
10514 `(#:jar-name "java-assertj.jar"
10516 #:source-dir "src/main/java"
10517 #:tests? #f)); depends on tng-junit which depends on assertj
10519 `(("cglib" ,java-cglib)
10520 ("junit" ,java-junit)
10521 ("hamcrest" ,java-hamcrest-core)))
10523 `(("mockito" ,java-mockito-1)))
10524 (home-page "https://joel-costigliola.github.io/assertj/index.html")
10525 (synopsis "Fluent assertions for java")
10526 (description "AssertJ core is a Java library that provides a fluent
10527 interface for writing assertions. Its main goal is to improve test code
10528 readability and make maintenance of tests easier.")
10529 (license license:asl2.0)))
10531 (define-public java-jboss-javassist
10533 (name "java-jboss-javassist")
10537 (uri (git-reference
10538 (url "https://github.com/jboss-javassist/javassist")
10540 (string-append "rel_"
10542 (lambda (x) (if (eq? x #\.) #\_ x)) version)
10544 (file-name (git-file-name name version))
10547 "0h3zlcyqiaq01fspm69h7vki67raw305w89p4ha8vlhpzw02qifm"))
10548 (modules '((guix build utils)))
10551 (delete-file "javassist.jar")))))
10552 (build-system ant-build-system)
10554 `(#:jar-name "java-jboss-javassist.jar"
10556 #:source-dir "src/main"
10557 #:tests? #f; FIXME: requires junit-awtui and junit-swingui from junit3
10559 (modify-phases %standard-phases
10560 (add-after 'unpack 'make-files-writable
10562 (for-each make-file-writable (find-files "."))
10565 `(("junit" ,java-junit)))
10566 (home-page "https://github.com/jboss-javassist/javassist")
10567 (synopsis "Java bytecode engineering toolkit")
10568 (description "Javassist (JAVA programming ASSISTant) makes Java bytecode
10569 manipulation simple. It is a class library for editing bytecodes in Java; it
10570 enables Java programs to define a new class at runtime and to modify a class
10571 file when the JVM loads it.")
10572 (license (list license:gpl2 license:cddl1.0)))); either gpl2 only or cddl.
10574 (define-public java-jcommander
10576 (name "java-jcommander")
10580 (uri (git-reference
10581 (url "https://github.com/cbeust/jcommander")
10583 (file-name (git-file-name name version))
10586 "12vcpc19sd7jhvjgp7xz1qjanfix162xb3x2q5zah93rjklj1h57"))))
10587 (build-system ant-build-system)
10589 `(#:jar-name "java-jcommander.jar"
10591 #:tests? #f; requires testng which depends on jcommander
10592 #:source-dir "src/main/java"))
10593 (home-page "https://jcommander.org")
10594 (synopsis "Command line parameters parser")
10595 (description "JCommander is a very small Java framework that makes it
10596 trivial to parse command line parameters. Parameters are declared with
10598 (license license:asl2.0)))
10600 (define-public java-bsh
10606 (uri (git-reference
10607 (url "https://github.com/beanshell/beanshell")
10609 (file-name (git-file-name name version))
10612 "0kz3f0xjack6c9syssi4qjw1rbd3q5963sk5pmr143hiibxa9csw"))
10613 (modules '((guix build utils)))
10616 ;; Delete bundled third-party jar archives.
10617 (for-each delete-file (find-files "." ".*.jar$"))
10618 (for-each (lambda (file) (chmod file #o644))
10619 (find-files "." "."))
10621 (build-system ant-build-system)
10623 `(#:build-target "jarall"
10624 #:test-target "junit-tests-all"
10625 #:make-flags (list "-DDATE" "(no date for reproducibility)")
10627 (modify-phases %standard-phases
10628 (add-before 'install 'fix-pom
10630 (substitute* "pom.xml"
10631 (("org.apache-extras.beanshell") "org.beanshell"))
10634 (install-from-pom "pom.xml")))))
10636 `(("java-classpathx-servletapi" ,java-classpathx-servletapi)
10637 ("java-commons-bsf" ,java-commons-bsf)))
10639 `(("java-junit" ,java-junit)
10640 ("javacc" ,javacc-3)))
10641 (home-page "http://beanshell.org/")
10642 (synopsis "Lightweight Scripting for Java")
10643 (description "BeanShell is a small, free, embeddable Java source
10644 interpreter with object scripting language features, written in Java.
10645 BeanShell dynamically executes standard Java syntax and extends it with common
10646 scripting conveniences such as loose types, commands, and method closures like
10647 those in Perl and JavaScript.")
10648 (license license:asl2.0)))
10650 (define-public java-fest-util
10652 (name "java-fest-util")
10656 (uri (git-reference
10657 (url "https://github.com/alexruiz/fest-util/")
10658 (commit (string-append "fest-util-" version))))
10659 (file-name (git-file-name name version))
10662 "02kgal7v85snyyvcsxvn4qphid455f4smh2wri1il8d9asw0djbz"))))
10663 (build-system ant-build-system)
10665 `(#:jar-name "java-fest-util.jar"
10666 #:source-dir "src/main/java"))
10668 `(("junit" ,java-junit)
10669 ("hamcrest" ,java-hamcrest-core)))
10670 (home-page "https://github.com/alexruiz/fest-util")
10671 (synopsis "FEST common utilities")
10672 (description "Common utilities used in all FEST module.")
10673 (license license:asl2.0)))
10675 (define-public java-fest-test
10677 (name "java-fest-test")
10681 (uri (git-reference
10682 (url "https://github.com/alexruiz/fest-test/")
10683 (commit (string-append "fest-test-" version))))
10684 (file-name (git-file-name name version))
10687 "0mg1d2jfh7kbx2c40dchbjr6d8pv59snsyb13mfxsr7xk5n69qbn"))))
10688 (build-system ant-build-system)
10690 `(#:jar-name "java-fest-test.jar"
10691 #:source-dir "src/main/java"
10692 #:tests? #f)); no tests
10694 `(("junit" ,java-junit)))
10695 (home-page "https://github.com/alexruiz/fest-test")
10696 (synopsis "Common FEST testing infrastructure")
10697 (description "Fest-test contains the common FEST testing infrastructure.")
10698 (license license:asl2.0)))
10700 (define-public java-fest-assert
10702 (name "java-fest-assert")
10706 (uri (git-reference
10707 (url "https://github.com/alexruiz/fest-assert-2.x/")
10708 (commit (string-append "fest-assert-core-" version))))
10709 (file-name (git-file-name name version))
10712 "1cp8zzyag3s85fz2w68sda9zzaal1y5f9wl8g72wkm12an40w6by"))))
10713 (build-system ant-build-system)
10715 `(#:jar-name "java-fest-assert.jar"
10716 #:source-dir "src/main/java"
10719 "**/Abstract*.java"
10720 "**/*BaseTest.java"
10721 ;; Unable to set MockitoNamingPolicy on cglib generator which creates FastClasses
10722 "**/MessageFormatter_format_Test.java"
10723 "**/internal/*/*_assert*_Test.java")))
10725 `(("java-fest-util" ,java-fest-util)))
10727 `(("java-junit" ,java-junit)
10728 ("java-fest-test" ,java-fest-test)
10729 ("java-hamcrest-core" ,java-hamcrest-core)
10730 ("java-mockito" ,java-mockito-1)
10731 ("java-cglib" ,java-cglib)
10732 ("java-objenesis" ,java-objenesis)
10733 ("java-asm" ,java-asm)))
10734 (home-page "https://github.com/alexruiz/fest-assert-2.x")
10735 (synopsis "FEST fluent assertions")
10736 (description "FEST-Assert provides a fluent interface for assertions.")
10737 (license license:asl2.0)))
10739 (define-public java-testng
10741 (name "java-testng")
10745 (uri (git-reference
10746 (url "https://github.com/cbeust/testng")
10748 (file-name (string-append name "-" version "-checkout"))
10751 "0y6vq30i5g276kw0v2bhbvci22ijg7ax49ap2611yqlhbs4d6dqv"))))
10752 (build-system ant-build-system)
10754 `(#:jdk ,icedtea-8; java.util.function
10755 #:jar-name "java-testng.jar"
10756 #:source-dir "src/main/java"
10758 (modify-phases %standard-phases
10759 ;; FIXME: I don't know why these tests fail
10760 (add-after 'unpack 'delete-failing-tests
10762 (substitute* "src/test/resources/testng.xml"
10763 (("<class name=\"test.configuration.github1625.TestRunnerIssue1625\"/>") "")
10764 (("<class name=\"test.serviceloader.ServiceLoaderTest\" />") ""))
10766 ;; We don't have groovy
10767 (add-after 'unpack 'delete-groovy-tests
10769 (delete-file-recursively "src/test/java/test/dependent/issue1648/")
10770 (substitute* "src/test/resources/testng.xml"
10771 (("<class name=\"test.dependent.issue1648.TestRunner\"/>") ""))
10773 (add-before 'build 'copy-resources
10775 (copy-recursively "src/main/resources" "build/classes")
10777 (add-before 'check 'copy-test-resources
10779 (copy-recursively "src/test/resources" "build/test-classes")
10783 (invoke "ant" "compile-tests")
10784 ;; we don't have groovy
10785 (substitute* "src/test/resources/testng.xml"
10786 (("<class name=\"test.groovy.GroovyTest\" />") ""))
10787 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
10789 ":build/test-classes")
10790 "-Dtest.resources.dir=src/test/resources"
10791 "org.testng.TestNG" "src/test/resources/testng.xml"))))))
10793 `(("junit" ,java-junit)
10794 ("java-jsr305" ,java-jsr305)
10795 ("java-bsh" ,java-bsh)
10796 ("java-jcommander" ,java-jcommander)
10797 ("java-guice" ,java-guice)
10798 ("snakeyaml" ,java-snakeyaml)))
10800 `(("guava" ,java-guava)
10801 ("java-javax-inject" ,java-javax-inject)
10802 ("java-hamcrest" ,java-hamcrest-all)
10803 ("java-assertj" ,java-assertj)
10804 ("java-mockito" ,java-mockito-1)
10805 ("cglib" ,java-cglib)
10807 ("aopalliance" ,java-aopalliance)))
10808 (home-page "https://testng.org")
10809 (synopsis "Testing framework")
10810 (description "TestNG is a testing framework inspired from JUnit and NUnit
10811 but introducing some new functionalities that make it more powerful and easier
10813 (license license:asl2.0)))
10815 (define-public java-jnacl
10816 (let ((commit "094e819afdd63ea81a499b3bcb42a271006bebd9")
10819 (name "java-jnacl")
10820 (version (string-append "0.1.0-" revision "." (string-take commit 7)))
10823 (uri (git-reference
10824 (url "https://github.com/neilalexander/jnacl")
10826 (file-name (git-file-name name version))
10829 "1d6g6xhn83byv5943n7935wwjsk0ibk0qdvqgr699qqgqqmwisbb"))))
10830 (build-system ant-build-system)
10832 `(#:jar-name "jnacl.jar"
10833 #:source-dir "src/main/java"
10836 (modify-phases %standard-phases
10837 (add-before 'build 'fix-tests
10839 (substitute* '("src/test/java/com/neilalexander/jnacl/NaClTest.java"
10840 "src/test/java/com/neilalexander/jnacl/NaclSecretBoxTest.java")
10841 (("assertions.Assertions") "assertions.api.Assertions"))
10845 (invoke "ant" "compile-tests")
10846 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
10848 ":build/test-classes")
10849 "org.testng.TestNG" "-testclass"
10850 "build/test-classes/com/neilalexander/jnacl/NaclSecretBoxTest.class")
10851 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
10853 ":build/test-classes")
10854 "org.testng.TestNG" "-testclass"
10855 "build/test-classes/com/neilalexander/jnacl/NaClTest.class"))))))
10857 `(("java-testng" ,java-testng)
10858 ("java-fest-util" ,java-fest-util)
10859 ("java-fest-assert" ,java-fest-assert)))
10860 (home-page "https://github.com/neilalexander/jnacl")
10861 (synopsis "Java implementation of NaCl")
10862 (description "Pure Java implementation of the NaCl: Networking and
10863 Cryptography library.")
10864 (license license:bsd-2))))
10866 (define-public java-mvel2
10868 (name "java-mvel2")
10872 (uri (string-append "https://github.com/mvel/mvel/archive/mvel2-"
10873 version ".Final.tar.gz"))
10876 "01ph5s9gm16l2qz58lg21w6fna7xmmrj7f9bzqr1jim7h9557d3z"))))
10877 (build-system ant-build-system)
10879 `(#:jar-name "mvel2.jar"
10880 #:source-dir "src/main/java"
10882 (list "**/Abstract*.java"
10883 ;; Base class with no tests
10884 "**/MVELThreadTest.java")
10886 (modify-phases %standard-phases
10887 (add-after 'install 'install-bin
10888 (lambda* (#:key outputs #:allow-other-keys)
10889 (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
10891 (with-output-to-file (string-append bin "/mvel2")
10895 "#!" (which "bash") "\n"
10896 "if [ \"$#\" -ne \"2\" ]; then\n"
10897 "echo 'Usage: mvel2 <script> <out.dir>'\n"
10900 "java -Dout.dir=$2 -cp " (getenv "CLASSPATH")
10901 ":" (assoc-ref outputs "out") "/share/java/mvel2.jar"
10902 " org.mvel2.sh.Main $1"))))
10903 (chmod (string-append bin "/mvel2") #o755))
10906 `(("junit" ,java-junit)
10907 ("hamcrest" ,java-hamcrest-core)))
10908 (home-page "https://github.com/mvel/mvel")
10909 (synopsis "MVFLEX Expression Language")
10910 (description "MVEL has largely been inspired by Java syntax, but has some
10911 fundamental differences aimed at making it more efficient as an expression
10912 language, such as operators that directly support collection, array and string
10913 matching, as well as regular expressions. MVEL is used to evaluate expressions
10914 written using Java syntax.
10916 In addition to the expression language, MVEL serves as a templating language for
10917 configuration and string construction.")
10918 (license license:asl2.0)))
10920 (define-public java-commons-jexl-2
10922 (name "java-commons-jexl")
10926 (uri (string-append "mirror://apache/commons/jexl/source/"
10927 "commons-jexl-" version "-src.tar.gz"))
10930 "1ai7632bwwaxglb0nbpblpr2jw5g20afrsaq372ipkphi3ncy1jz"))))
10931 (build-system ant-build-system)
10933 `(#:jar-name "commons-jexl-2.jar"
10935 #:source-dir "src/main/java"
10937 (modify-phases %standard-phases
10938 (add-before 'check 'disable-broken-tests
10939 (lambda* (#:key inputs #:allow-other-keys)
10940 (with-directory-excursion "src/test/java/org/apache/commons/jexl2/"
10941 (substitute* "ArithmeticTest.java"
10942 (("asserter.assertExpression\\(\"3 / 0\"") "//")
10943 (("asserter.assertExpression\\(\"imanull") "//"))
10944 ;; This test fails with "ambiguous method invocation"
10945 (delete-file "CacheTest.java")
10946 ;; This test doesn't have access to the temp directory
10947 (substitute* "ClassCreatorTest.java"
10948 (("java.io.tmpdir") "user.dir"))
10949 ;; This test fails in trying to detect whether it can run.
10950 (substitute* "ClassCreator.java"
10951 (("boolean canRun =.*") "boolean canRun = false;\n"))
10952 ;; ...and these tests depend on it.
10953 (delete-file "scripting/JexlScriptEngineOptionalTest.java")
10954 (delete-file "scripting/JexlScriptEngineTest.java"))
10956 (add-before 'build 'run-javacc
10958 (with-directory-excursion "src/main/java/org/apache/commons/jexl2/parser/"
10959 (invoke "java" "jjtree" "Parser.jjt")
10960 (invoke "java" "javacc" "Parser.jj"))
10963 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)))
10965 `(("java-junit" ,java-junit)
10966 ("java-hamcrest-core" ,java-hamcrest-core)
10967 ("javacc" ,javacc-4)))
10968 (home-page "https://commons.apache.org/proper/commons-jexl/")
10969 (synopsis "Java Expression Language ")
10970 (description "JEXL is a library intended to facilitate the implementation
10971 of dynamic and scripting features in applications and frameworks written in
10972 Java. JEXL implements an Expression Language based on some extensions to the
10973 JSTL Expression Language supporting most of the constructs seen in
10974 shell-script or ECMAScript. Its goal is to expose scripting features usable
10975 by technical operatives or consultants working with enterprise platforms.")
10976 (license license:asl2.0)))
10978 (define-public java-lz4
10984 (uri (git-reference
10985 (url "https://github.com/lz4/lz4-java")
10987 (file-name (git-file-name name version))
10990 "0ydjakhv3cz34mfvv14qrh2ksdxifgjwwagjy7r46qr3f68hnf6y"))))
10991 (build-system ant-build-system)
10993 `(#:jar-name "lz4.jar"
10995 #:source-dir "src/java:src/java-unsafe"
10996 #:tests? #f; FIXME: requires more dependencies
10998 (modify-phases %standard-phases
10999 (add-after 'unpack 'make-files-writable
11001 (for-each make-file-writable (find-files "."))
11003 (add-before 'configure 'generate-source
11005 (with-directory-excursion "src/build/source_templates"
11006 (invoke "mvel2" "../gen_sources.mvel" "../../java"))
11009 `(("mvel" ,java-mvel2)))
11010 (home-page "https://jpountz.github.io/lz4-java")
11011 (synopsis "Compression algorithm")
11012 (description "LZ4 - Java is a Java port of the popular lz4 compression
11013 algorithms and xxHash hashing algorithm.")
11014 (license license:asl2.0)))
11016 (define-public java-bouncycastle
11018 (name "java-bouncycastle")
11022 (uri (git-reference
11023 (url "http://git.bouncycastle.org/repositories/bc-java")
11024 ;(url "https://github.com/bcgit/bc-java")
11025 (commit (string-append "r1rv" (substring version 2 4)))))
11026 (file-name (git-file-name name version))
11029 "1449q7fyh03s1q0bqljcrhgacwcyqmg2bbvb3z084avgapwsainz"))
11030 (modules '((guix build utils)))
11033 (for-each delete-file
11034 (find-files "." "\\.jar$"))
11036 (build-system ant-build-system)
11041 (modify-phases %standard-phases
11044 (invoke "ant" "-f" "ant/jdk15+.xml" "build-provider")
11045 (invoke "ant" "-f" "ant/jdk15+.xml" "build")))
11046 ;; FIXME: the tests freeze.
11049 ;; (invoke "ant" "-f" "ant/jdk15+.xml" "test")))
11051 (install-jars "build/artifacts/jdk1.5/jars")))))
11053 `(("java-javax-mail" ,java-javax-mail)))
11056 ("junit" ,java-junit)
11057 ("java-native-access" ,java-native-access)
11058 ("java-native-access-platform" ,java-native-access-platform)))
11059 (home-page "https://www.bouncycastle.org")
11060 (synopsis "Cryptographic library")
11061 (description "Bouncy Castle is a cryptographic library for the Java
11062 programming language.")
11063 (license license:expat)))
11065 (define-public java-lmax-disruptor
11067 (name "java-lmax-disruptor")
11071 (uri (string-append "https://github.com/LMAX-Exchange/disruptor/"
11072 "archive/" version ".tar.gz"))
11073 (file-name (string-append name "-" version ".tar.gz"))
11076 "17da2gwj5abnlsfgn2xqjk5lgzbg4vkb0hdv2dvc8r2fx4bi7w3g"))))
11077 (build-system ant-build-system)
11079 `(#:jar-name "java-lmax-disruptor.jar"
11081 #:tests? #f)); tests hang
11083 `(("junit" ,java-junit)
11084 ("java-hdrhistogram" ,java-hdrhistogram)
11085 ("java-jmock" ,java-jmock)
11086 ("java-jmock-legacy" ,java-jmock-legacy)
11087 ("java-jmock-junit4" ,java-jmock-junit4)
11088 ("java-hamcrest-all" ,java-hamcrest-all)))
11090 `(("cglib" ,java-cglib)
11091 ("objenesis" ,java-objenesis)
11092 ("asm" ,java-asm)))
11093 (home-page "https://www.lmax.com/disruptor")
11094 (synopsis "High performance inter-thread communication")
11095 (description "LMAX Disruptor is a software pattern and software component
11096 for high performance inter-thread communication that avoids the need for
11097 message queues or resource locking.")
11098 (license license:asl2.0)))
11100 (define-public java-commons-bcel
11102 (name "java-commons-bcel")
11106 (uri (string-append "mirror://apache/commons/bcel/source/bcel-"
11107 version "-src.tar.gz"))
11110 "0j3x1rxd673k07psclk8k13rqh0x0mf2yy5qiwkiw4z3afa568jy"))))
11111 (build-system ant-build-system)
11113 `(#:jar-name "bcel.jar"
11115 #:source-dir "src/main/java"
11116 #:test-dir "src/test/java"
11117 ;; FIXME: Tests require the unpackaged jna.
11119 (home-page "https://commons.apache.org/proper/commons-bcel/")
11120 (synopsis "Byte code engineering library")
11121 (description "The Byte Code Engineering Library (Apache Commons BCEL) is
11122 intended to give users a convenient way to analyze, create, and
11123 manipulate (binary) Java class files. Classes are represented by objects
11124 which contain all the symbolic information of the given class: methods, fields
11125 and byte code instructions, in particular.
11127 Such objects can be read from an existing file, be transformed by a
11128 program (e.g. a class loader at run-time) and written to a file again. An
11129 even more interesting application is the creation of classes from scratch at
11130 run-time. The @dfn{Byte Code Engineering Library} (BCEL) may be also useful
11131 if you want to learn about the @dfn{Java Virtual Machine} (JVM) and the format
11132 of Java @code{.class} files.")
11133 (license license:asl2.0)))
11135 (define-public java-xerial-core
11137 (name "java-xerial-core")
11141 (uri (string-append "https://github.com/xerial/xerial-java/archive/"
11142 version ".tar.gz"))
11143 (file-name (string-append name "-" version ".tar.gz"))
11146 "0d3g863i41bgalpa4xr3vm1h140l091n8iwgq5qvby5yivns9y8d"))))
11147 (build-system ant-build-system)
11149 `(#:jar-name "xerial-core.jar"
11150 #:source-dir "xerial-core/src/main/java"
11151 #:test-dir "xerial-core/src/test"
11153 (modify-phases %standard-phases
11154 (add-before 'build 'copy-resources
11156 (copy-recursively "xerial-core/src/main/resources"
11160 `(("junit" ,java-junit)
11161 ("hamcrest" ,java-hamcrest-core)))
11162 (home-page "https://github.com/xerial/xerial-java")
11163 (synopsis "Data management libraries for Java")
11164 (description "Xerial is a set of data management libraries for the Java
11165 programming language. The ultimate goal of the Xerial project is to manage
11166 everything as database, including class objects, text format data, data
11168 (license license:asl2.0)))
11170 (define-public java-powermock-reflect
11172 (name "java-powermock-reflect")
11176 (uri (string-append "https://github.com/powermock/powermock/"
11177 "archive/powermock-" version ".tar.gz"))
11178 (file-name (string-append name "-" version ".tar.gz"))
11181 "0sbgi5vqq7k72wzcdjb20s370vyd4hsbnx71pzb8ishml3gy7fwy"))
11183 (search-patches "java-powermock-fix-java-files.patch"))))
11184 (build-system ant-build-system)
11186 `(#:jar-name "java-powermock-reflect.jar"
11188 #:source-dir "powermock-reflect/src/main/java"
11189 #:test-dir "powermock-reflect/src/test"))
11191 `(("java-objenesis" ,java-objenesis)))
11193 `(("junit" ,java-junit)
11194 ("cglib" ,java-cglib)
11196 ("hamcrest" ,java-hamcrest-core)
11197 ("assertj" ,java-assertj)))
11198 (home-page "https://github.com/powermock/powermock")
11199 (synopsis "Mock library extension framework")
11200 (description "PowerMock is a framework that extends other mock libraries
11201 such as EasyMock with more powerful capabilities. PowerMock uses a custom
11202 classloader and bytecode manipulation to enable mocking of static methods,
11203 constructors, final classes and methods, private methods, removal of static
11204 initializers and more. By using a custom classloader no changes need to be
11205 done to the IDE or continuous integration servers which simplifies adoption.")
11206 (license license:asl2.0)))
11208 (define-public java-powermock-core
11210 (inherit java-powermock-reflect)
11211 (name "java-powermock-core")
11213 `(#:jar-name "java-powermock-core.jar"
11214 #:source-dir "powermock-core/src/main/java"
11215 #:test-dir "powermock-core/src/test"
11216 #:tests? #f; requires powermock-api
11219 (modify-phases %standard-phases
11220 (add-before 'build 'copy-resources
11222 (copy-recursively "powermock-core/src/main/resources"
11226 `(("reflect" ,java-powermock-reflect)
11227 ("javassist" ,java-jboss-javassist)))
11229 `(("junit" ,java-junit)
11230 ("assertj" ,java-assertj)
11231 ("mockito" ,java-mockito-1)))))
11233 (define-public java-powermock-api-support
11235 (inherit java-powermock-reflect)
11236 (name "java-powermock-api-support")
11237 (build-system ant-build-system)
11239 `(#:jar-name "java-powermock-api-support.jar"
11241 #:source-dir "powermock-api/powermock-api-support/src/main/java"
11242 #:tests? #f)); no tests
11244 `(("core" ,java-powermock-core)
11245 ("reflect" ,java-powermock-reflect)))))
11247 (define-public java-powermock-modules-junit4-common
11249 (inherit java-powermock-reflect)
11250 (name "java-powermock-modules-junit4-common")
11251 (build-system ant-build-system)
11253 `(#:jar-name "java-powermock-modules-junit4-common.jar"
11255 #:source-dir "powermock-modules/powermock-module-junit4-common/src/main/java"
11256 #:test-dir "powermock-modules/powermock-module-junit4-common/src/test"))
11258 `(("core" ,java-powermock-core)
11259 ("easymock" ,java-easymock)
11260 ("reflect" ,java-powermock-reflect)
11261 ("hamcrest" ,java-hamcrest-core)
11262 ("cglib" ,java-cglib)))))
11264 (define-public java-powermock-modules-junit4
11266 (inherit java-powermock-reflect)
11267 (name "java-powermock-modules-junit4")
11268 (build-system ant-build-system)
11270 `(#:jar-name "java-powermock-modules-junit4.jar"
11272 #:source-dir "powermock-modules/powermock-module-junit4/src/main/java"
11273 #:test-dir "powermock-modules/powermock-module-junit4/src/test"
11275 (modify-phases %standard-phases
11276 (add-before 'build 'fix-junit-detection
11278 ;; Our junit version is 4.12-SNAPSHOT
11279 (substitute* (find-files "powermock-modules/powermock-module-junit4"
11280 "PowerMockJUnit4MethodValidator.java")
11281 (("4.12") "4.12-SNAPSHOT"))
11284 `(("core" ,java-powermock-core)
11285 ("reflect" ,java-powermock-reflect)
11286 ("common" ,java-powermock-modules-junit4-common)
11287 ("cglib" ,java-cglib)))
11289 `(("easymock" ,java-easymock)
11290 ("hamcrest" ,java-hamcrest-core)
11291 ("objenesis" ,java-objenesis)
11293 ("junit" ,java-junit)))))
11295 (define-public java-powermock-api-easymock
11297 (inherit java-powermock-reflect)
11298 (name "java-powermock-api-easymock")
11299 (build-system ant-build-system)
11301 `(#:jar-name "java-powermock-api-easymock.jar"
11303 #:source-dir "powermock-api/powermock-api-easymock/src/main/java"
11304 #:tests? #f; no tests
11306 (modify-phases %standard-phases
11307 (add-before 'build 'fix-file
11309 ;; FIXME: This looks wrong, but it fixes a build error.
11310 (with-directory-excursion "powermock-api/powermock-api-easymock"
11311 (substitute* "src/main/java/org/powermock/api/easymock/PowerMock.java"
11312 (("classLoader instanceof MockClassLoader") "false")
11313 (("\\(\\(MockClassLoader\\) classLoader\\).*;") ";")))
11316 `(("core" ,java-powermock-core)
11317 ("easymock" ,java-easymock)
11318 ("reflect" ,java-powermock-reflect)
11319 ("support" ,java-powermock-api-support)
11320 ("cglib" ,java-cglib)))))
11322 (define-public java-jboss-jms-api-spec
11324 (name "java-jboss-jms-api-spec")
11328 (uri (string-append "https://github.com/jboss/jboss-jms-api_spec/"
11329 "archive/jboss-jms-api_" version
11330 "_spec-1.0.1.Final.tar.gz"))
11333 "07bqblw9kq2i8q92bz70fvavq5xjfkaixl8xa0m0cypjgy82rb7m"))))
11334 (build-system ant-build-system)
11336 `(#:jar-name "java-jboss-jms-api_spec.jar"
11339 #:tests? #f)); no tests
11340 (home-page "https://github.com/jboss/jboss-jms-api_spec")
11341 (synopsis "Java Message Service API specification")
11342 (description "Java Message Service (JMS) API is used to send messages
11343 messages between two or more clients. It is a messaging standard that allows
11344 application components to create, send, receive, and read messages.")
11345 ; either gpl2 only with GPL Classpath Exception, or cddl.
11346 (license (list license:gpl2 license:cddl1.0))))
11348 (define-public java-mail
11354 (uri (string-append "https://github.com/javaee/javamail/archive/"
11355 "JAVAMAIL-1_6_0.tar.gz"))
11358 "1b4rg7fpj50ld90a71iz2m4gm3f5cnw18p3q3rbrrryjip46kx92"))))
11359 (build-system ant-build-system)
11361 `(#:jar-name "java-mail.jar"
11363 #:source-dir "mail/src/main/java"
11364 #:test-dir "mail/src/test"
11366 (list "**/CollectorFormatterTest.java"
11367 "**/CompactFormatterTest.java"
11368 "**/DurationFilterTest.java"
11369 "**/MailHandlerTest.java"
11370 "**/GetLocalAddressTest.java"
11371 ;; FIXME: both end with:
11372 ;; java.lang.ClassNotFoundException:
11373 ;; javax.mail.internet.MimeMultipartParseTest
11374 "**/MimeMultipartParseTest.java"
11375 "**/SearchTermSerializationTest.java")
11377 (modify-phases %standard-phases
11378 (add-before 'configure 'move-version.java
11380 (copy-file "mail/src/main/resources/javax/mail/Version.java"
11381 "mail/src/main/java/javax/mail/Version.java")
11383 (add-before 'build 'copy-resources
11385 (copy-recursively "mail/src/main/resources/META-INF"
11386 "build/classes/META-INF")
11389 `(("junit" ,java-junit)
11390 ("hamcrest" ,java-hamcrest-core)))
11391 (home-page "https://javaee.github.io/javamail/")
11392 (synopsis "Mail-related functionality in Java")
11393 (description "The JavaMail API provides a platform-independent and
11394 protocol-independent framework to build mail and messaging applications.")
11395 ;; General Public License Version 2 only ("GPL") or the Common Development
11396 ;; and Distribution License("CDDL")
11397 (license (list license:cddl1.1
11398 license:gpl2)))); with classpath exception
11400 (define-public java-jeromq
11402 (name "java-jeromq")
11406 (uri (git-reference
11407 (url "https://github.com/zeromq/jeromq")
11408 (commit (string-append "v" version))))
11409 (file-name (string-append name "-" version "-checkout"))
11412 "1gxkp7lv2ahymgrqdw94ncq54bmp4m4sw5m1x9gkp7l5bxn0xsyj"))
11413 (patches (search-patches "java-jeromq-fix-tests.patch"))))
11414 (build-system ant-build-system)
11416 `(#:jar-name "java-jeromq.jar"
11417 #:source-dir "src/main/java"
11421 "**/Abstract*.java"
11422 ;; Requires network
11423 "**/ZBeaconTest.java"
11425 "**/DealerSpecTest.java"
11426 "**/CustomDecoderTest.java"
11427 "**/CustomEncoderTest.java"
11428 "**/ConnectRidTest.java"
11429 "**/ReqSpecTest.java"
11430 "**/PushPullSpecTest.java"
11431 "**/PubSubHwmTest.java"
11432 "**/RouterSpecTest.java"
11433 "**/ProxyTest.java")))
11435 `(("java-jnacl" ,java-jnacl)))
11437 `(("java-hamcrest-core" ,java-hamcrest-core)
11438 ("junit" ,java-junit)))
11439 (home-page "http://zeromq.org/bindings:java")
11440 (synopsis "Java binding for 0MQ")
11441 (description "Jeromq provides the java bindings for 0MQ.")
11442 (license license:mpl2.0)))
11444 (define-public java-kafka-clients
11446 (name "java-kafka-clients")
11450 (uri (string-append "mirror://apache/kafka/" version "/kafka-"
11451 version "-src.tgz"))
11454 "1yxmnsmliwm7671q5yy9bl4jdqyyn00n26cggz9brwczx80w1vfq"))))
11455 (build-system ant-build-system)
11457 `(#:jar-name "java-kafka-clients.jar"
11459 #:source-dir "clients/src/main/java"
11460 #:test-dir "clients/src/test"
11463 ;; This file does not contain a class
11464 "**/IntegrationTest.java"
11465 ;; Requires network
11466 "**/ClientUtilsTest.java"
11467 ;; End with errors that seem related to our powermock
11468 "**/KafkaProducerTest.java"
11469 "**/BufferPoolTest.java")))
11471 `(("java-slf4j-api" ,java-slf4j-api)
11472 ("java-lz4" ,java-lz4)))
11474 `(("junit" ,java-junit)
11475 ("hamcrest" ,java-hamcrest-all)
11476 ("objenesis" ,java-objenesis)
11478 ("cglib" ,java-cglib)
11479 ("javassist" ,java-jboss-javassist)
11480 ("snappy" ,java-snappy)
11481 ("easymock" ,java-easymock)
11482 ("powermock" ,java-powermock-core)
11483 ("powermock-easymock" ,java-powermock-api-easymock)
11484 ("powermock-junit4-common" ,java-powermock-modules-junit4-common)
11485 ("powermock-junit4" ,java-powermock-modules-junit4)
11486 ("powermock-support" ,java-powermock-api-support)
11487 ("java-bouncycastle" ,java-bouncycastle)))
11488 (home-page "https://kafka.apache.org")
11489 (synopsis "Distributed streaming platform")
11490 (description "Kafka is a distributed streaming platform, which means:
11492 @item it can publish and subscribe to streams of records;
11493 @item it can store streams of records in a fault-tolerant way;
11494 @item it can process streams of records as they occur.
11496 ;; Either cddl or gpl2 only.
11497 (license (list license:cddl1.1; actually cddl1.1
11498 license:gpl2)))); with classpath exception
11500 (define-public java-jdom
11506 (uri (string-append "http://jdom.org/dist/binary/archive/jdom-"
11507 version ".tar.gz"))
11510 "07wdpm3jwwc9q38kmdw40fvbmv6jzjrkrf8m0zqs58f79a672wfl"))))
11511 (build-system ant-build-system)
11513 `(#:build-target "package"
11514 #:tests? #f; tests are run as part of the build process
11516 (modify-phases %standard-phases
11518 (install-jars "build")))))
11519 (home-page "http://jdom.org/")
11520 (synopsis "Access, manipulate, and output XML data")
11521 (description "Java-based solution for accessing, manipulating, and
11522 outputting XML data from Java code.")
11523 (license license:bsd-4)))
11525 (define-public java-geronimo-xbean-reflect
11527 (name "java-geronimo-xbean-reflect")
11531 (uri (svn-reference
11532 (url "https://svn.apache.org/repos/asf/geronimo/xbean/tags/xbean-4.5/")
11533 (revision 1807396)))
11534 (file-name (string-append name "-" version))
11537 "18q3i6jgm6rkw8aysfgihgywrdc5nvijrwnslmi3ww497jvri6ja"))))
11538 (build-system ant-build-system)
11540 `(#:jar-name "geronimo-xbean-reflect.jar"
11541 #:source-dir "xbean-reflect/src/main/java"
11542 #:test-dir "xbean-reflect/src/test"
11545 (list "**/Abstract*.java" "**/AsmParameterNameLoaderTest.java"
11546 "**/ObjectRecipeTest.java" "**/ParameterNameLoaderTest.java"
11547 "**/RecipeHelperTest.java" "**/XbeanAsmParameterNameLoaderTest.java")
11549 (modify-phases %standard-phases
11550 (add-before 'build 'fix-source
11552 (let ((dir "xbean-reflect/src/main/java/org/apache/xbean/recipe/"))
11553 ;; org.apache.xbean.asm6 is actually repackaged java-asm
11554 (substitute* (string-append dir "XbeanAsmParameterNameLoader.java")
11555 (("org.apache.xbean.asm5") "org.objectweb.asm"))
11557 (replace 'install (install-from-pom "xbean-reflect/pom.xml")))))
11559 `(("asm" ,java-asm)
11560 ("log4j" ,java-log4j-api)
11561 ("log4j-1.2" ,java-log4j-1.2-api)
11562 ("log4j-core" ,java-log4j-core)
11563 ("logging" ,java-commons-logging-minimal)))
11565 `(("java-geronimo-parent-pom" ,java-geronimo-parent-pom)))
11567 `(("junit" ,java-junit)))
11568 (home-page "https://geronimo.apache.org/maven/xbean/3.6/xbean-reflect/")
11569 (synopsis "Dependency injection helper")
11570 (description "Xbean-reflect provides very flexible ways to create objects
11571 and graphs of objects for dependency injection frameworks")
11572 (license license:asl2.0)))
11574 (define java-geronimo-genesis-2.1
11576 (name "java-geronimo-genesis")
11580 (uri (svn-reference
11581 (url (string-append "https://svn.apache.org/repos/asf/"
11582 "geronimo/genesis/tags/genesis-"
11584 (revision 1807396)))
11585 (file-name (string-append name "-" version "-source"))
11588 "119yn795jvnjf52si84q192s8wag1k013iabg78b7wnadssnnh31"))))
11589 (build-system ant-build-system)
11593 (modify-phases %standard-phases
11594 (delete 'configure)
11597 (install-pom-file "pom.xml"))
11598 (add-after 'install 'install-enforcer-rules
11599 (install-pom-file "genesis-enforcer-rules/pom.xml"))
11600 (add-after 'install 'install-flava
11601 (install-pom-file "genesis-default-flava/pom.xml"))
11602 (add-after 'install 'install-packaging
11603 (install-pom-file "genesis-packaging/pom.xml"))
11604 (add-after 'install-flava 'install-flava-java4
11605 (install-pom-file "genesis-default-flava/genesis-java1.4-flava/pom.xml"))
11606 (add-after 'install-flava 'install-flava-java5
11607 (install-pom-file "genesis-default-flava/genesis-java5-flava/pom.xml"))
11608 (add-after 'install-flava 'install-flava-java6
11609 (install-pom-file "genesis-default-flava/genesis-java6-flava/pom.xml")))))
11611 `(("apache-parent-pom" ,apache-parent-pom-13)))
11612 (home-page "https://geronimo.apache.org")
11613 (synopsis "Collection of maven POM files for the Geronimo project")
11614 (description "Apache Geronimo is a server runtime. This package contains
11615 only pom files used by other components in the Geronimo project.")
11616 (license license:asl2.0)))
11618 (define java-geronimo-parent-pom
11620 (inherit java-geronimo-xbean-reflect)
11621 (name "java-geronimo-parent-pom")
11625 (modify-phases %standard-phases
11626 (delete 'configure)
11629 (install-pom-file "pom.xml")))))
11631 `(("java-geronimo-genesis" ,java-geronimo-genesis-2.1)))))
11633 (define-public java-geronimo-xbean-bundleutils
11635 (inherit java-geronimo-xbean-reflect)
11636 (name "java-geronimo-xbean-bundleutils")
11638 `(#:jar-name "geronimo-xbean-bundleutils.jar"
11639 #:source-dir "xbean-bundleutils/src/main/java"
11640 #:test-dir "xbean-bundleutils/src/test"
11642 (modify-phases %standard-phases
11643 (add-before 'build 'fix-java
11645 ;; We use a more recent version of osgi, so this file requires
11646 ;; more interface method implementations.
11647 (substitute* "xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/DelegatingBundleContext.java"
11648 (("import org.osgi.framework.ServiceRegistration;")
11649 "import org.osgi.framework.ServiceRegistration;
11650 import org.osgi.framework.ServiceFactory;
11651 import java.util.Collection;
11652 import org.osgi.framework.ServiceObjects;")
11653 (("public Bundle getBundle\\(\\)")
11655 public <S> ServiceObjects<S> getServiceObjects(ServiceReference<S> reference) {
11656 throw new UnsupportedOperationException();
11659 public <S> ServiceRegistration<S> registerService(Class<S> clazz,
11660 ServiceFactory<S> factory, Dictionary<String, ?> properties) {
11661 throw new UnsupportedOperationException();
11663 public Bundle getBundle()"))
11666 `(("java-slf4j" ,java-slf4j-api)
11667 ("java-asm" ,java-asm)
11668 ("java-osgi-framework" ,java-osgi-framework)
11669 ("java-eclipse-osgi" ,java-eclipse-osgi)
11670 ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin)))))
11672 (define-public java-geronimo-xbean-asm-util
11674 (inherit java-geronimo-xbean-reflect)
11675 (name "java-geronimo-xbean-asm-util")
11677 `(#:jar-name "geronimo-xbean-asm-util.jar"
11678 #:source-dir "xbean-asm-util/src/main/java"
11679 #:tests? #f)); no tests
11681 `(("java-asm" ,java-asm)))
11682 (native-inputs '())))
11684 (define-public java-geronimo-xbean-finder
11686 (inherit java-geronimo-xbean-reflect)
11687 (name "java-geronimo-xbean-finder")
11689 `(#:jar-name "geronimo-xbean-finder.jar"
11690 #:source-dir "xbean-finder/src/main/java"
11691 #:test-dir "xbean-finder/src/test"))
11693 `(("java-slf4j-api" ,java-slf4j-api)
11694 ("java-asm" ,java-asm)
11695 ("java-geronimo-xbean-bundleutils" ,java-geronimo-xbean-bundleutils)
11696 ("java-geronimo-xbean-asm-util" ,java-geronimo-xbean-asm-util)
11697 ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin)
11698 ("java-osgi-framework" ,java-osgi-framework)))
11700 `(("java-junit" ,java-junit)
11701 ("java-hamcrest-core" ,java-hamcrest-core)))))
11703 (define-public java-gson
11709 (uri (string-append "https://github.com/google/gson/archive/"
11710 "gson-parent-" version ".tar.gz"))
11713 "1j4qnp7v046q0k48c4kyf69sxaasx2h949d3cqwsm3kzxms3x0f9"))))
11714 (build-system ant-build-system)
11716 `(#:jar-name "gson.jar"
11717 #:source-dir "gson/src/main/java"
11718 #:test-dir "gson/src/test"))
11720 `(("java-junit" ,java-junit)
11721 ("java-hamcrest-core" ,java-hamcrest-core)))
11722 (home-page "https://github.com/google/gson")
11723 (synopsis "Java serialization/deserialization library from/to JSON")
11724 (description "Gson is a Java library that can be used to convert Java
11725 Objects into their JSON representation. It can also be used to convert a JSON
11726 string to an equivalent Java object. Gson can work with arbitrary Java objects
11727 including pre-existing objects that you do not have source-code of.")
11728 (license license:asl2.0)))
11730 (define-public java-hawtjni
11732 (name "java-hawtjni")
11736 (uri (string-append "https://github.com/fusesource/hawtjni/archive/"
11737 "hawtjni-project-" version ".tar.gz"))
11740 "1bqfd732rmh6svyx17fpw9175gc9gzkcbyps2yyrf50c3zzjas6g"))))
11741 (build-system ant-build-system)
11743 `(#:jar-name "hawtjni.jar"
11744 #:source-dir "hawtjni-generator/src/main/java:hawtjni-runtime/src/main/java"
11745 #:tests? #f; no tests
11747 (modify-phases %standard-phases
11748 (add-before 'build 'build-native
11749 (lambda* (#:key inputs #:allow-other-keys)
11750 (let ((include (string-append "-I" (assoc-ref inputs "jdk") "/include/linux")))
11751 (with-directory-excursion "hawtjni-generator/src/main/resources/"
11752 (invoke "gcc" "-c" "hawtjni.c" "-o" "hawtjni.o"
11753 "-fPIC" "-O2" include)
11754 (invoke "gcc" "-c" "hawtjni-callback.c" "-o" "hawtjni-callback.o"
11755 "-fPIC" "-O2" include)
11756 (invoke "gcc" "-o" "libhawtjni.so" "-shared"
11757 "hawtjni.o" "hawtjni-callback.o")))
11759 (add-after 'install 'install-native
11760 (lambda* (#:key outputs #:allow-other-keys)
11761 (let* ((out (assoc-ref outputs "out"))
11762 (lib (string-append out "/lib"))
11763 (inc (string-append out "/include")))
11764 (with-directory-excursion "hawtjni-generator/src/main/resources/"
11765 (install-file "libhawtjni.so" lib)
11766 (install-file "hawtjni.h" inc)))
11768 (add-before 'install 'install-parent
11769 (install-pom-file "pom.xml"))
11771 (install-from-pom "hawtjni-runtime/pom.xml")))))
11773 `(("java-commons-cli" ,java-commons-cli)
11774 ("java-asm" ,java-asm)
11775 ("java-geronimo-xbean-finder" ,java-geronimo-xbean-finder)))
11776 (home-page "https://fusesource.github.io/hawtjni/")
11777 (synopsis "JNI code generator")
11778 (description "HawtJNI is a code generator that produces the JNI code needed
11779 to implement Java native methods. It is based on the jnigen code generator
11780 that is part of the SWT Tools project.")
11781 (license license:asl2.0)))
11783 (define-public java-jansi-native
11785 (name "java-jansi-native")
11789 (uri (string-append "https://github.com/fusesource/jansi-native/"
11790 "archive/jansi-native-" version ".tar.gz"))
11793 "0j2ydlgxbzbgshqkwghbxxxnbnx1mmjgd6k5fw6xfvxw1z956yqf"))))
11794 (build-system ant-build-system)
11796 `(#:jar-name "jansi-native.jar"
11797 #:source-dir "src/main/java"
11798 #:tests? #f; no tests
11800 (modify-phases %standard-phases
11801 (add-before 'build 'build-native
11802 (lambda* (#:key inputs #:allow-other-keys)
11803 ;; there are more required files for windows in windows/
11804 (with-directory-excursion "src/main/native-package/src"
11805 (substitute* "jansi_ttyname.c"
11806 (("#include \"jansi_.*") ""))
11807 (invoke "gcc" "-c" "jansi_ttyname.c" "-o" "jansi_ttyname.o"
11808 (string-append "-I" (assoc-ref inputs "java-hawtjni")
11810 (string-append "-I" (assoc-ref inputs "jdk")
11813 (invoke "gcc" "-o" "libjansi.so" "-shared" "jansi_ttyname.o"))))
11814 (add-before 'build 'install-native
11816 (let ((dir (string-append "build/classes/META-INF/native/"
11817 ,(match (%current-system)
11818 ((or "i686-linux" "armhf-linux")
11820 ((or "x86_64-linux" "aarch64-linux"
11823 (_ "unknown-kernel")))))
11824 (install-file "src/main/native-package/src/libjansi.so" dir))
11826 (add-after 'install 'install-native
11827 (lambda* (#:key outputs #:allow-other-keys)
11828 (install-file "src/main/native-package/src/jansi.h"
11829 (string-append (assoc-ref outputs "out") "/include"))
11831 (add-before 'install 'fix-pom
11833 ;; pom contains variables to complete name, but we don't support that
11834 (substitute* "pom.xml"
11835 (("\\$\\{platform\\}") "native"))
11838 (install-from-pom "pom.xml")))))
11840 `(("java-hawtjni" ,java-hawtjni)))
11841 (home-page "https://fusesource.github.io/jansi/")
11842 (synopsis "Native library for jansi")
11843 (description "This package provides the native library for jansi, a small
11844 Java library that allows you to use ANSI escape sequences to format your
11846 (license license:asl2.0)))
11848 (define-public java-jansi
11850 (name "java-jansi")
11854 (uri (string-append "https://github.com/fusesource/jansi/archive/"
11855 "jansi-project-" version ".tar.gz"))
11858 "11kh3144i3fzp21dpy8zg52mjmsr214k7km9p8ly0rqk2px0qq2z"))))
11859 (build-system ant-build-system)
11861 `(#:jar-name "jansi.jar"
11862 #:source-dir "jansi/src/main/java"
11863 #:test-dir "jansi/src/test"
11865 (modify-phases %standard-phases
11866 (add-after 'check 'clear-term
11868 (invoke "echo" "-e" "\\e[0m")))
11869 (add-before 'install 'install-parent
11870 (install-pom-file "pom.xml"))
11871 (add-before 'install 'fix-pom
11873 ;; pom adds jansi native versions for different platforms, but we
11874 ;; only need one, so use native instead
11875 (substitute* "jansi/pom.xml"
11876 (("windows32") "native")
11877 (("windows64") "native")
11879 (("linux32") "native")
11880 (("linux64") "native")
11881 (("freebsd32") "native")
11882 (("freebsd64") "native"))
11885 (install-from-pom "jansi/pom.xml")))))
11887 `(("java-jansi-native" ,java-jansi-native)))
11889 `(("java-junit" ,java-junit)
11890 ("java-hamcrest-core" ,java-hamcrest-core)))
11891 (home-page "https://fusesource.github.io/jansi/")
11892 (synopsis "Portable ANSI escape sequences")
11893 (description "Jansi is a Java library that allows you to use ANSI escape
11894 sequences to format your console output which works on every platform.")
11895 (license license:asl2.0)))
11897 (define-public java-jboss-el-api-spec
11899 (name "java-jboss-el-api-spec")
11903 (uri (string-append "https://github.com/jboss/jboss-el-api_spec/"
11904 "archive/jboss-el-api_" version
11905 "_spec-1.0.7.Final.tar.gz"))
11908 "1j45ljxalwlibxl7g7iv952sjxkw275m8vyxxij8l6wdd5pf0pdh"))))
11909 (build-system ant-build-system)
11911 `(#:jar-name "java-jboss-el-api_spec.jar"
11912 #:modules ((guix build ant-build-system)
11914 (guix build maven pom)
11915 (guix build java-utils)
11918 (modify-phases %standard-phases
11919 ;; the origin of javax.el:javax.el-api is unknown, so we use this package
11920 ;; instead, which implements the same thing. We override the pom file
11921 ;; to "rename" the package so it can be found by maven.
11922 (add-before 'install 'override-pom
11924 (delete-file "pom.xml")
11925 (with-output-to-file "pom.xml"
11929 (modelVersion "4.0.0")
11931 (groupId "javax.el")
11932 (artifactId "javax.el-api")
11933 (version "3.0")))))
11936 (install-from-pom "pom.xml")))))
11938 `(("java-junit" ,java-junit)))
11939 (home-page "https://github.com/jboss/jboss-el-api_spec")
11940 (synopsis "JSR-341 expression language 3.0 API")
11941 (description "This package contains an implementation of the JSR-341
11942 specification for the expression language 3.0. It implements an expression
11943 language inspired by ECMAScript and XPath. This language is used with
11944 JavaServer Pages (JSP).")
11945 ;; Either GPL2 only or CDDL.
11946 (license (list license:gpl2 license:cddl1.1))))
11948 (define-public java-jboss-interceptors-api-spec
11950 (name "java-jboss-interceptors-api-spec")
11954 (uri (string-append "https://github.com/jboss/jboss-interceptors-api_spec/"
11955 "archive/jboss-interceptors-api_" version
11956 "_spec-1.0.0.Final.tar.gz"))
11959 "0wv8x0jp9a5qxlrgkhb5jdk2gr6vi87b4j4kjb8ryxiy9gn8g51z"))))
11960 (build-system ant-build-system)
11962 `(#:jar-name "java-jboss-interceptors-api_spec.jar"
11965 #:tests? #f; no tests
11966 #:modules ((guix build ant-build-system)
11968 (guix build maven pom)
11969 (guix build java-utils)
11972 (modify-phases %standard-phases
11973 ;; the origin of javax.interceptor:javax.interceptor-api is unknown,
11974 ;; so we use this package instead, which implements the same thing.
11975 ;; We override the pom file to "rename" the package so it can be found
11977 (add-before 'install 'override-pom
11979 (delete-file "pom.xml")
11980 (with-output-to-file "pom.xml"
11984 (modelVersion "4.0.0")
11985 (name "interceptor-api")
11986 (groupId "javax.interceptor")
11987 (artifactId "javax.interceptor-api")
11988 (version "3.0")))))
11991 (install-from-pom "pom.xml")))))
11992 (home-page "https://github.com/jboss/jboss-interceptors-api_spec")
11993 (synopsis "Interceptors 1.2 API classes from JSR 318")
11994 (description "Java-jboss-interceptors-api-spec implements the Interceptors
11995 API. Interceptors are used to interpose on business method invocations and
11997 ;; Either GPL2 only or CDDL.
11998 (license (list license:gpl2 license:cddl1.1))))
12000 (define-public java-cdi-api
12002 (name "java-cdi-api")
12006 (uri (string-append "https://github.com/cdi-spec/cdi/archive/"
12007 version ".tar.gz"))
12008 (file-name (string-append name "-" version ".tar.gz"))
12011 "1iv8b8bp07c5kmqic14jsr868vycjv4qv02lf3pkgp9z21mnfg5y"))))
12012 (build-system ant-build-system)
12014 `(#:source-dir "api/src/main/java"
12015 #:jar-name "java-cdi-api.jar"
12016 #:test-dir "api/src/test"
12018 #:tests? #f; Tests fail because we don't have a CDI provider yet
12020 (modify-phases %standard-phases
12022 (install-from-pom "api/pom.xml")))))
12024 `(("java-javax-inject" ,java-javax-inject)
12025 ("java-jboss-el-api-spec" ,java-jboss-el-api-spec)
12026 ("java-jboss-interceptors-api-spec" ,java-jboss-interceptors-api-spec)
12027 ("java-weld-parent-pom" ,java-weld-parent-pom)))
12029 `(("java-testng" ,java-testng)
12030 ("java-hamcrest-core" ,java-hamcrest-core)))
12031 (home-page "http://cdi-spec.org/")
12032 (synopsis "Contexts and Dependency Injection APIs")
12033 (description "Java-cdi-api contains the required APIs for Contexts and
12034 Dependency Injection (CDI).")
12035 (license license:asl2.0)))
12037 (define-public java-joda-convert
12039 (name "java-joda-convert")
12043 (uri (string-append "https://github.com/JodaOrg/joda-convert/archive/v"
12044 version ".tar.gz"))
12045 (file-name (string-append name "-" version ".tar.gz"))
12048 "0vp346xz7dh9br4q7xazhc7hvzf76a6hf95fki9bg67q5jr0kjh7"))))
12049 (build-system ant-build-system)
12051 `(#:jar-name (string-append ,name "-" ,version ".jar")
12052 #:source-dir "src/main/java"
12053 #:test-include (list "**/Test*.java")
12054 ;; Contains only interfaces and base classes (no test)
12055 #:test-exclude (list "**/test*/**.java")))
12057 `(("java-guava" ,java-guava)))
12059 `(("java-junit" ,java-junit)
12060 ("java-hamcrest-core" ,java-hamcrest-core)))
12061 (home-page "https://www.joda.org/joda-convert/")
12062 (synopsis "Conversion between Objects and Strings")
12063 (description "Joda-Convert provides a small set of classes to aid
12064 conversion between Objects and Strings. It is not intended to tackle the
12065 wider problem of Object to Object transformation.")
12066 (license license:asl2.0)))
12068 (define-public java-joda-time
12070 (name "java-joda-time")
12074 (uri (string-append "https://github.com/JodaOrg/joda-time/archive/v"
12075 version ".tar.gz"))
12076 (file-name (string-append name "-" version ".tar.gz"))
12079 "1i9x91mi7yg2pasl0k3912f1pg46n37sps6rdb0v1gs8hj9ppwc1"))))
12080 (build-system ant-build-system)
12082 `(#:jar-name "java-joda-time.jar"
12083 #:source-dir "src/main/java"
12084 #:test-include (list "**/Test*.java")
12085 ;; There is no runnable test in these files
12086 #:test-exclude (list "**/Test*Chronology.java" "**/Test*Field.java")
12088 (modify-phases %standard-phases
12089 (add-after 'build 'build-resources
12091 (mkdir-p "build/classes/org/joda/time/tz/data")
12092 (mkdir-p "build/classes/org/joda/time/format")
12093 ;; This will produce the following exception:
12094 ;; java.io.IOException: Resource not found: "org/joda/time/tz/data/ZoneInfoMap"
12095 ;; which is normal, because it doesn't exist yet. It still generates
12096 ;; the same file as in the binary one can find on maven.
12097 (invoke "java" "-cp"
12098 (string-append "build/classes:" (getenv "CLASSPATH"))
12099 "org.joda.time.tz.ZoneInfoCompiler"
12100 "-src" "src/main/java/org/joda/time/tz/src"
12101 "-dst" "build/classes/org/joda/time/tz/data"
12102 "africa" "antarctica" "asia" "australasia"
12103 "europe" "northamerica" "southamerica"
12104 "pacificnew" "etcetera" "backward" "systemv")
12105 (for-each (lambda (f)
12106 (copy-file f (string-append
12107 "build/classes/org/joda/time/format/"
12109 (find-files "src/main/java/org/joda/time/format" ".*.properties"))
12111 (add-before 'install 'regenerate-jar
12113 ;; We need to regenerate the jar file to add generated data.
12114 (delete-file "build/jar/java-joda-time.jar")
12115 (invoke "ant" "jar")))
12116 (add-before 'check 'copy-test-resources
12118 (mkdir-p "build/test-classes/org/joda/time/tz/data")
12119 (copy-file "src/test/resources/tzdata/ZoneInfoMap"
12120 "build/test-classes/org/joda/time/tz/data/ZoneInfoMap")
12121 (copy-recursively "src/test/resources" "build/test-classes")
12124 `(("java-joda-convert" ,java-joda-convert)))
12126 `(("java-junit" ,java-junit)
12127 ("java-hamcrest-core" ,java-hamcrest-core)
12128 ("tzdata" ,tzdata)))
12129 (home-page "https://www.joda.org/joda-time/")
12130 (synopsis "Replacement for the Java date and time classes")
12131 (description "Joda-Time is a replacement for the Java date and time
12132 classes prior to Java SE 8.")
12133 (license license:asl2.0)))
12135 (define-public java-xerces
12137 (name "java-xerces")
12142 (uri (string-append "mirror://apache/xerces/j/source/"
12143 "Xerces-J-src." version ".tar.gz"))
12145 (base32 "0494kq36gw3nah19ifb720vwxbpg4ww0k6m3zq6wyanw6a083p6s"))
12146 (patches (search-patches
12147 "java-xerces-xjavac_taskdef.patch"
12148 "java-xerces-build_dont_unzip.patch"
12149 "java-xerces-bootclasspath.patch"))))
12150 (build-system ant-build-system)
12152 `(#:tests? #f;; Test files are not present
12153 #:test-target "test"
12156 (modify-phases %standard-phases
12157 (add-after 'unpack 'create-build.properties
12158 (lambda* (#:key inputs #:allow-other-keys)
12159 (let ((jaxp (assoc-ref inputs "java-jaxp"))
12160 (resolver (assoc-ref inputs "java-apache-xml-commons-resolver")))
12161 (with-output-to-file "build.properties"
12164 "jar.jaxp = ~a/share/java/jaxp.jar~@
12165 jar.apis-ext = ~a/share/java/jaxp.jar~@
12166 jar.resolver = ~a/share/java/xml-resolver.jar~%"
12167 jaxp jaxp resolver)))
12168 ;; Make xerces use our version of jaxp in tests
12169 (substitute* "build.xml"
12171 (string-append jaxp "/share/java/jaxp.jar"))
12172 (("\\$\\{tools.dir\\}/\\$\\{jar.apis\\}")
12175 (replace 'install (install-jars "build")))))
12177 `(("java-apache-xml-commons-resolver" ,java-apache-xml-commons-resolver)
12178 ("java-jaxp" ,java-jaxp)))
12179 (home-page "https://xerces.apache.org/xerces2-j/")
12180 (synopsis "Validating XML parser for Java with DOM level 3 support")
12181 (description "The Xerces2 Java parser is the reference implementation of
12182 XNI, the Xerces Native Interface, and also a fully conforming XML Schema
12185 Xerces2-J supports the following standards and APIs:
12188 @item eXtensible Markup Language (XML) 1.0 Second Edition Recommendation
12189 @item Namespaces in XML Recommendation
12190 @item Document Object Model (DOM) Level 2 Core, Events, and Traversal and
12191 Range Recommendations
12192 @item Simple API for XML (SAX) 2.0.1 Core and Extension
12193 @item Java APIs for XML Processing (JAXP) 1.2.01
12194 @item XML Schema 1.0 Structures and Datatypes Recommendations
12195 @item Experimental implementation of the Document Object Model (DOM) Level 3
12196 Core and Load/Save Working Drafts
12197 @item Provides a partial implementation of the XML Inclusions (XInclude) W3C
12198 Candidate Recommendation
12201 Xerces is now able to parse documents written according to the XML 1.1
12202 Candidate Recommendation, except that it does not yet provide an option to
12203 enable normalization checking as described in section 2.13 of this
12204 specification. It also handles namespaces according to the XML Namespaces 1.1
12205 Candidate Recommendation, and will correctly serialize XML 1.1 documents if
12206 the DOM level 3 load/save API's are in use.")
12207 (license license:asl2.0)))
12209 (define-public java-jakarta-regexp
12211 (name "java-jakarta-regexp")
12216 (uri (string-append
12217 "https://archive.apache.org/dist/jakarta/regexp/jakarta-regexp-"
12218 version ".tar.gz"))
12221 "0zg9rmyif48dck0cv6ynpxv23mmcsx265am1fnnxss7brgw0ms3r"))))
12222 (build-system ant-build-system)
12224 `(#:test-target "test"
12226 (modify-phases %standard-phases
12228 (lambda* (#:key outputs #:allow-other-keys)
12229 (let* ((out (assoc-ref outputs "out"))
12230 (out-share (string-append out "/share/java")))
12231 (mkdir-p out-share)
12232 (for-each (lambda (name)
12233 (install-file name out-share))
12234 (find-files "build" "^jakarta-regexp-.*\\.jar$"))
12236 (home-page "https://attic.apache.org/projects/jakarta-regexp.html")
12237 (synopsis "Regular expression parser generator for Java.")
12238 (description "@code{jakarta-regexp} is an old regular expression parser
12239 generator for Java.")
12240 (license license:asl2.0)))
12242 (define-public java-jline
12244 (name "java-jline")
12248 (uri (string-append "https://github.com/jline/jline1/archive/jline-"
12249 version ".tar.gz"))
12252 "0bi3p6vrh7a6v0fbpb6rx9plpmx5zk3lr352xzdbz2jcxg499wir"))))
12253 (build-system ant-build-system)
12255 `(#:jar-name "jline.jar"
12256 #:source-dir "src/main/java"
12257 #:test-dir "src/test"
12259 (modify-phases %standard-phases
12260 (add-before 'build 'copy-resources
12262 (copy-recursively "src/main/resources" "build/classes")
12265 `(("java-junit" ,java-junit)))
12266 (home-page "https://jline.github.io")
12267 (synopsis "Console input handling library")
12268 (description "JLine is a Java library for handling console input. It is
12269 similar in functionality to BSD editline and GNU readline but with additional
12270 features that bring it on par with the Z shell line editor.")
12271 (license license:bsd-3)))
12273 (define-public java-jline-2
12275 (inherit java-jline)
12279 (uri (string-append "https://github.com/jline/jline2/archive/jline-"
12280 version ".tar.gz"))
12283 "1c6qa26mf0viw8hg4jnv72s7i1qb1gh1l8rrzcdvqhqhx82rkdlf"))))
12286 ,@(package-arguments java-jline)))
12288 `(("java-jansi" ,java-jansi)
12289 ("java-jansi-native" ,java-jansi-native)))
12291 `(("java-powermock-modules-junit4" ,java-powermock-modules-junit4)
12292 ("java-powermock-modules-junit4-common" ,java-powermock-modules-junit4-common)
12293 ("java-powermock-api-easymock" ,java-powermock-api-easymock)
12294 ("java-powermock-api-support" ,java-powermock-api-support)
12295 ("java-powermock-core" ,java-powermock-core)
12296 ("java-powermock-reflect" ,java-powermock-reflect)
12297 ("java-easymock" ,java-easymock)
12298 ("java-jboss-javassist" ,java-jboss-javassist)
12299 ("java-objenesis" ,java-objenesis)
12300 ("java-asm" ,java-asm)
12301 ("java-hamcrest-core" ,java-hamcrest-core)
12302 ("java-cglib" ,java-cglib)
12303 ("java-junit" ,java-junit)
12304 ("java-hawtjni" ,java-hawtjni)))))
12306 (define-public java-xmlunit
12308 (name "java-xmlunit")
12312 (uri (string-append "https://github.com/xmlunit/xmlunit/archive/v"
12313 version ".tar.gz"))
12314 (file-name (string-append name "-" version ".tar.gz"))
12317 "035rivlnmwhfqj0fzviciv0bkh1h95ps1iwnh2kjcvdbk5nccm4z"))))
12318 (build-system ant-build-system)
12320 `(#:jar-name "java-xmlunit.jar"
12321 #:source-dir "xmlunit-core/src/main/java"
12322 #:test-dir "xmlunit-core/src/test"
12324 (modify-phases %standard-phases
12325 (add-before 'check 'copy-test-resources
12326 (lambda* (#:key inputs #:allow-other-keys)
12327 (copy-recursively (assoc-ref inputs "resources") "../test-resources")
12330 `(("java-junit" ,java-junit)
12331 ("java-mockito-1" ,java-mockito-1)
12332 ("java-hamcrest-all" ,java-hamcrest-all)
12333 ("java-objenesis" ,java-objenesis)
12334 ("java-asm" ,java-asm)
12335 ("java-cglib" ,java-cglib)
12339 (uri (git-reference
12340 (url "https://github.com/xmlunit/test-resources")
12341 (commit "a590d2ae865c3e0455691d76ba8eefccc2215aec")))
12342 (file-name "java-xmlunit-test-resources")
12345 "0r0glj37pg5l868yjz78gckr91cs8fysxxbp9p328dssssi91agr"))))))
12346 (home-page "https://www.xmlunit.org/")
12347 (synopsis "XML output testing")
12348 (description "XMLUnit provides you with the tools to verify the XML you
12349 emit is the one you want to create. It provides helpers to validate against
12350 an XML Schema, assert the values of XPath queries or compare XML documents
12351 against expected outcomes.")
12352 (license license:asl2.0)))
12354 (define-public java-xmlunit-legacy
12356 (inherit java-xmlunit)
12357 (name "java-xmlunit-legacy")
12359 `(#:jar-name "java-xmlunit-legacy.jar"
12360 #:source-dir "xmlunit-legacy/src/main/java"
12361 #:test-dir "xmlunit-legacy/src/test"))
12363 `(("java-xmlunit" ,java-xmlunit)
12364 ("java-junit" ,java-junit)))
12366 `(("java-mockito-1" ,java-mockito-1)))))
12368 (define-public java-xmlunit-matchers
12370 (inherit java-xmlunit)
12371 (name "java-xmlunit-matchers")
12373 `(#:jar-name "java-xmlunit-matchers.jar"
12374 #:source-dir "xmlunit-matchers/src/main/java"
12375 #:test-dir "xmlunit-matchers/src/test"
12377 ;; Cannot open xsd for http://www.xmlunit.org/test-support/Book.xsd
12378 (list "**/ValidationMatcherTest.java")
12380 (modify-phases %standard-phases
12381 (add-before 'build 'copy-test-class
12383 (copy-file "xmlunit-core/src/test/java/org/xmlunit/TestResources.java"
12384 "xmlunit-matchers/src/test/java/org/xmlunit/TestResources.java")
12386 (add-before 'build 'fix-test-resources-path
12388 (substitute* (find-files "xmlunit-matchers/src/test" ".*.java")
12389 (("../test-resources") "test-resources"))
12391 (add-before 'check 'copy-test-resources
12392 (lambda* (#:key inputs #:allow-other-keys)
12393 (copy-recursively (assoc-ref inputs "resources") "test-resources")
12396 `(("java-xmlunit" ,java-xmlunit)
12397 ("java-junit" ,java-junit)))))
12399 (define-public java-openchart2
12401 (name "java-openchart2")
12405 (uri (string-append "http://download.approximatrix.com/openchart2/"
12406 "openchart2-" version ".source.zip"))
12409 "1xq96zm5r02n1blja0072jmmsifmxc40lbyfbnmcnr6mw42frh4g"))))
12410 (build-system ant-build-system)
12412 `(#:test-target "test"
12414 (modify-phases %standard-phases
12415 (add-after 'unpack 'fix-junit-errors
12417 (with-directory-excursion "unittest/src/com/approximatrix/charting/"
12418 (substitute* '("coordsystem/ticklocator/NumericXTickLocatorTest.java"
12419 "coordsystem/ticklocator/NumericYTickLocatorTest.java"
12420 "coordsystem/ticklocator/ObjectXTickLocatorTest.java"
12421 "model/DefaultChartDataModelConstraintsTest.java"
12422 "model/MultiScatterDataModelConstraintsTest.java"
12423 "model/threedimensional/DotPlotDataModelConstraintsTest.java")
12424 (("(assertEquals[^;]+);" before _)
12425 (string-append (string-drop-right before 2) ", 1E-6);"))))
12427 (replace 'install (install-jars ".")))))
12430 ("java-junit" ,java-junit)
12431 ("java-hamcrest-core" ,java-hamcrest-core)))
12432 (home-page "https://approximatrix.com/products/openchart2/")
12433 (synopsis "Simple plotting for Java")
12434 (description "Openchart2 provides a simple, yet powerful, interface for
12435 Java programmers to create two-dimensional charts and plots. The library
12436 features an assortment of graph styles, including advanced scatter plots, bar
12437 graphs, and pie charts.")
12438 (license license:lgpl2.1+)))
12440 (define-public java-commons-httpclient
12442 (name "java-commons-httpclient")
12446 (uri (string-append "mirror://apache/httpcomponents/"
12447 "commons-httpclient/source/commons-httpclient-"
12448 version "-src.tar.gz"))
12451 "1wlpn3cfy3d4inxy6g7wxcsa8p7sshn6aldk9y4ia3lb879rd97r"))))
12452 (build-system ant-build-system)
12454 `(#:build-target "compile"
12455 #:test-target "test"
12456 #:tests? #f; requires junit-textui (junit 3)
12458 (modify-phases %standard-phases
12459 (add-before 'build 'fix-accent
12461 (for-each (lambda (file)
12462 (with-fluids ((%default-port-encoding "ISO-8859-1"))
12464 (("\\* @author Ortwin .*") "* @author Ortwin Glueck\n"))))
12465 '("src/java/org/apache/commons/httpclient/HttpContentTooLargeException.java"
12466 "src/examples/TrivialApp.java" "src/examples/ClientApp.java"
12467 "src/test/org/apache/commons/httpclient/TestHttps.java"
12468 "src/test/org/apache/commons/httpclient/TestURIUtil2.java"))
12471 (lambda* (#:key outputs #:allow-other-keys)
12472 (invoke "ant" "dist"
12473 (string-append "-Ddist.home=" (assoc-ref outputs "out")
12477 `(("java-commons-logging" ,java-commons-logging-minimal)
12478 ("java-commons-codec" ,java-commons-codec)))
12479 (home-page "https://hc.apache.org")
12480 (synopsis "HTTP/1.1 compliant HTTP agent implementation")
12481 (description "This package contains an HTTP/1.1 compliant HTTP agent
12482 implementation. It also provides reusable components for client-side
12483 authentication, HTTP state management, and HTTP connection management.")
12484 (license license:asl2.0)))
12486 (define-public java-commons-vfs
12488 (name "java-commons-vfs")
12492 (uri (string-append "mirror://apache/commons/vfs/source/"
12493 "commons-vfs2-distribution-" version "-src.tar.gz"))
12494 (file-name (string-append name "-" version ".tar.gz"))
12497 "1cnq1iaghbp4cslpnvwbp83i5v234x87irssqynhwpfgw7caf1s3"))
12498 (modules '((guix build utils)))
12501 (for-each delete-file
12502 (find-files "." "\\.jar$"))
12504 (build-system ant-build-system)
12506 `(#:jar-name "commons-vfs.jar"
12507 #:source-dir "commons-vfs2/src/main/java"
12508 #:test-dir "commons-vfs2/src/test"
12509 ; FIXME: tests depend on many things: apache sshd, hadoop, ftpserver, ...
12512 (modify-phases %standard-phases
12513 (add-before 'build 'remove-hadoop-and-webdav
12514 ; Remove these files as they are not required and depend on difficult
12517 (for-each delete-file-recursively
12518 '("commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/webdav"
12519 "commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/hdfs"))
12522 `(("java-commons-collections4" ,java-commons-collections4)
12523 ("java-commons-compress" ,java-commons-compress)
12524 ("java-commons-httpclient" ,java-commons-httpclient)
12525 ("java-commons-logging-minimal" ,java-commons-logging-minimal)
12526 ("java-commons-net" ,java-commons-net)
12527 ("java-jsch" ,java-jsch)))
12528 (home-page "https://commons.apache.org/proper/commons-vfs/")
12529 (synopsis "Java file system library")
12530 (description "Commons VFS provides a single API for accessing various
12531 different file systems. It presents a uniform view of the files from various
12532 different sources, such as the files on local disk, on an HTTP server, or
12533 inside a Zip archive.")
12534 (license license:asl2.0)))
12536 (define-public java-jakarta-oro
12538 (name "java-jakarta-oro")
12542 (uri (string-append "mirror://apache/jakarta/oro/"
12543 "jakarta-oro-" version ".tar.gz"))
12546 "0rpmnsskiwmsy8r0sckz5n5dbvh3vkxx8hpm177c754r8xy3qksc"))
12547 (modules '((guix build utils)))
12550 (delete-file (string-append "jakarta-oro-" ,version ".jar"))
12552 (build-system ant-build-system)
12554 `(#:build-target "package"
12555 #:make-flags (list "-DDATE" "(no recorded date for reproducibility)")
12556 #:tests? #f; tests are run as part of the build process
12558 (modify-phases %standard-phases
12560 (install-jars ,(string-append "jakarta-oro-" version))))))
12561 (home-page "https://jakarta.apache.org/oro/")
12562 (synopsis "Text-processing for Java")
12563 (description "The Jakarta-ORO Java classes are a set of text-processing
12564 Java classes that provide Perl5 compatible regular expressions, AWK-like
12565 regular expressions, glob expressions, and utility classes for performing
12566 substitutions, splits, filtering filenames, etc. This library is the successor
12567 of the OROMatcher, AwkTools, PerlTools, and TextTools libraries originally
12569 (license license:asl1.1)))
12571 (define-public java-native-access
12573 (name "java-native-access")
12577 (uri (string-append "https://github.com/java-native-access/jna/"
12578 "archive/" version ".tar.gz"))
12579 (file-name (string-append name "-" version ".tar.gz"))
12582 "0zrpzkib6b905i018a9pqlzkqinphywr6y4jwv6mwp63jjqvqkd9"))
12583 (modules '((guix build utils)))
12586 (for-each delete-file (find-files "." ".*.jar"))
12587 (delete-file-recursively "native/libffi")
12588 (delete-file-recursively "dist")
12590 (build-system ant-build-system)
12592 `(#:tests? #f; FIXME: tests require reflections.jar
12593 #:test-target "test"
12594 #:make-flags (list "-Ddynlink.native=true")
12596 (modify-phases %standard-phases
12597 (add-before 'build 'fix-build.xml
12598 (lambda* (#:key inputs #:allow-other-keys)
12599 (substitute* "build.xml"
12600 ;; Since we removed the bundled ant.jar, give the correct path
12601 (("lib/ant.jar") (string-append (assoc-ref inputs "ant") "/lib/ant.jar"))
12602 ;; We removed generated native libraries. We can only rebuild one
12603 ;; so don't fail if we can't find a native library for another architecture.
12604 (("zipfileset") "zipfileset erroronmissingarchive=\"false\""))
12605 ;; Copy test dependencies
12606 (copy-file (car (find-files (assoc-ref inputs "java-junit") "jar$"))
12608 (copy-file (car (find-files (assoc-ref inputs "java-hamcrest-core")
12610 "lib/hamcrest-core.jar")
12611 ;; FIXME: once reflections.jar is built, copy it to lib/test.
12613 (add-before 'build 'build-native
12615 (invoke "ant" "-Ddynlink.native=true" "native")
12618 (install-jars "build")))))
12620 `(("libffi" ,libffi)
12624 `(("java-junit" ,java-junit)
12625 ("java-hamcrest-core" ,java-hamcrest-core)))
12626 (home-page "https://github.com/java-native-access/jna")
12627 (synopsis "Access to native shared libraries from Java")
12628 (description "JNA provides Java programs easy access to native shared
12629 libraries without writing anything but Java code - no JNI or native code is
12630 required. JNA allows you to call directly into native functions using natural
12631 Java method invocation.")
12632 ;; Java Native Access project (JNA) is dual-licensed under 2
12633 ;; alternative Free licenses: LGPL 2.1 or later and Apache License 2.0.
12636 license:lgpl2.1+))))
12638 (define-public java-native-access-platform
12640 (inherit java-native-access)
12641 (name "java-native-access-platform")
12643 `(#:test-target "test"
12644 #:tests? #f; require jna-test.jar
12646 (modify-phases %standard-phases
12647 (add-before 'build 'chdir
12649 (chdir "contrib/platform")
12651 (add-after 'chdir 'fix-ant
12652 (lambda* (#:key inputs #:allow-other-keys)
12653 (substitute* "nbproject/project.properties"
12654 (("../../build/jna.jar")
12655 (string-append (assoc-ref inputs "java-native-access")
12656 "/share/java/jna.jar"))
12657 (("../../lib/hamcrest-core-.*.jar")
12658 (car (find-files (assoc-ref inputs "java-hamcrest-core")
12660 (("../../lib/junit.jar")
12661 (car (find-files (assoc-ref inputs "java-junit")
12665 (install-jars "dist")))))
12667 `(("java-native-access" ,java-native-access)))
12668 (synopsis "Cross-platform mappings for jna")
12669 (description "java-native-access-platform has cross-platform mappings
12670 and mappings for a number of commonly used platform functions, including a
12671 large number of Win32 mappings as well as a set of utility classes that
12672 simplify native access.")))
12674 (define-public java-jsch-agentproxy-core
12676 (name "java-jsch-agentproxy-core")
12680 (uri (string-append "https://github.com/ymnk/jsch-agent-proxy/archive/"
12681 version ".tar.gz"))
12682 (file-name (string-append name "-" version ".tar.gz"))
12685 "02iqg6jbc1kxvfzqcg6wy9ygqxfm82bw5rf6vnswqy4y572niz4q"))))
12686 (build-system ant-build-system)
12688 `(#:jar-name "jsch-agentproxy-core.jar"
12689 #:source-dir "jsch-agent-proxy-core/src/main/java"
12690 #:tests? #f)); no tests
12691 (home-page "https://github.com/ymnk/jsch-agent-proxy")
12692 (synopsis "Core component of the proxy to ssh-agent and Pageant in Java")
12693 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
12694 and Pageant included Putty. It will be easily integrated into JSch, and users
12695 will be allowed to use these programs for authentication.")
12696 (license license:bsd-3)))
12698 (define-public java-jsch-agentproxy-sshagent
12700 (inherit java-jsch-agentproxy-core)
12701 (name "java-jsch-agentproxy-sshagent")
12703 `(#:jar-name "jsch-agentproxy-sshagent.jar"
12704 #:source-dir "jsch-agent-proxy-sshagent/src/main/java"
12705 #:tests? #f)); no tests
12707 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
12708 (synopsis "Proxy to ssh-agent")
12709 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
12710 and Pageant included in Putty. This component contains the code for a proxy to
12713 (define-public java-jsch-agentproxy-usocket-jna
12715 (inherit java-jsch-agentproxy-core)
12716 (name "java-jsch-agentproxy-usocket-jna")
12718 `(#:jar-name "jsch-agentproxy-usocket-jna.jar"
12719 #:source-dir "jsch-agent-proxy-usocket-jna/src/main/java"
12720 #:tests? #f)); no tests
12722 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
12723 ("java-native-access" ,java-native-access)))
12724 (synopsis "USocketFactory implementation using JNA")
12725 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
12726 and Pageant included in Putty. This component contains an implementation of
12727 USocketFactory using @dfn{JNA} (Java Native Access).")))
12729 (define-public java-jsch-agentproxy-pageant
12731 (inherit java-jsch-agentproxy-core)
12732 (name "java-jsch-agentproxy-pageant")
12734 `(#:jar-name "jsch-agentproxy-pageant.jar"
12735 #:source-dir "jsch-agent-proxy-pageant/src/main/java"
12736 #:tests? #f)); no tests
12738 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
12739 ("java-native-access" ,java-native-access)
12740 ("java-native-access-platform" ,java-native-access-platform)))
12741 (synopsis "Proxy to pageant")
12742 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
12743 and Pageant included in Putty. This component contains the code for a proxy to
12746 (define-public java-jsch-agentproxy-usocket-nc
12748 (inherit java-jsch-agentproxy-core)
12749 (name "java-jsch-agentproxy-usocket-nc")
12751 `(#:jar-name "jsch-agentproxy-usocket-nc.jar"
12752 #:source-dir "jsch-agent-proxy-usocket-nc/src/main/java"
12753 #:tests? #f)); no tests
12755 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
12756 (synopsis "USocketFactory implementation using netcat")
12757 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
12758 and Pageant included in Putty. This component contains an implementation of
12759 USocketFactory using netcat.")))
12761 (define-public java-jsch-agentproxy-connector-factory
12763 (inherit java-jsch-agentproxy-core)
12764 (name "java-jsch-agentproxy-connector-factory")
12766 `(#:jar-name "jsch-agentproxy-connector-factory.jar"
12767 #:source-dir "jsch-agent-proxy-connector-factory/src/main/java"
12768 #:tests? #f)); no tests
12770 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
12771 ("java-jsch-agentproxy-sshagent" ,java-jsch-agentproxy-sshagent)
12772 ("java-jsch-agentproxy-usocket-jna" ,java-jsch-agentproxy-usocket-jna)
12773 ("java-jsch-agentproxy-pageant" ,java-jsch-agentproxy-pageant)
12774 ("java-jsch-agentproxy-usocket-nc" ,java-jsch-agentproxy-usocket-nc)))
12775 (synopsis "Connector factory for jsch agent proxy")
12776 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
12777 and Pageant included in Putty. This component contains a connector factory.")))
12779 (define-public java-jsch-agentproxy-jsch
12781 (inherit java-jsch-agentproxy-core)
12782 (name "java-jsch-agentproxy-jsch")
12784 `(#:jar-name "jsch-agentproxy-jsch.jar"
12785 #:source-dir "jsch-agent-proxy-jsch/src/main/java"
12786 #:tests? #f)); no tests
12788 `(("java-jsch" ,java-jsch)
12789 ("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
12790 (synopsis "JSch integration library for agentproxy")
12791 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
12792 and Pageant included in Putty. This component contains a library to use
12793 jsch-agent-proxy with JSch.")))
12795 (define-public java-apache-ivy
12797 (name "java-apache-ivy")
12801 (uri (string-append "mirror://apache//ant/ivy/" version
12802 "/apache-ivy-" version "-src.tar.gz"))
12805 "1xkfn57g2m7l6y0xdq75x5rnrgk52m9jx2xah70g3ggl8750hbr0"))
12808 "java-apache-ivy-port-to-latest-bouncycastle.patch"))))
12809 (build-system ant-build-system)
12811 `(#:jar-name "ivy.jar"
12814 (modify-phases %standard-phases
12815 (add-before 'build 'remove-example
12817 (delete-file-recursively "src/example")
12819 (add-before 'build 'copy-resources
12821 (with-directory-excursion "src/java"
12822 (for-each (lambda (file)
12823 (install-file file (string-append "../../build/classes/" (dirname file))))
12825 (find-files "." ".*.css")
12826 (find-files "." ".*.ent")
12827 (find-files "." ".*.html")
12828 (find-files "." ".*.properties")
12829 (find-files "." ".*.xsd")
12830 (find-files "." ".*.xsl")
12831 (find-files "." ".*.xml"))))
12833 (add-before 'build 'fix-vfs
12836 '("src/java/org/apache/ivy/plugins/repository/vfs/VfsRepository.java"
12837 "src/java/org/apache/ivy/plugins/repository/vfs/VfsResource.java")
12838 (("import org.apache.commons.vfs") "import org.apache.commons.vfs2"))
12840 (add-before 'install 'copy-manifest
12842 (install-file "META-INF/MANIFEST.MF" "build/classes/META-INF")
12844 (add-before 'install 'repack
12846 (invoke "jar" "-cmf" "build/classes/META-INF/MANIFEST.MF" "build/jar/ivy.jar"
12847 "-C" "build/classes" ".")))
12848 (add-after 'install 'install-bin
12849 (lambda* (#:key outputs #:allow-other-keys)
12850 (let* ((bin (string-append (assoc-ref outputs "out") "/bin"))
12851 (ivy (string-append bin "/ivy"))
12852 (jar (string-append (assoc-ref outputs "out") "/share/java/ivy.jar")))
12854 (with-output-to-file ivy
12856 (display (string-append
12857 "#!" (which "sh") "\n"
12858 "if [[ -z $CLASSPATH ]]; then\n"
12859 " cp=\"" (getenv "CLASSPATH") ":" jar "\"\n"
12861 " cp=\"" (getenv "CLASSPATH") ":" jar ":$CLASSPATH\"\n"
12863 (which "java") " -cp $cp org.apache.ivy.Main $@\n"))))
12867 `(("java-bouncycastle" ,java-bouncycastle)
12868 ("java-commons-cli" ,java-commons-cli)
12869 ("java-commons-collections" ,java-commons-collections)
12870 ("java-commons-httpclient" ,java-commons-httpclient)
12871 ("java-commons-lang" ,java-commons-lang)
12872 ("java-commons-vfs" ,java-commons-vfs)
12873 ("java-jakarta-oro" ,java-jakarta-oro)
12874 ("java-jsch" ,java-jsch)
12875 ("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
12876 ("java-jsch-agentproxy-connector-factory" ,java-jsch-agentproxy-connector-factory)
12877 ("java-jsch-agentproxy-jsch" ,java-jsch-agentproxy-jsch)
12878 ("java-junit" ,java-junit)))
12879 (home-page "https://ant.apache.org/ivy")
12880 (synopsis "Dependency manager for the Java programming language")
12881 (description "Ivy is a tool for managing (recording, tracking, resolving
12882 and reporting) project dependencies. It is characterized by the following:
12885 @item flexibility and configurability - Ivy is essentially process agnostic
12886 and is not tied to any methodology or structure. Instead it provides the
12887 necessary flexibility and configurability to be adapted to a broad range
12888 of dependency management and build processes.
12889 @item tight integration with Apache Ant - while available as a standalone tool,
12890 Ivy works particularly well with Apache Ant providing a number of
12891 powerful Ant tasks ranging from dependency resolution to dependency
12892 reporting and publication.
12894 (license license:asl2.0)))
12896 (define-public java-eclipse-sisu-inject
12898 (name "java-eclipse-sisu-inject")
12902 (uri (git-reference
12903 (url "https://github.com/eclipse/sisu.inject/")
12904 (commit (string-append "releases/" version))))
12905 (file-name (git-file-name name version))
12908 "16044sizdb0rjbhlfbmcnpds5y7by7dyn9b0c11606aikqi8k3x6"))))
12909 (build-system ant-build-system)
12911 `(#:jar-name "eclipse-sisu-inject.jar"
12912 #:source-dir "org.eclipse.sisu.inject/src"
12913 #:tests? #f; no tests
12915 (modify-phases %standard-phases
12917 (install-from-pom "org.eclipse.sisu.inject/pom.xml")))))
12919 `(("java-guice" ,java-guice)
12920 ("java-sisu-inject-parent-pom" ,java-sisu-inject-parent-pom)))
12922 `(("java-guice-servlet" ,java-guice-servlet)
12923 ("java-javax-inject" ,java-javax-inject)
12924 ("java-javaee-servletapi" ,java-javaee-servletapi)
12925 ("java-junit" ,java-junit)
12926 ("java-slf4j-api" ,java-slf4j-api)
12927 ("java-jsr305" ,java-jsr305)
12928 ("java-jsr250" ,java-jsr250)
12929 ("java-cdi-api" ,java-cdi-api)
12930 ("java-osgi-framework" ,java-osgi-framework)
12931 ("java-osgi-util-tracker" ,java-osgi-util-tracker)
12932 ("java-testng" ,java-testng)))
12933 (home-page "https://www.eclipse.org/sisu/")
12934 (synopsis "Classpath scanning, auto-binding, and dynamic auto-wiring")
12935 (description "Sisu is a modular JSR330-based container that supports
12936 classpath scanning, auto-binding, and dynamic auto-wiring. Sisu uses
12937 Google-Guice to perform dependency injection and provide the core JSR330
12938 support, but removes the need to write explicit bindings in Guice modules.
12939 Integration with other containers via the Eclipse Extension Registry and the
12940 OSGi Service Registry is a goal of this project.")
12941 (license license:epl1.0)))
12943 (define java-sisu-inject-parent-pom
12945 (inherit java-eclipse-sisu-inject)
12946 (name "java-sisu-inject-parent-pom")
12950 (modify-phases %standard-phases
12951 (delete 'configure)
12954 (install-pom-file "pom.xml")))))
12955 (propagated-inputs '())))
12957 (define-public java-eclipse-sisu-plexus
12959 (name "java-eclipse-sisu-plexus")
12963 (uri (git-reference
12964 (url "https://github.com/eclipse/sisu.plexus")
12965 (commit (string-append "releases/" version))))
12966 (file-name (git-file-name name version))
12969 "17mjlajnsqnk07cc58h1qpxrif85yb2m2y0pyba48yjjgikk8r9f"))
12970 (modules '((guix build utils)))
12973 (for-each delete-file (find-files "." ".*.jar"))
12974 (rename-file "org.eclipse.sisu.plexus.tests/src"
12975 "org.eclipse.sisu.plexus.tests/java")
12977 (build-system ant-build-system)
12979 `(#:jar-name "eclipse-sisu-plexus.jar"
12980 #:source-dir "org.eclipse.sisu.plexus/src"
12981 #:test-dir "org.eclipse.sisu.plexus.tests"
12984 ;; This test fails probably because we can't generate the necessary
12986 "**/PlexusLoggingTest.*"
12987 ;; FIXME: This test fails because of some injection error
12988 "**/PlexusRequirementTest.*")
12991 (modify-phases %standard-phases
12992 (add-before 'build 'copy-resources
12994 (install-file "org.eclipse.sisu.plexus/META-INF/plexus/components.xml"
12995 "build/classes/META-INF/plexus")
12997 (add-before 'check 'build-test-jar
12999 (with-directory-excursion "org.eclipse.sisu.plexus.tests/resources/component-jar/src/main/"
13001 (with-directory-excursion "java"
13002 (apply invoke "javac" "-cp"
13003 (string-append (getenv "CLASSPATH")
13004 ":../../../../../build/classes")
13005 (find-files "." ".*.java"))
13006 (for-each (lambda (file) (install-file file (string-append "../build/" file)))
13007 (find-files "." ".*.jar")))
13008 (mkdir-p "build/META-INF/plexus")
13009 (copy-file "resources/META-INF/plexus/components.xml"
13010 "build/META-INF/plexus/components.xml")
13011 (with-directory-excursion "build"
13012 (invoke "jar" "cf" "../../../component-jar-0.1.jar" ".")))
13013 (with-directory-excursion "org.eclipse.sisu.plexus.tests/"
13014 (copy-recursively "META-INF" "../build/test-classes/META-INF")
13015 (substitute* "java/org/eclipse/sisu/plexus/DefaultPlexusContainerTest.java"
13016 (("resources/component-jar")
13017 "org.eclipse.sisu.plexus.tests/resources/component-jar")))
13020 (install-from-pom "org.eclipse.sisu.plexus/pom.xml")))))
13022 `(("java-plexus-classworlds" ,java-plexus-classworlds)
13023 ("java-plexus-utils" ,java-plexus-utils)
13024 ("java-plexus-component-annotations" ,java-plexus-component-annotations)
13025 ("java-cdi-api" ,java-cdi-api)
13026 ("java-eclipse-sisu-inject" ,java-eclipse-sisu-inject)
13027 ("java-sisu-plexus-parent-pom" ,java-sisu-plexus-parent-pom)))
13029 `(("java-osgi-framework" ,java-osgi-framework)
13030 ("java-slf4j-api" ,java-slf4j-api)
13031 ("java-javax-inject" ,java-javax-inject)
13032 ("java-guice" ,java-guice)
13033 ("java-guava" ,java-guava)
13034 ("java-aopalliance" ,java-aopalliance)
13035 ("java-asm" ,java-asm)
13036 ("java-cglib" ,java-cglib)))
13038 `(("java-junit" ,java-junit)))
13039 (home-page "https://www.eclipse.org/sisu/")
13040 (synopsis "Plexus support for the sisu container")
13041 (description "Sisu is a modular JSR330-based container that supports
13042 classpath scanning, auto-binding, and dynamic auto-wiring. This package
13043 adds Plexus support to the Sisu-Inject container.")
13044 (license license:epl1.0)))
13046 (define java-sisu-plexus-parent-pom
13048 (inherit java-eclipse-sisu-plexus)
13049 (name "java-sisu-plexus-parent-pom")
13053 (modify-phases %standard-phases
13054 (delete 'configure)
13057 (install-pom-file "pom.xml")))))
13059 `(("java-sonatype-oss-parent-pom-9" ,java-sonatype-oss-parent-pom-9)))))
13061 (define-public java-commons-compiler
13063 (name "java-commons-compiler")
13067 (uri (git-reference
13068 (url "https://github.com/janino-compiler/janino")
13069 (commit "91aa95686d1e4ca3b16a984a03a38686572331b2")))
13070 (file-name (string-append name "-" version))
13073 "04hfdl59sgh20qkxzgnibvs8f9hy6n7znxwpk611y5d89977y62r"))
13074 (modules '((guix build utils)))
13077 (for-each delete-file
13078 (find-files "." "\\.jar$"))
13080 (build-system ant-build-system)
13082 `(#:jar-name "commons-compiler.jar"
13083 #:source-dir "commons-compiler/src/main"
13084 #:tests? #f)); no tests
13085 (home-page "https://github.com/janino-compiler/janino")
13086 (synopsis "Java compiler")
13087 (description "Commons-compiler contains an API for janino, including the
13088 @code{IExpressionEvaluator}, @code{IScriptEvaluator}, @code{IClassBodyEvaluator}
13089 and @code{ISimpleCompiler} interfaces.")
13090 (license license:bsd-3)))
13092 (define-public java-janino
13094 (inherit java-commons-compiler)
13095 (name "java-janino")
13097 `(#:jar-name "janino.jar"
13098 #:source-dir "src/main/java"
13100 (modify-phases %standard-phases
13101 (add-before 'configure 'chdir
13106 `(("java-commons-compiler" ,java-commons-compiler)))
13108 `(("java-junit" ,java-junit)
13109 ("java-hamcrest-core" ,java-hamcrest-core)))
13110 (description "Janino is a Java compiler. Janino can compile a set of
13111 source files to a set of class files like @code{javac}, but also compile a
13112 Java expression, block, class body or source file in memory, load the bytecode
13113 and execute it directly in the same JVM. @code{janino} can also be used for
13114 static code analysis or code manipulation.")))
13116 (define-public java-logback-core
13118 (name "java-logback-core")
13122 (uri (string-append "https://github.com/qos-ch/logback/archive/v_"
13123 version ".tar.gz"))
13124 (file-name (string-append name "-" version ".tar.gz"))
13127 "1x6ga74yfgm94cfx98gybakbrlilx8i2gn6dx13l40kasmys06mi"))
13128 (modules '((guix build utils)))
13131 (delete-file-recursively "logback-access/lib")
13133 (build-system ant-build-system)
13135 `(#:jar-name "logback.jar"
13136 #:source-dir "src/main/java"
13137 #:test-dir "src/test"
13139 ;; These tests fail with Unable to set MockitoNamingPolicy on cglib generator
13140 ;; which creates FastClasses
13141 (list "**/AllCoreTest.*"
13142 "**/AutoFlushingObjectWriterTest.*"
13144 "**/ResilientOutputStreamTest.*"
13145 ;; And we still don't want to run abstract classes
13148 (modify-phases %standard-phases
13149 (add-before 'configure 'chdir
13151 (chdir "logback-core")
13154 `(("java-javax-mail" ,java-javax-mail)
13155 ("servlet" ,java-javaee-servletapi)
13156 ("java-commons-compiler" ,java-commons-compiler)
13157 ("java-janino" ,java-janino)))
13159 `(("java-junit" ,java-junit)
13160 ("java-hamcrest-core" ,java-hamcrest-core)
13161 ("java-mockito-1" ,java-mockito-1)
13162 ("java-cglib" ,java-cglib)
13163 ("java-asm" ,java-asm)
13164 ("java-objenesis" ,java-objenesis)
13165 ("java-joda-time" ,java-joda-time)))
13166 (home-page "https://logback.qos.ch")
13167 (synopsis "Logging for java")
13168 (description "Logback is intended as a successor to the popular log4j project.
13169 This module lays the groundwork for the other two modules.")
13170 ;; Either epl1.0 or lgpl2.1
13171 (license (list license:epl1.0
13172 license:lgpl2.1))))
13174 (define-public java-logback-classic
13176 (inherit java-logback-core)
13177 (name "java-logback-classic")
13179 `(#:jar-name "logback-classic.jar"
13180 #:source-dir "src/main/java"
13181 #:test-dir "src/test"
13182 #:tests? #f; tests require more packages: h2, greenmail, hsql, subethamail, slf4j, log4j, felix
13185 (modify-phases %standard-phases
13186 (add-before 'configure 'chdir
13188 (chdir "logback-classic")
13191 (lambda* (#:key inputs #:allow-other-keys)
13192 (mkdir-p "build/classes")
13193 (setenv "CLASSPATH"
13195 (apply append (map (lambda (input)
13196 (find-files (assoc-ref inputs input)
13198 '("java-logback-core" "java-slf4j-api"
13199 "java-commons-compiler" "servlet"
13202 (apply invoke "groovyc" "-d" "build/classes" "-j"
13203 (find-files "src/main/" ".*\\.(groovy|java)$"))
13204 (invoke "ant" "jar")
13207 `(("java-logback-core" ,java-logback-core)
13208 ("java-slf4j-api" ,java-slf4j-api)
13209 ,@(package-inputs java-logback-core)))
13211 `(("groovy" ,groovy)))
13212 (description "Logback is intended as a successor to the popular log4j project.
13213 This module can be assimilated to a significantly improved version of log4j.
13214 Moreover, @code{logback-classic} natively implements the slf4j API so that you
13215 can readily switch back and forth between logback and other logging frameworks
13216 such as log4j or @code{java.util.logging} (JUL).")))
13218 (define-public java-jgit
13221 (version "4.7.0.201704051617-r")
13224 (uri (string-append "https://repo1.maven.org/maven2/"
13225 "org/eclipse/jgit/org.eclipse.jgit/"
13226 version "/org.eclipse.jgit-"
13227 version "-sources.jar"))
13230 "13ii4jn02ynzq6i7gsyi21k2i94jpc85wf6bcm31q4cyvzv0mk4k"))))
13231 (build-system ant-build-system)
13233 `(#:tests? #f ; There are no tests to run.
13234 #:jar-name "jgit.jar"
13235 ;; JGit must be built with a JDK supporting Java 8.
13237 ;; Target our older default JDK.
13238 #:make-flags (list "-Dtarget=1.7")
13240 (modify-phases %standard-phases
13241 ;; The jar file generated by the default build.xml does not include
13242 ;; the text properties files, so we need to add them.
13243 (add-after 'build 'add-properties
13244 (lambda* (#:key jar-name #:allow-other-keys)
13245 (with-directory-excursion "src"
13246 (apply invoke "jar" "-uf"
13247 (string-append "../build/jar/" jar-name)
13248 (find-files "." "\\.properties$")))
13251 `(("java-classpathx-servletapi" ,java-classpathx-servletapi)
13252 ("java-javaewah" ,java-javaewah)
13253 ("java-jsch" ,java-jsch)
13254 ("java-slf4j-api" ,java-slf4j-api)))
13255 (home-page "https://eclipse.org/jgit/")
13256 (synopsis "Java library implementing the Git version control system")
13257 (description "JGit is a lightweight, pure Java library implementing the
13258 Git version control system, providing repository access routines, support for
13259 network protocols, and core version control algorithms.")
13260 (license license:edl1.0)))
13262 ;; For axoloti. This package can still be built with icedtea-7, which is
13263 ;; currently used as the default JDK.
13264 (define-public java-jgit-4.2
13265 (package (inherit java-jgit)
13266 (version "4.2.0.201601211800-r")
13269 (uri (string-append "https://repo1.maven.org/maven2/"
13270 "org/eclipse/jgit/org.eclipse.jgit/"
13271 version "/org.eclipse.jgit-"
13272 version "-sources.jar"))
13275 "15gm537iivhnzlkjym4x3wn5jqdjdragsw9pdpzqqg21nrc817mm"))))
13276 (build-system ant-build-system)
13278 (substitute-keyword-arguments (package-arguments java-jgit)
13279 ;; Build for default JDK.
13280 ((#:jdk _) icedtea-7)
13282 `(modify-phases ,phases
13283 (add-after 'unpack 'use-latest-javaewah-API
13285 (substitute* "src/org/eclipse/jgit/internal/storage/file/BitmapIndexImpl.java"
13286 (("wordinbits") "WORD_IN_BITS"))
13289 `(("java-javaewah" ,java-javaewah)
13290 ("java-jsch" ,java-jsch)
13291 ("java-slf4j-api" ,java-slf4j-api)))))
13293 (define-public abcl
13300 (uri (string-append "https://abcl.org/releases/"
13301 version "/abcl-src-" version ".tar.gz"))
13304 "0zr5mmqyj484vza089l8vc88d07g0m8ymxzglvar3ydwyvi1x1qx"))
13307 "abcl-fix-build-xml.patch"))))
13308 (build-system ant-build-system)
13310 `(("java-junit" ,java-junit)))
13312 `(#:build-target "abcl.jar"
13313 #:test-target "abcl.test"
13315 (modify-phases %standard-phases
13317 (lambda* (#:key outputs #:allow-other-keys)
13318 (let ((share (string-append (assoc-ref outputs "out")
13320 (bin (string-append (assoc-ref outputs "out")
13323 (install-file "dist/abcl.jar" share)
13324 (install-file "dist/abcl-contrib.jar" share)
13326 (with-output-to-file (string-append bin "abcl")
13328 (let ((classpath (string-append
13331 share "abcl-contrib.jar")))
13332 (display (string-append
13333 "#!" (which "sh") "\n"
13334 "if [[ -z $CLASSPATH ]]; then\n"
13335 " cp=\"" classpath "\"\n"
13337 " cp=\"" classpath ":$CLASSPATH\"\n"
13339 "exec " (which "java")
13340 " -cp $cp org.armedbear.lisp.Main $@\n")))))
13341 (chmod (string-append bin "abcl") #o755)
13343 (home-page "https://abcl.org/")
13344 (synopsis "Common Lisp Implementation on the JVM")
13346 "@dfn{Armed Bear Common Lisp} (ABCL) is a full implementation of the Common
13347 Lisp language featuring both an interpreter and a compiler, running in the
13348 JVM. It supports JSR-223 (Java scripting API): it can be a scripting engine
13349 in any Java application. Additionally, it can be used to implement (parts of)
13350 the application using Java to Lisp integration APIs.")
13351 (license (list license:gpl2+
13352 ;; named-readtables is released under 3 clause BSD
13354 ;; jfli is released under CPL 1.0
13357 (define-public java-jsonp-api
13359 (name "java-jsonp-api")
13363 (uri (git-reference
13364 (url "https://github.com/eclipse-ee4j/jsonp")
13365 (commit (string-append "1.1-" version "-RELEASE"))))
13366 (file-name (git-file-name name version))
13369 "0zrj03hkr3jdmqlb4ipjr37cqpp2q2814qpmxi7srlwpdqs0ibgc"))))
13370 (build-system ant-build-system)
13372 `(#:jar-name "jsonp-api.jar"
13374 #:source-dir "api/src/main/java"
13375 #:test-dir "api/src/test"))
13376 (home-page "https://eclipse-ee4j.github.io/jsonp/")
13377 (synopsis "JSON Processing in Java")
13378 (description "JSON Processing (JSON-P) is a Java API to process (e.g.
13379 parse, generate, transform and query) JSON messages. It produces and
13380 consumes JSON text in a streaming fashion (similar to StAX API for XML)
13381 and allows building a Java object model for JSON text using API classes
13382 (similar to DOM API for XML).")
13383 ;; either gpl2 only with classpath exception, or epl2.0.
13384 (license (list license:gpl2
13387 (define-public java-jsonp-impl
13389 (inherit java-jsonp-api)
13390 (name "java-jsonp-impl")
13392 `(#:jar-name "jsonp-impl.jar"
13394 #:source-dir "impl/src/main/java"
13395 #:test-dir "impl/src/test"
13397 (modify-phases %standard-phases
13398 (add-before 'build 'copy-resources
13401 "impl/src/main/resources/"
13405 `(("java-jsonp-api" ,java-jsonp-api)))
13406 (description "JSON Processing (JSON-P) is a Java API to process (e.g.
13407 parse, generate, transform and query) JSON messages. This package contains
13408 a reference implementation of that API.")))
13410 (define-public java-xmp
13416 (uri (string-append "http://download.macromedia.com/pub/developer"
13417 "/xmp/sdk/XMPCoreJava-" version ".zip"))
13420 "14nai2mmsg7l5ya2y5mx4w4lr1az3sk2fjz6hiy4zdrsavgvl1g7"))))
13421 (build-system ant-build-system)
13423 `(#:build-target "build"
13424 #:tests? #f; no tests
13426 (modify-phases %standard-phases
13427 (add-after 'unpack 'chdir
13431 (add-before 'build 'fix-timestamp
13433 (substitute* "build.xml"
13434 (("\\$\\{BuildDate\\}") "1970 Jan 01 00:00:00-GMT"))
13437 (install-jars "."))
13438 (add-after 'install 'install-doc
13439 (lambda* (#:key outputs #:allow-other-keys)
13442 (string-append (assoc-ref outputs "out") "/share/doc/java-xmp"))
13445 `(("unzip" ,unzip)))
13446 (home-page "https://www.adobe.com/devnet/xmp.html")
13447 (synopsis "Extensible Metadat Platform (XMP) support in Java")
13448 (description "Adobe's Extensible Metadata Platform (XMP) is a labeling
13449 technology that allows you to embed data about a file, known as metadata,
13450 into the file itself. The XMP Toolkit for Java is based on the C++ XMPCore
13451 library and the API is similar.")
13452 (license license:bsd-3)))
13454 (define-public java-args4j
13456 (name "java-args4j")
13460 (uri (git-reference
13461 (url "https://github.com/kohsuke/args4j")
13462 (commit (string-append "args4j-site-" version))))
13463 (file-name (git-file-name name version))
13466 "0w061fg65qrsm1a0lz0vyprsyidj31krjb459qi2lw0y78xza26s"))))
13467 (build-system ant-build-system)
13469 `(#:jar-name "args4j.jar"
13470 #:source-dir "args4j/src"
13471 #:test-dir "args4j/test"
13473 (list "**/ExampleTest.*"
13474 "**/ExternalConfiguredTest.*" ; fails to find a file
13475 ;; We still don't want to run abstract classes
13478 (modify-phases %standard-phases
13479 (add-before 'check 'fix-test-dir
13481 (substitute* "build.xml"
13482 (("/java\">") "\">"))
13484 (add-before 'build 'copy-resources
13486 (let ((from-prefix "args4j/src/org/kohsuke/args4j/")
13487 (to-prefix "build/classes/org/kohsuke/args4j/"))
13488 (for-each (lambda (f)
13490 (string-append from-prefix f)
13491 (string-append to-prefix (dirname f))))
13492 (list "Messages.properties"
13493 "Messages_de.properties"
13494 "Messages_en.properties"
13495 "Messages_ru.properties"
13496 "spi/Messages.properties"
13497 "spi/Messages_de.properties"
13498 "spi/Messages_en.properties"
13499 "spi/Messages_ru.properties")))
13502 `(("java-junit" ,java-junit)))
13503 (home-page "https://args4j.kohsuke.org/")
13504 (synopsis "Command line parser library")
13505 (description "Args4j is a small Java class library that makes it easy to
13506 parse command line options/arguments in your CUI application.")
13507 (license license:expat)))
13509 (define-public java-metadata-extractor
13511 (name "java-metadata-extractor")
13515 (uri (git-reference
13516 (url "https://github.com/drewnoakes/metadata-extractor")
13518 (file-name (git-file-name name version))
13521 "06yrq0swrl1r40yjbk5kqzjxr04jlkq9lfi711jvfgjf5kp2qinj"))))
13522 (build-system ant-build-system)
13524 `(#:jar-name "metadata-extractor.jar"
13525 #:source-dir "Source"
13528 (modify-phases %standard-phases
13529 (add-before 'check 'fix-test-dir
13531 (substitute* "build.xml"
13532 (("/java\">") "\">"))
13535 `(("java-xmp" ,java-xmp)))
13537 `(("java-hamcrest-core" ,java-hamcrest-core)
13538 ("java-junit" ,java-junit)))
13539 (home-page "https://github.com/drewnoakes/metadata-extractor")
13540 (synopsis "Extract metadata from image and video files")
13541 (description "Metadata-extractor is a straightforward Java library for
13542 reading metadata from image files. It is able to read metadata in Exif,
13543 IPTC, XMP, ICC and more formats.")
13544 (license license:asl2.0)))
13546 (define-public java-svg-salamander
13548 (name "java-svg-salamander")
13552 (uri (git-reference
13553 (url "https://github.com/blackears/svgSalamander")
13554 (commit (string-append "v" version))))
13555 (file-name (git-file-name name version))
13558 "1zv3kjdkf6iqf02x6ln76254y634j2ji448y706a65lsbfjmmicf"))
13559 (modules '((guix build utils)))
13562 (for-each delete-file (find-files "." ".*.jar"))
13565 (search-patches "java-svg-salamander-Fix-non-det.patch"))))
13566 (build-system ant-build-system)
13568 `(#:tests? #f; no tests
13570 (modify-phases %standard-phases
13571 (add-after 'unpack 'chdir
13575 (add-before 'build 'copy-jars
13576 (lambda* (#:key inputs #:allow-other-keys)
13577 (copy-file (car (find-files (assoc-ref inputs "javacc") "\\.jar$"))
13578 "../libraries/javacc.jar")
13579 (copy-file (car (find-files (assoc-ref inputs "ant") "ant\\.jar$"))
13580 "../libraries/ant.jar")
13583 (install-jars "dist")))))
13585 `(("javacc" ,javacc)))
13586 (home-page "https://github.com/blackears/svgSalamander")
13587 (synopsis "SVG engine for Java")
13588 (description "SVG Salamander is an SVG engine for Java that's designed
13589 to be small, fast, and allow programmers to use it with a minimum of fuss.
13590 It's in particular targeted for making it easy to integrate SVG into Java
13591 games and making it much easier for artists to design 2D game content - from
13592 rich interactive menus to charts and graphcs to complex animations.")
13593 (license license:bsd-2)))
13595 (define-public java-jboss-transaction-api-spec
13597 (name "java-jboss-transaction-api-spec")
13598 (version "1.2+1.1.1")
13601 (uri (git-reference
13602 (url "https://github.com/jboss/jboss-transaction-api_spec")
13603 (commit "jboss-transaction-api_1.2_spec-1.1.1.Final")))
13604 (file-name (git-file-name name version))
13607 "1xbfq5hvb86izflydxrqqv3k26c1ba2m0ap6m97shqrsdi9by4wy"))))
13608 (build-system ant-build-system)
13610 `(#:jar-name "java-jboss-transaction-api_spec.jar"
13611 #:source-dir "src/main/java"
13612 #:tests? #f)); no tests
13614 `(("java-cdi-api" ,java-cdi-api)
13615 ("java-jboss-interceptors-api-spec" ,java-jboss-interceptors-api-spec)))
13616 (home-page "https://github.com/jboss/jboss-transaction-api_spec")
13617 (synopsis "Generic transaction management API in Java")
13618 (description "Java-jboss-transaction-api-spec implements the Transactions
13619 API. A transaction is a unit of work containing one or more operations
13620 involving one or more shared resources having ACID (Atomicity, Consistency,
13621 Isolation and Durability) properties.")
13622 ;; either gpl2 only with classpath exception or cddl.
13623 (license (list license:gpl2 license:cddl1.0))))
13625 (define-public java-picocli
13627 (name "java-picocli")
13631 (uri (git-reference
13632 (url "https://github.com/remkop/picocli")
13633 (commit (string-append "v" version))))
13634 (file-name (git-file-name name version))
13637 "1sxp6rxjfgjd98ly14b3d15dvxkm5wg4g46w12jyhmr0kmkaca3c"))))
13638 (build-system ant-build-system)
13640 `(#:jar-name "picocli.jar"
13641 #:source-dir "src/main/java"
13642 ;; Tests require missing dependencies (junitparams, system-rules)
13644 (home-page "https://picocli.info")
13645 (synopsis "REPL for the JVM")
13646 (description "Picocli is a framework for building command line applications
13647 for the JVM. It supports colors, autocompletion, subcommands, and more. Written
13648 in Java, usable from Groovy, Kotlin, Scala, etc.")
13649 (license license:asl2.0)))
13651 (define-public java-jetbrains-annotations
13653 (name "java-jetbrains-annotations")
13657 (uri (git-reference
13658 (url "https://github.com/JetBrains/java-annotations")
13660 (file-name (git-file-name name version))
13663 "0z6i1xs60cd5ffz23c49sq68wn5mphhs3xpar1n93ppama2ng80v"))))
13664 (build-system ant-build-system)
13666 `(#:jar-name "jetbrains-annotations.jar"
13667 #:source-dir "common/src/main/java:java8/src/main/java"
13668 #:tests? #f)); no tests
13669 (home-page "https://github.com/JetBrains/java-annotations")
13670 (synopsis "Annotations for Java and other JVM languages")
13671 (description "This package contains a set of Java annotations which can be
13672 used in JVM-based languages. They serve as an additional documentation and
13673 can be interpreted by IDEs and static analysis tools to improve code analysis.")
13674 (license license:expat)))
13676 (define-public java-javaparser
13678 (name "java-javaparser")
13682 (uri (git-reference
13683 (url "https://github.com/javaparser/javaparser")
13684 (commit (string-append "javaparser-parent-" version))))
13685 (file-name (git-file-name name version))
13688 "1a4jk12ffa31fa0y8vda0739vpfj1206p0nha842b7bixbvwamv9"))
13689 (modules '((guix build utils)))
13692 (for-each delete-file
13693 (find-files "." "\\.jar$"))
13695 (build-system ant-build-system)
13697 `(#:tests? #f; tests require jbehave and junit5
13699 (modify-phases %standard-phases
13700 (add-before 'build 'fill-template
13702 (with-directory-excursion "javaparser-core/src/main"
13703 (copy-file "java-templates/com/github/javaparser/JavaParserBuild.java"
13704 "java/com/github/javaparser/JavaParserBuild.java")
13705 (substitute* "java/com/github/javaparser/JavaParserBuild.java"
13706 (("\\$\\{project.version\\}") ,version)
13707 (("\\$\\{project.name\\}") "javaparser")
13708 (("\\$\\{project.build.finalName\\}") "javaparser")
13709 (("\\$\\{maven.version\\}") "fake")
13710 (("\\$\\{maven.build.version\\}") "fake")
13711 (("\\$\\{build.timestamp\\}") "0")
13712 (("\\$\\{java.vendor\\}") "Guix")
13713 (("\\$\\{java.vendor.url\\}") "https://gnu.org/software/guix")
13714 (("\\$\\{java.version\\}") "1.8")
13715 (("\\$\\{os.arch\\}") "any")
13716 (("\\$\\{os.name\\}") "GuixSD")
13717 (("\\$\\{os.version\\}") "not available")))
13719 (add-before 'build 'generate-javacc
13721 (with-directory-excursion "javaparser-core/src/main/java"
13722 (invoke "java" "javacc" "../javacc/java.jj"))
13724 (add-before 'build 'copy-javacc-support
13726 (with-directory-excursion "javaparser-core/src/main"
13727 (copy-recursively "javacc-support" "java"))
13731 (define (build name)
13732 (format #t "Building ~a~%" name)
13733 (delete-file-recursively "build/classes")
13734 (mkdir-p "build/classes")
13735 (apply invoke "javac"
13736 "-cp" (string-append (getenv "CLASSPATH") ":"
13737 (string-join (find-files "build/jar" ".")
13739 "-d" "build/classes"
13740 (find-files (string-append name "/src/main/java")
13742 (invoke "jar" "-cf" (string-append "build/jar/" name ".jar")
13743 "-C" "build/classes" "."))
13744 (mkdir-p "build/classes")
13745 (mkdir-p "build/test-classes")
13746 (mkdir-p "build/jar")
13747 (build "javaparser-core")
13748 (build "javaparser-core-serialization")
13749 (build "javaparser-core-generators")
13750 (build "javaparser-core-metamodel-generator")
13751 (build "javaparser-symbol-solver-core")
13754 (install-jars "build/jar")))))
13756 `(("java-guava" ,java-guava)
13757 ("java-jboss-javassist" ,java-jboss-javassist)
13758 ("java-jsonp-api" ,java-jsonp-api)))
13760 `(("javacc" ,javacc)))
13761 (home-page "http://javaparser.org/")
13762 (synopsis "Parser for Java")
13764 "This project contains a set of libraries implementing a Java 1.0 - Java
13765 11 Parser with advanced analysis functionalities.")
13767 ;; either lgpl or asl