1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2015, 2016, 2017, 2018, 2019 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, 2018 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 Efraim Flashner <efraim@flashner.co.il>
13 ;;; Copyright © 2019 Björn Höfling <bjoern.hoefling@bjoernhoefling.de>
15 ;;; This file is part of GNU Guix.
17 ;;; GNU Guix is free software; you can redistribute it and/or modify it
18 ;;; under the terms of the GNU General Public License as published by
19 ;;; the Free Software Foundation; either version 3 of the License, or (at
20 ;;; your option) any later version.
22 ;;; GNU Guix is distributed in the hope that it will be useful, but
23 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
24 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25 ;;; GNU General Public License for more details.
27 ;;; You should have received a copy of the GNU General Public License
28 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
30 (define-module (gnu packages java)
31 #:use-module ((guix licenses) #:prefix license:)
32 #:use-module (guix packages)
33 #:use-module (guix download)
34 #:use-module (guix hg-download)
35 #:use-module (guix git-download)
36 #:use-module (guix svn-download)
37 #:use-module (guix utils)
38 #:use-module (guix build-system ant)
39 #:use-module (guix build-system gnu)
40 #:use-module (guix build-system trivial)
41 #:use-module (gnu packages)
42 #:use-module (gnu packages attr)
43 #:use-module (gnu packages autotools)
44 #:use-module (gnu packages base)
45 #:use-module (gnu packages bash)
46 #:use-module (gnu packages certs)
47 #:use-module (gnu packages cpio)
48 #:use-module (gnu packages cups)
49 #:use-module (gnu packages compression)
50 #:use-module (gnu packages elf)
51 #:use-module (gnu packages fontutils)
52 #:use-module (gnu packages gawk)
53 #:use-module (gnu packages gettext)
54 #:use-module (gnu packages gcc)
55 #:use-module (gnu packages gl)
56 #:use-module (gnu packages ghostscript) ;lcms
57 #:use-module (gnu packages gnome)
58 #:use-module (gnu packages groovy)
59 #:use-module (gnu packages gtk)
60 #:use-module (gnu packages guile)
61 #:use-module (gnu packages icu4c)
62 #:use-module (gnu packages image)
63 #:use-module (gnu packages java-compression)
64 #:use-module (gnu packages libffi)
65 #:use-module (gnu packages linux) ;alsa
66 #:use-module (gnu packages maths)
67 #:use-module (gnu packages nss)
68 #:use-module (gnu packages onc-rpc)
69 #:use-module (gnu packages web)
70 #:use-module (gnu packages wget)
71 #:use-module (gnu packages pkg-config)
72 #:use-module (gnu packages perl)
73 #:use-module (gnu packages popt)
74 #:use-module (gnu packages kerberos)
75 #:use-module (gnu packages xml)
76 #:use-module (gnu packages xorg)
77 #:use-module (gnu packages texinfo)
78 #:use-module ((srfi srfi-1) #:select (fold alist-delete))
79 #:use-module (srfi srfi-11)
80 #:use-module (ice-9 match))
84 ;;; Java bootstrap toolchain.
87 ;; The Java bootstrap begins with Jikes, a Java compiler written in C++. We
88 ;; use it to build a simple version of GNU Classpath, the Java standard
89 ;; library. We chose version 0.93 because it is the last version that can be
90 ;; built with Jikes. With Jikes and this version of GNU Classpath we can
91 ;; build JamVM, a Java Virtual Machine. We build version 1.5.1 because it is
92 ;; the last version of JamVM that works with a version of GNU classpath that
93 ;; does not require ECJ. These three packages make up the bootstrap JDK.
95 ;; This is sufficient to build an older version of Ant, which is needed to
96 ;; build an older version of ECJ, an incremental Java compiler, both of which
97 ;; are written in Java.
99 ;; ECJ is needed to build the latest release (0.99) and the development
100 ;; version of GNU Classpath. The development version of GNU Classpath has
101 ;; much more support for Java 1.6 than the latest release, but we need to
102 ;; build 0.99 first to get a working version of javah. ECJ, the development
103 ;; version of GNU Classpath, and the latest version of JamVM make up the
104 ;; second stage JDK with which we can build the OpenJDK with the Icedtea 1.x
105 ;; build framework. We then build the more recent JDKs Icedtea 2.x and
114 (uri (string-append "mirror://sourceforge/jikes/Jikes/"
115 version "/jikes-" version ".tar.bz2"))
118 "1qqldrp74pzpy5ly421srqn30qppmm9cvjiqdngk8hf47dv2rc0c"))))
119 (build-system gnu-build-system)
120 (home-page "http://jikes.sourceforge.net/")
121 (synopsis "Compiler for the Java language")
122 (description "Jikes is a compiler that translates Java source files as
123 defined in The Java Language Specification into the bytecoded instruction set
124 and binary format defined in The Java Virtual Machine Specification.")
125 (license license:ibmpl1.0)))
127 ;; This is the last version of GNU Classpath that can be built without ECJ.
128 (define classpath-bootstrap
134 (uri (string-append "mirror://gnu/classpath/classpath-"
138 "0i99wf9xd3hw1sj2sazychb9prx8nadxh2clgvk3zlmb28v0jbfz"))
139 (patches (search-patches "classpath-aarch64-support.patch"))))
140 (build-system gnu-build-system)
143 (list (string-append "JAVAC="
144 (assoc-ref %build-inputs "jikes")
149 "--disable-gconf-peer"
155 (modify-phases %standard-phases
156 ;; XXX: This introduces a memory leak as we remove a call to free up
157 ;; memory for the file name string. This was necessary because of a
158 ;; runtime error that would have prevented us from building
159 ;; ant-bootstrap later. See https://issues.guix.gnu.org/issue/36685
160 ;; for the gnarly details.
161 (add-after 'unpack 'remove-call-to-free
163 (substitute* "native/jni/java-io/java_io_VMFile.c"
164 (("result = cpio_isFileExists.*" m)
165 (string-append m "\n//")))
167 (add-after 'install 'install-data
168 (lambda _ (invoke "make" "install-data"))))))
173 ("pkg-config" ,pkg-config)))
174 (home-page "https://www.gnu.org/software/classpath/")
175 (synopsis "Essential libraries for Java")
176 (description "GNU Classpath is a project to create core class libraries
177 for use with runtimes, compilers and tools for the Java programming
179 ;; GPLv2 or later, with special linking exception.
180 (license license:gpl2+)))
182 ;; This is the last version of JamVM that works with a version of GNU
183 ;; classpath that does not require ECJ.
184 (define jamvm-1-bootstrap
190 (uri (string-append "mirror://sourceforge/jamvm/jamvm/"
191 "JamVM%20" version "/jamvm-"
193 (patches (search-patches "jamvm-arm.patch"))
196 "06lhi03l3b0h48pc7x58bk9my2nrcf1flpmglvys3wyad6yraf36"))))
197 (build-system gnu-build-system)
200 (list (string-append "--with-classpath-install-dir="
201 (assoc-ref %build-inputs "classpath"))
202 "--disable-int-caching"
203 "--enable-runtime-reloc-checks"
206 `(("classpath" ,classpath-bootstrap)
210 ;; When built with a recent GCC and glibc the configure step of icedtea-6
211 ;; fails with an invalid instruction error.
214 ("libc" ,glibc-2.28)))
215 (home-page "http://jamvm.sourceforge.net/")
216 (synopsis "Small Java Virtual Machine")
217 (description "JamVM is a Java Virtual Machine conforming to the JVM
218 specification edition 2 (blue book). It is extremely small. However, unlike
219 other small VMs it supports the full spec, including object finalisation and
221 (license license:gpl2+)))
223 (define ant-bootstrap
225 (name "ant-bootstrap")
226 ;; The 1.10.x series requires Java 8. 1.9.0 and later use generics, which
227 ;; are not supported. The 1.8.x series is the last to use only features
228 ;; supported by Jikes.
232 (uri (string-append "http://archive.apache.org/dist/"
233 "ant/source/apache-ant-"
234 version "-src.tar.bz2"))
237 "1cg0lga887qz5iizh6mlkxp01lciymrhmp7wzxpl6zpnldxmzrjx"))))
238 (build-system gnu-build-system)
240 `(#:imported-modules ((guix build syscalls)
241 ,@%gnu-build-system-modules)
242 #:modules ((srfi srfi-1)
243 (guix build gnu-build-system)
245 (guix build syscalls))
246 #:tests? #f ; no "check" target
248 (modify-phases %standard-phases
252 (lambda* (#:key inputs #:allow-other-keys)
253 (setenv "JAVA_HOME" (assoc-ref inputs "jamvm"))
255 (string-append (assoc-ref inputs "jamvm")
258 (string-append (assoc-ref inputs "jikes")
261 (string-append (assoc-ref inputs "jamvm")
264 ;; Ant complains if this file doesn't exist.
265 (setenv "HOME" "/tmp")
266 (with-output-to-file "/tmp/.ant.properties"
267 (lambda _ (display "")))
269 ;; Use jikes instead of javac for <javac ...> tags in build.xml
270 (setenv "ANT_OPTS" "-Dbuild.compiler=jikes")
272 ;; jikes produces lots of warnings, but they are not very
273 ;; interesting, so we silence them.
274 (setenv "$BOOTJAVAC_OPTS" "-nowarn")
276 ;; Without these JamVM options the build may freeze.
277 (substitute* "bootstrap.sh"
278 (("^\"\\$\\{JAVACMD\\}\" " m)
279 ,@(if (string-prefix? "armhf" (or (%current-system)
280 (%current-target-system)))
281 `((string-append m "-Xnocompact "))
282 `((string-append m "-Xnocompact -Xnoinlining ")))))
284 ;; Disable tests because we are bootstrapping and thus don't have
285 ;; any of the dependencies required to build and run the tests.
286 (substitute* "build.xml"
287 (("depends=\"jars,test-jar\"") "depends=\"jars\""))
288 (invoke "bash" "bootstrap.sh"
289 (string-append "-Ddist.dir="
290 (assoc-ref %outputs "out")))))
291 (add-after 'build 'strip-jar-timestamps ;based on ant-build-system
292 (lambda* (#:key outputs #:allow-other-keys)
293 (define (repack-archive jar)
294 (let* ((dir (mkdtemp! "jar-contents.XXXXXX"))
295 (manifest (string-append dir "/META-INF/MANIFESTS.MF")))
296 (with-directory-excursion dir
297 (invoke "unzip" jar))
299 ;; XXX: copied from (gnu build install)
300 (for-each (lambda (file)
301 (let ((s (lstat file)))
302 (unless (eq? (stat:type s) 'symlink)
303 (utime file 0 0 0 0))))
304 (find-files dir #:directories? #t))
305 ;; It is important that the manifest appears first.
306 (with-directory-excursion dir
307 (let* ((files (find-files "." ".*" #:directories? #t))
308 ;; To ensure that the reference scanner can
309 ;; detect all store references in the jars
310 ;; we disable compression with the "-0" option.
311 (command (if (file-exists? manifest)
312 `("zip" "-0" "-X" ,jar ,manifest
314 `("zip" "-0" "-X" ,jar ,@files))))
315 (apply invoke command)))))
316 (for-each repack-archive
318 (string-append (assoc-ref %outputs "out") "/lib")
324 ("jamvm" ,jamvm-1-bootstrap)
327 (home-page "http://ant.apache.org")
328 (synopsis "Build tool for Java")
330 "Ant is a platform-independent build tool for Java. It is similar to
331 make but is implemented using the Java language, requires the Java platform,
332 and is best suited to building Java projects. Ant uses XML to describe the
333 build process and its dependencies, whereas Make uses Makefile format.")
334 (license license:asl2.0)))
336 ;; Version 3.2.2 is the last version without a dependency on a full-fledged
337 ;; compiler for Java 1.5.
338 (define ecj-bootstrap
340 (name "ecj-bootstrap")
344 (uri (string-append "http://archive.eclipse.org/eclipse/"
345 "downloads/drops/R-" version
346 "-200702121330/ecjsrc.zip"))
349 "05hj82kxd23qaglsjkaqcj944riisjha7acf7h3ljhrjyljx8307"))))
350 ;; It would be so much easier if we could use the ant-build-system, but we
351 ;; cannot as we don't have ant at this point. We use ecj for
352 ;; bootstrapping the JDK.
353 (build-system gnu-build-system)
355 `(#:modules ((guix build gnu-build-system)
358 #:tests? #f ; there are no tests
360 (modify-phases %standard-phases
362 (lambda* (#:key inputs #:allow-other-keys)
365 (cons (string-append (assoc-ref inputs "jamvm")
367 (find-files (string-append
368 (assoc-ref inputs "ant-bootstrap")
374 (lambda* (#:key inputs #:allow-other-keys)
375 ;; The unpack phase enters the "org" directory by mistake.
378 ;; Create a simple manifest to make ecj executable.
379 (with-output-to-file "manifest"
381 (display "Manifest-Version: 1.0
382 Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n")))
385 (and (apply invoke "jikes"
386 (find-files "." "\\.java$"))
387 (invoke "fastjar" "cvfm"
388 "ecj-bootstrap.jar" "manifest" "."))))
390 (lambda* (#:key outputs #:allow-other-keys)
391 (let ((share (string-append (assoc-ref outputs "out")
394 (install-file "ecj-bootstrap.jar" share)
397 `(("ant-bootstrap" ,ant-bootstrap)
400 ("jamvm" ,jamvm-1-bootstrap)
401 ("fastjar" ,fastjar)))
402 (home-page "https://eclipse.org")
403 (synopsis "Eclipse Java development tools core batch compiler")
404 (description "This package provides the Eclipse Java core batch compiler
405 for bootstrapping purposes. The @dfn{Eclipse compiler for Java} (ecj) is a
406 requirement for all GNU Classpath releases after version 0.93.")
407 (license license:epl1.0)))
409 (define ecj-javac-wrapper
410 (package (inherit ecj-bootstrap)
411 (name "ecj-javac-wrapper")
413 (build-system trivial-build-system)
415 `(#:modules ((guix build utils))
418 (use-modules (guix build utils))
419 (let* ((bin (string-append (assoc-ref %outputs "out") "/bin"))
420 (target (string-append bin "/javac"))
421 (guile (string-append (assoc-ref %build-inputs "guile")
423 (ecj (string-append (assoc-ref %build-inputs "ecj-bootstrap")
424 "/share/java/ecj-bootstrap.jar"))
425 (java (string-append (assoc-ref %build-inputs "jamvm")
427 (bootcp (let ((jvmlib (string-append (assoc-ref %build-inputs "classpath")
428 "/share/classpath")))
429 (string-append jvmlib "/glibj.zip:"
430 jvmlib "/tools.zip"))))
432 (with-output-to-file target
434 (format #t "#!~a --no-auto-compile\n!#\n" guile)
436 `(begin (use-modules (ice-9 match)
442 '(("-bootclasspath" ,bootcp)
447 (let ((classpath (getenv "CLASSPATH")))
449 (string-join (list ,ecj
450 ,(string-append (assoc-ref %build-inputs "jamvm")
454 (receive (vm-args other-args)
455 ;; Separate VM arguments from arguments to ECJ.
456 (partition (cut string-prefix? "-J" <>)
457 (fold (lambda (default acc)
458 (if (member (first default) acc)
459 acc (append default acc)))
463 ;; Remove "-J" prefix
464 (map (cut string-drop <> 2) vm-args)
465 '("org.eclipse.jdt.internal.compiler.batch.Main")
466 (cons "-nowarn" other-args)))))
468 (let ((args (cdr (command-line))))
470 (format (current-error-port) "javac: no arguments given!\n")
475 `(("guile" ,guile-2.2)
476 ("ecj-bootstrap" ,ecj-bootstrap)
477 ("jamvm" ,jamvm-1-bootstrap)
478 ("classpath" ,classpath-bootstrap)))
479 (description "This package provides a wrapper around the @dfn{Eclipse
480 compiler for Java} (ecj) with a command line interface that is compatible with
481 the standard javac executable.")))
483 ;; The classpath-bootstrap was built without a virtual machine, so it does not
484 ;; provide a wrapper for javah. We cannot build the development version of
485 ;; Classpath without javah.
486 (define classpath-0.99
487 (package (inherit classpath-bootstrap)
491 (uri (string-append "mirror://gnu/classpath/classpath-"
495 "1j7cby4k66f1nvckm48xcmh352b1d1b33qk7l6hi7dp9i9zjjagr"))
496 (patches (search-patches "classpath-aarch64-support.patch"))))
499 (list (string-append "--with-ecj-jar="
500 (assoc-ref %build-inputs "ecj-bootstrap")
501 "/share/java/ecj-bootstrap.jar")
502 (string-append "JAVAC="
503 (assoc-ref %build-inputs "ecj-javac-wrapper")
505 (string-append "JAVA="
506 (assoc-ref %build-inputs "jamvm")
509 "ac_cv_prog_java_works=yes" ; trust me
513 "--disable-gconf-peer"
519 (modify-phases %standard-phases
520 (add-after 'install 'install-data
521 (lambda _ (invoke "make" "install-data"))))))
523 `(("ecj-bootstrap" ,ecj-bootstrap)
524 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
526 ("jamvm" ,jamvm-1-bootstrap)
527 ("classpath" ,classpath-bootstrap)
529 ("pkg-config" ,pkg-config)))))
531 ;; We need this because classpath-bootstrap does not provide all of the tools
532 ;; we need to build classpath-devel.
533 (define classpath-jamvm-wrappers
534 (package (inherit classpath-0.99)
535 (name "classpath-jamvm-wrappers")
537 (build-system trivial-build-system)
539 `(#:modules ((guix build utils))
542 (use-modules (guix build utils))
543 (let* ((bash (assoc-ref %build-inputs "bash"))
544 (jamvm (assoc-ref %build-inputs "jamvm"))
545 (classpath (assoc-ref %build-inputs "classpath"))
546 (bin (string-append (assoc-ref %outputs "out")
549 (for-each (lambda (tool)
550 (with-output-to-file (string-append bin tool)
552 ,@(if (string-prefix? "armhf" (or (%current-system)
553 (%current-target-system)))
554 `((format #t "#!~a/bin/sh
555 ~a/bin/jamvm -Xnocompact -classpath ~a/share/classpath/tools.zip \
556 gnu.classpath.tools.~a.~a $@"
557 bash jamvm classpath tool
558 (if (string=? "native2ascii" tool)
559 "Native2ASCII" "Main")))
560 `((format #t "#!~a/bin/sh
561 ~a/bin/jamvm -Xnocompact -Xnoinlining -classpath ~a/share/classpath/tools.zip \
562 gnu.classpath.tools.~a.~a $@"
563 bash jamvm classpath tool
564 (if (string=? "native2ascii" tool)
565 "Native2ASCII" "Main"))))))
566 (chmod (string-append bin tool) #o755))
576 ("jamvm" ,jamvm-1-bootstrap)
577 ("classpath" ,classpath-0.99)))
579 (synopsis "Executables from GNU Classpath")
580 (description "This package provides wrappers around the tools provided by
581 the GNU Classpath library. They are executed by the JamVM virtual
584 ;; The last release of GNU Classpath is 0.99 and it happened in 2012. Since
585 ;; then Classpath has gained much more support for Java 1.6.
586 (define-public classpath-devel
587 (let ((commit "e7c13ee0cf2005206fbec0eca677f8cf66d5a103")
589 (package (inherit classpath-bootstrap)
590 (version (string-append "0.99-" revision "." (string-take commit 9)))
594 (url "https://git.savannah.gnu.org/git/classpath.git")
596 (file-name (string-append "classpath-" version "-checkout"))
599 "1v2rww76ww322mpg3s12a1kkc6gkp31bm9gcxs532h0wq285fiw4"))))
602 ;; Ensure that the initial heap size is smaller than the maximum
603 ;; size. By default only Xmx is set, which can lead to invalid
604 ;; memory settings on some machines with a lot of memory.
605 '("JAVAC_MEM_OPT=-J-Xms512M -J-Xmx768M")
607 (list (string-append "--with-ecj-jar="
608 (assoc-ref %build-inputs "ecj-bootstrap")
609 "/share/java/ecj-bootstrap.jar")
610 (string-append "--with-javac="
611 (assoc-ref %build-inputs "ecj-javac-wrapper")
613 (string-append "JAVA="
614 (assoc-ref %build-inputs "jamvm")
617 "ac_cv_prog_java_works=yes" ; trust me
621 "--disable-gconf-peer"
627 (modify-phases %standard-phases
628 ;; XXX The bootstrap phase executes autogen.sh, which fails after
629 ;; complaining about the lack of gettext.
631 (lambda _ (invoke "autoreconf" "-vif")))
632 (add-after 'unpack 'remove-unsupported-annotations
634 (substitute* (find-files "java" "\\.java$")
637 (add-after 'install 'install-data
638 (lambda _ (invoke "make" "install-data"))))))
640 `(("autoconf" ,autoconf)
641 ("automake" ,automake)
643 ("gettext" ,gettext-minimal)
645 ("classpath-jamvm-wrappers" ,classpath-jamvm-wrappers) ; for javah
646 ("ecj-bootstrap" ,ecj-bootstrap)
647 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
649 ("jamvm" ,jamvm-1-bootstrap)
651 ("pkg-config" ,pkg-config))))))
654 (package (inherit jamvm-1-bootstrap)
658 (uri (string-append "mirror://sourceforge/jamvm/jamvm/"
659 "JamVM%20" version "/jamvm-"
663 "1nl0zxz8y5x8gwsrm7n32bry4dx8x70p8z3s9jbdvs8avyb8whkn"))))
664 (build-system gnu-build-system)
667 (list (string-append "--with-classpath-install-dir="
668 (assoc-ref %build-inputs "classpath")))))
670 `(("classpath" ,classpath-devel)
671 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
674 (define ecj-javac-wrapper-final
675 (package (inherit ecj-javac-wrapper)
677 `(("guile" ,guile-2.2)
678 ("ecj-bootstrap" ,ecj-bootstrap)
680 ("classpath" ,classpath-devel)))))
682 ;; The bootstrap JDK consisting of jamvm, classpath-devel,
683 ;; ecj-javac-wrapper-final cannot build Icedtea 2.x directly, because it's
684 ;; written in Java 7. It can, however, build the unmaintained Icedtea 1.x,
685 ;; which uses Java 6 only.
686 (define-public icedtea-6
693 "http://icedtea.wildebeest.org/download/source/icedtea6-"
697 "0bg9sb4f7qbq77c0zf9m17p47ga0kf0r9622g9p12ysg26jd1ksg"))
698 (modules '((guix build utils)))
701 (substitute* "Makefile.in"
702 ;; do not leak information about the build host
703 (("DISTRIBUTION_ID=\"\\$\\(DIST_ID\\)\"")
704 "DISTRIBUTION_ID=\"\\\"guix\\\"\""))
706 (build-system gnu-build-system)
707 (outputs '("out" ; Java Runtime Environment
708 "jdk" ; Java Development Kit
709 "doc")) ; all documentation
711 `(;; There are many failing tests and many are known to fail upstream.
714 ;; The DSOs use $ORIGIN to refer to each other, but (guix build
715 ;; gremlin) doesn't support it yet, so skip this phase.
716 #:validate-runpath? #f
718 #:modules ((guix build utils)
719 (guix build gnu-build-system)
723 `("--enable-bootstrap"
726 "--with-parallel-jobs"
727 "--disable-downloading"
729 ,(string-append "--with-ecj="
730 (assoc-ref %build-inputs "ecj")
731 "/share/java/ecj-bootstrap.jar")
732 ,(string-append "--with-jar="
733 (assoc-ref %build-inputs "fastjar")
735 ,(string-append "--with-jdk-home="
736 (assoc-ref %build-inputs "classpath"))
737 ,(string-append "--with-java="
738 (assoc-ref %build-inputs "jamvm")
741 (modify-phases %standard-phases
743 (lambda* (#:key source inputs #:allow-other-keys)
744 (invoke "tar" "xvf" source)
745 (chdir (string-append "icedtea6-" ,version))
747 (copy-recursively (assoc-ref inputs "openjdk-src") "openjdk")
748 ;; The convenient OpenJDK source bundle is no longer
749 ;; available for download, so we have to take the sources
750 ;; from the Mercurial repositories and change the Makefile
751 ;; to avoid tests for the OpenJDK zip archive.
752 (with-directory-excursion "openjdk"
753 (for-each (lambda (part)
757 (string-append part "-src"))
760 "langtools" "jaxp" "jaxws")))
761 (with-directory-excursion "openjdk"
762 (invoke "tar" "xvf" (assoc-ref inputs "hotspot-src"))
763 (rename-file "hg-checkout" "hotspot"))
764 (substitute* "patches/freetypeversion.patch"
765 (("REQUIRED_FREETYPE_VERSION = 2.2.1")
766 "REQUIRED_FREETYPE_VERSION = 2.10.1"))
767 (substitute* "Makefile.in"
768 (("echo \"ERROR: No up-to-date OpenJDK zip available\"; exit -1;")
769 "echo \"trust me\";")
770 ;; The contents of the bootstrap directory must be
771 ;; writeable but when copying from the store they are
773 (("mkdir -p lib/rt" line)
774 (string-append line "; chmod -R u+w $(BOOT_DIR)")))
775 (invoke "chmod" "-R" "u+w" "openjdk")))
776 (add-after 'unpack 'use-classpath
777 (lambda* (#:key inputs #:allow-other-keys)
778 (let ((jvmlib (assoc-ref inputs "classpath"))
779 (jamvm (assoc-ref inputs "jamvm")))
780 ;; Classpath does not provide rt.jar.
781 (substitute* "Makefile.in"
782 (("\\$\\(SYSTEM_JDK_DIR\\)/jre/lib/rt.jar")
783 (string-append jvmlib "/share/classpath/glibj.zip")))
784 ;; Make sure we can find all classes.
786 (string-append jvmlib "/share/classpath/glibj.zip:"
787 jvmlib "/share/classpath/tools.zip:"
788 jamvm "/lib/rt.jar"))
790 (string-append "-cp "
791 jvmlib "/share/classpath/glibj.zip:"
792 jvmlib "/share/classpath/tools.zip")))
794 (add-after 'unpack 'patch-patches
796 ;; shebang in patches so that they apply cleanly
797 (substitute* '("patches/jtreg-jrunscript.patch"
798 "patches/hotspot/hs23/drop_unlicensed_test.patch")
799 (("#!/bin/sh") (string-append "#!" (which "sh"))))
801 (add-after 'unpack 'patch-paths
802 (lambda* (#:key inputs #:allow-other-keys)
803 ;; buildtree.make generates shell scripts, so we need to replace
804 ;; the generated shebang
805 (substitute* '("openjdk/hotspot/make/linux/makefiles/buildtree.make")
806 (("/bin/sh") (which "bash")))
808 (let ((corebin (string-append
809 (assoc-ref inputs "coreutils") "/bin/"))
810 (binbin (string-append
811 (assoc-ref inputs "binutils") "/bin/"))
812 (grepbin (string-append
813 (assoc-ref inputs "grep") "/bin/")))
814 (substitute* '("openjdk/jdk/make/common/shared/Defs-linux.gmk"
815 "openjdk/corba/make/common/shared/Defs-linux.gmk")
816 (("UNIXCOMMAND_PATH = /bin/")
817 (string-append "UNIXCOMMAND_PATH = " corebin))
818 (("USRBIN_PATH = /usr/bin/")
819 (string-append "USRBIN_PATH = " corebin))
820 (("DEVTOOLS_PATH *= */usr/bin/")
821 (string-append "DEVTOOLS_PATH = " corebin))
822 (("COMPILER_PATH *= */usr/bin/")
823 (string-append "COMPILER_PATH = "
824 (assoc-ref inputs "gcc") "/bin/"))
825 (("DEF_OBJCOPY *=.*objcopy")
826 (string-append "DEF_OBJCOPY = " (which "objcopy"))))
828 ;; fix path to alsa header
829 (substitute* "openjdk/jdk/make/common/shared/Sanity.gmk"
830 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
831 (string-append "ALSA_INCLUDE="
832 (assoc-ref inputs "alsa-lib")
833 "/include/alsa/version.h")))
835 ;; fix hard-coded utility paths
836 (substitute* '("openjdk/jdk/make/common/shared/Defs-utils.gmk"
837 "openjdk/corba/make/common/shared/Defs-utils.gmk")
839 (string-append "ECHO = " (which "echo")))
841 (string-append "GREP = " (which "grep")))
843 (string-append "EGREP = " (which "egrep")))
845 (string-append "CPIO = " (which "cpio")))
846 (("READELF *=.*readelf")
847 (string-append "READELF = " (which "readelf")))
849 (string-append "AR = " (which "ar")))
851 (string-append "TAR = " (which "tar")))
853 (string-append "AS = " (which "as")))
855 (string-append "LD = " (which "ld")))
857 (string-append "STRIP = " (which "strip")))
859 (string-append "NM = " (which "nm")))
861 (string-append "SH = " (which "bash")))
863 (string-append "FIND = " (which "find")))
865 (string-append "LDD = " (which "ldd")))
866 (("NAWK *=.*(n|g)awk")
867 (string-append "NAWK = " (which "gawk")))
869 (string-append "XARGS = " (which "xargs")))
871 (string-append "UNZIP = " (which "unzip")))
873 (string-append "ZIPEXE = " (which "zip")))
875 (string-append "SED = " (which "sed"))))
877 ;; Some of these timestamps cause problems as they are more than
878 ;; 10 years ago, failing the build process.
880 "openjdk/jdk/src/share/classes/java/util/CurrencyData.properties"
881 (("AZ=AZM;2005-12-31-20-00-00;AZN") "AZ=AZN")
882 (("MZ=MZM;2006-06-30-22-00-00;MZN") "MZ=MZN")
883 (("RO=ROL;2005-06-30-21-00-00;RON") "RO=RON")
884 (("TR=TRL;2004-12-31-22-00-00;TRY") "TR=TRY"))
886 (add-before 'configure 'set-additional-paths
887 (lambda* (#:key inputs #:allow-other-keys)
889 (string-append (assoc-ref inputs "libxrender")
890 "/include/X11/extensions" ":"
891 (assoc-ref inputs "libxtst")
892 "/include/X11/extensions" ":"
893 (assoc-ref inputs "libxinerama")
894 "/include/X11/extensions" ":"
895 (or (getenv "CPATH") "")))
896 (setenv "ALT_CUPS_HEADERS_PATH"
897 (string-append (assoc-ref inputs "cups")
899 (setenv "ALT_FREETYPE_HEADERS_PATH"
900 (string-append (assoc-ref inputs "freetype")
902 (setenv "ALT_FREETYPE_LIB_PATH"
903 (string-append (assoc-ref inputs "freetype")
906 (add-before 'build 'disable-os-version-check
907 ;; allow build on linux major version change
909 (setenv "DISABLE_HOTSPOT_OS_VERSION_CHECK" "ok")
912 (lambda* (#:key outputs #:allow-other-keys)
913 (let ((doc (string-append (assoc-ref outputs "doc")
914 "/share/doc/icedtea"))
915 (jre (assoc-ref outputs "out"))
916 (jdk (assoc-ref outputs "jdk")))
917 (copy-recursively "openjdk.build/docs" doc)
918 (copy-recursively "openjdk.build/j2re-image" jre)
919 (copy-recursively "openjdk.build/j2sdk-image" jdk))
922 `(("ant" ,ant-bootstrap)
923 ("alsa-lib" ,alsa-lib)
925 ("classpath" ,classpath-devel)
926 ("coreutils" ,coreutils)
929 ("ecj" ,ecj-bootstrap)
930 ("ecj-javac" ,ecj-javac-wrapper-final)
932 ("fontconfig" ,fontconfig)
933 ("freetype" ,freetype)
945 ("libxcomposite" ,libxcomposite)
947 ("libxinerama" ,libxinerama)
948 ("libxrender" ,libxrender)
949 ("libxslt" ,libxslt) ;for xsltproc
952 ("mit-krb5" ,mit-krb5)
954 ("nss-certs" ,nss-certs)
956 ("pkg-config" ,pkg-config)
957 ("procps" ,procps) ;for "free", even though I'm not sure we should use it
967 (url "http://hg.openjdk.java.net/jdk6/jdk6/")
968 (changeset "jdk6-b41")))
971 "14q47yfg586fs64w30g8mk92m5dkxsvr36zzh0ra99xk5x0x96mv"))))
976 (url "http://hg.openjdk.java.net/jdk6/jdk6/jdk/")
977 (changeset "jdk6-b41")))
980 "165824nhg1k1dx6zs9dny0j49rmk35jw5b13dmz8c77jfajml4v9"))))
985 (url "http://hg.openjdk.java.net/jdk6/jdk6/hotspot/")
986 (changeset "jdk6-b41")))
989 "07lc1z4k5dj9nrc1wvwmpvxr3xgxrdkdh53xb95skk5ij49yagfd"))
991 (search-patches "icedtea-6-hotspot-gcc-segfault-workaround.patch"))))
996 (url "http://hg.openjdk.java.net/jdk6/jdk6/corba/")
997 (changeset "jdk6-b41")))
1000 "1p9g1r9dnax2iwp7yb59qx7m4nmshqhwmrb2b8jj8zgbd9dl2i3q"))))
1005 (url "http://hg.openjdk.java.net/jdk6/jdk6/langtools/")
1006 (changeset "jdk6-b41")))
1009 "1x52wd67fynbbd9ild6fb4wvba3f5hhwk03qdjfazd0a1qr37z3d"))))
1014 (url "http://hg.openjdk.java.net/jdk6/jdk6/jaxp/")
1015 (changeset "jdk6-b41")))
1018 "0shlqrvzpr4nrkmv215lbxnby63s3yvbdh1yxcayznsyqwa4nlxm"))))
1023 (url "http://hg.openjdk.java.net/jdk6/jdk6/jaxws/")
1024 (changeset "jdk6-b41")))
1027 "0835lkw8vib1xhp8lxnybhlvzdh699hbi4mclxanydjk63zbpxk0"))))))
1028 (home-page "http://icedtea.classpath.org")
1029 (synopsis "Java development kit")
1031 "This package provides the OpenJDK built with the IcedTea build harness.
1032 This version of the OpenJDK is no longer maintained and is only used for
1033 bootstrapping purposes.")
1034 ;; IcedTea is released under the GPL2 + Classpath exception, which is the
1035 ;; same license as both GNU Classpath and OpenJDK.
1036 (license license:gpl2+)))
1038 (define-public icedtea-7
1039 (let* ((version "2.6.13")
1040 (drop (lambda (name hash)
1044 "http://icedtea.classpath.org/download/drops"
1045 "/icedtea7/" version "/" name ".tar.bz2"))
1046 (sha256 (base32 hash))))))
1053 "http://icedtea.wildebeest.org/download/source/icedtea-"
1057 "1w331rdqx1dcx2xb0fmjmrkdc71xqn20fxsgw8by4xhiblh88khh"))
1058 (modules '((guix build utils)))
1061 (substitute* "Makefile.in"
1062 ;; do not leak information about the build host
1063 (("DISTRIBUTION_ID=\"\\$\\(DIST_ID\\)\"")
1064 "DISTRIBUTION_ID=\"\\\"guix\\\"\""))
1066 (build-system gnu-build-system)
1067 (outputs '("out" ; Java Runtime Environment
1068 "jdk" ; Java Development Kit
1069 "doc")) ; all documentation
1071 `(;; There are many test failures. Some are known to
1072 ;; fail upstream, others relate to not having an X
1073 ;; server running at test time, yet others are a
1074 ;; complete mystery to me.
1076 ;; hotspot: passed: 241; failed: 45; error: 2
1077 ;; langtools: passed: 1,934; failed: 26
1081 ;; The DSOs use $ORIGIN to refer to each other, but (guix build
1082 ;; gremlin) doesn't support it yet, so skip this phase.
1083 #:validate-runpath? #f
1085 ;; Apparently, the C locale is needed for some of the tests.
1088 #:modules ((guix build utils)
1089 (guix build gnu-build-system)
1096 ;; TODO: package pcsc and sctp, and add to inputs
1097 `("--disable-system-pcsc"
1098 "--disable-system-sctp"
1099 "--enable-bootstrap"
1102 "--disable-downloading"
1103 "--disable-tests" ;they are run in the check phase instead
1104 "--with-openjdk-src-dir=./openjdk.src"
1105 ,(string-append "--with-jdk-home="
1106 (assoc-ref %build-inputs "jdk")))
1109 (modify-phases %standard-phases
1111 (lambda* (#:key source inputs #:allow-other-keys)
1112 (let ((target (string-append "icedtea-" ,version))
1113 (unpack (lambda* (name #:optional dir)
1115 (string-drop-right name 5))))
1118 (assoc-ref inputs name)
1120 "--strip-components=1")))))
1122 (invoke "tar" "xvf" source
1123 "-C" target "--strip-components=1")
1125 (unpack "openjdk-src" "openjdk.src")
1126 (with-directory-excursion "openjdk.src"
1128 (filter (cut string-suffix? "-drop" <>)
1133 (add-after 'unpack 'patch-bitrot
1135 (substitute* '("patches/boot/revert-6973616.patch"
1136 "openjdk.src/jdk/make/common/shared/Defs-versions.gmk")
1137 (("REQUIRED_FREETYPE_VERSION = 2.2.1")
1138 "REQUIRED_FREETYPE_VERSION = 2.10.1"))
1139 ;; As of attr 2.4.48 this header is no longer
1140 ;; included. It is provided by the libc instead.
1141 (substitute* '("configure"
1142 "openjdk.src/jdk/src/solaris/native/sun/nio/fs/LinuxNativeDispatcher.c")
1143 (("attr/xattr.h") "sys/xattr.h"))
1145 (add-after 'unpack 'fix-x11-extension-include-path
1146 (lambda* (#:key inputs #:allow-other-keys)
1147 (substitute* "openjdk.src/jdk/make/sun/awt/mawt.gmk"
1148 (((string-append "\\$\\(firstword \\$\\(wildcard "
1149 "\\$\\(OPENWIN_HOME\\)"
1150 "/include/X11/extensions\\).*$"))
1151 (string-append (assoc-ref inputs "libxrender")
1152 "/include/X11/extensions"
1153 " -I" (assoc-ref inputs "libxtst")
1154 "/include/X11/extensions"
1155 " -I" (assoc-ref inputs "libxinerama")
1156 "/include/X11/extensions"))
1157 (("\\$\\(wildcard /usr/include/X11/extensions\\)\\)") ""))
1159 (add-after 'unpack 'patch-paths
1161 ;; buildtree.make generates shell scripts, so we need to replace
1162 ;; the generated shebang
1163 (substitute* '("openjdk.src/hotspot/make/linux/makefiles/buildtree.make")
1164 (("/bin/sh") (which "bash")))
1166 (let ((corebin (string-append
1167 (assoc-ref %build-inputs "coreutils") "/bin/"))
1168 (binbin (string-append
1169 (assoc-ref %build-inputs "binutils") "/bin/"))
1170 (grepbin (string-append
1171 (assoc-ref %build-inputs "grep") "/bin/")))
1172 (substitute* '("openjdk.src/jdk/make/common/shared/Defs-linux.gmk"
1173 "openjdk.src/corba/make/common/shared/Defs-linux.gmk")
1174 (("UNIXCOMMAND_PATH = /bin/")
1175 (string-append "UNIXCOMMAND_PATH = " corebin))
1176 (("USRBIN_PATH = /usr/bin/")
1177 (string-append "USRBIN_PATH = " corebin))
1178 (("DEVTOOLS_PATH *= */usr/bin/")
1179 (string-append "DEVTOOLS_PATH = " corebin))
1180 (("COMPILER_PATH *= */usr/bin/")
1181 (string-append "COMPILER_PATH = "
1182 (assoc-ref %build-inputs "gcc") "/bin/"))
1183 (("DEF_OBJCOPY *=.*objcopy")
1184 (string-append "DEF_OBJCOPY = " (which "objcopy"))))
1186 ;; fix path to alsa header
1187 (substitute* "openjdk.src/jdk/make/common/shared/Sanity.gmk"
1188 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
1189 (string-append "ALSA_INCLUDE="
1190 (assoc-ref %build-inputs "alsa-lib")
1191 "/include/alsa/version.h")))
1193 ;; fix hard-coded utility paths
1194 (substitute* '("openjdk.src/jdk/make/common/shared/Defs-utils.gmk"
1195 "openjdk.src/corba/make/common/shared/Defs-utils.gmk")
1197 (string-append "ECHO = " (which "echo")))
1199 (string-append "GREP = " (which "grep")))
1200 (("EGREP *=.*egrep")
1201 (string-append "EGREP = " (which "egrep")))
1203 (string-append "CPIO = " (which "cpio")))
1204 (("READELF *=.*readelf")
1205 (string-append "READELF = " (which "readelf")))
1207 (string-append "AR = " (which "ar")))
1209 (string-append "TAR = " (which "tar")))
1211 (string-append "AS = " (which "as")))
1213 (string-append "LD = " (which "ld")))
1214 (("STRIP *=.*strip")
1215 (string-append "STRIP = " (which "strip")))
1217 (string-append "NM = " (which "nm")))
1219 (string-append "SH = " (which "bash")))
1221 (string-append "FIND = " (which "find")))
1223 (string-append "LDD = " (which "ldd")))
1224 (("NAWK *=.*(n|g)awk")
1225 (string-append "NAWK = " (which "gawk")))
1226 (("XARGS *=.*xargs")
1227 (string-append "XARGS = " (which "xargs")))
1228 (("UNZIP *=.*unzip")
1229 (string-append "UNZIP = " (which "unzip")))
1231 (string-append "ZIPEXE = " (which "zip")))
1233 (string-append "SED = " (which "sed"))))
1235 ;; Some of these timestamps cause problems as they are more than
1236 ;; 10 years ago, failing the build process.
1238 "openjdk.src/jdk/src/share/classes/java/util/CurrencyData.properties"
1239 (("AZ=AZM;2005-12-31-20-00-00;AZN") "AZ=AZN")
1240 (("MZ=MZM;2006-06-30-22-00-00;MZN") "MZ=MZN")
1241 (("RO=ROL;2005-06-30-21-00-00;RON") "RO=RON")
1242 (("TR=TRL;2004-12-31-22-00-00;TRY") "TR=TRY")))
1244 (add-before 'configure 'set-additional-paths
1245 (lambda* (#:key inputs #:allow-other-keys)
1246 (substitute* "openjdk.src/jdk/make/common/shared/Sanity.gmk"
1247 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
1248 (string-append "ALSA_INCLUDE="
1249 (assoc-ref inputs "alsa-lib")
1250 "/include/alsa/version.h")))
1253 (string-append (assoc-ref inputs "libxcomposite")
1254 "/include/X11/extensions" ":"
1255 (assoc-ref inputs "libxrender")
1256 "/include/X11/extensions" ":"
1257 (assoc-ref inputs "libxtst")
1258 "/include/X11/extensions" ":"
1259 (assoc-ref inputs "libxinerama")
1260 "/include/X11/extensions" ":"
1261 (or (getenv "CPATH") "")))
1262 (setenv "ALT_OBJCOPY" (which "objcopy"))
1263 (setenv "ALT_CUPS_HEADERS_PATH"
1264 (string-append (assoc-ref inputs "cups")
1266 (setenv "ALT_FREETYPE_HEADERS_PATH"
1267 (string-append (assoc-ref inputs "freetype")
1269 (setenv "ALT_FREETYPE_LIB_PATH"
1270 (string-append (assoc-ref inputs "freetype")
1273 (add-before 'build 'disable-os-version-check
1274 ;; allow build on linux major version change
1276 (setenv "DISABLE_HOTSPOT_OS_VERSION_CHECK" "ok")
1278 (add-before 'check 'fix-test-framework
1280 ;; Fix PATH in test environment
1281 (substitute* "test/jtreg/com/sun/javatest/regtest/Main.java"
1282 (("PATH=/bin:/usr/bin")
1283 (string-append "PATH=" (getenv "PATH"))))
1284 (substitute* "test/jtreg/com/sun/javatest/util/SysEnv.java"
1285 (("/usr/bin/env") (which "env")))
1286 (substitute* "openjdk.src/hotspot/test/test_env.sh"
1287 (("/bin/rm") (which "rm"))
1288 (("/bin/cp") (which "cp"))
1289 (("/bin/mv") (which "mv")))
1291 (add-before 'check 'fix-hotspot-tests
1293 (with-directory-excursion "openjdk.src/hotspot/test/"
1294 (substitute* "jprt.config"
1295 (("PATH=\"\\$\\{path4sdk\\}\"")
1296 (string-append "PATH=" (getenv "PATH")))
1297 (("make=/usr/bin/make")
1298 (string-append "make=" (which "make"))))
1299 (substitute* '("runtime/6626217/Test6626217.sh"
1300 "runtime/7110720/Test7110720.sh")
1301 (("/bin/rm") (which "rm"))
1302 (("/bin/cp") (which "cp"))
1303 (("/bin/mv") (which "mv"))))
1305 (add-before 'check 'fix-jdk-tests
1307 (with-directory-excursion "openjdk.src/jdk/test/"
1308 (substitute* "com/sun/jdi/JdbReadTwiceTest.sh"
1309 (("/bin/pwd") (which "pwd")))
1310 (substitute* "com/sun/jdi/ShellScaffold.sh"
1311 (("/bin/kill") (which "kill")))
1312 (substitute* "start-Xvfb.sh"
1313 ;;(("/usr/bin/X11/Xvfb") (which "Xvfb"))
1314 (("/usr/bin/nohup") (which "nohup")))
1315 (substitute* "javax/security/auth/Subject/doAs/Test.sh"
1316 (("/bin/rm") (which "rm")))
1317 (substitute* "tools/launcher/MultipleJRE.sh"
1318 (("echo \"#!/bin/sh\"")
1319 (string-append "echo \"#!" (which "rm") "\""))
1320 (("/usr/bin/zip") (which "zip")))
1321 (substitute* "com/sun/jdi/OnThrowTest.java"
1322 (("#!/bin/sh") (string-append "#!" (which "sh"))))
1323 (substitute* "java/lang/management/OperatingSystemMXBean/GetSystemLoadAverage.java"
1324 (("/usr/bin/uptime") (which "uptime")))
1325 (substitute* "java/lang/ProcessBuilder/Basic.java"
1326 (("/usr/bin/env") (which "env"))
1327 (("/bin/false") (which "false"))
1328 (("/bin/true") (which "true"))
1329 (("/bin/cp") (which "cp"))
1330 (("/bin/sh") (which "sh")))
1331 (substitute* "java/lang/ProcessBuilder/FeelingLucky.java"
1332 (("/bin/sh") (which "sh")))
1333 (substitute* "java/lang/ProcessBuilder/Zombies.java"
1334 (("/usr/bin/perl") (which "perl"))
1335 (("/bin/ps") (which "ps"))
1336 (("/bin/true") (which "true")))
1337 (substitute* "java/lang/Runtime/exec/ConcurrentRead.java"
1338 (("/usr/bin/tee") (which "tee")))
1339 (substitute* "java/lang/Runtime/exec/ExecWithDir.java"
1340 (("/bin/true") (which "true")))
1341 (substitute* "java/lang/Runtime/exec/ExecWithInput.java"
1342 (("/bin/cat") (which "cat")))
1343 (substitute* "java/lang/Runtime/exec/ExitValue.java"
1344 (("/bin/sh") (which "sh"))
1345 (("/bin/true") (which "true"))
1346 (("/bin/kill") (which "kill")))
1347 (substitute* "java/lang/Runtime/exec/LotsOfDestroys.java"
1348 (("/usr/bin/echo") (which "echo")))
1349 (substitute* "java/lang/Runtime/exec/LotsOfOutput.java"
1350 (("/usr/bin/cat") (which "cat")))
1351 (substitute* "java/lang/Runtime/exec/SleepyCat.java"
1352 (("/bin/cat") (which "cat"))
1353 (("/bin/sleep") (which "sleep"))
1354 (("/bin/sh") (which "sh")))
1355 (substitute* "java/lang/Runtime/exec/StreamsSurviveDestroy.java"
1356 (("/bin/cat") (which "cat")))
1357 (substitute* "java/rmi/activation/CommandEnvironment/SetChildEnv.java"
1358 (("/bin/chmod") (which "chmod")))
1359 (substitute* "java/util/zip/ZipFile/Assortment.java"
1360 (("/bin/sh") (which "sh"))))
1364 ;; The "make check-*" targets always return zero, so we need to
1365 ;; check for errors in the associated log files to determine
1366 ;; whether any tests have failed.
1367 (use-modules (ice-9 rdelim))
1368 (let* ((error-pattern (make-regexp "^(Error|FAILED):.*"))
1369 (checker (lambda (port)
1371 (let ((line (read-line port)))
1373 ((eof-object? line) #t)
1374 ((regexp-exec error-pattern line)
1375 (error "test failed"))
1377 (run-test (lambda (test)
1378 (invoke "make" test)
1379 (call-with-input-file
1380 (string-append "test/" test ".log")
1382 (when #f ; skip tests
1383 (run-test "check-hotspot")
1384 (run-test "check-langtools")
1385 (run-test "check-jdk"))
1388 (lambda* (#:key outputs #:allow-other-keys)
1389 (let ((doc (string-append (assoc-ref outputs "doc")
1390 "/share/doc/icedtea"))
1391 (jre (assoc-ref outputs "out"))
1392 (jdk (assoc-ref outputs "jdk")))
1393 (copy-recursively "openjdk.build/docs" doc)
1394 (copy-recursively "openjdk.build/j2re-image" jre)
1395 (copy-recursively "openjdk.build/j2sdk-image" jdk))
1397 ;; Some of the libraries in the lib/amd64 folder link to libjvm.so.
1398 ;; But that shared object is located in the server/ folder, so it
1399 ;; cannot be found. This phase creates a symbolic link in the
1400 ;; lib/amd64 folder so that the other libraries can find it.
1403 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
1405 ;; FIXME: Find the bug in the build system, so that this symlink is
1407 (add-after 'install 'install-libjvm
1408 (lambda* (#:key inputs outputs #:allow-other-keys)
1409 (let* ((lib-path (string-append (assoc-ref outputs "out")
1410 ;; See 'INSTALL_ARCH_DIR' in
1412 ,(match (%current-system)
1421 (symlink (string-append lib-path "/server/libjvm.so")
1422 (string-append lib-path "/libjvm.so")))
1424 ;; By default IcedTea only generates an empty keystore. In order to
1425 ;; be able to use certificates in Java programs we need to generate a
1426 ;; keystore from a set of certificates. For convenience we use the
1427 ;; certificates from the nss-certs package.
1428 (add-after 'install 'install-keystore
1429 (lambda* (#:key inputs outputs #:allow-other-keys)
1430 (let* ((keystore "cacerts")
1431 (certs-dir (string-append (assoc-ref inputs "nss-certs")
1433 (keytool (string-append (assoc-ref outputs "jdk")
1435 (define (extract-cert file target)
1436 (call-with-input-file file
1438 (call-with-output-file target
1440 (let loop ((line (read-line in 'concat))
1443 ((eof-object? line) #t)
1444 ((string-prefix? "-----BEGIN" line)
1446 (loop (read-line in 'concat) #t))
1447 ((string-prefix? "-----END" line)
1451 (when copying? (display line out))
1452 (loop (read-line in 'concat) copying?)))))))))
1453 (define (import-cert cert)
1454 (format #t "Importing certificate ~a\n" (basename cert))
1455 (let ((temp "tmpcert"))
1456 (extract-cert cert temp)
1457 (let ((port (open-pipe* OPEN_WRITE keytool
1459 "-alias" (basename cert)
1460 "-keystore" keystore
1461 "-storepass" "changeit"
1463 (display "yes\n" port)
1464 (when (not (zero? (status:exit-val (close-pipe port))))
1465 (format #t "failed to import ~a\n" cert)))
1466 (delete-file temp)))
1468 ;; This is necessary because the certificate directory contains
1469 ;; files with non-ASCII characters in their names.
1470 (setlocale LC_ALL "en_US.utf8")
1471 (setenv "LC_ALL" "en_US.utf8")
1473 (for-each import-cert (find-files certs-dir "\\.pem$"))
1474 (mkdir-p (string-append (assoc-ref outputs "out")
1476 (mkdir-p (string-append (assoc-ref outputs "jdk")
1477 "/jre/lib/security"))
1479 ;; The cacerts files we are going to overwrite are chmod'ed as
1480 ;; read-only (444) in icedtea-8 (which derives from this
1481 ;; package). We have to change this so we can overwrite them.
1482 (chmod (string-append (assoc-ref outputs "out")
1483 "/lib/security/" keystore) #o644)
1484 (chmod (string-append (assoc-ref outputs "jdk")
1485 "/jre/lib/security/" keystore) #o644)
1487 (install-file keystore
1488 (string-append (assoc-ref outputs "out")
1490 (install-file keystore
1491 (string-append (assoc-ref outputs "jdk")
1492 "/jre/lib/security"))
1497 "0l34ikyf62hbzlf9032alzkkqvf7bpmckz4gvirvph755w7gka8l"))
1500 "050gv2jbg1pi6qkn8w18bwpbklfa5b0kymjvan9pncddbj8m84fz"))
1503 "1k6yldwnxfzdg5926r1nlfv8d1r1j7rlp2nkz6gqh05vgyamnfhl"))
1506 "110j7jlz47x2gg6f7653x12mssan5kvj9l9h1m1c8c92drfxbqyk"))
1509 "0d1mca38ksxvdskp9im3pp7fdijhj1n3lwq9w13r9s4v3qyskgdd"))
1512 "0nq5236fzxn3p6x8cgncl56mzcmsj07q9gymysnws4c8byc6n0qj"))
1517 "http://icedtea.classpath.org/downloads/drops"
1518 "/icedtea7/" version "/hotspot.tar.bz2"))
1521 "17bdv39n4lh8l5737c96f3xgamx4y305m067p01cywgp7zaddqws"))
1522 (patches (search-patches
1523 "icedtea-7-hotspot-gcc-segfault-workaround.patch"))))
1524 ("ant" ,ant-bootstrap)
1526 ("coreutils" ,coreutils)
1527 ("diffutils" ,diffutils) ;for tests
1530 ("libtool" ,libtool)
1531 ("pkg-config" ,pkg-config)
1537 ("fastjar" ,fastjar)
1538 ("libxslt" ,libxslt) ;for xsltproc
1539 ("nss-certs" ,nss-certs)
1541 ("procps" ,procps) ;for "free", even though I'm not sure we should use it
1542 ("jdk" ,icedtea-6 "jdk")))
1544 `(("alsa-lib" ,alsa-lib)
1547 ("libxcomposite" ,libxcomposite)
1549 ("libxtst" ,libxtst)
1551 ("libxinerama" ,libxinerama)
1552 ("libxrender" ,libxrender)
1553 ("libjpeg" ,libjpeg)
1555 ("mit-krb5" ,mit-krb5)
1558 ("fontconfig" ,fontconfig)
1559 ("freetype" ,freetype)
1563 (home-page "http://icedtea.classpath.org")
1564 (synopsis "Java development kit")
1566 "This package provides the Java development kit OpenJDK built with the
1567 IcedTea build harness.")
1569 ;; 'configure' lists "mips" and "mipsel", but not "mips64el'.
1570 (supported-systems (delete "mips64el-linux" %supported-systems))
1572 ;; IcedTea is released under the GPL2 + Classpath exception, which is the
1573 ;; same license as both GNU Classpath and OpenJDK.
1574 (license license:gpl2+))))
1576 (define-public icedtea-8
1577 (let* ((version "3.7.0")
1578 (drop (lambda (name hash)
1582 "http://icedtea.classpath.org/download/drops"
1583 "/icedtea8/" version "/" name ".tar.xz"))
1584 (sha256 (base32 hash))))))
1585 (package (inherit icedtea-7)
1590 "http://icedtea.wildebeest.org/download/source/icedtea-"
1594 "09yqzn8rpccs7cyv89hhy5zlznpgqw5x3jz0w1ccp0cz1vgs8l5w"))
1595 (modules '((guix build utils)))
1598 (substitute* '("configure"
1600 ;; Do not embed build time
1601 (("(DIST_ID=\"Custom build).*$" _ prefix)
1602 (string-append prefix "\"\n"))
1603 ;; Do not leak information about the build host
1604 (("DIST_NAME=\"\\$build_os\"")
1605 "DIST_NAME=\"guix\""))
1608 `(#:imported-modules
1609 ((guix build ant-build-system)
1610 (guix build syscalls)
1611 ,@%gnu-build-system-modules)
1612 ,@(substitute-keyword-arguments (package-arguments icedtea-7)
1613 ((#:modules modules)
1614 `((guix build utils)
1615 (guix build gnu-build-system)
1616 ((guix build ant-build-system) #:prefix ant:)
1621 ((#:configure-flags flags)
1622 `(let ((jdk (assoc-ref %build-inputs "jdk")))
1623 `( ;;"--disable-bootstrap"
1624 "--enable-bootstrap"
1626 "--disable-downloading"
1627 "--disable-system-pcsc"
1628 "--disable-system-sctp"
1629 "--disable-tests" ;they are run in the check phase instead
1630 "--with-openjdk-src-dir=./openjdk.src"
1631 ,(string-append "--with-jdk-home=" jdk))))
1633 `(modify-phases ,phases
1634 (delete 'fix-x11-extension-include-path)
1635 (delete 'patch-paths)
1636 (delete 'set-additional-paths)
1637 (delete 'patch-patches)
1638 (delete 'patch-bitrot)
1639 ;; Prevent the keytool from recording the current time when
1640 ;; adding certificates at build time.
1641 (add-after 'unpack 'patch-keystore
1643 (substitute* "openjdk.src/jdk/src/share/classes/sun/security/provider/JavaKeyStore.java"
1644 (("date = new Date\\(\\);")
1646 date = (System.getenv(\"SOURCE_DATE_EPOCH\") != null) ?\
1647 new Date(Long.parseLong(System.getenv(\"SOURCE_DATE_EPOCH\"))) :\
1650 (add-after 'unpack 'patch-jni-libs
1651 ;; Hardcode dynamically loaded libraries.
1653 (let* ((library-path (search-path-as-string->list
1654 (getenv "LIBRARY_PATH")))
1655 (find-library (lambda (name)
1658 (string-append "lib" name ".so")))))
1661 (catch 'decoding-error
1664 (("VERSIONED_JNI_LIB_NAME\\(\"(.*)\", \"(.*)\"\\)"
1666 (format #f "\"~a\"" (find-library name)))
1667 (("JNI_LIB_NAME\\(\"(.*)\"\\)" _ name)
1668 (format #f "\"~a\"" (find-library name)))))
1670 ;; Those are safe to skip.
1671 (format (current-error-port)
1672 "warning: failed to substitute: ~a~%"
1674 (find-files "openjdk.src/jdk/src/solaris/native"
1678 (lambda* (#:key outputs #:allow-other-keys)
1679 (let ((doc (string-append (assoc-ref outputs "doc")
1680 "/share/doc/icedtea"))
1681 (jre (assoc-ref outputs "out"))
1682 (jdk (assoc-ref outputs "jdk")))
1683 (copy-recursively "openjdk.build/docs" doc)
1684 (copy-recursively "openjdk.build/images/j2re-image" jre)
1685 (copy-recursively "openjdk.build/images/j2sdk-image" jdk)
1686 ;; Install the nss.cfg file to JRE to enable SSL/TLS
1688 (copy-file (string-append jdk "/jre/lib/security/nss.cfg")
1689 (string-append jre "/lib/security/nss.cfg"))
1691 (add-after 'install 'strip-jar-timestamps
1692 (assoc-ref ant:%standard-phases 'strip-jar-timestamps)))))))
1694 `(("jdk" ,icedtea-7 "jdk")
1697 "1mj6xgmw31i6qd30qi9dmv7160fbcfq5ikz1jwjihdg2793il19p"))
1700 "1wb8k5zm40zld0986dvmlh5xh3gyixbg9h26sl662zy92amhmyyg"))
1703 "11ma4zz0599cy70xd219v7a8vin7p96xrhhz3wsaw6cjhkzpagah"))
1706 "14m1y0z0fbm5z5zjw3vnq85py8dma84bi3f9cw8rhdyc6skk8q4i"))
1709 "09andnm6xaasnp963hgx42yiflifiljp9z7z85jrfyc5z8a5whmf"))
1712 "0s6lcpc0zckz2fnq98aqf28nz9y3wbi41a3kyaqqa2abwbkm1zwl"))
1715 "15wizy123vhk40chl1b4p552jf2pw2hdww0myf11qab425axz4nw"))
1720 "http://icedtea.classpath.org/download/drops"
1721 "/icedtea8/" version "/hotspot.tar.xz"))
1724 "1ciz1w9j0kz7s1dxdhyqq71nla9icyz6qvn0b9z2zgkklqa98qmm"))
1725 (patches (search-patches
1726 "icedtea-7-hotspot-gcc-segfault-workaround.patch"))))
1729 "19pzl3ppaw8j6r5cnyp8qiw3hxijh3hdc46l39g5yfhdl4pr4hpa"))
1732 "0k33anxdzw1icn072wynfmmdjhsv50hay0j1sfkfxny12rb3vgdy"))
1733 ,@(fold alist-delete (package-native-inputs icedtea-7)
1734 '("jdk" "openjdk-src" "corba-drop" "jaxp-drop" "jaxws-drop"
1735 "jdk-drop" "langtools-drop" "hotspot-drop")))))))
1737 (define-public openjdk9
1743 (uri "https://hg.openjdk.java.net/jdk/jdk/archive/3cc80be736f2.tar.bz2")
1744 (file-name (string-append name "-" version ".tar.bz2"))
1747 "01ihmyf7k5z17wbr7xig7y40l9f01d5zjgkcmawn1102hw5kchpq"))
1748 (modules '((guix build utils)))
1751 (for-each delete-file (find-files "." ".*.bin$"))
1752 (for-each delete-file (find-files "." ".*.exe$"))
1753 (for-each delete-file (find-files "." ".*.jar$"))
1755 (build-system gnu-build-system)
1756 (outputs '("out" "jdk" "doc"))
1758 `(#:tests? #f; require jtreg
1760 ((guix build syscalls)
1761 ,@%gnu-build-system-modules)
1763 (modify-phases %standard-phases
1764 (add-after 'patch-source-shebangs 'fix-java-shebangs
1766 ;; This file was "fixed" by patch-source-shebangs, but it requires
1767 ;; this exact first line.
1768 (substitute* "jdk/make/data/blacklistedcertsconverter/blacklisted.certs.pem"
1769 (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))
1772 (lambda* (#:key inputs outputs #:allow-other-keys)
1773 ;; TODO: unbundle libpng and lcms
1774 (invoke "bash" "./configure"
1775 (string-append "--with-freetype=" (assoc-ref inputs "freetype"))
1776 "--disable-freetype-bundling"
1777 "--disable-warnings-as-errors"
1778 "--disable-hotspot-gtest"
1779 "--with-giflib=system"
1780 "--with-libjpeg=system"
1781 (string-append "--prefix=" (assoc-ref outputs "out")))
1785 (with-output-to-file ".src-rev"
1787 (display ,version)))
1788 (setenv "GUIX_LD_WRAPPER_ALLOW_IMPURITIES" "yes")
1789 (invoke "make" "all")
1791 ;; Some of the libraries in the lib/ folder link to libjvm.so.
1792 ;; But that shared object is located in the server/ folder, so it
1793 ;; cannot be found. This phase creates a symbolic link in the
1794 ;; lib/ folder so that the other libraries can find it.
1797 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
1799 ;; FIXME: Find the bug in the build system, so that this symlink is
1801 (add-after 'install 'install-libjvm
1802 (lambda* (#:key inputs outputs #:allow-other-keys)
1803 (let* ((lib-out (string-append (assoc-ref outputs "out")
1805 (lib-jdk (string-append (assoc-ref outputs "jdk")
1807 (symlink (string-append lib-jdk "/server/libjvm.so")
1808 (string-append lib-jdk "/libjvm.so"))
1809 (symlink (string-append lib-out "/server/libjvm.so")
1810 (string-append lib-out "/libjvm.so")))
1813 (lambda* (#:key outputs #:allow-other-keys)
1814 (let ((out (assoc-ref outputs "out"))
1815 (jdk (assoc-ref outputs "jdk"))
1816 (doc (assoc-ref outputs "doc"))
1817 (images (car (find-files "build" ".*-server-release"
1818 #:directories? #t))))
1819 (copy-recursively (string-append images "/images/jdk") jdk)
1820 (copy-recursively (string-append images "/images/jre") out)
1821 (copy-recursively (string-append images "/images/docs") doc))
1823 (add-after 'install 'strip-zip-timestamps
1824 (lambda* (#:key outputs #:allow-other-keys)
1825 (use-modules (guix build syscalls))
1826 (for-each (lambda (zip)
1827 (let ((dir (mkdtemp! "zip-contents.XXXXXX")))
1828 (with-directory-excursion dir
1829 (invoke "unzip" zip))
1831 (for-each (lambda (file)
1832 (let ((s (lstat file)))
1833 (unless (eq? (stat:type s) 'symlink)
1834 (format #t "reset ~a~%" file)
1835 (utime file 0 0 0 0))))
1836 (find-files dir #:directories? #t))
1837 (with-directory-excursion dir
1838 (let ((files (find-files "." ".*" #:directories? #t)))
1839 (apply invoke "zip" "-0" "-X" zip files)))))
1840 (find-files (assoc-ref outputs "doc") ".*.zip$"))
1843 `(("alsa-lib" ,alsa-lib)
1845 ("fontconfig" ,fontconfig)
1846 ("freetype" ,freetype)
1850 ("libjpeg" ,libjpeg)
1854 ("libxcomposite" ,libxcomposite)
1856 ("libxinerama" ,libxinerama)
1857 ("libxrender" ,libxrender)
1859 ("libxtst" ,libxtst)))
1861 `(("icedtea-8" ,icedtea-8)
1862 ("icedtea-8:jdk" ,icedtea-8 "jdk")
1866 (home-page "https://openjdk.java.net/projects/jdk9/")
1867 (synopsis "Java development kit")
1869 "This package provides the Java development kit OpenJDK.")
1870 (license license:gpl2+)))
1872 (define-public openjdk10
1879 (uri "http://hg.openjdk.java.net/jdk/jdk/archive/6fa770f9f8ab.tar.bz2")
1880 (file-name (string-append name "-" version ".tar.bz2"))
1883 "0zywq2203b4hx4jms9vbwvjcj1d3k2v3qpx4s33729fkpmid97r4"))
1884 (patches (search-patches
1885 "openjdk-10-idlj-reproducibility.patch"))
1886 (modules '((guix build utils)))
1889 (for-each delete-file (find-files "." ".*.bin$"))
1890 (for-each delete-file (find-files "." ".*.exe$"))
1891 (for-each delete-file (find-files "." ".*.jar$"))
1894 (substitute-keyword-arguments (package-arguments openjdk9)
1896 `(modify-phases ,phases
1897 (replace 'fix-java-shebangs
1899 ;; This file was "fixed" by patch-source-shebangs, but it requires
1900 ;; this exact first line.
1901 (substitute* "make/data/blacklistedcertsconverter/blacklisted.certs.pem"
1902 (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))
1905 (lambda* (#:key inputs outputs #:allow-other-keys)
1906 (invoke "bash" "./configure"
1907 (string-append "--with-freetype=" (assoc-ref inputs "freetype"))
1908 "--disable-freetype-bundling"
1909 "--disable-warnings-as-errors"
1910 "--disable-hotspot-gtest"
1911 "--with-giflib=system"
1912 "--with-libjpeg=system"
1913 "--with-native-debug-symbols=zipped"
1914 (string-append "--prefix=" (assoc-ref outputs "out")))
1917 `(("openjdk9" ,openjdk9)
1918 ("openjdk9:jdk" ,openjdk9 "jdk")
1923 (define-public openjdk11
1929 (uri "http://hg.openjdk.java.net/jdk/jdk/archive/76072a077ee1.tar.bz2")
1930 (file-name (string-append name "-" version ".tar.bz2"))
1933 "0v705w1s9lrqalzahir78pk397rkk9gfvzq821yv8h3xha0bqi6w"))
1934 (modules '((guix build utils)))
1937 (for-each delete-file (find-files "." ".*.bin$"))
1938 (for-each delete-file (find-files "." ".*.exe$"))
1939 (for-each delete-file (find-files "." ".*.jar$"))
1941 (build-system gnu-build-system)
1942 (outputs '("out" "jdk" "doc"))
1944 `(#:imported-modules
1945 ((guix build syscalls)
1946 (ice-9 binary-ports)
1948 ,@%gnu-build-system-modules)
1949 #:tests? #f; requires jtreg
1950 ;; TODO package jtreg
1951 ;; disable parallel builds, as the openjdk build system does not like -j
1952 #:parallel-build? #f
1953 #:parallel-tests? #f
1954 ;; reenable parallel builds and tests by adding the flags manually
1955 #:make-flags (list (string-append "JOBS=" (number->string (parallel-job-count))))
1957 `("--disable-option-checking" ; --enable-fast-install default flag errors otherwise
1958 "--disable-warnings-as-errors"
1959 ;; make validate-runpath pass, see: http://issues.guix.info/issue/32894
1960 "--with-native-debug-symbols=zipped"
1961 ;; do not use the bundled libraries
1962 "--with-giflib=system"
1963 "--with-lcms=system"
1964 "--with-libjpeg=system"
1965 "--with-libpng=system"
1966 "--with-version-pre="
1967 ;; allow the build system to locate the system freetype
1968 ,(string-append "--with-freetype-include="
1969 (assoc-ref %build-inputs "freetype") "/include")
1970 ,(string-append "--with-freetype-lib="
1971 (assoc-ref %build-inputs "freetype") "/lib"))
1974 (modify-phases %standard-phases
1975 (add-after 'patch-source-shebangs 'fix-java-shebangs
1977 ;; This file was "fixed" by patch-source-shebangs, but it requires
1978 ;; this exact first line.
1979 (substitute* "make/data/blacklistedcertsconverter/blacklisted.certs.pem"
1980 (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))
1984 (with-output-to-file ".src-rev"
1986 (display ,version)))
1987 (setenv "GUIX_LD_WRAPPER_ALLOW_IMPURITIES" "yes")
1988 (invoke "make" "all")
1990 ;; jdk 11 does not build jre by default any more
1991 ;; building it anyways
1992 ;; for further information see:
1993 ;; https://github.com/AdoptOpenJDK/openjdk-build/issues/356
1994 (add-after 'build 'build-jre
1996 (invoke "make" "legacy-jre-image")
1999 (lambda* (#:key outputs #:allow-other-keys)
2000 (let ((out (assoc-ref outputs "out"))
2001 (jdk (assoc-ref outputs "jdk"))
2002 (doc (assoc-ref outputs "doc"))
2003 (images (car (find-files "build" ".*-server-release"
2004 #:directories? #t))))
2005 (copy-recursively (string-append images "/images/jdk") jdk)
2006 (copy-recursively (string-append images "/images/jre") out)
2007 (copy-recursively (string-append images "/images/docs") doc))
2009 ;; Some of the libraries in the lib/ folder link to libjvm.so.
2010 ;; But that shared object is located in the server/ folder, so it
2011 ;; cannot be found. This phase creates a symbolic link in the
2012 ;; lib/ folder so that the other libraries can find it.
2015 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
2017 ;; FIXME: Find the bug in the build system, so that this symlink is
2019 (add-after 'install 'install-libjvm
2020 (lambda* (#:key inputs outputs #:allow-other-keys)
2021 (let* ((lib-out (string-append (assoc-ref outputs "out")
2023 (lib-jdk (string-append (assoc-ref outputs "jdk")
2025 (symlink (string-append lib-jdk "/server/libjvm.so")
2026 (string-append lib-jdk "/libjvm.so"))
2027 (symlink (string-append lib-out "/server/libjvm.so")
2028 (string-append lib-out "/libjvm.so")))
2030 (add-after 'install 'strip-character-data-timestamps
2031 (lambda* (#:key outputs #:allow-other-keys)
2032 (use-modules (guix build syscalls))
2033 (let ((archive (string-append
2034 (assoc-ref outputs "jdk") "/lib/src.zip"))
2035 (dir (mkdtemp! "zip-contents.XXXXXX")))
2036 (with-directory-excursion dir
2037 (invoke "unzip" archive))
2038 (delete-file archive)
2039 (with-directory-excursion dir
2040 (let ((char-data-files (find-files "." "CharacterData.*")))
2041 (for-each (lambda (file)
2043 (((string-append "This file was generated "
2044 "AUTOMATICALLY from a template "
2046 (string-append "This file was generated "
2047 "AUTOMATICALLY from a template "
2050 (with-directory-excursion dir
2051 (let ((files (find-files "." ".*" #:directories? #t)))
2052 (apply invoke "zip" "-0" "-X" archive files))))))
2053 (add-after 'strip-character-data-timestamps 'strip-archive-timestamps
2054 (lambda* (#:key outputs #:allow-other-keys)
2055 (use-modules (guix build syscalls)
2056 (ice-9 binary-ports)
2058 (letrec ((repack-archive
2060 (let ((dir (mkdtemp! "zip-contents.XXXXXX")))
2061 (with-directory-excursion dir
2062 (invoke "unzip" archive))
2063 (delete-file archive)
2064 (for-each (compose repack-archive canonicalize-path)
2065 (find-files dir "(ct.sym|.*.jar)$"))
2066 (let ((reset-file-timestamp
2068 (let ((s (lstat file)))
2069 (unless (eq? (stat:type s) 'symlink)
2070 (format #t "reset ~a~%" file)
2071 (utime file 0 0 0 0))))))
2072 (for-each reset-file-timestamp
2073 (find-files dir #:directories? #t)))
2074 (with-directory-excursion dir
2075 (let ((files (find-files "." ".*" #:directories? #t)))
2076 (apply invoke "zip" "-0" "-X" archive files)))))))
2077 (for-each repack-archive
2078 (find-files (assoc-ref outputs "doc") ".*.zip$"))
2079 (for-each repack-archive
2080 (find-files (assoc-ref outputs "jdk")
2081 ".*.(zip|jar|diz)$"))
2082 (repack-archive (string-append (assoc-ref outputs "jdk") "/lib/ct.sym"))
2085 (call-with-input-file file-name
2087 (let ((header #vu8(#x4a #x4d #x01 #x00)))
2088 (if (equal? (get-bytevector-n
2089 file (bytevector-length header))
2091 (let* ((header-length (bytevector-length header))
2092 (temp-file (mkstemp!
2094 "temp-file.XXXXXX")))
2095 (temp-filename (port-filename temp-file))
2097 (- (stat:size (stat file))
2099 (sendfile temp-file file content-length header-length)
2100 (delete-file file-name)
2101 (close-port temp-file)
2102 (repack-archive (canonicalize-path temp-filename))
2103 (call-with-output-file file-name
2105 (put-bytevector file header)
2106 (call-with-input-file temp-filename
2110 (stat:size (stat temp-file)) 0)))))))))))))
2111 (for-each repack-jmod
2112 (find-files (assoc-ref outputs "jdk") ".*.jmod$")))
2114 (add-after 'install 'remove-timestamp-from-api-summary
2115 (lambda* (#:key outputs #:allow-other-keys)
2116 (substitute* (string-append (assoc-ref outputs "doc")
2117 "/api/overview-summary.html")
2118 (("Generated by javadoc \\(11-internal\\).*$")
2119 "Generated by javadoc (11-internal) -->\n"))
2122 `(("alsa-lib" ,alsa-lib)
2124 ("fontconfig" ,fontconfig)
2125 ("freetype" ,freetype)
2128 ("libjpeg" ,libjpeg)
2131 ("libxext" ,libxext)
2132 ("libxrender" ,libxrender)
2134 ("libxtst" ,libxtst)))
2136 `(("autoconf" ,autoconf)
2137 ("openjdk10" ,openjdk10)
2138 ("openjdk10:jdk" ,openjdk10 "jdk")
2139 ("pkg-config" ,pkg-config)
2143 (home-page "https://openjdk.java.net/projects/jdk/11/")
2144 (synopsis "Java development kit")
2146 "This package provides the Java development kit OpenJDK.")
2147 (license license:gpl2+)))
2149 (define-public openjdk12
2156 (uri "http://hg.openjdk.java.net/jdk/jdk/archive/0276cba45aac.tar.bz2")
2157 (file-name (string-append name "-" version ".tar.bz2"))
2160 "0mbhdrk12b6878kby0flnbak7444dlpm0ihlmf92vk59y1c02bc2"))
2161 (modules '((guix build utils)))
2164 (for-each delete-file (find-files "." ".*.bin$"))
2165 (for-each delete-file (find-files "." ".*.exe$"))
2166 (for-each delete-file (find-files "." ".*.jar$"))
2169 `(("alsa-lib" ,alsa-lib)
2171 ("fontconfig" ,fontconfig)
2172 ("freetype" ,freetype)
2175 ("libjpeg" ,libjpeg)
2178 ("libxext" ,libxext)
2179 ("libxrandr" ,libxrandr)
2180 ("libxrender" ,libxrender)
2182 ("libxtst" ,libxtst)))
2184 `(("autoconf" ,autoconf)
2185 ("openjdk11" ,openjdk11)
2186 ("openjdk11:jdk" ,openjdk11 "jdk")
2187 ("pkg-config" ,pkg-config)
2191 (home-page "https://openjdk.java.net/projects/jdk/12")))
2193 (define-public icedtea icedtea-8)
2196 (define-public ant/java8
2197 (package (inherit ant-bootstrap)
2202 (uri (string-append "mirror://apache/ant/source/apache-ant-"
2203 version "-src.tar.gz"))
2206 "10p3dh77lkzzzcy32dk9azljixzadp46fggjfbvgkl8mmb8cxxv8"))
2207 (modules '((guix build utils)))
2210 (for-each delete-file
2211 (find-files "lib/optional" "\\.jar$"))
2214 (substitute-keyword-arguments (package-arguments ant-bootstrap)
2216 `(modify-phases ,phases
2217 (add-after 'unpack 'remove-scripts
2218 ;; Remove bat / cmd scripts for DOS as well as the antRun and runant
2221 (for-each delete-file
2222 (find-files "src/script"
2223 "(.*\\.(bat|cmd)|runant.*|antRun.*)"))
2226 (lambda* (#:key inputs outputs #:allow-other-keys)
2227 (setenv "JAVA_HOME" (assoc-ref inputs "jdk"))
2229 ;; Disable tests to avoid dependency on hamcrest-core, which needs
2230 ;; Ant to build. This is necessary in addition to disabling the
2231 ;; "check" phase, because the dependency on "test-jar" would always
2232 ;; result in the tests to be run.
2233 (substitute* "build.xml"
2234 (("depends=\"jars,test-jar\"") "depends=\"jars\""))
2235 (invoke "bash" "bootstrap.sh"
2236 (string-append "-Ddist.dir="
2237 (assoc-ref outputs "out")))))))))
2239 `(("jdk" ,icedtea-8 "jdk")
2241 ("unzip" ,unzip)))))
2243 ;; The 1.9.x series is the last that can be built with GCJ. The 1.10.x series
2246 (package (inherit ant/java8)
2250 (uri (string-append "mirror://apache/ant/source/apache-ant-"
2251 version "-src.tar.gz"))
2254 "1k28mka0m3isy9yr8gz84kz1f3f879rwaxrd44vdn9xbfwvwk86n"))))
2256 `(("jdk" ,icedtea-7 "jdk")
2258 ("unzip" ,unzip)))))
2260 (define-public ant-apache-bcel
2263 (name "ant-apache-bcel")
2265 (substitute-keyword-arguments (package-arguments ant/java8)
2267 `(modify-phases ,phases
2268 (add-after 'unpack 'link-bcel
2269 (lambda* (#:key inputs #:allow-other-keys)
2270 (for-each (lambda (file)
2272 (string-append "lib/optional/"
2274 (find-files (assoc-ref inputs "java-commons-bcel")
2277 (add-after 'build 'install
2278 (lambda* (#:key outputs #:allow-other-keys)
2279 (let* ((out (assoc-ref outputs "out"))
2280 (share (string-append out "/share/java"))
2281 (bin (string-append out "/bin"))
2282 (lib (string-append out "/lib")))
2284 (install-file (string-append lib "/ant-apache-bcel.jar") share)
2285 (delete-file-recursively bin)
2286 (delete-file-recursively lib)
2289 `(("java-commons-bcel" ,java-commons-bcel)
2290 ,@(package-inputs ant/java8)))))
2292 (define-public ant-junit
2297 (substitute-keyword-arguments (package-arguments ant/java8)
2299 `(modify-phases ,phases
2300 (add-after 'unpack 'link-junit
2301 (lambda* (#:key inputs #:allow-other-keys)
2302 (for-each (lambda (file)
2304 (string-append "lib/optional/"
2306 (find-files (assoc-ref inputs "java-junit")
2309 (add-after 'build 'install
2310 (lambda* (#:key outputs #:allow-other-keys)
2311 (let* ((out (assoc-ref outputs "out"))
2312 (share (string-append out "/share/java"))
2313 (bin (string-append out "/bin"))
2314 (lib (string-append out "/lib")))
2316 (install-file (string-append lib "/ant-junit.jar") share)
2317 (delete-file-recursively bin)
2318 (delete-file-recursively lib)
2321 `(("java-junit" ,java-junit)
2322 ,@(package-inputs ant/java8)))))
2324 (define-public javacc-4
2331 (url "https://github.com/javacc/javacc.git")
2332 (commit "release_41")))
2333 (file-name (string-append "javacc-" version "-checkout"))
2336 "07ysav7j8r1c6h8qxrgqk6lwdp74ly0ad1935lragxml0qqc3ka0"))
2337 (modules '((guix build utils)))
2338 ;; delete bundled jars
2339 (snippet '(begin (delete-file-recursively "lib") #t))))
2340 (build-system ant-build-system)
2342 ;; /tmp/guix-build-javacc-4.1.drv-0/source/test/javacodeLA/build.xml:60:
2347 (modify-phases %standard-phases
2348 ;; Delete tests to avoid build failure (we don't run them anyway).
2349 (add-after 'unpack 'delete-tests
2351 (for-each delete-file
2352 '("src/org/javacc/JavaCCTestCase.java"
2353 "src/org/javacc/parser/ExpansionTest.java"
2354 "src/org/javacc/parser/OptionsTest.java"
2355 "src/org/javacc/jjtree/JJTreeOptionsTest.java"))
2356 (for-each delete-file-recursively
2357 '("src/org/javacc/parser/test"
2358 "src/org/javacc/jjdoc/test"))
2360 (replace 'install (install-jars "bin/lib")))))
2361 (home-page "https://javacc.org/")
2362 (synopsis "Java parser generator")
2363 (description "Java Compiler Compiler (JavaCC) is the most popular parser
2364 generator for use with Java applications. A parser generator is a tool that
2365 reads a grammar specification and converts it to a Java program that can
2366 recognize matches to the grammar. In addition to the parser generator itself,
2367 JavaCC provides other standard capabilities related to parser generation such
2368 as tree building (via a tool called JJTree included with JavaCC), actions,
2370 (license license:bsd-3)))
2372 (define-public javacc
2380 (url "https://github.com/javacc/javacc.git")
2382 (file-name (git-file-name "javacc" version))
2384 (base32 "18kkak3gda93gr25jrgy6q00g0jr8i24ri2wk4kybz1v234fxx9i"))
2385 (modules '((guix build utils)))
2386 ;; Delete bundled jars.
2387 (snippet '(begin (for-each delete-file-recursively
2388 '("bootstrap" "lib"))
2391 `(#:make-flags ; bootstrap from javacc-4
2392 (list (string-append "-Dbootstrap-jar="
2393 (assoc-ref %build-inputs "javacc")
2394 "/share/java/javacc.jar"))
2395 #:test-target "test"
2397 (modify-phases %standard-phases
2398 (replace 'install (install-jars "target")))))
2400 `(("javacc" ,javacc-4)))))
2402 ;; This is the last 3.x release of ECJ
2403 (define-public java-ecj-3
2409 (uri (string-append "http://archive.eclipse.org/eclipse/"
2410 "downloads/drops/R-" version
2411 "-201301310800/ecjsrc-" version ".jar"))
2414 "01mdj14jw11g1jfnki4fi8229p0c6zzckd38zqy2w4m3cjcvsx04"))))
2415 (build-system ant-build-system)
2417 `(#:tests? #f ; none included
2418 #:jdk ,icedtea-7 ; doesn't build with JDK8+
2419 #:make-flags (list "-f" "src/build.xml")
2420 #:build-target "build"
2422 (modify-phases %standard-phases
2423 (add-after 'unpack 'fix-manifest
2425 ;; Record the main class to make ecj executable.
2426 (with-atomic-file-replacement "src/META-INF/MANIFEST.MF"
2428 (display "Manifest-Version: 1.0
2429 Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n"
2432 (replace 'install (install-jars ".")))))
2433 (home-page "https://eclipse.org")
2434 (synopsis "Eclipse Java development tools core batch compiler")
2435 (description "This package provides the Eclipse Java core batch compiler.")
2436 (license license:epl1.0)))
2438 ;; This is needed for java-cisd-args4j
2439 (define-public java-ecj-3.5
2440 (package (inherit java-ecj-3)
2443 (method url-fetch/zipbomb)
2444 (uri (string-append "http://archive.eclipse.org/eclipse/"
2445 "downloads/drops/R-" version
2446 "-200909170800/ecjsrc-" version ".zip"))
2449 "1vnl2mavisc567bip736xzsvvbjif5279wc4a7pbdik5wlir8qr7"))))
2450 (build-system ant-build-system)
2452 `(#:tests? #f ; none included
2453 #:jdk ,icedtea-7 ; doesn't build with JDK8+
2454 #:build-target "build"
2456 (modify-phases %standard-phases
2457 (add-after 'unpack 'fix-manifest
2459 ;; Record the main class to make ecj executable.
2460 (with-atomic-file-replacement "META-INF/MANIFEST.MF"
2463 (display "Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n"
2466 (replace 'install (install-jars ".")))))
2468 `(("unzip" ,unzip)))))
2470 (define-public java-ecj
2471 (package (inherit java-ecj-3)
2477 "http://archive.eclipse.org/eclipse/downloads/drops4/R-"
2479 "-201703010400/ecjsrc-"
2484 "11cfgsdgznja1pvlxkjbqykxd7pcd5655vkm7s44xmahmap15gpl"))))
2486 `(#:tests? #f ; none included
2487 #:build-target "build"
2489 (modify-phases %standard-phases
2490 (add-after 'unpack 'fix-build.xml
2492 (substitute* "src/build.xml"
2496 (add-after 'unpack 'fix-prop
2498 (substitute* "src/build.xml"
2499 (("^.*properties.*$")
2500 "<include name=\"**/*.properties\"/>
2501 <include name=\"**/*.props\"/>"))
2503 (add-before 'build 'chdir
2507 (replace 'install (install-jars ".")))))))
2509 (define-public java-cisd-base
2510 (let ((revision 38938)
2511 (base-version "14.12.0"))
2513 (name "java-cisd-base")
2514 (version (string-append base-version "-" (number->string revision)))
2518 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2519 "base/tags/release/"
2520 (version-major+minor base-version)
2521 ".x/" base-version "/base/"))
2522 (revision revision)))
2523 (file-name (string-append "java-cisd-base-" version "-checkout"))
2526 "1i5adyf7nzclb0wydgwa1az04qliid8035vpahaandmkmigbnxiy"))
2527 (modules '((guix build utils)))
2530 ;; Delete included gradle jar
2531 (delete-file-recursively "gradle/wrapper")
2532 ;; Delete pre-built native libraries
2533 (delete-file-recursively "libs")
2535 (build-system ant-build-system)
2537 `(#:make-flags '("-file" "build/build.xml")
2538 #:test-target "jar-test"
2541 (modify-phases %standard-phases
2542 (add-after 'unpack 'unpack-build-resources
2543 (lambda* (#:key inputs #:allow-other-keys)
2544 (copy-recursively (assoc-ref inputs "build-resources")
2545 "../build_resources")
2547 (add-after 'unpack-build-resources 'fix-dependencies
2548 (lambda* (#:key inputs #:allow-other-keys)
2549 (substitute* "build/build.xml"
2550 (("\\$\\{lib\\}/testng/testng-jdk15.jar")
2551 (string-append (assoc-ref inputs "java-testng")
2552 "/share/java/java-testng.jar"))
2553 (("\\$\\{lib\\}/commons-lang/commons-lang.jar")
2554 (string-append (assoc-ref inputs "java-commons-lang")
2555 "/share/java/commons-lang-"
2556 ,(package-version java-commons-lang) ".jar"))
2557 (("\\$\\{lib\\}/commons-io/commons-io.jar")
2558 (string-append (assoc-ref inputs "java-commons-io")
2559 "/share/java/commons-io-"
2560 ,(package-version java-commons-io)
2562 ;; Remove dependency on svn
2563 (("<build-info.*") "")
2564 (("\\$\\{revision.number\\}")
2565 ,(number->string revision))
2566 (("\\$\\{version.number\\}") ,base-version))
2567 ;; Remove dependency on classycle
2568 (substitute* "../build_resources/ant/build-common.xml"
2569 (("<taskdef name=\"dependency-checker.*") "")
2570 (("classname=\"classycle.*") "")
2571 (("classpath=\"\\$\\{lib\\}/classycle.*") ""))
2573 ;; A few tests fail because of the lack of a proper /etc/groups and
2574 ;; /etc/passwd file in the build container.
2575 (add-after 'unpack 'disable-broken-tests
2577 (substitute* "sourceTest/java/ch/systemsx/cisd/base/AllTests.java"
2578 (("Unix.isOperational\\(\\)") "false"))
2580 ;; These decorators are almost useless and pull in an unpackaged
2582 (add-after 'unpack 'remove-useless-decorators
2584 (substitute* "source/java/ch/systemsx/cisd/base/unix/Unix.java"
2586 (("import ch.rinn.restrictions.Private;") ""))
2587 (substitute* "sourceTest/java/ch/systemsx/cisd/base/unix/UnixTests.java"
2589 (("import ch.rinn.restrictions.Friend;") ""))
2591 (add-before 'configure 'build-native-code
2592 (lambda* (#:key inputs #:allow-other-keys)
2593 (let ((jdk (assoc-ref inputs "jdk"))
2594 (dir ,(match (%current-system)
2597 ((or "armhf-linux" "aarch64-linux")
2599 ((or "x86_64-linux")
2601 (_ "unknown-Linux"))))
2602 (with-directory-excursion "source/c"
2603 (invoke "gcc" "-shared" "-O3" "-fPIC" "unix.c"
2604 (string-append "-I" jdk "/include")
2605 (string-append "-I" jdk "/include/linux")
2607 (invoke "gcc" "-shared" "-O3" "-fPIC"
2608 "-DMACHINE_BYTE_ORDER=1"
2616 (string-append "-I" jdk "/include")
2617 (string-append "-I" jdk "/include/linux")
2618 "-o" "libnativedata.so"))
2619 (install-file "source/c/libunix.so"
2620 (string-append "libs/native/unix/" dir))
2621 (install-file "source/c/libnativedata.so"
2622 (string-append "libs/native/nativedata/" dir))
2624 ;; In the "check" phase we only build the test executable.
2625 (add-after 'check 'run-tests
2627 (invoke "java" "-jar" "targets/dist/sis-base-test.jar")
2628 (delete-file "targets/dist/sis-base-test.jar")
2630 (replace 'install (install-jars "targets/dist")))))
2632 `(("jdk" ,icedtea-8)
2633 ("java-commons-lang" ,java-commons-lang)
2634 ("java-commons-io" ,java-commons-io)
2635 ("java-testng" ,java-testng)
2640 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2641 "base/tags/release/"
2642 (version-major+minor base-version)
2644 "/build_resources/"))
2645 (revision revision)))
2648 "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk"))))))
2649 (home-page "http://svnsis.ethz.ch")
2650 (synopsis "Utility classes for libraries from ETH Zurich")
2651 (description "This library supplies some utility classes needed for
2652 libraries from the SIS division at ETH Zurich like jHDF5.")
2653 ;; The C sources are under a non-copyleft license, which looks like a
2654 ;; variant of the BSD licenses. The whole package is under the ASL2.0.
2655 (license (list license:asl2.0
2656 (license:non-copyleft "file://source/c/COPYING"))))))
2658 (define-public java-cisd-args4j
2659 (let ((revision 39162)
2660 (base-version "9.11.2"))
2662 (name "java-cisd-args4j")
2663 (version (string-append base-version "-" (number->string revision)))
2667 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2668 "args4j/tags/release/"
2669 (version-major+minor base-version)
2670 ".x/" base-version "/args4j/"))
2671 (revision revision)))
2672 (file-name (string-append "java-cisd-args4j-" version "-checkout"))
2675 "0hhqznjaivq7ips7mkwas78z42s6djsm20rrs7g1zd59rcsakxn2"))))
2676 (build-system ant-build-system)
2678 `(#:make-flags '("-file" "build/build.xml")
2679 #:tests? #f ; there are no tests
2680 ;; There are weird build failures with JDK8, such as: "The type
2681 ;; java.io.ObjectInputStream cannot be resolved. It is indirectly
2682 ;; referenced from required .class files"
2684 #:modules ((guix build ant-build-system)
2686 (guix build java-utils)
2691 (modify-phases %standard-phases
2692 (add-after 'unpack 'unpack-build-resources
2693 (lambda* (#:key inputs #:allow-other-keys)
2694 (mkdir-p "../build_resources")
2695 (invoke "tar" "xf" (assoc-ref inputs "build-resources")
2696 "-C" "../build_resources"
2697 "--strip-components=1")
2698 (mkdir-p "../build_resources/lib")
2700 (add-after 'unpack-build-resources 'fix-dependencies
2701 (lambda* (#:key inputs #:allow-other-keys)
2702 ;; FIXME: There should be a more convenient abstraction for
2703 ;; editing XML files.
2704 (with-directory-excursion "../build_resources/ant/"
2705 (chmod "build-common.xml" #o664)
2706 (call-with-output-file "build-common.xml.new"
2710 (with-input-from-file "build-common.xml"
2711 (lambda _ (xml->sxml #:trim-whitespace? #t)))
2712 `(;; Remove dependency on classycle and custom ant tasks
2713 (taskdef . ,(lambda (tag . kids)
2714 (let ((name ((sxpath '(name *text*)) kids)))
2715 (if (or (member "build-info" name)
2716 (member "dependency-checker" name)
2717 (member "build-java-subprojects" name)
2718 (member "project-classpath" name))
2721 (typedef . ,(lambda (tag . kids)
2722 (let ((name ((sxpath '(name *text*)) kids)))
2723 (if (member "recursive-jar" name)
2726 (build-java-subprojects . ,(lambda _ '()))
2727 ;; Ignore everything else
2728 (*default* . ,(lambda (tag . kids) `(,tag ,@kids)))
2729 (*text* . ,(lambda (_ txt) txt))))
2731 (rename-file "build-common.xml.new" "build-common.xml"))
2732 (substitute* "build/build.xml"
2733 (("\\$\\{lib\\}/cisd-base/cisd-base.jar")
2734 (string-append (assoc-ref inputs "java-cisd-base")
2735 "/share/java/sis-base.jar"))
2736 ;; Remove dependency on svn
2737 (("<build-info.*") "")
2738 (("\\$\\{revision.number\\}")
2739 ,(number->string revision))
2740 (("\\$\\{version.number\\}") ,base-version)
2741 ;; Don't use custom ant tasks.
2742 (("recursive-jar") "jar")
2743 (("<project-classpath.*") ""))
2745 (replace 'install (install-jars "targets/dist")))))
2747 `(("java-cisd-base" ,java-cisd-base)))
2749 `(("ecj" ,java-ecj-3.5)
2754 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2755 "args4j/tags/release/"
2756 (version-major+minor base-version)
2758 "/build_resources/"))
2759 (revision revision)))
2762 "056cam4k8pll7ass31sy6gwn8g8719njc41yf4l02b0342nilkyf"))
2763 (modules '((guix build utils)))
2764 ;; Delete bundled pre-built jars.
2766 '(begin (delete-file-recursively "lib/") #t))))))
2767 (home-page "http://svnsis.ethz.ch")
2768 (synopsis "Command line parser library")
2769 (description "This package provides a parser for command line arguments.")
2770 (license license:asl2.0))))
2772 (define-public java-cisd-jhdf5
2773 (let ((revision 39162)
2774 (base-version "14.12.6"))
2776 (name "java-cisd-jhdf5")
2777 (version (string-append base-version "-" (number->string revision)))
2781 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2782 "jhdf5/tags/release/"
2783 (version-major+minor base-version)
2784 ".x/" base-version "/jhdf5/"))
2785 (revision revision)))
2786 (file-name (string-append "java-cisd-jhdf5-" version "-checkout"))
2789 "13i17s2hn0q9drdqvp8csy7770p3hdbh9rp30ihln2ldkfawdmz0"))
2790 (modules '((guix build utils)))
2793 ;; Delete included gradle jar
2794 (delete-file-recursively "gradle/wrapper")
2795 ;; Delete pre-built native libraries
2796 (delete-file-recursively "libs")
2798 (build-system ant-build-system)
2800 `(#:make-flags '("-file" "build/build.xml")
2801 #:build-target "jar-all"
2802 #:test-target "jar-test"
2805 (modify-phases %standard-phases
2806 ;; FIXME: this build phase fails.
2807 (delete 'generate-jar-indices)
2808 ;; Don't erase results from the build phase when building tests.
2809 (add-after 'unpack 'separate-test-target-from-clean
2811 (substitute* "build/build.xml"
2812 (("\"jar-test\" depends=\"clean, ")
2813 "\"jar-test\" depends=\""))
2815 (add-after 'unpack 'unpack-build-resources
2816 (lambda* (#:key inputs #:allow-other-keys)
2817 (copy-recursively (assoc-ref inputs "build-resources")
2818 "../build_resources")
2819 (delete-file-recursively "../build_resources/lib/")
2820 (mkdir-p "../build_resources/lib")
2821 ;; Remove dependency on classycle
2822 (substitute* "../build_resources/ant/build-common.xml"
2823 (("<taskdef name=\"dependency-checker.*") "")
2824 (("classname=\"classycle.*") "")
2825 (("classpath=\"\\$\\{lib\\}/classycle.*") ""))
2826 ;; Remove dependency on svn
2827 (substitute* "build/build.xml"
2828 (("<build-info.*") "")
2829 (("\\$\\{revision.number\\}")
2830 ,(number->string revision))
2831 (("\\$\\{version.number\\}") ,base-version))
2833 (add-after 'unpack-build-resources 'fix-dependencies
2834 (lambda* (#:key inputs #:allow-other-keys)
2835 (substitute* "../build_resources/ant/build-common.xml"
2836 (("../libraries/testng/testng-jdk15.jar")
2837 (string-append (assoc-ref inputs "java-testng")
2838 "/share/java/java-testng.jar")))
2839 (substitute* "build/build.xml"
2840 (("\\$\\{lib\\}/sis-base/sis-base.jar")
2841 (string-append (assoc-ref inputs "java-cisd-base")
2842 "/share/java/sis-base.jar"))
2843 (("\\$\\{lib\\}/cisd-args4j/cisd-args4j.jar")
2844 (string-append (assoc-ref inputs "java-cisd-args4j")
2845 "/share/java/cisd-args4j.jar"))
2846 (("\\$\\{lib\\}/commons-lang/commons-lang.jar")
2847 (string-append (assoc-ref inputs "java-commons-lang")
2848 "/share/java/commons-lang-"
2849 ,(package-version java-commons-lang) ".jar"))
2850 (("\\$\\{lib\\}/commons-io/commons-io.jar")
2851 (string-append (assoc-ref inputs "java-commons-io")
2852 "/share/java/commons-io-"
2853 ,(package-version java-commons-io)
2855 (("\\$\\{lib\\}/testng/testng-jdk15.jar")
2856 (string-append (assoc-ref inputs "java-testng")
2857 "/share/java/java-testng.jar"))
2858 (("\\$\\{lib\\}/junit4/junit.jar")
2859 (string-append (assoc-ref inputs "java-junit")
2860 "/share/java/junit.jar"))
2861 (("\\$\\{lib\\}/jmock/hamcrest/hamcrest-core.jar")
2862 (string-append (assoc-ref inputs "java-hamcrest-core")
2863 "/share/java/hamcrest-core.jar")))
2864 ;; Remove dependency on ch.rinn.restrictions
2865 (with-directory-excursion "source/java/ch/systemsx/cisd/hdf5/"
2866 (substitute* '("BitSetConversionUtils.java"
2868 (("import ch.rinn.restrictions.Private;") "")
2870 (with-directory-excursion "sourceTest/java/ch/systemsx/cisd/hdf5/"
2871 (substitute* '("BitSetConversionTest.java"
2872 "h5ar/HDF5ArchiverTest.java")
2873 (("import ch.rinn.restrictions.Friend;") "")
2875 ;; Remove leftovers from removing @Friend
2876 (substitute* "h5ar/HDF5ArchiverTest.java"
2877 (("\\{ HDF5Archiver.class, IdCache.class, LinkRecord.class \\}\\)")
2880 (add-before 'configure 'build-native-library
2881 (lambda* (#:key inputs #:allow-other-keys)
2882 (let ((jdk (assoc-ref inputs "jdk"))
2883 (hdf5 (assoc-ref inputs "hdf5"))
2884 (dir ,(match (%current-system)
2887 ((or "armhf-linux" "aarch64-linux")
2889 ((or "x86_64-linux")
2891 (_ "unknown-Linux"))))
2892 (with-directory-excursion "source/c"
2893 (apply invoke `("gcc" "-shared" "-O3"
2895 "-Wl,--exclude-libs,ALL"
2896 ,@(find-files "jhdf5" "\\.c$")
2897 ,@(find-files "hdf-java" "\\.c$")
2898 ,(string-append "-I" hdf5 "/include")
2899 ,(string-append "-I" jdk "/include")
2900 ,(string-append "-I" jdk "/include/linux")
2901 ,(string-append hdf5 "/lib/libhdf5.a")
2902 "-o" "libjhdf5.so" "-lz")))
2903 (install-file "source/c/libjhdf5.so"
2904 (string-append "libs/native/jhdf5/" dir))
2906 ;; In the "check" phase we only build the test executable.
2907 (add-after 'check 'run-tests
2909 (invoke "java" "-jar" "targets/dist/sis-jhdf5-test.jar")
2910 (delete-file "targets/dist/sis-jhdf5-test.jar")
2913 (install-jars "targets/dist")))))
2915 `(("java-cisd-base" ,java-cisd-base)
2916 ("java-cisd-args4j" ,java-cisd-args4j)
2917 ("java-commons-lang" ,java-commons-lang)
2918 ("java-commons-io" ,java-commons-io)
2922 `(("jdk" ,icedtea-8)
2923 ("java-testng" ,java-testng)
2924 ("java-junit" ,java-junit)
2925 ("java-jmock" ,java-jmock)
2926 ("java-hamcrest-core" ,java-hamcrest-core)
2931 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2932 "jhdf5/tags/release/"
2933 (version-major+minor base-version)
2935 "/build_resources/"))
2936 (revision revision)))
2939 "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk"))))))
2940 (home-page "https://wiki-bsse.ethz.ch/display/JHDF5/")
2941 (synopsis "Java binding for HDF5")
2942 (description "JHDF5 is a high-level API in Java for reading and writing
2943 HDF5 files, building on the libraries provided by the HDF Group.")
2944 ;; The C sources are under a non-copyleft license, which looks like a
2945 ;; variant of the BSD licenses. The whole package is under the ASL2.0.
2946 (license (list license:asl2.0
2947 (license:non-copyleft "file://source/c/COPYING"))))))
2949 (define-public java-classpathx-servletapi
2951 (name "java-classpathx-servletapi")
2955 (uri (string-append "mirror://gnu/classpathx/servletapi/"
2956 "servletapi-" version ".tar.gz"))
2959 "07d8h051siga2f33fra72hk12sbq1bxa4jifjg0qj0vfazjjff0x"))))
2960 (build-system ant-build-system)
2962 `(#:tests? #f ; there is no test target
2963 #:build-target "compile"
2965 (list "-Dbuild.compiler=javac1.8"
2966 (string-append "-Ddist=" (assoc-ref %outputs "out")))
2968 (modify-phases %standard-phases
2970 (lambda* (#:key make-flags #:allow-other-keys)
2971 (apply invoke `("ant" "dist" ,@make-flags)))))))
2972 (home-page "https://www.gnu.org/software/classpathx/")
2973 (synopsis "Java servlet API implementation")
2974 (description "This is the GNU servlet API distribution, part of the
2975 ClasspathX project. It provides implementations of version 3.0 of the servlet
2976 API and version 2.1 of the Java ServerPages API.")
2977 (license license:gpl3+)))
2979 (define-public java-javaee-servletapi
2981 (name "java-javaee-servletapi")
2986 (url "https://github.com/javaee/servlet-spec.git")
2988 (file-name (git-file-name name version))
2991 "0s03lj8w5an70lkqbjycgfrfk0kc07vbfav91jzk87gh3awf9ksl"))))
2992 (build-system ant-build-system)
2994 `(#:jar-name "javax-servletapi.jar"
2997 #:source-dir "src/main/java"
2999 (modify-phases %standard-phases
3000 (add-before 'build 'copy-resources
3002 (mkdir-p "build/classes/javax/servlet/http")
3003 (let ((from-prefix "src/main/java/javax/servlet/")
3004 (to-prefix "build/classes/javax/servlet/"))
3005 (for-each (lambda (f)
3006 (copy-file (string-append from-prefix f)
3007 (string-append to-prefix f)))
3008 (list "LocalStrings_ja.properties"
3009 "LocalStrings.properties"
3010 "LocalStrings_fr.properties"
3011 "http/LocalStrings_es.properties"
3012 "http/LocalStrings_ja.properties"
3013 "http/LocalStrings.properties"
3014 "http/LocalStrings_fr.properties")))
3017 `(("unzip" ,unzip)))
3018 (home-page "https://javaee.github.io/servlet-spec/")
3019 (synopsis "Java servlet API")
3020 (description "Java Servlet is the foundation web specification in the
3021 Java Enterprise Platform. Developers can build web applications using the
3022 Servlet API to interact with the request/response workflow. This project
3023 provides information on the continued development of the Java Servlet
3025 ;; Main code is dual-licensed by Oracle under either GLP2 or CDDL 1.1.
3026 ;; Some files are licensed under ASL 2.0.
3027 (license (list license:asl2.0 license:gpl2 license:cddl1.1))))
3029 (define-public java-swt
3034 ;; The types of many variables and procedures differ in the sources
3035 ;; dependent on whether the target architecture is a 32-bit system or a
3036 ;; 64-bit system. Instead of patching the sources on demand in a build
3037 ;; phase we download either the 32-bit archive (which mostly uses "int"
3038 ;; types) or the 64-bit archive (which mostly uses "long" types).
3039 (let ((hash32 "09q0cbh90d90q3a7dx9430kc4m6bijrkr4lajrmzzvi0jjdpq4v9")
3040 (hash64 "17k5hs75a87ssmc5xhwdfdm2gn4zba0r837l2455za01krnkaa2q")
3043 (let-values (((hash file)
3044 (match (or (%current-target-system) (%current-system))
3045 ("x86_64-linux" (values hash64 file64))
3046 (_ (values hash32 file32)))))
3050 "http://download.eclipse.org/eclipse/downloads/drops4/"
3051 "R-" version "-201710090410/swt-" version
3052 "-gtk-linux-" file ".zip"))
3053 (sha256 (base32 hash))))))
3054 (build-system ant-build-system)
3056 `(#:jar-name "swt.jar"
3058 #:tests? #f ; no "check" target
3060 (modify-phases %standard-phases
3062 (lambda* (#:key source #:allow-other-keys)
3064 (invoke "unzip" source "-d" "swt")
3067 (invoke "unzip" "src.zip" "-d" "src")))
3068 ;; The classpath contains invalid icecat jars. Since we don't need
3069 ;; anything other than the JDK on the classpath, we can simply unset
3071 (add-after 'configure 'unset-classpath
3072 (lambda _ (unsetenv "CLASSPATH") #t))
3073 (add-before 'build 'build-native
3074 (lambda* (#:key inputs outputs #:allow-other-keys)
3075 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
3076 ;; Build shared libraries. Users of SWT have to set the system
3077 ;; property swt.library.path to the "lib" directory of this
3080 (setenv "OUTPUT_DIR" lib)
3081 (with-directory-excursion "src"
3082 (invoke "bash" "build.sh")))))
3083 (add-after 'install 'install-native
3084 (lambda* (#:key outputs #:allow-other-keys)
3085 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
3086 (for-each (lambda (file)
3087 (install-file file lib))
3088 (find-files "." "\\.so$"))
3092 ("libxtst" ,libxtst)
3097 `(("pkg-config" ,pkg-config)
3099 (home-page "https://www.eclipse.org/swt/")
3100 (synopsis "Widget toolkit for Java")
3102 "SWT is a widget toolkit for Java designed to provide efficient, portable
3103 access to the user-interface facilities of the operating systems on which it
3105 ;; SWT code is licensed under EPL1.0
3106 ;; Gnome and Gtk+ bindings contain code licensed under LGPLv2.1
3107 ;; Cairo bindings contain code under MPL1.1
3108 ;; XULRunner 1.9 bindings contain code under MPL2.0
3113 license:lgpl2.1+))))
3115 (define-public java-xz
3121 (uri (string-append "http://tukaani.org/xz/xz-java-" version ".zip"))
3124 "1z3p1ri1gvl07inxn0agx44ck8n7wrzfmvkz8nbq3njn8r9wba8x"))))
3125 (build-system ant-build-system)
3127 `(#:tests? #f ; There are no tests to run.
3128 #:jar-name ,(string-append "xz-" version ".jar")
3130 (modify-phases %standard-phases
3131 ;; The unpack phase enters the "maven" directory by accident.
3132 (add-after 'unpack 'chdir
3133 (lambda _ (chdir "..") #t)))))
3135 `(("unzip" ,unzip)))
3136 (home-page "https://tukaani.org/xz/java.html")
3137 (synopsis "Implementation of XZ data compression in pure Java")
3138 (description "This library aims to be a complete implementation of XZ data
3139 compression in pure Java. Single-threaded streamed compression and
3140 decompression and random access decompression have been fully implemented.")
3141 (license license:public-domain)))
3143 ;; java-hamcrest-core uses qdox version 1.12. We package this version instead
3144 ;; of the latest release.
3145 (define-public java-qdox-1.12
3151 (uri (string-append "http://central.maven.org/maven2/"
3152 "com/thoughtworks/qdox/qdox/" version
3153 "/qdox-" version "-sources.jar"))
3156 "0hlfbqq2avf5s26wxkksqmkdyk6zp9ggqn37c468m96mjv0n9xfl"))))
3157 (build-system ant-build-system)
3159 `(;; Tests require junit
3161 #:jar-name "qdox.jar"
3163 (modify-phases %standard-phases
3165 (lambda* (#:key source #:allow-other-keys)
3167 (with-directory-excursion "src"
3168 (invoke "jar" "-xf" source))))
3169 ;; At this point we don't have junit, so we must remove the API
3171 (add-after 'unpack 'delete-tests
3173 (delete-file-recursively "src/com/thoughtworks/qdox/junit")
3175 (home-page "http://qdox.codehaus.org/")
3176 (synopsis "Parse definitions from Java source files")
3178 "QDox is a high speed, small footprint parser for extracting
3179 class/interface/method definitions from source files complete with JavaDoc
3180 @code{@@tags}. It is designed to be used by active code generators or
3181 documentation tools.")
3182 (license license:asl2.0)))
3184 (define-public java-jarjar
3186 (name "java-jarjar")
3191 "https://storage.googleapis.com/google-code-archive-downloads/v2/"
3192 "code.google.com/jarjar/jarjar-src-" version ".zip"))
3195 "1v8irhni9cndcw1l1wxqgry013s2kpj0qqn57lj2ji28xjq8ndjl"))
3196 (modules '((guix build utils)))
3199 ;; Delete bundled thirds-party jar archives.
3200 ;; TODO: unbundle maven-plugin-api.
3201 (delete-file "lib/asm-4.0.jar")
3202 (delete-file "lib/asm-commons-4.0.jar")
3203 (delete-file "lib/junit-4.8.1.jar")
3205 (build-system ant-build-system)
3207 `(;; Tests require junit, which ultimately depends on this package.
3209 #:build-target "jar"
3211 (modify-phases %standard-phases
3212 (add-before 'build 'do-not-use-bundled-asm
3213 (lambda* (#:key inputs #:allow-other-keys)
3214 (substitute* "build.xml"
3215 (("<path id=\"path.build\">")
3216 (string-append "<path id=\"path.build\"><fileset dir=\""
3217 (assoc-ref inputs "java-asm-bootstrap")
3218 "/share/java\" includes=\"**/*.jar\"/>"))
3219 (("<zipfileset src=\"lib/asm-4.0.jar\"/>") "")
3220 (("lib/asm-commons-4.0.jar")
3221 (string-append (assoc-ref inputs "java-asm-bootstrap")
3222 "/share/java/asm-6.0.jar"))
3223 (("<include name=\"org/objectweb/asm/commons/Remap\\*\\.class\"/>")
3224 (string-append "<include name=\"org/objectweb/asm/"
3225 "commons/Remap*.class\"/>"
3226 "<include name=\"org/objectweb/asm/*.class\"/>"
3227 "<include name=\"org/objectweb/asm/"
3228 "signature/*.class\"/>"
3229 "<include name=\"org/objectweb/asm/"
3230 "commons/SignatureRemapper.class\"/>")))
3233 (lambda* (#:key outputs #:allow-other-keys)
3234 (let ((target (string-append (assoc-ref outputs "out")
3236 (install-file (string-append "dist/jarjar-" ,version ".jar")
3240 `(("java-asm-bootstrap" ,java-asm-bootstrap)))
3242 `(("unzip" ,unzip)))
3243 (home-page "https://code.google.com/archive/p/jarjar/")
3244 (synopsis "Repackage Java libraries")
3246 "Jar Jar Links is a utility that makes it easy to repackage Java
3247 libraries and embed them into your own distribution. Jar Jar Links includes
3248 an Ant task that extends the built-in @code{jar} task.")
3249 (license license:asl2.0)))
3251 (define-public java-hamcrest-core
3253 (name "java-hamcrest-core")
3257 (uri (string-append "https://github.com/hamcrest/JavaHamcrest/"
3258 "archive/hamcrest-java-" version ".tar.gz"))
3261 "11g0s105fmwzijbv08lx8jlb521yravjmxnpgdx08fvg1kjivhva"))
3262 (modules '((guix build utils)))
3265 ;; Delete bundled thirds-party jar archives.
3266 (delete-file-recursively "lib")
3268 (build-system ant-build-system)
3270 `(#:tests? #f ; Tests require junit
3271 #:modules ((guix build ant-build-system)
3274 #:make-flags (list (string-append "-Dversion=" ,version))
3275 #:test-target "unit-test"
3276 #:build-target "core"
3278 (modify-phases %standard-phases
3279 ;; Disable unit tests, because they require junit, which requires
3280 ;; hamcrest-core. We also give a fixed value to the "Built-Date"
3281 ;; attribute from the manifest for reproducibility.
3282 (add-before 'configure 'patch-build.xml
3284 (substitute* "build.xml"
3285 (("unit-test, ") "")
3286 (("\\$\\{build.timestamp\\}") "guix"))
3288 ;; Java's "getMethods()" returns methods in an unpredictable order.
3289 ;; To make the output of the generated code deterministic we must
3290 ;; sort the array of methods.
3291 (add-after 'unpack 'make-method-order-deterministic
3293 (substitute* "hamcrest-generator/src/main/java/org/hamcrest/generator/ReflectiveFactoryReader.java"
3294 (("import java\\.util\\.Iterator;" line)
3295 (string-append line "\n"
3296 "import java.util.Arrays; import java.util.Comparator;"))
3297 (("allMethods = cls\\.getMethods\\(\\);" line)
3298 (string-append "_" line
3300 private Method[] getSortedMethods() {
3301 Arrays.sort(_allMethods, new Comparator<Method>() {
3303 public int compare(Method a, Method b) {
3304 return a.toString().compareTo(b.toString());
3310 private Method[] allMethods = getSortedMethods();")))
3312 (add-before 'build 'do-not-use-bundled-qdox
3313 (lambda* (#:key inputs #:allow-other-keys)
3314 (substitute* "build.xml"
3315 (("lib/generator/qdox-1.12.jar")
3316 (string-append (assoc-ref inputs "java-qdox-1.12")
3317 "/share/java/qdox.jar")))
3319 ;; build.xml searches for .jar files in this directoy, which
3320 ;; we remove from the source archive.
3321 (add-before 'build 'create-dummy-directories
3323 (mkdir-p "lib/integration")
3326 (lambda* (#:key outputs #:allow-other-keys)
3327 (let* ((target (string-append (assoc-ref outputs "out")
3329 (version-suffix ,(string-append "-" version ".jar"))
3330 (install-without-version-suffix
3333 (string-append target
3334 (basename jar version-suffix)
3338 install-without-version-suffix
3341 (and (string-suffix? ".jar" name)
3342 (not (string-suffix? "-sources.jar" name)))))))
3345 `(("java-qdox-1.12" ,java-qdox-1.12)
3346 ("java-jarjar" ,java-jarjar)))
3347 (home-page "http://hamcrest.org/")
3348 (synopsis "Library of matchers for building test expressions")
3350 "This package provides a library of matcher objects (also known as
3351 constraints or predicates) allowing @code{match} rules to be defined
3352 declaratively, to be used in other frameworks. Typical scenarios include
3353 testing frameworks, mocking libraries and UI validation rules.")
3354 (license license:bsd-2)))
3356 (define-public java-junit
3362 (uri (string-append "https://github.com/junit-team/junit/"
3363 "archive/r" version ".tar.gz"))
3364 (file-name (string-append name "-" version ".tar.gz"))
3367 "090dn5v1vs0b3acyaqc0gjf6p8lmd2h24wfzsbq7sly6b214anws"))
3368 (modules '((guix build utils)))
3371 ;; Delete bundled jar archives.
3372 (delete-file-recursively "lib")
3374 (build-system ant-build-system)
3376 `(#:tests? #f ; no tests
3377 #:jar-name "junit.jar"))
3379 `(("java-hamcrest-core" ,java-hamcrest-core)))
3380 (home-page "http://junit.org/")
3381 (synopsis "Test framework for Java")
3383 "JUnit is a simple framework to write repeatable tests for Java projects.
3384 JUnit provides assertions for testing expected results, test fixtures for
3385 sharing common test data, and test runners for running tests.")
3386 (license license:epl1.0)))
3388 (define-public java-plexus-utils
3390 (name "java-plexus-utils")
3394 (uri (string-append "https://github.com/codehaus-plexus/"
3395 "plexus-utils/archive/plexus-utils-"
3399 "1ihfigar20lvk4pinii7dq05i173xphhw4iyrk6gjfy04m01j2lz"))))
3400 (build-system ant-build-system)
3401 ;; FIXME: The default build.xml does not include a target to install
3404 `(#:jar-name "plexus-utils.jar"
3405 #:source-dir "src/main"
3407 (modify-phases %standard-phases
3408 (add-after 'unpack 'fix-reference-to-/bin-and-/usr
3410 (substitute* "src/main/java/org/codehaus/plexus/util/\
3411 cli/shell/BourneShell.java"
3412 (("/bin/sh") (which "sh"))
3413 (("/usr/") (getcwd)))
3415 (add-after 'unpack 'fix-or-disable-broken-tests
3417 (with-directory-excursion "src/test/java/org/codehaus/plexus/util"
3418 (substitute* '("cli/CommandlineTest.java"
3419 "cli/shell/BourneShellTest.java")
3420 (("/bin/sh") (which "sh"))
3421 (("/bin/echo") (which "echo")))
3423 ;; This test depends on MavenProjectStub, but we don't have
3424 ;; a package for Maven.
3425 (delete-file "introspection/ReflectionValueExtractorTest.java")
3427 ;; FIXME: The command line tests fail, maybe because they use
3429 (delete-file "cli/CommandlineTest.java"))
3432 `(("java-hamcrest-core" ,java-hamcrest-core)
3433 ("java-junit" ,java-junit)))
3434 (home-page "http://codehaus-plexus.github.io/plexus-utils/")
3435 (synopsis "Common utilities for the Plexus framework")
3436 (description "This package provides various Java utility classes for the
3437 Plexus framework to ease working with strings, files, command lines, XML and
3439 (license license:asl2.0)))
3441 (define-public java-plexus-interpolation
3443 (name "java-plexus-interpolation")
3447 (uri (string-append "https://github.com/codehaus-plexus/"
3448 "plexus-interpolation/archive/"
3449 "plexus-interpolation-" version ".tar.gz"))
3452 "03377yzlx5q440m6sxxgv6a5qb8fl30zzcgxgc0hxk5qgl2z1jjn"))))
3453 (build-system ant-build-system)
3455 `(#:jar-name "plexus-interpolation.jar"
3456 #:source-dir "src/main"))
3458 `(("java-junit" ,java-junit)
3459 ("java-hamcrest-core" ,java-hamcrest-core)))
3460 (home-page "http://codehaus-plexus.github.io/plexus-interpolation/")
3461 (synopsis "Java components for interpolating ${} strings and the like")
3462 (description "Plexus interpolator is a modular, flexible interpolation
3463 framework for the expression language style commonly seen in Maven, Plexus,
3464 and other related projects.
3466 It has its foundation in the @code{org.codehaus.plexus.utils.interpolation}
3467 package within @code{plexus-utils}, but has been separated in order to allow
3468 these two libraries to vary independently of one another.")
3469 (license license:asl2.0)))
3471 (define-public java-plexus-classworlds
3473 (name "java-plexus-classworlds")
3477 (uri (string-append "https://github.com/codehaus-plexus/"
3478 "plexus-classworlds/archive/plexus-classworlds-"
3482 "1qm4p0rl8d82lzhsiwnviw11jnq44s0gflg78zq152xyyr2xmh8g"))))
3483 (build-system ant-build-system)
3485 `(#:jar-name "plexus-classworlds.jar"
3486 #:source-dir "src/main"
3487 #:tests? #f));; FIXME: we need to generate some resources as in pom.xml
3489 `(("java-junit" ,java-junit)))
3490 (home-page "http://codehaus-plexus.github.io/plexus-classworlds/")
3491 (synopsis "Java class loader framework")
3492 (description "Plexus classworlds replaces the native @code{ClassLoader}
3493 mechanism of Java. It is especially useful for dynamic loading of application
3495 (license license:asl2.0)))
3497 (define java-plexus-container-default-bootstrap
3499 (name "java-plexus-container-default-bootstrap")
3503 (uri (string-append "https://github.com/codehaus-plexus/plexus-containers"
3504 "/archive/plexus-containers-" version ".tar.gz"))
3507 "0xw5g30qf4a83608rw9v2hv8pfsz7d69dkdhk6r0wia4q78hh1pc"))))
3508 (build-system ant-build-system)
3510 `(#:jar-name "container-default.jar"
3511 #:source-dir "plexus-container-default/src/main/java"
3512 #:test-dir "plexus-container-default/src/test"
3514 #:tests? #f; requires plexus-archiver, which depends on this package
3516 (modify-phases %standard-phases
3517 (add-before 'build 'copy-resources
3520 "plexus-container-default/src/main/resources/"
3524 `(("worldclass" ,java-plexus-classworlds)
3525 ("xbean" ,java-geronimo-xbean-reflect)
3526 ("utils" ,java-plexus-utils)
3527 ("junit" ,java-junit)
3528 ("guava" ,java-guava)))
3529 (home-page "https://github.com/codehaus-plexus/plexus-containers")
3530 (synopsis "Inversion-of-control container")
3531 (description "Plexus-default-container is Plexus' inversion-of-control
3532 (@dfn{IoC}) container. It is composed of its public API and its default
3534 (license license:asl2.0)))
3536 (define-public java-plexus-io
3538 (name "java-plexus-io")
3542 (uri (string-append "https://github.com/codehaus-plexus/plexus-io"
3543 "/archive/plexus-io-" version ".tar.gz"))
3546 "0f2j41kihaymxkpbm55smpxjja235vad8cgz94frfy3ppcp021dw"))))
3547 (build-system ant-build-system)
3549 `(#:jar-name "plexus-io.jar"
3550 #:source-dir "src/main/java"
3551 #:test-dir "src/test"
3554 (modify-phases %standard-phases
3555 (add-before 'build 'copy-resources
3557 (mkdir-p "build/classes/META-INF/plexus")
3558 (copy-file "src/main/resources/META-INF/plexus/components.xml"
3559 "build/classes/META-INF/plexus/components.xml")
3562 `(("utils" ,java-plexus-utils)
3563 ("commons-io" ,java-commons-io)
3564 ("java-jsr305" ,java-jsr305)))
3566 `(("junit" ,java-junit)
3567 ("hamcrest" ,java-hamcrest-core)
3568 ("guava" ,java-guava)
3569 ("classworlds" ,java-plexus-classworlds)
3570 ("xbean" ,java-geronimo-xbean-reflect)
3571 ("container-default" ,java-plexus-container-default-bootstrap)))
3572 (home-page "https://github.com/codehaus-plexus/plexus-io")
3573 (synopsis "I/O plexus components")
3574 (description "Plexus IO is a set of plexus components, which are designed
3575 for use in I/O operations. This implementation using plexus components allows
3576 reusing it in maven.")
3577 (license license:asl2.0)))
3579 (define-public java-plexus-archiver
3581 (name "java-plexus-archiver")
3585 (uri (string-append "https://github.com/codehaus-plexus/plexus-archiver"
3586 "/archive/plexus-archiver-" version ".tar.gz"))
3589 "0ry6i92gli0mvdmfih2vgs0lkf9yvx18h2ajxim66yg6yipnp0hg"))))
3590 (build-system ant-build-system)
3592 `(#:jar-name "plexus-archiver.jar"
3593 #:source-dir "src/main/java"
3595 #:test-dir "src/test"
3596 #:test-exclude (list "**/Abstract*.java" "**/Base*.java")
3598 (modify-phases %standard-phases
3599 (add-before 'check 'remove-failing
3601 ;; Requires an older version of plexus container
3603 "src/test/java/org/codehaus/plexus/archiver/DuplicateFilesTest.java")
3605 (add-before 'check 'fix-test-building
3607 (substitute* "build.xml"
3608 (("srcdir=\"src/test\"") "srcdir=\"src/test/java\""))
3610 (add-before 'build 'copy-resources
3612 (mkdir-p "build/classes/META-INF/plexus")
3613 (copy-file "src/main/resources/META-INF/plexus/components.xml"
3614 "build/classes/META-INF/plexus/components.xml")
3617 `(("utils" ,java-plexus-utils)
3618 ("commons-io" ,java-commons-io)
3619 ("snappy" ,java-iq80-snappy)
3620 ("io" ,java-plexus-io)
3621 ("compress" ,java-commons-compress)
3622 ("container-default" ,java-plexus-container-default-bootstrap)
3623 ("snappy" ,java-snappy)
3624 ("java-jsr305" ,java-jsr305)))
3626 `(("java-hamcrest-core" ,java-hamcrest-core)
3627 ("junit" ,java-junit)
3628 ("classworld" ,java-plexus-classworlds)
3629 ("xbean" ,java-geronimo-xbean-reflect)
3630 ("xz" ,java-tukaani-xz)
3631 ("guava" ,java-guava)))
3632 (home-page "https://github.com/codehaus-plexus/plexus-archiver")
3633 (synopsis "Archiver component of the Plexus project")
3634 (description "Plexus-archiver contains a component to deal with project
3636 (license license:asl2.0)))
3638 (define-public java-plexus-container-default
3640 (inherit java-plexus-container-default-bootstrap)
3641 (name "java-plexus-container-default")
3643 `(#:jar-name "container-default.jar"
3644 #:source-dir "plexus-container-default/src/main/java"
3645 #:test-dir "plexus-container-default/src/test"
3646 #:test-exclude (list ;"**/*Test.java"
3648 ;; Requires plexus-hierarchy
3649 "**/PlexusHierarchyTest.java"
3651 "**/ComponentRealmCompositionTest.java"
3652 "**/PlexusContainerTest.java")
3655 (modify-phases %standard-phases
3656 (add-before 'build 'copy-resources
3659 "plexus-container-default/src/main/resources/"
3662 (add-before 'check 'fix-paths
3664 (let ((dir "plexus-container-default/src/test/java/org/codehaus"))
3667 dir "/plexus/component/composition/"
3668 "ComponentRealmCompositionTest.java")
3669 (("src/test") "plexus-container-default/src/test"))
3672 `(("worldclass" ,java-plexus-classworlds)
3673 ("xbean" ,java-geronimo-xbean-reflect)
3674 ("utils" ,java-plexus-utils)
3675 ("junit" ,java-junit)
3676 ("guava" ,java-guava)))
3678 `(("archiver" ,java-plexus-archiver)
3679 ("hamcrest" ,java-hamcrest-core)))))
3681 (define-public java-plexus-component-annotations
3683 (inherit java-plexus-container-default)
3684 (name "java-plexus-component-annotations")
3686 `(#:jar-name "plexus-component-annotations.jar"
3687 #:source-dir "plexus-component-annotations/src/main/java"
3688 #:tests? #f)); no tests
3691 (synopsis "Plexus descriptors generator")
3692 (description "This package is a Maven plugin to generate Plexus descriptors
3693 from source tags and class annotations.")))
3695 (define-public java-plexus-cipher
3697 (name "java-plexus-cipher")
3701 (uri (string-append "https://github.com/codehaus-plexus/plexus-cipher"
3702 "/archive/plexus-cipher-" version ".tar.gz"))
3705 "1j3r8xzlxlk340snkjp6lk2ilkxlkn8qavsfiq01f43xmvv8ymk3"))))
3706 (build-system ant-build-system)
3708 `(#:jar-name "plexus-cipher.jar"
3709 #:source-dir "src/main/java"
3711 #:tests? #f; FIXME: requires sisu-inject-bean
3713 (modify-phases %standard-phases
3714 (add-before 'build 'copy-resources
3716 (copy-recursively "src/main/resources" "build/classes")
3717 (mkdir-p "build/classes/META-INF/sisu")
3718 (with-output-to-file "build/classes/META-INF/sisu/javax.inject.Named"
3720 (display "org.sonatype.plexus.components.cipher.DefaultPlexusCipher\n")))
3723 `(("java-cdi-api" ,java-cdi-api)
3724 ("java-javax-inject" ,java-javax-inject)))
3725 (home-page "https://github.com/sonatype/plexus-cipher")
3726 (synopsis "Encryption/decryption Component")
3727 (description "Plexus-cipher contains a component to deal with encryption
3729 (license license:asl2.0)))
3731 (define-public java-plexus-compiler-api
3733 (name "java-plexus-compiler-api")
3737 (uri (string-append "https://github.com/codehaus-plexus/plexus-compiler"
3738 "/archive/plexus-compiler-" version ".tar.gz"))
3741 "09vmxs0807wsd26nbrwwj5l8ycmzazqycj52l7w6wjvkryywi69h"))))
3742 (build-system ant-build-system)
3744 `(#:jar-name "plexus-compiler-api.jar"
3745 #:source-dir "plexus-compiler-api/src/main/java"
3747 #:test-dir "plexus-compiler-api/src/test"))
3749 `(("java-plexus-container-default" ,java-plexus-container-default)
3750 ("java-plexus-util" ,java-plexus-utils)))
3752 `(("java-junit" ,java-junit)))
3753 (home-page "https://github.com/codehaus-plexus/plexus-compiler")
3754 (synopsis "Plexus Compilers component's API to manipulate compilers")
3755 (description "This package contains the API used by components to manipulate
3757 (license (list license:asl2.0
3760 (define-public java-plexus-compiler-javac
3762 (inherit java-plexus-compiler-api)
3763 (name "java-plexus-compiler-javac")
3765 `(#:jar-name "plexus-compiler-javac.jar"
3766 #:source-dir "plexus-compilers/plexus-compiler-javac/src/main/java"
3768 #:tests? #f; depends on compiler-test -> maven-core -> ... -> this package.
3769 #:test-dir "plexus-compilers/plexus-compiler-javac/src/test"))
3771 `(("java-plexus-compiler-api" ,java-plexus-compiler-api)
3772 ("java-plexus-utils" ,java-plexus-utils)
3773 ("java-plexus-container-default" ,java-plexus-container-default)))
3775 `(("java-junit" ,java-junit)))
3776 (synopsis "Javac Compiler support for Plexus Compiler component")
3777 (description "This package contains the Javac Compiler support for Plexus
3778 Compiler component.")))
3780 (define-public java-plexus-sec-dispatcher
3782 (name "java-plexus-sec-dispatcher")
3783 (version "1.4") ;; Newest release listed at the Maven Central Repository.
3785 ;; This project doesn't tag releases or publish tarballs, so we take
3786 ;; the "prepare release plexus-sec-dispatcher-1.4" git commit.
3788 (uri (string-append "https://github.com/sonatype/plexus-sec-dispatcher/"
3789 "archive/7db8f88048.tar.gz"))
3792 "1smfrk4n7xbrsxpxcp2j4i0j8q86j73w0w6xg7qz83dp6dagdjgp"))
3793 (file-name (string-append name "-" version ".tar.gz"))))
3795 `(#:jar-name "plexus-sec-dispatcher.jar"
3796 #:source-dir "src/main/java"
3799 (modify-phases %standard-phases
3800 (add-before 'build 'generate-models
3801 (lambda* (#:key inputs #:allow-other-keys)
3802 (define (modello-single-mode file version mode)
3804 "org.codehaus.modello.ModelloCli"
3805 file mode "src/main/java" version
3807 (let ((file "src/main/mdo/settings-security.mdo"))
3808 (modello-single-mode file "1.0.0" "java")
3809 (modello-single-mode file "1.0.0" "xpp3-reader")
3810 (modello-single-mode file "1.0.0" "xpp3-writer"))
3812 (add-before 'build 'generate-components.xml
3814 (mkdir-p "build/classes/META-INF/plexus")
3815 (with-output-to-file "build/classes/META-INF/plexus/components.xml"
3821 <role>org.sonatype.plexus.components.sec.dispatcher.SecDispatcher</role>\n
3822 <role-hint>default</role-hint>\n
3823 <implementation>org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher</implementation>\n
3824 <description></description>\n
3827 <role>org.sonatype.plexus.components.cipher.PlexusCipher</role>\n
3828 <field-name>_cipher</field-name>\n
3831 <role>org.sonatype.plexus.components.sec.dispatcher.PasswordDecryptor</role>\n
3832 <field-name>_decryptors</field-name>\n
3836 <_configuration-file>~/.settings-security.xml</_configuration-file>\n
3840 </component-set>\n")))
3842 (add-before 'check 'fix-paths
3844 (copy-recursively "src/test/resources" "target")
3847 `(("java-plexus-cipher" ,java-plexus-cipher)))
3849 `(("java-modello-core" ,java-modello-core)
3851 ("java-plexus-container-default" ,java-plexus-container-default)
3852 ("java-plexus-classworlds" ,java-plexus-classworlds)
3853 ("java-plexus-utils" ,java-plexus-utils)
3854 ("java-guava" ,java-guava)
3855 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
3856 ("java-sisu-build-api" ,java-sisu-build-api)
3858 ("java-modellop-plugins-java" ,java-modello-plugins-java)
3859 ("java-modellop-plugins-xml" ,java-modello-plugins-xml)
3860 ("java-modellop-plugins-xpp3" ,java-modello-plugins-xpp3)
3862 ("java-junit" ,java-junit)))
3863 (build-system ant-build-system)
3864 (home-page "https://github.com/sonatype/plexus-sec-dispatcher")
3865 (synopsis "Plexus Security Dispatcher Component")
3866 (description "This package is the Plexus Security Dispatcher Component.
3867 This component decrypts a string passed to it.")
3868 (license license:asl2.0)))
3870 (define-public java-plexus-cli
3872 (name "java-plexus-cli")
3877 (url "https://github.com/sonatype/plexus-cli")
3878 (commit "a776afa6bca84e5107bedb69440329cdb24ed645")))
3879 (file-name (string-append name "-" version))
3882 "0xjrlay605rypv3zd7y24vlwf0039bil3n2cqw54r1ddpysq46vx"))))
3883 (build-system ant-build-system)
3885 `(#:jar-name "plexus-cli.jar"
3886 #:source-dir "src/main/java"
3888 #:test-dir "src/test"))
3890 `(("java-commons-cli" ,java-commons-cli)
3891 ("java-plexus-container-default" ,java-plexus-container-default)
3892 ("java-plexus-classworlds" ,java-plexus-classworlds)))
3894 `(("java-plexus-utils" ,java-plexus-utils)
3895 ("java-junit" ,java-junit)
3896 ("java-guava" ,java-guava)))
3897 (home-page "https://codehaus-plexus.github.io/plexus-cli")
3898 (synopsis "CLI building library for plexus")
3899 (description "This package is a library to help creating CLI around
3900 Plexus components.")
3901 (license license:asl2.0)))
3903 (define-public java-sisu-build-api
3905 (name "java-sisu-build-api")
3909 (uri (string-append "https://github.com/sonatype/sisu-build-api/"
3910 "archive/plexus-build-api-" version ".tar.gz"))
3913 "1c3rrpma3x634xp2rm2p5iskfhzdyc7qfbhjzr70agrl1jwghgy2"))))
3914 (build-system ant-build-system)
3916 `(#:jar-name "sisu-build-api.jar"
3917 #:source-dir "src/main/java"
3919 #:tests? #f; FIXME: how to run the tests?
3921 (modify-phases %standard-phases
3922 (add-before 'build 'copy-resources
3924 (copy-recursively "src/main/resources" "build/classes")
3925 (substitute* (find-files "build/classes")
3926 (("\\$\\{project.version\\}") ,version))
3928 (add-before 'build 'generate-plexus-compontent
3930 (mkdir-p "build/classes/META-INF/plexus")
3931 ;; This file is required for plexus to inject this package.
3932 ;; FIXME: how is it generated?
3933 (with-output-to-file "build/classes/META-INF/plexus/components.xml"
3939 <role>org.sonatype.plexus.build.incremental.BuildContext</role>\n
3940 <role-hint>default</role-hint>\n
3941 <implementation>org.sonatype.plexus.build.incremental.DefaultBuildContext</implementation>\n
3942 <description>Filesystem based non-incremental build context implementation\n
3943 which behaves as if all files were just created.</description>\n
3946 </component-set>\n")))
3949 `(("java-plexus-utils" ,java-plexus-utils)
3950 ("java-plexus-container-default" ,java-plexus-container-default)))
3951 (home-page "https://github.com/sonatype/sisu-build-api/")
3952 (synopsis "Base build API for maven")
3953 (description "This package contains the base build API for maven and
3954 a default implementation of it. This API is about scanning files in a
3955 project and determining what files need to be rebuilt.")
3956 (license license:asl2.0)))
3958 (define-public java-modello-core
3960 (name "java-modello-core")
3964 (uri (string-append "https://github.com/codehaus-plexus/modello"
3965 "/archive/modello-" version ".tar.gz"))
3968 "0l2pvns8pmlrmjm3iknp7gpg3654y1m8qhy55b19sdwdchdcyxfh"))))
3969 (build-system ant-build-system)
3971 `(#:jar-name "modello-core.jar"
3972 #:source-dir "modello-core/src/main/java"
3973 #:test-dir "modello-core/src/test"
3974 #:main-class "org.codehaus.modello.ModelloCli"
3977 (modify-phases %standard-phases
3978 (add-before 'build 'copy-resources
3980 (mkdir-p "build/classes/META-INF/plexus")
3981 (copy-file "modello-core/src/main/resources/META-INF/plexus/components.xml"
3982 "build/classes/META-INF/plexus/components.xml")
3984 (add-before 'check 'fix-tests
3986 (with-directory-excursion "modello-core/src/test/java/org/codehaus"
3987 (substitute* '("modello/core/DefaultModelloCoreTest.java"
3988 "modello/core/io/ModelReaderTest.java")
3989 (("src/test") "modello-core/src/test")))
3992 `(("java-plexus-utils" ,java-plexus-utils)
3993 ("java-plexus-container-default" ,java-plexus-container-default)
3994 ("java-sisu-build-api" ,java-sisu-build-api)))
3996 `(("java-junit" ,java-junit)
3997 ("java-plexus-classworlds" ,java-plexus-classworlds)
3998 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
3999 ("java-guava" ,java-guava)))
4000 (home-page "http://codehaus-plexus.github.io/modello/")
4001 (synopsis "Framework for code generation from a simple model")
4002 (description "Modello is a framework for code generation from a simple model.
4004 Modello generates code from a simple model format: based on a plugin
4005 architecture, various types of code and descriptors can be generated from the
4006 single model, including Java POJOs, XML/JSON/YAML marshallers/unmarshallers,
4007 XSD and documentation.")
4010 ;; Although this package uses only files licensed under expat,
4011 ;; other parts of the source are licensed under different
4012 ;; licenses. We include them to be inherited by other packages.
4014 ;; Some files in modello-plugin-java are licensed under a
4015 ;; 5-clause BSD license.
4016 (license:non-copyleft
4017 (string-append "file:///modello-plugins/modello-plugin-java/"
4018 "src/main/java/org/codehaus/modello/plugin/"
4019 "java/javasource/JNaming.java"))))))
4021 (define-public java-modello-plugins-java
4023 (inherit java-modello-core)
4024 (name "java-modello-plugins-java")
4026 `(#:jar-name "modello-plugins-java.jar"
4027 #:source-dir "modello-plugins/modello-plugin-java/src/main/java"
4028 #:test-dir "modello-plugins/modello-plugin-java/src/test"
4030 #:tests? #f; requires maven-model, which depends on this package
4032 (modify-phases %standard-phases
4033 (add-before 'build 'copy-resources
4035 (mkdir-p "build/classes")
4036 (copy-recursively "modello-plugins/modello-plugin-java/src/main/resources"
4040 `(("java-modello-core" ,java-modello-core)
4041 ,@(package-inputs java-modello-core)))
4042 (synopsis "Modello Java Plugin")
4043 (description "Modello Java Plugin generates Java objects for the model.")))
4045 (define-public java-modello-plugins-xml
4047 (inherit java-modello-core)
4048 (name "java-modello-plugins-xml")
4050 `(#:jar-name "modello-plugins-xml.jar"
4051 #:source-dir "modello-plugins/modello-plugin-xml/src/main/java"
4052 #:test-dir "modello-plugins/modello-plugin-xml/src/test"
4055 (modify-phases %standard-phases
4056 (add-before 'build 'copy-resources
4058 (mkdir-p "build/classes")
4060 "modello-plugins/modello-plugin-xml/src/main/resources"
4063 (add-before 'check 'fix-paths
4065 (with-directory-excursion "modello-plugins/modello-plugin-xml/src/test"
4067 "java/org/codehaus/modello/plugins/xml/XmlModelloPluginTest.java"
4068 (("src/test") "modello-plugins/modello-plugin-xml/src/test")))
4071 `(("java-modello-core" ,java-modello-core)
4072 ("java-modello-plugins-java" ,java-modello-plugins-java)
4073 ,@(package-inputs java-modello-core)))
4074 (synopsis "Modello XML Plugin")
4075 (description "Modello XML Plugin contains shared code for every plugins
4076 working on XML representation of the model.")))
4078 (define-public java-modello-test
4080 (inherit java-modello-core)
4081 (name "java-modello-test")
4083 `(#:jar-name "modello-test.jar"
4084 #:source-dir "modello-test/src/main/java"
4085 #:tests? #f; no tests
4088 `(("java-plexus-utils" ,java-plexus-utils)
4089 ("java-plexus-compiler-api" ,java-plexus-compiler-api)
4090 ("java-plexus-compiler-javac" ,java-plexus-compiler-javac)
4091 ("java-plexus-container-default" ,java-plexus-container-default)))
4092 (synopsis "Modello test package")
4093 (description "The modello test package contains the basis to create
4094 Modello generator unit-tests, including sample models and xml files to test
4095 every feature for every plugin.")))
4097 (define-public java-modello-plugins-xpp3
4099 (inherit java-modello-core)
4100 (name "java-modello-plugins-xpp3")
4102 `(#:jar-name "modello-plugins-xpp3.jar"
4103 #:source-dir "modello-plugins/modello-plugin-xpp3/src/main/java"
4104 #:test-dir "modello-plugins/modello-plugin-xpp3/src/test"
4105 ;; One of the test dependencies is maven-model which depends on this package.
4109 (modify-phases %standard-phases
4110 (add-before 'build 'copy-resources
4112 (mkdir-p "build/classes")
4113 (copy-recursively "modello-plugins/modello-plugin-xpp3/src/main/resources"
4117 `(("java-modello-core" ,java-modello-core)
4118 ("java-modello-plugins-java" ,java-modello-plugins-java)
4119 ("java-modello-plugins-xml" ,java-modello-plugins-xml)
4120 ,@(package-inputs java-modello-core)))
4122 `(("java-xmlunit" ,java-xmlunit)
4123 ("java-modello-test" ,java-modello-test)
4124 ,@(package-native-inputs java-modello-core)))
4125 (synopsis "Modello XPP3 Plugin")
4126 (description "The modello XPP3 plugin generates XML readers and writers based
4127 on the XPP3 API (XML Pull Parser).")))
4129 (define-public java-asm
4135 (uri (string-append "http://download.forge.ow2.org/asm/"
4136 "asm-" version ".tar.gz"))
4139 "115l5pqblirdkmzi32dxx7gbcm4jy0s14y5wircr6h8jdr9aix00"))))
4140 (build-system ant-build-system)
4142 `(("java-aqute-bndlib" ,java-aqute-bndlib)
4143 ("java-aqute-libg" ,java-aqute-libg)))
4145 `(#:build-target "compile"
4146 ;; The tests require an old version of Janino, which no longer compiles
4151 ;; We don't need these extra ant tasks, but the build system asks us to
4152 ;; provide a path anyway.
4153 "-Dobjectweb.ant.tasks.path=dummy-path"
4154 ;; The java-aqute.bndlib JAR file will be put onto the classpath and
4155 ;; used during the build automatically by ant-build-system, but
4156 ;; java-asm's build.xml fails unless we provide something here.
4157 "-Dbiz.aQute.bnd.path=dummy-path")
4159 (modify-phases %standard-phases
4160 (add-before 'install 'build-jars
4161 (lambda* (#:key make-flags #:allow-other-keys)
4162 ;; We cannot use the "jar" target because it depends on a couple
4163 ;; of unpackaged, complicated tools.
4166 "-cf" (string-append "dist/asm-" ,version ".jar")
4167 "-C" "output/build/tmp" ".")))
4169 (install-jars "dist")))))
4171 `(("java-junit" ,java-junit)))
4172 (home-page "http://asm.ow2.org/")
4173 (synopsis "Very small and fast Java bytecode manipulation framework")
4174 (description "ASM is an all purpose Java bytecode manipulation and
4175 analysis framework. It can be used to modify existing classes or dynamically
4176 generate classes, directly in binary form. The provided common
4177 transformations and analysis algorithms allow to easily assemble custom
4178 complex transformations and code analysis tools.")
4179 (license license:bsd-3)))
4181 (define java-asm-bootstrap
4184 (name "java-asm-bootstrap")
4186 (substitute-keyword-arguments (package-arguments java-asm)
4190 `(("java-aqute-bndlib" ,java-aqute-bndlib-bootstrap)
4191 ("java-aqute-libg" ,java-aqute-libg-bootstrap)
4192 ,@(delete `("java-aqute-bndlib" ,java-aqute-bndlib)
4193 (delete `("java-aqute-libg" ,java-aqute-libg)
4194 (package-inputs java-asm)))))))
4196 (define-public java-cglib
4204 (url "https://github.com/cglib/cglib.git")
4205 (commit (string-append
4207 (string-map (lambda (c) (if (char=? c #\.) #\_ c))
4209 (file-name (git-file-name name version))
4211 (base32 "186451jms2zfp47yd8kxd77az2cqal1my2br7klgyp8fpl4qfg8v"))))
4212 (build-system ant-build-system)
4214 `(;; FIXME: tests fail because junit runs
4215 ;; "net.sf.cglib.transform.AbstractTransformTest", which does not seem
4216 ;; to describe a test at all.
4218 #:jar-name "cglib.jar"
4220 (modify-phases %standard-phases
4221 (add-after 'unpack 'chdir
4222 (lambda _ (chdir "cglib") #t)))))
4224 `(("java-asm" ,java-asm)
4225 ("java-junit" ,java-junit)))
4226 (home-page "https://github.com/cglib/cglib/")
4227 (synopsis "Java byte code generation library")
4228 (description "The byte code generation library CGLIB is a high level API
4229 to generate and transform Java byte code.")
4230 (license license:asl2.0)))
4232 (define-public java-objenesis
4234 (name "java-objenesis")
4238 (uri (string-append "https://github.com/easymock/objenesis/"
4239 "archive/" version ".tar.gz"))
4240 (file-name (string-append "objenesis-" version ".tar.gz"))
4243 "1va5qz1i2wawwavhnxfzxnfgrcaflz9p1pg03irrjh4nd3rz8wh6"))))
4244 (build-system ant-build-system)
4246 `(#:jar-name "objenesis.jar"
4247 #:source-dir "main/src/"
4248 #:test-dir "main/src/test/"))
4250 `(("java-junit" ,java-junit)
4251 ("java-hamcrest-core" ,java-hamcrest-core)))
4252 (home-page "http://objenesis.org/")
4253 (synopsis "Bypass the constructor when creating an object")
4254 (description "Objenesis is a small Java library that serves one purpose:
4255 to instantiate a new object of a particular class. It is common to see
4256 restrictions in libraries stating that classes must require a default
4257 constructor. Objenesis aims to overcome these restrictions by bypassing the
4258 constructor on object instantiation.")
4259 (license license:asl2.0)))
4261 (define-public java-easymock
4263 (name "java-easymock")
4267 (uri (string-append "https://github.com/easymock/easymock/"
4268 "archive/easymock-" version ".tar.gz"))
4271 "1yzg0kv256ndr57gpav46cyv4a1ns5sj722l50zpxk3j6sk9hnmi"))))
4272 (build-system ant-build-system)
4274 `(#:jar-name "easymock.jar"
4275 #:source-dir "core/src/main"
4276 #:test-dir "core/src/test"
4278 (modify-phases %standard-phases
4279 ;; FIXME: Android support requires the following packages to be
4280 ;; available: com.google.dexmaker.stock.ProxyBuilder
4281 (add-after 'unpack 'delete-android-support
4283 (with-directory-excursion "core/src/main/java/org/easymock/internal"
4284 (substitute* "MocksControl.java"
4285 (("AndroidSupport.isAndroid\\(\\)") "false")
4286 (("return classProxyFactory = new AndroidClassProxyFactory\\(\\);") ""))
4287 (delete-file "AndroidClassProxyFactory.java"))
4289 (add-after 'unpack 'delete-broken-tests
4291 (with-directory-excursion "core/src/test/java/org/easymock"
4292 ;; This test depends on dexmaker.
4293 (delete-file "tests2/ClassExtensionHelperTest.java")
4295 ;; This is not a test.
4296 (delete-file "tests/BaseEasyMockRunnerTest.java")
4298 ;; This test should be executed with a different runner...
4299 (delete-file "tests2/EasyMockAnnotationsTest.java")
4300 ;; ...but deleting it means that we also have to delete these
4302 (delete-file "tests2/EasyMockRunnerTest.java")
4303 (delete-file "tests2/EasyMockRuleTest.java")
4305 ;; This test fails because the file "easymock.properties" does
4307 (delete-file "tests2/EasyMockPropertiesTest.java"))
4310 `(("java-asm" ,java-asm)
4311 ("java-cglib" ,java-cglib)
4312 ("java-objenesis" ,java-objenesis)))
4314 `(("java-junit" ,java-junit)
4315 ("java-hamcrest-core" ,java-hamcrest-core)))
4316 (home-page "http://easymock.org")
4317 (synopsis "Java library providing mock objects for unit tests")
4318 (description "EasyMock is a Java library that provides an easy way to use
4319 mock objects in unit testing.")
4320 (license license:asl2.0)))
4322 (define-public java-jmock-1
4328 (uri (string-append "https://github.com/jmock-developers/"
4329 "jmock-library/archive/" version ".tar.gz"))
4330 (file-name (string-append "jmock-" version ".tar.gz"))
4333 "0xmrlhq0fszldkbv281k9463mv496143vvmqwpxp62yzjvdkx9w0"))))
4334 (build-system ant-build-system)
4336 `(#:build-target "jars"
4337 #:test-target "run.tests"
4339 (modify-phases %standard-phases
4340 (replace 'install (install-jars "build")))))
4341 (home-page "http://www.jmock.org")
4342 (synopsis "Mock object library for test-driven development")
4343 (description "JMock is a library that supports test-driven development of
4344 Java code with mock objects. Mock objects help you design and test the
4345 interactions between the objects in your programs.
4350 @item makes it quick and easy to define mock objects
4351 @item lets you precisely specify the interactions between
4352 your objects, reducing the brittleness of your tests
4353 @item plugs into your favourite test framework
4354 @item is easy to extend.
4356 (license license:bsd-3)))
4358 (define-public java-jmock
4360 (inherit java-jmock-1)
4365 (uri (string-append "https://github.com/jmock-developers/"
4366 "jmock-library/archive/" version ".tar.gz"))
4367 (file-name (string-append name "-" version ".tar.gz"))
4370 "18650a9g8xffcsdb6w91pbswa7f40fp2sh6s3nclkclz5dbzq8f0"))))
4372 `(("java-hamcrest-all" ,java-hamcrest-all)
4373 ("java-asm" ,java-asm)
4374 ("java-bsh" ,java-bsh)
4375 ("java-junit" ,java-junit)))
4377 `(("cglib" ,java-cglib)))
4379 `(#:jar-name "java-jmock.jar"
4380 #:source-dir "jmock/src/main/java"
4381 #:test-dir "jmock/src/test"))))
4383 (define-public java-jmock-junit4
4385 (inherit java-jmock)
4386 (name "java-jmock-junit4")
4388 `(#:jar-name "java-jmock-junit4.jar"
4389 #:source-dir "jmock-junit4/src/main/java"
4390 #:test-dir "jmock-junit4/src/test"))
4392 `(("java-hamcrest-all" ,java-hamcrest-all)
4393 ("java-asm" ,java-asm)
4394 ("java-bsh" ,java-bsh)
4395 ("java-jmock" ,java-jmock)
4396 ("java-jumit" ,java-junit)))))
4398 (define-public java-jmock-legacy
4400 (inherit java-jmock)
4401 (name "java-jmock-legacy")
4403 `(#:jar-name "java-jmock-legacy.jar"
4404 #:source-dir "jmock-legacy/src/main/java"
4405 #:test-dir "jmock-legacy/src/test"
4407 (modify-phases %standard-phases
4408 (add-before 'check 'copy-tests
4410 ;; This file is a dependancy of some tests
4411 (let ((file "org/jmock/test/acceptance/PackageProtectedType.java"))
4412 (copy-file (string-append "jmock/src/test/java/" file)
4413 (string-append "jmock-legacy/src/test/java/" file))
4416 `(("java-hamcrest-all" ,java-hamcrest-all)
4417 ("java-objenesis" ,java-objenesis)
4418 ("java-cglib" ,java-cglib)
4419 ("java-jmock" ,java-jmock)
4420 ("java-asm" ,java-asm)
4421 ("java-bsh" ,java-bsh)
4422 ("java-junit" ,java-junit)))
4424 `(("java-jmock-junit4" ,java-jmock-junit4)))))
4426 (define-public java-hamcrest-all
4427 (package (inherit java-hamcrest-core)
4428 (name "java-hamcrest-all")
4431 ,@(substitute-keyword-arguments (package-arguments java-hamcrest-core)
4432 ((#:build-target _) "bigjar")
4434 `(modify-phases ,phases
4435 ;; Some build targets override the classpath, so we need to patch
4436 ;; the build.xml to ensure that required dependencies are on the
4438 (add-after 'unpack 'patch-classpath-for-integration
4439 (lambda* (#:key inputs #:allow-other-keys)
4440 (substitute* "build.xml"
4441 ((" build/hamcrest-library-\\$\\{version\\}.jar" line)
4445 (find-files (assoc-ref inputs "java-junit") "\\.jar$")
4446 (find-files (assoc-ref inputs "java-jmock") "\\.jar$")
4447 (find-files (assoc-ref inputs "java-easymock") "\\.jar$")))
4449 (("build/hamcrest-core-\\$\\{version\\}\\.jar")
4450 (string-append (assoc-ref inputs "java-hamcrest-core")
4451 "/share/java/hamcrest-core.jar")))
4454 `(("java-junit" ,java-junit)
4455 ("java-jmock" ,java-jmock-1)
4456 ;; This is necessary because of what seems to be a race condition.
4457 ;; This package would sometimes fail to build because hamcrest-core.jar
4458 ;; could not be found, even though it is built as part of this package.
4459 ;; Adding java-hamcrest-core appears to fix this problem. See
4460 ;; https://debbugs.gnu.org/31390 for more information.
4461 ("java-hamcrest-core" ,java-hamcrest-core)
4462 ("java-easymock" ,java-easymock)
4463 ,@(package-inputs java-hamcrest-core)))))
4465 (define-public java-jopt-simple
4467 (name "java-jopt-simple")
4471 (uri (string-append "http://repo1.maven.org/maven2/"
4472 "net/sf/jopt-simple/jopt-simple/"
4473 version "/jopt-simple-"
4474 version "-sources.jar"))
4477 "1v8bzmwmw6qq20gm42xyay6vrd567dra4vqwhgjnqqjz1gs9f8qa"))))
4478 (build-system ant-build-system)
4480 `(#:tests? #f ; there are no tests
4481 #:jar-name "jopt-simple.jar"))
4482 (home-page "https://pholser.github.io/jopt-simple/")
4483 (synopsis "Java library for parsing command line options")
4484 (description "JOpt Simple is a Java library for parsing command line
4485 options, such as those you might pass to an invocation of @code{javac}. In
4486 the interest of striving for simplicity, as closely as possible JOpt Simple
4487 attempts to honor the command line option syntaxes of POSIX @code{getopt} and
4488 GNU @code{getopt_long}. It also aims to make option parser configuration and
4489 retrieval of options and their arguments simple and expressive, without being
4491 (license license:expat)))
4493 (define-public java-commons-math3
4495 (name "java-commons-math3")
4499 (uri (string-append "mirror://apache/commons/math/source/"
4500 "commons-math3-" version "-src.tar.gz"))
4503 "19l6yp44qc5g7wg816nbn5z3zq3xxzwimvbm4a8pczgvpi4i85s6"))))
4504 (build-system ant-build-system)
4506 `(#:build-target "jar"
4507 #:test-target "test"
4509 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
4510 (junit (assoc-ref %build-inputs "java-junit")))
4511 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
4512 (string-append "-Dhamcrest.jar=" hamcrest
4513 "/share/java/hamcrest-core.jar")))
4515 (modify-phases %standard-phases
4516 ;; We want to build the jar in the build phase and run the tests
4517 ;; later in a separate phase.
4518 (add-after 'unpack 'untangle-targets
4520 (substitute* "build.xml"
4521 (("name=\"jar\" depends=\"test\"")
4522 "name=\"jar\" depends=\"compile\""))
4524 ;; There is no install target.
4526 (install-jars "target")))))
4528 `(("java-junit" ,java-junit)
4529 ("java-hamcrest-core" ,java-hamcrest-core)))
4530 (home-page "http://commons.apache.org/math/")
4531 (synopsis "Apache Commons mathematics library")
4532 (description "Commons Math is a library of lightweight, self-contained
4533 mathematics and statistics components addressing the most common problems not
4534 available in the Java programming language or Commons Lang.")
4535 (license license:asl2.0)))
4537 (define-public java-jmh
4544 (url "http://hg.openjdk.java.net/code-tools/jmh/")
4545 (changeset version)))
4546 (file-name (string-append name "-" version "-checkout"))
4549 "1fxyxhg9famwcg1prc4cgwb5wzyxqavn3cjm5vz8605xz7x5k084"))))
4550 (build-system ant-build-system)
4552 `(#:jar-name "jmh-core.jar"
4553 #:source-dir "jmh-core/src/main"
4554 #:test-dir "jmh-core/src/test"
4556 (modify-phases %standard-phases
4557 ;; This seems to be a bug in the JDK. It may not be necessary in
4558 ;; future versions of the JDK.
4559 (add-after 'unpack 'fix-bug
4561 (with-directory-excursion
4562 "jmh-core/src/main/java/org/openjdk/jmh/runner/options"
4563 (substitute* '("IntegerValueConverter.java"
4564 "ThreadsValueConverter.java")
4565 (("public Class<Integer> valueType")
4566 "public Class<? extends Integer> valueType")))
4569 `(("java-jopt-simple" ,java-jopt-simple)
4570 ("java-commons-math3" ,java-commons-math3)))
4572 `(("java-junit" ,java-junit)
4573 ("java-hamcrest-core" ,java-hamcrest-core)))
4574 (home-page "http://openjdk.java.net/projects/code-tools/jmh/")
4575 (synopsis "Benchmark harness for the JVM")
4576 (description "JMH is a Java harness for building, running, and analysing
4577 nano/micro/milli/macro benchmarks written in Java and other languages
4578 targeting the JVM.")
4580 (license license:gpl2)))
4582 (define-public java-commons-collections4
4584 (name "java-commons-collections4")
4588 (uri (string-append "mirror://apache/commons/collections/source/"
4589 "commons-collections4-" version "-src.tar.gz"))
4592 "1krfhvggympq4avk7gh6qafzf6b9ip6r1m4lmacikyx04039m0wl"))))
4593 (build-system ant-build-system)
4595 `(#:test-target "test"
4597 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
4598 (junit (assoc-ref %build-inputs "java-junit"))
4599 (easymock (assoc-ref %build-inputs "java-easymock")))
4600 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
4601 (string-append "-Dhamcrest.jar=" hamcrest
4602 "/share/java/hamcrest-core.jar")
4603 (string-append "-Deasymock.jar=" easymock
4604 "/share/java/easymock.jar")))
4606 (modify-phases %standard-phases
4608 (install-jars "target")))))
4610 `(("java-junit" ,java-junit)
4611 ("java-hamcrest-core" ,java-hamcrest-core)
4612 ("java-easymock" ,java-easymock)))
4613 (home-page "http://commons.apache.org/collections/")
4614 (synopsis "Collections framework")
4615 (description "The Java Collections Framework is the recognised standard
4616 for collection handling in Java. Commons-Collections seek to build upon the
4617 JDK classes by providing new interfaces, implementations and utilities. There
4618 are many features, including:
4621 @item @code{Bag} interface for collections that have a number of copies of
4623 @item @code{BidiMap} interface for maps that can be looked up from value to
4624 key as well and key to value
4625 @item @code{MapIterator} interface to provide simple and quick iteration over
4627 @item Transforming decorators that alter each object as it is added to the
4629 @item Composite collections that make multiple collections look like one
4630 @item Ordered maps and sets that retain the order elements are added in,
4631 including an LRU based map
4632 @item Reference map that allows keys and/or values to be garbage collected
4634 @item Many comparator implementations
4635 @item Many iterator implementations
4636 @item Adapter classes from array and enumerations to collections
4637 @item Utilities to test or create typical set-theory properties of collections
4638 such as union, intersection, and closure.
4640 (license license:asl2.0)))
4642 (define-public java-commons-collections
4644 (inherit java-commons-collections4)
4645 (name "java-commons-collections")
4649 (uri (string-append "mirror://apache/commons/collections/source/"
4650 "commons-collections-" version "-src.tar.gz"))
4653 "055r51a5lfc3z7rkxnxmnn1npvkvda7636hjpm4qk7cnfzz98387"))
4655 (search-patches "java-commons-collections-fix-java8.patch"))))
4657 (substitute-keyword-arguments (package-arguments java-commons-collections4)
4659 `(modify-phases ,phases
4660 ;; The manifest is required by the build procedure
4661 (add-before 'build 'add-manifest
4663 (mkdir-p "build/conf")
4664 (call-with-output-file "build/conf/MANIFEST.MF"
4666 (format file "Manifest-Version: 1.0\n")))
4669 (install-jars "build"))))))))
4671 (define java-commons-collections-test-classes
4673 (inherit java-commons-collections)
4675 `(#:jar-name "commons-collections-test-classes.jar"
4676 #:source-dir "src/test"
4679 `(("collection" ,java-commons-collections)))))
4681 (define-public java-commons-beanutils
4683 (name "java-commons-beanutils")
4687 (uri (string-append "mirror://apache/commons/beanutils/source/"
4688 "commons-beanutils-" version "-src.tar.gz"))
4691 "03cs0bq3sl1sdc7py9g3qnf8n9h473nrkvd3d251kaqv6a2ab7qk"))))
4692 (build-system ant-build-system)
4694 `(#:test-target "test"
4697 (modify-phases %standard-phases
4699 (lambda* (#:key outputs #:allow-other-keys)
4700 (rename-file (string-append "dist/commons-beanutils-" ,version
4702 "commons-beanutils.jar")
4703 (install-file "commons-beanutils.jar"
4704 (string-append (assoc-ref outputs "out") "/share/java/"))
4707 `(("logging" ,java-commons-logging-minimal)
4708 ("collections" ,java-commons-collections)))
4710 `(("junit" ,java-junit)
4711 ("collections-test" ,java-commons-collections-test-classes)))
4712 (home-page "http://commons.apache.org/beanutils/")
4713 (synopsis "Dynamically set or get properties in Java")
4714 (description "BeanUtils provides a simplified interface to reflection and
4715 introspection to set or get dynamically determined properties through their
4716 setter and getter method.")
4717 (license license:asl2.0)))
4719 (define-public java-commons-io
4721 (name "java-commons-io")
4726 (uri (string-append "mirror://apache/commons/io/source/"
4727 "commons-io-" version "-src.tar.gz"))
4730 "0q5y41jrcjvx9hzs47x5kdhnasdy6rm4bzqd2jxl02w717m7a7v3"))))
4731 (build-system ant-build-system)
4732 (outputs '("out" "doc"))
4734 `(#:test-target "test"
4736 (list (string-append "-Djunit.jar="
4737 (assoc-ref %build-inputs "java-junit")
4738 "/share/java/junit.jar"))
4740 (modify-phases %standard-phases
4741 (add-after 'build 'build-javadoc ant-build-javadoc)
4742 (replace 'install (install-jars "target"))
4743 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
4745 `(("java-junit" ,java-junit)
4746 ("java-hamcrest-core" ,java-hamcrest-core)))
4747 (home-page "http://commons.apache.org/io/")
4748 (synopsis "Common useful IO related classes")
4749 (description "Commons-IO contains utility classes, stream implementations,
4750 file filters and endian classes.")
4751 (license license:asl2.0)))
4753 (define-public java-commons-exec-1.1
4755 (name "java-commons-exec")
4760 (uri (string-append "mirror://apache/commons/exec/source/"
4761 "commons-exec-" version "-src.tar.gz"))
4764 "025dk8xgj10lxwwwqp0hng2rn7fr4vcirxzydqzx9k4dim667alk"))))
4765 (build-system ant-build-system)
4767 `(#:test-target "test"
4769 (list (string-append "-Dmaven.junit.jar="
4770 (assoc-ref %build-inputs "java-junit")
4771 "/share/java/junit.jar"))
4773 (modify-phases %standard-phases
4774 (add-before 'build 'delete-network-tests
4776 (delete-file "src/test/java/org/apache/commons/exec/DefaultExecutorTest.java")
4777 (substitute* "src/test/java/org/apache/commons/exec/TestRunner.java"
4778 (("suite\\.addTestSuite\\(DefaultExecutorTest\\.class\\);") ""))
4780 ;; The "build" phase automatically tests.
4782 (replace 'install (install-jars "target")))))
4784 `(("java-junit" ,java-junit)))
4785 (home-page "http://commons.apache.org/proper/commons-exec/")
4786 (synopsis "Common program execution related classes")
4787 (description "Commons-Exec simplifies executing external processes.")
4788 (license license:asl2.0)))
4790 (define-public java-commons-exec
4792 (inherit java-commons-exec-1.1)
4797 (uri (string-append "mirror://apache/commons/exec/source/"
4798 "commons-exec-" version "-src.tar.gz"))
4801 "17yb4h6f8l49c5iyyvda4z2nmw0bxrx857nrwmsr7mmpb7x441yv"))))
4803 `(#:test-target "test"
4805 (list (string-append "-Dmaven.junit.jar="
4806 (assoc-ref %build-inputs "java-junit")
4807 "/share/java/junit.jar")
4808 "-Dmaven.compiler.source=1.7"
4809 "-Dmaven.compiler.target=1.7")
4811 (modify-phases %standard-phases
4812 (add-before 'build 'delete-network-tests
4813 (lambda* (#:key inputs #:allow-other-keys)
4814 ;; This test hangs indefinitely.
4815 (delete-file "src/test/java/org/apache/commons/exec/issues/Exec60Test.java")
4816 (substitute* "src/test/java/org/apache/commons/exec/issues/Exec41Test.java"
4817 (("ping -c 10 127.0.0.1") "sleep 10"))
4818 (substitute* "src/test/java/org/apache/commons/exec/issues/Exec49Test.java"
4820 (call-with-output-file "src/test/scripts/ping.sh"
4822 (format port "#!~a/bin/sh\nsleep $1\n"
4823 (assoc-ref inputs "bash"))))
4825 ;; The "build" phase automatically tests.
4827 (replace 'install (install-jars "target")))))
4829 `(("java-junit" ,java-junit)
4830 ("java-hamcrest-core" ,java-hamcrest-core)))))
4832 (define-public java-commons-lang
4834 (name "java-commons-lang")
4839 (uri (string-append "mirror://apache/commons/lang/source/"
4840 "commons-lang-" version "-src.tar.gz"))
4842 (base32 "1mxwagqadzx1b2al7i0z1v0r235aj2njdyijf02szq0vhmqrfiq5"))))
4843 (build-system ant-build-system)
4844 (outputs '("out" "doc"))
4846 `(#:test-target "test"
4847 #:test-exclude (list "**/Abstract*.java" "**/Random*.java")
4849 (modify-phases %standard-phases
4850 (add-after 'build 'build-javadoc ant-build-javadoc)
4851 (add-before 'check 'disable-failing-test
4853 ;; Disable a failing test
4854 (substitute* "src/test/java/org/apache/commons/lang/\
4855 time/FastDateFormatTest.java"
4856 (("public void testFormat\\(\\)")
4857 "public void disabled_testFormat()"))
4859 (replace 'install (install-jars "target"))
4860 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
4862 `(("java-junit" ,java-junit)))
4863 (home-page "http://commons.apache.org/lang/")
4864 (synopsis "Extension of the java.lang package")
4865 (description "The Commons Lang components contains a set of Java classes
4866 that provide helper methods for standard Java classes, especially those found
4867 in the @code{java.lang} package in the Sun JDK. The following classes are
4871 @item StringUtils - Helper for @code{java.lang.String}.
4872 @item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets
4873 of characters such as @code{[a-z]} and @code{[abcdez]}.
4874 @item RandomStringUtils - Helper for creating randomised strings.
4875 @item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
4876 @item NumberRange - A range of numbers with an upper and lower bound.
4877 @item ObjectUtils - Helper for @code{java.lang.Object}.
4878 @item SerializationUtils - Helper for serializing objects.
4879 @item SystemUtils - Utility class defining the Java system properties.
4880 @item NestedException package - A sub-package for the creation of nested
4882 @item Enum package - A sub-package for the creation of enumerated types.
4883 @item Builder package - A sub-package for the creation of @code{equals},
4884 @code{hashCode}, @code{compareTo} and @code{toString} methods.
4886 (license license:asl2.0)))
4888 (define-public java-commons-lang3
4890 (name "java-commons-lang3")
4895 (uri (string-append "mirror://apache/commons/lang/source/"
4896 "commons-lang3-" version "-src.tar.gz"))
4898 (base32 "0xpshb9spjhplq5a7mr0y1bgfw8190ik4xj8f569xidfcki1d6kg"))))
4899 (build-system ant-build-system)
4900 (outputs '("out" "doc"))
4902 `(#:test-target "test"
4904 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-all"))
4905 (junit (assoc-ref %build-inputs "java-junit"))
4906 (easymock (assoc-ref %build-inputs "java-easymock"))
4907 (io (assoc-ref %build-inputs "java-commons-io")))
4908 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
4909 (string-append "-Dhamcrest.jar=" hamcrest
4910 "/share/java/hamcrest-all.jar")
4911 (string-append "-Dcommons-io.jar=" io
4912 "/share/java/commons-io-"
4913 ,(package-version java-commons-io)
4915 (string-append "-Deasymock.jar=" easymock
4916 "/share/java/easymock.jar")))
4918 (modify-phases %standard-phases
4919 (add-after 'build 'build-javadoc ant-build-javadoc)
4920 (replace 'install (install-jars "target"))
4921 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
4923 `(("java-junit" ,java-junit)
4924 ("java-commons-io" ,java-commons-io)
4925 ("java-hamcrest-all" ,java-hamcrest-all)
4926 ("java-easymock" ,java-easymock)))
4927 (home-page "http://commons.apache.org/lang/")
4928 (synopsis "Extension of the java.lang package")
4929 (description "The Commons Lang components contains a set of Java classes
4930 that provide helper methods for standard Java classes, especially those found
4931 in the @code{java.lang} package. The following classes are included:
4934 @item StringUtils - Helper for @code{java.lang.String}.
4935 @item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets of
4936 characters such as @code{[a-z]} and @code{[abcdez]}.
4937 @item RandomStringUtils - Helper for creating randomised strings.
4938 @item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
4939 @item NumberRange - A range of numbers with an upper and lower bound.
4940 @item ObjectUtils - Helper for @code{java.lang.Object}.
4941 @item SerializationUtils - Helper for serializing objects.
4942 @item SystemUtils - Utility class defining the Java system properties.
4943 @item NestedException package - A sub-package for the creation of nested
4945 @item Enum package - A sub-package for the creation of enumerated types.
4946 @item Builder package - A sub-package for the creation of @code{equals},
4947 @code{hashCode}, @code{compareTo} and @code{toString} methods.
4949 (license license:asl2.0)))
4951 (define-public java-commons-bsf
4953 (name "java-commons-bsf")
4957 (uri (string-append "mirror://apache/commons/bsf/source/bsf-src-"
4961 "1sbamr8jl32p1jgf59nw0b2w9qivyg145954hm6ly54cfgsqrdas"))
4962 (modules '((guix build utils)))
4965 (for-each delete-file
4966 (find-files "." "\\.jar$"))
4968 (build-system ant-build-system)
4970 `(#:build-target "jar"
4971 #:tests? #f; No test file
4972 #:modules ((guix build ant-build-system)
4974 (guix build java-utils)
4977 (modify-phases %standard-phases
4978 (add-before 'build 'create-properties
4980 ;; This file is missing from the distribution
4981 (call-with-output-file "build-properties.xml"
4984 `(project (@ (basedir ".") (name "build-properties") (default ""))
4985 (property (@ (name "project.name") (value "bsf")))
4986 (property (@ (name "source.level") (value "1.5")))
4987 (property (@ (name "build.lib") (value "build/jar")))
4988 (property (@ (name "src.dir") (value "src")))
4989 (property (@ (name "tests.dir") (value "src/org/apache/bsf/test")))
4990 (property (@ (name "build.tests") (value "build/test-classes")))
4991 (property (@ (name "build.dest") (value "build/classes"))))
4994 (replace 'install (install-jars "build")))))
4996 `(("java-junit" ,java-junit)))
4998 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)))
4999 (home-page "https://commons.apache.org/proper/commons-bsf")
5000 (synopsis "Bean Scripting Framework")
5001 (description "The Bean Scripting Framework (BSF) is a set of Java classes
5002 which provides scripting language support within Java applications, and access
5003 to Java objects and methods from scripting languages. BSF allows one to write
5004 JSPs in languages other than Java while providing access to the Java class
5005 library. In addition, BSF permits any Java application to be implemented in
5006 part (or dynamically extended) by a language that is embedded within it. This
5007 is achieved by providing an API that permits calling scripting language engines
5008 from within Java, as well as an object registry that exposes Java objects to
5009 these scripting language engines.")
5010 (license license:asl2.0)))
5012 (define-public java-commons-jxpath
5014 (name "java-commons-jxpath")
5018 (uri (string-append "mirror://apache/commons/jxpath/source/"
5019 "commons-jxpath-" version "-src.tar.gz"))
5022 "1rpgg31ayn9fwr4bfi2i1ij0npcg79ad2fv0w9hacvawsyc42cfs"))))
5023 (build-system ant-build-system)
5025 `(#:jar-name "commons-jxpath.jar"
5026 ;; tests require more dependencies, including mockrunner which depends on old software
5028 #:source-dir "src/java"))
5030 `(("servlet" ,java-classpathx-servletapi)
5031 ("java-jdom" ,java-jdom)
5032 ("java-commons-beanutils" ,java-commons-beanutils)))
5034 `(("java-junit" ,java-junit)))
5035 (home-page "http://commons.apache.org/jxpath/")
5036 (synopsis "Simple interpreter of an expression language called XPath.")
5037 (description "The org.apache.commons.jxpath package defines a simple
5038 interpreter of an expression language called XPath. JXPath applies XPath
5039 expressions to graphs of objects of all kinds: JavaBeans, Maps, Servlet
5040 contexts, DOM etc, including mixtures thereof.")
5041 (license license:asl2.0)))
5043 (define-public java-jsr250
5045 (name "java-jsr250")
5049 (uri (string-append "https://repo1.maven.org/maven2/"
5050 "javax/annotation/javax.annotation-api/"
5051 version "/javax.annotation-api-"
5052 version "-sources.jar"))
5055 "08clh8n4n9wfglf75qsqfjs6yf79f7x6hqx38cn856pksszv50kz"))))
5056 (build-system ant-build-system)
5058 `(#:tests? #f ; no tests included
5060 #:jar-name "jsr250.jar"))
5061 (home-page "https://jcp.org/en/jsr/detail?id=250")
5062 (synopsis "Security-related annotations")
5063 (description "This package provides annotations for security. It provides
5064 packages in the @code{javax.annotation} and @code{javax.annotation.security}
5066 ;; either cddl or gpl2 only, with classpath exception
5067 (license (list license:cddl1.0
5070 (define-public java-jsr305
5072 (name "java-jsr305")
5076 (uri (string-append "https://repo1.maven.org/maven2/"
5077 "com/google/code/findbugs/"
5078 "jsr305/" version "/jsr305-"
5079 version "-sources.jar"))
5082 "1rh6jin9v7jqpq3kf1swl868l8i94r636n03pzpsmgr8v0lh9j2n"))))
5083 (build-system ant-build-system)
5085 `(#:tests? #f ; no tests included
5086 #:jar-name "jsr305.jar"))
5087 (home-page "http://findbugs.sourceforge.net/")
5088 (synopsis "Annotations for the static analyzer called findbugs")
5089 (description "This package provides annotations for the findbugs package.
5090 It provides packages in the @code{javax.annotations} namespace.")
5091 (license license:asl2.0)))
5093 (define-public java-guava
5096 ;; This is the last release of Guava that can be built with Java 7.
5100 (uri (string-append "https://github.com/google/guava/"
5101 "releases/download/v" version
5102 "/guava-" version "-sources.jar"))
5105 "1gawrs5gi6j5hcfxdgpnfli75vb9pfi4sn09pnc8xacr669yajwr"))))
5106 (build-system ant-build-system)
5108 `(#:tests? #f ; no tests included
5109 #:jar-name "guava.jar"
5111 (modify-phases %standard-phases
5112 (add-after 'unpack 'trim-sources
5114 (with-directory-excursion "src/com/google/common"
5115 ;; Remove annotations to avoid extra dependencies:
5116 ;; * "j2objc" annotations are used when converting Java to
5118 ;; * "errorprone" annotations catch common Java mistakes at
5120 ;; * "IgnoreJRERequirement" is used for Android.
5121 (substitute* (find-files "." "\\.java$")
5122 (("import com.google.j2objc.*") "")
5123 (("import com.google.errorprone.annotation.*") "")
5124 (("import org.codehaus.mojo.animal_sniffer.*") "")
5125 (("@CanIgnoreReturnValue") "")
5128 (("@RetainedWith") "")
5130 (("@ForOverride") "")
5131 (("@J2ObjCIncompatible") "")
5132 (("@IgnoreJRERequirement") "")))
5135 `(("java-jsr305" ,java-jsr305)))
5136 (home-page "https://github.com/google/guava")
5137 (synopsis "Google core libraries for Java")
5138 (description "Guava is a set of core libraries that includes new
5139 collection types (such as multimap and multiset), immutable collections, a
5140 graph library, functional types, an in-memory cache, and APIs/utilities for
5141 concurrency, I/O, hashing, primitives, reflection, string processing, and much
5143 (license license:asl2.0)))
5145 ;; The java-commons-logging package provides adapters to many different
5146 ;; logging frameworks. To avoid an excessive dependency graph we try to build
5147 ;; it with only a minimal set of adapters.
5148 (define-public java-commons-logging-minimal
5150 (name "java-commons-logging-minimal")
5154 (uri (string-append "mirror://apache/commons/logging/source/"
5155 "commons-logging-" version "-src.tar.gz"))
5158 "10bwcy5w8d7y39n0krlwhnp8ds3kj5zhmzj0zxnkw0qdlsjmsrj9"))))
5159 (build-system ant-build-system)
5161 `(#:tests? #f ; avoid dependency on logging frameworks
5162 #:jar-name "commons-logging-minimal.jar"
5164 (modify-phases %standard-phases
5165 (add-after 'unpack 'delete-adapters-and-tests
5167 ;; Delete all adapters except for NoOpLog, SimpleLog, and
5168 ;; LogFactoryImpl. NoOpLog is required to build; LogFactoryImpl
5169 ;; is used by applications; SimpleLog is the only actually usable
5170 ;; implementation that does not depend on another logging
5174 (delete-file (string-append
5175 "src/main/java/org/apache/commons/logging/impl/" file)))
5176 (list "Jdk13LumberjackLogger.java"
5177 "WeakHashtable.java"
5179 "ServletContextCleaner.java"
5182 "LogKitLogger.java"))
5183 (delete-file-recursively "src/test")
5185 (home-page "http://commons.apache.org/logging/")
5186 (synopsis "Common API for logging implementations")
5187 (description "The Logging package is a thin bridge between different
5188 logging implementations. A library that uses the commons-logging API can be
5189 used with any logging implementation at runtime.")
5190 (license license:asl2.0)))
5192 ;; This is the last release of the 1.x series.
5193 (define-public java-mockito-1
5195 (name "java-mockito")
5199 (uri (string-append "http://repo1.maven.org/maven2/"
5200 "org/mockito/mockito-core/" version
5201 "/mockito-core-" version "-sources.jar"))
5204 "0vmiwnwpf83g2q7kj1rislmja8fpvqkixjhawh7nxnygx6pq11kc"))))
5205 (build-system ant-build-system)
5207 `(#:jar-name "mockito.jar"
5208 #:tests? #f ; no tests included
5209 ;; FIXME: patch-and-repack does not support jars, so we have to apply
5210 ;; patches in build phases.
5212 (modify-phases %standard-phases
5213 ;; Mockito was developed against a different version of hamcrest,
5214 ;; which does not require matcher implementations to provide an
5215 ;; implementation of the "describeMismatch" method. We add this
5216 ;; simple definition to pass the build with our version of hamcrest.
5217 (add-after 'unpack 'fix-hamcrest-build-error
5219 (substitute* "src/org/mockito/internal/matchers/LocalizedMatcher.java"
5220 (("public Matcher getActualMatcher\\(\\) .*" line)
5222 public void describeMismatch(Object item, Description description) {
5223 actualMatcher.describeMismatch(item, description);
5227 ;; Mockito bundles cglib. We have a cglib package, so let's use
5229 (add-after 'unpack 'use-system-libraries
5231 (with-directory-excursion "src/org/mockito/internal/creation/cglib"
5232 (substitute* '("CGLIBHacker.java"
5233 "CglibMockMaker.java"
5234 "ClassImposterizer.java"
5235 "DelegatingMockitoMethodProxy.java"
5236 "MethodInterceptorFilter.java"
5237 "MockitoNamingPolicy.java"
5238 "SerializableMockitoMethodProxy.java"
5239 "SerializableNoOp.java")
5240 (("import org.mockito.cglib") "import net.sf.cglib")))
5243 `(("java-junit" ,java-junit)
5244 ("java-objenesis" ,java-objenesis)
5245 ("java-cglib" ,java-cglib)
5246 ("java-hamcrest-core" ,java-hamcrest-core)))
5247 (home-page "http://mockito.org")
5248 (synopsis "Mockito is a mock library for Java")
5249 (description "Mockito is a mocking library for Java which lets you write
5250 tests with a clean and simple API. It generates mocks using reflection, and
5251 it records all mock invocations, including methods arguments.")
5252 (license license:asl2.0)))
5254 (define-public java-httpcomponents-httpcore
5256 (name "java-httpcomponents-httpcore")
5260 (uri (string-append "mirror://apache//httpcomponents/httpcore/"
5261 "source/httpcomponents-core-"
5262 version "-src.tar.gz"))
5265 "02bwcf38y4vgwq7kj2s6q7qrmma641r5lacivm16kgxvb2j6h1vy"))))
5266 (build-system ant-build-system)
5268 `(#:jar-name "httpcomponents-httpcore.jar"
5270 (modify-phases %standard-phases
5271 (add-after 'unpack 'chdir
5272 (lambda _ (chdir "httpcore") #t)))))
5274 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)
5275 ("java-commons-lang3" ,java-commons-lang3)))
5277 `(("java-junit" ,java-junit)
5278 ("java-mockito" ,java-mockito-1)))
5279 (home-page "https://hc.apache.org/httpcomponents-core-4.4.x/index.html")
5280 (synopsis "Low level HTTP transport components")
5281 (description "HttpCore is a set of low level HTTP transport components
5282 that can be used to build custom client and server side HTTP services with a
5283 minimal footprint. HttpCore supports two I/O models: blocking I/O model based
5284 on the classic Java I/O and non-blocking, event driven I/O model based on Java
5287 This package provides the blocking I/O model library.")
5288 (license license:asl2.0)))
5290 (define-public java-httpcomponents-httpcore-nio
5291 (package (inherit java-httpcomponents-httpcore)
5292 (name "java-httpcomponents-httpcore-nio")
5294 `(#:jar-name "httpcomponents-httpcore-nio.jar"
5296 (modify-phases %standard-phases
5297 (add-after 'unpack 'chdir
5298 (lambda _ (chdir "httpcore-nio") #t)))))
5300 `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
5301 ("java-hamcrest-core" ,java-hamcrest-core)
5302 ,@(package-inputs java-httpcomponents-httpcore)))
5303 (description "HttpCore is a set of low level HTTP transport components
5304 that can be used to build custom client and server side HTTP services with a
5305 minimal footprint. HttpCore supports two I/O models: blocking I/O model based
5306 on the classic Java I/O and non-blocking, event driven I/O model based on Java
5309 This package provides the non-blocking I/O model library based on Java
5312 (define-public java-httpcomponents-httpcore-ab
5313 (package (inherit java-httpcomponents-httpcore)
5314 (name "java-httpcomponents-httpcore-ab")
5316 `(#:jar-name "httpcomponents-httpcore-ab.jar"
5318 (modify-phases %standard-phases
5319 (add-after 'unpack 'chdir
5320 (lambda _ (chdir "httpcore-ab") #t)))))
5322 `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
5323 ("java-commons-cli" ,java-commons-cli)
5324 ("java-hamcrest-core" ,java-hamcrest-core)
5325 ,@(package-inputs java-httpcomponents-httpcore)))
5326 (synopsis "Apache HttpCore benchmarking tool")
5327 (description "This package provides the HttpCore benchmarking tool. It is
5328 an Apache AB clone based on HttpCore.")))
5330 (define-public java-httpcomponents-httpclient
5332 (name "java-httpcomponents-httpclient")
5336 (uri (string-append "mirror://apache/httpcomponents/httpclient/"
5337 "source/httpcomponents-client-"
5338 version "-src.tar.gz"))
5341 "1428399s7qy3cim5wc6f3ks4gl9nf9vkjpfmnlap3jflif7g2pj1"))))
5342 (build-system ant-build-system)
5344 `(#:jar-name "httpcomponents-httpclient.jar"
5346 (modify-phases %standard-phases
5347 (add-after 'unpack 'chdir
5348 (lambda _ (chdir "httpclient") #t)))))
5350 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)
5351 ("java-commons-codec" ,java-commons-codec)
5352 ("java-hamcrest-core" ,java-hamcrest-core)
5353 ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
5354 ("java-mockito" ,java-mockito-1)
5355 ("java-junit" ,java-junit)))
5356 (home-page "https://hc.apache.org/httpcomponents-client-ga/")
5357 (synopsis "HTTP client library for Java")
5358 (description "Although the @code{java.net} package provides basic
5359 functionality for accessing resources via HTTP, it doesn't provide the full
5360 flexibility or functionality needed by many applications. @code{HttpClient}
5361 seeks to fill this void by providing an efficient, up-to-date, and
5362 feature-rich package implementing the client side of the most recent HTTP
5363 standards and recommendations.")
5364 (license license:asl2.0)))
5366 (define-public java-httpcomponents-httpmime
5367 (package (inherit java-httpcomponents-httpclient)
5368 (name "java-httpcomponents-httpmime")
5370 `(#:jar-name "httpcomponents-httpmime.jar"
5372 (modify-phases %standard-phases
5373 (add-after 'unpack 'chdir
5374 (lambda _ (chdir "httpmime") #t)))))
5376 `(("java-httpcomponents-httpclient" ,java-httpcomponents-httpclient)
5377 ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
5378 ("java-junit" ,java-junit)
5379 ("java-hamcrest-core" ,java-hamcrest-core)))))
5381 (define-public java-commons-net
5383 (name "java-commons-net")
5387 (uri (string-append "mirror://apache/commons/net/source/"
5388 "commons-net-" version "-src.tar.gz"))
5391 "0n0cmnddk9qdqhjvka8pc6hd9mn2qi3166f1s6xk32h7rfy1adxr"))))
5392 (build-system ant-build-system)
5394 `(;; FIXME: MainTest.java tries to read "examples.properties" (which
5395 ;; should be "resources/examples/examples.properties"), but gets "null"
5398 #:jar-name "commons-net.jar"))
5400 `(("java-junit" ,java-junit)
5401 ("java-hamcrest-core" ,java-hamcrest-core)))
5402 (home-page "http://commons.apache.org/net/")
5403 (synopsis "Client library for many basic Internet protocols")
5404 (description "The Apache Commons Net library implements the client side of
5405 many basic Internet protocols. The purpose of the library is to provide
5406 fundamental protocol access, not higher-level abstractions.")
5407 (license license:asl2.0)))
5409 (define-public java-jsch
5415 (uri (string-append "mirror://sourceforge/jsch/jsch/"
5416 version "/jsch-" version ".zip"))
5419 "1lxyjwvmwa723wcf3bqn816hkvc03vz4xhbsi7bvfhrz2rpgcfq6"))))
5420 (build-system ant-build-system)
5422 `(#:build-target "dist"
5423 #:tests? #f ; no tests included
5425 (modify-phases %standard-phases
5426 (replace 'install (install-jars "dist")))))
5428 `(("unzip" ,unzip)))
5429 (home-page "http://www.jcraft.com/jsch/")
5430 (synopsis "Pure Java implementation of SSH2")
5431 (description "JSch is a pure Java implementation of SSH2. JSch allows you
5432 to connect to an SSH server and use port forwarding, X11 forwarding, file
5433 transfer, etc., and you can integrate its functionality into your own Java
5435 (license license:bsd-3)))
5437 (define-public java-commons-compress
5439 (name "java-commons-compress")
5443 (uri (string-append "mirror://apache/commons/compress/source/"
5444 "commons-compress-" version "-src.tar.gz"))
5447 "1vjqvavrn0babffn1kciz6v52ibwq2vwhzlb95hazis3lgllnxc8"))))
5448 (build-system ant-build-system)
5450 `(#:jar-name "commons-compress.jar"
5452 (modify-phases %standard-phases
5453 (add-after 'unpack 'delete-bad-tests
5455 (with-directory-excursion "src/test/java/org/apache/commons/compress/"
5456 ;; FIXME: These tests really should not fail. Maybe they are
5457 ;; indicative of problems with our Java packaging work.
5459 ;; This test fails with a null pointer exception.
5460 (delete-file "archivers/sevenz/SevenZOutputFileTest.java")
5461 ;; This test fails to open test resources.
5462 (delete-file "archivers/zip/ExplodeSupportTest.java")
5464 ;; FIXME: This test adds a dependency on powermock, which is hard to
5465 ;; package at this point.
5466 ;; https://github.com/powermock/powermock
5467 (delete-file "archivers/sevenz/SevenZNativeHeapTest.java"))
5470 `(("java-junit" ,java-junit)
5471 ("java-hamcrest-core" ,java-hamcrest-core)
5472 ("java-mockito" ,java-mockito-1)
5473 ("java-xz" ,java-xz)))
5474 (home-page "https://commons.apache.org/proper/commons-compress/")
5475 (synopsis "Java library for working with compressed files")
5476 (description "The Apache Commons Compress library defines an API for
5477 working with compressed files such as ar, cpio, Unix dump, tar, zip, gzip, XZ,
5478 Pack200, bzip2, 7z, arj, lzma, snappy, DEFLATE, lz4 and Z files.")
5479 (license license:asl2.0)))
5481 (define-public java-commons-csv
5483 (name "java-commons-csv")
5487 (uri (string-append "mirror://apache/commons/csv/source/"
5488 "commons-csv-" version "-src.tar.gz"))
5491 "1l89m0fm2s3xx3v3iynvangymfg2vlyngaj6fgsi457nmsw7m7ij"))))
5492 (build-system ant-build-system)
5494 `(#:jar-name "commons-csv.jar"
5495 #:source-dir "src/main/java"
5496 #:tests? #f)); FIXME: requires java-h2
5498 `(("java-hamcrest-core" ,java-hamcrest-core)
5499 ("java-commons-io" ,java-commons-io)
5500 ("java-commons-lang3" ,java-commons-lang3)
5501 ("junit" ,java-junit)))
5502 (home-page "https://commons.apache.org/proper/commons-csv/")
5503 (synopsis "Read and write CSV documents")
5504 (description "Commons CSV reads and writes files in variations of the Comma
5505 Separated Value (CSV) format. The most common CSV formats are predefined in the
5509 @item Microsoft Excel
5510 @item Informix UNLOAD
5511 @item Informix UNLOAD CSV
5517 Custom formats can be created using a fluent style API.")
5518 (license license:asl2.0)))
5520 (define-public java-osgi-annotation
5522 (name "java-osgi-annotation")
5526 (uri (string-append "https://repo1.maven.org/maven2/"
5527 "org/osgi/org.osgi.annotation/" version "/"
5528 "org.osgi.annotation-" version "-sources.jar"))
5531 "1q718mb7gqg726rh6pc2hcisn8v50nv35abbir0jypmffhiii85w"))))
5532 (build-system ant-build-system)
5534 `(#:tests? #f ; no tests
5535 #:jar-name "osgi-annotation.jar"))
5536 (home-page "https://www.osgi.org")
5537 (synopsis "Annotation module of OSGi framework")
5539 "OSGi, for Open Services Gateway initiative framework, is a module system
5540 and service platform for the Java programming language. This package contains
5541 the OSGi annotation module, providing additional services to help dynamic
5543 (license license:asl2.0)))
5545 (define-public java-osgi-core
5547 (name "java-osgi-core")
5551 (uri (string-append "https://repo1.maven.org/maven2/"
5552 "org/osgi/org.osgi.core/" version "/"
5553 "org.osgi.core-" version "-sources.jar"))
5556 "19bpf5jx32jq9789gyhin35q5v7flmw0p9mk7wbgqpxqfmxyiabv"))))
5557 (build-system ant-build-system)
5559 `(#:tests? #f ; no tests
5560 #:jar-name "osgi-core.jar"))
5562 `(("java-osgi-annotation" ,java-osgi-annotation)))
5563 (home-page "https://www.osgi.org")
5564 (synopsis "Core module of OSGi framework")
5566 "OSGi, for Open Services Gateway initiative framework, is a module system
5567 and service platform for the Java programming language. This package contains
5568 the OSGi Core module.")
5569 (license license:asl2.0)))
5571 (define-public java-osgi-service-event
5573 (name "java-osgi-service-event")
5577 (uri (string-append "https://repo1.maven.org/maven2/"
5578 "org/osgi/org.osgi.service.event/"
5579 version "/org.osgi.service.event-"
5580 version "-sources.jar"))
5583 "1nyhlgagwym75bycnjczwbnpymv2iw84zbhvvzk84g9q736i6qxm"))))
5584 (build-system ant-build-system)
5586 `(#:tests? #f ; no tests
5587 #:jar-name "osgi-service-event.jar"))
5589 `(("java-osgi-annotation" ,java-osgi-annotation)
5590 ("java-osgi-core" ,java-osgi-core)))
5591 (home-page "https://www.osgi.org")
5592 (synopsis "OSGi service event module")
5594 "OSGi, for Open Services Gateway initiative framework, is a module system
5595 and service platform for the Java programming language. This package contains
5596 the OSGi @code{org.osgi.service.event} module.")
5597 (license license:asl2.0)))
5599 (define-public java-eclipse-osgi
5601 (name "java-eclipse-osgi")
5605 (uri (string-append "https://repo1.maven.org/maven2/"
5606 "org/eclipse/platform/org.eclipse.osgi/"
5607 version "/org.eclipse.osgi-"
5608 version "-sources.jar"))
5611 "00cqc6lb29n0zv68b4l842vzkwawvbr7gshfdygsk8sicvcq2c7b"))))
5612 (build-system ant-build-system)
5614 `(#:tests? #f ; no tests included
5615 #:jar-name "eclipse-equinox-osgi.jar"))
5617 `(("java-osgi-annotation" ,java-osgi-annotation)))
5618 (home-page "http://www.eclipse.org/equinox/")
5619 (synopsis "Eclipse Equinox OSGi framework")
5620 (description "This package provides an implementation of the OSGi Core
5622 (license license:epl1.0)))
5624 (define-public java-eclipse-equinox-common
5626 (name "java-eclipse-equinox-common")
5627 (version "3.10.200")
5630 (uri (string-append "https://repo1.maven.org/maven2/"
5631 "org/eclipse/platform/org.eclipse.equinox.common/"
5632 version "/org.eclipse.equinox.common-"
5633 version "-sources.jar"))
5636 "1yn8ij6xsljlf35sr2l7wvyvc0ss4n1rv0ry5zkgb49dj4hyrqrj"))))
5637 (build-system ant-build-system)
5639 `(#:tests? #f ; no tests included
5640 #:jar-name "eclipse-equinox-common.jar"))
5642 `(("java-eclipse-osgi" ,java-eclipse-osgi)))
5643 (home-page "http://www.eclipse.org/equinox/")
5644 (synopsis "Common Eclipse runtime")
5645 (description "This package provides the common Eclipse runtime.")
5646 (license license:epl1.0)))
5648 (define-public java-eclipse-core-jobs
5650 (name "java-eclipse-core-jobs")
5654 (uri (string-append "https://repo1.maven.org/maven2/"
5655 "org/eclipse/platform/org.eclipse.core.jobs/"
5656 version "/org.eclipse.core.jobs-"
5657 version "-sources.jar"))
5660 "0395b8lh0km8vhzjnchvs1rii1qz48hyvb2wqfaq4yhklbwihq4b"))))
5661 (build-system ant-build-system)
5663 `(#:tests? #f ; no tests included
5664 #:jar-name "eclipse-core-jobs.jar"))
5666 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5667 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5668 (home-page "http://www.eclipse.org/equinox/")
5669 (synopsis "Eclipse jobs mechanism")
5670 (description "This package provides the Eclipse jobs mechanism.")
5671 (license license:epl1.0)))
5673 (define-public java-eclipse-equinox-registry
5675 (name "java-eclipse-equinox-registry")
5679 (uri (string-append "https://repo1.maven.org/maven2/"
5680 "org/eclipse/platform/org.eclipse.equinox.registry/"
5681 version "/org.eclipse.equinox.registry-"
5682 version "-sources.jar"))
5685 "1i9sgymh2fy5vdgk5y7s3qvrlbgh4l93ddqi3v4zmca7hwrlhf9k"))))
5686 (build-system ant-build-system)
5688 `(#:tests? #f ; no tests included
5689 #:jar-name "eclipse-equinox-registry.jar"))
5691 `(("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
5692 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5693 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5694 (home-page "http://www.eclipse.org/equinox/")
5695 (synopsis "Eclipse extension registry support")
5696 (description "This package provides support for the Eclipse extension
5698 (license license:epl1.0)))
5700 (define-public java-eclipse-equinox-app
5702 (name "java-eclipse-equinox-app")
5706 (uri (string-append "https://repo1.maven.org/maven2/"
5707 "org/eclipse/platform/org.eclipse.equinox.app/"
5708 version "/org.eclipse.equinox.app-"
5709 version "-sources.jar"))
5712 "0nhvbp93y203ar7y59gb0mz3w2d3jlqhr0c9hii9bcfpmr7imdab"))))
5713 (build-system ant-build-system)
5715 `(#:tests? #f ; no tests included
5716 #:jar-name "eclipse-equinox-app.jar"))
5718 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5719 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5720 ("java-eclipse-osgi" ,java-eclipse-osgi)
5721 ("java-osgi-service-event" ,java-osgi-service-event)))
5722 (home-page "http://www.eclipse.org/equinox/")
5723 (synopsis "Equinox application container")
5724 (description "This package provides the Equinox application container for
5726 (license license:epl1.0)))
5728 (define-public java-eclipse-equinox-preferences
5730 (name "java-eclipse-equinox-preferences")
5734 (uri (string-append "https://repo1.maven.org/maven2/"
5735 "org/eclipse/platform/org.eclipse.equinox.preferences/"
5736 version "/org.eclipse.equinox.preferences-"
5737 version "-sources.jar"))
5740 "0k7w6c141sqym4fy3af0qkwpy4pdh2vsjpjba6rp5fxyqa24v0a2"))))
5741 (build-system ant-build-system)
5743 `(#:tests? #f ; no tests included
5744 #:jar-name "eclipse-equinox-preferences.jar"))
5746 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5747 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5748 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5749 (home-page "http://www.eclipse.org/equinox/")
5750 (synopsis "Eclipse preferences mechanism")
5751 (description "This package provides the Eclipse preferences mechanism with
5752 the module @code{org.eclipse.equinox.preferences}.")
5753 (license license:epl1.0)))
5755 (define-public java-eclipse-core-contenttype
5757 (name "java-eclipse-core-contenttype")
5761 (uri (string-append "https://repo1.maven.org/maven2/"
5762 "org/eclipse/platform/org.eclipse.core.contenttype/"
5763 version "/org.eclipse.core.contenttype-"
5764 version "-sources.jar"))
5767 "1wcqcv7ijwv5rh748vz3x9pkmjl9w1r0k0026k56n8yjl4rrmspi"))))
5768 (build-system ant-build-system)
5770 `(#:tests? #f ; no tests included
5771 #:jar-name "eclipse-core-contenttype.jar"))
5773 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5774 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5775 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5776 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5777 (home-page "http://www.eclipse.org/")
5778 (synopsis "Eclipse content mechanism")
5779 (description "This package provides the Eclipse content mechanism in the
5780 @code{org.eclipse.core.contenttype} module.")
5781 (license license:epl1.0)))
5783 (define-public java-eclipse-core-runtime
5785 (name "java-eclipse-core-runtime")
5786 (version "3.15.100")
5789 (uri (string-append "https://repo1.maven.org/maven2/"
5790 "org/eclipse/platform/org.eclipse.core.runtime/"
5791 version "/org.eclipse.core.runtime-"
5792 version "-sources.jar"))
5795 "0l8xayacsbjvz5hypx2fv47vpw2n4dspamcfb3hx30x9hj8vmg7r"))))
5796 (build-system ant-build-system)
5798 `(#:tests? #f ; no tests included
5799 #:jar-name "eclipse-core-runtime.jar"))
5801 `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
5802 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
5803 ("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
5804 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5805 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5806 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5807 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5808 (home-page "https://www.eclipse.org/")
5809 (synopsis "Eclipse core runtime")
5810 (description "This package provides the Eclipse core runtime with the
5811 module @code{org.eclipse.core.runtime}.")
5812 (license license:epl1.0)))
5814 (define-public java-eclipse-core-filesystem
5816 (name "java-eclipse-core-filesystem")
5820 (uri (string-append "https://repo1.maven.org/maven2/"
5821 "org/eclipse/platform/org.eclipse.core.filesystem/"
5822 version "/org.eclipse.core.filesystem-"
5823 version "-sources.jar"))
5826 "0km1bhwjim4rfy3pkvjhvy31kgsyf2ncx0mlkmbf5n6g57pphdyj"))))
5827 (build-system ant-build-system)
5829 `(#:tests? #f ; no tests included
5830 #:jar-name "eclipse-core-filesystem.jar"))
5832 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5833 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5834 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5835 (home-page "https://www.eclipse.org/")
5836 (synopsis "Eclipse core file system")
5837 (description "This package provides the Eclipse core file system with the
5838 module @code{org.eclipse.core.filesystem}.")
5839 (license license:epl1.0)))
5841 (define-public java-eclipse-core-expressions
5843 (name "java-eclipse-core-expressions")
5847 (uri (string-append "https://repo1.maven.org/maven2/"
5848 "org/eclipse/platform/org.eclipse.core.expressions/"
5849 version "/org.eclipse.core.expressions-"
5850 version "-sources.jar"))
5853 "18bw2l875gmygvpagpgk9l24qzbdjia4ag12nw6fi8v8yaq4987f"))))
5854 (build-system ant-build-system)
5856 `(#:tests? #f ; no tests included
5857 #:jar-name "eclipse-core-expressions.jar"))
5859 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5860 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5861 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5862 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5863 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5864 (home-page "https://www.eclipse.org/")
5865 (synopsis "Eclipse core expression language")
5866 (description "This package provides the Eclipse core expression language
5867 with the @code{org.eclipse.core.expressions} module.")
5868 (license license:epl1.0)))
5870 (define-public java-eclipse-core-variables
5872 (name "java-eclipse-core-variables")
5876 (uri (string-append "https://repo1.maven.org/maven2/"
5877 "org/eclipse/platform/org.eclipse.core.variables/"
5878 version "/org.eclipse.core.variables-"
5879 version "-sources.jar"))
5882 "12dirh03zi4n5x5cj07vzrhkmnqy6h9q10h9j605pagmpmifyxmy"))))
5883 (build-system ant-build-system)
5885 `(#:tests? #f ; no tests included
5886 #:jar-name "eclipse-core-variables.jar"))
5888 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5889 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5890 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5891 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5892 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5893 (home-page "https://www.eclipse.org/platform")
5894 (synopsis "Eclipse core variables")
5895 (description "This package provides the Eclipse core variables module
5896 @code{org.eclipse.core.variables}.")
5897 (license license:epl1.0)))
5899 (define-public java-eclipse-ant-core
5901 (name "java-eclipse-ant-core")
5905 (uri (string-append "https://repo1.maven.org/maven2/"
5906 "org/eclipse/platform/org.eclipse.ant.core/"
5907 version "/org.eclipse.ant.core-"
5908 version "-sources.jar"))
5911 "11g3if794qjlk98mz9zch22rr56sd7z63vn4i7k2icr8cq5bfqg7"))))
5912 (build-system ant-build-system)
5914 `(#:tests? #f ; no tests included
5915 #:jar-name "eclipse-ant-core.jar"))
5917 `(("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
5918 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5919 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5920 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5921 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
5922 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5923 ("java-eclipse-core-variables" ,java-eclipse-core-variables)
5924 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5925 (home-page "https://www.eclipse.org/platform")
5926 (synopsis "Ant build tool core libraries")
5927 (description "This package provides the ant build tool core libraries with
5928 the module @code{org.eclipse.ant.core}.")
5929 (license license:epl1.0)))
5931 (define-public java-eclipse-core-resources
5933 (name "java-eclipse-core-resources")
5934 (version "3.13.200")
5937 (uri (string-append "https://repo1.maven.org/maven2/"
5938 "org/eclipse/platform/org.eclipse.core.resources/"
5939 version "/org.eclipse.core.resources-"
5940 version "-sources.jar"))
5943 "1sn3b6ky72hkvxcgf9b2jkpbdh3y8lbhi9xxwv1dsiddpkkq91hs"))))
5944 (build-system ant-build-system)
5946 `(#:tests? #f ; no tests included
5947 #:jar-name "eclipse-core-resources.jar"))
5949 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5950 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5951 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5952 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
5953 ("java-eclipse-core-expressions" ,java-eclipse-core-expressions)
5954 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
5955 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
5956 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5957 ("java-eclipse-ant-core" ,java-eclipse-ant-core)
5958 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5959 (home-page "https://www.eclipse.org/")
5960 (synopsis "Eclipse core resource management")
5961 (description "This package provides the Eclipse core resource management
5962 module @code{org.eclipse.core.resources}.")
5963 (license license:epl1.0)))
5965 (define-public java-eclipse-compare-core
5967 (name "java-eclipse-compare-core")
5971 (uri (string-append "https://repo1.maven.org/maven2/"
5972 "org/eclipse/platform/org.eclipse.compare.core/"
5973 version "/org.eclipse.compare.core-"
5974 version "-sources.jar"))
5977 "10g37r0pbiffyv2wk35c6g5lwzkdipkl0kkjp41v84dln46xm4dg"))))
5978 (build-system ant-build-system)
5980 `(#:tests? #f ; no tests included
5981 #:jar-name "eclipse-compare-core.jar"))
5983 `(("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5984 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5985 ("java-eclipse-osgi" ,java-eclipse-osgi)
5986 ("java-icu4j" ,java-icu4j)))
5987 (home-page "https://www.eclipse.org/")
5988 (synopsis "Eclipse core compare support")
5989 (description "This package provides the Eclipse core compare support
5990 module @code{org.eclipse.compare.core}.")
5991 (license license:epl1.0)))
5993 (define-public java-eclipse-team-core
5995 (name "java-eclipse-team-core")
5999 (uri (string-append "https://repo1.maven.org/maven2/"
6000 "org/eclipse/platform/org.eclipse.team.core/"
6001 version "/org.eclipse.team.core-"
6002 version "-sources.jar"))
6005 "02j2jzqgb26zx2d5ahxmvijw6j4r0la90zl5c3i65x6z19ciyam7"))))
6006 (build-system ant-build-system)
6008 `(#:tests? #f ; no tests included
6009 #:jar-name "eclipse-team-core.jar"))
6011 `(("java-eclipse-compare-core" ,java-eclipse-compare-core)
6012 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
6013 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
6014 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
6015 ("java-eclipse-core-resources" ,java-eclipse-core-resources)
6016 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
6017 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6018 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6019 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6020 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6021 (home-page "https://www.eclipse.org/platform")
6022 (synopsis "Eclipse team support core")
6023 (description "This package provides the Eclipse team support core module
6024 @code{org.eclipse.team.core}.")
6025 (license license:epl1.0)))
6027 (define-public java-eclipse-core-commands
6029 (name "java-eclipse-core-commands")
6033 (uri (string-append "https://repo1.maven.org/maven2/"
6034 "org/eclipse/platform/org.eclipse.core.commands/"
6035 version "/org.eclipse.core.commands-"
6036 version "-sources.jar"))
6039 "0yjn482qndcfrsq3jd6vnhcylp16420f5aqkrwr8spsprjigjcr9"))))
6040 (build-system ant-build-system)
6042 `(#:tests? #f ; no tests included
6043 #:jar-name "eclipse-core-commands.jar"))
6045 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)))
6046 (home-page "https://www.eclipse.org/platform")
6047 (synopsis "Eclipse core commands")
6048 (description "This package provides Eclipse core commands in the module
6049 @code{org.eclipse.core.commands}.")
6050 (license license:epl1.0)))
6052 (define-public java-eclipse-text
6054 (name "java-eclipse-text")
6058 (uri (string-append "https://repo1.maven.org/maven2/"
6059 "org/eclipse/platform/org.eclipse.text/"
6060 version "/org.eclipse.text-"
6061 version "-sources.jar"))
6064 "0scz70vzz5qs5caji9f5q01vkqnvip7dpri1q07l8wbbdcxn4cq1"))))
6065 (build-system ant-build-system)
6067 `(#:tests? #f ; no tests included
6068 #:jar-name "eclipse-text.jar"
6070 (modify-phases %standard-phases
6071 ;; When creating a new category we must make sure that the new list
6072 ;; matches List<Position>. By default it seems to be too generic
6073 ;; (ArrayList<Object>), so we specialize it to ArrayList<Position>.
6074 ;; Without this we get this error:
6076 ;; [javac] .../src/org/eclipse/jface/text/AbstractDocument.java:376:
6077 ;; error: method put in interface Map<K,V> cannot be applied to given types;
6078 ;; [javac] fPositions.put(category, new ArrayList<>());
6080 ;; [javac] required: String,List<Position>
6081 ;; [javac] found: String,ArrayList<Object>
6082 ;; [javac] reason: actual argument ArrayList<Object> cannot be converted
6083 ;; to List<Position> by method invocation conversion
6084 ;; [javac] where K,V are type-variables:
6085 ;; [javac] K extends Object declared in interface Map
6086 ;; [javac] V extends Object declared in interface Map
6088 ;; I don't know if this is a good fix. I suspect it is not, but it
6090 (add-after 'unpack 'fix-compilation-error
6092 (substitute* "src/org/eclipse/jface/text/AbstractDocument.java"
6093 (("Positions.put\\(category, new ArrayList<>\\(\\)\\);")
6094 "Positions.put(category, new ArrayList<Position>());"))
6097 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6098 ("java-eclipse-core-commands" ,java-eclipse-core-commands)
6099 ("java-icu4j" ,java-icu4j)))
6100 (home-page "http://www.eclipse.org/platform")
6101 (synopsis "Eclipse text library")
6102 (description "Platform Text is part of the Platform UI project and
6103 provides the basic building blocks for text and text editors within Eclipse
6104 and contributes the Eclipse default text editor.")
6105 (license license:epl1.0)))
6107 (define-public java-eclipse-jdt-core
6109 (name "java-eclipse-jdt-core")
6113 (uri (string-append "https://repo1.maven.org/maven2/"
6114 "org/eclipse/jdt/org.eclipse.jdt.core/"
6115 version "/org.eclipse.jdt.core-"
6116 version "-sources.jar"))
6119 "1g560yr9v2kzv34gc2m3ifpgnj7krcdd6h4gd4z83pwqacwkfz0k"))))
6120 (build-system ant-build-system)
6122 `(#:tests? #f ; no tests included
6123 #:jar-name "eclipse-jdt-core.jar"
6125 (modify-phases %standard-phases
6126 (add-after 'unpack 'move-sources
6128 (with-directory-excursion "src/jdtCompilerAdaptersrc/"
6129 (for-each (lambda (file)
6130 (install-file file (string-append "../" (dirname file))))
6131 (find-files "." ".*")))
6132 (delete-file-recursively "src/jdtCompilerAdaptersrc/")
6134 (add-before 'build 'copy-resources
6136 (with-directory-excursion "src"
6137 (for-each (lambda (file)
6138 (install-file file (string-append "../build/classes/" (dirname file))))
6139 (find-files "." ".*.(props|properties|rsc)")))
6142 `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
6143 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
6144 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
6145 ("java-eclipse-core-resources" ,java-eclipse-core-resources)
6146 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
6147 ("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
6148 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6149 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6150 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6151 ("java-eclipse-osgi" ,java-eclipse-osgi)
6152 ("java-eclipse-text" ,java-eclipse-text)))
6153 (home-page "https://www.eclipse.org/jdt")
6154 (synopsis "Java development tools core libraries")
6155 (description "This package provides the core libraries of the Eclipse Java
6156 development tools.")
6157 (license license:epl1.0)))
6159 (define-public java-eclipse-jdt-compiler-apt
6161 (name "java-eclipse-jdt-compiler-apt")
6165 (uri (string-append "https://repo1.maven.org/maven2/"
6166 "org/eclipse/jdt/org.eclipse.jdt.compiler.apt/"
6167 version "/org.eclipse.jdt.compiler.apt-"
6168 version "-sources.jar"))
6171 "1s285k9p2ixdqrknb40jbbvw682n9a7l5lqpn583a8pvlzg2l6r8"))))
6172 (build-system ant-build-system)
6174 `(#:tests? #f ; no tests included
6175 #:jar-name "eclipse-jdt-compiler-apt.jar"
6178 `(("java-eclipse-jdt-core" ,java-eclipse-jdt-core)))
6179 (home-page "https://www.eclipse.org/jdt/apt/")
6180 (synopsis "Annotation processing tool")
6181 (description "APT stands for Annotation Processing Tool. APT provides a
6182 means for generating files and compiling new Java classes based on annotations
6183 found in your source code.")
6184 (license license:epl2.0)))
6186 (define-public java-javax-mail
6188 (name "java-javax-mail")
6192 (uri (string-append "https://repo1.maven.org/maven2/"
6193 "com/sun/mail/javax.mail/"
6194 version "/javax.mail-"
6195 version "-sources.jar"))
6198 "0sdlfgsc2b5s89xv1261y8i0jijcja019k2x1c8ngfn582w4jly9"))))
6199 (build-system ant-build-system)
6201 `(#:tests? #f ; no tests
6202 #:jar-name "javax-mail.jar"))
6203 (home-page "https://javamail.java.net")
6204 (synopsis "Reference implementation of the JavaMail API")
6206 "This package provides versions of the JavaMail API implementation, IMAP,
6207 SMTP, and POP3 service providers, some examples, and documentation for the
6209 ;; GPLv2 only with "classpath exception".
6210 (license license:gpl2)))
6212 (define-public java-log4j-api
6214 (name "java-log4j-api")
6218 (uri (string-append "mirror://apache/logging/log4j/" version
6219 "/apache-log4j-" version "-src.tar.gz"))
6222 "0j5p9gik0jysh37nlrckqbky12isy95cpwg2gv5fas1rcdqbraxd"))))
6223 (build-system ant-build-system)
6225 `(#:tests? #f ; tests require unpackaged software
6226 #:jar-name "log4j-api.jar"
6228 (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out")
6231 (modify-phases %standard-phases
6232 (add-after 'unpack 'enter-dir
6233 (lambda _ (chdir "log4j-api") #t))
6234 ;; FIXME: The tests require additional software that has not been
6235 ;; packaged yet, such as
6236 ;; * org.apache.maven
6237 ;; * org.apache.felix
6238 (add-after 'enter-dir 'delete-tests
6239 (lambda _ (delete-file-recursively "src/test") #t)))))
6241 `(("java-osgi-core" ,java-osgi-core)
6242 ("java-hamcrest-core" ,java-hamcrest-core)
6243 ("java-junit" ,java-junit)))
6244 (home-page "http://logging.apache.org/log4j/2.x/")
6245 (synopsis "API module of the Log4j logging framework for Java")
6247 "This package provides the API module of the Log4j logging framework for
6249 (license license:asl2.0)))
6251 (define-public java-log4j-core
6253 (inherit java-log4j-api)
6254 (name "java-log4j-core")
6256 `(("java-osgi-core" ,java-osgi-core)
6257 ("java-hamcrest-core" ,java-hamcrest-core)
6258 ("java-log4j-api" ,java-log4j-api)
6259 ("java-mail" ,java-mail)
6260 ("java-jboss-jms-api-spec" ,java-jboss-jms-api-spec)
6261 ("java-lmax-disruptor" ,java-lmax-disruptor)
6262 ("java-kafka" ,java-kafka-clients)
6263 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
6264 ("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
6265 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
6266 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)
6267 ("java-fasterxml-jackson-dataformat-xml" ,java-fasterxml-jackson-dataformat-xml)
6268 ("java-fasterxml-jackson-dataformat-yaml" ,java-fasterxml-jackson-dataformat-yaml)
6269 ("java-commons-compress" ,java-commons-compress)
6270 ("java-commons-csv" ,java-commons-csv)
6271 ("java-jeromq" ,java-jeromq)
6272 ("java-junit" ,java-junit)))
6274 `(("hamcrest" ,java-hamcrest-all)
6275 ("java-commons-io" ,java-commons-io)
6276 ("java-commons-lang3" ,java-commons-lang3)
6277 ("slf4j" ,java-slf4j-api)))
6279 `(#:tests? #f ; tests require more dependencies
6280 #:test-dir "src/test"
6281 #:source-dir "src/main/java"
6282 #:jar-name "log4j-core.jar"
6285 (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out")
6288 (modify-phases %standard-phases
6289 (add-after 'unpack 'enter-dir
6290 (lambda _ (chdir "log4j-core") #t)))))
6291 (synopsis "Core component of the Log4j framework")
6292 (description "This package provides the core component of the Log4j
6293 logging framework for Java.")))
6295 (define-public java-log4j-1.2-api
6297 (inherit java-log4j-api)
6298 (name "java-log4j-1.2-api")
6300 `(#:jar-name "java-log4j-1.2-api.jar"
6301 #:source-dir "log4j-1.2-api/src/main/java"
6303 ;; Tests require maven-model (and other maven subprojects), which is a
6304 ;; cyclic dependency.
6307 `(("log4j-api" ,java-log4j-api)
6308 ("log4j-core" ,java-log4j-core)
6309 ("osgi-core" ,java-osgi-core)
6310 ("eclipse-osgi" ,java-eclipse-osgi)
6311 ("java-lmax-disruptor" ,java-lmax-disruptor)))))
6313 (define-public java-commons-cli
6315 (name "java-commons-cli")
6319 (uri (string-append "mirror://apache/commons/cli/source/"
6320 "commons-cli-" version "-src.tar.gz"))
6323 "05hgi2z01fqz374y719gl1dxzqvzci5af071zm7vxrjg9vczipm1"))))
6324 (build-system ant-build-system)
6327 `(#:jar-name "commons-cli.jar"))
6329 `(("java-junit" ,java-junit)
6330 ("java-hamcrest-core" ,java-hamcrest-core)))
6331 (home-page "http://commons.apache.org/cli/")
6332 (synopsis "Command line arguments and options parsing library")
6333 (description "The Apache Commons CLI library provides an API for parsing
6334 command line options passed to programs. It is also able to print help
6335 messages detailing the options available for a command line tool.
6337 Commons CLI supports different types of options:
6340 @item POSIX like options (ie. tar -zxvf foo.tar.gz)
6341 @item GNU like long options (ie. du --human-readable --max-depth=1)
6342 @item Java like properties (ie. java -Djava.awt.headless=true Foo)
6343 @item Short options with value attached (ie. gcc -O2 foo.c)
6344 @item long options with single hyphen (ie. ant -projecthelp)
6347 This is a part of the Apache Commons Project.")
6348 (license license:asl2.0)))
6350 (define-public java-commons-codec
6352 (name "java-commons-codec")
6356 (uri (string-append "mirror://apache/commons/codec/source/"
6357 "commons-codec-" version "-src.tar.gz"))
6360 "1w9qg30y4s0x8gnmr2fgj4lyplfn788jqxbcz27lf5kbr6n8xr65"))))
6361 (build-system ant-build-system)
6362 (outputs '("out" "doc"))
6364 `(#:test-target "test"
6366 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
6367 (junit (assoc-ref %build-inputs "java-junit")))
6368 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
6369 (string-append "-Dhamcrest.jar=" hamcrest
6370 "/share/java/hamcrest-core.jar")
6371 ;; Do not append version to jar.
6372 "-Dfinal.name=commons-codec"))
6374 (modify-phases %standard-phases
6375 (add-after 'build 'build-javadoc ant-build-javadoc)
6376 (replace 'install (install-jars "dist"))
6377 (add-after 'install 'install-doc (install-javadoc "dist/docs/api")))))
6379 `(("java-junit" ,java-junit)
6380 ("java-hamcrest-core" ,java-hamcrest-core)))
6381 (home-page "http://commons.apache.org/codec/")
6382 (synopsis "Common encoders and decoders such as Base64, Hex, Phonetic and URLs")
6383 (description "The codec package contains simple encoder and decoders for
6384 various formats such as Base64 and Hexadecimal. In addition to these widely
6385 used encoders and decoders, the codec package also maintains a collection of
6386 phonetic encoding utilities.
6388 This is a part of the Apache Commons Project.")
6389 (license license:asl2.0)))
6391 (define-public java-commons-daemon
6393 (name "java-commons-daemon")
6397 (uri (string-append "mirror://apache/commons/daemon/source/"
6398 "commons-daemon-" version "-src.tar.gz"))
6401 "141gkhfzv5v3pdhic6y4ardq2dhsa3v36j8wmmhy6f8mac48fp7n"))))
6402 (build-system ant-build-system)
6404 `(#:test-target "test"
6406 (modify-phases %standard-phases
6407 (add-after 'build 'build-javadoc ant-build-javadoc)
6408 (replace 'install (install-jars "dist"))
6409 (add-after 'install 'install-doc (install-javadoc "dist/docs/api")))))
6411 `(("java-junit" ,java-junit)))
6412 (home-page "http://commons.apache.org/daemon/")
6413 (synopsis "Library to launch Java applications as daemons")
6414 (description "The Daemon package from Apache Commons can be used to
6415 implement Java applications which can be launched as daemons. For example the
6416 program will be notified about a shutdown so that it can perform cleanup tasks
6417 before its process of execution is destroyed by the operation system.
6419 This package contains the Java library. You will also need the actual binary
6420 for your architecture which is provided by the jsvc package.
6422 This is a part of the Apache Commons Project.")
6423 (license license:asl2.0)))
6425 (define-public java-javaewah
6427 (name "java-javaewah")
6431 (uri (string-append "https://github.com/lemire/javaewah/"
6432 "archive/JavaEWAH-" version ".tar.gz"))
6435 "1n7j1r1h24wlhwv9zdcj6yqjrhma2ixwyzm15l5vrv6yqjs6753b"))))
6436 (build-system ant-build-system)
6437 (arguments `(#:jar-name "javaewah.jar"))
6439 `(("java-junit" ,java-junit)
6440 ("java-hamcrest-core" ,java-hamcrest-core)))
6441 (home-page "https://github.com/lemire/javaewah")
6442 (synopsis "Compressed alternative to the Java @code{BitSet} class")
6443 (description "This is a word-aligned compressed variant of the Java
6444 @code{Bitset} class. It provides both a 64-bit and a 32-bit RLE-like
6445 compression scheme. It can be used to implement bitmap indexes.
6447 The goal of word-aligned compression is not to achieve the best compression,
6448 but rather to improve query processing time. Hence, JavaEWAH tries to save CPU
6449 cycles, maybe at the expense of storage. However, the EWAH scheme is always
6450 more efficient storage-wise than an uncompressed bitmap (as implemented in the
6451 @code{BitSet} class by Sun).")
6452 ;; GPL2.0 derivates are explicitly allowed.
6453 (license license:asl2.0)))
6455 (define-public java-slf4j-api
6457 (name "java-slf4j-api")
6461 (uri (string-append "https://www.slf4j.org/dist/slf4j-"
6465 "13j51sgzmhhdrfa74gkal5zpip7r1440dh7zsi2c8bpb2zs1v8kb"))
6466 (modules '((guix build utils)))
6467 ;; Delete bundled jars.
6470 (for-each delete-file (find-files "." "\\.jar$"))
6472 (build-system ant-build-system)
6474 `(#:jar-name "slf4j-api.jar"
6475 #:source-dir "slf4j-api/src/main"
6476 #:test-dir "slf4j-api/src/test"
6478 (modify-phases %standard-phases
6479 (add-after 'build 'regenerate-jar
6481 ;; pom.xml ignores these files in the jar creation process. If we don't,
6482 ;; we get the error "This code should have never made it into slf4j-api.jar"
6483 (delete-file-recursively "build/classes/org/slf4j/impl")
6484 (invoke "jar" "-cf" "build/jar/slf4j-api.jar" "-C"
6485 "build/classes" ".")))
6486 (add-before 'check 'dont-test-abstract-classes
6488 ;; abstract classes are not meant to be run with junit
6489 (substitute* "build.xml"
6490 (("<include name=\"\\*\\*/\\*Test.java\" />")
6491 (string-append "<include name=\"**/*Test.java\" />"
6492 "<exclude name=\"**/MultithreadedInitializationTest"
6496 `(("java-junit" ,java-junit)
6497 ("java-hamcrest-core" ,java-hamcrest-core)))
6498 (home-page "https://www.slf4j.org/")
6499 (synopsis "Simple logging facade for Java")
6500 (description "The Simple Logging Facade for Java (SLF4J) serves as a
6501 simple facade or abstraction for various logging
6502 frameworks (e.g. @code{java.util.logging}, @code{logback}, @code{log4j})
6503 allowing the end user to plug in the desired logging framework at deployment
6505 (license license:expat)))
6507 (define java-slf4j-api-bootstrap
6509 (inherit java-slf4j-api)
6510 (name "java-slf4j-api-bootstrap")
6513 (substitute-keyword-arguments (package-arguments java-slf4j-api)
6514 ((#:tests? _ #f) #f)))))
6516 (define-public java-slf4j-simple
6518 (name "java-slf4j-simple")
6520 (source (package-source java-slf4j-api))
6521 (build-system ant-build-system)
6523 `(#:jar-name "slf4j-simple.jar"
6524 #:source-dir "slf4j-simple/src/main"
6525 #:test-dir "slf4j-simple/src/test"
6527 (modify-phases %standard-phases
6528 ;; The tests need some test classes from slf4j-api
6529 (add-before 'check 'build-slf4j-api-test-helpers
6531 ;; Add current dir to CLASSPATH ...
6533 (string-append (getcwd) ":" (getenv "CLASSPATH")))
6534 ;; ... and build test helper classes here:
6537 ,@(find-files "slf4j-api/src/test" ".*\\.java"))))))))
6539 `(("java-junit" ,java-junit)
6540 ("java-hamcrest-core" ,java-hamcrest-core)
6541 ("java-slf4j-api" ,java-slf4j-api)))
6542 (home-page "https://www.slf4j.org/")
6543 (synopsis "Simple implementation of simple logging facade for Java")
6544 (description "SLF4J binding for the Simple implementation, which outputs
6545 all events to System.err. Only messages of level INFO and higher are
6547 (license license:expat)))
6549 (define-public antlr2
6555 (uri (string-append "http://www.antlr2.org/download/antlr-"
6559 "1ffvcwdw73id0dk6pj2mlxjvbg0662qacx4ylayqcxgg381fnfl5"))
6560 (modules '((guix build utils)))
6563 (delete-file "antlr.jar")
6564 (substitute* "lib/cpp/antlr/CharScanner.hpp"
6568 "#define EOF (-1)\n"
6569 "#include <strings.h>")))
6570 (substitute* "configure"
6573 (build-system gnu-build-system)
6575 `(#:tests? #f ; no test target
6576 #:imported-modules ((guix build ant-build-system)
6577 (guix build syscalls)
6578 ,@%gnu-build-system-modules)
6579 #:modules (((guix build ant-build-system) #:prefix ant:)
6580 (guix build gnu-build-system)
6583 (modify-phases %standard-phases
6584 (add-after 'install 'strip-jar-timestamps
6585 (assoc-ref ant:%standard-phases 'strip-jar-timestamps))
6586 (add-before 'configure 'fix-timestamp
6588 (substitute* "configure"
6589 (("^TIMESTAMP.*") "TIMESTAMP=19700101\n"))
6591 (add-after 'configure 'fix-bin-ls
6593 (substitute* (find-files "." "Makefile")
6599 ("java" ,icedtea "jdk")))
6601 `(("java" ,icedtea)))
6602 (home-page "http://www.antlr2.org")
6603 (synopsis "Framework for constructing recognizers, compilers, and translators")
6604 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
6605 is a language tool that provides a framework for constructing recognizers,
6606 compilers, and translators from grammatical descriptions containing Java, C#,
6607 C++, or Python actions. ANTLR provides excellent support for tree construction,
6608 tree walking, and translation.")
6609 (license license:public-domain)))
6611 (define-public java-stringtemplate-3
6613 (name "java-stringtemplate")
6617 (uri (string-append "https://github.com/antlr/website-st4/raw/"
6618 "gh-pages/download/stringtemplate-"
6622 "086yj68np1vqhkj7483diz3km6s6y4gmwqswa7524a0ca6vxn2is"))))
6623 (build-system ant-build-system)
6625 `(#:jar-name (string-append ,name "-" ,version ".jar")
6627 #:modules ((guix build ant-build-system)
6631 (modify-phases %standard-phases
6632 (add-before 'check 'fix-tests
6634 (substitute* "build.xml"
6635 (("\\$\\{test.home\\}/java")
6636 "${test.home}/org"))
6638 (add-before 'build 'generate-grammar
6640 (with-directory-excursion "src/org/antlr/stringtemplate/language/"
6641 (for-each (lambda (file)
6642 (format #t "~a\n" file)
6643 (invoke "antlr" file))
6644 '("template.g" "angle.bracket.template.g" "action.g"
6645 "eval.g" "group.g" "interface.g")))
6649 ("java-junit" ,java-junit)))
6650 (home-page "http://www.stringtemplate.org")
6651 (synopsis "Template engine to generate formatted text output")
6652 (description "StringTemplate is a java template engine (with ports for C#,
6653 Objective-C, JavaScript, Scala) for generating source code, web pages, emails,
6654 or any other formatted text output. StringTemplate is particularly good at
6655 code generators, multiple site skins, and internationalization / localization.
6656 StringTemplate also powers ANTLR.")
6657 (license license:bsd-3)))
6659 ;; antlr3 is partially written using antlr3 grammar files. It also depends on
6660 ;; ST4 (stringtemplate4), which is also partially written using antlr3 grammar
6661 ;; files and uses antlr3 at runtime. The latest version requires a recent version
6662 ;; of antlr3 at runtime.
6663 ;; Fortunately, ST4 4.0.6 can be built with an older antlr3, and we use antlr3.3.
6664 ;; This version of ST4 is sufficient for the latest antlr3.
6665 ;; We use ST4 4.0.6 to build a boostrap antlr3 (latest version), and build
6666 ;; the latest ST4 with it. Then we build our final antlr3 that will be linked
6667 ;; against the latest ST4.
6668 ;; antlr3.3 still depends on antlr3 to generate some files, so we use an
6669 ;; even older version, antlr3.1, to generate them. Fortunately antlr3.1 uses
6670 ;; only grammar files with the antlr2 syntax.
6671 ;; So we build antlr3.1 -> antlr3.3 -> ST4.0.6 -> antlr3-bootstrap -> ST4 -> antlr3.
6673 (define-public java-stringtemplate
6674 (package (inherit java-stringtemplate-3)
6675 (name "java-stringtemplate")
6679 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/"
6681 (file-name (string-append name "-" version ".tar.gz"))
6684 "1pri8hqa95rfdkjy55icl5q1m09zwp5k67ib14abas39s4v3w087"))))
6685 (build-system ant-build-system)
6687 `(#:jar-name (string-append ,name "-" ,version ".jar")
6688 #:tests? #f ; FIXME: tests fail for unknown reasons
6690 #:modules ((guix build ant-build-system)
6694 (modify-phases %standard-phases
6695 (add-before 'check 'fix-test-target
6697 (substitute* "build.xml"
6698 (("\\$\\{test.home\\}/java") "${test.home}/")
6699 (("\\*Test.java") "Test*.java"))
6701 (add-before 'build 'generate-grammar
6703 (with-directory-excursion "src/org/stringtemplate/v4/compiler/"
6704 (for-each (lambda (file)
6705 (format #t "~a\n" file)
6706 (invoke "antlr3" file))
6707 '("STParser.g" "Group.g" "CodeGenerator.g")))
6710 `(("antlr3" ,antlr3-bootstrap)
6712 ("java-stringtemplate" ,java-stringtemplate-3)
6713 ("java-junit" ,java-junit)))))
6715 (define java-stringtemplate-4.0.6
6716 (package (inherit java-stringtemplate)
6717 (name "java-stringtemplate")
6721 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/ST-"
6723 (file-name (string-append name "-" version ".tar.gz"))
6726 "0hjmh1ahdsh3w825i67mli9l4nncc4l6hdbf9ma91jvlj590sljp"))))
6728 `(("antlr3" ,antlr3-3.3)
6730 ("java-stringtemplate" ,java-stringtemplate-3)))))
6732 (define-public antlr3
6738 (uri (string-append "https://github.com/antlr/antlr3/archive/"
6740 (file-name (string-append name "-" version ".tar.gz"))
6743 "0218v683081lg54z9hvjxinhxd4dqp870jx6n39gslm0bkyi4vd6"))))
6744 (build-system ant-build-system)
6746 `(#:jar-name (string-append ,name "-" ,version ".jar")
6747 #:source-dir "tool/src/main/java:runtime/Java/src/main/java:tool/src/main/antlr3"
6750 (modify-phases %standard-phases
6751 (add-after 'install 'bin-install
6752 (lambda* (#:key inputs outputs #:allow-other-keys)
6753 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
6754 (bin (string-append (assoc-ref outputs "out") "/bin")))
6756 (with-output-to-file (string-append bin "/antlr3")
6759 (string-append "#!" (which "sh") "\n"
6760 "java -cp " jar "/" ,name "-" ,version ".jar:"
6762 (find-files (assoc-ref inputs "stringtemplate")
6766 (find-files (assoc-ref inputs "stringtemplate4")
6770 (find-files (string-append
6771 (assoc-ref inputs "antlr")
6774 " org.antlr.Tool $*"))))
6775 (chmod (string-append bin "/antlr3") #o755))
6777 (add-before 'build 'generate-grammar
6779 (chdir "tool/src/main/antlr3/org/antlr/grammar/v3/")
6780 (for-each (lambda (file)
6783 (invoke "antlr3" file))
6784 '("ANTLR.g" "ANTLRTreePrinter.g" "ActionAnalysis.g"
6785 "AssignTokenTypesWalker.g"
6786 "ActionTranslator.g" "TreeToNFAConverter.g"
6787 "ANTLRv3.g" "ANTLRv3Tree.g" "LeftRecursiveRuleWalker.g"
6788 "CodeGenTreeWalker.g" "DefineGrammarItemsWalker.g"))
6789 (substitute* "ANTLRParser.java"
6790 (("public Object getTree") "public GrammarAST getTree"))
6791 (substitute* "ANTLRv3Parser.java"
6792 (("public Object getTree") "public CommonTree getTree"))
6793 (chdir "../../../../../java")
6794 (substitute* "org/antlr/tool/LeftRecursiveRuleAnalyzer.java"
6795 (("import org.antlr.grammar.v3.\\*;") "import org.antlr.grammar.v3.*;
6796 import org.antlr.grammar.v3.ANTLRTreePrinter;"))
6797 (substitute* "org/antlr/tool/ErrorManager.java"
6798 (("case NO_SUCH_ATTRIBUTE_PASS_THROUGH:") ""))
6799 (chdir "../../../..")
6801 (add-before 'build 'fix-build-xml
6803 (substitute* "build.xml"
6804 (("<exec") "<copy todir=\"${classes.dir}\">
6805 <fileset dir=\"tool/src/main/resources\">
6806 <include name=\"**/*.stg\"/>
6807 <include name=\"**/*.st\"/>
6808 <include name=\"**/*.sti\"/>
6809 <include name=\"**/STLexer.tokens\"/>
6815 ("antlr3" ,antlr3-bootstrap)))
6817 `(("junit" ,java-junit)
6818 ("stringtemplate" ,java-stringtemplate-3)
6819 ("stringtemplate4" ,java-stringtemplate)))
6821 `(("stringtemplate" ,java-stringtemplate-3)
6823 ("stringtemplate4" ,java-stringtemplate-4.0.6)))
6824 (home-page "http://www.antlr3.org")
6825 (synopsis "Framework for constructing recognizers, compilers, and translators")
6826 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
6827 is a language tool that provides a framework for constructing recognizers,
6828 compilers, and translators from grammatical descriptions containing Java, C#,
6829 C++, or Python actions. ANTLR provides excellent support for tree construction,
6830 tree walking, and translation.")
6831 (license license:bsd-3)))
6833 (define antlr3-bootstrap
6836 (name "antlr3-bootstrap")
6839 ("antlr3" ,antlr3-3.3)))
6841 `(("junit" ,java-junit)))))
6850 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
6851 "gh-pages/download/antlr-"
6855 "0qgg5vgsm4l1d6dj9pfbaa25dpv2ry2gny8ajy4vvgvfklw97b3m"))
6857 (search-patches "antlr3-3_3-fix-java8-compilation.patch"))))
6859 `(#:jar-name (string-append ,name "-" ,version ".jar")
6860 #:source-dir (string-join '("tool/src/main/java"
6861 "runtime/Java/src/main/java"
6862 "tool/src/main/antlr2"
6863 "tool/src/main/antlr3")
6865 #:tests? #f ; FIXME: tests seem to require maven plugin
6866 #:modules ((guix build ant-build-system)
6870 (modify-phases %standard-phases
6871 (add-after 'install 'bin-install
6872 (lambda* (#:key inputs outputs #:allow-other-keys)
6873 (let* ((out (assoc-ref outputs "out"))
6874 (jar (string-append out "/share/java"))
6875 (bin (string-append out "/bin")))
6877 (with-output-to-file (string-append bin "/antlr3")
6881 "#!" (which "sh") "\n"
6882 "java -cp " jar "/antlr3-3.3.jar:"
6884 (append (find-files (assoc-ref inputs "java-stringtemplate")
6886 (find-files (string-append (assoc-ref inputs "antlr")
6890 " org.antlr.Tool $*"))))
6891 (chmod (string-append bin "/antlr3") #o755)
6893 (add-before 'build 'generate-grammar
6895 (substitute* "tool/src/main/java/org/antlr/tool/Grammar.java"
6896 (("import org.antlr.grammar.v2.\\*;")
6897 "import org.antlr.grammar.v2.*;\n
6898 import org.antlr.grammar.v2.TreeToNFAConverter;\n
6899 import org.antlr.grammar.v2.DefineGrammarItemsWalker;\n
6900 import org.antlr.grammar.v2.ANTLRTreePrinter;"))
6901 (with-directory-excursion "tool/src/main/antlr2/org/antlr/grammar/v2/"
6902 (for-each (lambda (file)
6903 (format #t "~a\n" file)
6904 (invoke "antlr" file))
6905 '("antlr.g" "antlr.print.g" "assign.types.g"
6906 "buildnfa.g" "codegen.g" "define.g")))
6907 (with-directory-excursion "tool/src/main/antlr3/org/antlr/grammar/v3/"
6908 (for-each (lambda (file)
6909 (format #t "~a\n" file)
6910 (invoke "antlr3" file))
6911 '("ActionAnalysis.g" "ActionTranslator.g" "ANTLRv3.g"
6914 (add-before 'build 'fix-build-xml
6916 (substitute* "build.xml"
6917 (("<exec") "<copy todir=\"${classes.dir}\">
6918 <fileset dir=\"tool/src/main/resources\">
6919 <include name=\"**/*.stg\"/>
6920 <include name=\"**/*.st\"/>
6921 <include name=\"**/*.sti\"/>
6922 <include name=\"**/STLexer.tokens\"/>
6928 ("antlr3" ,antlr3-3.1)))
6930 `(("junit" ,java-junit)))
6932 `(("java-stringtemplate" ,java-stringtemplate-3)
6934 ("antlr3" ,antlr3-3.1)))))
6942 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
6943 "gh-pages/download/antlr-"
6947 "0sfimc9cpbgrihz4giyygc8afgpma2c93yqpwb951giriri6x66z"))
6949 (search-patches "antlr3-3_1-fix-java8-compilation.patch"))))
6951 `(#:jar-name (string-append "antlr3-" ,version ".jar")
6952 #:source-dir "src:runtime/Java/src"
6955 (modify-phases %standard-phases
6956 (add-after 'install 'bin-install
6957 (lambda* (#:key inputs outputs #:allow-other-keys)
6958 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
6959 (bin (string-append (assoc-ref outputs "out") "/bin")))
6961 (with-output-to-file (string-append bin "/antlr3")
6964 (string-append "#!" (which "sh") "\n"
6965 "java -cp " jar "/antlr3-3.1.jar:"
6967 (find-files (assoc-ref inputs "stringtemplate")
6971 (find-files (string-append
6972 (assoc-ref inputs "antlr")
6975 " org.antlr.Tool $*"))))
6976 (chmod (string-append bin "/antlr3") #o755))
6978 (add-before 'build 'generate-grammar
6980 (let ((dir "src/org/antlr/tool/"))
6981 (for-each (lambda (file)
6984 (invoke "antlr" "-o" dir (string-append dir file)))
6985 '("antlr.g" "antlr.print.g" "assign.types.g"
6986 "buildnfa.g" "define.g")))
6987 (format #t "codegen.g\n")
6988 (invoke "antlr" "-o" "src/org/antlr/codegen"
6989 "src/org/antlr/codegen/codegen.g")
6991 (add-before 'build 'fix-build-xml
6993 (substitute* "build.xml"
6994 (("<exec") "<copy todir=\"${classes.dir}\">
6995 <fileset dir=\"src\">
6996 <include name=\"**/*.stg\"/>
6997 <include name=\"**/*.st\"/>
6998 <include name=\"**/*.sti\"/>
6999 <include name=\"**/STLexer.tokens\"/>
7004 `(("antlr" ,antlr2)))
7006 `(("junit" ,java-junit)))
7008 `(("stringtemplate" ,java-stringtemplate-3)))))
7010 (define-public java-commons-cli-1.2
7011 ;; This is a bootstrap dependency for Maven2.
7013 (inherit java-commons-cli)
7017 (uri (string-append "mirror://apache/commons/cli/source/"
7018 "commons-cli-" version "-src.tar.gz"))
7021 "0rvfgzgv2pc1m091dfj3ih9ddsjjppr1f1wf0qmc3bk6b1kwv2dm"))))
7023 `(#:jar-name "commons-cli.jar"
7025 (modify-phases %standard-phases
7026 (add-before 'check 'fix-build-xml
7027 (lambda* (#:key inputs #:allow-other-keys)
7028 (substitute* "build.xml"
7029 (("dir=\"\\$\\{test.home\\}/java\"")
7030 "dir=\"${test.home}\""))
7033 `(("java-junit" ,java-junit)))))
7035 (define-public java-microemulator-cldc
7037 (name "java-microemulator-cldc")
7041 (uri (string-append "https://github.com/barteo/microemu/archive/"
7043 (string-map (lambda (c) (if (char=? c #\.) #\_ c))
7046 (file-name (string-append name "-" version ".tar.gz"))
7049 "1x1apmz38gkppxnwnygwmi12j54v4p258v8ddzn6dldkk7vak1ll"))))
7050 (build-system ant-build-system)
7052 `(#:jar-name "microemulator-cldc.jar"
7053 #:source-dir "microemu-cldc/src/main/java"
7054 #:tests? #f)); Requires even older software
7055 (home-page "https://github.com/barteo/microemu")
7056 (synopsis "J2ME CLDC emulator")
7057 (description "Microemulator is a Java 2 Micro Edition (J2ME) CLDC/MIDP
7058 Emulator. It allows to demonstrate MIDlet based applications in web browser
7059 applet and can be run as a standalone java application.")
7060 (license (list license:asl2.0
7062 license:lgpl2.1+))))
7064 (define-public java-datanucleus-javax-persistence
7066 (name "java-datanucleus-javax-persistence")
7070 (uri (string-append "https://github.com/datanucleus/"
7071 "javax.persistence/archive/javax.persistence-"
7072 version "-release.tar.gz"))
7075 "11jx0fjwgc2hhbqqgdd6m1pf2fplf9vslppygax0y1z5csnqjhpx"))))
7076 (build-system ant-build-system)
7078 `(#:jar-name "java-datanucleus-javax-persistence.jar"
7080 #:source-dir "src/main/java"
7081 #:tests? #f)); no tests
7082 (home-page "https://github.com/datanucleus/javax.persistence")
7083 (synopsis "JPA API")
7084 (description "This package contains a clean definition of JPA API intended
7085 for use with DataNucleus JPA since the JCP haven't provided an official JPA API
7086 jar. See @url{http://java.net/projects/jpa-spec/downloads} for the specification
7087 used to generate this API.")
7088 (license (list license:edl1.0 license:epl1.0))))
7090 (define-public java-osgi-cmpn
7092 (name "java-osgi-cmpn")
7096 (uri (string-append "http://central.maven.org/maven2/"
7097 "org/osgi/osgi.cmpn/" version "/osgi.cmpn-"
7098 version "-sources.jar"))
7101 "1lmb6xyrmkqdhv1kayf0514rlwq6ypvs4m44ibrck3snp8241wys"))))
7102 (build-system ant-build-system)
7104 `(#:jar-name "osgi-cmpn.jar"
7105 #:tests? #f)); no tests
7107 `(("annotation" ,java-osgi-annotation)
7108 ("core" ,java-osgi-core)
7109 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
7110 ("microemulator" ,java-microemulator-cldc)
7111 ("servlet" ,java-classpathx-servletapi)))
7112 (home-page "https://www.osgi.org")
7113 (synopsis "Compendium specification module of OSGi framework")
7115 "OSGi, for Open Services Gateway initiative framework, is a module system
7116 and service platform for the Java programming language. This package contains
7117 the compendium specification module, providing interfaces and classes for use
7118 in compiling bundles.")
7119 (license license:asl2.0)))
7121 (define-public java-osgi-service-component-annotations
7123 (name "java-osgi-service-component-annotations")
7127 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7128 "org.osgi.service.component.annotations/"
7129 version "/org.osgi.service.component.annotations-"
7130 version "-sources.jar"))
7133 "15rq9cmp4fpn74q44m4j35qsqmjf5lx3hcrk6pzvbhc08igic2f0"))))
7134 (build-system ant-build-system)
7136 `(#:jar-name "osgi-service-component-annotations.jar"
7137 #:tests? #f)); no tests
7139 `(("annotation" ,java-osgi-annotation)))
7140 (home-page "https://www.osgi.org")
7141 (synopsis "Support annotations for osgi-service-component")
7143 "OSGi, for Open Services Gateway initiative framework, is a module system
7144 and service platform for the Java programming language. This package contains
7145 the support annotations for osgi-service-component.")
7146 (license license:asl2.0)))
7148 (define-public java-osgi-dto
7150 (name "java-osgi-dto")
7154 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7155 "org.osgi.dto/" version "/org.osgi.dto-"
7156 version "-sources.jar"))
7159 "0f4bqjzadn0hwk6sd3h5gvbyfp3yci1s6r0v770cc15p0pg627yr"))))
7160 (build-system ant-build-system)
7162 `(#:jar-name "osgi-dto.jar"
7163 #:tests? #f)); no tests
7165 `(("annotation" ,java-osgi-annotation)))
7166 (home-page "https://www.osgi.org")
7167 (synopsis "Data Transfer Objects")
7169 "OSGi, for Open Services Gateway initiative framework, is a module system
7170 and service platform for the Java programming language. This package contains
7171 the Data Transfer Objects. It is easily serializable having only public fields
7172 of primitive types and their wrapper classes, Strings, and DTOs. List, Set,
7173 Map and array aggregates may also be used. The aggregates must only hold
7174 objects of the listed types or aggregates.")
7175 (license license:asl2.0)))
7177 (define-public java-osgi-resource
7179 (name "java-osgi-resource")
7183 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7184 "org.osgi.resource/"
7185 version "/org.osgi.resource-"
7186 version "-sources.jar"))
7189 "0hi0fsc5v99q22bd7lrkvpz1y0ds4w9arjldpwsrcpqvz2js7q2d"))))
7190 (build-system ant-build-system)
7192 `(#:jar-name "osgi-resource.jar"
7193 #:tests? #f)); no tests
7195 `(("annotation" ,java-osgi-annotation)
7196 ("dto" ,java-osgi-dto)))
7197 (home-page "https://www.osgi.org")
7198 (synopsis "OSGI Resource")
7200 "OSGi, for Open Services Gateway initiative framework, is a module system
7201 and service platform for the Java programming language. This package contains
7202 the definition of common types in osgi packages.")
7203 (license license:asl2.0)))
7205 (define-public java-osgi-namespace-contract
7207 (name "java-osgi-namespace-contract")
7211 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7212 "org.osgi.namespace.contract/"
7213 version "/org.osgi.namespace.contract-"
7214 version "-sources.jar"))
7217 "1iz4f2i0fvqrlq90ki9nfzcfpvy2av434ri25bglywqssx8mmp36"))))
7218 (build-system ant-build-system)
7220 `(("resource" ,java-osgi-resource)
7221 ("annotation" ,java-osgi-annotation)))
7223 `(#:jar-name "osgi-namespace-contract.jar"
7224 #:tests? #f)); no tests
7225 (home-page "https://www.osgi.org")
7226 (synopsis "Contract Capability and Requirement Namespace")
7228 "OSGi, for Open Services Gateway initiative framework, is a module system
7229 and service platform for the Java programming language. This package contains
7230 the names for the attributes and directives for a namespace with contracts.")
7231 (license license:asl2.0)))
7233 (define-public java-osgi-namespace-extender
7235 (name "java-osgi-namespace-extender")
7239 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7240 "org.osgi.namespace.extender/"
7241 version "/org.osgi.namespace.extender-"
7242 version "-sources.jar"))
7245 "0jgqiak2i05qv6j3gd33xlaifzzc0ylxxk376v2x0apfg3vvixmz"))))
7246 (build-system ant-build-system)
7248 `(("resource" ,java-osgi-resource)
7249 ("annotation" ,java-osgi-annotation)))
7251 `(#:jar-name "osgi-namespace-extendent.jar"
7252 #:tests? #f)); no tests
7253 (home-page "https://www.osgi.org")
7254 (synopsis "Extender Capability and Requirement Namespace")
7256 "OSGi, for Open Services Gateway initiative framework, is a module system
7257 and service platform for the Java programming language. This package contains
7258 the names for the attributes and directives for an extender namespace.")
7259 (license license:asl2.0)))
7261 (define-public java-osgi-namespace-service
7263 (name "java-osgi-namespace-service")
7267 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7268 "org.osgi.namespace.service/"
7269 version "/org.osgi.namespace.service-"
7270 version "-sources.jar"))
7273 "0qmw8n2449nkmm56d1znz9zhazb6ya3vsimd5bf5jg23zzhgl8c8"))))
7274 (build-system ant-build-system)
7276 `(("resource" ,java-osgi-resource)
7277 ("annotation" ,java-osgi-annotation)))
7279 `(#:jar-name "osgi-namespace-service.jar"
7280 #:tests? #f)); no tests
7281 (home-page "https://www.osgi.org")
7282 (synopsis "Service Capability and Requirement Namespace")
7284 "OSGi, for Open Services Gateway initiative framework, is a module system
7285 and service platform for the Java programming language. This package contains
7286 the names for the attributes and directives for a service namespace.")
7287 (license license:asl2.0)))
7289 (define-public java-osgi-util-function
7291 (name "java-osgi-util-function")
7295 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7296 "org.osgi.util.function/"
7297 version "/org.osgi.util.function-"
7298 version "-sources.jar"))
7301 "04l7j3hwmmj28w23m7paca0afzncs42j2mdr3liqq8kvp548sc6x"))))
7302 (build-system ant-build-system)
7304 `(#:jar-name "osgi-util-function.jar"
7305 #:tests? #f)); no tests
7307 `(("annotation" ,java-osgi-annotation)))
7308 (home-page "https://www.osgi.org")
7309 (synopsis "OSGI Util Function")
7311 "OSGi, for Open Services Gateway initiative framework, is a module system
7312 and service platform for the Java programming language. This package contains
7313 an interface for a function that accepts a single argument and produces a result.")
7314 (license license:asl2.0)))
7316 (define-public java-osgi-util-promise
7318 (name "java-osgi-util-promise")
7322 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7323 "org.osgi.util.promise/"
7324 version "/org.osgi.util.promise-"
7325 version "-sources.jar"))
7328 "0y34dwiflg1c4ahvkswpf9z02xph2sr9fm04ia5493x3lshpw22c"))))
7329 (build-system ant-build-system)
7331 `(#:jar-name "osgi-util-promise.jar"
7332 #:tests? #f)); no tests
7334 `(("annotation" ,java-osgi-annotation)
7335 ("function" ,java-osgi-util-function)))
7336 (home-page "https://www.osgi.org")
7337 (synopsis "Promise of a value")
7339 "OSGi, for Open Services Gateway initiative framework, is a module system
7340 and service platform for the Java programming language. This package contains
7341 an interface and utilitary classes for promises. A Promise represents a future
7342 value. It handles the interactions for asynchronous processing.")
7343 (license license:asl2.0)))
7345 (define-public java-osgi-service-metatype-annotations
7347 (name "java-osgi-service-metatype-annotations")
7351 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7352 "org.osgi.service.metatype.annotations/"
7353 version "/org.osgi.service.metatype.annotations-"
7354 version "-sources.jar"))
7357 "12rwm3349wk80vm88rcdgs4435m4jxkpkj5mrx326skkz2c6hyw6"))))
7358 (build-system ant-build-system)
7360 `(#:jar-name "osgi-service-metatype-annotations.jar"
7361 #:tests? #f)); no tests
7363 `(("annotation" ,java-osgi-annotation)))
7364 (home-page "https://www.osgi.org")
7365 (synopsis "Support annotations for metatype")
7367 "OSGi, for Open Services Gateway initiative framework, is a module system
7368 and service platform for the Java programming language. This package contains
7369 the support annotations for metatype.")
7370 (license license:asl2.0)))
7372 (define-public java-osgi-service-repository
7374 (name "java-osgi-service-repository")
7378 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7379 "org.osgi.service.repository/"
7380 version "/org.osgi.service.repository-"
7381 version "-sources.jar"))
7384 "1k41mhg7b58pd8nsghr2qwcjrxdnf1p9spsw9v11k4257g6rl06n"))))
7385 (build-system ant-build-system)
7387 `(#:jar-name "osgi-service-repository.jar"
7388 #:tests? #f)); no tests
7390 `(("annotation" ,java-osgi-annotation)
7391 ("promise" ,java-osgi-util-promise)
7392 ("resource" ,java-osgi-resource)))
7393 (home-page "https://www.osgi.org")
7394 (synopsis "OSGI service repository")
7396 "OSGi, for Open Services Gateway initiative framework, is a module system
7397 and service platform for the Java programming language. This package contains
7398 a repository service that contains resources.")
7399 (license license:asl2.0)))
7401 (define-public java-osgi-framework
7403 (name "java-osgi-framework")
7407 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7408 "org.osgi.framework/" version "/org.osgi.framework-"
7409 version "-sources.jar"))
7412 "1lwp2zfad3rybcc6q9bwz8xsgkc92ypzy5p6x54387f1qj65m73s"))))
7413 (build-system ant-build-system)
7415 `(#:jar-name "osgi-framework.jar"
7416 #:tests? #f)); no tests
7418 `(("annotation" ,java-osgi-annotation)
7419 ("resource" ,java-osgi-resource)
7420 ("dto" ,java-osgi-dto)))
7421 (home-page "https://www.osgi.org")
7422 (synopsis "OSGi framework")
7424 "OSGi, for Open Services Gateway initiative framework, is a module system
7425 and service platform for the Java programming language.")
7426 (license license:asl2.0)))
7428 (define-public java-osgi-service-log
7430 (name "java-osgi-service-log")
7434 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7435 "org.osgi.service.log/"
7436 version "/org.osgi.service.log-"
7437 version "-sources.jar"))
7440 "1029j30dzcwializzca0j3fkhwwz08kmmsha5agw1iccscimj6r0"))))
7441 (build-system ant-build-system)
7443 `(#:jar-name "osgi-service-log.jar"
7444 #:tests? #f)); no tests
7446 `(("java-osgi-framework" ,java-osgi-framework)))
7447 (home-page "https://www.osgi.org")
7448 (synopsis "Provides methods for bundles to write messages to the log")
7450 "OSGi, for Open Services Gateway initiative framework, is a module system
7451 and service platform for the Java programming language. This package contains
7453 (license license:asl2.0)))
7455 (define-public java-osgi-service-jdbc
7457 (name "java-osgi-service-jdbc")
7461 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7462 "org.osgi.service.jdbc/"
7463 version "/org.osgi.service.jdbc-"
7464 version "-sources.jar"))
7467 "11iln5v7bk469cgb9ddkrz9sa95b3733gqgaqw9xf5g6wq652yjz"))))
7468 (build-system ant-build-system)
7470 `(#:jar-name "osgi-service-jdbc.jar"
7471 #:tests? #f)); no tests
7472 (home-page "https://www.osgi.org")
7473 (synopsis "Factory for JDBC connection factories")
7475 "OSGi, for Open Services Gateway initiative framework, is a module system
7476 and service platform for the Java programming language. This package contains
7477 a factory for JDBC connection factories. There are 3 preferred connection
7478 factories for getting JDBC connections:
7481 @item @code{javax.sql.DataSource};
7482 @item @code{javax.sql.ConnectionPoolDataSource};
7483 @item @code{javax.sql.XADataSource}.
7485 (license license:asl2.0)))
7487 (define-public java-osgi-service-resolver
7489 (name "java-osgi-service-resolver")
7493 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7494 "org.osgi.service.resolver/"
7495 version "/org.osgi.service.resolver-"
7496 version "-sources.jar"))
7499 "1dzqn1ryfi2rq4zwsgp44bmj2wlfydjg1qbxw2b0z4xdjjy55vxd"))))
7500 (build-system ant-build-system)
7502 `(#:jar-name "osgi-service-resolver.jar"
7503 #:tests? #f)); no tests
7505 `(("annotation" ,java-osgi-annotation)
7506 ("resource" ,java-osgi-resource)))
7507 (home-page "https://www.osgi.org")
7508 (synopsis "OSGI Resolver service")
7510 "OSGi, for Open Services Gateway initiative framework, is a module system
7511 and service platform for the Java programming language. This package contains
7512 a resolver service that resolves the specified resources in the context supplied
7514 (license license:asl2.0)))
7516 (define-public java-osgi-util-tracker
7518 (name "java-osgi-util-tracker")
7522 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7523 "org.osgi.util.tracker/"
7524 version "/org.osgi.util.tracker-"
7525 version "-sources.jar"))
7528 "0c4fh9vxwzsx59r8dygda0gq2gx3z5vfhc3jsphlqwf5w0h403lz"))))
7529 (build-system ant-build-system)
7531 `(#:jar-name "osgi-util-tracker.jar"
7532 #:tests? #f)); no tests
7534 `(("framework" ,java-osgi-framework)
7535 ("annotation" ,java-osgi-annotation)))
7536 (home-page "https://www.osgi.org")
7537 (synopsis "Bundle tracking")
7539 "OSGi, for Open Services Gateway initiative framework, is a module system
7540 and service platform for the Java programming language. This package contains
7541 bundle tracking utility classes.")
7542 (license license:asl2.0)))
7544 (define-public java-osgi-service-cm
7546 (name "java-osgi-service-cm")
7550 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7551 "org.osgi.service.cm/"
7552 version "/org.osgi.service.cm-"
7553 version "-sources.jar"))
7556 "1z8kap48y3xi0ggj8v6czglfnpnd94mmismgi2wbqhj1nl5fzbp6"))))
7557 (build-system ant-build-system)
7559 `(#:jar-name "osgi-service-cm.jar"
7560 #:tests? #f)); no tests
7562 `(("framework" ,java-osgi-framework)
7563 ("annotation" ,java-osgi-annotation)))
7564 (home-page "https://www.osgi.org")
7565 (synopsis "OSGI Configuration Management")
7567 "OSGi, for Open Services Gateway initiative framework, is a module system
7568 and service platform for the Java programming language. This package contains
7569 utility classes for the configuration of services.")
7570 (license license:asl2.0)))
7572 (define-public java-osgi-service-packageadmin
7574 (name "java-osgi-service-packageadmin")
7578 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7579 "org.osgi.service.packageadmin/"
7580 version "/org.osgi.service.packageadmin-"
7581 version "-sources.jar"))
7584 "041mpxzi7g36wmcily6y4ccn3jx15akpdy8gmhyb7m98x7qfvn52"))))
7585 (build-system ant-build-system)
7587 `(#:jar-name "osgi-service-packageadmin.jar"
7588 #:tests? #f)); no tests
7590 `(("framework" ,java-osgi-framework)))
7591 (home-page "https://www.osgi.org")
7592 (synopsis "OSGI Package Administration")
7594 "OSGi, for Open Services Gateway initiative framework, is a module system
7595 and service platform for the Java programming language. This package contains
7596 the packageadmin service.")
7597 (license license:asl2.0)))
7599 (define-public java-ops4j-base-lang
7601 (name "java-ops4j-base-lang")
7605 (uri (string-append "https://github.com/ops4j/org.ops4j.base/"
7606 "archive/base-" version ".tar.gz"))
7609 "18hl3lpchgpv8yh5rlk39l2gif5dlfgb8gxjmncf39pr2dprkniw"))))
7610 (build-system ant-build-system)
7612 `(#:jar-name "java-ops4j-base-lang.jar"
7613 #:source-dir "ops4j-base-lang/src/main/java"
7614 #:tests? #f; no tests
7616 (modify-phases %standard-phases
7617 (add-before 'build 'add-test-file
7619 ;; That file is required by a test in ops4j-pax-exam-core-spi
7620 (mkdir-p "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang")
7621 (with-output-to-file "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang/pom.properties"
7625 "version=" ,version "\n"
7626 "groupId=org.ops4j.base"
7627 "artifactId=ops4j-base-lang\n"))))
7629 (home-page "https://ops4j1.jira.com/wiki/spaces/base/overview")
7630 (synopsis "Utility classes and extensions to be used in OPS4J projects")
7631 (description "OPS4J stands for Open Participation Software for Java. This
7632 package contains utilities and extensions related to @code{java.lang}.")
7633 (license license:asl2.0)))
7635 (define-public java-ops4j-base-monitors
7637 (inherit java-ops4j-base-lang)
7638 (name "java-ops4j-base-monitors")
7640 `(#:jar-name "java-ops4j-base-monitors.jar"
7641 #:source-dir "ops4j-base-monitors/src/main/java"
7642 #:tests? #f)); no tests
7644 `(("lang" ,java-ops4j-base-lang)))
7645 (description "OPS4J stands for Open Participation Software for Java. This
7646 package contains utilities and extensions related to monitoring.")))
7648 (define-public java-ops4j-base-io
7650 (inherit java-ops4j-base-lang)
7651 (name "java-ops4j-base-io")
7653 `(#:jar-name "java-ops4j-base-io.jar"
7654 #:source-dir "ops4j-base-io/src/main/java"
7655 #:test-dir "ops4j-base-io/src/test"
7657 (list "**/ListerTest.java")))
7659 `(("lang" ,java-ops4j-base-monitors)
7660 ("lang" ,java-ops4j-base-lang)))
7662 `(("junit" ,java-junit)
7663 ("hamcrest" ,java-hamcrest-core)))
7664 (description "OPS4J stands for Open Participation Software for Java. This
7665 package contains utilities and extensions related to handling streams and files.")))
7667 (define-public java-ops4j-base-util
7669 (inherit java-ops4j-base-lang)
7670 (name "java-ops4j-base-util")
7672 `(#:jar-name "java-ops4j-base-util.jar"
7673 #:source-dir "ops4j-base-util/src/main/java"
7674 #:test-dir "ops4j-base-util/src/test"))
7676 `(("lang" ,java-ops4j-base-lang)))
7678 `(("junit" ,java-junit)))
7679 (description "OPS4J stands for Open Participation Software for Java. This
7680 package contains utilities and extensions related to environment, i18n and
7683 (define-public java-ops4j-base-util-property
7685 (inherit java-ops4j-base-lang)
7686 (name "java-ops4j-base-util-property")
7688 `(#:jar-name "java-ops4j-base-util-property.jar"
7689 #:source-dir "ops4j-base-util-property/src/main/java"
7690 #:tests? #f)); no tests
7692 `(("lang" ,java-ops4j-base-lang)
7693 ("util" ,java-ops4j-base-util)))
7694 (description "OPS4J stands for Open Participation Software for Java. This
7695 package contains utilities and extensions related to resolving properties from
7696 different sources.")))
7698 (define-public java-ops4j-base-store
7700 (inherit java-ops4j-base-lang)
7701 (name "java-ops4j-base-store")
7703 `(#:jar-name "java-ops4j-base-store.jar"
7704 #:source-dir "ops4j-base-store/src/main/java"
7705 #:tests? #f)); no tests
7707 `(("lang" ,java-ops4j-base-lang)
7708 ("slf4j" ,java-slf4j-api)
7709 ("io" ,java-ops4j-base-io)))
7710 (description "OPS4J stands for Open Participation Software for Java. This
7711 package contains utilities for storing and retrieving data from an
7712 @code{InputStream}.")))
7714 (define-public java-ops4j-base-spi
7716 (inherit java-ops4j-base-lang)
7717 (name "java-ops4j-base-spi")
7719 `(#:jar-name "java-ops4j-base-spi.jar"
7720 #:source-dir "ops4j-base-spi/src/main/java"
7721 #:test-dir "ops4j-base-spi/src/test"))
7723 `(("junit" ,java-junit)
7724 ("hamcrest" ,java-hamcrest-core)))
7725 (description "OPS4J stands for Open Participation Software for Java. This
7726 package contains utilities for obtaining services via the Java SE 6
7727 @code{ServiceLoader}.")))
7729 (define-public java-aqute-bnd-annotation
7731 (name "java-aqute-bnd-annotation")
7735 (uri (string-append "https://github.com/bndtools/bnd/archive/"
7736 version ".REL.tar.gz"))
7737 (file-name (string-append name "-" version ".tar.gz"))
7740 "1ggyiq0as0f6cz333a0dh98j72kmvv5pf2s47v9554yh905lfqdl"))))
7741 (build-system ant-build-system)
7743 `(#:jar-name "java-aqute-bnd-annotation.jar"
7744 #:source-dir "biz.aQute.bnd.annotation/src"
7745 #:tests? #f)); empty test dir
7746 (home-page "http://bnd.bndtools.org/")
7747 (synopsis "Tools for OSGi")
7748 (description "Bnd is a swiss army knife for OSGi, it creates manifest
7749 headers based on analyzing the class code, it verifies the project settings,
7750 it manages project dependencies, gives diffs jars, and much more.")
7751 (license license:asl2.0)))
7753 (define-public java-aqute-libg
7755 (inherit java-aqute-bnd-annotation)
7756 (name "java-aqute-libg")
7758 `(#:jar-name "java-aqute-libg.jar"
7759 ;; The build fails when source/target more recent than 1.7. This
7760 ;; is a known issue. See: https://github.com/bndtools/bnd/issues/1327
7762 ;; It is closed as won't fix. There is no way to change the source
7763 ;; so that it works on 1.8, and still works on 1.6, the upstream
7764 ;; target. It work fine on 1.7, so we use 1.7.
7765 #:make-flags (list "-Dant.build.javac.source=1.7"
7766 "-Dant.build.javac.target=1.7")
7768 (modify-phases %standard-phases
7769 (add-before 'configure 'chdir
7770 ;; Change to aQute.libg directory, so that the relative
7771 ;; paths in the tests aren't broken.
7773 (chdir "aQute.libg")
7775 (add-before 'check 'create-test-directory
7776 ;; Copy the test directory to test/java, since that's where
7777 ;; ant-build-system's default project in build.xml expects to find
7778 ;; the test classes. Leave a copy in the original place to not
7779 ;; break paths in tests.
7782 (copy-recursively "test" "src/test/java")
7785 `(("slf4j" ,java-slf4j-api)
7786 ("osgi-annot" ,java-osgi-annotation)
7787 ("java-osgi-cmpn" ,java-osgi-cmpn)
7788 ("osgi" ,java-osgi-core)))
7790 `(("hamcrest" ,java-hamcrest-core)
7791 ("java-junit" ,java-junit)))))
7793 (define java-aqute-libg-bootstrap
7795 (inherit java-aqute-libg)
7796 (name "java-aqute-libg-bootstrap")
7798 ;; Disable tests, at this stage of bootstrap we have no test frameworks.
7799 (substitute-keyword-arguments (package-arguments java-aqute-libg)
7800 ((#:tests? _ #f) #f)))
7802 `(("slf4j-bootstrap" ,java-slf4j-api-bootstrap)
7803 ,@(delete `("slf4j" ,java-slf4j-api)
7804 (package-inputs java-aqute-libg))))
7805 (native-inputs '())))
7807 (define-public java-aqute-bndlib
7809 (inherit java-aqute-bnd-annotation)
7810 (name "java-aqute-bndlib")
7812 `(#:jar-name "java-bndlib.jar"
7813 #:source-dir "biz.aQute.bndlib/src"
7814 #:tests? #f)); no tests
7816 `(("slf4j" ,java-slf4j-api)
7817 ("osgi-annot" ,java-osgi-annotation)
7818 ("java-aqute-libg" ,java-aqute-libg)
7819 ("java-aqute-bnd-annotation" ,java-aqute-bnd-annotation)
7820 ("java-osgi-service-component-annotations" ,java-osgi-service-component-annotations)
7821 ("java-osgi-service-repository" ,java-osgi-service-repository)
7822 ("java-osgi-service-log" ,java-osgi-service-log)
7823 ("java-osgi-service-metatype-annotations" ,java-osgi-service-metatype-annotations)
7824 ("java-osgi-namespace-contract" ,java-osgi-namespace-contract)
7825 ("java-osgi-namespace-extender" ,java-osgi-namespace-extender)
7826 ("java-osgi-namespace-service" ,java-osgi-namespace-service)
7827 ("promise" ,java-osgi-util-promise)
7828 ("osgi" ,java-osgi-core)))))
7830 (define java-aqute-bndlib-bootstrap
7832 (inherit java-aqute-bndlib)
7833 (name "java-aqute-bndlib-bootstrap")
7835 `(("slf4j-bootstrap" ,java-slf4j-api-bootstrap)
7836 ("java-aqute-libg-bootstrap" ,java-aqute-libg-bootstrap)
7837 ,@(delete `("slf4j" ,java-slf4j-api)
7838 (delete `("java-aqute-libg" ,java-aqute-libg)
7839 (package-inputs java-aqute-bndlib)))))))
7841 (define-public java-ops4j-pax-tinybundles
7843 (name "java-ops4j-pax-tinybundles")
7847 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.tinybundles/"
7848 "archive/tinybundles-" version ".tar.gz"))
7851 "0y0gq3pvv0iir2b885lmlwnvr724vv7vklzhhr4fs27d7mdkj871"))))
7853 `(#:jar-name "java-ops4j-pax-tinybundles.jar"
7854 #:source-dir "src/main/java"
7856 ;; Abstract base classes for other tests
7857 (list "**/BndTest.java" "**/CoreTest.java")
7859 (modify-phases %standard-phases
7860 (add-before 'check 'fix-version
7862 ;; This test has a reference to an old version of bndlib we are not
7863 ;; packaging. It uses the version referenced in pom.xml. We replace
7864 ;; it with our own version.
7865 (substitute* "src/test/java/org/ops4j/pax/tinybundles/bnd/BndTest.java"
7866 (("[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*")
7867 ,(package-version java-aqute-bndlib)))
7870 `(("lang" ,java-ops4j-base-lang)
7871 ("io" ,java-ops4j-base-io)
7872 ("store" ,java-ops4j-base-store)
7873 ("slf4j" ,java-slf4j-api)
7874 ("libg" ,java-aqute-libg)
7875 ("bndlib" ,java-aqute-bndlib)))
7877 `(("junit" ,java-junit)
7878 ("hamcrest" ,java-hamcrest-core)
7879 ("log4j" ,java-log4j-api)
7880 ("bndannotation" ,java-aqute-bnd-annotation)
7881 ("framework" ,java-osgi-framework)))
7882 (build-system ant-build-system)
7883 (home-page "https://ops4j1.jira.com/wiki/spaces/ops4j/pages/12060312/Tinybundles")
7884 (synopsis "Java APIs to create OSGi related artifacts")
7885 (description "Tinybundles is all about creating OSGi related artifacts like
7886 Bundles, Fragments and Deployment Packages with Java Api. It is very convenient
7887 to create such artifacts on-the-fly inside Tests (like in Pax Exam). On the
7888 other hand, this library can be a foundation of real end user tools that need
7889 to create those artifacts.")
7890 (license license:asl2.0)))
7892 (define-public java-ops4j-pax-exam-core
7894 (name "java-ops4j-pax-exam-core")
7898 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.exam2/"
7899 "archive/exam-reactor-" version ".tar.gz"))
7902 "08mzw8nkah3rj3vznlplnawspxhp61zgvb44ifqa1rni1cvbms2g"))))
7904 `(#:jar-name "java-ops4j-pax-exam-core.jar"
7905 #:source-dir "core/pax-exam/src/main/java"
7906 #:test-dir "core/pax-exam/src/test"))
7908 `(("slf4j" ,java-slf4j-api)
7909 ("lang" ,java-ops4j-base-lang)
7910 ("io" ,java-ops4j-base-io)
7911 ("util-property" ,java-ops4j-base-util-property)
7912 ("util-store" ,java-ops4j-base-store)
7913 ("java-osgi-core" ,java-osgi-core)))
7915 `(("junit" ,java-junit)
7916 ("hamcrest" ,java-hamcrest-core)))
7917 (build-system ant-build-system)
7918 (home-page "https://ops4j1.jira.com/wiki/spaces/PAXEXAM4/overview")
7919 (synopsis "In-Container Testing for OSGi, Java EE and CDI")
7920 (description "Pax Exam creates OSGi bundles for testing purposes. It lets
7921 the user take control of the OSGi framework, the test framework (e.g. JUnit) and
7922 the system under test at the same time.")
7923 (license license:asl2.0)))
7925 (define-public java-ops4j-pax-exam-core-spi
7927 (inherit java-ops4j-pax-exam-core)
7928 (name "java-ops4j-pax-exam-core-spi")
7930 `(#:jar-name "java-ops4j-pax-exam-spi.jar"
7931 #:source-dir "src/main/java"
7934 ;; Abstract base class, not a test
7935 "**/BaseStagedReactorTest.java"
7936 ;; Depends on org.mortbay.jetty.testwars:test-war-dump
7937 "**/WarBuilderTest.java")
7939 (modify-phases %standard-phases
7940 (add-before 'configure 'chdir
7942 ;; Tests assume we are in this directory
7943 (chdir "core/pax-exam-spi")
7945 (add-before 'check 'fix-tests
7947 ;; One test checks that this file is present.
7948 (mkdir-p "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi")
7949 (with-output-to-file
7950 "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi/pom.properties"
7953 (string-append "artifactId = pax-exam-spi\n"
7954 "version = " ,(package-version java-ops4j-pax-exam-core-spi)))))
7955 ;; Maven puts compilation results in the target directory, while we
7956 ;; put them in the build directory.
7957 (substitute* '("src/test/java/org/ops4j/pax/exam/spi/war/WarBuilderTest.java"
7958 "src/test/java/org/ops4j/pax/exam/spi/war/WarTestProbeBuilderTest.java"
7959 "src/test/java/org/ops4j/pax/exam/spi/war/ZipBuilderTest.java")
7960 (("target") "build"))
7961 ;; One test is expected to fail, but it doesn't throw the expected exception
7962 (substitute* "src/test/java/org/ops4j/pax/exam/spi/reactors/BaseStagedReactorTest.java"
7963 (("AssertionError") "IllegalArgumentException"))
7966 `(("java-ops4j-pax-exam-core" ,java-ops4j-pax-exam-core)
7967 ("lang" ,java-ops4j-base-lang)
7968 ("monitors" ,java-ops4j-base-monitors)
7969 ("store" ,java-ops4j-base-store)
7970 ("io" ,java-ops4j-base-io)
7971 ("spi" ,java-ops4j-base-spi)
7972 ("osgi" ,java-osgi-core)
7973 ("slf4j" ,java-slf4j-api)
7974 ("tinybundles" ,java-ops4j-pax-tinybundles)))
7976 `(("mockito" ,java-mockito-1)
7977 ("junit" ,java-junit)
7978 ("hamcrest" ,java-hamcrest-core)
7979 ("cglib" ,java-cglib)
7980 ("objenesis" ,java-objenesis)
7981 ("asm" ,java-asm)))))
7983 (define-public java-ops4j-pax-exam-core-junit
7985 (inherit java-ops4j-pax-exam-core)
7986 (name "java-ops4j-pax-exam-core-junit")
7988 `(#:jar-name "ops4j-pax-exam-core-junit.jar"
7989 #:source-dir "drivers/pax-exam-junit4/src/main/java"
7990 #:tests? #f)); no tests
7992 `(("junit" ,java-junit)
7993 ("slf4j" ,java-slf4j-api)
7994 ("core" ,java-ops4j-pax-exam-core)
7995 ("spi" ,java-ops4j-pax-exam-core-spi)))
7996 (native-inputs '())))
7998 (define-public java-fasterxml-jackson-annotations
8000 (name "java-fasterxml-jackson-annotations")
8004 (uri (string-append "https://github.com/FasterXML/"
8005 "jackson-annotations/archive/"
8006 "jackson-annotations-" version ".tar.gz"))
8009 "0mr95xd0da6a4g95zvrl1ryk5n5zv2rc696w3xnsr5hxk2gicfc4"))))
8010 (build-system ant-build-system)
8012 `(#:jar-name "jackson-annotations.jar"
8013 #:source-dir "src/main/java"
8014 #:test-dir "src/test"))
8016 `(("junit" ,java-junit)))
8017 (home-page "https://github.com/FasterXML/jackson-annotations")
8018 (synopsis "General purpose annotations for the Jackson Data Processor")
8019 (description "This package contains general purpose annotations for the
8020 Jackson Data Processor, used on value and handler types. The only annotations
8021 not included are ones that require dependency to the Databind package.")
8022 (license license:asl2.0)))
8024 (define-public java-fasterxml-jackson-core
8026 (name "java-fasterxml-jackson-core")
8030 (uri (string-append "https://github.com/FasterXML/"
8031 "jackson-core/archive/"
8032 "jackson-core-" version ".tar.gz"))
8035 "159hsnk17jr1gyzkf01cxvsn45srnk37g949r7364qlsr527gjgd"))))
8036 (build-system ant-build-system)
8038 `(#:jar-name "jackson-core.jar"
8039 #:source-dir "src/main/java"
8040 #:test-dir "src/test"
8043 ;; Expected failure. pom.xml excludes these
8045 ;; Base classes that have no constructor for junit
8047 "**/ConcurrencyReadTest.java"
8048 "**/ManualCharAccessTest.java"
8049 "**/ManualCharAccessTest.java"
8050 "**/TrailingCommasTest.java"
8051 "**/AsyncMissingValuesInObjectTest.java"
8052 "**/AsyncMissingValuesInArrayTest.java")
8054 (modify-phases %standard-phases
8055 (add-before 'configure 'generate-PackageVersion.java
8057 (let* ((out "src/main/java/com/fasterxml/jackson/core/json/PackageVersion.java")
8058 (in (string-append out ".in")))
8061 (("@package@") "com.fasterxml.jackson.core.json")
8062 (("@projectversion@") ,version)
8063 (("@projectgroupid@") "com.fasterxml.jackson.core")
8064 (("@projectartifactid@") "jackson-core")))
8066 (add-before 'build 'copy-resources
8068 (copy-recursively "src/main/resources"
8071 (add-before 'check 'copy-test-resources
8073 (copy-recursively "src/test/resources"
8074 "build/test-classes")
8077 `(("junit" ,java-junit)
8078 ("hamcrest" ,java-hamcrest-core)))
8079 (home-page "https://github.com/FasterXML/jackson-core")
8082 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
8084 (define-public java-fasterxml-jackson-databind
8086 (name "java-fasterxml-jackson-databind")
8090 (uri (string-append "https://github.com/FasterXML/"
8091 "jackson-databind/archive/"
8092 "jackson-databind-" version ".tar.gz"))
8095 "1zd2cw4z6kdkbx8za96xh9pyicv2a2l7y0rkcx2fqd8hv6d47s08"))))
8096 (build-system ant-build-system)
8098 `(#:jar-name "jackson-databind.jar"
8099 #:source-dir "src/main/java"
8100 #:tests? #f; requires javax.measures for which I can't find a free implementation
8102 (modify-phases %standard-phases
8103 (add-before 'configure 'generate-PackageVersion.java
8105 (let* ((out "src/main/java/com/fasterxml/jackson/databind/cfg/PackageVersion.java")
8106 (in (string-append out ".in")))
8109 (("@package@") "com.fasterxml.jackson.databind.cfg")
8110 (("@projectversion@") ,version)
8111 (("@projectgroupid@") "com.fasterxml.jackson.databind")
8112 (("@projectartifactid@") "jackson-databind")))
8114 (add-before 'build 'copy-resources
8116 (copy-recursively "src/main/resources" "build/classes")
8119 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
8120 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)))
8121 (home-page "https://github.com/FasterXML/jackson-databind")
8122 (synopsis "Data-binding functionality and tree-model for the Jackson Data Processor")
8123 (description "This package contains the general-purpose data-binding
8124 functionality and tree-model for Jackson Data Processor. It builds on core
8125 streaming parser/generator package, and uses Jackson Annotations for
8127 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
8129 (define-public java-fasterxml-jackson-modules-base-jaxb
8131 (name "java-fasterxml-jackson-modules-base-jaxb")
8135 (uri (string-append "https://github.com/FasterXML/"
8136 "jackson-modules-base/archive/"
8137 "jackson-modules-base-" version ".tar.gz"))
8140 "1wws95xi8sppp6b0k2vvjdjyynl20r1a4dwrhai08lzlria6blp5"))))
8141 (build-system ant-build-system)
8143 `(#:jar-name "jackson-modules-base-jaxb.jar"
8144 #:source-dir "jaxb/src/main/java"
8145 #:test-dir "jaxb/src/test"
8147 ;; Base class for tests
8148 (list "**/BaseJaxbTest.java")
8150 (modify-phases %standard-phases
8151 (add-before 'configure 'generate-PackageVersion.java
8153 (let* ((out (string-append "jaxb/src/main/java/com/fasterxml/"
8154 "jackson/module/jaxb/PackageVersion.java"))
8155 (in (string-append out ".in")))
8158 (("@package@") "com.fasterxml.jackson.module.jaxb")
8159 (("@projectversion@") ,version)
8160 (("@projectgroupid@") "com.fasterxml.jackson.module.jaxb")
8161 (("@projectartifactid@") "jackson-module-jaxb")))
8163 (add-before 'build 'copy-resources
8165 (copy-recursively "jaxb/src/main/resources" "build/classes")
8168 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
8169 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
8170 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)))
8172 `(("java-junit" ,java-junit)))
8173 (home-page "https://github.com/FasterXML/jackson-modules-base")
8174 (synopsis "Jaxb annotations jackson module")
8175 (description "This package is the jaxb annotations module for jackson.")
8176 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
8178 (define-public java-fasterxml-jackson-modules-base-mrbean
8180 (name "java-fasterxml-jackson-modules-base-mrbean")
8184 (uri (string-append "https://github.com/FasterXML/"
8185 "jackson-modules-base/archive/"
8186 "jackson-modules-base-" version ".tar.gz"))
8189 "1wws95xi8sppp6b0k2vvjdjyynl20r1a4dwrhai08lzlria6blp5"))))
8190 (build-system ant-build-system)
8192 `(#:jar-name "jackson-modules-base-mrbean.jar"
8193 #:source-dir "mrbean/src/main/java"
8194 #:test-dir "mrbean/src/test"
8196 ;; Base class for tests
8197 (list "**/BaseTest.java")
8199 (modify-phases %standard-phases
8200 (add-before 'configure 'generate-PackageVersion.java
8202 (let* ((out (string-append "mrbean/src/main/java/com/fasterxml/"
8203 "jackson/module/mrbean/PackageVersion.java"))
8204 (in (string-append out ".in")))
8207 (("@package@") "com.fasterxml.jackson.module.mrbean")
8208 (("@projectversion@") ,version)
8209 (("@projectgroupid@") "com.fasterxml.jackson.module.mrbean")
8210 (("@projectartifactid@") "jackson-module-mrbean")))
8213 `(("java-asm" ,java-asm)
8214 ("java-fasterxml-jackson-annotations"
8215 ,java-fasterxml-jackson-annotations)
8216 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
8217 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)))
8219 `(("java-junit" ,java-junit)))
8220 (home-page "https://github.com/FasterXML/jackson-modules-base")
8221 (synopsis "POJO type materialization for Java")
8222 (description "This package implements POJO type materialization.
8223 Databinders can construct implementation classes for Java interfaces as part
8224 of deserialization.")
8225 (license license:asl2.0)))
8227 (define-public java-snakeyaml
8229 (name "java-snakeyaml")
8233 (uri (string-append "https://bitbucket.org/asomov/snakeyaml/get/v"
8235 (file-name (string-append name "-" version ".tar.gz"))
8238 "0rf5ha6w0waz50jz2479jsrbgmd0dnx0gs337m126j5z7zlmg7mg"))))
8239 (build-system ant-build-system)
8241 `(#:jar-name "java-snakeyaml.jar"
8242 #:source-dir "src/main/java"
8243 ;; Tests require velocity, a cyclic dependency, and
8244 ;; java-spring-framework-context which is not packaged.
8246 (home-page "https://bitbucket.org/asomov/snakeyaml")
8247 (synopsis "YAML processor")
8248 (description "SnakeYAML is a YAML processor for the Java Virtual Machine.")
8249 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
8251 (define-public java-fasterxml-jackson-dataformat-yaml
8253 (name "java-fasterxml-jackson-dataformat-yaml")
8257 (uri (string-append "https://github.com/FasterXML/"
8258 "jackson-dataformats-text/archive/"
8259 "jackson-dataformats-text-" version ".tar.gz"))
8262 "1hikl06khaxbg439avf442qifcadap8w0lx13f0nnhp2vh3dkbz7"))))
8263 (build-system ant-build-system)
8265 `(#:jar-name "jackson-dataformat-yaml.jar"
8266 #:source-dir "yaml/src/main/java"
8267 #:test-dir "yaml/src/test"
8268 #:test-exclude (list "**/failing/**.java")
8270 (modify-phases %standard-phases
8271 (add-before 'configure 'generate-PackageVersion.java
8273 (let* ((out "yaml/src/main/java/com/fasterxml/jackson/dataformat/yaml/PackageVersion.java")
8274 (in (string-append out ".in")))
8277 (("@package@") "com.fasterxml.jackson.dataformat.yaml")
8278 (("@projectversion@") ,version)
8279 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.yaml")
8280 (("@projectartifactid@") "jackson-dataformat-yaml")))
8283 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
8284 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
8285 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)
8286 ("java-snakeyaml" ,java-snakeyaml)))
8288 `(("junit" ,java-junit)
8289 ("hamcrest" ,java-hamcrest-core)
8290 ("java-ops4j-pax-exam-core-spi" ,java-ops4j-pax-exam-core-spi)
8291 ("java-ops4j-pax-exam-core-junit" ,java-ops4j-pax-exam-core-junit)
8292 ("java-ops4j-pax-exam" ,java-ops4j-pax-exam-core)))
8293 (home-page "https://github.com/FasterXML/jackson-dataformats-text")
8294 (synopsis "Yaml backend for Jackson")
8295 (description "Dataformat backends are used to support format alternatives
8296 to JSON, supported by default. This is done by sub-classing Jackson core
8298 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
8300 (define-public java-stax2-api
8302 (name "java-stax2-api")
8306 (uri (string-append "https://github.com/FasterXML/stax2-api/archive/"
8307 "stax2-api-" version ".tar.gz"))
8310 "1amc1si0l0hyyw2sawmnzy4hkna3z6fp195y4nm5m9wb9ld5awkq"))))
8311 (build-system ant-build-system)
8313 `(#:jar-name "java-stax2-api.jar"
8314 #:source-dir "src/main/java"
8315 #:tests? #f)); no tests
8316 (home-page "https://github.com/FasterXML/stax2-api")
8317 (synopsis "Stax2 API")
8318 (description "Stax2 API is an extension to basic Stax 1.0 API that adds
8319 significant new functionalities, such as full-featured bi-direction validation
8320 interface and high-performance Typed Access API.")
8321 (license license:bsd-2)))
8323 (define-public java-woodstox-core
8325 (name "java-woodstox-core")
8329 (uri (string-append "https://github.com/FasterXML/woodstox/archive/"
8330 "woodstox-core-" version ".tar.gz"))
8333 "1i7pdgb8jbw6gdy5kmm0l6rz109n2ns92pqalpyp24vb8vlvdfd4"))))
8334 (build-system ant-build-system)
8336 `(#:jar-name "woodstox.jar"
8338 (list "**/Base*.java" "failing/**")
8340 (modify-phases %standard-phases
8341 (add-before 'build 'remove-msv-dep
8343 ;; we don't need osgi, and it depends on msv
8344 (delete-file-recursively "src/main/java/com/ctc/wstx/osgi")
8345 ;; msv's latest release is from 2011 and we don't need it
8346 (delete-file-recursively "src/main/java/com/ctc/wstx/msv")
8347 (delete-file-recursively "src/test/java/wstxtest/osgi")
8348 (delete-file-recursively "src/test/java/wstxtest/msv")
8350 (add-before 'build 'copy-resources
8352 (copy-recursively "src/main/resources" "build/classes")
8355 `(("stax2" ,java-stax2-api)))
8357 `(("junit" ,java-junit)))
8358 (home-page "https://github.com/FasterXML/woodstox")
8359 (synopsis "Stax XML API implementation")
8360 (description "Woodstox is a stax XML API implementation.")
8361 (license license:asl2.0)))
8363 (define-public java-fasterxml-jackson-dataformat-xml
8365 (name "java-fasterxml-jackson-dataformat-xml")
8369 (uri (string-append "https://github.com/FasterXML/"
8370 "jackson-dataformat-xml/archive/"
8371 "jackson-dataformat-xml-" version ".tar.gz"))
8374 "111fkkl90w31jbf30kgj82qdcxlw4sxppki7i198liw0ck1jcavq"))))
8375 (build-system ant-build-system)
8377 `(#:jar-name "jackson-dataformat-xml.jar"
8378 #:source-dir "src/main/java"
8380 (list "**/failing/**")
8382 (modify-phases %standard-phases
8383 (add-before 'configure 'generate-PackageVersion.java
8385 (let* ((out "src/main/java/com/fasterxml/jackson/dataformat/xml/PackageVersion.java")
8386 (in (string-append out ".in")))
8390 (("@package@") "com.fasterxml.jackson.dataformat.xml")
8391 (("@projectversion@") ,version)
8392 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.xml")
8393 (("@projectartifactid@") "jackson-dataformat-xml")))
8395 (add-before 'build 'copy-resources
8397 (copy-recursively "src/main/resources" "build/classes")
8400 `(("jackson-annotations" ,java-fasterxml-jackson-annotations)
8401 ("jackson-core" ,java-fasterxml-jackson-core)
8402 ("jackson-modules-base-jaxb" ,java-fasterxml-jackson-modules-base-jaxb)
8403 ("jackson-databind" ,java-fasterxml-jackson-databind)
8404 ("stax2-api" ,java-stax2-api)
8405 ("woodstox" ,java-woodstox-core)))
8407 `(("junit" ,java-junit)
8408 ("hamcrest" ,java-hamcrest-core)))
8409 (home-page "https://github.com/FasterXML/jackson-dataformat-xml")
8410 (synopsis "Read and write XML")
8411 (description "This package contains Jackson extension component for reading
8412 and writing XML encoded data.
8414 Further, the goal is to emulate how JAXB data-binding works with \"Code-first\"
8415 approach (that is, no support is added for \"Schema-first\" approach). Support
8416 for JAXB annotations is provided by JAXB annotation module; this module
8417 provides low-level abstractions (@code{JsonParser}, @code{JsonGenerator},
8418 @code{JsonFactory}) as well as small number of higher level overrides needed to
8419 make data-binding work.")
8420 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
8422 (define-public java-hdrhistogram
8424 (name "java-hdrhistogram")
8428 (uri (string-append "https://github.com/HdrHistogram/HdrHistogram/"
8429 "archive/HdrHistogram-" version ".tar.gz"))
8432 "1sicbmc3sr42nw93qbkb26q9rn33ag33k6k77phjc3j5h5gjffqv"))))
8433 (build-system ant-build-system)
8435 `(#:jar-name "java-hdrhistogram.jar"
8436 #:source-dir "src/main/java"
8438 (modify-phases %standard-phases
8439 (add-before 'configure 'set-version
8441 (let* ((version-java "src/main/java/org/HdrHistogram/Version.java")
8442 (template (string-append version-java ".template")))
8443 (copy-file template version-java)
8444 (substitute* version-java
8445 (("\\$VERSION\\$") ,version)
8446 (("\\$BUILD_TIME\\$") "0"))
8449 `(("junit" ,java-junit)
8450 ("hamcrest" ,java-hamcrest-core)))
8451 (home-page "https://hdrhistogram.github.io/HdrHistogram")
8452 (synopsis "High dynamic range histogram")
8453 (description "Hdrhistogram allows to create histograms that support
8454 recording and analyzing sampled data value counts across a configurable integer
8455 value range with configurable value precision within the range. Value precision
8456 is expressed as the number of significant digits in the value recording, and
8457 provides control over value quantization behavior across the value range and
8458 the subsequent value resolution at any given level.")
8459 (license license:public-domain)))
8461 (define-public java-cofoja
8463 (name "java-cofoja")
8468 (url "https://github.com/nhatminhle/cofoja.git")
8469 (commit (string-append "v" version))))
8470 (file-name (string-append "java-cofoja-" version "-checkout"))
8473 "0p7sz8y5xgpi5rx1qwn6587fkd52qr3ha3ybh14gqcyxhikl525w"))))
8474 (build-system ant-build-system)
8476 `(#:build-target "dist"
8477 #:test-target "test"
8480 (list "-Ddist.dir=dist")
8481 #:modules ((guix build ant-build-system)
8482 (guix build java-utils)
8487 (modify-phases %standard-phases
8488 ;; The bulid system ignores the class path the ant-build-system sets
8489 ;; up and instead expects to find all dependencies in the "lib"
8491 (add-after 'unpack 'create-libdir
8492 (lambda* (#:key inputs #:allow-other-keys)
8496 (let ((target (string-append "lib/" (basename file))))
8497 (unless (file-exists? target)
8498 (symlink file target))))
8499 (append-map (match-lambda
8501 (find-files dir "\\.jar$")))
8504 (replace 'install (install-jars "dist")))))
8506 `(("java-asm" ,java-asm)))
8508 `(("java-junit" ,java-junit)))
8509 (home-page "https://github.com/nhatminhle/cofoja")
8510 (synopsis "Contracts for Java")
8511 (description "Contracts for Java, or Cofoja for short, is a contract
8512 programming framework and test tool for Java, which uses annotation processing
8513 and bytecode instrumentation to provide run-time checking. (In particular,
8514 this is not a static analysis tool.)")
8515 (license license:lgpl3+)))
8517 (define-public java-aopalliance
8519 (name "java-aopalliance")
8523 ;; Note: this git repository is not official, but contains the
8524 ;; source code that is in the CVS repository. Downloading the
8525 ;; tarball from sourceforge is undeterministic, and the cvs download
8528 (url "https://github.com/hoverruan/aopalliance")
8529 (commit "0d7757ae204e5876f69431421fe9bc2a4f01e8a0")))
8530 (file-name (string-append name "-" version))
8533 "0rsg2b0v3hxlq2yk1i3m2gw3xwq689j3cwx9wbxvqfpdcjbca0qr"))))
8534 (build-system ant-build-system)
8536 `(#:jar-name "java-aopalliance.jar"
8538 #:tests? #f; no tests
8539 #:source-dir "aopalliance/src/main"))
8540 (home-page "http://aopalliance.sourceforge.net")
8541 (synopsis "Aspect-Oriented Programming")
8542 (description "The AOP Alliance project is a joint project between several
8543 software engineering people who are interested in Aspect-Oriented Programming
8545 (license license:public-domain)))
8547 (define-public java-javax-inject
8549 (name "java-javax-inject")
8553 (uri (string-append "https://github.com/javax-inject/javax-inject/"
8554 "archive/javax.inject-" version ".tar.gz"))
8557 "1ydrlvh2r7vr1g7lhjwy3w2dggpj9h6pix1lakkkgdywb365n6g0"))))
8558 (build-system ant-build-system)
8560 `(#:jar-name "java-javax-inject.jar"
8562 #:tests? #f)); no tests
8563 (home-page "http://github.com/javax-inject/javax-inject")
8564 (synopsis "JSR-330: Dependency Injection for Java")
8565 (description "This package specifies a means for obtaining objects in such
8566 a way as to maximize reusability, testability and maintainability compared to
8567 traditional approaches such as constructors, factories, and service locators
8568 (e.g., JNDI). This process, known as dependency injection, is beneficial to
8569 most nontrivial applications.
8571 Many types depend on other types. For example, a @var{Stopwatch} might depend
8572 on a @var{TimeSource}. The types on which a type depends are known as its
8573 dependencies. The process of finding an instance of a dependency to use at run
8574 time is known as resolving the dependency. If no such instance can be found,
8575 the dependency is said to be unsatisfied, and the application is broken.")
8576 (license license:asl2.0)))
8578 (define-public java-guice
8584 (uri (string-append "https://github.com/google/guice/archive/"
8586 (file-name (string-append name "-" version ".tar.gz"))
8587 (modules '((guix build utils)))
8590 (for-each delete-file (find-files "." ".*.jar"))))
8593 "0dwmqjzlavb144ywqqglj3h68hqszkff8ai0a42hyb5il0qh4rbp"))))
8594 (build-system ant-build-system)
8596 `(#:jar-name "java-guice.jar"
8598 #:tests? #f; FIXME: tests are not in a java sub directory
8599 #:source-dir "core/src"))
8601 `(("guava" ,java-guava)
8602 ("java-cglib" ,java-cglib)
8603 ("java-aopalliance" ,java-aopalliance)
8604 ("java-javax-inject" ,java-javax-inject)
8605 ("java-asm" ,java-asm)))
8606 (home-page "https://github.com/google/guice")
8607 (synopsis "Lightweight dependency injection framework")
8608 (description "Guice is a lightweight dependency injection framework fo
8610 (license license:asl2.0)))
8612 (define-public java-guice-servlet
8614 (inherit java-guice)
8615 (name "java-guice-servlet")
8617 `(#:jar-name "guice-servlet.jar"
8618 #:source-dir "extensions/servlet/src/"
8620 #:tests? #f)); FIXME: not in a java subdir
8622 `(("guice" ,java-guice)
8623 ("servlet" ,java-classpathx-servletapi)
8624 ,@(package-inputs java-guice)))))
8626 (define-public java-assertj
8628 (name "java-assertj")
8632 (uri (string-append "https://github.com/joel-costigliola/"
8633 "assertj-core/archive/"
8634 "assertj-core-" version ".tar.gz"))
8637 "1kf124fxskf548rklkg86294w2x6ajqrff94rrhyqns31danqkfz"))))
8638 (build-system ant-build-system)
8640 `(#:jar-name "java-assertj.jar"
8642 #:source-dir "src/main/java"
8643 #:tests? #f)); depends on tng-junit which depends on assertj
8645 `(("cglib" ,java-cglib)
8646 ("junit" ,java-junit)
8647 ("hamcrest" ,java-hamcrest-core)))
8649 `(("mockito" ,java-mockito-1)))
8650 (home-page "https://joel-costigliola.github.io/assertj/index.html")
8651 (synopsis "Fluent assertions for java")
8652 (description "AssertJ core is a Java library that provides a fluent
8653 interface for writing assertions. Its main goal is to improve test code
8654 readability and make maintenance of tests easier.")
8655 (license license:asl2.0)))
8657 (define-public java-jboss-javassist
8659 (name "java-jboss-javassist")
8663 (uri (string-append "https://github.com/jboss-javassist/javassist/"
8665 (string-map (lambda (x) (if (eq? x #\.) #\_ x)) version)
8669 "10lpcr3sbf7y6fq6fc2h2ik7rqrivwcy4747bg0kxhwszil3cfmf"))))
8670 (build-system ant-build-system)
8672 `(#:jar-name "java-jboss-javassist.jar"
8674 #:source-dir "src/main"
8675 #:tests? #f; FIXME: requires junit-awtui and junit-swingui from junit3
8677 (modify-phases %standard-phases
8678 (add-before 'configure 'remove-binary
8680 (delete-file "javassist.jar")
8683 `(("junit" ,java-junit)))
8684 (home-page "https://github.com/jboss-javassist/javassist")
8685 (synopsis "Java bytecode engineering toolkit")
8686 (description "Javassist (JAVA programming ASSISTant) makes Java bytecode
8687 manipulation simple. It is a class library for editing bytecodes in Java; it
8688 enables Java programs to define a new class at runtime and to modify a class
8689 file when the JVM loads it.")
8690 (license (list license:gpl2 license:cddl1.0)))); either gpl2 only or cddl.
8692 (define-public java-jcommander
8694 (name "java-jcommander")
8698 (uri (string-append "https://github.com/cbeust/jcommander/archive/"
8700 (file-name (string-append name "-" version ".tar.gz"))
8703 "1f5k2ckay6qjc3d3w3d7bc0p3cx3c7n6p6zxvw1kibqdr0q98wlx"))))
8704 (build-system ant-build-system)
8706 `(#:jar-name "java-jcommander.jar"
8708 #:tests? #f; requires testng which depends on jcommander
8709 #:source-dir "src/main/java"))
8710 (home-page "http://jcommander.org")
8711 (synopsis "Command line parameters parser")
8712 (description "JCommander is a very small Java framework that makes it
8713 trivial to parse command line parameters. Parameters are declared with
8715 (license license:asl2.0)))
8717 (define-public java-bsh
8723 (uri (string-append "https://github.com/beanshell/beanshell/archive/"
8725 (file-name (string-append name "-" version ".tar.gz"))
8728 "1bawkxk6jyc75hxvzkpz689h73cn3f222m0ar3nvb0dal2b85kfv"))))
8729 (build-system ant-build-system)
8731 `(#:build-target "jarall"
8732 #:test-target "junit-tests-all"
8734 (modify-phases %standard-phases
8736 (lambda* (#:key outputs #:allow-other-keys)
8737 (let ((share (string-append (assoc-ref outputs "out") "/share/java")))
8739 (copy-file "dist/bsh-2.0b6.jar" (string-append share "/bsh-2.0b6.jar"))
8741 (home-page "http://beanshell.org/")
8742 (synopsis "Lightweight Scripting for Java")
8743 (description "BeanShell is a small, free, embeddable Java source
8744 interpreter with object scripting language features, written in Java.
8745 BeanShell dynamically executes standard Java syntax and extends it with common
8746 scripting conveniences such as loose types, commands, and method closures like
8747 those in Perl and JavaScript.")
8748 (license license:asl2.0)))
8750 (define-public java-fest-util
8752 (name "java-fest-util")
8756 (uri (string-append "https://github.com/alexruiz/fest-util/"
8757 "archive/fest-util-" version ".tar.gz"))
8760 "05g6hljz5mdaakk8d7g32klbhz9bdwp3qlj6rdaggdidxs3x1sb8"))))
8761 (build-system ant-build-system)
8763 `(#:jar-name "java-fest-util.jar"
8764 #:source-dir "src/main/java"))
8766 `(("junit" ,java-junit)
8767 ("hamcrest" ,java-hamcrest-core)))
8768 (home-page "https://github.com/alexruiz/fest-util")
8769 (synopsis "FEST common utilities")
8770 (description "Common utilities used in all FEST module.")
8771 (license license:asl2.0)))
8773 (define-public java-fest-test
8775 (name "java-fest-test")
8779 (uri (string-append "https://github.com/alexruiz/fest-test/"
8780 "archive/fest-test-" version ".tar.gz"))
8783 "1rxfbw6l9vc65iy1x3fb617qc6y4w2k430pgf1mfbxfdlxbm0f7g"))))
8784 (build-system ant-build-system)
8786 `(#:jar-name "java-fest-test.jar"
8787 #:source-dir "src/main/java"
8788 #:tests? #f)); no tests
8790 `(("junit" ,java-junit)))
8791 (home-page "https://github.com/alexruiz/fest-test")
8792 (synopsis "Common FEST testing infrastructure")
8793 (description "Fest-test contains the common FEST testing infrastructure.")
8794 (license license:asl2.0)))
8796 (define-public java-fest-assert
8798 (name "java-fest-assert")
8802 (uri (string-append "https://github.com/alexruiz/fest-assert-2.x/"
8803 "archive/fest-assert-core-" version ".tar.gz"))
8806 "1bi0iqavikzww6rxvz5jyg7y6bflv95s6ibryxx0xfcxrrw6i5lw"))))
8807 (build-system ant-build-system)
8809 `(#:jar-name "java-fest-assert.jar"
8810 #:source-dir "src/main/java"
8815 ;; Unable to set MockitoNamingPolicy on cglib generator which creates FastClasses
8816 "**/MessageFormatter_format_Test.java"
8817 "**/internal/*/*_assert*_Test.java")))
8819 `(("java-fest-util" ,java-fest-util)))
8821 `(("java-junit" ,java-junit)
8822 ("java-fest-test" ,java-fest-test)
8823 ("java-hamcrest-core" ,java-hamcrest-core)
8824 ("java-mockito" ,java-mockito-1)
8825 ("java-cglib" ,java-cglib)
8826 ("java-objenesis" ,java-objenesis)
8827 ("java-asm" ,java-asm)))
8828 (home-page "https://github.com/alexruiz/fest-assert-2.x")
8829 (synopsis "FEST fluent assertions")
8830 (description "FEST-Assert provides a fluent interface for assertions.")
8831 (license license:asl2.0)))
8833 (define-public java-testng
8835 (name "java-testng")
8840 (url "https://github.com/cbeust/testng.git")
8842 (file-name (string-append name "-" version "-checkout"))
8845 "0y6vq30i5g276kw0v2bhbvci22ijg7ax49ap2611yqlhbs4d6dqv"))))
8846 (build-system ant-build-system)
8848 `(#:jdk ,icedtea-8; java.util.function
8849 #:jar-name "java-testng.jar"
8850 #:source-dir "src/main/java"
8852 (modify-phases %standard-phases
8853 ;; FIXME: I don't know why these tests fail
8854 (add-after 'unpack 'delete-failing-tests
8856 (substitute* "src/test/resources/testng.xml"
8857 (("<class name=\"test.configuration.github1625.TestRunnerIssue1625\"/>") "")
8858 (("<class name=\"test.serviceloader.ServiceLoaderTest\" />") ""))
8860 ;; We don't have groovy
8861 (add-after 'unpack 'delete-groovy-tests
8863 (delete-file-recursively "src/test/java/test/dependent/issue1648/")
8864 (substitute* "src/test/resources/testng.xml"
8865 (("<class name=\"test.dependent.issue1648.TestRunner\"/>") ""))
8867 (add-before 'build 'copy-resources
8869 (copy-recursively "src/main/resources" "build/classes")
8871 (add-before 'check 'copy-test-resources
8873 (copy-recursively "src/test/resources" "build/test-classes")
8877 (invoke "ant" "compile-tests")
8878 ;; we don't have groovy
8879 (substitute* "src/test/resources/testng.xml"
8880 (("<class name=\"test.groovy.GroovyTest\" />") ""))
8881 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
8883 ":build/test-classes")
8884 "-Dtest.resources.dir=src/test/resources"
8885 "org.testng.TestNG" "src/test/resources/testng.xml"))))))
8887 `(("junit" ,java-junit)
8888 ("java-jsr305" ,java-jsr305)
8889 ("java-bsh" ,java-bsh)
8890 ("java-jcommander" ,java-jcommander)
8891 ("java-guice" ,java-guice)
8892 ("snakeyaml" ,java-snakeyaml)))
8894 `(("guava" ,java-guava)
8895 ("java-javax-inject" ,java-javax-inject)
8896 ("java-hamcrest" ,java-hamcrest-all)
8897 ("java-assertj" ,java-assertj)
8898 ("java-mockito" ,java-mockito-1)
8899 ("cglib" ,java-cglib)
8901 ("aopalliance" ,java-aopalliance)))
8902 (home-page "http://testng.org")
8903 (synopsis "Testing framework")
8904 (description "TestNG is a testing framework inspired from JUnit and NUnit
8905 but introducing some new functionalities that make it more powerful and easier
8907 (license license:asl2.0)))
8909 (define-public java-jnacl
8910 (let ((commit "094e819afdd63ea81a499b3bcb42a271006bebd9")
8914 (version (string-append "0.1.0-" revision "." (string-take commit 7)))
8918 (url "https://github.com/neilalexander/jnacl.git")
8920 (file-name (git-file-name name version))
8923 "1d6g6xhn83byv5943n7935wwjsk0ibk0qdvqgr699qqgqqmwisbb"))))
8924 (build-system ant-build-system)
8926 `(#:jar-name "jnacl.jar"
8927 #:source-dir "src/main/java"
8930 (modify-phases %standard-phases
8931 (add-before 'build 'fix-tests
8933 (substitute* '("src/test/java/com/neilalexander/jnacl/NaClTest.java"
8934 "src/test/java/com/neilalexander/jnacl/NaclSecretBoxTest.java")
8935 (("assertions.Assertions") "assertions.api.Assertions"))
8939 (invoke "ant" "compile-tests")
8940 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
8942 ":build/test-classes")
8943 "org.testng.TestNG" "-testclass"
8944 "build/test-classes/com/neilalexander/jnacl/NaclSecretBoxTest.class")
8945 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
8947 ":build/test-classes")
8948 "org.testng.TestNG" "-testclass"
8949 "build/test-classes/com/neilalexander/jnacl/NaClTest.class"))))))
8951 `(("java-testng" ,java-testng)
8952 ("java-fest-util" ,java-fest-util)
8953 ("java-fest-assert" ,java-fest-assert)))
8954 (home-page "https://github.com/neilalexander/jnacl")
8955 (synopsis "Java implementation of NaCl")
8956 (description "Pure Java implementation of the NaCl: Networking and
8957 Cryptography library.")
8958 (license license:bsd-2))))
8960 (define-public java-mvel2
8966 (uri (string-append "https://github.com/mvel/mvel/archive/mvel2-"
8967 version ".Final.tar.gz"))
8970 "01ph5s9gm16l2qz58lg21w6fna7xmmrj7f9bzqr1jim7h9557d3z"))))
8971 (build-system ant-build-system)
8973 `(#:jar-name "mvel2.jar"
8974 #:source-dir "src/main/java"
8976 (list "**/Abstract*.java"
8977 ;; Base class with no tests
8978 "**/MVELThreadTest.java")
8980 (modify-phases %standard-phases
8981 (add-after 'install 'install-bin
8982 (lambda* (#:key outputs #:allow-other-keys)
8983 (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
8985 (with-output-to-file (string-append bin "/mvel2")
8989 "#!" (which "bash") "\n"
8990 "if [ \"$#\" -ne \"2\" ]; then\n"
8991 "echo 'Usage: mvel2 <script> <out.dir>'\n"
8994 "java -Dout.dir=$2 -cp " (getenv "CLASSPATH")
8995 ":" (assoc-ref outputs "out") "/share/java/mvel2.jar"
8996 " org.mvel2.sh.Main $1"))))
8997 (chmod (string-append bin "/mvel2") #o755))
9000 `(("junit" ,java-junit)
9001 ("hamcrest" ,java-hamcrest-core)))
9002 (home-page "https://github.com/mvel/mvel")
9003 (synopsis "MVFLEX Expression Language")
9004 (description "MVEL has largely been inspired by Java syntax, but has some
9005 fundamental differences aimed at making it more efficient as an expression
9006 language, such as operators that directly support collection, array and string
9007 matching, as well as regular expressions. MVEL is used to evaluate expressions
9008 written using Java syntax.
9010 In addition to the expression language, MVEL serves as a templating language for
9011 configuration and string construction.")
9012 (license license:asl2.0)))
9014 (define-public java-commons-jexl-2
9016 (name "java-commons-jexl")
9020 (uri (string-append "mirror://apache/commons/jexl/source/"
9021 "commons-jexl-" version "-src.tar.gz"))
9024 "1ai7632bwwaxglb0nbpblpr2jw5g20afrsaq372ipkphi3ncy1jz"))))
9025 (build-system ant-build-system)
9027 `(#:jar-name "commons-jexl-2.jar"
9029 #:source-dir "src/main/java"
9031 (modify-phases %standard-phases
9032 (add-before 'check 'disable-broken-tests
9033 (lambda* (#:key inputs #:allow-other-keys)
9034 (with-directory-excursion "src/test/java/org/apache/commons/jexl2/"
9035 (substitute* "ArithmeticTest.java"
9036 (("asserter.assertExpression\\(\"3 / 0\"") "//")
9037 (("asserter.assertExpression\\(\"imanull") "//"))
9038 ;; This test fails with "ambiguous method invocation"
9039 (delete-file "CacheTest.java")
9040 ;; This test doesn't have access to the temp directory
9041 (substitute* "ClassCreatorTest.java"
9042 (("java.io.tmpdir") "user.dir"))
9043 ;; This test fails in trying to detect whether it can run.
9044 (substitute* "ClassCreator.java"
9045 (("boolean canRun =.*") "boolean canRun = false;\n"))
9046 ;; ...and these tests depend on it.
9047 (delete-file "scripting/JexlScriptEngineOptionalTest.java")
9048 (delete-file "scripting/JexlScriptEngineTest.java"))
9050 (add-before 'build 'run-javacc
9052 (with-directory-excursion "src/main/java/org/apache/commons/jexl2/parser/"
9053 (invoke "java" "jjtree" "Parser.jjt")
9054 (invoke "java" "javacc" "Parser.jj"))
9057 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)))
9059 `(("java-junit" ,java-junit)
9060 ("java-hamcrest-core" ,java-hamcrest-core)
9061 ("javacc" ,javacc-4)))
9062 (home-page "https://commons.apache.org/proper/commons-jexl/")
9063 (synopsis "Java Expression Language ")
9064 (description "JEXL is a library intended to facilitate the implementation
9065 of dynamic and scripting features in applications and frameworks written in
9066 Java. JEXL implements an Expression Language based on some extensions to the
9067 JSTL Expression Language supporting most of the constructs seen in
9068 shell-script or ECMAScript. Its goal is to expose scripting features usable
9069 by technical operatives or consultants working with enterprise platforms.")
9070 (license license:asl2.0)))
9072 (define-public java-lz4
9078 (uri (string-append "https://github.com/lz4/lz4-java/archive/"
9080 (file-name (string-append name "-" version ".tar.gz"))
9083 "096dm57p2lzqk28n0j2p52x2j3cvnsd2dfqn43n7vbwrkjsy7y54"))))
9084 (build-system ant-build-system)
9086 `(#:jar-name "lz4.jar"
9088 #:source-dir "src/java:src/java-unsafe"
9089 #:tests? #f; FIXME: requires more dependencies
9091 (modify-phases %standard-phases
9092 (add-before 'configure 'generate-source
9094 (with-directory-excursion "src/build/source_templates"
9095 (invoke "mvel2" "../gen_sources.mvel" "../../java"))
9098 `(("mvel" ,java-mvel2)))
9099 (home-page "https://jpountz.github.io/lz4-java")
9100 (synopsis "Compression algorithm")
9101 (description "LZ4 - Java is a Java port of the popular lz4 compression
9102 algorithms and xxHash hashing algorithm.")
9103 (license license:asl2.0)))
9105 (define-public java-bouncycastle
9107 (name "java-bouncycastle")
9111 (uri (string-append "https://github.com/bcgit/bc-java/archive/r"
9112 (substring version 0 1) "v"
9113 (substring version 2 4) ".tar.gz"))
9116 "0v434513y708qc87k4xz13p2kzydc736lk3ks67df9mg11s7hchv"))
9117 (modules '((guix build utils)))
9120 (for-each delete-file
9121 (find-files "." "\\.jar$"))
9123 (build-system ant-build-system)
9128 (modify-phases %standard-phases
9131 (invoke "ant" "-f" "ant/jdk15+.xml" "build-provider")
9132 (invoke "ant" "-f" "ant/jdk15+.xml" "build")))
9133 ;; FIXME: the tests freeze.
9136 ;; (invoke "ant" "-f" "ant/jdk15+.xml" "test")))
9138 (install-jars "build/artifacts/jdk1.5/jars")))))
9140 `(("java-javax-mail" ,java-javax-mail)))
9143 ("junit" ,java-junit)
9144 ("java-native-access" ,java-native-access)
9145 ("java-native-access-platform" ,java-native-access-platform)))
9146 (home-page "https://www.bouncycastle.org")
9147 (synopsis "Cryptographic library")
9148 (description "Bouncy Castle is a cryptographic library for the Java
9149 programming language.")
9150 (license license:expat)))
9152 (define-public java-lmax-disruptor
9154 (name "java-lmax-disruptor")
9158 (uri (string-append "https://github.com/LMAX-Exchange/disruptor/"
9159 "archive/" version ".tar.gz"))
9160 (file-name (string-append name "-" version ".tar.gz"))
9163 "17da2gwj5abnlsfgn2xqjk5lgzbg4vkb0hdv2dvc8r2fx4bi7w3g"))))
9164 (build-system ant-build-system)
9166 `(#:jar-name "java-lmax-disruptor.jar"
9168 #:tests? #f)); tests hang
9170 `(("junit" ,java-junit)
9171 ("java-hdrhistogram" ,java-hdrhistogram)
9172 ("java-jmock" ,java-jmock)
9173 ("java-jmock-legacy" ,java-jmock-legacy)
9174 ("java-jmock-junit4" ,java-jmock-junit4)
9175 ("java-hamcrest-all" ,java-hamcrest-all)))
9177 `(("cglib" ,java-cglib)
9178 ("objenesis" ,java-objenesis)
9180 (home-page "https://www.lmax.com/disruptor")
9181 (synopsis "High performance inter-thread communication")
9182 (description "LMAX Disruptor is a software pattern and software component
9183 for high performance inter-thread communication that avoids the need for
9184 message queues or resource locking.")
9185 (license license:asl2.0)))
9187 (define-public java-commons-bcel
9189 (name "java-commons-bcel")
9193 (uri (string-append "mirror://apache/commons/bcel/source/bcel-"
9194 version "-src.tar.gz"))
9197 "0j3x1rxd673k07psclk8k13rqh0x0mf2yy5qiwkiw4z3afa568jy"))))
9198 (build-system ant-build-system)
9200 `(#:jar-name "bcel.jar"
9202 #:source-dir "src/main/java"
9203 #:test-dir "src/test/java"
9204 ;; FIXME: Tests require the unpackaged jna.
9206 (home-page "https://commons.apache.org/proper/commons-bcel/")
9207 (synopsis "Byte code engineering library")
9208 (description "The Byte Code Engineering Library (Apache Commons BCEL) is
9209 intended to give users a convenient way to analyze, create, and
9210 manipulate (binary) Java class files. Classes are represented by objects
9211 which contain all the symbolic information of the given class: methods, fields
9212 and byte code instructions, in particular.
9214 Such objects can be read from an existing file, be transformed by a
9215 program (e.g. a class loader at run-time) and written to a file again. An
9216 even more interesting application is the creation of classes from scratch at
9217 run-time. The @dfn{Byte Code Engineering Library} (BCEL) may be also useful
9218 if you want to learn about the @dfn{Java Virtual Machine} (JVM) and the format
9219 of Java @code{.class} files.")
9220 (license license:asl2.0)))
9222 (define-public java-xerial-core
9224 (name "java-xerial-core")
9228 (uri (string-append "https://github.com/xerial/xerial-java/archive/"
9230 (file-name (string-append name "-" version ".tar.gz"))
9233 "0d3g863i41bgalpa4xr3vm1h140l091n8iwgq5qvby5yivns9y8d"))))
9234 (build-system ant-build-system)
9236 `(#:jar-name "xerial-core.jar"
9237 #:source-dir "xerial-core/src/main/java"
9238 #:test-dir "xerial-core/src/test"
9240 (modify-phases %standard-phases
9241 (add-before 'build 'copy-resources
9243 (copy-recursively "xerial-core/src/main/resources"
9247 `(("junit" ,java-junit)
9248 ("hamcrest" ,java-hamcrest-core)))
9249 (home-page "https://github.com/xerial/xerial-java")
9250 (synopsis "Data management libraries for Java")
9251 (description "Xerial is a set of data management libraries for the Java
9252 programming language. The ultimate goal of the Xerial project is to manage
9253 everything as database, including class objects, text format data, data
9255 (license license:asl2.0)))
9257 (define-public java-powermock-reflect
9259 (name "java-powermock-reflect")
9263 (uri (string-append "https://github.com/powermock/powermock/"
9264 "archive/powermock-" version ".tar.gz"))
9265 (file-name (string-append name "-" version ".tar.gz"))
9268 "0sbgi5vqq7k72wzcdjb20s370vyd4hsbnx71pzb8ishml3gy7fwy"))
9270 (search-patches "java-powermock-fix-java-files.patch"))))
9271 (build-system ant-build-system)
9273 `(#:jar-name "java-powermock-reflect.jar"
9275 #:source-dir "powermock-reflect/src/main/java"
9276 #:test-dir "powermock-reflect/src/test"))
9278 `(("java-objenesis" ,java-objenesis)))
9280 `(("junit" ,java-junit)
9281 ("cglib" ,java-cglib)
9283 ("hamcrest" ,java-hamcrest-core)
9284 ("assertj" ,java-assertj)))
9285 (home-page "https://github.com/powermock/powermock")
9286 (synopsis "Mock library extension framework")
9287 (description "PowerMock is a framework that extends other mock libraries
9288 such as EasyMock with more powerful capabilities. PowerMock uses a custom
9289 classloader and bytecode manipulation to enable mocking of static methods,
9290 constructors, final classes and methods, private methods, removal of static
9291 initializers and more. By using a custom classloader no changes need to be
9292 done to the IDE or continuous integration servers which simplifies adoption.")
9293 (license license:asl2.0)))
9295 (define-public java-powermock-core
9297 (inherit java-powermock-reflect)
9298 (name "java-powermock-core")
9300 `(#:jar-name "java-powermock-core.jar"
9301 #:source-dir "powermock-core/src/main/java"
9302 #:test-dir "powermock-core/src/test"
9303 #:tests? #f; requires powermock-api
9306 (modify-phases %standard-phases
9307 (add-before 'build 'copy-resources
9309 (copy-recursively "powermock-core/src/main/resources"
9313 `(("reflect" ,java-powermock-reflect)
9314 ("javassist" ,java-jboss-javassist)))
9316 `(("junit" ,java-junit)
9317 ("assertj" ,java-assertj)
9318 ("mockito" ,java-mockito-1)))))
9320 (define-public java-powermock-api-support
9322 (inherit java-powermock-reflect)
9323 (name "java-powermock-api-support")
9324 (build-system ant-build-system)
9326 `(#:jar-name "java-powermock-api-support.jar"
9328 #:source-dir "powermock-api/powermock-api-support/src/main/java"
9329 #:tests? #f)); no tests
9331 `(("core" ,java-powermock-core)
9332 ("reflect" ,java-powermock-reflect)))))
9334 (define-public java-powermock-modules-junit4-common
9336 (inherit java-powermock-reflect)
9337 (name "java-powermock-modules-junit4-common")
9338 (build-system ant-build-system)
9340 `(#:jar-name "java-powermock-modules-junit4-common.jar"
9342 #:source-dir "powermock-modules/powermock-module-junit4-common/src/main/java"
9343 #:test-dir "powermock-modules/powermock-module-junit4-common/src/test"))
9345 `(("core" ,java-powermock-core)
9346 ("easymock" ,java-easymock)
9347 ("reflect" ,java-powermock-reflect)
9348 ("hamcrest" ,java-hamcrest-core)
9349 ("cglib" ,java-cglib)))))
9351 (define-public java-powermock-modules-junit4
9353 (inherit java-powermock-reflect)
9354 (name "java-powermock-modules-junit4")
9355 (build-system ant-build-system)
9357 `(#:jar-name "java-powermock-modules-junit4.jar"
9359 #:source-dir "powermock-modules/powermock-module-junit4/src/main/java"
9360 #:test-dir "powermock-modules/powermock-module-junit4/src/test"
9362 (modify-phases %standard-phases
9363 (add-before 'build 'fix-junit-detection
9365 ;; Our junit version is 4.12-SNAPSHOT
9366 (substitute* (find-files "powermock-modules/powermock-module-junit4"
9367 "PowerMockJUnit4MethodValidator.java")
9368 (("4.12") "4.12-SNAPSHOT"))
9371 `(("core" ,java-powermock-core)
9372 ("reflect" ,java-powermock-reflect)
9373 ("common" ,java-powermock-modules-junit4-common)
9374 ("cglib" ,java-cglib)))
9376 `(("easymock" ,java-easymock)
9377 ("hamcrest" ,java-hamcrest-core)
9378 ("objenesis" ,java-objenesis)
9380 ("junit" ,java-junit)))))
9382 (define-public java-powermock-api-easymock
9384 (inherit java-powermock-reflect)
9385 (name "java-powermock-api-easymock")
9386 (build-system ant-build-system)
9388 `(#:jar-name "java-powermock-api-easymock.jar"
9390 #:source-dir "powermock-api/powermock-api-easymock/src/main/java"
9391 #:tests? #f; no tests
9393 (modify-phases %standard-phases
9394 (add-before 'build 'fix-file
9396 ;; FIXME: This looks wrong, but it fixes a build error.
9397 (with-directory-excursion "powermock-api/powermock-api-easymock"
9398 (substitute* "src/main/java/org/powermock/api/easymock/PowerMock.java"
9399 (("classLoader instanceof MockClassLoader") "false")
9400 (("\\(\\(MockClassLoader\\) classLoader\\).*;") ";")))
9403 `(("core" ,java-powermock-core)
9404 ("easymock" ,java-easymock)
9405 ("reflect" ,java-powermock-reflect)
9406 ("support" ,java-powermock-api-support)
9407 ("cglib" ,java-cglib)))))
9409 (define-public java-jboss-jms-api-spec
9411 (name "java-jboss-jms-api-spec")
9415 (uri (string-append "https://github.com/jboss/jboss-jms-api_spec/"
9416 "archive/jboss-jms-api_" version
9417 "_spec-1.0.1.Final.tar.gz"))
9420 "07bqblw9kq2i8q92bz70fvavq5xjfkaixl8xa0m0cypjgy82rb7m"))))
9421 (build-system ant-build-system)
9423 `(#:jar-name "java-jboss-jms-api_spec.jar"
9426 #:tests? #f)); no tests
9427 (home-page "https://github.com/jboss/jboss-jms-api_spec")
9428 (synopsis "Java Message Service API specification")
9429 (description "Java Message Service (JMS) API is used to send messages
9430 messages between two or more clients. It is a messaging standard that allows
9431 application components to create, send, receive, and read messages.")
9432 ; either gpl2 only with GPL Classpath Exception, or cddl.
9433 (license (list license:gpl2 license:cddl1.0))))
9435 (define-public java-mail
9441 (uri (string-append "https://github.com/javaee/javamail/archive/"
9442 "JAVAMAIL-1_6_0.tar.gz"))
9445 "1b4rg7fpj50ld90a71iz2m4gm3f5cnw18p3q3rbrrryjip46kx92"))))
9446 (build-system ant-build-system)
9448 `(#:jar-name "java-mail.jar"
9450 #:source-dir "mail/src/main/java"
9451 #:test-dir "mail/src/test"
9453 (list "**/CollectorFormatterTest.java"
9454 "**/CompactFormatterTest.java"
9455 "**/DurationFilterTest.java"
9456 "**/MailHandlerTest.java"
9457 "**/GetLocalAddressTest.java"
9458 ;; FIXME: both end with:
9459 ;; java.lang.ClassNotFoundException:
9460 ;; javax.mail.internet.MimeMultipartParseTest
9461 "**/MimeMultipartParseTest.java"
9462 "**/SearchTermSerializationTest.java")
9464 (modify-phases %standard-phases
9465 (add-before 'configure 'move-version.java
9467 (copy-file "mail/src/main/resources/javax/mail/Version.java"
9468 "mail/src/main/java/javax/mail/Version.java")
9470 (add-before 'build 'copy-resources
9472 (copy-recursively "mail/src/main/resources/META-INF"
9473 "build/classes/META-INF")
9476 `(("junit" ,java-junit)
9477 ("hamcrest" ,java-hamcrest-core)))
9478 (home-page "https://javaee.github.io/javamail/")
9479 (synopsis "Mail-related functionnalities in Java")
9480 (description "The JavaMail API provides a platform-independent and
9481 protocol-independent framework to build mail and messaging applications.")
9482 ;; General Public License Version 2 only ("GPL") or the Common Development
9483 ;; and Distribution License("CDDL")
9484 (license (list license:cddl1.1
9485 license:gpl2)))); with classpath exception
9487 (define-public java-jeromq
9489 (name "java-jeromq")
9494 (url "https://github.com/zeromq/jeromq.git")
9495 (commit (string-append "v" version))))
9496 (file-name (string-append name "-" version "-checkout"))
9499 "1gxkp7lv2ahymgrqdw94ncq54bmp4m4sw5m1x9gkp7l5bxn0xsyj"))
9500 (patches (search-patches "java-jeromq-fix-tests.patch"))))
9501 (build-system ant-build-system)
9503 `(#:jar-name "java-jeromq.jar"
9504 #:source-dir "src/main/java"
9510 "**/ZBeaconTest.java"
9512 "**/DealerSpecTest.java"
9513 "**/CustomDecoderTest.java"
9514 "**/CustomEncoderTest.java"
9515 "**/ConnectRidTest.java"
9516 "**/ReqSpecTest.java"
9517 "**/PushPullSpecTest.java"
9518 "**/PubSubHwmTest.java"
9519 "**/RouterSpecTest.java"
9520 "**/ProxyTest.java")))
9522 `(("java-jnacl" ,java-jnacl)))
9524 `(("java-hamcrest-core" ,java-hamcrest-core)
9525 ("junit" ,java-junit)))
9526 (home-page "http://zeromq.org/bindings:java")
9527 (synopsis "Java binding for 0MQ")
9528 (description "Jeromq provides the java bindings for 0MQ.")
9529 (license license:mpl2.0)))
9531 (define-public java-kafka-clients
9533 (name "java-kafka-clients")
9537 (uri (string-append "mirror://apache/kafka/" version "/kafka-"
9538 version "-src.tgz"))
9541 "1yxmnsmliwm7671q5yy9bl4jdqyyn00n26cggz9brwczx80w1vfq"))))
9542 (build-system ant-build-system)
9544 `(#:jar-name "java-kafka-clients.jar"
9546 #:source-dir "clients/src/main/java"
9547 #:test-dir "clients/src/test"
9550 ;; This file does not contain a class
9551 "**/IntegrationTest.java"
9553 "**/ClientUtilsTest.java"
9554 ;; End with errors that seem related to our powermock
9555 "**/KafkaProducerTest.java"
9556 "**/BufferPoolTest.java")))
9558 `(("java-slf4j-api" ,java-slf4j-api)
9559 ("java-lz4" ,java-lz4)))
9561 `(("junit" ,java-junit)
9562 ("hamcrest" ,java-hamcrest-all)
9563 ("objenesis" ,java-objenesis)
9565 ("cglib" ,java-cglib)
9566 ("javassist" ,java-jboss-javassist)
9567 ("snappy" ,java-snappy)
9568 ("easymock" ,java-easymock)
9569 ("powermock" ,java-powermock-core)
9570 ("powermock-easymock" ,java-powermock-api-easymock)
9571 ("powermock-junit4-common" ,java-powermock-modules-junit4-common)
9572 ("powermock-junit4" ,java-powermock-modules-junit4)
9573 ("powermock-support" ,java-powermock-api-support)
9574 ("java-bouncycastle" ,java-bouncycastle)))
9575 (home-page "https://kafka.apache.org")
9576 (synopsis "Distributed streaming platform")
9577 (description "Kafka is a distributed streaming platform, which means:
9579 @item it can publish and subscribe to streams of records;
9580 @item it can store streams of records in a fault-tolerant way;
9581 @item it can process streams of records as they occur.
9583 ;; Either cddl or gpl2 only.
9584 (license (list license:cddl1.1; actually cddl1.1
9585 license:gpl2)))); with classpath exception
9587 (define-public java-jdom
9593 (uri (string-append "http://jdom.org/dist/binary/archive/jdom-"
9597 "07wdpm3jwwc9q38kmdw40fvbmv6jzjrkrf8m0zqs58f79a672wfl"))))
9598 (build-system ant-build-system)
9600 `(#:build-target "package"
9601 #:tests? #f; tests are run as part of the build process
9603 (modify-phases %standard-phases
9605 (install-jars "build")))))
9606 (home-page "http://jdom.org/")
9607 (synopsis "Access, manipulate, and output XML data")
9608 (description "Java-based solution for accessing, manipulating, and
9609 outputting XML data from Java code.")
9610 (license license:bsd-4)))
9612 (define-public java-geronimo-xbean-reflect
9614 (name "java-geronimo-xbean-reflect")
9619 (url "https://svn.apache.org/repos/asf/geronimo/xbean/tags/xbean-4.5/")
9620 (revision 1807396)))
9621 (file-name (string-append name "-" version))
9624 "18q3i6jgm6rkw8aysfgihgywrdc5nvijrwnslmi3ww497jvri6ja"))))
9625 (build-system ant-build-system)
9627 `(#:jar-name "geronimo-xbean-reflect.jar"
9628 #:source-dir "xbean-reflect/src/main/java"
9629 #:test-dir "xbean-reflect/src/test"
9632 (list "**/Abstract*.java" "**/AsmParameterNameLoaderTest.java"
9633 "**/ObjectRecipeTest.java" "**/ParameterNameLoaderTest.java"
9634 "**/RecipeHelperTest.java" "**/XbeanAsmParameterNameLoaderTest.java")
9636 (modify-phases %standard-phases
9637 (add-before 'build 'fix-source
9639 (let ((dir "xbean-reflect/src/main/java/org/apache/xbean/recipe/"))
9640 ;; org.apache.xbean.asm6 is actually repackaged java-asm
9641 (substitute* (string-append dir "XbeanAsmParameterNameLoader.java")
9642 (("org.apache.xbean.asm5") "org.objectweb.asm"))
9646 ("log4j" ,java-log4j-api)
9647 ("log4j-1.2" ,java-log4j-1.2-api)
9648 ("log4j-core" ,java-log4j-core)
9649 ("logging" ,java-commons-logging-minimal)))
9651 `(("junit" ,java-junit)))
9652 (home-page "https://geronimo.apache.org/maven/xbean/3.6/xbean-reflect/")
9653 (synopsis "Dependency injection helper")
9654 (description "Xbean-reflect provides very flexible ways to create objects
9655 and graphs of objects for dependency injection frameworks")
9656 (license license:asl2.0)))
9658 (define-public java-geronimo-xbean-bundleutils
9660 (inherit java-geronimo-xbean-reflect)
9661 (name "java-geronimo-xbean-bundleutils")
9663 `(#:jar-name "geronimo-xbean-bundleutils.jar"
9664 #:source-dir "xbean-bundleutils/src/main/java"
9665 #:test-dir "xbean-bundleutils/src/test"
9667 (modify-phases %standard-phases
9668 (add-before 'build 'fix-java
9670 ;; We use a more recent version of osgi, so this file requires
9671 ;; more interface method implementations.
9672 (substitute* "xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/DelegatingBundleContext.java"
9673 (("import org.osgi.framework.ServiceRegistration;")
9674 "import org.osgi.framework.ServiceRegistration;
9675 import org.osgi.framework.ServiceFactory;
9676 import java.util.Collection;
9677 import org.osgi.framework.ServiceObjects;")
9678 (("public Bundle getBundle\\(\\)")
9680 public <S> ServiceObjects<S> getServiceObjects(ServiceReference<S> reference) {
9681 throw new UnsupportedOperationException();
9684 public <S> ServiceRegistration<S> registerService(Class<S> clazz,
9685 ServiceFactory<S> factory, Dictionary<String, ?> properties) {
9686 throw new UnsupportedOperationException();
9688 public Bundle getBundle()"))
9691 `(("java-slf4j" ,java-slf4j-api)
9692 ("java-asm" ,java-asm)
9693 ("java-osgi-framework" ,java-osgi-framework)
9694 ("java-eclipse-osgi" ,java-eclipse-osgi)
9695 ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin)))))
9697 (define-public java-geronimo-xbean-asm-util
9699 (inherit java-geronimo-xbean-reflect)
9700 (name "java-geronimo-xbean-asm-util")
9702 `(#:jar-name "geronimo-xbean-asm-util.jar"
9703 #:source-dir "xbean-asm-util/src/main/java"
9704 #:tests? #f)); no tests
9706 `(("java-asm" ,java-asm)))
9707 (native-inputs '())))
9709 (define-public java-geronimo-xbean-finder
9711 (inherit java-geronimo-xbean-reflect)
9712 (name "java-geronimo-xbean-finder")
9714 `(#:jar-name "geronimo-xbean-finder.jar"
9715 #:source-dir "xbean-finder/src/main/java"
9716 #:test-dir "xbean-finder/src/test"))
9718 `(("java-slf4j-api" ,java-slf4j-api)
9719 ("java-asm" ,java-asm)
9720 ("java-geronimo-xbean-bundleutils" ,java-geronimo-xbean-bundleutils)
9721 ("java-geronimo-xbean-asm-util" ,java-geronimo-xbean-asm-util)
9722 ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin)
9723 ("java-osgi-framework" ,java-osgi-framework)))
9725 `(("java-junit" ,java-junit)
9726 ("java-hamcrest-core" ,java-hamcrest-core)))))
9728 (define-public java-gson
9734 (uri (string-append "https://github.com/google/gson/archive/"
9735 "gson-parent-" version ".tar.gz"))
9738 "1j4qnp7v046q0k48c4kyf69sxaasx2h949d3cqwsm3kzxms3x0f9"))))
9739 (build-system ant-build-system)
9741 `(#:jar-name "gson.jar"
9742 #:source-dir "gson/src/main/java"
9743 #:test-dir "gson/src/test"))
9745 `(("java-junit" ,java-junit)
9746 ("java-hamcrest-core" ,java-hamcrest-core)))
9747 (home-page "https://github.com/google/gson")
9748 (synopsis "Java serialization/deserialization library from/to JSON")
9749 (description "Gson is a Java library that can be used to convert Java
9750 Objects into their JSON representation. It can also be used to convert a JSON
9751 string to an equivalent Java object. Gson can work with arbitrary Java objects
9752 including pre-existing objects that you do not have source-code of.")
9753 (license license:asl2.0)))
9755 (define-public java-hawtjni
9757 (name "java-hawtjni")
9761 (uri (string-append "https://github.com/fusesource/hawtjni/archive/"
9762 "hawtjni-project-" version ".tar.gz"))
9765 "1bqfd732rmh6svyx17fpw9175gc9gzkcbyps2yyrf50c3zzjas6g"))))
9766 (build-system ant-build-system)
9768 `(#:jar-name "hawtjni.jar"
9769 #:source-dir "hawtjni-generator/src/main/java:hawtjni-runtime/src/main/java"
9770 #:tests? #f; no tests
9772 (modify-phases %standard-phases
9773 (add-before 'build 'build-native
9774 (lambda* (#:key inputs #:allow-other-keys)
9775 (let ((include (string-append "-I" (assoc-ref inputs "jdk") "/include/linux")))
9776 (with-directory-excursion "hawtjni-generator/src/main/resources/"
9777 (invoke "gcc" "-c" "hawtjni.c" "-o" "hawtjni.o"
9778 "-fPIC" "-O2" include)
9779 (invoke "gcc" "-c" "hawtjni-callback.c" "-o" "hawtjni-callback.o"
9780 "-fPIC" "-O2" include)
9781 (invoke "gcc" "-o" "libhawtjni.so" "-shared"
9782 "hawtjni.o" "hawtjni-callback.o")))
9784 (add-after 'install 'install-native
9785 (lambda* (#:key outputs #:allow-other-keys)
9786 (let* ((out (assoc-ref outputs "out"))
9787 (lib (string-append out "/lib"))
9788 (inc (string-append out "/include")))
9789 (with-directory-excursion "hawtjni-generator/src/main/resources/"
9790 (install-file "libhawtjni.so" lib)
9791 (install-file "hawtjni.h" inc)))
9794 `(("java-commons-cli" ,java-commons-cli)
9795 ("java-asm" ,java-asm)
9796 ("java-geronimo-xbean-finder" ,java-geronimo-xbean-finder)))
9797 (home-page "https://fusesource.github.io/hawtjni/")
9798 (synopsis "JNI code generator")
9799 (description "HawtJNI is a code generator that produces the JNI code needed
9800 to implement Java native methods. It is based on the jnigen code generator
9801 that is part of the SWT Tools project.")
9802 (license license:asl2.0)))
9804 (define-public java-jansi-native
9806 (name "java-jansi-native")
9810 (uri (string-append "https://github.com/fusesource/jansi-native/"
9811 "archive/jansi-native-" version ".tar.gz"))
9814 "0j2ydlgxbzbgshqkwghbxxxnbnx1mmjgd6k5fw6xfvxw1z956yqf"))))
9815 (build-system ant-build-system)
9817 `(#:jar-name "jansi-native.jar"
9818 #:source-dir "src/main/java"
9819 #:tests? #f; no tests
9821 (modify-phases %standard-phases
9822 (add-before 'build 'build-native
9823 (lambda* (#:key inputs #:allow-other-keys)
9824 ;; there are more required files for windows in windows/
9825 (with-directory-excursion "src/main/native-package/src"
9826 (substitute* "jansi_ttyname.c"
9827 (("#include \"jansi_.*") ""))
9828 (invoke "gcc" "-c" "jansi_ttyname.c" "-o" "jansi_ttyname.o"
9829 (string-append "-I" (assoc-ref inputs "java-hawtjni")
9831 (string-append "-I" (assoc-ref inputs "jdk")
9834 (invoke "gcc" "-o" "libjansi.so" "-shared" "jansi_ttyname.o"))))
9835 (add-before 'build 'install-native
9837 (let ((dir (string-append "build/classes/META-INF/native/"
9838 ,(match (%current-system)
9839 ((or "i686-linux" "armhf-linux")
9841 ((or "x86_64-linux" "aarch64-linux"
9844 (install-file "src/main/native-package/src/libjansi.so" dir))
9846 (add-after 'install 'install-native
9847 (lambda* (#:key outputs #:allow-other-keys)
9848 (install-file "src/main/native-package/src/jansi.h"
9849 (string-append (assoc-ref outputs "out") "/include"))
9852 `(("java-hawtjni" ,java-hawtjni)))
9853 (home-page "https://fusesource.github.io/jansi/")
9854 (synopsis "Native library for jansi")
9855 (description "This package provides the native library for jansi, a small
9856 Java library that allows you to use ANSI escape sequences to format your
9858 (license license:asl2.0)))
9860 (define-public java-jansi
9866 (uri (string-append "https://github.com/fusesource/jansi/archive/"
9867 "jansi-project-" version ".tar.gz"))
9870 "11kh3144i3fzp21dpy8zg52mjmsr214k7km9p8ly0rqk2px0qq2z"))))
9871 (build-system ant-build-system)
9873 `(#:jar-name "jansi.jar"
9874 #:source-dir "jansi/src/main/java"
9875 #:test-dir "jansi/src/test"
9877 (modify-phases %standard-phases
9878 (add-after 'check 'clear-term
9880 (invoke "echo" "-e" "\\e[0m"))))))
9882 `(("java-jansi-native" ,java-jansi-native)))
9884 `(("java-junit" ,java-junit)
9885 ("java-hamcrest-core" ,java-hamcrest-core)))
9886 (home-page "https://fusesource.github.io/jansi/")
9887 (synopsis "Portable ANSI escape sequences")
9888 (description "Jansi is a Java library that allows you to use ANSI escape
9889 sequences to format your console output which works on every platform.")
9890 (license license:asl2.0)))
9892 (define-public java-jboss-el-api-spec
9894 (name "java-jboss-el-api-spec")
9898 (uri (string-append "https://github.com/jboss/jboss-el-api_spec/"
9899 "archive/jboss-el-api_" version
9900 "_spec-1.0.7.Final.tar.gz"))
9903 "1j45ljxalwlibxl7g7iv952sjxkw275m8vyxxij8l6wdd5pf0pdh"))))
9904 (build-system ant-build-system)
9906 `(#:jar-name "java-jboss-el-api_spec.jar"
9909 `(("java-junit" ,java-junit)))
9910 (home-page "https://github.com/jboss/jboss-el-api_spec")
9911 (synopsis "JSR-341 expression language 3.0 API")
9912 (description "This package contains an implementation of the JSR-341
9913 specification for the expression language 3.0. It implements an expression
9914 language inspired by ECMAScript and XPath. This language is used with
9915 JavaServer Pages (JSP).")
9916 ;; Either GPL2 only or CDDL.
9917 (license (list license:gpl2 license:cddl1.1))))
9919 (define-public java-jboss-interceptors-api-spec
9921 (name "java-jboss-interceptors-api-spec")
9925 (uri (string-append "https://github.com/jboss/jboss-interceptors-api_spec/"
9926 "archive/jboss-interceptors-api_" version
9927 "_spec-1.0.0.Final.tar.gz"))
9930 "0wv8x0jp9a5qxlrgkhb5jdk2gr6vi87b4j4kjb8ryxiy9gn8g51z"))))
9931 (build-system ant-build-system)
9933 `(#:jar-name "java-jboss-interceptors-api_spec.jar"
9936 #:tests? #f)); no tests
9937 (home-page "https://github.com/jboss/jboss-interceptors-api_spec")
9938 (synopsis "Interceptors 1.2 API classes from JSR 318")
9939 (description "Java-jboss-interceptors-api-spec implements the Interceptors
9940 API. Interceptors are used to interpose on business method invocations and
9942 ;; Either GPL2 only or CDDL.
9943 (license (list license:gpl2 license:cddl1.1))))
9945 (define-public java-cdi-api
9947 (name "java-cdi-api")
9951 (uri (string-append "https://github.com/cdi-spec/cdi/archive/"
9953 (file-name (string-append name "-" version ".tar.gz"))
9956 "1iv8b8bp07c5kmqic14jsr868vycjv4qv02lf3pkgp9z21mnfg5y"))))
9957 (build-system ant-build-system)
9959 `(#:source-dir "api/src/main/java"
9960 #:jar-name "java-cdi-api.jar"
9961 #:test-dir "api/src/test"
9963 #:tests? #f)); Tests fail because we don't have a CDI provider yet
9965 `(("java-javax-inject" ,java-javax-inject)
9966 ("java-jboss-el-api-spec" ,java-jboss-el-api-spec)
9967 ("java-jboss-interceptors-api-spec" ,java-jboss-interceptors-api-spec)))
9969 `(("java-testng" ,java-testng)
9970 ("java-hamcrest-core" ,java-hamcrest-core)))
9971 (home-page "http://cdi-spec.org/")
9972 (synopsis "Contexts and Dependency Injection APIs")
9973 (description "Java-cdi-api contains the required APIs for Contexts and
9974 Dependency Injection (CDI).")
9975 (license license:asl2.0)))
9977 (define-public java-joda-convert
9979 (name "java-joda-convert")
9983 (uri (string-append "https://github.com/JodaOrg/joda-convert/archive/v"
9985 (file-name (string-append name "-" version ".tar.gz"))
9988 "0vp346xz7dh9br4q7xazhc7hvzf76a6hf95fki9bg67q5jr0kjh7"))))
9989 (build-system ant-build-system)
9991 `(#:jar-name (string-append ,name "-" ,version ".jar")
9992 #:source-dir "src/main/java"
9993 #:test-include (list "**/Test*.java")
9994 ;; Contains only interfaces and base classes (no test)
9995 #:test-exclude (list "**/test*/**.java")))
9997 `(("java-guava" ,java-guava)))
9999 `(("java-junit" ,java-junit)
10000 ("java-hamcrest-core" ,java-hamcrest-core)))
10001 (home-page "http://www.joda.org/joda-convert/")
10002 (synopsis "Conversion between Objects and Strings")
10003 (description "Joda-Convert provides a small set of classes to aid
10004 conversion between Objects and Strings. It is not intended to tackle the
10005 wider problem of Object to Object transformation.")
10006 (license license:asl2.0)))
10008 (define-public java-joda-time
10010 (name "java-joda-time")
10014 (uri (string-append "https://github.com/JodaOrg/joda-time/archive/v"
10015 version ".tar.gz"))
10016 (file-name (string-append name "-" version ".tar.gz"))
10019 "1i9x91mi7yg2pasl0k3912f1pg46n37sps6rdb0v1gs8hj9ppwc1"))))
10020 (build-system ant-build-system)
10022 `(#:jar-name "java-joda-time.jar"
10023 #:source-dir "src/main/java"
10024 #:test-include (list "**/Test*.java")
10025 ;; There is no runnable test in these files
10026 #:test-exclude (list "**/Test*Chronology.java" "**/Test*Field.java")
10028 (modify-phases %standard-phases
10029 (add-after 'build 'build-resources
10031 (mkdir-p "build/classes/org/joda/time/tz/data")
10032 (mkdir-p "build/classes/org/joda/time/format")
10033 ;; This will produce the following exception:
10034 ;; java.io.IOException: Resource not found: "org/joda/time/tz/data/ZoneInfoMap"
10035 ;; which is normal, because it doesn't exist yet. It still generates
10036 ;; the same file as in the binary one can find on maven.
10037 (invoke "java" "-cp"
10038 (string-append "build/classes:" (getenv "CLASSPATH"))
10039 "org.joda.time.tz.ZoneInfoCompiler"
10040 "-src" "src/main/java/org/joda/time/tz/src"
10041 "-dst" "build/classes/org/joda/time/tz/data"
10042 "africa" "antarctica" "asia" "australasia"
10043 "europe" "northamerica" "southamerica"
10044 "pacificnew" "etcetera" "backward" "systemv")
10045 (for-each (lambda (f)
10046 (copy-file f (string-append
10047 "build/classes/org/joda/time/format/"
10049 (find-files "src/main/java/org/joda/time/format" ".*.properties"))
10051 (add-before 'install 'regenerate-jar
10053 ;; We need to regenerate the jar file to add generated data.
10054 (delete-file "build/jar/java-joda-time.jar")
10055 (invoke "ant" "jar")))
10056 (add-before 'check 'copy-test-resources
10058 (mkdir-p "build/test-classes/org/joda/time/tz/data")
10059 (copy-file "src/test/resources/tzdata/ZoneInfoMap"
10060 "build/test-classes/org/joda/time/tz/data/ZoneInfoMap")
10061 (copy-recursively "src/test/resources" "build/test-classes")
10064 `(("java-joda-convert" ,java-joda-convert)))
10066 `(("java-junit" ,java-junit)
10067 ("java-hamcrest-core" ,java-hamcrest-core)
10068 ("tzdata" ,tzdata)))
10069 (home-page "http://www.joda.org/joda-time/")
10070 (synopsis "Replacement for the Java date and time classes")
10071 (description "Joda-Time is a replacement for the Java date and time
10072 classes prior to Java SE 8.")
10073 (license license:asl2.0)))
10075 (define-public java-xerces
10077 (name "java-xerces")
10082 (uri (string-append "mirror://apache/xerces/j/source/"
10083 "Xerces-J-src." version ".tar.gz"))
10085 (base32 "1006igwy2lqrmjvdk64v8dg6qbk9c29pm8xxx7r87n0vnpvmx6pm"))
10086 (patches (search-patches
10087 "java-xerces-xjavac_taskdef.patch"
10088 "java-xerces-build_dont_unzip.patch"
10089 "java-xerces-bootclasspath.patch"))))
10090 (build-system ant-build-system)
10092 `(#:tests? #f;; Test files are not present
10093 #:test-target "test"
10096 (modify-phases %standard-phases
10097 (add-after 'unpack 'create-build.properties
10098 (lambda* (#:key inputs #:allow-other-keys)
10099 (let ((jaxp (assoc-ref inputs "java-jaxp"))
10100 (resolver (assoc-ref inputs "java-apache-xml-commons-resolver")))
10101 (with-output-to-file "build.properties"
10104 "jar.jaxp = ~a/share/java/jaxp.jar~@
10105 jar.apis-ext = ~a/share/java/jaxp.jar~@
10106 jar.resolver = ~a/share/java/xml-resolver.jar~%"
10107 jaxp jaxp resolver)))
10108 ;; Make xerces use our version of jaxp in tests
10109 (substitute* "build.xml"
10111 (string-append jaxp "/share/java/jaxp.jar"))
10112 (("\\$\\{tools.dir\\}/\\$\\{jar.apis\\}")
10115 (replace 'install (install-jars "build")))))
10117 `(("java-apache-xml-commons-resolver" ,java-apache-xml-commons-resolver)
10118 ("java-jaxp" ,java-jaxp)))
10119 (home-page "https://xerces.apache.org/xerces2-j/")
10120 (synopsis "Validating XML parser for Java with DOM level 3 support")
10121 (description "The Xerces2 Java parser is the reference implementation of
10122 XNI, the Xerces Native Interface, and also a fully conforming XML Schema
10125 Xerces2-J supports the following standards and APIs:
10128 @item eXtensible Markup Language (XML) 1.0 Second Edition Recommendation
10129 @item Namespaces in XML Recommendation
10130 @item Document Object Model (DOM) Level 2 Core, Events, and Traversal and
10131 Range Recommendations
10132 @item Simple API for XML (SAX) 2.0.1 Core and Extension
10133 @item Java APIs for XML Processing (JAXP) 1.2.01
10134 @item XML Schema 1.0 Structures and Datatypes Recommendations
10135 @item Experimental implementation of the Document Object Model (DOM) Level 3
10136 Core and Load/Save Working Drafts
10137 @item Provides a partial implementation of the XML Inclusions (XInclude) W3C
10138 Candidate Recommendation
10141 Xerces is now able to parse documents written according to the XML 1.1
10142 Candidate Recommendation, except that it does not yet provide an option to
10143 enable normalization checking as described in section 2.13 of this
10144 specification. It also handles namespaces according to the XML Namespaces 1.1
10145 Candidate Recommendation, and will correctly serialize XML 1.1 documents if
10146 the DOM level 3 load/save API's are in use.")
10147 (license license:asl2.0)))
10149 (define-public java-jakarta-regexp
10151 (name "java-jakarta-regexp")
10156 (uri (string-append
10157 "https://archive.apache.org/dist/jakarta/regexp/jakarta-regexp-"
10158 version ".tar.gz"))
10161 "0zg9rmyif48dck0cv6ynpxv23mmcsx265am1fnnxss7brgw0ms3r"))))
10162 (build-system ant-build-system)
10164 `(#:test-target "test"
10166 (modify-phases %standard-phases
10168 (lambda* (#:key outputs #:allow-other-keys)
10169 (let* ((out (assoc-ref outputs "out"))
10170 (out-share (string-append out "/share/java")))
10171 (mkdir-p out-share)
10172 (for-each (lambda (name)
10173 (install-file name out-share))
10174 (find-files "build" "^jakarta-regexp-.*\\.jar$"))
10176 (home-page "https://attic.apache.org/projects/jakarta-regexp.html")
10177 (synopsis "Regular expression parser generator for Java.")
10178 (description "@code{jakarta-regexp} is an old regular expression parser
10179 generator for Java.")
10180 (license license:asl2.0)))
10182 (define-public java-jline
10184 (name "java-jline")
10188 (uri (string-append "https://github.com/jline/jline1/archive/jline-"
10189 version ".tar.gz"))
10192 "0bi3p6vrh7a6v0fbpb6rx9plpmx5zk3lr352xzdbz2jcxg499wir"))))
10193 (build-system ant-build-system)
10195 `(#:jar-name "jline.jar"
10196 #:source-dir "src/main/java"
10197 #:test-dir "src/test"
10199 (modify-phases %standard-phases
10200 (add-before 'build 'copy-resources
10202 (copy-recursively "src/main/resources" "build/classes")
10205 `(("java-junit" ,java-junit)))
10206 (home-page "https://jline.github.io")
10207 (synopsis "Console input handling library")
10208 (description "JLine is a Java library for handling console input. It is
10209 similar in functionality to BSD editline and GNU readline but with additional
10210 features that bring it on par with the Z shell line editor.")
10211 (license license:bsd-3)))
10213 (define-public java-jline-2
10215 (inherit java-jline)
10219 (uri (string-append "https://github.com/jline/jline2/archive/jline-"
10220 version ".tar.gz"))
10223 "1c6qa26mf0viw8hg4jnv72s7i1qb1gh1l8rrzcdvqhqhx82rkdlf"))))
10226 ,@(package-arguments java-jline)))
10228 `(("java-jansi" ,java-jansi)
10229 ("java-jansi-native" ,java-jansi-native)))
10231 `(("java-powermock-modules-junit4" ,java-powermock-modules-junit4)
10232 ("java-powermock-modules-junit4-common" ,java-powermock-modules-junit4-common)
10233 ("java-powermock-api-easymock" ,java-powermock-api-easymock)
10234 ("java-powermock-api-support" ,java-powermock-api-support)
10235 ("java-powermock-core" ,java-powermock-core)
10236 ("java-powermock-reflect" ,java-powermock-reflect)
10237 ("java-easymock" ,java-easymock)
10238 ("java-jboss-javassist" ,java-jboss-javassist)
10239 ("java-objenesis" ,java-objenesis)
10240 ("java-asm" ,java-asm)
10241 ("java-hamcrest-core" ,java-hamcrest-core)
10242 ("java-cglib" ,java-cglib)
10243 ("java-junit" ,java-junit)
10244 ("java-hawtjni" ,java-hawtjni)))))
10246 (define-public java-xmlunit
10248 (name "java-xmlunit")
10252 (uri (string-append "https://github.com/xmlunit/xmlunit/archive/v"
10253 version ".tar.gz"))
10254 (file-name (string-append name "-" version ".tar.gz"))
10257 "035rivlnmwhfqj0fzviciv0bkh1h95ps1iwnh2kjcvdbk5nccm4z"))))
10258 (build-system ant-build-system)
10260 `(#:jar-name "java-xmlunit.jar"
10261 #:source-dir "xmlunit-core/src/main/java"
10262 #:test-dir "xmlunit-core/src/test"
10264 (modify-phases %standard-phases
10265 (add-before 'check 'copy-test-resources
10266 (lambda* (#:key inputs #:allow-other-keys)
10267 (copy-recursively (assoc-ref inputs "resources") "../test-resources")
10270 `(("java-junit" ,java-junit)
10271 ("java-mockito-1" ,java-mockito-1)
10272 ("java-hamcrest-all" ,java-hamcrest-all)
10273 ("java-objenesis" ,java-objenesis)
10274 ("java-asm" ,java-asm)
10275 ("java-cglib" ,java-cglib)
10279 (uri (git-reference
10280 (url "https://github.com/xmlunit/test-resources.git")
10281 (commit "a590d2ae865c3e0455691d76ba8eefccc2215aec")))
10282 (file-name "java-xmlunit-test-resources")
10285 "0r0glj37pg5l868yjz78gckr91cs8fysxxbp9p328dssssi91agr"))))))
10286 (home-page "http://www.xmlunit.org/")
10287 (synopsis "XML output testing")
10288 (description "XMLUnit provides you with the tools to verify the XML you
10289 emit is the one you want to create. It provides helpers to validate against
10290 an XML Schema, assert the values of XPath queries or compare XML documents
10291 against expected outcomes.")
10292 (license license:asl2.0)))
10294 (define-public java-xmlunit-legacy
10296 (inherit java-xmlunit)
10297 (name "java-xmlunit-legacy")
10299 `(#:jar-name "java-xmlunit-legacy.jar"
10300 #:source-dir "xmlunit-legacy/src/main/java"
10301 #:test-dir "xmlunit-legacy/src/test"))
10303 `(("java-xmlunit" ,java-xmlunit)
10304 ("java-junit" ,java-junit)))
10306 `(("java-mockito-1" ,java-mockito-1)))))
10308 (define-public java-xmlunit-matchers
10310 (inherit java-xmlunit)
10311 (name "java-xmlunit-matchers")
10313 `(#:jar-name "java-xmlunit-matchers.jar"
10314 #:source-dir "xmlunit-matchers/src/main/java"
10315 #:test-dir "xmlunit-matchers/src/test"
10317 ;; Cannot open xsd for http://www.xmlunit.org/test-support/Book.xsd
10318 (list "**/ValidationMatcherTest.java")
10320 (modify-phases %standard-phases
10321 (add-before 'build 'copy-test-class
10323 (copy-file "xmlunit-core/src/test/java/org/xmlunit/TestResources.java"
10324 "xmlunit-matchers/src/test/java/org/xmlunit/TestResources.java")
10326 (add-before 'build 'fix-test-resources-path
10328 (substitute* (find-files "xmlunit-matchers/src/test" ".*.java")
10329 (("../test-resources") "test-resources"))
10331 (add-before 'check 'copy-test-resources
10332 (lambda* (#:key inputs #:allow-other-keys)
10333 (copy-recursively (assoc-ref inputs "resources") "test-resources")
10336 `(("java-xmlunit" ,java-xmlunit)
10337 ("java-junit" ,java-junit)))))
10339 (define-public java-openchart2
10341 (name "java-openchart2")
10345 (uri (string-append "http://download.approximatrix.com/openchart2/"
10346 "openchart2-" version ".source.zip"))
10349 "1xq96zm5r02n1blja0072jmmsifmxc40lbyfbnmcnr6mw42frh4g"))))
10350 (build-system ant-build-system)
10352 `(#:test-target "test"
10354 (modify-phases %standard-phases
10355 (add-after 'unpack 'fix-junit-errors
10357 (with-directory-excursion "unittest/src/com/approximatrix/charting/"
10358 (substitute* '("coordsystem/ticklocator/NumericXTickLocatorTest.java"
10359 "coordsystem/ticklocator/NumericYTickLocatorTest.java"
10360 "coordsystem/ticklocator/ObjectXTickLocatorTest.java"
10361 "model/DefaultChartDataModelConstraintsTest.java"
10362 "model/MultiScatterDataModelConstraintsTest.java"
10363 "model/threedimensional/DotPlotDataModelConstraintsTest.java")
10364 (("(assertEquals[^;]+);" before _)
10365 (string-append (string-drop-right before 2) ", 1E-6);"))))
10367 (replace 'install (install-jars ".")))))
10370 ("java-junit" ,java-junit)
10371 ("java-hamcrest-core" ,java-hamcrest-core)))
10372 (home-page "http://approximatrix.com/products/openchart2/")
10373 (synopsis "Simple plotting for Java")
10374 (description "Openchart2 provides a simple, yet powerful, interface for
10375 Java programmers to create two-dimensional charts and plots. The library
10376 features an assortment of graph styles, including advanced scatter plots, bar
10377 graphs, and pie charts.")
10378 (license license:lgpl2.1+)))
10380 (define-public java-commons-httpclient
10382 (name "java-commons-httpclient")
10386 (uri (string-append "https://archive.apache.org/dist/httpcomponents/"
10387 "commons-httpclient/source/commons-httpclient-"
10388 version "-src.tar.gz"))
10391 "1wlpn3cfy3d4inxy6g7wxcsa8p7sshn6aldk9y4ia3lb879rd97r"))))
10392 (build-system ant-build-system)
10394 `(#:build-target "compile"
10395 #:test-target "test"
10396 #:tests? #f; requires junit-textui (junit 3)
10398 (modify-phases %standard-phases
10399 (add-before 'build 'fix-accent
10401 (for-each (lambda (file)
10402 (with-fluids ((%default-port-encoding "ISO-8859-1"))
10404 (("\\* @author Ortwin .*") "* @author Ortwin Glueck\n"))))
10405 '("src/java/org/apache/commons/httpclient/HttpContentTooLargeException.java"
10406 "src/examples/TrivialApp.java" "src/examples/ClientApp.java"
10407 "src/test/org/apache/commons/httpclient/TestHttps.java"
10408 "src/test/org/apache/commons/httpclient/TestURIUtil2.java"))
10411 (lambda* (#:key outputs #:allow-other-keys)
10412 (invoke "ant" "dist"
10413 (string-append "-Ddist.home=" (assoc-ref outputs "out")
10417 `(("java-commons-logging" ,java-commons-logging-minimal)
10418 ("java-commons-codec" ,java-commons-codec)))
10419 (home-page "https://hc.apache.org")
10420 (synopsis "HTTP/1.1 compliant HTTP agent implementation")
10421 (description "This package contains an HTTP/1.1 compliant HTTP agent
10422 implementation. It also provides reusable components for client-side
10423 authentication, HTTP state management, and HTTP connection management.")
10424 (license license:asl2.0)))
10426 (define-public java-commons-vfs
10428 (name "java-commons-vfs")
10432 (uri (string-append "mirror://apache/commons/vfs/source/"
10433 "commons-vfs2-distribution-" version "-src.tar.gz"))
10434 (file-name (string-append name "-" version ".tar.gz"))
10437 "1cnq1iaghbp4cslpnvwbp83i5v234x87irssqynhwpfgw7caf1s3"))
10438 (modules '((guix build utils)))
10441 (for-each delete-file
10442 (find-files "." "\\.jar$"))
10444 (build-system ant-build-system)
10446 `(#:jar-name "commons-vfs.jar"
10447 #:source-dir "commons-vfs2/src/main/java"
10448 #:test-dir "commons-vfs2/src/test"
10449 ; FIXME: tests depend on many things: apache sshd, hadoop, ftpserver, ...
10452 (modify-phases %standard-phases
10453 (add-before 'build 'remove-hadoop-and-webdav
10454 ; Remove these files as they are not required and depend on difficult
10457 (for-each delete-file-recursively
10458 '("commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/webdav"
10459 "commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/hdfs"))
10462 `(("java-commons-collections4" ,java-commons-collections4)
10463 ("java-commons-compress" ,java-commons-compress)
10464 ("java-commons-httpclient" ,java-commons-httpclient)
10465 ("java-commons-logging-minimal" ,java-commons-logging-minimal)
10466 ("java-commons-net" ,java-commons-net)
10467 ("java-jsch" ,java-jsch)))
10468 (home-page "http://commons.apache.org/proper/commons-vfs/")
10469 (synopsis "Java file system library")
10470 (description "Commons VFS provides a single API for accessing various
10471 different file systems. It presents a uniform view of the files from various
10472 different sources, such as the files on local disk, on an HTTP server, or
10473 inside a Zip archive.")
10474 (license license:asl2.0)))
10476 (define-public java-jakarta-oro
10478 (name "java-jakarta-oro")
10482 (uri (string-append "https://archive.apache.org/dist/jakarta/oro/"
10483 "jakarta-oro-" version ".tar.gz"))
10486 "0rpmnsskiwmsy8r0sckz5n5dbvh3vkxx8hpm177c754r8xy3qksc"))
10487 (modules '((guix build utils)))
10490 (delete-file (string-append "jakarta-oro-" ,version ".jar"))
10492 (build-system ant-build-system)
10494 `(#:build-target "package"
10495 #:tests? #f; tests are run as part of the build process
10497 (modify-phases %standard-phases
10499 (install-jars ,(string-append "jakarta-oro-" version))))))
10500 (home-page "https://jakarta.apache.org/oro/")
10501 (synopsis "Text-processing for Java")
10502 (description "The Jakarta-ORO Java classes are a set of text-processing
10503 Java classes that provide Perl5 compatible regular expressions, AWK-like
10504 regular expressions, glob expressions, and utility classes for performing
10505 substitutions, splits, filtering filenames, etc. This library is the successor
10506 of the OROMatcher, AwkTools, PerlTools, and TextTools libraries originally
10508 (license license:asl1.1)))
10510 (define-public java-native-access
10512 (name "java-native-access")
10516 (uri (string-append "https://github.com/java-native-access/jna/"
10517 "archive/" version ".tar.gz"))
10518 (file-name (string-append name "-" version ".tar.gz"))
10521 "0zrpzkib6b905i018a9pqlzkqinphywr6y4jwv6mwp63jjqvqkd9"))
10522 (modules '((guix build utils)))
10525 (for-each delete-file (find-files "." ".*.jar"))
10526 (delete-file-recursively "native/libffi")
10527 (delete-file-recursively "dist")
10529 (build-system ant-build-system)
10531 `(#:tests? #f; FIXME: tests require reflections.jar
10532 #:test-target "test"
10533 #:make-flags (list "-Ddynlink.native=true")
10535 (modify-phases %standard-phases
10536 (add-before 'build 'fix-build.xml
10537 (lambda* (#:key inputs #:allow-other-keys)
10538 (substitute* "build.xml"
10539 ;; Since we removed the bundled ant.jar, give the correct path
10540 (("lib/ant.jar") (string-append (assoc-ref inputs "ant") "/lib/ant.jar"))
10541 ;; We removed generated native libraries. We can only rebuild one
10542 ;; so don't fail if we can't find a native library for another architecture.
10543 (("zipfileset") "zipfileset erroronmissingarchive=\"false\""))
10544 ;; Copy test dependencies
10545 (copy-file (string-append (assoc-ref inputs "java-junit")
10546 "/share/java/junit.jar")
10548 (copy-file (string-append (assoc-ref inputs "java-hamcrest-core")
10549 "/share/java/hamcrest-core.jar")
10550 "lib/hamcrest-core.jar")
10551 ;; FIXME: once reflections.jar is built, copy it to lib/test.
10553 (add-before 'build 'build-native
10555 (invoke "ant" "-Ddynlink.native=true" "native")
10558 (install-jars "build")))))
10560 `(("libffi" ,libffi)
10564 `(("java-junit" ,java-junit)
10565 ("java-hamcrest-core" ,java-hamcrest-core)))
10566 (home-page "https://github.com/java-native-access/jna")
10567 (synopsis "Access to native shared libraries from Java")
10568 (description "JNA provides Java programs easy access to native shared
10569 libraries without writing anything but Java code - no JNI or native code is
10570 required. JNA allows you to call directly into native functions using natural
10571 Java method invocation.")
10572 ;; Java Native Access project (JNA) is dual-licensed under 2
10573 ;; alternative Free licenses: LGPL 2.1 or later and Apache License 2.0.
10576 license:lgpl2.1+))))
10578 (define-public java-native-access-platform
10580 (inherit java-native-access)
10581 (name "java-native-access-platform")
10583 `(#:test-target "test"
10584 #:tests? #f; require jna-test.jar
10586 (modify-phases %standard-phases
10587 (add-before 'build 'chdir
10589 (chdir "contrib/platform")
10591 (add-after 'chdir 'fix-ant
10592 (lambda* (#:key inputs #:allow-other-keys)
10593 (substitute* "nbproject/project.properties"
10594 (("../../build/jna.jar")
10595 (string-append (assoc-ref inputs "java-native-access")
10596 "/share/java/jna.jar"))
10597 (("../../lib/hamcrest-core-.*.jar")
10598 (string-append (assoc-ref inputs "java-hamcrest-core")
10599 "/share/java/hamcrest-core.jar"))
10600 (("../../lib/junit.jar")
10601 (string-append (assoc-ref inputs "java-junit")
10602 "/share/java/junit.jar")))
10605 (install-jars "dist")))))
10607 `(("java-native-access" ,java-native-access)))
10608 (synopsis "Cross-platform mappings for jna")
10609 (description "java-native-access-platfrom has cross-platform mappings
10610 and mappings for a number of commonly used platform functions, including a
10611 large number of Win32 mappings as well as a set of utility classes that
10612 simplify native access.")))
10614 (define-public java-jsch-agentproxy-core
10616 (name "java-jsch-agentproxy-core")
10620 (uri (string-append "https://github.com/ymnk/jsch-agent-proxy/archive/"
10621 version ".tar.gz"))
10622 (file-name (string-append name "-" version ".tar.gz"))
10625 "02iqg6jbc1kxvfzqcg6wy9ygqxfm82bw5rf6vnswqy4y572niz4q"))))
10626 (build-system ant-build-system)
10628 `(#:jar-name "jsch-agentproxy-core.jar"
10629 #:source-dir "jsch-agent-proxy-core/src/main/java"
10630 #:tests? #f)); no tests
10631 (home-page "https://github.com/ymnk/jsch-agent-proxy")
10632 (synopsis "Core component of the proxy to ssh-agent and Pageant in Java")
10633 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10634 and Pageant included Putty. It will be easily integrated into JSch, and users
10635 will be allowed to use these programs for authentication.")
10636 (license license:bsd-3)))
10638 (define-public java-jsch-agentproxy-sshagent
10640 (inherit java-jsch-agentproxy-core)
10641 (name "java-jsch-agentproxy-sshagent")
10643 `(#:jar-name "jsch-agentproxy-sshagent.jar"
10644 #:source-dir "jsch-agent-proxy-sshagent/src/main/java"
10645 #:tests? #f)); no tests
10647 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
10648 (synopsis "Proxy to ssh-agent")
10649 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10650 and Pageant included in Putty. This component contains the code for a proxy to
10653 (define-public java-jsch-agentproxy-usocket-jna
10655 (inherit java-jsch-agentproxy-core)
10656 (name "java-jsch-agentproxy-usocket-jna")
10658 `(#:jar-name "jsch-agentproxy-usocket-jna.jar"
10659 #:source-dir "jsch-agent-proxy-usocket-jna/src/main/java"
10660 #:tests? #f)); no tests
10662 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
10663 ("java-native-access" ,java-native-access)))
10664 (synopsis "USocketFactory implementation using JNA")
10665 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10666 and Pageant included in Putty. This component contains an implementation of
10667 USocketFactory using @dfn{JNA} (Java Native Access).")))
10669 (define-public java-jsch-agentproxy-pageant
10671 (inherit java-jsch-agentproxy-core)
10672 (name "java-jsch-agentproxy-pageant")
10674 `(#:jar-name "jsch-agentproxy-pageant.jar"
10675 #:source-dir "jsch-agent-proxy-pageant/src/main/java"
10676 #:tests? #f)); no tests
10678 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
10679 ("java-native-access" ,java-native-access)
10680 ("java-native-access-platform" ,java-native-access-platform)))
10681 (synopsis "Proxy to pageant")
10682 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10683 and Pageant included in Putty. This component contains the code for a proxy to
10686 (define-public java-jsch-agentproxy-usocket-nc
10688 (inherit java-jsch-agentproxy-core)
10689 (name "java-jsch-agentproxy-usocket-nc")
10691 `(#:jar-name "jsch-agentproxy-usocket-nc.jar"
10692 #:source-dir "jsch-agent-proxy-usocket-nc/src/main/java"
10693 #:tests? #f)); no tests
10695 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
10696 (synopsis "USocketFactory implementation using netcat")
10697 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10698 and Pageant included in Putty. This component contains an implementation of
10699 USocketFactory using netcat.")))
10701 (define-public java-jsch-agentproxy-connector-factory
10703 (inherit java-jsch-agentproxy-core)
10704 (name "java-jsch-agentproxy-connector-factory")
10706 `(#:jar-name "jsch-agentproxy-connector-factory.jar"
10707 #:source-dir "jsch-agent-proxy-connector-factory/src/main/java"
10708 #:tests? #f)); no tests
10710 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
10711 ("java-jsch-agentproxy-sshagent" ,java-jsch-agentproxy-sshagent)
10712 ("java-jsch-agentproxy-usocket-jna" ,java-jsch-agentproxy-usocket-jna)
10713 ("java-jsch-agentproxy-pageant" ,java-jsch-agentproxy-pageant)
10714 ("java-jsch-agentproxy-usocket-nc" ,java-jsch-agentproxy-usocket-nc)))
10715 (synopsis "Connector factory for jsch agent proxy")
10716 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10717 and Pageant included in Putty. This component contains a connector factory.")))
10719 (define-public java-jsch-agentproxy-jsch
10721 (inherit java-jsch-agentproxy-core)
10722 (name "java-jsch-agentproxy-jsch")
10724 `(#:jar-name "jsch-agentproxy-jsch.jar"
10725 #:source-dir "jsch-agent-proxy-jsch/src/main/java"
10726 #:tests? #f)); no tests
10728 `(("java-jsch" ,java-jsch)
10729 ("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
10730 (synopsis "JSch integration library for agentproxy")
10731 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10732 and Pageant included in Putty. This component contains a library to use
10733 jsch-agent-proxy with JSch.")))
10735 (define-public java-apache-ivy
10737 (name "java-apache-ivy")
10741 (uri (string-append "mirror://apache//ant/ivy/" version
10742 "/apache-ivy-" version "-src.tar.gz"))
10745 "1xkfn57g2m7l6y0xdq75x5rnrgk52m9jx2xah70g3ggl8750hbr0"))
10748 "java-apache-ivy-port-to-latest-bouncycastle.patch"))))
10749 (build-system ant-build-system)
10751 `(#:jar-name "ivy.jar"
10754 (modify-phases %standard-phases
10755 (add-before 'build 'remove-example
10757 (delete-file-recursively "src/example")
10759 (add-before 'build 'copy-resources
10761 (with-directory-excursion "src/java"
10762 (for-each (lambda (file)
10763 (install-file file (string-append "../../build/classes/" (dirname file))))
10765 (find-files "." ".*.css")
10766 (find-files "." ".*.ent")
10767 (find-files "." ".*.html")
10768 (find-files "." ".*.properties")
10769 (find-files "." ".*.xsd")
10770 (find-files "." ".*.xsl")
10771 (find-files "." ".*.xml"))))
10773 (add-before 'build 'fix-vfs
10776 '("src/java/org/apache/ivy/plugins/repository/vfs/VfsRepository.java"
10777 "src/java/org/apache/ivy/plugins/repository/vfs/VfsResource.java")
10778 (("import org.apache.commons.vfs") "import org.apache.commons.vfs2"))
10780 (add-before 'install 'copy-manifest
10782 (install-file "META-INF/MANIFEST.MF" "build/classes/META-INF")
10784 (add-before 'install 'repack
10786 (invoke "jar" "-cmf" "build/classes/META-INF/MANIFEST.MF" "build/jar/ivy.jar"
10787 "-C" "build/classes" ".")))
10788 (add-after 'install 'install-bin
10789 (lambda* (#:key outputs #:allow-other-keys)
10790 (let* ((bin (string-append (assoc-ref outputs "out") "/bin"))
10791 (ivy (string-append bin "/ivy"))
10792 (jar (string-append (assoc-ref outputs "out") "/share/java/ivy.jar")))
10794 (with-output-to-file ivy
10796 (display (string-append
10797 "#!" (which "sh") "\n"
10798 "if [[ -z $CLASSPATH ]]; then\n"
10799 " cp=\"" (getenv "CLASSPATH") ":" jar "\"\n"
10801 " cp=\"" (getenv "CLASSPATH") ":" jar ":$CLASSPATH\"\n"
10803 (which "java") " -cp $cp org.apache.ivy.Main $@\n"))))
10807 `(("java-bouncycastle" ,java-bouncycastle)
10808 ("java-commons-cli" ,java-commons-cli)
10809 ("java-commons-collections" ,java-commons-collections)
10810 ("java-commons-httpclient" ,java-commons-httpclient)
10811 ("java-commons-lang" ,java-commons-lang)
10812 ("java-commons-vfs" ,java-commons-vfs)
10813 ("java-jakarta-oro" ,java-jakarta-oro)
10814 ("java-jsch" ,java-jsch)
10815 ("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
10816 ("java-jsch-agentproxy-connector-factory" ,java-jsch-agentproxy-connector-factory)
10817 ("java-jsch-agentproxy-jsch" ,java-jsch-agentproxy-jsch)
10818 ("java-junit" ,java-junit)))
10819 (home-page "https://ant.apache.org/ivy")
10820 (synopsis "Dependency manager for the Java programming language")
10821 (description "Ivy is a tool for managing (recording, tracking, resolving
10822 and reporting) project dependencies. It is characterized by the following:
10825 @item flexibility and configurability - Ivy is essentially process agnostic
10826 and is not tied to any methodology or structure. Instead it provides the
10827 necessary flexibility and configurability to be adapted to a broad range
10828 of dependency management and build processes.
10829 @item tight integration with Apache Ant - while available as a standalone tool,
10830 Ivy works particularly well with Apache Ant providing a number of
10831 powerful Ant tasks ranging from dependency resolution to dependency
10832 reporting and publication.
10834 (license license:asl2.0)))
10836 (define-public java-eclipse-sisu-inject
10838 (name "java-eclipse-sisu-inject")
10842 (uri (git-reference
10843 (url "https://github.com/eclipse/sisu.inject/")
10844 (commit "releases/0.3.3")))
10845 (file-name (git-file-name name version))
10848 "0gibc9x0bw0f4ls086fx73610fcspz9g2as7kcpcfhvl5znysvg7"))))
10849 (build-system ant-build-system)
10851 `(#:jar-name "eclipse-sisu-inject.jar"
10852 #:source-dir "org.eclipse.sisu.inject/src"
10854 #:tests? #f)); no tests
10856 `(("java-guice" ,java-guice)
10857 ("java-guice-servlet" ,java-guice-servlet)
10858 ("java-javax-inject" ,java-javax-inject)
10859 ("java-javaee-servletapi" ,java-javaee-servletapi)
10860 ("java-junit" ,java-junit)
10861 ("java-slf4j-api" ,java-slf4j-api)
10862 ("java-jsr305" ,java-jsr305)
10863 ("java-jsr250" ,java-jsr250)
10864 ("java-cdi-api" ,java-cdi-api)
10865 ("java-osgi-framework" ,java-osgi-framework)
10866 ("java-osgi-util-tracker" ,java-osgi-util-tracker)
10867 ("java-testng" ,java-testng)))
10868 (home-page "https://www.eclipse.org/sisu/")
10869 (synopsis "Classpath scanning, auto-binding, and dynamic auto-wiring")
10870 (description "Sisu is a modular JSR330-based container that supports
10871 classpath scanning, auto-binding, and dynamic auto-wiring. Sisu uses
10872 Google-Guice to perform dependency injection and provide the core JSR330
10873 support, but removes the need to write explicit bindings in Guice modules.
10874 Integration with other containers via the Eclipse Extension Registry and the
10875 OSGi Service Registry is a goal of this project.")
10876 (license license:epl1.0)))
10878 (define-public java-eclipse-sisu-plexus
10880 (name "java-eclipse-sisu-plexus")
10884 (uri (string-append "https://github.com/eclipse/sisu.plexus/"
10885 "archive/releases/" version ".tar.gz"))
10888 "0lbj7nxy5j0z71k407zbb82icfqh7midrfk0fb3fa3jzdjz0d9d9"))
10889 (modules '((guix build utils)))
10892 (for-each delete-file (find-files "." ".*.jar"))
10893 (rename-file "org.eclipse.sisu.plexus.tests/src"
10894 "org.eclipse.sisu.plexus.tests/java")
10896 (build-system ant-build-system)
10898 `(#:jar-name "eclipse-sisu-plexus.jar"
10899 #:source-dir "org.eclipse.sisu.plexus/src"
10900 #:test-dir "org.eclipse.sisu.plexus.tests"
10903 ;; This test fails probably because we can't generate the necessary
10905 "**/PlexusLoggingTest.*"
10906 ;; FIXME: This test fails because of some injection error
10907 "**/PlexusRequirementTest.*")
10910 (modify-phases %standard-phases
10911 (add-before 'build 'copy-resources
10913 (install-file "org.eclipse.sisu.plexus/META-INF/plexus/components.xml"
10914 "build/classes/META-INF/plexus")
10916 (add-before 'check 'build-test-jar
10918 (with-directory-excursion "org.eclipse.sisu.plexus.tests/resources/component-jar/src/main/"
10920 (with-directory-excursion "java"
10921 (apply invoke "javac" "-cp"
10922 (string-append (getenv "CLASSPATH")
10923 ":../../../../../build/classes")
10924 (find-files "." ".*.java"))
10925 (for-each (lambda (file) (install-file file (string-append "../build/" file)))
10926 (find-files "." ".*.jar")))
10927 (mkdir-p "build/META-INF/plexus")
10928 (copy-file "resources/META-INF/plexus/components.xml"
10929 "build/META-INF/plexus/components.xml")
10930 (with-directory-excursion "build"
10931 (invoke "jar" "cf" "../../../component-jar-0.1.jar" ".")))
10932 (with-directory-excursion "org.eclipse.sisu.plexus.tests/"
10933 (copy-recursively "META-INF" "../build/test-classes/META-INF")
10934 (substitute* "java/org/eclipse/sisu/plexus/DefaultPlexusContainerTest.java"
10935 (("resources/component-jar")
10936 "org.eclipse.sisu.plexus.tests/resources/component-jar")))
10939 `(("java-plexus-classworlds" ,java-plexus-classworlds)
10940 ("java-plexus-util" ,java-plexus-utils)
10941 ("java-plexus-component-annotations" ,java-plexus-component-annotations)
10942 ("java-osgi-framework" ,java-osgi-framework)
10943 ("java-eclipse-sisu-inject" ,java-eclipse-sisu-inject)
10944 ("java-guice" ,java-guice)
10945 ("java-javax-inject" ,java-javax-inject)
10946 ("java-slf4j-api" ,java-slf4j-api)
10947 ("java-junit" ,java-junit)))
10949 `(("java-guava" ,java-guava)
10950 ("java-aopalliance" ,java-aopalliance)
10951 ("java-cglib" ,java-cglib)
10952 ("java-asm" ,java-asm)))
10953 (home-page "https://www.eclipse.org/sisu/")
10954 (synopsis "Plexus support for the sisu container")
10955 (description "Sisu is a modular JSR330-based container that supports
10956 classpath scanning, auto-binding, and dynamic auto-wiring. This package
10957 adds Plexus support to the Sisu-Inject container.")
10958 (license license:epl1.0)))
10960 (define-public java-commons-compiler
10962 (name "java-commons-compiler")
10966 (uri (git-reference
10967 (url "https://github.com/janino-compiler/janino")
10968 (commit "91aa95686d1e4ca3b16a984a03a38686572331b2")))
10969 (file-name (string-append name "-" version))
10972 "04hfdl59sgh20qkxzgnibvs8f9hy6n7znxwpk611y5d89977y62r"))
10973 (modules '((guix build utils)))
10976 (for-each delete-file
10977 (find-files "." "\\.jar$"))
10979 (build-system ant-build-system)
10981 `(#:jar-name "commons-compiler.jar"
10982 #:source-dir "commons-compiler/src/main"
10983 #:tests? #f)); no tests
10984 (home-page "https://github.com/janino-compiler/janino")
10985 (synopsis "Java compiler")
10986 (description "Commons-compiler contains an API for janino, including the
10987 @code{IExpressionEvaluator}, @code{IScriptEvaluator}, @code{IClassBodyEvaluator}
10988 and @code{ISimpleCompiler} interfaces.")
10989 (license license:bsd-3)))
10991 (define-public java-janino
10993 (inherit java-commons-compiler)
10994 (name "java-janino")
10996 `(#:jar-name "janino.jar"
10997 #:source-dir "src/main/java"
10999 (modify-phases %standard-phases
11000 (add-before 'configure 'chdir
11005 `(("java-commons-compiler" ,java-commons-compiler)))
11007 `(("java-junit" ,java-junit)
11008 ("java-hamcrest-core" ,java-hamcrest-core)))
11009 (description "Janino is a Java compiler. Janino can compile a set of
11010 source files to a set of class files like @code{javac}, but also compile a
11011 Java expression, block, class body or source file in memory, load the bytecode
11012 and execute it directly in the same JVM. @code{janino} can also be used for
11013 static code analysis or code manipulation.")))
11015 (define-public java-logback-core
11017 (name "java-logback-core")
11021 (uri (string-append "https://github.com/qos-ch/logback/archive/v_"
11022 version ".tar.gz"))
11023 (file-name (string-append name "-" version ".tar.gz"))
11026 "1x6ga74yfgm94cfx98gybakbrlilx8i2gn6dx13l40kasmys06mi"))
11027 (modules '((guix build utils)))
11030 (delete-file-recursively "logback-access/lib")
11032 (build-system ant-build-system)
11034 `(#:jar-name "logback.jar"
11035 #:source-dir "src/main/java"
11036 #:test-dir "src/test"
11038 ;; These tests fail with Unable to set MockitoNamingPolicy on cglib generator
11039 ;; which creates FastClasses
11040 (list "**/AllCoreTest.*"
11041 "**/AutoFlushingObjectWriterTest.*"
11043 "**/ResilientOutputStreamTest.*"
11044 ;; And we still don't want to run abstract classes
11047 (modify-phases %standard-phases
11048 (add-before 'configure 'chdir
11050 (chdir "logback-core")
11053 `(("java-javax-mail" ,java-javax-mail)
11054 ("servlet" ,java-javaee-servletapi)
11055 ("java-commons-compiler" ,java-commons-compiler)
11056 ("java-janino" ,java-janino)))
11058 `(("java-junit" ,java-junit)
11059 ("java-hamcrest-core" ,java-hamcrest-core)
11060 ("java-mockito-1" ,java-mockito-1)
11061 ("java-cglib" ,java-cglib)
11062 ("java-asm" ,java-asm)
11063 ("java-objenesis" ,java-objenesis)
11064 ("java-joda-time" ,java-joda-time)))
11065 (home-page "https://logback.qos.ch")
11066 (synopsis "Logging for java")
11067 (description "Logback is intended as a successor to the popular log4j project.
11068 This module lays the groundwork for the other two modules.")
11069 ;; Either epl1.0 or lgpl2.1
11070 (license (list license:epl1.0
11071 license:lgpl2.1))))
11073 (define-public java-logback-classic
11075 (inherit java-logback-core)
11076 (name "java-logback-classic")
11078 `(#:jar-name "logback-classic.jar"
11079 #:source-dir "src/main/java"
11080 #:test-dir "src/test"
11081 #:tests? #f; tests require more packages: h2, greenmail, hsql, subethamail, slf4j, log4j, felix
11084 (modify-phases %standard-phases
11085 (add-before 'configure 'chdir
11087 (chdir "logback-classic")
11090 (lambda* (#:key inputs #:allow-other-keys)
11091 (mkdir-p "build/classes")
11092 (setenv "CLASSPATH"
11094 (apply append (map (lambda (input)
11095 (find-files (assoc-ref inputs input)
11097 '("java-logback-core" "java-slf4j-api"
11098 "java-commons-compiler" "servlet"
11101 (apply invoke "groovyc" "-d" "build/classes" "-j"
11102 (find-files "src/main/" ".*\\.(groovy|java)$"))
11103 (invoke "ant" "jar")
11106 `(("java-logback-core" ,java-logback-core)
11107 ("java-slf4j-api" ,java-slf4j-api)
11108 ,@(package-inputs java-logback-core)))
11110 `(("groovy" ,groovy)))
11111 (description "Logback is intended as a successor to the popular log4j project.
11112 This module can be assimilated to a significantly improved version of log4j.
11113 Moreover, @code{logback-classic} natively implements the slf4j API so that you
11114 can readily switch back and forth between logback and other logging frameworks
11115 such as log4j or @code{java.util.logging} (JUL).")))
11117 (define-public java-qdox
11120 ; Newer version exists, but this version is required by java-plexus-component-metadata
11124 ;; 2.0-M4, -M5 at https://github.com/paul-hammant/qdox
11125 ;; Older releases at https://github.com/codehaus/qdox/
11126 ;; Note: The release at maven is pre-generated. The release at
11127 ;; github requires jflex.
11128 (uri (string-append "http://central.maven.org/maven2/"
11129 "com/thoughtworks/qdox/qdox/" version
11130 "/qdox-" version "-sources.jar"))
11133 "10xxrcaicq6axszcr2jpygisa4ch4sinyx5q7kqqxv4lknrmxp5x"))))
11134 (build-system ant-build-system)
11136 `(#:jar-name "qdox.jar"
11137 #:tests? #f)); no tests
11138 (home-page "http://qdox.codehaus.org/")
11139 (synopsis "Parse definitions from Java source files")
11140 (description "QDox is a high speed, small footprint parser for extracting
11141 class/interface/method definitions from source files complete with JavaDoc
11142 @code{@@tags}. It is designed to be used by active code generators or
11143 documentation tools.")
11144 (license license:asl2.0)))
11146 (define-public java-jgit
11149 (version "4.7.0.201704051617-r")
11152 (uri (string-append "https://repo1.maven.org/maven2/"
11153 "org/eclipse/jgit/org.eclipse.jgit/"
11154 version "/org.eclipse.jgit-"
11155 version "-sources.jar"))
11158 "13ii4jn02ynzq6i7gsyi21k2i94jpc85wf6bcm31q4cyvzv0mk4k"))))
11159 (build-system ant-build-system)
11161 `(#:tests? #f ; There are no tests to run.
11162 #:jar-name "jgit.jar"
11163 ;; JGit must be built with a JDK supporting Java 8.
11165 ;; Target our older default JDK.
11166 #:make-flags (list "-Dtarget=1.7")
11168 (modify-phases %standard-phases
11169 ;; The jar file generated by the default build.xml does not include
11170 ;; the text properties files, so we need to add them.
11171 (add-after 'build 'add-properties
11172 (lambda* (#:key jar-name #:allow-other-keys)
11173 (with-directory-excursion "src"
11174 (apply invoke "jar" "-uf"
11175 (string-append "../build/jar/" jar-name)
11176 (find-files "." "\\.properties$")))
11179 `(("java-classpathx-servletapi" ,java-classpathx-servletapi)
11180 ("java-javaewah" ,java-javaewah)
11181 ("java-jsch" ,java-jsch)
11182 ("java-slf4j-api" ,java-slf4j-api)))
11183 (home-page "https://eclipse.org/jgit/")
11184 (synopsis "Java library implementing the Git version control system")
11185 (description "JGit is a lightweight, pure Java library implementing the
11186 Git version control system, providing repository access routines, support for
11187 network protocols, and core version control algorithms.")
11188 (license license:edl1.0)))
11190 ;; For axoloti. This package can still be built with icedtea-7, which is
11191 ;; currently used as the default JDK.
11192 (define-public java-jgit-4.2
11193 (package (inherit java-jgit)
11194 (version "4.2.0.201601211800-r")
11197 (uri (string-append "https://repo1.maven.org/maven2/"
11198 "org/eclipse/jgit/org.eclipse.jgit/"
11199 version "/org.eclipse.jgit-"
11200 version "-sources.jar"))
11203 "15gm537iivhnzlkjym4x3wn5jqdjdragsw9pdpzqqg21nrc817mm"))))
11204 (build-system ant-build-system)
11206 (substitute-keyword-arguments (package-arguments java-jgit)
11207 ;; Build for default JDK.
11208 ((#:jdk _) icedtea-7)
11210 `(modify-phases ,phases
11211 (add-after 'unpack 'use-latest-javaewah-API
11213 (substitute* "src/org/eclipse/jgit/internal/storage/file/BitmapIndexImpl.java"
11214 (("wordinbits") "WORD_IN_BITS"))
11217 `(("java-javaewah" ,java-javaewah)
11218 ("java-jsch" ,java-jsch)
11219 ("java-slf4j-api" ,java-slf4j-api)))))
11221 (define-public abcl
11228 (uri (string-append "https://abcl.org/releases/"
11229 version "/abcl-src-" version ".tar.gz"))
11232 "1hhvcg050nfpjbdmskc1cv2j38qi6qfl77a61b5cxx576kbff3lj"))
11235 "abcl-fix-build-xml.patch"))))
11236 (build-system ant-build-system)
11238 `(("java-junit" ,java-junit)))
11240 `(#:build-target "abcl.jar"
11241 #:test-target "abcl.test"
11243 (modify-phases %standard-phases
11245 (lambda* (#:key outputs #:allow-other-keys)
11246 (let ((share (string-append (assoc-ref outputs "out")
11248 (bin (string-append (assoc-ref outputs "out")
11251 (install-file "dist/abcl.jar" share)
11252 (install-file "dist/abcl-contrib.jar" share)
11254 (with-output-to-file (string-append bin "abcl")
11256 (let ((classpath (string-append
11259 share "abcl-contrib.jar")))
11260 (display (string-append
11261 "#!" (which "sh") "\n"
11262 "if [[ -z $CLASSPATH ]]; then\n"
11263 " cp=\"" classpath "\"\n"
11265 " cp=\"" classpath ":$CLASSPATH\"\n"
11267 "exec " (which "java")
11268 " -cp $cp org.armedbear.lisp.Main $@\n")))))
11269 (chmod (string-append bin "abcl") #o755)
11271 (home-page "https://abcl.org/")
11272 (synopsis "Common Lisp Implementation on the JVM")
11274 "@dfn{Armed Bear Common Lisp} (ABCL) is a full implementation of the Common
11275 Lisp language featuring both an interpreter and a compiler, running in the
11276 JVM. It supports JSR-223 (Java scripting API): it can be a scripting engine
11277 in any Java application. Additionally, it can be used to implement (parts of)
11278 the application using Java to Lisp integration APIs.")
11279 (license (list license:gpl2+
11280 ;; named-readtables is released under 3 clause BSD
11282 ;; jfli is released under CPL 1.0