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 (modules '((guix build utils)))
833 (substitute* "Makefile.in"
834 ;; do not leak information about the build host
835 (("DISTRIBUTION_ID=\"\\$\\(DIST_ID\\)\"")
836 "DISTRIBUTION_ID=\"\\\"guix\\\"\""))
838 (build-system gnu-build-system)
839 (outputs '("out" ; Java Runtime Environment
840 "jdk" ; Java Development Kit
841 "doc")) ; all documentation
843 `(;; There are many failing tests and many are known to fail upstream.
846 ;; The DSOs use $ORIGIN to refer to each other, but (guix build
847 ;; gremlin) doesn't support it yet, so skip this phase.
848 #:validate-runpath? #f
850 #:modules ((guix build utils)
851 (guix build gnu-build-system)
855 `("--enable-bootstrap"
858 "--with-parallel-jobs"
859 "--disable-downloading"
861 ,(string-append "--with-ecj="
862 (assoc-ref %build-inputs "ecj")
863 "/share/java/ecj-bootstrap.jar")
864 ,(string-append "--with-jar="
865 (assoc-ref %build-inputs "fastjar")
867 ,(string-append "--with-jdk-home="
868 (assoc-ref %build-inputs "classpath"))
869 ,(string-append "--with-java="
870 (assoc-ref %build-inputs "jamvm")
873 (modify-phases %standard-phases
875 (lambda* (#:key source inputs #:allow-other-keys)
876 (invoke "tar" "xvf" source)
877 (chdir (string-append "icedtea6-" ,version))
879 (copy-recursively (assoc-ref inputs "openjdk-src") "openjdk")
880 ;; The convenient OpenJDK source bundle is no longer
881 ;; available for download, so we have to take the sources
882 ;; from the Mercurial repositories and change the Makefile
883 ;; to avoid tests for the OpenJDK zip archive.
884 (with-directory-excursion "openjdk"
885 (for-each (lambda (part)
889 (string-append part "-src"))
892 "langtools" "jaxp" "jaxws")))
893 (with-directory-excursion "openjdk"
894 (invoke "tar" "xvf" (assoc-ref inputs "hotspot-src"))
895 (rename-file "hg-checkout" "hotspot"))
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"))
1123 (search-patches "icedtea-6-hotspot-gcc-segfault-workaround.patch"))))
1128 (url "http://hg.openjdk.java.net/jdk6/jdk6/corba/")
1129 (changeset "jdk6-b41")))
1132 "1p9g1r9dnax2iwp7yb59qx7m4nmshqhwmrb2b8jj8zgbd9dl2i3q"))))
1137 (url "http://hg.openjdk.java.net/jdk6/jdk6/langtools/")
1138 (changeset "jdk6-b41")))
1141 "1x52wd67fynbbd9ild6fb4wvba3f5hhwk03qdjfazd0a1qr37z3d"))))
1146 (url "http://hg.openjdk.java.net/jdk6/jdk6/jaxp/")
1147 (changeset "jdk6-b41")))
1150 "0shlqrvzpr4nrkmv215lbxnby63s3yvbdh1yxcayznsyqwa4nlxm"))))
1155 (url "http://hg.openjdk.java.net/jdk6/jdk6/jaxws/")
1156 (changeset "jdk6-b41")))
1159 "0835lkw8vib1xhp8lxnybhlvzdh699hbi4mclxanydjk63zbpxk0"))))))
1160 (home-page "http://icedtea.classpath.org")
1161 (synopsis "Java development kit")
1163 "This package provides the OpenJDK built with the IcedTea build harness.
1164 This version of the OpenJDK is no longer maintained and is only used for
1165 bootstrapping purposes.")
1166 ;; IcedTea is released under the GPL2 + Classpath exception, which is the
1167 ;; same license as both GNU Classpath and OpenJDK.
1168 (license license:gpl2+)))
1170 (define-public icedtea-7
1171 (let* ((version "2.6.13")
1172 (drop (lambda (name hash)
1176 "http://icedtea.classpath.org/download/drops"
1177 "/icedtea7/" version "/" name ".tar.bz2"))
1178 (sha256 (base32 hash))))))
1185 "http://icedtea.wildebeest.org/download/source/icedtea-"
1189 "1w331rdqx1dcx2xb0fmjmrkdc71xqn20fxsgw8by4xhiblh88khh"))
1190 (modules '((guix build utils)))
1193 (substitute* "Makefile.in"
1194 ;; do not leak information about the build host
1195 (("DISTRIBUTION_ID=\"\\$\\(DIST_ID\\)\"")
1196 "DISTRIBUTION_ID=\"\\\"guix\\\"\""))
1198 (build-system gnu-build-system)
1199 (outputs '("out" ; Java Runtime Environment
1200 "jdk" ; Java Development Kit
1201 "doc")) ; all documentation
1203 `(;; There are many test failures. Some are known to
1204 ;; fail upstream, others relate to not having an X
1205 ;; server running at test time, yet others are a
1206 ;; complete mystery to me.
1208 ;; hotspot: passed: 241; failed: 45; error: 2
1209 ;; langtools: passed: 1,934; failed: 26
1213 ;; The DSOs use $ORIGIN to refer to each other, but (guix build
1214 ;; gremlin) doesn't support it yet, so skip this phase.
1215 #:validate-runpath? #f
1217 ;; Apparently, the C locale is needed for some of the tests.
1220 #:modules ((guix build utils)
1221 (guix build gnu-build-system)
1228 ;; TODO: package pcsc and sctp, and add to inputs
1229 `("--disable-system-pcsc"
1230 "--disable-system-sctp"
1231 "--enable-bootstrap"
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-gcc-segfault-workaround.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 "--disable-downloading"
1766 "--disable-system-pcsc"
1767 "--disable-system-sctp"
1768 "--disable-tests" ;they are run in the check phase instead
1769 "--with-openjdk-src-dir=./openjdk.src"
1770 ,(string-append "--with-jdk-home=" jdk))))
1772 `(modify-phases ,phases
1773 (delete 'fix-x11-extension-include-path)
1774 (delete 'patch-paths)
1775 (delete 'set-additional-paths)
1776 (delete 'patch-patches)
1777 (delete 'patch-bitrot)
1778 ;; Prevent the keytool from recording the current time when
1779 ;; adding certificates at build time.
1780 (add-after 'unpack 'patch-keystore
1782 (substitute* "openjdk.src/jdk/src/share/classes/sun/security/provider/JavaKeyStore.java"
1783 (("date = new Date\\(\\);")
1785 date = (System.getenv(\"SOURCE_DATE_EPOCH\") != null) ?\
1786 new Date(Long.parseLong(System.getenv(\"SOURCE_DATE_EPOCH\"))) :\
1789 (add-after 'unpack 'patch-jni-libs
1790 ;; Hardcode dynamically loaded libraries.
1792 (let* ((library-path (search-path-as-string->list
1793 (getenv "LIBRARY_PATH")))
1794 (find-library (lambda (name)
1797 (string-append "lib" name ".so")))))
1800 (catch 'decoding-error
1803 (("VERSIONED_JNI_LIB_NAME\\(\"(.*)\", \"(.*)\"\\)"
1805 (format #f "\"~a\"" (find-library name)))
1806 (("JNI_LIB_NAME\\(\"(.*)\"\\)" _ name)
1807 (format #f "\"~a\"" (find-library name)))))
1809 ;; Those are safe to skip.
1810 (format (current-error-port)
1811 "warning: failed to substitute: ~a~%"
1813 (find-files "openjdk.src/jdk/src/solaris/native"
1817 (lambda* (#:key outputs #:allow-other-keys)
1818 (let ((doc (string-append (assoc-ref outputs "doc")
1819 "/share/doc/icedtea"))
1820 (jre (assoc-ref outputs "out"))
1821 (jdk (assoc-ref outputs "jdk")))
1822 (copy-recursively "openjdk.build/docs" doc)
1823 (copy-recursively "openjdk.build/images/j2re-image" jre)
1824 (copy-recursively "openjdk.build/images/j2sdk-image" jdk)
1825 ;; Install the nss.cfg file to JRE to enable SSL/TLS
1827 (copy-file (string-append jdk "/jre/lib/security/nss.cfg")
1828 (string-append jre "/lib/security/nss.cfg"))
1830 (add-after 'install 'strip-jar-timestamps
1831 (assoc-ref ant:%standard-phases 'strip-jar-timestamps)))))))
1833 `(("jdk" ,icedtea-7 "jdk")
1836 "1mj6xgmw31i6qd30qi9dmv7160fbcfq5ikz1jwjihdg2793il19p"))
1839 "1wb8k5zm40zld0986dvmlh5xh3gyixbg9h26sl662zy92amhmyyg"))
1842 "11ma4zz0599cy70xd219v7a8vin7p96xrhhz3wsaw6cjhkzpagah"))
1845 "14m1y0z0fbm5z5zjw3vnq85py8dma84bi3f9cw8rhdyc6skk8q4i"))
1848 "09andnm6xaasnp963hgx42yiflifiljp9z7z85jrfyc5z8a5whmf"))
1851 "0s6lcpc0zckz2fnq98aqf28nz9y3wbi41a3kyaqqa2abwbkm1zwl"))
1854 "15wizy123vhk40chl1b4p552jf2pw2hdww0myf11qab425axz4nw"))
1859 "http://icedtea.classpath.org/download/drops"
1860 "/icedtea8/" version "/hotspot.tar.xz"))
1863 "1ciz1w9j0kz7s1dxdhyqq71nla9icyz6qvn0b9z2zgkklqa98qmm"))
1864 (patches (search-patches
1865 "icedtea-7-hotspot-gcc-segfault-workaround.patch"))))
1868 "19pzl3ppaw8j6r5cnyp8qiw3hxijh3hdc46l39g5yfhdl4pr4hpa"))
1871 "0k33anxdzw1icn072wynfmmdjhsv50hay0j1sfkfxny12rb3vgdy"))
1872 ,@(fold alist-delete (package-native-inputs icedtea-7)
1873 '("jdk" "openjdk-src" "corba-drop" "jaxp-drop" "jaxws-drop"
1874 "jdk-drop" "langtools-drop" "hotspot-drop")))))))
1876 (define-public openjdk9
1882 (uri "https://hg.openjdk.java.net/jdk/jdk/archive/3cc80be736f2.tar.bz2")
1883 (file-name (string-append name "-" version ".tar.bz2"))
1886 "01ihmyf7k5z17wbr7xig7y40l9f01d5zjgkcmawn1102hw5kchpq"))
1887 (modules '((guix build utils)))
1890 (for-each delete-file
1891 (find-files "." ".*.(bin|exe|jar)$"))
1893 (build-system gnu-build-system)
1894 (outputs '("out" "jdk" "doc"))
1896 `(#:tests? #f; require jtreg
1897 #:make-flags '("all")
1899 ((guix build syscalls)
1900 ,@%gnu-build-system-modules)
1902 (modify-phases %standard-phases
1903 (add-after 'patch-source-shebangs 'fix-java-shebangs
1905 ;; This file was "fixed" by patch-source-shebangs, but it requires
1906 ;; this exact first line.
1907 (substitute* "jdk/make/data/blacklistedcertsconverter/blacklisted.certs.pem"
1908 (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))
1911 (lambda* (#:key inputs outputs #:allow-other-keys)
1912 ;; TODO: unbundle libpng and lcms
1913 (invoke "bash" "./configure"
1914 (string-append "--with-freetype=" (assoc-ref inputs "freetype"))
1915 "--disable-freetype-bundling"
1916 "--disable-warnings-as-errors"
1917 "--disable-hotspot-gtest"
1918 "--with-giflib=system"
1919 "--with-libjpeg=system"
1920 (string-append "--prefix=" (assoc-ref outputs "out")))
1922 (add-before 'build 'write-source-revision-file
1924 (with-output-to-file ".src-rev"
1926 (display ,version)))
1929 (lambda* (#:key make-flags parallel-build? #:allow-other-keys)
1930 (apply invoke "make"
1931 `(,@(if parallel-build?
1932 (list (string-append "JOBS="
1933 (number->string (parallel-job-count))))
1936 ;; Some of the libraries in the lib/ folder link to libjvm.so.
1937 ;; But that shared object is located in the server/ folder, so it
1938 ;; cannot be found. This phase creates a symbolic link in the
1939 ;; lib/ folder so that the other libraries can find it.
1942 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
1944 ;; FIXME: Find the bug in the build system, so that this symlink is
1946 (add-after 'install 'install-libjvm
1947 (lambda* (#:key inputs outputs #:allow-other-keys)
1948 (let* ((lib-out (string-append (assoc-ref outputs "out")
1950 (lib-jdk (string-append (assoc-ref outputs "jdk")
1952 (symlink (string-append lib-jdk "/server/libjvm.so")
1953 (string-append lib-jdk "/libjvm.so"))
1954 (symlink (string-append lib-out "/server/libjvm.so")
1955 (string-append lib-out "/libjvm.so")))
1958 (lambda* (#:key outputs #:allow-other-keys)
1959 (let ((out (assoc-ref outputs "out"))
1960 (jdk (assoc-ref outputs "jdk"))
1961 (doc (assoc-ref outputs "doc"))
1962 (images (car (find-files "build" ".*-server-release"
1963 #:directories? #t))))
1964 (copy-recursively (string-append images "/images/jdk") jdk)
1965 (copy-recursively (string-append images "/images/jre") out)
1966 (copy-recursively (string-append images "/images/docs") doc))
1968 (add-after 'install 'strip-zip-timestamps
1969 (lambda* (#:key outputs #:allow-other-keys)
1970 (use-modules (guix build syscalls))
1971 (for-each (lambda (zip)
1972 (let ((dir (mkdtemp! "zip-contents.XXXXXX")))
1973 (with-directory-excursion dir
1974 (invoke "unzip" zip))
1976 (for-each (lambda (file)
1977 (let ((s (lstat file)))
1978 (unless (eq? (stat:type s) 'symlink)
1979 (format #t "reset ~a~%" file)
1980 (utime file 0 0 0 0))))
1981 (find-files dir #:directories? #t))
1982 (with-directory-excursion dir
1983 (let ((files (find-files "." ".*" #:directories? #t)))
1984 (apply invoke "zip" "-0" "-X" zip files)))))
1985 (find-files (assoc-ref outputs "doc") ".*.zip$"))
1988 `(("alsa-lib" ,alsa-lib)
1990 ("fontconfig" ,fontconfig)
1991 ("freetype" ,freetype)
1995 ("libjpeg" ,libjpeg-turbo)
1999 ("libxcomposite" ,libxcomposite)
2001 ("libxinerama" ,libxinerama)
2002 ("libxrender" ,libxrender)
2004 ("libxtst" ,libxtst)))
2006 `(("icedtea-8" ,icedtea-8)
2007 ("icedtea-8:jdk" ,icedtea-8 "jdk")
2008 ;; XXX: The build system fails with newer versions of GNU Make.
2009 ("make@4.2" ,gnu-make-4.2)
2013 (home-page "https://openjdk.java.net/projects/jdk9/")
2014 (synopsis "Java development kit")
2016 "This package provides the Java development kit OpenJDK.")
2017 (license license:gpl2+)))
2019 (define-public openjdk10
2026 (uri "http://hg.openjdk.java.net/jdk/jdk/archive/6fa770f9f8ab.tar.bz2")
2027 (file-name (string-append name "-" version ".tar.bz2"))
2030 "0zywq2203b4hx4jms9vbwvjcj1d3k2v3qpx4s33729fkpmid97r4"))
2031 (patches (search-patches
2032 "openjdk-10-idlj-reproducibility.patch"))
2033 (modules '((guix build utils)))
2036 (for-each delete-file (find-files "." ".*.(bin|exe|jar)$"))
2039 (substitute-keyword-arguments (package-arguments openjdk9)
2041 `(modify-phases ,phases
2042 (replace 'fix-java-shebangs
2044 ;; This file was "fixed" by patch-source-shebangs, but it requires
2045 ;; this exact first line.
2046 (substitute* "make/data/blacklistedcertsconverter/blacklisted.certs.pem"
2047 (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))
2050 (lambda* (#:key inputs outputs #:allow-other-keys)
2051 (invoke "bash" "./configure"
2052 (string-append "--with-freetype=" (assoc-ref inputs "freetype"))
2053 "--disable-freetype-bundling"
2054 "--disable-warnings-as-errors"
2055 "--disable-hotspot-gtest"
2056 "--with-giflib=system"
2057 "--with-libjpeg=system"
2058 "--with-native-debug-symbols=zipped"
2059 (string-append "--prefix=" (assoc-ref outputs "out")))
2062 `(("openjdk9" ,openjdk9)
2063 ("openjdk9:jdk" ,openjdk9 "jdk")
2064 ("make@4.2" ,gnu-make-4.2)
2069 (define-public openjdk11
2075 (uri "http://hg.openjdk.java.net/jdk/jdk/archive/76072a077ee1.tar.bz2")
2076 (file-name (string-append name "-" version ".tar.bz2"))
2079 "0v705w1s9lrqalzahir78pk397rkk9gfvzq821yv8h3xha0bqi6w"))
2080 (modules '((guix build utils)))
2083 (for-each delete-file (find-files "." ".*.(bin|exe|jar)$"))
2085 (build-system gnu-build-system)
2086 (outputs '("out" "jdk" "doc"))
2088 `(#:imported-modules
2089 ((guix build syscalls)
2090 (ice-9 binary-ports)
2092 ,@%gnu-build-system-modules)
2093 #:tests? #f; requires jtreg
2094 ;; TODO package jtreg
2096 `("--disable-option-checking" ; --enable-fast-install default flag errors otherwise
2097 "--disable-warnings-as-errors"
2098 ;; make validate-runpath pass, see: http://issues.guix.info/issue/32894
2099 "--with-native-debug-symbols=zipped"
2100 ;; do not use the bundled libraries
2101 "--with-giflib=system"
2102 "--with-lcms=system"
2103 "--with-libjpeg=system"
2104 "--with-libpng=system"
2105 "--with-version-pre="
2106 ;; allow the build system to locate the system freetype
2107 ,(string-append "--with-freetype-include="
2108 (assoc-ref %build-inputs "freetype") "/include")
2109 ,(string-append "--with-freetype-lib="
2110 (assoc-ref %build-inputs "freetype") "/lib"))
2112 (modify-phases %standard-phases
2113 (add-after 'patch-source-shebangs 'fix-java-shebangs
2115 ;; This file was "fixed" by patch-source-shebangs, but it requires
2116 ;; this exact first line.
2117 (substitute* "make/data/blacklistedcertsconverter/blacklisted.certs.pem"
2118 (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))
2120 (add-before 'build 'write-source-revision-file
2122 (with-output-to-file ".src-rev"
2124 (display ,version)))
2127 (lambda* (#:key parallel-build? make-flags #:allow-other-keys)
2128 (apply invoke "make" "all"
2129 `(,@(if parallel-build?
2130 (list (string-append "JOBS="
2131 (number->string (parallel-job-count))))
2134 ;; jdk 11 does not build jre by default any more
2135 ;; building it anyways
2136 ;; for further information see:
2137 ;; https://github.com/AdoptOpenJDK/openjdk-build/issues/356
2138 (add-after 'build 'build-jre
2139 (lambda* (#:key parallel-build? make-flags #:allow-other-keys)
2140 (apply invoke "make" "legacy-jre-image"
2141 `(,@(if parallel-build?
2142 (list (string-append "JOBS="
2143 (number->string (parallel-job-count))))
2147 (lambda* (#:key outputs #:allow-other-keys)
2148 (let ((out (assoc-ref outputs "out"))
2149 (jdk (assoc-ref outputs "jdk"))
2150 (doc (assoc-ref outputs "doc"))
2151 (images (car (find-files "build" ".*-server-release"
2152 #:directories? #t))))
2153 (copy-recursively (string-append images "/images/jdk") jdk)
2154 (copy-recursively (string-append images "/images/jre") out)
2155 (copy-recursively (string-append images "/images/docs") doc))
2157 ;; Some of the libraries in the lib/ folder link to libjvm.so.
2158 ;; But that shared object is located in the server/ folder, so it
2159 ;; cannot be found. This phase creates a symbolic link in the
2160 ;; lib/ folder so that the other libraries can find it.
2163 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
2165 ;; FIXME: Find the bug in the build system, so that this symlink is
2167 (add-after 'install 'install-libjvm
2168 (lambda* (#:key inputs outputs #:allow-other-keys)
2169 (let* ((lib-out (string-append (assoc-ref outputs "out")
2171 (lib-jdk (string-append (assoc-ref outputs "jdk")
2173 (symlink (string-append lib-jdk "/server/libjvm.so")
2174 (string-append lib-jdk "/libjvm.so"))
2175 (symlink (string-append lib-out "/server/libjvm.so")
2176 (string-append lib-out "/libjvm.so")))
2178 (add-after 'install 'strip-character-data-timestamps
2179 (lambda* (#:key outputs #:allow-other-keys)
2180 (use-modules (guix build syscalls))
2181 (let ((archive (string-append
2182 (assoc-ref outputs "jdk") "/lib/src.zip"))
2183 (dir (mkdtemp! "zip-contents.XXXXXX")))
2184 (with-directory-excursion dir
2185 (invoke "unzip" archive))
2186 (delete-file archive)
2187 (with-directory-excursion dir
2188 (let ((char-data-files (find-files "." "CharacterData.*")))
2189 (for-each (lambda (file)
2191 (((string-append "This file was generated "
2192 "AUTOMATICALLY from a template "
2194 (string-append "This file was generated "
2195 "AUTOMATICALLY from a template "
2198 (with-directory-excursion dir
2199 (let ((files (find-files "." ".*" #:directories? #t)))
2200 (apply invoke "zip" "-0" "-X" archive files))))))
2201 (add-after 'strip-character-data-timestamps 'strip-archive-timestamps
2202 (lambda* (#:key outputs #:allow-other-keys)
2203 (use-modules (guix build syscalls)
2204 (ice-9 binary-ports)
2206 (letrec ((repack-archive
2208 (let ((dir (mkdtemp! "zip-contents.XXXXXX")))
2209 (with-directory-excursion dir
2210 (invoke "unzip" archive))
2211 (delete-file archive)
2212 (for-each (compose repack-archive canonicalize-path)
2213 (find-files dir "(ct.sym|.*.jar)$"))
2214 (let ((reset-file-timestamp
2216 (let ((s (lstat file)))
2217 (unless (eq? (stat:type s) 'symlink)
2218 (format #t "reset ~a~%" file)
2219 (utime file 0 0 0 0))))))
2220 (for-each reset-file-timestamp
2221 (find-files dir #:directories? #t)))
2222 (with-directory-excursion dir
2223 (let ((files (find-files "." ".*" #:directories? #t)))
2224 (apply invoke "zip" "-0" "-X" archive files)))))))
2225 (for-each repack-archive
2226 (find-files (assoc-ref outputs "doc") ".*.zip$"))
2227 (for-each repack-archive
2228 (find-files (assoc-ref outputs "jdk")
2229 ".*.(zip|jar|diz)$"))
2230 (repack-archive (string-append (assoc-ref outputs "jdk") "/lib/ct.sym"))
2233 (call-with-input-file file-name
2235 (let ((header #vu8(#x4a #x4d #x01 #x00)))
2236 (if (equal? (get-bytevector-n
2237 file (bytevector-length header))
2239 (let* ((header-length (bytevector-length header))
2240 (temp-file (mkstemp!
2242 "temp-file.XXXXXX")))
2243 (temp-filename (port-filename temp-file))
2245 (- (stat:size (stat file))
2247 (sendfile temp-file file content-length header-length)
2248 (delete-file file-name)
2249 (close-port temp-file)
2250 (repack-archive (canonicalize-path temp-filename))
2251 (call-with-output-file file-name
2253 (put-bytevector file header)
2254 (call-with-input-file temp-filename
2258 (stat:size (stat temp-file)) 0)))))))))))))
2259 (for-each repack-jmod
2260 (find-files (assoc-ref outputs "jdk") ".*.jmod$")))
2262 (add-after 'install 'remove-timestamp-from-api-summary
2263 (lambda* (#:key outputs #:allow-other-keys)
2264 (substitute* (string-append (assoc-ref outputs "doc")
2265 "/api/overview-summary.html")
2266 (("Generated by javadoc \\(11-internal\\).*$")
2267 "Generated by javadoc (11-internal) -->\n"))
2270 `(("alsa-lib" ,alsa-lib)
2272 ("fontconfig" ,fontconfig)
2273 ("freetype" ,freetype)
2276 ("libjpeg" ,libjpeg-turbo)
2279 ("libxext" ,libxext)
2280 ("libxrender" ,libxrender)
2282 ("libxtst" ,libxtst)))
2284 `(("autoconf" ,autoconf)
2285 ("openjdk10" ,openjdk10)
2286 ("openjdk10:jdk" ,openjdk10 "jdk")
2287 ("make" ,gnu-make-4.2)
2288 ("pkg-config" ,pkg-config)
2292 (home-page "https://openjdk.java.net/projects/jdk/11/")
2293 (synopsis "Java development kit")
2295 "This package provides the Java development kit OpenJDK.")
2296 (license license:gpl2+)))
2298 (define-public openjdk12
2305 (uri "http://hg.openjdk.java.net/jdk/jdk/archive/0276cba45aac.tar.bz2")
2306 (file-name (string-append name "-" version ".tar.bz2"))
2309 "0mbhdrk12b6878kby0flnbak7444dlpm0ihlmf92vk59y1c02bc2"))
2310 (modules '((guix build utils)))
2313 (for-each delete-file (find-files "." ".*.(bin|exe|jar)$"))
2316 `(("alsa-lib" ,alsa-lib)
2318 ("fontconfig" ,fontconfig)
2319 ("freetype" ,freetype)
2322 ("libjpeg" ,libjpeg-turbo)
2325 ("libxext" ,libxext)
2326 ("libxrandr" ,libxrandr)
2327 ("libxrender" ,libxrender)
2329 ("libxtst" ,libxtst)))
2331 `(("autoconf" ,autoconf)
2332 ("openjdk11" ,openjdk11)
2333 ("openjdk11:jdk" ,openjdk11 "jdk")
2334 ("make@4.2" ,gnu-make-4.2)
2335 ("pkg-config" ,pkg-config)
2339 (home-page "https://openjdk.java.net/projects/jdk/12")))
2341 (define-public openjdk13
2348 (uri "http://hg.openjdk.java.net/jdk/jdk13/archive/9c250a7600e1.tar.bz2")
2349 (file-name (string-append name "-" version ".tar.bz2"))
2352 "0v0ljvx5dyzp96dw4z4ksw3pvasil7783mgnmd1wk9gads5ab8iq"))
2353 (modules '((guix build utils)))
2356 (for-each delete-file (find-files "." ".*.(bin|exe|jar)$"))
2359 `(("alsa-lib" ,alsa-lib)
2361 ("fontconfig" ,fontconfig)
2362 ("freetype" ,freetype)
2365 ("libjpeg" ,libjpeg-turbo)
2368 ("libxext" ,libxext)
2369 ("libxrandr" ,libxrandr)
2370 ("libxrender" ,libxrender)
2372 ("libxtst" ,libxtst)))
2374 `(("autoconf" ,autoconf)
2375 ("openjdk12:jdk" ,openjdk12 "jdk")
2376 ("make@4.2" ,gnu-make-4.2)
2377 ("pkg-config" ,pkg-config)
2381 (home-page "https://openjdk.java.net/projects/jdk/13")))
2383 (define-public openjdk14
2390 (uri "http://hg.openjdk.java.net/jdk/jdk14/archive/bc54620a3848.tar.bz2")
2391 (file-name (string-append name "-" version ".tar.bz2"))
2394 "0z485pk7r1xpw8004g4nrwrzj17sabgx8yfdbxwfvzkjp8qyajch"))
2395 (modules '((guix build utils)))
2398 ;; The m4 macro uses 'help' to search for builtins, which is
2399 ;; not available in bash-minimal
2400 (substitute* "make/autoconf/basics.m4"
2401 (("if help") "if command -v"))
2402 (for-each delete-file (find-files "." ".*.(bin|exe|jar)$"))
2405 `(("alsa-lib" ,alsa-lib)
2407 ("fontconfig" ,fontconfig)
2408 ("freetype" ,freetype)
2411 ("libjpeg" ,libjpeg-turbo)
2414 ("libxext" ,libxext)
2415 ("libxrandr" ,libxrandr)
2416 ("libxrender" ,libxrender)
2418 ("libxtst" ,libxtst)))
2420 `(("autoconf" ,autoconf)
2421 ("make@4.2" ,gnu-make-4.2)
2422 ("openjdk13:jdk" ,openjdk13 "jdk")
2423 ("pkg-config" ,pkg-config)
2427 (home-page "https://openjdk.java.net/projects/jdk/14")))
2429 (define-public icedtea icedtea-8)
2432 (define-public ant/java8
2433 (package (inherit ant-bootstrap)
2438 (uri (string-append "mirror://apache/ant/source/apache-ant-"
2439 version "-src.tar.gz"))
2442 "066k2isig5xm70cihj9p73hkp5w7h5zbfqz5kxb6cwr9cb86xl2k"))
2443 (modules '((guix build utils)))
2446 (for-each delete-file
2447 (find-files "lib/optional" "\\.jar$"))
2450 (substitute-keyword-arguments (package-arguments ant-bootstrap)
2452 `(modify-phases ,phases
2453 (add-after 'unpack 'remove-scripts
2454 ;; Remove bat / cmd scripts for DOS as well as the antRun and runant
2457 (for-each delete-file
2458 (find-files "src/script"
2459 "(.*\\.(bat|cmd)|runant.*|antRun.*)"))
2462 (lambda* (#:key inputs outputs #:allow-other-keys)
2463 (setenv "JAVA_HOME" (assoc-ref inputs "jdk"))
2465 ;; Disable tests to avoid dependency on hamcrest-core, which needs
2466 ;; Ant to build. This is necessary in addition to disabling the
2467 ;; "check" phase, because the dependency on "test-jar" would always
2468 ;; result in the tests to be run.
2469 (substitute* "build.xml"
2470 (("depends=\"jars,test-jar") "depends=\"jars"))
2471 (invoke "bash" "bootstrap.sh"
2472 (string-append "-Ddist.dir="
2473 (assoc-ref outputs "out")))))))))
2475 `(("jdk" ,icedtea-8 "jdk")
2477 ("unzip" ,unzip)))))
2479 ;; The 1.9.x series is the last that can be built with GCJ. The 1.10.x series
2482 (package (inherit ant/java8)
2486 (uri (string-append "mirror://apache/ant/source/apache-ant-"
2487 version "-src.tar.gz"))
2490 "1xy30f1w5gaqk6g3f0vw7ygix4rb6032qkcw42y4z8wd9jihgygd"))))
2492 `(("jdk" ,icedtea-7 "jdk")
2494 ("unzip" ,unzip)))))
2496 (define-public ant-apache-bcel
2499 (name "ant-apache-bcel")
2501 (substitute-keyword-arguments (package-arguments ant/java8)
2503 `(modify-phases ,phases
2504 (add-after 'unpack 'link-bcel
2505 (lambda* (#:key inputs #:allow-other-keys)
2506 (for-each (lambda (file)
2508 (string-append "lib/optional/"
2510 (find-files (assoc-ref inputs "java-commons-bcel")
2513 (add-after 'build 'install
2514 (lambda* (#:key outputs #:allow-other-keys)
2515 (let* ((out (assoc-ref outputs "out"))
2516 (share (string-append out "/share/java"))
2517 (bin (string-append out "/bin"))
2518 (lib (string-append out "/lib")))
2520 (install-file (string-append lib "/ant-apache-bcel.jar") share)
2521 (delete-file-recursively bin)
2522 (delete-file-recursively lib)
2525 `(("java-commons-bcel" ,java-commons-bcel)
2526 ,@(package-inputs ant/java8)))))
2528 (define-public ant-junit
2533 (substitute-keyword-arguments (package-arguments ant/java8)
2535 `(modify-phases ,phases
2536 (add-after 'unpack 'link-junit
2537 (lambda* (#:key inputs #:allow-other-keys)
2538 (for-each (lambda (file)
2540 (string-append "lib/optional/"
2542 (find-files (assoc-ref inputs "java-junit")
2545 (add-after 'build 'install
2546 (lambda* (#:key outputs #:allow-other-keys)
2547 (let* ((out (assoc-ref outputs "out"))
2548 (share (string-append out "/share/java"))
2549 (bin (string-append out "/bin"))
2550 (lib (string-append out "/lib")))
2552 (install-file (string-append lib "/ant-junit.jar") share)
2553 (delete-file-recursively bin)
2554 (delete-file-recursively lib)
2557 `(("java-junit" ,java-junit)
2558 ,@(package-inputs ant/java8)))))
2560 (define-public java-openjfx-build
2562 (name "java-openjfx-build")
2563 ;; This is a java-8 version
2568 (url "http://hg.openjdk.java.net/openjfx/8u-dev/rt")
2569 (changeset (string-append
2570 (string-join (string-split version #\.) "u")
2572 (file-name (string-append name "-" version "-checkout"))
2573 (modules '((guix build utils)))
2576 ;; Delete included gradle jar
2577 (delete-file-recursively "gradle/wrapper")
2581 "0yg38mwpivswccv9n96k06x3iv82i4px1a9xg9l8dswzwmfj259f"))
2582 (patches (search-patches "java-openjfx-build-jdk_version.patch"))))
2583 (build-system ant-build-system)
2585 `(#:jar-name "java-openjfx.jar"
2586 #:source-dir "buildSrc/src/main/java"
2587 #:test-dir "buildSrc/src/test"
2589 (modify-phases %standard-phases
2590 (add-before 'configure 'generate-jsl-parser
2592 (invoke "antlr3" "-o"
2593 "buildSrc/src/main/java/com/sun/scenario/effect/compiler"
2594 "buildSrc/src/main/antlr/JSL.g"))))))
2596 `(("antlr3" ,antlr3)
2597 ("java-stringtemplate" ,java-stringtemplate)))
2599 `(("java-junit" ,java-junit)
2600 ("java-hamcrest-core" ,java-hamcrest-core)))
2601 (home-page "https://openjfx.io")
2602 (synopsis "Graphical application toolkit in Java")
2603 (description "OpenJFX is a client application platform for desktop,
2604 mobile and embedded systems built on Java. Its goal is to produce a
2605 modern, efficient, and fully featured toolkit for developing rich client
2606 applications. This package contains base classes for the OpenJFX
2607 distribution and helper classes for building other parts of the
2609 (license license:gpl2))) ;gpl2 only, with classpath exception
2611 (define-public java-openjfx-base
2612 (package (inherit java-openjfx-build)
2613 (name "java-openjfx-base")
2615 `(#:jar-name "java-openjfx-base.jar"
2616 #:source-dir "modules/base/src/main/java:modules/base/src/main/java8:modules/base/src/main/version-info"
2617 #:test-dir "modules/base/src/test"
2619 (modify-phases %standard-phases
2620 (add-before 'check 'remove-empty-file
2622 (with-directory-excursion "modules/base/src/test/java"
2623 ;; These files are completely commented, but junit expects them to
2624 ;; contain a class, so tests fail.
2626 "com/sun/javafx/property/adapter/PropertyDescriptorTest.java")
2628 "com/sun/javafx/property/adapter/ReadOnlyPropertyDescriptorTest.java")
2629 (delete-file "javafx/beans/property/PropertiesTest.java")
2631 "javafx/beans/property/adapter/ReadOnlyJavaBeanPropertyBuilder_General_Test.java")
2633 (delete-file "com/sun/javafx/runtime/VersionInfoTest.java"))
2636 `(("java-openjfx-build" ,java-openjfx-build)))
2637 (description "OpenJFX is a client application platform for desktop,
2638 mobile and embedded systems built on Java. Its goal is to produce a
2639 modern, efficient, and fully featured toolkit for developing rich client
2640 applications. This package contains base classes for the OpenJFX
2643 (define-public java-openjfx-graphics
2644 (package (inherit java-openjfx-build)
2645 (name "java-openjfx-graphics")
2647 `(#:jar-name "java-openjfx-graphics.jar"
2648 #:source-dir "modules/graphics/src/main/java"
2649 #:tests? #f; require X
2650 #:test-dir "modules/graphics/src/test"))
2652 `(("java-openjfx-base" ,java-openjfx-base)
2653 ("java-swt" ,java-swt)))
2654 (description "OpenJFX is a client application platform for desktop,
2655 mobile and embedded systems built on Java. Its goal is to produce a
2656 modern, efficient, and fully featured toolkit for developing rich client
2657 applications. This package contains graphics-related classes for the
2658 OpenJFX distribution.")))
2660 (define-public java-openjfx-media
2661 (package (inherit java-openjfx-build)
2662 (name "java-openjfx-media")
2664 `(("java-openjxf-graphics" ,java-openjfx-graphics)))
2666 `(#:jar-name "java-openjfx-media.jar"
2667 #:source-dir "modules/media/src/main/java"
2668 #:tests? #f)); no tests
2669 (description "OpenJFX is a client application platform for desktop,
2670 mobile and embedded systems built on Java. Its goal is to produce a
2671 modern, efficient, and fully featured toolkit for developing rich client
2672 applications. This package contains media-related classes for the
2673 OpenJFX distribution.")))
2675 (define-public javacc-4
2682 (url "https://github.com/javacc/javacc")
2683 (commit "release_41")))
2684 (file-name (string-append "javacc-" version "-checkout"))
2687 "07ysav7j8r1c6h8qxrgqk6lwdp74ly0ad1935lragxml0qqc3ka0"))
2688 (modules '((guix build utils)))
2689 ;; delete bundled jars
2690 (snippet '(begin (delete-file-recursively "lib") #t))))
2691 (build-system ant-build-system)
2693 ;; /tmp/guix-build-javacc-4.1.drv-0/source/test/javacodeLA/build.xml:60:
2698 (modify-phases %standard-phases
2699 ;; Delete tests to avoid build failure (we don't run them anyway).
2700 (add-after 'unpack 'delete-tests
2702 (for-each delete-file
2703 '("src/org/javacc/JavaCCTestCase.java"
2704 "src/org/javacc/parser/ExpansionTest.java"
2705 "src/org/javacc/parser/OptionsTest.java"
2706 "src/org/javacc/jjtree/JJTreeOptionsTest.java"))
2707 (for-each delete-file-recursively
2708 '("src/org/javacc/parser/test"
2709 "src/org/javacc/jjdoc/test"))
2711 (replace 'install (install-jars "bin/lib")))))
2712 (home-page "https://javacc.org/")
2713 (synopsis "Java parser generator")
2714 (description "Java Compiler Compiler (JavaCC) is the most popular parser
2715 generator for use with Java applications. A parser generator is a tool that
2716 reads a grammar specification and converts it to a Java program that can
2717 recognize matches to the grammar. In addition to the parser generator itself,
2718 JavaCC provides other standard capabilities related to parser generation such
2719 as tree building (via a tool called JJTree included with JavaCC), actions,
2721 (license license:bsd-3)))
2723 ;; javacc-3, as javacc-4 is not properly bootstrapped: is contains a javacc.jar
2724 ;; in the bootstrap/ directory.
2725 (define-public javacc-3
2732 (url "https://github.com/javacc/javacc.git")
2733 (commit "release_32")))
2734 (file-name (string-append "javacc-" version "-checkout"))
2737 "1pyf1xyh8gk83nxqn2v2mdws32l68ydznha41cxa4l2kkbq1v1g3"))))
2741 (modify-phases %standard-phases
2742 (add-before 'build 'set-java-version
2747 (("debug=") "source=\"1.4\" debug=")))
2748 (find-files "." "build.xml"))
2750 (replace 'install (install-jars "bin/lib")))))))
2752 (define-public javacc
2760 (url "https://github.com/javacc/javacc")
2762 (file-name (git-file-name "javacc" version))
2764 (base32 "18kkak3gda93gr25jrgy6q00g0jr8i24ri2wk4kybz1v234fxx9i"))
2765 (modules '((guix build utils)))
2766 ;; Delete bundled jars.
2767 (snippet '(begin (for-each delete-file-recursively
2768 '("bootstrap" "lib"))
2771 `(#:make-flags ; bootstrap from javacc-4
2772 (list (string-append "-Dbootstrap-jar="
2773 (assoc-ref %build-inputs "javacc")
2774 "/share/java/javacc.jar"))
2775 #:test-target "test"
2777 (modify-phases %standard-phases
2778 (replace 'install (install-jars "target"))
2779 (add-after 'install 'install-bin
2780 (lambda* (#:key outputs inputs #:allow-other-keys)
2781 (let* ((out (assoc-ref outputs "out"))
2782 (dir (string-append out "/share/java"))
2783 (bin (string-append out "/bin"))
2784 (javacc (string-append bin "/javacc")))
2786 (with-output-to-file javacc
2789 (string-append "#!/bin/sh\n"
2790 (assoc-ref inputs "jdk") "/bin/java"
2791 " -cp " dir "/javacc.jar" " `basename $0`" " $*"))))
2792 (chmod javacc #o755)
2793 ;; symlink to different names to affect the first argument and
2794 ;; change the behavior of the jar file.
2795 (symlink javacc (string-append bin "/jjdoc"))
2796 (symlink javacc (string-append bin "/jjtree"))
2800 `(("javacc" ,javacc-4)))))
2802 ;; This is the last 3.x release of ECJ
2803 (define-public java-ecj-3
2809 (uri (string-append "http://archive.eclipse.org/eclipse/"
2810 "downloads/drops/R-" version
2811 "-201301310800/ecjsrc-" version ".jar"))
2814 "01mdj14jw11g1jfnki4fi8229p0c6zzckd38zqy2w4m3cjcvsx04"))))
2815 (build-system ant-build-system)
2817 `(#:tests? #f ; none included
2818 #:jdk ,icedtea-7 ; doesn't build with JDK8+
2819 #:make-flags (list "-f" "src/build.xml")
2820 #:build-target "build"
2822 (modify-phases %standard-phases
2823 (add-after 'unpack 'fix-manifest
2825 ;; Record the main class to make ecj executable.
2826 (with-atomic-file-replacement "src/META-INF/MANIFEST.MF"
2828 (display "Manifest-Version: 1.0
2829 Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n"
2832 (replace 'install (install-jars ".")))))
2833 (home-page "https://eclipse.org")
2834 (synopsis "Eclipse Java development tools core batch compiler")
2835 (description "This package provides the Eclipse Java core batch compiler.")
2836 (license license:epl1.0)))
2838 ;; This is needed for java-cisd-args4j
2839 (define-public java-ecj-3.5
2840 (package (inherit java-ecj-3)
2843 (method url-fetch/zipbomb)
2844 (uri (string-append "http://archive.eclipse.org/eclipse/"
2845 "downloads/drops/R-" version
2846 "-200909170800/ecjsrc-" version ".zip"))
2849 "1vnl2mavisc567bip736xzsvvbjif5279wc4a7pbdik5wlir8qr7"))))
2850 (build-system ant-build-system)
2852 `(#:tests? #f ; none included
2853 #:jdk ,icedtea-7 ; doesn't build with JDK8+
2854 #:build-target "build"
2856 (modify-phases %standard-phases
2857 (add-after 'unpack 'fix-manifest
2859 ;; Record the main class to make ecj executable.
2860 (with-atomic-file-replacement "META-INF/MANIFEST.MF"
2863 (display "Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n"
2866 (replace 'install (install-jars ".")))))
2868 `(("unzip" ,unzip)))))
2870 (define-public java-ecj
2871 (package (inherit java-ecj-3)
2877 "http://archive.eclipse.org/eclipse/downloads/drops4/R-"
2879 "-201703010400/ecjsrc-"
2884 "11cfgsdgznja1pvlxkjbqykxd7pcd5655vkm7s44xmahmap15gpl"))))
2886 `(#:tests? #f ; none included
2887 #:build-target "build"
2889 (modify-phases %standard-phases
2890 (add-after 'unpack 'fix-build.xml
2892 (substitute* "src/build.xml"
2896 (add-after 'unpack 'fix-prop
2898 (substitute* "src/build.xml"
2899 (("^.*properties.*$")
2900 "<include name=\"**/*.properties\"/>
2901 <include name=\"**/*.props\"/>"))
2903 (add-before 'build 'chdir
2907 (replace 'install (install-jars ".")))))))
2909 (define-public java-cisd-base
2910 (let ((revision 38938)
2911 (base-version "14.12.0"))
2913 (name "java-cisd-base")
2914 (version (string-append base-version "-" (number->string revision)))
2918 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2919 "base/tags/release/"
2920 (version-major+minor base-version)
2921 ".x/" base-version "/base/"))
2922 (revision revision)))
2923 (file-name (string-append "java-cisd-base-" version "-checkout"))
2926 "1i5adyf7nzclb0wydgwa1az04qliid8035vpahaandmkmigbnxiy"))
2927 (modules '((guix build utils)))
2930 ;; Delete included gradle jar
2931 (delete-file-recursively "gradle/wrapper")
2932 ;; Delete pre-built native libraries
2933 (delete-file-recursively "libs")
2935 (build-system ant-build-system)
2937 `(#:make-flags '("-file" "build/build.xml")
2938 #:test-target "jar-test"
2941 (modify-phases %standard-phases
2942 (add-after 'unpack 'unpack-build-resources
2943 (lambda* (#:key inputs #:allow-other-keys)
2944 (copy-recursively (assoc-ref inputs "build-resources")
2945 "../build_resources")
2947 (add-after 'unpack-build-resources 'fix-dependencies
2948 (lambda* (#:key inputs #:allow-other-keys)
2949 (substitute* "build/build.xml"
2950 (("\\$\\{lib\\}/testng/testng-jdk15.jar")
2951 (string-append (assoc-ref inputs "java-testng")
2952 "/share/java/java-testng.jar"))
2953 (("\\$\\{lib\\}/commons-lang/commons-lang.jar")
2954 (string-append (assoc-ref inputs "java-commons-lang")
2955 "/share/java/commons-lang-"
2956 ,(package-version java-commons-lang) ".jar"))
2957 (("\\$\\{lib\\}/commons-io/commons-io.jar")
2958 (string-append (assoc-ref inputs "java-commons-io")
2959 "/lib/m2/commons-io/commons-io/"
2960 ,(package-version java-commons-io)
2962 ,(package-version java-commons-io)
2964 ;; Remove dependency on svn
2965 (("<build-info.*") "")
2966 (("\\$\\{revision.number\\}")
2967 ,(number->string revision))
2968 (("\\$\\{version.number\\}") ,base-version))
2969 ;; Remove dependency on classycle
2970 (substitute* "../build_resources/ant/build-common.xml"
2971 (("<taskdef name=\"dependency-checker.*") "")
2972 (("classname=\"classycle.*") "")
2973 (("classpath=\"\\$\\{lib\\}/classycle.*") ""))
2975 ;; A few tests fail because of the lack of a proper /etc/groups and
2976 ;; /etc/passwd file in the build container.
2977 (add-after 'unpack 'disable-broken-tests
2979 (substitute* "sourceTest/java/ch/systemsx/cisd/base/AllTests.java"
2980 (("Unix.isOperational\\(\\)") "false"))
2982 ;; These decorators are almost useless and pull in an unpackaged
2984 (add-after 'unpack 'remove-useless-decorators
2986 (substitute* "source/java/ch/systemsx/cisd/base/unix/Unix.java"
2988 (("import ch.rinn.restrictions.Private;") ""))
2989 (substitute* "sourceTest/java/ch/systemsx/cisd/base/unix/UnixTests.java"
2991 (("import ch.rinn.restrictions.Friend;") ""))
2993 (add-before 'configure 'build-native-code
2994 (lambda* (#:key inputs #:allow-other-keys)
2995 (let ((jdk (assoc-ref inputs "jdk"))
2996 (dir ,(match (%current-system)
2999 ((or "armhf-linux" "aarch64-linux")
3001 ((or "x86_64-linux")
3003 (_ "unknown-Linux"))))
3004 (with-directory-excursion "source/c"
3005 (invoke "gcc" "-shared" "-O3" "-fPIC" "unix.c"
3006 (string-append "-I" jdk "/include")
3007 (string-append "-I" jdk "/include/linux")
3009 (invoke "gcc" "-shared" "-O3" "-fPIC"
3010 "-DMACHINE_BYTE_ORDER=1"
3018 (string-append "-I" jdk "/include")
3019 (string-append "-I" jdk "/include/linux")
3020 "-o" "libnativedata.so"))
3021 (install-file "source/c/libunix.so"
3022 (string-append "libs/native/unix/" dir))
3023 (install-file "source/c/libnativedata.so"
3024 (string-append "libs/native/nativedata/" dir))
3026 ;; In the "check" phase we only build the test executable.
3027 (add-after 'check 'run-tests
3029 (invoke "java" "-jar" "targets/dist/sis-base-test.jar")
3030 (delete-file "targets/dist/sis-base-test.jar")
3032 (replace 'install (install-jars "targets/dist")))))
3034 `(("jdk" ,icedtea-8)
3035 ("java-commons-lang" ,java-commons-lang)
3036 ("java-commons-io" ,java-commons-io)
3037 ("java-testng" ,java-testng)
3042 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
3043 "base/tags/release/"
3044 (version-major+minor base-version)
3046 "/build_resources/"))
3047 (revision revision)))
3050 "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk"))))))
3051 (home-page "http://svnsis.ethz.ch")
3052 (synopsis "Utility classes for libraries from ETH Zurich")
3053 (description "This library supplies some utility classes needed for
3054 libraries from the SIS division at ETH Zurich like jHDF5.")
3055 ;; The C sources are under a non-copyleft license, which looks like a
3056 ;; variant of the BSD licenses. The whole package is under the ASL2.0.
3057 (license (list license:asl2.0
3058 (license:non-copyleft "file://source/c/COPYING"))))))
3060 (define-public java-cisd-args4j
3061 (let ((revision 39162)
3062 (base-version "9.11.2"))
3064 (name "java-cisd-args4j")
3065 (version (string-append base-version "-" (number->string revision)))
3069 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
3070 "args4j/tags/release/"
3071 (version-major+minor base-version)
3072 ".x/" base-version "/args4j/"))
3073 (revision revision)))
3074 (file-name (string-append "java-cisd-args4j-" version "-checkout"))
3077 "0hhqznjaivq7ips7mkwas78z42s6djsm20rrs7g1zd59rcsakxn2"))))
3078 (build-system ant-build-system)
3080 `(#:make-flags '("-file" "build/build.xml")
3081 #:tests? #f ; there are no tests
3082 ;; There are weird build failures with JDK8, such as: "The type
3083 ;; java.io.ObjectInputStream cannot be resolved. It is indirectly
3084 ;; referenced from required .class files"
3086 #:modules ((guix build ant-build-system)
3088 (guix build java-utils)
3093 (modify-phases %standard-phases
3094 (add-after 'unpack 'unpack-build-resources
3095 (lambda* (#:key inputs #:allow-other-keys)
3096 (mkdir-p "../build_resources")
3097 (invoke "tar" "xf" (assoc-ref inputs "build-resources")
3098 "-C" "../build_resources"
3099 "--strip-components=1")
3100 (mkdir-p "../build_resources/lib")
3102 (add-after 'unpack-build-resources 'fix-dependencies
3103 (lambda* (#:key inputs #:allow-other-keys)
3104 ;; FIXME: There should be a more convenient abstraction for
3105 ;; editing XML files.
3106 (with-directory-excursion "../build_resources/ant/"
3107 (chmod "build-common.xml" #o664)
3108 (call-with-output-file "build-common.xml.new"
3112 (with-input-from-file "build-common.xml"
3113 (lambda _ (xml->sxml #:trim-whitespace? #t)))
3114 `(;; Remove dependency on classycle and custom ant tasks
3115 (taskdef . ,(lambda (tag . kids)
3116 (let ((name ((sxpath '(name *text*)) kids)))
3117 (if (or (member "build-info" name)
3118 (member "dependency-checker" name)
3119 (member "build-java-subprojects" name)
3120 (member "project-classpath" name))
3123 (typedef . ,(lambda (tag . kids)
3124 (let ((name ((sxpath '(name *text*)) kids)))
3125 (if (member "recursive-jar" name)
3128 (build-java-subprojects . ,(lambda _ '()))
3129 ;; Ignore everything else
3130 (*default* . ,(lambda (tag . kids) `(,tag ,@kids)))
3131 (*text* . ,(lambda (_ txt) txt))))
3133 (rename-file "build-common.xml.new" "build-common.xml"))
3134 (substitute* "build/build.xml"
3135 (("\\$\\{lib\\}/cisd-base/cisd-base.jar")
3136 (string-append (assoc-ref inputs "java-cisd-base")
3137 "/share/java/sis-base.jar"))
3138 ;; Remove dependency on svn
3139 (("<build-info.*") "")
3140 (("\\$\\{revision.number\\}")
3141 ,(number->string revision))
3142 (("\\$\\{version.number\\}") ,base-version)
3143 ;; Don't use custom ant tasks.
3144 (("recursive-jar") "jar")
3145 (("<project-classpath.*") ""))
3147 (replace 'install (install-jars "targets/dist")))))
3149 `(("java-cisd-base" ,java-cisd-base)))
3151 `(("ecj" ,java-ecj-3.5)
3156 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
3157 "args4j/tags/release/"
3158 (version-major+minor base-version)
3160 "/build_resources/"))
3161 (revision revision)))
3164 "056cam4k8pll7ass31sy6gwn8g8719njc41yf4l02b0342nilkyf"))
3165 (modules '((guix build utils)))
3166 ;; Delete bundled pre-built jars.
3168 '(begin (delete-file-recursively "lib/") #t))))))
3169 (home-page "http://svnsis.ethz.ch")
3170 (synopsis "Command line parser library")
3171 (description "This package provides a parser for command line arguments.")
3172 (license license:asl2.0))))
3174 (define-public java-cisd-jhdf5
3175 (let ((revision 39162)
3176 (base-version "14.12.6"))
3178 (name "java-cisd-jhdf5")
3179 (version (string-append base-version "-" (number->string revision)))
3183 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
3184 "jhdf5/tags/release/"
3185 (version-major+minor base-version)
3186 ".x/" base-version "/jhdf5/"))
3187 (revision revision)))
3188 (file-name (string-append "java-cisd-jhdf5-" version "-checkout"))
3191 "13i17s2hn0q9drdqvp8csy7770p3hdbh9rp30ihln2ldkfawdmz0"))
3192 (modules '((guix build utils)))
3195 ;; Delete included gradle jar
3196 (delete-file-recursively "gradle/wrapper")
3197 ;; Delete pre-built native libraries
3198 (delete-file-recursively "libs")
3200 (build-system ant-build-system)
3202 `(#:make-flags '("-file" "build/build.xml")
3203 #:build-target "jar-all"
3204 #:test-target "jar-test"
3207 (modify-phases %standard-phases
3208 ;; FIXME: this build phase fails.
3209 (delete 'generate-jar-indices)
3210 ;; Don't erase results from the build phase when building tests.
3211 (add-after 'unpack 'separate-test-target-from-clean
3213 (substitute* "build/build.xml"
3214 (("\"jar-test\" depends=\"clean, ")
3215 "\"jar-test\" depends=\""))
3217 (add-after 'unpack 'unpack-build-resources
3218 (lambda* (#:key inputs #:allow-other-keys)
3219 (copy-recursively (assoc-ref inputs "build-resources")
3220 "../build_resources")
3221 (delete-file-recursively "../build_resources/lib/")
3222 (mkdir-p "../build_resources/lib")
3223 ;; Remove dependency on classycle
3224 (substitute* "../build_resources/ant/build-common.xml"
3225 (("<taskdef name=\"dependency-checker.*") "")
3226 (("classname=\"classycle.*") "")
3227 (("classpath=\"\\$\\{lib\\}/classycle.*") ""))
3228 ;; Remove dependency on svn
3229 (substitute* "build/build.xml"
3230 (("<build-info.*") "")
3231 (("\\$\\{revision.number\\}")
3232 ,(number->string revision))
3233 (("\\$\\{version.number\\}") ,base-version))
3235 (add-after 'unpack-build-resources 'fix-dependencies
3236 (lambda* (#:key inputs #:allow-other-keys)
3237 (substitute* "../build_resources/ant/build-common.xml"
3238 (("../libraries/testng/testng-jdk15.jar")
3239 (string-append (assoc-ref inputs "java-testng")
3240 "/share/java/java-testng.jar")))
3241 (substitute* "build/build.xml"
3242 (("\\$\\{lib\\}/sis-base/sis-base.jar")
3243 (string-append (assoc-ref inputs "java-cisd-base")
3244 "/share/java/sis-base.jar"))
3245 (("\\$\\{lib\\}/cisd-args4j/cisd-args4j.jar")
3246 (string-append (assoc-ref inputs "java-cisd-args4j")
3247 "/share/java/cisd-args4j.jar"))
3248 (("\\$\\{lib\\}/commons-lang/commons-lang.jar")
3249 (string-append (assoc-ref inputs "java-commons-lang")
3250 "/share/java/commons-lang-"
3251 ,(package-version java-commons-lang) ".jar"))
3252 (("\\$\\{lib\\}/commons-io/commons-io.jar")
3253 (string-append (assoc-ref inputs "java-commons-io")
3254 "/lib/m2/commons-io/commons-io/"
3255 ,(package-version java-commons-io)
3257 ,(package-version java-commons-io)
3259 (("\\$\\{lib\\}/testng/testng-jdk15.jar")
3260 (string-append (assoc-ref inputs "java-testng")
3261 "/share/java/java-testng.jar"))
3262 (("\\$\\{lib\\}/junit4/junit.jar")
3263 (car (find-files (assoc-ref inputs "java-junit") "jar$")))
3264 (("\\$\\{lib\\}/jmock/hamcrest/hamcrest-core.jar")
3265 (car (find-files (assoc-ref inputs "java-hamcrest-core")
3267 ;; Remove dependency on ch.rinn.restrictions
3268 (with-directory-excursion "source/java/ch/systemsx/cisd/hdf5/"
3269 (substitute* '("BitSetConversionUtils.java"
3271 (("import ch.rinn.restrictions.Private;") "")
3273 (with-directory-excursion "sourceTest/java/ch/systemsx/cisd/hdf5/"
3274 (substitute* '("BitSetConversionTest.java"
3275 "h5ar/HDF5ArchiverTest.java")
3276 (("import ch.rinn.restrictions.Friend;") "")
3278 ;; Remove leftovers from removing @Friend
3279 (substitute* "h5ar/HDF5ArchiverTest.java"
3280 (("\\{ HDF5Archiver.class, IdCache.class, LinkRecord.class \\}\\)")
3283 (add-before 'configure 'build-native-library
3284 (lambda* (#:key inputs #:allow-other-keys)
3285 (let ((jdk (assoc-ref inputs "jdk"))
3286 (hdf5 (assoc-ref inputs "hdf5"))
3287 (dir ,(match (%current-system)
3290 ((or "armhf-linux" "aarch64-linux")
3292 ((or "x86_64-linux")
3294 (_ "unknown-Linux"))))
3295 (with-directory-excursion "source/c"
3296 (apply invoke `("gcc" "-shared" "-O3"
3298 "-Wl,--exclude-libs,ALL"
3299 ,@(find-files "jhdf5" "\\.c$")
3300 ,@(find-files "hdf-java" "\\.c$")
3301 ,(string-append "-I" hdf5 "/include")
3302 ,(string-append "-I" jdk "/include")
3303 ,(string-append "-I" jdk "/include/linux")
3304 ,(string-append hdf5 "/lib/libhdf5.a")
3305 "-o" "libjhdf5.so" "-lz")))
3306 (install-file "source/c/libjhdf5.so"
3307 (string-append "libs/native/jhdf5/" dir))
3309 ;; In the "check" phase we only build the test executable.
3310 (add-after 'check 'run-tests
3312 (invoke "java" "-jar" "targets/dist/sis-jhdf5-test.jar")
3313 (delete-file "targets/dist/sis-jhdf5-test.jar")
3316 (install-jars "targets/dist")))))
3318 `(("java-cisd-base" ,java-cisd-base)
3319 ("java-cisd-args4j" ,java-cisd-args4j)
3320 ("java-commons-lang" ,java-commons-lang)
3321 ("java-commons-io" ,java-commons-io)
3325 `(("jdk" ,icedtea-8)
3326 ("java-testng" ,java-testng)
3327 ("java-junit" ,java-junit)
3328 ("java-jmock" ,java-jmock)
3329 ("java-hamcrest-core" ,java-hamcrest-core)
3334 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
3335 "jhdf5/tags/release/"
3336 (version-major+minor base-version)
3338 "/build_resources/"))
3339 (revision revision)))
3342 "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk"))))))
3343 (home-page "https://wiki-bsse.ethz.ch/display/JHDF5/")
3344 (synopsis "Java binding for HDF5")
3345 (description "JHDF5 is a high-level API in Java for reading and writing
3346 HDF5 files, building on the libraries provided by the HDF Group.")
3347 ;; The C sources are under a non-copyleft license, which looks like a
3348 ;; variant of the BSD licenses. The whole package is under the ASL2.0.
3349 (license (list license:asl2.0
3350 (license:non-copyleft "file://source/c/COPYING"))))))
3352 (define-public java-classpathx-servletapi
3354 (name "java-classpathx-servletapi")
3358 (uri (string-append "mirror://gnu/classpathx/servletapi/"
3359 "servletapi-" version ".tar.gz"))
3362 "07d8h051siga2f33fra72hk12sbq1bxa4jifjg0qj0vfazjjff0x"))))
3363 (build-system ant-build-system)
3365 `(#:tests? #f ; there is no test target
3366 #:build-target "compile"
3368 (list "-Dbuild.compiler=javac1.8"
3369 (string-append "-Ddist=" (assoc-ref %outputs "out")))
3371 (modify-phases %standard-phases
3373 (lambda* (#:key make-flags #:allow-other-keys)
3374 (apply invoke `("ant" "dist" ,@make-flags)))))))
3375 (home-page "https://www.gnu.org/software/classpathx/")
3376 (synopsis "Java servlet API implementation")
3377 (description "This is the GNU servlet API distribution, part of the
3378 ClasspathX project. It provides implementations of version 3.0 of the servlet
3379 API and version 2.1 of the Java ServerPages API.")
3380 (license license:gpl3+)))
3382 (define-public java-javaee-servletapi
3384 (name "java-javaee-servletapi")
3389 (url "https://github.com/javaee/servlet-spec")
3391 (file-name (git-file-name name version))
3394 "0s03lj8w5an70lkqbjycgfrfk0kc07vbfav91jzk87gh3awf9ksl"))))
3395 (build-system ant-build-system)
3397 `(#:jar-name "javax-servletapi.jar"
3400 #:source-dir "src/main/java"
3402 (modify-phases %standard-phases
3403 (add-before 'build 'copy-resources
3405 (mkdir-p "build/classes/javax/servlet/http")
3406 (let ((from-prefix "src/main/java/javax/servlet/")
3407 (to-prefix "build/classes/javax/servlet/"))
3408 (for-each (lambda (f)
3409 (copy-file (string-append from-prefix f)
3410 (string-append to-prefix f)))
3411 (list "LocalStrings_ja.properties"
3412 "LocalStrings.properties"
3413 "LocalStrings_fr.properties"
3414 "http/LocalStrings_es.properties"
3415 "http/LocalStrings_ja.properties"
3416 "http/LocalStrings.properties"
3417 "http/LocalStrings_fr.properties")))
3420 `(("unzip" ,unzip)))
3421 (home-page "https://javaee.github.io/servlet-spec/")
3422 (synopsis "Java servlet API")
3423 (description "Java Servlet is the foundation web specification in the
3424 Java Enterprise Platform. Developers can build web applications using the
3425 Servlet API to interact with the request/response workflow. This project
3426 provides information on the continued development of the Java Servlet
3428 ;; Main code is dual-licensed by Oracle under either GLP2 or CDDL 1.1.
3429 ;; Some files are licensed under ASL 2.0.
3430 (license (list license:asl2.0 license:gpl2 license:cddl1.1))))
3432 (define-public java-swt
3437 ;; The types of many variables and procedures differ in the sources
3438 ;; dependent on whether the target architecture is a 32-bit system or a
3439 ;; 64-bit system. Instead of patching the sources on demand in a build
3440 ;; phase we download either the 32-bit archive (which mostly uses "int"
3441 ;; types) or the 64-bit archive (which mostly uses "long" types).
3442 (let ((hash32 "09q0cbh90d90q3a7dx9430kc4m6bijrkr4lajrmzzvi0jjdpq4v9")
3443 (hash64 "17k5hs75a87ssmc5xhwdfdm2gn4zba0r837l2455za01krnkaa2q")
3446 (let-values (((hash file)
3447 (match (or (%current-target-system) (%current-system))
3448 ("x86_64-linux" (values hash64 file64))
3449 (_ (values hash32 file32)))))
3453 "http://download.eclipse.org/eclipse/downloads/drops4/"
3454 "R-" version "-201710090410/swt-" version
3455 "-gtk-linux-" file ".zip"))
3456 (sha256 (base32 hash))))))
3457 (build-system ant-build-system)
3459 `(#:jar-name "swt.jar"
3461 #:tests? #f ; no "check" target
3463 (modify-phases %standard-phases
3465 (lambda* (#:key source #:allow-other-keys)
3467 (invoke "unzip" source "-d" "swt")
3470 (invoke "unzip" "src.zip" "-d" "src")))
3471 ;; The classpath contains invalid icecat jars. Since we don't need
3472 ;; anything other than the JDK on the classpath, we can simply unset
3474 (add-after 'configure 'unset-classpath
3475 (lambda _ (unsetenv "CLASSPATH") #t))
3476 (add-before 'build 'build-native
3477 (lambda* (#:key inputs outputs #:allow-other-keys)
3478 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
3479 ;; Build shared libraries. Users of SWT have to set the system
3480 ;; property swt.library.path to the "lib" directory of this
3483 (setenv "OUTPUT_DIR" lib)
3484 (with-directory-excursion "src"
3485 (invoke "bash" "build.sh")))))
3486 (add-after 'install 'install-native
3487 (lambda* (#:key outputs #:allow-other-keys)
3488 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
3489 (for-each (lambda (file)
3490 (install-file file lib))
3491 (find-files "." "\\.so$"))
3495 ("libxtst" ,libxtst)
3500 `(("pkg-config" ,pkg-config)
3502 (home-page "https://www.eclipse.org/swt/")
3503 (synopsis "Widget toolkit for Java")
3505 "SWT is a widget toolkit for Java designed to provide efficient, portable
3506 access to the user-interface facilities of the operating systems on which it
3508 ;; SWT code is licensed under EPL1.0
3509 ;; Gnome and Gtk+ bindings contain code licensed under LGPLv2.1
3510 ;; Cairo bindings contain code under MPL1.1
3511 ;; XULRunner 1.9 bindings contain code under MPL2.0
3516 license:lgpl2.1+))))
3518 ;; java-hamcrest-core uses qdox version 1.12. We package this version instead
3519 ;; of the latest release.
3520 (define-public java-qdox-1.12
3526 (uri (string-append "https://repo1.maven.org/maven2/"
3527 "com/thoughtworks/qdox/qdox/" version
3528 "/qdox-" version "-sources.jar"))
3531 "0hlfbqq2avf5s26wxkksqmkdyk6zp9ggqn37c468m96mjv0n9xfl"))))
3532 (build-system ant-build-system)
3534 `(;; Tests require junit
3536 #:jar-name "qdox.jar"
3538 (modify-phases %standard-phases
3540 (lambda* (#:key source #:allow-other-keys)
3542 (with-directory-excursion "src"
3543 (invoke "jar" "-xf" source))))
3544 ;; At this point we don't have junit, so we must remove the API
3546 (add-after 'unpack 'delete-tests
3548 (delete-file-recursively "src/com/thoughtworks/qdox/junit")
3550 (home-page "https://github.com/codehaus/qdox")
3551 (synopsis "Parse definitions from Java source files")
3553 "QDox is a high speed, small footprint parser for extracting
3554 class/interface/method definitions from source files complete with JavaDoc
3555 @code{@@tags}. It is designed to be used by active code generators or
3556 documentation tools.")
3557 (license license:asl2.0)))
3559 (define-public java-qdox
3562 ; Newer version exists, but this version is required by java-plexus-component-metadata
3566 ;; 2.0-M4, -M5 at https://github.com/paul-hammant/qdox
3567 ;; Older releases at https://github.com/codehaus/qdox/
3568 ;; Note: The release at maven is pre-generated. The release at
3569 ;; github requires jflex.
3570 (uri (string-append "https://repo1.maven.org/maven2/"
3571 "com/thoughtworks/qdox/qdox/" version
3572 "/qdox-" version "-sources.jar"))
3575 "10xxrcaicq6axszcr2jpygisa4ch4sinyx5q7kqqxv4lknrmxp5x"))))
3576 (build-system ant-build-system)
3578 `(#:jar-name "qdox.jar"
3579 #:tests? #f; no tests
3581 ((guix build ant-build-system)
3582 (guix build java-utils)
3586 (modify-phases %standard-phases
3587 (add-before 'install 'create-pom
3589 (with-output-to-file "pom.xml"
3593 (modelVersion "4.0.0")
3595 (groupId "com.thoughtworks.qdox")
3597 (version ,,version))))))
3600 (install-from-pom "pom.xml")))))
3601 (home-page "https://github.com/codehaus/qdox")
3602 (synopsis "Parse definitions from Java source files")
3603 (description "QDox is a high speed, small footprint parser for extracting
3604 class/interface/method definitions from source files complete with JavaDoc
3605 @code{@@tags}. It is designed to be used by active code generators or
3606 documentation tools.")
3607 (license license:asl2.0)))
3609 (define-public java-qdox-2-M9
3612 (version "2.0-M9"); required by plexus-java
3615 ;; 2.0-M4, -M5 at https://github.com/paul-hammant/qdox
3616 ;; Older releases at https://github.com/codehaus/qdox/
3617 ;; Note: The release at maven is pre-generated. The release at
3618 ;; github requires jflex.
3619 (uri (string-append "https://repo1.maven.org/maven2/"
3620 "com/thoughtworks/qdox/qdox/" version
3621 "/qdox-" version "-sources.jar"))
3624 "1s2jnmx2dkwnaha12lcj26aynywgwa8sslc47z82wx8xai13y4fg"))))))
3626 (define-public java-jarjar
3628 (name "java-jarjar")
3633 "https://storage.googleapis.com/google-code-archive-downloads/v2/"
3634 "code.google.com/jarjar/jarjar-src-" version ".zip"))
3637 "1v8irhni9cndcw1l1wxqgry013s2kpj0qqn57lj2ji28xjq8ndjl"))
3638 (modules '((guix build utils)))
3641 ;; Delete bundled thirds-party jar archives.
3642 (delete-file-recursively "lib")
3643 (delete-file "src/test/enumtest.jar")
3644 ;; the CLASSPATH needs this directory, create an empty one
3647 (build-system ant-build-system)
3649 `(;; Tests require junit, which ultimately depends on this package.
3651 #:build-target "jar"
3653 (modify-phases %standard-phases
3654 (add-before 'build 'do-not-use-bundled-asm
3655 (lambda* (#:key inputs #:allow-other-keys)
3656 (substitute* "build.xml"
3657 (("<path id=\"path.build\">")
3658 (string-append "<path id=\"path.build\"><fileset dir=\""
3659 (assoc-ref inputs "java-asm-bootstrap")
3660 "/lib/m2\" includes=\"**/*.jar\"/>"))
3661 (("<zipfileset src=\"lib/asm-4.0.jar\"/>") "")
3662 (("lib/asm-commons-4.0.jar")
3663 (car (find-files (assoc-ref inputs "java-asm-bootstrap")
3665 (("<include name=\"org/objectweb/asm/commons/Remap\\*\\.class\"/>")
3666 (string-append "<include name=\"org/objectweb/asm/"
3667 "commons/Remap*.class\"/>"
3668 "<include name=\"org/objectweb/asm/*.class\"/>"
3669 "<include name=\"org/objectweb/asm/"
3670 "signature/*.class\"/>"
3671 "<include name=\"org/objectweb/asm/"
3672 "commons/SignatureRemapper.class\"/>")))
3674 (add-before 'build 'remove-maven-dependency
3676 ;; We do not need to build jarjar as a maven plugin just yet, so
3677 ;; remove this file. Maven requires jarjar (but not that plugin),
3678 ;; so removing it improves the bootstrap.
3679 (delete-file "src/main/com/tonicsystems/jarjar/JarJarMojo.java")
3682 (lambda* (#:key outputs #:allow-other-keys)
3683 (let ((target (string-append (assoc-ref outputs "out")
3685 (install-file (string-append "dist/jarjar-" ,version ".jar")
3689 `(("java-asm-bootstrap" ,java-asm-bootstrap)))
3691 `(("unzip" ,unzip)))
3692 (home-page "https://code.google.com/archive/p/jarjar/")
3693 (synopsis "Repackage Java libraries")
3695 "Jar Jar Links is a utility that makes it easy to repackage Java
3696 libraries and embed them into your own distribution. Jar Jar Links includes
3697 an Ant task that extends the built-in @code{jar} task.")
3698 (license license:asl2.0)))
3700 (define-public java-hamcrest-core
3702 (name "java-hamcrest-core")
3707 (url "https://github.com/hamcrest/JavaHamcrest/")
3708 (commit (string-append "hamcrest-java-" version))))
3709 (file-name (git-file-name name version))
3712 "16fxxkrd31ahqvcaby30jgh3z1i0zxh51m24hxgz0z2agxj6bc63"))
3713 (modules '((guix build utils)))
3716 ;; Delete bundled thirds-party jar archives.
3717 (delete-file-recursively "lib")
3719 (build-system ant-build-system)
3721 `(#:tests? #f ; Tests require junit
3722 #:modules ((guix build ant-build-system)
3723 (guix build java-utils)
3726 #:make-flags (list (string-append "-Dversion=" ,version))
3727 #:test-target "unit-test"
3728 #:build-target "core"
3730 (modify-phases %standard-phases
3731 ;; Disable unit tests, because they require junit, which requires
3732 ;; hamcrest-core. We also give a fixed value to the "Built-Date"
3733 ;; attribute from the manifest for reproducibility.
3734 (add-before 'configure 'patch-build.xml
3736 (substitute* "build.xml"
3737 (("unit-test, ") "")
3738 (("\\$\\{build.timestamp\\}") "guix"))
3740 ;; Java's "getMethods()" returns methods in an unpredictable order.
3741 ;; To make the output of the generated code deterministic we must
3742 ;; sort the array of methods.
3743 (add-after 'unpack 'make-method-order-deterministic
3745 (substitute* "hamcrest-generator/src/main/java/org/hamcrest/generator/ReflectiveFactoryReader.java"
3746 (("import java\\.util\\.Iterator;" line)
3747 (string-append line "\n"
3748 "import java.util.Arrays; import java.util.Comparator;"))
3749 (("allMethods = cls\\.getMethods\\(\\);" line)
3750 (string-append "_" line
3752 private Method[] getSortedMethods() {
3753 Arrays.sort(_allMethods, new Comparator<Method>() {
3755 public int compare(Method a, Method b) {
3756 return a.toString().compareTo(b.toString());
3762 private Method[] allMethods = getSortedMethods();")))
3764 (add-before 'build 'do-not-use-bundled-qdox
3765 (lambda* (#:key inputs #:allow-other-keys)
3766 (substitute* "build.xml"
3767 (("lib/generator/qdox-1.12.jar")
3768 (string-append (assoc-ref inputs "java-qdox-1.12")
3769 "/share/java/qdox.jar")))
3771 ;; build.xml searches for .jar files in this directoy, which
3772 ;; we remove from the source archive.
3773 (add-before 'build 'create-dummy-directories
3775 (mkdir-p "lib/integration")
3777 (add-before 'build 'create-pom
3779 (substitute* "pom/hamcrest-core.pom"
3780 (("@VERSION@") ,version))
3783 (install-from-pom "pom/hamcrest-core.pom")))))
3785 `(("java-qdox-1.12" ,java-qdox-1.12)
3786 ("java-jarjar" ,java-jarjar)))
3788 `(("java-hamcrest-parent-pom" ,java-hamcrest-parent-pom)))
3789 (home-page "http://hamcrest.org/")
3790 (synopsis "Library of matchers for building test expressions")
3792 "This package provides a library of matcher objects (also known as
3793 constraints or predicates) allowing @code{match} rules to be defined
3794 declaratively, to be used in other frameworks. Typical scenarios include
3795 testing frameworks, mocking libraries and UI validation rules.")
3796 (license license:bsd-2)))
3798 (define java-hamcrest-parent-pom
3800 (inherit java-hamcrest-core)
3801 (name "java-hamcrest-parent-pom")
3802 (propagated-inputs '())
3807 (modify-phases %standard-phases
3811 (substitute* "pom/hamcrest-parent.pom"
3812 (("@VERSION@") ,(package-version java-hamcrest-core)))
3815 (install-pom-file "pom/hamcrest-parent.pom")))))))
3817 (define-public java-hamcrest-library
3819 (inherit java-hamcrest-core)
3820 (name "java-hamcrest-library")
3822 (substitute-keyword-arguments (package-arguments java-hamcrest-core)
3823 ((#:build-target _) "library")
3825 `(modify-phases ,phases
3826 (add-after 'unpack 'patch-classpath-for-integration
3827 (lambda* (#:key inputs #:allow-other-keys)
3828 (substitute* "build.xml"
3829 (("build/hamcrest-core-\\$\\{version\\}\\.jar")
3830 (car (find-files (assoc-ref inputs "java-hamcrest-core")
3833 (replace 'create-pom
3835 (substitute* "pom/hamcrest-library.pom"
3836 (("@VERSION@") ,(package-version java-hamcrest-core)))
3839 (install-from-pom "pom/hamcrest-library.pom"))))))
3841 `(("java-hamcrest-core" ,java-hamcrest-core)
3842 ("java-hamcrest-parent-pom" ,java-hamcrest-parent-pom)))))
3844 (define-public java-junit
3851 (url "https://github.com/junit-team/junit/")
3852 (commit (string-append "r" version))))
3853 (file-name (git-file-name name version))
3856 "1j8avi91px1z8rjc89cfikwrvfifdmmsarwiyrcnr59ynvpz0v8h"))
3857 (modules '((guix build utils)))
3860 ;; Delete bundled jar archives.
3861 (delete-file-recursively "lib")
3863 (build-system ant-build-system)
3865 `(#:jar-name "junit.jar"
3866 #:source-dir "src/main/java"
3867 #:test-dir "src/test"
3868 #:test-exclude (list "**/SimpleTest.java" "**/StackTracesTest.java"
3869 "**/RuleChainTest.java" "**/TestWatchmanTest.java")
3871 (modify-phases %standard-phases
3872 (add-before 'check 'copy-test-resources
3874 (copy-recursively "src/test/resources" "build/test-classes")
3877 (install-from-pom "pom.xml")))))
3879 `(("java-hamcrest-core" ,java-hamcrest-core)))
3881 `(("java-hamcrest-library" ,java-hamcrest-library)))
3882 (home-page "https://junit.org/junit4/")
3883 (synopsis "Test framework for Java")
3885 "JUnit is a simple framework to write repeatable tests for Java projects.
3886 JUnit provides assertions for testing expected results, test fixtures for
3887 sharing common test data, and test runners for running tests.")
3888 (license license:epl1.0)))
3890 (define-public java-junitparams
3892 (name "java-junitparams")
3897 (url "https://github.com/Pragmatists/JUnitParams")
3898 (commit (string-append "JUnitParams-" version))))
3899 (file-name (git-file-name name version))
3902 "0rb52xdfp99invyjrras3w0bf0a81cz30yd47rkkiyqcqj0y1q9b"))))
3903 (build-system ant-build-system)
3905 `(#:jar-name "junitparams.jar"
3906 #:source-dir "src/main/java"
3907 #:test-dir "src/test"
3908 #:test-exclude (list "**/SuperclassTest.java")))
3910 `(("java-junit" ,java-junit)))
3912 `(("java-junit" ,java-junit)
3913 ("java-hamcrest-core" ,java-hamcrest-core)
3914 ("java-assertj" ,java-assertj)))
3915 (home-page "https://github.com/Pragmatists/JUnitParams")
3916 (synopsis "Parameterised test support for JUnit")
3917 (description "The JUnitParams project adds a new runner to JUnit and
3918 provides much easier and readable parametrised tests for JUnit.")
3919 (license license:asl2.0)))
3921 (define-public java-plexus-utils
3923 (name "java-plexus-utils")
3924 ;; sisu-build-api needs this version, later versions don't work
3929 (url "https://github.com/codehaus-plexus/plexus-utils")
3930 (commit (string-append "plexus-utils-" version))))
3931 (file-name (git-file-name name version))
3934 "1w169glixyk94jbczj8jzg897lsab46jihiaa3dhw0p06g35va8b"))))
3935 (build-system ant-build-system)
3936 ;; FIXME: The default build.xml does not include a target to install
3939 `(#:jar-name "plexus-utils.jar"
3940 #:source-dir "src/main"
3942 (modify-phases %standard-phases
3943 (add-after 'unpack 'fix-reference-to-/bin-and-/usr
3945 (substitute* "src/main/java/org/codehaus/plexus/util/\
3946 cli/shell/BourneShell.java"
3947 (("/bin/sh") (which "sh"))
3948 (("/usr/") (getcwd)))
3950 (add-after 'unpack 'fix-or-disable-broken-tests
3952 (with-directory-excursion "src/test/java/org/codehaus/plexus/util"
3953 (substitute* '("cli/CommandlineTest.java"
3954 "cli/shell/BourneShellTest.java")
3955 (("/bin/sh") (which "sh"))
3956 (("/bin/echo") (which "echo")))
3958 ;; This test depends on MavenProjectStub, but we don't have
3959 ;; a package for Maven.
3960 (delete-file "introspection/ReflectionValueExtractorTest.java")
3962 ;; FIXME: The command line tests fail, maybe because they use
3964 (delete-file "cli/CommandlineTest.java")
3966 ;; These tests require openjdk jmh, which is not packaged yet
3967 (for-each delete-file (find-files "." "PerfTest.java$")))
3969 (add-before 'build 'copy-resources
3971 (copy-recursively "src/main/resources" "build/classes")
3973 (replace 'install (install-from-pom "pom.xml")))))
3975 `(("java-hamcrest-core" ,java-hamcrest-core)
3976 ("java-junit" ,java-junit)))
3978 `(("plexus-parent-pom" ,plexus-parent-pom-5.1)))
3979 (home-page "https://codehaus-plexus.github.io/plexus-utils/")
3980 (synopsis "Common utilities for the Plexus framework")
3981 (description "This package provides various Java utility classes for the
3982 Plexus framework to ease working with strings, files, command lines, XML and
3984 (license license:asl2.0)))
3986 (define-public java-plexus-utils-3.3.0
3988 (inherit java-plexus-utils)
3993 (url "https://github.com/codehaus-plexus/plexus-utils")
3994 (commit (string-append "plexus-utils-" version))))
3995 (file-name (git-file-name "java-plexus-utils" version))
3998 "0d0fq21rzjy0j55kcp8w9k1rbq9rwr0r7cc8239p9jbz54vihp0g"))))))
4000 (define-public java-plexus-interpolation
4002 (name "java-plexus-interpolation")
4007 (url "https://github.com/codehaus-plexus/plexus-interpolation")
4008 (commit (string-append "plexus-interpolation-" version))))
4009 (file-name (git-file-name name version))
4012 "1rahjmhywf6d5m32qzlc9izawyvcd71abfm9k03f13rs2xmfxzlh"))))
4013 (build-system ant-build-system)
4015 `(#:jar-name "plexus-interpolation.jar"
4016 #:source-dir "src/main"
4018 (modify-phases %standard-phases
4019 (replace 'install (install-from-pom "pom.xml")))))
4021 `(("plexus-parent-pom-5.1" ,plexus-parent-pom-5.1)))
4023 `(("java-junit" ,java-junit)
4024 ("java-hamcrest-core" ,java-hamcrest-core)))
4025 (home-page "https://codehaus-plexus.github.io/plexus-interpolation/")
4026 (synopsis "Java components for interpolating ${} strings and the like")
4027 (description "Plexus interpolator is a modular, flexible interpolation
4028 framework for the expression language style commonly seen in Maven, Plexus,
4029 and other related projects.
4031 It has its foundation in the @code{org.codehaus.plexus.utils.interpolation}
4032 package within @code{plexus-utils}, but has been separated in order to allow
4033 these two libraries to vary independently of one another.")
4034 (license license:asl2.0)))
4036 (define-public java-plexus-classworlds
4038 (name "java-plexus-classworlds")
4043 (url "https://github.com/codehaus-plexus/plexus-classworlds")
4044 (commit (string-append "plexus-classworlds-" version))))
4045 (file-name (git-file-name name version))
4048 "034k2hgvj1saalwbnzrbg4n0zgzwcpz1lhlb8q4kgglsp9pmm03s"))))
4049 (build-system ant-build-system)
4051 `(#:jar-name "plexus-classworlds.jar"
4052 #:source-dir "src/main"
4053 #:tests? #f;; FIXME: we need to generate some resources as in pom.xml
4055 (modify-phases %standard-phases
4056 (replace 'install (install-from-pom "pom.xml")))))
4058 `(("plexus-parent-pom-5.1" ,plexus-parent-pom-5.1)))
4060 `(("java-junit" ,java-junit)))
4061 (home-page "https://codehaus-plexus.github.io/plexus-classworlds/")
4062 (synopsis "Java class loader framework")
4063 (description "Plexus classworlds replaces the native @code{ClassLoader}
4064 mechanism of Java. It is especially useful for dynamic loading of application
4066 (license license:asl2.0)))
4068 (define java-plexus-container-default-bootstrap
4070 (name "java-plexus-container-default-bootstrap")
4075 (url "https://github.com/codehaus-plexus/plexus-containers")
4076 (commit (string-append "plexus-containers-" version))))
4077 (file-name (git-file-name name version))
4080 "1316hrp5vqfv0aw7miq2fp0wwy833h66h502h29vnh5sxj27x228"))))
4081 (build-system ant-build-system)
4083 `(#:jar-name "container-default.jar"
4084 #:source-dir "plexus-container-default/src/main/java"
4085 #:test-dir "plexus-container-default/src/test"
4086 #:tests? #f; requires plexus-archiver, which depends on this package
4088 (modify-phases %standard-phases
4089 (add-before 'build 'fix-google-collections
4091 ;; Google collections are now replaced with guava
4092 (substitute* "plexus-container-default/pom.xml"
4093 (("google-collections") "guava")
4094 (("com.google.collections") "com.google.guava"))
4096 (add-before 'build 'copy-resources
4099 "plexus-container-default/src/main/resources/"
4103 (install-from-pom "plexus-container-default/pom.xml")))))
4105 `(("java-plexus-worldclass" ,java-plexus-classworlds)
4106 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
4107 ("java-plexus-utils" ,java-plexus-utils)
4108 ("java-junit" ,java-junit)
4109 ("java-guava" ,java-guava)
4110 ("java-plexus-containers-parent-pom" ,java-plexus-containers-parent-pom)))
4111 (home-page "https://github.com/codehaus-plexus/plexus-containers")
4112 (synopsis "Inversion-of-control container")
4113 (description "Plexus-default-container is Plexus' inversion-of-control
4114 (@dfn{IoC}) container. It is composed of its public API and its default
4116 (license license:asl2.0)))
4118 (define java-plexus-containers-parent-pom
4120 (inherit java-plexus-container-default-bootstrap)
4121 (name "java-plexus-containers-parent-pom")
4125 (modify-phases %standard-phases
4129 (install-pom-file "pom.xml")))))
4131 `(("plexus-parent-pom" ,plexus-parent-pom-4.0)))))
4133 (define-public java-plexus-io
4135 (name "java-plexus-io")
4140 (url "https://github.com/codehaus-plexus/plexus-io")
4141 (commit (string-append "plexus-io-" version))))
4142 (file-name (git-file-name name version))
4145 "1r3wqfpbxq8vp4p914i8p88r0994rmcjw02hz14n11cfb6gsyvlr"))))
4146 (build-system ant-build-system)
4148 `(#:jar-name "plexus-io.jar"
4149 #:source-dir "src/main/java"
4150 #:test-dir "src/test"
4152 (modify-phases %standard-phases
4153 (add-before 'build 'copy-resources
4155 (mkdir-p "build/classes")
4156 (copy-recursively "src/main/resources" "build/classes")
4157 (mkdir-p "build/test-classes")
4158 (copy-recursively "src/test/resources" "build/test-classes")
4160 (replace 'install (install-from-pom "pom.xml")))))
4162 `(("java-plexus-utils" ,java-plexus-utils-3.3.0)
4163 ("java-commons-io" ,java-commons-io)
4164 ("plexus-parent-pom" ,plexus-parent-pom-5.1)))
4166 `(("java-jsr305" ,java-jsr305)))
4168 `(("junit" ,java-junit)
4169 ("hamcrest" ,java-hamcrest-core)
4170 ("guava" ,java-guava)
4171 ("classworlds" ,java-plexus-classworlds)
4172 ("xbean" ,java-geronimo-xbean-reflect)
4173 ("container-default" ,java-plexus-container-default-bootstrap)))
4174 (home-page "https://github.com/codehaus-plexus/plexus-io")
4175 (synopsis "I/O plexus components")
4176 (description "Plexus IO is a set of plexus components, which are designed
4177 for use in I/O operations. This implementation using plexus components allows
4178 reusing it in maven.")
4179 (license license:asl2.0)))
4181 (define-public java-plexus-archiver
4183 (name "java-plexus-archiver")
4187 (uri (string-append "https://github.com/codehaus-plexus/plexus-archiver"
4188 "/archive/plexus-archiver-" version ".tar.gz"))
4191 "144n971r3lfrx3l12nf2scm80x4xdvgbkk4bjpa4vcvvdrll6qys"))))
4192 (build-system ant-build-system)
4194 `(#:jar-name "plexus-archiver.jar"
4195 #:source-dir "src/main/java"
4196 #:test-dir "src/test"
4197 #:test-exclude (list "**/Abstract*.java" "**/Base*.java")
4199 (modify-phases %standard-phases
4200 (add-before 'check 'remove-failing
4202 ;; Requires an older version of plexus container
4204 "src/test/java/org/codehaus/plexus/archiver/DuplicateFilesTest.java")
4206 (add-before 'check 'fix-test-building
4208 (substitute* "build.xml"
4209 (("srcdir=\"src/test\"") "srcdir=\"src/test/java\""))
4211 (add-before 'build 'copy-resources
4213 (mkdir-p "build/classes")
4214 (copy-recursively "src/main/resources" "build/classes")
4215 (mkdir-p "build/test-classes")
4216 (copy-recursively "src/test/resources" "build/test-classes")
4218 (replace 'install (install-from-pom "pom.xml")))))
4220 `(("java-plexus-utils" ,java-plexus-utils-3.3.0)
4221 ("java-plexus-io" ,java-plexus-io)
4222 ("java-iq80-snappy" ,java-iq80-snappy)
4223 ("java-commons-compress" ,java-commons-compress)
4224 ("plexus-parent-pom" ,plexus-parent-pom-6.1)))
4226 `(("java-jsr305" ,java-jsr305)
4227 ("java-plexus-container-default"
4228 ,java-plexus-container-default-bootstrap)))
4230 `(("java-hamcrest-core" ,java-hamcrest-core)
4231 ("junit" ,java-junit)
4232 ("classworld" ,java-plexus-classworlds)
4233 ("xbean" ,java-geronimo-xbean-reflect)
4235 ("guava" ,java-guava)))
4236 (home-page "https://github.com/codehaus-plexus/plexus-archiver")
4237 (synopsis "Archiver component of the Plexus project")
4238 (description "Plexus-archiver contains a component to deal with project
4240 (license license:asl2.0)))
4242 (define-public java-plexus-container-default
4244 (inherit java-plexus-container-default-bootstrap)
4245 (name "java-plexus-container-default")
4247 `(#:jar-name "container-default.jar"
4248 #:source-dir "plexus-container-default/src/main/java"
4249 #:test-dir "plexus-container-default/src/test"
4250 #:test-exclude (list ;"**/*Test.java"
4252 ;; Requires plexus-hierarchy
4253 "**/PlexusHierarchyTest.java"
4255 "**/ComponentRealmCompositionTest.java"
4256 "**/PlexusContainerTest.java")
4258 (modify-phases %standard-phases
4259 (add-before 'build 'fix-google-collections
4261 ;; Google collections are now replaced with guava
4262 (substitute* "plexus-container-default/pom.xml"
4263 (("google-collections") "guava")
4264 (("com.google.collections") "com.google.guava"))
4266 (add-before 'build 'copy-resources
4269 "plexus-container-default/src/main/resources/"
4272 (add-before 'check 'fix-paths
4274 (let ((dir "plexus-container-default/src/test/java/org/codehaus"))
4277 dir "/plexus/component/composition/"
4278 "ComponentRealmCompositionTest.java")
4279 (("src/test") "plexus-container-default/src/test"))
4282 (install-from-pom "plexus-container-default/pom.xml")))))
4284 `(("worldclass" ,java-plexus-classworlds)
4285 ("xbean" ,java-geronimo-xbean-reflect)
4286 ("utils" ,java-plexus-utils)
4287 ("junit" ,java-junit)
4288 ("guava" ,java-guava)))
4290 `(("archiver" ,java-plexus-archiver)
4291 ("hamcrest" ,java-hamcrest-core)))))
4293 (define-public java-plexus-component-annotations
4295 (inherit java-plexus-container-default)
4296 (name "java-plexus-component-annotations")
4298 `(#:jar-name "plexus-component-annotations.jar"
4299 #:source-dir "plexus-component-annotations/src/main/java"
4300 #:tests? #f; no tests
4302 (modify-phases %standard-phases
4304 (install-from-pom "plexus-component-annotations/pom.xml")))))
4306 `(("java-plexus-containers-parent-pom" ,java-plexus-containers-parent-pom)))
4309 (synopsis "Plexus descriptors generator")
4310 (description "This package is a Maven plugin to generate Plexus descriptors
4311 from source tags and class annotations.")))
4313 (define-public java-plexus-component-metadata
4315 (inherit java-plexus-container-default)
4316 (name "java-plexus-component-metadata")
4318 `(#:jar-name "plexus-component-metadata.jar"
4319 #:source-dir "src/main/java"
4320 #:test-dir "src/test"
4323 (modify-phases %standard-phases
4324 (add-before 'configure 'chdir
4326 (chdir "plexus-component-metadata")
4328 (add-before 'build 'copy-resources
4330 (copy-recursively "src/main/resources"
4334 `(("java-plexus-container-default" ,java-plexus-container-default)
4335 ("java-plexu-component-annotations" ,java-plexus-component-annotations)
4336 ("java-plexus-utils" ,java-plexus-utils)
4337 ("java-plexus-cli" ,java-plexus-cli)
4338 ("java-plexus-classworlds" ,java-plexus-classworlds)
4339 ("maven-plugin-api" ,maven-plugin-api)
4340 ("maven-plugin-annotations" ,maven-plugin-annotations)
4341 ("maven-core-bootstrap" ,maven-core-bootstrap)
4342 ("maven-model" ,maven-model)
4343 ("java-commons-cli" ,java-commons-cli)
4344 ("java-qdox" ,java-qdox)
4345 ("java-jdom2" ,java-jdom2)
4346 ("java-asm" ,java-asm)))
4348 `(("java-junit" ,java-junit)
4349 ("java-guava" ,java-guava)
4350 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)))
4351 (synopsis "Inversion-of-control container for Maven")
4352 (description "The Plexus project provides a full software stack for creating
4353 and executing software projects. Based on the Plexus container, the
4354 applications can utilise component-oriented programming to build modular,
4355 reusable components that can easily be assembled and reused. This package
4356 provides the Maven plugin generating the component metadata.")))
4358 (define-public java-plexus-cipher
4360 (name "java-plexus-cipher")
4365 (url "https://github.com/codehaus-plexus/plexus-cipher")
4366 (commit (string-append "plexus-cipher-" version))))
4367 (file-name (git-file-name name version))
4370 "0m638nzlxbmnbcj5cwdpgs326ab584yv0k803zlx37r6iqwvf6b0"))))
4371 (build-system ant-build-system)
4373 `(#:jar-name "plexus-cipher.jar"
4374 #:source-dir "src/main/java"
4375 #:tests? #f; FIXME: requires sisu-inject-bean
4377 (modify-phases %standard-phases
4378 (add-before 'build 'copy-resources
4380 (copy-recursively "src/main/resources" "build/classes")
4381 (mkdir-p "build/classes/META-INF/sisu")
4382 (with-output-to-file "build/classes/META-INF/sisu/javax.inject.Named"
4384 (display "org.sonatype.plexus.components.cipher.DefaultPlexusCipher\n")))
4386 (add-before 'install 'fix-test-dependency
4388 ;; sisu-inject-bean is only used for tests, but its scope is "provided".
4389 (substitute* "pom.xml"
4390 (("provided") "test"))
4392 (replace 'install (install-from-pom "pom.xml")))))
4394 `(("java-cdi-api" ,java-cdi-api)
4395 ("java-javax-inject" ,java-javax-inject)))
4397 `(("java-sonatype-spice-parent-pom" ,java-sonatype-spice-parent-pom-15)))
4399 `(("java-junit" ,java-junit)))
4400 (home-page "https://github.com/sonatype/plexus-cipher")
4401 (synopsis "Encryption/decryption Component")
4402 (description "Plexus-cipher contains a component to deal with encryption
4404 (license license:asl2.0)))
4406 (define-public java-plexus-java
4408 (name "java-plexus-java")
4413 (url "https://github.com/codehaus-plexus/plexus-languages")
4414 (commit (string-append "plexus-languages-" version))))
4415 (file-name (git-file-name name version))
4418 "0vmvgq5hfxs90yyxgssfpwq78l7vwx1ljwpkk594mrdr8sm668b5"))
4419 (modules '((guix build utils)))
4422 (for-each delete-file (find-files "." ".*.jar$"))
4424 (build-system ant-build-system)
4426 `(#:jar-name "plexus-java.java"
4427 #:source-dir "plexus-java/src/main/java"
4428 #:test-dir "plexus-java/src/test"
4429 #:tests? #f; require mockito 2
4431 (modify-phases %standard-phases
4432 (add-after 'build 'generate-metadata
4434 (invoke "java" "-cp" (string-append (getenv "CLASSPATH") ":build/classes")
4435 "org.codehaus.plexus.metadata.PlexusMetadataGeneratorCli"
4436 "--source" "plexus-java/src/main/java"
4437 "--output" "build/classes/META-INF/plexus/components.xml"
4438 "--classes" "build/classes"
4439 "--descriptors" "build/classes/META-INF")
4440 (invoke "ant" "jar")
4442 (add-before 'install 'install-parent
4443 (install-pom-file "pom.xml"))
4445 (install-from-pom "plexus-java/pom.xml")))))
4447 `(("java-asm" ,java-asm)
4448 ("java-qdox" ,java-qdox-2-M9)
4449 ("java-javax-inject" ,java-javax-inject)
4450 ("plexus-parent-pom" ,plexus-parent-pom-4.0)))
4452 `(("java-plexus-component-annotations" ,java-plexus-component-annotations)))
4454 `(("java-plexus-component-metadata" ,java-plexus-component-metadata)
4455 ("java-junit" ,java-junit)))
4456 (home-page "https://codehaus-plexus.github.io/plexus-languages/plexus-java")
4457 (synopsis "Shared language features for Java")
4458 (description "This package contains shared language features of the Java
4459 language, for the plexus project.")
4460 (license license:asl2.0)))
4462 (define-public java-plexus-compiler-api
4464 (name "java-plexus-compiler-api")
4469 (url "https://github.com/codehaus-plexus/plexus-compiler")
4470 (commit (string-append "plexus-compiler-" version))))
4471 (file-name (git-file-name name version))
4474 "1nq1gnn3s6z1j29gmi1hqbklsmm8b1lmnafb0191914f95mn18gk"))))
4475 (build-system ant-build-system)
4477 `(#:jar-name "plexus-compiler-api.jar"
4478 #:source-dir "plexus-compiler-api/src/main/java"
4479 #:test-dir "plexus-compiler-api/src/test"
4481 (modify-phases %standard-phases
4483 (install-from-pom "plexus-compiler-api/pom.xml")))))
4485 `(("java-plexus-container-default" ,java-plexus-container-default)
4486 ("java-plexus-compiler-pom" ,java-plexus-compiler-pom)
4487 ("java-plexus-util" ,java-plexus-utils)))
4489 `(("java-junit" ,java-junit)))
4490 (home-page "https://github.com/codehaus-plexus/plexus-compiler")
4491 (synopsis "Plexus Compilers component's API to manipulate compilers")
4492 (description "This package contains the API used by components to manipulate
4494 (license (list license:asl2.0
4497 (define java-plexus-compiler-pom
4499 (inherit java-plexus-compiler-api)
4500 (name "java-plexus-compiler-pom")
4504 (modify-phases %standard-phases
4508 (install-pom-file "pom.xml"))
4509 (add-after 'install 'install-compilers
4510 (install-pom-file "plexus-compilers/pom.xml")))))
4512 `(("plexus-components-parent-pom-4.0" ,plexus-components-parent-pom-4.0)))))
4514 (define plexus-components-parent-pom-4.0
4516 (name "plexus-components-parent-pom")
4521 (url "https://github.com/codehaus-plexus/plexus-components")
4522 (commit (string-append "plexus-components-" version))))
4523 (file-name (git-file-name name version))
4526 "041bm8yv0m2i17mqg8zljib4ykpha7ijls2qfdwvkma4d39lhysi"))))
4527 (build-system ant-build-system)
4531 (modify-phases %standard-phases
4535 (install-pom-file "pom.xml")))))
4537 `(("plexus-parent-pom-4.0" ,plexus-parent-pom-4.0)))
4538 (home-page "https://codehaus-plexus.github.io/plexus-components")
4539 (synopsis "Plexus parent pom")
4540 (description "This package contains the Plexus components parent POM.")
4541 (license license:asl2.0)))
4543 (define-public java-plexus-compiler-manager
4545 (inherit java-plexus-compiler-api)
4546 (name "java-plexus-compiler-manager")
4548 `(#:jar-name "compiler-compiler-manager.java"
4549 #:source-dir "plexus-compiler-manager/src/main/java"
4550 #:test-dir "plexus-compiler-manager/src/test"
4553 (modify-phases %standard-phases
4554 (add-after 'build 'generate-metadata
4556 (invoke "java" "-cp" (string-append (getenv "CLASSPATH") ":build/classes")
4557 "org.codehaus.plexus.metadata.PlexusMetadataGeneratorCli"
4558 "--source" "plexus-compiler-manager/src/main/java"
4559 "--output" "build/classes/META-INF/plexus/components.xml"
4560 "--classes" "build/classes"
4561 "--descriptors" "build/classes/META-INF")
4562 (invoke "ant" "jar")
4564 (add-after 'generate-metadata 'rebuild
4566 (invoke "ant" "jar")
4569 (install-from-pom "plexus-compiler-manager/pom.xml")))))
4571 `(("java-plexus-compiler-api" ,java-plexus-compiler-api)
4572 ("java-plexus-compiler-pom" ,java-plexus-compiler-pom)
4573 ("java-plexus-container-default" ,java-plexus-container-default)))
4576 ("java-plexus-component-metadata" ,java-plexus-component-metadata)))
4577 (synopsis "Compiler management for Plexus Compiler component")
4578 (description "Plexus Compiler is a Plexus component to use different
4579 compilers through a uniform API. This component chooses the compiler
4580 implementation to use in a project.")))
4582 (define-public java-plexus-compiler-javac
4584 (inherit java-plexus-compiler-api)
4585 (name "java-plexus-compiler-javac")
4587 `(#:jar-name "plexus-compiler-javac.jar"
4588 #:source-dir "plexus-compilers/plexus-compiler-javac/src/main/java"
4590 #:tests? #f; depends on compiler-test -> maven-core -> ... -> this package.
4591 #:test-dir "plexus-compilers/plexus-compiler-javac/src/test"
4592 #:modules ((guix build ant-build-system)
4594 (guix build java-utils)
4597 (modify-phases %standard-phases
4598 ;; We cannot use java-plexus-component-metadata to generate the metadata
4599 ;; because it ultimately depends on this package.
4600 ;; Create it manually instead
4601 (add-before 'build 'create-metadata
4603 (let* ((dir "build/classes/META-INF/plexus")
4604 (file (string-append dir "/components.xml")))
4606 (with-output-to-file file
4612 (role "org.codehaus.plexus.compiler.Compiler")
4614 (implementation "org.codehaus.plexus.compiler.javac.JavacCompiler")
4615 (isolated-realm "false"))))))))
4618 (install-from-pom "plexus-compilers/plexus-compiler-javac/pom.xml")))))
4620 `(("java-plexus-compiler-api" ,java-plexus-compiler-api)
4621 ("java-plexus-utils" ,java-plexus-utils)
4622 ("java-plexus-container-default" ,java-plexus-container-default)))
4623 (synopsis "Javac Compiler support for Plexus Compiler component")
4624 (description "This package contains the Javac Compiler support for Plexus
4625 Compiler component.")))
4627 (define plexus-components-pom-1.1.20
4629 (name "plexus-components-pom-1.1.20")
4634 (url "https://github.com/codehaus-plexus/plexus-components")
4635 (commit (string-append "plexus-components-" version))))
4636 (file-name (git-file-name name version))
4639 "1q254k95m9icyfsvaw8c226midg8v6v436wvivhv7im825mnp5yb"))))
4640 (build-system ant-build-system)
4644 (modify-phases %standard-phases
4648 (install-pom-file "pom.xml")))))
4650 `(("plexus-parent-pom" ,plexus-parent-pom-3.1)))
4651 (home-page "https://github.com/codehaus-plexus/plexus-components")
4652 (synopsis "Maven parent pom for plexus packages")
4653 (description "This package contains the parent pom for plexus component
4655 (license license:asl2.0)))
4657 (define-public java-plexus-digest
4659 (name "java-plexus-digest")
4664 (url "https://github.com/codehaus-plexus/plexus-digest")
4665 (commit "2a52ad1bda8297fa0e287163d2fa37245ec6a430")))
4666 (file-name (git-file-name name version))
4669 "19w5wxsliz8r42niry68qa665kvjsb8081dazg9vgd3pca72w07x"))))
4670 (build-system ant-build-system)
4672 `(#:jar-name "plexus-digest.jar"
4673 #:source-dir "src/main/java"
4676 (modify-phases %standard-phases
4678 (install-from-pom "pom.xml")))))
4680 `(("java-plexus-utils" ,java-plexus-utils)
4681 ("plexus-components-pom-1.1.20" ,plexus-components-pom-1.1.20)))
4683 `(("java-junit" ,java-junit)))
4684 (home-page "https://github.com/codehaus-plexus/plexus-digest")
4685 (synopsis "Hash function utilities for Java")
4686 (description "This package is a plexus component that contains hash
4687 function utilities.")
4688 (license license:asl2.0)))
4690 (define-public java-plexus-sec-dispatcher
4692 (name "java-plexus-sec-dispatcher")
4693 (version "1.4") ;; Newest release listed at the Maven Central Repository.
4695 ;; This project doesn't tag releases or publish tarballs, so we take
4696 ;; the "prepare release plexus-sec-dispatcher-1.4" git commit.
4699 (url "https://github.com/sonatype/plexus-sec-dispatcher/")
4700 (commit "7db8f880486e192a1c5ea9544e01e756c3d49d0f")))
4703 "1ng4yliy4cqpjr4fxxjbpwyk1wkch5f8vblm1kvwf328s4gibszs"))
4704 (file-name (git-file-name name version))))
4706 `(#:jar-name "plexus-sec-dispatcher.jar"
4707 #:source-dir "src/main/java"
4709 (modify-phases %standard-phases
4710 (add-before 'build 'generate-models
4711 (lambda* (#:key inputs #:allow-other-keys)
4712 (define (modello-single-mode file version mode)
4714 "org.codehaus.modello.ModelloCli"
4715 file mode "src/main/java" version
4717 (let ((file "src/main/mdo/settings-security.mdo"))
4718 (modello-single-mode file "1.0.0" "java")
4719 (modello-single-mode file "1.0.0" "xpp3-reader")
4720 (modello-single-mode file "1.0.0" "xpp3-writer"))
4722 (add-before 'build 'generate-components.xml
4724 (mkdir-p "build/classes/META-INF/plexus")
4725 (with-output-to-file "build/classes/META-INF/plexus/components.xml"
4731 <role>org.sonatype.plexus.components.sec.dispatcher.SecDispatcher</role>\n
4732 <role-hint>default</role-hint>\n
4733 <implementation>org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher</implementation>\n
4734 <description></description>\n
4737 <role>org.sonatype.plexus.components.cipher.PlexusCipher</role>\n
4738 <field-name>_cipher</field-name>\n
4741 <role>org.sonatype.plexus.components.sec.dispatcher.PasswordDecryptor</role>\n
4742 <field-name>_decryptors</field-name>\n
4746 <_configuration-file>~/.settings-security.xml</_configuration-file>\n
4750 </component-set>\n")))
4752 (add-before 'check 'fix-paths
4754 (copy-recursively "src/test/resources" "target")
4756 (replace 'install (install-from-pom "pom.xml")))))
4758 `(("java-plexus-utils" ,java-plexus-utils)
4759 ("java-plexus-cipher" ,java-plexus-cipher)
4760 ("java-sonatype-spice-parent-pom" ,java-sonatype-spice-parent-pom-12)))
4762 `(("java-modello-core" ,java-modello-core)
4764 ("java-plexus-container-default" ,java-plexus-container-default)
4765 ("java-plexus-classworlds" ,java-plexus-classworlds)
4766 ("java-plexus-utils" ,java-plexus-utils)
4767 ("java-guava" ,java-guava)
4768 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
4769 ("java-sisu-build-api" ,java-sisu-build-api)
4771 ("java-modellop-plugins-java" ,java-modello-plugins-java)
4772 ("java-modellop-plugins-xml" ,java-modello-plugins-xml)
4773 ("java-modellop-plugins-xpp3" ,java-modello-plugins-xpp3)
4775 ("java-junit" ,java-junit)))
4776 (build-system ant-build-system)
4777 (home-page "https://github.com/sonatype/plexus-sec-dispatcher")
4778 (synopsis "Plexus Security Dispatcher Component")
4779 (description "This package is the Plexus Security Dispatcher Component.
4780 This component decrypts a string passed to it.")
4781 (license license:asl2.0)))
4783 (define-public java-plexus-cli
4785 (name "java-plexus-cli")
4790 (url "https://github.com/sonatype/plexus-cli")
4791 (commit "a776afa6bca84e5107bedb69440329cdb24ed645")))
4792 (file-name (string-append name "-" version))
4795 "0xjrlay605rypv3zd7y24vlwf0039bil3n2cqw54r1ddpysq46vx"))))
4796 (build-system ant-build-system)
4798 `(#:jar-name "plexus-cli.jar"
4799 #:source-dir "src/main/java"
4801 #:test-dir "src/test"))
4803 `(("java-commons-cli" ,java-commons-cli)
4804 ("java-plexus-container-default" ,java-plexus-container-default)
4805 ("java-plexus-classworlds" ,java-plexus-classworlds)))
4807 `(("java-plexus-utils" ,java-plexus-utils)
4808 ("java-junit" ,java-junit)
4809 ("java-guava" ,java-guava)))
4810 (home-page "https://codehaus-plexus.github.io/plexus-cli")
4811 (synopsis "CLI building library for plexus")
4812 (description "This package is a library to help creating CLI around
4813 Plexus components.")
4814 (license license:asl2.0)))
4816 (define-public java-sisu-build-api
4818 (name "java-sisu-build-api")
4823 (url "https://github.com/sonatype/sisu-build-api")
4824 (commit (string-append "plexus-build-api-" version))))
4825 (file-name (git-file-name name version))
4828 "1d5w6c58gkx30d51v7qwv1xrhc0ly76848gihmgshj19yf6yhca0"))))
4829 (build-system ant-build-system)
4831 `(#:jar-name "sisu-build-api.jar"
4832 #:source-dir "src/main/java"
4834 #:tests? #f; FIXME: how to run the tests?
4836 (modify-phases %standard-phases
4837 (add-before 'build 'copy-resources
4839 (copy-recursively "src/main/resources" "build/classes")
4840 (substitute* (find-files "build/classes")
4841 (("\\$\\{project.version\\}") ,version))
4843 (add-before 'build 'generate-plexus-compontent
4845 (mkdir-p "build/classes/META-INF/plexus")
4846 ;; This file is required for plexus to inject this package.
4847 ;; FIXME: how is it generated?
4848 (with-output-to-file "build/classes/META-INF/plexus/components.xml"
4854 <role>org.sonatype.plexus.build.incremental.BuildContext</role>\n
4855 <role-hint>default</role-hint>\n
4856 <implementation>org.sonatype.plexus.build.incremental.DefaultBuildContext</implementation>\n
4857 <description>Filesystem based non-incremental build context implementation\n
4858 which behaves as if all files were just created.</description>\n
4861 </component-set>\n")))
4864 (install-from-pom "pom.xml")))))
4866 `(("java-plexus-utils" ,java-plexus-utils)
4867 ("java-plexus-container-default" ,java-plexus-container-default)))
4868 (home-page "https://github.com/sonatype/sisu-build-api/")
4869 (synopsis "Base build API for maven")
4870 (description "This package contains the base build API for maven and
4871 a default implementation of it. This API is about scanning files in a
4872 project and determining what files need to be rebuilt.")
4873 (license license:asl2.0)))
4875 (define-public java-modello-core
4877 (name "java-modello-core")
4882 (url "https://github.com/codehaus-plexus/modello")
4883 (commit (string-append "modello-" version))))
4884 (file-name (git-file-name name version))
4887 "1di6ni42aqllpdvkpyfcw70352vr2i8wf6hd5nhd9kmqjb5dj5j4"))))
4888 (build-system ant-build-system)
4890 `(#:jar-name "modello-core.jar"
4891 #:source-dir "modello-core/src/main/java"
4892 #:test-dir "modello-core/src/test"
4893 #:main-class "org.codehaus.modello.ModelloCli"
4896 (modify-phases %standard-phases
4897 (add-before 'build 'copy-resources
4899 (mkdir-p "build/classes/META-INF/plexus")
4900 (copy-file "modello-core/src/main/resources/META-INF/plexus/components.xml"
4901 "build/classes/META-INF/plexus/components.xml")
4903 (add-before 'check 'fix-tests
4905 (with-directory-excursion "modello-core/src/test/java/org/codehaus"
4906 (substitute* '("modello/core/DefaultModelloCoreTest.java"
4907 "modello/core/io/ModelReaderTest.java")
4908 (("src/test") "modello-core/src/test")))
4911 `(("java-plexus-utils" ,java-plexus-utils)
4912 ("java-plexus-container-default" ,java-plexus-container-default)
4913 ("java-sisu-build-api" ,java-sisu-build-api)))
4915 `(("java-junit" ,java-junit)
4916 ("java-plexus-classworlds" ,java-plexus-classworlds)
4917 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
4918 ("java-guava" ,java-guava)))
4919 (home-page "https://codehaus-plexus.github.io/modello/")
4920 (synopsis "Framework for code generation from a simple model")
4921 (description "Modello is a framework for code generation from a simple model.
4923 Modello generates code from a simple model format: based on a plugin
4924 architecture, various types of code and descriptors can be generated from the
4925 single model, including Java POJOs, XML/JSON/YAML marshallers/unmarshallers,
4926 XSD and documentation.")
4929 ;; Although this package uses only files licensed under expat,
4930 ;; other parts of the source are licensed under different
4931 ;; licenses. We include them to be inherited by other packages.
4933 ;; Some files in modello-plugin-java are licensed under a
4934 ;; 5-clause BSD license.
4935 (license:non-copyleft
4936 (string-append "file:///modello-plugins/modello-plugin-java/"
4937 "src/main/java/org/codehaus/modello/plugin/"
4938 "java/javasource/JNaming.java"))))))
4940 (define-public java-modello-plugins-java
4942 (inherit java-modello-core)
4943 (name "java-modello-plugins-java")
4945 `(#:jar-name "modello-plugins-java.jar"
4946 #:source-dir "modello-plugins/modello-plugin-java/src/main/java"
4947 #:test-dir "modello-plugins/modello-plugin-java/src/test"
4949 #:tests? #f; requires maven-model, which depends on this package
4951 (modify-phases %standard-phases
4952 (add-before 'build 'copy-resources
4954 (mkdir-p "build/classes")
4955 (copy-recursively "modello-plugins/modello-plugin-java/src/main/resources"
4959 `(("java-modello-core" ,java-modello-core)))
4960 (synopsis "Modello Java Plugin")
4961 (description "Modello Java Plugin generates Java objects for the model.")))
4963 (define-public java-modello-plugins-xml
4965 (inherit java-modello-core)
4966 (name "java-modello-plugins-xml")
4968 `(#:jar-name "modello-plugins-xml.jar"
4969 #:source-dir "modello-plugins/modello-plugin-xml/src/main/java"
4970 #:test-dir "modello-plugins/modello-plugin-xml/src/test"
4973 (modify-phases %standard-phases
4974 (add-before 'build 'copy-resources
4976 (mkdir-p "build/classes")
4978 "modello-plugins/modello-plugin-xml/src/main/resources"
4981 (add-before 'check 'fix-paths
4983 (with-directory-excursion "modello-plugins/modello-plugin-xml/src/test"
4985 "java/org/codehaus/modello/plugins/xml/XmlModelloPluginTest.java"
4986 (("src/test") "modello-plugins/modello-plugin-xml/src/test")))
4989 `(("java-modello-core" ,java-modello-core)
4990 ("java-modello-plugins-java" ,java-modello-plugins-java)))
4991 (synopsis "Modello XML Plugin")
4992 (description "Modello XML Plugin contains shared code for every plugins
4993 working on XML representation of the model.")))
4995 (define-public java-modello-test
4997 (inherit java-modello-core)
4998 (name "java-modello-test")
5000 `(#:jar-name "modello-test.jar"
5001 #:source-dir "modello-test/src/main/java"
5002 #:tests? #f; no tests
5005 `(("java-plexus-utils" ,java-plexus-utils)
5006 ("java-plexus-compiler-api" ,java-plexus-compiler-api)
5007 ("java-plexus-compiler-javac" ,java-plexus-compiler-javac)
5008 ("java-plexus-container-default" ,java-plexus-container-default)))
5009 (synopsis "Modello test package")
5010 (description "The modello test package contains the basis to create
5011 Modello generator unit-tests, including sample models and xml files to test
5012 every feature for every plugin.")))
5014 (define-public java-modello-plugins-xpp3
5016 (inherit java-modello-core)
5017 (name "java-modello-plugins-xpp3")
5019 `(#:jar-name "modello-plugins-xpp3.jar"
5020 #:source-dir "modello-plugins/modello-plugin-xpp3/src/main/java"
5021 #:test-dir "modello-plugins/modello-plugin-xpp3/src/test"
5022 ;; One of the test dependencies is maven-model which depends on this package.
5026 (modify-phases %standard-phases
5027 (add-before 'build 'copy-resources
5029 (mkdir-p "build/classes")
5030 (copy-recursively "modello-plugins/modello-plugin-xpp3/src/main/resources"
5034 `(("java-modello-core" ,java-modello-core)
5035 ("java-modello-plugins-java" ,java-modello-plugins-java)
5036 ("java-modello-plugins-xml" ,java-modello-plugins-xml)))
5038 `(("java-xmlunit" ,java-xmlunit)
5039 ("java-modello-test" ,java-modello-test)
5040 ,@(package-native-inputs java-modello-core)))
5041 (synopsis "Modello XPP3 Plugin")
5042 (description "The modello XPP3 plugin generates XML readers and writers based
5043 on the XPP3 API (XML Pull Parser).")))
5045 (define-public java-asm
5051 (uri (string-append "https://download.forge.ow2.org/asm/"
5052 "asm-" version ".tar.gz"))
5055 "115l5pqblirdkmzi32dxx7gbcm4jy0s14y5wircr6h8jdr9aix00"))))
5056 (build-system ant-build-system)
5058 `(#:build-target "compile"
5059 ;; The tests require an old version of Janino, which no longer compiles
5064 ;; We don't need these extra ant tasks, but the build system asks us to
5065 ;; provide a path anyway.
5066 "-Dobjectweb.ant.tasks.path=dummy-path"
5067 ;; The java-aqute.bndlib JAR file will be put onto the classpath and
5068 ;; used during the build automatically by ant-build-system, but
5069 ;; java-asm's build.xml fails unless we provide something here.
5070 "-Dbiz.aQute.bnd.path=dummy-path")
5072 (modify-phases %standard-phases
5073 (add-before 'build 'remove-bnd-dependency
5075 ;; This file is the only one to require bnd, and is not needed
5076 ;; because we don't build a bundle.
5077 (delete-file "src/org/objectweb/asm/tools/ModuleInfoBndPlugin.java")
5079 (add-before 'install 'build-jars
5080 (lambda* (#:key make-flags #:allow-other-keys)
5081 ;; We cannot use the "jar" target because it depends on a couple
5082 ;; of unpackaged, complicated tools.
5085 "-cf" (string-append "dist/asm-" ,version ".jar")
5086 "-C" "output/build/tmp" ".")))
5087 (add-before 'install 'fix-pom
5089 (substitute* (find-files "archive" "\\.pom$")
5090 (("@product.artifact@") ,version))
5092 (add-before 'install 'install-parent
5093 (install-pom-file "archive/asm-parent.pom"))
5095 (install-from-pom "archive/asm.pom")))))
5097 `(("java-junit" ,java-junit)))
5099 `(("java-org-ow2-parent-pom" ,java-org-ow2-parent-pom-1.3)))
5100 (home-page "https://asm.ow2.io/")
5101 (synopsis "Very small and fast Java bytecode manipulation framework")
5102 (description "ASM is an all purpose Java bytecode manipulation and
5103 analysis framework. It can be used to modify existing classes or dynamically
5104 generate classes, directly in binary form. The provided common
5105 transformations and analysis algorithms allow easily assembling custom
5106 complex transformations and code analysis tools.")
5107 (license license:bsd-3)))
5109 (define java-org-ow2-parent-pom-1.3
5111 (name "java-org-ow2-parent-pom")
5115 (uri "https://repo1.maven.org/maven2/org/ow2/ow2/1.3/ow2-1.3.pom")
5118 "1yr8hfx8gffpppa4ii6cvrsq029a6x8hzy7nsavxhs60s9kmq8ai"))))
5119 (build-system ant-build-system)
5123 (modify-phases %standard-phases
5128 (install-pom-file (assoc-ref %build-inputs "source"))))))
5129 (home-page "https://ow2.org")
5130 (synopsis "Ow2.org parent pom")
5131 (description "This package contains the parent pom for projects from ow2.org,
5132 including java-asm.")
5133 (license license:lgpl2.1+)))
5135 (define java-asm-bootstrap
5138 (name "java-asm-bootstrap")
5140 (substitute-keyword-arguments (package-arguments java-asm)
5142 (native-inputs `())))
5144 (define-public java-asm-8
5151 (url "https://gitlab.ow2.org/asm/asm")
5152 (commit (string-append
5153 "ASM_" (string-join (string-split version #\.)
5155 (file-name (git-file-name "java-asm" version))
5158 "1s6j27zc1i76gh891w2g48b1c3abp9w8zp5j54yb1vm5h8djkd69"))))
5160 `(#:jar-name "asm8.jar"
5161 #:source-dir "asm/src/main/java"
5162 #:test-dir "asm/src/test"
5163 ;; tests depend on junit5
5165 (propagated-inputs '())
5166 (native-inputs '())))
5168 (define-public java-asm-tree-8
5170 (inherit java-asm-8)
5171 (name "java-asm-tree")
5173 `(#:jar-name "asm-tree.jar"
5174 #:source-dir "asm-tree/src/main/java"
5175 #:test-dir "asm-tree/src/test"
5176 ;; tests depend on junit5
5179 `(("java-asm" ,java-asm-8)))))
5181 (define-public java-asm-analysis-8
5183 (inherit java-asm-8)
5184 (name "java-asm-analysis")
5186 `(#:jar-name "asm-analysis.jar"
5187 #:source-dir "asm-analysis/src/main/java"
5188 #:test-dir "asm-analysis/src/test"
5189 ;; tests depend on junit5
5192 `(("java-asm" ,java-asm-8)
5193 ("java-asm-tree" ,java-asm-tree-8)))))
5195 (define-public java-asm-util-8
5197 (inherit java-asm-8)
5198 (name "java-asm-util")
5200 `(#:jar-name "asm-util8.jar"
5201 #:source-dir "asm-util/src/main/java"
5202 #:test-dir "asm-util/src/test"
5203 ;; tests depend on junit5
5206 `(("java-asm" ,java-asm-8)
5207 ("java-asm-analysis" ,java-asm-analysis-8)
5208 ("java-asm-tree" ,java-asm-tree-8)))))
5210 (define-public java-cglib
5218 (url "https://github.com/cglib/cglib")
5219 (commit (string-append
5221 (string-map (lambda (c) (if (char=? c #\.) #\_ c))
5223 (file-name (git-file-name name version))
5225 (base32 "186451jms2zfp47yd8kxd77az2cqal1my2br7klgyp8fpl4qfg8v"))))
5226 (build-system ant-build-system)
5228 `(;; FIXME: tests fail because junit runs
5229 ;; "net.sf.cglib.transform.AbstractTransformTest", which does not seem
5230 ;; to describe a test at all.
5232 #:jar-name "cglib.jar"
5234 (modify-phases %standard-phases
5235 (add-after 'unpack 'chdir
5236 (lambda _ (chdir "cglib") #t)))))
5238 `(("java-asm" ,java-asm)
5239 ("java-junit" ,java-junit)))
5240 (home-page "https://github.com/cglib/cglib/")
5241 (synopsis "Java byte code generation library")
5242 (description "The byte code generation library CGLIB is a high level API
5243 to generate and transform Java byte code.")
5244 (license license:asl2.0)))
5246 (define-public java-objenesis
5248 (name "java-objenesis")
5253 (url "https://github.com/easymock/objenesis")
5255 (file-name (git-file-name name version))
5258 "054yi200wj00x6dp1sxfrwgndwywadsbn8d8ij1j0v45j9g2vdya"))))
5259 (build-system ant-build-system)
5261 `(#:jar-name "objenesis.jar"
5262 #:source-dir "main/src/"
5263 #:test-dir "main/src/test/"))
5265 `(("java-junit" ,java-junit)
5266 ("java-hamcrest-core" ,java-hamcrest-core)))
5267 (home-page "http://objenesis.org/")
5268 (synopsis "Bypass the constructor when creating an object")
5269 (description "Objenesis is a small Java library that serves one purpose:
5270 to instantiate a new object of a particular class. It is common to see
5271 restrictions in libraries stating that classes must require a default
5272 constructor. Objenesis aims to overcome these restrictions by bypassing the
5273 constructor on object instantiation.")
5274 (license license:asl2.0)))
5276 (define-public java-easymock
5278 (name "java-easymock")
5283 (url "https://github.com/easymock/easymock/")
5284 (commit (string-append "easymock-" version))))
5285 (file-name (git-file-name name version))
5288 "02vybm8hc0i0n9sp2f2iiqn54zwqhq835f76wc6b2m7819z5a8dq"))))
5289 (build-system ant-build-system)
5291 `(#:jar-name "easymock.jar"
5292 #:source-dir "core/src/main"
5293 #:test-dir "core/src/test"
5295 (modify-phases %standard-phases
5296 ;; FIXME: Android support requires the following packages to be
5297 ;; available: com.google.dexmaker.stock.ProxyBuilder
5298 (add-after 'unpack 'delete-android-support
5300 (with-directory-excursion "core/src/main/java/org/easymock/internal"
5301 (substitute* "MocksControl.java"
5302 (("AndroidSupport.isAndroid\\(\\)") "false")
5303 (("return classProxyFactory = new AndroidClassProxyFactory\\(\\);") ""))
5304 (delete-file "AndroidClassProxyFactory.java"))
5306 (add-after 'unpack 'delete-broken-tests
5308 (with-directory-excursion "core/src/test/java/org/easymock"
5309 ;; This test depends on dexmaker.
5310 (delete-file "tests2/ClassExtensionHelperTest.java")
5312 ;; This is not a test.
5313 (delete-file "tests/BaseEasyMockRunnerTest.java")
5315 ;; This test should be executed with a different runner...
5316 (delete-file "tests2/EasyMockAnnotationsTest.java")
5317 ;; ...but deleting it means that we also have to delete these
5319 (delete-file "tests2/EasyMockRunnerTest.java")
5320 (delete-file "tests2/EasyMockRuleTest.java")
5322 ;; This test fails because the file "easymock.properties" does
5324 (delete-file "tests2/EasyMockPropertiesTest.java"))
5327 `(("java-asm" ,java-asm)
5328 ("java-cglib" ,java-cglib)
5329 ("java-objenesis" ,java-objenesis)))
5331 `(("java-junit" ,java-junit)
5332 ("java-hamcrest-core" ,java-hamcrest-core)))
5333 (home-page "https://easymock.org/")
5334 (synopsis "Java library providing mock objects for unit tests")
5335 (description "EasyMock is a Java library that provides an easy way to use
5336 mock objects in unit testing.")
5337 (license license:asl2.0)))
5339 (define-public java-jmock-1
5346 (url "https://github.com/jmock-developers/jmock-library")
5348 (file-name (git-file-name name version))
5351 "0lkga995xd9b9mmzxmcd301hlw83p1h78nibh7djlx7wydscr85z"))))
5352 (build-system ant-build-system)
5354 `(#:build-target "jars"
5355 #:test-target "run.tests"
5357 (modify-phases %standard-phases
5358 (replace 'install (install-jars "build")))))
5359 (home-page "http://jmock.org/")
5360 (synopsis "Mock object library for test-driven development")
5361 (description "JMock is a library that supports test-driven development of
5362 Java code with mock objects. Mock objects help you design and test the
5363 interactions between the objects in your programs.
5368 @item makes it quick and easy to define mock objects
5369 @item lets you precisely specify the interactions between
5370 your objects, reducing the brittleness of your tests
5371 @item plugs into your favourite test framework
5372 @item is easy to extend.
5374 (license license:bsd-3)))
5376 (define-public java-jmock
5378 (inherit java-jmock-1)
5384 (url "https://github.com/jmock-developers/jmock-library")
5386 (file-name (git-file-name name version))
5389 "12b7l22g3nrjvf2dzcw3z03fpd2chrgp0d8xkvn8w55rwb57pax6"))))
5391 `(("java-hamcrest-all" ,java-hamcrest-all)
5392 ("java-asm" ,java-asm)
5393 ("java-bsh" ,java-bsh)
5394 ("java-junit" ,java-junit)))
5396 `(("cglib" ,java-cglib)))
5398 `(#:jar-name "java-jmock.jar"
5399 #:source-dir "jmock/src/main/java"
5400 #:test-dir "jmock/src/test"))))
5402 (define-public java-jmock-junit4
5404 (inherit java-jmock)
5405 (name "java-jmock-junit4")
5407 `(#:jar-name "java-jmock-junit4.jar"
5408 #:source-dir "jmock-junit4/src/main/java"
5409 #:test-dir "jmock-junit4/src/test"))
5411 `(("java-hamcrest-all" ,java-hamcrest-all)
5412 ("java-asm" ,java-asm)
5413 ("java-bsh" ,java-bsh)
5414 ("java-jmock" ,java-jmock)
5415 ("java-jumit" ,java-junit)))))
5417 (define-public java-jmock-legacy
5419 (inherit java-jmock)
5420 (name "java-jmock-legacy")
5422 `(#:jar-name "java-jmock-legacy.jar"
5423 #:source-dir "jmock-legacy/src/main/java"
5424 #:test-dir "jmock-legacy/src/test"
5426 (modify-phases %standard-phases
5427 (add-before 'check 'copy-tests
5429 ;; This file is a dependancy of some tests
5430 (let ((file "org/jmock/test/acceptance/PackageProtectedType.java"))
5431 (copy-file (string-append "jmock/src/test/java/" file)
5432 (string-append "jmock-legacy/src/test/java/" file))
5435 `(("java-hamcrest-all" ,java-hamcrest-all)
5436 ("java-objenesis" ,java-objenesis)
5437 ("java-cglib" ,java-cglib)
5438 ("java-jmock" ,java-jmock)
5439 ("java-asm" ,java-asm)
5440 ("java-bsh" ,java-bsh)
5441 ("java-junit" ,java-junit)))
5443 `(("java-jmock-junit4" ,java-jmock-junit4)))))
5445 (define-public java-hamcrest-all
5446 (package (inherit java-hamcrest-core)
5447 (name "java-hamcrest-all")
5450 ,@(substitute-keyword-arguments (package-arguments java-hamcrest-core)
5451 ((#:build-target _) "bigjar")
5453 `(modify-phases ,phases
5454 ;; Some build targets override the classpath, so we need to patch
5455 ;; the build.xml to ensure that required dependencies are on the
5457 (add-after 'unpack 'patch-classpath-for-integration
5458 (lambda* (#:key inputs #:allow-other-keys)
5459 (substitute* "build.xml"
5460 ((" build/hamcrest-library-\\$\\{version\\}.jar" line)
5464 (find-files (assoc-ref inputs "java-junit") "\\.jar$")
5465 (find-files (assoc-ref inputs "java-jmock") "\\.jar$")
5466 (find-files (assoc-ref inputs "java-easymock") "\\.jar$")))
5468 (("build/hamcrest-core-\\$\\{version\\}\\.jar")
5469 (car (find-files (assoc-ref inputs "java-hamcrest-core")
5473 (lambda* (#:key outputs #:allow-other-keys)
5474 (let* ((target (string-append (assoc-ref outputs "out")
5478 "-" (package-version java-hamcrest-core) ".jar"))
5479 (install-without-version-suffix
5482 (string-append target
5483 (basename jar version-suffix)
5487 install-without-version-suffix
5490 (and (string-suffix? ".jar" name)
5491 (not (string-suffix? "-sources.jar" name)))))))
5494 `(("java-junit" ,java-junit)
5495 ("java-jmock" ,java-jmock-1)
5496 ;; This is necessary because of what seems to be a race condition.
5497 ;; This package would sometimes fail to build because hamcrest-core.jar
5498 ;; could not be found, even though it is built as part of this package.
5499 ;; Adding java-hamcrest-core appears to fix this problem. See
5500 ;; https://debbugs.gnu.org/31390 for more information.
5501 ("java-hamcrest-core" ,java-hamcrest-core)
5502 ("java-easymock" ,java-easymock)
5503 ,@(package-inputs java-hamcrest-core)))))
5505 (define-public java-jopt-simple
5507 (name "java-jopt-simple")
5511 (uri (string-append "http://repo1.maven.org/maven2/"
5512 "net/sf/jopt-simple/jopt-simple/"
5513 version "/jopt-simple-"
5514 version "-sources.jar"))
5517 "1v8bzmwmw6qq20gm42xyay6vrd567dra4vqwhgjnqqjz1gs9f8qa"))))
5518 (build-system ant-build-system)
5520 `(#:tests? #f ; there are no tests
5521 #:jar-name "jopt-simple.jar"))
5522 (home-page "https://pholser.github.io/jopt-simple/")
5523 (synopsis "Java library for parsing command line options")
5524 (description "JOpt Simple is a Java library for parsing command line
5525 options, such as those you might pass to an invocation of @code{javac}. In
5526 the interest of striving for simplicity, as closely as possible JOpt Simple
5527 attempts to honor the command line option syntaxes of POSIX @code{getopt} and
5528 GNU @code{getopt_long}. It also aims to make option parser configuration and
5529 retrieval of options and their arguments simple and expressive, without being
5531 (license license:expat)))
5533 (define-public java-commons-math3
5535 (name "java-commons-math3")
5539 (uri (string-append "mirror://apache/commons/math/source/"
5540 "commons-math3-" version "-src.tar.gz"))
5543 "19l6yp44qc5g7wg816nbn5z3zq3xxzwimvbm4a8pczgvpi4i85s6"))))
5544 (build-system ant-build-system)
5546 `(#:build-target "jar"
5547 #:test-target "test"
5549 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
5550 (junit (assoc-ref %build-inputs "java-junit")))
5551 (list (string-append "-Djunit.jar="
5552 (car (find-files junit "jar$")))
5553 (string-append "-Dhamcrest.jar="
5554 (car (find-files hamcrest ".*.jar$")))))
5556 (modify-phases %standard-phases
5557 ;; We want to build the jar in the build phase and run the tests
5558 ;; later in a separate phase.
5559 (add-after 'unpack 'untangle-targets
5561 (substitute* "build.xml"
5562 (("name=\"jar\" depends=\"test\"")
5563 "name=\"jar\" depends=\"compile\""))
5565 ;; There is no install target.
5567 (install-jars "target")))))
5569 `(("java-junit" ,java-junit)
5570 ("java-hamcrest-core" ,java-hamcrest-core)))
5571 (home-page "https://commons.apache.org/math/")
5572 (synopsis "Apache Commons mathematics library")
5573 (description "Commons Math is a library of lightweight, self-contained
5574 mathematics and statistics components addressing the most common problems not
5575 available in the Java programming language or Commons Lang.")
5576 (license license:asl2.0)))
5578 (define-public java-jmh
5585 (url "http://hg.openjdk.java.net/code-tools/jmh/")
5586 (changeset version)))
5587 (file-name (string-append name "-" version "-checkout"))
5590 "1fxyxhg9famwcg1prc4cgwb5wzyxqavn3cjm5vz8605xz7x5k084"))))
5591 (build-system ant-build-system)
5593 `(#:jar-name "jmh-core.jar"
5594 #:source-dir "jmh-core/src/main"
5595 #:test-dir "jmh-core/src/test"
5597 (modify-phases %standard-phases
5598 ;; This seems to be a bug in the JDK. It may not be necessary in
5599 ;; future versions of the JDK.
5600 (add-after 'unpack 'fix-bug
5602 (with-directory-excursion
5603 "jmh-core/src/main/java/org/openjdk/jmh/runner/options"
5604 (substitute* '("IntegerValueConverter.java"
5605 "ThreadsValueConverter.java")
5606 (("public Class<Integer> valueType")
5607 "public Class<? extends Integer> valueType")))
5610 `(("java-jopt-simple" ,java-jopt-simple)
5611 ("java-commons-math3" ,java-commons-math3)))
5613 `(("java-junit" ,java-junit)
5614 ("java-hamcrest-core" ,java-hamcrest-core)))
5615 (home-page "https://openjdk.java.net/projects/code-tools/jmh/")
5616 (synopsis "Benchmark harness for the JVM")
5617 (description "JMH is a Java harness for building, running, and analysing
5618 nano/micro/milli/macro benchmarks written in Java and other languages
5619 targeting the JVM.")
5621 (license license:gpl2)))
5623 (define-public java-commons-collections4
5625 (name "java-commons-collections4")
5629 (uri (string-append "mirror://apache/commons/collections/source/"
5630 "commons-collections4-" version "-src.tar.gz"))
5633 "1krfhvggympq4avk7gh6qafzf6b9ip6r1m4lmacikyx04039m0wl"))))
5634 (build-system ant-build-system)
5636 `(#:test-target "test"
5638 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
5639 (junit (assoc-ref %build-inputs "java-junit"))
5640 (easymock (assoc-ref %build-inputs "java-easymock")))
5641 (list (string-append "-Djunit.jar="
5642 (car (find-files junit "jar$")))
5643 (string-append "-Dhamcrest.jar="
5644 (car (find-files hamcrest "jar$")))
5645 (string-append "-Deasymock.jar=" easymock
5646 "/share/java/easymock.jar")))
5648 (modify-phases %standard-phases
5650 (install-jars "target")))))
5652 `(("java-junit" ,java-junit)
5653 ("java-hamcrest-core" ,java-hamcrest-core)
5654 ("java-easymock" ,java-easymock)))
5655 (home-page "https://commons.apache.org/collections/")
5656 (synopsis "Collections framework")
5657 (description "The Java Collections Framework is the recognised standard
5658 for collection handling in Java. Commons-Collections seek to build upon the
5659 JDK classes by providing new interfaces, implementations and utilities. There
5660 are many features, including:
5663 @item @code{Bag} interface for collections that have a number of copies of
5665 @item @code{BidiMap} interface for maps that can be looked up from value to
5666 key as well and key to value
5667 @item @code{MapIterator} interface to provide simple and quick iteration over
5669 @item Transforming decorators that alter each object as it is added to the
5671 @item Composite collections that make multiple collections look like one
5672 @item Ordered maps and sets that retain the order elements are added in,
5673 including an LRU based map
5674 @item Reference map that allows keys and/or values to be garbage collected
5676 @item Many comparator implementations
5677 @item Many iterator implementations
5678 @item Adapter classes from array and enumerations to collections
5679 @item Utilities to test or create typical set-theory properties of collections
5680 such as union, intersection, and closure.
5682 (license license:asl2.0)))
5684 (define-public java-commons-collections
5686 (inherit java-commons-collections4)
5687 (name "java-commons-collections")
5691 (uri (string-append "mirror://apache/commons/collections/source/"
5692 "commons-collections-" version "-src.tar.gz"))
5695 "055r51a5lfc3z7rkxnxmnn1npvkvda7636hjpm4qk7cnfzz98387"))
5697 (search-patches "java-commons-collections-fix-java8.patch"))))
5699 (substitute-keyword-arguments (package-arguments java-commons-collections4)
5701 `(modify-phases ,phases
5702 ;; The manifest is required by the build procedure
5703 (add-before 'build 'add-manifest
5705 (mkdir-p "build/conf")
5706 (call-with-output-file "build/conf/MANIFEST.MF"
5708 (format file "Manifest-Version: 1.0\n")))
5711 (install-jars "build"))))))))
5713 (define java-commons-collections-test-classes
5715 (inherit java-commons-collections)
5717 `(#:jar-name "commons-collections-test-classes.jar"
5718 #:source-dir "src/test"
5721 `(("collection" ,java-commons-collections)))))
5723 (define-public java-commons-beanutils
5725 (name "java-commons-beanutils")
5729 (uri (string-append "mirror://apache/commons/beanutils/source/"
5730 "commons-beanutils-" version "-src.tar.gz"))
5733 "03cs0bq3sl1sdc7py9g3qnf8n9h473nrkvd3d251kaqv6a2ab7qk"))))
5734 (build-system ant-build-system)
5736 `(#:test-target "test"
5739 (modify-phases %standard-phases
5741 (lambda* (#:key outputs #:allow-other-keys)
5742 (rename-file (string-append "dist/commons-beanutils-" ,version
5744 "commons-beanutils.jar")
5745 (install-file "commons-beanutils.jar"
5746 (string-append (assoc-ref outputs "out") "/share/java/"))
5749 `(("logging" ,java-commons-logging-minimal)
5750 ("collections" ,java-commons-collections)))
5752 `(("junit" ,java-junit)
5753 ("collections-test" ,java-commons-collections-test-classes)))
5754 (home-page "https://commons.apache.org/beanutils/")
5755 (synopsis "Dynamically set or get properties in Java")
5756 (description "BeanUtils provides a simplified interface to reflection and
5757 introspection to set or get dynamically determined properties through their
5758 setter and getter method.")
5759 (license license:asl2.0)))
5761 (define-public java-commons-io
5763 (name "java-commons-io")
5768 (uri (string-append "mirror://apache/commons/io/source/"
5769 "commons-io-" version "-src.tar.gz"))
5772 "0q5y41jrcjvx9hzs47x5kdhnasdy6rm4bzqd2jxl02w717m7a7v3"))))
5773 (build-system ant-build-system)
5774 (outputs '("out" "doc"))
5776 `(#:test-target "test"
5778 (list (string-append "-Djunit.jar="
5779 (car (find-files (assoc-ref %build-inputs "java-junit")
5782 (modify-phases %standard-phases
5783 (add-after 'build 'build-javadoc ant-build-javadoc)
5784 (replace 'install (install-from-pom "pom.xml"))
5785 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
5787 `(("java-junit" ,java-junit)
5788 ("java-hamcrest-core" ,java-hamcrest-core)))
5790 `(("apache-commons-parent-pom" ,apache-commons-parent-pom-39)))
5791 (home-page "https://commons.apache.org/io/")
5792 (synopsis "Common useful IO related classes")
5793 (description "Commons-IO contains utility classes, stream implementations,
5794 file filters and endian classes.")
5795 (license license:asl2.0)))
5797 (define-public java-commons-exec-1.1
5799 (name "java-commons-exec")
5804 (uri (string-append "mirror://apache/commons/exec/source/"
5805 "commons-exec-" version "-src.tar.gz"))
5808 "025dk8xgj10lxwwwqp0hng2rn7fr4vcirxzydqzx9k4dim667alk"))))
5809 (build-system ant-build-system)
5811 `(#:test-target "test"
5813 (list (string-append "-Dmaven.junit.jar="
5814 (car (find-files (assoc-ref %build-inputs "java-junit")
5817 (modify-phases %standard-phases
5818 (add-before 'build 'delete-network-tests
5820 (delete-file "src/test/java/org/apache/commons/exec/DefaultExecutorTest.java")
5821 (substitute* "src/test/java/org/apache/commons/exec/TestRunner.java"
5822 (("suite\\.addTestSuite\\(DefaultExecutorTest\\.class\\);") ""))
5824 ;; The "build" phase automatically tests.
5826 (replace 'install (install-jars "target")))))
5828 `(("java-junit" ,java-junit)))
5829 (home-page "https://commons.apache.org/proper/commons-exec/")
5830 (synopsis "Common program execution related classes")
5831 (description "Commons-Exec simplifies executing external processes.")
5832 (license license:asl2.0)))
5834 (define-public java-commons-exec
5836 (inherit java-commons-exec-1.1)
5841 (uri (string-append "mirror://apache/commons/exec/source/"
5842 "commons-exec-" version "-src.tar.gz"))
5845 "17yb4h6f8l49c5iyyvda4z2nmw0bxrx857nrwmsr7mmpb7x441yv"))))
5847 `(#:test-target "test"
5849 (list (string-append "-Dmaven.junit.jar="
5850 (car (find-files (assoc-ref %build-inputs "java-junit")
5852 "-Dmaven.compiler.source=1.7"
5853 "-Dmaven.compiler.target=1.7")
5855 (modify-phases %standard-phases
5856 (add-before 'build 'delete-network-tests
5857 (lambda* (#:key inputs #:allow-other-keys)
5858 ;; This test hangs indefinitely.
5859 (delete-file "src/test/java/org/apache/commons/exec/issues/Exec60Test.java")
5860 (substitute* "src/test/java/org/apache/commons/exec/issues/Exec41Test.java"
5861 (("ping -c 10 127.0.0.1") "sleep 10"))
5862 (substitute* "src/test/java/org/apache/commons/exec/issues/Exec49Test.java"
5864 (call-with-output-file "src/test/scripts/ping.sh"
5866 (format port "#!~a/bin/sh\nsleep $1\n"
5867 (assoc-ref inputs "bash"))))
5869 ;; The "build" phase automatically tests.
5871 (replace 'install (install-jars "target")))))
5873 `(("java-junit" ,java-junit)
5874 ("java-hamcrest-core" ,java-hamcrest-core)))))
5876 (define-public java-commons-lang
5878 (name "java-commons-lang")
5883 (uri (string-append "mirror://apache/commons/lang/source/"
5884 "commons-lang-" version "-src.tar.gz"))
5886 (base32 "1mxwagqadzx1b2al7i0z1v0r235aj2njdyijf02szq0vhmqrfiq5"))))
5887 (build-system ant-build-system)
5888 (outputs '("out" "doc"))
5890 `(#:test-target "test"
5891 #:test-exclude (list "**/Abstract*.java" "**/Random*.java")
5893 (modify-phases %standard-phases
5894 (add-after 'build 'build-javadoc ant-build-javadoc)
5895 (add-before 'check 'disable-failing-test
5897 ;; Disable a failing test
5898 (substitute* "src/test/java/org/apache/commons/lang/\
5899 time/FastDateFormatTest.java"
5900 (("public void testFormat\\(\\)")
5901 "public void disabled_testFormat()"))
5903 (replace 'install (install-jars "target"))
5904 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
5906 `(("java-junit" ,java-junit)))
5907 (home-page "https://commons.apache.org/lang/")
5908 (synopsis "Extension of the java.lang package")
5909 (description "The Commons Lang components contains a set of Java classes
5910 that provide helper methods for standard Java classes, especially those found
5911 in the @code{java.lang} package in the Sun JDK. The following classes are
5915 @item StringUtils - Helper for @code{java.lang.String}.
5916 @item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets
5917 of characters such as @code{[a-z]} and @code{[abcdez]}.
5918 @item RandomStringUtils - Helper for creating randomised strings.
5919 @item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
5920 @item NumberRange - A range of numbers with an upper and lower bound.
5921 @item ObjectUtils - Helper for @code{java.lang.Object}.
5922 @item SerializationUtils - Helper for serializing objects.
5923 @item SystemUtils - Utility class defining the Java system properties.
5924 @item NestedException package - A sub-package for the creation of nested
5926 @item Enum package - A sub-package for the creation of enumerated types.
5927 @item Builder package - A sub-package for the creation of @code{equals},
5928 @code{hashCode}, @code{compareTo} and @code{toString} methods.
5930 (license license:asl2.0)))
5932 (define-public java-commons-lang3
5934 (name "java-commons-lang3")
5939 (uri (string-append "mirror://apache/commons/lang/source/"
5940 "commons-lang3-" version "-src.tar.gz"))
5942 (base32 "0s4ffbvsyl16c90l45ximsg4dwd8hmz7wsza3p308fw43h6mwhb6"))))
5943 (build-system ant-build-system)
5945 `(#:jar-name "commons-lang3.jar"
5946 #:source-dir "src/main/java"
5947 #:tests? #f; require junit5
5949 (modify-phases %standard-phases
5950 (replace 'install (install-from-pom "pom.xml")))))
5952 `(("apache-commons-parent-pom" ,apache-commons-parent-pom-48)))
5953 (home-page "https://commons.apache.org/lang/")
5954 (synopsis "Extension of the java.lang package")
5955 (description "The Commons Lang components contains a set of Java classes
5956 that provide helper methods for standard Java classes, especially those found
5957 in the @code{java.lang} package. The following classes are included:
5960 @item StringUtils - Helper for @code{java.lang.String}.
5961 @item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets of
5962 characters such as @code{[a-z]} and @code{[abcdez]}.
5963 @item RandomStringUtils - Helper for creating randomised strings.
5964 @item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
5965 @item NumberRange - A range of numbers with an upper and lower bound.
5966 @item ObjectUtils - Helper for @code{java.lang.Object}.
5967 @item SerializationUtils - Helper for serializing objects.
5968 @item SystemUtils - Utility class defining the Java system properties.
5969 @item NestedException package - A sub-package for the creation of nested
5971 @item Enum package - A sub-package for the creation of enumerated types.
5972 @item Builder package - A sub-package for the creation of @code{equals},
5973 @code{hashCode}, @code{compareTo} and @code{toString} methods.
5975 (license license:asl2.0)))
5977 (define-public java-commons-bsf
5979 (name "java-commons-bsf")
5983 (uri (string-append "mirror://apache/commons/bsf/source/bsf-src-"
5987 "1sbamr8jl32p1jgf59nw0b2w9qivyg145954hm6ly54cfgsqrdas"))
5988 (modules '((guix build utils)))
5991 (for-each delete-file
5992 (find-files "." "\\.jar$"))
5994 (build-system ant-build-system)
5996 `(#:build-target "jar"
5997 #:tests? #f; No test file
5998 #:modules ((guix build ant-build-system)
6000 (guix build java-utils)
6003 (modify-phases %standard-phases
6004 (add-before 'build 'create-properties
6006 ;; This file is missing from the distribution
6007 (call-with-output-file "build-properties.xml"
6010 `(project (@ (basedir ".") (name "build-properties") (default ""))
6011 (property (@ (name "project.name") (value "bsf")))
6012 (property (@ (name "source.level") (value "1.5")))
6013 (property (@ (name "build.lib") (value "build/jar")))
6014 (property (@ (name "src.dir") (value "src")))
6015 (property (@ (name "tests.dir") (value "src/org/apache/bsf/test")))
6016 (property (@ (name "build.tests") (value "build/test-classes")))
6017 (property (@ (name "build.dest") (value "build/classes"))))
6020 (replace 'install (install-jars "build")))))
6022 `(("java-junit" ,java-junit)))
6024 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)))
6025 (home-page "https://commons.apache.org/proper/commons-bsf")
6026 (synopsis "Bean Scripting Framework")
6027 (description "The Bean Scripting Framework (BSF) is a set of Java classes
6028 which provides scripting language support within Java applications, and access
6029 to Java objects and methods from scripting languages. BSF allows one to write
6030 JSPs in languages other than Java while providing access to the Java class
6031 library. In addition, BSF permits any Java application to be implemented in
6032 part (or dynamically extended) by a language that is embedded within it. This
6033 is achieved by providing an API that permits calling scripting language engines
6034 from within Java, as well as an object registry that exposes Java objects to
6035 these scripting language engines.")
6036 (license license:asl2.0)))
6038 (define-public java-commons-jxpath
6040 (name "java-commons-jxpath")
6044 (uri (string-append "mirror://apache/commons/jxpath/source/"
6045 "commons-jxpath-" version "-src.tar.gz"))
6048 "1rpgg31ayn9fwr4bfi2i1ij0npcg79ad2fv0w9hacvawsyc42cfs"))))
6049 (build-system ant-build-system)
6051 `(#:jar-name "commons-jxpath.jar"
6052 ;; tests require more dependencies, including mockrunner which depends on old software
6054 #:source-dir "src/java"))
6056 `(("servlet" ,java-classpathx-servletapi)
6057 ("java-jdom" ,java-jdom)
6058 ("java-commons-beanutils" ,java-commons-beanutils)))
6060 `(("java-junit" ,java-junit)))
6061 (home-page "https://commons.apache.org/jxpath/")
6062 (synopsis "Simple interpreter of an expression language called XPath.")
6063 (description "The org.apache.commons.jxpath package defines a simple
6064 interpreter of an expression language called XPath. JXPath applies XPath
6065 expressions to graphs of objects of all kinds: JavaBeans, Maps, Servlet
6066 contexts, DOM etc, including mixtures thereof.")
6067 (license license:asl2.0)))
6069 (define-public java-commons-pool
6071 (name "java-commons-pool")
6075 (uri (string-append "mirror://apache/commons/pool/source/"
6076 "commons-pool2-" version "-src.tar.gz"))
6079 "1fi1hgqmq01bs6azbj3sfswxzadp2r8sjjfiq6ryilz1m50kvrv6"))))
6081 `(#:jar-name "common-pool.jar"
6082 #:source-dir "src/main/java"
6084 (list "**/PerformanceTest.java")))
6085 (build-system ant-build-system)
6087 `(("java-cglib" ,java-cglib)))
6089 `(("java-junit" ,java-junit)
6090 ("java-hamcrest-core" ,java-hamcrest-core)
6091 ("java-asm" ,java-asm)
6092 ("java-objenesis" ,java-objenesis)))
6093 (home-page "https://commons.apache.org/proper/commons-pool/")
6094 (synopsis "Object-pooling API in Java")
6095 (description "The commons-pool package provides an object-pooling API
6096 and a number of object pool implementations. This package defines a
6097 handful of pooling interfaces and some base classes that may be useful when
6098 creating new pool implementations.")
6099 (license license:asl2.0)))
6101 (define-public java-commons-dbcp
6103 (name "java-commons-dbcp")
6107 (uri (string-append "mirror://apache/commons/dbcp/source/"
6108 "commons-dbcp2-" version "-src.tar.gz"))
6111 "0axbvcbnf2l70fc3ybrlp3siw2w4ka9mia2pnx4py8gz54cpw3rc"))))
6113 `(#:source-dir "src/main/java"
6114 #:jar-name "java-commons-dbcp.jar"
6115 #:tests? #f)); requires apache-geronimo
6117 `(("java-commons-pool" ,java-commons-pool)
6118 ("java-commons-logging" ,java-commons-logging-minimal)
6119 ("java-jboss-transaction-api-spec" ,java-jboss-transaction-api-spec)))
6121 `(("java-junit" ,java-junit)))
6122 (build-system ant-build-system)
6123 (home-page "https://commons.apache.org/proper/commons-dbcp/")
6124 (synopsis "Database Connection Pool for Java")
6125 (description "Commons-dbcp allows you to share a pool of database
6126 connections between users. Creating a new connection for each user can be
6127 time consuming and even unfeasible when the number of simultaneous users is
6128 very large. This package provides a way to share a poole of connections to
6130 (license license:asl2.0)))
6132 (define-public java-commons-jcs
6134 (name "java-commons-jcs")
6138 (uri (string-append "mirror://apache/commons/jcs/source/"
6139 "commons-jcs-dist-" version "-src.tar.gz"))
6142 "0syhq2npjbrl0azqfjm0gvash1qd5qjy4qmysxcrqjsk0nf9fa1q"))))
6143 (build-system ant-build-system)
6145 `(#:jar-name "commons-jcs.jar"
6146 #:source-dir "commons-jcs-core/src/main/java"
6147 #:test-dir "commons-jcs-core/src/test"
6148 #:tests? #f; requires hsqldb
6150 (modify-phases %standard-phases
6151 (add-before 'build 'prepare
6153 (with-directory-excursion
6154 "commons-jcs-core/src/main/java/org/apache/commons/jcs"
6156 "auxiliary/disk/jdbc/dsfactory/SharedPoolDataSourceFactory.java"
6157 (("commons.dbcp") "commons.dbcp2")
6158 ((".*\\.setMaxActive.*") ""))
6159 ;;; Remove dependency on velocity-tools
6160 (delete-file "admin/servlet/JCSAdminServlet.java"))
6163 `(("java-classpathx-servletapi" ,java-classpathx-servletapi)
6164 ("java-commons-logging-minimal" ,java-commons-logging-minimal)
6165 ("java-commons-httpclient" ,java-commons-httpclient)
6166 ("java-commons-dbcp" ,java-commons-dbcp)))
6168 `(("java-junit" ,java-junit)))
6169 (home-page "https://commons.apache.org/proper/commons-jcs/")
6170 (synopsis "Distributed caching system in Java")
6171 (description "JCS is a distributed caching system written in Java. It
6172 is intended to speed up applications by providing a means to manage cached
6173 data of various dynamic natures. Like any caching system, JCS is most useful
6174 for high read, low put applications. Latency times drop sharply and
6175 bottlenecks move away from the database in an effectively cached system.")
6176 (license license:asl2.0)))
6178 (define-public java-jsr250
6180 (name "java-jsr250")
6184 (uri (string-append "https://repo1.maven.org/maven2/"
6185 "javax/annotation/javax.annotation-api/"
6186 version "/javax.annotation-api-"
6187 version "-sources.jar"))
6190 "08clh8n4n9wfglf75qsqfjs6yf79f7x6hqx38cn856pksszv50kz"))))
6191 (build-system ant-build-system)
6193 `(#:tests? #f ; no tests included
6195 #:jar-name "jsr250.jar"
6196 #:modules ((guix build ant-build-system)
6198 (guix build maven pom)
6199 (guix build java-utils)
6202 (modify-phases %standard-phases
6203 (add-before 'install 'create-pom
6205 (with-output-to-file "pom.xml"
6209 (modelVersion "4.0.0")
6211 (groupId "javax.annotation")
6212 (artifactId "jsr250-api")
6213 (version ,,version))))))
6216 (install-from-pom "pom.xml")))))
6217 (home-page "https://jcp.org/en/jsr/detail?id=250")
6218 (synopsis "Security-related annotations")
6219 (description "This package provides annotations for security. It provides
6220 packages in the @code{javax.annotation} and @code{javax.annotation.security}
6222 ;; either cddl or gpl2 only, with classpath exception
6223 (license (list license:cddl1.0
6226 (define-public java-jsr305
6228 (name "java-jsr305")
6232 (uri (string-append "https://repo1.maven.org/maven2/"
6233 "com/google/code/findbugs/"
6234 "jsr305/" version "/jsr305-"
6235 version "-sources.jar"))
6238 "1rh6jin9v7jqpq3kf1swl868l8i94r636n03pzpsmgr8v0lh9j2n"))))
6239 (build-system ant-build-system)
6241 `(#:tests? #f ; no tests included
6242 #:jar-name "jsr305.jar"
6243 #:modules ((guix build ant-build-system)
6244 (guix build java-utils)
6245 (guix build maven pom)
6249 (modify-phases %standard-phases
6250 (add-before 'install 'create-pom
6252 (with-output-to-file "pom.xml"
6256 (modelVersion "4.0.0")
6258 (groupId "com.google.code.findbugs")
6259 (artifactId "jsr305")
6260 (version ,,version))))))
6263 (install-from-pom "pom.xml")))))
6264 (home-page "http://findbugs.sourceforge.net/")
6265 (synopsis "Annotations for the static analyzer called findbugs")
6266 (description "This package provides annotations for the findbugs package.
6267 It provides packages in the @code{javax.annotations} namespace.")
6268 (license license:asl2.0)))
6270 (define-public java-guava
6273 ;; This is the last release of Guava that can be built with Java 7.
6278 (url "https://github.com/google/guava/")
6279 (commit (string-append "v" version))))
6280 (file-name (git-file-name name version))
6283 "00h5cawdjic1vind3yivzh1f58flvm1yfmhsyqwyvmbvj1vakysp"))))
6284 (build-system ant-build-system)
6286 `(#:tests? #f ; no tests included
6287 #:jar-name "guava.jar"
6288 #:source-dir "guava/src"
6290 (modify-phases %standard-phases
6291 (add-after 'unpack 'trim-sources
6293 (with-directory-excursion "guava/src/com/google/common"
6294 ;; Remove annotations to avoid extra dependencies:
6295 ;; * "j2objc" annotations are used when converting Java to
6297 ;; * "errorprone" annotations catch common Java mistakes at
6299 ;; * "IgnoreJRERequirement" is used for Android.
6300 (substitute* (find-files "." "\\.java$")
6301 (("import com.google.j2objc.*") "")
6302 (("import com.google.errorprone.annotation.*") "")
6303 (("import org.codehaus.mojo.animal_sniffer.*") "")
6304 (("@CanIgnoreReturnValue") "")
6307 (("@RetainedWith") "")
6309 (("@ForOverride") "")
6310 (("@J2ObjCIncompatible") "")
6311 (("@IgnoreJRERequirement") "")))
6313 (replace 'install (install-from-pom "guava/pom.xml")))))
6315 `(("java-jsr305" ,java-jsr305)))
6317 `(("java-guava-parent-pom" ,java-guava-parent-pom)))
6318 (home-page "https://github.com/google/guava")
6319 (synopsis "Google core libraries for Java")
6320 (description "Guava is a set of core libraries that includes new
6321 collection types (such as multimap and multiset), immutable collections, a
6322 graph library, functional types, an in-memory cache, and APIs/utilities for
6323 concurrency, I/O, hashing, primitives, reflection, string processing, and much
6325 (license license:asl2.0)))
6327 (define java-guava-parent-pom
6329 (inherit java-guava)
6330 (name "java-guava-parent-pom")
6334 (modify-phases %standard-phases
6338 (install-pom-file "pom.xml")))))
6340 `(("java-sonatype-oss-parent-pom" ,java-sonatype-oss-parent-pom-7)))))
6342 ;; The java-commons-logging package provides adapters to many different
6343 ;; logging frameworks. To avoid an excessive dependency graph we try to build
6344 ;; it with only a minimal set of adapters.
6345 (define-public java-commons-logging-minimal
6347 (name "java-commons-logging-minimal")
6351 (uri (string-append "mirror://apache/commons/logging/source/"
6352 "commons-logging-" version "-src.tar.gz"))
6355 "10bwcy5w8d7y39n0krlwhnp8ds3kj5zhmzj0zxnkw0qdlsjmsrj9"))))
6356 (build-system ant-build-system)
6358 `(#:tests? #f ; avoid dependency on logging frameworks
6359 #:jar-name "commons-logging-minimal.jar"
6361 (modify-phases %standard-phases
6362 (add-after 'unpack 'delete-adapters-and-tests
6364 ;; Delete all adapters except for NoOpLog, SimpleLog, and
6365 ;; LogFactoryImpl. NoOpLog is required to build; LogFactoryImpl
6366 ;; is used by applications; SimpleLog is the only actually usable
6367 ;; implementation that does not depend on another logging
6371 (delete-file (string-append
6372 "src/main/java/org/apache/commons/logging/impl/" file)))
6373 (list "Jdk13LumberjackLogger.java"
6374 "WeakHashtable.java"
6376 "ServletContextCleaner.java"
6379 "LogKitLogger.java"))
6380 (delete-file-recursively "src/test")
6382 (home-page "https://commons.apache.org/logging/")
6383 (synopsis "Common API for logging implementations")
6384 (description "The Logging package is a thin bridge between different
6385 logging implementations. A library that uses the commons-logging API can be
6386 used with any logging implementation at runtime.")
6387 (license license:asl2.0)))
6389 ;; This is the last release of the 1.x series.
6390 (define-public java-mockito-1
6392 (name "java-mockito")
6396 (uri (string-append "http://repo1.maven.org/maven2/"
6397 "org/mockito/mockito-core/" version
6398 "/mockito-core-" version "-sources.jar"))
6401 "0vmiwnwpf83g2q7kj1rislmja8fpvqkixjhawh7nxnygx6pq11kc"))))
6402 (build-system ant-build-system)
6404 `(#:jar-name "mockito.jar"
6405 #:tests? #f ; no tests included
6406 ;; FIXME: patch-and-repack does not support jars, so we have to apply
6407 ;; patches in build phases.
6409 (modify-phases %standard-phases
6410 ;; Mockito was developed against a different version of hamcrest,
6411 ;; which does not require matcher implementations to provide an
6412 ;; implementation of the "describeMismatch" method. We add this
6413 ;; simple definition to pass the build with our version of hamcrest.
6414 (add-after 'unpack 'fix-hamcrest-build-error
6416 (substitute* "src/org/mockito/internal/matchers/LocalizedMatcher.java"
6417 (("public Matcher getActualMatcher\\(\\) .*" line)
6419 public void describeMismatch(Object item, Description description) {
6420 actualMatcher.describeMismatch(item, description);
6424 ;; Mockito bundles cglib. We have a cglib package, so let's use
6426 (add-after 'unpack 'use-system-libraries
6428 (with-directory-excursion "src/org/mockito/internal/creation/cglib"
6429 (substitute* '("CGLIBHacker.java"
6430 "CglibMockMaker.java"
6431 "ClassImposterizer.java"
6432 "DelegatingMockitoMethodProxy.java"
6433 "MethodInterceptorFilter.java"
6434 "MockitoNamingPolicy.java"
6435 "SerializableMockitoMethodProxy.java"
6436 "SerializableNoOp.java")
6437 (("import org.mockito.cglib") "import net.sf.cglib")))
6440 `(("java-junit" ,java-junit)
6441 ("java-objenesis" ,java-objenesis)
6442 ("java-cglib" ,java-cglib)
6443 ("java-hamcrest-core" ,java-hamcrest-core)))
6444 (home-page "http://mockito.org")
6445 (synopsis "Mockito is a mock library for Java")
6446 (description "Mockito is a mocking library for Java which lets you write
6447 tests with a clean and simple API. It generates mocks using reflection, and
6448 it records all mock invocations, including methods arguments.")
6449 (license license:asl2.0)))
6451 (define-public java-httpcomponents-httpcore
6453 (name "java-httpcomponents-httpcore")
6457 (uri (string-append "mirror://apache//httpcomponents/httpcore/"
6458 "source/httpcomponents-core-"
6459 version "-src.tar.gz"))
6462 "02bwcf38y4vgwq7kj2s6q7qrmma641r5lacivm16kgxvb2j6h1vy"))))
6463 (build-system ant-build-system)
6465 `(#:jar-name "httpcomponents-httpcore.jar"
6467 (modify-phases %standard-phases
6468 (add-after 'unpack 'chdir
6469 (lambda _ (chdir "httpcore") #t)))))
6471 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)
6472 ("java-commons-lang3" ,java-commons-lang3)))
6474 `(("java-junit" ,java-junit)
6475 ("java-mockito" ,java-mockito-1)))
6476 (home-page "https://hc.apache.org/httpcomponents-core-4.4.x/index.html")
6477 (synopsis "Low level HTTP transport components")
6478 (description "HttpCore is a set of low level HTTP transport components
6479 that can be used to build custom client and server side HTTP services with a
6480 minimal footprint. HttpCore supports two I/O models: blocking I/O model based
6481 on the classic Java I/O and non-blocking, event driven I/O model based on Java
6484 This package provides the blocking I/O model library.")
6485 (license license:asl2.0)))
6487 (define-public java-httpcomponents-httpcore-nio
6488 (package (inherit java-httpcomponents-httpcore)
6489 (name "java-httpcomponents-httpcore-nio")
6491 `(#:jar-name "httpcomponents-httpcore-nio.jar"
6493 (modify-phases %standard-phases
6494 (add-after 'unpack 'chdir
6495 (lambda _ (chdir "httpcore-nio") #t)))))
6497 `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
6498 ("java-hamcrest-core" ,java-hamcrest-core)
6499 ,@(package-inputs java-httpcomponents-httpcore)))
6500 (description "HttpCore is a set of low level HTTP transport components
6501 that can be used to build custom client and server side HTTP services with a
6502 minimal footprint. HttpCore supports two I/O models: blocking I/O model based
6503 on the classic Java I/O and non-blocking, event driven I/O model based on Java
6506 This package provides the non-blocking I/O model library based on Java
6509 (define-public java-httpcomponents-httpcore-ab
6510 (package (inherit java-httpcomponents-httpcore)
6511 (name "java-httpcomponents-httpcore-ab")
6513 `(#:jar-name "httpcomponents-httpcore-ab.jar"
6515 (modify-phases %standard-phases
6516 (add-after 'unpack 'chdir
6517 (lambda _ (chdir "httpcore-ab") #t)))))
6519 `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
6520 ("java-commons-cli" ,java-commons-cli)
6521 ("java-hamcrest-core" ,java-hamcrest-core)
6522 ,@(package-inputs java-httpcomponents-httpcore)))
6523 (synopsis "Apache HttpCore benchmarking tool")
6524 (description "This package provides the HttpCore benchmarking tool. It is
6525 an Apache AB clone based on HttpCore.")))
6527 (define-public java-httpcomponents-httpclient
6529 (name "java-httpcomponents-httpclient")
6533 (uri (string-append "mirror://apache/httpcomponents/httpclient/"
6534 "source/httpcomponents-client-"
6535 version "-src.tar.gz"))
6538 "1va99m2zc2liv0v9vn72p5ja8yz4s5wq7zpahaai5nr966kvxzkb"))))
6539 (build-system ant-build-system)
6541 `(#:jar-name "httpcomponents-httpclient.jar"
6543 (modify-phases %standard-phases
6544 (add-after 'unpack 'chdir
6545 (lambda _ (chdir "httpclient") #t)))))
6547 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)
6548 ("java-commons-codec" ,java-commons-codec)
6549 ("java-hamcrest-core" ,java-hamcrest-core)
6550 ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
6551 ("java-mockito" ,java-mockito-1)
6552 ("java-junit" ,java-junit)))
6553 (home-page "https://hc.apache.org/httpcomponents-client-ga/")
6554 (synopsis "HTTP client library for Java")
6555 (description "Although the @code{java.net} package provides basic
6556 functionality for accessing resources via HTTP, it doesn't provide the full
6557 flexibility or functionality needed by many applications. @code{HttpClient}
6558 seeks to fill this void by providing an efficient, up-to-date, and
6559 feature-rich package implementing the client side of the most recent HTTP
6560 standards and recommendations.")
6561 (license license:asl2.0)))
6563 (define-public java-httpcomponents-httpmime
6564 (package (inherit java-httpcomponents-httpclient)
6565 (name "java-httpcomponents-httpmime")
6567 `(#:jar-name "httpcomponents-httpmime.jar"
6569 (modify-phases %standard-phases
6570 (add-after 'unpack 'chdir
6571 (lambda _ (chdir "httpmime") #t)))))
6573 `(("java-httpcomponents-httpclient" ,java-httpcomponents-httpclient)
6574 ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
6575 ("java-junit" ,java-junit)
6576 ("java-hamcrest-core" ,java-hamcrest-core)))))
6578 (define-public java-commons-net
6580 (name "java-commons-net")
6584 (uri (string-append "mirror://apache/commons/net/source/"
6585 "commons-net-" version "-src.tar.gz"))
6588 "0n0cmnddk9qdqhjvka8pc6hd9mn2qi3166f1s6xk32h7rfy1adxr"))))
6589 (build-system ant-build-system)
6591 `(;; FIXME: MainTest.java tries to read "examples.properties" (which
6592 ;; should be "resources/examples/examples.properties"), but gets "null"
6595 #:jar-name "commons-net.jar"))
6597 `(("java-junit" ,java-junit)
6598 ("java-hamcrest-core" ,java-hamcrest-core)))
6599 (home-page "https://commons.apache.org/net/")
6600 (synopsis "Client library for many basic Internet protocols")
6601 (description "The Apache Commons Net library implements the client side of
6602 many basic Internet protocols. The purpose of the library is to provide
6603 fundamental protocol access, not higher-level abstractions.")
6604 (license license:asl2.0)))
6606 (define-public java-jsch
6612 (uri (string-append "mirror://sourceforge/jsch/jsch/"
6613 version "/jsch-" version ".zip"))
6616 "1lxyjwvmwa723wcf3bqn816hkvc03vz4xhbsi7bvfhrz2rpgcfq6"))))
6617 (build-system ant-build-system)
6619 `(#:build-target "dist"
6620 #:tests? #f ; no tests included
6622 (modify-phases %standard-phases
6623 (replace 'install (install-jars "dist")))))
6625 `(("unzip" ,unzip)))
6626 (home-page "http://www.jcraft.com/jsch/")
6627 (synopsis "Pure Java implementation of SSH2")
6628 (description "JSch is a pure Java implementation of SSH2. JSch allows you
6629 to connect to an SSH server and use port forwarding, X11 forwarding, file
6630 transfer, etc., and you can integrate its functionality into your own Java
6632 (license license:bsd-3)))
6634 (define-public java-commons-compress
6636 (name "java-commons-compress")
6640 (uri (string-append "mirror://apache/commons/compress/source/"
6641 "commons-compress-" version "-src.tar.gz"))
6644 "1vjqvavrn0babffn1kciz6v52ibwq2vwhzlb95hazis3lgllnxc8"))))
6645 (build-system ant-build-system)
6647 `(#:jar-name "commons-compress.jar"
6649 (modify-phases %standard-phases
6650 (add-after 'unpack 'delete-bad-tests
6652 (with-directory-excursion "src/test/java/org/apache/commons/compress/"
6653 ;; FIXME: These tests really should not fail. Maybe they are
6654 ;; indicative of problems with our Java packaging work.
6656 ;; This test fails with a null pointer exception.
6657 (delete-file "archivers/sevenz/SevenZOutputFileTest.java")
6658 ;; This test fails to open test resources.
6659 (delete-file "archivers/zip/ExplodeSupportTest.java")
6661 ;; FIXME: This test adds a dependency on powermock, which is hard to
6662 ;; package at this point.
6663 ;; https://github.com/powermock/powermock
6664 (delete-file "archivers/sevenz/SevenZNativeHeapTest.java"))
6666 (replace 'install (install-from-pom "pom.xml")))))
6668 `(("java-xz" ,java-xz)
6669 ("apache-commons-parent-pom" ,apache-commons-parent-pom-41)))
6671 `(("java-junit" ,java-junit)
6672 ("java-mockito" ,java-mockito-1)))
6673 (home-page "https://commons.apache.org/proper/commons-compress/")
6674 (synopsis "Java library for working with compressed files")
6675 (description "The Apache Commons Compress library defines an API for
6676 working with compressed files such as ar, cpio, Unix dump, tar, zip, gzip, XZ,
6677 Pack200, bzip2, 7z, arj, lzma, snappy, DEFLATE, lz4 and Z files.")
6678 (license license:asl2.0)))
6680 (define-public java-commons-csv
6682 (name "java-commons-csv")
6686 (uri (string-append "mirror://apache/commons/csv/source/"
6687 "commons-csv-" version "-src.tar.gz"))
6690 "1l89m0fm2s3xx3v3iynvangymfg2vlyngaj6fgsi457nmsw7m7ij"))))
6691 (build-system ant-build-system)
6693 `(#:jar-name "commons-csv.jar"
6694 #:source-dir "src/main/java"
6695 #:tests? #f)); FIXME: requires java-h2
6697 `(("java-hamcrest-core" ,java-hamcrest-core)
6698 ("java-commons-io" ,java-commons-io)
6699 ("java-commons-lang3" ,java-commons-lang3)
6700 ("junit" ,java-junit)))
6701 (home-page "https://commons.apache.org/proper/commons-csv/")
6702 (synopsis "Read and write CSV documents")
6703 (description "Commons CSV reads and writes files in variations of the Comma
6704 Separated Value (CSV) format. The most common CSV formats are predefined in the
6708 @item Microsoft Excel
6709 @item Informix UNLOAD
6710 @item Informix UNLOAD CSV
6716 Custom formats can be created using a fluent style API.")
6717 (license license:asl2.0)))
6719 (define-public java-osgi-annotation
6721 (name "java-osgi-annotation")
6725 (uri (string-append "https://repo1.maven.org/maven2/"
6726 "org/osgi/org.osgi.annotation/" version "/"
6727 "org.osgi.annotation-" version "-sources.jar"))
6730 "1q718mb7gqg726rh6pc2hcisn8v50nv35abbir0jypmffhiii85w"))))
6731 (build-system ant-build-system)
6733 `(#:tests? #f ; no tests
6734 #:jar-name "osgi-annotation.jar"))
6735 (home-page "https://www.osgi.org")
6736 (synopsis "Annotation module of OSGi framework")
6738 "OSGi, for Open Services Gateway initiative framework, is a module system
6739 and service platform for the Java programming language. This package contains
6740 the OSGi annotation module, providing additional services to help dynamic
6742 (license license:asl2.0)))
6744 (define-public java-osgi-core
6746 (name "java-osgi-core")
6750 (uri (string-append "https://repo1.maven.org/maven2/"
6751 "org/osgi/org.osgi.core/" version "/"
6752 "org.osgi.core-" version "-sources.jar"))
6755 "19bpf5jx32jq9789gyhin35q5v7flmw0p9mk7wbgqpxqfmxyiabv"))))
6756 (build-system ant-build-system)
6758 `(#:tests? #f ; no tests
6759 #:jar-name "osgi-core.jar"))
6761 `(("java-osgi-annotation" ,java-osgi-annotation)))
6762 (home-page "https://www.osgi.org")
6763 (synopsis "Core module of OSGi framework")
6765 "OSGi, for Open Services Gateway initiative framework, is a module system
6766 and service platform for the Java programming language. This package contains
6767 the OSGi Core module.")
6768 (license license:asl2.0)))
6770 (define-public java-osgi-service-event
6772 (name "java-osgi-service-event")
6776 (uri (string-append "https://repo1.maven.org/maven2/"
6777 "org/osgi/org.osgi.service.event/"
6778 version "/org.osgi.service.event-"
6779 version "-sources.jar"))
6782 "1nyhlgagwym75bycnjczwbnpymv2iw84zbhvvzk84g9q736i6qxm"))))
6783 (build-system ant-build-system)
6785 `(#:tests? #f ; no tests
6786 #:jar-name "osgi-service-event.jar"))
6788 `(("java-osgi-annotation" ,java-osgi-annotation)
6789 ("java-osgi-core" ,java-osgi-core)))
6790 (home-page "https://www.osgi.org")
6791 (synopsis "OSGi service event module")
6793 "OSGi, for Open Services Gateway initiative framework, is a module system
6794 and service platform for the Java programming language. This package contains
6795 the OSGi @code{org.osgi.service.event} module.")
6796 (license license:asl2.0)))
6798 (define-public java-eclipse-osgi
6800 (name "java-eclipse-osgi")
6804 (uri (string-append "https://repo1.maven.org/maven2/"
6805 "org/eclipse/platform/org.eclipse.osgi/"
6806 version "/org.eclipse.osgi-"
6807 version "-sources.jar"))
6810 "00cqc6lb29n0zv68b4l842vzkwawvbr7gshfdygsk8sicvcq2c7b"))))
6811 (build-system ant-build-system)
6813 `(#:tests? #f ; no tests included
6814 #:jar-name "eclipse-equinox-osgi.jar"))
6816 `(("java-osgi-annotation" ,java-osgi-annotation)))
6817 (home-page "http://www.eclipse.org/equinox/")
6818 (synopsis "Eclipse Equinox OSGi framework")
6819 (description "This package provides an implementation of the OSGi Core
6821 (license license:epl1.0)))
6823 (define-public java-eclipse-equinox-common
6825 (name "java-eclipse-equinox-common")
6826 (version "3.10.200")
6829 (uri (string-append "https://repo1.maven.org/maven2/"
6830 "org/eclipse/platform/org.eclipse.equinox.common/"
6831 version "/org.eclipse.equinox.common-"
6832 version "-sources.jar"))
6835 "1yn8ij6xsljlf35sr2l7wvyvc0ss4n1rv0ry5zkgb49dj4hyrqrj"))))
6836 (build-system ant-build-system)
6838 `(#:tests? #f ; no tests included
6839 #:jar-name "eclipse-equinox-common.jar"))
6841 `(("java-eclipse-osgi" ,java-eclipse-osgi)))
6842 (home-page "http://www.eclipse.org/equinox/")
6843 (synopsis "Common Eclipse runtime")
6844 (description "This package provides the common Eclipse runtime.")
6845 (license license:epl1.0)))
6847 (define-public java-eclipse-core-jobs
6849 (name "java-eclipse-core-jobs")
6853 (uri (string-append "https://repo1.maven.org/maven2/"
6854 "org/eclipse/platform/org.eclipse.core.jobs/"
6855 version "/org.eclipse.core.jobs-"
6856 version "-sources.jar"))
6859 "0395b8lh0km8vhzjnchvs1rii1qz48hyvb2wqfaq4yhklbwihq4b"))))
6860 (build-system ant-build-system)
6862 `(#:tests? #f ; no tests included
6863 #:jar-name "eclipse-core-jobs.jar"))
6865 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6866 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6867 (home-page "http://www.eclipse.org/equinox/")
6868 (synopsis "Eclipse jobs mechanism")
6869 (description "This package provides the Eclipse jobs mechanism.")
6870 (license license:epl1.0)))
6872 (define-public java-eclipse-equinox-registry
6874 (name "java-eclipse-equinox-registry")
6878 (uri (string-append "https://repo1.maven.org/maven2/"
6879 "org/eclipse/platform/org.eclipse.equinox.registry/"
6880 version "/org.eclipse.equinox.registry-"
6881 version "-sources.jar"))
6884 "1i9sgymh2fy5vdgk5y7s3qvrlbgh4l93ddqi3v4zmca7hwrlhf9k"))))
6885 (build-system ant-build-system)
6887 `(#:tests? #f ; no tests included
6888 #:jar-name "eclipse-equinox-registry.jar"))
6890 `(("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
6891 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6892 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6893 (home-page "http://www.eclipse.org/equinox/")
6894 (synopsis "Eclipse extension registry support")
6895 (description "This package provides support for the Eclipse extension
6897 (license license:epl1.0)))
6899 (define-public java-eclipse-equinox-app
6901 (name "java-eclipse-equinox-app")
6905 (uri (string-append "https://repo1.maven.org/maven2/"
6906 "org/eclipse/platform/org.eclipse.equinox.app/"
6907 version "/org.eclipse.equinox.app-"
6908 version "-sources.jar"))
6911 "0nhvbp93y203ar7y59gb0mz3w2d3jlqhr0c9hii9bcfpmr7imdab"))))
6912 (build-system ant-build-system)
6914 `(#:tests? #f ; no tests included
6915 #:jar-name "eclipse-equinox-app.jar"))
6917 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6918 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6919 ("java-eclipse-osgi" ,java-eclipse-osgi)
6920 ("java-osgi-service-event" ,java-osgi-service-event)))
6921 (home-page "http://www.eclipse.org/equinox/")
6922 (synopsis "Equinox application container")
6923 (description "This package provides the Equinox application container for
6925 (license license:epl1.0)))
6927 (define-public java-eclipse-equinox-preferences
6929 (name "java-eclipse-equinox-preferences")
6933 (uri (string-append "https://repo1.maven.org/maven2/"
6934 "org/eclipse/platform/org.eclipse.equinox.preferences/"
6935 version "/org.eclipse.equinox.preferences-"
6936 version "-sources.jar"))
6939 "0k7w6c141sqym4fy3af0qkwpy4pdh2vsjpjba6rp5fxyqa24v0a2"))))
6940 (build-system ant-build-system)
6942 `(#:tests? #f ; no tests included
6943 #:jar-name "eclipse-equinox-preferences.jar"))
6945 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6946 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6947 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6948 (home-page "http://www.eclipse.org/equinox/")
6949 (synopsis "Eclipse preferences mechanism")
6950 (description "This package provides the Eclipse preferences mechanism with
6951 the module @code{org.eclipse.equinox.preferences}.")
6952 (license license:epl1.0)))
6954 (define-public java-eclipse-core-contenttype
6956 (name "java-eclipse-core-contenttype")
6960 (uri (string-append "https://repo1.maven.org/maven2/"
6961 "org/eclipse/platform/org.eclipse.core.contenttype/"
6962 version "/org.eclipse.core.contenttype-"
6963 version "-sources.jar"))
6966 "1wcqcv7ijwv5rh748vz3x9pkmjl9w1r0k0026k56n8yjl4rrmspi"))))
6967 (build-system ant-build-system)
6969 `(#:tests? #f ; no tests included
6970 #:jar-name "eclipse-core-contenttype.jar"))
6972 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6973 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6974 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6975 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6976 (home-page "http://www.eclipse.org/")
6977 (synopsis "Eclipse content mechanism")
6978 (description "This package provides the Eclipse content mechanism in the
6979 @code{org.eclipse.core.contenttype} module.")
6980 (license license:epl1.0)))
6982 (define-public java-eclipse-core-runtime
6984 (name "java-eclipse-core-runtime")
6985 (version "3.15.100")
6988 (uri (string-append "https://repo1.maven.org/maven2/"
6989 "org/eclipse/platform/org.eclipse.core.runtime/"
6990 version "/org.eclipse.core.runtime-"
6991 version "-sources.jar"))
6994 "0l8xayacsbjvz5hypx2fv47vpw2n4dspamcfb3hx30x9hj8vmg7r"))))
6995 (build-system ant-build-system)
6997 `(#:tests? #f ; no tests included
6998 #:jar-name "eclipse-core-runtime.jar"))
7000 `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
7001 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
7002 ("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
7003 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7004 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
7005 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
7006 ("java-eclipse-osgi" ,java-eclipse-osgi)))
7007 (home-page "https://www.eclipse.org/")
7008 (synopsis "Eclipse core runtime")
7009 (description "This package provides the Eclipse core runtime with the
7010 module @code{org.eclipse.core.runtime}.")
7011 (license license:epl1.0)))
7013 (define-public java-eclipse-core-filesystem
7015 (name "java-eclipse-core-filesystem")
7019 (uri (string-append "https://repo1.maven.org/maven2/"
7020 "org/eclipse/platform/org.eclipse.core.filesystem/"
7021 version "/org.eclipse.core.filesystem-"
7022 version "-sources.jar"))
7025 "0km1bhwjim4rfy3pkvjhvy31kgsyf2ncx0mlkmbf5n6g57pphdyj"))))
7026 (build-system ant-build-system)
7028 `(#:tests? #f ; no tests included
7029 #:jar-name "eclipse-core-filesystem.jar"))
7031 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7032 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
7033 ("java-eclipse-osgi" ,java-eclipse-osgi)))
7034 (home-page "https://www.eclipse.org/")
7035 (synopsis "Eclipse core file system")
7036 (description "This package provides the Eclipse core file system with the
7037 module @code{org.eclipse.core.filesystem}.")
7038 (license license:epl1.0)))
7040 (define-public java-eclipse-core-expressions
7042 (name "java-eclipse-core-expressions")
7046 (uri (string-append "https://repo1.maven.org/maven2/"
7047 "org/eclipse/platform/org.eclipse.core.expressions/"
7048 version "/org.eclipse.core.expressions-"
7049 version "-sources.jar"))
7052 "18bw2l875gmygvpagpgk9l24qzbdjia4ag12nw6fi8v8yaq4987f"))))
7053 (build-system ant-build-system)
7055 `(#:tests? #f ; no tests included
7056 #:jar-name "eclipse-core-expressions.jar"))
7058 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7059 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
7060 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
7061 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
7062 ("java-eclipse-osgi" ,java-eclipse-osgi)))
7063 (home-page "https://www.eclipse.org/")
7064 (synopsis "Eclipse core expression language")
7065 (description "This package provides the Eclipse core expression language
7066 with the @code{org.eclipse.core.expressions} module.")
7067 (license license:epl1.0)))
7069 (define-public java-eclipse-core-variables
7071 (name "java-eclipse-core-variables")
7075 (uri (string-append "https://repo1.maven.org/maven2/"
7076 "org/eclipse/platform/org.eclipse.core.variables/"
7077 version "/org.eclipse.core.variables-"
7078 version "-sources.jar"))
7081 "12dirh03zi4n5x5cj07vzrhkmnqy6h9q10h9j605pagmpmifyxmy"))))
7082 (build-system ant-build-system)
7084 `(#:tests? #f ; no tests included
7085 #:jar-name "eclipse-core-variables.jar"))
7087 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7088 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
7089 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
7090 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
7091 ("java-eclipse-osgi" ,java-eclipse-osgi)))
7092 (home-page "https://www.eclipse.org/platform")
7093 (synopsis "Eclipse core variables")
7094 (description "This package provides the Eclipse core variables module
7095 @code{org.eclipse.core.variables}.")
7096 (license license:epl1.0)))
7098 (define-public java-eclipse-ant-core
7100 (name "java-eclipse-ant-core")
7104 (uri (string-append "https://repo1.maven.org/maven2/"
7105 "org/eclipse/platform/org.eclipse.ant.core/"
7106 version "/org.eclipse.ant.core-"
7107 version "-sources.jar"))
7110 "11g3if794qjlk98mz9zch22rr56sd7z63vn4i7k2icr8cq5bfqg7"))))
7111 (build-system ant-build-system)
7113 `(#:tests? #f ; no tests included
7114 #:jar-name "eclipse-ant-core.jar"))
7116 `(("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
7117 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7118 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
7119 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
7120 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
7121 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
7122 ("java-eclipse-core-variables" ,java-eclipse-core-variables)
7123 ("java-eclipse-osgi" ,java-eclipse-osgi)))
7124 (home-page "https://www.eclipse.org/platform")
7125 (synopsis "Ant build tool core libraries")
7126 (description "This package provides the ant build tool core libraries with
7127 the module @code{org.eclipse.ant.core}.")
7128 (license license:epl1.0)))
7130 (define-public java-eclipse-core-resources
7132 (name "java-eclipse-core-resources")
7133 (version "3.13.200")
7136 (uri (string-append "https://repo1.maven.org/maven2/"
7137 "org/eclipse/platform/org.eclipse.core.resources/"
7138 version "/org.eclipse.core.resources-"
7139 version "-sources.jar"))
7142 "1sn3b6ky72hkvxcgf9b2jkpbdh3y8lbhi9xxwv1dsiddpkkq91hs"))))
7143 (build-system ant-build-system)
7145 `(#:tests? #f ; no tests included
7146 #:jar-name "eclipse-core-resources.jar"))
7148 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7149 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
7150 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
7151 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
7152 ("java-eclipse-core-expressions" ,java-eclipse-core-expressions)
7153 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
7154 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
7155 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
7156 ("java-eclipse-ant-core" ,java-eclipse-ant-core)
7157 ("java-eclipse-osgi" ,java-eclipse-osgi)))
7158 (home-page "https://www.eclipse.org/")
7159 (synopsis "Eclipse core resource management")
7160 (description "This package provides the Eclipse core resource management
7161 module @code{org.eclipse.core.resources}.")
7162 (license license:epl1.0)))
7164 (define-public java-eclipse-compare-core
7166 (name "java-eclipse-compare-core")
7170 (uri (string-append "https://repo1.maven.org/maven2/"
7171 "org/eclipse/platform/org.eclipse.compare.core/"
7172 version "/org.eclipse.compare.core-"
7173 version "-sources.jar"))
7176 "10g37r0pbiffyv2wk35c6g5lwzkdipkl0kkjp41v84dln46xm4dg"))))
7177 (build-system ant-build-system)
7179 `(#:tests? #f ; no tests included
7180 #:jar-name "eclipse-compare-core.jar"))
7182 `(("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
7183 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7184 ("java-eclipse-osgi" ,java-eclipse-osgi)
7185 ("java-icu4j" ,java-icu4j)))
7186 (home-page "https://www.eclipse.org/")
7187 (synopsis "Eclipse core compare support")
7188 (description "This package provides the Eclipse core compare support
7189 module @code{org.eclipse.compare.core}.")
7190 (license license:epl1.0)))
7192 (define-public java-eclipse-team-core
7194 (name "java-eclipse-team-core")
7198 (uri (string-append "https://repo1.maven.org/maven2/"
7199 "org/eclipse/platform/org.eclipse.team.core/"
7200 version "/org.eclipse.team.core-"
7201 version "-sources.jar"))
7204 "02j2jzqgb26zx2d5ahxmvijw6j4r0la90zl5c3i65x6z19ciyam7"))))
7205 (build-system ant-build-system)
7207 `(#:tests? #f ; no tests included
7208 #:jar-name "eclipse-team-core.jar"))
7210 `(("java-eclipse-compare-core" ,java-eclipse-compare-core)
7211 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
7212 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
7213 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
7214 ("java-eclipse-core-resources" ,java-eclipse-core-resources)
7215 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
7216 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7217 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
7218 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
7219 ("java-eclipse-osgi" ,java-eclipse-osgi)))
7220 (home-page "https://www.eclipse.org/platform")
7221 (synopsis "Eclipse team support core")
7222 (description "This package provides the Eclipse team support core module
7223 @code{org.eclipse.team.core}.")
7224 (license license:epl1.0)))
7226 (define-public java-eclipse-core-commands
7228 (name "java-eclipse-core-commands")
7232 (uri (string-append "https://repo1.maven.org/maven2/"
7233 "org/eclipse/platform/org.eclipse.core.commands/"
7234 version "/org.eclipse.core.commands-"
7235 version "-sources.jar"))
7238 "0yjn482qndcfrsq3jd6vnhcylp16420f5aqkrwr8spsprjigjcr9"))))
7239 (build-system ant-build-system)
7241 `(#:tests? #f ; no tests included
7242 #:jar-name "eclipse-core-commands.jar"))
7244 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)))
7245 (home-page "https://www.eclipse.org/platform")
7246 (synopsis "Eclipse core commands")
7247 (description "This package provides Eclipse core commands in the module
7248 @code{org.eclipse.core.commands}.")
7249 (license license:epl1.0)))
7251 (define-public java-eclipse-text
7253 (name "java-eclipse-text")
7257 (uri (string-append "https://repo1.maven.org/maven2/"
7258 "org/eclipse/platform/org.eclipse.text/"
7259 version "/org.eclipse.text-"
7260 version "-sources.jar"))
7263 "0scz70vzz5qs5caji9f5q01vkqnvip7dpri1q07l8wbbdcxn4cq1"))))
7264 (build-system ant-build-system)
7266 `(#:tests? #f ; no tests included
7267 #:jar-name "eclipse-text.jar"
7269 (modify-phases %standard-phases
7270 ;; When creating a new category we must make sure that the new list
7271 ;; matches List<Position>. By default it seems to be too generic
7272 ;; (ArrayList<Object>), so we specialize it to ArrayList<Position>.
7273 ;; Without this we get this error:
7275 ;; [javac] .../src/org/eclipse/jface/text/AbstractDocument.java:376:
7276 ;; error: method put in interface Map<K,V> cannot be applied to given types;
7277 ;; [javac] fPositions.put(category, new ArrayList<>());
7279 ;; [javac] required: String,List<Position>
7280 ;; [javac] found: String,ArrayList<Object>
7281 ;; [javac] reason: actual argument ArrayList<Object> cannot be converted
7282 ;; to List<Position> by method invocation conversion
7283 ;; [javac] where K,V are type-variables:
7284 ;; [javac] K extends Object declared in interface Map
7285 ;; [javac] V extends Object declared in interface Map
7287 ;; I don't know if this is a good fix. I suspect it is not, but it
7289 (add-after 'unpack 'fix-compilation-error
7291 (substitute* "src/org/eclipse/jface/text/AbstractDocument.java"
7292 (("Positions.put\\(category, new ArrayList<>\\(\\)\\);")
7293 "Positions.put(category, new ArrayList<Position>());"))
7296 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7297 ("java-eclipse-core-commands" ,java-eclipse-core-commands)
7298 ("java-icu4j" ,java-icu4j)))
7299 (home-page "http://www.eclipse.org/platform")
7300 (synopsis "Eclipse text library")
7301 (description "Platform Text is part of the Platform UI project and
7302 provides the basic building blocks for text and text editors within Eclipse
7303 and contributes the Eclipse default text editor.")
7304 (license license:epl1.0)))
7306 (define-public java-eclipse-jdt-core
7308 (name "java-eclipse-jdt-core")
7312 (uri (string-append "https://repo1.maven.org/maven2/"
7313 "org/eclipse/jdt/org.eclipse.jdt.core/"
7314 version "/org.eclipse.jdt.core-"
7315 version "-sources.jar"))
7318 "1g560yr9v2kzv34gc2m3ifpgnj7krcdd6h4gd4z83pwqacwkfz0k"))))
7319 (build-system ant-build-system)
7321 `(#:tests? #f ; no tests included
7322 #:jar-name "eclipse-jdt-core.jar"
7324 (modify-phases %standard-phases
7325 (add-after 'unpack 'move-sources
7327 (with-directory-excursion "src/jdtCompilerAdaptersrc/"
7328 (for-each (lambda (file)
7329 (install-file file (string-append "../" (dirname file))))
7330 (find-files "." ".*")))
7331 (delete-file-recursively "src/jdtCompilerAdaptersrc/")
7333 (add-before 'build 'copy-resources
7335 (with-directory-excursion "src"
7336 (for-each (lambda (file)
7337 (install-file file (string-append "../build/classes/" (dirname file))))
7338 (find-files "." ".*.(props|properties|rsc)")))
7341 `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
7342 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
7343 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
7344 ("java-eclipse-core-resources" ,java-eclipse-core-resources)
7345 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
7346 ("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
7347 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7348 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
7349 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
7350 ("java-eclipse-osgi" ,java-eclipse-osgi)
7351 ("java-eclipse-text" ,java-eclipse-text)))
7352 (home-page "https://www.eclipse.org/jdt")
7353 (synopsis "Java development tools core libraries")
7354 (description "This package provides the core libraries of the Eclipse Java
7355 development tools.")
7356 (license license:epl1.0)))
7358 (define-public java-eclipse-jdt-compiler-apt
7360 (name "java-eclipse-jdt-compiler-apt")
7364 (uri (string-append "https://repo1.maven.org/maven2/"
7365 "org/eclipse/jdt/org.eclipse.jdt.compiler.apt/"
7366 version "/org.eclipse.jdt.compiler.apt-"
7367 version "-sources.jar"))
7370 "1s285k9p2ixdqrknb40jbbvw682n9a7l5lqpn583a8pvlzg2l6r8"))))
7371 (build-system ant-build-system)
7373 `(#:tests? #f ; no tests included
7374 #:jar-name "eclipse-jdt-compiler-apt.jar"
7377 `(("java-eclipse-jdt-core" ,java-eclipse-jdt-core)))
7378 (home-page "https://www.eclipse.org/jdt/apt/")
7379 (synopsis "Annotation processing tool")
7380 (description "APT stands for Annotation Processing Tool. APT provides a
7381 means for generating files and compiling new Java classes based on annotations
7382 found in your source code.")
7383 (license license:epl2.0)))
7385 (define-public java-javax-mail
7387 (name "java-javax-mail")
7391 (uri (string-append "https://repo1.maven.org/maven2/"
7392 "com/sun/mail/javax.mail/"
7393 version "/javax.mail-"
7394 version "-sources.jar"))
7397 "0sdlfgsc2b5s89xv1261y8i0jijcja019k2x1c8ngfn582w4jly9"))))
7398 (build-system ant-build-system)
7400 `(#:tests? #f ; no tests
7401 #:jar-name "javax-mail.jar"))
7402 (home-page "https://javamail.java.net")
7403 (synopsis "Reference implementation of the JavaMail API")
7405 "This package provides versions of the JavaMail API implementation, IMAP,
7406 SMTP, and POP3 service providers, some examples, and documentation for the
7408 ;; GPLv2 only with "classpath exception".
7409 (license license:gpl2)))
7411 (define-public java-log4j-api
7413 (name "java-log4j-api")
7417 (uri (string-append "mirror://apache/logging/log4j/" version
7418 "/apache-log4j-" version "-src.tar.gz"))
7421 "0j5p9gik0jysh37nlrckqbky12isy95cpwg2gv5fas1rcdqbraxd"))))
7422 (build-system ant-build-system)
7424 `(#:tests? #f ; tests require unpackaged software
7425 #:jar-name "log4j-api.jar"
7427 (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out")
7430 (modify-phases %standard-phases
7431 (add-after 'unpack 'enter-dir
7432 (lambda _ (chdir "log4j-api") #t))
7433 ;; FIXME: The tests require additional software that has not been
7434 ;; packaged yet, such as
7435 ;; * org.apache.maven
7436 ;; * org.apache.felix
7437 (add-after 'enter-dir 'delete-tests
7438 (lambda _ (delete-file-recursively "src/test") #t)))))
7440 `(("java-osgi-core" ,java-osgi-core)
7441 ("java-hamcrest-core" ,java-hamcrest-core)
7442 ("java-junit" ,java-junit)))
7443 (home-page "https://logging.apache.org/log4j/2.x/")
7444 (synopsis "API module of the Log4j logging framework for Java")
7446 "This package provides the API module of the Log4j logging framework for
7448 (license license:asl2.0)))
7450 (define-public java-log4j-core
7452 (inherit java-log4j-api)
7453 (name "java-log4j-core")
7455 `(("java-osgi-core" ,java-osgi-core)
7456 ("java-hamcrest-core" ,java-hamcrest-core)
7457 ("java-log4j-api" ,java-log4j-api)
7458 ("java-mail" ,java-mail)
7459 ("java-jboss-jms-api-spec" ,java-jboss-jms-api-spec)
7460 ("java-lmax-disruptor" ,java-lmax-disruptor)
7461 ("java-kafka" ,java-kafka-clients)
7462 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
7463 ("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
7464 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
7465 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)
7466 ("java-fasterxml-jackson-dataformat-xml" ,java-fasterxml-jackson-dataformat-xml)
7467 ("java-fasterxml-jackson-dataformat-yaml" ,java-fasterxml-jackson-dataformat-yaml)
7468 ("java-commons-compress" ,java-commons-compress)
7469 ("java-commons-csv" ,java-commons-csv)
7470 ("java-jeromq" ,java-jeromq)
7471 ("java-junit" ,java-junit)))
7473 `(("hamcrest" ,java-hamcrest-all)
7474 ("java-commons-io" ,java-commons-io)
7475 ("java-commons-lang3" ,java-commons-lang3)
7476 ("slf4j" ,java-slf4j-api)))
7478 `(#:tests? #f ; tests require more dependencies
7479 #:test-dir "src/test"
7480 #:source-dir "src/main/java"
7481 #:jar-name "log4j-core.jar"
7484 (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out")
7487 (modify-phases %standard-phases
7488 (add-after 'unpack 'enter-dir
7489 (lambda _ (chdir "log4j-core") #t)))))
7490 (synopsis "Core component of the Log4j framework")
7491 (description "This package provides the core component of the Log4j
7492 logging framework for Java.")))
7494 (define-public java-log4j-1.2-api
7496 (inherit java-log4j-api)
7497 (name "java-log4j-1.2-api")
7499 `(#:jar-name "java-log4j-1.2-api.jar"
7500 #:source-dir "log4j-1.2-api/src/main/java"
7502 ;; Tests require maven-model (and other maven subprojects), which is a
7503 ;; cyclic dependency.
7506 `(("log4j-api" ,java-log4j-api)
7507 ("log4j-core" ,java-log4j-core)
7508 ("osgi-core" ,java-osgi-core)
7509 ("eclipse-osgi" ,java-eclipse-osgi)
7510 ("java-lmax-disruptor" ,java-lmax-disruptor)))))
7512 (define-public java-commons-cli
7514 (name "java-commons-cli")
7518 (uri (string-append "mirror://apache/commons/cli/source/"
7519 "commons-cli-" version "-src.tar.gz"))
7522 "05hgi2z01fqz374y719gl1dxzqvzci5af071zm7vxrjg9vczipm1"))))
7523 (build-system ant-build-system)
7526 `(#:jar-name "commons-cli.jar"
7528 (modify-phases %standard-phases
7530 (install-from-pom "pom.xml")))))
7532 `(("java-junit" ,java-junit)
7533 ("java-hamcrest-core" ,java-hamcrest-core)))
7534 (home-page "https://commons.apache.org/cli/")
7535 (synopsis "Command line arguments and options parsing library")
7536 (description "The Apache Commons CLI library provides an API for parsing
7537 command line options passed to programs. It is also able to print help
7538 messages detailing the options available for a command line tool.
7540 Commons CLI supports different types of options:
7543 @item POSIX like options (ie. tar -zxvf foo.tar.gz)
7544 @item GNU like long options (ie. du --human-readable --max-depth=1)
7545 @item Java like properties (ie. java -Djava.awt.headless=true Foo)
7546 @item Short options with value attached (ie. gcc -O2 foo.c)
7547 @item long options with single hyphen (ie. ant -projecthelp)
7550 This is a part of the Apache Commons Project.")
7551 (license license:asl2.0)))
7553 (define-public java-commons-codec
7555 (name "java-commons-codec")
7559 (uri (string-append "mirror://apache/commons/codec/source/"
7560 "commons-codec-" version "-src.tar.gz"))
7563 "11xr0agckkhm91pb5akf2mbk84yd54gyr178wj57gsm97fi7nkh9"))))
7564 (build-system ant-build-system)
7566 `(#:jar-name "java-commons-codec.jar"
7567 #:source-dir "src/main/java"
7568 #:test-dir "src/test"
7569 #:test-exclude (list "**/*AbstractTest.java")
7571 (modify-phases %standard-phases
7572 (add-before 'build 'copy-resources
7574 (copy-recursively "src/main/resources"
7577 (add-before 'check 'copy-test-resources
7579 (copy-recursively "src/test/resources"
7580 "build/test-classes")
7582 (replace 'install (install-from-pom "pom.xml")))))
7584 `(("java-commons-lang3" ,java-commons-lang3)
7585 ("java-junit" ,java-junit)))
7587 `(("apache-commons-parent-pom" ,apache-commons-parent-pom-50)))
7588 (home-page "https://commons.apache.org/codec/")
7589 (synopsis "Common encoders and decoders such as Base64, Hex, Phonetic and URLs")
7590 (description "The codec package contains simple encoder and decoders for
7591 various formats such as Base64 and Hexadecimal. In addition to these widely
7592 used encoders and decoders, the codec package also maintains a collection of
7593 phonetic encoding utilities.
7595 This is a part of the Apache Commons Project.")
7596 (license license:asl2.0)))
7598 (define-public java-commons-daemon
7600 (name "java-commons-daemon")
7604 (uri (string-append "mirror://apache/commons/daemon/source/"
7605 "commons-daemon-" version "-src.tar.gz"))
7608 "141gkhfzv5v3pdhic6y4ardq2dhsa3v36j8wmmhy6f8mac48fp7n"))))
7609 (build-system ant-build-system)
7611 `(#:test-target "test"
7613 (modify-phases %standard-phases
7614 (add-after 'build 'build-javadoc ant-build-javadoc)
7615 (replace 'install (install-jars "dist"))
7616 (add-after 'install 'install-doc (install-javadoc "dist/docs/api")))))
7618 `(("java-junit" ,java-junit)))
7619 (home-page "https://commons.apache.org/daemon/")
7620 (synopsis "Library to launch Java applications as daemons")
7621 (description "The Daemon package from Apache Commons can be used to
7622 implement Java applications which can be launched as daemons. For example the
7623 program will be notified about a shutdown so that it can perform cleanup tasks
7624 before its process of execution is destroyed by the operation system.
7626 This package contains the Java library. You will also need the actual binary
7627 for your architecture which is provided by the jsvc package.
7629 This is a part of the Apache Commons Project.")
7630 (license license:asl2.0)))
7632 (define-public java-javaewah
7634 (name "java-javaewah")
7639 (url "https://github.com/lemire/javaewah/")
7640 (commit (string-append "JavaEWAH-" version))))
7641 (file-name (git-file-name name version))
7644 "1m8qcb1py76v7avbjjrkvyy6fhr5dk2ywy73gbsxqry04gkm2nhw"))))
7645 (build-system ant-build-system)
7646 (arguments `(#:jar-name "javaewah.jar"))
7648 `(("java-junit" ,java-junit)
7649 ("java-hamcrest-core" ,java-hamcrest-core)))
7650 (home-page "https://github.com/lemire/javaewah")
7651 (synopsis "Compressed alternative to the Java @code{BitSet} class")
7652 (description "This is a word-aligned compressed variant of the Java
7653 @code{Bitset} class. It provides both a 64-bit and a 32-bit RLE-like
7654 compression scheme. It can be used to implement bitmap indexes.
7656 The goal of word-aligned compression is not to achieve the best compression,
7657 but rather to improve query processing time. Hence, JavaEWAH tries to save CPU
7658 cycles, maybe at the expense of storage. However, the EWAH scheme is always
7659 more efficient storage-wise than an uncompressed bitmap (as implemented in the
7660 @code{BitSet} class by Sun).")
7661 ;; GPL2.0 derivates are explicitly allowed.
7662 (license license:asl2.0)))
7664 (define-public java-slf4j-api
7666 (name "java-slf4j-api")
7670 (uri (string-append "https://www.slf4j.org/dist/slf4j-"
7674 "13j51sgzmhhdrfa74gkal5zpip7r1440dh7zsi2c8bpb2zs1v8kb"))
7675 (modules '((guix build utils)))
7676 ;; Delete bundled jars.
7679 (for-each delete-file (find-files "." "\\.jar$"))
7681 (build-system ant-build-system)
7683 `(#:jar-name "slf4j-api.jar"
7684 #:source-dir "slf4j-api/src/main"
7685 #:test-dir "slf4j-api/src/test"
7687 (modify-phases %standard-phases
7688 (add-after 'build 'regenerate-jar
7690 ;; pom.xml ignores these files in the jar creation process. If we don't,
7691 ;; we get the error "This code should have never made it into slf4j-api.jar"
7692 (delete-file-recursively "build/classes/org/slf4j/impl")
7693 (invoke "jar" "-cf" "build/jar/slf4j-api.jar" "-C"
7694 "build/classes" ".")))
7695 (add-before 'check 'dont-test-abstract-classes
7697 ;; abstract classes are not meant to be run with junit
7698 (substitute* "build.xml"
7699 (("<include name=\"\\*\\*/\\*Test.java\" />")
7700 (string-append "<include name=\"**/*Test.java\" />"
7701 "<exclude name=\"**/MultithreadedInitializationTest"
7705 (install-from-pom "slf4j-api/pom.xml")))))
7707 `(("java-slf4j-parent" ,java-slf4j-parent)))
7709 `(("java-junit" ,java-junit)
7710 ("java-hamcrest-core" ,java-hamcrest-core)))
7711 (home-page "https://www.slf4j.org/")
7712 (synopsis "Simple logging facade for Java")
7713 (description "The Simple Logging Facade for Java (SLF4J) serves as a
7714 simple facade or abstraction for various logging
7715 frameworks (e.g. @code{java.util.logging}, @code{logback}, @code{log4j})
7716 allowing the end user to plug in the desired logging framework at deployment
7718 (license license:expat)))
7720 (define java-slf4j-parent
7722 (inherit java-slf4j-api)
7723 (name "java-slf4j-parent")
7725 (propagated-inputs '())
7729 (modify-phases %standard-phases
7733 (install-pom-file "pom.xml")))))))
7735 (define-public java-slf4j-simple
7737 (name "java-slf4j-simple")
7739 (source (package-source java-slf4j-api))
7740 (build-system ant-build-system)
7742 `(#:jar-name "slf4j-simple.jar"
7743 #:source-dir "slf4j-simple/src/main"
7744 #:test-dir "slf4j-simple/src/test"
7746 (modify-phases %standard-phases
7747 ;; The tests need some test classes from slf4j-api
7748 (add-before 'check 'build-slf4j-api-test-helpers
7750 ;; Add current dir to CLASSPATH ...
7752 (string-append (getcwd) ":" (getenv "CLASSPATH")))
7753 ;; ... and build test helper classes here:
7756 ,@(find-files "slf4j-api/src/test" ".*\\.java")))))
7758 (install-from-pom "slf4j-simple/pom.xml")))))
7760 `(("java-slf4j-api" ,java-slf4j-api)))
7762 `(("java-junit" ,java-junit)
7763 ("java-hamcrest-core" ,java-hamcrest-core)))
7764 (home-page "https://www.slf4j.org/")
7765 (synopsis "Simple implementation of simple logging facade for Java")
7766 (description "SLF4J binding for the Simple implementation, which outputs
7767 all events to System.err. Only messages of level INFO and higher are
7769 (license license:expat)))
7771 (define-public antlr2
7777 (uri (string-append "https://www.antlr2.org/download/antlr-"
7781 "1ffvcwdw73id0dk6pj2mlxjvbg0662qacx4ylayqcxgg381fnfl5"))
7782 (modules '((guix build utils)))
7785 (delete-file "antlr.jar")
7786 (substitute* "lib/cpp/antlr/CharScanner.hpp"
7790 "#define EOF (-1)\n"
7791 "#include <strings.h>")))
7792 (substitute* "configure"
7795 (build-system gnu-build-system)
7797 `(#:tests? #f ; no test target
7798 #:imported-modules ((guix build ant-build-system)
7799 (guix build syscalls)
7800 ,@%gnu-build-system-modules)
7801 #:modules (((guix build ant-build-system) #:prefix ant:)
7802 (guix build gnu-build-system)
7805 (modify-phases %standard-phases
7806 (add-after 'install 'strip-jar-timestamps
7807 (assoc-ref ant:%standard-phases 'strip-jar-timestamps))
7808 (add-before 'configure 'fix-timestamp
7810 (substitute* "configure"
7811 (("^TIMESTAMP.*") "TIMESTAMP=19700101\n"))
7813 (add-after 'configure 'fix-bin-ls
7815 (substitute* (find-files "." "Makefile")
7821 ("java" ,icedtea "jdk")))
7823 `(("java" ,icedtea)))
7824 (home-page "https://www.antlr2.org")
7825 (synopsis "Framework for constructing recognizers, compilers, and translators")
7826 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
7827 is a language tool that provides a framework for constructing recognizers,
7828 compilers, and translators from grammatical descriptions containing Java, C#,
7829 C++, or Python actions. ANTLR provides excellent support for tree construction,
7830 tree walking, and translation.")
7831 (license license:public-domain)))
7833 (define-public java-stringtemplate-3
7835 (name "java-stringtemplate")
7839 (uri (string-append "https://github.com/antlr/website-st4/raw/"
7840 "gh-pages/download/stringtemplate-"
7844 "086yj68np1vqhkj7483diz3km6s6y4gmwqswa7524a0ca6vxn2is"))))
7845 (build-system ant-build-system)
7847 `(#:jar-name (string-append ,name "-" ,version ".jar")
7849 #:modules ((guix build ant-build-system)
7853 (modify-phases %standard-phases
7854 (add-before 'check 'fix-tests
7856 (substitute* "build.xml"
7857 (("\\$\\{test.home\\}/java")
7858 "${test.home}/org"))
7860 (add-before 'build 'generate-grammar
7862 (with-directory-excursion "src/org/antlr/stringtemplate/language/"
7863 (for-each (lambda (file)
7864 (format #t "~a\n" file)
7865 (invoke "antlr" file))
7866 '("template.g" "angle.bracket.template.g" "action.g"
7867 "eval.g" "group.g" "interface.g")))
7871 ("java-junit" ,java-junit)))
7872 (home-page "https://www.stringtemplate.org")
7873 (synopsis "Template engine to generate formatted text output")
7874 (description "StringTemplate is a java template engine (with ports for C#,
7875 Objective-C, JavaScript, Scala) for generating source code, web pages, emails,
7876 or any other formatted text output. StringTemplate is particularly good at
7877 code generators, multiple site skins, and internationalization / localization.
7878 StringTemplate also powers ANTLR.")
7879 (license license:bsd-3)))
7881 ;; antlr3 is partially written using antlr3 grammar files. It also depends on
7882 ;; ST4 (stringtemplate4), which is also partially written using antlr3 grammar
7883 ;; files and uses antlr3 at runtime. The latest version requires a recent version
7884 ;; of antlr3 at runtime.
7885 ;; Fortunately, ST4 4.0.6 can be built with an older antlr3, and we use antlr3.3.
7886 ;; This version of ST4 is sufficient for the latest antlr3.
7887 ;; We use ST4 4.0.6 to build a boostrap antlr3 (latest version), and build
7888 ;; the latest ST4 with it. Then we build our final antlr3 that will be linked
7889 ;; against the latest ST4.
7890 ;; antlr3.3 still depends on antlr3 to generate some files, so we use an
7891 ;; even older version, antlr3.1, to generate them. Fortunately antlr3.1 uses
7892 ;; only grammar files with the antlr2 syntax.
7893 ;; So we build antlr3.1 -> antlr3.3 -> ST4.0.6 -> antlr3-bootstrap -> ST4 -> antlr3.
7895 (define-public java-stringtemplate
7896 (package (inherit java-stringtemplate-3)
7897 (name "java-stringtemplate")
7901 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/"
7903 (file-name (string-append name "-" version ".tar.gz"))
7906 "1pri8hqa95rfdkjy55icl5q1m09zwp5k67ib14abas39s4v3w087"))))
7907 (build-system ant-build-system)
7909 `(#:jar-name (string-append ,name "-" ,version ".jar")
7910 #:tests? #f ; FIXME: tests fail for unknown reasons
7912 #:modules ((guix build ant-build-system)
7916 (modify-phases %standard-phases
7917 (add-before 'check 'fix-test-target
7919 (substitute* "build.xml"
7920 (("\\$\\{test.home\\}/java") "${test.home}/")
7921 (("\\*Test.java") "Test*.java"))
7923 (add-before 'build 'generate-grammar
7925 (with-directory-excursion "src/org/stringtemplate/v4/compiler/"
7926 (for-each (lambda (file)
7927 (format #t "~a\n" file)
7928 (invoke "antlr3" file))
7929 '("STParser.g" "Group.g" "CodeGenerator.g")))
7932 `(("antlr3" ,antlr3-bootstrap)
7934 ("java-stringtemplate" ,java-stringtemplate-3)
7935 ("java-junit" ,java-junit)))))
7937 (define java-stringtemplate-4.0.6
7938 (package (inherit java-stringtemplate)
7939 (name "java-stringtemplate")
7943 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/ST-"
7945 (file-name (string-append name "-" version ".tar.gz"))
7948 "0hjmh1ahdsh3w825i67mli9l4nncc4l6hdbf9ma91jvlj590sljp"))))
7950 `(("antlr3" ,antlr3-3.3)
7952 ("java-stringtemplate" ,java-stringtemplate-3)))))
7954 (define-public antlr3
7961 (url "https://github.com/antlr/antlr3")
7963 (file-name (git-file-name name version))
7966 "0cafavrjmzqhklghrk8c2jqxkdwxgzskm20pbrfd3r41cn00dpnf"))))
7967 (build-system ant-build-system)
7969 `(#:jar-name (string-append ,name "-" ,version ".jar")
7970 #:source-dir "tool/src/main/java:runtime/Java/src/main/java:tool/src/main/antlr3"
7973 (modify-phases %standard-phases
7974 (add-after 'install 'bin-install
7975 (lambda* (#:key inputs outputs #:allow-other-keys)
7976 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
7977 (bin (string-append (assoc-ref outputs "out") "/bin")))
7979 (with-output-to-file (string-append bin "/antlr3")
7982 (string-append "#!" (which "sh") "\n"
7983 "java -cp " jar "/" ,name "-" ,version ".jar:"
7985 (find-files (assoc-ref inputs "stringtemplate")
7989 (find-files (assoc-ref inputs "stringtemplate4")
7993 (find-files (string-append
7994 (assoc-ref inputs "antlr")
7997 " org.antlr.Tool $*"))))
7998 (chmod (string-append bin "/antlr3") #o755))
8000 (add-before 'build 'generate-grammar
8002 (chdir "tool/src/main/antlr3/org/antlr/grammar/v3/")
8003 (for-each (lambda (file)
8006 (invoke "antlr3" file))
8007 '("ANTLR.g" "ANTLRTreePrinter.g" "ActionAnalysis.g"
8008 "AssignTokenTypesWalker.g"
8009 "ActionTranslator.g" "TreeToNFAConverter.g"
8010 "ANTLRv3.g" "ANTLRv3Tree.g" "LeftRecursiveRuleWalker.g"
8011 "CodeGenTreeWalker.g" "DefineGrammarItemsWalker.g"))
8012 (substitute* "ANTLRParser.java"
8013 (("public Object getTree") "public GrammarAST getTree"))
8014 (substitute* "ANTLRv3Parser.java"
8015 (("public Object getTree") "public CommonTree getTree"))
8016 (chdir "../../../../../java")
8017 (substitute* "org/antlr/tool/LeftRecursiveRuleAnalyzer.java"
8018 (("import org.antlr.grammar.v3.\\*;") "import org.antlr.grammar.v3.*;
8019 import org.antlr.grammar.v3.ANTLRTreePrinter;"))
8020 (substitute* "org/antlr/tool/ErrorManager.java"
8021 (("case NO_SUCH_ATTRIBUTE_PASS_THROUGH:") ""))
8022 (chdir "../../../..")
8024 (add-before 'build 'fix-build-xml
8026 (substitute* "build.xml"
8027 (("target name=\"compile\">")
8028 "target name=\"compile\">
8029 <copy todir=\"${classes.dir}\">
8030 <fileset dir=\"tool/src/main/resources\">
8031 <include name=\"**/*.stg\"/>
8032 <include name=\"**/*.st\"/>
8033 <include name=\"**/*.sti\"/>
8034 <include name=\"**/STLexer.tokens\"/>
8040 ("antlr3" ,antlr3-bootstrap)))
8042 `(("junit" ,java-junit)
8043 ("stringtemplate" ,java-stringtemplate-3)
8044 ("stringtemplate4" ,java-stringtemplate)))
8046 `(("stringtemplate" ,java-stringtemplate-3)
8048 ("stringtemplate4" ,java-stringtemplate-4.0.6)))
8049 (home-page "https://www.antlr3.org")
8050 (synopsis "Framework for constructing recognizers, compilers, and translators")
8051 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
8052 is a language tool that provides a framework for constructing recognizers,
8053 compilers, and translators from grammatical descriptions containing Java, C#,
8054 C++, or Python actions. ANTLR provides excellent support for tree construction,
8055 tree walking, and translation.")
8056 (license license:bsd-3)))
8058 (define antlr3-bootstrap
8061 (name "antlr3-bootstrap")
8064 ("antlr3" ,antlr3-3.3)))
8066 `(("junit" ,java-junit)))))
8068 (define-public antlr3-3.3
8075 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
8076 "gh-pages/download/antlr-"
8080 "0qgg5vgsm4l1d6dj9pfbaa25dpv2ry2gny8ajy4vvgvfklw97b3m"))
8082 (search-patches "antlr3-3_3-fix-java8-compilation.patch"))))
8084 `(#:jar-name (string-append ,name "-" ,version ".jar")
8085 #:source-dir (string-join '("tool/src/main/java"
8086 "runtime/Java/src/main/java"
8087 "tool/src/main/antlr2"
8088 "tool/src/main/antlr3")
8090 #:tests? #f ; FIXME: tests seem to require maven plugin
8091 #:modules ((guix build ant-build-system)
8095 (modify-phases %standard-phases
8096 (add-after 'install 'bin-install
8097 (lambda* (#:key inputs outputs #:allow-other-keys)
8098 (let* ((out (assoc-ref outputs "out"))
8099 (jar (string-append out "/share/java"))
8100 (bin (string-append out "/bin")))
8102 (with-output-to-file (string-append bin "/antlr3")
8106 "#!" (which "sh") "\n"
8107 "java -cp " jar "/antlr3-3.3.jar:"
8109 (append (find-files (assoc-ref inputs "java-stringtemplate")
8111 (find-files (string-append (assoc-ref inputs "antlr")
8115 " org.antlr.Tool $*"))))
8116 (chmod (string-append bin "/antlr3") #o755)
8118 (add-before 'build 'generate-grammar
8120 (substitute* "tool/src/main/java/org/antlr/tool/Grammar.java"
8121 (("import org.antlr.grammar.v2.\\*;")
8122 "import org.antlr.grammar.v2.*;\n
8123 import org.antlr.grammar.v2.TreeToNFAConverter;\n
8124 import org.antlr.grammar.v2.DefineGrammarItemsWalker;\n
8125 import org.antlr.grammar.v2.ANTLRTreePrinter;"))
8126 (with-directory-excursion "tool/src/main/antlr2/org/antlr/grammar/v2/"
8127 (for-each (lambda (file)
8128 (format #t "~a\n" file)
8129 (invoke "antlr" file))
8130 '("antlr.g" "antlr.print.g" "assign.types.g"
8131 "buildnfa.g" "codegen.g" "define.g")))
8132 (with-directory-excursion "tool/src/main/antlr3/org/antlr/grammar/v3/"
8133 (for-each (lambda (file)
8134 (format #t "~a\n" file)
8135 (invoke "antlr3" file))
8136 '("ActionAnalysis.g" "ActionTranslator.g" "ANTLRv3.g"
8139 (add-before 'build 'fix-build-xml
8141 (substitute* "build.xml"
8142 (("target name=\"compile\">")
8143 "target name=\"compile\">
8144 <copy todir=\"${classes.dir}\">
8145 <fileset dir=\"tool/src/main/resources\">
8146 <include name=\"**/*.stg\"/>
8147 <include name=\"**/*.st\"/>
8148 <include name=\"**/*.sti\"/>
8149 <include name=\"**/STLexer.tokens\"/>
8155 ("antlr3" ,antlr3-3.1)))
8157 `(("junit" ,java-junit)))
8159 `(("java-stringtemplate" ,java-stringtemplate-3)
8160 ("antlr" ,antlr2)))))
8162 (define-public antlr3-3.1
8168 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
8169 "gh-pages/download/antlr-"
8173 "0sfimc9cpbgrihz4giyygc8afgpma2c93yqpwb951giriri6x66z"))
8175 (search-patches "antlr3-3_1-fix-java8-compilation.patch"))))
8177 `(#:jar-name (string-append "antlr3-" ,version ".jar")
8178 #:source-dir "src:runtime/Java/src"
8181 (modify-phases %standard-phases
8182 (add-after 'install 'bin-install
8183 (lambda* (#:key inputs outputs #:allow-other-keys)
8184 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
8185 (bin (string-append (assoc-ref outputs "out") "/bin")))
8187 (with-output-to-file (string-append bin "/antlr3")
8190 (string-append "#!" (which "sh") "\n"
8191 "java -cp " jar "/antlr3-3.1.jar:"
8193 (find-files (assoc-ref inputs "stringtemplate")
8197 (find-files (string-append
8198 (assoc-ref inputs "antlr")
8201 " org.antlr.Tool $*"))))
8202 (chmod (string-append bin "/antlr3") #o755))
8204 (add-before 'build 'generate-grammar
8206 (let ((dir "src/org/antlr/tool/"))
8207 (for-each (lambda (file)
8210 (invoke "antlr" "-o" dir (string-append dir file)))
8211 '("antlr.g" "antlr.print.g" "assign.types.g"
8212 "buildnfa.g" "define.g")))
8213 (format #t "codegen.g\n")
8214 (invoke "antlr" "-o" "src/org/antlr/codegen"
8215 "src/org/antlr/codegen/codegen.g")
8217 (add-before 'build 'fix-build-xml
8219 (substitute* "build.xml"
8220 (("target name=\"compile\">")
8221 "target name=\"compile\">
8222 <copy todir=\"${classes.dir}\">
8223 <fileset dir=\"src\">
8224 <include name=\"**/*.stg\"/>
8225 <include name=\"**/*.st\"/>
8226 <include name=\"**/*.sti\"/>
8227 <include name=\"**/STLexer.tokens\"/>
8232 `(("antlr" ,antlr2)))
8234 `(("junit" ,java-junit)))
8236 `(("stringtemplate" ,java-stringtemplate-3)))))
8238 (define-public java-treelayout
8240 (name "java-treelayout")
8245 (url "https://github.com/abego/treelayout")
8246 (commit (string-append "v" version))))
8247 (file-name (git-file-name name version))
8250 "18my8ql9b1y0n0zrvkih7xfhf3dpgfhyfifvkcfhmwcvw3divxak"))))
8251 (build-system ant-build-system)
8253 `(#:jar-name (string-append ,name "-" ,version ".jar")
8254 #:source-dir "org.abego.treelayout/src/main/java"
8255 #:test-dir "org.abego.treelayout/src/test"))
8257 `(("java-junit" ,java-junit)))
8259 `(("java-hamcrest-core" ,java-hamcrest-core)))
8260 (home-page "http://treelayout.sourceforge.net")
8261 (synopsis "Tree Layout Algorithm in Java")
8262 (description "TreeLayout creates tree layouts for arbitrary trees. It is
8263 not restricted to a specific output or format, but can be used for any kind of
8264 two dimensional diagram. Examples are Swing based components, SVG files, etc.
8265 This is possible because TreeLayout separates the layout of a tree from the
8267 (license license:bsd-3)))
8269 (define-public java-antlr4-runtime
8271 (name "java-antlr4-runtime")
8276 (url "https://github.com/antlr/antlr4")
8278 (file-name (git-file-name name version))
8281 "1qal3add26qxskm85nk7r758arladn5rcyjinmhlhznmpbbv9j8m"))
8283 (search-patches "java-antlr4-Add-standalone-generator.patch"
8284 "java-antlr4-fix-code-too-large.java"))))
8285 (build-system ant-build-system)
8287 `(#:jar-name "java-antlr4-runtime.jar"
8288 #:source-dir "runtime/Java/src/org"
8289 #:tests? #f; tests depend on java-antlr4 itself
8291 (modify-phases %standard-phases
8292 (add-before 'build 'copy-resources
8294 (copy-recursively "runtime/Java/src/main/dot"
8297 (home-page "https://antlr.org")
8298 (synopsis "ANTLR runtime library")
8299 (description "This package contains the runtime library used with generated
8301 (license license:bsd-3)))
8303 (define-public antlr4
8305 (inherit java-antlr4-runtime)
8308 `(#:jar-name "antlr4.jar"
8309 #:source-dir "tool/src"
8310 #:test-dir "tool-testsuite/test:runtime-testsuite/test:runtime-testsuite/annotations/src"
8311 #:test-include (list "**/Test*.java")
8312 #:test-exclude (list
8313 ;; no runnable method
8314 "**/TestOutputReading.java"
8316 "**/TestParserErrors.java"
8317 "**/TestSemPredEvalParser.java"
8319 "**/TestListeners.java"
8320 "**/TestParseTrees.java"
8321 "**/TestParserExec.java"
8322 "**/TestLexerErrors.java"
8323 "**/TestPerformance.java"
8324 "**/TestCompositeParsers.java"
8325 "**/TestLexerExec.java"
8326 "**/TestSemPredEvalLexer.java"
8327 "**/TestLeftRecursion.java"
8328 "**/TestFullContextParsing.java"
8329 "**/TestCompositeLexers.java"
8330 ;; Null pointer exception
8331 "**/TestCompositeGrammars.java"
8332 ;; Wrong assumption on emoji
8333 "**/TestUnicodeData.java")
8335 (modify-phases %standard-phases
8336 (add-before 'build 'fix-build.xml
8338 ;; tests are not in a java subdirectory
8339 (substitute* "build.xml"
8340 (("\\$\\{test.home\\}/java") "${test.home}"))
8342 ;; tests require to have a working antlr4 binary
8344 (add-after 'bin-install 'check
8346 (invoke "ant" "compile-tests")
8347 (invoke "ant" "check" "-Dtest.home=runtime-testsuite/annotations/src")
8348 (invoke "ant" "check" "-Dtest.home=runtime-testsuite/test")
8349 (invoke "ant" "check" "-Dtest.home=tool-testsuite/test")
8351 (add-before 'check 'remove-unrelated-languages
8353 ;; There are tests for other languages that ANTLR can generate, but
8354 ;; we don't have the infrastructure for that yet. Let's test Java
8358 (delete-file-recursively
8359 (string-append "runtime-testsuite/test/org/antlr/v4/test/runtime/"
8361 '("cpp" "csharp" "go" "javascript" "php" "python" "python2"
8364 (add-before 'check 'generate-test-parsers
8365 (lambda* (#:key outputs #:allow-other-keys)
8366 (define (run-antlr dir filename package)
8367 (invoke "antlr4" "-lib" dir "-visitor" "-no-listener"
8368 "-package" package (string-append dir "/" filename)
8370 (setenv "PATH" (string-append (getenv "PATH") ":"
8371 (assoc-ref outputs "out") "/bin"))
8372 (run-antlr "runtime-testsuite/test/org/antlr/v4/test/runtime/java/api"
8373 "Java.g4" "org.antlr.v4.test.runtime.java.api")
8374 (run-antlr "runtime-testsuite/test/org/antlr/v4/test/runtime/java/api"
8375 "VisitorBasic.g4" "org.antlr.v4.test.runtime.java.api")
8376 (run-antlr "runtime-testsuite/test/org/antlr/v4/test/runtime/java/api"
8377 "VisitorCalc.g4" "org.antlr.v4.test.runtime.java.api")
8379 (add-before 'check 'remove-graphemes
8381 ;; When running antlr on grahemes.g4, we get a runtime exception:
8382 ;; set is empty. So delete the file that depends on it.
8384 "runtime-testsuite/test/org/antlr/v4/test/runtime/java/api/perf/TimeLexerSpeed.java")
8386 (add-after 'install 'bin-install
8387 (lambda* (#:key inputs outputs #:allow-other-keys)
8388 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
8389 (bin (string-append (assoc-ref outputs "out") "/bin")))
8391 (with-output-to-file (string-append bin "/antlr4")
8394 (string-append "#!" (which "sh") "\n"
8395 "java -cp " jar "/antlr4.jar:"
8401 (find-files (assoc-ref inputs input)
8403 '("antlr3" "java-stringtemplate"
8404 "java-antlr4-runtime" "java-treelayout"
8405 "java-jsonp-api" "java-icu4j")))
8407 " org.antlr.v4.Tool $*"))))
8408 (chmod (string-append bin "/antlr4") #o755)
8410 (add-before 'build 'copy-resources
8412 (copy-recursively "tool/resources/" "build/classes")
8414 (add-before 'build 'generate-unicode
8416 ;; First: build the generator
8417 (invoke "javac" "-cp" (getenv "CLASSPATH")
8418 "tool/src/org/antlr/v4/unicode/UnicodeRenderer.java"
8419 "tool/src/org/antlr/v4/unicode/UnicodeDataTemplateController.java")
8421 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
8422 ":tool/src:runtime/Java")
8423 "org.antlr.v4.unicode.UnicodeRenderer"
8424 "tool/resources/org/antlr/v4/tool/templates"
8426 "tool/src/org/antlr/v4/unicode/UnicodeData.java")
8427 ;; It seems there is a bug with our ST4
8428 (substitute* "tool/src/org/antlr/v4/unicode/UnicodeData.java"
8430 ;; Remove the additional file
8431 (delete-file "tool/src/org/antlr/v4/unicode/UnicodeRenderer.java")
8433 (add-before 'build 'generate-grammar
8434 (lambda* (#:key inputs #:allow-other-keys)
8435 (with-directory-excursion "tool/src/org/antlr/v4/parse"
8436 (for-each (lambda (file)
8439 (invoke "antlr3" file))
8440 '("ANTLRLexer.g" "ANTLRParser.g" "BlockSetTransformer.g"
8441 "GrammarTreeVisitor.g" "ATNBuilder.g"
8442 "ActionSplitter.g" "LeftRecursiveRuleWalker.g")))
8443 (with-directory-excursion "tool/src/org/antlr/v4/codegen"
8444 (install-file "../parse/ANTLRParser.tokens" ".")
8445 (display "SourceGenTriggers.g\n")
8446 (invoke "antlr3" "SourceGenTriggers.g"))
8449 `(("antlr3" ,antlr3)
8450 ("java-antlr4-runtime" ,java-antlr4-runtime)
8451 ("java-icu4j" ,java-icu4j)
8452 ("java-jsonp-api" ,java-jsonp-api)
8453 ("java-stringtemplate" ,java-stringtemplate)
8454 ("java-treelayout" ,java-treelayout)))
8456 `(("java-junit" ,java-junit)))
8457 (synopsis "Parser and lexer generator in Java")
8458 (description "ANTLR (ANother Tool for Language Recognition) is a powerful
8459 parser generator for reading, processing, executing, or translating structured
8460 text or binary files. It's widely used to build languages, tools, and
8461 frameworks. From a grammar, ANTLR generates a parser that can build and walk
8464 (define-public java-antlr4-runtime-4.1
8466 (inherit java-antlr4-runtime)
8471 (url "https://github.com/antlr/antlr4")
8473 (file-name (git-file-name "antlr4" version))
8476 "1i8hmx5an58cjyvhji0xgpvd6lq00z1k1mjys025q2wqc25wv4c1"))))
8478 (substitute-keyword-arguments (package-arguments java-antlr4-runtime)
8480 `(modify-phases ,phases
8481 (add-before 'configure 'chmod
8483 (chmod "build.xml" #o644)
8486 `(("java-treelayout" ,java-treelayout)))))
8488 (define-public antlr4-4.1
8491 (version (package-version java-antlr4-runtime-4.1))
8492 (source (package-source java-antlr4-runtime-4.1))
8494 (substitute-keyword-arguments (package-arguments antlr4)
8497 ((#:test-exclude excludes)
8498 `(list "**/TestParseErrors.java"
8499 "**/TestTopologicalSort.java"
8502 `(modify-phases ,phases
8503 (delete 'generate-unicode)
8506 (invoke "ant" "check")
8508 (add-before 'configure 'chmod
8510 (chmod "build.xml" #o644)
8512 (delete 'remove-graphemes)
8513 (delete 'remove-unrelated-languages)
8514 (delete 'generate-test-parsers)))))
8517 "java-antlr4-runtime" (list java-antlr4-runtime-4.1)
8518 (package-inputs antlr4)))))
8520 (define-public java-commons-cli-1.2
8521 ;; This is a bootstrap dependency for Maven2.
8523 (inherit java-commons-cli)
8527 (uri (string-append "mirror://apache/commons/cli/source/"
8528 "commons-cli-" version "-src.tar.gz"))
8531 "0rvfgzgv2pc1m091dfj3ih9ddsjjppr1f1wf0qmc3bk6b1kwv2dm"))))
8533 `(#:jar-name "commons-cli.jar"
8535 (modify-phases %standard-phases
8536 (add-before 'check 'fix-build-xml
8537 (lambda* (#:key inputs #:allow-other-keys)
8538 (substitute* "build.xml"
8539 (("dir=\"\\$\\{test.home\\}/java\"")
8540 "dir=\"${test.home}\""))
8543 `(("java-junit" ,java-junit)))))
8545 (define-public java-microemulator-cldc
8547 (name "java-microemulator-cldc")
8551 (uri (string-append "https://github.com/barteo/microemu/archive/"
8553 (string-map (lambda (c) (if (char=? c #\.) #\_ c))
8556 (file-name (string-append name "-" version ".tar.gz"))
8559 "1x1apmz38gkppxnwnygwmi12j54v4p258v8ddzn6dldkk7vak1ll"))))
8560 (build-system ant-build-system)
8562 `(#:jar-name "microemulator-cldc.jar"
8563 #:source-dir "microemu-cldc/src/main/java"
8564 #:tests? #f)); Requires even older software
8565 (home-page "https://github.com/barteo/microemu")
8566 (synopsis "J2ME CLDC emulator")
8567 (description "Microemulator is a Java 2 Micro Edition (J2ME) CLDC/MIDP
8568 Emulator. It demonstrates MIDlet based applications in web browser
8569 applet and can be run as a standalone java application.")
8570 (license (list license:asl2.0
8572 license:lgpl2.1+))))
8574 (define-public java-datanucleus-javax-persistence
8576 (name "java-datanucleus-javax-persistence")
8580 (uri (string-append "https://github.com/datanucleus/"
8581 "javax.persistence/archive/javax.persistence-"
8582 version "-release.tar.gz"))
8585 "11jx0fjwgc2hhbqqgdd6m1pf2fplf9vslppygax0y1z5csnqjhpx"))))
8586 (build-system ant-build-system)
8588 `(#:jar-name "java-datanucleus-javax-persistence.jar"
8590 #:source-dir "src/main/java"
8591 #:tests? #f)); no tests
8592 (home-page "https://github.com/datanucleus/javax.persistence")
8593 (synopsis "JPA API")
8594 (description "This package contains a clean definition of JPA API intended
8595 for use with DataNucleus JPA since the JCP haven't provided an official JPA API
8596 jar. See @url{http://java.net/projects/jpa-spec/downloads} for the specification
8597 used to generate this API.")
8598 (license (list license:edl1.0 license:epl1.0))))
8600 (define-public java-osgi-cmpn
8602 (name "java-osgi-cmpn")
8606 (uri (string-append "https://repo1.maven.org/maven2/"
8607 "org/osgi/osgi.cmpn/" version "/osgi.cmpn-"
8608 version "-sources.jar"))
8611 "1lmb6xyrmkqdhv1kayf0514rlwq6ypvs4m44ibrck3snp8241wys"))))
8612 (build-system ant-build-system)
8614 `(#:jar-name "osgi-cmpn.jar"
8615 #:tests? #f)); no tests
8617 `(("annotation" ,java-osgi-annotation)
8618 ("core" ,java-osgi-core)
8619 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
8620 ("microemulator" ,java-microemulator-cldc)
8621 ("servlet" ,java-classpathx-servletapi)))
8622 (home-page "https://www.osgi.org")
8623 (synopsis "Compendium specification module of OSGi framework")
8625 "OSGi, for Open Services Gateway initiative framework, is a module system
8626 and service platform for the Java programming language. This package contains
8627 the compendium specification module, providing interfaces and classes for use
8628 in compiling bundles.")
8629 (license license:asl2.0)))
8631 (define-public java-osgi-service-component-annotations
8633 (name "java-osgi-service-component-annotations")
8637 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8638 "org.osgi.service.component.annotations/"
8639 version "/org.osgi.service.component.annotations-"
8640 version "-sources.jar"))
8643 "15rq9cmp4fpn74q44m4j35qsqmjf5lx3hcrk6pzvbhc08igic2f0"))))
8644 (build-system ant-build-system)
8646 `(#:jar-name "osgi-service-component-annotations.jar"
8647 #:tests? #f)); no tests
8649 `(("annotation" ,java-osgi-annotation)))
8650 (home-page "https://www.osgi.org")
8651 (synopsis "Support annotations for osgi-service-component")
8653 "OSGi, for Open Services Gateway initiative framework, is a module system
8654 and service platform for the Java programming language. This package contains
8655 the support annotations for osgi-service-component.")
8656 (license license:asl2.0)))
8658 (define-public java-osgi-dto
8660 (name "java-osgi-dto")
8664 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8665 "org.osgi.dto/" version "/org.osgi.dto-"
8666 version "-sources.jar"))
8669 "0f4bqjzadn0hwk6sd3h5gvbyfp3yci1s6r0v770cc15p0pg627yr"))))
8670 (build-system ant-build-system)
8672 `(#:jar-name "osgi-dto.jar"
8673 #:tests? #f)); no tests
8675 `(("annotation" ,java-osgi-annotation)))
8676 (home-page "https://www.osgi.org")
8677 (synopsis "Data Transfer Objects")
8679 "OSGi, for Open Services Gateway initiative framework, is a module system
8680 and service platform for the Java programming language. This package contains
8681 the Data Transfer Objects. It is easily serializable having only public fields
8682 of primitive types and their wrapper classes, Strings, and DTOs. List, Set,
8683 Map and array aggregates may also be used. The aggregates must only hold
8684 objects of the listed types or aggregates.")
8685 (license license:asl2.0)))
8687 (define-public java-osgi-resource
8689 (name "java-osgi-resource")
8693 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8694 "org.osgi.resource/"
8695 version "/org.osgi.resource-"
8696 version "-sources.jar"))
8699 "0hi0fsc5v99q22bd7lrkvpz1y0ds4w9arjldpwsrcpqvz2js7q2d"))))
8700 (build-system ant-build-system)
8702 `(#:jar-name "osgi-resource.jar"
8703 #:tests? #f)); no tests
8705 `(("annotation" ,java-osgi-annotation)
8706 ("dto" ,java-osgi-dto)))
8707 (home-page "https://www.osgi.org")
8708 (synopsis "OSGI Resource")
8710 "OSGi, for Open Services Gateway initiative framework, is a module system
8711 and service platform for the Java programming language. This package contains
8712 the definition of common types in osgi packages.")
8713 (license license:asl2.0)))
8715 (define-public java-osgi-namespace-contract
8717 (name "java-osgi-namespace-contract")
8721 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8722 "org.osgi.namespace.contract/"
8723 version "/org.osgi.namespace.contract-"
8724 version "-sources.jar"))
8727 "1iz4f2i0fvqrlq90ki9nfzcfpvy2av434ri25bglywqssx8mmp36"))))
8728 (build-system ant-build-system)
8730 `(("resource" ,java-osgi-resource)
8731 ("annotation" ,java-osgi-annotation)))
8733 `(#:jar-name "osgi-namespace-contract.jar"
8734 #:tests? #f)); no tests
8735 (home-page "https://www.osgi.org")
8736 (synopsis "Contract Capability and Requirement Namespace")
8738 "OSGi, for Open Services Gateway initiative framework, is a module system
8739 and service platform for the Java programming language. This package contains
8740 the names for the attributes and directives for a namespace with contracts.")
8741 (license license:asl2.0)))
8743 (define-public java-osgi-namespace-extender
8745 (name "java-osgi-namespace-extender")
8749 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8750 "org.osgi.namespace.extender/"
8751 version "/org.osgi.namespace.extender-"
8752 version "-sources.jar"))
8755 "0jgqiak2i05qv6j3gd33xlaifzzc0ylxxk376v2x0apfg3vvixmz"))))
8756 (build-system ant-build-system)
8758 `(("resource" ,java-osgi-resource)
8759 ("annotation" ,java-osgi-annotation)))
8761 `(#:jar-name "osgi-namespace-extendent.jar"
8762 #:tests? #f)); no tests
8763 (home-page "https://www.osgi.org")
8764 (synopsis "Extender Capability and Requirement Namespace")
8766 "OSGi, for Open Services Gateway initiative framework, is a module system
8767 and service platform for the Java programming language. This package contains
8768 the names for the attributes and directives for an extender namespace.")
8769 (license license:asl2.0)))
8771 (define-public java-osgi-namespace-service
8773 (name "java-osgi-namespace-service")
8777 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8778 "org.osgi.namespace.service/"
8779 version "/org.osgi.namespace.service-"
8780 version "-sources.jar"))
8783 "0qmw8n2449nkmm56d1znz9zhazb6ya3vsimd5bf5jg23zzhgl8c8"))))
8784 (build-system ant-build-system)
8786 `(("resource" ,java-osgi-resource)
8787 ("annotation" ,java-osgi-annotation)))
8789 `(#:jar-name "osgi-namespace-service.jar"
8790 #:tests? #f)); no tests
8791 (home-page "https://www.osgi.org")
8792 (synopsis "Service Capability and Requirement Namespace")
8794 "OSGi, for Open Services Gateway initiative framework, is a module system
8795 and service platform for the Java programming language. This package contains
8796 the names for the attributes and directives for a service namespace.")
8797 (license license:asl2.0)))
8799 (define-public java-osgi-util-function
8801 (name "java-osgi-util-function")
8805 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8806 "org.osgi.util.function/"
8807 version "/org.osgi.util.function-"
8808 version "-sources.jar"))
8811 "04l7j3hwmmj28w23m7paca0afzncs42j2mdr3liqq8kvp548sc6x"))))
8812 (build-system ant-build-system)
8814 `(#:jar-name "osgi-util-function.jar"
8815 #:tests? #f)); no tests
8817 `(("annotation" ,java-osgi-annotation)))
8818 (home-page "https://www.osgi.org")
8819 (synopsis "OSGI Util Function")
8821 "OSGi, for Open Services Gateway initiative framework, is a module system
8822 and service platform for the Java programming language. This package contains
8823 an interface for a function that accepts a single argument and produces a result.")
8824 (license license:asl2.0)))
8826 (define-public java-osgi-util-promise
8828 (name "java-osgi-util-promise")
8832 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8833 "org.osgi.util.promise/"
8834 version "/org.osgi.util.promise-"
8835 version "-sources.jar"))
8838 "0y34dwiflg1c4ahvkswpf9z02xph2sr9fm04ia5493x3lshpw22c"))))
8839 (build-system ant-build-system)
8841 `(#:jar-name "osgi-util-promise.jar"
8842 #:tests? #f)); no tests
8844 `(("annotation" ,java-osgi-annotation)
8845 ("function" ,java-osgi-util-function)))
8846 (home-page "https://www.osgi.org")
8847 (synopsis "Promise of a value")
8849 "OSGi, for Open Services Gateway initiative framework, is a module system
8850 and service platform for the Java programming language. This package contains
8851 an interface and utilitary classes for promises. A Promise represents a future
8852 value. It handles the interactions for asynchronous processing.")
8853 (license license:asl2.0)))
8855 (define-public java-osgi-service-metatype-annotations
8857 (name "java-osgi-service-metatype-annotations")
8861 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8862 "org.osgi.service.metatype.annotations/"
8863 version "/org.osgi.service.metatype.annotations-"
8864 version "-sources.jar"))
8867 "12rwm3349wk80vm88rcdgs4435m4jxkpkj5mrx326skkz2c6hyw6"))))
8868 (build-system ant-build-system)
8870 `(#:jar-name "osgi-service-metatype-annotations.jar"
8871 #:tests? #f)); no tests
8873 `(("annotation" ,java-osgi-annotation)))
8874 (home-page "https://www.osgi.org")
8875 (synopsis "Support annotations for metatype")
8877 "OSGi, for Open Services Gateway initiative framework, is a module system
8878 and service platform for the Java programming language. This package contains
8879 the support annotations for metatype.")
8880 (license license:asl2.0)))
8882 (define-public java-osgi-service-repository
8884 (name "java-osgi-service-repository")
8888 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8889 "org.osgi.service.repository/"
8890 version "/org.osgi.service.repository-"
8891 version "-sources.jar"))
8894 "1k41mhg7b58pd8nsghr2qwcjrxdnf1p9spsw9v11k4257g6rl06n"))))
8895 (build-system ant-build-system)
8897 `(#:jar-name "osgi-service-repository.jar"
8898 #:tests? #f)); no tests
8900 `(("annotation" ,java-osgi-annotation)
8901 ("promise" ,java-osgi-util-promise)
8902 ("resource" ,java-osgi-resource)))
8903 (home-page "https://www.osgi.org")
8904 (synopsis "OSGI service repository")
8906 "OSGi, for Open Services Gateway initiative framework, is a module system
8907 and service platform for the Java programming language. This package contains
8908 a repository service that contains resources.")
8909 (license license:asl2.0)))
8911 (define-public java-osgi-framework
8913 (name "java-osgi-framework")
8917 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8918 "org.osgi.framework/" version "/org.osgi.framework-"
8919 version "-sources.jar"))
8922 "1lwp2zfad3rybcc6q9bwz8xsgkc92ypzy5p6x54387f1qj65m73s"))))
8923 (build-system ant-build-system)
8925 `(#:jar-name "osgi-framework.jar"
8926 #:tests? #f)); no tests
8928 `(("annotation" ,java-osgi-annotation)
8929 ("resource" ,java-osgi-resource)
8930 ("dto" ,java-osgi-dto)))
8931 (home-page "https://www.osgi.org")
8932 (synopsis "OSGi framework")
8934 "OSGi, for Open Services Gateway initiative framework, is a module system
8935 and service platform for the Java programming language.")
8936 (license license:asl2.0)))
8938 (define-public java-osgi-service-log
8940 (name "java-osgi-service-log")
8944 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8945 "org.osgi.service.log/"
8946 version "/org.osgi.service.log-"
8947 version "-sources.jar"))
8950 "1029j30dzcwializzca0j3fkhwwz08kmmsha5agw1iccscimj6r0"))))
8951 (build-system ant-build-system)
8953 `(#:jar-name "osgi-service-log.jar"
8954 #:tests? #f)); no tests
8956 `(("java-osgi-framework" ,java-osgi-framework)))
8957 (home-page "https://www.osgi.org")
8958 (synopsis "Provides methods for bundles to write messages to the log")
8960 "OSGi, for Open Services Gateway initiative framework, is a module system
8961 and service platform for the Java programming language. This package contains
8963 (license license:asl2.0)))
8965 (define-public java-osgi-service-jdbc
8967 (name "java-osgi-service-jdbc")
8971 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8972 "org.osgi.service.jdbc/"
8973 version "/org.osgi.service.jdbc-"
8974 version "-sources.jar"))
8977 "11iln5v7bk469cgb9ddkrz9sa95b3733gqgaqw9xf5g6wq652yjz"))))
8978 (build-system ant-build-system)
8980 `(#:jar-name "osgi-service-jdbc.jar"
8981 #:tests? #f)); no tests
8982 (home-page "https://www.osgi.org")
8983 (synopsis "Factory for JDBC connection factories")
8985 "OSGi, for Open Services Gateway initiative framework, is a module system
8986 and service platform for the Java programming language. This package contains
8987 a factory for JDBC connection factories. There are 3 preferred connection
8988 factories for getting JDBC connections:
8991 @item @code{javax.sql.DataSource};
8992 @item @code{javax.sql.ConnectionPoolDataSource};
8993 @item @code{javax.sql.XADataSource}.
8995 (license license:asl2.0)))
8997 (define-public java-osgi-service-resolver
8999 (name "java-osgi-service-resolver")
9003 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9004 "org.osgi.service.resolver/"
9005 version "/org.osgi.service.resolver-"
9006 version "-sources.jar"))
9009 "1dzqn1ryfi2rq4zwsgp44bmj2wlfydjg1qbxw2b0z4xdjjy55vxd"))))
9010 (build-system ant-build-system)
9012 `(#:jar-name "osgi-service-resolver.jar"
9013 #:tests? #f)); no tests
9015 `(("annotation" ,java-osgi-annotation)
9016 ("resource" ,java-osgi-resource)))
9017 (home-page "https://www.osgi.org")
9018 (synopsis "OSGI Resolver service")
9020 "OSGi, for Open Services Gateway initiative framework, is a module system
9021 and service platform for the Java programming language. This package contains
9022 a resolver service that resolves the specified resources in the context supplied
9024 (license license:asl2.0)))
9026 (define-public java-osgi-util-tracker
9028 (name "java-osgi-util-tracker")
9032 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9033 "org.osgi.util.tracker/"
9034 version "/org.osgi.util.tracker-"
9035 version "-sources.jar"))
9038 "0c4fh9vxwzsx59r8dygda0gq2gx3z5vfhc3jsphlqwf5w0h403lz"))))
9039 (build-system ant-build-system)
9041 `(#:jar-name "osgi-util-tracker.jar"
9042 #:tests? #f)); no tests
9044 `(("framework" ,java-osgi-framework)
9045 ("annotation" ,java-osgi-annotation)))
9046 (home-page "https://www.osgi.org")
9047 (synopsis "Bundle tracking")
9049 "OSGi, for Open Services Gateway initiative framework, is a module system
9050 and service platform for the Java programming language. This package contains
9051 bundle tracking utility classes.")
9052 (license license:asl2.0)))
9054 (define-public java-osgi-service-cm
9056 (name "java-osgi-service-cm")
9060 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9061 "org.osgi.service.cm/"
9062 version "/org.osgi.service.cm-"
9063 version "-sources.jar"))
9066 "1z8kap48y3xi0ggj8v6czglfnpnd94mmismgi2wbqhj1nl5fzbp6"))))
9067 (build-system ant-build-system)
9069 `(#:jar-name "osgi-service-cm.jar"
9070 #:tests? #f)); no tests
9072 `(("framework" ,java-osgi-framework)
9073 ("annotation" ,java-osgi-annotation)))
9074 (home-page "https://www.osgi.org")
9075 (synopsis "OSGI Configuration Management")
9077 "OSGi, for Open Services Gateway initiative framework, is a module system
9078 and service platform for the Java programming language. This package contains
9079 utility classes for the configuration of services.")
9080 (license license:asl2.0)))
9082 (define-public java-osgi-service-packageadmin
9084 (name "java-osgi-service-packageadmin")
9088 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9089 "org.osgi.service.packageadmin/"
9090 version "/org.osgi.service.packageadmin-"
9091 version "-sources.jar"))
9094 "041mpxzi7g36wmcily6y4ccn3jx15akpdy8gmhyb7m98x7qfvn52"))))
9095 (build-system ant-build-system)
9097 `(#:jar-name "osgi-service-packageadmin.jar"
9098 #:tests? #f)); no tests
9100 `(("framework" ,java-osgi-framework)))
9101 (home-page "https://www.osgi.org")
9102 (synopsis "OSGI Package Administration")
9104 "OSGi, for Open Services Gateway initiative framework, is a module system
9105 and service platform for the Java programming language. This package contains
9106 the packageadmin service.")
9107 (license license:asl2.0)))
9109 (define-public java-ops4j-base-lang
9111 (name "java-ops4j-base-lang")
9115 (uri (string-append "https://github.com/ops4j/org.ops4j.base/"
9116 "archive/base-" version ".tar.gz"))
9119 "18hl3lpchgpv8yh5rlk39l2gif5dlfgb8gxjmncf39pr2dprkniw"))))
9120 (build-system ant-build-system)
9122 `(#:jar-name "java-ops4j-base-lang.jar"
9123 #:source-dir "ops4j-base-lang/src/main/java"
9124 #:tests? #f; no tests
9126 (modify-phases %standard-phases
9127 (add-before 'build 'add-test-file
9129 ;; That file is required by a test in ops4j-pax-exam-core-spi
9130 (mkdir-p "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang")
9131 (with-output-to-file "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang/pom.properties"
9135 "version=" ,version "\n"
9136 "groupId=org.ops4j.base"
9137 "artifactId=ops4j-base-lang\n"))))
9139 (home-page "https://ops4j1.jira.com/wiki/spaces/base/overview")
9140 (synopsis "Utility classes and extensions to be used in OPS4J projects")
9141 (description "OPS4J stands for Open Participation Software for Java. This
9142 package contains utilities and extensions related to @code{java.lang}.")
9143 (license license:asl2.0)))
9145 (define-public java-ops4j-base-monitors
9147 (inherit java-ops4j-base-lang)
9148 (name "java-ops4j-base-monitors")
9150 `(#:jar-name "java-ops4j-base-monitors.jar"
9151 #:source-dir "ops4j-base-monitors/src/main/java"
9152 #:tests? #f)); no tests
9154 `(("lang" ,java-ops4j-base-lang)))
9155 (description "OPS4J stands for Open Participation Software for Java. This
9156 package contains utilities and extensions related to monitoring.")))
9158 (define-public java-ops4j-base-io
9160 (inherit java-ops4j-base-lang)
9161 (name "java-ops4j-base-io")
9163 `(#:jar-name "java-ops4j-base-io.jar"
9164 #:source-dir "ops4j-base-io/src/main/java"
9165 #:test-dir "ops4j-base-io/src/test"
9167 (list "**/ListerTest.java")))
9169 `(("lang" ,java-ops4j-base-monitors)
9170 ("lang" ,java-ops4j-base-lang)))
9172 `(("junit" ,java-junit)
9173 ("hamcrest" ,java-hamcrest-core)))
9174 (description "OPS4J stands for Open Participation Software for Java. This
9175 package contains utilities and extensions related to handling streams and files.")))
9177 (define-public java-ops4j-base-util
9179 (inherit java-ops4j-base-lang)
9180 (name "java-ops4j-base-util")
9182 `(#:jar-name "java-ops4j-base-util.jar"
9183 #:source-dir "ops4j-base-util/src/main/java"
9184 #:test-dir "ops4j-base-util/src/test"))
9186 `(("lang" ,java-ops4j-base-lang)))
9188 `(("junit" ,java-junit)))
9189 (description "OPS4J stands for Open Participation Software for Java. This
9190 package contains utilities and extensions related to environment, i18n and
9193 (define-public java-ops4j-base-util-property
9195 (inherit java-ops4j-base-lang)
9196 (name "java-ops4j-base-util-property")
9198 `(#:jar-name "java-ops4j-base-util-property.jar"
9199 #:source-dir "ops4j-base-util-property/src/main/java"
9200 #:tests? #f)); no tests
9202 `(("lang" ,java-ops4j-base-lang)
9203 ("util" ,java-ops4j-base-util)))
9204 (description "OPS4J stands for Open Participation Software for Java. This
9205 package contains utilities and extensions related to resolving properties from
9206 different sources.")))
9208 (define-public java-ops4j-base-store
9210 (inherit java-ops4j-base-lang)
9211 (name "java-ops4j-base-store")
9213 `(#:jar-name "java-ops4j-base-store.jar"
9214 #:source-dir "ops4j-base-store/src/main/java"
9215 #:tests? #f)); no tests
9217 `(("lang" ,java-ops4j-base-lang)
9218 ("slf4j" ,java-slf4j-api)
9219 ("io" ,java-ops4j-base-io)))
9220 (description "OPS4J stands for Open Participation Software for Java. This
9221 package contains utilities for storing and retrieving data from an
9222 @code{InputStream}.")))
9224 (define-public java-ops4j-base-spi
9226 (inherit java-ops4j-base-lang)
9227 (name "java-ops4j-base-spi")
9229 `(#:jar-name "java-ops4j-base-spi.jar"
9230 #:source-dir "ops4j-base-spi/src/main/java"
9231 #:test-dir "ops4j-base-spi/src/test"))
9233 `(("junit" ,java-junit)
9234 ("hamcrest" ,java-hamcrest-core)))
9235 (description "OPS4J stands for Open Participation Software for Java. This
9236 package contains utilities for obtaining services via the Java SE 6
9237 @code{ServiceLoader}.")))
9239 (define-public java-aqute-bnd-annotation
9241 (name "java-aqute-bnd-annotation")
9245 (uri (string-append "https://github.com/bndtools/bnd/archive/"
9246 version ".REL.tar.gz"))
9247 (file-name (string-append name "-" version ".tar.gz"))
9250 "1ggyiq0as0f6cz333a0dh98j72kmvv5pf2s47v9554yh905lfqdl"))))
9251 (build-system ant-build-system)
9253 `(#:jar-name "java-aqute-bnd-annotation.jar"
9254 #:source-dir "biz.aQute.bnd.annotation/src"
9255 #:tests? #f)); empty test dir
9256 (home-page "https://bnd.bndtools.org/")
9257 (synopsis "Tools for OSGi")
9258 (description "Bnd is a swiss army knife for OSGi, it creates manifest
9259 headers based on analyzing the class code, it verifies the project settings,
9260 it manages project dependencies, gives diffs jars, and much more.")
9261 (license license:asl2.0)))
9263 (define-public java-aqute-libg
9265 (inherit java-aqute-bnd-annotation)
9266 (name "java-aqute-libg")
9268 `(#:jar-name "java-aqute-libg.jar"
9269 ;; The build fails when source/target more recent than 1.7. This
9270 ;; is a known issue. See: https://github.com/bndtools/bnd/issues/1327
9272 ;; It is closed as won't fix. There is no way to change the source
9273 ;; so that it works on 1.8, and still works on 1.6, the upstream
9274 ;; target. It work fine on 1.7, so we use 1.7.
9275 #:make-flags (list "-Dant.build.javac.source=1.7"
9276 "-Dant.build.javac.target=1.7")
9278 (modify-phases %standard-phases
9279 (add-before 'configure 'chdir
9280 ;; Change to aQute.libg directory, so that the relative
9281 ;; paths in the tests aren't broken.
9283 (chdir "aQute.libg")
9285 (add-before 'check 'create-test-directory
9286 ;; Copy the test directory to test/java, since that's where
9287 ;; ant-build-system's default project in build.xml expects to find
9288 ;; the test classes. Leave a copy in the original place to not
9289 ;; break paths in tests.
9292 (copy-recursively "test" "src/test/java")
9295 `(("slf4j" ,java-slf4j-api)
9296 ("osgi-annot" ,java-osgi-annotation)
9297 ("java-osgi-cmpn" ,java-osgi-cmpn)
9298 ("osgi" ,java-osgi-core)))
9300 `(("hamcrest" ,java-hamcrest-core)
9301 ("java-junit" ,java-junit)))))
9303 (define-public java-aqute-bndlib
9305 (inherit java-aqute-bnd-annotation)
9306 (name "java-aqute-bndlib")
9308 `(#:jar-name "java-bndlib.jar"
9309 #:source-dir "biz.aQute.bndlib/src"
9310 #:tests? #f)); no tests
9312 `(("slf4j" ,java-slf4j-api)
9313 ("osgi-annot" ,java-osgi-annotation)
9314 ("java-aqute-libg" ,java-aqute-libg)
9315 ("java-aqute-bnd-annotation" ,java-aqute-bnd-annotation)
9316 ("java-osgi-service-component-annotations" ,java-osgi-service-component-annotations)
9317 ("java-osgi-service-repository" ,java-osgi-service-repository)
9318 ("java-osgi-service-log" ,java-osgi-service-log)
9319 ("java-osgi-service-metatype-annotations" ,java-osgi-service-metatype-annotations)
9320 ("java-osgi-namespace-contract" ,java-osgi-namespace-contract)
9321 ("java-osgi-namespace-extender" ,java-osgi-namespace-extender)
9322 ("java-osgi-namespace-service" ,java-osgi-namespace-service)
9323 ("promise" ,java-osgi-util-promise)
9324 ("osgi" ,java-osgi-core)))))
9326 (define-public java-ops4j-pax-tinybundles
9328 (name "java-ops4j-pax-tinybundles")
9332 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.tinybundles/"
9333 "archive/tinybundles-" version ".tar.gz"))
9336 "0y0gq3pvv0iir2b885lmlwnvr724vv7vklzhhr4fs27d7mdkj871"))))
9338 `(#:jar-name "java-ops4j-pax-tinybundles.jar"
9339 #:source-dir "src/main/java"
9341 ;; Abstract base classes for other tests
9342 (list "**/BndTest.java" "**/CoreTest.java")
9344 (modify-phases %standard-phases
9345 (add-before 'check 'fix-version
9347 ;; This test has a reference to an old version of bndlib we are not
9348 ;; packaging. It uses the version referenced in pom.xml. We replace
9349 ;; it with our own version.
9350 (substitute* "src/test/java/org/ops4j/pax/tinybundles/bnd/BndTest.java"
9351 (("[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*")
9352 ,(package-version java-aqute-bndlib)))
9355 `(("lang" ,java-ops4j-base-lang)
9356 ("io" ,java-ops4j-base-io)
9357 ("store" ,java-ops4j-base-store)
9358 ("slf4j" ,java-slf4j-api)
9359 ("libg" ,java-aqute-libg)
9360 ("bndlib" ,java-aqute-bndlib)))
9362 `(("junit" ,java-junit)
9363 ("hamcrest" ,java-hamcrest-core)
9364 ("log4j" ,java-log4j-api)
9365 ("bndannotation" ,java-aqute-bnd-annotation)
9366 ("framework" ,java-osgi-framework)))
9367 (build-system ant-build-system)
9368 (home-page "https://ops4j1.jira.com/wiki/spaces/ops4j/pages/12060312/Tinybundles")
9369 (synopsis "Java APIs to create OSGi related artifacts")
9370 (description "Tinybundles is all about creating OSGi related artifacts like
9371 Bundles, Fragments and Deployment Packages with Java Api. It is very convenient
9372 to create such artifacts on-the-fly inside Tests (like in Pax Exam). On the
9373 other hand, this library can be a foundation of real end user tools that need
9374 to create those artifacts.")
9375 (license license:asl2.0)))
9377 (define-public java-ops4j-pax-exam-core
9379 (name "java-ops4j-pax-exam-core")
9383 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.exam2/"
9384 "archive/exam-reactor-" version ".tar.gz"))
9387 "08mzw8nkah3rj3vznlplnawspxhp61zgvb44ifqa1rni1cvbms2g"))))
9389 `(#:jar-name "java-ops4j-pax-exam-core.jar"
9390 #:source-dir "core/pax-exam/src/main/java"
9391 #:test-dir "core/pax-exam/src/test"))
9393 `(("slf4j" ,java-slf4j-api)
9394 ("lang" ,java-ops4j-base-lang)
9395 ("io" ,java-ops4j-base-io)
9396 ("util-property" ,java-ops4j-base-util-property)
9397 ("util-store" ,java-ops4j-base-store)
9398 ("java-osgi-core" ,java-osgi-core)))
9400 `(("junit" ,java-junit)
9401 ("hamcrest" ,java-hamcrest-core)))
9402 (build-system ant-build-system)
9403 (home-page "https://ops4j1.jira.com/wiki/spaces/PAXEXAM4/overview")
9404 (synopsis "In-Container Testing for OSGi, Java EE and CDI")
9405 (description "Pax Exam creates OSGi bundles for testing purposes. It lets
9406 the user take control of the OSGi framework, the test framework (e.g. JUnit) and
9407 the system under test at the same time.")
9408 (license license:asl2.0)))
9410 (define-public java-ops4j-pax-exam-core-spi
9412 (inherit java-ops4j-pax-exam-core)
9413 (name "java-ops4j-pax-exam-core-spi")
9415 `(#:jar-name "java-ops4j-pax-exam-spi.jar"
9416 #:source-dir "src/main/java"
9419 ;; Abstract base class, not a test
9420 "**/BaseStagedReactorTest.java"
9421 ;; Depends on org.mortbay.jetty.testwars:test-war-dump
9422 "**/WarBuilderTest.java")
9424 (modify-phases %standard-phases
9425 (add-before 'configure 'chdir
9427 ;; Tests assume we are in this directory
9428 (chdir "core/pax-exam-spi")
9430 (add-before 'check 'fix-tests
9432 ;; One test checks that this file is present.
9433 (mkdir-p "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi")
9434 (with-output-to-file
9435 "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi/pom.properties"
9438 (string-append "artifactId = pax-exam-spi\n"
9439 "version = " ,(package-version java-ops4j-pax-exam-core-spi)))))
9440 ;; Maven puts compilation results in the target directory, while we
9441 ;; put them in the build directory.
9442 (substitute* '("src/test/java/org/ops4j/pax/exam/spi/war/WarBuilderTest.java"
9443 "src/test/java/org/ops4j/pax/exam/spi/war/WarTestProbeBuilderTest.java"
9444 "src/test/java/org/ops4j/pax/exam/spi/war/ZipBuilderTest.java")
9445 (("target") "build"))
9446 ;; One test is expected to fail, but it doesn't throw the expected exception
9447 (substitute* "src/test/java/org/ops4j/pax/exam/spi/reactors/BaseStagedReactorTest.java"
9448 (("AssertionError") "IllegalArgumentException"))
9451 `(("java-ops4j-pax-exam-core" ,java-ops4j-pax-exam-core)
9452 ("lang" ,java-ops4j-base-lang)
9453 ("monitors" ,java-ops4j-base-monitors)
9454 ("store" ,java-ops4j-base-store)
9455 ("io" ,java-ops4j-base-io)
9456 ("spi" ,java-ops4j-base-spi)
9457 ("osgi" ,java-osgi-core)
9458 ("slf4j" ,java-slf4j-api)
9459 ("tinybundles" ,java-ops4j-pax-tinybundles)))
9461 `(("mockito" ,java-mockito-1)
9462 ("junit" ,java-junit)
9463 ("hamcrest" ,java-hamcrest-core)
9464 ("cglib" ,java-cglib)
9465 ("objenesis" ,java-objenesis)
9466 ("asm" ,java-asm)))))
9468 (define-public java-ops4j-pax-exam-core-junit
9470 (inherit java-ops4j-pax-exam-core)
9471 (name "java-ops4j-pax-exam-core-junit")
9473 `(#:jar-name "ops4j-pax-exam-core-junit.jar"
9474 #:source-dir "drivers/pax-exam-junit4/src/main/java"
9475 #:tests? #f)); no tests
9477 `(("junit" ,java-junit)
9478 ("slf4j" ,java-slf4j-api)
9479 ("core" ,java-ops4j-pax-exam-core)
9480 ("spi" ,java-ops4j-pax-exam-core-spi)))
9481 (native-inputs '())))
9483 (define-public java-fasterxml-jackson-annotations
9485 (name "java-fasterxml-jackson-annotations")
9489 (uri (string-append "https://github.com/FasterXML/"
9490 "jackson-annotations/archive/"
9491 "jackson-annotations-" version ".tar.gz"))
9494 "0mr95xd0da6a4g95zvrl1ryk5n5zv2rc696w3xnsr5hxk2gicfc4"))))
9495 (build-system ant-build-system)
9497 `(#:jar-name "jackson-annotations.jar"
9498 #:source-dir "src/main/java"
9499 #:test-dir "src/test"))
9501 `(("junit" ,java-junit)))
9502 (home-page "https://github.com/FasterXML/jackson-annotations")
9503 (synopsis "General purpose annotations for the Jackson Data Processor")
9504 (description "This package contains general purpose annotations for the
9505 Jackson Data Processor, used on value and handler types. The only annotations
9506 not included are ones that require dependency to the Databind package.")
9507 (license license:asl2.0)))
9509 (define-public java-fasterxml-jackson-core
9511 (name "java-fasterxml-jackson-core")
9515 (uri (string-append "https://github.com/FasterXML/"
9516 "jackson-core/archive/"
9517 "jackson-core-" version ".tar.gz"))
9520 "159hsnk17jr1gyzkf01cxvsn45srnk37g949r7364qlsr527gjgd"))))
9521 (build-system ant-build-system)
9523 `(#:jar-name "jackson-core.jar"
9524 #:source-dir "src/main/java"
9525 #:test-dir "src/test"
9528 ;; Expected failure. pom.xml excludes these
9530 ;; Base classes that have no constructor for junit
9532 "**/ConcurrencyReadTest.java"
9533 "**/ManualCharAccessTest.java"
9534 "**/ManualCharAccessTest.java"
9535 "**/TrailingCommasTest.java"
9536 "**/AsyncMissingValuesInObjectTest.java"
9537 "**/AsyncMissingValuesInArrayTest.java")
9539 (modify-phases %standard-phases
9540 (add-before 'configure 'generate-PackageVersion.java
9542 (let* ((out "src/main/java/com/fasterxml/jackson/core/json/PackageVersion.java")
9543 (in (string-append out ".in")))
9546 (("@package@") "com.fasterxml.jackson.core.json")
9547 (("@projectversion@") ,version)
9548 (("@projectgroupid@") "com.fasterxml.jackson.core")
9549 (("@projectartifactid@") "jackson-core")))
9551 (add-before 'build 'copy-resources
9553 (copy-recursively "src/main/resources"
9556 (add-before 'check 'copy-test-resources
9558 (copy-recursively "src/test/resources"
9559 "build/test-classes")
9562 `(("junit" ,java-junit)
9563 ("hamcrest" ,java-hamcrest-core)))
9564 (home-page "https://github.com/FasterXML/jackson-core")
9567 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
9569 (define-public java-fasterxml-jackson-databind
9571 (name "java-fasterxml-jackson-databind")
9575 (uri (string-append "https://github.com/FasterXML/"
9576 "jackson-databind/archive/"
9577 "jackson-databind-" version ".tar.gz"))
9580 "1zd2cw4z6kdkbx8za96xh9pyicv2a2l7y0rkcx2fqd8hv6d47s08"))))
9581 (build-system ant-build-system)
9583 `(#:jar-name "jackson-databind.jar"
9584 #:source-dir "src/main/java"
9585 #:tests? #f; requires javax.measures for which I can't find a free implementation
9587 (modify-phases %standard-phases
9588 (add-before 'configure 'generate-PackageVersion.java
9590 (let* ((out "src/main/java/com/fasterxml/jackson/databind/cfg/PackageVersion.java")
9591 (in (string-append out ".in")))
9594 (("@package@") "com.fasterxml.jackson.databind.cfg")
9595 (("@projectversion@") ,version)
9596 (("@projectgroupid@") "com.fasterxml.jackson.databind")
9597 (("@projectartifactid@") "jackson-databind")))
9599 (add-before 'build 'copy-resources
9601 (copy-recursively "src/main/resources" "build/classes")
9604 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
9605 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)))
9606 (home-page "https://github.com/FasterXML/jackson-databind")
9607 (synopsis "Data-binding functionality and tree-model for the Jackson Data Processor")
9608 (description "This package contains the general-purpose data-binding
9609 functionality and tree-model for Jackson Data Processor. It builds on core
9610 streaming parser/generator package, and uses Jackson Annotations for
9612 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
9614 (define-public java-fasterxml-jackson-modules-base-jaxb
9616 (name "java-fasterxml-jackson-modules-base-jaxb")
9620 (uri (string-append "https://github.com/FasterXML/"
9621 "jackson-modules-base/archive/"
9622 "jackson-modules-base-" version ".tar.gz"))
9625 "1wws95xi8sppp6b0k2vvjdjyynl20r1a4dwrhai08lzlria6blp5"))))
9626 (build-system ant-build-system)
9628 `(#:jar-name "jackson-modules-base-jaxb.jar"
9629 #:source-dir "jaxb/src/main/java"
9630 #:test-dir "jaxb/src/test"
9632 ;; Base class for tests
9633 (list "**/BaseJaxbTest.java")
9635 (modify-phases %standard-phases
9636 (add-before 'configure 'generate-PackageVersion.java
9638 (let* ((out (string-append "jaxb/src/main/java/com/fasterxml/"
9639 "jackson/module/jaxb/PackageVersion.java"))
9640 (in (string-append out ".in")))
9643 (("@package@") "com.fasterxml.jackson.module.jaxb")
9644 (("@projectversion@") ,version)
9645 (("@projectgroupid@") "com.fasterxml.jackson.module.jaxb")
9646 (("@projectartifactid@") "jackson-module-jaxb")))
9648 (add-before 'build 'copy-resources
9650 (copy-recursively "jaxb/src/main/resources" "build/classes")
9653 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
9654 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
9655 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)))
9657 `(("java-junit" ,java-junit)))
9658 (home-page "https://github.com/FasterXML/jackson-modules-base")
9659 (synopsis "Jaxb annotations jackson module")
9660 (description "This package is the jaxb annotations module for jackson.")
9661 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
9663 (define-public java-fasterxml-jackson-modules-base-mrbean
9665 (name "java-fasterxml-jackson-modules-base-mrbean")
9669 (uri (string-append "https://github.com/FasterXML/"
9670 "jackson-modules-base/archive/"
9671 "jackson-modules-base-" version ".tar.gz"))
9674 "1wws95xi8sppp6b0k2vvjdjyynl20r1a4dwrhai08lzlria6blp5"))))
9675 (build-system ant-build-system)
9677 `(#:jar-name "jackson-modules-base-mrbean.jar"
9678 #:source-dir "mrbean/src/main/java"
9679 #:test-dir "mrbean/src/test"
9681 ;; Base class for tests
9682 (list "**/BaseTest.java")
9684 (modify-phases %standard-phases
9685 (add-before 'configure 'generate-PackageVersion.java
9687 (let* ((out (string-append "mrbean/src/main/java/com/fasterxml/"
9688 "jackson/module/mrbean/PackageVersion.java"))
9689 (in (string-append out ".in")))
9692 (("@package@") "com.fasterxml.jackson.module.mrbean")
9693 (("@projectversion@") ,version)
9694 (("@projectgroupid@") "com.fasterxml.jackson.module.mrbean")
9695 (("@projectartifactid@") "jackson-module-mrbean")))
9698 `(("java-asm" ,java-asm)
9699 ("java-fasterxml-jackson-annotations"
9700 ,java-fasterxml-jackson-annotations)
9701 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
9702 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)))
9704 `(("java-junit" ,java-junit)))
9705 (home-page "https://github.com/FasterXML/jackson-modules-base")
9706 (synopsis "POJO type materialization for Java")
9707 (description "This package implements POJO type materialization.
9708 Databinders can construct implementation classes for Java interfaces as part
9709 of deserialization.")
9710 (license license:asl2.0)))
9712 (define-public java-snakeyaml
9714 (name "java-snakeyaml")
9718 (uri (string-append "https://bitbucket.org/asomov/snakeyaml/get/v"
9720 (file-name (string-append name "-" version ".tar.gz"))
9723 "0474cqcv46zgv9bhms2vgawakq1vyj0hp3h3f1bfys46msia90bh"))))
9724 (build-system ant-build-system)
9726 `(#:jar-name "java-snakeyaml.jar"
9727 #:source-dir "src/main/java"
9728 ;; Tests require velocity, a cyclic dependency, and
9729 ;; java-spring-framework-context which is not packaged.
9731 (home-page "https://bitbucket.org/asomov/snakeyaml")
9732 (synopsis "YAML processor")
9733 (description "SnakeYAML is a YAML processor for the Java Virtual Machine.")
9734 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
9736 (define-public java-fasterxml-jackson-dataformat-yaml
9738 (name "java-fasterxml-jackson-dataformat-yaml")
9742 (uri (string-append "https://github.com/FasterXML/"
9743 "jackson-dataformats-text/archive/"
9744 "jackson-dataformats-text-" version ".tar.gz"))
9747 "1hikl06khaxbg439avf442qifcadap8w0lx13f0nnhp2vh3dkbz7"))))
9748 (build-system ant-build-system)
9750 `(#:jar-name "jackson-dataformat-yaml.jar"
9751 #:source-dir "yaml/src/main/java"
9752 #:test-dir "yaml/src/test"
9753 #:test-exclude (list "**/failing/**.java")
9755 (modify-phases %standard-phases
9756 (add-before 'configure 'generate-PackageVersion.java
9758 (let* ((out "yaml/src/main/java/com/fasterxml/jackson/dataformat/yaml/PackageVersion.java")
9759 (in (string-append out ".in")))
9762 (("@package@") "com.fasterxml.jackson.dataformat.yaml")
9763 (("@projectversion@") ,version)
9764 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.yaml")
9765 (("@projectartifactid@") "jackson-dataformat-yaml")))
9768 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
9769 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
9770 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)
9771 ("java-snakeyaml" ,java-snakeyaml)))
9773 `(("junit" ,java-junit)
9774 ("hamcrest" ,java-hamcrest-core)
9775 ("java-ops4j-pax-exam-core-spi" ,java-ops4j-pax-exam-core-spi)
9776 ("java-ops4j-pax-exam-core-junit" ,java-ops4j-pax-exam-core-junit)
9777 ("java-ops4j-pax-exam" ,java-ops4j-pax-exam-core)))
9778 (home-page "https://github.com/FasterXML/jackson-dataformats-text")
9779 (synopsis "Yaml backend for Jackson")
9780 (description "Dataformat backends are used to support format alternatives
9781 to JSON, supported by default. This is done by sub-classing Jackson core
9783 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
9785 (define-public java-stax2-api
9787 (name "java-stax2-api")
9791 (uri (string-append "https://github.com/FasterXML/stax2-api/archive/"
9792 "stax2-api-" version ".tar.gz"))
9795 "1amc1si0l0hyyw2sawmnzy4hkna3z6fp195y4nm5m9wb9ld5awkq"))))
9796 (build-system ant-build-system)
9798 `(#:jar-name "java-stax2-api.jar"
9799 #:source-dir "src/main/java"
9800 #:tests? #f)); no tests
9801 (home-page "https://github.com/FasterXML/stax2-api")
9802 (synopsis "Stax2 API")
9803 (description "Stax2 API is an extension to basic Stax 1.0 API that adds
9804 significant new functionalities, such as full-featured bi-direction validation
9805 interface and high-performance Typed Access API.")
9806 (license license:bsd-2)))
9808 (define-public java-woodstox-core
9810 (name "java-woodstox-core")
9814 (uri (string-append "https://github.com/FasterXML/woodstox/archive/"
9815 "woodstox-core-" version ".tar.gz"))
9818 "1i7pdgb8jbw6gdy5kmm0l6rz109n2ns92pqalpyp24vb8vlvdfd4"))))
9819 (build-system ant-build-system)
9821 `(#:jar-name "woodstox.jar"
9823 (list "**/Base*.java" "failing/**")
9825 (modify-phases %standard-phases
9826 (add-before 'build 'remove-msv-dep
9828 ;; we don't need osgi, and it depends on msv
9829 (delete-file-recursively "src/main/java/com/ctc/wstx/osgi")
9830 ;; msv's latest release is from 2011 and we don't need it
9831 (delete-file-recursively "src/main/java/com/ctc/wstx/msv")
9832 (delete-file-recursively "src/test/java/wstxtest/osgi")
9833 (delete-file-recursively "src/test/java/wstxtest/msv")
9835 (add-before 'build 'copy-resources
9837 (copy-recursively "src/main/resources" "build/classes")
9840 `(("stax2" ,java-stax2-api)))
9842 `(("junit" ,java-junit)))
9843 (home-page "https://github.com/FasterXML/woodstox")
9844 (synopsis "Stax XML API implementation")
9845 (description "Woodstox is a stax XML API implementation.")
9846 (license license:asl2.0)))
9848 (define-public java-fasterxml-jackson-dataformat-xml
9850 (name "java-fasterxml-jackson-dataformat-xml")
9854 (uri (string-append "https://github.com/FasterXML/"
9855 "jackson-dataformat-xml/archive/"
9856 "jackson-dataformat-xml-" version ".tar.gz"))
9859 "111fkkl90w31jbf30kgj82qdcxlw4sxppki7i198liw0ck1jcavq"))))
9860 (build-system ant-build-system)
9862 `(#:jar-name "jackson-dataformat-xml.jar"
9863 #:source-dir "src/main/java"
9865 (list "**/failing/**")
9867 (modify-phases %standard-phases
9868 (add-before 'configure 'generate-PackageVersion.java
9870 (let* ((out "src/main/java/com/fasterxml/jackson/dataformat/xml/PackageVersion.java")
9871 (in (string-append out ".in")))
9875 (("@package@") "com.fasterxml.jackson.dataformat.xml")
9876 (("@projectversion@") ,version)
9877 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.xml")
9878 (("@projectartifactid@") "jackson-dataformat-xml")))
9880 (add-before 'build 'copy-resources
9882 (copy-recursively "src/main/resources" "build/classes")
9885 `(("jackson-annotations" ,java-fasterxml-jackson-annotations)
9886 ("jackson-core" ,java-fasterxml-jackson-core)
9887 ("jackson-modules-base-jaxb" ,java-fasterxml-jackson-modules-base-jaxb)
9888 ("jackson-databind" ,java-fasterxml-jackson-databind)
9889 ("stax2-api" ,java-stax2-api)
9890 ("woodstox" ,java-woodstox-core)))
9892 `(("junit" ,java-junit)
9893 ("hamcrest" ,java-hamcrest-core)))
9894 (home-page "https://github.com/FasterXML/jackson-dataformat-xml")
9895 (synopsis "Read and write XML")
9896 (description "This package contains Jackson extension component for reading
9897 and writing XML encoded data.
9899 Further, the goal is to emulate how JAXB data-binding works with \"Code-first\"
9900 approach (that is, no support is added for \"Schema-first\" approach). Support
9901 for JAXB annotations is provided by JAXB annotation module; this module
9902 provides low-level abstractions (@code{JsonParser}, @code{JsonGenerator},
9903 @code{JsonFactory}) as well as small number of higher level overrides needed to
9904 make data-binding work.")
9905 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
9907 (define-public java-hdrhistogram
9909 (name "java-hdrhistogram")
9914 (url "https://github.com/HdrHistogram/HdrHistogram")
9915 (commit (string-append "HdrHistogram-" version))))
9916 (file-name (git-file-name name version))
9919 "1cw8aa1vk258k42xs6wpy72m4gbai540jq032qsa7c5586iawx2d"))))
9920 (build-system ant-build-system)
9922 `(#:jar-name "java-hdrhistogram.jar"
9923 #:source-dir "src/main/java"
9925 (modify-phases %standard-phases
9926 (add-after 'unpack 'make-files-writable
9928 (for-each make-file-writable (find-files "."))
9930 (add-before 'configure 'set-version
9932 (let* ((version-java "src/main/java/org/HdrHistogram/Version.java")
9933 (template (string-append version-java ".template")))
9934 (copy-file template version-java)
9935 (substitute* version-java
9936 (("\\$VERSION\\$") ,version)
9937 (("\\$BUILD_TIME\\$") "0"))
9940 `(("junit" ,java-junit)
9941 ("hamcrest" ,java-hamcrest-core)))
9942 (home-page "https://hdrhistogram.github.io/HdrHistogram")
9943 (synopsis "High dynamic range histogram")
9944 (description "Hdrhistogram creates histograms that support
9945 recording and analyzing sampled data value counts across a configurable integer
9946 value range with configurable value precision within the range. Value precision
9947 is expressed as the number of significant digits in the value recording, and
9948 provides control over value quantization behavior across the value range and
9949 the subsequent value resolution at any given level.")
9950 (license license:public-domain)))
9952 (define-public java-cofoja
9954 (name "java-cofoja")
9959 (url "https://github.com/nhatminhle/cofoja")
9960 (commit (string-append "v" version))))
9961 (file-name (string-append "java-cofoja-" version "-checkout"))
9964 "0p7sz8y5xgpi5rx1qwn6587fkd52qr3ha3ybh14gqcyxhikl525w"))))
9965 (build-system ant-build-system)
9967 `(#:build-target "dist"
9968 #:test-target "test"
9971 (list "-Ddist.dir=dist")
9972 #:modules ((guix build ant-build-system)
9973 (guix build java-utils)
9978 (modify-phases %standard-phases
9979 ;; The bulid system ignores the class path the ant-build-system sets
9980 ;; up and instead expects to find all dependencies in the "lib"
9982 (add-after 'unpack 'create-libdir
9983 (lambda* (#:key inputs #:allow-other-keys)
9987 (let ((target (string-append "lib/" (basename file))))
9988 (unless (file-exists? target)
9989 (symlink file target))))
9990 (append-map (match-lambda
9992 (find-files dir "\\.jar$")))
9995 (replace 'install (install-jars "dist")))))
9997 `(("java-asm" ,java-asm)))
9999 `(("java-junit" ,java-junit)))
10000 (home-page "https://github.com/nhatminhle/cofoja")
10001 (synopsis "Contracts for Java")
10002 (description "Contracts for Java, or Cofoja for short, is a contract
10003 programming framework and test tool for Java, which uses annotation processing
10004 and bytecode instrumentation to provide run-time checking. (In particular,
10005 this is not a static analysis tool.)")
10006 (license license:lgpl3+)))
10008 (define-public java-aopalliance
10010 (name "java-aopalliance")
10014 ;; Note: this git repository is not official, but contains the
10015 ;; source code that is in the CVS repository. Downloading the
10016 ;; tarball from sourceforge is undeterministic, and the cvs download
10018 (uri (git-reference
10019 (url "https://github.com/hoverruan/aopalliance")
10020 (commit "0d7757ae204e5876f69431421fe9bc2a4f01e8a0")))
10021 (file-name (string-append name "-" version))
10024 "0rsg2b0v3hxlq2yk1i3m2gw3xwq689j3cwx9wbxvqfpdcjbca0qr"))))
10025 (build-system ant-build-system)
10027 `(#:jar-name "java-aopalliance.jar"
10029 #:tests? #f; no tests
10030 #:source-dir "aopalliance/src/main"
10031 #:modules ((guix build ant-build-system)
10033 (guix build maven pom)
10034 (guix build java-utils)
10037 (modify-phases %standard-phases
10038 (add-before 'install 'create-pom
10040 (with-output-to-file "pom.xml"
10044 (modelVersion "4.0.0")
10045 (name "aopalliance")
10046 (groupId "aopalliance")
10047 (artifactId "aopalliance")
10048 (version "1.0"))))))
10051 (install-from-pom "pom.xml")))))
10052 (home-page "http://aopalliance.sourceforge.net")
10053 (synopsis "Aspect-Oriented Programming")
10054 (description "The AOP Alliance project is a joint project between several
10055 software engineering people who are interested in Aspect-Oriented Programming
10057 (license license:public-domain)))
10059 (define-public java-javax-inject
10061 (name "java-javax-inject")
10065 (uri (git-reference
10066 (url "https://github.com/javax-inject/javax-inject")
10068 (file-name (git-file-name name version))
10071 "1rspl0nkvk1jif6nccikw93xic6ljj2b6kpy2mffwi2mnvc13j7x"))))
10072 (build-system ant-build-system)
10074 `(#:jar-name "java-javax-inject.jar"
10075 #:tests? #f; no tests
10077 (modify-phases %standard-phases
10079 (install-from-pom "pom.xml")))))
10080 (home-page "https://github.com/javax-inject/javax-inject")
10081 (synopsis "JSR-330: Dependency Injection for Java")
10082 (description "This package specifies a means for obtaining objects in such
10083 a way as to maximize reusability, testability and maintainability compared to
10084 traditional approaches such as constructors, factories, and service locators
10085 (e.g., JNDI). This process, known as dependency injection, is beneficial to
10086 most nontrivial applications.
10088 Many types depend on other types. For example, a @var{Stopwatch} might depend
10089 on a @var{TimeSource}. The types on which a type depends are known as its
10090 dependencies. The process of finding an instance of a dependency to use at run
10091 time is known as resolving the dependency. If no such instance can be found,
10092 the dependency is said to be unsatisfied, and the application is broken.")
10093 (license license:asl2.0)))
10095 (define-public java-guice
10097 (name "java-guice")
10101 (uri (git-reference
10102 (url "https://github.com/google/guice")
10104 (file-name (git-file-name name version))
10105 (modules '((guix build utils)))
10108 (for-each delete-file (find-files "." ".*.jar")) #t))
10111 "18im5hdfl4q1b9chww2s1ii60sn3ydyyar32a2sf2p2g8zlbdswq"))))
10112 (build-system ant-build-system)
10114 `(#:jar-name "java-guice.jar"
10116 #:tests? #f; FIXME: tests are not in a java sub directory
10117 #:source-dir "core/src"
10119 (modify-phases %standard-phases
10120 (add-after 'unpack 'make-files-writable
10122 (for-each make-file-writable (find-files "."))
10125 (install-from-pom "core/pom.xml")))))
10127 `(("java-aopalliance" ,java-aopalliance)
10128 ("java-asm" ,java-asm)
10129 ("java-cglib" ,java-cglib)
10130 ("java-guava" ,java-guava)
10131 ("java-javax-inject" ,java-javax-inject)
10132 ("java-guice-parent-pom" ,java-guice-parent-pom)))
10133 (home-page "https://github.com/google/guice")
10134 (synopsis "Lightweight dependency injection framework")
10135 (description "Guice is a lightweight dependency injection framework for
10136 Java 6 and above.")
10137 (license license:asl2.0)))
10139 (define-public java-guice-servlet
10141 (inherit java-guice)
10142 (name "java-guice-servlet")
10144 `(#:jar-name "guice-servlet.jar"
10145 #:source-dir "extensions/servlet/src/"
10147 #:tests? #f ; FIXME: not in a java subdir
10149 (modify-phases %standard-phases
10150 (add-after 'unpack 'make-files-writable
10152 (for-each make-file-writable (find-files "."))
10155 `(("guice" ,java-guice)
10156 ("servlet" ,java-classpathx-servletapi)
10157 ,@(package-inputs java-guice)))))
10159 (define java-guice-parent-pom
10161 (inherit java-guice)
10162 (name "java-guice-parent-pom")
10166 (modify-phases %standard-phases
10167 (delete 'configure)
10169 (add-after 'install 'install-extensions
10170 (install-pom-file "extensions/pom.xml"))
10172 (install-pom-file "pom.xml")))))
10174 `(("java-google-parent-pom" ,java-google-parent-pom-5)))))
10176 (define java-google-parent-pom-5
10178 (name "java-google-parent-pom")
10182 (uri (git-reference
10183 (url "https://github.com/google/google-maven-parents")
10184 (commit (string-append "google-" version))))
10185 (file-name (git-file-name name version))
10188 "0zb7hx24p8k8rfdvix2vsbfqn73jhrycdndvhf8j5gbii9wbqibv"))))
10189 (build-system ant-build-system)
10193 (modify-phases %standard-phases
10194 (delete 'configure)
10197 (install-pom-file "pom.xml")))))
10198 (home-page "https://github.com/google/google-maven-parents")
10199 (synopsis "Google parent pom")
10200 (description "This package contains the Maven parent POM for other Google
10202 (license license:asl2.0)))
10204 (define-public java-assertj
10206 (name "java-assertj")
10210 (uri (git-reference
10211 (url "https://github.com/joel-costigliola/assertj-core")
10212 (commit (string-append "assertj-core-" version))))
10213 (file-name (git-file-name name version))
10216 "1k35cg2in7pzk4pbdjryr0pll5lgk1r6ngrn0j8cdlgi7w8zh2d1"))))
10217 (build-system ant-build-system)
10219 `(#:jar-name "java-assertj.jar"
10221 #:source-dir "src/main/java"
10222 #:tests? #f)); depends on tng-junit which depends on assertj
10224 `(("cglib" ,java-cglib)
10225 ("junit" ,java-junit)
10226 ("hamcrest" ,java-hamcrest-core)))
10228 `(("mockito" ,java-mockito-1)))
10229 (home-page "https://joel-costigliola.github.io/assertj/index.html")
10230 (synopsis "Fluent assertions for java")
10231 (description "AssertJ core is a Java library that provides a fluent
10232 interface for writing assertions. Its main goal is to improve test code
10233 readability and make maintenance of tests easier.")
10234 (license license:asl2.0)))
10236 (define-public java-jboss-javassist
10238 (name "java-jboss-javassist")
10242 (uri (git-reference
10243 (url "https://github.com/jboss-javassist/javassist")
10245 (string-append "rel_"
10247 (lambda (x) (if (eq? x #\.) #\_ x)) version)
10249 (file-name (git-file-name name version))
10252 "0h3zlcyqiaq01fspm69h7vki67raw305w89p4ha8vlhpzw02qifm"))
10253 (modules '((guix build utils)))
10256 (delete-file "javassist.jar")))))
10257 (build-system ant-build-system)
10259 `(#:jar-name "java-jboss-javassist.jar"
10261 #:source-dir "src/main"
10262 #:tests? #f; FIXME: requires junit-awtui and junit-swingui from junit3
10264 (modify-phases %standard-phases
10265 (add-after 'unpack 'make-files-writable
10267 (for-each make-file-writable (find-files "."))
10270 `(("junit" ,java-junit)))
10271 (home-page "https://github.com/jboss-javassist/javassist")
10272 (synopsis "Java bytecode engineering toolkit")
10273 (description "Javassist (JAVA programming ASSISTant) makes Java bytecode
10274 manipulation simple. It is a class library for editing bytecodes in Java; it
10275 enables Java programs to define a new class at runtime and to modify a class
10276 file when the JVM loads it.")
10277 (license (list license:gpl2 license:cddl1.0)))); either gpl2 only or cddl.
10279 (define-public java-jcommander
10281 (name "java-jcommander")
10285 (uri (git-reference
10286 (url "https://github.com/cbeust/jcommander")
10288 (file-name (git-file-name name version))
10291 "12vcpc19sd7jhvjgp7xz1qjanfix162xb3x2q5zah93rjklj1h57"))))
10292 (build-system ant-build-system)
10294 `(#:jar-name "java-jcommander.jar"
10296 #:tests? #f; requires testng which depends on jcommander
10297 #:source-dir "src/main/java"))
10298 (home-page "https://jcommander.org")
10299 (synopsis "Command line parameters parser")
10300 (description "JCommander is a very small Java framework that makes it
10301 trivial to parse command line parameters. Parameters are declared with
10303 (license license:asl2.0)))
10305 (define-public java-bsh
10311 (uri (git-reference
10312 (url "https://github.com/beanshell/beanshell")
10314 (file-name (git-file-name name version))
10317 "0kz3f0xjack6c9syssi4qjw1rbd3q5963sk5pmr143hiibxa9csw"))
10318 (modules '((guix build utils)))
10321 ;; Delete bundled third-party jar archives.
10322 (for-each delete-file (find-files "." ".*.jar$"))
10323 (for-each (lambda (file) (chmod file #o644))
10324 (find-files "." "."))
10326 (build-system ant-build-system)
10328 `(#:build-target "jarall"
10329 #:test-target "junit-tests-all"
10330 #:make-flags (list "-DDATE" "(no date for reproducibility)")
10332 (modify-phases %standard-phases
10333 (add-before 'install 'fix-pom
10335 (substitute* "pom.xml"
10336 (("org.apache-extras.beanshell") "org.beanshell"))
10339 (install-from-pom "pom.xml")))))
10341 `(("java-classpathx-servletapi" ,java-classpathx-servletapi)
10342 ("java-commons-bsf" ,java-commons-bsf)))
10344 `(("java-junit" ,java-junit)
10345 ("javacc" ,javacc-3)))
10346 (home-page "http://beanshell.org/")
10347 (synopsis "Lightweight Scripting for Java")
10348 (description "BeanShell is a small, free, embeddable Java source
10349 interpreter with object scripting language features, written in Java.
10350 BeanShell dynamically executes standard Java syntax and extends it with common
10351 scripting conveniences such as loose types, commands, and method closures like
10352 those in Perl and JavaScript.")
10353 (license license:asl2.0)))
10355 (define-public java-fest-util
10357 (name "java-fest-util")
10361 (uri (git-reference
10362 (url "https://github.com/alexruiz/fest-util/")
10363 (commit (string-append "fest-util-" version))))
10364 (file-name (git-file-name name version))
10367 "02kgal7v85snyyvcsxvn4qphid455f4smh2wri1il8d9asw0djbz"))))
10368 (build-system ant-build-system)
10370 `(#:jar-name "java-fest-util.jar"
10371 #:source-dir "src/main/java"))
10373 `(("junit" ,java-junit)
10374 ("hamcrest" ,java-hamcrest-core)))
10375 (home-page "https://github.com/alexruiz/fest-util")
10376 (synopsis "FEST common utilities")
10377 (description "Common utilities used in all FEST module.")
10378 (license license:asl2.0)))
10380 (define-public java-fest-test
10382 (name "java-fest-test")
10386 (uri (git-reference
10387 (url "https://github.com/alexruiz/fest-test/")
10388 (commit (string-append "fest-test-" version))))
10389 (file-name (git-file-name name version))
10392 "0mg1d2jfh7kbx2c40dchbjr6d8pv59snsyb13mfxsr7xk5n69qbn"))))
10393 (build-system ant-build-system)
10395 `(#:jar-name "java-fest-test.jar"
10396 #:source-dir "src/main/java"
10397 #:tests? #f)); no tests
10399 `(("junit" ,java-junit)))
10400 (home-page "https://github.com/alexruiz/fest-test")
10401 (synopsis "Common FEST testing infrastructure")
10402 (description "Fest-test contains the common FEST testing infrastructure.")
10403 (license license:asl2.0)))
10405 (define-public java-fest-assert
10407 (name "java-fest-assert")
10411 (uri (git-reference
10412 (url "https://github.com/alexruiz/fest-assert-2.x/")
10413 (commit (string-append "fest-assert-core-" version))))
10414 (file-name (git-file-name name version))
10417 "1cp8zzyag3s85fz2w68sda9zzaal1y5f9wl8g72wkm12an40w6by"))))
10418 (build-system ant-build-system)
10420 `(#:jar-name "java-fest-assert.jar"
10421 #:source-dir "src/main/java"
10424 "**/Abstract*.java"
10425 "**/*BaseTest.java"
10426 ;; Unable to set MockitoNamingPolicy on cglib generator which creates FastClasses
10427 "**/MessageFormatter_format_Test.java"
10428 "**/internal/*/*_assert*_Test.java")))
10430 `(("java-fest-util" ,java-fest-util)))
10432 `(("java-junit" ,java-junit)
10433 ("java-fest-test" ,java-fest-test)
10434 ("java-hamcrest-core" ,java-hamcrest-core)
10435 ("java-mockito" ,java-mockito-1)
10436 ("java-cglib" ,java-cglib)
10437 ("java-objenesis" ,java-objenesis)
10438 ("java-asm" ,java-asm)))
10439 (home-page "https://github.com/alexruiz/fest-assert-2.x")
10440 (synopsis "FEST fluent assertions")
10441 (description "FEST-Assert provides a fluent interface for assertions.")
10442 (license license:asl2.0)))
10444 (define-public java-testng
10446 (name "java-testng")
10450 (uri (git-reference
10451 (url "https://github.com/cbeust/testng")
10453 (file-name (string-append name "-" version "-checkout"))
10456 "0y6vq30i5g276kw0v2bhbvci22ijg7ax49ap2611yqlhbs4d6dqv"))))
10457 (build-system ant-build-system)
10459 `(#:jdk ,icedtea-8; java.util.function
10460 #:jar-name "java-testng.jar"
10461 #:source-dir "src/main/java"
10463 (modify-phases %standard-phases
10464 ;; FIXME: I don't know why these tests fail
10465 (add-after 'unpack 'delete-failing-tests
10467 (substitute* "src/test/resources/testng.xml"
10468 (("<class name=\"test.configuration.github1625.TestRunnerIssue1625\"/>") "")
10469 (("<class name=\"test.serviceloader.ServiceLoaderTest\" />") ""))
10471 ;; We don't have groovy
10472 (add-after 'unpack 'delete-groovy-tests
10474 (delete-file-recursively "src/test/java/test/dependent/issue1648/")
10475 (substitute* "src/test/resources/testng.xml"
10476 (("<class name=\"test.dependent.issue1648.TestRunner\"/>") ""))
10478 (add-before 'build 'copy-resources
10480 (copy-recursively "src/main/resources" "build/classes")
10482 (add-before 'check 'copy-test-resources
10484 (copy-recursively "src/test/resources" "build/test-classes")
10488 (invoke "ant" "compile-tests")
10489 ;; we don't have groovy
10490 (substitute* "src/test/resources/testng.xml"
10491 (("<class name=\"test.groovy.GroovyTest\" />") ""))
10492 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
10494 ":build/test-classes")
10495 "-Dtest.resources.dir=src/test/resources"
10496 "org.testng.TestNG" "src/test/resources/testng.xml"))))))
10498 `(("junit" ,java-junit)
10499 ("java-jsr305" ,java-jsr305)
10500 ("java-bsh" ,java-bsh)
10501 ("java-jcommander" ,java-jcommander)
10502 ("java-guice" ,java-guice)
10503 ("snakeyaml" ,java-snakeyaml)))
10505 `(("guava" ,java-guava)
10506 ("java-javax-inject" ,java-javax-inject)
10507 ("java-hamcrest" ,java-hamcrest-all)
10508 ("java-assertj" ,java-assertj)
10509 ("java-mockito" ,java-mockito-1)
10510 ("cglib" ,java-cglib)
10512 ("aopalliance" ,java-aopalliance)))
10513 (home-page "https://testng.org")
10514 (synopsis "Testing framework")
10515 (description "TestNG is a testing framework inspired from JUnit and NUnit
10516 but introducing some new functionalities that make it more powerful and easier
10518 (license license:asl2.0)))
10520 (define-public java-jnacl
10521 (let ((commit "094e819afdd63ea81a499b3bcb42a271006bebd9")
10524 (name "java-jnacl")
10525 (version (string-append "0.1.0-" revision "." (string-take commit 7)))
10528 (uri (git-reference
10529 (url "https://github.com/neilalexander/jnacl")
10531 (file-name (git-file-name name version))
10534 "1d6g6xhn83byv5943n7935wwjsk0ibk0qdvqgr699qqgqqmwisbb"))))
10535 (build-system ant-build-system)
10537 `(#:jar-name "jnacl.jar"
10538 #:source-dir "src/main/java"
10541 (modify-phases %standard-phases
10542 (add-before 'build 'fix-tests
10544 (substitute* '("src/test/java/com/neilalexander/jnacl/NaClTest.java"
10545 "src/test/java/com/neilalexander/jnacl/NaclSecretBoxTest.java")
10546 (("assertions.Assertions") "assertions.api.Assertions"))
10550 (invoke "ant" "compile-tests")
10551 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
10553 ":build/test-classes")
10554 "org.testng.TestNG" "-testclass"
10555 "build/test-classes/com/neilalexander/jnacl/NaclSecretBoxTest.class")
10556 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
10558 ":build/test-classes")
10559 "org.testng.TestNG" "-testclass"
10560 "build/test-classes/com/neilalexander/jnacl/NaClTest.class"))))))
10562 `(("java-testng" ,java-testng)
10563 ("java-fest-util" ,java-fest-util)
10564 ("java-fest-assert" ,java-fest-assert)))
10565 (home-page "https://github.com/neilalexander/jnacl")
10566 (synopsis "Java implementation of NaCl")
10567 (description "Pure Java implementation of the NaCl: Networking and
10568 Cryptography library.")
10569 (license license:bsd-2))))
10571 (define-public java-mvel2
10573 (name "java-mvel2")
10577 (uri (string-append "https://github.com/mvel/mvel/archive/mvel2-"
10578 version ".Final.tar.gz"))
10581 "01ph5s9gm16l2qz58lg21w6fna7xmmrj7f9bzqr1jim7h9557d3z"))))
10582 (build-system ant-build-system)
10584 `(#:jar-name "mvel2.jar"
10585 #:source-dir "src/main/java"
10587 (list "**/Abstract*.java"
10588 ;; Base class with no tests
10589 "**/MVELThreadTest.java")
10591 (modify-phases %standard-phases
10592 (add-after 'install 'install-bin
10593 (lambda* (#:key outputs #:allow-other-keys)
10594 (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
10596 (with-output-to-file (string-append bin "/mvel2")
10600 "#!" (which "bash") "\n"
10601 "if [ \"$#\" -ne \"2\" ]; then\n"
10602 "echo 'Usage: mvel2 <script> <out.dir>'\n"
10605 "java -Dout.dir=$2 -cp " (getenv "CLASSPATH")
10606 ":" (assoc-ref outputs "out") "/share/java/mvel2.jar"
10607 " org.mvel2.sh.Main $1"))))
10608 (chmod (string-append bin "/mvel2") #o755))
10611 `(("junit" ,java-junit)
10612 ("hamcrest" ,java-hamcrest-core)))
10613 (home-page "https://github.com/mvel/mvel")
10614 (synopsis "MVFLEX Expression Language")
10615 (description "MVEL has largely been inspired by Java syntax, but has some
10616 fundamental differences aimed at making it more efficient as an expression
10617 language, such as operators that directly support collection, array and string
10618 matching, as well as regular expressions. MVEL is used to evaluate expressions
10619 written using Java syntax.
10621 In addition to the expression language, MVEL serves as a templating language for
10622 configuration and string construction.")
10623 (license license:asl2.0)))
10625 (define-public java-commons-jexl-2
10627 (name "java-commons-jexl")
10631 (uri (string-append "mirror://apache/commons/jexl/source/"
10632 "commons-jexl-" version "-src.tar.gz"))
10635 "1ai7632bwwaxglb0nbpblpr2jw5g20afrsaq372ipkphi3ncy1jz"))))
10636 (build-system ant-build-system)
10638 `(#:jar-name "commons-jexl-2.jar"
10640 #:source-dir "src/main/java"
10642 (modify-phases %standard-phases
10643 (add-before 'check 'disable-broken-tests
10644 (lambda* (#:key inputs #:allow-other-keys)
10645 (with-directory-excursion "src/test/java/org/apache/commons/jexl2/"
10646 (substitute* "ArithmeticTest.java"
10647 (("asserter.assertExpression\\(\"3 / 0\"") "//")
10648 (("asserter.assertExpression\\(\"imanull") "//"))
10649 ;; This test fails with "ambiguous method invocation"
10650 (delete-file "CacheTest.java")
10651 ;; This test doesn't have access to the temp directory
10652 (substitute* "ClassCreatorTest.java"
10653 (("java.io.tmpdir") "user.dir"))
10654 ;; This test fails in trying to detect whether it can run.
10655 (substitute* "ClassCreator.java"
10656 (("boolean canRun =.*") "boolean canRun = false;\n"))
10657 ;; ...and these tests depend on it.
10658 (delete-file "scripting/JexlScriptEngineOptionalTest.java")
10659 (delete-file "scripting/JexlScriptEngineTest.java"))
10661 (add-before 'build 'run-javacc
10663 (with-directory-excursion "src/main/java/org/apache/commons/jexl2/parser/"
10664 (invoke "java" "jjtree" "Parser.jjt")
10665 (invoke "java" "javacc" "Parser.jj"))
10668 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)))
10670 `(("java-junit" ,java-junit)
10671 ("java-hamcrest-core" ,java-hamcrest-core)
10672 ("javacc" ,javacc-4)))
10673 (home-page "https://commons.apache.org/proper/commons-jexl/")
10674 (synopsis "Java Expression Language ")
10675 (description "JEXL is a library intended to facilitate the implementation
10676 of dynamic and scripting features in applications and frameworks written in
10677 Java. JEXL implements an Expression Language based on some extensions to the
10678 JSTL Expression Language supporting most of the constructs seen in
10679 shell-script or ECMAScript. Its goal is to expose scripting features usable
10680 by technical operatives or consultants working with enterprise platforms.")
10681 (license license:asl2.0)))
10683 (define-public java-lz4
10689 (uri (git-reference
10690 (url "https://github.com/lz4/lz4-java")
10692 (file-name (git-file-name name version))
10695 "0ydjakhv3cz34mfvv14qrh2ksdxifgjwwagjy7r46qr3f68hnf6y"))))
10696 (build-system ant-build-system)
10698 `(#:jar-name "lz4.jar"
10700 #:source-dir "src/java:src/java-unsafe"
10701 #:tests? #f; FIXME: requires more dependencies
10703 (modify-phases %standard-phases
10704 (add-after 'unpack 'make-files-writable
10706 (for-each make-file-writable (find-files "."))
10708 (add-before 'configure 'generate-source
10710 (with-directory-excursion "src/build/source_templates"
10711 (invoke "mvel2" "../gen_sources.mvel" "../../java"))
10714 `(("mvel" ,java-mvel2)))
10715 (home-page "https://jpountz.github.io/lz4-java")
10716 (synopsis "Compression algorithm")
10717 (description "LZ4 - Java is a Java port of the popular lz4 compression
10718 algorithms and xxHash hashing algorithm.")
10719 (license license:asl2.0)))
10721 (define-public java-bouncycastle
10723 (name "java-bouncycastle")
10727 (uri (git-reference
10728 (url "http://git.bouncycastle.org/repositories/bc-java")
10729 ;(url "https://github.com/bcgit/bc-java")
10730 (commit (string-append "r1rv" (substring version 2 4)))))
10731 (file-name (git-file-name name version))
10734 "1m921a1ac2dl797ffzg3d4j97ch308f25spb4jgsj3npfmmys5gb"))
10735 (modules '((guix build utils)))
10738 (for-each delete-file
10739 (find-files "." "\\.jar$"))
10741 (build-system ant-build-system)
10746 (modify-phases %standard-phases
10749 (invoke "ant" "-f" "ant/jdk15+.xml" "build-provider")
10750 (invoke "ant" "-f" "ant/jdk15+.xml" "build")))
10751 ;; FIXME: the tests freeze.
10754 ;; (invoke "ant" "-f" "ant/jdk15+.xml" "test")))
10756 (install-jars "build/artifacts/jdk1.5/jars")))))
10758 `(("java-javax-mail" ,java-javax-mail)))
10761 ("junit" ,java-junit)
10762 ("java-native-access" ,java-native-access)
10763 ("java-native-access-platform" ,java-native-access-platform)))
10764 (home-page "https://www.bouncycastle.org")
10765 (synopsis "Cryptographic library")
10766 (description "Bouncy Castle is a cryptographic library for the Java
10767 programming language.")
10768 (license license:expat)))
10770 (define-public java-lmax-disruptor
10772 (name "java-lmax-disruptor")
10776 (uri (string-append "https://github.com/LMAX-Exchange/disruptor/"
10777 "archive/" version ".tar.gz"))
10778 (file-name (string-append name "-" version ".tar.gz"))
10781 "17da2gwj5abnlsfgn2xqjk5lgzbg4vkb0hdv2dvc8r2fx4bi7w3g"))))
10782 (build-system ant-build-system)
10784 `(#:jar-name "java-lmax-disruptor.jar"
10786 #:tests? #f)); tests hang
10788 `(("junit" ,java-junit)
10789 ("java-hdrhistogram" ,java-hdrhistogram)
10790 ("java-jmock" ,java-jmock)
10791 ("java-jmock-legacy" ,java-jmock-legacy)
10792 ("java-jmock-junit4" ,java-jmock-junit4)
10793 ("java-hamcrest-all" ,java-hamcrest-all)))
10795 `(("cglib" ,java-cglib)
10796 ("objenesis" ,java-objenesis)
10797 ("asm" ,java-asm)))
10798 (home-page "https://www.lmax.com/disruptor")
10799 (synopsis "High performance inter-thread communication")
10800 (description "LMAX Disruptor is a software pattern and software component
10801 for high performance inter-thread communication that avoids the need for
10802 message queues or resource locking.")
10803 (license license:asl2.0)))
10805 (define-public java-commons-bcel
10807 (name "java-commons-bcel")
10811 (uri (string-append "mirror://apache/commons/bcel/source/bcel-"
10812 version "-src.tar.gz"))
10815 "0j3x1rxd673k07psclk8k13rqh0x0mf2yy5qiwkiw4z3afa568jy"))))
10816 (build-system ant-build-system)
10818 `(#:jar-name "bcel.jar"
10820 #:source-dir "src/main/java"
10821 #:test-dir "src/test/java"
10822 ;; FIXME: Tests require the unpackaged jna.
10824 (home-page "https://commons.apache.org/proper/commons-bcel/")
10825 (synopsis "Byte code engineering library")
10826 (description "The Byte Code Engineering Library (Apache Commons BCEL) is
10827 intended to give users a convenient way to analyze, create, and
10828 manipulate (binary) Java class files. Classes are represented by objects
10829 which contain all the symbolic information of the given class: methods, fields
10830 and byte code instructions, in particular.
10832 Such objects can be read from an existing file, be transformed by a
10833 program (e.g. a class loader at run-time) and written to a file again. An
10834 even more interesting application is the creation of classes from scratch at
10835 run-time. The @dfn{Byte Code Engineering Library} (BCEL) may be also useful
10836 if you want to learn about the @dfn{Java Virtual Machine} (JVM) and the format
10837 of Java @code{.class} files.")
10838 (license license:asl2.0)))
10840 (define-public java-xerial-core
10842 (name "java-xerial-core")
10846 (uri (string-append "https://github.com/xerial/xerial-java/archive/"
10847 version ".tar.gz"))
10848 (file-name (string-append name "-" version ".tar.gz"))
10851 "0d3g863i41bgalpa4xr3vm1h140l091n8iwgq5qvby5yivns9y8d"))))
10852 (build-system ant-build-system)
10854 `(#:jar-name "xerial-core.jar"
10855 #:source-dir "xerial-core/src/main/java"
10856 #:test-dir "xerial-core/src/test"
10858 (modify-phases %standard-phases
10859 (add-before 'build 'copy-resources
10861 (copy-recursively "xerial-core/src/main/resources"
10865 `(("junit" ,java-junit)
10866 ("hamcrest" ,java-hamcrest-core)))
10867 (home-page "https://github.com/xerial/xerial-java")
10868 (synopsis "Data management libraries for Java")
10869 (description "Xerial is a set of data management libraries for the Java
10870 programming language. The ultimate goal of the Xerial project is to manage
10871 everything as database, including class objects, text format data, data
10873 (license license:asl2.0)))
10875 (define-public java-powermock-reflect
10877 (name "java-powermock-reflect")
10881 (uri (string-append "https://github.com/powermock/powermock/"
10882 "archive/powermock-" version ".tar.gz"))
10883 (file-name (string-append name "-" version ".tar.gz"))
10886 "0sbgi5vqq7k72wzcdjb20s370vyd4hsbnx71pzb8ishml3gy7fwy"))
10888 (search-patches "java-powermock-fix-java-files.patch"))))
10889 (build-system ant-build-system)
10891 `(#:jar-name "java-powermock-reflect.jar"
10893 #:source-dir "powermock-reflect/src/main/java"
10894 #:test-dir "powermock-reflect/src/test"))
10896 `(("java-objenesis" ,java-objenesis)))
10898 `(("junit" ,java-junit)
10899 ("cglib" ,java-cglib)
10901 ("hamcrest" ,java-hamcrest-core)
10902 ("assertj" ,java-assertj)))
10903 (home-page "https://github.com/powermock/powermock")
10904 (synopsis "Mock library extension framework")
10905 (description "PowerMock is a framework that extends other mock libraries
10906 such as EasyMock with more powerful capabilities. PowerMock uses a custom
10907 classloader and bytecode manipulation to enable mocking of static methods,
10908 constructors, final classes and methods, private methods, removal of static
10909 initializers and more. By using a custom classloader no changes need to be
10910 done to the IDE or continuous integration servers which simplifies adoption.")
10911 (license license:asl2.0)))
10913 (define-public java-powermock-core
10915 (inherit java-powermock-reflect)
10916 (name "java-powermock-core")
10918 `(#:jar-name "java-powermock-core.jar"
10919 #:source-dir "powermock-core/src/main/java"
10920 #:test-dir "powermock-core/src/test"
10921 #:tests? #f; requires powermock-api
10924 (modify-phases %standard-phases
10925 (add-before 'build 'copy-resources
10927 (copy-recursively "powermock-core/src/main/resources"
10931 `(("reflect" ,java-powermock-reflect)
10932 ("javassist" ,java-jboss-javassist)))
10934 `(("junit" ,java-junit)
10935 ("assertj" ,java-assertj)
10936 ("mockito" ,java-mockito-1)))))
10938 (define-public java-powermock-api-support
10940 (inherit java-powermock-reflect)
10941 (name "java-powermock-api-support")
10942 (build-system ant-build-system)
10944 `(#:jar-name "java-powermock-api-support.jar"
10946 #:source-dir "powermock-api/powermock-api-support/src/main/java"
10947 #:tests? #f)); no tests
10949 `(("core" ,java-powermock-core)
10950 ("reflect" ,java-powermock-reflect)))))
10952 (define-public java-powermock-modules-junit4-common
10954 (inherit java-powermock-reflect)
10955 (name "java-powermock-modules-junit4-common")
10956 (build-system ant-build-system)
10958 `(#:jar-name "java-powermock-modules-junit4-common.jar"
10960 #:source-dir "powermock-modules/powermock-module-junit4-common/src/main/java"
10961 #:test-dir "powermock-modules/powermock-module-junit4-common/src/test"))
10963 `(("core" ,java-powermock-core)
10964 ("easymock" ,java-easymock)
10965 ("reflect" ,java-powermock-reflect)
10966 ("hamcrest" ,java-hamcrest-core)
10967 ("cglib" ,java-cglib)))))
10969 (define-public java-powermock-modules-junit4
10971 (inherit java-powermock-reflect)
10972 (name "java-powermock-modules-junit4")
10973 (build-system ant-build-system)
10975 `(#:jar-name "java-powermock-modules-junit4.jar"
10977 #:source-dir "powermock-modules/powermock-module-junit4/src/main/java"
10978 #:test-dir "powermock-modules/powermock-module-junit4/src/test"
10980 (modify-phases %standard-phases
10981 (add-before 'build 'fix-junit-detection
10983 ;; Our junit version is 4.12-SNAPSHOT
10984 (substitute* (find-files "powermock-modules/powermock-module-junit4"
10985 "PowerMockJUnit4MethodValidator.java")
10986 (("4.12") "4.12-SNAPSHOT"))
10989 `(("core" ,java-powermock-core)
10990 ("reflect" ,java-powermock-reflect)
10991 ("common" ,java-powermock-modules-junit4-common)
10992 ("cglib" ,java-cglib)))
10994 `(("easymock" ,java-easymock)
10995 ("hamcrest" ,java-hamcrest-core)
10996 ("objenesis" ,java-objenesis)
10998 ("junit" ,java-junit)))))
11000 (define-public java-powermock-api-easymock
11002 (inherit java-powermock-reflect)
11003 (name "java-powermock-api-easymock")
11004 (build-system ant-build-system)
11006 `(#:jar-name "java-powermock-api-easymock.jar"
11008 #:source-dir "powermock-api/powermock-api-easymock/src/main/java"
11009 #:tests? #f; no tests
11011 (modify-phases %standard-phases
11012 (add-before 'build 'fix-file
11014 ;; FIXME: This looks wrong, but it fixes a build error.
11015 (with-directory-excursion "powermock-api/powermock-api-easymock"
11016 (substitute* "src/main/java/org/powermock/api/easymock/PowerMock.java"
11017 (("classLoader instanceof MockClassLoader") "false")
11018 (("\\(\\(MockClassLoader\\) classLoader\\).*;") ";")))
11021 `(("core" ,java-powermock-core)
11022 ("easymock" ,java-easymock)
11023 ("reflect" ,java-powermock-reflect)
11024 ("support" ,java-powermock-api-support)
11025 ("cglib" ,java-cglib)))))
11027 (define-public java-jboss-jms-api-spec
11029 (name "java-jboss-jms-api-spec")
11033 (uri (string-append "https://github.com/jboss/jboss-jms-api_spec/"
11034 "archive/jboss-jms-api_" version
11035 "_spec-1.0.1.Final.tar.gz"))
11038 "07bqblw9kq2i8q92bz70fvavq5xjfkaixl8xa0m0cypjgy82rb7m"))))
11039 (build-system ant-build-system)
11041 `(#:jar-name "java-jboss-jms-api_spec.jar"
11044 #:tests? #f)); no tests
11045 (home-page "https://github.com/jboss/jboss-jms-api_spec")
11046 (synopsis "Java Message Service API specification")
11047 (description "Java Message Service (JMS) API is used to send messages
11048 messages between two or more clients. It is a messaging standard that allows
11049 application components to create, send, receive, and read messages.")
11050 ; either gpl2 only with GPL Classpath Exception, or cddl.
11051 (license (list license:gpl2 license:cddl1.0))))
11053 (define-public java-mail
11059 (uri (string-append "https://github.com/javaee/javamail/archive/"
11060 "JAVAMAIL-1_6_0.tar.gz"))
11063 "1b4rg7fpj50ld90a71iz2m4gm3f5cnw18p3q3rbrrryjip46kx92"))))
11064 (build-system ant-build-system)
11066 `(#:jar-name "java-mail.jar"
11068 #:source-dir "mail/src/main/java"
11069 #:test-dir "mail/src/test"
11071 (list "**/CollectorFormatterTest.java"
11072 "**/CompactFormatterTest.java"
11073 "**/DurationFilterTest.java"
11074 "**/MailHandlerTest.java"
11075 "**/GetLocalAddressTest.java"
11076 ;; FIXME: both end with:
11077 ;; java.lang.ClassNotFoundException:
11078 ;; javax.mail.internet.MimeMultipartParseTest
11079 "**/MimeMultipartParseTest.java"
11080 "**/SearchTermSerializationTest.java")
11082 (modify-phases %standard-phases
11083 (add-before 'configure 'move-version.java
11085 (copy-file "mail/src/main/resources/javax/mail/Version.java"
11086 "mail/src/main/java/javax/mail/Version.java")
11088 (add-before 'build 'copy-resources
11090 (copy-recursively "mail/src/main/resources/META-INF"
11091 "build/classes/META-INF")
11094 `(("junit" ,java-junit)
11095 ("hamcrest" ,java-hamcrest-core)))
11096 (home-page "https://javaee.github.io/javamail/")
11097 (synopsis "Mail-related functionality in Java")
11098 (description "The JavaMail API provides a platform-independent and
11099 protocol-independent framework to build mail and messaging applications.")
11100 ;; General Public License Version 2 only ("GPL") or the Common Development
11101 ;; and Distribution License("CDDL")
11102 (license (list license:cddl1.1
11103 license:gpl2)))); with classpath exception
11105 (define-public java-jeromq
11107 (name "java-jeromq")
11111 (uri (git-reference
11112 (url "https://github.com/zeromq/jeromq")
11113 (commit (string-append "v" version))))
11114 (file-name (string-append name "-" version "-checkout"))
11117 "1gxkp7lv2ahymgrqdw94ncq54bmp4m4sw5m1x9gkp7l5bxn0xsyj"))
11118 (patches (search-patches "java-jeromq-fix-tests.patch"))))
11119 (build-system ant-build-system)
11121 `(#:jar-name "java-jeromq.jar"
11122 #:source-dir "src/main/java"
11126 "**/Abstract*.java"
11127 ;; Requires network
11128 "**/ZBeaconTest.java"
11130 "**/DealerSpecTest.java"
11131 "**/CustomDecoderTest.java"
11132 "**/CustomEncoderTest.java"
11133 "**/ConnectRidTest.java"
11134 "**/ReqSpecTest.java"
11135 "**/PushPullSpecTest.java"
11136 "**/PubSubHwmTest.java"
11137 "**/RouterSpecTest.java"
11138 "**/ProxyTest.java")))
11140 `(("java-jnacl" ,java-jnacl)))
11142 `(("java-hamcrest-core" ,java-hamcrest-core)
11143 ("junit" ,java-junit)))
11144 (home-page "http://zeromq.org/bindings:java")
11145 (synopsis "Java binding for 0MQ")
11146 (description "Jeromq provides the java bindings for 0MQ.")
11147 (license license:mpl2.0)))
11149 (define-public java-kafka-clients
11151 (name "java-kafka-clients")
11155 (uri (string-append "mirror://apache/kafka/" version "/kafka-"
11156 version "-src.tgz"))
11159 "1yxmnsmliwm7671q5yy9bl4jdqyyn00n26cggz9brwczx80w1vfq"))))
11160 (build-system ant-build-system)
11162 `(#:jar-name "java-kafka-clients.jar"
11164 #:source-dir "clients/src/main/java"
11165 #:test-dir "clients/src/test"
11168 ;; This file does not contain a class
11169 "**/IntegrationTest.java"
11170 ;; Requires network
11171 "**/ClientUtilsTest.java"
11172 ;; End with errors that seem related to our powermock
11173 "**/KafkaProducerTest.java"
11174 "**/BufferPoolTest.java")))
11176 `(("java-slf4j-api" ,java-slf4j-api)
11177 ("java-lz4" ,java-lz4)))
11179 `(("junit" ,java-junit)
11180 ("hamcrest" ,java-hamcrest-all)
11181 ("objenesis" ,java-objenesis)
11183 ("cglib" ,java-cglib)
11184 ("javassist" ,java-jboss-javassist)
11185 ("snappy" ,java-snappy)
11186 ("easymock" ,java-easymock)
11187 ("powermock" ,java-powermock-core)
11188 ("powermock-easymock" ,java-powermock-api-easymock)
11189 ("powermock-junit4-common" ,java-powermock-modules-junit4-common)
11190 ("powermock-junit4" ,java-powermock-modules-junit4)
11191 ("powermock-support" ,java-powermock-api-support)
11192 ("java-bouncycastle" ,java-bouncycastle)))
11193 (home-page "https://kafka.apache.org")
11194 (synopsis "Distributed streaming platform")
11195 (description "Kafka is a distributed streaming platform, which means:
11197 @item it can publish and subscribe to streams of records;
11198 @item it can store streams of records in a fault-tolerant way;
11199 @item it can process streams of records as they occur.
11201 ;; Either cddl or gpl2 only.
11202 (license (list license:cddl1.1; actually cddl1.1
11203 license:gpl2)))); with classpath exception
11205 (define-public java-jdom
11211 (uri (string-append "http://jdom.org/dist/binary/archive/jdom-"
11212 version ".tar.gz"))
11215 "07wdpm3jwwc9q38kmdw40fvbmv6jzjrkrf8m0zqs58f79a672wfl"))))
11216 (build-system ant-build-system)
11218 `(#:build-target "package"
11219 #:tests? #f; tests are run as part of the build process
11221 (modify-phases %standard-phases
11223 (install-jars "build")))))
11224 (home-page "http://jdom.org/")
11225 (synopsis "Access, manipulate, and output XML data")
11226 (description "Java-based solution for accessing, manipulating, and
11227 outputting XML data from Java code.")
11228 (license license:bsd-4)))
11230 (define-public java-geronimo-xbean-reflect
11232 (name "java-geronimo-xbean-reflect")
11236 (uri (svn-reference
11237 (url "https://svn.apache.org/repos/asf/geronimo/xbean/tags/xbean-4.5/")
11238 (revision 1807396)))
11239 (file-name (string-append name "-" version))
11242 "18q3i6jgm6rkw8aysfgihgywrdc5nvijrwnslmi3ww497jvri6ja"))))
11243 (build-system ant-build-system)
11245 `(#:jar-name "geronimo-xbean-reflect.jar"
11246 #:source-dir "xbean-reflect/src/main/java"
11247 #:test-dir "xbean-reflect/src/test"
11250 (list "**/Abstract*.java" "**/AsmParameterNameLoaderTest.java"
11251 "**/ObjectRecipeTest.java" "**/ParameterNameLoaderTest.java"
11252 "**/RecipeHelperTest.java" "**/XbeanAsmParameterNameLoaderTest.java")
11254 (modify-phases %standard-phases
11255 (add-before 'build 'fix-source
11257 (let ((dir "xbean-reflect/src/main/java/org/apache/xbean/recipe/"))
11258 ;; org.apache.xbean.asm6 is actually repackaged java-asm
11259 (substitute* (string-append dir "XbeanAsmParameterNameLoader.java")
11260 (("org.apache.xbean.asm5") "org.objectweb.asm"))
11262 (replace 'install (install-from-pom "xbean-reflect/pom.xml")))))
11264 `(("asm" ,java-asm)
11265 ("log4j" ,java-log4j-api)
11266 ("log4j-1.2" ,java-log4j-1.2-api)
11267 ("log4j-core" ,java-log4j-core)
11268 ("logging" ,java-commons-logging-minimal)))
11270 `(("java-geronimo-parent-pom" ,java-geronimo-parent-pom)))
11272 `(("junit" ,java-junit)))
11273 (home-page "https://geronimo.apache.org/maven/xbean/3.6/xbean-reflect/")
11274 (synopsis "Dependency injection helper")
11275 (description "Xbean-reflect provides very flexible ways to create objects
11276 and graphs of objects for dependency injection frameworks")
11277 (license license:asl2.0)))
11279 (define java-geronimo-genesis-2.1
11281 (name "java-geronimo-genesis")
11285 (uri (svn-reference
11286 (url (string-append "https://svn.apache.org/repos/asf/"
11287 "geronimo/genesis/tags/genesis-"
11289 (revision 1807396)))
11290 (file-name (string-append name "-" version "-source"))
11293 "119yn795jvnjf52si84q192s8wag1k013iabg78b7wnadssnnh31"))))
11294 (build-system ant-build-system)
11298 (modify-phases %standard-phases
11299 (delete 'configure)
11302 (install-pom-file "pom.xml"))
11303 (add-after 'install 'install-enforcer-rules
11304 (install-pom-file "genesis-enforcer-rules/pom.xml"))
11305 (add-after 'install 'install-flava
11306 (install-pom-file "genesis-default-flava/pom.xml"))
11307 (add-after 'install 'install-packaging
11308 (install-pom-file "genesis-packaging/pom.xml"))
11309 (add-after 'install-flava 'install-flava-java4
11310 (install-pom-file "genesis-default-flava/genesis-java1.4-flava/pom.xml"))
11311 (add-after 'install-flava 'install-flava-java5
11312 (install-pom-file "genesis-default-flava/genesis-java5-flava/pom.xml"))
11313 (add-after 'install-flava 'install-flava-java6
11314 (install-pom-file "genesis-default-flava/genesis-java6-flava/pom.xml")))))
11316 `(("apache-parent-pom" ,apache-parent-pom-13)))
11317 (home-page "https://geronimo.apache.org")
11318 (synopsis "Collection of maven POM files for the Geronimo project")
11319 (description "Apache Geronimo is a server runtime. This package contains
11320 only pom files used by other components in the Geronimo project.")
11321 (license license:asl2.0)))
11323 (define java-geronimo-parent-pom
11325 (inherit java-geronimo-xbean-reflect)
11326 (name "java-geronimo-parent-pom")
11330 (modify-phases %standard-phases
11331 (delete 'configure)
11334 (install-pom-file "pom.xml")))))
11336 `(("java-geronimo-genesis" ,java-geronimo-genesis-2.1)))))
11338 (define-public java-geronimo-xbean-bundleutils
11340 (inherit java-geronimo-xbean-reflect)
11341 (name "java-geronimo-xbean-bundleutils")
11343 `(#:jar-name "geronimo-xbean-bundleutils.jar"
11344 #:source-dir "xbean-bundleutils/src/main/java"
11345 #:test-dir "xbean-bundleutils/src/test"
11347 (modify-phases %standard-phases
11348 (add-before 'build 'fix-java
11350 ;; We use a more recent version of osgi, so this file requires
11351 ;; more interface method implementations.
11352 (substitute* "xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/DelegatingBundleContext.java"
11353 (("import org.osgi.framework.ServiceRegistration;")
11354 "import org.osgi.framework.ServiceRegistration;
11355 import org.osgi.framework.ServiceFactory;
11356 import java.util.Collection;
11357 import org.osgi.framework.ServiceObjects;")
11358 (("public Bundle getBundle\\(\\)")
11360 public <S> ServiceObjects<S> getServiceObjects(ServiceReference<S> reference) {
11361 throw new UnsupportedOperationException();
11364 public <S> ServiceRegistration<S> registerService(Class<S> clazz,
11365 ServiceFactory<S> factory, Dictionary<String, ?> properties) {
11366 throw new UnsupportedOperationException();
11368 public Bundle getBundle()"))
11371 `(("java-slf4j" ,java-slf4j-api)
11372 ("java-asm" ,java-asm)
11373 ("java-osgi-framework" ,java-osgi-framework)
11374 ("java-eclipse-osgi" ,java-eclipse-osgi)
11375 ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin)))))
11377 (define-public java-geronimo-xbean-asm-util
11379 (inherit java-geronimo-xbean-reflect)
11380 (name "java-geronimo-xbean-asm-util")
11382 `(#:jar-name "geronimo-xbean-asm-util.jar"
11383 #:source-dir "xbean-asm-util/src/main/java"
11384 #:tests? #f)); no tests
11386 `(("java-asm" ,java-asm)))
11387 (native-inputs '())))
11389 (define-public java-geronimo-xbean-finder
11391 (inherit java-geronimo-xbean-reflect)
11392 (name "java-geronimo-xbean-finder")
11394 `(#:jar-name "geronimo-xbean-finder.jar"
11395 #:source-dir "xbean-finder/src/main/java"
11396 #:test-dir "xbean-finder/src/test"))
11398 `(("java-slf4j-api" ,java-slf4j-api)
11399 ("java-asm" ,java-asm)
11400 ("java-geronimo-xbean-bundleutils" ,java-geronimo-xbean-bundleutils)
11401 ("java-geronimo-xbean-asm-util" ,java-geronimo-xbean-asm-util)
11402 ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin)
11403 ("java-osgi-framework" ,java-osgi-framework)))
11405 `(("java-junit" ,java-junit)
11406 ("java-hamcrest-core" ,java-hamcrest-core)))))
11408 (define-public java-gson
11414 (uri (string-append "https://github.com/google/gson/archive/"
11415 "gson-parent-" version ".tar.gz"))
11418 "1j4qnp7v046q0k48c4kyf69sxaasx2h949d3cqwsm3kzxms3x0f9"))))
11419 (build-system ant-build-system)
11421 `(#:jar-name "gson.jar"
11422 #:source-dir "gson/src/main/java"
11423 #:test-dir "gson/src/test"))
11425 `(("java-junit" ,java-junit)
11426 ("java-hamcrest-core" ,java-hamcrest-core)))
11427 (home-page "https://github.com/google/gson")
11428 (synopsis "Java serialization/deserialization library from/to JSON")
11429 (description "Gson is a Java library that can be used to convert Java
11430 Objects into their JSON representation. It can also be used to convert a JSON
11431 string to an equivalent Java object. Gson can work with arbitrary Java objects
11432 including pre-existing objects that you do not have source-code of.")
11433 (license license:asl2.0)))
11435 (define-public java-hawtjni
11437 (name "java-hawtjni")
11441 (uri (string-append "https://github.com/fusesource/hawtjni/archive/"
11442 "hawtjni-project-" version ".tar.gz"))
11445 "1bqfd732rmh6svyx17fpw9175gc9gzkcbyps2yyrf50c3zzjas6g"))))
11446 (build-system ant-build-system)
11448 `(#:jar-name "hawtjni.jar"
11449 #:source-dir "hawtjni-generator/src/main/java:hawtjni-runtime/src/main/java"
11450 #:tests? #f; no tests
11452 (modify-phases %standard-phases
11453 (add-before 'build 'build-native
11454 (lambda* (#:key inputs #:allow-other-keys)
11455 (let ((include (string-append "-I" (assoc-ref inputs "jdk") "/include/linux")))
11456 (with-directory-excursion "hawtjni-generator/src/main/resources/"
11457 (invoke "gcc" "-c" "hawtjni.c" "-o" "hawtjni.o"
11458 "-fPIC" "-O2" include)
11459 (invoke "gcc" "-c" "hawtjni-callback.c" "-o" "hawtjni-callback.o"
11460 "-fPIC" "-O2" include)
11461 (invoke "gcc" "-o" "libhawtjni.so" "-shared"
11462 "hawtjni.o" "hawtjni-callback.o")))
11464 (add-after 'install 'install-native
11465 (lambda* (#:key outputs #:allow-other-keys)
11466 (let* ((out (assoc-ref outputs "out"))
11467 (lib (string-append out "/lib"))
11468 (inc (string-append out "/include")))
11469 (with-directory-excursion "hawtjni-generator/src/main/resources/"
11470 (install-file "libhawtjni.so" lib)
11471 (install-file "hawtjni.h" inc)))
11473 (add-before 'install 'install-parent
11474 (install-pom-file "pom.xml"))
11476 (install-from-pom "hawtjni-runtime/pom.xml")))))
11478 `(("java-commons-cli" ,java-commons-cli)
11479 ("java-asm" ,java-asm)
11480 ("java-geronimo-xbean-finder" ,java-geronimo-xbean-finder)))
11481 (home-page "https://fusesource.github.io/hawtjni/")
11482 (synopsis "JNI code generator")
11483 (description "HawtJNI is a code generator that produces the JNI code needed
11484 to implement Java native methods. It is based on the jnigen code generator
11485 that is part of the SWT Tools project.")
11486 (license license:asl2.0)))
11488 (define-public java-jansi-native
11490 (name "java-jansi-native")
11494 (uri (string-append "https://github.com/fusesource/jansi-native/"
11495 "archive/jansi-native-" version ".tar.gz"))
11498 "0j2ydlgxbzbgshqkwghbxxxnbnx1mmjgd6k5fw6xfvxw1z956yqf"))))
11499 (build-system ant-build-system)
11501 `(#:jar-name "jansi-native.jar"
11502 #:source-dir "src/main/java"
11503 #:tests? #f; no tests
11505 (modify-phases %standard-phases
11506 (add-before 'build 'build-native
11507 (lambda* (#:key inputs #:allow-other-keys)
11508 ;; there are more required files for windows in windows/
11509 (with-directory-excursion "src/main/native-package/src"
11510 (substitute* "jansi_ttyname.c"
11511 (("#include \"jansi_.*") ""))
11512 (invoke "gcc" "-c" "jansi_ttyname.c" "-o" "jansi_ttyname.o"
11513 (string-append "-I" (assoc-ref inputs "java-hawtjni")
11515 (string-append "-I" (assoc-ref inputs "jdk")
11518 (invoke "gcc" "-o" "libjansi.so" "-shared" "jansi_ttyname.o"))))
11519 (add-before 'build 'install-native
11521 (let ((dir (string-append "build/classes/META-INF/native/"
11522 ,(match (%current-system)
11523 ((or "i686-linux" "armhf-linux")
11525 ((or "x86_64-linux" "aarch64-linux"
11528 (_ "unknown-kernel")))))
11529 (install-file "src/main/native-package/src/libjansi.so" dir))
11531 (add-after 'install 'install-native
11532 (lambda* (#:key outputs #:allow-other-keys)
11533 (install-file "src/main/native-package/src/jansi.h"
11534 (string-append (assoc-ref outputs "out") "/include"))
11536 (add-before 'install 'fix-pom
11538 ;; pom contains variables to complete name, but we don't support that
11539 (substitute* "pom.xml"
11540 (("\\$\\{platform\\}") "native"))
11543 (install-from-pom "pom.xml")))))
11545 `(("java-hawtjni" ,java-hawtjni)))
11546 (home-page "https://fusesource.github.io/jansi/")
11547 (synopsis "Native library for jansi")
11548 (description "This package provides the native library for jansi, a small
11549 Java library that allows you to use ANSI escape sequences to format your
11551 (license license:asl2.0)))
11553 (define-public java-jansi
11555 (name "java-jansi")
11559 (uri (string-append "https://github.com/fusesource/jansi/archive/"
11560 "jansi-project-" version ".tar.gz"))
11563 "11kh3144i3fzp21dpy8zg52mjmsr214k7km9p8ly0rqk2px0qq2z"))))
11564 (build-system ant-build-system)
11566 `(#:jar-name "jansi.jar"
11567 #:source-dir "jansi/src/main/java"
11568 #:test-dir "jansi/src/test"
11570 (modify-phases %standard-phases
11571 (add-after 'check 'clear-term
11573 (invoke "echo" "-e" "\\e[0m")))
11574 (add-before 'install 'install-parent
11575 (install-pom-file "pom.xml"))
11576 (add-before 'install 'fix-pom
11578 ;; pom adds jansi native versions for different platforms, but we
11579 ;; only need one, so use native instead
11580 (substitute* "jansi/pom.xml"
11581 (("windows32") "native")
11582 (("windows64") "native")
11584 (("linux32") "native")
11585 (("linux64") "native")
11586 (("freebsd32") "native")
11587 (("freebsd64") "native"))
11590 (install-from-pom "jansi/pom.xml")))))
11592 `(("java-jansi-native" ,java-jansi-native)))
11594 `(("java-junit" ,java-junit)
11595 ("java-hamcrest-core" ,java-hamcrest-core)))
11596 (home-page "https://fusesource.github.io/jansi/")
11597 (synopsis "Portable ANSI escape sequences")
11598 (description "Jansi is a Java library that allows you to use ANSI escape
11599 sequences to format your console output which works on every platform.")
11600 (license license:asl2.0)))
11602 (define-public java-jboss-el-api-spec
11604 (name "java-jboss-el-api-spec")
11608 (uri (string-append "https://github.com/jboss/jboss-el-api_spec/"
11609 "archive/jboss-el-api_" version
11610 "_spec-1.0.7.Final.tar.gz"))
11613 "1j45ljxalwlibxl7g7iv952sjxkw275m8vyxxij8l6wdd5pf0pdh"))))
11614 (build-system ant-build-system)
11616 `(#:jar-name "java-jboss-el-api_spec.jar"
11617 #:modules ((guix build ant-build-system)
11619 (guix build maven pom)
11620 (guix build java-utils)
11623 (modify-phases %standard-phases
11624 ;; the origin of javax.el:javax.el-api is unknown, so we use this package
11625 ;; instead, which implements the same thing. We override the pom file
11626 ;; to "rename" the package so it can be found by maven.
11627 (add-before 'install 'override-pom
11629 (delete-file "pom.xml")
11630 (with-output-to-file "pom.xml"
11634 (modelVersion "4.0.0")
11636 (groupId "javax.el")
11637 (artifactId "javax.el-api")
11638 (version "3.0")))))
11641 (install-from-pom "pom.xml")))))
11643 `(("java-junit" ,java-junit)))
11644 (home-page "https://github.com/jboss/jboss-el-api_spec")
11645 (synopsis "JSR-341 expression language 3.0 API")
11646 (description "This package contains an implementation of the JSR-341
11647 specification for the expression language 3.0. It implements an expression
11648 language inspired by ECMAScript and XPath. This language is used with
11649 JavaServer Pages (JSP).")
11650 ;; Either GPL2 only or CDDL.
11651 (license (list license:gpl2 license:cddl1.1))))
11653 (define-public java-jboss-interceptors-api-spec
11655 (name "java-jboss-interceptors-api-spec")
11659 (uri (string-append "https://github.com/jboss/jboss-interceptors-api_spec/"
11660 "archive/jboss-interceptors-api_" version
11661 "_spec-1.0.0.Final.tar.gz"))
11664 "0wv8x0jp9a5qxlrgkhb5jdk2gr6vi87b4j4kjb8ryxiy9gn8g51z"))))
11665 (build-system ant-build-system)
11667 `(#:jar-name "java-jboss-interceptors-api_spec.jar"
11670 #:tests? #f; no tests
11671 #:modules ((guix build ant-build-system)
11673 (guix build maven pom)
11674 (guix build java-utils)
11677 (modify-phases %standard-phases
11678 ;; the origin of javax.interceptor:javax.interceptor-api is unknown,
11679 ;; so we use this package instead, which implements the same thing.
11680 ;; We override the pom file to "rename" the package so it can be found
11682 (add-before 'install 'override-pom
11684 (delete-file "pom.xml")
11685 (with-output-to-file "pom.xml"
11689 (modelVersion "4.0.0")
11690 (name "interceptor-api")
11691 (groupId "javax.interceptor")
11692 (artifactId "javax.interceptor-api")
11693 (version "3.0")))))
11696 (install-from-pom "pom.xml")))))
11697 (home-page "https://github.com/jboss/jboss-interceptors-api_spec")
11698 (synopsis "Interceptors 1.2 API classes from JSR 318")
11699 (description "Java-jboss-interceptors-api-spec implements the Interceptors
11700 API. Interceptors are used to interpose on business method invocations and
11702 ;; Either GPL2 only or CDDL.
11703 (license (list license:gpl2 license:cddl1.1))))
11705 (define-public java-cdi-api
11707 (name "java-cdi-api")
11711 (uri (string-append "https://github.com/cdi-spec/cdi/archive/"
11712 version ".tar.gz"))
11713 (file-name (string-append name "-" version ".tar.gz"))
11716 "1iv8b8bp07c5kmqic14jsr868vycjv4qv02lf3pkgp9z21mnfg5y"))))
11717 (build-system ant-build-system)
11719 `(#:source-dir "api/src/main/java"
11720 #:jar-name "java-cdi-api.jar"
11721 #:test-dir "api/src/test"
11723 #:tests? #f; Tests fail because we don't have a CDI provider yet
11725 (modify-phases %standard-phases
11727 (install-from-pom "api/pom.xml")))))
11729 `(("java-javax-inject" ,java-javax-inject)
11730 ("java-jboss-el-api-spec" ,java-jboss-el-api-spec)
11731 ("java-jboss-interceptors-api-spec" ,java-jboss-interceptors-api-spec)
11732 ("java-weld-parent-pom" ,java-weld-parent-pom)))
11734 `(("java-testng" ,java-testng)
11735 ("java-hamcrest-core" ,java-hamcrest-core)))
11736 (home-page "http://cdi-spec.org/")
11737 (synopsis "Contexts and Dependency Injection APIs")
11738 (description "Java-cdi-api contains the required APIs for Contexts and
11739 Dependency Injection (CDI).")
11740 (license license:asl2.0)))
11742 (define-public java-joda-convert
11744 (name "java-joda-convert")
11748 (uri (string-append "https://github.com/JodaOrg/joda-convert/archive/v"
11749 version ".tar.gz"))
11750 (file-name (string-append name "-" version ".tar.gz"))
11753 "0vp346xz7dh9br4q7xazhc7hvzf76a6hf95fki9bg67q5jr0kjh7"))))
11754 (build-system ant-build-system)
11756 `(#:jar-name (string-append ,name "-" ,version ".jar")
11757 #:source-dir "src/main/java"
11758 #:test-include (list "**/Test*.java")
11759 ;; Contains only interfaces and base classes (no test)
11760 #:test-exclude (list "**/test*/**.java")))
11762 `(("java-guava" ,java-guava)))
11764 `(("java-junit" ,java-junit)
11765 ("java-hamcrest-core" ,java-hamcrest-core)))
11766 (home-page "https://www.joda.org/joda-convert/")
11767 (synopsis "Conversion between Objects and Strings")
11768 (description "Joda-Convert provides a small set of classes to aid
11769 conversion between Objects and Strings. It is not intended to tackle the
11770 wider problem of Object to Object transformation.")
11771 (license license:asl2.0)))
11773 (define-public java-joda-time
11775 (name "java-joda-time")
11779 (uri (string-append "https://github.com/JodaOrg/joda-time/archive/v"
11780 version ".tar.gz"))
11781 (file-name (string-append name "-" version ".tar.gz"))
11784 "1i9x91mi7yg2pasl0k3912f1pg46n37sps6rdb0v1gs8hj9ppwc1"))))
11785 (build-system ant-build-system)
11787 `(#:jar-name "java-joda-time.jar"
11788 #:source-dir "src/main/java"
11789 #:test-include (list "**/Test*.java")
11790 ;; There is no runnable test in these files
11791 #:test-exclude (list "**/Test*Chronology.java" "**/Test*Field.java")
11793 (modify-phases %standard-phases
11794 (add-after 'build 'build-resources
11796 (mkdir-p "build/classes/org/joda/time/tz/data")
11797 (mkdir-p "build/classes/org/joda/time/format")
11798 ;; This will produce the following exception:
11799 ;; java.io.IOException: Resource not found: "org/joda/time/tz/data/ZoneInfoMap"
11800 ;; which is normal, because it doesn't exist yet. It still generates
11801 ;; the same file as in the binary one can find on maven.
11802 (invoke "java" "-cp"
11803 (string-append "build/classes:" (getenv "CLASSPATH"))
11804 "org.joda.time.tz.ZoneInfoCompiler"
11805 "-src" "src/main/java/org/joda/time/tz/src"
11806 "-dst" "build/classes/org/joda/time/tz/data"
11807 "africa" "antarctica" "asia" "australasia"
11808 "europe" "northamerica" "southamerica"
11809 "pacificnew" "etcetera" "backward" "systemv")
11810 (for-each (lambda (f)
11811 (copy-file f (string-append
11812 "build/classes/org/joda/time/format/"
11814 (find-files "src/main/java/org/joda/time/format" ".*.properties"))
11816 (add-before 'install 'regenerate-jar
11818 ;; We need to regenerate the jar file to add generated data.
11819 (delete-file "build/jar/java-joda-time.jar")
11820 (invoke "ant" "jar")))
11821 (add-before 'check 'copy-test-resources
11823 (mkdir-p "build/test-classes/org/joda/time/tz/data")
11824 (copy-file "src/test/resources/tzdata/ZoneInfoMap"
11825 "build/test-classes/org/joda/time/tz/data/ZoneInfoMap")
11826 (copy-recursively "src/test/resources" "build/test-classes")
11829 `(("java-joda-convert" ,java-joda-convert)))
11831 `(("java-junit" ,java-junit)
11832 ("java-hamcrest-core" ,java-hamcrest-core)
11833 ("tzdata" ,tzdata)))
11834 (home-page "https://www.joda.org/joda-time/")
11835 (synopsis "Replacement for the Java date and time classes")
11836 (description "Joda-Time is a replacement for the Java date and time
11837 classes prior to Java SE 8.")
11838 (license license:asl2.0)))
11840 (define-public java-xerces
11842 (name "java-xerces")
11847 (uri (string-append "mirror://apache/xerces/j/source/"
11848 "Xerces-J-src." version ".tar.gz"))
11850 (base32 "0494kq36gw3nah19ifb720vwxbpg4ww0k6m3zq6wyanw6a083p6s"))
11851 (patches (search-patches
11852 "java-xerces-xjavac_taskdef.patch"
11853 "java-xerces-build_dont_unzip.patch"
11854 "java-xerces-bootclasspath.patch"))))
11855 (build-system ant-build-system)
11857 `(#:tests? #f;; Test files are not present
11858 #:test-target "test"
11861 (modify-phases %standard-phases
11862 (add-after 'unpack 'create-build.properties
11863 (lambda* (#:key inputs #:allow-other-keys)
11864 (let ((jaxp (assoc-ref inputs "java-jaxp"))
11865 (resolver (assoc-ref inputs "java-apache-xml-commons-resolver")))
11866 (with-output-to-file "build.properties"
11869 "jar.jaxp = ~a/share/java/jaxp.jar~@
11870 jar.apis-ext = ~a/share/java/jaxp.jar~@
11871 jar.resolver = ~a/share/java/xml-resolver.jar~%"
11872 jaxp jaxp resolver)))
11873 ;; Make xerces use our version of jaxp in tests
11874 (substitute* "build.xml"
11876 (string-append jaxp "/share/java/jaxp.jar"))
11877 (("\\$\\{tools.dir\\}/\\$\\{jar.apis\\}")
11880 (replace 'install (install-jars "build")))))
11882 `(("java-apache-xml-commons-resolver" ,java-apache-xml-commons-resolver)
11883 ("java-jaxp" ,java-jaxp)))
11884 (home-page "https://xerces.apache.org/xerces2-j/")
11885 (synopsis "Validating XML parser for Java with DOM level 3 support")
11886 (description "The Xerces2 Java parser is the reference implementation of
11887 XNI, the Xerces Native Interface, and also a fully conforming XML Schema
11890 Xerces2-J supports the following standards and APIs:
11893 @item eXtensible Markup Language (XML) 1.0 Second Edition Recommendation
11894 @item Namespaces in XML Recommendation
11895 @item Document Object Model (DOM) Level 2 Core, Events, and Traversal and
11896 Range Recommendations
11897 @item Simple API for XML (SAX) 2.0.1 Core and Extension
11898 @item Java APIs for XML Processing (JAXP) 1.2.01
11899 @item XML Schema 1.0 Structures and Datatypes Recommendations
11900 @item Experimental implementation of the Document Object Model (DOM) Level 3
11901 Core and Load/Save Working Drafts
11902 @item Provides a partial implementation of the XML Inclusions (XInclude) W3C
11903 Candidate Recommendation
11906 Xerces is now able to parse documents written according to the XML 1.1
11907 Candidate Recommendation, except that it does not yet provide an option to
11908 enable normalization checking as described in section 2.13 of this
11909 specification. It also handles namespaces according to the XML Namespaces 1.1
11910 Candidate Recommendation, and will correctly serialize XML 1.1 documents if
11911 the DOM level 3 load/save API's are in use.")
11912 (license license:asl2.0)))
11914 (define-public java-jakarta-regexp
11916 (name "java-jakarta-regexp")
11921 (uri (string-append
11922 "https://archive.apache.org/dist/jakarta/regexp/jakarta-regexp-"
11923 version ".tar.gz"))
11926 "0zg9rmyif48dck0cv6ynpxv23mmcsx265am1fnnxss7brgw0ms3r"))))
11927 (build-system ant-build-system)
11929 `(#:test-target "test"
11931 (modify-phases %standard-phases
11933 (lambda* (#:key outputs #:allow-other-keys)
11934 (let* ((out (assoc-ref outputs "out"))
11935 (out-share (string-append out "/share/java")))
11936 (mkdir-p out-share)
11937 (for-each (lambda (name)
11938 (install-file name out-share))
11939 (find-files "build" "^jakarta-regexp-.*\\.jar$"))
11941 (home-page "https://attic.apache.org/projects/jakarta-regexp.html")
11942 (synopsis "Regular expression parser generator for Java.")
11943 (description "@code{jakarta-regexp} is an old regular expression parser
11944 generator for Java.")
11945 (license license:asl2.0)))
11947 (define-public java-jline
11949 (name "java-jline")
11953 (uri (string-append "https://github.com/jline/jline1/archive/jline-"
11954 version ".tar.gz"))
11957 "0bi3p6vrh7a6v0fbpb6rx9plpmx5zk3lr352xzdbz2jcxg499wir"))))
11958 (build-system ant-build-system)
11960 `(#:jar-name "jline.jar"
11961 #:source-dir "src/main/java"
11962 #:test-dir "src/test"
11964 (modify-phases %standard-phases
11965 (add-before 'build 'copy-resources
11967 (copy-recursively "src/main/resources" "build/classes")
11970 `(("java-junit" ,java-junit)))
11971 (home-page "https://jline.github.io")
11972 (synopsis "Console input handling library")
11973 (description "JLine is a Java library for handling console input. It is
11974 similar in functionality to BSD editline and GNU readline but with additional
11975 features that bring it on par with the Z shell line editor.")
11976 (license license:bsd-3)))
11978 (define-public java-jline-2
11980 (inherit java-jline)
11984 (uri (string-append "https://github.com/jline/jline2/archive/jline-"
11985 version ".tar.gz"))
11988 "1c6qa26mf0viw8hg4jnv72s7i1qb1gh1l8rrzcdvqhqhx82rkdlf"))))
11991 ,@(package-arguments java-jline)))
11993 `(("java-jansi" ,java-jansi)
11994 ("java-jansi-native" ,java-jansi-native)))
11996 `(("java-powermock-modules-junit4" ,java-powermock-modules-junit4)
11997 ("java-powermock-modules-junit4-common" ,java-powermock-modules-junit4-common)
11998 ("java-powermock-api-easymock" ,java-powermock-api-easymock)
11999 ("java-powermock-api-support" ,java-powermock-api-support)
12000 ("java-powermock-core" ,java-powermock-core)
12001 ("java-powermock-reflect" ,java-powermock-reflect)
12002 ("java-easymock" ,java-easymock)
12003 ("java-jboss-javassist" ,java-jboss-javassist)
12004 ("java-objenesis" ,java-objenesis)
12005 ("java-asm" ,java-asm)
12006 ("java-hamcrest-core" ,java-hamcrest-core)
12007 ("java-cglib" ,java-cglib)
12008 ("java-junit" ,java-junit)
12009 ("java-hawtjni" ,java-hawtjni)))))
12011 (define-public java-xmlunit
12013 (name "java-xmlunit")
12017 (uri (string-append "https://github.com/xmlunit/xmlunit/archive/v"
12018 version ".tar.gz"))
12019 (file-name (string-append name "-" version ".tar.gz"))
12022 "035rivlnmwhfqj0fzviciv0bkh1h95ps1iwnh2kjcvdbk5nccm4z"))))
12023 (build-system ant-build-system)
12025 `(#:jar-name "java-xmlunit.jar"
12026 #:source-dir "xmlunit-core/src/main/java"
12027 #:test-dir "xmlunit-core/src/test"
12029 (modify-phases %standard-phases
12030 (add-before 'check 'copy-test-resources
12031 (lambda* (#:key inputs #:allow-other-keys)
12032 (copy-recursively (assoc-ref inputs "resources") "../test-resources")
12035 `(("java-junit" ,java-junit)
12036 ("java-mockito-1" ,java-mockito-1)
12037 ("java-hamcrest-all" ,java-hamcrest-all)
12038 ("java-objenesis" ,java-objenesis)
12039 ("java-asm" ,java-asm)
12040 ("java-cglib" ,java-cglib)
12044 (uri (git-reference
12045 (url "https://github.com/xmlunit/test-resources")
12046 (commit "a590d2ae865c3e0455691d76ba8eefccc2215aec")))
12047 (file-name "java-xmlunit-test-resources")
12050 "0r0glj37pg5l868yjz78gckr91cs8fysxxbp9p328dssssi91agr"))))))
12051 (home-page "https://www.xmlunit.org/")
12052 (synopsis "XML output testing")
12053 (description "XMLUnit provides you with the tools to verify the XML you
12054 emit is the one you want to create. It provides helpers to validate against
12055 an XML Schema, assert the values of XPath queries or compare XML documents
12056 against expected outcomes.")
12057 (license license:asl2.0)))
12059 (define-public java-xmlunit-legacy
12061 (inherit java-xmlunit)
12062 (name "java-xmlunit-legacy")
12064 `(#:jar-name "java-xmlunit-legacy.jar"
12065 #:source-dir "xmlunit-legacy/src/main/java"
12066 #:test-dir "xmlunit-legacy/src/test"))
12068 `(("java-xmlunit" ,java-xmlunit)
12069 ("java-junit" ,java-junit)))
12071 `(("java-mockito-1" ,java-mockito-1)))))
12073 (define-public java-xmlunit-matchers
12075 (inherit java-xmlunit)
12076 (name "java-xmlunit-matchers")
12078 `(#:jar-name "java-xmlunit-matchers.jar"
12079 #:source-dir "xmlunit-matchers/src/main/java"
12080 #:test-dir "xmlunit-matchers/src/test"
12082 ;; Cannot open xsd for http://www.xmlunit.org/test-support/Book.xsd
12083 (list "**/ValidationMatcherTest.java")
12085 (modify-phases %standard-phases
12086 (add-before 'build 'copy-test-class
12088 (copy-file "xmlunit-core/src/test/java/org/xmlunit/TestResources.java"
12089 "xmlunit-matchers/src/test/java/org/xmlunit/TestResources.java")
12091 (add-before 'build 'fix-test-resources-path
12093 (substitute* (find-files "xmlunit-matchers/src/test" ".*.java")
12094 (("../test-resources") "test-resources"))
12096 (add-before 'check 'copy-test-resources
12097 (lambda* (#:key inputs #:allow-other-keys)
12098 (copy-recursively (assoc-ref inputs "resources") "test-resources")
12101 `(("java-xmlunit" ,java-xmlunit)
12102 ("java-junit" ,java-junit)))))
12104 (define-public java-openchart2
12106 (name "java-openchart2")
12110 (uri (string-append "http://download.approximatrix.com/openchart2/"
12111 "openchart2-" version ".source.zip"))
12114 "1xq96zm5r02n1blja0072jmmsifmxc40lbyfbnmcnr6mw42frh4g"))))
12115 (build-system ant-build-system)
12117 `(#:test-target "test"
12119 (modify-phases %standard-phases
12120 (add-after 'unpack 'fix-junit-errors
12122 (with-directory-excursion "unittest/src/com/approximatrix/charting/"
12123 (substitute* '("coordsystem/ticklocator/NumericXTickLocatorTest.java"
12124 "coordsystem/ticklocator/NumericYTickLocatorTest.java"
12125 "coordsystem/ticklocator/ObjectXTickLocatorTest.java"
12126 "model/DefaultChartDataModelConstraintsTest.java"
12127 "model/MultiScatterDataModelConstraintsTest.java"
12128 "model/threedimensional/DotPlotDataModelConstraintsTest.java")
12129 (("(assertEquals[^;]+);" before _)
12130 (string-append (string-drop-right before 2) ", 1E-6);"))))
12132 (replace 'install (install-jars ".")))))
12135 ("java-junit" ,java-junit)
12136 ("java-hamcrest-core" ,java-hamcrest-core)))
12137 (home-page "https://approximatrix.com/products/openchart2/")
12138 (synopsis "Simple plotting for Java")
12139 (description "Openchart2 provides a simple, yet powerful, interface for
12140 Java programmers to create two-dimensional charts and plots. The library
12141 features an assortment of graph styles, including advanced scatter plots, bar
12142 graphs, and pie charts.")
12143 (license license:lgpl2.1+)))
12145 (define-public java-commons-httpclient
12147 (name "java-commons-httpclient")
12151 (uri (string-append "mirror://apache/httpcomponents/"
12152 "commons-httpclient/source/commons-httpclient-"
12153 version "-src.tar.gz"))
12156 "1wlpn3cfy3d4inxy6g7wxcsa8p7sshn6aldk9y4ia3lb879rd97r"))))
12157 (build-system ant-build-system)
12159 `(#:build-target "compile"
12160 #:test-target "test"
12161 #:tests? #f; requires junit-textui (junit 3)
12163 (modify-phases %standard-phases
12164 (add-before 'build 'fix-accent
12166 (for-each (lambda (file)
12167 (with-fluids ((%default-port-encoding "ISO-8859-1"))
12169 (("\\* @author Ortwin .*") "* @author Ortwin Glueck\n"))))
12170 '("src/java/org/apache/commons/httpclient/HttpContentTooLargeException.java"
12171 "src/examples/TrivialApp.java" "src/examples/ClientApp.java"
12172 "src/test/org/apache/commons/httpclient/TestHttps.java"
12173 "src/test/org/apache/commons/httpclient/TestURIUtil2.java"))
12176 (lambda* (#:key outputs #:allow-other-keys)
12177 (invoke "ant" "dist"
12178 (string-append "-Ddist.home=" (assoc-ref outputs "out")
12182 `(("java-commons-logging" ,java-commons-logging-minimal)
12183 ("java-commons-codec" ,java-commons-codec)))
12184 (home-page "https://hc.apache.org")
12185 (synopsis "HTTP/1.1 compliant HTTP agent implementation")
12186 (description "This package contains an HTTP/1.1 compliant HTTP agent
12187 implementation. It also provides reusable components for client-side
12188 authentication, HTTP state management, and HTTP connection management.")
12189 (license license:asl2.0)))
12191 (define-public java-commons-vfs
12193 (name "java-commons-vfs")
12197 (uri (string-append "mirror://apache/commons/vfs/source/"
12198 "commons-vfs2-distribution-" version "-src.tar.gz"))
12199 (file-name (string-append name "-" version ".tar.gz"))
12202 "1cnq1iaghbp4cslpnvwbp83i5v234x87irssqynhwpfgw7caf1s3"))
12203 (modules '((guix build utils)))
12206 (for-each delete-file
12207 (find-files "." "\\.jar$"))
12209 (build-system ant-build-system)
12211 `(#:jar-name "commons-vfs.jar"
12212 #:source-dir "commons-vfs2/src/main/java"
12213 #:test-dir "commons-vfs2/src/test"
12214 ; FIXME: tests depend on many things: apache sshd, hadoop, ftpserver, ...
12217 (modify-phases %standard-phases
12218 (add-before 'build 'remove-hadoop-and-webdav
12219 ; Remove these files as they are not required and depend on difficult
12222 (for-each delete-file-recursively
12223 '("commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/webdav"
12224 "commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/hdfs"))
12227 `(("java-commons-collections4" ,java-commons-collections4)
12228 ("java-commons-compress" ,java-commons-compress)
12229 ("java-commons-httpclient" ,java-commons-httpclient)
12230 ("java-commons-logging-minimal" ,java-commons-logging-minimal)
12231 ("java-commons-net" ,java-commons-net)
12232 ("java-jsch" ,java-jsch)))
12233 (home-page "https://commons.apache.org/proper/commons-vfs/")
12234 (synopsis "Java file system library")
12235 (description "Commons VFS provides a single API for accessing various
12236 different file systems. It presents a uniform view of the files from various
12237 different sources, such as the files on local disk, on an HTTP server, or
12238 inside a Zip archive.")
12239 (license license:asl2.0)))
12241 (define-public java-jakarta-oro
12243 (name "java-jakarta-oro")
12247 (uri (string-append "mirror://apache/jakarta/oro/"
12248 "jakarta-oro-" version ".tar.gz"))
12251 "0rpmnsskiwmsy8r0sckz5n5dbvh3vkxx8hpm177c754r8xy3qksc"))
12252 (modules '((guix build utils)))
12255 (delete-file (string-append "jakarta-oro-" ,version ".jar"))
12257 (build-system ant-build-system)
12259 `(#:build-target "package"
12260 #:make-flags (list "-DDATE" "(no recorded date for reproducibility)")
12261 #:tests? #f; tests are run as part of the build process
12263 (modify-phases %standard-phases
12265 (install-jars ,(string-append "jakarta-oro-" version))))))
12266 (home-page "https://jakarta.apache.org/oro/")
12267 (synopsis "Text-processing for Java")
12268 (description "The Jakarta-ORO Java classes are a set of text-processing
12269 Java classes that provide Perl5 compatible regular expressions, AWK-like
12270 regular expressions, glob expressions, and utility classes for performing
12271 substitutions, splits, filtering filenames, etc. This library is the successor
12272 of the OROMatcher, AwkTools, PerlTools, and TextTools libraries originally
12274 (license license:asl1.1)))
12276 (define-public java-native-access
12278 (name "java-native-access")
12282 (uri (string-append "https://github.com/java-native-access/jna/"
12283 "archive/" version ".tar.gz"))
12284 (file-name (string-append name "-" version ".tar.gz"))
12287 "0zrpzkib6b905i018a9pqlzkqinphywr6y4jwv6mwp63jjqvqkd9"))
12288 (modules '((guix build utils)))
12291 (for-each delete-file (find-files "." ".*.jar"))
12292 (delete-file-recursively "native/libffi")
12293 (delete-file-recursively "dist")
12295 (build-system ant-build-system)
12297 `(#:tests? #f; FIXME: tests require reflections.jar
12298 #:test-target "test"
12299 #:make-flags (list "-Ddynlink.native=true")
12301 (modify-phases %standard-phases
12302 (add-before 'build 'fix-build.xml
12303 (lambda* (#:key inputs #:allow-other-keys)
12304 (substitute* "build.xml"
12305 ;; Since we removed the bundled ant.jar, give the correct path
12306 (("lib/ant.jar") (string-append (assoc-ref inputs "ant") "/lib/ant.jar"))
12307 ;; We removed generated native libraries. We can only rebuild one
12308 ;; so don't fail if we can't find a native library for another architecture.
12309 (("zipfileset") "zipfileset erroronmissingarchive=\"false\""))
12310 ;; Copy test dependencies
12311 (copy-file (car (find-files (assoc-ref inputs "java-junit") "jar$"))
12313 (copy-file (car (find-files (assoc-ref inputs "java-hamcrest-core")
12315 "lib/hamcrest-core.jar")
12316 ;; FIXME: once reflections.jar is built, copy it to lib/test.
12318 (add-before 'build 'build-native
12320 (invoke "ant" "-Ddynlink.native=true" "native")
12323 (install-jars "build")))))
12325 `(("libffi" ,libffi)
12329 `(("java-junit" ,java-junit)
12330 ("java-hamcrest-core" ,java-hamcrest-core)))
12331 (home-page "https://github.com/java-native-access/jna")
12332 (synopsis "Access to native shared libraries from Java")
12333 (description "JNA provides Java programs easy access to native shared
12334 libraries without writing anything but Java code - no JNI or native code is
12335 required. JNA allows you to call directly into native functions using natural
12336 Java method invocation.")
12337 ;; Java Native Access project (JNA) is dual-licensed under 2
12338 ;; alternative Free licenses: LGPL 2.1 or later and Apache License 2.0.
12341 license:lgpl2.1+))))
12343 (define-public java-native-access-platform
12345 (inherit java-native-access)
12346 (name "java-native-access-platform")
12348 `(#:test-target "test"
12349 #:tests? #f; require jna-test.jar
12351 (modify-phases %standard-phases
12352 (add-before 'build 'chdir
12354 (chdir "contrib/platform")
12356 (add-after 'chdir 'fix-ant
12357 (lambda* (#:key inputs #:allow-other-keys)
12358 (substitute* "nbproject/project.properties"
12359 (("../../build/jna.jar")
12360 (string-append (assoc-ref inputs "java-native-access")
12361 "/share/java/jna.jar"))
12362 (("../../lib/hamcrest-core-.*.jar")
12363 (car (find-files (assoc-ref inputs "java-hamcrest-core")
12365 (("../../lib/junit.jar")
12366 (car (find-files (assoc-ref inputs "java-junit")
12370 (install-jars "dist")))))
12372 `(("java-native-access" ,java-native-access)))
12373 (synopsis "Cross-platform mappings for jna")
12374 (description "java-native-access-platform has cross-platform mappings
12375 and mappings for a number of commonly used platform functions, including a
12376 large number of Win32 mappings as well as a set of utility classes that
12377 simplify native access.")))
12379 (define-public java-jsch-agentproxy-core
12381 (name "java-jsch-agentproxy-core")
12385 (uri (string-append "https://github.com/ymnk/jsch-agent-proxy/archive/"
12386 version ".tar.gz"))
12387 (file-name (string-append name "-" version ".tar.gz"))
12390 "02iqg6jbc1kxvfzqcg6wy9ygqxfm82bw5rf6vnswqy4y572niz4q"))))
12391 (build-system ant-build-system)
12393 `(#:jar-name "jsch-agentproxy-core.jar"
12394 #:source-dir "jsch-agent-proxy-core/src/main/java"
12395 #:tests? #f)); no tests
12396 (home-page "https://github.com/ymnk/jsch-agent-proxy")
12397 (synopsis "Core component of the proxy to ssh-agent and Pageant in Java")
12398 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
12399 and Pageant included Putty. It will be easily integrated into JSch, and users
12400 will be allowed to use these programs for authentication.")
12401 (license license:bsd-3)))
12403 (define-public java-jsch-agentproxy-sshagent
12405 (inherit java-jsch-agentproxy-core)
12406 (name "java-jsch-agentproxy-sshagent")
12408 `(#:jar-name "jsch-agentproxy-sshagent.jar"
12409 #:source-dir "jsch-agent-proxy-sshagent/src/main/java"
12410 #:tests? #f)); no tests
12412 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
12413 (synopsis "Proxy to ssh-agent")
12414 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
12415 and Pageant included in Putty. This component contains the code for a proxy to
12418 (define-public java-jsch-agentproxy-usocket-jna
12420 (inherit java-jsch-agentproxy-core)
12421 (name "java-jsch-agentproxy-usocket-jna")
12423 `(#:jar-name "jsch-agentproxy-usocket-jna.jar"
12424 #:source-dir "jsch-agent-proxy-usocket-jna/src/main/java"
12425 #:tests? #f)); no tests
12427 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
12428 ("java-native-access" ,java-native-access)))
12429 (synopsis "USocketFactory implementation using JNA")
12430 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
12431 and Pageant included in Putty. This component contains an implementation of
12432 USocketFactory using @dfn{JNA} (Java Native Access).")))
12434 (define-public java-jsch-agentproxy-pageant
12436 (inherit java-jsch-agentproxy-core)
12437 (name "java-jsch-agentproxy-pageant")
12439 `(#:jar-name "jsch-agentproxy-pageant.jar"
12440 #:source-dir "jsch-agent-proxy-pageant/src/main/java"
12441 #:tests? #f)); no tests
12443 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
12444 ("java-native-access" ,java-native-access)
12445 ("java-native-access-platform" ,java-native-access-platform)))
12446 (synopsis "Proxy to pageant")
12447 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
12448 and Pageant included in Putty. This component contains the code for a proxy to
12451 (define-public java-jsch-agentproxy-usocket-nc
12453 (inherit java-jsch-agentproxy-core)
12454 (name "java-jsch-agentproxy-usocket-nc")
12456 `(#:jar-name "jsch-agentproxy-usocket-nc.jar"
12457 #:source-dir "jsch-agent-proxy-usocket-nc/src/main/java"
12458 #:tests? #f)); no tests
12460 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
12461 (synopsis "USocketFactory implementation using netcat")
12462 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
12463 and Pageant included in Putty. This component contains an implementation of
12464 USocketFactory using netcat.")))
12466 (define-public java-jsch-agentproxy-connector-factory
12468 (inherit java-jsch-agentproxy-core)
12469 (name "java-jsch-agentproxy-connector-factory")
12471 `(#:jar-name "jsch-agentproxy-connector-factory.jar"
12472 #:source-dir "jsch-agent-proxy-connector-factory/src/main/java"
12473 #:tests? #f)); no tests
12475 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
12476 ("java-jsch-agentproxy-sshagent" ,java-jsch-agentproxy-sshagent)
12477 ("java-jsch-agentproxy-usocket-jna" ,java-jsch-agentproxy-usocket-jna)
12478 ("java-jsch-agentproxy-pageant" ,java-jsch-agentproxy-pageant)
12479 ("java-jsch-agentproxy-usocket-nc" ,java-jsch-agentproxy-usocket-nc)))
12480 (synopsis "Connector factory for jsch agent proxy")
12481 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
12482 and Pageant included in Putty. This component contains a connector factory.")))
12484 (define-public java-jsch-agentproxy-jsch
12486 (inherit java-jsch-agentproxy-core)
12487 (name "java-jsch-agentproxy-jsch")
12489 `(#:jar-name "jsch-agentproxy-jsch.jar"
12490 #:source-dir "jsch-agent-proxy-jsch/src/main/java"
12491 #:tests? #f)); no tests
12493 `(("java-jsch" ,java-jsch)
12494 ("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
12495 (synopsis "JSch integration library for agentproxy")
12496 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
12497 and Pageant included in Putty. This component contains a library to use
12498 jsch-agent-proxy with JSch.")))
12500 (define-public java-apache-ivy
12502 (name "java-apache-ivy")
12506 (uri (string-append "mirror://apache//ant/ivy/" version
12507 "/apache-ivy-" version "-src.tar.gz"))
12510 "1xkfn57g2m7l6y0xdq75x5rnrgk52m9jx2xah70g3ggl8750hbr0"))
12513 "java-apache-ivy-port-to-latest-bouncycastle.patch"))))
12514 (build-system ant-build-system)
12516 `(#:jar-name "ivy.jar"
12519 (modify-phases %standard-phases
12520 (add-before 'build 'remove-example
12522 (delete-file-recursively "src/example")
12524 (add-before 'build 'copy-resources
12526 (with-directory-excursion "src/java"
12527 (for-each (lambda (file)
12528 (install-file file (string-append "../../build/classes/" (dirname file))))
12530 (find-files "." ".*.css")
12531 (find-files "." ".*.ent")
12532 (find-files "." ".*.html")
12533 (find-files "." ".*.properties")
12534 (find-files "." ".*.xsd")
12535 (find-files "." ".*.xsl")
12536 (find-files "." ".*.xml"))))
12538 (add-before 'build 'fix-vfs
12541 '("src/java/org/apache/ivy/plugins/repository/vfs/VfsRepository.java"
12542 "src/java/org/apache/ivy/plugins/repository/vfs/VfsResource.java")
12543 (("import org.apache.commons.vfs") "import org.apache.commons.vfs2"))
12545 (add-before 'install 'copy-manifest
12547 (install-file "META-INF/MANIFEST.MF" "build/classes/META-INF")
12549 (add-before 'install 'repack
12551 (invoke "jar" "-cmf" "build/classes/META-INF/MANIFEST.MF" "build/jar/ivy.jar"
12552 "-C" "build/classes" ".")))
12553 (add-after 'install 'install-bin
12554 (lambda* (#:key outputs #:allow-other-keys)
12555 (let* ((bin (string-append (assoc-ref outputs "out") "/bin"))
12556 (ivy (string-append bin "/ivy"))
12557 (jar (string-append (assoc-ref outputs "out") "/share/java/ivy.jar")))
12559 (with-output-to-file ivy
12561 (display (string-append
12562 "#!" (which "sh") "\n"
12563 "if [[ -z $CLASSPATH ]]; then\n"
12564 " cp=\"" (getenv "CLASSPATH") ":" jar "\"\n"
12566 " cp=\"" (getenv "CLASSPATH") ":" jar ":$CLASSPATH\"\n"
12568 (which "java") " -cp $cp org.apache.ivy.Main $@\n"))))
12572 `(("java-bouncycastle" ,java-bouncycastle)
12573 ("java-commons-cli" ,java-commons-cli)
12574 ("java-commons-collections" ,java-commons-collections)
12575 ("java-commons-httpclient" ,java-commons-httpclient)
12576 ("java-commons-lang" ,java-commons-lang)
12577 ("java-commons-vfs" ,java-commons-vfs)
12578 ("java-jakarta-oro" ,java-jakarta-oro)
12579 ("java-jsch" ,java-jsch)
12580 ("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
12581 ("java-jsch-agentproxy-connector-factory" ,java-jsch-agentproxy-connector-factory)
12582 ("java-jsch-agentproxy-jsch" ,java-jsch-agentproxy-jsch)
12583 ("java-junit" ,java-junit)))
12584 (home-page "https://ant.apache.org/ivy")
12585 (synopsis "Dependency manager for the Java programming language")
12586 (description "Ivy is a tool for managing (recording, tracking, resolving
12587 and reporting) project dependencies. It is characterized by the following:
12590 @item flexibility and configurability - Ivy is essentially process agnostic
12591 and is not tied to any methodology or structure. Instead it provides the
12592 necessary flexibility and configurability to be adapted to a broad range
12593 of dependency management and build processes.
12594 @item tight integration with Apache Ant - while available as a standalone tool,
12595 Ivy works particularly well with Apache Ant providing a number of
12596 powerful Ant tasks ranging from dependency resolution to dependency
12597 reporting and publication.
12599 (license license:asl2.0)))
12601 (define-public java-eclipse-sisu-inject
12603 (name "java-eclipse-sisu-inject")
12607 (uri (git-reference
12608 (url "https://github.com/eclipse/sisu.inject/")
12609 (commit (string-append "releases/" version))))
12610 (file-name (git-file-name name version))
12613 "16044sizdb0rjbhlfbmcnpds5y7by7dyn9b0c11606aikqi8k3x6"))))
12614 (build-system ant-build-system)
12616 `(#:jar-name "eclipse-sisu-inject.jar"
12617 #:source-dir "org.eclipse.sisu.inject/src"
12618 #:tests? #f; no tests
12620 (modify-phases %standard-phases
12622 (install-from-pom "org.eclipse.sisu.inject/pom.xml")))))
12624 `(("java-guice" ,java-guice)
12625 ("java-sisu-inject-parent-pom" ,java-sisu-inject-parent-pom)))
12627 `(("java-guice-servlet" ,java-guice-servlet)
12628 ("java-javax-inject" ,java-javax-inject)
12629 ("java-javaee-servletapi" ,java-javaee-servletapi)
12630 ("java-junit" ,java-junit)
12631 ("java-slf4j-api" ,java-slf4j-api)
12632 ("java-jsr305" ,java-jsr305)
12633 ("java-jsr250" ,java-jsr250)
12634 ("java-cdi-api" ,java-cdi-api)
12635 ("java-osgi-framework" ,java-osgi-framework)
12636 ("java-osgi-util-tracker" ,java-osgi-util-tracker)
12637 ("java-testng" ,java-testng)))
12638 (home-page "https://www.eclipse.org/sisu/")
12639 (synopsis "Classpath scanning, auto-binding, and dynamic auto-wiring")
12640 (description "Sisu is a modular JSR330-based container that supports
12641 classpath scanning, auto-binding, and dynamic auto-wiring. Sisu uses
12642 Google-Guice to perform dependency injection and provide the core JSR330
12643 support, but removes the need to write explicit bindings in Guice modules.
12644 Integration with other containers via the Eclipse Extension Registry and the
12645 OSGi Service Registry is a goal of this project.")
12646 (license license:epl1.0)))
12648 (define java-sisu-inject-parent-pom
12650 (inherit java-eclipse-sisu-inject)
12651 (name "java-sisu-inject-parent-pom")
12655 (modify-phases %standard-phases
12656 (delete 'configure)
12659 (install-pom-file "pom.xml")))))
12660 (propagated-inputs '())))
12662 (define-public java-eclipse-sisu-plexus
12664 (name "java-eclipse-sisu-plexus")
12668 (uri (git-reference
12669 (url "https://github.com/eclipse/sisu.plexus")
12670 (commit (string-append "releases/" version))))
12671 (file-name (git-file-name name version))
12674 "17mjlajnsqnk07cc58h1qpxrif85yb2m2y0pyba48yjjgikk8r9f"))
12675 (modules '((guix build utils)))
12678 (for-each delete-file (find-files "." ".*.jar"))
12679 (rename-file "org.eclipse.sisu.plexus.tests/src"
12680 "org.eclipse.sisu.plexus.tests/java")
12682 (build-system ant-build-system)
12684 `(#:jar-name "eclipse-sisu-plexus.jar"
12685 #:source-dir "org.eclipse.sisu.plexus/src"
12686 #:test-dir "org.eclipse.sisu.plexus.tests"
12689 ;; This test fails probably because we can't generate the necessary
12691 "**/PlexusLoggingTest.*"
12692 ;; FIXME: This test fails because of some injection error
12693 "**/PlexusRequirementTest.*")
12696 (modify-phases %standard-phases
12697 (add-before 'build 'copy-resources
12699 (install-file "org.eclipse.sisu.plexus/META-INF/plexus/components.xml"
12700 "build/classes/META-INF/plexus")
12702 (add-before 'check 'build-test-jar
12704 (with-directory-excursion "org.eclipse.sisu.plexus.tests/resources/component-jar/src/main/"
12706 (with-directory-excursion "java"
12707 (apply invoke "javac" "-cp"
12708 (string-append (getenv "CLASSPATH")
12709 ":../../../../../build/classes")
12710 (find-files "." ".*.java"))
12711 (for-each (lambda (file) (install-file file (string-append "../build/" file)))
12712 (find-files "." ".*.jar")))
12713 (mkdir-p "build/META-INF/plexus")
12714 (copy-file "resources/META-INF/plexus/components.xml"
12715 "build/META-INF/plexus/components.xml")
12716 (with-directory-excursion "build"
12717 (invoke "jar" "cf" "../../../component-jar-0.1.jar" ".")))
12718 (with-directory-excursion "org.eclipse.sisu.plexus.tests/"
12719 (copy-recursively "META-INF" "../build/test-classes/META-INF")
12720 (substitute* "java/org/eclipse/sisu/plexus/DefaultPlexusContainerTest.java"
12721 (("resources/component-jar")
12722 "org.eclipse.sisu.plexus.tests/resources/component-jar")))
12725 (install-from-pom "org.eclipse.sisu.plexus/pom.xml")))))
12727 `(("java-plexus-classworlds" ,java-plexus-classworlds)
12728 ("java-plexus-utils" ,java-plexus-utils)
12729 ("java-plexus-component-annotations" ,java-plexus-component-annotations)
12730 ("java-cdi-api" ,java-cdi-api)
12731 ("java-eclipse-sisu-inject" ,java-eclipse-sisu-inject)
12732 ("java-sisu-plexus-parent-pom" ,java-sisu-plexus-parent-pom)))
12734 `(("java-osgi-framework" ,java-osgi-framework)
12735 ("java-slf4j-api" ,java-slf4j-api)
12736 ("java-javax-inject" ,java-javax-inject)
12737 ("java-guice" ,java-guice)
12738 ("java-guava" ,java-guava)
12739 ("java-aopalliance" ,java-aopalliance)
12740 ("java-asm" ,java-asm)
12741 ("java-cglib" ,java-cglib)))
12743 `(("java-junit" ,java-junit)))
12744 (home-page "https://www.eclipse.org/sisu/")
12745 (synopsis "Plexus support for the sisu container")
12746 (description "Sisu is a modular JSR330-based container that supports
12747 classpath scanning, auto-binding, and dynamic auto-wiring. This package
12748 adds Plexus support to the Sisu-Inject container.")
12749 (license license:epl1.0)))
12751 (define java-sisu-plexus-parent-pom
12753 (inherit java-eclipse-sisu-plexus)
12754 (name "java-sisu-plexus-parent-pom")
12758 (modify-phases %standard-phases
12759 (delete 'configure)
12762 (install-pom-file "pom.xml")))))
12764 `(("java-sonatype-oss-parent-pom-9" ,java-sonatype-oss-parent-pom-9)))))
12766 (define-public java-commons-compiler
12768 (name "java-commons-compiler")
12772 (uri (git-reference
12773 (url "https://github.com/janino-compiler/janino")
12774 (commit "91aa95686d1e4ca3b16a984a03a38686572331b2")))
12775 (file-name (string-append name "-" version))
12778 "04hfdl59sgh20qkxzgnibvs8f9hy6n7znxwpk611y5d89977y62r"))
12779 (modules '((guix build utils)))
12782 (for-each delete-file
12783 (find-files "." "\\.jar$"))
12785 (build-system ant-build-system)
12787 `(#:jar-name "commons-compiler.jar"
12788 #:source-dir "commons-compiler/src/main"
12789 #:tests? #f)); no tests
12790 (home-page "https://github.com/janino-compiler/janino")
12791 (synopsis "Java compiler")
12792 (description "Commons-compiler contains an API for janino, including the
12793 @code{IExpressionEvaluator}, @code{IScriptEvaluator}, @code{IClassBodyEvaluator}
12794 and @code{ISimpleCompiler} interfaces.")
12795 (license license:bsd-3)))
12797 (define-public java-janino
12799 (inherit java-commons-compiler)
12800 (name "java-janino")
12802 `(#:jar-name "janino.jar"
12803 #:source-dir "src/main/java"
12805 (modify-phases %standard-phases
12806 (add-before 'configure 'chdir
12811 `(("java-commons-compiler" ,java-commons-compiler)))
12813 `(("java-junit" ,java-junit)
12814 ("java-hamcrest-core" ,java-hamcrest-core)))
12815 (description "Janino is a Java compiler. Janino can compile a set of
12816 source files to a set of class files like @code{javac}, but also compile a
12817 Java expression, block, class body or source file in memory, load the bytecode
12818 and execute it directly in the same JVM. @code{janino} can also be used for
12819 static code analysis or code manipulation.")))
12821 (define-public java-logback-core
12823 (name "java-logback-core")
12827 (uri (string-append "https://github.com/qos-ch/logback/archive/v_"
12828 version ".tar.gz"))
12829 (file-name (string-append name "-" version ".tar.gz"))
12832 "1x6ga74yfgm94cfx98gybakbrlilx8i2gn6dx13l40kasmys06mi"))
12833 (modules '((guix build utils)))
12836 (delete-file-recursively "logback-access/lib")
12838 (build-system ant-build-system)
12840 `(#:jar-name "logback.jar"
12841 #:source-dir "src/main/java"
12842 #:test-dir "src/test"
12844 ;; These tests fail with Unable to set MockitoNamingPolicy on cglib generator
12845 ;; which creates FastClasses
12846 (list "**/AllCoreTest.*"
12847 "**/AutoFlushingObjectWriterTest.*"
12849 "**/ResilientOutputStreamTest.*"
12850 ;; And we still don't want to run abstract classes
12853 (modify-phases %standard-phases
12854 (add-before 'configure 'chdir
12856 (chdir "logback-core")
12859 `(("java-javax-mail" ,java-javax-mail)
12860 ("servlet" ,java-javaee-servletapi)
12861 ("java-commons-compiler" ,java-commons-compiler)
12862 ("java-janino" ,java-janino)))
12864 `(("java-junit" ,java-junit)
12865 ("java-hamcrest-core" ,java-hamcrest-core)
12866 ("java-mockito-1" ,java-mockito-1)
12867 ("java-cglib" ,java-cglib)
12868 ("java-asm" ,java-asm)
12869 ("java-objenesis" ,java-objenesis)
12870 ("java-joda-time" ,java-joda-time)))
12871 (home-page "https://logback.qos.ch")
12872 (synopsis "Logging for java")
12873 (description "Logback is intended as a successor to the popular log4j project.
12874 This module lays the groundwork for the other two modules.")
12875 ;; Either epl1.0 or lgpl2.1
12876 (license (list license:epl1.0
12877 license:lgpl2.1))))
12879 (define-public java-logback-classic
12881 (inherit java-logback-core)
12882 (name "java-logback-classic")
12884 `(#:jar-name "logback-classic.jar"
12885 #:source-dir "src/main/java"
12886 #:test-dir "src/test"
12887 #:tests? #f; tests require more packages: h2, greenmail, hsql, subethamail, slf4j, log4j, felix
12890 (modify-phases %standard-phases
12891 (add-before 'configure 'chdir
12893 (chdir "logback-classic")
12896 (lambda* (#:key inputs #:allow-other-keys)
12897 (mkdir-p "build/classes")
12898 (setenv "CLASSPATH"
12900 (apply append (map (lambda (input)
12901 (find-files (assoc-ref inputs input)
12903 '("java-logback-core" "java-slf4j-api"
12904 "java-commons-compiler" "servlet"
12907 (apply invoke "groovyc" "-d" "build/classes" "-j"
12908 (find-files "src/main/" ".*\\.(groovy|java)$"))
12909 (invoke "ant" "jar")
12912 `(("java-logback-core" ,java-logback-core)
12913 ("java-slf4j-api" ,java-slf4j-api)
12914 ,@(package-inputs java-logback-core)))
12916 `(("groovy" ,groovy)))
12917 (description "Logback is intended as a successor to the popular log4j project.
12918 This module can be assimilated to a significantly improved version of log4j.
12919 Moreover, @code{logback-classic} natively implements the slf4j API so that you
12920 can readily switch back and forth between logback and other logging frameworks
12921 such as log4j or @code{java.util.logging} (JUL).")))
12923 (define-public java-jgit
12926 (version "4.7.0.201704051617-r")
12929 (uri (string-append "https://repo1.maven.org/maven2/"
12930 "org/eclipse/jgit/org.eclipse.jgit/"
12931 version "/org.eclipse.jgit-"
12932 version "-sources.jar"))
12935 "13ii4jn02ynzq6i7gsyi21k2i94jpc85wf6bcm31q4cyvzv0mk4k"))))
12936 (build-system ant-build-system)
12938 `(#:tests? #f ; There are no tests to run.
12939 #:jar-name "jgit.jar"
12940 ;; JGit must be built with a JDK supporting Java 8.
12942 ;; Target our older default JDK.
12943 #:make-flags (list "-Dtarget=1.7")
12945 (modify-phases %standard-phases
12946 ;; The jar file generated by the default build.xml does not include
12947 ;; the text properties files, so we need to add them.
12948 (add-after 'build 'add-properties
12949 (lambda* (#:key jar-name #:allow-other-keys)
12950 (with-directory-excursion "src"
12951 (apply invoke "jar" "-uf"
12952 (string-append "../build/jar/" jar-name)
12953 (find-files "." "\\.properties$")))
12956 `(("java-classpathx-servletapi" ,java-classpathx-servletapi)
12957 ("java-javaewah" ,java-javaewah)
12958 ("java-jsch" ,java-jsch)
12959 ("java-slf4j-api" ,java-slf4j-api)))
12960 (home-page "https://eclipse.org/jgit/")
12961 (synopsis "Java library implementing the Git version control system")
12962 (description "JGit is a lightweight, pure Java library implementing the
12963 Git version control system, providing repository access routines, support for
12964 network protocols, and core version control algorithms.")
12965 (license license:edl1.0)))
12967 ;; For axoloti. This package can still be built with icedtea-7, which is
12968 ;; currently used as the default JDK.
12969 (define-public java-jgit-4.2
12970 (package (inherit java-jgit)
12971 (version "4.2.0.201601211800-r")
12974 (uri (string-append "https://repo1.maven.org/maven2/"
12975 "org/eclipse/jgit/org.eclipse.jgit/"
12976 version "/org.eclipse.jgit-"
12977 version "-sources.jar"))
12980 "15gm537iivhnzlkjym4x3wn5jqdjdragsw9pdpzqqg21nrc817mm"))))
12981 (build-system ant-build-system)
12983 (substitute-keyword-arguments (package-arguments java-jgit)
12984 ;; Build for default JDK.
12985 ((#:jdk _) icedtea-7)
12987 `(modify-phases ,phases
12988 (add-after 'unpack 'use-latest-javaewah-API
12990 (substitute* "src/org/eclipse/jgit/internal/storage/file/BitmapIndexImpl.java"
12991 (("wordinbits") "WORD_IN_BITS"))
12994 `(("java-javaewah" ,java-javaewah)
12995 ("java-jsch" ,java-jsch)
12996 ("java-slf4j-api" ,java-slf4j-api)))))
12998 (define-public abcl
13005 (uri (string-append "https://abcl.org/releases/"
13006 version "/abcl-src-" version ".tar.gz"))
13009 "0hvbcsffr8n2xwdixc8wyw1bfl9fxn2gyy0c4nma7j9zbn0wwgw9"))
13012 "abcl-fix-build-xml.patch"))))
13013 (build-system ant-build-system)
13015 `(("java-junit" ,java-junit)))
13017 `(#:build-target "abcl.jar"
13018 #:test-target "abcl.test"
13020 (modify-phases %standard-phases
13022 (lambda* (#:key outputs #:allow-other-keys)
13023 (let ((share (string-append (assoc-ref outputs "out")
13025 (bin (string-append (assoc-ref outputs "out")
13028 (install-file "dist/abcl.jar" share)
13029 (install-file "dist/abcl-contrib.jar" share)
13031 (with-output-to-file (string-append bin "abcl")
13033 (let ((classpath (string-append
13036 share "abcl-contrib.jar")))
13037 (display (string-append
13038 "#!" (which "sh") "\n"
13039 "if [[ -z $CLASSPATH ]]; then\n"
13040 " cp=\"" classpath "\"\n"
13042 " cp=\"" classpath ":$CLASSPATH\"\n"
13044 "exec " (which "java")
13045 " -cp $cp org.armedbear.lisp.Main $@\n")))))
13046 (chmod (string-append bin "abcl") #o755)
13048 (home-page "https://abcl.org/")
13049 (synopsis "Common Lisp Implementation on the JVM")
13051 "@dfn{Armed Bear Common Lisp} (ABCL) is a full implementation of the Common
13052 Lisp language featuring both an interpreter and a compiler, running in the
13053 JVM. It supports JSR-223 (Java scripting API): it can be a scripting engine
13054 in any Java application. Additionally, it can be used to implement (parts of)
13055 the application using Java to Lisp integration APIs.")
13056 (license (list license:gpl2+
13057 ;; named-readtables is released under 3 clause BSD
13059 ;; jfli is released under CPL 1.0
13062 (define-public java-jsonp-api
13064 (name "java-jsonp-api")
13068 (uri (git-reference
13069 (url "https://github.com/eclipse-ee4j/jsonp")
13070 (commit (string-append "1.1-" version "-RELEASE"))))
13071 (file-name (git-file-name name version))
13074 "0zrj03hkr3jdmqlb4ipjr37cqpp2q2814qpmxi7srlwpdqs0ibgc"))))
13075 (build-system ant-build-system)
13077 `(#:jar-name "jsonp-api.jar"
13079 #:source-dir "api/src/main/java"
13080 #:test-dir "api/src/test"))
13081 (home-page "https://eclipse-ee4j.github.io/jsonp/")
13082 (synopsis "JSON Processing in Java")
13083 (description "JSON Processing (JSON-P) is a Java API to process (e.g.
13084 parse, generate, transform and query) JSON messages. It produces and
13085 consumes JSON text in a streaming fashion (similar to StAX API for XML)
13086 and allows building a Java object model for JSON text using API classes
13087 (similar to DOM API for XML).")
13088 ;; either gpl2 only with classpath exception, or epl2.0.
13089 (license (list license:gpl2
13092 (define-public java-jsonp-impl
13094 (inherit java-jsonp-api)
13095 (name "java-jsonp-impl")
13097 `(#:jar-name "jsonp-impl.jar"
13099 #:source-dir "impl/src/main/java"
13100 #:test-dir "impl/src/test"
13102 (modify-phases %standard-phases
13103 (add-before 'build 'copy-resources
13106 "impl/src/main/resources/"
13110 `(("java-jsonp-api" ,java-jsonp-api)))
13111 (description "JSON Processing (JSON-P) is a Java API to process (e.g.
13112 parse, generate, transform and query) JSON messages. This package contains
13113 a reference implementation of that API.")))
13115 (define-public java-xmp
13121 (uri (string-append "http://download.macromedia.com/pub/developer"
13122 "/xmp/sdk/XMPCoreJava-" version ".zip"))
13125 "14nai2mmsg7l5ya2y5mx4w4lr1az3sk2fjz6hiy4zdrsavgvl1g7"))))
13126 (build-system ant-build-system)
13128 `(#:build-target "build"
13129 #:tests? #f; no tests
13131 (modify-phases %standard-phases
13132 (add-after 'unpack 'chdir
13136 (add-before 'build 'fix-timestamp
13138 (substitute* "build.xml"
13139 (("\\$\\{BuildDate\\}") "1970 Jan 01 00:00:00-GMT"))
13142 (install-jars "."))
13143 (add-after 'install 'install-doc
13144 (lambda* (#:key outputs #:allow-other-keys)
13147 (string-append (assoc-ref outputs "out") "/share/doc/java-xmp"))
13150 `(("unzip" ,unzip)))
13151 (home-page "https://www.adobe.com/devnet/xmp.html")
13152 (synopsis "Extensible Metadat Platform (XMP) support in Java")
13153 (description "Adobe's Extensible Metadata Platform (XMP) is a labeling
13154 technology that allows you to embed data about a file, known as metadata,
13155 into the file itself. The XMP Toolkit for Java is based on the C++ XMPCore
13156 library and the API is similar.")
13157 (license license:bsd-3)))
13159 (define-public java-metadata-extractor
13161 (name "java-metadata-extractor")
13165 (uri (git-reference
13166 (url "https://github.com/drewnoakes/metadata-extractor")
13168 (file-name (git-file-name name version))
13171 "06yrq0swrl1r40yjbk5kqzjxr04jlkq9lfi711jvfgjf5kp2qinj"))))
13172 (build-system ant-build-system)
13174 `(#:jar-name "metadata-extractor.jar"
13175 #:source-dir "Source"
13178 (modify-phases %standard-phases
13179 (add-before 'check 'fix-test-dir
13181 (substitute* "build.xml"
13182 (("/java\">") "\">"))
13185 `(("java-xmp" ,java-xmp)))
13187 `(("java-hamcrest-core" ,java-hamcrest-core)
13188 ("java-junit" ,java-junit)))
13189 (home-page "https://github.com/drewnoakes/metadata-extractor")
13190 (synopsis "Extract metadata from image and video files")
13191 (description "Metadata-extractor is a straightforward Java library for
13192 reading metadata from image files. It is able to read metadata in Exif,
13193 IPTC, XMP, ICC and more formats.")
13194 (license license:asl2.0)))
13196 (define-public java-svg-salamander
13198 (name "java-svg-salamander")
13202 (uri (git-reference
13203 (url "https://github.com/blackears/svgSalamander")
13204 (commit (string-append "v" version))))
13205 (file-name (git-file-name name version))
13208 "1zv3kjdkf6iqf02x6ln76254y634j2ji448y706a65lsbfjmmicf"))
13209 (modules '((guix build utils)))
13212 (for-each delete-file (find-files "." ".*.jar"))
13215 (search-patches "java-svg-salamander-Fix-non-det.patch"))))
13216 (build-system ant-build-system)
13218 `(#:tests? #f; no tests
13220 (modify-phases %standard-phases
13221 (add-after 'unpack 'chdir
13225 (add-before 'build 'copy-jars
13226 (lambda* (#:key inputs #:allow-other-keys)
13227 (copy-file (car (find-files (assoc-ref inputs "javacc") "\\.jar$"))
13228 "../libraries/javacc.jar")
13229 (copy-file (car (find-files (assoc-ref inputs "ant") "ant\\.jar$"))
13230 "../libraries/ant.jar")
13233 (install-jars "dist")))))
13235 `(("javacc" ,javacc)))
13236 (home-page "https://github.com/blackears/svgSalamander")
13237 (synopsis "SVG engine for Java")
13238 (description "SVG Salamander is an SVG engine for Java that's designed
13239 to be small, fast, and allow programmers to use it with a minimum of fuss.
13240 It's in particular targeted for making it easy to integrate SVG into Java
13241 games and making it much easier for artists to design 2D game content - from
13242 rich interactive menus to charts and graphcs to complex animations.")
13243 (license license:bsd-2)))
13245 (define-public java-jboss-transaction-api-spec
13247 (name "java-jboss-transaction-api-spec")
13248 (version "1.2+1.1.1")
13251 (uri (git-reference
13252 (url "https://github.com/jboss/jboss-transaction-api_spec")
13253 (commit "jboss-transaction-api_1.2_spec-1.1.1.Final")))
13254 (file-name (git-file-name name version))
13257 "1xbfq5hvb86izflydxrqqv3k26c1ba2m0ap6m97shqrsdi9by4wy"))))
13258 (build-system ant-build-system)
13260 `(#:jar-name "java-jboss-transaction-api_spec.jar"
13261 #:source-dir "src/main/java"
13262 #:tests? #f)); no tests
13264 `(("java-cdi-api" ,java-cdi-api)
13265 ("java-jboss-interceptors-api-spec" ,java-jboss-interceptors-api-spec)))
13266 (home-page "https://github.com/jboss/jboss-transaction-api_spec")
13267 (synopsis "Generic transaction management API in Java")
13268 (description "Java-jboss-transaction-api-spec implements the Transactions
13269 API. A transaction is a unit of work containing one or more operations
13270 involving one or more shared resources having ACID (Atomicity, Consistency,
13271 Isolation and Durability) properties.")
13272 ;; either gpl2 only with classpath exception or cddl.
13273 (license (list license:gpl2 license:cddl1.0))))
13275 (define-public java-picocli
13277 (name "java-picocli")
13281 (uri (git-reference
13282 (url "https://github.com/remkop/picocli")
13283 (commit (string-append "v" version))))
13284 (file-name (git-file-name name version))
13287 "1sxp6rxjfgjd98ly14b3d15dvxkm5wg4g46w12jyhmr0kmkaca3c"))))
13288 (build-system ant-build-system)
13290 `(#:jar-name "picocli.jar"
13291 #:source-dir "src/main/java"
13292 ;; Tests require missing dependencies (junitparams, system-rules)
13294 (home-page "https://picocli.info")
13295 (synopsis "REPL for the JVM")
13296 (description "Picocli is a framework for building command line applications
13297 for the JVM. It supports colors, autocompletion, subcommands, and more. Written
13298 in Java, usable from Groovy, Kotlin, Scala, etc.")
13299 (license license:asl2.0)))
13301 (define-public java-jetbrains-annotations
13303 (name "java-jetbrains-annotations")
13307 (uri (git-reference
13308 (url "https://github.com/JetBrains/java-annotations")
13310 (file-name (git-file-name name version))
13313 "0z6i1xs60cd5ffz23c49sq68wn5mphhs3xpar1n93ppama2ng80v"))))
13314 (build-system ant-build-system)
13316 `(#:jar-name "jetbrains-annotations.jar"
13317 #:source-dir "common/src/main/java:java8/src/main/java"
13318 #:tests? #f)); no tests
13319 (home-page "https://github.com/JetBrains/java-annotations")
13320 (synopsis "Annotations for Java and other JVM languages")
13321 (description "This package contains a set of Java annotations which can be
13322 used in JVM-based languages. They serve as an additional documentation and
13323 can be interpreted by IDEs and static analysis tools to improve code analysis.")
13324 (license license:expat)))