1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ricardo Wurmus <rekado@elephly.net>
3 ;;; Copyright © 2016 Leo Famulari <leo@famulari.name>
4 ;;; Copyright © 2016, 2017 Roel Janssen <roel@gnu.org>
5 ;;; Copyright © 2017, 2019 Carlo Zancanaro <carlo@zancanaro.id.au>
6 ;;; Copyright © 2017-2020 Julien Lepiller <julien@lepiller.eu>
7 ;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be>
8 ;;; Copyright © 2016, 2017, 2018 Alex Vong <alexvong1995@gmail.com>
9 ;;; Copyright © 2017, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
10 ;;; Copyright © 2018, 2019 Gábor Boskovits <boskovits@gmail.com>
11 ;;; Copyright © 2018 Chris Marusich <cmmarusich@gmail.com>
12 ;;; Copyright © 2018, 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
13 ;;; Copyright © 2019, 2020, 2021 Björn Höfling <bjoern.hoefling@bjoernhoefling.de>
14 ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
15 ;;; Copyright © 2020 Raghav Gururajan <raghavgururajan@disroot.org>
16 ;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
17 ;;; Copyright © 2021 Vincent Legoll <vincent.legoll@gmail.com>
19 ;;; This file is part of GNU Guix.
21 ;;; GNU Guix is free software; you can redistribute it and/or modify it
22 ;;; under the terms of the GNU General Public License as published by
23 ;;; the Free Software Foundation; either version 3 of the License, or (at
24 ;;; your option) any later version.
26 ;;; GNU Guix is distributed in the hope that it will be useful, but
27 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
28 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
29 ;;; GNU General Public License for more details.
31 ;;; You should have received a copy of the GNU General Public License
32 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
34 (define-module (gnu packages java)
35 #:use-module ((guix licenses) #:prefix license:)
36 #:use-module (guix packages)
37 #:use-module (guix download)
38 #:use-module (guix hg-download)
39 #:use-module (guix git-download)
40 #:use-module (guix svn-download)
41 #:use-module ((guix build utils) #:select (alist-replace))
42 #:use-module (guix utils)
43 #:use-module (guix build-system ant)
44 #:use-module (guix build-system gnu)
45 #:use-module (guix build-system trivial)
46 #:use-module (gnu packages)
47 #:use-module (gnu packages attr)
48 #:use-module (gnu packages autotools)
49 #:use-module (gnu packages base)
50 #:use-module (gnu packages bash)
51 #:use-module (gnu packages certs)
52 #:use-module (gnu packages cpio)
53 #:use-module (gnu packages cups)
54 #:use-module (gnu packages compression)
55 #:use-module (gnu packages elf)
56 #:use-module (gnu packages fontutils)
57 #:use-module (gnu packages gawk)
58 #:use-module (gnu packages gettext)
59 #:use-module (gnu packages gl)
60 #:use-module (gnu packages ghostscript) ;lcms
61 #:use-module (gnu packages gnome)
62 #:use-module (gnu packages groovy)
63 #:use-module (gnu packages gtk)
64 #:use-module (gnu packages guile)
65 #:use-module (gnu packages icu4c)
66 #:use-module (gnu packages image)
67 #:use-module (gnu packages java-compression)
68 #:use-module (gnu packages libffi)
69 #:use-module (gnu packages linux) ;alsa
70 #:use-module (gnu packages maths)
71 #:use-module (gnu packages maven)
72 #:use-module (gnu packages maven-parent-pom)
73 #:use-module (gnu packages nss)
74 #:use-module (gnu packages onc-rpc)
75 #:use-module (gnu packages web)
76 #:use-module (gnu packages wget)
77 #:use-module (gnu packages pkg-config)
78 #:use-module (gnu packages perl)
79 #:use-module (gnu packages popt)
80 #:use-module (gnu packages kerberos)
81 #:use-module (gnu packages xml)
82 #:use-module (gnu packages xorg)
83 #:use-module (gnu packages texinfo)
84 #:use-module ((srfi srfi-1) #:select (fold alist-delete))
85 #:use-module (srfi srfi-11)
86 #:use-module (ice-9 match))
90 ;;; Java bootstrap toolchain.
93 ;; The Java bootstrap begins with Jikes, a Java compiler written in C++. We
94 ;; use it to build a simple version of GNU Classpath, the Java standard
95 ;; library. We chose version 0.93 because it is the last version that can be
96 ;; built with Jikes. With Jikes and this version of GNU Classpath we can
97 ;; build JamVM, a Java Virtual Machine. We build version 1.5.1 because it is
98 ;; the last version of JamVM that works with a version of GNU classpath that
99 ;; does not require ECJ. These three packages make up the bootstrap JDK.
101 ;; This is sufficient to build an older version of Ant, which is needed to
102 ;; build an older version of ECJ, an incremental Java compiler, both of which
103 ;; are written in Java.
105 ;; ECJ is needed to build the latest release (0.99) and the development
106 ;; version of GNU Classpath. The development version of GNU Classpath has
107 ;; much more support for Java 1.6 than the latest release, but we need to
108 ;; build 0.99 first to get a working version of javah. ECJ, the development
109 ;; version of GNU Classpath, and the latest version of JamVM make up the
110 ;; second stage JDK with which we can build the OpenJDK with the Icedtea 1.x
111 ;; build framework. We then build the more recent JDKs Icedtea 2.x and
114 (define-public libantlr3c
122 (string-append "https://www.antlr3.org/download/C/"
123 name "-" version ".tar.gz"))
125 (base32 "0lpbnb4dq4azmsvlhp6khq1gy42kyqyjv8gww74g5lm2y6blm4fa"))))
126 (build-system gnu-build-system)
128 `(#:configure-flags (list "--enable-debuginfo" "--disable-static")
129 #:phases (modify-phases %standard-phases
131 (lambda* (#:key build target native-inputs inputs outputs
132 (configure-flags '()) out-of-source? system
134 (let ((configure (assoc-ref %standard-phases 'configure))
135 (enable-64bit? (member system '("aarch64-linux"
138 (configure #:build build #:target target
139 #:native-inputs native-inputs
140 #:inputs inputs #:outputs outputs
141 #:configure-flags `(,(if enable-64bit?
145 #:out-of-source? out-of-source?)))))))
146 (synopsis "ANTLR C Library")
147 (description "LIBANTLR3C provides run-time C libraries for ANTLR3 (ANother
148 Tool for Language Recognition v3).")
149 (home-page "https://www.antlr3.org/")
150 (license license:bsd-3)))
158 (uri (string-append "mirror://sourceforge/jikes/Jikes/"
159 version "/jikes-" version ".tar.bz2"))
162 "1qqldrp74pzpy5ly421srqn30qppmm9cvjiqdngk8hf47dv2rc0c"))))
163 (build-system gnu-build-system)
164 (home-page "http://jikes.sourceforge.net/")
165 (synopsis "Compiler for the Java language")
166 (description "Jikes is a compiler that translates Java source files as
167 defined in The Java Language Specification into the bytecoded instruction set
168 and binary format defined in The Java Virtual Machine Specification.")
169 (license license:ibmpl1.0)))
172 ;; Last release is from 2014, with a few important commits afterwards.
173 (let ((commit "a4bd00df0199e78243847f06cc04ecaea31f8f08"))
176 (version (git-version "0.2.4" "1" commit))
180 (url "https://github.com/ninjudd/drip")
182 (file-name (git-file-name name version))
185 "0wzmjwfyldr3jn49517xd8yn7dgdk8h88qkga3kjyg1zc375ylg2"))))
186 (build-system gnu-build-system)
188 `(("jdk" ,icedtea "jdk")))
190 `(#:tests? #f ; No tests.
192 (modify-phases %standard-phases
194 (add-before 'install 'fix-wrapper
195 (lambda* (#:key inputs #:allow-other-keys)
196 (let ((jps (string-append (assoc-ref inputs "jdk") "/bin/jps")))
197 (substitute* "bin/drip"
199 (("brew update && brew upgrade drip") "guix pull && guix install drip")
201 (("\\(cd -- \"\\$drip_dir\" && make -s\\) \\|\\| exit 1") "")
202 ;; No need to include source:
203 (("\\[\\[ -r \\$drip_dir/src/org/flatland/drip/Main\\.java \\]\\]")
207 (lambda* (#:key outputs #:allow-other-keys)
208 (let* ((out (assoc-ref outputs "out"))
209 (bin (string-append out "/bin"))
210 (share (string-append out "/share/drip")))
214 (install-file (string-append "bin/" file) bin))
215 '("drip" "drip_daemon" "drip_proxy"))
216 (install-file "drip.jar" share)
217 (substitute* (string-append bin "/drip")
218 (("drip_dir=\\$bin_dir/..")
219 (string-append "drip_dir=" share)))
221 (home-page "https://github.com/ninjudd/drip")
222 (synopsis "Faster Java Virtual Machine launching")
223 (description "Drip is a launcher for the Java Virtual Machine that
224 provides much faster startup times than the @command{java} command. The @command{drip}
225 script is intended to be a drop-in replacement for the @command{java} command,
227 (license license:epl1.0))))
229 ;; This is the last version of GNU Classpath that can be built without ECJ.
230 (define classpath-bootstrap
236 (uri (string-append "mirror://gnu/classpath/classpath-"
240 "0i99wf9xd3hw1sj2sazychb9prx8nadxh2clgvk3zlmb28v0jbfz"))
241 (patches (search-patches "classpath-aarch64-support.patch"))))
242 (build-system gnu-build-system)
245 (list (string-append "JAVAC="
246 (assoc-ref %build-inputs "jikes")
251 "--disable-gconf-peer"
257 (modify-phases %standard-phases
258 ;; XXX: This introduces a memory leak as we remove a call to free up
259 ;; memory for the file name string. This was necessary because of a
260 ;; runtime error that would have prevented us from building
261 ;; ant-bootstrap later. See https://issues.guix.gnu.org/issue/36685
262 ;; for the gnarly details.
263 (add-after 'unpack 'remove-call-to-free
265 (substitute* "native/jni/java-io/java_io_VMFile.c"
266 (("result = cpio_isFileExists.*" m)
267 (string-append m "\n//")))
269 (add-after 'install 'install-data
270 (lambda _ (invoke "make" "install-data"))))))
275 ("pkg-config" ,pkg-config)))
276 (home-page "https://www.gnu.org/software/classpath/")
277 (synopsis "Essential libraries for Java")
278 (description "GNU Classpath is a project to create core class libraries
279 for use with runtimes, compilers and tools for the Java programming
281 ;; GPLv2 or later, with special linking exception.
282 (license license:gpl2+)))
284 ;; This is the last version of JamVM that works with a version of GNU
285 ;; classpath that does not require ECJ.
286 (define jamvm-1-bootstrap
292 (uri (string-append "mirror://sourceforge/jamvm/jamvm/"
293 "JamVM%20" version "/jamvm-"
295 (patches (search-patches "jamvm-1.5.1-aarch64-support.patch"
296 "jamvm-1.5.1-armv7-support.patch"))
299 "06lhi03l3b0h48pc7x58bk9my2nrcf1flpmglvys3wyad6yraf36"))
302 ;; Remove precompiled software.
303 (delete-file "lib/classes.zip")
305 (build-system gnu-build-system)
308 (list (string-append "--with-classpath-install-dir="
309 (assoc-ref %build-inputs "classpath"))
310 "--disable-int-caching"
311 "--enable-runtime-reloc-checks"
314 ,(if (string-prefix? "aarch64" (or (%current-system)
315 (%current-target-system)))
316 ;; Makefiles and the configure script need to be regenerated to
317 ;; incorporate support for AArch64.
318 '(modify-phases %standard-phases
320 (lambda _ (invoke "autoreconf" "-vif"))))
323 `(("classpath" ,classpath-bootstrap)
329 (if (string-prefix? "aarch64" (or (%current-system)
330 (%current-target-system)))
331 ;; Additional packages needed for autoreconf.
332 `(("autoconf" ,autoconf)
333 ("automake" ,automake)
334 ("libtool" ,libtool))
336 (home-page "http://jamvm.sourceforge.net/")
337 (synopsis "Small Java Virtual Machine")
338 (description "JamVM is a Java Virtual Machine conforming to the JVM
339 specification edition 2 (blue book). It is extremely small. However, unlike
340 other small VMs it supports the full spec, including object finalisation and
342 (license license:gpl2+)))
344 (define ant-bootstrap
346 (name "ant-bootstrap")
347 ;; The 1.10.x series requires Java 8. 1.9.0 and later use generics, which
348 ;; are not supported. The 1.8.x series is the last to use only features
349 ;; supported by Jikes.
353 (uri (string-append "mirror://apache/"
354 "ant/source/apache-ant-"
355 version "-src.tar.bz2"))
358 "1cg0lga887qz5iizh6mlkxp01lciymrhmp7wzxpl6zpnldxmzrjx"))))
359 (build-system gnu-build-system)
361 `(#:imported-modules ((guix build syscalls)
362 ,@%gnu-build-system-modules)
363 #:modules ((srfi srfi-1)
364 (guix build gnu-build-system)
366 (guix build syscalls))
367 #:tests? #f ; no "check" target
369 (modify-phases %standard-phases
373 (lambda* (#:key inputs #:allow-other-keys)
374 (setenv "JAVA_HOME" (assoc-ref inputs "jamvm"))
376 (string-append (assoc-ref inputs "jamvm")
379 (string-append (assoc-ref inputs "jikes")
382 (string-append (assoc-ref inputs "jamvm")
385 ;; Ant complains if this file doesn't exist.
386 (setenv "HOME" "/tmp")
387 (with-output-to-file "/tmp/.ant.properties"
388 (lambda _ (display "")))
390 ;; Use jikes instead of javac for <javac ...> tags in build.xml
391 (setenv "ANT_OPTS" "-Dbuild.compiler=jikes")
393 ;; jikes produces lots of warnings, but they are not very
394 ;; interesting, so we silence them.
395 (setenv "$BOOTJAVAC_OPTS" "-nowarn")
397 ;; Without these JamVM options the build may freeze.
398 (substitute* "bootstrap.sh"
399 (("^\"\\$\\{JAVACMD\\}\" " m)
400 ,@(if (string-prefix? "armhf" (or (%current-system)
401 (%current-target-system)))
402 `((string-append m "-Xnocompact "))
403 `((string-append m "-Xnocompact -Xnoinlining ")))))
405 ;; Disable tests because we are bootstrapping and thus don't have
406 ;; any of the dependencies required to build and run the tests.
407 (substitute* "build.xml"
408 (("depends=\"jars,test-jar\"") "depends=\"jars\""))
409 (invoke "bash" "bootstrap.sh"
410 (string-append "-Ddist.dir="
411 (assoc-ref %outputs "out")))))
412 (add-after 'build 'strip-jar-timestamps ;based on ant-build-system
413 (lambda* (#:key outputs #:allow-other-keys)
414 (define (repack-archive jar)
415 (let* ((dir (mkdtemp! "jar-contents.XXXXXX"))
416 (manifest (string-append dir "/META-INF/MANIFESTS.MF")))
417 (with-directory-excursion dir
418 (invoke "unzip" jar))
420 ;; XXX: copied from (gnu build install)
421 (for-each (lambda (file)
422 (let ((s (lstat file)))
423 (unless (eq? (stat:type s) 'symlink)
424 (utime file 0 0 0 0))))
425 (find-files dir #:directories? #t))
426 ;; It is important that the manifest appears first.
427 (with-directory-excursion dir
428 (let* ((files (find-files "." ".*" #:directories? #t))
429 ;; To ensure that the reference scanner can
430 ;; detect all store references in the jars
431 ;; we disable compression with the "-0" option.
432 (command (if (file-exists? manifest)
433 `("zip" "-0" "-X" ,jar ,manifest
435 `("zip" "-0" "-X" ,jar ,@files))))
436 (apply invoke command)))))
437 (for-each repack-archive
439 (string-append (assoc-ref %outputs "out") "/lib")
445 ("jamvm" ,jamvm-1-bootstrap)
448 (home-page "https://ant.apache.org")
449 (synopsis "Build tool for Java")
451 "Ant is a platform-independent build tool for Java. It is similar to
452 make but is implemented using the Java language, requires the Java platform,
453 and is best suited to building Java projects. Ant uses XML to describe the
454 build process and its dependencies, whereas Make uses Makefile format.")
455 (license license:asl2.0)))
457 ;; Version 3.2.2 is the last version without a dependency on a full-fledged
458 ;; compiler for Java 1.5.
459 (define ecj-bootstrap
461 (name "ecj-bootstrap")
465 (uri (string-append "http://archive.eclipse.org/eclipse/"
466 "downloads/drops/R-" version
467 "-200702121330/ecjsrc.zip"))
470 "05hj82kxd23qaglsjkaqcj944riisjha7acf7h3ljhrjyljx8307"))))
471 ;; It would be so much easier if we could use the ant-build-system, but we
472 ;; cannot as we don't have ant at this point. We use ecj for
473 ;; bootstrapping the JDK.
474 (build-system gnu-build-system)
476 `(#:modules ((guix build gnu-build-system)
479 #:tests? #f ; there are no tests
481 (modify-phases %standard-phases
483 (lambda* (#:key inputs #:allow-other-keys)
486 (cons (string-append (assoc-ref inputs "jamvm")
488 (find-files (string-append
489 (assoc-ref inputs "ant-bootstrap")
495 (lambda* (#:key inputs #:allow-other-keys)
496 ;; The unpack phase enters the "org" directory by mistake.
499 ;; Create a simple manifest to make ecj executable.
500 (with-output-to-file "manifest"
502 (display "Manifest-Version: 1.0
503 Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n")))
506 (and (apply invoke "jikes"
507 (find-files "." "\\.java$"))
508 (invoke "fastjar" "cvfm"
509 "ecj-bootstrap.jar" "manifest" "."))))
511 (lambda* (#:key outputs #:allow-other-keys)
512 (let ((share (string-append (assoc-ref outputs "out")
515 (install-file "ecj-bootstrap.jar" share)
518 `(("ant-bootstrap" ,ant-bootstrap)
521 ("jamvm" ,jamvm-1-bootstrap)
522 ("fastjar" ,fastjar)))
523 (home-page "https://eclipse.org")
524 (synopsis "Eclipse Java development tools core batch compiler")
525 (description "This package provides the Eclipse Java core batch compiler
526 for bootstrapping purposes. The @dfn{Eclipse compiler for Java} (ecj) is a
527 requirement for all GNU Classpath releases after version 0.93.")
528 (license license:epl1.0)))
530 (define ecj-javac-wrapper
531 (package (inherit ecj-bootstrap)
532 (name "ecj-javac-wrapper")
534 (build-system trivial-build-system)
536 `(#:modules ((guix build utils))
539 (use-modules (guix build utils))
540 (let* ((bin (string-append (assoc-ref %outputs "out") "/bin"))
541 (target (string-append bin "/javac"))
542 (guile (string-append (assoc-ref %build-inputs "guile")
544 (ecj (string-append (assoc-ref %build-inputs "ecj-bootstrap")
545 "/share/java/ecj-bootstrap.jar"))
546 (java (string-append (assoc-ref %build-inputs "jamvm")
548 (bootcp (let ((jvmlib (string-append (assoc-ref %build-inputs "classpath")
549 "/share/classpath")))
550 (string-append jvmlib "/glibj.zip:"
551 jvmlib "/tools.zip"))))
553 (with-output-to-file target
555 (format #t "#!~a --no-auto-compile\n!#\n" guile)
557 `(begin (use-modules (ice-9 match)
563 '(("-bootclasspath" ,bootcp)
568 (let ((classpath (getenv "CLASSPATH")))
570 (string-join (list ,ecj
571 ,(string-append (assoc-ref %build-inputs "jamvm")
575 (receive (vm-args other-args)
576 ;; Separate VM arguments from arguments to ECJ.
577 (partition (cut string-prefix? "-J" <>)
578 (fold (lambda (default acc)
579 (if (member (first default) acc)
580 acc (append default acc)))
584 ;; Remove "-J" prefix
585 (map (cut string-drop <> 2) vm-args)
586 '("org.eclipse.jdt.internal.compiler.batch.Main")
587 (cons "-nowarn" other-args)))))
589 (let ((args (cdr (command-line))))
591 (format (current-error-port) "javac: no arguments given!\n")
596 `(("guile" ,guile-2.2)
597 ("ecj-bootstrap" ,ecj-bootstrap)
598 ("jamvm" ,jamvm-1-bootstrap)
599 ("classpath" ,classpath-bootstrap)))
600 (description "This package provides a wrapper around the @dfn{Eclipse
601 compiler for Java} (ecj) with a command line interface that is compatible with
602 the standard javac executable.")))
604 ;; The classpath-bootstrap was built without a virtual machine, so it does not
605 ;; provide a wrapper for javah. We cannot build the development version of
606 ;; Classpath without javah.
607 (define classpath-0.99
608 (package (inherit classpath-bootstrap)
612 (uri (string-append "mirror://gnu/classpath/classpath-"
616 "1j7cby4k66f1nvckm48xcmh352b1d1b33qk7l6hi7dp9i9zjjagr"))
617 (patches (search-patches "classpath-aarch64-support.patch"))))
620 (list (string-append "--with-ecj-jar="
621 (assoc-ref %build-inputs "ecj-bootstrap")
622 "/share/java/ecj-bootstrap.jar")
623 (string-append "JAVAC="
624 (assoc-ref %build-inputs "ecj-javac-wrapper")
626 (string-append "JAVA="
627 (assoc-ref %build-inputs "jamvm")
630 "ac_cv_prog_java_works=yes" ; trust me
634 "--disable-gconf-peer"
640 (modify-phases %standard-phases
641 (add-after 'install 'install-data
642 (lambda _ (invoke "make" "install-data"))))))
644 `(("ecj-bootstrap" ,ecj-bootstrap)
645 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
647 ("jamvm" ,jamvm-1-bootstrap)
648 ("classpath" ,classpath-bootstrap)
650 ("pkg-config" ,pkg-config)))))
652 ;; We need this because classpath-bootstrap does not provide all of the tools
653 ;; we need to build classpath-devel.
654 (define classpath-jamvm-wrappers
655 (package (inherit classpath-0.99)
656 (name "classpath-jamvm-wrappers")
658 (build-system trivial-build-system)
660 `(#:modules ((guix build utils))
663 (use-modules (guix build utils))
664 (let* ((bash (assoc-ref %build-inputs "bash"))
665 (jamvm (assoc-ref %build-inputs "jamvm"))
666 (classpath (assoc-ref %build-inputs "classpath"))
667 (bin (string-append (assoc-ref %outputs "out")
670 (for-each (lambda (tool)
671 (with-output-to-file (string-append bin tool)
673 ,@(if (string-prefix? "armhf" (or (%current-system)
674 (%current-target-system)))
675 `((format #t "#!~a/bin/sh
676 ~a/bin/jamvm -Xnocompact -classpath ~a/share/classpath/tools.zip \
677 gnu.classpath.tools.~a.~a $@"
678 bash jamvm classpath tool
679 (if (string=? "native2ascii" tool)
680 "Native2ASCII" "Main")))
681 `((format #t "#!~a/bin/sh
682 ~a/bin/jamvm -Xnocompact -Xnoinlining -classpath ~a/share/classpath/tools.zip \
683 gnu.classpath.tools.~a.~a $@"
684 bash jamvm classpath tool
685 (if (string=? "native2ascii" tool)
686 "Native2ASCII" "Main"))))))
687 (chmod (string-append bin tool) #o755))
697 ("jamvm" ,jamvm-1-bootstrap)
698 ("classpath" ,classpath-0.99)))
700 (synopsis "Executables from GNU Classpath")
701 (description "This package provides wrappers around the tools provided by
702 the GNU Classpath library. They are executed by the JamVM virtual
705 ;; The last release of GNU Classpath is 0.99 and it happened in 2012. Since
706 ;; then Classpath has gained much more support for Java 1.6.
707 (define-public classpath-devel
708 (let ((commit "e7c13ee0cf2005206fbec0eca677f8cf66d5a103")
710 (package (inherit classpath-bootstrap)
711 (version (string-append "0.99-" revision "." (string-take commit 9)))
715 (url "https://git.savannah.gnu.org/git/classpath.git")
717 (file-name (string-append "classpath-" version "-checkout"))
720 "1v2rww76ww322mpg3s12a1kkc6gkp31bm9gcxs532h0wq285fiw4"))
721 (patches (search-patches "classpath-aarch64-support.patch"))))
724 ;; Ensure that the initial heap size is smaller than the maximum
725 ;; size. By default only Xmx is set, which can lead to invalid
726 ;; memory settings on some machines with a lot of memory.
727 '("JAVAC_MEM_OPT=-J-Xms512M -J-Xmx768M")
729 (list (string-append "--with-ecj-jar="
730 (assoc-ref %build-inputs "ecj-bootstrap")
731 "/share/java/ecj-bootstrap.jar")
732 (string-append "--with-javac="
733 (assoc-ref %build-inputs "ecj-javac-wrapper")
735 (string-append "JAVA="
736 (assoc-ref %build-inputs "jamvm")
739 "ac_cv_prog_java_works=yes" ; trust me
743 "--disable-gconf-peer"
749 (modify-phases %standard-phases
750 ;; XXX The bootstrap phase executes autogen.sh, which fails after
751 ;; complaining about the lack of gettext.
753 (lambda _ (invoke "autoreconf" "-vif")))
754 (add-after 'unpack 'remove-unsupported-annotations
756 (substitute* (find-files "java" "\\.java$")
759 (add-after 'install 'install-data
760 (lambda _ (invoke "make" "install-data"))))))
762 `(("autoconf" ,autoconf)
763 ("automake" ,automake)
765 ("gettext" ,gettext-minimal)
767 ("classpath-jamvm-wrappers" ,classpath-jamvm-wrappers) ; for javah
768 ("ecj-bootstrap" ,ecj-bootstrap)
769 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
771 ("jamvm" ,jamvm-1-bootstrap)
773 ("pkg-config" ,pkg-config))))))
776 (package (inherit jamvm-1-bootstrap)
780 (uri (string-append "mirror://sourceforge/jamvm/jamvm/"
781 "JamVM%20" version "/jamvm-"
785 "1nl0zxz8y5x8gwsrm7n32bry4dx8x70p8z3s9jbdvs8avyb8whkn"))
787 (search-patches "jamvm-2.0.0-disable-branch-patching.patch"
788 "jamvm-2.0.0-opcode-guard.patch"
789 "jamvm-2.0.0-aarch64-support.patch"))
792 ;; Remove precompiled software.
793 (delete-file "src/classlib/gnuclasspath/lib/classes.zip")
795 (build-system gnu-build-system)
797 (substitute-keyword-arguments (package-arguments jamvm-1-bootstrap)
798 ((#:configure-flags _)
799 '(list (string-append "--with-classpath-install-dir="
800 (assoc-ref %build-inputs "classpath"))))))
802 `(("classpath" ,classpath-devel)
803 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
807 (define ecj-javac-wrapper-final
808 (package (inherit ecj-javac-wrapper)
810 `(("guile" ,guile-2.2)
811 ("ecj-bootstrap" ,ecj-bootstrap)
813 ("classpath" ,classpath-devel)))))
815 ;; The bootstrap JDK consisting of jamvm, classpath-devel,
816 ;; ecj-javac-wrapper-final cannot build Icedtea 2.x directly, because it's
817 ;; written in Java 7. It can, however, build the unmaintained Icedtea 1.x,
818 ;; which uses Java 6 only.
819 (define-public icedtea-6
826 "http://icedtea.wildebeest.org/download/source/icedtea6-"
830 "0bg9sb4f7qbq77c0zf9m17p47ga0kf0r9622g9p12ysg26jd1ksg"))
831 (patches (search-patches
832 "icedtea-6-extend-hotspot-aarch64-support.patch"))
833 (modules '((guix build utils)))
836 (substitute* "Makefile.in"
837 ;; do not leak information about the build host
838 (("DISTRIBUTION_ID=\"\\$\\(DIST_ID\\)\"")
839 "DISTRIBUTION_ID=\"\\\"guix\\\"\""))
841 (build-system gnu-build-system)
842 (outputs '("out" ; Java Runtime Environment
843 "jdk" ; Java Development Kit
844 "doc")) ; all documentation
846 `(;; There are many failing tests and many are known to fail upstream.
849 ;; The DSOs use $ORIGIN to refer to each other, but (guix build
850 ;; gremlin) doesn't support it yet, so skip this phase.
851 #:validate-runpath? #f
853 #:modules ((guix build utils)
854 (guix build gnu-build-system)
858 `("--enable-bootstrap"
861 ,(string-append "--with-parallel-jobs="
862 (number->string (parallel-job-count)))
863 "--disable-downloading"
865 ,(string-append "--with-ecj="
866 (assoc-ref %build-inputs "ecj")
867 "/share/java/ecj-bootstrap.jar")
868 ,(string-append "--with-jar="
869 (assoc-ref %build-inputs "fastjar")
871 ,(string-append "--with-jdk-home="
872 (assoc-ref %build-inputs "classpath"))
873 ,(string-append "--with-java="
874 (assoc-ref %build-inputs "jamvm")
877 (modify-phases %standard-phases
879 (lambda* (#:key source inputs #:allow-other-keys)
880 (invoke "tar" "xvf" source)
881 (chdir (string-append "icedtea6-" ,version))
883 (copy-recursively (assoc-ref inputs "openjdk-src") "openjdk")
884 ;; The convenient OpenJDK source bundle is no longer
885 ;; available for download, so we have to take the sources
886 ;; from the Mercurial repositories and change the Makefile
887 ;; to avoid tests for the OpenJDK zip archive.
888 (with-directory-excursion "openjdk"
889 (for-each (lambda (part)
893 (string-append part "-src"))
895 '("jdk" "hotspot" "corba"
896 "langtools" "jaxp" "jaxws")))
897 (substitute* "patches/freetypeversion.patch"
898 (("REQUIRED_FREETYPE_VERSION = 2.2.1")
899 "REQUIRED_FREETYPE_VERSION = 2.10.1"))
900 (substitute* "Makefile.in"
901 (("echo \"ERROR: No up-to-date OpenJDK zip available\"; exit -1;")
902 "echo \"trust me\";")
903 ;; The contents of the bootstrap directory must be
904 ;; writeable but when copying from the store they are
906 (("mkdir -p lib/rt" line)
907 (string-append line "; chmod -R u+w $(BOOT_DIR)")))
908 (invoke "chmod" "-R" "u+w" "openjdk")))
909 (add-after 'unpack 'use-classpath
910 (lambda* (#:key inputs #:allow-other-keys)
911 (let ((jvmlib (assoc-ref inputs "classpath"))
912 (jamvm (assoc-ref inputs "jamvm")))
913 ;; Classpath does not provide rt.jar.
914 (substitute* "Makefile.in"
915 (("\\$\\(SYSTEM_JDK_DIR\\)/jre/lib/rt.jar")
916 (string-append jvmlib "/share/classpath/glibj.zip")))
917 ;; Make sure we can find all classes.
919 (string-append jvmlib "/share/classpath/glibj.zip:"
920 jvmlib "/share/classpath/tools.zip:"
921 jamvm "/lib/rt.jar"))
923 (string-append "-cp "
924 jvmlib "/share/classpath/glibj.zip:"
925 jvmlib "/share/classpath/tools.zip")))
927 (add-after 'unpack 'patch-patches
929 ;; shebang in patches so that they apply cleanly
930 (substitute* '("patches/jtreg-jrunscript.patch"
931 "patches/hotspot/hs23/drop_unlicensed_test.patch")
932 (("#!/bin/sh") (string-append "#!" (which "sh"))))
934 (add-after 'unpack 'patch-paths
935 (lambda* (#:key inputs #:allow-other-keys)
936 ;; buildtree.make generates shell scripts, so we need to replace
937 ;; the generated shebang
938 (substitute* '("openjdk/hotspot/make/linux/makefiles/buildtree.make")
939 (("/bin/sh") (which "bash")))
941 (let ((corebin (string-append
942 (assoc-ref inputs "coreutils") "/bin/"))
943 (binbin (string-append
944 (assoc-ref inputs "binutils") "/bin/"))
945 (grepbin (string-append
946 (assoc-ref inputs "grep") "/bin/")))
947 (substitute* '("openjdk/jdk/make/common/shared/Defs-linux.gmk"
948 "openjdk/corba/make/common/shared/Defs-linux.gmk")
949 (("UNIXCOMMAND_PATH = /bin/")
950 (string-append "UNIXCOMMAND_PATH = " corebin))
951 (("USRBIN_PATH = /usr/bin/")
952 (string-append "USRBIN_PATH = " corebin))
953 (("DEVTOOLS_PATH *= */usr/bin/")
954 (string-append "DEVTOOLS_PATH = " corebin))
955 (("COMPILER_PATH *= */usr/bin/")
956 (string-append "COMPILER_PATH = "
957 (assoc-ref inputs "gcc") "/bin/"))
958 (("DEF_OBJCOPY *=.*objcopy")
959 (string-append "DEF_OBJCOPY = " (which "objcopy"))))
961 ;; fix path to alsa header
962 (substitute* "openjdk/jdk/make/common/shared/Sanity.gmk"
963 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
964 (string-append "ALSA_INCLUDE="
965 (assoc-ref inputs "alsa-lib")
966 "/include/alsa/version.h")))
968 ;; fix hard-coded utility paths
969 (substitute* '("openjdk/jdk/make/common/shared/Defs-utils.gmk"
970 "openjdk/corba/make/common/shared/Defs-utils.gmk")
972 (string-append "ECHO = " (which "echo")))
974 (string-append "GREP = " (which "grep")))
976 (string-append "EGREP = " (which "egrep")))
978 (string-append "CPIO = " (which "cpio")))
979 (("READELF *=.*readelf")
980 (string-append "READELF = " (which "readelf")))
982 (string-append "AR = " (which "ar")))
984 (string-append "TAR = " (which "tar")))
986 (string-append "AS = " (which "as")))
988 (string-append "LD = " (which "ld")))
990 (string-append "STRIP = " (which "strip")))
992 (string-append "NM = " (which "nm")))
994 (string-append "SH = " (which "bash")))
996 (string-append "FIND = " (which "find")))
998 (string-append "LDD = " (which "ldd")))
999 (("NAWK *=.*(n|g)awk")
1000 (string-append "NAWK = " (which "gawk")))
1001 (("XARGS *=.*xargs")
1002 (string-append "XARGS = " (which "xargs")))
1003 (("UNZIP *=.*unzip")
1004 (string-append "UNZIP = " (which "unzip")))
1006 (string-append "ZIPEXE = " (which "zip")))
1008 (string-append "SED = " (which "sed"))))
1010 ;; Some of these timestamps cause problems as they are more than
1011 ;; 10 years ago, failing the build process.
1013 "openjdk/jdk/src/share/classes/java/util/CurrencyData.properties"
1014 (("AZ=AZM;2005-12-31-20-00-00;AZN") "AZ=AZN")
1015 (("MZ=MZM;2006-06-30-22-00-00;MZN") "MZ=MZN")
1016 (("RO=ROL;2005-06-30-21-00-00;RON") "RO=RON")
1017 (("TR=TRL;2004-12-31-22-00-00;TRY") "TR=TRY"))
1019 (add-before 'configure 'set-additional-paths
1020 (lambda* (#:key inputs #:allow-other-keys)
1022 (string-append (assoc-ref inputs "libxrender")
1023 "/include/X11/extensions" ":"
1024 (assoc-ref inputs "libxtst")
1025 "/include/X11/extensions" ":"
1026 (assoc-ref inputs "libxinerama")
1027 "/include/X11/extensions" ":"
1028 (or (getenv "CPATH") "")))
1029 (setenv "ALT_CUPS_HEADERS_PATH"
1030 (string-append (assoc-ref inputs "cups")
1032 (setenv "ALT_FREETYPE_HEADERS_PATH"
1033 (string-append (assoc-ref inputs "freetype")
1035 (setenv "ALT_FREETYPE_LIB_PATH"
1036 (string-append (assoc-ref inputs "freetype")
1039 (add-before 'build 'disable-os-version-check
1040 ;; allow build on linux major version change
1042 (setenv "DISABLE_HOTSPOT_OS_VERSION_CHECK" "ok")
1045 (lambda* (#:key outputs #:allow-other-keys)
1046 (let ((doc (string-append (assoc-ref outputs "doc")
1047 "/share/doc/icedtea"))
1048 (jre (assoc-ref outputs "out"))
1049 (jdk (assoc-ref outputs "jdk")))
1050 (copy-recursively "openjdk.build/docs" doc)
1051 (copy-recursively "openjdk.build/j2re-image" jre)
1052 (copy-recursively "openjdk.build/j2sdk-image" jdk))
1055 `(("ant" ,ant-bootstrap)
1056 ("alsa-lib" ,alsa-lib)
1058 ("classpath" ,classpath-devel)
1059 ("coreutils" ,coreutils)
1062 ("ecj" ,ecj-bootstrap)
1063 ("ecj-javac" ,ecj-javac-wrapper-final)
1064 ("fastjar" ,fastjar)
1065 ("fontconfig" ,fontconfig)
1066 ("freetype" ,freetype)
1073 ("libjpeg" ,libjpeg-turbo)
1076 ("libtool" ,libtool)
1078 ("libxcomposite" ,libxcomposite)
1080 ("libxinerama" ,libxinerama)
1081 ("libxrender" ,libxrender)
1082 ("libxslt" ,libxslt) ;for xsltproc
1084 ("libxtst" ,libxtst)
1085 ("mit-krb5" ,mit-krb5)
1087 ("nss-certs" ,nss-certs)
1089 ("pkg-config" ,pkg-config)
1090 ("procps" ,procps) ;for "free", even though I'm not sure we should use it
1100 (url "http://hg.openjdk.java.net/jdk6/jdk6/")
1101 (changeset "jdk6-b41")))
1104 "14q47yfg586fs64w30g8mk92m5dkxsvr36zzh0ra99xk5x0x96mv"))))
1109 (url "http://hg.openjdk.java.net/jdk6/jdk6/jdk/")
1110 (changeset "jdk6-b41")))
1113 "165824nhg1k1dx6zs9dny0j49rmk35jw5b13dmz8c77jfajml4v9"))))
1118 (url "http://hg.openjdk.java.net/jdk6/jdk6/hotspot/")
1119 (changeset "jdk6-b41")))
1122 "07lc1z4k5dj9nrc1wvwmpvxr3xgxrdkdh53xb95skk5ij49yagfd"))))
1127 (url "http://hg.openjdk.java.net/jdk6/jdk6/corba/")
1128 (changeset "jdk6-b41")))
1131 "1p9g1r9dnax2iwp7yb59qx7m4nmshqhwmrb2b8jj8zgbd9dl2i3q"))))
1136 (url "http://hg.openjdk.java.net/jdk6/jdk6/langtools/")
1137 (changeset "jdk6-b41")))
1140 "1x52wd67fynbbd9ild6fb4wvba3f5hhwk03qdjfazd0a1qr37z3d"))))
1145 (url "http://hg.openjdk.java.net/jdk6/jdk6/jaxp/")
1146 (changeset "jdk6-b41")))
1149 "0shlqrvzpr4nrkmv215lbxnby63s3yvbdh1yxcayznsyqwa4nlxm"))))
1154 (url "http://hg.openjdk.java.net/jdk6/jdk6/jaxws/")
1155 (changeset "jdk6-b41")))
1158 "0835lkw8vib1xhp8lxnybhlvzdh699hbi4mclxanydjk63zbpxk0"))))))
1159 (home-page "http://icedtea.classpath.org")
1160 (synopsis "Java development kit")
1162 "This package provides the OpenJDK built with the IcedTea build harness.
1163 This version of the OpenJDK is no longer maintained and is only used for
1164 bootstrapping purposes.")
1165 ;; IcedTea is released under the GPL2 + Classpath exception, which is the
1166 ;; same license as both GNU Classpath and OpenJDK.
1167 (license license:gpl2+)))
1169 (define-public icedtea-7
1170 (let* ((version "2.6.13")
1171 (drop (lambda (name hash)
1175 "http://icedtea.classpath.org/download/drops"
1176 "/icedtea7/" version "/" name ".tar.bz2"))
1177 (sha256 (base32 hash))))))
1184 "http://icedtea.wildebeest.org/download/source/icedtea-"
1188 "1w331rdqx1dcx2xb0fmjmrkdc71xqn20fxsgw8by4xhiblh88khh"))
1189 (modules '((guix build utils)))
1192 (substitute* "Makefile.in"
1193 ;; do not leak information about the build host
1194 (("DISTRIBUTION_ID=\"\\$\\(DIST_ID\\)\"")
1195 "DISTRIBUTION_ID=\"\\\"guix\\\"\""))
1197 (build-system gnu-build-system)
1198 (outputs '("out" ; Java Runtime Environment
1199 "jdk" ; Java Development Kit
1200 "doc")) ; all documentation
1202 `(;; There are many test failures. Some are known to
1203 ;; fail upstream, others relate to not having an X
1204 ;; server running at test time, yet others are a
1205 ;; complete mystery to me.
1207 ;; hotspot: passed: 241; failed: 45; error: 2
1208 ;; langtools: passed: 1,934; failed: 26
1212 ;; The DSOs use $ORIGIN to refer to each other, but (guix build
1213 ;; gremlin) doesn't support it yet, so skip this phase.
1214 #:validate-runpath? #f
1216 ;; Apparently, the C locale is needed for some of the tests.
1219 #:modules ((guix build utils)
1220 (guix build gnu-build-system)
1227 ;; TODO: package pcsc and sctp, and add to inputs
1228 `("--disable-system-pcsc"
1229 "--disable-system-sctp"
1230 "--enable-bootstrap"
1233 ,(string-append "--with-parallel-jobs="
1234 (number->string (parallel-job-count)))
1235 "--disable-downloading"
1236 "--disable-tests" ;they are run in the check phase instead
1237 "--with-openjdk-src-dir=./openjdk.src"
1238 ,(string-append "--with-jdk-home="
1239 (assoc-ref %build-inputs "jdk")))
1242 (modify-phases %standard-phases
1244 (lambda* (#:key source inputs #:allow-other-keys)
1245 (let ((target (string-append "icedtea-" ,version))
1246 (unpack (lambda* (name #:optional dir)
1248 (string-drop-right name 5))))
1251 (assoc-ref inputs name)
1253 "--strip-components=1")))))
1255 (invoke "tar" "xvf" source
1256 "-C" target "--strip-components=1")
1258 (unpack "openjdk-src" "openjdk.src")
1259 (with-directory-excursion "openjdk.src"
1261 (filter (cut string-suffix? "-drop" <>)
1266 (add-after 'unpack 'patch-bitrot
1268 (substitute* '("patches/boot/revert-6973616.patch"
1269 "openjdk.src/jdk/make/common/shared/Defs-versions.gmk")
1270 (("REQUIRED_FREETYPE_VERSION = 2.2.1")
1271 "REQUIRED_FREETYPE_VERSION = 2.10.1"))
1272 ;; As of attr 2.4.48 this header is no longer
1273 ;; included. It is provided by the libc instead.
1274 (substitute* '("configure"
1275 "openjdk.src/jdk/src/solaris/native/sun/nio/fs/LinuxNativeDispatcher.c")
1276 (("attr/xattr.h") "sys/xattr.h"))
1278 (add-after 'unpack 'fix-x11-extension-include-path
1279 (lambda* (#:key inputs #:allow-other-keys)
1280 (substitute* "openjdk.src/jdk/make/sun/awt/mawt.gmk"
1281 (((string-append "\\$\\(firstword \\$\\(wildcard "
1282 "\\$\\(OPENWIN_HOME\\)"
1283 "/include/X11/extensions\\).*$"))
1284 (string-append (assoc-ref inputs "libxrender")
1285 "/include/X11/extensions"
1286 " -I" (assoc-ref inputs "libxtst")
1287 "/include/X11/extensions"
1288 " -I" (assoc-ref inputs "libxinerama")
1289 "/include/X11/extensions"))
1290 (("\\$\\(wildcard /usr/include/X11/extensions\\)\\)") ""))
1292 (add-after 'unpack 'patch-paths
1294 ;; buildtree.make generates shell scripts, so we need to replace
1295 ;; the generated shebang
1296 (substitute* '("openjdk.src/hotspot/make/linux/makefiles/buildtree.make")
1297 (("/bin/sh") (which "bash")))
1299 (let ((corebin (string-append
1300 (assoc-ref %build-inputs "coreutils") "/bin/"))
1301 (binbin (string-append
1302 (assoc-ref %build-inputs "binutils") "/bin/"))
1303 (grepbin (string-append
1304 (assoc-ref %build-inputs "grep") "/bin/")))
1305 (substitute* '("openjdk.src/jdk/make/common/shared/Defs-linux.gmk"
1306 "openjdk.src/corba/make/common/shared/Defs-linux.gmk")
1307 (("UNIXCOMMAND_PATH = /bin/")
1308 (string-append "UNIXCOMMAND_PATH = " corebin))
1309 (("USRBIN_PATH = /usr/bin/")
1310 (string-append "USRBIN_PATH = " corebin))
1311 (("DEVTOOLS_PATH *= */usr/bin/")
1312 (string-append "DEVTOOLS_PATH = " corebin))
1313 (("COMPILER_PATH *= */usr/bin/")
1314 (string-append "COMPILER_PATH = "
1315 (assoc-ref %build-inputs "gcc") "/bin/"))
1316 (("DEF_OBJCOPY *=.*objcopy")
1317 (string-append "DEF_OBJCOPY = " (which "objcopy"))))
1319 ;; fix path to alsa header
1320 (substitute* "openjdk.src/jdk/make/common/shared/Sanity.gmk"
1321 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
1322 (string-append "ALSA_INCLUDE="
1323 (assoc-ref %build-inputs "alsa-lib")
1324 "/include/alsa/version.h")))
1326 ;; fix hard-coded utility paths
1327 (substitute* '("openjdk.src/jdk/make/common/shared/Defs-utils.gmk"
1328 "openjdk.src/corba/make/common/shared/Defs-utils.gmk")
1330 (string-append "ECHO = " (which "echo")))
1332 (string-append "GREP = " (which "grep")))
1333 (("EGREP *=.*egrep")
1334 (string-append "EGREP = " (which "egrep")))
1336 (string-append "CPIO = " (which "cpio")))
1337 (("READELF *=.*readelf")
1338 (string-append "READELF = " (which "readelf")))
1340 (string-append "AR = " (which "ar")))
1342 (string-append "TAR = " (which "tar")))
1344 (string-append "AS = " (which "as")))
1346 (string-append "LD = " (which "ld")))
1347 (("STRIP *=.*strip")
1348 (string-append "STRIP = " (which "strip")))
1350 (string-append "NM = " (which "nm")))
1352 (string-append "SH = " (which "bash")))
1354 (string-append "FIND = " (which "find")))
1356 (string-append "LDD = " (which "ldd")))
1357 (("NAWK *=.*(n|g)awk")
1358 (string-append "NAWK = " (which "gawk")))
1359 (("XARGS *=.*xargs")
1360 (string-append "XARGS = " (which "xargs")))
1361 (("UNZIP *=.*unzip")
1362 (string-append "UNZIP = " (which "unzip")))
1364 (string-append "ZIPEXE = " (which "zip")))
1366 (string-append "SED = " (which "sed"))))
1368 ;; Some of these timestamps cause problems as they are more than
1369 ;; 10 years ago, failing the build process.
1371 "openjdk.src/jdk/src/share/classes/java/util/CurrencyData.properties"
1372 (("AZ=AZM;2005-12-31-20-00-00;AZN") "AZ=AZN")
1373 (("MZ=MZM;2006-06-30-22-00-00;MZN") "MZ=MZN")
1374 (("RO=ROL;2005-06-30-21-00-00;RON") "RO=RON")
1375 (("TR=TRL;2004-12-31-22-00-00;TRY") "TR=TRY")))
1377 (add-before 'configure 'set-additional-paths
1378 (lambda* (#:key inputs #:allow-other-keys)
1379 (substitute* "openjdk.src/jdk/make/common/shared/Sanity.gmk"
1380 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
1381 (string-append "ALSA_INCLUDE="
1382 (assoc-ref inputs "alsa-lib")
1383 "/include/alsa/version.h")))
1386 (string-append (assoc-ref inputs "libxcomposite")
1387 "/include/X11/extensions" ":"
1388 (assoc-ref inputs "libxrender")
1389 "/include/X11/extensions" ":"
1390 (assoc-ref inputs "libxtst")
1391 "/include/X11/extensions" ":"
1392 (assoc-ref inputs "libxinerama")
1393 "/include/X11/extensions" ":"
1394 (or (getenv "CPATH") "")))
1395 (setenv "ALT_OBJCOPY" (which "objcopy"))
1396 (setenv "ALT_CUPS_HEADERS_PATH"
1397 (string-append (assoc-ref inputs "cups")
1399 (setenv "ALT_FREETYPE_HEADERS_PATH"
1400 (string-append (assoc-ref inputs "freetype")
1402 (setenv "ALT_FREETYPE_LIB_PATH"
1403 (string-append (assoc-ref inputs "freetype")
1406 (add-before 'build 'disable-os-version-check
1407 ;; allow build on linux major version change
1409 (setenv "DISABLE_HOTSPOT_OS_VERSION_CHECK" "ok")
1411 (add-before 'check 'fix-test-framework
1413 ;; Fix PATH in test environment
1414 (substitute* "test/jtreg/com/sun/javatest/regtest/Main.java"
1415 (("PATH=/bin:/usr/bin")
1416 (string-append "PATH=" (getenv "PATH"))))
1417 (substitute* "test/jtreg/com/sun/javatest/util/SysEnv.java"
1418 (("/usr/bin/env") (which "env")))
1419 (substitute* "openjdk.src/hotspot/test/test_env.sh"
1420 (("/bin/rm") (which "rm"))
1421 (("/bin/cp") (which "cp"))
1422 (("/bin/mv") (which "mv")))
1424 (add-before 'check 'fix-hotspot-tests
1426 (with-directory-excursion "openjdk.src/hotspot/test/"
1427 (substitute* "jprt.config"
1428 (("PATH=\"\\$\\{path4sdk\\}\"")
1429 (string-append "PATH=" (getenv "PATH")))
1430 (("make=/usr/bin/make")
1431 (string-append "make=" (which "make"))))
1432 (substitute* '("runtime/6626217/Test6626217.sh"
1433 "runtime/7110720/Test7110720.sh")
1434 (("/bin/rm") (which "rm"))
1435 (("/bin/cp") (which "cp"))
1436 (("/bin/mv") (which "mv"))))
1438 (add-before 'check 'fix-jdk-tests
1440 (with-directory-excursion "openjdk.src/jdk/test/"
1441 (substitute* "com/sun/jdi/JdbReadTwiceTest.sh"
1442 (("/bin/pwd") (which "pwd")))
1443 (substitute* "com/sun/jdi/ShellScaffold.sh"
1444 (("/bin/kill") (which "kill")))
1445 (substitute* "start-Xvfb.sh"
1446 ;;(("/usr/bin/X11/Xvfb") (which "Xvfb"))
1447 (("/usr/bin/nohup") (which "nohup")))
1448 (substitute* "javax/security/auth/Subject/doAs/Test.sh"
1449 (("/bin/rm") (which "rm")))
1450 (substitute* "tools/launcher/MultipleJRE.sh"
1451 (("echo \"#!/bin/sh\"")
1452 (string-append "echo \"#!" (which "rm") "\""))
1453 (("/usr/bin/zip") (which "zip")))
1454 (substitute* "com/sun/jdi/OnThrowTest.java"
1455 (("#!/bin/sh") (string-append "#!" (which "sh"))))
1456 (substitute* "java/lang/management/OperatingSystemMXBean/GetSystemLoadAverage.java"
1457 (("/usr/bin/uptime") (which "uptime")))
1458 (substitute* "java/lang/ProcessBuilder/Basic.java"
1459 (("/usr/bin/env") (which "env"))
1460 (("/bin/false") (which "false"))
1461 (("/bin/true") (which "true"))
1462 (("/bin/cp") (which "cp"))
1463 (("/bin/sh") (which "sh")))
1464 (substitute* "java/lang/ProcessBuilder/FeelingLucky.java"
1465 (("/bin/sh") (which "sh")))
1466 (substitute* "java/lang/ProcessBuilder/Zombies.java"
1467 (("/usr/bin/perl") (which "perl"))
1468 (("/bin/ps") (which "ps"))
1469 (("/bin/true") (which "true")))
1470 (substitute* "java/lang/Runtime/exec/ConcurrentRead.java"
1471 (("/usr/bin/tee") (which "tee")))
1472 (substitute* "java/lang/Runtime/exec/ExecWithDir.java"
1473 (("/bin/true") (which "true")))
1474 (substitute* "java/lang/Runtime/exec/ExecWithInput.java"
1475 (("/bin/cat") (which "cat")))
1476 (substitute* "java/lang/Runtime/exec/ExitValue.java"
1477 (("/bin/sh") (which "sh"))
1478 (("/bin/true") (which "true"))
1479 (("/bin/kill") (which "kill")))
1480 (substitute* "java/lang/Runtime/exec/LotsOfDestroys.java"
1481 (("/usr/bin/echo") (which "echo")))
1482 (substitute* "java/lang/Runtime/exec/LotsOfOutput.java"
1483 (("/usr/bin/cat") (which "cat")))
1484 (substitute* "java/lang/Runtime/exec/SleepyCat.java"
1485 (("/bin/cat") (which "cat"))
1486 (("/bin/sleep") (which "sleep"))
1487 (("/bin/sh") (which "sh")))
1488 (substitute* "java/lang/Runtime/exec/StreamsSurviveDestroy.java"
1489 (("/bin/cat") (which "cat")))
1490 (substitute* "java/rmi/activation/CommandEnvironment/SetChildEnv.java"
1491 (("/bin/chmod") (which "chmod")))
1492 (substitute* "java/util/zip/ZipFile/Assortment.java"
1493 (("/bin/sh") (which "sh"))))
1497 ;; The "make check-*" targets always return zero, so we need to
1498 ;; check for errors in the associated log files to determine
1499 ;; whether any tests have failed.
1500 (use-modules (ice-9 rdelim))
1501 (let* ((error-pattern (make-regexp "^(Error|FAILED):.*"))
1502 (checker (lambda (port)
1504 (let ((line (read-line port)))
1506 ((eof-object? line) #t)
1507 ((regexp-exec error-pattern line)
1508 (error "test failed"))
1510 (run-test (lambda (test)
1511 (invoke "make" test)
1512 (call-with-input-file
1513 (string-append "test/" test ".log")
1515 (when #f ; skip tests
1516 (run-test "check-hotspot")
1517 (run-test "check-langtools")
1518 (run-test "check-jdk"))
1521 (lambda* (#:key outputs #:allow-other-keys)
1522 (let ((doc (string-append (assoc-ref outputs "doc")
1523 "/share/doc/icedtea"))
1524 (jre (assoc-ref outputs "out"))
1525 (jdk (assoc-ref outputs "jdk")))
1526 (copy-recursively "openjdk.build/docs" doc)
1527 (copy-recursively "openjdk.build/j2re-image" jre)
1528 (copy-recursively "openjdk.build/j2sdk-image" jdk))
1530 ;; Some of the libraries in the lib/amd64 folder link to libjvm.so.
1531 ;; But that shared object is located in the server/ folder, so it
1532 ;; cannot be found. This phase creates a symbolic link in the
1533 ;; lib/amd64 folder so that the other libraries can find it.
1536 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
1538 ;; FIXME: Find the bug in the build system, so that this symlink is
1540 (add-after 'install 'install-libjvm
1541 (lambda* (#:key inputs outputs #:allow-other-keys)
1542 (let* ((lib-path (string-append (assoc-ref outputs "out")
1543 ;; See 'INSTALL_ARCH_DIR' in
1545 ,(match (%current-system)
1554 ;; We need a catch-all, dropping
1555 ;; '-linux' works in most cases.
1560 (%current-system) 6)))))))
1561 (symlink (string-append lib-path "/server/libjvm.so")
1562 (string-append lib-path "/libjvm.so")))
1564 ;; By default IcedTea only generates an empty keystore. In order to
1565 ;; be able to use certificates in Java programs we need to generate a
1566 ;; keystore from a set of certificates. For convenience we use the
1567 ;; certificates from the nss-certs package.
1568 (add-after 'install 'install-keystore
1569 (lambda* (#:key inputs outputs #:allow-other-keys)
1570 (let* ((keystore "cacerts")
1571 (certs-dir (string-append (assoc-ref inputs "nss-certs")
1573 (keytool (string-append (assoc-ref outputs "jdk")
1575 (define (extract-cert file target)
1576 (call-with-input-file file
1578 (call-with-output-file target
1580 (let loop ((line (read-line in 'concat))
1583 ((eof-object? line) #t)
1584 ((string-prefix? "-----BEGIN" line)
1586 (loop (read-line in 'concat) #t))
1587 ((string-prefix? "-----END" line)
1591 (when copying? (display line out))
1592 (loop (read-line in 'concat) copying?)))))))))
1593 (define (import-cert cert)
1594 (format #t "Importing certificate ~a\n" (basename cert))
1595 (let ((temp "tmpcert"))
1596 (extract-cert cert temp)
1597 (let ((port (open-pipe* OPEN_WRITE keytool
1599 "-alias" (basename cert)
1600 "-keystore" keystore
1601 "-storepass" "changeit"
1603 (display "yes\n" port)
1604 (when (not (zero? (status:exit-val (close-pipe port))))
1605 (format #t "failed to import ~a\n" cert)))
1606 (delete-file temp)))
1608 ;; This is necessary because the certificate directory contains
1609 ;; files with non-ASCII characters in their names.
1610 (setlocale LC_ALL "en_US.utf8")
1611 (setenv "LC_ALL" "en_US.utf8")
1613 (for-each import-cert (find-files certs-dir "\\.pem$"))
1614 (mkdir-p (string-append (assoc-ref outputs "out")
1616 (mkdir-p (string-append (assoc-ref outputs "jdk")
1617 "/jre/lib/security"))
1619 ;; The cacerts files we are going to overwrite are chmod'ed as
1620 ;; read-only (444) in icedtea-8 (which derives from this
1621 ;; package). We have to change this so we can overwrite them.
1622 (chmod (string-append (assoc-ref outputs "out")
1623 "/lib/security/" keystore) #o644)
1624 (chmod (string-append (assoc-ref outputs "jdk")
1625 "/jre/lib/security/" keystore) #o644)
1627 (install-file keystore
1628 (string-append (assoc-ref outputs "out")
1630 (install-file keystore
1631 (string-append (assoc-ref outputs "jdk")
1632 "/jre/lib/security"))
1637 "0l34ikyf62hbzlf9032alzkkqvf7bpmckz4gvirvph755w7gka8l"))
1640 "050gv2jbg1pi6qkn8w18bwpbklfa5b0kymjvan9pncddbj8m84fz"))
1643 "1k6yldwnxfzdg5926r1nlfv8d1r1j7rlp2nkz6gqh05vgyamnfhl"))
1646 "110j7jlz47x2gg6f7653x12mssan5kvj9l9h1m1c8c92drfxbqyk"))
1649 "0d1mca38ksxvdskp9im3pp7fdijhj1n3lwq9w13r9s4v3qyskgdd"))
1652 "0nq5236fzxn3p6x8cgncl56mzcmsj07q9gymysnws4c8byc6n0qj"))
1657 "http://icedtea.classpath.org/downloads/drops"
1658 "/icedtea7/" version "/hotspot.tar.bz2"))
1661 "17bdv39n4lh8l5737c96f3xgamx4y305m067p01cywgp7zaddqws"))
1662 (patches (search-patches
1663 "icedtea-7-hotspot-aarch64-use-c++98.patch"))))
1664 ("ant" ,ant-bootstrap)
1666 ("coreutils" ,coreutils)
1667 ("diffutils" ,diffutils) ;for tests
1670 ("libtool" ,libtool)
1671 ("pkg-config" ,pkg-config)
1677 ("fastjar" ,fastjar)
1678 ("libxslt" ,libxslt) ;for xsltproc
1679 ("nss-certs" ,nss-certs)
1681 ("procps" ,procps) ;for "free", even though I'm not sure we should use it
1682 ("jdk" ,icedtea-6 "jdk")))
1684 `(("alsa-lib" ,alsa-lib)
1687 ("libxcomposite" ,libxcomposite)
1689 ("libxtst" ,libxtst)
1691 ("libxinerama" ,libxinerama)
1692 ("libxrender" ,libxrender)
1693 ("libjpeg" ,libjpeg-turbo)
1695 ("mit-krb5" ,mit-krb5)
1698 ("fontconfig" ,fontconfig)
1699 ("freetype" ,freetype)
1703 (home-page "http://icedtea.classpath.org")
1704 (synopsis "Java development kit")
1706 "This package provides the Java development kit OpenJDK built with the
1707 IcedTea build harness.")
1709 ;; 'configure' lists "mips" and "mipsel", but not "mips64el'.
1710 (supported-systems (delete "mips64el-linux" %supported-systems))
1712 ;; IcedTea is released under the GPL2 + Classpath exception, which is the
1713 ;; same license as both GNU Classpath and OpenJDK.
1714 (license license:gpl2+))))
1716 (define-public icedtea-8
1717 (let* ((version "3.7.0")
1718 (drop (lambda (name hash)
1722 "http://icedtea.classpath.org/download/drops"
1723 "/icedtea8/" version "/" name ".tar.xz"))
1724 (sha256 (base32 hash))))))
1725 (package (inherit icedtea-7)
1730 "http://icedtea.wildebeest.org/download/source/icedtea-"
1734 "09yqzn8rpccs7cyv89hhy5zlznpgqw5x3jz0w1ccp0cz1vgs8l5w"))
1735 (modules '((guix build utils)))
1738 (substitute* '("configure"
1740 ;; Do not embed build time
1741 (("(DIST_ID=\"Custom build).*$" _ prefix)
1742 (string-append prefix "\"\n"))
1743 ;; Do not leak information about the build host
1744 (("DIST_NAME=\"\\$build_os\"")
1745 "DIST_NAME=\"guix\""))
1748 `(#:imported-modules
1749 ((guix build ant-build-system)
1750 (guix build syscalls)
1751 ,@%gnu-build-system-modules)
1752 ,@(substitute-keyword-arguments (package-arguments icedtea-7)
1753 ((#:modules modules)
1754 `((guix build utils)
1755 (guix build gnu-build-system)
1756 ((guix build ant-build-system) #:prefix ant:)
1761 ((#:configure-flags flags)
1762 `(let ((jdk (assoc-ref %build-inputs "jdk")))
1763 `( ;;"--disable-bootstrap"
1764 "--enable-bootstrap"
1766 ,(string-append "--with-parallel-jobs="
1767 (number->string (parallel-job-count)))
1768 "--disable-downloading"
1769 "--disable-system-pcsc"
1770 "--disable-system-sctp"
1771 "--disable-tests" ;they are run in the check phase instead
1772 "--with-openjdk-src-dir=./openjdk.src"
1773 ,(string-append "--with-jdk-home=" jdk))))
1775 `(modify-phases ,phases
1776 (delete 'fix-x11-extension-include-path)
1777 (delete 'patch-paths)
1778 (delete 'set-additional-paths)
1779 (delete 'patch-patches)
1780 (delete 'patch-bitrot)
1781 ;; Prevent the keytool from recording the current time when
1782 ;; adding certificates at build time.
1783 (add-after 'unpack 'patch-keystore
1785 (substitute* "openjdk.src/jdk/src/share/classes/sun/security/provider/JavaKeyStore.java"
1786 (("date = new Date\\(\\);")
1788 date = (System.getenv(\"SOURCE_DATE_EPOCH\") != null) ?\
1789 new Date(Long.parseLong(System.getenv(\"SOURCE_DATE_EPOCH\"))) :\
1792 (add-after 'unpack 'patch-jni-libs
1793 ;; Hardcode dynamically loaded libraries.
1795 (let* ((library-path (search-path-as-string->list
1796 (getenv "LIBRARY_PATH")))
1797 (find-library (lambda (name)
1800 (string-append "lib" name ".so")))))
1803 (catch 'decoding-error
1806 (("VERSIONED_JNI_LIB_NAME\\(\"(.*)\", \"(.*)\"\\)"
1808 (format #f "\"~a\"" (find-library name)))
1809 (("JNI_LIB_NAME\\(\"(.*)\"\\)" _ name)
1810 (format #f "\"~a\"" (find-library name)))))
1812 ;; Those are safe to skip.
1813 (format (current-error-port)
1814 "warning: failed to substitute: ~a~%"
1816 (find-files "openjdk.src/jdk/src/solaris/native"
1820 (lambda* (#:key outputs #:allow-other-keys)
1821 (let ((doc (string-append (assoc-ref outputs "doc")
1822 "/share/doc/icedtea"))
1823 (jre (assoc-ref outputs "out"))
1824 (jdk (assoc-ref outputs "jdk")))
1825 (copy-recursively "openjdk.build/docs" doc)
1826 (copy-recursively "openjdk.build/images/j2re-image" jre)
1827 (copy-recursively "openjdk.build/images/j2sdk-image" jdk)
1828 ;; Install the nss.cfg file to JRE to enable SSL/TLS
1830 (copy-file (string-append jdk "/jre/lib/security/nss.cfg")
1831 (string-append jre "/lib/security/nss.cfg"))
1833 (add-after 'install 'strip-jar-timestamps
1834 (assoc-ref ant:%standard-phases 'strip-jar-timestamps)))))))
1836 `(("jdk" ,icedtea-7 "jdk")
1839 "1mj6xgmw31i6qd30qi9dmv7160fbcfq5ikz1jwjihdg2793il19p"))
1842 "1wb8k5zm40zld0986dvmlh5xh3gyixbg9h26sl662zy92amhmyyg"))
1845 "11ma4zz0599cy70xd219v7a8vin7p96xrhhz3wsaw6cjhkzpagah"))
1848 "14m1y0z0fbm5z5zjw3vnq85py8dma84bi3f9cw8rhdyc6skk8q4i"))
1851 "09andnm6xaasnp963hgx42yiflifiljp9z7z85jrfyc5z8a5whmf"))
1854 "0s6lcpc0zckz2fnq98aqf28nz9y3wbi41a3kyaqqa2abwbkm1zwl"))
1857 "15wizy123vhk40chl1b4p552jf2pw2hdww0myf11qab425axz4nw"))
1860 "1ciz1w9j0kz7s1dxdhyqq71nla9icyz6qvn0b9z2zgkklqa98qmm"))
1863 "19pzl3ppaw8j6r5cnyp8qiw3hxijh3hdc46l39g5yfhdl4pr4hpa"))
1866 "0k33anxdzw1icn072wynfmmdjhsv50hay0j1sfkfxny12rb3vgdy"))
1867 ,@(fold alist-delete (package-native-inputs icedtea-7)
1868 '("jdk" "openjdk-src" "corba-drop" "jaxp-drop" "jaxws-drop"
1869 "jdk-drop" "langtools-drop" "hotspot-drop")))))))
1871 (define-public openjdk9
1877 (uri "https://hg.openjdk.java.net/jdk/jdk/archive/3cc80be736f2.tar.bz2")
1878 (file-name (string-append name "-" version ".tar.bz2"))
1881 "01ihmyf7k5z17wbr7xig7y40l9f01d5zjgkcmawn1102hw5kchpq"))
1882 (modules '((guix build utils)))
1885 (for-each delete-file
1886 (find-files "." ".*.(bin|exe|jar)$"))
1888 (build-system gnu-build-system)
1889 (outputs '("out" "jdk" "doc"))
1891 `(#:tests? #f; require jtreg
1892 #:make-flags '("all")
1894 ((guix build syscalls)
1895 ,@%gnu-build-system-modules)
1897 (modify-phases %standard-phases
1898 (add-after 'patch-source-shebangs 'fix-java-shebangs
1900 ;; This file was "fixed" by patch-source-shebangs, but it requires
1901 ;; this exact first line.
1902 (substitute* "jdk/make/data/blacklistedcertsconverter/blacklisted.certs.pem"
1903 (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))
1906 (lambda* (#:key inputs outputs #:allow-other-keys)
1907 ;; TODO: unbundle libpng and lcms
1908 (invoke "bash" "./configure"
1909 (string-append "--with-freetype=" (assoc-ref inputs "freetype"))
1910 "--disable-freetype-bundling"
1911 "--disable-warnings-as-errors"
1912 "--disable-hotspot-gtest"
1913 "--with-giflib=system"
1914 "--with-libjpeg=system"
1915 (string-append "--prefix=" (assoc-ref outputs "out")))
1917 (add-before 'build 'write-source-revision-file
1919 (with-output-to-file ".src-rev"
1921 (display ,version)))
1924 (lambda* (#:key make-flags parallel-build? #:allow-other-keys)
1925 (apply invoke "make"
1926 `(,@(if parallel-build?
1927 (list (string-append "JOBS="
1928 (number->string (parallel-job-count))))
1931 (add-after 'unpack 'patch-jni-libs
1932 ;; Hardcode dynamically loaded libraries.
1934 (let* ((library-path (search-path-as-string->list
1935 (getenv "LIBRARY_PATH")))
1936 (find-library (lambda (name)
1939 (string-append "lib" name ".so")))))
1942 (catch 'decoding-error
1945 (("VERSIONED_JNI_LIB_NAME\\(\"(.*)\", \"(.*)\"\\)"
1947 (format #f "\"~a\"" (find-library name)))
1948 (("JNI_LIB_NAME\\(\"(.*)\"\\)" _ name)
1949 (format #f "\"~a\"" (find-library name)))))
1951 ;; Those are safe to skip.
1952 (format (current-error-port)
1953 "warning: failed to substitute: ~a~%"
1958 ;; Some of the libraries in the lib/ folder link to libjvm.so.
1959 ;; But that shared object is located in the server/ folder, so it
1960 ;; cannot be found. This phase creates a symbolic link in the
1961 ;; lib/ folder so that the other libraries can find it.
1964 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
1966 ;; FIXME: Find the bug in the build system, so that this symlink is
1968 (add-after 'install 'install-libjvm
1969 (lambda* (#:key inputs outputs #:allow-other-keys)
1970 (let* ((lib-out (string-append (assoc-ref outputs "out")
1972 (lib-jdk (string-append (assoc-ref outputs "jdk")
1974 (symlink (string-append lib-jdk "/server/libjvm.so")
1975 (string-append lib-jdk "/libjvm.so"))
1976 (symlink (string-append lib-out "/server/libjvm.so")
1977 (string-append lib-out "/libjvm.so")))
1980 (lambda* (#:key outputs #:allow-other-keys)
1981 (let ((out (assoc-ref outputs "out"))
1982 (jdk (assoc-ref outputs "jdk"))
1983 (doc (assoc-ref outputs "doc"))
1984 (images (car (find-files "build" ".*-server-release"
1985 #:directories? #t))))
1986 (copy-recursively (string-append images "/images/jdk") jdk)
1987 (copy-recursively (string-append images "/images/jre") out)
1988 (copy-recursively (string-append images "/images/docs") doc))
1990 (add-after 'install 'strip-zip-timestamps
1991 (lambda* (#:key outputs #:allow-other-keys)
1992 (use-modules (guix build syscalls))
1993 (for-each (lambda (zip)
1994 (let ((dir (mkdtemp! "zip-contents.XXXXXX")))
1995 (with-directory-excursion dir
1996 (invoke "unzip" zip))
1998 (for-each (lambda (file)
1999 (let ((s (lstat file)))
2000 (unless (eq? (stat:type s) 'symlink)
2001 (format #t "reset ~a~%" file)
2002 (utime file 0 0 0 0))))
2003 (find-files dir #:directories? #t))
2004 (with-directory-excursion dir
2005 (let ((files (find-files "." ".*" #:directories? #t)))
2006 (apply invoke "zip" "-0" "-X" zip files)))))
2007 (find-files (assoc-ref outputs "doc") ".*.zip$"))
2010 `(("alsa-lib" ,alsa-lib)
2012 ("fontconfig" ,fontconfig)
2013 ("freetype" ,freetype)
2017 ("libjpeg" ,libjpeg-turbo)
2021 ("libxcomposite" ,libxcomposite)
2023 ("libxinerama" ,libxinerama)
2024 ("libxrender" ,libxrender)
2026 ("libxtst" ,libxtst)))
2028 `(("icedtea-8" ,icedtea-8)
2029 ("icedtea-8:jdk" ,icedtea-8 "jdk")
2030 ;; XXX: The build system fails with newer versions of GNU Make.
2031 ("make@4.2" ,gnu-make-4.2)
2035 (home-page "https://openjdk.java.net/projects/jdk9/")
2036 (synopsis "Java development kit")
2038 "This package provides the Java development kit OpenJDK.")
2039 (license license:gpl2+)))
2041 (define-public openjdk10
2048 (uri "http://hg.openjdk.java.net/jdk/jdk/archive/6fa770f9f8ab.tar.bz2")
2049 (file-name (string-append name "-" version ".tar.bz2"))
2052 "0zywq2203b4hx4jms9vbwvjcj1d3k2v3qpx4s33729fkpmid97r4"))
2053 (patches (search-patches
2054 "openjdk-10-idlj-reproducibility.patch"))
2055 (modules '((guix build utils)))
2058 (for-each delete-file (find-files "." ".*.(bin|exe|jar)$"))
2061 (substitute-keyword-arguments (package-arguments openjdk9)
2063 `(modify-phases ,phases
2064 (replace 'fix-java-shebangs
2066 ;; This file was "fixed" by patch-source-shebangs, but it requires
2067 ;; this exact first line.
2068 (substitute* "make/data/blacklistedcertsconverter/blacklisted.certs.pem"
2069 (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))
2072 (lambda* (#:key inputs outputs #:allow-other-keys)
2073 (invoke "bash" "./configure"
2074 (string-append "--with-freetype=" (assoc-ref inputs "freetype"))
2075 "--disable-freetype-bundling"
2076 "--disable-warnings-as-errors"
2077 "--disable-hotspot-gtest"
2078 "--with-giflib=system"
2079 "--with-libjpeg=system"
2080 "--with-native-debug-symbols=zipped"
2081 (string-append "--prefix=" (assoc-ref outputs "out")))
2084 `(("openjdk9" ,openjdk9)
2085 ("openjdk9:jdk" ,openjdk9 "jdk")
2086 ("make@4.2" ,gnu-make-4.2)
2091 (define-public openjdk11
2097 (uri "http://hg.openjdk.java.net/jdk/jdk/archive/76072a077ee1.tar.bz2")
2098 (file-name (string-append name "-" version ".tar.bz2"))
2101 "0v705w1s9lrqalzahir78pk397rkk9gfvzq821yv8h3xha0bqi6w"))
2102 (modules '((guix build utils)))
2105 (for-each delete-file (find-files "." ".*.(bin|exe|jar)$"))
2107 (build-system gnu-build-system)
2108 (outputs '("out" "jdk" "doc"))
2110 `(#:imported-modules
2111 ((guix build syscalls)
2112 (ice-9 binary-ports)
2114 ,@%gnu-build-system-modules)
2115 #:tests? #f; requires jtreg
2116 ;; TODO package jtreg
2118 `("--disable-option-checking" ; --enable-fast-install default flag errors otherwise
2119 "--disable-warnings-as-errors"
2120 ;; make validate-runpath pass, see: http://issues.guix.info/issue/32894
2121 "--with-native-debug-symbols=zipped"
2122 ;; do not use the bundled libraries
2123 "--with-giflib=system"
2124 "--with-lcms=system"
2125 "--with-libjpeg=system"
2126 "--with-libpng=system"
2127 "--with-version-pre="
2128 ;; allow the build system to locate the system freetype
2129 ,(string-append "--with-freetype-include="
2130 (assoc-ref %build-inputs "freetype") "/include")
2131 ,(string-append "--with-freetype-lib="
2132 (assoc-ref %build-inputs "freetype") "/lib"))
2134 (modify-phases %standard-phases
2135 (add-after 'patch-source-shebangs 'fix-java-shebangs
2137 ;; This file was "fixed" by patch-source-shebangs, but it requires
2138 ;; this exact first line.
2139 (substitute* "make/data/blacklistedcertsconverter/blacklisted.certs.pem"
2140 (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))
2142 (add-after 'unpack 'patch-jni-libs
2143 ;; Hardcode dynamically loaded libraries.
2145 (let* ((library-path (search-path-as-string->list
2146 (getenv "LIBRARY_PATH")))
2147 (find-library (lambda (name)
2150 (string-append "lib" name ".so")))))
2153 (catch 'decoding-error
2156 (("VERSIONED_JNI_LIB_NAME\\(\"(.*)\", \"(.*)\"\\)"
2158 (format #f "\"~a\"" (find-library name)))
2159 (("JNI_LIB_NAME\\(\"(.*)\"\\)" _ name)
2160 (format #f "\"~a\"" (find-library name)))))
2162 ;; Those are safe to skip.
2163 (format (current-error-port)
2164 "warning: failed to substitute: ~a~%"
2169 (add-before 'build 'write-source-revision-file
2171 (with-output-to-file ".src-rev"
2173 (display ,version)))
2176 (lambda* (#:key parallel-build? make-flags #:allow-other-keys)
2177 (apply invoke "make" "all"
2178 `(,@(if parallel-build?
2179 (list (string-append "JOBS="
2180 (number->string (parallel-job-count))))
2183 ;; jdk 11 does not build jre by default any more
2184 ;; building it anyways
2185 ;; for further information see:
2186 ;; https://github.com/AdoptOpenJDK/openjdk-build/issues/356
2187 (add-after 'build 'build-jre
2188 (lambda* (#:key parallel-build? make-flags #:allow-other-keys)
2189 (apply invoke "make" "legacy-jre-image"
2190 `(,@(if parallel-build?
2191 (list (string-append "JOBS="
2192 (number->string (parallel-job-count))))
2196 (lambda* (#:key outputs #:allow-other-keys)
2197 (let ((out (assoc-ref outputs "out"))
2198 (jdk (assoc-ref outputs "jdk"))
2199 (doc (assoc-ref outputs "doc"))
2200 (images (car (find-files "build" ".*-server-release"
2201 #:directories? #t))))
2202 (copy-recursively (string-append images "/images/jdk") jdk)
2203 (copy-recursively (string-append images "/images/jre") out)
2204 (copy-recursively (string-append images "/images/docs") doc))
2206 ;; Some of the libraries in the lib/ folder link to libjvm.so.
2207 ;; But that shared object is located in the server/ folder, so it
2208 ;; cannot be found. This phase creates a symbolic link in the
2209 ;; lib/ folder so that the other libraries can find it.
2212 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
2214 ;; FIXME: Find the bug in the build system, so that this symlink is
2216 (add-after 'install 'install-libjvm
2217 (lambda* (#:key inputs outputs #:allow-other-keys)
2218 (let* ((lib-out (string-append (assoc-ref outputs "out")
2220 (lib-jdk (string-append (assoc-ref outputs "jdk")
2222 (symlink (string-append lib-jdk "/server/libjvm.so")
2223 (string-append lib-jdk "/libjvm.so"))
2224 (symlink (string-append lib-out "/server/libjvm.so")
2225 (string-append lib-out "/libjvm.so")))
2227 (add-after 'install 'strip-character-data-timestamps
2228 (lambda* (#:key outputs #:allow-other-keys)
2229 (use-modules (guix build syscalls))
2230 (let ((archive (string-append
2231 (assoc-ref outputs "jdk") "/lib/src.zip"))
2232 (dir (mkdtemp! "zip-contents.XXXXXX")))
2233 (with-directory-excursion dir
2234 (invoke "unzip" archive))
2235 (delete-file archive)
2236 (with-directory-excursion dir
2237 (let ((char-data-files (find-files "." "CharacterData.*")))
2238 (for-each (lambda (file)
2240 (((string-append "This file was generated "
2241 "AUTOMATICALLY from a template "
2243 (string-append "This file was generated "
2244 "AUTOMATICALLY from a template "
2247 (with-directory-excursion dir
2248 (let ((files (find-files "." ".*" #:directories? #t)))
2249 (apply invoke "zip" "-0" "-X" archive files))))))
2250 (add-after 'strip-character-data-timestamps 'strip-archive-timestamps
2251 (lambda* (#:key outputs #:allow-other-keys)
2252 (use-modules (guix build syscalls)
2253 (ice-9 binary-ports)
2255 (letrec ((repack-archive
2257 (let ((dir (mkdtemp! "zip-contents.XXXXXX")))
2258 (with-directory-excursion dir
2259 (invoke "unzip" archive))
2260 (delete-file archive)
2261 (for-each (compose repack-archive canonicalize-path)
2262 (find-files dir "(ct.sym|.*.jar)$"))
2263 (let ((reset-file-timestamp
2265 (let ((s (lstat file)))
2266 (unless (eq? (stat:type s) 'symlink)
2267 (format #t "reset ~a~%" file)
2268 (utime file 0 0 0 0))))))
2269 (for-each reset-file-timestamp
2270 (find-files dir #:directories? #t)))
2271 (with-directory-excursion dir
2272 (let ((files (find-files "." ".*" #:directories? #t)))
2273 (apply invoke "zip" "-0" "-X" archive files)))))))
2274 (for-each repack-archive
2275 (find-files (assoc-ref outputs "doc") ".*.zip$"))
2276 (for-each repack-archive
2277 (find-files (assoc-ref outputs "jdk")
2278 ".*.(zip|jar|diz)$"))
2279 (repack-archive (string-append (assoc-ref outputs "jdk") "/lib/ct.sym"))
2282 (call-with-input-file file-name
2284 (let ((header #vu8(#x4a #x4d #x01 #x00)))
2285 (if (equal? (get-bytevector-n
2286 file (bytevector-length header))
2288 (let* ((header-length (bytevector-length header))
2289 (temp-file (mkstemp!
2291 "temp-file.XXXXXX")))
2292 (temp-filename (port-filename temp-file))
2294 (- (stat:size (stat file))
2296 (sendfile temp-file file content-length header-length)
2297 (delete-file file-name)
2298 (close-port temp-file)
2299 (repack-archive (canonicalize-path temp-filename))
2300 (call-with-output-file file-name
2302 (put-bytevector file header)
2303 (call-with-input-file temp-filename
2307 (stat:size (stat temp-file)) 0)))))))))))))
2308 (for-each repack-jmod
2309 (find-files (assoc-ref outputs "jdk") ".*.jmod$")))
2311 (add-after 'install 'remove-timestamp-from-api-summary
2312 (lambda* (#:key outputs #:allow-other-keys)
2313 (substitute* (string-append (assoc-ref outputs "doc")
2314 "/api/overview-summary.html")
2315 (("Generated by javadoc \\(11-internal\\).*$")
2316 "Generated by javadoc (11-internal) -->\n"))
2319 `(("alsa-lib" ,alsa-lib)
2321 ("fontconfig" ,fontconfig)
2322 ("freetype" ,freetype)
2325 ("libjpeg" ,libjpeg-turbo)
2328 ("libxext" ,libxext)
2329 ("libxrender" ,libxrender)
2331 ("libxtst" ,libxtst)))
2333 `(("autoconf" ,autoconf)
2334 ("openjdk10" ,openjdk10)
2335 ("openjdk10:jdk" ,openjdk10 "jdk")
2336 ("make" ,gnu-make-4.2)
2337 ("pkg-config" ,pkg-config)
2341 (home-page "https://openjdk.java.net/projects/jdk/11/")
2342 (synopsis "Java development kit")
2344 "This package provides the Java development kit OpenJDK.")
2345 (license license:gpl2+)))
2347 (define-public openjdk12
2354 (uri "http://hg.openjdk.java.net/jdk/jdk/archive/0276cba45aac.tar.bz2")
2355 (file-name (string-append name "-" version ".tar.bz2"))
2358 "0mbhdrk12b6878kby0flnbak7444dlpm0ihlmf92vk59y1c02bc2"))
2359 (modules '((guix build utils)))
2362 (for-each delete-file (find-files "." ".*.(bin|exe|jar)$"))
2365 `(("alsa-lib" ,alsa-lib)
2367 ("fontconfig" ,fontconfig)
2368 ("freetype" ,freetype)
2371 ("libjpeg" ,libjpeg-turbo)
2374 ("libxext" ,libxext)
2375 ("libxrandr" ,libxrandr)
2376 ("libxrender" ,libxrender)
2378 ("libxtst" ,libxtst)))
2380 `(("autoconf" ,autoconf)
2381 ("openjdk11" ,openjdk11)
2382 ("openjdk11:jdk" ,openjdk11 "jdk")
2383 ("make@4.2" ,gnu-make-4.2)
2384 ("pkg-config" ,pkg-config)
2388 (home-page "https://openjdk.java.net/projects/jdk/12")))
2390 (define-public openjdk13
2397 (uri "http://hg.openjdk.java.net/jdk/jdk13/archive/9c250a7600e1.tar.bz2")
2398 (file-name (string-append name "-" version ".tar.bz2"))
2401 "0v0ljvx5dyzp96dw4z4ksw3pvasil7783mgnmd1wk9gads5ab8iq"))
2402 (modules '((guix build utils)))
2405 (for-each delete-file (find-files "." ".*.(bin|exe|jar)$"))
2408 `(("alsa-lib" ,alsa-lib)
2410 ("fontconfig" ,fontconfig)
2411 ("freetype" ,freetype)
2414 ("libjpeg" ,libjpeg-turbo)
2417 ("libxext" ,libxext)
2418 ("libxrandr" ,libxrandr)
2419 ("libxrender" ,libxrender)
2421 ("libxtst" ,libxtst)))
2423 `(("autoconf" ,autoconf)
2424 ("openjdk12:jdk" ,openjdk12 "jdk")
2425 ("make@4.2" ,gnu-make-4.2)
2426 ("pkg-config" ,pkg-config)
2430 (home-page "https://openjdk.java.net/projects/jdk/13")))
2432 (define-public openjdk14
2439 (uri "http://hg.openjdk.java.net/jdk/jdk14/archive/bc54620a3848.tar.bz2")
2440 (file-name (string-append name "-" version ".tar.bz2"))
2443 "0z485pk7r1xpw8004g4nrwrzj17sabgx8yfdbxwfvzkjp8qyajch"))
2444 (modules '((guix build utils)))
2447 ;; The m4 macro uses 'help' to search for builtins, which is
2448 ;; not available in bash-minimal
2449 (substitute* "make/autoconf/basics.m4"
2450 (("if help") "if command -v"))
2451 (for-each delete-file (find-files "." ".*.(bin|exe|jar)$"))
2454 `(("alsa-lib" ,alsa-lib)
2456 ("fontconfig" ,fontconfig)
2457 ("freetype" ,freetype)
2460 ("libjpeg" ,libjpeg-turbo)
2463 ("libxext" ,libxext)
2464 ("libxrandr" ,libxrandr)
2465 ("libxrender" ,libxrender)
2467 ("libxtst" ,libxtst)))
2469 `(("autoconf" ,autoconf)
2470 ("make@4.2" ,gnu-make-4.2)
2471 ("openjdk13:jdk" ,openjdk13 "jdk")
2472 ("pkg-config" ,pkg-config)
2476 (home-page "https://openjdk.java.net/projects/jdk/14")))
2478 (define-public icedtea icedtea-8)
2481 (define-public ant/java8
2482 (package (inherit ant-bootstrap)
2487 (uri (string-append "mirror://apache/ant/source/apache-ant-"
2488 version "-src.tar.gz"))
2491 "0x78434q5ab193ma7ys27m9kwpdgrfzqj00hrf1szwcgk0lzw01z"))
2492 (modules '((guix build utils)))
2495 (for-each delete-file
2496 (find-files "lib/optional" "\\.jar$"))
2499 (substitute-keyword-arguments (package-arguments ant-bootstrap)
2501 `(modify-phases ,phases
2502 (add-after 'unpack 'remove-scripts
2503 ;; Remove bat / cmd scripts for DOS as well as the antRun and runant
2506 (for-each delete-file
2507 (find-files "src/script"
2508 "(.*\\.(bat|cmd)|runant.*|antRun.*)"))
2511 (lambda* (#:key inputs outputs #:allow-other-keys)
2512 (setenv "JAVA_HOME" (assoc-ref inputs "jdk"))
2514 ;; Disable tests to avoid dependency on hamcrest-core, which needs
2515 ;; Ant to build. This is necessary in addition to disabling the
2516 ;; "check" phase, because the dependency on "test-jar" would always
2517 ;; result in the tests to be run.
2518 (substitute* "build.xml"
2519 (("depends=\"jars,test-jar") "depends=\"jars"))
2520 (invoke "bash" "bootstrap.sh"
2521 (string-append "-Ddist.dir="
2522 (assoc-ref outputs "out")))))))))
2524 `(("jdk" ,icedtea-8 "jdk")
2526 ("unzip" ,unzip)))))
2528 ;; The 1.9.x series is the last that can be built with GCJ. The 1.10.x series
2531 (package (inherit ant/java8)
2535 (uri (string-append "mirror://apache/ant/source/apache-ant-"
2536 version "-src.tar.gz"))
2539 "1xy30f1w5gaqk6g3f0vw7ygix4rb6032qkcw42y4z8wd9jihgygd"))))
2541 `(("jdk" ,icedtea-7 "jdk")
2543 ("unzip" ,unzip)))))
2545 (define-public ant-apache-bcel
2548 (name "ant-apache-bcel")
2550 (substitute-keyword-arguments (package-arguments ant/java8)
2552 `(modify-phases ,phases
2553 (add-after 'unpack 'link-bcel
2554 (lambda* (#:key inputs #:allow-other-keys)
2555 (for-each (lambda (file)
2557 (string-append "lib/optional/"
2559 (find-files (assoc-ref inputs "java-commons-bcel")
2562 (add-after 'build 'install
2563 (lambda* (#:key outputs #:allow-other-keys)
2564 (let* ((out (assoc-ref outputs "out"))
2565 (share (string-append out "/share/java"))
2566 (bin (string-append out "/bin"))
2567 (lib (string-append out "/lib")))
2569 (install-file (string-append lib "/ant-apache-bcel.jar") share)
2570 (delete-file-recursively bin)
2571 (delete-file-recursively lib)
2574 `(("java-commons-bcel" ,java-commons-bcel)
2575 ,@(package-inputs ant/java8)))))
2577 (define-public ant-junit
2582 (substitute-keyword-arguments (package-arguments ant/java8)
2584 `(modify-phases ,phases
2585 (add-after 'unpack 'link-junit
2586 (lambda* (#:key inputs #:allow-other-keys)
2587 (for-each (lambda (file)
2589 (string-append "lib/optional/"
2591 (find-files (assoc-ref inputs "java-junit")
2594 (add-after 'build 'install
2595 (lambda* (#:key outputs #:allow-other-keys)
2596 (let* ((out (assoc-ref outputs "out"))
2597 (share (string-append out "/share/java"))
2598 (bin (string-append out "/bin"))
2599 (lib (string-append out "/lib")))
2601 (install-file (string-append lib "/ant-junit.jar") share)
2602 (delete-file-recursively bin)
2603 (delete-file-recursively lib)
2606 `(("java-junit" ,java-junit)
2607 ,@(package-inputs ant/java8)))))
2609 (define-public java-openjfx-build
2611 (name "java-openjfx-build")
2612 ;; This is a java-8 version
2617 (url "http://hg.openjdk.java.net/openjfx/8u-dev/rt")
2618 (changeset (string-append
2619 (string-join (string-split version #\.) "u")
2621 (file-name (string-append name "-" version "-checkout"))
2622 (modules '((guix build utils)))
2625 ;; Delete included gradle jar
2626 (delete-file-recursively "gradle/wrapper")
2630 "0yg38mwpivswccv9n96k06x3iv82i4px1a9xg9l8dswzwmfj259f"))
2631 (patches (search-patches "java-openjfx-build-jdk_version.patch"))))
2632 (build-system ant-build-system)
2634 `(#:jar-name "java-openjfx.jar"
2635 #:source-dir "buildSrc/src/main/java"
2636 #:test-dir "buildSrc/src/test"
2638 (modify-phases %standard-phases
2639 (add-before 'configure 'generate-jsl-parser
2641 (invoke "antlr3" "-o"
2642 "buildSrc/src/main/java/com/sun/scenario/effect/compiler"
2643 "buildSrc/src/main/antlr/JSL.g"))))))
2645 `(("antlr3" ,antlr3)
2646 ("java-stringtemplate" ,java-stringtemplate)))
2648 `(("java-junit" ,java-junit)
2649 ("java-hamcrest-core" ,java-hamcrest-core)))
2650 (home-page "https://openjfx.io")
2651 (synopsis "Graphical application toolkit in Java")
2652 (description "OpenJFX is a client application platform for desktop,
2653 mobile and embedded systems built on Java. Its goal is to produce a
2654 modern, efficient, and fully featured toolkit for developing rich client
2655 applications. This package contains base classes for the OpenJFX
2656 distribution and helper classes for building other parts of the
2658 (license license:gpl2))) ;gpl2 only, with classpath exception
2660 (define-public java-openjfx-base
2661 (package (inherit java-openjfx-build)
2662 (name "java-openjfx-base")
2664 `(#:jar-name "java-openjfx-base.jar"
2665 #:source-dir "modules/base/src/main/java:modules/base/src/main/java8:modules/base/src/main/version-info"
2666 #:test-dir "modules/base/src/test"
2668 (modify-phases %standard-phases
2669 (add-before 'check 'remove-empty-file
2671 (with-directory-excursion "modules/base/src/test/java"
2672 ;; These files are completely commented, but junit expects them to
2673 ;; contain a class, so tests fail.
2675 "com/sun/javafx/property/adapter/PropertyDescriptorTest.java")
2677 "com/sun/javafx/property/adapter/ReadOnlyPropertyDescriptorTest.java")
2678 (delete-file "javafx/beans/property/PropertiesTest.java")
2680 "javafx/beans/property/adapter/ReadOnlyJavaBeanPropertyBuilder_General_Test.java")
2682 (delete-file "com/sun/javafx/runtime/VersionInfoTest.java"))
2685 `(("java-openjfx-build" ,java-openjfx-build)))
2686 (description "OpenJFX is a client application platform for desktop,
2687 mobile and embedded systems built on Java. Its goal is to produce a
2688 modern, efficient, and fully featured toolkit for developing rich client
2689 applications. This package contains base classes for the OpenJFX
2692 (define-public java-openjfx-graphics
2693 (package (inherit java-openjfx-build)
2694 (name "java-openjfx-graphics")
2696 `(#:jar-name "java-openjfx-graphics.jar"
2697 #:source-dir "modules/graphics/src/main/java"
2698 #:tests? #f; require X
2699 #:test-dir "modules/graphics/src/test"))
2701 `(("java-openjfx-base" ,java-openjfx-base)
2702 ("java-swt" ,java-swt)))
2703 (description "OpenJFX is a client application platform for desktop,
2704 mobile and embedded systems built on Java. Its goal is to produce a
2705 modern, efficient, and fully featured toolkit for developing rich client
2706 applications. This package contains graphics-related classes for the
2707 OpenJFX distribution.")))
2709 (define-public java-openjfx-media
2710 (package (inherit java-openjfx-build)
2711 (name "java-openjfx-media")
2713 `(("java-openjxf-graphics" ,java-openjfx-graphics)))
2715 `(#:jar-name "java-openjfx-media.jar"
2716 #:source-dir "modules/media/src/main/java"
2717 #:tests? #f)); no tests
2718 (description "OpenJFX is a client application platform for desktop,
2719 mobile and embedded systems built on Java. Its goal is to produce a
2720 modern, efficient, and fully featured toolkit for developing rich client
2721 applications. This package contains media-related classes for the
2722 OpenJFX distribution.")))
2724 (define-public java-openjfx-controls
2725 (package (inherit java-openjfx-build)
2726 (name "java-openjfx-controls")
2728 `(("java-openjxf-graphics" ,java-openjfx-graphics)))
2730 `(#:jar-name "java-openjfx-controls.jar"
2731 #:source-dir "modules/controls/src/main/java"
2732 #:test-dir "modules/controls/src/test"
2733 ;; TODO: tests require com.sun.javafx.pgstub,
2734 ;; javafx.collections.MockSetObserver, and
2735 ;; com.sun.javafx.binding.ExpressionHelperUtility
2738 (modify-phases %standard-phases
2739 (add-after 'unpack 'copy-resources
2741 (copy-recursively "modules/controls/src/test/resources"
2742 "build/test-classes")
2743 (copy-recursively "modules/controls/src/main/resources"
2744 "build/classes"))))))
2745 (description "OpenJFX is a client application platform for desktop,
2746 mobile and embedded systems built on Java. Its goal is to produce a
2747 modern, efficient, and fully featured toolkit for developing rich client
2748 applications. This package contains UI control classes for the
2749 OpenJFX distribution.")))
2751 (define-public javacc-4
2758 (url "https://github.com/javacc/javacc")
2759 (commit "release_41")))
2760 (file-name (string-append "javacc-" version "-checkout"))
2763 "07ysav7j8r1c6h8qxrgqk6lwdp74ly0ad1935lragxml0qqc3ka0"))
2764 (modules '((guix build utils)))
2765 ;; delete bundled jars
2766 (snippet '(begin (delete-file-recursively "lib") #t))))
2767 (build-system ant-build-system)
2769 ;; /tmp/guix-build-javacc-4.1.drv-0/source/test/javacodeLA/build.xml:60:
2774 (modify-phases %standard-phases
2775 ;; Delete tests to avoid build failure (we don't run them anyway).
2776 (add-after 'unpack 'delete-tests
2778 (for-each delete-file
2779 '("src/org/javacc/JavaCCTestCase.java"
2780 "src/org/javacc/parser/ExpansionTest.java"
2781 "src/org/javacc/parser/OptionsTest.java"
2782 "src/org/javacc/jjtree/JJTreeOptionsTest.java"))
2783 (for-each delete-file-recursively
2784 '("src/org/javacc/parser/test"
2785 "src/org/javacc/jjdoc/test"))
2787 (replace 'install (install-jars "bin/lib")))))
2788 (home-page "https://javacc.org/")
2789 (synopsis "Java parser generator")
2790 (description "Java Compiler Compiler (JavaCC) is the most popular parser
2791 generator for use with Java applications. A parser generator is a tool that
2792 reads a grammar specification and converts it to a Java program that can
2793 recognize matches to the grammar. In addition to the parser generator itself,
2794 JavaCC provides other standard capabilities related to parser generation such
2795 as tree building (via a tool called JJTree included with JavaCC), actions,
2797 (license license:bsd-3)))
2799 ;; javacc-3, as javacc-4 is not properly bootstrapped: is contains a javacc.jar
2800 ;; in the bootstrap/ directory.
2801 (define-public javacc-3
2808 (url "https://github.com/javacc/javacc")
2809 (commit "release_32")))
2810 (file-name (string-append "javacc-" version "-checkout"))
2813 "1pyf1xyh8gk83nxqn2v2mdws32l68ydznha41cxa4l2kkbq1v1g3"))))
2817 (modify-phases %standard-phases
2818 (add-before 'build 'set-java-version
2823 (("debug=") "source=\"1.4\" debug=")))
2824 (find-files "." "build.xml"))
2826 (replace 'install (install-jars "bin/lib")))))))
2828 (define-public javacc
2836 (url "https://github.com/javacc/javacc")
2838 (file-name (git-file-name "javacc" version))
2840 (base32 "18kkak3gda93gr25jrgy6q00g0jr8i24ri2wk4kybz1v234fxx9i"))
2841 (modules '((guix build utils)))
2842 ;; Delete bundled jars.
2843 (snippet '(begin (for-each delete-file-recursively
2844 '("bootstrap" "lib"))
2847 `(#:make-flags ; bootstrap from javacc-4
2848 (list (string-append "-Dbootstrap-jar="
2849 (assoc-ref %build-inputs "javacc")
2850 "/share/java/javacc.jar"))
2851 #:test-target "test"
2853 (modify-phases %standard-phases
2854 (replace 'install (install-jars "target"))
2855 (add-after 'install 'install-bin
2856 (lambda* (#:key outputs inputs #:allow-other-keys)
2857 (let* ((out (assoc-ref outputs "out"))
2858 (dir (string-append out "/share/java"))
2859 (bin (string-append out "/bin"))
2860 (javacc (string-append bin "/javacc")))
2862 (with-output-to-file javacc
2865 (string-append "#!/bin/sh\n"
2866 (assoc-ref inputs "jdk") "/bin/java"
2867 " -cp " dir "/javacc.jar" " `basename $0`" " $*"))))
2868 (chmod javacc #o755)
2869 ;; symlink to different names to affect the first argument and
2870 ;; change the behavior of the jar file.
2871 (symlink javacc (string-append bin "/jjdoc"))
2872 (symlink javacc (string-append bin "/jjtree"))
2876 `(("javacc" ,javacc-4)))))
2878 ;; This is the last 3.x release of ECJ
2879 (define-public java-ecj-3
2885 (uri (string-append "http://archive.eclipse.org/eclipse/"
2886 "downloads/drops/R-" version
2887 "-201301310800/ecjsrc-" version ".jar"))
2890 "01mdj14jw11g1jfnki4fi8229p0c6zzckd38zqy2w4m3cjcvsx04"))))
2891 (build-system ant-build-system)
2893 `(#:tests? #f ; none included
2894 #:jdk ,icedtea-7 ; doesn't build with JDK8+
2895 #:make-flags (list "-f" "src/build.xml")
2896 #:build-target "build"
2898 (modify-phases %standard-phases
2899 (add-after 'unpack 'fix-manifest
2901 ;; Record the main class to make ecj executable.
2902 (with-atomic-file-replacement "src/META-INF/MANIFEST.MF"
2904 (display "Manifest-Version: 1.0
2905 Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n"
2908 (replace 'install (install-jars ".")))))
2909 (home-page "https://eclipse.org")
2910 (synopsis "Eclipse Java development tools core batch compiler")
2911 (description "This package provides the Eclipse Java core batch compiler.")
2912 (license license:epl1.0)))
2914 ;; This is needed for java-cisd-args4j
2915 (define-public java-ecj-3.5
2916 (package (inherit java-ecj-3)
2919 (method url-fetch/zipbomb)
2920 (uri (string-append "http://archive.eclipse.org/eclipse/"
2921 "downloads/drops/R-" version
2922 "-200909170800/ecjsrc-" version ".zip"))
2925 "1vnl2mavisc567bip736xzsvvbjif5279wc4a7pbdik5wlir8qr7"))))
2926 (build-system ant-build-system)
2928 `(#:tests? #f ; none included
2929 #:jdk ,icedtea-7 ; doesn't build with JDK8+
2930 #:build-target "build"
2932 (modify-phases %standard-phases
2933 (add-after 'unpack 'fix-manifest
2935 ;; Record the main class to make ecj executable.
2936 (with-atomic-file-replacement "META-INF/MANIFEST.MF"
2939 (display "Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n"
2942 (replace 'install (install-jars ".")))))
2944 `(("unzip" ,unzip)))))
2946 (define-public java-ecj
2947 (package (inherit java-ecj-3)
2953 "http://archive.eclipse.org/eclipse/downloads/drops4/R-"
2955 "-201703010400/ecjsrc-"
2960 "11cfgsdgznja1pvlxkjbqykxd7pcd5655vkm7s44xmahmap15gpl"))))
2962 `(#:tests? #f ; none included
2963 #:build-target "build"
2965 (modify-phases %standard-phases
2966 (add-after 'unpack 'fix-build.xml
2968 (substitute* "src/build.xml"
2972 (add-after 'unpack 'fix-prop
2974 (substitute* "src/build.xml"
2975 (("^.*properties.*$")
2976 "<include name=\"**/*.properties\"/>
2977 <include name=\"**/*.props\"/>"))
2979 (add-before 'build 'chdir
2983 (replace 'install (install-jars ".")))))))
2985 (define-public java-cisd-base
2986 (let ((revision 38938)
2987 (base-version "14.12.0"))
2989 (name "java-cisd-base")
2990 (version (string-append base-version "-" (number->string revision)))
2994 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2995 "base/tags/release/"
2996 (version-major+minor base-version)
2997 ".x/" base-version "/base/"))
2998 (revision revision)))
2999 (file-name (string-append "java-cisd-base-" version "-checkout"))
3002 "1i5adyf7nzclb0wydgwa1az04qliid8035vpahaandmkmigbnxiy"))
3003 (modules '((guix build utils)))
3006 ;; Delete included gradle jar
3007 (delete-file-recursively "gradle/wrapper")
3008 ;; Delete pre-built native libraries
3009 (delete-file-recursively "libs")
3011 (build-system ant-build-system)
3013 `(#:make-flags '("-file" "build/build.xml")
3014 #:test-target "jar-test"
3017 (modify-phases %standard-phases
3018 (add-after 'unpack 'unpack-build-resources
3019 (lambda* (#:key inputs #:allow-other-keys)
3020 (copy-recursively (assoc-ref inputs "build-resources")
3021 "../build_resources")
3023 (add-after 'unpack-build-resources 'fix-dependencies
3024 (lambda* (#:key inputs #:allow-other-keys)
3025 (substitute* "build/build.xml"
3026 (("\\$\\{lib\\}/testng/testng-jdk15.jar")
3027 (string-append (assoc-ref inputs "java-testng")
3028 "/share/java/java-testng.jar"))
3029 (("\\$\\{lib\\}/commons-lang/commons-lang.jar")
3030 (string-append (assoc-ref inputs "java-commons-lang")
3031 "/share/java/commons-lang-"
3032 ,(package-version java-commons-lang) ".jar"))
3033 (("\\$\\{lib\\}/commons-io/commons-io.jar")
3034 (string-append (assoc-ref inputs "java-commons-io")
3035 "/lib/m2/commons-io/commons-io/"
3036 ,(package-version java-commons-io)
3038 ,(package-version java-commons-io)
3040 ;; Remove dependency on svn
3041 (("<build-info.*") "")
3042 (("\\$\\{revision.number\\}")
3043 ,(number->string revision))
3044 (("\\$\\{version.number\\}") ,base-version))
3045 ;; Remove dependency on classycle
3046 (substitute* "../build_resources/ant/build-common.xml"
3047 (("<taskdef name=\"dependency-checker.*") "")
3048 (("classname=\"classycle.*") "")
3049 (("classpath=\"\\$\\{lib\\}/classycle.*") ""))
3051 ;; A few tests fail because of the lack of a proper /etc/groups and
3052 ;; /etc/passwd file in the build container.
3053 (add-after 'unpack 'disable-broken-tests
3055 (substitute* "sourceTest/java/ch/systemsx/cisd/base/AllTests.java"
3056 (("Unix.isOperational\\(\\)") "false"))
3058 ;; These decorators are almost useless and pull in an unpackaged
3060 (add-after 'unpack 'remove-useless-decorators
3062 (substitute* "source/java/ch/systemsx/cisd/base/unix/Unix.java"
3064 (("import ch.rinn.restrictions.Private;") ""))
3065 (substitute* "sourceTest/java/ch/systemsx/cisd/base/unix/UnixTests.java"
3067 (("import ch.rinn.restrictions.Friend;") ""))
3069 (add-before 'configure 'build-native-code
3070 (lambda* (#:key inputs #:allow-other-keys)
3071 (let ((jdk (assoc-ref inputs "jdk"))
3072 (dir ,(match (%current-system)
3075 ((or "armhf-linux" "aarch64-linux")
3077 ((or "x86_64-linux")
3079 (_ "unknown-Linux"))))
3080 (with-directory-excursion "source/c"
3081 (invoke "gcc" "-shared" "-O3" "-fPIC" "unix.c"
3082 (string-append "-I" jdk "/include")
3083 (string-append "-I" jdk "/include/linux")
3085 (invoke "gcc" "-shared" "-O3" "-fPIC"
3086 "-DMACHINE_BYTE_ORDER=1"
3094 (string-append "-I" jdk "/include")
3095 (string-append "-I" jdk "/include/linux")
3096 "-o" "libnativedata.so"))
3097 (install-file "source/c/libunix.so"
3098 (string-append "libs/native/unix/" dir))
3099 (install-file "source/c/libnativedata.so"
3100 (string-append "libs/native/nativedata/" dir))
3102 ;; In the "check" phase we only build the test executable.
3103 (add-after 'check 'run-tests
3105 (invoke "java" "-jar" "targets/dist/sis-base-test.jar")
3106 (delete-file "targets/dist/sis-base-test.jar")
3108 (replace 'install (install-jars "targets/dist")))))
3110 `(("jdk" ,icedtea-8)
3111 ("java-commons-lang" ,java-commons-lang)
3112 ("java-commons-io" ,java-commons-io)
3113 ("java-testng" ,java-testng)
3118 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
3119 "base/tags/release/"
3120 (version-major+minor base-version)
3122 "/build_resources/"))
3123 (revision revision)))
3126 "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk"))))))
3127 (home-page "http://svnsis.ethz.ch")
3128 (synopsis "Utility classes for libraries from ETH Zurich")
3129 (description "This library supplies some utility classes needed for
3130 libraries from the SIS division at ETH Zurich like jHDF5.")
3131 ;; The C sources are under a non-copyleft license, which looks like a
3132 ;; variant of the BSD licenses. The whole package is under the ASL2.0.
3133 (license (list license:asl2.0
3134 (license:non-copyleft "file://source/c/COPYING"))))))
3136 (define-public java-cisd-args4j
3137 (let ((revision 39162)
3138 (base-version "9.11.2"))
3140 (name "java-cisd-args4j")
3141 (version (string-append base-version "-" (number->string revision)))
3145 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
3146 "args4j/tags/release/"
3147 (version-major+minor base-version)
3148 ".x/" base-version "/args4j/"))
3149 (revision revision)))
3150 (file-name (string-append "java-cisd-args4j-" version "-checkout"))
3153 "0hhqznjaivq7ips7mkwas78z42s6djsm20rrs7g1zd59rcsakxn2"))))
3154 (build-system ant-build-system)
3156 `(#:make-flags '("-file" "build/build.xml")
3157 #:tests? #f ; there are no tests
3158 ;; There are weird build failures with JDK8, such as: "The type
3159 ;; java.io.ObjectInputStream cannot be resolved. It is indirectly
3160 ;; referenced from required .class files"
3162 #:modules ((guix build ant-build-system)
3164 (guix build java-utils)
3169 (modify-phases %standard-phases
3170 (add-after 'unpack 'unpack-build-resources
3171 (lambda* (#:key inputs #:allow-other-keys)
3172 (mkdir-p "../build_resources")
3173 (invoke "tar" "xf" (assoc-ref inputs "build-resources")
3174 "-C" "../build_resources"
3175 "--strip-components=1")
3176 (mkdir-p "../build_resources/lib")
3178 (add-after 'unpack-build-resources 'fix-dependencies
3179 (lambda* (#:key inputs #:allow-other-keys)
3180 ;; FIXME: There should be a more convenient abstraction for
3181 ;; editing XML files.
3182 (with-directory-excursion "../build_resources/ant/"
3183 (chmod "build-common.xml" #o664)
3184 (call-with-output-file "build-common.xml.new"
3188 (with-input-from-file "build-common.xml"
3189 (lambda _ (xml->sxml #:trim-whitespace? #t)))
3190 `(;; Remove dependency on classycle and custom ant tasks
3191 (taskdef . ,(lambda (tag . kids)
3192 (let ((name ((sxpath '(name *text*)) kids)))
3193 (if (or (member "build-info" name)
3194 (member "dependency-checker" name)
3195 (member "build-java-subprojects" name)
3196 (member "project-classpath" name))
3199 (typedef . ,(lambda (tag . kids)
3200 (let ((name ((sxpath '(name *text*)) kids)))
3201 (if (member "recursive-jar" name)
3204 (build-java-subprojects . ,(lambda _ '()))
3205 ;; Ignore everything else
3206 (*default* . ,(lambda (tag . kids) `(,tag ,@kids)))
3207 (*text* . ,(lambda (_ txt) txt))))
3209 (rename-file "build-common.xml.new" "build-common.xml"))
3210 (substitute* "build/build.xml"
3211 (("\\$\\{lib\\}/cisd-base/cisd-base.jar")
3212 (string-append (assoc-ref inputs "java-cisd-base")
3213 "/share/java/sis-base.jar"))
3214 ;; Remove dependency on svn
3215 (("<build-info.*") "")
3216 (("\\$\\{revision.number\\}")
3217 ,(number->string revision))
3218 (("\\$\\{version.number\\}") ,base-version)
3219 ;; Don't use custom ant tasks.
3220 (("recursive-jar") "jar")
3221 (("<project-classpath.*") ""))
3223 (replace 'install (install-jars "targets/dist")))))
3225 `(("java-cisd-base" ,java-cisd-base)))
3227 `(("ecj" ,java-ecj-3.5)
3232 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
3233 "args4j/tags/release/"
3234 (version-major+minor base-version)
3236 "/build_resources/"))
3237 (revision revision)))
3240 "056cam4k8pll7ass31sy6gwn8g8719njc41yf4l02b0342nilkyf"))
3241 (modules '((guix build utils)))
3242 ;; Delete bundled pre-built jars.
3244 '(begin (delete-file-recursively "lib/") #t))))))
3245 (home-page "http://svnsis.ethz.ch")
3246 (synopsis "Command line parser library")
3247 (description "This package provides a parser for command line arguments.")
3248 (license license:asl2.0))))
3250 (define-public java-cisd-jhdf5
3251 (let ((revision 39162)
3252 (base-version "14.12.6"))
3254 (name "java-cisd-jhdf5")
3255 (version (string-append base-version "-" (number->string revision)))
3259 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
3260 "jhdf5/tags/release/"
3261 (version-major+minor base-version)
3262 ".x/" base-version "/jhdf5/"))
3263 (revision revision)))
3264 (file-name (string-append "java-cisd-jhdf5-" version "-checkout"))
3267 "13i17s2hn0q9drdqvp8csy7770p3hdbh9rp30ihln2ldkfawdmz0"))
3268 (modules '((guix build utils)))
3271 ;; Delete included gradle jar
3272 (delete-file-recursively "gradle/wrapper")
3273 ;; Delete pre-built native libraries
3274 (delete-file-recursively "libs")
3276 (build-system ant-build-system)
3278 `(#:make-flags '("-file" "build/build.xml")
3279 #:build-target "jar-all"
3280 #:test-target "jar-test"
3283 (modify-phases %standard-phases
3284 ;; FIXME: this build phase fails.
3285 (delete 'generate-jar-indices)
3286 ;; Don't erase results from the build phase when building tests.
3287 (add-after 'unpack 'separate-test-target-from-clean
3289 (substitute* "build/build.xml"
3290 (("\"jar-test\" depends=\"clean, ")
3291 "\"jar-test\" depends=\""))
3293 (add-after 'unpack 'unpack-build-resources
3294 (lambda* (#:key inputs #:allow-other-keys)
3295 (copy-recursively (assoc-ref inputs "build-resources")
3296 "../build_resources")
3297 (delete-file-recursively "../build_resources/lib/")
3298 (mkdir-p "../build_resources/lib")
3299 ;; Remove dependency on classycle
3300 (substitute* "../build_resources/ant/build-common.xml"
3301 (("<taskdef name=\"dependency-checker.*") "")
3302 (("classname=\"classycle.*") "")
3303 (("classpath=\"\\$\\{lib\\}/classycle.*") ""))
3304 ;; Remove dependency on svn
3305 (substitute* "build/build.xml"
3306 (("<build-info.*") "")
3307 (("\\$\\{revision.number\\}")
3308 ,(number->string revision))
3309 (("\\$\\{version.number\\}") ,base-version))
3311 (add-after 'unpack-build-resources 'fix-dependencies
3312 (lambda* (#:key inputs #:allow-other-keys)
3313 (substitute* "../build_resources/ant/build-common.xml"
3314 (("../libraries/testng/testng-jdk15.jar")
3315 (string-append (assoc-ref inputs "java-testng")
3316 "/share/java/java-testng.jar")))
3317 (substitute* "build/build.xml"
3318 (("\\$\\{lib\\}/sis-base/sis-base.jar")
3319 (string-append (assoc-ref inputs "java-cisd-base")
3320 "/share/java/sis-base.jar"))
3321 (("\\$\\{lib\\}/cisd-args4j/cisd-args4j.jar")
3322 (string-append (assoc-ref inputs "java-cisd-args4j")
3323 "/share/java/cisd-args4j.jar"))
3324 (("\\$\\{lib\\}/commons-lang/commons-lang.jar")
3325 (string-append (assoc-ref inputs "java-commons-lang")
3326 "/share/java/commons-lang-"
3327 ,(package-version java-commons-lang) ".jar"))
3328 (("\\$\\{lib\\}/commons-io/commons-io.jar")
3329 (string-append (assoc-ref inputs "java-commons-io")
3330 "/lib/m2/commons-io/commons-io/"
3331 ,(package-version java-commons-io)
3333 ,(package-version java-commons-io)
3335 (("\\$\\{lib\\}/testng/testng-jdk15.jar")
3336 (string-append (assoc-ref inputs "java-testng")
3337 "/share/java/java-testng.jar"))
3338 (("\\$\\{lib\\}/junit4/junit.jar")
3339 (car (find-files (assoc-ref inputs "java-junit") "jar$")))
3340 (("\\$\\{lib\\}/jmock/hamcrest/hamcrest-core.jar")
3341 (car (find-files (assoc-ref inputs "java-hamcrest-core")
3343 ;; Remove dependency on ch.rinn.restrictions
3344 (with-directory-excursion "source/java/ch/systemsx/cisd/hdf5/"
3345 (substitute* '("BitSetConversionUtils.java"
3347 (("import ch.rinn.restrictions.Private;") "")
3349 (with-directory-excursion "sourceTest/java/ch/systemsx/cisd/hdf5/"
3350 (substitute* '("BitSetConversionTest.java"
3351 "h5ar/HDF5ArchiverTest.java")
3352 (("import ch.rinn.restrictions.Friend;") "")
3354 ;; Remove leftovers from removing @Friend
3355 (substitute* "h5ar/HDF5ArchiverTest.java"
3356 (("\\{ HDF5Archiver.class, IdCache.class, LinkRecord.class \\}\\)")
3359 (add-before 'configure 'build-native-library
3360 (lambda* (#:key inputs #:allow-other-keys)
3361 (let ((jdk (assoc-ref inputs "jdk"))
3362 (hdf5 (assoc-ref inputs "hdf5"))
3363 (dir ,(match (%current-system)
3366 ((or "armhf-linux" "aarch64-linux")
3368 ((or "x86_64-linux")
3370 (_ "unknown-Linux"))))
3371 (with-directory-excursion "source/c"
3372 (apply invoke `("gcc" "-shared" "-O3"
3374 "-Wl,--exclude-libs,ALL"
3375 ,@(find-files "jhdf5" "\\.c$")
3376 ,@(find-files "hdf-java" "\\.c$")
3377 ,(string-append "-I" hdf5 "/include")
3378 ,(string-append "-I" jdk "/include")
3379 ,(string-append "-I" jdk "/include/linux")
3380 ,(string-append hdf5 "/lib/libhdf5.a")
3381 "-o" "libjhdf5.so" "-lz")))
3382 (install-file "source/c/libjhdf5.so"
3383 (string-append "libs/native/jhdf5/" dir))
3385 ;; In the "check" phase we only build the test executable.
3386 (add-after 'check 'run-tests
3388 (invoke "java" "-jar" "targets/dist/sis-jhdf5-test.jar")
3389 (delete-file "targets/dist/sis-jhdf5-test.jar")
3392 (install-jars "targets/dist")))))
3394 `(("java-cisd-base" ,java-cisd-base)
3395 ("java-cisd-args4j" ,java-cisd-args4j)
3396 ("java-commons-lang" ,java-commons-lang)
3397 ("java-commons-io" ,java-commons-io)
3401 `(("jdk" ,icedtea-8)
3402 ("java-testng" ,java-testng)
3403 ("java-junit" ,java-junit)
3404 ("java-jmock" ,java-jmock)
3405 ("java-hamcrest-core" ,java-hamcrest-core)
3410 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
3411 "jhdf5/tags/release/"
3412 (version-major+minor base-version)
3414 "/build_resources/"))
3415 (revision revision)))
3418 "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk"))))))
3419 (home-page "https://wiki-bsse.ethz.ch/display/JHDF5/")
3420 (synopsis "Java binding for HDF5")
3421 (description "JHDF5 is a high-level API in Java for reading and writing
3422 HDF5 files, building on the libraries provided by the HDF Group.")
3423 ;; The C sources are under a non-copyleft license, which looks like a
3424 ;; variant of the BSD licenses. The whole package is under the ASL2.0.
3425 (license (list license:asl2.0
3426 (license:non-copyleft "file://source/c/COPYING"))))))
3428 (define-public java-classpathx-servletapi
3430 (name "java-classpathx-servletapi")
3434 (uri (string-append "mirror://gnu/classpathx/servletapi/"
3435 "servletapi-" version ".tar.gz"))
3438 "07d8h051siga2f33fra72hk12sbq1bxa4jifjg0qj0vfazjjff0x"))))
3439 (build-system ant-build-system)
3441 `(#:tests? #f ; there is no test target
3442 #:build-target "compile"
3444 (list "-Dbuild.compiler=javac1.8"
3445 (string-append "-Ddist=" (assoc-ref %outputs "out")))
3447 (modify-phases %standard-phases
3449 (lambda* (#:key make-flags #:allow-other-keys)
3450 (apply invoke `("ant" "dist" ,@make-flags)))))))
3451 (home-page "https://www.gnu.org/software/classpathx/")
3452 (synopsis "Java servlet API implementation")
3453 (description "This is the GNU servlet API distribution, part of the
3454 ClasspathX project. It provides implementations of version 3.0 of the servlet
3455 API and version 2.1 of the Java ServerPages API.")
3456 (license license:gpl3+)))
3458 (define-public java-javaee-servletapi
3460 (name "java-javaee-servletapi")
3465 (url "https://github.com/javaee/servlet-spec")
3467 (file-name (git-file-name name version))
3470 "0s03lj8w5an70lkqbjycgfrfk0kc07vbfav91jzk87gh3awf9ksl"))))
3471 (build-system ant-build-system)
3473 `(#:jar-name "javax-servletapi.jar"
3476 #:source-dir "src/main/java"
3478 (modify-phases %standard-phases
3479 (add-before 'build 'copy-resources
3481 (mkdir-p "build/classes/javax/servlet/http")
3482 (let ((from-prefix "src/main/java/javax/servlet/")
3483 (to-prefix "build/classes/javax/servlet/"))
3484 (for-each (lambda (f)
3485 (copy-file (string-append from-prefix f)
3486 (string-append to-prefix f)))
3487 (list "LocalStrings_ja.properties"
3488 "LocalStrings.properties"
3489 "LocalStrings_fr.properties"
3490 "http/LocalStrings_es.properties"
3491 "http/LocalStrings_ja.properties"
3492 "http/LocalStrings.properties"
3493 "http/LocalStrings_fr.properties")))
3496 `(("unzip" ,unzip)))
3497 (home-page "https://javaee.github.io/servlet-spec/")
3498 (synopsis "Java servlet API")
3499 (description "Java Servlet is the foundation web specification in the
3500 Java Enterprise Platform. Developers can build web applications using the
3501 Servlet API to interact with the request/response workflow. This project
3502 provides information on the continued development of the Java Servlet
3504 ;; Main code is dual-licensed by Oracle under either GLP2 or CDDL 1.1.
3505 ;; Some files are licensed under ASL 2.0.
3506 (license (list license:asl2.0 license:gpl2 license:cddl1.1))))
3508 (define-public java-swt
3513 ;; The types of many variables and procedures differ in the sources
3514 ;; dependent on whether the target architecture is a 32-bit system or a
3515 ;; 64-bit system. Instead of patching the sources on demand in a build
3516 ;; phase we download either the 32-bit archive (which mostly uses "int"
3517 ;; types) or the 64-bit archive (which mostly uses "long" types).
3518 (let ((hash32 "09q0cbh90d90q3a7dx9430kc4m6bijrkr4lajrmzzvi0jjdpq4v9")
3519 (hash64 "17k5hs75a87ssmc5xhwdfdm2gn4zba0r837l2455za01krnkaa2q")
3522 (let-values (((hash file)
3523 (match (or (%current-target-system) (%current-system))
3524 ("x86_64-linux" (values hash64 file64))
3525 (_ (values hash32 file32)))))
3529 "http://download.eclipse.org/eclipse/downloads/drops4/"
3530 "R-" version "-201710090410/swt-" version
3531 "-gtk-linux-" file ".zip"))
3532 (sha256 (base32 hash))))))
3533 (build-system ant-build-system)
3535 `(#:jar-name "swt.jar"
3537 #:tests? #f ; no "check" target
3539 (modify-phases %standard-phases
3541 (lambda* (#:key source #:allow-other-keys)
3543 (invoke "unzip" source "-d" "swt")
3546 (invoke "unzip" "src.zip" "-d" "src")))
3547 ;; The classpath contains invalid icecat jars. Since we don't need
3548 ;; anything other than the JDK on the classpath, we can simply unset
3550 (add-after 'configure 'unset-classpath
3551 (lambda _ (unsetenv "CLASSPATH") #t))
3552 (add-before 'build 'build-native
3553 (lambda* (#:key inputs outputs #:allow-other-keys)
3554 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
3555 ;; Build shared libraries. Users of SWT have to set the system
3556 ;; property swt.library.path to the "lib" directory of this
3559 (setenv "OUTPUT_DIR" lib)
3560 (with-directory-excursion "src"
3561 (invoke "bash" "build.sh")))))
3562 (add-after 'install 'install-native
3563 (lambda* (#:key outputs #:allow-other-keys)
3564 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
3565 (for-each (lambda (file)
3566 (install-file file lib))
3567 (find-files "." "\\.so$"))
3571 ("libxtst" ,libxtst)
3576 `(("pkg-config" ,pkg-config)
3578 (home-page "https://www.eclipse.org/swt/")
3579 (synopsis "Widget toolkit for Java")
3581 "SWT is a widget toolkit for Java designed to provide efficient, portable
3582 access to the user-interface facilities of the operating systems on which it
3584 ;; SWT code is licensed under EPL1.0
3585 ;; Gnome and Gtk+ bindings contain code licensed under LGPLv2.1
3586 ;; Cairo bindings contain code under MPL1.1
3587 ;; XULRunner 1.9 bindings contain code under MPL2.0
3592 license:lgpl2.1+))))
3594 ;; java-hamcrest-core uses qdox version 1.12. We package this version instead
3595 ;; of the latest release.
3596 (define-public java-qdox-1.12
3602 (uri (string-append "https://repo1.maven.org/maven2/"
3603 "com/thoughtworks/qdox/qdox/" version
3604 "/qdox-" version "-sources.jar"))
3607 "0hlfbqq2avf5s26wxkksqmkdyk6zp9ggqn37c468m96mjv0n9xfl"))))
3608 (build-system ant-build-system)
3610 `(;; Tests require junit
3612 #:jar-name "qdox.jar"
3614 (modify-phases %standard-phases
3616 (lambda* (#:key source #:allow-other-keys)
3618 (with-directory-excursion "src"
3619 (invoke "jar" "-xf" source))))
3620 ;; At this point we don't have junit, so we must remove the API
3622 (add-after 'unpack 'delete-tests
3624 (delete-file-recursively "src/com/thoughtworks/qdox/junit")
3626 (home-page "https://github.com/codehaus/qdox")
3627 (synopsis "Parse definitions from Java source files")
3629 "QDox is a high speed, small footprint parser for extracting
3630 class/interface/method definitions from source files complete with JavaDoc
3631 @code{@@tags}. It is designed to be used by active code generators or
3632 documentation tools.")
3633 (license license:asl2.0)))
3635 (define-public java-qdox
3638 ; Newer version exists, but this version is required by java-plexus-component-metadata
3642 ;; 2.0-M4, -M5 at https://github.com/paul-hammant/qdox
3643 ;; Older releases at https://github.com/codehaus/qdox/
3644 ;; Note: The release at maven is pre-generated. The release at
3645 ;; github requires jflex.
3646 (uri (string-append "https://repo1.maven.org/maven2/"
3647 "com/thoughtworks/qdox/qdox/" version
3648 "/qdox-" version "-sources.jar"))
3651 "10xxrcaicq6axszcr2jpygisa4ch4sinyx5q7kqqxv4lknrmxp5x"))))
3652 (build-system ant-build-system)
3654 `(#:jar-name "qdox.jar"
3655 #:tests? #f; no tests
3657 ((guix build ant-build-system)
3658 (guix build java-utils)
3662 (modify-phases %standard-phases
3663 (add-before 'install 'create-pom
3665 (with-output-to-file "pom.xml"
3669 (modelVersion "4.0.0")
3671 (groupId "com.thoughtworks.qdox")
3673 (version ,,version))))))
3676 (install-from-pom "pom.xml")))))
3677 (home-page "https://github.com/codehaus/qdox")
3678 (synopsis "Parse definitions from Java source files")
3679 (description "QDox is a high speed, small footprint parser for extracting
3680 class/interface/method definitions from source files complete with JavaDoc
3681 @code{@@tags}. It is designed to be used by active code generators or
3682 documentation tools.")
3683 (license license:asl2.0)))
3685 (define-public java-qdox-2-M9
3688 (version "2.0-M9"); required by plexus-java
3691 ;; 2.0-M4, -M5 at https://github.com/paul-hammant/qdox
3692 ;; Older releases at https://github.com/codehaus/qdox/
3693 ;; Note: The release at maven is pre-generated. The release at
3694 ;; github requires jflex.
3695 (uri (string-append "https://repo1.maven.org/maven2/"
3696 "com/thoughtworks/qdox/qdox/" version
3697 "/qdox-" version "-sources.jar"))
3700 "1s2jnmx2dkwnaha12lcj26aynywgwa8sslc47z82wx8xai13y4fg"))))))
3702 (define-public java-jarjar
3704 (name "java-jarjar")
3709 "https://storage.googleapis.com/google-code-archive-downloads/v2/"
3710 "code.google.com/jarjar/jarjar-src-" version ".zip"))
3713 "1v8irhni9cndcw1l1wxqgry013s2kpj0qqn57lj2ji28xjq8ndjl"))
3714 (modules '((guix build utils)))
3717 ;; Delete bundled thirds-party jar archives.
3718 (delete-file-recursively "lib")
3719 (delete-file "src/test/enumtest.jar")
3720 ;; the CLASSPATH needs this directory, create an empty one
3723 (build-system ant-build-system)
3725 `(;; Tests require junit, which ultimately depends on this package.
3727 #:build-target "jar"
3729 (modify-phases %standard-phases
3730 (add-before 'build 'do-not-use-bundled-asm
3731 (lambda* (#:key inputs #:allow-other-keys)
3732 (substitute* "build.xml"
3733 (("<path id=\"path.build\">")
3734 (string-append "<path id=\"path.build\"><fileset dir=\""
3735 (assoc-ref inputs "java-asm-bootstrap")
3736 "/lib/m2\" includes=\"**/*.jar\"/>"))
3737 (("<zipfileset src=\"lib/asm-4.0.jar\"/>") "")
3738 (("lib/asm-commons-4.0.jar")
3739 (car (find-files (assoc-ref inputs "java-asm-bootstrap")
3741 (("<include name=\"org/objectweb/asm/commons/Remap\\*\\.class\"/>")
3742 (string-append "<include name=\"org/objectweb/asm/"
3743 "commons/Remap*.class\"/>"
3744 "<include name=\"org/objectweb/asm/*.class\"/>"
3745 "<include name=\"org/objectweb/asm/"
3746 "signature/*.class\"/>"
3747 "<include name=\"org/objectweb/asm/"
3748 "commons/SignatureRemapper.class\"/>")))
3750 (add-before 'build 'remove-maven-dependency
3752 ;; We do not need to build jarjar as a maven plugin just yet, so
3753 ;; remove this file. Maven requires jarjar (but not that plugin),
3754 ;; so removing it improves the bootstrap.
3755 (delete-file "src/main/com/tonicsystems/jarjar/JarJarMojo.java")
3758 (lambda* (#:key outputs #:allow-other-keys)
3759 (let ((target (string-append (assoc-ref outputs "out")
3761 (install-file (string-append "dist/jarjar-" ,version ".jar")
3765 `(("java-asm-bootstrap" ,java-asm-bootstrap)))
3767 `(("unzip" ,unzip)))
3768 (home-page "https://code.google.com/archive/p/jarjar/")
3769 (synopsis "Repackage Java libraries")
3771 "Jar Jar Links is a utility that makes it easy to repackage Java
3772 libraries and embed them into your own distribution. Jar Jar Links includes
3773 an Ant task that extends the built-in @code{jar} task.")
3774 (license license:asl2.0)))
3776 (define-public java-hamcrest-core
3778 (name "java-hamcrest-core")
3783 (url "https://github.com/hamcrest/JavaHamcrest/")
3784 (commit (string-append "hamcrest-java-" version))))
3785 (file-name (git-file-name name version))
3788 "16fxxkrd31ahqvcaby30jgh3z1i0zxh51m24hxgz0z2agxj6bc63"))
3789 (modules '((guix build utils)))
3792 ;; Delete bundled thirds-party jar archives.
3793 (delete-file-recursively "lib")
3795 (build-system ant-build-system)
3797 `(#:tests? #f ; Tests require junit
3798 #:modules ((guix build ant-build-system)
3799 (guix build java-utils)
3802 #:make-flags (list (string-append "-Dversion=" ,version))
3803 #:test-target "unit-test"
3804 #:build-target "core"
3806 (modify-phases %standard-phases
3807 ;; Disable unit tests, because they require junit, which requires
3808 ;; hamcrest-core. We also give a fixed value to the "Built-Date"
3809 ;; attribute from the manifest for reproducibility.
3810 (add-before 'configure 'patch-build.xml
3812 (substitute* "build.xml"
3813 (("unit-test, ") "")
3814 (("\\$\\{build.timestamp\\}") "guix"))
3816 ;; Java's "getMethods()" returns methods in an unpredictable order.
3817 ;; To make the output of the generated code deterministic we must
3818 ;; sort the array of methods.
3819 (add-after 'unpack 'make-method-order-deterministic
3821 (substitute* "hamcrest-generator/src/main/java/org/hamcrest/generator/ReflectiveFactoryReader.java"
3822 (("import java\\.util\\.Iterator;" line)
3823 (string-append line "\n"
3824 "import java.util.Arrays; import java.util.Comparator;"))
3825 (("allMethods = cls\\.getMethods\\(\\);" line)
3826 (string-append "_" line
3828 private Method[] getSortedMethods() {
3829 Arrays.sort(_allMethods, new Comparator<Method>() {
3831 public int compare(Method a, Method b) {
3832 return a.toString().compareTo(b.toString());
3838 private Method[] allMethods = getSortedMethods();")))
3840 (add-before 'build 'do-not-use-bundled-qdox
3841 (lambda* (#:key inputs #:allow-other-keys)
3842 (substitute* "build.xml"
3843 (("lib/generator/qdox-1.12.jar")
3844 (string-append (assoc-ref inputs "java-qdox-1.12")
3845 "/share/java/qdox.jar")))
3847 ;; build.xml searches for .jar files in this directoy, which
3848 ;; we remove from the source archive.
3849 (add-before 'build 'create-dummy-directories
3851 (mkdir-p "lib/integration")
3853 (add-before 'build 'create-pom
3855 (substitute* "pom/hamcrest-core.pom"
3856 (("@VERSION@") ,version))
3859 (install-from-pom "pom/hamcrest-core.pom")))))
3861 `(("java-qdox-1.12" ,java-qdox-1.12)
3862 ("java-jarjar" ,java-jarjar)))
3864 `(("java-hamcrest-parent-pom" ,java-hamcrest-parent-pom)))
3865 (home-page "http://hamcrest.org/")
3866 (synopsis "Library of matchers for building test expressions")
3868 "This package provides a library of matcher objects (also known as
3869 constraints or predicates) allowing @code{match} rules to be defined
3870 declaratively, to be used in other frameworks. Typical scenarios include
3871 testing frameworks, mocking libraries and UI validation rules.")
3872 (license license:bsd-2)))
3874 (define java-hamcrest-parent-pom
3876 (inherit java-hamcrest-core)
3877 (name "java-hamcrest-parent-pom")
3878 (propagated-inputs '())
3883 (modify-phases %standard-phases
3887 (substitute* "pom/hamcrest-parent.pom"
3888 (("@VERSION@") ,(package-version java-hamcrest-core)))
3891 (install-pom-file "pom/hamcrest-parent.pom")))))))
3893 (define-public java-hamcrest-library
3895 (inherit java-hamcrest-core)
3896 (name "java-hamcrest-library")
3898 (substitute-keyword-arguments (package-arguments java-hamcrest-core)
3899 ((#:build-target _) "library")
3901 `(modify-phases ,phases
3902 (add-after 'unpack 'patch-classpath-for-integration
3903 (lambda* (#:key inputs #:allow-other-keys)
3904 (substitute* "build.xml"
3905 (("build/hamcrest-core-\\$\\{version\\}\\.jar")
3906 (car (find-files (assoc-ref inputs "java-hamcrest-core")
3909 (replace 'create-pom
3911 (substitute* "pom/hamcrest-library.pom"
3912 (("@VERSION@") ,(package-version java-hamcrest-core)))
3915 (install-from-pom "pom/hamcrest-library.pom"))))))
3917 `(("java-hamcrest-core" ,java-hamcrest-core)
3918 ("java-hamcrest-parent-pom" ,java-hamcrest-parent-pom)))))
3920 (define-public java-junit
3927 (url "https://github.com/junit-team/junit/")
3928 (commit (string-append "r" version))))
3929 (file-name (git-file-name name version))
3932 "1j8avi91px1z8rjc89cfikwrvfifdmmsarwiyrcnr59ynvpz0v8h"))
3933 (modules '((guix build utils)))
3936 ;; Delete bundled jar archives.
3937 (delete-file-recursively "lib")
3939 (build-system ant-build-system)
3941 `(#:jar-name "junit.jar"
3942 #:source-dir "src/main/java"
3943 #:test-dir "src/test"
3944 #:test-exclude (list "**/SimpleTest.java" "**/StackTracesTest.java"
3945 "**/RuleChainTest.java" "**/TestWatchmanTest.java")
3947 (modify-phases %standard-phases
3948 (add-before 'check 'copy-test-resources
3950 (copy-recursively "src/test/resources" "build/test-classes")
3953 (install-from-pom "pom.xml")))))
3955 `(("java-hamcrest-core" ,java-hamcrest-core)))
3957 `(("java-hamcrest-library" ,java-hamcrest-library)))
3958 (home-page "https://junit.org/junit4/")
3959 (synopsis "Test framework for Java")
3961 "JUnit is a simple framework to write repeatable tests for Java projects.
3962 JUnit provides assertions for testing expected results, test fixtures for
3963 sharing common test data, and test runners for running tests.")
3964 (license license:epl1.0)))
3966 (define-public java-junitparams
3968 (name "java-junitparams")
3973 (url "https://github.com/Pragmatists/JUnitParams")
3974 (commit (string-append "JUnitParams-" version))))
3975 (file-name (git-file-name name version))
3978 "0rb52xdfp99invyjrras3w0bf0a81cz30yd47rkkiyqcqj0y1q9b"))))
3979 (build-system ant-build-system)
3981 `(#:jar-name "junitparams.jar"
3982 #:source-dir "src/main/java"
3983 #:test-dir "src/test"
3984 #:test-exclude (list "**/SuperclassTest.java")))
3986 `(("java-junit" ,java-junit)))
3988 `(("java-junit" ,java-junit)
3989 ("java-hamcrest-core" ,java-hamcrest-core)
3990 ("java-assertj" ,java-assertj)))
3991 (home-page "https://github.com/Pragmatists/JUnitParams")
3992 (synopsis "Parameterised test support for JUnit")
3993 (description "The JUnitParams project adds a new runner to JUnit and
3994 provides much easier and readable parametrised tests for JUnit.")
3995 (license license:asl2.0)))
3997 (define-public java-plexus-utils
3999 (name "java-plexus-utils")
4000 ;; sisu-build-api needs this version, later versions don't work
4005 (url "https://github.com/codehaus-plexus/plexus-utils")
4006 (commit (string-append "plexus-utils-" version))))
4007 (file-name (git-file-name name version))
4010 "1w169glixyk94jbczj8jzg897lsab46jihiaa3dhw0p06g35va8b"))))
4011 (build-system ant-build-system)
4012 ;; FIXME: The default build.xml does not include a target to install
4015 `(#:jar-name "plexus-utils.jar"
4016 #:source-dir "src/main"
4018 (modify-phases %standard-phases
4019 (add-after 'unpack 'fix-reference-to-/bin-and-/usr
4021 (substitute* "src/main/java/org/codehaus/plexus/util/\
4022 cli/shell/BourneShell.java"
4023 (("/bin/sh") (which "sh"))
4024 (("/usr/") (getcwd)))
4026 (add-after 'unpack 'fix-or-disable-broken-tests
4028 (with-directory-excursion "src/test/java/org/codehaus/plexus/util"
4029 (substitute* '("cli/CommandlineTest.java"
4030 "cli/shell/BourneShellTest.java")
4031 (("/bin/sh") (which "sh"))
4032 (("/bin/echo") (which "echo")))
4034 ;; This test depends on MavenProjectStub, but we don't have
4035 ;; a package for Maven.
4036 (delete-file "introspection/ReflectionValueExtractorTest.java")
4038 ;; FIXME: The command line tests fail, maybe because they use
4040 (delete-file "cli/CommandlineTest.java")
4042 ;; These tests require openjdk jmh, which is not packaged yet
4043 (for-each delete-file (find-files "." "PerfTest.java$")))
4045 (add-before 'build 'copy-resources
4047 (copy-recursively "src/main/resources" "build/classes")
4049 (replace 'install (install-from-pom "pom.xml")))))
4051 `(("java-hamcrest-core" ,java-hamcrest-core)
4052 ("java-junit" ,java-junit)))
4054 `(("plexus-parent-pom" ,plexus-parent-pom-5.1)))
4055 (home-page "https://codehaus-plexus.github.io/plexus-utils/")
4056 (synopsis "Common utilities for the Plexus framework")
4057 (description "This package provides various Java utility classes for the
4058 Plexus framework to ease working with strings, files, command lines, XML and
4060 (license license:asl2.0)))
4062 (define-public java-plexus-utils-3.3.0
4064 (inherit java-plexus-utils)
4069 (url "https://github.com/codehaus-plexus/plexus-utils")
4070 (commit (string-append "plexus-utils-" version))))
4071 (file-name (git-file-name "java-plexus-utils" version))
4074 "0d0fq21rzjy0j55kcp8w9k1rbq9rwr0r7cc8239p9jbz54vihp0g"))))))
4076 (define-public java-plexus-interpolation
4078 (name "java-plexus-interpolation")
4083 (url "https://github.com/codehaus-plexus/plexus-interpolation")
4084 (commit (string-append "plexus-interpolation-" version))))
4085 (file-name (git-file-name name version))
4088 "1rahjmhywf6d5m32qzlc9izawyvcd71abfm9k03f13rs2xmfxzlh"))))
4089 (build-system ant-build-system)
4091 `(#:jar-name "plexus-interpolation.jar"
4092 #:source-dir "src/main"
4094 (modify-phases %standard-phases
4095 (replace 'install (install-from-pom "pom.xml")))))
4097 `(("plexus-parent-pom-5.1" ,plexus-parent-pom-5.1)))
4099 `(("java-junit" ,java-junit)
4100 ("java-hamcrest-core" ,java-hamcrest-core)))
4101 (home-page "https://codehaus-plexus.github.io/plexus-interpolation/")
4102 (synopsis "Java components for interpolating ${} strings and the like")
4103 (description "Plexus interpolator is a modular, flexible interpolation
4104 framework for the expression language style commonly seen in Maven, Plexus,
4105 and other related projects.
4107 It has its foundation in the @code{org.codehaus.plexus.utils.interpolation}
4108 package within @code{plexus-utils}, but has been separated in order to allow
4109 these two libraries to vary independently of one another.")
4110 (license license:asl2.0)))
4112 (define-public java-plexus-classworlds
4114 (name "java-plexus-classworlds")
4119 (url "https://github.com/codehaus-plexus/plexus-classworlds")
4120 (commit (string-append "plexus-classworlds-" version))))
4121 (file-name (git-file-name name version))
4124 "034k2hgvj1saalwbnzrbg4n0zgzwcpz1lhlb8q4kgglsp9pmm03s"))))
4125 (build-system ant-build-system)
4127 `(#:jar-name "plexus-classworlds.jar"
4128 #:source-dir "src/main"
4129 #:tests? #f;; FIXME: we need to generate some resources as in pom.xml
4131 (modify-phases %standard-phases
4132 (replace 'install (install-from-pom "pom.xml")))))
4134 `(("plexus-parent-pom-5.1" ,plexus-parent-pom-5.1)))
4136 `(("java-junit" ,java-junit)))
4137 (home-page "https://codehaus-plexus.github.io/plexus-classworlds/")
4138 (synopsis "Java class loader framework")
4139 (description "Plexus classworlds replaces the native @code{ClassLoader}
4140 mechanism of Java. It is especially useful for dynamic loading of application
4142 (license license:asl2.0)))
4144 (define java-plexus-container-default-bootstrap
4146 (name "java-plexus-container-default-bootstrap")
4151 (url "https://github.com/codehaus-plexus/plexus-containers")
4152 (commit (string-append "plexus-containers-" version))))
4153 (file-name (git-file-name name version))
4156 "1316hrp5vqfv0aw7miq2fp0wwy833h66h502h29vnh5sxj27x228"))))
4157 (build-system ant-build-system)
4159 `(#:jar-name "container-default.jar"
4160 #:source-dir "plexus-container-default/src/main/java"
4161 #:test-dir "plexus-container-default/src/test"
4162 #:tests? #f; requires plexus-archiver, which depends on this package
4164 (modify-phases %standard-phases
4165 (add-before 'build 'fix-google-collections
4167 ;; Google collections are now replaced with guava
4168 (substitute* "plexus-container-default/pom.xml"
4169 (("google-collections") "guava")
4170 (("com.google.collections") "com.google.guava"))
4172 (add-before 'build 'copy-resources
4175 "plexus-container-default/src/main/resources/"
4179 (install-from-pom "plexus-container-default/pom.xml")))))
4181 `(("java-plexus-worldclass" ,java-plexus-classworlds)
4182 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
4183 ("java-plexus-utils" ,java-plexus-utils)
4184 ("java-junit" ,java-junit)
4185 ("java-guava" ,java-guava)
4186 ("java-plexus-containers-parent-pom" ,java-plexus-containers-parent-pom)))
4187 (home-page "https://github.com/codehaus-plexus/plexus-containers")
4188 (synopsis "Inversion-of-control container")
4189 (description "Plexus-default-container is Plexus' inversion-of-control
4190 (@dfn{IoC}) container. It is composed of its public API and its default
4192 (license license:asl2.0)))
4194 (define java-plexus-containers-parent-pom
4196 (inherit java-plexus-container-default-bootstrap)
4197 (name "java-plexus-containers-parent-pom")
4201 (modify-phases %standard-phases
4205 (install-pom-file "pom.xml")))))
4207 `(("plexus-parent-pom" ,plexus-parent-pom-4.0)))))
4209 (define-public java-plexus-io
4211 (name "java-plexus-io")
4216 (url "https://github.com/codehaus-plexus/plexus-io")
4217 (commit (string-append "plexus-io-" version))))
4218 (file-name (git-file-name name version))
4221 "1r3wqfpbxq8vp4p914i8p88r0994rmcjw02hz14n11cfb6gsyvlr"))))
4222 (build-system ant-build-system)
4224 `(#:jar-name "plexus-io.jar"
4225 #:source-dir "src/main/java"
4226 #:test-dir "src/test"
4228 (modify-phases %standard-phases
4229 (add-before 'build 'copy-resources
4231 (mkdir-p "build/classes")
4232 (copy-recursively "src/main/resources" "build/classes")
4233 (mkdir-p "build/test-classes")
4234 (copy-recursively "src/test/resources" "build/test-classes")
4236 (replace 'install (install-from-pom "pom.xml")))))
4238 `(("java-plexus-utils" ,java-plexus-utils-3.3.0)
4239 ("java-commons-io" ,java-commons-io)
4240 ("plexus-parent-pom" ,plexus-parent-pom-5.1)))
4242 `(("java-jsr305" ,java-jsr305)))
4244 `(("junit" ,java-junit)
4245 ("hamcrest" ,java-hamcrest-core)
4246 ("guava" ,java-guava)
4247 ("classworlds" ,java-plexus-classworlds)
4248 ("xbean" ,java-geronimo-xbean-reflect)
4249 ("container-default" ,java-plexus-container-default-bootstrap)))
4250 (home-page "https://github.com/codehaus-plexus/plexus-io")
4251 (synopsis "I/O plexus components")
4252 (description "Plexus IO is a set of plexus components, which are designed
4253 for use in I/O operations. This implementation using plexus components allows
4254 reusing it in maven.")
4255 (license license:asl2.0)))
4257 (define-public java-plexus-archiver
4259 (name "java-plexus-archiver")
4263 (uri (string-append "https://github.com/codehaus-plexus/plexus-archiver"
4264 "/archive/plexus-archiver-" version ".tar.gz"))
4267 "144n971r3lfrx3l12nf2scm80x4xdvgbkk4bjpa4vcvvdrll6qys"))))
4268 (build-system ant-build-system)
4270 `(#:jar-name "plexus-archiver.jar"
4271 #:source-dir "src/main/java"
4272 #:test-dir "src/test"
4273 #:test-exclude (list "**/Abstract*.java" "**/Base*.java")
4275 (modify-phases %standard-phases
4276 (add-before 'check 'remove-failing
4278 ;; Requires an older version of plexus container
4280 "src/test/java/org/codehaus/plexus/archiver/DuplicateFilesTest.java")
4282 (add-before 'check 'fix-test-building
4284 (substitute* "build.xml"
4285 (("srcdir=\"src/test\"") "srcdir=\"src/test/java\""))
4287 (add-before 'build 'copy-resources
4289 (mkdir-p "build/classes")
4290 (copy-recursively "src/main/resources" "build/classes")
4291 (mkdir-p "build/test-classes")
4292 (copy-recursively "src/test/resources" "build/test-classes")
4294 (replace 'install (install-from-pom "pom.xml")))))
4296 `(("java-plexus-utils" ,java-plexus-utils-3.3.0)
4297 ("java-plexus-io" ,java-plexus-io)
4298 ("java-iq80-snappy" ,java-iq80-snappy)
4299 ("java-commons-compress" ,java-commons-compress)
4300 ("plexus-parent-pom" ,plexus-parent-pom-6.1)))
4302 `(("java-jsr305" ,java-jsr305)
4303 ("java-plexus-container-default"
4304 ,java-plexus-container-default-bootstrap)))
4306 `(("java-hamcrest-core" ,java-hamcrest-core)
4307 ("junit" ,java-junit)
4308 ("classworld" ,java-plexus-classworlds)
4309 ("xbean" ,java-geronimo-xbean-reflect)
4311 ("guava" ,java-guava)))
4312 (home-page "https://github.com/codehaus-plexus/plexus-archiver")
4313 (synopsis "Archiver component of the Plexus project")
4314 (description "Plexus-archiver contains a component to deal with project
4316 (license license:asl2.0)))
4318 (define-public java-plexus-container-default
4320 (inherit java-plexus-container-default-bootstrap)
4321 (name "java-plexus-container-default")
4323 `(#:jar-name "container-default.jar"
4324 #:source-dir "plexus-container-default/src/main/java"
4325 #:test-dir "plexus-container-default/src/test"
4326 #:test-exclude (list ;"**/*Test.java"
4328 ;; Requires plexus-hierarchy
4329 "**/PlexusHierarchyTest.java"
4331 "**/ComponentRealmCompositionTest.java"
4332 "**/PlexusContainerTest.java")
4334 (modify-phases %standard-phases
4335 (add-before 'build 'fix-google-collections
4337 ;; Google collections are now replaced with guava
4338 (substitute* "plexus-container-default/pom.xml"
4339 (("google-collections") "guava")
4340 (("com.google.collections") "com.google.guava"))
4342 (add-before 'build 'copy-resources
4345 "plexus-container-default/src/main/resources/"
4348 (add-before 'check 'fix-paths
4350 (let ((dir "plexus-container-default/src/test/java/org/codehaus"))
4353 dir "/plexus/component/composition/"
4354 "ComponentRealmCompositionTest.java")
4355 (("src/test") "plexus-container-default/src/test"))
4358 (install-from-pom "plexus-container-default/pom.xml")))))
4360 `(("worldclass" ,java-plexus-classworlds)
4361 ("xbean" ,java-geronimo-xbean-reflect)
4362 ("utils" ,java-plexus-utils)
4363 ("junit" ,java-junit)
4364 ("guava" ,java-guava)))
4366 `(("archiver" ,java-plexus-archiver)
4367 ("hamcrest" ,java-hamcrest-core)))))
4369 (define-public java-plexus-component-annotations
4371 (inherit java-plexus-container-default)
4372 (name "java-plexus-component-annotations")
4374 `(#:jar-name "plexus-component-annotations.jar"
4375 #:source-dir "plexus-component-annotations/src/main/java"
4376 #:tests? #f; no tests
4378 (modify-phases %standard-phases
4380 (install-from-pom "plexus-component-annotations/pom.xml")))))
4382 `(("java-plexus-containers-parent-pom" ,java-plexus-containers-parent-pom)))
4385 (synopsis "Plexus descriptors generator")
4386 (description "This package is a Maven plugin to generate Plexus descriptors
4387 from source tags and class annotations.")))
4389 (define-public java-plexus-component-metadata
4391 (inherit java-plexus-container-default)
4392 (name "java-plexus-component-metadata")
4394 `(#:jar-name "plexus-component-metadata.jar"
4395 #:source-dir "src/main/java"
4396 #:test-dir "src/test"
4399 (modify-phases %standard-phases
4400 (add-before 'configure 'chdir
4402 (chdir "plexus-component-metadata")
4404 (add-before 'build 'copy-resources
4406 (copy-recursively "src/main/resources"
4410 `(("java-plexus-container-default" ,java-plexus-container-default)
4411 ("java-plexu-component-annotations" ,java-plexus-component-annotations)
4412 ("java-plexus-utils" ,java-plexus-utils)
4413 ("java-plexus-cli" ,java-plexus-cli)
4414 ("java-plexus-classworlds" ,java-plexus-classworlds)
4415 ("maven-plugin-api" ,maven-plugin-api)
4416 ("maven-plugin-annotations" ,maven-plugin-annotations)
4417 ("maven-core-bootstrap" ,maven-core-bootstrap)
4418 ("maven-model" ,maven-model)
4419 ("java-commons-cli" ,java-commons-cli)
4420 ("java-qdox" ,java-qdox)
4421 ("java-jdom2" ,java-jdom2)
4422 ("java-asm" ,java-asm)))
4424 `(("java-junit" ,java-junit)
4425 ("java-guava" ,java-guava)
4426 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)))
4427 (synopsis "Inversion-of-control container for Maven")
4428 (description "The Plexus project provides a full software stack for creating
4429 and executing software projects. Based on the Plexus container, the
4430 applications can utilise component-oriented programming to build modular,
4431 reusable components that can easily be assembled and reused. This package
4432 provides the Maven plugin generating the component metadata.")))
4434 (define-public java-plexus-cipher
4436 (name "java-plexus-cipher")
4441 (url "https://github.com/codehaus-plexus/plexus-cipher")
4442 (commit (string-append "plexus-cipher-" version))))
4443 (file-name (git-file-name name version))
4446 "0m638nzlxbmnbcj5cwdpgs326ab584yv0k803zlx37r6iqwvf6b0"))))
4447 (build-system ant-build-system)
4449 `(#:jar-name "plexus-cipher.jar"
4450 #:source-dir "src/main/java"
4451 #:tests? #f; FIXME: requires sisu-inject-bean
4453 (modify-phases %standard-phases
4454 (add-before 'build 'copy-resources
4456 (copy-recursively "src/main/resources" "build/classes")
4457 (mkdir-p "build/classes/META-INF/sisu")
4458 (with-output-to-file "build/classes/META-INF/sisu/javax.inject.Named"
4460 (display "org.sonatype.plexus.components.cipher.DefaultPlexusCipher\n")))
4462 (add-before 'install 'fix-test-dependency
4464 ;; sisu-inject-bean is only used for tests, but its scope is "provided".
4465 (substitute* "pom.xml"
4466 (("provided") "test"))
4468 (replace 'install (install-from-pom "pom.xml")))))
4470 `(("java-cdi-api" ,java-cdi-api)
4471 ("java-javax-inject" ,java-javax-inject)))
4473 `(("java-sonatype-spice-parent-pom" ,java-sonatype-spice-parent-pom-15)))
4475 `(("java-junit" ,java-junit)))
4476 (home-page "https://github.com/sonatype/plexus-cipher")
4477 (synopsis "Encryption/decryption Component")
4478 (description "Plexus-cipher contains a component to deal with encryption
4480 (license license:asl2.0)))
4482 (define-public java-plexus-java
4484 (name "java-plexus-java")
4489 (url "https://github.com/codehaus-plexus/plexus-languages")
4490 (commit (string-append "plexus-languages-" version))))
4491 (file-name (git-file-name name version))
4494 "0vmvgq5hfxs90yyxgssfpwq78l7vwx1ljwpkk594mrdr8sm668b5"))
4495 (modules '((guix build utils)))
4498 (for-each delete-file (find-files "." ".*.jar$"))
4500 (build-system ant-build-system)
4502 `(#:jar-name "plexus-java.java"
4503 #:source-dir "plexus-java/src/main/java"
4504 #:test-dir "plexus-java/src/test"
4505 #:tests? #f; require mockito 2
4507 (modify-phases %standard-phases
4508 (add-after 'build 'generate-metadata
4510 (invoke "java" "-cp" (string-append (getenv "CLASSPATH") ":build/classes")
4511 "org.codehaus.plexus.metadata.PlexusMetadataGeneratorCli"
4512 "--source" "plexus-java/src/main/java"
4513 "--output" "build/classes/META-INF/plexus/components.xml"
4514 "--classes" "build/classes"
4515 "--descriptors" "build/classes/META-INF")
4516 (invoke "ant" "jar")
4518 (add-before 'install 'install-parent
4519 (install-pom-file "pom.xml"))
4521 (install-from-pom "plexus-java/pom.xml")))))
4523 `(("java-asm" ,java-asm)
4524 ("java-qdox" ,java-qdox-2-M9)
4525 ("java-javax-inject" ,java-javax-inject)
4526 ("plexus-parent-pom" ,plexus-parent-pom-4.0)))
4528 `(("java-plexus-component-annotations" ,java-plexus-component-annotations)))
4530 `(("java-plexus-component-metadata" ,java-plexus-component-metadata)
4531 ("java-junit" ,java-junit)))
4532 (home-page "https://codehaus-plexus.github.io/plexus-languages/plexus-java")
4533 (synopsis "Shared language features for Java")
4534 (description "This package contains shared language features of the Java
4535 language, for the plexus project.")
4536 (license license:asl2.0)))
4538 (define-public java-plexus-compiler-api
4540 (name "java-plexus-compiler-api")
4545 (url "https://github.com/codehaus-plexus/plexus-compiler")
4546 (commit (string-append "plexus-compiler-" version))))
4547 (file-name (git-file-name name version))
4550 "1nq1gnn3s6z1j29gmi1hqbklsmm8b1lmnafb0191914f95mn18gk"))))
4551 (build-system ant-build-system)
4553 `(#:jar-name "plexus-compiler-api.jar"
4554 #:source-dir "plexus-compiler-api/src/main/java"
4555 #:test-dir "plexus-compiler-api/src/test"
4557 (modify-phases %standard-phases
4559 (install-from-pom "plexus-compiler-api/pom.xml")))))
4561 `(("java-plexus-container-default" ,java-plexus-container-default)
4562 ("java-plexus-compiler-pom" ,java-plexus-compiler-pom)
4563 ("java-plexus-util" ,java-plexus-utils)))
4565 `(("java-junit" ,java-junit)))
4566 (home-page "https://github.com/codehaus-plexus/plexus-compiler")
4567 (synopsis "Plexus Compilers component's API to manipulate compilers")
4568 (description "This package contains the API used by components to manipulate
4570 (license (list license:asl2.0
4573 (define java-plexus-compiler-pom
4575 (inherit java-plexus-compiler-api)
4576 (name "java-plexus-compiler-pom")
4580 (modify-phases %standard-phases
4584 (install-pom-file "pom.xml"))
4585 (add-after 'install 'install-compilers
4586 (install-pom-file "plexus-compilers/pom.xml")))))
4588 `(("plexus-components-parent-pom-4.0" ,plexus-components-parent-pom-4.0)))))
4590 (define plexus-components-parent-pom-4.0
4592 (name "plexus-components-parent-pom")
4597 (url "https://github.com/codehaus-plexus/plexus-components")
4598 (commit (string-append "plexus-components-" version))))
4599 (file-name (git-file-name name version))
4602 "041bm8yv0m2i17mqg8zljib4ykpha7ijls2qfdwvkma4d39lhysi"))))
4603 (build-system ant-build-system)
4607 (modify-phases %standard-phases
4611 (install-pom-file "pom.xml")))))
4613 `(("plexus-parent-pom-4.0" ,plexus-parent-pom-4.0)))
4614 (home-page "https://codehaus-plexus.github.io/plexus-components")
4615 (synopsis "Plexus parent pom")
4616 (description "This package contains the Plexus components parent POM.")
4617 (license license:asl2.0)))
4619 (define-public java-plexus-compiler-manager
4621 (inherit java-plexus-compiler-api)
4622 (name "java-plexus-compiler-manager")
4624 `(#:jar-name "compiler-compiler-manager.java"
4625 #:source-dir "plexus-compiler-manager/src/main/java"
4626 #:test-dir "plexus-compiler-manager/src/test"
4629 (modify-phases %standard-phases
4630 (add-after 'build 'generate-metadata
4632 (invoke "java" "-cp" (string-append (getenv "CLASSPATH") ":build/classes")
4633 "org.codehaus.plexus.metadata.PlexusMetadataGeneratorCli"
4634 "--source" "plexus-compiler-manager/src/main/java"
4635 "--output" "build/classes/META-INF/plexus/components.xml"
4636 "--classes" "build/classes"
4637 "--descriptors" "build/classes/META-INF")
4638 (invoke "ant" "jar")
4640 (add-after 'generate-metadata 'rebuild
4642 (invoke "ant" "jar")
4645 (install-from-pom "plexus-compiler-manager/pom.xml")))))
4647 `(("java-plexus-compiler-api" ,java-plexus-compiler-api)
4648 ("java-plexus-compiler-pom" ,java-plexus-compiler-pom)
4649 ("java-plexus-container-default" ,java-plexus-container-default)))
4652 ("java-plexus-component-metadata" ,java-plexus-component-metadata)))
4653 (synopsis "Compiler management for Plexus Compiler component")
4654 (description "Plexus Compiler is a Plexus component to use different
4655 compilers through a uniform API. This component chooses the compiler
4656 implementation to use in a project.")))
4658 (define-public java-plexus-compiler-javac
4660 (inherit java-plexus-compiler-api)
4661 (name "java-plexus-compiler-javac")
4663 `(#:jar-name "plexus-compiler-javac.jar"
4664 #:source-dir "plexus-compilers/plexus-compiler-javac/src/main/java"
4666 #:tests? #f; depends on compiler-test -> maven-core -> ... -> this package.
4667 #:test-dir "plexus-compilers/plexus-compiler-javac/src/test"
4668 #:modules ((guix build ant-build-system)
4670 (guix build java-utils)
4673 (modify-phases %standard-phases
4674 ;; We cannot use java-plexus-component-metadata to generate the metadata
4675 ;; because it ultimately depends on this package.
4676 ;; Create it manually instead
4677 (add-before 'build 'create-metadata
4679 (let* ((dir "build/classes/META-INF/plexus")
4680 (file (string-append dir "/components.xml")))
4682 (with-output-to-file file
4688 (role "org.codehaus.plexus.compiler.Compiler")
4690 (implementation "org.codehaus.plexus.compiler.javac.JavacCompiler")
4691 (isolated-realm "false"))))))))
4694 (install-from-pom "plexus-compilers/plexus-compiler-javac/pom.xml")))))
4696 `(("java-plexus-compiler-api" ,java-plexus-compiler-api)
4697 ("java-plexus-utils" ,java-plexus-utils)
4698 ("java-plexus-container-default" ,java-plexus-container-default)))
4699 (synopsis "Javac Compiler support for Plexus Compiler component")
4700 (description "This package contains the Javac Compiler support for Plexus
4701 Compiler component.")))
4703 (define plexus-components-pom-1.1.20
4705 (name "plexus-components-pom-1.1.20")
4710 (url "https://github.com/codehaus-plexus/plexus-components")
4711 (commit (string-append "plexus-components-" version))))
4712 (file-name (git-file-name name version))
4715 "1q254k95m9icyfsvaw8c226midg8v6v436wvivhv7im825mnp5yb"))))
4716 (build-system ant-build-system)
4720 (modify-phases %standard-phases
4724 (install-pom-file "pom.xml")))))
4726 `(("plexus-parent-pom" ,plexus-parent-pom-3.1)))
4727 (home-page "https://github.com/codehaus-plexus/plexus-components")
4728 (synopsis "Maven parent pom for plexus packages")
4729 (description "This package contains the parent pom for plexus component
4731 (license license:asl2.0)))
4733 (define-public java-plexus-digest
4735 (name "java-plexus-digest")
4740 (url "https://github.com/codehaus-plexus/plexus-digest")
4741 (commit "2a52ad1bda8297fa0e287163d2fa37245ec6a430")))
4742 (file-name (git-file-name name version))
4745 "19w5wxsliz8r42niry68qa665kvjsb8081dazg9vgd3pca72w07x"))))
4746 (build-system ant-build-system)
4748 `(#:jar-name "plexus-digest.jar"
4749 #:source-dir "src/main/java"
4752 (modify-phases %standard-phases
4754 (install-from-pom "pom.xml")))))
4756 `(("java-plexus-utils" ,java-plexus-utils)
4757 ("plexus-components-pom-1.1.20" ,plexus-components-pom-1.1.20)))
4759 `(("java-junit" ,java-junit)))
4760 (home-page "https://github.com/codehaus-plexus/plexus-digest")
4761 (synopsis "Hash function utilities for Java")
4762 (description "This package is a plexus component that contains hash
4763 function utilities.")
4764 (license license:asl2.0)))
4766 (define-public java-plexus-sec-dispatcher
4768 (name "java-plexus-sec-dispatcher")
4769 (version "1.4") ;; Newest release listed at the Maven Central Repository.
4771 ;; This project doesn't tag releases or publish tarballs, so we take
4772 ;; the "prepare release plexus-sec-dispatcher-1.4" git commit.
4775 (url "https://github.com/sonatype/plexus-sec-dispatcher/")
4776 (commit "7db8f880486e192a1c5ea9544e01e756c3d49d0f")))
4779 "1ng4yliy4cqpjr4fxxjbpwyk1wkch5f8vblm1kvwf328s4gibszs"))
4780 (file-name (git-file-name name version))))
4782 `(#:jar-name "plexus-sec-dispatcher.jar"
4783 #:source-dir "src/main/java"
4785 (modify-phases %standard-phases
4786 (add-before 'build 'generate-models
4787 (lambda* (#:key inputs #:allow-other-keys)
4788 (define (modello-single-mode file version mode)
4790 "org.codehaus.modello.ModelloCli"
4791 file mode "src/main/java" version
4793 (let ((file "src/main/mdo/settings-security.mdo"))
4794 (modello-single-mode file "1.0.0" "java")
4795 (modello-single-mode file "1.0.0" "xpp3-reader")
4796 (modello-single-mode file "1.0.0" "xpp3-writer"))
4798 (add-before 'build 'generate-components.xml
4800 (mkdir-p "build/classes/META-INF/plexus")
4801 (with-output-to-file "build/classes/META-INF/plexus/components.xml"
4807 <role>org.sonatype.plexus.components.sec.dispatcher.SecDispatcher</role>\n
4808 <role-hint>default</role-hint>\n
4809 <implementation>org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher</implementation>\n
4810 <description></description>\n
4813 <role>org.sonatype.plexus.components.cipher.PlexusCipher</role>\n
4814 <field-name>_cipher</field-name>\n
4817 <role>org.sonatype.plexus.components.sec.dispatcher.PasswordDecryptor</role>\n
4818 <field-name>_decryptors</field-name>\n
4822 <_configuration-file>~/.settings-security.xml</_configuration-file>\n
4826 </component-set>\n")))
4828 (add-before 'check 'fix-paths
4830 (copy-recursively "src/test/resources" "target")
4832 (replace 'install (install-from-pom "pom.xml")))))
4834 `(("java-plexus-utils" ,java-plexus-utils)
4835 ("java-plexus-cipher" ,java-plexus-cipher)
4836 ("java-sonatype-spice-parent-pom" ,java-sonatype-spice-parent-pom-12)))
4838 `(("java-modello-core" ,java-modello-core)
4840 ("java-plexus-container-default" ,java-plexus-container-default)
4841 ("java-plexus-classworlds" ,java-plexus-classworlds)
4842 ("java-plexus-utils" ,java-plexus-utils)
4843 ("java-guava" ,java-guava)
4844 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
4845 ("java-sisu-build-api" ,java-sisu-build-api)
4847 ("java-modellop-plugins-java" ,java-modello-plugins-java)
4848 ("java-modellop-plugins-xml" ,java-modello-plugins-xml)
4849 ("java-modellop-plugins-xpp3" ,java-modello-plugins-xpp3)
4851 ("java-junit" ,java-junit)))
4852 (build-system ant-build-system)
4853 (home-page "https://github.com/sonatype/plexus-sec-dispatcher")
4854 (synopsis "Plexus Security Dispatcher Component")
4855 (description "This package is the Plexus Security Dispatcher Component.
4856 This component decrypts a string passed to it.")
4857 (license license:asl2.0)))
4859 (define-public java-plexus-cli
4861 (name "java-plexus-cli")
4866 (url "https://github.com/sonatype/plexus-cli")
4867 (commit "a776afa6bca84e5107bedb69440329cdb24ed645")))
4868 (file-name (string-append name "-" version))
4871 "0xjrlay605rypv3zd7y24vlwf0039bil3n2cqw54r1ddpysq46vx"))))
4872 (build-system ant-build-system)
4874 `(#:jar-name "plexus-cli.jar"
4875 #:source-dir "src/main/java"
4877 #:test-dir "src/test"))
4879 `(("java-commons-cli" ,java-commons-cli)
4880 ("java-plexus-container-default" ,java-plexus-container-default)
4881 ("java-plexus-classworlds" ,java-plexus-classworlds)))
4883 `(("java-plexus-utils" ,java-plexus-utils)
4884 ("java-junit" ,java-junit)
4885 ("java-guava" ,java-guava)))
4886 (home-page "https://codehaus-plexus.github.io/plexus-cli")
4887 (synopsis "CLI building library for plexus")
4888 (description "This package is a library to help creating CLI around
4889 Plexus components.")
4890 (license license:asl2.0)))
4892 (define-public java-sisu-build-api
4894 (name "java-sisu-build-api")
4899 (url "https://github.com/sonatype/sisu-build-api")
4900 (commit (string-append "plexus-build-api-" version))))
4901 (file-name (git-file-name name version))
4904 "1d5w6c58gkx30d51v7qwv1xrhc0ly76848gihmgshj19yf6yhca0"))))
4905 (build-system ant-build-system)
4907 `(#:jar-name "sisu-build-api.jar"
4908 #:source-dir "src/main/java"
4910 #:tests? #f; FIXME: how to run the tests?
4912 (modify-phases %standard-phases
4913 (add-before 'build 'copy-resources
4915 (copy-recursively "src/main/resources" "build/classes")
4916 (substitute* (find-files "build/classes")
4917 (("\\$\\{project.version\\}") ,version))
4919 (add-before 'build 'generate-plexus-compontent
4921 (mkdir-p "build/classes/META-INF/plexus")
4922 ;; This file is required for plexus to inject this package.
4923 ;; FIXME: how is it generated?
4924 (with-output-to-file "build/classes/META-INF/plexus/components.xml"
4930 <role>org.sonatype.plexus.build.incremental.BuildContext</role>\n
4931 <role-hint>default</role-hint>\n
4932 <implementation>org.sonatype.plexus.build.incremental.DefaultBuildContext</implementation>\n
4933 <description>Filesystem based non-incremental build context implementation\n
4934 which behaves as if all files were just created.</description>\n
4937 </component-set>\n")))
4940 (install-from-pom "pom.xml")))))
4942 `(("java-plexus-utils" ,java-plexus-utils)
4943 ("java-plexus-container-default" ,java-plexus-container-default)))
4944 (home-page "https://github.com/sonatype/sisu-build-api/")
4945 (synopsis "Base build API for maven")
4946 (description "This package contains the base build API for maven and
4947 a default implementation of it. This API is about scanning files in a
4948 project and determining what files need to be rebuilt.")
4949 (license license:asl2.0)))
4951 (define-public java-modello-core
4953 (name "java-modello-core")
4958 (url "https://github.com/codehaus-plexus/modello")
4959 (commit (string-append "modello-" version))))
4960 (file-name (git-file-name name version))
4963 "1di6ni42aqllpdvkpyfcw70352vr2i8wf6hd5nhd9kmqjb5dj5j4"))))
4964 (build-system ant-build-system)
4966 `(#:jar-name "modello-core.jar"
4967 #:source-dir "modello-core/src/main/java"
4968 #:test-dir "modello-core/src/test"
4969 #:main-class "org.codehaus.modello.ModelloCli"
4972 (modify-phases %standard-phases
4973 (add-before 'build 'copy-resources
4975 (mkdir-p "build/classes/META-INF/plexus")
4976 (copy-file "modello-core/src/main/resources/META-INF/plexus/components.xml"
4977 "build/classes/META-INF/plexus/components.xml")
4979 (add-before 'check 'fix-tests
4981 (with-directory-excursion "modello-core/src/test/java/org/codehaus"
4982 (substitute* '("modello/core/DefaultModelloCoreTest.java"
4983 "modello/core/io/ModelReaderTest.java")
4984 (("src/test") "modello-core/src/test")))
4987 `(("java-plexus-utils" ,java-plexus-utils)
4988 ("java-plexus-container-default" ,java-plexus-container-default)
4989 ("java-sisu-build-api" ,java-sisu-build-api)))
4991 `(("java-junit" ,java-junit)
4992 ("java-plexus-classworlds" ,java-plexus-classworlds)
4993 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
4994 ("java-guava" ,java-guava)))
4995 (home-page "https://codehaus-plexus.github.io/modello/")
4996 (synopsis "Framework for code generation from a simple model")
4997 (description "Modello is a framework for code generation from a simple model.
4999 Modello generates code from a simple model format: based on a plugin
5000 architecture, various types of code and descriptors can be generated from the
5001 single model, including Java POJOs, XML/JSON/YAML marshallers/unmarshallers,
5002 XSD and documentation.")
5005 ;; Although this package uses only files licensed under expat,
5006 ;; other parts of the source are licensed under different
5007 ;; licenses. We include them to be inherited by other packages.
5009 ;; Some files in modello-plugin-java are licensed under a
5010 ;; 5-clause BSD license.
5011 (license:non-copyleft
5012 (string-append "file:///modello-plugins/modello-plugin-java/"
5013 "src/main/java/org/codehaus/modello/plugin/"
5014 "java/javasource/JNaming.java"))))))
5016 (define-public java-modello-plugins-java
5018 (inherit java-modello-core)
5019 (name "java-modello-plugins-java")
5021 `(#:jar-name "modello-plugins-java.jar"
5022 #:source-dir "modello-plugins/modello-plugin-java/src/main/java"
5023 #:test-dir "modello-plugins/modello-plugin-java/src/test"
5025 #:tests? #f; requires maven-model, which depends on this package
5027 (modify-phases %standard-phases
5028 (add-before 'build 'copy-resources
5030 (mkdir-p "build/classes")
5031 (copy-recursively "modello-plugins/modello-plugin-java/src/main/resources"
5035 `(("java-modello-core" ,java-modello-core)))
5036 (synopsis "Modello Java Plugin")
5037 (description "Modello Java Plugin generates Java objects for the model.")))
5039 (define-public java-modello-plugins-xml
5041 (inherit java-modello-core)
5042 (name "java-modello-plugins-xml")
5044 `(#:jar-name "modello-plugins-xml.jar"
5045 #:source-dir "modello-plugins/modello-plugin-xml/src/main/java"
5046 #:test-dir "modello-plugins/modello-plugin-xml/src/test"
5049 (modify-phases %standard-phases
5050 (add-before 'build 'copy-resources
5052 (mkdir-p "build/classes")
5054 "modello-plugins/modello-plugin-xml/src/main/resources"
5057 (add-before 'check 'fix-paths
5059 (with-directory-excursion "modello-plugins/modello-plugin-xml/src/test"
5061 "java/org/codehaus/modello/plugins/xml/XmlModelloPluginTest.java"
5062 (("src/test") "modello-plugins/modello-plugin-xml/src/test")))
5065 `(("java-modello-core" ,java-modello-core)
5066 ("java-modello-plugins-java" ,java-modello-plugins-java)))
5067 (synopsis "Modello XML Plugin")
5068 (description "Modello XML Plugin contains shared code for every plugins
5069 working on XML representation of the model.")))
5071 (define-public java-modello-test
5073 (inherit java-modello-core)
5074 (name "java-modello-test")
5076 `(#:jar-name "modello-test.jar"
5077 #:source-dir "modello-test/src/main/java"
5078 #:tests? #f; no tests
5081 `(("java-plexus-utils" ,java-plexus-utils)
5082 ("java-plexus-compiler-api" ,java-plexus-compiler-api)
5083 ("java-plexus-compiler-javac" ,java-plexus-compiler-javac)
5084 ("java-plexus-container-default" ,java-plexus-container-default)))
5085 (synopsis "Modello test package")
5086 (description "The modello test package contains the basis to create
5087 Modello generator unit-tests, including sample models and xml files to test
5088 every feature for every plugin.")))
5090 (define-public java-modello-plugins-xpp3
5092 (inherit java-modello-core)
5093 (name "java-modello-plugins-xpp3")
5095 `(#:jar-name "modello-plugins-xpp3.jar"
5096 #:source-dir "modello-plugins/modello-plugin-xpp3/src/main/java"
5097 #:test-dir "modello-plugins/modello-plugin-xpp3/src/test"
5098 ;; One of the test dependencies is maven-model which depends on this package.
5102 (modify-phases %standard-phases
5103 (add-before 'build 'copy-resources
5105 (mkdir-p "build/classes")
5106 (copy-recursively "modello-plugins/modello-plugin-xpp3/src/main/resources"
5110 `(("java-modello-core" ,java-modello-core)
5111 ("java-modello-plugins-java" ,java-modello-plugins-java)
5112 ("java-modello-plugins-xml" ,java-modello-plugins-xml)))
5114 `(("java-xmlunit" ,java-xmlunit)
5115 ("java-modello-test" ,java-modello-test)
5116 ,@(package-native-inputs java-modello-core)))
5117 (synopsis "Modello XPP3 Plugin")
5118 (description "The modello XPP3 plugin generates XML readers and writers based
5119 on the XPP3 API (XML Pull Parser).")))
5121 (define-public java-asm
5127 (uri (string-append "https://download.forge.ow2.org/asm/"
5128 "asm-" version ".tar.gz"))
5131 "115l5pqblirdkmzi32dxx7gbcm4jy0s14y5wircr6h8jdr9aix00"))))
5132 (build-system ant-build-system)
5134 `(#:build-target "compile"
5135 ;; The tests require an old version of Janino, which no longer compiles
5140 ;; We don't need these extra ant tasks, but the build system asks us to
5141 ;; provide a path anyway.
5142 "-Dobjectweb.ant.tasks.path=dummy-path"
5143 ;; The java-aqute.bndlib JAR file will be put onto the classpath and
5144 ;; used during the build automatically by ant-build-system, but
5145 ;; java-asm's build.xml fails unless we provide something here.
5146 "-Dbiz.aQute.bnd.path=dummy-path")
5148 (modify-phases %standard-phases
5149 (add-before 'build 'remove-bnd-dependency
5151 ;; This file is the only one to require bnd, and is not needed
5152 ;; because we don't build a bundle.
5153 (delete-file "src/org/objectweb/asm/tools/ModuleInfoBndPlugin.java")
5155 (add-before 'install 'build-jars
5156 (lambda* (#:key make-flags #:allow-other-keys)
5157 ;; We cannot use the "jar" target because it depends on a couple
5158 ;; of unpackaged, complicated tools.
5161 "-cf" (string-append "dist/asm-" ,version ".jar")
5162 "-C" "output/build/tmp" ".")))
5163 (add-before 'install 'fix-pom
5165 (substitute* (find-files "archive" "\\.pom$")
5166 (("@product.artifact@") ,version))
5168 (add-before 'install 'install-parent
5169 (install-pom-file "archive/asm-parent.pom"))
5171 (install-from-pom "archive/asm.pom")))))
5173 `(("java-junit" ,java-junit)))
5175 `(("java-org-ow2-parent-pom" ,java-org-ow2-parent-pom-1.3)))
5176 (home-page "https://asm.ow2.io/")
5177 (synopsis "Very small and fast Java bytecode manipulation framework")
5178 (description "ASM is an all purpose Java bytecode manipulation and
5179 analysis framework. It can be used to modify existing classes or dynamically
5180 generate classes, directly in binary form. The provided common
5181 transformations and analysis algorithms allow easily assembling custom
5182 complex transformations and code analysis tools.")
5183 (license license:bsd-3)))
5185 (define java-org-ow2-parent-pom-1.3
5187 (name "java-org-ow2-parent-pom")
5191 (uri "https://repo1.maven.org/maven2/org/ow2/ow2/1.3/ow2-1.3.pom")
5194 "1yr8hfx8gffpppa4ii6cvrsq029a6x8hzy7nsavxhs60s9kmq8ai"))))
5195 (build-system ant-build-system)
5199 (modify-phases %standard-phases
5204 (install-pom-file (assoc-ref %build-inputs "source"))))))
5205 (home-page "https://ow2.org")
5206 (synopsis "Ow2.org parent pom")
5207 (description "This package contains the parent pom for projects from ow2.org,
5208 including java-asm.")
5209 (license license:lgpl2.1+)))
5211 (define java-asm-bootstrap
5214 (name "java-asm-bootstrap")
5216 (substitute-keyword-arguments (package-arguments java-asm)
5218 (native-inputs `())))
5220 (define-public java-asm-8
5227 (url "https://gitlab.ow2.org/asm/asm")
5228 (commit (string-append
5229 "ASM_" (string-join (string-split version #\.)
5231 (file-name (git-file-name "java-asm" version))
5234 "1s6j27zc1i76gh891w2g48b1c3abp9w8zp5j54yb1vm5h8djkd69"))))
5236 `(#:jar-name "asm8.jar"
5237 #:source-dir "asm/src/main/java"
5238 #:test-dir "asm/src/test"
5239 ;; tests depend on junit5
5241 (propagated-inputs '())
5242 (native-inputs '())))
5244 (define-public java-asm-tree-8
5246 (inherit java-asm-8)
5247 (name "java-asm-tree")
5249 `(#:jar-name "asm-tree.jar"
5250 #:source-dir "asm-tree/src/main/java"
5251 #:test-dir "asm-tree/src/test"
5252 ;; tests depend on junit5
5255 `(("java-asm" ,java-asm-8)))))
5257 (define-public java-asm-analysis-8
5259 (inherit java-asm-8)
5260 (name "java-asm-analysis")
5262 `(#:jar-name "asm-analysis.jar"
5263 #:source-dir "asm-analysis/src/main/java"
5264 #:test-dir "asm-analysis/src/test"
5265 ;; tests depend on junit5
5268 `(("java-asm" ,java-asm-8)
5269 ("java-asm-tree" ,java-asm-tree-8)))))
5271 (define-public java-asm-util-8
5273 (inherit java-asm-8)
5274 (name "java-asm-util")
5276 `(#:jar-name "asm-util8.jar"
5277 #:source-dir "asm-util/src/main/java"
5278 #:test-dir "asm-util/src/test"
5279 ;; tests depend on junit5
5282 `(("java-asm" ,java-asm-8)
5283 ("java-asm-analysis" ,java-asm-analysis-8)
5284 ("java-asm-tree" ,java-asm-tree-8)))))
5286 (define-public java-cglib
5294 (url "https://github.com/cglib/cglib")
5295 (commit (string-append
5297 (string-map (lambda (c) (if (char=? c #\.) #\_ c))
5299 (file-name (git-file-name name version))
5301 (base32 "186451jms2zfp47yd8kxd77az2cqal1my2br7klgyp8fpl4qfg8v"))))
5302 (build-system ant-build-system)
5304 `(;; FIXME: tests fail because junit runs
5305 ;; "net.sf.cglib.transform.AbstractTransformTest", which does not seem
5306 ;; to describe a test at all.
5308 #:jar-name "cglib.jar"
5310 (modify-phases %standard-phases
5311 (add-after 'unpack 'chdir
5312 (lambda _ (chdir "cglib") #t)))))
5314 `(("java-asm" ,java-asm)
5315 ("java-junit" ,java-junit)))
5316 (home-page "https://github.com/cglib/cglib/")
5317 (synopsis "Java byte code generation library")
5318 (description "The byte code generation library CGLIB is a high level API
5319 to generate and transform Java byte code.")
5320 (license license:asl2.0)))
5322 (define-public java-objenesis
5324 (name "java-objenesis")
5329 (url "https://github.com/easymock/objenesis")
5331 (file-name (git-file-name name version))
5334 "054yi200wj00x6dp1sxfrwgndwywadsbn8d8ij1j0v45j9g2vdya"))))
5335 (build-system ant-build-system)
5337 `(#:jar-name "objenesis.jar"
5338 #:source-dir "main/src/"
5339 #:test-dir "main/src/test/"))
5341 `(("java-junit" ,java-junit)
5342 ("java-hamcrest-core" ,java-hamcrest-core)))
5343 (home-page "http://objenesis.org/")
5344 (synopsis "Bypass the constructor when creating an object")
5345 (description "Objenesis is a small Java library that serves one purpose:
5346 to instantiate a new object of a particular class. It is common to see
5347 restrictions in libraries stating that classes must require a default
5348 constructor. Objenesis aims to overcome these restrictions by bypassing the
5349 constructor on object instantiation.")
5350 (license license:asl2.0)))
5352 (define-public java-easymock
5354 (name "java-easymock")
5359 (url "https://github.com/easymock/easymock/")
5360 (commit (string-append "easymock-" version))))
5361 (file-name (git-file-name name version))
5364 "02vybm8hc0i0n9sp2f2iiqn54zwqhq835f76wc6b2m7819z5a8dq"))))
5365 (build-system ant-build-system)
5367 `(#:jar-name "easymock.jar"
5368 #:source-dir "core/src/main"
5369 #:test-dir "core/src/test"
5371 (modify-phases %standard-phases
5372 ;; FIXME: Android support requires the following packages to be
5373 ;; available: com.google.dexmaker.stock.ProxyBuilder
5374 (add-after 'unpack 'delete-android-support
5376 (with-directory-excursion "core/src/main/java/org/easymock/internal"
5377 (substitute* "MocksControl.java"
5378 (("AndroidSupport.isAndroid\\(\\)") "false")
5379 (("return classProxyFactory = new AndroidClassProxyFactory\\(\\);") ""))
5380 (delete-file "AndroidClassProxyFactory.java"))
5382 (add-after 'unpack 'delete-broken-tests
5384 (with-directory-excursion "core/src/test/java/org/easymock"
5385 ;; This test depends on dexmaker.
5386 (delete-file "tests2/ClassExtensionHelperTest.java")
5388 ;; This is not a test.
5389 (delete-file "tests/BaseEasyMockRunnerTest.java")
5391 ;; This test should be executed with a different runner...
5392 (delete-file "tests2/EasyMockAnnotationsTest.java")
5393 ;; ...but deleting it means that we also have to delete these
5395 (delete-file "tests2/EasyMockRunnerTest.java")
5396 (delete-file "tests2/EasyMockRuleTest.java")
5398 ;; This test fails because the file "easymock.properties" does
5400 (delete-file "tests2/EasyMockPropertiesTest.java"))
5403 `(("java-asm" ,java-asm)
5404 ("java-cglib" ,java-cglib)
5405 ("java-objenesis" ,java-objenesis)))
5407 `(("java-junit" ,java-junit)
5408 ("java-hamcrest-core" ,java-hamcrest-core)))
5409 (home-page "https://easymock.org/")
5410 (synopsis "Java library providing mock objects for unit tests")
5411 (description "EasyMock is a Java library that provides an easy way to use
5412 mock objects in unit testing.")
5413 (license license:asl2.0)))
5415 (define-public java-jmock-1
5422 (url "https://github.com/jmock-developers/jmock-library")
5424 (file-name (git-file-name name version))
5427 "0lkga995xd9b9mmzxmcd301hlw83p1h78nibh7djlx7wydscr85z"))))
5428 (build-system ant-build-system)
5430 `(#:build-target "jars"
5431 #:test-target "run.tests"
5433 (modify-phases %standard-phases
5434 (replace 'install (install-jars "build")))))
5435 (home-page "http://jmock.org/")
5436 (synopsis "Mock object library for test-driven development")
5437 (description "JMock is a library that supports test-driven development of
5438 Java code with mock objects. Mock objects help you design and test the
5439 interactions between the objects in your programs.
5444 @item makes it quick and easy to define mock objects
5445 @item lets you precisely specify the interactions between
5446 your objects, reducing the brittleness of your tests
5447 @item plugs into your favourite test framework
5448 @item is easy to extend.
5450 (license license:bsd-3)))
5452 (define-public java-jmock
5454 (inherit java-jmock-1)
5460 (url "https://github.com/jmock-developers/jmock-library")
5462 (file-name (git-file-name name version))
5465 "12b7l22g3nrjvf2dzcw3z03fpd2chrgp0d8xkvn8w55rwb57pax6"))))
5467 `(("java-hamcrest-all" ,java-hamcrest-all)
5468 ("java-asm" ,java-asm)
5469 ("java-bsh" ,java-bsh)
5470 ("java-junit" ,java-junit)))
5472 `(("cglib" ,java-cglib)))
5474 `(#:jar-name "java-jmock.jar"
5475 #:source-dir "jmock/src/main/java"
5476 #:test-dir "jmock/src/test"))))
5478 (define-public java-jmock-junit4
5480 (inherit java-jmock)
5481 (name "java-jmock-junit4")
5483 `(#:jar-name "java-jmock-junit4.jar"
5484 #:source-dir "jmock-junit4/src/main/java"
5485 #:test-dir "jmock-junit4/src/test"))
5487 `(("java-hamcrest-all" ,java-hamcrest-all)
5488 ("java-asm" ,java-asm)
5489 ("java-bsh" ,java-bsh)
5490 ("java-jmock" ,java-jmock)
5491 ("java-jumit" ,java-junit)))))
5493 (define-public java-jmock-legacy
5495 (inherit java-jmock)
5496 (name "java-jmock-legacy")
5498 `(#:jar-name "java-jmock-legacy.jar"
5499 #:source-dir "jmock-legacy/src/main/java"
5500 #:test-dir "jmock-legacy/src/test"
5502 (modify-phases %standard-phases
5503 (add-before 'check 'copy-tests
5505 ;; This file is a dependancy of some tests
5506 (let ((file "org/jmock/test/acceptance/PackageProtectedType.java"))
5507 (copy-file (string-append "jmock/src/test/java/" file)
5508 (string-append "jmock-legacy/src/test/java/" file))
5511 `(("java-hamcrest-all" ,java-hamcrest-all)
5512 ("java-objenesis" ,java-objenesis)
5513 ("java-cglib" ,java-cglib)
5514 ("java-jmock" ,java-jmock)
5515 ("java-asm" ,java-asm)
5516 ("java-bsh" ,java-bsh)
5517 ("java-junit" ,java-junit)))
5519 `(("java-jmock-junit4" ,java-jmock-junit4)))))
5521 (define-public java-hamcrest-all
5522 (package (inherit java-hamcrest-core)
5523 (name "java-hamcrest-all")
5526 ,@(substitute-keyword-arguments (package-arguments java-hamcrest-core)
5527 ((#:build-target _) "bigjar")
5529 `(modify-phases ,phases
5530 ;; Some build targets override the classpath, so we need to patch
5531 ;; the build.xml to ensure that required dependencies are on the
5533 (add-after 'unpack 'patch-classpath-for-integration
5534 (lambda* (#:key inputs #:allow-other-keys)
5535 (substitute* "build.xml"
5536 ((" build/hamcrest-library-\\$\\{version\\}.jar" line)
5540 (find-files (assoc-ref inputs "java-junit") "\\.jar$")
5541 (find-files (assoc-ref inputs "java-jmock") "\\.jar$")
5542 (find-files (assoc-ref inputs "java-easymock") "\\.jar$")))
5544 (("build/hamcrest-core-\\$\\{version\\}\\.jar")
5545 (car (find-files (assoc-ref inputs "java-hamcrest-core")
5549 (lambda* (#:key outputs #:allow-other-keys)
5550 (let* ((target (string-append (assoc-ref outputs "out")
5554 "-" (package-version java-hamcrest-core) ".jar"))
5555 (install-without-version-suffix
5558 (string-append target
5559 (basename jar version-suffix)
5563 install-without-version-suffix
5566 (and (string-suffix? ".jar" name)
5567 (not (string-suffix? "-sources.jar" name)))))))
5570 `(("java-junit" ,java-junit)
5571 ("java-jmock" ,java-jmock-1)
5572 ;; This is necessary because of what seems to be a race condition.
5573 ;; This package would sometimes fail to build because hamcrest-core.jar
5574 ;; could not be found, even though it is built as part of this package.
5575 ;; Adding java-hamcrest-core appears to fix this problem. See
5576 ;; https://debbugs.gnu.org/31390 for more information.
5577 ("java-hamcrest-core" ,java-hamcrest-core)
5578 ("java-easymock" ,java-easymock)
5579 ,@(package-inputs java-hamcrest-core)))))
5581 (define-public java-jopt-simple
5583 (name "java-jopt-simple")
5587 (uri (string-append "http://repo1.maven.org/maven2/"
5588 "net/sf/jopt-simple/jopt-simple/"
5589 version "/jopt-simple-"
5590 version "-sources.jar"))
5593 "1v8bzmwmw6qq20gm42xyay6vrd567dra4vqwhgjnqqjz1gs9f8qa"))))
5594 (build-system ant-build-system)
5596 `(#:tests? #f ; there are no tests
5597 #:jar-name "jopt-simple.jar"))
5598 (home-page "https://pholser.github.io/jopt-simple/")
5599 (synopsis "Java library for parsing command line options")
5600 (description "JOpt Simple is a Java library for parsing command line
5601 options, such as those you might pass to an invocation of @code{javac}. In
5602 the interest of striving for simplicity, as closely as possible JOpt Simple
5603 attempts to honor the command line option syntaxes of POSIX @code{getopt} and
5604 GNU @code{getopt_long}. It also aims to make option parser configuration and
5605 retrieval of options and their arguments simple and expressive, without being
5607 (license license:expat)))
5609 (define-public java-commons-math3
5611 (name "java-commons-math3")
5615 (uri (string-append "mirror://apache/commons/math/source/"
5616 "commons-math3-" version "-src.tar.gz"))
5619 "19l6yp44qc5g7wg816nbn5z3zq3xxzwimvbm4a8pczgvpi4i85s6"))))
5620 (build-system ant-build-system)
5622 `(#:build-target "jar"
5623 #:test-target "test"
5625 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
5626 (junit (assoc-ref %build-inputs "java-junit")))
5627 (list (string-append "-Djunit.jar="
5628 (car (find-files junit "jar$")))
5629 (string-append "-Dhamcrest.jar="
5630 (car (find-files hamcrest ".*.jar$")))))
5632 (modify-phases %standard-phases
5633 ;; We want to build the jar in the build phase and run the tests
5634 ;; later in a separate phase.
5635 (add-after 'unpack 'untangle-targets
5637 (substitute* "build.xml"
5638 (("name=\"jar\" depends=\"test\"")
5639 "name=\"jar\" depends=\"compile\""))
5641 ;; There is no install target.
5643 (install-jars "target")))))
5645 `(("java-junit" ,java-junit)
5646 ("java-hamcrest-core" ,java-hamcrest-core)))
5647 (home-page "https://commons.apache.org/math/")
5648 (synopsis "Apache Commons mathematics library")
5649 (description "Commons Math is a library of lightweight, self-contained
5650 mathematics and statistics components addressing the most common problems not
5651 available in the Java programming language or Commons Lang.")
5652 (license license:asl2.0)))
5654 (define-public java-jmh
5661 (url "http://hg.openjdk.java.net/code-tools/jmh/")
5662 (changeset version)))
5663 (file-name (string-append name "-" version "-checkout"))
5666 "1fxyxhg9famwcg1prc4cgwb5wzyxqavn3cjm5vz8605xz7x5k084"))))
5667 (build-system ant-build-system)
5669 `(#:jar-name "jmh-core.jar"
5670 #:source-dir "jmh-core/src/main"
5671 #:test-dir "jmh-core/src/test"
5673 (modify-phases %standard-phases
5674 ;; This seems to be a bug in the JDK. It may not be necessary in
5675 ;; future versions of the JDK.
5676 (add-after 'unpack 'fix-bug
5678 (with-directory-excursion
5679 "jmh-core/src/main/java/org/openjdk/jmh/runner/options"
5680 (substitute* '("IntegerValueConverter.java"
5681 "ThreadsValueConverter.java")
5682 (("public Class<Integer> valueType")
5683 "public Class<? extends Integer> valueType")))
5686 `(("java-jopt-simple" ,java-jopt-simple)
5687 ("java-commons-math3" ,java-commons-math3)))
5689 `(("java-junit" ,java-junit)
5690 ("java-hamcrest-core" ,java-hamcrest-core)))
5691 (home-page "https://openjdk.java.net/projects/code-tools/jmh/")
5692 (synopsis "Benchmark harness for the JVM")
5693 (description "JMH is a Java harness for building, running, and analysing
5694 nano/micro/milli/macro benchmarks written in Java and other languages
5695 targeting the JVM.")
5697 (license license:gpl2)))
5699 (define-public java-commons-collections4
5701 (name "java-commons-collections4")
5705 (uri (string-append "mirror://apache/commons/collections/source/"
5706 "commons-collections4-" version "-src.tar.gz"))
5709 "1krfhvggympq4avk7gh6qafzf6b9ip6r1m4lmacikyx04039m0wl"))))
5710 (build-system ant-build-system)
5712 `(#:test-target "test"
5714 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
5715 (junit (assoc-ref %build-inputs "java-junit"))
5716 (easymock (assoc-ref %build-inputs "java-easymock")))
5717 (list (string-append "-Djunit.jar="
5718 (car (find-files junit "jar$")))
5719 (string-append "-Dhamcrest.jar="
5720 (car (find-files hamcrest "jar$")))
5721 (string-append "-Deasymock.jar=" easymock
5722 "/share/java/easymock.jar")))
5724 (modify-phases %standard-phases
5726 (install-jars "target")))))
5728 `(("java-junit" ,java-junit)
5729 ("java-hamcrest-core" ,java-hamcrest-core)
5730 ("java-easymock" ,java-easymock)))
5731 (home-page "https://commons.apache.org/collections/")
5732 (synopsis "Collections framework")
5733 (description "The Java Collections Framework is the recognised standard
5734 for collection handling in Java. Commons-Collections seek to build upon the
5735 JDK classes by providing new interfaces, implementations and utilities. There
5736 are many features, including:
5739 @item @code{Bag} interface for collections that have a number of copies of
5741 @item @code{BidiMap} interface for maps that can be looked up from value to
5742 key as well and key to value
5743 @item @code{MapIterator} interface to provide simple and quick iteration over
5745 @item Transforming decorators that alter each object as it is added to the
5747 @item Composite collections that make multiple collections look like one
5748 @item Ordered maps and sets that retain the order elements are added in,
5749 including an LRU based map
5750 @item Reference map that allows keys and/or values to be garbage collected
5752 @item Many comparator implementations
5753 @item Many iterator implementations
5754 @item Adapter classes from array and enumerations to collections
5755 @item Utilities to test or create typical set-theory properties of collections
5756 such as union, intersection, and closure.
5758 (license license:asl2.0)))
5760 (define-public java-commons-collections
5762 (inherit java-commons-collections4)
5763 (name "java-commons-collections")
5767 (uri (string-append "mirror://apache/commons/collections/source/"
5768 "commons-collections-" version "-src.tar.gz"))
5771 "055r51a5lfc3z7rkxnxmnn1npvkvda7636hjpm4qk7cnfzz98387"))
5773 (search-patches "java-commons-collections-fix-java8.patch"))))
5775 (substitute-keyword-arguments (package-arguments java-commons-collections4)
5777 `(modify-phases ,phases
5778 ;; The manifest is required by the build procedure
5779 (add-before 'build 'add-manifest
5781 (mkdir-p "build/conf")
5782 (call-with-output-file "build/conf/MANIFEST.MF"
5784 (format file "Manifest-Version: 1.0\n")))
5787 (install-jars "build"))))))))
5789 (define java-commons-collections-test-classes
5791 (inherit java-commons-collections)
5793 `(#:jar-name "commons-collections-test-classes.jar"
5794 #:source-dir "src/test"
5797 `(("collection" ,java-commons-collections)))))
5799 (define-public java-commons-beanutils
5801 (name "java-commons-beanutils")
5805 (uri (string-append "mirror://apache/commons/beanutils/source/"
5806 "commons-beanutils-" version "-src.tar.gz"))
5809 "03cs0bq3sl1sdc7py9g3qnf8n9h473nrkvd3d251kaqv6a2ab7qk"))))
5810 (build-system ant-build-system)
5812 `(#:test-target "test"
5815 (modify-phases %standard-phases
5817 (lambda* (#:key outputs #:allow-other-keys)
5818 (rename-file (string-append "dist/commons-beanutils-" ,version
5820 "commons-beanutils.jar")
5821 (install-file "commons-beanutils.jar"
5822 (string-append (assoc-ref outputs "out") "/share/java/"))
5825 `(("logging" ,java-commons-logging-minimal)
5826 ("collections" ,java-commons-collections)))
5828 `(("junit" ,java-junit)
5829 ("collections-test" ,java-commons-collections-test-classes)))
5830 (home-page "https://commons.apache.org/beanutils/")
5831 (synopsis "Dynamically set or get properties in Java")
5832 (description "BeanUtils provides a simplified interface to reflection and
5833 introspection to set or get dynamically determined properties through their
5834 setter and getter method.")
5835 (license license:asl2.0)))
5837 (define-public java-commons-io
5839 (name "java-commons-io")
5844 (uri (string-append "mirror://apache/commons/io/source/"
5845 "commons-io-" version "-src.tar.gz"))
5848 "0q5y41jrcjvx9hzs47x5kdhnasdy6rm4bzqd2jxl02w717m7a7v3"))))
5849 (build-system ant-build-system)
5850 (outputs '("out" "doc"))
5852 `(#:test-target "test"
5854 (list (string-append "-Djunit.jar="
5855 (car (find-files (assoc-ref %build-inputs "java-junit")
5858 (modify-phases %standard-phases
5859 (add-after 'build 'build-javadoc ant-build-javadoc)
5860 (replace 'install (install-from-pom "pom.xml"))
5861 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
5863 `(("java-junit" ,java-junit)
5864 ("java-hamcrest-core" ,java-hamcrest-core)))
5866 `(("apache-commons-parent-pom" ,apache-commons-parent-pom-39)))
5867 (home-page "https://commons.apache.org/io/")
5868 (synopsis "Common useful IO related classes")
5869 (description "Commons-IO contains utility classes, stream implementations,
5870 file filters and endian classes.")
5871 (license license:asl2.0)))
5873 (define-public java-commons-exec-1.1
5875 (name "java-commons-exec")
5880 (uri (string-append "mirror://apache/commons/exec/source/"
5881 "commons-exec-" version "-src.tar.gz"))
5884 "025dk8xgj10lxwwwqp0hng2rn7fr4vcirxzydqzx9k4dim667alk"))))
5885 (build-system ant-build-system)
5887 `(#:test-target "test"
5889 (list (string-append "-Dmaven.junit.jar="
5890 (car (find-files (assoc-ref %build-inputs "java-junit")
5893 (modify-phases %standard-phases
5894 (add-before 'build 'delete-network-tests
5896 (delete-file "src/test/java/org/apache/commons/exec/DefaultExecutorTest.java")
5897 (substitute* "src/test/java/org/apache/commons/exec/TestRunner.java"
5898 (("suite\\.addTestSuite\\(DefaultExecutorTest\\.class\\);") ""))
5900 ;; The "build" phase automatically tests.
5902 (replace 'install (install-jars "target")))))
5904 `(("java-junit" ,java-junit)))
5905 (home-page "https://commons.apache.org/proper/commons-exec/")
5906 (synopsis "Common program execution related classes")
5907 (description "Commons-Exec simplifies executing external processes.")
5908 (license license:asl2.0)))
5910 (define-public java-commons-exec
5912 (inherit java-commons-exec-1.1)
5917 (uri (string-append "mirror://apache/commons/exec/source/"
5918 "commons-exec-" version "-src.tar.gz"))
5921 "17yb4h6f8l49c5iyyvda4z2nmw0bxrx857nrwmsr7mmpb7x441yv"))))
5923 `(#:test-target "test"
5925 (list (string-append "-Dmaven.junit.jar="
5926 (car (find-files (assoc-ref %build-inputs "java-junit")
5928 "-Dmaven.compiler.source=1.7"
5929 "-Dmaven.compiler.target=1.7")
5931 (modify-phases %standard-phases
5932 (add-before 'build 'delete-network-tests
5933 (lambda* (#:key inputs #:allow-other-keys)
5934 ;; This test hangs indefinitely.
5935 (delete-file "src/test/java/org/apache/commons/exec/issues/Exec60Test.java")
5936 (substitute* "src/test/java/org/apache/commons/exec/issues/Exec41Test.java"
5937 (("ping -c 10 127.0.0.1") "sleep 10"))
5938 (substitute* "src/test/java/org/apache/commons/exec/issues/Exec49Test.java"
5940 (call-with-output-file "src/test/scripts/ping.sh"
5942 (format port "#!~a/bin/sh\nsleep $1\n"
5943 (assoc-ref inputs "bash"))))
5945 ;; The "build" phase automatically tests.
5947 (replace 'install (install-jars "target")))))
5949 `(("java-junit" ,java-junit)
5950 ("java-hamcrest-core" ,java-hamcrest-core)))))
5952 (define-public java-commons-lang
5954 (name "java-commons-lang")
5959 (uri (string-append "mirror://apache/commons/lang/source/"
5960 "commons-lang-" version "-src.tar.gz"))
5962 (base32 "1mxwagqadzx1b2al7i0z1v0r235aj2njdyijf02szq0vhmqrfiq5"))))
5963 (build-system ant-build-system)
5964 (outputs '("out" "doc"))
5966 `(#:test-target "test"
5967 #:test-exclude (list "**/Abstract*.java" "**/Random*.java")
5969 (modify-phases %standard-phases
5970 (add-after 'build 'build-javadoc ant-build-javadoc)
5971 (add-before 'check 'disable-failing-test
5973 ;; Disable a failing test
5974 (substitute* "src/test/java/org/apache/commons/lang/\
5975 time/FastDateFormatTest.java"
5976 (("public void testFormat\\(\\)")
5977 "public void disabled_testFormat()"))
5979 (replace 'install (install-jars "target"))
5980 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
5982 `(("java-junit" ,java-junit)))
5983 (home-page "https://commons.apache.org/lang/")
5984 (synopsis "Extension of the java.lang package")
5985 (description "The Commons Lang components contains a set of Java classes
5986 that provide helper methods for standard Java classes, especially those found
5987 in the @code{java.lang} package in the Sun JDK. The following classes are
5991 @item StringUtils - Helper for @code{java.lang.String}.
5992 @item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets
5993 of characters such as @code{[a-z]} and @code{[abcdez]}.
5994 @item RandomStringUtils - Helper for creating randomised strings.
5995 @item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
5996 @item NumberRange - A range of numbers with an upper and lower bound.
5997 @item ObjectUtils - Helper for @code{java.lang.Object}.
5998 @item SerializationUtils - Helper for serializing objects.
5999 @item SystemUtils - Utility class defining the Java system properties.
6000 @item NestedException package - A sub-package for the creation of nested
6002 @item Enum package - A sub-package for the creation of enumerated types.
6003 @item Builder package - A sub-package for the creation of @code{equals},
6004 @code{hashCode}, @code{compareTo} and @code{toString} methods.
6006 (license license:asl2.0)))
6008 (define-public java-commons-lang3
6010 (name "java-commons-lang3")
6015 (uri (string-append "mirror://apache/commons/lang/source/"
6016 "commons-lang3-" version "-src.tar.gz"))
6018 (base32 "0s4ffbvsyl16c90l45ximsg4dwd8hmz7wsza3p308fw43h6mwhb6"))))
6019 (build-system ant-build-system)
6021 `(#:jar-name "commons-lang3.jar"
6022 #:source-dir "src/main/java"
6023 #:tests? #f; require junit5
6025 (modify-phases %standard-phases
6026 (replace 'install (install-from-pom "pom.xml")))))
6028 `(("apache-commons-parent-pom" ,apache-commons-parent-pom-48)))
6029 (home-page "https://commons.apache.org/lang/")
6030 (synopsis "Extension of the java.lang package")
6031 (description "The Commons Lang components contains a set of Java classes
6032 that provide helper methods for standard Java classes, especially those found
6033 in the @code{java.lang} package. The following classes are included:
6036 @item StringUtils - Helper for @code{java.lang.String}.
6037 @item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets of
6038 characters such as @code{[a-z]} and @code{[abcdez]}.
6039 @item RandomStringUtils - Helper for creating randomised strings.
6040 @item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
6041 @item NumberRange - A range of numbers with an upper and lower bound.
6042 @item ObjectUtils - Helper for @code{java.lang.Object}.
6043 @item SerializationUtils - Helper for serializing objects.
6044 @item SystemUtils - Utility class defining the Java system properties.
6045 @item NestedException package - A sub-package for the creation of nested
6047 @item Enum package - A sub-package for the creation of enumerated types.
6048 @item Builder package - A sub-package for the creation of @code{equals},
6049 @code{hashCode}, @code{compareTo} and @code{toString} methods.
6051 (license license:asl2.0)))
6053 (define-public java-commons-bsf
6055 (name "java-commons-bsf")
6059 (uri (string-append "mirror://apache/commons/bsf/source/bsf-src-"
6063 "1sbamr8jl32p1jgf59nw0b2w9qivyg145954hm6ly54cfgsqrdas"))
6064 (modules '((guix build utils)))
6067 (for-each delete-file
6068 (find-files "." "\\.jar$"))
6070 (build-system ant-build-system)
6072 `(#:build-target "jar"
6073 #:tests? #f; No test file
6074 #:modules ((guix build ant-build-system)
6076 (guix build java-utils)
6079 (modify-phases %standard-phases
6080 (add-before 'build 'create-properties
6082 ;; This file is missing from the distribution
6083 (call-with-output-file "build-properties.xml"
6086 `(project (@ (basedir ".") (name "build-properties") (default ""))
6087 (property (@ (name "project.name") (value "bsf")))
6088 (property (@ (name "source.level") (value "1.5")))
6089 (property (@ (name "build.lib") (value "build/jar")))
6090 (property (@ (name "src.dir") (value "src")))
6091 (property (@ (name "tests.dir") (value "src/org/apache/bsf/test")))
6092 (property (@ (name "build.tests") (value "build/test-classes")))
6093 (property (@ (name "build.dest") (value "build/classes"))))
6096 (replace 'install (install-jars "build")))))
6098 `(("java-junit" ,java-junit)))
6100 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)))
6101 (home-page "https://commons.apache.org/proper/commons-bsf")
6102 (synopsis "Bean Scripting Framework")
6103 (description "The Bean Scripting Framework (BSF) is a set of Java classes
6104 which provides scripting language support within Java applications, and access
6105 to Java objects and methods from scripting languages. BSF allows one to write
6106 JSPs in languages other than Java while providing access to the Java class
6107 library. In addition, BSF permits any Java application to be implemented in
6108 part (or dynamically extended) by a language that is embedded within it. This
6109 is achieved by providing an API that permits calling scripting language engines
6110 from within Java, as well as an object registry that exposes Java objects to
6111 these scripting language engines.")
6112 (license license:asl2.0)))
6114 (define-public java-commons-jxpath
6116 (name "java-commons-jxpath")
6120 (uri (string-append "mirror://apache/commons/jxpath/source/"
6121 "commons-jxpath-" version "-src.tar.gz"))
6124 "1rpgg31ayn9fwr4bfi2i1ij0npcg79ad2fv0w9hacvawsyc42cfs"))))
6125 (build-system ant-build-system)
6127 `(#:jar-name "commons-jxpath.jar"
6128 ;; tests require more dependencies, including mockrunner which depends on old software
6130 #:source-dir "src/java"))
6132 `(("servlet" ,java-classpathx-servletapi)
6133 ("java-jdom" ,java-jdom)
6134 ("java-commons-beanutils" ,java-commons-beanutils)))
6136 `(("java-junit" ,java-junit)))
6137 (home-page "https://commons.apache.org/jxpath/")
6138 (synopsis "Simple interpreter of an expression language called XPath.")
6139 (description "The org.apache.commons.jxpath package defines a simple
6140 interpreter of an expression language called XPath. JXPath applies XPath
6141 expressions to graphs of objects of all kinds: JavaBeans, Maps, Servlet
6142 contexts, DOM etc, including mixtures thereof.")
6143 (license license:asl2.0)))
6145 (define-public java-commons-pool
6147 (name "java-commons-pool")
6151 (uri (string-append "mirror://apache/commons/pool/source/"
6152 "commons-pool2-" version "-src.tar.gz"))
6155 "1fi1hgqmq01bs6azbj3sfswxzadp2r8sjjfiq6ryilz1m50kvrv6"))))
6157 `(#:jar-name "common-pool.jar"
6158 #:source-dir "src/main/java"
6160 (list "**/PerformanceTest.java")))
6161 (build-system ant-build-system)
6163 `(("java-cglib" ,java-cglib)))
6165 `(("java-junit" ,java-junit)
6166 ("java-hamcrest-core" ,java-hamcrest-core)
6167 ("java-asm" ,java-asm)
6168 ("java-objenesis" ,java-objenesis)))
6169 (home-page "https://commons.apache.org/proper/commons-pool/")
6170 (synopsis "Object-pooling API in Java")
6171 (description "The commons-pool package provides an object-pooling API
6172 and a number of object pool implementations. This package defines a
6173 handful of pooling interfaces and some base classes that may be useful when
6174 creating new pool implementations.")
6175 (license license:asl2.0)))
6177 (define-public java-commons-dbcp
6179 (name "java-commons-dbcp")
6183 (uri (string-append "mirror://apache/commons/dbcp/source/"
6184 "commons-dbcp2-" version "-src.tar.gz"))
6187 "0axbvcbnf2l70fc3ybrlp3siw2w4ka9mia2pnx4py8gz54cpw3rc"))))
6189 `(#:source-dir "src/main/java"
6190 #:jar-name "java-commons-dbcp.jar"
6191 #:tests? #f)); requires apache-geronimo
6193 `(("java-commons-pool" ,java-commons-pool)
6194 ("java-commons-logging" ,java-commons-logging-minimal)
6195 ("java-jboss-transaction-api-spec" ,java-jboss-transaction-api-spec)))
6197 `(("java-junit" ,java-junit)))
6198 (build-system ant-build-system)
6199 (home-page "https://commons.apache.org/proper/commons-dbcp/")
6200 (synopsis "Database Connection Pool for Java")
6201 (description "Commons-dbcp allows you to share a pool of database
6202 connections between users. Creating a new connection for each user can be
6203 time consuming and even unfeasible when the number of simultaneous users is
6204 very large. This package provides a way to share a poole of connections to
6206 (license license:asl2.0)))
6208 (define-public java-commons-jcs
6210 (name "java-commons-jcs")
6214 (uri (string-append "mirror://apache/commons/jcs/source/"
6215 "commons-jcs-dist-" version "-src.tar.gz"))
6218 "0syhq2npjbrl0azqfjm0gvash1qd5qjy4qmysxcrqjsk0nf9fa1q"))))
6219 (build-system ant-build-system)
6221 `(#:jar-name "commons-jcs.jar"
6222 #:source-dir "commons-jcs-core/src/main/java"
6223 #:test-dir "commons-jcs-core/src/test"
6224 #:tests? #f; requires hsqldb
6226 (modify-phases %standard-phases
6227 (add-before 'build 'prepare
6229 (with-directory-excursion
6230 "commons-jcs-core/src/main/java/org/apache/commons/jcs"
6232 "auxiliary/disk/jdbc/dsfactory/SharedPoolDataSourceFactory.java"
6233 (("commons.dbcp") "commons.dbcp2")
6234 ((".*\\.setMaxActive.*") ""))
6235 ;;; Remove dependency on velocity-tools
6236 (delete-file "admin/servlet/JCSAdminServlet.java"))
6239 `(("java-classpathx-servletapi" ,java-classpathx-servletapi)
6240 ("java-commons-logging-minimal" ,java-commons-logging-minimal)
6241 ("java-commons-httpclient" ,java-commons-httpclient)
6242 ("java-commons-dbcp" ,java-commons-dbcp)))
6244 `(("java-junit" ,java-junit)))
6245 (home-page "https://commons.apache.org/proper/commons-jcs/")
6246 (synopsis "Distributed caching system in Java")
6247 (description "JCS is a distributed caching system written in Java. It
6248 is intended to speed up applications by providing a means to manage cached
6249 data of various dynamic natures. Like any caching system, JCS is most useful
6250 for high read, low put applications. Latency times drop sharply and
6251 bottlenecks move away from the database in an effectively cached system.")
6252 (license license:asl2.0)))
6254 (define-public java-jsr250
6256 (name "java-jsr250")
6260 (uri (string-append "https://repo1.maven.org/maven2/"
6261 "javax/annotation/javax.annotation-api/"
6262 version "/javax.annotation-api-"
6263 version "-sources.jar"))
6266 "08clh8n4n9wfglf75qsqfjs6yf79f7x6hqx38cn856pksszv50kz"))))
6267 (build-system ant-build-system)
6269 `(#:tests? #f ; no tests included
6271 #:jar-name "jsr250.jar"
6272 #:modules ((guix build ant-build-system)
6274 (guix build maven pom)
6275 (guix build java-utils)
6278 (modify-phases %standard-phases
6279 (add-before 'install 'create-pom
6281 (with-output-to-file "pom.xml"
6285 (modelVersion "4.0.0")
6287 (groupId "javax.annotation")
6288 (artifactId "jsr250-api")
6289 (version ,,version))))))
6292 (install-from-pom "pom.xml")))))
6293 (home-page "https://jcp.org/en/jsr/detail?id=250")
6294 (synopsis "Security-related annotations")
6295 (description "This package provides annotations for security. It provides
6296 packages in the @code{javax.annotation} and @code{javax.annotation.security}
6298 ;; either cddl or gpl2 only, with classpath exception
6299 (license (list license:cddl1.0
6302 (define-public java-jsr305
6304 (name "java-jsr305")
6308 (uri (string-append "https://repo1.maven.org/maven2/"
6309 "com/google/code/findbugs/"
6310 "jsr305/" version "/jsr305-"
6311 version "-sources.jar"))
6314 "1rh6jin9v7jqpq3kf1swl868l8i94r636n03pzpsmgr8v0lh9j2n"))))
6315 (build-system ant-build-system)
6317 `(#:tests? #f ; no tests included
6318 #:jar-name "jsr305.jar"
6319 #:modules ((guix build ant-build-system)
6320 (guix build java-utils)
6321 (guix build maven pom)
6325 (modify-phases %standard-phases
6326 (add-before 'install 'create-pom
6328 (with-output-to-file "pom.xml"
6332 (modelVersion "4.0.0")
6334 (groupId "com.google.code.findbugs")
6335 (artifactId "jsr305")
6336 (version ,,version))))))
6339 (install-from-pom "pom.xml")))))
6340 (home-page "http://findbugs.sourceforge.net/")
6341 (synopsis "Annotations for the static analyzer called findbugs")
6342 (description "This package provides annotations for the findbugs package.
6343 It provides packages in the @code{javax.annotations} namespace.")
6344 (license license:asl2.0)))
6346 (define-public java-guava
6349 ;; This is the last release of Guava that can be built with Java 7.
6354 (url "https://github.com/google/guava/")
6355 (commit (string-append "v" version))))
6356 (file-name (git-file-name name version))
6359 "00h5cawdjic1vind3yivzh1f58flvm1yfmhsyqwyvmbvj1vakysp"))))
6360 (build-system ant-build-system)
6362 `(#:tests? #f ; no tests included
6363 #:jar-name "guava.jar"
6364 #:source-dir "guava/src"
6366 (modify-phases %standard-phases
6367 (add-after 'unpack 'trim-sources
6369 (with-directory-excursion "guava/src/com/google/common"
6370 ;; Remove annotations to avoid extra dependencies:
6371 ;; * "j2objc" annotations are used when converting Java to
6373 ;; * "errorprone" annotations catch common Java mistakes at
6375 ;; * "IgnoreJRERequirement" is used for Android.
6376 (substitute* (find-files "." "\\.java$")
6377 (("import com.google.j2objc.*") "")
6378 (("import com.google.errorprone.annotation.*") "")
6379 (("import org.codehaus.mojo.animal_sniffer.*") "")
6380 (("@CanIgnoreReturnValue") "")
6383 (("@RetainedWith") "")
6385 (("@ForOverride") "")
6386 (("@J2ObjCIncompatible") "")
6387 (("@IgnoreJRERequirement") "")))
6389 (replace 'install (install-from-pom "guava/pom.xml")))))
6391 `(("java-jsr305" ,java-jsr305)))
6393 `(("java-guava-parent-pom" ,java-guava-parent-pom)))
6394 (home-page "https://github.com/google/guava")
6395 (synopsis "Google core libraries for Java")
6396 (description "Guava is a set of core libraries that includes new
6397 collection types (such as multimap and multiset), immutable collections, a
6398 graph library, functional types, an in-memory cache, and APIs/utilities for
6399 concurrency, I/O, hashing, primitives, reflection, string processing, and much
6401 (license license:asl2.0)))
6403 (define java-guava-parent-pom
6405 (inherit java-guava)
6406 (name "java-guava-parent-pom")
6410 (modify-phases %standard-phases
6414 (install-pom-file "pom.xml")))))
6416 `(("java-sonatype-oss-parent-pom" ,java-sonatype-oss-parent-pom-7)))))
6418 ;; The java-commons-logging package provides adapters to many different
6419 ;; logging frameworks. To avoid an excessive dependency graph we try to build
6420 ;; it with only a minimal set of adapters.
6421 (define-public java-commons-logging-minimal
6423 (name "java-commons-logging-minimal")
6427 (uri (string-append "mirror://apache/commons/logging/source/"
6428 "commons-logging-" version "-src.tar.gz"))
6431 "10bwcy5w8d7y39n0krlwhnp8ds3kj5zhmzj0zxnkw0qdlsjmsrj9"))))
6432 (build-system ant-build-system)
6434 `(#:tests? #f ; avoid dependency on logging frameworks
6435 #:jar-name "commons-logging-minimal.jar"
6437 (modify-phases %standard-phases
6438 (add-after 'unpack 'delete-adapters-and-tests
6440 ;; Delete all adapters except for NoOpLog, SimpleLog, and
6441 ;; LogFactoryImpl. NoOpLog is required to build; LogFactoryImpl
6442 ;; is used by applications; SimpleLog is the only actually usable
6443 ;; implementation that does not depend on another logging
6447 (delete-file (string-append
6448 "src/main/java/org/apache/commons/logging/impl/" file)))
6449 (list "Jdk13LumberjackLogger.java"
6450 "WeakHashtable.java"
6452 "ServletContextCleaner.java"
6455 "LogKitLogger.java"))
6456 (delete-file-recursively "src/test")
6458 (home-page "https://commons.apache.org/logging/")
6459 (synopsis "Common API for logging implementations")
6460 (description "The Logging package is a thin bridge between different
6461 logging implementations. A library that uses the commons-logging API can be
6462 used with any logging implementation at runtime.")
6463 (license license:asl2.0)))
6465 ;; This is the last release of the 1.x series.
6466 (define-public java-mockito-1
6468 (name "java-mockito")
6472 (uri (string-append "http://repo1.maven.org/maven2/"
6473 "org/mockito/mockito-core/" version
6474 "/mockito-core-" version "-sources.jar"))
6477 "0vmiwnwpf83g2q7kj1rislmja8fpvqkixjhawh7nxnygx6pq11kc"))))
6478 (build-system ant-build-system)
6480 `(#:jar-name "mockito.jar"
6481 #:tests? #f ; no tests included
6482 ;; FIXME: patch-and-repack does not support jars, so we have to apply
6483 ;; patches in build phases.
6485 (modify-phases %standard-phases
6486 ;; Mockito was developed against a different version of hamcrest,
6487 ;; which does not require matcher implementations to provide an
6488 ;; implementation of the "describeMismatch" method. We add this
6489 ;; simple definition to pass the build with our version of hamcrest.
6490 (add-after 'unpack 'fix-hamcrest-build-error
6492 (substitute* "src/org/mockito/internal/matchers/LocalizedMatcher.java"
6493 (("public Matcher getActualMatcher\\(\\) .*" line)
6495 public void describeMismatch(Object item, Description description) {
6496 actualMatcher.describeMismatch(item, description);
6500 ;; Mockito bundles cglib. We have a cglib package, so let's use
6502 (add-after 'unpack 'use-system-libraries
6504 (with-directory-excursion "src/org/mockito/internal/creation/cglib"
6505 (substitute* '("CGLIBHacker.java"
6506 "CglibMockMaker.java"
6507 "ClassImposterizer.java"
6508 "DelegatingMockitoMethodProxy.java"
6509 "MethodInterceptorFilter.java"
6510 "MockitoNamingPolicy.java"
6511 "SerializableMockitoMethodProxy.java"
6512 "SerializableNoOp.java")
6513 (("import org.mockito.cglib") "import net.sf.cglib")))
6516 `(("java-junit" ,java-junit)
6517 ("java-objenesis" ,java-objenesis)
6518 ("java-cglib" ,java-cglib)
6519 ("java-hamcrest-core" ,java-hamcrest-core)))
6520 (home-page "http://mockito.org")
6521 (synopsis "Mockito is a mock library for Java")
6522 (description "Mockito is a mocking library for Java which lets you write
6523 tests with a clean and simple API. It generates mocks using reflection, and
6524 it records all mock invocations, including methods arguments.")
6525 (license license:asl2.0)))
6527 (define-public java-httpcomponents-httpcore
6529 (name "java-httpcomponents-httpcore")
6533 (uri (string-append "mirror://apache//httpcomponents/httpcore/"
6534 "source/httpcomponents-core-"
6535 version "-src.tar.gz"))
6538 "02bwcf38y4vgwq7kj2s6q7qrmma641r5lacivm16kgxvb2j6h1vy"))))
6539 (build-system ant-build-system)
6541 `(#:jar-name "httpcomponents-httpcore.jar"
6543 (modify-phases %standard-phases
6544 (add-after 'unpack 'chdir
6545 (lambda _ (chdir "httpcore") #t)))))
6547 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)
6548 ("java-commons-lang3" ,java-commons-lang3)))
6550 `(("java-junit" ,java-junit)
6551 ("java-mockito" ,java-mockito-1)))
6552 (home-page "https://hc.apache.org/httpcomponents-core-4.4.x/index.html")
6553 (synopsis "Low level HTTP transport components")
6554 (description "HttpCore is a set of low level HTTP transport components
6555 that can be used to build custom client and server side HTTP services with a
6556 minimal footprint. HttpCore supports two I/O models: blocking I/O model based
6557 on the classic Java I/O and non-blocking, event driven I/O model based on Java
6560 This package provides the blocking I/O model library.")
6561 (license license:asl2.0)))
6563 (define-public java-httpcomponents-httpcore-nio
6564 (package (inherit java-httpcomponents-httpcore)
6565 (name "java-httpcomponents-httpcore-nio")
6567 `(#:jar-name "httpcomponents-httpcore-nio.jar"
6569 (modify-phases %standard-phases
6570 (add-after 'unpack 'chdir
6571 (lambda _ (chdir "httpcore-nio") #t)))))
6573 `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
6574 ("java-hamcrest-core" ,java-hamcrest-core)
6575 ,@(package-inputs java-httpcomponents-httpcore)))
6576 (description "HttpCore is a set of low level HTTP transport components
6577 that can be used to build custom client and server side HTTP services with a
6578 minimal footprint. HttpCore supports two I/O models: blocking I/O model based
6579 on the classic Java I/O and non-blocking, event driven I/O model based on Java
6582 This package provides the non-blocking I/O model library based on Java
6585 (define-public java-httpcomponents-httpcore-ab
6586 (package (inherit java-httpcomponents-httpcore)
6587 (name "java-httpcomponents-httpcore-ab")
6589 `(#:jar-name "httpcomponents-httpcore-ab.jar"
6591 (modify-phases %standard-phases
6592 (add-after 'unpack 'chdir
6593 (lambda _ (chdir "httpcore-ab") #t)))))
6595 `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
6596 ("java-commons-cli" ,java-commons-cli)
6597 ("java-hamcrest-core" ,java-hamcrest-core)
6598 ,@(package-inputs java-httpcomponents-httpcore)))
6599 (synopsis "Apache HttpCore benchmarking tool")
6600 (description "This package provides the HttpCore benchmarking tool. It is
6601 an Apache AB clone based on HttpCore.")))
6603 (define-public java-httpcomponents-httpclient
6605 (name "java-httpcomponents-httpclient")
6609 (uri (string-append "mirror://apache/httpcomponents/httpclient/"
6610 "source/httpcomponents-client-"
6611 version "-src.tar.gz"))
6614 "1va99m2zc2liv0v9vn72p5ja8yz4s5wq7zpahaai5nr966kvxzkb"))))
6615 (build-system ant-build-system)
6617 `(#:jar-name "httpcomponents-httpclient.jar"
6619 (modify-phases %standard-phases
6620 (add-after 'unpack 'chdir
6621 (lambda _ (chdir "httpclient") #t)))))
6623 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)
6624 ("java-commons-codec" ,java-commons-codec)
6625 ("java-hamcrest-core" ,java-hamcrest-core)
6626 ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
6627 ("java-mockito" ,java-mockito-1)
6628 ("java-junit" ,java-junit)))
6629 (home-page "https://hc.apache.org/httpcomponents-client-ga/")
6630 (synopsis "HTTP client library for Java")
6631 (description "Although the @code{java.net} package provides basic
6632 functionality for accessing resources via HTTP, it doesn't provide the full
6633 flexibility or functionality needed by many applications. @code{HttpClient}
6634 seeks to fill this void by providing an efficient, up-to-date, and
6635 feature-rich package implementing the client side of the most recent HTTP
6636 standards and recommendations.")
6637 (license license:asl2.0)))
6639 (define-public java-httpcomponents-httpmime
6640 (package (inherit java-httpcomponents-httpclient)
6641 (name "java-httpcomponents-httpmime")
6643 `(#:jar-name "httpcomponents-httpmime.jar"
6645 (modify-phases %standard-phases
6646 (add-after 'unpack 'chdir
6647 (lambda _ (chdir "httpmime") #t)))))
6649 `(("java-httpcomponents-httpclient" ,java-httpcomponents-httpclient)
6650 ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
6651 ("java-junit" ,java-junit)
6652 ("java-hamcrest-core" ,java-hamcrest-core)))))
6654 (define-public java-commons-net
6656 (name "java-commons-net")
6660 (uri (string-append "mirror://apache/commons/net/source/"
6661 "commons-net-" version "-src.tar.gz"))
6664 "0n0cmnddk9qdqhjvka8pc6hd9mn2qi3166f1s6xk32h7rfy1adxr"))))
6665 (build-system ant-build-system)
6667 `(;; FIXME: MainTest.java tries to read "examples.properties" (which
6668 ;; should be "resources/examples/examples.properties"), but gets "null"
6671 #:jar-name "commons-net.jar"))
6673 `(("java-junit" ,java-junit)
6674 ("java-hamcrest-core" ,java-hamcrest-core)))
6675 (home-page "https://commons.apache.org/net/")
6676 (synopsis "Client library for many basic Internet protocols")
6677 (description "The Apache Commons Net library implements the client side of
6678 many basic Internet protocols. The purpose of the library is to provide
6679 fundamental protocol access, not higher-level abstractions.")
6680 (license license:asl2.0)))
6682 (define-public java-jsch
6688 (uri (string-append "mirror://sourceforge/jsch/jsch/"
6689 version "/jsch-" version ".zip"))
6692 "1lxyjwvmwa723wcf3bqn816hkvc03vz4xhbsi7bvfhrz2rpgcfq6"))))
6693 (build-system ant-build-system)
6695 `(#:build-target "dist"
6696 #:tests? #f ; no tests included
6698 (modify-phases %standard-phases
6699 (replace 'install (install-jars "dist")))))
6701 `(("unzip" ,unzip)))
6702 (home-page "http://www.jcraft.com/jsch/")
6703 (synopsis "Pure Java implementation of SSH2")
6704 (description "JSch is a pure Java implementation of SSH2. JSch allows you
6705 to connect to an SSH server and use port forwarding, X11 forwarding, file
6706 transfer, etc., and you can integrate its functionality into your own Java
6708 (license license:bsd-3)))
6710 (define-public java-commons-compress
6712 (name "java-commons-compress")
6716 (uri (string-append "mirror://apache/commons/compress/source/"
6717 "commons-compress-" version "-src.tar.gz"))
6720 "1vjqvavrn0babffn1kciz6v52ibwq2vwhzlb95hazis3lgllnxc8"))))
6721 (build-system ant-build-system)
6723 `(#:jar-name "commons-compress.jar"
6725 (modify-phases %standard-phases
6726 (add-after 'unpack 'delete-bad-tests
6728 (with-directory-excursion "src/test/java/org/apache/commons/compress/"
6729 ;; FIXME: These tests really should not fail. Maybe they are
6730 ;; indicative of problems with our Java packaging work.
6732 ;; This test fails with a null pointer exception.
6733 (delete-file "archivers/sevenz/SevenZOutputFileTest.java")
6734 ;; This test fails to open test resources.
6735 (delete-file "archivers/zip/ExplodeSupportTest.java")
6737 ;; FIXME: This test adds a dependency on powermock, which is hard to
6738 ;; package at this point.
6739 ;; https://github.com/powermock/powermock
6740 (delete-file "archivers/sevenz/SevenZNativeHeapTest.java"))
6742 (replace 'install (install-from-pom "pom.xml")))))
6744 `(("java-xz" ,java-xz)
6745 ("apache-commons-parent-pom" ,apache-commons-parent-pom-41)))
6747 `(("java-junit" ,java-junit)
6748 ("java-mockito" ,java-mockito-1)))
6749 (home-page "https://commons.apache.org/proper/commons-compress/")
6750 (synopsis "Java library for working with compressed files")
6751 (description "The Apache Commons Compress library defines an API for
6752 working with compressed files such as ar, cpio, Unix dump, tar, zip, gzip, XZ,
6753 Pack200, bzip2, 7z, arj, lzma, snappy, DEFLATE, lz4 and Z files.")
6754 (license license:asl2.0)))
6756 (define-public java-commons-csv
6758 (name "java-commons-csv")
6762 (uri (string-append "mirror://apache/commons/csv/source/"
6763 "commons-csv-" version "-src.tar.gz"))
6766 "1l89m0fm2s3xx3v3iynvangymfg2vlyngaj6fgsi457nmsw7m7ij"))))
6767 (build-system ant-build-system)
6769 `(#:jar-name "commons-csv.jar"
6770 #:source-dir "src/main/java"
6771 #:tests? #f)); FIXME: requires java-h2
6773 `(("java-hamcrest-core" ,java-hamcrest-core)
6774 ("java-commons-io" ,java-commons-io)
6775 ("java-commons-lang3" ,java-commons-lang3)
6776 ("junit" ,java-junit)))
6777 (home-page "https://commons.apache.org/proper/commons-csv/")
6778 (synopsis "Read and write CSV documents")
6779 (description "Commons CSV reads and writes files in variations of the Comma
6780 Separated Value (CSV) format. The most common CSV formats are predefined in the
6784 @item Microsoft Excel
6785 @item Informix UNLOAD
6786 @item Informix UNLOAD CSV
6792 Custom formats can be created using a fluent style API.")
6793 (license license:asl2.0)))
6795 (define-public java-osgi-annotation
6797 (name "java-osgi-annotation")
6801 (uri (string-append "https://repo1.maven.org/maven2/"
6802 "org/osgi/org.osgi.annotation/" version "/"
6803 "org.osgi.annotation-" version "-sources.jar"))
6806 "1q718mb7gqg726rh6pc2hcisn8v50nv35abbir0jypmffhiii85w"))))
6807 (build-system ant-build-system)
6809 `(#:tests? #f ; no tests
6810 #:jar-name "osgi-annotation.jar"))
6811 (home-page "https://www.osgi.org")
6812 (synopsis "Annotation module of OSGi framework")
6814 "OSGi, for Open Services Gateway initiative framework, is a module system
6815 and service platform for the Java programming language. This package contains
6816 the OSGi annotation module, providing additional services to help dynamic
6818 (license license:asl2.0)))
6820 (define-public java-osgi-core
6822 (name "java-osgi-core")
6826 (uri (string-append "https://repo1.maven.org/maven2/"
6827 "org/osgi/org.osgi.core/" version "/"
6828 "org.osgi.core-" version "-sources.jar"))
6831 "19bpf5jx32jq9789gyhin35q5v7flmw0p9mk7wbgqpxqfmxyiabv"))))
6832 (build-system ant-build-system)
6834 `(#:tests? #f ; no tests
6835 #:jar-name "osgi-core.jar"))
6837 `(("java-osgi-annotation" ,java-osgi-annotation)))
6838 (home-page "https://www.osgi.org")
6839 (synopsis "Core module of OSGi framework")
6841 "OSGi, for Open Services Gateway initiative framework, is a module system
6842 and service platform for the Java programming language. This package contains
6843 the OSGi Core module.")
6844 (license license:asl2.0)))
6846 (define-public java-osgi-service-event
6848 (name "java-osgi-service-event")
6852 (uri (string-append "https://repo1.maven.org/maven2/"
6853 "org/osgi/org.osgi.service.event/"
6854 version "/org.osgi.service.event-"
6855 version "-sources.jar"))
6858 "1nyhlgagwym75bycnjczwbnpymv2iw84zbhvvzk84g9q736i6qxm"))))
6859 (build-system ant-build-system)
6861 `(#:tests? #f ; no tests
6862 #:jar-name "osgi-service-event.jar"))
6864 `(("java-osgi-annotation" ,java-osgi-annotation)
6865 ("java-osgi-core" ,java-osgi-core)))
6866 (home-page "https://www.osgi.org")
6867 (synopsis "OSGi service event module")
6869 "OSGi, for Open Services Gateway initiative framework, is a module system
6870 and service platform for the Java programming language. This package contains
6871 the OSGi @code{org.osgi.service.event} module.")
6872 (license license:asl2.0)))
6874 (define-public java-eclipse-osgi
6876 (name "java-eclipse-osgi")
6880 (uri (string-append "https://repo1.maven.org/maven2/"
6881 "org/eclipse/platform/org.eclipse.osgi/"
6882 version "/org.eclipse.osgi-"
6883 version "-sources.jar"))
6886 "00cqc6lb29n0zv68b4l842vzkwawvbr7gshfdygsk8sicvcq2c7b"))))
6887 (build-system ant-build-system)
6889 `(#:tests? #f ; no tests included
6890 #:jar-name "eclipse-equinox-osgi.jar"))
6892 `(("java-osgi-annotation" ,java-osgi-annotation)))
6893 (home-page "http://www.eclipse.org/equinox/")
6894 (synopsis "Eclipse Equinox OSGi framework")
6895 (description "This package provides an implementation of the OSGi Core
6897 (license license:epl1.0)))
6899 (define-public java-eclipse-equinox-common
6901 (name "java-eclipse-equinox-common")
6902 (version "3.10.200")
6905 (uri (string-append "https://repo1.maven.org/maven2/"
6906 "org/eclipse/platform/org.eclipse.equinox.common/"
6907 version "/org.eclipse.equinox.common-"
6908 version "-sources.jar"))
6911 "1yn8ij6xsljlf35sr2l7wvyvc0ss4n1rv0ry5zkgb49dj4hyrqrj"))))
6912 (build-system ant-build-system)
6914 `(#:tests? #f ; no tests included
6915 #:jar-name "eclipse-equinox-common.jar"))
6917 `(("java-eclipse-osgi" ,java-eclipse-osgi)))
6918 (home-page "http://www.eclipse.org/equinox/")
6919 (synopsis "Common Eclipse runtime")
6920 (description "This package provides the common Eclipse runtime.")
6921 (license license:epl1.0)))
6923 (define-public java-eclipse-core-jobs
6925 (name "java-eclipse-core-jobs")
6929 (uri (string-append "https://repo1.maven.org/maven2/"
6930 "org/eclipse/platform/org.eclipse.core.jobs/"
6931 version "/org.eclipse.core.jobs-"
6932 version "-sources.jar"))
6935 "0395b8lh0km8vhzjnchvs1rii1qz48hyvb2wqfaq4yhklbwihq4b"))))
6936 (build-system ant-build-system)
6938 `(#:tests? #f ; no tests included
6939 #:jar-name "eclipse-core-jobs.jar"))
6941 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6942 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6943 (home-page "http://www.eclipse.org/equinox/")
6944 (synopsis "Eclipse jobs mechanism")
6945 (description "This package provides the Eclipse jobs mechanism.")
6946 (license license:epl1.0)))
6948 (define-public java-eclipse-equinox-registry
6950 (name "java-eclipse-equinox-registry")
6954 (uri (string-append "https://repo1.maven.org/maven2/"
6955 "org/eclipse/platform/org.eclipse.equinox.registry/"
6956 version "/org.eclipse.equinox.registry-"
6957 version "-sources.jar"))
6960 "1i9sgymh2fy5vdgk5y7s3qvrlbgh4l93ddqi3v4zmca7hwrlhf9k"))))
6961 (build-system ant-build-system)
6963 `(#:tests? #f ; no tests included
6964 #:jar-name "eclipse-equinox-registry.jar"))
6966 `(("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
6967 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6968 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6969 (home-page "http://www.eclipse.org/equinox/")
6970 (synopsis "Eclipse extension registry support")
6971 (description "This package provides support for the Eclipse extension
6973 (license license:epl1.0)))
6975 (define-public java-eclipse-equinox-app
6977 (name "java-eclipse-equinox-app")
6981 (uri (string-append "https://repo1.maven.org/maven2/"
6982 "org/eclipse/platform/org.eclipse.equinox.app/"
6983 version "/org.eclipse.equinox.app-"
6984 version "-sources.jar"))
6987 "0nhvbp93y203ar7y59gb0mz3w2d3jlqhr0c9hii9bcfpmr7imdab"))))
6988 (build-system ant-build-system)
6990 `(#:tests? #f ; no tests included
6991 #:jar-name "eclipse-equinox-app.jar"))
6993 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6994 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6995 ("java-eclipse-osgi" ,java-eclipse-osgi)
6996 ("java-osgi-service-event" ,java-osgi-service-event)))
6997 (home-page "http://www.eclipse.org/equinox/")
6998 (synopsis "Equinox application container")
6999 (description "This package provides the Equinox application container for
7001 (license license:epl1.0)))
7003 (define-public java-eclipse-equinox-preferences
7005 (name "java-eclipse-equinox-preferences")
7009 (uri (string-append "https://repo1.maven.org/maven2/"
7010 "org/eclipse/platform/org.eclipse.equinox.preferences/"
7011 version "/org.eclipse.equinox.preferences-"
7012 version "-sources.jar"))
7015 "0k7w6c141sqym4fy3af0qkwpy4pdh2vsjpjba6rp5fxyqa24v0a2"))))
7016 (build-system ant-build-system)
7018 `(#:tests? #f ; no tests included
7019 #:jar-name "eclipse-equinox-preferences.jar"))
7021 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7022 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
7023 ("java-eclipse-osgi" ,java-eclipse-osgi)))
7024 (home-page "http://www.eclipse.org/equinox/")
7025 (synopsis "Eclipse preferences mechanism")
7026 (description "This package provides the Eclipse preferences mechanism with
7027 the module @code{org.eclipse.equinox.preferences}.")
7028 (license license:epl1.0)))
7030 (define-public java-eclipse-core-contenttype
7032 (name "java-eclipse-core-contenttype")
7036 (uri (string-append "https://repo1.maven.org/maven2/"
7037 "org/eclipse/platform/org.eclipse.core.contenttype/"
7038 version "/org.eclipse.core.contenttype-"
7039 version "-sources.jar"))
7042 "1wcqcv7ijwv5rh748vz3x9pkmjl9w1r0k0026k56n8yjl4rrmspi"))))
7043 (build-system ant-build-system)
7045 `(#:tests? #f ; no tests included
7046 #:jar-name "eclipse-core-contenttype.jar"))
7048 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7049 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
7050 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
7051 ("java-eclipse-osgi" ,java-eclipse-osgi)))
7052 (home-page "http://www.eclipse.org/")
7053 (synopsis "Eclipse content mechanism")
7054 (description "This package provides the Eclipse content mechanism in the
7055 @code{org.eclipse.core.contenttype} module.")
7056 (license license:epl1.0)))
7058 (define-public java-eclipse-core-runtime
7060 (name "java-eclipse-core-runtime")
7061 (version "3.15.100")
7064 (uri (string-append "https://repo1.maven.org/maven2/"
7065 "org/eclipse/platform/org.eclipse.core.runtime/"
7066 version "/org.eclipse.core.runtime-"
7067 version "-sources.jar"))
7070 "0l8xayacsbjvz5hypx2fv47vpw2n4dspamcfb3hx30x9hj8vmg7r"))))
7071 (build-system ant-build-system)
7073 `(#:tests? #f ; no tests included
7074 #:jar-name "eclipse-core-runtime.jar"))
7076 `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
7077 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
7078 ("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
7079 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7080 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
7081 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
7082 ("java-eclipse-osgi" ,java-eclipse-osgi)))
7083 (home-page "https://www.eclipse.org/")
7084 (synopsis "Eclipse core runtime")
7085 (description "This package provides the Eclipse core runtime with the
7086 module @code{org.eclipse.core.runtime}.")
7087 (license license:epl1.0)))
7089 (define-public java-eclipse-core-filesystem
7091 (name "java-eclipse-core-filesystem")
7095 (uri (string-append "https://repo1.maven.org/maven2/"
7096 "org/eclipse/platform/org.eclipse.core.filesystem/"
7097 version "/org.eclipse.core.filesystem-"
7098 version "-sources.jar"))
7101 "0km1bhwjim4rfy3pkvjhvy31kgsyf2ncx0mlkmbf5n6g57pphdyj"))))
7102 (build-system ant-build-system)
7104 `(#:tests? #f ; no tests included
7105 #:jar-name "eclipse-core-filesystem.jar"))
7107 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7108 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
7109 ("java-eclipse-osgi" ,java-eclipse-osgi)))
7110 (home-page "https://www.eclipse.org/")
7111 (synopsis "Eclipse core file system")
7112 (description "This package provides the Eclipse core file system with the
7113 module @code{org.eclipse.core.filesystem}.")
7114 (license license:epl1.0)))
7116 (define-public java-eclipse-core-expressions
7118 (name "java-eclipse-core-expressions")
7122 (uri (string-append "https://repo1.maven.org/maven2/"
7123 "org/eclipse/platform/org.eclipse.core.expressions/"
7124 version "/org.eclipse.core.expressions-"
7125 version "-sources.jar"))
7128 "18bw2l875gmygvpagpgk9l24qzbdjia4ag12nw6fi8v8yaq4987f"))))
7129 (build-system ant-build-system)
7131 `(#:tests? #f ; no tests included
7132 #:jar-name "eclipse-core-expressions.jar"))
7134 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7135 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
7136 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
7137 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
7138 ("java-eclipse-osgi" ,java-eclipse-osgi)))
7139 (home-page "https://www.eclipse.org/")
7140 (synopsis "Eclipse core expression language")
7141 (description "This package provides the Eclipse core expression language
7142 with the @code{org.eclipse.core.expressions} module.")
7143 (license license:epl1.0)))
7145 (define-public java-eclipse-core-variables
7147 (name "java-eclipse-core-variables")
7151 (uri (string-append "https://repo1.maven.org/maven2/"
7152 "org/eclipse/platform/org.eclipse.core.variables/"
7153 version "/org.eclipse.core.variables-"
7154 version "-sources.jar"))
7157 "12dirh03zi4n5x5cj07vzrhkmnqy6h9q10h9j605pagmpmifyxmy"))))
7158 (build-system ant-build-system)
7160 `(#:tests? #f ; no tests included
7161 #:jar-name "eclipse-core-variables.jar"))
7163 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7164 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
7165 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
7166 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
7167 ("java-eclipse-osgi" ,java-eclipse-osgi)))
7168 (home-page "https://www.eclipse.org/platform")
7169 (synopsis "Eclipse core variables")
7170 (description "This package provides the Eclipse core variables module
7171 @code{org.eclipse.core.variables}.")
7172 (license license:epl1.0)))
7174 (define-public java-eclipse-ant-core
7176 (name "java-eclipse-ant-core")
7180 (uri (string-append "https://repo1.maven.org/maven2/"
7181 "org/eclipse/platform/org.eclipse.ant.core/"
7182 version "/org.eclipse.ant.core-"
7183 version "-sources.jar"))
7186 "11g3if794qjlk98mz9zch22rr56sd7z63vn4i7k2icr8cq5bfqg7"))))
7187 (build-system ant-build-system)
7189 `(#:tests? #f ; no tests included
7190 #:jar-name "eclipse-ant-core.jar"))
7192 `(("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
7193 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7194 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
7195 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
7196 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
7197 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
7198 ("java-eclipse-core-variables" ,java-eclipse-core-variables)
7199 ("java-eclipse-osgi" ,java-eclipse-osgi)))
7200 (home-page "https://www.eclipse.org/platform")
7201 (synopsis "Ant build tool core libraries")
7202 (description "This package provides the ant build tool core libraries with
7203 the module @code{org.eclipse.ant.core}.")
7204 (license license:epl1.0)))
7206 (define-public java-eclipse-core-resources
7208 (name "java-eclipse-core-resources")
7209 (version "3.13.200")
7212 (uri (string-append "https://repo1.maven.org/maven2/"
7213 "org/eclipse/platform/org.eclipse.core.resources/"
7214 version "/org.eclipse.core.resources-"
7215 version "-sources.jar"))
7218 "1sn3b6ky72hkvxcgf9b2jkpbdh3y8lbhi9xxwv1dsiddpkkq91hs"))))
7219 (build-system ant-build-system)
7221 `(#:tests? #f ; no tests included
7222 #:jar-name "eclipse-core-resources.jar"))
7224 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7225 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
7226 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
7227 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
7228 ("java-eclipse-core-expressions" ,java-eclipse-core-expressions)
7229 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
7230 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
7231 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
7232 ("java-eclipse-ant-core" ,java-eclipse-ant-core)
7233 ("java-eclipse-osgi" ,java-eclipse-osgi)))
7234 (home-page "https://www.eclipse.org/")
7235 (synopsis "Eclipse core resource management")
7236 (description "This package provides the Eclipse core resource management
7237 module @code{org.eclipse.core.resources}.")
7238 (license license:epl1.0)))
7240 (define-public java-eclipse-compare-core
7242 (name "java-eclipse-compare-core")
7246 (uri (string-append "https://repo1.maven.org/maven2/"
7247 "org/eclipse/platform/org.eclipse.compare.core/"
7248 version "/org.eclipse.compare.core-"
7249 version "-sources.jar"))
7252 "10g37r0pbiffyv2wk35c6g5lwzkdipkl0kkjp41v84dln46xm4dg"))))
7253 (build-system ant-build-system)
7255 `(#:tests? #f ; no tests included
7256 #:jar-name "eclipse-compare-core.jar"))
7258 `(("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
7259 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7260 ("java-eclipse-osgi" ,java-eclipse-osgi)
7261 ("java-icu4j" ,java-icu4j)))
7262 (home-page "https://www.eclipse.org/")
7263 (synopsis "Eclipse core compare support")
7264 (description "This package provides the Eclipse core compare support
7265 module @code{org.eclipse.compare.core}.")
7266 (license license:epl1.0)))
7268 (define-public java-eclipse-team-core
7270 (name "java-eclipse-team-core")
7274 (uri (string-append "https://repo1.maven.org/maven2/"
7275 "org/eclipse/platform/org.eclipse.team.core/"
7276 version "/org.eclipse.team.core-"
7277 version "-sources.jar"))
7280 "02j2jzqgb26zx2d5ahxmvijw6j4r0la90zl5c3i65x6z19ciyam7"))))
7281 (build-system ant-build-system)
7283 `(#:tests? #f ; no tests included
7284 #:jar-name "eclipse-team-core.jar"))
7286 `(("java-eclipse-compare-core" ,java-eclipse-compare-core)
7287 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
7288 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
7289 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
7290 ("java-eclipse-core-resources" ,java-eclipse-core-resources)
7291 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
7292 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7293 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
7294 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
7295 ("java-eclipse-osgi" ,java-eclipse-osgi)))
7296 (home-page "https://www.eclipse.org/platform")
7297 (synopsis "Eclipse team support core")
7298 (description "This package provides the Eclipse team support core module
7299 @code{org.eclipse.team.core}.")
7300 (license license:epl1.0)))
7302 (define-public java-eclipse-core-commands
7304 (name "java-eclipse-core-commands")
7308 (uri (string-append "https://repo1.maven.org/maven2/"
7309 "org/eclipse/platform/org.eclipse.core.commands/"
7310 version "/org.eclipse.core.commands-"
7311 version "-sources.jar"))
7314 "0yjn482qndcfrsq3jd6vnhcylp16420f5aqkrwr8spsprjigjcr9"))))
7315 (build-system ant-build-system)
7317 `(#:tests? #f ; no tests included
7318 #:jar-name "eclipse-core-commands.jar"))
7320 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)))
7321 (home-page "https://www.eclipse.org/platform")
7322 (synopsis "Eclipse core commands")
7323 (description "This package provides Eclipse core commands in the module
7324 @code{org.eclipse.core.commands}.")
7325 (license license:epl1.0)))
7327 (define-public java-eclipse-text
7329 (name "java-eclipse-text")
7333 (uri (string-append "https://repo1.maven.org/maven2/"
7334 "org/eclipse/platform/org.eclipse.text/"
7335 version "/org.eclipse.text-"
7336 version "-sources.jar"))
7339 "0scz70vzz5qs5caji9f5q01vkqnvip7dpri1q07l8wbbdcxn4cq1"))))
7340 (build-system ant-build-system)
7342 `(#:tests? #f ; no tests included
7343 #:jar-name "eclipse-text.jar"
7345 (modify-phases %standard-phases
7346 ;; When creating a new category we must make sure that the new list
7347 ;; matches List<Position>. By default it seems to be too generic
7348 ;; (ArrayList<Object>), so we specialize it to ArrayList<Position>.
7349 ;; Without this we get this error:
7351 ;; [javac] .../src/org/eclipse/jface/text/AbstractDocument.java:376:
7352 ;; error: method put in interface Map<K,V> cannot be applied to given types;
7353 ;; [javac] fPositions.put(category, new ArrayList<>());
7355 ;; [javac] required: String,List<Position>
7356 ;; [javac] found: String,ArrayList<Object>
7357 ;; [javac] reason: actual argument ArrayList<Object> cannot be converted
7358 ;; to List<Position> by method invocation conversion
7359 ;; [javac] where K,V are type-variables:
7360 ;; [javac] K extends Object declared in interface Map
7361 ;; [javac] V extends Object declared in interface Map
7363 ;; I don't know if this is a good fix. I suspect it is not, but it
7365 (add-after 'unpack 'fix-compilation-error
7367 (substitute* "src/org/eclipse/jface/text/AbstractDocument.java"
7368 (("Positions.put\\(category, new ArrayList<>\\(\\)\\);")
7369 "Positions.put(category, new ArrayList<Position>());"))
7372 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7373 ("java-eclipse-core-commands" ,java-eclipse-core-commands)
7374 ("java-icu4j" ,java-icu4j)))
7375 (home-page "http://www.eclipse.org/platform")
7376 (synopsis "Eclipse text library")
7377 (description "Platform Text is part of the Platform UI project and
7378 provides the basic building blocks for text and text editors within Eclipse
7379 and contributes the Eclipse default text editor.")
7380 (license license:epl1.0)))
7382 (define-public java-eclipse-jdt-core
7384 (name "java-eclipse-jdt-core")
7388 (uri (string-append "https://repo1.maven.org/maven2/"
7389 "org/eclipse/jdt/org.eclipse.jdt.core/"
7390 version "/org.eclipse.jdt.core-"
7391 version "-sources.jar"))
7394 "1g560yr9v2kzv34gc2m3ifpgnj7krcdd6h4gd4z83pwqacwkfz0k"))))
7395 (build-system ant-build-system)
7397 `(#:tests? #f ; no tests included
7398 #:jar-name "eclipse-jdt-core.jar"
7400 (modify-phases %standard-phases
7401 (add-after 'unpack 'move-sources
7403 (with-directory-excursion "src/jdtCompilerAdaptersrc/"
7404 (for-each (lambda (file)
7405 (install-file file (string-append "../" (dirname file))))
7406 (find-files "." ".*")))
7407 (delete-file-recursively "src/jdtCompilerAdaptersrc/")
7409 (add-before 'build 'copy-resources
7411 (with-directory-excursion "src"
7412 (for-each (lambda (file)
7413 (install-file file (string-append "../build/classes/" (dirname file))))
7414 (find-files "." ".*.(props|properties|rsc)")))
7417 `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
7418 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
7419 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
7420 ("java-eclipse-core-resources" ,java-eclipse-core-resources)
7421 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
7422 ("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
7423 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7424 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
7425 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
7426 ("java-eclipse-osgi" ,java-eclipse-osgi)
7427 ("java-eclipse-text" ,java-eclipse-text)))
7428 (home-page "https://www.eclipse.org/jdt")
7429 (synopsis "Java development tools core libraries")
7430 (description "This package provides the core libraries of the Eclipse Java
7431 development tools.")
7432 (license license:epl1.0)))
7434 (define-public java-eclipse-jdt-compiler-apt
7436 (name "java-eclipse-jdt-compiler-apt")
7440 (uri (string-append "https://repo1.maven.org/maven2/"
7441 "org/eclipse/jdt/org.eclipse.jdt.compiler.apt/"
7442 version "/org.eclipse.jdt.compiler.apt-"
7443 version "-sources.jar"))
7446 "1s285k9p2ixdqrknb40jbbvw682n9a7l5lqpn583a8pvlzg2l6r8"))))
7447 (build-system ant-build-system)
7449 `(#:tests? #f ; no tests included
7450 #:jar-name "eclipse-jdt-compiler-apt.jar"
7453 `(("java-eclipse-jdt-core" ,java-eclipse-jdt-core)))
7454 (home-page "https://www.eclipse.org/jdt/apt/")
7455 (synopsis "Annotation processing tool")
7456 (description "APT stands for Annotation Processing Tool. APT provides a
7457 means for generating files and compiling new Java classes based on annotations
7458 found in your source code.")
7459 (license license:epl2.0)))
7461 (define-public java-javax-mail
7463 (name "java-javax-mail")
7467 (uri (string-append "https://repo1.maven.org/maven2/"
7468 "com/sun/mail/javax.mail/"
7469 version "/javax.mail-"
7470 version "-sources.jar"))
7473 "0sdlfgsc2b5s89xv1261y8i0jijcja019k2x1c8ngfn582w4jly9"))))
7474 (build-system ant-build-system)
7476 `(#:tests? #f ; no tests
7477 #:jar-name "javax-mail.jar"))
7478 (home-page "https://javamail.java.net")
7479 (synopsis "Reference implementation of the JavaMail API")
7481 "This package provides versions of the JavaMail API implementation, IMAP,
7482 SMTP, and POP3 service providers, some examples, and documentation for the
7484 ;; GPLv2 only with "classpath exception".
7485 (license license:gpl2)))
7487 (define-public java-log4j-api
7489 (name "java-log4j-api")
7493 (uri (string-append "mirror://apache/logging/log4j/" version
7494 "/apache-log4j-" version "-src.tar.gz"))
7497 "0j5p9gik0jysh37nlrckqbky12isy95cpwg2gv5fas1rcdqbraxd"))))
7498 (build-system ant-build-system)
7500 `(#:tests? #f ; tests require unpackaged software
7501 #:jar-name "log4j-api.jar"
7503 (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out")
7506 (modify-phases %standard-phases
7507 (add-after 'unpack 'enter-dir
7508 (lambda _ (chdir "log4j-api") #t))
7509 ;; FIXME: The tests require additional software that has not been
7510 ;; packaged yet, such as
7511 ;; * org.apache.maven
7512 ;; * org.apache.felix
7513 (add-after 'enter-dir 'delete-tests
7514 (lambda _ (delete-file-recursively "src/test") #t)))))
7516 `(("java-osgi-core" ,java-osgi-core)
7517 ("java-hamcrest-core" ,java-hamcrest-core)
7518 ("java-junit" ,java-junit)))
7519 (home-page "https://logging.apache.org/log4j/2.x/")
7520 (synopsis "API module of the Log4j logging framework for Java")
7522 "This package provides the API module of the Log4j logging framework for
7524 (license license:asl2.0)))
7526 (define-public java-log4j-core
7528 (inherit java-log4j-api)
7529 (name "java-log4j-core")
7531 `(("java-osgi-core" ,java-osgi-core)
7532 ("java-hamcrest-core" ,java-hamcrest-core)
7533 ("java-log4j-api" ,java-log4j-api)
7534 ("java-mail" ,java-mail)
7535 ("java-jboss-jms-api-spec" ,java-jboss-jms-api-spec)
7536 ("java-lmax-disruptor" ,java-lmax-disruptor)
7537 ("java-kafka" ,java-kafka-clients)
7538 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
7539 ("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
7540 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
7541 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)
7542 ("java-fasterxml-jackson-dataformat-xml" ,java-fasterxml-jackson-dataformat-xml)
7543 ("java-fasterxml-jackson-dataformat-yaml" ,java-fasterxml-jackson-dataformat-yaml)
7544 ("java-commons-compress" ,java-commons-compress)
7545 ("java-commons-csv" ,java-commons-csv)
7546 ("java-jeromq" ,java-jeromq)
7547 ("java-junit" ,java-junit)))
7549 `(("hamcrest" ,java-hamcrest-all)
7550 ("java-commons-io" ,java-commons-io)
7551 ("java-commons-lang3" ,java-commons-lang3)
7552 ("slf4j" ,java-slf4j-api)))
7554 `(#:tests? #f ; tests require more dependencies
7555 #:test-dir "src/test"
7556 #:source-dir "src/main/java"
7557 #:jar-name "log4j-core.jar"
7560 (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out")
7563 (modify-phases %standard-phases
7564 (add-after 'unpack 'enter-dir
7565 (lambda _ (chdir "log4j-core") #t)))))
7566 (synopsis "Core component of the Log4j framework")
7567 (description "This package provides the core component of the Log4j
7568 logging framework for Java.")))
7570 (define-public java-log4j-1.2-api
7572 (inherit java-log4j-api)
7573 (name "java-log4j-1.2-api")
7575 `(#:jar-name "java-log4j-1.2-api.jar"
7576 #:source-dir "log4j-1.2-api/src/main/java"
7578 ;; Tests require maven-model (and other maven subprojects), which is a
7579 ;; cyclic dependency.
7582 `(("log4j-api" ,java-log4j-api)
7583 ("log4j-core" ,java-log4j-core)
7584 ("osgi-core" ,java-osgi-core)
7585 ("eclipse-osgi" ,java-eclipse-osgi)
7586 ("java-lmax-disruptor" ,java-lmax-disruptor)))))
7588 (define-public java-commons-cli
7590 (name "java-commons-cli")
7594 (uri (string-append "mirror://apache/commons/cli/source/"
7595 "commons-cli-" version "-src.tar.gz"))
7598 "05hgi2z01fqz374y719gl1dxzqvzci5af071zm7vxrjg9vczipm1"))))
7599 (build-system ant-build-system)
7602 `(#:jar-name "commons-cli.jar"
7604 (modify-phases %standard-phases
7606 (install-from-pom "pom.xml")))))
7608 `(("java-junit" ,java-junit)
7609 ("java-hamcrest-core" ,java-hamcrest-core)))
7610 (home-page "https://commons.apache.org/cli/")
7611 (synopsis "Command line arguments and options parsing library")
7612 (description "The Apache Commons CLI library provides an API for parsing
7613 command line options passed to programs. It is also able to print help
7614 messages detailing the options available for a command line tool.
7616 Commons CLI supports different types of options:
7619 @item POSIX like options (ie. tar -zxvf foo.tar.gz)
7620 @item GNU like long options (ie. du --human-readable --max-depth=1)
7621 @item Java like properties (ie. java -Djava.awt.headless=true Foo)
7622 @item Short options with value attached (ie. gcc -O2 foo.c)
7623 @item long options with single hyphen (ie. ant -projecthelp)
7626 This is a part of the Apache Commons Project.")
7627 (license license:asl2.0)))
7629 (define-public java-commons-codec
7631 (name "java-commons-codec")
7635 (uri (string-append "mirror://apache/commons/codec/source/"
7636 "commons-codec-" version "-src.tar.gz"))
7639 "11xr0agckkhm91pb5akf2mbk84yd54gyr178wj57gsm97fi7nkh9"))))
7640 (build-system ant-build-system)
7642 `(#:jar-name "java-commons-codec.jar"
7643 #:source-dir "src/main/java"
7644 #:test-dir "src/test"
7645 #:test-exclude (list "**/*AbstractTest.java")
7647 (modify-phases %standard-phases
7648 (add-before 'build 'copy-resources
7650 (copy-recursively "src/main/resources"
7653 (add-before 'check 'copy-test-resources
7655 (copy-recursively "src/test/resources"
7656 "build/test-classes")
7658 (replace 'install (install-from-pom "pom.xml")))))
7660 `(("java-commons-lang3" ,java-commons-lang3)
7661 ("java-junit" ,java-junit)))
7663 `(("apache-commons-parent-pom" ,apache-commons-parent-pom-50)))
7664 (home-page "https://commons.apache.org/codec/")
7665 (synopsis "Common encoders and decoders such as Base64, Hex, Phonetic and URLs")
7666 (description "The codec package contains simple encoder and decoders for
7667 various formats such as Base64 and Hexadecimal. In addition to these widely
7668 used encoders and decoders, the codec package also maintains a collection of
7669 phonetic encoding utilities.
7671 This is a part of the Apache Commons Project.")
7672 (license license:asl2.0)))
7674 (define-public java-commons-daemon
7676 (name "java-commons-daemon")
7680 (uri (string-append "mirror://apache/commons/daemon/source/"
7681 "commons-daemon-" version "-src.tar.gz"))
7684 "141gkhfzv5v3pdhic6y4ardq2dhsa3v36j8wmmhy6f8mac48fp7n"))))
7685 (build-system ant-build-system)
7687 `(#:test-target "test"
7689 (modify-phases %standard-phases
7690 (add-after 'build 'build-javadoc ant-build-javadoc)
7691 (replace 'install (install-jars "dist"))
7692 (add-after 'install 'install-doc (install-javadoc "dist/docs/api")))))
7694 `(("java-junit" ,java-junit)))
7695 (home-page "https://commons.apache.org/daemon/")
7696 (synopsis "Library to launch Java applications as daemons")
7697 (description "The Daemon package from Apache Commons can be used to
7698 implement Java applications which can be launched as daemons. For example the
7699 program will be notified about a shutdown so that it can perform cleanup tasks
7700 before its process of execution is destroyed by the operation system.
7702 This package contains the Java library. You will also need the actual binary
7703 for your architecture which is provided by the jsvc package.
7705 This is a part of the Apache Commons Project.")
7706 (license license:asl2.0)))
7708 (define-public java-javaewah
7710 (name "java-javaewah")
7715 (url "https://github.com/lemire/javaewah/")
7716 (commit (string-append "JavaEWAH-" version))))
7717 (file-name (git-file-name name version))
7720 "1m8qcb1py76v7avbjjrkvyy6fhr5dk2ywy73gbsxqry04gkm2nhw"))))
7721 (build-system ant-build-system)
7722 (arguments `(#:jar-name "javaewah.jar"))
7724 `(("java-junit" ,java-junit)
7725 ("java-hamcrest-core" ,java-hamcrest-core)))
7726 (home-page "https://github.com/lemire/javaewah")
7727 (synopsis "Compressed alternative to the Java @code{BitSet} class")
7728 (description "This is a word-aligned compressed variant of the Java
7729 @code{Bitset} class. It provides both a 64-bit and a 32-bit RLE-like
7730 compression scheme. It can be used to implement bitmap indexes.
7732 The goal of word-aligned compression is not to achieve the best compression,
7733 but rather to improve query processing time. Hence, JavaEWAH tries to save CPU
7734 cycles, maybe at the expense of storage. However, the EWAH scheme is always
7735 more efficient storage-wise than an uncompressed bitmap (as implemented in the
7736 @code{BitSet} class by Sun).")
7737 ;; GPL2.0 derivates are explicitly allowed.
7738 (license license:asl2.0)))
7740 (define-public java-slf4j-api
7742 (name "java-slf4j-api")
7746 (uri (string-append "https://www.slf4j.org/dist/slf4j-"
7750 "13j51sgzmhhdrfa74gkal5zpip7r1440dh7zsi2c8bpb2zs1v8kb"))
7751 (modules '((guix build utils)))
7752 ;; Delete bundled jars.
7755 (for-each delete-file (find-files "." "\\.jar$"))
7757 (build-system ant-build-system)
7759 `(#:jar-name "slf4j-api.jar"
7760 #:source-dir "slf4j-api/src/main"
7761 #:test-dir "slf4j-api/src/test"
7763 (modify-phases %standard-phases
7764 (add-after 'build 'regenerate-jar
7766 ;; pom.xml ignores these files in the jar creation process. If we don't,
7767 ;; we get the error "This code should have never made it into slf4j-api.jar"
7768 (delete-file-recursively "build/classes/org/slf4j/impl")
7769 (invoke "jar" "-cf" "build/jar/slf4j-api.jar" "-C"
7770 "build/classes" ".")))
7771 (add-before 'check 'dont-test-abstract-classes
7773 ;; abstract classes are not meant to be run with junit
7774 (substitute* "build.xml"
7775 (("<include name=\"\\*\\*/\\*Test.java\" />")
7776 (string-append "<include name=\"**/*Test.java\" />"
7777 "<exclude name=\"**/MultithreadedInitializationTest"
7781 (install-from-pom "slf4j-api/pom.xml")))))
7783 `(("java-slf4j-parent" ,java-slf4j-parent)))
7785 `(("java-junit" ,java-junit)
7786 ("java-hamcrest-core" ,java-hamcrest-core)))
7787 (home-page "https://www.slf4j.org/")
7788 (synopsis "Simple logging facade for Java")
7789 (description "The Simple Logging Facade for Java (SLF4J) serves as a
7790 simple facade or abstraction for various logging
7791 frameworks (e.g. @code{java.util.logging}, @code{logback}, @code{log4j})
7792 allowing the end user to plug in the desired logging framework at deployment
7794 (license license:expat)))
7796 (define java-slf4j-parent
7798 (inherit java-slf4j-api)
7799 (name "java-slf4j-parent")
7801 (propagated-inputs '())
7805 (modify-phases %standard-phases
7809 (install-pom-file "pom.xml")))))))
7811 (define-public java-slf4j-simple
7813 (name "java-slf4j-simple")
7815 (source (package-source java-slf4j-api))
7816 (build-system ant-build-system)
7818 `(#:jar-name "slf4j-simple.jar"
7819 #:source-dir "slf4j-simple/src/main"
7820 #:test-dir "slf4j-simple/src/test"
7822 (modify-phases %standard-phases
7823 ;; The tests need some test classes from slf4j-api
7824 (add-before 'check 'build-slf4j-api-test-helpers
7826 ;; Add current dir to CLASSPATH ...
7828 (string-append (getcwd) ":" (getenv "CLASSPATH")))
7829 ;; ... and build test helper classes here:
7832 ,@(find-files "slf4j-api/src/test" ".*\\.java")))))
7834 (install-from-pom "slf4j-simple/pom.xml")))))
7836 `(("java-slf4j-api" ,java-slf4j-api)))
7838 `(("java-junit" ,java-junit)
7839 ("java-hamcrest-core" ,java-hamcrest-core)))
7840 (home-page "https://www.slf4j.org/")
7841 (synopsis "Simple implementation of simple logging facade for Java")
7842 (description "SLF4J binding for the Simple implementation, which outputs
7843 all events to System.err. Only messages of level INFO and higher are
7845 (license license:expat)))
7847 (define-public antlr2
7853 (uri (string-append "https://www.antlr2.org/download/antlr-"
7857 "1ffvcwdw73id0dk6pj2mlxjvbg0662qacx4ylayqcxgg381fnfl5"))
7858 (modules '((guix build utils)))
7861 (delete-file "antlr.jar")
7862 (substitute* "lib/cpp/antlr/CharScanner.hpp"
7866 "#define EOF (-1)\n"
7867 "#include <strings.h>")))
7868 (substitute* "configure"
7871 (build-system gnu-build-system)
7873 `(#:tests? #f ; no test target
7874 #:imported-modules ((guix build ant-build-system)
7875 (guix build syscalls)
7876 ,@%gnu-build-system-modules)
7877 #:modules (((guix build ant-build-system) #:prefix ant:)
7878 (guix build gnu-build-system)
7881 (modify-phases %standard-phases
7882 (add-after 'install 'strip-jar-timestamps
7883 (assoc-ref ant:%standard-phases 'strip-jar-timestamps))
7884 (add-before 'configure 'fix-timestamp
7886 (substitute* "configure"
7887 (("^TIMESTAMP.*") "TIMESTAMP=19700101\n"))
7889 (add-after 'configure 'fix-bin-ls
7891 (substitute* (find-files "." "Makefile")
7897 ("java" ,icedtea "jdk")))
7899 `(("java" ,icedtea)))
7900 (home-page "https://www.antlr2.org")
7901 (synopsis "Framework for constructing recognizers, compilers, and translators")
7902 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
7903 is a language tool that provides a framework for constructing recognizers,
7904 compilers, and translators from grammatical descriptions containing Java, C#,
7905 C++, or Python actions. ANTLR provides excellent support for tree construction,
7906 tree walking, and translation.")
7907 (license license:public-domain)))
7909 (define-public java-stringtemplate-3
7911 (name "java-stringtemplate")
7915 (uri (string-append "https://github.com/antlr/website-st4/raw/"
7916 "gh-pages/download/stringtemplate-"
7920 "086yj68np1vqhkj7483diz3km6s6y4gmwqswa7524a0ca6vxn2is"))))
7921 (build-system ant-build-system)
7923 `(#:jar-name (string-append ,name "-" ,version ".jar")
7925 #:modules ((guix build ant-build-system)
7929 (modify-phases %standard-phases
7930 (add-before 'check 'fix-tests
7932 (substitute* "build.xml"
7933 (("\\$\\{test.home\\}/java")
7934 "${test.home}/org"))
7936 (add-before 'build 'generate-grammar
7938 (with-directory-excursion "src/org/antlr/stringtemplate/language/"
7939 (for-each (lambda (file)
7940 (format #t "~a\n" file)
7941 (invoke "antlr" file))
7942 '("template.g" "angle.bracket.template.g" "action.g"
7943 "eval.g" "group.g" "interface.g")))
7947 ("java-junit" ,java-junit)))
7948 (home-page "https://www.stringtemplate.org")
7949 (synopsis "Template engine to generate formatted text output")
7950 (description "StringTemplate is a java template engine (with ports for C#,
7951 Objective-C, JavaScript, Scala) for generating source code, web pages, emails,
7952 or any other formatted text output. StringTemplate is particularly good at
7953 code generators, multiple site skins, and internationalization / localization.
7954 StringTemplate also powers ANTLR.")
7955 (license license:bsd-3)))
7957 ;; antlr3 is partially written using antlr3 grammar files. It also depends on
7958 ;; ST4 (stringtemplate4), which is also partially written using antlr3 grammar
7959 ;; files and uses antlr3 at runtime. The latest version requires a recent version
7960 ;; of antlr3 at runtime.
7961 ;; Fortunately, ST4 4.0.6 can be built with an older antlr3, and we use antlr3.3.
7962 ;; This version of ST4 is sufficient for the latest antlr3.
7963 ;; We use ST4 4.0.6 to build a boostrap antlr3 (latest version), and build
7964 ;; the latest ST4 with it. Then we build our final antlr3 that will be linked
7965 ;; against the latest ST4.
7966 ;; antlr3.3 still depends on antlr3 to generate some files, so we use an
7967 ;; even older version, antlr3.1, to generate them. Fortunately antlr3.1 uses
7968 ;; only grammar files with the antlr2 syntax.
7969 ;; So we build antlr3.1 -> antlr3.3 -> ST4.0.6 -> antlr3-bootstrap -> ST4 -> antlr3.
7971 (define-public java-stringtemplate
7972 (package (inherit java-stringtemplate-3)
7973 (name "java-stringtemplate")
7977 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/"
7979 (file-name (string-append name "-" version ".tar.gz"))
7982 "1pri8hqa95rfdkjy55icl5q1m09zwp5k67ib14abas39s4v3w087"))))
7983 (build-system ant-build-system)
7985 `(#:jar-name (string-append ,name "-" ,version ".jar")
7986 #:tests? #f ; FIXME: tests fail for unknown reasons
7988 #:modules ((guix build ant-build-system)
7992 (modify-phases %standard-phases
7993 (add-before 'check 'fix-test-target
7995 (substitute* "build.xml"
7996 (("\\$\\{test.home\\}/java") "${test.home}/")
7997 (("\\*Test.java") "Test*.java"))
7999 (add-before 'build 'generate-grammar
8001 (with-directory-excursion "src/org/stringtemplate/v4/compiler/"
8002 (for-each (lambda (file)
8003 (format #t "~a\n" file)
8004 (invoke "antlr3" file))
8005 '("STParser.g" "Group.g" "CodeGenerator.g")))
8008 `(("antlr3" ,antlr3-bootstrap)
8010 ("java-stringtemplate" ,java-stringtemplate-3)
8011 ("java-junit" ,java-junit)))))
8013 (define java-stringtemplate-4.0.6
8014 (package (inherit java-stringtemplate)
8015 (name "java-stringtemplate")
8019 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/ST-"
8021 (file-name (string-append name "-" version ".tar.gz"))
8024 "0hjmh1ahdsh3w825i67mli9l4nncc4l6hdbf9ma91jvlj590sljp"))))
8026 `(("antlr3" ,antlr3-3.3)
8028 ("java-stringtemplate" ,java-stringtemplate-3)))))
8030 (define-public antlr3
8037 (url "https://github.com/antlr/antlr3")
8039 (file-name (git-file-name name version))
8042 "0cafavrjmzqhklghrk8c2jqxkdwxgzskm20pbrfd3r41cn00dpnf"))))
8043 (build-system ant-build-system)
8045 `(#:jar-name (string-append ,name "-" ,version ".jar")
8046 #:source-dir "tool/src/main/java:runtime/Java/src/main/java:tool/src/main/antlr3"
8049 (modify-phases %standard-phases
8050 (add-after 'install 'bin-install
8051 (lambda* (#:key inputs outputs #:allow-other-keys)
8052 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
8053 (bin (string-append (assoc-ref outputs "out") "/bin")))
8055 (with-output-to-file (string-append bin "/antlr3")
8058 (string-append "#!" (which "sh") "\n"
8059 "java -cp " jar "/" ,name "-" ,version ".jar:"
8061 (find-files (assoc-ref inputs "stringtemplate")
8065 (find-files (assoc-ref inputs "stringtemplate4")
8069 (find-files (string-append
8070 (assoc-ref inputs "antlr")
8073 " org.antlr.Tool $*"))))
8074 (chmod (string-append bin "/antlr3") #o755))
8076 (add-before 'build 'generate-grammar
8078 (chdir "tool/src/main/antlr3/org/antlr/grammar/v3/")
8079 (for-each (lambda (file)
8082 (invoke "antlr3" file))
8083 '("ANTLR.g" "ANTLRTreePrinter.g" "ActionAnalysis.g"
8084 "AssignTokenTypesWalker.g"
8085 "ActionTranslator.g" "TreeToNFAConverter.g"
8086 "ANTLRv3.g" "ANTLRv3Tree.g" "LeftRecursiveRuleWalker.g"
8087 "CodeGenTreeWalker.g" "DefineGrammarItemsWalker.g"))
8088 (substitute* "ANTLRParser.java"
8089 (("public Object getTree") "public GrammarAST getTree"))
8090 (substitute* "ANTLRv3Parser.java"
8091 (("public Object getTree") "public CommonTree getTree"))
8092 (chdir "../../../../../java")
8093 (substitute* "org/antlr/tool/LeftRecursiveRuleAnalyzer.java"
8094 (("import org.antlr.grammar.v3.\\*;") "import org.antlr.grammar.v3.*;
8095 import org.antlr.grammar.v3.ANTLRTreePrinter;"))
8096 (substitute* "org/antlr/tool/ErrorManager.java"
8097 (("case NO_SUCH_ATTRIBUTE_PASS_THROUGH:") ""))
8098 (chdir "../../../..")
8100 (add-before 'build 'fix-build-xml
8102 (substitute* "build.xml"
8103 (("target name=\"compile\">")
8104 "target name=\"compile\">
8105 <copy todir=\"${classes.dir}\">
8106 <fileset dir=\"tool/src/main/resources\">
8107 <include name=\"**/*.stg\"/>
8108 <include name=\"**/*.st\"/>
8109 <include name=\"**/*.sti\"/>
8110 <include name=\"**/STLexer.tokens\"/>
8116 ("antlr3" ,antlr3-bootstrap)))
8118 `(("junit" ,java-junit)
8119 ("stringtemplate" ,java-stringtemplate-3)
8120 ("stringtemplate4" ,java-stringtemplate)))
8122 `(("stringtemplate" ,java-stringtemplate-3)
8124 ("stringtemplate4" ,java-stringtemplate-4.0.6)))
8125 (home-page "https://www.antlr3.org")
8126 (synopsis "Framework for constructing recognizers, compilers, and translators")
8127 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
8128 is a language tool that provides a framework for constructing recognizers,
8129 compilers, and translators from grammatical descriptions containing Java, C#,
8130 C++, or Python actions. ANTLR provides excellent support for tree construction,
8131 tree walking, and translation.")
8132 (license license:bsd-3)))
8134 (define antlr3-bootstrap
8137 (name "antlr3-bootstrap")
8140 ("antlr3" ,antlr3-3.3)))
8142 `(("junit" ,java-junit)))))
8144 (define-public antlr3-3.3
8151 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
8152 "gh-pages/download/antlr-"
8156 "0qgg5vgsm4l1d6dj9pfbaa25dpv2ry2gny8ajy4vvgvfklw97b3m"))
8158 (search-patches "antlr3-3_3-fix-java8-compilation.patch"))))
8160 `(#:jar-name (string-append ,name "-" ,version ".jar")
8161 #:source-dir (string-join '("tool/src/main/java"
8162 "runtime/Java/src/main/java"
8163 "tool/src/main/antlr2"
8164 "tool/src/main/antlr3")
8166 #:tests? #f ; FIXME: tests seem to require maven plugin
8167 #:modules ((guix build ant-build-system)
8171 (modify-phases %standard-phases
8172 (add-after 'install 'bin-install
8173 (lambda* (#:key inputs outputs #:allow-other-keys)
8174 (let* ((out (assoc-ref outputs "out"))
8175 (jar (string-append out "/share/java"))
8176 (bin (string-append out "/bin")))
8178 (with-output-to-file (string-append bin "/antlr3")
8182 "#!" (which "sh") "\n"
8183 "java -cp " jar "/antlr3-3.3.jar:"
8185 (append (find-files (assoc-ref inputs "java-stringtemplate")
8187 (find-files (string-append (assoc-ref inputs "antlr")
8191 " org.antlr.Tool $*"))))
8192 (chmod (string-append bin "/antlr3") #o755)
8194 (add-before 'build 'generate-grammar
8196 (substitute* "tool/src/main/java/org/antlr/tool/Grammar.java"
8197 (("import org.antlr.grammar.v2.\\*;")
8198 "import org.antlr.grammar.v2.*;\n
8199 import org.antlr.grammar.v2.TreeToNFAConverter;\n
8200 import org.antlr.grammar.v2.DefineGrammarItemsWalker;\n
8201 import org.antlr.grammar.v2.ANTLRTreePrinter;"))
8202 (with-directory-excursion "tool/src/main/antlr2/org/antlr/grammar/v2/"
8203 (for-each (lambda (file)
8204 (format #t "~a\n" file)
8205 (invoke "antlr" file))
8206 '("antlr.g" "antlr.print.g" "assign.types.g"
8207 "buildnfa.g" "codegen.g" "define.g")))
8208 (with-directory-excursion "tool/src/main/antlr3/org/antlr/grammar/v3/"
8209 (for-each (lambda (file)
8210 (format #t "~a\n" file)
8211 (invoke "antlr3" file))
8212 '("ActionAnalysis.g" "ActionTranslator.g" "ANTLRv3.g"
8215 (add-before 'build 'fix-build-xml
8217 (substitute* "build.xml"
8218 (("target name=\"compile\">")
8219 "target name=\"compile\">
8220 <copy todir=\"${classes.dir}\">
8221 <fileset dir=\"tool/src/main/resources\">
8222 <include name=\"**/*.stg\"/>
8223 <include name=\"**/*.st\"/>
8224 <include name=\"**/*.sti\"/>
8225 <include name=\"**/STLexer.tokens\"/>
8231 ("antlr3" ,antlr3-3.1)))
8233 `(("junit" ,java-junit)))
8235 `(("java-stringtemplate" ,java-stringtemplate-3)
8236 ("antlr" ,antlr2)))))
8238 (define-public antlr3-3.1
8244 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
8245 "gh-pages/download/antlr-"
8249 "0sfimc9cpbgrihz4giyygc8afgpma2c93yqpwb951giriri6x66z"))
8251 (search-patches "antlr3-3_1-fix-java8-compilation.patch"))))
8253 `(#:jar-name (string-append "antlr3-" ,version ".jar")
8254 #:source-dir "src:runtime/Java/src"
8257 (modify-phases %standard-phases
8258 (add-after 'install 'bin-install
8259 (lambda* (#:key inputs outputs #:allow-other-keys)
8260 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
8261 (bin (string-append (assoc-ref outputs "out") "/bin")))
8263 (with-output-to-file (string-append bin "/antlr3")
8266 (string-append "#!" (which "sh") "\n"
8267 "java -cp " jar "/antlr3-3.1.jar:"
8269 (find-files (assoc-ref inputs "stringtemplate")
8273 (find-files (string-append
8274 (assoc-ref inputs "antlr")
8277 " org.antlr.Tool $*"))))
8278 (chmod (string-append bin "/antlr3") #o755))
8280 (add-before 'build 'generate-grammar
8282 (let ((dir "src/org/antlr/tool/"))
8283 (for-each (lambda (file)
8286 (invoke "antlr" "-o" dir (string-append dir file)))
8287 '("antlr.g" "antlr.print.g" "assign.types.g"
8288 "buildnfa.g" "define.g")))
8289 (format #t "codegen.g\n")
8290 (invoke "antlr" "-o" "src/org/antlr/codegen"
8291 "src/org/antlr/codegen/codegen.g")
8293 (add-before 'build 'fix-build-xml
8295 (substitute* "build.xml"
8296 (("target name=\"compile\">")
8297 "target name=\"compile\">
8298 <copy todir=\"${classes.dir}\">
8299 <fileset dir=\"src\">
8300 <include name=\"**/*.stg\"/>
8301 <include name=\"**/*.st\"/>
8302 <include name=\"**/*.sti\"/>
8303 <include name=\"**/STLexer.tokens\"/>
8308 `(("antlr" ,antlr2)))
8310 `(("junit" ,java-junit)))
8312 `(("stringtemplate" ,java-stringtemplate-3)))))
8314 (define-public java-treelayout
8316 (name "java-treelayout")
8321 (url "https://github.com/abego/treelayout")
8322 (commit (string-append "v" version))))
8323 (file-name (git-file-name name version))
8326 "18my8ql9b1y0n0zrvkih7xfhf3dpgfhyfifvkcfhmwcvw3divxak"))))
8327 (build-system ant-build-system)
8329 `(#:jar-name (string-append ,name "-" ,version ".jar")
8330 #:source-dir "org.abego.treelayout/src/main/java"
8331 #:test-dir "org.abego.treelayout/src/test"))
8333 `(("java-junit" ,java-junit)))
8335 `(("java-hamcrest-core" ,java-hamcrest-core)))
8336 (home-page "http://treelayout.sourceforge.net")
8337 (synopsis "Tree Layout Algorithm in Java")
8338 (description "TreeLayout creates tree layouts for arbitrary trees. It is
8339 not restricted to a specific output or format, but can be used for any kind of
8340 two dimensional diagram. Examples are Swing based components, SVG files, etc.
8341 This is possible because TreeLayout separates the layout of a tree from the
8343 (license license:bsd-3)))
8345 (define-public java-antlr4-runtime
8347 (name "java-antlr4-runtime")
8352 (url "https://github.com/antlr/antlr4")
8354 (file-name (git-file-name name version))
8357 "1qal3add26qxskm85nk7r758arladn5rcyjinmhlhznmpbbv9j8m"))
8359 (search-patches "java-antlr4-Add-standalone-generator.patch"
8360 "java-antlr4-fix-code-too-large.java"))))
8361 (build-system ant-build-system)
8363 `(#:jar-name "java-antlr4-runtime.jar"
8364 #:source-dir "runtime/Java/src/org"
8365 #:tests? #f; tests depend on java-antlr4 itself
8367 (modify-phases %standard-phases
8368 (add-before 'build 'copy-resources
8370 (copy-recursively "runtime/Java/src/main/dot"
8373 (home-page "https://www.antlr.org")
8374 (synopsis "ANTLR runtime library")
8375 (description "This package contains the runtime library used with generated
8377 (license license:bsd-3)))
8379 (define-public antlr4
8381 (inherit java-antlr4-runtime)
8384 `(#:jar-name "antlr4.jar"
8385 #:source-dir "tool/src"
8386 #:test-dir "tool-testsuite/test:runtime-testsuite/test:runtime-testsuite/annotations/src"
8387 #:test-include (list "**/Test*.java")
8388 #:test-exclude (list
8389 ;; no runnable method
8390 "**/TestOutputReading.java"
8392 "**/TestParserErrors.java"
8393 "**/TestSemPredEvalParser.java"
8395 "**/TestListeners.java"
8396 "**/TestParseTrees.java"
8397 "**/TestParserExec.java"
8398 "**/TestLexerErrors.java"
8399 "**/TestPerformance.java"
8400 "**/TestCompositeParsers.java"
8401 "**/TestLexerExec.java"
8402 "**/TestSemPredEvalLexer.java"
8403 "**/TestLeftRecursion.java"
8404 "**/TestFullContextParsing.java"
8405 "**/TestCompositeLexers.java"
8406 ;; Null pointer exception
8407 "**/TestCompositeGrammars.java"
8408 ;; Wrong assumption on emoji
8409 "**/TestUnicodeData.java")
8411 (modify-phases %standard-phases
8412 (add-before 'build 'fix-build.xml
8414 ;; tests are not in a java subdirectory
8415 (substitute* "build.xml"
8416 (("\\$\\{test.home\\}/java") "${test.home}"))
8418 ;; tests require to have a working antlr4 binary
8420 (add-after 'bin-install 'check
8422 (invoke "ant" "compile-tests")
8423 (invoke "ant" "check" "-Dtest.home=runtime-testsuite/annotations/src")
8424 (invoke "ant" "check" "-Dtest.home=runtime-testsuite/test")
8425 (invoke "ant" "check" "-Dtest.home=tool-testsuite/test")
8427 (add-before 'check 'remove-unrelated-languages
8429 ;; There are tests for other languages that ANTLR can generate, but
8430 ;; we don't have the infrastructure for that yet. Let's test Java
8434 (delete-file-recursively
8435 (string-append "runtime-testsuite/test/org/antlr/v4/test/runtime/"
8437 '("cpp" "csharp" "go" "javascript" "php" "python" "python2"
8440 (add-before 'check 'generate-test-parsers
8441 (lambda* (#:key outputs #:allow-other-keys)
8442 (define (run-antlr dir filename package)
8443 (invoke "antlr4" "-lib" dir "-visitor" "-no-listener"
8444 "-package" package (string-append dir "/" filename)
8446 (setenv "PATH" (string-append (getenv "PATH") ":"
8447 (assoc-ref outputs "out") "/bin"))
8448 (run-antlr "runtime-testsuite/test/org/antlr/v4/test/runtime/java/api"
8449 "Java.g4" "org.antlr.v4.test.runtime.java.api")
8450 (run-antlr "runtime-testsuite/test/org/antlr/v4/test/runtime/java/api"
8451 "VisitorBasic.g4" "org.antlr.v4.test.runtime.java.api")
8452 (run-antlr "runtime-testsuite/test/org/antlr/v4/test/runtime/java/api"
8453 "VisitorCalc.g4" "org.antlr.v4.test.runtime.java.api")
8455 (add-before 'check 'remove-graphemes
8457 ;; When running antlr on grahemes.g4, we get a runtime exception:
8458 ;; set is empty. So delete the file that depends on it.
8460 "runtime-testsuite/test/org/antlr/v4/test/runtime/java/api/perf/TimeLexerSpeed.java")
8462 (add-after 'install 'bin-install
8463 (lambda* (#:key inputs outputs #:allow-other-keys)
8464 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
8465 (bin (string-append (assoc-ref outputs "out") "/bin")))
8467 (with-output-to-file (string-append bin "/antlr4")
8470 (string-append "#!" (which "sh") "\n"
8471 "java -cp " jar "/antlr4.jar:"
8477 (find-files (assoc-ref inputs input)
8479 '("antlr3" "java-stringtemplate"
8480 "java-antlr4-runtime" "java-treelayout"
8481 "java-jsonp-api" "java-icu4j")))
8483 " org.antlr.v4.Tool $*"))))
8484 (chmod (string-append bin "/antlr4") #o755)
8486 (add-before 'build 'copy-resources
8488 (copy-recursively "tool/resources/" "build/classes")
8490 (add-before 'build 'generate-unicode
8492 ;; First: build the generator
8493 (invoke "javac" "-cp" (getenv "CLASSPATH")
8494 "tool/src/org/antlr/v4/unicode/UnicodeRenderer.java"
8495 "tool/src/org/antlr/v4/unicode/UnicodeDataTemplateController.java")
8497 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
8498 ":tool/src:runtime/Java")
8499 "org.antlr.v4.unicode.UnicodeRenderer"
8500 "tool/resources/org/antlr/v4/tool/templates"
8502 "tool/src/org/antlr/v4/unicode/UnicodeData.java")
8503 ;; It seems there is a bug with our ST4
8504 (substitute* "tool/src/org/antlr/v4/unicode/UnicodeData.java"
8506 ;; Remove the additional file
8507 (delete-file "tool/src/org/antlr/v4/unicode/UnicodeRenderer.java")
8509 (add-before 'build 'generate-grammar
8510 (lambda* (#:key inputs #:allow-other-keys)
8511 (with-directory-excursion "tool/src/org/antlr/v4/parse"
8512 (for-each (lambda (file)
8515 (invoke "antlr3" file))
8516 '("ANTLRLexer.g" "ANTLRParser.g" "BlockSetTransformer.g"
8517 "GrammarTreeVisitor.g" "ATNBuilder.g"
8518 "ActionSplitter.g" "LeftRecursiveRuleWalker.g")))
8519 (with-directory-excursion "tool/src/org/antlr/v4/codegen"
8520 (install-file "../parse/ANTLRParser.tokens" ".")
8521 (display "SourceGenTriggers.g\n")
8522 (invoke "antlr3" "SourceGenTriggers.g"))
8525 `(("antlr3" ,antlr3)
8526 ("java-antlr4-runtime" ,java-antlr4-runtime)
8527 ("java-icu4j" ,java-icu4j)
8528 ("java-jsonp-api" ,java-jsonp-api)
8529 ("java-stringtemplate" ,java-stringtemplate)
8530 ("java-treelayout" ,java-treelayout)))
8532 `(("java-junit" ,java-junit)))
8533 (synopsis "Parser and lexer generator in Java")
8534 (description "ANTLR (ANother Tool for Language Recognition) is a powerful
8535 parser generator for reading, processing, executing, or translating structured
8536 text or binary files. It's widely used to build languages, tools, and
8537 frameworks. From a grammar, ANTLR generates a parser that can build and walk
8540 (define-public java-antlr4-runtime-4.1
8542 (inherit java-antlr4-runtime)
8547 (url "https://github.com/antlr/antlr4")
8549 (file-name (git-file-name "antlr4" version))
8552 "1i8hmx5an58cjyvhji0xgpvd6lq00z1k1mjys025q2wqc25wv4c1"))))
8554 (substitute-keyword-arguments (package-arguments java-antlr4-runtime)
8556 `(modify-phases ,phases
8557 (add-before 'configure 'chmod
8559 (chmod "build.xml" #o644)
8562 `(("java-treelayout" ,java-treelayout)))))
8564 (define-public antlr4-4.1
8567 (version (package-version java-antlr4-runtime-4.1))
8568 (source (package-source java-antlr4-runtime-4.1))
8570 (substitute-keyword-arguments (package-arguments antlr4)
8573 ((#:test-exclude excludes)
8574 `(list "**/TestParseErrors.java"
8575 "**/TestTopologicalSort.java"
8578 `(modify-phases ,phases
8579 (delete 'generate-unicode)
8582 (invoke "ant" "check")
8584 (add-before 'configure 'chmod
8586 (chmod "build.xml" #o644)
8588 (delete 'remove-graphemes)
8589 (delete 'remove-unrelated-languages)
8590 (delete 'generate-test-parsers)))))
8593 "java-antlr4-runtime" (list java-antlr4-runtime-4.1)
8594 (package-inputs antlr4)))))
8596 (define-public java-tunnelvisionlabs-antlr4-runtime-annotations
8598 (inherit java-antlr4-runtime)
8599 (name "java-tunnelvisionlabs-antlr4-runtime-annotations")
8604 (url "https://github.com/tunnelvisionlabs/antlr4")
8605 (commit (string-append version "-opt"))))
8606 (file-name (git-file-name "java-tunnelvisionlabs-antlr4" version))
8609 "1mf2lvvsszpialsk23ma83pwp50nd32lrbjpa847zlm5gmranbr8"))
8611 (search-patches "java-antlr4-Add-standalone-generator.patch"
8612 "java-tunnelvisionlabs-antlr-code-too-large.patch"))))
8614 `(#:jar-name "java-antlr4-runtime-annotations.jar"
8615 #:source-dir "runtime/JavaAnnotations/src"
8616 #:tests? #f; no tests
8618 (modify-phases %standard-phases
8619 (add-after 'build 'copy-resources
8621 (copy-recursively "runtime/JavaAnnotations/resources"
8624 (add-after 'copy-resources 'rebuild-jar
8626 (invoke "ant" "jar")
8630 (synopsis "Annotations for ANTLR's runtime library")
8631 (description "This package contains annotations used during the build of
8632 the runtime library of ANTLR.")))
8634 ;; the runtime of this library requires a lexer that is generated by antlr4.
8635 ;; However, antlr4 itself requires this library at build and run-time. We
8636 ;; use antlr4@4.1, the closest version of antlr that doesn't need this
8637 ;; bootstrap process, to generate the lexer. The generated lexer is built
8638 ;; for the 4.1 runtime, which is slightly different from this runtime.
8639 ;; So, we build the runtime with antlr 4.1, with a broken xml lexer, that we
8640 ;; use to build antlr4. We then re-use this antlr4 to build the runtime, and
8641 ;; the proper, working, runtime to build antlr4 again.
8642 (define java-tunnelvisionlabs-antlr4-runtime-bootstrap
8644 (inherit java-antlr4-runtime)
8645 (name "java-tunnelvisionlabs-antlr4-runtime")
8646 (version (package-version java-tunnelvisionlabs-antlr4-runtime-annotations))
8647 (source (package-source java-tunnelvisionlabs-antlr4-runtime-annotations))
8649 `(#:jar-name "java-antlr4-runtime.jar"
8650 #:source-dir "runtime/Java/src"
8651 #:tests? #f; tests require antlr4, but antlr4 depends on this package
8653 (modify-phases %standard-phases
8654 (add-before 'build 'generate-xpath-lexer
8656 (invoke "antlr4" "-lib" "runtime/Java/src/org/antlr/v4/runtime/tree/xpath"
8657 "-visitor" "-no-listener"
8658 "-package" "org.antlr.v4.runtime.tree.xpath"
8659 "runtime/Java/src/org/antlr/v4/runtime/tree/xpath/XPathLexer.g4")
8660 ;; Generated code is for an incompatible version of the runtime
8661 (substitute* "runtime/Java/src/org/antlr/v4/runtime/tree/xpath/XPathLexer.java"
8662 (("LexerATNSimulator\\(this,_ATN,_decisionToDFA,_sharedContextCache\\)")
8663 "LexerATNSimulator(this,_ATN)"))
8665 (add-before 'build 'copy-resources
8667 (copy-recursively "runtime/Java/src/main/dot"
8671 `(("antlr4" ,antlr4-4.1)
8672 ("java-tunnelvisionlabs-antlr4-runtime-annotations"
8673 ,java-tunnelvisionlabs-antlr4-runtime-annotations)))))
8675 (define java-tunnelvisionlabs-antlr4-bootstrap
8678 (name "java-tunnelvisionlabs-antlr4")
8679 (version (package-version java-tunnelvisionlabs-antlr4-runtime-annotations))
8680 (source (package-source java-tunnelvisionlabs-antlr4-runtime-annotations))
8682 (substitute-keyword-arguments (package-arguments antlr4)
8684 "tool/test:runtime-testsuite/src")
8686 `(modify-phases ,phases
8687 (delete 'remove-unrelated-languages)
8688 (delete 'remove-graphemes)
8689 (delete 'generate-test-parsers)
8693 `(("antlr3" ,antlr3)
8694 ("java-antlr4-runtime" ,java-tunnelvisionlabs-antlr4-runtime-bootstrap)
8695 ("java-tunnelvisionlabs-antlr4-runtime-annotations"
8696 ,java-tunnelvisionlabs-antlr4-runtime-annotations)
8697 ("java-icu4j" ,java-icu4j)
8698 ("java-jsonp-api" ,java-jsonp-api)
8699 ("java-stringtemplate" ,java-stringtemplate)
8700 ("java-treelayout" ,java-treelayout)))))
8702 (define-public java-tunnelvisionlabs-antlr4-runtime
8704 (inherit java-tunnelvisionlabs-antlr4-runtime-bootstrap)
8707 "antlr4" (list java-tunnelvisionlabs-antlr4-bootstrap)
8708 (package-native-inputs java-tunnelvisionlabs-antlr4-runtime-bootstrap)))))
8710 (define-public java-tunnelvisionlabs-antlr4
8712 (inherit java-tunnelvisionlabs-antlr4-bootstrap)
8715 "java-antlr4-runtime" (list java-tunnelvisionlabs-antlr4-runtime)
8716 (package-inputs java-tunnelvisionlabs-antlr4-bootstrap)))))
8718 (define-public java-commons-cli-1.2
8719 ;; This is a bootstrap dependency for Maven2.
8721 (inherit java-commons-cli)
8725 (uri (string-append "mirror://apache/commons/cli/source/"
8726 "commons-cli-" version "-src.tar.gz"))
8729 "0rvfgzgv2pc1m091dfj3ih9ddsjjppr1f1wf0qmc3bk6b1kwv2dm"))))
8731 `(#:jar-name "commons-cli.jar"
8733 (modify-phases %standard-phases
8734 (add-before 'check 'fix-build-xml
8735 (lambda* (#:key inputs #:allow-other-keys)
8736 (substitute* "build.xml"
8737 (("dir=\"\\$\\{test.home\\}/java\"")
8738 "dir=\"${test.home}\""))
8741 `(("java-junit" ,java-junit)))))
8743 (define-public java-microemulator-cldc
8745 (name "java-microemulator-cldc")
8749 (uri (string-append "https://github.com/barteo/microemu/archive/"
8751 (string-map (lambda (c) (if (char=? c #\.) #\_ c))
8754 (file-name (string-append name "-" version ".tar.gz"))
8757 "1x1apmz38gkppxnwnygwmi12j54v4p258v8ddzn6dldkk7vak1ll"))))
8758 (build-system ant-build-system)
8760 `(#:jar-name "microemulator-cldc.jar"
8761 #:source-dir "microemu-cldc/src/main/java"
8762 #:tests? #f)); Requires even older software
8763 (home-page "https://github.com/barteo/microemu")
8764 (synopsis "J2ME CLDC emulator")
8765 (description "Microemulator is a Java 2 Micro Edition (J2ME) CLDC/MIDP
8766 Emulator. It demonstrates MIDlet based applications in web browser
8767 applet and can be run as a standalone java application.")
8768 (license (list license:asl2.0
8770 license:lgpl2.1+))))
8772 (define-public java-datanucleus-javax-persistence
8774 (name "java-datanucleus-javax-persistence")
8778 (uri (string-append "https://github.com/datanucleus/"
8779 "javax.persistence/archive/javax.persistence-"
8780 version "-release.tar.gz"))
8783 "11jx0fjwgc2hhbqqgdd6m1pf2fplf9vslppygax0y1z5csnqjhpx"))))
8784 (build-system ant-build-system)
8786 `(#:jar-name "java-datanucleus-javax-persistence.jar"
8788 #:source-dir "src/main/java"
8789 #:tests? #f)); no tests
8790 (home-page "https://github.com/datanucleus/javax.persistence")
8791 (synopsis "JPA API")
8792 (description "This package contains a clean definition of JPA API intended
8793 for use with DataNucleus JPA since the JCP haven't provided an official JPA API
8794 jar. See @url{http://java.net/projects/jpa-spec/downloads} for the specification
8795 used to generate this API.")
8796 (license (list license:edl1.0 license:epl1.0))))
8798 (define-public java-osgi-cmpn
8800 (name "java-osgi-cmpn")
8804 (uri (string-append "https://repo1.maven.org/maven2/"
8805 "org/osgi/osgi.cmpn/" version "/osgi.cmpn-"
8806 version "-sources.jar"))
8809 "1lmb6xyrmkqdhv1kayf0514rlwq6ypvs4m44ibrck3snp8241wys"))))
8810 (build-system ant-build-system)
8812 `(#:jar-name "osgi-cmpn.jar"
8813 #:tests? #f)); no tests
8815 `(("annotation" ,java-osgi-annotation)
8816 ("core" ,java-osgi-core)
8817 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
8818 ("microemulator" ,java-microemulator-cldc)
8819 ("servlet" ,java-classpathx-servletapi)))
8820 (home-page "https://www.osgi.org")
8821 (synopsis "Compendium specification module of OSGi framework")
8823 "OSGi, for Open Services Gateway initiative framework, is a module system
8824 and service platform for the Java programming language. This package contains
8825 the compendium specification module, providing interfaces and classes for use
8826 in compiling bundles.")
8827 (license license:asl2.0)))
8829 (define-public java-osgi-service-component-annotations
8831 (name "java-osgi-service-component-annotations")
8835 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8836 "org.osgi.service.component.annotations/"
8837 version "/org.osgi.service.component.annotations-"
8838 version "-sources.jar"))
8841 "15rq9cmp4fpn74q44m4j35qsqmjf5lx3hcrk6pzvbhc08igic2f0"))))
8842 (build-system ant-build-system)
8844 `(#:jar-name "osgi-service-component-annotations.jar"
8845 #:tests? #f)); no tests
8847 `(("annotation" ,java-osgi-annotation)))
8848 (home-page "https://www.osgi.org")
8849 (synopsis "Support annotations for osgi-service-component")
8851 "OSGi, for Open Services Gateway initiative framework, is a module system
8852 and service platform for the Java programming language. This package contains
8853 the support annotations for osgi-service-component.")
8854 (license license:asl2.0)))
8856 (define-public java-osgi-dto
8858 (name "java-osgi-dto")
8862 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8863 "org.osgi.dto/" version "/org.osgi.dto-"
8864 version "-sources.jar"))
8867 "0f4bqjzadn0hwk6sd3h5gvbyfp3yci1s6r0v770cc15p0pg627yr"))))
8868 (build-system ant-build-system)
8870 `(#:jar-name "osgi-dto.jar"
8871 #:tests? #f)); no tests
8873 `(("annotation" ,java-osgi-annotation)))
8874 (home-page "https://www.osgi.org")
8875 (synopsis "Data Transfer Objects")
8877 "OSGi, for Open Services Gateway initiative framework, is a module system
8878 and service platform for the Java programming language. This package contains
8879 the Data Transfer Objects. It is easily serializable having only public fields
8880 of primitive types and their wrapper classes, Strings, and DTOs. List, Set,
8881 Map and array aggregates may also be used. The aggregates must only hold
8882 objects of the listed types or aggregates.")
8883 (license license:asl2.0)))
8885 (define-public java-osgi-resource
8887 (name "java-osgi-resource")
8891 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8892 "org.osgi.resource/"
8893 version "/org.osgi.resource-"
8894 version "-sources.jar"))
8897 "0hi0fsc5v99q22bd7lrkvpz1y0ds4w9arjldpwsrcpqvz2js7q2d"))))
8898 (build-system ant-build-system)
8900 `(#:jar-name "osgi-resource.jar"
8901 #:tests? #f)); no tests
8903 `(("annotation" ,java-osgi-annotation)
8904 ("dto" ,java-osgi-dto)))
8905 (home-page "https://www.osgi.org")
8906 (synopsis "OSGI Resource")
8908 "OSGi, for Open Services Gateway initiative framework, is a module system
8909 and service platform for the Java programming language. This package contains
8910 the definition of common types in osgi packages.")
8911 (license license:asl2.0)))
8913 (define-public java-osgi-namespace-contract
8915 (name "java-osgi-namespace-contract")
8919 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8920 "org.osgi.namespace.contract/"
8921 version "/org.osgi.namespace.contract-"
8922 version "-sources.jar"))
8925 "1iz4f2i0fvqrlq90ki9nfzcfpvy2av434ri25bglywqssx8mmp36"))))
8926 (build-system ant-build-system)
8928 `(("resource" ,java-osgi-resource)
8929 ("annotation" ,java-osgi-annotation)))
8931 `(#:jar-name "osgi-namespace-contract.jar"
8932 #:tests? #f)); no tests
8933 (home-page "https://www.osgi.org")
8934 (synopsis "Contract Capability and Requirement Namespace")
8936 "OSGi, for Open Services Gateway initiative framework, is a module system
8937 and service platform for the Java programming language. This package contains
8938 the names for the attributes and directives for a namespace with contracts.")
8939 (license license:asl2.0)))
8941 (define-public java-osgi-namespace-extender
8943 (name "java-osgi-namespace-extender")
8947 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8948 "org.osgi.namespace.extender/"
8949 version "/org.osgi.namespace.extender-"
8950 version "-sources.jar"))
8953 "0jgqiak2i05qv6j3gd33xlaifzzc0ylxxk376v2x0apfg3vvixmz"))))
8954 (build-system ant-build-system)
8956 `(("resource" ,java-osgi-resource)
8957 ("annotation" ,java-osgi-annotation)))
8959 `(#:jar-name "osgi-namespace-extendent.jar"
8960 #:tests? #f)); no tests
8961 (home-page "https://www.osgi.org")
8962 (synopsis "Extender Capability and Requirement Namespace")
8964 "OSGi, for Open Services Gateway initiative framework, is a module system
8965 and service platform for the Java programming language. This package contains
8966 the names for the attributes and directives for an extender namespace.")
8967 (license license:asl2.0)))
8969 (define-public java-osgi-namespace-service
8971 (name "java-osgi-namespace-service")
8975 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8976 "org.osgi.namespace.service/"
8977 version "/org.osgi.namespace.service-"
8978 version "-sources.jar"))
8981 "0qmw8n2449nkmm56d1znz9zhazb6ya3vsimd5bf5jg23zzhgl8c8"))))
8982 (build-system ant-build-system)
8984 `(("resource" ,java-osgi-resource)
8985 ("annotation" ,java-osgi-annotation)))
8987 `(#:jar-name "osgi-namespace-service.jar"
8988 #:tests? #f)); no tests
8989 (home-page "https://www.osgi.org")
8990 (synopsis "Service Capability and Requirement Namespace")
8992 "OSGi, for Open Services Gateway initiative framework, is a module system
8993 and service platform for the Java programming language. This package contains
8994 the names for the attributes and directives for a service namespace.")
8995 (license license:asl2.0)))
8997 (define-public java-osgi-util-function
8999 (name "java-osgi-util-function")
9003 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9004 "org.osgi.util.function/"
9005 version "/org.osgi.util.function-"
9006 version "-sources.jar"))
9009 "04l7j3hwmmj28w23m7paca0afzncs42j2mdr3liqq8kvp548sc6x"))))
9010 (build-system ant-build-system)
9012 `(#:jar-name "osgi-util-function.jar"
9013 #:tests? #f)); no tests
9015 `(("annotation" ,java-osgi-annotation)))
9016 (home-page "https://www.osgi.org")
9017 (synopsis "OSGI Util Function")
9019 "OSGi, for Open Services Gateway initiative framework, is a module system
9020 and service platform for the Java programming language. This package contains
9021 an interface for a function that accepts a single argument and produces a result.")
9022 (license license:asl2.0)))
9024 (define-public java-osgi-util-promise
9026 (name "java-osgi-util-promise")
9030 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9031 "org.osgi.util.promise/"
9032 version "/org.osgi.util.promise-"
9033 version "-sources.jar"))
9036 "0y34dwiflg1c4ahvkswpf9z02xph2sr9fm04ia5493x3lshpw22c"))))
9037 (build-system ant-build-system)
9039 `(#:jar-name "osgi-util-promise.jar"
9040 #:tests? #f)); no tests
9042 `(("annotation" ,java-osgi-annotation)
9043 ("function" ,java-osgi-util-function)))
9044 (home-page "https://www.osgi.org")
9045 (synopsis "Promise of a value")
9047 "OSGi, for Open Services Gateway initiative framework, is a module system
9048 and service platform for the Java programming language. This package contains
9049 an interface and utilitary classes for promises. A Promise represents a future
9050 value. It handles the interactions for asynchronous processing.")
9051 (license license:asl2.0)))
9053 (define-public java-osgi-service-metatype-annotations
9055 (name "java-osgi-service-metatype-annotations")
9059 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9060 "org.osgi.service.metatype.annotations/"
9061 version "/org.osgi.service.metatype.annotations-"
9062 version "-sources.jar"))
9065 "12rwm3349wk80vm88rcdgs4435m4jxkpkj5mrx326skkz2c6hyw6"))))
9066 (build-system ant-build-system)
9068 `(#:jar-name "osgi-service-metatype-annotations.jar"
9069 #:tests? #f)); no tests
9071 `(("annotation" ,java-osgi-annotation)))
9072 (home-page "https://www.osgi.org")
9073 (synopsis "Support annotations for metatype")
9075 "OSGi, for Open Services Gateway initiative framework, is a module system
9076 and service platform for the Java programming language. This package contains
9077 the support annotations for metatype.")
9078 (license license:asl2.0)))
9080 (define-public java-osgi-service-repository
9082 (name "java-osgi-service-repository")
9086 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9087 "org.osgi.service.repository/"
9088 version "/org.osgi.service.repository-"
9089 version "-sources.jar"))
9092 "1k41mhg7b58pd8nsghr2qwcjrxdnf1p9spsw9v11k4257g6rl06n"))))
9093 (build-system ant-build-system)
9095 `(#:jar-name "osgi-service-repository.jar"
9096 #:tests? #f)); no tests
9098 `(("annotation" ,java-osgi-annotation)
9099 ("promise" ,java-osgi-util-promise)
9100 ("resource" ,java-osgi-resource)))
9101 (home-page "https://www.osgi.org")
9102 (synopsis "OSGI service repository")
9104 "OSGi, for Open Services Gateway initiative framework, is a module system
9105 and service platform for the Java programming language. This package contains
9106 a repository service that contains resources.")
9107 (license license:asl2.0)))
9109 (define-public java-osgi-framework
9111 (name "java-osgi-framework")
9115 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9116 "org.osgi.framework/" version "/org.osgi.framework-"
9117 version "-sources.jar"))
9120 "1lwp2zfad3rybcc6q9bwz8xsgkc92ypzy5p6x54387f1qj65m73s"))))
9121 (build-system ant-build-system)
9123 `(#:jar-name "osgi-framework.jar"
9124 #:tests? #f)); no tests
9126 `(("annotation" ,java-osgi-annotation)
9127 ("resource" ,java-osgi-resource)
9128 ("dto" ,java-osgi-dto)))
9129 (home-page "https://www.osgi.org")
9130 (synopsis "OSGi framework")
9132 "OSGi, for Open Services Gateway initiative framework, is a module system
9133 and service platform for the Java programming language.")
9134 (license license:asl2.0)))
9136 (define-public java-osgi-service-log
9138 (name "java-osgi-service-log")
9142 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9143 "org.osgi.service.log/"
9144 version "/org.osgi.service.log-"
9145 version "-sources.jar"))
9148 "1029j30dzcwializzca0j3fkhwwz08kmmsha5agw1iccscimj6r0"))))
9149 (build-system ant-build-system)
9151 `(#:jar-name "osgi-service-log.jar"
9152 #:tests? #f)); no tests
9154 `(("java-osgi-framework" ,java-osgi-framework)))
9155 (home-page "https://www.osgi.org")
9156 (synopsis "Provides methods for bundles to write messages to the log")
9158 "OSGi, for Open Services Gateway initiative framework, is a module system
9159 and service platform for the Java programming language. This package contains
9161 (license license:asl2.0)))
9163 (define-public java-osgi-service-jdbc
9165 (name "java-osgi-service-jdbc")
9169 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9170 "org.osgi.service.jdbc/"
9171 version "/org.osgi.service.jdbc-"
9172 version "-sources.jar"))
9175 "11iln5v7bk469cgb9ddkrz9sa95b3733gqgaqw9xf5g6wq652yjz"))))
9176 (build-system ant-build-system)
9178 `(#:jar-name "osgi-service-jdbc.jar"
9179 #:tests? #f)); no tests
9180 (home-page "https://www.osgi.org")
9181 (synopsis "Factory for JDBC connection factories")
9183 "OSGi, for Open Services Gateway initiative framework, is a module system
9184 and service platform for the Java programming language. This package contains
9185 a factory for JDBC connection factories. There are 3 preferred connection
9186 factories for getting JDBC connections:
9189 @item @code{javax.sql.DataSource};
9190 @item @code{javax.sql.ConnectionPoolDataSource};
9191 @item @code{javax.sql.XADataSource}.
9193 (license license:asl2.0)))
9195 (define-public java-osgi-service-resolver
9197 (name "java-osgi-service-resolver")
9201 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9202 "org.osgi.service.resolver/"
9203 version "/org.osgi.service.resolver-"
9204 version "-sources.jar"))
9207 "1dzqn1ryfi2rq4zwsgp44bmj2wlfydjg1qbxw2b0z4xdjjy55vxd"))))
9208 (build-system ant-build-system)
9210 `(#:jar-name "osgi-service-resolver.jar"
9211 #:tests? #f)); no tests
9213 `(("annotation" ,java-osgi-annotation)
9214 ("resource" ,java-osgi-resource)))
9215 (home-page "https://www.osgi.org")
9216 (synopsis "OSGI Resolver service")
9218 "OSGi, for Open Services Gateway initiative framework, is a module system
9219 and service platform for the Java programming language. This package contains
9220 a resolver service that resolves the specified resources in the context supplied
9222 (license license:asl2.0)))
9224 (define-public java-osgi-util-tracker
9226 (name "java-osgi-util-tracker")
9230 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9231 "org.osgi.util.tracker/"
9232 version "/org.osgi.util.tracker-"
9233 version "-sources.jar"))
9236 "0c4fh9vxwzsx59r8dygda0gq2gx3z5vfhc3jsphlqwf5w0h403lz"))))
9237 (build-system ant-build-system)
9239 `(#:jar-name "osgi-util-tracker.jar"
9240 #:tests? #f)); no tests
9242 `(("framework" ,java-osgi-framework)
9243 ("annotation" ,java-osgi-annotation)))
9244 (home-page "https://www.osgi.org")
9245 (synopsis "Bundle tracking")
9247 "OSGi, for Open Services Gateway initiative framework, is a module system
9248 and service platform for the Java programming language. This package contains
9249 bundle tracking utility classes.")
9250 (license license:asl2.0)))
9252 (define-public java-osgi-service-cm
9254 (name "java-osgi-service-cm")
9258 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9259 "org.osgi.service.cm/"
9260 version "/org.osgi.service.cm-"
9261 version "-sources.jar"))
9264 "1z8kap48y3xi0ggj8v6czglfnpnd94mmismgi2wbqhj1nl5fzbp6"))))
9265 (build-system ant-build-system)
9267 `(#:jar-name "osgi-service-cm.jar"
9268 #:tests? #f)); no tests
9270 `(("framework" ,java-osgi-framework)
9271 ("annotation" ,java-osgi-annotation)))
9272 (home-page "https://www.osgi.org")
9273 (synopsis "OSGI Configuration Management")
9275 "OSGi, for Open Services Gateway initiative framework, is a module system
9276 and service platform for the Java programming language. This package contains
9277 utility classes for the configuration of services.")
9278 (license license:asl2.0)))
9280 (define-public java-osgi-service-packageadmin
9282 (name "java-osgi-service-packageadmin")
9286 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9287 "org.osgi.service.packageadmin/"
9288 version "/org.osgi.service.packageadmin-"
9289 version "-sources.jar"))
9292 "041mpxzi7g36wmcily6y4ccn3jx15akpdy8gmhyb7m98x7qfvn52"))))
9293 (build-system ant-build-system)
9295 `(#:jar-name "osgi-service-packageadmin.jar"
9296 #:tests? #f)); no tests
9298 `(("framework" ,java-osgi-framework)))
9299 (home-page "https://www.osgi.org")
9300 (synopsis "OSGI Package Administration")
9302 "OSGi, for Open Services Gateway initiative framework, is a module system
9303 and service platform for the Java programming language. This package contains
9304 the packageadmin service.")
9305 (license license:asl2.0)))
9307 (define-public java-ops4j-base-lang
9309 (name "java-ops4j-base-lang")
9313 (uri (string-append "https://github.com/ops4j/org.ops4j.base/"
9314 "archive/base-" version ".tar.gz"))
9317 "18hl3lpchgpv8yh5rlk39l2gif5dlfgb8gxjmncf39pr2dprkniw"))))
9318 (build-system ant-build-system)
9320 `(#:jar-name "java-ops4j-base-lang.jar"
9321 #:source-dir "ops4j-base-lang/src/main/java"
9322 #:tests? #f; no tests
9324 (modify-phases %standard-phases
9325 (add-before 'build 'add-test-file
9327 ;; That file is required by a test in ops4j-pax-exam-core-spi
9328 (mkdir-p "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang")
9329 (with-output-to-file "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang/pom.properties"
9333 "version=" ,version "\n"
9334 "groupId=org.ops4j.base"
9335 "artifactId=ops4j-base-lang\n"))))
9337 (home-page "https://ops4j1.jira.com/wiki/spaces/base/overview")
9338 (synopsis "Utility classes and extensions to be used in OPS4J projects")
9339 (description "OPS4J stands for Open Participation Software for Java. This
9340 package contains utilities and extensions related to @code{java.lang}.")
9341 (license license:asl2.0)))
9343 (define-public java-ops4j-base-monitors
9345 (inherit java-ops4j-base-lang)
9346 (name "java-ops4j-base-monitors")
9348 `(#:jar-name "java-ops4j-base-monitors.jar"
9349 #:source-dir "ops4j-base-monitors/src/main/java"
9350 #:tests? #f)); no tests
9352 `(("lang" ,java-ops4j-base-lang)))
9353 (description "OPS4J stands for Open Participation Software for Java. This
9354 package contains utilities and extensions related to monitoring.")))
9356 (define-public java-ops4j-base-io
9358 (inherit java-ops4j-base-lang)
9359 (name "java-ops4j-base-io")
9361 `(#:jar-name "java-ops4j-base-io.jar"
9362 #:source-dir "ops4j-base-io/src/main/java"
9363 #:test-dir "ops4j-base-io/src/test"
9365 (list "**/ListerTest.java")))
9367 `(("lang" ,java-ops4j-base-monitors)
9368 ("lang" ,java-ops4j-base-lang)))
9370 `(("junit" ,java-junit)
9371 ("hamcrest" ,java-hamcrest-core)))
9372 (description "OPS4J stands for Open Participation Software for Java. This
9373 package contains utilities and extensions related to handling streams and files.")))
9375 (define-public java-ops4j-base-util
9377 (inherit java-ops4j-base-lang)
9378 (name "java-ops4j-base-util")
9380 `(#:jar-name "java-ops4j-base-util.jar"
9381 #:source-dir "ops4j-base-util/src/main/java"
9382 #:test-dir "ops4j-base-util/src/test"))
9384 `(("lang" ,java-ops4j-base-lang)))
9386 `(("junit" ,java-junit)))
9387 (description "OPS4J stands for Open Participation Software for Java. This
9388 package contains utilities and extensions related to environment, i18n and
9391 (define-public java-ops4j-base-util-property
9393 (inherit java-ops4j-base-lang)
9394 (name "java-ops4j-base-util-property")
9396 `(#:jar-name "java-ops4j-base-util-property.jar"
9397 #:source-dir "ops4j-base-util-property/src/main/java"
9398 #:tests? #f)); no tests
9400 `(("lang" ,java-ops4j-base-lang)
9401 ("util" ,java-ops4j-base-util)))
9402 (description "OPS4J stands for Open Participation Software for Java. This
9403 package contains utilities and extensions related to resolving properties from
9404 different sources.")))
9406 (define-public java-ops4j-base-store
9408 (inherit java-ops4j-base-lang)
9409 (name "java-ops4j-base-store")
9411 `(#:jar-name "java-ops4j-base-store.jar"
9412 #:source-dir "ops4j-base-store/src/main/java"
9413 #:tests? #f)); no tests
9415 `(("lang" ,java-ops4j-base-lang)
9416 ("slf4j" ,java-slf4j-api)
9417 ("io" ,java-ops4j-base-io)))
9418 (description "OPS4J stands for Open Participation Software for Java. This
9419 package contains utilities for storing and retrieving data from an
9420 @code{InputStream}.")))
9422 (define-public java-ops4j-base-spi
9424 (inherit java-ops4j-base-lang)
9425 (name "java-ops4j-base-spi")
9427 `(#:jar-name "java-ops4j-base-spi.jar"
9428 #:source-dir "ops4j-base-spi/src/main/java"
9429 #:test-dir "ops4j-base-spi/src/test"))
9431 `(("junit" ,java-junit)
9432 ("hamcrest" ,java-hamcrest-core)))
9433 (description "OPS4J stands for Open Participation Software for Java. This
9434 package contains utilities for obtaining services via the Java SE 6
9435 @code{ServiceLoader}.")))
9437 (define-public java-aqute-bnd-annotation
9439 (name "java-aqute-bnd-annotation")
9443 (uri (string-append "https://github.com/bndtools/bnd/archive/"
9444 version ".REL.tar.gz"))
9445 (file-name (string-append name "-" version ".tar.gz"))
9448 "1ggyiq0as0f6cz333a0dh98j72kmvv5pf2s47v9554yh905lfqdl"))))
9449 (build-system ant-build-system)
9451 `(#:jar-name "java-aqute-bnd-annotation.jar"
9452 #:source-dir "biz.aQute.bnd.annotation/src"
9453 #:tests? #f)); empty test dir
9454 (home-page "https://bnd.bndtools.org/")
9455 (synopsis "Tools for OSGi")
9456 (description "Bnd is a swiss army knife for OSGi, it creates manifest
9457 headers based on analyzing the class code, it verifies the project settings,
9458 it manages project dependencies, gives diffs jars, and much more.")
9459 (license license:asl2.0)))
9461 (define-public java-aqute-libg
9463 (inherit java-aqute-bnd-annotation)
9464 (name "java-aqute-libg")
9466 `(#:jar-name "java-aqute-libg.jar"
9467 ;; The build fails when source/target more recent than 1.7. This
9468 ;; is a known issue. See: https://github.com/bndtools/bnd/issues/1327
9470 ;; It is closed as won't fix. There is no way to change the source
9471 ;; so that it works on 1.8, and still works on 1.6, the upstream
9472 ;; target. It work fine on 1.7, so we use 1.7.
9473 #:make-flags (list "-Dant.build.javac.source=1.7"
9474 "-Dant.build.javac.target=1.7")
9476 (modify-phases %standard-phases
9477 (add-before 'configure 'chdir
9478 ;; Change to aQute.libg directory, so that the relative
9479 ;; paths in the tests aren't broken.
9481 (chdir "aQute.libg")
9483 (add-before 'check 'create-test-directory
9484 ;; Copy the test directory to test/java, since that's where
9485 ;; ant-build-system's default project in build.xml expects to find
9486 ;; the test classes. Leave a copy in the original place to not
9487 ;; break paths in tests.
9490 (copy-recursively "test" "src/test/java")
9493 `(("slf4j" ,java-slf4j-api)
9494 ("osgi-annot" ,java-osgi-annotation)
9495 ("java-osgi-cmpn" ,java-osgi-cmpn)
9496 ("osgi" ,java-osgi-core)))
9498 `(("hamcrest" ,java-hamcrest-core)
9499 ("java-junit" ,java-junit)))))
9501 (define-public java-aqute-bndlib
9503 (inherit java-aqute-bnd-annotation)
9504 (name "java-aqute-bndlib")
9506 `(#:jar-name "java-bndlib.jar"
9507 #:source-dir "biz.aQute.bndlib/src"
9508 #:tests? #f)); no tests
9510 `(("slf4j" ,java-slf4j-api)
9511 ("osgi-annot" ,java-osgi-annotation)
9512 ("java-aqute-libg" ,java-aqute-libg)
9513 ("java-aqute-bnd-annotation" ,java-aqute-bnd-annotation)
9514 ("java-osgi-service-component-annotations" ,java-osgi-service-component-annotations)
9515 ("java-osgi-service-repository" ,java-osgi-service-repository)
9516 ("java-osgi-service-log" ,java-osgi-service-log)
9517 ("java-osgi-service-metatype-annotations" ,java-osgi-service-metatype-annotations)
9518 ("java-osgi-namespace-contract" ,java-osgi-namespace-contract)
9519 ("java-osgi-namespace-extender" ,java-osgi-namespace-extender)
9520 ("java-osgi-namespace-service" ,java-osgi-namespace-service)
9521 ("promise" ,java-osgi-util-promise)
9522 ("osgi" ,java-osgi-core)))))
9524 (define-public java-ops4j-pax-tinybundles
9526 (name "java-ops4j-pax-tinybundles")
9530 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.tinybundles/"
9531 "archive/tinybundles-" version ".tar.gz"))
9534 "0y0gq3pvv0iir2b885lmlwnvr724vv7vklzhhr4fs27d7mdkj871"))))
9536 `(#:jar-name "java-ops4j-pax-tinybundles.jar"
9537 #:source-dir "src/main/java"
9539 ;; Abstract base classes for other tests
9540 (list "**/BndTest.java" "**/CoreTest.java")
9542 (modify-phases %standard-phases
9543 (add-before 'check 'fix-version
9545 ;; This test has a reference to an old version of bndlib we are not
9546 ;; packaging. It uses the version referenced in pom.xml. We replace
9547 ;; it with our own version.
9548 (substitute* "src/test/java/org/ops4j/pax/tinybundles/bnd/BndTest.java"
9549 (("[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*")
9550 ,(package-version java-aqute-bndlib)))
9553 `(("lang" ,java-ops4j-base-lang)
9554 ("io" ,java-ops4j-base-io)
9555 ("store" ,java-ops4j-base-store)
9556 ("slf4j" ,java-slf4j-api)
9557 ("libg" ,java-aqute-libg)
9558 ("bndlib" ,java-aqute-bndlib)))
9560 `(("junit" ,java-junit)
9561 ("hamcrest" ,java-hamcrest-core)
9562 ("log4j" ,java-log4j-api)
9563 ("bndannotation" ,java-aqute-bnd-annotation)
9564 ("framework" ,java-osgi-framework)))
9565 (build-system ant-build-system)
9566 (home-page "https://ops4j1.jira.com/wiki/spaces/ops4j/pages/12060312/Tinybundles")
9567 (synopsis "Java APIs to create OSGi related artifacts")
9568 (description "Tinybundles is all about creating OSGi related artifacts like
9569 Bundles, Fragments and Deployment Packages with Java Api. It is very convenient
9570 to create such artifacts on-the-fly inside Tests (like in Pax Exam). On the
9571 other hand, this library can be a foundation of real end user tools that need
9572 to create those artifacts.")
9573 (license license:asl2.0)))
9575 (define-public java-ops4j-pax-exam-core
9577 (name "java-ops4j-pax-exam-core")
9581 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.exam2/"
9582 "archive/exam-reactor-" version ".tar.gz"))
9585 "08mzw8nkah3rj3vznlplnawspxhp61zgvb44ifqa1rni1cvbms2g"))))
9587 `(#:jar-name "java-ops4j-pax-exam-core.jar"
9588 #:source-dir "core/pax-exam/src/main/java"
9589 #:test-dir "core/pax-exam/src/test"))
9591 `(("slf4j" ,java-slf4j-api)
9592 ("lang" ,java-ops4j-base-lang)
9593 ("io" ,java-ops4j-base-io)
9594 ("util-property" ,java-ops4j-base-util-property)
9595 ("util-store" ,java-ops4j-base-store)
9596 ("java-osgi-core" ,java-osgi-core)))
9598 `(("junit" ,java-junit)
9599 ("hamcrest" ,java-hamcrest-core)))
9600 (build-system ant-build-system)
9601 (home-page "https://ops4j1.jira.com/wiki/spaces/PAXEXAM4/overview")
9602 (synopsis "In-Container Testing for OSGi, Java EE and CDI")
9603 (description "Pax Exam creates OSGi bundles for testing purposes. It lets
9604 the user take control of the OSGi framework, the test framework (e.g. JUnit) and
9605 the system under test at the same time.")
9606 (license license:asl2.0)))
9608 (define-public java-ops4j-pax-exam-core-spi
9610 (inherit java-ops4j-pax-exam-core)
9611 (name "java-ops4j-pax-exam-core-spi")
9613 `(#:jar-name "java-ops4j-pax-exam-spi.jar"
9614 #:source-dir "src/main/java"
9617 ;; Abstract base class, not a test
9618 "**/BaseStagedReactorTest.java"
9619 ;; Depends on org.mortbay.jetty.testwars:test-war-dump
9620 "**/WarBuilderTest.java")
9622 (modify-phases %standard-phases
9623 (add-before 'configure 'chdir
9625 ;; Tests assume we are in this directory
9626 (chdir "core/pax-exam-spi")
9628 (add-before 'check 'fix-tests
9630 ;; One test checks that this file is present.
9631 (mkdir-p "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi")
9632 (with-output-to-file
9633 "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi/pom.properties"
9636 (string-append "artifactId = pax-exam-spi\n"
9637 "version = " ,(package-version java-ops4j-pax-exam-core-spi)))))
9638 ;; Maven puts compilation results in the target directory, while we
9639 ;; put them in the build directory.
9640 (substitute* '("src/test/java/org/ops4j/pax/exam/spi/war/WarBuilderTest.java"
9641 "src/test/java/org/ops4j/pax/exam/spi/war/WarTestProbeBuilderTest.java"
9642 "src/test/java/org/ops4j/pax/exam/spi/war/ZipBuilderTest.java")
9643 (("target") "build"))
9644 ;; One test is expected to fail, but it doesn't throw the expected exception
9645 (substitute* "src/test/java/org/ops4j/pax/exam/spi/reactors/BaseStagedReactorTest.java"
9646 (("AssertionError") "IllegalArgumentException"))
9649 `(("java-ops4j-pax-exam-core" ,java-ops4j-pax-exam-core)
9650 ("lang" ,java-ops4j-base-lang)
9651 ("monitors" ,java-ops4j-base-monitors)
9652 ("store" ,java-ops4j-base-store)
9653 ("io" ,java-ops4j-base-io)
9654 ("spi" ,java-ops4j-base-spi)
9655 ("osgi" ,java-osgi-core)
9656 ("slf4j" ,java-slf4j-api)
9657 ("tinybundles" ,java-ops4j-pax-tinybundles)))
9659 `(("mockito" ,java-mockito-1)
9660 ("junit" ,java-junit)
9661 ("hamcrest" ,java-hamcrest-core)
9662 ("cglib" ,java-cglib)
9663 ("objenesis" ,java-objenesis)
9664 ("asm" ,java-asm)))))
9666 (define-public java-ops4j-pax-exam-core-junit
9668 (inherit java-ops4j-pax-exam-core)
9669 (name "java-ops4j-pax-exam-core-junit")
9671 `(#:jar-name "ops4j-pax-exam-core-junit.jar"
9672 #:source-dir "drivers/pax-exam-junit4/src/main/java"
9673 #:tests? #f)); no tests
9675 `(("junit" ,java-junit)
9676 ("slf4j" ,java-slf4j-api)
9677 ("core" ,java-ops4j-pax-exam-core)
9678 ("spi" ,java-ops4j-pax-exam-core-spi)))
9679 (native-inputs '())))
9681 (define-public java-fasterxml-jackson-annotations
9683 (name "java-fasterxml-jackson-annotations")
9687 (uri (string-append "https://github.com/FasterXML/"
9688 "jackson-annotations/archive/"
9689 "jackson-annotations-" version ".tar.gz"))
9692 "0mr95xd0da6a4g95zvrl1ryk5n5zv2rc696w3xnsr5hxk2gicfc4"))))
9693 (build-system ant-build-system)
9695 `(#:jar-name "jackson-annotations.jar"
9696 #:source-dir "src/main/java"
9697 #:test-dir "src/test"))
9699 `(("junit" ,java-junit)))
9700 (home-page "https://github.com/FasterXML/jackson-annotations")
9701 (synopsis "General purpose annotations for the Jackson Data Processor")
9702 (description "This package contains general purpose annotations for the
9703 Jackson Data Processor, used on value and handler types. The only annotations
9704 not included are ones that require dependency to the Databind package.")
9705 (license license:asl2.0)))
9707 (define-public java-fasterxml-jackson-core
9709 (name "java-fasterxml-jackson-core")
9713 (uri (string-append "https://github.com/FasterXML/"
9714 "jackson-core/archive/"
9715 "jackson-core-" version ".tar.gz"))
9718 "159hsnk17jr1gyzkf01cxvsn45srnk37g949r7364qlsr527gjgd"))))
9719 (build-system ant-build-system)
9721 `(#:jar-name "jackson-core.jar"
9722 #:source-dir "src/main/java"
9723 #:test-dir "src/test"
9726 ;; Expected failure. pom.xml excludes these
9728 ;; Base classes that have no constructor for junit
9730 "**/ConcurrencyReadTest.java"
9731 "**/ManualCharAccessTest.java"
9732 "**/ManualCharAccessTest.java"
9733 "**/TrailingCommasTest.java"
9734 "**/AsyncMissingValuesInObjectTest.java"
9735 "**/AsyncMissingValuesInArrayTest.java")
9737 (modify-phases %standard-phases
9738 (add-before 'configure 'generate-PackageVersion.java
9740 (let* ((out "src/main/java/com/fasterxml/jackson/core/json/PackageVersion.java")
9741 (in (string-append out ".in")))
9744 (("@package@") "com.fasterxml.jackson.core.json")
9745 (("@projectversion@") ,version)
9746 (("@projectgroupid@") "com.fasterxml.jackson.core")
9747 (("@projectartifactid@") "jackson-core")))
9749 (add-before 'build 'copy-resources
9751 (copy-recursively "src/main/resources"
9754 (add-before 'check 'copy-test-resources
9756 (copy-recursively "src/test/resources"
9757 "build/test-classes")
9760 `(("junit" ,java-junit)
9761 ("hamcrest" ,java-hamcrest-core)))
9762 (home-page "https://github.com/FasterXML/jackson-core")
9763 (synopsis "Low-level streaming parser and generator abstractions")
9764 (description "This package contains core low-level incremental
9765 (streaming) parser and generator abstractions used by the Jackson Data
9766 Processor. It also includes the default implementation of handler types
9767 (parser, generator) that handle JSON format.")
9768 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
9770 (define-public java-fasterxml-jackson-databind
9772 (name "java-fasterxml-jackson-databind")
9776 (uri (string-append "https://github.com/FasterXML/"
9777 "jackson-databind/archive/"
9778 "jackson-databind-" version ".tar.gz"))
9781 "1zd2cw4z6kdkbx8za96xh9pyicv2a2l7y0rkcx2fqd8hv6d47s08"))))
9782 (build-system ant-build-system)
9784 `(#:jar-name "jackson-databind.jar"
9785 #:source-dir "src/main/java"
9786 #:tests? #f; requires javax.measures for which I can't find a free implementation
9788 (modify-phases %standard-phases
9789 (add-before 'configure 'generate-PackageVersion.java
9791 (let* ((out "src/main/java/com/fasterxml/jackson/databind/cfg/PackageVersion.java")
9792 (in (string-append out ".in")))
9795 (("@package@") "com.fasterxml.jackson.databind.cfg")
9796 (("@projectversion@") ,version)
9797 (("@projectgroupid@") "com.fasterxml.jackson.databind")
9798 (("@projectartifactid@") "jackson-databind")))
9800 (add-before 'build 'copy-resources
9802 (copy-recursively "src/main/resources" "build/classes")
9805 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
9806 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)))
9807 (home-page "https://github.com/FasterXML/jackson-databind")
9808 (synopsis "Data-binding functionality and tree-model for the Jackson Data Processor")
9809 (description "This package contains the general-purpose data-binding
9810 functionality and tree-model for Jackson Data Processor. It builds on core
9811 streaming parser/generator package, and uses Jackson Annotations for
9813 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
9815 (define-public java-fasterxml-jackson-modules-base-jaxb
9817 (name "java-fasterxml-jackson-modules-base-jaxb")
9821 (uri (string-append "https://github.com/FasterXML/"
9822 "jackson-modules-base/archive/"
9823 "jackson-modules-base-" version ".tar.gz"))
9826 "1wws95xi8sppp6b0k2vvjdjyynl20r1a4dwrhai08lzlria6blp5"))))
9827 (build-system ant-build-system)
9829 `(#:jar-name "jackson-modules-base-jaxb.jar"
9830 #:source-dir "jaxb/src/main/java"
9831 #:test-dir "jaxb/src/test"
9833 ;; Base class for tests
9834 (list "**/BaseJaxbTest.java")
9836 (modify-phases %standard-phases
9837 (add-before 'configure 'generate-PackageVersion.java
9839 (let* ((out (string-append "jaxb/src/main/java/com/fasterxml/"
9840 "jackson/module/jaxb/PackageVersion.java"))
9841 (in (string-append out ".in")))
9844 (("@package@") "com.fasterxml.jackson.module.jaxb")
9845 (("@projectversion@") ,version)
9846 (("@projectgroupid@") "com.fasterxml.jackson.module.jaxb")
9847 (("@projectartifactid@") "jackson-module-jaxb")))
9849 (add-before 'build 'copy-resources
9851 (copy-recursively "jaxb/src/main/resources" "build/classes")
9854 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
9855 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
9856 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)))
9858 `(("java-junit" ,java-junit)))
9859 (home-page "https://github.com/FasterXML/jackson-modules-base")
9860 (synopsis "Jaxb annotations jackson module")
9861 (description "This package is the jaxb annotations module for jackson.")
9862 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
9864 (define-public java-fasterxml-jackson-modules-base-mrbean
9866 (name "java-fasterxml-jackson-modules-base-mrbean")
9870 (uri (string-append "https://github.com/FasterXML/"
9871 "jackson-modules-base/archive/"
9872 "jackson-modules-base-" version ".tar.gz"))
9875 "1wws95xi8sppp6b0k2vvjdjyynl20r1a4dwrhai08lzlria6blp5"))))
9876 (build-system ant-build-system)
9878 `(#:jar-name "jackson-modules-base-mrbean.jar"
9879 #:source-dir "mrbean/src/main/java"
9880 #:test-dir "mrbean/src/test"
9882 ;; Base class for tests
9883 (list "**/BaseTest.java")
9885 (modify-phases %standard-phases
9886 (add-before 'configure 'generate-PackageVersion.java
9888 (let* ((out (string-append "mrbean/src/main/java/com/fasterxml/"
9889 "jackson/module/mrbean/PackageVersion.java"))
9890 (in (string-append out ".in")))
9893 (("@package@") "com.fasterxml.jackson.module.mrbean")
9894 (("@projectversion@") ,version)
9895 (("@projectgroupid@") "com.fasterxml.jackson.module.mrbean")
9896 (("@projectartifactid@") "jackson-module-mrbean")))
9899 `(("java-asm" ,java-asm)
9900 ("java-fasterxml-jackson-annotations"
9901 ,java-fasterxml-jackson-annotations)
9902 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
9903 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)))
9905 `(("java-junit" ,java-junit)))
9906 (home-page "https://github.com/FasterXML/jackson-modules-base")
9907 (synopsis "POJO type materialization for Java")
9908 (description "This package implements POJO type materialization.
9909 Databinders can construct implementation classes for Java interfaces as part
9910 of deserialization.")
9911 (license license:asl2.0)))
9913 (define-public java-snakeyaml
9915 (name "java-snakeyaml")
9919 (uri (string-append "https://bitbucket.org/asomov/snakeyaml/get/v"
9921 (file-name (string-append name "-" version ".tar.gz"))
9924 "0474cqcv46zgv9bhms2vgawakq1vyj0hp3h3f1bfys46msia90bh"))))
9925 (build-system ant-build-system)
9927 `(#:jar-name "java-snakeyaml.jar"
9928 #:source-dir "src/main/java"
9929 ;; Tests require velocity, a cyclic dependency, and
9930 ;; java-spring-framework-context which is not packaged.
9932 (home-page "https://bitbucket.org/asomov/snakeyaml")
9933 (synopsis "YAML processor")
9934 (description "SnakeYAML is a YAML processor for the Java Virtual Machine.")
9935 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
9937 (define-public java-fasterxml-jackson-dataformat-yaml
9939 (name "java-fasterxml-jackson-dataformat-yaml")
9943 (uri (string-append "https://github.com/FasterXML/"
9944 "jackson-dataformats-text/archive/"
9945 "jackson-dataformats-text-" version ".tar.gz"))
9948 "1hikl06khaxbg439avf442qifcadap8w0lx13f0nnhp2vh3dkbz7"))))
9949 (build-system ant-build-system)
9951 `(#:jar-name "jackson-dataformat-yaml.jar"
9952 #:source-dir "yaml/src/main/java"
9953 #:test-dir "yaml/src/test"
9954 #:test-exclude (list "**/failing/**.java")
9956 (modify-phases %standard-phases
9957 (add-before 'configure 'generate-PackageVersion.java
9959 (let* ((out "yaml/src/main/java/com/fasterxml/jackson/dataformat/yaml/PackageVersion.java")
9960 (in (string-append out ".in")))
9963 (("@package@") "com.fasterxml.jackson.dataformat.yaml")
9964 (("@projectversion@") ,version)
9965 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.yaml")
9966 (("@projectartifactid@") "jackson-dataformat-yaml")))
9969 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
9970 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
9971 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)
9972 ("java-snakeyaml" ,java-snakeyaml)))
9974 `(("junit" ,java-junit)
9975 ("hamcrest" ,java-hamcrest-core)
9976 ("java-ops4j-pax-exam-core-spi" ,java-ops4j-pax-exam-core-spi)
9977 ("java-ops4j-pax-exam-core-junit" ,java-ops4j-pax-exam-core-junit)
9978 ("java-ops4j-pax-exam" ,java-ops4j-pax-exam-core)))
9979 (home-page "https://github.com/FasterXML/jackson-dataformats-text")
9980 (synopsis "Yaml backend for Jackson")
9981 (description "Dataformat backends are used to support format alternatives
9982 to JSON, supported by default. This is done by sub-classing Jackson core
9984 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
9986 (define-public java-stax2-api
9988 (name "java-stax2-api")
9992 (uri (string-append "https://github.com/FasterXML/stax2-api/archive/"
9993 "stax2-api-" version ".tar.gz"))
9996 "1amc1si0l0hyyw2sawmnzy4hkna3z6fp195y4nm5m9wb9ld5awkq"))))
9997 (build-system ant-build-system)
9999 `(#:jar-name "java-stax2-api.jar"
10000 #:source-dir "src/main/java"
10001 #:tests? #f)); no tests
10002 (home-page "https://github.com/FasterXML/stax2-api")
10003 (synopsis "Stax2 API")
10004 (description "Stax2 API is an extension to basic Stax 1.0 API that adds
10005 significant new functionalities, such as full-featured bi-direction validation
10006 interface and high-performance Typed Access API.")
10007 (license license:bsd-2)))
10009 (define-public java-woodstox-core
10011 (name "java-woodstox-core")
10015 (uri (git-reference
10016 (url "https://github.com/FasterXML/woodstox")
10017 (commit (string-append "woodstox-core-" version))))
10018 (file-name (git-file-name name version))
10021 "0bfylk24a967hwxprxqbg6cdvm6n4ldcarp54yg980viwvjiglyp"))))
10022 (build-system ant-build-system)
10024 `(#:jar-name "woodstox.jar"
10026 (list "**/Base*.java" "failing/**")
10028 (modify-phases %standard-phases
10029 (add-before 'build 'remove-msv-dep
10031 ;; we don't need osgi, and it depends on msv
10032 (delete-file-recursively "src/main/java/com/ctc/wstx/osgi")
10033 ;; msv's latest release is from 2011 and we don't need it
10034 (delete-file-recursively "src/main/java/com/ctc/wstx/msv")
10035 (delete-file-recursively "src/test/java/wstxtest/osgi")
10036 (delete-file-recursively "src/test/java/wstxtest/msv")
10038 (add-before 'build 'copy-resources
10040 (copy-recursively "src/main/resources" "build/classes")
10043 `(("stax2" ,java-stax2-api)))
10045 `(("junit" ,java-junit)))
10046 (home-page "https://github.com/FasterXML/woodstox")
10047 (synopsis "Stax XML API implementation")
10048 (description "Woodstox is a stax XML API implementation.")
10049 (license license:asl2.0)))
10051 (define-public java-fasterxml-jackson-dataformat-xml
10053 (name "java-fasterxml-jackson-dataformat-xml")
10057 (uri (git-reference
10058 (url "https://github.com/FasterXML/jackson-dataformat-xml")
10059 (commit (string-append "jackson-dataformat-xml-" version))))
10060 (file-name (git-file-name name version))
10063 "0s1wl65mbs57c2hz2v8rnh8i04y5lpyyvnjz562j5j6b83vwwpfx"))))
10064 (build-system ant-build-system)
10066 `(#:jar-name "jackson-dataformat-xml.jar"
10067 #:source-dir "src/main/java"
10069 (list "**/failing/**")
10071 (modify-phases %standard-phases
10072 (add-before 'configure 'generate-PackageVersion.java
10074 (let* ((out "src/main/java/com/fasterxml/jackson/dataformat/xml/PackageVersion.java")
10075 (in (string-append out ".in")))
10079 (("@package@") "com.fasterxml.jackson.dataformat.xml")
10080 (("@projectversion@") ,version)
10081 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.xml")
10082 (("@projectartifactid@") "jackson-dataformat-xml")))
10084 (add-before 'build 'copy-resources
10086 (copy-recursively "src/main/resources" "build/classes")
10089 `(("jackson-annotations" ,java-fasterxml-jackson-annotations)
10090 ("jackson-core" ,java-fasterxml-jackson-core)
10091 ("jackson-modules-base-jaxb" ,java-fasterxml-jackson-modules-base-jaxb)
10092 ("jackson-databind" ,java-fasterxml-jackson-databind)
10093 ("stax2-api" ,java-stax2-api)
10094 ("woodstox" ,java-woodstox-core)))
10096 `(("junit" ,java-junit)
10097 ("hamcrest" ,java-hamcrest-core)))
10098 (home-page "https://github.com/FasterXML/jackson-dataformat-xml")
10099 (synopsis "Read and write XML")
10100 (description "This package contains Jackson extension component for reading
10101 and writing XML encoded data.
10103 Further, the goal is to emulate how JAXB data-binding works with \"Code-first\"
10104 approach (that is, no support is added for \"Schema-first\" approach). Support
10105 for JAXB annotations is provided by JAXB annotation module; this module
10106 provides low-level abstractions (@code{JsonParser}, @code{JsonGenerator},
10107 @code{JsonFactory}) as well as small number of higher level overrides needed to
10108 make data-binding work.")
10109 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
10111 (define-public java-hdrhistogram
10113 (name "java-hdrhistogram")
10117 (uri (git-reference
10118 (url "https://github.com/HdrHistogram/HdrHistogram")
10119 (commit (string-append "HdrHistogram-" version))))
10120 (file-name (git-file-name name version))
10123 "1cw8aa1vk258k42xs6wpy72m4gbai540jq032qsa7c5586iawx2d"))))
10124 (build-system ant-build-system)
10126 `(#:jar-name "java-hdrhistogram.jar"
10127 #:source-dir "src/main/java"
10129 (modify-phases %standard-phases
10130 (add-after 'unpack 'make-files-writable
10132 (for-each make-file-writable (find-files "."))
10134 (add-before 'configure 'set-version
10136 (let* ((version-java "src/main/java/org/HdrHistogram/Version.java")
10137 (template (string-append version-java ".template")))
10138 (copy-file template version-java)
10139 (substitute* version-java
10140 (("\\$VERSION\\$") ,version)
10141 (("\\$BUILD_TIME\\$") "0"))
10144 `(("junit" ,java-junit)
10145 ("hamcrest" ,java-hamcrest-core)))
10146 (home-page "https://hdrhistogram.github.io/HdrHistogram")
10147 (synopsis "High dynamic range histogram")
10148 (description "Hdrhistogram creates histograms that support
10149 recording and analyzing sampled data value counts across a configurable integer
10150 value range with configurable value precision within the range. Value precision
10151 is expressed as the number of significant digits in the value recording, and
10152 provides control over value quantization behavior across the value range and
10153 the subsequent value resolution at any given level.")
10154 (license license:public-domain)))
10156 (define-public java-cofoja
10158 (name "java-cofoja")
10162 (uri (git-reference
10163 (url "https://github.com/nhatminhle/cofoja")
10164 (commit (string-append "v" version))))
10165 (file-name (string-append "java-cofoja-" version "-checkout"))
10168 "0p7sz8y5xgpi5rx1qwn6587fkd52qr3ha3ybh14gqcyxhikl525w"))))
10169 (build-system ant-build-system)
10171 `(#:build-target "dist"
10172 #:test-target "test"
10175 (list "-Ddist.dir=dist")
10176 #:modules ((guix build ant-build-system)
10177 (guix build java-utils)
10182 (modify-phases %standard-phases
10183 ;; The bulid system ignores the class path the ant-build-system sets
10184 ;; up and instead expects to find all dependencies in the "lib"
10186 (add-after 'unpack 'create-libdir
10187 (lambda* (#:key inputs #:allow-other-keys)
10191 (let ((target (string-append "lib/" (basename file))))
10192 (unless (file-exists? target)
10193 (symlink file target))))
10194 (append-map (match-lambda
10196 (find-files dir "\\.jar$")))
10199 (replace 'install (install-jars "dist")))))
10201 `(("java-asm" ,java-asm)))
10203 `(("java-junit" ,java-junit)))
10204 (home-page "https://github.com/nhatminhle/cofoja")
10205 (synopsis "Contracts for Java")
10206 (description "Contracts for Java, or Cofoja for short, is a contract
10207 programming framework and test tool for Java, which uses annotation processing
10208 and bytecode instrumentation to provide run-time checking. (In particular,
10209 this is not a static analysis tool.)")
10210 (license license:lgpl3+)))
10212 (define-public java-aopalliance
10214 (name "java-aopalliance")
10218 ;; Note: this git repository is not official, but contains the
10219 ;; source code that is in the CVS repository. Downloading the
10220 ;; tarball from sourceforge is undeterministic, and the cvs download
10222 (uri (git-reference
10223 (url "https://github.com/hoverruan/aopalliance")
10224 (commit "0d7757ae204e5876f69431421fe9bc2a4f01e8a0")))
10225 (file-name (string-append name "-" version))
10228 "0rsg2b0v3hxlq2yk1i3m2gw3xwq689j3cwx9wbxvqfpdcjbca0qr"))))
10229 (build-system ant-build-system)
10231 `(#:jar-name "java-aopalliance.jar"
10233 #:tests? #f; no tests
10234 #:source-dir "aopalliance/src/main"
10235 #:modules ((guix build ant-build-system)
10237 (guix build maven pom)
10238 (guix build java-utils)
10241 (modify-phases %standard-phases
10242 (add-before 'install 'create-pom
10244 (with-output-to-file "pom.xml"
10248 (modelVersion "4.0.0")
10249 (name "aopalliance")
10250 (groupId "aopalliance")
10251 (artifactId "aopalliance")
10252 (version "1.0"))))))
10255 (install-from-pom "pom.xml")))))
10256 (home-page "http://aopalliance.sourceforge.net")
10257 (synopsis "Aspect-Oriented Programming")
10258 (description "The AOP Alliance project is a joint project between several
10259 software engineering people who are interested in Aspect-Oriented Programming
10261 (license license:public-domain)))
10263 (define-public java-javax-inject
10265 (name "java-javax-inject")
10269 (uri (git-reference
10270 (url "https://github.com/javax-inject/javax-inject")
10272 (file-name (git-file-name name version))
10275 "1rspl0nkvk1jif6nccikw93xic6ljj2b6kpy2mffwi2mnvc13j7x"))))
10276 (build-system ant-build-system)
10278 `(#:jar-name "java-javax-inject.jar"
10279 #:tests? #f; no tests
10281 (modify-phases %standard-phases
10283 (install-from-pom "pom.xml")))))
10284 (home-page "https://github.com/javax-inject/javax-inject")
10285 (synopsis "JSR-330: Dependency Injection for Java")
10286 (description "This package specifies a means for obtaining objects in such
10287 a way as to maximize reusability, testability and maintainability compared to
10288 traditional approaches such as constructors, factories, and service locators
10289 (e.g., JNDI). This process, known as dependency injection, is beneficial to
10290 most nontrivial applications.
10292 Many types depend on other types. For example, a @var{Stopwatch} might depend
10293 on a @var{TimeSource}. The types on which a type depends are known as its
10294 dependencies. The process of finding an instance of a dependency to use at run
10295 time is known as resolving the dependency. If no such instance can be found,
10296 the dependency is said to be unsatisfied, and the application is broken.")
10297 (license license:asl2.0)))
10299 (define-public java-guice
10301 (name "java-guice")
10305 (uri (git-reference
10306 (url "https://github.com/google/guice")
10308 (file-name (git-file-name name version))
10309 (modules '((guix build utils)))
10312 (for-each delete-file (find-files "." ".*.jar")) #t))
10315 "18im5hdfl4q1b9chww2s1ii60sn3ydyyar32a2sf2p2g8zlbdswq"))))
10316 (build-system ant-build-system)
10318 `(#:jar-name "java-guice.jar"
10320 #:tests? #f; FIXME: tests are not in a java sub directory
10321 #:source-dir "core/src"
10323 (modify-phases %standard-phases
10324 (add-after 'unpack 'make-files-writable
10326 (for-each make-file-writable (find-files "."))
10329 (install-from-pom "core/pom.xml")))))
10331 `(("java-aopalliance" ,java-aopalliance)
10332 ("java-asm" ,java-asm)
10333 ("java-cglib" ,java-cglib)
10334 ("java-guava" ,java-guava)
10335 ("java-javax-inject" ,java-javax-inject)
10336 ("java-guice-parent-pom" ,java-guice-parent-pom)))
10337 (home-page "https://github.com/google/guice")
10338 (synopsis "Lightweight dependency injection framework")
10339 (description "Guice is a lightweight dependency injection framework for
10340 Java 6 and above.")
10341 (license license:asl2.0)))
10343 (define-public java-guice-servlet
10345 (inherit java-guice)
10346 (name "java-guice-servlet")
10348 `(#:jar-name "guice-servlet.jar"
10349 #:source-dir "extensions/servlet/src/"
10351 #:tests? #f ; FIXME: not in a java subdir
10353 (modify-phases %standard-phases
10354 (add-after 'unpack 'make-files-writable
10356 (for-each make-file-writable (find-files "."))
10359 `(("guice" ,java-guice)
10360 ("servlet" ,java-classpathx-servletapi)
10361 ,@(package-inputs java-guice)))))
10363 (define java-guice-parent-pom
10365 (inherit java-guice)
10366 (name "java-guice-parent-pom")
10370 (modify-phases %standard-phases
10371 (delete 'configure)
10373 (add-after 'install 'install-extensions
10374 (install-pom-file "extensions/pom.xml"))
10376 (install-pom-file "pom.xml")))))
10378 `(("java-google-parent-pom" ,java-google-parent-pom-5)))))
10380 (define java-google-parent-pom-5
10382 (name "java-google-parent-pom")
10386 (uri (git-reference
10387 (url "https://github.com/google/google-maven-parents")
10388 (commit (string-append "google-" version))))
10389 (file-name (git-file-name name version))
10392 "0zb7hx24p8k8rfdvix2vsbfqn73jhrycdndvhf8j5gbii9wbqibv"))))
10393 (build-system ant-build-system)
10397 (modify-phases %standard-phases
10398 (delete 'configure)
10401 (install-pom-file "pom.xml")))))
10402 (home-page "https://github.com/google/google-maven-parents")
10403 (synopsis "Google parent pom")
10404 (description "This package contains the Maven parent POM for other Google
10406 (license license:asl2.0)))
10408 (define-public java-assertj
10410 (name "java-assertj")
10414 (uri (git-reference
10415 (url "https://github.com/joel-costigliola/assertj-core")
10416 (commit (string-append "assertj-core-" version))))
10417 (file-name (git-file-name name version))
10420 "1k35cg2in7pzk4pbdjryr0pll5lgk1r6ngrn0j8cdlgi7w8zh2d1"))))
10421 (build-system ant-build-system)
10423 `(#:jar-name "java-assertj.jar"
10425 #:source-dir "src/main/java"
10426 #:tests? #f)); depends on tng-junit which depends on assertj
10428 `(("cglib" ,java-cglib)
10429 ("junit" ,java-junit)
10430 ("hamcrest" ,java-hamcrest-core)))
10432 `(("mockito" ,java-mockito-1)))
10433 (home-page "https://joel-costigliola.github.io/assertj/index.html")
10434 (synopsis "Fluent assertions for java")
10435 (description "AssertJ core is a Java library that provides a fluent
10436 interface for writing assertions. Its main goal is to improve test code
10437 readability and make maintenance of tests easier.")
10438 (license license:asl2.0)))
10440 (define-public java-jboss-javassist
10442 (name "java-jboss-javassist")
10446 (uri (git-reference
10447 (url "https://github.com/jboss-javassist/javassist")
10449 (string-append "rel_"
10451 (lambda (x) (if (eq? x #\.) #\_ x)) version)
10453 (file-name (git-file-name name version))
10456 "0h3zlcyqiaq01fspm69h7vki67raw305w89p4ha8vlhpzw02qifm"))
10457 (modules '((guix build utils)))
10460 (delete-file "javassist.jar")))))
10461 (build-system ant-build-system)
10463 `(#:jar-name "java-jboss-javassist.jar"
10465 #:source-dir "src/main"
10466 #:tests? #f; FIXME: requires junit-awtui and junit-swingui from junit3
10468 (modify-phases %standard-phases
10469 (add-after 'unpack 'make-files-writable
10471 (for-each make-file-writable (find-files "."))
10474 `(("junit" ,java-junit)))
10475 (home-page "https://github.com/jboss-javassist/javassist")
10476 (synopsis "Java bytecode engineering toolkit")
10477 (description "Javassist (JAVA programming ASSISTant) makes Java bytecode
10478 manipulation simple. It is a class library for editing bytecodes in Java; it
10479 enables Java programs to define a new class at runtime and to modify a class
10480 file when the JVM loads it.")
10481 (license (list license:gpl2 license:cddl1.0)))); either gpl2 only or cddl.
10483 (define-public java-jcommander
10485 (name "java-jcommander")
10489 (uri (git-reference
10490 (url "https://github.com/cbeust/jcommander")
10492 (file-name (git-file-name name version))
10495 "12vcpc19sd7jhvjgp7xz1qjanfix162xb3x2q5zah93rjklj1h57"))))
10496 (build-system ant-build-system)
10498 `(#:jar-name "java-jcommander.jar"
10500 #:tests? #f; requires testng which depends on jcommander
10501 #:source-dir "src/main/java"))
10502 (home-page "https://jcommander.org")
10503 (synopsis "Command line parameters parser")
10504 (description "JCommander is a very small Java framework that makes it
10505 trivial to parse command line parameters. Parameters are declared with
10507 (license license:asl2.0)))
10509 (define-public java-bsh
10515 (uri (git-reference
10516 (url "https://github.com/beanshell/beanshell")
10518 (file-name (git-file-name name version))
10521 "0kz3f0xjack6c9syssi4qjw1rbd3q5963sk5pmr143hiibxa9csw"))
10522 (modules '((guix build utils)))
10525 ;; Delete bundled third-party jar archives.
10526 (for-each delete-file (find-files "." ".*.jar$"))
10527 (for-each (lambda (file) (chmod file #o644))
10528 (find-files "." "."))
10530 (build-system ant-build-system)
10532 `(#:build-target "jarall"
10533 #:test-target "junit-tests-all"
10534 #:make-flags (list "-DDATE" "(no date for reproducibility)")
10536 (modify-phases %standard-phases
10537 (add-before 'install 'fix-pom
10539 (substitute* "pom.xml"
10540 (("org.apache-extras.beanshell") "org.beanshell"))
10543 (install-from-pom "pom.xml")))))
10545 `(("java-classpathx-servletapi" ,java-classpathx-servletapi)
10546 ("java-commons-bsf" ,java-commons-bsf)))
10548 `(("java-junit" ,java-junit)
10549 ("javacc" ,javacc-3)))
10550 (home-page "http://beanshell.org/")
10551 (synopsis "Lightweight Scripting for Java")
10552 (description "BeanShell is a small, free, embeddable Java source
10553 interpreter with object scripting language features, written in Java.
10554 BeanShell dynamically executes standard Java syntax and extends it with common
10555 scripting conveniences such as loose types, commands, and method closures like
10556 those in Perl and JavaScript.")
10557 (license license:asl2.0)))
10559 (define-public java-fest-util
10561 (name "java-fest-util")
10565 (uri (git-reference
10566 (url "https://github.com/alexruiz/fest-util/")
10567 (commit (string-append "fest-util-" version))))
10568 (file-name (git-file-name name version))
10571 "02kgal7v85snyyvcsxvn4qphid455f4smh2wri1il8d9asw0djbz"))))
10572 (build-system ant-build-system)
10574 `(#:jar-name "java-fest-util.jar"
10575 #:source-dir "src/main/java"))
10577 `(("junit" ,java-junit)
10578 ("hamcrest" ,java-hamcrest-core)))
10579 (home-page "https://github.com/alexruiz/fest-util")
10580 (synopsis "FEST common utilities")
10581 (description "Common utilities used in all FEST module.")
10582 (license license:asl2.0)))
10584 (define-public java-fest-test
10586 (name "java-fest-test")
10590 (uri (git-reference
10591 (url "https://github.com/alexruiz/fest-test/")
10592 (commit (string-append "fest-test-" version))))
10593 (file-name (git-file-name name version))
10596 "0mg1d2jfh7kbx2c40dchbjr6d8pv59snsyb13mfxsr7xk5n69qbn"))))
10597 (build-system ant-build-system)
10599 `(#:jar-name "java-fest-test.jar"
10600 #:source-dir "src/main/java"
10601 #:tests? #f)); no tests
10603 `(("junit" ,java-junit)))
10604 (home-page "https://github.com/alexruiz/fest-test")
10605 (synopsis "Common FEST testing infrastructure")
10606 (description "Fest-test contains the common FEST testing infrastructure.")
10607 (license license:asl2.0)))
10609 (define-public java-fest-assert
10611 (name "java-fest-assert")
10615 (uri (git-reference
10616 (url "https://github.com/alexruiz/fest-assert-2.x/")
10617 (commit (string-append "fest-assert-core-" version))))
10618 (file-name (git-file-name name version))
10621 "1cp8zzyag3s85fz2w68sda9zzaal1y5f9wl8g72wkm12an40w6by"))))
10622 (build-system ant-build-system)
10624 `(#:jar-name "java-fest-assert.jar"
10625 #:source-dir "src/main/java"
10628 "**/Abstract*.java"
10629 "**/*BaseTest.java"
10630 ;; Unable to set MockitoNamingPolicy on cglib generator which creates FastClasses
10631 "**/MessageFormatter_format_Test.java"
10632 "**/internal/*/*_assert*_Test.java")))
10634 `(("java-fest-util" ,java-fest-util)))
10636 `(("java-junit" ,java-junit)
10637 ("java-fest-test" ,java-fest-test)
10638 ("java-hamcrest-core" ,java-hamcrest-core)
10639 ("java-mockito" ,java-mockito-1)
10640 ("java-cglib" ,java-cglib)
10641 ("java-objenesis" ,java-objenesis)
10642 ("java-asm" ,java-asm)))
10643 (home-page "https://github.com/alexruiz/fest-assert-2.x")
10644 (synopsis "FEST fluent assertions")
10645 (description "FEST-Assert provides a fluent interface for assertions.")
10646 (license license:asl2.0)))
10648 (define-public java-testng
10650 (name "java-testng")
10654 (uri (git-reference
10655 (url "https://github.com/cbeust/testng")
10657 (file-name (string-append name "-" version "-checkout"))
10660 "0y6vq30i5g276kw0v2bhbvci22ijg7ax49ap2611yqlhbs4d6dqv"))))
10661 (build-system ant-build-system)
10663 `(#:jdk ,icedtea-8; java.util.function
10664 #:jar-name "java-testng.jar"
10665 #:source-dir "src/main/java"
10667 (modify-phases %standard-phases
10668 ;; FIXME: I don't know why these tests fail
10669 (add-after 'unpack 'delete-failing-tests
10671 (substitute* "src/test/resources/testng.xml"
10672 (("<class name=\"test.configuration.github1625.TestRunnerIssue1625\"/>") "")
10673 (("<class name=\"test.serviceloader.ServiceLoaderTest\" />") ""))
10675 ;; We don't have groovy
10676 (add-after 'unpack 'delete-groovy-tests
10678 (delete-file-recursively "src/test/java/test/dependent/issue1648/")
10679 (substitute* "src/test/resources/testng.xml"
10680 (("<class name=\"test.dependent.issue1648.TestRunner\"/>") ""))
10682 (add-before 'build 'copy-resources
10684 (copy-recursively "src/main/resources" "build/classes")
10686 (add-before 'check 'copy-test-resources
10688 (copy-recursively "src/test/resources" "build/test-classes")
10692 (invoke "ant" "compile-tests")
10693 ;; we don't have groovy
10694 (substitute* "src/test/resources/testng.xml"
10695 (("<class name=\"test.groovy.GroovyTest\" />") ""))
10696 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
10698 ":build/test-classes")
10699 "-Dtest.resources.dir=src/test/resources"
10700 "org.testng.TestNG" "src/test/resources/testng.xml"))))))
10702 `(("junit" ,java-junit)
10703 ("java-jsr305" ,java-jsr305)
10704 ("java-bsh" ,java-bsh)
10705 ("java-jcommander" ,java-jcommander)
10706 ("java-guice" ,java-guice)
10707 ("snakeyaml" ,java-snakeyaml)))
10709 `(("guava" ,java-guava)
10710 ("java-javax-inject" ,java-javax-inject)
10711 ("java-hamcrest" ,java-hamcrest-all)
10712 ("java-assertj" ,java-assertj)
10713 ("java-mockito" ,java-mockito-1)
10714 ("cglib" ,java-cglib)
10716 ("aopalliance" ,java-aopalliance)))
10717 (home-page "https://testng.org")
10718 (synopsis "Testing framework")
10719 (description "TestNG is a testing framework inspired from JUnit and NUnit
10720 but introducing some new functionalities that make it more powerful and easier
10722 (license license:asl2.0)))
10724 (define-public java-jnacl
10725 (let ((commit "094e819afdd63ea81a499b3bcb42a271006bebd9")
10728 (name "java-jnacl")
10729 (version (string-append "0.1.0-" revision "." (string-take commit 7)))
10732 (uri (git-reference
10733 (url "https://github.com/neilalexander/jnacl")
10735 (file-name (git-file-name name version))
10738 "1d6g6xhn83byv5943n7935wwjsk0ibk0qdvqgr699qqgqqmwisbb"))))
10739 (build-system ant-build-system)
10741 `(#:jar-name "jnacl.jar"
10742 #:source-dir "src/main/java"
10745 (modify-phases %standard-phases
10746 (add-before 'build 'fix-tests
10748 (substitute* '("src/test/java/com/neilalexander/jnacl/NaClTest.java"
10749 "src/test/java/com/neilalexander/jnacl/NaclSecretBoxTest.java")
10750 (("assertions.Assertions") "assertions.api.Assertions"))
10754 (invoke "ant" "compile-tests")
10755 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
10757 ":build/test-classes")
10758 "org.testng.TestNG" "-testclass"
10759 "build/test-classes/com/neilalexander/jnacl/NaclSecretBoxTest.class")
10760 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
10762 ":build/test-classes")
10763 "org.testng.TestNG" "-testclass"
10764 "build/test-classes/com/neilalexander/jnacl/NaClTest.class"))))))
10766 `(("java-testng" ,java-testng)
10767 ("java-fest-util" ,java-fest-util)
10768 ("java-fest-assert" ,java-fest-assert)))
10769 (home-page "https://github.com/neilalexander/jnacl")
10770 (synopsis "Java implementation of NaCl")
10771 (description "Pure Java implementation of the NaCl: Networking and
10772 Cryptography library.")
10773 (license license:bsd-2))))
10775 (define-public java-mvel2
10777 (name "java-mvel2")
10781 (uri (string-append "https://github.com/mvel/mvel/archive/mvel2-"
10782 version ".Final.tar.gz"))
10785 "01ph5s9gm16l2qz58lg21w6fna7xmmrj7f9bzqr1jim7h9557d3z"))))
10786 (build-system ant-build-system)
10788 `(#:jar-name "mvel2.jar"
10789 #:source-dir "src/main/java"
10791 (list "**/Abstract*.java"
10792 ;; Base class with no tests
10793 "**/MVELThreadTest.java")
10795 (modify-phases %standard-phases
10796 (add-after 'install 'install-bin
10797 (lambda* (#:key outputs #:allow-other-keys)
10798 (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
10800 (with-output-to-file (string-append bin "/mvel2")
10804 "#!" (which "bash") "\n"
10805 "if [ \"$#\" -ne \"2\" ]; then\n"
10806 "echo 'Usage: mvel2 <script> <out.dir>'\n"
10809 "java -Dout.dir=$2 -cp " (getenv "CLASSPATH")
10810 ":" (assoc-ref outputs "out") "/share/java/mvel2.jar"
10811 " org.mvel2.sh.Main $1"))))
10812 (chmod (string-append bin "/mvel2") #o755))
10815 `(("junit" ,java-junit)
10816 ("hamcrest" ,java-hamcrest-core)))
10817 (home-page "https://github.com/mvel/mvel")
10818 (synopsis "MVFLEX Expression Language")
10819 (description "MVEL has largely been inspired by Java syntax, but has some
10820 fundamental differences aimed at making it more efficient as an expression
10821 language, such as operators that directly support collection, array and string
10822 matching, as well as regular expressions. MVEL is used to evaluate expressions
10823 written using Java syntax.
10825 In addition to the expression language, MVEL serves as a templating language for
10826 configuration and string construction.")
10827 (license license:asl2.0)))
10829 (define-public java-commons-jexl-2
10831 (name "java-commons-jexl")
10835 (uri (string-append "mirror://apache/commons/jexl/source/"
10836 "commons-jexl-" version "-src.tar.gz"))
10839 "1ai7632bwwaxglb0nbpblpr2jw5g20afrsaq372ipkphi3ncy1jz"))))
10840 (build-system ant-build-system)
10842 `(#:jar-name "commons-jexl-2.jar"
10844 #:source-dir "src/main/java"
10846 (modify-phases %standard-phases
10847 (add-before 'check 'disable-broken-tests
10848 (lambda* (#:key inputs #:allow-other-keys)
10849 (with-directory-excursion "src/test/java/org/apache/commons/jexl2/"
10850 (substitute* "ArithmeticTest.java"
10851 (("asserter.assertExpression\\(\"3 / 0\"") "//")
10852 (("asserter.assertExpression\\(\"imanull") "//"))
10853 ;; This test fails with "ambiguous method invocation"
10854 (delete-file "CacheTest.java")
10855 ;; This test doesn't have access to the temp directory
10856 (substitute* "ClassCreatorTest.java"
10857 (("java.io.tmpdir") "user.dir"))
10858 ;; This test fails in trying to detect whether it can run.
10859 (substitute* "ClassCreator.java"
10860 (("boolean canRun =.*") "boolean canRun = false;\n"))
10861 ;; ...and these tests depend on it.
10862 (delete-file "scripting/JexlScriptEngineOptionalTest.java")
10863 (delete-file "scripting/JexlScriptEngineTest.java"))
10865 (add-before 'build 'run-javacc
10867 (with-directory-excursion "src/main/java/org/apache/commons/jexl2/parser/"
10868 (invoke "java" "jjtree" "Parser.jjt")
10869 (invoke "java" "javacc" "Parser.jj"))
10872 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)))
10874 `(("java-junit" ,java-junit)
10875 ("java-hamcrest-core" ,java-hamcrest-core)
10876 ("javacc" ,javacc-4)))
10877 (home-page "https://commons.apache.org/proper/commons-jexl/")
10878 (synopsis "Java Expression Language ")
10879 (description "JEXL is a library intended to facilitate the implementation
10880 of dynamic and scripting features in applications and frameworks written in
10881 Java. JEXL implements an Expression Language based on some extensions to the
10882 JSTL Expression Language supporting most of the constructs seen in
10883 shell-script or ECMAScript. Its goal is to expose scripting features usable
10884 by technical operatives or consultants working with enterprise platforms.")
10885 (license license:asl2.0)))
10887 (define-public java-lz4
10893 (uri (git-reference
10894 (url "https://github.com/lz4/lz4-java")
10896 (file-name (git-file-name name version))
10899 "0ydjakhv3cz34mfvv14qrh2ksdxifgjwwagjy7r46qr3f68hnf6y"))))
10900 (build-system ant-build-system)
10902 `(#:jar-name "lz4.jar"
10904 #:source-dir "src/java:src/java-unsafe"
10905 #:tests? #f; FIXME: requires more dependencies
10907 (modify-phases %standard-phases
10908 (add-after 'unpack 'make-files-writable
10910 (for-each make-file-writable (find-files "."))
10912 (add-before 'configure 'generate-source
10914 (with-directory-excursion "src/build/source_templates"
10915 (invoke "mvel2" "../gen_sources.mvel" "../../java"))
10918 `(("mvel" ,java-mvel2)))
10919 (home-page "https://jpountz.github.io/lz4-java")
10920 (synopsis "Compression algorithm")
10921 (description "LZ4 - Java is a Java port of the popular lz4 compression
10922 algorithms and xxHash hashing algorithm.")
10923 (license license:asl2.0)))
10925 (define-public java-bouncycastle
10927 (name "java-bouncycastle")
10931 (uri (git-reference
10932 (url "http://git.bouncycastle.org/repositories/bc-java")
10933 ;(url "https://github.com/bcgit/bc-java")
10934 (commit (string-append "r1rv" (substring version 2 4)))))
10935 (file-name (git-file-name name version))
10938 "1449q7fyh03s1q0bqljcrhgacwcyqmg2bbvb3z084avgapwsainz"))
10939 (modules '((guix build utils)))
10942 (for-each delete-file
10943 (find-files "." "\\.jar$"))
10945 (build-system ant-build-system)
10950 (modify-phases %standard-phases
10953 (invoke "ant" "-f" "ant/jdk15+.xml" "build-provider")
10954 (invoke "ant" "-f" "ant/jdk15+.xml" "build")))
10955 ;; FIXME: the tests freeze.
10958 ;; (invoke "ant" "-f" "ant/jdk15+.xml" "test")))
10960 (install-jars "build/artifacts/jdk1.5/jars")))))
10962 `(("java-javax-mail" ,java-javax-mail)))
10965 ("junit" ,java-junit)
10966 ("java-native-access" ,java-native-access)
10967 ("java-native-access-platform" ,java-native-access-platform)))
10968 (home-page "https://www.bouncycastle.org")
10969 (synopsis "Cryptographic library")
10970 (description "Bouncy Castle is a cryptographic library for the Java
10971 programming language.")
10972 (license license:expat)))
10974 (define-public java-lmax-disruptor
10976 (name "java-lmax-disruptor")
10980 (uri (string-append "https://github.com/LMAX-Exchange/disruptor/"
10981 "archive/" version ".tar.gz"))
10982 (file-name (string-append name "-" version ".tar.gz"))
10985 "17da2gwj5abnlsfgn2xqjk5lgzbg4vkb0hdv2dvc8r2fx4bi7w3g"))))
10986 (build-system ant-build-system)
10988 `(#:jar-name "java-lmax-disruptor.jar"
10990 #:tests? #f)); tests hang
10992 `(("junit" ,java-junit)
10993 ("java-hdrhistogram" ,java-hdrhistogram)
10994 ("java-jmock" ,java-jmock)
10995 ("java-jmock-legacy" ,java-jmock-legacy)
10996 ("java-jmock-junit4" ,java-jmock-junit4)
10997 ("java-hamcrest-all" ,java-hamcrest-all)))
10999 `(("cglib" ,java-cglib)
11000 ("objenesis" ,java-objenesis)
11001 ("asm" ,java-asm)))
11002 (home-page "https://www.lmax.com/disruptor")
11003 (synopsis "High performance inter-thread communication")
11004 (description "LMAX Disruptor is a software pattern and software component
11005 for high performance inter-thread communication that avoids the need for
11006 message queues or resource locking.")
11007 (license license:asl2.0)))
11009 (define-public java-commons-bcel
11011 (name "java-commons-bcel")
11015 (uri (string-append "mirror://apache/commons/bcel/source/bcel-"
11016 version "-src.tar.gz"))
11019 "0j3x1rxd673k07psclk8k13rqh0x0mf2yy5qiwkiw4z3afa568jy"))))
11020 (build-system ant-build-system)
11022 `(#:jar-name "bcel.jar"
11024 #:source-dir "src/main/java"
11025 #:test-dir "src/test/java"
11026 ;; FIXME: Tests require the unpackaged jna.
11028 (home-page "https://commons.apache.org/proper/commons-bcel/")
11029 (synopsis "Byte code engineering library")
11030 (description "The Byte Code Engineering Library (Apache Commons BCEL) is
11031 intended to give users a convenient way to analyze, create, and
11032 manipulate (binary) Java class files. Classes are represented by objects
11033 which contain all the symbolic information of the given class: methods, fields
11034 and byte code instructions, in particular.
11036 Such objects can be read from an existing file, be transformed by a
11037 program (e.g. a class loader at run-time) and written to a file again. An
11038 even more interesting application is the creation of classes from scratch at
11039 run-time. The @dfn{Byte Code Engineering Library} (BCEL) may be also useful
11040 if you want to learn about the @dfn{Java Virtual Machine} (JVM) and the format
11041 of Java @code{.class} files.")
11042 (license license:asl2.0)))
11044 (define-public java-xerial-core
11046 (name "java-xerial-core")
11050 (uri (string-append "https://github.com/xerial/xerial-java/archive/"
11051 version ".tar.gz"))
11052 (file-name (string-append name "-" version ".tar.gz"))
11055 "0d3g863i41bgalpa4xr3vm1h140l091n8iwgq5qvby5yivns9y8d"))))
11056 (build-system ant-build-system)
11058 `(#:jar-name "xerial-core.jar"
11059 #:source-dir "xerial-core/src/main/java"
11060 #:test-dir "xerial-core/src/test"
11062 (modify-phases %standard-phases
11063 (add-before 'build 'copy-resources
11065 (copy-recursively "xerial-core/src/main/resources"
11069 `(("junit" ,java-junit)
11070 ("hamcrest" ,java-hamcrest-core)))
11071 (home-page "https://github.com/xerial/xerial-java")
11072 (synopsis "Data management libraries for Java")
11073 (description "Xerial is a set of data management libraries for the Java
11074 programming language. The ultimate goal of the Xerial project is to manage
11075 everything as database, including class objects, text format data, data
11077 (license license:asl2.0)))
11079 (define-public java-powermock-reflect
11081 (name "java-powermock-reflect")
11085 (uri (string-append "https://github.com/powermock/powermock/"
11086 "archive/powermock-" version ".tar.gz"))
11087 (file-name (string-append name "-" version ".tar.gz"))
11090 "0sbgi5vqq7k72wzcdjb20s370vyd4hsbnx71pzb8ishml3gy7fwy"))
11092 (search-patches "java-powermock-fix-java-files.patch"))))
11093 (build-system ant-build-system)
11095 `(#:jar-name "java-powermock-reflect.jar"
11097 #:source-dir "powermock-reflect/src/main/java"
11098 #:test-dir "powermock-reflect/src/test"))
11100 `(("java-objenesis" ,java-objenesis)))
11102 `(("junit" ,java-junit)
11103 ("cglib" ,java-cglib)
11105 ("hamcrest" ,java-hamcrest-core)
11106 ("assertj" ,java-assertj)))
11107 (home-page "https://github.com/powermock/powermock")
11108 (synopsis "Mock library extension framework")
11109 (description "PowerMock is a framework that extends other mock libraries
11110 such as EasyMock with more powerful capabilities. PowerMock uses a custom
11111 classloader and bytecode manipulation to enable mocking of static methods,
11112 constructors, final classes and methods, private methods, removal of static
11113 initializers and more. By using a custom classloader no changes need to be
11114 done to the IDE or continuous integration servers which simplifies adoption.")
11115 (license license:asl2.0)))
11117 (define-public java-powermock-core
11119 (inherit java-powermock-reflect)
11120 (name "java-powermock-core")
11122 `(#:jar-name "java-powermock-core.jar"
11123 #:source-dir "powermock-core/src/main/java"
11124 #:test-dir "powermock-core/src/test"
11125 #:tests? #f; requires powermock-api
11128 (modify-phases %standard-phases
11129 (add-before 'build 'copy-resources
11131 (copy-recursively "powermock-core/src/main/resources"
11135 `(("reflect" ,java-powermock-reflect)
11136 ("javassist" ,java-jboss-javassist)))
11138 `(("junit" ,java-junit)
11139 ("assertj" ,java-assertj)
11140 ("mockito" ,java-mockito-1)))))
11142 (define-public java-powermock-api-support
11144 (inherit java-powermock-reflect)
11145 (name "java-powermock-api-support")
11146 (build-system ant-build-system)
11148 `(#:jar-name "java-powermock-api-support.jar"
11150 #:source-dir "powermock-api/powermock-api-support/src/main/java"
11151 #:tests? #f)); no tests
11153 `(("core" ,java-powermock-core)
11154 ("reflect" ,java-powermock-reflect)))))
11156 (define-public java-powermock-modules-junit4-common
11158 (inherit java-powermock-reflect)
11159 (name "java-powermock-modules-junit4-common")
11160 (build-system ant-build-system)
11162 `(#:jar-name "java-powermock-modules-junit4-common.jar"
11164 #:source-dir "powermock-modules/powermock-module-junit4-common/src/main/java"
11165 #:test-dir "powermock-modules/powermock-module-junit4-common/src/test"))
11167 `(("core" ,java-powermock-core)
11168 ("easymock" ,java-easymock)
11169 ("reflect" ,java-powermock-reflect)
11170 ("hamcrest" ,java-hamcrest-core)
11171 ("cglib" ,java-cglib)))))
11173 (define-public java-powermock-modules-junit4
11175 (inherit java-powermock-reflect)
11176 (name "java-powermock-modules-junit4")
11177 (build-system ant-build-system)
11179 `(#:jar-name "java-powermock-modules-junit4.jar"
11181 #:source-dir "powermock-modules/powermock-module-junit4/src/main/java"
11182 #:test-dir "powermock-modules/powermock-module-junit4/src/test"
11184 (modify-phases %standard-phases
11185 (add-before 'build 'fix-junit-detection
11187 ;; Our junit version is 4.12-SNAPSHOT
11188 (substitute* (find-files "powermock-modules/powermock-module-junit4"
11189 "PowerMockJUnit4MethodValidator.java")
11190 (("4.12") "4.12-SNAPSHOT"))
11193 `(("core" ,java-powermock-core)
11194 ("reflect" ,java-powermock-reflect)
11195 ("common" ,java-powermock-modules-junit4-common)
11196 ("cglib" ,java-cglib)))
11198 `(("easymock" ,java-easymock)
11199 ("hamcrest" ,java-hamcrest-core)
11200 ("objenesis" ,java-objenesis)
11202 ("junit" ,java-junit)))))
11204 (define-public java-powermock-api-easymock
11206 (inherit java-powermock-reflect)
11207 (name "java-powermock-api-easymock")
11208 (build-system ant-build-system)
11210 `(#:jar-name "java-powermock-api-easymock.jar"
11212 #:source-dir "powermock-api/powermock-api-easymock/src/main/java"
11213 #:tests? #f; no tests
11215 (modify-phases %standard-phases
11216 (add-before 'build 'fix-file
11218 ;; FIXME: This looks wrong, but it fixes a build error.
11219 (with-directory-excursion "powermock-api/powermock-api-easymock"
11220 (substitute* "src/main/java/org/powermock/api/easymock/PowerMock.java"
11221 (("classLoader instanceof MockClassLoader") "false")
11222 (("\\(\\(MockClassLoader\\) classLoader\\).*;") ";")))
11225 `(("core" ,java-powermock-core)
11226 ("easymock" ,java-easymock)
11227 ("reflect" ,java-powermock-reflect)
11228 ("support" ,java-powermock-api-support)
11229 ("cglib" ,java-cglib)))))
11231 (define-public java-jboss-jms-api-spec
11233 (name "java-jboss-jms-api-spec")
11237 (uri (string-append "https://github.com/jboss/jboss-jms-api_spec/"
11238 "archive/jboss-jms-api_" version
11239 "_spec-1.0.1.Final.tar.gz"))
11242 "07bqblw9kq2i8q92bz70fvavq5xjfkaixl8xa0m0cypjgy82rb7m"))))
11243 (build-system ant-build-system)
11245 `(#:jar-name "java-jboss-jms-api_spec.jar"
11248 #:tests? #f)); no tests
11249 (home-page "https://github.com/jboss/jboss-jms-api_spec")
11250 (synopsis "Java Message Service API specification")
11251 (description "Java Message Service (JMS) API is used to send messages
11252 messages between two or more clients. It is a messaging standard that allows
11253 application components to create, send, receive, and read messages.")
11254 ; either gpl2 only with GPL Classpath Exception, or cddl.
11255 (license (list license:gpl2 license:cddl1.0))))
11257 (define-public java-mail
11263 (uri (string-append "https://github.com/javaee/javamail/archive/"
11264 "JAVAMAIL-1_6_0.tar.gz"))
11267 "1b4rg7fpj50ld90a71iz2m4gm3f5cnw18p3q3rbrrryjip46kx92"))))
11268 (build-system ant-build-system)
11270 `(#:jar-name "java-mail.jar"
11272 #:source-dir "mail/src/main/java"
11273 #:test-dir "mail/src/test"
11275 (list "**/CollectorFormatterTest.java"
11276 "**/CompactFormatterTest.java"
11277 "**/DurationFilterTest.java"
11278 "**/MailHandlerTest.java"
11279 "**/GetLocalAddressTest.java"
11280 ;; FIXME: both end with:
11281 ;; java.lang.ClassNotFoundException:
11282 ;; javax.mail.internet.MimeMultipartParseTest
11283 "**/MimeMultipartParseTest.java"
11284 "**/SearchTermSerializationTest.java")
11286 (modify-phases %standard-phases
11287 (add-before 'configure 'move-version.java
11289 (copy-file "mail/src/main/resources/javax/mail/Version.java"
11290 "mail/src/main/java/javax/mail/Version.java")
11292 (add-before 'build 'copy-resources
11294 (copy-recursively "mail/src/main/resources/META-INF"
11295 "build/classes/META-INF")
11298 `(("junit" ,java-junit)
11299 ("hamcrest" ,java-hamcrest-core)))
11300 (home-page "https://javaee.github.io/javamail/")
11301 (synopsis "Mail-related functionality in Java")
11302 (description "The JavaMail API provides a platform-independent and
11303 protocol-independent framework to build mail and messaging applications.")
11304 ;; General Public License Version 2 only ("GPL") or the Common Development
11305 ;; and Distribution License("CDDL")
11306 (license (list license:cddl1.1
11307 license:gpl2)))); with classpath exception
11309 (define-public java-jeromq
11311 (name "java-jeromq")
11315 (uri (git-reference
11316 (url "https://github.com/zeromq/jeromq")
11317 (commit (string-append "v" version))))
11318 (file-name (string-append name "-" version "-checkout"))
11321 "1gxkp7lv2ahymgrqdw94ncq54bmp4m4sw5m1x9gkp7l5bxn0xsyj"))
11322 (patches (search-patches "java-jeromq-fix-tests.patch"))))
11323 (build-system ant-build-system)
11325 `(#:jar-name "java-jeromq.jar"
11326 #:source-dir "src/main/java"
11330 "**/Abstract*.java"
11331 ;; Requires network
11332 "**/ZBeaconTest.java"
11334 "**/DealerSpecTest.java"
11335 "**/CustomDecoderTest.java"
11336 "**/CustomEncoderTest.java"
11337 "**/ConnectRidTest.java"
11338 "**/ReqSpecTest.java"
11339 "**/PushPullSpecTest.java"
11340 "**/PubSubHwmTest.java"
11341 "**/RouterSpecTest.java"
11342 "**/ProxyTest.java")))
11344 `(("java-jnacl" ,java-jnacl)))
11346 `(("java-hamcrest-core" ,java-hamcrest-core)
11347 ("junit" ,java-junit)))
11348 (home-page "http://zeromq.org/bindings:java")
11349 (synopsis "Java binding for 0MQ")
11350 (description "Jeromq provides the java bindings for 0MQ.")
11351 (license license:mpl2.0)))
11353 (define-public java-kafka-clients
11355 (name "java-kafka-clients")
11359 (uri (string-append "mirror://apache/kafka/" version "/kafka-"
11360 version "-src.tgz"))
11363 "1yxmnsmliwm7671q5yy9bl4jdqyyn00n26cggz9brwczx80w1vfq"))))
11364 (build-system ant-build-system)
11366 `(#:jar-name "java-kafka-clients.jar"
11368 #:source-dir "clients/src/main/java"
11369 #:test-dir "clients/src/test"
11372 ;; This file does not contain a class
11373 "**/IntegrationTest.java"
11374 ;; Requires network
11375 "**/ClientUtilsTest.java"
11376 ;; End with errors that seem related to our powermock
11377 "**/KafkaProducerTest.java"
11378 "**/BufferPoolTest.java")))
11380 `(("java-slf4j-api" ,java-slf4j-api)
11381 ("java-lz4" ,java-lz4)))
11383 `(("junit" ,java-junit)
11384 ("hamcrest" ,java-hamcrest-all)
11385 ("objenesis" ,java-objenesis)
11387 ("cglib" ,java-cglib)
11388 ("javassist" ,java-jboss-javassist)
11389 ("snappy" ,java-snappy)
11390 ("easymock" ,java-easymock)
11391 ("powermock" ,java-powermock-core)
11392 ("powermock-easymock" ,java-powermock-api-easymock)
11393 ("powermock-junit4-common" ,java-powermock-modules-junit4-common)
11394 ("powermock-junit4" ,java-powermock-modules-junit4)
11395 ("powermock-support" ,java-powermock-api-support)
11396 ("java-bouncycastle" ,java-bouncycastle)))
11397 (home-page "https://kafka.apache.org")
11398 (synopsis "Distributed streaming platform")
11399 (description "Kafka is a distributed streaming platform, which means:
11401 @item it can publish and subscribe to streams of records;
11402 @item it can store streams of records in a fault-tolerant way;
11403 @item it can process streams of records as they occur.
11405 ;; Either cddl or gpl2 only.
11406 (license (list license:cddl1.1; actually cddl1.1
11407 license:gpl2)))); with classpath exception
11409 (define-public java-jdom
11415 (uri (string-append "http://jdom.org/dist/binary/archive/jdom-"
11416 version ".tar.gz"))
11419 "07wdpm3jwwc9q38kmdw40fvbmv6jzjrkrf8m0zqs58f79a672wfl"))))
11420 (build-system ant-build-system)
11422 `(#:build-target "package"
11423 #:tests? #f; tests are run as part of the build process
11425 (modify-phases %standard-phases
11427 (install-jars "build")))))
11428 (home-page "http://jdom.org/")
11429 (synopsis "Access, manipulate, and output XML data")
11430 (description "Java-based solution for accessing, manipulating, and
11431 outputting XML data from Java code.")
11432 (license license:bsd-4)))
11434 (define-public java-geronimo-xbean-reflect
11436 (name "java-geronimo-xbean-reflect")
11440 (uri (svn-reference
11441 (url "https://svn.apache.org/repos/asf/geronimo/xbean/tags/xbean-4.5/")
11442 (revision 1807396)))
11443 (file-name (string-append name "-" version))
11446 "18q3i6jgm6rkw8aysfgihgywrdc5nvijrwnslmi3ww497jvri6ja"))))
11447 (build-system ant-build-system)
11449 `(#:jar-name "geronimo-xbean-reflect.jar"
11450 #:source-dir "xbean-reflect/src/main/java"
11451 #:test-dir "xbean-reflect/src/test"
11454 (list "**/Abstract*.java" "**/AsmParameterNameLoaderTest.java"
11455 "**/ObjectRecipeTest.java" "**/ParameterNameLoaderTest.java"
11456 "**/RecipeHelperTest.java" "**/XbeanAsmParameterNameLoaderTest.java")
11458 (modify-phases %standard-phases
11459 (add-before 'build 'fix-source
11461 (let ((dir "xbean-reflect/src/main/java/org/apache/xbean/recipe/"))
11462 ;; org.apache.xbean.asm6 is actually repackaged java-asm
11463 (substitute* (string-append dir "XbeanAsmParameterNameLoader.java")
11464 (("org.apache.xbean.asm5") "org.objectweb.asm"))
11466 (replace 'install (install-from-pom "xbean-reflect/pom.xml")))))
11468 `(("asm" ,java-asm)
11469 ("log4j" ,java-log4j-api)
11470 ("log4j-1.2" ,java-log4j-1.2-api)
11471 ("log4j-core" ,java-log4j-core)
11472 ("logging" ,java-commons-logging-minimal)))
11474 `(("java-geronimo-parent-pom" ,java-geronimo-parent-pom)))
11476 `(("junit" ,java-junit)))
11477 (home-page "https://geronimo.apache.org/maven/xbean/3.6/xbean-reflect/")
11478 (synopsis "Dependency injection helper")
11479 (description "Xbean-reflect provides very flexible ways to create objects
11480 and graphs of objects for dependency injection frameworks")
11481 (license license:asl2.0)))
11483 (define java-geronimo-genesis-2.1
11485 (name "java-geronimo-genesis")
11489 (uri (svn-reference
11490 (url (string-append "https://svn.apache.org/repos/asf/"
11491 "geronimo/genesis/tags/genesis-"
11493 (revision 1807396)))
11494 (file-name (string-append name "-" version "-source"))
11497 "119yn795jvnjf52si84q192s8wag1k013iabg78b7wnadssnnh31"))))
11498 (build-system ant-build-system)
11502 (modify-phases %standard-phases
11503 (delete 'configure)
11506 (install-pom-file "pom.xml"))
11507 (add-after 'install 'install-enforcer-rules
11508 (install-pom-file "genesis-enforcer-rules/pom.xml"))
11509 (add-after 'install 'install-flava
11510 (install-pom-file "genesis-default-flava/pom.xml"))
11511 (add-after 'install 'install-packaging
11512 (install-pom-file "genesis-packaging/pom.xml"))
11513 (add-after 'install-flava 'install-flava-java4
11514 (install-pom-file "genesis-default-flava/genesis-java1.4-flava/pom.xml"))
11515 (add-after 'install-flava 'install-flava-java5
11516 (install-pom-file "genesis-default-flava/genesis-java5-flava/pom.xml"))
11517 (add-after 'install-flava 'install-flava-java6
11518 (install-pom-file "genesis-default-flava/genesis-java6-flava/pom.xml")))))
11520 `(("apache-parent-pom" ,apache-parent-pom-13)))
11521 (home-page "https://geronimo.apache.org")
11522 (synopsis "Collection of maven POM files for the Geronimo project")
11523 (description "Apache Geronimo is a server runtime. This package contains
11524 only pom files used by other components in the Geronimo project.")
11525 (license license:asl2.0)))
11527 (define java-geronimo-parent-pom
11529 (inherit java-geronimo-xbean-reflect)
11530 (name "java-geronimo-parent-pom")
11534 (modify-phases %standard-phases
11535 (delete 'configure)
11538 (install-pom-file "pom.xml")))))
11540 `(("java-geronimo-genesis" ,java-geronimo-genesis-2.1)))))
11542 (define-public java-geronimo-xbean-bundleutils
11544 (inherit java-geronimo-xbean-reflect)
11545 (name "java-geronimo-xbean-bundleutils")
11547 `(#:jar-name "geronimo-xbean-bundleutils.jar"
11548 #:source-dir "xbean-bundleutils/src/main/java"
11549 #:test-dir "xbean-bundleutils/src/test"
11551 (modify-phases %standard-phases
11552 (add-before 'build 'fix-java
11554 ;; We use a more recent version of osgi, so this file requires
11555 ;; more interface method implementations.
11556 (substitute* "xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/DelegatingBundleContext.java"
11557 (("import org.osgi.framework.ServiceRegistration;")
11558 "import org.osgi.framework.ServiceRegistration;
11559 import org.osgi.framework.ServiceFactory;
11560 import java.util.Collection;
11561 import org.osgi.framework.ServiceObjects;")
11562 (("public Bundle getBundle\\(\\)")
11564 public <S> ServiceObjects<S> getServiceObjects(ServiceReference<S> reference) {
11565 throw new UnsupportedOperationException();
11568 public <S> ServiceRegistration<S> registerService(Class<S> clazz,
11569 ServiceFactory<S> factory, Dictionary<String, ?> properties) {
11570 throw new UnsupportedOperationException();
11572 public Bundle getBundle()"))
11575 `(("java-slf4j" ,java-slf4j-api)
11576 ("java-asm" ,java-asm)
11577 ("java-osgi-framework" ,java-osgi-framework)
11578 ("java-eclipse-osgi" ,java-eclipse-osgi)
11579 ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin)))))
11581 (define-public java-geronimo-xbean-asm-util
11583 (inherit java-geronimo-xbean-reflect)
11584 (name "java-geronimo-xbean-asm-util")
11586 `(#:jar-name "geronimo-xbean-asm-util.jar"
11587 #:source-dir "xbean-asm-util/src/main/java"
11588 #:tests? #f)); no tests
11590 `(("java-asm" ,java-asm)))
11591 (native-inputs '())))
11593 (define-public java-geronimo-xbean-finder
11595 (inherit java-geronimo-xbean-reflect)
11596 (name "java-geronimo-xbean-finder")
11598 `(#:jar-name "geronimo-xbean-finder.jar"
11599 #:source-dir "xbean-finder/src/main/java"
11600 #:test-dir "xbean-finder/src/test"))
11602 `(("java-slf4j-api" ,java-slf4j-api)
11603 ("java-asm" ,java-asm)
11604 ("java-geronimo-xbean-bundleutils" ,java-geronimo-xbean-bundleutils)
11605 ("java-geronimo-xbean-asm-util" ,java-geronimo-xbean-asm-util)
11606 ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin)
11607 ("java-osgi-framework" ,java-osgi-framework)))
11609 `(("java-junit" ,java-junit)
11610 ("java-hamcrest-core" ,java-hamcrest-core)))))
11612 (define-public java-gson
11618 (uri (string-append "https://github.com/google/gson/archive/"
11619 "gson-parent-" version ".tar.gz"))
11622 "1j4qnp7v046q0k48c4kyf69sxaasx2h949d3cqwsm3kzxms3x0f9"))))
11623 (build-system ant-build-system)
11625 `(#:jar-name "gson.jar"
11626 #:source-dir "gson/src/main/java"
11627 #:test-dir "gson/src/test"))
11629 `(("java-junit" ,java-junit)
11630 ("java-hamcrest-core" ,java-hamcrest-core)))
11631 (home-page "https://github.com/google/gson")
11632 (synopsis "Java serialization/deserialization library from/to JSON")
11633 (description "Gson is a Java library that can be used to convert Java
11634 Objects into their JSON representation. It can also be used to convert a JSON
11635 string to an equivalent Java object. Gson can work with arbitrary Java objects
11636 including pre-existing objects that you do not have source-code of.")
11637 (license license:asl2.0)))
11639 (define-public java-hawtjni
11641 (name "java-hawtjni")
11645 (uri (string-append "https://github.com/fusesource/hawtjni/archive/"
11646 "hawtjni-project-" version ".tar.gz"))
11649 "1bqfd732rmh6svyx17fpw9175gc9gzkcbyps2yyrf50c3zzjas6g"))))
11650 (build-system ant-build-system)
11652 `(#:jar-name "hawtjni.jar"
11653 #:source-dir "hawtjni-generator/src/main/java:hawtjni-runtime/src/main/java"
11654 #:tests? #f; no tests
11656 (modify-phases %standard-phases
11657 (add-before 'build 'build-native
11658 (lambda* (#:key inputs #:allow-other-keys)
11659 (let ((include (string-append "-I" (assoc-ref inputs "jdk") "/include/linux")))
11660 (with-directory-excursion "hawtjni-generator/src/main/resources/"
11661 (invoke "gcc" "-c" "hawtjni.c" "-o" "hawtjni.o"
11662 "-fPIC" "-O2" include)
11663 (invoke "gcc" "-c" "hawtjni-callback.c" "-o" "hawtjni-callback.o"
11664 "-fPIC" "-O2" include)
11665 (invoke "gcc" "-o" "libhawtjni.so" "-shared"
11666 "hawtjni.o" "hawtjni-callback.o")))
11668 (add-after 'install 'install-native
11669 (lambda* (#:key outputs #:allow-other-keys)
11670 (let* ((out (assoc-ref outputs "out"))
11671 (lib (string-append out "/lib"))
11672 (inc (string-append out "/include")))
11673 (with-directory-excursion "hawtjni-generator/src/main/resources/"
11674 (install-file "libhawtjni.so" lib)
11675 (install-file "hawtjni.h" inc)))
11677 (add-before 'install 'install-parent
11678 (install-pom-file "pom.xml"))
11680 (install-from-pom "hawtjni-runtime/pom.xml")))))
11682 `(("java-commons-cli" ,java-commons-cli)
11683 ("java-asm" ,java-asm)
11684 ("java-geronimo-xbean-finder" ,java-geronimo-xbean-finder)))
11685 (home-page "https://fusesource.github.io/hawtjni/")
11686 (synopsis "JNI code generator")
11687 (description "HawtJNI is a code generator that produces the JNI code needed
11688 to implement Java native methods. It is based on the jnigen code generator
11689 that is part of the SWT Tools project.")
11690 (license license:asl2.0)))
11692 (define-public java-jansi-native
11694 (name "java-jansi-native")
11698 (uri (string-append "https://github.com/fusesource/jansi-native/"
11699 "archive/jansi-native-" version ".tar.gz"))
11702 "0j2ydlgxbzbgshqkwghbxxxnbnx1mmjgd6k5fw6xfvxw1z956yqf"))))
11703 (build-system ant-build-system)
11705 `(#:jar-name "jansi-native.jar"
11706 #:source-dir "src/main/java"
11707 #:tests? #f; no tests
11709 (modify-phases %standard-phases
11710 (add-before 'build 'build-native
11711 (lambda* (#:key inputs #:allow-other-keys)
11712 ;; there are more required files for windows in windows/
11713 (with-directory-excursion "src/main/native-package/src"
11714 (substitute* "jansi_ttyname.c"
11715 (("#include \"jansi_.*") ""))
11716 (invoke "gcc" "-c" "jansi_ttyname.c" "-o" "jansi_ttyname.o"
11717 (string-append "-I" (assoc-ref inputs "java-hawtjni")
11719 (string-append "-I" (assoc-ref inputs "jdk")
11722 (invoke "gcc" "-o" "libjansi.so" "-shared" "jansi_ttyname.o"))))
11723 (add-before 'build 'install-native
11725 (let ((dir (string-append "build/classes/META-INF/native/"
11726 ,(match (%current-system)
11727 ((or "i686-linux" "armhf-linux")
11729 ((or "x86_64-linux" "aarch64-linux"
11732 (_ "unknown-kernel")))))
11733 (install-file "src/main/native-package/src/libjansi.so" dir))
11735 (add-after 'install 'install-native
11736 (lambda* (#:key outputs #:allow-other-keys)
11737 (install-file "src/main/native-package/src/jansi.h"
11738 (string-append (assoc-ref outputs "out") "/include"))
11740 (add-before 'install 'fix-pom
11742 ;; pom contains variables to complete name, but we don't support that
11743 (substitute* "pom.xml"
11744 (("\\$\\{platform\\}") "native"))
11747 (install-from-pom "pom.xml")))))
11749 `(("java-hawtjni" ,java-hawtjni)))
11750 (home-page "https://fusesource.github.io/jansi/")
11751 (synopsis "Native library for jansi")
11752 (description "This package provides the native library for jansi, a small
11753 Java library that allows you to use ANSI escape sequences to format your
11755 (license license:asl2.0)))
11757 (define-public java-jansi
11759 (name "java-jansi")
11763 (uri (string-append "https://github.com/fusesource/jansi/archive/"
11764 "jansi-project-" version ".tar.gz"))
11767 "11kh3144i3fzp21dpy8zg52mjmsr214k7km9p8ly0rqk2px0qq2z"))))
11768 (build-system ant-build-system)
11770 `(#:jar-name "jansi.jar"
11771 #:source-dir "jansi/src/main/java"
11772 #:test-dir "jansi/src/test"
11774 (modify-phases %standard-phases
11775 (add-after 'check 'clear-term
11777 (invoke "echo" "-e" "\\e[0m")))
11778 (add-before 'install 'install-parent
11779 (install-pom-file "pom.xml"))
11780 (add-before 'install 'fix-pom
11782 ;; pom adds jansi native versions for different platforms, but we
11783 ;; only need one, so use native instead
11784 (substitute* "jansi/pom.xml"
11785 (("windows32") "native")
11786 (("windows64") "native")
11788 (("linux32") "native")
11789 (("linux64") "native")
11790 (("freebsd32") "native")
11791 (("freebsd64") "native"))
11794 (install-from-pom "jansi/pom.xml")))))
11796 `(("java-jansi-native" ,java-jansi-native)))
11798 `(("java-junit" ,java-junit)
11799 ("java-hamcrest-core" ,java-hamcrest-core)))
11800 (home-page "https://fusesource.github.io/jansi/")
11801 (synopsis "Portable ANSI escape sequences")
11802 (description "Jansi is a Java library that allows you to use ANSI escape
11803 sequences to format your console output which works on every platform.")
11804 (license license:asl2.0)))
11806 (define-public java-jboss-el-api-spec
11808 (name "java-jboss-el-api-spec")
11812 (uri (string-append "https://github.com/jboss/jboss-el-api_spec/"
11813 "archive/jboss-el-api_" version
11814 "_spec-1.0.7.Final.tar.gz"))
11817 "1j45ljxalwlibxl7g7iv952sjxkw275m8vyxxij8l6wdd5pf0pdh"))))
11818 (build-system ant-build-system)
11820 `(#:jar-name "java-jboss-el-api_spec.jar"
11821 #:modules ((guix build ant-build-system)
11823 (guix build maven pom)
11824 (guix build java-utils)
11827 (modify-phases %standard-phases
11828 ;; the origin of javax.el:javax.el-api is unknown, so we use this package
11829 ;; instead, which implements the same thing. We override the pom file
11830 ;; to "rename" the package so it can be found by maven.
11831 (add-before 'install 'override-pom
11833 (delete-file "pom.xml")
11834 (with-output-to-file "pom.xml"
11838 (modelVersion "4.0.0")
11840 (groupId "javax.el")
11841 (artifactId "javax.el-api")
11842 (version "3.0")))))
11845 (install-from-pom "pom.xml")))))
11847 `(("java-junit" ,java-junit)))
11848 (home-page "https://github.com/jboss/jboss-el-api_spec")
11849 (synopsis "JSR-341 expression language 3.0 API")
11850 (description "This package contains an implementation of the JSR-341
11851 specification for the expression language 3.0. It implements an expression
11852 language inspired by ECMAScript and XPath. This language is used with
11853 JavaServer Pages (JSP).")
11854 ;; Either GPL2 only or CDDL.
11855 (license (list license:gpl2 license:cddl1.1))))
11857 (define-public java-jboss-interceptors-api-spec
11859 (name "java-jboss-interceptors-api-spec")
11863 (uri (string-append "https://github.com/jboss/jboss-interceptors-api_spec/"
11864 "archive/jboss-interceptors-api_" version
11865 "_spec-1.0.0.Final.tar.gz"))
11868 "0wv8x0jp9a5qxlrgkhb5jdk2gr6vi87b4j4kjb8ryxiy9gn8g51z"))))
11869 (build-system ant-build-system)
11871 `(#:jar-name "java-jboss-interceptors-api_spec.jar"
11874 #:tests? #f; no tests
11875 #:modules ((guix build ant-build-system)
11877 (guix build maven pom)
11878 (guix build java-utils)
11881 (modify-phases %standard-phases
11882 ;; the origin of javax.interceptor:javax.interceptor-api is unknown,
11883 ;; so we use this package instead, which implements the same thing.
11884 ;; We override the pom file to "rename" the package so it can be found
11886 (add-before 'install 'override-pom
11888 (delete-file "pom.xml")
11889 (with-output-to-file "pom.xml"
11893 (modelVersion "4.0.0")
11894 (name "interceptor-api")
11895 (groupId "javax.interceptor")
11896 (artifactId "javax.interceptor-api")
11897 (version "3.0")))))
11900 (install-from-pom "pom.xml")))))
11901 (home-page "https://github.com/jboss/jboss-interceptors-api_spec")
11902 (synopsis "Interceptors 1.2 API classes from JSR 318")
11903 (description "Java-jboss-interceptors-api-spec implements the Interceptors
11904 API. Interceptors are used to interpose on business method invocations and
11906 ;; Either GPL2 only or CDDL.
11907 (license (list license:gpl2 license:cddl1.1))))
11909 (define-public java-cdi-api
11911 (name "java-cdi-api")
11915 (uri (string-append "https://github.com/cdi-spec/cdi/archive/"
11916 version ".tar.gz"))
11917 (file-name (string-append name "-" version ".tar.gz"))
11920 "1iv8b8bp07c5kmqic14jsr868vycjv4qv02lf3pkgp9z21mnfg5y"))))
11921 (build-system ant-build-system)
11923 `(#:source-dir "api/src/main/java"
11924 #:jar-name "java-cdi-api.jar"
11925 #:test-dir "api/src/test"
11927 #:tests? #f; Tests fail because we don't have a CDI provider yet
11929 (modify-phases %standard-phases
11931 (install-from-pom "api/pom.xml")))))
11933 `(("java-javax-inject" ,java-javax-inject)
11934 ("java-jboss-el-api-spec" ,java-jboss-el-api-spec)
11935 ("java-jboss-interceptors-api-spec" ,java-jboss-interceptors-api-spec)
11936 ("java-weld-parent-pom" ,java-weld-parent-pom)))
11938 `(("java-testng" ,java-testng)
11939 ("java-hamcrest-core" ,java-hamcrest-core)))
11940 (home-page "http://cdi-spec.org/")
11941 (synopsis "Contexts and Dependency Injection APIs")
11942 (description "Java-cdi-api contains the required APIs for Contexts and
11943 Dependency Injection (CDI).")
11944 (license license:asl2.0)))
11946 (define-public java-joda-convert
11948 (name "java-joda-convert")
11952 (uri (string-append "https://github.com/JodaOrg/joda-convert/archive/v"
11953 version ".tar.gz"))
11954 (file-name (string-append name "-" version ".tar.gz"))
11957 "0vp346xz7dh9br4q7xazhc7hvzf76a6hf95fki9bg67q5jr0kjh7"))))
11958 (build-system ant-build-system)
11960 `(#:jar-name (string-append ,name "-" ,version ".jar")
11961 #:source-dir "src/main/java"
11962 #:test-include (list "**/Test*.java")
11963 ;; Contains only interfaces and base classes (no test)
11964 #:test-exclude (list "**/test*/**.java")))
11966 `(("java-guava" ,java-guava)))
11968 `(("java-junit" ,java-junit)
11969 ("java-hamcrest-core" ,java-hamcrest-core)))
11970 (home-page "https://www.joda.org/joda-convert/")
11971 (synopsis "Conversion between Objects and Strings")
11972 (description "Joda-Convert provides a small set of classes to aid
11973 conversion between Objects and Strings. It is not intended to tackle the
11974 wider problem of Object to Object transformation.")
11975 (license license:asl2.0)))
11977 (define-public java-joda-time
11979 (name "java-joda-time")
11983 (uri (string-append "https://github.com/JodaOrg/joda-time/archive/v"
11984 version ".tar.gz"))
11985 (file-name (string-append name "-" version ".tar.gz"))
11988 "1i9x91mi7yg2pasl0k3912f1pg46n37sps6rdb0v1gs8hj9ppwc1"))))
11989 (build-system ant-build-system)
11991 `(#:jar-name "java-joda-time.jar"
11992 #:source-dir "src/main/java"
11993 #:test-include (list "**/Test*.java")
11994 ;; There is no runnable test in these files
11995 #:test-exclude (list "**/Test*Chronology.java" "**/Test*Field.java")
11997 (modify-phases %standard-phases
11998 (add-after 'build 'build-resources
12000 (mkdir-p "build/classes/org/joda/time/tz/data")
12001 (mkdir-p "build/classes/org/joda/time/format")
12002 ;; This will produce the following exception:
12003 ;; java.io.IOException: Resource not found: "org/joda/time/tz/data/ZoneInfoMap"
12004 ;; which is normal, because it doesn't exist yet. It still generates
12005 ;; the same file as in the binary one can find on maven.
12006 (invoke "java" "-cp"
12007 (string-append "build/classes:" (getenv "CLASSPATH"))
12008 "org.joda.time.tz.ZoneInfoCompiler"
12009 "-src" "src/main/java/org/joda/time/tz/src"
12010 "-dst" "build/classes/org/joda/time/tz/data"
12011 "africa" "antarctica" "asia" "australasia"
12012 "europe" "northamerica" "southamerica"
12013 "pacificnew" "etcetera" "backward" "systemv")
12014 (for-each (lambda (f)
12015 (copy-file f (string-append
12016 "build/classes/org/joda/time/format/"
12018 (find-files "src/main/java/org/joda/time/format" ".*.properties"))
12020 (add-before 'install 'regenerate-jar
12022 ;; We need to regenerate the jar file to add generated data.
12023 (delete-file "build/jar/java-joda-time.jar")
12024 (invoke "ant" "jar")))
12025 (add-before 'check 'copy-test-resources
12027 (mkdir-p "build/test-classes/org/joda/time/tz/data")
12028 (copy-file "src/test/resources/tzdata/ZoneInfoMap"
12029 "build/test-classes/org/joda/time/tz/data/ZoneInfoMap")
12030 (copy-recursively "src/test/resources" "build/test-classes")
12033 `(("java-joda-convert" ,java-joda-convert)))
12035 `(("java-junit" ,java-junit)
12036 ("java-hamcrest-core" ,java-hamcrest-core)
12037 ("tzdata" ,tzdata)))
12038 (home-page "https://www.joda.org/joda-time/")
12039 (synopsis "Replacement for the Java date and time classes")
12040 (description "Joda-Time is a replacement for the Java date and time
12041 classes prior to Java SE 8.")
12042 (license license:asl2.0)))
12044 (define-public java-xerces
12046 (name "java-xerces")
12051 (uri (string-append "mirror://apache/xerces/j/source/"
12052 "Xerces-J-src." version ".tar.gz"))
12054 (base32 "0494kq36gw3nah19ifb720vwxbpg4ww0k6m3zq6wyanw6a083p6s"))
12055 (patches (search-patches
12056 "java-xerces-xjavac_taskdef.patch"
12057 "java-xerces-build_dont_unzip.patch"
12058 "java-xerces-bootclasspath.patch"))))
12059 (build-system ant-build-system)
12061 `(#:tests? #f;; Test files are not present
12062 #:test-target "test"
12065 (modify-phases %standard-phases
12066 (add-after 'unpack 'create-build.properties
12067 (lambda* (#:key inputs #:allow-other-keys)
12068 (let ((jaxp (assoc-ref inputs "java-jaxp"))
12069 (resolver (assoc-ref inputs "java-apache-xml-commons-resolver")))
12070 (with-output-to-file "build.properties"
12073 "jar.jaxp = ~a/share/java/jaxp.jar~@
12074 jar.apis-ext = ~a/share/java/jaxp.jar~@
12075 jar.resolver = ~a/share/java/xml-resolver.jar~%"
12076 jaxp jaxp resolver)))
12077 ;; Make xerces use our version of jaxp in tests
12078 (substitute* "build.xml"
12080 (string-append jaxp "/share/java/jaxp.jar"))
12081 (("\\$\\{tools.dir\\}/\\$\\{jar.apis\\}")
12084 (replace 'install (install-jars "build")))))
12086 `(("java-apache-xml-commons-resolver" ,java-apache-xml-commons-resolver)
12087 ("java-jaxp" ,java-jaxp)))
12088 (home-page "https://xerces.apache.org/xerces2-j/")
12089 (synopsis "Validating XML parser for Java with DOM level 3 support")
12090 (description "The Xerces2 Java parser is the reference implementation of
12091 XNI, the Xerces Native Interface, and also a fully conforming XML Schema
12094 Xerces2-J supports the following standards and APIs:
12097 @item eXtensible Markup Language (XML) 1.0 Second Edition Recommendation
12098 @item Namespaces in XML Recommendation
12099 @item Document Object Model (DOM) Level 2 Core, Events, and Traversal and
12100 Range Recommendations
12101 @item Simple API for XML (SAX) 2.0.1 Core and Extension
12102 @item Java APIs for XML Processing (JAXP) 1.2.01
12103 @item XML Schema 1.0 Structures and Datatypes Recommendations
12104 @item Experimental implementation of the Document Object Model (DOM) Level 3
12105 Core and Load/Save Working Drafts
12106 @item Provides a partial implementation of the XML Inclusions (XInclude) W3C
12107 Candidate Recommendation
12110 Xerces is now able to parse documents written according to the XML 1.1
12111 Candidate Recommendation, except that it does not yet provide an option to
12112 enable normalization checking as described in section 2.13 of this
12113 specification. It also handles namespaces according to the XML Namespaces 1.1
12114 Candidate Recommendation, and will correctly serialize XML 1.1 documents if
12115 the DOM level 3 load/save API's are in use.")
12116 (license license:asl2.0)))
12118 (define-public java-jakarta-regexp
12120 (name "java-jakarta-regexp")
12125 (uri (string-append
12126 "https://archive.apache.org/dist/jakarta/regexp/jakarta-regexp-"
12127 version ".tar.gz"))
12130 "0zg9rmyif48dck0cv6ynpxv23mmcsx265am1fnnxss7brgw0ms3r"))))
12131 (build-system ant-build-system)
12133 `(#:test-target "test"
12135 (modify-phases %standard-phases
12137 (lambda* (#:key outputs #:allow-other-keys)
12138 (let* ((out (assoc-ref outputs "out"))
12139 (out-share (string-append out "/share/java")))
12140 (mkdir-p out-share)
12141 (for-each (lambda (name)
12142 (install-file name out-share))
12143 (find-files "build" "^jakarta-regexp-.*\\.jar$"))
12145 (home-page "https://attic.apache.org/projects/jakarta-regexp.html")
12146 (synopsis "Regular expression parser generator for Java.")
12147 (description "@code{jakarta-regexp} is an old regular expression parser
12148 generator for Java.")
12149 (license license:asl2.0)))
12151 (define-public java-jline
12153 (name "java-jline")
12157 (uri (string-append "https://github.com/jline/jline1/archive/jline-"
12158 version ".tar.gz"))
12161 "0bi3p6vrh7a6v0fbpb6rx9plpmx5zk3lr352xzdbz2jcxg499wir"))))
12162 (build-system ant-build-system)
12164 `(#:jar-name "jline.jar"
12165 #:source-dir "src/main/java"
12166 #:test-dir "src/test"
12168 (modify-phases %standard-phases
12169 (add-before 'build 'copy-resources
12171 (copy-recursively "src/main/resources" "build/classes")
12174 `(("java-junit" ,java-junit)))
12175 (home-page "https://jline.github.io")
12176 (synopsis "Console input handling library")
12177 (description "JLine is a Java library for handling console input. It is
12178 similar in functionality to BSD editline and GNU readline but with additional
12179 features that bring it on par with the Z shell line editor.")
12180 (license license:bsd-3)))
12182 (define-public java-jline-2
12184 (inherit java-jline)
12188 (uri (string-append "https://github.com/jline/jline2/archive/jline-"
12189 version ".tar.gz"))
12192 "1c6qa26mf0viw8hg4jnv72s7i1qb1gh1l8rrzcdvqhqhx82rkdlf"))))
12195 ,@(package-arguments java-jline)))
12197 `(("java-jansi" ,java-jansi)
12198 ("java-jansi-native" ,java-jansi-native)))
12200 `(("java-powermock-modules-junit4" ,java-powermock-modules-junit4)
12201 ("java-powermock-modules-junit4-common" ,java-powermock-modules-junit4-common)
12202 ("java-powermock-api-easymock" ,java-powermock-api-easymock)
12203 ("java-powermock-api-support" ,java-powermock-api-support)
12204 ("java-powermock-core" ,java-powermock-core)
12205 ("java-powermock-reflect" ,java-powermock-reflect)
12206 ("java-easymock" ,java-easymock)
12207 ("java-jboss-javassist" ,java-jboss-javassist)
12208 ("java-objenesis" ,java-objenesis)
12209 ("java-asm" ,java-asm)
12210 ("java-hamcrest-core" ,java-hamcrest-core)
12211 ("java-cglib" ,java-cglib)
12212 ("java-junit" ,java-junit)
12213 ("java-hawtjni" ,java-hawtjni)))))
12215 (define-public java-xmlunit
12217 (name "java-xmlunit")
12221 (uri (string-append "https://github.com/xmlunit/xmlunit/archive/v"
12222 version ".tar.gz"))
12223 (file-name (string-append name "-" version ".tar.gz"))
12226 "035rivlnmwhfqj0fzviciv0bkh1h95ps1iwnh2kjcvdbk5nccm4z"))))
12227 (build-system ant-build-system)
12229 `(#:jar-name "java-xmlunit.jar"
12230 #:source-dir "xmlunit-core/src/main/java"
12231 #:test-dir "xmlunit-core/src/test"
12233 (modify-phases %standard-phases
12234 (add-before 'check 'copy-test-resources
12235 (lambda* (#:key inputs #:allow-other-keys)
12236 (copy-recursively (assoc-ref inputs "resources") "../test-resources")
12239 `(("java-junit" ,java-junit)
12240 ("java-mockito-1" ,java-mockito-1)
12241 ("java-hamcrest-all" ,java-hamcrest-all)
12242 ("java-objenesis" ,java-objenesis)
12243 ("java-asm" ,java-asm)
12244 ("java-cglib" ,java-cglib)
12248 (uri (git-reference
12249 (url "https://github.com/xmlunit/test-resources")
12250 (commit "a590d2ae865c3e0455691d76ba8eefccc2215aec")))
12251 (file-name "java-xmlunit-test-resources")
12254 "0r0glj37pg5l868yjz78gckr91cs8fysxxbp9p328dssssi91agr"))))))
12255 (home-page "https://www.xmlunit.org/")
12256 (synopsis "XML output testing")
12257 (description "XMLUnit provides you with the tools to verify the XML you
12258 emit is the one you want to create. It provides helpers to validate against
12259 an XML Schema, assert the values of XPath queries or compare XML documents
12260 against expected outcomes.")
12261 (license license:asl2.0)))
12263 (define-public java-xmlunit-legacy
12265 (inherit java-xmlunit)
12266 (name "java-xmlunit-legacy")
12268 `(#:jar-name "java-xmlunit-legacy.jar"
12269 #:source-dir "xmlunit-legacy/src/main/java"
12270 #:test-dir "xmlunit-legacy/src/test"))
12272 `(("java-xmlunit" ,java-xmlunit)
12273 ("java-junit" ,java-junit)))
12275 `(("java-mockito-1" ,java-mockito-1)))))
12277 (define-public java-xmlunit-matchers
12279 (inherit java-xmlunit)
12280 (name "java-xmlunit-matchers")
12282 `(#:jar-name "java-xmlunit-matchers.jar"
12283 #:source-dir "xmlunit-matchers/src/main/java"
12284 #:test-dir "xmlunit-matchers/src/test"
12286 ;; Cannot open xsd for http://www.xmlunit.org/test-support/Book.xsd
12287 (list "**/ValidationMatcherTest.java")
12289 (modify-phases %standard-phases
12290 (add-before 'build 'copy-test-class
12292 (copy-file "xmlunit-core/src/test/java/org/xmlunit/TestResources.java"
12293 "xmlunit-matchers/src/test/java/org/xmlunit/TestResources.java")
12295 (add-before 'build 'fix-test-resources-path
12297 (substitute* (find-files "xmlunit-matchers/src/test" ".*.java")
12298 (("../test-resources") "test-resources"))
12300 (add-before 'check 'copy-test-resources
12301 (lambda* (#:key inputs #:allow-other-keys)
12302 (copy-recursively (assoc-ref inputs "resources") "test-resources")
12305 `(("java-xmlunit" ,java-xmlunit)
12306 ("java-junit" ,java-junit)))))
12308 (define-public java-openchart2
12310 (name "java-openchart2")
12314 (uri (string-append "http://download.approximatrix.com/openchart2/"
12315 "openchart2-" version ".source.zip"))
12318 "1xq96zm5r02n1blja0072jmmsifmxc40lbyfbnmcnr6mw42frh4g"))))
12319 (build-system ant-build-system)
12321 `(#:test-target "test"
12323 (modify-phases %standard-phases
12324 (add-after 'unpack 'fix-junit-errors
12326 (with-directory-excursion "unittest/src/com/approximatrix/charting/"
12327 (substitute* '("coordsystem/ticklocator/NumericXTickLocatorTest.java"
12328 "coordsystem/ticklocator/NumericYTickLocatorTest.java"
12329 "coordsystem/ticklocator/ObjectXTickLocatorTest.java"
12330 "model/DefaultChartDataModelConstraintsTest.java"
12331 "model/MultiScatterDataModelConstraintsTest.java"
12332 "model/threedimensional/DotPlotDataModelConstraintsTest.java")
12333 (("(assertEquals[^;]+);" before _)
12334 (string-append (string-drop-right before 2) ", 1E-6);"))))
12336 (replace 'install (install-jars ".")))))
12339 ("java-junit" ,java-junit)
12340 ("java-hamcrest-core" ,java-hamcrest-core)))
12341 (home-page "https://approximatrix.com/products/openchart2/")
12342 (synopsis "Simple plotting for Java")
12343 (description "Openchart2 provides a simple, yet powerful, interface for
12344 Java programmers to create two-dimensional charts and plots. The library
12345 features an assortment of graph styles, including advanced scatter plots, bar
12346 graphs, and pie charts.")
12347 (license license:lgpl2.1+)))
12349 (define-public java-commons-httpclient
12351 (name "java-commons-httpclient")
12355 (uri (string-append "mirror://apache/httpcomponents/"
12356 "commons-httpclient/source/commons-httpclient-"
12357 version "-src.tar.gz"))
12360 "1wlpn3cfy3d4inxy6g7wxcsa8p7sshn6aldk9y4ia3lb879rd97r"))))
12361 (build-system ant-build-system)
12363 `(#:build-target "compile"
12364 #:test-target "test"
12365 #:tests? #f; requires junit-textui (junit 3)
12367 (modify-phases %standard-phases
12368 (add-before 'build 'fix-accent
12370 (for-each (lambda (file)
12371 (with-fluids ((%default-port-encoding "ISO-8859-1"))
12373 (("\\* @author Ortwin .*") "* @author Ortwin Glueck\n"))))
12374 '("src/java/org/apache/commons/httpclient/HttpContentTooLargeException.java"
12375 "src/examples/TrivialApp.java" "src/examples/ClientApp.java"
12376 "src/test/org/apache/commons/httpclient/TestHttps.java"
12377 "src/test/org/apache/commons/httpclient/TestURIUtil2.java"))
12380 (lambda* (#:key outputs #:allow-other-keys)
12381 (invoke "ant" "dist"
12382 (string-append "-Ddist.home=" (assoc-ref outputs "out")
12386 `(("java-commons-logging" ,java-commons-logging-minimal)
12387 ("java-commons-codec" ,java-commons-codec)))
12388 (home-page "https://hc.apache.org")
12389 (synopsis "HTTP/1.1 compliant HTTP agent implementation")
12390 (description "This package contains an HTTP/1.1 compliant HTTP agent
12391 implementation. It also provides reusable components for client-side
12392 authentication, HTTP state management, and HTTP connection management.")
12393 (license license:asl2.0)))
12395 (define-public java-commons-vfs
12397 (name "java-commons-vfs")
12401 (uri (string-append "mirror://apache/commons/vfs/source/"
12402 "commons-vfs2-distribution-" version "-src.tar.gz"))
12403 (file-name (string-append name "-" version ".tar.gz"))
12406 "1cnq1iaghbp4cslpnvwbp83i5v234x87irssqynhwpfgw7caf1s3"))
12407 (modules '((guix build utils)))
12410 (for-each delete-file
12411 (find-files "." "\\.jar$"))
12413 (build-system ant-build-system)
12415 `(#:jar-name "commons-vfs.jar"
12416 #:source-dir "commons-vfs2/src/main/java"
12417 #:test-dir "commons-vfs2/src/test"
12418 ; FIXME: tests depend on many things: apache sshd, hadoop, ftpserver, ...
12421 (modify-phases %standard-phases
12422 (add-before 'build 'remove-hadoop-and-webdav
12423 ; Remove these files as they are not required and depend on difficult
12426 (for-each delete-file-recursively
12427 '("commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/webdav"
12428 "commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/hdfs"))
12431 `(("java-commons-collections4" ,java-commons-collections4)
12432 ("java-commons-compress" ,java-commons-compress)
12433 ("java-commons-httpclient" ,java-commons-httpclient)
12434 ("java-commons-logging-minimal" ,java-commons-logging-minimal)
12435 ("java-commons-net" ,java-commons-net)
12436 ("java-jsch" ,java-jsch)))
12437 (home-page "https://commons.apache.org/proper/commons-vfs/")
12438 (synopsis "Java file system library")
12439 (description "Commons VFS provides a single API for accessing various
12440 different file systems. It presents a uniform view of the files from various
12441 different sources, such as the files on local disk, on an HTTP server, or
12442 inside a Zip archive.")
12443 (license license:asl2.0)))
12445 (define-public java-jakarta-oro
12447 (name "java-jakarta-oro")
12451 (uri (string-append "mirror://apache/jakarta/oro/"
12452 "jakarta-oro-" version ".tar.gz"))
12455 "0rpmnsskiwmsy8r0sckz5n5dbvh3vkxx8hpm177c754r8xy3qksc"))
12456 (modules '((guix build utils)))
12459 (delete-file (string-append "jakarta-oro-" ,version ".jar"))
12461 (build-system ant-build-system)
12463 `(#:build-target "package"
12464 #:make-flags (list "-DDATE" "(no recorded date for reproducibility)")
12465 #:tests? #f; tests are run as part of the build process
12467 (modify-phases %standard-phases
12469 (install-jars ,(string-append "jakarta-oro-" version))))))
12470 (home-page "https://jakarta.apache.org/oro/")
12471 (synopsis "Text-processing for Java")
12472 (description "The Jakarta-ORO Java classes are a set of text-processing
12473 Java classes that provide Perl5 compatible regular expressions, AWK-like
12474 regular expressions, glob expressions, and utility classes for performing
12475 substitutions, splits, filtering filenames, etc. This library is the successor
12476 of the OROMatcher, AwkTools, PerlTools, and TextTools libraries originally
12478 (license license:asl1.1)))
12480 (define-public java-native-access
12482 (name "java-native-access")
12486 (uri (string-append "https://github.com/java-native-access/jna/"
12487 "archive/" version ".tar.gz"))
12488 (file-name (string-append name "-" version ".tar.gz"))
12491 "0zrpzkib6b905i018a9pqlzkqinphywr6y4jwv6mwp63jjqvqkd9"))
12492 (modules '((guix build utils)))
12495 (for-each delete-file (find-files "." ".*.jar"))
12496 (delete-file-recursively "native/libffi")
12497 (delete-file-recursively "dist")
12499 (build-system ant-build-system)
12501 `(#:tests? #f; FIXME: tests require reflections.jar
12502 #:test-target "test"
12503 #:make-flags (list "-Ddynlink.native=true")
12505 (modify-phases %standard-phases
12506 (add-before 'build 'fix-build.xml
12507 (lambda* (#:key inputs #:allow-other-keys)
12508 (substitute* "build.xml"
12509 ;; Since we removed the bundled ant.jar, give the correct path
12510 (("lib/ant.jar") (string-append (assoc-ref inputs "ant") "/lib/ant.jar"))
12511 ;; We removed generated native libraries. We can only rebuild one
12512 ;; so don't fail if we can't find a native library for another architecture.
12513 (("zipfileset") "zipfileset erroronmissingarchive=\"false\""))
12514 ;; Copy test dependencies
12515 (copy-file (car (find-files (assoc-ref inputs "java-junit") "jar$"))
12517 (copy-file (car (find-files (assoc-ref inputs "java-hamcrest-core")
12519 "lib/hamcrest-core.jar")
12520 ;; FIXME: once reflections.jar is built, copy it to lib/test.
12522 (add-before 'build 'build-native
12524 (invoke "ant" "-Ddynlink.native=true" "native")
12527 (install-jars "build")))))
12529 `(("libffi" ,libffi)
12533 `(("java-junit" ,java-junit)
12534 ("java-hamcrest-core" ,java-hamcrest-core)))
12535 (home-page "https://github.com/java-native-access/jna")
12536 (synopsis "Access to native shared libraries from Java")
12537 (description "JNA provides Java programs easy access to native shared
12538 libraries without writing anything but Java code - no JNI or native code is
12539 required. JNA allows you to call directly into native functions using natural
12540 Java method invocation.")
12541 ;; Java Native Access project (JNA) is dual-licensed under 2
12542 ;; alternative Free licenses: LGPL 2.1 or later and Apache License 2.0.
12545 license:lgpl2.1+))))
12547 (define-public java-native-access-platform
12549 (inherit java-native-access)
12550 (name "java-native-access-platform")
12552 `(#:test-target "test"
12553 #:tests? #f; require jna-test.jar
12555 (modify-phases %standard-phases
12556 (add-before 'build 'chdir
12558 (chdir "contrib/platform")
12560 (add-after 'chdir 'fix-ant
12561 (lambda* (#:key inputs #:allow-other-keys)
12562 (substitute* "nbproject/project.properties"
12563 (("../../build/jna.jar")
12564 (string-append (assoc-ref inputs "java-native-access")
12565 "/share/java/jna.jar"))
12566 (("../../lib/hamcrest-core-.*.jar")
12567 (car (find-files (assoc-ref inputs "java-hamcrest-core")
12569 (("../../lib/junit.jar")
12570 (car (find-files (assoc-ref inputs "java-junit")
12574 (install-jars "dist")))))
12576 `(("java-native-access" ,java-native-access)))
12577 (synopsis "Cross-platform mappings for jna")
12578 (description "java-native-access-platform has cross-platform mappings
12579 and mappings for a number of commonly used platform functions, including a
12580 large number of Win32 mappings as well as a set of utility classes that
12581 simplify native access.")))
12583 (define-public java-jsch-agentproxy-core
12585 (name "java-jsch-agentproxy-core")
12589 (uri (string-append "https://github.com/ymnk/jsch-agent-proxy/archive/"
12590 version ".tar.gz"))
12591 (file-name (string-append name "-" version ".tar.gz"))
12594 "02iqg6jbc1kxvfzqcg6wy9ygqxfm82bw5rf6vnswqy4y572niz4q"))))
12595 (build-system ant-build-system)
12597 `(#:jar-name "jsch-agentproxy-core.jar"
12598 #:source-dir "jsch-agent-proxy-core/src/main/java"
12599 #:tests? #f)); no tests
12600 (home-page "https://github.com/ymnk/jsch-agent-proxy")
12601 (synopsis "Core component of the proxy to ssh-agent and Pageant in Java")
12602 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
12603 and Pageant included Putty. It will be easily integrated into JSch, and users
12604 will be allowed to use these programs for authentication.")
12605 (license license:bsd-3)))
12607 (define-public java-jsch-agentproxy-sshagent
12609 (inherit java-jsch-agentproxy-core)
12610 (name "java-jsch-agentproxy-sshagent")
12612 `(#:jar-name "jsch-agentproxy-sshagent.jar"
12613 #:source-dir "jsch-agent-proxy-sshagent/src/main/java"
12614 #:tests? #f)); no tests
12616 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
12617 (synopsis "Proxy to ssh-agent")
12618 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
12619 and Pageant included in Putty. This component contains the code for a proxy to
12622 (define-public java-jsch-agentproxy-usocket-jna
12624 (inherit java-jsch-agentproxy-core)
12625 (name "java-jsch-agentproxy-usocket-jna")
12627 `(#:jar-name "jsch-agentproxy-usocket-jna.jar"
12628 #:source-dir "jsch-agent-proxy-usocket-jna/src/main/java"
12629 #:tests? #f)); no tests
12631 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
12632 ("java-native-access" ,java-native-access)))
12633 (synopsis "USocketFactory implementation using JNA")
12634 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
12635 and Pageant included in Putty. This component contains an implementation of
12636 USocketFactory using @dfn{JNA} (Java Native Access).")))
12638 (define-public java-jsch-agentproxy-pageant
12640 (inherit java-jsch-agentproxy-core)
12641 (name "java-jsch-agentproxy-pageant")
12643 `(#:jar-name "jsch-agentproxy-pageant.jar"
12644 #:source-dir "jsch-agent-proxy-pageant/src/main/java"
12645 #:tests? #f)); no tests
12647 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
12648 ("java-native-access" ,java-native-access)
12649 ("java-native-access-platform" ,java-native-access-platform)))
12650 (synopsis "Proxy to pageant")
12651 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
12652 and Pageant included in Putty. This component contains the code for a proxy to
12655 (define-public java-jsch-agentproxy-usocket-nc
12657 (inherit java-jsch-agentproxy-core)
12658 (name "java-jsch-agentproxy-usocket-nc")
12660 `(#:jar-name "jsch-agentproxy-usocket-nc.jar"
12661 #:source-dir "jsch-agent-proxy-usocket-nc/src/main/java"
12662 #:tests? #f)); no tests
12664 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
12665 (synopsis "USocketFactory implementation using netcat")
12666 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
12667 and Pageant included in Putty. This component contains an implementation of
12668 USocketFactory using netcat.")))
12670 (define-public java-jsch-agentproxy-connector-factory
12672 (inherit java-jsch-agentproxy-core)
12673 (name "java-jsch-agentproxy-connector-factory")
12675 `(#:jar-name "jsch-agentproxy-connector-factory.jar"
12676 #:source-dir "jsch-agent-proxy-connector-factory/src/main/java"
12677 #:tests? #f)); no tests
12679 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
12680 ("java-jsch-agentproxy-sshagent" ,java-jsch-agentproxy-sshagent)
12681 ("java-jsch-agentproxy-usocket-jna" ,java-jsch-agentproxy-usocket-jna)
12682 ("java-jsch-agentproxy-pageant" ,java-jsch-agentproxy-pageant)
12683 ("java-jsch-agentproxy-usocket-nc" ,java-jsch-agentproxy-usocket-nc)))
12684 (synopsis "Connector factory for jsch agent proxy")
12685 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
12686 and Pageant included in Putty. This component contains a connector factory.")))
12688 (define-public java-jsch-agentproxy-jsch
12690 (inherit java-jsch-agentproxy-core)
12691 (name "java-jsch-agentproxy-jsch")
12693 `(#:jar-name "jsch-agentproxy-jsch.jar"
12694 #:source-dir "jsch-agent-proxy-jsch/src/main/java"
12695 #:tests? #f)); no tests
12697 `(("java-jsch" ,java-jsch)
12698 ("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
12699 (synopsis "JSch integration library for agentproxy")
12700 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
12701 and Pageant included in Putty. This component contains a library to use
12702 jsch-agent-proxy with JSch.")))
12704 (define-public java-apache-ivy
12706 (name "java-apache-ivy")
12710 (uri (string-append "mirror://apache//ant/ivy/" version
12711 "/apache-ivy-" version "-src.tar.gz"))
12714 "1xkfn57g2m7l6y0xdq75x5rnrgk52m9jx2xah70g3ggl8750hbr0"))
12717 "java-apache-ivy-port-to-latest-bouncycastle.patch"))))
12718 (build-system ant-build-system)
12720 `(#:jar-name "ivy.jar"
12723 (modify-phases %standard-phases
12724 (add-before 'build 'remove-example
12726 (delete-file-recursively "src/example")
12728 (add-before 'build 'copy-resources
12730 (with-directory-excursion "src/java"
12731 (for-each (lambda (file)
12732 (install-file file (string-append "../../build/classes/" (dirname file))))
12734 (find-files "." ".*.css")
12735 (find-files "." ".*.ent")
12736 (find-files "." ".*.html")
12737 (find-files "." ".*.properties")
12738 (find-files "." ".*.xsd")
12739 (find-files "." ".*.xsl")
12740 (find-files "." ".*.xml"))))
12742 (add-before 'build 'fix-vfs
12745 '("src/java/org/apache/ivy/plugins/repository/vfs/VfsRepository.java"
12746 "src/java/org/apache/ivy/plugins/repository/vfs/VfsResource.java")
12747 (("import org.apache.commons.vfs") "import org.apache.commons.vfs2"))
12749 (add-before 'install 'copy-manifest
12751 (install-file "META-INF/MANIFEST.MF" "build/classes/META-INF")
12753 (add-before 'install 'repack
12755 (invoke "jar" "-cmf" "build/classes/META-INF/MANIFEST.MF" "build/jar/ivy.jar"
12756 "-C" "build/classes" ".")))
12757 (add-after 'install 'install-bin
12758 (lambda* (#:key outputs #:allow-other-keys)
12759 (let* ((bin (string-append (assoc-ref outputs "out") "/bin"))
12760 (ivy (string-append bin "/ivy"))
12761 (jar (string-append (assoc-ref outputs "out") "/share/java/ivy.jar")))
12763 (with-output-to-file ivy
12765 (display (string-append
12766 "#!" (which "sh") "\n"
12767 "if [[ -z $CLASSPATH ]]; then\n"
12768 " cp=\"" (getenv "CLASSPATH") ":" jar "\"\n"
12770 " cp=\"" (getenv "CLASSPATH") ":" jar ":$CLASSPATH\"\n"
12772 (which "java") " -cp $cp org.apache.ivy.Main $@\n"))))
12776 `(("java-bouncycastle" ,java-bouncycastle)
12777 ("java-commons-cli" ,java-commons-cli)
12778 ("java-commons-collections" ,java-commons-collections)
12779 ("java-commons-httpclient" ,java-commons-httpclient)
12780 ("java-commons-lang" ,java-commons-lang)
12781 ("java-commons-vfs" ,java-commons-vfs)
12782 ("java-jakarta-oro" ,java-jakarta-oro)
12783 ("java-jsch" ,java-jsch)
12784 ("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
12785 ("java-jsch-agentproxy-connector-factory" ,java-jsch-agentproxy-connector-factory)
12786 ("java-jsch-agentproxy-jsch" ,java-jsch-agentproxy-jsch)
12787 ("java-junit" ,java-junit)))
12788 (home-page "https://ant.apache.org/ivy")
12789 (synopsis "Dependency manager for the Java programming language")
12790 (description "Ivy is a tool for managing (recording, tracking, resolving
12791 and reporting) project dependencies. It is characterized by the following:
12794 @item flexibility and configurability - Ivy is essentially process agnostic
12795 and is not tied to any methodology or structure. Instead it provides the
12796 necessary flexibility and configurability to be adapted to a broad range
12797 of dependency management and build processes.
12798 @item tight integration with Apache Ant - while available as a standalone tool,
12799 Ivy works particularly well with Apache Ant providing a number of
12800 powerful Ant tasks ranging from dependency resolution to dependency
12801 reporting and publication.
12803 (license license:asl2.0)))
12805 (define-public java-eclipse-sisu-inject
12807 (name "java-eclipse-sisu-inject")
12811 (uri (git-reference
12812 (url "https://github.com/eclipse/sisu.inject/")
12813 (commit (string-append "releases/" version))))
12814 (file-name (git-file-name name version))
12817 "16044sizdb0rjbhlfbmcnpds5y7by7dyn9b0c11606aikqi8k3x6"))))
12818 (build-system ant-build-system)
12820 `(#:jar-name "eclipse-sisu-inject.jar"
12821 #:source-dir "org.eclipse.sisu.inject/src"
12822 #:tests? #f; no tests
12824 (modify-phases %standard-phases
12826 (install-from-pom "org.eclipse.sisu.inject/pom.xml")))))
12828 `(("java-guice" ,java-guice)
12829 ("java-sisu-inject-parent-pom" ,java-sisu-inject-parent-pom)))
12831 `(("java-guice-servlet" ,java-guice-servlet)
12832 ("java-javax-inject" ,java-javax-inject)
12833 ("java-javaee-servletapi" ,java-javaee-servletapi)
12834 ("java-junit" ,java-junit)
12835 ("java-slf4j-api" ,java-slf4j-api)
12836 ("java-jsr305" ,java-jsr305)
12837 ("java-jsr250" ,java-jsr250)
12838 ("java-cdi-api" ,java-cdi-api)
12839 ("java-osgi-framework" ,java-osgi-framework)
12840 ("java-osgi-util-tracker" ,java-osgi-util-tracker)
12841 ("java-testng" ,java-testng)))
12842 (home-page "https://www.eclipse.org/sisu/")
12843 (synopsis "Classpath scanning, auto-binding, and dynamic auto-wiring")
12844 (description "Sisu is a modular JSR330-based container that supports
12845 classpath scanning, auto-binding, and dynamic auto-wiring. Sisu uses
12846 Google-Guice to perform dependency injection and provide the core JSR330
12847 support, but removes the need to write explicit bindings in Guice modules.
12848 Integration with other containers via the Eclipse Extension Registry and the
12849 OSGi Service Registry is a goal of this project.")
12850 (license license:epl1.0)))
12852 (define java-sisu-inject-parent-pom
12854 (inherit java-eclipse-sisu-inject)
12855 (name "java-sisu-inject-parent-pom")
12859 (modify-phases %standard-phases
12860 (delete 'configure)
12863 (install-pom-file "pom.xml")))))
12864 (propagated-inputs '())))
12866 (define-public java-eclipse-sisu-plexus
12868 (name "java-eclipse-sisu-plexus")
12872 (uri (git-reference
12873 (url "https://github.com/eclipse/sisu.plexus")
12874 (commit (string-append "releases/" version))))
12875 (file-name (git-file-name name version))
12878 "17mjlajnsqnk07cc58h1qpxrif85yb2m2y0pyba48yjjgikk8r9f"))
12879 (modules '((guix build utils)))
12882 (for-each delete-file (find-files "." ".*.jar"))
12883 (rename-file "org.eclipse.sisu.plexus.tests/src"
12884 "org.eclipse.sisu.plexus.tests/java")
12886 (build-system ant-build-system)
12888 `(#:jar-name "eclipse-sisu-plexus.jar"
12889 #:source-dir "org.eclipse.sisu.plexus/src"
12890 #:test-dir "org.eclipse.sisu.plexus.tests"
12893 ;; This test fails probably because we can't generate the necessary
12895 "**/PlexusLoggingTest.*"
12896 ;; FIXME: This test fails because of some injection error
12897 "**/PlexusRequirementTest.*")
12900 (modify-phases %standard-phases
12901 (add-before 'build 'copy-resources
12903 (install-file "org.eclipse.sisu.plexus/META-INF/plexus/components.xml"
12904 "build/classes/META-INF/plexus")
12906 (add-before 'check 'build-test-jar
12908 (with-directory-excursion "org.eclipse.sisu.plexus.tests/resources/component-jar/src/main/"
12910 (with-directory-excursion "java"
12911 (apply invoke "javac" "-cp"
12912 (string-append (getenv "CLASSPATH")
12913 ":../../../../../build/classes")
12914 (find-files "." ".*.java"))
12915 (for-each (lambda (file) (install-file file (string-append "../build/" file)))
12916 (find-files "." ".*.jar")))
12917 (mkdir-p "build/META-INF/plexus")
12918 (copy-file "resources/META-INF/plexus/components.xml"
12919 "build/META-INF/plexus/components.xml")
12920 (with-directory-excursion "build"
12921 (invoke "jar" "cf" "../../../component-jar-0.1.jar" ".")))
12922 (with-directory-excursion "org.eclipse.sisu.plexus.tests/"
12923 (copy-recursively "META-INF" "../build/test-classes/META-INF")
12924 (substitute* "java/org/eclipse/sisu/plexus/DefaultPlexusContainerTest.java"
12925 (("resources/component-jar")
12926 "org.eclipse.sisu.plexus.tests/resources/component-jar")))
12929 (install-from-pom "org.eclipse.sisu.plexus/pom.xml")))))
12931 `(("java-plexus-classworlds" ,java-plexus-classworlds)
12932 ("java-plexus-utils" ,java-plexus-utils)
12933 ("java-plexus-component-annotations" ,java-plexus-component-annotations)
12934 ("java-cdi-api" ,java-cdi-api)
12935 ("java-eclipse-sisu-inject" ,java-eclipse-sisu-inject)
12936 ("java-sisu-plexus-parent-pom" ,java-sisu-plexus-parent-pom)))
12938 `(("java-osgi-framework" ,java-osgi-framework)
12939 ("java-slf4j-api" ,java-slf4j-api)
12940 ("java-javax-inject" ,java-javax-inject)
12941 ("java-guice" ,java-guice)
12942 ("java-guava" ,java-guava)
12943 ("java-aopalliance" ,java-aopalliance)
12944 ("java-asm" ,java-asm)
12945 ("java-cglib" ,java-cglib)))
12947 `(("java-junit" ,java-junit)))
12948 (home-page "https://www.eclipse.org/sisu/")
12949 (synopsis "Plexus support for the sisu container")
12950 (description "Sisu is a modular JSR330-based container that supports
12951 classpath scanning, auto-binding, and dynamic auto-wiring. This package
12952 adds Plexus support to the Sisu-Inject container.")
12953 (license license:epl1.0)))
12955 (define java-sisu-plexus-parent-pom
12957 (inherit java-eclipse-sisu-plexus)
12958 (name "java-sisu-plexus-parent-pom")
12962 (modify-phases %standard-phases
12963 (delete 'configure)
12966 (install-pom-file "pom.xml")))))
12968 `(("java-sonatype-oss-parent-pom-9" ,java-sonatype-oss-parent-pom-9)))))
12970 (define-public java-commons-compiler
12972 (name "java-commons-compiler")
12976 (uri (git-reference
12977 (url "https://github.com/janino-compiler/janino")
12978 (commit "91aa95686d1e4ca3b16a984a03a38686572331b2")))
12979 (file-name (string-append name "-" version))
12982 "04hfdl59sgh20qkxzgnibvs8f9hy6n7znxwpk611y5d89977y62r"))
12983 (modules '((guix build utils)))
12986 (for-each delete-file
12987 (find-files "." "\\.jar$"))
12989 (build-system ant-build-system)
12991 `(#:jar-name "commons-compiler.jar"
12992 #:source-dir "commons-compiler/src/main"
12993 #:tests? #f)); no tests
12994 (home-page "https://github.com/janino-compiler/janino")
12995 (synopsis "Java compiler")
12996 (description "Commons-compiler contains an API for janino, including the
12997 @code{IExpressionEvaluator}, @code{IScriptEvaluator}, @code{IClassBodyEvaluator}
12998 and @code{ISimpleCompiler} interfaces.")
12999 (license license:bsd-3)))
13001 (define-public java-janino
13003 (inherit java-commons-compiler)
13004 (name "java-janino")
13006 `(#:jar-name "janino.jar"
13007 #:source-dir "src/main/java"
13009 (modify-phases %standard-phases
13010 (add-before 'configure 'chdir
13015 `(("java-commons-compiler" ,java-commons-compiler)))
13017 `(("java-junit" ,java-junit)
13018 ("java-hamcrest-core" ,java-hamcrest-core)))
13019 (description "Janino is a Java compiler. Janino can compile a set of
13020 source files to a set of class files like @code{javac}, but also compile a
13021 Java expression, block, class body or source file in memory, load the bytecode
13022 and execute it directly in the same JVM. @code{janino} can also be used for
13023 static code analysis or code manipulation.")))
13025 (define-public java-logback-core
13027 (name "java-logback-core")
13031 (uri (string-append "https://github.com/qos-ch/logback/archive/v_"
13032 version ".tar.gz"))
13033 (file-name (string-append name "-" version ".tar.gz"))
13036 "1x6ga74yfgm94cfx98gybakbrlilx8i2gn6dx13l40kasmys06mi"))
13037 (modules '((guix build utils)))
13040 (delete-file-recursively "logback-access/lib")
13042 (build-system ant-build-system)
13044 `(#:jar-name "logback.jar"
13045 #:source-dir "src/main/java"
13046 #:test-dir "src/test"
13048 ;; These tests fail with Unable to set MockitoNamingPolicy on cglib generator
13049 ;; which creates FastClasses
13050 (list "**/AllCoreTest.*"
13051 "**/AutoFlushingObjectWriterTest.*"
13053 "**/ResilientOutputStreamTest.*"
13054 ;; And we still don't want to run abstract classes
13057 (modify-phases %standard-phases
13058 (add-before 'configure 'chdir
13060 (chdir "logback-core")
13063 `(("java-javax-mail" ,java-javax-mail)
13064 ("servlet" ,java-javaee-servletapi)
13065 ("java-commons-compiler" ,java-commons-compiler)
13066 ("java-janino" ,java-janino)))
13068 `(("java-junit" ,java-junit)
13069 ("java-hamcrest-core" ,java-hamcrest-core)
13070 ("java-mockito-1" ,java-mockito-1)
13071 ("java-cglib" ,java-cglib)
13072 ("java-asm" ,java-asm)
13073 ("java-objenesis" ,java-objenesis)
13074 ("java-joda-time" ,java-joda-time)))
13075 (home-page "https://logback.qos.ch")
13076 (synopsis "Logging for java")
13077 (description "Logback is intended as a successor to the popular log4j project.
13078 This module lays the groundwork for the other two modules.")
13079 ;; Either epl1.0 or lgpl2.1
13080 (license (list license:epl1.0
13081 license:lgpl2.1))))
13083 (define-public java-logback-classic
13085 (inherit java-logback-core)
13086 (name "java-logback-classic")
13088 `(#:jar-name "logback-classic.jar"
13089 #:source-dir "src/main/java"
13090 #:test-dir "src/test"
13091 #:tests? #f; tests require more packages: h2, greenmail, hsql, subethamail, slf4j, log4j, felix
13094 (modify-phases %standard-phases
13095 (add-before 'configure 'chdir
13097 (chdir "logback-classic")
13100 (lambda* (#:key inputs #:allow-other-keys)
13101 (mkdir-p "build/classes")
13102 (setenv "CLASSPATH"
13104 (apply append (map (lambda (input)
13105 (find-files (assoc-ref inputs input)
13107 '("java-logback-core" "java-slf4j-api"
13108 "java-commons-compiler" "servlet"
13111 (apply invoke "groovyc" "-d" "build/classes" "-j"
13112 (find-files "src/main/" ".*\\.(groovy|java)$"))
13113 (invoke "ant" "jar")
13116 `(("java-logback-core" ,java-logback-core)
13117 ("java-slf4j-api" ,java-slf4j-api)
13118 ,@(package-inputs java-logback-core)))
13120 `(("groovy" ,groovy)))
13121 (description "Logback is intended as a successor to the popular log4j project.
13122 This module can be assimilated to a significantly improved version of log4j.
13123 Moreover, @code{logback-classic} natively implements the slf4j API so that you
13124 can readily switch back and forth between logback and other logging frameworks
13125 such as log4j or @code{java.util.logging} (JUL).")))
13127 (define-public java-jgit
13130 (version "4.7.0.201704051617-r")
13133 (uri (string-append "https://repo1.maven.org/maven2/"
13134 "org/eclipse/jgit/org.eclipse.jgit/"
13135 version "/org.eclipse.jgit-"
13136 version "-sources.jar"))
13139 "13ii4jn02ynzq6i7gsyi21k2i94jpc85wf6bcm31q4cyvzv0mk4k"))))
13140 (build-system ant-build-system)
13142 `(#:tests? #f ; There are no tests to run.
13143 #:jar-name "jgit.jar"
13144 ;; JGit must be built with a JDK supporting Java 8.
13146 ;; Target our older default JDK.
13147 #:make-flags (list "-Dtarget=1.7")
13149 (modify-phases %standard-phases
13150 ;; The jar file generated by the default build.xml does not include
13151 ;; the text properties files, so we need to add them.
13152 (add-after 'build 'add-properties
13153 (lambda* (#:key jar-name #:allow-other-keys)
13154 (with-directory-excursion "src"
13155 (apply invoke "jar" "-uf"
13156 (string-append "../build/jar/" jar-name)
13157 (find-files "." "\\.properties$")))
13160 `(("java-classpathx-servletapi" ,java-classpathx-servletapi)
13161 ("java-javaewah" ,java-javaewah)
13162 ("java-jsch" ,java-jsch)
13163 ("java-slf4j-api" ,java-slf4j-api)))
13164 (home-page "https://eclipse.org/jgit/")
13165 (synopsis "Java library implementing the Git version control system")
13166 (description "JGit is a lightweight, pure Java library implementing the
13167 Git version control system, providing repository access routines, support for
13168 network protocols, and core version control algorithms.")
13169 (license license:edl1.0)))
13171 ;; For axoloti. This package can still be built with icedtea-7, which is
13172 ;; currently used as the default JDK.
13173 (define-public java-jgit-4.2
13174 (package (inherit java-jgit)
13175 (version "4.2.0.201601211800-r")
13178 (uri (string-append "https://repo1.maven.org/maven2/"
13179 "org/eclipse/jgit/org.eclipse.jgit/"
13180 version "/org.eclipse.jgit-"
13181 version "-sources.jar"))
13184 "15gm537iivhnzlkjym4x3wn5jqdjdragsw9pdpzqqg21nrc817mm"))))
13185 (build-system ant-build-system)
13187 (substitute-keyword-arguments (package-arguments java-jgit)
13188 ;; Build for default JDK.
13189 ((#:jdk _) icedtea-7)
13191 `(modify-phases ,phases
13192 (add-after 'unpack 'use-latest-javaewah-API
13194 (substitute* "src/org/eclipse/jgit/internal/storage/file/BitmapIndexImpl.java"
13195 (("wordinbits") "WORD_IN_BITS"))
13198 `(("java-javaewah" ,java-javaewah)
13199 ("java-jsch" ,java-jsch)
13200 ("java-slf4j-api" ,java-slf4j-api)))))
13202 (define-public abcl
13209 (uri (string-append "https://abcl.org/releases/"
13210 version "/abcl-src-" version ".tar.gz"))
13213 "0zr5mmqyj484vza089l8vc88d07g0m8ymxzglvar3ydwyvi1x1qx"))
13216 "abcl-fix-build-xml.patch"))))
13217 (build-system ant-build-system)
13219 `(("java-junit" ,java-junit)))
13221 `(#:build-target "abcl.jar"
13222 #:test-target "abcl.test"
13224 (modify-phases %standard-phases
13226 (lambda* (#:key outputs #:allow-other-keys)
13227 (let ((share (string-append (assoc-ref outputs "out")
13229 (bin (string-append (assoc-ref outputs "out")
13232 (install-file "dist/abcl.jar" share)
13233 (install-file "dist/abcl-contrib.jar" share)
13235 (with-output-to-file (string-append bin "abcl")
13237 (let ((classpath (string-append
13240 share "abcl-contrib.jar")))
13241 (display (string-append
13242 "#!" (which "sh") "\n"
13243 "if [[ -z $CLASSPATH ]]; then\n"
13244 " cp=\"" classpath "\"\n"
13246 " cp=\"" classpath ":$CLASSPATH\"\n"
13248 "exec " (which "java")
13249 " -cp $cp org.armedbear.lisp.Main $@\n")))))
13250 (chmod (string-append bin "abcl") #o755)
13252 (home-page "https://abcl.org/")
13253 (synopsis "Common Lisp Implementation on the JVM")
13255 "@dfn{Armed Bear Common Lisp} (ABCL) is a full implementation of the Common
13256 Lisp language featuring both an interpreter and a compiler, running in the
13257 JVM. It supports JSR-223 (Java scripting API): it can be a scripting engine
13258 in any Java application. Additionally, it can be used to implement (parts of)
13259 the application using Java to Lisp integration APIs.")
13260 (license (list license:gpl2+
13261 ;; named-readtables is released under 3 clause BSD
13263 ;; jfli is released under CPL 1.0
13266 (define-public java-jsonp-api
13268 (name "java-jsonp-api")
13272 (uri (git-reference
13273 (url "https://github.com/eclipse-ee4j/jsonp")
13274 (commit (string-append "1.1-" version "-RELEASE"))))
13275 (file-name (git-file-name name version))
13278 "0zrj03hkr3jdmqlb4ipjr37cqpp2q2814qpmxi7srlwpdqs0ibgc"))))
13279 (build-system ant-build-system)
13281 `(#:jar-name "jsonp-api.jar"
13283 #:source-dir "api/src/main/java"
13284 #:test-dir "api/src/test"))
13285 (home-page "https://eclipse-ee4j.github.io/jsonp/")
13286 (synopsis "JSON Processing in Java")
13287 (description "JSON Processing (JSON-P) is a Java API to process (e.g.
13288 parse, generate, transform and query) JSON messages. It produces and
13289 consumes JSON text in a streaming fashion (similar to StAX API for XML)
13290 and allows building a Java object model for JSON text using API classes
13291 (similar to DOM API for XML).")
13292 ;; either gpl2 only with classpath exception, or epl2.0.
13293 (license (list license:gpl2
13296 (define-public java-jsonp-impl
13298 (inherit java-jsonp-api)
13299 (name "java-jsonp-impl")
13301 `(#:jar-name "jsonp-impl.jar"
13303 #:source-dir "impl/src/main/java"
13304 #:test-dir "impl/src/test"
13306 (modify-phases %standard-phases
13307 (add-before 'build 'copy-resources
13310 "impl/src/main/resources/"
13314 `(("java-jsonp-api" ,java-jsonp-api)))
13315 (description "JSON Processing (JSON-P) is a Java API to process (e.g.
13316 parse, generate, transform and query) JSON messages. This package contains
13317 a reference implementation of that API.")))
13319 (define-public java-xmp
13325 (uri (string-append "http://download.macromedia.com/pub/developer"
13326 "/xmp/sdk/XMPCoreJava-" version ".zip"))
13329 "14nai2mmsg7l5ya2y5mx4w4lr1az3sk2fjz6hiy4zdrsavgvl1g7"))))
13330 (build-system ant-build-system)
13332 `(#:build-target "build"
13333 #:tests? #f; no tests
13335 (modify-phases %standard-phases
13336 (add-after 'unpack 'chdir
13340 (add-before 'build 'fix-timestamp
13342 (substitute* "build.xml"
13343 (("\\$\\{BuildDate\\}") "1970 Jan 01 00:00:00-GMT"))
13346 (install-jars "."))
13347 (add-after 'install 'install-doc
13348 (lambda* (#:key outputs #:allow-other-keys)
13351 (string-append (assoc-ref outputs "out") "/share/doc/java-xmp"))
13354 `(("unzip" ,unzip)))
13355 (home-page "https://www.adobe.com/devnet/xmp.html")
13356 (synopsis "Extensible Metadat Platform (XMP) support in Java")
13357 (description "Adobe's Extensible Metadata Platform (XMP) is a labeling
13358 technology that allows you to embed data about a file, known as metadata,
13359 into the file itself. The XMP Toolkit for Java is based on the C++ XMPCore
13360 library and the API is similar.")
13361 (license license:bsd-3)))
13363 (define-public java-args4j
13365 (name "java-args4j")
13369 (uri (git-reference
13370 (url "https://github.com/kohsuke/args4j")
13371 (commit (string-append "args4j-site-" version))))
13372 (file-name (git-file-name name version))
13375 "0w061fg65qrsm1a0lz0vyprsyidj31krjb459qi2lw0y78xza26s"))))
13376 (build-system ant-build-system)
13378 `(#:jar-name "args4j.jar"
13379 #:source-dir "args4j/src"
13380 #:test-dir "args4j/test"
13382 (list "**/ExampleTest.*"
13383 "**/ExternalConfiguredTest.*" ; fails to find a file
13384 ;; We still don't want to run abstract classes
13387 (modify-phases %standard-phases
13388 (add-before 'check 'fix-test-dir
13390 (substitute* "build.xml"
13391 (("/java\">") "\">"))
13393 (add-before 'build 'copy-resources
13395 (let ((from-prefix "args4j/src/org/kohsuke/args4j/")
13396 (to-prefix "build/classes/org/kohsuke/args4j/"))
13397 (for-each (lambda (f)
13399 (string-append from-prefix f)
13400 (string-append to-prefix (dirname f))))
13401 (list "Messages.properties"
13402 "Messages_de.properties"
13403 "Messages_en.properties"
13404 "Messages_ru.properties"
13405 "spi/Messages.properties"
13406 "spi/Messages_de.properties"
13407 "spi/Messages_en.properties"
13408 "spi/Messages_ru.properties")))
13411 `(("java-junit" ,java-junit)))
13412 (home-page "https://args4j.kohsuke.org/")
13413 (synopsis "Command line parser library")
13414 (description "Args4j is a small Java class library that makes it easy to
13415 parse command line options/arguments in your CUI application.")
13416 (license license:expat)))
13418 (define-public java-metadata-extractor
13420 (name "java-metadata-extractor")
13424 (uri (git-reference
13425 (url "https://github.com/drewnoakes/metadata-extractor")
13427 (file-name (git-file-name name version))
13430 "06yrq0swrl1r40yjbk5kqzjxr04jlkq9lfi711jvfgjf5kp2qinj"))))
13431 (build-system ant-build-system)
13433 `(#:jar-name "metadata-extractor.jar"
13434 #:source-dir "Source"
13437 (modify-phases %standard-phases
13438 (add-before 'check 'fix-test-dir
13440 (substitute* "build.xml"
13441 (("/java\">") "\">"))
13444 `(("java-xmp" ,java-xmp)))
13446 `(("java-hamcrest-core" ,java-hamcrest-core)
13447 ("java-junit" ,java-junit)))
13448 (home-page "https://github.com/drewnoakes/metadata-extractor")
13449 (synopsis "Extract metadata from image and video files")
13450 (description "Metadata-extractor is a straightforward Java library for
13451 reading metadata from image files. It is able to read metadata in Exif,
13452 IPTC, XMP, ICC and more formats.")
13453 (license license:asl2.0)))
13455 (define-public java-svg-salamander
13457 (name "java-svg-salamander")
13461 (uri (git-reference
13462 (url "https://github.com/blackears/svgSalamander")
13463 (commit (string-append "v" version))))
13464 (file-name (git-file-name name version))
13467 "1zv3kjdkf6iqf02x6ln76254y634j2ji448y706a65lsbfjmmicf"))
13468 (modules '((guix build utils)))
13471 (for-each delete-file (find-files "." ".*.jar"))
13474 (search-patches "java-svg-salamander-Fix-non-det.patch"))))
13475 (build-system ant-build-system)
13477 `(#:tests? #f; no tests
13479 (modify-phases %standard-phases
13480 (add-after 'unpack 'chdir
13484 (add-before 'build 'copy-jars
13485 (lambda* (#:key inputs #:allow-other-keys)
13486 (copy-file (car (find-files (assoc-ref inputs "javacc") "\\.jar$"))
13487 "../libraries/javacc.jar")
13488 (copy-file (car (find-files (assoc-ref inputs "ant") "ant\\.jar$"))
13489 "../libraries/ant.jar")
13492 (install-jars "dist")))))
13494 `(("javacc" ,javacc)))
13495 (home-page "https://github.com/blackears/svgSalamander")
13496 (synopsis "SVG engine for Java")
13497 (description "SVG Salamander is an SVG engine for Java that's designed
13498 to be small, fast, and allow programmers to use it with a minimum of fuss.
13499 It's in particular targeted for making it easy to integrate SVG into Java
13500 games and making it much easier for artists to design 2D game content - from
13501 rich interactive menus to charts and graphcs to complex animations.")
13502 (license license:bsd-2)))
13504 (define-public java-jboss-transaction-api-spec
13506 (name "java-jboss-transaction-api-spec")
13507 (version "1.2+1.1.1")
13510 (uri (git-reference
13511 (url "https://github.com/jboss/jboss-transaction-api_spec")
13512 (commit "jboss-transaction-api_1.2_spec-1.1.1.Final")))
13513 (file-name (git-file-name name version))
13516 "1xbfq5hvb86izflydxrqqv3k26c1ba2m0ap6m97shqrsdi9by4wy"))))
13517 (build-system ant-build-system)
13519 `(#:jar-name "java-jboss-transaction-api_spec.jar"
13520 #:source-dir "src/main/java"
13521 #:tests? #f)); no tests
13523 `(("java-cdi-api" ,java-cdi-api)
13524 ("java-jboss-interceptors-api-spec" ,java-jboss-interceptors-api-spec)))
13525 (home-page "https://github.com/jboss/jboss-transaction-api_spec")
13526 (synopsis "Generic transaction management API in Java")
13527 (description "Java-jboss-transaction-api-spec implements the Transactions
13528 API. A transaction is a unit of work containing one or more operations
13529 involving one or more shared resources having ACID (Atomicity, Consistency,
13530 Isolation and Durability) properties.")
13531 ;; either gpl2 only with classpath exception or cddl.
13532 (license (list license:gpl2 license:cddl1.0))))
13534 (define-public java-picocli
13536 (name "java-picocli")
13540 (uri (git-reference
13541 (url "https://github.com/remkop/picocli")
13542 (commit (string-append "v" version))))
13543 (file-name (git-file-name name version))
13546 "1sxp6rxjfgjd98ly14b3d15dvxkm5wg4g46w12jyhmr0kmkaca3c"))))
13547 (build-system ant-build-system)
13549 `(#:jar-name "picocli.jar"
13550 #:source-dir "src/main/java"
13551 ;; Tests require missing dependencies (junitparams, system-rules)
13553 (home-page "https://picocli.info")
13554 (synopsis "REPL for the JVM")
13555 (description "Picocli is a framework for building command line applications
13556 for the JVM. It supports colors, autocompletion, subcommands, and more. Written
13557 in Java, usable from Groovy, Kotlin, Scala, etc.")
13558 (license license:asl2.0)))
13560 (define-public java-jetbrains-annotations
13562 (name "java-jetbrains-annotations")
13566 (uri (git-reference
13567 (url "https://github.com/JetBrains/java-annotations")
13569 (file-name (git-file-name name version))
13572 "0z6i1xs60cd5ffz23c49sq68wn5mphhs3xpar1n93ppama2ng80v"))))
13573 (build-system ant-build-system)
13575 `(#:jar-name "jetbrains-annotations.jar"
13576 #:source-dir "common/src/main/java:java8/src/main/java"
13577 #:tests? #f)); no tests
13578 (home-page "https://github.com/JetBrains/java-annotations")
13579 (synopsis "Annotations for Java and other JVM languages")
13580 (description "This package contains a set of Java annotations which can be
13581 used in JVM-based languages. They serve as an additional documentation and
13582 can be interpreted by IDEs and static analysis tools to improve code analysis.")
13583 (license license:expat)))
13585 (define-public java-javaparser
13587 (name "java-javaparser")
13591 (uri (git-reference
13592 (url "https://github.com/javaparser/javaparser")
13593 (commit (string-append "javaparser-parent-" version))))
13594 (file-name (git-file-name name version))
13597 "1a4jk12ffa31fa0y8vda0739vpfj1206p0nha842b7bixbvwamv9"))
13598 (modules '((guix build utils)))
13601 (for-each delete-file
13602 (find-files "." "\\.jar$"))
13604 (build-system ant-build-system)
13606 `(#:tests? #f; tests require jbehave and junit5
13608 (modify-phases %standard-phases
13609 (add-before 'build 'fill-template
13611 (with-directory-excursion "javaparser-core/src/main"
13612 (copy-file "java-templates/com/github/javaparser/JavaParserBuild.java"
13613 "java/com/github/javaparser/JavaParserBuild.java")
13614 (substitute* "java/com/github/javaparser/JavaParserBuild.java"
13615 (("\\$\\{project.version\\}") ,version)
13616 (("\\$\\{project.name\\}") "javaparser")
13617 (("\\$\\{project.build.finalName\\}") "javaparser")
13618 (("\\$\\{maven.version\\}") "fake")
13619 (("\\$\\{maven.build.version\\}") "fake")
13620 (("\\$\\{build.timestamp\\}") "0")
13621 (("\\$\\{java.vendor\\}") "Guix")
13622 (("\\$\\{java.vendor.url\\}") "https://gnu.org/software/guix")
13623 (("\\$\\{java.version\\}") "1.8")
13624 (("\\$\\{os.arch\\}") "any")
13625 (("\\$\\{os.name\\}") "GuixSD")
13626 (("\\$\\{os.version\\}") "not available")))
13628 (add-before 'build 'generate-javacc
13630 (with-directory-excursion "javaparser-core/src/main/java"
13631 (invoke "java" "javacc" "../javacc/java.jj"))
13633 (add-before 'build 'copy-javacc-support
13635 (with-directory-excursion "javaparser-core/src/main"
13636 (copy-recursively "javacc-support" "java"))
13640 (define (build name)
13641 (format #t "Building ~a~%" name)
13642 (delete-file-recursively "build/classes")
13643 (mkdir-p "build/classes")
13644 (apply invoke "javac"
13645 "-cp" (string-append (getenv "CLASSPATH") ":"
13646 (string-join (find-files "build/jar" ".")
13648 "-d" "build/classes"
13649 (find-files (string-append name "/src/main/java")
13651 (invoke "jar" "-cf" (string-append "build/jar/" name ".jar")
13652 "-C" "build/classes" "."))
13653 (mkdir-p "build/classes")
13654 (mkdir-p "build/test-classes")
13655 (mkdir-p "build/jar")
13656 (build "javaparser-core")
13657 (build "javaparser-core-serialization")
13658 (build "javaparser-core-generators")
13659 (build "javaparser-core-metamodel-generator")
13660 (build "javaparser-symbol-solver-core")
13663 (install-jars "build/jar")))))
13665 `(("java-guava" ,java-guava)
13666 ("java-jboss-javassist" ,java-jboss-javassist)
13667 ("java-jsonp-api" ,java-jsonp-api)))
13669 `(("javacc" ,javacc)))
13670 (home-page "http://javaparser.org/")
13671 (synopsis "Parser for Java")
13673 "This project contains a set of libraries implementing a Java 1.0 - Java
13674 11 Parser with advanced analysis functionalities.")
13676 ;; either lgpl or asl