1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 Ricardo Wurmus <rekado@elephly.net>
3 ;;; Copyright © 2016 Leo Famulari <leo@famulari.name>
4 ;;; Copyright © 2016, 2017 Roel Janssen <roel@gnu.org>
5 ;;; Copyright © 2017, 2019 Carlo Zancanaro <carlo@zancanaro.id.au>
6 ;;; Copyright © 2017-2020 Julien Lepiller <julien@lepiller.eu>
7 ;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be>
8 ;;; Copyright © 2016, 2017, 2018 Alex Vong <alexvong1995@gmail.com>
9 ;;; Copyright © 2017, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
10 ;;; Copyright © 2018, 2019 Gábor Boskovits <boskovits@gmail.com>
11 ;;; Copyright © 2018 Chris Marusich <cmmarusich@gmail.com>
12 ;;; Copyright © 2018, 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
13 ;;; Copyright © 2019, 2020 Björn Höfling <bjoern.hoefling@bjoernhoefling.de>
14 ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
15 ;;; Copyright © 2020 Raghav Gururajan <raghavgururajan@disroot.org>
16 ;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
18 ;;; This file is part of GNU Guix.
20 ;;; GNU Guix is free software; you can redistribute it and/or modify it
21 ;;; under the terms of the GNU General Public License as published by
22 ;;; the Free Software Foundation; either version 3 of the License, or (at
23 ;;; your option) any later version.
25 ;;; GNU Guix is distributed in the hope that it will be useful, but
26 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
27 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28 ;;; GNU General Public License for more details.
30 ;;; You should have received a copy of the GNU General Public License
31 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
33 (define-module (gnu packages java)
34 #:use-module ((guix licenses) #:prefix license:)
35 #:use-module (guix packages)
36 #:use-module (guix download)
37 #:use-module (guix hg-download)
38 #:use-module (guix git-download)
39 #:use-module (guix svn-download)
40 #:use-module ((guix build utils) #:select (alist-replace))
41 #:use-module (guix utils)
42 #:use-module (guix build-system ant)
43 #:use-module (guix build-system gnu)
44 #:use-module (guix build-system trivial)
45 #:use-module (gnu packages)
46 #:use-module (gnu packages attr)
47 #:use-module (gnu packages autotools)
48 #:use-module (gnu packages base)
49 #:use-module (gnu packages bash)
50 #:use-module (gnu packages certs)
51 #:use-module (gnu packages cpio)
52 #:use-module (gnu packages cups)
53 #:use-module (gnu packages compression)
54 #:use-module (gnu packages elf)
55 #:use-module (gnu packages fontutils)
56 #:use-module (gnu packages gawk)
57 #:use-module (gnu packages gettext)
58 #:use-module (gnu packages gl)
59 #:use-module (gnu packages ghostscript) ;lcms
60 #:use-module (gnu packages gnome)
61 #:use-module (gnu packages groovy)
62 #:use-module (gnu packages gtk)
63 #:use-module (gnu packages guile)
64 #:use-module (gnu packages icu4c)
65 #:use-module (gnu packages image)
66 #:use-module (gnu packages java-compression)
67 #:use-module (gnu packages libffi)
68 #:use-module (gnu packages linux) ;alsa
69 #:use-module (gnu packages maths)
70 #:use-module (gnu packages maven)
71 #:use-module (gnu packages maven-parent-pom)
72 #:use-module (gnu packages nss)
73 #:use-module (gnu packages onc-rpc)
74 #:use-module (gnu packages web)
75 #:use-module (gnu packages wget)
76 #:use-module (gnu packages pkg-config)
77 #:use-module (gnu packages perl)
78 #:use-module (gnu packages popt)
79 #:use-module (gnu packages kerberos)
80 #:use-module (gnu packages xml)
81 #:use-module (gnu packages xorg)
82 #:use-module (gnu packages texinfo)
83 #:use-module ((srfi srfi-1) #:select (fold alist-delete))
84 #:use-module (srfi srfi-11)
85 #:use-module (ice-9 match))
89 ;;; Java bootstrap toolchain.
92 ;; The Java bootstrap begins with Jikes, a Java compiler written in C++. We
93 ;; use it to build a simple version of GNU Classpath, the Java standard
94 ;; library. We chose version 0.93 because it is the last version that can be
95 ;; built with Jikes. With Jikes and this version of GNU Classpath we can
96 ;; build JamVM, a Java Virtual Machine. We build version 1.5.1 because it is
97 ;; the last version of JamVM that works with a version of GNU classpath that
98 ;; does not require ECJ. These three packages make up the bootstrap JDK.
100 ;; This is sufficient to build an older version of Ant, which is needed to
101 ;; build an older version of ECJ, an incremental Java compiler, both of which
102 ;; are written in Java.
104 ;; ECJ is needed to build the latest release (0.99) and the development
105 ;; version of GNU Classpath. The development version of GNU Classpath has
106 ;; much more support for Java 1.6 than the latest release, but we need to
107 ;; build 0.99 first to get a working version of javah. ECJ, the development
108 ;; version of GNU Classpath, and the latest version of JamVM make up the
109 ;; second stage JDK with which we can build the OpenJDK with the Icedtea 1.x
110 ;; build framework. We then build the more recent JDKs Icedtea 2.x and
113 (define-public libantlr3c
121 (string-append "https://www.antlr3.org/download/C/"
122 name "-" version ".tar.gz"))
124 (base32 "0lpbnb4dq4azmsvlhp6khq1gy42kyqyjv8gww74g5lm2y6blm4fa"))))
125 (build-system gnu-build-system)
127 `(#:configure-flags (list "--enable-debuginfo" "--disable-static")
128 #:phases (modify-phases %standard-phases
130 (lambda* (#:key build target native-inputs inputs outputs
131 (configure-flags '()) out-of-source? system
133 (let ((configure (assoc-ref %standard-phases 'configure))
134 (enable-64bit? (member system '("aarch64-linux"
137 (configure #:build build #:target target
138 #:native-inputs native-inputs
139 #:inputs inputs #:outputs outputs
140 #:configure-flags `(,(if enable-64bit?
144 #:out-of-source? out-of-source?)))))))
145 (synopsis "ANTLR C Library")
146 (description "LIBANTLR3C provides run-time C libraries for ANTLR3 (ANother
147 Tool for Language Recognition v3).")
148 (home-page "https://www.antlr3.org/")
149 (license license:bsd-3)))
157 (uri (string-append "mirror://sourceforge/jikes/Jikes/"
158 version "/jikes-" version ".tar.bz2"))
161 "1qqldrp74pzpy5ly421srqn30qppmm9cvjiqdngk8hf47dv2rc0c"))))
162 (build-system gnu-build-system)
163 (home-page "http://jikes.sourceforge.net/")
164 (synopsis "Compiler for the Java language")
165 (description "Jikes is a compiler that translates Java source files as
166 defined in The Java Language Specification into the bytecoded instruction set
167 and binary format defined in The Java Virtual Machine Specification.")
168 (license license:ibmpl1.0)))
171 ;; Last release is from 2014, with a few important commits afterwards.
172 (let ((commit "a4bd00df0199e78243847f06cc04ecaea31f8f08"))
175 (version (git-version "0.2.4" "1" commit))
179 (url "https://github.com/ninjudd/drip")
181 (file-name (git-file-name name version))
184 "0wzmjwfyldr3jn49517xd8yn7dgdk8h88qkga3kjyg1zc375ylg2"))))
185 (build-system gnu-build-system)
187 `(("jdk" ,icedtea "jdk")))
189 `(#:tests? #f ; No tests.
191 (modify-phases %standard-phases
193 (add-before 'install 'fix-wrapper
194 (lambda* (#:key inputs #:allow-other-keys)
195 (let ((jps (string-append (assoc-ref inputs "jdk") "/bin/jps")))
196 (substitute* "bin/drip"
198 (("brew update && brew upgrade drip") "guix pull && guix install drip")
200 (("\\(cd -- \"\\$drip_dir\" && make -s\\) \\|\\| exit 1") "")
201 ;; No need to include source:
202 (("\\[\\[ -r \\$drip_dir/src/org/flatland/drip/Main\\.java \\]\\]")
206 (lambda* (#:key outputs #:allow-other-keys)
207 (let* ((out (assoc-ref outputs "out"))
208 (bin (string-append out "/bin"))
209 (share (string-append out "/share/drip")))
213 (install-file (string-append "bin/" file) bin))
214 '("drip" "drip_daemon" "drip_proxy"))
215 (install-file "drip.jar" share)
216 (substitute* (string-append bin "/drip")
217 (("drip_dir=\\$bin_dir/..")
218 (string-append "drip_dir=" share)))
220 (home-page "https://github.com/ninjudd/drip")
221 (synopsis "Faster Java Virtual Machine launching")
222 (description "Drip is a launcher for the Java Virtual Machine that
223 provides much faster startup times than the @command{java} command. The @command{drip}
224 script is intended to be a drop-in replacement for the @command{java} command,
226 (license license:epl1.0))))
228 ;; This is the last version of GNU Classpath that can be built without ECJ.
229 (define classpath-bootstrap
235 (uri (string-append "mirror://gnu/classpath/classpath-"
239 "0i99wf9xd3hw1sj2sazychb9prx8nadxh2clgvk3zlmb28v0jbfz"))
240 (patches (search-patches "classpath-aarch64-support.patch"))))
241 (build-system gnu-build-system)
244 (list (string-append "JAVAC="
245 (assoc-ref %build-inputs "jikes")
250 "--disable-gconf-peer"
256 (modify-phases %standard-phases
257 ;; XXX: This introduces a memory leak as we remove a call to free up
258 ;; memory for the file name string. This was necessary because of a
259 ;; runtime error that would have prevented us from building
260 ;; ant-bootstrap later. See https://issues.guix.gnu.org/issue/36685
261 ;; for the gnarly details.
262 (add-after 'unpack 'remove-call-to-free
264 (substitute* "native/jni/java-io/java_io_VMFile.c"
265 (("result = cpio_isFileExists.*" m)
266 (string-append m "\n//")))
268 (add-after 'install 'install-data
269 (lambda _ (invoke "make" "install-data"))))))
274 ("pkg-config" ,pkg-config)))
275 (home-page "https://www.gnu.org/software/classpath/")
276 (synopsis "Essential libraries for Java")
277 (description "GNU Classpath is a project to create core class libraries
278 for use with runtimes, compilers and tools for the Java programming
280 ;; GPLv2 or later, with special linking exception.
281 (license license:gpl2+)))
283 ;; This is the last version of JamVM that works with a version of GNU
284 ;; classpath that does not require ECJ.
285 (define jamvm-1-bootstrap
291 (uri (string-append "mirror://sourceforge/jamvm/jamvm/"
292 "JamVM%20" version "/jamvm-"
294 (patches (search-patches "jamvm-1.5.1-aarch64-support.patch"
295 "jamvm-1.5.1-armv7-support.patch"))
298 "06lhi03l3b0h48pc7x58bk9my2nrcf1flpmglvys3wyad6yraf36"))
301 ;; Remove precompiled software.
302 (delete-file "lib/classes.zip")
304 (build-system gnu-build-system)
307 (list (string-append "--with-classpath-install-dir="
308 (assoc-ref %build-inputs "classpath"))
309 "--disable-int-caching"
310 "--enable-runtime-reloc-checks"
313 ,(if (string-prefix? "aarch64" (or (%current-system)
314 (%current-target-system)))
315 ;; Makefiles and the configure script need to be regenerated to
316 ;; incorporate support for AArch64.
317 '(modify-phases %standard-phases
319 (lambda _ (invoke "autoreconf" "-vif"))))
322 `(("classpath" ,classpath-bootstrap)
328 (if (string-prefix? "aarch64" (or (%current-system)
329 (%current-target-system)))
330 ;; Additional packages needed for autoreconf.
331 `(("autoconf" ,autoconf)
332 ("automake" ,automake)
333 ("libtool" ,libtool))
335 (home-page "http://jamvm.sourceforge.net/")
336 (synopsis "Small Java Virtual Machine")
337 (description "JamVM is a Java Virtual Machine conforming to the JVM
338 specification edition 2 (blue book). It is extremely small. However, unlike
339 other small VMs it supports the full spec, including object finalisation and
341 (license license:gpl2+)))
343 (define ant-bootstrap
345 (name "ant-bootstrap")
346 ;; The 1.10.x series requires Java 8. 1.9.0 and later use generics, which
347 ;; are not supported. The 1.8.x series is the last to use only features
348 ;; supported by Jikes.
352 (uri (string-append "mirror://apache/"
353 "ant/source/apache-ant-"
354 version "-src.tar.bz2"))
357 "1cg0lga887qz5iizh6mlkxp01lciymrhmp7wzxpl6zpnldxmzrjx"))))
358 (build-system gnu-build-system)
360 `(#:imported-modules ((guix build syscalls)
361 ,@%gnu-build-system-modules)
362 #:modules ((srfi srfi-1)
363 (guix build gnu-build-system)
365 (guix build syscalls))
366 #:tests? #f ; no "check" target
368 (modify-phases %standard-phases
372 (lambda* (#:key inputs #:allow-other-keys)
373 (setenv "JAVA_HOME" (assoc-ref inputs "jamvm"))
375 (string-append (assoc-ref inputs "jamvm")
378 (string-append (assoc-ref inputs "jikes")
381 (string-append (assoc-ref inputs "jamvm")
384 ;; Ant complains if this file doesn't exist.
385 (setenv "HOME" "/tmp")
386 (with-output-to-file "/tmp/.ant.properties"
387 (lambda _ (display "")))
389 ;; Use jikes instead of javac for <javac ...> tags in build.xml
390 (setenv "ANT_OPTS" "-Dbuild.compiler=jikes")
392 ;; jikes produces lots of warnings, but they are not very
393 ;; interesting, so we silence them.
394 (setenv "$BOOTJAVAC_OPTS" "-nowarn")
396 ;; Without these JamVM options the build may freeze.
397 (substitute* "bootstrap.sh"
398 (("^\"\\$\\{JAVACMD\\}\" " m)
399 ,@(if (string-prefix? "armhf" (or (%current-system)
400 (%current-target-system)))
401 `((string-append m "-Xnocompact "))
402 `((string-append m "-Xnocompact -Xnoinlining ")))))
404 ;; Disable tests because we are bootstrapping and thus don't have
405 ;; any of the dependencies required to build and run the tests.
406 (substitute* "build.xml"
407 (("depends=\"jars,test-jar\"") "depends=\"jars\""))
408 (invoke "bash" "bootstrap.sh"
409 (string-append "-Ddist.dir="
410 (assoc-ref %outputs "out")))))
411 (add-after 'build 'strip-jar-timestamps ;based on ant-build-system
412 (lambda* (#:key outputs #:allow-other-keys)
413 (define (repack-archive jar)
414 (let* ((dir (mkdtemp! "jar-contents.XXXXXX"))
415 (manifest (string-append dir "/META-INF/MANIFESTS.MF")))
416 (with-directory-excursion dir
417 (invoke "unzip" jar))
419 ;; XXX: copied from (gnu build install)
420 (for-each (lambda (file)
421 (let ((s (lstat file)))
422 (unless (eq? (stat:type s) 'symlink)
423 (utime file 0 0 0 0))))
424 (find-files dir #:directories? #t))
425 ;; It is important that the manifest appears first.
426 (with-directory-excursion dir
427 (let* ((files (find-files "." ".*" #:directories? #t))
428 ;; To ensure that the reference scanner can
429 ;; detect all store references in the jars
430 ;; we disable compression with the "-0" option.
431 (command (if (file-exists? manifest)
432 `("zip" "-0" "-X" ,jar ,manifest
434 `("zip" "-0" "-X" ,jar ,@files))))
435 (apply invoke command)))))
436 (for-each repack-archive
438 (string-append (assoc-ref %outputs "out") "/lib")
444 ("jamvm" ,jamvm-1-bootstrap)
447 (home-page "https://ant.apache.org")
448 (synopsis "Build tool for Java")
450 "Ant is a platform-independent build tool for Java. It is similar to
451 make but is implemented using the Java language, requires the Java platform,
452 and is best suited to building Java projects. Ant uses XML to describe the
453 build process and its dependencies, whereas Make uses Makefile format.")
454 (license license:asl2.0)))
456 ;; Version 3.2.2 is the last version without a dependency on a full-fledged
457 ;; compiler for Java 1.5.
458 (define ecj-bootstrap
460 (name "ecj-bootstrap")
464 (uri (string-append "http://archive.eclipse.org/eclipse/"
465 "downloads/drops/R-" version
466 "-200702121330/ecjsrc.zip"))
469 "05hj82kxd23qaglsjkaqcj944riisjha7acf7h3ljhrjyljx8307"))))
470 ;; It would be so much easier if we could use the ant-build-system, but we
471 ;; cannot as we don't have ant at this point. We use ecj for
472 ;; bootstrapping the JDK.
473 (build-system gnu-build-system)
475 `(#:modules ((guix build gnu-build-system)
478 #:tests? #f ; there are no tests
480 (modify-phases %standard-phases
482 (lambda* (#:key inputs #:allow-other-keys)
485 (cons (string-append (assoc-ref inputs "jamvm")
487 (find-files (string-append
488 (assoc-ref inputs "ant-bootstrap")
494 (lambda* (#:key inputs #:allow-other-keys)
495 ;; The unpack phase enters the "org" directory by mistake.
498 ;; Create a simple manifest to make ecj executable.
499 (with-output-to-file "manifest"
501 (display "Manifest-Version: 1.0
502 Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n")))
505 (and (apply invoke "jikes"
506 (find-files "." "\\.java$"))
507 (invoke "fastjar" "cvfm"
508 "ecj-bootstrap.jar" "manifest" "."))))
510 (lambda* (#:key outputs #:allow-other-keys)
511 (let ((share (string-append (assoc-ref outputs "out")
514 (install-file "ecj-bootstrap.jar" share)
517 `(("ant-bootstrap" ,ant-bootstrap)
520 ("jamvm" ,jamvm-1-bootstrap)
521 ("fastjar" ,fastjar)))
522 (home-page "https://eclipse.org")
523 (synopsis "Eclipse Java development tools core batch compiler")
524 (description "This package provides the Eclipse Java core batch compiler
525 for bootstrapping purposes. The @dfn{Eclipse compiler for Java} (ecj) is a
526 requirement for all GNU Classpath releases after version 0.93.")
527 (license license:epl1.0)))
529 (define ecj-javac-wrapper
530 (package (inherit ecj-bootstrap)
531 (name "ecj-javac-wrapper")
533 (build-system trivial-build-system)
535 `(#:modules ((guix build utils))
538 (use-modules (guix build utils))
539 (let* ((bin (string-append (assoc-ref %outputs "out") "/bin"))
540 (target (string-append bin "/javac"))
541 (guile (string-append (assoc-ref %build-inputs "guile")
543 (ecj (string-append (assoc-ref %build-inputs "ecj-bootstrap")
544 "/share/java/ecj-bootstrap.jar"))
545 (java (string-append (assoc-ref %build-inputs "jamvm")
547 (bootcp (let ((jvmlib (string-append (assoc-ref %build-inputs "classpath")
548 "/share/classpath")))
549 (string-append jvmlib "/glibj.zip:"
550 jvmlib "/tools.zip"))))
552 (with-output-to-file target
554 (format #t "#!~a --no-auto-compile\n!#\n" guile)
556 `(begin (use-modules (ice-9 match)
562 '(("-bootclasspath" ,bootcp)
567 (let ((classpath (getenv "CLASSPATH")))
569 (string-join (list ,ecj
570 ,(string-append (assoc-ref %build-inputs "jamvm")
574 (receive (vm-args other-args)
575 ;; Separate VM arguments from arguments to ECJ.
576 (partition (cut string-prefix? "-J" <>)
577 (fold (lambda (default acc)
578 (if (member (first default) acc)
579 acc (append default acc)))
583 ;; Remove "-J" prefix
584 (map (cut string-drop <> 2) vm-args)
585 '("org.eclipse.jdt.internal.compiler.batch.Main")
586 (cons "-nowarn" other-args)))))
588 (let ((args (cdr (command-line))))
590 (format (current-error-port) "javac: no arguments given!\n")
595 `(("guile" ,guile-2.2)
596 ("ecj-bootstrap" ,ecj-bootstrap)
597 ("jamvm" ,jamvm-1-bootstrap)
598 ("classpath" ,classpath-bootstrap)))
599 (description "This package provides a wrapper around the @dfn{Eclipse
600 compiler for Java} (ecj) with a command line interface that is compatible with
601 the standard javac executable.")))
603 ;; The classpath-bootstrap was built without a virtual machine, so it does not
604 ;; provide a wrapper for javah. We cannot build the development version of
605 ;; Classpath without javah.
606 (define classpath-0.99
607 (package (inherit classpath-bootstrap)
611 (uri (string-append "mirror://gnu/classpath/classpath-"
615 "1j7cby4k66f1nvckm48xcmh352b1d1b33qk7l6hi7dp9i9zjjagr"))
616 (patches (search-patches "classpath-aarch64-support.patch"))))
619 (list (string-append "--with-ecj-jar="
620 (assoc-ref %build-inputs "ecj-bootstrap")
621 "/share/java/ecj-bootstrap.jar")
622 (string-append "JAVAC="
623 (assoc-ref %build-inputs "ecj-javac-wrapper")
625 (string-append "JAVA="
626 (assoc-ref %build-inputs "jamvm")
629 "ac_cv_prog_java_works=yes" ; trust me
633 "--disable-gconf-peer"
639 (modify-phases %standard-phases
640 (add-after 'install 'install-data
641 (lambda _ (invoke "make" "install-data"))))))
643 `(("ecj-bootstrap" ,ecj-bootstrap)
644 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
646 ("jamvm" ,jamvm-1-bootstrap)
647 ("classpath" ,classpath-bootstrap)
649 ("pkg-config" ,pkg-config)))))
651 ;; We need this because classpath-bootstrap does not provide all of the tools
652 ;; we need to build classpath-devel.
653 (define classpath-jamvm-wrappers
654 (package (inherit classpath-0.99)
655 (name "classpath-jamvm-wrappers")
657 (build-system trivial-build-system)
659 `(#:modules ((guix build utils))
662 (use-modules (guix build utils))
663 (let* ((bash (assoc-ref %build-inputs "bash"))
664 (jamvm (assoc-ref %build-inputs "jamvm"))
665 (classpath (assoc-ref %build-inputs "classpath"))
666 (bin (string-append (assoc-ref %outputs "out")
669 (for-each (lambda (tool)
670 (with-output-to-file (string-append bin tool)
672 ,@(if (string-prefix? "armhf" (or (%current-system)
673 (%current-target-system)))
674 `((format #t "#!~a/bin/sh
675 ~a/bin/jamvm -Xnocompact -classpath ~a/share/classpath/tools.zip \
676 gnu.classpath.tools.~a.~a $@"
677 bash jamvm classpath tool
678 (if (string=? "native2ascii" tool)
679 "Native2ASCII" "Main")))
680 `((format #t "#!~a/bin/sh
681 ~a/bin/jamvm -Xnocompact -Xnoinlining -classpath ~a/share/classpath/tools.zip \
682 gnu.classpath.tools.~a.~a $@"
683 bash jamvm classpath tool
684 (if (string=? "native2ascii" tool)
685 "Native2ASCII" "Main"))))))
686 (chmod (string-append bin tool) #o755))
696 ("jamvm" ,jamvm-1-bootstrap)
697 ("classpath" ,classpath-0.99)))
699 (synopsis "Executables from GNU Classpath")
700 (description "This package provides wrappers around the tools provided by
701 the GNU Classpath library. They are executed by the JamVM virtual
704 ;; The last release of GNU Classpath is 0.99 and it happened in 2012. Since
705 ;; then Classpath has gained much more support for Java 1.6.
706 (define-public classpath-devel
707 (let ((commit "e7c13ee0cf2005206fbec0eca677f8cf66d5a103")
709 (package (inherit classpath-bootstrap)
710 (version (string-append "0.99-" revision "." (string-take commit 9)))
714 (url "https://git.savannah.gnu.org/git/classpath.git")
716 (file-name (string-append "classpath-" version "-checkout"))
719 "1v2rww76ww322mpg3s12a1kkc6gkp31bm9gcxs532h0wq285fiw4"))
720 (patches (search-patches "classpath-aarch64-support.patch"))))
723 ;; Ensure that the initial heap size is smaller than the maximum
724 ;; size. By default only Xmx is set, which can lead to invalid
725 ;; memory settings on some machines with a lot of memory.
726 '("JAVAC_MEM_OPT=-J-Xms512M -J-Xmx768M")
728 (list (string-append "--with-ecj-jar="
729 (assoc-ref %build-inputs "ecj-bootstrap")
730 "/share/java/ecj-bootstrap.jar")
731 (string-append "--with-javac="
732 (assoc-ref %build-inputs "ecj-javac-wrapper")
734 (string-append "JAVA="
735 (assoc-ref %build-inputs "jamvm")
738 "ac_cv_prog_java_works=yes" ; trust me
742 "--disable-gconf-peer"
748 (modify-phases %standard-phases
749 ;; XXX The bootstrap phase executes autogen.sh, which fails after
750 ;; complaining about the lack of gettext.
752 (lambda _ (invoke "autoreconf" "-vif")))
753 (add-after 'unpack 'remove-unsupported-annotations
755 (substitute* (find-files "java" "\\.java$")
758 (add-after 'install 'install-data
759 (lambda _ (invoke "make" "install-data"))))))
761 `(("autoconf" ,autoconf)
762 ("automake" ,automake)
764 ("gettext" ,gettext-minimal)
766 ("classpath-jamvm-wrappers" ,classpath-jamvm-wrappers) ; for javah
767 ("ecj-bootstrap" ,ecj-bootstrap)
768 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
770 ("jamvm" ,jamvm-1-bootstrap)
772 ("pkg-config" ,pkg-config))))))
775 (package (inherit jamvm-1-bootstrap)
779 (uri (string-append "mirror://sourceforge/jamvm/jamvm/"
780 "JamVM%20" version "/jamvm-"
784 "1nl0zxz8y5x8gwsrm7n32bry4dx8x70p8z3s9jbdvs8avyb8whkn"))
786 (search-patches "jamvm-2.0.0-disable-branch-patching.patch"
787 "jamvm-2.0.0-opcode-guard.patch"
788 "jamvm-2.0.0-aarch64-support.patch"))
791 ;; Remove precompiled software.
792 (delete-file "src/classlib/gnuclasspath/lib/classes.zip")
794 (build-system gnu-build-system)
796 (substitute-keyword-arguments (package-arguments jamvm-1-bootstrap)
797 ((#:configure-flags _)
798 '(list (string-append "--with-classpath-install-dir="
799 (assoc-ref %build-inputs "classpath"))))))
801 `(("classpath" ,classpath-devel)
802 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
806 (define ecj-javac-wrapper-final
807 (package (inherit ecj-javac-wrapper)
809 `(("guile" ,guile-2.2)
810 ("ecj-bootstrap" ,ecj-bootstrap)
812 ("classpath" ,classpath-devel)))))
814 ;; The bootstrap JDK consisting of jamvm, classpath-devel,
815 ;; ecj-javac-wrapper-final cannot build Icedtea 2.x directly, because it's
816 ;; written in Java 7. It can, however, build the unmaintained Icedtea 1.x,
817 ;; which uses Java 6 only.
818 (define-public icedtea-6
825 "http://icedtea.wildebeest.org/download/source/icedtea6-"
829 "0bg9sb4f7qbq77c0zf9m17p47ga0kf0r9622g9p12ysg26jd1ksg"))
830 (patches (search-patches
831 "icedtea-6-extend-hotspot-aarch64-support.patch"))
832 (modules '((guix build utils)))
835 (substitute* "Makefile.in"
836 ;; do not leak information about the build host
837 (("DISTRIBUTION_ID=\"\\$\\(DIST_ID\\)\"")
838 "DISTRIBUTION_ID=\"\\\"guix\\\"\""))
840 (build-system gnu-build-system)
841 (outputs '("out" ; Java Runtime Environment
842 "jdk" ; Java Development Kit
843 "doc")) ; all documentation
845 `(;; There are many failing tests and many are known to fail upstream.
848 ;; The DSOs use $ORIGIN to refer to each other, but (guix build
849 ;; gremlin) doesn't support it yet, so skip this phase.
850 #:validate-runpath? #f
852 #:modules ((guix build utils)
853 (guix build gnu-build-system)
857 `("--enable-bootstrap"
860 ,(string-append "--with-parallel-jobs="
861 (number->string (parallel-job-count)))
862 "--disable-downloading"
864 ,(string-append "--with-ecj="
865 (assoc-ref %build-inputs "ecj")
866 "/share/java/ecj-bootstrap.jar")
867 ,(string-append "--with-jar="
868 (assoc-ref %build-inputs "fastjar")
870 ,(string-append "--with-jdk-home="
871 (assoc-ref %build-inputs "classpath"))
872 ,(string-append "--with-java="
873 (assoc-ref %build-inputs "jamvm")
876 (modify-phases %standard-phases
878 (lambda* (#:key source inputs #:allow-other-keys)
879 (invoke "tar" "xvf" source)
880 (chdir (string-append "icedtea6-" ,version))
882 (copy-recursively (assoc-ref inputs "openjdk-src") "openjdk")
883 ;; The convenient OpenJDK source bundle is no longer
884 ;; available for download, so we have to take the sources
885 ;; from the Mercurial repositories and change the Makefile
886 ;; to avoid tests for the OpenJDK zip archive.
887 (with-directory-excursion "openjdk"
888 (for-each (lambda (part)
892 (string-append part "-src"))
894 '("jdk" "hotspot" "corba"
895 "langtools" "jaxp" "jaxws")))
896 (substitute* "patches/freetypeversion.patch"
897 (("REQUIRED_FREETYPE_VERSION = 2.2.1")
898 "REQUIRED_FREETYPE_VERSION = 2.10.1"))
899 (substitute* "Makefile.in"
900 (("echo \"ERROR: No up-to-date OpenJDK zip available\"; exit -1;")
901 "echo \"trust me\";")
902 ;; The contents of the bootstrap directory must be
903 ;; writeable but when copying from the store they are
905 (("mkdir -p lib/rt" line)
906 (string-append line "; chmod -R u+w $(BOOT_DIR)")))
907 (invoke "chmod" "-R" "u+w" "openjdk")))
908 (add-after 'unpack 'use-classpath
909 (lambda* (#:key inputs #:allow-other-keys)
910 (let ((jvmlib (assoc-ref inputs "classpath"))
911 (jamvm (assoc-ref inputs "jamvm")))
912 ;; Classpath does not provide rt.jar.
913 (substitute* "Makefile.in"
914 (("\\$\\(SYSTEM_JDK_DIR\\)/jre/lib/rt.jar")
915 (string-append jvmlib "/share/classpath/glibj.zip")))
916 ;; Make sure we can find all classes.
918 (string-append jvmlib "/share/classpath/glibj.zip:"
919 jvmlib "/share/classpath/tools.zip:"
920 jamvm "/lib/rt.jar"))
922 (string-append "-cp "
923 jvmlib "/share/classpath/glibj.zip:"
924 jvmlib "/share/classpath/tools.zip")))
926 (add-after 'unpack 'patch-patches
928 ;; shebang in patches so that they apply cleanly
929 (substitute* '("patches/jtreg-jrunscript.patch"
930 "patches/hotspot/hs23/drop_unlicensed_test.patch")
931 (("#!/bin/sh") (string-append "#!" (which "sh"))))
933 (add-after 'unpack 'patch-paths
934 (lambda* (#:key inputs #:allow-other-keys)
935 ;; buildtree.make generates shell scripts, so we need to replace
936 ;; the generated shebang
937 (substitute* '("openjdk/hotspot/make/linux/makefiles/buildtree.make")
938 (("/bin/sh") (which "bash")))
940 (let ((corebin (string-append
941 (assoc-ref inputs "coreutils") "/bin/"))
942 (binbin (string-append
943 (assoc-ref inputs "binutils") "/bin/"))
944 (grepbin (string-append
945 (assoc-ref inputs "grep") "/bin/")))
946 (substitute* '("openjdk/jdk/make/common/shared/Defs-linux.gmk"
947 "openjdk/corba/make/common/shared/Defs-linux.gmk")
948 (("UNIXCOMMAND_PATH = /bin/")
949 (string-append "UNIXCOMMAND_PATH = " corebin))
950 (("USRBIN_PATH = /usr/bin/")
951 (string-append "USRBIN_PATH = " corebin))
952 (("DEVTOOLS_PATH *= */usr/bin/")
953 (string-append "DEVTOOLS_PATH = " corebin))
954 (("COMPILER_PATH *= */usr/bin/")
955 (string-append "COMPILER_PATH = "
956 (assoc-ref inputs "gcc") "/bin/"))
957 (("DEF_OBJCOPY *=.*objcopy")
958 (string-append "DEF_OBJCOPY = " (which "objcopy"))))
960 ;; fix path to alsa header
961 (substitute* "openjdk/jdk/make/common/shared/Sanity.gmk"
962 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
963 (string-append "ALSA_INCLUDE="
964 (assoc-ref inputs "alsa-lib")
965 "/include/alsa/version.h")))
967 ;; fix hard-coded utility paths
968 (substitute* '("openjdk/jdk/make/common/shared/Defs-utils.gmk"
969 "openjdk/corba/make/common/shared/Defs-utils.gmk")
971 (string-append "ECHO = " (which "echo")))
973 (string-append "GREP = " (which "grep")))
975 (string-append "EGREP = " (which "egrep")))
977 (string-append "CPIO = " (which "cpio")))
978 (("READELF *=.*readelf")
979 (string-append "READELF = " (which "readelf")))
981 (string-append "AR = " (which "ar")))
983 (string-append "TAR = " (which "tar")))
985 (string-append "AS = " (which "as")))
987 (string-append "LD = " (which "ld")))
989 (string-append "STRIP = " (which "strip")))
991 (string-append "NM = " (which "nm")))
993 (string-append "SH = " (which "bash")))
995 (string-append "FIND = " (which "find")))
997 (string-append "LDD = " (which "ldd")))
998 (("NAWK *=.*(n|g)awk")
999 (string-append "NAWK = " (which "gawk")))
1000 (("XARGS *=.*xargs")
1001 (string-append "XARGS = " (which "xargs")))
1002 (("UNZIP *=.*unzip")
1003 (string-append "UNZIP = " (which "unzip")))
1005 (string-append "ZIPEXE = " (which "zip")))
1007 (string-append "SED = " (which "sed"))))
1009 ;; Some of these timestamps cause problems as they are more than
1010 ;; 10 years ago, failing the build process.
1012 "openjdk/jdk/src/share/classes/java/util/CurrencyData.properties"
1013 (("AZ=AZM;2005-12-31-20-00-00;AZN") "AZ=AZN")
1014 (("MZ=MZM;2006-06-30-22-00-00;MZN") "MZ=MZN")
1015 (("RO=ROL;2005-06-30-21-00-00;RON") "RO=RON")
1016 (("TR=TRL;2004-12-31-22-00-00;TRY") "TR=TRY"))
1018 (add-before 'configure 'set-additional-paths
1019 (lambda* (#:key inputs #:allow-other-keys)
1021 (string-append (assoc-ref inputs "libxrender")
1022 "/include/X11/extensions" ":"
1023 (assoc-ref inputs "libxtst")
1024 "/include/X11/extensions" ":"
1025 (assoc-ref inputs "libxinerama")
1026 "/include/X11/extensions" ":"
1027 (or (getenv "CPATH") "")))
1028 (setenv "ALT_CUPS_HEADERS_PATH"
1029 (string-append (assoc-ref inputs "cups")
1031 (setenv "ALT_FREETYPE_HEADERS_PATH"
1032 (string-append (assoc-ref inputs "freetype")
1034 (setenv "ALT_FREETYPE_LIB_PATH"
1035 (string-append (assoc-ref inputs "freetype")
1038 (add-before 'build 'disable-os-version-check
1039 ;; allow build on linux major version change
1041 (setenv "DISABLE_HOTSPOT_OS_VERSION_CHECK" "ok")
1044 (lambda* (#:key outputs #:allow-other-keys)
1045 (let ((doc (string-append (assoc-ref outputs "doc")
1046 "/share/doc/icedtea"))
1047 (jre (assoc-ref outputs "out"))
1048 (jdk (assoc-ref outputs "jdk")))
1049 (copy-recursively "openjdk.build/docs" doc)
1050 (copy-recursively "openjdk.build/j2re-image" jre)
1051 (copy-recursively "openjdk.build/j2sdk-image" jdk))
1054 `(("ant" ,ant-bootstrap)
1055 ("alsa-lib" ,alsa-lib)
1057 ("classpath" ,classpath-devel)
1058 ("coreutils" ,coreutils)
1061 ("ecj" ,ecj-bootstrap)
1062 ("ecj-javac" ,ecj-javac-wrapper-final)
1063 ("fastjar" ,fastjar)
1064 ("fontconfig" ,fontconfig)
1065 ("freetype" ,freetype)
1072 ("libjpeg" ,libjpeg-turbo)
1075 ("libtool" ,libtool)
1077 ("libxcomposite" ,libxcomposite)
1079 ("libxinerama" ,libxinerama)
1080 ("libxrender" ,libxrender)
1081 ("libxslt" ,libxslt) ;for xsltproc
1083 ("libxtst" ,libxtst)
1084 ("mit-krb5" ,mit-krb5)
1086 ("nss-certs" ,nss-certs)
1088 ("pkg-config" ,pkg-config)
1089 ("procps" ,procps) ;for "free", even though I'm not sure we should use it
1099 (url "http://hg.openjdk.java.net/jdk6/jdk6/")
1100 (changeset "jdk6-b41")))
1103 "14q47yfg586fs64w30g8mk92m5dkxsvr36zzh0ra99xk5x0x96mv"))))
1108 (url "http://hg.openjdk.java.net/jdk6/jdk6/jdk/")
1109 (changeset "jdk6-b41")))
1112 "165824nhg1k1dx6zs9dny0j49rmk35jw5b13dmz8c77jfajml4v9"))))
1117 (url "http://hg.openjdk.java.net/jdk6/jdk6/hotspot/")
1118 (changeset "jdk6-b41")))
1121 "07lc1z4k5dj9nrc1wvwmpvxr3xgxrdkdh53xb95skk5ij49yagfd"))))
1126 (url "http://hg.openjdk.java.net/jdk6/jdk6/corba/")
1127 (changeset "jdk6-b41")))
1130 "1p9g1r9dnax2iwp7yb59qx7m4nmshqhwmrb2b8jj8zgbd9dl2i3q"))))
1135 (url "http://hg.openjdk.java.net/jdk6/jdk6/langtools/")
1136 (changeset "jdk6-b41")))
1139 "1x52wd67fynbbd9ild6fb4wvba3f5hhwk03qdjfazd0a1qr37z3d"))))
1144 (url "http://hg.openjdk.java.net/jdk6/jdk6/jaxp/")
1145 (changeset "jdk6-b41")))
1148 "0shlqrvzpr4nrkmv215lbxnby63s3yvbdh1yxcayznsyqwa4nlxm"))))
1153 (url "http://hg.openjdk.java.net/jdk6/jdk6/jaxws/")
1154 (changeset "jdk6-b41")))
1157 "0835lkw8vib1xhp8lxnybhlvzdh699hbi4mclxanydjk63zbpxk0"))))))
1158 (home-page "http://icedtea.classpath.org")
1159 (synopsis "Java development kit")
1161 "This package provides the OpenJDK built with the IcedTea build harness.
1162 This version of the OpenJDK is no longer maintained and is only used for
1163 bootstrapping purposes.")
1164 ;; IcedTea is released under the GPL2 + Classpath exception, which is the
1165 ;; same license as both GNU Classpath and OpenJDK.
1166 (license license:gpl2+)))
1168 (define-public icedtea-7
1169 (let* ((version "2.6.13")
1170 (drop (lambda (name hash)
1174 "http://icedtea.classpath.org/download/drops"
1175 "/icedtea7/" version "/" name ".tar.bz2"))
1176 (sha256 (base32 hash))))))
1183 "http://icedtea.wildebeest.org/download/source/icedtea-"
1187 "1w331rdqx1dcx2xb0fmjmrkdc71xqn20fxsgw8by4xhiblh88khh"))
1188 (modules '((guix build utils)))
1191 (substitute* "Makefile.in"
1192 ;; do not leak information about the build host
1193 (("DISTRIBUTION_ID=\"\\$\\(DIST_ID\\)\"")
1194 "DISTRIBUTION_ID=\"\\\"guix\\\"\""))
1196 (build-system gnu-build-system)
1197 (outputs '("out" ; Java Runtime Environment
1198 "jdk" ; Java Development Kit
1199 "doc")) ; all documentation
1201 `(;; There are many test failures. Some are known to
1202 ;; fail upstream, others relate to not having an X
1203 ;; server running at test time, yet others are a
1204 ;; complete mystery to me.
1206 ;; hotspot: passed: 241; failed: 45; error: 2
1207 ;; langtools: passed: 1,934; failed: 26
1211 ;; The DSOs use $ORIGIN to refer to each other, but (guix build
1212 ;; gremlin) doesn't support it yet, so skip this phase.
1213 #:validate-runpath? #f
1215 ;; Apparently, the C locale is needed for some of the tests.
1218 #:modules ((guix build utils)
1219 (guix build gnu-build-system)
1226 ;; TODO: package pcsc and sctp, and add to inputs
1227 `("--disable-system-pcsc"
1228 "--disable-system-sctp"
1229 "--enable-bootstrap"
1232 ,(string-append "--with-parallel-jobs="
1233 (number->string (parallel-job-count)))
1234 "--disable-downloading"
1235 "--disable-tests" ;they are run in the check phase instead
1236 "--with-openjdk-src-dir=./openjdk.src"
1237 ,(string-append "--with-jdk-home="
1238 (assoc-ref %build-inputs "jdk")))
1241 (modify-phases %standard-phases
1243 (lambda* (#:key source inputs #:allow-other-keys)
1244 (let ((target (string-append "icedtea-" ,version))
1245 (unpack (lambda* (name #:optional dir)
1247 (string-drop-right name 5))))
1250 (assoc-ref inputs name)
1252 "--strip-components=1")))))
1254 (invoke "tar" "xvf" source
1255 "-C" target "--strip-components=1")
1257 (unpack "openjdk-src" "openjdk.src")
1258 (with-directory-excursion "openjdk.src"
1260 (filter (cut string-suffix? "-drop" <>)
1265 (add-after 'unpack 'patch-bitrot
1267 (substitute* '("patches/boot/revert-6973616.patch"
1268 "openjdk.src/jdk/make/common/shared/Defs-versions.gmk")
1269 (("REQUIRED_FREETYPE_VERSION = 2.2.1")
1270 "REQUIRED_FREETYPE_VERSION = 2.10.1"))
1271 ;; As of attr 2.4.48 this header is no longer
1272 ;; included. It is provided by the libc instead.
1273 (substitute* '("configure"
1274 "openjdk.src/jdk/src/solaris/native/sun/nio/fs/LinuxNativeDispatcher.c")
1275 (("attr/xattr.h") "sys/xattr.h"))
1277 (add-after 'unpack 'fix-x11-extension-include-path
1278 (lambda* (#:key inputs #:allow-other-keys)
1279 (substitute* "openjdk.src/jdk/make/sun/awt/mawt.gmk"
1280 (((string-append "\\$\\(firstword \\$\\(wildcard "
1281 "\\$\\(OPENWIN_HOME\\)"
1282 "/include/X11/extensions\\).*$"))
1283 (string-append (assoc-ref inputs "libxrender")
1284 "/include/X11/extensions"
1285 " -I" (assoc-ref inputs "libxtst")
1286 "/include/X11/extensions"
1287 " -I" (assoc-ref inputs "libxinerama")
1288 "/include/X11/extensions"))
1289 (("\\$\\(wildcard /usr/include/X11/extensions\\)\\)") ""))
1291 (add-after 'unpack 'patch-paths
1293 ;; buildtree.make generates shell scripts, so we need to replace
1294 ;; the generated shebang
1295 (substitute* '("openjdk.src/hotspot/make/linux/makefiles/buildtree.make")
1296 (("/bin/sh") (which "bash")))
1298 (let ((corebin (string-append
1299 (assoc-ref %build-inputs "coreutils") "/bin/"))
1300 (binbin (string-append
1301 (assoc-ref %build-inputs "binutils") "/bin/"))
1302 (grepbin (string-append
1303 (assoc-ref %build-inputs "grep") "/bin/")))
1304 (substitute* '("openjdk.src/jdk/make/common/shared/Defs-linux.gmk"
1305 "openjdk.src/corba/make/common/shared/Defs-linux.gmk")
1306 (("UNIXCOMMAND_PATH = /bin/")
1307 (string-append "UNIXCOMMAND_PATH = " corebin))
1308 (("USRBIN_PATH = /usr/bin/")
1309 (string-append "USRBIN_PATH = " corebin))
1310 (("DEVTOOLS_PATH *= */usr/bin/")
1311 (string-append "DEVTOOLS_PATH = " corebin))
1312 (("COMPILER_PATH *= */usr/bin/")
1313 (string-append "COMPILER_PATH = "
1314 (assoc-ref %build-inputs "gcc") "/bin/"))
1315 (("DEF_OBJCOPY *=.*objcopy")
1316 (string-append "DEF_OBJCOPY = " (which "objcopy"))))
1318 ;; fix path to alsa header
1319 (substitute* "openjdk.src/jdk/make/common/shared/Sanity.gmk"
1320 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
1321 (string-append "ALSA_INCLUDE="
1322 (assoc-ref %build-inputs "alsa-lib")
1323 "/include/alsa/version.h")))
1325 ;; fix hard-coded utility paths
1326 (substitute* '("openjdk.src/jdk/make/common/shared/Defs-utils.gmk"
1327 "openjdk.src/corba/make/common/shared/Defs-utils.gmk")
1329 (string-append "ECHO = " (which "echo")))
1331 (string-append "GREP = " (which "grep")))
1332 (("EGREP *=.*egrep")
1333 (string-append "EGREP = " (which "egrep")))
1335 (string-append "CPIO = " (which "cpio")))
1336 (("READELF *=.*readelf")
1337 (string-append "READELF = " (which "readelf")))
1339 (string-append "AR = " (which "ar")))
1341 (string-append "TAR = " (which "tar")))
1343 (string-append "AS = " (which "as")))
1345 (string-append "LD = " (which "ld")))
1346 (("STRIP *=.*strip")
1347 (string-append "STRIP = " (which "strip")))
1349 (string-append "NM = " (which "nm")))
1351 (string-append "SH = " (which "bash")))
1353 (string-append "FIND = " (which "find")))
1355 (string-append "LDD = " (which "ldd")))
1356 (("NAWK *=.*(n|g)awk")
1357 (string-append "NAWK = " (which "gawk")))
1358 (("XARGS *=.*xargs")
1359 (string-append "XARGS = " (which "xargs")))
1360 (("UNZIP *=.*unzip")
1361 (string-append "UNZIP = " (which "unzip")))
1363 (string-append "ZIPEXE = " (which "zip")))
1365 (string-append "SED = " (which "sed"))))
1367 ;; Some of these timestamps cause problems as they are more than
1368 ;; 10 years ago, failing the build process.
1370 "openjdk.src/jdk/src/share/classes/java/util/CurrencyData.properties"
1371 (("AZ=AZM;2005-12-31-20-00-00;AZN") "AZ=AZN")
1372 (("MZ=MZM;2006-06-30-22-00-00;MZN") "MZ=MZN")
1373 (("RO=ROL;2005-06-30-21-00-00;RON") "RO=RON")
1374 (("TR=TRL;2004-12-31-22-00-00;TRY") "TR=TRY")))
1376 (add-before 'configure 'set-additional-paths
1377 (lambda* (#:key inputs #:allow-other-keys)
1378 (substitute* "openjdk.src/jdk/make/common/shared/Sanity.gmk"
1379 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
1380 (string-append "ALSA_INCLUDE="
1381 (assoc-ref inputs "alsa-lib")
1382 "/include/alsa/version.h")))
1385 (string-append (assoc-ref inputs "libxcomposite")
1386 "/include/X11/extensions" ":"
1387 (assoc-ref inputs "libxrender")
1388 "/include/X11/extensions" ":"
1389 (assoc-ref inputs "libxtst")
1390 "/include/X11/extensions" ":"
1391 (assoc-ref inputs "libxinerama")
1392 "/include/X11/extensions" ":"
1393 (or (getenv "CPATH") "")))
1394 (setenv "ALT_OBJCOPY" (which "objcopy"))
1395 (setenv "ALT_CUPS_HEADERS_PATH"
1396 (string-append (assoc-ref inputs "cups")
1398 (setenv "ALT_FREETYPE_HEADERS_PATH"
1399 (string-append (assoc-ref inputs "freetype")
1401 (setenv "ALT_FREETYPE_LIB_PATH"
1402 (string-append (assoc-ref inputs "freetype")
1405 (add-before 'build 'disable-os-version-check
1406 ;; allow build on linux major version change
1408 (setenv "DISABLE_HOTSPOT_OS_VERSION_CHECK" "ok")
1410 (add-before 'check 'fix-test-framework
1412 ;; Fix PATH in test environment
1413 (substitute* "test/jtreg/com/sun/javatest/regtest/Main.java"
1414 (("PATH=/bin:/usr/bin")
1415 (string-append "PATH=" (getenv "PATH"))))
1416 (substitute* "test/jtreg/com/sun/javatest/util/SysEnv.java"
1417 (("/usr/bin/env") (which "env")))
1418 (substitute* "openjdk.src/hotspot/test/test_env.sh"
1419 (("/bin/rm") (which "rm"))
1420 (("/bin/cp") (which "cp"))
1421 (("/bin/mv") (which "mv")))
1423 (add-before 'check 'fix-hotspot-tests
1425 (with-directory-excursion "openjdk.src/hotspot/test/"
1426 (substitute* "jprt.config"
1427 (("PATH=\"\\$\\{path4sdk\\}\"")
1428 (string-append "PATH=" (getenv "PATH")))
1429 (("make=/usr/bin/make")
1430 (string-append "make=" (which "make"))))
1431 (substitute* '("runtime/6626217/Test6626217.sh"
1432 "runtime/7110720/Test7110720.sh")
1433 (("/bin/rm") (which "rm"))
1434 (("/bin/cp") (which "cp"))
1435 (("/bin/mv") (which "mv"))))
1437 (add-before 'check 'fix-jdk-tests
1439 (with-directory-excursion "openjdk.src/jdk/test/"
1440 (substitute* "com/sun/jdi/JdbReadTwiceTest.sh"
1441 (("/bin/pwd") (which "pwd")))
1442 (substitute* "com/sun/jdi/ShellScaffold.sh"
1443 (("/bin/kill") (which "kill")))
1444 (substitute* "start-Xvfb.sh"
1445 ;;(("/usr/bin/X11/Xvfb") (which "Xvfb"))
1446 (("/usr/bin/nohup") (which "nohup")))
1447 (substitute* "javax/security/auth/Subject/doAs/Test.sh"
1448 (("/bin/rm") (which "rm")))
1449 (substitute* "tools/launcher/MultipleJRE.sh"
1450 (("echo \"#!/bin/sh\"")
1451 (string-append "echo \"#!" (which "rm") "\""))
1452 (("/usr/bin/zip") (which "zip")))
1453 (substitute* "com/sun/jdi/OnThrowTest.java"
1454 (("#!/bin/sh") (string-append "#!" (which "sh"))))
1455 (substitute* "java/lang/management/OperatingSystemMXBean/GetSystemLoadAverage.java"
1456 (("/usr/bin/uptime") (which "uptime")))
1457 (substitute* "java/lang/ProcessBuilder/Basic.java"
1458 (("/usr/bin/env") (which "env"))
1459 (("/bin/false") (which "false"))
1460 (("/bin/true") (which "true"))
1461 (("/bin/cp") (which "cp"))
1462 (("/bin/sh") (which "sh")))
1463 (substitute* "java/lang/ProcessBuilder/FeelingLucky.java"
1464 (("/bin/sh") (which "sh")))
1465 (substitute* "java/lang/ProcessBuilder/Zombies.java"
1466 (("/usr/bin/perl") (which "perl"))
1467 (("/bin/ps") (which "ps"))
1468 (("/bin/true") (which "true")))
1469 (substitute* "java/lang/Runtime/exec/ConcurrentRead.java"
1470 (("/usr/bin/tee") (which "tee")))
1471 (substitute* "java/lang/Runtime/exec/ExecWithDir.java"
1472 (("/bin/true") (which "true")))
1473 (substitute* "java/lang/Runtime/exec/ExecWithInput.java"
1474 (("/bin/cat") (which "cat")))
1475 (substitute* "java/lang/Runtime/exec/ExitValue.java"
1476 (("/bin/sh") (which "sh"))
1477 (("/bin/true") (which "true"))
1478 (("/bin/kill") (which "kill")))
1479 (substitute* "java/lang/Runtime/exec/LotsOfDestroys.java"
1480 (("/usr/bin/echo") (which "echo")))
1481 (substitute* "java/lang/Runtime/exec/LotsOfOutput.java"
1482 (("/usr/bin/cat") (which "cat")))
1483 (substitute* "java/lang/Runtime/exec/SleepyCat.java"
1484 (("/bin/cat") (which "cat"))
1485 (("/bin/sleep") (which "sleep"))
1486 (("/bin/sh") (which "sh")))
1487 (substitute* "java/lang/Runtime/exec/StreamsSurviveDestroy.java"
1488 (("/bin/cat") (which "cat")))
1489 (substitute* "java/rmi/activation/CommandEnvironment/SetChildEnv.java"
1490 (("/bin/chmod") (which "chmod")))
1491 (substitute* "java/util/zip/ZipFile/Assortment.java"
1492 (("/bin/sh") (which "sh"))))
1496 ;; The "make check-*" targets always return zero, so we need to
1497 ;; check for errors in the associated log files to determine
1498 ;; whether any tests have failed.
1499 (use-modules (ice-9 rdelim))
1500 (let* ((error-pattern (make-regexp "^(Error|FAILED):.*"))
1501 (checker (lambda (port)
1503 (let ((line (read-line port)))
1505 ((eof-object? line) #t)
1506 ((regexp-exec error-pattern line)
1507 (error "test failed"))
1509 (run-test (lambda (test)
1510 (invoke "make" test)
1511 (call-with-input-file
1512 (string-append "test/" test ".log")
1514 (when #f ; skip tests
1515 (run-test "check-hotspot")
1516 (run-test "check-langtools")
1517 (run-test "check-jdk"))
1520 (lambda* (#:key outputs #:allow-other-keys)
1521 (let ((doc (string-append (assoc-ref outputs "doc")
1522 "/share/doc/icedtea"))
1523 (jre (assoc-ref outputs "out"))
1524 (jdk (assoc-ref outputs "jdk")))
1525 (copy-recursively "openjdk.build/docs" doc)
1526 (copy-recursively "openjdk.build/j2re-image" jre)
1527 (copy-recursively "openjdk.build/j2sdk-image" jdk))
1529 ;; Some of the libraries in the lib/amd64 folder link to libjvm.so.
1530 ;; But that shared object is located in the server/ folder, so it
1531 ;; cannot be found. This phase creates a symbolic link in the
1532 ;; lib/amd64 folder so that the other libraries can find it.
1535 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
1537 ;; FIXME: Find the bug in the build system, so that this symlink is
1539 (add-after 'install 'install-libjvm
1540 (lambda* (#:key inputs outputs #:allow-other-keys)
1541 (let* ((lib-path (string-append (assoc-ref outputs "out")
1542 ;; See 'INSTALL_ARCH_DIR' in
1544 ,(match (%current-system)
1553 ;; We need a catch-all, dropping
1554 ;; '-linux' works in most cases.
1559 (%current-system) 6)))))))
1560 (symlink (string-append lib-path "/server/libjvm.so")
1561 (string-append lib-path "/libjvm.so")))
1563 ;; By default IcedTea only generates an empty keystore. In order to
1564 ;; be able to use certificates in Java programs we need to generate a
1565 ;; keystore from a set of certificates. For convenience we use the
1566 ;; certificates from the nss-certs package.
1567 (add-after 'install 'install-keystore
1568 (lambda* (#:key inputs outputs #:allow-other-keys)
1569 (let* ((keystore "cacerts")
1570 (certs-dir (string-append (assoc-ref inputs "nss-certs")
1572 (keytool (string-append (assoc-ref outputs "jdk")
1574 (define (extract-cert file target)
1575 (call-with-input-file file
1577 (call-with-output-file target
1579 (let loop ((line (read-line in 'concat))
1582 ((eof-object? line) #t)
1583 ((string-prefix? "-----BEGIN" line)
1585 (loop (read-line in 'concat) #t))
1586 ((string-prefix? "-----END" line)
1590 (when copying? (display line out))
1591 (loop (read-line in 'concat) copying?)))))))))
1592 (define (import-cert cert)
1593 (format #t "Importing certificate ~a\n" (basename cert))
1594 (let ((temp "tmpcert"))
1595 (extract-cert cert temp)
1596 (let ((port (open-pipe* OPEN_WRITE keytool
1598 "-alias" (basename cert)
1599 "-keystore" keystore
1600 "-storepass" "changeit"
1602 (display "yes\n" port)
1603 (when (not (zero? (status:exit-val (close-pipe port))))
1604 (format #t "failed to import ~a\n" cert)))
1605 (delete-file temp)))
1607 ;; This is necessary because the certificate directory contains
1608 ;; files with non-ASCII characters in their names.
1609 (setlocale LC_ALL "en_US.utf8")
1610 (setenv "LC_ALL" "en_US.utf8")
1612 (for-each import-cert (find-files certs-dir "\\.pem$"))
1613 (mkdir-p (string-append (assoc-ref outputs "out")
1615 (mkdir-p (string-append (assoc-ref outputs "jdk")
1616 "/jre/lib/security"))
1618 ;; The cacerts files we are going to overwrite are chmod'ed as
1619 ;; read-only (444) in icedtea-8 (which derives from this
1620 ;; package). We have to change this so we can overwrite them.
1621 (chmod (string-append (assoc-ref outputs "out")
1622 "/lib/security/" keystore) #o644)
1623 (chmod (string-append (assoc-ref outputs "jdk")
1624 "/jre/lib/security/" keystore) #o644)
1626 (install-file keystore
1627 (string-append (assoc-ref outputs "out")
1629 (install-file keystore
1630 (string-append (assoc-ref outputs "jdk")
1631 "/jre/lib/security"))
1636 "0l34ikyf62hbzlf9032alzkkqvf7bpmckz4gvirvph755w7gka8l"))
1639 "050gv2jbg1pi6qkn8w18bwpbklfa5b0kymjvan9pncddbj8m84fz"))
1642 "1k6yldwnxfzdg5926r1nlfv8d1r1j7rlp2nkz6gqh05vgyamnfhl"))
1645 "110j7jlz47x2gg6f7653x12mssan5kvj9l9h1m1c8c92drfxbqyk"))
1648 "0d1mca38ksxvdskp9im3pp7fdijhj1n3lwq9w13r9s4v3qyskgdd"))
1651 "0nq5236fzxn3p6x8cgncl56mzcmsj07q9gymysnws4c8byc6n0qj"))
1656 "http://icedtea.classpath.org/downloads/drops"
1657 "/icedtea7/" version "/hotspot.tar.bz2"))
1660 "17bdv39n4lh8l5737c96f3xgamx4y305m067p01cywgp7zaddqws"))
1661 (patches (search-patches
1662 "icedtea-7-hotspot-aarch64-use-c++98.patch"))))
1663 ("ant" ,ant-bootstrap)
1665 ("coreutils" ,coreutils)
1666 ("diffutils" ,diffutils) ;for tests
1669 ("libtool" ,libtool)
1670 ("pkg-config" ,pkg-config)
1676 ("fastjar" ,fastjar)
1677 ("libxslt" ,libxslt) ;for xsltproc
1678 ("nss-certs" ,nss-certs)
1680 ("procps" ,procps) ;for "free", even though I'm not sure we should use it
1681 ("jdk" ,icedtea-6 "jdk")))
1683 `(("alsa-lib" ,alsa-lib)
1686 ("libxcomposite" ,libxcomposite)
1688 ("libxtst" ,libxtst)
1690 ("libxinerama" ,libxinerama)
1691 ("libxrender" ,libxrender)
1692 ("libjpeg" ,libjpeg-turbo)
1694 ("mit-krb5" ,mit-krb5)
1697 ("fontconfig" ,fontconfig)
1698 ("freetype" ,freetype)
1702 (home-page "http://icedtea.classpath.org")
1703 (synopsis "Java development kit")
1705 "This package provides the Java development kit OpenJDK built with the
1706 IcedTea build harness.")
1708 ;; 'configure' lists "mips" and "mipsel", but not "mips64el'.
1709 (supported-systems (delete "mips64el-linux" %supported-systems))
1711 ;; IcedTea is released under the GPL2 + Classpath exception, which is the
1712 ;; same license as both GNU Classpath and OpenJDK.
1713 (license license:gpl2+))))
1715 (define-public icedtea-8
1716 (let* ((version "3.7.0")
1717 (drop (lambda (name hash)
1721 "http://icedtea.classpath.org/download/drops"
1722 "/icedtea8/" version "/" name ".tar.xz"))
1723 (sha256 (base32 hash))))))
1724 (package (inherit icedtea-7)
1729 "http://icedtea.wildebeest.org/download/source/icedtea-"
1733 "09yqzn8rpccs7cyv89hhy5zlznpgqw5x3jz0w1ccp0cz1vgs8l5w"))
1734 (modules '((guix build utils)))
1737 (substitute* '("configure"
1739 ;; Do not embed build time
1740 (("(DIST_ID=\"Custom build).*$" _ prefix)
1741 (string-append prefix "\"\n"))
1742 ;; Do not leak information about the build host
1743 (("DIST_NAME=\"\\$build_os\"")
1744 "DIST_NAME=\"guix\""))
1747 `(#:imported-modules
1748 ((guix build ant-build-system)
1749 (guix build syscalls)
1750 ,@%gnu-build-system-modules)
1751 ,@(substitute-keyword-arguments (package-arguments icedtea-7)
1752 ((#:modules modules)
1753 `((guix build utils)
1754 (guix build gnu-build-system)
1755 ((guix build ant-build-system) #:prefix ant:)
1760 ((#:configure-flags flags)
1761 `(let ((jdk (assoc-ref %build-inputs "jdk")))
1762 `( ;;"--disable-bootstrap"
1763 "--enable-bootstrap"
1765 ,(string-append "--with-parallel-jobs="
1766 (number->string (parallel-job-count)))
1767 "--disable-downloading"
1768 "--disable-system-pcsc"
1769 "--disable-system-sctp"
1770 "--disable-tests" ;they are run in the check phase instead
1771 "--with-openjdk-src-dir=./openjdk.src"
1772 ,(string-append "--with-jdk-home=" jdk))))
1774 `(modify-phases ,phases
1775 (delete 'fix-x11-extension-include-path)
1776 (delete 'patch-paths)
1777 (delete 'set-additional-paths)
1778 (delete 'patch-patches)
1779 (delete 'patch-bitrot)
1780 ;; Prevent the keytool from recording the current time when
1781 ;; adding certificates at build time.
1782 (add-after 'unpack 'patch-keystore
1784 (substitute* "openjdk.src/jdk/src/share/classes/sun/security/provider/JavaKeyStore.java"
1785 (("date = new Date\\(\\);")
1787 date = (System.getenv(\"SOURCE_DATE_EPOCH\") != null) ?\
1788 new Date(Long.parseLong(System.getenv(\"SOURCE_DATE_EPOCH\"))) :\
1791 (add-after 'unpack 'patch-jni-libs
1792 ;; Hardcode dynamically loaded libraries.
1794 (let* ((library-path (search-path-as-string->list
1795 (getenv "LIBRARY_PATH")))
1796 (find-library (lambda (name)
1799 (string-append "lib" name ".so")))))
1802 (catch 'decoding-error
1805 (("VERSIONED_JNI_LIB_NAME\\(\"(.*)\", \"(.*)\"\\)"
1807 (format #f "\"~a\"" (find-library name)))
1808 (("JNI_LIB_NAME\\(\"(.*)\"\\)" _ name)
1809 (format #f "\"~a\"" (find-library name)))))
1811 ;; Those are safe to skip.
1812 (format (current-error-port)
1813 "warning: failed to substitute: ~a~%"
1815 (find-files "openjdk.src/jdk/src/solaris/native"
1819 (lambda* (#:key outputs #:allow-other-keys)
1820 (let ((doc (string-append (assoc-ref outputs "doc")
1821 "/share/doc/icedtea"))
1822 (jre (assoc-ref outputs "out"))
1823 (jdk (assoc-ref outputs "jdk")))
1824 (copy-recursively "openjdk.build/docs" doc)
1825 (copy-recursively "openjdk.build/images/j2re-image" jre)
1826 (copy-recursively "openjdk.build/images/j2sdk-image" jdk)
1827 ;; Install the nss.cfg file to JRE to enable SSL/TLS
1829 (copy-file (string-append jdk "/jre/lib/security/nss.cfg")
1830 (string-append jre "/lib/security/nss.cfg"))
1832 (add-after 'install 'strip-jar-timestamps
1833 (assoc-ref ant:%standard-phases 'strip-jar-timestamps)))))))
1835 `(("jdk" ,icedtea-7 "jdk")
1838 "1mj6xgmw31i6qd30qi9dmv7160fbcfq5ikz1jwjihdg2793il19p"))
1841 "1wb8k5zm40zld0986dvmlh5xh3gyixbg9h26sl662zy92amhmyyg"))
1844 "11ma4zz0599cy70xd219v7a8vin7p96xrhhz3wsaw6cjhkzpagah"))
1847 "14m1y0z0fbm5z5zjw3vnq85py8dma84bi3f9cw8rhdyc6skk8q4i"))
1850 "09andnm6xaasnp963hgx42yiflifiljp9z7z85jrfyc5z8a5whmf"))
1853 "0s6lcpc0zckz2fnq98aqf28nz9y3wbi41a3kyaqqa2abwbkm1zwl"))
1856 "15wizy123vhk40chl1b4p552jf2pw2hdww0myf11qab425axz4nw"))
1859 "1ciz1w9j0kz7s1dxdhyqq71nla9icyz6qvn0b9z2zgkklqa98qmm"))
1862 "19pzl3ppaw8j6r5cnyp8qiw3hxijh3hdc46l39g5yfhdl4pr4hpa"))
1865 "0k33anxdzw1icn072wynfmmdjhsv50hay0j1sfkfxny12rb3vgdy"))
1866 ,@(fold alist-delete (package-native-inputs icedtea-7)
1867 '("jdk" "openjdk-src" "corba-drop" "jaxp-drop" "jaxws-drop"
1868 "jdk-drop" "langtools-drop" "hotspot-drop")))))))
1870 (define-public openjdk9
1876 (uri "https://hg.openjdk.java.net/jdk/jdk/archive/3cc80be736f2.tar.bz2")
1877 (file-name (string-append name "-" version ".tar.bz2"))
1880 "01ihmyf7k5z17wbr7xig7y40l9f01d5zjgkcmawn1102hw5kchpq"))
1881 (modules '((guix build utils)))
1884 (for-each delete-file
1885 (find-files "." ".*.(bin|exe|jar)$"))
1887 (build-system gnu-build-system)
1888 (outputs '("out" "jdk" "doc"))
1890 `(#:tests? #f; require jtreg
1891 #:make-flags '("all")
1893 ((guix build syscalls)
1894 ,@%gnu-build-system-modules)
1896 (modify-phases %standard-phases
1897 (add-after 'patch-source-shebangs 'fix-java-shebangs
1899 ;; This file was "fixed" by patch-source-shebangs, but it requires
1900 ;; this exact first line.
1901 (substitute* "jdk/make/data/blacklistedcertsconverter/blacklisted.certs.pem"
1902 (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))
1905 (lambda* (#:key inputs outputs #:allow-other-keys)
1906 ;; TODO: unbundle libpng and lcms
1907 (invoke "bash" "./configure"
1908 (string-append "--with-freetype=" (assoc-ref inputs "freetype"))
1909 "--disable-freetype-bundling"
1910 "--disable-warnings-as-errors"
1911 "--disable-hotspot-gtest"
1912 "--with-giflib=system"
1913 "--with-libjpeg=system"
1914 (string-append "--prefix=" (assoc-ref outputs "out")))
1916 (add-before 'build 'write-source-revision-file
1918 (with-output-to-file ".src-rev"
1920 (display ,version)))
1923 (lambda* (#:key make-flags parallel-build? #:allow-other-keys)
1924 (apply invoke "make"
1925 `(,@(if parallel-build?
1926 (list (string-append "JOBS="
1927 (number->string (parallel-job-count))))
1930 ;; Some of the libraries in the lib/ folder link to libjvm.so.
1931 ;; But that shared object is located in the server/ folder, so it
1932 ;; cannot be found. This phase creates a symbolic link in the
1933 ;; lib/ folder so that the other libraries can find it.
1936 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
1938 ;; FIXME: Find the bug in the build system, so that this symlink is
1940 (add-after 'install 'install-libjvm
1941 (lambda* (#:key inputs outputs #:allow-other-keys)
1942 (let* ((lib-out (string-append (assoc-ref outputs "out")
1944 (lib-jdk (string-append (assoc-ref outputs "jdk")
1946 (symlink (string-append lib-jdk "/server/libjvm.so")
1947 (string-append lib-jdk "/libjvm.so"))
1948 (symlink (string-append lib-out "/server/libjvm.so")
1949 (string-append lib-out "/libjvm.so")))
1952 (lambda* (#:key outputs #:allow-other-keys)
1953 (let ((out (assoc-ref outputs "out"))
1954 (jdk (assoc-ref outputs "jdk"))
1955 (doc (assoc-ref outputs "doc"))
1956 (images (car (find-files "build" ".*-server-release"
1957 #:directories? #t))))
1958 (copy-recursively (string-append images "/images/jdk") jdk)
1959 (copy-recursively (string-append images "/images/jre") out)
1960 (copy-recursively (string-append images "/images/docs") doc))
1962 (add-after 'install 'strip-zip-timestamps
1963 (lambda* (#:key outputs #:allow-other-keys)
1964 (use-modules (guix build syscalls))
1965 (for-each (lambda (zip)
1966 (let ((dir (mkdtemp! "zip-contents.XXXXXX")))
1967 (with-directory-excursion dir
1968 (invoke "unzip" zip))
1970 (for-each (lambda (file)
1971 (let ((s (lstat file)))
1972 (unless (eq? (stat:type s) 'symlink)
1973 (format #t "reset ~a~%" file)
1974 (utime file 0 0 0 0))))
1975 (find-files dir #:directories? #t))
1976 (with-directory-excursion dir
1977 (let ((files (find-files "." ".*" #:directories? #t)))
1978 (apply invoke "zip" "-0" "-X" zip files)))))
1979 (find-files (assoc-ref outputs "doc") ".*.zip$"))
1982 `(("alsa-lib" ,alsa-lib)
1984 ("fontconfig" ,fontconfig)
1985 ("freetype" ,freetype)
1989 ("libjpeg" ,libjpeg-turbo)
1993 ("libxcomposite" ,libxcomposite)
1995 ("libxinerama" ,libxinerama)
1996 ("libxrender" ,libxrender)
1998 ("libxtst" ,libxtst)))
2000 `(("icedtea-8" ,icedtea-8)
2001 ("icedtea-8:jdk" ,icedtea-8 "jdk")
2002 ;; XXX: The build system fails with newer versions of GNU Make.
2003 ("make@4.2" ,gnu-make-4.2)
2007 (home-page "https://openjdk.java.net/projects/jdk9/")
2008 (synopsis "Java development kit")
2010 "This package provides the Java development kit OpenJDK.")
2011 (license license:gpl2+)))
2013 (define-public openjdk10
2020 (uri "http://hg.openjdk.java.net/jdk/jdk/archive/6fa770f9f8ab.tar.bz2")
2021 (file-name (string-append name "-" version ".tar.bz2"))
2024 "0zywq2203b4hx4jms9vbwvjcj1d3k2v3qpx4s33729fkpmid97r4"))
2025 (patches (search-patches
2026 "openjdk-10-idlj-reproducibility.patch"))
2027 (modules '((guix build utils)))
2030 (for-each delete-file (find-files "." ".*.(bin|exe|jar)$"))
2033 (substitute-keyword-arguments (package-arguments openjdk9)
2035 `(modify-phases ,phases
2036 (replace 'fix-java-shebangs
2038 ;; This file was "fixed" by patch-source-shebangs, but it requires
2039 ;; this exact first line.
2040 (substitute* "make/data/blacklistedcertsconverter/blacklisted.certs.pem"
2041 (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))
2044 (lambda* (#:key inputs outputs #:allow-other-keys)
2045 (invoke "bash" "./configure"
2046 (string-append "--with-freetype=" (assoc-ref inputs "freetype"))
2047 "--disable-freetype-bundling"
2048 "--disable-warnings-as-errors"
2049 "--disable-hotspot-gtest"
2050 "--with-giflib=system"
2051 "--with-libjpeg=system"
2052 "--with-native-debug-symbols=zipped"
2053 (string-append "--prefix=" (assoc-ref outputs "out")))
2056 `(("openjdk9" ,openjdk9)
2057 ("openjdk9:jdk" ,openjdk9 "jdk")
2058 ("make@4.2" ,gnu-make-4.2)
2063 (define-public openjdk11
2069 (uri "http://hg.openjdk.java.net/jdk/jdk/archive/76072a077ee1.tar.bz2")
2070 (file-name (string-append name "-" version ".tar.bz2"))
2073 "0v705w1s9lrqalzahir78pk397rkk9gfvzq821yv8h3xha0bqi6w"))
2074 (modules '((guix build utils)))
2077 (for-each delete-file (find-files "." ".*.(bin|exe|jar)$"))
2079 (build-system gnu-build-system)
2080 (outputs '("out" "jdk" "doc"))
2082 `(#:imported-modules
2083 ((guix build syscalls)
2084 (ice-9 binary-ports)
2086 ,@%gnu-build-system-modules)
2087 #:tests? #f; requires jtreg
2088 ;; TODO package jtreg
2090 `("--disable-option-checking" ; --enable-fast-install default flag errors otherwise
2091 "--disable-warnings-as-errors"
2092 ;; make validate-runpath pass, see: http://issues.guix.info/issue/32894
2093 "--with-native-debug-symbols=zipped"
2094 ;; do not use the bundled libraries
2095 "--with-giflib=system"
2096 "--with-lcms=system"
2097 "--with-libjpeg=system"
2098 "--with-libpng=system"
2099 "--with-version-pre="
2100 ;; allow the build system to locate the system freetype
2101 ,(string-append "--with-freetype-include="
2102 (assoc-ref %build-inputs "freetype") "/include")
2103 ,(string-append "--with-freetype-lib="
2104 (assoc-ref %build-inputs "freetype") "/lib"))
2106 (modify-phases %standard-phases
2107 (add-after 'patch-source-shebangs 'fix-java-shebangs
2109 ;; This file was "fixed" by patch-source-shebangs, but it requires
2110 ;; this exact first line.
2111 (substitute* "make/data/blacklistedcertsconverter/blacklisted.certs.pem"
2112 (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))
2114 (add-before 'build 'write-source-revision-file
2116 (with-output-to-file ".src-rev"
2118 (display ,version)))
2121 (lambda* (#:key parallel-build? make-flags #:allow-other-keys)
2122 (apply invoke "make" "all"
2123 `(,@(if parallel-build?
2124 (list (string-append "JOBS="
2125 (number->string (parallel-job-count))))
2128 ;; jdk 11 does not build jre by default any more
2129 ;; building it anyways
2130 ;; for further information see:
2131 ;; https://github.com/AdoptOpenJDK/openjdk-build/issues/356
2132 (add-after 'build 'build-jre
2133 (lambda* (#:key parallel-build? make-flags #:allow-other-keys)
2134 (apply invoke "make" "legacy-jre-image"
2135 `(,@(if parallel-build?
2136 (list (string-append "JOBS="
2137 (number->string (parallel-job-count))))
2141 (lambda* (#:key outputs #:allow-other-keys)
2142 (let ((out (assoc-ref outputs "out"))
2143 (jdk (assoc-ref outputs "jdk"))
2144 (doc (assoc-ref outputs "doc"))
2145 (images (car (find-files "build" ".*-server-release"
2146 #:directories? #t))))
2147 (copy-recursively (string-append images "/images/jdk") jdk)
2148 (copy-recursively (string-append images "/images/jre") out)
2149 (copy-recursively (string-append images "/images/docs") doc))
2151 ;; Some of the libraries in the lib/ folder link to libjvm.so.
2152 ;; But that shared object is located in the server/ folder, so it
2153 ;; cannot be found. This phase creates a symbolic link in the
2154 ;; lib/ folder so that the other libraries can find it.
2157 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
2159 ;; FIXME: Find the bug in the build system, so that this symlink is
2161 (add-after 'install 'install-libjvm
2162 (lambda* (#:key inputs outputs #:allow-other-keys)
2163 (let* ((lib-out (string-append (assoc-ref outputs "out")
2165 (lib-jdk (string-append (assoc-ref outputs "jdk")
2167 (symlink (string-append lib-jdk "/server/libjvm.so")
2168 (string-append lib-jdk "/libjvm.so"))
2169 (symlink (string-append lib-out "/server/libjvm.so")
2170 (string-append lib-out "/libjvm.so")))
2172 (add-after 'install 'strip-character-data-timestamps
2173 (lambda* (#:key outputs #:allow-other-keys)
2174 (use-modules (guix build syscalls))
2175 (let ((archive (string-append
2176 (assoc-ref outputs "jdk") "/lib/src.zip"))
2177 (dir (mkdtemp! "zip-contents.XXXXXX")))
2178 (with-directory-excursion dir
2179 (invoke "unzip" archive))
2180 (delete-file archive)
2181 (with-directory-excursion dir
2182 (let ((char-data-files (find-files "." "CharacterData.*")))
2183 (for-each (lambda (file)
2185 (((string-append "This file was generated "
2186 "AUTOMATICALLY from a template "
2188 (string-append "This file was generated "
2189 "AUTOMATICALLY from a template "
2192 (with-directory-excursion dir
2193 (let ((files (find-files "." ".*" #:directories? #t)))
2194 (apply invoke "zip" "-0" "-X" archive files))))))
2195 (add-after 'strip-character-data-timestamps 'strip-archive-timestamps
2196 (lambda* (#:key outputs #:allow-other-keys)
2197 (use-modules (guix build syscalls)
2198 (ice-9 binary-ports)
2200 (letrec ((repack-archive
2202 (let ((dir (mkdtemp! "zip-contents.XXXXXX")))
2203 (with-directory-excursion dir
2204 (invoke "unzip" archive))
2205 (delete-file archive)
2206 (for-each (compose repack-archive canonicalize-path)
2207 (find-files dir "(ct.sym|.*.jar)$"))
2208 (let ((reset-file-timestamp
2210 (let ((s (lstat file)))
2211 (unless (eq? (stat:type s) 'symlink)
2212 (format #t "reset ~a~%" file)
2213 (utime file 0 0 0 0))))))
2214 (for-each reset-file-timestamp
2215 (find-files dir #:directories? #t)))
2216 (with-directory-excursion dir
2217 (let ((files (find-files "." ".*" #:directories? #t)))
2218 (apply invoke "zip" "-0" "-X" archive files)))))))
2219 (for-each repack-archive
2220 (find-files (assoc-ref outputs "doc") ".*.zip$"))
2221 (for-each repack-archive
2222 (find-files (assoc-ref outputs "jdk")
2223 ".*.(zip|jar|diz)$"))
2224 (repack-archive (string-append (assoc-ref outputs "jdk") "/lib/ct.sym"))
2227 (call-with-input-file file-name
2229 (let ((header #vu8(#x4a #x4d #x01 #x00)))
2230 (if (equal? (get-bytevector-n
2231 file (bytevector-length header))
2233 (let* ((header-length (bytevector-length header))
2234 (temp-file (mkstemp!
2236 "temp-file.XXXXXX")))
2237 (temp-filename (port-filename temp-file))
2239 (- (stat:size (stat file))
2241 (sendfile temp-file file content-length header-length)
2242 (delete-file file-name)
2243 (close-port temp-file)
2244 (repack-archive (canonicalize-path temp-filename))
2245 (call-with-output-file file-name
2247 (put-bytevector file header)
2248 (call-with-input-file temp-filename
2252 (stat:size (stat temp-file)) 0)))))))))))))
2253 (for-each repack-jmod
2254 (find-files (assoc-ref outputs "jdk") ".*.jmod$")))
2256 (add-after 'install 'remove-timestamp-from-api-summary
2257 (lambda* (#:key outputs #:allow-other-keys)
2258 (substitute* (string-append (assoc-ref outputs "doc")
2259 "/api/overview-summary.html")
2260 (("Generated by javadoc \\(11-internal\\).*$")
2261 "Generated by javadoc (11-internal) -->\n"))
2264 `(("alsa-lib" ,alsa-lib)
2266 ("fontconfig" ,fontconfig)
2267 ("freetype" ,freetype)
2270 ("libjpeg" ,libjpeg-turbo)
2273 ("libxext" ,libxext)
2274 ("libxrender" ,libxrender)
2276 ("libxtst" ,libxtst)))
2278 `(("autoconf" ,autoconf)
2279 ("openjdk10" ,openjdk10)
2280 ("openjdk10:jdk" ,openjdk10 "jdk")
2281 ("make" ,gnu-make-4.2)
2282 ("pkg-config" ,pkg-config)
2286 (home-page "https://openjdk.java.net/projects/jdk/11/")
2287 (synopsis "Java development kit")
2289 "This package provides the Java development kit OpenJDK.")
2290 (license license:gpl2+)))
2292 (define-public openjdk12
2299 (uri "http://hg.openjdk.java.net/jdk/jdk/archive/0276cba45aac.tar.bz2")
2300 (file-name (string-append name "-" version ".tar.bz2"))
2303 "0mbhdrk12b6878kby0flnbak7444dlpm0ihlmf92vk59y1c02bc2"))
2304 (modules '((guix build utils)))
2307 (for-each delete-file (find-files "." ".*.(bin|exe|jar)$"))
2310 `(("alsa-lib" ,alsa-lib)
2312 ("fontconfig" ,fontconfig)
2313 ("freetype" ,freetype)
2316 ("libjpeg" ,libjpeg-turbo)
2319 ("libxext" ,libxext)
2320 ("libxrandr" ,libxrandr)
2321 ("libxrender" ,libxrender)
2323 ("libxtst" ,libxtst)))
2325 `(("autoconf" ,autoconf)
2326 ("openjdk11" ,openjdk11)
2327 ("openjdk11:jdk" ,openjdk11 "jdk")
2328 ("make@4.2" ,gnu-make-4.2)
2329 ("pkg-config" ,pkg-config)
2333 (home-page "https://openjdk.java.net/projects/jdk/12")))
2335 (define-public openjdk13
2342 (uri "http://hg.openjdk.java.net/jdk/jdk13/archive/9c250a7600e1.tar.bz2")
2343 (file-name (string-append name "-" version ".tar.bz2"))
2346 "0v0ljvx5dyzp96dw4z4ksw3pvasil7783mgnmd1wk9gads5ab8iq"))
2347 (modules '((guix build utils)))
2350 (for-each delete-file (find-files "." ".*.(bin|exe|jar)$"))
2353 `(("alsa-lib" ,alsa-lib)
2355 ("fontconfig" ,fontconfig)
2356 ("freetype" ,freetype)
2359 ("libjpeg" ,libjpeg-turbo)
2362 ("libxext" ,libxext)
2363 ("libxrandr" ,libxrandr)
2364 ("libxrender" ,libxrender)
2366 ("libxtst" ,libxtst)))
2368 `(("autoconf" ,autoconf)
2369 ("openjdk12:jdk" ,openjdk12 "jdk")
2370 ("make@4.2" ,gnu-make-4.2)
2371 ("pkg-config" ,pkg-config)
2375 (home-page "https://openjdk.java.net/projects/jdk/13")))
2377 (define-public openjdk14
2384 (uri "http://hg.openjdk.java.net/jdk/jdk14/archive/bc54620a3848.tar.bz2")
2385 (file-name (string-append name "-" version ".tar.bz2"))
2388 "0z485pk7r1xpw8004g4nrwrzj17sabgx8yfdbxwfvzkjp8qyajch"))
2389 (modules '((guix build utils)))
2392 ;; The m4 macro uses 'help' to search for builtins, which is
2393 ;; not available in bash-minimal
2394 (substitute* "make/autoconf/basics.m4"
2395 (("if help") "if command -v"))
2396 (for-each delete-file (find-files "." ".*.(bin|exe|jar)$"))
2399 `(("alsa-lib" ,alsa-lib)
2401 ("fontconfig" ,fontconfig)
2402 ("freetype" ,freetype)
2405 ("libjpeg" ,libjpeg-turbo)
2408 ("libxext" ,libxext)
2409 ("libxrandr" ,libxrandr)
2410 ("libxrender" ,libxrender)
2412 ("libxtst" ,libxtst)))
2414 `(("autoconf" ,autoconf)
2415 ("make@4.2" ,gnu-make-4.2)
2416 ("openjdk13:jdk" ,openjdk13 "jdk")
2417 ("pkg-config" ,pkg-config)
2421 (home-page "https://openjdk.java.net/projects/jdk/14")))
2423 (define-public icedtea icedtea-8)
2426 (define-public ant/java8
2427 (package (inherit ant-bootstrap)
2432 (uri (string-append "mirror://apache/ant/source/apache-ant-"
2433 version "-src.tar.gz"))
2436 "066k2isig5xm70cihj9p73hkp5w7h5zbfqz5kxb6cwr9cb86xl2k"))
2437 (modules '((guix build utils)))
2440 (for-each delete-file
2441 (find-files "lib/optional" "\\.jar$"))
2444 (substitute-keyword-arguments (package-arguments ant-bootstrap)
2446 `(modify-phases ,phases
2447 (add-after 'unpack 'remove-scripts
2448 ;; Remove bat / cmd scripts for DOS as well as the antRun and runant
2451 (for-each delete-file
2452 (find-files "src/script"
2453 "(.*\\.(bat|cmd)|runant.*|antRun.*)"))
2456 (lambda* (#:key inputs outputs #:allow-other-keys)
2457 (setenv "JAVA_HOME" (assoc-ref inputs "jdk"))
2459 ;; Disable tests to avoid dependency on hamcrest-core, which needs
2460 ;; Ant to build. This is necessary in addition to disabling the
2461 ;; "check" phase, because the dependency on "test-jar" would always
2462 ;; result in the tests to be run.
2463 (substitute* "build.xml"
2464 (("depends=\"jars,test-jar") "depends=\"jars"))
2465 (invoke "bash" "bootstrap.sh"
2466 (string-append "-Ddist.dir="
2467 (assoc-ref outputs "out")))))))))
2469 `(("jdk" ,icedtea-8 "jdk")
2471 ("unzip" ,unzip)))))
2473 ;; The 1.9.x series is the last that can be built with GCJ. The 1.10.x series
2476 (package (inherit ant/java8)
2480 (uri (string-append "mirror://apache/ant/source/apache-ant-"
2481 version "-src.tar.gz"))
2484 "1xy30f1w5gaqk6g3f0vw7ygix4rb6032qkcw42y4z8wd9jihgygd"))))
2486 `(("jdk" ,icedtea-7 "jdk")
2488 ("unzip" ,unzip)))))
2490 (define-public ant-apache-bcel
2493 (name "ant-apache-bcel")
2495 (substitute-keyword-arguments (package-arguments ant/java8)
2497 `(modify-phases ,phases
2498 (add-after 'unpack 'link-bcel
2499 (lambda* (#:key inputs #:allow-other-keys)
2500 (for-each (lambda (file)
2502 (string-append "lib/optional/"
2504 (find-files (assoc-ref inputs "java-commons-bcel")
2507 (add-after 'build 'install
2508 (lambda* (#:key outputs #:allow-other-keys)
2509 (let* ((out (assoc-ref outputs "out"))
2510 (share (string-append out "/share/java"))
2511 (bin (string-append out "/bin"))
2512 (lib (string-append out "/lib")))
2514 (install-file (string-append lib "/ant-apache-bcel.jar") share)
2515 (delete-file-recursively bin)
2516 (delete-file-recursively lib)
2519 `(("java-commons-bcel" ,java-commons-bcel)
2520 ,@(package-inputs ant/java8)))))
2522 (define-public ant-junit
2527 (substitute-keyword-arguments (package-arguments ant/java8)
2529 `(modify-phases ,phases
2530 (add-after 'unpack 'link-junit
2531 (lambda* (#:key inputs #:allow-other-keys)
2532 (for-each (lambda (file)
2534 (string-append "lib/optional/"
2536 (find-files (assoc-ref inputs "java-junit")
2539 (add-after 'build 'install
2540 (lambda* (#:key outputs #:allow-other-keys)
2541 (let* ((out (assoc-ref outputs "out"))
2542 (share (string-append out "/share/java"))
2543 (bin (string-append out "/bin"))
2544 (lib (string-append out "/lib")))
2546 (install-file (string-append lib "/ant-junit.jar") share)
2547 (delete-file-recursively bin)
2548 (delete-file-recursively lib)
2551 `(("java-junit" ,java-junit)
2552 ,@(package-inputs ant/java8)))))
2554 (define-public java-openjfx-build
2556 (name "java-openjfx-build")
2557 ;; This is a java-8 version
2562 (url "http://hg.openjdk.java.net/openjfx/8u-dev/rt")
2563 (changeset (string-append
2564 (string-join (string-split version #\.) "u")
2566 (file-name (string-append name "-" version "-checkout"))
2567 (modules '((guix build utils)))
2570 ;; Delete included gradle jar
2571 (delete-file-recursively "gradle/wrapper")
2575 "0yg38mwpivswccv9n96k06x3iv82i4px1a9xg9l8dswzwmfj259f"))
2576 (patches (search-patches "java-openjfx-build-jdk_version.patch"))))
2577 (build-system ant-build-system)
2579 `(#:jar-name "java-openjfx.jar"
2580 #:source-dir "buildSrc/src/main/java"
2581 #:test-dir "buildSrc/src/test"
2583 (modify-phases %standard-phases
2584 (add-before 'configure 'generate-jsl-parser
2586 (invoke "antlr3" "-o"
2587 "buildSrc/src/main/java/com/sun/scenario/effect/compiler"
2588 "buildSrc/src/main/antlr/JSL.g"))))))
2590 `(("antlr3" ,antlr3)
2591 ("java-stringtemplate" ,java-stringtemplate)))
2593 `(("java-junit" ,java-junit)
2594 ("java-hamcrest-core" ,java-hamcrest-core)))
2595 (home-page "https://openjfx.io")
2596 (synopsis "Graphical application toolkit in Java")
2597 (description "OpenJFX is a client application platform for desktop,
2598 mobile and embedded systems built on Java. Its goal is to produce a
2599 modern, efficient, and fully featured toolkit for developing rich client
2600 applications. This package contains base classes for the OpenJFX
2601 distribution and helper classes for building other parts of the
2603 (license license:gpl2))) ;gpl2 only, with classpath exception
2605 (define-public java-openjfx-base
2606 (package (inherit java-openjfx-build)
2607 (name "java-openjfx-base")
2609 `(#:jar-name "java-openjfx-base.jar"
2610 #:source-dir "modules/base/src/main/java:modules/base/src/main/java8:modules/base/src/main/version-info"
2611 #:test-dir "modules/base/src/test"
2613 (modify-phases %standard-phases
2614 (add-before 'check 'remove-empty-file
2616 (with-directory-excursion "modules/base/src/test/java"
2617 ;; These files are completely commented, but junit expects them to
2618 ;; contain a class, so tests fail.
2620 "com/sun/javafx/property/adapter/PropertyDescriptorTest.java")
2622 "com/sun/javafx/property/adapter/ReadOnlyPropertyDescriptorTest.java")
2623 (delete-file "javafx/beans/property/PropertiesTest.java")
2625 "javafx/beans/property/adapter/ReadOnlyJavaBeanPropertyBuilder_General_Test.java")
2627 (delete-file "com/sun/javafx/runtime/VersionInfoTest.java"))
2630 `(("java-openjfx-build" ,java-openjfx-build)))
2631 (description "OpenJFX is a client application platform for desktop,
2632 mobile and embedded systems built on Java. Its goal is to produce a
2633 modern, efficient, and fully featured toolkit for developing rich client
2634 applications. This package contains base classes for the OpenJFX
2637 (define-public java-openjfx-graphics
2638 (package (inherit java-openjfx-build)
2639 (name "java-openjfx-graphics")
2641 `(#:jar-name "java-openjfx-graphics.jar"
2642 #:source-dir "modules/graphics/src/main/java"
2643 #:tests? #f; require X
2644 #:test-dir "modules/graphics/src/test"))
2646 `(("java-openjfx-base" ,java-openjfx-base)
2647 ("java-swt" ,java-swt)))
2648 (description "OpenJFX is a client application platform for desktop,
2649 mobile and embedded systems built on Java. Its goal is to produce a
2650 modern, efficient, and fully featured toolkit for developing rich client
2651 applications. This package contains graphics-related classes for the
2652 OpenJFX distribution.")))
2654 (define-public java-openjfx-media
2655 (package (inherit java-openjfx-build)
2656 (name "java-openjfx-media")
2658 `(("java-openjxf-graphics" ,java-openjfx-graphics)))
2660 `(#:jar-name "java-openjfx-media.jar"
2661 #:source-dir "modules/media/src/main/java"
2662 #:tests? #f)); no tests
2663 (description "OpenJFX is a client application platform for desktop,
2664 mobile and embedded systems built on Java. Its goal is to produce a
2665 modern, efficient, and fully featured toolkit for developing rich client
2666 applications. This package contains media-related classes for the
2667 OpenJFX distribution.")))
2669 (define-public javacc-4
2676 (url "https://github.com/javacc/javacc")
2677 (commit "release_41")))
2678 (file-name (string-append "javacc-" version "-checkout"))
2681 "07ysav7j8r1c6h8qxrgqk6lwdp74ly0ad1935lragxml0qqc3ka0"))
2682 (modules '((guix build utils)))
2683 ;; delete bundled jars
2684 (snippet '(begin (delete-file-recursively "lib") #t))))
2685 (build-system ant-build-system)
2687 ;; /tmp/guix-build-javacc-4.1.drv-0/source/test/javacodeLA/build.xml:60:
2692 (modify-phases %standard-phases
2693 ;; Delete tests to avoid build failure (we don't run them anyway).
2694 (add-after 'unpack 'delete-tests
2696 (for-each delete-file
2697 '("src/org/javacc/JavaCCTestCase.java"
2698 "src/org/javacc/parser/ExpansionTest.java"
2699 "src/org/javacc/parser/OptionsTest.java"
2700 "src/org/javacc/jjtree/JJTreeOptionsTest.java"))
2701 (for-each delete-file-recursively
2702 '("src/org/javacc/parser/test"
2703 "src/org/javacc/jjdoc/test"))
2705 (replace 'install (install-jars "bin/lib")))))
2706 (home-page "https://javacc.org/")
2707 (synopsis "Java parser generator")
2708 (description "Java Compiler Compiler (JavaCC) is the most popular parser
2709 generator for use with Java applications. A parser generator is a tool that
2710 reads a grammar specification and converts it to a Java program that can
2711 recognize matches to the grammar. In addition to the parser generator itself,
2712 JavaCC provides other standard capabilities related to parser generation such
2713 as tree building (via a tool called JJTree included with JavaCC), actions,
2715 (license license:bsd-3)))
2717 ;; javacc-3, as javacc-4 is not properly bootstrapped: is contains a javacc.jar
2718 ;; in the bootstrap/ directory.
2719 (define-public javacc-3
2726 (url "https://github.com/javacc/javacc")
2727 (commit "release_32")))
2728 (file-name (string-append "javacc-" version "-checkout"))
2731 "1pyf1xyh8gk83nxqn2v2mdws32l68ydznha41cxa4l2kkbq1v1g3"))))
2735 (modify-phases %standard-phases
2736 (add-before 'build 'set-java-version
2741 (("debug=") "source=\"1.4\" debug=")))
2742 (find-files "." "build.xml"))
2744 (replace 'install (install-jars "bin/lib")))))))
2746 (define-public javacc
2754 (url "https://github.com/javacc/javacc")
2756 (file-name (git-file-name "javacc" version))
2758 (base32 "18kkak3gda93gr25jrgy6q00g0jr8i24ri2wk4kybz1v234fxx9i"))
2759 (modules '((guix build utils)))
2760 ;; Delete bundled jars.
2761 (snippet '(begin (for-each delete-file-recursively
2762 '("bootstrap" "lib"))
2765 `(#:make-flags ; bootstrap from javacc-4
2766 (list (string-append "-Dbootstrap-jar="
2767 (assoc-ref %build-inputs "javacc")
2768 "/share/java/javacc.jar"))
2769 #:test-target "test"
2771 (modify-phases %standard-phases
2772 (replace 'install (install-jars "target"))
2773 (add-after 'install 'install-bin
2774 (lambda* (#:key outputs inputs #:allow-other-keys)
2775 (let* ((out (assoc-ref outputs "out"))
2776 (dir (string-append out "/share/java"))
2777 (bin (string-append out "/bin"))
2778 (javacc (string-append bin "/javacc")))
2780 (with-output-to-file javacc
2783 (string-append "#!/bin/sh\n"
2784 (assoc-ref inputs "jdk") "/bin/java"
2785 " -cp " dir "/javacc.jar" " `basename $0`" " $*"))))
2786 (chmod javacc #o755)
2787 ;; symlink to different names to affect the first argument and
2788 ;; change the behavior of the jar file.
2789 (symlink javacc (string-append bin "/jjdoc"))
2790 (symlink javacc (string-append bin "/jjtree"))
2794 `(("javacc" ,javacc-4)))))
2796 ;; This is the last 3.x release of ECJ
2797 (define-public java-ecj-3
2803 (uri (string-append "http://archive.eclipse.org/eclipse/"
2804 "downloads/drops/R-" version
2805 "-201301310800/ecjsrc-" version ".jar"))
2808 "01mdj14jw11g1jfnki4fi8229p0c6zzckd38zqy2w4m3cjcvsx04"))))
2809 (build-system ant-build-system)
2811 `(#:tests? #f ; none included
2812 #:jdk ,icedtea-7 ; doesn't build with JDK8+
2813 #:make-flags (list "-f" "src/build.xml")
2814 #:build-target "build"
2816 (modify-phases %standard-phases
2817 (add-after 'unpack 'fix-manifest
2819 ;; Record the main class to make ecj executable.
2820 (with-atomic-file-replacement "src/META-INF/MANIFEST.MF"
2822 (display "Manifest-Version: 1.0
2823 Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n"
2826 (replace 'install (install-jars ".")))))
2827 (home-page "https://eclipse.org")
2828 (synopsis "Eclipse Java development tools core batch compiler")
2829 (description "This package provides the Eclipse Java core batch compiler.")
2830 (license license:epl1.0)))
2832 ;; This is needed for java-cisd-args4j
2833 (define-public java-ecj-3.5
2834 (package (inherit java-ecj-3)
2837 (method url-fetch/zipbomb)
2838 (uri (string-append "http://archive.eclipse.org/eclipse/"
2839 "downloads/drops/R-" version
2840 "-200909170800/ecjsrc-" version ".zip"))
2843 "1vnl2mavisc567bip736xzsvvbjif5279wc4a7pbdik5wlir8qr7"))))
2844 (build-system ant-build-system)
2846 `(#:tests? #f ; none included
2847 #:jdk ,icedtea-7 ; doesn't build with JDK8+
2848 #:build-target "build"
2850 (modify-phases %standard-phases
2851 (add-after 'unpack 'fix-manifest
2853 ;; Record the main class to make ecj executable.
2854 (with-atomic-file-replacement "META-INF/MANIFEST.MF"
2857 (display "Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n"
2860 (replace 'install (install-jars ".")))))
2862 `(("unzip" ,unzip)))))
2864 (define-public java-ecj
2865 (package (inherit java-ecj-3)
2871 "http://archive.eclipse.org/eclipse/downloads/drops4/R-"
2873 "-201703010400/ecjsrc-"
2878 "11cfgsdgznja1pvlxkjbqykxd7pcd5655vkm7s44xmahmap15gpl"))))
2880 `(#:tests? #f ; none included
2881 #:build-target "build"
2883 (modify-phases %standard-phases
2884 (add-after 'unpack 'fix-build.xml
2886 (substitute* "src/build.xml"
2890 (add-after 'unpack 'fix-prop
2892 (substitute* "src/build.xml"
2893 (("^.*properties.*$")
2894 "<include name=\"**/*.properties\"/>
2895 <include name=\"**/*.props\"/>"))
2897 (add-before 'build 'chdir
2901 (replace 'install (install-jars ".")))))))
2903 (define-public java-cisd-base
2904 (let ((revision 38938)
2905 (base-version "14.12.0"))
2907 (name "java-cisd-base")
2908 (version (string-append base-version "-" (number->string revision)))
2912 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2913 "base/tags/release/"
2914 (version-major+minor base-version)
2915 ".x/" base-version "/base/"))
2916 (revision revision)))
2917 (file-name (string-append "java-cisd-base-" version "-checkout"))
2920 "1i5adyf7nzclb0wydgwa1az04qliid8035vpahaandmkmigbnxiy"))
2921 (modules '((guix build utils)))
2924 ;; Delete included gradle jar
2925 (delete-file-recursively "gradle/wrapper")
2926 ;; Delete pre-built native libraries
2927 (delete-file-recursively "libs")
2929 (build-system ant-build-system)
2931 `(#:make-flags '("-file" "build/build.xml")
2932 #:test-target "jar-test"
2935 (modify-phases %standard-phases
2936 (add-after 'unpack 'unpack-build-resources
2937 (lambda* (#:key inputs #:allow-other-keys)
2938 (copy-recursively (assoc-ref inputs "build-resources")
2939 "../build_resources")
2941 (add-after 'unpack-build-resources 'fix-dependencies
2942 (lambda* (#:key inputs #:allow-other-keys)
2943 (substitute* "build/build.xml"
2944 (("\\$\\{lib\\}/testng/testng-jdk15.jar")
2945 (string-append (assoc-ref inputs "java-testng")
2946 "/share/java/java-testng.jar"))
2947 (("\\$\\{lib\\}/commons-lang/commons-lang.jar")
2948 (string-append (assoc-ref inputs "java-commons-lang")
2949 "/share/java/commons-lang-"
2950 ,(package-version java-commons-lang) ".jar"))
2951 (("\\$\\{lib\\}/commons-io/commons-io.jar")
2952 (string-append (assoc-ref inputs "java-commons-io")
2953 "/lib/m2/commons-io/commons-io/"
2954 ,(package-version java-commons-io)
2956 ,(package-version java-commons-io)
2958 ;; Remove dependency on svn
2959 (("<build-info.*") "")
2960 (("\\$\\{revision.number\\}")
2961 ,(number->string revision))
2962 (("\\$\\{version.number\\}") ,base-version))
2963 ;; Remove dependency on classycle
2964 (substitute* "../build_resources/ant/build-common.xml"
2965 (("<taskdef name=\"dependency-checker.*") "")
2966 (("classname=\"classycle.*") "")
2967 (("classpath=\"\\$\\{lib\\}/classycle.*") ""))
2969 ;; A few tests fail because of the lack of a proper /etc/groups and
2970 ;; /etc/passwd file in the build container.
2971 (add-after 'unpack 'disable-broken-tests
2973 (substitute* "sourceTest/java/ch/systemsx/cisd/base/AllTests.java"
2974 (("Unix.isOperational\\(\\)") "false"))
2976 ;; These decorators are almost useless and pull in an unpackaged
2978 (add-after 'unpack 'remove-useless-decorators
2980 (substitute* "source/java/ch/systemsx/cisd/base/unix/Unix.java"
2982 (("import ch.rinn.restrictions.Private;") ""))
2983 (substitute* "sourceTest/java/ch/systemsx/cisd/base/unix/UnixTests.java"
2985 (("import ch.rinn.restrictions.Friend;") ""))
2987 (add-before 'configure 'build-native-code
2988 (lambda* (#:key inputs #:allow-other-keys)
2989 (let ((jdk (assoc-ref inputs "jdk"))
2990 (dir ,(match (%current-system)
2993 ((or "armhf-linux" "aarch64-linux")
2995 ((or "x86_64-linux")
2997 (_ "unknown-Linux"))))
2998 (with-directory-excursion "source/c"
2999 (invoke "gcc" "-shared" "-O3" "-fPIC" "unix.c"
3000 (string-append "-I" jdk "/include")
3001 (string-append "-I" jdk "/include/linux")
3003 (invoke "gcc" "-shared" "-O3" "-fPIC"
3004 "-DMACHINE_BYTE_ORDER=1"
3012 (string-append "-I" jdk "/include")
3013 (string-append "-I" jdk "/include/linux")
3014 "-o" "libnativedata.so"))
3015 (install-file "source/c/libunix.so"
3016 (string-append "libs/native/unix/" dir))
3017 (install-file "source/c/libnativedata.so"
3018 (string-append "libs/native/nativedata/" dir))
3020 ;; In the "check" phase we only build the test executable.
3021 (add-after 'check 'run-tests
3023 (invoke "java" "-jar" "targets/dist/sis-base-test.jar")
3024 (delete-file "targets/dist/sis-base-test.jar")
3026 (replace 'install (install-jars "targets/dist")))))
3028 `(("jdk" ,icedtea-8)
3029 ("java-commons-lang" ,java-commons-lang)
3030 ("java-commons-io" ,java-commons-io)
3031 ("java-testng" ,java-testng)
3036 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
3037 "base/tags/release/"
3038 (version-major+minor base-version)
3040 "/build_resources/"))
3041 (revision revision)))
3044 "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk"))))))
3045 (home-page "http://svnsis.ethz.ch")
3046 (synopsis "Utility classes for libraries from ETH Zurich")
3047 (description "This library supplies some utility classes needed for
3048 libraries from the SIS division at ETH Zurich like jHDF5.")
3049 ;; The C sources are under a non-copyleft license, which looks like a
3050 ;; variant of the BSD licenses. The whole package is under the ASL2.0.
3051 (license (list license:asl2.0
3052 (license:non-copyleft "file://source/c/COPYING"))))))
3054 (define-public java-cisd-args4j
3055 (let ((revision 39162)
3056 (base-version "9.11.2"))
3058 (name "java-cisd-args4j")
3059 (version (string-append base-version "-" (number->string revision)))
3063 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
3064 "args4j/tags/release/"
3065 (version-major+minor base-version)
3066 ".x/" base-version "/args4j/"))
3067 (revision revision)))
3068 (file-name (string-append "java-cisd-args4j-" version "-checkout"))
3071 "0hhqznjaivq7ips7mkwas78z42s6djsm20rrs7g1zd59rcsakxn2"))))
3072 (build-system ant-build-system)
3074 `(#:make-flags '("-file" "build/build.xml")
3075 #:tests? #f ; there are no tests
3076 ;; There are weird build failures with JDK8, such as: "The type
3077 ;; java.io.ObjectInputStream cannot be resolved. It is indirectly
3078 ;; referenced from required .class files"
3080 #:modules ((guix build ant-build-system)
3082 (guix build java-utils)
3087 (modify-phases %standard-phases
3088 (add-after 'unpack 'unpack-build-resources
3089 (lambda* (#:key inputs #:allow-other-keys)
3090 (mkdir-p "../build_resources")
3091 (invoke "tar" "xf" (assoc-ref inputs "build-resources")
3092 "-C" "../build_resources"
3093 "--strip-components=1")
3094 (mkdir-p "../build_resources/lib")
3096 (add-after 'unpack-build-resources 'fix-dependencies
3097 (lambda* (#:key inputs #:allow-other-keys)
3098 ;; FIXME: There should be a more convenient abstraction for
3099 ;; editing XML files.
3100 (with-directory-excursion "../build_resources/ant/"
3101 (chmod "build-common.xml" #o664)
3102 (call-with-output-file "build-common.xml.new"
3106 (with-input-from-file "build-common.xml"
3107 (lambda _ (xml->sxml #:trim-whitespace? #t)))
3108 `(;; Remove dependency on classycle and custom ant tasks
3109 (taskdef . ,(lambda (tag . kids)
3110 (let ((name ((sxpath '(name *text*)) kids)))
3111 (if (or (member "build-info" name)
3112 (member "dependency-checker" name)
3113 (member "build-java-subprojects" name)
3114 (member "project-classpath" name))
3117 (typedef . ,(lambda (tag . kids)
3118 (let ((name ((sxpath '(name *text*)) kids)))
3119 (if (member "recursive-jar" name)
3122 (build-java-subprojects . ,(lambda _ '()))
3123 ;; Ignore everything else
3124 (*default* . ,(lambda (tag . kids) `(,tag ,@kids)))
3125 (*text* . ,(lambda (_ txt) txt))))
3127 (rename-file "build-common.xml.new" "build-common.xml"))
3128 (substitute* "build/build.xml"
3129 (("\\$\\{lib\\}/cisd-base/cisd-base.jar")
3130 (string-append (assoc-ref inputs "java-cisd-base")
3131 "/share/java/sis-base.jar"))
3132 ;; Remove dependency on svn
3133 (("<build-info.*") "")
3134 (("\\$\\{revision.number\\}")
3135 ,(number->string revision))
3136 (("\\$\\{version.number\\}") ,base-version)
3137 ;; Don't use custom ant tasks.
3138 (("recursive-jar") "jar")
3139 (("<project-classpath.*") ""))
3141 (replace 'install (install-jars "targets/dist")))))
3143 `(("java-cisd-base" ,java-cisd-base)))
3145 `(("ecj" ,java-ecj-3.5)
3150 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
3151 "args4j/tags/release/"
3152 (version-major+minor base-version)
3154 "/build_resources/"))
3155 (revision revision)))
3158 "056cam4k8pll7ass31sy6gwn8g8719njc41yf4l02b0342nilkyf"))
3159 (modules '((guix build utils)))
3160 ;; Delete bundled pre-built jars.
3162 '(begin (delete-file-recursively "lib/") #t))))))
3163 (home-page "http://svnsis.ethz.ch")
3164 (synopsis "Command line parser library")
3165 (description "This package provides a parser for command line arguments.")
3166 (license license:asl2.0))))
3168 (define-public java-cisd-jhdf5
3169 (let ((revision 39162)
3170 (base-version "14.12.6"))
3172 (name "java-cisd-jhdf5")
3173 (version (string-append base-version "-" (number->string revision)))
3177 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
3178 "jhdf5/tags/release/"
3179 (version-major+minor base-version)
3180 ".x/" base-version "/jhdf5/"))
3181 (revision revision)))
3182 (file-name (string-append "java-cisd-jhdf5-" version "-checkout"))
3185 "13i17s2hn0q9drdqvp8csy7770p3hdbh9rp30ihln2ldkfawdmz0"))
3186 (modules '((guix build utils)))
3189 ;; Delete included gradle jar
3190 (delete-file-recursively "gradle/wrapper")
3191 ;; Delete pre-built native libraries
3192 (delete-file-recursively "libs")
3194 (build-system ant-build-system)
3196 `(#:make-flags '("-file" "build/build.xml")
3197 #:build-target "jar-all"
3198 #:test-target "jar-test"
3201 (modify-phases %standard-phases
3202 ;; FIXME: this build phase fails.
3203 (delete 'generate-jar-indices)
3204 ;; Don't erase results from the build phase when building tests.
3205 (add-after 'unpack 'separate-test-target-from-clean
3207 (substitute* "build/build.xml"
3208 (("\"jar-test\" depends=\"clean, ")
3209 "\"jar-test\" depends=\""))
3211 (add-after 'unpack 'unpack-build-resources
3212 (lambda* (#:key inputs #:allow-other-keys)
3213 (copy-recursively (assoc-ref inputs "build-resources")
3214 "../build_resources")
3215 (delete-file-recursively "../build_resources/lib/")
3216 (mkdir-p "../build_resources/lib")
3217 ;; Remove dependency on classycle
3218 (substitute* "../build_resources/ant/build-common.xml"
3219 (("<taskdef name=\"dependency-checker.*") "")
3220 (("classname=\"classycle.*") "")
3221 (("classpath=\"\\$\\{lib\\}/classycle.*") ""))
3222 ;; Remove dependency on svn
3223 (substitute* "build/build.xml"
3224 (("<build-info.*") "")
3225 (("\\$\\{revision.number\\}")
3226 ,(number->string revision))
3227 (("\\$\\{version.number\\}") ,base-version))
3229 (add-after 'unpack-build-resources 'fix-dependencies
3230 (lambda* (#:key inputs #:allow-other-keys)
3231 (substitute* "../build_resources/ant/build-common.xml"
3232 (("../libraries/testng/testng-jdk15.jar")
3233 (string-append (assoc-ref inputs "java-testng")
3234 "/share/java/java-testng.jar")))
3235 (substitute* "build/build.xml"
3236 (("\\$\\{lib\\}/sis-base/sis-base.jar")
3237 (string-append (assoc-ref inputs "java-cisd-base")
3238 "/share/java/sis-base.jar"))
3239 (("\\$\\{lib\\}/cisd-args4j/cisd-args4j.jar")
3240 (string-append (assoc-ref inputs "java-cisd-args4j")
3241 "/share/java/cisd-args4j.jar"))
3242 (("\\$\\{lib\\}/commons-lang/commons-lang.jar")
3243 (string-append (assoc-ref inputs "java-commons-lang")
3244 "/share/java/commons-lang-"
3245 ,(package-version java-commons-lang) ".jar"))
3246 (("\\$\\{lib\\}/commons-io/commons-io.jar")
3247 (string-append (assoc-ref inputs "java-commons-io")
3248 "/lib/m2/commons-io/commons-io/"
3249 ,(package-version java-commons-io)
3251 ,(package-version java-commons-io)
3253 (("\\$\\{lib\\}/testng/testng-jdk15.jar")
3254 (string-append (assoc-ref inputs "java-testng")
3255 "/share/java/java-testng.jar"))
3256 (("\\$\\{lib\\}/junit4/junit.jar")
3257 (car (find-files (assoc-ref inputs "java-junit") "jar$")))
3258 (("\\$\\{lib\\}/jmock/hamcrest/hamcrest-core.jar")
3259 (car (find-files (assoc-ref inputs "java-hamcrest-core")
3261 ;; Remove dependency on ch.rinn.restrictions
3262 (with-directory-excursion "source/java/ch/systemsx/cisd/hdf5/"
3263 (substitute* '("BitSetConversionUtils.java"
3265 (("import ch.rinn.restrictions.Private;") "")
3267 (with-directory-excursion "sourceTest/java/ch/systemsx/cisd/hdf5/"
3268 (substitute* '("BitSetConversionTest.java"
3269 "h5ar/HDF5ArchiverTest.java")
3270 (("import ch.rinn.restrictions.Friend;") "")
3272 ;; Remove leftovers from removing @Friend
3273 (substitute* "h5ar/HDF5ArchiverTest.java"
3274 (("\\{ HDF5Archiver.class, IdCache.class, LinkRecord.class \\}\\)")
3277 (add-before 'configure 'build-native-library
3278 (lambda* (#:key inputs #:allow-other-keys)
3279 (let ((jdk (assoc-ref inputs "jdk"))
3280 (hdf5 (assoc-ref inputs "hdf5"))
3281 (dir ,(match (%current-system)
3284 ((or "armhf-linux" "aarch64-linux")
3286 ((or "x86_64-linux")
3288 (_ "unknown-Linux"))))
3289 (with-directory-excursion "source/c"
3290 (apply invoke `("gcc" "-shared" "-O3"
3292 "-Wl,--exclude-libs,ALL"
3293 ,@(find-files "jhdf5" "\\.c$")
3294 ,@(find-files "hdf-java" "\\.c$")
3295 ,(string-append "-I" hdf5 "/include")
3296 ,(string-append "-I" jdk "/include")
3297 ,(string-append "-I" jdk "/include/linux")
3298 ,(string-append hdf5 "/lib/libhdf5.a")
3299 "-o" "libjhdf5.so" "-lz")))
3300 (install-file "source/c/libjhdf5.so"
3301 (string-append "libs/native/jhdf5/" dir))
3303 ;; In the "check" phase we only build the test executable.
3304 (add-after 'check 'run-tests
3306 (invoke "java" "-jar" "targets/dist/sis-jhdf5-test.jar")
3307 (delete-file "targets/dist/sis-jhdf5-test.jar")
3310 (install-jars "targets/dist")))))
3312 `(("java-cisd-base" ,java-cisd-base)
3313 ("java-cisd-args4j" ,java-cisd-args4j)
3314 ("java-commons-lang" ,java-commons-lang)
3315 ("java-commons-io" ,java-commons-io)
3319 `(("jdk" ,icedtea-8)
3320 ("java-testng" ,java-testng)
3321 ("java-junit" ,java-junit)
3322 ("java-jmock" ,java-jmock)
3323 ("java-hamcrest-core" ,java-hamcrest-core)
3328 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
3329 "jhdf5/tags/release/"
3330 (version-major+minor base-version)
3332 "/build_resources/"))
3333 (revision revision)))
3336 "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk"))))))
3337 (home-page "https://wiki-bsse.ethz.ch/display/JHDF5/")
3338 (synopsis "Java binding for HDF5")
3339 (description "JHDF5 is a high-level API in Java for reading and writing
3340 HDF5 files, building on the libraries provided by the HDF Group.")
3341 ;; The C sources are under a non-copyleft license, which looks like a
3342 ;; variant of the BSD licenses. The whole package is under the ASL2.0.
3343 (license (list license:asl2.0
3344 (license:non-copyleft "file://source/c/COPYING"))))))
3346 (define-public java-classpathx-servletapi
3348 (name "java-classpathx-servletapi")
3352 (uri (string-append "mirror://gnu/classpathx/servletapi/"
3353 "servletapi-" version ".tar.gz"))
3356 "07d8h051siga2f33fra72hk12sbq1bxa4jifjg0qj0vfazjjff0x"))))
3357 (build-system ant-build-system)
3359 `(#:tests? #f ; there is no test target
3360 #:build-target "compile"
3362 (list "-Dbuild.compiler=javac1.8"
3363 (string-append "-Ddist=" (assoc-ref %outputs "out")))
3365 (modify-phases %standard-phases
3367 (lambda* (#:key make-flags #:allow-other-keys)
3368 (apply invoke `("ant" "dist" ,@make-flags)))))))
3369 (home-page "https://www.gnu.org/software/classpathx/")
3370 (synopsis "Java servlet API implementation")
3371 (description "This is the GNU servlet API distribution, part of the
3372 ClasspathX project. It provides implementations of version 3.0 of the servlet
3373 API and version 2.1 of the Java ServerPages API.")
3374 (license license:gpl3+)))
3376 (define-public java-javaee-servletapi
3378 (name "java-javaee-servletapi")
3383 (url "https://github.com/javaee/servlet-spec")
3385 (file-name (git-file-name name version))
3388 "0s03lj8w5an70lkqbjycgfrfk0kc07vbfav91jzk87gh3awf9ksl"))))
3389 (build-system ant-build-system)
3391 `(#:jar-name "javax-servletapi.jar"
3394 #:source-dir "src/main/java"
3396 (modify-phases %standard-phases
3397 (add-before 'build 'copy-resources
3399 (mkdir-p "build/classes/javax/servlet/http")
3400 (let ((from-prefix "src/main/java/javax/servlet/")
3401 (to-prefix "build/classes/javax/servlet/"))
3402 (for-each (lambda (f)
3403 (copy-file (string-append from-prefix f)
3404 (string-append to-prefix f)))
3405 (list "LocalStrings_ja.properties"
3406 "LocalStrings.properties"
3407 "LocalStrings_fr.properties"
3408 "http/LocalStrings_es.properties"
3409 "http/LocalStrings_ja.properties"
3410 "http/LocalStrings.properties"
3411 "http/LocalStrings_fr.properties")))
3414 `(("unzip" ,unzip)))
3415 (home-page "https://javaee.github.io/servlet-spec/")
3416 (synopsis "Java servlet API")
3417 (description "Java Servlet is the foundation web specification in the
3418 Java Enterprise Platform. Developers can build web applications using the
3419 Servlet API to interact with the request/response workflow. This project
3420 provides information on the continued development of the Java Servlet
3422 ;; Main code is dual-licensed by Oracle under either GLP2 or CDDL 1.1.
3423 ;; Some files are licensed under ASL 2.0.
3424 (license (list license:asl2.0 license:gpl2 license:cddl1.1))))
3426 (define-public java-swt
3431 ;; The types of many variables and procedures differ in the sources
3432 ;; dependent on whether the target architecture is a 32-bit system or a
3433 ;; 64-bit system. Instead of patching the sources on demand in a build
3434 ;; phase we download either the 32-bit archive (which mostly uses "int"
3435 ;; types) or the 64-bit archive (which mostly uses "long" types).
3436 (let ((hash32 "09q0cbh90d90q3a7dx9430kc4m6bijrkr4lajrmzzvi0jjdpq4v9")
3437 (hash64 "17k5hs75a87ssmc5xhwdfdm2gn4zba0r837l2455za01krnkaa2q")
3440 (let-values (((hash file)
3441 (match (or (%current-target-system) (%current-system))
3442 ("x86_64-linux" (values hash64 file64))
3443 (_ (values hash32 file32)))))
3447 "http://download.eclipse.org/eclipse/downloads/drops4/"
3448 "R-" version "-201710090410/swt-" version
3449 "-gtk-linux-" file ".zip"))
3450 (sha256 (base32 hash))))))
3451 (build-system ant-build-system)
3453 `(#:jar-name "swt.jar"
3455 #:tests? #f ; no "check" target
3457 (modify-phases %standard-phases
3459 (lambda* (#:key source #:allow-other-keys)
3461 (invoke "unzip" source "-d" "swt")
3464 (invoke "unzip" "src.zip" "-d" "src")))
3465 ;; The classpath contains invalid icecat jars. Since we don't need
3466 ;; anything other than the JDK on the classpath, we can simply unset
3468 (add-after 'configure 'unset-classpath
3469 (lambda _ (unsetenv "CLASSPATH") #t))
3470 (add-before 'build 'build-native
3471 (lambda* (#:key inputs outputs #:allow-other-keys)
3472 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
3473 ;; Build shared libraries. Users of SWT have to set the system
3474 ;; property swt.library.path to the "lib" directory of this
3477 (setenv "OUTPUT_DIR" lib)
3478 (with-directory-excursion "src"
3479 (invoke "bash" "build.sh")))))
3480 (add-after 'install 'install-native
3481 (lambda* (#:key outputs #:allow-other-keys)
3482 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
3483 (for-each (lambda (file)
3484 (install-file file lib))
3485 (find-files "." "\\.so$"))
3489 ("libxtst" ,libxtst)
3494 `(("pkg-config" ,pkg-config)
3496 (home-page "https://www.eclipse.org/swt/")
3497 (synopsis "Widget toolkit for Java")
3499 "SWT is a widget toolkit for Java designed to provide efficient, portable
3500 access to the user-interface facilities of the operating systems on which it
3502 ;; SWT code is licensed under EPL1.0
3503 ;; Gnome and Gtk+ bindings contain code licensed under LGPLv2.1
3504 ;; Cairo bindings contain code under MPL1.1
3505 ;; XULRunner 1.9 bindings contain code under MPL2.0
3510 license:lgpl2.1+))))
3512 ;; java-hamcrest-core uses qdox version 1.12. We package this version instead
3513 ;; of the latest release.
3514 (define-public java-qdox-1.12
3520 (uri (string-append "https://repo1.maven.org/maven2/"
3521 "com/thoughtworks/qdox/qdox/" version
3522 "/qdox-" version "-sources.jar"))
3525 "0hlfbqq2avf5s26wxkksqmkdyk6zp9ggqn37c468m96mjv0n9xfl"))))
3526 (build-system ant-build-system)
3528 `(;; Tests require junit
3530 #:jar-name "qdox.jar"
3532 (modify-phases %standard-phases
3534 (lambda* (#:key source #:allow-other-keys)
3536 (with-directory-excursion "src"
3537 (invoke "jar" "-xf" source))))
3538 ;; At this point we don't have junit, so we must remove the API
3540 (add-after 'unpack 'delete-tests
3542 (delete-file-recursively "src/com/thoughtworks/qdox/junit")
3544 (home-page "https://github.com/codehaus/qdox")
3545 (synopsis "Parse definitions from Java source files")
3547 "QDox is a high speed, small footprint parser for extracting
3548 class/interface/method definitions from source files complete with JavaDoc
3549 @code{@@tags}. It is designed to be used by active code generators or
3550 documentation tools.")
3551 (license license:asl2.0)))
3553 (define-public java-qdox
3556 ; Newer version exists, but this version is required by java-plexus-component-metadata
3560 ;; 2.0-M4, -M5 at https://github.com/paul-hammant/qdox
3561 ;; Older releases at https://github.com/codehaus/qdox/
3562 ;; Note: The release at maven is pre-generated. The release at
3563 ;; github requires jflex.
3564 (uri (string-append "https://repo1.maven.org/maven2/"
3565 "com/thoughtworks/qdox/qdox/" version
3566 "/qdox-" version "-sources.jar"))
3569 "10xxrcaicq6axszcr2jpygisa4ch4sinyx5q7kqqxv4lknrmxp5x"))))
3570 (build-system ant-build-system)
3572 `(#:jar-name "qdox.jar"
3573 #:tests? #f; no tests
3575 ((guix build ant-build-system)
3576 (guix build java-utils)
3580 (modify-phases %standard-phases
3581 (add-before 'install 'create-pom
3583 (with-output-to-file "pom.xml"
3587 (modelVersion "4.0.0")
3589 (groupId "com.thoughtworks.qdox")
3591 (version ,,version))))))
3594 (install-from-pom "pom.xml")))))
3595 (home-page "https://github.com/codehaus/qdox")
3596 (synopsis "Parse definitions from Java source files")
3597 (description "QDox is a high speed, small footprint parser for extracting
3598 class/interface/method definitions from source files complete with JavaDoc
3599 @code{@@tags}. It is designed to be used by active code generators or
3600 documentation tools.")
3601 (license license:asl2.0)))
3603 (define-public java-qdox-2-M9
3606 (version "2.0-M9"); required by plexus-java
3609 ;; 2.0-M4, -M5 at https://github.com/paul-hammant/qdox
3610 ;; Older releases at https://github.com/codehaus/qdox/
3611 ;; Note: The release at maven is pre-generated. The release at
3612 ;; github requires jflex.
3613 (uri (string-append "https://repo1.maven.org/maven2/"
3614 "com/thoughtworks/qdox/qdox/" version
3615 "/qdox-" version "-sources.jar"))
3618 "1s2jnmx2dkwnaha12lcj26aynywgwa8sslc47z82wx8xai13y4fg"))))))
3620 (define-public java-jarjar
3622 (name "java-jarjar")
3627 "https://storage.googleapis.com/google-code-archive-downloads/v2/"
3628 "code.google.com/jarjar/jarjar-src-" version ".zip"))
3631 "1v8irhni9cndcw1l1wxqgry013s2kpj0qqn57lj2ji28xjq8ndjl"))
3632 (modules '((guix build utils)))
3635 ;; Delete bundled thirds-party jar archives.
3636 (delete-file-recursively "lib")
3637 (delete-file "src/test/enumtest.jar")
3638 ;; the CLASSPATH needs this directory, create an empty one
3641 (build-system ant-build-system)
3643 `(;; Tests require junit, which ultimately depends on this package.
3645 #:build-target "jar"
3647 (modify-phases %standard-phases
3648 (add-before 'build 'do-not-use-bundled-asm
3649 (lambda* (#:key inputs #:allow-other-keys)
3650 (substitute* "build.xml"
3651 (("<path id=\"path.build\">")
3652 (string-append "<path id=\"path.build\"><fileset dir=\""
3653 (assoc-ref inputs "java-asm-bootstrap")
3654 "/lib/m2\" includes=\"**/*.jar\"/>"))
3655 (("<zipfileset src=\"lib/asm-4.0.jar\"/>") "")
3656 (("lib/asm-commons-4.0.jar")
3657 (car (find-files (assoc-ref inputs "java-asm-bootstrap")
3659 (("<include name=\"org/objectweb/asm/commons/Remap\\*\\.class\"/>")
3660 (string-append "<include name=\"org/objectweb/asm/"
3661 "commons/Remap*.class\"/>"
3662 "<include name=\"org/objectweb/asm/*.class\"/>"
3663 "<include name=\"org/objectweb/asm/"
3664 "signature/*.class\"/>"
3665 "<include name=\"org/objectweb/asm/"
3666 "commons/SignatureRemapper.class\"/>")))
3668 (add-before 'build 'remove-maven-dependency
3670 ;; We do not need to build jarjar as a maven plugin just yet, so
3671 ;; remove this file. Maven requires jarjar (but not that plugin),
3672 ;; so removing it improves the bootstrap.
3673 (delete-file "src/main/com/tonicsystems/jarjar/JarJarMojo.java")
3676 (lambda* (#:key outputs #:allow-other-keys)
3677 (let ((target (string-append (assoc-ref outputs "out")
3679 (install-file (string-append "dist/jarjar-" ,version ".jar")
3683 `(("java-asm-bootstrap" ,java-asm-bootstrap)))
3685 `(("unzip" ,unzip)))
3686 (home-page "https://code.google.com/archive/p/jarjar/")
3687 (synopsis "Repackage Java libraries")
3689 "Jar Jar Links is a utility that makes it easy to repackage Java
3690 libraries and embed them into your own distribution. Jar Jar Links includes
3691 an Ant task that extends the built-in @code{jar} task.")
3692 (license license:asl2.0)))
3694 (define-public java-hamcrest-core
3696 (name "java-hamcrest-core")
3701 (url "https://github.com/hamcrest/JavaHamcrest/")
3702 (commit (string-append "hamcrest-java-" version))))
3703 (file-name (git-file-name name version))
3706 "16fxxkrd31ahqvcaby30jgh3z1i0zxh51m24hxgz0z2agxj6bc63"))
3707 (modules '((guix build utils)))
3710 ;; Delete bundled thirds-party jar archives.
3711 (delete-file-recursively "lib")
3713 (build-system ant-build-system)
3715 `(#:tests? #f ; Tests require junit
3716 #:modules ((guix build ant-build-system)
3717 (guix build java-utils)
3720 #:make-flags (list (string-append "-Dversion=" ,version))
3721 #:test-target "unit-test"
3722 #:build-target "core"
3724 (modify-phases %standard-phases
3725 ;; Disable unit tests, because they require junit, which requires
3726 ;; hamcrest-core. We also give a fixed value to the "Built-Date"
3727 ;; attribute from the manifest for reproducibility.
3728 (add-before 'configure 'patch-build.xml
3730 (substitute* "build.xml"
3731 (("unit-test, ") "")
3732 (("\\$\\{build.timestamp\\}") "guix"))
3734 ;; Java's "getMethods()" returns methods in an unpredictable order.
3735 ;; To make the output of the generated code deterministic we must
3736 ;; sort the array of methods.
3737 (add-after 'unpack 'make-method-order-deterministic
3739 (substitute* "hamcrest-generator/src/main/java/org/hamcrest/generator/ReflectiveFactoryReader.java"
3740 (("import java\\.util\\.Iterator;" line)
3741 (string-append line "\n"
3742 "import java.util.Arrays; import java.util.Comparator;"))
3743 (("allMethods = cls\\.getMethods\\(\\);" line)
3744 (string-append "_" line
3746 private Method[] getSortedMethods() {
3747 Arrays.sort(_allMethods, new Comparator<Method>() {
3749 public int compare(Method a, Method b) {
3750 return a.toString().compareTo(b.toString());
3756 private Method[] allMethods = getSortedMethods();")))
3758 (add-before 'build 'do-not-use-bundled-qdox
3759 (lambda* (#:key inputs #:allow-other-keys)
3760 (substitute* "build.xml"
3761 (("lib/generator/qdox-1.12.jar")
3762 (string-append (assoc-ref inputs "java-qdox-1.12")
3763 "/share/java/qdox.jar")))
3765 ;; build.xml searches for .jar files in this directoy, which
3766 ;; we remove from the source archive.
3767 (add-before 'build 'create-dummy-directories
3769 (mkdir-p "lib/integration")
3771 (add-before 'build 'create-pom
3773 (substitute* "pom/hamcrest-core.pom"
3774 (("@VERSION@") ,version))
3777 (install-from-pom "pom/hamcrest-core.pom")))))
3779 `(("java-qdox-1.12" ,java-qdox-1.12)
3780 ("java-jarjar" ,java-jarjar)))
3782 `(("java-hamcrest-parent-pom" ,java-hamcrest-parent-pom)))
3783 (home-page "http://hamcrest.org/")
3784 (synopsis "Library of matchers for building test expressions")
3786 "This package provides a library of matcher objects (also known as
3787 constraints or predicates) allowing @code{match} rules to be defined
3788 declaratively, to be used in other frameworks. Typical scenarios include
3789 testing frameworks, mocking libraries and UI validation rules.")
3790 (license license:bsd-2)))
3792 (define java-hamcrest-parent-pom
3794 (inherit java-hamcrest-core)
3795 (name "java-hamcrest-parent-pom")
3796 (propagated-inputs '())
3801 (modify-phases %standard-phases
3805 (substitute* "pom/hamcrest-parent.pom"
3806 (("@VERSION@") ,(package-version java-hamcrest-core)))
3809 (install-pom-file "pom/hamcrest-parent.pom")))))))
3811 (define-public java-hamcrest-library
3813 (inherit java-hamcrest-core)
3814 (name "java-hamcrest-library")
3816 (substitute-keyword-arguments (package-arguments java-hamcrest-core)
3817 ((#:build-target _) "library")
3819 `(modify-phases ,phases
3820 (add-after 'unpack 'patch-classpath-for-integration
3821 (lambda* (#:key inputs #:allow-other-keys)
3822 (substitute* "build.xml"
3823 (("build/hamcrest-core-\\$\\{version\\}\\.jar")
3824 (car (find-files (assoc-ref inputs "java-hamcrest-core")
3827 (replace 'create-pom
3829 (substitute* "pom/hamcrest-library.pom"
3830 (("@VERSION@") ,(package-version java-hamcrest-core)))
3833 (install-from-pom "pom/hamcrest-library.pom"))))))
3835 `(("java-hamcrest-core" ,java-hamcrest-core)
3836 ("java-hamcrest-parent-pom" ,java-hamcrest-parent-pom)))))
3838 (define-public java-junit
3845 (url "https://github.com/junit-team/junit/")
3846 (commit (string-append "r" version))))
3847 (file-name (git-file-name name version))
3850 "1j8avi91px1z8rjc89cfikwrvfifdmmsarwiyrcnr59ynvpz0v8h"))
3851 (modules '((guix build utils)))
3854 ;; Delete bundled jar archives.
3855 (delete-file-recursively "lib")
3857 (build-system ant-build-system)
3859 `(#:jar-name "junit.jar"
3860 #:source-dir "src/main/java"
3861 #:test-dir "src/test"
3862 #:test-exclude (list "**/SimpleTest.java" "**/StackTracesTest.java"
3863 "**/RuleChainTest.java" "**/TestWatchmanTest.java")
3865 (modify-phases %standard-phases
3866 (add-before 'check 'copy-test-resources
3868 (copy-recursively "src/test/resources" "build/test-classes")
3871 (install-from-pom "pom.xml")))))
3873 `(("java-hamcrest-core" ,java-hamcrest-core)))
3875 `(("java-hamcrest-library" ,java-hamcrest-library)))
3876 (home-page "https://junit.org/junit4/")
3877 (synopsis "Test framework for Java")
3879 "JUnit is a simple framework to write repeatable tests for Java projects.
3880 JUnit provides assertions for testing expected results, test fixtures for
3881 sharing common test data, and test runners for running tests.")
3882 (license license:epl1.0)))
3884 (define-public java-junitparams
3886 (name "java-junitparams")
3891 (url "https://github.com/Pragmatists/JUnitParams")
3892 (commit (string-append "JUnitParams-" version))))
3893 (file-name (git-file-name name version))
3896 "0rb52xdfp99invyjrras3w0bf0a81cz30yd47rkkiyqcqj0y1q9b"))))
3897 (build-system ant-build-system)
3899 `(#:jar-name "junitparams.jar"
3900 #:source-dir "src/main/java"
3901 #:test-dir "src/test"
3902 #:test-exclude (list "**/SuperclassTest.java")))
3904 `(("java-junit" ,java-junit)))
3906 `(("java-junit" ,java-junit)
3907 ("java-hamcrest-core" ,java-hamcrest-core)
3908 ("java-assertj" ,java-assertj)))
3909 (home-page "https://github.com/Pragmatists/JUnitParams")
3910 (synopsis "Parameterised test support for JUnit")
3911 (description "The JUnitParams project adds a new runner to JUnit and
3912 provides much easier and readable parametrised tests for JUnit.")
3913 (license license:asl2.0)))
3915 (define-public java-plexus-utils
3917 (name "java-plexus-utils")
3918 ;; sisu-build-api needs this version, later versions don't work
3923 (url "https://github.com/codehaus-plexus/plexus-utils")
3924 (commit (string-append "plexus-utils-" version))))
3925 (file-name (git-file-name name version))
3928 "1w169glixyk94jbczj8jzg897lsab46jihiaa3dhw0p06g35va8b"))))
3929 (build-system ant-build-system)
3930 ;; FIXME: The default build.xml does not include a target to install
3933 `(#:jar-name "plexus-utils.jar"
3934 #:source-dir "src/main"
3936 (modify-phases %standard-phases
3937 (add-after 'unpack 'fix-reference-to-/bin-and-/usr
3939 (substitute* "src/main/java/org/codehaus/plexus/util/\
3940 cli/shell/BourneShell.java"
3941 (("/bin/sh") (which "sh"))
3942 (("/usr/") (getcwd)))
3944 (add-after 'unpack 'fix-or-disable-broken-tests
3946 (with-directory-excursion "src/test/java/org/codehaus/plexus/util"
3947 (substitute* '("cli/CommandlineTest.java"
3948 "cli/shell/BourneShellTest.java")
3949 (("/bin/sh") (which "sh"))
3950 (("/bin/echo") (which "echo")))
3952 ;; This test depends on MavenProjectStub, but we don't have
3953 ;; a package for Maven.
3954 (delete-file "introspection/ReflectionValueExtractorTest.java")
3956 ;; FIXME: The command line tests fail, maybe because they use
3958 (delete-file "cli/CommandlineTest.java")
3960 ;; These tests require openjdk jmh, which is not packaged yet
3961 (for-each delete-file (find-files "." "PerfTest.java$")))
3963 (add-before 'build 'copy-resources
3965 (copy-recursively "src/main/resources" "build/classes")
3967 (replace 'install (install-from-pom "pom.xml")))))
3969 `(("java-hamcrest-core" ,java-hamcrest-core)
3970 ("java-junit" ,java-junit)))
3972 `(("plexus-parent-pom" ,plexus-parent-pom-5.1)))
3973 (home-page "https://codehaus-plexus.github.io/plexus-utils/")
3974 (synopsis "Common utilities for the Plexus framework")
3975 (description "This package provides various Java utility classes for the
3976 Plexus framework to ease working with strings, files, command lines, XML and
3978 (license license:asl2.0)))
3980 (define-public java-plexus-utils-3.3.0
3982 (inherit java-plexus-utils)
3987 (url "https://github.com/codehaus-plexus/plexus-utils")
3988 (commit (string-append "plexus-utils-" version))))
3989 (file-name (git-file-name "java-plexus-utils" version))
3992 "0d0fq21rzjy0j55kcp8w9k1rbq9rwr0r7cc8239p9jbz54vihp0g"))))))
3994 (define-public java-plexus-interpolation
3996 (name "java-plexus-interpolation")
4001 (url "https://github.com/codehaus-plexus/plexus-interpolation")
4002 (commit (string-append "plexus-interpolation-" version))))
4003 (file-name (git-file-name name version))
4006 "1rahjmhywf6d5m32qzlc9izawyvcd71abfm9k03f13rs2xmfxzlh"))))
4007 (build-system ant-build-system)
4009 `(#:jar-name "plexus-interpolation.jar"
4010 #:source-dir "src/main"
4012 (modify-phases %standard-phases
4013 (replace 'install (install-from-pom "pom.xml")))))
4015 `(("plexus-parent-pom-5.1" ,plexus-parent-pom-5.1)))
4017 `(("java-junit" ,java-junit)
4018 ("java-hamcrest-core" ,java-hamcrest-core)))
4019 (home-page "https://codehaus-plexus.github.io/plexus-interpolation/")
4020 (synopsis "Java components for interpolating ${} strings and the like")
4021 (description "Plexus interpolator is a modular, flexible interpolation
4022 framework for the expression language style commonly seen in Maven, Plexus,
4023 and other related projects.
4025 It has its foundation in the @code{org.codehaus.plexus.utils.interpolation}
4026 package within @code{plexus-utils}, but has been separated in order to allow
4027 these two libraries to vary independently of one another.")
4028 (license license:asl2.0)))
4030 (define-public java-plexus-classworlds
4032 (name "java-plexus-classworlds")
4037 (url "https://github.com/codehaus-plexus/plexus-classworlds")
4038 (commit (string-append "plexus-classworlds-" version))))
4039 (file-name (git-file-name name version))
4042 "034k2hgvj1saalwbnzrbg4n0zgzwcpz1lhlb8q4kgglsp9pmm03s"))))
4043 (build-system ant-build-system)
4045 `(#:jar-name "plexus-classworlds.jar"
4046 #:source-dir "src/main"
4047 #:tests? #f;; FIXME: we need to generate some resources as in pom.xml
4049 (modify-phases %standard-phases
4050 (replace 'install (install-from-pom "pom.xml")))))
4052 `(("plexus-parent-pom-5.1" ,plexus-parent-pom-5.1)))
4054 `(("java-junit" ,java-junit)))
4055 (home-page "https://codehaus-plexus.github.io/plexus-classworlds/")
4056 (synopsis "Java class loader framework")
4057 (description "Plexus classworlds replaces the native @code{ClassLoader}
4058 mechanism of Java. It is especially useful for dynamic loading of application
4060 (license license:asl2.0)))
4062 (define java-plexus-container-default-bootstrap
4064 (name "java-plexus-container-default-bootstrap")
4069 (url "https://github.com/codehaus-plexus/plexus-containers")
4070 (commit (string-append "plexus-containers-" version))))
4071 (file-name (git-file-name name version))
4074 "1316hrp5vqfv0aw7miq2fp0wwy833h66h502h29vnh5sxj27x228"))))
4075 (build-system ant-build-system)
4077 `(#:jar-name "container-default.jar"
4078 #:source-dir "plexus-container-default/src/main/java"
4079 #:test-dir "plexus-container-default/src/test"
4080 #:tests? #f; requires plexus-archiver, which depends on this package
4082 (modify-phases %standard-phases
4083 (add-before 'build 'fix-google-collections
4085 ;; Google collections are now replaced with guava
4086 (substitute* "plexus-container-default/pom.xml"
4087 (("google-collections") "guava")
4088 (("com.google.collections") "com.google.guava"))
4090 (add-before 'build 'copy-resources
4093 "plexus-container-default/src/main/resources/"
4097 (install-from-pom "plexus-container-default/pom.xml")))))
4099 `(("java-plexus-worldclass" ,java-plexus-classworlds)
4100 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
4101 ("java-plexus-utils" ,java-plexus-utils)
4102 ("java-junit" ,java-junit)
4103 ("java-guava" ,java-guava)
4104 ("java-plexus-containers-parent-pom" ,java-plexus-containers-parent-pom)))
4105 (home-page "https://github.com/codehaus-plexus/plexus-containers")
4106 (synopsis "Inversion-of-control container")
4107 (description "Plexus-default-container is Plexus' inversion-of-control
4108 (@dfn{IoC}) container. It is composed of its public API and its default
4110 (license license:asl2.0)))
4112 (define java-plexus-containers-parent-pom
4114 (inherit java-plexus-container-default-bootstrap)
4115 (name "java-plexus-containers-parent-pom")
4119 (modify-phases %standard-phases
4123 (install-pom-file "pom.xml")))))
4125 `(("plexus-parent-pom" ,plexus-parent-pom-4.0)))))
4127 (define-public java-plexus-io
4129 (name "java-plexus-io")
4134 (url "https://github.com/codehaus-plexus/plexus-io")
4135 (commit (string-append "plexus-io-" version))))
4136 (file-name (git-file-name name version))
4139 "1r3wqfpbxq8vp4p914i8p88r0994rmcjw02hz14n11cfb6gsyvlr"))))
4140 (build-system ant-build-system)
4142 `(#:jar-name "plexus-io.jar"
4143 #:source-dir "src/main/java"
4144 #:test-dir "src/test"
4146 (modify-phases %standard-phases
4147 (add-before 'build 'copy-resources
4149 (mkdir-p "build/classes")
4150 (copy-recursively "src/main/resources" "build/classes")
4151 (mkdir-p "build/test-classes")
4152 (copy-recursively "src/test/resources" "build/test-classes")
4154 (replace 'install (install-from-pom "pom.xml")))))
4156 `(("java-plexus-utils" ,java-plexus-utils-3.3.0)
4157 ("java-commons-io" ,java-commons-io)
4158 ("plexus-parent-pom" ,plexus-parent-pom-5.1)))
4160 `(("java-jsr305" ,java-jsr305)))
4162 `(("junit" ,java-junit)
4163 ("hamcrest" ,java-hamcrest-core)
4164 ("guava" ,java-guava)
4165 ("classworlds" ,java-plexus-classworlds)
4166 ("xbean" ,java-geronimo-xbean-reflect)
4167 ("container-default" ,java-plexus-container-default-bootstrap)))
4168 (home-page "https://github.com/codehaus-plexus/plexus-io")
4169 (synopsis "I/O plexus components")
4170 (description "Plexus IO is a set of plexus components, which are designed
4171 for use in I/O operations. This implementation using plexus components allows
4172 reusing it in maven.")
4173 (license license:asl2.0)))
4175 (define-public java-plexus-archiver
4177 (name "java-plexus-archiver")
4181 (uri (string-append "https://github.com/codehaus-plexus/plexus-archiver"
4182 "/archive/plexus-archiver-" version ".tar.gz"))
4185 "144n971r3lfrx3l12nf2scm80x4xdvgbkk4bjpa4vcvvdrll6qys"))))
4186 (build-system ant-build-system)
4188 `(#:jar-name "plexus-archiver.jar"
4189 #:source-dir "src/main/java"
4190 #:test-dir "src/test"
4191 #:test-exclude (list "**/Abstract*.java" "**/Base*.java")
4193 (modify-phases %standard-phases
4194 (add-before 'check 'remove-failing
4196 ;; Requires an older version of plexus container
4198 "src/test/java/org/codehaus/plexus/archiver/DuplicateFilesTest.java")
4200 (add-before 'check 'fix-test-building
4202 (substitute* "build.xml"
4203 (("srcdir=\"src/test\"") "srcdir=\"src/test/java\""))
4205 (add-before 'build 'copy-resources
4207 (mkdir-p "build/classes")
4208 (copy-recursively "src/main/resources" "build/classes")
4209 (mkdir-p "build/test-classes")
4210 (copy-recursively "src/test/resources" "build/test-classes")
4212 (replace 'install (install-from-pom "pom.xml")))))
4214 `(("java-plexus-utils" ,java-plexus-utils-3.3.0)
4215 ("java-plexus-io" ,java-plexus-io)
4216 ("java-iq80-snappy" ,java-iq80-snappy)
4217 ("java-commons-compress" ,java-commons-compress)
4218 ("plexus-parent-pom" ,plexus-parent-pom-6.1)))
4220 `(("java-jsr305" ,java-jsr305)
4221 ("java-plexus-container-default"
4222 ,java-plexus-container-default-bootstrap)))
4224 `(("java-hamcrest-core" ,java-hamcrest-core)
4225 ("junit" ,java-junit)
4226 ("classworld" ,java-plexus-classworlds)
4227 ("xbean" ,java-geronimo-xbean-reflect)
4229 ("guava" ,java-guava)))
4230 (home-page "https://github.com/codehaus-plexus/plexus-archiver")
4231 (synopsis "Archiver component of the Plexus project")
4232 (description "Plexus-archiver contains a component to deal with project
4234 (license license:asl2.0)))
4236 (define-public java-plexus-container-default
4238 (inherit java-plexus-container-default-bootstrap)
4239 (name "java-plexus-container-default")
4241 `(#:jar-name "container-default.jar"
4242 #:source-dir "plexus-container-default/src/main/java"
4243 #:test-dir "plexus-container-default/src/test"
4244 #:test-exclude (list ;"**/*Test.java"
4246 ;; Requires plexus-hierarchy
4247 "**/PlexusHierarchyTest.java"
4249 "**/ComponentRealmCompositionTest.java"
4250 "**/PlexusContainerTest.java")
4252 (modify-phases %standard-phases
4253 (add-before 'build 'fix-google-collections
4255 ;; Google collections are now replaced with guava
4256 (substitute* "plexus-container-default/pom.xml"
4257 (("google-collections") "guava")
4258 (("com.google.collections") "com.google.guava"))
4260 (add-before 'build 'copy-resources
4263 "plexus-container-default/src/main/resources/"
4266 (add-before 'check 'fix-paths
4268 (let ((dir "plexus-container-default/src/test/java/org/codehaus"))
4271 dir "/plexus/component/composition/"
4272 "ComponentRealmCompositionTest.java")
4273 (("src/test") "plexus-container-default/src/test"))
4276 (install-from-pom "plexus-container-default/pom.xml")))))
4278 `(("worldclass" ,java-plexus-classworlds)
4279 ("xbean" ,java-geronimo-xbean-reflect)
4280 ("utils" ,java-plexus-utils)
4281 ("junit" ,java-junit)
4282 ("guava" ,java-guava)))
4284 `(("archiver" ,java-plexus-archiver)
4285 ("hamcrest" ,java-hamcrest-core)))))
4287 (define-public java-plexus-component-annotations
4289 (inherit java-plexus-container-default)
4290 (name "java-plexus-component-annotations")
4292 `(#:jar-name "plexus-component-annotations.jar"
4293 #:source-dir "plexus-component-annotations/src/main/java"
4294 #:tests? #f; no tests
4296 (modify-phases %standard-phases
4298 (install-from-pom "plexus-component-annotations/pom.xml")))))
4300 `(("java-plexus-containers-parent-pom" ,java-plexus-containers-parent-pom)))
4303 (synopsis "Plexus descriptors generator")
4304 (description "This package is a Maven plugin to generate Plexus descriptors
4305 from source tags and class annotations.")))
4307 (define-public java-plexus-component-metadata
4309 (inherit java-plexus-container-default)
4310 (name "java-plexus-component-metadata")
4312 `(#:jar-name "plexus-component-metadata.jar"
4313 #:source-dir "src/main/java"
4314 #:test-dir "src/test"
4317 (modify-phases %standard-phases
4318 (add-before 'configure 'chdir
4320 (chdir "plexus-component-metadata")
4322 (add-before 'build 'copy-resources
4324 (copy-recursively "src/main/resources"
4328 `(("java-plexus-container-default" ,java-plexus-container-default)
4329 ("java-plexu-component-annotations" ,java-plexus-component-annotations)
4330 ("java-plexus-utils" ,java-plexus-utils)
4331 ("java-plexus-cli" ,java-plexus-cli)
4332 ("java-plexus-classworlds" ,java-plexus-classworlds)
4333 ("maven-plugin-api" ,maven-plugin-api)
4334 ("maven-plugin-annotations" ,maven-plugin-annotations)
4335 ("maven-core-bootstrap" ,maven-core-bootstrap)
4336 ("maven-model" ,maven-model)
4337 ("java-commons-cli" ,java-commons-cli)
4338 ("java-qdox" ,java-qdox)
4339 ("java-jdom2" ,java-jdom2)
4340 ("java-asm" ,java-asm)))
4342 `(("java-junit" ,java-junit)
4343 ("java-guava" ,java-guava)
4344 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)))
4345 (synopsis "Inversion-of-control container for Maven")
4346 (description "The Plexus project provides a full software stack for creating
4347 and executing software projects. Based on the Plexus container, the
4348 applications can utilise component-oriented programming to build modular,
4349 reusable components that can easily be assembled and reused. This package
4350 provides the Maven plugin generating the component metadata.")))
4352 (define-public java-plexus-cipher
4354 (name "java-plexus-cipher")
4359 (url "https://github.com/codehaus-plexus/plexus-cipher")
4360 (commit (string-append "plexus-cipher-" version))))
4361 (file-name (git-file-name name version))
4364 "0m638nzlxbmnbcj5cwdpgs326ab584yv0k803zlx37r6iqwvf6b0"))))
4365 (build-system ant-build-system)
4367 `(#:jar-name "plexus-cipher.jar"
4368 #:source-dir "src/main/java"
4369 #:tests? #f; FIXME: requires sisu-inject-bean
4371 (modify-phases %standard-phases
4372 (add-before 'build 'copy-resources
4374 (copy-recursively "src/main/resources" "build/classes")
4375 (mkdir-p "build/classes/META-INF/sisu")
4376 (with-output-to-file "build/classes/META-INF/sisu/javax.inject.Named"
4378 (display "org.sonatype.plexus.components.cipher.DefaultPlexusCipher\n")))
4380 (add-before 'install 'fix-test-dependency
4382 ;; sisu-inject-bean is only used for tests, but its scope is "provided".
4383 (substitute* "pom.xml"
4384 (("provided") "test"))
4386 (replace 'install (install-from-pom "pom.xml")))))
4388 `(("java-cdi-api" ,java-cdi-api)
4389 ("java-javax-inject" ,java-javax-inject)))
4391 `(("java-sonatype-spice-parent-pom" ,java-sonatype-spice-parent-pom-15)))
4393 `(("java-junit" ,java-junit)))
4394 (home-page "https://github.com/sonatype/plexus-cipher")
4395 (synopsis "Encryption/decryption Component")
4396 (description "Plexus-cipher contains a component to deal with encryption
4398 (license license:asl2.0)))
4400 (define-public java-plexus-java
4402 (name "java-plexus-java")
4407 (url "https://github.com/codehaus-plexus/plexus-languages")
4408 (commit (string-append "plexus-languages-" version))))
4409 (file-name (git-file-name name version))
4412 "0vmvgq5hfxs90yyxgssfpwq78l7vwx1ljwpkk594mrdr8sm668b5"))
4413 (modules '((guix build utils)))
4416 (for-each delete-file (find-files "." ".*.jar$"))
4418 (build-system ant-build-system)
4420 `(#:jar-name "plexus-java.java"
4421 #:source-dir "plexus-java/src/main/java"
4422 #:test-dir "plexus-java/src/test"
4423 #:tests? #f; require mockito 2
4425 (modify-phases %standard-phases
4426 (add-after 'build 'generate-metadata
4428 (invoke "java" "-cp" (string-append (getenv "CLASSPATH") ":build/classes")
4429 "org.codehaus.plexus.metadata.PlexusMetadataGeneratorCli"
4430 "--source" "plexus-java/src/main/java"
4431 "--output" "build/classes/META-INF/plexus/components.xml"
4432 "--classes" "build/classes"
4433 "--descriptors" "build/classes/META-INF")
4434 (invoke "ant" "jar")
4436 (add-before 'install 'install-parent
4437 (install-pom-file "pom.xml"))
4439 (install-from-pom "plexus-java/pom.xml")))))
4441 `(("java-asm" ,java-asm)
4442 ("java-qdox" ,java-qdox-2-M9)
4443 ("java-javax-inject" ,java-javax-inject)
4444 ("plexus-parent-pom" ,plexus-parent-pom-4.0)))
4446 `(("java-plexus-component-annotations" ,java-plexus-component-annotations)))
4448 `(("java-plexus-component-metadata" ,java-plexus-component-metadata)
4449 ("java-junit" ,java-junit)))
4450 (home-page "https://codehaus-plexus.github.io/plexus-languages/plexus-java")
4451 (synopsis "Shared language features for Java")
4452 (description "This package contains shared language features of the Java
4453 language, for the plexus project.")
4454 (license license:asl2.0)))
4456 (define-public java-plexus-compiler-api
4458 (name "java-plexus-compiler-api")
4463 (url "https://github.com/codehaus-plexus/plexus-compiler")
4464 (commit (string-append "plexus-compiler-" version))))
4465 (file-name (git-file-name name version))
4468 "1nq1gnn3s6z1j29gmi1hqbklsmm8b1lmnafb0191914f95mn18gk"))))
4469 (build-system ant-build-system)
4471 `(#:jar-name "plexus-compiler-api.jar"
4472 #:source-dir "plexus-compiler-api/src/main/java"
4473 #:test-dir "plexus-compiler-api/src/test"
4475 (modify-phases %standard-phases
4477 (install-from-pom "plexus-compiler-api/pom.xml")))))
4479 `(("java-plexus-container-default" ,java-plexus-container-default)
4480 ("java-plexus-compiler-pom" ,java-plexus-compiler-pom)
4481 ("java-plexus-util" ,java-plexus-utils)))
4483 `(("java-junit" ,java-junit)))
4484 (home-page "https://github.com/codehaus-plexus/plexus-compiler")
4485 (synopsis "Plexus Compilers component's API to manipulate compilers")
4486 (description "This package contains the API used by components to manipulate
4488 (license (list license:asl2.0
4491 (define java-plexus-compiler-pom
4493 (inherit java-plexus-compiler-api)
4494 (name "java-plexus-compiler-pom")
4498 (modify-phases %standard-phases
4502 (install-pom-file "pom.xml"))
4503 (add-after 'install 'install-compilers
4504 (install-pom-file "plexus-compilers/pom.xml")))))
4506 `(("plexus-components-parent-pom-4.0" ,plexus-components-parent-pom-4.0)))))
4508 (define plexus-components-parent-pom-4.0
4510 (name "plexus-components-parent-pom")
4515 (url "https://github.com/codehaus-plexus/plexus-components")
4516 (commit (string-append "plexus-components-" version))))
4517 (file-name (git-file-name name version))
4520 "041bm8yv0m2i17mqg8zljib4ykpha7ijls2qfdwvkma4d39lhysi"))))
4521 (build-system ant-build-system)
4525 (modify-phases %standard-phases
4529 (install-pom-file "pom.xml")))))
4531 `(("plexus-parent-pom-4.0" ,plexus-parent-pom-4.0)))
4532 (home-page "https://codehaus-plexus.github.io/plexus-components")
4533 (synopsis "Plexus parent pom")
4534 (description "This package contains the Plexus components parent POM.")
4535 (license license:asl2.0)))
4537 (define-public java-plexus-compiler-manager
4539 (inherit java-plexus-compiler-api)
4540 (name "java-plexus-compiler-manager")
4542 `(#:jar-name "compiler-compiler-manager.java"
4543 #:source-dir "plexus-compiler-manager/src/main/java"
4544 #:test-dir "plexus-compiler-manager/src/test"
4547 (modify-phases %standard-phases
4548 (add-after 'build 'generate-metadata
4550 (invoke "java" "-cp" (string-append (getenv "CLASSPATH") ":build/classes")
4551 "org.codehaus.plexus.metadata.PlexusMetadataGeneratorCli"
4552 "--source" "plexus-compiler-manager/src/main/java"
4553 "--output" "build/classes/META-INF/plexus/components.xml"
4554 "--classes" "build/classes"
4555 "--descriptors" "build/classes/META-INF")
4556 (invoke "ant" "jar")
4558 (add-after 'generate-metadata 'rebuild
4560 (invoke "ant" "jar")
4563 (install-from-pom "plexus-compiler-manager/pom.xml")))))
4565 `(("java-plexus-compiler-api" ,java-plexus-compiler-api)
4566 ("java-plexus-compiler-pom" ,java-plexus-compiler-pom)
4567 ("java-plexus-container-default" ,java-plexus-container-default)))
4570 ("java-plexus-component-metadata" ,java-plexus-component-metadata)))
4571 (synopsis "Compiler management for Plexus Compiler component")
4572 (description "Plexus Compiler is a Plexus component to use different
4573 compilers through a uniform API. This component chooses the compiler
4574 implementation to use in a project.")))
4576 (define-public java-plexus-compiler-javac
4578 (inherit java-plexus-compiler-api)
4579 (name "java-plexus-compiler-javac")
4581 `(#:jar-name "plexus-compiler-javac.jar"
4582 #:source-dir "plexus-compilers/plexus-compiler-javac/src/main/java"
4584 #:tests? #f; depends on compiler-test -> maven-core -> ... -> this package.
4585 #:test-dir "plexus-compilers/plexus-compiler-javac/src/test"
4586 #:modules ((guix build ant-build-system)
4588 (guix build java-utils)
4591 (modify-phases %standard-phases
4592 ;; We cannot use java-plexus-component-metadata to generate the metadata
4593 ;; because it ultimately depends on this package.
4594 ;; Create it manually instead
4595 (add-before 'build 'create-metadata
4597 (let* ((dir "build/classes/META-INF/plexus")
4598 (file (string-append dir "/components.xml")))
4600 (with-output-to-file file
4606 (role "org.codehaus.plexus.compiler.Compiler")
4608 (implementation "org.codehaus.plexus.compiler.javac.JavacCompiler")
4609 (isolated-realm "false"))))))))
4612 (install-from-pom "plexus-compilers/plexus-compiler-javac/pom.xml")))))
4614 `(("java-plexus-compiler-api" ,java-plexus-compiler-api)
4615 ("java-plexus-utils" ,java-plexus-utils)
4616 ("java-plexus-container-default" ,java-plexus-container-default)))
4617 (synopsis "Javac Compiler support for Plexus Compiler component")
4618 (description "This package contains the Javac Compiler support for Plexus
4619 Compiler component.")))
4621 (define plexus-components-pom-1.1.20
4623 (name "plexus-components-pom-1.1.20")
4628 (url "https://github.com/codehaus-plexus/plexus-components")
4629 (commit (string-append "plexus-components-" version))))
4630 (file-name (git-file-name name version))
4633 "1q254k95m9icyfsvaw8c226midg8v6v436wvivhv7im825mnp5yb"))))
4634 (build-system ant-build-system)
4638 (modify-phases %standard-phases
4642 (install-pom-file "pom.xml")))))
4644 `(("plexus-parent-pom" ,plexus-parent-pom-3.1)))
4645 (home-page "https://github.com/codehaus-plexus/plexus-components")
4646 (synopsis "Maven parent pom for plexus packages")
4647 (description "This package contains the parent pom for plexus component
4649 (license license:asl2.0)))
4651 (define-public java-plexus-digest
4653 (name "java-plexus-digest")
4658 (url "https://github.com/codehaus-plexus/plexus-digest")
4659 (commit "2a52ad1bda8297fa0e287163d2fa37245ec6a430")))
4660 (file-name (git-file-name name version))
4663 "19w5wxsliz8r42niry68qa665kvjsb8081dazg9vgd3pca72w07x"))))
4664 (build-system ant-build-system)
4666 `(#:jar-name "plexus-digest.jar"
4667 #:source-dir "src/main/java"
4670 (modify-phases %standard-phases
4672 (install-from-pom "pom.xml")))))
4674 `(("java-plexus-utils" ,java-plexus-utils)
4675 ("plexus-components-pom-1.1.20" ,plexus-components-pom-1.1.20)))
4677 `(("java-junit" ,java-junit)))
4678 (home-page "https://github.com/codehaus-plexus/plexus-digest")
4679 (synopsis "Hash function utilities for Java")
4680 (description "This package is a plexus component that contains hash
4681 function utilities.")
4682 (license license:asl2.0)))
4684 (define-public java-plexus-sec-dispatcher
4686 (name "java-plexus-sec-dispatcher")
4687 (version "1.4") ;; Newest release listed at the Maven Central Repository.
4689 ;; This project doesn't tag releases or publish tarballs, so we take
4690 ;; the "prepare release plexus-sec-dispatcher-1.4" git commit.
4693 (url "https://github.com/sonatype/plexus-sec-dispatcher/")
4694 (commit "7db8f880486e192a1c5ea9544e01e756c3d49d0f")))
4697 "1ng4yliy4cqpjr4fxxjbpwyk1wkch5f8vblm1kvwf328s4gibszs"))
4698 (file-name (git-file-name name version))))
4700 `(#:jar-name "plexus-sec-dispatcher.jar"
4701 #:source-dir "src/main/java"
4703 (modify-phases %standard-phases
4704 (add-before 'build 'generate-models
4705 (lambda* (#:key inputs #:allow-other-keys)
4706 (define (modello-single-mode file version mode)
4708 "org.codehaus.modello.ModelloCli"
4709 file mode "src/main/java" version
4711 (let ((file "src/main/mdo/settings-security.mdo"))
4712 (modello-single-mode file "1.0.0" "java")
4713 (modello-single-mode file "1.0.0" "xpp3-reader")
4714 (modello-single-mode file "1.0.0" "xpp3-writer"))
4716 (add-before 'build 'generate-components.xml
4718 (mkdir-p "build/classes/META-INF/plexus")
4719 (with-output-to-file "build/classes/META-INF/plexus/components.xml"
4725 <role>org.sonatype.plexus.components.sec.dispatcher.SecDispatcher</role>\n
4726 <role-hint>default</role-hint>\n
4727 <implementation>org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher</implementation>\n
4728 <description></description>\n
4731 <role>org.sonatype.plexus.components.cipher.PlexusCipher</role>\n
4732 <field-name>_cipher</field-name>\n
4735 <role>org.sonatype.plexus.components.sec.dispatcher.PasswordDecryptor</role>\n
4736 <field-name>_decryptors</field-name>\n
4740 <_configuration-file>~/.settings-security.xml</_configuration-file>\n
4744 </component-set>\n")))
4746 (add-before 'check 'fix-paths
4748 (copy-recursively "src/test/resources" "target")
4750 (replace 'install (install-from-pom "pom.xml")))))
4752 `(("java-plexus-utils" ,java-plexus-utils)
4753 ("java-plexus-cipher" ,java-plexus-cipher)
4754 ("java-sonatype-spice-parent-pom" ,java-sonatype-spice-parent-pom-12)))
4756 `(("java-modello-core" ,java-modello-core)
4758 ("java-plexus-container-default" ,java-plexus-container-default)
4759 ("java-plexus-classworlds" ,java-plexus-classworlds)
4760 ("java-plexus-utils" ,java-plexus-utils)
4761 ("java-guava" ,java-guava)
4762 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
4763 ("java-sisu-build-api" ,java-sisu-build-api)
4765 ("java-modellop-plugins-java" ,java-modello-plugins-java)
4766 ("java-modellop-plugins-xml" ,java-modello-plugins-xml)
4767 ("java-modellop-plugins-xpp3" ,java-modello-plugins-xpp3)
4769 ("java-junit" ,java-junit)))
4770 (build-system ant-build-system)
4771 (home-page "https://github.com/sonatype/plexus-sec-dispatcher")
4772 (synopsis "Plexus Security Dispatcher Component")
4773 (description "This package is the Plexus Security Dispatcher Component.
4774 This component decrypts a string passed to it.")
4775 (license license:asl2.0)))
4777 (define-public java-plexus-cli
4779 (name "java-plexus-cli")
4784 (url "https://github.com/sonatype/plexus-cli")
4785 (commit "a776afa6bca84e5107bedb69440329cdb24ed645")))
4786 (file-name (string-append name "-" version))
4789 "0xjrlay605rypv3zd7y24vlwf0039bil3n2cqw54r1ddpysq46vx"))))
4790 (build-system ant-build-system)
4792 `(#:jar-name "plexus-cli.jar"
4793 #:source-dir "src/main/java"
4795 #:test-dir "src/test"))
4797 `(("java-commons-cli" ,java-commons-cli)
4798 ("java-plexus-container-default" ,java-plexus-container-default)
4799 ("java-plexus-classworlds" ,java-plexus-classworlds)))
4801 `(("java-plexus-utils" ,java-plexus-utils)
4802 ("java-junit" ,java-junit)
4803 ("java-guava" ,java-guava)))
4804 (home-page "https://codehaus-plexus.github.io/plexus-cli")
4805 (synopsis "CLI building library for plexus")
4806 (description "This package is a library to help creating CLI around
4807 Plexus components.")
4808 (license license:asl2.0)))
4810 (define-public java-sisu-build-api
4812 (name "java-sisu-build-api")
4817 (url "https://github.com/sonatype/sisu-build-api")
4818 (commit (string-append "plexus-build-api-" version))))
4819 (file-name (git-file-name name version))
4822 "1d5w6c58gkx30d51v7qwv1xrhc0ly76848gihmgshj19yf6yhca0"))))
4823 (build-system ant-build-system)
4825 `(#:jar-name "sisu-build-api.jar"
4826 #:source-dir "src/main/java"
4828 #:tests? #f; FIXME: how to run the tests?
4830 (modify-phases %standard-phases
4831 (add-before 'build 'copy-resources
4833 (copy-recursively "src/main/resources" "build/classes")
4834 (substitute* (find-files "build/classes")
4835 (("\\$\\{project.version\\}") ,version))
4837 (add-before 'build 'generate-plexus-compontent
4839 (mkdir-p "build/classes/META-INF/plexus")
4840 ;; This file is required for plexus to inject this package.
4841 ;; FIXME: how is it generated?
4842 (with-output-to-file "build/classes/META-INF/plexus/components.xml"
4848 <role>org.sonatype.plexus.build.incremental.BuildContext</role>\n
4849 <role-hint>default</role-hint>\n
4850 <implementation>org.sonatype.plexus.build.incremental.DefaultBuildContext</implementation>\n
4851 <description>Filesystem based non-incremental build context implementation\n
4852 which behaves as if all files were just created.</description>\n
4855 </component-set>\n")))
4858 (install-from-pom "pom.xml")))))
4860 `(("java-plexus-utils" ,java-plexus-utils)
4861 ("java-plexus-container-default" ,java-plexus-container-default)))
4862 (home-page "https://github.com/sonatype/sisu-build-api/")
4863 (synopsis "Base build API for maven")
4864 (description "This package contains the base build API for maven and
4865 a default implementation of it. This API is about scanning files in a
4866 project and determining what files need to be rebuilt.")
4867 (license license:asl2.0)))
4869 (define-public java-modello-core
4871 (name "java-modello-core")
4876 (url "https://github.com/codehaus-plexus/modello")
4877 (commit (string-append "modello-" version))))
4878 (file-name (git-file-name name version))
4881 "1di6ni42aqllpdvkpyfcw70352vr2i8wf6hd5nhd9kmqjb5dj5j4"))))
4882 (build-system ant-build-system)
4884 `(#:jar-name "modello-core.jar"
4885 #:source-dir "modello-core/src/main/java"
4886 #:test-dir "modello-core/src/test"
4887 #:main-class "org.codehaus.modello.ModelloCli"
4890 (modify-phases %standard-phases
4891 (add-before 'build 'copy-resources
4893 (mkdir-p "build/classes/META-INF/plexus")
4894 (copy-file "modello-core/src/main/resources/META-INF/plexus/components.xml"
4895 "build/classes/META-INF/plexus/components.xml")
4897 (add-before 'check 'fix-tests
4899 (with-directory-excursion "modello-core/src/test/java/org/codehaus"
4900 (substitute* '("modello/core/DefaultModelloCoreTest.java"
4901 "modello/core/io/ModelReaderTest.java")
4902 (("src/test") "modello-core/src/test")))
4905 `(("java-plexus-utils" ,java-plexus-utils)
4906 ("java-plexus-container-default" ,java-plexus-container-default)
4907 ("java-sisu-build-api" ,java-sisu-build-api)))
4909 `(("java-junit" ,java-junit)
4910 ("java-plexus-classworlds" ,java-plexus-classworlds)
4911 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
4912 ("java-guava" ,java-guava)))
4913 (home-page "https://codehaus-plexus.github.io/modello/")
4914 (synopsis "Framework for code generation from a simple model")
4915 (description "Modello is a framework for code generation from a simple model.
4917 Modello generates code from a simple model format: based on a plugin
4918 architecture, various types of code and descriptors can be generated from the
4919 single model, including Java POJOs, XML/JSON/YAML marshallers/unmarshallers,
4920 XSD and documentation.")
4923 ;; Although this package uses only files licensed under expat,
4924 ;; other parts of the source are licensed under different
4925 ;; licenses. We include them to be inherited by other packages.
4927 ;; Some files in modello-plugin-java are licensed under a
4928 ;; 5-clause BSD license.
4929 (license:non-copyleft
4930 (string-append "file:///modello-plugins/modello-plugin-java/"
4931 "src/main/java/org/codehaus/modello/plugin/"
4932 "java/javasource/JNaming.java"))))))
4934 (define-public java-modello-plugins-java
4936 (inherit java-modello-core)
4937 (name "java-modello-plugins-java")
4939 `(#:jar-name "modello-plugins-java.jar"
4940 #:source-dir "modello-plugins/modello-plugin-java/src/main/java"
4941 #:test-dir "modello-plugins/modello-plugin-java/src/test"
4943 #:tests? #f; requires maven-model, which depends on this package
4945 (modify-phases %standard-phases
4946 (add-before 'build 'copy-resources
4948 (mkdir-p "build/classes")
4949 (copy-recursively "modello-plugins/modello-plugin-java/src/main/resources"
4953 `(("java-modello-core" ,java-modello-core)))
4954 (synopsis "Modello Java Plugin")
4955 (description "Modello Java Plugin generates Java objects for the model.")))
4957 (define-public java-modello-plugins-xml
4959 (inherit java-modello-core)
4960 (name "java-modello-plugins-xml")
4962 `(#:jar-name "modello-plugins-xml.jar"
4963 #:source-dir "modello-plugins/modello-plugin-xml/src/main/java"
4964 #:test-dir "modello-plugins/modello-plugin-xml/src/test"
4967 (modify-phases %standard-phases
4968 (add-before 'build 'copy-resources
4970 (mkdir-p "build/classes")
4972 "modello-plugins/modello-plugin-xml/src/main/resources"
4975 (add-before 'check 'fix-paths
4977 (with-directory-excursion "modello-plugins/modello-plugin-xml/src/test"
4979 "java/org/codehaus/modello/plugins/xml/XmlModelloPluginTest.java"
4980 (("src/test") "modello-plugins/modello-plugin-xml/src/test")))
4983 `(("java-modello-core" ,java-modello-core)
4984 ("java-modello-plugins-java" ,java-modello-plugins-java)))
4985 (synopsis "Modello XML Plugin")
4986 (description "Modello XML Plugin contains shared code for every plugins
4987 working on XML representation of the model.")))
4989 (define-public java-modello-test
4991 (inherit java-modello-core)
4992 (name "java-modello-test")
4994 `(#:jar-name "modello-test.jar"
4995 #:source-dir "modello-test/src/main/java"
4996 #:tests? #f; no tests
4999 `(("java-plexus-utils" ,java-plexus-utils)
5000 ("java-plexus-compiler-api" ,java-plexus-compiler-api)
5001 ("java-plexus-compiler-javac" ,java-plexus-compiler-javac)
5002 ("java-plexus-container-default" ,java-plexus-container-default)))
5003 (synopsis "Modello test package")
5004 (description "The modello test package contains the basis to create
5005 Modello generator unit-tests, including sample models and xml files to test
5006 every feature for every plugin.")))
5008 (define-public java-modello-plugins-xpp3
5010 (inherit java-modello-core)
5011 (name "java-modello-plugins-xpp3")
5013 `(#:jar-name "modello-plugins-xpp3.jar"
5014 #:source-dir "modello-plugins/modello-plugin-xpp3/src/main/java"
5015 #:test-dir "modello-plugins/modello-plugin-xpp3/src/test"
5016 ;; One of the test dependencies is maven-model which depends on this package.
5020 (modify-phases %standard-phases
5021 (add-before 'build 'copy-resources
5023 (mkdir-p "build/classes")
5024 (copy-recursively "modello-plugins/modello-plugin-xpp3/src/main/resources"
5028 `(("java-modello-core" ,java-modello-core)
5029 ("java-modello-plugins-java" ,java-modello-plugins-java)
5030 ("java-modello-plugins-xml" ,java-modello-plugins-xml)))
5032 `(("java-xmlunit" ,java-xmlunit)
5033 ("java-modello-test" ,java-modello-test)
5034 ,@(package-native-inputs java-modello-core)))
5035 (synopsis "Modello XPP3 Plugin")
5036 (description "The modello XPP3 plugin generates XML readers and writers based
5037 on the XPP3 API (XML Pull Parser).")))
5039 (define-public java-asm
5045 (uri (string-append "https://download.forge.ow2.org/asm/"
5046 "asm-" version ".tar.gz"))
5049 "115l5pqblirdkmzi32dxx7gbcm4jy0s14y5wircr6h8jdr9aix00"))))
5050 (build-system ant-build-system)
5052 `(#:build-target "compile"
5053 ;; The tests require an old version of Janino, which no longer compiles
5058 ;; We don't need these extra ant tasks, but the build system asks us to
5059 ;; provide a path anyway.
5060 "-Dobjectweb.ant.tasks.path=dummy-path"
5061 ;; The java-aqute.bndlib JAR file will be put onto the classpath and
5062 ;; used during the build automatically by ant-build-system, but
5063 ;; java-asm's build.xml fails unless we provide something here.
5064 "-Dbiz.aQute.bnd.path=dummy-path")
5066 (modify-phases %standard-phases
5067 (add-before 'build 'remove-bnd-dependency
5069 ;; This file is the only one to require bnd, and is not needed
5070 ;; because we don't build a bundle.
5071 (delete-file "src/org/objectweb/asm/tools/ModuleInfoBndPlugin.java")
5073 (add-before 'install 'build-jars
5074 (lambda* (#:key make-flags #:allow-other-keys)
5075 ;; We cannot use the "jar" target because it depends on a couple
5076 ;; of unpackaged, complicated tools.
5079 "-cf" (string-append "dist/asm-" ,version ".jar")
5080 "-C" "output/build/tmp" ".")))
5081 (add-before 'install 'fix-pom
5083 (substitute* (find-files "archive" "\\.pom$")
5084 (("@product.artifact@") ,version))
5086 (add-before 'install 'install-parent
5087 (install-pom-file "archive/asm-parent.pom"))
5089 (install-from-pom "archive/asm.pom")))))
5091 `(("java-junit" ,java-junit)))
5093 `(("java-org-ow2-parent-pom" ,java-org-ow2-parent-pom-1.3)))
5094 (home-page "https://asm.ow2.io/")
5095 (synopsis "Very small and fast Java bytecode manipulation framework")
5096 (description "ASM is an all purpose Java bytecode manipulation and
5097 analysis framework. It can be used to modify existing classes or dynamically
5098 generate classes, directly in binary form. The provided common
5099 transformations and analysis algorithms allow easily assembling custom
5100 complex transformations and code analysis tools.")
5101 (license license:bsd-3)))
5103 (define java-org-ow2-parent-pom-1.3
5105 (name "java-org-ow2-parent-pom")
5109 (uri "https://repo1.maven.org/maven2/org/ow2/ow2/1.3/ow2-1.3.pom")
5112 "1yr8hfx8gffpppa4ii6cvrsq029a6x8hzy7nsavxhs60s9kmq8ai"))))
5113 (build-system ant-build-system)
5117 (modify-phases %standard-phases
5122 (install-pom-file (assoc-ref %build-inputs "source"))))))
5123 (home-page "https://ow2.org")
5124 (synopsis "Ow2.org parent pom")
5125 (description "This package contains the parent pom for projects from ow2.org,
5126 including java-asm.")
5127 (license license:lgpl2.1+)))
5129 (define java-asm-bootstrap
5132 (name "java-asm-bootstrap")
5134 (substitute-keyword-arguments (package-arguments java-asm)
5136 (native-inputs `())))
5138 (define-public java-asm-8
5145 (url "https://gitlab.ow2.org/asm/asm")
5146 (commit (string-append
5147 "ASM_" (string-join (string-split version #\.)
5149 (file-name (git-file-name "java-asm" version))
5152 "1s6j27zc1i76gh891w2g48b1c3abp9w8zp5j54yb1vm5h8djkd69"))))
5154 `(#:jar-name "asm8.jar"
5155 #:source-dir "asm/src/main/java"
5156 #:test-dir "asm/src/test"
5157 ;; tests depend on junit5
5159 (propagated-inputs '())
5160 (native-inputs '())))
5162 (define-public java-asm-tree-8
5164 (inherit java-asm-8)
5165 (name "java-asm-tree")
5167 `(#:jar-name "asm-tree.jar"
5168 #:source-dir "asm-tree/src/main/java"
5169 #:test-dir "asm-tree/src/test"
5170 ;; tests depend on junit5
5173 `(("java-asm" ,java-asm-8)))))
5175 (define-public java-asm-analysis-8
5177 (inherit java-asm-8)
5178 (name "java-asm-analysis")
5180 `(#:jar-name "asm-analysis.jar"
5181 #:source-dir "asm-analysis/src/main/java"
5182 #:test-dir "asm-analysis/src/test"
5183 ;; tests depend on junit5
5186 `(("java-asm" ,java-asm-8)
5187 ("java-asm-tree" ,java-asm-tree-8)))))
5189 (define-public java-asm-util-8
5191 (inherit java-asm-8)
5192 (name "java-asm-util")
5194 `(#:jar-name "asm-util8.jar"
5195 #:source-dir "asm-util/src/main/java"
5196 #:test-dir "asm-util/src/test"
5197 ;; tests depend on junit5
5200 `(("java-asm" ,java-asm-8)
5201 ("java-asm-analysis" ,java-asm-analysis-8)
5202 ("java-asm-tree" ,java-asm-tree-8)))))
5204 (define-public java-cglib
5212 (url "https://github.com/cglib/cglib")
5213 (commit (string-append
5215 (string-map (lambda (c) (if (char=? c #\.) #\_ c))
5217 (file-name (git-file-name name version))
5219 (base32 "186451jms2zfp47yd8kxd77az2cqal1my2br7klgyp8fpl4qfg8v"))))
5220 (build-system ant-build-system)
5222 `(;; FIXME: tests fail because junit runs
5223 ;; "net.sf.cglib.transform.AbstractTransformTest", which does not seem
5224 ;; to describe a test at all.
5226 #:jar-name "cglib.jar"
5228 (modify-phases %standard-phases
5229 (add-after 'unpack 'chdir
5230 (lambda _ (chdir "cglib") #t)))))
5232 `(("java-asm" ,java-asm)
5233 ("java-junit" ,java-junit)))
5234 (home-page "https://github.com/cglib/cglib/")
5235 (synopsis "Java byte code generation library")
5236 (description "The byte code generation library CGLIB is a high level API
5237 to generate and transform Java byte code.")
5238 (license license:asl2.0)))
5240 (define-public java-objenesis
5242 (name "java-objenesis")
5247 (url "https://github.com/easymock/objenesis")
5249 (file-name (git-file-name name version))
5252 "054yi200wj00x6dp1sxfrwgndwywadsbn8d8ij1j0v45j9g2vdya"))))
5253 (build-system ant-build-system)
5255 `(#:jar-name "objenesis.jar"
5256 #:source-dir "main/src/"
5257 #:test-dir "main/src/test/"))
5259 `(("java-junit" ,java-junit)
5260 ("java-hamcrest-core" ,java-hamcrest-core)))
5261 (home-page "http://objenesis.org/")
5262 (synopsis "Bypass the constructor when creating an object")
5263 (description "Objenesis is a small Java library that serves one purpose:
5264 to instantiate a new object of a particular class. It is common to see
5265 restrictions in libraries stating that classes must require a default
5266 constructor. Objenesis aims to overcome these restrictions by bypassing the
5267 constructor on object instantiation.")
5268 (license license:asl2.0)))
5270 (define-public java-easymock
5272 (name "java-easymock")
5277 (url "https://github.com/easymock/easymock/")
5278 (commit (string-append "easymock-" version))))
5279 (file-name (git-file-name name version))
5282 "02vybm8hc0i0n9sp2f2iiqn54zwqhq835f76wc6b2m7819z5a8dq"))))
5283 (build-system ant-build-system)
5285 `(#:jar-name "easymock.jar"
5286 #:source-dir "core/src/main"
5287 #:test-dir "core/src/test"
5289 (modify-phases %standard-phases
5290 ;; FIXME: Android support requires the following packages to be
5291 ;; available: com.google.dexmaker.stock.ProxyBuilder
5292 (add-after 'unpack 'delete-android-support
5294 (with-directory-excursion "core/src/main/java/org/easymock/internal"
5295 (substitute* "MocksControl.java"
5296 (("AndroidSupport.isAndroid\\(\\)") "false")
5297 (("return classProxyFactory = new AndroidClassProxyFactory\\(\\);") ""))
5298 (delete-file "AndroidClassProxyFactory.java"))
5300 (add-after 'unpack 'delete-broken-tests
5302 (with-directory-excursion "core/src/test/java/org/easymock"
5303 ;; This test depends on dexmaker.
5304 (delete-file "tests2/ClassExtensionHelperTest.java")
5306 ;; This is not a test.
5307 (delete-file "tests/BaseEasyMockRunnerTest.java")
5309 ;; This test should be executed with a different runner...
5310 (delete-file "tests2/EasyMockAnnotationsTest.java")
5311 ;; ...but deleting it means that we also have to delete these
5313 (delete-file "tests2/EasyMockRunnerTest.java")
5314 (delete-file "tests2/EasyMockRuleTest.java")
5316 ;; This test fails because the file "easymock.properties" does
5318 (delete-file "tests2/EasyMockPropertiesTest.java"))
5321 `(("java-asm" ,java-asm)
5322 ("java-cglib" ,java-cglib)
5323 ("java-objenesis" ,java-objenesis)))
5325 `(("java-junit" ,java-junit)
5326 ("java-hamcrest-core" ,java-hamcrest-core)))
5327 (home-page "https://easymock.org/")
5328 (synopsis "Java library providing mock objects for unit tests")
5329 (description "EasyMock is a Java library that provides an easy way to use
5330 mock objects in unit testing.")
5331 (license license:asl2.0)))
5333 (define-public java-jmock-1
5340 (url "https://github.com/jmock-developers/jmock-library")
5342 (file-name (git-file-name name version))
5345 "0lkga995xd9b9mmzxmcd301hlw83p1h78nibh7djlx7wydscr85z"))))
5346 (build-system ant-build-system)
5348 `(#:build-target "jars"
5349 #:test-target "run.tests"
5351 (modify-phases %standard-phases
5352 (replace 'install (install-jars "build")))))
5353 (home-page "http://jmock.org/")
5354 (synopsis "Mock object library for test-driven development")
5355 (description "JMock is a library that supports test-driven development of
5356 Java code with mock objects. Mock objects help you design and test the
5357 interactions between the objects in your programs.
5362 @item makes it quick and easy to define mock objects
5363 @item lets you precisely specify the interactions between
5364 your objects, reducing the brittleness of your tests
5365 @item plugs into your favourite test framework
5366 @item is easy to extend.
5368 (license license:bsd-3)))
5370 (define-public java-jmock
5372 (inherit java-jmock-1)
5378 (url "https://github.com/jmock-developers/jmock-library")
5380 (file-name (git-file-name name version))
5383 "12b7l22g3nrjvf2dzcw3z03fpd2chrgp0d8xkvn8w55rwb57pax6"))))
5385 `(("java-hamcrest-all" ,java-hamcrest-all)
5386 ("java-asm" ,java-asm)
5387 ("java-bsh" ,java-bsh)
5388 ("java-junit" ,java-junit)))
5390 `(("cglib" ,java-cglib)))
5392 `(#:jar-name "java-jmock.jar"
5393 #:source-dir "jmock/src/main/java"
5394 #:test-dir "jmock/src/test"))))
5396 (define-public java-jmock-junit4
5398 (inherit java-jmock)
5399 (name "java-jmock-junit4")
5401 `(#:jar-name "java-jmock-junit4.jar"
5402 #:source-dir "jmock-junit4/src/main/java"
5403 #:test-dir "jmock-junit4/src/test"))
5405 `(("java-hamcrest-all" ,java-hamcrest-all)
5406 ("java-asm" ,java-asm)
5407 ("java-bsh" ,java-bsh)
5408 ("java-jmock" ,java-jmock)
5409 ("java-jumit" ,java-junit)))))
5411 (define-public java-jmock-legacy
5413 (inherit java-jmock)
5414 (name "java-jmock-legacy")
5416 `(#:jar-name "java-jmock-legacy.jar"
5417 #:source-dir "jmock-legacy/src/main/java"
5418 #:test-dir "jmock-legacy/src/test"
5420 (modify-phases %standard-phases
5421 (add-before 'check 'copy-tests
5423 ;; This file is a dependancy of some tests
5424 (let ((file "org/jmock/test/acceptance/PackageProtectedType.java"))
5425 (copy-file (string-append "jmock/src/test/java/" file)
5426 (string-append "jmock-legacy/src/test/java/" file))
5429 `(("java-hamcrest-all" ,java-hamcrest-all)
5430 ("java-objenesis" ,java-objenesis)
5431 ("java-cglib" ,java-cglib)
5432 ("java-jmock" ,java-jmock)
5433 ("java-asm" ,java-asm)
5434 ("java-bsh" ,java-bsh)
5435 ("java-junit" ,java-junit)))
5437 `(("java-jmock-junit4" ,java-jmock-junit4)))))
5439 (define-public java-hamcrest-all
5440 (package (inherit java-hamcrest-core)
5441 (name "java-hamcrest-all")
5444 ,@(substitute-keyword-arguments (package-arguments java-hamcrest-core)
5445 ((#:build-target _) "bigjar")
5447 `(modify-phases ,phases
5448 ;; Some build targets override the classpath, so we need to patch
5449 ;; the build.xml to ensure that required dependencies are on the
5451 (add-after 'unpack 'patch-classpath-for-integration
5452 (lambda* (#:key inputs #:allow-other-keys)
5453 (substitute* "build.xml"
5454 ((" build/hamcrest-library-\\$\\{version\\}.jar" line)
5458 (find-files (assoc-ref inputs "java-junit") "\\.jar$")
5459 (find-files (assoc-ref inputs "java-jmock") "\\.jar$")
5460 (find-files (assoc-ref inputs "java-easymock") "\\.jar$")))
5462 (("build/hamcrest-core-\\$\\{version\\}\\.jar")
5463 (car (find-files (assoc-ref inputs "java-hamcrest-core")
5467 (lambda* (#:key outputs #:allow-other-keys)
5468 (let* ((target (string-append (assoc-ref outputs "out")
5472 "-" (package-version java-hamcrest-core) ".jar"))
5473 (install-without-version-suffix
5476 (string-append target
5477 (basename jar version-suffix)
5481 install-without-version-suffix
5484 (and (string-suffix? ".jar" name)
5485 (not (string-suffix? "-sources.jar" name)))))))
5488 `(("java-junit" ,java-junit)
5489 ("java-jmock" ,java-jmock-1)
5490 ;; This is necessary because of what seems to be a race condition.
5491 ;; This package would sometimes fail to build because hamcrest-core.jar
5492 ;; could not be found, even though it is built as part of this package.
5493 ;; Adding java-hamcrest-core appears to fix this problem. See
5494 ;; https://debbugs.gnu.org/31390 for more information.
5495 ("java-hamcrest-core" ,java-hamcrest-core)
5496 ("java-easymock" ,java-easymock)
5497 ,@(package-inputs java-hamcrest-core)))))
5499 (define-public java-jopt-simple
5501 (name "java-jopt-simple")
5505 (uri (string-append "http://repo1.maven.org/maven2/"
5506 "net/sf/jopt-simple/jopt-simple/"
5507 version "/jopt-simple-"
5508 version "-sources.jar"))
5511 "1v8bzmwmw6qq20gm42xyay6vrd567dra4vqwhgjnqqjz1gs9f8qa"))))
5512 (build-system ant-build-system)
5514 `(#:tests? #f ; there are no tests
5515 #:jar-name "jopt-simple.jar"))
5516 (home-page "https://pholser.github.io/jopt-simple/")
5517 (synopsis "Java library for parsing command line options")
5518 (description "JOpt Simple is a Java library for parsing command line
5519 options, such as those you might pass to an invocation of @code{javac}. In
5520 the interest of striving for simplicity, as closely as possible JOpt Simple
5521 attempts to honor the command line option syntaxes of POSIX @code{getopt} and
5522 GNU @code{getopt_long}. It also aims to make option parser configuration and
5523 retrieval of options and their arguments simple and expressive, without being
5525 (license license:expat)))
5527 (define-public java-commons-math3
5529 (name "java-commons-math3")
5533 (uri (string-append "mirror://apache/commons/math/source/"
5534 "commons-math3-" version "-src.tar.gz"))
5537 "19l6yp44qc5g7wg816nbn5z3zq3xxzwimvbm4a8pczgvpi4i85s6"))))
5538 (build-system ant-build-system)
5540 `(#:build-target "jar"
5541 #:test-target "test"
5543 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
5544 (junit (assoc-ref %build-inputs "java-junit")))
5545 (list (string-append "-Djunit.jar="
5546 (car (find-files junit "jar$")))
5547 (string-append "-Dhamcrest.jar="
5548 (car (find-files hamcrest ".*.jar$")))))
5550 (modify-phases %standard-phases
5551 ;; We want to build the jar in the build phase and run the tests
5552 ;; later in a separate phase.
5553 (add-after 'unpack 'untangle-targets
5555 (substitute* "build.xml"
5556 (("name=\"jar\" depends=\"test\"")
5557 "name=\"jar\" depends=\"compile\""))
5559 ;; There is no install target.
5561 (install-jars "target")))))
5563 `(("java-junit" ,java-junit)
5564 ("java-hamcrest-core" ,java-hamcrest-core)))
5565 (home-page "https://commons.apache.org/math/")
5566 (synopsis "Apache Commons mathematics library")
5567 (description "Commons Math is a library of lightweight, self-contained
5568 mathematics and statistics components addressing the most common problems not
5569 available in the Java programming language or Commons Lang.")
5570 (license license:asl2.0)))
5572 (define-public java-jmh
5579 (url "http://hg.openjdk.java.net/code-tools/jmh/")
5580 (changeset version)))
5581 (file-name (string-append name "-" version "-checkout"))
5584 "1fxyxhg9famwcg1prc4cgwb5wzyxqavn3cjm5vz8605xz7x5k084"))))
5585 (build-system ant-build-system)
5587 `(#:jar-name "jmh-core.jar"
5588 #:source-dir "jmh-core/src/main"
5589 #:test-dir "jmh-core/src/test"
5591 (modify-phases %standard-phases
5592 ;; This seems to be a bug in the JDK. It may not be necessary in
5593 ;; future versions of the JDK.
5594 (add-after 'unpack 'fix-bug
5596 (with-directory-excursion
5597 "jmh-core/src/main/java/org/openjdk/jmh/runner/options"
5598 (substitute* '("IntegerValueConverter.java"
5599 "ThreadsValueConverter.java")
5600 (("public Class<Integer> valueType")
5601 "public Class<? extends Integer> valueType")))
5604 `(("java-jopt-simple" ,java-jopt-simple)
5605 ("java-commons-math3" ,java-commons-math3)))
5607 `(("java-junit" ,java-junit)
5608 ("java-hamcrest-core" ,java-hamcrest-core)))
5609 (home-page "https://openjdk.java.net/projects/code-tools/jmh/")
5610 (synopsis "Benchmark harness for the JVM")
5611 (description "JMH is a Java harness for building, running, and analysing
5612 nano/micro/milli/macro benchmarks written in Java and other languages
5613 targeting the JVM.")
5615 (license license:gpl2)))
5617 (define-public java-commons-collections4
5619 (name "java-commons-collections4")
5623 (uri (string-append "mirror://apache/commons/collections/source/"
5624 "commons-collections4-" version "-src.tar.gz"))
5627 "1krfhvggympq4avk7gh6qafzf6b9ip6r1m4lmacikyx04039m0wl"))))
5628 (build-system ant-build-system)
5630 `(#:test-target "test"
5632 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
5633 (junit (assoc-ref %build-inputs "java-junit"))
5634 (easymock (assoc-ref %build-inputs "java-easymock")))
5635 (list (string-append "-Djunit.jar="
5636 (car (find-files junit "jar$")))
5637 (string-append "-Dhamcrest.jar="
5638 (car (find-files hamcrest "jar$")))
5639 (string-append "-Deasymock.jar=" easymock
5640 "/share/java/easymock.jar")))
5642 (modify-phases %standard-phases
5644 (install-jars "target")))))
5646 `(("java-junit" ,java-junit)
5647 ("java-hamcrest-core" ,java-hamcrest-core)
5648 ("java-easymock" ,java-easymock)))
5649 (home-page "https://commons.apache.org/collections/")
5650 (synopsis "Collections framework")
5651 (description "The Java Collections Framework is the recognised standard
5652 for collection handling in Java. Commons-Collections seek to build upon the
5653 JDK classes by providing new interfaces, implementations and utilities. There
5654 are many features, including:
5657 @item @code{Bag} interface for collections that have a number of copies of
5659 @item @code{BidiMap} interface for maps that can be looked up from value to
5660 key as well and key to value
5661 @item @code{MapIterator} interface to provide simple and quick iteration over
5663 @item Transforming decorators that alter each object as it is added to the
5665 @item Composite collections that make multiple collections look like one
5666 @item Ordered maps and sets that retain the order elements are added in,
5667 including an LRU based map
5668 @item Reference map that allows keys and/or values to be garbage collected
5670 @item Many comparator implementations
5671 @item Many iterator implementations
5672 @item Adapter classes from array and enumerations to collections
5673 @item Utilities to test or create typical set-theory properties of collections
5674 such as union, intersection, and closure.
5676 (license license:asl2.0)))
5678 (define-public java-commons-collections
5680 (inherit java-commons-collections4)
5681 (name "java-commons-collections")
5685 (uri (string-append "mirror://apache/commons/collections/source/"
5686 "commons-collections-" version "-src.tar.gz"))
5689 "055r51a5lfc3z7rkxnxmnn1npvkvda7636hjpm4qk7cnfzz98387"))
5691 (search-patches "java-commons-collections-fix-java8.patch"))))
5693 (substitute-keyword-arguments (package-arguments java-commons-collections4)
5695 `(modify-phases ,phases
5696 ;; The manifest is required by the build procedure
5697 (add-before 'build 'add-manifest
5699 (mkdir-p "build/conf")
5700 (call-with-output-file "build/conf/MANIFEST.MF"
5702 (format file "Manifest-Version: 1.0\n")))
5705 (install-jars "build"))))))))
5707 (define java-commons-collections-test-classes
5709 (inherit java-commons-collections)
5711 `(#:jar-name "commons-collections-test-classes.jar"
5712 #:source-dir "src/test"
5715 `(("collection" ,java-commons-collections)))))
5717 (define-public java-commons-beanutils
5719 (name "java-commons-beanutils")
5723 (uri (string-append "mirror://apache/commons/beanutils/source/"
5724 "commons-beanutils-" version "-src.tar.gz"))
5727 "03cs0bq3sl1sdc7py9g3qnf8n9h473nrkvd3d251kaqv6a2ab7qk"))))
5728 (build-system ant-build-system)
5730 `(#:test-target "test"
5733 (modify-phases %standard-phases
5735 (lambda* (#:key outputs #:allow-other-keys)
5736 (rename-file (string-append "dist/commons-beanutils-" ,version
5738 "commons-beanutils.jar")
5739 (install-file "commons-beanutils.jar"
5740 (string-append (assoc-ref outputs "out") "/share/java/"))
5743 `(("logging" ,java-commons-logging-minimal)
5744 ("collections" ,java-commons-collections)))
5746 `(("junit" ,java-junit)
5747 ("collections-test" ,java-commons-collections-test-classes)))
5748 (home-page "https://commons.apache.org/beanutils/")
5749 (synopsis "Dynamically set or get properties in Java")
5750 (description "BeanUtils provides a simplified interface to reflection and
5751 introspection to set or get dynamically determined properties through their
5752 setter and getter method.")
5753 (license license:asl2.0)))
5755 (define-public java-commons-io
5757 (name "java-commons-io")
5762 (uri (string-append "mirror://apache/commons/io/source/"
5763 "commons-io-" version "-src.tar.gz"))
5766 "0q5y41jrcjvx9hzs47x5kdhnasdy6rm4bzqd2jxl02w717m7a7v3"))))
5767 (build-system ant-build-system)
5768 (outputs '("out" "doc"))
5770 `(#:test-target "test"
5772 (list (string-append "-Djunit.jar="
5773 (car (find-files (assoc-ref %build-inputs "java-junit")
5776 (modify-phases %standard-phases
5777 (add-after 'build 'build-javadoc ant-build-javadoc)
5778 (replace 'install (install-from-pom "pom.xml"))
5779 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
5781 `(("java-junit" ,java-junit)
5782 ("java-hamcrest-core" ,java-hamcrest-core)))
5784 `(("apache-commons-parent-pom" ,apache-commons-parent-pom-39)))
5785 (home-page "https://commons.apache.org/io/")
5786 (synopsis "Common useful IO related classes")
5787 (description "Commons-IO contains utility classes, stream implementations,
5788 file filters and endian classes.")
5789 (license license:asl2.0)))
5791 (define-public java-commons-exec-1.1
5793 (name "java-commons-exec")
5798 (uri (string-append "mirror://apache/commons/exec/source/"
5799 "commons-exec-" version "-src.tar.gz"))
5802 "025dk8xgj10lxwwwqp0hng2rn7fr4vcirxzydqzx9k4dim667alk"))))
5803 (build-system ant-build-system)
5805 `(#:test-target "test"
5807 (list (string-append "-Dmaven.junit.jar="
5808 (car (find-files (assoc-ref %build-inputs "java-junit")
5811 (modify-phases %standard-phases
5812 (add-before 'build 'delete-network-tests
5814 (delete-file "src/test/java/org/apache/commons/exec/DefaultExecutorTest.java")
5815 (substitute* "src/test/java/org/apache/commons/exec/TestRunner.java"
5816 (("suite\\.addTestSuite\\(DefaultExecutorTest\\.class\\);") ""))
5818 ;; The "build" phase automatically tests.
5820 (replace 'install (install-jars "target")))))
5822 `(("java-junit" ,java-junit)))
5823 (home-page "https://commons.apache.org/proper/commons-exec/")
5824 (synopsis "Common program execution related classes")
5825 (description "Commons-Exec simplifies executing external processes.")
5826 (license license:asl2.0)))
5828 (define-public java-commons-exec
5830 (inherit java-commons-exec-1.1)
5835 (uri (string-append "mirror://apache/commons/exec/source/"
5836 "commons-exec-" version "-src.tar.gz"))
5839 "17yb4h6f8l49c5iyyvda4z2nmw0bxrx857nrwmsr7mmpb7x441yv"))))
5841 `(#:test-target "test"
5843 (list (string-append "-Dmaven.junit.jar="
5844 (car (find-files (assoc-ref %build-inputs "java-junit")
5846 "-Dmaven.compiler.source=1.7"
5847 "-Dmaven.compiler.target=1.7")
5849 (modify-phases %standard-phases
5850 (add-before 'build 'delete-network-tests
5851 (lambda* (#:key inputs #:allow-other-keys)
5852 ;; This test hangs indefinitely.
5853 (delete-file "src/test/java/org/apache/commons/exec/issues/Exec60Test.java")
5854 (substitute* "src/test/java/org/apache/commons/exec/issues/Exec41Test.java"
5855 (("ping -c 10 127.0.0.1") "sleep 10"))
5856 (substitute* "src/test/java/org/apache/commons/exec/issues/Exec49Test.java"
5858 (call-with-output-file "src/test/scripts/ping.sh"
5860 (format port "#!~a/bin/sh\nsleep $1\n"
5861 (assoc-ref inputs "bash"))))
5863 ;; The "build" phase automatically tests.
5865 (replace 'install (install-jars "target")))))
5867 `(("java-junit" ,java-junit)
5868 ("java-hamcrest-core" ,java-hamcrest-core)))))
5870 (define-public java-commons-lang
5872 (name "java-commons-lang")
5877 (uri (string-append "mirror://apache/commons/lang/source/"
5878 "commons-lang-" version "-src.tar.gz"))
5880 (base32 "1mxwagqadzx1b2al7i0z1v0r235aj2njdyijf02szq0vhmqrfiq5"))))
5881 (build-system ant-build-system)
5882 (outputs '("out" "doc"))
5884 `(#:test-target "test"
5885 #:test-exclude (list "**/Abstract*.java" "**/Random*.java")
5887 (modify-phases %standard-phases
5888 (add-after 'build 'build-javadoc ant-build-javadoc)
5889 (add-before 'check 'disable-failing-test
5891 ;; Disable a failing test
5892 (substitute* "src/test/java/org/apache/commons/lang/\
5893 time/FastDateFormatTest.java"
5894 (("public void testFormat\\(\\)")
5895 "public void disabled_testFormat()"))
5897 (replace 'install (install-jars "target"))
5898 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
5900 `(("java-junit" ,java-junit)))
5901 (home-page "https://commons.apache.org/lang/")
5902 (synopsis "Extension of the java.lang package")
5903 (description "The Commons Lang components contains a set of Java classes
5904 that provide helper methods for standard Java classes, especially those found
5905 in the @code{java.lang} package in the Sun JDK. The following classes are
5909 @item StringUtils - Helper for @code{java.lang.String}.
5910 @item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets
5911 of characters such as @code{[a-z]} and @code{[abcdez]}.
5912 @item RandomStringUtils - Helper for creating randomised strings.
5913 @item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
5914 @item NumberRange - A range of numbers with an upper and lower bound.
5915 @item ObjectUtils - Helper for @code{java.lang.Object}.
5916 @item SerializationUtils - Helper for serializing objects.
5917 @item SystemUtils - Utility class defining the Java system properties.
5918 @item NestedException package - A sub-package for the creation of nested
5920 @item Enum package - A sub-package for the creation of enumerated types.
5921 @item Builder package - A sub-package for the creation of @code{equals},
5922 @code{hashCode}, @code{compareTo} and @code{toString} methods.
5924 (license license:asl2.0)))
5926 (define-public java-commons-lang3
5928 (name "java-commons-lang3")
5933 (uri (string-append "mirror://apache/commons/lang/source/"
5934 "commons-lang3-" version "-src.tar.gz"))
5936 (base32 "0s4ffbvsyl16c90l45ximsg4dwd8hmz7wsza3p308fw43h6mwhb6"))))
5937 (build-system ant-build-system)
5939 `(#:jar-name "commons-lang3.jar"
5940 #:source-dir "src/main/java"
5941 #:tests? #f; require junit5
5943 (modify-phases %standard-phases
5944 (replace 'install (install-from-pom "pom.xml")))))
5946 `(("apache-commons-parent-pom" ,apache-commons-parent-pom-48)))
5947 (home-page "https://commons.apache.org/lang/")
5948 (synopsis "Extension of the java.lang package")
5949 (description "The Commons Lang components contains a set of Java classes
5950 that provide helper methods for standard Java classes, especially those found
5951 in the @code{java.lang} package. The following classes are included:
5954 @item StringUtils - Helper for @code{java.lang.String}.
5955 @item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets of
5956 characters such as @code{[a-z]} and @code{[abcdez]}.
5957 @item RandomStringUtils - Helper for creating randomised strings.
5958 @item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
5959 @item NumberRange - A range of numbers with an upper and lower bound.
5960 @item ObjectUtils - Helper for @code{java.lang.Object}.
5961 @item SerializationUtils - Helper for serializing objects.
5962 @item SystemUtils - Utility class defining the Java system properties.
5963 @item NestedException package - A sub-package for the creation of nested
5965 @item Enum package - A sub-package for the creation of enumerated types.
5966 @item Builder package - A sub-package for the creation of @code{equals},
5967 @code{hashCode}, @code{compareTo} and @code{toString} methods.
5969 (license license:asl2.0)))
5971 (define-public java-commons-bsf
5973 (name "java-commons-bsf")
5977 (uri (string-append "mirror://apache/commons/bsf/source/bsf-src-"
5981 "1sbamr8jl32p1jgf59nw0b2w9qivyg145954hm6ly54cfgsqrdas"))
5982 (modules '((guix build utils)))
5985 (for-each delete-file
5986 (find-files "." "\\.jar$"))
5988 (build-system ant-build-system)
5990 `(#:build-target "jar"
5991 #:tests? #f; No test file
5992 #:modules ((guix build ant-build-system)
5994 (guix build java-utils)
5997 (modify-phases %standard-phases
5998 (add-before 'build 'create-properties
6000 ;; This file is missing from the distribution
6001 (call-with-output-file "build-properties.xml"
6004 `(project (@ (basedir ".") (name "build-properties") (default ""))
6005 (property (@ (name "project.name") (value "bsf")))
6006 (property (@ (name "source.level") (value "1.5")))
6007 (property (@ (name "build.lib") (value "build/jar")))
6008 (property (@ (name "src.dir") (value "src")))
6009 (property (@ (name "tests.dir") (value "src/org/apache/bsf/test")))
6010 (property (@ (name "build.tests") (value "build/test-classes")))
6011 (property (@ (name "build.dest") (value "build/classes"))))
6014 (replace 'install (install-jars "build")))))
6016 `(("java-junit" ,java-junit)))
6018 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)))
6019 (home-page "https://commons.apache.org/proper/commons-bsf")
6020 (synopsis "Bean Scripting Framework")
6021 (description "The Bean Scripting Framework (BSF) is a set of Java classes
6022 which provides scripting language support within Java applications, and access
6023 to Java objects and methods from scripting languages. BSF allows one to write
6024 JSPs in languages other than Java while providing access to the Java class
6025 library. In addition, BSF permits any Java application to be implemented in
6026 part (or dynamically extended) by a language that is embedded within it. This
6027 is achieved by providing an API that permits calling scripting language engines
6028 from within Java, as well as an object registry that exposes Java objects to
6029 these scripting language engines.")
6030 (license license:asl2.0)))
6032 (define-public java-commons-jxpath
6034 (name "java-commons-jxpath")
6038 (uri (string-append "mirror://apache/commons/jxpath/source/"
6039 "commons-jxpath-" version "-src.tar.gz"))
6042 "1rpgg31ayn9fwr4bfi2i1ij0npcg79ad2fv0w9hacvawsyc42cfs"))))
6043 (build-system ant-build-system)
6045 `(#:jar-name "commons-jxpath.jar"
6046 ;; tests require more dependencies, including mockrunner which depends on old software
6048 #:source-dir "src/java"))
6050 `(("servlet" ,java-classpathx-servletapi)
6051 ("java-jdom" ,java-jdom)
6052 ("java-commons-beanutils" ,java-commons-beanutils)))
6054 `(("java-junit" ,java-junit)))
6055 (home-page "https://commons.apache.org/jxpath/")
6056 (synopsis "Simple interpreter of an expression language called XPath.")
6057 (description "The org.apache.commons.jxpath package defines a simple
6058 interpreter of an expression language called XPath. JXPath applies XPath
6059 expressions to graphs of objects of all kinds: JavaBeans, Maps, Servlet
6060 contexts, DOM etc, including mixtures thereof.")
6061 (license license:asl2.0)))
6063 (define-public java-commons-pool
6065 (name "java-commons-pool")
6069 (uri (string-append "mirror://apache/commons/pool/source/"
6070 "commons-pool2-" version "-src.tar.gz"))
6073 "1fi1hgqmq01bs6azbj3sfswxzadp2r8sjjfiq6ryilz1m50kvrv6"))))
6075 `(#:jar-name "common-pool.jar"
6076 #:source-dir "src/main/java"
6078 (list "**/PerformanceTest.java")))
6079 (build-system ant-build-system)
6081 `(("java-cglib" ,java-cglib)))
6083 `(("java-junit" ,java-junit)
6084 ("java-hamcrest-core" ,java-hamcrest-core)
6085 ("java-asm" ,java-asm)
6086 ("java-objenesis" ,java-objenesis)))
6087 (home-page "https://commons.apache.org/proper/commons-pool/")
6088 (synopsis "Object-pooling API in Java")
6089 (description "The commons-pool package provides an object-pooling API
6090 and a number of object pool implementations. This package defines a
6091 handful of pooling interfaces and some base classes that may be useful when
6092 creating new pool implementations.")
6093 (license license:asl2.0)))
6095 (define-public java-commons-dbcp
6097 (name "java-commons-dbcp")
6101 (uri (string-append "mirror://apache/commons/dbcp/source/"
6102 "commons-dbcp2-" version "-src.tar.gz"))
6105 "0axbvcbnf2l70fc3ybrlp3siw2w4ka9mia2pnx4py8gz54cpw3rc"))))
6107 `(#:source-dir "src/main/java"
6108 #:jar-name "java-commons-dbcp.jar"
6109 #:tests? #f)); requires apache-geronimo
6111 `(("java-commons-pool" ,java-commons-pool)
6112 ("java-commons-logging" ,java-commons-logging-minimal)
6113 ("java-jboss-transaction-api-spec" ,java-jboss-transaction-api-spec)))
6115 `(("java-junit" ,java-junit)))
6116 (build-system ant-build-system)
6117 (home-page "https://commons.apache.org/proper/commons-dbcp/")
6118 (synopsis "Database Connection Pool for Java")
6119 (description "Commons-dbcp allows you to share a pool of database
6120 connections between users. Creating a new connection for each user can be
6121 time consuming and even unfeasible when the number of simultaneous users is
6122 very large. This package provides a way to share a poole of connections to
6124 (license license:asl2.0)))
6126 (define-public java-commons-jcs
6128 (name "java-commons-jcs")
6132 (uri (string-append "mirror://apache/commons/jcs/source/"
6133 "commons-jcs-dist-" version "-src.tar.gz"))
6136 "0syhq2npjbrl0azqfjm0gvash1qd5qjy4qmysxcrqjsk0nf9fa1q"))))
6137 (build-system ant-build-system)
6139 `(#:jar-name "commons-jcs.jar"
6140 #:source-dir "commons-jcs-core/src/main/java"
6141 #:test-dir "commons-jcs-core/src/test"
6142 #:tests? #f; requires hsqldb
6144 (modify-phases %standard-phases
6145 (add-before 'build 'prepare
6147 (with-directory-excursion
6148 "commons-jcs-core/src/main/java/org/apache/commons/jcs"
6150 "auxiliary/disk/jdbc/dsfactory/SharedPoolDataSourceFactory.java"
6151 (("commons.dbcp") "commons.dbcp2")
6152 ((".*\\.setMaxActive.*") ""))
6153 ;;; Remove dependency on velocity-tools
6154 (delete-file "admin/servlet/JCSAdminServlet.java"))
6157 `(("java-classpathx-servletapi" ,java-classpathx-servletapi)
6158 ("java-commons-logging-minimal" ,java-commons-logging-minimal)
6159 ("java-commons-httpclient" ,java-commons-httpclient)
6160 ("java-commons-dbcp" ,java-commons-dbcp)))
6162 `(("java-junit" ,java-junit)))
6163 (home-page "https://commons.apache.org/proper/commons-jcs/")
6164 (synopsis "Distributed caching system in Java")
6165 (description "JCS is a distributed caching system written in Java. It
6166 is intended to speed up applications by providing a means to manage cached
6167 data of various dynamic natures. Like any caching system, JCS is most useful
6168 for high read, low put applications. Latency times drop sharply and
6169 bottlenecks move away from the database in an effectively cached system.")
6170 (license license:asl2.0)))
6172 (define-public java-jsr250
6174 (name "java-jsr250")
6178 (uri (string-append "https://repo1.maven.org/maven2/"
6179 "javax/annotation/javax.annotation-api/"
6180 version "/javax.annotation-api-"
6181 version "-sources.jar"))
6184 "08clh8n4n9wfglf75qsqfjs6yf79f7x6hqx38cn856pksszv50kz"))))
6185 (build-system ant-build-system)
6187 `(#:tests? #f ; no tests included
6189 #:jar-name "jsr250.jar"
6190 #:modules ((guix build ant-build-system)
6192 (guix build maven pom)
6193 (guix build java-utils)
6196 (modify-phases %standard-phases
6197 (add-before 'install 'create-pom
6199 (with-output-to-file "pom.xml"
6203 (modelVersion "4.0.0")
6205 (groupId "javax.annotation")
6206 (artifactId "jsr250-api")
6207 (version ,,version))))))
6210 (install-from-pom "pom.xml")))))
6211 (home-page "https://jcp.org/en/jsr/detail?id=250")
6212 (synopsis "Security-related annotations")
6213 (description "This package provides annotations for security. It provides
6214 packages in the @code{javax.annotation} and @code{javax.annotation.security}
6216 ;; either cddl or gpl2 only, with classpath exception
6217 (license (list license:cddl1.0
6220 (define-public java-jsr305
6222 (name "java-jsr305")
6226 (uri (string-append "https://repo1.maven.org/maven2/"
6227 "com/google/code/findbugs/"
6228 "jsr305/" version "/jsr305-"
6229 version "-sources.jar"))
6232 "1rh6jin9v7jqpq3kf1swl868l8i94r636n03pzpsmgr8v0lh9j2n"))))
6233 (build-system ant-build-system)
6235 `(#:tests? #f ; no tests included
6236 #:jar-name "jsr305.jar"
6237 #:modules ((guix build ant-build-system)
6238 (guix build java-utils)
6239 (guix build maven pom)
6243 (modify-phases %standard-phases
6244 (add-before 'install 'create-pom
6246 (with-output-to-file "pom.xml"
6250 (modelVersion "4.0.0")
6252 (groupId "com.google.code.findbugs")
6253 (artifactId "jsr305")
6254 (version ,,version))))))
6257 (install-from-pom "pom.xml")))))
6258 (home-page "http://findbugs.sourceforge.net/")
6259 (synopsis "Annotations for the static analyzer called findbugs")
6260 (description "This package provides annotations for the findbugs package.
6261 It provides packages in the @code{javax.annotations} namespace.")
6262 (license license:asl2.0)))
6264 (define-public java-guava
6267 ;; This is the last release of Guava that can be built with Java 7.
6272 (url "https://github.com/google/guava/")
6273 (commit (string-append "v" version))))
6274 (file-name (git-file-name name version))
6277 "00h5cawdjic1vind3yivzh1f58flvm1yfmhsyqwyvmbvj1vakysp"))))
6278 (build-system ant-build-system)
6280 `(#:tests? #f ; no tests included
6281 #:jar-name "guava.jar"
6282 #:source-dir "guava/src"
6284 (modify-phases %standard-phases
6285 (add-after 'unpack 'trim-sources
6287 (with-directory-excursion "guava/src/com/google/common"
6288 ;; Remove annotations to avoid extra dependencies:
6289 ;; * "j2objc" annotations are used when converting Java to
6291 ;; * "errorprone" annotations catch common Java mistakes at
6293 ;; * "IgnoreJRERequirement" is used for Android.
6294 (substitute* (find-files "." "\\.java$")
6295 (("import com.google.j2objc.*") "")
6296 (("import com.google.errorprone.annotation.*") "")
6297 (("import org.codehaus.mojo.animal_sniffer.*") "")
6298 (("@CanIgnoreReturnValue") "")
6301 (("@RetainedWith") "")
6303 (("@ForOverride") "")
6304 (("@J2ObjCIncompatible") "")
6305 (("@IgnoreJRERequirement") "")))
6307 (replace 'install (install-from-pom "guava/pom.xml")))))
6309 `(("java-jsr305" ,java-jsr305)))
6311 `(("java-guava-parent-pom" ,java-guava-parent-pom)))
6312 (home-page "https://github.com/google/guava")
6313 (synopsis "Google core libraries for Java")
6314 (description "Guava is a set of core libraries that includes new
6315 collection types (such as multimap and multiset), immutable collections, a
6316 graph library, functional types, an in-memory cache, and APIs/utilities for
6317 concurrency, I/O, hashing, primitives, reflection, string processing, and much
6319 (license license:asl2.0)))
6321 (define java-guava-parent-pom
6323 (inherit java-guava)
6324 (name "java-guava-parent-pom")
6328 (modify-phases %standard-phases
6332 (install-pom-file "pom.xml")))))
6334 `(("java-sonatype-oss-parent-pom" ,java-sonatype-oss-parent-pom-7)))))
6336 ;; The java-commons-logging package provides adapters to many different
6337 ;; logging frameworks. To avoid an excessive dependency graph we try to build
6338 ;; it with only a minimal set of adapters.
6339 (define-public java-commons-logging-minimal
6341 (name "java-commons-logging-minimal")
6345 (uri (string-append "mirror://apache/commons/logging/source/"
6346 "commons-logging-" version "-src.tar.gz"))
6349 "10bwcy5w8d7y39n0krlwhnp8ds3kj5zhmzj0zxnkw0qdlsjmsrj9"))))
6350 (build-system ant-build-system)
6352 `(#:tests? #f ; avoid dependency on logging frameworks
6353 #:jar-name "commons-logging-minimal.jar"
6355 (modify-phases %standard-phases
6356 (add-after 'unpack 'delete-adapters-and-tests
6358 ;; Delete all adapters except for NoOpLog, SimpleLog, and
6359 ;; LogFactoryImpl. NoOpLog is required to build; LogFactoryImpl
6360 ;; is used by applications; SimpleLog is the only actually usable
6361 ;; implementation that does not depend on another logging
6365 (delete-file (string-append
6366 "src/main/java/org/apache/commons/logging/impl/" file)))
6367 (list "Jdk13LumberjackLogger.java"
6368 "WeakHashtable.java"
6370 "ServletContextCleaner.java"
6373 "LogKitLogger.java"))
6374 (delete-file-recursively "src/test")
6376 (home-page "https://commons.apache.org/logging/")
6377 (synopsis "Common API for logging implementations")
6378 (description "The Logging package is a thin bridge between different
6379 logging implementations. A library that uses the commons-logging API can be
6380 used with any logging implementation at runtime.")
6381 (license license:asl2.0)))
6383 ;; This is the last release of the 1.x series.
6384 (define-public java-mockito-1
6386 (name "java-mockito")
6390 (uri (string-append "http://repo1.maven.org/maven2/"
6391 "org/mockito/mockito-core/" version
6392 "/mockito-core-" version "-sources.jar"))
6395 "0vmiwnwpf83g2q7kj1rislmja8fpvqkixjhawh7nxnygx6pq11kc"))))
6396 (build-system ant-build-system)
6398 `(#:jar-name "mockito.jar"
6399 #:tests? #f ; no tests included
6400 ;; FIXME: patch-and-repack does not support jars, so we have to apply
6401 ;; patches in build phases.
6403 (modify-phases %standard-phases
6404 ;; Mockito was developed against a different version of hamcrest,
6405 ;; which does not require matcher implementations to provide an
6406 ;; implementation of the "describeMismatch" method. We add this
6407 ;; simple definition to pass the build with our version of hamcrest.
6408 (add-after 'unpack 'fix-hamcrest-build-error
6410 (substitute* "src/org/mockito/internal/matchers/LocalizedMatcher.java"
6411 (("public Matcher getActualMatcher\\(\\) .*" line)
6413 public void describeMismatch(Object item, Description description) {
6414 actualMatcher.describeMismatch(item, description);
6418 ;; Mockito bundles cglib. We have a cglib package, so let's use
6420 (add-after 'unpack 'use-system-libraries
6422 (with-directory-excursion "src/org/mockito/internal/creation/cglib"
6423 (substitute* '("CGLIBHacker.java"
6424 "CglibMockMaker.java"
6425 "ClassImposterizer.java"
6426 "DelegatingMockitoMethodProxy.java"
6427 "MethodInterceptorFilter.java"
6428 "MockitoNamingPolicy.java"
6429 "SerializableMockitoMethodProxy.java"
6430 "SerializableNoOp.java")
6431 (("import org.mockito.cglib") "import net.sf.cglib")))
6434 `(("java-junit" ,java-junit)
6435 ("java-objenesis" ,java-objenesis)
6436 ("java-cglib" ,java-cglib)
6437 ("java-hamcrest-core" ,java-hamcrest-core)))
6438 (home-page "http://mockito.org")
6439 (synopsis "Mockito is a mock library for Java")
6440 (description "Mockito is a mocking library for Java which lets you write
6441 tests with a clean and simple API. It generates mocks using reflection, and
6442 it records all mock invocations, including methods arguments.")
6443 (license license:asl2.0)))
6445 (define-public java-httpcomponents-httpcore
6447 (name "java-httpcomponents-httpcore")
6451 (uri (string-append "mirror://apache//httpcomponents/httpcore/"
6452 "source/httpcomponents-core-"
6453 version "-src.tar.gz"))
6456 "02bwcf38y4vgwq7kj2s6q7qrmma641r5lacivm16kgxvb2j6h1vy"))))
6457 (build-system ant-build-system)
6459 `(#:jar-name "httpcomponents-httpcore.jar"
6461 (modify-phases %standard-phases
6462 (add-after 'unpack 'chdir
6463 (lambda _ (chdir "httpcore") #t)))))
6465 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)
6466 ("java-commons-lang3" ,java-commons-lang3)))
6468 `(("java-junit" ,java-junit)
6469 ("java-mockito" ,java-mockito-1)))
6470 (home-page "https://hc.apache.org/httpcomponents-core-4.4.x/index.html")
6471 (synopsis "Low level HTTP transport components")
6472 (description "HttpCore is a set of low level HTTP transport components
6473 that can be used to build custom client and server side HTTP services with a
6474 minimal footprint. HttpCore supports two I/O models: blocking I/O model based
6475 on the classic Java I/O and non-blocking, event driven I/O model based on Java
6478 This package provides the blocking I/O model library.")
6479 (license license:asl2.0)))
6481 (define-public java-httpcomponents-httpcore-nio
6482 (package (inherit java-httpcomponents-httpcore)
6483 (name "java-httpcomponents-httpcore-nio")
6485 `(#:jar-name "httpcomponents-httpcore-nio.jar"
6487 (modify-phases %standard-phases
6488 (add-after 'unpack 'chdir
6489 (lambda _ (chdir "httpcore-nio") #t)))))
6491 `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
6492 ("java-hamcrest-core" ,java-hamcrest-core)
6493 ,@(package-inputs java-httpcomponents-httpcore)))
6494 (description "HttpCore is a set of low level HTTP transport components
6495 that can be used to build custom client and server side HTTP services with a
6496 minimal footprint. HttpCore supports two I/O models: blocking I/O model based
6497 on the classic Java I/O and non-blocking, event driven I/O model based on Java
6500 This package provides the non-blocking I/O model library based on Java
6503 (define-public java-httpcomponents-httpcore-ab
6504 (package (inherit java-httpcomponents-httpcore)
6505 (name "java-httpcomponents-httpcore-ab")
6507 `(#:jar-name "httpcomponents-httpcore-ab.jar"
6509 (modify-phases %standard-phases
6510 (add-after 'unpack 'chdir
6511 (lambda _ (chdir "httpcore-ab") #t)))))
6513 `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
6514 ("java-commons-cli" ,java-commons-cli)
6515 ("java-hamcrest-core" ,java-hamcrest-core)
6516 ,@(package-inputs java-httpcomponents-httpcore)))
6517 (synopsis "Apache HttpCore benchmarking tool")
6518 (description "This package provides the HttpCore benchmarking tool. It is
6519 an Apache AB clone based on HttpCore.")))
6521 (define-public java-httpcomponents-httpclient
6523 (name "java-httpcomponents-httpclient")
6527 (uri (string-append "mirror://apache/httpcomponents/httpclient/"
6528 "source/httpcomponents-client-"
6529 version "-src.tar.gz"))
6532 "1va99m2zc2liv0v9vn72p5ja8yz4s5wq7zpahaai5nr966kvxzkb"))))
6533 (build-system ant-build-system)
6535 `(#:jar-name "httpcomponents-httpclient.jar"
6537 (modify-phases %standard-phases
6538 (add-after 'unpack 'chdir
6539 (lambda _ (chdir "httpclient") #t)))))
6541 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)
6542 ("java-commons-codec" ,java-commons-codec)
6543 ("java-hamcrest-core" ,java-hamcrest-core)
6544 ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
6545 ("java-mockito" ,java-mockito-1)
6546 ("java-junit" ,java-junit)))
6547 (home-page "https://hc.apache.org/httpcomponents-client-ga/")
6548 (synopsis "HTTP client library for Java")
6549 (description "Although the @code{java.net} package provides basic
6550 functionality for accessing resources via HTTP, it doesn't provide the full
6551 flexibility or functionality needed by many applications. @code{HttpClient}
6552 seeks to fill this void by providing an efficient, up-to-date, and
6553 feature-rich package implementing the client side of the most recent HTTP
6554 standards and recommendations.")
6555 (license license:asl2.0)))
6557 (define-public java-httpcomponents-httpmime
6558 (package (inherit java-httpcomponents-httpclient)
6559 (name "java-httpcomponents-httpmime")
6561 `(#:jar-name "httpcomponents-httpmime.jar"
6563 (modify-phases %standard-phases
6564 (add-after 'unpack 'chdir
6565 (lambda _ (chdir "httpmime") #t)))))
6567 `(("java-httpcomponents-httpclient" ,java-httpcomponents-httpclient)
6568 ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
6569 ("java-junit" ,java-junit)
6570 ("java-hamcrest-core" ,java-hamcrest-core)))))
6572 (define-public java-commons-net
6574 (name "java-commons-net")
6578 (uri (string-append "mirror://apache/commons/net/source/"
6579 "commons-net-" version "-src.tar.gz"))
6582 "0n0cmnddk9qdqhjvka8pc6hd9mn2qi3166f1s6xk32h7rfy1adxr"))))
6583 (build-system ant-build-system)
6585 `(;; FIXME: MainTest.java tries to read "examples.properties" (which
6586 ;; should be "resources/examples/examples.properties"), but gets "null"
6589 #:jar-name "commons-net.jar"))
6591 `(("java-junit" ,java-junit)
6592 ("java-hamcrest-core" ,java-hamcrest-core)))
6593 (home-page "https://commons.apache.org/net/")
6594 (synopsis "Client library for many basic Internet protocols")
6595 (description "The Apache Commons Net library implements the client side of
6596 many basic Internet protocols. The purpose of the library is to provide
6597 fundamental protocol access, not higher-level abstractions.")
6598 (license license:asl2.0)))
6600 (define-public java-jsch
6606 (uri (string-append "mirror://sourceforge/jsch/jsch/"
6607 version "/jsch-" version ".zip"))
6610 "1lxyjwvmwa723wcf3bqn816hkvc03vz4xhbsi7bvfhrz2rpgcfq6"))))
6611 (build-system ant-build-system)
6613 `(#:build-target "dist"
6614 #:tests? #f ; no tests included
6616 (modify-phases %standard-phases
6617 (replace 'install (install-jars "dist")))))
6619 `(("unzip" ,unzip)))
6620 (home-page "http://www.jcraft.com/jsch/")
6621 (synopsis "Pure Java implementation of SSH2")
6622 (description "JSch is a pure Java implementation of SSH2. JSch allows you
6623 to connect to an SSH server and use port forwarding, X11 forwarding, file
6624 transfer, etc., and you can integrate its functionality into your own Java
6626 (license license:bsd-3)))
6628 (define-public java-commons-compress
6630 (name "java-commons-compress")
6634 (uri (string-append "mirror://apache/commons/compress/source/"
6635 "commons-compress-" version "-src.tar.gz"))
6638 "1vjqvavrn0babffn1kciz6v52ibwq2vwhzlb95hazis3lgllnxc8"))))
6639 (build-system ant-build-system)
6641 `(#:jar-name "commons-compress.jar"
6643 (modify-phases %standard-phases
6644 (add-after 'unpack 'delete-bad-tests
6646 (with-directory-excursion "src/test/java/org/apache/commons/compress/"
6647 ;; FIXME: These tests really should not fail. Maybe they are
6648 ;; indicative of problems with our Java packaging work.
6650 ;; This test fails with a null pointer exception.
6651 (delete-file "archivers/sevenz/SevenZOutputFileTest.java")
6652 ;; This test fails to open test resources.
6653 (delete-file "archivers/zip/ExplodeSupportTest.java")
6655 ;; FIXME: This test adds a dependency on powermock, which is hard to
6656 ;; package at this point.
6657 ;; https://github.com/powermock/powermock
6658 (delete-file "archivers/sevenz/SevenZNativeHeapTest.java"))
6660 (replace 'install (install-from-pom "pom.xml")))))
6662 `(("java-xz" ,java-xz)
6663 ("apache-commons-parent-pom" ,apache-commons-parent-pom-41)))
6665 `(("java-junit" ,java-junit)
6666 ("java-mockito" ,java-mockito-1)))
6667 (home-page "https://commons.apache.org/proper/commons-compress/")
6668 (synopsis "Java library for working with compressed files")
6669 (description "The Apache Commons Compress library defines an API for
6670 working with compressed files such as ar, cpio, Unix dump, tar, zip, gzip, XZ,
6671 Pack200, bzip2, 7z, arj, lzma, snappy, DEFLATE, lz4 and Z files.")
6672 (license license:asl2.0)))
6674 (define-public java-commons-csv
6676 (name "java-commons-csv")
6680 (uri (string-append "mirror://apache/commons/csv/source/"
6681 "commons-csv-" version "-src.tar.gz"))
6684 "1l89m0fm2s3xx3v3iynvangymfg2vlyngaj6fgsi457nmsw7m7ij"))))
6685 (build-system ant-build-system)
6687 `(#:jar-name "commons-csv.jar"
6688 #:source-dir "src/main/java"
6689 #:tests? #f)); FIXME: requires java-h2
6691 `(("java-hamcrest-core" ,java-hamcrest-core)
6692 ("java-commons-io" ,java-commons-io)
6693 ("java-commons-lang3" ,java-commons-lang3)
6694 ("junit" ,java-junit)))
6695 (home-page "https://commons.apache.org/proper/commons-csv/")
6696 (synopsis "Read and write CSV documents")
6697 (description "Commons CSV reads and writes files in variations of the Comma
6698 Separated Value (CSV) format. The most common CSV formats are predefined in the
6702 @item Microsoft Excel
6703 @item Informix UNLOAD
6704 @item Informix UNLOAD CSV
6710 Custom formats can be created using a fluent style API.")
6711 (license license:asl2.0)))
6713 (define-public java-osgi-annotation
6715 (name "java-osgi-annotation")
6719 (uri (string-append "https://repo1.maven.org/maven2/"
6720 "org/osgi/org.osgi.annotation/" version "/"
6721 "org.osgi.annotation-" version "-sources.jar"))
6724 "1q718mb7gqg726rh6pc2hcisn8v50nv35abbir0jypmffhiii85w"))))
6725 (build-system ant-build-system)
6727 `(#:tests? #f ; no tests
6728 #:jar-name "osgi-annotation.jar"))
6729 (home-page "https://www.osgi.org")
6730 (synopsis "Annotation module of OSGi framework")
6732 "OSGi, for Open Services Gateway initiative framework, is a module system
6733 and service platform for the Java programming language. This package contains
6734 the OSGi annotation module, providing additional services to help dynamic
6736 (license license:asl2.0)))
6738 (define-public java-osgi-core
6740 (name "java-osgi-core")
6744 (uri (string-append "https://repo1.maven.org/maven2/"
6745 "org/osgi/org.osgi.core/" version "/"
6746 "org.osgi.core-" version "-sources.jar"))
6749 "19bpf5jx32jq9789gyhin35q5v7flmw0p9mk7wbgqpxqfmxyiabv"))))
6750 (build-system ant-build-system)
6752 `(#:tests? #f ; no tests
6753 #:jar-name "osgi-core.jar"))
6755 `(("java-osgi-annotation" ,java-osgi-annotation)))
6756 (home-page "https://www.osgi.org")
6757 (synopsis "Core module of OSGi framework")
6759 "OSGi, for Open Services Gateway initiative framework, is a module system
6760 and service platform for the Java programming language. This package contains
6761 the OSGi Core module.")
6762 (license license:asl2.0)))
6764 (define-public java-osgi-service-event
6766 (name "java-osgi-service-event")
6770 (uri (string-append "https://repo1.maven.org/maven2/"
6771 "org/osgi/org.osgi.service.event/"
6772 version "/org.osgi.service.event-"
6773 version "-sources.jar"))
6776 "1nyhlgagwym75bycnjczwbnpymv2iw84zbhvvzk84g9q736i6qxm"))))
6777 (build-system ant-build-system)
6779 `(#:tests? #f ; no tests
6780 #:jar-name "osgi-service-event.jar"))
6782 `(("java-osgi-annotation" ,java-osgi-annotation)
6783 ("java-osgi-core" ,java-osgi-core)))
6784 (home-page "https://www.osgi.org")
6785 (synopsis "OSGi service event module")
6787 "OSGi, for Open Services Gateway initiative framework, is a module system
6788 and service platform for the Java programming language. This package contains
6789 the OSGi @code{org.osgi.service.event} module.")
6790 (license license:asl2.0)))
6792 (define-public java-eclipse-osgi
6794 (name "java-eclipse-osgi")
6798 (uri (string-append "https://repo1.maven.org/maven2/"
6799 "org/eclipse/platform/org.eclipse.osgi/"
6800 version "/org.eclipse.osgi-"
6801 version "-sources.jar"))
6804 "00cqc6lb29n0zv68b4l842vzkwawvbr7gshfdygsk8sicvcq2c7b"))))
6805 (build-system ant-build-system)
6807 `(#:tests? #f ; no tests included
6808 #:jar-name "eclipse-equinox-osgi.jar"))
6810 `(("java-osgi-annotation" ,java-osgi-annotation)))
6811 (home-page "http://www.eclipse.org/equinox/")
6812 (synopsis "Eclipse Equinox OSGi framework")
6813 (description "This package provides an implementation of the OSGi Core
6815 (license license:epl1.0)))
6817 (define-public java-eclipse-equinox-common
6819 (name "java-eclipse-equinox-common")
6820 (version "3.10.200")
6823 (uri (string-append "https://repo1.maven.org/maven2/"
6824 "org/eclipse/platform/org.eclipse.equinox.common/"
6825 version "/org.eclipse.equinox.common-"
6826 version "-sources.jar"))
6829 "1yn8ij6xsljlf35sr2l7wvyvc0ss4n1rv0ry5zkgb49dj4hyrqrj"))))
6830 (build-system ant-build-system)
6832 `(#:tests? #f ; no tests included
6833 #:jar-name "eclipse-equinox-common.jar"))
6835 `(("java-eclipse-osgi" ,java-eclipse-osgi)))
6836 (home-page "http://www.eclipse.org/equinox/")
6837 (synopsis "Common Eclipse runtime")
6838 (description "This package provides the common Eclipse runtime.")
6839 (license license:epl1.0)))
6841 (define-public java-eclipse-core-jobs
6843 (name "java-eclipse-core-jobs")
6847 (uri (string-append "https://repo1.maven.org/maven2/"
6848 "org/eclipse/platform/org.eclipse.core.jobs/"
6849 version "/org.eclipse.core.jobs-"
6850 version "-sources.jar"))
6853 "0395b8lh0km8vhzjnchvs1rii1qz48hyvb2wqfaq4yhklbwihq4b"))))
6854 (build-system ant-build-system)
6856 `(#:tests? #f ; no tests included
6857 #:jar-name "eclipse-core-jobs.jar"))
6859 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6860 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6861 (home-page "http://www.eclipse.org/equinox/")
6862 (synopsis "Eclipse jobs mechanism")
6863 (description "This package provides the Eclipse jobs mechanism.")
6864 (license license:epl1.0)))
6866 (define-public java-eclipse-equinox-registry
6868 (name "java-eclipse-equinox-registry")
6872 (uri (string-append "https://repo1.maven.org/maven2/"
6873 "org/eclipse/platform/org.eclipse.equinox.registry/"
6874 version "/org.eclipse.equinox.registry-"
6875 version "-sources.jar"))
6878 "1i9sgymh2fy5vdgk5y7s3qvrlbgh4l93ddqi3v4zmca7hwrlhf9k"))))
6879 (build-system ant-build-system)
6881 `(#:tests? #f ; no tests included
6882 #:jar-name "eclipse-equinox-registry.jar"))
6884 `(("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
6885 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6886 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6887 (home-page "http://www.eclipse.org/equinox/")
6888 (synopsis "Eclipse extension registry support")
6889 (description "This package provides support for the Eclipse extension
6891 (license license:epl1.0)))
6893 (define-public java-eclipse-equinox-app
6895 (name "java-eclipse-equinox-app")
6899 (uri (string-append "https://repo1.maven.org/maven2/"
6900 "org/eclipse/platform/org.eclipse.equinox.app/"
6901 version "/org.eclipse.equinox.app-"
6902 version "-sources.jar"))
6905 "0nhvbp93y203ar7y59gb0mz3w2d3jlqhr0c9hii9bcfpmr7imdab"))))
6906 (build-system ant-build-system)
6908 `(#:tests? #f ; no tests included
6909 #:jar-name "eclipse-equinox-app.jar"))
6911 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6912 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6913 ("java-eclipse-osgi" ,java-eclipse-osgi)
6914 ("java-osgi-service-event" ,java-osgi-service-event)))
6915 (home-page "http://www.eclipse.org/equinox/")
6916 (synopsis "Equinox application container")
6917 (description "This package provides the Equinox application container for
6919 (license license:epl1.0)))
6921 (define-public java-eclipse-equinox-preferences
6923 (name "java-eclipse-equinox-preferences")
6927 (uri (string-append "https://repo1.maven.org/maven2/"
6928 "org/eclipse/platform/org.eclipse.equinox.preferences/"
6929 version "/org.eclipse.equinox.preferences-"
6930 version "-sources.jar"))
6933 "0k7w6c141sqym4fy3af0qkwpy4pdh2vsjpjba6rp5fxyqa24v0a2"))))
6934 (build-system ant-build-system)
6936 `(#:tests? #f ; no tests included
6937 #:jar-name "eclipse-equinox-preferences.jar"))
6939 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6940 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6941 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6942 (home-page "http://www.eclipse.org/equinox/")
6943 (synopsis "Eclipse preferences mechanism")
6944 (description "This package provides the Eclipse preferences mechanism with
6945 the module @code{org.eclipse.equinox.preferences}.")
6946 (license license:epl1.0)))
6948 (define-public java-eclipse-core-contenttype
6950 (name "java-eclipse-core-contenttype")
6954 (uri (string-append "https://repo1.maven.org/maven2/"
6955 "org/eclipse/platform/org.eclipse.core.contenttype/"
6956 version "/org.eclipse.core.contenttype-"
6957 version "-sources.jar"))
6960 "1wcqcv7ijwv5rh748vz3x9pkmjl9w1r0k0026k56n8yjl4rrmspi"))))
6961 (build-system ant-build-system)
6963 `(#:tests? #f ; no tests included
6964 #:jar-name "eclipse-core-contenttype.jar"))
6966 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6967 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6968 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6969 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6970 (home-page "http://www.eclipse.org/")
6971 (synopsis "Eclipse content mechanism")
6972 (description "This package provides the Eclipse content mechanism in the
6973 @code{org.eclipse.core.contenttype} module.")
6974 (license license:epl1.0)))
6976 (define-public java-eclipse-core-runtime
6978 (name "java-eclipse-core-runtime")
6979 (version "3.15.100")
6982 (uri (string-append "https://repo1.maven.org/maven2/"
6983 "org/eclipse/platform/org.eclipse.core.runtime/"
6984 version "/org.eclipse.core.runtime-"
6985 version "-sources.jar"))
6988 "0l8xayacsbjvz5hypx2fv47vpw2n4dspamcfb3hx30x9hj8vmg7r"))))
6989 (build-system ant-build-system)
6991 `(#:tests? #f ; no tests included
6992 #:jar-name "eclipse-core-runtime.jar"))
6994 `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
6995 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
6996 ("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
6997 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6998 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6999 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
7000 ("java-eclipse-osgi" ,java-eclipse-osgi)))
7001 (home-page "https://www.eclipse.org/")
7002 (synopsis "Eclipse core runtime")
7003 (description "This package provides the Eclipse core runtime with the
7004 module @code{org.eclipse.core.runtime}.")
7005 (license license:epl1.0)))
7007 (define-public java-eclipse-core-filesystem
7009 (name "java-eclipse-core-filesystem")
7013 (uri (string-append "https://repo1.maven.org/maven2/"
7014 "org/eclipse/platform/org.eclipse.core.filesystem/"
7015 version "/org.eclipse.core.filesystem-"
7016 version "-sources.jar"))
7019 "0km1bhwjim4rfy3pkvjhvy31kgsyf2ncx0mlkmbf5n6g57pphdyj"))))
7020 (build-system ant-build-system)
7022 `(#:tests? #f ; no tests included
7023 #:jar-name "eclipse-core-filesystem.jar"))
7025 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7026 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
7027 ("java-eclipse-osgi" ,java-eclipse-osgi)))
7028 (home-page "https://www.eclipse.org/")
7029 (synopsis "Eclipse core file system")
7030 (description "This package provides the Eclipse core file system with the
7031 module @code{org.eclipse.core.filesystem}.")
7032 (license license:epl1.0)))
7034 (define-public java-eclipse-core-expressions
7036 (name "java-eclipse-core-expressions")
7040 (uri (string-append "https://repo1.maven.org/maven2/"
7041 "org/eclipse/platform/org.eclipse.core.expressions/"
7042 version "/org.eclipse.core.expressions-"
7043 version "-sources.jar"))
7046 "18bw2l875gmygvpagpgk9l24qzbdjia4ag12nw6fi8v8yaq4987f"))))
7047 (build-system ant-build-system)
7049 `(#:tests? #f ; no tests included
7050 #:jar-name "eclipse-core-expressions.jar"))
7052 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7053 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
7054 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
7055 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
7056 ("java-eclipse-osgi" ,java-eclipse-osgi)))
7057 (home-page "https://www.eclipse.org/")
7058 (synopsis "Eclipse core expression language")
7059 (description "This package provides the Eclipse core expression language
7060 with the @code{org.eclipse.core.expressions} module.")
7061 (license license:epl1.0)))
7063 (define-public java-eclipse-core-variables
7065 (name "java-eclipse-core-variables")
7069 (uri (string-append "https://repo1.maven.org/maven2/"
7070 "org/eclipse/platform/org.eclipse.core.variables/"
7071 version "/org.eclipse.core.variables-"
7072 version "-sources.jar"))
7075 "12dirh03zi4n5x5cj07vzrhkmnqy6h9q10h9j605pagmpmifyxmy"))))
7076 (build-system ant-build-system)
7078 `(#:tests? #f ; no tests included
7079 #:jar-name "eclipse-core-variables.jar"))
7081 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7082 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
7083 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
7084 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
7085 ("java-eclipse-osgi" ,java-eclipse-osgi)))
7086 (home-page "https://www.eclipse.org/platform")
7087 (synopsis "Eclipse core variables")
7088 (description "This package provides the Eclipse core variables module
7089 @code{org.eclipse.core.variables}.")
7090 (license license:epl1.0)))
7092 (define-public java-eclipse-ant-core
7094 (name "java-eclipse-ant-core")
7098 (uri (string-append "https://repo1.maven.org/maven2/"
7099 "org/eclipse/platform/org.eclipse.ant.core/"
7100 version "/org.eclipse.ant.core-"
7101 version "-sources.jar"))
7104 "11g3if794qjlk98mz9zch22rr56sd7z63vn4i7k2icr8cq5bfqg7"))))
7105 (build-system ant-build-system)
7107 `(#:tests? #f ; no tests included
7108 #:jar-name "eclipse-ant-core.jar"))
7110 `(("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
7111 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7112 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
7113 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
7114 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
7115 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
7116 ("java-eclipse-core-variables" ,java-eclipse-core-variables)
7117 ("java-eclipse-osgi" ,java-eclipse-osgi)))
7118 (home-page "https://www.eclipse.org/platform")
7119 (synopsis "Ant build tool core libraries")
7120 (description "This package provides the ant build tool core libraries with
7121 the module @code{org.eclipse.ant.core}.")
7122 (license license:epl1.0)))
7124 (define-public java-eclipse-core-resources
7126 (name "java-eclipse-core-resources")
7127 (version "3.13.200")
7130 (uri (string-append "https://repo1.maven.org/maven2/"
7131 "org/eclipse/platform/org.eclipse.core.resources/"
7132 version "/org.eclipse.core.resources-"
7133 version "-sources.jar"))
7136 "1sn3b6ky72hkvxcgf9b2jkpbdh3y8lbhi9xxwv1dsiddpkkq91hs"))))
7137 (build-system ant-build-system)
7139 `(#:tests? #f ; no tests included
7140 #:jar-name "eclipse-core-resources.jar"))
7142 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7143 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
7144 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
7145 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
7146 ("java-eclipse-core-expressions" ,java-eclipse-core-expressions)
7147 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
7148 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
7149 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
7150 ("java-eclipse-ant-core" ,java-eclipse-ant-core)
7151 ("java-eclipse-osgi" ,java-eclipse-osgi)))
7152 (home-page "https://www.eclipse.org/")
7153 (synopsis "Eclipse core resource management")
7154 (description "This package provides the Eclipse core resource management
7155 module @code{org.eclipse.core.resources}.")
7156 (license license:epl1.0)))
7158 (define-public java-eclipse-compare-core
7160 (name "java-eclipse-compare-core")
7164 (uri (string-append "https://repo1.maven.org/maven2/"
7165 "org/eclipse/platform/org.eclipse.compare.core/"
7166 version "/org.eclipse.compare.core-"
7167 version "-sources.jar"))
7170 "10g37r0pbiffyv2wk35c6g5lwzkdipkl0kkjp41v84dln46xm4dg"))))
7171 (build-system ant-build-system)
7173 `(#:tests? #f ; no tests included
7174 #:jar-name "eclipse-compare-core.jar"))
7176 `(("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
7177 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7178 ("java-eclipse-osgi" ,java-eclipse-osgi)
7179 ("java-icu4j" ,java-icu4j)))
7180 (home-page "https://www.eclipse.org/")
7181 (synopsis "Eclipse core compare support")
7182 (description "This package provides the Eclipse core compare support
7183 module @code{org.eclipse.compare.core}.")
7184 (license license:epl1.0)))
7186 (define-public java-eclipse-team-core
7188 (name "java-eclipse-team-core")
7192 (uri (string-append "https://repo1.maven.org/maven2/"
7193 "org/eclipse/platform/org.eclipse.team.core/"
7194 version "/org.eclipse.team.core-"
7195 version "-sources.jar"))
7198 "02j2jzqgb26zx2d5ahxmvijw6j4r0la90zl5c3i65x6z19ciyam7"))))
7199 (build-system ant-build-system)
7201 `(#:tests? #f ; no tests included
7202 #:jar-name "eclipse-team-core.jar"))
7204 `(("java-eclipse-compare-core" ,java-eclipse-compare-core)
7205 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
7206 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
7207 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
7208 ("java-eclipse-core-resources" ,java-eclipse-core-resources)
7209 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
7210 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7211 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
7212 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
7213 ("java-eclipse-osgi" ,java-eclipse-osgi)))
7214 (home-page "https://www.eclipse.org/platform")
7215 (synopsis "Eclipse team support core")
7216 (description "This package provides the Eclipse team support core module
7217 @code{org.eclipse.team.core}.")
7218 (license license:epl1.0)))
7220 (define-public java-eclipse-core-commands
7222 (name "java-eclipse-core-commands")
7226 (uri (string-append "https://repo1.maven.org/maven2/"
7227 "org/eclipse/platform/org.eclipse.core.commands/"
7228 version "/org.eclipse.core.commands-"
7229 version "-sources.jar"))
7232 "0yjn482qndcfrsq3jd6vnhcylp16420f5aqkrwr8spsprjigjcr9"))))
7233 (build-system ant-build-system)
7235 `(#:tests? #f ; no tests included
7236 #:jar-name "eclipse-core-commands.jar"))
7238 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)))
7239 (home-page "https://www.eclipse.org/platform")
7240 (synopsis "Eclipse core commands")
7241 (description "This package provides Eclipse core commands in the module
7242 @code{org.eclipse.core.commands}.")
7243 (license license:epl1.0)))
7245 (define-public java-eclipse-text
7247 (name "java-eclipse-text")
7251 (uri (string-append "https://repo1.maven.org/maven2/"
7252 "org/eclipse/platform/org.eclipse.text/"
7253 version "/org.eclipse.text-"
7254 version "-sources.jar"))
7257 "0scz70vzz5qs5caji9f5q01vkqnvip7dpri1q07l8wbbdcxn4cq1"))))
7258 (build-system ant-build-system)
7260 `(#:tests? #f ; no tests included
7261 #:jar-name "eclipse-text.jar"
7263 (modify-phases %standard-phases
7264 ;; When creating a new category we must make sure that the new list
7265 ;; matches List<Position>. By default it seems to be too generic
7266 ;; (ArrayList<Object>), so we specialize it to ArrayList<Position>.
7267 ;; Without this we get this error:
7269 ;; [javac] .../src/org/eclipse/jface/text/AbstractDocument.java:376:
7270 ;; error: method put in interface Map<K,V> cannot be applied to given types;
7271 ;; [javac] fPositions.put(category, new ArrayList<>());
7273 ;; [javac] required: String,List<Position>
7274 ;; [javac] found: String,ArrayList<Object>
7275 ;; [javac] reason: actual argument ArrayList<Object> cannot be converted
7276 ;; to List<Position> by method invocation conversion
7277 ;; [javac] where K,V are type-variables:
7278 ;; [javac] K extends Object declared in interface Map
7279 ;; [javac] V extends Object declared in interface Map
7281 ;; I don't know if this is a good fix. I suspect it is not, but it
7283 (add-after 'unpack 'fix-compilation-error
7285 (substitute* "src/org/eclipse/jface/text/AbstractDocument.java"
7286 (("Positions.put\\(category, new ArrayList<>\\(\\)\\);")
7287 "Positions.put(category, new ArrayList<Position>());"))
7290 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7291 ("java-eclipse-core-commands" ,java-eclipse-core-commands)
7292 ("java-icu4j" ,java-icu4j)))
7293 (home-page "http://www.eclipse.org/platform")
7294 (synopsis "Eclipse text library")
7295 (description "Platform Text is part of the Platform UI project and
7296 provides the basic building blocks for text and text editors within Eclipse
7297 and contributes the Eclipse default text editor.")
7298 (license license:epl1.0)))
7300 (define-public java-eclipse-jdt-core
7302 (name "java-eclipse-jdt-core")
7306 (uri (string-append "https://repo1.maven.org/maven2/"
7307 "org/eclipse/jdt/org.eclipse.jdt.core/"
7308 version "/org.eclipse.jdt.core-"
7309 version "-sources.jar"))
7312 "1g560yr9v2kzv34gc2m3ifpgnj7krcdd6h4gd4z83pwqacwkfz0k"))))
7313 (build-system ant-build-system)
7315 `(#:tests? #f ; no tests included
7316 #:jar-name "eclipse-jdt-core.jar"
7318 (modify-phases %standard-phases
7319 (add-after 'unpack 'move-sources
7321 (with-directory-excursion "src/jdtCompilerAdaptersrc/"
7322 (for-each (lambda (file)
7323 (install-file file (string-append "../" (dirname file))))
7324 (find-files "." ".*")))
7325 (delete-file-recursively "src/jdtCompilerAdaptersrc/")
7327 (add-before 'build 'copy-resources
7329 (with-directory-excursion "src"
7330 (for-each (lambda (file)
7331 (install-file file (string-append "../build/classes/" (dirname file))))
7332 (find-files "." ".*.(props|properties|rsc)")))
7335 `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
7336 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
7337 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
7338 ("java-eclipse-core-resources" ,java-eclipse-core-resources)
7339 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
7340 ("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
7341 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7342 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
7343 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
7344 ("java-eclipse-osgi" ,java-eclipse-osgi)
7345 ("java-eclipse-text" ,java-eclipse-text)))
7346 (home-page "https://www.eclipse.org/jdt")
7347 (synopsis "Java development tools core libraries")
7348 (description "This package provides the core libraries of the Eclipse Java
7349 development tools.")
7350 (license license:epl1.0)))
7352 (define-public java-eclipse-jdt-compiler-apt
7354 (name "java-eclipse-jdt-compiler-apt")
7358 (uri (string-append "https://repo1.maven.org/maven2/"
7359 "org/eclipse/jdt/org.eclipse.jdt.compiler.apt/"
7360 version "/org.eclipse.jdt.compiler.apt-"
7361 version "-sources.jar"))
7364 "1s285k9p2ixdqrknb40jbbvw682n9a7l5lqpn583a8pvlzg2l6r8"))))
7365 (build-system ant-build-system)
7367 `(#:tests? #f ; no tests included
7368 #:jar-name "eclipse-jdt-compiler-apt.jar"
7371 `(("java-eclipse-jdt-core" ,java-eclipse-jdt-core)))
7372 (home-page "https://www.eclipse.org/jdt/apt/")
7373 (synopsis "Annotation processing tool")
7374 (description "APT stands for Annotation Processing Tool. APT provides a
7375 means for generating files and compiling new Java classes based on annotations
7376 found in your source code.")
7377 (license license:epl2.0)))
7379 (define-public java-javax-mail
7381 (name "java-javax-mail")
7385 (uri (string-append "https://repo1.maven.org/maven2/"
7386 "com/sun/mail/javax.mail/"
7387 version "/javax.mail-"
7388 version "-sources.jar"))
7391 "0sdlfgsc2b5s89xv1261y8i0jijcja019k2x1c8ngfn582w4jly9"))))
7392 (build-system ant-build-system)
7394 `(#:tests? #f ; no tests
7395 #:jar-name "javax-mail.jar"))
7396 (home-page "https://javamail.java.net")
7397 (synopsis "Reference implementation of the JavaMail API")
7399 "This package provides versions of the JavaMail API implementation, IMAP,
7400 SMTP, and POP3 service providers, some examples, and documentation for the
7402 ;; GPLv2 only with "classpath exception".
7403 (license license:gpl2)))
7405 (define-public java-log4j-api
7407 (name "java-log4j-api")
7411 (uri (string-append "mirror://apache/logging/log4j/" version
7412 "/apache-log4j-" version "-src.tar.gz"))
7415 "0j5p9gik0jysh37nlrckqbky12isy95cpwg2gv5fas1rcdqbraxd"))))
7416 (build-system ant-build-system)
7418 `(#:tests? #f ; tests require unpackaged software
7419 #:jar-name "log4j-api.jar"
7421 (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out")
7424 (modify-phases %standard-phases
7425 (add-after 'unpack 'enter-dir
7426 (lambda _ (chdir "log4j-api") #t))
7427 ;; FIXME: The tests require additional software that has not been
7428 ;; packaged yet, such as
7429 ;; * org.apache.maven
7430 ;; * org.apache.felix
7431 (add-after 'enter-dir 'delete-tests
7432 (lambda _ (delete-file-recursively "src/test") #t)))))
7434 `(("java-osgi-core" ,java-osgi-core)
7435 ("java-hamcrest-core" ,java-hamcrest-core)
7436 ("java-junit" ,java-junit)))
7437 (home-page "https://logging.apache.org/log4j/2.x/")
7438 (synopsis "API module of the Log4j logging framework for Java")
7440 "This package provides the API module of the Log4j logging framework for
7442 (license license:asl2.0)))
7444 (define-public java-log4j-core
7446 (inherit java-log4j-api)
7447 (name "java-log4j-core")
7449 `(("java-osgi-core" ,java-osgi-core)
7450 ("java-hamcrest-core" ,java-hamcrest-core)
7451 ("java-log4j-api" ,java-log4j-api)
7452 ("java-mail" ,java-mail)
7453 ("java-jboss-jms-api-spec" ,java-jboss-jms-api-spec)
7454 ("java-lmax-disruptor" ,java-lmax-disruptor)
7455 ("java-kafka" ,java-kafka-clients)
7456 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
7457 ("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
7458 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
7459 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)
7460 ("java-fasterxml-jackson-dataformat-xml" ,java-fasterxml-jackson-dataformat-xml)
7461 ("java-fasterxml-jackson-dataformat-yaml" ,java-fasterxml-jackson-dataformat-yaml)
7462 ("java-commons-compress" ,java-commons-compress)
7463 ("java-commons-csv" ,java-commons-csv)
7464 ("java-jeromq" ,java-jeromq)
7465 ("java-junit" ,java-junit)))
7467 `(("hamcrest" ,java-hamcrest-all)
7468 ("java-commons-io" ,java-commons-io)
7469 ("java-commons-lang3" ,java-commons-lang3)
7470 ("slf4j" ,java-slf4j-api)))
7472 `(#:tests? #f ; tests require more dependencies
7473 #:test-dir "src/test"
7474 #:source-dir "src/main/java"
7475 #:jar-name "log4j-core.jar"
7478 (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out")
7481 (modify-phases %standard-phases
7482 (add-after 'unpack 'enter-dir
7483 (lambda _ (chdir "log4j-core") #t)))))
7484 (synopsis "Core component of the Log4j framework")
7485 (description "This package provides the core component of the Log4j
7486 logging framework for Java.")))
7488 (define-public java-log4j-1.2-api
7490 (inherit java-log4j-api)
7491 (name "java-log4j-1.2-api")
7493 `(#:jar-name "java-log4j-1.2-api.jar"
7494 #:source-dir "log4j-1.2-api/src/main/java"
7496 ;; Tests require maven-model (and other maven subprojects), which is a
7497 ;; cyclic dependency.
7500 `(("log4j-api" ,java-log4j-api)
7501 ("log4j-core" ,java-log4j-core)
7502 ("osgi-core" ,java-osgi-core)
7503 ("eclipse-osgi" ,java-eclipse-osgi)
7504 ("java-lmax-disruptor" ,java-lmax-disruptor)))))
7506 (define-public java-commons-cli
7508 (name "java-commons-cli")
7512 (uri (string-append "mirror://apache/commons/cli/source/"
7513 "commons-cli-" version "-src.tar.gz"))
7516 "05hgi2z01fqz374y719gl1dxzqvzci5af071zm7vxrjg9vczipm1"))))
7517 (build-system ant-build-system)
7520 `(#:jar-name "commons-cli.jar"
7522 (modify-phases %standard-phases
7524 (install-from-pom "pom.xml")))))
7526 `(("java-junit" ,java-junit)
7527 ("java-hamcrest-core" ,java-hamcrest-core)))
7528 (home-page "https://commons.apache.org/cli/")
7529 (synopsis "Command line arguments and options parsing library")
7530 (description "The Apache Commons CLI library provides an API for parsing
7531 command line options passed to programs. It is also able to print help
7532 messages detailing the options available for a command line tool.
7534 Commons CLI supports different types of options:
7537 @item POSIX like options (ie. tar -zxvf foo.tar.gz)
7538 @item GNU like long options (ie. du --human-readable --max-depth=1)
7539 @item Java like properties (ie. java -Djava.awt.headless=true Foo)
7540 @item Short options with value attached (ie. gcc -O2 foo.c)
7541 @item long options with single hyphen (ie. ant -projecthelp)
7544 This is a part of the Apache Commons Project.")
7545 (license license:asl2.0)))
7547 (define-public java-commons-codec
7549 (name "java-commons-codec")
7553 (uri (string-append "mirror://apache/commons/codec/source/"
7554 "commons-codec-" version "-src.tar.gz"))
7557 "11xr0agckkhm91pb5akf2mbk84yd54gyr178wj57gsm97fi7nkh9"))))
7558 (build-system ant-build-system)
7560 `(#:jar-name "java-commons-codec.jar"
7561 #:source-dir "src/main/java"
7562 #:test-dir "src/test"
7563 #:test-exclude (list "**/*AbstractTest.java")
7565 (modify-phases %standard-phases
7566 (add-before 'build 'copy-resources
7568 (copy-recursively "src/main/resources"
7571 (add-before 'check 'copy-test-resources
7573 (copy-recursively "src/test/resources"
7574 "build/test-classes")
7576 (replace 'install (install-from-pom "pom.xml")))))
7578 `(("java-commons-lang3" ,java-commons-lang3)
7579 ("java-junit" ,java-junit)))
7581 `(("apache-commons-parent-pom" ,apache-commons-parent-pom-50)))
7582 (home-page "https://commons.apache.org/codec/")
7583 (synopsis "Common encoders and decoders such as Base64, Hex, Phonetic and URLs")
7584 (description "The codec package contains simple encoder and decoders for
7585 various formats such as Base64 and Hexadecimal. In addition to these widely
7586 used encoders and decoders, the codec package also maintains a collection of
7587 phonetic encoding utilities.
7589 This is a part of the Apache Commons Project.")
7590 (license license:asl2.0)))
7592 (define-public java-commons-daemon
7594 (name "java-commons-daemon")
7598 (uri (string-append "mirror://apache/commons/daemon/source/"
7599 "commons-daemon-" version "-src.tar.gz"))
7602 "141gkhfzv5v3pdhic6y4ardq2dhsa3v36j8wmmhy6f8mac48fp7n"))))
7603 (build-system ant-build-system)
7605 `(#:test-target "test"
7607 (modify-phases %standard-phases
7608 (add-after 'build 'build-javadoc ant-build-javadoc)
7609 (replace 'install (install-jars "dist"))
7610 (add-after 'install 'install-doc (install-javadoc "dist/docs/api")))))
7612 `(("java-junit" ,java-junit)))
7613 (home-page "https://commons.apache.org/daemon/")
7614 (synopsis "Library to launch Java applications as daemons")
7615 (description "The Daemon package from Apache Commons can be used to
7616 implement Java applications which can be launched as daemons. For example the
7617 program will be notified about a shutdown so that it can perform cleanup tasks
7618 before its process of execution is destroyed by the operation system.
7620 This package contains the Java library. You will also need the actual binary
7621 for your architecture which is provided by the jsvc package.
7623 This is a part of the Apache Commons Project.")
7624 (license license:asl2.0)))
7626 (define-public java-javaewah
7628 (name "java-javaewah")
7633 (url "https://github.com/lemire/javaewah/")
7634 (commit (string-append "JavaEWAH-" version))))
7635 (file-name (git-file-name name version))
7638 "1m8qcb1py76v7avbjjrkvyy6fhr5dk2ywy73gbsxqry04gkm2nhw"))))
7639 (build-system ant-build-system)
7640 (arguments `(#:jar-name "javaewah.jar"))
7642 `(("java-junit" ,java-junit)
7643 ("java-hamcrest-core" ,java-hamcrest-core)))
7644 (home-page "https://github.com/lemire/javaewah")
7645 (synopsis "Compressed alternative to the Java @code{BitSet} class")
7646 (description "This is a word-aligned compressed variant of the Java
7647 @code{Bitset} class. It provides both a 64-bit and a 32-bit RLE-like
7648 compression scheme. It can be used to implement bitmap indexes.
7650 The goal of word-aligned compression is not to achieve the best compression,
7651 but rather to improve query processing time. Hence, JavaEWAH tries to save CPU
7652 cycles, maybe at the expense of storage. However, the EWAH scheme is always
7653 more efficient storage-wise than an uncompressed bitmap (as implemented in the
7654 @code{BitSet} class by Sun).")
7655 ;; GPL2.0 derivates are explicitly allowed.
7656 (license license:asl2.0)))
7658 (define-public java-slf4j-api
7660 (name "java-slf4j-api")
7664 (uri (string-append "https://www.slf4j.org/dist/slf4j-"
7668 "13j51sgzmhhdrfa74gkal5zpip7r1440dh7zsi2c8bpb2zs1v8kb"))
7669 (modules '((guix build utils)))
7670 ;; Delete bundled jars.
7673 (for-each delete-file (find-files "." "\\.jar$"))
7675 (build-system ant-build-system)
7677 `(#:jar-name "slf4j-api.jar"
7678 #:source-dir "slf4j-api/src/main"
7679 #:test-dir "slf4j-api/src/test"
7681 (modify-phases %standard-phases
7682 (add-after 'build 'regenerate-jar
7684 ;; pom.xml ignores these files in the jar creation process. If we don't,
7685 ;; we get the error "This code should have never made it into slf4j-api.jar"
7686 (delete-file-recursively "build/classes/org/slf4j/impl")
7687 (invoke "jar" "-cf" "build/jar/slf4j-api.jar" "-C"
7688 "build/classes" ".")))
7689 (add-before 'check 'dont-test-abstract-classes
7691 ;; abstract classes are not meant to be run with junit
7692 (substitute* "build.xml"
7693 (("<include name=\"\\*\\*/\\*Test.java\" />")
7694 (string-append "<include name=\"**/*Test.java\" />"
7695 "<exclude name=\"**/MultithreadedInitializationTest"
7699 (install-from-pom "slf4j-api/pom.xml")))))
7701 `(("java-slf4j-parent" ,java-slf4j-parent)))
7703 `(("java-junit" ,java-junit)
7704 ("java-hamcrest-core" ,java-hamcrest-core)))
7705 (home-page "https://www.slf4j.org/")
7706 (synopsis "Simple logging facade for Java")
7707 (description "The Simple Logging Facade for Java (SLF4J) serves as a
7708 simple facade or abstraction for various logging
7709 frameworks (e.g. @code{java.util.logging}, @code{logback}, @code{log4j})
7710 allowing the end user to plug in the desired logging framework at deployment
7712 (license license:expat)))
7714 (define java-slf4j-parent
7716 (inherit java-slf4j-api)
7717 (name "java-slf4j-parent")
7719 (propagated-inputs '())
7723 (modify-phases %standard-phases
7727 (install-pom-file "pom.xml")))))))
7729 (define-public java-slf4j-simple
7731 (name "java-slf4j-simple")
7733 (source (package-source java-slf4j-api))
7734 (build-system ant-build-system)
7736 `(#:jar-name "slf4j-simple.jar"
7737 #:source-dir "slf4j-simple/src/main"
7738 #:test-dir "slf4j-simple/src/test"
7740 (modify-phases %standard-phases
7741 ;; The tests need some test classes from slf4j-api
7742 (add-before 'check 'build-slf4j-api-test-helpers
7744 ;; Add current dir to CLASSPATH ...
7746 (string-append (getcwd) ":" (getenv "CLASSPATH")))
7747 ;; ... and build test helper classes here:
7750 ,@(find-files "slf4j-api/src/test" ".*\\.java")))))
7752 (install-from-pom "slf4j-simple/pom.xml")))))
7754 `(("java-slf4j-api" ,java-slf4j-api)))
7756 `(("java-junit" ,java-junit)
7757 ("java-hamcrest-core" ,java-hamcrest-core)))
7758 (home-page "https://www.slf4j.org/")
7759 (synopsis "Simple implementation of simple logging facade for Java")
7760 (description "SLF4J binding for the Simple implementation, which outputs
7761 all events to System.err. Only messages of level INFO and higher are
7763 (license license:expat)))
7765 (define-public antlr2
7771 (uri (string-append "https://www.antlr2.org/download/antlr-"
7775 "1ffvcwdw73id0dk6pj2mlxjvbg0662qacx4ylayqcxgg381fnfl5"))
7776 (modules '((guix build utils)))
7779 (delete-file "antlr.jar")
7780 (substitute* "lib/cpp/antlr/CharScanner.hpp"
7784 "#define EOF (-1)\n"
7785 "#include <strings.h>")))
7786 (substitute* "configure"
7789 (build-system gnu-build-system)
7791 `(#:tests? #f ; no test target
7792 #:imported-modules ((guix build ant-build-system)
7793 (guix build syscalls)
7794 ,@%gnu-build-system-modules)
7795 #:modules (((guix build ant-build-system) #:prefix ant:)
7796 (guix build gnu-build-system)
7799 (modify-phases %standard-phases
7800 (add-after 'install 'strip-jar-timestamps
7801 (assoc-ref ant:%standard-phases 'strip-jar-timestamps))
7802 (add-before 'configure 'fix-timestamp
7804 (substitute* "configure"
7805 (("^TIMESTAMP.*") "TIMESTAMP=19700101\n"))
7807 (add-after 'configure 'fix-bin-ls
7809 (substitute* (find-files "." "Makefile")
7815 ("java" ,icedtea "jdk")))
7817 `(("java" ,icedtea)))
7818 (home-page "https://www.antlr2.org")
7819 (synopsis "Framework for constructing recognizers, compilers, and translators")
7820 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
7821 is a language tool that provides a framework for constructing recognizers,
7822 compilers, and translators from grammatical descriptions containing Java, C#,
7823 C++, or Python actions. ANTLR provides excellent support for tree construction,
7824 tree walking, and translation.")
7825 (license license:public-domain)))
7827 (define-public java-stringtemplate-3
7829 (name "java-stringtemplate")
7833 (uri (string-append "https://github.com/antlr/website-st4/raw/"
7834 "gh-pages/download/stringtemplate-"
7838 "086yj68np1vqhkj7483diz3km6s6y4gmwqswa7524a0ca6vxn2is"))))
7839 (build-system ant-build-system)
7841 `(#:jar-name (string-append ,name "-" ,version ".jar")
7843 #:modules ((guix build ant-build-system)
7847 (modify-phases %standard-phases
7848 (add-before 'check 'fix-tests
7850 (substitute* "build.xml"
7851 (("\\$\\{test.home\\}/java")
7852 "${test.home}/org"))
7854 (add-before 'build 'generate-grammar
7856 (with-directory-excursion "src/org/antlr/stringtemplate/language/"
7857 (for-each (lambda (file)
7858 (format #t "~a\n" file)
7859 (invoke "antlr" file))
7860 '("template.g" "angle.bracket.template.g" "action.g"
7861 "eval.g" "group.g" "interface.g")))
7865 ("java-junit" ,java-junit)))
7866 (home-page "https://www.stringtemplate.org")
7867 (synopsis "Template engine to generate formatted text output")
7868 (description "StringTemplate is a java template engine (with ports for C#,
7869 Objective-C, JavaScript, Scala) for generating source code, web pages, emails,
7870 or any other formatted text output. StringTemplate is particularly good at
7871 code generators, multiple site skins, and internationalization / localization.
7872 StringTemplate also powers ANTLR.")
7873 (license license:bsd-3)))
7875 ;; antlr3 is partially written using antlr3 grammar files. It also depends on
7876 ;; ST4 (stringtemplate4), which is also partially written using antlr3 grammar
7877 ;; files and uses antlr3 at runtime. The latest version requires a recent version
7878 ;; of antlr3 at runtime.
7879 ;; Fortunately, ST4 4.0.6 can be built with an older antlr3, and we use antlr3.3.
7880 ;; This version of ST4 is sufficient for the latest antlr3.
7881 ;; We use ST4 4.0.6 to build a boostrap antlr3 (latest version), and build
7882 ;; the latest ST4 with it. Then we build our final antlr3 that will be linked
7883 ;; against the latest ST4.
7884 ;; antlr3.3 still depends on antlr3 to generate some files, so we use an
7885 ;; even older version, antlr3.1, to generate them. Fortunately antlr3.1 uses
7886 ;; only grammar files with the antlr2 syntax.
7887 ;; So we build antlr3.1 -> antlr3.3 -> ST4.0.6 -> antlr3-bootstrap -> ST4 -> antlr3.
7889 (define-public java-stringtemplate
7890 (package (inherit java-stringtemplate-3)
7891 (name "java-stringtemplate")
7895 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/"
7897 (file-name (string-append name "-" version ".tar.gz"))
7900 "1pri8hqa95rfdkjy55icl5q1m09zwp5k67ib14abas39s4v3w087"))))
7901 (build-system ant-build-system)
7903 `(#:jar-name (string-append ,name "-" ,version ".jar")
7904 #:tests? #f ; FIXME: tests fail for unknown reasons
7906 #:modules ((guix build ant-build-system)
7910 (modify-phases %standard-phases
7911 (add-before 'check 'fix-test-target
7913 (substitute* "build.xml"
7914 (("\\$\\{test.home\\}/java") "${test.home}/")
7915 (("\\*Test.java") "Test*.java"))
7917 (add-before 'build 'generate-grammar
7919 (with-directory-excursion "src/org/stringtemplate/v4/compiler/"
7920 (for-each (lambda (file)
7921 (format #t "~a\n" file)
7922 (invoke "antlr3" file))
7923 '("STParser.g" "Group.g" "CodeGenerator.g")))
7926 `(("antlr3" ,antlr3-bootstrap)
7928 ("java-stringtemplate" ,java-stringtemplate-3)
7929 ("java-junit" ,java-junit)))))
7931 (define java-stringtemplate-4.0.6
7932 (package (inherit java-stringtemplate)
7933 (name "java-stringtemplate")
7937 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/ST-"
7939 (file-name (string-append name "-" version ".tar.gz"))
7942 "0hjmh1ahdsh3w825i67mli9l4nncc4l6hdbf9ma91jvlj590sljp"))))
7944 `(("antlr3" ,antlr3-3.3)
7946 ("java-stringtemplate" ,java-stringtemplate-3)))))
7948 (define-public antlr3
7955 (url "https://github.com/antlr/antlr3")
7957 (file-name (git-file-name name version))
7960 "0cafavrjmzqhklghrk8c2jqxkdwxgzskm20pbrfd3r41cn00dpnf"))))
7961 (build-system ant-build-system)
7963 `(#:jar-name (string-append ,name "-" ,version ".jar")
7964 #:source-dir "tool/src/main/java:runtime/Java/src/main/java:tool/src/main/antlr3"
7967 (modify-phases %standard-phases
7968 (add-after 'install 'bin-install
7969 (lambda* (#:key inputs outputs #:allow-other-keys)
7970 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
7971 (bin (string-append (assoc-ref outputs "out") "/bin")))
7973 (with-output-to-file (string-append bin "/antlr3")
7976 (string-append "#!" (which "sh") "\n"
7977 "java -cp " jar "/" ,name "-" ,version ".jar:"
7979 (find-files (assoc-ref inputs "stringtemplate")
7983 (find-files (assoc-ref inputs "stringtemplate4")
7987 (find-files (string-append
7988 (assoc-ref inputs "antlr")
7991 " org.antlr.Tool $*"))))
7992 (chmod (string-append bin "/antlr3") #o755))
7994 (add-before 'build 'generate-grammar
7996 (chdir "tool/src/main/antlr3/org/antlr/grammar/v3/")
7997 (for-each (lambda (file)
8000 (invoke "antlr3" file))
8001 '("ANTLR.g" "ANTLRTreePrinter.g" "ActionAnalysis.g"
8002 "AssignTokenTypesWalker.g"
8003 "ActionTranslator.g" "TreeToNFAConverter.g"
8004 "ANTLRv3.g" "ANTLRv3Tree.g" "LeftRecursiveRuleWalker.g"
8005 "CodeGenTreeWalker.g" "DefineGrammarItemsWalker.g"))
8006 (substitute* "ANTLRParser.java"
8007 (("public Object getTree") "public GrammarAST getTree"))
8008 (substitute* "ANTLRv3Parser.java"
8009 (("public Object getTree") "public CommonTree getTree"))
8010 (chdir "../../../../../java")
8011 (substitute* "org/antlr/tool/LeftRecursiveRuleAnalyzer.java"
8012 (("import org.antlr.grammar.v3.\\*;") "import org.antlr.grammar.v3.*;
8013 import org.antlr.grammar.v3.ANTLRTreePrinter;"))
8014 (substitute* "org/antlr/tool/ErrorManager.java"
8015 (("case NO_SUCH_ATTRIBUTE_PASS_THROUGH:") ""))
8016 (chdir "../../../..")
8018 (add-before 'build 'fix-build-xml
8020 (substitute* "build.xml"
8021 (("target name=\"compile\">")
8022 "target name=\"compile\">
8023 <copy todir=\"${classes.dir}\">
8024 <fileset dir=\"tool/src/main/resources\">
8025 <include name=\"**/*.stg\"/>
8026 <include name=\"**/*.st\"/>
8027 <include name=\"**/*.sti\"/>
8028 <include name=\"**/STLexer.tokens\"/>
8034 ("antlr3" ,antlr3-bootstrap)))
8036 `(("junit" ,java-junit)
8037 ("stringtemplate" ,java-stringtemplate-3)
8038 ("stringtemplate4" ,java-stringtemplate)))
8040 `(("stringtemplate" ,java-stringtemplate-3)
8042 ("stringtemplate4" ,java-stringtemplate-4.0.6)))
8043 (home-page "https://www.antlr3.org")
8044 (synopsis "Framework for constructing recognizers, compilers, and translators")
8045 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
8046 is a language tool that provides a framework for constructing recognizers,
8047 compilers, and translators from grammatical descriptions containing Java, C#,
8048 C++, or Python actions. ANTLR provides excellent support for tree construction,
8049 tree walking, and translation.")
8050 (license license:bsd-3)))
8052 (define antlr3-bootstrap
8055 (name "antlr3-bootstrap")
8058 ("antlr3" ,antlr3-3.3)))
8060 `(("junit" ,java-junit)))))
8062 (define-public antlr3-3.3
8069 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
8070 "gh-pages/download/antlr-"
8074 "0qgg5vgsm4l1d6dj9pfbaa25dpv2ry2gny8ajy4vvgvfklw97b3m"))
8076 (search-patches "antlr3-3_3-fix-java8-compilation.patch"))))
8078 `(#:jar-name (string-append ,name "-" ,version ".jar")
8079 #:source-dir (string-join '("tool/src/main/java"
8080 "runtime/Java/src/main/java"
8081 "tool/src/main/antlr2"
8082 "tool/src/main/antlr3")
8084 #:tests? #f ; FIXME: tests seem to require maven plugin
8085 #:modules ((guix build ant-build-system)
8089 (modify-phases %standard-phases
8090 (add-after 'install 'bin-install
8091 (lambda* (#:key inputs outputs #:allow-other-keys)
8092 (let* ((out (assoc-ref outputs "out"))
8093 (jar (string-append out "/share/java"))
8094 (bin (string-append out "/bin")))
8096 (with-output-to-file (string-append bin "/antlr3")
8100 "#!" (which "sh") "\n"
8101 "java -cp " jar "/antlr3-3.3.jar:"
8103 (append (find-files (assoc-ref inputs "java-stringtemplate")
8105 (find-files (string-append (assoc-ref inputs "antlr")
8109 " org.antlr.Tool $*"))))
8110 (chmod (string-append bin "/antlr3") #o755)
8112 (add-before 'build 'generate-grammar
8114 (substitute* "tool/src/main/java/org/antlr/tool/Grammar.java"
8115 (("import org.antlr.grammar.v2.\\*;")
8116 "import org.antlr.grammar.v2.*;\n
8117 import org.antlr.grammar.v2.TreeToNFAConverter;\n
8118 import org.antlr.grammar.v2.DefineGrammarItemsWalker;\n
8119 import org.antlr.grammar.v2.ANTLRTreePrinter;"))
8120 (with-directory-excursion "tool/src/main/antlr2/org/antlr/grammar/v2/"
8121 (for-each (lambda (file)
8122 (format #t "~a\n" file)
8123 (invoke "antlr" file))
8124 '("antlr.g" "antlr.print.g" "assign.types.g"
8125 "buildnfa.g" "codegen.g" "define.g")))
8126 (with-directory-excursion "tool/src/main/antlr3/org/antlr/grammar/v3/"
8127 (for-each (lambda (file)
8128 (format #t "~a\n" file)
8129 (invoke "antlr3" file))
8130 '("ActionAnalysis.g" "ActionTranslator.g" "ANTLRv3.g"
8133 (add-before 'build 'fix-build-xml
8135 (substitute* "build.xml"
8136 (("target name=\"compile\">")
8137 "target name=\"compile\">
8138 <copy todir=\"${classes.dir}\">
8139 <fileset dir=\"tool/src/main/resources\">
8140 <include name=\"**/*.stg\"/>
8141 <include name=\"**/*.st\"/>
8142 <include name=\"**/*.sti\"/>
8143 <include name=\"**/STLexer.tokens\"/>
8149 ("antlr3" ,antlr3-3.1)))
8151 `(("junit" ,java-junit)))
8153 `(("java-stringtemplate" ,java-stringtemplate-3)
8154 ("antlr" ,antlr2)))))
8156 (define-public antlr3-3.1
8162 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
8163 "gh-pages/download/antlr-"
8167 "0sfimc9cpbgrihz4giyygc8afgpma2c93yqpwb951giriri6x66z"))
8169 (search-patches "antlr3-3_1-fix-java8-compilation.patch"))))
8171 `(#:jar-name (string-append "antlr3-" ,version ".jar")
8172 #:source-dir "src:runtime/Java/src"
8175 (modify-phases %standard-phases
8176 (add-after 'install 'bin-install
8177 (lambda* (#:key inputs outputs #:allow-other-keys)
8178 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
8179 (bin (string-append (assoc-ref outputs "out") "/bin")))
8181 (with-output-to-file (string-append bin "/antlr3")
8184 (string-append "#!" (which "sh") "\n"
8185 "java -cp " jar "/antlr3-3.1.jar:"
8187 (find-files (assoc-ref inputs "stringtemplate")
8191 (find-files (string-append
8192 (assoc-ref inputs "antlr")
8195 " org.antlr.Tool $*"))))
8196 (chmod (string-append bin "/antlr3") #o755))
8198 (add-before 'build 'generate-grammar
8200 (let ((dir "src/org/antlr/tool/"))
8201 (for-each (lambda (file)
8204 (invoke "antlr" "-o" dir (string-append dir file)))
8205 '("antlr.g" "antlr.print.g" "assign.types.g"
8206 "buildnfa.g" "define.g")))
8207 (format #t "codegen.g\n")
8208 (invoke "antlr" "-o" "src/org/antlr/codegen"
8209 "src/org/antlr/codegen/codegen.g")
8211 (add-before 'build 'fix-build-xml
8213 (substitute* "build.xml"
8214 (("target name=\"compile\">")
8215 "target name=\"compile\">
8216 <copy todir=\"${classes.dir}\">
8217 <fileset dir=\"src\">
8218 <include name=\"**/*.stg\"/>
8219 <include name=\"**/*.st\"/>
8220 <include name=\"**/*.sti\"/>
8221 <include name=\"**/STLexer.tokens\"/>
8226 `(("antlr" ,antlr2)))
8228 `(("junit" ,java-junit)))
8230 `(("stringtemplate" ,java-stringtemplate-3)))))
8232 (define-public java-treelayout
8234 (name "java-treelayout")
8239 (url "https://github.com/abego/treelayout")
8240 (commit (string-append "v" version))))
8241 (file-name (git-file-name name version))
8244 "18my8ql9b1y0n0zrvkih7xfhf3dpgfhyfifvkcfhmwcvw3divxak"))))
8245 (build-system ant-build-system)
8247 `(#:jar-name (string-append ,name "-" ,version ".jar")
8248 #:source-dir "org.abego.treelayout/src/main/java"
8249 #:test-dir "org.abego.treelayout/src/test"))
8251 `(("java-junit" ,java-junit)))
8253 `(("java-hamcrest-core" ,java-hamcrest-core)))
8254 (home-page "http://treelayout.sourceforge.net")
8255 (synopsis "Tree Layout Algorithm in Java")
8256 (description "TreeLayout creates tree layouts for arbitrary trees. It is
8257 not restricted to a specific output or format, but can be used for any kind of
8258 two dimensional diagram. Examples are Swing based components, SVG files, etc.
8259 This is possible because TreeLayout separates the layout of a tree from the
8261 (license license:bsd-3)))
8263 (define-public java-antlr4-runtime
8265 (name "java-antlr4-runtime")
8270 (url "https://github.com/antlr/antlr4")
8272 (file-name (git-file-name name version))
8275 "1qal3add26qxskm85nk7r758arladn5rcyjinmhlhznmpbbv9j8m"))
8277 (search-patches "java-antlr4-Add-standalone-generator.patch"
8278 "java-antlr4-fix-code-too-large.java"))))
8279 (build-system ant-build-system)
8281 `(#:jar-name "java-antlr4-runtime.jar"
8282 #:source-dir "runtime/Java/src/org"
8283 #:tests? #f; tests depend on java-antlr4 itself
8285 (modify-phases %standard-phases
8286 (add-before 'build 'copy-resources
8288 (copy-recursively "runtime/Java/src/main/dot"
8291 (home-page "https://antlr.org")
8292 (synopsis "ANTLR runtime library")
8293 (description "This package contains the runtime library used with generated
8295 (license license:bsd-3)))
8297 (define-public antlr4
8299 (inherit java-antlr4-runtime)
8302 `(#:jar-name "antlr4.jar"
8303 #:source-dir "tool/src"
8304 #:test-dir "tool-testsuite/test:runtime-testsuite/test:runtime-testsuite/annotations/src"
8305 #:test-include (list "**/Test*.java")
8306 #:test-exclude (list
8307 ;; no runnable method
8308 "**/TestOutputReading.java"
8310 "**/TestParserErrors.java"
8311 "**/TestSemPredEvalParser.java"
8313 "**/TestListeners.java"
8314 "**/TestParseTrees.java"
8315 "**/TestParserExec.java"
8316 "**/TestLexerErrors.java"
8317 "**/TestPerformance.java"
8318 "**/TestCompositeParsers.java"
8319 "**/TestLexerExec.java"
8320 "**/TestSemPredEvalLexer.java"
8321 "**/TestLeftRecursion.java"
8322 "**/TestFullContextParsing.java"
8323 "**/TestCompositeLexers.java"
8324 ;; Null pointer exception
8325 "**/TestCompositeGrammars.java"
8326 ;; Wrong assumption on emoji
8327 "**/TestUnicodeData.java")
8329 (modify-phases %standard-phases
8330 (add-before 'build 'fix-build.xml
8332 ;; tests are not in a java subdirectory
8333 (substitute* "build.xml"
8334 (("\\$\\{test.home\\}/java") "${test.home}"))
8336 ;; tests require to have a working antlr4 binary
8338 (add-after 'bin-install 'check
8340 (invoke "ant" "compile-tests")
8341 (invoke "ant" "check" "-Dtest.home=runtime-testsuite/annotations/src")
8342 (invoke "ant" "check" "-Dtest.home=runtime-testsuite/test")
8343 (invoke "ant" "check" "-Dtest.home=tool-testsuite/test")
8345 (add-before 'check 'remove-unrelated-languages
8347 ;; There are tests for other languages that ANTLR can generate, but
8348 ;; we don't have the infrastructure for that yet. Let's test Java
8352 (delete-file-recursively
8353 (string-append "runtime-testsuite/test/org/antlr/v4/test/runtime/"
8355 '("cpp" "csharp" "go" "javascript" "php" "python" "python2"
8358 (add-before 'check 'generate-test-parsers
8359 (lambda* (#:key outputs #:allow-other-keys)
8360 (define (run-antlr dir filename package)
8361 (invoke "antlr4" "-lib" dir "-visitor" "-no-listener"
8362 "-package" package (string-append dir "/" filename)
8364 (setenv "PATH" (string-append (getenv "PATH") ":"
8365 (assoc-ref outputs "out") "/bin"))
8366 (run-antlr "runtime-testsuite/test/org/antlr/v4/test/runtime/java/api"
8367 "Java.g4" "org.antlr.v4.test.runtime.java.api")
8368 (run-antlr "runtime-testsuite/test/org/antlr/v4/test/runtime/java/api"
8369 "VisitorBasic.g4" "org.antlr.v4.test.runtime.java.api")
8370 (run-antlr "runtime-testsuite/test/org/antlr/v4/test/runtime/java/api"
8371 "VisitorCalc.g4" "org.antlr.v4.test.runtime.java.api")
8373 (add-before 'check 'remove-graphemes
8375 ;; When running antlr on grahemes.g4, we get a runtime exception:
8376 ;; set is empty. So delete the file that depends on it.
8378 "runtime-testsuite/test/org/antlr/v4/test/runtime/java/api/perf/TimeLexerSpeed.java")
8380 (add-after 'install 'bin-install
8381 (lambda* (#:key inputs outputs #:allow-other-keys)
8382 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
8383 (bin (string-append (assoc-ref outputs "out") "/bin")))
8385 (with-output-to-file (string-append bin "/antlr4")
8388 (string-append "#!" (which "sh") "\n"
8389 "java -cp " jar "/antlr4.jar:"
8395 (find-files (assoc-ref inputs input)
8397 '("antlr3" "java-stringtemplate"
8398 "java-antlr4-runtime" "java-treelayout"
8399 "java-jsonp-api" "java-icu4j")))
8401 " org.antlr.v4.Tool $*"))))
8402 (chmod (string-append bin "/antlr4") #o755)
8404 (add-before 'build 'copy-resources
8406 (copy-recursively "tool/resources/" "build/classes")
8408 (add-before 'build 'generate-unicode
8410 ;; First: build the generator
8411 (invoke "javac" "-cp" (getenv "CLASSPATH")
8412 "tool/src/org/antlr/v4/unicode/UnicodeRenderer.java"
8413 "tool/src/org/antlr/v4/unicode/UnicodeDataTemplateController.java")
8415 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
8416 ":tool/src:runtime/Java")
8417 "org.antlr.v4.unicode.UnicodeRenderer"
8418 "tool/resources/org/antlr/v4/tool/templates"
8420 "tool/src/org/antlr/v4/unicode/UnicodeData.java")
8421 ;; It seems there is a bug with our ST4
8422 (substitute* "tool/src/org/antlr/v4/unicode/UnicodeData.java"
8424 ;; Remove the additional file
8425 (delete-file "tool/src/org/antlr/v4/unicode/UnicodeRenderer.java")
8427 (add-before 'build 'generate-grammar
8428 (lambda* (#:key inputs #:allow-other-keys)
8429 (with-directory-excursion "tool/src/org/antlr/v4/parse"
8430 (for-each (lambda (file)
8433 (invoke "antlr3" file))
8434 '("ANTLRLexer.g" "ANTLRParser.g" "BlockSetTransformer.g"
8435 "GrammarTreeVisitor.g" "ATNBuilder.g"
8436 "ActionSplitter.g" "LeftRecursiveRuleWalker.g")))
8437 (with-directory-excursion "tool/src/org/antlr/v4/codegen"
8438 (install-file "../parse/ANTLRParser.tokens" ".")
8439 (display "SourceGenTriggers.g\n")
8440 (invoke "antlr3" "SourceGenTriggers.g"))
8443 `(("antlr3" ,antlr3)
8444 ("java-antlr4-runtime" ,java-antlr4-runtime)
8445 ("java-icu4j" ,java-icu4j)
8446 ("java-jsonp-api" ,java-jsonp-api)
8447 ("java-stringtemplate" ,java-stringtemplate)
8448 ("java-treelayout" ,java-treelayout)))
8450 `(("java-junit" ,java-junit)))
8451 (synopsis "Parser and lexer generator in Java")
8452 (description "ANTLR (ANother Tool for Language Recognition) is a powerful
8453 parser generator for reading, processing, executing, or translating structured
8454 text or binary files. It's widely used to build languages, tools, and
8455 frameworks. From a grammar, ANTLR generates a parser that can build and walk
8458 (define-public java-antlr4-runtime-4.1
8460 (inherit java-antlr4-runtime)
8465 (url "https://github.com/antlr/antlr4")
8467 (file-name (git-file-name "antlr4" version))
8470 "1i8hmx5an58cjyvhji0xgpvd6lq00z1k1mjys025q2wqc25wv4c1"))))
8472 (substitute-keyword-arguments (package-arguments java-antlr4-runtime)
8474 `(modify-phases ,phases
8475 (add-before 'configure 'chmod
8477 (chmod "build.xml" #o644)
8480 `(("java-treelayout" ,java-treelayout)))))
8482 (define-public antlr4-4.1
8485 (version (package-version java-antlr4-runtime-4.1))
8486 (source (package-source java-antlr4-runtime-4.1))
8488 (substitute-keyword-arguments (package-arguments antlr4)
8491 ((#:test-exclude excludes)
8492 `(list "**/TestParseErrors.java"
8493 "**/TestTopologicalSort.java"
8496 `(modify-phases ,phases
8497 (delete 'generate-unicode)
8500 (invoke "ant" "check")
8502 (add-before 'configure 'chmod
8504 (chmod "build.xml" #o644)
8506 (delete 'remove-graphemes)
8507 (delete 'remove-unrelated-languages)
8508 (delete 'generate-test-parsers)))))
8511 "java-antlr4-runtime" (list java-antlr4-runtime-4.1)
8512 (package-inputs antlr4)))))
8514 (define-public java-tunnelvisionlabs-antlr4-runtime-annotations
8516 (inherit java-antlr4-runtime)
8517 (name "java-tunnelvisionlabs-antlr4-runtime-annotations")
8522 (url "https://github.com/tunnelvisionlabs/antlr4")
8523 (commit (string-append version "-opt"))))
8524 (file-name (git-file-name "java-tunnelvisionlabs-antlr4" version))
8527 "1mf2lvvsszpialsk23ma83pwp50nd32lrbjpa847zlm5gmranbr8"))
8529 (search-patches "java-antlr4-Add-standalone-generator.patch"
8530 "java-tunnelvisionlabs-antlr-code-too-large.patch"))))
8532 `(#:jar-name "java-antlr4-runtime-annotations.jar"
8533 #:source-dir "runtime/JavaAnnotations/src"
8534 #:tests? #f; no tests
8536 (modify-phases %standard-phases
8537 (add-after 'build 'copy-resources
8539 (copy-recursively "runtime/JavaAnnotations/resources"
8542 (add-after 'copy-resources 'rebuild-jar
8544 (invoke "ant" "jar")
8548 (synopsis "Annotations for ANTLR's runtime library")
8549 (description "This package contains annotations used during the build of
8550 the runtime library of ANTLR.")))
8552 ;; the runtime of this library requires a lexer that is generated by antlr4.
8553 ;; However, antlr4 itself requires this library at build and run-time. We
8554 ;; use antlr4@4.1, the closest version of antlr that doesn't need this
8555 ;; bootstrap process, to generate the lexer. The generated lexer is built
8556 ;; for the 4.1 runtime, which is slightly different from this runtime.
8557 ;; So, we build the runtime with antlr 4.1, with a broken xml lexer, that we
8558 ;; use to build antlr4. We then re-use this antlr4 to build the runtime, and
8559 ;; the proper, working, runtime to build antlr4 again.
8560 (define java-tunnelvisionlabs-antlr4-runtime-bootstrap
8562 (inherit java-antlr4-runtime)
8563 (name "java-tunnelvisionlabs-antlr4-runtime")
8564 (version (package-version java-tunnelvisionlabs-antlr4-runtime-annotations))
8565 (source (package-source java-tunnelvisionlabs-antlr4-runtime-annotations))
8567 `(#:jar-name "java-antlr4-runtime.jar"
8568 #:source-dir "runtime/Java/src"
8569 #:tests? #f; tests require antlr4, but antlr4 depends on this package
8571 (modify-phases %standard-phases
8572 (add-before 'build 'generate-xpath-lexer
8574 (invoke "antlr4" "-lib" "runtime/Java/src/org/antlr/v4/runtime/tree/xpath"
8575 "-visitor" "-no-listener"
8576 "-package" "org.antlr.v4.runtime.tree.xpath"
8577 "runtime/Java/src/org/antlr/v4/runtime/tree/xpath/XPathLexer.g4")
8578 ;; Generated code is for an incompatible version of the runtime
8579 (substitute* "runtime/Java/src/org/antlr/v4/runtime/tree/xpath/XPathLexer.java"
8580 (("LexerATNSimulator\\(this,_ATN,_decisionToDFA,_sharedContextCache\\)")
8581 "LexerATNSimulator(this,_ATN)"))
8583 (add-before 'build 'copy-resources
8585 (copy-recursively "runtime/Java/src/main/dot"
8589 `(("antlr4" ,antlr4-4.1)
8590 ("java-tunnelvisionlabs-antlr4-runtime-annotations"
8591 ,java-tunnelvisionlabs-antlr4-runtime-annotations)))))
8593 (define java-tunnelvisionlabs-antlr4-bootstrap
8596 (name "java-tunnelvisionlabs-antlr4")
8597 (version (package-version java-tunnelvisionlabs-antlr4-runtime-annotations))
8598 (source (package-source java-tunnelvisionlabs-antlr4-runtime-annotations))
8600 (substitute-keyword-arguments (package-arguments antlr4)
8602 "tool/test:runtime-testsuite/src")
8604 `(modify-phases ,phases
8605 (delete 'remove-unrelated-languages)
8606 (delete 'remove-graphemes)
8607 (delete 'generate-test-parsers)
8611 `(("antlr3" ,antlr3)
8612 ("java-antlr4-runtime" ,java-tunnelvisionlabs-antlr4-runtime-bootstrap)
8613 ("java-tunnelvisionlabs-antlr4-runtime-annotations"
8614 ,java-tunnelvisionlabs-antlr4-runtime-annotations)
8615 ("java-icu4j" ,java-icu4j)
8616 ("java-jsonp-api" ,java-jsonp-api)
8617 ("java-stringtemplate" ,java-stringtemplate)
8618 ("java-treelayout" ,java-treelayout)))))
8620 (define-public java-tunnelvisionlabs-antlr4-runtime
8622 (inherit java-tunnelvisionlabs-antlr4-runtime-bootstrap)
8625 "antlr4" (list java-tunnelvisionlabs-antlr4-bootstrap)
8626 (package-native-inputs java-tunnelvisionlabs-antlr4-runtime-bootstrap)))))
8628 (define-public java-tunnelvisionlabs-antlr4
8630 (inherit java-tunnelvisionlabs-antlr4-bootstrap)
8633 "java-antlr4-runtime" (list java-tunnelvisionlabs-antlr4-runtime)
8634 (package-inputs java-tunnelvisionlabs-antlr4-bootstrap)))))
8636 (define-public java-commons-cli-1.2
8637 ;; This is a bootstrap dependency for Maven2.
8639 (inherit java-commons-cli)
8643 (uri (string-append "mirror://apache/commons/cli/source/"
8644 "commons-cli-" version "-src.tar.gz"))
8647 "0rvfgzgv2pc1m091dfj3ih9ddsjjppr1f1wf0qmc3bk6b1kwv2dm"))))
8649 `(#:jar-name "commons-cli.jar"
8651 (modify-phases %standard-phases
8652 (add-before 'check 'fix-build-xml
8653 (lambda* (#:key inputs #:allow-other-keys)
8654 (substitute* "build.xml"
8655 (("dir=\"\\$\\{test.home\\}/java\"")
8656 "dir=\"${test.home}\""))
8659 `(("java-junit" ,java-junit)))))
8661 (define-public java-microemulator-cldc
8663 (name "java-microemulator-cldc")
8667 (uri (string-append "https://github.com/barteo/microemu/archive/"
8669 (string-map (lambda (c) (if (char=? c #\.) #\_ c))
8672 (file-name (string-append name "-" version ".tar.gz"))
8675 "1x1apmz38gkppxnwnygwmi12j54v4p258v8ddzn6dldkk7vak1ll"))))
8676 (build-system ant-build-system)
8678 `(#:jar-name "microemulator-cldc.jar"
8679 #:source-dir "microemu-cldc/src/main/java"
8680 #:tests? #f)); Requires even older software
8681 (home-page "https://github.com/barteo/microemu")
8682 (synopsis "J2ME CLDC emulator")
8683 (description "Microemulator is a Java 2 Micro Edition (J2ME) CLDC/MIDP
8684 Emulator. It demonstrates MIDlet based applications in web browser
8685 applet and can be run as a standalone java application.")
8686 (license (list license:asl2.0
8688 license:lgpl2.1+))))
8690 (define-public java-datanucleus-javax-persistence
8692 (name "java-datanucleus-javax-persistence")
8696 (uri (string-append "https://github.com/datanucleus/"
8697 "javax.persistence/archive/javax.persistence-"
8698 version "-release.tar.gz"))
8701 "11jx0fjwgc2hhbqqgdd6m1pf2fplf9vslppygax0y1z5csnqjhpx"))))
8702 (build-system ant-build-system)
8704 `(#:jar-name "java-datanucleus-javax-persistence.jar"
8706 #:source-dir "src/main/java"
8707 #:tests? #f)); no tests
8708 (home-page "https://github.com/datanucleus/javax.persistence")
8709 (synopsis "JPA API")
8710 (description "This package contains a clean definition of JPA API intended
8711 for use with DataNucleus JPA since the JCP haven't provided an official JPA API
8712 jar. See @url{http://java.net/projects/jpa-spec/downloads} for the specification
8713 used to generate this API.")
8714 (license (list license:edl1.0 license:epl1.0))))
8716 (define-public java-osgi-cmpn
8718 (name "java-osgi-cmpn")
8722 (uri (string-append "https://repo1.maven.org/maven2/"
8723 "org/osgi/osgi.cmpn/" version "/osgi.cmpn-"
8724 version "-sources.jar"))
8727 "1lmb6xyrmkqdhv1kayf0514rlwq6ypvs4m44ibrck3snp8241wys"))))
8728 (build-system ant-build-system)
8730 `(#:jar-name "osgi-cmpn.jar"
8731 #:tests? #f)); no tests
8733 `(("annotation" ,java-osgi-annotation)
8734 ("core" ,java-osgi-core)
8735 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
8736 ("microemulator" ,java-microemulator-cldc)
8737 ("servlet" ,java-classpathx-servletapi)))
8738 (home-page "https://www.osgi.org")
8739 (synopsis "Compendium specification module of OSGi framework")
8741 "OSGi, for Open Services Gateway initiative framework, is a module system
8742 and service platform for the Java programming language. This package contains
8743 the compendium specification module, providing interfaces and classes for use
8744 in compiling bundles.")
8745 (license license:asl2.0)))
8747 (define-public java-osgi-service-component-annotations
8749 (name "java-osgi-service-component-annotations")
8753 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8754 "org.osgi.service.component.annotations/"
8755 version "/org.osgi.service.component.annotations-"
8756 version "-sources.jar"))
8759 "15rq9cmp4fpn74q44m4j35qsqmjf5lx3hcrk6pzvbhc08igic2f0"))))
8760 (build-system ant-build-system)
8762 `(#:jar-name "osgi-service-component-annotations.jar"
8763 #:tests? #f)); no tests
8765 `(("annotation" ,java-osgi-annotation)))
8766 (home-page "https://www.osgi.org")
8767 (synopsis "Support annotations for osgi-service-component")
8769 "OSGi, for Open Services Gateway initiative framework, is a module system
8770 and service platform for the Java programming language. This package contains
8771 the support annotations for osgi-service-component.")
8772 (license license:asl2.0)))
8774 (define-public java-osgi-dto
8776 (name "java-osgi-dto")
8780 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8781 "org.osgi.dto/" version "/org.osgi.dto-"
8782 version "-sources.jar"))
8785 "0f4bqjzadn0hwk6sd3h5gvbyfp3yci1s6r0v770cc15p0pg627yr"))))
8786 (build-system ant-build-system)
8788 `(#:jar-name "osgi-dto.jar"
8789 #:tests? #f)); no tests
8791 `(("annotation" ,java-osgi-annotation)))
8792 (home-page "https://www.osgi.org")
8793 (synopsis "Data Transfer Objects")
8795 "OSGi, for Open Services Gateway initiative framework, is a module system
8796 and service platform for the Java programming language. This package contains
8797 the Data Transfer Objects. It is easily serializable having only public fields
8798 of primitive types and their wrapper classes, Strings, and DTOs. List, Set,
8799 Map and array aggregates may also be used. The aggregates must only hold
8800 objects of the listed types or aggregates.")
8801 (license license:asl2.0)))
8803 (define-public java-osgi-resource
8805 (name "java-osgi-resource")
8809 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8810 "org.osgi.resource/"
8811 version "/org.osgi.resource-"
8812 version "-sources.jar"))
8815 "0hi0fsc5v99q22bd7lrkvpz1y0ds4w9arjldpwsrcpqvz2js7q2d"))))
8816 (build-system ant-build-system)
8818 `(#:jar-name "osgi-resource.jar"
8819 #:tests? #f)); no tests
8821 `(("annotation" ,java-osgi-annotation)
8822 ("dto" ,java-osgi-dto)))
8823 (home-page "https://www.osgi.org")
8824 (synopsis "OSGI Resource")
8826 "OSGi, for Open Services Gateway initiative framework, is a module system
8827 and service platform for the Java programming language. This package contains
8828 the definition of common types in osgi packages.")
8829 (license license:asl2.0)))
8831 (define-public java-osgi-namespace-contract
8833 (name "java-osgi-namespace-contract")
8837 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8838 "org.osgi.namespace.contract/"
8839 version "/org.osgi.namespace.contract-"
8840 version "-sources.jar"))
8843 "1iz4f2i0fvqrlq90ki9nfzcfpvy2av434ri25bglywqssx8mmp36"))))
8844 (build-system ant-build-system)
8846 `(("resource" ,java-osgi-resource)
8847 ("annotation" ,java-osgi-annotation)))
8849 `(#:jar-name "osgi-namespace-contract.jar"
8850 #:tests? #f)); no tests
8851 (home-page "https://www.osgi.org")
8852 (synopsis "Contract Capability and Requirement Namespace")
8854 "OSGi, for Open Services Gateway initiative framework, is a module system
8855 and service platform for the Java programming language. This package contains
8856 the names for the attributes and directives for a namespace with contracts.")
8857 (license license:asl2.0)))
8859 (define-public java-osgi-namespace-extender
8861 (name "java-osgi-namespace-extender")
8865 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8866 "org.osgi.namespace.extender/"
8867 version "/org.osgi.namespace.extender-"
8868 version "-sources.jar"))
8871 "0jgqiak2i05qv6j3gd33xlaifzzc0ylxxk376v2x0apfg3vvixmz"))))
8872 (build-system ant-build-system)
8874 `(("resource" ,java-osgi-resource)
8875 ("annotation" ,java-osgi-annotation)))
8877 `(#:jar-name "osgi-namespace-extendent.jar"
8878 #:tests? #f)); no tests
8879 (home-page "https://www.osgi.org")
8880 (synopsis "Extender Capability and Requirement Namespace")
8882 "OSGi, for Open Services Gateway initiative framework, is a module system
8883 and service platform for the Java programming language. This package contains
8884 the names for the attributes and directives for an extender namespace.")
8885 (license license:asl2.0)))
8887 (define-public java-osgi-namespace-service
8889 (name "java-osgi-namespace-service")
8893 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8894 "org.osgi.namespace.service/"
8895 version "/org.osgi.namespace.service-"
8896 version "-sources.jar"))
8899 "0qmw8n2449nkmm56d1znz9zhazb6ya3vsimd5bf5jg23zzhgl8c8"))))
8900 (build-system ant-build-system)
8902 `(("resource" ,java-osgi-resource)
8903 ("annotation" ,java-osgi-annotation)))
8905 `(#:jar-name "osgi-namespace-service.jar"
8906 #:tests? #f)); no tests
8907 (home-page "https://www.osgi.org")
8908 (synopsis "Service Capability and Requirement Namespace")
8910 "OSGi, for Open Services Gateway initiative framework, is a module system
8911 and service platform for the Java programming language. This package contains
8912 the names for the attributes and directives for a service namespace.")
8913 (license license:asl2.0)))
8915 (define-public java-osgi-util-function
8917 (name "java-osgi-util-function")
8921 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8922 "org.osgi.util.function/"
8923 version "/org.osgi.util.function-"
8924 version "-sources.jar"))
8927 "04l7j3hwmmj28w23m7paca0afzncs42j2mdr3liqq8kvp548sc6x"))))
8928 (build-system ant-build-system)
8930 `(#:jar-name "osgi-util-function.jar"
8931 #:tests? #f)); no tests
8933 `(("annotation" ,java-osgi-annotation)))
8934 (home-page "https://www.osgi.org")
8935 (synopsis "OSGI Util Function")
8937 "OSGi, for Open Services Gateway initiative framework, is a module system
8938 and service platform for the Java programming language. This package contains
8939 an interface for a function that accepts a single argument and produces a result.")
8940 (license license:asl2.0)))
8942 (define-public java-osgi-util-promise
8944 (name "java-osgi-util-promise")
8948 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8949 "org.osgi.util.promise/"
8950 version "/org.osgi.util.promise-"
8951 version "-sources.jar"))
8954 "0y34dwiflg1c4ahvkswpf9z02xph2sr9fm04ia5493x3lshpw22c"))))
8955 (build-system ant-build-system)
8957 `(#:jar-name "osgi-util-promise.jar"
8958 #:tests? #f)); no tests
8960 `(("annotation" ,java-osgi-annotation)
8961 ("function" ,java-osgi-util-function)))
8962 (home-page "https://www.osgi.org")
8963 (synopsis "Promise of a value")
8965 "OSGi, for Open Services Gateway initiative framework, is a module system
8966 and service platform for the Java programming language. This package contains
8967 an interface and utilitary classes for promises. A Promise represents a future
8968 value. It handles the interactions for asynchronous processing.")
8969 (license license:asl2.0)))
8971 (define-public java-osgi-service-metatype-annotations
8973 (name "java-osgi-service-metatype-annotations")
8977 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8978 "org.osgi.service.metatype.annotations/"
8979 version "/org.osgi.service.metatype.annotations-"
8980 version "-sources.jar"))
8983 "12rwm3349wk80vm88rcdgs4435m4jxkpkj5mrx326skkz2c6hyw6"))))
8984 (build-system ant-build-system)
8986 `(#:jar-name "osgi-service-metatype-annotations.jar"
8987 #:tests? #f)); no tests
8989 `(("annotation" ,java-osgi-annotation)))
8990 (home-page "https://www.osgi.org")
8991 (synopsis "Support annotations for metatype")
8993 "OSGi, for Open Services Gateway initiative framework, is a module system
8994 and service platform for the Java programming language. This package contains
8995 the support annotations for metatype.")
8996 (license license:asl2.0)))
8998 (define-public java-osgi-service-repository
9000 (name "java-osgi-service-repository")
9004 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9005 "org.osgi.service.repository/"
9006 version "/org.osgi.service.repository-"
9007 version "-sources.jar"))
9010 "1k41mhg7b58pd8nsghr2qwcjrxdnf1p9spsw9v11k4257g6rl06n"))))
9011 (build-system ant-build-system)
9013 `(#:jar-name "osgi-service-repository.jar"
9014 #:tests? #f)); no tests
9016 `(("annotation" ,java-osgi-annotation)
9017 ("promise" ,java-osgi-util-promise)
9018 ("resource" ,java-osgi-resource)))
9019 (home-page "https://www.osgi.org")
9020 (synopsis "OSGI service repository")
9022 "OSGi, for Open Services Gateway initiative framework, is a module system
9023 and service platform for the Java programming language. This package contains
9024 a repository service that contains resources.")
9025 (license license:asl2.0)))
9027 (define-public java-osgi-framework
9029 (name "java-osgi-framework")
9033 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9034 "org.osgi.framework/" version "/org.osgi.framework-"
9035 version "-sources.jar"))
9038 "1lwp2zfad3rybcc6q9bwz8xsgkc92ypzy5p6x54387f1qj65m73s"))))
9039 (build-system ant-build-system)
9041 `(#:jar-name "osgi-framework.jar"
9042 #:tests? #f)); no tests
9044 `(("annotation" ,java-osgi-annotation)
9045 ("resource" ,java-osgi-resource)
9046 ("dto" ,java-osgi-dto)))
9047 (home-page "https://www.osgi.org")
9048 (synopsis "OSGi framework")
9050 "OSGi, for Open Services Gateway initiative framework, is a module system
9051 and service platform for the Java programming language.")
9052 (license license:asl2.0)))
9054 (define-public java-osgi-service-log
9056 (name "java-osgi-service-log")
9060 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9061 "org.osgi.service.log/"
9062 version "/org.osgi.service.log-"
9063 version "-sources.jar"))
9066 "1029j30dzcwializzca0j3fkhwwz08kmmsha5agw1iccscimj6r0"))))
9067 (build-system ant-build-system)
9069 `(#:jar-name "osgi-service-log.jar"
9070 #:tests? #f)); no tests
9072 `(("java-osgi-framework" ,java-osgi-framework)))
9073 (home-page "https://www.osgi.org")
9074 (synopsis "Provides methods for bundles to write messages to the log")
9076 "OSGi, for Open Services Gateway initiative framework, is a module system
9077 and service platform for the Java programming language. This package contains
9079 (license license:asl2.0)))
9081 (define-public java-osgi-service-jdbc
9083 (name "java-osgi-service-jdbc")
9087 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9088 "org.osgi.service.jdbc/"
9089 version "/org.osgi.service.jdbc-"
9090 version "-sources.jar"))
9093 "11iln5v7bk469cgb9ddkrz9sa95b3733gqgaqw9xf5g6wq652yjz"))))
9094 (build-system ant-build-system)
9096 `(#:jar-name "osgi-service-jdbc.jar"
9097 #:tests? #f)); no tests
9098 (home-page "https://www.osgi.org")
9099 (synopsis "Factory for JDBC connection factories")
9101 "OSGi, for Open Services Gateway initiative framework, is a module system
9102 and service platform for the Java programming language. This package contains
9103 a factory for JDBC connection factories. There are 3 preferred connection
9104 factories for getting JDBC connections:
9107 @item @code{javax.sql.DataSource};
9108 @item @code{javax.sql.ConnectionPoolDataSource};
9109 @item @code{javax.sql.XADataSource}.
9111 (license license:asl2.0)))
9113 (define-public java-osgi-service-resolver
9115 (name "java-osgi-service-resolver")
9119 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9120 "org.osgi.service.resolver/"
9121 version "/org.osgi.service.resolver-"
9122 version "-sources.jar"))
9125 "1dzqn1ryfi2rq4zwsgp44bmj2wlfydjg1qbxw2b0z4xdjjy55vxd"))))
9126 (build-system ant-build-system)
9128 `(#:jar-name "osgi-service-resolver.jar"
9129 #:tests? #f)); no tests
9131 `(("annotation" ,java-osgi-annotation)
9132 ("resource" ,java-osgi-resource)))
9133 (home-page "https://www.osgi.org")
9134 (synopsis "OSGI Resolver service")
9136 "OSGi, for Open Services Gateway initiative framework, is a module system
9137 and service platform for the Java programming language. This package contains
9138 a resolver service that resolves the specified resources in the context supplied
9140 (license license:asl2.0)))
9142 (define-public java-osgi-util-tracker
9144 (name "java-osgi-util-tracker")
9148 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9149 "org.osgi.util.tracker/"
9150 version "/org.osgi.util.tracker-"
9151 version "-sources.jar"))
9154 "0c4fh9vxwzsx59r8dygda0gq2gx3z5vfhc3jsphlqwf5w0h403lz"))))
9155 (build-system ant-build-system)
9157 `(#:jar-name "osgi-util-tracker.jar"
9158 #:tests? #f)); no tests
9160 `(("framework" ,java-osgi-framework)
9161 ("annotation" ,java-osgi-annotation)))
9162 (home-page "https://www.osgi.org")
9163 (synopsis "Bundle tracking")
9165 "OSGi, for Open Services Gateway initiative framework, is a module system
9166 and service platform for the Java programming language. This package contains
9167 bundle tracking utility classes.")
9168 (license license:asl2.0)))
9170 (define-public java-osgi-service-cm
9172 (name "java-osgi-service-cm")
9176 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9177 "org.osgi.service.cm/"
9178 version "/org.osgi.service.cm-"
9179 version "-sources.jar"))
9182 "1z8kap48y3xi0ggj8v6czglfnpnd94mmismgi2wbqhj1nl5fzbp6"))))
9183 (build-system ant-build-system)
9185 `(#:jar-name "osgi-service-cm.jar"
9186 #:tests? #f)); no tests
9188 `(("framework" ,java-osgi-framework)
9189 ("annotation" ,java-osgi-annotation)))
9190 (home-page "https://www.osgi.org")
9191 (synopsis "OSGI Configuration Management")
9193 "OSGi, for Open Services Gateway initiative framework, is a module system
9194 and service platform for the Java programming language. This package contains
9195 utility classes for the configuration of services.")
9196 (license license:asl2.0)))
9198 (define-public java-osgi-service-packageadmin
9200 (name "java-osgi-service-packageadmin")
9204 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9205 "org.osgi.service.packageadmin/"
9206 version "/org.osgi.service.packageadmin-"
9207 version "-sources.jar"))
9210 "041mpxzi7g36wmcily6y4ccn3jx15akpdy8gmhyb7m98x7qfvn52"))))
9211 (build-system ant-build-system)
9213 `(#:jar-name "osgi-service-packageadmin.jar"
9214 #:tests? #f)); no tests
9216 `(("framework" ,java-osgi-framework)))
9217 (home-page "https://www.osgi.org")
9218 (synopsis "OSGI Package Administration")
9220 "OSGi, for Open Services Gateway initiative framework, is a module system
9221 and service platform for the Java programming language. This package contains
9222 the packageadmin service.")
9223 (license license:asl2.0)))
9225 (define-public java-ops4j-base-lang
9227 (name "java-ops4j-base-lang")
9231 (uri (string-append "https://github.com/ops4j/org.ops4j.base/"
9232 "archive/base-" version ".tar.gz"))
9235 "18hl3lpchgpv8yh5rlk39l2gif5dlfgb8gxjmncf39pr2dprkniw"))))
9236 (build-system ant-build-system)
9238 `(#:jar-name "java-ops4j-base-lang.jar"
9239 #:source-dir "ops4j-base-lang/src/main/java"
9240 #:tests? #f; no tests
9242 (modify-phases %standard-phases
9243 (add-before 'build 'add-test-file
9245 ;; That file is required by a test in ops4j-pax-exam-core-spi
9246 (mkdir-p "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang")
9247 (with-output-to-file "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang/pom.properties"
9251 "version=" ,version "\n"
9252 "groupId=org.ops4j.base"
9253 "artifactId=ops4j-base-lang\n"))))
9255 (home-page "https://ops4j1.jira.com/wiki/spaces/base/overview")
9256 (synopsis "Utility classes and extensions to be used in OPS4J projects")
9257 (description "OPS4J stands for Open Participation Software for Java. This
9258 package contains utilities and extensions related to @code{java.lang}.")
9259 (license license:asl2.0)))
9261 (define-public java-ops4j-base-monitors
9263 (inherit java-ops4j-base-lang)
9264 (name "java-ops4j-base-monitors")
9266 `(#:jar-name "java-ops4j-base-monitors.jar"
9267 #:source-dir "ops4j-base-monitors/src/main/java"
9268 #:tests? #f)); no tests
9270 `(("lang" ,java-ops4j-base-lang)))
9271 (description "OPS4J stands for Open Participation Software for Java. This
9272 package contains utilities and extensions related to monitoring.")))
9274 (define-public java-ops4j-base-io
9276 (inherit java-ops4j-base-lang)
9277 (name "java-ops4j-base-io")
9279 `(#:jar-name "java-ops4j-base-io.jar"
9280 #:source-dir "ops4j-base-io/src/main/java"
9281 #:test-dir "ops4j-base-io/src/test"
9283 (list "**/ListerTest.java")))
9285 `(("lang" ,java-ops4j-base-monitors)
9286 ("lang" ,java-ops4j-base-lang)))
9288 `(("junit" ,java-junit)
9289 ("hamcrest" ,java-hamcrest-core)))
9290 (description "OPS4J stands for Open Participation Software for Java. This
9291 package contains utilities and extensions related to handling streams and files.")))
9293 (define-public java-ops4j-base-util
9295 (inherit java-ops4j-base-lang)
9296 (name "java-ops4j-base-util")
9298 `(#:jar-name "java-ops4j-base-util.jar"
9299 #:source-dir "ops4j-base-util/src/main/java"
9300 #:test-dir "ops4j-base-util/src/test"))
9302 `(("lang" ,java-ops4j-base-lang)))
9304 `(("junit" ,java-junit)))
9305 (description "OPS4J stands for Open Participation Software for Java. This
9306 package contains utilities and extensions related to environment, i18n and
9309 (define-public java-ops4j-base-util-property
9311 (inherit java-ops4j-base-lang)
9312 (name "java-ops4j-base-util-property")
9314 `(#:jar-name "java-ops4j-base-util-property.jar"
9315 #:source-dir "ops4j-base-util-property/src/main/java"
9316 #:tests? #f)); no tests
9318 `(("lang" ,java-ops4j-base-lang)
9319 ("util" ,java-ops4j-base-util)))
9320 (description "OPS4J stands for Open Participation Software for Java. This
9321 package contains utilities and extensions related to resolving properties from
9322 different sources.")))
9324 (define-public java-ops4j-base-store
9326 (inherit java-ops4j-base-lang)
9327 (name "java-ops4j-base-store")
9329 `(#:jar-name "java-ops4j-base-store.jar"
9330 #:source-dir "ops4j-base-store/src/main/java"
9331 #:tests? #f)); no tests
9333 `(("lang" ,java-ops4j-base-lang)
9334 ("slf4j" ,java-slf4j-api)
9335 ("io" ,java-ops4j-base-io)))
9336 (description "OPS4J stands for Open Participation Software for Java. This
9337 package contains utilities for storing and retrieving data from an
9338 @code{InputStream}.")))
9340 (define-public java-ops4j-base-spi
9342 (inherit java-ops4j-base-lang)
9343 (name "java-ops4j-base-spi")
9345 `(#:jar-name "java-ops4j-base-spi.jar"
9346 #:source-dir "ops4j-base-spi/src/main/java"
9347 #:test-dir "ops4j-base-spi/src/test"))
9349 `(("junit" ,java-junit)
9350 ("hamcrest" ,java-hamcrest-core)))
9351 (description "OPS4J stands for Open Participation Software for Java. This
9352 package contains utilities for obtaining services via the Java SE 6
9353 @code{ServiceLoader}.")))
9355 (define-public java-aqute-bnd-annotation
9357 (name "java-aqute-bnd-annotation")
9361 (uri (string-append "https://github.com/bndtools/bnd/archive/"
9362 version ".REL.tar.gz"))
9363 (file-name (string-append name "-" version ".tar.gz"))
9366 "1ggyiq0as0f6cz333a0dh98j72kmvv5pf2s47v9554yh905lfqdl"))))
9367 (build-system ant-build-system)
9369 `(#:jar-name "java-aqute-bnd-annotation.jar"
9370 #:source-dir "biz.aQute.bnd.annotation/src"
9371 #:tests? #f)); empty test dir
9372 (home-page "https://bnd.bndtools.org/")
9373 (synopsis "Tools for OSGi")
9374 (description "Bnd is a swiss army knife for OSGi, it creates manifest
9375 headers based on analyzing the class code, it verifies the project settings,
9376 it manages project dependencies, gives diffs jars, and much more.")
9377 (license license:asl2.0)))
9379 (define-public java-aqute-libg
9381 (inherit java-aqute-bnd-annotation)
9382 (name "java-aqute-libg")
9384 `(#:jar-name "java-aqute-libg.jar"
9385 ;; The build fails when source/target more recent than 1.7. This
9386 ;; is a known issue. See: https://github.com/bndtools/bnd/issues/1327
9388 ;; It is closed as won't fix. There is no way to change the source
9389 ;; so that it works on 1.8, and still works on 1.6, the upstream
9390 ;; target. It work fine on 1.7, so we use 1.7.
9391 #:make-flags (list "-Dant.build.javac.source=1.7"
9392 "-Dant.build.javac.target=1.7")
9394 (modify-phases %standard-phases
9395 (add-before 'configure 'chdir
9396 ;; Change to aQute.libg directory, so that the relative
9397 ;; paths in the tests aren't broken.
9399 (chdir "aQute.libg")
9401 (add-before 'check 'create-test-directory
9402 ;; Copy the test directory to test/java, since that's where
9403 ;; ant-build-system's default project in build.xml expects to find
9404 ;; the test classes. Leave a copy in the original place to not
9405 ;; break paths in tests.
9408 (copy-recursively "test" "src/test/java")
9411 `(("slf4j" ,java-slf4j-api)
9412 ("osgi-annot" ,java-osgi-annotation)
9413 ("java-osgi-cmpn" ,java-osgi-cmpn)
9414 ("osgi" ,java-osgi-core)))
9416 `(("hamcrest" ,java-hamcrest-core)
9417 ("java-junit" ,java-junit)))))
9419 (define-public java-aqute-bndlib
9421 (inherit java-aqute-bnd-annotation)
9422 (name "java-aqute-bndlib")
9424 `(#:jar-name "java-bndlib.jar"
9425 #:source-dir "biz.aQute.bndlib/src"
9426 #:tests? #f)); no tests
9428 `(("slf4j" ,java-slf4j-api)
9429 ("osgi-annot" ,java-osgi-annotation)
9430 ("java-aqute-libg" ,java-aqute-libg)
9431 ("java-aqute-bnd-annotation" ,java-aqute-bnd-annotation)
9432 ("java-osgi-service-component-annotations" ,java-osgi-service-component-annotations)
9433 ("java-osgi-service-repository" ,java-osgi-service-repository)
9434 ("java-osgi-service-log" ,java-osgi-service-log)
9435 ("java-osgi-service-metatype-annotations" ,java-osgi-service-metatype-annotations)
9436 ("java-osgi-namespace-contract" ,java-osgi-namespace-contract)
9437 ("java-osgi-namespace-extender" ,java-osgi-namespace-extender)
9438 ("java-osgi-namespace-service" ,java-osgi-namespace-service)
9439 ("promise" ,java-osgi-util-promise)
9440 ("osgi" ,java-osgi-core)))))
9442 (define-public java-ops4j-pax-tinybundles
9444 (name "java-ops4j-pax-tinybundles")
9448 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.tinybundles/"
9449 "archive/tinybundles-" version ".tar.gz"))
9452 "0y0gq3pvv0iir2b885lmlwnvr724vv7vklzhhr4fs27d7mdkj871"))))
9454 `(#:jar-name "java-ops4j-pax-tinybundles.jar"
9455 #:source-dir "src/main/java"
9457 ;; Abstract base classes for other tests
9458 (list "**/BndTest.java" "**/CoreTest.java")
9460 (modify-phases %standard-phases
9461 (add-before 'check 'fix-version
9463 ;; This test has a reference to an old version of bndlib we are not
9464 ;; packaging. It uses the version referenced in pom.xml. We replace
9465 ;; it with our own version.
9466 (substitute* "src/test/java/org/ops4j/pax/tinybundles/bnd/BndTest.java"
9467 (("[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*")
9468 ,(package-version java-aqute-bndlib)))
9471 `(("lang" ,java-ops4j-base-lang)
9472 ("io" ,java-ops4j-base-io)
9473 ("store" ,java-ops4j-base-store)
9474 ("slf4j" ,java-slf4j-api)
9475 ("libg" ,java-aqute-libg)
9476 ("bndlib" ,java-aqute-bndlib)))
9478 `(("junit" ,java-junit)
9479 ("hamcrest" ,java-hamcrest-core)
9480 ("log4j" ,java-log4j-api)
9481 ("bndannotation" ,java-aqute-bnd-annotation)
9482 ("framework" ,java-osgi-framework)))
9483 (build-system ant-build-system)
9484 (home-page "https://ops4j1.jira.com/wiki/spaces/ops4j/pages/12060312/Tinybundles")
9485 (synopsis "Java APIs to create OSGi related artifacts")
9486 (description "Tinybundles is all about creating OSGi related artifacts like
9487 Bundles, Fragments and Deployment Packages with Java Api. It is very convenient
9488 to create such artifacts on-the-fly inside Tests (like in Pax Exam). On the
9489 other hand, this library can be a foundation of real end user tools that need
9490 to create those artifacts.")
9491 (license license:asl2.0)))
9493 (define-public java-ops4j-pax-exam-core
9495 (name "java-ops4j-pax-exam-core")
9499 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.exam2/"
9500 "archive/exam-reactor-" version ".tar.gz"))
9503 "08mzw8nkah3rj3vznlplnawspxhp61zgvb44ifqa1rni1cvbms2g"))))
9505 `(#:jar-name "java-ops4j-pax-exam-core.jar"
9506 #:source-dir "core/pax-exam/src/main/java"
9507 #:test-dir "core/pax-exam/src/test"))
9509 `(("slf4j" ,java-slf4j-api)
9510 ("lang" ,java-ops4j-base-lang)
9511 ("io" ,java-ops4j-base-io)
9512 ("util-property" ,java-ops4j-base-util-property)
9513 ("util-store" ,java-ops4j-base-store)
9514 ("java-osgi-core" ,java-osgi-core)))
9516 `(("junit" ,java-junit)
9517 ("hamcrest" ,java-hamcrest-core)))
9518 (build-system ant-build-system)
9519 (home-page "https://ops4j1.jira.com/wiki/spaces/PAXEXAM4/overview")
9520 (synopsis "In-Container Testing for OSGi, Java EE and CDI")
9521 (description "Pax Exam creates OSGi bundles for testing purposes. It lets
9522 the user take control of the OSGi framework, the test framework (e.g. JUnit) and
9523 the system under test at the same time.")
9524 (license license:asl2.0)))
9526 (define-public java-ops4j-pax-exam-core-spi
9528 (inherit java-ops4j-pax-exam-core)
9529 (name "java-ops4j-pax-exam-core-spi")
9531 `(#:jar-name "java-ops4j-pax-exam-spi.jar"
9532 #:source-dir "src/main/java"
9535 ;; Abstract base class, not a test
9536 "**/BaseStagedReactorTest.java"
9537 ;; Depends on org.mortbay.jetty.testwars:test-war-dump
9538 "**/WarBuilderTest.java")
9540 (modify-phases %standard-phases
9541 (add-before 'configure 'chdir
9543 ;; Tests assume we are in this directory
9544 (chdir "core/pax-exam-spi")
9546 (add-before 'check 'fix-tests
9548 ;; One test checks that this file is present.
9549 (mkdir-p "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi")
9550 (with-output-to-file
9551 "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi/pom.properties"
9554 (string-append "artifactId = pax-exam-spi\n"
9555 "version = " ,(package-version java-ops4j-pax-exam-core-spi)))))
9556 ;; Maven puts compilation results in the target directory, while we
9557 ;; put them in the build directory.
9558 (substitute* '("src/test/java/org/ops4j/pax/exam/spi/war/WarBuilderTest.java"
9559 "src/test/java/org/ops4j/pax/exam/spi/war/WarTestProbeBuilderTest.java"
9560 "src/test/java/org/ops4j/pax/exam/spi/war/ZipBuilderTest.java")
9561 (("target") "build"))
9562 ;; One test is expected to fail, but it doesn't throw the expected exception
9563 (substitute* "src/test/java/org/ops4j/pax/exam/spi/reactors/BaseStagedReactorTest.java"
9564 (("AssertionError") "IllegalArgumentException"))
9567 `(("java-ops4j-pax-exam-core" ,java-ops4j-pax-exam-core)
9568 ("lang" ,java-ops4j-base-lang)
9569 ("monitors" ,java-ops4j-base-monitors)
9570 ("store" ,java-ops4j-base-store)
9571 ("io" ,java-ops4j-base-io)
9572 ("spi" ,java-ops4j-base-spi)
9573 ("osgi" ,java-osgi-core)
9574 ("slf4j" ,java-slf4j-api)
9575 ("tinybundles" ,java-ops4j-pax-tinybundles)))
9577 `(("mockito" ,java-mockito-1)
9578 ("junit" ,java-junit)
9579 ("hamcrest" ,java-hamcrest-core)
9580 ("cglib" ,java-cglib)
9581 ("objenesis" ,java-objenesis)
9582 ("asm" ,java-asm)))))
9584 (define-public java-ops4j-pax-exam-core-junit
9586 (inherit java-ops4j-pax-exam-core)
9587 (name "java-ops4j-pax-exam-core-junit")
9589 `(#:jar-name "ops4j-pax-exam-core-junit.jar"
9590 #:source-dir "drivers/pax-exam-junit4/src/main/java"
9591 #:tests? #f)); no tests
9593 `(("junit" ,java-junit)
9594 ("slf4j" ,java-slf4j-api)
9595 ("core" ,java-ops4j-pax-exam-core)
9596 ("spi" ,java-ops4j-pax-exam-core-spi)))
9597 (native-inputs '())))
9599 (define-public java-fasterxml-jackson-annotations
9601 (name "java-fasterxml-jackson-annotations")
9605 (uri (string-append "https://github.com/FasterXML/"
9606 "jackson-annotations/archive/"
9607 "jackson-annotations-" version ".tar.gz"))
9610 "0mr95xd0da6a4g95zvrl1ryk5n5zv2rc696w3xnsr5hxk2gicfc4"))))
9611 (build-system ant-build-system)
9613 `(#:jar-name "jackson-annotations.jar"
9614 #:source-dir "src/main/java"
9615 #:test-dir "src/test"))
9617 `(("junit" ,java-junit)))
9618 (home-page "https://github.com/FasterXML/jackson-annotations")
9619 (synopsis "General purpose annotations for the Jackson Data Processor")
9620 (description "This package contains general purpose annotations for the
9621 Jackson Data Processor, used on value and handler types. The only annotations
9622 not included are ones that require dependency to the Databind package.")
9623 (license license:asl2.0)))
9625 (define-public java-fasterxml-jackson-core
9627 (name "java-fasterxml-jackson-core")
9631 (uri (string-append "https://github.com/FasterXML/"
9632 "jackson-core/archive/"
9633 "jackson-core-" version ".tar.gz"))
9636 "159hsnk17jr1gyzkf01cxvsn45srnk37g949r7364qlsr527gjgd"))))
9637 (build-system ant-build-system)
9639 `(#:jar-name "jackson-core.jar"
9640 #:source-dir "src/main/java"
9641 #:test-dir "src/test"
9644 ;; Expected failure. pom.xml excludes these
9646 ;; Base classes that have no constructor for junit
9648 "**/ConcurrencyReadTest.java"
9649 "**/ManualCharAccessTest.java"
9650 "**/ManualCharAccessTest.java"
9651 "**/TrailingCommasTest.java"
9652 "**/AsyncMissingValuesInObjectTest.java"
9653 "**/AsyncMissingValuesInArrayTest.java")
9655 (modify-phases %standard-phases
9656 (add-before 'configure 'generate-PackageVersion.java
9658 (let* ((out "src/main/java/com/fasterxml/jackson/core/json/PackageVersion.java")
9659 (in (string-append out ".in")))
9662 (("@package@") "com.fasterxml.jackson.core.json")
9663 (("@projectversion@") ,version)
9664 (("@projectgroupid@") "com.fasterxml.jackson.core")
9665 (("@projectartifactid@") "jackson-core")))
9667 (add-before 'build 'copy-resources
9669 (copy-recursively "src/main/resources"
9672 (add-before 'check 'copy-test-resources
9674 (copy-recursively "src/test/resources"
9675 "build/test-classes")
9678 `(("junit" ,java-junit)
9679 ("hamcrest" ,java-hamcrest-core)))
9680 (home-page "https://github.com/FasterXML/jackson-core")
9681 (synopsis "Low-level streaming parser and generator abstractions")
9682 (description "This package contains core low-level incremental
9683 (streaming) parser and generator abstractions used by the Jackson Data
9684 Processor. It also includes the default implementation of handler types
9685 (parser, generator) that handle JSON format.")
9686 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
9688 (define-public java-fasterxml-jackson-databind
9690 (name "java-fasterxml-jackson-databind")
9694 (uri (string-append "https://github.com/FasterXML/"
9695 "jackson-databind/archive/"
9696 "jackson-databind-" version ".tar.gz"))
9699 "1zd2cw4z6kdkbx8za96xh9pyicv2a2l7y0rkcx2fqd8hv6d47s08"))))
9700 (build-system ant-build-system)
9702 `(#:jar-name "jackson-databind.jar"
9703 #:source-dir "src/main/java"
9704 #:tests? #f; requires javax.measures for which I can't find a free implementation
9706 (modify-phases %standard-phases
9707 (add-before 'configure 'generate-PackageVersion.java
9709 (let* ((out "src/main/java/com/fasterxml/jackson/databind/cfg/PackageVersion.java")
9710 (in (string-append out ".in")))
9713 (("@package@") "com.fasterxml.jackson.databind.cfg")
9714 (("@projectversion@") ,version)
9715 (("@projectgroupid@") "com.fasterxml.jackson.databind")
9716 (("@projectartifactid@") "jackson-databind")))
9718 (add-before 'build 'copy-resources
9720 (copy-recursively "src/main/resources" "build/classes")
9723 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
9724 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)))
9725 (home-page "https://github.com/FasterXML/jackson-databind")
9726 (synopsis "Data-binding functionality and tree-model for the Jackson Data Processor")
9727 (description "This package contains the general-purpose data-binding
9728 functionality and tree-model for Jackson Data Processor. It builds on core
9729 streaming parser/generator package, and uses Jackson Annotations for
9731 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
9733 (define-public java-fasterxml-jackson-modules-base-jaxb
9735 (name "java-fasterxml-jackson-modules-base-jaxb")
9739 (uri (string-append "https://github.com/FasterXML/"
9740 "jackson-modules-base/archive/"
9741 "jackson-modules-base-" version ".tar.gz"))
9744 "1wws95xi8sppp6b0k2vvjdjyynl20r1a4dwrhai08lzlria6blp5"))))
9745 (build-system ant-build-system)
9747 `(#:jar-name "jackson-modules-base-jaxb.jar"
9748 #:source-dir "jaxb/src/main/java"
9749 #:test-dir "jaxb/src/test"
9751 ;; Base class for tests
9752 (list "**/BaseJaxbTest.java")
9754 (modify-phases %standard-phases
9755 (add-before 'configure 'generate-PackageVersion.java
9757 (let* ((out (string-append "jaxb/src/main/java/com/fasterxml/"
9758 "jackson/module/jaxb/PackageVersion.java"))
9759 (in (string-append out ".in")))
9762 (("@package@") "com.fasterxml.jackson.module.jaxb")
9763 (("@projectversion@") ,version)
9764 (("@projectgroupid@") "com.fasterxml.jackson.module.jaxb")
9765 (("@projectartifactid@") "jackson-module-jaxb")))
9767 (add-before 'build 'copy-resources
9769 (copy-recursively "jaxb/src/main/resources" "build/classes")
9772 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
9773 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
9774 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)))
9776 `(("java-junit" ,java-junit)))
9777 (home-page "https://github.com/FasterXML/jackson-modules-base")
9778 (synopsis "Jaxb annotations jackson module")
9779 (description "This package is the jaxb annotations module for jackson.")
9780 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
9782 (define-public java-fasterxml-jackson-modules-base-mrbean
9784 (name "java-fasterxml-jackson-modules-base-mrbean")
9788 (uri (string-append "https://github.com/FasterXML/"
9789 "jackson-modules-base/archive/"
9790 "jackson-modules-base-" version ".tar.gz"))
9793 "1wws95xi8sppp6b0k2vvjdjyynl20r1a4dwrhai08lzlria6blp5"))))
9794 (build-system ant-build-system)
9796 `(#:jar-name "jackson-modules-base-mrbean.jar"
9797 #:source-dir "mrbean/src/main/java"
9798 #:test-dir "mrbean/src/test"
9800 ;; Base class for tests
9801 (list "**/BaseTest.java")
9803 (modify-phases %standard-phases
9804 (add-before 'configure 'generate-PackageVersion.java
9806 (let* ((out (string-append "mrbean/src/main/java/com/fasterxml/"
9807 "jackson/module/mrbean/PackageVersion.java"))
9808 (in (string-append out ".in")))
9811 (("@package@") "com.fasterxml.jackson.module.mrbean")
9812 (("@projectversion@") ,version)
9813 (("@projectgroupid@") "com.fasterxml.jackson.module.mrbean")
9814 (("@projectartifactid@") "jackson-module-mrbean")))
9817 `(("java-asm" ,java-asm)
9818 ("java-fasterxml-jackson-annotations"
9819 ,java-fasterxml-jackson-annotations)
9820 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
9821 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)))
9823 `(("java-junit" ,java-junit)))
9824 (home-page "https://github.com/FasterXML/jackson-modules-base")
9825 (synopsis "POJO type materialization for Java")
9826 (description "This package implements POJO type materialization.
9827 Databinders can construct implementation classes for Java interfaces as part
9828 of deserialization.")
9829 (license license:asl2.0)))
9831 (define-public java-snakeyaml
9833 (name "java-snakeyaml")
9837 (uri (string-append "https://bitbucket.org/asomov/snakeyaml/get/v"
9839 (file-name (string-append name "-" version ".tar.gz"))
9842 "0474cqcv46zgv9bhms2vgawakq1vyj0hp3h3f1bfys46msia90bh"))))
9843 (build-system ant-build-system)
9845 `(#:jar-name "java-snakeyaml.jar"
9846 #:source-dir "src/main/java"
9847 ;; Tests require velocity, a cyclic dependency, and
9848 ;; java-spring-framework-context which is not packaged.
9850 (home-page "https://bitbucket.org/asomov/snakeyaml")
9851 (synopsis "YAML processor")
9852 (description "SnakeYAML is a YAML processor for the Java Virtual Machine.")
9853 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
9855 (define-public java-fasterxml-jackson-dataformat-yaml
9857 (name "java-fasterxml-jackson-dataformat-yaml")
9861 (uri (string-append "https://github.com/FasterXML/"
9862 "jackson-dataformats-text/archive/"
9863 "jackson-dataformats-text-" version ".tar.gz"))
9866 "1hikl06khaxbg439avf442qifcadap8w0lx13f0nnhp2vh3dkbz7"))))
9867 (build-system ant-build-system)
9869 `(#:jar-name "jackson-dataformat-yaml.jar"
9870 #:source-dir "yaml/src/main/java"
9871 #:test-dir "yaml/src/test"
9872 #:test-exclude (list "**/failing/**.java")
9874 (modify-phases %standard-phases
9875 (add-before 'configure 'generate-PackageVersion.java
9877 (let* ((out "yaml/src/main/java/com/fasterxml/jackson/dataformat/yaml/PackageVersion.java")
9878 (in (string-append out ".in")))
9881 (("@package@") "com.fasterxml.jackson.dataformat.yaml")
9882 (("@projectversion@") ,version)
9883 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.yaml")
9884 (("@projectartifactid@") "jackson-dataformat-yaml")))
9887 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
9888 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
9889 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)
9890 ("java-snakeyaml" ,java-snakeyaml)))
9892 `(("junit" ,java-junit)
9893 ("hamcrest" ,java-hamcrest-core)
9894 ("java-ops4j-pax-exam-core-spi" ,java-ops4j-pax-exam-core-spi)
9895 ("java-ops4j-pax-exam-core-junit" ,java-ops4j-pax-exam-core-junit)
9896 ("java-ops4j-pax-exam" ,java-ops4j-pax-exam-core)))
9897 (home-page "https://github.com/FasterXML/jackson-dataformats-text")
9898 (synopsis "Yaml backend for Jackson")
9899 (description "Dataformat backends are used to support format alternatives
9900 to JSON, supported by default. This is done by sub-classing Jackson core
9902 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
9904 (define-public java-stax2-api
9906 (name "java-stax2-api")
9910 (uri (string-append "https://github.com/FasterXML/stax2-api/archive/"
9911 "stax2-api-" version ".tar.gz"))
9914 "1amc1si0l0hyyw2sawmnzy4hkna3z6fp195y4nm5m9wb9ld5awkq"))))
9915 (build-system ant-build-system)
9917 `(#:jar-name "java-stax2-api.jar"
9918 #:source-dir "src/main/java"
9919 #:tests? #f)); no tests
9920 (home-page "https://github.com/FasterXML/stax2-api")
9921 (synopsis "Stax2 API")
9922 (description "Stax2 API is an extension to basic Stax 1.0 API that adds
9923 significant new functionalities, such as full-featured bi-direction validation
9924 interface and high-performance Typed Access API.")
9925 (license license:bsd-2)))
9927 (define-public java-woodstox-core
9929 (name "java-woodstox-core")
9934 (url "https://github.com/FasterXML/woodstox")
9935 (commit (string-append "woodstox-core-" version))))
9936 (file-name (git-file-name name version))
9939 "0bfylk24a967hwxprxqbg6cdvm6n4ldcarp54yg980viwvjiglyp"))))
9940 (build-system ant-build-system)
9942 `(#:jar-name "woodstox.jar"
9944 (list "**/Base*.java" "failing/**")
9946 (modify-phases %standard-phases
9947 (add-before 'build 'remove-msv-dep
9949 ;; we don't need osgi, and it depends on msv
9950 (delete-file-recursively "src/main/java/com/ctc/wstx/osgi")
9951 ;; msv's latest release is from 2011 and we don't need it
9952 (delete-file-recursively "src/main/java/com/ctc/wstx/msv")
9953 (delete-file-recursively "src/test/java/wstxtest/osgi")
9954 (delete-file-recursively "src/test/java/wstxtest/msv")
9956 (add-before 'build 'copy-resources
9958 (copy-recursively "src/main/resources" "build/classes")
9961 `(("stax2" ,java-stax2-api)))
9963 `(("junit" ,java-junit)))
9964 (home-page "https://github.com/FasterXML/woodstox")
9965 (synopsis "Stax XML API implementation")
9966 (description "Woodstox is a stax XML API implementation.")
9967 (license license:asl2.0)))
9969 (define-public java-fasterxml-jackson-dataformat-xml
9971 (name "java-fasterxml-jackson-dataformat-xml")
9976 (url "https://github.com/FasterXML/jackson-dataformat-xml")
9977 (commit (string-append "jackson-dataformat-xml-" version))))
9978 (file-name (git-file-name name version))
9981 "0s1wl65mbs57c2hz2v8rnh8i04y5lpyyvnjz562j5j6b83vwwpfx"))))
9982 (build-system ant-build-system)
9984 `(#:jar-name "jackson-dataformat-xml.jar"
9985 #:source-dir "src/main/java"
9987 (list "**/failing/**")
9989 (modify-phases %standard-phases
9990 (add-before 'configure 'generate-PackageVersion.java
9992 (let* ((out "src/main/java/com/fasterxml/jackson/dataformat/xml/PackageVersion.java")
9993 (in (string-append out ".in")))
9997 (("@package@") "com.fasterxml.jackson.dataformat.xml")
9998 (("@projectversion@") ,version)
9999 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.xml")
10000 (("@projectartifactid@") "jackson-dataformat-xml")))
10002 (add-before 'build 'copy-resources
10004 (copy-recursively "src/main/resources" "build/classes")
10007 `(("jackson-annotations" ,java-fasterxml-jackson-annotations)
10008 ("jackson-core" ,java-fasterxml-jackson-core)
10009 ("jackson-modules-base-jaxb" ,java-fasterxml-jackson-modules-base-jaxb)
10010 ("jackson-databind" ,java-fasterxml-jackson-databind)
10011 ("stax2-api" ,java-stax2-api)
10012 ("woodstox" ,java-woodstox-core)))
10014 `(("junit" ,java-junit)
10015 ("hamcrest" ,java-hamcrest-core)))
10016 (home-page "https://github.com/FasterXML/jackson-dataformat-xml")
10017 (synopsis "Read and write XML")
10018 (description "This package contains Jackson extension component for reading
10019 and writing XML encoded data.
10021 Further, the goal is to emulate how JAXB data-binding works with \"Code-first\"
10022 approach (that is, no support is added for \"Schema-first\" approach). Support
10023 for JAXB annotations is provided by JAXB annotation module; this module
10024 provides low-level abstractions (@code{JsonParser}, @code{JsonGenerator},
10025 @code{JsonFactory}) as well as small number of higher level overrides needed to
10026 make data-binding work.")
10027 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
10029 (define-public java-hdrhistogram
10031 (name "java-hdrhistogram")
10035 (uri (git-reference
10036 (url "https://github.com/HdrHistogram/HdrHistogram")
10037 (commit (string-append "HdrHistogram-" version))))
10038 (file-name (git-file-name name version))
10041 "1cw8aa1vk258k42xs6wpy72m4gbai540jq032qsa7c5586iawx2d"))))
10042 (build-system ant-build-system)
10044 `(#:jar-name "java-hdrhistogram.jar"
10045 #:source-dir "src/main/java"
10047 (modify-phases %standard-phases
10048 (add-after 'unpack 'make-files-writable
10050 (for-each make-file-writable (find-files "."))
10052 (add-before 'configure 'set-version
10054 (let* ((version-java "src/main/java/org/HdrHistogram/Version.java")
10055 (template (string-append version-java ".template")))
10056 (copy-file template version-java)
10057 (substitute* version-java
10058 (("\\$VERSION\\$") ,version)
10059 (("\\$BUILD_TIME\\$") "0"))
10062 `(("junit" ,java-junit)
10063 ("hamcrest" ,java-hamcrest-core)))
10064 (home-page "https://hdrhistogram.github.io/HdrHistogram")
10065 (synopsis "High dynamic range histogram")
10066 (description "Hdrhistogram creates histograms that support
10067 recording and analyzing sampled data value counts across a configurable integer
10068 value range with configurable value precision within the range. Value precision
10069 is expressed as the number of significant digits in the value recording, and
10070 provides control over value quantization behavior across the value range and
10071 the subsequent value resolution at any given level.")
10072 (license license:public-domain)))
10074 (define-public java-cofoja
10076 (name "java-cofoja")
10080 (uri (git-reference
10081 (url "https://github.com/nhatminhle/cofoja")
10082 (commit (string-append "v" version))))
10083 (file-name (string-append "java-cofoja-" version "-checkout"))
10086 "0p7sz8y5xgpi5rx1qwn6587fkd52qr3ha3ybh14gqcyxhikl525w"))))
10087 (build-system ant-build-system)
10089 `(#:build-target "dist"
10090 #:test-target "test"
10093 (list "-Ddist.dir=dist")
10094 #:modules ((guix build ant-build-system)
10095 (guix build java-utils)
10100 (modify-phases %standard-phases
10101 ;; The bulid system ignores the class path the ant-build-system sets
10102 ;; up and instead expects to find all dependencies in the "lib"
10104 (add-after 'unpack 'create-libdir
10105 (lambda* (#:key inputs #:allow-other-keys)
10109 (let ((target (string-append "lib/" (basename file))))
10110 (unless (file-exists? target)
10111 (symlink file target))))
10112 (append-map (match-lambda
10114 (find-files dir "\\.jar$")))
10117 (replace 'install (install-jars "dist")))))
10119 `(("java-asm" ,java-asm)))
10121 `(("java-junit" ,java-junit)))
10122 (home-page "https://github.com/nhatminhle/cofoja")
10123 (synopsis "Contracts for Java")
10124 (description "Contracts for Java, or Cofoja for short, is a contract
10125 programming framework and test tool for Java, which uses annotation processing
10126 and bytecode instrumentation to provide run-time checking. (In particular,
10127 this is not a static analysis tool.)")
10128 (license license:lgpl3+)))
10130 (define-public java-aopalliance
10132 (name "java-aopalliance")
10136 ;; Note: this git repository is not official, but contains the
10137 ;; source code that is in the CVS repository. Downloading the
10138 ;; tarball from sourceforge is undeterministic, and the cvs download
10140 (uri (git-reference
10141 (url "https://github.com/hoverruan/aopalliance")
10142 (commit "0d7757ae204e5876f69431421fe9bc2a4f01e8a0")))
10143 (file-name (string-append name "-" version))
10146 "0rsg2b0v3hxlq2yk1i3m2gw3xwq689j3cwx9wbxvqfpdcjbca0qr"))))
10147 (build-system ant-build-system)
10149 `(#:jar-name "java-aopalliance.jar"
10151 #:tests? #f; no tests
10152 #:source-dir "aopalliance/src/main"
10153 #:modules ((guix build ant-build-system)
10155 (guix build maven pom)
10156 (guix build java-utils)
10159 (modify-phases %standard-phases
10160 (add-before 'install 'create-pom
10162 (with-output-to-file "pom.xml"
10166 (modelVersion "4.0.0")
10167 (name "aopalliance")
10168 (groupId "aopalliance")
10169 (artifactId "aopalliance")
10170 (version "1.0"))))))
10173 (install-from-pom "pom.xml")))))
10174 (home-page "http://aopalliance.sourceforge.net")
10175 (synopsis "Aspect-Oriented Programming")
10176 (description "The AOP Alliance project is a joint project between several
10177 software engineering people who are interested in Aspect-Oriented Programming
10179 (license license:public-domain)))
10181 (define-public java-javax-inject
10183 (name "java-javax-inject")
10187 (uri (git-reference
10188 (url "https://github.com/javax-inject/javax-inject")
10190 (file-name (git-file-name name version))
10193 "1rspl0nkvk1jif6nccikw93xic6ljj2b6kpy2mffwi2mnvc13j7x"))))
10194 (build-system ant-build-system)
10196 `(#:jar-name "java-javax-inject.jar"
10197 #:tests? #f; no tests
10199 (modify-phases %standard-phases
10201 (install-from-pom "pom.xml")))))
10202 (home-page "https://github.com/javax-inject/javax-inject")
10203 (synopsis "JSR-330: Dependency Injection for Java")
10204 (description "This package specifies a means for obtaining objects in such
10205 a way as to maximize reusability, testability and maintainability compared to
10206 traditional approaches such as constructors, factories, and service locators
10207 (e.g., JNDI). This process, known as dependency injection, is beneficial to
10208 most nontrivial applications.
10210 Many types depend on other types. For example, a @var{Stopwatch} might depend
10211 on a @var{TimeSource}. The types on which a type depends are known as its
10212 dependencies. The process of finding an instance of a dependency to use at run
10213 time is known as resolving the dependency. If no such instance can be found,
10214 the dependency is said to be unsatisfied, and the application is broken.")
10215 (license license:asl2.0)))
10217 (define-public java-guice
10219 (name "java-guice")
10223 (uri (git-reference
10224 (url "https://github.com/google/guice")
10226 (file-name (git-file-name name version))
10227 (modules '((guix build utils)))
10230 (for-each delete-file (find-files "." ".*.jar")) #t))
10233 "18im5hdfl4q1b9chww2s1ii60sn3ydyyar32a2sf2p2g8zlbdswq"))))
10234 (build-system ant-build-system)
10236 `(#:jar-name "java-guice.jar"
10238 #:tests? #f; FIXME: tests are not in a java sub directory
10239 #:source-dir "core/src"
10241 (modify-phases %standard-phases
10242 (add-after 'unpack 'make-files-writable
10244 (for-each make-file-writable (find-files "."))
10247 (install-from-pom "core/pom.xml")))))
10249 `(("java-aopalliance" ,java-aopalliance)
10250 ("java-asm" ,java-asm)
10251 ("java-cglib" ,java-cglib)
10252 ("java-guava" ,java-guava)
10253 ("java-javax-inject" ,java-javax-inject)
10254 ("java-guice-parent-pom" ,java-guice-parent-pom)))
10255 (home-page "https://github.com/google/guice")
10256 (synopsis "Lightweight dependency injection framework")
10257 (description "Guice is a lightweight dependency injection framework for
10258 Java 6 and above.")
10259 (license license:asl2.0)))
10261 (define-public java-guice-servlet
10263 (inherit java-guice)
10264 (name "java-guice-servlet")
10266 `(#:jar-name "guice-servlet.jar"
10267 #:source-dir "extensions/servlet/src/"
10269 #:tests? #f ; FIXME: not in a java subdir
10271 (modify-phases %standard-phases
10272 (add-after 'unpack 'make-files-writable
10274 (for-each make-file-writable (find-files "."))
10277 `(("guice" ,java-guice)
10278 ("servlet" ,java-classpathx-servletapi)
10279 ,@(package-inputs java-guice)))))
10281 (define java-guice-parent-pom
10283 (inherit java-guice)
10284 (name "java-guice-parent-pom")
10288 (modify-phases %standard-phases
10289 (delete 'configure)
10291 (add-after 'install 'install-extensions
10292 (install-pom-file "extensions/pom.xml"))
10294 (install-pom-file "pom.xml")))))
10296 `(("java-google-parent-pom" ,java-google-parent-pom-5)))))
10298 (define java-google-parent-pom-5
10300 (name "java-google-parent-pom")
10304 (uri (git-reference
10305 (url "https://github.com/google/google-maven-parents")
10306 (commit (string-append "google-" version))))
10307 (file-name (git-file-name name version))
10310 "0zb7hx24p8k8rfdvix2vsbfqn73jhrycdndvhf8j5gbii9wbqibv"))))
10311 (build-system ant-build-system)
10315 (modify-phases %standard-phases
10316 (delete 'configure)
10319 (install-pom-file "pom.xml")))))
10320 (home-page "https://github.com/google/google-maven-parents")
10321 (synopsis "Google parent pom")
10322 (description "This package contains the Maven parent POM for other Google
10324 (license license:asl2.0)))
10326 (define-public java-assertj
10328 (name "java-assertj")
10332 (uri (git-reference
10333 (url "https://github.com/joel-costigliola/assertj-core")
10334 (commit (string-append "assertj-core-" version))))
10335 (file-name (git-file-name name version))
10338 "1k35cg2in7pzk4pbdjryr0pll5lgk1r6ngrn0j8cdlgi7w8zh2d1"))))
10339 (build-system ant-build-system)
10341 `(#:jar-name "java-assertj.jar"
10343 #:source-dir "src/main/java"
10344 #:tests? #f)); depends on tng-junit which depends on assertj
10346 `(("cglib" ,java-cglib)
10347 ("junit" ,java-junit)
10348 ("hamcrest" ,java-hamcrest-core)))
10350 `(("mockito" ,java-mockito-1)))
10351 (home-page "https://joel-costigliola.github.io/assertj/index.html")
10352 (synopsis "Fluent assertions for java")
10353 (description "AssertJ core is a Java library that provides a fluent
10354 interface for writing assertions. Its main goal is to improve test code
10355 readability and make maintenance of tests easier.")
10356 (license license:asl2.0)))
10358 (define-public java-jboss-javassist
10360 (name "java-jboss-javassist")
10364 (uri (git-reference
10365 (url "https://github.com/jboss-javassist/javassist")
10367 (string-append "rel_"
10369 (lambda (x) (if (eq? x #\.) #\_ x)) version)
10371 (file-name (git-file-name name version))
10374 "0h3zlcyqiaq01fspm69h7vki67raw305w89p4ha8vlhpzw02qifm"))
10375 (modules '((guix build utils)))
10378 (delete-file "javassist.jar")))))
10379 (build-system ant-build-system)
10381 `(#:jar-name "java-jboss-javassist.jar"
10383 #:source-dir "src/main"
10384 #:tests? #f; FIXME: requires junit-awtui and junit-swingui from junit3
10386 (modify-phases %standard-phases
10387 (add-after 'unpack 'make-files-writable
10389 (for-each make-file-writable (find-files "."))
10392 `(("junit" ,java-junit)))
10393 (home-page "https://github.com/jboss-javassist/javassist")
10394 (synopsis "Java bytecode engineering toolkit")
10395 (description "Javassist (JAVA programming ASSISTant) makes Java bytecode
10396 manipulation simple. It is a class library for editing bytecodes in Java; it
10397 enables Java programs to define a new class at runtime and to modify a class
10398 file when the JVM loads it.")
10399 (license (list license:gpl2 license:cddl1.0)))); either gpl2 only or cddl.
10401 (define-public java-jcommander
10403 (name "java-jcommander")
10407 (uri (git-reference
10408 (url "https://github.com/cbeust/jcommander")
10410 (file-name (git-file-name name version))
10413 "12vcpc19sd7jhvjgp7xz1qjanfix162xb3x2q5zah93rjklj1h57"))))
10414 (build-system ant-build-system)
10416 `(#:jar-name "java-jcommander.jar"
10418 #:tests? #f; requires testng which depends on jcommander
10419 #:source-dir "src/main/java"))
10420 (home-page "https://jcommander.org")
10421 (synopsis "Command line parameters parser")
10422 (description "JCommander is a very small Java framework that makes it
10423 trivial to parse command line parameters. Parameters are declared with
10425 (license license:asl2.0)))
10427 (define-public java-bsh
10433 (uri (git-reference
10434 (url "https://github.com/beanshell/beanshell")
10436 (file-name (git-file-name name version))
10439 "0kz3f0xjack6c9syssi4qjw1rbd3q5963sk5pmr143hiibxa9csw"))
10440 (modules '((guix build utils)))
10443 ;; Delete bundled third-party jar archives.
10444 (for-each delete-file (find-files "." ".*.jar$"))
10445 (for-each (lambda (file) (chmod file #o644))
10446 (find-files "." "."))
10448 (build-system ant-build-system)
10450 `(#:build-target "jarall"
10451 #:test-target "junit-tests-all"
10452 #:make-flags (list "-DDATE" "(no date for reproducibility)")
10454 (modify-phases %standard-phases
10455 (add-before 'install 'fix-pom
10457 (substitute* "pom.xml"
10458 (("org.apache-extras.beanshell") "org.beanshell"))
10461 (install-from-pom "pom.xml")))))
10463 `(("java-classpathx-servletapi" ,java-classpathx-servletapi)
10464 ("java-commons-bsf" ,java-commons-bsf)))
10466 `(("java-junit" ,java-junit)
10467 ("javacc" ,javacc-3)))
10468 (home-page "http://beanshell.org/")
10469 (synopsis "Lightweight Scripting for Java")
10470 (description "BeanShell is a small, free, embeddable Java source
10471 interpreter with object scripting language features, written in Java.
10472 BeanShell dynamically executes standard Java syntax and extends it with common
10473 scripting conveniences such as loose types, commands, and method closures like
10474 those in Perl and JavaScript.")
10475 (license license:asl2.0)))
10477 (define-public java-fest-util
10479 (name "java-fest-util")
10483 (uri (git-reference
10484 (url "https://github.com/alexruiz/fest-util/")
10485 (commit (string-append "fest-util-" version))))
10486 (file-name (git-file-name name version))
10489 "02kgal7v85snyyvcsxvn4qphid455f4smh2wri1il8d9asw0djbz"))))
10490 (build-system ant-build-system)
10492 `(#:jar-name "java-fest-util.jar"
10493 #:source-dir "src/main/java"))
10495 `(("junit" ,java-junit)
10496 ("hamcrest" ,java-hamcrest-core)))
10497 (home-page "https://github.com/alexruiz/fest-util")
10498 (synopsis "FEST common utilities")
10499 (description "Common utilities used in all FEST module.")
10500 (license license:asl2.0)))
10502 (define-public java-fest-test
10504 (name "java-fest-test")
10508 (uri (git-reference
10509 (url "https://github.com/alexruiz/fest-test/")
10510 (commit (string-append "fest-test-" version))))
10511 (file-name (git-file-name name version))
10514 "0mg1d2jfh7kbx2c40dchbjr6d8pv59snsyb13mfxsr7xk5n69qbn"))))
10515 (build-system ant-build-system)
10517 `(#:jar-name "java-fest-test.jar"
10518 #:source-dir "src/main/java"
10519 #:tests? #f)); no tests
10521 `(("junit" ,java-junit)))
10522 (home-page "https://github.com/alexruiz/fest-test")
10523 (synopsis "Common FEST testing infrastructure")
10524 (description "Fest-test contains the common FEST testing infrastructure.")
10525 (license license:asl2.0)))
10527 (define-public java-fest-assert
10529 (name "java-fest-assert")
10533 (uri (git-reference
10534 (url "https://github.com/alexruiz/fest-assert-2.x/")
10535 (commit (string-append "fest-assert-core-" version))))
10536 (file-name (git-file-name name version))
10539 "1cp8zzyag3s85fz2w68sda9zzaal1y5f9wl8g72wkm12an40w6by"))))
10540 (build-system ant-build-system)
10542 `(#:jar-name "java-fest-assert.jar"
10543 #:source-dir "src/main/java"
10546 "**/Abstract*.java"
10547 "**/*BaseTest.java"
10548 ;; Unable to set MockitoNamingPolicy on cglib generator which creates FastClasses
10549 "**/MessageFormatter_format_Test.java"
10550 "**/internal/*/*_assert*_Test.java")))
10552 `(("java-fest-util" ,java-fest-util)))
10554 `(("java-junit" ,java-junit)
10555 ("java-fest-test" ,java-fest-test)
10556 ("java-hamcrest-core" ,java-hamcrest-core)
10557 ("java-mockito" ,java-mockito-1)
10558 ("java-cglib" ,java-cglib)
10559 ("java-objenesis" ,java-objenesis)
10560 ("java-asm" ,java-asm)))
10561 (home-page "https://github.com/alexruiz/fest-assert-2.x")
10562 (synopsis "FEST fluent assertions")
10563 (description "FEST-Assert provides a fluent interface for assertions.")
10564 (license license:asl2.0)))
10566 (define-public java-testng
10568 (name "java-testng")
10572 (uri (git-reference
10573 (url "https://github.com/cbeust/testng")
10575 (file-name (string-append name "-" version "-checkout"))
10578 "0y6vq30i5g276kw0v2bhbvci22ijg7ax49ap2611yqlhbs4d6dqv"))))
10579 (build-system ant-build-system)
10581 `(#:jdk ,icedtea-8; java.util.function
10582 #:jar-name "java-testng.jar"
10583 #:source-dir "src/main/java"
10585 (modify-phases %standard-phases
10586 ;; FIXME: I don't know why these tests fail
10587 (add-after 'unpack 'delete-failing-tests
10589 (substitute* "src/test/resources/testng.xml"
10590 (("<class name=\"test.configuration.github1625.TestRunnerIssue1625\"/>") "")
10591 (("<class name=\"test.serviceloader.ServiceLoaderTest\" />") ""))
10593 ;; We don't have groovy
10594 (add-after 'unpack 'delete-groovy-tests
10596 (delete-file-recursively "src/test/java/test/dependent/issue1648/")
10597 (substitute* "src/test/resources/testng.xml"
10598 (("<class name=\"test.dependent.issue1648.TestRunner\"/>") ""))
10600 (add-before 'build 'copy-resources
10602 (copy-recursively "src/main/resources" "build/classes")
10604 (add-before 'check 'copy-test-resources
10606 (copy-recursively "src/test/resources" "build/test-classes")
10610 (invoke "ant" "compile-tests")
10611 ;; we don't have groovy
10612 (substitute* "src/test/resources/testng.xml"
10613 (("<class name=\"test.groovy.GroovyTest\" />") ""))
10614 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
10616 ":build/test-classes")
10617 "-Dtest.resources.dir=src/test/resources"
10618 "org.testng.TestNG" "src/test/resources/testng.xml"))))))
10620 `(("junit" ,java-junit)
10621 ("java-jsr305" ,java-jsr305)
10622 ("java-bsh" ,java-bsh)
10623 ("java-jcommander" ,java-jcommander)
10624 ("java-guice" ,java-guice)
10625 ("snakeyaml" ,java-snakeyaml)))
10627 `(("guava" ,java-guava)
10628 ("java-javax-inject" ,java-javax-inject)
10629 ("java-hamcrest" ,java-hamcrest-all)
10630 ("java-assertj" ,java-assertj)
10631 ("java-mockito" ,java-mockito-1)
10632 ("cglib" ,java-cglib)
10634 ("aopalliance" ,java-aopalliance)))
10635 (home-page "https://testng.org")
10636 (synopsis "Testing framework")
10637 (description "TestNG is a testing framework inspired from JUnit and NUnit
10638 but introducing some new functionalities that make it more powerful and easier
10640 (license license:asl2.0)))
10642 (define-public java-jnacl
10643 (let ((commit "094e819afdd63ea81a499b3bcb42a271006bebd9")
10646 (name "java-jnacl")
10647 (version (string-append "0.1.0-" revision "." (string-take commit 7)))
10650 (uri (git-reference
10651 (url "https://github.com/neilalexander/jnacl")
10653 (file-name (git-file-name name version))
10656 "1d6g6xhn83byv5943n7935wwjsk0ibk0qdvqgr699qqgqqmwisbb"))))
10657 (build-system ant-build-system)
10659 `(#:jar-name "jnacl.jar"
10660 #:source-dir "src/main/java"
10663 (modify-phases %standard-phases
10664 (add-before 'build 'fix-tests
10666 (substitute* '("src/test/java/com/neilalexander/jnacl/NaClTest.java"
10667 "src/test/java/com/neilalexander/jnacl/NaclSecretBoxTest.java")
10668 (("assertions.Assertions") "assertions.api.Assertions"))
10672 (invoke "ant" "compile-tests")
10673 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
10675 ":build/test-classes")
10676 "org.testng.TestNG" "-testclass"
10677 "build/test-classes/com/neilalexander/jnacl/NaclSecretBoxTest.class")
10678 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
10680 ":build/test-classes")
10681 "org.testng.TestNG" "-testclass"
10682 "build/test-classes/com/neilalexander/jnacl/NaClTest.class"))))))
10684 `(("java-testng" ,java-testng)
10685 ("java-fest-util" ,java-fest-util)
10686 ("java-fest-assert" ,java-fest-assert)))
10687 (home-page "https://github.com/neilalexander/jnacl")
10688 (synopsis "Java implementation of NaCl")
10689 (description "Pure Java implementation of the NaCl: Networking and
10690 Cryptography library.")
10691 (license license:bsd-2))))
10693 (define-public java-mvel2
10695 (name "java-mvel2")
10699 (uri (string-append "https://github.com/mvel/mvel/archive/mvel2-"
10700 version ".Final.tar.gz"))
10703 "01ph5s9gm16l2qz58lg21w6fna7xmmrj7f9bzqr1jim7h9557d3z"))))
10704 (build-system ant-build-system)
10706 `(#:jar-name "mvel2.jar"
10707 #:source-dir "src/main/java"
10709 (list "**/Abstract*.java"
10710 ;; Base class with no tests
10711 "**/MVELThreadTest.java")
10713 (modify-phases %standard-phases
10714 (add-after 'install 'install-bin
10715 (lambda* (#:key outputs #:allow-other-keys)
10716 (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
10718 (with-output-to-file (string-append bin "/mvel2")
10722 "#!" (which "bash") "\n"
10723 "if [ \"$#\" -ne \"2\" ]; then\n"
10724 "echo 'Usage: mvel2 <script> <out.dir>'\n"
10727 "java -Dout.dir=$2 -cp " (getenv "CLASSPATH")
10728 ":" (assoc-ref outputs "out") "/share/java/mvel2.jar"
10729 " org.mvel2.sh.Main $1"))))
10730 (chmod (string-append bin "/mvel2") #o755))
10733 `(("junit" ,java-junit)
10734 ("hamcrest" ,java-hamcrest-core)))
10735 (home-page "https://github.com/mvel/mvel")
10736 (synopsis "MVFLEX Expression Language")
10737 (description "MVEL has largely been inspired by Java syntax, but has some
10738 fundamental differences aimed at making it more efficient as an expression
10739 language, such as operators that directly support collection, array and string
10740 matching, as well as regular expressions. MVEL is used to evaluate expressions
10741 written using Java syntax.
10743 In addition to the expression language, MVEL serves as a templating language for
10744 configuration and string construction.")
10745 (license license:asl2.0)))
10747 (define-public java-commons-jexl-2
10749 (name "java-commons-jexl")
10753 (uri (string-append "mirror://apache/commons/jexl/source/"
10754 "commons-jexl-" version "-src.tar.gz"))
10757 "1ai7632bwwaxglb0nbpblpr2jw5g20afrsaq372ipkphi3ncy1jz"))))
10758 (build-system ant-build-system)
10760 `(#:jar-name "commons-jexl-2.jar"
10762 #:source-dir "src/main/java"
10764 (modify-phases %standard-phases
10765 (add-before 'check 'disable-broken-tests
10766 (lambda* (#:key inputs #:allow-other-keys)
10767 (with-directory-excursion "src/test/java/org/apache/commons/jexl2/"
10768 (substitute* "ArithmeticTest.java"
10769 (("asserter.assertExpression\\(\"3 / 0\"") "//")
10770 (("asserter.assertExpression\\(\"imanull") "//"))
10771 ;; This test fails with "ambiguous method invocation"
10772 (delete-file "CacheTest.java")
10773 ;; This test doesn't have access to the temp directory
10774 (substitute* "ClassCreatorTest.java"
10775 (("java.io.tmpdir") "user.dir"))
10776 ;; This test fails in trying to detect whether it can run.
10777 (substitute* "ClassCreator.java"
10778 (("boolean canRun =.*") "boolean canRun = false;\n"))
10779 ;; ...and these tests depend on it.
10780 (delete-file "scripting/JexlScriptEngineOptionalTest.java")
10781 (delete-file "scripting/JexlScriptEngineTest.java"))
10783 (add-before 'build 'run-javacc
10785 (with-directory-excursion "src/main/java/org/apache/commons/jexl2/parser/"
10786 (invoke "java" "jjtree" "Parser.jjt")
10787 (invoke "java" "javacc" "Parser.jj"))
10790 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)))
10792 `(("java-junit" ,java-junit)
10793 ("java-hamcrest-core" ,java-hamcrest-core)
10794 ("javacc" ,javacc-4)))
10795 (home-page "https://commons.apache.org/proper/commons-jexl/")
10796 (synopsis "Java Expression Language ")
10797 (description "JEXL is a library intended to facilitate the implementation
10798 of dynamic and scripting features in applications and frameworks written in
10799 Java. JEXL implements an Expression Language based on some extensions to the
10800 JSTL Expression Language supporting most of the constructs seen in
10801 shell-script or ECMAScript. Its goal is to expose scripting features usable
10802 by technical operatives or consultants working with enterprise platforms.")
10803 (license license:asl2.0)))
10805 (define-public java-lz4
10811 (uri (git-reference
10812 (url "https://github.com/lz4/lz4-java")
10814 (file-name (git-file-name name version))
10817 "0ydjakhv3cz34mfvv14qrh2ksdxifgjwwagjy7r46qr3f68hnf6y"))))
10818 (build-system ant-build-system)
10820 `(#:jar-name "lz4.jar"
10822 #:source-dir "src/java:src/java-unsafe"
10823 #:tests? #f; FIXME: requires more dependencies
10825 (modify-phases %standard-phases
10826 (add-after 'unpack 'make-files-writable
10828 (for-each make-file-writable (find-files "."))
10830 (add-before 'configure 'generate-source
10832 (with-directory-excursion "src/build/source_templates"
10833 (invoke "mvel2" "../gen_sources.mvel" "../../java"))
10836 `(("mvel" ,java-mvel2)))
10837 (home-page "https://jpountz.github.io/lz4-java")
10838 (synopsis "Compression algorithm")
10839 (description "LZ4 - Java is a Java port of the popular lz4 compression
10840 algorithms and xxHash hashing algorithm.")
10841 (license license:asl2.0)))
10843 (define-public java-bouncycastle
10845 (name "java-bouncycastle")
10849 (uri (git-reference
10850 (url "http://git.bouncycastle.org/repositories/bc-java")
10851 ;(url "https://github.com/bcgit/bc-java")
10852 (commit (string-append "r1rv" (substring version 2 4)))))
10853 (file-name (git-file-name name version))
10856 "1m921a1ac2dl797ffzg3d4j97ch308f25spb4jgsj3npfmmys5gb"))
10857 (modules '((guix build utils)))
10860 (for-each delete-file
10861 (find-files "." "\\.jar$"))
10863 (build-system ant-build-system)
10868 (modify-phases %standard-phases
10871 (invoke "ant" "-f" "ant/jdk15+.xml" "build-provider")
10872 (invoke "ant" "-f" "ant/jdk15+.xml" "build")))
10873 ;; FIXME: the tests freeze.
10876 ;; (invoke "ant" "-f" "ant/jdk15+.xml" "test")))
10878 (install-jars "build/artifacts/jdk1.5/jars")))))
10880 `(("java-javax-mail" ,java-javax-mail)))
10883 ("junit" ,java-junit)
10884 ("java-native-access" ,java-native-access)
10885 ("java-native-access-platform" ,java-native-access-platform)))
10886 (home-page "https://www.bouncycastle.org")
10887 (synopsis "Cryptographic library")
10888 (description "Bouncy Castle is a cryptographic library for the Java
10889 programming language.")
10890 (license license:expat)))
10892 (define-public java-lmax-disruptor
10894 (name "java-lmax-disruptor")
10898 (uri (string-append "https://github.com/LMAX-Exchange/disruptor/"
10899 "archive/" version ".tar.gz"))
10900 (file-name (string-append name "-" version ".tar.gz"))
10903 "17da2gwj5abnlsfgn2xqjk5lgzbg4vkb0hdv2dvc8r2fx4bi7w3g"))))
10904 (build-system ant-build-system)
10906 `(#:jar-name "java-lmax-disruptor.jar"
10908 #:tests? #f)); tests hang
10910 `(("junit" ,java-junit)
10911 ("java-hdrhistogram" ,java-hdrhistogram)
10912 ("java-jmock" ,java-jmock)
10913 ("java-jmock-legacy" ,java-jmock-legacy)
10914 ("java-jmock-junit4" ,java-jmock-junit4)
10915 ("java-hamcrest-all" ,java-hamcrest-all)))
10917 `(("cglib" ,java-cglib)
10918 ("objenesis" ,java-objenesis)
10919 ("asm" ,java-asm)))
10920 (home-page "https://www.lmax.com/disruptor")
10921 (synopsis "High performance inter-thread communication")
10922 (description "LMAX Disruptor is a software pattern and software component
10923 for high performance inter-thread communication that avoids the need for
10924 message queues or resource locking.")
10925 (license license:asl2.0)))
10927 (define-public java-commons-bcel
10929 (name "java-commons-bcel")
10933 (uri (string-append "mirror://apache/commons/bcel/source/bcel-"
10934 version "-src.tar.gz"))
10937 "0j3x1rxd673k07psclk8k13rqh0x0mf2yy5qiwkiw4z3afa568jy"))))
10938 (build-system ant-build-system)
10940 `(#:jar-name "bcel.jar"
10942 #:source-dir "src/main/java"
10943 #:test-dir "src/test/java"
10944 ;; FIXME: Tests require the unpackaged jna.
10946 (home-page "https://commons.apache.org/proper/commons-bcel/")
10947 (synopsis "Byte code engineering library")
10948 (description "The Byte Code Engineering Library (Apache Commons BCEL) is
10949 intended to give users a convenient way to analyze, create, and
10950 manipulate (binary) Java class files. Classes are represented by objects
10951 which contain all the symbolic information of the given class: methods, fields
10952 and byte code instructions, in particular.
10954 Such objects can be read from an existing file, be transformed by a
10955 program (e.g. a class loader at run-time) and written to a file again. An
10956 even more interesting application is the creation of classes from scratch at
10957 run-time. The @dfn{Byte Code Engineering Library} (BCEL) may be also useful
10958 if you want to learn about the @dfn{Java Virtual Machine} (JVM) and the format
10959 of Java @code{.class} files.")
10960 (license license:asl2.0)))
10962 (define-public java-xerial-core
10964 (name "java-xerial-core")
10968 (uri (string-append "https://github.com/xerial/xerial-java/archive/"
10969 version ".tar.gz"))
10970 (file-name (string-append name "-" version ".tar.gz"))
10973 "0d3g863i41bgalpa4xr3vm1h140l091n8iwgq5qvby5yivns9y8d"))))
10974 (build-system ant-build-system)
10976 `(#:jar-name "xerial-core.jar"
10977 #:source-dir "xerial-core/src/main/java"
10978 #:test-dir "xerial-core/src/test"
10980 (modify-phases %standard-phases
10981 (add-before 'build 'copy-resources
10983 (copy-recursively "xerial-core/src/main/resources"
10987 `(("junit" ,java-junit)
10988 ("hamcrest" ,java-hamcrest-core)))
10989 (home-page "https://github.com/xerial/xerial-java")
10990 (synopsis "Data management libraries for Java")
10991 (description "Xerial is a set of data management libraries for the Java
10992 programming language. The ultimate goal of the Xerial project is to manage
10993 everything as database, including class objects, text format data, data
10995 (license license:asl2.0)))
10997 (define-public java-powermock-reflect
10999 (name "java-powermock-reflect")
11003 (uri (string-append "https://github.com/powermock/powermock/"
11004 "archive/powermock-" version ".tar.gz"))
11005 (file-name (string-append name "-" version ".tar.gz"))
11008 "0sbgi5vqq7k72wzcdjb20s370vyd4hsbnx71pzb8ishml3gy7fwy"))
11010 (search-patches "java-powermock-fix-java-files.patch"))))
11011 (build-system ant-build-system)
11013 `(#:jar-name "java-powermock-reflect.jar"
11015 #:source-dir "powermock-reflect/src/main/java"
11016 #:test-dir "powermock-reflect/src/test"))
11018 `(("java-objenesis" ,java-objenesis)))
11020 `(("junit" ,java-junit)
11021 ("cglib" ,java-cglib)
11023 ("hamcrest" ,java-hamcrest-core)
11024 ("assertj" ,java-assertj)))
11025 (home-page "https://github.com/powermock/powermock")
11026 (synopsis "Mock library extension framework")
11027 (description "PowerMock is a framework that extends other mock libraries
11028 such as EasyMock with more powerful capabilities. PowerMock uses a custom
11029 classloader and bytecode manipulation to enable mocking of static methods,
11030 constructors, final classes and methods, private methods, removal of static
11031 initializers and more. By using a custom classloader no changes need to be
11032 done to the IDE or continuous integration servers which simplifies adoption.")
11033 (license license:asl2.0)))
11035 (define-public java-powermock-core
11037 (inherit java-powermock-reflect)
11038 (name "java-powermock-core")
11040 `(#:jar-name "java-powermock-core.jar"
11041 #:source-dir "powermock-core/src/main/java"
11042 #:test-dir "powermock-core/src/test"
11043 #:tests? #f; requires powermock-api
11046 (modify-phases %standard-phases
11047 (add-before 'build 'copy-resources
11049 (copy-recursively "powermock-core/src/main/resources"
11053 `(("reflect" ,java-powermock-reflect)
11054 ("javassist" ,java-jboss-javassist)))
11056 `(("junit" ,java-junit)
11057 ("assertj" ,java-assertj)
11058 ("mockito" ,java-mockito-1)))))
11060 (define-public java-powermock-api-support
11062 (inherit java-powermock-reflect)
11063 (name "java-powermock-api-support")
11064 (build-system ant-build-system)
11066 `(#:jar-name "java-powermock-api-support.jar"
11068 #:source-dir "powermock-api/powermock-api-support/src/main/java"
11069 #:tests? #f)); no tests
11071 `(("core" ,java-powermock-core)
11072 ("reflect" ,java-powermock-reflect)))))
11074 (define-public java-powermock-modules-junit4-common
11076 (inherit java-powermock-reflect)
11077 (name "java-powermock-modules-junit4-common")
11078 (build-system ant-build-system)
11080 `(#:jar-name "java-powermock-modules-junit4-common.jar"
11082 #:source-dir "powermock-modules/powermock-module-junit4-common/src/main/java"
11083 #:test-dir "powermock-modules/powermock-module-junit4-common/src/test"))
11085 `(("core" ,java-powermock-core)
11086 ("easymock" ,java-easymock)
11087 ("reflect" ,java-powermock-reflect)
11088 ("hamcrest" ,java-hamcrest-core)
11089 ("cglib" ,java-cglib)))))
11091 (define-public java-powermock-modules-junit4
11093 (inherit java-powermock-reflect)
11094 (name "java-powermock-modules-junit4")
11095 (build-system ant-build-system)
11097 `(#:jar-name "java-powermock-modules-junit4.jar"
11099 #:source-dir "powermock-modules/powermock-module-junit4/src/main/java"
11100 #:test-dir "powermock-modules/powermock-module-junit4/src/test"
11102 (modify-phases %standard-phases
11103 (add-before 'build 'fix-junit-detection
11105 ;; Our junit version is 4.12-SNAPSHOT
11106 (substitute* (find-files "powermock-modules/powermock-module-junit4"
11107 "PowerMockJUnit4MethodValidator.java")
11108 (("4.12") "4.12-SNAPSHOT"))
11111 `(("core" ,java-powermock-core)
11112 ("reflect" ,java-powermock-reflect)
11113 ("common" ,java-powermock-modules-junit4-common)
11114 ("cglib" ,java-cglib)))
11116 `(("easymock" ,java-easymock)
11117 ("hamcrest" ,java-hamcrest-core)
11118 ("objenesis" ,java-objenesis)
11120 ("junit" ,java-junit)))))
11122 (define-public java-powermock-api-easymock
11124 (inherit java-powermock-reflect)
11125 (name "java-powermock-api-easymock")
11126 (build-system ant-build-system)
11128 `(#:jar-name "java-powermock-api-easymock.jar"
11130 #:source-dir "powermock-api/powermock-api-easymock/src/main/java"
11131 #:tests? #f; no tests
11133 (modify-phases %standard-phases
11134 (add-before 'build 'fix-file
11136 ;; FIXME: This looks wrong, but it fixes a build error.
11137 (with-directory-excursion "powermock-api/powermock-api-easymock"
11138 (substitute* "src/main/java/org/powermock/api/easymock/PowerMock.java"
11139 (("classLoader instanceof MockClassLoader") "false")
11140 (("\\(\\(MockClassLoader\\) classLoader\\).*;") ";")))
11143 `(("core" ,java-powermock-core)
11144 ("easymock" ,java-easymock)
11145 ("reflect" ,java-powermock-reflect)
11146 ("support" ,java-powermock-api-support)
11147 ("cglib" ,java-cglib)))))
11149 (define-public java-jboss-jms-api-spec
11151 (name "java-jboss-jms-api-spec")
11155 (uri (string-append "https://github.com/jboss/jboss-jms-api_spec/"
11156 "archive/jboss-jms-api_" version
11157 "_spec-1.0.1.Final.tar.gz"))
11160 "07bqblw9kq2i8q92bz70fvavq5xjfkaixl8xa0m0cypjgy82rb7m"))))
11161 (build-system ant-build-system)
11163 `(#:jar-name "java-jboss-jms-api_spec.jar"
11166 #:tests? #f)); no tests
11167 (home-page "https://github.com/jboss/jboss-jms-api_spec")
11168 (synopsis "Java Message Service API specification")
11169 (description "Java Message Service (JMS) API is used to send messages
11170 messages between two or more clients. It is a messaging standard that allows
11171 application components to create, send, receive, and read messages.")
11172 ; either gpl2 only with GPL Classpath Exception, or cddl.
11173 (license (list license:gpl2 license:cddl1.0))))
11175 (define-public java-mail
11181 (uri (string-append "https://github.com/javaee/javamail/archive/"
11182 "JAVAMAIL-1_6_0.tar.gz"))
11185 "1b4rg7fpj50ld90a71iz2m4gm3f5cnw18p3q3rbrrryjip46kx92"))))
11186 (build-system ant-build-system)
11188 `(#:jar-name "java-mail.jar"
11190 #:source-dir "mail/src/main/java"
11191 #:test-dir "mail/src/test"
11193 (list "**/CollectorFormatterTest.java"
11194 "**/CompactFormatterTest.java"
11195 "**/DurationFilterTest.java"
11196 "**/MailHandlerTest.java"
11197 "**/GetLocalAddressTest.java"
11198 ;; FIXME: both end with:
11199 ;; java.lang.ClassNotFoundException:
11200 ;; javax.mail.internet.MimeMultipartParseTest
11201 "**/MimeMultipartParseTest.java"
11202 "**/SearchTermSerializationTest.java")
11204 (modify-phases %standard-phases
11205 (add-before 'configure 'move-version.java
11207 (copy-file "mail/src/main/resources/javax/mail/Version.java"
11208 "mail/src/main/java/javax/mail/Version.java")
11210 (add-before 'build 'copy-resources
11212 (copy-recursively "mail/src/main/resources/META-INF"
11213 "build/classes/META-INF")
11216 `(("junit" ,java-junit)
11217 ("hamcrest" ,java-hamcrest-core)))
11218 (home-page "https://javaee.github.io/javamail/")
11219 (synopsis "Mail-related functionality in Java")
11220 (description "The JavaMail API provides a platform-independent and
11221 protocol-independent framework to build mail and messaging applications.")
11222 ;; General Public License Version 2 only ("GPL") or the Common Development
11223 ;; and Distribution License("CDDL")
11224 (license (list license:cddl1.1
11225 license:gpl2)))); with classpath exception
11227 (define-public java-jeromq
11229 (name "java-jeromq")
11233 (uri (git-reference
11234 (url "https://github.com/zeromq/jeromq")
11235 (commit (string-append "v" version))))
11236 (file-name (string-append name "-" version "-checkout"))
11239 "1gxkp7lv2ahymgrqdw94ncq54bmp4m4sw5m1x9gkp7l5bxn0xsyj"))
11240 (patches (search-patches "java-jeromq-fix-tests.patch"))))
11241 (build-system ant-build-system)
11243 `(#:jar-name "java-jeromq.jar"
11244 #:source-dir "src/main/java"
11248 "**/Abstract*.java"
11249 ;; Requires network
11250 "**/ZBeaconTest.java"
11252 "**/DealerSpecTest.java"
11253 "**/CustomDecoderTest.java"
11254 "**/CustomEncoderTest.java"
11255 "**/ConnectRidTest.java"
11256 "**/ReqSpecTest.java"
11257 "**/PushPullSpecTest.java"
11258 "**/PubSubHwmTest.java"
11259 "**/RouterSpecTest.java"
11260 "**/ProxyTest.java")))
11262 `(("java-jnacl" ,java-jnacl)))
11264 `(("java-hamcrest-core" ,java-hamcrest-core)
11265 ("junit" ,java-junit)))
11266 (home-page "http://zeromq.org/bindings:java")
11267 (synopsis "Java binding for 0MQ")
11268 (description "Jeromq provides the java bindings for 0MQ.")
11269 (license license:mpl2.0)))
11271 (define-public java-kafka-clients
11273 (name "java-kafka-clients")
11277 (uri (string-append "mirror://apache/kafka/" version "/kafka-"
11278 version "-src.tgz"))
11281 "1yxmnsmliwm7671q5yy9bl4jdqyyn00n26cggz9brwczx80w1vfq"))))
11282 (build-system ant-build-system)
11284 `(#:jar-name "java-kafka-clients.jar"
11286 #:source-dir "clients/src/main/java"
11287 #:test-dir "clients/src/test"
11290 ;; This file does not contain a class
11291 "**/IntegrationTest.java"
11292 ;; Requires network
11293 "**/ClientUtilsTest.java"
11294 ;; End with errors that seem related to our powermock
11295 "**/KafkaProducerTest.java"
11296 "**/BufferPoolTest.java")))
11298 `(("java-slf4j-api" ,java-slf4j-api)
11299 ("java-lz4" ,java-lz4)))
11301 `(("junit" ,java-junit)
11302 ("hamcrest" ,java-hamcrest-all)
11303 ("objenesis" ,java-objenesis)
11305 ("cglib" ,java-cglib)
11306 ("javassist" ,java-jboss-javassist)
11307 ("snappy" ,java-snappy)
11308 ("easymock" ,java-easymock)
11309 ("powermock" ,java-powermock-core)
11310 ("powermock-easymock" ,java-powermock-api-easymock)
11311 ("powermock-junit4-common" ,java-powermock-modules-junit4-common)
11312 ("powermock-junit4" ,java-powermock-modules-junit4)
11313 ("powermock-support" ,java-powermock-api-support)
11314 ("java-bouncycastle" ,java-bouncycastle)))
11315 (home-page "https://kafka.apache.org")
11316 (synopsis "Distributed streaming platform")
11317 (description "Kafka is a distributed streaming platform, which means:
11319 @item it can publish and subscribe to streams of records;
11320 @item it can store streams of records in a fault-tolerant way;
11321 @item it can process streams of records as they occur.
11323 ;; Either cddl or gpl2 only.
11324 (license (list license:cddl1.1; actually cddl1.1
11325 license:gpl2)))); with classpath exception
11327 (define-public java-jdom
11333 (uri (string-append "http://jdom.org/dist/binary/archive/jdom-"
11334 version ".tar.gz"))
11337 "07wdpm3jwwc9q38kmdw40fvbmv6jzjrkrf8m0zqs58f79a672wfl"))))
11338 (build-system ant-build-system)
11340 `(#:build-target "package"
11341 #:tests? #f; tests are run as part of the build process
11343 (modify-phases %standard-phases
11345 (install-jars "build")))))
11346 (home-page "http://jdom.org/")
11347 (synopsis "Access, manipulate, and output XML data")
11348 (description "Java-based solution for accessing, manipulating, and
11349 outputting XML data from Java code.")
11350 (license license:bsd-4)))
11352 (define-public java-geronimo-xbean-reflect
11354 (name "java-geronimo-xbean-reflect")
11358 (uri (svn-reference
11359 (url "https://svn.apache.org/repos/asf/geronimo/xbean/tags/xbean-4.5/")
11360 (revision 1807396)))
11361 (file-name (string-append name "-" version))
11364 "18q3i6jgm6rkw8aysfgihgywrdc5nvijrwnslmi3ww497jvri6ja"))))
11365 (build-system ant-build-system)
11367 `(#:jar-name "geronimo-xbean-reflect.jar"
11368 #:source-dir "xbean-reflect/src/main/java"
11369 #:test-dir "xbean-reflect/src/test"
11372 (list "**/Abstract*.java" "**/AsmParameterNameLoaderTest.java"
11373 "**/ObjectRecipeTest.java" "**/ParameterNameLoaderTest.java"
11374 "**/RecipeHelperTest.java" "**/XbeanAsmParameterNameLoaderTest.java")
11376 (modify-phases %standard-phases
11377 (add-before 'build 'fix-source
11379 (let ((dir "xbean-reflect/src/main/java/org/apache/xbean/recipe/"))
11380 ;; org.apache.xbean.asm6 is actually repackaged java-asm
11381 (substitute* (string-append dir "XbeanAsmParameterNameLoader.java")
11382 (("org.apache.xbean.asm5") "org.objectweb.asm"))
11384 (replace 'install (install-from-pom "xbean-reflect/pom.xml")))))
11386 `(("asm" ,java-asm)
11387 ("log4j" ,java-log4j-api)
11388 ("log4j-1.2" ,java-log4j-1.2-api)
11389 ("log4j-core" ,java-log4j-core)
11390 ("logging" ,java-commons-logging-minimal)))
11392 `(("java-geronimo-parent-pom" ,java-geronimo-parent-pom)))
11394 `(("junit" ,java-junit)))
11395 (home-page "https://geronimo.apache.org/maven/xbean/3.6/xbean-reflect/")
11396 (synopsis "Dependency injection helper")
11397 (description "Xbean-reflect provides very flexible ways to create objects
11398 and graphs of objects for dependency injection frameworks")
11399 (license license:asl2.0)))
11401 (define java-geronimo-genesis-2.1
11403 (name "java-geronimo-genesis")
11407 (uri (svn-reference
11408 (url (string-append "https://svn.apache.org/repos/asf/"
11409 "geronimo/genesis/tags/genesis-"
11411 (revision 1807396)))
11412 (file-name (string-append name "-" version "-source"))
11415 "119yn795jvnjf52si84q192s8wag1k013iabg78b7wnadssnnh31"))))
11416 (build-system ant-build-system)
11420 (modify-phases %standard-phases
11421 (delete 'configure)
11424 (install-pom-file "pom.xml"))
11425 (add-after 'install 'install-enforcer-rules
11426 (install-pom-file "genesis-enforcer-rules/pom.xml"))
11427 (add-after 'install 'install-flava
11428 (install-pom-file "genesis-default-flava/pom.xml"))
11429 (add-after 'install 'install-packaging
11430 (install-pom-file "genesis-packaging/pom.xml"))
11431 (add-after 'install-flava 'install-flava-java4
11432 (install-pom-file "genesis-default-flava/genesis-java1.4-flava/pom.xml"))
11433 (add-after 'install-flava 'install-flava-java5
11434 (install-pom-file "genesis-default-flava/genesis-java5-flava/pom.xml"))
11435 (add-after 'install-flava 'install-flava-java6
11436 (install-pom-file "genesis-default-flava/genesis-java6-flava/pom.xml")))))
11438 `(("apache-parent-pom" ,apache-parent-pom-13)))
11439 (home-page "https://geronimo.apache.org")
11440 (synopsis "Collection of maven POM files for the Geronimo project")
11441 (description "Apache Geronimo is a server runtime. This package contains
11442 only pom files used by other components in the Geronimo project.")
11443 (license license:asl2.0)))
11445 (define java-geronimo-parent-pom
11447 (inherit java-geronimo-xbean-reflect)
11448 (name "java-geronimo-parent-pom")
11452 (modify-phases %standard-phases
11453 (delete 'configure)
11456 (install-pom-file "pom.xml")))))
11458 `(("java-geronimo-genesis" ,java-geronimo-genesis-2.1)))))
11460 (define-public java-geronimo-xbean-bundleutils
11462 (inherit java-geronimo-xbean-reflect)
11463 (name "java-geronimo-xbean-bundleutils")
11465 `(#:jar-name "geronimo-xbean-bundleutils.jar"
11466 #:source-dir "xbean-bundleutils/src/main/java"
11467 #:test-dir "xbean-bundleutils/src/test"
11469 (modify-phases %standard-phases
11470 (add-before 'build 'fix-java
11472 ;; We use a more recent version of osgi, so this file requires
11473 ;; more interface method implementations.
11474 (substitute* "xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/DelegatingBundleContext.java"
11475 (("import org.osgi.framework.ServiceRegistration;")
11476 "import org.osgi.framework.ServiceRegistration;
11477 import org.osgi.framework.ServiceFactory;
11478 import java.util.Collection;
11479 import org.osgi.framework.ServiceObjects;")
11480 (("public Bundle getBundle\\(\\)")
11482 public <S> ServiceObjects<S> getServiceObjects(ServiceReference<S> reference) {
11483 throw new UnsupportedOperationException();
11486 public <S> ServiceRegistration<S> registerService(Class<S> clazz,
11487 ServiceFactory<S> factory, Dictionary<String, ?> properties) {
11488 throw new UnsupportedOperationException();
11490 public Bundle getBundle()"))
11493 `(("java-slf4j" ,java-slf4j-api)
11494 ("java-asm" ,java-asm)
11495 ("java-osgi-framework" ,java-osgi-framework)
11496 ("java-eclipse-osgi" ,java-eclipse-osgi)
11497 ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin)))))
11499 (define-public java-geronimo-xbean-asm-util
11501 (inherit java-geronimo-xbean-reflect)
11502 (name "java-geronimo-xbean-asm-util")
11504 `(#:jar-name "geronimo-xbean-asm-util.jar"
11505 #:source-dir "xbean-asm-util/src/main/java"
11506 #:tests? #f)); no tests
11508 `(("java-asm" ,java-asm)))
11509 (native-inputs '())))
11511 (define-public java-geronimo-xbean-finder
11513 (inherit java-geronimo-xbean-reflect)
11514 (name "java-geronimo-xbean-finder")
11516 `(#:jar-name "geronimo-xbean-finder.jar"
11517 #:source-dir "xbean-finder/src/main/java"
11518 #:test-dir "xbean-finder/src/test"))
11520 `(("java-slf4j-api" ,java-slf4j-api)
11521 ("java-asm" ,java-asm)
11522 ("java-geronimo-xbean-bundleutils" ,java-geronimo-xbean-bundleutils)
11523 ("java-geronimo-xbean-asm-util" ,java-geronimo-xbean-asm-util)
11524 ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin)
11525 ("java-osgi-framework" ,java-osgi-framework)))
11527 `(("java-junit" ,java-junit)
11528 ("java-hamcrest-core" ,java-hamcrest-core)))))
11530 (define-public java-gson
11536 (uri (string-append "https://github.com/google/gson/archive/"
11537 "gson-parent-" version ".tar.gz"))
11540 "1j4qnp7v046q0k48c4kyf69sxaasx2h949d3cqwsm3kzxms3x0f9"))))
11541 (build-system ant-build-system)
11543 `(#:jar-name "gson.jar"
11544 #:source-dir "gson/src/main/java"
11545 #:test-dir "gson/src/test"))
11547 `(("java-junit" ,java-junit)
11548 ("java-hamcrest-core" ,java-hamcrest-core)))
11549 (home-page "https://github.com/google/gson")
11550 (synopsis "Java serialization/deserialization library from/to JSON")
11551 (description "Gson is a Java library that can be used to convert Java
11552 Objects into their JSON representation. It can also be used to convert a JSON
11553 string to an equivalent Java object. Gson can work with arbitrary Java objects
11554 including pre-existing objects that you do not have source-code of.")
11555 (license license:asl2.0)))
11557 (define-public java-hawtjni
11559 (name "java-hawtjni")
11563 (uri (string-append "https://github.com/fusesource/hawtjni/archive/"
11564 "hawtjni-project-" version ".tar.gz"))
11567 "1bqfd732rmh6svyx17fpw9175gc9gzkcbyps2yyrf50c3zzjas6g"))))
11568 (build-system ant-build-system)
11570 `(#:jar-name "hawtjni.jar"
11571 #:source-dir "hawtjni-generator/src/main/java:hawtjni-runtime/src/main/java"
11572 #:tests? #f; no tests
11574 (modify-phases %standard-phases
11575 (add-before 'build 'build-native
11576 (lambda* (#:key inputs #:allow-other-keys)
11577 (let ((include (string-append "-I" (assoc-ref inputs "jdk") "/include/linux")))
11578 (with-directory-excursion "hawtjni-generator/src/main/resources/"
11579 (invoke "gcc" "-c" "hawtjni.c" "-o" "hawtjni.o"
11580 "-fPIC" "-O2" include)
11581 (invoke "gcc" "-c" "hawtjni-callback.c" "-o" "hawtjni-callback.o"
11582 "-fPIC" "-O2" include)
11583 (invoke "gcc" "-o" "libhawtjni.so" "-shared"
11584 "hawtjni.o" "hawtjni-callback.o")))
11586 (add-after 'install 'install-native
11587 (lambda* (#:key outputs #:allow-other-keys)
11588 (let* ((out (assoc-ref outputs "out"))
11589 (lib (string-append out "/lib"))
11590 (inc (string-append out "/include")))
11591 (with-directory-excursion "hawtjni-generator/src/main/resources/"
11592 (install-file "libhawtjni.so" lib)
11593 (install-file "hawtjni.h" inc)))
11595 (add-before 'install 'install-parent
11596 (install-pom-file "pom.xml"))
11598 (install-from-pom "hawtjni-runtime/pom.xml")))))
11600 `(("java-commons-cli" ,java-commons-cli)
11601 ("java-asm" ,java-asm)
11602 ("java-geronimo-xbean-finder" ,java-geronimo-xbean-finder)))
11603 (home-page "https://fusesource.github.io/hawtjni/")
11604 (synopsis "JNI code generator")
11605 (description "HawtJNI is a code generator that produces the JNI code needed
11606 to implement Java native methods. It is based on the jnigen code generator
11607 that is part of the SWT Tools project.")
11608 (license license:asl2.0)))
11610 (define-public java-jansi-native
11612 (name "java-jansi-native")
11616 (uri (string-append "https://github.com/fusesource/jansi-native/"
11617 "archive/jansi-native-" version ".tar.gz"))
11620 "0j2ydlgxbzbgshqkwghbxxxnbnx1mmjgd6k5fw6xfvxw1z956yqf"))))
11621 (build-system ant-build-system)
11623 `(#:jar-name "jansi-native.jar"
11624 #:source-dir "src/main/java"
11625 #:tests? #f; no tests
11627 (modify-phases %standard-phases
11628 (add-before 'build 'build-native
11629 (lambda* (#:key inputs #:allow-other-keys)
11630 ;; there are more required files for windows in windows/
11631 (with-directory-excursion "src/main/native-package/src"
11632 (substitute* "jansi_ttyname.c"
11633 (("#include \"jansi_.*") ""))
11634 (invoke "gcc" "-c" "jansi_ttyname.c" "-o" "jansi_ttyname.o"
11635 (string-append "-I" (assoc-ref inputs "java-hawtjni")
11637 (string-append "-I" (assoc-ref inputs "jdk")
11640 (invoke "gcc" "-o" "libjansi.so" "-shared" "jansi_ttyname.o"))))
11641 (add-before 'build 'install-native
11643 (let ((dir (string-append "build/classes/META-INF/native/"
11644 ,(match (%current-system)
11645 ((or "i686-linux" "armhf-linux")
11647 ((or "x86_64-linux" "aarch64-linux"
11650 (_ "unknown-kernel")))))
11651 (install-file "src/main/native-package/src/libjansi.so" dir))
11653 (add-after 'install 'install-native
11654 (lambda* (#:key outputs #:allow-other-keys)
11655 (install-file "src/main/native-package/src/jansi.h"
11656 (string-append (assoc-ref outputs "out") "/include"))
11658 (add-before 'install 'fix-pom
11660 ;; pom contains variables to complete name, but we don't support that
11661 (substitute* "pom.xml"
11662 (("\\$\\{platform\\}") "native"))
11665 (install-from-pom "pom.xml")))))
11667 `(("java-hawtjni" ,java-hawtjni)))
11668 (home-page "https://fusesource.github.io/jansi/")
11669 (synopsis "Native library for jansi")
11670 (description "This package provides the native library for jansi, a small
11671 Java library that allows you to use ANSI escape sequences to format your
11673 (license license:asl2.0)))
11675 (define-public java-jansi
11677 (name "java-jansi")
11681 (uri (string-append "https://github.com/fusesource/jansi/archive/"
11682 "jansi-project-" version ".tar.gz"))
11685 "11kh3144i3fzp21dpy8zg52mjmsr214k7km9p8ly0rqk2px0qq2z"))))
11686 (build-system ant-build-system)
11688 `(#:jar-name "jansi.jar"
11689 #:source-dir "jansi/src/main/java"
11690 #:test-dir "jansi/src/test"
11692 (modify-phases %standard-phases
11693 (add-after 'check 'clear-term
11695 (invoke "echo" "-e" "\\e[0m")))
11696 (add-before 'install 'install-parent
11697 (install-pom-file "pom.xml"))
11698 (add-before 'install 'fix-pom
11700 ;; pom adds jansi native versions for different platforms, but we
11701 ;; only need one, so use native instead
11702 (substitute* "jansi/pom.xml"
11703 (("windows32") "native")
11704 (("windows64") "native")
11706 (("linux32") "native")
11707 (("linux64") "native")
11708 (("freebsd32") "native")
11709 (("freebsd64") "native"))
11712 (install-from-pom "jansi/pom.xml")))))
11714 `(("java-jansi-native" ,java-jansi-native)))
11716 `(("java-junit" ,java-junit)
11717 ("java-hamcrest-core" ,java-hamcrest-core)))
11718 (home-page "https://fusesource.github.io/jansi/")
11719 (synopsis "Portable ANSI escape sequences")
11720 (description "Jansi is a Java library that allows you to use ANSI escape
11721 sequences to format your console output which works on every platform.")
11722 (license license:asl2.0)))
11724 (define-public java-jboss-el-api-spec
11726 (name "java-jboss-el-api-spec")
11730 (uri (string-append "https://github.com/jboss/jboss-el-api_spec/"
11731 "archive/jboss-el-api_" version
11732 "_spec-1.0.7.Final.tar.gz"))
11735 "1j45ljxalwlibxl7g7iv952sjxkw275m8vyxxij8l6wdd5pf0pdh"))))
11736 (build-system ant-build-system)
11738 `(#:jar-name "java-jboss-el-api_spec.jar"
11739 #:modules ((guix build ant-build-system)
11741 (guix build maven pom)
11742 (guix build java-utils)
11745 (modify-phases %standard-phases
11746 ;; the origin of javax.el:javax.el-api is unknown, so we use this package
11747 ;; instead, which implements the same thing. We override the pom file
11748 ;; to "rename" the package so it can be found by maven.
11749 (add-before 'install 'override-pom
11751 (delete-file "pom.xml")
11752 (with-output-to-file "pom.xml"
11756 (modelVersion "4.0.0")
11758 (groupId "javax.el")
11759 (artifactId "javax.el-api")
11760 (version "3.0")))))
11763 (install-from-pom "pom.xml")))))
11765 `(("java-junit" ,java-junit)))
11766 (home-page "https://github.com/jboss/jboss-el-api_spec")
11767 (synopsis "JSR-341 expression language 3.0 API")
11768 (description "This package contains an implementation of the JSR-341
11769 specification for the expression language 3.0. It implements an expression
11770 language inspired by ECMAScript and XPath. This language is used with
11771 JavaServer Pages (JSP).")
11772 ;; Either GPL2 only or CDDL.
11773 (license (list license:gpl2 license:cddl1.1))))
11775 (define-public java-jboss-interceptors-api-spec
11777 (name "java-jboss-interceptors-api-spec")
11781 (uri (string-append "https://github.com/jboss/jboss-interceptors-api_spec/"
11782 "archive/jboss-interceptors-api_" version
11783 "_spec-1.0.0.Final.tar.gz"))
11786 "0wv8x0jp9a5qxlrgkhb5jdk2gr6vi87b4j4kjb8ryxiy9gn8g51z"))))
11787 (build-system ant-build-system)
11789 `(#:jar-name "java-jboss-interceptors-api_spec.jar"
11792 #:tests? #f; no tests
11793 #:modules ((guix build ant-build-system)
11795 (guix build maven pom)
11796 (guix build java-utils)
11799 (modify-phases %standard-phases
11800 ;; the origin of javax.interceptor:javax.interceptor-api is unknown,
11801 ;; so we use this package instead, which implements the same thing.
11802 ;; We override the pom file to "rename" the package so it can be found
11804 (add-before 'install 'override-pom
11806 (delete-file "pom.xml")
11807 (with-output-to-file "pom.xml"
11811 (modelVersion "4.0.0")
11812 (name "interceptor-api")
11813 (groupId "javax.interceptor")
11814 (artifactId "javax.interceptor-api")
11815 (version "3.0")))))
11818 (install-from-pom "pom.xml")))))
11819 (home-page "https://github.com/jboss/jboss-interceptors-api_spec")
11820 (synopsis "Interceptors 1.2 API classes from JSR 318")
11821 (description "Java-jboss-interceptors-api-spec implements the Interceptors
11822 API. Interceptors are used to interpose on business method invocations and
11824 ;; Either GPL2 only or CDDL.
11825 (license (list license:gpl2 license:cddl1.1))))
11827 (define-public java-cdi-api
11829 (name "java-cdi-api")
11833 (uri (string-append "https://github.com/cdi-spec/cdi/archive/"
11834 version ".tar.gz"))
11835 (file-name (string-append name "-" version ".tar.gz"))
11838 "1iv8b8bp07c5kmqic14jsr868vycjv4qv02lf3pkgp9z21mnfg5y"))))
11839 (build-system ant-build-system)
11841 `(#:source-dir "api/src/main/java"
11842 #:jar-name "java-cdi-api.jar"
11843 #:test-dir "api/src/test"
11845 #:tests? #f; Tests fail because we don't have a CDI provider yet
11847 (modify-phases %standard-phases
11849 (install-from-pom "api/pom.xml")))))
11851 `(("java-javax-inject" ,java-javax-inject)
11852 ("java-jboss-el-api-spec" ,java-jboss-el-api-spec)
11853 ("java-jboss-interceptors-api-spec" ,java-jboss-interceptors-api-spec)
11854 ("java-weld-parent-pom" ,java-weld-parent-pom)))
11856 `(("java-testng" ,java-testng)
11857 ("java-hamcrest-core" ,java-hamcrest-core)))
11858 (home-page "http://cdi-spec.org/")
11859 (synopsis "Contexts and Dependency Injection APIs")
11860 (description "Java-cdi-api contains the required APIs for Contexts and
11861 Dependency Injection (CDI).")
11862 (license license:asl2.0)))
11864 (define-public java-joda-convert
11866 (name "java-joda-convert")
11870 (uri (string-append "https://github.com/JodaOrg/joda-convert/archive/v"
11871 version ".tar.gz"))
11872 (file-name (string-append name "-" version ".tar.gz"))
11875 "0vp346xz7dh9br4q7xazhc7hvzf76a6hf95fki9bg67q5jr0kjh7"))))
11876 (build-system ant-build-system)
11878 `(#:jar-name (string-append ,name "-" ,version ".jar")
11879 #:source-dir "src/main/java"
11880 #:test-include (list "**/Test*.java")
11881 ;; Contains only interfaces and base classes (no test)
11882 #:test-exclude (list "**/test*/**.java")))
11884 `(("java-guava" ,java-guava)))
11886 `(("java-junit" ,java-junit)
11887 ("java-hamcrest-core" ,java-hamcrest-core)))
11888 (home-page "https://www.joda.org/joda-convert/")
11889 (synopsis "Conversion between Objects and Strings")
11890 (description "Joda-Convert provides a small set of classes to aid
11891 conversion between Objects and Strings. It is not intended to tackle the
11892 wider problem of Object to Object transformation.")
11893 (license license:asl2.0)))
11895 (define-public java-joda-time
11897 (name "java-joda-time")
11901 (uri (string-append "https://github.com/JodaOrg/joda-time/archive/v"
11902 version ".tar.gz"))
11903 (file-name (string-append name "-" version ".tar.gz"))
11906 "1i9x91mi7yg2pasl0k3912f1pg46n37sps6rdb0v1gs8hj9ppwc1"))))
11907 (build-system ant-build-system)
11909 `(#:jar-name "java-joda-time.jar"
11910 #:source-dir "src/main/java"
11911 #:test-include (list "**/Test*.java")
11912 ;; There is no runnable test in these files
11913 #:test-exclude (list "**/Test*Chronology.java" "**/Test*Field.java")
11915 (modify-phases %standard-phases
11916 (add-after 'build 'build-resources
11918 (mkdir-p "build/classes/org/joda/time/tz/data")
11919 (mkdir-p "build/classes/org/joda/time/format")
11920 ;; This will produce the following exception:
11921 ;; java.io.IOException: Resource not found: "org/joda/time/tz/data/ZoneInfoMap"
11922 ;; which is normal, because it doesn't exist yet. It still generates
11923 ;; the same file as in the binary one can find on maven.
11924 (invoke "java" "-cp"
11925 (string-append "build/classes:" (getenv "CLASSPATH"))
11926 "org.joda.time.tz.ZoneInfoCompiler"
11927 "-src" "src/main/java/org/joda/time/tz/src"
11928 "-dst" "build/classes/org/joda/time/tz/data"
11929 "africa" "antarctica" "asia" "australasia"
11930 "europe" "northamerica" "southamerica"
11931 "pacificnew" "etcetera" "backward" "systemv")
11932 (for-each (lambda (f)
11933 (copy-file f (string-append
11934 "build/classes/org/joda/time/format/"
11936 (find-files "src/main/java/org/joda/time/format" ".*.properties"))
11938 (add-before 'install 'regenerate-jar
11940 ;; We need to regenerate the jar file to add generated data.
11941 (delete-file "build/jar/java-joda-time.jar")
11942 (invoke "ant" "jar")))
11943 (add-before 'check 'copy-test-resources
11945 (mkdir-p "build/test-classes/org/joda/time/tz/data")
11946 (copy-file "src/test/resources/tzdata/ZoneInfoMap"
11947 "build/test-classes/org/joda/time/tz/data/ZoneInfoMap")
11948 (copy-recursively "src/test/resources" "build/test-classes")
11951 `(("java-joda-convert" ,java-joda-convert)))
11953 `(("java-junit" ,java-junit)
11954 ("java-hamcrest-core" ,java-hamcrest-core)
11955 ("tzdata" ,tzdata)))
11956 (home-page "https://www.joda.org/joda-time/")
11957 (synopsis "Replacement for the Java date and time classes")
11958 (description "Joda-Time is a replacement for the Java date and time
11959 classes prior to Java SE 8.")
11960 (license license:asl2.0)))
11962 (define-public java-xerces
11964 (name "java-xerces")
11969 (uri (string-append "mirror://apache/xerces/j/source/"
11970 "Xerces-J-src." version ".tar.gz"))
11972 (base32 "0494kq36gw3nah19ifb720vwxbpg4ww0k6m3zq6wyanw6a083p6s"))
11973 (patches (search-patches
11974 "java-xerces-xjavac_taskdef.patch"
11975 "java-xerces-build_dont_unzip.patch"
11976 "java-xerces-bootclasspath.patch"))))
11977 (build-system ant-build-system)
11979 `(#:tests? #f;; Test files are not present
11980 #:test-target "test"
11983 (modify-phases %standard-phases
11984 (add-after 'unpack 'create-build.properties
11985 (lambda* (#:key inputs #:allow-other-keys)
11986 (let ((jaxp (assoc-ref inputs "java-jaxp"))
11987 (resolver (assoc-ref inputs "java-apache-xml-commons-resolver")))
11988 (with-output-to-file "build.properties"
11991 "jar.jaxp = ~a/share/java/jaxp.jar~@
11992 jar.apis-ext = ~a/share/java/jaxp.jar~@
11993 jar.resolver = ~a/share/java/xml-resolver.jar~%"
11994 jaxp jaxp resolver)))
11995 ;; Make xerces use our version of jaxp in tests
11996 (substitute* "build.xml"
11998 (string-append jaxp "/share/java/jaxp.jar"))
11999 (("\\$\\{tools.dir\\}/\\$\\{jar.apis\\}")
12002 (replace 'install (install-jars "build")))))
12004 `(("java-apache-xml-commons-resolver" ,java-apache-xml-commons-resolver)
12005 ("java-jaxp" ,java-jaxp)))
12006 (home-page "https://xerces.apache.org/xerces2-j/")
12007 (synopsis "Validating XML parser for Java with DOM level 3 support")
12008 (description "The Xerces2 Java parser is the reference implementation of
12009 XNI, the Xerces Native Interface, and also a fully conforming XML Schema
12012 Xerces2-J supports the following standards and APIs:
12015 @item eXtensible Markup Language (XML) 1.0 Second Edition Recommendation
12016 @item Namespaces in XML Recommendation
12017 @item Document Object Model (DOM) Level 2 Core, Events, and Traversal and
12018 Range Recommendations
12019 @item Simple API for XML (SAX) 2.0.1 Core and Extension
12020 @item Java APIs for XML Processing (JAXP) 1.2.01
12021 @item XML Schema 1.0 Structures and Datatypes Recommendations
12022 @item Experimental implementation of the Document Object Model (DOM) Level 3
12023 Core and Load/Save Working Drafts
12024 @item Provides a partial implementation of the XML Inclusions (XInclude) W3C
12025 Candidate Recommendation
12028 Xerces is now able to parse documents written according to the XML 1.1
12029 Candidate Recommendation, except that it does not yet provide an option to
12030 enable normalization checking as described in section 2.13 of this
12031 specification. It also handles namespaces according to the XML Namespaces 1.1
12032 Candidate Recommendation, and will correctly serialize XML 1.1 documents if
12033 the DOM level 3 load/save API's are in use.")
12034 (license license:asl2.0)))
12036 (define-public java-jakarta-regexp
12038 (name "java-jakarta-regexp")
12043 (uri (string-append
12044 "https://archive.apache.org/dist/jakarta/regexp/jakarta-regexp-"
12045 version ".tar.gz"))
12048 "0zg9rmyif48dck0cv6ynpxv23mmcsx265am1fnnxss7brgw0ms3r"))))
12049 (build-system ant-build-system)
12051 `(#:test-target "test"
12053 (modify-phases %standard-phases
12055 (lambda* (#:key outputs #:allow-other-keys)
12056 (let* ((out (assoc-ref outputs "out"))
12057 (out-share (string-append out "/share/java")))
12058 (mkdir-p out-share)
12059 (for-each (lambda (name)
12060 (install-file name out-share))
12061 (find-files "build" "^jakarta-regexp-.*\\.jar$"))
12063 (home-page "https://attic.apache.org/projects/jakarta-regexp.html")
12064 (synopsis "Regular expression parser generator for Java.")
12065 (description "@code{jakarta-regexp} is an old regular expression parser
12066 generator for Java.")
12067 (license license:asl2.0)))
12069 (define-public java-jline
12071 (name "java-jline")
12075 (uri (string-append "https://github.com/jline/jline1/archive/jline-"
12076 version ".tar.gz"))
12079 "0bi3p6vrh7a6v0fbpb6rx9plpmx5zk3lr352xzdbz2jcxg499wir"))))
12080 (build-system ant-build-system)
12082 `(#:jar-name "jline.jar"
12083 #:source-dir "src/main/java"
12084 #:test-dir "src/test"
12086 (modify-phases %standard-phases
12087 (add-before 'build 'copy-resources
12089 (copy-recursively "src/main/resources" "build/classes")
12092 `(("java-junit" ,java-junit)))
12093 (home-page "https://jline.github.io")
12094 (synopsis "Console input handling library")
12095 (description "JLine is a Java library for handling console input. It is
12096 similar in functionality to BSD editline and GNU readline but with additional
12097 features that bring it on par with the Z shell line editor.")
12098 (license license:bsd-3)))
12100 (define-public java-jline-2
12102 (inherit java-jline)
12106 (uri (string-append "https://github.com/jline/jline2/archive/jline-"
12107 version ".tar.gz"))
12110 "1c6qa26mf0viw8hg4jnv72s7i1qb1gh1l8rrzcdvqhqhx82rkdlf"))))
12113 ,@(package-arguments java-jline)))
12115 `(("java-jansi" ,java-jansi)
12116 ("java-jansi-native" ,java-jansi-native)))
12118 `(("java-powermock-modules-junit4" ,java-powermock-modules-junit4)
12119 ("java-powermock-modules-junit4-common" ,java-powermock-modules-junit4-common)
12120 ("java-powermock-api-easymock" ,java-powermock-api-easymock)
12121 ("java-powermock-api-support" ,java-powermock-api-support)
12122 ("java-powermock-core" ,java-powermock-core)
12123 ("java-powermock-reflect" ,java-powermock-reflect)
12124 ("java-easymock" ,java-easymock)
12125 ("java-jboss-javassist" ,java-jboss-javassist)
12126 ("java-objenesis" ,java-objenesis)
12127 ("java-asm" ,java-asm)
12128 ("java-hamcrest-core" ,java-hamcrest-core)
12129 ("java-cglib" ,java-cglib)
12130 ("java-junit" ,java-junit)
12131 ("java-hawtjni" ,java-hawtjni)))))
12133 (define-public java-xmlunit
12135 (name "java-xmlunit")
12139 (uri (string-append "https://github.com/xmlunit/xmlunit/archive/v"
12140 version ".tar.gz"))
12141 (file-name (string-append name "-" version ".tar.gz"))
12144 "035rivlnmwhfqj0fzviciv0bkh1h95ps1iwnh2kjcvdbk5nccm4z"))))
12145 (build-system ant-build-system)
12147 `(#:jar-name "java-xmlunit.jar"
12148 #:source-dir "xmlunit-core/src/main/java"
12149 #:test-dir "xmlunit-core/src/test"
12151 (modify-phases %standard-phases
12152 (add-before 'check 'copy-test-resources
12153 (lambda* (#:key inputs #:allow-other-keys)
12154 (copy-recursively (assoc-ref inputs "resources") "../test-resources")
12157 `(("java-junit" ,java-junit)
12158 ("java-mockito-1" ,java-mockito-1)
12159 ("java-hamcrest-all" ,java-hamcrest-all)
12160 ("java-objenesis" ,java-objenesis)
12161 ("java-asm" ,java-asm)
12162 ("java-cglib" ,java-cglib)
12166 (uri (git-reference
12167 (url "https://github.com/xmlunit/test-resources")
12168 (commit "a590d2ae865c3e0455691d76ba8eefccc2215aec")))
12169 (file-name "java-xmlunit-test-resources")
12172 "0r0glj37pg5l868yjz78gckr91cs8fysxxbp9p328dssssi91agr"))))))
12173 (home-page "https://www.xmlunit.org/")
12174 (synopsis "XML output testing")
12175 (description "XMLUnit provides you with the tools to verify the XML you
12176 emit is the one you want to create. It provides helpers to validate against
12177 an XML Schema, assert the values of XPath queries or compare XML documents
12178 against expected outcomes.")
12179 (license license:asl2.0)))
12181 (define-public java-xmlunit-legacy
12183 (inherit java-xmlunit)
12184 (name "java-xmlunit-legacy")
12186 `(#:jar-name "java-xmlunit-legacy.jar"
12187 #:source-dir "xmlunit-legacy/src/main/java"
12188 #:test-dir "xmlunit-legacy/src/test"))
12190 `(("java-xmlunit" ,java-xmlunit)
12191 ("java-junit" ,java-junit)))
12193 `(("java-mockito-1" ,java-mockito-1)))))
12195 (define-public java-xmlunit-matchers
12197 (inherit java-xmlunit)
12198 (name "java-xmlunit-matchers")
12200 `(#:jar-name "java-xmlunit-matchers.jar"
12201 #:source-dir "xmlunit-matchers/src/main/java"
12202 #:test-dir "xmlunit-matchers/src/test"
12204 ;; Cannot open xsd for http://www.xmlunit.org/test-support/Book.xsd
12205 (list "**/ValidationMatcherTest.java")
12207 (modify-phases %standard-phases
12208 (add-before 'build 'copy-test-class
12210 (copy-file "xmlunit-core/src/test/java/org/xmlunit/TestResources.java"
12211 "xmlunit-matchers/src/test/java/org/xmlunit/TestResources.java")
12213 (add-before 'build 'fix-test-resources-path
12215 (substitute* (find-files "xmlunit-matchers/src/test" ".*.java")
12216 (("../test-resources") "test-resources"))
12218 (add-before 'check 'copy-test-resources
12219 (lambda* (#:key inputs #:allow-other-keys)
12220 (copy-recursively (assoc-ref inputs "resources") "test-resources")
12223 `(("java-xmlunit" ,java-xmlunit)
12224 ("java-junit" ,java-junit)))))
12226 (define-public java-openchart2
12228 (name "java-openchart2")
12232 (uri (string-append "http://download.approximatrix.com/openchart2/"
12233 "openchart2-" version ".source.zip"))
12236 "1xq96zm5r02n1blja0072jmmsifmxc40lbyfbnmcnr6mw42frh4g"))))
12237 (build-system ant-build-system)
12239 `(#:test-target "test"
12241 (modify-phases %standard-phases
12242 (add-after 'unpack 'fix-junit-errors
12244 (with-directory-excursion "unittest/src/com/approximatrix/charting/"
12245 (substitute* '("coordsystem/ticklocator/NumericXTickLocatorTest.java"
12246 "coordsystem/ticklocator/NumericYTickLocatorTest.java"
12247 "coordsystem/ticklocator/ObjectXTickLocatorTest.java"
12248 "model/DefaultChartDataModelConstraintsTest.java"
12249 "model/MultiScatterDataModelConstraintsTest.java"
12250 "model/threedimensional/DotPlotDataModelConstraintsTest.java")
12251 (("(assertEquals[^;]+);" before _)
12252 (string-append (string-drop-right before 2) ", 1E-6);"))))
12254 (replace 'install (install-jars ".")))))
12257 ("java-junit" ,java-junit)
12258 ("java-hamcrest-core" ,java-hamcrest-core)))
12259 (home-page "https://approximatrix.com/products/openchart2/")
12260 (synopsis "Simple plotting for Java")
12261 (description "Openchart2 provides a simple, yet powerful, interface for
12262 Java programmers to create two-dimensional charts and plots. The library
12263 features an assortment of graph styles, including advanced scatter plots, bar
12264 graphs, and pie charts.")
12265 (license license:lgpl2.1+)))
12267 (define-public java-commons-httpclient
12269 (name "java-commons-httpclient")
12273 (uri (string-append "mirror://apache/httpcomponents/"
12274 "commons-httpclient/source/commons-httpclient-"
12275 version "-src.tar.gz"))
12278 "1wlpn3cfy3d4inxy6g7wxcsa8p7sshn6aldk9y4ia3lb879rd97r"))))
12279 (build-system ant-build-system)
12281 `(#:build-target "compile"
12282 #:test-target "test"
12283 #:tests? #f; requires junit-textui (junit 3)
12285 (modify-phases %standard-phases
12286 (add-before 'build 'fix-accent
12288 (for-each (lambda (file)
12289 (with-fluids ((%default-port-encoding "ISO-8859-1"))
12291 (("\\* @author Ortwin .*") "* @author Ortwin Glueck\n"))))
12292 '("src/java/org/apache/commons/httpclient/HttpContentTooLargeException.java"
12293 "src/examples/TrivialApp.java" "src/examples/ClientApp.java"
12294 "src/test/org/apache/commons/httpclient/TestHttps.java"
12295 "src/test/org/apache/commons/httpclient/TestURIUtil2.java"))
12298 (lambda* (#:key outputs #:allow-other-keys)
12299 (invoke "ant" "dist"
12300 (string-append "-Ddist.home=" (assoc-ref outputs "out")
12304 `(("java-commons-logging" ,java-commons-logging-minimal)
12305 ("java-commons-codec" ,java-commons-codec)))
12306 (home-page "https://hc.apache.org")
12307 (synopsis "HTTP/1.1 compliant HTTP agent implementation")
12308 (description "This package contains an HTTP/1.1 compliant HTTP agent
12309 implementation. It also provides reusable components for client-side
12310 authentication, HTTP state management, and HTTP connection management.")
12311 (license license:asl2.0)))
12313 (define-public java-commons-vfs
12315 (name "java-commons-vfs")
12319 (uri (string-append "mirror://apache/commons/vfs/source/"
12320 "commons-vfs2-distribution-" version "-src.tar.gz"))
12321 (file-name (string-append name "-" version ".tar.gz"))
12324 "1cnq1iaghbp4cslpnvwbp83i5v234x87irssqynhwpfgw7caf1s3"))
12325 (modules '((guix build utils)))
12328 (for-each delete-file
12329 (find-files "." "\\.jar$"))
12331 (build-system ant-build-system)
12333 `(#:jar-name "commons-vfs.jar"
12334 #:source-dir "commons-vfs2/src/main/java"
12335 #:test-dir "commons-vfs2/src/test"
12336 ; FIXME: tests depend on many things: apache sshd, hadoop, ftpserver, ...
12339 (modify-phases %standard-phases
12340 (add-before 'build 'remove-hadoop-and-webdav
12341 ; Remove these files as they are not required and depend on difficult
12344 (for-each delete-file-recursively
12345 '("commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/webdav"
12346 "commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/hdfs"))
12349 `(("java-commons-collections4" ,java-commons-collections4)
12350 ("java-commons-compress" ,java-commons-compress)
12351 ("java-commons-httpclient" ,java-commons-httpclient)
12352 ("java-commons-logging-minimal" ,java-commons-logging-minimal)
12353 ("java-commons-net" ,java-commons-net)
12354 ("java-jsch" ,java-jsch)))
12355 (home-page "https://commons.apache.org/proper/commons-vfs/")
12356 (synopsis "Java file system library")
12357 (description "Commons VFS provides a single API for accessing various
12358 different file systems. It presents a uniform view of the files from various
12359 different sources, such as the files on local disk, on an HTTP server, or
12360 inside a Zip archive.")
12361 (license license:asl2.0)))
12363 (define-public java-jakarta-oro
12365 (name "java-jakarta-oro")
12369 (uri (string-append "mirror://apache/jakarta/oro/"
12370 "jakarta-oro-" version ".tar.gz"))
12373 "0rpmnsskiwmsy8r0sckz5n5dbvh3vkxx8hpm177c754r8xy3qksc"))
12374 (modules '((guix build utils)))
12377 (delete-file (string-append "jakarta-oro-" ,version ".jar"))
12379 (build-system ant-build-system)
12381 `(#:build-target "package"
12382 #:make-flags (list "-DDATE" "(no recorded date for reproducibility)")
12383 #:tests? #f; tests are run as part of the build process
12385 (modify-phases %standard-phases
12387 (install-jars ,(string-append "jakarta-oro-" version))))))
12388 (home-page "https://jakarta.apache.org/oro/")
12389 (synopsis "Text-processing for Java")
12390 (description "The Jakarta-ORO Java classes are a set of text-processing
12391 Java classes that provide Perl5 compatible regular expressions, AWK-like
12392 regular expressions, glob expressions, and utility classes for performing
12393 substitutions, splits, filtering filenames, etc. This library is the successor
12394 of the OROMatcher, AwkTools, PerlTools, and TextTools libraries originally
12396 (license license:asl1.1)))
12398 (define-public java-native-access
12400 (name "java-native-access")
12404 (uri (string-append "https://github.com/java-native-access/jna/"
12405 "archive/" version ".tar.gz"))
12406 (file-name (string-append name "-" version ".tar.gz"))
12409 "0zrpzkib6b905i018a9pqlzkqinphywr6y4jwv6mwp63jjqvqkd9"))
12410 (modules '((guix build utils)))
12413 (for-each delete-file (find-files "." ".*.jar"))
12414 (delete-file-recursively "native/libffi")
12415 (delete-file-recursively "dist")
12417 (build-system ant-build-system)
12419 `(#:tests? #f; FIXME: tests require reflections.jar
12420 #:test-target "test"
12421 #:make-flags (list "-Ddynlink.native=true")
12423 (modify-phases %standard-phases
12424 (add-before 'build 'fix-build.xml
12425 (lambda* (#:key inputs #:allow-other-keys)
12426 (substitute* "build.xml"
12427 ;; Since we removed the bundled ant.jar, give the correct path
12428 (("lib/ant.jar") (string-append (assoc-ref inputs "ant") "/lib/ant.jar"))
12429 ;; We removed generated native libraries. We can only rebuild one
12430 ;; so don't fail if we can't find a native library for another architecture.
12431 (("zipfileset") "zipfileset erroronmissingarchive=\"false\""))
12432 ;; Copy test dependencies
12433 (copy-file (car (find-files (assoc-ref inputs "java-junit") "jar$"))
12435 (copy-file (car (find-files (assoc-ref inputs "java-hamcrest-core")
12437 "lib/hamcrest-core.jar")
12438 ;; FIXME: once reflections.jar is built, copy it to lib/test.
12440 (add-before 'build 'build-native
12442 (invoke "ant" "-Ddynlink.native=true" "native")
12445 (install-jars "build")))))
12447 `(("libffi" ,libffi)
12451 `(("java-junit" ,java-junit)
12452 ("java-hamcrest-core" ,java-hamcrest-core)))
12453 (home-page "https://github.com/java-native-access/jna")
12454 (synopsis "Access to native shared libraries from Java")
12455 (description "JNA provides Java programs easy access to native shared
12456 libraries without writing anything but Java code - no JNI or native code is
12457 required. JNA allows you to call directly into native functions using natural
12458 Java method invocation.")
12459 ;; Java Native Access project (JNA) is dual-licensed under 2
12460 ;; alternative Free licenses: LGPL 2.1 or later and Apache License 2.0.
12463 license:lgpl2.1+))))
12465 (define-public java-native-access-platform
12467 (inherit java-native-access)
12468 (name "java-native-access-platform")
12470 `(#:test-target "test"
12471 #:tests? #f; require jna-test.jar
12473 (modify-phases %standard-phases
12474 (add-before 'build 'chdir
12476 (chdir "contrib/platform")
12478 (add-after 'chdir 'fix-ant
12479 (lambda* (#:key inputs #:allow-other-keys)
12480 (substitute* "nbproject/project.properties"
12481 (("../../build/jna.jar")
12482 (string-append (assoc-ref inputs "java-native-access")
12483 "/share/java/jna.jar"))
12484 (("../../lib/hamcrest-core-.*.jar")
12485 (car (find-files (assoc-ref inputs "java-hamcrest-core")
12487 (("../../lib/junit.jar")
12488 (car (find-files (assoc-ref inputs "java-junit")
12492 (install-jars "dist")))))
12494 `(("java-native-access" ,java-native-access)))
12495 (synopsis "Cross-platform mappings for jna")
12496 (description "java-native-access-platform has cross-platform mappings
12497 and mappings for a number of commonly used platform functions, including a
12498 large number of Win32 mappings as well as a set of utility classes that
12499 simplify native access.")))
12501 (define-public java-jsch-agentproxy-core
12503 (name "java-jsch-agentproxy-core")
12507 (uri (string-append "https://github.com/ymnk/jsch-agent-proxy/archive/"
12508 version ".tar.gz"))
12509 (file-name (string-append name "-" version ".tar.gz"))
12512 "02iqg6jbc1kxvfzqcg6wy9ygqxfm82bw5rf6vnswqy4y572niz4q"))))
12513 (build-system ant-build-system)
12515 `(#:jar-name "jsch-agentproxy-core.jar"
12516 #:source-dir "jsch-agent-proxy-core/src/main/java"
12517 #:tests? #f)); no tests
12518 (home-page "https://github.com/ymnk/jsch-agent-proxy")
12519 (synopsis "Core component of the proxy to ssh-agent and Pageant in Java")
12520 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
12521 and Pageant included Putty. It will be easily integrated into JSch, and users
12522 will be allowed to use these programs for authentication.")
12523 (license license:bsd-3)))
12525 (define-public java-jsch-agentproxy-sshagent
12527 (inherit java-jsch-agentproxy-core)
12528 (name "java-jsch-agentproxy-sshagent")
12530 `(#:jar-name "jsch-agentproxy-sshagent.jar"
12531 #:source-dir "jsch-agent-proxy-sshagent/src/main/java"
12532 #:tests? #f)); no tests
12534 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
12535 (synopsis "Proxy to ssh-agent")
12536 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
12537 and Pageant included in Putty. This component contains the code for a proxy to
12540 (define-public java-jsch-agentproxy-usocket-jna
12542 (inherit java-jsch-agentproxy-core)
12543 (name "java-jsch-agentproxy-usocket-jna")
12545 `(#:jar-name "jsch-agentproxy-usocket-jna.jar"
12546 #:source-dir "jsch-agent-proxy-usocket-jna/src/main/java"
12547 #:tests? #f)); no tests
12549 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
12550 ("java-native-access" ,java-native-access)))
12551 (synopsis "USocketFactory implementation using JNA")
12552 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
12553 and Pageant included in Putty. This component contains an implementation of
12554 USocketFactory using @dfn{JNA} (Java Native Access).")))
12556 (define-public java-jsch-agentproxy-pageant
12558 (inherit java-jsch-agentproxy-core)
12559 (name "java-jsch-agentproxy-pageant")
12561 `(#:jar-name "jsch-agentproxy-pageant.jar"
12562 #:source-dir "jsch-agent-proxy-pageant/src/main/java"
12563 #:tests? #f)); no tests
12565 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
12566 ("java-native-access" ,java-native-access)
12567 ("java-native-access-platform" ,java-native-access-platform)))
12568 (synopsis "Proxy to pageant")
12569 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
12570 and Pageant included in Putty. This component contains the code for a proxy to
12573 (define-public java-jsch-agentproxy-usocket-nc
12575 (inherit java-jsch-agentproxy-core)
12576 (name "java-jsch-agentproxy-usocket-nc")
12578 `(#:jar-name "jsch-agentproxy-usocket-nc.jar"
12579 #:source-dir "jsch-agent-proxy-usocket-nc/src/main/java"
12580 #:tests? #f)); no tests
12582 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
12583 (synopsis "USocketFactory implementation using netcat")
12584 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
12585 and Pageant included in Putty. This component contains an implementation of
12586 USocketFactory using netcat.")))
12588 (define-public java-jsch-agentproxy-connector-factory
12590 (inherit java-jsch-agentproxy-core)
12591 (name "java-jsch-agentproxy-connector-factory")
12593 `(#:jar-name "jsch-agentproxy-connector-factory.jar"
12594 #:source-dir "jsch-agent-proxy-connector-factory/src/main/java"
12595 #:tests? #f)); no tests
12597 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
12598 ("java-jsch-agentproxy-sshagent" ,java-jsch-agentproxy-sshagent)
12599 ("java-jsch-agentproxy-usocket-jna" ,java-jsch-agentproxy-usocket-jna)
12600 ("java-jsch-agentproxy-pageant" ,java-jsch-agentproxy-pageant)
12601 ("java-jsch-agentproxy-usocket-nc" ,java-jsch-agentproxy-usocket-nc)))
12602 (synopsis "Connector factory for jsch agent proxy")
12603 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
12604 and Pageant included in Putty. This component contains a connector factory.")))
12606 (define-public java-jsch-agentproxy-jsch
12608 (inherit java-jsch-agentproxy-core)
12609 (name "java-jsch-agentproxy-jsch")
12611 `(#:jar-name "jsch-agentproxy-jsch.jar"
12612 #:source-dir "jsch-agent-proxy-jsch/src/main/java"
12613 #:tests? #f)); no tests
12615 `(("java-jsch" ,java-jsch)
12616 ("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
12617 (synopsis "JSch integration library for agentproxy")
12618 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
12619 and Pageant included in Putty. This component contains a library to use
12620 jsch-agent-proxy with JSch.")))
12622 (define-public java-apache-ivy
12624 (name "java-apache-ivy")
12628 (uri (string-append "mirror://apache//ant/ivy/" version
12629 "/apache-ivy-" version "-src.tar.gz"))
12632 "1xkfn57g2m7l6y0xdq75x5rnrgk52m9jx2xah70g3ggl8750hbr0"))
12635 "java-apache-ivy-port-to-latest-bouncycastle.patch"))))
12636 (build-system ant-build-system)
12638 `(#:jar-name "ivy.jar"
12641 (modify-phases %standard-phases
12642 (add-before 'build 'remove-example
12644 (delete-file-recursively "src/example")
12646 (add-before 'build 'copy-resources
12648 (with-directory-excursion "src/java"
12649 (for-each (lambda (file)
12650 (install-file file (string-append "../../build/classes/" (dirname file))))
12652 (find-files "." ".*.css")
12653 (find-files "." ".*.ent")
12654 (find-files "." ".*.html")
12655 (find-files "." ".*.properties")
12656 (find-files "." ".*.xsd")
12657 (find-files "." ".*.xsl")
12658 (find-files "." ".*.xml"))))
12660 (add-before 'build 'fix-vfs
12663 '("src/java/org/apache/ivy/plugins/repository/vfs/VfsRepository.java"
12664 "src/java/org/apache/ivy/plugins/repository/vfs/VfsResource.java")
12665 (("import org.apache.commons.vfs") "import org.apache.commons.vfs2"))
12667 (add-before 'install 'copy-manifest
12669 (install-file "META-INF/MANIFEST.MF" "build/classes/META-INF")
12671 (add-before 'install 'repack
12673 (invoke "jar" "-cmf" "build/classes/META-INF/MANIFEST.MF" "build/jar/ivy.jar"
12674 "-C" "build/classes" ".")))
12675 (add-after 'install 'install-bin
12676 (lambda* (#:key outputs #:allow-other-keys)
12677 (let* ((bin (string-append (assoc-ref outputs "out") "/bin"))
12678 (ivy (string-append bin "/ivy"))
12679 (jar (string-append (assoc-ref outputs "out") "/share/java/ivy.jar")))
12681 (with-output-to-file ivy
12683 (display (string-append
12684 "#!" (which "sh") "\n"
12685 "if [[ -z $CLASSPATH ]]; then\n"
12686 " cp=\"" (getenv "CLASSPATH") ":" jar "\"\n"
12688 " cp=\"" (getenv "CLASSPATH") ":" jar ":$CLASSPATH\"\n"
12690 (which "java") " -cp $cp org.apache.ivy.Main $@\n"))))
12694 `(("java-bouncycastle" ,java-bouncycastle)
12695 ("java-commons-cli" ,java-commons-cli)
12696 ("java-commons-collections" ,java-commons-collections)
12697 ("java-commons-httpclient" ,java-commons-httpclient)
12698 ("java-commons-lang" ,java-commons-lang)
12699 ("java-commons-vfs" ,java-commons-vfs)
12700 ("java-jakarta-oro" ,java-jakarta-oro)
12701 ("java-jsch" ,java-jsch)
12702 ("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
12703 ("java-jsch-agentproxy-connector-factory" ,java-jsch-agentproxy-connector-factory)
12704 ("java-jsch-agentproxy-jsch" ,java-jsch-agentproxy-jsch)
12705 ("java-junit" ,java-junit)))
12706 (home-page "https://ant.apache.org/ivy")
12707 (synopsis "Dependency manager for the Java programming language")
12708 (description "Ivy is a tool for managing (recording, tracking, resolving
12709 and reporting) project dependencies. It is characterized by the following:
12712 @item flexibility and configurability - Ivy is essentially process agnostic
12713 and is not tied to any methodology or structure. Instead it provides the
12714 necessary flexibility and configurability to be adapted to a broad range
12715 of dependency management and build processes.
12716 @item tight integration with Apache Ant - while available as a standalone tool,
12717 Ivy works particularly well with Apache Ant providing a number of
12718 powerful Ant tasks ranging from dependency resolution to dependency
12719 reporting and publication.
12721 (license license:asl2.0)))
12723 (define-public java-eclipse-sisu-inject
12725 (name "java-eclipse-sisu-inject")
12729 (uri (git-reference
12730 (url "https://github.com/eclipse/sisu.inject/")
12731 (commit (string-append "releases/" version))))
12732 (file-name (git-file-name name version))
12735 "16044sizdb0rjbhlfbmcnpds5y7by7dyn9b0c11606aikqi8k3x6"))))
12736 (build-system ant-build-system)
12738 `(#:jar-name "eclipse-sisu-inject.jar"
12739 #:source-dir "org.eclipse.sisu.inject/src"
12740 #:tests? #f; no tests
12742 (modify-phases %standard-phases
12744 (install-from-pom "org.eclipse.sisu.inject/pom.xml")))))
12746 `(("java-guice" ,java-guice)
12747 ("java-sisu-inject-parent-pom" ,java-sisu-inject-parent-pom)))
12749 `(("java-guice-servlet" ,java-guice-servlet)
12750 ("java-javax-inject" ,java-javax-inject)
12751 ("java-javaee-servletapi" ,java-javaee-servletapi)
12752 ("java-junit" ,java-junit)
12753 ("java-slf4j-api" ,java-slf4j-api)
12754 ("java-jsr305" ,java-jsr305)
12755 ("java-jsr250" ,java-jsr250)
12756 ("java-cdi-api" ,java-cdi-api)
12757 ("java-osgi-framework" ,java-osgi-framework)
12758 ("java-osgi-util-tracker" ,java-osgi-util-tracker)
12759 ("java-testng" ,java-testng)))
12760 (home-page "https://www.eclipse.org/sisu/")
12761 (synopsis "Classpath scanning, auto-binding, and dynamic auto-wiring")
12762 (description "Sisu is a modular JSR330-based container that supports
12763 classpath scanning, auto-binding, and dynamic auto-wiring. Sisu uses
12764 Google-Guice to perform dependency injection and provide the core JSR330
12765 support, but removes the need to write explicit bindings in Guice modules.
12766 Integration with other containers via the Eclipse Extension Registry and the
12767 OSGi Service Registry is a goal of this project.")
12768 (license license:epl1.0)))
12770 (define java-sisu-inject-parent-pom
12772 (inherit java-eclipse-sisu-inject)
12773 (name "java-sisu-inject-parent-pom")
12777 (modify-phases %standard-phases
12778 (delete 'configure)
12781 (install-pom-file "pom.xml")))))
12782 (propagated-inputs '())))
12784 (define-public java-eclipse-sisu-plexus
12786 (name "java-eclipse-sisu-plexus")
12790 (uri (git-reference
12791 (url "https://github.com/eclipse/sisu.plexus")
12792 (commit (string-append "releases/" version))))
12793 (file-name (git-file-name name version))
12796 "17mjlajnsqnk07cc58h1qpxrif85yb2m2y0pyba48yjjgikk8r9f"))
12797 (modules '((guix build utils)))
12800 (for-each delete-file (find-files "." ".*.jar"))
12801 (rename-file "org.eclipse.sisu.plexus.tests/src"
12802 "org.eclipse.sisu.plexus.tests/java")
12804 (build-system ant-build-system)
12806 `(#:jar-name "eclipse-sisu-plexus.jar"
12807 #:source-dir "org.eclipse.sisu.plexus/src"
12808 #:test-dir "org.eclipse.sisu.plexus.tests"
12811 ;; This test fails probably because we can't generate the necessary
12813 "**/PlexusLoggingTest.*"
12814 ;; FIXME: This test fails because of some injection error
12815 "**/PlexusRequirementTest.*")
12818 (modify-phases %standard-phases
12819 (add-before 'build 'copy-resources
12821 (install-file "org.eclipse.sisu.plexus/META-INF/plexus/components.xml"
12822 "build/classes/META-INF/plexus")
12824 (add-before 'check 'build-test-jar
12826 (with-directory-excursion "org.eclipse.sisu.plexus.tests/resources/component-jar/src/main/"
12828 (with-directory-excursion "java"
12829 (apply invoke "javac" "-cp"
12830 (string-append (getenv "CLASSPATH")
12831 ":../../../../../build/classes")
12832 (find-files "." ".*.java"))
12833 (for-each (lambda (file) (install-file file (string-append "../build/" file)))
12834 (find-files "." ".*.jar")))
12835 (mkdir-p "build/META-INF/plexus")
12836 (copy-file "resources/META-INF/plexus/components.xml"
12837 "build/META-INF/plexus/components.xml")
12838 (with-directory-excursion "build"
12839 (invoke "jar" "cf" "../../../component-jar-0.1.jar" ".")))
12840 (with-directory-excursion "org.eclipse.sisu.plexus.tests/"
12841 (copy-recursively "META-INF" "../build/test-classes/META-INF")
12842 (substitute* "java/org/eclipse/sisu/plexus/DefaultPlexusContainerTest.java"
12843 (("resources/component-jar")
12844 "org.eclipse.sisu.plexus.tests/resources/component-jar")))
12847 (install-from-pom "org.eclipse.sisu.plexus/pom.xml")))))
12849 `(("java-plexus-classworlds" ,java-plexus-classworlds)
12850 ("java-plexus-utils" ,java-plexus-utils)
12851 ("java-plexus-component-annotations" ,java-plexus-component-annotations)
12852 ("java-cdi-api" ,java-cdi-api)
12853 ("java-eclipse-sisu-inject" ,java-eclipse-sisu-inject)
12854 ("java-sisu-plexus-parent-pom" ,java-sisu-plexus-parent-pom)))
12856 `(("java-osgi-framework" ,java-osgi-framework)
12857 ("java-slf4j-api" ,java-slf4j-api)
12858 ("java-javax-inject" ,java-javax-inject)
12859 ("java-guice" ,java-guice)
12860 ("java-guava" ,java-guava)
12861 ("java-aopalliance" ,java-aopalliance)
12862 ("java-asm" ,java-asm)
12863 ("java-cglib" ,java-cglib)))
12865 `(("java-junit" ,java-junit)))
12866 (home-page "https://www.eclipse.org/sisu/")
12867 (synopsis "Plexus support for the sisu container")
12868 (description "Sisu is a modular JSR330-based container that supports
12869 classpath scanning, auto-binding, and dynamic auto-wiring. This package
12870 adds Plexus support to the Sisu-Inject container.")
12871 (license license:epl1.0)))
12873 (define java-sisu-plexus-parent-pom
12875 (inherit java-eclipse-sisu-plexus)
12876 (name "java-sisu-plexus-parent-pom")
12880 (modify-phases %standard-phases
12881 (delete 'configure)
12884 (install-pom-file "pom.xml")))))
12886 `(("java-sonatype-oss-parent-pom-9" ,java-sonatype-oss-parent-pom-9)))))
12888 (define-public java-commons-compiler
12890 (name "java-commons-compiler")
12894 (uri (git-reference
12895 (url "https://github.com/janino-compiler/janino")
12896 (commit "91aa95686d1e4ca3b16a984a03a38686572331b2")))
12897 (file-name (string-append name "-" version))
12900 "04hfdl59sgh20qkxzgnibvs8f9hy6n7znxwpk611y5d89977y62r"))
12901 (modules '((guix build utils)))
12904 (for-each delete-file
12905 (find-files "." "\\.jar$"))
12907 (build-system ant-build-system)
12909 `(#:jar-name "commons-compiler.jar"
12910 #:source-dir "commons-compiler/src/main"
12911 #:tests? #f)); no tests
12912 (home-page "https://github.com/janino-compiler/janino")
12913 (synopsis "Java compiler")
12914 (description "Commons-compiler contains an API for janino, including the
12915 @code{IExpressionEvaluator}, @code{IScriptEvaluator}, @code{IClassBodyEvaluator}
12916 and @code{ISimpleCompiler} interfaces.")
12917 (license license:bsd-3)))
12919 (define-public java-janino
12921 (inherit java-commons-compiler)
12922 (name "java-janino")
12924 `(#:jar-name "janino.jar"
12925 #:source-dir "src/main/java"
12927 (modify-phases %standard-phases
12928 (add-before 'configure 'chdir
12933 `(("java-commons-compiler" ,java-commons-compiler)))
12935 `(("java-junit" ,java-junit)
12936 ("java-hamcrest-core" ,java-hamcrest-core)))
12937 (description "Janino is a Java compiler. Janino can compile a set of
12938 source files to a set of class files like @code{javac}, but also compile a
12939 Java expression, block, class body or source file in memory, load the bytecode
12940 and execute it directly in the same JVM. @code{janino} can also be used for
12941 static code analysis or code manipulation.")))
12943 (define-public java-logback-core
12945 (name "java-logback-core")
12949 (uri (string-append "https://github.com/qos-ch/logback/archive/v_"
12950 version ".tar.gz"))
12951 (file-name (string-append name "-" version ".tar.gz"))
12954 "1x6ga74yfgm94cfx98gybakbrlilx8i2gn6dx13l40kasmys06mi"))
12955 (modules '((guix build utils)))
12958 (delete-file-recursively "logback-access/lib")
12960 (build-system ant-build-system)
12962 `(#:jar-name "logback.jar"
12963 #:source-dir "src/main/java"
12964 #:test-dir "src/test"
12966 ;; These tests fail with Unable to set MockitoNamingPolicy on cglib generator
12967 ;; which creates FastClasses
12968 (list "**/AllCoreTest.*"
12969 "**/AutoFlushingObjectWriterTest.*"
12971 "**/ResilientOutputStreamTest.*"
12972 ;; And we still don't want to run abstract classes
12975 (modify-phases %standard-phases
12976 (add-before 'configure 'chdir
12978 (chdir "logback-core")
12981 `(("java-javax-mail" ,java-javax-mail)
12982 ("servlet" ,java-javaee-servletapi)
12983 ("java-commons-compiler" ,java-commons-compiler)
12984 ("java-janino" ,java-janino)))
12986 `(("java-junit" ,java-junit)
12987 ("java-hamcrest-core" ,java-hamcrest-core)
12988 ("java-mockito-1" ,java-mockito-1)
12989 ("java-cglib" ,java-cglib)
12990 ("java-asm" ,java-asm)
12991 ("java-objenesis" ,java-objenesis)
12992 ("java-joda-time" ,java-joda-time)))
12993 (home-page "https://logback.qos.ch")
12994 (synopsis "Logging for java")
12995 (description "Logback is intended as a successor to the popular log4j project.
12996 This module lays the groundwork for the other two modules.")
12997 ;; Either epl1.0 or lgpl2.1
12998 (license (list license:epl1.0
12999 license:lgpl2.1))))
13001 (define-public java-logback-classic
13003 (inherit java-logback-core)
13004 (name "java-logback-classic")
13006 `(#:jar-name "logback-classic.jar"
13007 #:source-dir "src/main/java"
13008 #:test-dir "src/test"
13009 #:tests? #f; tests require more packages: h2, greenmail, hsql, subethamail, slf4j, log4j, felix
13012 (modify-phases %standard-phases
13013 (add-before 'configure 'chdir
13015 (chdir "logback-classic")
13018 (lambda* (#:key inputs #:allow-other-keys)
13019 (mkdir-p "build/classes")
13020 (setenv "CLASSPATH"
13022 (apply append (map (lambda (input)
13023 (find-files (assoc-ref inputs input)
13025 '("java-logback-core" "java-slf4j-api"
13026 "java-commons-compiler" "servlet"
13029 (apply invoke "groovyc" "-d" "build/classes" "-j"
13030 (find-files "src/main/" ".*\\.(groovy|java)$"))
13031 (invoke "ant" "jar")
13034 `(("java-logback-core" ,java-logback-core)
13035 ("java-slf4j-api" ,java-slf4j-api)
13036 ,@(package-inputs java-logback-core)))
13038 `(("groovy" ,groovy)))
13039 (description "Logback is intended as a successor to the popular log4j project.
13040 This module can be assimilated to a significantly improved version of log4j.
13041 Moreover, @code{logback-classic} natively implements the slf4j API so that you
13042 can readily switch back and forth between logback and other logging frameworks
13043 such as log4j or @code{java.util.logging} (JUL).")))
13045 (define-public java-jgit
13048 (version "4.7.0.201704051617-r")
13051 (uri (string-append "https://repo1.maven.org/maven2/"
13052 "org/eclipse/jgit/org.eclipse.jgit/"
13053 version "/org.eclipse.jgit-"
13054 version "-sources.jar"))
13057 "13ii4jn02ynzq6i7gsyi21k2i94jpc85wf6bcm31q4cyvzv0mk4k"))))
13058 (build-system ant-build-system)
13060 `(#:tests? #f ; There are no tests to run.
13061 #:jar-name "jgit.jar"
13062 ;; JGit must be built with a JDK supporting Java 8.
13064 ;; Target our older default JDK.
13065 #:make-flags (list "-Dtarget=1.7")
13067 (modify-phases %standard-phases
13068 ;; The jar file generated by the default build.xml does not include
13069 ;; the text properties files, so we need to add them.
13070 (add-after 'build 'add-properties
13071 (lambda* (#:key jar-name #:allow-other-keys)
13072 (with-directory-excursion "src"
13073 (apply invoke "jar" "-uf"
13074 (string-append "../build/jar/" jar-name)
13075 (find-files "." "\\.properties$")))
13078 `(("java-classpathx-servletapi" ,java-classpathx-servletapi)
13079 ("java-javaewah" ,java-javaewah)
13080 ("java-jsch" ,java-jsch)
13081 ("java-slf4j-api" ,java-slf4j-api)))
13082 (home-page "https://eclipse.org/jgit/")
13083 (synopsis "Java library implementing the Git version control system")
13084 (description "JGit is a lightweight, pure Java library implementing the
13085 Git version control system, providing repository access routines, support for
13086 network protocols, and core version control algorithms.")
13087 (license license:edl1.0)))
13089 ;; For axoloti. This package can still be built with icedtea-7, which is
13090 ;; currently used as the default JDK.
13091 (define-public java-jgit-4.2
13092 (package (inherit java-jgit)
13093 (version "4.2.0.201601211800-r")
13096 (uri (string-append "https://repo1.maven.org/maven2/"
13097 "org/eclipse/jgit/org.eclipse.jgit/"
13098 version "/org.eclipse.jgit-"
13099 version "-sources.jar"))
13102 "15gm537iivhnzlkjym4x3wn5jqdjdragsw9pdpzqqg21nrc817mm"))))
13103 (build-system ant-build-system)
13105 (substitute-keyword-arguments (package-arguments java-jgit)
13106 ;; Build for default JDK.
13107 ((#:jdk _) icedtea-7)
13109 `(modify-phases ,phases
13110 (add-after 'unpack 'use-latest-javaewah-API
13112 (substitute* "src/org/eclipse/jgit/internal/storage/file/BitmapIndexImpl.java"
13113 (("wordinbits") "WORD_IN_BITS"))
13116 `(("java-javaewah" ,java-javaewah)
13117 ("java-jsch" ,java-jsch)
13118 ("java-slf4j-api" ,java-slf4j-api)))))
13120 (define-public abcl
13127 (uri (string-append "https://abcl.org/releases/"
13128 version "/abcl-src-" version ".tar.gz"))
13131 "0hvbcsffr8n2xwdixc8wyw1bfl9fxn2gyy0c4nma7j9zbn0wwgw9"))
13134 "abcl-fix-build-xml.patch"))))
13135 (build-system ant-build-system)
13137 `(("java-junit" ,java-junit)))
13139 `(#:build-target "abcl.jar"
13140 #:test-target "abcl.test"
13142 (modify-phases %standard-phases
13144 (lambda* (#:key outputs #:allow-other-keys)
13145 (let ((share (string-append (assoc-ref outputs "out")
13147 (bin (string-append (assoc-ref outputs "out")
13150 (install-file "dist/abcl.jar" share)
13151 (install-file "dist/abcl-contrib.jar" share)
13153 (with-output-to-file (string-append bin "abcl")
13155 (let ((classpath (string-append
13158 share "abcl-contrib.jar")))
13159 (display (string-append
13160 "#!" (which "sh") "\n"
13161 "if [[ -z $CLASSPATH ]]; then\n"
13162 " cp=\"" classpath "\"\n"
13164 " cp=\"" classpath ":$CLASSPATH\"\n"
13166 "exec " (which "java")
13167 " -cp $cp org.armedbear.lisp.Main $@\n")))))
13168 (chmod (string-append bin "abcl") #o755)
13170 (home-page "https://abcl.org/")
13171 (synopsis "Common Lisp Implementation on the JVM")
13173 "@dfn{Armed Bear Common Lisp} (ABCL) is a full implementation of the Common
13174 Lisp language featuring both an interpreter and a compiler, running in the
13175 JVM. It supports JSR-223 (Java scripting API): it can be a scripting engine
13176 in any Java application. Additionally, it can be used to implement (parts of)
13177 the application using Java to Lisp integration APIs.")
13178 (license (list license:gpl2+
13179 ;; named-readtables is released under 3 clause BSD
13181 ;; jfli is released under CPL 1.0
13184 (define-public java-jsonp-api
13186 (name "java-jsonp-api")
13190 (uri (git-reference
13191 (url "https://github.com/eclipse-ee4j/jsonp")
13192 (commit (string-append "1.1-" version "-RELEASE"))))
13193 (file-name (git-file-name name version))
13196 "0zrj03hkr3jdmqlb4ipjr37cqpp2q2814qpmxi7srlwpdqs0ibgc"))))
13197 (build-system ant-build-system)
13199 `(#:jar-name "jsonp-api.jar"
13201 #:source-dir "api/src/main/java"
13202 #:test-dir "api/src/test"))
13203 (home-page "https://eclipse-ee4j.github.io/jsonp/")
13204 (synopsis "JSON Processing in Java")
13205 (description "JSON Processing (JSON-P) is a Java API to process (e.g.
13206 parse, generate, transform and query) JSON messages. It produces and
13207 consumes JSON text in a streaming fashion (similar to StAX API for XML)
13208 and allows building a Java object model for JSON text using API classes
13209 (similar to DOM API for XML).")
13210 ;; either gpl2 only with classpath exception, or epl2.0.
13211 (license (list license:gpl2
13214 (define-public java-jsonp-impl
13216 (inherit java-jsonp-api)
13217 (name "java-jsonp-impl")
13219 `(#:jar-name "jsonp-impl.jar"
13221 #:source-dir "impl/src/main/java"
13222 #:test-dir "impl/src/test"
13224 (modify-phases %standard-phases
13225 (add-before 'build 'copy-resources
13228 "impl/src/main/resources/"
13232 `(("java-jsonp-api" ,java-jsonp-api)))
13233 (description "JSON Processing (JSON-P) is a Java API to process (e.g.
13234 parse, generate, transform and query) JSON messages. This package contains
13235 a reference implementation of that API.")))
13237 (define-public java-xmp
13243 (uri (string-append "http://download.macromedia.com/pub/developer"
13244 "/xmp/sdk/XMPCoreJava-" version ".zip"))
13247 "14nai2mmsg7l5ya2y5mx4w4lr1az3sk2fjz6hiy4zdrsavgvl1g7"))))
13248 (build-system ant-build-system)
13250 `(#:build-target "build"
13251 #:tests? #f; no tests
13253 (modify-phases %standard-phases
13254 (add-after 'unpack 'chdir
13258 (add-before 'build 'fix-timestamp
13260 (substitute* "build.xml"
13261 (("\\$\\{BuildDate\\}") "1970 Jan 01 00:00:00-GMT"))
13264 (install-jars "."))
13265 (add-after 'install 'install-doc
13266 (lambda* (#:key outputs #:allow-other-keys)
13269 (string-append (assoc-ref outputs "out") "/share/doc/java-xmp"))
13272 `(("unzip" ,unzip)))
13273 (home-page "https://www.adobe.com/devnet/xmp.html")
13274 (synopsis "Extensible Metadat Platform (XMP) support in Java")
13275 (description "Adobe's Extensible Metadata Platform (XMP) is a labeling
13276 technology that allows you to embed data about a file, known as metadata,
13277 into the file itself. The XMP Toolkit for Java is based on the C++ XMPCore
13278 library and the API is similar.")
13279 (license license:bsd-3)))
13281 (define-public java-metadata-extractor
13283 (name "java-metadata-extractor")
13287 (uri (git-reference
13288 (url "https://github.com/drewnoakes/metadata-extractor")
13290 (file-name (git-file-name name version))
13293 "06yrq0swrl1r40yjbk5kqzjxr04jlkq9lfi711jvfgjf5kp2qinj"))))
13294 (build-system ant-build-system)
13296 `(#:jar-name "metadata-extractor.jar"
13297 #:source-dir "Source"
13300 (modify-phases %standard-phases
13301 (add-before 'check 'fix-test-dir
13303 (substitute* "build.xml"
13304 (("/java\">") "\">"))
13307 `(("java-xmp" ,java-xmp)))
13309 `(("java-hamcrest-core" ,java-hamcrest-core)
13310 ("java-junit" ,java-junit)))
13311 (home-page "https://github.com/drewnoakes/metadata-extractor")
13312 (synopsis "Extract metadata from image and video files")
13313 (description "Metadata-extractor is a straightforward Java library for
13314 reading metadata from image files. It is able to read metadata in Exif,
13315 IPTC, XMP, ICC and more formats.")
13316 (license license:asl2.0)))
13318 (define-public java-svg-salamander
13320 (name "java-svg-salamander")
13324 (uri (git-reference
13325 (url "https://github.com/blackears/svgSalamander")
13326 (commit (string-append "v" version))))
13327 (file-name (git-file-name name version))
13330 "1zv3kjdkf6iqf02x6ln76254y634j2ji448y706a65lsbfjmmicf"))
13331 (modules '((guix build utils)))
13334 (for-each delete-file (find-files "." ".*.jar"))
13337 (search-patches "java-svg-salamander-Fix-non-det.patch"))))
13338 (build-system ant-build-system)
13340 `(#:tests? #f; no tests
13342 (modify-phases %standard-phases
13343 (add-after 'unpack 'chdir
13347 (add-before 'build 'copy-jars
13348 (lambda* (#:key inputs #:allow-other-keys)
13349 (copy-file (car (find-files (assoc-ref inputs "javacc") "\\.jar$"))
13350 "../libraries/javacc.jar")
13351 (copy-file (car (find-files (assoc-ref inputs "ant") "ant\\.jar$"))
13352 "../libraries/ant.jar")
13355 (install-jars "dist")))))
13357 `(("javacc" ,javacc)))
13358 (home-page "https://github.com/blackears/svgSalamander")
13359 (synopsis "SVG engine for Java")
13360 (description "SVG Salamander is an SVG engine for Java that's designed
13361 to be small, fast, and allow programmers to use it with a minimum of fuss.
13362 It's in particular targeted for making it easy to integrate SVG into Java
13363 games and making it much easier for artists to design 2D game content - from
13364 rich interactive menus to charts and graphcs to complex animations.")
13365 (license license:bsd-2)))
13367 (define-public java-jboss-transaction-api-spec
13369 (name "java-jboss-transaction-api-spec")
13370 (version "1.2+1.1.1")
13373 (uri (git-reference
13374 (url "https://github.com/jboss/jboss-transaction-api_spec")
13375 (commit "jboss-transaction-api_1.2_spec-1.1.1.Final")))
13376 (file-name (git-file-name name version))
13379 "1xbfq5hvb86izflydxrqqv3k26c1ba2m0ap6m97shqrsdi9by4wy"))))
13380 (build-system ant-build-system)
13382 `(#:jar-name "java-jboss-transaction-api_spec.jar"
13383 #:source-dir "src/main/java"
13384 #:tests? #f)); no tests
13386 `(("java-cdi-api" ,java-cdi-api)
13387 ("java-jboss-interceptors-api-spec" ,java-jboss-interceptors-api-spec)))
13388 (home-page "https://github.com/jboss/jboss-transaction-api_spec")
13389 (synopsis "Generic transaction management API in Java")
13390 (description "Java-jboss-transaction-api-spec implements the Transactions
13391 API. A transaction is a unit of work containing one or more operations
13392 involving one or more shared resources having ACID (Atomicity, Consistency,
13393 Isolation and Durability) properties.")
13394 ;; either gpl2 only with classpath exception or cddl.
13395 (license (list license:gpl2 license:cddl1.0))))
13397 (define-public java-picocli
13399 (name "java-picocli")
13403 (uri (git-reference
13404 (url "https://github.com/remkop/picocli")
13405 (commit (string-append "v" version))))
13406 (file-name (git-file-name name version))
13409 "1sxp6rxjfgjd98ly14b3d15dvxkm5wg4g46w12jyhmr0kmkaca3c"))))
13410 (build-system ant-build-system)
13412 `(#:jar-name "picocli.jar"
13413 #:source-dir "src/main/java"
13414 ;; Tests require missing dependencies (junitparams, system-rules)
13416 (home-page "https://picocli.info")
13417 (synopsis "REPL for the JVM")
13418 (description "Picocli is a framework for building command line applications
13419 for the JVM. It supports colors, autocompletion, subcommands, and more. Written
13420 in Java, usable from Groovy, Kotlin, Scala, etc.")
13421 (license license:asl2.0)))
13423 (define-public java-jetbrains-annotations
13425 (name "java-jetbrains-annotations")
13429 (uri (git-reference
13430 (url "https://github.com/JetBrains/java-annotations")
13432 (file-name (git-file-name name version))
13435 "0z6i1xs60cd5ffz23c49sq68wn5mphhs3xpar1n93ppama2ng80v"))))
13436 (build-system ant-build-system)
13438 `(#:jar-name "jetbrains-annotations.jar"
13439 #:source-dir "common/src/main/java:java8/src/main/java"
13440 #:tests? #f)); no tests
13441 (home-page "https://github.com/JetBrains/java-annotations")
13442 (synopsis "Annotations for Java and other JVM languages")
13443 (description "This package contains a set of Java annotations which can be
13444 used in JVM-based languages. They serve as an additional documentation and
13445 can be interpreted by IDEs and static analysis tools to improve code analysis.")
13446 (license license:expat)))
13448 (define-public java-javaparser
13450 (name "java-javaparser")
13454 (uri (git-reference
13455 (url "https://github.com/javaparser/javaparser")
13456 (commit (string-append "javaparser-parent-" version))))
13457 (file-name (git-file-name name version))
13460 "1a4jk12ffa31fa0y8vda0739vpfj1206p0nha842b7bixbvwamv9"))
13461 (modules '((guix build utils)))
13464 (for-each delete-file
13465 (find-files "." "\\.jar$"))
13467 (build-system ant-build-system)
13469 `(#:tests? #f; tests require jbehave and junit5
13471 (modify-phases %standard-phases
13472 (add-before 'build 'fill-template
13474 (with-directory-excursion "javaparser-core/src/main"
13475 (copy-file "java-templates/com/github/javaparser/JavaParserBuild.java"
13476 "java/com/github/javaparser/JavaParserBuild.java")
13477 (substitute* "java/com/github/javaparser/JavaParserBuild.java"
13478 (("\\$\\{project.version\\}") ,version)
13479 (("\\$\\{project.name\\}") "javaparser")
13480 (("\\$\\{project.build.finalName\\}") "javaparser")
13481 (("\\$\\{maven.version\\}") "fake")
13482 (("\\$\\{maven.build.version\\}") "fake")
13483 (("\\$\\{build.timestamp\\}") "0")
13484 (("\\$\\{java.vendor\\}") "Guix")
13485 (("\\$\\{java.vendor.url\\}") "https://gnu.org/software/guix")
13486 (("\\$\\{java.version\\}") "1.8")
13487 (("\\$\\{os.arch\\}") "any")
13488 (("\\$\\{os.name\\}") "GuixSD")
13489 (("\\$\\{os.version\\}") "not available")))
13491 (add-before 'build 'generate-javacc
13493 (with-directory-excursion "javaparser-core/src/main/java"
13494 (invoke "java" "javacc" "../javacc/java.jj"))
13496 (add-before 'build 'copy-javacc-support
13498 (with-directory-excursion "javaparser-core/src/main"
13499 (copy-recursively "javacc-support" "java"))
13503 (define (build name)
13504 (format #t "Building ~a~%" name)
13505 (delete-file-recursively "build/classes")
13506 (mkdir-p "build/classes")
13507 (apply invoke "javac"
13508 "-cp" (string-append (getenv "CLASSPATH") ":"
13509 (string-join (find-files "build/jar" ".")
13511 "-d" "build/classes"
13512 (find-files (string-append name "/src/main/java")
13514 (invoke "jar" "-cf" (string-append "build/jar/" name ".jar")
13515 "-C" "build/classes" "."))
13516 (mkdir-p "build/classes")
13517 (mkdir-p "build/test-classes")
13518 (mkdir-p "build/jar")
13519 (build "javaparser-core")
13520 (build "javaparser-core-serialization")
13521 (build "javaparser-core-generators")
13522 (build "javaparser-core-metamodel-generator")
13523 (build "javaparser-symbol-solver-core")
13526 (install-jars "build/jar")))))
13528 `(("java-guava" ,java-guava)
13529 ("java-jboss-javassist" ,java-jboss-javassist)
13530 ("java-jsonp-api" ,java-jsonp-api)))
13532 `(("javacc" ,javacc)))
13533 (home-page "http://javaparser.org/")
13534 (synopsis "Parser for Java")
13536 "This project contains a set of libraries implementing a Java 1.0 - Java
13537 11 Parser with advanced analysis functionalities.")
13539 ;; either lgpl or asl