1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 Ricardo Wurmus <rekado@elephly.net>
3 ;;; Copyright © 2016 Leo Famulari <leo@famulari.name>
4 ;;; Copyright © 2016, 2017 Roel Janssen <roel@gnu.org>
5 ;;; Copyright © 2017, 2019 Carlo Zancanaro <carlo@zancanaro.id.au>
6 ;;; Copyright © 2017-2020 Julien Lepiller <julien@lepiller.eu>
7 ;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be>
8 ;;; Copyright © 2016, 2017, 2018 Alex Vong <alexvong1995@gmail.com>
9 ;;; Copyright © 2017, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
10 ;;; Copyright © 2018, 2019 Gábor Boskovits <boskovits@gmail.com>
11 ;;; Copyright © 2018 Chris Marusich <cmmarusich@gmail.com>
12 ;;; Copyright © 2018, 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
13 ;;; Copyright © 2019, 2020 Björn Höfling <bjoern.hoefling@bjoernhoefling.de>
14 ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
15 ;;; Copyright © 2020 Raghav Gururajan <raghavgururajan@disroot.org>
16 ;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
18 ;;; This file is part of GNU Guix.
20 ;;; GNU Guix is free software; you can redistribute it and/or modify it
21 ;;; under the terms of the GNU General Public License as published by
22 ;;; the Free Software Foundation; either version 3 of the License, or (at
23 ;;; your option) any later version.
25 ;;; GNU Guix is distributed in the hope that it will be useful, but
26 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
27 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28 ;;; GNU General Public License for more details.
30 ;;; You should have received a copy of the GNU General Public License
31 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
33 (define-module (gnu packages java)
34 #:use-module ((guix licenses) #:prefix license:)
35 #:use-module (guix packages)
36 #:use-module (guix download)
37 #:use-module (guix hg-download)
38 #:use-module (guix git-download)
39 #:use-module (guix svn-download)
40 #:use-module ((guix build utils) #:select (alist-replace))
41 #:use-module (guix utils)
42 #:use-module (guix build-system ant)
43 #:use-module (guix build-system gnu)
44 #:use-module (guix build-system trivial)
45 #:use-module (gnu packages)
46 #:use-module (gnu packages attr)
47 #:use-module (gnu packages autotools)
48 #:use-module (gnu packages base)
49 #:use-module (gnu packages bash)
50 #:use-module (gnu packages certs)
51 #:use-module (gnu packages cpio)
52 #:use-module (gnu packages cups)
53 #:use-module (gnu packages compression)
54 #:use-module (gnu packages elf)
55 #:use-module (gnu packages fontutils)
56 #:use-module (gnu packages gawk)
57 #:use-module (gnu packages gettext)
58 #:use-module (gnu packages gl)
59 #:use-module (gnu packages ghostscript) ;lcms
60 #:use-module (gnu packages gnome)
61 #:use-module (gnu packages groovy)
62 #:use-module (gnu packages gtk)
63 #:use-module (gnu packages guile)
64 #:use-module (gnu packages icu4c)
65 #:use-module (gnu packages image)
66 #:use-module (gnu packages java-compression)
67 #:use-module (gnu packages libffi)
68 #:use-module (gnu packages linux) ;alsa
69 #:use-module (gnu packages maths)
70 #:use-module (gnu packages maven)
71 #:use-module (gnu packages maven-parent-pom)
72 #:use-module (gnu packages nss)
73 #:use-module (gnu packages onc-rpc)
74 #:use-module (gnu packages web)
75 #:use-module (gnu packages wget)
76 #:use-module (gnu packages pkg-config)
77 #:use-module (gnu packages perl)
78 #:use-module (gnu packages popt)
79 #:use-module (gnu packages kerberos)
80 #:use-module (gnu packages xml)
81 #:use-module (gnu packages xorg)
82 #:use-module (gnu packages texinfo)
83 #:use-module ((srfi srfi-1) #:select (fold alist-delete))
84 #:use-module (srfi srfi-11)
85 #:use-module (ice-9 match))
89 ;;; Java bootstrap toolchain.
92 ;; The Java bootstrap begins with Jikes, a Java compiler written in C++. We
93 ;; use it to build a simple version of GNU Classpath, the Java standard
94 ;; library. We chose version 0.93 because it is the last version that can be
95 ;; built with Jikes. With Jikes and this version of GNU Classpath we can
96 ;; build JamVM, a Java Virtual Machine. We build version 1.5.1 because it is
97 ;; the last version of JamVM that works with a version of GNU classpath that
98 ;; does not require ECJ. These three packages make up the bootstrap JDK.
100 ;; This is sufficient to build an older version of Ant, which is needed to
101 ;; build an older version of ECJ, an incremental Java compiler, both of which
102 ;; are written in Java.
104 ;; ECJ is needed to build the latest release (0.99) and the development
105 ;; version of GNU Classpath. The development version of GNU Classpath has
106 ;; much more support for Java 1.6 than the latest release, but we need to
107 ;; build 0.99 first to get a working version of javah. ECJ, the development
108 ;; version of GNU Classpath, and the latest version of JamVM make up the
109 ;; second stage JDK with which we can build the OpenJDK with the Icedtea 1.x
110 ;; build framework. We then build the more recent JDKs Icedtea 2.x and
113 (define-public libantlr3c
121 (string-append "https://www.antlr3.org/download/C/"
122 name "-" version ".tar.gz"))
124 (base32 "0lpbnb4dq4azmsvlhp6khq1gy42kyqyjv8gww74g5lm2y6blm4fa"))))
125 (build-system gnu-build-system)
127 `(#:configure-flags (list "--enable-debuginfo" "--disable-static")
128 #:phases (modify-phases %standard-phases
130 (lambda* (#:key build target native-inputs inputs outputs
131 (configure-flags '()) out-of-source? system
133 (let ((configure (assoc-ref %standard-phases 'configure))
134 (enable-64bit? (member system '("aarch64-linux"
137 (configure #:build build #:target target
138 #:native-inputs native-inputs
139 #:inputs inputs #:outputs outputs
140 #:configure-flags `(,(if enable-64bit?
144 #:out-of-source? out-of-source?)))))))
145 (synopsis "ANTLR C Library")
146 (description "LIBANTLR3C provides run-time C libraries for ANTLR3 (ANother
147 Tool for Language Recognition v3).")
148 (home-page "https://www.antlr3.org/")
149 (license license:bsd-3)))
157 (uri (string-append "mirror://sourceforge/jikes/Jikes/"
158 version "/jikes-" version ".tar.bz2"))
161 "1qqldrp74pzpy5ly421srqn30qppmm9cvjiqdngk8hf47dv2rc0c"))))
162 (build-system gnu-build-system)
163 (home-page "http://jikes.sourceforge.net/")
164 (synopsis "Compiler for the Java language")
165 (description "Jikes is a compiler that translates Java source files as
166 defined in The Java Language Specification into the bytecoded instruction set
167 and binary format defined in The Java Virtual Machine Specification.")
168 (license license:ibmpl1.0)))
171 ;; Last release is from 2014, with a few important commits afterwards.
172 (let ((commit "a4bd00df0199e78243847f06cc04ecaea31f8f08"))
175 (version (git-version "0.2.4" "1" commit))
179 (url "https://github.com/ninjudd/drip")
181 (file-name (git-file-name name version))
184 "0wzmjwfyldr3jn49517xd8yn7dgdk8h88qkga3kjyg1zc375ylg2"))))
185 (build-system gnu-build-system)
187 `(("jdk" ,icedtea "jdk")))
189 `(#:tests? #f ; No tests.
191 (modify-phases %standard-phases
193 (add-before 'install 'fix-wrapper
194 (lambda* (#:key inputs #:allow-other-keys)
195 (let ((jps (string-append (assoc-ref inputs "jdk") "/bin/jps")))
196 (substitute* "bin/drip"
198 (("brew update && brew upgrade drip") "guix pull && guix install drip")
200 (("\\(cd -- \"\\$drip_dir\" && make -s\\) \\|\\| exit 1") "")
201 ;; No need to include source:
202 (("\\[\\[ -r \\$drip_dir/src/org/flatland/drip/Main\\.java \\]\\]")
206 (lambda* (#:key outputs #:allow-other-keys)
207 (let* ((out (assoc-ref outputs "out"))
208 (bin (string-append out "/bin"))
209 (share (string-append out "/share/drip")))
213 (install-file (string-append "bin/" file) bin))
214 '("drip" "drip_daemon" "drip_proxy"))
215 (install-file "drip.jar" share)
216 (substitute* (string-append bin "/drip")
217 (("drip_dir=\\$bin_dir/..")
218 (string-append "drip_dir=" share)))
220 (home-page "https://github.com/ninjudd/drip")
221 (synopsis "Faster Java Virtual Machine launching")
222 (description "Drip is a launcher for the Java Virtual Machine that
223 provides much faster startup times than the @command{java} command. The @command{drip}
224 script is intended to be a drop-in replacement for the @command{java} command,
226 (license license:epl1.0))))
228 ;; This is the last version of GNU Classpath that can be built without ECJ.
229 (define classpath-bootstrap
235 (uri (string-append "mirror://gnu/classpath/classpath-"
239 "0i99wf9xd3hw1sj2sazychb9prx8nadxh2clgvk3zlmb28v0jbfz"))
240 (patches (search-patches "classpath-aarch64-support.patch"))))
241 (build-system gnu-build-system)
244 (list (string-append "JAVAC="
245 (assoc-ref %build-inputs "jikes")
250 "--disable-gconf-peer"
256 (modify-phases %standard-phases
257 ;; XXX: This introduces a memory leak as we remove a call to free up
258 ;; memory for the file name string. This was necessary because of a
259 ;; runtime error that would have prevented us from building
260 ;; ant-bootstrap later. See https://issues.guix.gnu.org/issue/36685
261 ;; for the gnarly details.
262 (add-after 'unpack 'remove-call-to-free
264 (substitute* "native/jni/java-io/java_io_VMFile.c"
265 (("result = cpio_isFileExists.*" m)
266 (string-append m "\n//")))
268 (add-after 'install 'install-data
269 (lambda _ (invoke "make" "install-data"))))))
274 ("pkg-config" ,pkg-config)))
275 (home-page "https://www.gnu.org/software/classpath/")
276 (synopsis "Essential libraries for Java")
277 (description "GNU Classpath is a project to create core class libraries
278 for use with runtimes, compilers and tools for the Java programming
280 ;; GPLv2 or later, with special linking exception.
281 (license license:gpl2+)))
283 ;; This is the last version of JamVM that works with a version of GNU
284 ;; classpath that does not require ECJ.
285 (define jamvm-1-bootstrap
291 (uri (string-append "mirror://sourceforge/jamvm/jamvm/"
292 "JamVM%20" version "/jamvm-"
294 (patches (search-patches "jamvm-1.5.1-aarch64-support.patch"
295 "jamvm-1.5.1-armv7-support.patch"))
298 "06lhi03l3b0h48pc7x58bk9my2nrcf1flpmglvys3wyad6yraf36"))
301 ;; Remove precompiled software.
302 (delete-file "lib/classes.zip")
304 (build-system gnu-build-system)
307 (list (string-append "--with-classpath-install-dir="
308 (assoc-ref %build-inputs "classpath"))
309 "--disable-int-caching"
310 "--enable-runtime-reloc-checks"
313 ,(if (string-prefix? "aarch64" (or (%current-system)
314 (%current-target-system)))
315 ;; Makefiles and the configure script need to be regenerated to
316 ;; incorporate support for AArch64.
317 '(modify-phases %standard-phases
319 (lambda _ (invoke "autoreconf" "-vif"))))
322 `(("classpath" ,classpath-bootstrap)
328 (if (string-prefix? "aarch64" (or (%current-system)
329 (%current-target-system)))
330 ;; Additional packages needed for autoreconf.
331 `(("autoconf" ,autoconf)
332 ("automake" ,automake)
333 ("libtool" ,libtool))
335 (home-page "http://jamvm.sourceforge.net/")
336 (synopsis "Small Java Virtual Machine")
337 (description "JamVM is a Java Virtual Machine conforming to the JVM
338 specification edition 2 (blue book). It is extremely small. However, unlike
339 other small VMs it supports the full spec, including object finalisation and
341 (license license:gpl2+)))
343 (define ant-bootstrap
345 (name "ant-bootstrap")
346 ;; The 1.10.x series requires Java 8. 1.9.0 and later use generics, which
347 ;; are not supported. The 1.8.x series is the last to use only features
348 ;; supported by Jikes.
352 (uri (string-append "mirror://apache/"
353 "ant/source/apache-ant-"
354 version "-src.tar.bz2"))
357 "1cg0lga887qz5iizh6mlkxp01lciymrhmp7wzxpl6zpnldxmzrjx"))))
358 (build-system gnu-build-system)
360 `(#:imported-modules ((guix build syscalls)
361 ,@%gnu-build-system-modules)
362 #:modules ((srfi srfi-1)
363 (guix build gnu-build-system)
365 (guix build syscalls))
366 #:tests? #f ; no "check" target
368 (modify-phases %standard-phases
372 (lambda* (#:key inputs #:allow-other-keys)
373 (setenv "JAVA_HOME" (assoc-ref inputs "jamvm"))
375 (string-append (assoc-ref inputs "jamvm")
378 (string-append (assoc-ref inputs "jikes")
381 (string-append (assoc-ref inputs "jamvm")
384 ;; Ant complains if this file doesn't exist.
385 (setenv "HOME" "/tmp")
386 (with-output-to-file "/tmp/.ant.properties"
387 (lambda _ (display "")))
389 ;; Use jikes instead of javac for <javac ...> tags in build.xml
390 (setenv "ANT_OPTS" "-Dbuild.compiler=jikes")
392 ;; jikes produces lots of warnings, but they are not very
393 ;; interesting, so we silence them.
394 (setenv "$BOOTJAVAC_OPTS" "-nowarn")
396 ;; Without these JamVM options the build may freeze.
397 (substitute* "bootstrap.sh"
398 (("^\"\\$\\{JAVACMD\\}\" " m)
399 ,@(if (string-prefix? "armhf" (or (%current-system)
400 (%current-target-system)))
401 `((string-append m "-Xnocompact "))
402 `((string-append m "-Xnocompact -Xnoinlining ")))))
404 ;; Disable tests because we are bootstrapping and thus don't have
405 ;; any of the dependencies required to build and run the tests.
406 (substitute* "build.xml"
407 (("depends=\"jars,test-jar\"") "depends=\"jars\""))
408 (invoke "bash" "bootstrap.sh"
409 (string-append "-Ddist.dir="
410 (assoc-ref %outputs "out")))))
411 (add-after 'build 'strip-jar-timestamps ;based on ant-build-system
412 (lambda* (#:key outputs #:allow-other-keys)
413 (define (repack-archive jar)
414 (let* ((dir (mkdtemp! "jar-contents.XXXXXX"))
415 (manifest (string-append dir "/META-INF/MANIFESTS.MF")))
416 (with-directory-excursion dir
417 (invoke "unzip" jar))
419 ;; XXX: copied from (gnu build install)
420 (for-each (lambda (file)
421 (let ((s (lstat file)))
422 (unless (eq? (stat:type s) 'symlink)
423 (utime file 0 0 0 0))))
424 (find-files dir #:directories? #t))
425 ;; It is important that the manifest appears first.
426 (with-directory-excursion dir
427 (let* ((files (find-files "." ".*" #:directories? #t))
428 ;; To ensure that the reference scanner can
429 ;; detect all store references in the jars
430 ;; we disable compression with the "-0" option.
431 (command (if (file-exists? manifest)
432 `("zip" "-0" "-X" ,jar ,manifest
434 `("zip" "-0" "-X" ,jar ,@files))))
435 (apply invoke command)))))
436 (for-each repack-archive
438 (string-append (assoc-ref %outputs "out") "/lib")
444 ("jamvm" ,jamvm-1-bootstrap)
447 (home-page "https://ant.apache.org")
448 (synopsis "Build tool for Java")
450 "Ant is a platform-independent build tool for Java. It is similar to
451 make but is implemented using the Java language, requires the Java platform,
452 and is best suited to building Java projects. Ant uses XML to describe the
453 build process and its dependencies, whereas Make uses Makefile format.")
454 (license license:asl2.0)))
456 ;; Version 3.2.2 is the last version without a dependency on a full-fledged
457 ;; compiler for Java 1.5.
458 (define ecj-bootstrap
460 (name "ecj-bootstrap")
464 (uri (string-append "http://archive.eclipse.org/eclipse/"
465 "downloads/drops/R-" version
466 "-200702121330/ecjsrc.zip"))
469 "05hj82kxd23qaglsjkaqcj944riisjha7acf7h3ljhrjyljx8307"))))
470 ;; It would be so much easier if we could use the ant-build-system, but we
471 ;; cannot as we don't have ant at this point. We use ecj for
472 ;; bootstrapping the JDK.
473 (build-system gnu-build-system)
475 `(#:modules ((guix build gnu-build-system)
478 #:tests? #f ; there are no tests
480 (modify-phases %standard-phases
482 (lambda* (#:key inputs #:allow-other-keys)
485 (cons (string-append (assoc-ref inputs "jamvm")
487 (find-files (string-append
488 (assoc-ref inputs "ant-bootstrap")
494 (lambda* (#:key inputs #:allow-other-keys)
495 ;; The unpack phase enters the "org" directory by mistake.
498 ;; Create a simple manifest to make ecj executable.
499 (with-output-to-file "manifest"
501 (display "Manifest-Version: 1.0
502 Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n")))
505 (and (apply invoke "jikes"
506 (find-files "." "\\.java$"))
507 (invoke "fastjar" "cvfm"
508 "ecj-bootstrap.jar" "manifest" "."))))
510 (lambda* (#:key outputs #:allow-other-keys)
511 (let ((share (string-append (assoc-ref outputs "out")
514 (install-file "ecj-bootstrap.jar" share)
517 `(("ant-bootstrap" ,ant-bootstrap)
520 ("jamvm" ,jamvm-1-bootstrap)
521 ("fastjar" ,fastjar)))
522 (home-page "https://eclipse.org")
523 (synopsis "Eclipse Java development tools core batch compiler")
524 (description "This package provides the Eclipse Java core batch compiler
525 for bootstrapping purposes. The @dfn{Eclipse compiler for Java} (ecj) is a
526 requirement for all GNU Classpath releases after version 0.93.")
527 (license license:epl1.0)))
529 (define ecj-javac-wrapper
530 (package (inherit ecj-bootstrap)
531 (name "ecj-javac-wrapper")
533 (build-system trivial-build-system)
535 `(#:modules ((guix build utils))
538 (use-modules (guix build utils))
539 (let* ((bin (string-append (assoc-ref %outputs "out") "/bin"))
540 (target (string-append bin "/javac"))
541 (guile (string-append (assoc-ref %build-inputs "guile")
543 (ecj (string-append (assoc-ref %build-inputs "ecj-bootstrap")
544 "/share/java/ecj-bootstrap.jar"))
545 (java (string-append (assoc-ref %build-inputs "jamvm")
547 (bootcp (let ((jvmlib (string-append (assoc-ref %build-inputs "classpath")
548 "/share/classpath")))
549 (string-append jvmlib "/glibj.zip:"
550 jvmlib "/tools.zip"))))
552 (with-output-to-file target
554 (format #t "#!~a --no-auto-compile\n!#\n" guile)
556 `(begin (use-modules (ice-9 match)
562 '(("-bootclasspath" ,bootcp)
567 (let ((classpath (getenv "CLASSPATH")))
569 (string-join (list ,ecj
570 ,(string-append (assoc-ref %build-inputs "jamvm")
574 (receive (vm-args other-args)
575 ;; Separate VM arguments from arguments to ECJ.
576 (partition (cut string-prefix? "-J" <>)
577 (fold (lambda (default acc)
578 (if (member (first default) acc)
579 acc (append default acc)))
583 ;; Remove "-J" prefix
584 (map (cut string-drop <> 2) vm-args)
585 '("org.eclipse.jdt.internal.compiler.batch.Main")
586 (cons "-nowarn" other-args)))))
588 (let ((args (cdr (command-line))))
590 (format (current-error-port) "javac: no arguments given!\n")
595 `(("guile" ,guile-2.2)
596 ("ecj-bootstrap" ,ecj-bootstrap)
597 ("jamvm" ,jamvm-1-bootstrap)
598 ("classpath" ,classpath-bootstrap)))
599 (description "This package provides a wrapper around the @dfn{Eclipse
600 compiler for Java} (ecj) with a command line interface that is compatible with
601 the standard javac executable.")))
603 ;; The classpath-bootstrap was built without a virtual machine, so it does not
604 ;; provide a wrapper for javah. We cannot build the development version of
605 ;; Classpath without javah.
606 (define classpath-0.99
607 (package (inherit classpath-bootstrap)
611 (uri (string-append "mirror://gnu/classpath/classpath-"
615 "1j7cby4k66f1nvckm48xcmh352b1d1b33qk7l6hi7dp9i9zjjagr"))
616 (patches (search-patches "classpath-aarch64-support.patch"))))
619 (list (string-append "--with-ecj-jar="
620 (assoc-ref %build-inputs "ecj-bootstrap")
621 "/share/java/ecj-bootstrap.jar")
622 (string-append "JAVAC="
623 (assoc-ref %build-inputs "ecj-javac-wrapper")
625 (string-append "JAVA="
626 (assoc-ref %build-inputs "jamvm")
629 "ac_cv_prog_java_works=yes" ; trust me
633 "--disable-gconf-peer"
639 (modify-phases %standard-phases
640 (add-after 'install 'install-data
641 (lambda _ (invoke "make" "install-data"))))))
643 `(("ecj-bootstrap" ,ecj-bootstrap)
644 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
646 ("jamvm" ,jamvm-1-bootstrap)
647 ("classpath" ,classpath-bootstrap)
649 ("pkg-config" ,pkg-config)))))
651 ;; We need this because classpath-bootstrap does not provide all of the tools
652 ;; we need to build classpath-devel.
653 (define classpath-jamvm-wrappers
654 (package (inherit classpath-0.99)
655 (name "classpath-jamvm-wrappers")
657 (build-system trivial-build-system)
659 `(#:modules ((guix build utils))
662 (use-modules (guix build utils))
663 (let* ((bash (assoc-ref %build-inputs "bash"))
664 (jamvm (assoc-ref %build-inputs "jamvm"))
665 (classpath (assoc-ref %build-inputs "classpath"))
666 (bin (string-append (assoc-ref %outputs "out")
669 (for-each (lambda (tool)
670 (with-output-to-file (string-append bin tool)
672 ,@(if (string-prefix? "armhf" (or (%current-system)
673 (%current-target-system)))
674 `((format #t "#!~a/bin/sh
675 ~a/bin/jamvm -Xnocompact -classpath ~a/share/classpath/tools.zip \
676 gnu.classpath.tools.~a.~a $@"
677 bash jamvm classpath tool
678 (if (string=? "native2ascii" tool)
679 "Native2ASCII" "Main")))
680 `((format #t "#!~a/bin/sh
681 ~a/bin/jamvm -Xnocompact -Xnoinlining -classpath ~a/share/classpath/tools.zip \
682 gnu.classpath.tools.~a.~a $@"
683 bash jamvm classpath tool
684 (if (string=? "native2ascii" tool)
685 "Native2ASCII" "Main"))))))
686 (chmod (string-append bin tool) #o755))
696 ("jamvm" ,jamvm-1-bootstrap)
697 ("classpath" ,classpath-0.99)))
699 (synopsis "Executables from GNU Classpath")
700 (description "This package provides wrappers around the tools provided by
701 the GNU Classpath library. They are executed by the JamVM virtual
704 ;; The last release of GNU Classpath is 0.99 and it happened in 2012. Since
705 ;; then Classpath has gained much more support for Java 1.6.
706 (define-public classpath-devel
707 (let ((commit "e7c13ee0cf2005206fbec0eca677f8cf66d5a103")
709 (package (inherit classpath-bootstrap)
710 (version (string-append "0.99-" revision "." (string-take commit 9)))
714 (url "https://git.savannah.gnu.org/git/classpath.git")
716 (file-name (string-append "classpath-" version "-checkout"))
719 "1v2rww76ww322mpg3s12a1kkc6gkp31bm9gcxs532h0wq285fiw4"))
720 (patches (search-patches "classpath-aarch64-support.patch"))))
723 ;; Ensure that the initial heap size is smaller than the maximum
724 ;; size. By default only Xmx is set, which can lead to invalid
725 ;; memory settings on some machines with a lot of memory.
726 '("JAVAC_MEM_OPT=-J-Xms512M -J-Xmx768M")
728 (list (string-append "--with-ecj-jar="
729 (assoc-ref %build-inputs "ecj-bootstrap")
730 "/share/java/ecj-bootstrap.jar")
731 (string-append "--with-javac="
732 (assoc-ref %build-inputs "ecj-javac-wrapper")
734 (string-append "JAVA="
735 (assoc-ref %build-inputs "jamvm")
738 "ac_cv_prog_java_works=yes" ; trust me
742 "--disable-gconf-peer"
748 (modify-phases %standard-phases
749 ;; XXX The bootstrap phase executes autogen.sh, which fails after
750 ;; complaining about the lack of gettext.
752 (lambda _ (invoke "autoreconf" "-vif")))
753 (add-after 'unpack 'remove-unsupported-annotations
755 (substitute* (find-files "java" "\\.java$")
758 (add-after 'install 'install-data
759 (lambda _ (invoke "make" "install-data"))))))
761 `(("autoconf" ,autoconf)
762 ("automake" ,automake)
764 ("gettext" ,gettext-minimal)
766 ("classpath-jamvm-wrappers" ,classpath-jamvm-wrappers) ; for javah
767 ("ecj-bootstrap" ,ecj-bootstrap)
768 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
770 ("jamvm" ,jamvm-1-bootstrap)
772 ("pkg-config" ,pkg-config))))))
775 (package (inherit jamvm-1-bootstrap)
779 (uri (string-append "mirror://sourceforge/jamvm/jamvm/"
780 "JamVM%20" version "/jamvm-"
784 "1nl0zxz8y5x8gwsrm7n32bry4dx8x70p8z3s9jbdvs8avyb8whkn"))
786 (search-patches "jamvm-2.0.0-disable-branch-patching.patch"
787 "jamvm-2.0.0-opcode-guard.patch"
788 "jamvm-2.0.0-aarch64-support.patch"))
791 ;; Remove precompiled software.
792 (delete-file "src/classlib/gnuclasspath/lib/classes.zip")
794 (build-system gnu-build-system)
796 (substitute-keyword-arguments (package-arguments jamvm-1-bootstrap)
797 ((#:configure-flags _)
798 '(list (string-append "--with-classpath-install-dir="
799 (assoc-ref %build-inputs "classpath"))))))
801 `(("classpath" ,classpath-devel)
802 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
806 (define ecj-javac-wrapper-final
807 (package (inherit ecj-javac-wrapper)
809 `(("guile" ,guile-2.2)
810 ("ecj-bootstrap" ,ecj-bootstrap)
812 ("classpath" ,classpath-devel)))))
814 ;; The bootstrap JDK consisting of jamvm, classpath-devel,
815 ;; ecj-javac-wrapper-final cannot build Icedtea 2.x directly, because it's
816 ;; written in Java 7. It can, however, build the unmaintained Icedtea 1.x,
817 ;; which uses Java 6 only.
818 (define-public icedtea-6
825 "http://icedtea.wildebeest.org/download/source/icedtea6-"
829 "0bg9sb4f7qbq77c0zf9m17p47ga0kf0r9622g9p12ysg26jd1ksg"))
830 (patches (search-patches
831 "icedtea-6-extend-hotspot-aarch64-support.patch"))
832 (modules '((guix build utils)))
835 (substitute* "Makefile.in"
836 ;; do not leak information about the build host
837 (("DISTRIBUTION_ID=\"\\$\\(DIST_ID\\)\"")
838 "DISTRIBUTION_ID=\"\\\"guix\\\"\""))
840 (build-system gnu-build-system)
841 (outputs '("out" ; Java Runtime Environment
842 "jdk" ; Java Development Kit
843 "doc")) ; all documentation
845 `(;; There are many failing tests and many are known to fail upstream.
848 ;; The DSOs use $ORIGIN to refer to each other, but (guix build
849 ;; gremlin) doesn't support it yet, so skip this phase.
850 #:validate-runpath? #f
852 #:modules ((guix build utils)
853 (guix build gnu-build-system)
857 `("--enable-bootstrap"
860 ,(string-append "--with-parallel-jobs="
861 (number->string (parallel-job-count)))
862 "--disable-downloading"
864 ,(string-append "--with-ecj="
865 (assoc-ref %build-inputs "ecj")
866 "/share/java/ecj-bootstrap.jar")
867 ,(string-append "--with-jar="
868 (assoc-ref %build-inputs "fastjar")
870 ,(string-append "--with-jdk-home="
871 (assoc-ref %build-inputs "classpath"))
872 ,(string-append "--with-java="
873 (assoc-ref %build-inputs "jamvm")
876 (modify-phases %standard-phases
878 (lambda* (#:key source inputs #:allow-other-keys)
879 (invoke "tar" "xvf" source)
880 (chdir (string-append "icedtea6-" ,version))
882 (copy-recursively (assoc-ref inputs "openjdk-src") "openjdk")
883 ;; The convenient OpenJDK source bundle is no longer
884 ;; available for download, so we have to take the sources
885 ;; from the Mercurial repositories and change the Makefile
886 ;; to avoid tests for the OpenJDK zip archive.
887 (with-directory-excursion "openjdk"
888 (for-each (lambda (part)
892 (string-append part "-src"))
894 '("jdk" "hotspot" "corba"
895 "langtools" "jaxp" "jaxws")))
896 (substitute* "patches/freetypeversion.patch"
897 (("REQUIRED_FREETYPE_VERSION = 2.2.1")
898 "REQUIRED_FREETYPE_VERSION = 2.10.1"))
899 (substitute* "Makefile.in"
900 (("echo \"ERROR: No up-to-date OpenJDK zip available\"; exit -1;")
901 "echo \"trust me\";")
902 ;; The contents of the bootstrap directory must be
903 ;; writeable but when copying from the store they are
905 (("mkdir -p lib/rt" line)
906 (string-append line "; chmod -R u+w $(BOOT_DIR)")))
907 (invoke "chmod" "-R" "u+w" "openjdk")))
908 (add-after 'unpack 'use-classpath
909 (lambda* (#:key inputs #:allow-other-keys)
910 (let ((jvmlib (assoc-ref inputs "classpath"))
911 (jamvm (assoc-ref inputs "jamvm")))
912 ;; Classpath does not provide rt.jar.
913 (substitute* "Makefile.in"
914 (("\\$\\(SYSTEM_JDK_DIR\\)/jre/lib/rt.jar")
915 (string-append jvmlib "/share/classpath/glibj.zip")))
916 ;; Make sure we can find all classes.
918 (string-append jvmlib "/share/classpath/glibj.zip:"
919 jvmlib "/share/classpath/tools.zip:"
920 jamvm "/lib/rt.jar"))
922 (string-append "-cp "
923 jvmlib "/share/classpath/glibj.zip:"
924 jvmlib "/share/classpath/tools.zip")))
926 (add-after 'unpack 'patch-patches
928 ;; shebang in patches so that they apply cleanly
929 (substitute* '("patches/jtreg-jrunscript.patch"
930 "patches/hotspot/hs23/drop_unlicensed_test.patch")
931 (("#!/bin/sh") (string-append "#!" (which "sh"))))
933 (add-after 'unpack 'patch-paths
934 (lambda* (#:key inputs #:allow-other-keys)
935 ;; buildtree.make generates shell scripts, so we need to replace
936 ;; the generated shebang
937 (substitute* '("openjdk/hotspot/make/linux/makefiles/buildtree.make")
938 (("/bin/sh") (which "bash")))
940 (let ((corebin (string-append
941 (assoc-ref inputs "coreutils") "/bin/"))
942 (binbin (string-append
943 (assoc-ref inputs "binutils") "/bin/"))
944 (grepbin (string-append
945 (assoc-ref inputs "grep") "/bin/")))
946 (substitute* '("openjdk/jdk/make/common/shared/Defs-linux.gmk"
947 "openjdk/corba/make/common/shared/Defs-linux.gmk")
948 (("UNIXCOMMAND_PATH = /bin/")
949 (string-append "UNIXCOMMAND_PATH = " corebin))
950 (("USRBIN_PATH = /usr/bin/")
951 (string-append "USRBIN_PATH = " corebin))
952 (("DEVTOOLS_PATH *= */usr/bin/")
953 (string-append "DEVTOOLS_PATH = " corebin))
954 (("COMPILER_PATH *= */usr/bin/")
955 (string-append "COMPILER_PATH = "
956 (assoc-ref inputs "gcc") "/bin/"))
957 (("DEF_OBJCOPY *=.*objcopy")
958 (string-append "DEF_OBJCOPY = " (which "objcopy"))))
960 ;; fix path to alsa header
961 (substitute* "openjdk/jdk/make/common/shared/Sanity.gmk"
962 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
963 (string-append "ALSA_INCLUDE="
964 (assoc-ref inputs "alsa-lib")
965 "/include/alsa/version.h")))
967 ;; fix hard-coded utility paths
968 (substitute* '("openjdk/jdk/make/common/shared/Defs-utils.gmk"
969 "openjdk/corba/make/common/shared/Defs-utils.gmk")
971 (string-append "ECHO = " (which "echo")))
973 (string-append "GREP = " (which "grep")))
975 (string-append "EGREP = " (which "egrep")))
977 (string-append "CPIO = " (which "cpio")))
978 (("READELF *=.*readelf")
979 (string-append "READELF = " (which "readelf")))
981 (string-append "AR = " (which "ar")))
983 (string-append "TAR = " (which "tar")))
985 (string-append "AS = " (which "as")))
987 (string-append "LD = " (which "ld")))
989 (string-append "STRIP = " (which "strip")))
991 (string-append "NM = " (which "nm")))
993 (string-append "SH = " (which "bash")))
995 (string-append "FIND = " (which "find")))
997 (string-append "LDD = " (which "ldd")))
998 (("NAWK *=.*(n|g)awk")
999 (string-append "NAWK = " (which "gawk")))
1000 (("XARGS *=.*xargs")
1001 (string-append "XARGS = " (which "xargs")))
1002 (("UNZIP *=.*unzip")
1003 (string-append "UNZIP = " (which "unzip")))
1005 (string-append "ZIPEXE = " (which "zip")))
1007 (string-append "SED = " (which "sed"))))
1009 ;; Some of these timestamps cause problems as they are more than
1010 ;; 10 years ago, failing the build process.
1012 "openjdk/jdk/src/share/classes/java/util/CurrencyData.properties"
1013 (("AZ=AZM;2005-12-31-20-00-00;AZN") "AZ=AZN")
1014 (("MZ=MZM;2006-06-30-22-00-00;MZN") "MZ=MZN")
1015 (("RO=ROL;2005-06-30-21-00-00;RON") "RO=RON")
1016 (("TR=TRL;2004-12-31-22-00-00;TRY") "TR=TRY"))
1018 (add-before 'configure 'set-additional-paths
1019 (lambda* (#:key inputs #:allow-other-keys)
1021 (string-append (assoc-ref inputs "libxrender")
1022 "/include/X11/extensions" ":"
1023 (assoc-ref inputs "libxtst")
1024 "/include/X11/extensions" ":"
1025 (assoc-ref inputs "libxinerama")
1026 "/include/X11/extensions" ":"
1027 (or (getenv "CPATH") "")))
1028 (setenv "ALT_CUPS_HEADERS_PATH"
1029 (string-append (assoc-ref inputs "cups")
1031 (setenv "ALT_FREETYPE_HEADERS_PATH"
1032 (string-append (assoc-ref inputs "freetype")
1034 (setenv "ALT_FREETYPE_LIB_PATH"
1035 (string-append (assoc-ref inputs "freetype")
1038 (add-before 'build 'disable-os-version-check
1039 ;; allow build on linux major version change
1041 (setenv "DISABLE_HOTSPOT_OS_VERSION_CHECK" "ok")
1044 (lambda* (#:key outputs #:allow-other-keys)
1045 (let ((doc (string-append (assoc-ref outputs "doc")
1046 "/share/doc/icedtea"))
1047 (jre (assoc-ref outputs "out"))
1048 (jdk (assoc-ref outputs "jdk")))
1049 (copy-recursively "openjdk.build/docs" doc)
1050 (copy-recursively "openjdk.build/j2re-image" jre)
1051 (copy-recursively "openjdk.build/j2sdk-image" jdk))
1054 `(("ant" ,ant-bootstrap)
1055 ("alsa-lib" ,alsa-lib)
1057 ("classpath" ,classpath-devel)
1058 ("coreutils" ,coreutils)
1061 ("ecj" ,ecj-bootstrap)
1062 ("ecj-javac" ,ecj-javac-wrapper-final)
1063 ("fastjar" ,fastjar)
1064 ("fontconfig" ,fontconfig)
1065 ("freetype" ,freetype)
1072 ("libjpeg" ,libjpeg-turbo)
1075 ("libtool" ,libtool)
1077 ("libxcomposite" ,libxcomposite)
1079 ("libxinerama" ,libxinerama)
1080 ("libxrender" ,libxrender)
1081 ("libxslt" ,libxslt) ;for xsltproc
1083 ("libxtst" ,libxtst)
1084 ("mit-krb5" ,mit-krb5)
1086 ("nss-certs" ,nss-certs)
1088 ("pkg-config" ,pkg-config)
1089 ("procps" ,procps) ;for "free", even though I'm not sure we should use it
1099 (url "http://hg.openjdk.java.net/jdk6/jdk6/")
1100 (changeset "jdk6-b41")))
1103 "14q47yfg586fs64w30g8mk92m5dkxsvr36zzh0ra99xk5x0x96mv"))))
1108 (url "http://hg.openjdk.java.net/jdk6/jdk6/jdk/")
1109 (changeset "jdk6-b41")))
1112 "165824nhg1k1dx6zs9dny0j49rmk35jw5b13dmz8c77jfajml4v9"))))
1117 (url "http://hg.openjdk.java.net/jdk6/jdk6/hotspot/")
1118 (changeset "jdk6-b41")))
1121 "07lc1z4k5dj9nrc1wvwmpvxr3xgxrdkdh53xb95skk5ij49yagfd"))))
1126 (url "http://hg.openjdk.java.net/jdk6/jdk6/corba/")
1127 (changeset "jdk6-b41")))
1130 "1p9g1r9dnax2iwp7yb59qx7m4nmshqhwmrb2b8jj8zgbd9dl2i3q"))))
1135 (url "http://hg.openjdk.java.net/jdk6/jdk6/langtools/")
1136 (changeset "jdk6-b41")))
1139 "1x52wd67fynbbd9ild6fb4wvba3f5hhwk03qdjfazd0a1qr37z3d"))))
1144 (url "http://hg.openjdk.java.net/jdk6/jdk6/jaxp/")
1145 (changeset "jdk6-b41")))
1148 "0shlqrvzpr4nrkmv215lbxnby63s3yvbdh1yxcayznsyqwa4nlxm"))))
1153 (url "http://hg.openjdk.java.net/jdk6/jdk6/jaxws/")
1154 (changeset "jdk6-b41")))
1157 "0835lkw8vib1xhp8lxnybhlvzdh699hbi4mclxanydjk63zbpxk0"))))))
1158 (home-page "http://icedtea.classpath.org")
1159 (synopsis "Java development kit")
1161 "This package provides the OpenJDK built with the IcedTea build harness.
1162 This version of the OpenJDK is no longer maintained and is only used for
1163 bootstrapping purposes.")
1164 ;; IcedTea is released under the GPL2 + Classpath exception, which is the
1165 ;; same license as both GNU Classpath and OpenJDK.
1166 (license license:gpl2+)))
1168 (define-public icedtea-7
1169 (let* ((version "2.6.13")
1170 (drop (lambda (name hash)
1174 "http://icedtea.classpath.org/download/drops"
1175 "/icedtea7/" version "/" name ".tar.bz2"))
1176 (sha256 (base32 hash))))))
1183 "http://icedtea.wildebeest.org/download/source/icedtea-"
1187 "1w331rdqx1dcx2xb0fmjmrkdc71xqn20fxsgw8by4xhiblh88khh"))
1188 (modules '((guix build utils)))
1191 (substitute* "Makefile.in"
1192 ;; do not leak information about the build host
1193 (("DISTRIBUTION_ID=\"\\$\\(DIST_ID\\)\"")
1194 "DISTRIBUTION_ID=\"\\\"guix\\\"\""))
1196 (build-system gnu-build-system)
1197 (outputs '("out" ; Java Runtime Environment
1198 "jdk" ; Java Development Kit
1199 "doc")) ; all documentation
1201 `(;; There are many test failures. Some are known to
1202 ;; fail upstream, others relate to not having an X
1203 ;; server running at test time, yet others are a
1204 ;; complete mystery to me.
1206 ;; hotspot: passed: 241; failed: 45; error: 2
1207 ;; langtools: passed: 1,934; failed: 26
1211 ;; The DSOs use $ORIGIN to refer to each other, but (guix build
1212 ;; gremlin) doesn't support it yet, so skip this phase.
1213 #:validate-runpath? #f
1215 ;; Apparently, the C locale is needed for some of the tests.
1218 #:modules ((guix build utils)
1219 (guix build gnu-build-system)
1226 ;; TODO: package pcsc and sctp, and add to inputs
1227 `("--disable-system-pcsc"
1228 "--disable-system-sctp"
1229 "--enable-bootstrap"
1232 ,(string-append "--with-parallel-jobs="
1233 (number->string (parallel-job-count)))
1234 "--disable-downloading"
1235 "--disable-tests" ;they are run in the check phase instead
1236 "--with-openjdk-src-dir=./openjdk.src"
1237 ,(string-append "--with-jdk-home="
1238 (assoc-ref %build-inputs "jdk")))
1241 (modify-phases %standard-phases
1243 (lambda* (#:key source inputs #:allow-other-keys)
1244 (let ((target (string-append "icedtea-" ,version))
1245 (unpack (lambda* (name #:optional dir)
1247 (string-drop-right name 5))))
1250 (assoc-ref inputs name)
1252 "--strip-components=1")))))
1254 (invoke "tar" "xvf" source
1255 "-C" target "--strip-components=1")
1257 (unpack "openjdk-src" "openjdk.src")
1258 (with-directory-excursion "openjdk.src"
1260 (filter (cut string-suffix? "-drop" <>)
1265 (add-after 'unpack 'patch-bitrot
1267 (substitute* '("patches/boot/revert-6973616.patch"
1268 "openjdk.src/jdk/make/common/shared/Defs-versions.gmk")
1269 (("REQUIRED_FREETYPE_VERSION = 2.2.1")
1270 "REQUIRED_FREETYPE_VERSION = 2.10.1"))
1271 ;; As of attr 2.4.48 this header is no longer
1272 ;; included. It is provided by the libc instead.
1273 (substitute* '("configure"
1274 "openjdk.src/jdk/src/solaris/native/sun/nio/fs/LinuxNativeDispatcher.c")
1275 (("attr/xattr.h") "sys/xattr.h"))
1277 (add-after 'unpack 'fix-x11-extension-include-path
1278 (lambda* (#:key inputs #:allow-other-keys)
1279 (substitute* "openjdk.src/jdk/make/sun/awt/mawt.gmk"
1280 (((string-append "\\$\\(firstword \\$\\(wildcard "
1281 "\\$\\(OPENWIN_HOME\\)"
1282 "/include/X11/extensions\\).*$"))
1283 (string-append (assoc-ref inputs "libxrender")
1284 "/include/X11/extensions"
1285 " -I" (assoc-ref inputs "libxtst")
1286 "/include/X11/extensions"
1287 " -I" (assoc-ref inputs "libxinerama")
1288 "/include/X11/extensions"))
1289 (("\\$\\(wildcard /usr/include/X11/extensions\\)\\)") ""))
1291 (add-after 'unpack 'patch-paths
1293 ;; buildtree.make generates shell scripts, so we need to replace
1294 ;; the generated shebang
1295 (substitute* '("openjdk.src/hotspot/make/linux/makefiles/buildtree.make")
1296 (("/bin/sh") (which "bash")))
1298 (let ((corebin (string-append
1299 (assoc-ref %build-inputs "coreutils") "/bin/"))
1300 (binbin (string-append
1301 (assoc-ref %build-inputs "binutils") "/bin/"))
1302 (grepbin (string-append
1303 (assoc-ref %build-inputs "grep") "/bin/")))
1304 (substitute* '("openjdk.src/jdk/make/common/shared/Defs-linux.gmk"
1305 "openjdk.src/corba/make/common/shared/Defs-linux.gmk")
1306 (("UNIXCOMMAND_PATH = /bin/")
1307 (string-append "UNIXCOMMAND_PATH = " corebin))
1308 (("USRBIN_PATH = /usr/bin/")
1309 (string-append "USRBIN_PATH = " corebin))
1310 (("DEVTOOLS_PATH *= */usr/bin/")
1311 (string-append "DEVTOOLS_PATH = " corebin))
1312 (("COMPILER_PATH *= */usr/bin/")
1313 (string-append "COMPILER_PATH = "
1314 (assoc-ref %build-inputs "gcc") "/bin/"))
1315 (("DEF_OBJCOPY *=.*objcopy")
1316 (string-append "DEF_OBJCOPY = " (which "objcopy"))))
1318 ;; fix path to alsa header
1319 (substitute* "openjdk.src/jdk/make/common/shared/Sanity.gmk"
1320 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
1321 (string-append "ALSA_INCLUDE="
1322 (assoc-ref %build-inputs "alsa-lib")
1323 "/include/alsa/version.h")))
1325 ;; fix hard-coded utility paths
1326 (substitute* '("openjdk.src/jdk/make/common/shared/Defs-utils.gmk"
1327 "openjdk.src/corba/make/common/shared/Defs-utils.gmk")
1329 (string-append "ECHO = " (which "echo")))
1331 (string-append "GREP = " (which "grep")))
1332 (("EGREP *=.*egrep")
1333 (string-append "EGREP = " (which "egrep")))
1335 (string-append "CPIO = " (which "cpio")))
1336 (("READELF *=.*readelf")
1337 (string-append "READELF = " (which "readelf")))
1339 (string-append "AR = " (which "ar")))
1341 (string-append "TAR = " (which "tar")))
1343 (string-append "AS = " (which "as")))
1345 (string-append "LD = " (which "ld")))
1346 (("STRIP *=.*strip")
1347 (string-append "STRIP = " (which "strip")))
1349 (string-append "NM = " (which "nm")))
1351 (string-append "SH = " (which "bash")))
1353 (string-append "FIND = " (which "find")))
1355 (string-append "LDD = " (which "ldd")))
1356 (("NAWK *=.*(n|g)awk")
1357 (string-append "NAWK = " (which "gawk")))
1358 (("XARGS *=.*xargs")
1359 (string-append "XARGS = " (which "xargs")))
1360 (("UNZIP *=.*unzip")
1361 (string-append "UNZIP = " (which "unzip")))
1363 (string-append "ZIPEXE = " (which "zip")))
1365 (string-append "SED = " (which "sed"))))
1367 ;; Some of these timestamps cause problems as they are more than
1368 ;; 10 years ago, failing the build process.
1370 "openjdk.src/jdk/src/share/classes/java/util/CurrencyData.properties"
1371 (("AZ=AZM;2005-12-31-20-00-00;AZN") "AZ=AZN")
1372 (("MZ=MZM;2006-06-30-22-00-00;MZN") "MZ=MZN")
1373 (("RO=ROL;2005-06-30-21-00-00;RON") "RO=RON")
1374 (("TR=TRL;2004-12-31-22-00-00;TRY") "TR=TRY")))
1376 (add-before 'configure 'set-additional-paths
1377 (lambda* (#:key inputs #:allow-other-keys)
1378 (substitute* "openjdk.src/jdk/make/common/shared/Sanity.gmk"
1379 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
1380 (string-append "ALSA_INCLUDE="
1381 (assoc-ref inputs "alsa-lib")
1382 "/include/alsa/version.h")))
1385 (string-append (assoc-ref inputs "libxcomposite")
1386 "/include/X11/extensions" ":"
1387 (assoc-ref inputs "libxrender")
1388 "/include/X11/extensions" ":"
1389 (assoc-ref inputs "libxtst")
1390 "/include/X11/extensions" ":"
1391 (assoc-ref inputs "libxinerama")
1392 "/include/X11/extensions" ":"
1393 (or (getenv "CPATH") "")))
1394 (setenv "ALT_OBJCOPY" (which "objcopy"))
1395 (setenv "ALT_CUPS_HEADERS_PATH"
1396 (string-append (assoc-ref inputs "cups")
1398 (setenv "ALT_FREETYPE_HEADERS_PATH"
1399 (string-append (assoc-ref inputs "freetype")
1401 (setenv "ALT_FREETYPE_LIB_PATH"
1402 (string-append (assoc-ref inputs "freetype")
1405 (add-before 'build 'disable-os-version-check
1406 ;; allow build on linux major version change
1408 (setenv "DISABLE_HOTSPOT_OS_VERSION_CHECK" "ok")
1410 (add-before 'check 'fix-test-framework
1412 ;; Fix PATH in test environment
1413 (substitute* "test/jtreg/com/sun/javatest/regtest/Main.java"
1414 (("PATH=/bin:/usr/bin")
1415 (string-append "PATH=" (getenv "PATH"))))
1416 (substitute* "test/jtreg/com/sun/javatest/util/SysEnv.java"
1417 (("/usr/bin/env") (which "env")))
1418 (substitute* "openjdk.src/hotspot/test/test_env.sh"
1419 (("/bin/rm") (which "rm"))
1420 (("/bin/cp") (which "cp"))
1421 (("/bin/mv") (which "mv")))
1423 (add-before 'check 'fix-hotspot-tests
1425 (with-directory-excursion "openjdk.src/hotspot/test/"
1426 (substitute* "jprt.config"
1427 (("PATH=\"\\$\\{path4sdk\\}\"")
1428 (string-append "PATH=" (getenv "PATH")))
1429 (("make=/usr/bin/make")
1430 (string-append "make=" (which "make"))))
1431 (substitute* '("runtime/6626217/Test6626217.sh"
1432 "runtime/7110720/Test7110720.sh")
1433 (("/bin/rm") (which "rm"))
1434 (("/bin/cp") (which "cp"))
1435 (("/bin/mv") (which "mv"))))
1437 (add-before 'check 'fix-jdk-tests
1439 (with-directory-excursion "openjdk.src/jdk/test/"
1440 (substitute* "com/sun/jdi/JdbReadTwiceTest.sh"
1441 (("/bin/pwd") (which "pwd")))
1442 (substitute* "com/sun/jdi/ShellScaffold.sh"
1443 (("/bin/kill") (which "kill")))
1444 (substitute* "start-Xvfb.sh"
1445 ;;(("/usr/bin/X11/Xvfb") (which "Xvfb"))
1446 (("/usr/bin/nohup") (which "nohup")))
1447 (substitute* "javax/security/auth/Subject/doAs/Test.sh"
1448 (("/bin/rm") (which "rm")))
1449 (substitute* "tools/launcher/MultipleJRE.sh"
1450 (("echo \"#!/bin/sh\"")
1451 (string-append "echo \"#!" (which "rm") "\""))
1452 (("/usr/bin/zip") (which "zip")))
1453 (substitute* "com/sun/jdi/OnThrowTest.java"
1454 (("#!/bin/sh") (string-append "#!" (which "sh"))))
1455 (substitute* "java/lang/management/OperatingSystemMXBean/GetSystemLoadAverage.java"
1456 (("/usr/bin/uptime") (which "uptime")))
1457 (substitute* "java/lang/ProcessBuilder/Basic.java"
1458 (("/usr/bin/env") (which "env"))
1459 (("/bin/false") (which "false"))
1460 (("/bin/true") (which "true"))
1461 (("/bin/cp") (which "cp"))
1462 (("/bin/sh") (which "sh")))
1463 (substitute* "java/lang/ProcessBuilder/FeelingLucky.java"
1464 (("/bin/sh") (which "sh")))
1465 (substitute* "java/lang/ProcessBuilder/Zombies.java"
1466 (("/usr/bin/perl") (which "perl"))
1467 (("/bin/ps") (which "ps"))
1468 (("/bin/true") (which "true")))
1469 (substitute* "java/lang/Runtime/exec/ConcurrentRead.java"
1470 (("/usr/bin/tee") (which "tee")))
1471 (substitute* "java/lang/Runtime/exec/ExecWithDir.java"
1472 (("/bin/true") (which "true")))
1473 (substitute* "java/lang/Runtime/exec/ExecWithInput.java"
1474 (("/bin/cat") (which "cat")))
1475 (substitute* "java/lang/Runtime/exec/ExitValue.java"
1476 (("/bin/sh") (which "sh"))
1477 (("/bin/true") (which "true"))
1478 (("/bin/kill") (which "kill")))
1479 (substitute* "java/lang/Runtime/exec/LotsOfDestroys.java"
1480 (("/usr/bin/echo") (which "echo")))
1481 (substitute* "java/lang/Runtime/exec/LotsOfOutput.java"
1482 (("/usr/bin/cat") (which "cat")))
1483 (substitute* "java/lang/Runtime/exec/SleepyCat.java"
1484 (("/bin/cat") (which "cat"))
1485 (("/bin/sleep") (which "sleep"))
1486 (("/bin/sh") (which "sh")))
1487 (substitute* "java/lang/Runtime/exec/StreamsSurviveDestroy.java"
1488 (("/bin/cat") (which "cat")))
1489 (substitute* "java/rmi/activation/CommandEnvironment/SetChildEnv.java"
1490 (("/bin/chmod") (which "chmod")))
1491 (substitute* "java/util/zip/ZipFile/Assortment.java"
1492 (("/bin/sh") (which "sh"))))
1496 ;; The "make check-*" targets always return zero, so we need to
1497 ;; check for errors in the associated log files to determine
1498 ;; whether any tests have failed.
1499 (use-modules (ice-9 rdelim))
1500 (let* ((error-pattern (make-regexp "^(Error|FAILED):.*"))
1501 (checker (lambda (port)
1503 (let ((line (read-line port)))
1505 ((eof-object? line) #t)
1506 ((regexp-exec error-pattern line)
1507 (error "test failed"))
1509 (run-test (lambda (test)
1510 (invoke "make" test)
1511 (call-with-input-file
1512 (string-append "test/" test ".log")
1514 (when #f ; skip tests
1515 (run-test "check-hotspot")
1516 (run-test "check-langtools")
1517 (run-test "check-jdk"))
1520 (lambda* (#:key outputs #:allow-other-keys)
1521 (let ((doc (string-append (assoc-ref outputs "doc")
1522 "/share/doc/icedtea"))
1523 (jre (assoc-ref outputs "out"))
1524 (jdk (assoc-ref outputs "jdk")))
1525 (copy-recursively "openjdk.build/docs" doc)
1526 (copy-recursively "openjdk.build/j2re-image" jre)
1527 (copy-recursively "openjdk.build/j2sdk-image" jdk))
1529 ;; Some of the libraries in the lib/amd64 folder link to libjvm.so.
1530 ;; But that shared object is located in the server/ folder, so it
1531 ;; cannot be found. This phase creates a symbolic link in the
1532 ;; lib/amd64 folder so that the other libraries can find it.
1535 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
1537 ;; FIXME: Find the bug in the build system, so that this symlink is
1539 (add-after 'install 'install-libjvm
1540 (lambda* (#:key inputs outputs #:allow-other-keys)
1541 (let* ((lib-path (string-append (assoc-ref outputs "out")
1542 ;; See 'INSTALL_ARCH_DIR' in
1544 ,(match (%current-system)
1553 ;; We need a catch-all, dropping
1554 ;; '-linux' works in most cases.
1559 (%current-system) 6)))))))
1560 (symlink (string-append lib-path "/server/libjvm.so")
1561 (string-append lib-path "/libjvm.so")))
1563 ;; By default IcedTea only generates an empty keystore. In order to
1564 ;; be able to use certificates in Java programs we need to generate a
1565 ;; keystore from a set of certificates. For convenience we use the
1566 ;; certificates from the nss-certs package.
1567 (add-after 'install 'install-keystore
1568 (lambda* (#:key inputs outputs #:allow-other-keys)
1569 (let* ((keystore "cacerts")
1570 (certs-dir (string-append (assoc-ref inputs "nss-certs")
1572 (keytool (string-append (assoc-ref outputs "jdk")
1574 (define (extract-cert file target)
1575 (call-with-input-file file
1577 (call-with-output-file target
1579 (let loop ((line (read-line in 'concat))
1582 ((eof-object? line) #t)
1583 ((string-prefix? "-----BEGIN" line)
1585 (loop (read-line in 'concat) #t))
1586 ((string-prefix? "-----END" line)
1590 (when copying? (display line out))
1591 (loop (read-line in 'concat) copying?)))))))))
1592 (define (import-cert cert)
1593 (format #t "Importing certificate ~a\n" (basename cert))
1594 (let ((temp "tmpcert"))
1595 (extract-cert cert temp)
1596 (let ((port (open-pipe* OPEN_WRITE keytool
1598 "-alias" (basename cert)
1599 "-keystore" keystore
1600 "-storepass" "changeit"
1602 (display "yes\n" port)
1603 (when (not (zero? (status:exit-val (close-pipe port))))
1604 (format #t "failed to import ~a\n" cert)))
1605 (delete-file temp)))
1607 ;; This is necessary because the certificate directory contains
1608 ;; files with non-ASCII characters in their names.
1609 (setlocale LC_ALL "en_US.utf8")
1610 (setenv "LC_ALL" "en_US.utf8")
1612 (for-each import-cert (find-files certs-dir "\\.pem$"))
1613 (mkdir-p (string-append (assoc-ref outputs "out")
1615 (mkdir-p (string-append (assoc-ref outputs "jdk")
1616 "/jre/lib/security"))
1618 ;; The cacerts files we are going to overwrite are chmod'ed as
1619 ;; read-only (444) in icedtea-8 (which derives from this
1620 ;; package). We have to change this so we can overwrite them.
1621 (chmod (string-append (assoc-ref outputs "out")
1622 "/lib/security/" keystore) #o644)
1623 (chmod (string-append (assoc-ref outputs "jdk")
1624 "/jre/lib/security/" keystore) #o644)
1626 (install-file keystore
1627 (string-append (assoc-ref outputs "out")
1629 (install-file keystore
1630 (string-append (assoc-ref outputs "jdk")
1631 "/jre/lib/security"))
1636 "0l34ikyf62hbzlf9032alzkkqvf7bpmckz4gvirvph755w7gka8l"))
1639 "050gv2jbg1pi6qkn8w18bwpbklfa5b0kymjvan9pncddbj8m84fz"))
1642 "1k6yldwnxfzdg5926r1nlfv8d1r1j7rlp2nkz6gqh05vgyamnfhl"))
1645 "110j7jlz47x2gg6f7653x12mssan5kvj9l9h1m1c8c92drfxbqyk"))
1648 "0d1mca38ksxvdskp9im3pp7fdijhj1n3lwq9w13r9s4v3qyskgdd"))
1651 "0nq5236fzxn3p6x8cgncl56mzcmsj07q9gymysnws4c8byc6n0qj"))
1656 "http://icedtea.classpath.org/downloads/drops"
1657 "/icedtea7/" version "/hotspot.tar.bz2"))
1660 "17bdv39n4lh8l5737c96f3xgamx4y305m067p01cywgp7zaddqws"))
1661 (patches (search-patches
1662 "icedtea-7-hotspot-aarch64-use-c++98.patch"))))
1663 ("ant" ,ant-bootstrap)
1665 ("coreutils" ,coreutils)
1666 ("diffutils" ,diffutils) ;for tests
1669 ("libtool" ,libtool)
1670 ("pkg-config" ,pkg-config)
1676 ("fastjar" ,fastjar)
1677 ("libxslt" ,libxslt) ;for xsltproc
1678 ("nss-certs" ,nss-certs)
1680 ("procps" ,procps) ;for "free", even though I'm not sure we should use it
1681 ("jdk" ,icedtea-6 "jdk")))
1683 `(("alsa-lib" ,alsa-lib)
1686 ("libxcomposite" ,libxcomposite)
1688 ("libxtst" ,libxtst)
1690 ("libxinerama" ,libxinerama)
1691 ("libxrender" ,libxrender)
1692 ("libjpeg" ,libjpeg-turbo)
1694 ("mit-krb5" ,mit-krb5)
1697 ("fontconfig" ,fontconfig)
1698 ("freetype" ,freetype)
1702 (home-page "http://icedtea.classpath.org")
1703 (synopsis "Java development kit")
1705 "This package provides the Java development kit OpenJDK built with the
1706 IcedTea build harness.")
1708 ;; 'configure' lists "mips" and "mipsel", but not "mips64el'.
1709 (supported-systems (delete "mips64el-linux" %supported-systems))
1711 ;; IcedTea is released under the GPL2 + Classpath exception, which is the
1712 ;; same license as both GNU Classpath and OpenJDK.
1713 (license license:gpl2+))))
1715 (define-public icedtea-8
1716 (let* ((version "3.7.0")
1717 (drop (lambda (name hash)
1721 "http://icedtea.classpath.org/download/drops"
1722 "/icedtea8/" version "/" name ".tar.xz"))
1723 (sha256 (base32 hash))))))
1724 (package (inherit icedtea-7)
1729 "http://icedtea.wildebeest.org/download/source/icedtea-"
1733 "09yqzn8rpccs7cyv89hhy5zlznpgqw5x3jz0w1ccp0cz1vgs8l5w"))
1734 (modules '((guix build utils)))
1737 (substitute* '("configure"
1739 ;; Do not embed build time
1740 (("(DIST_ID=\"Custom build).*$" _ prefix)
1741 (string-append prefix "\"\n"))
1742 ;; Do not leak information about the build host
1743 (("DIST_NAME=\"\\$build_os\"")
1744 "DIST_NAME=\"guix\""))
1747 `(#:imported-modules
1748 ((guix build ant-build-system)
1749 (guix build syscalls)
1750 ,@%gnu-build-system-modules)
1751 ,@(substitute-keyword-arguments (package-arguments icedtea-7)
1752 ((#:modules modules)
1753 `((guix build utils)
1754 (guix build gnu-build-system)
1755 ((guix build ant-build-system) #:prefix ant:)
1760 ((#:configure-flags flags)
1761 `(let ((jdk (assoc-ref %build-inputs "jdk")))
1762 `( ;;"--disable-bootstrap"
1763 "--enable-bootstrap"
1765 ,(string-append "--with-parallel-jobs="
1766 (number->string (parallel-job-count)))
1767 "--disable-downloading"
1768 "--disable-system-pcsc"
1769 "--disable-system-sctp"
1770 "--disable-tests" ;they are run in the check phase instead
1771 "--with-openjdk-src-dir=./openjdk.src"
1772 ,(string-append "--with-jdk-home=" jdk))))
1774 `(modify-phases ,phases
1775 (delete 'fix-x11-extension-include-path)
1776 (delete 'patch-paths)
1777 (delete 'set-additional-paths)
1778 (delete 'patch-patches)
1779 (delete 'patch-bitrot)
1780 ;; Prevent the keytool from recording the current time when
1781 ;; adding certificates at build time.
1782 (add-after 'unpack 'patch-keystore
1784 (substitute* "openjdk.src/jdk/src/share/classes/sun/security/provider/JavaKeyStore.java"
1785 (("date = new Date\\(\\);")
1787 date = (System.getenv(\"SOURCE_DATE_EPOCH\") != null) ?\
1788 new Date(Long.parseLong(System.getenv(\"SOURCE_DATE_EPOCH\"))) :\
1791 (add-after 'unpack 'patch-jni-libs
1792 ;; Hardcode dynamically loaded libraries.
1794 (let* ((library-path (search-path-as-string->list
1795 (getenv "LIBRARY_PATH")))
1796 (find-library (lambda (name)
1799 (string-append "lib" name ".so")))))
1802 (catch 'decoding-error
1805 (("VERSIONED_JNI_LIB_NAME\\(\"(.*)\", \"(.*)\"\\)"
1807 (format #f "\"~a\"" (find-library name)))
1808 (("JNI_LIB_NAME\\(\"(.*)\"\\)" _ name)
1809 (format #f "\"~a\"" (find-library name)))))
1811 ;; Those are safe to skip.
1812 (format (current-error-port)
1813 "warning: failed to substitute: ~a~%"
1815 (find-files "openjdk.src/jdk/src/solaris/native"
1819 (lambda* (#:key outputs #:allow-other-keys)
1820 (let ((doc (string-append (assoc-ref outputs "doc")
1821 "/share/doc/icedtea"))
1822 (jre (assoc-ref outputs "out"))
1823 (jdk (assoc-ref outputs "jdk")))
1824 (copy-recursively "openjdk.build/docs" doc)
1825 (copy-recursively "openjdk.build/images/j2re-image" jre)
1826 (copy-recursively "openjdk.build/images/j2sdk-image" jdk)
1827 ;; Install the nss.cfg file to JRE to enable SSL/TLS
1829 (copy-file (string-append jdk "/jre/lib/security/nss.cfg")
1830 (string-append jre "/lib/security/nss.cfg"))
1832 (add-after 'install 'strip-jar-timestamps
1833 (assoc-ref ant:%standard-phases 'strip-jar-timestamps)))))))
1835 `(("jdk" ,icedtea-7 "jdk")
1838 "1mj6xgmw31i6qd30qi9dmv7160fbcfq5ikz1jwjihdg2793il19p"))
1841 "1wb8k5zm40zld0986dvmlh5xh3gyixbg9h26sl662zy92amhmyyg"))
1844 "11ma4zz0599cy70xd219v7a8vin7p96xrhhz3wsaw6cjhkzpagah"))
1847 "14m1y0z0fbm5z5zjw3vnq85py8dma84bi3f9cw8rhdyc6skk8q4i"))
1850 "09andnm6xaasnp963hgx42yiflifiljp9z7z85jrfyc5z8a5whmf"))
1853 "0s6lcpc0zckz2fnq98aqf28nz9y3wbi41a3kyaqqa2abwbkm1zwl"))
1856 "15wizy123vhk40chl1b4p552jf2pw2hdww0myf11qab425axz4nw"))
1861 "http://icedtea.classpath.org/download/drops"
1862 "/icedtea8/" version "/hotspot.tar.xz"))
1865 "1ciz1w9j0kz7s1dxdhyqq71nla9icyz6qvn0b9z2zgkklqa98qmm"))
1866 (patches (search-patches
1867 "icedtea-7-hotspot-gcc-segfault-workaround.patch"))))
1870 "19pzl3ppaw8j6r5cnyp8qiw3hxijh3hdc46l39g5yfhdl4pr4hpa"))
1873 "0k33anxdzw1icn072wynfmmdjhsv50hay0j1sfkfxny12rb3vgdy"))
1874 ,@(fold alist-delete (package-native-inputs icedtea-7)
1875 '("jdk" "openjdk-src" "corba-drop" "jaxp-drop" "jaxws-drop"
1876 "jdk-drop" "langtools-drop" "hotspot-drop")))))))
1878 (define-public openjdk9
1884 (uri "https://hg.openjdk.java.net/jdk/jdk/archive/3cc80be736f2.tar.bz2")
1885 (file-name (string-append name "-" version ".tar.bz2"))
1888 "01ihmyf7k5z17wbr7xig7y40l9f01d5zjgkcmawn1102hw5kchpq"))
1889 (modules '((guix build utils)))
1892 (for-each delete-file
1893 (find-files "." ".*.(bin|exe|jar)$"))
1895 (build-system gnu-build-system)
1896 (outputs '("out" "jdk" "doc"))
1898 `(#:tests? #f; require jtreg
1899 #:make-flags '("all")
1901 ((guix build syscalls)
1902 ,@%gnu-build-system-modules)
1904 (modify-phases %standard-phases
1905 (add-after 'patch-source-shebangs 'fix-java-shebangs
1907 ;; This file was "fixed" by patch-source-shebangs, but it requires
1908 ;; this exact first line.
1909 (substitute* "jdk/make/data/blacklistedcertsconverter/blacklisted.certs.pem"
1910 (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))
1913 (lambda* (#:key inputs outputs #:allow-other-keys)
1914 ;; TODO: unbundle libpng and lcms
1915 (invoke "bash" "./configure"
1916 (string-append "--with-freetype=" (assoc-ref inputs "freetype"))
1917 "--disable-freetype-bundling"
1918 "--disable-warnings-as-errors"
1919 "--disable-hotspot-gtest"
1920 "--with-giflib=system"
1921 "--with-libjpeg=system"
1922 (string-append "--prefix=" (assoc-ref outputs "out")))
1924 (add-before 'build 'write-source-revision-file
1926 (with-output-to-file ".src-rev"
1928 (display ,version)))
1931 (lambda* (#:key make-flags parallel-build? #:allow-other-keys)
1932 (apply invoke "make"
1933 `(,@(if parallel-build?
1934 (list (string-append "JOBS="
1935 (number->string (parallel-job-count))))
1938 ;; Some of the libraries in the lib/ folder link to libjvm.so.
1939 ;; But that shared object is located in the server/ folder, so it
1940 ;; cannot be found. This phase creates a symbolic link in the
1941 ;; lib/ folder so that the other libraries can find it.
1944 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
1946 ;; FIXME: Find the bug in the build system, so that this symlink is
1948 (add-after 'install 'install-libjvm
1949 (lambda* (#:key inputs outputs #:allow-other-keys)
1950 (let* ((lib-out (string-append (assoc-ref outputs "out")
1952 (lib-jdk (string-append (assoc-ref outputs "jdk")
1954 (symlink (string-append lib-jdk "/server/libjvm.so")
1955 (string-append lib-jdk "/libjvm.so"))
1956 (symlink (string-append lib-out "/server/libjvm.so")
1957 (string-append lib-out "/libjvm.so")))
1960 (lambda* (#:key outputs #:allow-other-keys)
1961 (let ((out (assoc-ref outputs "out"))
1962 (jdk (assoc-ref outputs "jdk"))
1963 (doc (assoc-ref outputs "doc"))
1964 (images (car (find-files "build" ".*-server-release"
1965 #:directories? #t))))
1966 (copy-recursively (string-append images "/images/jdk") jdk)
1967 (copy-recursively (string-append images "/images/jre") out)
1968 (copy-recursively (string-append images "/images/docs") doc))
1970 (add-after 'install 'strip-zip-timestamps
1971 (lambda* (#:key outputs #:allow-other-keys)
1972 (use-modules (guix build syscalls))
1973 (for-each (lambda (zip)
1974 (let ((dir (mkdtemp! "zip-contents.XXXXXX")))
1975 (with-directory-excursion dir
1976 (invoke "unzip" zip))
1978 (for-each (lambda (file)
1979 (let ((s (lstat file)))
1980 (unless (eq? (stat:type s) 'symlink)
1981 (format #t "reset ~a~%" file)
1982 (utime file 0 0 0 0))))
1983 (find-files dir #:directories? #t))
1984 (with-directory-excursion dir
1985 (let ((files (find-files "." ".*" #:directories? #t)))
1986 (apply invoke "zip" "-0" "-X" zip files)))))
1987 (find-files (assoc-ref outputs "doc") ".*.zip$"))
1990 `(("alsa-lib" ,alsa-lib)
1992 ("fontconfig" ,fontconfig)
1993 ("freetype" ,freetype)
1997 ("libjpeg" ,libjpeg-turbo)
2001 ("libxcomposite" ,libxcomposite)
2003 ("libxinerama" ,libxinerama)
2004 ("libxrender" ,libxrender)
2006 ("libxtst" ,libxtst)))
2008 `(("icedtea-8" ,icedtea-8)
2009 ("icedtea-8:jdk" ,icedtea-8 "jdk")
2010 ;; XXX: The build system fails with newer versions of GNU Make.
2011 ("make@4.2" ,gnu-make-4.2)
2015 (home-page "https://openjdk.java.net/projects/jdk9/")
2016 (synopsis "Java development kit")
2018 "This package provides the Java development kit OpenJDK.")
2019 (license license:gpl2+)))
2021 (define-public openjdk10
2028 (uri "http://hg.openjdk.java.net/jdk/jdk/archive/6fa770f9f8ab.tar.bz2")
2029 (file-name (string-append name "-" version ".tar.bz2"))
2032 "0zywq2203b4hx4jms9vbwvjcj1d3k2v3qpx4s33729fkpmid97r4"))
2033 (patches (search-patches
2034 "openjdk-10-idlj-reproducibility.patch"))
2035 (modules '((guix build utils)))
2038 (for-each delete-file (find-files "." ".*.(bin|exe|jar)$"))
2041 (substitute-keyword-arguments (package-arguments openjdk9)
2043 `(modify-phases ,phases
2044 (replace 'fix-java-shebangs
2046 ;; This file was "fixed" by patch-source-shebangs, but it requires
2047 ;; this exact first line.
2048 (substitute* "make/data/blacklistedcertsconverter/blacklisted.certs.pem"
2049 (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))
2052 (lambda* (#:key inputs outputs #:allow-other-keys)
2053 (invoke "bash" "./configure"
2054 (string-append "--with-freetype=" (assoc-ref inputs "freetype"))
2055 "--disable-freetype-bundling"
2056 "--disable-warnings-as-errors"
2057 "--disable-hotspot-gtest"
2058 "--with-giflib=system"
2059 "--with-libjpeg=system"
2060 "--with-native-debug-symbols=zipped"
2061 (string-append "--prefix=" (assoc-ref outputs "out")))
2064 `(("openjdk9" ,openjdk9)
2065 ("openjdk9:jdk" ,openjdk9 "jdk")
2066 ("make@4.2" ,gnu-make-4.2)
2071 (define-public openjdk11
2077 (uri "http://hg.openjdk.java.net/jdk/jdk/archive/76072a077ee1.tar.bz2")
2078 (file-name (string-append name "-" version ".tar.bz2"))
2081 "0v705w1s9lrqalzahir78pk397rkk9gfvzq821yv8h3xha0bqi6w"))
2082 (modules '((guix build utils)))
2085 (for-each delete-file (find-files "." ".*.(bin|exe|jar)$"))
2087 (build-system gnu-build-system)
2088 (outputs '("out" "jdk" "doc"))
2090 `(#:imported-modules
2091 ((guix build syscalls)
2092 (ice-9 binary-ports)
2094 ,@%gnu-build-system-modules)
2095 #:tests? #f; requires jtreg
2096 ;; TODO package jtreg
2098 `("--disable-option-checking" ; --enable-fast-install default flag errors otherwise
2099 "--disable-warnings-as-errors"
2100 ;; make validate-runpath pass, see: http://issues.guix.info/issue/32894
2101 "--with-native-debug-symbols=zipped"
2102 ;; do not use the bundled libraries
2103 "--with-giflib=system"
2104 "--with-lcms=system"
2105 "--with-libjpeg=system"
2106 "--with-libpng=system"
2107 "--with-version-pre="
2108 ;; allow the build system to locate the system freetype
2109 ,(string-append "--with-freetype-include="
2110 (assoc-ref %build-inputs "freetype") "/include")
2111 ,(string-append "--with-freetype-lib="
2112 (assoc-ref %build-inputs "freetype") "/lib"))
2114 (modify-phases %standard-phases
2115 (add-after 'patch-source-shebangs 'fix-java-shebangs
2117 ;; This file was "fixed" by patch-source-shebangs, but it requires
2118 ;; this exact first line.
2119 (substitute* "make/data/blacklistedcertsconverter/blacklisted.certs.pem"
2120 (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))
2122 (add-before 'build 'write-source-revision-file
2124 (with-output-to-file ".src-rev"
2126 (display ,version)))
2129 (lambda* (#:key parallel-build? make-flags #:allow-other-keys)
2130 (apply invoke "make" "all"
2131 `(,@(if parallel-build?
2132 (list (string-append "JOBS="
2133 (number->string (parallel-job-count))))
2136 ;; jdk 11 does not build jre by default any more
2137 ;; building it anyways
2138 ;; for further information see:
2139 ;; https://github.com/AdoptOpenJDK/openjdk-build/issues/356
2140 (add-after 'build 'build-jre
2141 (lambda* (#:key parallel-build? make-flags #:allow-other-keys)
2142 (apply invoke "make" "legacy-jre-image"
2143 `(,@(if parallel-build?
2144 (list (string-append "JOBS="
2145 (number->string (parallel-job-count))))
2149 (lambda* (#:key outputs #:allow-other-keys)
2150 (let ((out (assoc-ref outputs "out"))
2151 (jdk (assoc-ref outputs "jdk"))
2152 (doc (assoc-ref outputs "doc"))
2153 (images (car (find-files "build" ".*-server-release"
2154 #:directories? #t))))
2155 (copy-recursively (string-append images "/images/jdk") jdk)
2156 (copy-recursively (string-append images "/images/jre") out)
2157 (copy-recursively (string-append images "/images/docs") doc))
2159 ;; Some of the libraries in the lib/ folder link to libjvm.so.
2160 ;; But that shared object is located in the server/ folder, so it
2161 ;; cannot be found. This phase creates a symbolic link in the
2162 ;; lib/ folder so that the other libraries can find it.
2165 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
2167 ;; FIXME: Find the bug in the build system, so that this symlink is
2169 (add-after 'install 'install-libjvm
2170 (lambda* (#:key inputs outputs #:allow-other-keys)
2171 (let* ((lib-out (string-append (assoc-ref outputs "out")
2173 (lib-jdk (string-append (assoc-ref outputs "jdk")
2175 (symlink (string-append lib-jdk "/server/libjvm.so")
2176 (string-append lib-jdk "/libjvm.so"))
2177 (symlink (string-append lib-out "/server/libjvm.so")
2178 (string-append lib-out "/libjvm.so")))
2180 (add-after 'install 'strip-character-data-timestamps
2181 (lambda* (#:key outputs #:allow-other-keys)
2182 (use-modules (guix build syscalls))
2183 (let ((archive (string-append
2184 (assoc-ref outputs "jdk") "/lib/src.zip"))
2185 (dir (mkdtemp! "zip-contents.XXXXXX")))
2186 (with-directory-excursion dir
2187 (invoke "unzip" archive))
2188 (delete-file archive)
2189 (with-directory-excursion dir
2190 (let ((char-data-files (find-files "." "CharacterData.*")))
2191 (for-each (lambda (file)
2193 (((string-append "This file was generated "
2194 "AUTOMATICALLY from a template "
2196 (string-append "This file was generated "
2197 "AUTOMATICALLY from a template "
2200 (with-directory-excursion dir
2201 (let ((files (find-files "." ".*" #:directories? #t)))
2202 (apply invoke "zip" "-0" "-X" archive files))))))
2203 (add-after 'strip-character-data-timestamps 'strip-archive-timestamps
2204 (lambda* (#:key outputs #:allow-other-keys)
2205 (use-modules (guix build syscalls)
2206 (ice-9 binary-ports)
2208 (letrec ((repack-archive
2210 (let ((dir (mkdtemp! "zip-contents.XXXXXX")))
2211 (with-directory-excursion dir
2212 (invoke "unzip" archive))
2213 (delete-file archive)
2214 (for-each (compose repack-archive canonicalize-path)
2215 (find-files dir "(ct.sym|.*.jar)$"))
2216 (let ((reset-file-timestamp
2218 (let ((s (lstat file)))
2219 (unless (eq? (stat:type s) 'symlink)
2220 (format #t "reset ~a~%" file)
2221 (utime file 0 0 0 0))))))
2222 (for-each reset-file-timestamp
2223 (find-files dir #:directories? #t)))
2224 (with-directory-excursion dir
2225 (let ((files (find-files "." ".*" #:directories? #t)))
2226 (apply invoke "zip" "-0" "-X" archive files)))))))
2227 (for-each repack-archive
2228 (find-files (assoc-ref outputs "doc") ".*.zip$"))
2229 (for-each repack-archive
2230 (find-files (assoc-ref outputs "jdk")
2231 ".*.(zip|jar|diz)$"))
2232 (repack-archive (string-append (assoc-ref outputs "jdk") "/lib/ct.sym"))
2235 (call-with-input-file file-name
2237 (let ((header #vu8(#x4a #x4d #x01 #x00)))
2238 (if (equal? (get-bytevector-n
2239 file (bytevector-length header))
2241 (let* ((header-length (bytevector-length header))
2242 (temp-file (mkstemp!
2244 "temp-file.XXXXXX")))
2245 (temp-filename (port-filename temp-file))
2247 (- (stat:size (stat file))
2249 (sendfile temp-file file content-length header-length)
2250 (delete-file file-name)
2251 (close-port temp-file)
2252 (repack-archive (canonicalize-path temp-filename))
2253 (call-with-output-file file-name
2255 (put-bytevector file header)
2256 (call-with-input-file temp-filename
2260 (stat:size (stat temp-file)) 0)))))))))))))
2261 (for-each repack-jmod
2262 (find-files (assoc-ref outputs "jdk") ".*.jmod$")))
2264 (add-after 'install 'remove-timestamp-from-api-summary
2265 (lambda* (#:key outputs #:allow-other-keys)
2266 (substitute* (string-append (assoc-ref outputs "doc")
2267 "/api/overview-summary.html")
2268 (("Generated by javadoc \\(11-internal\\).*$")
2269 "Generated by javadoc (11-internal) -->\n"))
2272 `(("alsa-lib" ,alsa-lib)
2274 ("fontconfig" ,fontconfig)
2275 ("freetype" ,freetype)
2278 ("libjpeg" ,libjpeg-turbo)
2281 ("libxext" ,libxext)
2282 ("libxrender" ,libxrender)
2284 ("libxtst" ,libxtst)))
2286 `(("autoconf" ,autoconf)
2287 ("openjdk10" ,openjdk10)
2288 ("openjdk10:jdk" ,openjdk10 "jdk")
2289 ("make" ,gnu-make-4.2)
2290 ("pkg-config" ,pkg-config)
2294 (home-page "https://openjdk.java.net/projects/jdk/11/")
2295 (synopsis "Java development kit")
2297 "This package provides the Java development kit OpenJDK.")
2298 (license license:gpl2+)))
2300 (define-public openjdk12
2307 (uri "http://hg.openjdk.java.net/jdk/jdk/archive/0276cba45aac.tar.bz2")
2308 (file-name (string-append name "-" version ".tar.bz2"))
2311 "0mbhdrk12b6878kby0flnbak7444dlpm0ihlmf92vk59y1c02bc2"))
2312 (modules '((guix build utils)))
2315 (for-each delete-file (find-files "." ".*.(bin|exe|jar)$"))
2318 `(("alsa-lib" ,alsa-lib)
2320 ("fontconfig" ,fontconfig)
2321 ("freetype" ,freetype)
2324 ("libjpeg" ,libjpeg-turbo)
2327 ("libxext" ,libxext)
2328 ("libxrandr" ,libxrandr)
2329 ("libxrender" ,libxrender)
2331 ("libxtst" ,libxtst)))
2333 `(("autoconf" ,autoconf)
2334 ("openjdk11" ,openjdk11)
2335 ("openjdk11:jdk" ,openjdk11 "jdk")
2336 ("make@4.2" ,gnu-make-4.2)
2337 ("pkg-config" ,pkg-config)
2341 (home-page "https://openjdk.java.net/projects/jdk/12")))
2343 (define-public openjdk13
2350 (uri "http://hg.openjdk.java.net/jdk/jdk13/archive/9c250a7600e1.tar.bz2")
2351 (file-name (string-append name "-" version ".tar.bz2"))
2354 "0v0ljvx5dyzp96dw4z4ksw3pvasil7783mgnmd1wk9gads5ab8iq"))
2355 (modules '((guix build utils)))
2358 (for-each delete-file (find-files "." ".*.(bin|exe|jar)$"))
2361 `(("alsa-lib" ,alsa-lib)
2363 ("fontconfig" ,fontconfig)
2364 ("freetype" ,freetype)
2367 ("libjpeg" ,libjpeg-turbo)
2370 ("libxext" ,libxext)
2371 ("libxrandr" ,libxrandr)
2372 ("libxrender" ,libxrender)
2374 ("libxtst" ,libxtst)))
2376 `(("autoconf" ,autoconf)
2377 ("openjdk12:jdk" ,openjdk12 "jdk")
2378 ("make@4.2" ,gnu-make-4.2)
2379 ("pkg-config" ,pkg-config)
2383 (home-page "https://openjdk.java.net/projects/jdk/13")))
2385 (define-public openjdk14
2392 (uri "http://hg.openjdk.java.net/jdk/jdk14/archive/bc54620a3848.tar.bz2")
2393 (file-name (string-append name "-" version ".tar.bz2"))
2396 "0z485pk7r1xpw8004g4nrwrzj17sabgx8yfdbxwfvzkjp8qyajch"))
2397 (modules '((guix build utils)))
2400 ;; The m4 macro uses 'help' to search for builtins, which is
2401 ;; not available in bash-minimal
2402 (substitute* "make/autoconf/basics.m4"
2403 (("if help") "if command -v"))
2404 (for-each delete-file (find-files "." ".*.(bin|exe|jar)$"))
2407 `(("alsa-lib" ,alsa-lib)
2409 ("fontconfig" ,fontconfig)
2410 ("freetype" ,freetype)
2413 ("libjpeg" ,libjpeg-turbo)
2416 ("libxext" ,libxext)
2417 ("libxrandr" ,libxrandr)
2418 ("libxrender" ,libxrender)
2420 ("libxtst" ,libxtst)))
2422 `(("autoconf" ,autoconf)
2423 ("make@4.2" ,gnu-make-4.2)
2424 ("openjdk13:jdk" ,openjdk13 "jdk")
2425 ("pkg-config" ,pkg-config)
2429 (home-page "https://openjdk.java.net/projects/jdk/14")))
2431 (define-public icedtea icedtea-8)
2434 (define-public ant/java8
2435 (package (inherit ant-bootstrap)
2440 (uri (string-append "mirror://apache/ant/source/apache-ant-"
2441 version "-src.tar.gz"))
2444 "066k2isig5xm70cihj9p73hkp5w7h5zbfqz5kxb6cwr9cb86xl2k"))
2445 (modules '((guix build utils)))
2448 (for-each delete-file
2449 (find-files "lib/optional" "\\.jar$"))
2452 (substitute-keyword-arguments (package-arguments ant-bootstrap)
2454 `(modify-phases ,phases
2455 (add-after 'unpack 'remove-scripts
2456 ;; Remove bat / cmd scripts for DOS as well as the antRun and runant
2459 (for-each delete-file
2460 (find-files "src/script"
2461 "(.*\\.(bat|cmd)|runant.*|antRun.*)"))
2464 (lambda* (#:key inputs outputs #:allow-other-keys)
2465 (setenv "JAVA_HOME" (assoc-ref inputs "jdk"))
2467 ;; Disable tests to avoid dependency on hamcrest-core, which needs
2468 ;; Ant to build. This is necessary in addition to disabling the
2469 ;; "check" phase, because the dependency on "test-jar" would always
2470 ;; result in the tests to be run.
2471 (substitute* "build.xml"
2472 (("depends=\"jars,test-jar") "depends=\"jars"))
2473 (invoke "bash" "bootstrap.sh"
2474 (string-append "-Ddist.dir="
2475 (assoc-ref outputs "out")))))))))
2477 `(("jdk" ,icedtea-8 "jdk")
2479 ("unzip" ,unzip)))))
2481 ;; The 1.9.x series is the last that can be built with GCJ. The 1.10.x series
2484 (package (inherit ant/java8)
2488 (uri (string-append "mirror://apache/ant/source/apache-ant-"
2489 version "-src.tar.gz"))
2492 "1xy30f1w5gaqk6g3f0vw7ygix4rb6032qkcw42y4z8wd9jihgygd"))))
2494 `(("jdk" ,icedtea-7 "jdk")
2496 ("unzip" ,unzip)))))
2498 (define-public ant-apache-bcel
2501 (name "ant-apache-bcel")
2503 (substitute-keyword-arguments (package-arguments ant/java8)
2505 `(modify-phases ,phases
2506 (add-after 'unpack 'link-bcel
2507 (lambda* (#:key inputs #:allow-other-keys)
2508 (for-each (lambda (file)
2510 (string-append "lib/optional/"
2512 (find-files (assoc-ref inputs "java-commons-bcel")
2515 (add-after 'build 'install
2516 (lambda* (#:key outputs #:allow-other-keys)
2517 (let* ((out (assoc-ref outputs "out"))
2518 (share (string-append out "/share/java"))
2519 (bin (string-append out "/bin"))
2520 (lib (string-append out "/lib")))
2522 (install-file (string-append lib "/ant-apache-bcel.jar") share)
2523 (delete-file-recursively bin)
2524 (delete-file-recursively lib)
2527 `(("java-commons-bcel" ,java-commons-bcel)
2528 ,@(package-inputs ant/java8)))))
2530 (define-public ant-junit
2535 (substitute-keyword-arguments (package-arguments ant/java8)
2537 `(modify-phases ,phases
2538 (add-after 'unpack 'link-junit
2539 (lambda* (#:key inputs #:allow-other-keys)
2540 (for-each (lambda (file)
2542 (string-append "lib/optional/"
2544 (find-files (assoc-ref inputs "java-junit")
2547 (add-after 'build 'install
2548 (lambda* (#:key outputs #:allow-other-keys)
2549 (let* ((out (assoc-ref outputs "out"))
2550 (share (string-append out "/share/java"))
2551 (bin (string-append out "/bin"))
2552 (lib (string-append out "/lib")))
2554 (install-file (string-append lib "/ant-junit.jar") share)
2555 (delete-file-recursively bin)
2556 (delete-file-recursively lib)
2559 `(("java-junit" ,java-junit)
2560 ,@(package-inputs ant/java8)))))
2562 (define-public java-openjfx-build
2564 (name "java-openjfx-build")
2565 ;; This is a java-8 version
2570 (url "http://hg.openjdk.java.net/openjfx/8u-dev/rt")
2571 (changeset (string-append
2572 (string-join (string-split version #\.) "u")
2574 (file-name (string-append name "-" version "-checkout"))
2575 (modules '((guix build utils)))
2578 ;; Delete included gradle jar
2579 (delete-file-recursively "gradle/wrapper")
2583 "0yg38mwpivswccv9n96k06x3iv82i4px1a9xg9l8dswzwmfj259f"))
2584 (patches (search-patches "java-openjfx-build-jdk_version.patch"))))
2585 (build-system ant-build-system)
2587 `(#:jar-name "java-openjfx.jar"
2588 #:source-dir "buildSrc/src/main/java"
2589 #:test-dir "buildSrc/src/test"
2591 (modify-phases %standard-phases
2592 (add-before 'configure 'generate-jsl-parser
2594 (invoke "antlr3" "-o"
2595 "buildSrc/src/main/java/com/sun/scenario/effect/compiler"
2596 "buildSrc/src/main/antlr/JSL.g"))))))
2598 `(("antlr3" ,antlr3)
2599 ("java-stringtemplate" ,java-stringtemplate)))
2601 `(("java-junit" ,java-junit)
2602 ("java-hamcrest-core" ,java-hamcrest-core)))
2603 (home-page "https://openjfx.io")
2604 (synopsis "Graphical application toolkit in Java")
2605 (description "OpenJFX is a client application platform for desktop,
2606 mobile and embedded systems built on Java. Its goal is to produce a
2607 modern, efficient, and fully featured toolkit for developing rich client
2608 applications. This package contains base classes for the OpenJFX
2609 distribution and helper classes for building other parts of the
2611 (license license:gpl2))) ;gpl2 only, with classpath exception
2613 (define-public java-openjfx-base
2614 (package (inherit java-openjfx-build)
2615 (name "java-openjfx-base")
2617 `(#:jar-name "java-openjfx-base.jar"
2618 #:source-dir "modules/base/src/main/java:modules/base/src/main/java8:modules/base/src/main/version-info"
2619 #:test-dir "modules/base/src/test"
2621 (modify-phases %standard-phases
2622 (add-before 'check 'remove-empty-file
2624 (with-directory-excursion "modules/base/src/test/java"
2625 ;; These files are completely commented, but junit expects them to
2626 ;; contain a class, so tests fail.
2628 "com/sun/javafx/property/adapter/PropertyDescriptorTest.java")
2630 "com/sun/javafx/property/adapter/ReadOnlyPropertyDescriptorTest.java")
2631 (delete-file "javafx/beans/property/PropertiesTest.java")
2633 "javafx/beans/property/adapter/ReadOnlyJavaBeanPropertyBuilder_General_Test.java")
2635 (delete-file "com/sun/javafx/runtime/VersionInfoTest.java"))
2638 `(("java-openjfx-build" ,java-openjfx-build)))
2639 (description "OpenJFX is a client application platform for desktop,
2640 mobile and embedded systems built on Java. Its goal is to produce a
2641 modern, efficient, and fully featured toolkit for developing rich client
2642 applications. This package contains base classes for the OpenJFX
2645 (define-public java-openjfx-graphics
2646 (package (inherit java-openjfx-build)
2647 (name "java-openjfx-graphics")
2649 `(#:jar-name "java-openjfx-graphics.jar"
2650 #:source-dir "modules/graphics/src/main/java"
2651 #:tests? #f; require X
2652 #:test-dir "modules/graphics/src/test"))
2654 `(("java-openjfx-base" ,java-openjfx-base)
2655 ("java-swt" ,java-swt)))
2656 (description "OpenJFX is a client application platform for desktop,
2657 mobile and embedded systems built on Java. Its goal is to produce a
2658 modern, efficient, and fully featured toolkit for developing rich client
2659 applications. This package contains graphics-related classes for the
2660 OpenJFX distribution.")))
2662 (define-public java-openjfx-media
2663 (package (inherit java-openjfx-build)
2664 (name "java-openjfx-media")
2666 `(("java-openjxf-graphics" ,java-openjfx-graphics)))
2668 `(#:jar-name "java-openjfx-media.jar"
2669 #:source-dir "modules/media/src/main/java"
2670 #:tests? #f)); no tests
2671 (description "OpenJFX is a client application platform for desktop,
2672 mobile and embedded systems built on Java. Its goal is to produce a
2673 modern, efficient, and fully featured toolkit for developing rich client
2674 applications. This package contains media-related classes for the
2675 OpenJFX distribution.")))
2677 (define-public javacc-4
2684 (url "https://github.com/javacc/javacc")
2685 (commit "release_41")))
2686 (file-name (string-append "javacc-" version "-checkout"))
2689 "07ysav7j8r1c6h8qxrgqk6lwdp74ly0ad1935lragxml0qqc3ka0"))
2690 (modules '((guix build utils)))
2691 ;; delete bundled jars
2692 (snippet '(begin (delete-file-recursively "lib") #t))))
2693 (build-system ant-build-system)
2695 ;; /tmp/guix-build-javacc-4.1.drv-0/source/test/javacodeLA/build.xml:60:
2700 (modify-phases %standard-phases
2701 ;; Delete tests to avoid build failure (we don't run them anyway).
2702 (add-after 'unpack 'delete-tests
2704 (for-each delete-file
2705 '("src/org/javacc/JavaCCTestCase.java"
2706 "src/org/javacc/parser/ExpansionTest.java"
2707 "src/org/javacc/parser/OptionsTest.java"
2708 "src/org/javacc/jjtree/JJTreeOptionsTest.java"))
2709 (for-each delete-file-recursively
2710 '("src/org/javacc/parser/test"
2711 "src/org/javacc/jjdoc/test"))
2713 (replace 'install (install-jars "bin/lib")))))
2714 (home-page "https://javacc.org/")
2715 (synopsis "Java parser generator")
2716 (description "Java Compiler Compiler (JavaCC) is the most popular parser
2717 generator for use with Java applications. A parser generator is a tool that
2718 reads a grammar specification and converts it to a Java program that can
2719 recognize matches to the grammar. In addition to the parser generator itself,
2720 JavaCC provides other standard capabilities related to parser generation such
2721 as tree building (via a tool called JJTree included with JavaCC), actions,
2723 (license license:bsd-3)))
2725 ;; javacc-3, as javacc-4 is not properly bootstrapped: is contains a javacc.jar
2726 ;; in the bootstrap/ directory.
2727 (define-public javacc-3
2734 (url "https://github.com/javacc/javacc.git")
2735 (commit "release_32")))
2736 (file-name (string-append "javacc-" version "-checkout"))
2739 "1pyf1xyh8gk83nxqn2v2mdws32l68ydznha41cxa4l2kkbq1v1g3"))))
2743 (modify-phases %standard-phases
2744 (add-before 'build 'set-java-version
2749 (("debug=") "source=\"1.4\" debug=")))
2750 (find-files "." "build.xml"))
2752 (replace 'install (install-jars "bin/lib")))))))
2754 (define-public javacc
2762 (url "https://github.com/javacc/javacc")
2764 (file-name (git-file-name "javacc" version))
2766 (base32 "18kkak3gda93gr25jrgy6q00g0jr8i24ri2wk4kybz1v234fxx9i"))
2767 (modules '((guix build utils)))
2768 ;; Delete bundled jars.
2769 (snippet '(begin (for-each delete-file-recursively
2770 '("bootstrap" "lib"))
2773 `(#:make-flags ; bootstrap from javacc-4
2774 (list (string-append "-Dbootstrap-jar="
2775 (assoc-ref %build-inputs "javacc")
2776 "/share/java/javacc.jar"))
2777 #:test-target "test"
2779 (modify-phases %standard-phases
2780 (replace 'install (install-jars "target"))
2781 (add-after 'install 'install-bin
2782 (lambda* (#:key outputs inputs #:allow-other-keys)
2783 (let* ((out (assoc-ref outputs "out"))
2784 (dir (string-append out "/share/java"))
2785 (bin (string-append out "/bin"))
2786 (javacc (string-append bin "/javacc")))
2788 (with-output-to-file javacc
2791 (string-append "#!/bin/sh\n"
2792 (assoc-ref inputs "jdk") "/bin/java"
2793 " -cp " dir "/javacc.jar" " `basename $0`" " $*"))))
2794 (chmod javacc #o755)
2795 ;; symlink to different names to affect the first argument and
2796 ;; change the behavior of the jar file.
2797 (symlink javacc (string-append bin "/jjdoc"))
2798 (symlink javacc (string-append bin "/jjtree"))
2802 `(("javacc" ,javacc-4)))))
2804 ;; This is the last 3.x release of ECJ
2805 (define-public java-ecj-3
2811 (uri (string-append "http://archive.eclipse.org/eclipse/"
2812 "downloads/drops/R-" version
2813 "-201301310800/ecjsrc-" version ".jar"))
2816 "01mdj14jw11g1jfnki4fi8229p0c6zzckd38zqy2w4m3cjcvsx04"))))
2817 (build-system ant-build-system)
2819 `(#:tests? #f ; none included
2820 #:jdk ,icedtea-7 ; doesn't build with JDK8+
2821 #:make-flags (list "-f" "src/build.xml")
2822 #:build-target "build"
2824 (modify-phases %standard-phases
2825 (add-after 'unpack 'fix-manifest
2827 ;; Record the main class to make ecj executable.
2828 (with-atomic-file-replacement "src/META-INF/MANIFEST.MF"
2830 (display "Manifest-Version: 1.0
2831 Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n"
2834 (replace 'install (install-jars ".")))))
2835 (home-page "https://eclipse.org")
2836 (synopsis "Eclipse Java development tools core batch compiler")
2837 (description "This package provides the Eclipse Java core batch compiler.")
2838 (license license:epl1.0)))
2840 ;; This is needed for java-cisd-args4j
2841 (define-public java-ecj-3.5
2842 (package (inherit java-ecj-3)
2845 (method url-fetch/zipbomb)
2846 (uri (string-append "http://archive.eclipse.org/eclipse/"
2847 "downloads/drops/R-" version
2848 "-200909170800/ecjsrc-" version ".zip"))
2851 "1vnl2mavisc567bip736xzsvvbjif5279wc4a7pbdik5wlir8qr7"))))
2852 (build-system ant-build-system)
2854 `(#:tests? #f ; none included
2855 #:jdk ,icedtea-7 ; doesn't build with JDK8+
2856 #:build-target "build"
2858 (modify-phases %standard-phases
2859 (add-after 'unpack 'fix-manifest
2861 ;; Record the main class to make ecj executable.
2862 (with-atomic-file-replacement "META-INF/MANIFEST.MF"
2865 (display "Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n"
2868 (replace 'install (install-jars ".")))))
2870 `(("unzip" ,unzip)))))
2872 (define-public java-ecj
2873 (package (inherit java-ecj-3)
2879 "http://archive.eclipse.org/eclipse/downloads/drops4/R-"
2881 "-201703010400/ecjsrc-"
2886 "11cfgsdgznja1pvlxkjbqykxd7pcd5655vkm7s44xmahmap15gpl"))))
2888 `(#:tests? #f ; none included
2889 #:build-target "build"
2891 (modify-phases %standard-phases
2892 (add-after 'unpack 'fix-build.xml
2894 (substitute* "src/build.xml"
2898 (add-after 'unpack 'fix-prop
2900 (substitute* "src/build.xml"
2901 (("^.*properties.*$")
2902 "<include name=\"**/*.properties\"/>
2903 <include name=\"**/*.props\"/>"))
2905 (add-before 'build 'chdir
2909 (replace 'install (install-jars ".")))))))
2911 (define-public java-cisd-base
2912 (let ((revision 38938)
2913 (base-version "14.12.0"))
2915 (name "java-cisd-base")
2916 (version (string-append base-version "-" (number->string revision)))
2920 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2921 "base/tags/release/"
2922 (version-major+minor base-version)
2923 ".x/" base-version "/base/"))
2924 (revision revision)))
2925 (file-name (string-append "java-cisd-base-" version "-checkout"))
2928 "1i5adyf7nzclb0wydgwa1az04qliid8035vpahaandmkmigbnxiy"))
2929 (modules '((guix build utils)))
2932 ;; Delete included gradle jar
2933 (delete-file-recursively "gradle/wrapper")
2934 ;; Delete pre-built native libraries
2935 (delete-file-recursively "libs")
2937 (build-system ant-build-system)
2939 `(#:make-flags '("-file" "build/build.xml")
2940 #:test-target "jar-test"
2943 (modify-phases %standard-phases
2944 (add-after 'unpack 'unpack-build-resources
2945 (lambda* (#:key inputs #:allow-other-keys)
2946 (copy-recursively (assoc-ref inputs "build-resources")
2947 "../build_resources")
2949 (add-after 'unpack-build-resources 'fix-dependencies
2950 (lambda* (#:key inputs #:allow-other-keys)
2951 (substitute* "build/build.xml"
2952 (("\\$\\{lib\\}/testng/testng-jdk15.jar")
2953 (string-append (assoc-ref inputs "java-testng")
2954 "/share/java/java-testng.jar"))
2955 (("\\$\\{lib\\}/commons-lang/commons-lang.jar")
2956 (string-append (assoc-ref inputs "java-commons-lang")
2957 "/share/java/commons-lang-"
2958 ,(package-version java-commons-lang) ".jar"))
2959 (("\\$\\{lib\\}/commons-io/commons-io.jar")
2960 (string-append (assoc-ref inputs "java-commons-io")
2961 "/lib/m2/commons-io/commons-io/"
2962 ,(package-version java-commons-io)
2964 ,(package-version java-commons-io)
2966 ;; Remove dependency on svn
2967 (("<build-info.*") "")
2968 (("\\$\\{revision.number\\}")
2969 ,(number->string revision))
2970 (("\\$\\{version.number\\}") ,base-version))
2971 ;; Remove dependency on classycle
2972 (substitute* "../build_resources/ant/build-common.xml"
2973 (("<taskdef name=\"dependency-checker.*") "")
2974 (("classname=\"classycle.*") "")
2975 (("classpath=\"\\$\\{lib\\}/classycle.*") ""))
2977 ;; A few tests fail because of the lack of a proper /etc/groups and
2978 ;; /etc/passwd file in the build container.
2979 (add-after 'unpack 'disable-broken-tests
2981 (substitute* "sourceTest/java/ch/systemsx/cisd/base/AllTests.java"
2982 (("Unix.isOperational\\(\\)") "false"))
2984 ;; These decorators are almost useless and pull in an unpackaged
2986 (add-after 'unpack 'remove-useless-decorators
2988 (substitute* "source/java/ch/systemsx/cisd/base/unix/Unix.java"
2990 (("import ch.rinn.restrictions.Private;") ""))
2991 (substitute* "sourceTest/java/ch/systemsx/cisd/base/unix/UnixTests.java"
2993 (("import ch.rinn.restrictions.Friend;") ""))
2995 (add-before 'configure 'build-native-code
2996 (lambda* (#:key inputs #:allow-other-keys)
2997 (let ((jdk (assoc-ref inputs "jdk"))
2998 (dir ,(match (%current-system)
3001 ((or "armhf-linux" "aarch64-linux")
3003 ((or "x86_64-linux")
3005 (_ "unknown-Linux"))))
3006 (with-directory-excursion "source/c"
3007 (invoke "gcc" "-shared" "-O3" "-fPIC" "unix.c"
3008 (string-append "-I" jdk "/include")
3009 (string-append "-I" jdk "/include/linux")
3011 (invoke "gcc" "-shared" "-O3" "-fPIC"
3012 "-DMACHINE_BYTE_ORDER=1"
3020 (string-append "-I" jdk "/include")
3021 (string-append "-I" jdk "/include/linux")
3022 "-o" "libnativedata.so"))
3023 (install-file "source/c/libunix.so"
3024 (string-append "libs/native/unix/" dir))
3025 (install-file "source/c/libnativedata.so"
3026 (string-append "libs/native/nativedata/" dir))
3028 ;; In the "check" phase we only build the test executable.
3029 (add-after 'check 'run-tests
3031 (invoke "java" "-jar" "targets/dist/sis-base-test.jar")
3032 (delete-file "targets/dist/sis-base-test.jar")
3034 (replace 'install (install-jars "targets/dist")))))
3036 `(("jdk" ,icedtea-8)
3037 ("java-commons-lang" ,java-commons-lang)
3038 ("java-commons-io" ,java-commons-io)
3039 ("java-testng" ,java-testng)
3044 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
3045 "base/tags/release/"
3046 (version-major+minor base-version)
3048 "/build_resources/"))
3049 (revision revision)))
3052 "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk"))))))
3053 (home-page "http://svnsis.ethz.ch")
3054 (synopsis "Utility classes for libraries from ETH Zurich")
3055 (description "This library supplies some utility classes needed for
3056 libraries from the SIS division at ETH Zurich like jHDF5.")
3057 ;; The C sources are under a non-copyleft license, which looks like a
3058 ;; variant of the BSD licenses. The whole package is under the ASL2.0.
3059 (license (list license:asl2.0
3060 (license:non-copyleft "file://source/c/COPYING"))))))
3062 (define-public java-cisd-args4j
3063 (let ((revision 39162)
3064 (base-version "9.11.2"))
3066 (name "java-cisd-args4j")
3067 (version (string-append base-version "-" (number->string revision)))
3071 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
3072 "args4j/tags/release/"
3073 (version-major+minor base-version)
3074 ".x/" base-version "/args4j/"))
3075 (revision revision)))
3076 (file-name (string-append "java-cisd-args4j-" version "-checkout"))
3079 "0hhqznjaivq7ips7mkwas78z42s6djsm20rrs7g1zd59rcsakxn2"))))
3080 (build-system ant-build-system)
3082 `(#:make-flags '("-file" "build/build.xml")
3083 #:tests? #f ; there are no tests
3084 ;; There are weird build failures with JDK8, such as: "The type
3085 ;; java.io.ObjectInputStream cannot be resolved. It is indirectly
3086 ;; referenced from required .class files"
3088 #:modules ((guix build ant-build-system)
3090 (guix build java-utils)
3095 (modify-phases %standard-phases
3096 (add-after 'unpack 'unpack-build-resources
3097 (lambda* (#:key inputs #:allow-other-keys)
3098 (mkdir-p "../build_resources")
3099 (invoke "tar" "xf" (assoc-ref inputs "build-resources")
3100 "-C" "../build_resources"
3101 "--strip-components=1")
3102 (mkdir-p "../build_resources/lib")
3104 (add-after 'unpack-build-resources 'fix-dependencies
3105 (lambda* (#:key inputs #:allow-other-keys)
3106 ;; FIXME: There should be a more convenient abstraction for
3107 ;; editing XML files.
3108 (with-directory-excursion "../build_resources/ant/"
3109 (chmod "build-common.xml" #o664)
3110 (call-with-output-file "build-common.xml.new"
3114 (with-input-from-file "build-common.xml"
3115 (lambda _ (xml->sxml #:trim-whitespace? #t)))
3116 `(;; Remove dependency on classycle and custom ant tasks
3117 (taskdef . ,(lambda (tag . kids)
3118 (let ((name ((sxpath '(name *text*)) kids)))
3119 (if (or (member "build-info" name)
3120 (member "dependency-checker" name)
3121 (member "build-java-subprojects" name)
3122 (member "project-classpath" name))
3125 (typedef . ,(lambda (tag . kids)
3126 (let ((name ((sxpath '(name *text*)) kids)))
3127 (if (member "recursive-jar" name)
3130 (build-java-subprojects . ,(lambda _ '()))
3131 ;; Ignore everything else
3132 (*default* . ,(lambda (tag . kids) `(,tag ,@kids)))
3133 (*text* . ,(lambda (_ txt) txt))))
3135 (rename-file "build-common.xml.new" "build-common.xml"))
3136 (substitute* "build/build.xml"
3137 (("\\$\\{lib\\}/cisd-base/cisd-base.jar")
3138 (string-append (assoc-ref inputs "java-cisd-base")
3139 "/share/java/sis-base.jar"))
3140 ;; Remove dependency on svn
3141 (("<build-info.*") "")
3142 (("\\$\\{revision.number\\}")
3143 ,(number->string revision))
3144 (("\\$\\{version.number\\}") ,base-version)
3145 ;; Don't use custom ant tasks.
3146 (("recursive-jar") "jar")
3147 (("<project-classpath.*") ""))
3149 (replace 'install (install-jars "targets/dist")))))
3151 `(("java-cisd-base" ,java-cisd-base)))
3153 `(("ecj" ,java-ecj-3.5)
3158 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
3159 "args4j/tags/release/"
3160 (version-major+minor base-version)
3162 "/build_resources/"))
3163 (revision revision)))
3166 "056cam4k8pll7ass31sy6gwn8g8719njc41yf4l02b0342nilkyf"))
3167 (modules '((guix build utils)))
3168 ;; Delete bundled pre-built jars.
3170 '(begin (delete-file-recursively "lib/") #t))))))
3171 (home-page "http://svnsis.ethz.ch")
3172 (synopsis "Command line parser library")
3173 (description "This package provides a parser for command line arguments.")
3174 (license license:asl2.0))))
3176 (define-public java-cisd-jhdf5
3177 (let ((revision 39162)
3178 (base-version "14.12.6"))
3180 (name "java-cisd-jhdf5")
3181 (version (string-append base-version "-" (number->string revision)))
3185 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
3186 "jhdf5/tags/release/"
3187 (version-major+minor base-version)
3188 ".x/" base-version "/jhdf5/"))
3189 (revision revision)))
3190 (file-name (string-append "java-cisd-jhdf5-" version "-checkout"))
3193 "13i17s2hn0q9drdqvp8csy7770p3hdbh9rp30ihln2ldkfawdmz0"))
3194 (modules '((guix build utils)))
3197 ;; Delete included gradle jar
3198 (delete-file-recursively "gradle/wrapper")
3199 ;; Delete pre-built native libraries
3200 (delete-file-recursively "libs")
3202 (build-system ant-build-system)
3204 `(#:make-flags '("-file" "build/build.xml")
3205 #:build-target "jar-all"
3206 #:test-target "jar-test"
3209 (modify-phases %standard-phases
3210 ;; FIXME: this build phase fails.
3211 (delete 'generate-jar-indices)
3212 ;; Don't erase results from the build phase when building tests.
3213 (add-after 'unpack 'separate-test-target-from-clean
3215 (substitute* "build/build.xml"
3216 (("\"jar-test\" depends=\"clean, ")
3217 "\"jar-test\" depends=\""))
3219 (add-after 'unpack 'unpack-build-resources
3220 (lambda* (#:key inputs #:allow-other-keys)
3221 (copy-recursively (assoc-ref inputs "build-resources")
3222 "../build_resources")
3223 (delete-file-recursively "../build_resources/lib/")
3224 (mkdir-p "../build_resources/lib")
3225 ;; Remove dependency on classycle
3226 (substitute* "../build_resources/ant/build-common.xml"
3227 (("<taskdef name=\"dependency-checker.*") "")
3228 (("classname=\"classycle.*") "")
3229 (("classpath=\"\\$\\{lib\\}/classycle.*") ""))
3230 ;; Remove dependency on svn
3231 (substitute* "build/build.xml"
3232 (("<build-info.*") "")
3233 (("\\$\\{revision.number\\}")
3234 ,(number->string revision))
3235 (("\\$\\{version.number\\}") ,base-version))
3237 (add-after 'unpack-build-resources 'fix-dependencies
3238 (lambda* (#:key inputs #:allow-other-keys)
3239 (substitute* "../build_resources/ant/build-common.xml"
3240 (("../libraries/testng/testng-jdk15.jar")
3241 (string-append (assoc-ref inputs "java-testng")
3242 "/share/java/java-testng.jar")))
3243 (substitute* "build/build.xml"
3244 (("\\$\\{lib\\}/sis-base/sis-base.jar")
3245 (string-append (assoc-ref inputs "java-cisd-base")
3246 "/share/java/sis-base.jar"))
3247 (("\\$\\{lib\\}/cisd-args4j/cisd-args4j.jar")
3248 (string-append (assoc-ref inputs "java-cisd-args4j")
3249 "/share/java/cisd-args4j.jar"))
3250 (("\\$\\{lib\\}/commons-lang/commons-lang.jar")
3251 (string-append (assoc-ref inputs "java-commons-lang")
3252 "/share/java/commons-lang-"
3253 ,(package-version java-commons-lang) ".jar"))
3254 (("\\$\\{lib\\}/commons-io/commons-io.jar")
3255 (string-append (assoc-ref inputs "java-commons-io")
3256 "/lib/m2/commons-io/commons-io/"
3257 ,(package-version java-commons-io)
3259 ,(package-version java-commons-io)
3261 (("\\$\\{lib\\}/testng/testng-jdk15.jar")
3262 (string-append (assoc-ref inputs "java-testng")
3263 "/share/java/java-testng.jar"))
3264 (("\\$\\{lib\\}/junit4/junit.jar")
3265 (car (find-files (assoc-ref inputs "java-junit") "jar$")))
3266 (("\\$\\{lib\\}/jmock/hamcrest/hamcrest-core.jar")
3267 (car (find-files (assoc-ref inputs "java-hamcrest-core")
3269 ;; Remove dependency on ch.rinn.restrictions
3270 (with-directory-excursion "source/java/ch/systemsx/cisd/hdf5/"
3271 (substitute* '("BitSetConversionUtils.java"
3273 (("import ch.rinn.restrictions.Private;") "")
3275 (with-directory-excursion "sourceTest/java/ch/systemsx/cisd/hdf5/"
3276 (substitute* '("BitSetConversionTest.java"
3277 "h5ar/HDF5ArchiverTest.java")
3278 (("import ch.rinn.restrictions.Friend;") "")
3280 ;; Remove leftovers from removing @Friend
3281 (substitute* "h5ar/HDF5ArchiverTest.java"
3282 (("\\{ HDF5Archiver.class, IdCache.class, LinkRecord.class \\}\\)")
3285 (add-before 'configure 'build-native-library
3286 (lambda* (#:key inputs #:allow-other-keys)
3287 (let ((jdk (assoc-ref inputs "jdk"))
3288 (hdf5 (assoc-ref inputs "hdf5"))
3289 (dir ,(match (%current-system)
3292 ((or "armhf-linux" "aarch64-linux")
3294 ((or "x86_64-linux")
3296 (_ "unknown-Linux"))))
3297 (with-directory-excursion "source/c"
3298 (apply invoke `("gcc" "-shared" "-O3"
3300 "-Wl,--exclude-libs,ALL"
3301 ,@(find-files "jhdf5" "\\.c$")
3302 ,@(find-files "hdf-java" "\\.c$")
3303 ,(string-append "-I" hdf5 "/include")
3304 ,(string-append "-I" jdk "/include")
3305 ,(string-append "-I" jdk "/include/linux")
3306 ,(string-append hdf5 "/lib/libhdf5.a")
3307 "-o" "libjhdf5.so" "-lz")))
3308 (install-file "source/c/libjhdf5.so"
3309 (string-append "libs/native/jhdf5/" dir))
3311 ;; In the "check" phase we only build the test executable.
3312 (add-after 'check 'run-tests
3314 (invoke "java" "-jar" "targets/dist/sis-jhdf5-test.jar")
3315 (delete-file "targets/dist/sis-jhdf5-test.jar")
3318 (install-jars "targets/dist")))))
3320 `(("java-cisd-base" ,java-cisd-base)
3321 ("java-cisd-args4j" ,java-cisd-args4j)
3322 ("java-commons-lang" ,java-commons-lang)
3323 ("java-commons-io" ,java-commons-io)
3327 `(("jdk" ,icedtea-8)
3328 ("java-testng" ,java-testng)
3329 ("java-junit" ,java-junit)
3330 ("java-jmock" ,java-jmock)
3331 ("java-hamcrest-core" ,java-hamcrest-core)
3336 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
3337 "jhdf5/tags/release/"
3338 (version-major+minor base-version)
3340 "/build_resources/"))
3341 (revision revision)))
3344 "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk"))))))
3345 (home-page "https://wiki-bsse.ethz.ch/display/JHDF5/")
3346 (synopsis "Java binding for HDF5")
3347 (description "JHDF5 is a high-level API in Java for reading and writing
3348 HDF5 files, building on the libraries provided by the HDF Group.")
3349 ;; The C sources are under a non-copyleft license, which looks like a
3350 ;; variant of the BSD licenses. The whole package is under the ASL2.0.
3351 (license (list license:asl2.0
3352 (license:non-copyleft "file://source/c/COPYING"))))))
3354 (define-public java-classpathx-servletapi
3356 (name "java-classpathx-servletapi")
3360 (uri (string-append "mirror://gnu/classpathx/servletapi/"
3361 "servletapi-" version ".tar.gz"))
3364 "07d8h051siga2f33fra72hk12sbq1bxa4jifjg0qj0vfazjjff0x"))))
3365 (build-system ant-build-system)
3367 `(#:tests? #f ; there is no test target
3368 #:build-target "compile"
3370 (list "-Dbuild.compiler=javac1.8"
3371 (string-append "-Ddist=" (assoc-ref %outputs "out")))
3373 (modify-phases %standard-phases
3375 (lambda* (#:key make-flags #:allow-other-keys)
3376 (apply invoke `("ant" "dist" ,@make-flags)))))))
3377 (home-page "https://www.gnu.org/software/classpathx/")
3378 (synopsis "Java servlet API implementation")
3379 (description "This is the GNU servlet API distribution, part of the
3380 ClasspathX project. It provides implementations of version 3.0 of the servlet
3381 API and version 2.1 of the Java ServerPages API.")
3382 (license license:gpl3+)))
3384 (define-public java-javaee-servletapi
3386 (name "java-javaee-servletapi")
3391 (url "https://github.com/javaee/servlet-spec")
3393 (file-name (git-file-name name version))
3396 "0s03lj8w5an70lkqbjycgfrfk0kc07vbfav91jzk87gh3awf9ksl"))))
3397 (build-system ant-build-system)
3399 `(#:jar-name "javax-servletapi.jar"
3402 #:source-dir "src/main/java"
3404 (modify-phases %standard-phases
3405 (add-before 'build 'copy-resources
3407 (mkdir-p "build/classes/javax/servlet/http")
3408 (let ((from-prefix "src/main/java/javax/servlet/")
3409 (to-prefix "build/classes/javax/servlet/"))
3410 (for-each (lambda (f)
3411 (copy-file (string-append from-prefix f)
3412 (string-append to-prefix f)))
3413 (list "LocalStrings_ja.properties"
3414 "LocalStrings.properties"
3415 "LocalStrings_fr.properties"
3416 "http/LocalStrings_es.properties"
3417 "http/LocalStrings_ja.properties"
3418 "http/LocalStrings.properties"
3419 "http/LocalStrings_fr.properties")))
3422 `(("unzip" ,unzip)))
3423 (home-page "https://javaee.github.io/servlet-spec/")
3424 (synopsis "Java servlet API")
3425 (description "Java Servlet is the foundation web specification in the
3426 Java Enterprise Platform. Developers can build web applications using the
3427 Servlet API to interact with the request/response workflow. This project
3428 provides information on the continued development of the Java Servlet
3430 ;; Main code is dual-licensed by Oracle under either GLP2 or CDDL 1.1.
3431 ;; Some files are licensed under ASL 2.0.
3432 (license (list license:asl2.0 license:gpl2 license:cddl1.1))))
3434 (define-public java-swt
3439 ;; The types of many variables and procedures differ in the sources
3440 ;; dependent on whether the target architecture is a 32-bit system or a
3441 ;; 64-bit system. Instead of patching the sources on demand in a build
3442 ;; phase we download either the 32-bit archive (which mostly uses "int"
3443 ;; types) or the 64-bit archive (which mostly uses "long" types).
3444 (let ((hash32 "09q0cbh90d90q3a7dx9430kc4m6bijrkr4lajrmzzvi0jjdpq4v9")
3445 (hash64 "17k5hs75a87ssmc5xhwdfdm2gn4zba0r837l2455za01krnkaa2q")
3448 (let-values (((hash file)
3449 (match (or (%current-target-system) (%current-system))
3450 ("x86_64-linux" (values hash64 file64))
3451 (_ (values hash32 file32)))))
3455 "http://download.eclipse.org/eclipse/downloads/drops4/"
3456 "R-" version "-201710090410/swt-" version
3457 "-gtk-linux-" file ".zip"))
3458 (sha256 (base32 hash))))))
3459 (build-system ant-build-system)
3461 `(#:jar-name "swt.jar"
3463 #:tests? #f ; no "check" target
3465 (modify-phases %standard-phases
3467 (lambda* (#:key source #:allow-other-keys)
3469 (invoke "unzip" source "-d" "swt")
3472 (invoke "unzip" "src.zip" "-d" "src")))
3473 ;; The classpath contains invalid icecat jars. Since we don't need
3474 ;; anything other than the JDK on the classpath, we can simply unset
3476 (add-after 'configure 'unset-classpath
3477 (lambda _ (unsetenv "CLASSPATH") #t))
3478 (add-before 'build 'build-native
3479 (lambda* (#:key inputs outputs #:allow-other-keys)
3480 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
3481 ;; Build shared libraries. Users of SWT have to set the system
3482 ;; property swt.library.path to the "lib" directory of this
3485 (setenv "OUTPUT_DIR" lib)
3486 (with-directory-excursion "src"
3487 (invoke "bash" "build.sh")))))
3488 (add-after 'install 'install-native
3489 (lambda* (#:key outputs #:allow-other-keys)
3490 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
3491 (for-each (lambda (file)
3492 (install-file file lib))
3493 (find-files "." "\\.so$"))
3497 ("libxtst" ,libxtst)
3502 `(("pkg-config" ,pkg-config)
3504 (home-page "https://www.eclipse.org/swt/")
3505 (synopsis "Widget toolkit for Java")
3507 "SWT is a widget toolkit for Java designed to provide efficient, portable
3508 access to the user-interface facilities of the operating systems on which it
3510 ;; SWT code is licensed under EPL1.0
3511 ;; Gnome and Gtk+ bindings contain code licensed under LGPLv2.1
3512 ;; Cairo bindings contain code under MPL1.1
3513 ;; XULRunner 1.9 bindings contain code under MPL2.0
3518 license:lgpl2.1+))))
3520 ;; java-hamcrest-core uses qdox version 1.12. We package this version instead
3521 ;; of the latest release.
3522 (define-public java-qdox-1.12
3528 (uri (string-append "https://repo1.maven.org/maven2/"
3529 "com/thoughtworks/qdox/qdox/" version
3530 "/qdox-" version "-sources.jar"))
3533 "0hlfbqq2avf5s26wxkksqmkdyk6zp9ggqn37c468m96mjv0n9xfl"))))
3534 (build-system ant-build-system)
3536 `(;; Tests require junit
3538 #:jar-name "qdox.jar"
3540 (modify-phases %standard-phases
3542 (lambda* (#:key source #:allow-other-keys)
3544 (with-directory-excursion "src"
3545 (invoke "jar" "-xf" source))))
3546 ;; At this point we don't have junit, so we must remove the API
3548 (add-after 'unpack 'delete-tests
3550 (delete-file-recursively "src/com/thoughtworks/qdox/junit")
3552 (home-page "https://github.com/codehaus/qdox")
3553 (synopsis "Parse definitions from Java source files")
3555 "QDox is a high speed, small footprint parser for extracting
3556 class/interface/method definitions from source files complete with JavaDoc
3557 @code{@@tags}. It is designed to be used by active code generators or
3558 documentation tools.")
3559 (license license:asl2.0)))
3561 (define-public java-qdox
3564 ; Newer version exists, but this version is required by java-plexus-component-metadata
3568 ;; 2.0-M4, -M5 at https://github.com/paul-hammant/qdox
3569 ;; Older releases at https://github.com/codehaus/qdox/
3570 ;; Note: The release at maven is pre-generated. The release at
3571 ;; github requires jflex.
3572 (uri (string-append "https://repo1.maven.org/maven2/"
3573 "com/thoughtworks/qdox/qdox/" version
3574 "/qdox-" version "-sources.jar"))
3577 "10xxrcaicq6axszcr2jpygisa4ch4sinyx5q7kqqxv4lknrmxp5x"))))
3578 (build-system ant-build-system)
3580 `(#:jar-name "qdox.jar"
3581 #:tests? #f; no tests
3583 ((guix build ant-build-system)
3584 (guix build java-utils)
3588 (modify-phases %standard-phases
3589 (add-before 'install 'create-pom
3591 (with-output-to-file "pom.xml"
3595 (modelVersion "4.0.0")
3597 (groupId "com.thoughtworks.qdox")
3599 (version ,,version))))))
3602 (install-from-pom "pom.xml")))))
3603 (home-page "https://github.com/codehaus/qdox")
3604 (synopsis "Parse definitions from Java source files")
3605 (description "QDox is a high speed, small footprint parser for extracting
3606 class/interface/method definitions from source files complete with JavaDoc
3607 @code{@@tags}. It is designed to be used by active code generators or
3608 documentation tools.")
3609 (license license:asl2.0)))
3611 (define-public java-qdox-2-M9
3614 (version "2.0-M9"); required by plexus-java
3617 ;; 2.0-M4, -M5 at https://github.com/paul-hammant/qdox
3618 ;; Older releases at https://github.com/codehaus/qdox/
3619 ;; Note: The release at maven is pre-generated. The release at
3620 ;; github requires jflex.
3621 (uri (string-append "https://repo1.maven.org/maven2/"
3622 "com/thoughtworks/qdox/qdox/" version
3623 "/qdox-" version "-sources.jar"))
3626 "1s2jnmx2dkwnaha12lcj26aynywgwa8sslc47z82wx8xai13y4fg"))))))
3628 (define-public java-jarjar
3630 (name "java-jarjar")
3635 "https://storage.googleapis.com/google-code-archive-downloads/v2/"
3636 "code.google.com/jarjar/jarjar-src-" version ".zip"))
3639 "1v8irhni9cndcw1l1wxqgry013s2kpj0qqn57lj2ji28xjq8ndjl"))
3640 (modules '((guix build utils)))
3643 ;; Delete bundled thirds-party jar archives.
3644 (delete-file-recursively "lib")
3645 (delete-file "src/test/enumtest.jar")
3646 ;; the CLASSPATH needs this directory, create an empty one
3649 (build-system ant-build-system)
3651 `(;; Tests require junit, which ultimately depends on this package.
3653 #:build-target "jar"
3655 (modify-phases %standard-phases
3656 (add-before 'build 'do-not-use-bundled-asm
3657 (lambda* (#:key inputs #:allow-other-keys)
3658 (substitute* "build.xml"
3659 (("<path id=\"path.build\">")
3660 (string-append "<path id=\"path.build\"><fileset dir=\""
3661 (assoc-ref inputs "java-asm-bootstrap")
3662 "/lib/m2\" includes=\"**/*.jar\"/>"))
3663 (("<zipfileset src=\"lib/asm-4.0.jar\"/>") "")
3664 (("lib/asm-commons-4.0.jar")
3665 (car (find-files (assoc-ref inputs "java-asm-bootstrap")
3667 (("<include name=\"org/objectweb/asm/commons/Remap\\*\\.class\"/>")
3668 (string-append "<include name=\"org/objectweb/asm/"
3669 "commons/Remap*.class\"/>"
3670 "<include name=\"org/objectweb/asm/*.class\"/>"
3671 "<include name=\"org/objectweb/asm/"
3672 "signature/*.class\"/>"
3673 "<include name=\"org/objectweb/asm/"
3674 "commons/SignatureRemapper.class\"/>")))
3676 (add-before 'build 'remove-maven-dependency
3678 ;; We do not need to build jarjar as a maven plugin just yet, so
3679 ;; remove this file. Maven requires jarjar (but not that plugin),
3680 ;; so removing it improves the bootstrap.
3681 (delete-file "src/main/com/tonicsystems/jarjar/JarJarMojo.java")
3684 (lambda* (#:key outputs #:allow-other-keys)
3685 (let ((target (string-append (assoc-ref outputs "out")
3687 (install-file (string-append "dist/jarjar-" ,version ".jar")
3691 `(("java-asm-bootstrap" ,java-asm-bootstrap)))
3693 `(("unzip" ,unzip)))
3694 (home-page "https://code.google.com/archive/p/jarjar/")
3695 (synopsis "Repackage Java libraries")
3697 "Jar Jar Links is a utility that makes it easy to repackage Java
3698 libraries and embed them into your own distribution. Jar Jar Links includes
3699 an Ant task that extends the built-in @code{jar} task.")
3700 (license license:asl2.0)))
3702 (define-public java-hamcrest-core
3704 (name "java-hamcrest-core")
3709 (url "https://github.com/hamcrest/JavaHamcrest/")
3710 (commit (string-append "hamcrest-java-" version))))
3711 (file-name (git-file-name name version))
3714 "16fxxkrd31ahqvcaby30jgh3z1i0zxh51m24hxgz0z2agxj6bc63"))
3715 (modules '((guix build utils)))
3718 ;; Delete bundled thirds-party jar archives.
3719 (delete-file-recursively "lib")
3721 (build-system ant-build-system)
3723 `(#:tests? #f ; Tests require junit
3724 #:modules ((guix build ant-build-system)
3725 (guix build java-utils)
3728 #:make-flags (list (string-append "-Dversion=" ,version))
3729 #:test-target "unit-test"
3730 #:build-target "core"
3732 (modify-phases %standard-phases
3733 ;; Disable unit tests, because they require junit, which requires
3734 ;; hamcrest-core. We also give a fixed value to the "Built-Date"
3735 ;; attribute from the manifest for reproducibility.
3736 (add-before 'configure 'patch-build.xml
3738 (substitute* "build.xml"
3739 (("unit-test, ") "")
3740 (("\\$\\{build.timestamp\\}") "guix"))
3742 ;; Java's "getMethods()" returns methods in an unpredictable order.
3743 ;; To make the output of the generated code deterministic we must
3744 ;; sort the array of methods.
3745 (add-after 'unpack 'make-method-order-deterministic
3747 (substitute* "hamcrest-generator/src/main/java/org/hamcrest/generator/ReflectiveFactoryReader.java"
3748 (("import java\\.util\\.Iterator;" line)
3749 (string-append line "\n"
3750 "import java.util.Arrays; import java.util.Comparator;"))
3751 (("allMethods = cls\\.getMethods\\(\\);" line)
3752 (string-append "_" line
3754 private Method[] getSortedMethods() {
3755 Arrays.sort(_allMethods, new Comparator<Method>() {
3757 public int compare(Method a, Method b) {
3758 return a.toString().compareTo(b.toString());
3764 private Method[] allMethods = getSortedMethods();")))
3766 (add-before 'build 'do-not-use-bundled-qdox
3767 (lambda* (#:key inputs #:allow-other-keys)
3768 (substitute* "build.xml"
3769 (("lib/generator/qdox-1.12.jar")
3770 (string-append (assoc-ref inputs "java-qdox-1.12")
3771 "/share/java/qdox.jar")))
3773 ;; build.xml searches for .jar files in this directoy, which
3774 ;; we remove from the source archive.
3775 (add-before 'build 'create-dummy-directories
3777 (mkdir-p "lib/integration")
3779 (add-before 'build 'create-pom
3781 (substitute* "pom/hamcrest-core.pom"
3782 (("@VERSION@") ,version))
3785 (install-from-pom "pom/hamcrest-core.pom")))))
3787 `(("java-qdox-1.12" ,java-qdox-1.12)
3788 ("java-jarjar" ,java-jarjar)))
3790 `(("java-hamcrest-parent-pom" ,java-hamcrest-parent-pom)))
3791 (home-page "http://hamcrest.org/")
3792 (synopsis "Library of matchers for building test expressions")
3794 "This package provides a library of matcher objects (also known as
3795 constraints or predicates) allowing @code{match} rules to be defined
3796 declaratively, to be used in other frameworks. Typical scenarios include
3797 testing frameworks, mocking libraries and UI validation rules.")
3798 (license license:bsd-2)))
3800 (define java-hamcrest-parent-pom
3802 (inherit java-hamcrest-core)
3803 (name "java-hamcrest-parent-pom")
3804 (propagated-inputs '())
3809 (modify-phases %standard-phases
3813 (substitute* "pom/hamcrest-parent.pom"
3814 (("@VERSION@") ,(package-version java-hamcrest-core)))
3817 (install-pom-file "pom/hamcrest-parent.pom")))))))
3819 (define-public java-hamcrest-library
3821 (inherit java-hamcrest-core)
3822 (name "java-hamcrest-library")
3824 (substitute-keyword-arguments (package-arguments java-hamcrest-core)
3825 ((#:build-target _) "library")
3827 `(modify-phases ,phases
3828 (add-after 'unpack 'patch-classpath-for-integration
3829 (lambda* (#:key inputs #:allow-other-keys)
3830 (substitute* "build.xml"
3831 (("build/hamcrest-core-\\$\\{version\\}\\.jar")
3832 (car (find-files (assoc-ref inputs "java-hamcrest-core")
3835 (replace 'create-pom
3837 (substitute* "pom/hamcrest-library.pom"
3838 (("@VERSION@") ,(package-version java-hamcrest-core)))
3841 (install-from-pom "pom/hamcrest-library.pom"))))))
3843 `(("java-hamcrest-core" ,java-hamcrest-core)
3844 ("java-hamcrest-parent-pom" ,java-hamcrest-parent-pom)))))
3846 (define-public java-junit
3853 (url "https://github.com/junit-team/junit/")
3854 (commit (string-append "r" version))))
3855 (file-name (git-file-name name version))
3858 "1j8avi91px1z8rjc89cfikwrvfifdmmsarwiyrcnr59ynvpz0v8h"))
3859 (modules '((guix build utils)))
3862 ;; Delete bundled jar archives.
3863 (delete-file-recursively "lib")
3865 (build-system ant-build-system)
3867 `(#:jar-name "junit.jar"
3868 #:source-dir "src/main/java"
3869 #:test-dir "src/test"
3870 #:test-exclude (list "**/SimpleTest.java" "**/StackTracesTest.java"
3871 "**/RuleChainTest.java" "**/TestWatchmanTest.java")
3873 (modify-phases %standard-phases
3874 (add-before 'check 'copy-test-resources
3876 (copy-recursively "src/test/resources" "build/test-classes")
3879 (install-from-pom "pom.xml")))))
3881 `(("java-hamcrest-core" ,java-hamcrest-core)))
3883 `(("java-hamcrest-library" ,java-hamcrest-library)))
3884 (home-page "https://junit.org/junit4/")
3885 (synopsis "Test framework for Java")
3887 "JUnit is a simple framework to write repeatable tests for Java projects.
3888 JUnit provides assertions for testing expected results, test fixtures for
3889 sharing common test data, and test runners for running tests.")
3890 (license license:epl1.0)))
3892 (define-public java-junitparams
3894 (name "java-junitparams")
3899 (url "https://github.com/Pragmatists/JUnitParams")
3900 (commit (string-append "JUnitParams-" version))))
3901 (file-name (git-file-name name version))
3904 "0rb52xdfp99invyjrras3w0bf0a81cz30yd47rkkiyqcqj0y1q9b"))))
3905 (build-system ant-build-system)
3907 `(#:jar-name "junitparams.jar"
3908 #:source-dir "src/main/java"
3909 #:test-dir "src/test"
3910 #:test-exclude (list "**/SuperclassTest.java")))
3912 `(("java-junit" ,java-junit)))
3914 `(("java-junit" ,java-junit)
3915 ("java-hamcrest-core" ,java-hamcrest-core)
3916 ("java-assertj" ,java-assertj)))
3917 (home-page "https://github.com/Pragmatists/JUnitParams")
3918 (synopsis "Parameterised test support for JUnit")
3919 (description "The JUnitParams project adds a new runner to JUnit and
3920 provides much easier and readable parametrised tests for JUnit.")
3921 (license license:asl2.0)))
3923 (define-public java-plexus-utils
3925 (name "java-plexus-utils")
3926 ;; sisu-build-api needs this version, later versions don't work
3931 (url "https://github.com/codehaus-plexus/plexus-utils")
3932 (commit (string-append "plexus-utils-" version))))
3933 (file-name (git-file-name name version))
3936 "1w169glixyk94jbczj8jzg897lsab46jihiaa3dhw0p06g35va8b"))))
3937 (build-system ant-build-system)
3938 ;; FIXME: The default build.xml does not include a target to install
3941 `(#:jar-name "plexus-utils.jar"
3942 #:source-dir "src/main"
3944 (modify-phases %standard-phases
3945 (add-after 'unpack 'fix-reference-to-/bin-and-/usr
3947 (substitute* "src/main/java/org/codehaus/plexus/util/\
3948 cli/shell/BourneShell.java"
3949 (("/bin/sh") (which "sh"))
3950 (("/usr/") (getcwd)))
3952 (add-after 'unpack 'fix-or-disable-broken-tests
3954 (with-directory-excursion "src/test/java/org/codehaus/plexus/util"
3955 (substitute* '("cli/CommandlineTest.java"
3956 "cli/shell/BourneShellTest.java")
3957 (("/bin/sh") (which "sh"))
3958 (("/bin/echo") (which "echo")))
3960 ;; This test depends on MavenProjectStub, but we don't have
3961 ;; a package for Maven.
3962 (delete-file "introspection/ReflectionValueExtractorTest.java")
3964 ;; FIXME: The command line tests fail, maybe because they use
3966 (delete-file "cli/CommandlineTest.java")
3968 ;; These tests require openjdk jmh, which is not packaged yet
3969 (for-each delete-file (find-files "." "PerfTest.java$")))
3971 (add-before 'build 'copy-resources
3973 (copy-recursively "src/main/resources" "build/classes")
3975 (replace 'install (install-from-pom "pom.xml")))))
3977 `(("java-hamcrest-core" ,java-hamcrest-core)
3978 ("java-junit" ,java-junit)))
3980 `(("plexus-parent-pom" ,plexus-parent-pom-5.1)))
3981 (home-page "https://codehaus-plexus.github.io/plexus-utils/")
3982 (synopsis "Common utilities for the Plexus framework")
3983 (description "This package provides various Java utility classes for the
3984 Plexus framework to ease working with strings, files, command lines, XML and
3986 (license license:asl2.0)))
3988 (define-public java-plexus-utils-3.3.0
3990 (inherit java-plexus-utils)
3995 (url "https://github.com/codehaus-plexus/plexus-utils")
3996 (commit (string-append "plexus-utils-" version))))
3997 (file-name (git-file-name "java-plexus-utils" version))
4000 "0d0fq21rzjy0j55kcp8w9k1rbq9rwr0r7cc8239p9jbz54vihp0g"))))))
4002 (define-public java-plexus-interpolation
4004 (name "java-plexus-interpolation")
4009 (url "https://github.com/codehaus-plexus/plexus-interpolation")
4010 (commit (string-append "plexus-interpolation-" version))))
4011 (file-name (git-file-name name version))
4014 "1rahjmhywf6d5m32qzlc9izawyvcd71abfm9k03f13rs2xmfxzlh"))))
4015 (build-system ant-build-system)
4017 `(#:jar-name "plexus-interpolation.jar"
4018 #:source-dir "src/main"
4020 (modify-phases %standard-phases
4021 (replace 'install (install-from-pom "pom.xml")))))
4023 `(("plexus-parent-pom-5.1" ,plexus-parent-pom-5.1)))
4025 `(("java-junit" ,java-junit)
4026 ("java-hamcrest-core" ,java-hamcrest-core)))
4027 (home-page "https://codehaus-plexus.github.io/plexus-interpolation/")
4028 (synopsis "Java components for interpolating ${} strings and the like")
4029 (description "Plexus interpolator is a modular, flexible interpolation
4030 framework for the expression language style commonly seen in Maven, Plexus,
4031 and other related projects.
4033 It has its foundation in the @code{org.codehaus.plexus.utils.interpolation}
4034 package within @code{plexus-utils}, but has been separated in order to allow
4035 these two libraries to vary independently of one another.")
4036 (license license:asl2.0)))
4038 (define-public java-plexus-classworlds
4040 (name "java-plexus-classworlds")
4045 (url "https://github.com/codehaus-plexus/plexus-classworlds")
4046 (commit (string-append "plexus-classworlds-" version))))
4047 (file-name (git-file-name name version))
4050 "034k2hgvj1saalwbnzrbg4n0zgzwcpz1lhlb8q4kgglsp9pmm03s"))))
4051 (build-system ant-build-system)
4053 `(#:jar-name "plexus-classworlds.jar"
4054 #:source-dir "src/main"
4055 #:tests? #f;; FIXME: we need to generate some resources as in pom.xml
4057 (modify-phases %standard-phases
4058 (replace 'install (install-from-pom "pom.xml")))))
4060 `(("plexus-parent-pom-5.1" ,plexus-parent-pom-5.1)))
4062 `(("java-junit" ,java-junit)))
4063 (home-page "https://codehaus-plexus.github.io/plexus-classworlds/")
4064 (synopsis "Java class loader framework")
4065 (description "Plexus classworlds replaces the native @code{ClassLoader}
4066 mechanism of Java. It is especially useful for dynamic loading of application
4068 (license license:asl2.0)))
4070 (define java-plexus-container-default-bootstrap
4072 (name "java-plexus-container-default-bootstrap")
4077 (url "https://github.com/codehaus-plexus/plexus-containers")
4078 (commit (string-append "plexus-containers-" version))))
4079 (file-name (git-file-name name version))
4082 "1316hrp5vqfv0aw7miq2fp0wwy833h66h502h29vnh5sxj27x228"))))
4083 (build-system ant-build-system)
4085 `(#:jar-name "container-default.jar"
4086 #:source-dir "plexus-container-default/src/main/java"
4087 #:test-dir "plexus-container-default/src/test"
4088 #:tests? #f; requires plexus-archiver, which depends on this package
4090 (modify-phases %standard-phases
4091 (add-before 'build 'fix-google-collections
4093 ;; Google collections are now replaced with guava
4094 (substitute* "plexus-container-default/pom.xml"
4095 (("google-collections") "guava")
4096 (("com.google.collections") "com.google.guava"))
4098 (add-before 'build 'copy-resources
4101 "plexus-container-default/src/main/resources/"
4105 (install-from-pom "plexus-container-default/pom.xml")))))
4107 `(("java-plexus-worldclass" ,java-plexus-classworlds)
4108 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
4109 ("java-plexus-utils" ,java-plexus-utils)
4110 ("java-junit" ,java-junit)
4111 ("java-guava" ,java-guava)
4112 ("java-plexus-containers-parent-pom" ,java-plexus-containers-parent-pom)))
4113 (home-page "https://github.com/codehaus-plexus/plexus-containers")
4114 (synopsis "Inversion-of-control container")
4115 (description "Plexus-default-container is Plexus' inversion-of-control
4116 (@dfn{IoC}) container. It is composed of its public API and its default
4118 (license license:asl2.0)))
4120 (define java-plexus-containers-parent-pom
4122 (inherit java-plexus-container-default-bootstrap)
4123 (name "java-plexus-containers-parent-pom")
4127 (modify-phases %standard-phases
4131 (install-pom-file "pom.xml")))))
4133 `(("plexus-parent-pom" ,plexus-parent-pom-4.0)))))
4135 (define-public java-plexus-io
4137 (name "java-plexus-io")
4142 (url "https://github.com/codehaus-plexus/plexus-io")
4143 (commit (string-append "plexus-io-" version))))
4144 (file-name (git-file-name name version))
4147 "1r3wqfpbxq8vp4p914i8p88r0994rmcjw02hz14n11cfb6gsyvlr"))))
4148 (build-system ant-build-system)
4150 `(#:jar-name "plexus-io.jar"
4151 #:source-dir "src/main/java"
4152 #:test-dir "src/test"
4154 (modify-phases %standard-phases
4155 (add-before 'build 'copy-resources
4157 (mkdir-p "build/classes")
4158 (copy-recursively "src/main/resources" "build/classes")
4159 (mkdir-p "build/test-classes")
4160 (copy-recursively "src/test/resources" "build/test-classes")
4162 (replace 'install (install-from-pom "pom.xml")))))
4164 `(("java-plexus-utils" ,java-plexus-utils-3.3.0)
4165 ("java-commons-io" ,java-commons-io)
4166 ("plexus-parent-pom" ,plexus-parent-pom-5.1)))
4168 `(("java-jsr305" ,java-jsr305)))
4170 `(("junit" ,java-junit)
4171 ("hamcrest" ,java-hamcrest-core)
4172 ("guava" ,java-guava)
4173 ("classworlds" ,java-plexus-classworlds)
4174 ("xbean" ,java-geronimo-xbean-reflect)
4175 ("container-default" ,java-plexus-container-default-bootstrap)))
4176 (home-page "https://github.com/codehaus-plexus/plexus-io")
4177 (synopsis "I/O plexus components")
4178 (description "Plexus IO is a set of plexus components, which are designed
4179 for use in I/O operations. This implementation using plexus components allows
4180 reusing it in maven.")
4181 (license license:asl2.0)))
4183 (define-public java-plexus-archiver
4185 (name "java-plexus-archiver")
4189 (uri (string-append "https://github.com/codehaus-plexus/plexus-archiver"
4190 "/archive/plexus-archiver-" version ".tar.gz"))
4193 "144n971r3lfrx3l12nf2scm80x4xdvgbkk4bjpa4vcvvdrll6qys"))))
4194 (build-system ant-build-system)
4196 `(#:jar-name "plexus-archiver.jar"
4197 #:source-dir "src/main/java"
4198 #:test-dir "src/test"
4199 #:test-exclude (list "**/Abstract*.java" "**/Base*.java")
4201 (modify-phases %standard-phases
4202 (add-before 'check 'remove-failing
4204 ;; Requires an older version of plexus container
4206 "src/test/java/org/codehaus/plexus/archiver/DuplicateFilesTest.java")
4208 (add-before 'check 'fix-test-building
4210 (substitute* "build.xml"
4211 (("srcdir=\"src/test\"") "srcdir=\"src/test/java\""))
4213 (add-before 'build 'copy-resources
4215 (mkdir-p "build/classes")
4216 (copy-recursively "src/main/resources" "build/classes")
4217 (mkdir-p "build/test-classes")
4218 (copy-recursively "src/test/resources" "build/test-classes")
4220 (replace 'install (install-from-pom "pom.xml")))))
4222 `(("java-plexus-utils" ,java-plexus-utils-3.3.0)
4223 ("java-plexus-io" ,java-plexus-io)
4224 ("java-iq80-snappy" ,java-iq80-snappy)
4225 ("java-commons-compress" ,java-commons-compress)
4226 ("plexus-parent-pom" ,plexus-parent-pom-6.1)))
4228 `(("java-jsr305" ,java-jsr305)
4229 ("java-plexus-container-default"
4230 ,java-plexus-container-default-bootstrap)))
4232 `(("java-hamcrest-core" ,java-hamcrest-core)
4233 ("junit" ,java-junit)
4234 ("classworld" ,java-plexus-classworlds)
4235 ("xbean" ,java-geronimo-xbean-reflect)
4237 ("guava" ,java-guava)))
4238 (home-page "https://github.com/codehaus-plexus/plexus-archiver")
4239 (synopsis "Archiver component of the Plexus project")
4240 (description "Plexus-archiver contains a component to deal with project
4242 (license license:asl2.0)))
4244 (define-public java-plexus-container-default
4246 (inherit java-plexus-container-default-bootstrap)
4247 (name "java-plexus-container-default")
4249 `(#:jar-name "container-default.jar"
4250 #:source-dir "plexus-container-default/src/main/java"
4251 #:test-dir "plexus-container-default/src/test"
4252 #:test-exclude (list ;"**/*Test.java"
4254 ;; Requires plexus-hierarchy
4255 "**/PlexusHierarchyTest.java"
4257 "**/ComponentRealmCompositionTest.java"
4258 "**/PlexusContainerTest.java")
4260 (modify-phases %standard-phases
4261 (add-before 'build 'fix-google-collections
4263 ;; Google collections are now replaced with guava
4264 (substitute* "plexus-container-default/pom.xml"
4265 (("google-collections") "guava")
4266 (("com.google.collections") "com.google.guava"))
4268 (add-before 'build 'copy-resources
4271 "plexus-container-default/src/main/resources/"
4274 (add-before 'check 'fix-paths
4276 (let ((dir "plexus-container-default/src/test/java/org/codehaus"))
4279 dir "/plexus/component/composition/"
4280 "ComponentRealmCompositionTest.java")
4281 (("src/test") "plexus-container-default/src/test"))
4284 (install-from-pom "plexus-container-default/pom.xml")))))
4286 `(("worldclass" ,java-plexus-classworlds)
4287 ("xbean" ,java-geronimo-xbean-reflect)
4288 ("utils" ,java-plexus-utils)
4289 ("junit" ,java-junit)
4290 ("guava" ,java-guava)))
4292 `(("archiver" ,java-plexus-archiver)
4293 ("hamcrest" ,java-hamcrest-core)))))
4295 (define-public java-plexus-component-annotations
4297 (inherit java-plexus-container-default)
4298 (name "java-plexus-component-annotations")
4300 `(#:jar-name "plexus-component-annotations.jar"
4301 #:source-dir "plexus-component-annotations/src/main/java"
4302 #:tests? #f; no tests
4304 (modify-phases %standard-phases
4306 (install-from-pom "plexus-component-annotations/pom.xml")))))
4308 `(("java-plexus-containers-parent-pom" ,java-plexus-containers-parent-pom)))
4311 (synopsis "Plexus descriptors generator")
4312 (description "This package is a Maven plugin to generate Plexus descriptors
4313 from source tags and class annotations.")))
4315 (define-public java-plexus-component-metadata
4317 (inherit java-plexus-container-default)
4318 (name "java-plexus-component-metadata")
4320 `(#:jar-name "plexus-component-metadata.jar"
4321 #:source-dir "src/main/java"
4322 #:test-dir "src/test"
4325 (modify-phases %standard-phases
4326 (add-before 'configure 'chdir
4328 (chdir "plexus-component-metadata")
4330 (add-before 'build 'copy-resources
4332 (copy-recursively "src/main/resources"
4336 `(("java-plexus-container-default" ,java-plexus-container-default)
4337 ("java-plexu-component-annotations" ,java-plexus-component-annotations)
4338 ("java-plexus-utils" ,java-plexus-utils)
4339 ("java-plexus-cli" ,java-plexus-cli)
4340 ("java-plexus-classworlds" ,java-plexus-classworlds)
4341 ("maven-plugin-api" ,maven-plugin-api)
4342 ("maven-plugin-annotations" ,maven-plugin-annotations)
4343 ("maven-core-bootstrap" ,maven-core-bootstrap)
4344 ("maven-model" ,maven-model)
4345 ("java-commons-cli" ,java-commons-cli)
4346 ("java-qdox" ,java-qdox)
4347 ("java-jdom2" ,java-jdom2)
4348 ("java-asm" ,java-asm)))
4350 `(("java-junit" ,java-junit)
4351 ("java-guava" ,java-guava)
4352 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)))
4353 (synopsis "Inversion-of-control container for Maven")
4354 (description "The Plexus project provides a full software stack for creating
4355 and executing software projects. Based on the Plexus container, the
4356 applications can utilise component-oriented programming to build modular,
4357 reusable components that can easily be assembled and reused. This package
4358 provides the Maven plugin generating the component metadata.")))
4360 (define-public java-plexus-cipher
4362 (name "java-plexus-cipher")
4367 (url "https://github.com/codehaus-plexus/plexus-cipher")
4368 (commit (string-append "plexus-cipher-" version))))
4369 (file-name (git-file-name name version))
4372 "0m638nzlxbmnbcj5cwdpgs326ab584yv0k803zlx37r6iqwvf6b0"))))
4373 (build-system ant-build-system)
4375 `(#:jar-name "plexus-cipher.jar"
4376 #:source-dir "src/main/java"
4377 #:tests? #f; FIXME: requires sisu-inject-bean
4379 (modify-phases %standard-phases
4380 (add-before 'build 'copy-resources
4382 (copy-recursively "src/main/resources" "build/classes")
4383 (mkdir-p "build/classes/META-INF/sisu")
4384 (with-output-to-file "build/classes/META-INF/sisu/javax.inject.Named"
4386 (display "org.sonatype.plexus.components.cipher.DefaultPlexusCipher\n")))
4388 (add-before 'install 'fix-test-dependency
4390 ;; sisu-inject-bean is only used for tests, but its scope is "provided".
4391 (substitute* "pom.xml"
4392 (("provided") "test"))
4394 (replace 'install (install-from-pom "pom.xml")))))
4396 `(("java-cdi-api" ,java-cdi-api)
4397 ("java-javax-inject" ,java-javax-inject)))
4399 `(("java-sonatype-spice-parent-pom" ,java-sonatype-spice-parent-pom-15)))
4401 `(("java-junit" ,java-junit)))
4402 (home-page "https://github.com/sonatype/plexus-cipher")
4403 (synopsis "Encryption/decryption Component")
4404 (description "Plexus-cipher contains a component to deal with encryption
4406 (license license:asl2.0)))
4408 (define-public java-plexus-java
4410 (name "java-plexus-java")
4415 (url "https://github.com/codehaus-plexus/plexus-languages")
4416 (commit (string-append "plexus-languages-" version))))
4417 (file-name (git-file-name name version))
4420 "0vmvgq5hfxs90yyxgssfpwq78l7vwx1ljwpkk594mrdr8sm668b5"))
4421 (modules '((guix build utils)))
4424 (for-each delete-file (find-files "." ".*.jar$"))
4426 (build-system ant-build-system)
4428 `(#:jar-name "plexus-java.java"
4429 #:source-dir "plexus-java/src/main/java"
4430 #:test-dir "plexus-java/src/test"
4431 #:tests? #f; require mockito 2
4433 (modify-phases %standard-phases
4434 (add-after 'build 'generate-metadata
4436 (invoke "java" "-cp" (string-append (getenv "CLASSPATH") ":build/classes")
4437 "org.codehaus.plexus.metadata.PlexusMetadataGeneratorCli"
4438 "--source" "plexus-java/src/main/java"
4439 "--output" "build/classes/META-INF/plexus/components.xml"
4440 "--classes" "build/classes"
4441 "--descriptors" "build/classes/META-INF")
4442 (invoke "ant" "jar")
4444 (add-before 'install 'install-parent
4445 (install-pom-file "pom.xml"))
4447 (install-from-pom "plexus-java/pom.xml")))))
4449 `(("java-asm" ,java-asm)
4450 ("java-qdox" ,java-qdox-2-M9)
4451 ("java-javax-inject" ,java-javax-inject)
4452 ("plexus-parent-pom" ,plexus-parent-pom-4.0)))
4454 `(("java-plexus-component-annotations" ,java-plexus-component-annotations)))
4456 `(("java-plexus-component-metadata" ,java-plexus-component-metadata)
4457 ("java-junit" ,java-junit)))
4458 (home-page "https://codehaus-plexus.github.io/plexus-languages/plexus-java")
4459 (synopsis "Shared language features for Java")
4460 (description "This package contains shared language features of the Java
4461 language, for the plexus project.")
4462 (license license:asl2.0)))
4464 (define-public java-plexus-compiler-api
4466 (name "java-plexus-compiler-api")
4471 (url "https://github.com/codehaus-plexus/plexus-compiler")
4472 (commit (string-append "plexus-compiler-" version))))
4473 (file-name (git-file-name name version))
4476 "1nq1gnn3s6z1j29gmi1hqbklsmm8b1lmnafb0191914f95mn18gk"))))
4477 (build-system ant-build-system)
4479 `(#:jar-name "plexus-compiler-api.jar"
4480 #:source-dir "plexus-compiler-api/src/main/java"
4481 #:test-dir "plexus-compiler-api/src/test"
4483 (modify-phases %standard-phases
4485 (install-from-pom "plexus-compiler-api/pom.xml")))))
4487 `(("java-plexus-container-default" ,java-plexus-container-default)
4488 ("java-plexus-compiler-pom" ,java-plexus-compiler-pom)
4489 ("java-plexus-util" ,java-plexus-utils)))
4491 `(("java-junit" ,java-junit)))
4492 (home-page "https://github.com/codehaus-plexus/plexus-compiler")
4493 (synopsis "Plexus Compilers component's API to manipulate compilers")
4494 (description "This package contains the API used by components to manipulate
4496 (license (list license:asl2.0
4499 (define java-plexus-compiler-pom
4501 (inherit java-plexus-compiler-api)
4502 (name "java-plexus-compiler-pom")
4506 (modify-phases %standard-phases
4510 (install-pom-file "pom.xml"))
4511 (add-after 'install 'install-compilers
4512 (install-pom-file "plexus-compilers/pom.xml")))))
4514 `(("plexus-components-parent-pom-4.0" ,plexus-components-parent-pom-4.0)))))
4516 (define plexus-components-parent-pom-4.0
4518 (name "plexus-components-parent-pom")
4523 (url "https://github.com/codehaus-plexus/plexus-components")
4524 (commit (string-append "plexus-components-" version))))
4525 (file-name (git-file-name name version))
4528 "041bm8yv0m2i17mqg8zljib4ykpha7ijls2qfdwvkma4d39lhysi"))))
4529 (build-system ant-build-system)
4533 (modify-phases %standard-phases
4537 (install-pom-file "pom.xml")))))
4539 `(("plexus-parent-pom-4.0" ,plexus-parent-pom-4.0)))
4540 (home-page "https://codehaus-plexus.github.io/plexus-components")
4541 (synopsis "Plexus parent pom")
4542 (description "This package contains the Plexus components parent POM.")
4543 (license license:asl2.0)))
4545 (define-public java-plexus-compiler-manager
4547 (inherit java-plexus-compiler-api)
4548 (name "java-plexus-compiler-manager")
4550 `(#:jar-name "compiler-compiler-manager.java"
4551 #:source-dir "plexus-compiler-manager/src/main/java"
4552 #:test-dir "plexus-compiler-manager/src/test"
4555 (modify-phases %standard-phases
4556 (add-after 'build 'generate-metadata
4558 (invoke "java" "-cp" (string-append (getenv "CLASSPATH") ":build/classes")
4559 "org.codehaus.plexus.metadata.PlexusMetadataGeneratorCli"
4560 "--source" "plexus-compiler-manager/src/main/java"
4561 "--output" "build/classes/META-INF/plexus/components.xml"
4562 "--classes" "build/classes"
4563 "--descriptors" "build/classes/META-INF")
4564 (invoke "ant" "jar")
4566 (add-after 'generate-metadata 'rebuild
4568 (invoke "ant" "jar")
4571 (install-from-pom "plexus-compiler-manager/pom.xml")))))
4573 `(("java-plexus-compiler-api" ,java-plexus-compiler-api)
4574 ("java-plexus-compiler-pom" ,java-plexus-compiler-pom)
4575 ("java-plexus-container-default" ,java-plexus-container-default)))
4578 ("java-plexus-component-metadata" ,java-plexus-component-metadata)))
4579 (synopsis "Compiler management for Plexus Compiler component")
4580 (description "Plexus Compiler is a Plexus component to use different
4581 compilers through a uniform API. This component chooses the compiler
4582 implementation to use in a project.")))
4584 (define-public java-plexus-compiler-javac
4586 (inherit java-plexus-compiler-api)
4587 (name "java-plexus-compiler-javac")
4589 `(#:jar-name "plexus-compiler-javac.jar"
4590 #:source-dir "plexus-compilers/plexus-compiler-javac/src/main/java"
4592 #:tests? #f; depends on compiler-test -> maven-core -> ... -> this package.
4593 #:test-dir "plexus-compilers/plexus-compiler-javac/src/test"
4594 #:modules ((guix build ant-build-system)
4596 (guix build java-utils)
4599 (modify-phases %standard-phases
4600 ;; We cannot use java-plexus-component-metadata to generate the metadata
4601 ;; because it ultimately depends on this package.
4602 ;; Create it manually instead
4603 (add-before 'build 'create-metadata
4605 (let* ((dir "build/classes/META-INF/plexus")
4606 (file (string-append dir "/components.xml")))
4608 (with-output-to-file file
4614 (role "org.codehaus.plexus.compiler.Compiler")
4616 (implementation "org.codehaus.plexus.compiler.javac.JavacCompiler")
4617 (isolated-realm "false"))))))))
4620 (install-from-pom "plexus-compilers/plexus-compiler-javac/pom.xml")))))
4622 `(("java-plexus-compiler-api" ,java-plexus-compiler-api)
4623 ("java-plexus-utils" ,java-plexus-utils)
4624 ("java-plexus-container-default" ,java-plexus-container-default)))
4625 (synopsis "Javac Compiler support for Plexus Compiler component")
4626 (description "This package contains the Javac Compiler support for Plexus
4627 Compiler component.")))
4629 (define plexus-components-pom-1.1.20
4631 (name "plexus-components-pom-1.1.20")
4636 (url "https://github.com/codehaus-plexus/plexus-components")
4637 (commit (string-append "plexus-components-" version))))
4638 (file-name (git-file-name name version))
4641 "1q254k95m9icyfsvaw8c226midg8v6v436wvivhv7im825mnp5yb"))))
4642 (build-system ant-build-system)
4646 (modify-phases %standard-phases
4650 (install-pom-file "pom.xml")))))
4652 `(("plexus-parent-pom" ,plexus-parent-pom-3.1)))
4653 (home-page "https://github.com/codehaus-plexus/plexus-components")
4654 (synopsis "Maven parent pom for plexus packages")
4655 (description "This package contains the parent pom for plexus component
4657 (license license:asl2.0)))
4659 (define-public java-plexus-digest
4661 (name "java-plexus-digest")
4666 (url "https://github.com/codehaus-plexus/plexus-digest")
4667 (commit "2a52ad1bda8297fa0e287163d2fa37245ec6a430")))
4668 (file-name (git-file-name name version))
4671 "19w5wxsliz8r42niry68qa665kvjsb8081dazg9vgd3pca72w07x"))))
4672 (build-system ant-build-system)
4674 `(#:jar-name "plexus-digest.jar"
4675 #:source-dir "src/main/java"
4678 (modify-phases %standard-phases
4680 (install-from-pom "pom.xml")))))
4682 `(("java-plexus-utils" ,java-plexus-utils)
4683 ("plexus-components-pom-1.1.20" ,plexus-components-pom-1.1.20)))
4685 `(("java-junit" ,java-junit)))
4686 (home-page "https://github.com/codehaus-plexus/plexus-digest")
4687 (synopsis "Hash function utilities for Java")
4688 (description "This package is a plexus component that contains hash
4689 function utilities.")
4690 (license license:asl2.0)))
4692 (define-public java-plexus-sec-dispatcher
4694 (name "java-plexus-sec-dispatcher")
4695 (version "1.4") ;; Newest release listed at the Maven Central Repository.
4697 ;; This project doesn't tag releases or publish tarballs, so we take
4698 ;; the "prepare release plexus-sec-dispatcher-1.4" git commit.
4701 (url "https://github.com/sonatype/plexus-sec-dispatcher/")
4702 (commit "7db8f880486e192a1c5ea9544e01e756c3d49d0f")))
4705 "1ng4yliy4cqpjr4fxxjbpwyk1wkch5f8vblm1kvwf328s4gibszs"))
4706 (file-name (git-file-name name version))))
4708 `(#:jar-name "plexus-sec-dispatcher.jar"
4709 #:source-dir "src/main/java"
4711 (modify-phases %standard-phases
4712 (add-before 'build 'generate-models
4713 (lambda* (#:key inputs #:allow-other-keys)
4714 (define (modello-single-mode file version mode)
4716 "org.codehaus.modello.ModelloCli"
4717 file mode "src/main/java" version
4719 (let ((file "src/main/mdo/settings-security.mdo"))
4720 (modello-single-mode file "1.0.0" "java")
4721 (modello-single-mode file "1.0.0" "xpp3-reader")
4722 (modello-single-mode file "1.0.0" "xpp3-writer"))
4724 (add-before 'build 'generate-components.xml
4726 (mkdir-p "build/classes/META-INF/plexus")
4727 (with-output-to-file "build/classes/META-INF/plexus/components.xml"
4733 <role>org.sonatype.plexus.components.sec.dispatcher.SecDispatcher</role>\n
4734 <role-hint>default</role-hint>\n
4735 <implementation>org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher</implementation>\n
4736 <description></description>\n
4739 <role>org.sonatype.plexus.components.cipher.PlexusCipher</role>\n
4740 <field-name>_cipher</field-name>\n
4743 <role>org.sonatype.plexus.components.sec.dispatcher.PasswordDecryptor</role>\n
4744 <field-name>_decryptors</field-name>\n
4748 <_configuration-file>~/.settings-security.xml</_configuration-file>\n
4752 </component-set>\n")))
4754 (add-before 'check 'fix-paths
4756 (copy-recursively "src/test/resources" "target")
4758 (replace 'install (install-from-pom "pom.xml")))))
4760 `(("java-plexus-utils" ,java-plexus-utils)
4761 ("java-plexus-cipher" ,java-plexus-cipher)
4762 ("java-sonatype-spice-parent-pom" ,java-sonatype-spice-parent-pom-12)))
4764 `(("java-modello-core" ,java-modello-core)
4766 ("java-plexus-container-default" ,java-plexus-container-default)
4767 ("java-plexus-classworlds" ,java-plexus-classworlds)
4768 ("java-plexus-utils" ,java-plexus-utils)
4769 ("java-guava" ,java-guava)
4770 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
4771 ("java-sisu-build-api" ,java-sisu-build-api)
4773 ("java-modellop-plugins-java" ,java-modello-plugins-java)
4774 ("java-modellop-plugins-xml" ,java-modello-plugins-xml)
4775 ("java-modellop-plugins-xpp3" ,java-modello-plugins-xpp3)
4777 ("java-junit" ,java-junit)))
4778 (build-system ant-build-system)
4779 (home-page "https://github.com/sonatype/plexus-sec-dispatcher")
4780 (synopsis "Plexus Security Dispatcher Component")
4781 (description "This package is the Plexus Security Dispatcher Component.
4782 This component decrypts a string passed to it.")
4783 (license license:asl2.0)))
4785 (define-public java-plexus-cli
4787 (name "java-plexus-cli")
4792 (url "https://github.com/sonatype/plexus-cli")
4793 (commit "a776afa6bca84e5107bedb69440329cdb24ed645")))
4794 (file-name (string-append name "-" version))
4797 "0xjrlay605rypv3zd7y24vlwf0039bil3n2cqw54r1ddpysq46vx"))))
4798 (build-system ant-build-system)
4800 `(#:jar-name "plexus-cli.jar"
4801 #:source-dir "src/main/java"
4803 #:test-dir "src/test"))
4805 `(("java-commons-cli" ,java-commons-cli)
4806 ("java-plexus-container-default" ,java-plexus-container-default)
4807 ("java-plexus-classworlds" ,java-plexus-classworlds)))
4809 `(("java-plexus-utils" ,java-plexus-utils)
4810 ("java-junit" ,java-junit)
4811 ("java-guava" ,java-guava)))
4812 (home-page "https://codehaus-plexus.github.io/plexus-cli")
4813 (synopsis "CLI building library for plexus")
4814 (description "This package is a library to help creating CLI around
4815 Plexus components.")
4816 (license license:asl2.0)))
4818 (define-public java-sisu-build-api
4820 (name "java-sisu-build-api")
4825 (url "https://github.com/sonatype/sisu-build-api")
4826 (commit (string-append "plexus-build-api-" version))))
4827 (file-name (git-file-name name version))
4830 "1d5w6c58gkx30d51v7qwv1xrhc0ly76848gihmgshj19yf6yhca0"))))
4831 (build-system ant-build-system)
4833 `(#:jar-name "sisu-build-api.jar"
4834 #:source-dir "src/main/java"
4836 #:tests? #f; FIXME: how to run the tests?
4838 (modify-phases %standard-phases
4839 (add-before 'build 'copy-resources
4841 (copy-recursively "src/main/resources" "build/classes")
4842 (substitute* (find-files "build/classes")
4843 (("\\$\\{project.version\\}") ,version))
4845 (add-before 'build 'generate-plexus-compontent
4847 (mkdir-p "build/classes/META-INF/plexus")
4848 ;; This file is required for plexus to inject this package.
4849 ;; FIXME: how is it generated?
4850 (with-output-to-file "build/classes/META-INF/plexus/components.xml"
4856 <role>org.sonatype.plexus.build.incremental.BuildContext</role>\n
4857 <role-hint>default</role-hint>\n
4858 <implementation>org.sonatype.plexus.build.incremental.DefaultBuildContext</implementation>\n
4859 <description>Filesystem based non-incremental build context implementation\n
4860 which behaves as if all files were just created.</description>\n
4863 </component-set>\n")))
4866 (install-from-pom "pom.xml")))))
4868 `(("java-plexus-utils" ,java-plexus-utils)
4869 ("java-plexus-container-default" ,java-plexus-container-default)))
4870 (home-page "https://github.com/sonatype/sisu-build-api/")
4871 (synopsis "Base build API for maven")
4872 (description "This package contains the base build API for maven and
4873 a default implementation of it. This API is about scanning files in a
4874 project and determining what files need to be rebuilt.")
4875 (license license:asl2.0)))
4877 (define-public java-modello-core
4879 (name "java-modello-core")
4884 (url "https://github.com/codehaus-plexus/modello")
4885 (commit (string-append "modello-" version))))
4886 (file-name (git-file-name name version))
4889 "1di6ni42aqllpdvkpyfcw70352vr2i8wf6hd5nhd9kmqjb5dj5j4"))))
4890 (build-system ant-build-system)
4892 `(#:jar-name "modello-core.jar"
4893 #:source-dir "modello-core/src/main/java"
4894 #:test-dir "modello-core/src/test"
4895 #:main-class "org.codehaus.modello.ModelloCli"
4898 (modify-phases %standard-phases
4899 (add-before 'build 'copy-resources
4901 (mkdir-p "build/classes/META-INF/plexus")
4902 (copy-file "modello-core/src/main/resources/META-INF/plexus/components.xml"
4903 "build/classes/META-INF/plexus/components.xml")
4905 (add-before 'check 'fix-tests
4907 (with-directory-excursion "modello-core/src/test/java/org/codehaus"
4908 (substitute* '("modello/core/DefaultModelloCoreTest.java"
4909 "modello/core/io/ModelReaderTest.java")
4910 (("src/test") "modello-core/src/test")))
4913 `(("java-plexus-utils" ,java-plexus-utils)
4914 ("java-plexus-container-default" ,java-plexus-container-default)
4915 ("java-sisu-build-api" ,java-sisu-build-api)))
4917 `(("java-junit" ,java-junit)
4918 ("java-plexus-classworlds" ,java-plexus-classworlds)
4919 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
4920 ("java-guava" ,java-guava)))
4921 (home-page "https://codehaus-plexus.github.io/modello/")
4922 (synopsis "Framework for code generation from a simple model")
4923 (description "Modello is a framework for code generation from a simple model.
4925 Modello generates code from a simple model format: based on a plugin
4926 architecture, various types of code and descriptors can be generated from the
4927 single model, including Java POJOs, XML/JSON/YAML marshallers/unmarshallers,
4928 XSD and documentation.")
4931 ;; Although this package uses only files licensed under expat,
4932 ;; other parts of the source are licensed under different
4933 ;; licenses. We include them to be inherited by other packages.
4935 ;; Some files in modello-plugin-java are licensed under a
4936 ;; 5-clause BSD license.
4937 (license:non-copyleft
4938 (string-append "file:///modello-plugins/modello-plugin-java/"
4939 "src/main/java/org/codehaus/modello/plugin/"
4940 "java/javasource/JNaming.java"))))))
4942 (define-public java-modello-plugins-java
4944 (inherit java-modello-core)
4945 (name "java-modello-plugins-java")
4947 `(#:jar-name "modello-plugins-java.jar"
4948 #:source-dir "modello-plugins/modello-plugin-java/src/main/java"
4949 #:test-dir "modello-plugins/modello-plugin-java/src/test"
4951 #:tests? #f; requires maven-model, which depends on this package
4953 (modify-phases %standard-phases
4954 (add-before 'build 'copy-resources
4956 (mkdir-p "build/classes")
4957 (copy-recursively "modello-plugins/modello-plugin-java/src/main/resources"
4961 `(("java-modello-core" ,java-modello-core)))
4962 (synopsis "Modello Java Plugin")
4963 (description "Modello Java Plugin generates Java objects for the model.")))
4965 (define-public java-modello-plugins-xml
4967 (inherit java-modello-core)
4968 (name "java-modello-plugins-xml")
4970 `(#:jar-name "modello-plugins-xml.jar"
4971 #:source-dir "modello-plugins/modello-plugin-xml/src/main/java"
4972 #:test-dir "modello-plugins/modello-plugin-xml/src/test"
4975 (modify-phases %standard-phases
4976 (add-before 'build 'copy-resources
4978 (mkdir-p "build/classes")
4980 "modello-plugins/modello-plugin-xml/src/main/resources"
4983 (add-before 'check 'fix-paths
4985 (with-directory-excursion "modello-plugins/modello-plugin-xml/src/test"
4987 "java/org/codehaus/modello/plugins/xml/XmlModelloPluginTest.java"
4988 (("src/test") "modello-plugins/modello-plugin-xml/src/test")))
4991 `(("java-modello-core" ,java-modello-core)
4992 ("java-modello-plugins-java" ,java-modello-plugins-java)))
4993 (synopsis "Modello XML Plugin")
4994 (description "Modello XML Plugin contains shared code for every plugins
4995 working on XML representation of the model.")))
4997 (define-public java-modello-test
4999 (inherit java-modello-core)
5000 (name "java-modello-test")
5002 `(#:jar-name "modello-test.jar"
5003 #:source-dir "modello-test/src/main/java"
5004 #:tests? #f; no tests
5007 `(("java-plexus-utils" ,java-plexus-utils)
5008 ("java-plexus-compiler-api" ,java-plexus-compiler-api)
5009 ("java-plexus-compiler-javac" ,java-plexus-compiler-javac)
5010 ("java-plexus-container-default" ,java-plexus-container-default)))
5011 (synopsis "Modello test package")
5012 (description "The modello test package contains the basis to create
5013 Modello generator unit-tests, including sample models and xml files to test
5014 every feature for every plugin.")))
5016 (define-public java-modello-plugins-xpp3
5018 (inherit java-modello-core)
5019 (name "java-modello-plugins-xpp3")
5021 `(#:jar-name "modello-plugins-xpp3.jar"
5022 #:source-dir "modello-plugins/modello-plugin-xpp3/src/main/java"
5023 #:test-dir "modello-plugins/modello-plugin-xpp3/src/test"
5024 ;; One of the test dependencies is maven-model which depends on this package.
5028 (modify-phases %standard-phases
5029 (add-before 'build 'copy-resources
5031 (mkdir-p "build/classes")
5032 (copy-recursively "modello-plugins/modello-plugin-xpp3/src/main/resources"
5036 `(("java-modello-core" ,java-modello-core)
5037 ("java-modello-plugins-java" ,java-modello-plugins-java)
5038 ("java-modello-plugins-xml" ,java-modello-plugins-xml)))
5040 `(("java-xmlunit" ,java-xmlunit)
5041 ("java-modello-test" ,java-modello-test)
5042 ,@(package-native-inputs java-modello-core)))
5043 (synopsis "Modello XPP3 Plugin")
5044 (description "The modello XPP3 plugin generates XML readers and writers based
5045 on the XPP3 API (XML Pull Parser).")))
5047 (define-public java-asm
5053 (uri (string-append "https://download.forge.ow2.org/asm/"
5054 "asm-" version ".tar.gz"))
5057 "115l5pqblirdkmzi32dxx7gbcm4jy0s14y5wircr6h8jdr9aix00"))))
5058 (build-system ant-build-system)
5060 `(#:build-target "compile"
5061 ;; The tests require an old version of Janino, which no longer compiles
5066 ;; We don't need these extra ant tasks, but the build system asks us to
5067 ;; provide a path anyway.
5068 "-Dobjectweb.ant.tasks.path=dummy-path"
5069 ;; The java-aqute.bndlib JAR file will be put onto the classpath and
5070 ;; used during the build automatically by ant-build-system, but
5071 ;; java-asm's build.xml fails unless we provide something here.
5072 "-Dbiz.aQute.bnd.path=dummy-path")
5074 (modify-phases %standard-phases
5075 (add-before 'build 'remove-bnd-dependency
5077 ;; This file is the only one to require bnd, and is not needed
5078 ;; because we don't build a bundle.
5079 (delete-file "src/org/objectweb/asm/tools/ModuleInfoBndPlugin.java")
5081 (add-before 'install 'build-jars
5082 (lambda* (#:key make-flags #:allow-other-keys)
5083 ;; We cannot use the "jar" target because it depends on a couple
5084 ;; of unpackaged, complicated tools.
5087 "-cf" (string-append "dist/asm-" ,version ".jar")
5088 "-C" "output/build/tmp" ".")))
5089 (add-before 'install 'fix-pom
5091 (substitute* (find-files "archive" "\\.pom$")
5092 (("@product.artifact@") ,version))
5094 (add-before 'install 'install-parent
5095 (install-pom-file "archive/asm-parent.pom"))
5097 (install-from-pom "archive/asm.pom")))))
5099 `(("java-junit" ,java-junit)))
5101 `(("java-org-ow2-parent-pom" ,java-org-ow2-parent-pom-1.3)))
5102 (home-page "https://asm.ow2.io/")
5103 (synopsis "Very small and fast Java bytecode manipulation framework")
5104 (description "ASM is an all purpose Java bytecode manipulation and
5105 analysis framework. It can be used to modify existing classes or dynamically
5106 generate classes, directly in binary form. The provided common
5107 transformations and analysis algorithms allow easily assembling custom
5108 complex transformations and code analysis tools.")
5109 (license license:bsd-3)))
5111 (define java-org-ow2-parent-pom-1.3
5113 (name "java-org-ow2-parent-pom")
5117 (uri "https://repo1.maven.org/maven2/org/ow2/ow2/1.3/ow2-1.3.pom")
5120 "1yr8hfx8gffpppa4ii6cvrsq029a6x8hzy7nsavxhs60s9kmq8ai"))))
5121 (build-system ant-build-system)
5125 (modify-phases %standard-phases
5130 (install-pom-file (assoc-ref %build-inputs "source"))))))
5131 (home-page "https://ow2.org")
5132 (synopsis "Ow2.org parent pom")
5133 (description "This package contains the parent pom for projects from ow2.org,
5134 including java-asm.")
5135 (license license:lgpl2.1+)))
5137 (define java-asm-bootstrap
5140 (name "java-asm-bootstrap")
5142 (substitute-keyword-arguments (package-arguments java-asm)
5144 (native-inputs `())))
5146 (define-public java-asm-8
5153 (url "https://gitlab.ow2.org/asm/asm")
5154 (commit (string-append
5155 "ASM_" (string-join (string-split version #\.)
5157 (file-name (git-file-name "java-asm" version))
5160 "1s6j27zc1i76gh891w2g48b1c3abp9w8zp5j54yb1vm5h8djkd69"))))
5162 `(#:jar-name "asm8.jar"
5163 #:source-dir "asm/src/main/java"
5164 #:test-dir "asm/src/test"
5165 ;; tests depend on junit5
5167 (propagated-inputs '())
5168 (native-inputs '())))
5170 (define-public java-asm-tree-8
5172 (inherit java-asm-8)
5173 (name "java-asm-tree")
5175 `(#:jar-name "asm-tree.jar"
5176 #:source-dir "asm-tree/src/main/java"
5177 #:test-dir "asm-tree/src/test"
5178 ;; tests depend on junit5
5181 `(("java-asm" ,java-asm-8)))))
5183 (define-public java-asm-analysis-8
5185 (inherit java-asm-8)
5186 (name "java-asm-analysis")
5188 `(#:jar-name "asm-analysis.jar"
5189 #:source-dir "asm-analysis/src/main/java"
5190 #:test-dir "asm-analysis/src/test"
5191 ;; tests depend on junit5
5194 `(("java-asm" ,java-asm-8)
5195 ("java-asm-tree" ,java-asm-tree-8)))))
5197 (define-public java-asm-util-8
5199 (inherit java-asm-8)
5200 (name "java-asm-util")
5202 `(#:jar-name "asm-util8.jar"
5203 #:source-dir "asm-util/src/main/java"
5204 #:test-dir "asm-util/src/test"
5205 ;; tests depend on junit5
5208 `(("java-asm" ,java-asm-8)
5209 ("java-asm-analysis" ,java-asm-analysis-8)
5210 ("java-asm-tree" ,java-asm-tree-8)))))
5212 (define-public java-cglib
5220 (url "https://github.com/cglib/cglib")
5221 (commit (string-append
5223 (string-map (lambda (c) (if (char=? c #\.) #\_ c))
5225 (file-name (git-file-name name version))
5227 (base32 "186451jms2zfp47yd8kxd77az2cqal1my2br7klgyp8fpl4qfg8v"))))
5228 (build-system ant-build-system)
5230 `(;; FIXME: tests fail because junit runs
5231 ;; "net.sf.cglib.transform.AbstractTransformTest", which does not seem
5232 ;; to describe a test at all.
5234 #:jar-name "cglib.jar"
5236 (modify-phases %standard-phases
5237 (add-after 'unpack 'chdir
5238 (lambda _ (chdir "cglib") #t)))))
5240 `(("java-asm" ,java-asm)
5241 ("java-junit" ,java-junit)))
5242 (home-page "https://github.com/cglib/cglib/")
5243 (synopsis "Java byte code generation library")
5244 (description "The byte code generation library CGLIB is a high level API
5245 to generate and transform Java byte code.")
5246 (license license:asl2.0)))
5248 (define-public java-objenesis
5250 (name "java-objenesis")
5255 (url "https://github.com/easymock/objenesis")
5257 (file-name (git-file-name name version))
5260 "054yi200wj00x6dp1sxfrwgndwywadsbn8d8ij1j0v45j9g2vdya"))))
5261 (build-system ant-build-system)
5263 `(#:jar-name "objenesis.jar"
5264 #:source-dir "main/src/"
5265 #:test-dir "main/src/test/"))
5267 `(("java-junit" ,java-junit)
5268 ("java-hamcrest-core" ,java-hamcrest-core)))
5269 (home-page "http://objenesis.org/")
5270 (synopsis "Bypass the constructor when creating an object")
5271 (description "Objenesis is a small Java library that serves one purpose:
5272 to instantiate a new object of a particular class. It is common to see
5273 restrictions in libraries stating that classes must require a default
5274 constructor. Objenesis aims to overcome these restrictions by bypassing the
5275 constructor on object instantiation.")
5276 (license license:asl2.0)))
5278 (define-public java-easymock
5280 (name "java-easymock")
5285 (url "https://github.com/easymock/easymock/")
5286 (commit (string-append "easymock-" version))))
5287 (file-name (git-file-name name version))
5290 "02vybm8hc0i0n9sp2f2iiqn54zwqhq835f76wc6b2m7819z5a8dq"))))
5291 (build-system ant-build-system)
5293 `(#:jar-name "easymock.jar"
5294 #:source-dir "core/src/main"
5295 #:test-dir "core/src/test"
5297 (modify-phases %standard-phases
5298 ;; FIXME: Android support requires the following packages to be
5299 ;; available: com.google.dexmaker.stock.ProxyBuilder
5300 (add-after 'unpack 'delete-android-support
5302 (with-directory-excursion "core/src/main/java/org/easymock/internal"
5303 (substitute* "MocksControl.java"
5304 (("AndroidSupport.isAndroid\\(\\)") "false")
5305 (("return classProxyFactory = new AndroidClassProxyFactory\\(\\);") ""))
5306 (delete-file "AndroidClassProxyFactory.java"))
5308 (add-after 'unpack 'delete-broken-tests
5310 (with-directory-excursion "core/src/test/java/org/easymock"
5311 ;; This test depends on dexmaker.
5312 (delete-file "tests2/ClassExtensionHelperTest.java")
5314 ;; This is not a test.
5315 (delete-file "tests/BaseEasyMockRunnerTest.java")
5317 ;; This test should be executed with a different runner...
5318 (delete-file "tests2/EasyMockAnnotationsTest.java")
5319 ;; ...but deleting it means that we also have to delete these
5321 (delete-file "tests2/EasyMockRunnerTest.java")
5322 (delete-file "tests2/EasyMockRuleTest.java")
5324 ;; This test fails because the file "easymock.properties" does
5326 (delete-file "tests2/EasyMockPropertiesTest.java"))
5329 `(("java-asm" ,java-asm)
5330 ("java-cglib" ,java-cglib)
5331 ("java-objenesis" ,java-objenesis)))
5333 `(("java-junit" ,java-junit)
5334 ("java-hamcrest-core" ,java-hamcrest-core)))
5335 (home-page "https://easymock.org/")
5336 (synopsis "Java library providing mock objects for unit tests")
5337 (description "EasyMock is a Java library that provides an easy way to use
5338 mock objects in unit testing.")
5339 (license license:asl2.0)))
5341 (define-public java-jmock-1
5348 (url "https://github.com/jmock-developers/jmock-library")
5350 (file-name (git-file-name name version))
5353 "0lkga995xd9b9mmzxmcd301hlw83p1h78nibh7djlx7wydscr85z"))))
5354 (build-system ant-build-system)
5356 `(#:build-target "jars"
5357 #:test-target "run.tests"
5359 (modify-phases %standard-phases
5360 (replace 'install (install-jars "build")))))
5361 (home-page "http://jmock.org/")
5362 (synopsis "Mock object library for test-driven development")
5363 (description "JMock is a library that supports test-driven development of
5364 Java code with mock objects. Mock objects help you design and test the
5365 interactions between the objects in your programs.
5370 @item makes it quick and easy to define mock objects
5371 @item lets you precisely specify the interactions between
5372 your objects, reducing the brittleness of your tests
5373 @item plugs into your favourite test framework
5374 @item is easy to extend.
5376 (license license:bsd-3)))
5378 (define-public java-jmock
5380 (inherit java-jmock-1)
5386 (url "https://github.com/jmock-developers/jmock-library")
5388 (file-name (git-file-name name version))
5391 "12b7l22g3nrjvf2dzcw3z03fpd2chrgp0d8xkvn8w55rwb57pax6"))))
5393 `(("java-hamcrest-all" ,java-hamcrest-all)
5394 ("java-asm" ,java-asm)
5395 ("java-bsh" ,java-bsh)
5396 ("java-junit" ,java-junit)))
5398 `(("cglib" ,java-cglib)))
5400 `(#:jar-name "java-jmock.jar"
5401 #:source-dir "jmock/src/main/java"
5402 #:test-dir "jmock/src/test"))))
5404 (define-public java-jmock-junit4
5406 (inherit java-jmock)
5407 (name "java-jmock-junit4")
5409 `(#:jar-name "java-jmock-junit4.jar"
5410 #:source-dir "jmock-junit4/src/main/java"
5411 #:test-dir "jmock-junit4/src/test"))
5413 `(("java-hamcrest-all" ,java-hamcrest-all)
5414 ("java-asm" ,java-asm)
5415 ("java-bsh" ,java-bsh)
5416 ("java-jmock" ,java-jmock)
5417 ("java-jumit" ,java-junit)))))
5419 (define-public java-jmock-legacy
5421 (inherit java-jmock)
5422 (name "java-jmock-legacy")
5424 `(#:jar-name "java-jmock-legacy.jar"
5425 #:source-dir "jmock-legacy/src/main/java"
5426 #:test-dir "jmock-legacy/src/test"
5428 (modify-phases %standard-phases
5429 (add-before 'check 'copy-tests
5431 ;; This file is a dependancy of some tests
5432 (let ((file "org/jmock/test/acceptance/PackageProtectedType.java"))
5433 (copy-file (string-append "jmock/src/test/java/" file)
5434 (string-append "jmock-legacy/src/test/java/" file))
5437 `(("java-hamcrest-all" ,java-hamcrest-all)
5438 ("java-objenesis" ,java-objenesis)
5439 ("java-cglib" ,java-cglib)
5440 ("java-jmock" ,java-jmock)
5441 ("java-asm" ,java-asm)
5442 ("java-bsh" ,java-bsh)
5443 ("java-junit" ,java-junit)))
5445 `(("java-jmock-junit4" ,java-jmock-junit4)))))
5447 (define-public java-hamcrest-all
5448 (package (inherit java-hamcrest-core)
5449 (name "java-hamcrest-all")
5452 ,@(substitute-keyword-arguments (package-arguments java-hamcrest-core)
5453 ((#:build-target _) "bigjar")
5455 `(modify-phases ,phases
5456 ;; Some build targets override the classpath, so we need to patch
5457 ;; the build.xml to ensure that required dependencies are on the
5459 (add-after 'unpack 'patch-classpath-for-integration
5460 (lambda* (#:key inputs #:allow-other-keys)
5461 (substitute* "build.xml"
5462 ((" build/hamcrest-library-\\$\\{version\\}.jar" line)
5466 (find-files (assoc-ref inputs "java-junit") "\\.jar$")
5467 (find-files (assoc-ref inputs "java-jmock") "\\.jar$")
5468 (find-files (assoc-ref inputs "java-easymock") "\\.jar$")))
5470 (("build/hamcrest-core-\\$\\{version\\}\\.jar")
5471 (car (find-files (assoc-ref inputs "java-hamcrest-core")
5475 (lambda* (#:key outputs #:allow-other-keys)
5476 (let* ((target (string-append (assoc-ref outputs "out")
5480 "-" (package-version java-hamcrest-core) ".jar"))
5481 (install-without-version-suffix
5484 (string-append target
5485 (basename jar version-suffix)
5489 install-without-version-suffix
5492 (and (string-suffix? ".jar" name)
5493 (not (string-suffix? "-sources.jar" name)))))))
5496 `(("java-junit" ,java-junit)
5497 ("java-jmock" ,java-jmock-1)
5498 ;; This is necessary because of what seems to be a race condition.
5499 ;; This package would sometimes fail to build because hamcrest-core.jar
5500 ;; could not be found, even though it is built as part of this package.
5501 ;; Adding java-hamcrest-core appears to fix this problem. See
5502 ;; https://debbugs.gnu.org/31390 for more information.
5503 ("java-hamcrest-core" ,java-hamcrest-core)
5504 ("java-easymock" ,java-easymock)
5505 ,@(package-inputs java-hamcrest-core)))))
5507 (define-public java-jopt-simple
5509 (name "java-jopt-simple")
5513 (uri (string-append "http://repo1.maven.org/maven2/"
5514 "net/sf/jopt-simple/jopt-simple/"
5515 version "/jopt-simple-"
5516 version "-sources.jar"))
5519 "1v8bzmwmw6qq20gm42xyay6vrd567dra4vqwhgjnqqjz1gs9f8qa"))))
5520 (build-system ant-build-system)
5522 `(#:tests? #f ; there are no tests
5523 #:jar-name "jopt-simple.jar"))
5524 (home-page "https://pholser.github.io/jopt-simple/")
5525 (synopsis "Java library for parsing command line options")
5526 (description "JOpt Simple is a Java library for parsing command line
5527 options, such as those you might pass to an invocation of @code{javac}. In
5528 the interest of striving for simplicity, as closely as possible JOpt Simple
5529 attempts to honor the command line option syntaxes of POSIX @code{getopt} and
5530 GNU @code{getopt_long}. It also aims to make option parser configuration and
5531 retrieval of options and their arguments simple and expressive, without being
5533 (license license:expat)))
5535 (define-public java-commons-math3
5537 (name "java-commons-math3")
5541 (uri (string-append "mirror://apache/commons/math/source/"
5542 "commons-math3-" version "-src.tar.gz"))
5545 "19l6yp44qc5g7wg816nbn5z3zq3xxzwimvbm4a8pczgvpi4i85s6"))))
5546 (build-system ant-build-system)
5548 `(#:build-target "jar"
5549 #:test-target "test"
5551 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
5552 (junit (assoc-ref %build-inputs "java-junit")))
5553 (list (string-append "-Djunit.jar="
5554 (car (find-files junit "jar$")))
5555 (string-append "-Dhamcrest.jar="
5556 (car (find-files hamcrest ".*.jar$")))))
5558 (modify-phases %standard-phases
5559 ;; We want to build the jar in the build phase and run the tests
5560 ;; later in a separate phase.
5561 (add-after 'unpack 'untangle-targets
5563 (substitute* "build.xml"
5564 (("name=\"jar\" depends=\"test\"")
5565 "name=\"jar\" depends=\"compile\""))
5567 ;; There is no install target.
5569 (install-jars "target")))))
5571 `(("java-junit" ,java-junit)
5572 ("java-hamcrest-core" ,java-hamcrest-core)))
5573 (home-page "https://commons.apache.org/math/")
5574 (synopsis "Apache Commons mathematics library")
5575 (description "Commons Math is a library of lightweight, self-contained
5576 mathematics and statistics components addressing the most common problems not
5577 available in the Java programming language or Commons Lang.")
5578 (license license:asl2.0)))
5580 (define-public java-jmh
5587 (url "http://hg.openjdk.java.net/code-tools/jmh/")
5588 (changeset version)))
5589 (file-name (string-append name "-" version "-checkout"))
5592 "1fxyxhg9famwcg1prc4cgwb5wzyxqavn3cjm5vz8605xz7x5k084"))))
5593 (build-system ant-build-system)
5595 `(#:jar-name "jmh-core.jar"
5596 #:source-dir "jmh-core/src/main"
5597 #:test-dir "jmh-core/src/test"
5599 (modify-phases %standard-phases
5600 ;; This seems to be a bug in the JDK. It may not be necessary in
5601 ;; future versions of the JDK.
5602 (add-after 'unpack 'fix-bug
5604 (with-directory-excursion
5605 "jmh-core/src/main/java/org/openjdk/jmh/runner/options"
5606 (substitute* '("IntegerValueConverter.java"
5607 "ThreadsValueConverter.java")
5608 (("public Class<Integer> valueType")
5609 "public Class<? extends Integer> valueType")))
5612 `(("java-jopt-simple" ,java-jopt-simple)
5613 ("java-commons-math3" ,java-commons-math3)))
5615 `(("java-junit" ,java-junit)
5616 ("java-hamcrest-core" ,java-hamcrest-core)))
5617 (home-page "https://openjdk.java.net/projects/code-tools/jmh/")
5618 (synopsis "Benchmark harness for the JVM")
5619 (description "JMH is a Java harness for building, running, and analysing
5620 nano/micro/milli/macro benchmarks written in Java and other languages
5621 targeting the JVM.")
5623 (license license:gpl2)))
5625 (define-public java-commons-collections4
5627 (name "java-commons-collections4")
5631 (uri (string-append "mirror://apache/commons/collections/source/"
5632 "commons-collections4-" version "-src.tar.gz"))
5635 "1krfhvggympq4avk7gh6qafzf6b9ip6r1m4lmacikyx04039m0wl"))))
5636 (build-system ant-build-system)
5638 `(#:test-target "test"
5640 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
5641 (junit (assoc-ref %build-inputs "java-junit"))
5642 (easymock (assoc-ref %build-inputs "java-easymock")))
5643 (list (string-append "-Djunit.jar="
5644 (car (find-files junit "jar$")))
5645 (string-append "-Dhamcrest.jar="
5646 (car (find-files hamcrest "jar$")))
5647 (string-append "-Deasymock.jar=" easymock
5648 "/share/java/easymock.jar")))
5650 (modify-phases %standard-phases
5652 (install-jars "target")))))
5654 `(("java-junit" ,java-junit)
5655 ("java-hamcrest-core" ,java-hamcrest-core)
5656 ("java-easymock" ,java-easymock)))
5657 (home-page "https://commons.apache.org/collections/")
5658 (synopsis "Collections framework")
5659 (description "The Java Collections Framework is the recognised standard
5660 for collection handling in Java. Commons-Collections seek to build upon the
5661 JDK classes by providing new interfaces, implementations and utilities. There
5662 are many features, including:
5665 @item @code{Bag} interface for collections that have a number of copies of
5667 @item @code{BidiMap} interface for maps that can be looked up from value to
5668 key as well and key to value
5669 @item @code{MapIterator} interface to provide simple and quick iteration over
5671 @item Transforming decorators that alter each object as it is added to the
5673 @item Composite collections that make multiple collections look like one
5674 @item Ordered maps and sets that retain the order elements are added in,
5675 including an LRU based map
5676 @item Reference map that allows keys and/or values to be garbage collected
5678 @item Many comparator implementations
5679 @item Many iterator implementations
5680 @item Adapter classes from array and enumerations to collections
5681 @item Utilities to test or create typical set-theory properties of collections
5682 such as union, intersection, and closure.
5684 (license license:asl2.0)))
5686 (define-public java-commons-collections
5688 (inherit java-commons-collections4)
5689 (name "java-commons-collections")
5693 (uri (string-append "mirror://apache/commons/collections/source/"
5694 "commons-collections-" version "-src.tar.gz"))
5697 "055r51a5lfc3z7rkxnxmnn1npvkvda7636hjpm4qk7cnfzz98387"))
5699 (search-patches "java-commons-collections-fix-java8.patch"))))
5701 (substitute-keyword-arguments (package-arguments java-commons-collections4)
5703 `(modify-phases ,phases
5704 ;; The manifest is required by the build procedure
5705 (add-before 'build 'add-manifest
5707 (mkdir-p "build/conf")
5708 (call-with-output-file "build/conf/MANIFEST.MF"
5710 (format file "Manifest-Version: 1.0\n")))
5713 (install-jars "build"))))))))
5715 (define java-commons-collections-test-classes
5717 (inherit java-commons-collections)
5719 `(#:jar-name "commons-collections-test-classes.jar"
5720 #:source-dir "src/test"
5723 `(("collection" ,java-commons-collections)))))
5725 (define-public java-commons-beanutils
5727 (name "java-commons-beanutils")
5731 (uri (string-append "mirror://apache/commons/beanutils/source/"
5732 "commons-beanutils-" version "-src.tar.gz"))
5735 "03cs0bq3sl1sdc7py9g3qnf8n9h473nrkvd3d251kaqv6a2ab7qk"))))
5736 (build-system ant-build-system)
5738 `(#:test-target "test"
5741 (modify-phases %standard-phases
5743 (lambda* (#:key outputs #:allow-other-keys)
5744 (rename-file (string-append "dist/commons-beanutils-" ,version
5746 "commons-beanutils.jar")
5747 (install-file "commons-beanutils.jar"
5748 (string-append (assoc-ref outputs "out") "/share/java/"))
5751 `(("logging" ,java-commons-logging-minimal)
5752 ("collections" ,java-commons-collections)))
5754 `(("junit" ,java-junit)
5755 ("collections-test" ,java-commons-collections-test-classes)))
5756 (home-page "https://commons.apache.org/beanutils/")
5757 (synopsis "Dynamically set or get properties in Java")
5758 (description "BeanUtils provides a simplified interface to reflection and
5759 introspection to set or get dynamically determined properties through their
5760 setter and getter method.")
5761 (license license:asl2.0)))
5763 (define-public java-commons-io
5765 (name "java-commons-io")
5770 (uri (string-append "mirror://apache/commons/io/source/"
5771 "commons-io-" version "-src.tar.gz"))
5774 "0q5y41jrcjvx9hzs47x5kdhnasdy6rm4bzqd2jxl02w717m7a7v3"))))
5775 (build-system ant-build-system)
5776 (outputs '("out" "doc"))
5778 `(#:test-target "test"
5780 (list (string-append "-Djunit.jar="
5781 (car (find-files (assoc-ref %build-inputs "java-junit")
5784 (modify-phases %standard-phases
5785 (add-after 'build 'build-javadoc ant-build-javadoc)
5786 (replace 'install (install-from-pom "pom.xml"))
5787 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
5789 `(("java-junit" ,java-junit)
5790 ("java-hamcrest-core" ,java-hamcrest-core)))
5792 `(("apache-commons-parent-pom" ,apache-commons-parent-pom-39)))
5793 (home-page "https://commons.apache.org/io/")
5794 (synopsis "Common useful IO related classes")
5795 (description "Commons-IO contains utility classes, stream implementations,
5796 file filters and endian classes.")
5797 (license license:asl2.0)))
5799 (define-public java-commons-exec-1.1
5801 (name "java-commons-exec")
5806 (uri (string-append "mirror://apache/commons/exec/source/"
5807 "commons-exec-" version "-src.tar.gz"))
5810 "025dk8xgj10lxwwwqp0hng2rn7fr4vcirxzydqzx9k4dim667alk"))))
5811 (build-system ant-build-system)
5813 `(#:test-target "test"
5815 (list (string-append "-Dmaven.junit.jar="
5816 (car (find-files (assoc-ref %build-inputs "java-junit")
5819 (modify-phases %standard-phases
5820 (add-before 'build 'delete-network-tests
5822 (delete-file "src/test/java/org/apache/commons/exec/DefaultExecutorTest.java")
5823 (substitute* "src/test/java/org/apache/commons/exec/TestRunner.java"
5824 (("suite\\.addTestSuite\\(DefaultExecutorTest\\.class\\);") ""))
5826 ;; The "build" phase automatically tests.
5828 (replace 'install (install-jars "target")))))
5830 `(("java-junit" ,java-junit)))
5831 (home-page "https://commons.apache.org/proper/commons-exec/")
5832 (synopsis "Common program execution related classes")
5833 (description "Commons-Exec simplifies executing external processes.")
5834 (license license:asl2.0)))
5836 (define-public java-commons-exec
5838 (inherit java-commons-exec-1.1)
5843 (uri (string-append "mirror://apache/commons/exec/source/"
5844 "commons-exec-" version "-src.tar.gz"))
5847 "17yb4h6f8l49c5iyyvda4z2nmw0bxrx857nrwmsr7mmpb7x441yv"))))
5849 `(#:test-target "test"
5851 (list (string-append "-Dmaven.junit.jar="
5852 (car (find-files (assoc-ref %build-inputs "java-junit")
5854 "-Dmaven.compiler.source=1.7"
5855 "-Dmaven.compiler.target=1.7")
5857 (modify-phases %standard-phases
5858 (add-before 'build 'delete-network-tests
5859 (lambda* (#:key inputs #:allow-other-keys)
5860 ;; This test hangs indefinitely.
5861 (delete-file "src/test/java/org/apache/commons/exec/issues/Exec60Test.java")
5862 (substitute* "src/test/java/org/apache/commons/exec/issues/Exec41Test.java"
5863 (("ping -c 10 127.0.0.1") "sleep 10"))
5864 (substitute* "src/test/java/org/apache/commons/exec/issues/Exec49Test.java"
5866 (call-with-output-file "src/test/scripts/ping.sh"
5868 (format port "#!~a/bin/sh\nsleep $1\n"
5869 (assoc-ref inputs "bash"))))
5871 ;; The "build" phase automatically tests.
5873 (replace 'install (install-jars "target")))))
5875 `(("java-junit" ,java-junit)
5876 ("java-hamcrest-core" ,java-hamcrest-core)))))
5878 (define-public java-commons-lang
5880 (name "java-commons-lang")
5885 (uri (string-append "mirror://apache/commons/lang/source/"
5886 "commons-lang-" version "-src.tar.gz"))
5888 (base32 "1mxwagqadzx1b2al7i0z1v0r235aj2njdyijf02szq0vhmqrfiq5"))))
5889 (build-system ant-build-system)
5890 (outputs '("out" "doc"))
5892 `(#:test-target "test"
5893 #:test-exclude (list "**/Abstract*.java" "**/Random*.java")
5895 (modify-phases %standard-phases
5896 (add-after 'build 'build-javadoc ant-build-javadoc)
5897 (add-before 'check 'disable-failing-test
5899 ;; Disable a failing test
5900 (substitute* "src/test/java/org/apache/commons/lang/\
5901 time/FastDateFormatTest.java"
5902 (("public void testFormat\\(\\)")
5903 "public void disabled_testFormat()"))
5905 (replace 'install (install-jars "target"))
5906 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
5908 `(("java-junit" ,java-junit)))
5909 (home-page "https://commons.apache.org/lang/")
5910 (synopsis "Extension of the java.lang package")
5911 (description "The Commons Lang components contains a set of Java classes
5912 that provide helper methods for standard Java classes, especially those found
5913 in the @code{java.lang} package in the Sun JDK. The following classes are
5917 @item StringUtils - Helper for @code{java.lang.String}.
5918 @item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets
5919 of characters such as @code{[a-z]} and @code{[abcdez]}.
5920 @item RandomStringUtils - Helper for creating randomised strings.
5921 @item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
5922 @item NumberRange - A range of numbers with an upper and lower bound.
5923 @item ObjectUtils - Helper for @code{java.lang.Object}.
5924 @item SerializationUtils - Helper for serializing objects.
5925 @item SystemUtils - Utility class defining the Java system properties.
5926 @item NestedException package - A sub-package for the creation of nested
5928 @item Enum package - A sub-package for the creation of enumerated types.
5929 @item Builder package - A sub-package for the creation of @code{equals},
5930 @code{hashCode}, @code{compareTo} and @code{toString} methods.
5932 (license license:asl2.0)))
5934 (define-public java-commons-lang3
5936 (name "java-commons-lang3")
5941 (uri (string-append "mirror://apache/commons/lang/source/"
5942 "commons-lang3-" version "-src.tar.gz"))
5944 (base32 "0s4ffbvsyl16c90l45ximsg4dwd8hmz7wsza3p308fw43h6mwhb6"))))
5945 (build-system ant-build-system)
5947 `(#:jar-name "commons-lang3.jar"
5948 #:source-dir "src/main/java"
5949 #:tests? #f; require junit5
5951 (modify-phases %standard-phases
5952 (replace 'install (install-from-pom "pom.xml")))))
5954 `(("apache-commons-parent-pom" ,apache-commons-parent-pom-48)))
5955 (home-page "https://commons.apache.org/lang/")
5956 (synopsis "Extension of the java.lang package")
5957 (description "The Commons Lang components contains a set of Java classes
5958 that provide helper methods for standard Java classes, especially those found
5959 in the @code{java.lang} package. The following classes are included:
5962 @item StringUtils - Helper for @code{java.lang.String}.
5963 @item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets of
5964 characters such as @code{[a-z]} and @code{[abcdez]}.
5965 @item RandomStringUtils - Helper for creating randomised strings.
5966 @item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
5967 @item NumberRange - A range of numbers with an upper and lower bound.
5968 @item ObjectUtils - Helper for @code{java.lang.Object}.
5969 @item SerializationUtils - Helper for serializing objects.
5970 @item SystemUtils - Utility class defining the Java system properties.
5971 @item NestedException package - A sub-package for the creation of nested
5973 @item Enum package - A sub-package for the creation of enumerated types.
5974 @item Builder package - A sub-package for the creation of @code{equals},
5975 @code{hashCode}, @code{compareTo} and @code{toString} methods.
5977 (license license:asl2.0)))
5979 (define-public java-commons-bsf
5981 (name "java-commons-bsf")
5985 (uri (string-append "mirror://apache/commons/bsf/source/bsf-src-"
5989 "1sbamr8jl32p1jgf59nw0b2w9qivyg145954hm6ly54cfgsqrdas"))
5990 (modules '((guix build utils)))
5993 (for-each delete-file
5994 (find-files "." "\\.jar$"))
5996 (build-system ant-build-system)
5998 `(#:build-target "jar"
5999 #:tests? #f; No test file
6000 #:modules ((guix build ant-build-system)
6002 (guix build java-utils)
6005 (modify-phases %standard-phases
6006 (add-before 'build 'create-properties
6008 ;; This file is missing from the distribution
6009 (call-with-output-file "build-properties.xml"
6012 `(project (@ (basedir ".") (name "build-properties") (default ""))
6013 (property (@ (name "project.name") (value "bsf")))
6014 (property (@ (name "source.level") (value "1.5")))
6015 (property (@ (name "build.lib") (value "build/jar")))
6016 (property (@ (name "src.dir") (value "src")))
6017 (property (@ (name "tests.dir") (value "src/org/apache/bsf/test")))
6018 (property (@ (name "build.tests") (value "build/test-classes")))
6019 (property (@ (name "build.dest") (value "build/classes"))))
6022 (replace 'install (install-jars "build")))))
6024 `(("java-junit" ,java-junit)))
6026 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)))
6027 (home-page "https://commons.apache.org/proper/commons-bsf")
6028 (synopsis "Bean Scripting Framework")
6029 (description "The Bean Scripting Framework (BSF) is a set of Java classes
6030 which provides scripting language support within Java applications, and access
6031 to Java objects and methods from scripting languages. BSF allows one to write
6032 JSPs in languages other than Java while providing access to the Java class
6033 library. In addition, BSF permits any Java application to be implemented in
6034 part (or dynamically extended) by a language that is embedded within it. This
6035 is achieved by providing an API that permits calling scripting language engines
6036 from within Java, as well as an object registry that exposes Java objects to
6037 these scripting language engines.")
6038 (license license:asl2.0)))
6040 (define-public java-commons-jxpath
6042 (name "java-commons-jxpath")
6046 (uri (string-append "mirror://apache/commons/jxpath/source/"
6047 "commons-jxpath-" version "-src.tar.gz"))
6050 "1rpgg31ayn9fwr4bfi2i1ij0npcg79ad2fv0w9hacvawsyc42cfs"))))
6051 (build-system ant-build-system)
6053 `(#:jar-name "commons-jxpath.jar"
6054 ;; tests require more dependencies, including mockrunner which depends on old software
6056 #:source-dir "src/java"))
6058 `(("servlet" ,java-classpathx-servletapi)
6059 ("java-jdom" ,java-jdom)
6060 ("java-commons-beanutils" ,java-commons-beanutils)))
6062 `(("java-junit" ,java-junit)))
6063 (home-page "https://commons.apache.org/jxpath/")
6064 (synopsis "Simple interpreter of an expression language called XPath.")
6065 (description "The org.apache.commons.jxpath package defines a simple
6066 interpreter of an expression language called XPath. JXPath applies XPath
6067 expressions to graphs of objects of all kinds: JavaBeans, Maps, Servlet
6068 contexts, DOM etc, including mixtures thereof.")
6069 (license license:asl2.0)))
6071 (define-public java-commons-pool
6073 (name "java-commons-pool")
6077 (uri (string-append "mirror://apache/commons/pool/source/"
6078 "commons-pool2-" version "-src.tar.gz"))
6081 "1fi1hgqmq01bs6azbj3sfswxzadp2r8sjjfiq6ryilz1m50kvrv6"))))
6083 `(#:jar-name "common-pool.jar"
6084 #:source-dir "src/main/java"
6086 (list "**/PerformanceTest.java")))
6087 (build-system ant-build-system)
6089 `(("java-cglib" ,java-cglib)))
6091 `(("java-junit" ,java-junit)
6092 ("java-hamcrest-core" ,java-hamcrest-core)
6093 ("java-asm" ,java-asm)
6094 ("java-objenesis" ,java-objenesis)))
6095 (home-page "https://commons.apache.org/proper/commons-pool/")
6096 (synopsis "Object-pooling API in Java")
6097 (description "The commons-pool package provides an object-pooling API
6098 and a number of object pool implementations. This package defines a
6099 handful of pooling interfaces and some base classes that may be useful when
6100 creating new pool implementations.")
6101 (license license:asl2.0)))
6103 (define-public java-commons-dbcp
6105 (name "java-commons-dbcp")
6109 (uri (string-append "mirror://apache/commons/dbcp/source/"
6110 "commons-dbcp2-" version "-src.tar.gz"))
6113 "0axbvcbnf2l70fc3ybrlp3siw2w4ka9mia2pnx4py8gz54cpw3rc"))))
6115 `(#:source-dir "src/main/java"
6116 #:jar-name "java-commons-dbcp.jar"
6117 #:tests? #f)); requires apache-geronimo
6119 `(("java-commons-pool" ,java-commons-pool)
6120 ("java-commons-logging" ,java-commons-logging-minimal)
6121 ("java-jboss-transaction-api-spec" ,java-jboss-transaction-api-spec)))
6123 `(("java-junit" ,java-junit)))
6124 (build-system ant-build-system)
6125 (home-page "https://commons.apache.org/proper/commons-dbcp/")
6126 (synopsis "Database Connection Pool for Java")
6127 (description "Commons-dbcp allows you to share a pool of database
6128 connections between users. Creating a new connection for each user can be
6129 time consuming and even unfeasible when the number of simultaneous users is
6130 very large. This package provides a way to share a poole of connections to
6132 (license license:asl2.0)))
6134 (define-public java-commons-jcs
6136 (name "java-commons-jcs")
6140 (uri (string-append "mirror://apache/commons/jcs/source/"
6141 "commons-jcs-dist-" version "-src.tar.gz"))
6144 "0syhq2npjbrl0azqfjm0gvash1qd5qjy4qmysxcrqjsk0nf9fa1q"))))
6145 (build-system ant-build-system)
6147 `(#:jar-name "commons-jcs.jar"
6148 #:source-dir "commons-jcs-core/src/main/java"
6149 #:test-dir "commons-jcs-core/src/test"
6150 #:tests? #f; requires hsqldb
6152 (modify-phases %standard-phases
6153 (add-before 'build 'prepare
6155 (with-directory-excursion
6156 "commons-jcs-core/src/main/java/org/apache/commons/jcs"
6158 "auxiliary/disk/jdbc/dsfactory/SharedPoolDataSourceFactory.java"
6159 (("commons.dbcp") "commons.dbcp2")
6160 ((".*\\.setMaxActive.*") ""))
6161 ;;; Remove dependency on velocity-tools
6162 (delete-file "admin/servlet/JCSAdminServlet.java"))
6165 `(("java-classpathx-servletapi" ,java-classpathx-servletapi)
6166 ("java-commons-logging-minimal" ,java-commons-logging-minimal)
6167 ("java-commons-httpclient" ,java-commons-httpclient)
6168 ("java-commons-dbcp" ,java-commons-dbcp)))
6170 `(("java-junit" ,java-junit)))
6171 (home-page "https://commons.apache.org/proper/commons-jcs/")
6172 (synopsis "Distributed caching system in Java")
6173 (description "JCS is a distributed caching system written in Java. It
6174 is intended to speed up applications by providing a means to manage cached
6175 data of various dynamic natures. Like any caching system, JCS is most useful
6176 for high read, low put applications. Latency times drop sharply and
6177 bottlenecks move away from the database in an effectively cached system.")
6178 (license license:asl2.0)))
6180 (define-public java-jsr250
6182 (name "java-jsr250")
6186 (uri (string-append "https://repo1.maven.org/maven2/"
6187 "javax/annotation/javax.annotation-api/"
6188 version "/javax.annotation-api-"
6189 version "-sources.jar"))
6192 "08clh8n4n9wfglf75qsqfjs6yf79f7x6hqx38cn856pksszv50kz"))))
6193 (build-system ant-build-system)
6195 `(#:tests? #f ; no tests included
6197 #:jar-name "jsr250.jar"
6198 #:modules ((guix build ant-build-system)
6200 (guix build maven pom)
6201 (guix build java-utils)
6204 (modify-phases %standard-phases
6205 (add-before 'install 'create-pom
6207 (with-output-to-file "pom.xml"
6211 (modelVersion "4.0.0")
6213 (groupId "javax.annotation")
6214 (artifactId "jsr250-api")
6215 (version ,,version))))))
6218 (install-from-pom "pom.xml")))))
6219 (home-page "https://jcp.org/en/jsr/detail?id=250")
6220 (synopsis "Security-related annotations")
6221 (description "This package provides annotations for security. It provides
6222 packages in the @code{javax.annotation} and @code{javax.annotation.security}
6224 ;; either cddl or gpl2 only, with classpath exception
6225 (license (list license:cddl1.0
6228 (define-public java-jsr305
6230 (name "java-jsr305")
6234 (uri (string-append "https://repo1.maven.org/maven2/"
6235 "com/google/code/findbugs/"
6236 "jsr305/" version "/jsr305-"
6237 version "-sources.jar"))
6240 "1rh6jin9v7jqpq3kf1swl868l8i94r636n03pzpsmgr8v0lh9j2n"))))
6241 (build-system ant-build-system)
6243 `(#:tests? #f ; no tests included
6244 #:jar-name "jsr305.jar"
6245 #:modules ((guix build ant-build-system)
6246 (guix build java-utils)
6247 (guix build maven pom)
6251 (modify-phases %standard-phases
6252 (add-before 'install 'create-pom
6254 (with-output-to-file "pom.xml"
6258 (modelVersion "4.0.0")
6260 (groupId "com.google.code.findbugs")
6261 (artifactId "jsr305")
6262 (version ,,version))))))
6265 (install-from-pom "pom.xml")))))
6266 (home-page "http://findbugs.sourceforge.net/")
6267 (synopsis "Annotations for the static analyzer called findbugs")
6268 (description "This package provides annotations for the findbugs package.
6269 It provides packages in the @code{javax.annotations} namespace.")
6270 (license license:asl2.0)))
6272 (define-public java-guava
6275 ;; This is the last release of Guava that can be built with Java 7.
6280 (url "https://github.com/google/guava/")
6281 (commit (string-append "v" version))))
6282 (file-name (git-file-name name version))
6285 "00h5cawdjic1vind3yivzh1f58flvm1yfmhsyqwyvmbvj1vakysp"))))
6286 (build-system ant-build-system)
6288 `(#:tests? #f ; no tests included
6289 #:jar-name "guava.jar"
6290 #:source-dir "guava/src"
6292 (modify-phases %standard-phases
6293 (add-after 'unpack 'trim-sources
6295 (with-directory-excursion "guava/src/com/google/common"
6296 ;; Remove annotations to avoid extra dependencies:
6297 ;; * "j2objc" annotations are used when converting Java to
6299 ;; * "errorprone" annotations catch common Java mistakes at
6301 ;; * "IgnoreJRERequirement" is used for Android.
6302 (substitute* (find-files "." "\\.java$")
6303 (("import com.google.j2objc.*") "")
6304 (("import com.google.errorprone.annotation.*") "")
6305 (("import org.codehaus.mojo.animal_sniffer.*") "")
6306 (("@CanIgnoreReturnValue") "")
6309 (("@RetainedWith") "")
6311 (("@ForOverride") "")
6312 (("@J2ObjCIncompatible") "")
6313 (("@IgnoreJRERequirement") "")))
6315 (replace 'install (install-from-pom "guava/pom.xml")))))
6317 `(("java-jsr305" ,java-jsr305)))
6319 `(("java-guava-parent-pom" ,java-guava-parent-pom)))
6320 (home-page "https://github.com/google/guava")
6321 (synopsis "Google core libraries for Java")
6322 (description "Guava is a set of core libraries that includes new
6323 collection types (such as multimap and multiset), immutable collections, a
6324 graph library, functional types, an in-memory cache, and APIs/utilities for
6325 concurrency, I/O, hashing, primitives, reflection, string processing, and much
6327 (license license:asl2.0)))
6329 (define java-guava-parent-pom
6331 (inherit java-guava)
6332 (name "java-guava-parent-pom")
6336 (modify-phases %standard-phases
6340 (install-pom-file "pom.xml")))))
6342 `(("java-sonatype-oss-parent-pom" ,java-sonatype-oss-parent-pom-7)))))
6344 ;; The java-commons-logging package provides adapters to many different
6345 ;; logging frameworks. To avoid an excessive dependency graph we try to build
6346 ;; it with only a minimal set of adapters.
6347 (define-public java-commons-logging-minimal
6349 (name "java-commons-logging-minimal")
6353 (uri (string-append "mirror://apache/commons/logging/source/"
6354 "commons-logging-" version "-src.tar.gz"))
6357 "10bwcy5w8d7y39n0krlwhnp8ds3kj5zhmzj0zxnkw0qdlsjmsrj9"))))
6358 (build-system ant-build-system)
6360 `(#:tests? #f ; avoid dependency on logging frameworks
6361 #:jar-name "commons-logging-minimal.jar"
6363 (modify-phases %standard-phases
6364 (add-after 'unpack 'delete-adapters-and-tests
6366 ;; Delete all adapters except for NoOpLog, SimpleLog, and
6367 ;; LogFactoryImpl. NoOpLog is required to build; LogFactoryImpl
6368 ;; is used by applications; SimpleLog is the only actually usable
6369 ;; implementation that does not depend on another logging
6373 (delete-file (string-append
6374 "src/main/java/org/apache/commons/logging/impl/" file)))
6375 (list "Jdk13LumberjackLogger.java"
6376 "WeakHashtable.java"
6378 "ServletContextCleaner.java"
6381 "LogKitLogger.java"))
6382 (delete-file-recursively "src/test")
6384 (home-page "https://commons.apache.org/logging/")
6385 (synopsis "Common API for logging implementations")
6386 (description "The Logging package is a thin bridge between different
6387 logging implementations. A library that uses the commons-logging API can be
6388 used with any logging implementation at runtime.")
6389 (license license:asl2.0)))
6391 ;; This is the last release of the 1.x series.
6392 (define-public java-mockito-1
6394 (name "java-mockito")
6398 (uri (string-append "http://repo1.maven.org/maven2/"
6399 "org/mockito/mockito-core/" version
6400 "/mockito-core-" version "-sources.jar"))
6403 "0vmiwnwpf83g2q7kj1rislmja8fpvqkixjhawh7nxnygx6pq11kc"))))
6404 (build-system ant-build-system)
6406 `(#:jar-name "mockito.jar"
6407 #:tests? #f ; no tests included
6408 ;; FIXME: patch-and-repack does not support jars, so we have to apply
6409 ;; patches in build phases.
6411 (modify-phases %standard-phases
6412 ;; Mockito was developed against a different version of hamcrest,
6413 ;; which does not require matcher implementations to provide an
6414 ;; implementation of the "describeMismatch" method. We add this
6415 ;; simple definition to pass the build with our version of hamcrest.
6416 (add-after 'unpack 'fix-hamcrest-build-error
6418 (substitute* "src/org/mockito/internal/matchers/LocalizedMatcher.java"
6419 (("public Matcher getActualMatcher\\(\\) .*" line)
6421 public void describeMismatch(Object item, Description description) {
6422 actualMatcher.describeMismatch(item, description);
6426 ;; Mockito bundles cglib. We have a cglib package, so let's use
6428 (add-after 'unpack 'use-system-libraries
6430 (with-directory-excursion "src/org/mockito/internal/creation/cglib"
6431 (substitute* '("CGLIBHacker.java"
6432 "CglibMockMaker.java"
6433 "ClassImposterizer.java"
6434 "DelegatingMockitoMethodProxy.java"
6435 "MethodInterceptorFilter.java"
6436 "MockitoNamingPolicy.java"
6437 "SerializableMockitoMethodProxy.java"
6438 "SerializableNoOp.java")
6439 (("import org.mockito.cglib") "import net.sf.cglib")))
6442 `(("java-junit" ,java-junit)
6443 ("java-objenesis" ,java-objenesis)
6444 ("java-cglib" ,java-cglib)
6445 ("java-hamcrest-core" ,java-hamcrest-core)))
6446 (home-page "http://mockito.org")
6447 (synopsis "Mockito is a mock library for Java")
6448 (description "Mockito is a mocking library for Java which lets you write
6449 tests with a clean and simple API. It generates mocks using reflection, and
6450 it records all mock invocations, including methods arguments.")
6451 (license license:asl2.0)))
6453 (define-public java-httpcomponents-httpcore
6455 (name "java-httpcomponents-httpcore")
6459 (uri (string-append "mirror://apache//httpcomponents/httpcore/"
6460 "source/httpcomponents-core-"
6461 version "-src.tar.gz"))
6464 "02bwcf38y4vgwq7kj2s6q7qrmma641r5lacivm16kgxvb2j6h1vy"))))
6465 (build-system ant-build-system)
6467 `(#:jar-name "httpcomponents-httpcore.jar"
6469 (modify-phases %standard-phases
6470 (add-after 'unpack 'chdir
6471 (lambda _ (chdir "httpcore") #t)))))
6473 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)
6474 ("java-commons-lang3" ,java-commons-lang3)))
6476 `(("java-junit" ,java-junit)
6477 ("java-mockito" ,java-mockito-1)))
6478 (home-page "https://hc.apache.org/httpcomponents-core-4.4.x/index.html")
6479 (synopsis "Low level HTTP transport components")
6480 (description "HttpCore is a set of low level HTTP transport components
6481 that can be used to build custom client and server side HTTP services with a
6482 minimal footprint. HttpCore supports two I/O models: blocking I/O model based
6483 on the classic Java I/O and non-blocking, event driven I/O model based on Java
6486 This package provides the blocking I/O model library.")
6487 (license license:asl2.0)))
6489 (define-public java-httpcomponents-httpcore-nio
6490 (package (inherit java-httpcomponents-httpcore)
6491 (name "java-httpcomponents-httpcore-nio")
6493 `(#:jar-name "httpcomponents-httpcore-nio.jar"
6495 (modify-phases %standard-phases
6496 (add-after 'unpack 'chdir
6497 (lambda _ (chdir "httpcore-nio") #t)))))
6499 `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
6500 ("java-hamcrest-core" ,java-hamcrest-core)
6501 ,@(package-inputs java-httpcomponents-httpcore)))
6502 (description "HttpCore is a set of low level HTTP transport components
6503 that can be used to build custom client and server side HTTP services with a
6504 minimal footprint. HttpCore supports two I/O models: blocking I/O model based
6505 on the classic Java I/O and non-blocking, event driven I/O model based on Java
6508 This package provides the non-blocking I/O model library based on Java
6511 (define-public java-httpcomponents-httpcore-ab
6512 (package (inherit java-httpcomponents-httpcore)
6513 (name "java-httpcomponents-httpcore-ab")
6515 `(#:jar-name "httpcomponents-httpcore-ab.jar"
6517 (modify-phases %standard-phases
6518 (add-after 'unpack 'chdir
6519 (lambda _ (chdir "httpcore-ab") #t)))))
6521 `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
6522 ("java-commons-cli" ,java-commons-cli)
6523 ("java-hamcrest-core" ,java-hamcrest-core)
6524 ,@(package-inputs java-httpcomponents-httpcore)))
6525 (synopsis "Apache HttpCore benchmarking tool")
6526 (description "This package provides the HttpCore benchmarking tool. It is
6527 an Apache AB clone based on HttpCore.")))
6529 (define-public java-httpcomponents-httpclient
6531 (name "java-httpcomponents-httpclient")
6535 (uri (string-append "mirror://apache/httpcomponents/httpclient/"
6536 "source/httpcomponents-client-"
6537 version "-src.tar.gz"))
6540 "1va99m2zc2liv0v9vn72p5ja8yz4s5wq7zpahaai5nr966kvxzkb"))))
6541 (build-system ant-build-system)
6543 `(#:jar-name "httpcomponents-httpclient.jar"
6545 (modify-phases %standard-phases
6546 (add-after 'unpack 'chdir
6547 (lambda _ (chdir "httpclient") #t)))))
6549 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)
6550 ("java-commons-codec" ,java-commons-codec)
6551 ("java-hamcrest-core" ,java-hamcrest-core)
6552 ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
6553 ("java-mockito" ,java-mockito-1)
6554 ("java-junit" ,java-junit)))
6555 (home-page "https://hc.apache.org/httpcomponents-client-ga/")
6556 (synopsis "HTTP client library for Java")
6557 (description "Although the @code{java.net} package provides basic
6558 functionality for accessing resources via HTTP, it doesn't provide the full
6559 flexibility or functionality needed by many applications. @code{HttpClient}
6560 seeks to fill this void by providing an efficient, up-to-date, and
6561 feature-rich package implementing the client side of the most recent HTTP
6562 standards and recommendations.")
6563 (license license:asl2.0)))
6565 (define-public java-httpcomponents-httpmime
6566 (package (inherit java-httpcomponents-httpclient)
6567 (name "java-httpcomponents-httpmime")
6569 `(#:jar-name "httpcomponents-httpmime.jar"
6571 (modify-phases %standard-phases
6572 (add-after 'unpack 'chdir
6573 (lambda _ (chdir "httpmime") #t)))))
6575 `(("java-httpcomponents-httpclient" ,java-httpcomponents-httpclient)
6576 ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
6577 ("java-junit" ,java-junit)
6578 ("java-hamcrest-core" ,java-hamcrest-core)))))
6580 (define-public java-commons-net
6582 (name "java-commons-net")
6586 (uri (string-append "mirror://apache/commons/net/source/"
6587 "commons-net-" version "-src.tar.gz"))
6590 "0n0cmnddk9qdqhjvka8pc6hd9mn2qi3166f1s6xk32h7rfy1adxr"))))
6591 (build-system ant-build-system)
6593 `(;; FIXME: MainTest.java tries to read "examples.properties" (which
6594 ;; should be "resources/examples/examples.properties"), but gets "null"
6597 #:jar-name "commons-net.jar"))
6599 `(("java-junit" ,java-junit)
6600 ("java-hamcrest-core" ,java-hamcrest-core)))
6601 (home-page "https://commons.apache.org/net/")
6602 (synopsis "Client library for many basic Internet protocols")
6603 (description "The Apache Commons Net library implements the client side of
6604 many basic Internet protocols. The purpose of the library is to provide
6605 fundamental protocol access, not higher-level abstractions.")
6606 (license license:asl2.0)))
6608 (define-public java-jsch
6614 (uri (string-append "mirror://sourceforge/jsch/jsch/"
6615 version "/jsch-" version ".zip"))
6618 "1lxyjwvmwa723wcf3bqn816hkvc03vz4xhbsi7bvfhrz2rpgcfq6"))))
6619 (build-system ant-build-system)
6621 `(#:build-target "dist"
6622 #:tests? #f ; no tests included
6624 (modify-phases %standard-phases
6625 (replace 'install (install-jars "dist")))))
6627 `(("unzip" ,unzip)))
6628 (home-page "http://www.jcraft.com/jsch/")
6629 (synopsis "Pure Java implementation of SSH2")
6630 (description "JSch is a pure Java implementation of SSH2. JSch allows you
6631 to connect to an SSH server and use port forwarding, X11 forwarding, file
6632 transfer, etc., and you can integrate its functionality into your own Java
6634 (license license:bsd-3)))
6636 (define-public java-commons-compress
6638 (name "java-commons-compress")
6642 (uri (string-append "mirror://apache/commons/compress/source/"
6643 "commons-compress-" version "-src.tar.gz"))
6646 "1vjqvavrn0babffn1kciz6v52ibwq2vwhzlb95hazis3lgllnxc8"))))
6647 (build-system ant-build-system)
6649 `(#:jar-name "commons-compress.jar"
6651 (modify-phases %standard-phases
6652 (add-after 'unpack 'delete-bad-tests
6654 (with-directory-excursion "src/test/java/org/apache/commons/compress/"
6655 ;; FIXME: These tests really should not fail. Maybe they are
6656 ;; indicative of problems with our Java packaging work.
6658 ;; This test fails with a null pointer exception.
6659 (delete-file "archivers/sevenz/SevenZOutputFileTest.java")
6660 ;; This test fails to open test resources.
6661 (delete-file "archivers/zip/ExplodeSupportTest.java")
6663 ;; FIXME: This test adds a dependency on powermock, which is hard to
6664 ;; package at this point.
6665 ;; https://github.com/powermock/powermock
6666 (delete-file "archivers/sevenz/SevenZNativeHeapTest.java"))
6668 (replace 'install (install-from-pom "pom.xml")))))
6670 `(("java-xz" ,java-xz)
6671 ("apache-commons-parent-pom" ,apache-commons-parent-pom-41)))
6673 `(("java-junit" ,java-junit)
6674 ("java-mockito" ,java-mockito-1)))
6675 (home-page "https://commons.apache.org/proper/commons-compress/")
6676 (synopsis "Java library for working with compressed files")
6677 (description "The Apache Commons Compress library defines an API for
6678 working with compressed files such as ar, cpio, Unix dump, tar, zip, gzip, XZ,
6679 Pack200, bzip2, 7z, arj, lzma, snappy, DEFLATE, lz4 and Z files.")
6680 (license license:asl2.0)))
6682 (define-public java-commons-csv
6684 (name "java-commons-csv")
6688 (uri (string-append "mirror://apache/commons/csv/source/"
6689 "commons-csv-" version "-src.tar.gz"))
6692 "1l89m0fm2s3xx3v3iynvangymfg2vlyngaj6fgsi457nmsw7m7ij"))))
6693 (build-system ant-build-system)
6695 `(#:jar-name "commons-csv.jar"
6696 #:source-dir "src/main/java"
6697 #:tests? #f)); FIXME: requires java-h2
6699 `(("java-hamcrest-core" ,java-hamcrest-core)
6700 ("java-commons-io" ,java-commons-io)
6701 ("java-commons-lang3" ,java-commons-lang3)
6702 ("junit" ,java-junit)))
6703 (home-page "https://commons.apache.org/proper/commons-csv/")
6704 (synopsis "Read and write CSV documents")
6705 (description "Commons CSV reads and writes files in variations of the Comma
6706 Separated Value (CSV) format. The most common CSV formats are predefined in the
6710 @item Microsoft Excel
6711 @item Informix UNLOAD
6712 @item Informix UNLOAD CSV
6718 Custom formats can be created using a fluent style API.")
6719 (license license:asl2.0)))
6721 (define-public java-osgi-annotation
6723 (name "java-osgi-annotation")
6727 (uri (string-append "https://repo1.maven.org/maven2/"
6728 "org/osgi/org.osgi.annotation/" version "/"
6729 "org.osgi.annotation-" version "-sources.jar"))
6732 "1q718mb7gqg726rh6pc2hcisn8v50nv35abbir0jypmffhiii85w"))))
6733 (build-system ant-build-system)
6735 `(#:tests? #f ; no tests
6736 #:jar-name "osgi-annotation.jar"))
6737 (home-page "https://www.osgi.org")
6738 (synopsis "Annotation module of OSGi framework")
6740 "OSGi, for Open Services Gateway initiative framework, is a module system
6741 and service platform for the Java programming language. This package contains
6742 the OSGi annotation module, providing additional services to help dynamic
6744 (license license:asl2.0)))
6746 (define-public java-osgi-core
6748 (name "java-osgi-core")
6752 (uri (string-append "https://repo1.maven.org/maven2/"
6753 "org/osgi/org.osgi.core/" version "/"
6754 "org.osgi.core-" version "-sources.jar"))
6757 "19bpf5jx32jq9789gyhin35q5v7flmw0p9mk7wbgqpxqfmxyiabv"))))
6758 (build-system ant-build-system)
6760 `(#:tests? #f ; no tests
6761 #:jar-name "osgi-core.jar"))
6763 `(("java-osgi-annotation" ,java-osgi-annotation)))
6764 (home-page "https://www.osgi.org")
6765 (synopsis "Core module of OSGi framework")
6767 "OSGi, for Open Services Gateway initiative framework, is a module system
6768 and service platform for the Java programming language. This package contains
6769 the OSGi Core module.")
6770 (license license:asl2.0)))
6772 (define-public java-osgi-service-event
6774 (name "java-osgi-service-event")
6778 (uri (string-append "https://repo1.maven.org/maven2/"
6779 "org/osgi/org.osgi.service.event/"
6780 version "/org.osgi.service.event-"
6781 version "-sources.jar"))
6784 "1nyhlgagwym75bycnjczwbnpymv2iw84zbhvvzk84g9q736i6qxm"))))
6785 (build-system ant-build-system)
6787 `(#:tests? #f ; no tests
6788 #:jar-name "osgi-service-event.jar"))
6790 `(("java-osgi-annotation" ,java-osgi-annotation)
6791 ("java-osgi-core" ,java-osgi-core)))
6792 (home-page "https://www.osgi.org")
6793 (synopsis "OSGi service event module")
6795 "OSGi, for Open Services Gateway initiative framework, is a module system
6796 and service platform for the Java programming language. This package contains
6797 the OSGi @code{org.osgi.service.event} module.")
6798 (license license:asl2.0)))
6800 (define-public java-eclipse-osgi
6802 (name "java-eclipse-osgi")
6806 (uri (string-append "https://repo1.maven.org/maven2/"
6807 "org/eclipse/platform/org.eclipse.osgi/"
6808 version "/org.eclipse.osgi-"
6809 version "-sources.jar"))
6812 "00cqc6lb29n0zv68b4l842vzkwawvbr7gshfdygsk8sicvcq2c7b"))))
6813 (build-system ant-build-system)
6815 `(#:tests? #f ; no tests included
6816 #:jar-name "eclipse-equinox-osgi.jar"))
6818 `(("java-osgi-annotation" ,java-osgi-annotation)))
6819 (home-page "http://www.eclipse.org/equinox/")
6820 (synopsis "Eclipse Equinox OSGi framework")
6821 (description "This package provides an implementation of the OSGi Core
6823 (license license:epl1.0)))
6825 (define-public java-eclipse-equinox-common
6827 (name "java-eclipse-equinox-common")
6828 (version "3.10.200")
6831 (uri (string-append "https://repo1.maven.org/maven2/"
6832 "org/eclipse/platform/org.eclipse.equinox.common/"
6833 version "/org.eclipse.equinox.common-"
6834 version "-sources.jar"))
6837 "1yn8ij6xsljlf35sr2l7wvyvc0ss4n1rv0ry5zkgb49dj4hyrqrj"))))
6838 (build-system ant-build-system)
6840 `(#:tests? #f ; no tests included
6841 #:jar-name "eclipse-equinox-common.jar"))
6843 `(("java-eclipse-osgi" ,java-eclipse-osgi)))
6844 (home-page "http://www.eclipse.org/equinox/")
6845 (synopsis "Common Eclipse runtime")
6846 (description "This package provides the common Eclipse runtime.")
6847 (license license:epl1.0)))
6849 (define-public java-eclipse-core-jobs
6851 (name "java-eclipse-core-jobs")
6855 (uri (string-append "https://repo1.maven.org/maven2/"
6856 "org/eclipse/platform/org.eclipse.core.jobs/"
6857 version "/org.eclipse.core.jobs-"
6858 version "-sources.jar"))
6861 "0395b8lh0km8vhzjnchvs1rii1qz48hyvb2wqfaq4yhklbwihq4b"))))
6862 (build-system ant-build-system)
6864 `(#:tests? #f ; no tests included
6865 #:jar-name "eclipse-core-jobs.jar"))
6867 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6868 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6869 (home-page "http://www.eclipse.org/equinox/")
6870 (synopsis "Eclipse jobs mechanism")
6871 (description "This package provides the Eclipse jobs mechanism.")
6872 (license license:epl1.0)))
6874 (define-public java-eclipse-equinox-registry
6876 (name "java-eclipse-equinox-registry")
6880 (uri (string-append "https://repo1.maven.org/maven2/"
6881 "org/eclipse/platform/org.eclipse.equinox.registry/"
6882 version "/org.eclipse.equinox.registry-"
6883 version "-sources.jar"))
6886 "1i9sgymh2fy5vdgk5y7s3qvrlbgh4l93ddqi3v4zmca7hwrlhf9k"))))
6887 (build-system ant-build-system)
6889 `(#:tests? #f ; no tests included
6890 #:jar-name "eclipse-equinox-registry.jar"))
6892 `(("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
6893 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6894 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6895 (home-page "http://www.eclipse.org/equinox/")
6896 (synopsis "Eclipse extension registry support")
6897 (description "This package provides support for the Eclipse extension
6899 (license license:epl1.0)))
6901 (define-public java-eclipse-equinox-app
6903 (name "java-eclipse-equinox-app")
6907 (uri (string-append "https://repo1.maven.org/maven2/"
6908 "org/eclipse/platform/org.eclipse.equinox.app/"
6909 version "/org.eclipse.equinox.app-"
6910 version "-sources.jar"))
6913 "0nhvbp93y203ar7y59gb0mz3w2d3jlqhr0c9hii9bcfpmr7imdab"))))
6914 (build-system ant-build-system)
6916 `(#:tests? #f ; no tests included
6917 #:jar-name "eclipse-equinox-app.jar"))
6919 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6920 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6921 ("java-eclipse-osgi" ,java-eclipse-osgi)
6922 ("java-osgi-service-event" ,java-osgi-service-event)))
6923 (home-page "http://www.eclipse.org/equinox/")
6924 (synopsis "Equinox application container")
6925 (description "This package provides the Equinox application container for
6927 (license license:epl1.0)))
6929 (define-public java-eclipse-equinox-preferences
6931 (name "java-eclipse-equinox-preferences")
6935 (uri (string-append "https://repo1.maven.org/maven2/"
6936 "org/eclipse/platform/org.eclipse.equinox.preferences/"
6937 version "/org.eclipse.equinox.preferences-"
6938 version "-sources.jar"))
6941 "0k7w6c141sqym4fy3af0qkwpy4pdh2vsjpjba6rp5fxyqa24v0a2"))))
6942 (build-system ant-build-system)
6944 `(#:tests? #f ; no tests included
6945 #:jar-name "eclipse-equinox-preferences.jar"))
6947 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6948 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6949 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6950 (home-page "http://www.eclipse.org/equinox/")
6951 (synopsis "Eclipse preferences mechanism")
6952 (description "This package provides the Eclipse preferences mechanism with
6953 the module @code{org.eclipse.equinox.preferences}.")
6954 (license license:epl1.0)))
6956 (define-public java-eclipse-core-contenttype
6958 (name "java-eclipse-core-contenttype")
6962 (uri (string-append "https://repo1.maven.org/maven2/"
6963 "org/eclipse/platform/org.eclipse.core.contenttype/"
6964 version "/org.eclipse.core.contenttype-"
6965 version "-sources.jar"))
6968 "1wcqcv7ijwv5rh748vz3x9pkmjl9w1r0k0026k56n8yjl4rrmspi"))))
6969 (build-system ant-build-system)
6971 `(#:tests? #f ; no tests included
6972 #:jar-name "eclipse-core-contenttype.jar"))
6974 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6975 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6976 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6977 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6978 (home-page "http://www.eclipse.org/")
6979 (synopsis "Eclipse content mechanism")
6980 (description "This package provides the Eclipse content mechanism in the
6981 @code{org.eclipse.core.contenttype} module.")
6982 (license license:epl1.0)))
6984 (define-public java-eclipse-core-runtime
6986 (name "java-eclipse-core-runtime")
6987 (version "3.15.100")
6990 (uri (string-append "https://repo1.maven.org/maven2/"
6991 "org/eclipse/platform/org.eclipse.core.runtime/"
6992 version "/org.eclipse.core.runtime-"
6993 version "-sources.jar"))
6996 "0l8xayacsbjvz5hypx2fv47vpw2n4dspamcfb3hx30x9hj8vmg7r"))))
6997 (build-system ant-build-system)
6999 `(#:tests? #f ; no tests included
7000 #:jar-name "eclipse-core-runtime.jar"))
7002 `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
7003 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
7004 ("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
7005 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7006 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
7007 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
7008 ("java-eclipse-osgi" ,java-eclipse-osgi)))
7009 (home-page "https://www.eclipse.org/")
7010 (synopsis "Eclipse core runtime")
7011 (description "This package provides the Eclipse core runtime with the
7012 module @code{org.eclipse.core.runtime}.")
7013 (license license:epl1.0)))
7015 (define-public java-eclipse-core-filesystem
7017 (name "java-eclipse-core-filesystem")
7021 (uri (string-append "https://repo1.maven.org/maven2/"
7022 "org/eclipse/platform/org.eclipse.core.filesystem/"
7023 version "/org.eclipse.core.filesystem-"
7024 version "-sources.jar"))
7027 "0km1bhwjim4rfy3pkvjhvy31kgsyf2ncx0mlkmbf5n6g57pphdyj"))))
7028 (build-system ant-build-system)
7030 `(#:tests? #f ; no tests included
7031 #:jar-name "eclipse-core-filesystem.jar"))
7033 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7034 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
7035 ("java-eclipse-osgi" ,java-eclipse-osgi)))
7036 (home-page "https://www.eclipse.org/")
7037 (synopsis "Eclipse core file system")
7038 (description "This package provides the Eclipse core file system with the
7039 module @code{org.eclipse.core.filesystem}.")
7040 (license license:epl1.0)))
7042 (define-public java-eclipse-core-expressions
7044 (name "java-eclipse-core-expressions")
7048 (uri (string-append "https://repo1.maven.org/maven2/"
7049 "org/eclipse/platform/org.eclipse.core.expressions/"
7050 version "/org.eclipse.core.expressions-"
7051 version "-sources.jar"))
7054 "18bw2l875gmygvpagpgk9l24qzbdjia4ag12nw6fi8v8yaq4987f"))))
7055 (build-system ant-build-system)
7057 `(#:tests? #f ; no tests included
7058 #:jar-name "eclipse-core-expressions.jar"))
7060 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7061 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
7062 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
7063 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
7064 ("java-eclipse-osgi" ,java-eclipse-osgi)))
7065 (home-page "https://www.eclipse.org/")
7066 (synopsis "Eclipse core expression language")
7067 (description "This package provides the Eclipse core expression language
7068 with the @code{org.eclipse.core.expressions} module.")
7069 (license license:epl1.0)))
7071 (define-public java-eclipse-core-variables
7073 (name "java-eclipse-core-variables")
7077 (uri (string-append "https://repo1.maven.org/maven2/"
7078 "org/eclipse/platform/org.eclipse.core.variables/"
7079 version "/org.eclipse.core.variables-"
7080 version "-sources.jar"))
7083 "12dirh03zi4n5x5cj07vzrhkmnqy6h9q10h9j605pagmpmifyxmy"))))
7084 (build-system ant-build-system)
7086 `(#:tests? #f ; no tests included
7087 #:jar-name "eclipse-core-variables.jar"))
7089 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7090 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
7091 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
7092 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
7093 ("java-eclipse-osgi" ,java-eclipse-osgi)))
7094 (home-page "https://www.eclipse.org/platform")
7095 (synopsis "Eclipse core variables")
7096 (description "This package provides the Eclipse core variables module
7097 @code{org.eclipse.core.variables}.")
7098 (license license:epl1.0)))
7100 (define-public java-eclipse-ant-core
7102 (name "java-eclipse-ant-core")
7106 (uri (string-append "https://repo1.maven.org/maven2/"
7107 "org/eclipse/platform/org.eclipse.ant.core/"
7108 version "/org.eclipse.ant.core-"
7109 version "-sources.jar"))
7112 "11g3if794qjlk98mz9zch22rr56sd7z63vn4i7k2icr8cq5bfqg7"))))
7113 (build-system ant-build-system)
7115 `(#:tests? #f ; no tests included
7116 #:jar-name "eclipse-ant-core.jar"))
7118 `(("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
7119 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7120 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
7121 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
7122 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
7123 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
7124 ("java-eclipse-core-variables" ,java-eclipse-core-variables)
7125 ("java-eclipse-osgi" ,java-eclipse-osgi)))
7126 (home-page "https://www.eclipse.org/platform")
7127 (synopsis "Ant build tool core libraries")
7128 (description "This package provides the ant build tool core libraries with
7129 the module @code{org.eclipse.ant.core}.")
7130 (license license:epl1.0)))
7132 (define-public java-eclipse-core-resources
7134 (name "java-eclipse-core-resources")
7135 (version "3.13.200")
7138 (uri (string-append "https://repo1.maven.org/maven2/"
7139 "org/eclipse/platform/org.eclipse.core.resources/"
7140 version "/org.eclipse.core.resources-"
7141 version "-sources.jar"))
7144 "1sn3b6ky72hkvxcgf9b2jkpbdh3y8lbhi9xxwv1dsiddpkkq91hs"))))
7145 (build-system ant-build-system)
7147 `(#:tests? #f ; no tests included
7148 #:jar-name "eclipse-core-resources.jar"))
7150 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7151 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
7152 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
7153 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
7154 ("java-eclipse-core-expressions" ,java-eclipse-core-expressions)
7155 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
7156 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
7157 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
7158 ("java-eclipse-ant-core" ,java-eclipse-ant-core)
7159 ("java-eclipse-osgi" ,java-eclipse-osgi)))
7160 (home-page "https://www.eclipse.org/")
7161 (synopsis "Eclipse core resource management")
7162 (description "This package provides the Eclipse core resource management
7163 module @code{org.eclipse.core.resources}.")
7164 (license license:epl1.0)))
7166 (define-public java-eclipse-compare-core
7168 (name "java-eclipse-compare-core")
7172 (uri (string-append "https://repo1.maven.org/maven2/"
7173 "org/eclipse/platform/org.eclipse.compare.core/"
7174 version "/org.eclipse.compare.core-"
7175 version "-sources.jar"))
7178 "10g37r0pbiffyv2wk35c6g5lwzkdipkl0kkjp41v84dln46xm4dg"))))
7179 (build-system ant-build-system)
7181 `(#:tests? #f ; no tests included
7182 #:jar-name "eclipse-compare-core.jar"))
7184 `(("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
7185 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7186 ("java-eclipse-osgi" ,java-eclipse-osgi)
7187 ("java-icu4j" ,java-icu4j)))
7188 (home-page "https://www.eclipse.org/")
7189 (synopsis "Eclipse core compare support")
7190 (description "This package provides the Eclipse core compare support
7191 module @code{org.eclipse.compare.core}.")
7192 (license license:epl1.0)))
7194 (define-public java-eclipse-team-core
7196 (name "java-eclipse-team-core")
7200 (uri (string-append "https://repo1.maven.org/maven2/"
7201 "org/eclipse/platform/org.eclipse.team.core/"
7202 version "/org.eclipse.team.core-"
7203 version "-sources.jar"))
7206 "02j2jzqgb26zx2d5ahxmvijw6j4r0la90zl5c3i65x6z19ciyam7"))))
7207 (build-system ant-build-system)
7209 `(#:tests? #f ; no tests included
7210 #:jar-name "eclipse-team-core.jar"))
7212 `(("java-eclipse-compare-core" ,java-eclipse-compare-core)
7213 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
7214 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
7215 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
7216 ("java-eclipse-core-resources" ,java-eclipse-core-resources)
7217 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
7218 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7219 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
7220 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
7221 ("java-eclipse-osgi" ,java-eclipse-osgi)))
7222 (home-page "https://www.eclipse.org/platform")
7223 (synopsis "Eclipse team support core")
7224 (description "This package provides the Eclipse team support core module
7225 @code{org.eclipse.team.core}.")
7226 (license license:epl1.0)))
7228 (define-public java-eclipse-core-commands
7230 (name "java-eclipse-core-commands")
7234 (uri (string-append "https://repo1.maven.org/maven2/"
7235 "org/eclipse/platform/org.eclipse.core.commands/"
7236 version "/org.eclipse.core.commands-"
7237 version "-sources.jar"))
7240 "0yjn482qndcfrsq3jd6vnhcylp16420f5aqkrwr8spsprjigjcr9"))))
7241 (build-system ant-build-system)
7243 `(#:tests? #f ; no tests included
7244 #:jar-name "eclipse-core-commands.jar"))
7246 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)))
7247 (home-page "https://www.eclipse.org/platform")
7248 (synopsis "Eclipse core commands")
7249 (description "This package provides Eclipse core commands in the module
7250 @code{org.eclipse.core.commands}.")
7251 (license license:epl1.0)))
7253 (define-public java-eclipse-text
7255 (name "java-eclipse-text")
7259 (uri (string-append "https://repo1.maven.org/maven2/"
7260 "org/eclipse/platform/org.eclipse.text/"
7261 version "/org.eclipse.text-"
7262 version "-sources.jar"))
7265 "0scz70vzz5qs5caji9f5q01vkqnvip7dpri1q07l8wbbdcxn4cq1"))))
7266 (build-system ant-build-system)
7268 `(#:tests? #f ; no tests included
7269 #:jar-name "eclipse-text.jar"
7271 (modify-phases %standard-phases
7272 ;; When creating a new category we must make sure that the new list
7273 ;; matches List<Position>. By default it seems to be too generic
7274 ;; (ArrayList<Object>), so we specialize it to ArrayList<Position>.
7275 ;; Without this we get this error:
7277 ;; [javac] .../src/org/eclipse/jface/text/AbstractDocument.java:376:
7278 ;; error: method put in interface Map<K,V> cannot be applied to given types;
7279 ;; [javac] fPositions.put(category, new ArrayList<>());
7281 ;; [javac] required: String,List<Position>
7282 ;; [javac] found: String,ArrayList<Object>
7283 ;; [javac] reason: actual argument ArrayList<Object> cannot be converted
7284 ;; to List<Position> by method invocation conversion
7285 ;; [javac] where K,V are type-variables:
7286 ;; [javac] K extends Object declared in interface Map
7287 ;; [javac] V extends Object declared in interface Map
7289 ;; I don't know if this is a good fix. I suspect it is not, but it
7291 (add-after 'unpack 'fix-compilation-error
7293 (substitute* "src/org/eclipse/jface/text/AbstractDocument.java"
7294 (("Positions.put\\(category, new ArrayList<>\\(\\)\\);")
7295 "Positions.put(category, new ArrayList<Position>());"))
7298 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7299 ("java-eclipse-core-commands" ,java-eclipse-core-commands)
7300 ("java-icu4j" ,java-icu4j)))
7301 (home-page "http://www.eclipse.org/platform")
7302 (synopsis "Eclipse text library")
7303 (description "Platform Text is part of the Platform UI project and
7304 provides the basic building blocks for text and text editors within Eclipse
7305 and contributes the Eclipse default text editor.")
7306 (license license:epl1.0)))
7308 (define-public java-eclipse-jdt-core
7310 (name "java-eclipse-jdt-core")
7314 (uri (string-append "https://repo1.maven.org/maven2/"
7315 "org/eclipse/jdt/org.eclipse.jdt.core/"
7316 version "/org.eclipse.jdt.core-"
7317 version "-sources.jar"))
7320 "1g560yr9v2kzv34gc2m3ifpgnj7krcdd6h4gd4z83pwqacwkfz0k"))))
7321 (build-system ant-build-system)
7323 `(#:tests? #f ; no tests included
7324 #:jar-name "eclipse-jdt-core.jar"
7326 (modify-phases %standard-phases
7327 (add-after 'unpack 'move-sources
7329 (with-directory-excursion "src/jdtCompilerAdaptersrc/"
7330 (for-each (lambda (file)
7331 (install-file file (string-append "../" (dirname file))))
7332 (find-files "." ".*")))
7333 (delete-file-recursively "src/jdtCompilerAdaptersrc/")
7335 (add-before 'build 'copy-resources
7337 (with-directory-excursion "src"
7338 (for-each (lambda (file)
7339 (install-file file (string-append "../build/classes/" (dirname file))))
7340 (find-files "." ".*.(props|properties|rsc)")))
7343 `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
7344 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
7345 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
7346 ("java-eclipse-core-resources" ,java-eclipse-core-resources)
7347 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
7348 ("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
7349 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7350 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
7351 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
7352 ("java-eclipse-osgi" ,java-eclipse-osgi)
7353 ("java-eclipse-text" ,java-eclipse-text)))
7354 (home-page "https://www.eclipse.org/jdt")
7355 (synopsis "Java development tools core libraries")
7356 (description "This package provides the core libraries of the Eclipse Java
7357 development tools.")
7358 (license license:epl1.0)))
7360 (define-public java-eclipse-jdt-compiler-apt
7362 (name "java-eclipse-jdt-compiler-apt")
7366 (uri (string-append "https://repo1.maven.org/maven2/"
7367 "org/eclipse/jdt/org.eclipse.jdt.compiler.apt/"
7368 version "/org.eclipse.jdt.compiler.apt-"
7369 version "-sources.jar"))
7372 "1s285k9p2ixdqrknb40jbbvw682n9a7l5lqpn583a8pvlzg2l6r8"))))
7373 (build-system ant-build-system)
7375 `(#:tests? #f ; no tests included
7376 #:jar-name "eclipse-jdt-compiler-apt.jar"
7379 `(("java-eclipse-jdt-core" ,java-eclipse-jdt-core)))
7380 (home-page "https://www.eclipse.org/jdt/apt/")
7381 (synopsis "Annotation processing tool")
7382 (description "APT stands for Annotation Processing Tool. APT provides a
7383 means for generating files and compiling new Java classes based on annotations
7384 found in your source code.")
7385 (license license:epl2.0)))
7387 (define-public java-javax-mail
7389 (name "java-javax-mail")
7393 (uri (string-append "https://repo1.maven.org/maven2/"
7394 "com/sun/mail/javax.mail/"
7395 version "/javax.mail-"
7396 version "-sources.jar"))
7399 "0sdlfgsc2b5s89xv1261y8i0jijcja019k2x1c8ngfn582w4jly9"))))
7400 (build-system ant-build-system)
7402 `(#:tests? #f ; no tests
7403 #:jar-name "javax-mail.jar"))
7404 (home-page "https://javamail.java.net")
7405 (synopsis "Reference implementation of the JavaMail API")
7407 "This package provides versions of the JavaMail API implementation, IMAP,
7408 SMTP, and POP3 service providers, some examples, and documentation for the
7410 ;; GPLv2 only with "classpath exception".
7411 (license license:gpl2)))
7413 (define-public java-log4j-api
7415 (name "java-log4j-api")
7419 (uri (string-append "mirror://apache/logging/log4j/" version
7420 "/apache-log4j-" version "-src.tar.gz"))
7423 "0j5p9gik0jysh37nlrckqbky12isy95cpwg2gv5fas1rcdqbraxd"))))
7424 (build-system ant-build-system)
7426 `(#:tests? #f ; tests require unpackaged software
7427 #:jar-name "log4j-api.jar"
7429 (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out")
7432 (modify-phases %standard-phases
7433 (add-after 'unpack 'enter-dir
7434 (lambda _ (chdir "log4j-api") #t))
7435 ;; FIXME: The tests require additional software that has not been
7436 ;; packaged yet, such as
7437 ;; * org.apache.maven
7438 ;; * org.apache.felix
7439 (add-after 'enter-dir 'delete-tests
7440 (lambda _ (delete-file-recursively "src/test") #t)))))
7442 `(("java-osgi-core" ,java-osgi-core)
7443 ("java-hamcrest-core" ,java-hamcrest-core)
7444 ("java-junit" ,java-junit)))
7445 (home-page "https://logging.apache.org/log4j/2.x/")
7446 (synopsis "API module of the Log4j logging framework for Java")
7448 "This package provides the API module of the Log4j logging framework for
7450 (license license:asl2.0)))
7452 (define-public java-log4j-core
7454 (inherit java-log4j-api)
7455 (name "java-log4j-core")
7457 `(("java-osgi-core" ,java-osgi-core)
7458 ("java-hamcrest-core" ,java-hamcrest-core)
7459 ("java-log4j-api" ,java-log4j-api)
7460 ("java-mail" ,java-mail)
7461 ("java-jboss-jms-api-spec" ,java-jboss-jms-api-spec)
7462 ("java-lmax-disruptor" ,java-lmax-disruptor)
7463 ("java-kafka" ,java-kafka-clients)
7464 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
7465 ("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
7466 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
7467 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)
7468 ("java-fasterxml-jackson-dataformat-xml" ,java-fasterxml-jackson-dataformat-xml)
7469 ("java-fasterxml-jackson-dataformat-yaml" ,java-fasterxml-jackson-dataformat-yaml)
7470 ("java-commons-compress" ,java-commons-compress)
7471 ("java-commons-csv" ,java-commons-csv)
7472 ("java-jeromq" ,java-jeromq)
7473 ("java-junit" ,java-junit)))
7475 `(("hamcrest" ,java-hamcrest-all)
7476 ("java-commons-io" ,java-commons-io)
7477 ("java-commons-lang3" ,java-commons-lang3)
7478 ("slf4j" ,java-slf4j-api)))
7480 `(#:tests? #f ; tests require more dependencies
7481 #:test-dir "src/test"
7482 #:source-dir "src/main/java"
7483 #:jar-name "log4j-core.jar"
7486 (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out")
7489 (modify-phases %standard-phases
7490 (add-after 'unpack 'enter-dir
7491 (lambda _ (chdir "log4j-core") #t)))))
7492 (synopsis "Core component of the Log4j framework")
7493 (description "This package provides the core component of the Log4j
7494 logging framework for Java.")))
7496 (define-public java-log4j-1.2-api
7498 (inherit java-log4j-api)
7499 (name "java-log4j-1.2-api")
7501 `(#:jar-name "java-log4j-1.2-api.jar"
7502 #:source-dir "log4j-1.2-api/src/main/java"
7504 ;; Tests require maven-model (and other maven subprojects), which is a
7505 ;; cyclic dependency.
7508 `(("log4j-api" ,java-log4j-api)
7509 ("log4j-core" ,java-log4j-core)
7510 ("osgi-core" ,java-osgi-core)
7511 ("eclipse-osgi" ,java-eclipse-osgi)
7512 ("java-lmax-disruptor" ,java-lmax-disruptor)))))
7514 (define-public java-commons-cli
7516 (name "java-commons-cli")
7520 (uri (string-append "mirror://apache/commons/cli/source/"
7521 "commons-cli-" version "-src.tar.gz"))
7524 "05hgi2z01fqz374y719gl1dxzqvzci5af071zm7vxrjg9vczipm1"))))
7525 (build-system ant-build-system)
7528 `(#:jar-name "commons-cli.jar"
7530 (modify-phases %standard-phases
7532 (install-from-pom "pom.xml")))))
7534 `(("java-junit" ,java-junit)
7535 ("java-hamcrest-core" ,java-hamcrest-core)))
7536 (home-page "https://commons.apache.org/cli/")
7537 (synopsis "Command line arguments and options parsing library")
7538 (description "The Apache Commons CLI library provides an API for parsing
7539 command line options passed to programs. It is also able to print help
7540 messages detailing the options available for a command line tool.
7542 Commons CLI supports different types of options:
7545 @item POSIX like options (ie. tar -zxvf foo.tar.gz)
7546 @item GNU like long options (ie. du --human-readable --max-depth=1)
7547 @item Java like properties (ie. java -Djava.awt.headless=true Foo)
7548 @item Short options with value attached (ie. gcc -O2 foo.c)
7549 @item long options with single hyphen (ie. ant -projecthelp)
7552 This is a part of the Apache Commons Project.")
7553 (license license:asl2.0)))
7555 (define-public java-commons-codec
7557 (name "java-commons-codec")
7561 (uri (string-append "mirror://apache/commons/codec/source/"
7562 "commons-codec-" version "-src.tar.gz"))
7565 "11xr0agckkhm91pb5akf2mbk84yd54gyr178wj57gsm97fi7nkh9"))))
7566 (build-system ant-build-system)
7568 `(#:jar-name "java-commons-codec.jar"
7569 #:source-dir "src/main/java"
7570 #:test-dir "src/test"
7571 #:test-exclude (list "**/*AbstractTest.java")
7573 (modify-phases %standard-phases
7574 (add-before 'build 'copy-resources
7576 (copy-recursively "src/main/resources"
7579 (add-before 'check 'copy-test-resources
7581 (copy-recursively "src/test/resources"
7582 "build/test-classes")
7584 (replace 'install (install-from-pom "pom.xml")))))
7586 `(("java-commons-lang3" ,java-commons-lang3)
7587 ("java-junit" ,java-junit)))
7589 `(("apache-commons-parent-pom" ,apache-commons-parent-pom-50)))
7590 (home-page "https://commons.apache.org/codec/")
7591 (synopsis "Common encoders and decoders such as Base64, Hex, Phonetic and URLs")
7592 (description "The codec package contains simple encoder and decoders for
7593 various formats such as Base64 and Hexadecimal. In addition to these widely
7594 used encoders and decoders, the codec package also maintains a collection of
7595 phonetic encoding utilities.
7597 This is a part of the Apache Commons Project.")
7598 (license license:asl2.0)))
7600 (define-public java-commons-daemon
7602 (name "java-commons-daemon")
7606 (uri (string-append "mirror://apache/commons/daemon/source/"
7607 "commons-daemon-" version "-src.tar.gz"))
7610 "141gkhfzv5v3pdhic6y4ardq2dhsa3v36j8wmmhy6f8mac48fp7n"))))
7611 (build-system ant-build-system)
7613 `(#:test-target "test"
7615 (modify-phases %standard-phases
7616 (add-after 'build 'build-javadoc ant-build-javadoc)
7617 (replace 'install (install-jars "dist"))
7618 (add-after 'install 'install-doc (install-javadoc "dist/docs/api")))))
7620 `(("java-junit" ,java-junit)))
7621 (home-page "https://commons.apache.org/daemon/")
7622 (synopsis "Library to launch Java applications as daemons")
7623 (description "The Daemon package from Apache Commons can be used to
7624 implement Java applications which can be launched as daemons. For example the
7625 program will be notified about a shutdown so that it can perform cleanup tasks
7626 before its process of execution is destroyed by the operation system.
7628 This package contains the Java library. You will also need the actual binary
7629 for your architecture which is provided by the jsvc package.
7631 This is a part of the Apache Commons Project.")
7632 (license license:asl2.0)))
7634 (define-public java-javaewah
7636 (name "java-javaewah")
7641 (url "https://github.com/lemire/javaewah/")
7642 (commit (string-append "JavaEWAH-" version))))
7643 (file-name (git-file-name name version))
7646 "1m8qcb1py76v7avbjjrkvyy6fhr5dk2ywy73gbsxqry04gkm2nhw"))))
7647 (build-system ant-build-system)
7648 (arguments `(#:jar-name "javaewah.jar"))
7650 `(("java-junit" ,java-junit)
7651 ("java-hamcrest-core" ,java-hamcrest-core)))
7652 (home-page "https://github.com/lemire/javaewah")
7653 (synopsis "Compressed alternative to the Java @code{BitSet} class")
7654 (description "This is a word-aligned compressed variant of the Java
7655 @code{Bitset} class. It provides both a 64-bit and a 32-bit RLE-like
7656 compression scheme. It can be used to implement bitmap indexes.
7658 The goal of word-aligned compression is not to achieve the best compression,
7659 but rather to improve query processing time. Hence, JavaEWAH tries to save CPU
7660 cycles, maybe at the expense of storage. However, the EWAH scheme is always
7661 more efficient storage-wise than an uncompressed bitmap (as implemented in the
7662 @code{BitSet} class by Sun).")
7663 ;; GPL2.0 derivates are explicitly allowed.
7664 (license license:asl2.0)))
7666 (define-public java-slf4j-api
7668 (name "java-slf4j-api")
7672 (uri (string-append "https://www.slf4j.org/dist/slf4j-"
7676 "13j51sgzmhhdrfa74gkal5zpip7r1440dh7zsi2c8bpb2zs1v8kb"))
7677 (modules '((guix build utils)))
7678 ;; Delete bundled jars.
7681 (for-each delete-file (find-files "." "\\.jar$"))
7683 (build-system ant-build-system)
7685 `(#:jar-name "slf4j-api.jar"
7686 #:source-dir "slf4j-api/src/main"
7687 #:test-dir "slf4j-api/src/test"
7689 (modify-phases %standard-phases
7690 (add-after 'build 'regenerate-jar
7692 ;; pom.xml ignores these files in the jar creation process. If we don't,
7693 ;; we get the error "This code should have never made it into slf4j-api.jar"
7694 (delete-file-recursively "build/classes/org/slf4j/impl")
7695 (invoke "jar" "-cf" "build/jar/slf4j-api.jar" "-C"
7696 "build/classes" ".")))
7697 (add-before 'check 'dont-test-abstract-classes
7699 ;; abstract classes are not meant to be run with junit
7700 (substitute* "build.xml"
7701 (("<include name=\"\\*\\*/\\*Test.java\" />")
7702 (string-append "<include name=\"**/*Test.java\" />"
7703 "<exclude name=\"**/MultithreadedInitializationTest"
7707 (install-from-pom "slf4j-api/pom.xml")))))
7709 `(("java-slf4j-parent" ,java-slf4j-parent)))
7711 `(("java-junit" ,java-junit)
7712 ("java-hamcrest-core" ,java-hamcrest-core)))
7713 (home-page "https://www.slf4j.org/")
7714 (synopsis "Simple logging facade for Java")
7715 (description "The Simple Logging Facade for Java (SLF4J) serves as a
7716 simple facade or abstraction for various logging
7717 frameworks (e.g. @code{java.util.logging}, @code{logback}, @code{log4j})
7718 allowing the end user to plug in the desired logging framework at deployment
7720 (license license:expat)))
7722 (define java-slf4j-parent
7724 (inherit java-slf4j-api)
7725 (name "java-slf4j-parent")
7727 (propagated-inputs '())
7731 (modify-phases %standard-phases
7735 (install-pom-file "pom.xml")))))))
7737 (define-public java-slf4j-simple
7739 (name "java-slf4j-simple")
7741 (source (package-source java-slf4j-api))
7742 (build-system ant-build-system)
7744 `(#:jar-name "slf4j-simple.jar"
7745 #:source-dir "slf4j-simple/src/main"
7746 #:test-dir "slf4j-simple/src/test"
7748 (modify-phases %standard-phases
7749 ;; The tests need some test classes from slf4j-api
7750 (add-before 'check 'build-slf4j-api-test-helpers
7752 ;; Add current dir to CLASSPATH ...
7754 (string-append (getcwd) ":" (getenv "CLASSPATH")))
7755 ;; ... and build test helper classes here:
7758 ,@(find-files "slf4j-api/src/test" ".*\\.java")))))
7760 (install-from-pom "slf4j-simple/pom.xml")))))
7762 `(("java-slf4j-api" ,java-slf4j-api)))
7764 `(("java-junit" ,java-junit)
7765 ("java-hamcrest-core" ,java-hamcrest-core)))
7766 (home-page "https://www.slf4j.org/")
7767 (synopsis "Simple implementation of simple logging facade for Java")
7768 (description "SLF4J binding for the Simple implementation, which outputs
7769 all events to System.err. Only messages of level INFO and higher are
7771 (license license:expat)))
7773 (define-public antlr2
7779 (uri (string-append "https://www.antlr2.org/download/antlr-"
7783 "1ffvcwdw73id0dk6pj2mlxjvbg0662qacx4ylayqcxgg381fnfl5"))
7784 (modules '((guix build utils)))
7787 (delete-file "antlr.jar")
7788 (substitute* "lib/cpp/antlr/CharScanner.hpp"
7792 "#define EOF (-1)\n"
7793 "#include <strings.h>")))
7794 (substitute* "configure"
7797 (build-system gnu-build-system)
7799 `(#:tests? #f ; no test target
7800 #:imported-modules ((guix build ant-build-system)
7801 (guix build syscalls)
7802 ,@%gnu-build-system-modules)
7803 #:modules (((guix build ant-build-system) #:prefix ant:)
7804 (guix build gnu-build-system)
7807 (modify-phases %standard-phases
7808 (add-after 'install 'strip-jar-timestamps
7809 (assoc-ref ant:%standard-phases 'strip-jar-timestamps))
7810 (add-before 'configure 'fix-timestamp
7812 (substitute* "configure"
7813 (("^TIMESTAMP.*") "TIMESTAMP=19700101\n"))
7815 (add-after 'configure 'fix-bin-ls
7817 (substitute* (find-files "." "Makefile")
7823 ("java" ,icedtea "jdk")))
7825 `(("java" ,icedtea)))
7826 (home-page "https://www.antlr2.org")
7827 (synopsis "Framework for constructing recognizers, compilers, and translators")
7828 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
7829 is a language tool that provides a framework for constructing recognizers,
7830 compilers, and translators from grammatical descriptions containing Java, C#,
7831 C++, or Python actions. ANTLR provides excellent support for tree construction,
7832 tree walking, and translation.")
7833 (license license:public-domain)))
7835 (define-public java-stringtemplate-3
7837 (name "java-stringtemplate")
7841 (uri (string-append "https://github.com/antlr/website-st4/raw/"
7842 "gh-pages/download/stringtemplate-"
7846 "086yj68np1vqhkj7483diz3km6s6y4gmwqswa7524a0ca6vxn2is"))))
7847 (build-system ant-build-system)
7849 `(#:jar-name (string-append ,name "-" ,version ".jar")
7851 #:modules ((guix build ant-build-system)
7855 (modify-phases %standard-phases
7856 (add-before 'check 'fix-tests
7858 (substitute* "build.xml"
7859 (("\\$\\{test.home\\}/java")
7860 "${test.home}/org"))
7862 (add-before 'build 'generate-grammar
7864 (with-directory-excursion "src/org/antlr/stringtemplate/language/"
7865 (for-each (lambda (file)
7866 (format #t "~a\n" file)
7867 (invoke "antlr" file))
7868 '("template.g" "angle.bracket.template.g" "action.g"
7869 "eval.g" "group.g" "interface.g")))
7873 ("java-junit" ,java-junit)))
7874 (home-page "https://www.stringtemplate.org")
7875 (synopsis "Template engine to generate formatted text output")
7876 (description "StringTemplate is a java template engine (with ports for C#,
7877 Objective-C, JavaScript, Scala) for generating source code, web pages, emails,
7878 or any other formatted text output. StringTemplate is particularly good at
7879 code generators, multiple site skins, and internationalization / localization.
7880 StringTemplate also powers ANTLR.")
7881 (license license:bsd-3)))
7883 ;; antlr3 is partially written using antlr3 grammar files. It also depends on
7884 ;; ST4 (stringtemplate4), which is also partially written using antlr3 grammar
7885 ;; files and uses antlr3 at runtime. The latest version requires a recent version
7886 ;; of antlr3 at runtime.
7887 ;; Fortunately, ST4 4.0.6 can be built with an older antlr3, and we use antlr3.3.
7888 ;; This version of ST4 is sufficient for the latest antlr3.
7889 ;; We use ST4 4.0.6 to build a boostrap antlr3 (latest version), and build
7890 ;; the latest ST4 with it. Then we build our final antlr3 that will be linked
7891 ;; against the latest ST4.
7892 ;; antlr3.3 still depends on antlr3 to generate some files, so we use an
7893 ;; even older version, antlr3.1, to generate them. Fortunately antlr3.1 uses
7894 ;; only grammar files with the antlr2 syntax.
7895 ;; So we build antlr3.1 -> antlr3.3 -> ST4.0.6 -> antlr3-bootstrap -> ST4 -> antlr3.
7897 (define-public java-stringtemplate
7898 (package (inherit java-stringtemplate-3)
7899 (name "java-stringtemplate")
7903 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/"
7905 (file-name (string-append name "-" version ".tar.gz"))
7908 "1pri8hqa95rfdkjy55icl5q1m09zwp5k67ib14abas39s4v3w087"))))
7909 (build-system ant-build-system)
7911 `(#:jar-name (string-append ,name "-" ,version ".jar")
7912 #:tests? #f ; FIXME: tests fail for unknown reasons
7914 #:modules ((guix build ant-build-system)
7918 (modify-phases %standard-phases
7919 (add-before 'check 'fix-test-target
7921 (substitute* "build.xml"
7922 (("\\$\\{test.home\\}/java") "${test.home}/")
7923 (("\\*Test.java") "Test*.java"))
7925 (add-before 'build 'generate-grammar
7927 (with-directory-excursion "src/org/stringtemplate/v4/compiler/"
7928 (for-each (lambda (file)
7929 (format #t "~a\n" file)
7930 (invoke "antlr3" file))
7931 '("STParser.g" "Group.g" "CodeGenerator.g")))
7934 `(("antlr3" ,antlr3-bootstrap)
7936 ("java-stringtemplate" ,java-stringtemplate-3)
7937 ("java-junit" ,java-junit)))))
7939 (define java-stringtemplate-4.0.6
7940 (package (inherit java-stringtemplate)
7941 (name "java-stringtemplate")
7945 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/ST-"
7947 (file-name (string-append name "-" version ".tar.gz"))
7950 "0hjmh1ahdsh3w825i67mli9l4nncc4l6hdbf9ma91jvlj590sljp"))))
7952 `(("antlr3" ,antlr3-3.3)
7954 ("java-stringtemplate" ,java-stringtemplate-3)))))
7956 (define-public antlr3
7963 (url "https://github.com/antlr/antlr3")
7965 (file-name (git-file-name name version))
7968 "0cafavrjmzqhklghrk8c2jqxkdwxgzskm20pbrfd3r41cn00dpnf"))))
7969 (build-system ant-build-system)
7971 `(#:jar-name (string-append ,name "-" ,version ".jar")
7972 #:source-dir "tool/src/main/java:runtime/Java/src/main/java:tool/src/main/antlr3"
7975 (modify-phases %standard-phases
7976 (add-after 'install 'bin-install
7977 (lambda* (#:key inputs outputs #:allow-other-keys)
7978 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
7979 (bin (string-append (assoc-ref outputs "out") "/bin")))
7981 (with-output-to-file (string-append bin "/antlr3")
7984 (string-append "#!" (which "sh") "\n"
7985 "java -cp " jar "/" ,name "-" ,version ".jar:"
7987 (find-files (assoc-ref inputs "stringtemplate")
7991 (find-files (assoc-ref inputs "stringtemplate4")
7995 (find-files (string-append
7996 (assoc-ref inputs "antlr")
7999 " org.antlr.Tool $*"))))
8000 (chmod (string-append bin "/antlr3") #o755))
8002 (add-before 'build 'generate-grammar
8004 (chdir "tool/src/main/antlr3/org/antlr/grammar/v3/")
8005 (for-each (lambda (file)
8008 (invoke "antlr3" file))
8009 '("ANTLR.g" "ANTLRTreePrinter.g" "ActionAnalysis.g"
8010 "AssignTokenTypesWalker.g"
8011 "ActionTranslator.g" "TreeToNFAConverter.g"
8012 "ANTLRv3.g" "ANTLRv3Tree.g" "LeftRecursiveRuleWalker.g"
8013 "CodeGenTreeWalker.g" "DefineGrammarItemsWalker.g"))
8014 (substitute* "ANTLRParser.java"
8015 (("public Object getTree") "public GrammarAST getTree"))
8016 (substitute* "ANTLRv3Parser.java"
8017 (("public Object getTree") "public CommonTree getTree"))
8018 (chdir "../../../../../java")
8019 (substitute* "org/antlr/tool/LeftRecursiveRuleAnalyzer.java"
8020 (("import org.antlr.grammar.v3.\\*;") "import org.antlr.grammar.v3.*;
8021 import org.antlr.grammar.v3.ANTLRTreePrinter;"))
8022 (substitute* "org/antlr/tool/ErrorManager.java"
8023 (("case NO_SUCH_ATTRIBUTE_PASS_THROUGH:") ""))
8024 (chdir "../../../..")
8026 (add-before 'build 'fix-build-xml
8028 (substitute* "build.xml"
8029 (("target name=\"compile\">")
8030 "target name=\"compile\">
8031 <copy todir=\"${classes.dir}\">
8032 <fileset dir=\"tool/src/main/resources\">
8033 <include name=\"**/*.stg\"/>
8034 <include name=\"**/*.st\"/>
8035 <include name=\"**/*.sti\"/>
8036 <include name=\"**/STLexer.tokens\"/>
8042 ("antlr3" ,antlr3-bootstrap)))
8044 `(("junit" ,java-junit)
8045 ("stringtemplate" ,java-stringtemplate-3)
8046 ("stringtemplate4" ,java-stringtemplate)))
8048 `(("stringtemplate" ,java-stringtemplate-3)
8050 ("stringtemplate4" ,java-stringtemplate-4.0.6)))
8051 (home-page "https://www.antlr3.org")
8052 (synopsis "Framework for constructing recognizers, compilers, and translators")
8053 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
8054 is a language tool that provides a framework for constructing recognizers,
8055 compilers, and translators from grammatical descriptions containing Java, C#,
8056 C++, or Python actions. ANTLR provides excellent support for tree construction,
8057 tree walking, and translation.")
8058 (license license:bsd-3)))
8060 (define antlr3-bootstrap
8063 (name "antlr3-bootstrap")
8066 ("antlr3" ,antlr3-3.3)))
8068 `(("junit" ,java-junit)))))
8070 (define-public antlr3-3.3
8077 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
8078 "gh-pages/download/antlr-"
8082 "0qgg5vgsm4l1d6dj9pfbaa25dpv2ry2gny8ajy4vvgvfklw97b3m"))
8084 (search-patches "antlr3-3_3-fix-java8-compilation.patch"))))
8086 `(#:jar-name (string-append ,name "-" ,version ".jar")
8087 #:source-dir (string-join '("tool/src/main/java"
8088 "runtime/Java/src/main/java"
8089 "tool/src/main/antlr2"
8090 "tool/src/main/antlr3")
8092 #:tests? #f ; FIXME: tests seem to require maven plugin
8093 #:modules ((guix build ant-build-system)
8097 (modify-phases %standard-phases
8098 (add-after 'install 'bin-install
8099 (lambda* (#:key inputs outputs #:allow-other-keys)
8100 (let* ((out (assoc-ref outputs "out"))
8101 (jar (string-append out "/share/java"))
8102 (bin (string-append out "/bin")))
8104 (with-output-to-file (string-append bin "/antlr3")
8108 "#!" (which "sh") "\n"
8109 "java -cp " jar "/antlr3-3.3.jar:"
8111 (append (find-files (assoc-ref inputs "java-stringtemplate")
8113 (find-files (string-append (assoc-ref inputs "antlr")
8117 " org.antlr.Tool $*"))))
8118 (chmod (string-append bin "/antlr3") #o755)
8120 (add-before 'build 'generate-grammar
8122 (substitute* "tool/src/main/java/org/antlr/tool/Grammar.java"
8123 (("import org.antlr.grammar.v2.\\*;")
8124 "import org.antlr.grammar.v2.*;\n
8125 import org.antlr.grammar.v2.TreeToNFAConverter;\n
8126 import org.antlr.grammar.v2.DefineGrammarItemsWalker;\n
8127 import org.antlr.grammar.v2.ANTLRTreePrinter;"))
8128 (with-directory-excursion "tool/src/main/antlr2/org/antlr/grammar/v2/"
8129 (for-each (lambda (file)
8130 (format #t "~a\n" file)
8131 (invoke "antlr" file))
8132 '("antlr.g" "antlr.print.g" "assign.types.g"
8133 "buildnfa.g" "codegen.g" "define.g")))
8134 (with-directory-excursion "tool/src/main/antlr3/org/antlr/grammar/v3/"
8135 (for-each (lambda (file)
8136 (format #t "~a\n" file)
8137 (invoke "antlr3" file))
8138 '("ActionAnalysis.g" "ActionTranslator.g" "ANTLRv3.g"
8141 (add-before 'build 'fix-build-xml
8143 (substitute* "build.xml"
8144 (("target name=\"compile\">")
8145 "target name=\"compile\">
8146 <copy todir=\"${classes.dir}\">
8147 <fileset dir=\"tool/src/main/resources\">
8148 <include name=\"**/*.stg\"/>
8149 <include name=\"**/*.st\"/>
8150 <include name=\"**/*.sti\"/>
8151 <include name=\"**/STLexer.tokens\"/>
8157 ("antlr3" ,antlr3-3.1)))
8159 `(("junit" ,java-junit)))
8161 `(("java-stringtemplate" ,java-stringtemplate-3)
8162 ("antlr" ,antlr2)))))
8164 (define-public antlr3-3.1
8170 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
8171 "gh-pages/download/antlr-"
8175 "0sfimc9cpbgrihz4giyygc8afgpma2c93yqpwb951giriri6x66z"))
8177 (search-patches "antlr3-3_1-fix-java8-compilation.patch"))))
8179 `(#:jar-name (string-append "antlr3-" ,version ".jar")
8180 #:source-dir "src:runtime/Java/src"
8183 (modify-phases %standard-phases
8184 (add-after 'install 'bin-install
8185 (lambda* (#:key inputs outputs #:allow-other-keys)
8186 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
8187 (bin (string-append (assoc-ref outputs "out") "/bin")))
8189 (with-output-to-file (string-append bin "/antlr3")
8192 (string-append "#!" (which "sh") "\n"
8193 "java -cp " jar "/antlr3-3.1.jar:"
8195 (find-files (assoc-ref inputs "stringtemplate")
8199 (find-files (string-append
8200 (assoc-ref inputs "antlr")
8203 " org.antlr.Tool $*"))))
8204 (chmod (string-append bin "/antlr3") #o755))
8206 (add-before 'build 'generate-grammar
8208 (let ((dir "src/org/antlr/tool/"))
8209 (for-each (lambda (file)
8212 (invoke "antlr" "-o" dir (string-append dir file)))
8213 '("antlr.g" "antlr.print.g" "assign.types.g"
8214 "buildnfa.g" "define.g")))
8215 (format #t "codegen.g\n")
8216 (invoke "antlr" "-o" "src/org/antlr/codegen"
8217 "src/org/antlr/codegen/codegen.g")
8219 (add-before 'build 'fix-build-xml
8221 (substitute* "build.xml"
8222 (("target name=\"compile\">")
8223 "target name=\"compile\">
8224 <copy todir=\"${classes.dir}\">
8225 <fileset dir=\"src\">
8226 <include name=\"**/*.stg\"/>
8227 <include name=\"**/*.st\"/>
8228 <include name=\"**/*.sti\"/>
8229 <include name=\"**/STLexer.tokens\"/>
8234 `(("antlr" ,antlr2)))
8236 `(("junit" ,java-junit)))
8238 `(("stringtemplate" ,java-stringtemplate-3)))))
8240 (define-public java-treelayout
8242 (name "java-treelayout")
8247 (url "https://github.com/abego/treelayout")
8248 (commit (string-append "v" version))))
8249 (file-name (git-file-name name version))
8252 "18my8ql9b1y0n0zrvkih7xfhf3dpgfhyfifvkcfhmwcvw3divxak"))))
8253 (build-system ant-build-system)
8255 `(#:jar-name (string-append ,name "-" ,version ".jar")
8256 #:source-dir "org.abego.treelayout/src/main/java"
8257 #:test-dir "org.abego.treelayout/src/test"))
8259 `(("java-junit" ,java-junit)))
8261 `(("java-hamcrest-core" ,java-hamcrest-core)))
8262 (home-page "http://treelayout.sourceforge.net")
8263 (synopsis "Tree Layout Algorithm in Java")
8264 (description "TreeLayout creates tree layouts for arbitrary trees. It is
8265 not restricted to a specific output or format, but can be used for any kind of
8266 two dimensional diagram. Examples are Swing based components, SVG files, etc.
8267 This is possible because TreeLayout separates the layout of a tree from the
8269 (license license:bsd-3)))
8271 (define-public java-antlr4-runtime
8273 (name "java-antlr4-runtime")
8278 (url "https://github.com/antlr/antlr4")
8280 (file-name (git-file-name name version))
8283 "1qal3add26qxskm85nk7r758arladn5rcyjinmhlhznmpbbv9j8m"))
8285 (search-patches "java-antlr4-Add-standalone-generator.patch"
8286 "java-antlr4-fix-code-too-large.java"))))
8287 (build-system ant-build-system)
8289 `(#:jar-name "java-antlr4-runtime.jar"
8290 #:source-dir "runtime/Java/src/org"
8291 #:tests? #f; tests depend on java-antlr4 itself
8293 (modify-phases %standard-phases
8294 (add-before 'build 'copy-resources
8296 (copy-recursively "runtime/Java/src/main/dot"
8299 (home-page "https://antlr.org")
8300 (synopsis "ANTLR runtime library")
8301 (description "This package contains the runtime library used with generated
8303 (license license:bsd-3)))
8305 (define-public antlr4
8307 (inherit java-antlr4-runtime)
8310 `(#:jar-name "antlr4.jar"
8311 #:source-dir "tool/src"
8312 #:test-dir "tool-testsuite/test:runtime-testsuite/test:runtime-testsuite/annotations/src"
8313 #:test-include (list "**/Test*.java")
8314 #:test-exclude (list
8315 ;; no runnable method
8316 "**/TestOutputReading.java"
8318 "**/TestParserErrors.java"
8319 "**/TestSemPredEvalParser.java"
8321 "**/TestListeners.java"
8322 "**/TestParseTrees.java"
8323 "**/TestParserExec.java"
8324 "**/TestLexerErrors.java"
8325 "**/TestPerformance.java"
8326 "**/TestCompositeParsers.java"
8327 "**/TestLexerExec.java"
8328 "**/TestSemPredEvalLexer.java"
8329 "**/TestLeftRecursion.java"
8330 "**/TestFullContextParsing.java"
8331 "**/TestCompositeLexers.java"
8332 ;; Null pointer exception
8333 "**/TestCompositeGrammars.java"
8334 ;; Wrong assumption on emoji
8335 "**/TestUnicodeData.java")
8337 (modify-phases %standard-phases
8338 (add-before 'build 'fix-build.xml
8340 ;; tests are not in a java subdirectory
8341 (substitute* "build.xml"
8342 (("\\$\\{test.home\\}/java") "${test.home}"))
8344 ;; tests require to have a working antlr4 binary
8346 (add-after 'bin-install 'check
8348 (invoke "ant" "compile-tests")
8349 (invoke "ant" "check" "-Dtest.home=runtime-testsuite/annotations/src")
8350 (invoke "ant" "check" "-Dtest.home=runtime-testsuite/test")
8351 (invoke "ant" "check" "-Dtest.home=tool-testsuite/test")
8353 (add-before 'check 'remove-unrelated-languages
8355 ;; There are tests for other languages that ANTLR can generate, but
8356 ;; we don't have the infrastructure for that yet. Let's test Java
8360 (delete-file-recursively
8361 (string-append "runtime-testsuite/test/org/antlr/v4/test/runtime/"
8363 '("cpp" "csharp" "go" "javascript" "php" "python" "python2"
8366 (add-before 'check 'generate-test-parsers
8367 (lambda* (#:key outputs #:allow-other-keys)
8368 (define (run-antlr dir filename package)
8369 (invoke "antlr4" "-lib" dir "-visitor" "-no-listener"
8370 "-package" package (string-append dir "/" filename)
8372 (setenv "PATH" (string-append (getenv "PATH") ":"
8373 (assoc-ref outputs "out") "/bin"))
8374 (run-antlr "runtime-testsuite/test/org/antlr/v4/test/runtime/java/api"
8375 "Java.g4" "org.antlr.v4.test.runtime.java.api")
8376 (run-antlr "runtime-testsuite/test/org/antlr/v4/test/runtime/java/api"
8377 "VisitorBasic.g4" "org.antlr.v4.test.runtime.java.api")
8378 (run-antlr "runtime-testsuite/test/org/antlr/v4/test/runtime/java/api"
8379 "VisitorCalc.g4" "org.antlr.v4.test.runtime.java.api")
8381 (add-before 'check 'remove-graphemes
8383 ;; When running antlr on grahemes.g4, we get a runtime exception:
8384 ;; set is empty. So delete the file that depends on it.
8386 "runtime-testsuite/test/org/antlr/v4/test/runtime/java/api/perf/TimeLexerSpeed.java")
8388 (add-after 'install 'bin-install
8389 (lambda* (#:key inputs outputs #:allow-other-keys)
8390 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
8391 (bin (string-append (assoc-ref outputs "out") "/bin")))
8393 (with-output-to-file (string-append bin "/antlr4")
8396 (string-append "#!" (which "sh") "\n"
8397 "java -cp " jar "/antlr4.jar:"
8403 (find-files (assoc-ref inputs input)
8405 '("antlr3" "java-stringtemplate"
8406 "java-antlr4-runtime" "java-treelayout"
8407 "java-jsonp-api" "java-icu4j")))
8409 " org.antlr.v4.Tool $*"))))
8410 (chmod (string-append bin "/antlr4") #o755)
8412 (add-before 'build 'copy-resources
8414 (copy-recursively "tool/resources/" "build/classes")
8416 (add-before 'build 'generate-unicode
8418 ;; First: build the generator
8419 (invoke "javac" "-cp" (getenv "CLASSPATH")
8420 "tool/src/org/antlr/v4/unicode/UnicodeRenderer.java"
8421 "tool/src/org/antlr/v4/unicode/UnicodeDataTemplateController.java")
8423 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
8424 ":tool/src:runtime/Java")
8425 "org.antlr.v4.unicode.UnicodeRenderer"
8426 "tool/resources/org/antlr/v4/tool/templates"
8428 "tool/src/org/antlr/v4/unicode/UnicodeData.java")
8429 ;; It seems there is a bug with our ST4
8430 (substitute* "tool/src/org/antlr/v4/unicode/UnicodeData.java"
8432 ;; Remove the additional file
8433 (delete-file "tool/src/org/antlr/v4/unicode/UnicodeRenderer.java")
8435 (add-before 'build 'generate-grammar
8436 (lambda* (#:key inputs #:allow-other-keys)
8437 (with-directory-excursion "tool/src/org/antlr/v4/parse"
8438 (for-each (lambda (file)
8441 (invoke "antlr3" file))
8442 '("ANTLRLexer.g" "ANTLRParser.g" "BlockSetTransformer.g"
8443 "GrammarTreeVisitor.g" "ATNBuilder.g"
8444 "ActionSplitter.g" "LeftRecursiveRuleWalker.g")))
8445 (with-directory-excursion "tool/src/org/antlr/v4/codegen"
8446 (install-file "../parse/ANTLRParser.tokens" ".")
8447 (display "SourceGenTriggers.g\n")
8448 (invoke "antlr3" "SourceGenTriggers.g"))
8451 `(("antlr3" ,antlr3)
8452 ("java-antlr4-runtime" ,java-antlr4-runtime)
8453 ("java-icu4j" ,java-icu4j)
8454 ("java-jsonp-api" ,java-jsonp-api)
8455 ("java-stringtemplate" ,java-stringtemplate)
8456 ("java-treelayout" ,java-treelayout)))
8458 `(("java-junit" ,java-junit)))
8459 (synopsis "Parser and lexer generator in Java")
8460 (description "ANTLR (ANother Tool for Language Recognition) is a powerful
8461 parser generator for reading, processing, executing, or translating structured
8462 text or binary files. It's widely used to build languages, tools, and
8463 frameworks. From a grammar, ANTLR generates a parser that can build and walk
8466 (define-public java-antlr4-runtime-4.1
8468 (inherit java-antlr4-runtime)
8473 (url "https://github.com/antlr/antlr4")
8475 (file-name (git-file-name "antlr4" version))
8478 "1i8hmx5an58cjyvhji0xgpvd6lq00z1k1mjys025q2wqc25wv4c1"))))
8480 (substitute-keyword-arguments (package-arguments java-antlr4-runtime)
8482 `(modify-phases ,phases
8483 (add-before 'configure 'chmod
8485 (chmod "build.xml" #o644)
8488 `(("java-treelayout" ,java-treelayout)))))
8490 (define-public antlr4-4.1
8493 (version (package-version java-antlr4-runtime-4.1))
8494 (source (package-source java-antlr4-runtime-4.1))
8496 (substitute-keyword-arguments (package-arguments antlr4)
8499 ((#:test-exclude excludes)
8500 `(list "**/TestParseErrors.java"
8501 "**/TestTopologicalSort.java"
8504 `(modify-phases ,phases
8505 (delete 'generate-unicode)
8508 (invoke "ant" "check")
8510 (add-before 'configure 'chmod
8512 (chmod "build.xml" #o644)
8514 (delete 'remove-graphemes)
8515 (delete 'remove-unrelated-languages)
8516 (delete 'generate-test-parsers)))))
8519 "java-antlr4-runtime" (list java-antlr4-runtime-4.1)
8520 (package-inputs antlr4)))))
8522 (define-public java-tunnelvisionlabs-antlr4-runtime-annotations
8524 (inherit java-antlr4-runtime)
8525 (name "java-tunnelvisionlabs-antlr4-runtime-annotations")
8530 (url "https://github.com/tunnelvisionlabs/antlr4")
8531 (commit (string-append version "-opt"))))
8532 (file-name (git-file-name "java-tunnelvisionlabs-antlr4" version))
8535 "1mf2lvvsszpialsk23ma83pwp50nd32lrbjpa847zlm5gmranbr8"))
8537 (search-patches "java-antlr4-Add-standalone-generator.patch"
8538 "java-tunnelvisionlabs-antlr-code-too-large.patch"))))
8540 `(#:jar-name "java-antlr4-runtime-annotations.jar"
8541 #:source-dir "runtime/JavaAnnotations/src"
8542 #:tests? #f; no tests
8544 (modify-phases %standard-phases
8545 (add-after 'build 'copy-resources
8547 (copy-recursively "runtime/JavaAnnotations/resources"
8550 (add-after 'copy-resources 'rebuild-jar
8552 (invoke "ant" "jar")
8556 (synopsis "Annotations for ANTLR's runtime library")
8557 (description "This package contains annotations used during the build of
8558 the runtime library of ANTLR.")))
8560 ;; the runtime of this library requires a lexer that is generated by antlr4.
8561 ;; However, antlr4 itself requires this library at build and run-time. We
8562 ;; use antlr4@4.1, the closest version of antlr that doesn't need this
8563 ;; bootstrap process, to generate the lexer. The generated lexer is built
8564 ;; for the 4.1 runtime, which is slightly different from this runtime.
8565 ;; So, we build the runtime with antlr 4.1, with a broken xml lexer, that we
8566 ;; use to build antlr4. We then re-use this antlr4 to build the runtime, and
8567 ;; the proper, working, runtime to build antlr4 again.
8568 (define java-tunnelvisionlabs-antlr4-runtime-bootstrap
8570 (inherit java-antlr4-runtime)
8571 (name "java-tunnelvisionlabs-antlr4-runtime")
8572 (version (package-version java-tunnelvisionlabs-antlr4-runtime-annotations))
8573 (source (package-source java-tunnelvisionlabs-antlr4-runtime-annotations))
8575 `(#:jar-name "java-antlr4-runtime.jar"
8576 #:source-dir "runtime/Java/src"
8577 #:tests? #f; tests require antlr4, but antlr4 depends on this package
8579 (modify-phases %standard-phases
8580 (add-before 'build 'generate-xpath-lexer
8582 (invoke "antlr4" "-lib" "runtime/Java/src/org/antlr/v4/runtime/tree/xpath"
8583 "-visitor" "-no-listener"
8584 "-package" "org.antlr.v4.runtime.tree.xpath"
8585 "runtime/Java/src/org/antlr/v4/runtime/tree/xpath/XPathLexer.g4")
8586 ;; Generated code is for an incompatible version of the runtime
8587 (substitute* "runtime/Java/src/org/antlr/v4/runtime/tree/xpath/XPathLexer.java"
8588 (("LexerATNSimulator\\(this,_ATN,_decisionToDFA,_sharedContextCache\\)")
8589 "LexerATNSimulator(this,_ATN)"))
8591 (add-before 'build 'copy-resources
8593 (copy-recursively "runtime/Java/src/main/dot"
8597 `(("antlr4" ,antlr4-4.1)
8598 ("java-tunnelvisionlabs-antlr4-runtime-annotations"
8599 ,java-tunnelvisionlabs-antlr4-runtime-annotations)))))
8601 (define java-tunnelvisionlabs-antlr4-bootstrap
8604 (name "java-tunnelvisionlabs-antlr4")
8605 (version (package-version java-tunnelvisionlabs-antlr4-runtime-annotations))
8606 (source (package-source java-tunnelvisionlabs-antlr4-runtime-annotations))
8608 (substitute-keyword-arguments (package-arguments antlr4)
8610 "tool/test:runtime-testsuite/src")
8612 `(modify-phases ,phases
8613 (delete 'remove-unrelated-languages)
8614 (delete 'remove-graphemes)
8615 (delete 'generate-test-parsers)
8619 `(("antlr3" ,antlr3)
8620 ("java-antlr4-runtime" ,java-tunnelvisionlabs-antlr4-runtime-bootstrap)
8621 ("java-tunnelvisionlabs-antlr4-runtime-annotations"
8622 ,java-tunnelvisionlabs-antlr4-runtime-annotations)
8623 ("java-icu4j" ,java-icu4j)
8624 ("java-jsonp-api" ,java-jsonp-api)
8625 ("java-stringtemplate" ,java-stringtemplate)
8626 ("java-treelayout" ,java-treelayout)))))
8628 (define-public java-tunnelvisionlabs-antlr4-runtime
8630 (inherit java-tunnelvisionlabs-antlr4-runtime-bootstrap)
8633 "antlr4" (list java-tunnelvisionlabs-antlr4-bootstrap)
8634 (package-native-inputs java-tunnelvisionlabs-antlr4-runtime-bootstrap)))))
8636 (define-public java-tunnelvisionlabs-antlr4
8638 (inherit java-tunnelvisionlabs-antlr4-bootstrap)
8641 "java-antlr4-runtime" (list java-tunnelvisionlabs-antlr4-runtime)
8642 (package-inputs java-tunnelvisionlabs-antlr4-bootstrap)))))
8644 (define-public java-commons-cli-1.2
8645 ;; This is a bootstrap dependency for Maven2.
8647 (inherit java-commons-cli)
8651 (uri (string-append "mirror://apache/commons/cli/source/"
8652 "commons-cli-" version "-src.tar.gz"))
8655 "0rvfgzgv2pc1m091dfj3ih9ddsjjppr1f1wf0qmc3bk6b1kwv2dm"))))
8657 `(#:jar-name "commons-cli.jar"
8659 (modify-phases %standard-phases
8660 (add-before 'check 'fix-build-xml
8661 (lambda* (#:key inputs #:allow-other-keys)
8662 (substitute* "build.xml"
8663 (("dir=\"\\$\\{test.home\\}/java\"")
8664 "dir=\"${test.home}\""))
8667 `(("java-junit" ,java-junit)))))
8669 (define-public java-microemulator-cldc
8671 (name "java-microemulator-cldc")
8675 (uri (string-append "https://github.com/barteo/microemu/archive/"
8677 (string-map (lambda (c) (if (char=? c #\.) #\_ c))
8680 (file-name (string-append name "-" version ".tar.gz"))
8683 "1x1apmz38gkppxnwnygwmi12j54v4p258v8ddzn6dldkk7vak1ll"))))
8684 (build-system ant-build-system)
8686 `(#:jar-name "microemulator-cldc.jar"
8687 #:source-dir "microemu-cldc/src/main/java"
8688 #:tests? #f)); Requires even older software
8689 (home-page "https://github.com/barteo/microemu")
8690 (synopsis "J2ME CLDC emulator")
8691 (description "Microemulator is a Java 2 Micro Edition (J2ME) CLDC/MIDP
8692 Emulator. It demonstrates MIDlet based applications in web browser
8693 applet and can be run as a standalone java application.")
8694 (license (list license:asl2.0
8696 license:lgpl2.1+))))
8698 (define-public java-datanucleus-javax-persistence
8700 (name "java-datanucleus-javax-persistence")
8704 (uri (string-append "https://github.com/datanucleus/"
8705 "javax.persistence/archive/javax.persistence-"
8706 version "-release.tar.gz"))
8709 "11jx0fjwgc2hhbqqgdd6m1pf2fplf9vslppygax0y1z5csnqjhpx"))))
8710 (build-system ant-build-system)
8712 `(#:jar-name "java-datanucleus-javax-persistence.jar"
8714 #:source-dir "src/main/java"
8715 #:tests? #f)); no tests
8716 (home-page "https://github.com/datanucleus/javax.persistence")
8717 (synopsis "JPA API")
8718 (description "This package contains a clean definition of JPA API intended
8719 for use with DataNucleus JPA since the JCP haven't provided an official JPA API
8720 jar. See @url{http://java.net/projects/jpa-spec/downloads} for the specification
8721 used to generate this API.")
8722 (license (list license:edl1.0 license:epl1.0))))
8724 (define-public java-osgi-cmpn
8726 (name "java-osgi-cmpn")
8730 (uri (string-append "https://repo1.maven.org/maven2/"
8731 "org/osgi/osgi.cmpn/" version "/osgi.cmpn-"
8732 version "-sources.jar"))
8735 "1lmb6xyrmkqdhv1kayf0514rlwq6ypvs4m44ibrck3snp8241wys"))))
8736 (build-system ant-build-system)
8738 `(#:jar-name "osgi-cmpn.jar"
8739 #:tests? #f)); no tests
8741 `(("annotation" ,java-osgi-annotation)
8742 ("core" ,java-osgi-core)
8743 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
8744 ("microemulator" ,java-microemulator-cldc)
8745 ("servlet" ,java-classpathx-servletapi)))
8746 (home-page "https://www.osgi.org")
8747 (synopsis "Compendium specification module of OSGi framework")
8749 "OSGi, for Open Services Gateway initiative framework, is a module system
8750 and service platform for the Java programming language. This package contains
8751 the compendium specification module, providing interfaces and classes for use
8752 in compiling bundles.")
8753 (license license:asl2.0)))
8755 (define-public java-osgi-service-component-annotations
8757 (name "java-osgi-service-component-annotations")
8761 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8762 "org.osgi.service.component.annotations/"
8763 version "/org.osgi.service.component.annotations-"
8764 version "-sources.jar"))
8767 "15rq9cmp4fpn74q44m4j35qsqmjf5lx3hcrk6pzvbhc08igic2f0"))))
8768 (build-system ant-build-system)
8770 `(#:jar-name "osgi-service-component-annotations.jar"
8771 #:tests? #f)); no tests
8773 `(("annotation" ,java-osgi-annotation)))
8774 (home-page "https://www.osgi.org")
8775 (synopsis "Support annotations for osgi-service-component")
8777 "OSGi, for Open Services Gateway initiative framework, is a module system
8778 and service platform for the Java programming language. This package contains
8779 the support annotations for osgi-service-component.")
8780 (license license:asl2.0)))
8782 (define-public java-osgi-dto
8784 (name "java-osgi-dto")
8788 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8789 "org.osgi.dto/" version "/org.osgi.dto-"
8790 version "-sources.jar"))
8793 "0f4bqjzadn0hwk6sd3h5gvbyfp3yci1s6r0v770cc15p0pg627yr"))))
8794 (build-system ant-build-system)
8796 `(#:jar-name "osgi-dto.jar"
8797 #:tests? #f)); no tests
8799 `(("annotation" ,java-osgi-annotation)))
8800 (home-page "https://www.osgi.org")
8801 (synopsis "Data Transfer Objects")
8803 "OSGi, for Open Services Gateway initiative framework, is a module system
8804 and service platform for the Java programming language. This package contains
8805 the Data Transfer Objects. It is easily serializable having only public fields
8806 of primitive types and their wrapper classes, Strings, and DTOs. List, Set,
8807 Map and array aggregates may also be used. The aggregates must only hold
8808 objects of the listed types or aggregates.")
8809 (license license:asl2.0)))
8811 (define-public java-osgi-resource
8813 (name "java-osgi-resource")
8817 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8818 "org.osgi.resource/"
8819 version "/org.osgi.resource-"
8820 version "-sources.jar"))
8823 "0hi0fsc5v99q22bd7lrkvpz1y0ds4w9arjldpwsrcpqvz2js7q2d"))))
8824 (build-system ant-build-system)
8826 `(#:jar-name "osgi-resource.jar"
8827 #:tests? #f)); no tests
8829 `(("annotation" ,java-osgi-annotation)
8830 ("dto" ,java-osgi-dto)))
8831 (home-page "https://www.osgi.org")
8832 (synopsis "OSGI Resource")
8834 "OSGi, for Open Services Gateway initiative framework, is a module system
8835 and service platform for the Java programming language. This package contains
8836 the definition of common types in osgi packages.")
8837 (license license:asl2.0)))
8839 (define-public java-osgi-namespace-contract
8841 (name "java-osgi-namespace-contract")
8845 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8846 "org.osgi.namespace.contract/"
8847 version "/org.osgi.namespace.contract-"
8848 version "-sources.jar"))
8851 "1iz4f2i0fvqrlq90ki9nfzcfpvy2av434ri25bglywqssx8mmp36"))))
8852 (build-system ant-build-system)
8854 `(("resource" ,java-osgi-resource)
8855 ("annotation" ,java-osgi-annotation)))
8857 `(#:jar-name "osgi-namespace-contract.jar"
8858 #:tests? #f)); no tests
8859 (home-page "https://www.osgi.org")
8860 (synopsis "Contract Capability and Requirement Namespace")
8862 "OSGi, for Open Services Gateway initiative framework, is a module system
8863 and service platform for the Java programming language. This package contains
8864 the names for the attributes and directives for a namespace with contracts.")
8865 (license license:asl2.0)))
8867 (define-public java-osgi-namespace-extender
8869 (name "java-osgi-namespace-extender")
8873 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8874 "org.osgi.namespace.extender/"
8875 version "/org.osgi.namespace.extender-"
8876 version "-sources.jar"))
8879 "0jgqiak2i05qv6j3gd33xlaifzzc0ylxxk376v2x0apfg3vvixmz"))))
8880 (build-system ant-build-system)
8882 `(("resource" ,java-osgi-resource)
8883 ("annotation" ,java-osgi-annotation)))
8885 `(#:jar-name "osgi-namespace-extendent.jar"
8886 #:tests? #f)); no tests
8887 (home-page "https://www.osgi.org")
8888 (synopsis "Extender Capability and Requirement Namespace")
8890 "OSGi, for Open Services Gateway initiative framework, is a module system
8891 and service platform for the Java programming language. This package contains
8892 the names for the attributes and directives for an extender namespace.")
8893 (license license:asl2.0)))
8895 (define-public java-osgi-namespace-service
8897 (name "java-osgi-namespace-service")
8901 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8902 "org.osgi.namespace.service/"
8903 version "/org.osgi.namespace.service-"
8904 version "-sources.jar"))
8907 "0qmw8n2449nkmm56d1znz9zhazb6ya3vsimd5bf5jg23zzhgl8c8"))))
8908 (build-system ant-build-system)
8910 `(("resource" ,java-osgi-resource)
8911 ("annotation" ,java-osgi-annotation)))
8913 `(#:jar-name "osgi-namespace-service.jar"
8914 #:tests? #f)); no tests
8915 (home-page "https://www.osgi.org")
8916 (synopsis "Service Capability and Requirement Namespace")
8918 "OSGi, for Open Services Gateway initiative framework, is a module system
8919 and service platform for the Java programming language. This package contains
8920 the names for the attributes and directives for a service namespace.")
8921 (license license:asl2.0)))
8923 (define-public java-osgi-util-function
8925 (name "java-osgi-util-function")
8929 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8930 "org.osgi.util.function/"
8931 version "/org.osgi.util.function-"
8932 version "-sources.jar"))
8935 "04l7j3hwmmj28w23m7paca0afzncs42j2mdr3liqq8kvp548sc6x"))))
8936 (build-system ant-build-system)
8938 `(#:jar-name "osgi-util-function.jar"
8939 #:tests? #f)); no tests
8941 `(("annotation" ,java-osgi-annotation)))
8942 (home-page "https://www.osgi.org")
8943 (synopsis "OSGI Util Function")
8945 "OSGi, for Open Services Gateway initiative framework, is a module system
8946 and service platform for the Java programming language. This package contains
8947 an interface for a function that accepts a single argument and produces a result.")
8948 (license license:asl2.0)))
8950 (define-public java-osgi-util-promise
8952 (name "java-osgi-util-promise")
8956 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8957 "org.osgi.util.promise/"
8958 version "/org.osgi.util.promise-"
8959 version "-sources.jar"))
8962 "0y34dwiflg1c4ahvkswpf9z02xph2sr9fm04ia5493x3lshpw22c"))))
8963 (build-system ant-build-system)
8965 `(#:jar-name "osgi-util-promise.jar"
8966 #:tests? #f)); no tests
8968 `(("annotation" ,java-osgi-annotation)
8969 ("function" ,java-osgi-util-function)))
8970 (home-page "https://www.osgi.org")
8971 (synopsis "Promise of a value")
8973 "OSGi, for Open Services Gateway initiative framework, is a module system
8974 and service platform for the Java programming language. This package contains
8975 an interface and utilitary classes for promises. A Promise represents a future
8976 value. It handles the interactions for asynchronous processing.")
8977 (license license:asl2.0)))
8979 (define-public java-osgi-service-metatype-annotations
8981 (name "java-osgi-service-metatype-annotations")
8985 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8986 "org.osgi.service.metatype.annotations/"
8987 version "/org.osgi.service.metatype.annotations-"
8988 version "-sources.jar"))
8991 "12rwm3349wk80vm88rcdgs4435m4jxkpkj5mrx326skkz2c6hyw6"))))
8992 (build-system ant-build-system)
8994 `(#:jar-name "osgi-service-metatype-annotations.jar"
8995 #:tests? #f)); no tests
8997 `(("annotation" ,java-osgi-annotation)))
8998 (home-page "https://www.osgi.org")
8999 (synopsis "Support annotations for metatype")
9001 "OSGi, for Open Services Gateway initiative framework, is a module system
9002 and service platform for the Java programming language. This package contains
9003 the support annotations for metatype.")
9004 (license license:asl2.0)))
9006 (define-public java-osgi-service-repository
9008 (name "java-osgi-service-repository")
9012 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9013 "org.osgi.service.repository/"
9014 version "/org.osgi.service.repository-"
9015 version "-sources.jar"))
9018 "1k41mhg7b58pd8nsghr2qwcjrxdnf1p9spsw9v11k4257g6rl06n"))))
9019 (build-system ant-build-system)
9021 `(#:jar-name "osgi-service-repository.jar"
9022 #:tests? #f)); no tests
9024 `(("annotation" ,java-osgi-annotation)
9025 ("promise" ,java-osgi-util-promise)
9026 ("resource" ,java-osgi-resource)))
9027 (home-page "https://www.osgi.org")
9028 (synopsis "OSGI service repository")
9030 "OSGi, for Open Services Gateway initiative framework, is a module system
9031 and service platform for the Java programming language. This package contains
9032 a repository service that contains resources.")
9033 (license license:asl2.0)))
9035 (define-public java-osgi-framework
9037 (name "java-osgi-framework")
9041 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9042 "org.osgi.framework/" version "/org.osgi.framework-"
9043 version "-sources.jar"))
9046 "1lwp2zfad3rybcc6q9bwz8xsgkc92ypzy5p6x54387f1qj65m73s"))))
9047 (build-system ant-build-system)
9049 `(#:jar-name "osgi-framework.jar"
9050 #:tests? #f)); no tests
9052 `(("annotation" ,java-osgi-annotation)
9053 ("resource" ,java-osgi-resource)
9054 ("dto" ,java-osgi-dto)))
9055 (home-page "https://www.osgi.org")
9056 (synopsis "OSGi framework")
9058 "OSGi, for Open Services Gateway initiative framework, is a module system
9059 and service platform for the Java programming language.")
9060 (license license:asl2.0)))
9062 (define-public java-osgi-service-log
9064 (name "java-osgi-service-log")
9068 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9069 "org.osgi.service.log/"
9070 version "/org.osgi.service.log-"
9071 version "-sources.jar"))
9074 "1029j30dzcwializzca0j3fkhwwz08kmmsha5agw1iccscimj6r0"))))
9075 (build-system ant-build-system)
9077 `(#:jar-name "osgi-service-log.jar"
9078 #:tests? #f)); no tests
9080 `(("java-osgi-framework" ,java-osgi-framework)))
9081 (home-page "https://www.osgi.org")
9082 (synopsis "Provides methods for bundles to write messages to the log")
9084 "OSGi, for Open Services Gateway initiative framework, is a module system
9085 and service platform for the Java programming language. This package contains
9087 (license license:asl2.0)))
9089 (define-public java-osgi-service-jdbc
9091 (name "java-osgi-service-jdbc")
9095 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9096 "org.osgi.service.jdbc/"
9097 version "/org.osgi.service.jdbc-"
9098 version "-sources.jar"))
9101 "11iln5v7bk469cgb9ddkrz9sa95b3733gqgaqw9xf5g6wq652yjz"))))
9102 (build-system ant-build-system)
9104 `(#:jar-name "osgi-service-jdbc.jar"
9105 #:tests? #f)); no tests
9106 (home-page "https://www.osgi.org")
9107 (synopsis "Factory for JDBC connection factories")
9109 "OSGi, for Open Services Gateway initiative framework, is a module system
9110 and service platform for the Java programming language. This package contains
9111 a factory for JDBC connection factories. There are 3 preferred connection
9112 factories for getting JDBC connections:
9115 @item @code{javax.sql.DataSource};
9116 @item @code{javax.sql.ConnectionPoolDataSource};
9117 @item @code{javax.sql.XADataSource}.
9119 (license license:asl2.0)))
9121 (define-public java-osgi-service-resolver
9123 (name "java-osgi-service-resolver")
9127 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9128 "org.osgi.service.resolver/"
9129 version "/org.osgi.service.resolver-"
9130 version "-sources.jar"))
9133 "1dzqn1ryfi2rq4zwsgp44bmj2wlfydjg1qbxw2b0z4xdjjy55vxd"))))
9134 (build-system ant-build-system)
9136 `(#:jar-name "osgi-service-resolver.jar"
9137 #:tests? #f)); no tests
9139 `(("annotation" ,java-osgi-annotation)
9140 ("resource" ,java-osgi-resource)))
9141 (home-page "https://www.osgi.org")
9142 (synopsis "OSGI Resolver service")
9144 "OSGi, for Open Services Gateway initiative framework, is a module system
9145 and service platform for the Java programming language. This package contains
9146 a resolver service that resolves the specified resources in the context supplied
9148 (license license:asl2.0)))
9150 (define-public java-osgi-util-tracker
9152 (name "java-osgi-util-tracker")
9156 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9157 "org.osgi.util.tracker/"
9158 version "/org.osgi.util.tracker-"
9159 version "-sources.jar"))
9162 "0c4fh9vxwzsx59r8dygda0gq2gx3z5vfhc3jsphlqwf5w0h403lz"))))
9163 (build-system ant-build-system)
9165 `(#:jar-name "osgi-util-tracker.jar"
9166 #:tests? #f)); no tests
9168 `(("framework" ,java-osgi-framework)
9169 ("annotation" ,java-osgi-annotation)))
9170 (home-page "https://www.osgi.org")
9171 (synopsis "Bundle tracking")
9173 "OSGi, for Open Services Gateway initiative framework, is a module system
9174 and service platform for the Java programming language. This package contains
9175 bundle tracking utility classes.")
9176 (license license:asl2.0)))
9178 (define-public java-osgi-service-cm
9180 (name "java-osgi-service-cm")
9184 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9185 "org.osgi.service.cm/"
9186 version "/org.osgi.service.cm-"
9187 version "-sources.jar"))
9190 "1z8kap48y3xi0ggj8v6czglfnpnd94mmismgi2wbqhj1nl5fzbp6"))))
9191 (build-system ant-build-system)
9193 `(#:jar-name "osgi-service-cm.jar"
9194 #:tests? #f)); no tests
9196 `(("framework" ,java-osgi-framework)
9197 ("annotation" ,java-osgi-annotation)))
9198 (home-page "https://www.osgi.org")
9199 (synopsis "OSGI Configuration Management")
9201 "OSGi, for Open Services Gateway initiative framework, is a module system
9202 and service platform for the Java programming language. This package contains
9203 utility classes for the configuration of services.")
9204 (license license:asl2.0)))
9206 (define-public java-osgi-service-packageadmin
9208 (name "java-osgi-service-packageadmin")
9212 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9213 "org.osgi.service.packageadmin/"
9214 version "/org.osgi.service.packageadmin-"
9215 version "-sources.jar"))
9218 "041mpxzi7g36wmcily6y4ccn3jx15akpdy8gmhyb7m98x7qfvn52"))))
9219 (build-system ant-build-system)
9221 `(#:jar-name "osgi-service-packageadmin.jar"
9222 #:tests? #f)); no tests
9224 `(("framework" ,java-osgi-framework)))
9225 (home-page "https://www.osgi.org")
9226 (synopsis "OSGI Package Administration")
9228 "OSGi, for Open Services Gateway initiative framework, is a module system
9229 and service platform for the Java programming language. This package contains
9230 the packageadmin service.")
9231 (license license:asl2.0)))
9233 (define-public java-ops4j-base-lang
9235 (name "java-ops4j-base-lang")
9239 (uri (string-append "https://github.com/ops4j/org.ops4j.base/"
9240 "archive/base-" version ".tar.gz"))
9243 "18hl3lpchgpv8yh5rlk39l2gif5dlfgb8gxjmncf39pr2dprkniw"))))
9244 (build-system ant-build-system)
9246 `(#:jar-name "java-ops4j-base-lang.jar"
9247 #:source-dir "ops4j-base-lang/src/main/java"
9248 #:tests? #f; no tests
9250 (modify-phases %standard-phases
9251 (add-before 'build 'add-test-file
9253 ;; That file is required by a test in ops4j-pax-exam-core-spi
9254 (mkdir-p "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang")
9255 (with-output-to-file "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang/pom.properties"
9259 "version=" ,version "\n"
9260 "groupId=org.ops4j.base"
9261 "artifactId=ops4j-base-lang\n"))))
9263 (home-page "https://ops4j1.jira.com/wiki/spaces/base/overview")
9264 (synopsis "Utility classes and extensions to be used in OPS4J projects")
9265 (description "OPS4J stands for Open Participation Software for Java. This
9266 package contains utilities and extensions related to @code{java.lang}.")
9267 (license license:asl2.0)))
9269 (define-public java-ops4j-base-monitors
9271 (inherit java-ops4j-base-lang)
9272 (name "java-ops4j-base-monitors")
9274 `(#:jar-name "java-ops4j-base-monitors.jar"
9275 #:source-dir "ops4j-base-monitors/src/main/java"
9276 #:tests? #f)); no tests
9278 `(("lang" ,java-ops4j-base-lang)))
9279 (description "OPS4J stands for Open Participation Software for Java. This
9280 package contains utilities and extensions related to monitoring.")))
9282 (define-public java-ops4j-base-io
9284 (inherit java-ops4j-base-lang)
9285 (name "java-ops4j-base-io")
9287 `(#:jar-name "java-ops4j-base-io.jar"
9288 #:source-dir "ops4j-base-io/src/main/java"
9289 #:test-dir "ops4j-base-io/src/test"
9291 (list "**/ListerTest.java")))
9293 `(("lang" ,java-ops4j-base-monitors)
9294 ("lang" ,java-ops4j-base-lang)))
9296 `(("junit" ,java-junit)
9297 ("hamcrest" ,java-hamcrest-core)))
9298 (description "OPS4J stands for Open Participation Software for Java. This
9299 package contains utilities and extensions related to handling streams and files.")))
9301 (define-public java-ops4j-base-util
9303 (inherit java-ops4j-base-lang)
9304 (name "java-ops4j-base-util")
9306 `(#:jar-name "java-ops4j-base-util.jar"
9307 #:source-dir "ops4j-base-util/src/main/java"
9308 #:test-dir "ops4j-base-util/src/test"))
9310 `(("lang" ,java-ops4j-base-lang)))
9312 `(("junit" ,java-junit)))
9313 (description "OPS4J stands for Open Participation Software for Java. This
9314 package contains utilities and extensions related to environment, i18n and
9317 (define-public java-ops4j-base-util-property
9319 (inherit java-ops4j-base-lang)
9320 (name "java-ops4j-base-util-property")
9322 `(#:jar-name "java-ops4j-base-util-property.jar"
9323 #:source-dir "ops4j-base-util-property/src/main/java"
9324 #:tests? #f)); no tests
9326 `(("lang" ,java-ops4j-base-lang)
9327 ("util" ,java-ops4j-base-util)))
9328 (description "OPS4J stands for Open Participation Software for Java. This
9329 package contains utilities and extensions related to resolving properties from
9330 different sources.")))
9332 (define-public java-ops4j-base-store
9334 (inherit java-ops4j-base-lang)
9335 (name "java-ops4j-base-store")
9337 `(#:jar-name "java-ops4j-base-store.jar"
9338 #:source-dir "ops4j-base-store/src/main/java"
9339 #:tests? #f)); no tests
9341 `(("lang" ,java-ops4j-base-lang)
9342 ("slf4j" ,java-slf4j-api)
9343 ("io" ,java-ops4j-base-io)))
9344 (description "OPS4J stands for Open Participation Software for Java. This
9345 package contains utilities for storing and retrieving data from an
9346 @code{InputStream}.")))
9348 (define-public java-ops4j-base-spi
9350 (inherit java-ops4j-base-lang)
9351 (name "java-ops4j-base-spi")
9353 `(#:jar-name "java-ops4j-base-spi.jar"
9354 #:source-dir "ops4j-base-spi/src/main/java"
9355 #:test-dir "ops4j-base-spi/src/test"))
9357 `(("junit" ,java-junit)
9358 ("hamcrest" ,java-hamcrest-core)))
9359 (description "OPS4J stands for Open Participation Software for Java. This
9360 package contains utilities for obtaining services via the Java SE 6
9361 @code{ServiceLoader}.")))
9363 (define-public java-aqute-bnd-annotation
9365 (name "java-aqute-bnd-annotation")
9369 (uri (string-append "https://github.com/bndtools/bnd/archive/"
9370 version ".REL.tar.gz"))
9371 (file-name (string-append name "-" version ".tar.gz"))
9374 "1ggyiq0as0f6cz333a0dh98j72kmvv5pf2s47v9554yh905lfqdl"))))
9375 (build-system ant-build-system)
9377 `(#:jar-name "java-aqute-bnd-annotation.jar"
9378 #:source-dir "biz.aQute.bnd.annotation/src"
9379 #:tests? #f)); empty test dir
9380 (home-page "https://bnd.bndtools.org/")
9381 (synopsis "Tools for OSGi")
9382 (description "Bnd is a swiss army knife for OSGi, it creates manifest
9383 headers based on analyzing the class code, it verifies the project settings,
9384 it manages project dependencies, gives diffs jars, and much more.")
9385 (license license:asl2.0)))
9387 (define-public java-aqute-libg
9389 (inherit java-aqute-bnd-annotation)
9390 (name "java-aqute-libg")
9392 `(#:jar-name "java-aqute-libg.jar"
9393 ;; The build fails when source/target more recent than 1.7. This
9394 ;; is a known issue. See: https://github.com/bndtools/bnd/issues/1327
9396 ;; It is closed as won't fix. There is no way to change the source
9397 ;; so that it works on 1.8, and still works on 1.6, the upstream
9398 ;; target. It work fine on 1.7, so we use 1.7.
9399 #:make-flags (list "-Dant.build.javac.source=1.7"
9400 "-Dant.build.javac.target=1.7")
9402 (modify-phases %standard-phases
9403 (add-before 'configure 'chdir
9404 ;; Change to aQute.libg directory, so that the relative
9405 ;; paths in the tests aren't broken.
9407 (chdir "aQute.libg")
9409 (add-before 'check 'create-test-directory
9410 ;; Copy the test directory to test/java, since that's where
9411 ;; ant-build-system's default project in build.xml expects to find
9412 ;; the test classes. Leave a copy in the original place to not
9413 ;; break paths in tests.
9416 (copy-recursively "test" "src/test/java")
9419 `(("slf4j" ,java-slf4j-api)
9420 ("osgi-annot" ,java-osgi-annotation)
9421 ("java-osgi-cmpn" ,java-osgi-cmpn)
9422 ("osgi" ,java-osgi-core)))
9424 `(("hamcrest" ,java-hamcrest-core)
9425 ("java-junit" ,java-junit)))))
9427 (define-public java-aqute-bndlib
9429 (inherit java-aqute-bnd-annotation)
9430 (name "java-aqute-bndlib")
9432 `(#:jar-name "java-bndlib.jar"
9433 #:source-dir "biz.aQute.bndlib/src"
9434 #:tests? #f)); no tests
9436 `(("slf4j" ,java-slf4j-api)
9437 ("osgi-annot" ,java-osgi-annotation)
9438 ("java-aqute-libg" ,java-aqute-libg)
9439 ("java-aqute-bnd-annotation" ,java-aqute-bnd-annotation)
9440 ("java-osgi-service-component-annotations" ,java-osgi-service-component-annotations)
9441 ("java-osgi-service-repository" ,java-osgi-service-repository)
9442 ("java-osgi-service-log" ,java-osgi-service-log)
9443 ("java-osgi-service-metatype-annotations" ,java-osgi-service-metatype-annotations)
9444 ("java-osgi-namespace-contract" ,java-osgi-namespace-contract)
9445 ("java-osgi-namespace-extender" ,java-osgi-namespace-extender)
9446 ("java-osgi-namespace-service" ,java-osgi-namespace-service)
9447 ("promise" ,java-osgi-util-promise)
9448 ("osgi" ,java-osgi-core)))))
9450 (define-public java-ops4j-pax-tinybundles
9452 (name "java-ops4j-pax-tinybundles")
9456 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.tinybundles/"
9457 "archive/tinybundles-" version ".tar.gz"))
9460 "0y0gq3pvv0iir2b885lmlwnvr724vv7vklzhhr4fs27d7mdkj871"))))
9462 `(#:jar-name "java-ops4j-pax-tinybundles.jar"
9463 #:source-dir "src/main/java"
9465 ;; Abstract base classes for other tests
9466 (list "**/BndTest.java" "**/CoreTest.java")
9468 (modify-phases %standard-phases
9469 (add-before 'check 'fix-version
9471 ;; This test has a reference to an old version of bndlib we are not
9472 ;; packaging. It uses the version referenced in pom.xml. We replace
9473 ;; it with our own version.
9474 (substitute* "src/test/java/org/ops4j/pax/tinybundles/bnd/BndTest.java"
9475 (("[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*")
9476 ,(package-version java-aqute-bndlib)))
9479 `(("lang" ,java-ops4j-base-lang)
9480 ("io" ,java-ops4j-base-io)
9481 ("store" ,java-ops4j-base-store)
9482 ("slf4j" ,java-slf4j-api)
9483 ("libg" ,java-aqute-libg)
9484 ("bndlib" ,java-aqute-bndlib)))
9486 `(("junit" ,java-junit)
9487 ("hamcrest" ,java-hamcrest-core)
9488 ("log4j" ,java-log4j-api)
9489 ("bndannotation" ,java-aqute-bnd-annotation)
9490 ("framework" ,java-osgi-framework)))
9491 (build-system ant-build-system)
9492 (home-page "https://ops4j1.jira.com/wiki/spaces/ops4j/pages/12060312/Tinybundles")
9493 (synopsis "Java APIs to create OSGi related artifacts")
9494 (description "Tinybundles is all about creating OSGi related artifacts like
9495 Bundles, Fragments and Deployment Packages with Java Api. It is very convenient
9496 to create such artifacts on-the-fly inside Tests (like in Pax Exam). On the
9497 other hand, this library can be a foundation of real end user tools that need
9498 to create those artifacts.")
9499 (license license:asl2.0)))
9501 (define-public java-ops4j-pax-exam-core
9503 (name "java-ops4j-pax-exam-core")
9507 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.exam2/"
9508 "archive/exam-reactor-" version ".tar.gz"))
9511 "08mzw8nkah3rj3vznlplnawspxhp61zgvb44ifqa1rni1cvbms2g"))))
9513 `(#:jar-name "java-ops4j-pax-exam-core.jar"
9514 #:source-dir "core/pax-exam/src/main/java"
9515 #:test-dir "core/pax-exam/src/test"))
9517 `(("slf4j" ,java-slf4j-api)
9518 ("lang" ,java-ops4j-base-lang)
9519 ("io" ,java-ops4j-base-io)
9520 ("util-property" ,java-ops4j-base-util-property)
9521 ("util-store" ,java-ops4j-base-store)
9522 ("java-osgi-core" ,java-osgi-core)))
9524 `(("junit" ,java-junit)
9525 ("hamcrest" ,java-hamcrest-core)))
9526 (build-system ant-build-system)
9527 (home-page "https://ops4j1.jira.com/wiki/spaces/PAXEXAM4/overview")
9528 (synopsis "In-Container Testing for OSGi, Java EE and CDI")
9529 (description "Pax Exam creates OSGi bundles for testing purposes. It lets
9530 the user take control of the OSGi framework, the test framework (e.g. JUnit) and
9531 the system under test at the same time.")
9532 (license license:asl2.0)))
9534 (define-public java-ops4j-pax-exam-core-spi
9536 (inherit java-ops4j-pax-exam-core)
9537 (name "java-ops4j-pax-exam-core-spi")
9539 `(#:jar-name "java-ops4j-pax-exam-spi.jar"
9540 #:source-dir "src/main/java"
9543 ;; Abstract base class, not a test
9544 "**/BaseStagedReactorTest.java"
9545 ;; Depends on org.mortbay.jetty.testwars:test-war-dump
9546 "**/WarBuilderTest.java")
9548 (modify-phases %standard-phases
9549 (add-before 'configure 'chdir
9551 ;; Tests assume we are in this directory
9552 (chdir "core/pax-exam-spi")
9554 (add-before 'check 'fix-tests
9556 ;; One test checks that this file is present.
9557 (mkdir-p "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi")
9558 (with-output-to-file
9559 "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi/pom.properties"
9562 (string-append "artifactId = pax-exam-spi\n"
9563 "version = " ,(package-version java-ops4j-pax-exam-core-spi)))))
9564 ;; Maven puts compilation results in the target directory, while we
9565 ;; put them in the build directory.
9566 (substitute* '("src/test/java/org/ops4j/pax/exam/spi/war/WarBuilderTest.java"
9567 "src/test/java/org/ops4j/pax/exam/spi/war/WarTestProbeBuilderTest.java"
9568 "src/test/java/org/ops4j/pax/exam/spi/war/ZipBuilderTest.java")
9569 (("target") "build"))
9570 ;; One test is expected to fail, but it doesn't throw the expected exception
9571 (substitute* "src/test/java/org/ops4j/pax/exam/spi/reactors/BaseStagedReactorTest.java"
9572 (("AssertionError") "IllegalArgumentException"))
9575 `(("java-ops4j-pax-exam-core" ,java-ops4j-pax-exam-core)
9576 ("lang" ,java-ops4j-base-lang)
9577 ("monitors" ,java-ops4j-base-monitors)
9578 ("store" ,java-ops4j-base-store)
9579 ("io" ,java-ops4j-base-io)
9580 ("spi" ,java-ops4j-base-spi)
9581 ("osgi" ,java-osgi-core)
9582 ("slf4j" ,java-slf4j-api)
9583 ("tinybundles" ,java-ops4j-pax-tinybundles)))
9585 `(("mockito" ,java-mockito-1)
9586 ("junit" ,java-junit)
9587 ("hamcrest" ,java-hamcrest-core)
9588 ("cglib" ,java-cglib)
9589 ("objenesis" ,java-objenesis)
9590 ("asm" ,java-asm)))))
9592 (define-public java-ops4j-pax-exam-core-junit
9594 (inherit java-ops4j-pax-exam-core)
9595 (name "java-ops4j-pax-exam-core-junit")
9597 `(#:jar-name "ops4j-pax-exam-core-junit.jar"
9598 #:source-dir "drivers/pax-exam-junit4/src/main/java"
9599 #:tests? #f)); no tests
9601 `(("junit" ,java-junit)
9602 ("slf4j" ,java-slf4j-api)
9603 ("core" ,java-ops4j-pax-exam-core)
9604 ("spi" ,java-ops4j-pax-exam-core-spi)))
9605 (native-inputs '())))
9607 (define-public java-fasterxml-jackson-annotations
9609 (name "java-fasterxml-jackson-annotations")
9613 (uri (string-append "https://github.com/FasterXML/"
9614 "jackson-annotations/archive/"
9615 "jackson-annotations-" version ".tar.gz"))
9618 "0mr95xd0da6a4g95zvrl1ryk5n5zv2rc696w3xnsr5hxk2gicfc4"))))
9619 (build-system ant-build-system)
9621 `(#:jar-name "jackson-annotations.jar"
9622 #:source-dir "src/main/java"
9623 #:test-dir "src/test"))
9625 `(("junit" ,java-junit)))
9626 (home-page "https://github.com/FasterXML/jackson-annotations")
9627 (synopsis "General purpose annotations for the Jackson Data Processor")
9628 (description "This package contains general purpose annotations for the
9629 Jackson Data Processor, used on value and handler types. The only annotations
9630 not included are ones that require dependency to the Databind package.")
9631 (license license:asl2.0)))
9633 (define-public java-fasterxml-jackson-core
9635 (name "java-fasterxml-jackson-core")
9639 (uri (string-append "https://github.com/FasterXML/"
9640 "jackson-core/archive/"
9641 "jackson-core-" version ".tar.gz"))
9644 "159hsnk17jr1gyzkf01cxvsn45srnk37g949r7364qlsr527gjgd"))))
9645 (build-system ant-build-system)
9647 `(#:jar-name "jackson-core.jar"
9648 #:source-dir "src/main/java"
9649 #:test-dir "src/test"
9652 ;; Expected failure. pom.xml excludes these
9654 ;; Base classes that have no constructor for junit
9656 "**/ConcurrencyReadTest.java"
9657 "**/ManualCharAccessTest.java"
9658 "**/ManualCharAccessTest.java"
9659 "**/TrailingCommasTest.java"
9660 "**/AsyncMissingValuesInObjectTest.java"
9661 "**/AsyncMissingValuesInArrayTest.java")
9663 (modify-phases %standard-phases
9664 (add-before 'configure 'generate-PackageVersion.java
9666 (let* ((out "src/main/java/com/fasterxml/jackson/core/json/PackageVersion.java")
9667 (in (string-append out ".in")))
9670 (("@package@") "com.fasterxml.jackson.core.json")
9671 (("@projectversion@") ,version)
9672 (("@projectgroupid@") "com.fasterxml.jackson.core")
9673 (("@projectartifactid@") "jackson-core")))
9675 (add-before 'build 'copy-resources
9677 (copy-recursively "src/main/resources"
9680 (add-before 'check 'copy-test-resources
9682 (copy-recursively "src/test/resources"
9683 "build/test-classes")
9686 `(("junit" ,java-junit)
9687 ("hamcrest" ,java-hamcrest-core)))
9688 (home-page "https://github.com/FasterXML/jackson-core")
9691 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
9693 (define-public java-fasterxml-jackson-databind
9695 (name "java-fasterxml-jackson-databind")
9699 (uri (string-append "https://github.com/FasterXML/"
9700 "jackson-databind/archive/"
9701 "jackson-databind-" version ".tar.gz"))
9704 "1zd2cw4z6kdkbx8za96xh9pyicv2a2l7y0rkcx2fqd8hv6d47s08"))))
9705 (build-system ant-build-system)
9707 `(#:jar-name "jackson-databind.jar"
9708 #:source-dir "src/main/java"
9709 #:tests? #f; requires javax.measures for which I can't find a free implementation
9711 (modify-phases %standard-phases
9712 (add-before 'configure 'generate-PackageVersion.java
9714 (let* ((out "src/main/java/com/fasterxml/jackson/databind/cfg/PackageVersion.java")
9715 (in (string-append out ".in")))
9718 (("@package@") "com.fasterxml.jackson.databind.cfg")
9719 (("@projectversion@") ,version)
9720 (("@projectgroupid@") "com.fasterxml.jackson.databind")
9721 (("@projectartifactid@") "jackson-databind")))
9723 (add-before 'build 'copy-resources
9725 (copy-recursively "src/main/resources" "build/classes")
9728 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
9729 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)))
9730 (home-page "https://github.com/FasterXML/jackson-databind")
9731 (synopsis "Data-binding functionality and tree-model for the Jackson Data Processor")
9732 (description "This package contains the general-purpose data-binding
9733 functionality and tree-model for Jackson Data Processor. It builds on core
9734 streaming parser/generator package, and uses Jackson Annotations for
9736 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
9738 (define-public java-fasterxml-jackson-modules-base-jaxb
9740 (name "java-fasterxml-jackson-modules-base-jaxb")
9744 (uri (string-append "https://github.com/FasterXML/"
9745 "jackson-modules-base/archive/"
9746 "jackson-modules-base-" version ".tar.gz"))
9749 "1wws95xi8sppp6b0k2vvjdjyynl20r1a4dwrhai08lzlria6blp5"))))
9750 (build-system ant-build-system)
9752 `(#:jar-name "jackson-modules-base-jaxb.jar"
9753 #:source-dir "jaxb/src/main/java"
9754 #:test-dir "jaxb/src/test"
9756 ;; Base class for tests
9757 (list "**/BaseJaxbTest.java")
9759 (modify-phases %standard-phases
9760 (add-before 'configure 'generate-PackageVersion.java
9762 (let* ((out (string-append "jaxb/src/main/java/com/fasterxml/"
9763 "jackson/module/jaxb/PackageVersion.java"))
9764 (in (string-append out ".in")))
9767 (("@package@") "com.fasterxml.jackson.module.jaxb")
9768 (("@projectversion@") ,version)
9769 (("@projectgroupid@") "com.fasterxml.jackson.module.jaxb")
9770 (("@projectartifactid@") "jackson-module-jaxb")))
9772 (add-before 'build 'copy-resources
9774 (copy-recursively "jaxb/src/main/resources" "build/classes")
9777 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
9778 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
9779 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)))
9781 `(("java-junit" ,java-junit)))
9782 (home-page "https://github.com/FasterXML/jackson-modules-base")
9783 (synopsis "Jaxb annotations jackson module")
9784 (description "This package is the jaxb annotations module for jackson.")
9785 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
9787 (define-public java-fasterxml-jackson-modules-base-mrbean
9789 (name "java-fasterxml-jackson-modules-base-mrbean")
9793 (uri (string-append "https://github.com/FasterXML/"
9794 "jackson-modules-base/archive/"
9795 "jackson-modules-base-" version ".tar.gz"))
9798 "1wws95xi8sppp6b0k2vvjdjyynl20r1a4dwrhai08lzlria6blp5"))))
9799 (build-system ant-build-system)
9801 `(#:jar-name "jackson-modules-base-mrbean.jar"
9802 #:source-dir "mrbean/src/main/java"
9803 #:test-dir "mrbean/src/test"
9805 ;; Base class for tests
9806 (list "**/BaseTest.java")
9808 (modify-phases %standard-phases
9809 (add-before 'configure 'generate-PackageVersion.java
9811 (let* ((out (string-append "mrbean/src/main/java/com/fasterxml/"
9812 "jackson/module/mrbean/PackageVersion.java"))
9813 (in (string-append out ".in")))
9816 (("@package@") "com.fasterxml.jackson.module.mrbean")
9817 (("@projectversion@") ,version)
9818 (("@projectgroupid@") "com.fasterxml.jackson.module.mrbean")
9819 (("@projectartifactid@") "jackson-module-mrbean")))
9822 `(("java-asm" ,java-asm)
9823 ("java-fasterxml-jackson-annotations"
9824 ,java-fasterxml-jackson-annotations)
9825 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
9826 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)))
9828 `(("java-junit" ,java-junit)))
9829 (home-page "https://github.com/FasterXML/jackson-modules-base")
9830 (synopsis "POJO type materialization for Java")
9831 (description "This package implements POJO type materialization.
9832 Databinders can construct implementation classes for Java interfaces as part
9833 of deserialization.")
9834 (license license:asl2.0)))
9836 (define-public java-snakeyaml
9838 (name "java-snakeyaml")
9842 (uri (string-append "https://bitbucket.org/asomov/snakeyaml/get/v"
9844 (file-name (string-append name "-" version ".tar.gz"))
9847 "0474cqcv46zgv9bhms2vgawakq1vyj0hp3h3f1bfys46msia90bh"))))
9848 (build-system ant-build-system)
9850 `(#:jar-name "java-snakeyaml.jar"
9851 #:source-dir "src/main/java"
9852 ;; Tests require velocity, a cyclic dependency, and
9853 ;; java-spring-framework-context which is not packaged.
9855 (home-page "https://bitbucket.org/asomov/snakeyaml")
9856 (synopsis "YAML processor")
9857 (description "SnakeYAML is a YAML processor for the Java Virtual Machine.")
9858 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
9860 (define-public java-fasterxml-jackson-dataformat-yaml
9862 (name "java-fasterxml-jackson-dataformat-yaml")
9866 (uri (string-append "https://github.com/FasterXML/"
9867 "jackson-dataformats-text/archive/"
9868 "jackson-dataformats-text-" version ".tar.gz"))
9871 "1hikl06khaxbg439avf442qifcadap8w0lx13f0nnhp2vh3dkbz7"))))
9872 (build-system ant-build-system)
9874 `(#:jar-name "jackson-dataformat-yaml.jar"
9875 #:source-dir "yaml/src/main/java"
9876 #:test-dir "yaml/src/test"
9877 #:test-exclude (list "**/failing/**.java")
9879 (modify-phases %standard-phases
9880 (add-before 'configure 'generate-PackageVersion.java
9882 (let* ((out "yaml/src/main/java/com/fasterxml/jackson/dataformat/yaml/PackageVersion.java")
9883 (in (string-append out ".in")))
9886 (("@package@") "com.fasterxml.jackson.dataformat.yaml")
9887 (("@projectversion@") ,version)
9888 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.yaml")
9889 (("@projectartifactid@") "jackson-dataformat-yaml")))
9892 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
9893 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
9894 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)
9895 ("java-snakeyaml" ,java-snakeyaml)))
9897 `(("junit" ,java-junit)
9898 ("hamcrest" ,java-hamcrest-core)
9899 ("java-ops4j-pax-exam-core-spi" ,java-ops4j-pax-exam-core-spi)
9900 ("java-ops4j-pax-exam-core-junit" ,java-ops4j-pax-exam-core-junit)
9901 ("java-ops4j-pax-exam" ,java-ops4j-pax-exam-core)))
9902 (home-page "https://github.com/FasterXML/jackson-dataformats-text")
9903 (synopsis "Yaml backend for Jackson")
9904 (description "Dataformat backends are used to support format alternatives
9905 to JSON, supported by default. This is done by sub-classing Jackson core
9907 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
9909 (define-public java-stax2-api
9911 (name "java-stax2-api")
9915 (uri (string-append "https://github.com/FasterXML/stax2-api/archive/"
9916 "stax2-api-" version ".tar.gz"))
9919 "1amc1si0l0hyyw2sawmnzy4hkna3z6fp195y4nm5m9wb9ld5awkq"))))
9920 (build-system ant-build-system)
9922 `(#:jar-name "java-stax2-api.jar"
9923 #:source-dir "src/main/java"
9924 #:tests? #f)); no tests
9925 (home-page "https://github.com/FasterXML/stax2-api")
9926 (synopsis "Stax2 API")
9927 (description "Stax2 API is an extension to basic Stax 1.0 API that adds
9928 significant new functionalities, such as full-featured bi-direction validation
9929 interface and high-performance Typed Access API.")
9930 (license license:bsd-2)))
9932 (define-public java-woodstox-core
9934 (name "java-woodstox-core")
9938 (uri (string-append "https://github.com/FasterXML/woodstox/archive/"
9939 "woodstox-core-" version ".tar.gz"))
9942 "1i7pdgb8jbw6gdy5kmm0l6rz109n2ns92pqalpyp24vb8vlvdfd4"))))
9943 (build-system ant-build-system)
9945 `(#:jar-name "woodstox.jar"
9947 (list "**/Base*.java" "failing/**")
9949 (modify-phases %standard-phases
9950 (add-before 'build 'remove-msv-dep
9952 ;; we don't need osgi, and it depends on msv
9953 (delete-file-recursively "src/main/java/com/ctc/wstx/osgi")
9954 ;; msv's latest release is from 2011 and we don't need it
9955 (delete-file-recursively "src/main/java/com/ctc/wstx/msv")
9956 (delete-file-recursively "src/test/java/wstxtest/osgi")
9957 (delete-file-recursively "src/test/java/wstxtest/msv")
9959 (add-before 'build 'copy-resources
9961 (copy-recursively "src/main/resources" "build/classes")
9964 `(("stax2" ,java-stax2-api)))
9966 `(("junit" ,java-junit)))
9967 (home-page "https://github.com/FasterXML/woodstox")
9968 (synopsis "Stax XML API implementation")
9969 (description "Woodstox is a stax XML API implementation.")
9970 (license license:asl2.0)))
9972 (define-public java-fasterxml-jackson-dataformat-xml
9974 (name "java-fasterxml-jackson-dataformat-xml")
9978 (uri (string-append "https://github.com/FasterXML/"
9979 "jackson-dataformat-xml/archive/"
9980 "jackson-dataformat-xml-" version ".tar.gz"))
9983 "111fkkl90w31jbf30kgj82qdcxlw4sxppki7i198liw0ck1jcavq"))))
9984 (build-system ant-build-system)
9986 `(#:jar-name "jackson-dataformat-xml.jar"
9987 #:source-dir "src/main/java"
9989 (list "**/failing/**")
9991 (modify-phases %standard-phases
9992 (add-before 'configure 'generate-PackageVersion.java
9994 (let* ((out "src/main/java/com/fasterxml/jackson/dataformat/xml/PackageVersion.java")
9995 (in (string-append out ".in")))
9999 (("@package@") "com.fasterxml.jackson.dataformat.xml")
10000 (("@projectversion@") ,version)
10001 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.xml")
10002 (("@projectartifactid@") "jackson-dataformat-xml")))
10004 (add-before 'build 'copy-resources
10006 (copy-recursively "src/main/resources" "build/classes")
10009 `(("jackson-annotations" ,java-fasterxml-jackson-annotations)
10010 ("jackson-core" ,java-fasterxml-jackson-core)
10011 ("jackson-modules-base-jaxb" ,java-fasterxml-jackson-modules-base-jaxb)
10012 ("jackson-databind" ,java-fasterxml-jackson-databind)
10013 ("stax2-api" ,java-stax2-api)
10014 ("woodstox" ,java-woodstox-core)))
10016 `(("junit" ,java-junit)
10017 ("hamcrest" ,java-hamcrest-core)))
10018 (home-page "https://github.com/FasterXML/jackson-dataformat-xml")
10019 (synopsis "Read and write XML")
10020 (description "This package contains Jackson extension component for reading
10021 and writing XML encoded data.
10023 Further, the goal is to emulate how JAXB data-binding works with \"Code-first\"
10024 approach (that is, no support is added for \"Schema-first\" approach). Support
10025 for JAXB annotations is provided by JAXB annotation module; this module
10026 provides low-level abstractions (@code{JsonParser}, @code{JsonGenerator},
10027 @code{JsonFactory}) as well as small number of higher level overrides needed to
10028 make data-binding work.")
10029 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
10031 (define-public java-hdrhistogram
10033 (name "java-hdrhistogram")
10037 (uri (git-reference
10038 (url "https://github.com/HdrHistogram/HdrHistogram")
10039 (commit (string-append "HdrHistogram-" version))))
10040 (file-name (git-file-name name version))
10043 "1cw8aa1vk258k42xs6wpy72m4gbai540jq032qsa7c5586iawx2d"))))
10044 (build-system ant-build-system)
10046 `(#:jar-name "java-hdrhistogram.jar"
10047 #:source-dir "src/main/java"
10049 (modify-phases %standard-phases
10050 (add-after 'unpack 'make-files-writable
10052 (for-each make-file-writable (find-files "."))
10054 (add-before 'configure 'set-version
10056 (let* ((version-java "src/main/java/org/HdrHistogram/Version.java")
10057 (template (string-append version-java ".template")))
10058 (copy-file template version-java)
10059 (substitute* version-java
10060 (("\\$VERSION\\$") ,version)
10061 (("\\$BUILD_TIME\\$") "0"))
10064 `(("junit" ,java-junit)
10065 ("hamcrest" ,java-hamcrest-core)))
10066 (home-page "https://hdrhistogram.github.io/HdrHistogram")
10067 (synopsis "High dynamic range histogram")
10068 (description "Hdrhistogram creates histograms that support
10069 recording and analyzing sampled data value counts across a configurable integer
10070 value range with configurable value precision within the range. Value precision
10071 is expressed as the number of significant digits in the value recording, and
10072 provides control over value quantization behavior across the value range and
10073 the subsequent value resolution at any given level.")
10074 (license license:public-domain)))
10076 (define-public java-cofoja
10078 (name "java-cofoja")
10082 (uri (git-reference
10083 (url "https://github.com/nhatminhle/cofoja")
10084 (commit (string-append "v" version))))
10085 (file-name (string-append "java-cofoja-" version "-checkout"))
10088 "0p7sz8y5xgpi5rx1qwn6587fkd52qr3ha3ybh14gqcyxhikl525w"))))
10089 (build-system ant-build-system)
10091 `(#:build-target "dist"
10092 #:test-target "test"
10095 (list "-Ddist.dir=dist")
10096 #:modules ((guix build ant-build-system)
10097 (guix build java-utils)
10102 (modify-phases %standard-phases
10103 ;; The bulid system ignores the class path the ant-build-system sets
10104 ;; up and instead expects to find all dependencies in the "lib"
10106 (add-after 'unpack 'create-libdir
10107 (lambda* (#:key inputs #:allow-other-keys)
10111 (let ((target (string-append "lib/" (basename file))))
10112 (unless (file-exists? target)
10113 (symlink file target))))
10114 (append-map (match-lambda
10116 (find-files dir "\\.jar$")))
10119 (replace 'install (install-jars "dist")))))
10121 `(("java-asm" ,java-asm)))
10123 `(("java-junit" ,java-junit)))
10124 (home-page "https://github.com/nhatminhle/cofoja")
10125 (synopsis "Contracts for Java")
10126 (description "Contracts for Java, or Cofoja for short, is a contract
10127 programming framework and test tool for Java, which uses annotation processing
10128 and bytecode instrumentation to provide run-time checking. (In particular,
10129 this is not a static analysis tool.)")
10130 (license license:lgpl3+)))
10132 (define-public java-aopalliance
10134 (name "java-aopalliance")
10138 ;; Note: this git repository is not official, but contains the
10139 ;; source code that is in the CVS repository. Downloading the
10140 ;; tarball from sourceforge is undeterministic, and the cvs download
10142 (uri (git-reference
10143 (url "https://github.com/hoverruan/aopalliance")
10144 (commit "0d7757ae204e5876f69431421fe9bc2a4f01e8a0")))
10145 (file-name (string-append name "-" version))
10148 "0rsg2b0v3hxlq2yk1i3m2gw3xwq689j3cwx9wbxvqfpdcjbca0qr"))))
10149 (build-system ant-build-system)
10151 `(#:jar-name "java-aopalliance.jar"
10153 #:tests? #f; no tests
10154 #:source-dir "aopalliance/src/main"
10155 #:modules ((guix build ant-build-system)
10157 (guix build maven pom)
10158 (guix build java-utils)
10161 (modify-phases %standard-phases
10162 (add-before 'install 'create-pom
10164 (with-output-to-file "pom.xml"
10168 (modelVersion "4.0.0")
10169 (name "aopalliance")
10170 (groupId "aopalliance")
10171 (artifactId "aopalliance")
10172 (version "1.0"))))))
10175 (install-from-pom "pom.xml")))))
10176 (home-page "http://aopalliance.sourceforge.net")
10177 (synopsis "Aspect-Oriented Programming")
10178 (description "The AOP Alliance project is a joint project between several
10179 software engineering people who are interested in Aspect-Oriented Programming
10181 (license license:public-domain)))
10183 (define-public java-javax-inject
10185 (name "java-javax-inject")
10189 (uri (git-reference
10190 (url "https://github.com/javax-inject/javax-inject")
10192 (file-name (git-file-name name version))
10195 "1rspl0nkvk1jif6nccikw93xic6ljj2b6kpy2mffwi2mnvc13j7x"))))
10196 (build-system ant-build-system)
10198 `(#:jar-name "java-javax-inject.jar"
10199 #:tests? #f; no tests
10201 (modify-phases %standard-phases
10203 (install-from-pom "pom.xml")))))
10204 (home-page "https://github.com/javax-inject/javax-inject")
10205 (synopsis "JSR-330: Dependency Injection for Java")
10206 (description "This package specifies a means for obtaining objects in such
10207 a way as to maximize reusability, testability and maintainability compared to
10208 traditional approaches such as constructors, factories, and service locators
10209 (e.g., JNDI). This process, known as dependency injection, is beneficial to
10210 most nontrivial applications.
10212 Many types depend on other types. For example, a @var{Stopwatch} might depend
10213 on a @var{TimeSource}. The types on which a type depends are known as its
10214 dependencies. The process of finding an instance of a dependency to use at run
10215 time is known as resolving the dependency. If no such instance can be found,
10216 the dependency is said to be unsatisfied, and the application is broken.")
10217 (license license:asl2.0)))
10219 (define-public java-guice
10221 (name "java-guice")
10225 (uri (git-reference
10226 (url "https://github.com/google/guice")
10228 (file-name (git-file-name name version))
10229 (modules '((guix build utils)))
10232 (for-each delete-file (find-files "." ".*.jar")) #t))
10235 "18im5hdfl4q1b9chww2s1ii60sn3ydyyar32a2sf2p2g8zlbdswq"))))
10236 (build-system ant-build-system)
10238 `(#:jar-name "java-guice.jar"
10240 #:tests? #f; FIXME: tests are not in a java sub directory
10241 #:source-dir "core/src"
10243 (modify-phases %standard-phases
10244 (add-after 'unpack 'make-files-writable
10246 (for-each make-file-writable (find-files "."))
10249 (install-from-pom "core/pom.xml")))))
10251 `(("java-aopalliance" ,java-aopalliance)
10252 ("java-asm" ,java-asm)
10253 ("java-cglib" ,java-cglib)
10254 ("java-guava" ,java-guava)
10255 ("java-javax-inject" ,java-javax-inject)
10256 ("java-guice-parent-pom" ,java-guice-parent-pom)))
10257 (home-page "https://github.com/google/guice")
10258 (synopsis "Lightweight dependency injection framework")
10259 (description "Guice is a lightweight dependency injection framework for
10260 Java 6 and above.")
10261 (license license:asl2.0)))
10263 (define-public java-guice-servlet
10265 (inherit java-guice)
10266 (name "java-guice-servlet")
10268 `(#:jar-name "guice-servlet.jar"
10269 #:source-dir "extensions/servlet/src/"
10271 #:tests? #f ; FIXME: not in a java subdir
10273 (modify-phases %standard-phases
10274 (add-after 'unpack 'make-files-writable
10276 (for-each make-file-writable (find-files "."))
10279 `(("guice" ,java-guice)
10280 ("servlet" ,java-classpathx-servletapi)
10281 ,@(package-inputs java-guice)))))
10283 (define java-guice-parent-pom
10285 (inherit java-guice)
10286 (name "java-guice-parent-pom")
10290 (modify-phases %standard-phases
10291 (delete 'configure)
10293 (add-after 'install 'install-extensions
10294 (install-pom-file "extensions/pom.xml"))
10296 (install-pom-file "pom.xml")))))
10298 `(("java-google-parent-pom" ,java-google-parent-pom-5)))))
10300 (define java-google-parent-pom-5
10302 (name "java-google-parent-pom")
10306 (uri (git-reference
10307 (url "https://github.com/google/google-maven-parents")
10308 (commit (string-append "google-" version))))
10309 (file-name (git-file-name name version))
10312 "0zb7hx24p8k8rfdvix2vsbfqn73jhrycdndvhf8j5gbii9wbqibv"))))
10313 (build-system ant-build-system)
10317 (modify-phases %standard-phases
10318 (delete 'configure)
10321 (install-pom-file "pom.xml")))))
10322 (home-page "https://github.com/google/google-maven-parents")
10323 (synopsis "Google parent pom")
10324 (description "This package contains the Maven parent POM for other Google
10326 (license license:asl2.0)))
10328 (define-public java-assertj
10330 (name "java-assertj")
10334 (uri (git-reference
10335 (url "https://github.com/joel-costigliola/assertj-core")
10336 (commit (string-append "assertj-core-" version))))
10337 (file-name (git-file-name name version))
10340 "1k35cg2in7pzk4pbdjryr0pll5lgk1r6ngrn0j8cdlgi7w8zh2d1"))))
10341 (build-system ant-build-system)
10343 `(#:jar-name "java-assertj.jar"
10345 #:source-dir "src/main/java"
10346 #:tests? #f)); depends on tng-junit which depends on assertj
10348 `(("cglib" ,java-cglib)
10349 ("junit" ,java-junit)
10350 ("hamcrest" ,java-hamcrest-core)))
10352 `(("mockito" ,java-mockito-1)))
10353 (home-page "https://joel-costigliola.github.io/assertj/index.html")
10354 (synopsis "Fluent assertions for java")
10355 (description "AssertJ core is a Java library that provides a fluent
10356 interface for writing assertions. Its main goal is to improve test code
10357 readability and make maintenance of tests easier.")
10358 (license license:asl2.0)))
10360 (define-public java-jboss-javassist
10362 (name "java-jboss-javassist")
10366 (uri (git-reference
10367 (url "https://github.com/jboss-javassist/javassist")
10369 (string-append "rel_"
10371 (lambda (x) (if (eq? x #\.) #\_ x)) version)
10373 (file-name (git-file-name name version))
10376 "0h3zlcyqiaq01fspm69h7vki67raw305w89p4ha8vlhpzw02qifm"))
10377 (modules '((guix build utils)))
10380 (delete-file "javassist.jar")))))
10381 (build-system ant-build-system)
10383 `(#:jar-name "java-jboss-javassist.jar"
10385 #:source-dir "src/main"
10386 #:tests? #f; FIXME: requires junit-awtui and junit-swingui from junit3
10388 (modify-phases %standard-phases
10389 (add-after 'unpack 'make-files-writable
10391 (for-each make-file-writable (find-files "."))
10394 `(("junit" ,java-junit)))
10395 (home-page "https://github.com/jboss-javassist/javassist")
10396 (synopsis "Java bytecode engineering toolkit")
10397 (description "Javassist (JAVA programming ASSISTant) makes Java bytecode
10398 manipulation simple. It is a class library for editing bytecodes in Java; it
10399 enables Java programs to define a new class at runtime and to modify a class
10400 file when the JVM loads it.")
10401 (license (list license:gpl2 license:cddl1.0)))); either gpl2 only or cddl.
10403 (define-public java-jcommander
10405 (name "java-jcommander")
10409 (uri (git-reference
10410 (url "https://github.com/cbeust/jcommander")
10412 (file-name (git-file-name name version))
10415 "12vcpc19sd7jhvjgp7xz1qjanfix162xb3x2q5zah93rjklj1h57"))))
10416 (build-system ant-build-system)
10418 `(#:jar-name "java-jcommander.jar"
10420 #:tests? #f; requires testng which depends on jcommander
10421 #:source-dir "src/main/java"))
10422 (home-page "https://jcommander.org")
10423 (synopsis "Command line parameters parser")
10424 (description "JCommander is a very small Java framework that makes it
10425 trivial to parse command line parameters. Parameters are declared with
10427 (license license:asl2.0)))
10429 (define-public java-bsh
10435 (uri (git-reference
10436 (url "https://github.com/beanshell/beanshell")
10438 (file-name (git-file-name name version))
10441 "0kz3f0xjack6c9syssi4qjw1rbd3q5963sk5pmr143hiibxa9csw"))
10442 (modules '((guix build utils)))
10445 ;; Delete bundled third-party jar archives.
10446 (for-each delete-file (find-files "." ".*.jar$"))
10447 (for-each (lambda (file) (chmod file #o644))
10448 (find-files "." "."))
10450 (build-system ant-build-system)
10452 `(#:build-target "jarall"
10453 #:test-target "junit-tests-all"
10454 #:make-flags (list "-DDATE" "(no date for reproducibility)")
10456 (modify-phases %standard-phases
10457 (add-before 'install 'fix-pom
10459 (substitute* "pom.xml"
10460 (("org.apache-extras.beanshell") "org.beanshell"))
10463 (install-from-pom "pom.xml")))))
10465 `(("java-classpathx-servletapi" ,java-classpathx-servletapi)
10466 ("java-commons-bsf" ,java-commons-bsf)))
10468 `(("java-junit" ,java-junit)
10469 ("javacc" ,javacc-3)))
10470 (home-page "http://beanshell.org/")
10471 (synopsis "Lightweight Scripting for Java")
10472 (description "BeanShell is a small, free, embeddable Java source
10473 interpreter with object scripting language features, written in Java.
10474 BeanShell dynamically executes standard Java syntax and extends it with common
10475 scripting conveniences such as loose types, commands, and method closures like
10476 those in Perl and JavaScript.")
10477 (license license:asl2.0)))
10479 (define-public java-fest-util
10481 (name "java-fest-util")
10485 (uri (git-reference
10486 (url "https://github.com/alexruiz/fest-util/")
10487 (commit (string-append "fest-util-" version))))
10488 (file-name (git-file-name name version))
10491 "02kgal7v85snyyvcsxvn4qphid455f4smh2wri1il8d9asw0djbz"))))
10492 (build-system ant-build-system)
10494 `(#:jar-name "java-fest-util.jar"
10495 #:source-dir "src/main/java"))
10497 `(("junit" ,java-junit)
10498 ("hamcrest" ,java-hamcrest-core)))
10499 (home-page "https://github.com/alexruiz/fest-util")
10500 (synopsis "FEST common utilities")
10501 (description "Common utilities used in all FEST module.")
10502 (license license:asl2.0)))
10504 (define-public java-fest-test
10506 (name "java-fest-test")
10510 (uri (git-reference
10511 (url "https://github.com/alexruiz/fest-test/")
10512 (commit (string-append "fest-test-" version))))
10513 (file-name (git-file-name name version))
10516 "0mg1d2jfh7kbx2c40dchbjr6d8pv59snsyb13mfxsr7xk5n69qbn"))))
10517 (build-system ant-build-system)
10519 `(#:jar-name "java-fest-test.jar"
10520 #:source-dir "src/main/java"
10521 #:tests? #f)); no tests
10523 `(("junit" ,java-junit)))
10524 (home-page "https://github.com/alexruiz/fest-test")
10525 (synopsis "Common FEST testing infrastructure")
10526 (description "Fest-test contains the common FEST testing infrastructure.")
10527 (license license:asl2.0)))
10529 (define-public java-fest-assert
10531 (name "java-fest-assert")
10535 (uri (git-reference
10536 (url "https://github.com/alexruiz/fest-assert-2.x/")
10537 (commit (string-append "fest-assert-core-" version))))
10538 (file-name (git-file-name name version))
10541 "1cp8zzyag3s85fz2w68sda9zzaal1y5f9wl8g72wkm12an40w6by"))))
10542 (build-system ant-build-system)
10544 `(#:jar-name "java-fest-assert.jar"
10545 #:source-dir "src/main/java"
10548 "**/Abstract*.java"
10549 "**/*BaseTest.java"
10550 ;; Unable to set MockitoNamingPolicy on cglib generator which creates FastClasses
10551 "**/MessageFormatter_format_Test.java"
10552 "**/internal/*/*_assert*_Test.java")))
10554 `(("java-fest-util" ,java-fest-util)))
10556 `(("java-junit" ,java-junit)
10557 ("java-fest-test" ,java-fest-test)
10558 ("java-hamcrest-core" ,java-hamcrest-core)
10559 ("java-mockito" ,java-mockito-1)
10560 ("java-cglib" ,java-cglib)
10561 ("java-objenesis" ,java-objenesis)
10562 ("java-asm" ,java-asm)))
10563 (home-page "https://github.com/alexruiz/fest-assert-2.x")
10564 (synopsis "FEST fluent assertions")
10565 (description "FEST-Assert provides a fluent interface for assertions.")
10566 (license license:asl2.0)))
10568 (define-public java-testng
10570 (name "java-testng")
10574 (uri (git-reference
10575 (url "https://github.com/cbeust/testng")
10577 (file-name (string-append name "-" version "-checkout"))
10580 "0y6vq30i5g276kw0v2bhbvci22ijg7ax49ap2611yqlhbs4d6dqv"))))
10581 (build-system ant-build-system)
10583 `(#:jdk ,icedtea-8; java.util.function
10584 #:jar-name "java-testng.jar"
10585 #:source-dir "src/main/java"
10587 (modify-phases %standard-phases
10588 ;; FIXME: I don't know why these tests fail
10589 (add-after 'unpack 'delete-failing-tests
10591 (substitute* "src/test/resources/testng.xml"
10592 (("<class name=\"test.configuration.github1625.TestRunnerIssue1625\"/>") "")
10593 (("<class name=\"test.serviceloader.ServiceLoaderTest\" />") ""))
10595 ;; We don't have groovy
10596 (add-after 'unpack 'delete-groovy-tests
10598 (delete-file-recursively "src/test/java/test/dependent/issue1648/")
10599 (substitute* "src/test/resources/testng.xml"
10600 (("<class name=\"test.dependent.issue1648.TestRunner\"/>") ""))
10602 (add-before 'build 'copy-resources
10604 (copy-recursively "src/main/resources" "build/classes")
10606 (add-before 'check 'copy-test-resources
10608 (copy-recursively "src/test/resources" "build/test-classes")
10612 (invoke "ant" "compile-tests")
10613 ;; we don't have groovy
10614 (substitute* "src/test/resources/testng.xml"
10615 (("<class name=\"test.groovy.GroovyTest\" />") ""))
10616 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
10618 ":build/test-classes")
10619 "-Dtest.resources.dir=src/test/resources"
10620 "org.testng.TestNG" "src/test/resources/testng.xml"))))))
10622 `(("junit" ,java-junit)
10623 ("java-jsr305" ,java-jsr305)
10624 ("java-bsh" ,java-bsh)
10625 ("java-jcommander" ,java-jcommander)
10626 ("java-guice" ,java-guice)
10627 ("snakeyaml" ,java-snakeyaml)))
10629 `(("guava" ,java-guava)
10630 ("java-javax-inject" ,java-javax-inject)
10631 ("java-hamcrest" ,java-hamcrest-all)
10632 ("java-assertj" ,java-assertj)
10633 ("java-mockito" ,java-mockito-1)
10634 ("cglib" ,java-cglib)
10636 ("aopalliance" ,java-aopalliance)))
10637 (home-page "https://testng.org")
10638 (synopsis "Testing framework")
10639 (description "TestNG is a testing framework inspired from JUnit and NUnit
10640 but introducing some new functionalities that make it more powerful and easier
10642 (license license:asl2.0)))
10644 (define-public java-jnacl
10645 (let ((commit "094e819afdd63ea81a499b3bcb42a271006bebd9")
10648 (name "java-jnacl")
10649 (version (string-append "0.1.0-" revision "." (string-take commit 7)))
10652 (uri (git-reference
10653 (url "https://github.com/neilalexander/jnacl")
10655 (file-name (git-file-name name version))
10658 "1d6g6xhn83byv5943n7935wwjsk0ibk0qdvqgr699qqgqqmwisbb"))))
10659 (build-system ant-build-system)
10661 `(#:jar-name "jnacl.jar"
10662 #:source-dir "src/main/java"
10665 (modify-phases %standard-phases
10666 (add-before 'build 'fix-tests
10668 (substitute* '("src/test/java/com/neilalexander/jnacl/NaClTest.java"
10669 "src/test/java/com/neilalexander/jnacl/NaclSecretBoxTest.java")
10670 (("assertions.Assertions") "assertions.api.Assertions"))
10674 (invoke "ant" "compile-tests")
10675 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
10677 ":build/test-classes")
10678 "org.testng.TestNG" "-testclass"
10679 "build/test-classes/com/neilalexander/jnacl/NaclSecretBoxTest.class")
10680 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
10682 ":build/test-classes")
10683 "org.testng.TestNG" "-testclass"
10684 "build/test-classes/com/neilalexander/jnacl/NaClTest.class"))))))
10686 `(("java-testng" ,java-testng)
10687 ("java-fest-util" ,java-fest-util)
10688 ("java-fest-assert" ,java-fest-assert)))
10689 (home-page "https://github.com/neilalexander/jnacl")
10690 (synopsis "Java implementation of NaCl")
10691 (description "Pure Java implementation of the NaCl: Networking and
10692 Cryptography library.")
10693 (license license:bsd-2))))
10695 (define-public java-mvel2
10697 (name "java-mvel2")
10701 (uri (string-append "https://github.com/mvel/mvel/archive/mvel2-"
10702 version ".Final.tar.gz"))
10705 "01ph5s9gm16l2qz58lg21w6fna7xmmrj7f9bzqr1jim7h9557d3z"))))
10706 (build-system ant-build-system)
10708 `(#:jar-name "mvel2.jar"
10709 #:source-dir "src/main/java"
10711 (list "**/Abstract*.java"
10712 ;; Base class with no tests
10713 "**/MVELThreadTest.java")
10715 (modify-phases %standard-phases
10716 (add-after 'install 'install-bin
10717 (lambda* (#:key outputs #:allow-other-keys)
10718 (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
10720 (with-output-to-file (string-append bin "/mvel2")
10724 "#!" (which "bash") "\n"
10725 "if [ \"$#\" -ne \"2\" ]; then\n"
10726 "echo 'Usage: mvel2 <script> <out.dir>'\n"
10729 "java -Dout.dir=$2 -cp " (getenv "CLASSPATH")
10730 ":" (assoc-ref outputs "out") "/share/java/mvel2.jar"
10731 " org.mvel2.sh.Main $1"))))
10732 (chmod (string-append bin "/mvel2") #o755))
10735 `(("junit" ,java-junit)
10736 ("hamcrest" ,java-hamcrest-core)))
10737 (home-page "https://github.com/mvel/mvel")
10738 (synopsis "MVFLEX Expression Language")
10739 (description "MVEL has largely been inspired by Java syntax, but has some
10740 fundamental differences aimed at making it more efficient as an expression
10741 language, such as operators that directly support collection, array and string
10742 matching, as well as regular expressions. MVEL is used to evaluate expressions
10743 written using Java syntax.
10745 In addition to the expression language, MVEL serves as a templating language for
10746 configuration and string construction.")
10747 (license license:asl2.0)))
10749 (define-public java-commons-jexl-2
10751 (name "java-commons-jexl")
10755 (uri (string-append "mirror://apache/commons/jexl/source/"
10756 "commons-jexl-" version "-src.tar.gz"))
10759 "1ai7632bwwaxglb0nbpblpr2jw5g20afrsaq372ipkphi3ncy1jz"))))
10760 (build-system ant-build-system)
10762 `(#:jar-name "commons-jexl-2.jar"
10764 #:source-dir "src/main/java"
10766 (modify-phases %standard-phases
10767 (add-before 'check 'disable-broken-tests
10768 (lambda* (#:key inputs #:allow-other-keys)
10769 (with-directory-excursion "src/test/java/org/apache/commons/jexl2/"
10770 (substitute* "ArithmeticTest.java"
10771 (("asserter.assertExpression\\(\"3 / 0\"") "//")
10772 (("asserter.assertExpression\\(\"imanull") "//"))
10773 ;; This test fails with "ambiguous method invocation"
10774 (delete-file "CacheTest.java")
10775 ;; This test doesn't have access to the temp directory
10776 (substitute* "ClassCreatorTest.java"
10777 (("java.io.tmpdir") "user.dir"))
10778 ;; This test fails in trying to detect whether it can run.
10779 (substitute* "ClassCreator.java"
10780 (("boolean canRun =.*") "boolean canRun = false;\n"))
10781 ;; ...and these tests depend on it.
10782 (delete-file "scripting/JexlScriptEngineOptionalTest.java")
10783 (delete-file "scripting/JexlScriptEngineTest.java"))
10785 (add-before 'build 'run-javacc
10787 (with-directory-excursion "src/main/java/org/apache/commons/jexl2/parser/"
10788 (invoke "java" "jjtree" "Parser.jjt")
10789 (invoke "java" "javacc" "Parser.jj"))
10792 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)))
10794 `(("java-junit" ,java-junit)
10795 ("java-hamcrest-core" ,java-hamcrest-core)
10796 ("javacc" ,javacc-4)))
10797 (home-page "https://commons.apache.org/proper/commons-jexl/")
10798 (synopsis "Java Expression Language ")
10799 (description "JEXL is a library intended to facilitate the implementation
10800 of dynamic and scripting features in applications and frameworks written in
10801 Java. JEXL implements an Expression Language based on some extensions to the
10802 JSTL Expression Language supporting most of the constructs seen in
10803 shell-script or ECMAScript. Its goal is to expose scripting features usable
10804 by technical operatives or consultants working with enterprise platforms.")
10805 (license license:asl2.0)))
10807 (define-public java-lz4
10813 (uri (git-reference
10814 (url "https://github.com/lz4/lz4-java")
10816 (file-name (git-file-name name version))
10819 "0ydjakhv3cz34mfvv14qrh2ksdxifgjwwagjy7r46qr3f68hnf6y"))))
10820 (build-system ant-build-system)
10822 `(#:jar-name "lz4.jar"
10824 #:source-dir "src/java:src/java-unsafe"
10825 #:tests? #f; FIXME: requires more dependencies
10827 (modify-phases %standard-phases
10828 (add-after 'unpack 'make-files-writable
10830 (for-each make-file-writable (find-files "."))
10832 (add-before 'configure 'generate-source
10834 (with-directory-excursion "src/build/source_templates"
10835 (invoke "mvel2" "../gen_sources.mvel" "../../java"))
10838 `(("mvel" ,java-mvel2)))
10839 (home-page "https://jpountz.github.io/lz4-java")
10840 (synopsis "Compression algorithm")
10841 (description "LZ4 - Java is a Java port of the popular lz4 compression
10842 algorithms and xxHash hashing algorithm.")
10843 (license license:asl2.0)))
10845 (define-public java-bouncycastle
10847 (name "java-bouncycastle")
10851 (uri (git-reference
10852 (url "http://git.bouncycastle.org/repositories/bc-java")
10853 ;(url "https://github.com/bcgit/bc-java")
10854 (commit (string-append "r1rv" (substring version 2 4)))))
10855 (file-name (git-file-name name version))
10858 "1m921a1ac2dl797ffzg3d4j97ch308f25spb4jgsj3npfmmys5gb"))
10859 (modules '((guix build utils)))
10862 (for-each delete-file
10863 (find-files "." "\\.jar$"))
10865 (build-system ant-build-system)
10870 (modify-phases %standard-phases
10873 (invoke "ant" "-f" "ant/jdk15+.xml" "build-provider")
10874 (invoke "ant" "-f" "ant/jdk15+.xml" "build")))
10875 ;; FIXME: the tests freeze.
10878 ;; (invoke "ant" "-f" "ant/jdk15+.xml" "test")))
10880 (install-jars "build/artifacts/jdk1.5/jars")))))
10882 `(("java-javax-mail" ,java-javax-mail)))
10885 ("junit" ,java-junit)
10886 ("java-native-access" ,java-native-access)
10887 ("java-native-access-platform" ,java-native-access-platform)))
10888 (home-page "https://www.bouncycastle.org")
10889 (synopsis "Cryptographic library")
10890 (description "Bouncy Castle is a cryptographic library for the Java
10891 programming language.")
10892 (license license:expat)))
10894 (define-public java-lmax-disruptor
10896 (name "java-lmax-disruptor")
10900 (uri (string-append "https://github.com/LMAX-Exchange/disruptor/"
10901 "archive/" version ".tar.gz"))
10902 (file-name (string-append name "-" version ".tar.gz"))
10905 "17da2gwj5abnlsfgn2xqjk5lgzbg4vkb0hdv2dvc8r2fx4bi7w3g"))))
10906 (build-system ant-build-system)
10908 `(#:jar-name "java-lmax-disruptor.jar"
10910 #:tests? #f)); tests hang
10912 `(("junit" ,java-junit)
10913 ("java-hdrhistogram" ,java-hdrhistogram)
10914 ("java-jmock" ,java-jmock)
10915 ("java-jmock-legacy" ,java-jmock-legacy)
10916 ("java-jmock-junit4" ,java-jmock-junit4)
10917 ("java-hamcrest-all" ,java-hamcrest-all)))
10919 `(("cglib" ,java-cglib)
10920 ("objenesis" ,java-objenesis)
10921 ("asm" ,java-asm)))
10922 (home-page "https://www.lmax.com/disruptor")
10923 (synopsis "High performance inter-thread communication")
10924 (description "LMAX Disruptor is a software pattern and software component
10925 for high performance inter-thread communication that avoids the need for
10926 message queues or resource locking.")
10927 (license license:asl2.0)))
10929 (define-public java-commons-bcel
10931 (name "java-commons-bcel")
10935 (uri (string-append "mirror://apache/commons/bcel/source/bcel-"
10936 version "-src.tar.gz"))
10939 "0j3x1rxd673k07psclk8k13rqh0x0mf2yy5qiwkiw4z3afa568jy"))))
10940 (build-system ant-build-system)
10942 `(#:jar-name "bcel.jar"
10944 #:source-dir "src/main/java"
10945 #:test-dir "src/test/java"
10946 ;; FIXME: Tests require the unpackaged jna.
10948 (home-page "https://commons.apache.org/proper/commons-bcel/")
10949 (synopsis "Byte code engineering library")
10950 (description "The Byte Code Engineering Library (Apache Commons BCEL) is
10951 intended to give users a convenient way to analyze, create, and
10952 manipulate (binary) Java class files. Classes are represented by objects
10953 which contain all the symbolic information of the given class: methods, fields
10954 and byte code instructions, in particular.
10956 Such objects can be read from an existing file, be transformed by a
10957 program (e.g. a class loader at run-time) and written to a file again. An
10958 even more interesting application is the creation of classes from scratch at
10959 run-time. The @dfn{Byte Code Engineering Library} (BCEL) may be also useful
10960 if you want to learn about the @dfn{Java Virtual Machine} (JVM) and the format
10961 of Java @code{.class} files.")
10962 (license license:asl2.0)))
10964 (define-public java-xerial-core
10966 (name "java-xerial-core")
10970 (uri (string-append "https://github.com/xerial/xerial-java/archive/"
10971 version ".tar.gz"))
10972 (file-name (string-append name "-" version ".tar.gz"))
10975 "0d3g863i41bgalpa4xr3vm1h140l091n8iwgq5qvby5yivns9y8d"))))
10976 (build-system ant-build-system)
10978 `(#:jar-name "xerial-core.jar"
10979 #:source-dir "xerial-core/src/main/java"
10980 #:test-dir "xerial-core/src/test"
10982 (modify-phases %standard-phases
10983 (add-before 'build 'copy-resources
10985 (copy-recursively "xerial-core/src/main/resources"
10989 `(("junit" ,java-junit)
10990 ("hamcrest" ,java-hamcrest-core)))
10991 (home-page "https://github.com/xerial/xerial-java")
10992 (synopsis "Data management libraries for Java")
10993 (description "Xerial is a set of data management libraries for the Java
10994 programming language. The ultimate goal of the Xerial project is to manage
10995 everything as database, including class objects, text format data, data
10997 (license license:asl2.0)))
10999 (define-public java-powermock-reflect
11001 (name "java-powermock-reflect")
11005 (uri (string-append "https://github.com/powermock/powermock/"
11006 "archive/powermock-" version ".tar.gz"))
11007 (file-name (string-append name "-" version ".tar.gz"))
11010 "0sbgi5vqq7k72wzcdjb20s370vyd4hsbnx71pzb8ishml3gy7fwy"))
11012 (search-patches "java-powermock-fix-java-files.patch"))))
11013 (build-system ant-build-system)
11015 `(#:jar-name "java-powermock-reflect.jar"
11017 #:source-dir "powermock-reflect/src/main/java"
11018 #:test-dir "powermock-reflect/src/test"))
11020 `(("java-objenesis" ,java-objenesis)))
11022 `(("junit" ,java-junit)
11023 ("cglib" ,java-cglib)
11025 ("hamcrest" ,java-hamcrest-core)
11026 ("assertj" ,java-assertj)))
11027 (home-page "https://github.com/powermock/powermock")
11028 (synopsis "Mock library extension framework")
11029 (description "PowerMock is a framework that extends other mock libraries
11030 such as EasyMock with more powerful capabilities. PowerMock uses a custom
11031 classloader and bytecode manipulation to enable mocking of static methods,
11032 constructors, final classes and methods, private methods, removal of static
11033 initializers and more. By using a custom classloader no changes need to be
11034 done to the IDE or continuous integration servers which simplifies adoption.")
11035 (license license:asl2.0)))
11037 (define-public java-powermock-core
11039 (inherit java-powermock-reflect)
11040 (name "java-powermock-core")
11042 `(#:jar-name "java-powermock-core.jar"
11043 #:source-dir "powermock-core/src/main/java"
11044 #:test-dir "powermock-core/src/test"
11045 #:tests? #f; requires powermock-api
11048 (modify-phases %standard-phases
11049 (add-before 'build 'copy-resources
11051 (copy-recursively "powermock-core/src/main/resources"
11055 `(("reflect" ,java-powermock-reflect)
11056 ("javassist" ,java-jboss-javassist)))
11058 `(("junit" ,java-junit)
11059 ("assertj" ,java-assertj)
11060 ("mockito" ,java-mockito-1)))))
11062 (define-public java-powermock-api-support
11064 (inherit java-powermock-reflect)
11065 (name "java-powermock-api-support")
11066 (build-system ant-build-system)
11068 `(#:jar-name "java-powermock-api-support.jar"
11070 #:source-dir "powermock-api/powermock-api-support/src/main/java"
11071 #:tests? #f)); no tests
11073 `(("core" ,java-powermock-core)
11074 ("reflect" ,java-powermock-reflect)))))
11076 (define-public java-powermock-modules-junit4-common
11078 (inherit java-powermock-reflect)
11079 (name "java-powermock-modules-junit4-common")
11080 (build-system ant-build-system)
11082 `(#:jar-name "java-powermock-modules-junit4-common.jar"
11084 #:source-dir "powermock-modules/powermock-module-junit4-common/src/main/java"
11085 #:test-dir "powermock-modules/powermock-module-junit4-common/src/test"))
11087 `(("core" ,java-powermock-core)
11088 ("easymock" ,java-easymock)
11089 ("reflect" ,java-powermock-reflect)
11090 ("hamcrest" ,java-hamcrest-core)
11091 ("cglib" ,java-cglib)))))
11093 (define-public java-powermock-modules-junit4
11095 (inherit java-powermock-reflect)
11096 (name "java-powermock-modules-junit4")
11097 (build-system ant-build-system)
11099 `(#:jar-name "java-powermock-modules-junit4.jar"
11101 #:source-dir "powermock-modules/powermock-module-junit4/src/main/java"
11102 #:test-dir "powermock-modules/powermock-module-junit4/src/test"
11104 (modify-phases %standard-phases
11105 (add-before 'build 'fix-junit-detection
11107 ;; Our junit version is 4.12-SNAPSHOT
11108 (substitute* (find-files "powermock-modules/powermock-module-junit4"
11109 "PowerMockJUnit4MethodValidator.java")
11110 (("4.12") "4.12-SNAPSHOT"))
11113 `(("core" ,java-powermock-core)
11114 ("reflect" ,java-powermock-reflect)
11115 ("common" ,java-powermock-modules-junit4-common)
11116 ("cglib" ,java-cglib)))
11118 `(("easymock" ,java-easymock)
11119 ("hamcrest" ,java-hamcrest-core)
11120 ("objenesis" ,java-objenesis)
11122 ("junit" ,java-junit)))))
11124 (define-public java-powermock-api-easymock
11126 (inherit java-powermock-reflect)
11127 (name "java-powermock-api-easymock")
11128 (build-system ant-build-system)
11130 `(#:jar-name "java-powermock-api-easymock.jar"
11132 #:source-dir "powermock-api/powermock-api-easymock/src/main/java"
11133 #:tests? #f; no tests
11135 (modify-phases %standard-phases
11136 (add-before 'build 'fix-file
11138 ;; FIXME: This looks wrong, but it fixes a build error.
11139 (with-directory-excursion "powermock-api/powermock-api-easymock"
11140 (substitute* "src/main/java/org/powermock/api/easymock/PowerMock.java"
11141 (("classLoader instanceof MockClassLoader") "false")
11142 (("\\(\\(MockClassLoader\\) classLoader\\).*;") ";")))
11145 `(("core" ,java-powermock-core)
11146 ("easymock" ,java-easymock)
11147 ("reflect" ,java-powermock-reflect)
11148 ("support" ,java-powermock-api-support)
11149 ("cglib" ,java-cglib)))))
11151 (define-public java-jboss-jms-api-spec
11153 (name "java-jboss-jms-api-spec")
11157 (uri (string-append "https://github.com/jboss/jboss-jms-api_spec/"
11158 "archive/jboss-jms-api_" version
11159 "_spec-1.0.1.Final.tar.gz"))
11162 "07bqblw9kq2i8q92bz70fvavq5xjfkaixl8xa0m0cypjgy82rb7m"))))
11163 (build-system ant-build-system)
11165 `(#:jar-name "java-jboss-jms-api_spec.jar"
11168 #:tests? #f)); no tests
11169 (home-page "https://github.com/jboss/jboss-jms-api_spec")
11170 (synopsis "Java Message Service API specification")
11171 (description "Java Message Service (JMS) API is used to send messages
11172 messages between two or more clients. It is a messaging standard that allows
11173 application components to create, send, receive, and read messages.")
11174 ; either gpl2 only with GPL Classpath Exception, or cddl.
11175 (license (list license:gpl2 license:cddl1.0))))
11177 (define-public java-mail
11183 (uri (string-append "https://github.com/javaee/javamail/archive/"
11184 "JAVAMAIL-1_6_0.tar.gz"))
11187 "1b4rg7fpj50ld90a71iz2m4gm3f5cnw18p3q3rbrrryjip46kx92"))))
11188 (build-system ant-build-system)
11190 `(#:jar-name "java-mail.jar"
11192 #:source-dir "mail/src/main/java"
11193 #:test-dir "mail/src/test"
11195 (list "**/CollectorFormatterTest.java"
11196 "**/CompactFormatterTest.java"
11197 "**/DurationFilterTest.java"
11198 "**/MailHandlerTest.java"
11199 "**/GetLocalAddressTest.java"
11200 ;; FIXME: both end with:
11201 ;; java.lang.ClassNotFoundException:
11202 ;; javax.mail.internet.MimeMultipartParseTest
11203 "**/MimeMultipartParseTest.java"
11204 "**/SearchTermSerializationTest.java")
11206 (modify-phases %standard-phases
11207 (add-before 'configure 'move-version.java
11209 (copy-file "mail/src/main/resources/javax/mail/Version.java"
11210 "mail/src/main/java/javax/mail/Version.java")
11212 (add-before 'build 'copy-resources
11214 (copy-recursively "mail/src/main/resources/META-INF"
11215 "build/classes/META-INF")
11218 `(("junit" ,java-junit)
11219 ("hamcrest" ,java-hamcrest-core)))
11220 (home-page "https://javaee.github.io/javamail/")
11221 (synopsis "Mail-related functionality in Java")
11222 (description "The JavaMail API provides a platform-independent and
11223 protocol-independent framework to build mail and messaging applications.")
11224 ;; General Public License Version 2 only ("GPL") or the Common Development
11225 ;; and Distribution License("CDDL")
11226 (license (list license:cddl1.1
11227 license:gpl2)))); with classpath exception
11229 (define-public java-jeromq
11231 (name "java-jeromq")
11235 (uri (git-reference
11236 (url "https://github.com/zeromq/jeromq")
11237 (commit (string-append "v" version))))
11238 (file-name (string-append name "-" version "-checkout"))
11241 "1gxkp7lv2ahymgrqdw94ncq54bmp4m4sw5m1x9gkp7l5bxn0xsyj"))
11242 (patches (search-patches "java-jeromq-fix-tests.patch"))))
11243 (build-system ant-build-system)
11245 `(#:jar-name "java-jeromq.jar"
11246 #:source-dir "src/main/java"
11250 "**/Abstract*.java"
11251 ;; Requires network
11252 "**/ZBeaconTest.java"
11254 "**/DealerSpecTest.java"
11255 "**/CustomDecoderTest.java"
11256 "**/CustomEncoderTest.java"
11257 "**/ConnectRidTest.java"
11258 "**/ReqSpecTest.java"
11259 "**/PushPullSpecTest.java"
11260 "**/PubSubHwmTest.java"
11261 "**/RouterSpecTest.java"
11262 "**/ProxyTest.java")))
11264 `(("java-jnacl" ,java-jnacl)))
11266 `(("java-hamcrest-core" ,java-hamcrest-core)
11267 ("junit" ,java-junit)))
11268 (home-page "http://zeromq.org/bindings:java")
11269 (synopsis "Java binding for 0MQ")
11270 (description "Jeromq provides the java bindings for 0MQ.")
11271 (license license:mpl2.0)))
11273 (define-public java-kafka-clients
11275 (name "java-kafka-clients")
11279 (uri (string-append "mirror://apache/kafka/" version "/kafka-"
11280 version "-src.tgz"))
11283 "1yxmnsmliwm7671q5yy9bl4jdqyyn00n26cggz9brwczx80w1vfq"))))
11284 (build-system ant-build-system)
11286 `(#:jar-name "java-kafka-clients.jar"
11288 #:source-dir "clients/src/main/java"
11289 #:test-dir "clients/src/test"
11292 ;; This file does not contain a class
11293 "**/IntegrationTest.java"
11294 ;; Requires network
11295 "**/ClientUtilsTest.java"
11296 ;; End with errors that seem related to our powermock
11297 "**/KafkaProducerTest.java"
11298 "**/BufferPoolTest.java")))
11300 `(("java-slf4j-api" ,java-slf4j-api)
11301 ("java-lz4" ,java-lz4)))
11303 `(("junit" ,java-junit)
11304 ("hamcrest" ,java-hamcrest-all)
11305 ("objenesis" ,java-objenesis)
11307 ("cglib" ,java-cglib)
11308 ("javassist" ,java-jboss-javassist)
11309 ("snappy" ,java-snappy)
11310 ("easymock" ,java-easymock)
11311 ("powermock" ,java-powermock-core)
11312 ("powermock-easymock" ,java-powermock-api-easymock)
11313 ("powermock-junit4-common" ,java-powermock-modules-junit4-common)
11314 ("powermock-junit4" ,java-powermock-modules-junit4)
11315 ("powermock-support" ,java-powermock-api-support)
11316 ("java-bouncycastle" ,java-bouncycastle)))
11317 (home-page "https://kafka.apache.org")
11318 (synopsis "Distributed streaming platform")
11319 (description "Kafka is a distributed streaming platform, which means:
11321 @item it can publish and subscribe to streams of records;
11322 @item it can store streams of records in a fault-tolerant way;
11323 @item it can process streams of records as they occur.
11325 ;; Either cddl or gpl2 only.
11326 (license (list license:cddl1.1; actually cddl1.1
11327 license:gpl2)))); with classpath exception
11329 (define-public java-jdom
11335 (uri (string-append "http://jdom.org/dist/binary/archive/jdom-"
11336 version ".tar.gz"))
11339 "07wdpm3jwwc9q38kmdw40fvbmv6jzjrkrf8m0zqs58f79a672wfl"))))
11340 (build-system ant-build-system)
11342 `(#:build-target "package"
11343 #:tests? #f; tests are run as part of the build process
11345 (modify-phases %standard-phases
11347 (install-jars "build")))))
11348 (home-page "http://jdom.org/")
11349 (synopsis "Access, manipulate, and output XML data")
11350 (description "Java-based solution for accessing, manipulating, and
11351 outputting XML data from Java code.")
11352 (license license:bsd-4)))
11354 (define-public java-geronimo-xbean-reflect
11356 (name "java-geronimo-xbean-reflect")
11360 (uri (svn-reference
11361 (url "https://svn.apache.org/repos/asf/geronimo/xbean/tags/xbean-4.5/")
11362 (revision 1807396)))
11363 (file-name (string-append name "-" version))
11366 "18q3i6jgm6rkw8aysfgihgywrdc5nvijrwnslmi3ww497jvri6ja"))))
11367 (build-system ant-build-system)
11369 `(#:jar-name "geronimo-xbean-reflect.jar"
11370 #:source-dir "xbean-reflect/src/main/java"
11371 #:test-dir "xbean-reflect/src/test"
11374 (list "**/Abstract*.java" "**/AsmParameterNameLoaderTest.java"
11375 "**/ObjectRecipeTest.java" "**/ParameterNameLoaderTest.java"
11376 "**/RecipeHelperTest.java" "**/XbeanAsmParameterNameLoaderTest.java")
11378 (modify-phases %standard-phases
11379 (add-before 'build 'fix-source
11381 (let ((dir "xbean-reflect/src/main/java/org/apache/xbean/recipe/"))
11382 ;; org.apache.xbean.asm6 is actually repackaged java-asm
11383 (substitute* (string-append dir "XbeanAsmParameterNameLoader.java")
11384 (("org.apache.xbean.asm5") "org.objectweb.asm"))
11386 (replace 'install (install-from-pom "xbean-reflect/pom.xml")))))
11388 `(("asm" ,java-asm)
11389 ("log4j" ,java-log4j-api)
11390 ("log4j-1.2" ,java-log4j-1.2-api)
11391 ("log4j-core" ,java-log4j-core)
11392 ("logging" ,java-commons-logging-minimal)))
11394 `(("java-geronimo-parent-pom" ,java-geronimo-parent-pom)))
11396 `(("junit" ,java-junit)))
11397 (home-page "https://geronimo.apache.org/maven/xbean/3.6/xbean-reflect/")
11398 (synopsis "Dependency injection helper")
11399 (description "Xbean-reflect provides very flexible ways to create objects
11400 and graphs of objects for dependency injection frameworks")
11401 (license license:asl2.0)))
11403 (define java-geronimo-genesis-2.1
11405 (name "java-geronimo-genesis")
11409 (uri (svn-reference
11410 (url (string-append "https://svn.apache.org/repos/asf/"
11411 "geronimo/genesis/tags/genesis-"
11413 (revision 1807396)))
11414 (file-name (string-append name "-" version "-source"))
11417 "119yn795jvnjf52si84q192s8wag1k013iabg78b7wnadssnnh31"))))
11418 (build-system ant-build-system)
11422 (modify-phases %standard-phases
11423 (delete 'configure)
11426 (install-pom-file "pom.xml"))
11427 (add-after 'install 'install-enforcer-rules
11428 (install-pom-file "genesis-enforcer-rules/pom.xml"))
11429 (add-after 'install 'install-flava
11430 (install-pom-file "genesis-default-flava/pom.xml"))
11431 (add-after 'install 'install-packaging
11432 (install-pom-file "genesis-packaging/pom.xml"))
11433 (add-after 'install-flava 'install-flava-java4
11434 (install-pom-file "genesis-default-flava/genesis-java1.4-flava/pom.xml"))
11435 (add-after 'install-flava 'install-flava-java5
11436 (install-pom-file "genesis-default-flava/genesis-java5-flava/pom.xml"))
11437 (add-after 'install-flava 'install-flava-java6
11438 (install-pom-file "genesis-default-flava/genesis-java6-flava/pom.xml")))))
11440 `(("apache-parent-pom" ,apache-parent-pom-13)))
11441 (home-page "https://geronimo.apache.org")
11442 (synopsis "Collection of maven POM files for the Geronimo project")
11443 (description "Apache Geronimo is a server runtime. This package contains
11444 only pom files used by other components in the Geronimo project.")
11445 (license license:asl2.0)))
11447 (define java-geronimo-parent-pom
11449 (inherit java-geronimo-xbean-reflect)
11450 (name "java-geronimo-parent-pom")
11454 (modify-phases %standard-phases
11455 (delete 'configure)
11458 (install-pom-file "pom.xml")))))
11460 `(("java-geronimo-genesis" ,java-geronimo-genesis-2.1)))))
11462 (define-public java-geronimo-xbean-bundleutils
11464 (inherit java-geronimo-xbean-reflect)
11465 (name "java-geronimo-xbean-bundleutils")
11467 `(#:jar-name "geronimo-xbean-bundleutils.jar"
11468 #:source-dir "xbean-bundleutils/src/main/java"
11469 #:test-dir "xbean-bundleutils/src/test"
11471 (modify-phases %standard-phases
11472 (add-before 'build 'fix-java
11474 ;; We use a more recent version of osgi, so this file requires
11475 ;; more interface method implementations.
11476 (substitute* "xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/DelegatingBundleContext.java"
11477 (("import org.osgi.framework.ServiceRegistration;")
11478 "import org.osgi.framework.ServiceRegistration;
11479 import org.osgi.framework.ServiceFactory;
11480 import java.util.Collection;
11481 import org.osgi.framework.ServiceObjects;")
11482 (("public Bundle getBundle\\(\\)")
11484 public <S> ServiceObjects<S> getServiceObjects(ServiceReference<S> reference) {
11485 throw new UnsupportedOperationException();
11488 public <S> ServiceRegistration<S> registerService(Class<S> clazz,
11489 ServiceFactory<S> factory, Dictionary<String, ?> properties) {
11490 throw new UnsupportedOperationException();
11492 public Bundle getBundle()"))
11495 `(("java-slf4j" ,java-slf4j-api)
11496 ("java-asm" ,java-asm)
11497 ("java-osgi-framework" ,java-osgi-framework)
11498 ("java-eclipse-osgi" ,java-eclipse-osgi)
11499 ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin)))))
11501 (define-public java-geronimo-xbean-asm-util
11503 (inherit java-geronimo-xbean-reflect)
11504 (name "java-geronimo-xbean-asm-util")
11506 `(#:jar-name "geronimo-xbean-asm-util.jar"
11507 #:source-dir "xbean-asm-util/src/main/java"
11508 #:tests? #f)); no tests
11510 `(("java-asm" ,java-asm)))
11511 (native-inputs '())))
11513 (define-public java-geronimo-xbean-finder
11515 (inherit java-geronimo-xbean-reflect)
11516 (name "java-geronimo-xbean-finder")
11518 `(#:jar-name "geronimo-xbean-finder.jar"
11519 #:source-dir "xbean-finder/src/main/java"
11520 #:test-dir "xbean-finder/src/test"))
11522 `(("java-slf4j-api" ,java-slf4j-api)
11523 ("java-asm" ,java-asm)
11524 ("java-geronimo-xbean-bundleutils" ,java-geronimo-xbean-bundleutils)
11525 ("java-geronimo-xbean-asm-util" ,java-geronimo-xbean-asm-util)
11526 ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin)
11527 ("java-osgi-framework" ,java-osgi-framework)))
11529 `(("java-junit" ,java-junit)
11530 ("java-hamcrest-core" ,java-hamcrest-core)))))
11532 (define-public java-gson
11538 (uri (string-append "https://github.com/google/gson/archive/"
11539 "gson-parent-" version ".tar.gz"))
11542 "1j4qnp7v046q0k48c4kyf69sxaasx2h949d3cqwsm3kzxms3x0f9"))))
11543 (build-system ant-build-system)
11545 `(#:jar-name "gson.jar"
11546 #:source-dir "gson/src/main/java"
11547 #:test-dir "gson/src/test"))
11549 `(("java-junit" ,java-junit)
11550 ("java-hamcrest-core" ,java-hamcrest-core)))
11551 (home-page "https://github.com/google/gson")
11552 (synopsis "Java serialization/deserialization library from/to JSON")
11553 (description "Gson is a Java library that can be used to convert Java
11554 Objects into their JSON representation. It can also be used to convert a JSON
11555 string to an equivalent Java object. Gson can work with arbitrary Java objects
11556 including pre-existing objects that you do not have source-code of.")
11557 (license license:asl2.0)))
11559 (define-public java-hawtjni
11561 (name "java-hawtjni")
11565 (uri (string-append "https://github.com/fusesource/hawtjni/archive/"
11566 "hawtjni-project-" version ".tar.gz"))
11569 "1bqfd732rmh6svyx17fpw9175gc9gzkcbyps2yyrf50c3zzjas6g"))))
11570 (build-system ant-build-system)
11572 `(#:jar-name "hawtjni.jar"
11573 #:source-dir "hawtjni-generator/src/main/java:hawtjni-runtime/src/main/java"
11574 #:tests? #f; no tests
11576 (modify-phases %standard-phases
11577 (add-before 'build 'build-native
11578 (lambda* (#:key inputs #:allow-other-keys)
11579 (let ((include (string-append "-I" (assoc-ref inputs "jdk") "/include/linux")))
11580 (with-directory-excursion "hawtjni-generator/src/main/resources/"
11581 (invoke "gcc" "-c" "hawtjni.c" "-o" "hawtjni.o"
11582 "-fPIC" "-O2" include)
11583 (invoke "gcc" "-c" "hawtjni-callback.c" "-o" "hawtjni-callback.o"
11584 "-fPIC" "-O2" include)
11585 (invoke "gcc" "-o" "libhawtjni.so" "-shared"
11586 "hawtjni.o" "hawtjni-callback.o")))
11588 (add-after 'install 'install-native
11589 (lambda* (#:key outputs #:allow-other-keys)
11590 (let* ((out (assoc-ref outputs "out"))
11591 (lib (string-append out "/lib"))
11592 (inc (string-append out "/include")))
11593 (with-directory-excursion "hawtjni-generator/src/main/resources/"
11594 (install-file "libhawtjni.so" lib)
11595 (install-file "hawtjni.h" inc)))
11597 (add-before 'install 'install-parent
11598 (install-pom-file "pom.xml"))
11600 (install-from-pom "hawtjni-runtime/pom.xml")))))
11602 `(("java-commons-cli" ,java-commons-cli)
11603 ("java-asm" ,java-asm)
11604 ("java-geronimo-xbean-finder" ,java-geronimo-xbean-finder)))
11605 (home-page "https://fusesource.github.io/hawtjni/")
11606 (synopsis "JNI code generator")
11607 (description "HawtJNI is a code generator that produces the JNI code needed
11608 to implement Java native methods. It is based on the jnigen code generator
11609 that is part of the SWT Tools project.")
11610 (license license:asl2.0)))
11612 (define-public java-jansi-native
11614 (name "java-jansi-native")
11618 (uri (string-append "https://github.com/fusesource/jansi-native/"
11619 "archive/jansi-native-" version ".tar.gz"))
11622 "0j2ydlgxbzbgshqkwghbxxxnbnx1mmjgd6k5fw6xfvxw1z956yqf"))))
11623 (build-system ant-build-system)
11625 `(#:jar-name "jansi-native.jar"
11626 #:source-dir "src/main/java"
11627 #:tests? #f; no tests
11629 (modify-phases %standard-phases
11630 (add-before 'build 'build-native
11631 (lambda* (#:key inputs #:allow-other-keys)
11632 ;; there are more required files for windows in windows/
11633 (with-directory-excursion "src/main/native-package/src"
11634 (substitute* "jansi_ttyname.c"
11635 (("#include \"jansi_.*") ""))
11636 (invoke "gcc" "-c" "jansi_ttyname.c" "-o" "jansi_ttyname.o"
11637 (string-append "-I" (assoc-ref inputs "java-hawtjni")
11639 (string-append "-I" (assoc-ref inputs "jdk")
11642 (invoke "gcc" "-o" "libjansi.so" "-shared" "jansi_ttyname.o"))))
11643 (add-before 'build 'install-native
11645 (let ((dir (string-append "build/classes/META-INF/native/"
11646 ,(match (%current-system)
11647 ((or "i686-linux" "armhf-linux")
11649 ((or "x86_64-linux" "aarch64-linux"
11652 (_ "unknown-kernel")))))
11653 (install-file "src/main/native-package/src/libjansi.so" dir))
11655 (add-after 'install 'install-native
11656 (lambda* (#:key outputs #:allow-other-keys)
11657 (install-file "src/main/native-package/src/jansi.h"
11658 (string-append (assoc-ref outputs "out") "/include"))
11660 (add-before 'install 'fix-pom
11662 ;; pom contains variables to complete name, but we don't support that
11663 (substitute* "pom.xml"
11664 (("\\$\\{platform\\}") "native"))
11667 (install-from-pom "pom.xml")))))
11669 `(("java-hawtjni" ,java-hawtjni)))
11670 (home-page "https://fusesource.github.io/jansi/")
11671 (synopsis "Native library for jansi")
11672 (description "This package provides the native library for jansi, a small
11673 Java library that allows you to use ANSI escape sequences to format your
11675 (license license:asl2.0)))
11677 (define-public java-jansi
11679 (name "java-jansi")
11683 (uri (string-append "https://github.com/fusesource/jansi/archive/"
11684 "jansi-project-" version ".tar.gz"))
11687 "11kh3144i3fzp21dpy8zg52mjmsr214k7km9p8ly0rqk2px0qq2z"))))
11688 (build-system ant-build-system)
11690 `(#:jar-name "jansi.jar"
11691 #:source-dir "jansi/src/main/java"
11692 #:test-dir "jansi/src/test"
11694 (modify-phases %standard-phases
11695 (add-after 'check 'clear-term
11697 (invoke "echo" "-e" "\\e[0m")))
11698 (add-before 'install 'install-parent
11699 (install-pom-file "pom.xml"))
11700 (add-before 'install 'fix-pom
11702 ;; pom adds jansi native versions for different platforms, but we
11703 ;; only need one, so use native instead
11704 (substitute* "jansi/pom.xml"
11705 (("windows32") "native")
11706 (("windows64") "native")
11708 (("linux32") "native")
11709 (("linux64") "native")
11710 (("freebsd32") "native")
11711 (("freebsd64") "native"))
11714 (install-from-pom "jansi/pom.xml")))))
11716 `(("java-jansi-native" ,java-jansi-native)))
11718 `(("java-junit" ,java-junit)
11719 ("java-hamcrest-core" ,java-hamcrest-core)))
11720 (home-page "https://fusesource.github.io/jansi/")
11721 (synopsis "Portable ANSI escape sequences")
11722 (description "Jansi is a Java library that allows you to use ANSI escape
11723 sequences to format your console output which works on every platform.")
11724 (license license:asl2.0)))
11726 (define-public java-jboss-el-api-spec
11728 (name "java-jboss-el-api-spec")
11732 (uri (string-append "https://github.com/jboss/jboss-el-api_spec/"
11733 "archive/jboss-el-api_" version
11734 "_spec-1.0.7.Final.tar.gz"))
11737 "1j45ljxalwlibxl7g7iv952sjxkw275m8vyxxij8l6wdd5pf0pdh"))))
11738 (build-system ant-build-system)
11740 `(#:jar-name "java-jboss-el-api_spec.jar"
11741 #:modules ((guix build ant-build-system)
11743 (guix build maven pom)
11744 (guix build java-utils)
11747 (modify-phases %standard-phases
11748 ;; the origin of javax.el:javax.el-api is unknown, so we use this package
11749 ;; instead, which implements the same thing. We override the pom file
11750 ;; to "rename" the package so it can be found by maven.
11751 (add-before 'install 'override-pom
11753 (delete-file "pom.xml")
11754 (with-output-to-file "pom.xml"
11758 (modelVersion "4.0.0")
11760 (groupId "javax.el")
11761 (artifactId "javax.el-api")
11762 (version "3.0")))))
11765 (install-from-pom "pom.xml")))))
11767 `(("java-junit" ,java-junit)))
11768 (home-page "https://github.com/jboss/jboss-el-api_spec")
11769 (synopsis "JSR-341 expression language 3.0 API")
11770 (description "This package contains an implementation of the JSR-341
11771 specification for the expression language 3.0. It implements an expression
11772 language inspired by ECMAScript and XPath. This language is used with
11773 JavaServer Pages (JSP).")
11774 ;; Either GPL2 only or CDDL.
11775 (license (list license:gpl2 license:cddl1.1))))
11777 (define-public java-jboss-interceptors-api-spec
11779 (name "java-jboss-interceptors-api-spec")
11783 (uri (string-append "https://github.com/jboss/jboss-interceptors-api_spec/"
11784 "archive/jboss-interceptors-api_" version
11785 "_spec-1.0.0.Final.tar.gz"))
11788 "0wv8x0jp9a5qxlrgkhb5jdk2gr6vi87b4j4kjb8ryxiy9gn8g51z"))))
11789 (build-system ant-build-system)
11791 `(#:jar-name "java-jboss-interceptors-api_spec.jar"
11794 #:tests? #f; no tests
11795 #:modules ((guix build ant-build-system)
11797 (guix build maven pom)
11798 (guix build java-utils)
11801 (modify-phases %standard-phases
11802 ;; the origin of javax.interceptor:javax.interceptor-api is unknown,
11803 ;; so we use this package instead, which implements the same thing.
11804 ;; We override the pom file to "rename" the package so it can be found
11806 (add-before 'install 'override-pom
11808 (delete-file "pom.xml")
11809 (with-output-to-file "pom.xml"
11813 (modelVersion "4.0.0")
11814 (name "interceptor-api")
11815 (groupId "javax.interceptor")
11816 (artifactId "javax.interceptor-api")
11817 (version "3.0")))))
11820 (install-from-pom "pom.xml")))))
11821 (home-page "https://github.com/jboss/jboss-interceptors-api_spec")
11822 (synopsis "Interceptors 1.2 API classes from JSR 318")
11823 (description "Java-jboss-interceptors-api-spec implements the Interceptors
11824 API. Interceptors are used to interpose on business method invocations and
11826 ;; Either GPL2 only or CDDL.
11827 (license (list license:gpl2 license:cddl1.1))))
11829 (define-public java-cdi-api
11831 (name "java-cdi-api")
11835 (uri (string-append "https://github.com/cdi-spec/cdi/archive/"
11836 version ".tar.gz"))
11837 (file-name (string-append name "-" version ".tar.gz"))
11840 "1iv8b8bp07c5kmqic14jsr868vycjv4qv02lf3pkgp9z21mnfg5y"))))
11841 (build-system ant-build-system)
11843 `(#:source-dir "api/src/main/java"
11844 #:jar-name "java-cdi-api.jar"
11845 #:test-dir "api/src/test"
11847 #:tests? #f; Tests fail because we don't have a CDI provider yet
11849 (modify-phases %standard-phases
11851 (install-from-pom "api/pom.xml")))))
11853 `(("java-javax-inject" ,java-javax-inject)
11854 ("java-jboss-el-api-spec" ,java-jboss-el-api-spec)
11855 ("java-jboss-interceptors-api-spec" ,java-jboss-interceptors-api-spec)
11856 ("java-weld-parent-pom" ,java-weld-parent-pom)))
11858 `(("java-testng" ,java-testng)
11859 ("java-hamcrest-core" ,java-hamcrest-core)))
11860 (home-page "http://cdi-spec.org/")
11861 (synopsis "Contexts and Dependency Injection APIs")
11862 (description "Java-cdi-api contains the required APIs for Contexts and
11863 Dependency Injection (CDI).")
11864 (license license:asl2.0)))
11866 (define-public java-joda-convert
11868 (name "java-joda-convert")
11872 (uri (string-append "https://github.com/JodaOrg/joda-convert/archive/v"
11873 version ".tar.gz"))
11874 (file-name (string-append name "-" version ".tar.gz"))
11877 "0vp346xz7dh9br4q7xazhc7hvzf76a6hf95fki9bg67q5jr0kjh7"))))
11878 (build-system ant-build-system)
11880 `(#:jar-name (string-append ,name "-" ,version ".jar")
11881 #:source-dir "src/main/java"
11882 #:test-include (list "**/Test*.java")
11883 ;; Contains only interfaces and base classes (no test)
11884 #:test-exclude (list "**/test*/**.java")))
11886 `(("java-guava" ,java-guava)))
11888 `(("java-junit" ,java-junit)
11889 ("java-hamcrest-core" ,java-hamcrest-core)))
11890 (home-page "https://www.joda.org/joda-convert/")
11891 (synopsis "Conversion between Objects and Strings")
11892 (description "Joda-Convert provides a small set of classes to aid
11893 conversion between Objects and Strings. It is not intended to tackle the
11894 wider problem of Object to Object transformation.")
11895 (license license:asl2.0)))
11897 (define-public java-joda-time
11899 (name "java-joda-time")
11903 (uri (string-append "https://github.com/JodaOrg/joda-time/archive/v"
11904 version ".tar.gz"))
11905 (file-name (string-append name "-" version ".tar.gz"))
11908 "1i9x91mi7yg2pasl0k3912f1pg46n37sps6rdb0v1gs8hj9ppwc1"))))
11909 (build-system ant-build-system)
11911 `(#:jar-name "java-joda-time.jar"
11912 #:source-dir "src/main/java"
11913 #:test-include (list "**/Test*.java")
11914 ;; There is no runnable test in these files
11915 #:test-exclude (list "**/Test*Chronology.java" "**/Test*Field.java")
11917 (modify-phases %standard-phases
11918 (add-after 'build 'build-resources
11920 (mkdir-p "build/classes/org/joda/time/tz/data")
11921 (mkdir-p "build/classes/org/joda/time/format")
11922 ;; This will produce the following exception:
11923 ;; java.io.IOException: Resource not found: "org/joda/time/tz/data/ZoneInfoMap"
11924 ;; which is normal, because it doesn't exist yet. It still generates
11925 ;; the same file as in the binary one can find on maven.
11926 (invoke "java" "-cp"
11927 (string-append "build/classes:" (getenv "CLASSPATH"))
11928 "org.joda.time.tz.ZoneInfoCompiler"
11929 "-src" "src/main/java/org/joda/time/tz/src"
11930 "-dst" "build/classes/org/joda/time/tz/data"
11931 "africa" "antarctica" "asia" "australasia"
11932 "europe" "northamerica" "southamerica"
11933 "pacificnew" "etcetera" "backward" "systemv")
11934 (for-each (lambda (f)
11935 (copy-file f (string-append
11936 "build/classes/org/joda/time/format/"
11938 (find-files "src/main/java/org/joda/time/format" ".*.properties"))
11940 (add-before 'install 'regenerate-jar
11942 ;; We need to regenerate the jar file to add generated data.
11943 (delete-file "build/jar/java-joda-time.jar")
11944 (invoke "ant" "jar")))
11945 (add-before 'check 'copy-test-resources
11947 (mkdir-p "build/test-classes/org/joda/time/tz/data")
11948 (copy-file "src/test/resources/tzdata/ZoneInfoMap"
11949 "build/test-classes/org/joda/time/tz/data/ZoneInfoMap")
11950 (copy-recursively "src/test/resources" "build/test-classes")
11953 `(("java-joda-convert" ,java-joda-convert)))
11955 `(("java-junit" ,java-junit)
11956 ("java-hamcrest-core" ,java-hamcrest-core)
11957 ("tzdata" ,tzdata)))
11958 (home-page "https://www.joda.org/joda-time/")
11959 (synopsis "Replacement for the Java date and time classes")
11960 (description "Joda-Time is a replacement for the Java date and time
11961 classes prior to Java SE 8.")
11962 (license license:asl2.0)))
11964 (define-public java-xerces
11966 (name "java-xerces")
11971 (uri (string-append "mirror://apache/xerces/j/source/"
11972 "Xerces-J-src." version ".tar.gz"))
11974 (base32 "0494kq36gw3nah19ifb720vwxbpg4ww0k6m3zq6wyanw6a083p6s"))
11975 (patches (search-patches
11976 "java-xerces-xjavac_taskdef.patch"
11977 "java-xerces-build_dont_unzip.patch"
11978 "java-xerces-bootclasspath.patch"))))
11979 (build-system ant-build-system)
11981 `(#:tests? #f;; Test files are not present
11982 #:test-target "test"
11985 (modify-phases %standard-phases
11986 (add-after 'unpack 'create-build.properties
11987 (lambda* (#:key inputs #:allow-other-keys)
11988 (let ((jaxp (assoc-ref inputs "java-jaxp"))
11989 (resolver (assoc-ref inputs "java-apache-xml-commons-resolver")))
11990 (with-output-to-file "build.properties"
11993 "jar.jaxp = ~a/share/java/jaxp.jar~@
11994 jar.apis-ext = ~a/share/java/jaxp.jar~@
11995 jar.resolver = ~a/share/java/xml-resolver.jar~%"
11996 jaxp jaxp resolver)))
11997 ;; Make xerces use our version of jaxp in tests
11998 (substitute* "build.xml"
12000 (string-append jaxp "/share/java/jaxp.jar"))
12001 (("\\$\\{tools.dir\\}/\\$\\{jar.apis\\}")
12004 (replace 'install (install-jars "build")))))
12006 `(("java-apache-xml-commons-resolver" ,java-apache-xml-commons-resolver)
12007 ("java-jaxp" ,java-jaxp)))
12008 (home-page "https://xerces.apache.org/xerces2-j/")
12009 (synopsis "Validating XML parser for Java with DOM level 3 support")
12010 (description "The Xerces2 Java parser is the reference implementation of
12011 XNI, the Xerces Native Interface, and also a fully conforming XML Schema
12014 Xerces2-J supports the following standards and APIs:
12017 @item eXtensible Markup Language (XML) 1.0 Second Edition Recommendation
12018 @item Namespaces in XML Recommendation
12019 @item Document Object Model (DOM) Level 2 Core, Events, and Traversal and
12020 Range Recommendations
12021 @item Simple API for XML (SAX) 2.0.1 Core and Extension
12022 @item Java APIs for XML Processing (JAXP) 1.2.01
12023 @item XML Schema 1.0 Structures and Datatypes Recommendations
12024 @item Experimental implementation of the Document Object Model (DOM) Level 3
12025 Core and Load/Save Working Drafts
12026 @item Provides a partial implementation of the XML Inclusions (XInclude) W3C
12027 Candidate Recommendation
12030 Xerces is now able to parse documents written according to the XML 1.1
12031 Candidate Recommendation, except that it does not yet provide an option to
12032 enable normalization checking as described in section 2.13 of this
12033 specification. It also handles namespaces according to the XML Namespaces 1.1
12034 Candidate Recommendation, and will correctly serialize XML 1.1 documents if
12035 the DOM level 3 load/save API's are in use.")
12036 (license license:asl2.0)))
12038 (define-public java-jakarta-regexp
12040 (name "java-jakarta-regexp")
12045 (uri (string-append
12046 "https://archive.apache.org/dist/jakarta/regexp/jakarta-regexp-"
12047 version ".tar.gz"))
12050 "0zg9rmyif48dck0cv6ynpxv23mmcsx265am1fnnxss7brgw0ms3r"))))
12051 (build-system ant-build-system)
12053 `(#:test-target "test"
12055 (modify-phases %standard-phases
12057 (lambda* (#:key outputs #:allow-other-keys)
12058 (let* ((out (assoc-ref outputs "out"))
12059 (out-share (string-append out "/share/java")))
12060 (mkdir-p out-share)
12061 (for-each (lambda (name)
12062 (install-file name out-share))
12063 (find-files "build" "^jakarta-regexp-.*\\.jar$"))
12065 (home-page "https://attic.apache.org/projects/jakarta-regexp.html")
12066 (synopsis "Regular expression parser generator for Java.")
12067 (description "@code{jakarta-regexp} is an old regular expression parser
12068 generator for Java.")
12069 (license license:asl2.0)))
12071 (define-public java-jline
12073 (name "java-jline")
12077 (uri (string-append "https://github.com/jline/jline1/archive/jline-"
12078 version ".tar.gz"))
12081 "0bi3p6vrh7a6v0fbpb6rx9plpmx5zk3lr352xzdbz2jcxg499wir"))))
12082 (build-system ant-build-system)
12084 `(#:jar-name "jline.jar"
12085 #:source-dir "src/main/java"
12086 #:test-dir "src/test"
12088 (modify-phases %standard-phases
12089 (add-before 'build 'copy-resources
12091 (copy-recursively "src/main/resources" "build/classes")
12094 `(("java-junit" ,java-junit)))
12095 (home-page "https://jline.github.io")
12096 (synopsis "Console input handling library")
12097 (description "JLine is a Java library for handling console input. It is
12098 similar in functionality to BSD editline and GNU readline but with additional
12099 features that bring it on par with the Z shell line editor.")
12100 (license license:bsd-3)))
12102 (define-public java-jline-2
12104 (inherit java-jline)
12108 (uri (string-append "https://github.com/jline/jline2/archive/jline-"
12109 version ".tar.gz"))
12112 "1c6qa26mf0viw8hg4jnv72s7i1qb1gh1l8rrzcdvqhqhx82rkdlf"))))
12115 ,@(package-arguments java-jline)))
12117 `(("java-jansi" ,java-jansi)
12118 ("java-jansi-native" ,java-jansi-native)))
12120 `(("java-powermock-modules-junit4" ,java-powermock-modules-junit4)
12121 ("java-powermock-modules-junit4-common" ,java-powermock-modules-junit4-common)
12122 ("java-powermock-api-easymock" ,java-powermock-api-easymock)
12123 ("java-powermock-api-support" ,java-powermock-api-support)
12124 ("java-powermock-core" ,java-powermock-core)
12125 ("java-powermock-reflect" ,java-powermock-reflect)
12126 ("java-easymock" ,java-easymock)
12127 ("java-jboss-javassist" ,java-jboss-javassist)
12128 ("java-objenesis" ,java-objenesis)
12129 ("java-asm" ,java-asm)
12130 ("java-hamcrest-core" ,java-hamcrest-core)
12131 ("java-cglib" ,java-cglib)
12132 ("java-junit" ,java-junit)
12133 ("java-hawtjni" ,java-hawtjni)))))
12135 (define-public java-xmlunit
12137 (name "java-xmlunit")
12141 (uri (string-append "https://github.com/xmlunit/xmlunit/archive/v"
12142 version ".tar.gz"))
12143 (file-name (string-append name "-" version ".tar.gz"))
12146 "035rivlnmwhfqj0fzviciv0bkh1h95ps1iwnh2kjcvdbk5nccm4z"))))
12147 (build-system ant-build-system)
12149 `(#:jar-name "java-xmlunit.jar"
12150 #:source-dir "xmlunit-core/src/main/java"
12151 #:test-dir "xmlunit-core/src/test"
12153 (modify-phases %standard-phases
12154 (add-before 'check 'copy-test-resources
12155 (lambda* (#:key inputs #:allow-other-keys)
12156 (copy-recursively (assoc-ref inputs "resources") "../test-resources")
12159 `(("java-junit" ,java-junit)
12160 ("java-mockito-1" ,java-mockito-1)
12161 ("java-hamcrest-all" ,java-hamcrest-all)
12162 ("java-objenesis" ,java-objenesis)
12163 ("java-asm" ,java-asm)
12164 ("java-cglib" ,java-cglib)
12168 (uri (git-reference
12169 (url "https://github.com/xmlunit/test-resources")
12170 (commit "a590d2ae865c3e0455691d76ba8eefccc2215aec")))
12171 (file-name "java-xmlunit-test-resources")
12174 "0r0glj37pg5l868yjz78gckr91cs8fysxxbp9p328dssssi91agr"))))))
12175 (home-page "https://www.xmlunit.org/")
12176 (synopsis "XML output testing")
12177 (description "XMLUnit provides you with the tools to verify the XML you
12178 emit is the one you want to create. It provides helpers to validate against
12179 an XML Schema, assert the values of XPath queries or compare XML documents
12180 against expected outcomes.")
12181 (license license:asl2.0)))
12183 (define-public java-xmlunit-legacy
12185 (inherit java-xmlunit)
12186 (name "java-xmlunit-legacy")
12188 `(#:jar-name "java-xmlunit-legacy.jar"
12189 #:source-dir "xmlunit-legacy/src/main/java"
12190 #:test-dir "xmlunit-legacy/src/test"))
12192 `(("java-xmlunit" ,java-xmlunit)
12193 ("java-junit" ,java-junit)))
12195 `(("java-mockito-1" ,java-mockito-1)))))
12197 (define-public java-xmlunit-matchers
12199 (inherit java-xmlunit)
12200 (name "java-xmlunit-matchers")
12202 `(#:jar-name "java-xmlunit-matchers.jar"
12203 #:source-dir "xmlunit-matchers/src/main/java"
12204 #:test-dir "xmlunit-matchers/src/test"
12206 ;; Cannot open xsd for http://www.xmlunit.org/test-support/Book.xsd
12207 (list "**/ValidationMatcherTest.java")
12209 (modify-phases %standard-phases
12210 (add-before 'build 'copy-test-class
12212 (copy-file "xmlunit-core/src/test/java/org/xmlunit/TestResources.java"
12213 "xmlunit-matchers/src/test/java/org/xmlunit/TestResources.java")
12215 (add-before 'build 'fix-test-resources-path
12217 (substitute* (find-files "xmlunit-matchers/src/test" ".*.java")
12218 (("../test-resources") "test-resources"))
12220 (add-before 'check 'copy-test-resources
12221 (lambda* (#:key inputs #:allow-other-keys)
12222 (copy-recursively (assoc-ref inputs "resources") "test-resources")
12225 `(("java-xmlunit" ,java-xmlunit)
12226 ("java-junit" ,java-junit)))))
12228 (define-public java-openchart2
12230 (name "java-openchart2")
12234 (uri (string-append "http://download.approximatrix.com/openchart2/"
12235 "openchart2-" version ".source.zip"))
12238 "1xq96zm5r02n1blja0072jmmsifmxc40lbyfbnmcnr6mw42frh4g"))))
12239 (build-system ant-build-system)
12241 `(#:test-target "test"
12243 (modify-phases %standard-phases
12244 (add-after 'unpack 'fix-junit-errors
12246 (with-directory-excursion "unittest/src/com/approximatrix/charting/"
12247 (substitute* '("coordsystem/ticklocator/NumericXTickLocatorTest.java"
12248 "coordsystem/ticklocator/NumericYTickLocatorTest.java"
12249 "coordsystem/ticklocator/ObjectXTickLocatorTest.java"
12250 "model/DefaultChartDataModelConstraintsTest.java"
12251 "model/MultiScatterDataModelConstraintsTest.java"
12252 "model/threedimensional/DotPlotDataModelConstraintsTest.java")
12253 (("(assertEquals[^;]+);" before _)
12254 (string-append (string-drop-right before 2) ", 1E-6);"))))
12256 (replace 'install (install-jars ".")))))
12259 ("java-junit" ,java-junit)
12260 ("java-hamcrest-core" ,java-hamcrest-core)))
12261 (home-page "https://approximatrix.com/products/openchart2/")
12262 (synopsis "Simple plotting for Java")
12263 (description "Openchart2 provides a simple, yet powerful, interface for
12264 Java programmers to create two-dimensional charts and plots. The library
12265 features an assortment of graph styles, including advanced scatter plots, bar
12266 graphs, and pie charts.")
12267 (license license:lgpl2.1+)))
12269 (define-public java-commons-httpclient
12271 (name "java-commons-httpclient")
12275 (uri (string-append "mirror://apache/httpcomponents/"
12276 "commons-httpclient/source/commons-httpclient-"
12277 version "-src.tar.gz"))
12280 "1wlpn3cfy3d4inxy6g7wxcsa8p7sshn6aldk9y4ia3lb879rd97r"))))
12281 (build-system ant-build-system)
12283 `(#:build-target "compile"
12284 #:test-target "test"
12285 #:tests? #f; requires junit-textui (junit 3)
12287 (modify-phases %standard-phases
12288 (add-before 'build 'fix-accent
12290 (for-each (lambda (file)
12291 (with-fluids ((%default-port-encoding "ISO-8859-1"))
12293 (("\\* @author Ortwin .*") "* @author Ortwin Glueck\n"))))
12294 '("src/java/org/apache/commons/httpclient/HttpContentTooLargeException.java"
12295 "src/examples/TrivialApp.java" "src/examples/ClientApp.java"
12296 "src/test/org/apache/commons/httpclient/TestHttps.java"
12297 "src/test/org/apache/commons/httpclient/TestURIUtil2.java"))
12300 (lambda* (#:key outputs #:allow-other-keys)
12301 (invoke "ant" "dist"
12302 (string-append "-Ddist.home=" (assoc-ref outputs "out")
12306 `(("java-commons-logging" ,java-commons-logging-minimal)
12307 ("java-commons-codec" ,java-commons-codec)))
12308 (home-page "https://hc.apache.org")
12309 (synopsis "HTTP/1.1 compliant HTTP agent implementation")
12310 (description "This package contains an HTTP/1.1 compliant HTTP agent
12311 implementation. It also provides reusable components for client-side
12312 authentication, HTTP state management, and HTTP connection management.")
12313 (license license:asl2.0)))
12315 (define-public java-commons-vfs
12317 (name "java-commons-vfs")
12321 (uri (string-append "mirror://apache/commons/vfs/source/"
12322 "commons-vfs2-distribution-" version "-src.tar.gz"))
12323 (file-name (string-append name "-" version ".tar.gz"))
12326 "1cnq1iaghbp4cslpnvwbp83i5v234x87irssqynhwpfgw7caf1s3"))
12327 (modules '((guix build utils)))
12330 (for-each delete-file
12331 (find-files "." "\\.jar$"))
12333 (build-system ant-build-system)
12335 `(#:jar-name "commons-vfs.jar"
12336 #:source-dir "commons-vfs2/src/main/java"
12337 #:test-dir "commons-vfs2/src/test"
12338 ; FIXME: tests depend on many things: apache sshd, hadoop, ftpserver, ...
12341 (modify-phases %standard-phases
12342 (add-before 'build 'remove-hadoop-and-webdav
12343 ; Remove these files as they are not required and depend on difficult
12346 (for-each delete-file-recursively
12347 '("commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/webdav"
12348 "commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/hdfs"))
12351 `(("java-commons-collections4" ,java-commons-collections4)
12352 ("java-commons-compress" ,java-commons-compress)
12353 ("java-commons-httpclient" ,java-commons-httpclient)
12354 ("java-commons-logging-minimal" ,java-commons-logging-minimal)
12355 ("java-commons-net" ,java-commons-net)
12356 ("java-jsch" ,java-jsch)))
12357 (home-page "https://commons.apache.org/proper/commons-vfs/")
12358 (synopsis "Java file system library")
12359 (description "Commons VFS provides a single API for accessing various
12360 different file systems. It presents a uniform view of the files from various
12361 different sources, such as the files on local disk, on an HTTP server, or
12362 inside a Zip archive.")
12363 (license license:asl2.0)))
12365 (define-public java-jakarta-oro
12367 (name "java-jakarta-oro")
12371 (uri (string-append "mirror://apache/jakarta/oro/"
12372 "jakarta-oro-" version ".tar.gz"))
12375 "0rpmnsskiwmsy8r0sckz5n5dbvh3vkxx8hpm177c754r8xy3qksc"))
12376 (modules '((guix build utils)))
12379 (delete-file (string-append "jakarta-oro-" ,version ".jar"))
12381 (build-system ant-build-system)
12383 `(#:build-target "package"
12384 #:make-flags (list "-DDATE" "(no recorded date for reproducibility)")
12385 #:tests? #f; tests are run as part of the build process
12387 (modify-phases %standard-phases
12389 (install-jars ,(string-append "jakarta-oro-" version))))))
12390 (home-page "https://jakarta.apache.org/oro/")
12391 (synopsis "Text-processing for Java")
12392 (description "The Jakarta-ORO Java classes are a set of text-processing
12393 Java classes that provide Perl5 compatible regular expressions, AWK-like
12394 regular expressions, glob expressions, and utility classes for performing
12395 substitutions, splits, filtering filenames, etc. This library is the successor
12396 of the OROMatcher, AwkTools, PerlTools, and TextTools libraries originally
12398 (license license:asl1.1)))
12400 (define-public java-native-access
12402 (name "java-native-access")
12406 (uri (string-append "https://github.com/java-native-access/jna/"
12407 "archive/" version ".tar.gz"))
12408 (file-name (string-append name "-" version ".tar.gz"))
12411 "0zrpzkib6b905i018a9pqlzkqinphywr6y4jwv6mwp63jjqvqkd9"))
12412 (modules '((guix build utils)))
12415 (for-each delete-file (find-files "." ".*.jar"))
12416 (delete-file-recursively "native/libffi")
12417 (delete-file-recursively "dist")
12419 (build-system ant-build-system)
12421 `(#:tests? #f; FIXME: tests require reflections.jar
12422 #:test-target "test"
12423 #:make-flags (list "-Ddynlink.native=true")
12425 (modify-phases %standard-phases
12426 (add-before 'build 'fix-build.xml
12427 (lambda* (#:key inputs #:allow-other-keys)
12428 (substitute* "build.xml"
12429 ;; Since we removed the bundled ant.jar, give the correct path
12430 (("lib/ant.jar") (string-append (assoc-ref inputs "ant") "/lib/ant.jar"))
12431 ;; We removed generated native libraries. We can only rebuild one
12432 ;; so don't fail if we can't find a native library for another architecture.
12433 (("zipfileset") "zipfileset erroronmissingarchive=\"false\""))
12434 ;; Copy test dependencies
12435 (copy-file (car (find-files (assoc-ref inputs "java-junit") "jar$"))
12437 (copy-file (car (find-files (assoc-ref inputs "java-hamcrest-core")
12439 "lib/hamcrest-core.jar")
12440 ;; FIXME: once reflections.jar is built, copy it to lib/test.
12442 (add-before 'build 'build-native
12444 (invoke "ant" "-Ddynlink.native=true" "native")
12447 (install-jars "build")))))
12449 `(("libffi" ,libffi)
12453 `(("java-junit" ,java-junit)
12454 ("java-hamcrest-core" ,java-hamcrest-core)))
12455 (home-page "https://github.com/java-native-access/jna")
12456 (synopsis "Access to native shared libraries from Java")
12457 (description "JNA provides Java programs easy access to native shared
12458 libraries without writing anything but Java code - no JNI or native code is
12459 required. JNA allows you to call directly into native functions using natural
12460 Java method invocation.")
12461 ;; Java Native Access project (JNA) is dual-licensed under 2
12462 ;; alternative Free licenses: LGPL 2.1 or later and Apache License 2.0.
12465 license:lgpl2.1+))))
12467 (define-public java-native-access-platform
12469 (inherit java-native-access)
12470 (name "java-native-access-platform")
12472 `(#:test-target "test"
12473 #:tests? #f; require jna-test.jar
12475 (modify-phases %standard-phases
12476 (add-before 'build 'chdir
12478 (chdir "contrib/platform")
12480 (add-after 'chdir 'fix-ant
12481 (lambda* (#:key inputs #:allow-other-keys)
12482 (substitute* "nbproject/project.properties"
12483 (("../../build/jna.jar")
12484 (string-append (assoc-ref inputs "java-native-access")
12485 "/share/java/jna.jar"))
12486 (("../../lib/hamcrest-core-.*.jar")
12487 (car (find-files (assoc-ref inputs "java-hamcrest-core")
12489 (("../../lib/junit.jar")
12490 (car (find-files (assoc-ref inputs "java-junit")
12494 (install-jars "dist")))))
12496 `(("java-native-access" ,java-native-access)))
12497 (synopsis "Cross-platform mappings for jna")
12498 (description "java-native-access-platform has cross-platform mappings
12499 and mappings for a number of commonly used platform functions, including a
12500 large number of Win32 mappings as well as a set of utility classes that
12501 simplify native access.")))
12503 (define-public java-jsch-agentproxy-core
12505 (name "java-jsch-agentproxy-core")
12509 (uri (string-append "https://github.com/ymnk/jsch-agent-proxy/archive/"
12510 version ".tar.gz"))
12511 (file-name (string-append name "-" version ".tar.gz"))
12514 "02iqg6jbc1kxvfzqcg6wy9ygqxfm82bw5rf6vnswqy4y572niz4q"))))
12515 (build-system ant-build-system)
12517 `(#:jar-name "jsch-agentproxy-core.jar"
12518 #:source-dir "jsch-agent-proxy-core/src/main/java"
12519 #:tests? #f)); no tests
12520 (home-page "https://github.com/ymnk/jsch-agent-proxy")
12521 (synopsis "Core component of the proxy to ssh-agent and Pageant in Java")
12522 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
12523 and Pageant included Putty. It will be easily integrated into JSch, and users
12524 will be allowed to use these programs for authentication.")
12525 (license license:bsd-3)))
12527 (define-public java-jsch-agentproxy-sshagent
12529 (inherit java-jsch-agentproxy-core)
12530 (name "java-jsch-agentproxy-sshagent")
12532 `(#:jar-name "jsch-agentproxy-sshagent.jar"
12533 #:source-dir "jsch-agent-proxy-sshagent/src/main/java"
12534 #:tests? #f)); no tests
12536 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
12537 (synopsis "Proxy to ssh-agent")
12538 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
12539 and Pageant included in Putty. This component contains the code for a proxy to
12542 (define-public java-jsch-agentproxy-usocket-jna
12544 (inherit java-jsch-agentproxy-core)
12545 (name "java-jsch-agentproxy-usocket-jna")
12547 `(#:jar-name "jsch-agentproxy-usocket-jna.jar"
12548 #:source-dir "jsch-agent-proxy-usocket-jna/src/main/java"
12549 #:tests? #f)); no tests
12551 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
12552 ("java-native-access" ,java-native-access)))
12553 (synopsis "USocketFactory implementation using JNA")
12554 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
12555 and Pageant included in Putty. This component contains an implementation of
12556 USocketFactory using @dfn{JNA} (Java Native Access).")))
12558 (define-public java-jsch-agentproxy-pageant
12560 (inherit java-jsch-agentproxy-core)
12561 (name "java-jsch-agentproxy-pageant")
12563 `(#:jar-name "jsch-agentproxy-pageant.jar"
12564 #:source-dir "jsch-agent-proxy-pageant/src/main/java"
12565 #:tests? #f)); no tests
12567 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
12568 ("java-native-access" ,java-native-access)
12569 ("java-native-access-platform" ,java-native-access-platform)))
12570 (synopsis "Proxy to pageant")
12571 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
12572 and Pageant included in Putty. This component contains the code for a proxy to
12575 (define-public java-jsch-agentproxy-usocket-nc
12577 (inherit java-jsch-agentproxy-core)
12578 (name "java-jsch-agentproxy-usocket-nc")
12580 `(#:jar-name "jsch-agentproxy-usocket-nc.jar"
12581 #:source-dir "jsch-agent-proxy-usocket-nc/src/main/java"
12582 #:tests? #f)); no tests
12584 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
12585 (synopsis "USocketFactory implementation using netcat")
12586 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
12587 and Pageant included in Putty. This component contains an implementation of
12588 USocketFactory using netcat.")))
12590 (define-public java-jsch-agentproxy-connector-factory
12592 (inherit java-jsch-agentproxy-core)
12593 (name "java-jsch-agentproxy-connector-factory")
12595 `(#:jar-name "jsch-agentproxy-connector-factory.jar"
12596 #:source-dir "jsch-agent-proxy-connector-factory/src/main/java"
12597 #:tests? #f)); no tests
12599 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
12600 ("java-jsch-agentproxy-sshagent" ,java-jsch-agentproxy-sshagent)
12601 ("java-jsch-agentproxy-usocket-jna" ,java-jsch-agentproxy-usocket-jna)
12602 ("java-jsch-agentproxy-pageant" ,java-jsch-agentproxy-pageant)
12603 ("java-jsch-agentproxy-usocket-nc" ,java-jsch-agentproxy-usocket-nc)))
12604 (synopsis "Connector factory for jsch agent proxy")
12605 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
12606 and Pageant included in Putty. This component contains a connector factory.")))
12608 (define-public java-jsch-agentproxy-jsch
12610 (inherit java-jsch-agentproxy-core)
12611 (name "java-jsch-agentproxy-jsch")
12613 `(#:jar-name "jsch-agentproxy-jsch.jar"
12614 #:source-dir "jsch-agent-proxy-jsch/src/main/java"
12615 #:tests? #f)); no tests
12617 `(("java-jsch" ,java-jsch)
12618 ("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
12619 (synopsis "JSch integration library for agentproxy")
12620 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
12621 and Pageant included in Putty. This component contains a library to use
12622 jsch-agent-proxy with JSch.")))
12624 (define-public java-apache-ivy
12626 (name "java-apache-ivy")
12630 (uri (string-append "mirror://apache//ant/ivy/" version
12631 "/apache-ivy-" version "-src.tar.gz"))
12634 "1xkfn57g2m7l6y0xdq75x5rnrgk52m9jx2xah70g3ggl8750hbr0"))
12637 "java-apache-ivy-port-to-latest-bouncycastle.patch"))))
12638 (build-system ant-build-system)
12640 `(#:jar-name "ivy.jar"
12643 (modify-phases %standard-phases
12644 (add-before 'build 'remove-example
12646 (delete-file-recursively "src/example")
12648 (add-before 'build 'copy-resources
12650 (with-directory-excursion "src/java"
12651 (for-each (lambda (file)
12652 (install-file file (string-append "../../build/classes/" (dirname file))))
12654 (find-files "." ".*.css")
12655 (find-files "." ".*.ent")
12656 (find-files "." ".*.html")
12657 (find-files "." ".*.properties")
12658 (find-files "." ".*.xsd")
12659 (find-files "." ".*.xsl")
12660 (find-files "." ".*.xml"))))
12662 (add-before 'build 'fix-vfs
12665 '("src/java/org/apache/ivy/plugins/repository/vfs/VfsRepository.java"
12666 "src/java/org/apache/ivy/plugins/repository/vfs/VfsResource.java")
12667 (("import org.apache.commons.vfs") "import org.apache.commons.vfs2"))
12669 (add-before 'install 'copy-manifest
12671 (install-file "META-INF/MANIFEST.MF" "build/classes/META-INF")
12673 (add-before 'install 'repack
12675 (invoke "jar" "-cmf" "build/classes/META-INF/MANIFEST.MF" "build/jar/ivy.jar"
12676 "-C" "build/classes" ".")))
12677 (add-after 'install 'install-bin
12678 (lambda* (#:key outputs #:allow-other-keys)
12679 (let* ((bin (string-append (assoc-ref outputs "out") "/bin"))
12680 (ivy (string-append bin "/ivy"))
12681 (jar (string-append (assoc-ref outputs "out") "/share/java/ivy.jar")))
12683 (with-output-to-file ivy
12685 (display (string-append
12686 "#!" (which "sh") "\n"
12687 "if [[ -z $CLASSPATH ]]; then\n"
12688 " cp=\"" (getenv "CLASSPATH") ":" jar "\"\n"
12690 " cp=\"" (getenv "CLASSPATH") ":" jar ":$CLASSPATH\"\n"
12692 (which "java") " -cp $cp org.apache.ivy.Main $@\n"))))
12696 `(("java-bouncycastle" ,java-bouncycastle)
12697 ("java-commons-cli" ,java-commons-cli)
12698 ("java-commons-collections" ,java-commons-collections)
12699 ("java-commons-httpclient" ,java-commons-httpclient)
12700 ("java-commons-lang" ,java-commons-lang)
12701 ("java-commons-vfs" ,java-commons-vfs)
12702 ("java-jakarta-oro" ,java-jakarta-oro)
12703 ("java-jsch" ,java-jsch)
12704 ("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
12705 ("java-jsch-agentproxy-connector-factory" ,java-jsch-agentproxy-connector-factory)
12706 ("java-jsch-agentproxy-jsch" ,java-jsch-agentproxy-jsch)
12707 ("java-junit" ,java-junit)))
12708 (home-page "https://ant.apache.org/ivy")
12709 (synopsis "Dependency manager for the Java programming language")
12710 (description "Ivy is a tool for managing (recording, tracking, resolving
12711 and reporting) project dependencies. It is characterized by the following:
12714 @item flexibility and configurability - Ivy is essentially process agnostic
12715 and is not tied to any methodology or structure. Instead it provides the
12716 necessary flexibility and configurability to be adapted to a broad range
12717 of dependency management and build processes.
12718 @item tight integration with Apache Ant - while available as a standalone tool,
12719 Ivy works particularly well with Apache Ant providing a number of
12720 powerful Ant tasks ranging from dependency resolution to dependency
12721 reporting and publication.
12723 (license license:asl2.0)))
12725 (define-public java-eclipse-sisu-inject
12727 (name "java-eclipse-sisu-inject")
12731 (uri (git-reference
12732 (url "https://github.com/eclipse/sisu.inject/")
12733 (commit (string-append "releases/" version))))
12734 (file-name (git-file-name name version))
12737 "16044sizdb0rjbhlfbmcnpds5y7by7dyn9b0c11606aikqi8k3x6"))))
12738 (build-system ant-build-system)
12740 `(#:jar-name "eclipse-sisu-inject.jar"
12741 #:source-dir "org.eclipse.sisu.inject/src"
12742 #:tests? #f; no tests
12744 (modify-phases %standard-phases
12746 (install-from-pom "org.eclipse.sisu.inject/pom.xml")))))
12748 `(("java-guice" ,java-guice)
12749 ("java-sisu-inject-parent-pom" ,java-sisu-inject-parent-pom)))
12751 `(("java-guice-servlet" ,java-guice-servlet)
12752 ("java-javax-inject" ,java-javax-inject)
12753 ("java-javaee-servletapi" ,java-javaee-servletapi)
12754 ("java-junit" ,java-junit)
12755 ("java-slf4j-api" ,java-slf4j-api)
12756 ("java-jsr305" ,java-jsr305)
12757 ("java-jsr250" ,java-jsr250)
12758 ("java-cdi-api" ,java-cdi-api)
12759 ("java-osgi-framework" ,java-osgi-framework)
12760 ("java-osgi-util-tracker" ,java-osgi-util-tracker)
12761 ("java-testng" ,java-testng)))
12762 (home-page "https://www.eclipse.org/sisu/")
12763 (synopsis "Classpath scanning, auto-binding, and dynamic auto-wiring")
12764 (description "Sisu is a modular JSR330-based container that supports
12765 classpath scanning, auto-binding, and dynamic auto-wiring. Sisu uses
12766 Google-Guice to perform dependency injection and provide the core JSR330
12767 support, but removes the need to write explicit bindings in Guice modules.
12768 Integration with other containers via the Eclipse Extension Registry and the
12769 OSGi Service Registry is a goal of this project.")
12770 (license license:epl1.0)))
12772 (define java-sisu-inject-parent-pom
12774 (inherit java-eclipse-sisu-inject)
12775 (name "java-sisu-inject-parent-pom")
12779 (modify-phases %standard-phases
12780 (delete 'configure)
12783 (install-pom-file "pom.xml")))))
12784 (propagated-inputs '())))
12786 (define-public java-eclipse-sisu-plexus
12788 (name "java-eclipse-sisu-plexus")
12792 (uri (git-reference
12793 (url "https://github.com/eclipse/sisu.plexus")
12794 (commit (string-append "releases/" version))))
12795 (file-name (git-file-name name version))
12798 "17mjlajnsqnk07cc58h1qpxrif85yb2m2y0pyba48yjjgikk8r9f"))
12799 (modules '((guix build utils)))
12802 (for-each delete-file (find-files "." ".*.jar"))
12803 (rename-file "org.eclipse.sisu.plexus.tests/src"
12804 "org.eclipse.sisu.plexus.tests/java")
12806 (build-system ant-build-system)
12808 `(#:jar-name "eclipse-sisu-plexus.jar"
12809 #:source-dir "org.eclipse.sisu.plexus/src"
12810 #:test-dir "org.eclipse.sisu.plexus.tests"
12813 ;; This test fails probably because we can't generate the necessary
12815 "**/PlexusLoggingTest.*"
12816 ;; FIXME: This test fails because of some injection error
12817 "**/PlexusRequirementTest.*")
12820 (modify-phases %standard-phases
12821 (add-before 'build 'copy-resources
12823 (install-file "org.eclipse.sisu.plexus/META-INF/plexus/components.xml"
12824 "build/classes/META-INF/plexus")
12826 (add-before 'check 'build-test-jar
12828 (with-directory-excursion "org.eclipse.sisu.plexus.tests/resources/component-jar/src/main/"
12830 (with-directory-excursion "java"
12831 (apply invoke "javac" "-cp"
12832 (string-append (getenv "CLASSPATH")
12833 ":../../../../../build/classes")
12834 (find-files "." ".*.java"))
12835 (for-each (lambda (file) (install-file file (string-append "../build/" file)))
12836 (find-files "." ".*.jar")))
12837 (mkdir-p "build/META-INF/plexus")
12838 (copy-file "resources/META-INF/plexus/components.xml"
12839 "build/META-INF/plexus/components.xml")
12840 (with-directory-excursion "build"
12841 (invoke "jar" "cf" "../../../component-jar-0.1.jar" ".")))
12842 (with-directory-excursion "org.eclipse.sisu.plexus.tests/"
12843 (copy-recursively "META-INF" "../build/test-classes/META-INF")
12844 (substitute* "java/org/eclipse/sisu/plexus/DefaultPlexusContainerTest.java"
12845 (("resources/component-jar")
12846 "org.eclipse.sisu.plexus.tests/resources/component-jar")))
12849 (install-from-pom "org.eclipse.sisu.plexus/pom.xml")))))
12851 `(("java-plexus-classworlds" ,java-plexus-classworlds)
12852 ("java-plexus-utils" ,java-plexus-utils)
12853 ("java-plexus-component-annotations" ,java-plexus-component-annotations)
12854 ("java-cdi-api" ,java-cdi-api)
12855 ("java-eclipse-sisu-inject" ,java-eclipse-sisu-inject)
12856 ("java-sisu-plexus-parent-pom" ,java-sisu-plexus-parent-pom)))
12858 `(("java-osgi-framework" ,java-osgi-framework)
12859 ("java-slf4j-api" ,java-slf4j-api)
12860 ("java-javax-inject" ,java-javax-inject)
12861 ("java-guice" ,java-guice)
12862 ("java-guava" ,java-guava)
12863 ("java-aopalliance" ,java-aopalliance)
12864 ("java-asm" ,java-asm)
12865 ("java-cglib" ,java-cglib)))
12867 `(("java-junit" ,java-junit)))
12868 (home-page "https://www.eclipse.org/sisu/")
12869 (synopsis "Plexus support for the sisu container")
12870 (description "Sisu is a modular JSR330-based container that supports
12871 classpath scanning, auto-binding, and dynamic auto-wiring. This package
12872 adds Plexus support to the Sisu-Inject container.")
12873 (license license:epl1.0)))
12875 (define java-sisu-plexus-parent-pom
12877 (inherit java-eclipse-sisu-plexus)
12878 (name "java-sisu-plexus-parent-pom")
12882 (modify-phases %standard-phases
12883 (delete 'configure)
12886 (install-pom-file "pom.xml")))))
12888 `(("java-sonatype-oss-parent-pom-9" ,java-sonatype-oss-parent-pom-9)))))
12890 (define-public java-commons-compiler
12892 (name "java-commons-compiler")
12896 (uri (git-reference
12897 (url "https://github.com/janino-compiler/janino")
12898 (commit "91aa95686d1e4ca3b16a984a03a38686572331b2")))
12899 (file-name (string-append name "-" version))
12902 "04hfdl59sgh20qkxzgnibvs8f9hy6n7znxwpk611y5d89977y62r"))
12903 (modules '((guix build utils)))
12906 (for-each delete-file
12907 (find-files "." "\\.jar$"))
12909 (build-system ant-build-system)
12911 `(#:jar-name "commons-compiler.jar"
12912 #:source-dir "commons-compiler/src/main"
12913 #:tests? #f)); no tests
12914 (home-page "https://github.com/janino-compiler/janino")
12915 (synopsis "Java compiler")
12916 (description "Commons-compiler contains an API for janino, including the
12917 @code{IExpressionEvaluator}, @code{IScriptEvaluator}, @code{IClassBodyEvaluator}
12918 and @code{ISimpleCompiler} interfaces.")
12919 (license license:bsd-3)))
12921 (define-public java-janino
12923 (inherit java-commons-compiler)
12924 (name "java-janino")
12926 `(#:jar-name "janino.jar"
12927 #:source-dir "src/main/java"
12929 (modify-phases %standard-phases
12930 (add-before 'configure 'chdir
12935 `(("java-commons-compiler" ,java-commons-compiler)))
12937 `(("java-junit" ,java-junit)
12938 ("java-hamcrest-core" ,java-hamcrest-core)))
12939 (description "Janino is a Java compiler. Janino can compile a set of
12940 source files to a set of class files like @code{javac}, but also compile a
12941 Java expression, block, class body or source file in memory, load the bytecode
12942 and execute it directly in the same JVM. @code{janino} can also be used for
12943 static code analysis or code manipulation.")))
12945 (define-public java-logback-core
12947 (name "java-logback-core")
12951 (uri (string-append "https://github.com/qos-ch/logback/archive/v_"
12952 version ".tar.gz"))
12953 (file-name (string-append name "-" version ".tar.gz"))
12956 "1x6ga74yfgm94cfx98gybakbrlilx8i2gn6dx13l40kasmys06mi"))
12957 (modules '((guix build utils)))
12960 (delete-file-recursively "logback-access/lib")
12962 (build-system ant-build-system)
12964 `(#:jar-name "logback.jar"
12965 #:source-dir "src/main/java"
12966 #:test-dir "src/test"
12968 ;; These tests fail with Unable to set MockitoNamingPolicy on cglib generator
12969 ;; which creates FastClasses
12970 (list "**/AllCoreTest.*"
12971 "**/AutoFlushingObjectWriterTest.*"
12973 "**/ResilientOutputStreamTest.*"
12974 ;; And we still don't want to run abstract classes
12977 (modify-phases %standard-phases
12978 (add-before 'configure 'chdir
12980 (chdir "logback-core")
12983 `(("java-javax-mail" ,java-javax-mail)
12984 ("servlet" ,java-javaee-servletapi)
12985 ("java-commons-compiler" ,java-commons-compiler)
12986 ("java-janino" ,java-janino)))
12988 `(("java-junit" ,java-junit)
12989 ("java-hamcrest-core" ,java-hamcrest-core)
12990 ("java-mockito-1" ,java-mockito-1)
12991 ("java-cglib" ,java-cglib)
12992 ("java-asm" ,java-asm)
12993 ("java-objenesis" ,java-objenesis)
12994 ("java-joda-time" ,java-joda-time)))
12995 (home-page "https://logback.qos.ch")
12996 (synopsis "Logging for java")
12997 (description "Logback is intended as a successor to the popular log4j project.
12998 This module lays the groundwork for the other two modules.")
12999 ;; Either epl1.0 or lgpl2.1
13000 (license (list license:epl1.0
13001 license:lgpl2.1))))
13003 (define-public java-logback-classic
13005 (inherit java-logback-core)
13006 (name "java-logback-classic")
13008 `(#:jar-name "logback-classic.jar"
13009 #:source-dir "src/main/java"
13010 #:test-dir "src/test"
13011 #:tests? #f; tests require more packages: h2, greenmail, hsql, subethamail, slf4j, log4j, felix
13014 (modify-phases %standard-phases
13015 (add-before 'configure 'chdir
13017 (chdir "logback-classic")
13020 (lambda* (#:key inputs #:allow-other-keys)
13021 (mkdir-p "build/classes")
13022 (setenv "CLASSPATH"
13024 (apply append (map (lambda (input)
13025 (find-files (assoc-ref inputs input)
13027 '("java-logback-core" "java-slf4j-api"
13028 "java-commons-compiler" "servlet"
13031 (apply invoke "groovyc" "-d" "build/classes" "-j"
13032 (find-files "src/main/" ".*\\.(groovy|java)$"))
13033 (invoke "ant" "jar")
13036 `(("java-logback-core" ,java-logback-core)
13037 ("java-slf4j-api" ,java-slf4j-api)
13038 ,@(package-inputs java-logback-core)))
13040 `(("groovy" ,groovy)))
13041 (description "Logback is intended as a successor to the popular log4j project.
13042 This module can be assimilated to a significantly improved version of log4j.
13043 Moreover, @code{logback-classic} natively implements the slf4j API so that you
13044 can readily switch back and forth between logback and other logging frameworks
13045 such as log4j or @code{java.util.logging} (JUL).")))
13047 (define-public java-jgit
13050 (version "4.7.0.201704051617-r")
13053 (uri (string-append "https://repo1.maven.org/maven2/"
13054 "org/eclipse/jgit/org.eclipse.jgit/"
13055 version "/org.eclipse.jgit-"
13056 version "-sources.jar"))
13059 "13ii4jn02ynzq6i7gsyi21k2i94jpc85wf6bcm31q4cyvzv0mk4k"))))
13060 (build-system ant-build-system)
13062 `(#:tests? #f ; There are no tests to run.
13063 #:jar-name "jgit.jar"
13064 ;; JGit must be built with a JDK supporting Java 8.
13066 ;; Target our older default JDK.
13067 #:make-flags (list "-Dtarget=1.7")
13069 (modify-phases %standard-phases
13070 ;; The jar file generated by the default build.xml does not include
13071 ;; the text properties files, so we need to add them.
13072 (add-after 'build 'add-properties
13073 (lambda* (#:key jar-name #:allow-other-keys)
13074 (with-directory-excursion "src"
13075 (apply invoke "jar" "-uf"
13076 (string-append "../build/jar/" jar-name)
13077 (find-files "." "\\.properties$")))
13080 `(("java-classpathx-servletapi" ,java-classpathx-servletapi)
13081 ("java-javaewah" ,java-javaewah)
13082 ("java-jsch" ,java-jsch)
13083 ("java-slf4j-api" ,java-slf4j-api)))
13084 (home-page "https://eclipse.org/jgit/")
13085 (synopsis "Java library implementing the Git version control system")
13086 (description "JGit is a lightweight, pure Java library implementing the
13087 Git version control system, providing repository access routines, support for
13088 network protocols, and core version control algorithms.")
13089 (license license:edl1.0)))
13091 ;; For axoloti. This package can still be built with icedtea-7, which is
13092 ;; currently used as the default JDK.
13093 (define-public java-jgit-4.2
13094 (package (inherit java-jgit)
13095 (version "4.2.0.201601211800-r")
13098 (uri (string-append "https://repo1.maven.org/maven2/"
13099 "org/eclipse/jgit/org.eclipse.jgit/"
13100 version "/org.eclipse.jgit-"
13101 version "-sources.jar"))
13104 "15gm537iivhnzlkjym4x3wn5jqdjdragsw9pdpzqqg21nrc817mm"))))
13105 (build-system ant-build-system)
13107 (substitute-keyword-arguments (package-arguments java-jgit)
13108 ;; Build for default JDK.
13109 ((#:jdk _) icedtea-7)
13111 `(modify-phases ,phases
13112 (add-after 'unpack 'use-latest-javaewah-API
13114 (substitute* "src/org/eclipse/jgit/internal/storage/file/BitmapIndexImpl.java"
13115 (("wordinbits") "WORD_IN_BITS"))
13118 `(("java-javaewah" ,java-javaewah)
13119 ("java-jsch" ,java-jsch)
13120 ("java-slf4j-api" ,java-slf4j-api)))))
13122 (define-public abcl
13129 (uri (string-append "https://abcl.org/releases/"
13130 version "/abcl-src-" version ".tar.gz"))
13133 "0hvbcsffr8n2xwdixc8wyw1bfl9fxn2gyy0c4nma7j9zbn0wwgw9"))
13136 "abcl-fix-build-xml.patch"))))
13137 (build-system ant-build-system)
13139 `(("java-junit" ,java-junit)))
13141 `(#:build-target "abcl.jar"
13142 #:test-target "abcl.test"
13144 (modify-phases %standard-phases
13146 (lambda* (#:key outputs #:allow-other-keys)
13147 (let ((share (string-append (assoc-ref outputs "out")
13149 (bin (string-append (assoc-ref outputs "out")
13152 (install-file "dist/abcl.jar" share)
13153 (install-file "dist/abcl-contrib.jar" share)
13155 (with-output-to-file (string-append bin "abcl")
13157 (let ((classpath (string-append
13160 share "abcl-contrib.jar")))
13161 (display (string-append
13162 "#!" (which "sh") "\n"
13163 "if [[ -z $CLASSPATH ]]; then\n"
13164 " cp=\"" classpath "\"\n"
13166 " cp=\"" classpath ":$CLASSPATH\"\n"
13168 "exec " (which "java")
13169 " -cp $cp org.armedbear.lisp.Main $@\n")))))
13170 (chmod (string-append bin "abcl") #o755)
13172 (home-page "https://abcl.org/")
13173 (synopsis "Common Lisp Implementation on the JVM")
13175 "@dfn{Armed Bear Common Lisp} (ABCL) is a full implementation of the Common
13176 Lisp language featuring both an interpreter and a compiler, running in the
13177 JVM. It supports JSR-223 (Java scripting API): it can be a scripting engine
13178 in any Java application. Additionally, it can be used to implement (parts of)
13179 the application using Java to Lisp integration APIs.")
13180 (license (list license:gpl2+
13181 ;; named-readtables is released under 3 clause BSD
13183 ;; jfli is released under CPL 1.0
13186 (define-public java-jsonp-api
13188 (name "java-jsonp-api")
13192 (uri (git-reference
13193 (url "https://github.com/eclipse-ee4j/jsonp")
13194 (commit (string-append "1.1-" version "-RELEASE"))))
13195 (file-name (git-file-name name version))
13198 "0zrj03hkr3jdmqlb4ipjr37cqpp2q2814qpmxi7srlwpdqs0ibgc"))))
13199 (build-system ant-build-system)
13201 `(#:jar-name "jsonp-api.jar"
13203 #:source-dir "api/src/main/java"
13204 #:test-dir "api/src/test"))
13205 (home-page "https://eclipse-ee4j.github.io/jsonp/")
13206 (synopsis "JSON Processing in Java")
13207 (description "JSON Processing (JSON-P) is a Java API to process (e.g.
13208 parse, generate, transform and query) JSON messages. It produces and
13209 consumes JSON text in a streaming fashion (similar to StAX API for XML)
13210 and allows building a Java object model for JSON text using API classes
13211 (similar to DOM API for XML).")
13212 ;; either gpl2 only with classpath exception, or epl2.0.
13213 (license (list license:gpl2
13216 (define-public java-jsonp-impl
13218 (inherit java-jsonp-api)
13219 (name "java-jsonp-impl")
13221 `(#:jar-name "jsonp-impl.jar"
13223 #:source-dir "impl/src/main/java"
13224 #:test-dir "impl/src/test"
13226 (modify-phases %standard-phases
13227 (add-before 'build 'copy-resources
13230 "impl/src/main/resources/"
13234 `(("java-jsonp-api" ,java-jsonp-api)))
13235 (description "JSON Processing (JSON-P) is a Java API to process (e.g.
13236 parse, generate, transform and query) JSON messages. This package contains
13237 a reference implementation of that API.")))
13239 (define-public java-xmp
13245 (uri (string-append "http://download.macromedia.com/pub/developer"
13246 "/xmp/sdk/XMPCoreJava-" version ".zip"))
13249 "14nai2mmsg7l5ya2y5mx4w4lr1az3sk2fjz6hiy4zdrsavgvl1g7"))))
13250 (build-system ant-build-system)
13252 `(#:build-target "build"
13253 #:tests? #f; no tests
13255 (modify-phases %standard-phases
13256 (add-after 'unpack 'chdir
13260 (add-before 'build 'fix-timestamp
13262 (substitute* "build.xml"
13263 (("\\$\\{BuildDate\\}") "1970 Jan 01 00:00:00-GMT"))
13266 (install-jars "."))
13267 (add-after 'install 'install-doc
13268 (lambda* (#:key outputs #:allow-other-keys)
13271 (string-append (assoc-ref outputs "out") "/share/doc/java-xmp"))
13274 `(("unzip" ,unzip)))
13275 (home-page "https://www.adobe.com/devnet/xmp.html")
13276 (synopsis "Extensible Metadat Platform (XMP) support in Java")
13277 (description "Adobe's Extensible Metadata Platform (XMP) is a labeling
13278 technology that allows you to embed data about a file, known as metadata,
13279 into the file itself. The XMP Toolkit for Java is based on the C++ XMPCore
13280 library and the API is similar.")
13281 (license license:bsd-3)))
13283 (define-public java-metadata-extractor
13285 (name "java-metadata-extractor")
13289 (uri (git-reference
13290 (url "https://github.com/drewnoakes/metadata-extractor")
13292 (file-name (git-file-name name version))
13295 "06yrq0swrl1r40yjbk5kqzjxr04jlkq9lfi711jvfgjf5kp2qinj"))))
13296 (build-system ant-build-system)
13298 `(#:jar-name "metadata-extractor.jar"
13299 #:source-dir "Source"
13302 (modify-phases %standard-phases
13303 (add-before 'check 'fix-test-dir
13305 (substitute* "build.xml"
13306 (("/java\">") "\">"))
13309 `(("java-xmp" ,java-xmp)))
13311 `(("java-hamcrest-core" ,java-hamcrest-core)
13312 ("java-junit" ,java-junit)))
13313 (home-page "https://github.com/drewnoakes/metadata-extractor")
13314 (synopsis "Extract metadata from image and video files")
13315 (description "Metadata-extractor is a straightforward Java library for
13316 reading metadata from image files. It is able to read metadata in Exif,
13317 IPTC, XMP, ICC and more formats.")
13318 (license license:asl2.0)))
13320 (define-public java-svg-salamander
13322 (name "java-svg-salamander")
13326 (uri (git-reference
13327 (url "https://github.com/blackears/svgSalamander")
13328 (commit (string-append "v" version))))
13329 (file-name (git-file-name name version))
13332 "1zv3kjdkf6iqf02x6ln76254y634j2ji448y706a65lsbfjmmicf"))
13333 (modules '((guix build utils)))
13336 (for-each delete-file (find-files "." ".*.jar"))
13339 (search-patches "java-svg-salamander-Fix-non-det.patch"))))
13340 (build-system ant-build-system)
13342 `(#:tests? #f; no tests
13344 (modify-phases %standard-phases
13345 (add-after 'unpack 'chdir
13349 (add-before 'build 'copy-jars
13350 (lambda* (#:key inputs #:allow-other-keys)
13351 (copy-file (car (find-files (assoc-ref inputs "javacc") "\\.jar$"))
13352 "../libraries/javacc.jar")
13353 (copy-file (car (find-files (assoc-ref inputs "ant") "ant\\.jar$"))
13354 "../libraries/ant.jar")
13357 (install-jars "dist")))))
13359 `(("javacc" ,javacc)))
13360 (home-page "https://github.com/blackears/svgSalamander")
13361 (synopsis "SVG engine for Java")
13362 (description "SVG Salamander is an SVG engine for Java that's designed
13363 to be small, fast, and allow programmers to use it with a minimum of fuss.
13364 It's in particular targeted for making it easy to integrate SVG into Java
13365 games and making it much easier for artists to design 2D game content - from
13366 rich interactive menus to charts and graphcs to complex animations.")
13367 (license license:bsd-2)))
13369 (define-public java-jboss-transaction-api-spec
13371 (name "java-jboss-transaction-api-spec")
13372 (version "1.2+1.1.1")
13375 (uri (git-reference
13376 (url "https://github.com/jboss/jboss-transaction-api_spec")
13377 (commit "jboss-transaction-api_1.2_spec-1.1.1.Final")))
13378 (file-name (git-file-name name version))
13381 "1xbfq5hvb86izflydxrqqv3k26c1ba2m0ap6m97shqrsdi9by4wy"))))
13382 (build-system ant-build-system)
13384 `(#:jar-name "java-jboss-transaction-api_spec.jar"
13385 #:source-dir "src/main/java"
13386 #:tests? #f)); no tests
13388 `(("java-cdi-api" ,java-cdi-api)
13389 ("java-jboss-interceptors-api-spec" ,java-jboss-interceptors-api-spec)))
13390 (home-page "https://github.com/jboss/jboss-transaction-api_spec")
13391 (synopsis "Generic transaction management API in Java")
13392 (description "Java-jboss-transaction-api-spec implements the Transactions
13393 API. A transaction is a unit of work containing one or more operations
13394 involving one or more shared resources having ACID (Atomicity, Consistency,
13395 Isolation and Durability) properties.")
13396 ;; either gpl2 only with classpath exception or cddl.
13397 (license (list license:gpl2 license:cddl1.0))))
13399 (define-public java-picocli
13401 (name "java-picocli")
13405 (uri (git-reference
13406 (url "https://github.com/remkop/picocli")
13407 (commit (string-append "v" version))))
13408 (file-name (git-file-name name version))
13411 "1sxp6rxjfgjd98ly14b3d15dvxkm5wg4g46w12jyhmr0kmkaca3c"))))
13412 (build-system ant-build-system)
13414 `(#:jar-name "picocli.jar"
13415 #:source-dir "src/main/java"
13416 ;; Tests require missing dependencies (junitparams, system-rules)
13418 (home-page "https://picocli.info")
13419 (synopsis "REPL for the JVM")
13420 (description "Picocli is a framework for building command line applications
13421 for the JVM. It supports colors, autocompletion, subcommands, and more. Written
13422 in Java, usable from Groovy, Kotlin, Scala, etc.")
13423 (license license:asl2.0)))
13425 (define-public java-jetbrains-annotations
13427 (name "java-jetbrains-annotations")
13431 (uri (git-reference
13432 (url "https://github.com/JetBrains/java-annotations")
13434 (file-name (git-file-name name version))
13437 "0z6i1xs60cd5ffz23c49sq68wn5mphhs3xpar1n93ppama2ng80v"))))
13438 (build-system ant-build-system)
13440 `(#:jar-name "jetbrains-annotations.jar"
13441 #:source-dir "common/src/main/java:java8/src/main/java"
13442 #:tests? #f)); no tests
13443 (home-page "https://github.com/JetBrains/java-annotations")
13444 (synopsis "Annotations for Java and other JVM languages")
13445 (description "This package contains a set of Java annotations which can be
13446 used in JVM-based languages. They serve as an additional documentation and
13447 can be interpreted by IDEs and static analysis tools to improve code analysis.")
13448 (license license:expat)))
13450 (define-public java-javaparser
13452 (name "java-javaparser")
13456 (uri (git-reference
13457 (url "https://github.com/javaparser/javaparser")
13458 (commit (string-append "javaparser-parent-" version))))
13459 (file-name (git-file-name name version))
13462 "1a4jk12ffa31fa0y8vda0739vpfj1206p0nha842b7bixbvwamv9"))
13463 (modules '((guix build utils)))
13466 (for-each delete-file
13467 (find-files "." "\\.jar$"))
13469 (build-system ant-build-system)
13471 `(#:tests? #f; tests require jbehave and junit5
13473 (modify-phases %standard-phases
13474 (add-before 'build 'fill-template
13476 (with-directory-excursion "javaparser-core/src/main"
13477 (copy-file "java-templates/com/github/javaparser/JavaParserBuild.java"
13478 "java/com/github/javaparser/JavaParserBuild.java")
13479 (substitute* "java/com/github/javaparser/JavaParserBuild.java"
13480 (("\\$\\{project.version\\}") ,version)
13481 (("\\$\\{project.name\\}") "javaparser")
13482 (("\\$\\{project.build.finalName\\}") "javaparser")
13483 (("\\$\\{maven.version\\}") "fake")
13484 (("\\$\\{maven.build.version\\}") "fake")
13485 (("\\$\\{build.timestamp\\}") "0")
13486 (("\\$\\{java.vendor\\}") "Guix")
13487 (("\\$\\{java.vendor.url\\}") "https://gnu.org/software/guix")
13488 (("\\$\\{java.version\\}") "1.8")
13489 (("\\$\\{os.arch\\}") "any")
13490 (("\\$\\{os.name\\}") "GuixSD")
13491 (("\\$\\{os.version\\}") "not available")))
13493 (add-before 'build 'generate-javacc
13495 (with-directory-excursion "javaparser-core/src/main/java"
13496 (invoke "java" "javacc" "../javacc/java.jj"))
13498 (add-before 'build 'copy-javacc-support
13500 (with-directory-excursion "javaparser-core/src/main"
13501 (copy-recursively "javacc-support" "java"))
13505 (define (build name)
13506 (format #t "Building ~a~%" name)
13507 (delete-file-recursively "build/classes")
13508 (mkdir-p "build/classes")
13509 (apply invoke "javac"
13510 "-cp" (string-append (getenv "CLASSPATH") ":"
13511 (string-join (find-files "build/jar" ".")
13513 "-d" "build/classes"
13514 (find-files (string-append name "/src/main/java")
13516 (invoke "jar" "-cf" (string-append "build/jar/" name ".jar")
13517 "-C" "build/classes" "."))
13518 (mkdir-p "build/classes")
13519 (mkdir-p "build/test-classes")
13520 (mkdir-p "build/jar")
13521 (build "javaparser-core")
13522 (build "javaparser-core-serialization")
13523 (build "javaparser-core-generators")
13524 (build "javaparser-core-metamodel-generator")
13525 (build "javaparser-symbol-solver-core")
13528 (install-jars "build/jar")))))
13530 `(("java-guava" ,java-guava)
13531 ("java-jboss-javassist" ,java-jboss-javassist)
13532 ("java-jsonp-api" ,java-jsonp-api)))
13534 `(("javacc" ,javacc)))
13535 (home-page "http://javaparser.org/")
13536 (synopsis "Parser for Java")
13538 "This project contains a set of libraries implementing a Java 1.0 - Java
13539 11 Parser with advanced analysis functionalities.")
13541 ;; either lgpl or asl