1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 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 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>
18 ;;; This file is part of GNU Guix.
20 ;;; GNU Guix is free software; you can redistribute it and/or modify it
21 ;;; under the terms of the GNU General Public License as published by
22 ;;; the Free Software Foundation; either version 3 of the License, or (at
23 ;;; your option) any later version.
25 ;;; GNU Guix is distributed in the hope that it will be useful, but
26 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
27 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28 ;;; GNU General Public License for more details.
30 ;;; You should have received a copy of the GNU General Public License
31 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
33 (define-module (gnu packages java)
34 #:use-module ((guix licenses) #:prefix license:)
35 #:use-module (guix packages)
36 #:use-module (guix download)
37 #:use-module (guix hg-download)
38 #:use-module (guix git-download)
39 #:use-module (guix svn-download)
40 #:use-module (guix utils)
41 #:use-module (guix build-system ant)
42 #:use-module (guix build-system gnu)
43 #:use-module (guix build-system trivial)
44 #:use-module (gnu packages)
45 #:use-module (gnu packages attr)
46 #:use-module (gnu packages autotools)
47 #:use-module (gnu packages base)
48 #:use-module (gnu packages bash)
49 #:use-module (gnu packages certs)
50 #:use-module (gnu packages cpio)
51 #:use-module (gnu packages cups)
52 #:use-module (gnu packages compression)
53 #:use-module (gnu packages elf)
54 #:use-module (gnu packages fontutils)
55 #:use-module (gnu packages gawk)
56 #:use-module (gnu packages gettext)
57 #:use-module (gnu packages gl)
58 #:use-module (gnu packages ghostscript) ;lcms
59 #:use-module (gnu packages gnome)
60 #:use-module (gnu packages groovy)
61 #:use-module (gnu packages gtk)
62 #:use-module (gnu packages guile)
63 #:use-module (gnu packages icu4c)
64 #:use-module (gnu packages image)
65 #:use-module (gnu packages java-compression)
66 #:use-module (gnu packages libffi)
67 #:use-module (gnu packages linux) ;alsa
68 #:use-module (gnu packages maths)
69 #:use-module (gnu packages maven)
70 #:use-module (gnu packages maven-parent-pom)
71 #:use-module (gnu packages nss)
72 #:use-module (gnu packages onc-rpc)
73 #:use-module (gnu packages web)
74 #:use-module (gnu packages wget)
75 #:use-module (gnu packages pkg-config)
76 #:use-module (gnu packages perl)
77 #:use-module (gnu packages popt)
78 #:use-module (gnu packages kerberos)
79 #:use-module (gnu packages xml)
80 #:use-module (gnu packages xorg)
81 #:use-module (gnu packages texinfo)
82 #:use-module ((srfi srfi-1) #:select (fold alist-delete))
83 #:use-module (srfi srfi-11)
84 #:use-module (ice-9 match))
88 ;;; Java bootstrap toolchain.
91 ;; The Java bootstrap begins with Jikes, a Java compiler written in C++. We
92 ;; use it to build a simple version of GNU Classpath, the Java standard
93 ;; library. We chose version 0.93 because it is the last version that can be
94 ;; built with Jikes. With Jikes and this version of GNU Classpath we can
95 ;; build JamVM, a Java Virtual Machine. We build version 1.5.1 because it is
96 ;; the last version of JamVM that works with a version of GNU classpath that
97 ;; does not require ECJ. These three packages make up the bootstrap JDK.
99 ;; This is sufficient to build an older version of Ant, which is needed to
100 ;; build an older version of ECJ, an incremental Java compiler, both of which
101 ;; are written in Java.
103 ;; ECJ is needed to build the latest release (0.99) and the development
104 ;; version of GNU Classpath. The development version of GNU Classpath has
105 ;; much more support for Java 1.6 than the latest release, but we need to
106 ;; build 0.99 first to get a working version of javah. ECJ, the development
107 ;; version of GNU Classpath, and the latest version of JamVM make up the
108 ;; second stage JDK with which we can build the OpenJDK with the Icedtea 1.x
109 ;; build framework. We then build the more recent JDKs Icedtea 2.x and
112 (define-public libantlr3c
120 (string-append "https://www.antlr3.org/download/C/"
121 name "-" version ".tar.gz"))
123 (base32 "0lpbnb4dq4azmsvlhp6khq1gy42kyqyjv8gww74g5lm2y6blm4fa"))))
124 (build-system gnu-build-system)
126 `(#:configure-flags (list "--enable-debuginfo" "--disable-static")
127 #:phases (modify-phases %standard-phases
129 (lambda* (#:key build target native-inputs inputs outputs
130 (configure-flags '()) out-of-source? system
132 (let ((configure (assoc-ref %standard-phases 'configure))
133 (enable-64bit? (member system '("aarch64-linux"
136 (configure #:build build #:target target
137 #:native-inputs native-inputs
138 #:inputs inputs #:outputs outputs
139 #:configure-flags `(,(if enable-64bit?
143 #:out-of-source? out-of-source?)))))))
144 (synopsis "ANTLR C Library")
145 (description "LIBANTLR3C provides run-time C libraries for ANTLR3 (ANother
146 Tool for Language Recognition v3).")
147 (home-page "https://www.antlr3.org/")
148 (license license:bsd-3)))
156 (uri (string-append "mirror://sourceforge/jikes/Jikes/"
157 version "/jikes-" version ".tar.bz2"))
160 "1qqldrp74pzpy5ly421srqn30qppmm9cvjiqdngk8hf47dv2rc0c"))))
161 (build-system gnu-build-system)
162 (home-page "http://jikes.sourceforge.net/")
163 (synopsis "Compiler for the Java language")
164 (description "Jikes is a compiler that translates Java source files as
165 defined in The Java Language Specification into the bytecoded instruction set
166 and binary format defined in The Java Virtual Machine Specification.")
167 (license license:ibmpl1.0)))
170 ;; Last release is from 2014, with a few important commits afterwards.
171 (let ((commit "a4bd00df0199e78243847f06cc04ecaea31f8f08"))
174 (version (git-version "0.2.4" "1" commit))
178 (url "https://github.com/ninjudd/drip")
180 (file-name (git-file-name name version))
183 "0wzmjwfyldr3jn49517xd8yn7dgdk8h88qkga3kjyg1zc375ylg2"))))
184 (build-system gnu-build-system)
186 `(("jdk" ,icedtea "jdk")))
188 `(#:tests? #f ; No tests.
190 (modify-phases %standard-phases
192 (add-before 'install 'fix-wrapper
193 (lambda* (#:key inputs #:allow-other-keys)
194 (let ((jps (string-append (assoc-ref inputs "jdk") "/bin/jps")))
195 (substitute* "bin/drip"
197 (("brew update && brew upgrade drip") "guix pull && guix install drip")
199 (("\\(cd -- \"\\$drip_dir\" && make -s\\) \\|\\| exit 1") "")
200 ;; No need to include source:
201 (("\\[\\[ -r \\$drip_dir/src/org/flatland/drip/Main\\.java \\]\\]")
205 (lambda* (#:key outputs #:allow-other-keys)
206 (let* ((out (assoc-ref outputs "out"))
207 (bin (string-append out "/bin"))
208 (share (string-append out "/share/drip")))
212 (install-file (string-append "bin/" file) bin))
213 '("drip" "drip_daemon" "drip_proxy"))
214 (install-file "drip.jar" share)
215 (substitute* (string-append bin "/drip")
216 (("drip_dir=\\$bin_dir/..")
217 (string-append "drip_dir=" share)))
219 (home-page "https://github.com/ninjudd/drip")
220 (synopsis "Faster Java Virtual Machine launching")
221 (description "Drip is a launcher for the Java Virtual Machine that
222 provides much faster startup times than the @command{java} command. The @command{drip}
223 script is intended to be a drop-in replacement for the @command{java} command,
225 (license license:epl1.0))))
227 ;; This is the last version of GNU Classpath that can be built without ECJ.
228 (define classpath-bootstrap
234 (uri (string-append "mirror://gnu/classpath/classpath-"
238 "0i99wf9xd3hw1sj2sazychb9prx8nadxh2clgvk3zlmb28v0jbfz"))
239 (patches (search-patches "classpath-aarch64-support.patch"))))
240 (build-system gnu-build-system)
243 (list (string-append "JAVAC="
244 (assoc-ref %build-inputs "jikes")
249 "--disable-gconf-peer"
255 (modify-phases %standard-phases
256 ;; XXX: This introduces a memory leak as we remove a call to free up
257 ;; memory for the file name string. This was necessary because of a
258 ;; runtime error that would have prevented us from building
259 ;; ant-bootstrap later. See https://issues.guix.gnu.org/issue/36685
260 ;; for the gnarly details.
261 (add-after 'unpack 'remove-call-to-free
263 (substitute* "native/jni/java-io/java_io_VMFile.c"
264 (("result = cpio_isFileExists.*" m)
265 (string-append m "\n//")))
267 (add-after 'install 'install-data
268 (lambda _ (invoke "make" "install-data"))))))
273 ("pkg-config" ,pkg-config)))
274 (home-page "https://www.gnu.org/software/classpath/")
275 (synopsis "Essential libraries for Java")
276 (description "GNU Classpath is a project to create core class libraries
277 for use with runtimes, compilers and tools for the Java programming
279 ;; GPLv2 or later, with special linking exception.
280 (license license:gpl2+)))
282 ;; This is the last version of JamVM that works with a version of GNU
283 ;; classpath that does not require ECJ.
284 (define jamvm-1-bootstrap
290 (uri (string-append "mirror://sourceforge/jamvm/jamvm/"
291 "JamVM%20" version "/jamvm-"
293 (patches (search-patches "jamvm-arm.patch"))
296 "06lhi03l3b0h48pc7x58bk9my2nrcf1flpmglvys3wyad6yraf36"))
299 ;; Remove precompiled software.
300 (delete-file "lib/classes.zip")
302 (build-system gnu-build-system)
305 (list (string-append "--with-classpath-install-dir="
306 (assoc-ref %build-inputs "classpath"))
307 "--disable-int-caching"
308 "--enable-runtime-reloc-checks"
311 `(("classpath" ,classpath-bootstrap)
316 (home-page "http://jamvm.sourceforge.net/")
317 (synopsis "Small Java Virtual Machine")
318 (description "JamVM is a Java Virtual Machine conforming to the JVM
319 specification edition 2 (blue book). It is extremely small. However, unlike
320 other small VMs it supports the full spec, including object finalisation and
322 (license license:gpl2+)))
324 (define ant-bootstrap
326 (name "ant-bootstrap")
327 ;; The 1.10.x series requires Java 8. 1.9.0 and later use generics, which
328 ;; are not supported. The 1.8.x series is the last to use only features
329 ;; supported by Jikes.
333 (uri (string-append "mirror://apache/"
334 "ant/source/apache-ant-"
335 version "-src.tar.bz2"))
338 "1cg0lga887qz5iizh6mlkxp01lciymrhmp7wzxpl6zpnldxmzrjx"))))
339 (build-system gnu-build-system)
341 `(#:imported-modules ((guix build syscalls)
342 ,@%gnu-build-system-modules)
343 #:modules ((srfi srfi-1)
344 (guix build gnu-build-system)
346 (guix build syscalls))
347 #:tests? #f ; no "check" target
349 (modify-phases %standard-phases
353 (lambda* (#:key inputs #:allow-other-keys)
354 (setenv "JAVA_HOME" (assoc-ref inputs "jamvm"))
356 (string-append (assoc-ref inputs "jamvm")
359 (string-append (assoc-ref inputs "jikes")
362 (string-append (assoc-ref inputs "jamvm")
365 ;; Ant complains if this file doesn't exist.
366 (setenv "HOME" "/tmp")
367 (with-output-to-file "/tmp/.ant.properties"
368 (lambda _ (display "")))
370 ;; Use jikes instead of javac for <javac ...> tags in build.xml
371 (setenv "ANT_OPTS" "-Dbuild.compiler=jikes")
373 ;; jikes produces lots of warnings, but they are not very
374 ;; interesting, so we silence them.
375 (setenv "$BOOTJAVAC_OPTS" "-nowarn")
377 ;; Without these JamVM options the build may freeze.
378 (substitute* "bootstrap.sh"
379 (("^\"\\$\\{JAVACMD\\}\" " m)
380 ,@(if (string-prefix? "armhf" (or (%current-system)
381 (%current-target-system)))
382 `((string-append m "-Xnocompact "))
383 `((string-append m "-Xnocompact -Xnoinlining ")))))
385 ;; Disable tests because we are bootstrapping and thus don't have
386 ;; any of the dependencies required to build and run the tests.
387 (substitute* "build.xml"
388 (("depends=\"jars,test-jar\"") "depends=\"jars\""))
389 (invoke "bash" "bootstrap.sh"
390 (string-append "-Ddist.dir="
391 (assoc-ref %outputs "out")))))
392 (add-after 'build 'strip-jar-timestamps ;based on ant-build-system
393 (lambda* (#:key outputs #:allow-other-keys)
394 (define (repack-archive jar)
395 (let* ((dir (mkdtemp! "jar-contents.XXXXXX"))
396 (manifest (string-append dir "/META-INF/MANIFESTS.MF")))
397 (with-directory-excursion dir
398 (invoke "unzip" jar))
400 ;; XXX: copied from (gnu build install)
401 (for-each (lambda (file)
402 (let ((s (lstat file)))
403 (unless (eq? (stat:type s) 'symlink)
404 (utime file 0 0 0 0))))
405 (find-files dir #:directories? #t))
406 ;; It is important that the manifest appears first.
407 (with-directory-excursion dir
408 (let* ((files (find-files "." ".*" #:directories? #t))
409 ;; To ensure that the reference scanner can
410 ;; detect all store references in the jars
411 ;; we disable compression with the "-0" option.
412 (command (if (file-exists? manifest)
413 `("zip" "-0" "-X" ,jar ,manifest
415 `("zip" "-0" "-X" ,jar ,@files))))
416 (apply invoke command)))))
417 (for-each repack-archive
419 (string-append (assoc-ref %outputs "out") "/lib")
425 ("jamvm" ,jamvm-1-bootstrap)
428 (home-page "https://ant.apache.org")
429 (synopsis "Build tool for Java")
431 "Ant is a platform-independent build tool for Java. It is similar to
432 make but is implemented using the Java language, requires the Java platform,
433 and is best suited to building Java projects. Ant uses XML to describe the
434 build process and its dependencies, whereas Make uses Makefile format.")
435 (license license:asl2.0)))
437 ;; Version 3.2.2 is the last version without a dependency on a full-fledged
438 ;; compiler for Java 1.5.
439 (define ecj-bootstrap
441 (name "ecj-bootstrap")
445 (uri (string-append "http://archive.eclipse.org/eclipse/"
446 "downloads/drops/R-" version
447 "-200702121330/ecjsrc.zip"))
450 "05hj82kxd23qaglsjkaqcj944riisjha7acf7h3ljhrjyljx8307"))))
451 ;; It would be so much easier if we could use the ant-build-system, but we
452 ;; cannot as we don't have ant at this point. We use ecj for
453 ;; bootstrapping the JDK.
454 (build-system gnu-build-system)
456 `(#:modules ((guix build gnu-build-system)
459 #:tests? #f ; there are no tests
461 (modify-phases %standard-phases
463 (lambda* (#:key inputs #:allow-other-keys)
466 (cons (string-append (assoc-ref inputs "jamvm")
468 (find-files (string-append
469 (assoc-ref inputs "ant-bootstrap")
475 (lambda* (#:key inputs #:allow-other-keys)
476 ;; The unpack phase enters the "org" directory by mistake.
479 ;; Create a simple manifest to make ecj executable.
480 (with-output-to-file "manifest"
482 (display "Manifest-Version: 1.0
483 Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n")))
486 (and (apply invoke "jikes"
487 (find-files "." "\\.java$"))
488 (invoke "fastjar" "cvfm"
489 "ecj-bootstrap.jar" "manifest" "."))))
491 (lambda* (#:key outputs #:allow-other-keys)
492 (let ((share (string-append (assoc-ref outputs "out")
495 (install-file "ecj-bootstrap.jar" share)
498 `(("ant-bootstrap" ,ant-bootstrap)
501 ("jamvm" ,jamvm-1-bootstrap)
502 ("fastjar" ,fastjar)))
503 (home-page "https://eclipse.org")
504 (synopsis "Eclipse Java development tools core batch compiler")
505 (description "This package provides the Eclipse Java core batch compiler
506 for bootstrapping purposes. The @dfn{Eclipse compiler for Java} (ecj) is a
507 requirement for all GNU Classpath releases after version 0.93.")
508 (license license:epl1.0)))
510 (define ecj-javac-wrapper
511 (package (inherit ecj-bootstrap)
512 (name "ecj-javac-wrapper")
514 (build-system trivial-build-system)
516 `(#:modules ((guix build utils))
519 (use-modules (guix build utils))
520 (let* ((bin (string-append (assoc-ref %outputs "out") "/bin"))
521 (target (string-append bin "/javac"))
522 (guile (string-append (assoc-ref %build-inputs "guile")
524 (ecj (string-append (assoc-ref %build-inputs "ecj-bootstrap")
525 "/share/java/ecj-bootstrap.jar"))
526 (java (string-append (assoc-ref %build-inputs "jamvm")
528 (bootcp (let ((jvmlib (string-append (assoc-ref %build-inputs "classpath")
529 "/share/classpath")))
530 (string-append jvmlib "/glibj.zip:"
531 jvmlib "/tools.zip"))))
533 (with-output-to-file target
535 (format #t "#!~a --no-auto-compile\n!#\n" guile)
537 `(begin (use-modules (ice-9 match)
543 '(("-bootclasspath" ,bootcp)
548 (let ((classpath (getenv "CLASSPATH")))
550 (string-join (list ,ecj
551 ,(string-append (assoc-ref %build-inputs "jamvm")
555 (receive (vm-args other-args)
556 ;; Separate VM arguments from arguments to ECJ.
557 (partition (cut string-prefix? "-J" <>)
558 (fold (lambda (default acc)
559 (if (member (first default) acc)
560 acc (append default acc)))
564 ;; Remove "-J" prefix
565 (map (cut string-drop <> 2) vm-args)
566 '("org.eclipse.jdt.internal.compiler.batch.Main")
567 (cons "-nowarn" other-args)))))
569 (let ((args (cdr (command-line))))
571 (format (current-error-port) "javac: no arguments given!\n")
576 `(("guile" ,guile-2.2)
577 ("ecj-bootstrap" ,ecj-bootstrap)
578 ("jamvm" ,jamvm-1-bootstrap)
579 ("classpath" ,classpath-bootstrap)))
580 (description "This package provides a wrapper around the @dfn{Eclipse
581 compiler for Java} (ecj) with a command line interface that is compatible with
582 the standard javac executable.")))
584 ;; The classpath-bootstrap was built without a virtual machine, so it does not
585 ;; provide a wrapper for javah. We cannot build the development version of
586 ;; Classpath without javah.
587 (define classpath-0.99
588 (package (inherit classpath-bootstrap)
592 (uri (string-append "mirror://gnu/classpath/classpath-"
596 "1j7cby4k66f1nvckm48xcmh352b1d1b33qk7l6hi7dp9i9zjjagr"))
597 (patches (search-patches "classpath-aarch64-support.patch"))))
600 (list (string-append "--with-ecj-jar="
601 (assoc-ref %build-inputs "ecj-bootstrap")
602 "/share/java/ecj-bootstrap.jar")
603 (string-append "JAVAC="
604 (assoc-ref %build-inputs "ecj-javac-wrapper")
606 (string-append "JAVA="
607 (assoc-ref %build-inputs "jamvm")
610 "ac_cv_prog_java_works=yes" ; trust me
614 "--disable-gconf-peer"
620 (modify-phases %standard-phases
621 (add-after 'install 'install-data
622 (lambda _ (invoke "make" "install-data"))))))
624 `(("ecj-bootstrap" ,ecj-bootstrap)
625 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
627 ("jamvm" ,jamvm-1-bootstrap)
628 ("classpath" ,classpath-bootstrap)
630 ("pkg-config" ,pkg-config)))))
632 ;; We need this because classpath-bootstrap does not provide all of the tools
633 ;; we need to build classpath-devel.
634 (define classpath-jamvm-wrappers
635 (package (inherit classpath-0.99)
636 (name "classpath-jamvm-wrappers")
638 (build-system trivial-build-system)
640 `(#:modules ((guix build utils))
643 (use-modules (guix build utils))
644 (let* ((bash (assoc-ref %build-inputs "bash"))
645 (jamvm (assoc-ref %build-inputs "jamvm"))
646 (classpath (assoc-ref %build-inputs "classpath"))
647 (bin (string-append (assoc-ref %outputs "out")
650 (for-each (lambda (tool)
651 (with-output-to-file (string-append bin tool)
653 ,@(if (string-prefix? "armhf" (or (%current-system)
654 (%current-target-system)))
655 `((format #t "#!~a/bin/sh
656 ~a/bin/jamvm -Xnocompact -classpath ~a/share/classpath/tools.zip \
657 gnu.classpath.tools.~a.~a $@"
658 bash jamvm classpath tool
659 (if (string=? "native2ascii" tool)
660 "Native2ASCII" "Main")))
661 `((format #t "#!~a/bin/sh
662 ~a/bin/jamvm -Xnocompact -Xnoinlining -classpath ~a/share/classpath/tools.zip \
663 gnu.classpath.tools.~a.~a $@"
664 bash jamvm classpath tool
665 (if (string=? "native2ascii" tool)
666 "Native2ASCII" "Main"))))))
667 (chmod (string-append bin tool) #o755))
677 ("jamvm" ,jamvm-1-bootstrap)
678 ("classpath" ,classpath-0.99)))
680 (synopsis "Executables from GNU Classpath")
681 (description "This package provides wrappers around the tools provided by
682 the GNU Classpath library. They are executed by the JamVM virtual
685 ;; The last release of GNU Classpath is 0.99 and it happened in 2012. Since
686 ;; then Classpath has gained much more support for Java 1.6.
687 (define-public classpath-devel
688 (let ((commit "e7c13ee0cf2005206fbec0eca677f8cf66d5a103")
690 (package (inherit classpath-bootstrap)
691 (version (string-append "0.99-" revision "." (string-take commit 9)))
695 (url "https://git.savannah.gnu.org/git/classpath.git")
697 (file-name (string-append "classpath-" version "-checkout"))
700 "1v2rww76ww322mpg3s12a1kkc6gkp31bm9gcxs532h0wq285fiw4"))))
703 ;; Ensure that the initial heap size is smaller than the maximum
704 ;; size. By default only Xmx is set, which can lead to invalid
705 ;; memory settings on some machines with a lot of memory.
706 '("JAVAC_MEM_OPT=-J-Xms512M -J-Xmx768M")
708 (list (string-append "--with-ecj-jar="
709 (assoc-ref %build-inputs "ecj-bootstrap")
710 "/share/java/ecj-bootstrap.jar")
711 (string-append "--with-javac="
712 (assoc-ref %build-inputs "ecj-javac-wrapper")
714 (string-append "JAVA="
715 (assoc-ref %build-inputs "jamvm")
718 "ac_cv_prog_java_works=yes" ; trust me
722 "--disable-gconf-peer"
728 (modify-phases %standard-phases
729 ;; XXX The bootstrap phase executes autogen.sh, which fails after
730 ;; complaining about the lack of gettext.
732 (lambda _ (invoke "autoreconf" "-vif")))
733 (add-after 'unpack 'remove-unsupported-annotations
735 (substitute* (find-files "java" "\\.java$")
738 (add-after 'install 'install-data
739 (lambda _ (invoke "make" "install-data"))))))
741 `(("autoconf" ,autoconf)
742 ("automake" ,automake)
744 ("gettext" ,gettext-minimal)
746 ("classpath-jamvm-wrappers" ,classpath-jamvm-wrappers) ; for javah
747 ("ecj-bootstrap" ,ecj-bootstrap)
748 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
750 ("jamvm" ,jamvm-1-bootstrap)
752 ("pkg-config" ,pkg-config))))))
755 (package (inherit jamvm-1-bootstrap)
759 (uri (string-append "mirror://sourceforge/jamvm/jamvm/"
760 "JamVM%20" version "/jamvm-"
764 "1nl0zxz8y5x8gwsrm7n32bry4dx8x70p8z3s9jbdvs8avyb8whkn"))
766 (search-patches "jamvm-2.0.0-disable-branch-patching.patch"))
769 ;; Remove precompiled software.
770 (delete-file "src/classlib/gnuclasspath/lib/classes.zip")
772 (build-system gnu-build-system)
775 (list (string-append "--with-classpath-install-dir="
776 (assoc-ref %build-inputs "classpath")))))
778 `(("classpath" ,classpath-devel)
779 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
783 (define ecj-javac-wrapper-final
784 (package (inherit ecj-javac-wrapper)
786 `(("guile" ,guile-2.2)
787 ("ecj-bootstrap" ,ecj-bootstrap)
789 ("classpath" ,classpath-devel)))))
791 ;; The bootstrap JDK consisting of jamvm, classpath-devel,
792 ;; ecj-javac-wrapper-final cannot build Icedtea 2.x directly, because it's
793 ;; written in Java 7. It can, however, build the unmaintained Icedtea 1.x,
794 ;; which uses Java 6 only.
795 (define-public icedtea-6
802 "http://icedtea.wildebeest.org/download/source/icedtea6-"
806 "0bg9sb4f7qbq77c0zf9m17p47ga0kf0r9622g9p12ysg26jd1ksg"))
807 (modules '((guix build utils)))
810 (substitute* "Makefile.in"
811 ;; do not leak information about the build host
812 (("DISTRIBUTION_ID=\"\\$\\(DIST_ID\\)\"")
813 "DISTRIBUTION_ID=\"\\\"guix\\\"\""))
815 (build-system gnu-build-system)
816 (outputs '("out" ; Java Runtime Environment
817 "jdk" ; Java Development Kit
818 "doc")) ; all documentation
820 `(;; There are many failing tests and many are known to fail upstream.
823 ;; The DSOs use $ORIGIN to refer to each other, but (guix build
824 ;; gremlin) doesn't support it yet, so skip this phase.
825 #:validate-runpath? #f
827 #:modules ((guix build utils)
828 (guix build gnu-build-system)
832 `("--enable-bootstrap"
835 "--with-parallel-jobs"
836 "--disable-downloading"
838 ,(string-append "--with-ecj="
839 (assoc-ref %build-inputs "ecj")
840 "/share/java/ecj-bootstrap.jar")
841 ,(string-append "--with-jar="
842 (assoc-ref %build-inputs "fastjar")
844 ,(string-append "--with-jdk-home="
845 (assoc-ref %build-inputs "classpath"))
846 ,(string-append "--with-java="
847 (assoc-ref %build-inputs "jamvm")
850 (modify-phases %standard-phases
852 (lambda* (#:key source inputs #:allow-other-keys)
853 (invoke "tar" "xvf" source)
854 (chdir (string-append "icedtea6-" ,version))
856 (copy-recursively (assoc-ref inputs "openjdk-src") "openjdk")
857 ;; The convenient OpenJDK source bundle is no longer
858 ;; available for download, so we have to take the sources
859 ;; from the Mercurial repositories and change the Makefile
860 ;; to avoid tests for the OpenJDK zip archive.
861 (with-directory-excursion "openjdk"
862 (for-each (lambda (part)
866 (string-append part "-src"))
869 "langtools" "jaxp" "jaxws")))
870 (with-directory-excursion "openjdk"
871 (invoke "tar" "xvf" (assoc-ref inputs "hotspot-src"))
872 (rename-file "hg-checkout" "hotspot"))
873 (substitute* "patches/freetypeversion.patch"
874 (("REQUIRED_FREETYPE_VERSION = 2.2.1")
875 "REQUIRED_FREETYPE_VERSION = 2.10.1"))
876 (substitute* "Makefile.in"
877 (("echo \"ERROR: No up-to-date OpenJDK zip available\"; exit -1;")
878 "echo \"trust me\";")
879 ;; The contents of the bootstrap directory must be
880 ;; writeable but when copying from the store they are
882 (("mkdir -p lib/rt" line)
883 (string-append line "; chmod -R u+w $(BOOT_DIR)")))
884 (invoke "chmod" "-R" "u+w" "openjdk")))
885 (add-after 'unpack 'use-classpath
886 (lambda* (#:key inputs #:allow-other-keys)
887 (let ((jvmlib (assoc-ref inputs "classpath"))
888 (jamvm (assoc-ref inputs "jamvm")))
889 ;; Classpath does not provide rt.jar.
890 (substitute* "Makefile.in"
891 (("\\$\\(SYSTEM_JDK_DIR\\)/jre/lib/rt.jar")
892 (string-append jvmlib "/share/classpath/glibj.zip")))
893 ;; Make sure we can find all classes.
895 (string-append jvmlib "/share/classpath/glibj.zip:"
896 jvmlib "/share/classpath/tools.zip:"
897 jamvm "/lib/rt.jar"))
899 (string-append "-cp "
900 jvmlib "/share/classpath/glibj.zip:"
901 jvmlib "/share/classpath/tools.zip")))
903 (add-after 'unpack 'patch-patches
905 ;; shebang in patches so that they apply cleanly
906 (substitute* '("patches/jtreg-jrunscript.patch"
907 "patches/hotspot/hs23/drop_unlicensed_test.patch")
908 (("#!/bin/sh") (string-append "#!" (which "sh"))))
910 (add-after 'unpack 'patch-paths
911 (lambda* (#:key inputs #:allow-other-keys)
912 ;; buildtree.make generates shell scripts, so we need to replace
913 ;; the generated shebang
914 (substitute* '("openjdk/hotspot/make/linux/makefiles/buildtree.make")
915 (("/bin/sh") (which "bash")))
917 (let ((corebin (string-append
918 (assoc-ref inputs "coreutils") "/bin/"))
919 (binbin (string-append
920 (assoc-ref inputs "binutils") "/bin/"))
921 (grepbin (string-append
922 (assoc-ref inputs "grep") "/bin/")))
923 (substitute* '("openjdk/jdk/make/common/shared/Defs-linux.gmk"
924 "openjdk/corba/make/common/shared/Defs-linux.gmk")
925 (("UNIXCOMMAND_PATH = /bin/")
926 (string-append "UNIXCOMMAND_PATH = " corebin))
927 (("USRBIN_PATH = /usr/bin/")
928 (string-append "USRBIN_PATH = " corebin))
929 (("DEVTOOLS_PATH *= */usr/bin/")
930 (string-append "DEVTOOLS_PATH = " corebin))
931 (("COMPILER_PATH *= */usr/bin/")
932 (string-append "COMPILER_PATH = "
933 (assoc-ref inputs "gcc") "/bin/"))
934 (("DEF_OBJCOPY *=.*objcopy")
935 (string-append "DEF_OBJCOPY = " (which "objcopy"))))
937 ;; fix path to alsa header
938 (substitute* "openjdk/jdk/make/common/shared/Sanity.gmk"
939 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
940 (string-append "ALSA_INCLUDE="
941 (assoc-ref inputs "alsa-lib")
942 "/include/alsa/version.h")))
944 ;; fix hard-coded utility paths
945 (substitute* '("openjdk/jdk/make/common/shared/Defs-utils.gmk"
946 "openjdk/corba/make/common/shared/Defs-utils.gmk")
948 (string-append "ECHO = " (which "echo")))
950 (string-append "GREP = " (which "grep")))
952 (string-append "EGREP = " (which "egrep")))
954 (string-append "CPIO = " (which "cpio")))
955 (("READELF *=.*readelf")
956 (string-append "READELF = " (which "readelf")))
958 (string-append "AR = " (which "ar")))
960 (string-append "TAR = " (which "tar")))
962 (string-append "AS = " (which "as")))
964 (string-append "LD = " (which "ld")))
966 (string-append "STRIP = " (which "strip")))
968 (string-append "NM = " (which "nm")))
970 (string-append "SH = " (which "bash")))
972 (string-append "FIND = " (which "find")))
974 (string-append "LDD = " (which "ldd")))
975 (("NAWK *=.*(n|g)awk")
976 (string-append "NAWK = " (which "gawk")))
978 (string-append "XARGS = " (which "xargs")))
980 (string-append "UNZIP = " (which "unzip")))
982 (string-append "ZIPEXE = " (which "zip")))
984 (string-append "SED = " (which "sed"))))
986 ;; Some of these timestamps cause problems as they are more than
987 ;; 10 years ago, failing the build process.
989 "openjdk/jdk/src/share/classes/java/util/CurrencyData.properties"
990 (("AZ=AZM;2005-12-31-20-00-00;AZN") "AZ=AZN")
991 (("MZ=MZM;2006-06-30-22-00-00;MZN") "MZ=MZN")
992 (("RO=ROL;2005-06-30-21-00-00;RON") "RO=RON")
993 (("TR=TRL;2004-12-31-22-00-00;TRY") "TR=TRY"))
995 (add-before 'configure 'set-additional-paths
996 (lambda* (#:key inputs #:allow-other-keys)
998 (string-append (assoc-ref inputs "libxrender")
999 "/include/X11/extensions" ":"
1000 (assoc-ref inputs "libxtst")
1001 "/include/X11/extensions" ":"
1002 (assoc-ref inputs "libxinerama")
1003 "/include/X11/extensions" ":"
1004 (or (getenv "CPATH") "")))
1005 (setenv "ALT_CUPS_HEADERS_PATH"
1006 (string-append (assoc-ref inputs "cups")
1008 (setenv "ALT_FREETYPE_HEADERS_PATH"
1009 (string-append (assoc-ref inputs "freetype")
1011 (setenv "ALT_FREETYPE_LIB_PATH"
1012 (string-append (assoc-ref inputs "freetype")
1015 (add-before 'build 'disable-os-version-check
1016 ;; allow build on linux major version change
1018 (setenv "DISABLE_HOTSPOT_OS_VERSION_CHECK" "ok")
1021 (lambda* (#:key outputs #:allow-other-keys)
1022 (let ((doc (string-append (assoc-ref outputs "doc")
1023 "/share/doc/icedtea"))
1024 (jre (assoc-ref outputs "out"))
1025 (jdk (assoc-ref outputs "jdk")))
1026 (copy-recursively "openjdk.build/docs" doc)
1027 (copy-recursively "openjdk.build/j2re-image" jre)
1028 (copy-recursively "openjdk.build/j2sdk-image" jdk))
1031 `(("ant" ,ant-bootstrap)
1032 ("alsa-lib" ,alsa-lib)
1034 ("classpath" ,classpath-devel)
1035 ("coreutils" ,coreutils)
1038 ("ecj" ,ecj-bootstrap)
1039 ("ecj-javac" ,ecj-javac-wrapper-final)
1040 ("fastjar" ,fastjar)
1041 ("fontconfig" ,fontconfig)
1042 ("freetype" ,freetype)
1049 ("libjpeg" ,libjpeg-turbo)
1052 ("libtool" ,libtool)
1054 ("libxcomposite" ,libxcomposite)
1056 ("libxinerama" ,libxinerama)
1057 ("libxrender" ,libxrender)
1058 ("libxslt" ,libxslt) ;for xsltproc
1060 ("libxtst" ,libxtst)
1061 ("mit-krb5" ,mit-krb5)
1063 ("nss-certs" ,nss-certs)
1065 ("pkg-config" ,pkg-config)
1066 ("procps" ,procps) ;for "free", even though I'm not sure we should use it
1076 (url "http://hg.openjdk.java.net/jdk6/jdk6/")
1077 (changeset "jdk6-b41")))
1080 "14q47yfg586fs64w30g8mk92m5dkxsvr36zzh0ra99xk5x0x96mv"))))
1085 (url "http://hg.openjdk.java.net/jdk6/jdk6/jdk/")
1086 (changeset "jdk6-b41")))
1089 "165824nhg1k1dx6zs9dny0j49rmk35jw5b13dmz8c77jfajml4v9"))))
1094 (url "http://hg.openjdk.java.net/jdk6/jdk6/hotspot/")
1095 (changeset "jdk6-b41")))
1098 "07lc1z4k5dj9nrc1wvwmpvxr3xgxrdkdh53xb95skk5ij49yagfd"))
1100 (search-patches "icedtea-6-hotspot-gcc-segfault-workaround.patch"))))
1105 (url "http://hg.openjdk.java.net/jdk6/jdk6/corba/")
1106 (changeset "jdk6-b41")))
1109 "1p9g1r9dnax2iwp7yb59qx7m4nmshqhwmrb2b8jj8zgbd9dl2i3q"))))
1114 (url "http://hg.openjdk.java.net/jdk6/jdk6/langtools/")
1115 (changeset "jdk6-b41")))
1118 "1x52wd67fynbbd9ild6fb4wvba3f5hhwk03qdjfazd0a1qr37z3d"))))
1123 (url "http://hg.openjdk.java.net/jdk6/jdk6/jaxp/")
1124 (changeset "jdk6-b41")))
1127 "0shlqrvzpr4nrkmv215lbxnby63s3yvbdh1yxcayznsyqwa4nlxm"))))
1132 (url "http://hg.openjdk.java.net/jdk6/jdk6/jaxws/")
1133 (changeset "jdk6-b41")))
1136 "0835lkw8vib1xhp8lxnybhlvzdh699hbi4mclxanydjk63zbpxk0"))))))
1137 (home-page "http://icedtea.classpath.org")
1138 (synopsis "Java development kit")
1140 "This package provides the OpenJDK built with the IcedTea build harness.
1141 This version of the OpenJDK is no longer maintained and is only used for
1142 bootstrapping purposes.")
1143 ;; IcedTea is released under the GPL2 + Classpath exception, which is the
1144 ;; same license as both GNU Classpath and OpenJDK.
1145 (license license:gpl2+)))
1147 (define-public icedtea-7
1148 (let* ((version "2.6.13")
1149 (drop (lambda (name hash)
1153 "http://icedtea.classpath.org/download/drops"
1154 "/icedtea7/" version "/" name ".tar.bz2"))
1155 (sha256 (base32 hash))))))
1162 "http://icedtea.wildebeest.org/download/source/icedtea-"
1166 "1w331rdqx1dcx2xb0fmjmrkdc71xqn20fxsgw8by4xhiblh88khh"))
1167 (modules '((guix build utils)))
1170 (substitute* "Makefile.in"
1171 ;; do not leak information about the build host
1172 (("DISTRIBUTION_ID=\"\\$\\(DIST_ID\\)\"")
1173 "DISTRIBUTION_ID=\"\\\"guix\\\"\""))
1175 (build-system gnu-build-system)
1176 (outputs '("out" ; Java Runtime Environment
1177 "jdk" ; Java Development Kit
1178 "doc")) ; all documentation
1180 `(;; There are many test failures. Some are known to
1181 ;; fail upstream, others relate to not having an X
1182 ;; server running at test time, yet others are a
1183 ;; complete mystery to me.
1185 ;; hotspot: passed: 241; failed: 45; error: 2
1186 ;; langtools: passed: 1,934; failed: 26
1190 ;; The DSOs use $ORIGIN to refer to each other, but (guix build
1191 ;; gremlin) doesn't support it yet, so skip this phase.
1192 #:validate-runpath? #f
1194 ;; Apparently, the C locale is needed for some of the tests.
1197 #:modules ((guix build utils)
1198 (guix build gnu-build-system)
1205 ;; TODO: package pcsc and sctp, and add to inputs
1206 `("--disable-system-pcsc"
1207 "--disable-system-sctp"
1208 "--enable-bootstrap"
1211 "--disable-downloading"
1212 "--disable-tests" ;they are run in the check phase instead
1213 "--with-openjdk-src-dir=./openjdk.src"
1214 ,(string-append "--with-jdk-home="
1215 (assoc-ref %build-inputs "jdk")))
1218 (modify-phases %standard-phases
1220 (lambda* (#:key source inputs #:allow-other-keys)
1221 (let ((target (string-append "icedtea-" ,version))
1222 (unpack (lambda* (name #:optional dir)
1224 (string-drop-right name 5))))
1227 (assoc-ref inputs name)
1229 "--strip-components=1")))))
1231 (invoke "tar" "xvf" source
1232 "-C" target "--strip-components=1")
1234 (unpack "openjdk-src" "openjdk.src")
1235 (with-directory-excursion "openjdk.src"
1237 (filter (cut string-suffix? "-drop" <>)
1242 (add-after 'unpack 'patch-bitrot
1244 (substitute* '("patches/boot/revert-6973616.patch"
1245 "openjdk.src/jdk/make/common/shared/Defs-versions.gmk")
1246 (("REQUIRED_FREETYPE_VERSION = 2.2.1")
1247 "REQUIRED_FREETYPE_VERSION = 2.10.1"))
1248 ;; As of attr 2.4.48 this header is no longer
1249 ;; included. It is provided by the libc instead.
1250 (substitute* '("configure"
1251 "openjdk.src/jdk/src/solaris/native/sun/nio/fs/LinuxNativeDispatcher.c")
1252 (("attr/xattr.h") "sys/xattr.h"))
1254 (add-after 'unpack 'fix-x11-extension-include-path
1255 (lambda* (#:key inputs #:allow-other-keys)
1256 (substitute* "openjdk.src/jdk/make/sun/awt/mawt.gmk"
1257 (((string-append "\\$\\(firstword \\$\\(wildcard "
1258 "\\$\\(OPENWIN_HOME\\)"
1259 "/include/X11/extensions\\).*$"))
1260 (string-append (assoc-ref inputs "libxrender")
1261 "/include/X11/extensions"
1262 " -I" (assoc-ref inputs "libxtst")
1263 "/include/X11/extensions"
1264 " -I" (assoc-ref inputs "libxinerama")
1265 "/include/X11/extensions"))
1266 (("\\$\\(wildcard /usr/include/X11/extensions\\)\\)") ""))
1268 (add-after 'unpack 'patch-paths
1270 ;; buildtree.make generates shell scripts, so we need to replace
1271 ;; the generated shebang
1272 (substitute* '("openjdk.src/hotspot/make/linux/makefiles/buildtree.make")
1273 (("/bin/sh") (which "bash")))
1275 (let ((corebin (string-append
1276 (assoc-ref %build-inputs "coreutils") "/bin/"))
1277 (binbin (string-append
1278 (assoc-ref %build-inputs "binutils") "/bin/"))
1279 (grepbin (string-append
1280 (assoc-ref %build-inputs "grep") "/bin/")))
1281 (substitute* '("openjdk.src/jdk/make/common/shared/Defs-linux.gmk"
1282 "openjdk.src/corba/make/common/shared/Defs-linux.gmk")
1283 (("UNIXCOMMAND_PATH = /bin/")
1284 (string-append "UNIXCOMMAND_PATH = " corebin))
1285 (("USRBIN_PATH = /usr/bin/")
1286 (string-append "USRBIN_PATH = " corebin))
1287 (("DEVTOOLS_PATH *= */usr/bin/")
1288 (string-append "DEVTOOLS_PATH = " corebin))
1289 (("COMPILER_PATH *= */usr/bin/")
1290 (string-append "COMPILER_PATH = "
1291 (assoc-ref %build-inputs "gcc") "/bin/"))
1292 (("DEF_OBJCOPY *=.*objcopy")
1293 (string-append "DEF_OBJCOPY = " (which "objcopy"))))
1295 ;; fix path to alsa header
1296 (substitute* "openjdk.src/jdk/make/common/shared/Sanity.gmk"
1297 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
1298 (string-append "ALSA_INCLUDE="
1299 (assoc-ref %build-inputs "alsa-lib")
1300 "/include/alsa/version.h")))
1302 ;; fix hard-coded utility paths
1303 (substitute* '("openjdk.src/jdk/make/common/shared/Defs-utils.gmk"
1304 "openjdk.src/corba/make/common/shared/Defs-utils.gmk")
1306 (string-append "ECHO = " (which "echo")))
1308 (string-append "GREP = " (which "grep")))
1309 (("EGREP *=.*egrep")
1310 (string-append "EGREP = " (which "egrep")))
1312 (string-append "CPIO = " (which "cpio")))
1313 (("READELF *=.*readelf")
1314 (string-append "READELF = " (which "readelf")))
1316 (string-append "AR = " (which "ar")))
1318 (string-append "TAR = " (which "tar")))
1320 (string-append "AS = " (which "as")))
1322 (string-append "LD = " (which "ld")))
1323 (("STRIP *=.*strip")
1324 (string-append "STRIP = " (which "strip")))
1326 (string-append "NM = " (which "nm")))
1328 (string-append "SH = " (which "bash")))
1330 (string-append "FIND = " (which "find")))
1332 (string-append "LDD = " (which "ldd")))
1333 (("NAWK *=.*(n|g)awk")
1334 (string-append "NAWK = " (which "gawk")))
1335 (("XARGS *=.*xargs")
1336 (string-append "XARGS = " (which "xargs")))
1337 (("UNZIP *=.*unzip")
1338 (string-append "UNZIP = " (which "unzip")))
1340 (string-append "ZIPEXE = " (which "zip")))
1342 (string-append "SED = " (which "sed"))))
1344 ;; Some of these timestamps cause problems as they are more than
1345 ;; 10 years ago, failing the build process.
1347 "openjdk.src/jdk/src/share/classes/java/util/CurrencyData.properties"
1348 (("AZ=AZM;2005-12-31-20-00-00;AZN") "AZ=AZN")
1349 (("MZ=MZM;2006-06-30-22-00-00;MZN") "MZ=MZN")
1350 (("RO=ROL;2005-06-30-21-00-00;RON") "RO=RON")
1351 (("TR=TRL;2004-12-31-22-00-00;TRY") "TR=TRY")))
1353 (add-before 'configure 'set-additional-paths
1354 (lambda* (#:key inputs #:allow-other-keys)
1355 (substitute* "openjdk.src/jdk/make/common/shared/Sanity.gmk"
1356 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
1357 (string-append "ALSA_INCLUDE="
1358 (assoc-ref inputs "alsa-lib")
1359 "/include/alsa/version.h")))
1362 (string-append (assoc-ref inputs "libxcomposite")
1363 "/include/X11/extensions" ":"
1364 (assoc-ref inputs "libxrender")
1365 "/include/X11/extensions" ":"
1366 (assoc-ref inputs "libxtst")
1367 "/include/X11/extensions" ":"
1368 (assoc-ref inputs "libxinerama")
1369 "/include/X11/extensions" ":"
1370 (or (getenv "CPATH") "")))
1371 (setenv "ALT_OBJCOPY" (which "objcopy"))
1372 (setenv "ALT_CUPS_HEADERS_PATH"
1373 (string-append (assoc-ref inputs "cups")
1375 (setenv "ALT_FREETYPE_HEADERS_PATH"
1376 (string-append (assoc-ref inputs "freetype")
1378 (setenv "ALT_FREETYPE_LIB_PATH"
1379 (string-append (assoc-ref inputs "freetype")
1382 (add-before 'build 'disable-os-version-check
1383 ;; allow build on linux major version change
1385 (setenv "DISABLE_HOTSPOT_OS_VERSION_CHECK" "ok")
1387 (add-before 'check 'fix-test-framework
1389 ;; Fix PATH in test environment
1390 (substitute* "test/jtreg/com/sun/javatest/regtest/Main.java"
1391 (("PATH=/bin:/usr/bin")
1392 (string-append "PATH=" (getenv "PATH"))))
1393 (substitute* "test/jtreg/com/sun/javatest/util/SysEnv.java"
1394 (("/usr/bin/env") (which "env")))
1395 (substitute* "openjdk.src/hotspot/test/test_env.sh"
1396 (("/bin/rm") (which "rm"))
1397 (("/bin/cp") (which "cp"))
1398 (("/bin/mv") (which "mv")))
1400 (add-before 'check 'fix-hotspot-tests
1402 (with-directory-excursion "openjdk.src/hotspot/test/"
1403 (substitute* "jprt.config"
1404 (("PATH=\"\\$\\{path4sdk\\}\"")
1405 (string-append "PATH=" (getenv "PATH")))
1406 (("make=/usr/bin/make")
1407 (string-append "make=" (which "make"))))
1408 (substitute* '("runtime/6626217/Test6626217.sh"
1409 "runtime/7110720/Test7110720.sh")
1410 (("/bin/rm") (which "rm"))
1411 (("/bin/cp") (which "cp"))
1412 (("/bin/mv") (which "mv"))))
1414 (add-before 'check 'fix-jdk-tests
1416 (with-directory-excursion "openjdk.src/jdk/test/"
1417 (substitute* "com/sun/jdi/JdbReadTwiceTest.sh"
1418 (("/bin/pwd") (which "pwd")))
1419 (substitute* "com/sun/jdi/ShellScaffold.sh"
1420 (("/bin/kill") (which "kill")))
1421 (substitute* "start-Xvfb.sh"
1422 ;;(("/usr/bin/X11/Xvfb") (which "Xvfb"))
1423 (("/usr/bin/nohup") (which "nohup")))
1424 (substitute* "javax/security/auth/Subject/doAs/Test.sh"
1425 (("/bin/rm") (which "rm")))
1426 (substitute* "tools/launcher/MultipleJRE.sh"
1427 (("echo \"#!/bin/sh\"")
1428 (string-append "echo \"#!" (which "rm") "\""))
1429 (("/usr/bin/zip") (which "zip")))
1430 (substitute* "com/sun/jdi/OnThrowTest.java"
1431 (("#!/bin/sh") (string-append "#!" (which "sh"))))
1432 (substitute* "java/lang/management/OperatingSystemMXBean/GetSystemLoadAverage.java"
1433 (("/usr/bin/uptime") (which "uptime")))
1434 (substitute* "java/lang/ProcessBuilder/Basic.java"
1435 (("/usr/bin/env") (which "env"))
1436 (("/bin/false") (which "false"))
1437 (("/bin/true") (which "true"))
1438 (("/bin/cp") (which "cp"))
1439 (("/bin/sh") (which "sh")))
1440 (substitute* "java/lang/ProcessBuilder/FeelingLucky.java"
1441 (("/bin/sh") (which "sh")))
1442 (substitute* "java/lang/ProcessBuilder/Zombies.java"
1443 (("/usr/bin/perl") (which "perl"))
1444 (("/bin/ps") (which "ps"))
1445 (("/bin/true") (which "true")))
1446 (substitute* "java/lang/Runtime/exec/ConcurrentRead.java"
1447 (("/usr/bin/tee") (which "tee")))
1448 (substitute* "java/lang/Runtime/exec/ExecWithDir.java"
1449 (("/bin/true") (which "true")))
1450 (substitute* "java/lang/Runtime/exec/ExecWithInput.java"
1451 (("/bin/cat") (which "cat")))
1452 (substitute* "java/lang/Runtime/exec/ExitValue.java"
1453 (("/bin/sh") (which "sh"))
1454 (("/bin/true") (which "true"))
1455 (("/bin/kill") (which "kill")))
1456 (substitute* "java/lang/Runtime/exec/LotsOfDestroys.java"
1457 (("/usr/bin/echo") (which "echo")))
1458 (substitute* "java/lang/Runtime/exec/LotsOfOutput.java"
1459 (("/usr/bin/cat") (which "cat")))
1460 (substitute* "java/lang/Runtime/exec/SleepyCat.java"
1461 (("/bin/cat") (which "cat"))
1462 (("/bin/sleep") (which "sleep"))
1463 (("/bin/sh") (which "sh")))
1464 (substitute* "java/lang/Runtime/exec/StreamsSurviveDestroy.java"
1465 (("/bin/cat") (which "cat")))
1466 (substitute* "java/rmi/activation/CommandEnvironment/SetChildEnv.java"
1467 (("/bin/chmod") (which "chmod")))
1468 (substitute* "java/util/zip/ZipFile/Assortment.java"
1469 (("/bin/sh") (which "sh"))))
1473 ;; The "make check-*" targets always return zero, so we need to
1474 ;; check for errors in the associated log files to determine
1475 ;; whether any tests have failed.
1476 (use-modules (ice-9 rdelim))
1477 (let* ((error-pattern (make-regexp "^(Error|FAILED):.*"))
1478 (checker (lambda (port)
1480 (let ((line (read-line port)))
1482 ((eof-object? line) #t)
1483 ((regexp-exec error-pattern line)
1484 (error "test failed"))
1486 (run-test (lambda (test)
1487 (invoke "make" test)
1488 (call-with-input-file
1489 (string-append "test/" test ".log")
1491 (when #f ; skip tests
1492 (run-test "check-hotspot")
1493 (run-test "check-langtools")
1494 (run-test "check-jdk"))
1497 (lambda* (#:key outputs #:allow-other-keys)
1498 (let ((doc (string-append (assoc-ref outputs "doc")
1499 "/share/doc/icedtea"))
1500 (jre (assoc-ref outputs "out"))
1501 (jdk (assoc-ref outputs "jdk")))
1502 (copy-recursively "openjdk.build/docs" doc)
1503 (copy-recursively "openjdk.build/j2re-image" jre)
1504 (copy-recursively "openjdk.build/j2sdk-image" jdk))
1506 ;; Some of the libraries in the lib/amd64 folder link to libjvm.so.
1507 ;; But that shared object is located in the server/ folder, so it
1508 ;; cannot be found. This phase creates a symbolic link in the
1509 ;; lib/amd64 folder so that the other libraries can find it.
1512 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
1514 ;; FIXME: Find the bug in the build system, so that this symlink is
1516 (add-after 'install 'install-libjvm
1517 (lambda* (#:key inputs outputs #:allow-other-keys)
1518 (let* ((lib-path (string-append (assoc-ref outputs "out")
1519 ;; See 'INSTALL_ARCH_DIR' in
1521 ,(match (%current-system)
1530 ;; We need a catch-all, dropping
1531 ;; '-linux' works in most cases.
1536 (%current-system) 6)))))))
1537 (symlink (string-append lib-path "/server/libjvm.so")
1538 (string-append lib-path "/libjvm.so")))
1540 ;; By default IcedTea only generates an empty keystore. In order to
1541 ;; be able to use certificates in Java programs we need to generate a
1542 ;; keystore from a set of certificates. For convenience we use the
1543 ;; certificates from the nss-certs package.
1544 (add-after 'install 'install-keystore
1545 (lambda* (#:key inputs outputs #:allow-other-keys)
1546 (let* ((keystore "cacerts")
1547 (certs-dir (string-append (assoc-ref inputs "nss-certs")
1549 (keytool (string-append (assoc-ref outputs "jdk")
1551 (define (extract-cert file target)
1552 (call-with-input-file file
1554 (call-with-output-file target
1556 (let loop ((line (read-line in 'concat))
1559 ((eof-object? line) #t)
1560 ((string-prefix? "-----BEGIN" line)
1562 (loop (read-line in 'concat) #t))
1563 ((string-prefix? "-----END" line)
1567 (when copying? (display line out))
1568 (loop (read-line in 'concat) copying?)))))))))
1569 (define (import-cert cert)
1570 (format #t "Importing certificate ~a\n" (basename cert))
1571 (let ((temp "tmpcert"))
1572 (extract-cert cert temp)
1573 (let ((port (open-pipe* OPEN_WRITE keytool
1575 "-alias" (basename cert)
1576 "-keystore" keystore
1577 "-storepass" "changeit"
1579 (display "yes\n" port)
1580 (when (not (zero? (status:exit-val (close-pipe port))))
1581 (format #t "failed to import ~a\n" cert)))
1582 (delete-file temp)))
1584 ;; This is necessary because the certificate directory contains
1585 ;; files with non-ASCII characters in their names.
1586 (setlocale LC_ALL "en_US.utf8")
1587 (setenv "LC_ALL" "en_US.utf8")
1589 (for-each import-cert (find-files certs-dir "\\.pem$"))
1590 (mkdir-p (string-append (assoc-ref outputs "out")
1592 (mkdir-p (string-append (assoc-ref outputs "jdk")
1593 "/jre/lib/security"))
1595 ;; The cacerts files we are going to overwrite are chmod'ed as
1596 ;; read-only (444) in icedtea-8 (which derives from this
1597 ;; package). We have to change this so we can overwrite them.
1598 (chmod (string-append (assoc-ref outputs "out")
1599 "/lib/security/" keystore) #o644)
1600 (chmod (string-append (assoc-ref outputs "jdk")
1601 "/jre/lib/security/" keystore) #o644)
1603 (install-file keystore
1604 (string-append (assoc-ref outputs "out")
1606 (install-file keystore
1607 (string-append (assoc-ref outputs "jdk")
1608 "/jre/lib/security"))
1613 "0l34ikyf62hbzlf9032alzkkqvf7bpmckz4gvirvph755w7gka8l"))
1616 "050gv2jbg1pi6qkn8w18bwpbklfa5b0kymjvan9pncddbj8m84fz"))
1619 "1k6yldwnxfzdg5926r1nlfv8d1r1j7rlp2nkz6gqh05vgyamnfhl"))
1622 "110j7jlz47x2gg6f7653x12mssan5kvj9l9h1m1c8c92drfxbqyk"))
1625 "0d1mca38ksxvdskp9im3pp7fdijhj1n3lwq9w13r9s4v3qyskgdd"))
1628 "0nq5236fzxn3p6x8cgncl56mzcmsj07q9gymysnws4c8byc6n0qj"))
1633 "http://icedtea.classpath.org/downloads/drops"
1634 "/icedtea7/" version "/hotspot.tar.bz2"))
1637 "17bdv39n4lh8l5737c96f3xgamx4y305m067p01cywgp7zaddqws"))
1638 (patches (search-patches
1639 "icedtea-7-hotspot-gcc-segfault-workaround.patch"))))
1640 ("ant" ,ant-bootstrap)
1642 ("coreutils" ,coreutils)
1643 ("diffutils" ,diffutils) ;for tests
1646 ("libtool" ,libtool)
1647 ("pkg-config" ,pkg-config)
1653 ("fastjar" ,fastjar)
1654 ("libxslt" ,libxslt) ;for xsltproc
1655 ("nss-certs" ,nss-certs)
1657 ("procps" ,procps) ;for "free", even though I'm not sure we should use it
1658 ("jdk" ,icedtea-6 "jdk")))
1660 `(("alsa-lib" ,alsa-lib)
1663 ("libxcomposite" ,libxcomposite)
1665 ("libxtst" ,libxtst)
1667 ("libxinerama" ,libxinerama)
1668 ("libxrender" ,libxrender)
1669 ("libjpeg" ,libjpeg-turbo)
1671 ("mit-krb5" ,mit-krb5)
1674 ("fontconfig" ,fontconfig)
1675 ("freetype" ,freetype)
1679 (home-page "http://icedtea.classpath.org")
1680 (synopsis "Java development kit")
1682 "This package provides the Java development kit OpenJDK built with the
1683 IcedTea build harness.")
1685 ;; 'configure' lists "mips" and "mipsel", but not "mips64el'.
1686 (supported-systems (delete "mips64el-linux" %supported-systems))
1688 ;; IcedTea is released under the GPL2 + Classpath exception, which is the
1689 ;; same license as both GNU Classpath and OpenJDK.
1690 (license license:gpl2+))))
1692 (define-public icedtea-8
1693 (let* ((version "3.7.0")
1694 (drop (lambda (name hash)
1698 "http://icedtea.classpath.org/download/drops"
1699 "/icedtea8/" version "/" name ".tar.xz"))
1700 (sha256 (base32 hash))))))
1701 (package (inherit icedtea-7)
1706 "http://icedtea.wildebeest.org/download/source/icedtea-"
1710 "09yqzn8rpccs7cyv89hhy5zlznpgqw5x3jz0w1ccp0cz1vgs8l5w"))
1711 (modules '((guix build utils)))
1714 (substitute* '("configure"
1716 ;; Do not embed build time
1717 (("(DIST_ID=\"Custom build).*$" _ prefix)
1718 (string-append prefix "\"\n"))
1719 ;; Do not leak information about the build host
1720 (("DIST_NAME=\"\\$build_os\"")
1721 "DIST_NAME=\"guix\""))
1724 `(#:imported-modules
1725 ((guix build ant-build-system)
1726 (guix build syscalls)
1727 ,@%gnu-build-system-modules)
1728 ,@(substitute-keyword-arguments (package-arguments icedtea-7)
1729 ((#:modules modules)
1730 `((guix build utils)
1731 (guix build gnu-build-system)
1732 ((guix build ant-build-system) #:prefix ant:)
1737 ((#:configure-flags flags)
1738 `(let ((jdk (assoc-ref %build-inputs "jdk")))
1739 `( ;;"--disable-bootstrap"
1740 "--enable-bootstrap"
1742 "--disable-downloading"
1743 "--disable-system-pcsc"
1744 "--disable-system-sctp"
1745 "--disable-tests" ;they are run in the check phase instead
1746 "--with-openjdk-src-dir=./openjdk.src"
1747 ,(string-append "--with-jdk-home=" jdk))))
1749 `(modify-phases ,phases
1750 (delete 'fix-x11-extension-include-path)
1751 (delete 'patch-paths)
1752 (delete 'set-additional-paths)
1753 (delete 'patch-patches)
1754 (delete 'patch-bitrot)
1755 ;; Prevent the keytool from recording the current time when
1756 ;; adding certificates at build time.
1757 (add-after 'unpack 'patch-keystore
1759 (substitute* "openjdk.src/jdk/src/share/classes/sun/security/provider/JavaKeyStore.java"
1760 (("date = new Date\\(\\);")
1762 date = (System.getenv(\"SOURCE_DATE_EPOCH\") != null) ?\
1763 new Date(Long.parseLong(System.getenv(\"SOURCE_DATE_EPOCH\"))) :\
1766 (add-after 'unpack 'patch-jni-libs
1767 ;; Hardcode dynamically loaded libraries.
1769 (let* ((library-path (search-path-as-string->list
1770 (getenv "LIBRARY_PATH")))
1771 (find-library (lambda (name)
1774 (string-append "lib" name ".so")))))
1777 (catch 'decoding-error
1780 (("VERSIONED_JNI_LIB_NAME\\(\"(.*)\", \"(.*)\"\\)"
1782 (format #f "\"~a\"" (find-library name)))
1783 (("JNI_LIB_NAME\\(\"(.*)\"\\)" _ name)
1784 (format #f "\"~a\"" (find-library name)))))
1786 ;; Those are safe to skip.
1787 (format (current-error-port)
1788 "warning: failed to substitute: ~a~%"
1790 (find-files "openjdk.src/jdk/src/solaris/native"
1794 (lambda* (#:key outputs #:allow-other-keys)
1795 (let ((doc (string-append (assoc-ref outputs "doc")
1796 "/share/doc/icedtea"))
1797 (jre (assoc-ref outputs "out"))
1798 (jdk (assoc-ref outputs "jdk")))
1799 (copy-recursively "openjdk.build/docs" doc)
1800 (copy-recursively "openjdk.build/images/j2re-image" jre)
1801 (copy-recursively "openjdk.build/images/j2sdk-image" jdk)
1802 ;; Install the nss.cfg file to JRE to enable SSL/TLS
1804 (copy-file (string-append jdk "/jre/lib/security/nss.cfg")
1805 (string-append jre "/lib/security/nss.cfg"))
1807 (add-after 'install 'strip-jar-timestamps
1808 (assoc-ref ant:%standard-phases 'strip-jar-timestamps)))))))
1810 `(("jdk" ,icedtea-7 "jdk")
1813 "1mj6xgmw31i6qd30qi9dmv7160fbcfq5ikz1jwjihdg2793il19p"))
1816 "1wb8k5zm40zld0986dvmlh5xh3gyixbg9h26sl662zy92amhmyyg"))
1819 "11ma4zz0599cy70xd219v7a8vin7p96xrhhz3wsaw6cjhkzpagah"))
1822 "14m1y0z0fbm5z5zjw3vnq85py8dma84bi3f9cw8rhdyc6skk8q4i"))
1825 "09andnm6xaasnp963hgx42yiflifiljp9z7z85jrfyc5z8a5whmf"))
1828 "0s6lcpc0zckz2fnq98aqf28nz9y3wbi41a3kyaqqa2abwbkm1zwl"))
1831 "15wizy123vhk40chl1b4p552jf2pw2hdww0myf11qab425axz4nw"))
1836 "http://icedtea.classpath.org/download/drops"
1837 "/icedtea8/" version "/hotspot.tar.xz"))
1840 "1ciz1w9j0kz7s1dxdhyqq71nla9icyz6qvn0b9z2zgkklqa98qmm"))
1841 (patches (search-patches
1842 "icedtea-7-hotspot-gcc-segfault-workaround.patch"))))
1845 "19pzl3ppaw8j6r5cnyp8qiw3hxijh3hdc46l39g5yfhdl4pr4hpa"))
1848 "0k33anxdzw1icn072wynfmmdjhsv50hay0j1sfkfxny12rb3vgdy"))
1849 ,@(fold alist-delete (package-native-inputs icedtea-7)
1850 '("jdk" "openjdk-src" "corba-drop" "jaxp-drop" "jaxws-drop"
1851 "jdk-drop" "langtools-drop" "hotspot-drop")))))))
1853 (define-public openjdk9
1859 (uri "https://hg.openjdk.java.net/jdk/jdk/archive/3cc80be736f2.tar.bz2")
1860 (file-name (string-append name "-" version ".tar.bz2"))
1863 "01ihmyf7k5z17wbr7xig7y40l9f01d5zjgkcmawn1102hw5kchpq"))
1864 (modules '((guix build utils)))
1867 (for-each delete-file
1868 (find-files "." ".*.(bin|exe|jar)$"))
1870 (build-system gnu-build-system)
1871 (outputs '("out" "jdk" "doc"))
1873 `(#:tests? #f; require jtreg
1874 #:make-flags '("all")
1876 ((guix build syscalls)
1877 ,@%gnu-build-system-modules)
1879 (modify-phases %standard-phases
1880 (add-after 'patch-source-shebangs 'fix-java-shebangs
1882 ;; This file was "fixed" by patch-source-shebangs, but it requires
1883 ;; this exact first line.
1884 (substitute* "jdk/make/data/blacklistedcertsconverter/blacklisted.certs.pem"
1885 (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))
1888 (lambda* (#:key inputs outputs #:allow-other-keys)
1889 ;; TODO: unbundle libpng and lcms
1890 (invoke "bash" "./configure"
1891 (string-append "--with-freetype=" (assoc-ref inputs "freetype"))
1892 "--disable-freetype-bundling"
1893 "--disable-warnings-as-errors"
1894 "--disable-hotspot-gtest"
1895 "--with-giflib=system"
1896 "--with-libjpeg=system"
1897 (string-append "--prefix=" (assoc-ref outputs "out")))
1899 (add-before 'build 'write-source-revision-file
1901 (with-output-to-file ".src-rev"
1903 (display ,version)))
1906 (lambda* (#:key make-flags parallel-build? #:allow-other-keys)
1907 (apply invoke "make"
1908 `(,@(if parallel-build?
1909 (list (string-append "JOBS="
1910 (number->string (parallel-job-count))))
1913 ;; Some of the libraries in the lib/ folder link to libjvm.so.
1914 ;; But that shared object is located in the server/ folder, so it
1915 ;; cannot be found. This phase creates a symbolic link in the
1916 ;; lib/ folder so that the other libraries can find it.
1919 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
1921 ;; FIXME: Find the bug in the build system, so that this symlink is
1923 (add-after 'install 'install-libjvm
1924 (lambda* (#:key inputs outputs #:allow-other-keys)
1925 (let* ((lib-out (string-append (assoc-ref outputs "out")
1927 (lib-jdk (string-append (assoc-ref outputs "jdk")
1929 (symlink (string-append lib-jdk "/server/libjvm.so")
1930 (string-append lib-jdk "/libjvm.so"))
1931 (symlink (string-append lib-out "/server/libjvm.so")
1932 (string-append lib-out "/libjvm.so")))
1935 (lambda* (#:key outputs #:allow-other-keys)
1936 (let ((out (assoc-ref outputs "out"))
1937 (jdk (assoc-ref outputs "jdk"))
1938 (doc (assoc-ref outputs "doc"))
1939 (images (car (find-files "build" ".*-server-release"
1940 #:directories? #t))))
1941 (copy-recursively (string-append images "/images/jdk") jdk)
1942 (copy-recursively (string-append images "/images/jre") out)
1943 (copy-recursively (string-append images "/images/docs") doc))
1945 (add-after 'install 'strip-zip-timestamps
1946 (lambda* (#:key outputs #:allow-other-keys)
1947 (use-modules (guix build syscalls))
1948 (for-each (lambda (zip)
1949 (let ((dir (mkdtemp! "zip-contents.XXXXXX")))
1950 (with-directory-excursion dir
1951 (invoke "unzip" zip))
1953 (for-each (lambda (file)
1954 (let ((s (lstat file)))
1955 (unless (eq? (stat:type s) 'symlink)
1956 (format #t "reset ~a~%" file)
1957 (utime file 0 0 0 0))))
1958 (find-files dir #:directories? #t))
1959 (with-directory-excursion dir
1960 (let ((files (find-files "." ".*" #:directories? #t)))
1961 (apply invoke "zip" "-0" "-X" zip files)))))
1962 (find-files (assoc-ref outputs "doc") ".*.zip$"))
1965 `(("alsa-lib" ,alsa-lib)
1967 ("fontconfig" ,fontconfig)
1968 ("freetype" ,freetype)
1972 ("libjpeg" ,libjpeg-turbo)
1976 ("libxcomposite" ,libxcomposite)
1978 ("libxinerama" ,libxinerama)
1979 ("libxrender" ,libxrender)
1981 ("libxtst" ,libxtst)))
1983 `(("icedtea-8" ,icedtea-8)
1984 ("icedtea-8:jdk" ,icedtea-8 "jdk")
1985 ;; XXX: The build system fails with newer versions of GNU Make.
1986 ("make@4.2" ,gnu-make-4.2)
1990 (home-page "https://openjdk.java.net/projects/jdk9/")
1991 (synopsis "Java development kit")
1993 "This package provides the Java development kit OpenJDK.")
1994 (license license:gpl2+)))
1996 (define-public openjdk10
2003 (uri "http://hg.openjdk.java.net/jdk/jdk/archive/6fa770f9f8ab.tar.bz2")
2004 (file-name (string-append name "-" version ".tar.bz2"))
2007 "0zywq2203b4hx4jms9vbwvjcj1d3k2v3qpx4s33729fkpmid97r4"))
2008 (patches (search-patches
2009 "openjdk-10-idlj-reproducibility.patch"))
2010 (modules '((guix build utils)))
2013 (for-each delete-file (find-files "." ".*.(bin|exe|jar)$"))
2016 (substitute-keyword-arguments (package-arguments openjdk9)
2018 `(modify-phases ,phases
2019 (replace 'fix-java-shebangs
2021 ;; This file was "fixed" by patch-source-shebangs, but it requires
2022 ;; this exact first line.
2023 (substitute* "make/data/blacklistedcertsconverter/blacklisted.certs.pem"
2024 (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))
2027 (lambda* (#:key inputs outputs #:allow-other-keys)
2028 (invoke "bash" "./configure"
2029 (string-append "--with-freetype=" (assoc-ref inputs "freetype"))
2030 "--disable-freetype-bundling"
2031 "--disable-warnings-as-errors"
2032 "--disable-hotspot-gtest"
2033 "--with-giflib=system"
2034 "--with-libjpeg=system"
2035 "--with-native-debug-symbols=zipped"
2036 (string-append "--prefix=" (assoc-ref outputs "out")))
2039 `(("openjdk9" ,openjdk9)
2040 ("openjdk9:jdk" ,openjdk9 "jdk")
2041 ("make@4.2" ,gnu-make-4.2)
2046 (define-public openjdk11
2052 (uri "http://hg.openjdk.java.net/jdk/jdk/archive/76072a077ee1.tar.bz2")
2053 (file-name (string-append name "-" version ".tar.bz2"))
2056 "0v705w1s9lrqalzahir78pk397rkk9gfvzq821yv8h3xha0bqi6w"))
2057 (modules '((guix build utils)))
2060 (for-each delete-file (find-files "." ".*.(bin|exe|jar)$"))
2062 (build-system gnu-build-system)
2063 (outputs '("out" "jdk" "doc"))
2065 `(#:imported-modules
2066 ((guix build syscalls)
2067 (ice-9 binary-ports)
2069 ,@%gnu-build-system-modules)
2070 #:tests? #f; requires jtreg
2071 ;; TODO package jtreg
2073 `("--disable-option-checking" ; --enable-fast-install default flag errors otherwise
2074 "--disable-warnings-as-errors"
2075 ;; make validate-runpath pass, see: http://issues.guix.info/issue/32894
2076 "--with-native-debug-symbols=zipped"
2077 ;; do not use the bundled libraries
2078 "--with-giflib=system"
2079 "--with-lcms=system"
2080 "--with-libjpeg=system"
2081 "--with-libpng=system"
2082 "--with-version-pre="
2083 ;; allow the build system to locate the system freetype
2084 ,(string-append "--with-freetype-include="
2085 (assoc-ref %build-inputs "freetype") "/include")
2086 ,(string-append "--with-freetype-lib="
2087 (assoc-ref %build-inputs "freetype") "/lib"))
2089 (modify-phases %standard-phases
2090 (add-after 'patch-source-shebangs 'fix-java-shebangs
2092 ;; This file was "fixed" by patch-source-shebangs, but it requires
2093 ;; this exact first line.
2094 (substitute* "make/data/blacklistedcertsconverter/blacklisted.certs.pem"
2095 (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))
2097 (add-before 'build 'write-source-revision-file
2099 (with-output-to-file ".src-rev"
2101 (display ,version)))
2104 (lambda* (#:key parallel-build? make-flags #:allow-other-keys)
2105 (apply invoke "make" "all"
2106 `(,@(if parallel-build?
2107 (list (string-append "JOBS="
2108 (number->string (parallel-job-count))))
2111 ;; jdk 11 does not build jre by default any more
2112 ;; building it anyways
2113 ;; for further information see:
2114 ;; https://github.com/AdoptOpenJDK/openjdk-build/issues/356
2115 (add-after 'build 'build-jre
2116 (lambda* (#:key parallel-build? make-flags #:allow-other-keys)
2117 (apply invoke "make" "legacy-jre-image"
2118 `(,@(if parallel-build?
2119 (list (string-append "JOBS="
2120 (number->string (parallel-job-count))))
2124 (lambda* (#:key outputs #:allow-other-keys)
2125 (let ((out (assoc-ref outputs "out"))
2126 (jdk (assoc-ref outputs "jdk"))
2127 (doc (assoc-ref outputs "doc"))
2128 (images (car (find-files "build" ".*-server-release"
2129 #:directories? #t))))
2130 (copy-recursively (string-append images "/images/jdk") jdk)
2131 (copy-recursively (string-append images "/images/jre") out)
2132 (copy-recursively (string-append images "/images/docs") doc))
2134 ;; Some of the libraries in the lib/ folder link to libjvm.so.
2135 ;; But that shared object is located in the server/ folder, so it
2136 ;; cannot be found. This phase creates a symbolic link in the
2137 ;; lib/ folder so that the other libraries can find it.
2140 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
2142 ;; FIXME: Find the bug in the build system, so that this symlink is
2144 (add-after 'install 'install-libjvm
2145 (lambda* (#:key inputs outputs #:allow-other-keys)
2146 (let* ((lib-out (string-append (assoc-ref outputs "out")
2148 (lib-jdk (string-append (assoc-ref outputs "jdk")
2150 (symlink (string-append lib-jdk "/server/libjvm.so")
2151 (string-append lib-jdk "/libjvm.so"))
2152 (symlink (string-append lib-out "/server/libjvm.so")
2153 (string-append lib-out "/libjvm.so")))
2155 (add-after 'install 'strip-character-data-timestamps
2156 (lambda* (#:key outputs #:allow-other-keys)
2157 (use-modules (guix build syscalls))
2158 (let ((archive (string-append
2159 (assoc-ref outputs "jdk") "/lib/src.zip"))
2160 (dir (mkdtemp! "zip-contents.XXXXXX")))
2161 (with-directory-excursion dir
2162 (invoke "unzip" archive))
2163 (delete-file archive)
2164 (with-directory-excursion dir
2165 (let ((char-data-files (find-files "." "CharacterData.*")))
2166 (for-each (lambda (file)
2168 (((string-append "This file was generated "
2169 "AUTOMATICALLY from a template "
2171 (string-append "This file was generated "
2172 "AUTOMATICALLY from a template "
2175 (with-directory-excursion dir
2176 (let ((files (find-files "." ".*" #:directories? #t)))
2177 (apply invoke "zip" "-0" "-X" archive files))))))
2178 (add-after 'strip-character-data-timestamps 'strip-archive-timestamps
2179 (lambda* (#:key outputs #:allow-other-keys)
2180 (use-modules (guix build syscalls)
2181 (ice-9 binary-ports)
2183 (letrec ((repack-archive
2185 (let ((dir (mkdtemp! "zip-contents.XXXXXX")))
2186 (with-directory-excursion dir
2187 (invoke "unzip" archive))
2188 (delete-file archive)
2189 (for-each (compose repack-archive canonicalize-path)
2190 (find-files dir "(ct.sym|.*.jar)$"))
2191 (let ((reset-file-timestamp
2193 (let ((s (lstat file)))
2194 (unless (eq? (stat:type s) 'symlink)
2195 (format #t "reset ~a~%" file)
2196 (utime file 0 0 0 0))))))
2197 (for-each reset-file-timestamp
2198 (find-files dir #:directories? #t)))
2199 (with-directory-excursion dir
2200 (let ((files (find-files "." ".*" #:directories? #t)))
2201 (apply invoke "zip" "-0" "-X" archive files)))))))
2202 (for-each repack-archive
2203 (find-files (assoc-ref outputs "doc") ".*.zip$"))
2204 (for-each repack-archive
2205 (find-files (assoc-ref outputs "jdk")
2206 ".*.(zip|jar|diz)$"))
2207 (repack-archive (string-append (assoc-ref outputs "jdk") "/lib/ct.sym"))
2210 (call-with-input-file file-name
2212 (let ((header #vu8(#x4a #x4d #x01 #x00)))
2213 (if (equal? (get-bytevector-n
2214 file (bytevector-length header))
2216 (let* ((header-length (bytevector-length header))
2217 (temp-file (mkstemp!
2219 "temp-file.XXXXXX")))
2220 (temp-filename (port-filename temp-file))
2222 (- (stat:size (stat file))
2224 (sendfile temp-file file content-length header-length)
2225 (delete-file file-name)
2226 (close-port temp-file)
2227 (repack-archive (canonicalize-path temp-filename))
2228 (call-with-output-file file-name
2230 (put-bytevector file header)
2231 (call-with-input-file temp-filename
2235 (stat:size (stat temp-file)) 0)))))))))))))
2236 (for-each repack-jmod
2237 (find-files (assoc-ref outputs "jdk") ".*.jmod$")))
2239 (add-after 'install 'remove-timestamp-from-api-summary
2240 (lambda* (#:key outputs #:allow-other-keys)
2241 (substitute* (string-append (assoc-ref outputs "doc")
2242 "/api/overview-summary.html")
2243 (("Generated by javadoc \\(11-internal\\).*$")
2244 "Generated by javadoc (11-internal) -->\n"))
2247 `(("alsa-lib" ,alsa-lib)
2249 ("fontconfig" ,fontconfig)
2250 ("freetype" ,freetype)
2253 ("libjpeg" ,libjpeg-turbo)
2256 ("libxext" ,libxext)
2257 ("libxrender" ,libxrender)
2259 ("libxtst" ,libxtst)))
2261 `(("autoconf" ,autoconf)
2262 ("openjdk10" ,openjdk10)
2263 ("openjdk10:jdk" ,openjdk10 "jdk")
2264 ("make" ,gnu-make-4.2)
2265 ("pkg-config" ,pkg-config)
2269 (home-page "https://openjdk.java.net/projects/jdk/11/")
2270 (synopsis "Java development kit")
2272 "This package provides the Java development kit OpenJDK.")
2273 (license license:gpl2+)))
2275 (define-public openjdk12
2282 (uri "http://hg.openjdk.java.net/jdk/jdk/archive/0276cba45aac.tar.bz2")
2283 (file-name (string-append name "-" version ".tar.bz2"))
2286 "0mbhdrk12b6878kby0flnbak7444dlpm0ihlmf92vk59y1c02bc2"))
2287 (modules '((guix build utils)))
2290 (for-each delete-file (find-files "." ".*.(bin|exe|jar)$"))
2293 `(("alsa-lib" ,alsa-lib)
2295 ("fontconfig" ,fontconfig)
2296 ("freetype" ,freetype)
2299 ("libjpeg" ,libjpeg-turbo)
2302 ("libxext" ,libxext)
2303 ("libxrandr" ,libxrandr)
2304 ("libxrender" ,libxrender)
2306 ("libxtst" ,libxtst)))
2308 `(("autoconf" ,autoconf)
2309 ("openjdk11" ,openjdk11)
2310 ("openjdk11:jdk" ,openjdk11 "jdk")
2311 ("make@4.2" ,gnu-make-4.2)
2312 ("pkg-config" ,pkg-config)
2316 (home-page "https://openjdk.java.net/projects/jdk/12")))
2318 (define-public openjdk13
2325 (uri "http://hg.openjdk.java.net/jdk/jdk13/archive/9c250a7600e1.tar.bz2")
2326 (file-name (string-append name "-" version ".tar.bz2"))
2329 "0v0ljvx5dyzp96dw4z4ksw3pvasil7783mgnmd1wk9gads5ab8iq"))
2330 (modules '((guix build utils)))
2333 (for-each delete-file (find-files "." ".*.(bin|exe|jar)$"))
2336 `(("alsa-lib" ,alsa-lib)
2338 ("fontconfig" ,fontconfig)
2339 ("freetype" ,freetype)
2342 ("libjpeg" ,libjpeg-turbo)
2345 ("libxext" ,libxext)
2346 ("libxrandr" ,libxrandr)
2347 ("libxrender" ,libxrender)
2349 ("libxtst" ,libxtst)))
2351 `(("autoconf" ,autoconf)
2352 ("openjdk12:jdk" ,openjdk12 "jdk")
2353 ("make@4.2" ,gnu-make-4.2)
2354 ("pkg-config" ,pkg-config)
2358 (home-page "https://openjdk.java.net/projects/jdk/13")))
2360 (define-public openjdk14
2367 (uri "http://hg.openjdk.java.net/jdk/jdk14/archive/bc54620a3848.tar.bz2")
2368 (file-name (string-append name "-" version ".tar.bz2"))
2371 "0z485pk7r1xpw8004g4nrwrzj17sabgx8yfdbxwfvzkjp8qyajch"))
2372 (modules '((guix build utils)))
2375 ;; The m4 macro uses 'help' to search for builtins, which is
2376 ;; not available in bash-minimal
2377 (substitute* "make/autoconf/basics.m4"
2378 (("if help") "if command -v"))
2379 (for-each delete-file (find-files "." ".*.(bin|exe|jar)$"))
2382 `(("alsa-lib" ,alsa-lib)
2384 ("fontconfig" ,fontconfig)
2385 ("freetype" ,freetype)
2388 ("libjpeg" ,libjpeg-turbo)
2391 ("libxext" ,libxext)
2392 ("libxrandr" ,libxrandr)
2393 ("libxrender" ,libxrender)
2395 ("libxtst" ,libxtst)))
2397 `(("autoconf" ,autoconf)
2398 ("make@4.2" ,gnu-make-4.2)
2399 ("openjdk13:jdk" ,openjdk13 "jdk")
2400 ("pkg-config" ,pkg-config)
2404 (home-page "https://openjdk.java.net/projects/jdk/14")))
2406 (define-public icedtea icedtea-8)
2409 (define-public ant/java8
2410 (package (inherit ant-bootstrap)
2415 (uri (string-append "mirror://apache/ant/source/apache-ant-"
2416 version "-src.tar.gz"))
2419 "10p3dh77lkzzzcy32dk9azljixzadp46fggjfbvgkl8mmb8cxxv8"))
2420 (modules '((guix build utils)))
2423 (for-each delete-file
2424 (find-files "lib/optional" "\\.jar$"))
2427 (substitute-keyword-arguments (package-arguments ant-bootstrap)
2429 `(modify-phases ,phases
2430 (add-after 'unpack 'remove-scripts
2431 ;; Remove bat / cmd scripts for DOS as well as the antRun and runant
2434 (for-each delete-file
2435 (find-files "src/script"
2436 "(.*\\.(bat|cmd)|runant.*|antRun.*)"))
2439 (lambda* (#:key inputs outputs #:allow-other-keys)
2440 (setenv "JAVA_HOME" (assoc-ref inputs "jdk"))
2442 ;; Disable tests to avoid dependency on hamcrest-core, which needs
2443 ;; Ant to build. This is necessary in addition to disabling the
2444 ;; "check" phase, because the dependency on "test-jar" would always
2445 ;; result in the tests to be run.
2446 (substitute* "build.xml"
2447 (("depends=\"jars,test-jar\"") "depends=\"jars\""))
2448 (invoke "bash" "bootstrap.sh"
2449 (string-append "-Ddist.dir="
2450 (assoc-ref outputs "out")))))))))
2452 `(("jdk" ,icedtea-8 "jdk")
2454 ("unzip" ,unzip)))))
2456 ;; The 1.9.x series is the last that can be built with GCJ. The 1.10.x series
2459 (package (inherit ant/java8)
2463 (uri (string-append "mirror://apache/ant/source/apache-ant-"
2464 version "-src.tar.gz"))
2467 "1k28mka0m3isy9yr8gz84kz1f3f879rwaxrd44vdn9xbfwvwk86n"))))
2469 `(("jdk" ,icedtea-7 "jdk")
2471 ("unzip" ,unzip)))))
2473 (define-public ant-apache-bcel
2476 (name "ant-apache-bcel")
2478 (substitute-keyword-arguments (package-arguments ant/java8)
2480 `(modify-phases ,phases
2481 (add-after 'unpack 'link-bcel
2482 (lambda* (#:key inputs #:allow-other-keys)
2483 (for-each (lambda (file)
2485 (string-append "lib/optional/"
2487 (find-files (assoc-ref inputs "java-commons-bcel")
2490 (add-after 'build 'install
2491 (lambda* (#:key outputs #:allow-other-keys)
2492 (let* ((out (assoc-ref outputs "out"))
2493 (share (string-append out "/share/java"))
2494 (bin (string-append out "/bin"))
2495 (lib (string-append out "/lib")))
2497 (install-file (string-append lib "/ant-apache-bcel.jar") share)
2498 (delete-file-recursively bin)
2499 (delete-file-recursively lib)
2502 `(("java-commons-bcel" ,java-commons-bcel)
2503 ,@(package-inputs ant/java8)))))
2505 (define-public ant-junit
2510 (substitute-keyword-arguments (package-arguments ant/java8)
2512 `(modify-phases ,phases
2513 (add-after 'unpack 'link-junit
2514 (lambda* (#:key inputs #:allow-other-keys)
2515 (for-each (lambda (file)
2517 (string-append "lib/optional/"
2519 (find-files (assoc-ref inputs "java-junit")
2522 (add-after 'build 'install
2523 (lambda* (#:key outputs #:allow-other-keys)
2524 (let* ((out (assoc-ref outputs "out"))
2525 (share (string-append out "/share/java"))
2526 (bin (string-append out "/bin"))
2527 (lib (string-append out "/lib")))
2529 (install-file (string-append lib "/ant-junit.jar") share)
2530 (delete-file-recursively bin)
2531 (delete-file-recursively lib)
2534 `(("java-junit" ,java-junit)
2535 ,@(package-inputs ant/java8)))))
2537 (define-public java-openjfx-build
2539 (name "java-openjfx-build")
2540 ;; This is a java-8 version
2545 (url "http://hg.openjdk.java.net/openjfx/8u-dev/rt")
2546 (changeset (string-append
2547 (string-join (string-split version #\.) "u")
2549 (file-name (string-append name "-" version "-checkout"))
2550 (modules '((guix build utils)))
2553 ;; Delete included gradle jar
2554 (delete-file-recursively "gradle/wrapper")
2558 "0yg38mwpivswccv9n96k06x3iv82i4px1a9xg9l8dswzwmfj259f"))
2559 (patches (search-patches "java-openjfx-build-jdk_version.patch"))))
2560 (build-system ant-build-system)
2562 `(#:jar-name "java-openjfx.jar"
2563 #:source-dir "buildSrc/src/main/java"
2564 #:test-dir "buildSrc/src/test"
2566 (modify-phases %standard-phases
2567 (add-before 'configure 'generate-jsl-parser
2569 (invoke "antlr3" "-o"
2570 "buildSrc/src/main/java/com/sun/scenario/effect/compiler"
2571 "buildSrc/src/main/antlr/JSL.g"))))))
2573 `(("antlr3" ,antlr3)
2574 ("java-stringtemplate" ,java-stringtemplate)))
2576 `(("java-junit" ,java-junit)
2577 ("java-hamcrest-core" ,java-hamcrest-core)))
2578 (home-page "https://openjfx.io")
2579 (synopsis "Graphical application toolkit in Java")
2580 (description "OpenJFX is a client application platform for desktop,
2581 mobile and embedded systems built on Java. Its goal is to produce a
2582 modern, efficient, and fully featured toolkit for developing rich client
2583 applications. This package contains base classes for the OpenJFX
2584 distribution and helper classes for building other parts of the
2586 (license license:gpl2))) ;gpl2 only, with classpath exception
2588 (define-public java-openjfx-base
2589 (package (inherit java-openjfx-build)
2590 (name "java-openjfx-base")
2592 `(#:jar-name "java-openjfx-base.jar"
2593 #:source-dir "modules/base/src/main/java:modules/base/src/main/java8:modules/base/src/main/version-info"
2594 #:test-dir "modules/base/src/test"
2596 (modify-phases %standard-phases
2597 (add-before 'check 'remove-empty-file
2599 (with-directory-excursion "modules/base/src/test/java"
2600 ;; These files are completely commented, but junit expects them to
2601 ;; contain a class, so tests fail.
2603 "com/sun/javafx/property/adapter/PropertyDescriptorTest.java")
2605 "com/sun/javafx/property/adapter/ReadOnlyPropertyDescriptorTest.java")
2606 (delete-file "javafx/beans/property/PropertiesTest.java")
2608 "javafx/beans/property/adapter/ReadOnlyJavaBeanPropertyBuilder_General_Test.java")
2610 (delete-file "com/sun/javafx/runtime/VersionInfoTest.java"))
2613 `(("java-openjfx-build" ,java-openjfx-build)))
2614 (description "OpenJFX is a client application platform for desktop,
2615 mobile and embedded systems built on Java. Its goal is to produce a
2616 modern, efficient, and fully featured toolkit for developing rich client
2617 applications. This package contains base classes for the OpenJFX
2620 (define-public java-openjfx-graphics
2621 (package (inherit java-openjfx-build)
2622 (name "java-openjfx-graphics")
2624 `(#:jar-name "java-openjfx-graphics.jar"
2625 #:source-dir "modules/graphics/src/main/java"
2626 #:tests? #f; require X
2627 #:test-dir "modules/graphics/src/test"))
2629 `(("java-openjfx-base" ,java-openjfx-base)
2630 ("java-swt" ,java-swt)))
2631 (description "OpenJFX is a client application platform for desktop,
2632 mobile and embedded systems built on Java. Its goal is to produce a
2633 modern, efficient, and fully featured toolkit for developing rich client
2634 applications. This package contains graphics-related classes for the
2635 OpenJFX distribution.")))
2637 (define-public java-openjfx-media
2638 (package (inherit java-openjfx-build)
2639 (name "java-openjfx-media")
2641 `(("java-openjxf-graphics" ,java-openjfx-graphics)))
2643 `(#:jar-name "java-openjfx-media.jar"
2644 #:source-dir "modules/media/src/main/java"
2645 #:tests? #f)); no tests
2646 (description "OpenJFX is a client application platform for desktop,
2647 mobile and embedded systems built on Java. Its goal is to produce a
2648 modern, efficient, and fully featured toolkit for developing rich client
2649 applications. This package contains media-related classes for the
2650 OpenJFX distribution.")))
2652 (define-public javacc-4
2659 (url "https://github.com/javacc/javacc")
2660 (commit "release_41")))
2661 (file-name (string-append "javacc-" version "-checkout"))
2664 "07ysav7j8r1c6h8qxrgqk6lwdp74ly0ad1935lragxml0qqc3ka0"))
2665 (modules '((guix build utils)))
2666 ;; delete bundled jars
2667 (snippet '(begin (delete-file-recursively "lib") #t))))
2668 (build-system ant-build-system)
2670 ;; /tmp/guix-build-javacc-4.1.drv-0/source/test/javacodeLA/build.xml:60:
2675 (modify-phases %standard-phases
2676 ;; Delete tests to avoid build failure (we don't run them anyway).
2677 (add-after 'unpack 'delete-tests
2679 (for-each delete-file
2680 '("src/org/javacc/JavaCCTestCase.java"
2681 "src/org/javacc/parser/ExpansionTest.java"
2682 "src/org/javacc/parser/OptionsTest.java"
2683 "src/org/javacc/jjtree/JJTreeOptionsTest.java"))
2684 (for-each delete-file-recursively
2685 '("src/org/javacc/parser/test"
2686 "src/org/javacc/jjdoc/test"))
2688 (replace 'install (install-jars "bin/lib")))))
2689 (home-page "https://javacc.org/")
2690 (synopsis "Java parser generator")
2691 (description "Java Compiler Compiler (JavaCC) is the most popular parser
2692 generator for use with Java applications. A parser generator is a tool that
2693 reads a grammar specification and converts it to a Java program that can
2694 recognize matches to the grammar. In addition to the parser generator itself,
2695 JavaCC provides other standard capabilities related to parser generation such
2696 as tree building (via a tool called JJTree included with JavaCC), actions,
2698 (license license:bsd-3)))
2700 ;; javacc-3, as javacc-4 is not properly bootstrapped: is contains a javacc.jar
2701 ;; in the bootstrap/ directory.
2702 (define-public javacc-3
2709 (url "https://github.com/javacc/javacc.git")
2710 (commit "release_32")))
2711 (file-name (string-append "javacc-" version "-checkout"))
2714 "1pyf1xyh8gk83nxqn2v2mdws32l68ydznha41cxa4l2kkbq1v1g3"))))
2718 (modify-phases %standard-phases
2719 (add-before 'build 'set-java-version
2724 (("debug=") "source=\"1.4\" debug=")))
2725 (find-files "." "build.xml"))
2727 (replace 'install (install-jars "bin/lib")))))))
2729 (define-public javacc
2737 (url "https://github.com/javacc/javacc")
2739 (file-name (git-file-name "javacc" version))
2741 (base32 "18kkak3gda93gr25jrgy6q00g0jr8i24ri2wk4kybz1v234fxx9i"))
2742 (modules '((guix build utils)))
2743 ;; Delete bundled jars.
2744 (snippet '(begin (for-each delete-file-recursively
2745 '("bootstrap" "lib"))
2748 `(#:make-flags ; bootstrap from javacc-4
2749 (list (string-append "-Dbootstrap-jar="
2750 (assoc-ref %build-inputs "javacc")
2751 "/share/java/javacc.jar"))
2752 #:test-target "test"
2754 (modify-phases %standard-phases
2755 (replace 'install (install-jars "target"))
2756 (add-after 'install 'install-bin
2757 (lambda* (#:key outputs inputs #:allow-other-keys)
2758 (let* ((out (assoc-ref outputs "out"))
2759 (dir (string-append out "/share/java"))
2760 (bin (string-append out "/bin"))
2761 (javacc (string-append bin "/javacc")))
2763 (with-output-to-file javacc
2766 (string-append "#!/bin/sh\n"
2767 (assoc-ref inputs "jdk") "/bin/java"
2768 " -cp " dir "/javacc.jar" " `basename $0`" " $*"))))
2769 (chmod javacc #o755)
2770 ;; symlink to different names to affect the first argument and
2771 ;; change the behavior of the jar file.
2772 (symlink javacc (string-append bin "/jjdoc"))
2773 (symlink javacc (string-append bin "/jjtree"))
2777 `(("javacc" ,javacc-4)))))
2779 ;; This is the last 3.x release of ECJ
2780 (define-public java-ecj-3
2786 (uri (string-append "http://archive.eclipse.org/eclipse/"
2787 "downloads/drops/R-" version
2788 "-201301310800/ecjsrc-" version ".jar"))
2791 "01mdj14jw11g1jfnki4fi8229p0c6zzckd38zqy2w4m3cjcvsx04"))))
2792 (build-system ant-build-system)
2794 `(#:tests? #f ; none included
2795 #:jdk ,icedtea-7 ; doesn't build with JDK8+
2796 #:make-flags (list "-f" "src/build.xml")
2797 #:build-target "build"
2799 (modify-phases %standard-phases
2800 (add-after 'unpack 'fix-manifest
2802 ;; Record the main class to make ecj executable.
2803 (with-atomic-file-replacement "src/META-INF/MANIFEST.MF"
2805 (display "Manifest-Version: 1.0
2806 Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n"
2809 (replace 'install (install-jars ".")))))
2810 (home-page "https://eclipse.org")
2811 (synopsis "Eclipse Java development tools core batch compiler")
2812 (description "This package provides the Eclipse Java core batch compiler.")
2813 (license license:epl1.0)))
2815 ;; This is needed for java-cisd-args4j
2816 (define-public java-ecj-3.5
2817 (package (inherit java-ecj-3)
2820 (method url-fetch/zipbomb)
2821 (uri (string-append "http://archive.eclipse.org/eclipse/"
2822 "downloads/drops/R-" version
2823 "-200909170800/ecjsrc-" version ".zip"))
2826 "1vnl2mavisc567bip736xzsvvbjif5279wc4a7pbdik5wlir8qr7"))))
2827 (build-system ant-build-system)
2829 `(#:tests? #f ; none included
2830 #:jdk ,icedtea-7 ; doesn't build with JDK8+
2831 #:build-target "build"
2833 (modify-phases %standard-phases
2834 (add-after 'unpack 'fix-manifest
2836 ;; Record the main class to make ecj executable.
2837 (with-atomic-file-replacement "META-INF/MANIFEST.MF"
2840 (display "Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n"
2843 (replace 'install (install-jars ".")))))
2845 `(("unzip" ,unzip)))))
2847 (define-public java-ecj
2848 (package (inherit java-ecj-3)
2854 "http://archive.eclipse.org/eclipse/downloads/drops4/R-"
2856 "-201703010400/ecjsrc-"
2861 "11cfgsdgznja1pvlxkjbqykxd7pcd5655vkm7s44xmahmap15gpl"))))
2863 `(#:tests? #f ; none included
2864 #:build-target "build"
2866 (modify-phases %standard-phases
2867 (add-after 'unpack 'fix-build.xml
2869 (substitute* "src/build.xml"
2873 (add-after 'unpack 'fix-prop
2875 (substitute* "src/build.xml"
2876 (("^.*properties.*$")
2877 "<include name=\"**/*.properties\"/>
2878 <include name=\"**/*.props\"/>"))
2880 (add-before 'build 'chdir
2884 (replace 'install (install-jars ".")))))))
2886 (define-public java-cisd-base
2887 (let ((revision 38938)
2888 (base-version "14.12.0"))
2890 (name "java-cisd-base")
2891 (version (string-append base-version "-" (number->string revision)))
2895 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2896 "base/tags/release/"
2897 (version-major+minor base-version)
2898 ".x/" base-version "/base/"))
2899 (revision revision)))
2900 (file-name (string-append "java-cisd-base-" version "-checkout"))
2903 "1i5adyf7nzclb0wydgwa1az04qliid8035vpahaandmkmigbnxiy"))
2904 (modules '((guix build utils)))
2907 ;; Delete included gradle jar
2908 (delete-file-recursively "gradle/wrapper")
2909 ;; Delete pre-built native libraries
2910 (delete-file-recursively "libs")
2912 (build-system ant-build-system)
2914 `(#:make-flags '("-file" "build/build.xml")
2915 #:test-target "jar-test"
2918 (modify-phases %standard-phases
2919 (add-after 'unpack 'unpack-build-resources
2920 (lambda* (#:key inputs #:allow-other-keys)
2921 (copy-recursively (assoc-ref inputs "build-resources")
2922 "../build_resources")
2924 (add-after 'unpack-build-resources 'fix-dependencies
2925 (lambda* (#:key inputs #:allow-other-keys)
2926 (substitute* "build/build.xml"
2927 (("\\$\\{lib\\}/testng/testng-jdk15.jar")
2928 (string-append (assoc-ref inputs "java-testng")
2929 "/share/java/java-testng.jar"))
2930 (("\\$\\{lib\\}/commons-lang/commons-lang.jar")
2931 (string-append (assoc-ref inputs "java-commons-lang")
2932 "/share/java/commons-lang-"
2933 ,(package-version java-commons-lang) ".jar"))
2934 (("\\$\\{lib\\}/commons-io/commons-io.jar")
2935 (string-append (assoc-ref inputs "java-commons-io")
2936 "/lib/m2/commons-io/commons-io/"
2937 ,(package-version java-commons-io)
2939 ,(package-version java-commons-io)
2941 ;; Remove dependency on svn
2942 (("<build-info.*") "")
2943 (("\\$\\{revision.number\\}")
2944 ,(number->string revision))
2945 (("\\$\\{version.number\\}") ,base-version))
2946 ;; Remove dependency on classycle
2947 (substitute* "../build_resources/ant/build-common.xml"
2948 (("<taskdef name=\"dependency-checker.*") "")
2949 (("classname=\"classycle.*") "")
2950 (("classpath=\"\\$\\{lib\\}/classycle.*") ""))
2952 ;; A few tests fail because of the lack of a proper /etc/groups and
2953 ;; /etc/passwd file in the build container.
2954 (add-after 'unpack 'disable-broken-tests
2956 (substitute* "sourceTest/java/ch/systemsx/cisd/base/AllTests.java"
2957 (("Unix.isOperational\\(\\)") "false"))
2959 ;; These decorators are almost useless and pull in an unpackaged
2961 (add-after 'unpack 'remove-useless-decorators
2963 (substitute* "source/java/ch/systemsx/cisd/base/unix/Unix.java"
2965 (("import ch.rinn.restrictions.Private;") ""))
2966 (substitute* "sourceTest/java/ch/systemsx/cisd/base/unix/UnixTests.java"
2968 (("import ch.rinn.restrictions.Friend;") ""))
2970 (add-before 'configure 'build-native-code
2971 (lambda* (#:key inputs #:allow-other-keys)
2972 (let ((jdk (assoc-ref inputs "jdk"))
2973 (dir ,(match (%current-system)
2976 ((or "armhf-linux" "aarch64-linux")
2978 ((or "x86_64-linux")
2980 (_ "unknown-Linux"))))
2981 (with-directory-excursion "source/c"
2982 (invoke "gcc" "-shared" "-O3" "-fPIC" "unix.c"
2983 (string-append "-I" jdk "/include")
2984 (string-append "-I" jdk "/include/linux")
2986 (invoke "gcc" "-shared" "-O3" "-fPIC"
2987 "-DMACHINE_BYTE_ORDER=1"
2995 (string-append "-I" jdk "/include")
2996 (string-append "-I" jdk "/include/linux")
2997 "-o" "libnativedata.so"))
2998 (install-file "source/c/libunix.so"
2999 (string-append "libs/native/unix/" dir))
3000 (install-file "source/c/libnativedata.so"
3001 (string-append "libs/native/nativedata/" dir))
3003 ;; In the "check" phase we only build the test executable.
3004 (add-after 'check 'run-tests
3006 (invoke "java" "-jar" "targets/dist/sis-base-test.jar")
3007 (delete-file "targets/dist/sis-base-test.jar")
3009 (replace 'install (install-jars "targets/dist")))))
3011 `(("jdk" ,icedtea-8)
3012 ("java-commons-lang" ,java-commons-lang)
3013 ("java-commons-io" ,java-commons-io)
3014 ("java-testng" ,java-testng)
3019 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
3020 "base/tags/release/"
3021 (version-major+minor base-version)
3023 "/build_resources/"))
3024 (revision revision)))
3027 "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk"))))))
3028 (home-page "http://svnsis.ethz.ch")
3029 (synopsis "Utility classes for libraries from ETH Zurich")
3030 (description "This library supplies some utility classes needed for
3031 libraries from the SIS division at ETH Zurich like jHDF5.")
3032 ;; The C sources are under a non-copyleft license, which looks like a
3033 ;; variant of the BSD licenses. The whole package is under the ASL2.0.
3034 (license (list license:asl2.0
3035 (license:non-copyleft "file://source/c/COPYING"))))))
3037 (define-public java-cisd-args4j
3038 (let ((revision 39162)
3039 (base-version "9.11.2"))
3041 (name "java-cisd-args4j")
3042 (version (string-append base-version "-" (number->string revision)))
3046 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
3047 "args4j/tags/release/"
3048 (version-major+minor base-version)
3049 ".x/" base-version "/args4j/"))
3050 (revision revision)))
3051 (file-name (string-append "java-cisd-args4j-" version "-checkout"))
3054 "0hhqznjaivq7ips7mkwas78z42s6djsm20rrs7g1zd59rcsakxn2"))))
3055 (build-system ant-build-system)
3057 `(#:make-flags '("-file" "build/build.xml")
3058 #:tests? #f ; there are no tests
3059 ;; There are weird build failures with JDK8, such as: "The type
3060 ;; java.io.ObjectInputStream cannot be resolved. It is indirectly
3061 ;; referenced from required .class files"
3063 #:modules ((guix build ant-build-system)
3065 (guix build java-utils)
3070 (modify-phases %standard-phases
3071 (add-after 'unpack 'unpack-build-resources
3072 (lambda* (#:key inputs #:allow-other-keys)
3073 (mkdir-p "../build_resources")
3074 (invoke "tar" "xf" (assoc-ref inputs "build-resources")
3075 "-C" "../build_resources"
3076 "--strip-components=1")
3077 (mkdir-p "../build_resources/lib")
3079 (add-after 'unpack-build-resources 'fix-dependencies
3080 (lambda* (#:key inputs #:allow-other-keys)
3081 ;; FIXME: There should be a more convenient abstraction for
3082 ;; editing XML files.
3083 (with-directory-excursion "../build_resources/ant/"
3084 (chmod "build-common.xml" #o664)
3085 (call-with-output-file "build-common.xml.new"
3089 (with-input-from-file "build-common.xml"
3090 (lambda _ (xml->sxml #:trim-whitespace? #t)))
3091 `(;; Remove dependency on classycle and custom ant tasks
3092 (taskdef . ,(lambda (tag . kids)
3093 (let ((name ((sxpath '(name *text*)) kids)))
3094 (if (or (member "build-info" name)
3095 (member "dependency-checker" name)
3096 (member "build-java-subprojects" name)
3097 (member "project-classpath" name))
3100 (typedef . ,(lambda (tag . kids)
3101 (let ((name ((sxpath '(name *text*)) kids)))
3102 (if (member "recursive-jar" name)
3105 (build-java-subprojects . ,(lambda _ '()))
3106 ;; Ignore everything else
3107 (*default* . ,(lambda (tag . kids) `(,tag ,@kids)))
3108 (*text* . ,(lambda (_ txt) txt))))
3110 (rename-file "build-common.xml.new" "build-common.xml"))
3111 (substitute* "build/build.xml"
3112 (("\\$\\{lib\\}/cisd-base/cisd-base.jar")
3113 (string-append (assoc-ref inputs "java-cisd-base")
3114 "/share/java/sis-base.jar"))
3115 ;; Remove dependency on svn
3116 (("<build-info.*") "")
3117 (("\\$\\{revision.number\\}")
3118 ,(number->string revision))
3119 (("\\$\\{version.number\\}") ,base-version)
3120 ;; Don't use custom ant tasks.
3121 (("recursive-jar") "jar")
3122 (("<project-classpath.*") ""))
3124 (replace 'install (install-jars "targets/dist")))))
3126 `(("java-cisd-base" ,java-cisd-base)))
3128 `(("ecj" ,java-ecj-3.5)
3133 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
3134 "args4j/tags/release/"
3135 (version-major+minor base-version)
3137 "/build_resources/"))
3138 (revision revision)))
3141 "056cam4k8pll7ass31sy6gwn8g8719njc41yf4l02b0342nilkyf"))
3142 (modules '((guix build utils)))
3143 ;; Delete bundled pre-built jars.
3145 '(begin (delete-file-recursively "lib/") #t))))))
3146 (home-page "http://svnsis.ethz.ch")
3147 (synopsis "Command line parser library")
3148 (description "This package provides a parser for command line arguments.")
3149 (license license:asl2.0))))
3151 (define-public java-cisd-jhdf5
3152 (let ((revision 39162)
3153 (base-version "14.12.6"))
3155 (name "java-cisd-jhdf5")
3156 (version (string-append base-version "-" (number->string revision)))
3160 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
3161 "jhdf5/tags/release/"
3162 (version-major+minor base-version)
3163 ".x/" base-version "/jhdf5/"))
3164 (revision revision)))
3165 (file-name (string-append "java-cisd-jhdf5-" version "-checkout"))
3168 "13i17s2hn0q9drdqvp8csy7770p3hdbh9rp30ihln2ldkfawdmz0"))
3169 (modules '((guix build utils)))
3172 ;; Delete included gradle jar
3173 (delete-file-recursively "gradle/wrapper")
3174 ;; Delete pre-built native libraries
3175 (delete-file-recursively "libs")
3177 (build-system ant-build-system)
3179 `(#:make-flags '("-file" "build/build.xml")
3180 #:build-target "jar-all"
3181 #:test-target "jar-test"
3184 (modify-phases %standard-phases
3185 ;; FIXME: this build phase fails.
3186 (delete 'generate-jar-indices)
3187 ;; Don't erase results from the build phase when building tests.
3188 (add-after 'unpack 'separate-test-target-from-clean
3190 (substitute* "build/build.xml"
3191 (("\"jar-test\" depends=\"clean, ")
3192 "\"jar-test\" depends=\""))
3194 (add-after 'unpack 'unpack-build-resources
3195 (lambda* (#:key inputs #:allow-other-keys)
3196 (copy-recursively (assoc-ref inputs "build-resources")
3197 "../build_resources")
3198 (delete-file-recursively "../build_resources/lib/")
3199 (mkdir-p "../build_resources/lib")
3200 ;; Remove dependency on classycle
3201 (substitute* "../build_resources/ant/build-common.xml"
3202 (("<taskdef name=\"dependency-checker.*") "")
3203 (("classname=\"classycle.*") "")
3204 (("classpath=\"\\$\\{lib\\}/classycle.*") ""))
3205 ;; Remove dependency on svn
3206 (substitute* "build/build.xml"
3207 (("<build-info.*") "")
3208 (("\\$\\{revision.number\\}")
3209 ,(number->string revision))
3210 (("\\$\\{version.number\\}") ,base-version))
3212 (add-after 'unpack-build-resources 'fix-dependencies
3213 (lambda* (#:key inputs #:allow-other-keys)
3214 (substitute* "../build_resources/ant/build-common.xml"
3215 (("../libraries/testng/testng-jdk15.jar")
3216 (string-append (assoc-ref inputs "java-testng")
3217 "/share/java/java-testng.jar")))
3218 (substitute* "build/build.xml"
3219 (("\\$\\{lib\\}/sis-base/sis-base.jar")
3220 (string-append (assoc-ref inputs "java-cisd-base")
3221 "/share/java/sis-base.jar"))
3222 (("\\$\\{lib\\}/cisd-args4j/cisd-args4j.jar")
3223 (string-append (assoc-ref inputs "java-cisd-args4j")
3224 "/share/java/cisd-args4j.jar"))
3225 (("\\$\\{lib\\}/commons-lang/commons-lang.jar")
3226 (string-append (assoc-ref inputs "java-commons-lang")
3227 "/share/java/commons-lang-"
3228 ,(package-version java-commons-lang) ".jar"))
3229 (("\\$\\{lib\\}/commons-io/commons-io.jar")
3230 (string-append (assoc-ref inputs "java-commons-io")
3231 "/share/java/commons-io-"
3232 ,(package-version java-commons-io)
3234 (("\\$\\{lib\\}/testng/testng-jdk15.jar")
3235 (string-append (assoc-ref inputs "java-testng")
3236 "/share/java/java-testng.jar"))
3237 (("\\$\\{lib\\}/junit4/junit.jar")
3238 (car (find-files (assoc-ref inputs "java-junit") "jar$")))
3239 (("\\$\\{lib\\}/jmock/hamcrest/hamcrest-core.jar")
3240 (car (find-files (assoc-ref inputs "java-hamcrest-core")
3242 ;; Remove dependency on ch.rinn.restrictions
3243 (with-directory-excursion "source/java/ch/systemsx/cisd/hdf5/"
3244 (substitute* '("BitSetConversionUtils.java"
3246 (("import ch.rinn.restrictions.Private;") "")
3248 (with-directory-excursion "sourceTest/java/ch/systemsx/cisd/hdf5/"
3249 (substitute* '("BitSetConversionTest.java"
3250 "h5ar/HDF5ArchiverTest.java")
3251 (("import ch.rinn.restrictions.Friend;") "")
3253 ;; Remove leftovers from removing @Friend
3254 (substitute* "h5ar/HDF5ArchiverTest.java"
3255 (("\\{ HDF5Archiver.class, IdCache.class, LinkRecord.class \\}\\)")
3258 (add-before 'configure 'build-native-library
3259 (lambda* (#:key inputs #:allow-other-keys)
3260 (let ((jdk (assoc-ref inputs "jdk"))
3261 (hdf5 (assoc-ref inputs "hdf5"))
3262 (dir ,(match (%current-system)
3265 ((or "armhf-linux" "aarch64-linux")
3267 ((or "x86_64-linux")
3269 (_ "unknown-Linux"))))
3270 (with-directory-excursion "source/c"
3271 (apply invoke `("gcc" "-shared" "-O3"
3273 "-Wl,--exclude-libs,ALL"
3274 ,@(find-files "jhdf5" "\\.c$")
3275 ,@(find-files "hdf-java" "\\.c$")
3276 ,(string-append "-I" hdf5 "/include")
3277 ,(string-append "-I" jdk "/include")
3278 ,(string-append "-I" jdk "/include/linux")
3279 ,(string-append hdf5 "/lib/libhdf5.a")
3280 "-o" "libjhdf5.so" "-lz")))
3281 (install-file "source/c/libjhdf5.so"
3282 (string-append "libs/native/jhdf5/" dir))
3284 ;; In the "check" phase we only build the test executable.
3285 (add-after 'check 'run-tests
3287 (invoke "java" "-jar" "targets/dist/sis-jhdf5-test.jar")
3288 (delete-file "targets/dist/sis-jhdf5-test.jar")
3291 (install-jars "targets/dist")))))
3293 `(("java-cisd-base" ,java-cisd-base)
3294 ("java-cisd-args4j" ,java-cisd-args4j)
3295 ("java-commons-lang" ,java-commons-lang)
3296 ("java-commons-io" ,java-commons-io)
3300 `(("jdk" ,icedtea-8)
3301 ("java-testng" ,java-testng)
3302 ("java-junit" ,java-junit)
3303 ("java-jmock" ,java-jmock)
3304 ("java-hamcrest-core" ,java-hamcrest-core)
3309 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
3310 "jhdf5/tags/release/"
3311 (version-major+minor base-version)
3313 "/build_resources/"))
3314 (revision revision)))
3317 "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk"))))))
3318 (home-page "https://wiki-bsse.ethz.ch/display/JHDF5/")
3319 (synopsis "Java binding for HDF5")
3320 (description "JHDF5 is a high-level API in Java for reading and writing
3321 HDF5 files, building on the libraries provided by the HDF Group.")
3322 ;; The C sources are under a non-copyleft license, which looks like a
3323 ;; variant of the BSD licenses. The whole package is under the ASL2.0.
3324 (license (list license:asl2.0
3325 (license:non-copyleft "file://source/c/COPYING"))))))
3327 (define-public java-classpathx-servletapi
3329 (name "java-classpathx-servletapi")
3333 (uri (string-append "mirror://gnu/classpathx/servletapi/"
3334 "servletapi-" version ".tar.gz"))
3337 "07d8h051siga2f33fra72hk12sbq1bxa4jifjg0qj0vfazjjff0x"))))
3338 (build-system ant-build-system)
3340 `(#:tests? #f ; there is no test target
3341 #:build-target "compile"
3343 (list "-Dbuild.compiler=javac1.8"
3344 (string-append "-Ddist=" (assoc-ref %outputs "out")))
3346 (modify-phases %standard-phases
3348 (lambda* (#:key make-flags #:allow-other-keys)
3349 (apply invoke `("ant" "dist" ,@make-flags)))))))
3350 (home-page "https://www.gnu.org/software/classpathx/")
3351 (synopsis "Java servlet API implementation")
3352 (description "This is the GNU servlet API distribution, part of the
3353 ClasspathX project. It provides implementations of version 3.0 of the servlet
3354 API and version 2.1 of the Java ServerPages API.")
3355 (license license:gpl3+)))
3357 (define-public java-javaee-servletapi
3359 (name "java-javaee-servletapi")
3364 (url "https://github.com/javaee/servlet-spec")
3366 (file-name (git-file-name name version))
3369 "0s03lj8w5an70lkqbjycgfrfk0kc07vbfav91jzk87gh3awf9ksl"))))
3370 (build-system ant-build-system)
3372 `(#:jar-name "javax-servletapi.jar"
3375 #:source-dir "src/main/java"
3377 (modify-phases %standard-phases
3378 (add-before 'build 'copy-resources
3380 (mkdir-p "build/classes/javax/servlet/http")
3381 (let ((from-prefix "src/main/java/javax/servlet/")
3382 (to-prefix "build/classes/javax/servlet/"))
3383 (for-each (lambda (f)
3384 (copy-file (string-append from-prefix f)
3385 (string-append to-prefix f)))
3386 (list "LocalStrings_ja.properties"
3387 "LocalStrings.properties"
3388 "LocalStrings_fr.properties"
3389 "http/LocalStrings_es.properties"
3390 "http/LocalStrings_ja.properties"
3391 "http/LocalStrings.properties"
3392 "http/LocalStrings_fr.properties")))
3395 `(("unzip" ,unzip)))
3396 (home-page "https://javaee.github.io/servlet-spec/")
3397 (synopsis "Java servlet API")
3398 (description "Java Servlet is the foundation web specification in the
3399 Java Enterprise Platform. Developers can build web applications using the
3400 Servlet API to interact with the request/response workflow. This project
3401 provides information on the continued development of the Java Servlet
3403 ;; Main code is dual-licensed by Oracle under either GLP2 or CDDL 1.1.
3404 ;; Some files are licensed under ASL 2.0.
3405 (license (list license:asl2.0 license:gpl2 license:cddl1.1))))
3407 (define-public java-swt
3412 ;; The types of many variables and procedures differ in the sources
3413 ;; dependent on whether the target architecture is a 32-bit system or a
3414 ;; 64-bit system. Instead of patching the sources on demand in a build
3415 ;; phase we download either the 32-bit archive (which mostly uses "int"
3416 ;; types) or the 64-bit archive (which mostly uses "long" types).
3417 (let ((hash32 "09q0cbh90d90q3a7dx9430kc4m6bijrkr4lajrmzzvi0jjdpq4v9")
3418 (hash64 "17k5hs75a87ssmc5xhwdfdm2gn4zba0r837l2455za01krnkaa2q")
3421 (let-values (((hash file)
3422 (match (or (%current-target-system) (%current-system))
3423 ("x86_64-linux" (values hash64 file64))
3424 (_ (values hash32 file32)))))
3428 "http://download.eclipse.org/eclipse/downloads/drops4/"
3429 "R-" version "-201710090410/swt-" version
3430 "-gtk-linux-" file ".zip"))
3431 (sha256 (base32 hash))))))
3432 (build-system ant-build-system)
3434 `(#:jar-name "swt.jar"
3436 #:tests? #f ; no "check" target
3438 (modify-phases %standard-phases
3440 (lambda* (#:key source #:allow-other-keys)
3442 (invoke "unzip" source "-d" "swt")
3445 (invoke "unzip" "src.zip" "-d" "src")))
3446 ;; The classpath contains invalid icecat jars. Since we don't need
3447 ;; anything other than the JDK on the classpath, we can simply unset
3449 (add-after 'configure 'unset-classpath
3450 (lambda _ (unsetenv "CLASSPATH") #t))
3451 (add-before 'build 'build-native
3452 (lambda* (#:key inputs outputs #:allow-other-keys)
3453 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
3454 ;; Build shared libraries. Users of SWT have to set the system
3455 ;; property swt.library.path to the "lib" directory of this
3458 (setenv "OUTPUT_DIR" lib)
3459 (with-directory-excursion "src"
3460 (invoke "bash" "build.sh")))))
3461 (add-after 'install 'install-native
3462 (lambda* (#:key outputs #:allow-other-keys)
3463 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
3464 (for-each (lambda (file)
3465 (install-file file lib))
3466 (find-files "." "\\.so$"))
3470 ("libxtst" ,libxtst)
3475 `(("pkg-config" ,pkg-config)
3477 (home-page "https://www.eclipse.org/swt/")
3478 (synopsis "Widget toolkit for Java")
3480 "SWT is a widget toolkit for Java designed to provide efficient, portable
3481 access to the user-interface facilities of the operating systems on which it
3483 ;; SWT code is licensed under EPL1.0
3484 ;; Gnome and Gtk+ bindings contain code licensed under LGPLv2.1
3485 ;; Cairo bindings contain code under MPL1.1
3486 ;; XULRunner 1.9 bindings contain code under MPL2.0
3491 license:lgpl2.1+))))
3493 ;; java-hamcrest-core uses qdox version 1.12. We package this version instead
3494 ;; of the latest release.
3495 (define-public java-qdox-1.12
3501 (uri (string-append "https://repo1.maven.org/maven2/"
3502 "com/thoughtworks/qdox/qdox/" version
3503 "/qdox-" version "-sources.jar"))
3506 "0hlfbqq2avf5s26wxkksqmkdyk6zp9ggqn37c468m96mjv0n9xfl"))))
3507 (build-system ant-build-system)
3509 `(;; Tests require junit
3511 #:jar-name "qdox.jar"
3513 (modify-phases %standard-phases
3515 (lambda* (#:key source #:allow-other-keys)
3517 (with-directory-excursion "src"
3518 (invoke "jar" "-xf" source))))
3519 ;; At this point we don't have junit, so we must remove the API
3521 (add-after 'unpack 'delete-tests
3523 (delete-file-recursively "src/com/thoughtworks/qdox/junit")
3525 (home-page "https://github.com/codehaus/qdox")
3526 (synopsis "Parse definitions from Java source files")
3528 "QDox is a high speed, small footprint parser for extracting
3529 class/interface/method definitions from source files complete with JavaDoc
3530 @code{@@tags}. It is designed to be used by active code generators or
3531 documentation tools.")
3532 (license license:asl2.0)))
3534 (define-public java-qdox
3537 ; Newer version exists, but this version is required by java-plexus-component-metadata
3541 ;; 2.0-M4, -M5 at https://github.com/paul-hammant/qdox
3542 ;; Older releases at https://github.com/codehaus/qdox/
3543 ;; Note: The release at maven is pre-generated. The release at
3544 ;; github requires jflex.
3545 (uri (string-append "https://repo1.maven.org/maven2/"
3546 "com/thoughtworks/qdox/qdox/" version
3547 "/qdox-" version "-sources.jar"))
3550 "10xxrcaicq6axszcr2jpygisa4ch4sinyx5q7kqqxv4lknrmxp5x"))))
3551 (build-system ant-build-system)
3553 `(#:jar-name "qdox.jar"
3554 #:tests? #f; no tests
3556 ((guix build ant-build-system)
3557 (guix build java-utils)
3561 (modify-phases %standard-phases
3562 (add-before 'install 'create-pom
3564 (with-output-to-file "pom.xml"
3568 (modelVersion "4.0.0")
3570 (groupId "com.thoughtworks.qdox")
3572 (version ,,version))))))
3575 (install-from-pom "pom.xml")))))
3576 (home-page "https://github.com/codehaus/qdox")
3577 (synopsis "Parse definitions from Java source files")
3578 (description "QDox is a high speed, small footprint parser for extracting
3579 class/interface/method definitions from source files complete with JavaDoc
3580 @code{@@tags}. It is designed to be used by active code generators or
3581 documentation tools.")
3582 (license license:asl2.0)))
3584 (define-public java-qdox-2-M9
3587 (version "2.0-M9"); required by plexus-java
3590 ;; 2.0-M4, -M5 at https://github.com/paul-hammant/qdox
3591 ;; Older releases at https://github.com/codehaus/qdox/
3592 ;; Note: The release at maven is pre-generated. The release at
3593 ;; github requires jflex.
3594 (uri (string-append "https://repo1.maven.org/maven2/"
3595 "com/thoughtworks/qdox/qdox/" version
3596 "/qdox-" version "-sources.jar"))
3599 "1s2jnmx2dkwnaha12lcj26aynywgwa8sslc47z82wx8xai13y4fg"))))))
3601 (define-public java-jarjar
3603 (name "java-jarjar")
3608 "https://storage.googleapis.com/google-code-archive-downloads/v2/"
3609 "code.google.com/jarjar/jarjar-src-" version ".zip"))
3612 "1v8irhni9cndcw1l1wxqgry013s2kpj0qqn57lj2ji28xjq8ndjl"))
3613 (modules '((guix build utils)))
3616 ;; Delete bundled thirds-party jar archives.
3617 (delete-file-recursively "lib")
3618 (delete-file "src/test/enumtest.jar")
3619 ;; the CLASSPATH needs this directory, create an empty one
3622 (build-system ant-build-system)
3624 `(;; Tests require junit, which ultimately depends on this package.
3626 #:build-target "jar"
3628 (modify-phases %standard-phases
3629 (add-before 'build 'do-not-use-bundled-asm
3630 (lambda* (#:key inputs #:allow-other-keys)
3631 (substitute* "build.xml"
3632 (("<path id=\"path.build\">")
3633 (string-append "<path id=\"path.build\"><fileset dir=\""
3634 (assoc-ref inputs "java-asm-bootstrap")
3635 "/lib/m2\" includes=\"**/*.jar\"/>"))
3636 (("<zipfileset src=\"lib/asm-4.0.jar\"/>") "")
3637 (("lib/asm-commons-4.0.jar")
3638 (car (find-files (assoc-ref inputs "java-asm-bootstrap")
3640 (("<include name=\"org/objectweb/asm/commons/Remap\\*\\.class\"/>")
3641 (string-append "<include name=\"org/objectweb/asm/"
3642 "commons/Remap*.class\"/>"
3643 "<include name=\"org/objectweb/asm/*.class\"/>"
3644 "<include name=\"org/objectweb/asm/"
3645 "signature/*.class\"/>"
3646 "<include name=\"org/objectweb/asm/"
3647 "commons/SignatureRemapper.class\"/>")))
3649 (add-before 'build 'remove-maven-dependency
3651 ;; We do not need to build jarjar as a maven plugin just yet, so
3652 ;; remove this file. Maven requires jarjar (but not that plugin),
3653 ;; so removing it improves the bootstrap.
3654 (delete-file "src/main/com/tonicsystems/jarjar/JarJarMojo.java")
3657 (lambda* (#:key outputs #:allow-other-keys)
3658 (let ((target (string-append (assoc-ref outputs "out")
3660 (install-file (string-append "dist/jarjar-" ,version ".jar")
3664 `(("java-asm-bootstrap" ,java-asm-bootstrap)))
3666 `(("unzip" ,unzip)))
3667 (home-page "https://code.google.com/archive/p/jarjar/")
3668 (synopsis "Repackage Java libraries")
3670 "Jar Jar Links is a utility that makes it easy to repackage Java
3671 libraries and embed them into your own distribution. Jar Jar Links includes
3672 an Ant task that extends the built-in @code{jar} task.")
3673 (license license:asl2.0)))
3675 (define-public java-hamcrest-core
3677 (name "java-hamcrest-core")
3682 (url "https://github.com/hamcrest/JavaHamcrest/")
3683 (commit (string-append "hamcrest-java-" version))))
3684 (file-name (git-file-name name version))
3687 "16fxxkrd31ahqvcaby30jgh3z1i0zxh51m24hxgz0z2agxj6bc63"))
3688 (modules '((guix build utils)))
3691 ;; Delete bundled thirds-party jar archives.
3692 (delete-file-recursively "lib")
3694 (build-system ant-build-system)
3696 `(#:tests? #f ; Tests require junit
3697 #:modules ((guix build ant-build-system)
3698 (guix build java-utils)
3701 #:make-flags (list (string-append "-Dversion=" ,version))
3702 #:test-target "unit-test"
3703 #:build-target "core"
3705 (modify-phases %standard-phases
3706 ;; Disable unit tests, because they require junit, which requires
3707 ;; hamcrest-core. We also give a fixed value to the "Built-Date"
3708 ;; attribute from the manifest for reproducibility.
3709 (add-before 'configure 'patch-build.xml
3711 (substitute* "build.xml"
3712 (("unit-test, ") "")
3713 (("\\$\\{build.timestamp\\}") "guix"))
3715 ;; Java's "getMethods()" returns methods in an unpredictable order.
3716 ;; To make the output of the generated code deterministic we must
3717 ;; sort the array of methods.
3718 (add-after 'unpack 'make-method-order-deterministic
3720 (substitute* "hamcrest-generator/src/main/java/org/hamcrest/generator/ReflectiveFactoryReader.java"
3721 (("import java\\.util\\.Iterator;" line)
3722 (string-append line "\n"
3723 "import java.util.Arrays; import java.util.Comparator;"))
3724 (("allMethods = cls\\.getMethods\\(\\);" line)
3725 (string-append "_" line
3727 private Method[] getSortedMethods() {
3728 Arrays.sort(_allMethods, new Comparator<Method>() {
3730 public int compare(Method a, Method b) {
3731 return a.toString().compareTo(b.toString());
3737 private Method[] allMethods = getSortedMethods();")))
3739 (add-before 'build 'do-not-use-bundled-qdox
3740 (lambda* (#:key inputs #:allow-other-keys)
3741 (substitute* "build.xml"
3742 (("lib/generator/qdox-1.12.jar")
3743 (string-append (assoc-ref inputs "java-qdox-1.12")
3744 "/share/java/qdox.jar")))
3746 ;; build.xml searches for .jar files in this directoy, which
3747 ;; we remove from the source archive.
3748 (add-before 'build 'create-dummy-directories
3750 (mkdir-p "lib/integration")
3752 (add-before 'build 'create-pom
3754 (substitute* "pom/hamcrest-core.pom"
3755 (("@VERSION@") ,version))
3758 (install-from-pom "pom/hamcrest-core.pom")))))
3760 `(("java-qdox-1.12" ,java-qdox-1.12)
3761 ("java-jarjar" ,java-jarjar)))
3763 `(("java-hamcrest-parent-pom" ,java-hamcrest-parent-pom)))
3764 (home-page "http://hamcrest.org/")
3765 (synopsis "Library of matchers for building test expressions")
3767 "This package provides a library of matcher objects (also known as
3768 constraints or predicates) allowing @code{match} rules to be defined
3769 declaratively, to be used in other frameworks. Typical scenarios include
3770 testing frameworks, mocking libraries and UI validation rules.")
3771 (license license:bsd-2)))
3773 (define java-hamcrest-parent-pom
3775 (inherit java-hamcrest-core)
3776 (name "java-hamcrest-parent-pom")
3777 (propagated-inputs '())
3782 (modify-phases %standard-phases
3786 (substitute* "pom/hamcrest-parent.pom"
3787 (("@VERSION@") ,(package-version java-hamcrest-core)))
3790 (install-pom-file "pom/hamcrest-parent.pom")))))))
3792 (define-public java-hamcrest-library
3794 (inherit java-hamcrest-core)
3795 (name "java-hamcrest-library")
3797 (substitute-keyword-arguments (package-arguments java-hamcrest-core)
3798 ((#:build-target _) "library")
3800 `(modify-phases ,phases
3801 (add-after 'unpack 'patch-classpath-for-integration
3802 (lambda* (#:key inputs #:allow-other-keys)
3803 (substitute* "build.xml"
3804 (("build/hamcrest-core-\\$\\{version\\}\\.jar")
3805 (car (find-files (assoc-ref inputs "java-hamcrest-core")
3808 (replace 'create-pom
3810 (substitute* "pom/hamcrest-library.pom"
3811 (("@VERSION@") ,(package-version java-hamcrest-core)))
3814 (install-from-pom "pom/hamcrest-library.pom"))))))
3816 `(("java-hamcrest-core" ,java-hamcrest-core)
3817 ("java-hamcrest-parent-pom" ,java-hamcrest-parent-pom)))))
3819 (define-public java-junit
3826 (url "https://github.com/junit-team/junit/")
3827 (commit (string-append "r" version))))
3828 (file-name (git-file-name name version))
3831 "1j8avi91px1z8rjc89cfikwrvfifdmmsarwiyrcnr59ynvpz0v8h"))
3832 (modules '((guix build utils)))
3835 ;; Delete bundled jar archives.
3836 (delete-file-recursively "lib")
3838 (build-system ant-build-system)
3840 `(#:jar-name "junit.jar"
3841 #:source-dir "src/main/java"
3842 #:test-dir "src/test"
3843 #:test-exclude (list "**/SimpleTest.java" "**/StackTracesTest.java"
3844 "**/RuleChainTest.java" "**/TestWatchmanTest.java")
3846 (modify-phases %standard-phases
3847 (add-before 'check 'copy-test-resources
3849 (copy-recursively "src/test/resources" "build/test-classes")
3852 (install-from-pom "pom.xml")))))
3854 `(("java-hamcrest-core" ,java-hamcrest-core)))
3856 `(("java-hamcrest-library" ,java-hamcrest-library)))
3857 (home-page "https://junit.org/junit4/")
3858 (synopsis "Test framework for Java")
3860 "JUnit is a simple framework to write repeatable tests for Java projects.
3861 JUnit provides assertions for testing expected results, test fixtures for
3862 sharing common test data, and test runners for running tests.")
3863 (license license:epl1.0)))
3865 (define-public java-junitparams
3867 (name "java-junitparams")
3872 (url "https://github.com/Pragmatists/JUnitParams")
3873 (commit (string-append "JUnitParams-" version))))
3874 (file-name (git-file-name name version))
3877 "0rb52xdfp99invyjrras3w0bf0a81cz30yd47rkkiyqcqj0y1q9b"))))
3878 (build-system ant-build-system)
3880 `(#:jar-name "junitparams.jar"
3881 #:source-dir "src/main/java"
3882 #:test-dir "src/test"
3883 #:test-exclude (list "**/SuperclassTest.java")))
3885 `(("java-junit" ,java-junit)))
3887 `(("java-junit" ,java-junit)
3888 ("java-hamcrest-core" ,java-hamcrest-core)
3889 ("java-assertj" ,java-assertj)))
3890 (home-page "https://github.com/Pragmatists/JUnitParams")
3891 (synopsis "Parameterised test support for JUnit")
3892 (description "The JUnitParams project adds a new runner to JUnit and
3893 provides much easier and readable parametrised tests for JUnit.")
3894 (license license:asl2.0)))
3896 (define-public java-plexus-utils
3898 (name "java-plexus-utils")
3899 ;; sisu-build-api needs this version, later versions don't work
3904 (url "https://github.com/codehaus-plexus/plexus-utils")
3905 (commit (string-append "plexus-utils-" version))))
3906 (file-name (git-file-name name version))
3909 "1w169glixyk94jbczj8jzg897lsab46jihiaa3dhw0p06g35va8b"))))
3910 (build-system ant-build-system)
3911 ;; FIXME: The default build.xml does not include a target to install
3914 `(#:jar-name "plexus-utils.jar"
3915 #:source-dir "src/main"
3917 (modify-phases %standard-phases
3918 (add-after 'unpack 'fix-reference-to-/bin-and-/usr
3920 (substitute* "src/main/java/org/codehaus/plexus/util/\
3921 cli/shell/BourneShell.java"
3922 (("/bin/sh") (which "sh"))
3923 (("/usr/") (getcwd)))
3925 (add-after 'unpack 'fix-or-disable-broken-tests
3927 (with-directory-excursion "src/test/java/org/codehaus/plexus/util"
3928 (substitute* '("cli/CommandlineTest.java"
3929 "cli/shell/BourneShellTest.java")
3930 (("/bin/sh") (which "sh"))
3931 (("/bin/echo") (which "echo")))
3933 ;; This test depends on MavenProjectStub, but we don't have
3934 ;; a package for Maven.
3935 (delete-file "introspection/ReflectionValueExtractorTest.java")
3937 ;; FIXME: The command line tests fail, maybe because they use
3939 (delete-file "cli/CommandlineTest.java")
3941 ;; These tests require openjdk jmh, which is not packaged yet
3942 (for-each delete-file (find-files "." "PerfTest.java$")))
3944 (add-before 'build 'copy-resources
3946 (copy-recursively "src/main/resources" "build/classes")
3948 (replace 'install (install-from-pom "pom.xml")))))
3950 `(("java-hamcrest-core" ,java-hamcrest-core)
3951 ("java-junit" ,java-junit)))
3953 `(("plexus-parent-pom" ,plexus-parent-pom-5.1)))
3954 (home-page "https://codehaus-plexus.github.io/plexus-utils/")
3955 (synopsis "Common utilities for the Plexus framework")
3956 (description "This package provides various Java utility classes for the
3957 Plexus framework to ease working with strings, files, command lines, XML and
3959 (license license:asl2.0)))
3961 (define-public java-plexus-utils-3.3.0
3963 (inherit java-plexus-utils)
3968 (url "https://github.com/codehaus-plexus/plexus-utils")
3969 (commit (string-append "plexus-utils-" version))))
3970 (file-name (git-file-name "java-plexus-utils" version))
3973 "0d0fq21rzjy0j55kcp8w9k1rbq9rwr0r7cc8239p9jbz54vihp0g"))))))
3975 (define-public java-plexus-interpolation
3977 (name "java-plexus-interpolation")
3982 (url "https://github.com/codehaus-plexus/plexus-interpolation")
3983 (commit (string-append "plexus-interpolation-" version))))
3984 (file-name (git-file-name name version))
3987 "1rahjmhywf6d5m32qzlc9izawyvcd71abfm9k03f13rs2xmfxzlh"))))
3988 (build-system ant-build-system)
3990 `(#:jar-name "plexus-interpolation.jar"
3991 #:source-dir "src/main"
3993 (modify-phases %standard-phases
3994 (replace 'install (install-from-pom "pom.xml")))))
3996 `(("plexus-parent-pom-5.1" ,plexus-parent-pom-5.1)))
3998 `(("java-junit" ,java-junit)
3999 ("java-hamcrest-core" ,java-hamcrest-core)))
4000 (home-page "https://codehaus-plexus.github.io/plexus-interpolation/")
4001 (synopsis "Java components for interpolating ${} strings and the like")
4002 (description "Plexus interpolator is a modular, flexible interpolation
4003 framework for the expression language style commonly seen in Maven, Plexus,
4004 and other related projects.
4006 It has its foundation in the @code{org.codehaus.plexus.utils.interpolation}
4007 package within @code{plexus-utils}, but has been separated in order to allow
4008 these two libraries to vary independently of one another.")
4009 (license license:asl2.0)))
4011 (define-public java-plexus-classworlds
4013 (name "java-plexus-classworlds")
4018 (url "https://github.com/codehaus-plexus/plexus-classworlds")
4019 (commit (string-append "plexus-classworlds-" version))))
4020 (file-name (git-file-name name version))
4023 "034k2hgvj1saalwbnzrbg4n0zgzwcpz1lhlb8q4kgglsp9pmm03s"))))
4024 (build-system ant-build-system)
4026 `(#:jar-name "plexus-classworlds.jar"
4027 #:source-dir "src/main"
4028 #:tests? #f;; FIXME: we need to generate some resources as in pom.xml
4030 (modify-phases %standard-phases
4031 (replace 'install (install-from-pom "pom.xml")))))
4033 `(("plexus-parent-pom-5.1" ,plexus-parent-pom-5.1)))
4035 `(("java-junit" ,java-junit)))
4036 (home-page "https://codehaus-plexus.github.io/plexus-classworlds/")
4037 (synopsis "Java class loader framework")
4038 (description "Plexus classworlds replaces the native @code{ClassLoader}
4039 mechanism of Java. It is especially useful for dynamic loading of application
4041 (license license:asl2.0)))
4043 (define java-plexus-container-default-bootstrap
4045 (name "java-plexus-container-default-bootstrap")
4050 (url "https://github.com/codehaus-plexus/plexus-containers")
4051 (commit (string-append "plexus-containers-" version))))
4052 (file-name (git-file-name name version))
4055 "1316hrp5vqfv0aw7miq2fp0wwy833h66h502h29vnh5sxj27x228"))))
4056 (build-system ant-build-system)
4058 `(#:jar-name "container-default.jar"
4059 #:source-dir "plexus-container-default/src/main/java"
4060 #:test-dir "plexus-container-default/src/test"
4061 #:tests? #f; requires plexus-archiver, which depends on this package
4063 (modify-phases %standard-phases
4064 (add-before 'build 'fix-google-collections
4066 ;; Google collections are now replaced with guava
4067 (substitute* "plexus-container-default/pom.xml"
4068 (("google-collections") "guava")
4069 (("com.google.collections") "com.google.guava"))
4071 (add-before 'build 'copy-resources
4074 "plexus-container-default/src/main/resources/"
4078 (install-from-pom "plexus-container-default/pom.xml")))))
4080 `(("java-plexus-worldclass" ,java-plexus-classworlds)
4081 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
4082 ("java-plexus-utils" ,java-plexus-utils)
4083 ("java-junit" ,java-junit)
4084 ("java-guava" ,java-guava)
4085 ("java-plexus-containers-parent-pom" ,java-plexus-containers-parent-pom)))
4086 (home-page "https://github.com/codehaus-plexus/plexus-containers")
4087 (synopsis "Inversion-of-control container")
4088 (description "Plexus-default-container is Plexus' inversion-of-control
4089 (@dfn{IoC}) container. It is composed of its public API and its default
4091 (license license:asl2.0)))
4093 (define java-plexus-containers-parent-pom
4095 (inherit java-plexus-container-default-bootstrap)
4096 (name "java-plexus-containers-parent-pom")
4100 (modify-phases %standard-phases
4104 (install-pom-file "pom.xml")))))
4106 `(("plexus-parent-pom" ,plexus-parent-pom-4.0)))))
4108 (define-public java-plexus-io
4110 (name "java-plexus-io")
4115 (url "https://github.com/codehaus-plexus/plexus-io")
4116 (commit (string-append "plexus-io-" version))))
4117 (file-name (git-file-name name version))
4120 "1r3wqfpbxq8vp4p914i8p88r0994rmcjw02hz14n11cfb6gsyvlr"))))
4121 (build-system ant-build-system)
4123 `(#:jar-name "plexus-io.jar"
4124 #:source-dir "src/main/java"
4125 #:test-dir "src/test"
4127 (modify-phases %standard-phases
4128 (add-before 'build 'copy-resources
4130 (mkdir-p "build/classes")
4131 (copy-recursively "src/main/resources" "build/classes")
4132 (mkdir-p "build/test-classes")
4133 (copy-recursively "src/test/resources" "build/test-classes")
4135 (replace 'install (install-from-pom "pom.xml")))))
4137 `(("java-plexus-utils" ,java-plexus-utils-3.3.0)
4138 ("java-commons-io" ,java-commons-io)
4139 ("plexus-parent-pom" ,plexus-parent-pom-5.1)))
4141 `(("java-jsr305" ,java-jsr305)))
4143 `(("junit" ,java-junit)
4144 ("hamcrest" ,java-hamcrest-core)
4145 ("guava" ,java-guava)
4146 ("classworlds" ,java-plexus-classworlds)
4147 ("xbean" ,java-geronimo-xbean-reflect)
4148 ("container-default" ,java-plexus-container-default-bootstrap)))
4149 (home-page "https://github.com/codehaus-plexus/plexus-io")
4150 (synopsis "I/O plexus components")
4151 (description "Plexus IO is a set of plexus components, which are designed
4152 for use in I/O operations. This implementation using plexus components allows
4153 reusing it in maven.")
4154 (license license:asl2.0)))
4156 (define-public java-plexus-archiver
4158 (name "java-plexus-archiver")
4162 (uri (string-append "https://github.com/codehaus-plexus/plexus-archiver"
4163 "/archive/plexus-archiver-" version ".tar.gz"))
4166 "144n971r3lfrx3l12nf2scm80x4xdvgbkk4bjpa4vcvvdrll6qys"))))
4167 (build-system ant-build-system)
4169 `(#:jar-name "plexus-archiver.jar"
4170 #:source-dir "src/main/java"
4171 #:test-dir "src/test"
4172 #:test-exclude (list "**/Abstract*.java" "**/Base*.java")
4174 (modify-phases %standard-phases
4175 (add-before 'check 'remove-failing
4177 ;; Requires an older version of plexus container
4179 "src/test/java/org/codehaus/plexus/archiver/DuplicateFilesTest.java")
4181 (add-before 'check 'fix-test-building
4183 (substitute* "build.xml"
4184 (("srcdir=\"src/test\"") "srcdir=\"src/test/java\""))
4186 (add-before 'build 'copy-resources
4188 (mkdir-p "build/classes")
4189 (copy-recursively "src/main/resources" "build/classes")
4190 (mkdir-p "build/test-classes")
4191 (copy-recursively "src/test/resources" "build/test-classes")
4193 (replace 'install (install-from-pom "pom.xml")))))
4195 `(("java-plexus-utils" ,java-plexus-utils-3.3.0)
4196 ("java-plexus-io" ,java-plexus-io)
4197 ("java-iq80-snappy" ,java-iq80-snappy)
4198 ("java-commons-compress" ,java-commons-compress)
4199 ("plexus-parent-pom" ,plexus-parent-pom-6.1)))
4201 `(("java-jsr305" ,java-jsr305)
4202 ("java-plexus-container-default"
4203 ,java-plexus-container-default-bootstrap)))
4205 `(("java-hamcrest-core" ,java-hamcrest-core)
4206 ("junit" ,java-junit)
4207 ("classworld" ,java-plexus-classworlds)
4208 ("xbean" ,java-geronimo-xbean-reflect)
4210 ("guava" ,java-guava)))
4211 (home-page "https://github.com/codehaus-plexus/plexus-archiver")
4212 (synopsis "Archiver component of the Plexus project")
4213 (description "Plexus-archiver contains a component to deal with project
4215 (license license:asl2.0)))
4217 (define-public java-plexus-container-default
4219 (inherit java-plexus-container-default-bootstrap)
4220 (name "java-plexus-container-default")
4222 `(#:jar-name "container-default.jar"
4223 #:source-dir "plexus-container-default/src/main/java"
4224 #:test-dir "plexus-container-default/src/test"
4225 #:test-exclude (list ;"**/*Test.java"
4227 ;; Requires plexus-hierarchy
4228 "**/PlexusHierarchyTest.java"
4230 "**/ComponentRealmCompositionTest.java"
4231 "**/PlexusContainerTest.java")
4233 (modify-phases %standard-phases
4234 (add-before 'build 'fix-google-collections
4236 ;; Google collections are now replaced with guava
4237 (substitute* "plexus-container-default/pom.xml"
4238 (("google-collections") "guava")
4239 (("com.google.collections") "com.google.guava"))
4241 (add-before 'build 'copy-resources
4244 "plexus-container-default/src/main/resources/"
4247 (add-before 'check 'fix-paths
4249 (let ((dir "plexus-container-default/src/test/java/org/codehaus"))
4252 dir "/plexus/component/composition/"
4253 "ComponentRealmCompositionTest.java")
4254 (("src/test") "plexus-container-default/src/test"))
4257 (install-from-pom "plexus-container-default/pom.xml")))))
4259 `(("worldclass" ,java-plexus-classworlds)
4260 ("xbean" ,java-geronimo-xbean-reflect)
4261 ("utils" ,java-plexus-utils)
4262 ("junit" ,java-junit)
4263 ("guava" ,java-guava)))
4265 `(("archiver" ,java-plexus-archiver)
4266 ("hamcrest" ,java-hamcrest-core)))))
4268 (define-public java-plexus-component-annotations
4270 (inherit java-plexus-container-default)
4271 (name "java-plexus-component-annotations")
4273 `(#:jar-name "plexus-component-annotations.jar"
4274 #:source-dir "plexus-component-annotations/src/main/java"
4275 #:tests? #f; no tests
4277 (modify-phases %standard-phases
4279 (install-from-pom "plexus-component-annotations/pom.xml")))))
4281 `(("java-plexus-containers-parent-pom" ,java-plexus-containers-parent-pom)))
4284 (synopsis "Plexus descriptors generator")
4285 (description "This package is a Maven plugin to generate Plexus descriptors
4286 from source tags and class annotations.")))
4288 (define-public java-plexus-component-metadata
4290 (inherit java-plexus-container-default)
4291 (name "java-plexus-component-metadata")
4293 `(#:jar-name "plexus-component-metadata.jar"
4294 #:source-dir "src/main/java"
4295 #:test-dir "src/test"
4298 (modify-phases %standard-phases
4299 (add-before 'configure 'chdir
4301 (chdir "plexus-component-metadata")
4303 (add-before 'build 'copy-resources
4305 (copy-recursively "src/main/resources"
4309 `(("java-plexus-container-default" ,java-plexus-container-default)
4310 ("java-plexu-component-annotations" ,java-plexus-component-annotations)
4311 ("java-plexus-utils" ,java-plexus-utils)
4312 ("java-plexus-cli" ,java-plexus-cli)
4313 ("java-plexus-classworlds" ,java-plexus-classworlds)
4314 ("maven-plugin-api" ,maven-plugin-api)
4315 ("maven-plugin-annotations" ,maven-plugin-annotations)
4316 ("maven-core-bootstrap" ,maven-core-bootstrap)
4317 ("maven-model" ,maven-model)
4318 ("java-commons-cli" ,java-commons-cli)
4319 ("java-qdox" ,java-qdox)
4320 ("java-jdom2" ,java-jdom2)
4321 ("java-asm" ,java-asm)))
4323 `(("java-junit" ,java-junit)
4324 ("java-guava" ,java-guava)
4325 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)))
4326 (synopsis "Inversion-of-control container for Maven")
4327 (description "The Plexus project provides a full software stack for creating
4328 and executing software projects. Based on the Plexus container, the
4329 applications can utilise component-oriented programming to build modular,
4330 reusable components that can easily be assembled and reused. This package
4331 provides the Maven plugin generating the component metadata.")))
4333 (define-public java-plexus-cipher
4335 (name "java-plexus-cipher")
4340 (url "https://github.com/codehaus-plexus/plexus-cipher")
4341 (commit (string-append "plexus-cipher-" version))))
4342 (file-name (git-file-name name version))
4345 "0m638nzlxbmnbcj5cwdpgs326ab584yv0k803zlx37r6iqwvf6b0"))))
4346 (build-system ant-build-system)
4348 `(#:jar-name "plexus-cipher.jar"
4349 #:source-dir "src/main/java"
4350 #:tests? #f; FIXME: requires sisu-inject-bean
4352 (modify-phases %standard-phases
4353 (add-before 'build 'copy-resources
4355 (copy-recursively "src/main/resources" "build/classes")
4356 (mkdir-p "build/classes/META-INF/sisu")
4357 (with-output-to-file "build/classes/META-INF/sisu/javax.inject.Named"
4359 (display "org.sonatype.plexus.components.cipher.DefaultPlexusCipher\n")))
4361 (add-before 'install 'fix-test-dependency
4363 ;; sisu-inject-bean is only used for tests, but its scope is "provided".
4364 (substitute* "pom.xml"
4365 (("provided") "test"))
4367 (replace 'install (install-from-pom "pom.xml")))))
4369 `(("java-cdi-api" ,java-cdi-api)
4370 ("java-javax-inject" ,java-javax-inject)))
4372 `(("java-sonatype-spice-parent-pom" ,java-sonatype-spice-parent-pom-15)))
4374 `(("java-junit" ,java-junit)))
4375 (home-page "https://github.com/sonatype/plexus-cipher")
4376 (synopsis "Encryption/decryption Component")
4377 (description "Plexus-cipher contains a component to deal with encryption
4379 (license license:asl2.0)))
4381 (define-public java-plexus-java
4383 (name "java-plexus-java")
4388 (url "https://github.com/codehaus-plexus/plexus-languages")
4389 (commit (string-append "plexus-languages-" version))))
4390 (file-name (git-file-name name version))
4393 "0vmvgq5hfxs90yyxgssfpwq78l7vwx1ljwpkk594mrdr8sm668b5"))
4394 (modules '((guix build utils)))
4397 (for-each delete-file (find-files "." ".*.jar$"))
4399 (build-system ant-build-system)
4401 `(#:jar-name "plexus-java.java"
4402 #:source-dir "plexus-java/src/main/java"
4403 #:test-dir "plexus-java/src/test"
4404 #:tests? #f; require mockito 2
4406 (modify-phases %standard-phases
4407 (add-after 'build 'generate-metadata
4409 (invoke "java" "-cp" (string-append (getenv "CLASSPATH") ":build/classes")
4410 "org.codehaus.plexus.metadata.PlexusMetadataGeneratorCli"
4411 "--source" "plexus-java/src/main/java"
4412 "--output" "build/classes/META-INF/plexus/components.xml"
4413 "--classes" "build/classes"
4414 "--descriptors" "build/classes/META-INF")
4415 (invoke "ant" "jar")
4417 (add-before 'install 'install-parent
4418 (install-pom-file "pom.xml"))
4420 (install-from-pom "plexus-java/pom.xml")))))
4422 `(("java-asm" ,java-asm)
4423 ("java-qdox" ,java-qdox-2-M9)
4424 ("java-javax-inject" ,java-javax-inject)
4425 ("plexus-parent-pom" ,plexus-parent-pom-4.0)))
4427 `(("java-plexus-component-annotations" ,java-plexus-component-annotations)))
4429 `(("java-plexus-component-metadata" ,java-plexus-component-metadata)
4430 ("java-junit" ,java-junit)))
4431 (home-page "https://codehaus-plexus.github.io/plexus-languages/plexus-java")
4432 (synopsis "Shared language features for Java")
4433 (description "This package contains shared language features of the Java
4434 language, for the plexus project.")
4435 (license license:asl2.0)))
4437 (define-public java-plexus-compiler-api
4439 (name "java-plexus-compiler-api")
4444 (url "https://github.com/codehaus-plexus/plexus-compiler")
4445 (commit (string-append "plexus-compiler-" version))))
4446 (file-name (git-file-name name version))
4449 "1nq1gnn3s6z1j29gmi1hqbklsmm8b1lmnafb0191914f95mn18gk"))))
4450 (build-system ant-build-system)
4452 `(#:jar-name "plexus-compiler-api.jar"
4453 #:source-dir "plexus-compiler-api/src/main/java"
4454 #:test-dir "plexus-compiler-api/src/test"
4456 (modify-phases %standard-phases
4458 (install-from-pom "plexus-compiler-api/pom.xml")))))
4460 `(("java-plexus-container-default" ,java-plexus-container-default)
4461 ("java-plexus-compiler-pom" ,java-plexus-compiler-pom)
4462 ("java-plexus-util" ,java-plexus-utils)))
4464 `(("java-junit" ,java-junit)))
4465 (home-page "https://github.com/codehaus-plexus/plexus-compiler")
4466 (synopsis "Plexus Compilers component's API to manipulate compilers")
4467 (description "This package contains the API used by components to manipulate
4469 (license (list license:asl2.0
4472 (define java-plexus-compiler-pom
4474 (inherit java-plexus-compiler-api)
4475 (name "java-plexus-compiler-pom")
4479 (modify-phases %standard-phases
4483 (install-pom-file "pom.xml"))
4484 (add-after 'install 'install-compilers
4485 (install-pom-file "plexus-compilers/pom.xml")))))
4487 `(("plexus-components-parent-pom-4.0" ,plexus-components-parent-pom-4.0)))))
4489 (define plexus-components-parent-pom-4.0
4491 (name "plexus-components-parent-pom")
4496 (url "https://github.com/codehaus-plexus/plexus-components")
4497 (commit (string-append "plexus-components-" version))))
4498 (file-name (git-file-name name version))
4501 "041bm8yv0m2i17mqg8zljib4ykpha7ijls2qfdwvkma4d39lhysi"))))
4502 (build-system ant-build-system)
4506 (modify-phases %standard-phases
4510 (install-pom-file "pom.xml")))))
4512 `(("plexus-parent-pom-4.0" ,plexus-parent-pom-4.0)))
4513 (home-page "https://codehaus-plexus.github.io/plexus-components")
4514 (synopsis "Plexus parent pom")
4515 (description "This package contains the Plexus components parent POM.")
4516 (license license:asl2.0)))
4518 (define-public java-plexus-compiler-manager
4520 (inherit java-plexus-compiler-api)
4521 (name "java-plexus-compiler-manager")
4523 `(#:jar-name "compiler-compiler-manager.java"
4524 #:source-dir "plexus-compiler-manager/src/main/java"
4525 #:test-dir "plexus-compiler-manager/src/test"
4528 (modify-phases %standard-phases
4529 (add-after 'build 'generate-metadata
4531 (invoke "java" "-cp" (string-append (getenv "CLASSPATH") ":build/classes")
4532 "org.codehaus.plexus.metadata.PlexusMetadataGeneratorCli"
4533 "--source" "plexus-compiler-manager/src/main/java"
4534 "--output" "build/classes/META-INF/plexus/components.xml"
4535 "--classes" "build/classes"
4536 "--descriptors" "build/classes/META-INF")
4537 (invoke "ant" "jar")
4539 (add-after 'generate-metadata 'rebuild
4541 (invoke "ant" "jar")
4544 (install-from-pom "plexus-compiler-manager/pom.xml")))))
4546 `(("java-plexus-compiler-api" ,java-plexus-compiler-api)
4547 ("java-plexus-compiler-pom" ,java-plexus-compiler-pom)
4548 ("java-plexus-container-default" ,java-plexus-container-default)))
4551 ("java-plexus-component-metadata" ,java-plexus-component-metadata)))
4552 (synopsis "Compiler management for Plexus Compiler component")
4553 (description "Plexus Compiler is a Plexus component to use different
4554 compilers through a uniform API. This component chooses the compiler
4555 implementation to use in a project.")))
4557 (define-public java-plexus-compiler-javac
4559 (inherit java-plexus-compiler-api)
4560 (name "java-plexus-compiler-javac")
4562 `(#:jar-name "plexus-compiler-javac.jar"
4563 #:source-dir "plexus-compilers/plexus-compiler-javac/src/main/java"
4565 #:tests? #f; depends on compiler-test -> maven-core -> ... -> this package.
4566 #:test-dir "plexus-compilers/plexus-compiler-javac/src/test"
4567 #:modules ((guix build ant-build-system)
4569 (guix build java-utils)
4572 (modify-phases %standard-phases
4573 ;; We cannot use java-plexus-component-metadata to generate the metadata
4574 ;; because it ultimately depends on this package.
4575 ;; Create it manually instead
4576 (add-before 'build 'create-metadata
4578 (let* ((dir "build/classes/META-INF/plexus")
4579 (file (string-append dir "/components.xml")))
4581 (with-output-to-file file
4587 (role "org.codehaus.plexus.compiler.Compiler")
4589 (implementation "org.codehaus.plexus.compiler.javac.JavacCompiler")
4590 (isolated-realm "false"))))))))
4593 (install-from-pom "plexus-compilers/plexus-compiler-javac/pom.xml")))))
4595 `(("java-plexus-compiler-api" ,java-plexus-compiler-api)
4596 ("java-plexus-utils" ,java-plexus-utils)
4597 ("java-plexus-container-default" ,java-plexus-container-default)))
4598 (synopsis "Javac Compiler support for Plexus Compiler component")
4599 (description "This package contains the Javac Compiler support for Plexus
4600 Compiler component.")))
4602 (define plexus-components-pom-1.1.20
4604 (name "plexus-components-pom-1.1.20")
4609 (url "https://github.com/codehaus-plexus/plexus-components")
4610 (commit (string-append "plexus-components-" version))))
4611 (file-name (git-file-name name version))
4614 "1q254k95m9icyfsvaw8c226midg8v6v436wvivhv7im825mnp5yb"))))
4615 (build-system ant-build-system)
4619 (modify-phases %standard-phases
4623 (install-pom-file "pom.xml")))))
4625 `(("plexus-parent-pom" ,plexus-parent-pom-3.1)))
4626 (home-page "https://github.com/codehaus-plexus/plexus-components")
4627 (synopsis "Maven parent pom for plexus packages")
4628 (description "This package contains the parent pom for plexus component
4630 (license license:asl2.0)))
4632 (define-public java-plexus-digest
4634 (name "java-plexus-digest")
4639 (url "https://github.com/codehaus-plexus/plexus-digest")
4640 (commit "2a52ad1bda8297fa0e287163d2fa37245ec6a430")))
4641 (file-name (git-file-name name version))
4644 "19w5wxsliz8r42niry68qa665kvjsb8081dazg9vgd3pca72w07x"))))
4645 (build-system ant-build-system)
4647 `(#:jar-name "plexus-digest.jar"
4648 #:source-dir "src/main/java"
4651 (modify-phases %standard-phases
4653 (install-from-pom "pom.xml")))))
4655 `(("java-plexus-utils" ,java-plexus-utils)
4656 ("plexus-components-pom-1.1.20" ,plexus-components-pom-1.1.20)))
4658 `(("java-junit" ,java-junit)))
4659 (home-page "https://github.com/codehaus-plexus/plexus-digest")
4660 (synopsis "Hash function utilities for Java")
4661 (description "This package is a plexus component that contains hash
4662 function utilities.")
4663 (license license:asl2.0)))
4665 (define-public java-plexus-sec-dispatcher
4667 (name "java-plexus-sec-dispatcher")
4668 (version "1.4") ;; Newest release listed at the Maven Central Repository.
4670 ;; This project doesn't tag releases or publish tarballs, so we take
4671 ;; the "prepare release plexus-sec-dispatcher-1.4" git commit.
4674 (url "https://github.com/sonatype/plexus-sec-dispatcher/")
4675 (commit "7db8f880486e192a1c5ea9544e01e756c3d49d0f")))
4678 "1ng4yliy4cqpjr4fxxjbpwyk1wkch5f8vblm1kvwf328s4gibszs"))
4679 (file-name (git-file-name name version))))
4681 `(#:jar-name "plexus-sec-dispatcher.jar"
4682 #:source-dir "src/main/java"
4684 (modify-phases %standard-phases
4685 (add-before 'build 'generate-models
4686 (lambda* (#:key inputs #:allow-other-keys)
4687 (define (modello-single-mode file version mode)
4689 "org.codehaus.modello.ModelloCli"
4690 file mode "src/main/java" version
4692 (let ((file "src/main/mdo/settings-security.mdo"))
4693 (modello-single-mode file "1.0.0" "java")
4694 (modello-single-mode file "1.0.0" "xpp3-reader")
4695 (modello-single-mode file "1.0.0" "xpp3-writer"))
4697 (add-before 'build 'generate-components.xml
4699 (mkdir-p "build/classes/META-INF/plexus")
4700 (with-output-to-file "build/classes/META-INF/plexus/components.xml"
4706 <role>org.sonatype.plexus.components.sec.dispatcher.SecDispatcher</role>\n
4707 <role-hint>default</role-hint>\n
4708 <implementation>org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher</implementation>\n
4709 <description></description>\n
4712 <role>org.sonatype.plexus.components.cipher.PlexusCipher</role>\n
4713 <field-name>_cipher</field-name>\n
4716 <role>org.sonatype.plexus.components.sec.dispatcher.PasswordDecryptor</role>\n
4717 <field-name>_decryptors</field-name>\n
4721 <_configuration-file>~/.settings-security.xml</_configuration-file>\n
4725 </component-set>\n")))
4727 (add-before 'check 'fix-paths
4729 (copy-recursively "src/test/resources" "target")
4731 (replace 'install (install-from-pom "pom.xml")))))
4733 `(("java-plexus-utils" ,java-plexus-utils)
4734 ("java-plexus-cipher" ,java-plexus-cipher)
4735 ("java-sonatype-spice-parent-pom" ,java-sonatype-spice-parent-pom-12)))
4737 `(("java-modello-core" ,java-modello-core)
4739 ("java-plexus-container-default" ,java-plexus-container-default)
4740 ("java-plexus-classworlds" ,java-plexus-classworlds)
4741 ("java-plexus-utils" ,java-plexus-utils)
4742 ("java-guava" ,java-guava)
4743 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
4744 ("java-sisu-build-api" ,java-sisu-build-api)
4746 ("java-modellop-plugins-java" ,java-modello-plugins-java)
4747 ("java-modellop-plugins-xml" ,java-modello-plugins-xml)
4748 ("java-modellop-plugins-xpp3" ,java-modello-plugins-xpp3)
4750 ("java-junit" ,java-junit)))
4751 (build-system ant-build-system)
4752 (home-page "https://github.com/sonatype/plexus-sec-dispatcher")
4753 (synopsis "Plexus Security Dispatcher Component")
4754 (description "This package is the Plexus Security Dispatcher Component.
4755 This component decrypts a string passed to it.")
4756 (license license:asl2.0)))
4758 (define-public java-plexus-cli
4760 (name "java-plexus-cli")
4765 (url "https://github.com/sonatype/plexus-cli")
4766 (commit "a776afa6bca84e5107bedb69440329cdb24ed645")))
4767 (file-name (string-append name "-" version))
4770 "0xjrlay605rypv3zd7y24vlwf0039bil3n2cqw54r1ddpysq46vx"))))
4771 (build-system ant-build-system)
4773 `(#:jar-name "plexus-cli.jar"
4774 #:source-dir "src/main/java"
4776 #:test-dir "src/test"))
4778 `(("java-commons-cli" ,java-commons-cli)
4779 ("java-plexus-container-default" ,java-plexus-container-default)
4780 ("java-plexus-classworlds" ,java-plexus-classworlds)))
4782 `(("java-plexus-utils" ,java-plexus-utils)
4783 ("java-junit" ,java-junit)
4784 ("java-guava" ,java-guava)))
4785 (home-page "https://codehaus-plexus.github.io/plexus-cli")
4786 (synopsis "CLI building library for plexus")
4787 (description "This package is a library to help creating CLI around
4788 Plexus components.")
4789 (license license:asl2.0)))
4791 (define-public java-sisu-build-api
4793 (name "java-sisu-build-api")
4798 (url "https://github.com/sonatype/sisu-build-api")
4799 (commit (string-append "plexus-build-api-" version))))
4800 (file-name (git-file-name name version))
4803 "1d5w6c58gkx30d51v7qwv1xrhc0ly76848gihmgshj19yf6yhca0"))))
4804 (build-system ant-build-system)
4806 `(#:jar-name "sisu-build-api.jar"
4807 #:source-dir "src/main/java"
4809 #:tests? #f; FIXME: how to run the tests?
4811 (modify-phases %standard-phases
4812 (add-before 'build 'copy-resources
4814 (copy-recursively "src/main/resources" "build/classes")
4815 (substitute* (find-files "build/classes")
4816 (("\\$\\{project.version\\}") ,version))
4818 (add-before 'build 'generate-plexus-compontent
4820 (mkdir-p "build/classes/META-INF/plexus")
4821 ;; This file is required for plexus to inject this package.
4822 ;; FIXME: how is it generated?
4823 (with-output-to-file "build/classes/META-INF/plexus/components.xml"
4829 <role>org.sonatype.plexus.build.incremental.BuildContext</role>\n
4830 <role-hint>default</role-hint>\n
4831 <implementation>org.sonatype.plexus.build.incremental.DefaultBuildContext</implementation>\n
4832 <description>Filesystem based non-incremental build context implementation\n
4833 which behaves as if all files were just created.</description>\n
4836 </component-set>\n")))
4839 (install-from-pom "pom.xml")))))
4841 `(("java-plexus-utils" ,java-plexus-utils)
4842 ("java-plexus-container-default" ,java-plexus-container-default)))
4843 (home-page "https://github.com/sonatype/sisu-build-api/")
4844 (synopsis "Base build API for maven")
4845 (description "This package contains the base build API for maven and
4846 a default implementation of it. This API is about scanning files in a
4847 project and determining what files need to be rebuilt.")
4848 (license license:asl2.0)))
4850 (define-public java-modello-core
4852 (name "java-modello-core")
4857 (url "https://github.com/codehaus-plexus/modello")
4858 (commit (string-append "modello-" version))))
4859 (file-name (git-file-name name version))
4862 "1di6ni42aqllpdvkpyfcw70352vr2i8wf6hd5nhd9kmqjb5dj5j4"))))
4863 (build-system ant-build-system)
4865 `(#:jar-name "modello-core.jar"
4866 #:source-dir "modello-core/src/main/java"
4867 #:test-dir "modello-core/src/test"
4868 #:main-class "org.codehaus.modello.ModelloCli"
4871 (modify-phases %standard-phases
4872 (add-before 'build 'copy-resources
4874 (mkdir-p "build/classes/META-INF/plexus")
4875 (copy-file "modello-core/src/main/resources/META-INF/plexus/components.xml"
4876 "build/classes/META-INF/plexus/components.xml")
4878 (add-before 'check 'fix-tests
4880 (with-directory-excursion "modello-core/src/test/java/org/codehaus"
4881 (substitute* '("modello/core/DefaultModelloCoreTest.java"
4882 "modello/core/io/ModelReaderTest.java")
4883 (("src/test") "modello-core/src/test")))
4886 `(("java-plexus-utils" ,java-plexus-utils)
4887 ("java-plexus-container-default" ,java-plexus-container-default)
4888 ("java-sisu-build-api" ,java-sisu-build-api)))
4890 `(("java-junit" ,java-junit)
4891 ("java-plexus-classworlds" ,java-plexus-classworlds)
4892 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
4893 ("java-guava" ,java-guava)))
4894 (home-page "https://codehaus-plexus.github.io/modello/")
4895 (synopsis "Framework for code generation from a simple model")
4896 (description "Modello is a framework for code generation from a simple model.
4898 Modello generates code from a simple model format: based on a plugin
4899 architecture, various types of code and descriptors can be generated from the
4900 single model, including Java POJOs, XML/JSON/YAML marshallers/unmarshallers,
4901 XSD and documentation.")
4904 ;; Although this package uses only files licensed under expat,
4905 ;; other parts of the source are licensed under different
4906 ;; licenses. We include them to be inherited by other packages.
4908 ;; Some files in modello-plugin-java are licensed under a
4909 ;; 5-clause BSD license.
4910 (license:non-copyleft
4911 (string-append "file:///modello-plugins/modello-plugin-java/"
4912 "src/main/java/org/codehaus/modello/plugin/"
4913 "java/javasource/JNaming.java"))))))
4915 (define-public java-modello-plugins-java
4917 (inherit java-modello-core)
4918 (name "java-modello-plugins-java")
4920 `(#:jar-name "modello-plugins-java.jar"
4921 #:source-dir "modello-plugins/modello-plugin-java/src/main/java"
4922 #:test-dir "modello-plugins/modello-plugin-java/src/test"
4924 #:tests? #f; requires maven-model, which depends on this package
4926 (modify-phases %standard-phases
4927 (add-before 'build 'copy-resources
4929 (mkdir-p "build/classes")
4930 (copy-recursively "modello-plugins/modello-plugin-java/src/main/resources"
4934 `(("java-modello-core" ,java-modello-core)))
4935 (synopsis "Modello Java Plugin")
4936 (description "Modello Java Plugin generates Java objects for the model.")))
4938 (define-public java-modello-plugins-xml
4940 (inherit java-modello-core)
4941 (name "java-modello-plugins-xml")
4943 `(#:jar-name "modello-plugins-xml.jar"
4944 #:source-dir "modello-plugins/modello-plugin-xml/src/main/java"
4945 #:test-dir "modello-plugins/modello-plugin-xml/src/test"
4948 (modify-phases %standard-phases
4949 (add-before 'build 'copy-resources
4951 (mkdir-p "build/classes")
4953 "modello-plugins/modello-plugin-xml/src/main/resources"
4956 (add-before 'check 'fix-paths
4958 (with-directory-excursion "modello-plugins/modello-plugin-xml/src/test"
4960 "java/org/codehaus/modello/plugins/xml/XmlModelloPluginTest.java"
4961 (("src/test") "modello-plugins/modello-plugin-xml/src/test")))
4964 `(("java-modello-core" ,java-modello-core)
4965 ("java-modello-plugins-java" ,java-modello-plugins-java)))
4966 (synopsis "Modello XML Plugin")
4967 (description "Modello XML Plugin contains shared code for every plugins
4968 working on XML representation of the model.")))
4970 (define-public java-modello-test
4972 (inherit java-modello-core)
4973 (name "java-modello-test")
4975 `(#:jar-name "modello-test.jar"
4976 #:source-dir "modello-test/src/main/java"
4977 #:tests? #f; no tests
4980 `(("java-plexus-utils" ,java-plexus-utils)
4981 ("java-plexus-compiler-api" ,java-plexus-compiler-api)
4982 ("java-plexus-compiler-javac" ,java-plexus-compiler-javac)
4983 ("java-plexus-container-default" ,java-plexus-container-default)))
4984 (synopsis "Modello test package")
4985 (description "The modello test package contains the basis to create
4986 Modello generator unit-tests, including sample models and xml files to test
4987 every feature for every plugin.")))
4989 (define-public java-modello-plugins-xpp3
4991 (inherit java-modello-core)
4992 (name "java-modello-plugins-xpp3")
4994 `(#:jar-name "modello-plugins-xpp3.jar"
4995 #:source-dir "modello-plugins/modello-plugin-xpp3/src/main/java"
4996 #:test-dir "modello-plugins/modello-plugin-xpp3/src/test"
4997 ;; One of the test dependencies is maven-model which depends on this package.
5001 (modify-phases %standard-phases
5002 (add-before 'build 'copy-resources
5004 (mkdir-p "build/classes")
5005 (copy-recursively "modello-plugins/modello-plugin-xpp3/src/main/resources"
5009 `(("java-modello-core" ,java-modello-core)
5010 ("java-modello-plugins-java" ,java-modello-plugins-java)
5011 ("java-modello-plugins-xml" ,java-modello-plugins-xml)))
5013 `(("java-xmlunit" ,java-xmlunit)
5014 ("java-modello-test" ,java-modello-test)
5015 ,@(package-native-inputs java-modello-core)))
5016 (synopsis "Modello XPP3 Plugin")
5017 (description "The modello XPP3 plugin generates XML readers and writers based
5018 on the XPP3 API (XML Pull Parser).")))
5020 (define-public java-asm
5026 (uri (string-append "https://download.forge.ow2.org/asm/"
5027 "asm-" version ".tar.gz"))
5030 "115l5pqblirdkmzi32dxx7gbcm4jy0s14y5wircr6h8jdr9aix00"))))
5031 (build-system ant-build-system)
5033 `(#:build-target "compile"
5034 ;; The tests require an old version of Janino, which no longer compiles
5039 ;; We don't need these extra ant tasks, but the build system asks us to
5040 ;; provide a path anyway.
5041 "-Dobjectweb.ant.tasks.path=dummy-path"
5042 ;; The java-aqute.bndlib JAR file will be put onto the classpath and
5043 ;; used during the build automatically by ant-build-system, but
5044 ;; java-asm's build.xml fails unless we provide something here.
5045 "-Dbiz.aQute.bnd.path=dummy-path")
5047 (modify-phases %standard-phases
5048 (add-before 'build 'remove-bnd-dependency
5050 ;; This file is the only one to require bnd, and is not needed
5051 ;; because we don't build a bundle.
5052 (delete-file "src/org/objectweb/asm/tools/ModuleInfoBndPlugin.java")
5054 (add-before 'install 'build-jars
5055 (lambda* (#:key make-flags #:allow-other-keys)
5056 ;; We cannot use the "jar" target because it depends on a couple
5057 ;; of unpackaged, complicated tools.
5060 "-cf" (string-append "dist/asm-" ,version ".jar")
5061 "-C" "output/build/tmp" ".")))
5062 (add-before 'install 'fix-pom
5064 (substitute* (find-files "archive" "\\.pom$")
5065 (("@product.artifact@") ,version))
5067 (add-before 'install 'install-parent
5068 (install-pom-file "archive/asm-parent.pom"))
5070 (install-from-pom "archive/asm.pom")))))
5072 `(("java-junit" ,java-junit)))
5074 `(("java-org-ow2-parent-pom" ,java-org-ow2-parent-pom-1.3)))
5075 (home-page "https://asm.ow2.io/")
5076 (synopsis "Very small and fast Java bytecode manipulation framework")
5077 (description "ASM is an all purpose Java bytecode manipulation and
5078 analysis framework. It can be used to modify existing classes or dynamically
5079 generate classes, directly in binary form. The provided common
5080 transformations and analysis algorithms allow easily assembling custom
5081 complex transformations and code analysis tools.")
5082 (license license:bsd-3)))
5084 (define java-org-ow2-parent-pom-1.3
5086 (name "java-org-ow2-parent-pom")
5090 (uri "https://repo1.maven.org/maven2/org/ow2/ow2/1.3/ow2-1.3.pom")
5093 "1yr8hfx8gffpppa4ii6cvrsq029a6x8hzy7nsavxhs60s9kmq8ai"))))
5094 (build-system ant-build-system)
5098 (modify-phases %standard-phases
5103 (install-pom-file (assoc-ref %build-inputs "source"))))))
5104 (home-page "https://ow2.org")
5105 (synopsis "Ow2.org parent pom")
5106 (description "This package contains the parent pom for projects from ow2.org,
5107 including java-asm.")
5108 (license license:lgpl2.1+)))
5110 (define java-asm-bootstrap
5113 (name "java-asm-bootstrap")
5115 (substitute-keyword-arguments (package-arguments java-asm)
5117 (native-inputs `())))
5119 (define-public java-cglib
5127 (url "https://github.com/cglib/cglib")
5128 (commit (string-append
5130 (string-map (lambda (c) (if (char=? c #\.) #\_ c))
5132 (file-name (git-file-name name version))
5134 (base32 "186451jms2zfp47yd8kxd77az2cqal1my2br7klgyp8fpl4qfg8v"))))
5135 (build-system ant-build-system)
5137 `(;; FIXME: tests fail because junit runs
5138 ;; "net.sf.cglib.transform.AbstractTransformTest", which does not seem
5139 ;; to describe a test at all.
5141 #:jar-name "cglib.jar"
5143 (modify-phases %standard-phases
5144 (add-after 'unpack 'chdir
5145 (lambda _ (chdir "cglib") #t)))))
5147 `(("java-asm" ,java-asm)
5148 ("java-junit" ,java-junit)))
5149 (home-page "https://github.com/cglib/cglib/")
5150 (synopsis "Java byte code generation library")
5151 (description "The byte code generation library CGLIB is a high level API
5152 to generate and transform Java byte code.")
5153 (license license:asl2.0)))
5155 (define-public java-objenesis
5157 (name "java-objenesis")
5162 (url "https://github.com/easymock/objenesis")
5164 (file-name (git-file-name name version))
5167 "054yi200wj00x6dp1sxfrwgndwywadsbn8d8ij1j0v45j9g2vdya"))))
5168 (build-system ant-build-system)
5170 `(#:jar-name "objenesis.jar"
5171 #:source-dir "main/src/"
5172 #:test-dir "main/src/test/"))
5174 `(("java-junit" ,java-junit)
5175 ("java-hamcrest-core" ,java-hamcrest-core)))
5176 (home-page "http://objenesis.org/")
5177 (synopsis "Bypass the constructor when creating an object")
5178 (description "Objenesis is a small Java library that serves one purpose:
5179 to instantiate a new object of a particular class. It is common to see
5180 restrictions in libraries stating that classes must require a default
5181 constructor. Objenesis aims to overcome these restrictions by bypassing the
5182 constructor on object instantiation.")
5183 (license license:asl2.0)))
5185 (define-public java-easymock
5187 (name "java-easymock")
5192 (url "https://github.com/easymock/easymock/")
5193 (commit (string-append "easymock-" version))))
5194 (file-name (git-file-name name version))
5197 "02vybm8hc0i0n9sp2f2iiqn54zwqhq835f76wc6b2m7819z5a8dq"))))
5198 (build-system ant-build-system)
5200 `(#:jar-name "easymock.jar"
5201 #:source-dir "core/src/main"
5202 #:test-dir "core/src/test"
5204 (modify-phases %standard-phases
5205 ;; FIXME: Android support requires the following packages to be
5206 ;; available: com.google.dexmaker.stock.ProxyBuilder
5207 (add-after 'unpack 'delete-android-support
5209 (with-directory-excursion "core/src/main/java/org/easymock/internal"
5210 (substitute* "MocksControl.java"
5211 (("AndroidSupport.isAndroid\\(\\)") "false")
5212 (("return classProxyFactory = new AndroidClassProxyFactory\\(\\);") ""))
5213 (delete-file "AndroidClassProxyFactory.java"))
5215 (add-after 'unpack 'delete-broken-tests
5217 (with-directory-excursion "core/src/test/java/org/easymock"
5218 ;; This test depends on dexmaker.
5219 (delete-file "tests2/ClassExtensionHelperTest.java")
5221 ;; This is not a test.
5222 (delete-file "tests/BaseEasyMockRunnerTest.java")
5224 ;; This test should be executed with a different runner...
5225 (delete-file "tests2/EasyMockAnnotationsTest.java")
5226 ;; ...but deleting it means that we also have to delete these
5228 (delete-file "tests2/EasyMockRunnerTest.java")
5229 (delete-file "tests2/EasyMockRuleTest.java")
5231 ;; This test fails because the file "easymock.properties" does
5233 (delete-file "tests2/EasyMockPropertiesTest.java"))
5236 `(("java-asm" ,java-asm)
5237 ("java-cglib" ,java-cglib)
5238 ("java-objenesis" ,java-objenesis)))
5240 `(("java-junit" ,java-junit)
5241 ("java-hamcrest-core" ,java-hamcrest-core)))
5242 (home-page "https://easymock.org/")
5243 (synopsis "Java library providing mock objects for unit tests")
5244 (description "EasyMock is a Java library that provides an easy way to use
5245 mock objects in unit testing.")
5246 (license license:asl2.0)))
5248 (define-public java-jmock-1
5255 (url "https://github.com/jmock-developers/jmock-library")
5257 (file-name (git-file-name name version))
5260 "0lkga995xd9b9mmzxmcd301hlw83p1h78nibh7djlx7wydscr85z"))))
5261 (build-system ant-build-system)
5263 `(#:build-target "jars"
5264 #:test-target "run.tests"
5266 (modify-phases %standard-phases
5267 (replace 'install (install-jars "build")))))
5268 (home-page "http://jmock.org/")
5269 (synopsis "Mock object library for test-driven development")
5270 (description "JMock is a library that supports test-driven development of
5271 Java code with mock objects. Mock objects help you design and test the
5272 interactions between the objects in your programs.
5277 @item makes it quick and easy to define mock objects
5278 @item lets you precisely specify the interactions between
5279 your objects, reducing the brittleness of your tests
5280 @item plugs into your favourite test framework
5281 @item is easy to extend.
5283 (license license:bsd-3)))
5285 (define-public java-jmock
5287 (inherit java-jmock-1)
5293 (url "https://github.com/jmock-developers/jmock-library")
5295 (file-name (git-file-name name version))
5298 "12b7l22g3nrjvf2dzcw3z03fpd2chrgp0d8xkvn8w55rwb57pax6"))))
5300 `(("java-hamcrest-all" ,java-hamcrest-all)
5301 ("java-asm" ,java-asm)
5302 ("java-bsh" ,java-bsh)
5303 ("java-junit" ,java-junit)))
5305 `(("cglib" ,java-cglib)))
5307 `(#:jar-name "java-jmock.jar"
5308 #:source-dir "jmock/src/main/java"
5309 #:test-dir "jmock/src/test"))))
5311 (define-public java-jmock-junit4
5313 (inherit java-jmock)
5314 (name "java-jmock-junit4")
5316 `(#:jar-name "java-jmock-junit4.jar"
5317 #:source-dir "jmock-junit4/src/main/java"
5318 #:test-dir "jmock-junit4/src/test"))
5320 `(("java-hamcrest-all" ,java-hamcrest-all)
5321 ("java-asm" ,java-asm)
5322 ("java-bsh" ,java-bsh)
5323 ("java-jmock" ,java-jmock)
5324 ("java-jumit" ,java-junit)))))
5326 (define-public java-jmock-legacy
5328 (inherit java-jmock)
5329 (name "java-jmock-legacy")
5331 `(#:jar-name "java-jmock-legacy.jar"
5332 #:source-dir "jmock-legacy/src/main/java"
5333 #:test-dir "jmock-legacy/src/test"
5335 (modify-phases %standard-phases
5336 (add-before 'check 'copy-tests
5338 ;; This file is a dependancy of some tests
5339 (let ((file "org/jmock/test/acceptance/PackageProtectedType.java"))
5340 (copy-file (string-append "jmock/src/test/java/" file)
5341 (string-append "jmock-legacy/src/test/java/" file))
5344 `(("java-hamcrest-all" ,java-hamcrest-all)
5345 ("java-objenesis" ,java-objenesis)
5346 ("java-cglib" ,java-cglib)
5347 ("java-jmock" ,java-jmock)
5348 ("java-asm" ,java-asm)
5349 ("java-bsh" ,java-bsh)
5350 ("java-junit" ,java-junit)))
5352 `(("java-jmock-junit4" ,java-jmock-junit4)))))
5354 (define-public java-hamcrest-all
5355 (package (inherit java-hamcrest-core)
5356 (name "java-hamcrest-all")
5359 ,@(substitute-keyword-arguments (package-arguments java-hamcrest-core)
5360 ((#:build-target _) "bigjar")
5362 `(modify-phases ,phases
5363 ;; Some build targets override the classpath, so we need to patch
5364 ;; the build.xml to ensure that required dependencies are on the
5366 (add-after 'unpack 'patch-classpath-for-integration
5367 (lambda* (#:key inputs #:allow-other-keys)
5368 (substitute* "build.xml"
5369 ((" build/hamcrest-library-\\$\\{version\\}.jar" line)
5373 (find-files (assoc-ref inputs "java-junit") "\\.jar$")
5374 (find-files (assoc-ref inputs "java-jmock") "\\.jar$")
5375 (find-files (assoc-ref inputs "java-easymock") "\\.jar$")))
5377 (("build/hamcrest-core-\\$\\{version\\}\\.jar")
5378 (car (find-files (assoc-ref inputs "java-hamcrest-core")
5382 (lambda* (#:key outputs #:allow-other-keys)
5383 (let* ((target (string-append (assoc-ref outputs "out")
5387 "-" (package-version java-hamcrest-core) ".jar"))
5388 (install-without-version-suffix
5391 (string-append target
5392 (basename jar version-suffix)
5396 install-without-version-suffix
5399 (and (string-suffix? ".jar" name)
5400 (not (string-suffix? "-sources.jar" name)))))))
5403 `(("java-junit" ,java-junit)
5404 ("java-jmock" ,java-jmock-1)
5405 ;; This is necessary because of what seems to be a race condition.
5406 ;; This package would sometimes fail to build because hamcrest-core.jar
5407 ;; could not be found, even though it is built as part of this package.
5408 ;; Adding java-hamcrest-core appears to fix this problem. See
5409 ;; https://debbugs.gnu.org/31390 for more information.
5410 ("java-hamcrest-core" ,java-hamcrest-core)
5411 ("java-easymock" ,java-easymock)
5412 ,@(package-inputs java-hamcrest-core)))))
5414 (define-public java-jopt-simple
5416 (name "java-jopt-simple")
5420 (uri (string-append "http://repo1.maven.org/maven2/"
5421 "net/sf/jopt-simple/jopt-simple/"
5422 version "/jopt-simple-"
5423 version "-sources.jar"))
5426 "1v8bzmwmw6qq20gm42xyay6vrd567dra4vqwhgjnqqjz1gs9f8qa"))))
5427 (build-system ant-build-system)
5429 `(#:tests? #f ; there are no tests
5430 #:jar-name "jopt-simple.jar"))
5431 (home-page "https://pholser.github.io/jopt-simple/")
5432 (synopsis "Java library for parsing command line options")
5433 (description "JOpt Simple is a Java library for parsing command line
5434 options, such as those you might pass to an invocation of @code{javac}. In
5435 the interest of striving for simplicity, as closely as possible JOpt Simple
5436 attempts to honor the command line option syntaxes of POSIX @code{getopt} and
5437 GNU @code{getopt_long}. It also aims to make option parser configuration and
5438 retrieval of options and their arguments simple and expressive, without being
5440 (license license:expat)))
5442 (define-public java-commons-math3
5444 (name "java-commons-math3")
5448 (uri (string-append "mirror://apache/commons/math/source/"
5449 "commons-math3-" version "-src.tar.gz"))
5452 "19l6yp44qc5g7wg816nbn5z3zq3xxzwimvbm4a8pczgvpi4i85s6"))))
5453 (build-system ant-build-system)
5455 `(#:build-target "jar"
5456 #:test-target "test"
5458 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
5459 (junit (assoc-ref %build-inputs "java-junit")))
5460 (list (string-append "-Djunit.jar="
5461 (car (find-files junit "jar$")))
5462 (string-append "-Dhamcrest.jar="
5463 (car (find-files hamcrest ".*.jar$")))))
5465 (modify-phases %standard-phases
5466 ;; We want to build the jar in the build phase and run the tests
5467 ;; later in a separate phase.
5468 (add-after 'unpack 'untangle-targets
5470 (substitute* "build.xml"
5471 (("name=\"jar\" depends=\"test\"")
5472 "name=\"jar\" depends=\"compile\""))
5474 ;; There is no install target.
5476 (install-jars "target")))))
5478 `(("java-junit" ,java-junit)
5479 ("java-hamcrest-core" ,java-hamcrest-core)))
5480 (home-page "https://commons.apache.org/math/")
5481 (synopsis "Apache Commons mathematics library")
5482 (description "Commons Math is a library of lightweight, self-contained
5483 mathematics and statistics components addressing the most common problems not
5484 available in the Java programming language or Commons Lang.")
5485 (license license:asl2.0)))
5487 (define-public java-jmh
5494 (url "http://hg.openjdk.java.net/code-tools/jmh/")
5495 (changeset version)))
5496 (file-name (string-append name "-" version "-checkout"))
5499 "1fxyxhg9famwcg1prc4cgwb5wzyxqavn3cjm5vz8605xz7x5k084"))))
5500 (build-system ant-build-system)
5502 `(#:jar-name "jmh-core.jar"
5503 #:source-dir "jmh-core/src/main"
5504 #:test-dir "jmh-core/src/test"
5506 (modify-phases %standard-phases
5507 ;; This seems to be a bug in the JDK. It may not be necessary in
5508 ;; future versions of the JDK.
5509 (add-after 'unpack 'fix-bug
5511 (with-directory-excursion
5512 "jmh-core/src/main/java/org/openjdk/jmh/runner/options"
5513 (substitute* '("IntegerValueConverter.java"
5514 "ThreadsValueConverter.java")
5515 (("public Class<Integer> valueType")
5516 "public Class<? extends Integer> valueType")))
5519 `(("java-jopt-simple" ,java-jopt-simple)
5520 ("java-commons-math3" ,java-commons-math3)))
5522 `(("java-junit" ,java-junit)
5523 ("java-hamcrest-core" ,java-hamcrest-core)))
5524 (home-page "https://openjdk.java.net/projects/code-tools/jmh/")
5525 (synopsis "Benchmark harness for the JVM")
5526 (description "JMH is a Java harness for building, running, and analysing
5527 nano/micro/milli/macro benchmarks written in Java and other languages
5528 targeting the JVM.")
5530 (license license:gpl2)))
5532 (define-public java-commons-collections4
5534 (name "java-commons-collections4")
5538 (uri (string-append "mirror://apache/commons/collections/source/"
5539 "commons-collections4-" version "-src.tar.gz"))
5542 "1krfhvggympq4avk7gh6qafzf6b9ip6r1m4lmacikyx04039m0wl"))))
5543 (build-system ant-build-system)
5545 `(#:test-target "test"
5547 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
5548 (junit (assoc-ref %build-inputs "java-junit"))
5549 (easymock (assoc-ref %build-inputs "java-easymock")))
5550 (list (string-append "-Djunit.jar="
5551 (car (find-files junit "jar$")))
5552 (string-append "-Dhamcrest.jar="
5553 (car (find-files hamcrest "jar$")))
5554 (string-append "-Deasymock.jar=" easymock
5555 "/share/java/easymock.jar")))
5557 (modify-phases %standard-phases
5559 (install-jars "target")))))
5561 `(("java-junit" ,java-junit)
5562 ("java-hamcrest-core" ,java-hamcrest-core)
5563 ("java-easymock" ,java-easymock)))
5564 (home-page "https://commons.apache.org/collections/")
5565 (synopsis "Collections framework")
5566 (description "The Java Collections Framework is the recognised standard
5567 for collection handling in Java. Commons-Collections seek to build upon the
5568 JDK classes by providing new interfaces, implementations and utilities. There
5569 are many features, including:
5572 @item @code{Bag} interface for collections that have a number of copies of
5574 @item @code{BidiMap} interface for maps that can be looked up from value to
5575 key as well and key to value
5576 @item @code{MapIterator} interface to provide simple and quick iteration over
5578 @item Transforming decorators that alter each object as it is added to the
5580 @item Composite collections that make multiple collections look like one
5581 @item Ordered maps and sets that retain the order elements are added in,
5582 including an LRU based map
5583 @item Reference map that allows keys and/or values to be garbage collected
5585 @item Many comparator implementations
5586 @item Many iterator implementations
5587 @item Adapter classes from array and enumerations to collections
5588 @item Utilities to test or create typical set-theory properties of collections
5589 such as union, intersection, and closure.
5591 (license license:asl2.0)))
5593 (define-public java-commons-collections
5595 (inherit java-commons-collections4)
5596 (name "java-commons-collections")
5600 (uri (string-append "mirror://apache/commons/collections/source/"
5601 "commons-collections-" version "-src.tar.gz"))
5604 "055r51a5lfc3z7rkxnxmnn1npvkvda7636hjpm4qk7cnfzz98387"))
5606 (search-patches "java-commons-collections-fix-java8.patch"))))
5608 (substitute-keyword-arguments (package-arguments java-commons-collections4)
5610 `(modify-phases ,phases
5611 ;; The manifest is required by the build procedure
5612 (add-before 'build 'add-manifest
5614 (mkdir-p "build/conf")
5615 (call-with-output-file "build/conf/MANIFEST.MF"
5617 (format file "Manifest-Version: 1.0\n")))
5620 (install-jars "build"))))))))
5622 (define java-commons-collections-test-classes
5624 (inherit java-commons-collections)
5626 `(#:jar-name "commons-collections-test-classes.jar"
5627 #:source-dir "src/test"
5630 `(("collection" ,java-commons-collections)))))
5632 (define-public java-commons-beanutils
5634 (name "java-commons-beanutils")
5638 (uri (string-append "mirror://apache/commons/beanutils/source/"
5639 "commons-beanutils-" version "-src.tar.gz"))
5642 "03cs0bq3sl1sdc7py9g3qnf8n9h473nrkvd3d251kaqv6a2ab7qk"))))
5643 (build-system ant-build-system)
5645 `(#:test-target "test"
5648 (modify-phases %standard-phases
5650 (lambda* (#:key outputs #:allow-other-keys)
5651 (rename-file (string-append "dist/commons-beanutils-" ,version
5653 "commons-beanutils.jar")
5654 (install-file "commons-beanutils.jar"
5655 (string-append (assoc-ref outputs "out") "/share/java/"))
5658 `(("logging" ,java-commons-logging-minimal)
5659 ("collections" ,java-commons-collections)))
5661 `(("junit" ,java-junit)
5662 ("collections-test" ,java-commons-collections-test-classes)))
5663 (home-page "https://commons.apache.org/beanutils/")
5664 (synopsis "Dynamically set or get properties in Java")
5665 (description "BeanUtils provides a simplified interface to reflection and
5666 introspection to set or get dynamically determined properties through their
5667 setter and getter method.")
5668 (license license:asl2.0)))
5670 (define-public java-commons-io
5672 (name "java-commons-io")
5677 (uri (string-append "mirror://apache/commons/io/source/"
5678 "commons-io-" version "-src.tar.gz"))
5681 "0q5y41jrcjvx9hzs47x5kdhnasdy6rm4bzqd2jxl02w717m7a7v3"))))
5682 (build-system ant-build-system)
5683 (outputs '("out" "doc"))
5685 `(#:test-target "test"
5687 (list (string-append "-Djunit.jar="
5688 (car (find-files (assoc-ref %build-inputs "java-junit")
5691 (modify-phases %standard-phases
5692 (add-after 'build 'build-javadoc ant-build-javadoc)
5693 (replace 'install (install-from-pom "pom.xml"))
5694 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
5696 `(("java-junit" ,java-junit)
5697 ("java-hamcrest-core" ,java-hamcrest-core)))
5699 `(("apache-commons-parent-pom" ,apache-commons-parent-pom-39)))
5700 (home-page "https://commons.apache.org/io/")
5701 (synopsis "Common useful IO related classes")
5702 (description "Commons-IO contains utility classes, stream implementations,
5703 file filters and endian classes.")
5704 (license license:asl2.0)))
5706 (define-public java-commons-exec-1.1
5708 (name "java-commons-exec")
5713 (uri (string-append "mirror://apache/commons/exec/source/"
5714 "commons-exec-" version "-src.tar.gz"))
5717 "025dk8xgj10lxwwwqp0hng2rn7fr4vcirxzydqzx9k4dim667alk"))))
5718 (build-system ant-build-system)
5720 `(#:test-target "test"
5722 (list (string-append "-Dmaven.junit.jar="
5723 (car (find-files (assoc-ref %build-inputs "java-junit")
5726 (modify-phases %standard-phases
5727 (add-before 'build 'delete-network-tests
5729 (delete-file "src/test/java/org/apache/commons/exec/DefaultExecutorTest.java")
5730 (substitute* "src/test/java/org/apache/commons/exec/TestRunner.java"
5731 (("suite\\.addTestSuite\\(DefaultExecutorTest\\.class\\);") ""))
5733 ;; The "build" phase automatically tests.
5735 (replace 'install (install-jars "target")))))
5737 `(("java-junit" ,java-junit)))
5738 (home-page "https://commons.apache.org/proper/commons-exec/")
5739 (synopsis "Common program execution related classes")
5740 (description "Commons-Exec simplifies executing external processes.")
5741 (license license:asl2.0)))
5743 (define-public java-commons-exec
5745 (inherit java-commons-exec-1.1)
5750 (uri (string-append "mirror://apache/commons/exec/source/"
5751 "commons-exec-" version "-src.tar.gz"))
5754 "17yb4h6f8l49c5iyyvda4z2nmw0bxrx857nrwmsr7mmpb7x441yv"))))
5756 `(#:test-target "test"
5758 (list (string-append "-Dmaven.junit.jar="
5759 (car (find-files (assoc-ref %build-inputs "java-junit")
5761 "-Dmaven.compiler.source=1.7"
5762 "-Dmaven.compiler.target=1.7")
5764 (modify-phases %standard-phases
5765 (add-before 'build 'delete-network-tests
5766 (lambda* (#:key inputs #:allow-other-keys)
5767 ;; This test hangs indefinitely.
5768 (delete-file "src/test/java/org/apache/commons/exec/issues/Exec60Test.java")
5769 (substitute* "src/test/java/org/apache/commons/exec/issues/Exec41Test.java"
5770 (("ping -c 10 127.0.0.1") "sleep 10"))
5771 (substitute* "src/test/java/org/apache/commons/exec/issues/Exec49Test.java"
5773 (call-with-output-file "src/test/scripts/ping.sh"
5775 (format port "#!~a/bin/sh\nsleep $1\n"
5776 (assoc-ref inputs "bash"))))
5778 ;; The "build" phase automatically tests.
5780 (replace 'install (install-jars "target")))))
5782 `(("java-junit" ,java-junit)
5783 ("java-hamcrest-core" ,java-hamcrest-core)))))
5785 (define-public java-commons-lang
5787 (name "java-commons-lang")
5792 (uri (string-append "mirror://apache/commons/lang/source/"
5793 "commons-lang-" version "-src.tar.gz"))
5795 (base32 "1mxwagqadzx1b2al7i0z1v0r235aj2njdyijf02szq0vhmqrfiq5"))))
5796 (build-system ant-build-system)
5797 (outputs '("out" "doc"))
5799 `(#:test-target "test"
5800 #:test-exclude (list "**/Abstract*.java" "**/Random*.java")
5802 (modify-phases %standard-phases
5803 (add-after 'build 'build-javadoc ant-build-javadoc)
5804 (add-before 'check 'disable-failing-test
5806 ;; Disable a failing test
5807 (substitute* "src/test/java/org/apache/commons/lang/\
5808 time/FastDateFormatTest.java"
5809 (("public void testFormat\\(\\)")
5810 "public void disabled_testFormat()"))
5812 (replace 'install (install-jars "target"))
5813 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
5815 `(("java-junit" ,java-junit)))
5816 (home-page "https://commons.apache.org/lang/")
5817 (synopsis "Extension of the java.lang package")
5818 (description "The Commons Lang components contains a set of Java classes
5819 that provide helper methods for standard Java classes, especially those found
5820 in the @code{java.lang} package in the Sun JDK. The following classes are
5824 @item StringUtils - Helper for @code{java.lang.String}.
5825 @item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets
5826 of characters such as @code{[a-z]} and @code{[abcdez]}.
5827 @item RandomStringUtils - Helper for creating randomised strings.
5828 @item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
5829 @item NumberRange - A range of numbers with an upper and lower bound.
5830 @item ObjectUtils - Helper for @code{java.lang.Object}.
5831 @item SerializationUtils - Helper for serializing objects.
5832 @item SystemUtils - Utility class defining the Java system properties.
5833 @item NestedException package - A sub-package for the creation of nested
5835 @item Enum package - A sub-package for the creation of enumerated types.
5836 @item Builder package - A sub-package for the creation of @code{equals},
5837 @code{hashCode}, @code{compareTo} and @code{toString} methods.
5839 (license license:asl2.0)))
5841 (define-public java-commons-lang3
5843 (name "java-commons-lang3")
5848 (uri (string-append "mirror://apache/commons/lang/source/"
5849 "commons-lang3-" version "-src.tar.gz"))
5851 (base32 "0s4ffbvsyl16c90l45ximsg4dwd8hmz7wsza3p308fw43h6mwhb6"))))
5852 (build-system ant-build-system)
5854 `(#:jar-name "commons-lang3.jar"
5855 #:source-dir "src/main/java"
5856 #:tests? #f; require junit5
5858 (modify-phases %standard-phases
5859 (replace 'install (install-from-pom "pom.xml")))))
5861 `(("apache-commons-parent-pom" ,apache-commons-parent-pom-48)))
5862 (home-page "https://commons.apache.org/lang/")
5863 (synopsis "Extension of the java.lang package")
5864 (description "The Commons Lang components contains a set of Java classes
5865 that provide helper methods for standard Java classes, especially those found
5866 in the @code{java.lang} package. The following classes are included:
5869 @item StringUtils - Helper for @code{java.lang.String}.
5870 @item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets of
5871 characters such as @code{[a-z]} and @code{[abcdez]}.
5872 @item RandomStringUtils - Helper for creating randomised strings.
5873 @item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
5874 @item NumberRange - A range of numbers with an upper and lower bound.
5875 @item ObjectUtils - Helper for @code{java.lang.Object}.
5876 @item SerializationUtils - Helper for serializing objects.
5877 @item SystemUtils - Utility class defining the Java system properties.
5878 @item NestedException package - A sub-package for the creation of nested
5880 @item Enum package - A sub-package for the creation of enumerated types.
5881 @item Builder package - A sub-package for the creation of @code{equals},
5882 @code{hashCode}, @code{compareTo} and @code{toString} methods.
5884 (license license:asl2.0)))
5886 (define-public java-commons-bsf
5888 (name "java-commons-bsf")
5892 (uri (string-append "mirror://apache/commons/bsf/source/bsf-src-"
5896 "1sbamr8jl32p1jgf59nw0b2w9qivyg145954hm6ly54cfgsqrdas"))
5897 (modules '((guix build utils)))
5900 (for-each delete-file
5901 (find-files "." "\\.jar$"))
5903 (build-system ant-build-system)
5905 `(#:build-target "jar"
5906 #:tests? #f; No test file
5907 #:modules ((guix build ant-build-system)
5909 (guix build java-utils)
5912 (modify-phases %standard-phases
5913 (add-before 'build 'create-properties
5915 ;; This file is missing from the distribution
5916 (call-with-output-file "build-properties.xml"
5919 `(project (@ (basedir ".") (name "build-properties") (default ""))
5920 (property (@ (name "project.name") (value "bsf")))
5921 (property (@ (name "source.level") (value "1.5")))
5922 (property (@ (name "build.lib") (value "build/jar")))
5923 (property (@ (name "src.dir") (value "src")))
5924 (property (@ (name "tests.dir") (value "src/org/apache/bsf/test")))
5925 (property (@ (name "build.tests") (value "build/test-classes")))
5926 (property (@ (name "build.dest") (value "build/classes"))))
5929 (replace 'install (install-jars "build")))))
5931 `(("java-junit" ,java-junit)))
5933 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)))
5934 (home-page "https://commons.apache.org/proper/commons-bsf")
5935 (synopsis "Bean Scripting Framework")
5936 (description "The Bean Scripting Framework (BSF) is a set of Java classes
5937 which provides scripting language support within Java applications, and access
5938 to Java objects and methods from scripting languages. BSF allows one to write
5939 JSPs in languages other than Java while providing access to the Java class
5940 library. In addition, BSF permits any Java application to be implemented in
5941 part (or dynamically extended) by a language that is embedded within it. This
5942 is achieved by providing an API that permits calling scripting language engines
5943 from within Java, as well as an object registry that exposes Java objects to
5944 these scripting language engines.")
5945 (license license:asl2.0)))
5947 (define-public java-commons-jxpath
5949 (name "java-commons-jxpath")
5953 (uri (string-append "mirror://apache/commons/jxpath/source/"
5954 "commons-jxpath-" version "-src.tar.gz"))
5957 "1rpgg31ayn9fwr4bfi2i1ij0npcg79ad2fv0w9hacvawsyc42cfs"))))
5958 (build-system ant-build-system)
5960 `(#:jar-name "commons-jxpath.jar"
5961 ;; tests require more dependencies, including mockrunner which depends on old software
5963 #:source-dir "src/java"))
5965 `(("servlet" ,java-classpathx-servletapi)
5966 ("java-jdom" ,java-jdom)
5967 ("java-commons-beanutils" ,java-commons-beanutils)))
5969 `(("java-junit" ,java-junit)))
5970 (home-page "https://commons.apache.org/jxpath/")
5971 (synopsis "Simple interpreter of an expression language called XPath.")
5972 (description "The org.apache.commons.jxpath package defines a simple
5973 interpreter of an expression language called XPath. JXPath applies XPath
5974 expressions to graphs of objects of all kinds: JavaBeans, Maps, Servlet
5975 contexts, DOM etc, including mixtures thereof.")
5976 (license license:asl2.0)))
5978 (define-public java-commons-pool
5980 (name "java-commons-pool")
5984 (uri (string-append "mirror://apache/commons/pool/source/"
5985 "commons-pool2-" version "-src.tar.gz"))
5988 "1fi1hgqmq01bs6azbj3sfswxzadp2r8sjjfiq6ryilz1m50kvrv6"))))
5990 `(#:jar-name "common-pool.jar"
5991 #:source-dir "src/main/java"
5993 (list "**/PerformanceTest.java")))
5994 (build-system ant-build-system)
5996 `(("java-cglib" ,java-cglib)))
5998 `(("java-junit" ,java-junit)
5999 ("java-hamcrest-core" ,java-hamcrest-core)
6000 ("java-asm" ,java-asm)
6001 ("java-objenesis" ,java-objenesis)))
6002 (home-page "https://commons.apache.org/proper/commons-pool/")
6003 (synopsis "Object-pooling API in Java")
6004 (description "The commons-pool package provides an object-pooling API
6005 and a number of object pool implementations. This package defines a
6006 handful of pooling interfaces and some base classes that may be useful when
6007 creating new pool implementations.")
6008 (license license:asl2.0)))
6010 (define-public java-commons-dbcp
6012 (name "java-commons-dbcp")
6016 (uri (string-append "mirror://apache/commons/dbcp/source/"
6017 "commons-dbcp2-" version "-src.tar.gz"))
6020 "0axbvcbnf2l70fc3ybrlp3siw2w4ka9mia2pnx4py8gz54cpw3rc"))))
6022 `(#:source-dir "src/main/java"
6023 #:jar-name "java-commons-dbcp.jar"
6024 #:tests? #f)); requires apache-geronimo
6026 `(("java-commons-pool" ,java-commons-pool)
6027 ("java-commons-logging" ,java-commons-logging-minimal)
6028 ("java-jboss-transaction-api-spec" ,java-jboss-transaction-api-spec)))
6030 `(("java-junit" ,java-junit)))
6031 (build-system ant-build-system)
6032 (home-page "https://commons.apache.org/proper/commons-dbcp/")
6033 (synopsis "Database Connection Pool for Java")
6034 (description "Commons-dbcp allows you to share a pool of database
6035 connections between users. Creating a new connection for each user can be
6036 time consuming and even unfeasible when the number of simultaneous users is
6037 very large. This package provides a way to share a poole of connections to
6039 (license license:asl2.0)))
6041 (define-public java-commons-jcs
6043 (name "java-commons-jcs")
6047 (uri (string-append "mirror://apache/commons/jcs/source/"
6048 "commons-jcs-dist-" version "-src.tar.gz"))
6051 "0syhq2npjbrl0azqfjm0gvash1qd5qjy4qmysxcrqjsk0nf9fa1q"))))
6052 (build-system ant-build-system)
6054 `(#:jar-name "commons-jcs.jar"
6055 #:source-dir "commons-jcs-core/src/main/java"
6056 #:test-dir "commons-jcs-core/src/test"
6057 #:tests? #f; requires hsqldb
6059 (modify-phases %standard-phases
6060 (add-before 'build 'prepare
6062 (with-directory-excursion
6063 "commons-jcs-core/src/main/java/org/apache/commons/jcs"
6065 "auxiliary/disk/jdbc/dsfactory/SharedPoolDataSourceFactory.java"
6066 (("commons.dbcp") "commons.dbcp2")
6067 ((".*\\.setMaxActive.*") ""))
6068 ;;; Remove dependency on velocity-tools
6069 (delete-file "admin/servlet/JCSAdminServlet.java"))
6072 `(("java-classpathx-servletapi" ,java-classpathx-servletapi)
6073 ("java-commons-logging-minimal" ,java-commons-logging-minimal)
6074 ("java-commons-httpclient" ,java-commons-httpclient)
6075 ("java-commons-dbcp" ,java-commons-dbcp)))
6077 `(("java-junit" ,java-junit)))
6078 (home-page "https://commons.apache.org/proper/commons-jcs/")
6079 (synopsis "Distributed caching system in Java")
6080 (description "JCS is a distributed caching system written in Java. It
6081 is intended to speed up applications by providing a means to manage cached
6082 data of various dynamic natures. Like any caching system, JCS is most useful
6083 for high read, low put applications. Latency times drop sharply and
6084 bottlenecks move away from the database in an effectively cached system.")
6085 (license license:asl2.0)))
6087 (define-public java-jsr250
6089 (name "java-jsr250")
6093 (uri (string-append "https://repo1.maven.org/maven2/"
6094 "javax/annotation/javax.annotation-api/"
6095 version "/javax.annotation-api-"
6096 version "-sources.jar"))
6099 "08clh8n4n9wfglf75qsqfjs6yf79f7x6hqx38cn856pksszv50kz"))))
6100 (build-system ant-build-system)
6102 `(#:tests? #f ; no tests included
6104 #:jar-name "jsr250.jar"
6105 #:modules ((guix build ant-build-system)
6107 (guix build maven pom)
6108 (guix build java-utils)
6111 (modify-phases %standard-phases
6112 (add-before 'install 'create-pom
6114 (with-output-to-file "pom.xml"
6118 (modelVersion "4.0.0")
6120 (groupId "javax.annotation")
6121 (artifactId "jsr250-api")
6122 (version ,,version))))))
6125 (install-from-pom "pom.xml")))))
6126 (home-page "https://jcp.org/en/jsr/detail?id=250")
6127 (synopsis "Security-related annotations")
6128 (description "This package provides annotations for security. It provides
6129 packages in the @code{javax.annotation} and @code{javax.annotation.security}
6131 ;; either cddl or gpl2 only, with classpath exception
6132 (license (list license:cddl1.0
6135 (define-public java-jsr305
6137 (name "java-jsr305")
6141 (uri (string-append "https://repo1.maven.org/maven2/"
6142 "com/google/code/findbugs/"
6143 "jsr305/" version "/jsr305-"
6144 version "-sources.jar"))
6147 "1rh6jin9v7jqpq3kf1swl868l8i94r636n03pzpsmgr8v0lh9j2n"))))
6148 (build-system ant-build-system)
6150 `(#:tests? #f ; no tests included
6151 #:jar-name "jsr305.jar"
6152 #:modules ((guix build ant-build-system)
6153 (guix build java-utils)
6154 (guix build maven pom)
6158 (modify-phases %standard-phases
6159 (add-before 'install 'create-pom
6161 (with-output-to-file "pom.xml"
6165 (modelVersion "4.0.0")
6167 (groupId "com.google.code.findbugs")
6168 (artifactId "jsr305")
6169 (version ,,version))))))
6172 (install-from-pom "pom.xml")))))
6173 (home-page "http://findbugs.sourceforge.net/")
6174 (synopsis "Annotations for the static analyzer called findbugs")
6175 (description "This package provides annotations for the findbugs package.
6176 It provides packages in the @code{javax.annotations} namespace.")
6177 (license license:asl2.0)))
6179 (define-public java-guava
6182 ;; This is the last release of Guava that can be built with Java 7.
6187 (url "https://github.com/google/guava/")
6188 (commit (string-append "v" version))))
6189 (file-name (git-file-name name version))
6192 "00h5cawdjic1vind3yivzh1f58flvm1yfmhsyqwyvmbvj1vakysp"))))
6193 (build-system ant-build-system)
6195 `(#:tests? #f ; no tests included
6196 #:jar-name "guava.jar"
6197 #:source-dir "guava/src"
6199 (modify-phases %standard-phases
6200 (add-after 'unpack 'trim-sources
6202 (with-directory-excursion "guava/src/com/google/common"
6203 ;; Remove annotations to avoid extra dependencies:
6204 ;; * "j2objc" annotations are used when converting Java to
6206 ;; * "errorprone" annotations catch common Java mistakes at
6208 ;; * "IgnoreJRERequirement" is used for Android.
6209 (substitute* (find-files "." "\\.java$")
6210 (("import com.google.j2objc.*") "")
6211 (("import com.google.errorprone.annotation.*") "")
6212 (("import org.codehaus.mojo.animal_sniffer.*") "")
6213 (("@CanIgnoreReturnValue") "")
6216 (("@RetainedWith") "")
6218 (("@ForOverride") "")
6219 (("@J2ObjCIncompatible") "")
6220 (("@IgnoreJRERequirement") "")))
6222 (replace 'install (install-from-pom "guava/pom.xml")))))
6224 `(("java-jsr305" ,java-jsr305)))
6226 `(("java-guava-parent-pom" ,java-guava-parent-pom)))
6227 (home-page "https://github.com/google/guava")
6228 (synopsis "Google core libraries for Java")
6229 (description "Guava is a set of core libraries that includes new
6230 collection types (such as multimap and multiset), immutable collections, a
6231 graph library, functional types, an in-memory cache, and APIs/utilities for
6232 concurrency, I/O, hashing, primitives, reflection, string processing, and much
6234 (license license:asl2.0)))
6236 (define java-guava-parent-pom
6238 (inherit java-guava)
6239 (name "java-guava-parent-pom")
6243 (modify-phases %standard-phases
6247 (install-pom-file "pom.xml")))))
6249 `(("java-sonatype-oss-parent-pom" ,java-sonatype-oss-parent-pom-7)))))
6251 ;; The java-commons-logging package provides adapters to many different
6252 ;; logging frameworks. To avoid an excessive dependency graph we try to build
6253 ;; it with only a minimal set of adapters.
6254 (define-public java-commons-logging-minimal
6256 (name "java-commons-logging-minimal")
6260 (uri (string-append "mirror://apache/commons/logging/source/"
6261 "commons-logging-" version "-src.tar.gz"))
6264 "10bwcy5w8d7y39n0krlwhnp8ds3kj5zhmzj0zxnkw0qdlsjmsrj9"))))
6265 (build-system ant-build-system)
6267 `(#:tests? #f ; avoid dependency on logging frameworks
6268 #:jar-name "commons-logging-minimal.jar"
6270 (modify-phases %standard-phases
6271 (add-after 'unpack 'delete-adapters-and-tests
6273 ;; Delete all adapters except for NoOpLog, SimpleLog, and
6274 ;; LogFactoryImpl. NoOpLog is required to build; LogFactoryImpl
6275 ;; is used by applications; SimpleLog is the only actually usable
6276 ;; implementation that does not depend on another logging
6280 (delete-file (string-append
6281 "src/main/java/org/apache/commons/logging/impl/" file)))
6282 (list "Jdk13LumberjackLogger.java"
6283 "WeakHashtable.java"
6285 "ServletContextCleaner.java"
6288 "LogKitLogger.java"))
6289 (delete-file-recursively "src/test")
6291 (home-page "https://commons.apache.org/logging/")
6292 (synopsis "Common API for logging implementations")
6293 (description "The Logging package is a thin bridge between different
6294 logging implementations. A library that uses the commons-logging API can be
6295 used with any logging implementation at runtime.")
6296 (license license:asl2.0)))
6298 ;; This is the last release of the 1.x series.
6299 (define-public java-mockito-1
6301 (name "java-mockito")
6305 (uri (string-append "http://repo1.maven.org/maven2/"
6306 "org/mockito/mockito-core/" version
6307 "/mockito-core-" version "-sources.jar"))
6310 "0vmiwnwpf83g2q7kj1rislmja8fpvqkixjhawh7nxnygx6pq11kc"))))
6311 (build-system ant-build-system)
6313 `(#:jar-name "mockito.jar"
6314 #:tests? #f ; no tests included
6315 ;; FIXME: patch-and-repack does not support jars, so we have to apply
6316 ;; patches in build phases.
6318 (modify-phases %standard-phases
6319 ;; Mockito was developed against a different version of hamcrest,
6320 ;; which does not require matcher implementations to provide an
6321 ;; implementation of the "describeMismatch" method. We add this
6322 ;; simple definition to pass the build with our version of hamcrest.
6323 (add-after 'unpack 'fix-hamcrest-build-error
6325 (substitute* "src/org/mockito/internal/matchers/LocalizedMatcher.java"
6326 (("public Matcher getActualMatcher\\(\\) .*" line)
6328 public void describeMismatch(Object item, Description description) {
6329 actualMatcher.describeMismatch(item, description);
6333 ;; Mockito bundles cglib. We have a cglib package, so let's use
6335 (add-after 'unpack 'use-system-libraries
6337 (with-directory-excursion "src/org/mockito/internal/creation/cglib"
6338 (substitute* '("CGLIBHacker.java"
6339 "CglibMockMaker.java"
6340 "ClassImposterizer.java"
6341 "DelegatingMockitoMethodProxy.java"
6342 "MethodInterceptorFilter.java"
6343 "MockitoNamingPolicy.java"
6344 "SerializableMockitoMethodProxy.java"
6345 "SerializableNoOp.java")
6346 (("import org.mockito.cglib") "import net.sf.cglib")))
6349 `(("java-junit" ,java-junit)
6350 ("java-objenesis" ,java-objenesis)
6351 ("java-cglib" ,java-cglib)
6352 ("java-hamcrest-core" ,java-hamcrest-core)))
6353 (home-page "http://mockito.org")
6354 (synopsis "Mockito is a mock library for Java")
6355 (description "Mockito is a mocking library for Java which lets you write
6356 tests with a clean and simple API. It generates mocks using reflection, and
6357 it records all mock invocations, including methods arguments.")
6358 (license license:asl2.0)))
6360 (define-public java-httpcomponents-httpcore
6362 (name "java-httpcomponents-httpcore")
6366 (uri (string-append "mirror://apache//httpcomponents/httpcore/"
6367 "source/httpcomponents-core-"
6368 version "-src.tar.gz"))
6371 "02bwcf38y4vgwq7kj2s6q7qrmma641r5lacivm16kgxvb2j6h1vy"))))
6372 (build-system ant-build-system)
6374 `(#:jar-name "httpcomponents-httpcore.jar"
6376 (modify-phases %standard-phases
6377 (add-after 'unpack 'chdir
6378 (lambda _ (chdir "httpcore") #t)))))
6380 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)
6381 ("java-commons-lang3" ,java-commons-lang3)))
6383 `(("java-junit" ,java-junit)
6384 ("java-mockito" ,java-mockito-1)))
6385 (home-page "https://hc.apache.org/httpcomponents-core-4.4.x/index.html")
6386 (synopsis "Low level HTTP transport components")
6387 (description "HttpCore is a set of low level HTTP transport components
6388 that can be used to build custom client and server side HTTP services with a
6389 minimal footprint. HttpCore supports two I/O models: blocking I/O model based
6390 on the classic Java I/O and non-blocking, event driven I/O model based on Java
6393 This package provides the blocking I/O model library.")
6394 (license license:asl2.0)))
6396 (define-public java-httpcomponents-httpcore-nio
6397 (package (inherit java-httpcomponents-httpcore)
6398 (name "java-httpcomponents-httpcore-nio")
6400 `(#:jar-name "httpcomponents-httpcore-nio.jar"
6402 (modify-phases %standard-phases
6403 (add-after 'unpack 'chdir
6404 (lambda _ (chdir "httpcore-nio") #t)))))
6406 `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
6407 ("java-hamcrest-core" ,java-hamcrest-core)
6408 ,@(package-inputs java-httpcomponents-httpcore)))
6409 (description "HttpCore is a set of low level HTTP transport components
6410 that can be used to build custom client and server side HTTP services with a
6411 minimal footprint. HttpCore supports two I/O models: blocking I/O model based
6412 on the classic Java I/O and non-blocking, event driven I/O model based on Java
6415 This package provides the non-blocking I/O model library based on Java
6418 (define-public java-httpcomponents-httpcore-ab
6419 (package (inherit java-httpcomponents-httpcore)
6420 (name "java-httpcomponents-httpcore-ab")
6422 `(#:jar-name "httpcomponents-httpcore-ab.jar"
6424 (modify-phases %standard-phases
6425 (add-after 'unpack 'chdir
6426 (lambda _ (chdir "httpcore-ab") #t)))))
6428 `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
6429 ("java-commons-cli" ,java-commons-cli)
6430 ("java-hamcrest-core" ,java-hamcrest-core)
6431 ,@(package-inputs java-httpcomponents-httpcore)))
6432 (synopsis "Apache HttpCore benchmarking tool")
6433 (description "This package provides the HttpCore benchmarking tool. It is
6434 an Apache AB clone based on HttpCore.")))
6436 (define-public java-httpcomponents-httpclient
6438 (name "java-httpcomponents-httpclient")
6442 (uri (string-append "mirror://apache/httpcomponents/httpclient/"
6443 "source/httpcomponents-client-"
6444 version "-src.tar.gz"))
6447 "1va99m2zc2liv0v9vn72p5ja8yz4s5wq7zpahaai5nr966kvxzkb"))))
6448 (build-system ant-build-system)
6450 `(#:jar-name "httpcomponents-httpclient.jar"
6452 (modify-phases %standard-phases
6453 (add-after 'unpack 'chdir
6454 (lambda _ (chdir "httpclient") #t)))))
6456 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)
6457 ("java-commons-codec" ,java-commons-codec)
6458 ("java-hamcrest-core" ,java-hamcrest-core)
6459 ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
6460 ("java-mockito" ,java-mockito-1)
6461 ("java-junit" ,java-junit)))
6462 (home-page "https://hc.apache.org/httpcomponents-client-ga/")
6463 (synopsis "HTTP client library for Java")
6464 (description "Although the @code{java.net} package provides basic
6465 functionality for accessing resources via HTTP, it doesn't provide the full
6466 flexibility or functionality needed by many applications. @code{HttpClient}
6467 seeks to fill this void by providing an efficient, up-to-date, and
6468 feature-rich package implementing the client side of the most recent HTTP
6469 standards and recommendations.")
6470 (license license:asl2.0)))
6472 (define-public java-httpcomponents-httpmime
6473 (package (inherit java-httpcomponents-httpclient)
6474 (name "java-httpcomponents-httpmime")
6476 `(#:jar-name "httpcomponents-httpmime.jar"
6478 (modify-phases %standard-phases
6479 (add-after 'unpack 'chdir
6480 (lambda _ (chdir "httpmime") #t)))))
6482 `(("java-httpcomponents-httpclient" ,java-httpcomponents-httpclient)
6483 ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
6484 ("java-junit" ,java-junit)
6485 ("java-hamcrest-core" ,java-hamcrest-core)))))
6487 (define-public java-commons-net
6489 (name "java-commons-net")
6493 (uri (string-append "mirror://apache/commons/net/source/"
6494 "commons-net-" version "-src.tar.gz"))
6497 "0n0cmnddk9qdqhjvka8pc6hd9mn2qi3166f1s6xk32h7rfy1adxr"))))
6498 (build-system ant-build-system)
6500 `(;; FIXME: MainTest.java tries to read "examples.properties" (which
6501 ;; should be "resources/examples/examples.properties"), but gets "null"
6504 #:jar-name "commons-net.jar"))
6506 `(("java-junit" ,java-junit)
6507 ("java-hamcrest-core" ,java-hamcrest-core)))
6508 (home-page "https://commons.apache.org/net/")
6509 (synopsis "Client library for many basic Internet protocols")
6510 (description "The Apache Commons Net library implements the client side of
6511 many basic Internet protocols. The purpose of the library is to provide
6512 fundamental protocol access, not higher-level abstractions.")
6513 (license license:asl2.0)))
6515 (define-public java-jsch
6521 (uri (string-append "mirror://sourceforge/jsch/jsch/"
6522 version "/jsch-" version ".zip"))
6525 "1lxyjwvmwa723wcf3bqn816hkvc03vz4xhbsi7bvfhrz2rpgcfq6"))))
6526 (build-system ant-build-system)
6528 `(#:build-target "dist"
6529 #:tests? #f ; no tests included
6531 (modify-phases %standard-phases
6532 (replace 'install (install-jars "dist")))))
6534 `(("unzip" ,unzip)))
6535 (home-page "http://www.jcraft.com/jsch/")
6536 (synopsis "Pure Java implementation of SSH2")
6537 (description "JSch is a pure Java implementation of SSH2. JSch allows you
6538 to connect to an SSH server and use port forwarding, X11 forwarding, file
6539 transfer, etc., and you can integrate its functionality into your own Java
6541 (license license:bsd-3)))
6543 (define-public java-commons-compress
6545 (name "java-commons-compress")
6549 (uri (string-append "mirror://apache/commons/compress/source/"
6550 "commons-compress-" version "-src.tar.gz"))
6553 "1vjqvavrn0babffn1kciz6v52ibwq2vwhzlb95hazis3lgllnxc8"))))
6554 (build-system ant-build-system)
6556 `(#:jar-name "commons-compress.jar"
6558 (modify-phases %standard-phases
6559 (add-after 'unpack 'delete-bad-tests
6561 (with-directory-excursion "src/test/java/org/apache/commons/compress/"
6562 ;; FIXME: These tests really should not fail. Maybe they are
6563 ;; indicative of problems with our Java packaging work.
6565 ;; This test fails with a null pointer exception.
6566 (delete-file "archivers/sevenz/SevenZOutputFileTest.java")
6567 ;; This test fails to open test resources.
6568 (delete-file "archivers/zip/ExplodeSupportTest.java")
6570 ;; FIXME: This test adds a dependency on powermock, which is hard to
6571 ;; package at this point.
6572 ;; https://github.com/powermock/powermock
6573 (delete-file "archivers/sevenz/SevenZNativeHeapTest.java"))
6575 (replace 'install (install-from-pom "pom.xml")))))
6577 `(("java-xz" ,java-xz)
6578 ("apache-commons-parent-pom" ,apache-commons-parent-pom-41)))
6580 `(("java-junit" ,java-junit)
6581 ("java-mockito" ,java-mockito-1)))
6582 (home-page "https://commons.apache.org/proper/commons-compress/")
6583 (synopsis "Java library for working with compressed files")
6584 (description "The Apache Commons Compress library defines an API for
6585 working with compressed files such as ar, cpio, Unix dump, tar, zip, gzip, XZ,
6586 Pack200, bzip2, 7z, arj, lzma, snappy, DEFLATE, lz4 and Z files.")
6587 (license license:asl2.0)))
6589 (define-public java-commons-csv
6591 (name "java-commons-csv")
6595 (uri (string-append "mirror://apache/commons/csv/source/"
6596 "commons-csv-" version "-src.tar.gz"))
6599 "1l89m0fm2s3xx3v3iynvangymfg2vlyngaj6fgsi457nmsw7m7ij"))))
6600 (build-system ant-build-system)
6602 `(#:jar-name "commons-csv.jar"
6603 #:source-dir "src/main/java"
6604 #:tests? #f)); FIXME: requires java-h2
6606 `(("java-hamcrest-core" ,java-hamcrest-core)
6607 ("java-commons-io" ,java-commons-io)
6608 ("java-commons-lang3" ,java-commons-lang3)
6609 ("junit" ,java-junit)))
6610 (home-page "https://commons.apache.org/proper/commons-csv/")
6611 (synopsis "Read and write CSV documents")
6612 (description "Commons CSV reads and writes files in variations of the Comma
6613 Separated Value (CSV) format. The most common CSV formats are predefined in the
6617 @item Microsoft Excel
6618 @item Informix UNLOAD
6619 @item Informix UNLOAD CSV
6625 Custom formats can be created using a fluent style API.")
6626 (license license:asl2.0)))
6628 (define-public java-osgi-annotation
6630 (name "java-osgi-annotation")
6634 (uri (string-append "https://repo1.maven.org/maven2/"
6635 "org/osgi/org.osgi.annotation/" version "/"
6636 "org.osgi.annotation-" version "-sources.jar"))
6639 "1q718mb7gqg726rh6pc2hcisn8v50nv35abbir0jypmffhiii85w"))))
6640 (build-system ant-build-system)
6642 `(#:tests? #f ; no tests
6643 #:jar-name "osgi-annotation.jar"))
6644 (home-page "https://www.osgi.org")
6645 (synopsis "Annotation module of OSGi framework")
6647 "OSGi, for Open Services Gateway initiative framework, is a module system
6648 and service platform for the Java programming language. This package contains
6649 the OSGi annotation module, providing additional services to help dynamic
6651 (license license:asl2.0)))
6653 (define-public java-osgi-core
6655 (name "java-osgi-core")
6659 (uri (string-append "https://repo1.maven.org/maven2/"
6660 "org/osgi/org.osgi.core/" version "/"
6661 "org.osgi.core-" version "-sources.jar"))
6664 "19bpf5jx32jq9789gyhin35q5v7flmw0p9mk7wbgqpxqfmxyiabv"))))
6665 (build-system ant-build-system)
6667 `(#:tests? #f ; no tests
6668 #:jar-name "osgi-core.jar"))
6670 `(("java-osgi-annotation" ,java-osgi-annotation)))
6671 (home-page "https://www.osgi.org")
6672 (synopsis "Core module of OSGi framework")
6674 "OSGi, for Open Services Gateway initiative framework, is a module system
6675 and service platform for the Java programming language. This package contains
6676 the OSGi Core module.")
6677 (license license:asl2.0)))
6679 (define-public java-osgi-service-event
6681 (name "java-osgi-service-event")
6685 (uri (string-append "https://repo1.maven.org/maven2/"
6686 "org/osgi/org.osgi.service.event/"
6687 version "/org.osgi.service.event-"
6688 version "-sources.jar"))
6691 "1nyhlgagwym75bycnjczwbnpymv2iw84zbhvvzk84g9q736i6qxm"))))
6692 (build-system ant-build-system)
6694 `(#:tests? #f ; no tests
6695 #:jar-name "osgi-service-event.jar"))
6697 `(("java-osgi-annotation" ,java-osgi-annotation)
6698 ("java-osgi-core" ,java-osgi-core)))
6699 (home-page "https://www.osgi.org")
6700 (synopsis "OSGi service event module")
6702 "OSGi, for Open Services Gateway initiative framework, is a module system
6703 and service platform for the Java programming language. This package contains
6704 the OSGi @code{org.osgi.service.event} module.")
6705 (license license:asl2.0)))
6707 (define-public java-eclipse-osgi
6709 (name "java-eclipse-osgi")
6713 (uri (string-append "https://repo1.maven.org/maven2/"
6714 "org/eclipse/platform/org.eclipse.osgi/"
6715 version "/org.eclipse.osgi-"
6716 version "-sources.jar"))
6719 "00cqc6lb29n0zv68b4l842vzkwawvbr7gshfdygsk8sicvcq2c7b"))))
6720 (build-system ant-build-system)
6722 `(#:tests? #f ; no tests included
6723 #:jar-name "eclipse-equinox-osgi.jar"))
6725 `(("java-osgi-annotation" ,java-osgi-annotation)))
6726 (home-page "http://www.eclipse.org/equinox/")
6727 (synopsis "Eclipse Equinox OSGi framework")
6728 (description "This package provides an implementation of the OSGi Core
6730 (license license:epl1.0)))
6732 (define-public java-eclipse-equinox-common
6734 (name "java-eclipse-equinox-common")
6735 (version "3.10.200")
6738 (uri (string-append "https://repo1.maven.org/maven2/"
6739 "org/eclipse/platform/org.eclipse.equinox.common/"
6740 version "/org.eclipse.equinox.common-"
6741 version "-sources.jar"))
6744 "1yn8ij6xsljlf35sr2l7wvyvc0ss4n1rv0ry5zkgb49dj4hyrqrj"))))
6745 (build-system ant-build-system)
6747 `(#:tests? #f ; no tests included
6748 #:jar-name "eclipse-equinox-common.jar"))
6750 `(("java-eclipse-osgi" ,java-eclipse-osgi)))
6751 (home-page "http://www.eclipse.org/equinox/")
6752 (synopsis "Common Eclipse runtime")
6753 (description "This package provides the common Eclipse runtime.")
6754 (license license:epl1.0)))
6756 (define-public java-eclipse-core-jobs
6758 (name "java-eclipse-core-jobs")
6762 (uri (string-append "https://repo1.maven.org/maven2/"
6763 "org/eclipse/platform/org.eclipse.core.jobs/"
6764 version "/org.eclipse.core.jobs-"
6765 version "-sources.jar"))
6768 "0395b8lh0km8vhzjnchvs1rii1qz48hyvb2wqfaq4yhklbwihq4b"))))
6769 (build-system ant-build-system)
6771 `(#:tests? #f ; no tests included
6772 #:jar-name "eclipse-core-jobs.jar"))
6774 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6775 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6776 (home-page "http://www.eclipse.org/equinox/")
6777 (synopsis "Eclipse jobs mechanism")
6778 (description "This package provides the Eclipse jobs mechanism.")
6779 (license license:epl1.0)))
6781 (define-public java-eclipse-equinox-registry
6783 (name "java-eclipse-equinox-registry")
6787 (uri (string-append "https://repo1.maven.org/maven2/"
6788 "org/eclipse/platform/org.eclipse.equinox.registry/"
6789 version "/org.eclipse.equinox.registry-"
6790 version "-sources.jar"))
6793 "1i9sgymh2fy5vdgk5y7s3qvrlbgh4l93ddqi3v4zmca7hwrlhf9k"))))
6794 (build-system ant-build-system)
6796 `(#:tests? #f ; no tests included
6797 #:jar-name "eclipse-equinox-registry.jar"))
6799 `(("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
6800 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6801 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6802 (home-page "http://www.eclipse.org/equinox/")
6803 (synopsis "Eclipse extension registry support")
6804 (description "This package provides support for the Eclipse extension
6806 (license license:epl1.0)))
6808 (define-public java-eclipse-equinox-app
6810 (name "java-eclipse-equinox-app")
6814 (uri (string-append "https://repo1.maven.org/maven2/"
6815 "org/eclipse/platform/org.eclipse.equinox.app/"
6816 version "/org.eclipse.equinox.app-"
6817 version "-sources.jar"))
6820 "0nhvbp93y203ar7y59gb0mz3w2d3jlqhr0c9hii9bcfpmr7imdab"))))
6821 (build-system ant-build-system)
6823 `(#:tests? #f ; no tests included
6824 #:jar-name "eclipse-equinox-app.jar"))
6826 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6827 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6828 ("java-eclipse-osgi" ,java-eclipse-osgi)
6829 ("java-osgi-service-event" ,java-osgi-service-event)))
6830 (home-page "http://www.eclipse.org/equinox/")
6831 (synopsis "Equinox application container")
6832 (description "This package provides the Equinox application container for
6834 (license license:epl1.0)))
6836 (define-public java-eclipse-equinox-preferences
6838 (name "java-eclipse-equinox-preferences")
6842 (uri (string-append "https://repo1.maven.org/maven2/"
6843 "org/eclipse/platform/org.eclipse.equinox.preferences/"
6844 version "/org.eclipse.equinox.preferences-"
6845 version "-sources.jar"))
6848 "0k7w6c141sqym4fy3af0qkwpy4pdh2vsjpjba6rp5fxyqa24v0a2"))))
6849 (build-system ant-build-system)
6851 `(#:tests? #f ; no tests included
6852 #:jar-name "eclipse-equinox-preferences.jar"))
6854 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6855 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6856 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6857 (home-page "http://www.eclipse.org/equinox/")
6858 (synopsis "Eclipse preferences mechanism")
6859 (description "This package provides the Eclipse preferences mechanism with
6860 the module @code{org.eclipse.equinox.preferences}.")
6861 (license license:epl1.0)))
6863 (define-public java-eclipse-core-contenttype
6865 (name "java-eclipse-core-contenttype")
6869 (uri (string-append "https://repo1.maven.org/maven2/"
6870 "org/eclipse/platform/org.eclipse.core.contenttype/"
6871 version "/org.eclipse.core.contenttype-"
6872 version "-sources.jar"))
6875 "1wcqcv7ijwv5rh748vz3x9pkmjl9w1r0k0026k56n8yjl4rrmspi"))))
6876 (build-system ant-build-system)
6878 `(#:tests? #f ; no tests included
6879 #:jar-name "eclipse-core-contenttype.jar"))
6881 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6882 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6883 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6884 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6885 (home-page "http://www.eclipse.org/")
6886 (synopsis "Eclipse content mechanism")
6887 (description "This package provides the Eclipse content mechanism in the
6888 @code{org.eclipse.core.contenttype} module.")
6889 (license license:epl1.0)))
6891 (define-public java-eclipse-core-runtime
6893 (name "java-eclipse-core-runtime")
6894 (version "3.15.100")
6897 (uri (string-append "https://repo1.maven.org/maven2/"
6898 "org/eclipse/platform/org.eclipse.core.runtime/"
6899 version "/org.eclipse.core.runtime-"
6900 version "-sources.jar"))
6903 "0l8xayacsbjvz5hypx2fv47vpw2n4dspamcfb3hx30x9hj8vmg7r"))))
6904 (build-system ant-build-system)
6906 `(#:tests? #f ; no tests included
6907 #:jar-name "eclipse-core-runtime.jar"))
6909 `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
6910 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
6911 ("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
6912 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6913 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6914 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6915 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6916 (home-page "https://www.eclipse.org/")
6917 (synopsis "Eclipse core runtime")
6918 (description "This package provides the Eclipse core runtime with the
6919 module @code{org.eclipse.core.runtime}.")
6920 (license license:epl1.0)))
6922 (define-public java-eclipse-core-filesystem
6924 (name "java-eclipse-core-filesystem")
6928 (uri (string-append "https://repo1.maven.org/maven2/"
6929 "org/eclipse/platform/org.eclipse.core.filesystem/"
6930 version "/org.eclipse.core.filesystem-"
6931 version "-sources.jar"))
6934 "0km1bhwjim4rfy3pkvjhvy31kgsyf2ncx0mlkmbf5n6g57pphdyj"))))
6935 (build-system ant-build-system)
6937 `(#:tests? #f ; no tests included
6938 #:jar-name "eclipse-core-filesystem.jar"))
6940 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6941 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6942 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6943 (home-page "https://www.eclipse.org/")
6944 (synopsis "Eclipse core file system")
6945 (description "This package provides the Eclipse core file system with the
6946 module @code{org.eclipse.core.filesystem}.")
6947 (license license:epl1.0)))
6949 (define-public java-eclipse-core-expressions
6951 (name "java-eclipse-core-expressions")
6955 (uri (string-append "https://repo1.maven.org/maven2/"
6956 "org/eclipse/platform/org.eclipse.core.expressions/"
6957 version "/org.eclipse.core.expressions-"
6958 version "-sources.jar"))
6961 "18bw2l875gmygvpagpgk9l24qzbdjia4ag12nw6fi8v8yaq4987f"))))
6962 (build-system ant-build-system)
6964 `(#:tests? #f ; no tests included
6965 #:jar-name "eclipse-core-expressions.jar"))
6967 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6968 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6969 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6970 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
6971 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6972 (home-page "https://www.eclipse.org/")
6973 (synopsis "Eclipse core expression language")
6974 (description "This package provides the Eclipse core expression language
6975 with the @code{org.eclipse.core.expressions} module.")
6976 (license license:epl1.0)))
6978 (define-public java-eclipse-core-variables
6980 (name "java-eclipse-core-variables")
6984 (uri (string-append "https://repo1.maven.org/maven2/"
6985 "org/eclipse/platform/org.eclipse.core.variables/"
6986 version "/org.eclipse.core.variables-"
6987 version "-sources.jar"))
6990 "12dirh03zi4n5x5cj07vzrhkmnqy6h9q10h9j605pagmpmifyxmy"))))
6991 (build-system ant-build-system)
6993 `(#:tests? #f ; no tests included
6994 #:jar-name "eclipse-core-variables.jar"))
6996 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6997 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6998 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6999 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
7000 ("java-eclipse-osgi" ,java-eclipse-osgi)))
7001 (home-page "https://www.eclipse.org/platform")
7002 (synopsis "Eclipse core variables")
7003 (description "This package provides the Eclipse core variables module
7004 @code{org.eclipse.core.variables}.")
7005 (license license:epl1.0)))
7007 (define-public java-eclipse-ant-core
7009 (name "java-eclipse-ant-core")
7013 (uri (string-append "https://repo1.maven.org/maven2/"
7014 "org/eclipse/platform/org.eclipse.ant.core/"
7015 version "/org.eclipse.ant.core-"
7016 version "-sources.jar"))
7019 "11g3if794qjlk98mz9zch22rr56sd7z63vn4i7k2icr8cq5bfqg7"))))
7020 (build-system ant-build-system)
7022 `(#:tests? #f ; no tests included
7023 #:jar-name "eclipse-ant-core.jar"))
7025 `(("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
7026 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7027 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
7028 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
7029 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
7030 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
7031 ("java-eclipse-core-variables" ,java-eclipse-core-variables)
7032 ("java-eclipse-osgi" ,java-eclipse-osgi)))
7033 (home-page "https://www.eclipse.org/platform")
7034 (synopsis "Ant build tool core libraries")
7035 (description "This package provides the ant build tool core libraries with
7036 the module @code{org.eclipse.ant.core}.")
7037 (license license:epl1.0)))
7039 (define-public java-eclipse-core-resources
7041 (name "java-eclipse-core-resources")
7042 (version "3.13.200")
7045 (uri (string-append "https://repo1.maven.org/maven2/"
7046 "org/eclipse/platform/org.eclipse.core.resources/"
7047 version "/org.eclipse.core.resources-"
7048 version "-sources.jar"))
7051 "1sn3b6ky72hkvxcgf9b2jkpbdh3y8lbhi9xxwv1dsiddpkkq91hs"))))
7052 (build-system ant-build-system)
7054 `(#:tests? #f ; no tests included
7055 #:jar-name "eclipse-core-resources.jar"))
7057 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7058 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
7059 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
7060 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
7061 ("java-eclipse-core-expressions" ,java-eclipse-core-expressions)
7062 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
7063 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
7064 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
7065 ("java-eclipse-ant-core" ,java-eclipse-ant-core)
7066 ("java-eclipse-osgi" ,java-eclipse-osgi)))
7067 (home-page "https://www.eclipse.org/")
7068 (synopsis "Eclipse core resource management")
7069 (description "This package provides the Eclipse core resource management
7070 module @code{org.eclipse.core.resources}.")
7071 (license license:epl1.0)))
7073 (define-public java-eclipse-compare-core
7075 (name "java-eclipse-compare-core")
7079 (uri (string-append "https://repo1.maven.org/maven2/"
7080 "org/eclipse/platform/org.eclipse.compare.core/"
7081 version "/org.eclipse.compare.core-"
7082 version "-sources.jar"))
7085 "10g37r0pbiffyv2wk35c6g5lwzkdipkl0kkjp41v84dln46xm4dg"))))
7086 (build-system ant-build-system)
7088 `(#:tests? #f ; no tests included
7089 #:jar-name "eclipse-compare-core.jar"))
7091 `(("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
7092 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7093 ("java-eclipse-osgi" ,java-eclipse-osgi)
7094 ("java-icu4j" ,java-icu4j)))
7095 (home-page "https://www.eclipse.org/")
7096 (synopsis "Eclipse core compare support")
7097 (description "This package provides the Eclipse core compare support
7098 module @code{org.eclipse.compare.core}.")
7099 (license license:epl1.0)))
7101 (define-public java-eclipse-team-core
7103 (name "java-eclipse-team-core")
7107 (uri (string-append "https://repo1.maven.org/maven2/"
7108 "org/eclipse/platform/org.eclipse.team.core/"
7109 version "/org.eclipse.team.core-"
7110 version "-sources.jar"))
7113 "02j2jzqgb26zx2d5ahxmvijw6j4r0la90zl5c3i65x6z19ciyam7"))))
7114 (build-system ant-build-system)
7116 `(#:tests? #f ; no tests included
7117 #:jar-name "eclipse-team-core.jar"))
7119 `(("java-eclipse-compare-core" ,java-eclipse-compare-core)
7120 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
7121 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
7122 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
7123 ("java-eclipse-core-resources" ,java-eclipse-core-resources)
7124 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
7125 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7126 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
7127 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
7128 ("java-eclipse-osgi" ,java-eclipse-osgi)))
7129 (home-page "https://www.eclipse.org/platform")
7130 (synopsis "Eclipse team support core")
7131 (description "This package provides the Eclipse team support core module
7132 @code{org.eclipse.team.core}.")
7133 (license license:epl1.0)))
7135 (define-public java-eclipse-core-commands
7137 (name "java-eclipse-core-commands")
7141 (uri (string-append "https://repo1.maven.org/maven2/"
7142 "org/eclipse/platform/org.eclipse.core.commands/"
7143 version "/org.eclipse.core.commands-"
7144 version "-sources.jar"))
7147 "0yjn482qndcfrsq3jd6vnhcylp16420f5aqkrwr8spsprjigjcr9"))))
7148 (build-system ant-build-system)
7150 `(#:tests? #f ; no tests included
7151 #:jar-name "eclipse-core-commands.jar"))
7153 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)))
7154 (home-page "https://www.eclipse.org/platform")
7155 (synopsis "Eclipse core commands")
7156 (description "This package provides Eclipse core commands in the module
7157 @code{org.eclipse.core.commands}.")
7158 (license license:epl1.0)))
7160 (define-public java-eclipse-text
7162 (name "java-eclipse-text")
7166 (uri (string-append "https://repo1.maven.org/maven2/"
7167 "org/eclipse/platform/org.eclipse.text/"
7168 version "/org.eclipse.text-"
7169 version "-sources.jar"))
7172 "0scz70vzz5qs5caji9f5q01vkqnvip7dpri1q07l8wbbdcxn4cq1"))))
7173 (build-system ant-build-system)
7175 `(#:tests? #f ; no tests included
7176 #:jar-name "eclipse-text.jar"
7178 (modify-phases %standard-phases
7179 ;; When creating a new category we must make sure that the new list
7180 ;; matches List<Position>. By default it seems to be too generic
7181 ;; (ArrayList<Object>), so we specialize it to ArrayList<Position>.
7182 ;; Without this we get this error:
7184 ;; [javac] .../src/org/eclipse/jface/text/AbstractDocument.java:376:
7185 ;; error: method put in interface Map<K,V> cannot be applied to given types;
7186 ;; [javac] fPositions.put(category, new ArrayList<>());
7188 ;; [javac] required: String,List<Position>
7189 ;; [javac] found: String,ArrayList<Object>
7190 ;; [javac] reason: actual argument ArrayList<Object> cannot be converted
7191 ;; to List<Position> by method invocation conversion
7192 ;; [javac] where K,V are type-variables:
7193 ;; [javac] K extends Object declared in interface Map
7194 ;; [javac] V extends Object declared in interface Map
7196 ;; I don't know if this is a good fix. I suspect it is not, but it
7198 (add-after 'unpack 'fix-compilation-error
7200 (substitute* "src/org/eclipse/jface/text/AbstractDocument.java"
7201 (("Positions.put\\(category, new ArrayList<>\\(\\)\\);")
7202 "Positions.put(category, new ArrayList<Position>());"))
7205 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7206 ("java-eclipse-core-commands" ,java-eclipse-core-commands)
7207 ("java-icu4j" ,java-icu4j)))
7208 (home-page "http://www.eclipse.org/platform")
7209 (synopsis "Eclipse text library")
7210 (description "Platform Text is part of the Platform UI project and
7211 provides the basic building blocks for text and text editors within Eclipse
7212 and contributes the Eclipse default text editor.")
7213 (license license:epl1.0)))
7215 (define-public java-eclipse-jdt-core
7217 (name "java-eclipse-jdt-core")
7221 (uri (string-append "https://repo1.maven.org/maven2/"
7222 "org/eclipse/jdt/org.eclipse.jdt.core/"
7223 version "/org.eclipse.jdt.core-"
7224 version "-sources.jar"))
7227 "1g560yr9v2kzv34gc2m3ifpgnj7krcdd6h4gd4z83pwqacwkfz0k"))))
7228 (build-system ant-build-system)
7230 `(#:tests? #f ; no tests included
7231 #:jar-name "eclipse-jdt-core.jar"
7233 (modify-phases %standard-phases
7234 (add-after 'unpack 'move-sources
7236 (with-directory-excursion "src/jdtCompilerAdaptersrc/"
7237 (for-each (lambda (file)
7238 (install-file file (string-append "../" (dirname file))))
7239 (find-files "." ".*")))
7240 (delete-file-recursively "src/jdtCompilerAdaptersrc/")
7242 (add-before 'build 'copy-resources
7244 (with-directory-excursion "src"
7245 (for-each (lambda (file)
7246 (install-file file (string-append "../build/classes/" (dirname file))))
7247 (find-files "." ".*.(props|properties|rsc)")))
7250 `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
7251 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
7252 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
7253 ("java-eclipse-core-resources" ,java-eclipse-core-resources)
7254 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
7255 ("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
7256 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7257 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
7258 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
7259 ("java-eclipse-osgi" ,java-eclipse-osgi)
7260 ("java-eclipse-text" ,java-eclipse-text)))
7261 (home-page "https://www.eclipse.org/jdt")
7262 (synopsis "Java development tools core libraries")
7263 (description "This package provides the core libraries of the Eclipse Java
7264 development tools.")
7265 (license license:epl1.0)))
7267 (define-public java-eclipse-jdt-compiler-apt
7269 (name "java-eclipse-jdt-compiler-apt")
7273 (uri (string-append "https://repo1.maven.org/maven2/"
7274 "org/eclipse/jdt/org.eclipse.jdt.compiler.apt/"
7275 version "/org.eclipse.jdt.compiler.apt-"
7276 version "-sources.jar"))
7279 "1s285k9p2ixdqrknb40jbbvw682n9a7l5lqpn583a8pvlzg2l6r8"))))
7280 (build-system ant-build-system)
7282 `(#:tests? #f ; no tests included
7283 #:jar-name "eclipse-jdt-compiler-apt.jar"
7286 `(("java-eclipse-jdt-core" ,java-eclipse-jdt-core)))
7287 (home-page "https://www.eclipse.org/jdt/apt/")
7288 (synopsis "Annotation processing tool")
7289 (description "APT stands for Annotation Processing Tool. APT provides a
7290 means for generating files and compiling new Java classes based on annotations
7291 found in your source code.")
7292 (license license:epl2.0)))
7294 (define-public java-javax-mail
7296 (name "java-javax-mail")
7300 (uri (string-append "https://repo1.maven.org/maven2/"
7301 "com/sun/mail/javax.mail/"
7302 version "/javax.mail-"
7303 version "-sources.jar"))
7306 "0sdlfgsc2b5s89xv1261y8i0jijcja019k2x1c8ngfn582w4jly9"))))
7307 (build-system ant-build-system)
7309 `(#:tests? #f ; no tests
7310 #:jar-name "javax-mail.jar"))
7311 (home-page "https://javamail.java.net")
7312 (synopsis "Reference implementation of the JavaMail API")
7314 "This package provides versions of the JavaMail API implementation, IMAP,
7315 SMTP, and POP3 service providers, some examples, and documentation for the
7317 ;; GPLv2 only with "classpath exception".
7318 (license license:gpl2)))
7320 (define-public java-log4j-api
7322 (name "java-log4j-api")
7326 (uri (string-append "mirror://apache/logging/log4j/" version
7327 "/apache-log4j-" version "-src.tar.gz"))
7330 "0j5p9gik0jysh37nlrckqbky12isy95cpwg2gv5fas1rcdqbraxd"))))
7331 (build-system ant-build-system)
7333 `(#:tests? #f ; tests require unpackaged software
7334 #:jar-name "log4j-api.jar"
7336 (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out")
7339 (modify-phases %standard-phases
7340 (add-after 'unpack 'enter-dir
7341 (lambda _ (chdir "log4j-api") #t))
7342 ;; FIXME: The tests require additional software that has not been
7343 ;; packaged yet, such as
7344 ;; * org.apache.maven
7345 ;; * org.apache.felix
7346 (add-after 'enter-dir 'delete-tests
7347 (lambda _ (delete-file-recursively "src/test") #t)))))
7349 `(("java-osgi-core" ,java-osgi-core)
7350 ("java-hamcrest-core" ,java-hamcrest-core)
7351 ("java-junit" ,java-junit)))
7352 (home-page "https://logging.apache.org/log4j/2.x/")
7353 (synopsis "API module of the Log4j logging framework for Java")
7355 "This package provides the API module of the Log4j logging framework for
7357 (license license:asl2.0)))
7359 (define-public java-log4j-core
7361 (inherit java-log4j-api)
7362 (name "java-log4j-core")
7364 `(("java-osgi-core" ,java-osgi-core)
7365 ("java-hamcrest-core" ,java-hamcrest-core)
7366 ("java-log4j-api" ,java-log4j-api)
7367 ("java-mail" ,java-mail)
7368 ("java-jboss-jms-api-spec" ,java-jboss-jms-api-spec)
7369 ("java-lmax-disruptor" ,java-lmax-disruptor)
7370 ("java-kafka" ,java-kafka-clients)
7371 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
7372 ("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
7373 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
7374 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)
7375 ("java-fasterxml-jackson-dataformat-xml" ,java-fasterxml-jackson-dataformat-xml)
7376 ("java-fasterxml-jackson-dataformat-yaml" ,java-fasterxml-jackson-dataformat-yaml)
7377 ("java-commons-compress" ,java-commons-compress)
7378 ("java-commons-csv" ,java-commons-csv)
7379 ("java-jeromq" ,java-jeromq)
7380 ("java-junit" ,java-junit)))
7382 `(("hamcrest" ,java-hamcrest-all)
7383 ("java-commons-io" ,java-commons-io)
7384 ("java-commons-lang3" ,java-commons-lang3)
7385 ("slf4j" ,java-slf4j-api)))
7387 `(#:tests? #f ; tests require more dependencies
7388 #:test-dir "src/test"
7389 #:source-dir "src/main/java"
7390 #:jar-name "log4j-core.jar"
7393 (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out")
7396 (modify-phases %standard-phases
7397 (add-after 'unpack 'enter-dir
7398 (lambda _ (chdir "log4j-core") #t)))))
7399 (synopsis "Core component of the Log4j framework")
7400 (description "This package provides the core component of the Log4j
7401 logging framework for Java.")))
7403 (define-public java-log4j-1.2-api
7405 (inherit java-log4j-api)
7406 (name "java-log4j-1.2-api")
7408 `(#:jar-name "java-log4j-1.2-api.jar"
7409 #:source-dir "log4j-1.2-api/src/main/java"
7411 ;; Tests require maven-model (and other maven subprojects), which is a
7412 ;; cyclic dependency.
7415 `(("log4j-api" ,java-log4j-api)
7416 ("log4j-core" ,java-log4j-core)
7417 ("osgi-core" ,java-osgi-core)
7418 ("eclipse-osgi" ,java-eclipse-osgi)
7419 ("java-lmax-disruptor" ,java-lmax-disruptor)))))
7421 (define-public java-commons-cli
7423 (name "java-commons-cli")
7427 (uri (string-append "mirror://apache/commons/cli/source/"
7428 "commons-cli-" version "-src.tar.gz"))
7431 "05hgi2z01fqz374y719gl1dxzqvzci5af071zm7vxrjg9vczipm1"))))
7432 (build-system ant-build-system)
7435 `(#:jar-name "commons-cli.jar"
7437 (modify-phases %standard-phases
7439 (install-from-pom "pom.xml")))))
7441 `(("java-junit" ,java-junit)
7442 ("java-hamcrest-core" ,java-hamcrest-core)))
7443 (home-page "https://commons.apache.org/cli/")
7444 (synopsis "Command line arguments and options parsing library")
7445 (description "The Apache Commons CLI library provides an API for parsing
7446 command line options passed to programs. It is also able to print help
7447 messages detailing the options available for a command line tool.
7449 Commons CLI supports different types of options:
7452 @item POSIX like options (ie. tar -zxvf foo.tar.gz)
7453 @item GNU like long options (ie. du --human-readable --max-depth=1)
7454 @item Java like properties (ie. java -Djava.awt.headless=true Foo)
7455 @item Short options with value attached (ie. gcc -O2 foo.c)
7456 @item long options with single hyphen (ie. ant -projecthelp)
7459 This is a part of the Apache Commons Project.")
7460 (license license:asl2.0)))
7462 (define-public java-commons-codec
7464 (name "java-commons-codec")
7468 (uri (string-append "mirror://apache/commons/codec/source/"
7469 "commons-codec-" version "-src.tar.gz"))
7472 "11xr0agckkhm91pb5akf2mbk84yd54gyr178wj57gsm97fi7nkh9"))))
7473 (build-system ant-build-system)
7475 `(#:jar-name "java-commons-codec.jar"
7476 #:source-dir "src/main/java"
7477 #:test-dir "src/test"
7478 #:test-exclude (list "**/*AbstractTest.java")
7480 (modify-phases %standard-phases
7481 (add-before 'build 'copy-resources
7483 (copy-recursively "src/main/resources"
7486 (add-before 'check 'copy-test-resources
7488 (copy-recursively "src/test/resources"
7489 "build/test-classes")
7491 (replace 'install (install-from-pom "pom.xml")))))
7493 `(("java-commons-lang3" ,java-commons-lang3)
7494 ("java-junit" ,java-junit)))
7496 `(("apache-commons-parent-pom" ,apache-commons-parent-pom-50)))
7497 (home-page "https://commons.apache.org/codec/")
7498 (synopsis "Common encoders and decoders such as Base64, Hex, Phonetic and URLs")
7499 (description "The codec package contains simple encoder and decoders for
7500 various formats such as Base64 and Hexadecimal. In addition to these widely
7501 used encoders and decoders, the codec package also maintains a collection of
7502 phonetic encoding utilities.
7504 This is a part of the Apache Commons Project.")
7505 (license license:asl2.0)))
7507 (define-public java-commons-daemon
7509 (name "java-commons-daemon")
7513 (uri (string-append "mirror://apache/commons/daemon/source/"
7514 "commons-daemon-" version "-src.tar.gz"))
7517 "141gkhfzv5v3pdhic6y4ardq2dhsa3v36j8wmmhy6f8mac48fp7n"))))
7518 (build-system ant-build-system)
7520 `(#:test-target "test"
7522 (modify-phases %standard-phases
7523 (add-after 'build 'build-javadoc ant-build-javadoc)
7524 (replace 'install (install-jars "dist"))
7525 (add-after 'install 'install-doc (install-javadoc "dist/docs/api")))))
7527 `(("java-junit" ,java-junit)))
7528 (home-page "https://commons.apache.org/daemon/")
7529 (synopsis "Library to launch Java applications as daemons")
7530 (description "The Daemon package from Apache Commons can be used to
7531 implement Java applications which can be launched as daemons. For example the
7532 program will be notified about a shutdown so that it can perform cleanup tasks
7533 before its process of execution is destroyed by the operation system.
7535 This package contains the Java library. You will also need the actual binary
7536 for your architecture which is provided by the jsvc package.
7538 This is a part of the Apache Commons Project.")
7539 (license license:asl2.0)))
7541 (define-public java-javaewah
7543 (name "java-javaewah")
7548 (url "https://github.com/lemire/javaewah/")
7549 (commit (string-append "JavaEWAH-" version))))
7550 (file-name (git-file-name name version))
7553 "1m8qcb1py76v7avbjjrkvyy6fhr5dk2ywy73gbsxqry04gkm2nhw"))))
7554 (build-system ant-build-system)
7555 (arguments `(#:jar-name "javaewah.jar"))
7557 `(("java-junit" ,java-junit)
7558 ("java-hamcrest-core" ,java-hamcrest-core)))
7559 (home-page "https://github.com/lemire/javaewah")
7560 (synopsis "Compressed alternative to the Java @code{BitSet} class")
7561 (description "This is a word-aligned compressed variant of the Java
7562 @code{Bitset} class. It provides both a 64-bit and a 32-bit RLE-like
7563 compression scheme. It can be used to implement bitmap indexes.
7565 The goal of word-aligned compression is not to achieve the best compression,
7566 but rather to improve query processing time. Hence, JavaEWAH tries to save CPU
7567 cycles, maybe at the expense of storage. However, the EWAH scheme is always
7568 more efficient storage-wise than an uncompressed bitmap (as implemented in the
7569 @code{BitSet} class by Sun).")
7570 ;; GPL2.0 derivates are explicitly allowed.
7571 (license license:asl2.0)))
7573 (define-public java-slf4j-api
7575 (name "java-slf4j-api")
7579 (uri (string-append "https://www.slf4j.org/dist/slf4j-"
7583 "13j51sgzmhhdrfa74gkal5zpip7r1440dh7zsi2c8bpb2zs1v8kb"))
7584 (modules '((guix build utils)))
7585 ;; Delete bundled jars.
7588 (for-each delete-file (find-files "." "\\.jar$"))
7590 (build-system ant-build-system)
7592 `(#:jar-name "slf4j-api.jar"
7593 #:source-dir "slf4j-api/src/main"
7594 #:test-dir "slf4j-api/src/test"
7596 (modify-phases %standard-phases
7597 (add-after 'build 'regenerate-jar
7599 ;; pom.xml ignores these files in the jar creation process. If we don't,
7600 ;; we get the error "This code should have never made it into slf4j-api.jar"
7601 (delete-file-recursively "build/classes/org/slf4j/impl")
7602 (invoke "jar" "-cf" "build/jar/slf4j-api.jar" "-C"
7603 "build/classes" ".")))
7604 (add-before 'check 'dont-test-abstract-classes
7606 ;; abstract classes are not meant to be run with junit
7607 (substitute* "build.xml"
7608 (("<include name=\"\\*\\*/\\*Test.java\" />")
7609 (string-append "<include name=\"**/*Test.java\" />"
7610 "<exclude name=\"**/MultithreadedInitializationTest"
7614 (install-from-pom "slf4j-api/pom.xml")))))
7616 `(("java-slf4j-parent" ,java-slf4j-parent)))
7618 `(("java-junit" ,java-junit)
7619 ("java-hamcrest-core" ,java-hamcrest-core)))
7620 (home-page "https://www.slf4j.org/")
7621 (synopsis "Simple logging facade for Java")
7622 (description "The Simple Logging Facade for Java (SLF4J) serves as a
7623 simple facade or abstraction for various logging
7624 frameworks (e.g. @code{java.util.logging}, @code{logback}, @code{log4j})
7625 allowing the end user to plug in the desired logging framework at deployment
7627 (license license:expat)))
7629 (define java-slf4j-parent
7631 (inherit java-slf4j-api)
7632 (name "java-slf4j-parent")
7634 (propagated-inputs '())
7638 (modify-phases %standard-phases
7642 (install-pom-file "pom.xml")))))))
7644 (define-public java-slf4j-simple
7646 (name "java-slf4j-simple")
7648 (source (package-source java-slf4j-api))
7649 (build-system ant-build-system)
7651 `(#:jar-name "slf4j-simple.jar"
7652 #:source-dir "slf4j-simple/src/main"
7653 #:test-dir "slf4j-simple/src/test"
7655 (modify-phases %standard-phases
7656 ;; The tests need some test classes from slf4j-api
7657 (add-before 'check 'build-slf4j-api-test-helpers
7659 ;; Add current dir to CLASSPATH ...
7661 (string-append (getcwd) ":" (getenv "CLASSPATH")))
7662 ;; ... and build test helper classes here:
7665 ,@(find-files "slf4j-api/src/test" ".*\\.java")))))
7667 (install-from-pom "slf4j-simple/pom.xml")))))
7669 `(("java-slf4j-api" ,java-slf4j-api)))
7671 `(("java-junit" ,java-junit)
7672 ("java-hamcrest-core" ,java-hamcrest-core)))
7673 (home-page "https://www.slf4j.org/")
7674 (synopsis "Simple implementation of simple logging facade for Java")
7675 (description "SLF4J binding for the Simple implementation, which outputs
7676 all events to System.err. Only messages of level INFO and higher are
7678 (license license:expat)))
7680 (define-public antlr2
7686 (uri (string-append "https://www.antlr2.org/download/antlr-"
7690 "1ffvcwdw73id0dk6pj2mlxjvbg0662qacx4ylayqcxgg381fnfl5"))
7691 (modules '((guix build utils)))
7694 (delete-file "antlr.jar")
7695 (substitute* "lib/cpp/antlr/CharScanner.hpp"
7699 "#define EOF (-1)\n"
7700 "#include <strings.h>")))
7701 (substitute* "configure"
7704 (build-system gnu-build-system)
7706 `(#:tests? #f ; no test target
7707 #:imported-modules ((guix build ant-build-system)
7708 (guix build syscalls)
7709 ,@%gnu-build-system-modules)
7710 #:modules (((guix build ant-build-system) #:prefix ant:)
7711 (guix build gnu-build-system)
7714 (modify-phases %standard-phases
7715 (add-after 'install 'strip-jar-timestamps
7716 (assoc-ref ant:%standard-phases 'strip-jar-timestamps))
7717 (add-before 'configure 'fix-timestamp
7719 (substitute* "configure"
7720 (("^TIMESTAMP.*") "TIMESTAMP=19700101\n"))
7722 (add-after 'configure 'fix-bin-ls
7724 (substitute* (find-files "." "Makefile")
7730 ("java" ,icedtea "jdk")))
7732 `(("java" ,icedtea)))
7733 (home-page "https://www.antlr2.org")
7734 (synopsis "Framework for constructing recognizers, compilers, and translators")
7735 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
7736 is a language tool that provides a framework for constructing recognizers,
7737 compilers, and translators from grammatical descriptions containing Java, C#,
7738 C++, or Python actions. ANTLR provides excellent support for tree construction,
7739 tree walking, and translation.")
7740 (license license:public-domain)))
7742 (define-public java-stringtemplate-3
7744 (name "java-stringtemplate")
7748 (uri (string-append "https://github.com/antlr/website-st4/raw/"
7749 "gh-pages/download/stringtemplate-"
7753 "086yj68np1vqhkj7483diz3km6s6y4gmwqswa7524a0ca6vxn2is"))))
7754 (build-system ant-build-system)
7756 `(#:jar-name (string-append ,name "-" ,version ".jar")
7758 #:modules ((guix build ant-build-system)
7762 (modify-phases %standard-phases
7763 (add-before 'check 'fix-tests
7765 (substitute* "build.xml"
7766 (("\\$\\{test.home\\}/java")
7767 "${test.home}/org"))
7769 (add-before 'build 'generate-grammar
7771 (with-directory-excursion "src/org/antlr/stringtemplate/language/"
7772 (for-each (lambda (file)
7773 (format #t "~a\n" file)
7774 (invoke "antlr" file))
7775 '("template.g" "angle.bracket.template.g" "action.g"
7776 "eval.g" "group.g" "interface.g")))
7780 ("java-junit" ,java-junit)))
7781 (home-page "https://www.stringtemplate.org")
7782 (synopsis "Template engine to generate formatted text output")
7783 (description "StringTemplate is a java template engine (with ports for C#,
7784 Objective-C, JavaScript, Scala) for generating source code, web pages, emails,
7785 or any other formatted text output. StringTemplate is particularly good at
7786 code generators, multiple site skins, and internationalization / localization.
7787 StringTemplate also powers ANTLR.")
7788 (license license:bsd-3)))
7790 ;; antlr3 is partially written using antlr3 grammar files. It also depends on
7791 ;; ST4 (stringtemplate4), which is also partially written using antlr3 grammar
7792 ;; files and uses antlr3 at runtime. The latest version requires a recent version
7793 ;; of antlr3 at runtime.
7794 ;; Fortunately, ST4 4.0.6 can be built with an older antlr3, and we use antlr3.3.
7795 ;; This version of ST4 is sufficient for the latest antlr3.
7796 ;; We use ST4 4.0.6 to build a boostrap antlr3 (latest version), and build
7797 ;; the latest ST4 with it. Then we build our final antlr3 that will be linked
7798 ;; against the latest ST4.
7799 ;; antlr3.3 still depends on antlr3 to generate some files, so we use an
7800 ;; even older version, antlr3.1, to generate them. Fortunately antlr3.1 uses
7801 ;; only grammar files with the antlr2 syntax.
7802 ;; So we build antlr3.1 -> antlr3.3 -> ST4.0.6 -> antlr3-bootstrap -> ST4 -> antlr3.
7804 (define-public java-stringtemplate
7805 (package (inherit java-stringtemplate-3)
7806 (name "java-stringtemplate")
7810 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/"
7812 (file-name (string-append name "-" version ".tar.gz"))
7815 "1pri8hqa95rfdkjy55icl5q1m09zwp5k67ib14abas39s4v3w087"))))
7816 (build-system ant-build-system)
7818 `(#:jar-name (string-append ,name "-" ,version ".jar")
7819 #:tests? #f ; FIXME: tests fail for unknown reasons
7821 #:modules ((guix build ant-build-system)
7825 (modify-phases %standard-phases
7826 (add-before 'check 'fix-test-target
7828 (substitute* "build.xml"
7829 (("\\$\\{test.home\\}/java") "${test.home}/")
7830 (("\\*Test.java") "Test*.java"))
7832 (add-before 'build 'generate-grammar
7834 (with-directory-excursion "src/org/stringtemplate/v4/compiler/"
7835 (for-each (lambda (file)
7836 (format #t "~a\n" file)
7837 (invoke "antlr3" file))
7838 '("STParser.g" "Group.g" "CodeGenerator.g")))
7841 `(("antlr3" ,antlr3-bootstrap)
7843 ("java-stringtemplate" ,java-stringtemplate-3)
7844 ("java-junit" ,java-junit)))))
7846 (define java-stringtemplate-4.0.6
7847 (package (inherit java-stringtemplate)
7848 (name "java-stringtemplate")
7852 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/ST-"
7854 (file-name (string-append name "-" version ".tar.gz"))
7857 "0hjmh1ahdsh3w825i67mli9l4nncc4l6hdbf9ma91jvlj590sljp"))))
7859 `(("antlr3" ,antlr3-3.3)
7861 ("java-stringtemplate" ,java-stringtemplate-3)))))
7863 (define-public antlr3
7870 (url "https://github.com/antlr/antlr3")
7872 (file-name (git-file-name name version))
7875 "0cafavrjmzqhklghrk8c2jqxkdwxgzskm20pbrfd3r41cn00dpnf"))))
7876 (build-system ant-build-system)
7878 `(#:jar-name (string-append ,name "-" ,version ".jar")
7879 #:source-dir "tool/src/main/java:runtime/Java/src/main/java:tool/src/main/antlr3"
7882 (modify-phases %standard-phases
7883 (add-after 'install 'bin-install
7884 (lambda* (#:key inputs outputs #:allow-other-keys)
7885 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
7886 (bin (string-append (assoc-ref outputs "out") "/bin")))
7888 (with-output-to-file (string-append bin "/antlr3")
7891 (string-append "#!" (which "sh") "\n"
7892 "java -cp " jar "/" ,name "-" ,version ".jar:"
7894 (find-files (assoc-ref inputs "stringtemplate")
7898 (find-files (assoc-ref inputs "stringtemplate4")
7902 (find-files (string-append
7903 (assoc-ref inputs "antlr")
7906 " org.antlr.Tool $*"))))
7907 (chmod (string-append bin "/antlr3") #o755))
7909 (add-before 'build 'generate-grammar
7911 (chdir "tool/src/main/antlr3/org/antlr/grammar/v3/")
7912 (for-each (lambda (file)
7915 (invoke "antlr3" file))
7916 '("ANTLR.g" "ANTLRTreePrinter.g" "ActionAnalysis.g"
7917 "AssignTokenTypesWalker.g"
7918 "ActionTranslator.g" "TreeToNFAConverter.g"
7919 "ANTLRv3.g" "ANTLRv3Tree.g" "LeftRecursiveRuleWalker.g"
7920 "CodeGenTreeWalker.g" "DefineGrammarItemsWalker.g"))
7921 (substitute* "ANTLRParser.java"
7922 (("public Object getTree") "public GrammarAST getTree"))
7923 (substitute* "ANTLRv3Parser.java"
7924 (("public Object getTree") "public CommonTree getTree"))
7925 (chdir "../../../../../java")
7926 (substitute* "org/antlr/tool/LeftRecursiveRuleAnalyzer.java"
7927 (("import org.antlr.grammar.v3.\\*;") "import org.antlr.grammar.v3.*;
7928 import org.antlr.grammar.v3.ANTLRTreePrinter;"))
7929 (substitute* "org/antlr/tool/ErrorManager.java"
7930 (("case NO_SUCH_ATTRIBUTE_PASS_THROUGH:") ""))
7931 (chdir "../../../..")
7933 (add-before 'build 'fix-build-xml
7935 (substitute* "build.xml"
7936 (("target name=\"compile\">")
7937 "target name=\"compile\">
7938 <copy todir=\"${classes.dir}\">
7939 <fileset dir=\"tool/src/main/resources\">
7940 <include name=\"**/*.stg\"/>
7941 <include name=\"**/*.st\"/>
7942 <include name=\"**/*.sti\"/>
7943 <include name=\"**/STLexer.tokens\"/>
7949 ("antlr3" ,antlr3-bootstrap)))
7951 `(("junit" ,java-junit)
7952 ("stringtemplate" ,java-stringtemplate-3)
7953 ("stringtemplate4" ,java-stringtemplate)))
7955 `(("stringtemplate" ,java-stringtemplate-3)
7957 ("stringtemplate4" ,java-stringtemplate-4.0.6)))
7958 (home-page "https://www.antlr3.org")
7959 (synopsis "Framework for constructing recognizers, compilers, and translators")
7960 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
7961 is a language tool that provides a framework for constructing recognizers,
7962 compilers, and translators from grammatical descriptions containing Java, C#,
7963 C++, or Python actions. ANTLR provides excellent support for tree construction,
7964 tree walking, and translation.")
7965 (license license:bsd-3)))
7967 (define antlr3-bootstrap
7970 (name "antlr3-bootstrap")
7973 ("antlr3" ,antlr3-3.3)))
7975 `(("junit" ,java-junit)))))
7977 (define-public antlr3-3.3
7984 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
7985 "gh-pages/download/antlr-"
7989 "0qgg5vgsm4l1d6dj9pfbaa25dpv2ry2gny8ajy4vvgvfklw97b3m"))
7991 (search-patches "antlr3-3_3-fix-java8-compilation.patch"))))
7993 `(#:jar-name (string-append ,name "-" ,version ".jar")
7994 #:source-dir (string-join '("tool/src/main/java"
7995 "runtime/Java/src/main/java"
7996 "tool/src/main/antlr2"
7997 "tool/src/main/antlr3")
7999 #:tests? #f ; FIXME: tests seem to require maven plugin
8000 #:modules ((guix build ant-build-system)
8004 (modify-phases %standard-phases
8005 (add-after 'install 'bin-install
8006 (lambda* (#:key inputs outputs #:allow-other-keys)
8007 (let* ((out (assoc-ref outputs "out"))
8008 (jar (string-append out "/share/java"))
8009 (bin (string-append out "/bin")))
8011 (with-output-to-file (string-append bin "/antlr3")
8015 "#!" (which "sh") "\n"
8016 "java -cp " jar "/antlr3-3.3.jar:"
8018 (append (find-files (assoc-ref inputs "java-stringtemplate")
8020 (find-files (string-append (assoc-ref inputs "antlr")
8024 " org.antlr.Tool $*"))))
8025 (chmod (string-append bin "/antlr3") #o755)
8027 (add-before 'build 'generate-grammar
8029 (substitute* "tool/src/main/java/org/antlr/tool/Grammar.java"
8030 (("import org.antlr.grammar.v2.\\*;")
8031 "import org.antlr.grammar.v2.*;\n
8032 import org.antlr.grammar.v2.TreeToNFAConverter;\n
8033 import org.antlr.grammar.v2.DefineGrammarItemsWalker;\n
8034 import org.antlr.grammar.v2.ANTLRTreePrinter;"))
8035 (with-directory-excursion "tool/src/main/antlr2/org/antlr/grammar/v2/"
8036 (for-each (lambda (file)
8037 (format #t "~a\n" file)
8038 (invoke "antlr" file))
8039 '("antlr.g" "antlr.print.g" "assign.types.g"
8040 "buildnfa.g" "codegen.g" "define.g")))
8041 (with-directory-excursion "tool/src/main/antlr3/org/antlr/grammar/v3/"
8042 (for-each (lambda (file)
8043 (format #t "~a\n" file)
8044 (invoke "antlr3" file))
8045 '("ActionAnalysis.g" "ActionTranslator.g" "ANTLRv3.g"
8048 (add-before 'build 'fix-build-xml
8050 (substitute* "build.xml"
8051 (("target name=\"compile\">")
8052 "target name=\"compile\">
8053 <copy todir=\"${classes.dir}\">
8054 <fileset dir=\"tool/src/main/resources\">
8055 <include name=\"**/*.stg\"/>
8056 <include name=\"**/*.st\"/>
8057 <include name=\"**/*.sti\"/>
8058 <include name=\"**/STLexer.tokens\"/>
8064 ("antlr3" ,antlr3-3.1)))
8066 `(("junit" ,java-junit)))
8068 `(("java-stringtemplate" ,java-stringtemplate-3)
8069 ("antlr" ,antlr2)))))
8071 (define-public antlr3-3.1
8077 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
8078 "gh-pages/download/antlr-"
8082 "0sfimc9cpbgrihz4giyygc8afgpma2c93yqpwb951giriri6x66z"))
8084 (search-patches "antlr3-3_1-fix-java8-compilation.patch"))))
8086 `(#:jar-name (string-append "antlr3-" ,version ".jar")
8087 #:source-dir "src:runtime/Java/src"
8090 (modify-phases %standard-phases
8091 (add-after 'install 'bin-install
8092 (lambda* (#:key inputs outputs #:allow-other-keys)
8093 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
8094 (bin (string-append (assoc-ref outputs "out") "/bin")))
8096 (with-output-to-file (string-append bin "/antlr3")
8099 (string-append "#!" (which "sh") "\n"
8100 "java -cp " jar "/antlr3-3.1.jar:"
8102 (find-files (assoc-ref inputs "stringtemplate")
8106 (find-files (string-append
8107 (assoc-ref inputs "antlr")
8110 " org.antlr.Tool $*"))))
8111 (chmod (string-append bin "/antlr3") #o755))
8113 (add-before 'build 'generate-grammar
8115 (let ((dir "src/org/antlr/tool/"))
8116 (for-each (lambda (file)
8119 (invoke "antlr" "-o" dir (string-append dir file)))
8120 '("antlr.g" "antlr.print.g" "assign.types.g"
8121 "buildnfa.g" "define.g")))
8122 (format #t "codegen.g\n")
8123 (invoke "antlr" "-o" "src/org/antlr/codegen"
8124 "src/org/antlr/codegen/codegen.g")
8126 (add-before 'build 'fix-build-xml
8128 (substitute* "build.xml"
8129 (("target name=\"compile\">")
8130 "target name=\"compile\">
8131 <copy todir=\"${classes.dir}\">
8132 <fileset dir=\"src\">
8133 <include name=\"**/*.stg\"/>
8134 <include name=\"**/*.st\"/>
8135 <include name=\"**/*.sti\"/>
8136 <include name=\"**/STLexer.tokens\"/>
8141 `(("antlr" ,antlr2)))
8143 `(("junit" ,java-junit)))
8145 `(("stringtemplate" ,java-stringtemplate-3)))))
8147 (define-public java-commons-cli-1.2
8148 ;; This is a bootstrap dependency for Maven2.
8150 (inherit java-commons-cli)
8154 (uri (string-append "mirror://apache/commons/cli/source/"
8155 "commons-cli-" version "-src.tar.gz"))
8158 "0rvfgzgv2pc1m091dfj3ih9ddsjjppr1f1wf0qmc3bk6b1kwv2dm"))))
8160 `(#:jar-name "commons-cli.jar"
8162 (modify-phases %standard-phases
8163 (add-before 'check 'fix-build-xml
8164 (lambda* (#:key inputs #:allow-other-keys)
8165 (substitute* "build.xml"
8166 (("dir=\"\\$\\{test.home\\}/java\"")
8167 "dir=\"${test.home}\""))
8170 `(("java-junit" ,java-junit)))))
8172 (define-public java-microemulator-cldc
8174 (name "java-microemulator-cldc")
8178 (uri (string-append "https://github.com/barteo/microemu/archive/"
8180 (string-map (lambda (c) (if (char=? c #\.) #\_ c))
8183 (file-name (string-append name "-" version ".tar.gz"))
8186 "1x1apmz38gkppxnwnygwmi12j54v4p258v8ddzn6dldkk7vak1ll"))))
8187 (build-system ant-build-system)
8189 `(#:jar-name "microemulator-cldc.jar"
8190 #:source-dir "microemu-cldc/src/main/java"
8191 #:tests? #f)); Requires even older software
8192 (home-page "https://github.com/barteo/microemu")
8193 (synopsis "J2ME CLDC emulator")
8194 (description "Microemulator is a Java 2 Micro Edition (J2ME) CLDC/MIDP
8195 Emulator. It demonstrates MIDlet based applications in web browser
8196 applet and can be run as a standalone java application.")
8197 (license (list license:asl2.0
8199 license:lgpl2.1+))))
8201 (define-public java-datanucleus-javax-persistence
8203 (name "java-datanucleus-javax-persistence")
8207 (uri (string-append "https://github.com/datanucleus/"
8208 "javax.persistence/archive/javax.persistence-"
8209 version "-release.tar.gz"))
8212 "11jx0fjwgc2hhbqqgdd6m1pf2fplf9vslppygax0y1z5csnqjhpx"))))
8213 (build-system ant-build-system)
8215 `(#:jar-name "java-datanucleus-javax-persistence.jar"
8217 #:source-dir "src/main/java"
8218 #:tests? #f)); no tests
8219 (home-page "https://github.com/datanucleus/javax.persistence")
8220 (synopsis "JPA API")
8221 (description "This package contains a clean definition of JPA API intended
8222 for use with DataNucleus JPA since the JCP haven't provided an official JPA API
8223 jar. See @url{http://java.net/projects/jpa-spec/downloads} for the specification
8224 used to generate this API.")
8225 (license (list license:edl1.0 license:epl1.0))))
8227 (define-public java-osgi-cmpn
8229 (name "java-osgi-cmpn")
8233 (uri (string-append "https://repo1.maven.org/maven2/"
8234 "org/osgi/osgi.cmpn/" version "/osgi.cmpn-"
8235 version "-sources.jar"))
8238 "1lmb6xyrmkqdhv1kayf0514rlwq6ypvs4m44ibrck3snp8241wys"))))
8239 (build-system ant-build-system)
8241 `(#:jar-name "osgi-cmpn.jar"
8242 #:tests? #f)); no tests
8244 `(("annotation" ,java-osgi-annotation)
8245 ("core" ,java-osgi-core)
8246 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
8247 ("microemulator" ,java-microemulator-cldc)
8248 ("servlet" ,java-classpathx-servletapi)))
8249 (home-page "https://www.osgi.org")
8250 (synopsis "Compendium specification module of OSGi framework")
8252 "OSGi, for Open Services Gateway initiative framework, is a module system
8253 and service platform for the Java programming language. This package contains
8254 the compendium specification module, providing interfaces and classes for use
8255 in compiling bundles.")
8256 (license license:asl2.0)))
8258 (define-public java-osgi-service-component-annotations
8260 (name "java-osgi-service-component-annotations")
8264 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8265 "org.osgi.service.component.annotations/"
8266 version "/org.osgi.service.component.annotations-"
8267 version "-sources.jar"))
8270 "15rq9cmp4fpn74q44m4j35qsqmjf5lx3hcrk6pzvbhc08igic2f0"))))
8271 (build-system ant-build-system)
8273 `(#:jar-name "osgi-service-component-annotations.jar"
8274 #:tests? #f)); no tests
8276 `(("annotation" ,java-osgi-annotation)))
8277 (home-page "https://www.osgi.org")
8278 (synopsis "Support annotations for osgi-service-component")
8280 "OSGi, for Open Services Gateway initiative framework, is a module system
8281 and service platform for the Java programming language. This package contains
8282 the support annotations for osgi-service-component.")
8283 (license license:asl2.0)))
8285 (define-public java-osgi-dto
8287 (name "java-osgi-dto")
8291 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8292 "org.osgi.dto/" version "/org.osgi.dto-"
8293 version "-sources.jar"))
8296 "0f4bqjzadn0hwk6sd3h5gvbyfp3yci1s6r0v770cc15p0pg627yr"))))
8297 (build-system ant-build-system)
8299 `(#:jar-name "osgi-dto.jar"
8300 #:tests? #f)); no tests
8302 `(("annotation" ,java-osgi-annotation)))
8303 (home-page "https://www.osgi.org")
8304 (synopsis "Data Transfer Objects")
8306 "OSGi, for Open Services Gateway initiative framework, is a module system
8307 and service platform for the Java programming language. This package contains
8308 the Data Transfer Objects. It is easily serializable having only public fields
8309 of primitive types and their wrapper classes, Strings, and DTOs. List, Set,
8310 Map and array aggregates may also be used. The aggregates must only hold
8311 objects of the listed types or aggregates.")
8312 (license license:asl2.0)))
8314 (define-public java-osgi-resource
8316 (name "java-osgi-resource")
8320 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8321 "org.osgi.resource/"
8322 version "/org.osgi.resource-"
8323 version "-sources.jar"))
8326 "0hi0fsc5v99q22bd7lrkvpz1y0ds4w9arjldpwsrcpqvz2js7q2d"))))
8327 (build-system ant-build-system)
8329 `(#:jar-name "osgi-resource.jar"
8330 #:tests? #f)); no tests
8332 `(("annotation" ,java-osgi-annotation)
8333 ("dto" ,java-osgi-dto)))
8334 (home-page "https://www.osgi.org")
8335 (synopsis "OSGI Resource")
8337 "OSGi, for Open Services Gateway initiative framework, is a module system
8338 and service platform for the Java programming language. This package contains
8339 the definition of common types in osgi packages.")
8340 (license license:asl2.0)))
8342 (define-public java-osgi-namespace-contract
8344 (name "java-osgi-namespace-contract")
8348 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8349 "org.osgi.namespace.contract/"
8350 version "/org.osgi.namespace.contract-"
8351 version "-sources.jar"))
8354 "1iz4f2i0fvqrlq90ki9nfzcfpvy2av434ri25bglywqssx8mmp36"))))
8355 (build-system ant-build-system)
8357 `(("resource" ,java-osgi-resource)
8358 ("annotation" ,java-osgi-annotation)))
8360 `(#:jar-name "osgi-namespace-contract.jar"
8361 #:tests? #f)); no tests
8362 (home-page "https://www.osgi.org")
8363 (synopsis "Contract Capability and Requirement Namespace")
8365 "OSGi, for Open Services Gateway initiative framework, is a module system
8366 and service platform for the Java programming language. This package contains
8367 the names for the attributes and directives for a namespace with contracts.")
8368 (license license:asl2.0)))
8370 (define-public java-osgi-namespace-extender
8372 (name "java-osgi-namespace-extender")
8376 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8377 "org.osgi.namespace.extender/"
8378 version "/org.osgi.namespace.extender-"
8379 version "-sources.jar"))
8382 "0jgqiak2i05qv6j3gd33xlaifzzc0ylxxk376v2x0apfg3vvixmz"))))
8383 (build-system ant-build-system)
8385 `(("resource" ,java-osgi-resource)
8386 ("annotation" ,java-osgi-annotation)))
8388 `(#:jar-name "osgi-namespace-extendent.jar"
8389 #:tests? #f)); no tests
8390 (home-page "https://www.osgi.org")
8391 (synopsis "Extender Capability and Requirement Namespace")
8393 "OSGi, for Open Services Gateway initiative framework, is a module system
8394 and service platform for the Java programming language. This package contains
8395 the names for the attributes and directives for an extender namespace.")
8396 (license license:asl2.0)))
8398 (define-public java-osgi-namespace-service
8400 (name "java-osgi-namespace-service")
8404 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8405 "org.osgi.namespace.service/"
8406 version "/org.osgi.namespace.service-"
8407 version "-sources.jar"))
8410 "0qmw8n2449nkmm56d1znz9zhazb6ya3vsimd5bf5jg23zzhgl8c8"))))
8411 (build-system ant-build-system)
8413 `(("resource" ,java-osgi-resource)
8414 ("annotation" ,java-osgi-annotation)))
8416 `(#:jar-name "osgi-namespace-service.jar"
8417 #:tests? #f)); no tests
8418 (home-page "https://www.osgi.org")
8419 (synopsis "Service Capability and Requirement Namespace")
8421 "OSGi, for Open Services Gateway initiative framework, is a module system
8422 and service platform for the Java programming language. This package contains
8423 the names for the attributes and directives for a service namespace.")
8424 (license license:asl2.0)))
8426 (define-public java-osgi-util-function
8428 (name "java-osgi-util-function")
8432 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8433 "org.osgi.util.function/"
8434 version "/org.osgi.util.function-"
8435 version "-sources.jar"))
8438 "04l7j3hwmmj28w23m7paca0afzncs42j2mdr3liqq8kvp548sc6x"))))
8439 (build-system ant-build-system)
8441 `(#:jar-name "osgi-util-function.jar"
8442 #:tests? #f)); no tests
8444 `(("annotation" ,java-osgi-annotation)))
8445 (home-page "https://www.osgi.org")
8446 (synopsis "OSGI Util Function")
8448 "OSGi, for Open Services Gateway initiative framework, is a module system
8449 and service platform for the Java programming language. This package contains
8450 an interface for a function that accepts a single argument and produces a result.")
8451 (license license:asl2.0)))
8453 (define-public java-osgi-util-promise
8455 (name "java-osgi-util-promise")
8459 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8460 "org.osgi.util.promise/"
8461 version "/org.osgi.util.promise-"
8462 version "-sources.jar"))
8465 "0y34dwiflg1c4ahvkswpf9z02xph2sr9fm04ia5493x3lshpw22c"))))
8466 (build-system ant-build-system)
8468 `(#:jar-name "osgi-util-promise.jar"
8469 #:tests? #f)); no tests
8471 `(("annotation" ,java-osgi-annotation)
8472 ("function" ,java-osgi-util-function)))
8473 (home-page "https://www.osgi.org")
8474 (synopsis "Promise of a value")
8476 "OSGi, for Open Services Gateway initiative framework, is a module system
8477 and service platform for the Java programming language. This package contains
8478 an interface and utilitary classes for promises. A Promise represents a future
8479 value. It handles the interactions for asynchronous processing.")
8480 (license license:asl2.0)))
8482 (define-public java-osgi-service-metatype-annotations
8484 (name "java-osgi-service-metatype-annotations")
8488 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8489 "org.osgi.service.metatype.annotations/"
8490 version "/org.osgi.service.metatype.annotations-"
8491 version "-sources.jar"))
8494 "12rwm3349wk80vm88rcdgs4435m4jxkpkj5mrx326skkz2c6hyw6"))))
8495 (build-system ant-build-system)
8497 `(#:jar-name "osgi-service-metatype-annotations.jar"
8498 #:tests? #f)); no tests
8500 `(("annotation" ,java-osgi-annotation)))
8501 (home-page "https://www.osgi.org")
8502 (synopsis "Support annotations for metatype")
8504 "OSGi, for Open Services Gateway initiative framework, is a module system
8505 and service platform for the Java programming language. This package contains
8506 the support annotations for metatype.")
8507 (license license:asl2.0)))
8509 (define-public java-osgi-service-repository
8511 (name "java-osgi-service-repository")
8515 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8516 "org.osgi.service.repository/"
8517 version "/org.osgi.service.repository-"
8518 version "-sources.jar"))
8521 "1k41mhg7b58pd8nsghr2qwcjrxdnf1p9spsw9v11k4257g6rl06n"))))
8522 (build-system ant-build-system)
8524 `(#:jar-name "osgi-service-repository.jar"
8525 #:tests? #f)); no tests
8527 `(("annotation" ,java-osgi-annotation)
8528 ("promise" ,java-osgi-util-promise)
8529 ("resource" ,java-osgi-resource)))
8530 (home-page "https://www.osgi.org")
8531 (synopsis "OSGI service repository")
8533 "OSGi, for Open Services Gateway initiative framework, is a module system
8534 and service platform for the Java programming language. This package contains
8535 a repository service that contains resources.")
8536 (license license:asl2.0)))
8538 (define-public java-osgi-framework
8540 (name "java-osgi-framework")
8544 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8545 "org.osgi.framework/" version "/org.osgi.framework-"
8546 version "-sources.jar"))
8549 "1lwp2zfad3rybcc6q9bwz8xsgkc92ypzy5p6x54387f1qj65m73s"))))
8550 (build-system ant-build-system)
8552 `(#:jar-name "osgi-framework.jar"
8553 #:tests? #f)); no tests
8555 `(("annotation" ,java-osgi-annotation)
8556 ("resource" ,java-osgi-resource)
8557 ("dto" ,java-osgi-dto)))
8558 (home-page "https://www.osgi.org")
8559 (synopsis "OSGi framework")
8561 "OSGi, for Open Services Gateway initiative framework, is a module system
8562 and service platform for the Java programming language.")
8563 (license license:asl2.0)))
8565 (define-public java-osgi-service-log
8567 (name "java-osgi-service-log")
8571 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8572 "org.osgi.service.log/"
8573 version "/org.osgi.service.log-"
8574 version "-sources.jar"))
8577 "1029j30dzcwializzca0j3fkhwwz08kmmsha5agw1iccscimj6r0"))))
8578 (build-system ant-build-system)
8580 `(#:jar-name "osgi-service-log.jar"
8581 #:tests? #f)); no tests
8583 `(("java-osgi-framework" ,java-osgi-framework)))
8584 (home-page "https://www.osgi.org")
8585 (synopsis "Provides methods for bundles to write messages to the log")
8587 "OSGi, for Open Services Gateway initiative framework, is a module system
8588 and service platform for the Java programming language. This package contains
8590 (license license:asl2.0)))
8592 (define-public java-osgi-service-jdbc
8594 (name "java-osgi-service-jdbc")
8598 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8599 "org.osgi.service.jdbc/"
8600 version "/org.osgi.service.jdbc-"
8601 version "-sources.jar"))
8604 "11iln5v7bk469cgb9ddkrz9sa95b3733gqgaqw9xf5g6wq652yjz"))))
8605 (build-system ant-build-system)
8607 `(#:jar-name "osgi-service-jdbc.jar"
8608 #:tests? #f)); no tests
8609 (home-page "https://www.osgi.org")
8610 (synopsis "Factory for JDBC connection factories")
8612 "OSGi, for Open Services Gateway initiative framework, is a module system
8613 and service platform for the Java programming language. This package contains
8614 a factory for JDBC connection factories. There are 3 preferred connection
8615 factories for getting JDBC connections:
8618 @item @code{javax.sql.DataSource};
8619 @item @code{javax.sql.ConnectionPoolDataSource};
8620 @item @code{javax.sql.XADataSource}.
8622 (license license:asl2.0)))
8624 (define-public java-osgi-service-resolver
8626 (name "java-osgi-service-resolver")
8630 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8631 "org.osgi.service.resolver/"
8632 version "/org.osgi.service.resolver-"
8633 version "-sources.jar"))
8636 "1dzqn1ryfi2rq4zwsgp44bmj2wlfydjg1qbxw2b0z4xdjjy55vxd"))))
8637 (build-system ant-build-system)
8639 `(#:jar-name "osgi-service-resolver.jar"
8640 #:tests? #f)); no tests
8642 `(("annotation" ,java-osgi-annotation)
8643 ("resource" ,java-osgi-resource)))
8644 (home-page "https://www.osgi.org")
8645 (synopsis "OSGI Resolver service")
8647 "OSGi, for Open Services Gateway initiative framework, is a module system
8648 and service platform for the Java programming language. This package contains
8649 a resolver service that resolves the specified resources in the context supplied
8651 (license license:asl2.0)))
8653 (define-public java-osgi-util-tracker
8655 (name "java-osgi-util-tracker")
8659 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8660 "org.osgi.util.tracker/"
8661 version "/org.osgi.util.tracker-"
8662 version "-sources.jar"))
8665 "0c4fh9vxwzsx59r8dygda0gq2gx3z5vfhc3jsphlqwf5w0h403lz"))))
8666 (build-system ant-build-system)
8668 `(#:jar-name "osgi-util-tracker.jar"
8669 #:tests? #f)); no tests
8671 `(("framework" ,java-osgi-framework)
8672 ("annotation" ,java-osgi-annotation)))
8673 (home-page "https://www.osgi.org")
8674 (synopsis "Bundle tracking")
8676 "OSGi, for Open Services Gateway initiative framework, is a module system
8677 and service platform for the Java programming language. This package contains
8678 bundle tracking utility classes.")
8679 (license license:asl2.0)))
8681 (define-public java-osgi-service-cm
8683 (name "java-osgi-service-cm")
8687 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8688 "org.osgi.service.cm/"
8689 version "/org.osgi.service.cm-"
8690 version "-sources.jar"))
8693 "1z8kap48y3xi0ggj8v6czglfnpnd94mmismgi2wbqhj1nl5fzbp6"))))
8694 (build-system ant-build-system)
8696 `(#:jar-name "osgi-service-cm.jar"
8697 #:tests? #f)); no tests
8699 `(("framework" ,java-osgi-framework)
8700 ("annotation" ,java-osgi-annotation)))
8701 (home-page "https://www.osgi.org")
8702 (synopsis "OSGI Configuration Management")
8704 "OSGi, for Open Services Gateway initiative framework, is a module system
8705 and service platform for the Java programming language. This package contains
8706 utility classes for the configuration of services.")
8707 (license license:asl2.0)))
8709 (define-public java-osgi-service-packageadmin
8711 (name "java-osgi-service-packageadmin")
8715 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8716 "org.osgi.service.packageadmin/"
8717 version "/org.osgi.service.packageadmin-"
8718 version "-sources.jar"))
8721 "041mpxzi7g36wmcily6y4ccn3jx15akpdy8gmhyb7m98x7qfvn52"))))
8722 (build-system ant-build-system)
8724 `(#:jar-name "osgi-service-packageadmin.jar"
8725 #:tests? #f)); no tests
8727 `(("framework" ,java-osgi-framework)))
8728 (home-page "https://www.osgi.org")
8729 (synopsis "OSGI Package Administration")
8731 "OSGi, for Open Services Gateway initiative framework, is a module system
8732 and service platform for the Java programming language. This package contains
8733 the packageadmin service.")
8734 (license license:asl2.0)))
8736 (define-public java-ops4j-base-lang
8738 (name "java-ops4j-base-lang")
8742 (uri (string-append "https://github.com/ops4j/org.ops4j.base/"
8743 "archive/base-" version ".tar.gz"))
8746 "18hl3lpchgpv8yh5rlk39l2gif5dlfgb8gxjmncf39pr2dprkniw"))))
8747 (build-system ant-build-system)
8749 `(#:jar-name "java-ops4j-base-lang.jar"
8750 #:source-dir "ops4j-base-lang/src/main/java"
8751 #:tests? #f; no tests
8753 (modify-phases %standard-phases
8754 (add-before 'build 'add-test-file
8756 ;; That file is required by a test in ops4j-pax-exam-core-spi
8757 (mkdir-p "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang")
8758 (with-output-to-file "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang/pom.properties"
8762 "version=" ,version "\n"
8763 "groupId=org.ops4j.base"
8764 "artifactId=ops4j-base-lang\n"))))
8766 (home-page "https://ops4j1.jira.com/wiki/spaces/base/overview")
8767 (synopsis "Utility classes and extensions to be used in OPS4J projects")
8768 (description "OPS4J stands for Open Participation Software for Java. This
8769 package contains utilities and extensions related to @code{java.lang}.")
8770 (license license:asl2.0)))
8772 (define-public java-ops4j-base-monitors
8774 (inherit java-ops4j-base-lang)
8775 (name "java-ops4j-base-monitors")
8777 `(#:jar-name "java-ops4j-base-monitors.jar"
8778 #:source-dir "ops4j-base-monitors/src/main/java"
8779 #:tests? #f)); no tests
8781 `(("lang" ,java-ops4j-base-lang)))
8782 (description "OPS4J stands for Open Participation Software for Java. This
8783 package contains utilities and extensions related to monitoring.")))
8785 (define-public java-ops4j-base-io
8787 (inherit java-ops4j-base-lang)
8788 (name "java-ops4j-base-io")
8790 `(#:jar-name "java-ops4j-base-io.jar"
8791 #:source-dir "ops4j-base-io/src/main/java"
8792 #:test-dir "ops4j-base-io/src/test"
8794 (list "**/ListerTest.java")))
8796 `(("lang" ,java-ops4j-base-monitors)
8797 ("lang" ,java-ops4j-base-lang)))
8799 `(("junit" ,java-junit)
8800 ("hamcrest" ,java-hamcrest-core)))
8801 (description "OPS4J stands for Open Participation Software for Java. This
8802 package contains utilities and extensions related to handling streams and files.")))
8804 (define-public java-ops4j-base-util
8806 (inherit java-ops4j-base-lang)
8807 (name "java-ops4j-base-util")
8809 `(#:jar-name "java-ops4j-base-util.jar"
8810 #:source-dir "ops4j-base-util/src/main/java"
8811 #:test-dir "ops4j-base-util/src/test"))
8813 `(("lang" ,java-ops4j-base-lang)))
8815 `(("junit" ,java-junit)))
8816 (description "OPS4J stands for Open Participation Software for Java. This
8817 package contains utilities and extensions related to environment, i18n and
8820 (define-public java-ops4j-base-util-property
8822 (inherit java-ops4j-base-lang)
8823 (name "java-ops4j-base-util-property")
8825 `(#:jar-name "java-ops4j-base-util-property.jar"
8826 #:source-dir "ops4j-base-util-property/src/main/java"
8827 #:tests? #f)); no tests
8829 `(("lang" ,java-ops4j-base-lang)
8830 ("util" ,java-ops4j-base-util)))
8831 (description "OPS4J stands for Open Participation Software for Java. This
8832 package contains utilities and extensions related to resolving properties from
8833 different sources.")))
8835 (define-public java-ops4j-base-store
8837 (inherit java-ops4j-base-lang)
8838 (name "java-ops4j-base-store")
8840 `(#:jar-name "java-ops4j-base-store.jar"
8841 #:source-dir "ops4j-base-store/src/main/java"
8842 #:tests? #f)); no tests
8844 `(("lang" ,java-ops4j-base-lang)
8845 ("slf4j" ,java-slf4j-api)
8846 ("io" ,java-ops4j-base-io)))
8847 (description "OPS4J stands for Open Participation Software for Java. This
8848 package contains utilities for storing and retrieving data from an
8849 @code{InputStream}.")))
8851 (define-public java-ops4j-base-spi
8853 (inherit java-ops4j-base-lang)
8854 (name "java-ops4j-base-spi")
8856 `(#:jar-name "java-ops4j-base-spi.jar"
8857 #:source-dir "ops4j-base-spi/src/main/java"
8858 #:test-dir "ops4j-base-spi/src/test"))
8860 `(("junit" ,java-junit)
8861 ("hamcrest" ,java-hamcrest-core)))
8862 (description "OPS4J stands for Open Participation Software for Java. This
8863 package contains utilities for obtaining services via the Java SE 6
8864 @code{ServiceLoader}.")))
8866 (define-public java-aqute-bnd-annotation
8868 (name "java-aqute-bnd-annotation")
8872 (uri (string-append "https://github.com/bndtools/bnd/archive/"
8873 version ".REL.tar.gz"))
8874 (file-name (string-append name "-" version ".tar.gz"))
8877 "1ggyiq0as0f6cz333a0dh98j72kmvv5pf2s47v9554yh905lfqdl"))))
8878 (build-system ant-build-system)
8880 `(#:jar-name "java-aqute-bnd-annotation.jar"
8881 #:source-dir "biz.aQute.bnd.annotation/src"
8882 #:tests? #f)); empty test dir
8883 (home-page "https://bnd.bndtools.org/")
8884 (synopsis "Tools for OSGi")
8885 (description "Bnd is a swiss army knife for OSGi, it creates manifest
8886 headers based on analyzing the class code, it verifies the project settings,
8887 it manages project dependencies, gives diffs jars, and much more.")
8888 (license license:asl2.0)))
8890 (define-public java-aqute-libg
8892 (inherit java-aqute-bnd-annotation)
8893 (name "java-aqute-libg")
8895 `(#:jar-name "java-aqute-libg.jar"
8896 ;; The build fails when source/target more recent than 1.7. This
8897 ;; is a known issue. See: https://github.com/bndtools/bnd/issues/1327
8899 ;; It is closed as won't fix. There is no way to change the source
8900 ;; so that it works on 1.8, and still works on 1.6, the upstream
8901 ;; target. It work fine on 1.7, so we use 1.7.
8902 #:make-flags (list "-Dant.build.javac.source=1.7"
8903 "-Dant.build.javac.target=1.7")
8905 (modify-phases %standard-phases
8906 (add-before 'configure 'chdir
8907 ;; Change to aQute.libg directory, so that the relative
8908 ;; paths in the tests aren't broken.
8910 (chdir "aQute.libg")
8912 (add-before 'check 'create-test-directory
8913 ;; Copy the test directory to test/java, since that's where
8914 ;; ant-build-system's default project in build.xml expects to find
8915 ;; the test classes. Leave a copy in the original place to not
8916 ;; break paths in tests.
8919 (copy-recursively "test" "src/test/java")
8922 `(("slf4j" ,java-slf4j-api)
8923 ("osgi-annot" ,java-osgi-annotation)
8924 ("java-osgi-cmpn" ,java-osgi-cmpn)
8925 ("osgi" ,java-osgi-core)))
8927 `(("hamcrest" ,java-hamcrest-core)
8928 ("java-junit" ,java-junit)))))
8930 (define-public java-aqute-bndlib
8932 (inherit java-aqute-bnd-annotation)
8933 (name "java-aqute-bndlib")
8935 `(#:jar-name "java-bndlib.jar"
8936 #:source-dir "biz.aQute.bndlib/src"
8937 #:tests? #f)); no tests
8939 `(("slf4j" ,java-slf4j-api)
8940 ("osgi-annot" ,java-osgi-annotation)
8941 ("java-aqute-libg" ,java-aqute-libg)
8942 ("java-aqute-bnd-annotation" ,java-aqute-bnd-annotation)
8943 ("java-osgi-service-component-annotations" ,java-osgi-service-component-annotations)
8944 ("java-osgi-service-repository" ,java-osgi-service-repository)
8945 ("java-osgi-service-log" ,java-osgi-service-log)
8946 ("java-osgi-service-metatype-annotations" ,java-osgi-service-metatype-annotations)
8947 ("java-osgi-namespace-contract" ,java-osgi-namespace-contract)
8948 ("java-osgi-namespace-extender" ,java-osgi-namespace-extender)
8949 ("java-osgi-namespace-service" ,java-osgi-namespace-service)
8950 ("promise" ,java-osgi-util-promise)
8951 ("osgi" ,java-osgi-core)))))
8953 (define-public java-ops4j-pax-tinybundles
8955 (name "java-ops4j-pax-tinybundles")
8959 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.tinybundles/"
8960 "archive/tinybundles-" version ".tar.gz"))
8963 "0y0gq3pvv0iir2b885lmlwnvr724vv7vklzhhr4fs27d7mdkj871"))))
8965 `(#:jar-name "java-ops4j-pax-tinybundles.jar"
8966 #:source-dir "src/main/java"
8968 ;; Abstract base classes for other tests
8969 (list "**/BndTest.java" "**/CoreTest.java")
8971 (modify-phases %standard-phases
8972 (add-before 'check 'fix-version
8974 ;; This test has a reference to an old version of bndlib we are not
8975 ;; packaging. It uses the version referenced in pom.xml. We replace
8976 ;; it with our own version.
8977 (substitute* "src/test/java/org/ops4j/pax/tinybundles/bnd/BndTest.java"
8978 (("[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*")
8979 ,(package-version java-aqute-bndlib)))
8982 `(("lang" ,java-ops4j-base-lang)
8983 ("io" ,java-ops4j-base-io)
8984 ("store" ,java-ops4j-base-store)
8985 ("slf4j" ,java-slf4j-api)
8986 ("libg" ,java-aqute-libg)
8987 ("bndlib" ,java-aqute-bndlib)))
8989 `(("junit" ,java-junit)
8990 ("hamcrest" ,java-hamcrest-core)
8991 ("log4j" ,java-log4j-api)
8992 ("bndannotation" ,java-aqute-bnd-annotation)
8993 ("framework" ,java-osgi-framework)))
8994 (build-system ant-build-system)
8995 (home-page "https://ops4j1.jira.com/wiki/spaces/ops4j/pages/12060312/Tinybundles")
8996 (synopsis "Java APIs to create OSGi related artifacts")
8997 (description "Tinybundles is all about creating OSGi related artifacts like
8998 Bundles, Fragments and Deployment Packages with Java Api. It is very convenient
8999 to create such artifacts on-the-fly inside Tests (like in Pax Exam). On the
9000 other hand, this library can be a foundation of real end user tools that need
9001 to create those artifacts.")
9002 (license license:asl2.0)))
9004 (define-public java-ops4j-pax-exam-core
9006 (name "java-ops4j-pax-exam-core")
9010 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.exam2/"
9011 "archive/exam-reactor-" version ".tar.gz"))
9014 "08mzw8nkah3rj3vznlplnawspxhp61zgvb44ifqa1rni1cvbms2g"))))
9016 `(#:jar-name "java-ops4j-pax-exam-core.jar"
9017 #:source-dir "core/pax-exam/src/main/java"
9018 #:test-dir "core/pax-exam/src/test"))
9020 `(("slf4j" ,java-slf4j-api)
9021 ("lang" ,java-ops4j-base-lang)
9022 ("io" ,java-ops4j-base-io)
9023 ("util-property" ,java-ops4j-base-util-property)
9024 ("util-store" ,java-ops4j-base-store)
9025 ("java-osgi-core" ,java-osgi-core)))
9027 `(("junit" ,java-junit)
9028 ("hamcrest" ,java-hamcrest-core)))
9029 (build-system ant-build-system)
9030 (home-page "https://ops4j1.jira.com/wiki/spaces/PAXEXAM4/overview")
9031 (synopsis "In-Container Testing for OSGi, Java EE and CDI")
9032 (description "Pax Exam creates OSGi bundles for testing purposes. It lets
9033 the user take control of the OSGi framework, the test framework (e.g. JUnit) and
9034 the system under test at the same time.")
9035 (license license:asl2.0)))
9037 (define-public java-ops4j-pax-exam-core-spi
9039 (inherit java-ops4j-pax-exam-core)
9040 (name "java-ops4j-pax-exam-core-spi")
9042 `(#:jar-name "java-ops4j-pax-exam-spi.jar"
9043 #:source-dir "src/main/java"
9046 ;; Abstract base class, not a test
9047 "**/BaseStagedReactorTest.java"
9048 ;; Depends on org.mortbay.jetty.testwars:test-war-dump
9049 "**/WarBuilderTest.java")
9051 (modify-phases %standard-phases
9052 (add-before 'configure 'chdir
9054 ;; Tests assume we are in this directory
9055 (chdir "core/pax-exam-spi")
9057 (add-before 'check 'fix-tests
9059 ;; One test checks that this file is present.
9060 (mkdir-p "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi")
9061 (with-output-to-file
9062 "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi/pom.properties"
9065 (string-append "artifactId = pax-exam-spi\n"
9066 "version = " ,(package-version java-ops4j-pax-exam-core-spi)))))
9067 ;; Maven puts compilation results in the target directory, while we
9068 ;; put them in the build directory.
9069 (substitute* '("src/test/java/org/ops4j/pax/exam/spi/war/WarBuilderTest.java"
9070 "src/test/java/org/ops4j/pax/exam/spi/war/WarTestProbeBuilderTest.java"
9071 "src/test/java/org/ops4j/pax/exam/spi/war/ZipBuilderTest.java")
9072 (("target") "build"))
9073 ;; One test is expected to fail, but it doesn't throw the expected exception
9074 (substitute* "src/test/java/org/ops4j/pax/exam/spi/reactors/BaseStagedReactorTest.java"
9075 (("AssertionError") "IllegalArgumentException"))
9078 `(("java-ops4j-pax-exam-core" ,java-ops4j-pax-exam-core)
9079 ("lang" ,java-ops4j-base-lang)
9080 ("monitors" ,java-ops4j-base-monitors)
9081 ("store" ,java-ops4j-base-store)
9082 ("io" ,java-ops4j-base-io)
9083 ("spi" ,java-ops4j-base-spi)
9084 ("osgi" ,java-osgi-core)
9085 ("slf4j" ,java-slf4j-api)
9086 ("tinybundles" ,java-ops4j-pax-tinybundles)))
9088 `(("mockito" ,java-mockito-1)
9089 ("junit" ,java-junit)
9090 ("hamcrest" ,java-hamcrest-core)
9091 ("cglib" ,java-cglib)
9092 ("objenesis" ,java-objenesis)
9093 ("asm" ,java-asm)))))
9095 (define-public java-ops4j-pax-exam-core-junit
9097 (inherit java-ops4j-pax-exam-core)
9098 (name "java-ops4j-pax-exam-core-junit")
9100 `(#:jar-name "ops4j-pax-exam-core-junit.jar"
9101 #:source-dir "drivers/pax-exam-junit4/src/main/java"
9102 #:tests? #f)); no tests
9104 `(("junit" ,java-junit)
9105 ("slf4j" ,java-slf4j-api)
9106 ("core" ,java-ops4j-pax-exam-core)
9107 ("spi" ,java-ops4j-pax-exam-core-spi)))
9108 (native-inputs '())))
9110 (define-public java-fasterxml-jackson-annotations
9112 (name "java-fasterxml-jackson-annotations")
9116 (uri (string-append "https://github.com/FasterXML/"
9117 "jackson-annotations/archive/"
9118 "jackson-annotations-" version ".tar.gz"))
9121 "0mr95xd0da6a4g95zvrl1ryk5n5zv2rc696w3xnsr5hxk2gicfc4"))))
9122 (build-system ant-build-system)
9124 `(#:jar-name "jackson-annotations.jar"
9125 #:source-dir "src/main/java"
9126 #:test-dir "src/test"))
9128 `(("junit" ,java-junit)))
9129 (home-page "https://github.com/FasterXML/jackson-annotations")
9130 (synopsis "General purpose annotations for the Jackson Data Processor")
9131 (description "This package contains general purpose annotations for the
9132 Jackson Data Processor, used on value and handler types. The only annotations
9133 not included are ones that require dependency to the Databind package.")
9134 (license license:asl2.0)))
9136 (define-public java-fasterxml-jackson-core
9138 (name "java-fasterxml-jackson-core")
9142 (uri (string-append "https://github.com/FasterXML/"
9143 "jackson-core/archive/"
9144 "jackson-core-" version ".tar.gz"))
9147 "159hsnk17jr1gyzkf01cxvsn45srnk37g949r7364qlsr527gjgd"))))
9148 (build-system ant-build-system)
9150 `(#:jar-name "jackson-core.jar"
9151 #:source-dir "src/main/java"
9152 #:test-dir "src/test"
9155 ;; Expected failure. pom.xml excludes these
9157 ;; Base classes that have no constructor for junit
9159 "**/ConcurrencyReadTest.java"
9160 "**/ManualCharAccessTest.java"
9161 "**/ManualCharAccessTest.java"
9162 "**/TrailingCommasTest.java"
9163 "**/AsyncMissingValuesInObjectTest.java"
9164 "**/AsyncMissingValuesInArrayTest.java")
9166 (modify-phases %standard-phases
9167 (add-before 'configure 'generate-PackageVersion.java
9169 (let* ((out "src/main/java/com/fasterxml/jackson/core/json/PackageVersion.java")
9170 (in (string-append out ".in")))
9173 (("@package@") "com.fasterxml.jackson.core.json")
9174 (("@projectversion@") ,version)
9175 (("@projectgroupid@") "com.fasterxml.jackson.core")
9176 (("@projectartifactid@") "jackson-core")))
9178 (add-before 'build 'copy-resources
9180 (copy-recursively "src/main/resources"
9183 (add-before 'check 'copy-test-resources
9185 (copy-recursively "src/test/resources"
9186 "build/test-classes")
9189 `(("junit" ,java-junit)
9190 ("hamcrest" ,java-hamcrest-core)))
9191 (home-page "https://github.com/FasterXML/jackson-core")
9194 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
9196 (define-public java-fasterxml-jackson-databind
9198 (name "java-fasterxml-jackson-databind")
9202 (uri (string-append "https://github.com/FasterXML/"
9203 "jackson-databind/archive/"
9204 "jackson-databind-" version ".tar.gz"))
9207 "1zd2cw4z6kdkbx8za96xh9pyicv2a2l7y0rkcx2fqd8hv6d47s08"))))
9208 (build-system ant-build-system)
9210 `(#:jar-name "jackson-databind.jar"
9211 #:source-dir "src/main/java"
9212 #:tests? #f; requires javax.measures for which I can't find a free implementation
9214 (modify-phases %standard-phases
9215 (add-before 'configure 'generate-PackageVersion.java
9217 (let* ((out "src/main/java/com/fasterxml/jackson/databind/cfg/PackageVersion.java")
9218 (in (string-append out ".in")))
9221 (("@package@") "com.fasterxml.jackson.databind.cfg")
9222 (("@projectversion@") ,version)
9223 (("@projectgroupid@") "com.fasterxml.jackson.databind")
9224 (("@projectartifactid@") "jackson-databind")))
9226 (add-before 'build 'copy-resources
9228 (copy-recursively "src/main/resources" "build/classes")
9231 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
9232 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)))
9233 (home-page "https://github.com/FasterXML/jackson-databind")
9234 (synopsis "Data-binding functionality and tree-model for the Jackson Data Processor")
9235 (description "This package contains the general-purpose data-binding
9236 functionality and tree-model for Jackson Data Processor. It builds on core
9237 streaming parser/generator package, and uses Jackson Annotations for
9239 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
9241 (define-public java-fasterxml-jackson-modules-base-jaxb
9243 (name "java-fasterxml-jackson-modules-base-jaxb")
9247 (uri (string-append "https://github.com/FasterXML/"
9248 "jackson-modules-base/archive/"
9249 "jackson-modules-base-" version ".tar.gz"))
9252 "1wws95xi8sppp6b0k2vvjdjyynl20r1a4dwrhai08lzlria6blp5"))))
9253 (build-system ant-build-system)
9255 `(#:jar-name "jackson-modules-base-jaxb.jar"
9256 #:source-dir "jaxb/src/main/java"
9257 #:test-dir "jaxb/src/test"
9259 ;; Base class for tests
9260 (list "**/BaseJaxbTest.java")
9262 (modify-phases %standard-phases
9263 (add-before 'configure 'generate-PackageVersion.java
9265 (let* ((out (string-append "jaxb/src/main/java/com/fasterxml/"
9266 "jackson/module/jaxb/PackageVersion.java"))
9267 (in (string-append out ".in")))
9270 (("@package@") "com.fasterxml.jackson.module.jaxb")
9271 (("@projectversion@") ,version)
9272 (("@projectgroupid@") "com.fasterxml.jackson.module.jaxb")
9273 (("@projectartifactid@") "jackson-module-jaxb")))
9275 (add-before 'build 'copy-resources
9277 (copy-recursively "jaxb/src/main/resources" "build/classes")
9280 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
9281 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
9282 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)))
9284 `(("java-junit" ,java-junit)))
9285 (home-page "https://github.com/FasterXML/jackson-modules-base")
9286 (synopsis "Jaxb annotations jackson module")
9287 (description "This package is the jaxb annotations module for jackson.")
9288 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
9290 (define-public java-fasterxml-jackson-modules-base-mrbean
9292 (name "java-fasterxml-jackson-modules-base-mrbean")
9296 (uri (string-append "https://github.com/FasterXML/"
9297 "jackson-modules-base/archive/"
9298 "jackson-modules-base-" version ".tar.gz"))
9301 "1wws95xi8sppp6b0k2vvjdjyynl20r1a4dwrhai08lzlria6blp5"))))
9302 (build-system ant-build-system)
9304 `(#:jar-name "jackson-modules-base-mrbean.jar"
9305 #:source-dir "mrbean/src/main/java"
9306 #:test-dir "mrbean/src/test"
9308 ;; Base class for tests
9309 (list "**/BaseTest.java")
9311 (modify-phases %standard-phases
9312 (add-before 'configure 'generate-PackageVersion.java
9314 (let* ((out (string-append "mrbean/src/main/java/com/fasterxml/"
9315 "jackson/module/mrbean/PackageVersion.java"))
9316 (in (string-append out ".in")))
9319 (("@package@") "com.fasterxml.jackson.module.mrbean")
9320 (("@projectversion@") ,version)
9321 (("@projectgroupid@") "com.fasterxml.jackson.module.mrbean")
9322 (("@projectartifactid@") "jackson-module-mrbean")))
9325 `(("java-asm" ,java-asm)
9326 ("java-fasterxml-jackson-annotations"
9327 ,java-fasterxml-jackson-annotations)
9328 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
9329 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)))
9331 `(("java-junit" ,java-junit)))
9332 (home-page "https://github.com/FasterXML/jackson-modules-base")
9333 (synopsis "POJO type materialization for Java")
9334 (description "This package implements POJO type materialization.
9335 Databinders can construct implementation classes for Java interfaces as part
9336 of deserialization.")
9337 (license license:asl2.0)))
9339 (define-public java-snakeyaml
9341 (name "java-snakeyaml")
9345 (uri (string-append "https://bitbucket.org/asomov/snakeyaml/get/v"
9347 (file-name (string-append name "-" version ".tar.gz"))
9350 "0474cqcv46zgv9bhms2vgawakq1vyj0hp3h3f1bfys46msia90bh"))))
9351 (build-system ant-build-system)
9353 `(#:jar-name "java-snakeyaml.jar"
9354 #:source-dir "src/main/java"
9355 ;; Tests require velocity, a cyclic dependency, and
9356 ;; java-spring-framework-context which is not packaged.
9358 (home-page "https://bitbucket.org/asomov/snakeyaml")
9359 (synopsis "YAML processor")
9360 (description "SnakeYAML is a YAML processor for the Java Virtual Machine.")
9361 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
9363 (define-public java-fasterxml-jackson-dataformat-yaml
9365 (name "java-fasterxml-jackson-dataformat-yaml")
9369 (uri (string-append "https://github.com/FasterXML/"
9370 "jackson-dataformats-text/archive/"
9371 "jackson-dataformats-text-" version ".tar.gz"))
9374 "1hikl06khaxbg439avf442qifcadap8w0lx13f0nnhp2vh3dkbz7"))))
9375 (build-system ant-build-system)
9377 `(#:jar-name "jackson-dataformat-yaml.jar"
9378 #:source-dir "yaml/src/main/java"
9379 #:test-dir "yaml/src/test"
9380 #:test-exclude (list "**/failing/**.java")
9382 (modify-phases %standard-phases
9383 (add-before 'configure 'generate-PackageVersion.java
9385 (let* ((out "yaml/src/main/java/com/fasterxml/jackson/dataformat/yaml/PackageVersion.java")
9386 (in (string-append out ".in")))
9389 (("@package@") "com.fasterxml.jackson.dataformat.yaml")
9390 (("@projectversion@") ,version)
9391 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.yaml")
9392 (("@projectartifactid@") "jackson-dataformat-yaml")))
9395 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
9396 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
9397 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)
9398 ("java-snakeyaml" ,java-snakeyaml)))
9400 `(("junit" ,java-junit)
9401 ("hamcrest" ,java-hamcrest-core)
9402 ("java-ops4j-pax-exam-core-spi" ,java-ops4j-pax-exam-core-spi)
9403 ("java-ops4j-pax-exam-core-junit" ,java-ops4j-pax-exam-core-junit)
9404 ("java-ops4j-pax-exam" ,java-ops4j-pax-exam-core)))
9405 (home-page "https://github.com/FasterXML/jackson-dataformats-text")
9406 (synopsis "Yaml backend for Jackson")
9407 (description "Dataformat backends are used to support format alternatives
9408 to JSON, supported by default. This is done by sub-classing Jackson core
9410 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
9412 (define-public java-stax2-api
9414 (name "java-stax2-api")
9418 (uri (string-append "https://github.com/FasterXML/stax2-api/archive/"
9419 "stax2-api-" version ".tar.gz"))
9422 "1amc1si0l0hyyw2sawmnzy4hkna3z6fp195y4nm5m9wb9ld5awkq"))))
9423 (build-system ant-build-system)
9425 `(#:jar-name "java-stax2-api.jar"
9426 #:source-dir "src/main/java"
9427 #:tests? #f)); no tests
9428 (home-page "https://github.com/FasterXML/stax2-api")
9429 (synopsis "Stax2 API")
9430 (description "Stax2 API is an extension to basic Stax 1.0 API that adds
9431 significant new functionalities, such as full-featured bi-direction validation
9432 interface and high-performance Typed Access API.")
9433 (license license:bsd-2)))
9435 (define-public java-woodstox-core
9437 (name "java-woodstox-core")
9441 (uri (string-append "https://github.com/FasterXML/woodstox/archive/"
9442 "woodstox-core-" version ".tar.gz"))
9445 "1i7pdgb8jbw6gdy5kmm0l6rz109n2ns92pqalpyp24vb8vlvdfd4"))))
9446 (build-system ant-build-system)
9448 `(#:jar-name "woodstox.jar"
9450 (list "**/Base*.java" "failing/**")
9452 (modify-phases %standard-phases
9453 (add-before 'build 'remove-msv-dep
9455 ;; we don't need osgi, and it depends on msv
9456 (delete-file-recursively "src/main/java/com/ctc/wstx/osgi")
9457 ;; msv's latest release is from 2011 and we don't need it
9458 (delete-file-recursively "src/main/java/com/ctc/wstx/msv")
9459 (delete-file-recursively "src/test/java/wstxtest/osgi")
9460 (delete-file-recursively "src/test/java/wstxtest/msv")
9462 (add-before 'build 'copy-resources
9464 (copy-recursively "src/main/resources" "build/classes")
9467 `(("stax2" ,java-stax2-api)))
9469 `(("junit" ,java-junit)))
9470 (home-page "https://github.com/FasterXML/woodstox")
9471 (synopsis "Stax XML API implementation")
9472 (description "Woodstox is a stax XML API implementation.")
9473 (license license:asl2.0)))
9475 (define-public java-fasterxml-jackson-dataformat-xml
9477 (name "java-fasterxml-jackson-dataformat-xml")
9481 (uri (string-append "https://github.com/FasterXML/"
9482 "jackson-dataformat-xml/archive/"
9483 "jackson-dataformat-xml-" version ".tar.gz"))
9486 "111fkkl90w31jbf30kgj82qdcxlw4sxppki7i198liw0ck1jcavq"))))
9487 (build-system ant-build-system)
9489 `(#:jar-name "jackson-dataformat-xml.jar"
9490 #:source-dir "src/main/java"
9492 (list "**/failing/**")
9494 (modify-phases %standard-phases
9495 (add-before 'configure 'generate-PackageVersion.java
9497 (let* ((out "src/main/java/com/fasterxml/jackson/dataformat/xml/PackageVersion.java")
9498 (in (string-append out ".in")))
9502 (("@package@") "com.fasterxml.jackson.dataformat.xml")
9503 (("@projectversion@") ,version)
9504 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.xml")
9505 (("@projectartifactid@") "jackson-dataformat-xml")))
9507 (add-before 'build 'copy-resources
9509 (copy-recursively "src/main/resources" "build/classes")
9512 `(("jackson-annotations" ,java-fasterxml-jackson-annotations)
9513 ("jackson-core" ,java-fasterxml-jackson-core)
9514 ("jackson-modules-base-jaxb" ,java-fasterxml-jackson-modules-base-jaxb)
9515 ("jackson-databind" ,java-fasterxml-jackson-databind)
9516 ("stax2-api" ,java-stax2-api)
9517 ("woodstox" ,java-woodstox-core)))
9519 `(("junit" ,java-junit)
9520 ("hamcrest" ,java-hamcrest-core)))
9521 (home-page "https://github.com/FasterXML/jackson-dataformat-xml")
9522 (synopsis "Read and write XML")
9523 (description "This package contains Jackson extension component for reading
9524 and writing XML encoded data.
9526 Further, the goal is to emulate how JAXB data-binding works with \"Code-first\"
9527 approach (that is, no support is added for \"Schema-first\" approach). Support
9528 for JAXB annotations is provided by JAXB annotation module; this module
9529 provides low-level abstractions (@code{JsonParser}, @code{JsonGenerator},
9530 @code{JsonFactory}) as well as small number of higher level overrides needed to
9531 make data-binding work.")
9532 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
9534 (define-public java-hdrhistogram
9536 (name "java-hdrhistogram")
9540 (uri (string-append "https://github.com/HdrHistogram/HdrHistogram/"
9541 "archive/HdrHistogram-" version ".tar.gz"))
9544 "1sicbmc3sr42nw93qbkb26q9rn33ag33k6k77phjc3j5h5gjffqv"))))
9545 (build-system ant-build-system)
9547 `(#:jar-name "java-hdrhistogram.jar"
9548 #:source-dir "src/main/java"
9550 (modify-phases %standard-phases
9551 (add-before 'configure 'set-version
9553 (let* ((version-java "src/main/java/org/HdrHistogram/Version.java")
9554 (template (string-append version-java ".template")))
9555 (copy-file template version-java)
9556 (substitute* version-java
9557 (("\\$VERSION\\$") ,version)
9558 (("\\$BUILD_TIME\\$") "0"))
9561 `(("junit" ,java-junit)
9562 ("hamcrest" ,java-hamcrest-core)))
9563 (home-page "https://hdrhistogram.github.io/HdrHistogram")
9564 (synopsis "High dynamic range histogram")
9565 (description "Hdrhistogram creates histograms that support
9566 recording and analyzing sampled data value counts across a configurable integer
9567 value range with configurable value precision within the range. Value precision
9568 is expressed as the number of significant digits in the value recording, and
9569 provides control over value quantization behavior across the value range and
9570 the subsequent value resolution at any given level.")
9571 (license license:public-domain)))
9573 (define-public java-cofoja
9575 (name "java-cofoja")
9580 (url "https://github.com/nhatminhle/cofoja")
9581 (commit (string-append "v" version))))
9582 (file-name (string-append "java-cofoja-" version "-checkout"))
9585 "0p7sz8y5xgpi5rx1qwn6587fkd52qr3ha3ybh14gqcyxhikl525w"))))
9586 (build-system ant-build-system)
9588 `(#:build-target "dist"
9589 #:test-target "test"
9592 (list "-Ddist.dir=dist")
9593 #:modules ((guix build ant-build-system)
9594 (guix build java-utils)
9599 (modify-phases %standard-phases
9600 ;; The bulid system ignores the class path the ant-build-system sets
9601 ;; up and instead expects to find all dependencies in the "lib"
9603 (add-after 'unpack 'create-libdir
9604 (lambda* (#:key inputs #:allow-other-keys)
9608 (let ((target (string-append "lib/" (basename file))))
9609 (unless (file-exists? target)
9610 (symlink file target))))
9611 (append-map (match-lambda
9613 (find-files dir "\\.jar$")))
9616 (replace 'install (install-jars "dist")))))
9618 `(("java-asm" ,java-asm)))
9620 `(("java-junit" ,java-junit)))
9621 (home-page "https://github.com/nhatminhle/cofoja")
9622 (synopsis "Contracts for Java")
9623 (description "Contracts for Java, or Cofoja for short, is a contract
9624 programming framework and test tool for Java, which uses annotation processing
9625 and bytecode instrumentation to provide run-time checking. (In particular,
9626 this is not a static analysis tool.)")
9627 (license license:lgpl3+)))
9629 (define-public java-aopalliance
9631 (name "java-aopalliance")
9635 ;; Note: this git repository is not official, but contains the
9636 ;; source code that is in the CVS repository. Downloading the
9637 ;; tarball from sourceforge is undeterministic, and the cvs download
9640 (url "https://github.com/hoverruan/aopalliance")
9641 (commit "0d7757ae204e5876f69431421fe9bc2a4f01e8a0")))
9642 (file-name (string-append name "-" version))
9645 "0rsg2b0v3hxlq2yk1i3m2gw3xwq689j3cwx9wbxvqfpdcjbca0qr"))))
9646 (build-system ant-build-system)
9648 `(#:jar-name "java-aopalliance.jar"
9650 #:tests? #f; no tests
9651 #:source-dir "aopalliance/src/main"
9652 #:modules ((guix build ant-build-system)
9654 (guix build maven pom)
9655 (guix build java-utils)
9658 (modify-phases %standard-phases
9659 (add-before 'install 'create-pom
9661 (with-output-to-file "pom.xml"
9665 (modelVersion "4.0.0")
9666 (name "aopalliance")
9667 (groupId "aopalliance")
9668 (artifactId "aopalliance")
9669 (version "1.0"))))))
9672 (install-from-pom "pom.xml")))))
9673 (home-page "http://aopalliance.sourceforge.net")
9674 (synopsis "Aspect-Oriented Programming")
9675 (description "The AOP Alliance project is a joint project between several
9676 software engineering people who are interested in Aspect-Oriented Programming
9678 (license license:public-domain)))
9680 (define-public java-javax-inject
9682 (name "java-javax-inject")
9687 (url "https://github.com/javax-inject/javax-inject")
9689 (file-name (git-file-name name version))
9692 "1rspl0nkvk1jif6nccikw93xic6ljj2b6kpy2mffwi2mnvc13j7x"))))
9693 (build-system ant-build-system)
9695 `(#:jar-name "java-javax-inject.jar"
9696 #:tests? #f; no tests
9698 (modify-phases %standard-phases
9700 (install-from-pom "pom.xml")))))
9701 (home-page "https://github.com/javax-inject/javax-inject")
9702 (synopsis "JSR-330: Dependency Injection for Java")
9703 (description "This package specifies a means for obtaining objects in such
9704 a way as to maximize reusability, testability and maintainability compared to
9705 traditional approaches such as constructors, factories, and service locators
9706 (e.g., JNDI). This process, known as dependency injection, is beneficial to
9707 most nontrivial applications.
9709 Many types depend on other types. For example, a @var{Stopwatch} might depend
9710 on a @var{TimeSource}. The types on which a type depends are known as its
9711 dependencies. The process of finding an instance of a dependency to use at run
9712 time is known as resolving the dependency. If no such instance can be found,
9713 the dependency is said to be unsatisfied, and the application is broken.")
9714 (license license:asl2.0)))
9716 (define-public java-guice
9723 (url "https://github.com/google/guice")
9725 (file-name (git-file-name name version))
9726 (modules '((guix build utils)))
9729 (for-each delete-file (find-files "." ".*.jar")) #t))
9732 "18im5hdfl4q1b9chww2s1ii60sn3ydyyar32a2sf2p2g8zlbdswq"))))
9733 (build-system ant-build-system)
9735 `(#:jar-name "java-guice.jar"
9737 #:tests? #f; FIXME: tests are not in a java sub directory
9738 #:source-dir "core/src"
9740 (modify-phases %standard-phases
9741 (add-after 'unpack 'make-files-writable
9743 (for-each make-file-writable (find-files "."))
9746 (install-from-pom "core/pom.xml")))))
9748 `(("java-aopalliance" ,java-aopalliance)
9749 ("java-asm" ,java-asm)
9750 ("java-cglib" ,java-cglib)
9751 ("java-guava" ,java-guava)
9752 ("java-javax-inject" ,java-javax-inject)
9753 ("java-guice-parent-pom" ,java-guice-parent-pom)))
9754 (home-page "https://github.com/google/guice")
9755 (synopsis "Lightweight dependency injection framework")
9756 (description "Guice is a lightweight dependency injection framework for
9758 (license license:asl2.0)))
9760 (define-public java-guice-servlet
9762 (inherit java-guice)
9763 (name "java-guice-servlet")
9765 `(#:jar-name "guice-servlet.jar"
9766 #:source-dir "extensions/servlet/src/"
9768 #:tests? #f ; FIXME: not in a java subdir
9770 (modify-phases %standard-phases
9771 (add-after 'unpack 'make-files-writable
9773 (for-each make-file-writable (find-files "."))
9776 `(("guice" ,java-guice)
9777 ("servlet" ,java-classpathx-servletapi)
9778 ,@(package-inputs java-guice)))))
9780 (define java-guice-parent-pom
9782 (inherit java-guice)
9783 (name "java-guice-parent-pom")
9787 (modify-phases %standard-phases
9790 (add-after 'install 'install-extensions
9791 (install-pom-file "extensions/pom.xml"))
9793 (install-pom-file "pom.xml")))))
9795 `(("java-google-parent-pom" ,java-google-parent-pom-5)))))
9797 (define java-google-parent-pom-5
9799 (name "java-google-parent-pom")
9804 (url "https://github.com/google/google-maven-parents")
9805 (commit (string-append "google-" version))))
9806 (file-name (git-file-name name version))
9809 "0zb7hx24p8k8rfdvix2vsbfqn73jhrycdndvhf8j5gbii9wbqibv"))))
9810 (build-system ant-build-system)
9814 (modify-phases %standard-phases
9818 (install-pom-file "pom.xml")))))
9819 (home-page "https://github.com/google/google-maven-parents")
9820 (synopsis "Google parent pom")
9821 (description "This package contains the Maven parent POM for other Google
9823 (license license:asl2.0)))
9825 (define-public java-assertj
9827 (name "java-assertj")
9832 (url "https://github.com/joel-costigliola/assertj-core")
9833 (commit (string-append "assertj-core-" version))))
9834 (file-name (git-file-name name version))
9837 "1k35cg2in7pzk4pbdjryr0pll5lgk1r6ngrn0j8cdlgi7w8zh2d1"))))
9838 (build-system ant-build-system)
9840 `(#:jar-name "java-assertj.jar"
9842 #:source-dir "src/main/java"
9843 #:tests? #f)); depends on tng-junit which depends on assertj
9845 `(("cglib" ,java-cglib)
9846 ("junit" ,java-junit)
9847 ("hamcrest" ,java-hamcrest-core)))
9849 `(("mockito" ,java-mockito-1)))
9850 (home-page "https://joel-costigliola.github.io/assertj/index.html")
9851 (synopsis "Fluent assertions for java")
9852 (description "AssertJ core is a Java library that provides a fluent
9853 interface for writing assertions. Its main goal is to improve test code
9854 readability and make maintenance of tests easier.")
9855 (license license:asl2.0)))
9857 (define-public java-jboss-javassist
9859 (name "java-jboss-javassist")
9864 (url "https://github.com/jboss-javassist/javassist")
9866 (string-append "rel_"
9868 (lambda (x) (if (eq? x #\.) #\_ x)) version)
9870 (file-name (git-file-name name version))
9873 "0h3zlcyqiaq01fspm69h7vki67raw305w89p4ha8vlhpzw02qifm"))
9874 (modules '((guix build utils)))
9877 (delete-file "javassist.jar")))))
9878 (build-system ant-build-system)
9880 `(#:jar-name "java-jboss-javassist.jar"
9882 #:source-dir "src/main"
9883 #:tests? #f; FIXME: requires junit-awtui and junit-swingui from junit3
9885 (modify-phases %standard-phases
9886 (add-after 'unpack 'make-files-writable
9888 (for-each make-file-writable (find-files "."))
9891 `(("junit" ,java-junit)))
9892 (home-page "https://github.com/jboss-javassist/javassist")
9893 (synopsis "Java bytecode engineering toolkit")
9894 (description "Javassist (JAVA programming ASSISTant) makes Java bytecode
9895 manipulation simple. It is a class library for editing bytecodes in Java; it
9896 enables Java programs to define a new class at runtime and to modify a class
9897 file when the JVM loads it.")
9898 (license (list license:gpl2 license:cddl1.0)))); either gpl2 only or cddl.
9900 (define-public java-jcommander
9902 (name "java-jcommander")
9907 (url "https://github.com/cbeust/jcommander")
9909 (file-name (git-file-name name version))
9912 "12vcpc19sd7jhvjgp7xz1qjanfix162xb3x2q5zah93rjklj1h57"))))
9913 (build-system ant-build-system)
9915 `(#:jar-name "java-jcommander.jar"
9917 #:tests? #f; requires testng which depends on jcommander
9918 #:source-dir "src/main/java"))
9919 (home-page "https://jcommander.org")
9920 (synopsis "Command line parameters parser")
9921 (description "JCommander is a very small Java framework that makes it
9922 trivial to parse command line parameters. Parameters are declared with
9924 (license license:asl2.0)))
9926 (define-public java-bsh
9933 (url "https://github.com/beanshell/beanshell")
9935 (file-name (git-file-name name version))
9938 "0kz3f0xjack6c9syssi4qjw1rbd3q5963sk5pmr143hiibxa9csw"))
9939 (modules '((guix build utils)))
9942 ;; Delete bundled third-party jar archives.
9943 (for-each delete-file (find-files "." ".*.jar$"))
9944 (for-each (lambda (file) (chmod file #o644))
9945 (find-files "." "."))
9947 (build-system ant-build-system)
9949 `(#:build-target "jarall"
9950 #:test-target "junit-tests-all"
9952 (modify-phases %standard-phases
9953 (add-before 'install 'fix-pom
9955 (substitute* "pom.xml"
9956 (("org.apache-extras.beanshell") "org.beanshell"))
9959 (install-from-pom "pom.xml")))))
9961 `(("java-classpathx-servletapi" ,java-classpathx-servletapi)
9962 ("java-commons-bsf" ,java-commons-bsf)))
9964 `(("java-junit" ,java-junit)
9965 ("javacc" ,javacc-3)))
9966 (home-page "http://beanshell.org/")
9967 (synopsis "Lightweight Scripting for Java")
9968 (description "BeanShell is a small, free, embeddable Java source
9969 interpreter with object scripting language features, written in Java.
9970 BeanShell dynamically executes standard Java syntax and extends it with common
9971 scripting conveniences such as loose types, commands, and method closures like
9972 those in Perl and JavaScript.")
9973 (license license:asl2.0)))
9975 (define-public java-fest-util
9977 (name "java-fest-util")
9982 (url "https://github.com/alexruiz/fest-util/")
9983 (commit (string-append "fest-util-" version))))
9984 (file-name (git-file-name name version))
9987 "02kgal7v85snyyvcsxvn4qphid455f4smh2wri1il8d9asw0djbz"))))
9988 (build-system ant-build-system)
9990 `(#:jar-name "java-fest-util.jar"
9991 #:source-dir "src/main/java"))
9993 `(("junit" ,java-junit)
9994 ("hamcrest" ,java-hamcrest-core)))
9995 (home-page "https://github.com/alexruiz/fest-util")
9996 (synopsis "FEST common utilities")
9997 (description "Common utilities used in all FEST module.")
9998 (license license:asl2.0)))
10000 (define-public java-fest-test
10002 (name "java-fest-test")
10006 (uri (git-reference
10007 (url "https://github.com/alexruiz/fest-test/")
10008 (commit (string-append "fest-test-" version))))
10009 (file-name (git-file-name name version))
10012 "0mg1d2jfh7kbx2c40dchbjr6d8pv59snsyb13mfxsr7xk5n69qbn"))))
10013 (build-system ant-build-system)
10015 `(#:jar-name "java-fest-test.jar"
10016 #:source-dir "src/main/java"
10017 #:tests? #f)); no tests
10019 `(("junit" ,java-junit)))
10020 (home-page "https://github.com/alexruiz/fest-test")
10021 (synopsis "Common FEST testing infrastructure")
10022 (description "Fest-test contains the common FEST testing infrastructure.")
10023 (license license:asl2.0)))
10025 (define-public java-fest-assert
10027 (name "java-fest-assert")
10031 (uri (git-reference
10032 (url "https://github.com/alexruiz/fest-assert-2.x/")
10033 (commit (string-append "fest-assert-core-" version))))
10034 (file-name (git-file-name name version))
10037 "1cp8zzyag3s85fz2w68sda9zzaal1y5f9wl8g72wkm12an40w6by"))))
10038 (build-system ant-build-system)
10040 `(#:jar-name "java-fest-assert.jar"
10041 #:source-dir "src/main/java"
10044 "**/Abstract*.java"
10045 "**/*BaseTest.java"
10046 ;; Unable to set MockitoNamingPolicy on cglib generator which creates FastClasses
10047 "**/MessageFormatter_format_Test.java"
10048 "**/internal/*/*_assert*_Test.java")))
10050 `(("java-fest-util" ,java-fest-util)))
10052 `(("java-junit" ,java-junit)
10053 ("java-fest-test" ,java-fest-test)
10054 ("java-hamcrest-core" ,java-hamcrest-core)
10055 ("java-mockito" ,java-mockito-1)
10056 ("java-cglib" ,java-cglib)
10057 ("java-objenesis" ,java-objenesis)
10058 ("java-asm" ,java-asm)))
10059 (home-page "https://github.com/alexruiz/fest-assert-2.x")
10060 (synopsis "FEST fluent assertions")
10061 (description "FEST-Assert provides a fluent interface for assertions.")
10062 (license license:asl2.0)))
10064 (define-public java-testng
10066 (name "java-testng")
10070 (uri (git-reference
10071 (url "https://github.com/cbeust/testng")
10073 (file-name (string-append name "-" version "-checkout"))
10076 "0y6vq30i5g276kw0v2bhbvci22ijg7ax49ap2611yqlhbs4d6dqv"))))
10077 (build-system ant-build-system)
10079 `(#:jdk ,icedtea-8; java.util.function
10080 #:jar-name "java-testng.jar"
10081 #:source-dir "src/main/java"
10083 (modify-phases %standard-phases
10084 ;; FIXME: I don't know why these tests fail
10085 (add-after 'unpack 'delete-failing-tests
10087 (substitute* "src/test/resources/testng.xml"
10088 (("<class name=\"test.configuration.github1625.TestRunnerIssue1625\"/>") "")
10089 (("<class name=\"test.serviceloader.ServiceLoaderTest\" />") ""))
10091 ;; We don't have groovy
10092 (add-after 'unpack 'delete-groovy-tests
10094 (delete-file-recursively "src/test/java/test/dependent/issue1648/")
10095 (substitute* "src/test/resources/testng.xml"
10096 (("<class name=\"test.dependent.issue1648.TestRunner\"/>") ""))
10098 (add-before 'build 'copy-resources
10100 (copy-recursively "src/main/resources" "build/classes")
10102 (add-before 'check 'copy-test-resources
10104 (copy-recursively "src/test/resources" "build/test-classes")
10108 (invoke "ant" "compile-tests")
10109 ;; we don't have groovy
10110 (substitute* "src/test/resources/testng.xml"
10111 (("<class name=\"test.groovy.GroovyTest\" />") ""))
10112 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
10114 ":build/test-classes")
10115 "-Dtest.resources.dir=src/test/resources"
10116 "org.testng.TestNG" "src/test/resources/testng.xml"))))))
10118 `(("junit" ,java-junit)
10119 ("java-jsr305" ,java-jsr305)
10120 ("java-bsh" ,java-bsh)
10121 ("java-jcommander" ,java-jcommander)
10122 ("java-guice" ,java-guice)
10123 ("snakeyaml" ,java-snakeyaml)))
10125 `(("guava" ,java-guava)
10126 ("java-javax-inject" ,java-javax-inject)
10127 ("java-hamcrest" ,java-hamcrest-all)
10128 ("java-assertj" ,java-assertj)
10129 ("java-mockito" ,java-mockito-1)
10130 ("cglib" ,java-cglib)
10132 ("aopalliance" ,java-aopalliance)))
10133 (home-page "https://testng.org")
10134 (synopsis "Testing framework")
10135 (description "TestNG is a testing framework inspired from JUnit and NUnit
10136 but introducing some new functionalities that make it more powerful and easier
10138 (license license:asl2.0)))
10140 (define-public java-jnacl
10141 (let ((commit "094e819afdd63ea81a499b3bcb42a271006bebd9")
10144 (name "java-jnacl")
10145 (version (string-append "0.1.0-" revision "." (string-take commit 7)))
10148 (uri (git-reference
10149 (url "https://github.com/neilalexander/jnacl")
10151 (file-name (git-file-name name version))
10154 "1d6g6xhn83byv5943n7935wwjsk0ibk0qdvqgr699qqgqqmwisbb"))))
10155 (build-system ant-build-system)
10157 `(#:jar-name "jnacl.jar"
10158 #:source-dir "src/main/java"
10161 (modify-phases %standard-phases
10162 (add-before 'build 'fix-tests
10164 (substitute* '("src/test/java/com/neilalexander/jnacl/NaClTest.java"
10165 "src/test/java/com/neilalexander/jnacl/NaclSecretBoxTest.java")
10166 (("assertions.Assertions") "assertions.api.Assertions"))
10170 (invoke "ant" "compile-tests")
10171 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
10173 ":build/test-classes")
10174 "org.testng.TestNG" "-testclass"
10175 "build/test-classes/com/neilalexander/jnacl/NaclSecretBoxTest.class")
10176 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
10178 ":build/test-classes")
10179 "org.testng.TestNG" "-testclass"
10180 "build/test-classes/com/neilalexander/jnacl/NaClTest.class"))))))
10182 `(("java-testng" ,java-testng)
10183 ("java-fest-util" ,java-fest-util)
10184 ("java-fest-assert" ,java-fest-assert)))
10185 (home-page "https://github.com/neilalexander/jnacl")
10186 (synopsis "Java implementation of NaCl")
10187 (description "Pure Java implementation of the NaCl: Networking and
10188 Cryptography library.")
10189 (license license:bsd-2))))
10191 (define-public java-mvel2
10193 (name "java-mvel2")
10197 (uri (string-append "https://github.com/mvel/mvel/archive/mvel2-"
10198 version ".Final.tar.gz"))
10201 "01ph5s9gm16l2qz58lg21w6fna7xmmrj7f9bzqr1jim7h9557d3z"))))
10202 (build-system ant-build-system)
10204 `(#:jar-name "mvel2.jar"
10205 #:source-dir "src/main/java"
10207 (list "**/Abstract*.java"
10208 ;; Base class with no tests
10209 "**/MVELThreadTest.java")
10211 (modify-phases %standard-phases
10212 (add-after 'install 'install-bin
10213 (lambda* (#:key outputs #:allow-other-keys)
10214 (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
10216 (with-output-to-file (string-append bin "/mvel2")
10220 "#!" (which "bash") "\n"
10221 "if [ \"$#\" -ne \"2\" ]; then\n"
10222 "echo 'Usage: mvel2 <script> <out.dir>'\n"
10225 "java -Dout.dir=$2 -cp " (getenv "CLASSPATH")
10226 ":" (assoc-ref outputs "out") "/share/java/mvel2.jar"
10227 " org.mvel2.sh.Main $1"))))
10228 (chmod (string-append bin "/mvel2") #o755))
10231 `(("junit" ,java-junit)
10232 ("hamcrest" ,java-hamcrest-core)))
10233 (home-page "https://github.com/mvel/mvel")
10234 (synopsis "MVFLEX Expression Language")
10235 (description "MVEL has largely been inspired by Java syntax, but has some
10236 fundamental differences aimed at making it more efficient as an expression
10237 language, such as operators that directly support collection, array and string
10238 matching, as well as regular expressions. MVEL is used to evaluate expressions
10239 written using Java syntax.
10241 In addition to the expression language, MVEL serves as a templating language for
10242 configuration and string construction.")
10243 (license license:asl2.0)))
10245 (define-public java-commons-jexl-2
10247 (name "java-commons-jexl")
10251 (uri (string-append "mirror://apache/commons/jexl/source/"
10252 "commons-jexl-" version "-src.tar.gz"))
10255 "1ai7632bwwaxglb0nbpblpr2jw5g20afrsaq372ipkphi3ncy1jz"))))
10256 (build-system ant-build-system)
10258 `(#:jar-name "commons-jexl-2.jar"
10260 #:source-dir "src/main/java"
10262 (modify-phases %standard-phases
10263 (add-before 'check 'disable-broken-tests
10264 (lambda* (#:key inputs #:allow-other-keys)
10265 (with-directory-excursion "src/test/java/org/apache/commons/jexl2/"
10266 (substitute* "ArithmeticTest.java"
10267 (("asserter.assertExpression\\(\"3 / 0\"") "//")
10268 (("asserter.assertExpression\\(\"imanull") "//"))
10269 ;; This test fails with "ambiguous method invocation"
10270 (delete-file "CacheTest.java")
10271 ;; This test doesn't have access to the temp directory
10272 (substitute* "ClassCreatorTest.java"
10273 (("java.io.tmpdir") "user.dir"))
10274 ;; This test fails in trying to detect whether it can run.
10275 (substitute* "ClassCreator.java"
10276 (("boolean canRun =.*") "boolean canRun = false;\n"))
10277 ;; ...and these tests depend on it.
10278 (delete-file "scripting/JexlScriptEngineOptionalTest.java")
10279 (delete-file "scripting/JexlScriptEngineTest.java"))
10281 (add-before 'build 'run-javacc
10283 (with-directory-excursion "src/main/java/org/apache/commons/jexl2/parser/"
10284 (invoke "java" "jjtree" "Parser.jjt")
10285 (invoke "java" "javacc" "Parser.jj"))
10288 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)))
10290 `(("java-junit" ,java-junit)
10291 ("java-hamcrest-core" ,java-hamcrest-core)
10292 ("javacc" ,javacc-4)))
10293 (home-page "https://commons.apache.org/proper/commons-jexl/")
10294 (synopsis "Java Expression Language ")
10295 (description "JEXL is a library intended to facilitate the implementation
10296 of dynamic and scripting features in applications and frameworks written in
10297 Java. JEXL implements an Expression Language based on some extensions to the
10298 JSTL Expression Language supporting most of the constructs seen in
10299 shell-script or ECMAScript. Its goal is to expose scripting features usable
10300 by technical operatives or consultants working with enterprise platforms.")
10301 (license license:asl2.0)))
10303 (define-public java-lz4
10309 (uri (git-reference
10310 (url "https://github.com/lz4/lz4-java")
10312 (file-name (git-file-name name version))
10315 "0ydjakhv3cz34mfvv14qrh2ksdxifgjwwagjy7r46qr3f68hnf6y"))))
10316 (build-system ant-build-system)
10318 `(#:jar-name "lz4.jar"
10320 #:source-dir "src/java:src/java-unsafe"
10321 #:tests? #f; FIXME: requires more dependencies
10323 (modify-phases %standard-phases
10324 (add-after 'unpack 'make-files-writable
10326 (for-each make-file-writable (find-files "."))
10328 (add-before 'configure 'generate-source
10330 (with-directory-excursion "src/build/source_templates"
10331 (invoke "mvel2" "../gen_sources.mvel" "../../java"))
10334 `(("mvel" ,java-mvel2)))
10335 (home-page "https://jpountz.github.io/lz4-java")
10336 (synopsis "Compression algorithm")
10337 (description "LZ4 - Java is a Java port of the popular lz4 compression
10338 algorithms and xxHash hashing algorithm.")
10339 (license license:asl2.0)))
10341 (define-public java-bouncycastle
10343 (name "java-bouncycastle")
10347 (uri (git-reference
10348 (url "http://git.bouncycastle.org/repositories/bc-java")
10349 ;(url "https://github.com/bcgit/bc-java")
10350 (commit (string-append "r1rv" (substring version 2 4)))))
10351 (file-name (git-file-name name version))
10354 "1m921a1ac2dl797ffzg3d4j97ch308f25spb4jgsj3npfmmys5gb"))
10355 (modules '((guix build utils)))
10358 (for-each delete-file
10359 (find-files "." "\\.jar$"))
10361 (build-system ant-build-system)
10366 (modify-phases %standard-phases
10369 (invoke "ant" "-f" "ant/jdk15+.xml" "build-provider")
10370 (invoke "ant" "-f" "ant/jdk15+.xml" "build")))
10371 ;; FIXME: the tests freeze.
10374 ;; (invoke "ant" "-f" "ant/jdk15+.xml" "test")))
10376 (install-jars "build/artifacts/jdk1.5/jars")))))
10378 `(("java-javax-mail" ,java-javax-mail)))
10381 ("junit" ,java-junit)
10382 ("java-native-access" ,java-native-access)
10383 ("java-native-access-platform" ,java-native-access-platform)))
10384 (home-page "https://www.bouncycastle.org")
10385 (synopsis "Cryptographic library")
10386 (description "Bouncy Castle is a cryptographic library for the Java
10387 programming language.")
10388 (license license:expat)))
10390 (define-public java-lmax-disruptor
10392 (name "java-lmax-disruptor")
10396 (uri (string-append "https://github.com/LMAX-Exchange/disruptor/"
10397 "archive/" version ".tar.gz"))
10398 (file-name (string-append name "-" version ".tar.gz"))
10401 "17da2gwj5abnlsfgn2xqjk5lgzbg4vkb0hdv2dvc8r2fx4bi7w3g"))))
10402 (build-system ant-build-system)
10404 `(#:jar-name "java-lmax-disruptor.jar"
10406 #:tests? #f)); tests hang
10408 `(("junit" ,java-junit)
10409 ("java-hdrhistogram" ,java-hdrhistogram)
10410 ("java-jmock" ,java-jmock)
10411 ("java-jmock-legacy" ,java-jmock-legacy)
10412 ("java-jmock-junit4" ,java-jmock-junit4)
10413 ("java-hamcrest-all" ,java-hamcrest-all)))
10415 `(("cglib" ,java-cglib)
10416 ("objenesis" ,java-objenesis)
10417 ("asm" ,java-asm)))
10418 (home-page "https://www.lmax.com/disruptor")
10419 (synopsis "High performance inter-thread communication")
10420 (description "LMAX Disruptor is a software pattern and software component
10421 for high performance inter-thread communication that avoids the need for
10422 message queues or resource locking.")
10423 (license license:asl2.0)))
10425 (define-public java-commons-bcel
10427 (name "java-commons-bcel")
10431 (uri (string-append "mirror://apache/commons/bcel/source/bcel-"
10432 version "-src.tar.gz"))
10435 "0j3x1rxd673k07psclk8k13rqh0x0mf2yy5qiwkiw4z3afa568jy"))))
10436 (build-system ant-build-system)
10438 `(#:jar-name "bcel.jar"
10440 #:source-dir "src/main/java"
10441 #:test-dir "src/test/java"
10442 ;; FIXME: Tests require the unpackaged jna.
10444 (home-page "https://commons.apache.org/proper/commons-bcel/")
10445 (synopsis "Byte code engineering library")
10446 (description "The Byte Code Engineering Library (Apache Commons BCEL) is
10447 intended to give users a convenient way to analyze, create, and
10448 manipulate (binary) Java class files. Classes are represented by objects
10449 which contain all the symbolic information of the given class: methods, fields
10450 and byte code instructions, in particular.
10452 Such objects can be read from an existing file, be transformed by a
10453 program (e.g. a class loader at run-time) and written to a file again. An
10454 even more interesting application is the creation of classes from scratch at
10455 run-time. The @dfn{Byte Code Engineering Library} (BCEL) may be also useful
10456 if you want to learn about the @dfn{Java Virtual Machine} (JVM) and the format
10457 of Java @code{.class} files.")
10458 (license license:asl2.0)))
10460 (define-public java-xerial-core
10462 (name "java-xerial-core")
10466 (uri (string-append "https://github.com/xerial/xerial-java/archive/"
10467 version ".tar.gz"))
10468 (file-name (string-append name "-" version ".tar.gz"))
10471 "0d3g863i41bgalpa4xr3vm1h140l091n8iwgq5qvby5yivns9y8d"))))
10472 (build-system ant-build-system)
10474 `(#:jar-name "xerial-core.jar"
10475 #:source-dir "xerial-core/src/main/java"
10476 #:test-dir "xerial-core/src/test"
10478 (modify-phases %standard-phases
10479 (add-before 'build 'copy-resources
10481 (copy-recursively "xerial-core/src/main/resources"
10485 `(("junit" ,java-junit)
10486 ("hamcrest" ,java-hamcrest-core)))
10487 (home-page "https://github.com/xerial/xerial-java")
10488 (synopsis "Data management libraries for Java")
10489 (description "Xerial is a set of data management libraries for the Java
10490 programming language. The ultimate goal of the Xerial project is to manage
10491 everything as database, including class objects, text format data, data
10493 (license license:asl2.0)))
10495 (define-public java-powermock-reflect
10497 (name "java-powermock-reflect")
10501 (uri (string-append "https://github.com/powermock/powermock/"
10502 "archive/powermock-" version ".tar.gz"))
10503 (file-name (string-append name "-" version ".tar.gz"))
10506 "0sbgi5vqq7k72wzcdjb20s370vyd4hsbnx71pzb8ishml3gy7fwy"))
10508 (search-patches "java-powermock-fix-java-files.patch"))))
10509 (build-system ant-build-system)
10511 `(#:jar-name "java-powermock-reflect.jar"
10513 #:source-dir "powermock-reflect/src/main/java"
10514 #:test-dir "powermock-reflect/src/test"))
10516 `(("java-objenesis" ,java-objenesis)))
10518 `(("junit" ,java-junit)
10519 ("cglib" ,java-cglib)
10521 ("hamcrest" ,java-hamcrest-core)
10522 ("assertj" ,java-assertj)))
10523 (home-page "https://github.com/powermock/powermock")
10524 (synopsis "Mock library extension framework")
10525 (description "PowerMock is a framework that extends other mock libraries
10526 such as EasyMock with more powerful capabilities. PowerMock uses a custom
10527 classloader and bytecode manipulation to enable mocking of static methods,
10528 constructors, final classes and methods, private methods, removal of static
10529 initializers and more. By using a custom classloader no changes need to be
10530 done to the IDE or continuous integration servers which simplifies adoption.")
10531 (license license:asl2.0)))
10533 (define-public java-powermock-core
10535 (inherit java-powermock-reflect)
10536 (name "java-powermock-core")
10538 `(#:jar-name "java-powermock-core.jar"
10539 #:source-dir "powermock-core/src/main/java"
10540 #:test-dir "powermock-core/src/test"
10541 #:tests? #f; requires powermock-api
10544 (modify-phases %standard-phases
10545 (add-before 'build 'copy-resources
10547 (copy-recursively "powermock-core/src/main/resources"
10551 `(("reflect" ,java-powermock-reflect)
10552 ("javassist" ,java-jboss-javassist)))
10554 `(("junit" ,java-junit)
10555 ("assertj" ,java-assertj)
10556 ("mockito" ,java-mockito-1)))))
10558 (define-public java-powermock-api-support
10560 (inherit java-powermock-reflect)
10561 (name "java-powermock-api-support")
10562 (build-system ant-build-system)
10564 `(#:jar-name "java-powermock-api-support.jar"
10566 #:source-dir "powermock-api/powermock-api-support/src/main/java"
10567 #:tests? #f)); no tests
10569 `(("core" ,java-powermock-core)
10570 ("reflect" ,java-powermock-reflect)))))
10572 (define-public java-powermock-modules-junit4-common
10574 (inherit java-powermock-reflect)
10575 (name "java-powermock-modules-junit4-common")
10576 (build-system ant-build-system)
10578 `(#:jar-name "java-powermock-modules-junit4-common.jar"
10580 #:source-dir "powermock-modules/powermock-module-junit4-common/src/main/java"
10581 #:test-dir "powermock-modules/powermock-module-junit4-common/src/test"))
10583 `(("core" ,java-powermock-core)
10584 ("easymock" ,java-easymock)
10585 ("reflect" ,java-powermock-reflect)
10586 ("hamcrest" ,java-hamcrest-core)
10587 ("cglib" ,java-cglib)))))
10589 (define-public java-powermock-modules-junit4
10591 (inherit java-powermock-reflect)
10592 (name "java-powermock-modules-junit4")
10593 (build-system ant-build-system)
10595 `(#:jar-name "java-powermock-modules-junit4.jar"
10597 #:source-dir "powermock-modules/powermock-module-junit4/src/main/java"
10598 #:test-dir "powermock-modules/powermock-module-junit4/src/test"
10600 (modify-phases %standard-phases
10601 (add-before 'build 'fix-junit-detection
10603 ;; Our junit version is 4.12-SNAPSHOT
10604 (substitute* (find-files "powermock-modules/powermock-module-junit4"
10605 "PowerMockJUnit4MethodValidator.java")
10606 (("4.12") "4.12-SNAPSHOT"))
10609 `(("core" ,java-powermock-core)
10610 ("reflect" ,java-powermock-reflect)
10611 ("common" ,java-powermock-modules-junit4-common)
10612 ("cglib" ,java-cglib)))
10614 `(("easymock" ,java-easymock)
10615 ("hamcrest" ,java-hamcrest-core)
10616 ("objenesis" ,java-objenesis)
10618 ("junit" ,java-junit)))))
10620 (define-public java-powermock-api-easymock
10622 (inherit java-powermock-reflect)
10623 (name "java-powermock-api-easymock")
10624 (build-system ant-build-system)
10626 `(#:jar-name "java-powermock-api-easymock.jar"
10628 #:source-dir "powermock-api/powermock-api-easymock/src/main/java"
10629 #:tests? #f; no tests
10631 (modify-phases %standard-phases
10632 (add-before 'build 'fix-file
10634 ;; FIXME: This looks wrong, but it fixes a build error.
10635 (with-directory-excursion "powermock-api/powermock-api-easymock"
10636 (substitute* "src/main/java/org/powermock/api/easymock/PowerMock.java"
10637 (("classLoader instanceof MockClassLoader") "false")
10638 (("\\(\\(MockClassLoader\\) classLoader\\).*;") ";")))
10641 `(("core" ,java-powermock-core)
10642 ("easymock" ,java-easymock)
10643 ("reflect" ,java-powermock-reflect)
10644 ("support" ,java-powermock-api-support)
10645 ("cglib" ,java-cglib)))))
10647 (define-public java-jboss-jms-api-spec
10649 (name "java-jboss-jms-api-spec")
10653 (uri (string-append "https://github.com/jboss/jboss-jms-api_spec/"
10654 "archive/jboss-jms-api_" version
10655 "_spec-1.0.1.Final.tar.gz"))
10658 "07bqblw9kq2i8q92bz70fvavq5xjfkaixl8xa0m0cypjgy82rb7m"))))
10659 (build-system ant-build-system)
10661 `(#:jar-name "java-jboss-jms-api_spec.jar"
10664 #:tests? #f)); no tests
10665 (home-page "https://github.com/jboss/jboss-jms-api_spec")
10666 (synopsis "Java Message Service API specification")
10667 (description "Java Message Service (JMS) API is used to send messages
10668 messages between two or more clients. It is a messaging standard that allows
10669 application components to create, send, receive, and read messages.")
10670 ; either gpl2 only with GPL Classpath Exception, or cddl.
10671 (license (list license:gpl2 license:cddl1.0))))
10673 (define-public java-mail
10679 (uri (string-append "https://github.com/javaee/javamail/archive/"
10680 "JAVAMAIL-1_6_0.tar.gz"))
10683 "1b4rg7fpj50ld90a71iz2m4gm3f5cnw18p3q3rbrrryjip46kx92"))))
10684 (build-system ant-build-system)
10686 `(#:jar-name "java-mail.jar"
10688 #:source-dir "mail/src/main/java"
10689 #:test-dir "mail/src/test"
10691 (list "**/CollectorFormatterTest.java"
10692 "**/CompactFormatterTest.java"
10693 "**/DurationFilterTest.java"
10694 "**/MailHandlerTest.java"
10695 "**/GetLocalAddressTest.java"
10696 ;; FIXME: both end with:
10697 ;; java.lang.ClassNotFoundException:
10698 ;; javax.mail.internet.MimeMultipartParseTest
10699 "**/MimeMultipartParseTest.java"
10700 "**/SearchTermSerializationTest.java")
10702 (modify-phases %standard-phases
10703 (add-before 'configure 'move-version.java
10705 (copy-file "mail/src/main/resources/javax/mail/Version.java"
10706 "mail/src/main/java/javax/mail/Version.java")
10708 (add-before 'build 'copy-resources
10710 (copy-recursively "mail/src/main/resources/META-INF"
10711 "build/classes/META-INF")
10714 `(("junit" ,java-junit)
10715 ("hamcrest" ,java-hamcrest-core)))
10716 (home-page "https://javaee.github.io/javamail/")
10717 (synopsis "Mail-related functionnalities in Java")
10718 (description "The JavaMail API provides a platform-independent and
10719 protocol-independent framework to build mail and messaging applications.")
10720 ;; General Public License Version 2 only ("GPL") or the Common Development
10721 ;; and Distribution License("CDDL")
10722 (license (list license:cddl1.1
10723 license:gpl2)))); with classpath exception
10725 (define-public java-jeromq
10727 (name "java-jeromq")
10731 (uri (git-reference
10732 (url "https://github.com/zeromq/jeromq")
10733 (commit (string-append "v" version))))
10734 (file-name (string-append name "-" version "-checkout"))
10737 "1gxkp7lv2ahymgrqdw94ncq54bmp4m4sw5m1x9gkp7l5bxn0xsyj"))
10738 (patches (search-patches "java-jeromq-fix-tests.patch"))))
10739 (build-system ant-build-system)
10741 `(#:jar-name "java-jeromq.jar"
10742 #:source-dir "src/main/java"
10746 "**/Abstract*.java"
10747 ;; Requires network
10748 "**/ZBeaconTest.java"
10750 "**/DealerSpecTest.java"
10751 "**/CustomDecoderTest.java"
10752 "**/CustomEncoderTest.java"
10753 "**/ConnectRidTest.java"
10754 "**/ReqSpecTest.java"
10755 "**/PushPullSpecTest.java"
10756 "**/PubSubHwmTest.java"
10757 "**/RouterSpecTest.java"
10758 "**/ProxyTest.java")))
10760 `(("java-jnacl" ,java-jnacl)))
10762 `(("java-hamcrest-core" ,java-hamcrest-core)
10763 ("junit" ,java-junit)))
10764 (home-page "http://zeromq.org/bindings:java")
10765 (synopsis "Java binding for 0MQ")
10766 (description "Jeromq provides the java bindings for 0MQ.")
10767 (license license:mpl2.0)))
10769 (define-public java-kafka-clients
10771 (name "java-kafka-clients")
10775 (uri (string-append "mirror://apache/kafka/" version "/kafka-"
10776 version "-src.tgz"))
10779 "1yxmnsmliwm7671q5yy9bl4jdqyyn00n26cggz9brwczx80w1vfq"))))
10780 (build-system ant-build-system)
10782 `(#:jar-name "java-kafka-clients.jar"
10784 #:source-dir "clients/src/main/java"
10785 #:test-dir "clients/src/test"
10788 ;; This file does not contain a class
10789 "**/IntegrationTest.java"
10790 ;; Requires network
10791 "**/ClientUtilsTest.java"
10792 ;; End with errors that seem related to our powermock
10793 "**/KafkaProducerTest.java"
10794 "**/BufferPoolTest.java")))
10796 `(("java-slf4j-api" ,java-slf4j-api)
10797 ("java-lz4" ,java-lz4)))
10799 `(("junit" ,java-junit)
10800 ("hamcrest" ,java-hamcrest-all)
10801 ("objenesis" ,java-objenesis)
10803 ("cglib" ,java-cglib)
10804 ("javassist" ,java-jboss-javassist)
10805 ("snappy" ,java-snappy)
10806 ("easymock" ,java-easymock)
10807 ("powermock" ,java-powermock-core)
10808 ("powermock-easymock" ,java-powermock-api-easymock)
10809 ("powermock-junit4-common" ,java-powermock-modules-junit4-common)
10810 ("powermock-junit4" ,java-powermock-modules-junit4)
10811 ("powermock-support" ,java-powermock-api-support)
10812 ("java-bouncycastle" ,java-bouncycastle)))
10813 (home-page "https://kafka.apache.org")
10814 (synopsis "Distributed streaming platform")
10815 (description "Kafka is a distributed streaming platform, which means:
10817 @item it can publish and subscribe to streams of records;
10818 @item it can store streams of records in a fault-tolerant way;
10819 @item it can process streams of records as they occur.
10821 ;; Either cddl or gpl2 only.
10822 (license (list license:cddl1.1; actually cddl1.1
10823 license:gpl2)))); with classpath exception
10825 (define-public java-jdom
10831 (uri (string-append "http://jdom.org/dist/binary/archive/jdom-"
10832 version ".tar.gz"))
10835 "07wdpm3jwwc9q38kmdw40fvbmv6jzjrkrf8m0zqs58f79a672wfl"))))
10836 (build-system ant-build-system)
10838 `(#:build-target "package"
10839 #:tests? #f; tests are run as part of the build process
10841 (modify-phases %standard-phases
10843 (install-jars "build")))))
10844 (home-page "http://jdom.org/")
10845 (synopsis "Access, manipulate, and output XML data")
10846 (description "Java-based solution for accessing, manipulating, and
10847 outputting XML data from Java code.")
10848 (license license:bsd-4)))
10850 (define-public java-geronimo-xbean-reflect
10852 (name "java-geronimo-xbean-reflect")
10856 (uri (svn-reference
10857 (url "https://svn.apache.org/repos/asf/geronimo/xbean/tags/xbean-4.5/")
10858 (revision 1807396)))
10859 (file-name (string-append name "-" version))
10862 "18q3i6jgm6rkw8aysfgihgywrdc5nvijrwnslmi3ww497jvri6ja"))))
10863 (build-system ant-build-system)
10865 `(#:jar-name "geronimo-xbean-reflect.jar"
10866 #:source-dir "xbean-reflect/src/main/java"
10867 #:test-dir "xbean-reflect/src/test"
10870 (list "**/Abstract*.java" "**/AsmParameterNameLoaderTest.java"
10871 "**/ObjectRecipeTest.java" "**/ParameterNameLoaderTest.java"
10872 "**/RecipeHelperTest.java" "**/XbeanAsmParameterNameLoaderTest.java")
10874 (modify-phases %standard-phases
10875 (add-before 'build 'fix-source
10877 (let ((dir "xbean-reflect/src/main/java/org/apache/xbean/recipe/"))
10878 ;; org.apache.xbean.asm6 is actually repackaged java-asm
10879 (substitute* (string-append dir "XbeanAsmParameterNameLoader.java")
10880 (("org.apache.xbean.asm5") "org.objectweb.asm"))
10882 (replace 'install (install-from-pom "xbean-reflect/pom.xml")))))
10884 `(("asm" ,java-asm)
10885 ("log4j" ,java-log4j-api)
10886 ("log4j-1.2" ,java-log4j-1.2-api)
10887 ("log4j-core" ,java-log4j-core)
10888 ("logging" ,java-commons-logging-minimal)))
10890 `(("java-geronimo-parent-pom" ,java-geronimo-parent-pom)))
10892 `(("junit" ,java-junit)))
10893 (home-page "https://geronimo.apache.org/maven/xbean/3.6/xbean-reflect/")
10894 (synopsis "Dependency injection helper")
10895 (description "Xbean-reflect provides very flexible ways to create objects
10896 and graphs of objects for dependency injection frameworks")
10897 (license license:asl2.0)))
10899 (define java-geronimo-genesis-2.1
10901 (name "java-geronimo-genesis")
10905 (uri (svn-reference
10906 (url (string-append "https://svn.apache.org/repos/asf/"
10907 "geronimo/genesis/tags/genesis-"
10909 (revision 1807396)))
10910 (file-name (string-append name "-" version "-source"))
10913 "119yn795jvnjf52si84q192s8wag1k013iabg78b7wnadssnnh31"))))
10914 (build-system ant-build-system)
10918 (modify-phases %standard-phases
10919 (delete 'configure)
10922 (install-pom-file "pom.xml"))
10923 (add-after 'install 'install-enforcer-rules
10924 (install-pom-file "genesis-enforcer-rules/pom.xml"))
10925 (add-after 'install 'install-flava
10926 (install-pom-file "genesis-default-flava/pom.xml"))
10927 (add-after 'install 'install-packaging
10928 (install-pom-file "genesis-packaging/pom.xml"))
10929 (add-after 'install-flava 'install-flava-java4
10930 (install-pom-file "genesis-default-flava/genesis-java1.4-flava/pom.xml"))
10931 (add-after 'install-flava 'install-flava-java5
10932 (install-pom-file "genesis-default-flava/genesis-java5-flava/pom.xml"))
10933 (add-after 'install-flava 'install-flava-java6
10934 (install-pom-file "genesis-default-flava/genesis-java6-flava/pom.xml")))))
10936 `(("apache-parent-pom" ,apache-parent-pom-13)))
10937 (home-page "https://geronimo.apache.org")
10938 (synopsis "Collection of maven POM files for the Geronimo project")
10939 (description "Apache Geronimo is a server runtime. This package contains
10940 only pom files used by other components in the Geronimo project.")
10941 (license license:asl2.0)))
10943 (define java-geronimo-parent-pom
10945 (inherit java-geronimo-xbean-reflect)
10946 (name "java-geronimo-parent-pom")
10950 (modify-phases %standard-phases
10951 (delete 'configure)
10954 (install-pom-file "pom.xml")))))
10956 `(("java-geronimo-genesis" ,java-geronimo-genesis-2.1)))))
10958 (define-public java-geronimo-xbean-bundleutils
10960 (inherit java-geronimo-xbean-reflect)
10961 (name "java-geronimo-xbean-bundleutils")
10963 `(#:jar-name "geronimo-xbean-bundleutils.jar"
10964 #:source-dir "xbean-bundleutils/src/main/java"
10965 #:test-dir "xbean-bundleutils/src/test"
10967 (modify-phases %standard-phases
10968 (add-before 'build 'fix-java
10970 ;; We use a more recent version of osgi, so this file requires
10971 ;; more interface method implementations.
10972 (substitute* "xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/DelegatingBundleContext.java"
10973 (("import org.osgi.framework.ServiceRegistration;")
10974 "import org.osgi.framework.ServiceRegistration;
10975 import org.osgi.framework.ServiceFactory;
10976 import java.util.Collection;
10977 import org.osgi.framework.ServiceObjects;")
10978 (("public Bundle getBundle\\(\\)")
10980 public <S> ServiceObjects<S> getServiceObjects(ServiceReference<S> reference) {
10981 throw new UnsupportedOperationException();
10984 public <S> ServiceRegistration<S> registerService(Class<S> clazz,
10985 ServiceFactory<S> factory, Dictionary<String, ?> properties) {
10986 throw new UnsupportedOperationException();
10988 public Bundle getBundle()"))
10991 `(("java-slf4j" ,java-slf4j-api)
10992 ("java-asm" ,java-asm)
10993 ("java-osgi-framework" ,java-osgi-framework)
10994 ("java-eclipse-osgi" ,java-eclipse-osgi)
10995 ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin)))))
10997 (define-public java-geronimo-xbean-asm-util
10999 (inherit java-geronimo-xbean-reflect)
11000 (name "java-geronimo-xbean-asm-util")
11002 `(#:jar-name "geronimo-xbean-asm-util.jar"
11003 #:source-dir "xbean-asm-util/src/main/java"
11004 #:tests? #f)); no tests
11006 `(("java-asm" ,java-asm)))
11007 (native-inputs '())))
11009 (define-public java-geronimo-xbean-finder
11011 (inherit java-geronimo-xbean-reflect)
11012 (name "java-geronimo-xbean-finder")
11014 `(#:jar-name "geronimo-xbean-finder.jar"
11015 #:source-dir "xbean-finder/src/main/java"
11016 #:test-dir "xbean-finder/src/test"))
11018 `(("java-slf4j-api" ,java-slf4j-api)
11019 ("java-asm" ,java-asm)
11020 ("java-geronimo-xbean-bundleutils" ,java-geronimo-xbean-bundleutils)
11021 ("java-geronimo-xbean-asm-util" ,java-geronimo-xbean-asm-util)
11022 ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin)
11023 ("java-osgi-framework" ,java-osgi-framework)))
11025 `(("java-junit" ,java-junit)
11026 ("java-hamcrest-core" ,java-hamcrest-core)))))
11028 (define-public java-gson
11034 (uri (string-append "https://github.com/google/gson/archive/"
11035 "gson-parent-" version ".tar.gz"))
11038 "1j4qnp7v046q0k48c4kyf69sxaasx2h949d3cqwsm3kzxms3x0f9"))))
11039 (build-system ant-build-system)
11041 `(#:jar-name "gson.jar"
11042 #:source-dir "gson/src/main/java"
11043 #:test-dir "gson/src/test"))
11045 `(("java-junit" ,java-junit)
11046 ("java-hamcrest-core" ,java-hamcrest-core)))
11047 (home-page "https://github.com/google/gson")
11048 (synopsis "Java serialization/deserialization library from/to JSON")
11049 (description "Gson is a Java library that can be used to convert Java
11050 Objects into their JSON representation. It can also be used to convert a JSON
11051 string to an equivalent Java object. Gson can work with arbitrary Java objects
11052 including pre-existing objects that you do not have source-code of.")
11053 (license license:asl2.0)))
11055 (define-public java-hawtjni
11057 (name "java-hawtjni")
11061 (uri (string-append "https://github.com/fusesource/hawtjni/archive/"
11062 "hawtjni-project-" version ".tar.gz"))
11065 "1bqfd732rmh6svyx17fpw9175gc9gzkcbyps2yyrf50c3zzjas6g"))))
11066 (build-system ant-build-system)
11068 `(#:jar-name "hawtjni.jar"
11069 #:source-dir "hawtjni-generator/src/main/java:hawtjni-runtime/src/main/java"
11070 #:tests? #f; no tests
11072 (modify-phases %standard-phases
11073 (add-before 'build 'build-native
11074 (lambda* (#:key inputs #:allow-other-keys)
11075 (let ((include (string-append "-I" (assoc-ref inputs "jdk") "/include/linux")))
11076 (with-directory-excursion "hawtjni-generator/src/main/resources/"
11077 (invoke "gcc" "-c" "hawtjni.c" "-o" "hawtjni.o"
11078 "-fPIC" "-O2" include)
11079 (invoke "gcc" "-c" "hawtjni-callback.c" "-o" "hawtjni-callback.o"
11080 "-fPIC" "-O2" include)
11081 (invoke "gcc" "-o" "libhawtjni.so" "-shared"
11082 "hawtjni.o" "hawtjni-callback.o")))
11084 (add-after 'install 'install-native
11085 (lambda* (#:key outputs #:allow-other-keys)
11086 (let* ((out (assoc-ref outputs "out"))
11087 (lib (string-append out "/lib"))
11088 (inc (string-append out "/include")))
11089 (with-directory-excursion "hawtjni-generator/src/main/resources/"
11090 (install-file "libhawtjni.so" lib)
11091 (install-file "hawtjni.h" inc)))
11093 (add-before 'install 'install-parent
11094 (install-pom-file "pom.xml"))
11096 (install-from-pom "hawtjni-runtime/pom.xml")))))
11098 `(("java-commons-cli" ,java-commons-cli)
11099 ("java-asm" ,java-asm)
11100 ("java-geronimo-xbean-finder" ,java-geronimo-xbean-finder)))
11101 (home-page "https://fusesource.github.io/hawtjni/")
11102 (synopsis "JNI code generator")
11103 (description "HawtJNI is a code generator that produces the JNI code needed
11104 to implement Java native methods. It is based on the jnigen code generator
11105 that is part of the SWT Tools project.")
11106 (license license:asl2.0)))
11108 (define-public java-jansi-native
11110 (name "java-jansi-native")
11114 (uri (string-append "https://github.com/fusesource/jansi-native/"
11115 "archive/jansi-native-" version ".tar.gz"))
11118 "0j2ydlgxbzbgshqkwghbxxxnbnx1mmjgd6k5fw6xfvxw1z956yqf"))))
11119 (build-system ant-build-system)
11121 `(#:jar-name "jansi-native.jar"
11122 #:source-dir "src/main/java"
11123 #:tests? #f; no tests
11125 (modify-phases %standard-phases
11126 (add-before 'build 'build-native
11127 (lambda* (#:key inputs #:allow-other-keys)
11128 ;; there are more required files for windows in windows/
11129 (with-directory-excursion "src/main/native-package/src"
11130 (substitute* "jansi_ttyname.c"
11131 (("#include \"jansi_.*") ""))
11132 (invoke "gcc" "-c" "jansi_ttyname.c" "-o" "jansi_ttyname.o"
11133 (string-append "-I" (assoc-ref inputs "java-hawtjni")
11135 (string-append "-I" (assoc-ref inputs "jdk")
11138 (invoke "gcc" "-o" "libjansi.so" "-shared" "jansi_ttyname.o"))))
11139 (add-before 'build 'install-native
11141 (let ((dir (string-append "build/classes/META-INF/native/"
11142 ,(match (%current-system)
11143 ((or "i686-linux" "armhf-linux")
11145 ((or "x86_64-linux" "aarch64-linux"
11148 (_ "unknown-kernel")))))
11149 (install-file "src/main/native-package/src/libjansi.so" dir))
11151 (add-after 'install 'install-native
11152 (lambda* (#:key outputs #:allow-other-keys)
11153 (install-file "src/main/native-package/src/jansi.h"
11154 (string-append (assoc-ref outputs "out") "/include"))
11156 (add-before 'install 'fix-pom
11158 ;; pom contains variables to complete name, but we don't support that
11159 (substitute* "pom.xml"
11160 (("\\$\\{platform\\}") "native"))
11163 (install-from-pom "pom.xml")))))
11165 `(("java-hawtjni" ,java-hawtjni)))
11166 (home-page "https://fusesource.github.io/jansi/")
11167 (synopsis "Native library for jansi")
11168 (description "This package provides the native library for jansi, a small
11169 Java library that allows you to use ANSI escape sequences to format your
11171 (license license:asl2.0)))
11173 (define-public java-jansi
11175 (name "java-jansi")
11179 (uri (string-append "https://github.com/fusesource/jansi/archive/"
11180 "jansi-project-" version ".tar.gz"))
11183 "11kh3144i3fzp21dpy8zg52mjmsr214k7km9p8ly0rqk2px0qq2z"))))
11184 (build-system ant-build-system)
11186 `(#:jar-name "jansi.jar"
11187 #:source-dir "jansi/src/main/java"
11188 #:test-dir "jansi/src/test"
11190 (modify-phases %standard-phases
11191 (add-after 'check 'clear-term
11193 (invoke "echo" "-e" "\\e[0m")))
11194 (add-before 'install 'install-parent
11195 (install-pom-file "pom.xml"))
11196 (add-before 'install 'fix-pom
11198 ;; pom adds jansi native versions for different platforms, but we
11199 ;; only need one, so use native instead
11200 (substitute* "jansi/pom.xml"
11201 (("windows32") "native")
11202 (("windows64") "native")
11204 (("linux32") "native")
11205 (("linux64") "native")
11206 (("freebsd32") "native")
11207 (("freebsd64") "native"))
11210 (install-from-pom "jansi/pom.xml")))))
11212 `(("java-jansi-native" ,java-jansi-native)))
11214 `(("java-junit" ,java-junit)
11215 ("java-hamcrest-core" ,java-hamcrest-core)))
11216 (home-page "https://fusesource.github.io/jansi/")
11217 (synopsis "Portable ANSI escape sequences")
11218 (description "Jansi is a Java library that allows you to use ANSI escape
11219 sequences to format your console output which works on every platform.")
11220 (license license:asl2.0)))
11222 (define-public java-jboss-el-api-spec
11224 (name "java-jboss-el-api-spec")
11228 (uri (string-append "https://github.com/jboss/jboss-el-api_spec/"
11229 "archive/jboss-el-api_" version
11230 "_spec-1.0.7.Final.tar.gz"))
11233 "1j45ljxalwlibxl7g7iv952sjxkw275m8vyxxij8l6wdd5pf0pdh"))))
11234 (build-system ant-build-system)
11236 `(#:jar-name "java-jboss-el-api_spec.jar"
11237 #:modules ((guix build ant-build-system)
11239 (guix build maven pom)
11240 (guix build java-utils)
11243 (modify-phases %standard-phases
11244 ;; the origin of javax.el:javax.el-api is unknown, so we use this package
11245 ;; instead, which implements the same thing. We override the pom file
11246 ;; to "rename" the package so it can be found by maven.
11247 (add-before 'install 'override-pom
11249 (delete-file "pom.xml")
11250 (with-output-to-file "pom.xml"
11254 (modelVersion "4.0.0")
11256 (groupId "javax.el")
11257 (artifactId "javax.el-api")
11258 (version "3.0")))))
11261 (install-from-pom "pom.xml")))))
11263 `(("java-junit" ,java-junit)))
11264 (home-page "https://github.com/jboss/jboss-el-api_spec")
11265 (synopsis "JSR-341 expression language 3.0 API")
11266 (description "This package contains an implementation of the JSR-341
11267 specification for the expression language 3.0. It implements an expression
11268 language inspired by ECMAScript and XPath. This language is used with
11269 JavaServer Pages (JSP).")
11270 ;; Either GPL2 only or CDDL.
11271 (license (list license:gpl2 license:cddl1.1))))
11273 (define-public java-jboss-interceptors-api-spec
11275 (name "java-jboss-interceptors-api-spec")
11279 (uri (string-append "https://github.com/jboss/jboss-interceptors-api_spec/"
11280 "archive/jboss-interceptors-api_" version
11281 "_spec-1.0.0.Final.tar.gz"))
11284 "0wv8x0jp9a5qxlrgkhb5jdk2gr6vi87b4j4kjb8ryxiy9gn8g51z"))))
11285 (build-system ant-build-system)
11287 `(#:jar-name "java-jboss-interceptors-api_spec.jar"
11290 #:tests? #f; no tests
11291 #:modules ((guix build ant-build-system)
11293 (guix build maven pom)
11294 (guix build java-utils)
11297 (modify-phases %standard-phases
11298 ;; the origin of javax.interceptor:javax.interceptor-api is unknown,
11299 ;; so we use this package instead, which implements the same thing.
11300 ;; We override the pom file to "rename" the package so it can be found
11302 (add-before 'install 'override-pom
11304 (delete-file "pom.xml")
11305 (with-output-to-file "pom.xml"
11309 (modelVersion "4.0.0")
11310 (name "interceptor-api")
11311 (groupId "javax.interceptor")
11312 (artifactId "javax.interceptor-api")
11313 (version "3.0")))))
11316 (install-from-pom "pom.xml")))))
11317 (home-page "https://github.com/jboss/jboss-interceptors-api_spec")
11318 (synopsis "Interceptors 1.2 API classes from JSR 318")
11319 (description "Java-jboss-interceptors-api-spec implements the Interceptors
11320 API. Interceptors are used to interpose on business method invocations and
11322 ;; Either GPL2 only or CDDL.
11323 (license (list license:gpl2 license:cddl1.1))))
11325 (define-public java-cdi-api
11327 (name "java-cdi-api")
11331 (uri (string-append "https://github.com/cdi-spec/cdi/archive/"
11332 version ".tar.gz"))
11333 (file-name (string-append name "-" version ".tar.gz"))
11336 "1iv8b8bp07c5kmqic14jsr868vycjv4qv02lf3pkgp9z21mnfg5y"))))
11337 (build-system ant-build-system)
11339 `(#:source-dir "api/src/main/java"
11340 #:jar-name "java-cdi-api.jar"
11341 #:test-dir "api/src/test"
11343 #:tests? #f; Tests fail because we don't have a CDI provider yet
11345 (modify-phases %standard-phases
11347 (install-from-pom "api/pom.xml")))))
11349 `(("java-javax-inject" ,java-javax-inject)
11350 ("java-jboss-el-api-spec" ,java-jboss-el-api-spec)
11351 ("java-jboss-interceptors-api-spec" ,java-jboss-interceptors-api-spec)
11352 ("java-weld-parent-pom" ,java-weld-parent-pom)))
11354 `(("java-testng" ,java-testng)
11355 ("java-hamcrest-core" ,java-hamcrest-core)))
11356 (home-page "http://cdi-spec.org/")
11357 (synopsis "Contexts and Dependency Injection APIs")
11358 (description "Java-cdi-api contains the required APIs for Contexts and
11359 Dependency Injection (CDI).")
11360 (license license:asl2.0)))
11362 (define-public java-joda-convert
11364 (name "java-joda-convert")
11368 (uri (string-append "https://github.com/JodaOrg/joda-convert/archive/v"
11369 version ".tar.gz"))
11370 (file-name (string-append name "-" version ".tar.gz"))
11373 "0vp346xz7dh9br4q7xazhc7hvzf76a6hf95fki9bg67q5jr0kjh7"))))
11374 (build-system ant-build-system)
11376 `(#:jar-name (string-append ,name "-" ,version ".jar")
11377 #:source-dir "src/main/java"
11378 #:test-include (list "**/Test*.java")
11379 ;; Contains only interfaces and base classes (no test)
11380 #:test-exclude (list "**/test*/**.java")))
11382 `(("java-guava" ,java-guava)))
11384 `(("java-junit" ,java-junit)
11385 ("java-hamcrest-core" ,java-hamcrest-core)))
11386 (home-page "https://www.joda.org/joda-convert/")
11387 (synopsis "Conversion between Objects and Strings")
11388 (description "Joda-Convert provides a small set of classes to aid
11389 conversion between Objects and Strings. It is not intended to tackle the
11390 wider problem of Object to Object transformation.")
11391 (license license:asl2.0)))
11393 (define-public java-joda-time
11395 (name "java-joda-time")
11399 (uri (string-append "https://github.com/JodaOrg/joda-time/archive/v"
11400 version ".tar.gz"))
11401 (file-name (string-append name "-" version ".tar.gz"))
11404 "1i9x91mi7yg2pasl0k3912f1pg46n37sps6rdb0v1gs8hj9ppwc1"))))
11405 (build-system ant-build-system)
11407 `(#:jar-name "java-joda-time.jar"
11408 #:source-dir "src/main/java"
11409 #:test-include (list "**/Test*.java")
11410 ;; There is no runnable test in these files
11411 #:test-exclude (list "**/Test*Chronology.java" "**/Test*Field.java")
11413 (modify-phases %standard-phases
11414 (add-after 'build 'build-resources
11416 (mkdir-p "build/classes/org/joda/time/tz/data")
11417 (mkdir-p "build/classes/org/joda/time/format")
11418 ;; This will produce the following exception:
11419 ;; java.io.IOException: Resource not found: "org/joda/time/tz/data/ZoneInfoMap"
11420 ;; which is normal, because it doesn't exist yet. It still generates
11421 ;; the same file as in the binary one can find on maven.
11422 (invoke "java" "-cp"
11423 (string-append "build/classes:" (getenv "CLASSPATH"))
11424 "org.joda.time.tz.ZoneInfoCompiler"
11425 "-src" "src/main/java/org/joda/time/tz/src"
11426 "-dst" "build/classes/org/joda/time/tz/data"
11427 "africa" "antarctica" "asia" "australasia"
11428 "europe" "northamerica" "southamerica"
11429 "pacificnew" "etcetera" "backward" "systemv")
11430 (for-each (lambda (f)
11431 (copy-file f (string-append
11432 "build/classes/org/joda/time/format/"
11434 (find-files "src/main/java/org/joda/time/format" ".*.properties"))
11436 (add-before 'install 'regenerate-jar
11438 ;; We need to regenerate the jar file to add generated data.
11439 (delete-file "build/jar/java-joda-time.jar")
11440 (invoke "ant" "jar")))
11441 (add-before 'check 'copy-test-resources
11443 (mkdir-p "build/test-classes/org/joda/time/tz/data")
11444 (copy-file "src/test/resources/tzdata/ZoneInfoMap"
11445 "build/test-classes/org/joda/time/tz/data/ZoneInfoMap")
11446 (copy-recursively "src/test/resources" "build/test-classes")
11449 `(("java-joda-convert" ,java-joda-convert)))
11451 `(("java-junit" ,java-junit)
11452 ("java-hamcrest-core" ,java-hamcrest-core)
11453 ("tzdata" ,tzdata)))
11454 (home-page "https://www.joda.org/joda-time/")
11455 (synopsis "Replacement for the Java date and time classes")
11456 (description "Joda-Time is a replacement for the Java date and time
11457 classes prior to Java SE 8.")
11458 (license license:asl2.0)))
11460 (define-public java-xerces
11462 (name "java-xerces")
11467 (uri (string-append "mirror://apache/xerces/j/source/"
11468 "Xerces-J-src." version ".tar.gz"))
11470 (base32 "0494kq36gw3nah19ifb720vwxbpg4ww0k6m3zq6wyanw6a083p6s"))
11471 (patches (search-patches
11472 "java-xerces-xjavac_taskdef.patch"
11473 "java-xerces-build_dont_unzip.patch"
11474 "java-xerces-bootclasspath.patch"))))
11475 (build-system ant-build-system)
11477 `(#:tests? #f;; Test files are not present
11478 #:test-target "test"
11481 (modify-phases %standard-phases
11482 (add-after 'unpack 'create-build.properties
11483 (lambda* (#:key inputs #:allow-other-keys)
11484 (let ((jaxp (assoc-ref inputs "java-jaxp"))
11485 (resolver (assoc-ref inputs "java-apache-xml-commons-resolver")))
11486 (with-output-to-file "build.properties"
11489 "jar.jaxp = ~a/share/java/jaxp.jar~@
11490 jar.apis-ext = ~a/share/java/jaxp.jar~@
11491 jar.resolver = ~a/share/java/xml-resolver.jar~%"
11492 jaxp jaxp resolver)))
11493 ;; Make xerces use our version of jaxp in tests
11494 (substitute* "build.xml"
11496 (string-append jaxp "/share/java/jaxp.jar"))
11497 (("\\$\\{tools.dir\\}/\\$\\{jar.apis\\}")
11500 (replace 'install (install-jars "build")))))
11502 `(("java-apache-xml-commons-resolver" ,java-apache-xml-commons-resolver)
11503 ("java-jaxp" ,java-jaxp)))
11504 (home-page "https://xerces.apache.org/xerces2-j/")
11505 (synopsis "Validating XML parser for Java with DOM level 3 support")
11506 (description "The Xerces2 Java parser is the reference implementation of
11507 XNI, the Xerces Native Interface, and also a fully conforming XML Schema
11510 Xerces2-J supports the following standards and APIs:
11513 @item eXtensible Markup Language (XML) 1.0 Second Edition Recommendation
11514 @item Namespaces in XML Recommendation
11515 @item Document Object Model (DOM) Level 2 Core, Events, and Traversal and
11516 Range Recommendations
11517 @item Simple API for XML (SAX) 2.0.1 Core and Extension
11518 @item Java APIs for XML Processing (JAXP) 1.2.01
11519 @item XML Schema 1.0 Structures and Datatypes Recommendations
11520 @item Experimental implementation of the Document Object Model (DOM) Level 3
11521 Core and Load/Save Working Drafts
11522 @item Provides a partial implementation of the XML Inclusions (XInclude) W3C
11523 Candidate Recommendation
11526 Xerces is now able to parse documents written according to the XML 1.1
11527 Candidate Recommendation, except that it does not yet provide an option to
11528 enable normalization checking as described in section 2.13 of this
11529 specification. It also handles namespaces according to the XML Namespaces 1.1
11530 Candidate Recommendation, and will correctly serialize XML 1.1 documents if
11531 the DOM level 3 load/save API's are in use.")
11532 (license license:asl2.0)))
11534 (define-public java-jakarta-regexp
11536 (name "java-jakarta-regexp")
11541 (uri (string-append
11542 "https://archive.apache.org/dist/jakarta/regexp/jakarta-regexp-"
11543 version ".tar.gz"))
11546 "0zg9rmyif48dck0cv6ynpxv23mmcsx265am1fnnxss7brgw0ms3r"))))
11547 (build-system ant-build-system)
11549 `(#:test-target "test"
11551 (modify-phases %standard-phases
11553 (lambda* (#:key outputs #:allow-other-keys)
11554 (let* ((out (assoc-ref outputs "out"))
11555 (out-share (string-append out "/share/java")))
11556 (mkdir-p out-share)
11557 (for-each (lambda (name)
11558 (install-file name out-share))
11559 (find-files "build" "^jakarta-regexp-.*\\.jar$"))
11561 (home-page "https://attic.apache.org/projects/jakarta-regexp.html")
11562 (synopsis "Regular expression parser generator for Java.")
11563 (description "@code{jakarta-regexp} is an old regular expression parser
11564 generator for Java.")
11565 (license license:asl2.0)))
11567 (define-public java-jline
11569 (name "java-jline")
11573 (uri (string-append "https://github.com/jline/jline1/archive/jline-"
11574 version ".tar.gz"))
11577 "0bi3p6vrh7a6v0fbpb6rx9plpmx5zk3lr352xzdbz2jcxg499wir"))))
11578 (build-system ant-build-system)
11580 `(#:jar-name "jline.jar"
11581 #:source-dir "src/main/java"
11582 #:test-dir "src/test"
11584 (modify-phases %standard-phases
11585 (add-before 'build 'copy-resources
11587 (copy-recursively "src/main/resources" "build/classes")
11590 `(("java-junit" ,java-junit)))
11591 (home-page "https://jline.github.io")
11592 (synopsis "Console input handling library")
11593 (description "JLine is a Java library for handling console input. It is
11594 similar in functionality to BSD editline and GNU readline but with additional
11595 features that bring it on par with the Z shell line editor.")
11596 (license license:bsd-3)))
11598 (define-public java-jline-2
11600 (inherit java-jline)
11604 (uri (string-append "https://github.com/jline/jline2/archive/jline-"
11605 version ".tar.gz"))
11608 "1c6qa26mf0viw8hg4jnv72s7i1qb1gh1l8rrzcdvqhqhx82rkdlf"))))
11611 ,@(package-arguments java-jline)))
11613 `(("java-jansi" ,java-jansi)
11614 ("java-jansi-native" ,java-jansi-native)))
11616 `(("java-powermock-modules-junit4" ,java-powermock-modules-junit4)
11617 ("java-powermock-modules-junit4-common" ,java-powermock-modules-junit4-common)
11618 ("java-powermock-api-easymock" ,java-powermock-api-easymock)
11619 ("java-powermock-api-support" ,java-powermock-api-support)
11620 ("java-powermock-core" ,java-powermock-core)
11621 ("java-powermock-reflect" ,java-powermock-reflect)
11622 ("java-easymock" ,java-easymock)
11623 ("java-jboss-javassist" ,java-jboss-javassist)
11624 ("java-objenesis" ,java-objenesis)
11625 ("java-asm" ,java-asm)
11626 ("java-hamcrest-core" ,java-hamcrest-core)
11627 ("java-cglib" ,java-cglib)
11628 ("java-junit" ,java-junit)
11629 ("java-hawtjni" ,java-hawtjni)))))
11631 (define-public java-xmlunit
11633 (name "java-xmlunit")
11637 (uri (string-append "https://github.com/xmlunit/xmlunit/archive/v"
11638 version ".tar.gz"))
11639 (file-name (string-append name "-" version ".tar.gz"))
11642 "035rivlnmwhfqj0fzviciv0bkh1h95ps1iwnh2kjcvdbk5nccm4z"))))
11643 (build-system ant-build-system)
11645 `(#:jar-name "java-xmlunit.jar"
11646 #:source-dir "xmlunit-core/src/main/java"
11647 #:test-dir "xmlunit-core/src/test"
11649 (modify-phases %standard-phases
11650 (add-before 'check 'copy-test-resources
11651 (lambda* (#:key inputs #:allow-other-keys)
11652 (copy-recursively (assoc-ref inputs "resources") "../test-resources")
11655 `(("java-junit" ,java-junit)
11656 ("java-mockito-1" ,java-mockito-1)
11657 ("java-hamcrest-all" ,java-hamcrest-all)
11658 ("java-objenesis" ,java-objenesis)
11659 ("java-asm" ,java-asm)
11660 ("java-cglib" ,java-cglib)
11664 (uri (git-reference
11665 (url "https://github.com/xmlunit/test-resources")
11666 (commit "a590d2ae865c3e0455691d76ba8eefccc2215aec")))
11667 (file-name "java-xmlunit-test-resources")
11670 "0r0glj37pg5l868yjz78gckr91cs8fysxxbp9p328dssssi91agr"))))))
11671 (home-page "https://www.xmlunit.org/")
11672 (synopsis "XML output testing")
11673 (description "XMLUnit provides you with the tools to verify the XML you
11674 emit is the one you want to create. It provides helpers to validate against
11675 an XML Schema, assert the values of XPath queries or compare XML documents
11676 against expected outcomes.")
11677 (license license:asl2.0)))
11679 (define-public java-xmlunit-legacy
11681 (inherit java-xmlunit)
11682 (name "java-xmlunit-legacy")
11684 `(#:jar-name "java-xmlunit-legacy.jar"
11685 #:source-dir "xmlunit-legacy/src/main/java"
11686 #:test-dir "xmlunit-legacy/src/test"))
11688 `(("java-xmlunit" ,java-xmlunit)
11689 ("java-junit" ,java-junit)))
11691 `(("java-mockito-1" ,java-mockito-1)))))
11693 (define-public java-xmlunit-matchers
11695 (inherit java-xmlunit)
11696 (name "java-xmlunit-matchers")
11698 `(#:jar-name "java-xmlunit-matchers.jar"
11699 #:source-dir "xmlunit-matchers/src/main/java"
11700 #:test-dir "xmlunit-matchers/src/test"
11702 ;; Cannot open xsd for http://www.xmlunit.org/test-support/Book.xsd
11703 (list "**/ValidationMatcherTest.java")
11705 (modify-phases %standard-phases
11706 (add-before 'build 'copy-test-class
11708 (copy-file "xmlunit-core/src/test/java/org/xmlunit/TestResources.java"
11709 "xmlunit-matchers/src/test/java/org/xmlunit/TestResources.java")
11711 (add-before 'build 'fix-test-resources-path
11713 (substitute* (find-files "xmlunit-matchers/src/test" ".*.java")
11714 (("../test-resources") "test-resources"))
11716 (add-before 'check 'copy-test-resources
11717 (lambda* (#:key inputs #:allow-other-keys)
11718 (copy-recursively (assoc-ref inputs "resources") "test-resources")
11721 `(("java-xmlunit" ,java-xmlunit)
11722 ("java-junit" ,java-junit)))))
11724 (define-public java-openchart2
11726 (name "java-openchart2")
11730 (uri (string-append "http://download.approximatrix.com/openchart2/"
11731 "openchart2-" version ".source.zip"))
11734 "1xq96zm5r02n1blja0072jmmsifmxc40lbyfbnmcnr6mw42frh4g"))))
11735 (build-system ant-build-system)
11737 `(#:test-target "test"
11739 (modify-phases %standard-phases
11740 (add-after 'unpack 'fix-junit-errors
11742 (with-directory-excursion "unittest/src/com/approximatrix/charting/"
11743 (substitute* '("coordsystem/ticklocator/NumericXTickLocatorTest.java"
11744 "coordsystem/ticklocator/NumericYTickLocatorTest.java"
11745 "coordsystem/ticklocator/ObjectXTickLocatorTest.java"
11746 "model/DefaultChartDataModelConstraintsTest.java"
11747 "model/MultiScatterDataModelConstraintsTest.java"
11748 "model/threedimensional/DotPlotDataModelConstraintsTest.java")
11749 (("(assertEquals[^;]+);" before _)
11750 (string-append (string-drop-right before 2) ", 1E-6);"))))
11752 (replace 'install (install-jars ".")))))
11755 ("java-junit" ,java-junit)
11756 ("java-hamcrest-core" ,java-hamcrest-core)))
11757 (home-page "https://approximatrix.com/products/openchart2/")
11758 (synopsis "Simple plotting for Java")
11759 (description "Openchart2 provides a simple, yet powerful, interface for
11760 Java programmers to create two-dimensional charts and plots. The library
11761 features an assortment of graph styles, including advanced scatter plots, bar
11762 graphs, and pie charts.")
11763 (license license:lgpl2.1+)))
11765 (define-public java-commons-httpclient
11767 (name "java-commons-httpclient")
11771 (uri (string-append "mirror://apache/httpcomponents/"
11772 "commons-httpclient/source/commons-httpclient-"
11773 version "-src.tar.gz"))
11776 "1wlpn3cfy3d4inxy6g7wxcsa8p7sshn6aldk9y4ia3lb879rd97r"))))
11777 (build-system ant-build-system)
11779 `(#:build-target "compile"
11780 #:test-target "test"
11781 #:tests? #f; requires junit-textui (junit 3)
11783 (modify-phases %standard-phases
11784 (add-before 'build 'fix-accent
11786 (for-each (lambda (file)
11787 (with-fluids ((%default-port-encoding "ISO-8859-1"))
11789 (("\\* @author Ortwin .*") "* @author Ortwin Glueck\n"))))
11790 '("src/java/org/apache/commons/httpclient/HttpContentTooLargeException.java"
11791 "src/examples/TrivialApp.java" "src/examples/ClientApp.java"
11792 "src/test/org/apache/commons/httpclient/TestHttps.java"
11793 "src/test/org/apache/commons/httpclient/TestURIUtil2.java"))
11796 (lambda* (#:key outputs #:allow-other-keys)
11797 (invoke "ant" "dist"
11798 (string-append "-Ddist.home=" (assoc-ref outputs "out")
11802 `(("java-commons-logging" ,java-commons-logging-minimal)
11803 ("java-commons-codec" ,java-commons-codec)))
11804 (home-page "https://hc.apache.org")
11805 (synopsis "HTTP/1.1 compliant HTTP agent implementation")
11806 (description "This package contains an HTTP/1.1 compliant HTTP agent
11807 implementation. It also provides reusable components for client-side
11808 authentication, HTTP state management, and HTTP connection management.")
11809 (license license:asl2.0)))
11811 (define-public java-commons-vfs
11813 (name "java-commons-vfs")
11817 (uri (string-append "mirror://apache/commons/vfs/source/"
11818 "commons-vfs2-distribution-" version "-src.tar.gz"))
11819 (file-name (string-append name "-" version ".tar.gz"))
11822 "1cnq1iaghbp4cslpnvwbp83i5v234x87irssqynhwpfgw7caf1s3"))
11823 (modules '((guix build utils)))
11826 (for-each delete-file
11827 (find-files "." "\\.jar$"))
11829 (build-system ant-build-system)
11831 `(#:jar-name "commons-vfs.jar"
11832 #:source-dir "commons-vfs2/src/main/java"
11833 #:test-dir "commons-vfs2/src/test"
11834 ; FIXME: tests depend on many things: apache sshd, hadoop, ftpserver, ...
11837 (modify-phases %standard-phases
11838 (add-before 'build 'remove-hadoop-and-webdav
11839 ; Remove these files as they are not required and depend on difficult
11842 (for-each delete-file-recursively
11843 '("commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/webdav"
11844 "commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/hdfs"))
11847 `(("java-commons-collections4" ,java-commons-collections4)
11848 ("java-commons-compress" ,java-commons-compress)
11849 ("java-commons-httpclient" ,java-commons-httpclient)
11850 ("java-commons-logging-minimal" ,java-commons-logging-minimal)
11851 ("java-commons-net" ,java-commons-net)
11852 ("java-jsch" ,java-jsch)))
11853 (home-page "https://commons.apache.org/proper/commons-vfs/")
11854 (synopsis "Java file system library")
11855 (description "Commons VFS provides a single API for accessing various
11856 different file systems. It presents a uniform view of the files from various
11857 different sources, such as the files on local disk, on an HTTP server, or
11858 inside a Zip archive.")
11859 (license license:asl2.0)))
11861 (define-public java-jakarta-oro
11863 (name "java-jakarta-oro")
11867 (uri (string-append "mirror://apache/jakarta/oro/"
11868 "jakarta-oro-" version ".tar.gz"))
11871 "0rpmnsskiwmsy8r0sckz5n5dbvh3vkxx8hpm177c754r8xy3qksc"))
11872 (modules '((guix build utils)))
11875 (delete-file (string-append "jakarta-oro-" ,version ".jar"))
11877 (build-system ant-build-system)
11879 `(#:build-target "package"
11880 #:tests? #f; tests are run as part of the build process
11882 (modify-phases %standard-phases
11884 (install-jars ,(string-append "jakarta-oro-" version))))))
11885 (home-page "https://jakarta.apache.org/oro/")
11886 (synopsis "Text-processing for Java")
11887 (description "The Jakarta-ORO Java classes are a set of text-processing
11888 Java classes that provide Perl5 compatible regular expressions, AWK-like
11889 regular expressions, glob expressions, and utility classes for performing
11890 substitutions, splits, filtering filenames, etc. This library is the successor
11891 of the OROMatcher, AwkTools, PerlTools, and TextTools libraries originally
11893 (license license:asl1.1)))
11895 (define-public java-native-access
11897 (name "java-native-access")
11901 (uri (string-append "https://github.com/java-native-access/jna/"
11902 "archive/" version ".tar.gz"))
11903 (file-name (string-append name "-" version ".tar.gz"))
11906 "0zrpzkib6b905i018a9pqlzkqinphywr6y4jwv6mwp63jjqvqkd9"))
11907 (modules '((guix build utils)))
11910 (for-each delete-file (find-files "." ".*.jar"))
11911 (delete-file-recursively "native/libffi")
11912 (delete-file-recursively "dist")
11914 (build-system ant-build-system)
11916 `(#:tests? #f; FIXME: tests require reflections.jar
11917 #:test-target "test"
11918 #:make-flags (list "-Ddynlink.native=true")
11920 (modify-phases %standard-phases
11921 (add-before 'build 'fix-build.xml
11922 (lambda* (#:key inputs #:allow-other-keys)
11923 (substitute* "build.xml"
11924 ;; Since we removed the bundled ant.jar, give the correct path
11925 (("lib/ant.jar") (string-append (assoc-ref inputs "ant") "/lib/ant.jar"))
11926 ;; We removed generated native libraries. We can only rebuild one
11927 ;; so don't fail if we can't find a native library for another architecture.
11928 (("zipfileset") "zipfileset erroronmissingarchive=\"false\""))
11929 ;; Copy test dependencies
11930 (copy-file (car (find-files (assoc-ref inputs "java-junit") "jar$"))
11932 (copy-file (car (find-files (assoc-ref inputs "java-hamcrest-core")
11934 "lib/hamcrest-core.jar")
11935 ;; FIXME: once reflections.jar is built, copy it to lib/test.
11937 (add-before 'build 'build-native
11939 (invoke "ant" "-Ddynlink.native=true" "native")
11942 (install-jars "build")))))
11944 `(("libffi" ,libffi)
11948 `(("java-junit" ,java-junit)
11949 ("java-hamcrest-core" ,java-hamcrest-core)))
11950 (home-page "https://github.com/java-native-access/jna")
11951 (synopsis "Access to native shared libraries from Java")
11952 (description "JNA provides Java programs easy access to native shared
11953 libraries without writing anything but Java code - no JNI or native code is
11954 required. JNA allows you to call directly into native functions using natural
11955 Java method invocation.")
11956 ;; Java Native Access project (JNA) is dual-licensed under 2
11957 ;; alternative Free licenses: LGPL 2.1 or later and Apache License 2.0.
11960 license:lgpl2.1+))))
11962 (define-public java-native-access-platform
11964 (inherit java-native-access)
11965 (name "java-native-access-platform")
11967 `(#:test-target "test"
11968 #:tests? #f; require jna-test.jar
11970 (modify-phases %standard-phases
11971 (add-before 'build 'chdir
11973 (chdir "contrib/platform")
11975 (add-after 'chdir 'fix-ant
11976 (lambda* (#:key inputs #:allow-other-keys)
11977 (substitute* "nbproject/project.properties"
11978 (("../../build/jna.jar")
11979 (string-append (assoc-ref inputs "java-native-access")
11980 "/share/java/jna.jar"))
11981 (("../../lib/hamcrest-core-.*.jar")
11982 (car (find-files (assoc-ref inputs "java-hamcrest-core")
11984 (("../../lib/junit.jar")
11985 (car (find-files (assoc-ref inputs "java-junit")
11989 (install-jars "dist")))))
11991 `(("java-native-access" ,java-native-access)))
11992 (synopsis "Cross-platform mappings for jna")
11993 (description "java-native-access-platfrom has cross-platform mappings
11994 and mappings for a number of commonly used platform functions, including a
11995 large number of Win32 mappings as well as a set of utility classes that
11996 simplify native access.")))
11998 (define-public java-jsch-agentproxy-core
12000 (name "java-jsch-agentproxy-core")
12004 (uri (string-append "https://github.com/ymnk/jsch-agent-proxy/archive/"
12005 version ".tar.gz"))
12006 (file-name (string-append name "-" version ".tar.gz"))
12009 "02iqg6jbc1kxvfzqcg6wy9ygqxfm82bw5rf6vnswqy4y572niz4q"))))
12010 (build-system ant-build-system)
12012 `(#:jar-name "jsch-agentproxy-core.jar"
12013 #:source-dir "jsch-agent-proxy-core/src/main/java"
12014 #:tests? #f)); no tests
12015 (home-page "https://github.com/ymnk/jsch-agent-proxy")
12016 (synopsis "Core component of the proxy to ssh-agent and Pageant in Java")
12017 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
12018 and Pageant included Putty. It will be easily integrated into JSch, and users
12019 will be allowed to use these programs for authentication.")
12020 (license license:bsd-3)))
12022 (define-public java-jsch-agentproxy-sshagent
12024 (inherit java-jsch-agentproxy-core)
12025 (name "java-jsch-agentproxy-sshagent")
12027 `(#:jar-name "jsch-agentproxy-sshagent.jar"
12028 #:source-dir "jsch-agent-proxy-sshagent/src/main/java"
12029 #:tests? #f)); no tests
12031 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
12032 (synopsis "Proxy to ssh-agent")
12033 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
12034 and Pageant included in Putty. This component contains the code for a proxy to
12037 (define-public java-jsch-agentproxy-usocket-jna
12039 (inherit java-jsch-agentproxy-core)
12040 (name "java-jsch-agentproxy-usocket-jna")
12042 `(#:jar-name "jsch-agentproxy-usocket-jna.jar"
12043 #:source-dir "jsch-agent-proxy-usocket-jna/src/main/java"
12044 #:tests? #f)); no tests
12046 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
12047 ("java-native-access" ,java-native-access)))
12048 (synopsis "USocketFactory implementation using JNA")
12049 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
12050 and Pageant included in Putty. This component contains an implementation of
12051 USocketFactory using @dfn{JNA} (Java Native Access).")))
12053 (define-public java-jsch-agentproxy-pageant
12055 (inherit java-jsch-agentproxy-core)
12056 (name "java-jsch-agentproxy-pageant")
12058 `(#:jar-name "jsch-agentproxy-pageant.jar"
12059 #:source-dir "jsch-agent-proxy-pageant/src/main/java"
12060 #:tests? #f)); no tests
12062 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
12063 ("java-native-access" ,java-native-access)
12064 ("java-native-access-platform" ,java-native-access-platform)))
12065 (synopsis "Proxy to pageant")
12066 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
12067 and Pageant included in Putty. This component contains the code for a proxy to
12070 (define-public java-jsch-agentproxy-usocket-nc
12072 (inherit java-jsch-agentproxy-core)
12073 (name "java-jsch-agentproxy-usocket-nc")
12075 `(#:jar-name "jsch-agentproxy-usocket-nc.jar"
12076 #:source-dir "jsch-agent-proxy-usocket-nc/src/main/java"
12077 #:tests? #f)); no tests
12079 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
12080 (synopsis "USocketFactory implementation using netcat")
12081 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
12082 and Pageant included in Putty. This component contains an implementation of
12083 USocketFactory using netcat.")))
12085 (define-public java-jsch-agentproxy-connector-factory
12087 (inherit java-jsch-agentproxy-core)
12088 (name "java-jsch-agentproxy-connector-factory")
12090 `(#:jar-name "jsch-agentproxy-connector-factory.jar"
12091 #:source-dir "jsch-agent-proxy-connector-factory/src/main/java"
12092 #:tests? #f)); no tests
12094 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
12095 ("java-jsch-agentproxy-sshagent" ,java-jsch-agentproxy-sshagent)
12096 ("java-jsch-agentproxy-usocket-jna" ,java-jsch-agentproxy-usocket-jna)
12097 ("java-jsch-agentproxy-pageant" ,java-jsch-agentproxy-pageant)
12098 ("java-jsch-agentproxy-usocket-nc" ,java-jsch-agentproxy-usocket-nc)))
12099 (synopsis "Connector factory for jsch agent proxy")
12100 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
12101 and Pageant included in Putty. This component contains a connector factory.")))
12103 (define-public java-jsch-agentproxy-jsch
12105 (inherit java-jsch-agentproxy-core)
12106 (name "java-jsch-agentproxy-jsch")
12108 `(#:jar-name "jsch-agentproxy-jsch.jar"
12109 #:source-dir "jsch-agent-proxy-jsch/src/main/java"
12110 #:tests? #f)); no tests
12112 `(("java-jsch" ,java-jsch)
12113 ("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
12114 (synopsis "JSch integration library for agentproxy")
12115 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
12116 and Pageant included in Putty. This component contains a library to use
12117 jsch-agent-proxy with JSch.")))
12119 (define-public java-apache-ivy
12121 (name "java-apache-ivy")
12125 (uri (string-append "mirror://apache//ant/ivy/" version
12126 "/apache-ivy-" version "-src.tar.gz"))
12129 "1xkfn57g2m7l6y0xdq75x5rnrgk52m9jx2xah70g3ggl8750hbr0"))
12132 "java-apache-ivy-port-to-latest-bouncycastle.patch"))))
12133 (build-system ant-build-system)
12135 `(#:jar-name "ivy.jar"
12138 (modify-phases %standard-phases
12139 (add-before 'build 'remove-example
12141 (delete-file-recursively "src/example")
12143 (add-before 'build 'copy-resources
12145 (with-directory-excursion "src/java"
12146 (for-each (lambda (file)
12147 (install-file file (string-append "../../build/classes/" (dirname file))))
12149 (find-files "." ".*.css")
12150 (find-files "." ".*.ent")
12151 (find-files "." ".*.html")
12152 (find-files "." ".*.properties")
12153 (find-files "." ".*.xsd")
12154 (find-files "." ".*.xsl")
12155 (find-files "." ".*.xml"))))
12157 (add-before 'build 'fix-vfs
12160 '("src/java/org/apache/ivy/plugins/repository/vfs/VfsRepository.java"
12161 "src/java/org/apache/ivy/plugins/repository/vfs/VfsResource.java")
12162 (("import org.apache.commons.vfs") "import org.apache.commons.vfs2"))
12164 (add-before 'install 'copy-manifest
12166 (install-file "META-INF/MANIFEST.MF" "build/classes/META-INF")
12168 (add-before 'install 'repack
12170 (invoke "jar" "-cmf" "build/classes/META-INF/MANIFEST.MF" "build/jar/ivy.jar"
12171 "-C" "build/classes" ".")))
12172 (add-after 'install 'install-bin
12173 (lambda* (#:key outputs #:allow-other-keys)
12174 (let* ((bin (string-append (assoc-ref outputs "out") "/bin"))
12175 (ivy (string-append bin "/ivy"))
12176 (jar (string-append (assoc-ref outputs "out") "/share/java/ivy.jar")))
12178 (with-output-to-file ivy
12180 (display (string-append
12181 "#!" (which "sh") "\n"
12182 "if [[ -z $CLASSPATH ]]; then\n"
12183 " cp=\"" (getenv "CLASSPATH") ":" jar "\"\n"
12185 " cp=\"" (getenv "CLASSPATH") ":" jar ":$CLASSPATH\"\n"
12187 (which "java") " -cp $cp org.apache.ivy.Main $@\n"))))
12191 `(("java-bouncycastle" ,java-bouncycastle)
12192 ("java-commons-cli" ,java-commons-cli)
12193 ("java-commons-collections" ,java-commons-collections)
12194 ("java-commons-httpclient" ,java-commons-httpclient)
12195 ("java-commons-lang" ,java-commons-lang)
12196 ("java-commons-vfs" ,java-commons-vfs)
12197 ("java-jakarta-oro" ,java-jakarta-oro)
12198 ("java-jsch" ,java-jsch)
12199 ("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
12200 ("java-jsch-agentproxy-connector-factory" ,java-jsch-agentproxy-connector-factory)
12201 ("java-jsch-agentproxy-jsch" ,java-jsch-agentproxy-jsch)
12202 ("java-junit" ,java-junit)))
12203 (home-page "https://ant.apache.org/ivy")
12204 (synopsis "Dependency manager for the Java programming language")
12205 (description "Ivy is a tool for managing (recording, tracking, resolving
12206 and reporting) project dependencies. It is characterized by the following:
12209 @item flexibility and configurability - Ivy is essentially process agnostic
12210 and is not tied to any methodology or structure. Instead it provides the
12211 necessary flexibility and configurability to be adapted to a broad range
12212 of dependency management and build processes.
12213 @item tight integration with Apache Ant - while available as a standalone tool,
12214 Ivy works particularly well with Apache Ant providing a number of
12215 powerful Ant tasks ranging from dependency resolution to dependency
12216 reporting and publication.
12218 (license license:asl2.0)))
12220 (define-public java-eclipse-sisu-inject
12222 (name "java-eclipse-sisu-inject")
12226 (uri (git-reference
12227 (url "https://github.com/eclipse/sisu.inject/")
12228 (commit (string-append "releases/" version))))
12229 (file-name (git-file-name name version))
12232 "16044sizdb0rjbhlfbmcnpds5y7by7dyn9b0c11606aikqi8k3x6"))))
12233 (build-system ant-build-system)
12235 `(#:jar-name "eclipse-sisu-inject.jar"
12236 #:source-dir "org.eclipse.sisu.inject/src"
12237 #:tests? #f; no tests
12239 (modify-phases %standard-phases
12241 (install-from-pom "org.eclipse.sisu.inject/pom.xml")))))
12243 `(("java-guice" ,java-guice)
12244 ("java-sisu-inject-parent-pom" ,java-sisu-inject-parent-pom)))
12246 `(("java-guice-servlet" ,java-guice-servlet)
12247 ("java-javax-inject" ,java-javax-inject)
12248 ("java-javaee-servletapi" ,java-javaee-servletapi)
12249 ("java-junit" ,java-junit)
12250 ("java-slf4j-api" ,java-slf4j-api)
12251 ("java-jsr305" ,java-jsr305)
12252 ("java-jsr250" ,java-jsr250)
12253 ("java-cdi-api" ,java-cdi-api)
12254 ("java-osgi-framework" ,java-osgi-framework)
12255 ("java-osgi-util-tracker" ,java-osgi-util-tracker)
12256 ("java-testng" ,java-testng)))
12257 (home-page "https://www.eclipse.org/sisu/")
12258 (synopsis "Classpath scanning, auto-binding, and dynamic auto-wiring")
12259 (description "Sisu is a modular JSR330-based container that supports
12260 classpath scanning, auto-binding, and dynamic auto-wiring. Sisu uses
12261 Google-Guice to perform dependency injection and provide the core JSR330
12262 support, but removes the need to write explicit bindings in Guice modules.
12263 Integration with other containers via the Eclipse Extension Registry and the
12264 OSGi Service Registry is a goal of this project.")
12265 (license license:epl1.0)))
12267 (define java-sisu-inject-parent-pom
12269 (inherit java-eclipse-sisu-inject)
12270 (name "java-sisu-inject-parent-pom")
12274 (modify-phases %standard-phases
12275 (delete 'configure)
12278 (install-pom-file "pom.xml")))))
12279 (propagated-inputs '())))
12281 (define-public java-eclipse-sisu-plexus
12283 (name "java-eclipse-sisu-plexus")
12287 (uri (git-reference
12288 (url "https://github.com/eclipse/sisu.plexus")
12289 (commit (string-append "releases/" version))))
12290 (file-name (git-file-name name version))
12293 "17mjlajnsqnk07cc58h1qpxrif85yb2m2y0pyba48yjjgikk8r9f"))
12294 (modules '((guix build utils)))
12297 (for-each delete-file (find-files "." ".*.jar"))
12298 (rename-file "org.eclipse.sisu.plexus.tests/src"
12299 "org.eclipse.sisu.plexus.tests/java")
12301 (build-system ant-build-system)
12303 `(#:jar-name "eclipse-sisu-plexus.jar"
12304 #:source-dir "org.eclipse.sisu.plexus/src"
12305 #:test-dir "org.eclipse.sisu.plexus.tests"
12308 ;; This test fails probably because we can't generate the necessary
12310 "**/PlexusLoggingTest.*"
12311 ;; FIXME: This test fails because of some injection error
12312 "**/PlexusRequirementTest.*")
12315 (modify-phases %standard-phases
12316 (add-before 'build 'copy-resources
12318 (install-file "org.eclipse.sisu.plexus/META-INF/plexus/components.xml"
12319 "build/classes/META-INF/plexus")
12321 (add-before 'check 'build-test-jar
12323 (with-directory-excursion "org.eclipse.sisu.plexus.tests/resources/component-jar/src/main/"
12325 (with-directory-excursion "java"
12326 (apply invoke "javac" "-cp"
12327 (string-append (getenv "CLASSPATH")
12328 ":../../../../../build/classes")
12329 (find-files "." ".*.java"))
12330 (for-each (lambda (file) (install-file file (string-append "../build/" file)))
12331 (find-files "." ".*.jar")))
12332 (mkdir-p "build/META-INF/plexus")
12333 (copy-file "resources/META-INF/plexus/components.xml"
12334 "build/META-INF/plexus/components.xml")
12335 (with-directory-excursion "build"
12336 (invoke "jar" "cf" "../../../component-jar-0.1.jar" ".")))
12337 (with-directory-excursion "org.eclipse.sisu.plexus.tests/"
12338 (copy-recursively "META-INF" "../build/test-classes/META-INF")
12339 (substitute* "java/org/eclipse/sisu/plexus/DefaultPlexusContainerTest.java"
12340 (("resources/component-jar")
12341 "org.eclipse.sisu.plexus.tests/resources/component-jar")))
12344 (install-from-pom "org.eclipse.sisu.plexus/pom.xml")))))
12346 `(("java-plexus-classworlds" ,java-plexus-classworlds)
12347 ("java-plexus-utils" ,java-plexus-utils)
12348 ("java-plexus-component-annotations" ,java-plexus-component-annotations)
12349 ("java-cdi-api" ,java-cdi-api)
12350 ("java-eclipse-sisu-inject" ,java-eclipse-sisu-inject)
12351 ("java-sisu-plexus-parent-pom" ,java-sisu-plexus-parent-pom)))
12353 `(("java-osgi-framework" ,java-osgi-framework)
12354 ("java-slf4j-api" ,java-slf4j-api)
12355 ("java-javax-inject" ,java-javax-inject)
12356 ("java-guice" ,java-guice)
12357 ("java-guava" ,java-guava)
12358 ("java-aopalliance" ,java-aopalliance)
12359 ("java-asm" ,java-asm)
12360 ("java-cglib" ,java-cglib)))
12362 `(("java-junit" ,java-junit)))
12363 (home-page "https://www.eclipse.org/sisu/")
12364 (synopsis "Plexus support for the sisu container")
12365 (description "Sisu is a modular JSR330-based container that supports
12366 classpath scanning, auto-binding, and dynamic auto-wiring. This package
12367 adds Plexus support to the Sisu-Inject container.")
12368 (license license:epl1.0)))
12370 (define java-sisu-plexus-parent-pom
12372 (inherit java-eclipse-sisu-plexus)
12373 (name "java-sisu-plexus-parent-pom")
12377 (modify-phases %standard-phases
12378 (delete 'configure)
12381 (install-pom-file "pom.xml")))))
12383 `(("java-sonatype-oss-parent-pom-9" ,java-sonatype-oss-parent-pom-9)))))
12385 (define-public java-commons-compiler
12387 (name "java-commons-compiler")
12391 (uri (git-reference
12392 (url "https://github.com/janino-compiler/janino")
12393 (commit "91aa95686d1e4ca3b16a984a03a38686572331b2")))
12394 (file-name (string-append name "-" version))
12397 "04hfdl59sgh20qkxzgnibvs8f9hy6n7znxwpk611y5d89977y62r"))
12398 (modules '((guix build utils)))
12401 (for-each delete-file
12402 (find-files "." "\\.jar$"))
12404 (build-system ant-build-system)
12406 `(#:jar-name "commons-compiler.jar"
12407 #:source-dir "commons-compiler/src/main"
12408 #:tests? #f)); no tests
12409 (home-page "https://github.com/janino-compiler/janino")
12410 (synopsis "Java compiler")
12411 (description "Commons-compiler contains an API for janino, including the
12412 @code{IExpressionEvaluator}, @code{IScriptEvaluator}, @code{IClassBodyEvaluator}
12413 and @code{ISimpleCompiler} interfaces.")
12414 (license license:bsd-3)))
12416 (define-public java-janino
12418 (inherit java-commons-compiler)
12419 (name "java-janino")
12421 `(#:jar-name "janino.jar"
12422 #:source-dir "src/main/java"
12424 (modify-phases %standard-phases
12425 (add-before 'configure 'chdir
12430 `(("java-commons-compiler" ,java-commons-compiler)))
12432 `(("java-junit" ,java-junit)
12433 ("java-hamcrest-core" ,java-hamcrest-core)))
12434 (description "Janino is a Java compiler. Janino can compile a set of
12435 source files to a set of class files like @code{javac}, but also compile a
12436 Java expression, block, class body or source file in memory, load the bytecode
12437 and execute it directly in the same JVM. @code{janino} can also be used for
12438 static code analysis or code manipulation.")))
12440 (define-public java-logback-core
12442 (name "java-logback-core")
12446 (uri (string-append "https://github.com/qos-ch/logback/archive/v_"
12447 version ".tar.gz"))
12448 (file-name (string-append name "-" version ".tar.gz"))
12451 "1x6ga74yfgm94cfx98gybakbrlilx8i2gn6dx13l40kasmys06mi"))
12452 (modules '((guix build utils)))
12455 (delete-file-recursively "logback-access/lib")
12457 (build-system ant-build-system)
12459 `(#:jar-name "logback.jar"
12460 #:source-dir "src/main/java"
12461 #:test-dir "src/test"
12463 ;; These tests fail with Unable to set MockitoNamingPolicy on cglib generator
12464 ;; which creates FastClasses
12465 (list "**/AllCoreTest.*"
12466 "**/AutoFlushingObjectWriterTest.*"
12468 "**/ResilientOutputStreamTest.*"
12469 ;; And we still don't want to run abstract classes
12472 (modify-phases %standard-phases
12473 (add-before 'configure 'chdir
12475 (chdir "logback-core")
12478 `(("java-javax-mail" ,java-javax-mail)
12479 ("servlet" ,java-javaee-servletapi)
12480 ("java-commons-compiler" ,java-commons-compiler)
12481 ("java-janino" ,java-janino)))
12483 `(("java-junit" ,java-junit)
12484 ("java-hamcrest-core" ,java-hamcrest-core)
12485 ("java-mockito-1" ,java-mockito-1)
12486 ("java-cglib" ,java-cglib)
12487 ("java-asm" ,java-asm)
12488 ("java-objenesis" ,java-objenesis)
12489 ("java-joda-time" ,java-joda-time)))
12490 (home-page "https://logback.qos.ch")
12491 (synopsis "Logging for java")
12492 (description "Logback is intended as a successor to the popular log4j project.
12493 This module lays the groundwork for the other two modules.")
12494 ;; Either epl1.0 or lgpl2.1
12495 (license (list license:epl1.0
12496 license:lgpl2.1))))
12498 (define-public java-logback-classic
12500 (inherit java-logback-core)
12501 (name "java-logback-classic")
12503 `(#:jar-name "logback-classic.jar"
12504 #:source-dir "src/main/java"
12505 #:test-dir "src/test"
12506 #:tests? #f; tests require more packages: h2, greenmail, hsql, subethamail, slf4j, log4j, felix
12509 (modify-phases %standard-phases
12510 (add-before 'configure 'chdir
12512 (chdir "logback-classic")
12515 (lambda* (#:key inputs #:allow-other-keys)
12516 (mkdir-p "build/classes")
12517 (setenv "CLASSPATH"
12519 (apply append (map (lambda (input)
12520 (find-files (assoc-ref inputs input)
12522 '("java-logback-core" "java-slf4j-api"
12523 "java-commons-compiler" "servlet"
12526 (apply invoke "groovyc" "-d" "build/classes" "-j"
12527 (find-files "src/main/" ".*\\.(groovy|java)$"))
12528 (invoke "ant" "jar")
12531 `(("java-logback-core" ,java-logback-core)
12532 ("java-slf4j-api" ,java-slf4j-api)
12533 ,@(package-inputs java-logback-core)))
12535 `(("groovy" ,groovy)))
12536 (description "Logback is intended as a successor to the popular log4j project.
12537 This module can be assimilated to a significantly improved version of log4j.
12538 Moreover, @code{logback-classic} natively implements the slf4j API so that you
12539 can readily switch back and forth between logback and other logging frameworks
12540 such as log4j or @code{java.util.logging} (JUL).")))
12542 (define-public java-jgit
12545 (version "4.7.0.201704051617-r")
12548 (uri (string-append "https://repo1.maven.org/maven2/"
12549 "org/eclipse/jgit/org.eclipse.jgit/"
12550 version "/org.eclipse.jgit-"
12551 version "-sources.jar"))
12554 "13ii4jn02ynzq6i7gsyi21k2i94jpc85wf6bcm31q4cyvzv0mk4k"))))
12555 (build-system ant-build-system)
12557 `(#:tests? #f ; There are no tests to run.
12558 #:jar-name "jgit.jar"
12559 ;; JGit must be built with a JDK supporting Java 8.
12561 ;; Target our older default JDK.
12562 #:make-flags (list "-Dtarget=1.7")
12564 (modify-phases %standard-phases
12565 ;; The jar file generated by the default build.xml does not include
12566 ;; the text properties files, so we need to add them.
12567 (add-after 'build 'add-properties
12568 (lambda* (#:key jar-name #:allow-other-keys)
12569 (with-directory-excursion "src"
12570 (apply invoke "jar" "-uf"
12571 (string-append "../build/jar/" jar-name)
12572 (find-files "." "\\.properties$")))
12575 `(("java-classpathx-servletapi" ,java-classpathx-servletapi)
12576 ("java-javaewah" ,java-javaewah)
12577 ("java-jsch" ,java-jsch)
12578 ("java-slf4j-api" ,java-slf4j-api)))
12579 (home-page "https://eclipse.org/jgit/")
12580 (synopsis "Java library implementing the Git version control system")
12581 (description "JGit is a lightweight, pure Java library implementing the
12582 Git version control system, providing repository access routines, support for
12583 network protocols, and core version control algorithms.")
12584 (license license:edl1.0)))
12586 ;; For axoloti. This package can still be built with icedtea-7, which is
12587 ;; currently used as the default JDK.
12588 (define-public java-jgit-4.2
12589 (package (inherit java-jgit)
12590 (version "4.2.0.201601211800-r")
12593 (uri (string-append "https://repo1.maven.org/maven2/"
12594 "org/eclipse/jgit/org.eclipse.jgit/"
12595 version "/org.eclipse.jgit-"
12596 version "-sources.jar"))
12599 "15gm537iivhnzlkjym4x3wn5jqdjdragsw9pdpzqqg21nrc817mm"))))
12600 (build-system ant-build-system)
12602 (substitute-keyword-arguments (package-arguments java-jgit)
12603 ;; Build for default JDK.
12604 ((#:jdk _) icedtea-7)
12606 `(modify-phases ,phases
12607 (add-after 'unpack 'use-latest-javaewah-API
12609 (substitute* "src/org/eclipse/jgit/internal/storage/file/BitmapIndexImpl.java"
12610 (("wordinbits") "WORD_IN_BITS"))
12613 `(("java-javaewah" ,java-javaewah)
12614 ("java-jsch" ,java-jsch)
12615 ("java-slf4j-api" ,java-slf4j-api)))))
12617 (define-public abcl
12624 (uri (string-append "https://abcl.org/releases/"
12625 version "/abcl-src-" version ".tar.gz"))
12628 "0hvbcsffr8n2xwdixc8wyw1bfl9fxn2gyy0c4nma7j9zbn0wwgw9"))
12631 "abcl-fix-build-xml.patch"))))
12632 (build-system ant-build-system)
12634 `(("java-junit" ,java-junit)))
12636 `(#:build-target "abcl.jar"
12637 #:test-target "abcl.test"
12639 (modify-phases %standard-phases
12641 (lambda* (#:key outputs #:allow-other-keys)
12642 (let ((share (string-append (assoc-ref outputs "out")
12644 (bin (string-append (assoc-ref outputs "out")
12647 (install-file "dist/abcl.jar" share)
12648 (install-file "dist/abcl-contrib.jar" share)
12650 (with-output-to-file (string-append bin "abcl")
12652 (let ((classpath (string-append
12655 share "abcl-contrib.jar")))
12656 (display (string-append
12657 "#!" (which "sh") "\n"
12658 "if [[ -z $CLASSPATH ]]; then\n"
12659 " cp=\"" classpath "\"\n"
12661 " cp=\"" classpath ":$CLASSPATH\"\n"
12663 "exec " (which "java")
12664 " -cp $cp org.armedbear.lisp.Main $@\n")))))
12665 (chmod (string-append bin "abcl") #o755)
12667 (home-page "https://abcl.org/")
12668 (synopsis "Common Lisp Implementation on the JVM")
12670 "@dfn{Armed Bear Common Lisp} (ABCL) is a full implementation of the Common
12671 Lisp language featuring both an interpreter and a compiler, running in the
12672 JVM. It supports JSR-223 (Java scripting API): it can be a scripting engine
12673 in any Java application. Additionally, it can be used to implement (parts of)
12674 the application using Java to Lisp integration APIs.")
12675 (license (list license:gpl2+
12676 ;; named-readtables is released under 3 clause BSD
12678 ;; jfli is released under CPL 1.0
12681 (define-public java-jsonp-api
12683 (name "java-jsonp-api")
12687 (uri (git-reference
12688 (url "https://github.com/eclipse-ee4j/jsonp")
12689 (commit (string-append "1.1-" version "-RELEASE"))))
12690 (file-name (git-file-name name version))
12693 "0zrj03hkr3jdmqlb4ipjr37cqpp2q2814qpmxi7srlwpdqs0ibgc"))))
12694 (build-system ant-build-system)
12696 `(#:jar-name "jsonp-api.jar"
12698 #:source-dir "api/src/main/java"
12699 #:test-dir "api/src/test"))
12700 (home-page "https://eclipse-ee4j.github.io/jsonp/")
12701 (synopsis "JSON Processing in Java")
12702 (description "JSON Processing (JSON-P) is a Java API to process (e.g.
12703 parse, generate, transform and query) JSON messages. It produces and
12704 consumes JSON text in a streaming fashion (similar to StAX API for XML)
12705 and allows building a Java object model for JSON text using API classes
12706 (similar to DOM API for XML).")
12707 ;; either gpl2 only with classpath exception, or epl2.0.
12708 (license (list license:gpl2
12711 (define-public java-jsonp-impl
12713 (inherit java-jsonp-api)
12714 (name "java-jsonp-impl")
12716 `(#:jar-name "jsonp-impl.jar"
12718 #:source-dir "impl/src/main/java"
12719 #:test-dir "impl/src/test"
12721 (modify-phases %standard-phases
12722 (add-before 'build 'copy-resources
12725 "impl/src/main/resources/"
12729 `(("java-jsonp-api" ,java-jsonp-api)))
12730 (description "JSON Processing (JSON-P) is a Java API to process (e.g.
12731 parse, generate, transform and query) JSON messages. This package contains
12732 a reference implementation of that API.")))
12734 (define-public java-xmp
12740 (uri (string-append "http://download.macromedia.com/pub/developer"
12741 "/xmp/sdk/XMPCoreJava-" version ".zip"))
12744 "14nai2mmsg7l5ya2y5mx4w4lr1az3sk2fjz6hiy4zdrsavgvl1g7"))))
12745 (build-system ant-build-system)
12747 `(#:build-target "build"
12748 #:tests? #f; no tests
12750 (modify-phases %standard-phases
12751 (add-after 'unpack 'chdir
12755 (add-before 'build 'fix-timestamp
12757 (substitute* "build.xml"
12758 (("\\$\\{BuildDate\\}") "1970 Jan 01 00:00:00-GMT"))
12761 (install-jars "."))
12762 (add-after 'install 'install-doc
12763 (lambda* (#:key outputs #:allow-other-keys)
12766 (string-append (assoc-ref outputs "out") "/share/doc/java-xmp"))
12769 `(("unzip" ,unzip)))
12770 (home-page "https://www.adobe.com/devnet/xmp.html")
12771 (synopsis "Extensible Metadat Platform (XMP) support in Java")
12772 (description "Adobe's Extensible Metadata Platform (XMP) is a labeling
12773 technology that allows you to embed data about a file, known as metadata,
12774 into the file itself. The XMP Toolkit for Java is based on the C++ XMPCore
12775 library and the API is similar.")
12776 (license license:bsd-3)))
12778 (define-public java-metadata-extractor
12780 (name "java-metadata-extractor")
12784 (uri (git-reference
12785 (url "https://github.com/drewnoakes/metadata-extractor")
12787 (file-name (git-file-name name version))
12790 "06yrq0swrl1r40yjbk5kqzjxr04jlkq9lfi711jvfgjf5kp2qinj"))))
12791 (build-system ant-build-system)
12793 `(#:jar-name "metadata-extractor.jar"
12794 #:source-dir "Source"
12797 (modify-phases %standard-phases
12798 (add-before 'check 'fix-test-dir
12800 (substitute* "build.xml"
12801 (("/java\">") "\">"))
12804 `(("java-xmp" ,java-xmp)))
12806 `(("java-hamcrest-core" ,java-hamcrest-core)
12807 ("java-junit" ,java-junit)))
12808 (home-page "https://github.com/drewnoakes/metadata-extractor")
12809 (synopsis "Extract metadata from image and video files")
12810 (description "Metadata-extractor is a straightforward Java library for
12811 reading metadata from image files. It is able to read metadata in Exif,
12812 IPTC, XMP, ICC and more formats.")
12813 (license license:asl2.0)))
12815 (define-public java-svg-salamander
12817 (name "java-svg-salamander")
12821 (uri (git-reference
12822 (url "https://github.com/blackears/svgSalamander")
12823 (commit (string-append "v" version))))
12824 (file-name (git-file-name name version))
12827 "1zv3kjdkf6iqf02x6ln76254y634j2ji448y706a65lsbfjmmicf"))
12828 (modules '((guix build utils)))
12831 (for-each delete-file (find-files "." ".*.jar"))
12834 (search-patches "java-svg-salamander-Fix-non-det.patch"))))
12835 (build-system ant-build-system)
12837 `(#:tests? #f; no tests
12839 (modify-phases %standard-phases
12840 (add-after 'unpack 'chdir
12844 (add-before 'build 'copy-jars
12845 (lambda* (#:key inputs #:allow-other-keys)
12846 (copy-file (car (find-files (assoc-ref inputs "javacc") "\\.jar$"))
12847 "../libraries/javacc.jar")
12848 (copy-file (car (find-files (assoc-ref inputs "ant") "ant\\.jar$"))
12849 "../libraries/ant.jar")
12852 (install-jars "dist")))))
12854 `(("javacc" ,javacc)))
12855 (home-page "https://github.com/blackears/svgSalamander")
12856 (synopsis "SVG engine for Java")
12857 (description "SVG Salamander is an SVG engine for Java that's designed
12858 to be small, fast, and allow programmers to use it with a minimum of fuss.
12859 It's in particular targeted for making it easy to integrate SVG into Java
12860 games and making it much easier for artists to design 2D game content - from
12861 rich interactive menus to charts and graphcs to complex animations.")
12862 (license license:bsd-2)))
12864 (define-public java-jboss-transaction-api-spec
12866 (name "java-jboss-transaction-api-spec")
12867 (version "1.2+1.1.1")
12870 (uri (git-reference
12871 (url "https://github.com/jboss/jboss-transaction-api_spec")
12872 (commit "jboss-transaction-api_1.2_spec-1.1.1.Final")))
12873 (file-name (git-file-name name version))
12876 "1xbfq5hvb86izflydxrqqv3k26c1ba2m0ap6m97shqrsdi9by4wy"))))
12877 (build-system ant-build-system)
12879 `(#:jar-name "java-jboss-transaction-api_spec.jar"
12880 #:source-dir "src/main/java"
12881 #:tests? #f)); no tests
12883 `(("java-cdi-api" ,java-cdi-api)
12884 ("java-jboss-interceptors-api-spec" ,java-jboss-interceptors-api-spec)))
12885 (home-page "https://github.com/jboss/jboss-transaction-api_spec")
12886 (synopsis "Generic transaction management API in Java")
12887 (description "Java-jboss-transaction-api-spec implements the Transactions
12888 API. A transaction is a unit of work containing one or more operations
12889 involving one or more shared resources having ACID (Atomicity, Consistency,
12890 Isolation and Durability) properties.")
12891 ;; either gpl2 only with classpath exception or cddl.
12892 (license (list license:gpl2 license:cddl1.0))))
12894 (define-public java-picocli
12896 (name "java-picocli")
12900 (uri (git-reference
12901 (url "https://github.com/remkop/picocli")
12902 (commit (string-append "v" version))))
12903 (file-name (git-file-name name version))
12906 "1sxp6rxjfgjd98ly14b3d15dvxkm5wg4g46w12jyhmr0kmkaca3c"))))
12907 (build-system ant-build-system)
12909 `(#:jar-name "picocli.jar"
12910 #:source-dir "src/main/java"
12911 ;; Tests require missing dependencies (junitparams, system-rules)
12913 (home-page "https://picocli.info")
12914 (synopsis "REPL for the JVM")
12915 (description "Picocli is a framework for building command line applications
12916 for the JVM. It supports colors, autocompletion, subcommands, and more. Written
12917 in Java, usable from Groovy, Kotlin, Scala, etc.")
12918 (license license:asl2.0)))
12920 (define-public java-jetbrains-annotations
12922 (name "java-jetbrains-annotations")
12926 (uri (git-reference
12927 (url "https://github.com/JetBrains/java-annotations")
12929 (file-name (git-file-name name version))
12932 "0z6i1xs60cd5ffz23c49sq68wn5mphhs3xpar1n93ppama2ng80v"))))
12933 (build-system ant-build-system)
12935 `(#:jar-name "jetbrains-annotations.jar"
12936 #:source-dir "common/src/main/java:java8/src/main/java"
12937 #:tests? #f)); no tests
12938 (home-page "https://github.com/JetBrains/java-annotations")
12939 (synopsis "Annotations for Java and other JVM languages")
12940 (description "This package contains a set of Java annotations which can be
12941 used in JVM-based languages. They serve as an additional documentation and
12942 can be interpreted by IDEs and static analysis tools to improve code analysis.")
12943 (license license:expat)))