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 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>
14 ;;; This file is part of GNU Guix.
16 ;;; GNU Guix is free software; you can redistribute it and/or modify it
17 ;;; under the terms of the GNU General Public License as published by
18 ;;; the Free Software Foundation; either version 3 of the License, or (at
19 ;;; your option) any later version.
21 ;;; GNU Guix is distributed in the hope that it will be useful, but
22 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
23 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 ;;; GNU General Public License for more details.
26 ;;; You should have received a copy of the GNU General Public License
27 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
29 (define-module (gnu packages java)
30 #:use-module ((guix licenses) #:prefix license:)
31 #:use-module (guix packages)
32 #:use-module (guix download)
33 #:use-module (guix hg-download)
34 #:use-module (guix git-download)
35 #:use-module (guix svn-download)
36 #:use-module (guix utils)
37 #:use-module (guix build-system ant)
38 #:use-module (guix build-system gnu)
39 #:use-module (guix build-system trivial)
40 #:use-module (gnu packages)
41 #:use-module (gnu packages attr)
42 #:use-module (gnu packages autotools)
43 #:use-module (gnu packages base)
44 #:use-module (gnu packages bash)
45 #:use-module (gnu packages certs)
46 #:use-module (gnu packages cpio)
47 #:use-module (gnu packages cups)
48 #:use-module (gnu packages compression)
49 #:use-module (gnu packages elf)
50 #:use-module (gnu packages fontutils)
51 #:use-module (gnu packages gawk)
52 #:use-module (gnu packages gettext)
53 #:use-module (gnu packages gcc)
54 #:use-module (gnu packages gl)
55 #:use-module (gnu packages ghostscript) ;lcms
56 #:use-module (gnu packages gnome)
57 #:use-module (gnu packages groovy)
58 #:use-module (gnu packages gtk)
59 #:use-module (gnu packages guile)
60 #:use-module (gnu packages icu4c)
61 #:use-module (gnu packages image)
62 #:use-module (gnu packages java-compression)
63 #:use-module (gnu packages libffi)
64 #:use-module (gnu packages linux) ;alsa
65 #:use-module (gnu packages maths)
66 #:use-module (gnu packages nss)
67 #:use-module (gnu packages onc-rpc)
68 #:use-module (gnu packages web)
69 #:use-module (gnu packages wget)
70 #:use-module (gnu packages pkg-config)
71 #:use-module (gnu packages perl)
72 #:use-module (gnu packages popt)
73 #:use-module (gnu packages kerberos)
74 #:use-module (gnu packages xml)
75 #:use-module (gnu packages xorg)
76 #:use-module (gnu packages texinfo)
77 #:use-module ((srfi srfi-1) #:select (fold alist-delete))
78 #:use-module (srfi srfi-11)
79 #:use-module (ice-9 match))
83 ;;; Java bootstrap toolchain.
86 ;; The Java bootstrap begins with Jikes, a Java compiler written in C++. We
87 ;; use it to build a simple version of GNU Classpath, the Java standard
88 ;; library. We chose version 0.93 because it is the last version that can be
89 ;; built with Jikes. With Jikes and this version of GNU Classpath we can
90 ;; build JamVM, a Java Virtual Machine. We build version 1.5.1 because it is
91 ;; the last version of JamVM that works with a version of GNU classpath that
92 ;; does not require ECJ. These three packages make up the bootstrap JDK.
94 ;; This is sufficient to build an older version of Ant, which is needed to
95 ;; build an older version of ECJ, an incremental Java compiler, both of which
96 ;; are written in Java.
98 ;; ECJ is needed to build the latest release (0.99) and the development
99 ;; version of GNU Classpath. The development version of GNU Classpath has
100 ;; much more support for Java 1.6 than the latest release, but we need to
101 ;; build 0.99 first to get a working version of javah. ECJ, the development
102 ;; version of GNU Classpath, and the latest version of JamVM make up the
103 ;; second stage JDK with which we can build the OpenJDK with the Icedtea 1.x
104 ;; build framework. We then build the more recent JDKs Icedtea 2.x and
113 (uri (string-append "mirror://sourceforge/jikes/Jikes/"
114 version "/jikes-" version ".tar.bz2"))
117 "1qqldrp74pzpy5ly421srqn30qppmm9cvjiqdngk8hf47dv2rc0c"))))
118 (build-system gnu-build-system)
119 (home-page "http://jikes.sourceforge.net/")
120 (synopsis "Compiler for the Java language")
121 (description "Jikes is a compiler that translates Java source files as
122 defined in The Java Language Specification into the bytecoded instruction set
123 and binary format defined in The Java Virtual Machine Specification.")
124 (license license:ibmpl1.0)))
126 ;; This is the last version of GNU Classpath that can be built without ECJ.
127 (define classpath-bootstrap
133 (uri (string-append "mirror://gnu/classpath/classpath-"
137 "0i99wf9xd3hw1sj2sazychb9prx8nadxh2clgvk3zlmb28v0jbfz"))
138 (patches (search-patches "classpath-aarch64-support.patch"))))
139 (build-system gnu-build-system)
142 (list (string-append "JAVAC="
143 (assoc-ref %build-inputs "jikes")
148 "--disable-gconf-peer"
154 (modify-phases %standard-phases
155 (add-after 'install 'install-data
156 (lambda _ (invoke "make" "install-data"))))))
161 ("pkg-config" ,pkg-config)))
162 (home-page "https://www.gnu.org/software/classpath/")
163 (synopsis "Essential libraries for Java")
164 (description "GNU Classpath is a project to create core class libraries
165 for use with runtimes, compilers and tools for the Java programming
167 ;; GPLv2 or later, with special linking exception.
168 (license license:gpl2+)))
170 ;; This is the last version of JamVM that works with a version of GNU
171 ;; classpath that does not require ECJ.
172 (define jamvm-1-bootstrap
178 (uri (string-append "mirror://sourceforge/jamvm/jamvm/"
179 "JamVM%20" version "/jamvm-"
181 (patches (search-patches "jamvm-arm.patch"))
184 "06lhi03l3b0h48pc7x58bk9my2nrcf1flpmglvys3wyad6yraf36"))))
185 (build-system gnu-build-system)
188 (list (string-append "--with-classpath-install-dir="
189 (assoc-ref %build-inputs "classpath")))))
191 `(("classpath" ,classpath-bootstrap)
194 (home-page "http://jamvm.sourceforge.net/")
195 (synopsis "Small Java Virtual Machine")
196 (description "JamVM is a Java Virtual Machine conforming to the JVM
197 specification edition 2 (blue book). It is extremely small. However, unlike
198 other small VMs it supports the full spec, including object finalisation and
200 (license license:gpl2+)))
202 (define ant-bootstrap
204 (name "ant-bootstrap")
205 ;; The 1.10.x series requires Java 8. 1.9.0 and later use generics, which
206 ;; are not supported. The 1.8.x series is the last to use only features
207 ;; supported by Jikes.
211 (uri (string-append "http://archive.apache.org/dist/"
212 "ant/source/apache-ant-"
213 version "-src.tar.bz2"))
216 "1cg0lga887qz5iizh6mlkxp01lciymrhmp7wzxpl6zpnldxmzrjx"))))
217 (build-system gnu-build-system)
219 `(#:imported-modules ((guix build syscalls)
220 ,@%gnu-build-system-modules)
221 #:modules ((srfi srfi-1)
222 (guix build gnu-build-system)
224 (guix build syscalls))
225 #:tests? #f ; no "check" target
227 (modify-phases %standard-phases
231 (lambda* (#:key inputs #:allow-other-keys)
232 (setenv "JAVA_HOME" (assoc-ref inputs "jamvm"))
234 (string-append (assoc-ref inputs "jamvm")
237 (string-append (assoc-ref inputs "jikes")
240 (string-append (assoc-ref inputs "jamvm")
243 ;; Ant complains if this file doesn't exist.
244 (setenv "HOME" "/tmp")
245 (with-output-to-file "/tmp/.ant.properties"
246 (lambda _ (display "")))
248 ;; Use jikes instead of javac for <javac ...> tags in build.xml
249 (setenv "ANT_OPTS" "-Dbuild.compiler=jikes")
251 ;; jikes produces lots of warnings, but they are not very
252 ;; interesting, so we silence them.
253 (setenv "$BOOTJAVAC_OPTS" "-nowarn")
255 ;; Without these JamVM options the build may freeze.
256 (substitute* "bootstrap.sh"
257 (("^\"\\$\\{JAVACMD\\}\" " m)
258 ,@(if (string-prefix? "armhf" (or (%current-system)
259 (%current-target-system)))
260 `((string-append m "-Xnocompact "))
261 `((string-append m "-Xnocompact -Xnoinlining ")))))
263 ;; Disable tests because we are bootstrapping and thus don't have
264 ;; any of the dependencies required to build and run the tests.
265 (substitute* "build.xml"
266 (("depends=\"jars,test-jar\"") "depends=\"jars\""))
267 (invoke "bash" "bootstrap.sh"
268 (string-append "-Ddist.dir="
269 (assoc-ref %outputs "out")))))
270 (add-after 'build 'strip-jar-timestamps ;based on ant-build-system
271 (lambda* (#:key outputs #:allow-other-keys)
272 (define (repack-archive jar)
273 (let* ((dir (mkdtemp! "jar-contents.XXXXXX"))
274 (manifest (string-append dir "/META-INF/MANIFESTS.MF")))
275 (with-directory-excursion dir
276 (invoke "unzip" jar))
278 ;; XXX: copied from (gnu build install)
279 (for-each (lambda (file)
280 (let ((s (lstat file)))
281 (unless (eq? (stat:type s) 'symlink)
282 (utime file 0 0 0 0))))
283 (find-files dir #:directories? #t))
284 ;; It is important that the manifest appears first.
285 (with-directory-excursion dir
286 (let* ((files (find-files "." ".*" #:directories? #t))
287 ;; To ensure that the reference scanner can
288 ;; detect all store references in the jars
289 ;; we disable compression with the "-0" option.
290 (command (if (file-exists? manifest)
291 `("zip" "-0" "-X" ,jar ,manifest
293 `("zip" "-0" "-X" ,jar ,@files))))
294 (apply invoke command)))))
295 (for-each repack-archive
297 (string-append (assoc-ref %outputs "out") "/lib")
303 ("jamvm" ,jamvm-1-bootstrap)
306 (home-page "http://ant.apache.org")
307 (synopsis "Build tool for Java")
309 "Ant is a platform-independent build tool for Java. It is similar to
310 make but is implemented using the Java language, requires the Java platform,
311 and is best suited to building Java projects. Ant uses XML to describe the
312 build process and its dependencies, whereas Make uses Makefile format.")
313 (license license:asl2.0)))
315 ;; Version 3.2.2 is the last version without a dependency on a full-fledged
316 ;; compiler for Java 1.5.
317 (define ecj-bootstrap
319 (name "ecj-bootstrap")
323 (uri (string-append "http://archive.eclipse.org/eclipse/"
324 "downloads/drops/R-" version
325 "-200702121330/ecjsrc.zip"))
328 "05hj82kxd23qaglsjkaqcj944riisjha7acf7h3ljhrjyljx8307"))))
329 ;; It would be so much easier if we could use the ant-build-system, but we
330 ;; cannot as we don't have ant at this point. We use ecj for
331 ;; bootstrapping the JDK.
332 (build-system gnu-build-system)
334 `(#:modules ((guix build gnu-build-system)
337 #:tests? #f ; there are no tests
339 (modify-phases %standard-phases
341 (lambda* (#:key inputs #:allow-other-keys)
344 (cons (string-append (assoc-ref inputs "jamvm")
346 (find-files (string-append
347 (assoc-ref inputs "ant-bootstrap")
353 (lambda* (#:key inputs #:allow-other-keys)
354 ;; The unpack phase enters the "org" directory by mistake.
357 ;; Create a simple manifest to make ecj executable.
358 (with-output-to-file "manifest"
360 (display "Manifest-Version: 1.0
361 Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n")))
364 (and (apply invoke "jikes"
365 (find-files "." "\\.java$"))
366 (invoke "fastjar" "cvfm"
367 "ecj-bootstrap.jar" "manifest" "."))))
369 (lambda* (#:key outputs #:allow-other-keys)
370 (let ((share (string-append (assoc-ref outputs "out")
373 (install-file "ecj-bootstrap.jar" share)
376 `(("ant-bootstrap" ,ant-bootstrap)
379 ("jamvm" ,jamvm-1-bootstrap)
380 ("fastjar" ,fastjar)))
381 (home-page "https://eclipse.org")
382 (synopsis "Eclipse Java development tools core batch compiler")
383 (description "This package provides the Eclipse Java core batch compiler
384 for bootstrapping purposes. The @dfn{Eclipse compiler for Java} (ecj) is a
385 requirement for all GNU Classpath releases after version 0.93.")
386 (license license:epl1.0)))
388 (define ecj-javac-wrapper
389 (package (inherit ecj-bootstrap)
390 (name "ecj-javac-wrapper")
392 (build-system trivial-build-system)
394 `(#:modules ((guix build utils))
397 (use-modules (guix build utils))
398 (let* ((bin (string-append (assoc-ref %outputs "out") "/bin"))
399 (target (string-append bin "/javac"))
400 (guile (string-append (assoc-ref %build-inputs "guile")
402 (ecj (string-append (assoc-ref %build-inputs "ecj-bootstrap")
403 "/share/java/ecj-bootstrap.jar"))
404 (java (string-append (assoc-ref %build-inputs "jamvm")
406 (bootcp (let ((jvmlib (string-append (assoc-ref %build-inputs "classpath")
407 "/share/classpath")))
408 (string-append jvmlib "/glibj.zip:"
409 jvmlib "/tools.zip"))))
411 (with-output-to-file target
413 (format #t "#!~a --no-auto-compile\n!#\n" guile)
415 `(begin (use-modules (ice-9 match)
421 '(("-bootclasspath" ,bootcp)
426 (let ((classpath (getenv "CLASSPATH")))
428 (string-join (list ,ecj
429 ,(string-append (assoc-ref %build-inputs "jamvm")
433 (receive (vm-args other-args)
434 ;; Separate VM arguments from arguments to ECJ.
435 (partition (cut string-prefix? "-J" <>)
436 (fold (lambda (default acc)
437 (if (member (first default) acc)
438 acc (append default acc)))
442 ;; Remove "-J" prefix
443 (map (cut string-drop <> 2) vm-args)
444 '("org.eclipse.jdt.internal.compiler.batch.Main")
445 (cons "-nowarn" other-args)))))
447 (let ((args (cdr (command-line))))
449 (format (current-error-port) "javac: no arguments given!\n")
454 `(("guile" ,guile-2.2)
455 ("ecj-bootstrap" ,ecj-bootstrap)
456 ("jamvm" ,jamvm-1-bootstrap)
457 ("classpath" ,classpath-bootstrap)))
458 (description "This package provides a wrapper around the @dfn{Eclipse
459 compiler for Java} (ecj) with a command line interface that is compatible with
460 the standard javac executable.")))
462 ;; The classpath-bootstrap was built without a virtual machine, so it does not
463 ;; provide a wrapper for javah. We cannot build the development version of
464 ;; Classpath without javah.
465 (define classpath-0.99
466 (package (inherit classpath-bootstrap)
470 (uri (string-append "mirror://gnu/classpath/classpath-"
474 "1j7cby4k66f1nvckm48xcmh352b1d1b33qk7l6hi7dp9i9zjjagr"))
475 (patches (search-patches "classpath-aarch64-support.patch"))))
478 (list (string-append "--with-ecj-jar="
479 (assoc-ref %build-inputs "ecj-bootstrap")
480 "/share/java/ecj-bootstrap.jar")
481 (string-append "JAVAC="
482 (assoc-ref %build-inputs "ecj-javac-wrapper")
484 (string-append "JAVA="
485 (assoc-ref %build-inputs "jamvm")
488 "ac_cv_prog_java_works=yes" ; trust me
492 "--disable-gconf-peer"
498 (modify-phases %standard-phases
499 (add-after 'install 'install-data
500 (lambda _ (invoke "make" "install-data"))))))
502 `(("ecj-bootstrap" ,ecj-bootstrap)
503 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
505 ("jamvm" ,jamvm-1-bootstrap)
506 ("classpath" ,classpath-bootstrap)
508 ("pkg-config" ,pkg-config)))))
510 ;; We need this because classpath-bootstrap does not provide all of the tools
511 ;; we need to build classpath-devel.
512 (define classpath-jamvm-wrappers
513 (package (inherit classpath-0.99)
514 (name "classpath-jamvm-wrappers")
516 (build-system trivial-build-system)
518 `(#:modules ((guix build utils))
521 (use-modules (guix build utils))
522 (let* ((bash (assoc-ref %build-inputs "bash"))
523 (jamvm (assoc-ref %build-inputs "jamvm"))
524 (classpath (assoc-ref %build-inputs "classpath"))
525 (bin (string-append (assoc-ref %outputs "out")
528 (for-each (lambda (tool)
529 (with-output-to-file (string-append bin tool)
531 ,@(if (string-prefix? "armhf" (or (%current-system)
532 (%current-target-system)))
533 `((format #t "#!~a/bin/sh
534 ~a/bin/jamvm -Xnocompact -classpath ~a/share/classpath/tools.zip \
535 gnu.classpath.tools.~a.~a $@"
536 bash jamvm classpath tool
537 (if (string=? "native2ascii" tool)
538 "Native2ASCII" "Main")))
539 `((format #t "#!~a/bin/sh
540 ~a/bin/jamvm -Xnocompact -Xnoinlining -classpath ~a/share/classpath/tools.zip \
541 gnu.classpath.tools.~a.~a $@"
542 bash jamvm classpath tool
543 (if (string=? "native2ascii" tool)
544 "Native2ASCII" "Main"))))))
545 (chmod (string-append bin tool) #o755))
555 ("jamvm" ,jamvm-1-bootstrap)
556 ("classpath" ,classpath-0.99)))
558 (synopsis "Executables from GNU Classpath")
559 (description "This package provides wrappers around the tools provided by
560 the GNU Classpath library. They are executed by the JamVM virtual
563 ;; The last release of GNU Classpath is 0.99 and it happened in 2012. Since
564 ;; then Classpath has gained much more support for Java 1.6.
565 (define-public classpath-devel
566 (let ((commit "e7c13ee0cf2005206fbec0eca677f8cf66d5a103")
568 (package (inherit classpath-bootstrap)
569 (version (string-append "0.99-" revision "." (string-take commit 9)))
573 (url "https://git.savannah.gnu.org/git/classpath.git")
575 (file-name (string-append "classpath-" version "-checkout"))
578 "1v2rww76ww322mpg3s12a1kkc6gkp31bm9gcxs532h0wq285fiw4"))))
581 ;; Ensure that the initial heap size is smaller than the maximum
582 ;; size. By default only Xmx is set, which can lead to invalid
583 ;; memory settings on some machines with a lot of memory.
584 '("JAVAC_MEM_OPT=-J-Xms512M -J-Xmx768M")
586 (list (string-append "--with-ecj-jar="
587 (assoc-ref %build-inputs "ecj-bootstrap")
588 "/share/java/ecj-bootstrap.jar")
589 (string-append "--with-javac="
590 (assoc-ref %build-inputs "ecj-javac-wrapper")
592 (string-append "JAVA="
593 (assoc-ref %build-inputs "jamvm")
596 "ac_cv_prog_java_works=yes" ; trust me
600 "--disable-gconf-peer"
606 (modify-phases %standard-phases
607 ;; XXX The bootstrap phase executes autogen.sh, which fails after
608 ;; complaining about the lack of gettext.
610 (lambda _ (invoke "autoreconf" "-vif")))
611 (add-after 'unpack 'remove-unsupported-annotations
613 (substitute* (find-files "java" "\\.java$")
616 (add-after 'install 'install-data
617 (lambda _ (invoke "make" "install-data"))))))
619 `(("autoconf" ,autoconf)
620 ("automake" ,automake)
622 ("gettext" ,gettext-minimal)
624 ("classpath-jamvm-wrappers" ,classpath-jamvm-wrappers) ; for javah
625 ("ecj-bootstrap" ,ecj-bootstrap)
626 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
628 ("jamvm" ,jamvm-1-bootstrap)
630 ("pkg-config" ,pkg-config))))))
633 (package (inherit jamvm-1-bootstrap)
637 (uri (string-append "mirror://sourceforge/jamvm/jamvm/"
638 "JamVM%20" version "/jamvm-"
642 "1nl0zxz8y5x8gwsrm7n32bry4dx8x70p8z3s9jbdvs8avyb8whkn"))))
643 (build-system gnu-build-system)
646 (list (string-append "--with-classpath-install-dir="
647 (assoc-ref %build-inputs "classpath")))))
649 `(("classpath" ,classpath-devel)
650 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
653 (define ecj-javac-wrapper-final
654 (package (inherit ecj-javac-wrapper)
656 `(("guile" ,guile-2.2)
657 ("ecj-bootstrap" ,ecj-bootstrap)
659 ("classpath" ,classpath-devel)))))
661 ;; The bootstrap JDK consisting of jamvm, classpath-devel,
662 ;; ecj-javac-wrapper-final cannot build Icedtea 2.x directly, because it's
663 ;; written in Java 7. It can, however, build the unmaintained Icedtea 1.x,
664 ;; which uses Java 6 only.
665 (define-public icedtea-6
672 "http://icedtea.wildebeest.org/download/source/icedtea6-"
676 "0bg9sb4f7qbq77c0zf9m17p47ga0kf0r9622g9p12ysg26jd1ksg"))
677 (modules '((guix build utils)))
680 (substitute* "Makefile.in"
681 ;; do not leak information about the build host
682 (("DISTRIBUTION_ID=\"\\$\\(DIST_ID\\)\"")
683 "DISTRIBUTION_ID=\"\\\"guix\\\"\""))
685 (build-system gnu-build-system)
686 (outputs '("out" ; Java Runtime Environment
687 "jdk" ; Java Development Kit
688 "doc")) ; all documentation
690 `(;; There are many failing tests and many are known to fail upstream.
693 ;; The DSOs use $ORIGIN to refer to each other, but (guix build
694 ;; gremlin) doesn't support it yet, so skip this phase.
695 #:validate-runpath? #f
697 #:modules ((guix build utils)
698 (guix build gnu-build-system)
702 `("--enable-bootstrap"
705 "--with-parallel-jobs"
706 "--disable-downloading"
708 ,(string-append "--with-ecj="
709 (assoc-ref %build-inputs "ecj")
710 "/share/java/ecj-bootstrap.jar")
711 ,(string-append "--with-jar="
712 (assoc-ref %build-inputs "fastjar")
714 ,(string-append "--with-jdk-home="
715 (assoc-ref %build-inputs "classpath"))
716 ,(string-append "--with-java="
717 (assoc-ref %build-inputs "jamvm")
720 (modify-phases %standard-phases
722 (lambda* (#:key source inputs #:allow-other-keys)
723 (invoke "tar" "xvf" source)
724 (chdir (string-append "icedtea6-" ,version))
726 (copy-recursively (assoc-ref inputs "openjdk-src") "openjdk")
727 ;; The convenient OpenJDK source bundle is no longer
728 ;; available for download, so we have to take the sources
729 ;; from the Mercurial repositories and change the Makefile
730 ;; to avoid tests for the OpenJDK zip archive.
731 (with-directory-excursion "openjdk"
732 (for-each (lambda (part)
736 (string-append part "-src"))
739 "langtools" "jaxp" "jaxws")))
740 (with-directory-excursion "openjdk"
741 (invoke "tar" "xvf" (assoc-ref inputs "hotspot-src"))
742 (rename-file "hg-checkout" "hotspot"))
743 (substitute* "Makefile.in"
744 (("echo \"ERROR: No up-to-date OpenJDK zip available\"; exit -1;")
745 "echo \"trust me\";")
746 ;; The contents of the bootstrap directory must be
747 ;; writeable but when copying from the store they are
749 (("mkdir -p lib/rt" line)
750 (string-append line "; chmod -R u+w $(BOOT_DIR)")))
751 (invoke "chmod" "-R" "u+w" "openjdk")))
752 (add-after 'unpack 'use-classpath
753 (lambda* (#:key inputs #:allow-other-keys)
754 (let ((jvmlib (assoc-ref inputs "classpath"))
755 (jamvm (assoc-ref inputs "jamvm")))
756 ;; Classpath does not provide rt.jar.
757 (substitute* "Makefile.in"
758 (("\\$\\(SYSTEM_JDK_DIR\\)/jre/lib/rt.jar")
759 (string-append jvmlib "/share/classpath/glibj.zip")))
760 ;; Make sure we can find all classes.
762 (string-append jvmlib "/share/classpath/glibj.zip:"
763 jvmlib "/share/classpath/tools.zip:"
764 jamvm "/lib/rt.jar"))
766 (string-append "-cp "
767 jvmlib "/share/classpath/glibj.zip:"
768 jvmlib "/share/classpath/tools.zip")))
770 (add-after 'unpack 'patch-patches
772 ;; shebang in patches so that they apply cleanly
773 (substitute* '("patches/jtreg-jrunscript.patch"
774 "patches/hotspot/hs23/drop_unlicensed_test.patch")
775 (("#!/bin/sh") (string-append "#!" (which "sh"))))
777 (add-after 'unpack 'patch-paths
778 (lambda* (#:key inputs #:allow-other-keys)
779 ;; buildtree.make generates shell scripts, so we need to replace
780 ;; the generated shebang
781 (substitute* '("openjdk/hotspot/make/linux/makefiles/buildtree.make")
782 (("/bin/sh") (which "bash")))
784 (let ((corebin (string-append
785 (assoc-ref inputs "coreutils") "/bin/"))
786 (binbin (string-append
787 (assoc-ref inputs "binutils") "/bin/"))
788 (grepbin (string-append
789 (assoc-ref inputs "grep") "/bin/")))
790 (substitute* '("openjdk/jdk/make/common/shared/Defs-linux.gmk"
791 "openjdk/corba/make/common/shared/Defs-linux.gmk")
792 (("UNIXCOMMAND_PATH = /bin/")
793 (string-append "UNIXCOMMAND_PATH = " corebin))
794 (("USRBIN_PATH = /usr/bin/")
795 (string-append "USRBIN_PATH = " corebin))
796 (("DEVTOOLS_PATH *= */usr/bin/")
797 (string-append "DEVTOOLS_PATH = " corebin))
798 (("COMPILER_PATH *= */usr/bin/")
799 (string-append "COMPILER_PATH = "
800 (assoc-ref inputs "gcc") "/bin/"))
801 (("DEF_OBJCOPY *=.*objcopy")
802 (string-append "DEF_OBJCOPY = " (which "objcopy"))))
804 ;; fix path to alsa header
805 (substitute* "openjdk/jdk/make/common/shared/Sanity.gmk"
806 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
807 (string-append "ALSA_INCLUDE="
808 (assoc-ref inputs "alsa-lib")
809 "/include/alsa/version.h")))
811 ;; fix hard-coded utility paths
812 (substitute* '("openjdk/jdk/make/common/shared/Defs-utils.gmk"
813 "openjdk/corba/make/common/shared/Defs-utils.gmk")
815 (string-append "ECHO = " (which "echo")))
817 (string-append "GREP = " (which "grep")))
819 (string-append "EGREP = " (which "egrep")))
821 (string-append "CPIO = " (which "cpio")))
822 (("READELF *=.*readelf")
823 (string-append "READELF = " (which "readelf")))
825 (string-append "AR = " (which "ar")))
827 (string-append "TAR = " (which "tar")))
829 (string-append "AS = " (which "as")))
831 (string-append "LD = " (which "ld")))
833 (string-append "STRIP = " (which "strip")))
835 (string-append "NM = " (which "nm")))
837 (string-append "SH = " (which "bash")))
839 (string-append "FIND = " (which "find")))
841 (string-append "LDD = " (which "ldd")))
842 (("NAWK *=.*(n|g)awk")
843 (string-append "NAWK = " (which "gawk")))
845 (string-append "XARGS = " (which "xargs")))
847 (string-append "UNZIP = " (which "unzip")))
849 (string-append "ZIPEXE = " (which "zip")))
851 (string-append "SED = " (which "sed"))))
853 ;; Some of these timestamps cause problems as they are more than
854 ;; 10 years ago, failing the build process.
856 "openjdk/jdk/src/share/classes/java/util/CurrencyData.properties"
857 (("AZ=AZM;2005-12-31-20-00-00;AZN") "AZ=AZN")
858 (("MZ=MZM;2006-06-30-22-00-00;MZN") "MZ=MZN")
859 (("RO=ROL;2005-06-30-21-00-00;RON") "RO=RON")
860 (("TR=TRL;2004-12-31-22-00-00;TRY") "TR=TRY"))
862 (add-before 'configure 'set-additional-paths
863 (lambda* (#:key inputs #:allow-other-keys)
865 (string-append (assoc-ref inputs "libxrender")
866 "/include/X11/extensions" ":"
867 (assoc-ref inputs "libxtst")
868 "/include/X11/extensions" ":"
869 (assoc-ref inputs "libxinerama")
870 "/include/X11/extensions" ":"
871 (or (getenv "CPATH") "")))
872 (setenv "ALT_CUPS_HEADERS_PATH"
873 (string-append (assoc-ref inputs "cups")
875 (setenv "ALT_FREETYPE_HEADERS_PATH"
876 (string-append (assoc-ref inputs "freetype")
878 (setenv "ALT_FREETYPE_LIB_PATH"
879 (string-append (assoc-ref inputs "freetype")
882 (add-before 'build 'disable-os-version-check
883 ;; allow build on linux major version change
885 (setenv "DISABLE_HOTSPOT_OS_VERSION_CHECK" "ok")
888 (lambda* (#:key outputs #:allow-other-keys)
889 (let ((doc (string-append (assoc-ref outputs "doc")
890 "/share/doc/icedtea"))
891 (jre (assoc-ref outputs "out"))
892 (jdk (assoc-ref outputs "jdk")))
893 (copy-recursively "openjdk.build/docs" doc)
894 (copy-recursively "openjdk.build/j2re-image" jre)
895 (copy-recursively "openjdk.build/j2sdk-image" jdk))
898 `(("ant" ,ant-bootstrap)
899 ("alsa-lib" ,alsa-lib)
901 ("classpath" ,classpath-devel)
902 ("coreutils" ,coreutils)
905 ("ecj" ,ecj-bootstrap)
906 ("ecj-javac" ,ecj-javac-wrapper-final)
908 ("fontconfig" ,fontconfig)
909 ("freetype" ,freetype)
910 ("gcc" ,gcc-4.9) ; there's a segmentation fault when compiling with gcc-5 or gcc-7
922 ("libxcomposite" ,libxcomposite)
924 ("libxinerama" ,libxinerama)
925 ("libxrender" ,libxrender)
926 ("libxslt" ,libxslt) ;for xsltproc
929 ("mit-krb5" ,mit-krb5)
931 ("nss-certs" ,nss-certs)
933 ("pkg-config" ,pkg-config)
934 ("procps" ,procps) ;for "free", even though I'm not sure we should use it
944 (url "http://hg.openjdk.java.net/jdk6/jdk6/")
945 (changeset "jdk6-b41")))
948 "14q47yfg586fs64w30g8mk92m5dkxsvr36zzh0ra99xk5x0x96mv"))))
953 (url "http://hg.openjdk.java.net/jdk6/jdk6/jdk/")
954 (changeset "jdk6-b41")))
957 "165824nhg1k1dx6zs9dny0j49rmk35jw5b13dmz8c77jfajml4v9"))))
962 (url "http://hg.openjdk.java.net/jdk6/jdk6/hotspot/")
963 (changeset "jdk6-b41")))
966 "07lc1z4k5dj9nrc1wvwmpvxr3xgxrdkdh53xb95skk5ij49yagfd"))
968 (search-patches "icedtea-6-hotspot-gcc-segfault-workaround.patch"))))
973 (url "http://hg.openjdk.java.net/jdk6/jdk6/corba/")
974 (changeset "jdk6-b41")))
977 "1p9g1r9dnax2iwp7yb59qx7m4nmshqhwmrb2b8jj8zgbd9dl2i3q"))))
982 (url "http://hg.openjdk.java.net/jdk6/jdk6/langtools/")
983 (changeset "jdk6-b41")))
986 "1x52wd67fynbbd9ild6fb4wvba3f5hhwk03qdjfazd0a1qr37z3d"))))
991 (url "http://hg.openjdk.java.net/jdk6/jdk6/jaxp/")
992 (changeset "jdk6-b41")))
995 "0shlqrvzpr4nrkmv215lbxnby63s3yvbdh1yxcayznsyqwa4nlxm"))))
1000 (url "http://hg.openjdk.java.net/jdk6/jdk6/jaxws/")
1001 (changeset "jdk6-b41")))
1004 "0835lkw8vib1xhp8lxnybhlvzdh699hbi4mclxanydjk63zbpxk0"))))))
1005 (home-page "http://icedtea.classpath.org")
1006 (synopsis "Java development kit")
1008 "This package provides the OpenJDK built with the IcedTea build harness.
1009 This version of the OpenJDK is no longer maintained and is only used for
1010 bootstrapping purposes.")
1011 ;; IcedTea is released under the GPL2 + Classpath exception, which is the
1012 ;; same license as both GNU Classpath and OpenJDK.
1013 (license license:gpl2+)))
1015 (define-public icedtea-7
1016 (let* ((version "2.6.13")
1017 (drop (lambda (name hash)
1021 "http://icedtea.classpath.org/download/drops"
1022 "/icedtea7/" version "/" name ".tar.bz2"))
1023 (sha256 (base32 hash))))))
1030 "http://icedtea.wildebeest.org/download/source/icedtea-"
1034 "1w331rdqx1dcx2xb0fmjmrkdc71xqn20fxsgw8by4xhiblh88khh"))
1035 (modules '((guix build utils)))
1038 (substitute* "Makefile.in"
1039 ;; do not leak information about the build host
1040 (("DISTRIBUTION_ID=\"\\$\\(DIST_ID\\)\"")
1041 "DISTRIBUTION_ID=\"\\\"guix\\\"\""))
1043 (build-system gnu-build-system)
1044 (outputs '("out" ; Java Runtime Environment
1045 "jdk" ; Java Development Kit
1046 "doc")) ; all documentation
1048 `(;; There are many test failures. Some are known to
1049 ;; fail upstream, others relate to not having an X
1050 ;; server running at test time, yet others are a
1051 ;; complete mystery to me.
1053 ;; hotspot: passed: 241; failed: 45; error: 2
1054 ;; langtools: passed: 1,934; failed: 26
1058 ;; The DSOs use $ORIGIN to refer to each other, but (guix build
1059 ;; gremlin) doesn't support it yet, so skip this phase.
1060 #:validate-runpath? #f
1062 ;; Apparently, the C locale is needed for some of the tests.
1065 #:modules ((guix build utils)
1066 (guix build gnu-build-system)
1073 ;; TODO: package pcsc and sctp, and add to inputs
1074 `("--disable-system-pcsc"
1075 "--disable-system-sctp"
1076 "--enable-bootstrap"
1079 "--disable-downloading"
1080 "--disable-tests" ;they are run in the check phase instead
1081 "--with-openjdk-src-dir=./openjdk.src"
1082 ,(string-append "--with-jdk-home="
1083 (assoc-ref %build-inputs "jdk")))
1086 (modify-phases %standard-phases
1088 (lambda* (#:key source inputs #:allow-other-keys)
1089 (let ((target (string-append "icedtea-" ,version))
1090 (unpack (lambda* (name #:optional dir)
1092 (string-drop-right name 5))))
1095 (assoc-ref inputs name)
1097 "--strip-components=1")))))
1099 (invoke "tar" "xvf" source
1100 "-C" target "--strip-components=1")
1102 (unpack "openjdk-src" "openjdk.src")
1103 (with-directory-excursion "openjdk.src"
1105 (filter (cut string-suffix? "-drop" <>)
1110 (add-after 'unpack 'fix-x11-extension-include-path
1111 (lambda* (#:key inputs #:allow-other-keys)
1112 (substitute* "openjdk.src/jdk/make/sun/awt/mawt.gmk"
1113 (((string-append "\\$\\(firstword \\$\\(wildcard "
1114 "\\$\\(OPENWIN_HOME\\)"
1115 "/include/X11/extensions\\).*$"))
1116 (string-append (assoc-ref inputs "libxrender")
1117 "/include/X11/extensions"
1118 " -I" (assoc-ref inputs "libxtst")
1119 "/include/X11/extensions"
1120 " -I" (assoc-ref inputs "libxinerama")
1121 "/include/X11/extensions"))
1122 (("\\$\\(wildcard /usr/include/X11/extensions\\)\\)") ""))
1124 (add-after 'unpack 'patch-paths
1126 ;; buildtree.make generates shell scripts, so we need to replace
1127 ;; the generated shebang
1128 (substitute* '("openjdk.src/hotspot/make/linux/makefiles/buildtree.make")
1129 (("/bin/sh") (which "bash")))
1131 (let ((corebin (string-append
1132 (assoc-ref %build-inputs "coreutils") "/bin/"))
1133 (binbin (string-append
1134 (assoc-ref %build-inputs "binutils") "/bin/"))
1135 (grepbin (string-append
1136 (assoc-ref %build-inputs "grep") "/bin/")))
1137 (substitute* '("openjdk.src/jdk/make/common/shared/Defs-linux.gmk"
1138 "openjdk.src/corba/make/common/shared/Defs-linux.gmk")
1139 (("UNIXCOMMAND_PATH = /bin/")
1140 (string-append "UNIXCOMMAND_PATH = " corebin))
1141 (("USRBIN_PATH = /usr/bin/")
1142 (string-append "USRBIN_PATH = " corebin))
1143 (("DEVTOOLS_PATH *= */usr/bin/")
1144 (string-append "DEVTOOLS_PATH = " corebin))
1145 (("COMPILER_PATH *= */usr/bin/")
1146 (string-append "COMPILER_PATH = "
1147 (assoc-ref %build-inputs "gcc") "/bin/"))
1148 (("DEF_OBJCOPY *=.*objcopy")
1149 (string-append "DEF_OBJCOPY = " (which "objcopy"))))
1151 ;; fix path to alsa header
1152 (substitute* "openjdk.src/jdk/make/common/shared/Sanity.gmk"
1153 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
1154 (string-append "ALSA_INCLUDE="
1155 (assoc-ref %build-inputs "alsa-lib")
1156 "/include/alsa/version.h")))
1158 ;; fix hard-coded utility paths
1159 (substitute* '("openjdk.src/jdk/make/common/shared/Defs-utils.gmk"
1160 "openjdk.src/corba/make/common/shared/Defs-utils.gmk")
1162 (string-append "ECHO = " (which "echo")))
1164 (string-append "GREP = " (which "grep")))
1165 (("EGREP *=.*egrep")
1166 (string-append "EGREP = " (which "egrep")))
1168 (string-append "CPIO = " (which "cpio")))
1169 (("READELF *=.*readelf")
1170 (string-append "READELF = " (which "readelf")))
1172 (string-append "AR = " (which "ar")))
1174 (string-append "TAR = " (which "tar")))
1176 (string-append "AS = " (which "as")))
1178 (string-append "LD = " (which "ld")))
1179 (("STRIP *=.*strip")
1180 (string-append "STRIP = " (which "strip")))
1182 (string-append "NM = " (which "nm")))
1184 (string-append "SH = " (which "bash")))
1186 (string-append "FIND = " (which "find")))
1188 (string-append "LDD = " (which "ldd")))
1189 (("NAWK *=.*(n|g)awk")
1190 (string-append "NAWK = " (which "gawk")))
1191 (("XARGS *=.*xargs")
1192 (string-append "XARGS = " (which "xargs")))
1193 (("UNZIP *=.*unzip")
1194 (string-append "UNZIP = " (which "unzip")))
1196 (string-append "ZIPEXE = " (which "zip")))
1198 (string-append "SED = " (which "sed"))))
1200 ;; Some of these timestamps cause problems as they are more than
1201 ;; 10 years ago, failing the build process.
1203 "openjdk.src/jdk/src/share/classes/java/util/CurrencyData.properties"
1204 (("AZ=AZM;2005-12-31-20-00-00;AZN") "AZ=AZN")
1205 (("MZ=MZM;2006-06-30-22-00-00;MZN") "MZ=MZN")
1206 (("RO=ROL;2005-06-30-21-00-00;RON") "RO=RON")
1207 (("TR=TRL;2004-12-31-22-00-00;TRY") "TR=TRY")))
1209 (add-before 'configure 'set-additional-paths
1210 (lambda* (#:key inputs #:allow-other-keys)
1211 (substitute* "openjdk.src/jdk/make/common/shared/Sanity.gmk"
1212 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
1213 (string-append "ALSA_INCLUDE="
1214 (assoc-ref inputs "alsa-lib")
1215 "/include/alsa/version.h")))
1218 (string-append (assoc-ref inputs "libxcomposite")
1219 "/include/X11/extensions" ":"
1220 (assoc-ref inputs "libxrender")
1221 "/include/X11/extensions" ":"
1222 (assoc-ref inputs "libxtst")
1223 "/include/X11/extensions" ":"
1224 (assoc-ref inputs "libxinerama")
1225 "/include/X11/extensions" ":"
1226 (or (getenv "CPATH") "")))
1227 (setenv "ALT_OBJCOPY" (which "objcopy"))
1228 (setenv "ALT_CUPS_HEADERS_PATH"
1229 (string-append (assoc-ref inputs "cups")
1231 (setenv "ALT_FREETYPE_HEADERS_PATH"
1232 (string-append (assoc-ref inputs "freetype")
1234 (setenv "ALT_FREETYPE_LIB_PATH"
1235 (string-append (assoc-ref inputs "freetype")
1238 (add-before 'build 'disable-os-version-check
1239 ;; allow build on linux major version change
1241 (setenv "DISABLE_HOTSPOT_OS_VERSION_CHECK" "ok")
1243 (add-before 'check 'fix-test-framework
1245 ;; Fix PATH in test environment
1246 (substitute* "test/jtreg/com/sun/javatest/regtest/Main.java"
1247 (("PATH=/bin:/usr/bin")
1248 (string-append "PATH=" (getenv "PATH"))))
1249 (substitute* "test/jtreg/com/sun/javatest/util/SysEnv.java"
1250 (("/usr/bin/env") (which "env")))
1251 (substitute* "openjdk.src/hotspot/test/test_env.sh"
1252 (("/bin/rm") (which "rm"))
1253 (("/bin/cp") (which "cp"))
1254 (("/bin/mv") (which "mv")))
1256 (add-before 'check 'fix-hotspot-tests
1258 (with-directory-excursion "openjdk.src/hotspot/test/"
1259 (substitute* "jprt.config"
1260 (("PATH=\"\\$\\{path4sdk\\}\"")
1261 (string-append "PATH=" (getenv "PATH")))
1262 (("make=/usr/bin/make")
1263 (string-append "make=" (which "make"))))
1264 (substitute* '("runtime/6626217/Test6626217.sh"
1265 "runtime/7110720/Test7110720.sh")
1266 (("/bin/rm") (which "rm"))
1267 (("/bin/cp") (which "cp"))
1268 (("/bin/mv") (which "mv"))))
1270 (add-before 'check 'fix-jdk-tests
1272 (with-directory-excursion "openjdk.src/jdk/test/"
1273 (substitute* "com/sun/jdi/JdbReadTwiceTest.sh"
1274 (("/bin/pwd") (which "pwd")))
1275 (substitute* "com/sun/jdi/ShellScaffold.sh"
1276 (("/bin/kill") (which "kill")))
1277 (substitute* "start-Xvfb.sh"
1278 ;;(("/usr/bin/X11/Xvfb") (which "Xvfb"))
1279 (("/usr/bin/nohup") (which "nohup")))
1280 (substitute* "javax/security/auth/Subject/doAs/Test.sh"
1281 (("/bin/rm") (which "rm")))
1282 (substitute* "tools/launcher/MultipleJRE.sh"
1283 (("echo \"#!/bin/sh\"")
1284 (string-append "echo \"#!" (which "rm") "\""))
1285 (("/usr/bin/zip") (which "zip")))
1286 (substitute* "com/sun/jdi/OnThrowTest.java"
1287 (("#!/bin/sh") (string-append "#!" (which "sh"))))
1288 (substitute* "java/lang/management/OperatingSystemMXBean/GetSystemLoadAverage.java"
1289 (("/usr/bin/uptime") (which "uptime")))
1290 (substitute* "java/lang/ProcessBuilder/Basic.java"
1291 (("/usr/bin/env") (which "env"))
1292 (("/bin/false") (which "false"))
1293 (("/bin/true") (which "true"))
1294 (("/bin/cp") (which "cp"))
1295 (("/bin/sh") (which "sh")))
1296 (substitute* "java/lang/ProcessBuilder/FeelingLucky.java"
1297 (("/bin/sh") (which "sh")))
1298 (substitute* "java/lang/ProcessBuilder/Zombies.java"
1299 (("/usr/bin/perl") (which "perl"))
1300 (("/bin/ps") (which "ps"))
1301 (("/bin/true") (which "true")))
1302 (substitute* "java/lang/Runtime/exec/ConcurrentRead.java"
1303 (("/usr/bin/tee") (which "tee")))
1304 (substitute* "java/lang/Runtime/exec/ExecWithDir.java"
1305 (("/bin/true") (which "true")))
1306 (substitute* "java/lang/Runtime/exec/ExecWithInput.java"
1307 (("/bin/cat") (which "cat")))
1308 (substitute* "java/lang/Runtime/exec/ExitValue.java"
1309 (("/bin/sh") (which "sh"))
1310 (("/bin/true") (which "true"))
1311 (("/bin/kill") (which "kill")))
1312 (substitute* "java/lang/Runtime/exec/LotsOfDestroys.java"
1313 (("/usr/bin/echo") (which "echo")))
1314 (substitute* "java/lang/Runtime/exec/LotsOfOutput.java"
1315 (("/usr/bin/cat") (which "cat")))
1316 (substitute* "java/lang/Runtime/exec/SleepyCat.java"
1317 (("/bin/cat") (which "cat"))
1318 (("/bin/sleep") (which "sleep"))
1319 (("/bin/sh") (which "sh")))
1320 (substitute* "java/lang/Runtime/exec/StreamsSurviveDestroy.java"
1321 (("/bin/cat") (which "cat")))
1322 (substitute* "java/rmi/activation/CommandEnvironment/SetChildEnv.java"
1323 (("/bin/chmod") (which "chmod")))
1324 (substitute* "java/util/zip/ZipFile/Assortment.java"
1325 (("/bin/sh") (which "sh"))))
1329 ;; The "make check-*" targets always return zero, so we need to
1330 ;; check for errors in the associated log files to determine
1331 ;; whether any tests have failed.
1332 (use-modules (ice-9 rdelim))
1333 (let* ((error-pattern (make-regexp "^(Error|FAILED):.*"))
1334 (checker (lambda (port)
1336 (let ((line (read-line port)))
1338 ((eof-object? line) #t)
1339 ((regexp-exec error-pattern line)
1340 (error "test failed"))
1342 (run-test (lambda (test)
1343 (invoke "make" test)
1344 (call-with-input-file
1345 (string-append "test/" test ".log")
1347 (when #f ; skip tests
1348 (run-test "check-hotspot")
1349 (run-test "check-langtools")
1350 (run-test "check-jdk"))
1353 (lambda* (#:key outputs #:allow-other-keys)
1354 (let ((doc (string-append (assoc-ref outputs "doc")
1355 "/share/doc/icedtea"))
1356 (jre (assoc-ref outputs "out"))
1357 (jdk (assoc-ref outputs "jdk")))
1358 (copy-recursively "openjdk.build/docs" doc)
1359 (copy-recursively "openjdk.build/j2re-image" jre)
1360 (copy-recursively "openjdk.build/j2sdk-image" jdk))
1362 ;; Some of the libraries in the lib/amd64 folder link to libjvm.so.
1363 ;; But that shared object is located in the server/ folder, so it
1364 ;; cannot be found. This phase creates a symbolic link in the
1365 ;; lib/amd64 folder so that the other libraries can find it.
1368 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
1370 ;; FIXME: Find the bug in the build system, so that this symlink is
1372 (add-after 'install 'install-libjvm
1373 (lambda* (#:key inputs outputs #:allow-other-keys)
1374 (let* ((lib-path (string-append (assoc-ref outputs "out")
1376 (symlink (string-append lib-path "/server/libjvm.so")
1377 (string-append lib-path "/libjvm.so")))
1379 ;; By default IcedTea only generates an empty keystore. In order to
1380 ;; be able to use certificates in Java programs we need to generate a
1381 ;; keystore from a set of certificates. For convenience we use the
1382 ;; certificates from the nss-certs package.
1383 (add-after 'install 'install-keystore
1384 (lambda* (#:key inputs outputs #:allow-other-keys)
1385 (let* ((keystore "cacerts")
1386 (certs-dir (string-append (assoc-ref inputs "nss-certs")
1388 (keytool (string-append (assoc-ref outputs "jdk")
1390 (define (extract-cert file target)
1391 (call-with-input-file file
1393 (call-with-output-file target
1395 (let loop ((line (read-line in 'concat))
1398 ((eof-object? line) #t)
1399 ((string-prefix? "-----BEGIN" line)
1401 (loop (read-line in 'concat) #t))
1402 ((string-prefix? "-----END" line)
1406 (when copying? (display line out))
1407 (loop (read-line in 'concat) copying?)))))))))
1408 (define (import-cert cert)
1409 (format #t "Importing certificate ~a\n" (basename cert))
1410 (let ((temp "tmpcert"))
1411 (extract-cert cert temp)
1412 (let ((port (open-pipe* OPEN_WRITE keytool
1414 "-alias" (basename cert)
1415 "-keystore" keystore
1416 "-storepass" "changeit"
1418 (display "yes\n" port)
1419 (when (not (zero? (status:exit-val (close-pipe port))))
1420 (format #t "failed to import ~a\n" cert)))
1421 (delete-file temp)))
1423 ;; This is necessary because the certificate directory contains
1424 ;; files with non-ASCII characters in their names.
1425 (setlocale LC_ALL "en_US.utf8")
1426 (setenv "LC_ALL" "en_US.utf8")
1428 (for-each import-cert (find-files certs-dir "\\.pem$"))
1429 (mkdir-p (string-append (assoc-ref outputs "out")
1431 (mkdir-p (string-append (assoc-ref outputs "jdk")
1432 "/jre/lib/security"))
1434 ;; The cacerts files we are going to overwrite are chmod'ed as
1435 ;; read-only (444) in icedtea-8 (which derives from this
1436 ;; package). We have to change this so we can overwrite them.
1437 (chmod (string-append (assoc-ref outputs "out")
1438 "/lib/security/" keystore) #o644)
1439 (chmod (string-append (assoc-ref outputs "jdk")
1440 "/jre/lib/security/" keystore) #o644)
1442 (install-file keystore
1443 (string-append (assoc-ref outputs "out")
1445 (install-file keystore
1446 (string-append (assoc-ref outputs "jdk")
1447 "/jre/lib/security"))
1452 "0l34ikyf62hbzlf9032alzkkqvf7bpmckz4gvirvph755w7gka8l"))
1455 "050gv2jbg1pi6qkn8w18bwpbklfa5b0kymjvan9pncddbj8m84fz"))
1458 "1k6yldwnxfzdg5926r1nlfv8d1r1j7rlp2nkz6gqh05vgyamnfhl"))
1461 "110j7jlz47x2gg6f7653x12mssan5kvj9l9h1m1c8c92drfxbqyk"))
1464 "0d1mca38ksxvdskp9im3pp7fdijhj1n3lwq9w13r9s4v3qyskgdd"))
1467 "0nq5236fzxn3p6x8cgncl56mzcmsj07q9gymysnws4c8byc6n0qj"))
1472 "http://icedtea.classpath.org/downloads/drops"
1473 "/icedtea7/" version "/hotspot.tar.bz2"))
1476 "17bdv39n4lh8l5737c96f3xgamx4y305m067p01cywgp7zaddqws"))
1477 (patches (search-patches
1478 "icedtea-7-hotspot-gcc-segfault-workaround.patch"))))
1479 ("ant" ,ant-bootstrap)
1481 ("coreutils" ,coreutils)
1482 ("diffutils" ,diffutils) ;for tests
1485 ("libtool" ,libtool)
1486 ("pkg-config" ,pkg-config)
1492 ("fastjar" ,fastjar)
1493 ("libxslt" ,libxslt) ;for xsltproc
1494 ("nss-certs" ,nss-certs)
1496 ("procps" ,procps) ;for "free", even though I'm not sure we should use it
1497 ("jdk" ,icedtea-6 "jdk")))
1499 `(("alsa-lib" ,alsa-lib)
1502 ("libxcomposite" ,libxcomposite)
1504 ("libxtst" ,libxtst)
1506 ("libxinerama" ,libxinerama)
1507 ("libxrender" ,libxrender)
1508 ("libjpeg" ,libjpeg)
1510 ("mit-krb5" ,mit-krb5)
1513 ("fontconfig" ,fontconfig)
1514 ("freetype" ,freetype)
1518 (home-page "http://icedtea.classpath.org")
1519 (synopsis "Java development kit")
1521 "This package provides the Java development kit OpenJDK built with the
1522 IcedTea build harness.")
1523 ;; IcedTea is released under the GPL2 + Classpath exception, which is the
1524 ;; same license as both GNU Classpath and OpenJDK.
1525 (license license:gpl2+))))
1527 (define-public icedtea-8
1528 (let* ((version "3.7.0")
1529 (drop (lambda (name hash)
1533 "http://icedtea.classpath.org/download/drops"
1534 "/icedtea8/" version "/" name ".tar.xz"))
1535 (sha256 (base32 hash))))))
1536 (package (inherit icedtea-7)
1541 "http://icedtea.wildebeest.org/download/source/icedtea-"
1545 "09yqzn8rpccs7cyv89hhy5zlznpgqw5x3jz0w1ccp0cz1vgs8l5w"))
1546 (modules '((guix build utils)))
1549 (substitute* '("configure"
1551 ;; Do not embed build time
1552 (("(DIST_ID=\"Custom build).*$" _ prefix)
1553 (string-append prefix "\"\n"))
1554 ;; Do not leak information about the build host
1555 (("DIST_NAME=\"\\$build_os\"")
1556 "DIST_NAME=\"guix\""))
1559 `(#:imported-modules
1560 ((guix build ant-build-system)
1561 (guix build syscalls)
1562 ,@%gnu-build-system-modules)
1563 ,@(substitute-keyword-arguments (package-arguments icedtea-7)
1564 ((#:modules modules)
1565 `((guix build utils)
1566 (guix build gnu-build-system)
1567 ((guix build ant-build-system) #:prefix ant:)
1572 ((#:configure-flags flags)
1573 `(let ((jdk (assoc-ref %build-inputs "jdk")))
1574 `( ;;"--disable-bootstrap"
1575 "--enable-bootstrap"
1577 "--disable-downloading"
1578 "--disable-system-pcsc"
1579 "--disable-system-sctp"
1580 "--disable-tests" ;they are run in the check phase instead
1581 "--with-openjdk-src-dir=./openjdk.src"
1582 ,(string-append "--with-jdk-home=" jdk))))
1584 `(modify-phases ,phases
1585 (delete 'fix-x11-extension-include-path)
1586 (delete 'patch-paths)
1587 (delete 'set-additional-paths)
1588 (delete 'patch-patches)
1589 ;; Prevent the keytool from recording the current time when
1590 ;; adding certificates at build time.
1591 (add-after 'unpack 'patch-keystore
1593 (substitute* "openjdk.src/jdk/src/share/classes/sun/security/provider/JavaKeyStore.java"
1594 (("date = new Date\\(\\);")
1596 date = (System.getenv(\"SOURCE_DATE_EPOCH\") != null) ?\
1597 new Date(Long.parseLong(System.getenv(\"SOURCE_DATE_EPOCH\"))) :\
1600 (add-after 'unpack 'patch-jni-libs
1601 ;; Hardcode dynamically loaded libraries.
1603 (let* ((library-path (search-path-as-string->list
1604 (getenv "LIBRARY_PATH")))
1605 (find-library (lambda (name)
1608 (string-append "lib" name ".so")))))
1611 (catch 'decoding-error
1614 (("VERSIONED_JNI_LIB_NAME\\(\"(.*)\", \"(.*)\"\\)"
1616 (format #f "\"~a\"" (find-library name)))
1617 (("JNI_LIB_NAME\\(\"(.*)\"\\)" _ name)
1618 (format #f "\"~a\"" (find-library name)))))
1620 ;; Those are safe to skip.
1621 (format (current-error-port)
1622 "warning: failed to substitute: ~a~%"
1624 (find-files "openjdk.src/jdk/src/solaris/native"
1628 (lambda* (#:key outputs #:allow-other-keys)
1629 (let ((doc (string-append (assoc-ref outputs "doc")
1630 "/share/doc/icedtea"))
1631 (jre (assoc-ref outputs "out"))
1632 (jdk (assoc-ref outputs "jdk")))
1633 (copy-recursively "openjdk.build/docs" doc)
1634 (copy-recursively "openjdk.build/images/j2re-image" jre)
1635 (copy-recursively "openjdk.build/images/j2sdk-image" jdk)
1636 ;; Install the nss.cfg file to JRE to enable SSL/TLS
1638 (copy-file (string-append jdk "/jre/lib/security/nss.cfg")
1639 (string-append jre "/lib/security/nss.cfg"))
1641 (add-after 'install 'strip-jar-timestamps
1642 (assoc-ref ant:%standard-phases 'strip-jar-timestamps)))))))
1644 `(("jdk" ,icedtea-7 "jdk")
1647 "1mj6xgmw31i6qd30qi9dmv7160fbcfq5ikz1jwjihdg2793il19p"))
1650 "1wb8k5zm40zld0986dvmlh5xh3gyixbg9h26sl662zy92amhmyyg"))
1653 "11ma4zz0599cy70xd219v7a8vin7p96xrhhz3wsaw6cjhkzpagah"))
1656 "14m1y0z0fbm5z5zjw3vnq85py8dma84bi3f9cw8rhdyc6skk8q4i"))
1659 "09andnm6xaasnp963hgx42yiflifiljp9z7z85jrfyc5z8a5whmf"))
1662 "0s6lcpc0zckz2fnq98aqf28nz9y3wbi41a3kyaqqa2abwbkm1zwl"))
1665 "15wizy123vhk40chl1b4p552jf2pw2hdww0myf11qab425axz4nw"))
1670 "http://icedtea.classpath.org/download/drops"
1671 "/icedtea8/" version "/hotspot.tar.xz"))
1674 "1ciz1w9j0kz7s1dxdhyqq71nla9icyz6qvn0b9z2zgkklqa98qmm"))
1675 (patches (search-patches
1676 "icedtea-7-hotspot-gcc-segfault-workaround.patch"))))
1679 "19pzl3ppaw8j6r5cnyp8qiw3hxijh3hdc46l39g5yfhdl4pr4hpa"))
1682 "0k33anxdzw1icn072wynfmmdjhsv50hay0j1sfkfxny12rb3vgdy"))
1683 ,@(fold alist-delete (package-native-inputs icedtea-7)
1684 '("jdk" "openjdk-src" "corba-drop" "jaxp-drop" "jaxws-drop"
1685 "jdk-drop" "langtools-drop" "hotspot-drop")))))))
1687 (define-public openjdk9
1693 (uri "https://hg.openjdk.java.net/jdk/jdk/archive/3cc80be736f2.tar.bz2")
1694 (file-name (string-append name "-" version ".tar.bz2"))
1697 "01ihmyf7k5z17wbr7xig7y40l9f01d5zjgkcmawn1102hw5kchpq"))
1698 (modules '((guix build utils)))
1701 (for-each delete-file (find-files "." ".*.bin$"))
1702 (for-each delete-file (find-files "." ".*.exe$"))
1703 (for-each delete-file (find-files "." ".*.jar$"))
1705 (build-system gnu-build-system)
1706 (outputs '("out" "jdk" "doc"))
1708 `(#:tests? #f; require jtreg
1710 ((guix build syscalls)
1711 ,@%gnu-build-system-modules)
1713 (modify-phases %standard-phases
1714 (add-after 'patch-source-shebangs 'fix-java-shebangs
1716 ;; This file was "fixed" by patch-source-shebangs, but it requires
1717 ;; this exact first line.
1718 (substitute* "jdk/make/data/blacklistedcertsconverter/blacklisted.certs.pem"
1719 (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))
1722 (lambda* (#:key inputs outputs #:allow-other-keys)
1723 ;; TODO: unbundle libpng and lcms
1724 (invoke "bash" "./configure"
1725 (string-append "--with-freetype=" (assoc-ref inputs "freetype"))
1726 "--disable-freetype-bundling"
1727 "--disable-warnings-as-errors"
1728 "--disable-hotspot-gtest"
1729 "--with-giflib=system"
1730 "--with-libjpeg=system"
1731 (string-append "--prefix=" (assoc-ref outputs "out")))
1735 (with-output-to-file ".src-rev"
1737 (display ,version)))
1738 (setenv "GUIX_LD_WRAPPER_ALLOW_IMPURITIES" "yes")
1739 (invoke "make" "all")
1741 ;; Some of the libraries in the lib/ folder link to libjvm.so.
1742 ;; But that shared object is located in the server/ folder, so it
1743 ;; cannot be found. This phase creates a symbolic link in the
1744 ;; lib/ folder so that the other libraries can find it.
1747 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
1749 ;; FIXME: Find the bug in the build system, so that this symlink is
1751 (add-after 'install 'install-libjvm
1752 (lambda* (#:key inputs outputs #:allow-other-keys)
1753 (let* ((lib-out (string-append (assoc-ref outputs "out")
1755 (lib-jdk (string-append (assoc-ref outputs "jdk")
1757 (symlink (string-append lib-jdk "/server/libjvm.so")
1758 (string-append lib-jdk "/libjvm.so"))
1759 (symlink (string-append lib-out "/server/libjvm.so")
1760 (string-append lib-out "/libjvm.so")))
1763 (lambda* (#:key outputs #:allow-other-keys)
1764 (let ((out (assoc-ref outputs "out"))
1765 (jdk (assoc-ref outputs "jdk"))
1766 (doc (assoc-ref outputs "doc"))
1767 (images (car (find-files "build" ".*-server-release"
1768 #:directories? #t))))
1769 (copy-recursively (string-append images "/images/jdk") jdk)
1770 (copy-recursively (string-append images "/images/jre") out)
1771 (copy-recursively (string-append images "/images/docs") doc))
1773 (add-after 'install 'strip-zip-timestamps
1774 (lambda* (#:key outputs #:allow-other-keys)
1775 (use-modules (guix build syscalls))
1776 (for-each (lambda (zip)
1777 (let ((dir (mkdtemp! "zip-contents.XXXXXX")))
1778 (with-directory-excursion dir
1779 (invoke "unzip" zip))
1781 (for-each (lambda (file)
1782 (let ((s (lstat file)))
1783 (unless (eq? (stat:type s) 'symlink)
1784 (format #t "reset ~a~%" file)
1785 (utime file 0 0 0 0))))
1786 (find-files dir #:directories? #t))
1787 (with-directory-excursion dir
1788 (let ((files (find-files "." ".*" #:directories? #t)))
1789 (apply invoke "zip" "-0" "-X" zip files)))))
1790 (find-files (assoc-ref outputs "doc") ".*.zip$"))
1793 `(("alsa-lib" ,alsa-lib)
1795 ("fontconfig" ,fontconfig)
1796 ("freetype" ,freetype)
1800 ("libjpeg" ,libjpeg)
1804 ("libxcomposite" ,libxcomposite)
1806 ("libxinerama" ,libxinerama)
1807 ("libxrender" ,libxrender)
1809 ("libxtst" ,libxtst)))
1811 `(("icedtea-8" ,icedtea-8)
1812 ("icedtea-8:jdk" ,icedtea-8 "jdk")
1816 (home-page "https://openjdk.java.net/projects/jdk9/")
1817 (synopsis "Java development kit")
1819 "This package provides the Java development kit OpenJDK.")
1820 (license license:gpl2+)))
1822 (define-public openjdk10
1829 (uri "http://hg.openjdk.java.net/jdk/jdk/archive/6fa770f9f8ab.tar.bz2")
1830 (file-name (string-append name "-" version ".tar.bz2"))
1833 "0zywq2203b4hx4jms9vbwvjcj1d3k2v3qpx4s33729fkpmid97r4"))
1834 (patches (search-patches
1835 "openjdk-10-idlj-reproducibility.patch"))
1836 (modules '((guix build utils)))
1839 (for-each delete-file (find-files "." ".*.bin$"))
1840 (for-each delete-file (find-files "." ".*.exe$"))
1841 (for-each delete-file (find-files "." ".*.jar$"))
1844 (substitute-keyword-arguments (package-arguments openjdk9)
1846 `(modify-phases ,phases
1847 (replace 'fix-java-shebangs
1849 ;; This file was "fixed" by patch-source-shebangs, but it requires
1850 ;; this exact first line.
1851 (substitute* "make/data/blacklistedcertsconverter/blacklisted.certs.pem"
1852 (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))
1855 (lambda* (#:key inputs outputs #:allow-other-keys)
1856 (invoke "bash" "./configure"
1857 (string-append "--with-freetype=" (assoc-ref inputs "freetype"))
1858 "--disable-freetype-bundling"
1859 "--disable-warnings-as-errors"
1860 "--disable-hotspot-gtest"
1861 "--with-giflib=system"
1862 "--with-libjpeg=system"
1863 "--with-native-debug-symbols=zipped"
1864 (string-append "--prefix=" (assoc-ref outputs "out")))
1867 `(("openjdk9" ,openjdk9)
1868 ("openjdk9:jdk" ,openjdk9 "jdk")
1873 (define-public openjdk11
1879 (uri "http://hg.openjdk.java.net/jdk/jdk/archive/76072a077ee1.tar.bz2")
1880 (file-name (string-append name "-" version ".tar.bz2"))
1883 "0v705w1s9lrqalzahir78pk397rkk9gfvzq821yv8h3xha0bqi6w"))
1884 (modules '((guix build utils)))
1887 (for-each delete-file (find-files "." ".*.bin$"))
1888 (for-each delete-file (find-files "." ".*.exe$"))
1889 (for-each delete-file (find-files "." ".*.jar$"))
1891 (build-system gnu-build-system)
1892 (outputs '("out" "jdk" "doc"))
1894 `(#:imported-modules
1895 ((guix build syscalls)
1896 (ice-9 binary-ports)
1898 ,@%gnu-build-system-modules)
1899 #:tests? #f; requires jtreg
1900 ;; TODO package jtreg
1901 ;; disable parallel builds, as the openjdk build system does not like -j
1902 #:parallel-build? #f
1903 #:parallel-tests? #f
1904 ;; reenable parallel builds and tests by adding the flags manually
1905 #:make-flags (list (string-append "JOBS=" (number->string (parallel-job-count))))
1907 `("--disable-option-checking" ; --enable-fast-install default flag errors otherwise
1908 "--disable-warnings-as-errors"
1909 ;; make validate-runpath pass, see: http://issues.guix.info/issue/32894
1910 "--with-native-debug-symbols=zipped"
1911 ;; do not use the bundled libraries
1912 "--with-giflib=system"
1913 "--with-lcms=system"
1914 "--with-libjpeg=system"
1915 "--with-libpng=system"
1916 "--with-version-pre="
1917 ;; allow the build system to locate the system freetype
1918 ,(string-append "--with-freetype-include="
1919 (assoc-ref %build-inputs "freetype") "/include")
1920 ,(string-append "--with-freetype-lib="
1921 (assoc-ref %build-inputs "freetype") "/lib"))
1924 (modify-phases %standard-phases
1925 (add-after 'patch-source-shebangs 'fix-java-shebangs
1927 ;; This file was "fixed" by patch-source-shebangs, but it requires
1928 ;; this exact first line.
1929 (substitute* "make/data/blacklistedcertsconverter/blacklisted.certs.pem"
1930 (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))
1934 (with-output-to-file ".src-rev"
1936 (display ,version)))
1937 (setenv "GUIX_LD_WRAPPER_ALLOW_IMPURITIES" "yes")
1938 (invoke "make" "all")
1940 ;; jdk 11 does not build jre by default any more
1941 ;; building it anyways
1942 ;; for further information see:
1943 ;; https://github.com/AdoptOpenJDK/openjdk-build/issues/356
1944 (add-after 'build 'build-jre
1946 (invoke "make" "legacy-jre-image")
1949 (lambda* (#:key outputs #:allow-other-keys)
1950 (let ((out (assoc-ref outputs "out"))
1951 (jdk (assoc-ref outputs "jdk"))
1952 (doc (assoc-ref outputs "doc"))
1953 (images (car (find-files "build" ".*-server-release"
1954 #:directories? #t))))
1955 (copy-recursively (string-append images "/images/jdk") jdk)
1956 (copy-recursively (string-append images "/images/jre") out)
1957 (copy-recursively (string-append images "/images/docs") doc))
1959 ;; Some of the libraries in the lib/ folder link to libjvm.so.
1960 ;; But that shared object is located in the server/ folder, so it
1961 ;; cannot be found. This phase creates a symbolic link in the
1962 ;; lib/ folder so that the other libraries can find it.
1965 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
1967 ;; FIXME: Find the bug in the build system, so that this symlink is
1969 (add-after 'install 'install-libjvm
1970 (lambda* (#:key inputs outputs #:allow-other-keys)
1971 (let* ((lib-out (string-append (assoc-ref outputs "out")
1973 (lib-jdk (string-append (assoc-ref outputs "jdk")
1975 (symlink (string-append lib-jdk "/server/libjvm.so")
1976 (string-append lib-jdk "/libjvm.so"))
1977 (symlink (string-append lib-out "/server/libjvm.so")
1978 (string-append lib-out "/libjvm.so")))
1980 (add-after 'install 'strip-character-data-timestamps
1981 (lambda* (#:key outputs #:allow-other-keys)
1982 (use-modules (guix build syscalls))
1983 (let ((archive (string-append
1984 (assoc-ref outputs "jdk") "/lib/src.zip"))
1985 (dir (mkdtemp! "zip-contents.XXXXXX")))
1986 (with-directory-excursion dir
1987 (invoke "unzip" archive))
1988 (delete-file archive)
1989 (with-directory-excursion dir
1990 (let ((char-data-files (find-files "." "CharacterData.*")))
1991 (for-each (lambda (file)
1993 (((string-append "This file was generated "
1994 "AUTOMATICALLY from a template "
1996 (string-append "This file was generated "
1997 "AUTOMATICALLY from a template "
2000 (with-directory-excursion dir
2001 (let ((files (find-files "." ".*" #:directories? #t)))
2002 (apply invoke "zip" "-0" "-X" archive files))))))
2003 (add-after 'strip-character-data-timestamps 'strip-archive-timestamps
2004 (lambda* (#:key outputs #:allow-other-keys)
2005 (use-modules (guix build syscalls)
2006 (ice-9 binary-ports)
2008 (letrec ((repack-archive
2010 (let ((dir (mkdtemp! "zip-contents.XXXXXX")))
2011 (with-directory-excursion dir
2012 (invoke "unzip" archive))
2013 (delete-file archive)
2014 (for-each (compose repack-archive canonicalize-path)
2015 (find-files dir "(ct.sym|.*.jar)$"))
2016 (let ((reset-file-timestamp
2018 (let ((s (lstat file)))
2019 (unless (eq? (stat:type s) 'symlink)
2020 (format #t "reset ~a~%" file)
2021 (utime file 0 0 0 0))))))
2022 (for-each reset-file-timestamp
2023 (find-files dir #:directories? #t)))
2024 (with-directory-excursion dir
2025 (let ((files (find-files "." ".*" #:directories? #t)))
2026 (apply invoke "zip" "-0" "-X" archive files)))))))
2027 (for-each repack-archive
2028 (find-files (assoc-ref outputs "doc") ".*.zip$"))
2029 (for-each repack-archive
2030 (find-files (assoc-ref outputs "jdk")
2031 ".*.(zip|jar|diz)$"))
2032 (repack-archive (string-append (assoc-ref outputs "jdk") "/lib/ct.sym"))
2035 (call-with-input-file file-name
2037 (let ((header #vu8(#x4a #x4d #x01 #x00)))
2038 (if (equal? (get-bytevector-n
2039 file (bytevector-length header))
2041 (let* ((header-length (bytevector-length header))
2042 (temp-file (mkstemp!
2044 "temp-file.XXXXXX")))
2045 (temp-filename (port-filename temp-file))
2047 (- (stat:size (stat file))
2049 (sendfile temp-file file content-length header-length)
2050 (delete-file file-name)
2051 (close-port temp-file)
2052 (repack-archive (canonicalize-path temp-filename))
2053 (call-with-output-file file-name
2055 (put-bytevector file header)
2056 (call-with-input-file temp-filename
2060 (stat:size (stat temp-file)) 0)))))))))))))
2061 (for-each repack-jmod
2062 (find-files (assoc-ref outputs "jdk") ".*.jmod$")))
2064 (add-after 'install 'remove-timestamp-from-api-summary
2065 (lambda* (#:key outputs #:allow-other-keys)
2066 (substitute* (string-append (assoc-ref outputs "doc")
2067 "/api/overview-summary.html")
2068 (("Generated by javadoc \\(11-internal\\).*$")
2069 "Generated by javadoc (11-internal) -->\n"))
2072 `(("alsa-lib" ,alsa-lib)
2074 ("fontconfig" ,fontconfig)
2075 ("freetype" ,freetype)
2078 ("libjpeg" ,libjpeg)
2081 ("libxext" ,libxext)
2082 ("libxrender" ,libxrender)
2084 ("libxtst" ,libxtst)))
2086 `(("autoconf" ,autoconf)
2087 ("openjdk10" ,openjdk10)
2088 ("openjdk10:jdk" ,openjdk10 "jdk")
2089 ("pkg-config" ,pkg-config)
2093 (home-page "https://openjdk.java.net/projects/jdk/11/")
2094 (synopsis "Java development kit")
2096 "This package provides the Java development kit OpenJDK.")
2097 (license license:gpl2+)))
2099 (define-public icedtea icedtea-8)
2102 (define-public ant/java8
2103 (package (inherit ant-bootstrap)
2108 (uri (string-append "mirror://apache/ant/source/apache-ant-"
2109 version "-src.tar.gz"))
2112 "10p3dh77lkzzzcy32dk9azljixzadp46fggjfbvgkl8mmb8cxxv8"))
2113 (modules '((guix build utils)))
2116 (for-each delete-file
2117 (find-files "lib/optional" "\\.jar$"))
2120 (substitute-keyword-arguments (package-arguments ant-bootstrap)
2122 `(modify-phases ,phases
2123 (add-after 'unpack 'remove-scripts
2124 ;; Remove bat / cmd scripts for DOS as well as the antRun and runant
2127 (for-each delete-file
2128 (find-files "src/script"
2129 "(.*\\.(bat|cmd)|runant.*|antRun.*)"))
2132 (lambda* (#:key inputs outputs #:allow-other-keys)
2133 (setenv "JAVA_HOME" (assoc-ref inputs "jdk"))
2135 ;; Disable tests to avoid dependency on hamcrest-core, which needs
2136 ;; Ant to build. This is necessary in addition to disabling the
2137 ;; "check" phase, because the dependency on "test-jar" would always
2138 ;; result in the tests to be run.
2139 (substitute* "build.xml"
2140 (("depends=\"jars,test-jar\"") "depends=\"jars\""))
2141 (invoke "bash" "bootstrap.sh"
2142 (string-append "-Ddist.dir="
2143 (assoc-ref outputs "out")))))))))
2145 `(("jdk" ,icedtea-8 "jdk")
2147 ("unzip" ,unzip)))))
2149 ;; The 1.9.x series is the last that can be built with GCJ. The 1.10.x series
2152 (package (inherit ant/java8)
2156 (uri (string-append "mirror://apache/ant/source/apache-ant-"
2157 version "-src.tar.gz"))
2160 "1k28mka0m3isy9yr8gz84kz1f3f879rwaxrd44vdn9xbfwvwk86n"))))
2162 `(("jdk" ,icedtea-7 "jdk")
2164 ("unzip" ,unzip)))))
2166 (define-public ant-apache-bcel
2169 (name "ant-apache-bcel")
2171 (substitute-keyword-arguments (package-arguments ant/java8)
2173 `(modify-phases ,phases
2174 (add-after 'unpack 'link-bcel
2175 (lambda* (#:key inputs #:allow-other-keys)
2176 (for-each (lambda (file)
2178 (string-append "lib/optional/"
2180 (find-files (assoc-ref inputs "java-commons-bcel")
2183 (add-after 'build 'install
2184 (lambda* (#:key outputs #:allow-other-keys)
2185 (let* ((out (assoc-ref outputs "out"))
2186 (share (string-append out "/share/java"))
2187 (bin (string-append out "/bin"))
2188 (lib (string-append out "/lib")))
2190 (install-file (string-append lib "/ant-apache-bcel.jar") share)
2191 (delete-file-recursively bin)
2192 (delete-file-recursively lib)
2195 `(("java-commons-bcel" ,java-commons-bcel)
2196 ,@(package-inputs ant/java8)))))
2198 (define-public ant-junit
2203 (substitute-keyword-arguments (package-arguments ant/java8)
2205 `(modify-phases ,phases
2206 (add-after 'unpack 'link-junit
2207 (lambda* (#:key inputs #:allow-other-keys)
2208 (for-each (lambda (file)
2210 (string-append "lib/optional/"
2212 (find-files (assoc-ref inputs "java-junit")
2215 (add-after 'build 'install
2216 (lambda* (#:key outputs #:allow-other-keys)
2217 (let* ((out (assoc-ref outputs "out"))
2218 (share (string-append out "/share/java"))
2219 (bin (string-append out "/bin"))
2220 (lib (string-append out "/lib")))
2222 (install-file (string-append lib "/ant-junit.jar") share)
2223 (delete-file-recursively bin)
2224 (delete-file-recursively lib)
2227 `(("java-junit" ,java-junit)
2228 ,@(package-inputs ant/java8)))))
2230 (define-public javacc-4
2237 (url "https://github.com/javacc/javacc.git")
2238 (commit "release_41")))
2239 (file-name (string-append "javacc-" version "-checkout"))
2242 "07ysav7j8r1c6h8qxrgqk6lwdp74ly0ad1935lragxml0qqc3ka0"))
2243 (modules '((guix build utils)))
2244 ;; delete bundled jars
2245 (snippet '(begin (delete-file-recursively "lib") #t))))
2246 (build-system ant-build-system)
2248 ;; /tmp/guix-build-javacc-4.1.drv-0/source/test/javacodeLA/build.xml:60:
2253 (modify-phases %standard-phases
2254 ;; Delete tests to avoid build failure (we don't run them anyway).
2255 (add-after 'unpack 'delete-tests
2257 (for-each delete-file
2258 '("src/org/javacc/JavaCCTestCase.java"
2259 "src/org/javacc/parser/ExpansionTest.java"
2260 "src/org/javacc/parser/OptionsTest.java"
2261 "src/org/javacc/jjtree/JJTreeOptionsTest.java"))
2262 (for-each delete-file-recursively
2263 '("src/org/javacc/parser/test"
2264 "src/org/javacc/jjdoc/test"))
2266 (replace 'install (install-jars "bin/lib")))))
2267 (home-page "https://javacc.org/")
2268 (synopsis "Java parser generator")
2269 (description "Java Compiler Compiler (JavaCC) is the most popular parser
2270 generator for use with Java applications. A parser generator is a tool that
2271 reads a grammar specification and converts it to a Java program that can
2272 recognize matches to the grammar. In addition to the parser generator itself,
2273 JavaCC provides other standard capabilities related to parser generation such
2274 as tree building (via a tool called JJTree included with JavaCC), actions,
2276 (license license:bsd-3)))
2278 (define-public javacc
2286 (url "https://github.com/javacc/javacc.git")
2288 (file-name (git-file-name "javacc" version))
2290 (base32 "18kkak3gda93gr25jrgy6q00g0jr8i24ri2wk4kybz1v234fxx9i"))
2291 (modules '((guix build utils)))
2292 ;; Delete bundled jars.
2293 (snippet '(begin (for-each delete-file-recursively
2294 '("bootstrap" "lib"))
2297 `(#:make-flags ; bootstrap from javacc-4
2298 (list (string-append "-Dbootstrap-jar="
2299 (assoc-ref %build-inputs "javacc")
2300 "/share/java/javacc.jar"))
2301 #:test-target "test"
2303 (modify-phases %standard-phases
2304 (replace 'install (install-jars "target")))))
2306 `(("javacc" ,javacc-4)))))
2308 ;; This is the last 3.x release of ECJ
2309 (define-public java-ecj-3
2315 (uri (string-append "http://archive.eclipse.org/eclipse/"
2316 "downloads/drops/R-" version
2317 "-201301310800/ecjsrc-" version ".jar"))
2320 "01mdj14jw11g1jfnki4fi8229p0c6zzckd38zqy2w4m3cjcvsx04"))))
2321 (build-system ant-build-system)
2323 `(#:tests? #f ; none included
2324 #:jdk ,icedtea-7 ; doesn't build with JDK8+
2325 #:make-flags (list "-f" "src/build.xml")
2326 #:build-target "build"
2328 (modify-phases %standard-phases
2329 (add-after 'unpack 'fix-manifest
2331 ;; Record the main class to make ecj executable.
2332 (with-atomic-file-replacement "src/META-INF/MANIFEST.MF"
2334 (display "Manifest-Version: 1.0
2335 Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n"
2338 (replace 'install (install-jars ".")))))
2339 (home-page "https://eclipse.org")
2340 (synopsis "Eclipse Java development tools core batch compiler")
2341 (description "This package provides the Eclipse Java core batch compiler.")
2342 (license license:epl1.0)))
2344 ;; This is needed for java-cisd-args4j
2345 (define-public java-ecj-3.5
2346 (package (inherit java-ecj-3)
2349 (method url-fetch/zipbomb)
2350 (uri (string-append "http://archive.eclipse.org/eclipse/"
2351 "downloads/drops/R-" version
2352 "-200909170800/ecjsrc-" version ".zip"))
2355 "1vnl2mavisc567bip736xzsvvbjif5279wc4a7pbdik5wlir8qr7"))))
2356 (build-system ant-build-system)
2358 `(#:tests? #f ; none included
2359 #:jdk ,icedtea-7 ; doesn't build with JDK8+
2360 #:build-target "build"
2362 (modify-phases %standard-phases
2363 (add-after 'unpack 'fix-manifest
2365 ;; Record the main class to make ecj executable.
2366 (with-atomic-file-replacement "META-INF/MANIFEST.MF"
2369 (display "Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n"
2372 (replace 'install (install-jars ".")))))
2374 `(("unzip" ,unzip)))))
2376 (define-public java-cisd-base
2377 (let ((revision 38938)
2378 (base-version "14.12.0"))
2380 (name "java-cisd-base")
2381 (version (string-append base-version "-" (number->string revision)))
2385 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2386 "base/tags/release/"
2387 (version-major+minor base-version)
2388 ".x/" base-version "/base/"))
2389 (revision revision)))
2390 (file-name (string-append "java-cisd-base-" version "-checkout"))
2393 "1i5adyf7nzclb0wydgwa1az04qliid8035vpahaandmkmigbnxiy"))
2394 (modules '((guix build utils)))
2397 ;; Delete included gradle jar
2398 (delete-file-recursively "gradle/wrapper")
2399 ;; Delete pre-built native libraries
2400 (delete-file-recursively "libs")
2402 (build-system ant-build-system)
2404 `(#:make-flags '("-file" "build/build.xml")
2405 #:test-target "jar-test"
2408 (modify-phases %standard-phases
2409 (add-after 'unpack 'unpack-build-resources
2410 (lambda* (#:key inputs #:allow-other-keys)
2411 (copy-recursively (assoc-ref inputs "build-resources")
2412 "../build_resources")
2414 (add-after 'unpack-build-resources 'fix-dependencies
2415 (lambda* (#:key inputs #:allow-other-keys)
2416 (substitute* "build/build.xml"
2417 (("\\$\\{lib\\}/testng/testng-jdk15.jar")
2418 (string-append (assoc-ref inputs "java-testng")
2419 "/share/java/java-testng.jar"))
2420 (("\\$\\{lib\\}/commons-lang/commons-lang.jar")
2421 (string-append (assoc-ref inputs "java-commons-lang")
2422 "/share/java/commons-lang-"
2423 ,(package-version java-commons-lang) ".jar"))
2424 (("\\$\\{lib\\}/commons-io/commons-io.jar")
2425 (string-append (assoc-ref inputs "java-commons-io")
2426 "/share/java/commons-io-"
2427 ,(package-version java-commons-io)
2429 ;; Remove dependency on svn
2430 (("<build-info.*") "")
2431 (("\\$\\{revision.number\\}")
2432 ,(number->string revision))
2433 (("\\$\\{version.number\\}") ,base-version))
2434 ;; Remove dependency on classycle
2435 (substitute* "../build_resources/ant/build-common.xml"
2436 (("<taskdef name=\"dependency-checker.*") "")
2437 (("classname=\"classycle.*") "")
2438 (("classpath=\"\\$\\{lib\\}/classycle.*") ""))
2440 ;; A few tests fail because of the lack of a proper /etc/groups and
2441 ;; /etc/passwd file in the build container.
2442 (add-after 'unpack 'disable-broken-tests
2444 (substitute* "sourceTest/java/ch/systemsx/cisd/base/AllTests.java"
2445 (("Unix.isOperational\\(\\)") "false"))
2447 ;; These decorators are almost useless and pull in an unpackaged
2449 (add-after 'unpack 'remove-useless-decorators
2451 (substitute* "source/java/ch/systemsx/cisd/base/unix/Unix.java"
2453 (("import ch.rinn.restrictions.Private;") ""))
2454 (substitute* "sourceTest/java/ch/systemsx/cisd/base/unix/UnixTests.java"
2456 (("import ch.rinn.restrictions.Friend;") ""))
2458 (add-before 'configure 'build-native-code
2459 (lambda* (#:key inputs #:allow-other-keys)
2460 (let ((jdk (assoc-ref inputs "jdk"))
2461 (dir ,(match (%current-system)
2464 ((or "armhf-linux" "aarch64-linux")
2466 ((or "x86_64-linux")
2468 (_ "unknown-Linux"))))
2469 (with-directory-excursion "source/c"
2470 (invoke "gcc" "-shared" "-O3" "-fPIC" "unix.c"
2471 (string-append "-I" jdk "/include")
2472 (string-append "-I" jdk "/include/linux")
2474 (invoke "gcc" "-shared" "-O3" "-fPIC"
2475 "-DMACHINE_BYTE_ORDER=1"
2483 (string-append "-I" jdk "/include")
2484 (string-append "-I" jdk "/include/linux")
2485 "-o" "libnativedata.so"))
2486 (install-file "source/c/libunix.so"
2487 (string-append "libs/native/unix/" dir))
2488 (install-file "source/c/libnativedata.so"
2489 (string-append "libs/native/nativedata/" dir))
2491 ;; In the "check" phase we only build the test executable.
2492 (add-after 'check 'run-tests
2494 (invoke "java" "-jar" "targets/dist/sis-base-test.jar")
2495 (delete-file "targets/dist/sis-base-test.jar")
2497 (replace 'install (install-jars "targets/dist")))))
2499 `(("jdk" ,icedtea-8)
2500 ("java-commons-lang" ,java-commons-lang)
2501 ("java-commons-io" ,java-commons-io)
2502 ("java-testng" ,java-testng)
2507 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2508 "base/tags/release/"
2509 (version-major+minor base-version)
2511 "/build_resources/"))
2512 (revision revision)))
2515 "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk"))))))
2516 (home-page "http://svnsis.ethz.ch")
2517 (synopsis "Utility classes for libraries from ETH Zurich")
2518 (description "This library supplies some utility classes needed for
2519 libraries from the SIS division at ETH Zurich like jHDF5.")
2520 ;; The C sources are under a non-copyleft license, which looks like a
2521 ;; variant of the BSD licenses. The whole package is under the ASL2.0.
2522 (license (list license:asl2.0
2523 (license:non-copyleft "file://source/c/COPYING"))))))
2525 (define-public java-cisd-args4j
2526 (let ((revision 39162)
2527 (base-version "9.11.2"))
2529 (name "java-cisd-args4j")
2530 (version (string-append base-version "-" (number->string revision)))
2534 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2535 "args4j/tags/release/"
2536 (version-major+minor base-version)
2537 ".x/" base-version "/args4j/"))
2538 (revision revision)))
2539 (file-name (string-append "java-cisd-args4j-" version "-checkout"))
2542 "0hhqznjaivq7ips7mkwas78z42s6djsm20rrs7g1zd59rcsakxn2"))))
2543 (build-system ant-build-system)
2545 `(#:make-flags '("-file" "build/build.xml")
2546 #:tests? #f ; there are no tests
2547 ;; There are weird build failures with JDK8, such as: "The type
2548 ;; java.io.ObjectInputStream cannot be resolved. It is indirectly
2549 ;; referenced from required .class files"
2551 #:modules ((guix build ant-build-system)
2553 (guix build java-utils)
2558 (modify-phases %standard-phases
2559 (add-after 'unpack 'unpack-build-resources
2560 (lambda* (#:key inputs #:allow-other-keys)
2561 (mkdir-p "../build_resources")
2562 (invoke "tar" "xf" (assoc-ref inputs "build-resources")
2563 "-C" "../build_resources"
2564 "--strip-components=1")
2565 (mkdir-p "../build_resources/lib")
2567 (add-after 'unpack-build-resources 'fix-dependencies
2568 (lambda* (#:key inputs #:allow-other-keys)
2569 ;; FIXME: There should be a more convenient abstraction for
2570 ;; editing XML files.
2571 (with-directory-excursion "../build_resources/ant/"
2572 (chmod "build-common.xml" #o664)
2573 (call-with-output-file "build-common.xml.new"
2577 (with-input-from-file "build-common.xml"
2578 (lambda _ (xml->sxml #:trim-whitespace? #t)))
2579 `(;; Remove dependency on classycle and custom ant tasks
2580 (taskdef . ,(lambda (tag . kids)
2581 (let ((name ((sxpath '(name *text*)) kids)))
2582 (if (or (member "build-info" name)
2583 (member "dependency-checker" name)
2584 (member "build-java-subprojects" name)
2585 (member "project-classpath" name))
2588 (typedef . ,(lambda (tag . kids)
2589 (let ((name ((sxpath '(name *text*)) kids)))
2590 (if (member "recursive-jar" name)
2593 (build-java-subprojects . ,(lambda _ '()))
2594 ;; Ignore everything else
2595 (*default* . ,(lambda (tag . kids) `(,tag ,@kids)))
2596 (*text* . ,(lambda (_ txt) txt))))
2598 (rename-file "build-common.xml.new" "build-common.xml"))
2599 (substitute* "build/build.xml"
2600 (("\\$\\{lib\\}/cisd-base/cisd-base.jar")
2601 (string-append (assoc-ref inputs "java-cisd-base")
2602 "/share/java/sis-base.jar"))
2603 ;; Remove dependency on svn
2604 (("<build-info.*") "")
2605 (("\\$\\{revision.number\\}")
2606 ,(number->string revision))
2607 (("\\$\\{version.number\\}") ,base-version)
2608 ;; Don't use custom ant tasks.
2609 (("recursive-jar") "jar")
2610 (("<project-classpath.*") ""))
2612 (replace 'install (install-jars "targets/dist")))))
2614 `(("java-cisd-base" ,java-cisd-base)))
2616 `(("ecj" ,java-ecj-3.5)
2621 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2622 "args4j/tags/release/"
2623 (version-major+minor base-version)
2625 "/build_resources/"))
2626 (revision revision)))
2629 "056cam4k8pll7ass31sy6gwn8g8719njc41yf4l02b0342nilkyf"))
2630 (modules '((guix build utils)))
2631 ;; Delete bundled pre-built jars.
2633 '(begin (delete-file-recursively "lib/") #t))))))
2634 (home-page "http://svnsis.ethz.ch")
2635 (synopsis "Command line parser library")
2636 (description "This package provides a parser for command line arguments.")
2637 (license license:asl2.0))))
2639 (define-public java-cisd-jhdf5
2640 (let ((revision 39162)
2641 (base-version "14.12.6"))
2643 (name "java-cisd-jhdf5")
2644 (version (string-append base-version "-" (number->string revision)))
2648 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2649 "jhdf5/tags/release/"
2650 (version-major+minor base-version)
2651 ".x/" base-version "/jhdf5/"))
2652 (revision revision)))
2653 (file-name (string-append "java-cisd-jhdf5-" version "-checkout"))
2656 "13i17s2hn0q9drdqvp8csy7770p3hdbh9rp30ihln2ldkfawdmz0"))
2657 (modules '((guix build utils)))
2660 ;; Delete included gradle jar
2661 (delete-file-recursively "gradle/wrapper")
2662 ;; Delete pre-built native libraries
2663 (delete-file-recursively "libs")
2665 (build-system ant-build-system)
2667 `(#:make-flags '("-file" "build/build.xml")
2668 #:build-target "jar-all"
2669 #:test-target "jar-test"
2672 (modify-phases %standard-phases
2673 ;; FIXME: this build phase fails.
2674 (delete 'generate-jar-indices)
2675 ;; Don't erase results from the build phase when building tests.
2676 (add-after 'unpack 'separate-test-target-from-clean
2678 (substitute* "build/build.xml"
2679 (("\"jar-test\" depends=\"clean, ")
2680 "\"jar-test\" depends=\""))
2682 (add-after 'unpack 'unpack-build-resources
2683 (lambda* (#:key inputs #:allow-other-keys)
2684 (copy-recursively (assoc-ref inputs "build-resources")
2685 "../build_resources")
2686 (delete-file-recursively "../build_resources/lib/")
2687 (mkdir-p "../build_resources/lib")
2688 ;; Remove dependency on classycle
2689 (substitute* "../build_resources/ant/build-common.xml"
2690 (("<taskdef name=\"dependency-checker.*") "")
2691 (("classname=\"classycle.*") "")
2692 (("classpath=\"\\$\\{lib\\}/classycle.*") ""))
2693 ;; Remove dependency on svn
2694 (substitute* "build/build.xml"
2695 (("<build-info.*") "")
2696 (("\\$\\{revision.number\\}")
2697 ,(number->string revision))
2698 (("\\$\\{version.number\\}") ,base-version))
2700 (add-after 'unpack-build-resources 'fix-dependencies
2701 (lambda* (#:key inputs #:allow-other-keys)
2702 (substitute* "../build_resources/ant/build-common.xml"
2703 (("../libraries/testng/testng-jdk15.jar")
2704 (string-append (assoc-ref inputs "java-testng")
2705 "/share/java/java-testng.jar")))
2706 (substitute* "build/build.xml"
2707 (("\\$\\{lib\\}/sis-base/sis-base.jar")
2708 (string-append (assoc-ref inputs "java-cisd-base")
2709 "/share/java/sis-base.jar"))
2710 (("\\$\\{lib\\}/cisd-args4j/cisd-args4j.jar")
2711 (string-append (assoc-ref inputs "java-cisd-args4j")
2712 "/share/java/cisd-args4j.jar"))
2713 (("\\$\\{lib\\}/commons-lang/commons-lang.jar")
2714 (string-append (assoc-ref inputs "java-commons-lang")
2715 "/share/java/commons-lang-"
2716 ,(package-version java-commons-lang) ".jar"))
2717 (("\\$\\{lib\\}/commons-io/commons-io.jar")
2718 (string-append (assoc-ref inputs "java-commons-io")
2719 "/share/java/commons-io-"
2720 ,(package-version java-commons-io)
2722 (("\\$\\{lib\\}/testng/testng-jdk15.jar")
2723 (string-append (assoc-ref inputs "java-testng")
2724 "/share/java/java-testng.jar"))
2725 (("\\$\\{lib\\}/junit4/junit.jar")
2726 (string-append (assoc-ref inputs "java-junit")
2727 "/share/java/junit.jar"))
2728 (("\\$\\{lib\\}/jmock/hamcrest/hamcrest-core.jar")
2729 (string-append (assoc-ref inputs "java-hamcrest-core")
2730 "/share/java/hamcrest-core.jar")))
2731 ;; Remove dependency on ch.rinn.restrictions
2732 (with-directory-excursion "source/java/ch/systemsx/cisd/hdf5/"
2733 (substitute* '("BitSetConversionUtils.java"
2735 (("import ch.rinn.restrictions.Private;") "")
2737 (with-directory-excursion "sourceTest/java/ch/systemsx/cisd/hdf5/"
2738 (substitute* '("BitSetConversionTest.java"
2739 "h5ar/HDF5ArchiverTest.java")
2740 (("import ch.rinn.restrictions.Friend;") "")
2742 ;; Remove leftovers from removing @Friend
2743 (substitute* "h5ar/HDF5ArchiverTest.java"
2744 (("\\{ HDF5Archiver.class, IdCache.class, LinkRecord.class \\}\\)")
2747 (add-before 'configure 'build-native-library
2748 (lambda* (#:key inputs #:allow-other-keys)
2749 (let ((jdk (assoc-ref inputs "jdk"))
2750 (hdf5 (assoc-ref inputs "hdf5"))
2751 (dir ,(match (%current-system)
2754 ((or "armhf-linux" "aarch64-linux")
2756 ((or "x86_64-linux")
2758 (_ "unknown-Linux"))))
2759 (with-directory-excursion "source/c"
2760 (apply invoke `("gcc" "-shared" "-O3"
2762 "-Wl,--exclude-libs,ALL"
2763 ,@(find-files "jhdf5" "\\.c$")
2764 ,@(find-files "hdf-java" "\\.c$")
2765 ,(string-append "-I" hdf5 "/include")
2766 ,(string-append "-I" jdk "/include")
2767 ,(string-append "-I" jdk "/include/linux")
2768 ,(string-append hdf5 "/lib/libhdf5.a")
2769 "-o" "libjhdf5.so" "-lz")))
2770 (install-file "source/c/libjhdf5.so"
2771 (string-append "libs/native/jhdf5/" dir))
2773 ;; In the "check" phase we only build the test executable.
2774 (add-after 'check 'run-tests
2776 (invoke "java" "-jar" "targets/dist/sis-jhdf5-test.jar")
2777 (delete-file "targets/dist/sis-jhdf5-test.jar")
2780 (install-jars "targets/dist")))))
2782 `(("java-cisd-base" ,java-cisd-base)
2783 ("java-cisd-args4j" ,java-cisd-args4j)
2784 ("java-commons-lang" ,java-commons-lang)
2785 ("java-commons-io" ,java-commons-io)
2789 `(("jdk" ,icedtea-8)
2790 ("java-testng" ,java-testng)
2791 ("java-junit" ,java-junit)
2792 ("java-jmock" ,java-jmock)
2793 ("java-hamcrest-core" ,java-hamcrest-core)
2798 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2799 "jhdf5/tags/release/"
2800 (version-major+minor base-version)
2802 "/build_resources/"))
2803 (revision revision)))
2806 "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk"))))))
2807 (home-page "https://wiki-bsse.ethz.ch/display/JHDF5/")
2808 (synopsis "Java binding for HDF5")
2809 (description "JHDF5 is a high-level API in Java for reading and writing
2810 HDF5 files, building on the libraries provided by the HDF Group.")
2811 ;; The C sources are under a non-copyleft license, which looks like a
2812 ;; variant of the BSD licenses. The whole package is under the ASL2.0.
2813 (license (list license:asl2.0
2814 (license:non-copyleft "file://source/c/COPYING"))))))
2816 (define-public java-classpathx-servletapi
2818 (name "java-classpathx-servletapi")
2822 (uri (string-append "mirror://gnu/classpathx/servletapi/"
2823 "servletapi-" version ".tar.gz"))
2826 "07d8h051siga2f33fra72hk12sbq1bxa4jifjg0qj0vfazjjff0x"))))
2827 (build-system ant-build-system)
2829 `(#:tests? #f ; there is no test target
2830 #:build-target "compile"
2832 (list "-Dbuild.compiler=javac1.8"
2833 (string-append "-Ddist=" (assoc-ref %outputs "out")))
2835 (modify-phases %standard-phases
2837 (lambda* (#:key make-flags #:allow-other-keys)
2838 (apply invoke `("ant" "dist" ,@make-flags)))))))
2839 (home-page "https://www.gnu.org/software/classpathx/")
2840 (synopsis "Java servlet API implementation")
2841 (description "This is the GNU servlet API distribution, part of the
2842 ClasspathX project. It provides implementations of version 3.0 of the servlet
2843 API and version 2.1 of the Java ServerPages API.")
2844 (license license:gpl3+)))
2846 (define-public java-javaee-servletapi
2848 (name "java-javaee-servletapi")
2852 (uri (string-append "https://github.com/javaee/servlet-spec/"
2853 "archive/" version ".zip"))
2854 (file-name (string-append name "-" version ".zip"))
2857 "0m6p13vgfb1ihich1jp5j6fqlhkjsrkn32c86bsbkryp38ipwg8w"))))
2858 (build-system ant-build-system)
2860 `(#:jar-name "javax-servletapi.jar"
2863 #:source-dir "src/main/java"))
2865 `(("unzip" ,unzip)))
2866 (home-page "https://javaee.github.io/servlet-spec/")
2867 (synopsis "Java servlet API")
2868 (description "Java Servlet is the foundation web specification in the
2869 Java Enterprise Platform. Developers can build web applications using the
2870 Servlet API to interact with the request/response workflow. This project
2871 provides information on the continued development of the Java Servlet
2873 ;; Main code is dual-licensed by Oracle under either GLP2 or CDDL 1.1.
2874 ;; Some files are licensed under ASL 2.0.
2875 (license (list license:asl2.0 license:gpl2 license:cddl1.1))))
2877 (define-public java-swt
2882 ;; The types of many variables and procedures differ in the sources
2883 ;; dependent on whether the target architecture is a 32-bit system or a
2884 ;; 64-bit system. Instead of patching the sources on demand in a build
2885 ;; phase we download either the 32-bit archive (which mostly uses "int"
2886 ;; types) or the 64-bit archive (which mostly uses "long" types).
2887 (let ((hash32 "09q0cbh90d90q3a7dx9430kc4m6bijrkr4lajrmzzvi0jjdpq4v9")
2888 (hash64 "17k5hs75a87ssmc5xhwdfdm2gn4zba0r837l2455za01krnkaa2q")
2891 (let-values (((hash file)
2892 (match (or (%current-target-system) (%current-system))
2893 ("x86_64-linux" (values hash64 file64))
2894 (_ (values hash32 file32)))))
2898 "http://download.eclipse.org/eclipse/downloads/drops4/"
2899 "R-" version "-201710090410/swt-" version
2900 "-gtk-linux-" file ".zip"))
2901 (sha256 (base32 hash))))))
2902 (build-system ant-build-system)
2904 `(#:jar-name "swt.jar"
2906 #:tests? #f ; no "check" target
2908 (modify-phases %standard-phases
2910 (lambda* (#:key source #:allow-other-keys)
2912 (invoke "unzip" source "-d" "swt")
2915 (invoke "unzip" "src.zip" "-d" "src")))
2916 ;; The classpath contains invalid icecat jars. Since we don't need
2917 ;; anything other than the JDK on the classpath, we can simply unset
2919 (add-after 'configure 'unset-classpath
2920 (lambda _ (unsetenv "CLASSPATH") #t))
2921 (add-before 'build 'build-native
2922 (lambda* (#:key inputs outputs #:allow-other-keys)
2923 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
2924 ;; Build shared libraries. Users of SWT have to set the system
2925 ;; property swt.library.path to the "lib" directory of this
2928 (setenv "OUTPUT_DIR" lib)
2929 (with-directory-excursion "src"
2930 (invoke "bash" "build.sh")))))
2931 (add-after 'install 'install-native
2932 (lambda* (#:key outputs #:allow-other-keys)
2933 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
2934 (for-each (lambda (file)
2935 (install-file file lib))
2936 (find-files "." "\\.so$"))
2940 ("libxtst" ,libxtst)
2945 `(("pkg-config" ,pkg-config)
2947 (home-page "https://www.eclipse.org/swt/")
2948 (synopsis "Widget toolkit for Java")
2950 "SWT is a widget toolkit for Java designed to provide efficient, portable
2951 access to the user-interface facilities of the operating systems on which it
2953 ;; SWT code is licensed under EPL1.0
2954 ;; Gnome and Gtk+ bindings contain code licensed under LGPLv2.1
2955 ;; Cairo bindings contain code under MPL1.1
2956 ;; XULRunner 1.9 bindings contain code under MPL2.0
2961 license:lgpl2.1+))))
2963 (define-public java-xz
2969 (uri (string-append "http://tukaani.org/xz/xz-java-" version ".zip"))
2972 "1z3p1ri1gvl07inxn0agx44ck8n7wrzfmvkz8nbq3njn8r9wba8x"))))
2973 (build-system ant-build-system)
2975 `(#:tests? #f ; There are no tests to run.
2976 #:jar-name ,(string-append "xz-" version ".jar")
2978 (modify-phases %standard-phases
2979 ;; The unpack phase enters the "maven" directory by accident.
2980 (add-after 'unpack 'chdir
2981 (lambda _ (chdir "..") #t)))))
2983 `(("unzip" ,unzip)))
2984 (home-page "https://tukaani.org/xz/java.html")
2985 (synopsis "Implementation of XZ data compression in pure Java")
2986 (description "This library aims to be a complete implementation of XZ data
2987 compression in pure Java. Single-threaded streamed compression and
2988 decompression and random access decompression have been fully implemented.")
2989 (license license:public-domain)))
2991 ;; java-hamcrest-core uses qdox version 1.12. We package this version instead
2992 ;; of the latest release.
2993 (define-public java-qdox-1.12
2999 (uri (string-append "http://central.maven.org/maven2/"
3000 "com/thoughtworks/qdox/qdox/" version
3001 "/qdox-" version "-sources.jar"))
3004 "0hlfbqq2avf5s26wxkksqmkdyk6zp9ggqn37c468m96mjv0n9xfl"))))
3005 (build-system ant-build-system)
3007 `(;; Tests require junit
3009 #:jar-name "qdox.jar"
3011 (modify-phases %standard-phases
3013 (lambda* (#:key source #:allow-other-keys)
3015 (with-directory-excursion "src"
3016 (invoke "jar" "-xf" source))))
3017 ;; At this point we don't have junit, so we must remove the API
3019 (add-after 'unpack 'delete-tests
3021 (delete-file-recursively "src/com/thoughtworks/qdox/junit")
3023 (home-page "http://qdox.codehaus.org/")
3024 (synopsis "Parse definitions from Java source files")
3026 "QDox is a high speed, small footprint parser for extracting
3027 class/interface/method definitions from source files complete with JavaDoc
3028 @code{@@tags}. It is designed to be used by active code generators or
3029 documentation tools.")
3030 (license license:asl2.0)))
3032 (define-public java-jarjar
3034 (name "java-jarjar")
3039 "https://storage.googleapis.com/google-code-archive-downloads/v2/"
3040 "code.google.com/jarjar/jarjar-src-" version ".zip"))
3043 "1v8irhni9cndcw1l1wxqgry013s2kpj0qqn57lj2ji28xjq8ndjl"))
3044 (modules '((guix build utils)))
3047 ;; Delete bundled thirds-party jar archives.
3048 ;; TODO: unbundle maven-plugin-api.
3049 (delete-file "lib/asm-4.0.jar")
3050 (delete-file "lib/asm-commons-4.0.jar")
3051 (delete-file "lib/junit-4.8.1.jar")
3053 (build-system ant-build-system)
3055 `(;; Tests require junit, which ultimately depends on this package.
3057 #:build-target "jar"
3059 (modify-phases %standard-phases
3060 (add-before 'build 'do-not-use-bundled-asm
3061 (lambda* (#:key inputs #:allow-other-keys)
3062 (substitute* "build.xml"
3063 (("<path id=\"path.build\">")
3064 (string-append "<path id=\"path.build\"><fileset dir=\""
3065 (assoc-ref inputs "java-asm-bootstrap")
3066 "/share/java\" includes=\"**/*.jar\"/>"))
3067 (("<zipfileset src=\"lib/asm-4.0.jar\"/>") "")
3068 (("lib/asm-commons-4.0.jar")
3069 (string-append (assoc-ref inputs "java-asm-bootstrap")
3070 "/share/java/asm-6.0.jar"))
3071 (("<include name=\"org/objectweb/asm/commons/Remap\\*\\.class\"/>")
3072 (string-append "<include name=\"org/objectweb/asm/"
3073 "commons/Remap*.class\"/>"
3074 "<include name=\"org/objectweb/asm/*.class\"/>"
3075 "<include name=\"org/objectweb/asm/"
3076 "signature/*.class\"/>"
3077 "<include name=\"org/objectweb/asm/"
3078 "commons/SignatureRemapper.class\"/>")))
3081 (lambda* (#:key outputs #:allow-other-keys)
3082 (let ((target (string-append (assoc-ref outputs "out")
3084 (install-file (string-append "dist/jarjar-" ,version ".jar")
3088 `(("java-asm-bootstrap" ,java-asm-bootstrap)))
3090 `(("unzip" ,unzip)))
3091 (home-page "https://code.google.com/archive/p/jarjar/")
3092 (synopsis "Repackage Java libraries")
3094 "Jar Jar Links is a utility that makes it easy to repackage Java
3095 libraries and embed them into your own distribution. Jar Jar Links includes
3096 an Ant task that extends the built-in @code{jar} task.")
3097 (license license:asl2.0)))
3099 (define-public java-hamcrest-core
3101 (name "java-hamcrest-core")
3105 (uri (string-append "https://github.com/hamcrest/JavaHamcrest/"
3106 "archive/hamcrest-java-" version ".tar.gz"))
3109 "11g0s105fmwzijbv08lx8jlb521yravjmxnpgdx08fvg1kjivhva"))
3110 (modules '((guix build utils)))
3113 ;; Delete bundled thirds-party jar archives.
3114 (delete-file-recursively "lib")
3116 (build-system ant-build-system)
3118 `(#:tests? #f ; Tests require junit
3119 #:modules ((guix build ant-build-system)
3122 #:make-flags (list (string-append "-Dversion=" ,version))
3123 #:test-target "unit-test"
3124 #:build-target "core"
3126 (modify-phases %standard-phases
3127 ;; Disable unit tests, because they require junit, which requires
3128 ;; hamcrest-core. We also give a fixed value to the "Built-Date"
3129 ;; attribute from the manifest for reproducibility.
3130 (add-before 'configure 'patch-build.xml
3132 (substitute* "build.xml"
3133 (("unit-test, ") "")
3134 (("\\$\\{build.timestamp\\}") "guix"))
3136 ;; Java's "getMethods()" returns methods in an unpredictable order.
3137 ;; To make the output of the generated code deterministic we must
3138 ;; sort the array of methods.
3139 (add-after 'unpack 'make-method-order-deterministic
3141 (substitute* "hamcrest-generator/src/main/java/org/hamcrest/generator/ReflectiveFactoryReader.java"
3142 (("import java\\.util\\.Iterator;" line)
3143 (string-append line "\n"
3144 "import java.util.Arrays; import java.util.Comparator;"))
3145 (("allMethods = cls\\.getMethods\\(\\);" line)
3146 (string-append "_" line
3148 private Method[] getSortedMethods() {
3149 Arrays.sort(_allMethods, new Comparator<Method>() {
3151 public int compare(Method a, Method b) {
3152 return a.toString().compareTo(b.toString());
3158 private Method[] allMethods = getSortedMethods();")))
3160 (add-before 'build 'do-not-use-bundled-qdox
3161 (lambda* (#:key inputs #:allow-other-keys)
3162 (substitute* "build.xml"
3163 (("lib/generator/qdox-1.12.jar")
3164 (string-append (assoc-ref inputs "java-qdox-1.12")
3165 "/share/java/qdox.jar")))
3167 ;; build.xml searches for .jar files in this directoy, which
3168 ;; we remove from the source archive.
3169 (add-before 'build 'create-dummy-directories
3171 (mkdir-p "lib/integration")
3174 (lambda* (#:key outputs #:allow-other-keys)
3175 (let* ((target (string-append (assoc-ref outputs "out")
3177 (version-suffix ,(string-append "-" version ".jar"))
3178 (install-without-version-suffix
3181 (string-append target
3182 (basename jar version-suffix)
3186 install-without-version-suffix
3189 (and (string-suffix? ".jar" name)
3190 (not (string-suffix? "-sources.jar" name)))))))
3193 `(("java-qdox-1.12" ,java-qdox-1.12)
3194 ("java-jarjar" ,java-jarjar)))
3195 (home-page "http://hamcrest.org/")
3196 (synopsis "Library of matchers for building test expressions")
3198 "This package provides a library of matcher objects (also known as
3199 constraints or predicates) allowing @code{match} rules to be defined
3200 declaratively, to be used in other frameworks. Typical scenarios include
3201 testing frameworks, mocking libraries and UI validation rules.")
3202 (license license:bsd-2)))
3204 (define-public java-junit
3210 (uri (string-append "https://github.com/junit-team/junit/"
3211 "archive/r" version ".tar.gz"))
3212 (file-name (string-append name "-" version ".tar.gz"))
3215 "090dn5v1vs0b3acyaqc0gjf6p8lmd2h24wfzsbq7sly6b214anws"))
3216 (modules '((guix build utils)))
3219 ;; Delete bundled jar archives.
3220 (delete-file-recursively "lib")
3222 (build-system ant-build-system)
3224 `(#:tests? #f ; no tests
3225 #:jar-name "junit.jar"))
3227 `(("java-hamcrest-core" ,java-hamcrest-core)))
3228 (home-page "http://junit.org/")
3229 (synopsis "Test framework for Java")
3231 "JUnit is a simple framework to write repeatable tests for Java projects.
3232 JUnit provides assertions for testing expected results, test fixtures for
3233 sharing common test data, and test runners for running tests.")
3234 (license license:epl1.0)))
3236 (define-public java-plexus-utils
3238 (name "java-plexus-utils")
3242 (uri (string-append "https://github.com/codehaus-plexus/"
3243 "plexus-utils/archive/plexus-utils-"
3247 "1ihfigar20lvk4pinii7dq05i173xphhw4iyrk6gjfy04m01j2lz"))))
3248 (build-system ant-build-system)
3249 ;; FIXME: The default build.xml does not include a target to install
3252 `(#:jar-name "plexus-utils.jar"
3253 #:source-dir "src/main"
3255 (modify-phases %standard-phases
3256 (add-after 'unpack 'fix-reference-to-/bin-and-/usr
3258 (substitute* "src/main/java/org/codehaus/plexus/util/\
3259 cli/shell/BourneShell.java"
3260 (("/bin/sh") (which "sh"))
3261 (("/usr/") (getcwd)))
3263 (add-after 'unpack 'fix-or-disable-broken-tests
3265 (with-directory-excursion "src/test/java/org/codehaus/plexus/util"
3266 (substitute* '("cli/CommandlineTest.java"
3267 "cli/shell/BourneShellTest.java")
3268 (("/bin/sh") (which "sh"))
3269 (("/bin/echo") (which "echo")))
3271 ;; This test depends on MavenProjectStub, but we don't have
3272 ;; a package for Maven.
3273 (delete-file "introspection/ReflectionValueExtractorTest.java")
3275 ;; FIXME: The command line tests fail, maybe because they use
3277 (delete-file "cli/CommandlineTest.java"))
3280 `(("java-hamcrest-core" ,java-hamcrest-core)
3281 ("java-junit" ,java-junit)))
3282 (home-page "http://codehaus-plexus.github.io/plexus-utils/")
3283 (synopsis "Common utilities for the Plexus framework")
3284 (description "This package provides various Java utility classes for the
3285 Plexus framework to ease working with strings, files, command lines, XML and
3287 (license license:asl2.0)))
3289 (define-public java-plexus-interpolation
3291 (name "java-plexus-interpolation")
3295 (uri (string-append "https://github.com/codehaus-plexus/"
3296 "plexus-interpolation/archive/"
3297 "plexus-interpolation-" version ".tar.gz"))
3300 "03377yzlx5q440m6sxxgv6a5qb8fl30zzcgxgc0hxk5qgl2z1jjn"))))
3301 (build-system ant-build-system)
3303 `(#:jar-name "plexus-interpolation.jar"
3304 #:source-dir "src/main"))
3306 `(("java-junit" ,java-junit)
3307 ("java-hamcrest-core" ,java-hamcrest-core)))
3308 (home-page "http://codehaus-plexus.github.io/plexus-interpolation/")
3309 (synopsis "Java components for interpolating ${} strings and the like")
3310 (description "Plexus interpolator is a modular, flexible interpolation
3311 framework for the expression language style commonly seen in Maven, Plexus,
3312 and other related projects.
3314 It has its foundation in the @code{org.codehaus.plexus.utils.interpolation}
3315 package within @code{plexus-utils}, but has been separated in order to allow
3316 these two libraries to vary independently of one another.")
3317 (license license:asl2.0)))
3319 (define-public java-plexus-classworlds
3321 (name "java-plexus-classworlds")
3325 (uri (string-append "https://github.com/codehaus-plexus/"
3326 "plexus-classworlds/archive/plexus-classworlds-"
3330 "1qm4p0rl8d82lzhsiwnviw11jnq44s0gflg78zq152xyyr2xmh8g"))))
3331 (build-system ant-build-system)
3333 `(#:jar-name "plexus-classworlds.jar"
3334 #:source-dir "src/main"
3335 #:tests? #f));; FIXME: we need to generate some resources as in pom.xml
3337 `(("java-junit" ,java-junit)))
3338 (home-page "http://codehaus-plexus.github.io/plexus-classworlds/")
3339 (synopsis "Java class loader framework")
3340 (description "Plexus classworlds replaces the native @code{ClassLoader}
3341 mechanism of Java. It is especially useful for dynamic loading of application
3343 (license license:asl2.0)))
3345 (define java-plexus-container-default-bootstrap
3347 (name "java-plexus-container-default-bootstrap")
3351 (uri (string-append "https://github.com/codehaus-plexus/plexus-containers"
3352 "/archive/plexus-containers-" version ".tar.gz"))
3355 "0xw5g30qf4a83608rw9v2hv8pfsz7d69dkdhk6r0wia4q78hh1pc"))))
3356 (build-system ant-build-system)
3358 `(#:jar-name "container-default.jar"
3359 #:source-dir "plexus-container-default/src/main/java"
3360 #:test-dir "plexus-container-default/src/test"
3362 #:tests? #f; requires plexus-archiver, which depends on this package
3364 (modify-phases %standard-phases
3365 (add-before 'build 'copy-resources
3368 "plexus-container-default/src/main/resources/"
3372 `(("worldclass" ,java-plexus-classworlds)
3373 ("xbean" ,java-geronimo-xbean-reflect)
3374 ("utils" ,java-plexus-utils)
3375 ("junit" ,java-junit)
3376 ("guava" ,java-guava)))
3377 (home-page "https://github.com/codehaus-plexus/plexus-containers")
3378 (synopsis "Inversion-of-control container")
3379 (description "Plexus-default-container is Plexus' inversion-of-control
3380 (@dfn{IoC}) container. It is composed of its public API and its default
3382 (license license:asl2.0)))
3384 (define-public java-plexus-io
3386 (name "java-plexus-io")
3390 (uri (string-append "https://github.com/codehaus-plexus/plexus-io"
3391 "/archive/plexus-io-" version ".tar.gz"))
3394 "0f2j41kihaymxkpbm55smpxjja235vad8cgz94frfy3ppcp021dw"))))
3395 (build-system ant-build-system)
3397 `(#:jar-name "plexus-io.jar"
3398 #:source-dir "src/main/java"
3399 #:test-dir "src/test"
3402 (modify-phases %standard-phases
3403 (add-before 'build 'copy-resources
3405 (mkdir-p "build/classes/META-INF/plexus")
3406 (copy-file "src/main/resources/META-INF/plexus/components.xml"
3407 "build/classes/META-INF/plexus/components.xml")
3410 `(("utils" ,java-plexus-utils)
3411 ("commons-io" ,java-commons-io)
3412 ("java-jsr305" ,java-jsr305)))
3414 `(("junit" ,java-junit)
3415 ("hamcrest" ,java-hamcrest-core)
3416 ("guava" ,java-guava)
3417 ("classworlds" ,java-plexus-classworlds)
3418 ("xbean" ,java-geronimo-xbean-reflect)
3419 ("container-default" ,java-plexus-container-default-bootstrap)))
3420 (home-page "https://github.com/codehaus-plexus/plexus-io")
3421 (synopsis "I/O plexus components")
3422 (description "Plexus IO is a set of plexus components, which are designed
3423 for use in I/O operations. This implementation using plexus components allows
3424 reusing it in maven.")
3425 (license license:asl2.0)))
3427 (define-public java-plexus-archiver
3429 (name "java-plexus-archiver")
3433 (uri (string-append "https://github.com/codehaus-plexus/plexus-archiver"
3434 "/archive/plexus-archiver-" version ".tar.gz"))
3437 "0ry6i92gli0mvdmfih2vgs0lkf9yvx18h2ajxim66yg6yipnp0hg"))))
3438 (build-system ant-build-system)
3440 `(#:jar-name "plexus-archiver.jar"
3441 #:source-dir "src/main/java"
3443 #:test-dir "src/test"
3444 #:test-exclude (list "**/Abstract*.java" "**/Base*.java")
3446 (modify-phases %standard-phases
3447 (add-before 'check 'remove-failing
3449 ;; Requires an older version of plexus container
3451 "src/test/java/org/codehaus/plexus/archiver/DuplicateFilesTest.java")
3453 (add-before 'check 'fix-test-building
3455 (substitute* "build.xml"
3456 (("srcdir=\"src/test\"") "srcdir=\"src/test/java\""))
3458 (add-before 'build 'copy-resources
3460 (mkdir-p "build/classes/META-INF/plexus")
3461 (copy-file "src/main/resources/META-INF/plexus/components.xml"
3462 "build/classes/META-INF/plexus/components.xml")
3465 `(("utils" ,java-plexus-utils)
3466 ("commons-io" ,java-commons-io)
3467 ("snappy" ,java-iq80-snappy)
3468 ("io" ,java-plexus-io)
3469 ("compress" ,java-commons-compress)
3470 ("container-default" ,java-plexus-container-default-bootstrap)
3471 ("snappy" ,java-snappy)
3472 ("java-jsr305" ,java-jsr305)))
3474 `(("java-hamcrest-core" ,java-hamcrest-core)
3475 ("junit" ,java-junit)
3476 ("classworld" ,java-plexus-classworlds)
3477 ("xbean" ,java-geronimo-xbean-reflect)
3478 ("xz" ,java-tukaani-xz)
3479 ("guava" ,java-guava)))
3480 (home-page "https://github.com/codehaus-plexus/plexus-archiver")
3481 (synopsis "Archiver component of the Plexus project")
3482 (description "Plexus-archiver contains a component to deal with project
3484 (license license:asl2.0)))
3486 (define-public java-plexus-container-default
3488 (inherit java-plexus-container-default-bootstrap)
3489 (name "java-plexus-container-default")
3491 `(#:jar-name "container-default.jar"
3492 #:source-dir "plexus-container-default/src/main/java"
3493 #:test-dir "plexus-container-default/src/test"
3494 #:test-exclude (list ;"**/*Test.java"
3496 ;; Requires plexus-hierarchy
3497 "**/PlexusHierarchyTest.java"
3499 "**/ComponentRealmCompositionTest.java"
3500 "**/PlexusContainerTest.java")
3503 (modify-phases %standard-phases
3504 (add-before 'build 'copy-resources
3507 "plexus-container-default/src/main/resources/"
3510 (add-before 'check 'fix-paths
3512 (let ((dir "plexus-container-default/src/test/java/org/codehaus"))
3515 dir "/plexus/component/composition/"
3516 "ComponentRealmCompositionTest.java")
3517 (("src/test") "plexus-container-default/src/test"))
3520 `(("worldclass" ,java-plexus-classworlds)
3521 ("xbean" ,java-geronimo-xbean-reflect)
3522 ("utils" ,java-plexus-utils)
3523 ("junit" ,java-junit)
3524 ("guava" ,java-guava)))
3526 `(("archiver" ,java-plexus-archiver)
3527 ("hamcrest" ,java-hamcrest-core)))))
3529 (define-public java-plexus-component-annotations
3531 (inherit java-plexus-container-default)
3532 (name "java-plexus-component-annotations")
3534 `(#:jar-name "plexus-component-annotations.jar"
3535 #:source-dir "plexus-component-annotations/src/main/java"
3536 #:tests? #f)); no tests
3539 (synopsis "Plexus descriptors generator")
3540 (description "This package is a Maven plugin to generate Plexus descriptors
3541 from source tags and class annotations.")))
3543 (define-public java-plexus-cipher
3545 (name "java-plexus-cipher")
3549 (uri (string-append "https://github.com/codehaus-plexus/plexus-cipher"
3550 "/archive/plexus-cipher-" version ".tar.gz"))
3553 "1j3r8xzlxlk340snkjp6lk2ilkxlkn8qavsfiq01f43xmvv8ymk3"))))
3554 (build-system ant-build-system)
3556 `(#:jar-name "plexus-cipher.jar"
3557 #:source-dir "src/main/java"
3559 #:tests? #f; FIXME: requires sisu-inject-bean
3561 (modify-phases %standard-phases
3562 (add-before 'build 'copy-resources
3564 (copy-recursively "src/main/resources" "build/classes")
3565 (mkdir-p "build/classes/META-INF/sisu")
3566 (with-output-to-file "build/classes/META-INF/sisu/javax.inject.Named"
3568 (display "org.sonatype.plexus.components.cipher.DefaultPlexusCipher\n")))
3571 `(("java-cdi-api" ,java-cdi-api)
3572 ("java-javax-inject" ,java-javax-inject)))
3573 (home-page "https://github.com/sonatype/plexus-cipher")
3574 (synopsis "Encryption/decryption Component")
3575 (description "Plexus-cipher contains a component to deal with encryption
3577 (license license:asl2.0)))
3579 (define-public java-plexus-compiler-api
3581 (name "java-plexus-compiler-api")
3585 (uri (string-append "https://github.com/codehaus-plexus/plexus-compiler"
3586 "/archive/plexus-compiler-" version ".tar.gz"))
3589 "09vmxs0807wsd26nbrwwj5l8ycmzazqycj52l7w6wjvkryywi69h"))))
3590 (build-system ant-build-system)
3592 `(#:jar-name "plexus-compiler-api.jar"
3593 #:source-dir "plexus-compiler-api/src/main/java"
3595 #:test-dir "plexus-compiler-api/src/test"))
3597 `(("java-plexus-container-default" ,java-plexus-container-default)
3598 ("java-plexus-util" ,java-plexus-utils)))
3600 `(("java-junit" ,java-junit)))
3601 (home-page "https://github.com/codehaus-plexus/plexus-compiler")
3602 (synopsis "Plexus Compilers component's API to manipulate compilers")
3603 (description "This package contains the API used by components to manipulate
3605 (license (list license:asl2.0
3608 (define-public java-plexus-compiler-javac
3610 (inherit java-plexus-compiler-api)
3611 (name "java-plexus-compiler-javac")
3613 `(#:jar-name "plexus-compiler-javac.jar"
3614 #:source-dir "plexus-compilers/plexus-compiler-javac/src/main/java"
3616 #:tests? #f; depends on compiler-test -> maven-core -> ... -> this package.
3617 #:test-dir "plexus-compilers/plexus-compiler-javac/src/test"))
3619 `(("java-plexus-compiler-api" ,java-plexus-compiler-api)
3620 ("java-plexus-utils" ,java-plexus-utils)
3621 ("java-plexus-container-default" ,java-plexus-container-default)))
3623 `(("java-junit" ,java-junit)))
3624 (synopsis "Javac Compiler support for Plexus Compiler component")
3625 (description "This package contains the Javac Compiler support for Plexus
3626 Compiler component.")))
3628 (define-public java-plexus-sec-dispatcher
3630 (name "java-plexus-sec-dispatcher")
3631 (version "1.4") ;; Newest release listed at the Maven Central Repository.
3633 ;; This project doesn't tag releases or publish tarballs, so we take
3634 ;; the "prepare release plexus-sec-dispatcher-1.4" git commit.
3636 (uri (string-append "https://github.com/sonatype/plexus-sec-dispatcher/"
3637 "archive/7db8f88048.tar.gz"))
3640 "1smfrk4n7xbrsxpxcp2j4i0j8q86j73w0w6xg7qz83dp6dagdjgp"))
3641 (file-name (string-append name "-" version ".tar.gz"))))
3643 `(#:jar-name "plexus-sec-dispatcher.jar"
3644 #:source-dir "src/main/java"
3647 (modify-phases %standard-phases
3648 (add-before 'build 'generate-models
3649 (lambda* (#:key inputs #:allow-other-keys)
3650 (define (modello-single-mode file version mode)
3652 "org.codehaus.modello.ModelloCli"
3653 file mode "src/main/java" version
3655 (let ((file "src/main/mdo/settings-security.mdo"))
3656 (modello-single-mode file "1.0.0" "java")
3657 (modello-single-mode file "1.0.0" "xpp3-reader")
3658 (modello-single-mode file "1.0.0" "xpp3-writer"))
3660 (add-before 'build 'generate-components.xml
3662 (mkdir-p "build/classes/META-INF/plexus")
3663 (with-output-to-file "build/classes/META-INF/plexus/components.xml"
3669 <role>org.sonatype.plexus.components.sec.dispatcher.SecDispatcher</role>\n
3670 <role-hint>default</role-hint>\n
3671 <implementation>org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher</implementation>\n
3672 <description></description>\n
3675 <role>org.sonatype.plexus.components.cipher.PlexusCipher</role>\n
3676 <field-name>_cipher</field-name>\n
3679 <role>org.sonatype.plexus.components.sec.dispatcher.PasswordDecryptor</role>\n
3680 <field-name>_decryptors</field-name>\n
3684 <_configuration-file>~/.settings-security.xml</_configuration-file>\n
3688 </component-set>\n")))
3690 (add-before 'check 'fix-paths
3692 (copy-recursively "src/test/resources" "target")
3695 `(("java-plexus-cipher" ,java-plexus-cipher)))
3697 `(("java-modello-core" ,java-modello-core)
3699 ("java-plexus-container-default" ,java-plexus-container-default)
3700 ("java-plexus-classworlds" ,java-plexus-classworlds)
3701 ("java-plexus-utils" ,java-plexus-utils)
3702 ("java-guava" ,java-guava)
3703 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
3704 ("java-sisu-build-api" ,java-sisu-build-api)
3706 ("java-modellop-plugins-java" ,java-modello-plugins-java)
3707 ("java-modellop-plugins-xml" ,java-modello-plugins-xml)
3708 ("java-modellop-plugins-xpp3" ,java-modello-plugins-xpp3)
3710 ("java-junit" ,java-junit)))
3711 (build-system ant-build-system)
3712 (home-page "https://github.com/sonatype/plexus-sec-dispatcher")
3713 (synopsis "Plexus Security Dispatcher Component")
3714 (description "This package is the Plexus Security Dispatcher Component.
3715 This component decrypts a string passed to it.")
3716 (license license:asl2.0)))
3718 (define-public java-plexus-cli
3720 (name "java-plexus-cli")
3725 (url "https://github.com/sonatype/plexus-cli")
3726 (commit "a776afa6bca84e5107bedb69440329cdb24ed645")))
3727 (file-name (string-append name "-" version))
3730 "0xjrlay605rypv3zd7y24vlwf0039bil3n2cqw54r1ddpysq46vx"))))
3731 (build-system ant-build-system)
3733 `(#:jar-name "plexus-cli.jar"
3734 #:source-dir "src/main/java"
3736 #:test-dir "src/test"))
3738 `(("java-commons-cli" ,java-commons-cli)
3739 ("java-plexus-container-default" ,java-plexus-container-default)
3740 ("java-plexus-classworlds" ,java-plexus-classworlds)))
3742 `(("java-plexus-utils" ,java-plexus-utils)
3743 ("java-junit" ,java-junit)
3744 ("java-guava" ,java-guava)))
3745 (home-page "https://codehaus-plexus.github.io/plexus-cli")
3746 (synopsis "CLI building library for plexus")
3747 (description "This package is a library to help creating CLI around
3748 Plexus components.")
3749 (license license:asl2.0)))
3751 (define-public java-sisu-build-api
3753 (name "java-sisu-build-api")
3757 (uri (string-append "https://github.com/sonatype/sisu-build-api/"
3758 "archive/plexus-build-api-" version ".tar.gz"))
3761 "1c3rrpma3x634xp2rm2p5iskfhzdyc7qfbhjzr70agrl1jwghgy2"))))
3762 (build-system ant-build-system)
3764 `(#:jar-name "sisu-build-api.jar"
3765 #:source-dir "src/main/java"
3767 #:tests? #f; FIXME: how to run the tests?
3769 (modify-phases %standard-phases
3770 (add-before 'build 'copy-resources
3772 (copy-recursively "src/main/resources" "build/classes")
3773 (substitute* (find-files "build/classes")
3774 (("\\$\\{project.version\\}") ,version))
3776 (add-before 'build 'generate-plexus-compontent
3778 (mkdir-p "build/classes/META-INF/plexus")
3779 ;; This file is required for plexus to inject this package.
3780 ;; FIXME: how is it generated?
3781 (with-output-to-file "build/classes/META-INF/plexus/components.xml"
3787 <role>org.sonatype.plexus.build.incremental.BuildContext</role>\n
3788 <role-hint>default</role-hint>\n
3789 <implementation>org.sonatype.plexus.build.incremental.DefaultBuildContext</implementation>\n
3790 <description>Filesystem based non-incremental build context implementation\n
3791 which behaves as if all files were just created.</description>\n
3794 </component-set>\n")))
3797 `(("java-plexus-utils" ,java-plexus-utils)
3798 ("java-plexus-container-default" ,java-plexus-container-default)))
3799 (home-page "https://github.com/sonatype/sisu-build-api/")
3800 (synopsis "Base build API for maven")
3801 (description "This package contains the base build API for maven and
3802 a default implementation of it. This API is about scanning files in a
3803 project and determining what files need to be rebuilt.")
3804 (license license:asl2.0)))
3806 (define-public java-modello-core
3808 (name "java-modello-core")
3812 (uri (string-append "https://github.com/codehaus-plexus/modello"
3813 "/archive/modello-" version ".tar.gz"))
3816 "0l2pvns8pmlrmjm3iknp7gpg3654y1m8qhy55b19sdwdchdcyxfh"))))
3817 (build-system ant-build-system)
3819 `(#:jar-name "modello-core.jar"
3820 #:source-dir "modello-core/src/main/java"
3821 #:test-dir "modello-core/src/test"
3822 #:main-class "org.codehaus.modello.ModelloCli"
3825 (modify-phases %standard-phases
3826 (add-before 'build 'copy-resources
3828 (mkdir-p "build/classes/META-INF/plexus")
3829 (copy-file "modello-core/src/main/resources/META-INF/plexus/components.xml"
3830 "build/classes/META-INF/plexus/components.xml")
3832 (add-before 'check 'fix-tests
3834 (with-directory-excursion "modello-core/src/test/java/org/codehaus"
3835 (substitute* '("modello/core/DefaultModelloCoreTest.java"
3836 "modello/core/io/ModelReaderTest.java")
3837 (("src/test") "modello-core/src/test")))
3840 `(("java-plexus-utils" ,java-plexus-utils)
3841 ("java-plexus-container-default" ,java-plexus-container-default)
3842 ("java-sisu-build-api" ,java-sisu-build-api)))
3844 `(("java-junit" ,java-junit)
3845 ("java-plexus-classworlds" ,java-plexus-classworlds)
3846 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
3847 ("java-guava" ,java-guava)))
3848 (home-page "http://codehaus-plexus.github.io/modello/")
3849 (synopsis "Framework for code generation from a simple model")
3850 (description "Modello is a framework for code generation from a simple model.
3852 Modello generates code from a simple model format: based on a plugin
3853 architecture, various types of code and descriptors can be generated from the
3854 single model, including Java POJOs, XML/JSON/YAML marshallers/unmarshallers,
3855 XSD and documentation.")
3858 ;; Although this package uses only files licensed under expat,
3859 ;; other parts of the source are licensed under different
3860 ;; licenses. We include them to be inherited by other packages.
3862 ;; Some files in modello-plugin-java are licensed under a
3863 ;; 5-clause BSD license.
3864 (license:non-copyleft
3865 (string-append "file:///modello-plugins/modello-plugin-java/"
3866 "src/main/java/org/codehaus/modello/plugin/"
3867 "java/javasource/JNaming.java"))))))
3869 (define-public java-modello-plugins-java
3871 (inherit java-modello-core)
3872 (name "java-modello-plugins-java")
3874 `(#:jar-name "modello-plugins-java.jar"
3875 #:source-dir "modello-plugins/modello-plugin-java/src/main/java"
3876 #:test-dir "modello-plugins/modello-plugin-java/src/test"
3878 #:tests? #f; requires maven-model, which depends on this package
3880 (modify-phases %standard-phases
3881 (add-before 'build 'copy-resources
3883 (mkdir-p "build/classes")
3884 (copy-recursively "modello-plugins/modello-plugin-java/src/main/resources"
3888 `(("java-modello-core" ,java-modello-core)
3889 ,@(package-inputs java-modello-core)))
3890 (synopsis "Modello Java Plugin")
3891 (description "Modello Java Plugin generates Java objects for the model.")))
3893 (define-public java-modello-plugins-xml
3895 (inherit java-modello-core)
3896 (name "java-modello-plugins-xml")
3898 `(#:jar-name "modello-plugins-xml.jar"
3899 #:source-dir "modello-plugins/modello-plugin-xml/src/main/java"
3900 #:test-dir "modello-plugins/modello-plugin-xml/src/test"
3903 (modify-phases %standard-phases
3904 (add-before 'build 'copy-resources
3906 (mkdir-p "build/classes")
3908 "modello-plugins/modello-plugin-xml/src/main/resources"
3911 (add-before 'check 'fix-paths
3913 (with-directory-excursion "modello-plugins/modello-plugin-xml/src/test"
3915 "java/org/codehaus/modello/plugins/xml/XmlModelloPluginTest.java"
3916 (("src/test") "modello-plugins/modello-plugin-xml/src/test")))
3919 `(("java-modello-core" ,java-modello-core)
3920 ("java-modello-plugins-java" ,java-modello-plugins-java)
3921 ,@(package-inputs java-modello-core)))
3922 (synopsis "Modello XML Plugin")
3923 (description "Modello XML Plugin contains shared code for every plugins
3924 working on XML representation of the model.")))
3926 (define-public java-modello-test
3928 (inherit java-modello-core)
3929 (name "java-modello-test")
3931 `(#:jar-name "modello-test.jar"
3932 #:source-dir "modello-test/src/main/java"
3933 #:tests? #f; no tests
3936 `(("java-plexus-utils" ,java-plexus-utils)
3937 ("java-plexus-compiler-api" ,java-plexus-compiler-api)
3938 ("java-plexus-compiler-javac" ,java-plexus-compiler-javac)
3939 ("java-plexus-container-default" ,java-plexus-container-default)))
3940 (synopsis "Modello test package")
3941 (description "The modello test package contains the basis to create
3942 Modello generator unit-tests, including sample models and xml files to test
3943 every feature for every plugin.")))
3945 (define-public java-modello-plugins-xpp3
3947 (inherit java-modello-core)
3948 (name "java-modello-plugins-xpp3")
3950 `(#:jar-name "modello-plugins-xpp3.jar"
3951 #:source-dir "modello-plugins/modello-plugin-xpp3/src/main/java"
3952 #:test-dir "modello-plugins/modello-plugin-xpp3/src/test"
3953 ;; One of the test dependencies is maven-model which depends on this package.
3957 (modify-phases %standard-phases
3958 (add-before 'build 'copy-resources
3960 (mkdir-p "build/classes")
3961 (copy-recursively "modello-plugins/modello-plugin-xpp3/src/main/resources"
3965 `(("java-modello-core" ,java-modello-core)
3966 ("java-modello-plugins-java" ,java-modello-plugins-java)
3967 ("java-modello-plugins-xml" ,java-modello-plugins-xml)
3968 ,@(package-inputs java-modello-core)))
3970 `(("java-xmlunit" ,java-xmlunit)
3971 ("java-modello-test" ,java-modello-test)
3972 ,@(package-native-inputs java-modello-core)))
3973 (synopsis "Modello XPP3 Plugin")
3974 (description "The modello XPP3 plugin generates XML readers and writers based
3975 on the XPP3 API (XML Pull Parser).")))
3977 (define-public java-asm
3983 (uri (string-append "http://download.forge.ow2.org/asm/"
3984 "asm-" version ".tar.gz"))
3987 "115l5pqblirdkmzi32dxx7gbcm4jy0s14y5wircr6h8jdr9aix00"))))
3988 (build-system ant-build-system)
3990 `(("java-aqute-bndlib" ,java-aqute-bndlib)
3991 ("java-aqute-libg" ,java-aqute-libg)))
3993 `(#:build-target "compile"
3994 ;; The tests require an old version of Janino, which no longer compiles
3999 ;; We don't need these extra ant tasks, but the build system asks us to
4000 ;; provide a path anyway.
4001 "-Dobjectweb.ant.tasks.path=dummy-path"
4002 ;; The java-aqute.bndlib JAR file will be put onto the classpath and
4003 ;; used during the build automatically by ant-build-system, but
4004 ;; java-asm's build.xml fails unless we provide something here.
4005 "-Dbiz.aQute.bnd.path=dummy-path")
4007 (modify-phases %standard-phases
4008 (add-before 'install 'build-jars
4009 (lambda* (#:key make-flags #:allow-other-keys)
4010 ;; We cannot use the "jar" target because it depends on a couple
4011 ;; of unpackaged, complicated tools.
4014 "-cf" (string-append "dist/asm-" ,version ".jar")
4015 "-C" "output/build/tmp" ".")))
4017 (install-jars "dist")))))
4019 `(("java-junit" ,java-junit)))
4020 (home-page "http://asm.ow2.org/")
4021 (synopsis "Very small and fast Java bytecode manipulation framework")
4022 (description "ASM is an all purpose Java bytecode manipulation and
4023 analysis framework. It can be used to modify existing classes or dynamically
4024 generate classes, directly in binary form. The provided common
4025 transformations and analysis algorithms allow to easily assemble custom
4026 complex transformations and code analysis tools.")
4027 (license license:bsd-3)))
4029 (define java-asm-bootstrap
4032 (name "java-asm-bootstrap")
4034 (substitute-keyword-arguments (package-arguments java-asm)
4038 `(("java-aqute-bndlib" ,java-aqute-bndlib-bootstrap)
4039 ("java-aqute-libg" ,java-aqute-libg-bootstrap)
4040 ,@(delete `("java-aqute-bndlib" ,java-aqute-bndlib)
4041 (delete `("java-aqute-libg" ,java-aqute-libg)
4042 (package-inputs java-asm)))))))
4044 (define-public java-cglib
4052 (url "https://github.com/cglib/cglib.git")
4053 (commit (string-append
4055 (string-map (lambda (c) (if (char=? c #\.) #\_ c))
4057 (file-name (git-file-name name version))
4059 (base32 "186451jms2zfp47yd8kxd77az2cqal1my2br7klgyp8fpl4qfg8v"))))
4060 (build-system ant-build-system)
4062 `(;; FIXME: tests fail because junit runs
4063 ;; "net.sf.cglib.transform.AbstractTransformTest", which does not seem
4064 ;; to describe a test at all.
4066 #:jar-name "cglib.jar"
4068 (modify-phases %standard-phases
4069 (add-after 'unpack 'chdir
4070 (lambda _ (chdir "cglib") #t)))))
4072 `(("java-asm" ,java-asm)
4073 ("java-junit" ,java-junit)))
4074 (home-page "https://github.com/cglib/cglib/")
4075 (synopsis "Java byte code generation library")
4076 (description "The byte code generation library CGLIB is a high level API
4077 to generate and transform Java byte code.")
4078 (license license:asl2.0)))
4080 (define-public java-objenesis
4082 (name "java-objenesis")
4086 (uri (string-append "https://github.com/easymock/objenesis/"
4087 "archive/" version ".tar.gz"))
4088 (file-name (string-append "objenesis-" version ".tar.gz"))
4091 "1va5qz1i2wawwavhnxfzxnfgrcaflz9p1pg03irrjh4nd3rz8wh6"))))
4092 (build-system ant-build-system)
4094 `(#:jar-name "objenesis.jar"
4095 #:source-dir "main/src/"
4096 #:test-dir "main/src/test/"))
4098 `(("java-junit" ,java-junit)
4099 ("java-hamcrest-core" ,java-hamcrest-core)))
4100 (home-page "http://objenesis.org/")
4101 (synopsis "Bypass the constructor when creating an object")
4102 (description "Objenesis is a small Java library that serves one purpose:
4103 to instantiate a new object of a particular class. It is common to see
4104 restrictions in libraries stating that classes must require a default
4105 constructor. Objenesis aims to overcome these restrictions by bypassing the
4106 constructor on object instantiation.")
4107 (license license:asl2.0)))
4109 (define-public java-easymock
4111 (name "java-easymock")
4115 (uri (string-append "https://github.com/easymock/easymock/"
4116 "archive/easymock-" version ".tar.gz"))
4119 "1yzg0kv256ndr57gpav46cyv4a1ns5sj722l50zpxk3j6sk9hnmi"))))
4120 (build-system ant-build-system)
4122 `(#:jar-name "easymock.jar"
4123 #:source-dir "core/src/main"
4124 #:test-dir "core/src/test"
4126 (modify-phases %standard-phases
4127 ;; FIXME: Android support requires the following packages to be
4128 ;; available: com.google.dexmaker.stock.ProxyBuilder
4129 (add-after 'unpack 'delete-android-support
4131 (with-directory-excursion "core/src/main/java/org/easymock/internal"
4132 (substitute* "MocksControl.java"
4133 (("AndroidSupport.isAndroid\\(\\)") "false")
4134 (("return classProxyFactory = new AndroidClassProxyFactory\\(\\);") ""))
4135 (delete-file "AndroidClassProxyFactory.java"))
4137 (add-after 'unpack 'delete-broken-tests
4139 (with-directory-excursion "core/src/test/java/org/easymock"
4140 ;; This test depends on dexmaker.
4141 (delete-file "tests2/ClassExtensionHelperTest.java")
4143 ;; This is not a test.
4144 (delete-file "tests/BaseEasyMockRunnerTest.java")
4146 ;; This test should be executed with a different runner...
4147 (delete-file "tests2/EasyMockAnnotationsTest.java")
4148 ;; ...but deleting it means that we also have to delete these
4150 (delete-file "tests2/EasyMockRunnerTest.java")
4151 (delete-file "tests2/EasyMockRuleTest.java")
4153 ;; This test fails because the file "easymock.properties" does
4155 (delete-file "tests2/EasyMockPropertiesTest.java"))
4158 `(("java-asm" ,java-asm)
4159 ("java-cglib" ,java-cglib)
4160 ("java-objenesis" ,java-objenesis)))
4162 `(("java-junit" ,java-junit)
4163 ("java-hamcrest-core" ,java-hamcrest-core)))
4164 (home-page "http://easymock.org")
4165 (synopsis "Java library providing mock objects for unit tests")
4166 (description "EasyMock is a Java library that provides an easy way to use
4167 mock objects in unit testing.")
4168 (license license:asl2.0)))
4170 (define-public java-jmock-1
4176 (uri (string-append "https://github.com/jmock-developers/"
4177 "jmock-library/archive/" version ".tar.gz"))
4178 (file-name (string-append "jmock-" version ".tar.gz"))
4181 "0xmrlhq0fszldkbv281k9463mv496143vvmqwpxp62yzjvdkx9w0"))))
4182 (build-system ant-build-system)
4184 `(#:build-target "jars"
4185 #:test-target "run.tests"
4187 (modify-phases %standard-phases
4188 (replace 'install (install-jars "build")))))
4189 (home-page "http://www.jmock.org")
4190 (synopsis "Mock object library for test-driven development")
4191 (description "JMock is a library that supports test-driven development of
4192 Java code with mock objects. Mock objects help you design and test the
4193 interactions between the objects in your programs.
4198 @item makes it quick and easy to define mock objects
4199 @item lets you precisely specify the interactions between
4200 your objects, reducing the brittleness of your tests
4201 @item plugs into your favourite test framework
4202 @item is easy to extend.
4204 (license license:bsd-3)))
4206 (define-public java-jmock
4208 (inherit java-jmock-1)
4213 (uri (string-append "https://github.com/jmock-developers/"
4214 "jmock-library/archive/" version ".tar.gz"))
4215 (file-name (string-append name "-" version ".tar.gz"))
4218 "18650a9g8xffcsdb6w91pbswa7f40fp2sh6s3nclkclz5dbzq8f0"))))
4220 `(("java-hamcrest-all" ,java-hamcrest-all)
4221 ("java-asm" ,java-asm)
4222 ("java-bsh" ,java-bsh)
4223 ("java-junit" ,java-junit)))
4225 `(("cglib" ,java-cglib)))
4227 `(#:jar-name "java-jmock.jar"
4228 #:source-dir "jmock/src/main/java"
4229 #:test-dir "jmock/src/test"))))
4231 (define-public java-jmock-junit4
4233 (inherit java-jmock)
4234 (name "java-jmock-junit4")
4236 `(#:jar-name "java-jmock-junit4.jar"
4237 #:source-dir "jmock-junit4/src/main/java"
4238 #:test-dir "jmock-junit4/src/test"))
4240 `(("java-hamcrest-all" ,java-hamcrest-all)
4241 ("java-asm" ,java-asm)
4242 ("java-bsh" ,java-bsh)
4243 ("java-jmock" ,java-jmock)
4244 ("java-jumit" ,java-junit)))))
4246 (define-public java-jmock-legacy
4248 (inherit java-jmock)
4249 (name "java-jmock-legacy")
4251 `(#:jar-name "java-jmock-legacy.jar"
4252 #:source-dir "jmock-legacy/src/main/java"
4253 #:test-dir "jmock-legacy/src/test"
4255 (modify-phases %standard-phases
4256 (add-before 'check 'copy-tests
4258 ;; This file is a dependancy of some tests
4259 (let ((file "org/jmock/test/acceptance/PackageProtectedType.java"))
4260 (copy-file (string-append "jmock/src/test/java/" file)
4261 (string-append "jmock-legacy/src/test/java/" file))
4264 `(("java-hamcrest-all" ,java-hamcrest-all)
4265 ("java-objenesis" ,java-objenesis)
4266 ("java-cglib" ,java-cglib)
4267 ("java-jmock" ,java-jmock)
4268 ("java-asm" ,java-asm)
4269 ("java-bsh" ,java-bsh)
4270 ("java-junit" ,java-junit)))
4272 `(("java-jmock-junit4" ,java-jmock-junit4)))))
4274 (define-public java-hamcrest-all
4275 (package (inherit java-hamcrest-core)
4276 (name "java-hamcrest-all")
4279 ,@(substitute-keyword-arguments (package-arguments java-hamcrest-core)
4280 ((#:build-target _) "bigjar")
4282 `(modify-phases ,phases
4283 ;; Some build targets override the classpath, so we need to patch
4284 ;; the build.xml to ensure that required dependencies are on the
4286 (add-after 'unpack 'patch-classpath-for-integration
4287 (lambda* (#:key inputs #:allow-other-keys)
4288 (substitute* "build.xml"
4289 ((" build/hamcrest-library-\\$\\{version\\}.jar" line)
4293 (find-files (assoc-ref inputs "java-junit") "\\.jar$")
4294 (find-files (assoc-ref inputs "java-jmock") "\\.jar$")
4295 (find-files (assoc-ref inputs "java-easymock") "\\.jar$")))
4297 (("build/hamcrest-core-\\$\\{version\\}\\.jar")
4298 (string-append (assoc-ref inputs "java-hamcrest-core")
4299 "/share/java/hamcrest-core.jar")))
4302 `(("java-junit" ,java-junit)
4303 ("java-jmock" ,java-jmock-1)
4304 ;; This is necessary because of what seems to be a race condition.
4305 ;; This package would sometimes fail to build because hamcrest-core.jar
4306 ;; could not be found, even though it is built as part of this package.
4307 ;; Adding java-hamcrest-core appears to fix this problem. See
4308 ;; https://debbugs.gnu.org/31390 for more information.
4309 ("java-hamcrest-core" ,java-hamcrest-core)
4310 ("java-easymock" ,java-easymock)
4311 ,@(package-inputs java-hamcrest-core)))))
4313 (define-public java-jopt-simple
4315 (name "java-jopt-simple")
4319 (uri (string-append "http://repo1.maven.org/maven2/"
4320 "net/sf/jopt-simple/jopt-simple/"
4321 version "/jopt-simple-"
4322 version "-sources.jar"))
4325 "1v8bzmwmw6qq20gm42xyay6vrd567dra4vqwhgjnqqjz1gs9f8qa"))))
4326 (build-system ant-build-system)
4328 `(#:tests? #f ; there are no tests
4329 #:jar-name "jopt-simple.jar"))
4330 (home-page "https://pholser.github.io/jopt-simple/")
4331 (synopsis "Java library for parsing command line options")
4332 (description "JOpt Simple is a Java library for parsing command line
4333 options, such as those you might pass to an invocation of @code{javac}. In
4334 the interest of striving for simplicity, as closely as possible JOpt Simple
4335 attempts to honor the command line option syntaxes of POSIX @code{getopt} and
4336 GNU @code{getopt_long}. It also aims to make option parser configuration and
4337 retrieval of options and their arguments simple and expressive, without being
4339 (license license:expat)))
4341 (define-public java-commons-math3
4343 (name "java-commons-math3")
4347 (uri (string-append "mirror://apache/commons/math/source/"
4348 "commons-math3-" version "-src.tar.gz"))
4351 "19l6yp44qc5g7wg816nbn5z3zq3xxzwimvbm4a8pczgvpi4i85s6"))))
4352 (build-system ant-build-system)
4354 `(#:build-target "jar"
4355 #:test-target "test"
4357 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
4358 (junit (assoc-ref %build-inputs "java-junit")))
4359 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
4360 (string-append "-Dhamcrest.jar=" hamcrest
4361 "/share/java/hamcrest-core.jar")))
4363 (modify-phases %standard-phases
4364 ;; We want to build the jar in the build phase and run the tests
4365 ;; later in a separate phase.
4366 (add-after 'unpack 'untangle-targets
4368 (substitute* "build.xml"
4369 (("name=\"jar\" depends=\"test\"")
4370 "name=\"jar\" depends=\"compile\""))
4372 ;; There is no install target.
4374 (install-jars "target")))))
4376 `(("java-junit" ,java-junit)
4377 ("java-hamcrest-core" ,java-hamcrest-core)))
4378 (home-page "http://commons.apache.org/math/")
4379 (synopsis "Apache Commons mathematics library")
4380 (description "Commons Math is a library of lightweight, self-contained
4381 mathematics and statistics components addressing the most common problems not
4382 available in the Java programming language or Commons Lang.")
4383 (license license:asl2.0)))
4385 (define-public java-jmh
4392 (url "http://hg.openjdk.java.net/code-tools/jmh/")
4393 (changeset version)))
4394 (file-name (string-append name "-" version "-checkout"))
4397 "1fxyxhg9famwcg1prc4cgwb5wzyxqavn3cjm5vz8605xz7x5k084"))))
4398 (build-system ant-build-system)
4400 `(#:jar-name "jmh-core.jar"
4401 #:source-dir "jmh-core/src/main"
4402 #:test-dir "jmh-core/src/test"
4404 (modify-phases %standard-phases
4405 ;; This seems to be a bug in the JDK. It may not be necessary in
4406 ;; future versions of the JDK.
4407 (add-after 'unpack 'fix-bug
4409 (with-directory-excursion
4410 "jmh-core/src/main/java/org/openjdk/jmh/runner/options"
4411 (substitute* '("IntegerValueConverter.java"
4412 "ThreadsValueConverter.java")
4413 (("public Class<Integer> valueType")
4414 "public Class<? extends Integer> valueType")))
4417 `(("java-jopt-simple" ,java-jopt-simple)
4418 ("java-commons-math3" ,java-commons-math3)))
4420 `(("java-junit" ,java-junit)
4421 ("java-hamcrest-core" ,java-hamcrest-core)))
4422 (home-page "http://openjdk.java.net/projects/code-tools/jmh/")
4423 (synopsis "Benchmark harness for the JVM")
4424 (description "JMH is a Java harness for building, running, and analysing
4425 nano/micro/milli/macro benchmarks written in Java and other languages
4426 targeting the JVM.")
4428 (license license:gpl2)))
4430 (define-public java-commons-collections4
4432 (name "java-commons-collections4")
4436 (uri (string-append "mirror://apache/commons/collections/source/"
4437 "commons-collections4-" version "-src.tar.gz"))
4440 "1krfhvggympq4avk7gh6qafzf6b9ip6r1m4lmacikyx04039m0wl"))))
4441 (build-system ant-build-system)
4443 `(#:test-target "test"
4445 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
4446 (junit (assoc-ref %build-inputs "java-junit"))
4447 (easymock (assoc-ref %build-inputs "java-easymock")))
4448 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
4449 (string-append "-Dhamcrest.jar=" hamcrest
4450 "/share/java/hamcrest-core.jar")
4451 (string-append "-Deasymock.jar=" easymock
4452 "/share/java/easymock.jar")))
4454 (modify-phases %standard-phases
4456 (install-jars "target")))))
4458 `(("java-junit" ,java-junit)
4459 ("java-hamcrest-core" ,java-hamcrest-core)
4460 ("java-easymock" ,java-easymock)))
4461 (home-page "http://commons.apache.org/collections/")
4462 (synopsis "Collections framework")
4463 (description "The Java Collections Framework is the recognised standard
4464 for collection handling in Java. Commons-Collections seek to build upon the
4465 JDK classes by providing new interfaces, implementations and utilities. There
4466 are many features, including:
4469 @item @code{Bag} interface for collections that have a number of copies of
4471 @item @code{BidiMap} interface for maps that can be looked up from value to
4472 key as well and key to value
4473 @item @code{MapIterator} interface to provide simple and quick iteration over
4475 @item Transforming decorators that alter each object as it is added to the
4477 @item Composite collections that make multiple collections look like one
4478 @item Ordered maps and sets that retain the order elements are added in,
4479 including an LRU based map
4480 @item Reference map that allows keys and/or values to be garbage collected
4482 @item Many comparator implementations
4483 @item Many iterator implementations
4484 @item Adapter classes from array and enumerations to collections
4485 @item Utilities to test or create typical set-theory properties of collections
4486 such as union, intersection, and closure.
4488 (license license:asl2.0)))
4490 (define-public java-commons-collections
4492 (inherit java-commons-collections4)
4493 (name "java-commons-collections")
4497 (uri (string-append "mirror://apache/commons/collections/source/"
4498 "commons-collections-" version "-src.tar.gz"))
4501 "055r51a5lfc3z7rkxnxmnn1npvkvda7636hjpm4qk7cnfzz98387"))
4503 (search-patches "java-commons-collections-fix-java8.patch"))))
4505 (substitute-keyword-arguments (package-arguments java-commons-collections4)
4507 `(modify-phases ,phases
4508 ;; The manifest is required by the build procedure
4509 (add-before 'build 'add-manifest
4511 (mkdir-p "build/conf")
4512 (call-with-output-file "build/conf/MANIFEST.MF"
4514 (format file "Manifest-Version: 1.0\n")))
4517 (install-jars "build"))))))))
4519 (define java-commons-collections-test-classes
4521 (inherit java-commons-collections)
4523 `(#:jar-name "commons-collections-test-classes.jar"
4524 #:source-dir "src/test"
4527 `(("collection" ,java-commons-collections)))))
4529 (define-public java-commons-beanutils
4531 (name "java-commons-beanutils")
4535 (uri (string-append "mirror://apache/commons/beanutils/source/"
4536 "commons-beanutils-" version "-src.tar.gz"))
4539 "03cs0bq3sl1sdc7py9g3qnf8n9h473nrkvd3d251kaqv6a2ab7qk"))))
4540 (build-system ant-build-system)
4542 `(#:test-target "test"
4545 (modify-phases %standard-phases
4547 (lambda* (#:key outputs #:allow-other-keys)
4548 (rename-file (string-append "dist/commons-beanutils-" ,version
4550 "commons-beanutils.jar")
4551 (install-file "commons-beanutils.jar"
4552 (string-append (assoc-ref outputs "out") "/share/java/"))
4555 `(("logging" ,java-commons-logging-minimal)
4556 ("collections" ,java-commons-collections)))
4558 `(("junit" ,java-junit)
4559 ("collections-test" ,java-commons-collections-test-classes)))
4560 (home-page "http://commons.apache.org/beanutils/")
4561 (synopsis "Dynamically set or get properties in Java")
4562 (description "BeanUtils provides a simplified interface to reflection and
4563 introspection to set or get dynamically determined properties through their
4564 setter and getter method.")
4565 (license license:asl2.0)))
4567 (define-public java-commons-io
4569 (name "java-commons-io")
4574 (uri (string-append "mirror://apache/commons/io/source/"
4575 "commons-io-" version "-src.tar.gz"))
4578 "0q5y41jrcjvx9hzs47x5kdhnasdy6rm4bzqd2jxl02w717m7a7v3"))))
4579 (build-system ant-build-system)
4580 (outputs '("out" "doc"))
4582 `(#:test-target "test"
4584 (list (string-append "-Djunit.jar="
4585 (assoc-ref %build-inputs "java-junit")
4586 "/share/java/junit.jar"))
4588 (modify-phases %standard-phases
4589 (add-after 'build 'build-javadoc ant-build-javadoc)
4590 (replace 'install (install-jars "target"))
4591 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
4593 `(("java-junit" ,java-junit)
4594 ("java-hamcrest-core" ,java-hamcrest-core)))
4595 (home-page "http://commons.apache.org/io/")
4596 (synopsis "Common useful IO related classes")
4597 (description "Commons-IO contains utility classes, stream implementations,
4598 file filters and endian classes.")
4599 (license license:asl2.0)))
4601 (define-public java-commons-exec-1.1
4603 (name "java-commons-exec")
4608 (uri (string-append "mirror://apache/commons/exec/source/"
4609 "commons-exec-" version "-src.tar.gz"))
4612 "025dk8xgj10lxwwwqp0hng2rn7fr4vcirxzydqzx9k4dim667alk"))))
4613 (build-system ant-build-system)
4615 `(#:test-target "test"
4617 (list (string-append "-Dmaven.junit.jar="
4618 (assoc-ref %build-inputs "java-junit")
4619 "/share/java/junit.jar"))
4621 (modify-phases %standard-phases
4622 (add-before 'build 'delete-network-tests
4624 (delete-file "src/test/java/org/apache/commons/exec/DefaultExecutorTest.java")
4625 (substitute* "src/test/java/org/apache/commons/exec/TestRunner.java"
4626 (("suite\\.addTestSuite\\(DefaultExecutorTest\\.class\\);") ""))
4628 ;; The "build" phase automatically tests.
4630 (replace 'install (install-jars "target")))))
4632 `(("java-junit" ,java-junit)))
4633 (home-page "http://commons.apache.org/proper/commons-exec/")
4634 (synopsis "Common program execution related classes")
4635 (description "Commons-Exec simplifies executing external processes.")
4636 (license license:asl2.0)))
4638 (define-public java-commons-exec
4640 (inherit java-commons-exec-1.1)
4645 (uri (string-append "mirror://apache/commons/exec/source/"
4646 "commons-exec-" version "-src.tar.gz"))
4649 "17yb4h6f8l49c5iyyvda4z2nmw0bxrx857nrwmsr7mmpb7x441yv"))))
4651 `(#:test-target "test"
4653 (list (string-append "-Dmaven.junit.jar="
4654 (assoc-ref %build-inputs "java-junit")
4655 "/share/java/junit.jar")
4656 "-Dmaven.compiler.source=1.7"
4657 "-Dmaven.compiler.target=1.7")
4659 (modify-phases %standard-phases
4660 (add-before 'build 'delete-network-tests
4661 (lambda* (#:key inputs #:allow-other-keys)
4662 ;; This test hangs indefinitely.
4663 (delete-file "src/test/java/org/apache/commons/exec/issues/Exec60Test.java")
4664 (substitute* "src/test/java/org/apache/commons/exec/issues/Exec41Test.java"
4665 (("ping -c 10 127.0.0.1") "sleep 10"))
4666 (substitute* "src/test/java/org/apache/commons/exec/issues/Exec49Test.java"
4668 (call-with-output-file "src/test/scripts/ping.sh"
4670 (format port "#!~a/bin/sh\nsleep $1\n"
4671 (assoc-ref inputs "bash"))))
4673 ;; The "build" phase automatically tests.
4675 (replace 'install (install-jars "target")))))
4677 `(("java-junit" ,java-junit)
4678 ("java-hamcrest-core" ,java-hamcrest-core)))))
4680 (define-public java-commons-lang
4682 (name "java-commons-lang")
4687 (uri (string-append "mirror://apache/commons/lang/source/"
4688 "commons-lang-" version "-src.tar.gz"))
4690 (base32 "1mxwagqadzx1b2al7i0z1v0r235aj2njdyijf02szq0vhmqrfiq5"))))
4691 (build-system ant-build-system)
4692 (outputs '("out" "doc"))
4694 `(#:test-target "test"
4695 #:test-exclude (list "**/Abstract*.java" "**/Random*.java")
4697 (modify-phases %standard-phases
4698 (add-after 'build 'build-javadoc ant-build-javadoc)
4699 (add-before 'check 'disable-failing-test
4701 ;; Disable a failing test
4702 (substitute* "src/test/java/org/apache/commons/lang/\
4703 time/FastDateFormatTest.java"
4704 (("public void testFormat\\(\\)")
4705 "public void disabled_testFormat()"))
4707 (replace 'install (install-jars "target"))
4708 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
4710 `(("java-junit" ,java-junit)))
4711 (home-page "http://commons.apache.org/lang/")
4712 (synopsis "Extension of the java.lang package")
4713 (description "The Commons Lang components contains a set of Java classes
4714 that provide helper methods for standard Java classes, especially those found
4715 in the @code{java.lang} package in the Sun JDK. The following classes are
4719 @item StringUtils - Helper for @code{java.lang.String}.
4720 @item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets
4721 of characters such as @code{[a-z]} and @code{[abcdez]}.
4722 @item RandomStringUtils - Helper for creating randomised strings.
4723 @item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
4724 @item NumberRange - A range of numbers with an upper and lower bound.
4725 @item ObjectUtils - Helper for @code{java.lang.Object}.
4726 @item SerializationUtils - Helper for serializing objects.
4727 @item SystemUtils - Utility class defining the Java system properties.
4728 @item NestedException package - A sub-package for the creation of nested
4730 @item Enum package - A sub-package for the creation of enumerated types.
4731 @item Builder package - A sub-package for the creation of @code{equals},
4732 @code{hashCode}, @code{compareTo} and @code{toString} methods.
4734 (license license:asl2.0)))
4736 (define-public java-commons-lang3
4738 (name "java-commons-lang3")
4743 (uri (string-append "mirror://apache/commons/lang/source/"
4744 "commons-lang3-" version "-src.tar.gz"))
4746 (base32 "0xpshb9spjhplq5a7mr0y1bgfw8190ik4xj8f569xidfcki1d6kg"))))
4747 (build-system ant-build-system)
4748 (outputs '("out" "doc"))
4750 `(#:test-target "test"
4752 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-all"))
4753 (junit (assoc-ref %build-inputs "java-junit"))
4754 (easymock (assoc-ref %build-inputs "java-easymock"))
4755 (io (assoc-ref %build-inputs "java-commons-io")))
4756 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
4757 (string-append "-Dhamcrest.jar=" hamcrest
4758 "/share/java/hamcrest-all.jar")
4759 (string-append "-Dcommons-io.jar=" io
4760 "/share/java/commons-io-"
4761 ,(package-version java-commons-io)
4763 (string-append "-Deasymock.jar=" easymock
4764 "/share/java/easymock.jar")))
4766 (modify-phases %standard-phases
4767 (add-after 'build 'build-javadoc ant-build-javadoc)
4768 (replace 'install (install-jars "target"))
4769 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
4771 `(("java-junit" ,java-junit)
4772 ("java-commons-io" ,java-commons-io)
4773 ("java-hamcrest-all" ,java-hamcrest-all)
4774 ("java-easymock" ,java-easymock)))
4775 (home-page "http://commons.apache.org/lang/")
4776 (synopsis "Extension of the java.lang package")
4777 (description "The Commons Lang components contains a set of Java classes
4778 that provide helper methods for standard Java classes, especially those found
4779 in the @code{java.lang} package. The following classes are included:
4782 @item StringUtils - Helper for @code{java.lang.String}.
4783 @item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets of
4784 characters such as @code{[a-z]} and @code{[abcdez]}.
4785 @item RandomStringUtils - Helper for creating randomised strings.
4786 @item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
4787 @item NumberRange - A range of numbers with an upper and lower bound.
4788 @item ObjectUtils - Helper for @code{java.lang.Object}.
4789 @item SerializationUtils - Helper for serializing objects.
4790 @item SystemUtils - Utility class defining the Java system properties.
4791 @item NestedException package - A sub-package for the creation of nested
4793 @item Enum package - A sub-package for the creation of enumerated types.
4794 @item Builder package - A sub-package for the creation of @code{equals},
4795 @code{hashCode}, @code{compareTo} and @code{toString} methods.
4797 (license license:asl2.0)))
4799 (define-public java-commons-bsf
4801 (name "java-commons-bsf")
4805 (uri (string-append "mirror://apache/commons/bsf/source/bsf-src-"
4809 "1sbamr8jl32p1jgf59nw0b2w9qivyg145954hm6ly54cfgsqrdas"))
4810 (modules '((guix build utils)))
4813 (for-each delete-file
4814 (find-files "." "\\.jar$"))
4816 (build-system ant-build-system)
4818 `(#:build-target "jar"
4819 #:tests? #f; No test file
4820 #:modules ((guix build ant-build-system)
4822 (guix build java-utils)
4825 (modify-phases %standard-phases
4826 (add-before 'build 'create-properties
4828 ;; This file is missing from the distribution
4829 (call-with-output-file "build-properties.xml"
4832 `(project (@ (basedir ".") (name "build-properties") (default ""))
4833 (property (@ (name "project.name") (value "bsf")))
4834 (property (@ (name "source.level") (value "1.5")))
4835 (property (@ (name "build.lib") (value "build/jar")))
4836 (property (@ (name "src.dir") (value "src")))
4837 (property (@ (name "tests.dir") (value "src/org/apache/bsf/test")))
4838 (property (@ (name "build.tests") (value "build/test-classes")))
4839 (property (@ (name "build.dest") (value "build/classes"))))
4842 (replace 'install (install-jars "build")))))
4844 `(("java-junit" ,java-junit)))
4846 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)))
4847 (home-page "https://commons.apache.org/proper/commons-bsf")
4848 (synopsis "Bean Scripting Framework")
4849 (description "The Bean Scripting Framework (BSF) is a set of Java classes
4850 which provides scripting language support within Java applications, and access
4851 to Java objects and methods from scripting languages. BSF allows one to write
4852 JSPs in languages other than Java while providing access to the Java class
4853 library. In addition, BSF permits any Java application to be implemented in
4854 part (or dynamically extended) by a language that is embedded within it. This
4855 is achieved by providing an API that permits calling scripting language engines
4856 from within Java, as well as an object registry that exposes Java objects to
4857 these scripting language engines.")
4858 (license license:asl2.0)))
4860 (define-public java-commons-jxpath
4862 (name "java-commons-jxpath")
4866 (uri (string-append "mirror://apache/commons/jxpath/source/"
4867 "commons-jxpath-" version "-src.tar.gz"))
4870 "1rpgg31ayn9fwr4bfi2i1ij0npcg79ad2fv0w9hacvawsyc42cfs"))))
4871 (build-system ant-build-system)
4873 `(#:jar-name "commons-jxpath.jar"
4874 ;; tests require more dependencies, including mockrunner which depends on old software
4876 #:source-dir "src/java"))
4878 `(("servlet" ,java-classpathx-servletapi)
4879 ("java-jdom" ,java-jdom)
4880 ("java-commons-beanutils" ,java-commons-beanutils)))
4882 `(("java-junit" ,java-junit)))
4883 (home-page "http://commons.apache.org/jxpath/")
4884 (synopsis "Simple interpreter of an expression language called XPath.")
4885 (description "The org.apache.commons.jxpath package defines a simple
4886 interpreter of an expression language called XPath. JXPath applies XPath
4887 expressions to graphs of objects of all kinds: JavaBeans, Maps, Servlet
4888 contexts, DOM etc, including mixtures thereof.")
4889 (license license:asl2.0)))
4891 (define-public java-jsr250
4893 (name "java-jsr250")
4897 (uri (string-append "https://repo1.maven.org/maven2/"
4898 "javax/annotation/javax.annotation-api/"
4899 version "/javax.annotation-api-"
4900 version "-sources.jar"))
4903 "08clh8n4n9wfglf75qsqfjs6yf79f7x6hqx38cn856pksszv50kz"))))
4904 (build-system ant-build-system)
4906 `(#:tests? #f ; no tests included
4908 #:jar-name "jsr250.jar"))
4909 (home-page "https://jcp.org/en/jsr/detail?id=250")
4910 (synopsis "Security-related annotations")
4911 (description "This package provides annotations for security. It provides
4912 packages in the @code{javax.annotation} and @code{javax.annotation.security}
4914 ;; either cddl or gpl2 only, with classpath exception
4915 (license (list license:cddl1.0
4918 (define-public java-jsr305
4920 (name "java-jsr305")
4924 (uri (string-append "https://repo1.maven.org/maven2/"
4925 "com/google/code/findbugs/"
4926 "jsr305/" version "/jsr305-"
4927 version "-sources.jar"))
4930 "1rh6jin9v7jqpq3kf1swl868l8i94r636n03pzpsmgr8v0lh9j2n"))))
4931 (build-system ant-build-system)
4933 `(#:tests? #f ; no tests included
4934 #:jar-name "jsr305.jar"))
4935 (home-page "http://findbugs.sourceforge.net/")
4936 (synopsis "Annotations for the static analyzer called findbugs")
4937 (description "This package provides annotations for the findbugs package.
4938 It provides packages in the @code{javax.annotations} namespace.")
4939 (license license:asl2.0)))
4941 (define-public java-guava
4944 ;; This is the last release of Guava that can be built with Java 7.
4948 (uri (string-append "https://github.com/google/guava/"
4949 "releases/download/v" version
4950 "/guava-" version "-sources.jar"))
4953 "1gawrs5gi6j5hcfxdgpnfli75vb9pfi4sn09pnc8xacr669yajwr"))))
4954 (build-system ant-build-system)
4956 `(#:tests? #f ; no tests included
4957 #:jar-name "guava.jar"
4959 (modify-phases %standard-phases
4960 (add-after 'unpack 'trim-sources
4962 (with-directory-excursion "src/com/google/common"
4963 ;; Remove annotations to avoid extra dependencies:
4964 ;; * "j2objc" annotations are used when converting Java to
4966 ;; * "errorprone" annotations catch common Java mistakes at
4968 ;; * "IgnoreJRERequirement" is used for Android.
4969 (substitute* (find-files "." "\\.java$")
4970 (("import com.google.j2objc.*") "")
4971 (("import com.google.errorprone.annotation.*") "")
4972 (("import org.codehaus.mojo.animal_sniffer.*") "")
4973 (("@CanIgnoreReturnValue") "")
4976 (("@RetainedWith") "")
4978 (("@ForOverride") "")
4979 (("@J2ObjCIncompatible") "")
4980 (("@IgnoreJRERequirement") "")))
4983 `(("java-jsr305" ,java-jsr305)))
4984 (home-page "https://github.com/google/guava")
4985 (synopsis "Google core libraries for Java")
4986 (description "Guava is a set of core libraries that includes new
4987 collection types (such as multimap and multiset), immutable collections, a
4988 graph library, functional types, an in-memory cache, and APIs/utilities for
4989 concurrency, I/O, hashing, primitives, reflection, string processing, and much
4991 (license license:asl2.0)))
4993 ;; The java-commons-logging package provides adapters to many different
4994 ;; logging frameworks. To avoid an excessive dependency graph we try to build
4995 ;; it with only a minimal set of adapters.
4996 (define-public java-commons-logging-minimal
4998 (name "java-commons-logging-minimal")
5002 (uri (string-append "mirror://apache/commons/logging/source/"
5003 "commons-logging-" version "-src.tar.gz"))
5006 "10bwcy5w8d7y39n0krlwhnp8ds3kj5zhmzj0zxnkw0qdlsjmsrj9"))))
5007 (build-system ant-build-system)
5009 `(#:tests? #f ; avoid dependency on logging frameworks
5010 #:jar-name "commons-logging-minimal.jar"
5012 (modify-phases %standard-phases
5013 (add-after 'unpack 'delete-adapters-and-tests
5015 ;; Delete all adapters except for NoOpLog, SimpleLog, and
5016 ;; LogFactoryImpl. NoOpLog is required to build; LogFactoryImpl
5017 ;; is used by applications; SimpleLog is the only actually usable
5018 ;; implementation that does not depend on another logging
5022 (delete-file (string-append
5023 "src/main/java/org/apache/commons/logging/impl/" file)))
5024 (list "Jdk13LumberjackLogger.java"
5025 "WeakHashtable.java"
5027 "ServletContextCleaner.java"
5030 "LogKitLogger.java"))
5031 (delete-file-recursively "src/test")
5033 (home-page "http://commons.apache.org/logging/")
5034 (synopsis "Common API for logging implementations")
5035 (description "The Logging package is a thin bridge between different
5036 logging implementations. A library that uses the commons-logging API can be
5037 used with any logging implementation at runtime.")
5038 (license license:asl2.0)))
5040 ;; This is the last release of the 1.x series.
5041 (define-public java-mockito-1
5043 (name "java-mockito")
5047 (uri (string-append "http://repo1.maven.org/maven2/"
5048 "org/mockito/mockito-core/" version
5049 "/mockito-core-" version "-sources.jar"))
5052 "0vmiwnwpf83g2q7kj1rislmja8fpvqkixjhawh7nxnygx6pq11kc"))))
5053 (build-system ant-build-system)
5055 `(#:jar-name "mockito.jar"
5056 #:tests? #f ; no tests included
5057 ;; FIXME: patch-and-repack does not support jars, so we have to apply
5058 ;; patches in build phases.
5060 (modify-phases %standard-phases
5061 ;; Mockito was developed against a different version of hamcrest,
5062 ;; which does not require matcher implementations to provide an
5063 ;; implementation of the "describeMismatch" method. We add this
5064 ;; simple definition to pass the build with our version of hamcrest.
5065 (add-after 'unpack 'fix-hamcrest-build-error
5067 (substitute* "src/org/mockito/internal/matchers/LocalizedMatcher.java"
5068 (("public Matcher getActualMatcher\\(\\) .*" line)
5070 public void describeMismatch(Object item, Description description) {
5071 actualMatcher.describeMismatch(item, description);
5075 ;; Mockito bundles cglib. We have a cglib package, so let's use
5077 (add-after 'unpack 'use-system-libraries
5079 (with-directory-excursion "src/org/mockito/internal/creation/cglib"
5080 (substitute* '("CGLIBHacker.java"
5081 "CglibMockMaker.java"
5082 "ClassImposterizer.java"
5083 "DelegatingMockitoMethodProxy.java"
5084 "MethodInterceptorFilter.java"
5085 "MockitoNamingPolicy.java"
5086 "SerializableMockitoMethodProxy.java"
5087 "SerializableNoOp.java")
5088 (("import org.mockito.cglib") "import net.sf.cglib")))
5091 `(("java-junit" ,java-junit)
5092 ("java-objenesis" ,java-objenesis)
5093 ("java-cglib" ,java-cglib)
5094 ("java-hamcrest-core" ,java-hamcrest-core)))
5095 (home-page "http://mockito.org")
5096 (synopsis "Mockito is a mock library for Java")
5097 (description "Mockito is a mocking library for Java which lets you write
5098 tests with a clean and simple API. It generates mocks using reflection, and
5099 it records all mock invocations, including methods arguments.")
5100 (license license:asl2.0)))
5102 (define-public java-httpcomponents-httpcore
5104 (name "java-httpcomponents-httpcore")
5108 (uri (string-append "mirror://apache//httpcomponents/httpcore/"
5109 "source/httpcomponents-core-"
5110 version "-src.tar.gz"))
5113 "02bwcf38y4vgwq7kj2s6q7qrmma641r5lacivm16kgxvb2j6h1vy"))))
5114 (build-system ant-build-system)
5116 `(#:jar-name "httpcomponents-httpcore.jar"
5118 (modify-phases %standard-phases
5119 (add-after 'unpack 'chdir
5120 (lambda _ (chdir "httpcore") #t)))))
5122 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)
5123 ("java-commons-lang3" ,java-commons-lang3)))
5125 `(("java-junit" ,java-junit)
5126 ("java-mockito" ,java-mockito-1)))
5127 (home-page "https://hc.apache.org/httpcomponents-core-4.4.x/index.html")
5128 (synopsis "Low level HTTP transport components")
5129 (description "HttpCore is a set of low level HTTP transport components
5130 that can be used to build custom client and server side HTTP services with a
5131 minimal footprint. HttpCore supports two I/O models: blocking I/O model based
5132 on the classic Java I/O and non-blocking, event driven I/O model based on Java
5135 This package provides the blocking I/O model library.")
5136 (license license:asl2.0)))
5138 (define-public java-httpcomponents-httpcore-nio
5139 (package (inherit java-httpcomponents-httpcore)
5140 (name "java-httpcomponents-httpcore-nio")
5142 `(#:jar-name "httpcomponents-httpcore-nio.jar"
5144 (modify-phases %standard-phases
5145 (add-after 'unpack 'chdir
5146 (lambda _ (chdir "httpcore-nio") #t)))))
5148 `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
5149 ("java-hamcrest-core" ,java-hamcrest-core)
5150 ,@(package-inputs java-httpcomponents-httpcore)))
5151 (description "HttpCore is a set of low level HTTP transport components
5152 that can be used to build custom client and server side HTTP services with a
5153 minimal footprint. HttpCore supports two I/O models: blocking I/O model based
5154 on the classic Java I/O and non-blocking, event driven I/O model based on Java
5157 This package provides the non-blocking I/O model library based on Java
5160 (define-public java-httpcomponents-httpcore-ab
5161 (package (inherit java-httpcomponents-httpcore)
5162 (name "java-httpcomponents-httpcore-ab")
5164 `(#:jar-name "httpcomponents-httpcore-ab.jar"
5166 (modify-phases %standard-phases
5167 (add-after 'unpack 'chdir
5168 (lambda _ (chdir "httpcore-ab") #t)))))
5170 `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
5171 ("java-commons-cli" ,java-commons-cli)
5172 ("java-hamcrest-core" ,java-hamcrest-core)
5173 ,@(package-inputs java-httpcomponents-httpcore)))
5174 (synopsis "Apache HttpCore benchmarking tool")
5175 (description "This package provides the HttpCore benchmarking tool. It is
5176 an Apache AB clone based on HttpCore.")))
5178 (define-public java-httpcomponents-httpclient
5180 (name "java-httpcomponents-httpclient")
5184 (uri (string-append "mirror://apache/httpcomponents/httpclient/"
5185 "source/httpcomponents-client-"
5186 version "-src.tar.gz"))
5189 "1428399s7qy3cim5wc6f3ks4gl9nf9vkjpfmnlap3jflif7g2pj1"))))
5190 (build-system ant-build-system)
5192 `(#:jar-name "httpcomponents-httpclient.jar"
5194 (modify-phases %standard-phases
5195 (add-after 'unpack 'chdir
5196 (lambda _ (chdir "httpclient") #t)))))
5198 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)
5199 ("java-commons-codec" ,java-commons-codec)
5200 ("java-hamcrest-core" ,java-hamcrest-core)
5201 ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
5202 ("java-mockito" ,java-mockito-1)
5203 ("java-junit" ,java-junit)))
5204 (home-page "https://hc.apache.org/httpcomponents-client-ga/")
5205 (synopsis "HTTP client library for Java")
5206 (description "Although the @code{java.net} package provides basic
5207 functionality for accessing resources via HTTP, it doesn't provide the full
5208 flexibility or functionality needed by many applications. @code{HttpClient}
5209 seeks to fill this void by providing an efficient, up-to-date, and
5210 feature-rich package implementing the client side of the most recent HTTP
5211 standards and recommendations.")
5212 (license license:asl2.0)))
5214 (define-public java-httpcomponents-httpmime
5215 (package (inherit java-httpcomponents-httpclient)
5216 (name "java-httpcomponents-httpmime")
5218 `(#:jar-name "httpcomponents-httpmime.jar"
5220 (modify-phases %standard-phases
5221 (add-after 'unpack 'chdir
5222 (lambda _ (chdir "httpmime") #t)))))
5224 `(("java-httpcomponents-httpclient" ,java-httpcomponents-httpclient)
5225 ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
5226 ("java-junit" ,java-junit)
5227 ("java-hamcrest-core" ,java-hamcrest-core)))))
5229 (define-public java-commons-net
5231 (name "java-commons-net")
5235 (uri (string-append "mirror://apache/commons/net/source/"
5236 "commons-net-" version "-src.tar.gz"))
5239 "0n0cmnddk9qdqhjvka8pc6hd9mn2qi3166f1s6xk32h7rfy1adxr"))))
5240 (build-system ant-build-system)
5242 `(;; FIXME: MainTest.java tries to read "examples.properties" (which
5243 ;; should be "resources/examples/examples.properties"), but gets "null"
5246 #:jar-name "commons-net.jar"))
5248 `(("java-junit" ,java-junit)
5249 ("java-hamcrest-core" ,java-hamcrest-core)))
5250 (home-page "http://commons.apache.org/net/")
5251 (synopsis "Client library for many basic Internet protocols")
5252 (description "The Apache Commons Net library implements the client side of
5253 many basic Internet protocols. The purpose of the library is to provide
5254 fundamental protocol access, not higher-level abstractions.")
5255 (license license:asl2.0)))
5257 (define-public java-jsch
5263 (uri (string-append "mirror://sourceforge/jsch/jsch/"
5264 version "/jsch-" version ".zip"))
5267 "1lxyjwvmwa723wcf3bqn816hkvc03vz4xhbsi7bvfhrz2rpgcfq6"))))
5268 (build-system ant-build-system)
5270 `(#:build-target "dist"
5271 #:tests? #f ; no tests included
5273 (modify-phases %standard-phases
5274 (replace 'install (install-jars "dist")))))
5276 `(("unzip" ,unzip)))
5277 (home-page "http://www.jcraft.com/jsch/")
5278 (synopsis "Pure Java implementation of SSH2")
5279 (description "JSch is a pure Java implementation of SSH2. JSch allows you
5280 to connect to an SSH server and use port forwarding, X11 forwarding, file
5281 transfer, etc., and you can integrate its functionality into your own Java
5283 (license license:bsd-3)))
5285 (define-public java-commons-compress
5287 (name "java-commons-compress")
5291 (uri (string-append "mirror://apache/commons/compress/source/"
5292 "commons-compress-" version "-src.tar.gz"))
5295 "1vjqvavrn0babffn1kciz6v52ibwq2vwhzlb95hazis3lgllnxc8"))))
5296 (build-system ant-build-system)
5298 `(#:jar-name "commons-compress.jar"
5300 (modify-phases %standard-phases
5301 (add-after 'unpack 'delete-bad-tests
5303 (with-directory-excursion "src/test/java/org/apache/commons/compress/"
5304 ;; FIXME: These tests really should not fail. Maybe they are
5305 ;; indicative of problems with our Java packaging work.
5307 ;; This test fails with a null pointer exception.
5308 (delete-file "archivers/sevenz/SevenZOutputFileTest.java")
5309 ;; This test fails to open test resources.
5310 (delete-file "archivers/zip/ExplodeSupportTest.java")
5312 ;; FIXME: This test adds a dependency on powermock, which is hard to
5313 ;; package at this point.
5314 ;; https://github.com/powermock/powermock
5315 (delete-file "archivers/sevenz/SevenZNativeHeapTest.java"))
5318 `(("java-junit" ,java-junit)
5319 ("java-hamcrest-core" ,java-hamcrest-core)
5320 ("java-mockito" ,java-mockito-1)
5321 ("java-xz" ,java-xz)))
5322 (home-page "https://commons.apache.org/proper/commons-compress/")
5323 (synopsis "Java library for working with compressed files")
5324 (description "The Apache Commons Compress library defines an API for
5325 working with compressed files such as ar, cpio, Unix dump, tar, zip, gzip, XZ,
5326 Pack200, bzip2, 7z, arj, lzma, snappy, DEFLATE, lz4 and Z files.")
5327 (license license:asl2.0)))
5329 (define-public java-commons-csv
5331 (name "java-commons-csv")
5335 (uri (string-append "mirror://apache/commons/csv/source/"
5336 "commons-csv-" version "-src.tar.gz"))
5339 "1l89m0fm2s3xx3v3iynvangymfg2vlyngaj6fgsi457nmsw7m7ij"))))
5340 (build-system ant-build-system)
5342 `(#:jar-name "commons-csv.jar"
5343 #:source-dir "src/main/java"
5344 #:tests? #f)); FIXME: requires java-h2
5346 `(("java-hamcrest-core" ,java-hamcrest-core)
5347 ("java-commons-io" ,java-commons-io)
5348 ("java-commons-lang3" ,java-commons-lang3)
5349 ("junit" ,java-junit)))
5350 (home-page "https://commons.apache.org/proper/commons-csv/")
5351 (synopsis "Read and write CSV documents")
5352 (description "Commons CSV reads and writes files in variations of the Comma
5353 Separated Value (CSV) format. The most common CSV formats are predefined in the
5357 @item Microsoft Excel
5358 @item Informix UNLOAD
5359 @item Informix UNLOAD CSV
5365 Custom formats can be created using a fluent style API.")
5366 (license license:asl2.0)))
5368 (define-public java-osgi-annotation
5370 (name "java-osgi-annotation")
5374 (uri (string-append "https://repo1.maven.org/maven2/"
5375 "org/osgi/org.osgi.annotation/" version "/"
5376 "org.osgi.annotation-" version "-sources.jar"))
5379 "1q718mb7gqg726rh6pc2hcisn8v50nv35abbir0jypmffhiii85w"))))
5380 (build-system ant-build-system)
5382 `(#:tests? #f ; no tests
5383 #:jar-name "osgi-annotation.jar"))
5384 (home-page "https://www.osgi.org")
5385 (synopsis "Annotation module of OSGi framework")
5387 "OSGi, for Open Services Gateway initiative framework, is a module system
5388 and service platform for the Java programming language. This package contains
5389 the OSGi annotation module, providing additional services to help dynamic
5391 (license license:asl2.0)))
5393 (define-public java-osgi-core
5395 (name "java-osgi-core")
5399 (uri (string-append "https://repo1.maven.org/maven2/"
5400 "org/osgi/org.osgi.core/" version "/"
5401 "org.osgi.core-" version "-sources.jar"))
5404 "19bpf5jx32jq9789gyhin35q5v7flmw0p9mk7wbgqpxqfmxyiabv"))))
5405 (build-system ant-build-system)
5407 `(#:tests? #f ; no tests
5408 #:jar-name "osgi-core.jar"))
5410 `(("java-osgi-annotation" ,java-osgi-annotation)))
5411 (home-page "https://www.osgi.org")
5412 (synopsis "Core module of OSGi framework")
5414 "OSGi, for Open Services Gateway initiative framework, is a module system
5415 and service platform for the Java programming language. This package contains
5416 the OSGi Core module.")
5417 (license license:asl2.0)))
5419 (define-public java-osgi-service-event
5421 (name "java-osgi-service-event")
5425 (uri (string-append "https://repo1.maven.org/maven2/"
5426 "org/osgi/org.osgi.service.event/"
5427 version "/org.osgi.service.event-"
5428 version "-sources.jar"))
5431 "1nyhlgagwym75bycnjczwbnpymv2iw84zbhvvzk84g9q736i6qxm"))))
5432 (build-system ant-build-system)
5434 `(#:tests? #f ; no tests
5435 #:jar-name "osgi-service-event.jar"))
5437 `(("java-osgi-annotation" ,java-osgi-annotation)
5438 ("java-osgi-core" ,java-osgi-core)))
5439 (home-page "https://www.osgi.org")
5440 (synopsis "OSGi service event module")
5442 "OSGi, for Open Services Gateway initiative framework, is a module system
5443 and service platform for the Java programming language. This package contains
5444 the OSGi @code{org.osgi.service.event} module.")
5445 (license license:asl2.0)))
5447 (define-public java-eclipse-osgi
5449 (name "java-eclipse-osgi")
5453 (uri (string-append "https://repo1.maven.org/maven2/"
5454 "org/eclipse/platform/org.eclipse.osgi/"
5455 version "/org.eclipse.osgi-"
5456 version "-sources.jar"))
5459 "00cqc6lb29n0zv68b4l842vzkwawvbr7gshfdygsk8sicvcq2c7b"))))
5460 (build-system ant-build-system)
5462 `(#:tests? #f ; no tests included
5463 #:jar-name "eclipse-equinox-osgi.jar"))
5465 `(("java-osgi-annotation" ,java-osgi-annotation)))
5466 (home-page "http://www.eclipse.org/equinox/")
5467 (synopsis "Eclipse Equinox OSGi framework")
5468 (description "This package provides an implementation of the OSGi Core
5470 (license license:epl1.0)))
5472 (define-public java-eclipse-equinox-common
5474 (name "java-eclipse-equinox-common")
5475 (version "3.10.200")
5478 (uri (string-append "https://repo1.maven.org/maven2/"
5479 "org/eclipse/platform/org.eclipse.equinox.common/"
5480 version "/org.eclipse.equinox.common-"
5481 version "-sources.jar"))
5484 "1yn8ij6xsljlf35sr2l7wvyvc0ss4n1rv0ry5zkgb49dj4hyrqrj"))))
5485 (build-system ant-build-system)
5487 `(#:tests? #f ; no tests included
5488 #:jar-name "eclipse-equinox-common.jar"))
5490 `(("java-eclipse-osgi" ,java-eclipse-osgi)))
5491 (home-page "http://www.eclipse.org/equinox/")
5492 (synopsis "Common Eclipse runtime")
5493 (description "This package provides the common Eclipse runtime.")
5494 (license license:epl1.0)))
5496 (define-public java-eclipse-core-jobs
5498 (name "java-eclipse-core-jobs")
5502 (uri (string-append "https://repo1.maven.org/maven2/"
5503 "org/eclipse/platform/org.eclipse.core.jobs/"
5504 version "/org.eclipse.core.jobs-"
5505 version "-sources.jar"))
5508 "0395b8lh0km8vhzjnchvs1rii1qz48hyvb2wqfaq4yhklbwihq4b"))))
5509 (build-system ant-build-system)
5511 `(#:tests? #f ; no tests included
5512 #:jar-name "eclipse-core-jobs.jar"))
5514 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5515 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5516 (home-page "http://www.eclipse.org/equinox/")
5517 (synopsis "Eclipse jobs mechanism")
5518 (description "This package provides the Eclipse jobs mechanism.")
5519 (license license:epl1.0)))
5521 (define-public java-eclipse-equinox-registry
5523 (name "java-eclipse-equinox-registry")
5527 (uri (string-append "https://repo1.maven.org/maven2/"
5528 "org/eclipse/platform/org.eclipse.equinox.registry/"
5529 version "/org.eclipse.equinox.registry-"
5530 version "-sources.jar"))
5533 "1i9sgymh2fy5vdgk5y7s3qvrlbgh4l93ddqi3v4zmca7hwrlhf9k"))))
5534 (build-system ant-build-system)
5536 `(#:tests? #f ; no tests included
5537 #:jar-name "eclipse-equinox-registry.jar"))
5539 `(("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
5540 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5541 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5542 (home-page "http://www.eclipse.org/equinox/")
5543 (synopsis "Eclipse extension registry support")
5544 (description "This package provides support for the Eclipse extension
5546 (license license:epl1.0)))
5548 (define-public java-eclipse-equinox-app
5550 (name "java-eclipse-equinox-app")
5554 (uri (string-append "https://repo1.maven.org/maven2/"
5555 "org/eclipse/platform/org.eclipse.equinox.app/"
5556 version "/org.eclipse.equinox.app-"
5557 version "-sources.jar"))
5560 "0nhvbp93y203ar7y59gb0mz3w2d3jlqhr0c9hii9bcfpmr7imdab"))))
5561 (build-system ant-build-system)
5563 `(#:tests? #f ; no tests included
5564 #:jar-name "eclipse-equinox-app.jar"))
5566 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5567 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5568 ("java-eclipse-osgi" ,java-eclipse-osgi)
5569 ("java-osgi-service-event" ,java-osgi-service-event)))
5570 (home-page "http://www.eclipse.org/equinox/")
5571 (synopsis "Equinox application container")
5572 (description "This package provides the Equinox application container for
5574 (license license:epl1.0)))
5576 (define-public java-eclipse-equinox-preferences
5578 (name "java-eclipse-equinox-preferences")
5582 (uri (string-append "https://repo1.maven.org/maven2/"
5583 "org/eclipse/platform/org.eclipse.equinox.preferences/"
5584 version "/org.eclipse.equinox.preferences-"
5585 version "-sources.jar"))
5588 "0k7w6c141sqym4fy3af0qkwpy4pdh2vsjpjba6rp5fxyqa24v0a2"))))
5589 (build-system ant-build-system)
5591 `(#:tests? #f ; no tests included
5592 #:jar-name "eclipse-equinox-preferences.jar"))
5594 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5595 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5596 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5597 (home-page "http://www.eclipse.org/equinox/")
5598 (synopsis "Eclipse preferences mechanism")
5599 (description "This package provides the Eclipse preferences mechanism with
5600 the module @code{org.eclipse.equinox.preferences}.")
5601 (license license:epl1.0)))
5603 (define-public java-eclipse-core-contenttype
5605 (name "java-eclipse-core-contenttype")
5609 (uri (string-append "https://repo1.maven.org/maven2/"
5610 "org/eclipse/platform/org.eclipse.core.contenttype/"
5611 version "/org.eclipse.core.contenttype-"
5612 version "-sources.jar"))
5615 "1wcqcv7ijwv5rh748vz3x9pkmjl9w1r0k0026k56n8yjl4rrmspi"))))
5616 (build-system ant-build-system)
5618 `(#:tests? #f ; no tests included
5619 #:jar-name "eclipse-core-contenttype.jar"))
5621 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5622 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5623 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5624 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5625 (home-page "http://www.eclipse.org/")
5626 (synopsis "Eclipse content mechanism")
5627 (description "This package provides the Eclipse content mechanism in the
5628 @code{org.eclipse.core.contenttype} module.")
5629 (license license:epl1.0)))
5631 (define-public java-eclipse-core-runtime
5633 (name "java-eclipse-core-runtime")
5634 (version "3.15.100")
5637 (uri (string-append "https://repo1.maven.org/maven2/"
5638 "org/eclipse/platform/org.eclipse.core.runtime/"
5639 version "/org.eclipse.core.runtime-"
5640 version "-sources.jar"))
5643 "0l8xayacsbjvz5hypx2fv47vpw2n4dspamcfb3hx30x9hj8vmg7r"))))
5644 (build-system ant-build-system)
5646 `(#:tests? #f ; no tests included
5647 #:jar-name "eclipse-core-runtime.jar"))
5649 `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
5650 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
5651 ("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
5652 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5653 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5654 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5655 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5656 (home-page "https://www.eclipse.org/")
5657 (synopsis "Eclipse core runtime")
5658 (description "This package provides the Eclipse core runtime with the
5659 module @code{org.eclipse.core.runtime}.")
5660 (license license:epl1.0)))
5662 (define-public java-eclipse-core-filesystem
5664 (name "java-eclipse-core-filesystem")
5668 (uri (string-append "https://repo1.maven.org/maven2/"
5669 "org/eclipse/platform/org.eclipse.core.filesystem/"
5670 version "/org.eclipse.core.filesystem-"
5671 version "-sources.jar"))
5674 "0km1bhwjim4rfy3pkvjhvy31kgsyf2ncx0mlkmbf5n6g57pphdyj"))))
5675 (build-system ant-build-system)
5677 `(#:tests? #f ; no tests included
5678 #:jar-name "eclipse-core-filesystem.jar"))
5680 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5681 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5682 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5683 (home-page "https://www.eclipse.org/")
5684 (synopsis "Eclipse core file system")
5685 (description "This package provides the Eclipse core file system with the
5686 module @code{org.eclipse.core.filesystem}.")
5687 (license license:epl1.0)))
5689 (define-public java-eclipse-core-expressions
5691 (name "java-eclipse-core-expressions")
5695 (uri (string-append "https://repo1.maven.org/maven2/"
5696 "org/eclipse/platform/org.eclipse.core.expressions/"
5697 version "/org.eclipse.core.expressions-"
5698 version "-sources.jar"))
5701 "18bw2l875gmygvpagpgk9l24qzbdjia4ag12nw6fi8v8yaq4987f"))))
5702 (build-system ant-build-system)
5704 `(#:tests? #f ; no tests included
5705 #:jar-name "eclipse-core-expressions.jar"))
5707 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5708 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5709 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5710 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5711 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5712 (home-page "https://www.eclipse.org/")
5713 (synopsis "Eclipse core expression language")
5714 (description "This package provides the Eclipse core expression language
5715 with the @code{org.eclipse.core.expressions} module.")
5716 (license license:epl1.0)))
5718 (define-public java-eclipse-core-variables
5720 (name "java-eclipse-core-variables")
5724 (uri (string-append "https://repo1.maven.org/maven2/"
5725 "org/eclipse/platform/org.eclipse.core.variables/"
5726 version "/org.eclipse.core.variables-"
5727 version "-sources.jar"))
5730 "12dirh03zi4n5x5cj07vzrhkmnqy6h9q10h9j605pagmpmifyxmy"))))
5731 (build-system ant-build-system)
5733 `(#:tests? #f ; no tests included
5734 #:jar-name "eclipse-core-variables.jar"))
5736 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5737 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5738 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5739 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5740 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5741 (home-page "https://www.eclipse.org/platform")
5742 (synopsis "Eclipse core variables")
5743 (description "This package provides the Eclipse core variables module
5744 @code{org.eclipse.core.variables}.")
5745 (license license:epl1.0)))
5747 (define-public java-eclipse-ant-core
5749 (name "java-eclipse-ant-core")
5753 (uri (string-append "https://repo1.maven.org/maven2/"
5754 "org/eclipse/platform/org.eclipse.ant.core/"
5755 version "/org.eclipse.ant.core-"
5756 version "-sources.jar"))
5759 "11g3if794qjlk98mz9zch22rr56sd7z63vn4i7k2icr8cq5bfqg7"))))
5760 (build-system ant-build-system)
5762 `(#:tests? #f ; no tests included
5763 #:jar-name "eclipse-ant-core.jar"))
5765 `(("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
5766 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5767 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5768 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5769 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
5770 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5771 ("java-eclipse-core-variables" ,java-eclipse-core-variables)
5772 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5773 (home-page "https://www.eclipse.org/platform")
5774 (synopsis "Ant build tool core libraries")
5775 (description "This package provides the ant build tool core libraries with
5776 the module @code{org.eclipse.ant.core}.")
5777 (license license:epl1.0)))
5779 (define-public java-eclipse-core-resources
5781 (name "java-eclipse-core-resources")
5782 (version "3.13.200")
5785 (uri (string-append "https://repo1.maven.org/maven2/"
5786 "org/eclipse/platform/org.eclipse.core.resources/"
5787 version "/org.eclipse.core.resources-"
5788 version "-sources.jar"))
5791 "1sn3b6ky72hkvxcgf9b2jkpbdh3y8lbhi9xxwv1dsiddpkkq91hs"))))
5792 (build-system ant-build-system)
5794 `(#:tests? #f ; no tests included
5795 #:jar-name "eclipse-core-resources.jar"))
5797 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5798 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5799 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5800 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
5801 ("java-eclipse-core-expressions" ,java-eclipse-core-expressions)
5802 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
5803 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
5804 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5805 ("java-eclipse-ant-core" ,java-eclipse-ant-core)
5806 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5807 (home-page "https://www.eclipse.org/")
5808 (synopsis "Eclipse core resource management")
5809 (description "This package provides the Eclipse core resource management
5810 module @code{org.eclipse.core.resources}.")
5811 (license license:epl1.0)))
5813 (define-public java-eclipse-compare-core
5815 (name "java-eclipse-compare-core")
5819 (uri (string-append "https://repo1.maven.org/maven2/"
5820 "org/eclipse/platform/org.eclipse.compare.core/"
5821 version "/org.eclipse.compare.core-"
5822 version "-sources.jar"))
5825 "10g37r0pbiffyv2wk35c6g5lwzkdipkl0kkjp41v84dln46xm4dg"))))
5826 (build-system ant-build-system)
5828 `(#:tests? #f ; no tests included
5829 #:jar-name "eclipse-compare-core.jar"))
5831 `(("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5832 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5833 ("java-eclipse-osgi" ,java-eclipse-osgi)
5834 ("java-icu4j" ,java-icu4j)))
5835 (home-page "https://www.eclipse.org/")
5836 (synopsis "Eclipse core compare support")
5837 (description "This package provides the Eclipse core compare support
5838 module @code{org.eclipse.compare.core}.")
5839 (license license:epl1.0)))
5841 (define-public java-eclipse-team-core
5843 (name "java-eclipse-team-core")
5847 (uri (string-append "https://repo1.maven.org/maven2/"
5848 "org/eclipse/platform/org.eclipse.team.core/"
5849 version "/org.eclipse.team.core-"
5850 version "-sources.jar"))
5853 "02j2jzqgb26zx2d5ahxmvijw6j4r0la90zl5c3i65x6z19ciyam7"))))
5854 (build-system ant-build-system)
5856 `(#:tests? #f ; no tests included
5857 #:jar-name "eclipse-team-core.jar"))
5859 `(("java-eclipse-compare-core" ,java-eclipse-compare-core)
5860 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
5861 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
5862 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
5863 ("java-eclipse-core-resources" ,java-eclipse-core-resources)
5864 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5865 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5866 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5867 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5868 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5869 (home-page "https://www.eclipse.org/platform")
5870 (synopsis "Eclipse team support core")
5871 (description "This package provides the Eclipse team support core module
5872 @code{org.eclipse.team.core}.")
5873 (license license:epl1.0)))
5875 (define-public java-eclipse-core-commands
5877 (name "java-eclipse-core-commands")
5881 (uri (string-append "https://repo1.maven.org/maven2/"
5882 "org/eclipse/platform/org.eclipse.core.commands/"
5883 version "/org.eclipse.core.commands-"
5884 version "-sources.jar"))
5887 "0yjn482qndcfrsq3jd6vnhcylp16420f5aqkrwr8spsprjigjcr9"))))
5888 (build-system ant-build-system)
5890 `(#:tests? #f ; no tests included
5891 #:jar-name "eclipse-core-commands.jar"))
5893 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)))
5894 (home-page "https://www.eclipse.org/platform")
5895 (synopsis "Eclipse core commands")
5896 (description "This package provides Eclipse core commands in the module
5897 @code{org.eclipse.core.commands}.")
5898 (license license:epl1.0)))
5900 (define-public java-eclipse-text
5902 (name "java-eclipse-text")
5906 (uri (string-append "https://repo1.maven.org/maven2/"
5907 "org/eclipse/platform/org.eclipse.text/"
5908 version "/org.eclipse.text-"
5909 version "-sources.jar"))
5912 "0scz70vzz5qs5caji9f5q01vkqnvip7dpri1q07l8wbbdcxn4cq1"))))
5913 (build-system ant-build-system)
5915 `(#:tests? #f ; no tests included
5916 #:jar-name "eclipse-text.jar"
5918 (modify-phases %standard-phases
5919 ;; When creating a new category we must make sure that the new list
5920 ;; matches List<Position>. By default it seems to be too generic
5921 ;; (ArrayList<Object>), so we specialize it to ArrayList<Position>.
5922 ;; Without this we get this error:
5924 ;; [javac] .../src/org/eclipse/jface/text/AbstractDocument.java:376:
5925 ;; error: method put in interface Map<K,V> cannot be applied to given types;
5926 ;; [javac] fPositions.put(category, new ArrayList<>());
5928 ;; [javac] required: String,List<Position>
5929 ;; [javac] found: String,ArrayList<Object>
5930 ;; [javac] reason: actual argument ArrayList<Object> cannot be converted
5931 ;; to List<Position> by method invocation conversion
5932 ;; [javac] where K,V are type-variables:
5933 ;; [javac] K extends Object declared in interface Map
5934 ;; [javac] V extends Object declared in interface Map
5936 ;; I don't know if this is a good fix. I suspect it is not, but it
5938 (add-after 'unpack 'fix-compilation-error
5940 (substitute* "src/org/eclipse/jface/text/AbstractDocument.java"
5941 (("Positions.put\\(category, new ArrayList<>\\(\\)\\);")
5942 "Positions.put(category, new ArrayList<Position>());"))
5945 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5946 ("java-eclipse-core-commands" ,java-eclipse-core-commands)
5947 ("java-icu4j" ,java-icu4j)))
5948 (home-page "http://www.eclipse.org/platform")
5949 (synopsis "Eclipse text library")
5950 (description "Platform Text is part of the Platform UI project and
5951 provides the basic building blocks for text and text editors within Eclipse
5952 and contributes the Eclipse default text editor.")
5953 (license license:epl1.0)))
5955 (define-public java-eclipse-jdt-core
5957 (name "java-eclipse-jdt-core")
5961 (uri (string-append "https://repo1.maven.org/maven2/"
5962 "org/eclipse/jdt/org.eclipse.jdt.core/"
5963 version "/org.eclipse.jdt.core-"
5964 version "-sources.jar"))
5967 "1g560yr9v2kzv34gc2m3ifpgnj7krcdd6h4gd4z83pwqacwkfz0k"))))
5968 (build-system ant-build-system)
5970 `(#:tests? #f ; no tests included
5971 #:jar-name "eclipse-jdt-core.jar"
5973 (modify-phases %standard-phases
5974 (add-after 'unpack 'move-sources
5976 (with-directory-excursion "src/jdtCompilerAdaptersrc/"
5977 (for-each (lambda (file)
5978 (install-file file (string-append "../" (dirname file))))
5979 (find-files "." ".*")))
5980 (delete-file-recursively "src/jdtCompilerAdaptersrc/")
5982 (add-before 'build 'copy-resources
5984 (with-directory-excursion "src"
5985 (for-each (lambda (file)
5986 (install-file file (string-append "../build/classes/" (dirname file))))
5987 (find-files "." ".*.(props|properties|rsc)")))
5990 `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
5991 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
5992 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
5993 ("java-eclipse-core-resources" ,java-eclipse-core-resources)
5994 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5995 ("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
5996 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5997 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5998 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5999 ("java-eclipse-osgi" ,java-eclipse-osgi)
6000 ("java-eclipse-text" ,java-eclipse-text)))
6001 (home-page "https://www.eclipse.org/jdt")
6002 (synopsis "Java development tools core libraries")
6003 (description "This package provides the core libraries of the Eclipse Java
6004 development tools.")
6005 (license license:epl1.0)))
6007 (define-public java-eclipse-jdt-compiler-apt
6009 (name "java-eclipse-jdt-compiler-apt")
6013 (uri (string-append "https://repo1.maven.org/maven2/"
6014 "org/eclipse/jdt/org.eclipse.jdt.compiler.apt/"
6015 version "/org.eclipse.jdt.compiler.apt-"
6016 version "-sources.jar"))
6019 "1s285k9p2ixdqrknb40jbbvw682n9a7l5lqpn583a8pvlzg2l6r8"))))
6020 (build-system ant-build-system)
6022 `(#:tests? #f ; no tests included
6023 #:jar-name "eclipse-jdt-compiler-apt.jar"
6026 `(("java-eclipse-jdt-core" ,java-eclipse-jdt-core)))
6027 (home-page "https://www.eclipse.org/jdt/apt/")
6028 (synopsis "Annotation processing tool")
6029 (description "APT stands for Annotation Processing Tool. APT provides a
6030 means for generating files and compiling new Java classes based on annotations
6031 found in your source code.")
6032 (license license:epl2.0)))
6034 (define-public java-javax-mail
6036 (name "java-javax-mail")
6040 (uri (string-append "https://repo1.maven.org/maven2/"
6041 "com/sun/mail/javax.mail/"
6042 version "/javax.mail-"
6043 version "-sources.jar"))
6046 "0sdlfgsc2b5s89xv1261y8i0jijcja019k2x1c8ngfn582w4jly9"))))
6047 (build-system ant-build-system)
6049 `(#:tests? #f ; no tests
6050 #:jar-name "javax-mail.jar"))
6051 (home-page "https://javamail.java.net")
6052 (synopsis "Reference implementation of the JavaMail API")
6054 "This package provides versions of the JavaMail API implementation, IMAP,
6055 SMTP, and POP3 service providers, some examples, and documentation for the
6057 ;; GPLv2 only with "classpath exception".
6058 (license license:gpl2)))
6060 (define-public java-log4j-api
6062 (name "java-log4j-api")
6066 (uri (string-append "mirror://apache/logging/log4j/" version
6067 "/apache-log4j-" version "-src.tar.gz"))
6070 "0j5p9gik0jysh37nlrckqbky12isy95cpwg2gv5fas1rcdqbraxd"))))
6071 (build-system ant-build-system)
6073 `(#:tests? #f ; tests require unpackaged software
6074 #:jar-name "log4j-api.jar"
6076 (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out")
6079 (modify-phases %standard-phases
6080 (add-after 'unpack 'enter-dir
6081 (lambda _ (chdir "log4j-api") #t))
6082 ;; FIXME: The tests require additional software that has not been
6083 ;; packaged yet, such as
6084 ;; * org.apache.maven
6085 ;; * org.apache.felix
6086 (add-after 'enter-dir 'delete-tests
6087 (lambda _ (delete-file-recursively "src/test") #t)))))
6089 `(("java-osgi-core" ,java-osgi-core)
6090 ("java-hamcrest-core" ,java-hamcrest-core)
6091 ("java-junit" ,java-junit)))
6092 (home-page "http://logging.apache.org/log4j/2.x/")
6093 (synopsis "API module of the Log4j logging framework for Java")
6095 "This package provides the API module of the Log4j logging framework for
6097 (license license:asl2.0)))
6099 (define-public java-log4j-core
6101 (inherit java-log4j-api)
6102 (name "java-log4j-core")
6104 `(("java-osgi-core" ,java-osgi-core)
6105 ("java-hamcrest-core" ,java-hamcrest-core)
6106 ("java-log4j-api" ,java-log4j-api)
6107 ("java-mail" ,java-mail)
6108 ("java-jboss-jms-api-spec" ,java-jboss-jms-api-spec)
6109 ("java-lmax-disruptor" ,java-lmax-disruptor)
6110 ("java-kafka" ,java-kafka-clients)
6111 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
6112 ("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
6113 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
6114 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)
6115 ("java-fasterxml-jackson-dataformat-xml" ,java-fasterxml-jackson-dataformat-xml)
6116 ("java-fasterxml-jackson-dataformat-yaml" ,java-fasterxml-jackson-dataformat-yaml)
6117 ("java-commons-compress" ,java-commons-compress)
6118 ("java-commons-csv" ,java-commons-csv)
6119 ("java-jeromq" ,java-jeromq)
6120 ("java-junit" ,java-junit)))
6122 `(("hamcrest" ,java-hamcrest-all)
6123 ("java-commons-io" ,java-commons-io)
6124 ("java-commons-lang3" ,java-commons-lang3)
6125 ("slf4j" ,java-slf4j-api)))
6127 `(#:tests? #f ; tests require more dependencies
6128 #:test-dir "src/test"
6129 #:source-dir "src/main/java"
6130 #:jar-name "log4j-core.jar"
6133 (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out")
6136 (modify-phases %standard-phases
6137 (add-after 'unpack 'enter-dir
6138 (lambda _ (chdir "log4j-core") #t)))))
6139 (synopsis "Core component of the Log4j framework")
6140 (description "This package provides the core component of the Log4j
6141 logging framework for Java.")))
6143 (define-public java-log4j-1.2-api
6145 (inherit java-log4j-api)
6146 (name "java-log4j-1.2-api")
6148 `(#:jar-name "java-log4j-1.2-api.jar"
6149 #:source-dir "log4j-1.2-api/src/main/java"
6151 ;; Tests require maven-model (and other maven subprojects), which is a
6152 ;; cyclic dependency.
6155 `(("log4j-api" ,java-log4j-api)
6156 ("log4j-core" ,java-log4j-core)
6157 ("osgi-core" ,java-osgi-core)
6158 ("eclipse-osgi" ,java-eclipse-osgi)
6159 ("java-lmax-disruptor" ,java-lmax-disruptor)))))
6161 (define-public java-commons-cli
6163 (name "java-commons-cli")
6167 (uri (string-append "mirror://apache/commons/cli/source/"
6168 "commons-cli-" version "-src.tar.gz"))
6171 "05hgi2z01fqz374y719gl1dxzqvzci5af071zm7vxrjg9vczipm1"))))
6172 (build-system ant-build-system)
6175 `(#:jar-name "commons-cli.jar"))
6177 `(("java-junit" ,java-junit)
6178 ("java-hamcrest-core" ,java-hamcrest-core)))
6179 (home-page "http://commons.apache.org/cli/")
6180 (synopsis "Command line arguments and options parsing library")
6181 (description "The Apache Commons CLI library provides an API for parsing
6182 command line options passed to programs. It is also able to print help
6183 messages detailing the options available for a command line tool.
6185 Commons CLI supports different types of options:
6188 @item POSIX like options (ie. tar -zxvf foo.tar.gz)
6189 @item GNU like long options (ie. du --human-readable --max-depth=1)
6190 @item Java like properties (ie. java -Djava.awt.headless=true Foo)
6191 @item Short options with value attached (ie. gcc -O2 foo.c)
6192 @item long options with single hyphen (ie. ant -projecthelp)
6195 This is a part of the Apache Commons Project.")
6196 (license license:asl2.0)))
6198 (define-public java-commons-codec
6200 (name "java-commons-codec")
6204 (uri (string-append "mirror://apache/commons/codec/source/"
6205 "commons-codec-" version "-src.tar.gz"))
6208 "1w9qg30y4s0x8gnmr2fgj4lyplfn788jqxbcz27lf5kbr6n8xr65"))))
6209 (build-system ant-build-system)
6210 (outputs '("out" "doc"))
6212 `(#:test-target "test"
6214 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
6215 (junit (assoc-ref %build-inputs "java-junit")))
6216 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
6217 (string-append "-Dhamcrest.jar=" hamcrest
6218 "/share/java/hamcrest-core.jar")
6219 ;; Do not append version to jar.
6220 "-Dfinal.name=commons-codec"))
6222 (modify-phases %standard-phases
6223 (add-after 'build 'build-javadoc ant-build-javadoc)
6224 (replace 'install (install-jars "dist"))
6225 (add-after 'install 'install-doc (install-javadoc "dist/docs/api")))))
6227 `(("java-junit" ,java-junit)
6228 ("java-hamcrest-core" ,java-hamcrest-core)))
6229 (home-page "http://commons.apache.org/codec/")
6230 (synopsis "Common encoders and decoders such as Base64, Hex, Phonetic and URLs")
6231 (description "The codec package contains simple encoder and decoders for
6232 various formats such as Base64 and Hexadecimal. In addition to these widely
6233 used encoders and decoders, the codec package also maintains a collection of
6234 phonetic encoding utilities.
6236 This is a part of the Apache Commons Project.")
6237 (license license:asl2.0)))
6239 (define-public java-commons-daemon
6241 (name "java-commons-daemon")
6245 (uri (string-append "mirror://apache/commons/daemon/source/"
6246 "commons-daemon-" version "-src.tar.gz"))
6249 "0ci46kq8jpz084ccwq0mmkahcgsmh20ziclp2jf5i0djqv95gvhi"))))
6250 (build-system ant-build-system)
6252 `(#:test-target "test"
6254 (modify-phases %standard-phases
6255 (add-after 'build 'build-javadoc ant-build-javadoc)
6256 (replace 'install (install-jars "dist"))
6257 (add-after 'install 'install-doc (install-javadoc "dist/docs/api")))))
6259 `(("java-junit" ,java-junit)))
6260 (home-page "http://commons.apache.org/daemon/")
6261 (synopsis "Library to launch Java applications as daemons")
6262 (description "The Daemon package from Apache Commons can be used to
6263 implement Java applications which can be launched as daemons. For example the
6264 program will be notified about a shutdown so that it can perform cleanup tasks
6265 before its process of execution is destroyed by the operation system.
6267 This package contains the Java library. You will also need the actual binary
6268 for your architecture which is provided by the jsvc package.
6270 This is a part of the Apache Commons Project.")
6271 (license license:asl2.0)))
6273 (define-public java-javaewah
6275 (name "java-javaewah")
6279 (uri (string-append "https://github.com/lemire/javaewah/"
6280 "archive/JavaEWAH-" version ".tar.gz"))
6283 "1n7j1r1h24wlhwv9zdcj6yqjrhma2ixwyzm15l5vrv6yqjs6753b"))))
6284 (build-system ant-build-system)
6285 (arguments `(#:jar-name "javaewah.jar"))
6287 `(("java-junit" ,java-junit)
6288 ("java-hamcrest-core" ,java-hamcrest-core)))
6289 (home-page "https://github.com/lemire/javaewah")
6290 (synopsis "Compressed alternative to the Java @code{BitSet} class")
6291 (description "This is a word-aligned compressed variant of the Java
6292 @code{Bitset} class. It provides both a 64-bit and a 32-bit RLE-like
6293 compression scheme. It can be used to implement bitmap indexes.
6295 The goal of word-aligned compression is not to achieve the best compression,
6296 but rather to improve query processing time. Hence, JavaEWAH tries to save CPU
6297 cycles, maybe at the expense of storage. However, the EWAH scheme is always
6298 more efficient storage-wise than an uncompressed bitmap (as implemented in the
6299 @code{BitSet} class by Sun).")
6300 ;; GPL2.0 derivates are explicitly allowed.
6301 (license license:asl2.0)))
6303 (define-public java-slf4j-api
6305 (name "java-slf4j-api")
6309 (uri (string-append "https://www.slf4j.org/dist/slf4j-"
6313 "13j51sgzmhhdrfa74gkal5zpip7r1440dh7zsi2c8bpb2zs1v8kb"))
6314 (modules '((guix build utils)))
6315 ;; Delete bundled jars.
6318 (for-each delete-file (find-files "." "\\.jar$"))
6320 (build-system ant-build-system)
6322 `(#:jar-name "slf4j-api.jar"
6323 #:source-dir "slf4j-api/src/main"
6324 #:test-dir "slf4j-api/src/test"
6326 (modify-phases %standard-phases
6327 (add-after 'build 'regenerate-jar
6329 ;; pom.xml ignores these files in the jar creation process. If we don't,
6330 ;; we get the error "This code should have never made it into slf4j-api.jar"
6331 (delete-file-recursively "build/classes/org/slf4j/impl")
6332 (invoke "jar" "-cf" "build/jar/slf4j-api.jar" "-C"
6333 "build/classes" ".")))
6334 (add-before 'check 'dont-test-abstract-classes
6336 ;; abstract classes are not meant to be run with junit
6337 (substitute* "build.xml"
6338 (("<include name=\"\\*\\*/\\*Test.java\" />")
6339 (string-append "<include name=\"**/*Test.java\" />"
6340 "<exclude name=\"**/MultithreadedInitializationTest"
6344 `(("java-junit" ,java-junit)
6345 ("java-hamcrest-core" ,java-hamcrest-core)))
6346 (home-page "https://www.slf4j.org/")
6347 (synopsis "Simple logging facade for Java")
6348 (description "The Simple Logging Facade for Java (SLF4J) serves as a
6349 simple facade or abstraction for various logging
6350 frameworks (e.g. @code{java.util.logging}, @code{logback}, @code{log4j})
6351 allowing the end user to plug in the desired logging framework at deployment
6353 (license license:expat)))
6355 (define java-slf4j-api-bootstrap
6357 (inherit java-slf4j-api)
6358 (name "java-slf4j-api-bootstrap")
6361 (substitute-keyword-arguments (package-arguments java-slf4j-api)
6362 ((#:tests? _ #f) #f)))))
6364 (define-public java-slf4j-simple
6366 (name "java-slf4j-simple")
6368 (source (package-source java-slf4j-api))
6369 (build-system ant-build-system)
6371 `(#:jar-name "slf4j-simple.jar"
6372 #:source-dir "slf4j-simple/src/main"
6373 #:test-dir "slf4j-simple/src/test"
6375 (modify-phases %standard-phases
6376 ;; The tests need some test classes from slf4j-api
6377 (add-before 'check 'build-slf4j-api-test-helpers
6379 ;; Add current dir to CLASSPATH ...
6381 (string-append (getcwd) ":" (getenv "CLASSPATH")))
6382 ;; ... and build test helper classes here:
6385 ,@(find-files "slf4j-api/src/test" ".*\\.java"))))))))
6387 `(("java-junit" ,java-junit)
6388 ("java-hamcrest-core" ,java-hamcrest-core)
6389 ("java-slf4j-api" ,java-slf4j-api)))
6390 (home-page "https://www.slf4j.org/")
6391 (synopsis "Simple implementation of simple logging facade for Java")
6392 (description "SLF4J binding for the Simple implementation, which outputs
6393 all events to System.err. Only messages of level INFO and higher are
6395 (license license:expat)))
6397 (define-public antlr2
6403 (uri (string-append "http://www.antlr2.org/download/antlr-"
6407 "1ffvcwdw73id0dk6pj2mlxjvbg0662qacx4ylayqcxgg381fnfl5"))
6408 (modules '((guix build utils)))
6411 (delete-file "antlr.jar")
6412 (substitute* "lib/cpp/antlr/CharScanner.hpp"
6416 "#define EOF (-1)\n"
6417 "#include <strings.h>")))
6418 (substitute* "configure"
6421 (build-system gnu-build-system)
6423 `(#:tests? #f ; no test target
6424 #:imported-modules ((guix build ant-build-system)
6425 (guix build syscalls)
6426 ,@%gnu-build-system-modules)
6427 #:modules (((guix build ant-build-system) #:prefix ant:)
6428 (guix build gnu-build-system)
6431 (modify-phases %standard-phases
6432 (add-after 'install 'strip-jar-timestamps
6433 (assoc-ref ant:%standard-phases 'strip-jar-timestamps))
6434 (add-before 'configure 'fix-timestamp
6436 (substitute* "configure"
6437 (("^TIMESTAMP.*") "TIMESTAMP=19700101\n"))
6439 (add-after 'configure 'fix-bin-ls
6441 (substitute* (find-files "." "Makefile")
6447 ("java" ,icedtea "jdk")))
6449 `(("java" ,icedtea)))
6450 (home-page "http://www.antlr2.org")
6451 (synopsis "Framework for constructing recognizers, compilers, and translators")
6452 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
6453 is a language tool that provides a framework for constructing recognizers,
6454 compilers, and translators from grammatical descriptions containing Java, C#,
6455 C++, or Python actions. ANTLR provides excellent support for tree construction,
6456 tree walking, and translation.")
6457 (license license:public-domain)))
6459 (define-public java-stringtemplate-3
6461 (name "java-stringtemplate")
6465 (uri (string-append "https://github.com/antlr/website-st4/raw/"
6466 "gh-pages/download/stringtemplate-"
6470 "086yj68np1vqhkj7483diz3km6s6y4gmwqswa7524a0ca6vxn2is"))))
6471 (build-system ant-build-system)
6473 `(#:jar-name (string-append ,name "-" ,version ".jar")
6475 #:modules ((guix build ant-build-system)
6479 (modify-phases %standard-phases
6480 (add-before 'check 'fix-tests
6482 (substitute* "build.xml"
6483 (("\\$\\{test.home\\}/java")
6484 "${test.home}/org"))
6486 (add-before 'build 'generate-grammar
6488 (with-directory-excursion "src/org/antlr/stringtemplate/language/"
6489 (for-each (lambda (file)
6490 (format #t "~a\n" file)
6491 (invoke "antlr" file))
6492 '("template.g" "angle.bracket.template.g" "action.g"
6493 "eval.g" "group.g" "interface.g")))
6497 ("java-junit" ,java-junit)))
6498 (home-page "http://www.stringtemplate.org")
6499 (synopsis "Template engine to generate formatted text output")
6500 (description "StringTemplate is a java template engine (with ports for C#,
6501 Objective-C, JavaScript, Scala) for generating source code, web pages, emails,
6502 or any other formatted text output. StringTemplate is particularly good at
6503 code generators, multiple site skins, and internationalization / localization.
6504 StringTemplate also powers ANTLR.")
6505 (license license:bsd-3)))
6507 ;; antlr3 is partially written using antlr3 grammar files. It also depends on
6508 ;; ST4 (stringtemplate4), which is also partially written using antlr3 grammar
6509 ;; files and uses antlr3 at runtime. The latest version requires a recent version
6510 ;; of antlr3 at runtime.
6511 ;; Fortunately, ST4 4.0.6 can be built with an older antlr3, and we use antlr3.3.
6512 ;; This version of ST4 is sufficient for the latest antlr3.
6513 ;; We use ST4 4.0.6 to build a boostrap antlr3 (latest version), and build
6514 ;; the latest ST4 with it. Then we build our final antlr3 that will be linked
6515 ;; against the latest ST4.
6516 ;; antlr3.3 still depends on antlr3 to generate some files, so we use an
6517 ;; even older version, antlr3.1, to generate them. Fortunately antlr3.1 uses
6518 ;; only grammar files with the antlr2 syntax.
6519 ;; So we build antlr3.1 -> antlr3.3 -> ST4.0.6 -> antlr3-bootstrap -> ST4 -> antlr3.
6521 (define-public java-stringtemplate
6522 (package (inherit java-stringtemplate-3)
6523 (name "java-stringtemplate")
6527 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/"
6529 (file-name (string-append name "-" version ".tar.gz"))
6532 "1pri8hqa95rfdkjy55icl5q1m09zwp5k67ib14abas39s4v3w087"))))
6533 (build-system ant-build-system)
6535 `(#:jar-name (string-append ,name "-" ,version ".jar")
6536 #:tests? #f ; FIXME: tests fail for unknown reasons
6538 #:modules ((guix build ant-build-system)
6542 (modify-phases %standard-phases
6543 (add-before 'check 'fix-test-target
6545 (substitute* "build.xml"
6546 (("\\$\\{test.home\\}/java") "${test.home}/")
6547 (("\\*Test.java") "Test*.java"))
6549 (add-before 'build 'generate-grammar
6551 (with-directory-excursion "src/org/stringtemplate/v4/compiler/"
6552 (for-each (lambda (file)
6553 (format #t "~a\n" file)
6554 (invoke "antlr3" file))
6555 '("STParser.g" "Group.g" "CodeGenerator.g")))
6558 `(("antlr3" ,antlr3-bootstrap)
6560 ("java-stringtemplate" ,java-stringtemplate-3)
6561 ("java-junit" ,java-junit)))))
6563 (define java-stringtemplate-4.0.6
6564 (package (inherit java-stringtemplate)
6565 (name "java-stringtemplate")
6569 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/ST-"
6571 (file-name (string-append name "-" version ".tar.gz"))
6574 "0hjmh1ahdsh3w825i67mli9l4nncc4l6hdbf9ma91jvlj590sljp"))))
6576 `(("antlr3" ,antlr3-3.3)
6578 ("java-stringtemplate" ,java-stringtemplate-3)))))
6580 (define-public antlr3
6586 (uri (string-append "https://github.com/antlr/antlr3/archive/"
6588 (file-name (string-append name "-" version ".tar.gz"))
6591 "0218v683081lg54z9hvjxinhxd4dqp870jx6n39gslm0bkyi4vd6"))))
6592 (build-system ant-build-system)
6594 `(#:jar-name (string-append ,name "-" ,version ".jar")
6595 #:source-dir "tool/src/main/java:runtime/Java/src/main/java:tool/src/main/antlr3"
6598 (modify-phases %standard-phases
6599 (add-after 'install 'bin-install
6600 (lambda* (#:key inputs outputs #:allow-other-keys)
6601 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
6602 (bin (string-append (assoc-ref outputs "out") "/bin")))
6604 (with-output-to-file (string-append bin "/antlr3")
6607 (string-append "#!" (which "sh") "\n"
6608 "java -cp " jar "/" ,name "-" ,version ".jar:"
6610 (find-files (assoc-ref inputs "stringtemplate")
6614 (find-files (assoc-ref inputs "stringtemplate4")
6618 (find-files (string-append
6619 (assoc-ref inputs "antlr")
6622 " org.antlr.Tool $*"))))
6623 (chmod (string-append bin "/antlr3") #o755))
6625 (add-before 'build 'generate-grammar
6627 (chdir "tool/src/main/antlr3/org/antlr/grammar/v3/")
6628 (for-each (lambda (file)
6631 (invoke "antlr3" file))
6632 '("ANTLR.g" "ANTLRTreePrinter.g" "ActionAnalysis.g"
6633 "AssignTokenTypesWalker.g"
6634 "ActionTranslator.g" "TreeToNFAConverter.g"
6635 "ANTLRv3.g" "ANTLRv3Tree.g" "LeftRecursiveRuleWalker.g"
6636 "CodeGenTreeWalker.g" "DefineGrammarItemsWalker.g"))
6637 (substitute* "ANTLRParser.java"
6638 (("public Object getTree") "public GrammarAST getTree"))
6639 (substitute* "ANTLRv3Parser.java"
6640 (("public Object getTree") "public CommonTree getTree"))
6641 (chdir "../../../../../java")
6642 (substitute* "org/antlr/tool/LeftRecursiveRuleAnalyzer.java"
6643 (("import org.antlr.grammar.v3.\\*;") "import org.antlr.grammar.v3.*;
6644 import org.antlr.grammar.v3.ANTLRTreePrinter;"))
6645 (substitute* "org/antlr/tool/ErrorManager.java"
6646 (("case NO_SUCH_ATTRIBUTE_PASS_THROUGH:") ""))
6647 (chdir "../../../..")
6649 (add-before 'build 'fix-build-xml
6651 (substitute* "build.xml"
6652 (("<exec") "<copy todir=\"${classes.dir}\">
6653 <fileset dir=\"tool/src/main/resources\">
6654 <include name=\"**/*.stg\"/>
6655 <include name=\"**/*.st\"/>
6656 <include name=\"**/*.sti\"/>
6657 <include name=\"**/STLexer.tokens\"/>
6663 ("antlr3" ,antlr3-bootstrap)))
6665 `(("junit" ,java-junit)
6666 ("stringtemplate" ,java-stringtemplate-3)
6667 ("stringtemplate4" ,java-stringtemplate)))
6669 `(("stringtemplate" ,java-stringtemplate-3)
6671 ("stringtemplate4" ,java-stringtemplate-4.0.6)))
6672 (home-page "http://www.antlr3.org")
6673 (synopsis "Framework for constructing recognizers, compilers, and translators")
6674 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
6675 is a language tool that provides a framework for constructing recognizers,
6676 compilers, and translators from grammatical descriptions containing Java, C#,
6677 C++, or Python actions. ANTLR provides excellent support for tree construction,
6678 tree walking, and translation.")
6679 (license license:bsd-3)))
6681 (define antlr3-bootstrap
6684 (name "antlr3-bootstrap")
6687 ("antlr3" ,antlr3-3.3)))
6689 `(("junit" ,java-junit)))))
6698 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
6699 "gh-pages/download/antlr-"
6703 "0qgg5vgsm4l1d6dj9pfbaa25dpv2ry2gny8ajy4vvgvfklw97b3m"))
6705 (search-patches "antlr3-3_3-fix-java8-compilation.patch"))))
6707 `(#:jar-name (string-append ,name "-" ,version ".jar")
6708 #:source-dir (string-join '("tool/src/main/java"
6709 "runtime/Java/src/main/java"
6710 "tool/src/main/antlr2"
6711 "tool/src/main/antlr3")
6713 #:tests? #f ; FIXME: tests seem to require maven plugin
6714 #:modules ((guix build ant-build-system)
6718 (modify-phases %standard-phases
6719 (add-after 'install 'bin-install
6720 (lambda* (#:key inputs outputs #:allow-other-keys)
6721 (let* ((out (assoc-ref outputs "out"))
6722 (jar (string-append out "/share/java"))
6723 (bin (string-append out "/bin")))
6725 (with-output-to-file (string-append bin "/antlr3")
6729 "#!" (which "sh") "\n"
6730 "java -cp " jar "/antlr3-3.3.jar:"
6732 (append (find-files (assoc-ref inputs "java-stringtemplate")
6734 (find-files (string-append (assoc-ref inputs "antlr")
6738 " org.antlr.Tool $*"))))
6739 (chmod (string-append bin "/antlr3") #o755)
6741 (add-before 'build 'generate-grammar
6743 (substitute* "tool/src/main/java/org/antlr/tool/Grammar.java"
6744 (("import org.antlr.grammar.v2.\\*;")
6745 "import org.antlr.grammar.v2.*;\n
6746 import org.antlr.grammar.v2.TreeToNFAConverter;\n
6747 import org.antlr.grammar.v2.DefineGrammarItemsWalker;\n
6748 import org.antlr.grammar.v2.ANTLRTreePrinter;"))
6749 (with-directory-excursion "tool/src/main/antlr2/org/antlr/grammar/v2/"
6750 (for-each (lambda (file)
6751 (format #t "~a\n" file)
6752 (invoke "antlr" file))
6753 '("antlr.g" "antlr.print.g" "assign.types.g"
6754 "buildnfa.g" "codegen.g" "define.g")))
6755 (with-directory-excursion "tool/src/main/antlr3/org/antlr/grammar/v3/"
6756 (for-each (lambda (file)
6757 (format #t "~a\n" file)
6758 (invoke "antlr3" file))
6759 '("ActionAnalysis.g" "ActionTranslator.g" "ANTLRv3.g"
6762 (add-before 'build 'fix-build-xml
6764 (substitute* "build.xml"
6765 (("<exec") "<copy todir=\"${classes.dir}\">
6766 <fileset dir=\"tool/src/main/resources\">
6767 <include name=\"**/*.stg\"/>
6768 <include name=\"**/*.st\"/>
6769 <include name=\"**/*.sti\"/>
6770 <include name=\"**/STLexer.tokens\"/>
6776 ("antlr3" ,antlr3-3.1)))
6778 `(("junit" ,java-junit)))
6780 `(("java-stringtemplate" ,java-stringtemplate-3)
6782 ("antlr3" ,antlr3-3.1)))))
6790 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
6791 "gh-pages/download/antlr-"
6795 "0sfimc9cpbgrihz4giyygc8afgpma2c93yqpwb951giriri6x66z"))
6797 (search-patches "antlr3-3_1-fix-java8-compilation.patch"))))
6799 `(#:jar-name (string-append "antlr3-" ,version ".jar")
6800 #:source-dir "src:runtime/Java/src"
6803 (modify-phases %standard-phases
6804 (add-after 'install 'bin-install
6805 (lambda* (#:key inputs outputs #:allow-other-keys)
6806 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
6807 (bin (string-append (assoc-ref outputs "out") "/bin")))
6809 (with-output-to-file (string-append bin "/antlr3")
6812 (string-append "#!" (which "sh") "\n"
6813 "java -cp " jar "/antlr3-3.1.jar:"
6815 (find-files (assoc-ref inputs "stringtemplate")
6819 (find-files (string-append
6820 (assoc-ref inputs "antlr")
6823 " org.antlr.Tool $*"))))
6824 (chmod (string-append bin "/antlr3") #o755))
6826 (add-before 'build 'generate-grammar
6828 (let ((dir "src/org/antlr/tool/"))
6829 (for-each (lambda (file)
6832 (invoke "antlr" "-o" dir (string-append dir file)))
6833 '("antlr.g" "antlr.print.g" "assign.types.g"
6834 "buildnfa.g" "define.g")))
6835 (format #t "codegen.g\n")
6836 (invoke "antlr" "-o" "src/org/antlr/codegen"
6837 "src/org/antlr/codegen/codegen.g")
6839 (add-before 'build 'fix-build-xml
6841 (substitute* "build.xml"
6842 (("<exec") "<copy todir=\"${classes.dir}\">
6843 <fileset dir=\"src\">
6844 <include name=\"**/*.stg\"/>
6845 <include name=\"**/*.st\"/>
6846 <include name=\"**/*.sti\"/>
6847 <include name=\"**/STLexer.tokens\"/>
6852 `(("antlr" ,antlr2)))
6854 `(("junit" ,java-junit)))
6856 `(("stringtemplate" ,java-stringtemplate-3)))))
6858 (define-public java-commons-cli-1.2
6859 ;; This is a bootstrap dependency for Maven2.
6861 (inherit java-commons-cli)
6865 (uri (string-append "mirror://apache/commons/cli/source/"
6866 "commons-cli-" version "-src.tar.gz"))
6869 "0rvfgzgv2pc1m091dfj3ih9ddsjjppr1f1wf0qmc3bk6b1kwv2dm"))))
6871 `(#:jar-name "commons-cli.jar"
6873 (modify-phases %standard-phases
6874 (add-before 'check 'fix-build-xml
6875 (lambda* (#:key inputs #:allow-other-keys)
6876 (substitute* "build.xml"
6877 (("dir=\"\\$\\{test.home\\}/java\"")
6878 "dir=\"${test.home}\""))
6881 `(("java-junit" ,java-junit)))))
6883 (define-public java-microemulator-cldc
6885 (name "java-microemulator-cldc")
6889 (uri (string-append "https://github.com/barteo/microemu/archive/"
6891 (string-map (lambda (c) (if (char=? c #\.) #\_ c))
6894 (file-name (string-append name "-" version ".tar.gz"))
6897 "1x1apmz38gkppxnwnygwmi12j54v4p258v8ddzn6dldkk7vak1ll"))))
6898 (build-system ant-build-system)
6900 `(#:jar-name "microemulator-cldc.jar"
6901 #:source-dir "microemu-cldc/src/main/java"
6902 #:tests? #f)); Requires even older software
6903 (home-page "https://github.com/barteo/microemu")
6904 (synopsis "J2ME CLDC emulator")
6905 (description "Microemulator is a Java 2 Micro Edition (J2ME) CLDC/MIDP
6906 Emulator. It allows to demonstrate MIDlet based applications in web browser
6907 applet and can be run as a standalone java application.")
6908 (license (list license:asl2.0
6910 license:lgpl2.1+))))
6912 (define-public java-datanucleus-javax-persistence
6914 (name "java-datanucleus-javax-persistence")
6918 (uri (string-append "https://github.com/datanucleus/"
6919 "javax.persistence/archive/javax.persistence-"
6920 version "-release.tar.gz"))
6923 "11jx0fjwgc2hhbqqgdd6m1pf2fplf9vslppygax0y1z5csnqjhpx"))))
6924 (build-system ant-build-system)
6926 `(#:jar-name "java-datanucleus-javax-persistence.jar"
6928 #:source-dir "src/main/java"
6929 #:tests? #f)); no tests
6930 (home-page "https://github.com/datanucleus/javax.persistence")
6931 (synopsis "JPA API")
6932 (description "This package contains a clean definition of JPA API intended
6933 for use with DataNucleus JPA since the JCP haven't provided an official JPA API
6934 jar. See @url{http://java.net/projects/jpa-spec/downloads} for the specification
6935 used to generate this API.")
6936 (license (list license:edl1.0 license:epl1.0))))
6938 (define-public java-osgi-cmpn
6940 (name "java-osgi-cmpn")
6944 (uri (string-append "http://central.maven.org/maven2/"
6945 "org/osgi/osgi.cmpn/" version "/osgi.cmpn-"
6946 version "-sources.jar"))
6949 "1lmb6xyrmkqdhv1kayf0514rlwq6ypvs4m44ibrck3snp8241wys"))))
6950 (build-system ant-build-system)
6952 `(#:jar-name "osgi-cmpn.jar"
6953 #:tests? #f)); no tests
6955 `(("annotation" ,java-osgi-annotation)
6956 ("core" ,java-osgi-core)
6957 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
6958 ("microemulator" ,java-microemulator-cldc)
6959 ("servlet" ,java-classpathx-servletapi)))
6960 (home-page "https://www.osgi.org")
6961 (synopsis "Compendium specification module of OSGi framework")
6963 "OSGi, for Open Services Gateway initiative framework, is a module system
6964 and service platform for the Java programming language. This package contains
6965 the compendium specification module, providing interfaces and classes for use
6966 in compiling bundles.")
6967 (license license:asl2.0)))
6969 (define-public java-osgi-service-component-annotations
6971 (name "java-osgi-service-component-annotations")
6975 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6976 "org.osgi.service.component.annotations/"
6977 version "/org.osgi.service.component.annotations-"
6978 version "-sources.jar"))
6981 "15rq9cmp4fpn74q44m4j35qsqmjf5lx3hcrk6pzvbhc08igic2f0"))))
6982 (build-system ant-build-system)
6984 `(#:jar-name "osgi-service-component-annotations.jar"
6985 #:tests? #f)); no tests
6987 `(("annotation" ,java-osgi-annotation)))
6988 (home-page "https://www.osgi.org")
6989 (synopsis "Support annotations for osgi-service-component")
6991 "OSGi, for Open Services Gateway initiative framework, is a module system
6992 and service platform for the Java programming language. This package contains
6993 the support annotations for osgi-service-component.")
6994 (license license:asl2.0)))
6996 (define-public java-osgi-dto
6998 (name "java-osgi-dto")
7002 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7003 "org.osgi.dto/" version "/org.osgi.dto-"
7004 version "-sources.jar"))
7007 "0f4bqjzadn0hwk6sd3h5gvbyfp3yci1s6r0v770cc15p0pg627yr"))))
7008 (build-system ant-build-system)
7010 `(#:jar-name "osgi-dto.jar"
7011 #:tests? #f)); no tests
7013 `(("annotation" ,java-osgi-annotation)))
7014 (home-page "https://www.osgi.org")
7015 (synopsis "Data Transfer Objects")
7017 "OSGi, for Open Services Gateway initiative framework, is a module system
7018 and service platform for the Java programming language. This package contains
7019 the Data Transfer Objects. It is easily serializable having only public fields
7020 of primitive types and their wrapper classes, Strings, and DTOs. List, Set,
7021 Map and array aggregates may also be used. The aggregates must only hold
7022 objects of the listed types or aggregates.")
7023 (license license:asl2.0)))
7025 (define-public java-osgi-resource
7027 (name "java-osgi-resource")
7031 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7032 "org.osgi.resource/"
7033 version "/org.osgi.resource-"
7034 version "-sources.jar"))
7037 "0hi0fsc5v99q22bd7lrkvpz1y0ds4w9arjldpwsrcpqvz2js7q2d"))))
7038 (build-system ant-build-system)
7040 `(#:jar-name "osgi-resource.jar"
7041 #:tests? #f)); no tests
7043 `(("annotation" ,java-osgi-annotation)
7044 ("dto" ,java-osgi-dto)))
7045 (home-page "https://www.osgi.org")
7046 (synopsis "OSGI Resource")
7048 "OSGi, for Open Services Gateway initiative framework, is a module system
7049 and service platform for the Java programming language. This package contains
7050 the definition of common types in osgi packages.")
7051 (license license:asl2.0)))
7053 (define-public java-osgi-namespace-contract
7055 (name "java-osgi-namespace-contract")
7059 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7060 "org.osgi.namespace.contract/"
7061 version "/org.osgi.namespace.contract-"
7062 version "-sources.jar"))
7065 "1iz4f2i0fvqrlq90ki9nfzcfpvy2av434ri25bglywqssx8mmp36"))))
7066 (build-system ant-build-system)
7068 `(("resource" ,java-osgi-resource)
7069 ("annotation" ,java-osgi-annotation)))
7071 `(#:jar-name "osgi-namespace-contract.jar"
7072 #:tests? #f)); no tests
7073 (home-page "https://www.osgi.org")
7074 (synopsis "Contract Capability and Requirement Namespace")
7076 "OSGi, for Open Services Gateway initiative framework, is a module system
7077 and service platform for the Java programming language. This package contains
7078 the names for the attributes and directives for a namespace with contracts.")
7079 (license license:asl2.0)))
7081 (define-public java-osgi-namespace-extender
7083 (name "java-osgi-namespace-extender")
7087 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7088 "org.osgi.namespace.extender/"
7089 version "/org.osgi.namespace.extender-"
7090 version "-sources.jar"))
7093 "0jgqiak2i05qv6j3gd33xlaifzzc0ylxxk376v2x0apfg3vvixmz"))))
7094 (build-system ant-build-system)
7096 `(("resource" ,java-osgi-resource)
7097 ("annotation" ,java-osgi-annotation)))
7099 `(#:jar-name "osgi-namespace-extendent.jar"
7100 #:tests? #f)); no tests
7101 (home-page "https://www.osgi.org")
7102 (synopsis "Extender Capability and Requirement Namespace")
7104 "OSGi, for Open Services Gateway initiative framework, is a module system
7105 and service platform for the Java programming language. This package contains
7106 the names for the attributes and directives for an extender namespace.")
7107 (license license:asl2.0)))
7109 (define-public java-osgi-namespace-service
7111 (name "java-osgi-namespace-service")
7115 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7116 "org.osgi.namespace.service/"
7117 version "/org.osgi.namespace.service-"
7118 version "-sources.jar"))
7121 "0qmw8n2449nkmm56d1znz9zhazb6ya3vsimd5bf5jg23zzhgl8c8"))))
7122 (build-system ant-build-system)
7124 `(("resource" ,java-osgi-resource)
7125 ("annotation" ,java-osgi-annotation)))
7127 `(#:jar-name "osgi-namespace-service.jar"
7128 #:tests? #f)); no tests
7129 (home-page "https://www.osgi.org")
7130 (synopsis "Service Capability and Requirement Namespace")
7132 "OSGi, for Open Services Gateway initiative framework, is a module system
7133 and service platform for the Java programming language. This package contains
7134 the names for the attributes and directives for a service namespace.")
7135 (license license:asl2.0)))
7137 (define-public java-osgi-util-function
7139 (name "java-osgi-util-function")
7143 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7144 "org.osgi.util.function/"
7145 version "/org.osgi.util.function-"
7146 version "-sources.jar"))
7149 "04l7j3hwmmj28w23m7paca0afzncs42j2mdr3liqq8kvp548sc6x"))))
7150 (build-system ant-build-system)
7152 `(#:jar-name "osgi-util-function.jar"
7153 #:tests? #f)); no tests
7155 `(("annotation" ,java-osgi-annotation)))
7156 (home-page "https://www.osgi.org")
7157 (synopsis "OSGI Util Function")
7159 "OSGi, for Open Services Gateway initiative framework, is a module system
7160 and service platform for the Java programming language. This package contains
7161 an interface for a function that accepts a single argument and produces a result.")
7162 (license license:asl2.0)))
7164 (define-public java-osgi-util-promise
7166 (name "java-osgi-util-promise")
7170 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7171 "org.osgi.util.promise/"
7172 version "/org.osgi.util.promise-"
7173 version "-sources.jar"))
7176 "0y34dwiflg1c4ahvkswpf9z02xph2sr9fm04ia5493x3lshpw22c"))))
7177 (build-system ant-build-system)
7179 `(#:jar-name "osgi-util-promise.jar"
7180 #:tests? #f)); no tests
7182 `(("annotation" ,java-osgi-annotation)
7183 ("function" ,java-osgi-util-function)))
7184 (home-page "https://www.osgi.org")
7185 (synopsis "Promise of a value")
7187 "OSGi, for Open Services Gateway initiative framework, is a module system
7188 and service platform for the Java programming language. This package contains
7189 an interface and utilitary classes for promises. A Promise represents a future
7190 value. It handles the interactions for asynchronous processing.")
7191 (license license:asl2.0)))
7193 (define-public java-osgi-service-metatype-annotations
7195 (name "java-osgi-service-metatype-annotations")
7199 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7200 "org.osgi.service.metatype.annotations/"
7201 version "/org.osgi.service.metatype.annotations-"
7202 version "-sources.jar"))
7205 "12rwm3349wk80vm88rcdgs4435m4jxkpkj5mrx326skkz2c6hyw6"))))
7206 (build-system ant-build-system)
7208 `(#:jar-name "osgi-service-metatype-annotations.jar"
7209 #:tests? #f)); no tests
7211 `(("annotation" ,java-osgi-annotation)))
7212 (home-page "https://www.osgi.org")
7213 (synopsis "Support annotations for metatype")
7215 "OSGi, for Open Services Gateway initiative framework, is a module system
7216 and service platform for the Java programming language. This package contains
7217 the support annotations for metatype.")
7218 (license license:asl2.0)))
7220 (define-public java-osgi-service-repository
7222 (name "java-osgi-service-repository")
7226 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7227 "org.osgi.service.repository/"
7228 version "/org.osgi.service.repository-"
7229 version "-sources.jar"))
7232 "1k41mhg7b58pd8nsghr2qwcjrxdnf1p9spsw9v11k4257g6rl06n"))))
7233 (build-system ant-build-system)
7235 `(#:jar-name "osgi-service-repository.jar"
7236 #:tests? #f)); no tests
7238 `(("annotation" ,java-osgi-annotation)
7239 ("promise" ,java-osgi-util-promise)
7240 ("resource" ,java-osgi-resource)))
7241 (home-page "https://www.osgi.org")
7242 (synopsis "OSGI service repository")
7244 "OSGi, for Open Services Gateway initiative framework, is a module system
7245 and service platform for the Java programming language. This package contains
7246 a repository service that contains resources.")
7247 (license license:asl2.0)))
7249 (define-public java-osgi-framework
7251 (name "java-osgi-framework")
7255 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7256 "org.osgi.framework/" version "/org.osgi.framework-"
7257 version "-sources.jar"))
7260 "1lwp2zfad3rybcc6q9bwz8xsgkc92ypzy5p6x54387f1qj65m73s"))))
7261 (build-system ant-build-system)
7263 `(#:jar-name "osgi-framework.jar"
7264 #:tests? #f)); no tests
7266 `(("annotation" ,java-osgi-annotation)
7267 ("resource" ,java-osgi-resource)
7268 ("dto" ,java-osgi-dto)))
7269 (home-page "https://www.osgi.org")
7270 (synopsis "OSGi framework")
7272 "OSGi, for Open Services Gateway initiative framework, is a module system
7273 and service platform for the Java programming language.")
7274 (license license:asl2.0)))
7276 (define-public java-osgi-service-log
7278 (name "java-osgi-service-log")
7282 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7283 "org.osgi.service.log/"
7284 version "/org.osgi.service.log-"
7285 version "-sources.jar"))
7288 "1029j30dzcwializzca0j3fkhwwz08kmmsha5agw1iccscimj6r0"))))
7289 (build-system ant-build-system)
7291 `(#:jar-name "osgi-service-log.jar"
7292 #:tests? #f)); no tests
7294 `(("java-osgi-framework" ,java-osgi-framework)))
7295 (home-page "https://www.osgi.org")
7296 (synopsis "Provides methods for bundles to write messages to the log")
7298 "OSGi, for Open Services Gateway initiative framework, is a module system
7299 and service platform for the Java programming language. This package contains
7301 (license license:asl2.0)))
7303 (define-public java-osgi-service-jdbc
7305 (name "java-osgi-service-jdbc")
7309 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7310 "org.osgi.service.jdbc/"
7311 version "/org.osgi.service.jdbc-"
7312 version "-sources.jar"))
7315 "11iln5v7bk469cgb9ddkrz9sa95b3733gqgaqw9xf5g6wq652yjz"))))
7316 (build-system ant-build-system)
7318 `(#:jar-name "osgi-service-jdbc.jar"
7319 #:tests? #f)); no tests
7320 (home-page "https://www.osgi.org")
7321 (synopsis "Factory for JDBC connection factories")
7323 "OSGi, for Open Services Gateway initiative framework, is a module system
7324 and service platform for the Java programming language. This package contains
7325 a factory for JDBC connection factories. There are 3 preferred connection
7326 factories for getting JDBC connections:
7329 @item @code{javax.sql.DataSource};
7330 @item @code{javax.sql.ConnectionPoolDataSource};
7331 @item @code{javax.sql.XADataSource}.
7333 (license license:asl2.0)))
7335 (define-public java-osgi-service-resolver
7337 (name "java-osgi-service-resolver")
7341 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7342 "org.osgi.service.resolver/"
7343 version "/org.osgi.service.resolver-"
7344 version "-sources.jar"))
7347 "1dzqn1ryfi2rq4zwsgp44bmj2wlfydjg1qbxw2b0z4xdjjy55vxd"))))
7348 (build-system ant-build-system)
7350 `(#:jar-name "osgi-service-resolver.jar"
7351 #:tests? #f)); no tests
7353 `(("annotation" ,java-osgi-annotation)
7354 ("resource" ,java-osgi-resource)))
7355 (home-page "https://www.osgi.org")
7356 (synopsis "OSGI Resolver service")
7358 "OSGi, for Open Services Gateway initiative framework, is a module system
7359 and service platform for the Java programming language. This package contains
7360 a resolver service that resolves the specified resources in the context supplied
7362 (license license:asl2.0)))
7364 (define-public java-osgi-util-tracker
7366 (name "java-osgi-util-tracker")
7370 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7371 "org.osgi.util.tracker/"
7372 version "/org.osgi.util.tracker-"
7373 version "-sources.jar"))
7376 "0c4fh9vxwzsx59r8dygda0gq2gx3z5vfhc3jsphlqwf5w0h403lz"))))
7377 (build-system ant-build-system)
7379 `(#:jar-name "osgi-util-tracker.jar"
7380 #:tests? #f)); no tests
7382 `(("framework" ,java-osgi-framework)
7383 ("annotation" ,java-osgi-annotation)))
7384 (home-page "https://www.osgi.org")
7385 (synopsis "Bundle tracking")
7387 "OSGi, for Open Services Gateway initiative framework, is a module system
7388 and service platform for the Java programming language. This package contains
7389 bundle tracking utility classes.")
7390 (license license:asl2.0)))
7392 (define-public java-osgi-service-cm
7394 (name "java-osgi-service-cm")
7398 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7399 "org.osgi.service.cm/"
7400 version "/org.osgi.service.cm-"
7401 version "-sources.jar"))
7404 "1z8kap48y3xi0ggj8v6czglfnpnd94mmismgi2wbqhj1nl5fzbp6"))))
7405 (build-system ant-build-system)
7407 `(#:jar-name "osgi-service-cm.jar"
7408 #:tests? #f)); no tests
7410 `(("framework" ,java-osgi-framework)
7411 ("annotation" ,java-osgi-annotation)))
7412 (home-page "https://www.osgi.org")
7413 (synopsis "OSGI Configuration Management")
7415 "OSGi, for Open Services Gateway initiative framework, is a module system
7416 and service platform for the Java programming language. This package contains
7417 utility classes for the configuration of services.")
7418 (license license:asl2.0)))
7420 (define-public java-osgi-service-packageadmin
7422 (name "java-osgi-service-packageadmin")
7426 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7427 "org.osgi.service.packageadmin/"
7428 version "/org.osgi.service.packageadmin-"
7429 version "-sources.jar"))
7432 "041mpxzi7g36wmcily6y4ccn3jx15akpdy8gmhyb7m98x7qfvn52"))))
7433 (build-system ant-build-system)
7435 `(#:jar-name "osgi-service-packageadmin.jar"
7436 #:tests? #f)); no tests
7438 `(("framework" ,java-osgi-framework)))
7439 (home-page "https://www.osgi.org")
7440 (synopsis "OSGI Package Administration")
7442 "OSGi, for Open Services Gateway initiative framework, is a module system
7443 and service platform for the Java programming language. This package contains
7444 the packageadmin service.")
7445 (license license:asl2.0)))
7447 (define-public java-ops4j-base-lang
7449 (name "java-ops4j-base-lang")
7453 (uri (string-append "https://github.com/ops4j/org.ops4j.base/"
7454 "archive/base-" version ".tar.gz"))
7457 "18hl3lpchgpv8yh5rlk39l2gif5dlfgb8gxjmncf39pr2dprkniw"))))
7458 (build-system ant-build-system)
7460 `(#:jar-name "java-ops4j-base-lang.jar"
7461 #:source-dir "ops4j-base-lang/src/main/java"
7462 #:tests? #f; no tests
7464 (modify-phases %standard-phases
7465 (add-before 'build 'add-test-file
7467 ;; That file is required by a test in ops4j-pax-exam-core-spi
7468 (mkdir-p "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang")
7469 (with-output-to-file "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang/pom.properties"
7473 "version=" ,version "\n"
7474 "groupId=org.ops4j.base"
7475 "artifactId=ops4j-base-lang\n"))))
7477 (home-page "https://ops4j1.jira.com/wiki/spaces/base/overview")
7478 (synopsis "Utility classes and extensions to be used in OPS4J projects")
7479 (description "OPS4J stands for Open Participation Software for Java. This
7480 package contains utilities and extensions related to @code{java.lang}.")
7481 (license license:asl2.0)))
7483 (define-public java-ops4j-base-monitors
7485 (inherit java-ops4j-base-lang)
7486 (name "java-ops4j-base-monitors")
7488 `(#:jar-name "java-ops4j-base-monitors.jar"
7489 #:source-dir "ops4j-base-monitors/src/main/java"
7490 #:tests? #f)); no tests
7492 `(("lang" ,java-ops4j-base-lang)))
7493 (description "OPS4J stands for Open Participation Software for Java. This
7494 package contains utilities and extensions related to monitoring.")))
7496 (define-public java-ops4j-base-io
7498 (inherit java-ops4j-base-lang)
7499 (name "java-ops4j-base-io")
7501 `(#:jar-name "java-ops4j-base-io.jar"
7502 #:source-dir "ops4j-base-io/src/main/java"
7503 #:test-dir "ops4j-base-io/src/test"
7505 (list "**/ListerTest.java")))
7507 `(("lang" ,java-ops4j-base-monitors)
7508 ("lang" ,java-ops4j-base-lang)))
7510 `(("junit" ,java-junit)
7511 ("hamcrest" ,java-hamcrest-core)))
7512 (description "OPS4J stands for Open Participation Software for Java. This
7513 package contains utilities and extensions related to handling streams and files.")))
7515 (define-public java-ops4j-base-util
7517 (inherit java-ops4j-base-lang)
7518 (name "java-ops4j-base-util")
7520 `(#:jar-name "java-ops4j-base-util.jar"
7521 #:source-dir "ops4j-base-util/src/main/java"
7522 #:test-dir "ops4j-base-util/src/test"))
7524 `(("lang" ,java-ops4j-base-lang)))
7526 `(("junit" ,java-junit)))
7527 (description "OPS4J stands for Open Participation Software for Java. This
7528 package contains utilities and extensions related to environment, i18n and
7531 (define-public java-ops4j-base-util-property
7533 (inherit java-ops4j-base-lang)
7534 (name "java-ops4j-base-util-property")
7536 `(#:jar-name "java-ops4j-base-util-property.jar"
7537 #:source-dir "ops4j-base-util-property/src/main/java"
7538 #:tests? #f)); no tests
7540 `(("lang" ,java-ops4j-base-lang)
7541 ("util" ,java-ops4j-base-util)))
7542 (description "OPS4J stands for Open Participation Software for Java. This
7543 package contains utilities and extensions related to resolving properties from
7544 different sources.")))
7546 (define-public java-ops4j-base-store
7548 (inherit java-ops4j-base-lang)
7549 (name "java-ops4j-base-store")
7551 `(#:jar-name "java-ops4j-base-store.jar"
7552 #:source-dir "ops4j-base-store/src/main/java"
7553 #:tests? #f)); no tests
7555 `(("lang" ,java-ops4j-base-lang)
7556 ("slf4j" ,java-slf4j-api)
7557 ("io" ,java-ops4j-base-io)))
7558 (description "OPS4J stands for Open Participation Software for Java. This
7559 package contains utilities for storing and retrieving data from an
7560 @code{InputStream}.")))
7562 (define-public java-ops4j-base-spi
7564 (inherit java-ops4j-base-lang)
7565 (name "java-ops4j-base-spi")
7567 `(#:jar-name "java-ops4j-base-spi.jar"
7568 #:source-dir "ops4j-base-spi/src/main/java"
7569 #:test-dir "ops4j-base-spi/src/test"))
7571 `(("junit" ,java-junit)
7572 ("hamcrest" ,java-hamcrest-core)))
7573 (description "OPS4J stands for Open Participation Software for Java. This
7574 package contains utilities for obtaining services via the Java SE 6
7575 @code{ServiceLoader}.")))
7577 (define-public java-aqute-bnd-annotation
7579 (name "java-aqute-bnd-annotation")
7583 (uri (string-append "https://github.com/bndtools/bnd/archive/"
7584 version ".REL.tar.gz"))
7585 (file-name (string-append name "-" version ".tar.gz"))
7588 "1ggyiq0as0f6cz333a0dh98j72kmvv5pf2s47v9554yh905lfqdl"))))
7589 (build-system ant-build-system)
7591 `(#:jar-name "java-aqute-bnd-annotation.jar"
7592 #:source-dir "biz.aQute.bnd.annotation/src"
7593 #:tests? #f)); empty test dir
7594 (home-page "http://bnd.bndtools.org/")
7595 (synopsis "Tools for OSGi")
7596 (description "Bnd is a swiss army knife for OSGi, it creates manifest
7597 headers based on analyzing the class code, it verifies the project settings,
7598 it manages project dependencies, gives diffs jars, and much more.")
7599 (license license:asl2.0)))
7601 (define-public java-aqute-libg
7603 (inherit java-aqute-bnd-annotation)
7604 (name "java-aqute-libg")
7606 `(#:jar-name "java-aqute-libg.jar"
7607 ;; The build fails when source/target more recent than 1.7. This
7608 ;; is a known issue. See: https://github.com/bndtools/bnd/issues/1327
7610 ;; It is closed as won't fix. There is no way to change the source
7611 ;; so that it works on 1.8, and still works on 1.6, the upstream
7612 ;; target. It work fine on 1.7, so we use 1.7.
7613 #:make-flags (list "-Dant.build.javac.source=1.7"
7614 "-Dant.build.javac.target=1.7")
7616 (modify-phases %standard-phases
7617 (add-before 'configure 'chdir
7618 ;; Change to aQute.libg directory, so that the relative
7619 ;; paths in the tests aren't broken.
7621 (chdir "aQute.libg")
7623 (add-before 'check 'create-test-directory
7624 ;; Copy the test directory to test/java, since that's where
7625 ;; ant-build-system's default project in build.xml expects to find
7626 ;; the test classes. Leave a copy in the original place to not
7627 ;; break paths in tests.
7630 (copy-recursively "test" "src/test/java")
7633 `(("slf4j" ,java-slf4j-api)
7634 ("osgi-annot" ,java-osgi-annotation)
7635 ("java-osgi-cmpn" ,java-osgi-cmpn)
7636 ("osgi" ,java-osgi-core)))
7638 `(("hamcrest" ,java-hamcrest-core)
7639 ("java-junit" ,java-junit)))))
7641 (define java-aqute-libg-bootstrap
7643 (inherit java-aqute-libg)
7644 (name "java-aqute-libg-bootstrap")
7646 ;; Disable tests, at this stage of bootstrap we have no test frameworks.
7647 (substitute-keyword-arguments (package-arguments java-aqute-libg)
7648 ((#:tests? _ #f) #f)))
7650 `(("slf4j-bootstrap" ,java-slf4j-api-bootstrap)
7651 ,@(delete `("slf4j" ,java-slf4j-api)
7652 (package-inputs java-aqute-libg))))
7653 (native-inputs '())))
7655 (define-public java-aqute-bndlib
7657 (inherit java-aqute-bnd-annotation)
7658 (name "java-aqute-bndlib")
7660 `(#:jar-name "java-bndlib.jar"
7661 #:source-dir "biz.aQute.bndlib/src"
7662 #:tests? #f)); no tests
7664 `(("slf4j" ,java-slf4j-api)
7665 ("osgi-annot" ,java-osgi-annotation)
7666 ("java-aqute-libg" ,java-aqute-libg)
7667 ("java-aqute-bnd-annotation" ,java-aqute-bnd-annotation)
7668 ("java-osgi-service-component-annotations" ,java-osgi-service-component-annotations)
7669 ("java-osgi-service-repository" ,java-osgi-service-repository)
7670 ("java-osgi-service-log" ,java-osgi-service-log)
7671 ("java-osgi-service-metatype-annotations" ,java-osgi-service-metatype-annotations)
7672 ("java-osgi-namespace-contract" ,java-osgi-namespace-contract)
7673 ("java-osgi-namespace-extender" ,java-osgi-namespace-extender)
7674 ("java-osgi-namespace-service" ,java-osgi-namespace-service)
7675 ("promise" ,java-osgi-util-promise)
7676 ("osgi" ,java-osgi-core)))))
7678 (define java-aqute-bndlib-bootstrap
7680 (inherit java-aqute-bndlib)
7681 (name "java-aqute-bndlib-bootstrap")
7683 `(("slf4j-bootstrap" ,java-slf4j-api-bootstrap)
7684 ("java-aqute-libg-bootstrap" ,java-aqute-libg-bootstrap)
7685 ,@(delete `("slf4j" ,java-slf4j-api)
7686 (delete `("java-aqute-libg" ,java-aqute-libg)
7687 (package-inputs java-aqute-bndlib)))))))
7689 (define-public java-ops4j-pax-tinybundles
7691 (name "java-ops4j-pax-tinybundles")
7695 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.tinybundles/"
7696 "archive/tinybundles-" version ".tar.gz"))
7699 "0y0gq3pvv0iir2b885lmlwnvr724vv7vklzhhr4fs27d7mdkj871"))))
7701 `(#:jar-name "java-ops4j-pax-tinybundles.jar"
7702 #:source-dir "src/main/java"
7704 ;; Abstract base classes for other tests
7705 (list "**/BndTest.java" "**/CoreTest.java")
7707 (modify-phases %standard-phases
7708 (add-before 'check 'fix-version
7710 ;; This test has a reference to an old version of bndlib we are not
7711 ;; packaging. It uses the version referenced in pom.xml. We replace
7712 ;; it with our own version.
7713 (substitute* "src/test/java/org/ops4j/pax/tinybundles/bnd/BndTest.java"
7714 (("[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*")
7715 ,(package-version java-aqute-bndlib)))
7718 `(("lang" ,java-ops4j-base-lang)
7719 ("io" ,java-ops4j-base-io)
7720 ("store" ,java-ops4j-base-store)
7721 ("slf4j" ,java-slf4j-api)
7722 ("libg" ,java-aqute-libg)
7723 ("bndlib" ,java-aqute-bndlib)))
7725 `(("junit" ,java-junit)
7726 ("hamcrest" ,java-hamcrest-core)
7727 ("log4j" ,java-log4j-api)
7728 ("bndannotation" ,java-aqute-bnd-annotation)
7729 ("framework" ,java-osgi-framework)))
7730 (build-system ant-build-system)
7731 (home-page "https://ops4j1.jira.com/wiki/spaces/ops4j/pages/12060312/Tinybundles")
7732 (synopsis "Java APIs to create OSGi related artifacts")
7733 (description "Tinybundles is all about creating OSGi related artifacts like
7734 Bundles, Fragments and Deployment Packages with Java Api. It is very convenient
7735 to create such artifacts on-the-fly inside Tests (like in Pax Exam). On the
7736 other hand, this library can be a foundation of real end user tools that need
7737 to create those artifacts.")
7738 (license license:asl2.0)))
7740 (define-public java-ops4j-pax-exam-core
7742 (name "java-ops4j-pax-exam-core")
7746 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.exam2/"
7747 "archive/exam-reactor-" version ".tar.gz"))
7750 "08mzw8nkah3rj3vznlplnawspxhp61zgvb44ifqa1rni1cvbms2g"))))
7752 `(#:jar-name "java-ops4j-pax-exam-core.jar"
7753 #:source-dir "core/pax-exam/src/main/java"
7754 #:test-dir "core/pax-exam/src/test"))
7756 `(("slf4j" ,java-slf4j-api)
7757 ("lang" ,java-ops4j-base-lang)
7758 ("io" ,java-ops4j-base-io)
7759 ("util-property" ,java-ops4j-base-util-property)
7760 ("util-store" ,java-ops4j-base-store)
7761 ("java-osgi-core" ,java-osgi-core)))
7763 `(("junit" ,java-junit)
7764 ("hamcrest" ,java-hamcrest-core)))
7765 (build-system ant-build-system)
7766 (home-page "https://ops4j1.jira.com/wiki/spaces/PAXEXAM4/overview")
7767 (synopsis "In-Container Testing for OSGi, Java EE and CDI")
7768 (description "Pax Exam creates OSGi bundles for testing purposes. It lets
7769 the user take control of the OSGi framework, the test framework (e.g. JUnit) and
7770 the system under test at the same time.")
7771 (license license:asl2.0)))
7773 (define-public java-ops4j-pax-exam-core-spi
7775 (inherit java-ops4j-pax-exam-core)
7776 (name "java-ops4j-pax-exam-core-spi")
7778 `(#:jar-name "java-ops4j-pax-exam-spi.jar"
7779 #:source-dir "src/main/java"
7782 ;; Abstract base class, not a test
7783 "**/BaseStagedReactorTest.java"
7784 ;; Depends on org.mortbay.jetty.testwars:test-war-dump
7785 "**/WarBuilderTest.java")
7787 (modify-phases %standard-phases
7788 (add-before 'configure 'chdir
7790 ;; Tests assume we are in this directory
7791 (chdir "core/pax-exam-spi")
7793 (add-before 'check 'fix-tests
7795 ;; One test checks that this file is present.
7796 (mkdir-p "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi")
7797 (with-output-to-file
7798 "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi/pom.properties"
7801 (string-append "artifactId = pax-exam-spi\n"
7802 "version = " ,(package-version java-ops4j-pax-exam-core-spi)))))
7803 ;; Maven puts compilation results in the target directory, while we
7804 ;; put them in the build directory.
7805 (substitute* '("src/test/java/org/ops4j/pax/exam/spi/war/WarBuilderTest.java"
7806 "src/test/java/org/ops4j/pax/exam/spi/war/WarTestProbeBuilderTest.java"
7807 "src/test/java/org/ops4j/pax/exam/spi/war/ZipBuilderTest.java")
7808 (("target") "build"))
7809 ;; One test is expected to fail, but it doesn't throw the expected exception
7810 (substitute* "src/test/java/org/ops4j/pax/exam/spi/reactors/BaseStagedReactorTest.java"
7811 (("AssertionError") "IllegalArgumentException"))
7814 `(("java-ops4j-pax-exam-core" ,java-ops4j-pax-exam-core)
7815 ("lang" ,java-ops4j-base-lang)
7816 ("monitors" ,java-ops4j-base-monitors)
7817 ("store" ,java-ops4j-base-store)
7818 ("io" ,java-ops4j-base-io)
7819 ("spi" ,java-ops4j-base-spi)
7820 ("osgi" ,java-osgi-core)
7821 ("slf4j" ,java-slf4j-api)
7822 ("tinybundles" ,java-ops4j-pax-tinybundles)))
7824 `(("mockito" ,java-mockito-1)
7825 ("junit" ,java-junit)
7826 ("hamcrest" ,java-hamcrest-core)
7827 ("cglib" ,java-cglib)
7828 ("objenesis" ,java-objenesis)
7829 ("asm" ,java-asm)))))
7831 (define-public java-ops4j-pax-exam-core-junit
7833 (inherit java-ops4j-pax-exam-core)
7834 (name "java-ops4j-pax-exam-core-junit")
7836 `(#:jar-name "ops4j-pax-exam-core-junit.jar"
7837 #:source-dir "drivers/pax-exam-junit4/src/main/java"
7838 #:tests? #f)); no tests
7840 `(("junit" ,java-junit)
7841 ("slf4j" ,java-slf4j-api)
7842 ("core" ,java-ops4j-pax-exam-core)
7843 ("spi" ,java-ops4j-pax-exam-core-spi)))
7844 (native-inputs '())))
7846 (define-public java-fasterxml-jackson-annotations
7848 (name "java-fasterxml-jackson-annotations")
7852 (uri (string-append "https://github.com/FasterXML/"
7853 "jackson-annotations/archive/"
7854 "jackson-annotations-" version ".tar.gz"))
7857 "0mr95xd0da6a4g95zvrl1ryk5n5zv2rc696w3xnsr5hxk2gicfc4"))))
7858 (build-system ant-build-system)
7860 `(#:jar-name "jackson-annotations.jar"
7861 #:source-dir "src/main/java"
7862 #:test-dir "src/test"))
7864 `(("junit" ,java-junit)))
7865 (home-page "https://github.com/FasterXML/jackson-annotations")
7866 (synopsis "General purpose annotations for the Jackson Data Processor")
7867 (description "This package contains general purpose annotations for the
7868 Jackson Data Processor, used on value and handler types. The only annotations
7869 not included are ones that require dependency to the Databind package.")
7870 (license license:asl2.0)))
7872 (define-public java-fasterxml-jackson-core
7874 (name "java-fasterxml-jackson-core")
7878 (uri (string-append "https://github.com/FasterXML/"
7879 "jackson-core/archive/"
7880 "jackson-core-" version ".tar.gz"))
7883 "159hsnk17jr1gyzkf01cxvsn45srnk37g949r7364qlsr527gjgd"))))
7884 (build-system ant-build-system)
7886 `(#:jar-name "jackson-core.jar"
7887 #:source-dir "src/main/java"
7888 #:test-dir "src/test"
7891 ;; Expected failure. pom.xml excludes these
7893 ;; Base classes that have no constructor for junit
7895 "**/ConcurrencyReadTest.java"
7896 "**/ManualCharAccessTest.java"
7897 "**/ManualCharAccessTest.java"
7898 "**/TrailingCommasTest.java"
7899 "**/AsyncMissingValuesInObjectTest.java"
7900 "**/AsyncMissingValuesInArrayTest.java")
7902 (modify-phases %standard-phases
7903 (add-before 'configure 'generate-PackageVersion.java
7905 (let* ((out "src/main/java/com/fasterxml/jackson/core/json/PackageVersion.java")
7906 (in (string-append out ".in")))
7909 (("@package@") "com.fasterxml.jackson.core.json")
7910 (("@projectversion@") ,version)
7911 (("@projectgroupid@") "com.fasterxml.jackson.core")
7912 (("@projectartifactid@") "jackson-core")))
7914 (add-before 'build 'copy-resources
7916 (copy-recursively "src/main/resources"
7919 (add-before 'check 'copy-test-resources
7921 (copy-recursively "src/test/resources"
7922 "build/test-classes")
7925 `(("junit" ,java-junit)
7926 ("hamcrest" ,java-hamcrest-core)))
7927 (home-page "https://github.com/FasterXML/jackson-core")
7930 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
7932 (define-public java-fasterxml-jackson-databind
7934 (name "java-fasterxml-jackson-databind")
7938 (uri (string-append "https://github.com/FasterXML/"
7939 "jackson-databind/archive/"
7940 "jackson-databind-" version ".tar.gz"))
7943 "1zd2cw4z6kdkbx8za96xh9pyicv2a2l7y0rkcx2fqd8hv6d47s08"))))
7944 (build-system ant-build-system)
7946 `(#:jar-name "jackson-databind.jar"
7947 #:source-dir "src/main/java"
7948 #:tests? #f; requires javax.measures for which I can't find a free implementation
7950 (modify-phases %standard-phases
7951 (add-before 'configure 'generate-PackageVersion.java
7953 (let* ((out "src/main/java/com/fasterxml/jackson/databind/cfg/PackageVersion.java")
7954 (in (string-append out ".in")))
7957 (("@package@") "com.fasterxml.jackson.databind.cfg")
7958 (("@projectversion@") ,version)
7959 (("@projectgroupid@") "com.fasterxml.jackson.databind")
7960 (("@projectartifactid@") "jackson-databind")))
7962 (add-before 'build 'copy-resources
7964 (copy-recursively "src/main/resources" "build/classes")
7967 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
7968 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)))
7969 (home-page "https://github.com/FasterXML/jackson-databind")
7970 (synopsis "Data-binding functionality and tree-model for the Jackson Data Processor")
7971 (description "This package contains the general-purpose data-binding
7972 functionality and tree-model for Jackson Data Processor. It builds on core
7973 streaming parser/generator package, and uses Jackson Annotations for
7975 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
7977 (define-public java-fasterxml-jackson-modules-base-jaxb
7979 (name "java-fasterxml-jackson-modules-base-jaxb")
7983 (uri (string-append "https://github.com/FasterXML/"
7984 "jackson-modules-base/archive/"
7985 "jackson-modules-base-" version ".tar.gz"))
7988 "1wws95xi8sppp6b0k2vvjdjyynl20r1a4dwrhai08lzlria6blp5"))))
7989 (build-system ant-build-system)
7991 `(#:jar-name "jackson-modules-base-jaxb.jar"
7992 #:source-dir "jaxb/src/main/java"
7993 #:test-dir "jaxb/src/test"
7995 ;; Base class for tests
7996 (list "**/BaseJaxbTest.java")
7998 (modify-phases %standard-phases
7999 (add-before 'configure 'generate-PackageVersion.java
8001 (let* ((out (string-append "jaxb/src/main/java/com/fasterxml/"
8002 "jackson/module/jaxb/PackageVersion.java"))
8003 (in (string-append out ".in")))
8006 (("@package@") "com.fasterxml.jackson.module.jaxb")
8007 (("@projectversion@") ,version)
8008 (("@projectgroupid@") "com.fasterxml.jackson.module.jaxb")
8009 (("@projectartifactid@") "jackson-module-jaxb")))
8011 (add-before 'build 'copy-resources
8013 (copy-recursively "jaxb/src/main/resources" "build/classes")
8016 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
8017 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
8018 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)))
8020 `(("java-junit" ,java-junit)))
8021 (home-page "https://github.com/FasterXML/jackson-modules-base")
8022 (synopsis "Jaxb annotations jackson module")
8023 (description "This package is the jaxb annotations module for jackson.")
8024 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
8026 (define-public java-fasterxml-jackson-modules-base-mrbean
8028 (name "java-fasterxml-jackson-modules-base-mrbean")
8032 (uri (string-append "https://github.com/FasterXML/"
8033 "jackson-modules-base/archive/"
8034 "jackson-modules-base-" version ".tar.gz"))
8037 "1wws95xi8sppp6b0k2vvjdjyynl20r1a4dwrhai08lzlria6blp5"))))
8038 (build-system ant-build-system)
8040 `(#:jar-name "jackson-modules-base-mrbean.jar"
8041 #:source-dir "mrbean/src/main/java"
8042 #:test-dir "mrbean/src/test"
8044 ;; Base class for tests
8045 (list "**/BaseTest.java")
8047 (modify-phases %standard-phases
8048 (add-before 'configure 'generate-PackageVersion.java
8050 (let* ((out (string-append "mrbean/src/main/java/com/fasterxml/"
8051 "jackson/module/mrbean/PackageVersion.java"))
8052 (in (string-append out ".in")))
8055 (("@package@") "com.fasterxml.jackson.module.mrbean")
8056 (("@projectversion@") ,version)
8057 (("@projectgroupid@") "com.fasterxml.jackson.module.mrbean")
8058 (("@projectartifactid@") "jackson-module-mrbean")))
8061 `(("java-asm" ,java-asm)
8062 ("java-fasterxml-jackson-annotations"
8063 ,java-fasterxml-jackson-annotations)
8064 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
8065 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)))
8067 `(("java-junit" ,java-junit)))
8068 (home-page "https://github.com/FasterXML/jackson-modules-base")
8069 (synopsis "POJO type materialization for Java")
8070 (description "This package implements POJO type materialization.
8071 Databinders can construct implementation classes for Java interfaces as part
8072 of deserialization.")
8073 (license license:asl2.0)))
8075 (define-public java-snakeyaml
8077 (name "java-snakeyaml")
8081 (uri (string-append "https://bitbucket.org/asomov/snakeyaml/get/v"
8083 (file-name (string-append name "-" version ".tar.gz"))
8086 "0rf5ha6w0waz50jz2479jsrbgmd0dnx0gs337m126j5z7zlmg7mg"))))
8087 (build-system ant-build-system)
8089 `(#:jar-name "java-snakeyaml.jar"
8090 #:source-dir "src/main/java"
8091 ;; Tests require velocity, a cyclic dependency, and
8092 ;; java-spring-framework-context which is not packaged.
8094 (home-page "https://bitbucket.org/asomov/snakeyaml")
8095 (synopsis "YAML processor")
8096 (description "SnakeYAML is a YAML processor for the Java Virtual Machine.")
8097 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
8099 (define-public java-fasterxml-jackson-dataformat-yaml
8101 (name "java-fasterxml-jackson-dataformat-yaml")
8105 (uri (string-append "https://github.com/FasterXML/"
8106 "jackson-dataformats-text/archive/"
8107 "jackson-dataformats-text-" version ".tar.gz"))
8110 "1hikl06khaxbg439avf442qifcadap8w0lx13f0nnhp2vh3dkbz7"))))
8111 (build-system ant-build-system)
8113 `(#:jar-name "jackson-dataformat-yaml.jar"
8114 #:source-dir "yaml/src/main/java"
8115 #:test-dir "yaml/src/test"
8116 #:test-exclude (list "**/failing/**.java")
8118 (modify-phases %standard-phases
8119 (add-before 'configure 'generate-PackageVersion.java
8121 (let* ((out "yaml/src/main/java/com/fasterxml/jackson/dataformat/yaml/PackageVersion.java")
8122 (in (string-append out ".in")))
8125 (("@package@") "com.fasterxml.jackson.dataformat.yaml")
8126 (("@projectversion@") ,version)
8127 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.yaml")
8128 (("@projectartifactid@") "jackson-dataformat-yaml")))
8131 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
8132 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
8133 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)
8134 ("java-snakeyaml" ,java-snakeyaml)))
8136 `(("junit" ,java-junit)
8137 ("hamcrest" ,java-hamcrest-core)
8138 ("java-ops4j-pax-exam-core-spi" ,java-ops4j-pax-exam-core-spi)
8139 ("java-ops4j-pax-exam-core-junit" ,java-ops4j-pax-exam-core-junit)
8140 ("java-ops4j-pax-exam" ,java-ops4j-pax-exam-core)))
8141 (home-page "https://github.com/FasterXML/jackson-dataformats-text")
8142 (synopsis "Yaml backend for Jackson")
8143 (description "Dataformat backends are used to support format alternatives
8144 to JSON, supported by default. This is done by sub-classing Jackson core
8146 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
8148 (define-public java-stax2-api
8150 (name "java-stax2-api")
8154 (uri (string-append "https://github.com/FasterXML/stax2-api/archive/"
8155 "stax2-api-" version ".tar.gz"))
8158 "1amc1si0l0hyyw2sawmnzy4hkna3z6fp195y4nm5m9wb9ld5awkq"))))
8159 (build-system ant-build-system)
8161 `(#:jar-name "java-stax2-api.jar"
8162 #:source-dir "src/main/java"
8163 #:tests? #f)); no tests
8164 (home-page "https://github.com/FasterXML/stax2-api")
8165 (synopsis "Stax2 API")
8166 (description "Stax2 API is an extension to basic Stax 1.0 API that adds
8167 significant new functionalities, such as full-featured bi-direction validation
8168 interface and high-performance Typed Access API.")
8169 (license license:bsd-2)))
8171 (define-public java-woodstox-core
8173 (name "java-woodstox-core")
8177 (uri (string-append "https://github.com/FasterXML/woodstox/archive/"
8178 "woodstox-core-" version ".tar.gz"))
8181 "1i7pdgb8jbw6gdy5kmm0l6rz109n2ns92pqalpyp24vb8vlvdfd4"))))
8182 (build-system ant-build-system)
8184 `(#:jar-name "woodstox.jar"
8186 (list "**/Base*.java" "failing/**")
8188 (modify-phases %standard-phases
8189 (add-before 'build 'remove-msv-dep
8191 ;; we don't need osgi, and it depends on msv
8192 (delete-file-recursively "src/main/java/com/ctc/wstx/osgi")
8193 ;; msv's latest release is from 2011 and we don't need it
8194 (delete-file-recursively "src/main/java/com/ctc/wstx/msv")
8195 (delete-file-recursively "src/test/java/wstxtest/osgi")
8196 (delete-file-recursively "src/test/java/wstxtest/msv")
8198 (add-before 'build 'copy-resources
8200 (copy-recursively "src/main/resources" "build/classes")
8203 `(("stax2" ,java-stax2-api)))
8205 `(("junit" ,java-junit)))
8206 (home-page "https://github.com/FasterXML/woodstox")
8207 (synopsis "Stax XML API implementation")
8208 (description "Woodstox is a stax XML API implementation.")
8209 (license license:asl2.0)))
8211 (define-public java-fasterxml-jackson-dataformat-xml
8213 (name "java-fasterxml-jackson-dataformat-xml")
8217 (uri (string-append "https://github.com/FasterXML/"
8218 "jackson-dataformat-xml/archive/"
8219 "jackson-dataformat-xml-" version ".tar.gz"))
8222 "111fkkl90w31jbf30kgj82qdcxlw4sxppki7i198liw0ck1jcavq"))))
8223 (build-system ant-build-system)
8225 `(#:jar-name "jackson-dataformat-xml.jar"
8226 #:source-dir "src/main/java"
8228 (list "**/failing/**")
8230 (modify-phases %standard-phases
8231 (add-before 'configure 'generate-PackageVersion.java
8233 (let* ((out "src/main/java/com/fasterxml/jackson/dataformat/xml/PackageVersion.java")
8234 (in (string-append out ".in")))
8238 (("@package@") "com.fasterxml.jackson.dataformat.xml")
8239 (("@projectversion@") ,version)
8240 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.xml")
8241 (("@projectartifactid@") "jackson-dataformat-xml")))
8243 (add-before 'build 'copy-resources
8245 (copy-recursively "src/main/resources" "build/classes")
8248 `(("jackson-annotations" ,java-fasterxml-jackson-annotations)
8249 ("jackson-core" ,java-fasterxml-jackson-core)
8250 ("jackson-modules-base-jaxb" ,java-fasterxml-jackson-modules-base-jaxb)
8251 ("jackson-databind" ,java-fasterxml-jackson-databind)
8252 ("stax2-api" ,java-stax2-api)
8253 ("woodstox" ,java-woodstox-core)))
8255 `(("junit" ,java-junit)
8256 ("hamcrest" ,java-hamcrest-core)))
8257 (home-page "https://github.com/FasterXML/jackson-dataformat-xml")
8258 (synopsis "Read and write XML")
8259 (description "This package contains Jackson extension component for reading
8260 and writing XML encoded data.
8262 Further, the goal is to emulate how JAXB data-binding works with \"Code-first\"
8263 approach (that is, no support is added for \"Schema-first\" approach). Support
8264 for JAXB annotations is provided by JAXB annotation module; this module
8265 provides low-level abstractions (@code{JsonParser}, @code{JsonGenerator},
8266 @code{JsonFactory}) as well as small number of higher level overrides needed to
8267 make data-binding work.")
8268 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
8270 (define-public java-hdrhistogram
8272 (name "java-hdrhistogram")
8276 (uri (string-append "https://github.com/HdrHistogram/HdrHistogram/"
8277 "archive/HdrHistogram-" version ".tar.gz"))
8280 "1sicbmc3sr42nw93qbkb26q9rn33ag33k6k77phjc3j5h5gjffqv"))))
8281 (build-system ant-build-system)
8283 `(#:jar-name "java-hdrhistogram.jar"
8284 #:source-dir "src/main/java"
8286 (modify-phases %standard-phases
8287 (add-before 'configure 'set-version
8289 (let* ((version-java "src/main/java/org/HdrHistogram/Version.java")
8290 (template (string-append version-java ".template")))
8291 (copy-file template version-java)
8292 (substitute* version-java
8293 (("\\$VERSION\\$") ,version)
8294 (("\\$BUILD_TIME\\$") "0"))
8297 `(("junit" ,java-junit)
8298 ("hamcrest" ,java-hamcrest-core)))
8299 (home-page "https://hdrhistogram.github.io/HdrHistogram")
8300 (synopsis "High dynamic range histogram")
8301 (description "Hdrhistogram allows to create histograms that support
8302 recording and analyzing sampled data value counts across a configurable integer
8303 value range with configurable value precision within the range. Value precision
8304 is expressed as the number of significant digits in the value recording, and
8305 provides control over value quantization behavior across the value range and
8306 the subsequent value resolution at any given level.")
8307 (license license:public-domain)))
8309 (define-public java-cofoja
8311 (name "java-cofoja")
8316 (url "https://github.com/nhatminhle/cofoja.git")
8317 (commit (string-append "v" version))))
8318 (file-name (string-append "java-cofoja-" version "-checkout"))
8321 "0p7sz8y5xgpi5rx1qwn6587fkd52qr3ha3ybh14gqcyxhikl525w"))))
8322 (build-system ant-build-system)
8324 `(#:build-target "dist"
8325 #:test-target "test"
8328 (list "-Ddist.dir=dist")
8329 #:modules ((guix build ant-build-system)
8330 (guix build java-utils)
8335 (modify-phases %standard-phases
8336 ;; The bulid system ignores the class path the ant-build-system sets
8337 ;; up and instead expects to find all dependencies in the "lib"
8339 (add-after 'unpack 'create-libdir
8340 (lambda* (#:key inputs #:allow-other-keys)
8344 (let ((target (string-append "lib/" (basename file))))
8345 (unless (file-exists? target)
8346 (symlink file target))))
8347 (append-map (match-lambda
8349 (find-files dir "\\.jar$")))
8352 (replace 'install (install-jars "dist")))))
8354 `(("java-asm" ,java-asm)))
8356 `(("java-junit" ,java-junit)))
8357 (home-page "https://github.com/nhatminhle/cofoja")
8358 (synopsis "Contracts for Java")
8359 (description "Contracts for Java, or Cofoja for short, is a contract
8360 programming framework and test tool for Java, which uses annotation processing
8361 and bytecode instrumentation to provide run-time checking. (In particular,
8362 this is not a static analysis tool.)")
8363 (license license:lgpl3+)))
8365 (define-public java-aopalliance
8367 (name "java-aopalliance")
8371 ;; Note: this git repository is not official, but contains the
8372 ;; source code that is in the CVS repository. Downloading the
8373 ;; tarball from sourceforge is undeterministic, and the cvs download
8376 (url "https://github.com/hoverruan/aopalliance")
8377 (commit "0d7757ae204e5876f69431421fe9bc2a4f01e8a0")))
8378 (file-name (string-append name "-" version))
8381 "0rsg2b0v3hxlq2yk1i3m2gw3xwq689j3cwx9wbxvqfpdcjbca0qr"))))
8382 (build-system ant-build-system)
8384 `(#:jar-name "java-aopalliance.jar"
8386 #:tests? #f; no tests
8387 #:source-dir "aopalliance/src/main"))
8388 (home-page "http://aopalliance.sourceforge.net")
8389 (synopsis "Aspect-Oriented Programming")
8390 (description "The AOP Alliance project is a joint project between several
8391 software engineering people who are interested in Aspect-Oriented Programming
8393 (license license:public-domain)))
8395 (define-public java-javax-inject
8397 (name "java-javax-inject")
8401 (uri (string-append "https://github.com/javax-inject/javax-inject/"
8402 "archive/javax.inject-" version ".tar.gz"))
8405 "1ydrlvh2r7vr1g7lhjwy3w2dggpj9h6pix1lakkkgdywb365n6g0"))))
8406 (build-system ant-build-system)
8408 `(#:jar-name "java-javax-inject.jar"
8410 #:tests? #f)); no tests
8411 (home-page "http://github.com/javax-inject/javax-inject")
8412 (synopsis "JSR-330: Dependency Injection for Java")
8413 (description "This package specifies a means for obtaining objects in such
8414 a way as to maximize reusability, testability and maintainability compared to
8415 traditional approaches such as constructors, factories, and service locators
8416 (e.g., JNDI). This process, known as dependency injection, is beneficial to
8417 most nontrivial applications.
8419 Many types depend on other types. For example, a @var{Stopwatch} might depend
8420 on a @var{TimeSource}. The types on which a type depends are known as its
8421 dependencies. The process of finding an instance of a dependency to use at run
8422 time is known as resolving the dependency. If no such instance can be found,
8423 the dependency is said to be unsatisfied, and the application is broken.")
8424 (license license:asl2.0)))
8426 (define-public java-guice
8432 (uri (string-append "https://github.com/google/guice/archive/"
8434 (file-name (string-append name "-" version ".tar.gz"))
8435 (modules '((guix build utils)))
8438 (for-each delete-file (find-files "." ".*.jar"))))
8441 "0dwmqjzlavb144ywqqglj3h68hqszkff8ai0a42hyb5il0qh4rbp"))))
8442 (build-system ant-build-system)
8444 `(#:jar-name "java-guice.jar"
8446 #:tests? #f; FIXME: tests are not in a java sub directory
8447 #:source-dir "core/src"))
8449 `(("guava" ,java-guava)
8450 ("java-cglib" ,java-cglib)
8451 ("java-aopalliance" ,java-aopalliance)
8452 ("java-javax-inject" ,java-javax-inject)
8453 ("java-asm" ,java-asm)))
8454 (home-page "https://github.com/google/guice")
8455 (synopsis "Lightweight dependency injection framework")
8456 (description "Guice is a lightweight dependency injection framework fo
8458 (license license:asl2.0)))
8460 (define-public java-guice-servlet
8462 (inherit java-guice)
8463 (name "java-guice-servlet")
8465 `(#:jar-name "guice-servlet.jar"
8466 #:source-dir "extensions/servlet/src/"
8468 #:tests? #f)); FIXME: not in a java subdir
8470 `(("guice" ,java-guice)
8471 ("servlet" ,java-classpathx-servletapi)
8472 ,@(package-inputs java-guice)))))
8474 (define-public java-assertj
8476 (name "java-assertj")
8480 (uri (string-append "https://github.com/joel-costigliola/"
8481 "assertj-core/archive/"
8482 "assertj-core-" version ".tar.gz"))
8485 "1kf124fxskf548rklkg86294w2x6ajqrff94rrhyqns31danqkfz"))))
8486 (build-system ant-build-system)
8488 `(#:jar-name "java-assertj.jar"
8490 #:source-dir "src/main/java"
8491 #:tests? #f)); depends on tng-junit which depends on assertj
8493 `(("cglib" ,java-cglib)
8494 ("junit" ,java-junit)
8495 ("hamcrest" ,java-hamcrest-core)))
8497 `(("mockito" ,java-mockito-1)))
8498 (home-page "https://joel-costigliola.github.io/assertj/index.html")
8499 (synopsis "Fluent assertions for java")
8500 (description "AssertJ core is a Java library that provides a fluent
8501 interface for writing assertions. Its main goal is to improve test code
8502 readability and make maintenance of tests easier.")
8503 (license license:asl2.0)))
8505 (define-public java-jboss-javassist
8507 (name "java-jboss-javassist")
8511 (uri (string-append "https://github.com/jboss-javassist/javassist/"
8513 (string-map (lambda (x) (if (eq? x #\.) #\_ x)) version)
8517 "10lpcr3sbf7y6fq6fc2h2ik7rqrivwcy4747bg0kxhwszil3cfmf"))))
8518 (build-system ant-build-system)
8520 `(#:jar-name "java-jboss-javassist.jar"
8522 #:source-dir "src/main"
8523 #:tests? #f; FIXME: requires junit-awtui and junit-swingui from junit3
8525 (modify-phases %standard-phases
8526 (add-before 'configure 'remove-binary
8528 (delete-file "javassist.jar")
8531 `(("junit" ,java-junit)))
8532 (home-page "https://github.com/jboss-javassist/javassist")
8533 (synopsis "Java bytecode engineering toolkit")
8534 (description "Javassist (JAVA programming ASSISTant) makes Java bytecode
8535 manipulation simple. It is a class library for editing bytecodes in Java; it
8536 enables Java programs to define a new class at runtime and to modify a class
8537 file when the JVM loads it.")
8538 (license (list license:gpl2 license:cddl1.0)))); either gpl2 only or cddl.
8540 (define-public java-jcommander
8542 (name "java-jcommander")
8546 (uri (string-append "https://github.com/cbeust/jcommander/archive/"
8548 (file-name (string-append name "-" version ".tar.gz"))
8551 "1f5k2ckay6qjc3d3w3d7bc0p3cx3c7n6p6zxvw1kibqdr0q98wlx"))))
8552 (build-system ant-build-system)
8554 `(#:jar-name "java-jcommander.jar"
8556 #:tests? #f; requires testng which depends on jcommander
8557 #:source-dir "src/main/java"))
8558 (home-page "http://jcommander.org")
8559 (synopsis "Command line parameters parser")
8560 (description "JCommander is a very small Java framework that makes it
8561 trivial to parse command line parameters. Parameters are declared with
8563 (license license:asl2.0)))
8565 (define-public java-bsh
8571 (uri (string-append "https://github.com/beanshell/beanshell/archive/"
8573 (file-name (string-append name "-" version ".tar.gz"))
8576 "1bawkxk6jyc75hxvzkpz689h73cn3f222m0ar3nvb0dal2b85kfv"))))
8577 (build-system ant-build-system)
8579 `(#:build-target "jarall"
8580 #:test-target "junit-tests-all"
8582 (modify-phases %standard-phases
8584 (lambda* (#:key outputs #:allow-other-keys)
8585 (let ((share (string-append (assoc-ref outputs "out") "/share/java")))
8587 (copy-file "dist/bsh-2.0b6.jar" (string-append share "/bsh-2.0b6.jar"))
8589 (home-page "http://beanshell.org/")
8590 (synopsis "Lightweight Scripting for Java")
8591 (description "BeanShell is a small, free, embeddable Java source
8592 interpreter with object scripting language features, written in Java.
8593 BeanShell dynamically executes standard Java syntax and extends it with common
8594 scripting conveniences such as loose types, commands, and method closures like
8595 those in Perl and JavaScript.")
8596 (license license:asl2.0)))
8598 (define-public java-fest-util
8600 (name "java-fest-util")
8604 (uri (string-append "https://github.com/alexruiz/fest-util/"
8605 "archive/fest-util-" version ".tar.gz"))
8608 "05g6hljz5mdaakk8d7g32klbhz9bdwp3qlj6rdaggdidxs3x1sb8"))))
8609 (build-system ant-build-system)
8611 `(#:jar-name "java-fest-util.jar"
8612 #:source-dir "src/main/java"))
8614 `(("junit" ,java-junit)
8615 ("hamcrest" ,java-hamcrest-core)))
8616 (home-page "https://github.com/alexruiz/fest-util")
8617 (synopsis "FEST common utilities")
8618 (description "Common utilities used in all FEST module.")
8619 (license license:asl2.0)))
8621 (define-public java-fest-test
8623 (name "java-fest-test")
8627 (uri (string-append "https://github.com/alexruiz/fest-test/"
8628 "archive/fest-test-" version ".tar.gz"))
8631 "1rxfbw6l9vc65iy1x3fb617qc6y4w2k430pgf1mfbxfdlxbm0f7g"))))
8632 (build-system ant-build-system)
8634 `(#:jar-name "java-fest-test.jar"
8635 #:source-dir "src/main/java"
8636 #:tests? #f)); no tests
8638 `(("junit" ,java-junit)))
8639 (home-page "https://github.com/alexruiz/fest-test")
8640 (synopsis "Common FEST testing infrastructure")
8641 (description "Fest-test contains the common FEST testing infrastructure.")
8642 (license license:asl2.0)))
8644 (define-public java-fest-assert
8646 (name "java-fest-assert")
8650 (uri (string-append "https://github.com/alexruiz/fest-assert-2.x/"
8651 "archive/fest-assert-core-" version ".tar.gz"))
8654 "1bi0iqavikzww6rxvz5jyg7y6bflv95s6ibryxx0xfcxrrw6i5lw"))))
8655 (build-system ant-build-system)
8657 `(#:jar-name "java-fest-assert.jar"
8658 #:source-dir "src/main/java"
8663 ;; Unable to set MockitoNamingPolicy on cglib generator which creates FastClasses
8664 "**/MessageFormatter_format_Test.java"
8665 "**/internal/*/*_assert*_Test.java")))
8667 `(("java-fest-util" ,java-fest-util)))
8669 `(("java-junit" ,java-junit)
8670 ("java-fest-test" ,java-fest-test)
8671 ("java-hamcrest-core" ,java-hamcrest-core)
8672 ("java-mockito" ,java-mockito-1)
8673 ("java-cglib" ,java-cglib)
8674 ("java-objenesis" ,java-objenesis)
8675 ("java-asm" ,java-asm)))
8676 (home-page "https://github.com/alexruiz/fest-assert-2.x")
8677 (synopsis "FEST fluent assertions")
8678 (description "FEST-Assert provides a fluent interface for assertions.")
8679 (license license:asl2.0)))
8681 (define-public java-testng
8683 (name "java-testng")
8688 (url "https://github.com/cbeust/testng.git")
8690 (file-name (string-append name "-" version "-checkout"))
8693 "0y6vq30i5g276kw0v2bhbvci22ijg7ax49ap2611yqlhbs4d6dqv"))))
8694 (build-system ant-build-system)
8696 `(#:jdk ,icedtea-8; java.util.function
8697 #:jar-name "java-testng.jar"
8698 #:source-dir "src/main/java"
8700 (modify-phases %standard-phases
8701 ;; FIXME: I don't know why these tests fail
8702 (add-after 'unpack 'delete-failing-tests
8704 (substitute* "src/test/resources/testng.xml"
8705 (("<class name=\"test.configuration.github1625.TestRunnerIssue1625\"/>") "")
8706 (("<class name=\"test.serviceloader.ServiceLoaderTest\" />") ""))
8708 ;; We don't have groovy
8709 (add-after 'unpack 'delete-groovy-tests
8711 (delete-file-recursively "src/test/java/test/dependent/issue1648/")
8712 (substitute* "src/test/resources/testng.xml"
8713 (("<class name=\"test.dependent.issue1648.TestRunner\"/>") ""))
8715 (add-before 'build 'copy-resources
8717 (copy-recursively "src/main/resources" "build/classes")
8719 (add-before 'check 'copy-test-resources
8721 (copy-recursively "src/test/resources" "build/test-classes")
8725 (invoke "ant" "compile-tests")
8726 ;; we don't have groovy
8727 (substitute* "src/test/resources/testng.xml"
8728 (("<class name=\"test.groovy.GroovyTest\" />") ""))
8729 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
8731 ":build/test-classes")
8732 "-Dtest.resources.dir=src/test/resources"
8733 "org.testng.TestNG" "src/test/resources/testng.xml"))))))
8735 `(("junit" ,java-junit)
8736 ("java-jsr305" ,java-jsr305)
8737 ("java-bsh" ,java-bsh)
8738 ("java-jcommander" ,java-jcommander)
8739 ("java-guice" ,java-guice)
8740 ("snakeyaml" ,java-snakeyaml)))
8742 `(("guava" ,java-guava)
8743 ("java-javax-inject" ,java-javax-inject)
8744 ("java-hamcrest" ,java-hamcrest-all)
8745 ("java-assertj" ,java-assertj)
8746 ("java-mockito" ,java-mockito-1)
8747 ("cglib" ,java-cglib)
8749 ("aopalliance" ,java-aopalliance)))
8750 (home-page "http://testng.org")
8751 (synopsis "Testing framework")
8752 (description "TestNG is a testing framework inspired from JUnit and NUnit
8753 but introducing some new functionalities that make it more powerful and easier
8755 (license license:asl2.0)))
8757 (define-public java-jnacl
8758 (let ((commit "094e819afdd63ea81a499b3bcb42a271006bebd9")
8762 (version (string-append "0.1.0-" revision "." (string-take commit 7)))
8766 (url "https://github.com/neilalexander/jnacl.git")
8768 (file-name (git-file-name name version))
8771 "1d6g6xhn83byv5943n7935wwjsk0ibk0qdvqgr699qqgqqmwisbb"))))
8772 (build-system ant-build-system)
8774 `(#:jar-name "jnacl.jar"
8775 #:source-dir "src/main/java"
8778 (modify-phases %standard-phases
8779 (add-before 'build 'fix-tests
8781 (substitute* '("src/test/java/com/neilalexander/jnacl/NaClTest.java"
8782 "src/test/java/com/neilalexander/jnacl/NaclSecretBoxTest.java")
8783 (("assertions.Assertions") "assertions.api.Assertions"))
8787 (invoke "ant" "compile-tests")
8788 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
8790 ":build/test-classes")
8791 "org.testng.TestNG" "-testclass"
8792 "build/test-classes/com/neilalexander/jnacl/NaclSecretBoxTest.class")
8793 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
8795 ":build/test-classes")
8796 "org.testng.TestNG" "-testclass"
8797 "build/test-classes/com/neilalexander/jnacl/NaClTest.class"))))))
8799 `(("java-testng" ,java-testng)
8800 ("java-fest-util" ,java-fest-util)
8801 ("java-fest-assert" ,java-fest-assert)))
8802 (home-page "https://github.com/neilalexander/jnacl")
8803 (synopsis "Java implementation of NaCl")
8804 (description "Pure Java implementation of the NaCl: Networking and
8805 Cryptography library.")
8806 (license license:bsd-2))))
8808 (define-public java-mvel2
8814 (uri (string-append "https://github.com/mvel/mvel/archive/mvel2-"
8815 version ".Final.tar.gz"))
8818 "01ph5s9gm16l2qz58lg21w6fna7xmmrj7f9bzqr1jim7h9557d3z"))))
8819 (build-system ant-build-system)
8821 `(#:jar-name "mvel2.jar"
8822 #:source-dir "src/main/java"
8824 (list "**/Abstract*.java"
8825 ;; Base class with no tests
8826 "**/MVELThreadTest.java")
8828 (modify-phases %standard-phases
8829 (add-after 'install 'install-bin
8830 (lambda* (#:key outputs #:allow-other-keys)
8831 (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
8833 (with-output-to-file (string-append bin "/mvel2")
8837 "#!" (which "bash") "\n"
8838 "if [ \"$#\" -ne \"2\" ]; then\n"
8839 "echo 'Usage: mvel2 <script> <out.dir>'\n"
8842 "java -Dout.dir=$2 -cp " (getenv "CLASSPATH")
8843 ":" (assoc-ref outputs "out") "/share/java/mvel2.jar"
8844 " org.mvel2.sh.Main $1"))))
8845 (chmod (string-append bin "/mvel2") #o755))
8848 `(("junit" ,java-junit)
8849 ("hamcrest" ,java-hamcrest-core)))
8850 (home-page "https://github.com/mvel/mvel")
8851 (synopsis "MVFLEX Expression Language")
8852 (description "MVEL has largely been inspired by Java syntax, but has some
8853 fundamental differences aimed at making it more efficient as an expression
8854 language, such as operators that directly support collection, array and string
8855 matching, as well as regular expressions. MVEL is used to evaluate expressions
8856 written using Java syntax.
8858 In addition to the expression language, MVEL serves as a templating language for
8859 configuration and string construction.")
8860 (license license:asl2.0)))
8862 (define-public java-commons-jexl-2
8864 (name "java-commons-jexl")
8868 (uri (string-append "mirror://apache/commons/jexl/source/"
8869 "commons-jexl-" version "-src.tar.gz"))
8872 "1ai7632bwwaxglb0nbpblpr2jw5g20afrsaq372ipkphi3ncy1jz"))))
8873 (build-system ant-build-system)
8875 `(#:jar-name "commons-jexl-2.jar"
8877 #:source-dir "src/main/java"
8879 (modify-phases %standard-phases
8880 (add-before 'check 'disable-broken-tests
8881 (lambda* (#:key inputs #:allow-other-keys)
8882 (with-directory-excursion "src/test/java/org/apache/commons/jexl2/"
8883 (substitute* "ArithmeticTest.java"
8884 (("asserter.assertExpression\\(\"3 / 0\"") "//")
8885 (("asserter.assertExpression\\(\"imanull") "//"))
8886 ;; This test fails with "ambiguous method invocation"
8887 (delete-file "CacheTest.java")
8888 ;; This test doesn't have access to the temp directory
8889 (substitute* "ClassCreatorTest.java"
8890 (("java.io.tmpdir") "user.dir"))
8891 ;; This test fails in trying to detect whether it can run.
8892 (substitute* "ClassCreator.java"
8893 (("boolean canRun =.*") "boolean canRun = false;\n"))
8894 ;; ...and these tests depend on it.
8895 (delete-file "scripting/JexlScriptEngineOptionalTest.java")
8896 (delete-file "scripting/JexlScriptEngineTest.java"))
8898 (add-before 'build 'run-javacc
8900 (with-directory-excursion "src/main/java/org/apache/commons/jexl2/parser/"
8901 (invoke "java" "jjtree" "Parser.jjt")
8902 (invoke "java" "javacc" "Parser.jj"))
8905 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)))
8907 `(("java-junit" ,java-junit)
8908 ("java-hamcrest-core" ,java-hamcrest-core)
8909 ("javacc" ,javacc-4)))
8910 (home-page "https://commons.apache.org/proper/commons-jexl/")
8911 (synopsis "Java Expression Language ")
8912 (description "JEXL is a library intended to facilitate the implementation
8913 of dynamic and scripting features in applications and frameworks written in
8914 Java. JEXL implements an Expression Language based on some extensions to the
8915 JSTL Expression Language supporting most of the constructs seen in
8916 shell-script or ECMAScript. Its goal is to expose scripting features usable
8917 by technical operatives or consultants working with enterprise platforms.")
8918 (license license:asl2.0)))
8920 (define-public java-lz4
8926 (uri (string-append "https://github.com/lz4/lz4-java/archive/"
8928 (file-name (string-append name "-" version ".tar.gz"))
8931 "096dm57p2lzqk28n0j2p52x2j3cvnsd2dfqn43n7vbwrkjsy7y54"))))
8932 (build-system ant-build-system)
8934 `(#:jar-name "lz4.jar"
8936 #:source-dir "src/java:src/java-unsafe"
8937 #:tests? #f; FIXME: requires more dependencies
8939 (modify-phases %standard-phases
8940 (add-before 'configure 'generate-source
8942 (with-directory-excursion "src/build/source_templates"
8943 (invoke "mvel2" "../gen_sources.mvel" "../../java"))
8946 `(("mvel" ,java-mvel2)))
8947 (home-page "https://jpountz.github.io/lz4-java")
8948 (synopsis "Compression algorithm")
8949 (description "LZ4 - Java is a Java port of the popular lz4 compression
8950 algorithms and xxHash hashing algorithm.")
8951 (license license:asl2.0)))
8953 (define-public java-bouncycastle
8955 (name "java-bouncycastle")
8959 (uri (string-append "https://github.com/bcgit/bc-java/archive/r"
8960 (substring version 0 1) "v"
8961 (substring version 2 4) ".tar.gz"))
8964 "0v434513y708qc87k4xz13p2kzydc736lk3ks67df9mg11s7hchv"))
8965 (modules '((guix build utils)))
8968 (for-each delete-file
8969 (find-files "." "\\.jar$"))
8971 (build-system ant-build-system)
8976 (modify-phases %standard-phases
8979 (invoke "ant" "-f" "ant/jdk15+.xml" "build-provider")
8980 (invoke "ant" "-f" "ant/jdk15+.xml" "build")))
8981 ;; FIXME: the tests freeze.
8984 ;; (invoke "ant" "-f" "ant/jdk15+.xml" "test")))
8986 (install-jars "build/artifacts/jdk1.5/jars")))))
8988 `(("java-javax-mail" ,java-javax-mail)))
8991 ("junit" ,java-junit)
8992 ("java-native-access" ,java-native-access)
8993 ("java-native-access-platform" ,java-native-access-platform)))
8994 (home-page "https://www.bouncycastle.org")
8995 (synopsis "Cryptographic library")
8996 (description "Bouncy Castle is a cryptographic library for the Java
8997 programming language.")
8998 (license license:expat)))
9000 (define-public java-lmax-disruptor
9002 (name "java-lmax-disruptor")
9006 (uri (string-append "https://github.com/LMAX-Exchange/disruptor/"
9007 "archive/" version ".tar.gz"))
9008 (file-name (string-append name "-" version ".tar.gz"))
9011 "17da2gwj5abnlsfgn2xqjk5lgzbg4vkb0hdv2dvc8r2fx4bi7w3g"))))
9012 (build-system ant-build-system)
9014 `(#:jar-name "java-lmax-disruptor.jar"
9016 #:tests? #f)); tests hang
9018 `(("junit" ,java-junit)
9019 ("java-hdrhistogram" ,java-hdrhistogram)
9020 ("java-jmock" ,java-jmock)
9021 ("java-jmock-legacy" ,java-jmock-legacy)
9022 ("java-jmock-junit4" ,java-jmock-junit4)
9023 ("java-hamcrest-all" ,java-hamcrest-all)))
9025 `(("cglib" ,java-cglib)
9026 ("objenesis" ,java-objenesis)
9028 (home-page "https://www.lmax.com/disruptor")
9029 (synopsis "High performance inter-thread communication")
9030 (description "LMAX Disruptor is a software pattern and software component
9031 for high performance inter-thread communication that avoids the need for
9032 message queues or resource locking.")
9033 (license license:asl2.0)))
9035 (define-public java-commons-bcel
9037 (name "java-commons-bcel")
9041 (uri (string-append "mirror://apache/commons/bcel/source/bcel-"
9042 version "-src.tar.gz"))
9045 "0j3x1rxd673k07psclk8k13rqh0x0mf2yy5qiwkiw4z3afa568jy"))))
9046 (build-system ant-build-system)
9048 `(#:jar-name "bcel.jar"
9050 #:source-dir "src/main/java"
9051 #:test-dir "src/test/java"
9052 ;; FIXME: Tests require the unpackaged jna.
9054 (home-page "https://commons.apache.org/proper/commons-bcel/")
9055 (synopsis "Byte code engineering library")
9056 (description "The Byte Code Engineering Library (Apache Commons BCEL) is
9057 intended to give users a convenient way to analyze, create, and
9058 manipulate (binary) Java class files. Classes are represented by objects
9059 which contain all the symbolic information of the given class: methods, fields
9060 and byte code instructions, in particular.
9062 Such objects can be read from an existing file, be transformed by a
9063 program (e.g. a class loader at run-time) and written to a file again. An
9064 even more interesting application is the creation of classes from scratch at
9065 run-time. The @dfn{Byte Code Engineering Library} (BCEL) may be also useful
9066 if you want to learn about the @dfn{Java Virtual Machine} (JVM) and the format
9067 of Java @code{.class} files.")
9068 (license license:asl2.0)))
9070 (define-public java-xerial-core
9072 (name "java-xerial-core")
9076 (uri (string-append "https://github.com/xerial/xerial-java/archive/"
9078 (file-name (string-append name "-" version ".tar.gz"))
9081 "0d3g863i41bgalpa4xr3vm1h140l091n8iwgq5qvby5yivns9y8d"))))
9082 (build-system ant-build-system)
9084 `(#:jar-name "xerial-core.jar"
9085 #:source-dir "xerial-core/src/main/java"
9086 #:test-dir "xerial-core/src/test"
9088 (modify-phases %standard-phases
9089 (add-before 'build 'copy-resources
9091 (copy-recursively "xerial-core/src/main/resources"
9095 `(("junit" ,java-junit)
9096 ("hamcrest" ,java-hamcrest-core)))
9097 (home-page "https://github.com/xerial/xerial-java")
9098 (synopsis "Data management libraries for Java")
9099 (description "Xerial is a set of data management libraries for the Java
9100 programming language. The ultimate goal of the Xerial project is to manage
9101 everything as database, including class objects, text format data, data
9103 (license license:asl2.0)))
9105 (define-public java-powermock-reflect
9107 (name "java-powermock-reflect")
9111 (uri (string-append "https://github.com/powermock/powermock/"
9112 "archive/powermock-" version ".tar.gz"))
9113 (file-name (string-append name "-" version ".tar.gz"))
9116 "0sbgi5vqq7k72wzcdjb20s370vyd4hsbnx71pzb8ishml3gy7fwy"))
9118 (search-patches "java-powermock-fix-java-files.patch"))))
9119 (build-system ant-build-system)
9121 `(#:jar-name "java-powermock-reflect.jar"
9123 #:source-dir "powermock-reflect/src/main/java"
9124 #:test-dir "powermock-reflect/src/test"))
9126 `(("java-objenesis" ,java-objenesis)))
9128 `(("junit" ,java-junit)
9129 ("cglib" ,java-cglib)
9131 ("hamcrest" ,java-hamcrest-core)
9132 ("assertj" ,java-assertj)))
9133 (home-page "https://github.com/powermock/powermock")
9134 (synopsis "Mock library extension framework")
9135 (description "PowerMock is a framework that extends other mock libraries
9136 such as EasyMock with more powerful capabilities. PowerMock uses a custom
9137 classloader and bytecode manipulation to enable mocking of static methods,
9138 constructors, final classes and methods, private methods, removal of static
9139 initializers and more. By using a custom classloader no changes need to be
9140 done to the IDE or continuous integration servers which simplifies adoption.")
9141 (license license:asl2.0)))
9143 (define-public java-powermock-core
9145 (inherit java-powermock-reflect)
9146 (name "java-powermock-core")
9148 `(#:jar-name "java-powermock-core.jar"
9149 #:source-dir "powermock-core/src/main/java"
9150 #:test-dir "powermock-core/src/test"
9151 #:tests? #f; requires powermock-api
9154 (modify-phases %standard-phases
9155 (add-before 'build 'copy-resources
9157 (copy-recursively "powermock-core/src/main/resources"
9161 `(("reflect" ,java-powermock-reflect)
9162 ("javassist" ,java-jboss-javassist)))
9164 `(("junit" ,java-junit)
9165 ("assertj" ,java-assertj)
9166 ("mockito" ,java-mockito-1)))))
9168 (define-public java-powermock-api-support
9170 (inherit java-powermock-reflect)
9171 (name "java-powermock-api-support")
9172 (build-system ant-build-system)
9174 `(#:jar-name "java-powermock-api-support.jar"
9176 #:source-dir "powermock-api/powermock-api-support/src/main/java"
9177 #:tests? #f)); no tests
9179 `(("core" ,java-powermock-core)
9180 ("reflect" ,java-powermock-reflect)))))
9182 (define-public java-powermock-modules-junit4-common
9184 (inherit java-powermock-reflect)
9185 (name "java-powermock-modules-junit4-common")
9186 (build-system ant-build-system)
9188 `(#:jar-name "java-powermock-modules-junit4-common.jar"
9190 #:source-dir "powermock-modules/powermock-module-junit4-common/src/main/java"
9191 #:test-dir "powermock-modules/powermock-module-junit4-common/src/test"))
9193 `(("core" ,java-powermock-core)
9194 ("easymock" ,java-easymock)
9195 ("reflect" ,java-powermock-reflect)
9196 ("hamcrest" ,java-hamcrest-core)
9197 ("cglib" ,java-cglib)))))
9199 (define-public java-powermock-modules-junit4
9201 (inherit java-powermock-reflect)
9202 (name "java-powermock-modules-junit4")
9203 (build-system ant-build-system)
9205 `(#:jar-name "java-powermock-modules-junit4.jar"
9207 #:source-dir "powermock-modules/powermock-module-junit4/src/main/java"
9208 #:test-dir "powermock-modules/powermock-module-junit4/src/test"
9210 (modify-phases %standard-phases
9211 (add-before 'build 'fix-junit-detection
9213 ;; Our junit version is 4.12-SNAPSHOT
9214 (substitute* (find-files "powermock-modules/powermock-module-junit4"
9215 "PowerMockJUnit4MethodValidator.java")
9216 (("4.12") "4.12-SNAPSHOT"))
9219 `(("core" ,java-powermock-core)
9220 ("reflect" ,java-powermock-reflect)
9221 ("common" ,java-powermock-modules-junit4-common)
9222 ("cglib" ,java-cglib)))
9224 `(("easymock" ,java-easymock)
9225 ("hamcrest" ,java-hamcrest-core)
9226 ("objenesis" ,java-objenesis)
9228 ("junit" ,java-junit)))))
9230 (define-public java-powermock-api-easymock
9232 (inherit java-powermock-reflect)
9233 (name "java-powermock-api-easymock")
9234 (build-system ant-build-system)
9236 `(#:jar-name "java-powermock-api-easymock.jar"
9238 #:source-dir "powermock-api/powermock-api-easymock/src/main/java"
9239 #:tests? #f; no tests
9241 (modify-phases %standard-phases
9242 (add-before 'build 'fix-file
9244 ;; FIXME: This looks wrong, but it fixes a build error.
9245 (with-directory-excursion "powermock-api/powermock-api-easymock"
9246 (substitute* "src/main/java/org/powermock/api/easymock/PowerMock.java"
9247 (("classLoader instanceof MockClassLoader") "false")
9248 (("\\(\\(MockClassLoader\\) classLoader\\).*;") ";")))
9251 `(("core" ,java-powermock-core)
9252 ("easymock" ,java-easymock)
9253 ("reflect" ,java-powermock-reflect)
9254 ("support" ,java-powermock-api-support)
9255 ("cglib" ,java-cglib)))))
9257 (define-public java-jboss-jms-api-spec
9259 (name "java-jboss-jms-api-spec")
9263 (uri (string-append "https://github.com/jboss/jboss-jms-api_spec/"
9264 "archive/jboss-jms-api_" version
9265 "_spec-1.0.1.Final.tar.gz"))
9268 "07bqblw9kq2i8q92bz70fvavq5xjfkaixl8xa0m0cypjgy82rb7m"))))
9269 (build-system ant-build-system)
9271 `(#:jar-name "java-jboss-jms-api_spec.jar"
9274 #:tests? #f)); no tests
9275 (home-page "https://github.com/jboss/jboss-jms-api_spec")
9276 (synopsis "Java Message Service API specification")
9277 (description "Java Message Service (JMS) API is used to send messages
9278 messages between two or more clients. It is a messaging standard that allows
9279 application components to create, send, receive, and read messages.")
9280 ; either gpl2 only with GPL Classpath Exception, or cddl.
9281 (license (list license:gpl2 license:cddl1.0))))
9283 (define-public java-mail
9289 (uri (string-append "https://github.com/javaee/javamail/archive/"
9290 "JAVAMAIL-1_6_0.tar.gz"))
9293 "1b4rg7fpj50ld90a71iz2m4gm3f5cnw18p3q3rbrrryjip46kx92"))))
9294 (build-system ant-build-system)
9296 `(#:jar-name "java-mail.jar"
9298 #:source-dir "mail/src/main/java"
9299 #:test-dir "mail/src/test"
9301 (list "**/CollectorFormatterTest.java"
9302 "**/CompactFormatterTest.java"
9303 "**/DurationFilterTest.java"
9304 "**/MailHandlerTest.java"
9305 "**/GetLocalAddressTest.java"
9306 ;; FIXME: both end with:
9307 ;; java.lang.ClassNotFoundException:
9308 ;; javax.mail.internet.MimeMultipartParseTest
9309 "**/MimeMultipartParseTest.java"
9310 "**/SearchTermSerializationTest.java")
9312 (modify-phases %standard-phases
9313 (add-before 'configure 'move-version.java
9315 (copy-file "mail/src/main/resources/javax/mail/Version.java"
9316 "mail/src/main/java/javax/mail/Version.java")
9318 (add-before 'build 'copy-resources
9320 (copy-recursively "mail/src/main/resources/META-INF"
9321 "build/classes/META-INF")
9324 `(("junit" ,java-junit)
9325 ("hamcrest" ,java-hamcrest-core)))
9326 (home-page "https://javaee.github.io/javamail/")
9327 (synopsis "Mail-related functionnalities in Java")
9328 (description "The JavaMail API provides a platform-independent and
9329 protocol-independent framework to build mail and messaging applications.")
9330 ;; General Public License Version 2 only ("GPL") or the Common Development
9331 ;; and Distribution License("CDDL")
9332 (license (list license:cddl1.1
9333 license:gpl2)))); with classpath exception
9335 (define-public java-jeromq
9337 (name "java-jeromq")
9342 (url "https://github.com/zeromq/jeromq.git")
9343 (commit (string-append "v" version))))
9344 (file-name (string-append name "-" version "-checkout"))
9347 "1gxkp7lv2ahymgrqdw94ncq54bmp4m4sw5m1x9gkp7l5bxn0xsyj"))
9348 (patches (search-patches "java-jeromq-fix-tests.patch"))))
9349 (build-system ant-build-system)
9351 `(#:jar-name "java-jeromq.jar"
9352 #:source-dir "src/main/java"
9358 "**/ZBeaconTest.java"
9360 "**/DealerSpecTest.java"
9361 "**/CustomDecoderTest.java"
9362 "**/CustomEncoderTest.java"
9363 "**/ConnectRidTest.java"
9364 "**/ReqSpecTest.java"
9365 "**/PushPullSpecTest.java"
9366 "**/PubSubHwmTest.java"
9367 "**/RouterSpecTest.java"
9368 "**/ProxyTest.java")))
9370 `(("java-jnacl" ,java-jnacl)))
9372 `(("java-hamcrest-core" ,java-hamcrest-core)
9373 ("junit" ,java-junit)))
9374 (home-page "http://zeromq.org/bindings:java")
9375 (synopsis "Java binding for 0MQ")
9376 (description "Jeromq provides the java bindings for 0MQ.")
9377 (license license:mpl2.0)))
9379 (define-public java-kafka-clients
9381 (name "java-kafka-clients")
9385 (uri (string-append "mirror://apache/kafka/" version "/kafka-"
9386 version "-src.tgz"))
9389 "1yxmnsmliwm7671q5yy9bl4jdqyyn00n26cggz9brwczx80w1vfq"))))
9390 (build-system ant-build-system)
9392 `(#:jar-name "java-kafka-clients.jar"
9394 #:source-dir "clients/src/main/java"
9395 #:test-dir "clients/src/test"
9398 ;; This file does not contain a class
9399 "**/IntegrationTest.java"
9401 "**/ClientUtilsTest.java"
9402 ;; End with errors that seem related to our powermock
9403 "**/KafkaProducerTest.java"
9404 "**/BufferPoolTest.java")))
9406 `(("java-slf4j-api" ,java-slf4j-api)
9407 ("java-lz4" ,java-lz4)))
9409 `(("junit" ,java-junit)
9410 ("hamcrest" ,java-hamcrest-all)
9411 ("objenesis" ,java-objenesis)
9413 ("cglib" ,java-cglib)
9414 ("javassist" ,java-jboss-javassist)
9415 ("snappy" ,java-snappy)
9416 ("easymock" ,java-easymock)
9417 ("powermock" ,java-powermock-core)
9418 ("powermock-easymock" ,java-powermock-api-easymock)
9419 ("powermock-junit4-common" ,java-powermock-modules-junit4-common)
9420 ("powermock-junit4" ,java-powermock-modules-junit4)
9421 ("powermock-support" ,java-powermock-api-support)
9422 ("java-bouncycastle" ,java-bouncycastle)))
9423 (home-page "https://kafka.apache.org")
9424 (synopsis "Distributed streaming platform")
9425 (description "Kafka is a distributed streaming platform, which means:
9427 @item it can publish and subscribe to streams of records;
9428 @item it can store streams of records in a fault-tolerant way;
9429 @item it can process streams of records as they occur.
9431 ;; Either cddl or gpl2 only.
9432 (license (list license:cddl1.1; actually cddl1.1
9433 license:gpl2)))); with classpath exception
9435 (define-public java-jdom
9441 (uri (string-append "http://jdom.org/dist/binary/archive/jdom-"
9445 "07wdpm3jwwc9q38kmdw40fvbmv6jzjrkrf8m0zqs58f79a672wfl"))))
9446 (build-system ant-build-system)
9448 `(#:build-target "package"
9449 #:tests? #f; tests are run as part of the build process
9451 (modify-phases %standard-phases
9453 (install-jars "build")))))
9454 (home-page "http://jdom.org/")
9455 (synopsis "Access, manipulate, and output XML data")
9456 (description "Java-based solution for accessing, manipulating, and
9457 outputting XML data from Java code.")
9458 (license license:bsd-4)))
9460 (define-public java-geronimo-xbean-reflect
9462 (name "java-geronimo-xbean-reflect")
9467 (url "https://svn.apache.org/repos/asf/geronimo/xbean/tags/xbean-4.5/")
9468 (revision 1807396)))
9469 (file-name (string-append name "-" version))
9472 "18q3i6jgm6rkw8aysfgihgywrdc5nvijrwnslmi3ww497jvri6ja"))))
9473 (build-system ant-build-system)
9475 `(#:jar-name "geronimo-xbean-reflect.jar"
9476 #:source-dir "xbean-reflect/src/main/java"
9477 #:test-dir "xbean-reflect/src/test"
9480 (list "**/Abstract*.java" "**/AsmParameterNameLoaderTest.java"
9481 "**/ObjectRecipeTest.java" "**/ParameterNameLoaderTest.java"
9482 "**/RecipeHelperTest.java" "**/XbeanAsmParameterNameLoaderTest.java")
9484 (modify-phases %standard-phases
9485 (add-before 'build 'fix-source
9487 (let ((dir "xbean-reflect/src/main/java/org/apache/xbean/recipe/"))
9488 ;; org.apache.xbean.asm6 is actually repackaged java-asm
9489 (substitute* (string-append dir "XbeanAsmParameterNameLoader.java")
9490 (("org.apache.xbean.asm5") "org.objectweb.asm"))
9494 ("log4j" ,java-log4j-api)
9495 ("log4j-1.2" ,java-log4j-1.2-api)
9496 ("log4j-core" ,java-log4j-core)
9497 ("logging" ,java-commons-logging-minimal)))
9499 `(("junit" ,java-junit)))
9500 (home-page "https://geronimo.apache.org/maven/xbean/3.6/xbean-reflect/")
9501 (synopsis "Dependency injection helper")
9502 (description "Xbean-reflect provides very flexible ways to create objects
9503 and graphs of objects for dependency injection frameworks")
9504 (license license:asl2.0)))
9506 (define-public java-geronimo-xbean-bundleutils
9508 (inherit java-geronimo-xbean-reflect)
9509 (name "java-geronimo-xbean-bundleutils")
9511 `(#:jar-name "geronimo-xbean-bundleutils.jar"
9512 #:source-dir "xbean-bundleutils/src/main/java"
9513 #:test-dir "xbean-bundleutils/src/test"
9515 (modify-phases %standard-phases
9516 (add-before 'build 'fix-java
9518 ;; We use a more recent version of osgi, so this file requires
9519 ;; more interface method implementations.
9520 (substitute* "xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/DelegatingBundleContext.java"
9521 (("import org.osgi.framework.ServiceRegistration;")
9522 "import org.osgi.framework.ServiceRegistration;
9523 import org.osgi.framework.ServiceFactory;
9524 import java.util.Collection;
9525 import org.osgi.framework.ServiceObjects;")
9526 (("public Bundle getBundle\\(\\)")
9528 public <S> ServiceObjects<S> getServiceObjects(ServiceReference<S> reference) {
9529 throw new UnsupportedOperationException();
9532 public <S> ServiceRegistration<S> registerService(Class<S> clazz,
9533 ServiceFactory<S> factory, Dictionary<String, ?> properties) {
9534 throw new UnsupportedOperationException();
9536 public Bundle getBundle()"))
9539 `(("java-slf4j" ,java-slf4j-api)
9540 ("java-asm" ,java-asm)
9541 ("java-osgi-framework" ,java-osgi-framework)
9542 ("java-eclipse-osgi" ,java-eclipse-osgi)
9543 ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin)))))
9545 (define-public java-geronimo-xbean-asm-util
9547 (inherit java-geronimo-xbean-reflect)
9548 (name "java-geronimo-xbean-asm-util")
9550 `(#:jar-name "geronimo-xbean-asm-util.jar"
9551 #:source-dir "xbean-asm-util/src/main/java"
9552 #:tests? #f)); no tests
9554 `(("java-asm" ,java-asm)))
9555 (native-inputs '())))
9557 (define-public java-geronimo-xbean-finder
9559 (inherit java-geronimo-xbean-reflect)
9560 (name "java-geronimo-xbean-finder")
9562 `(#:jar-name "geronimo-xbean-finder.jar"
9563 #:source-dir "xbean-finder/src/main/java"
9564 #:test-dir "xbean-finder/src/test"))
9566 `(("java-slf4j-api" ,java-slf4j-api)
9567 ("java-asm" ,java-asm)
9568 ("java-geronimo-xbean-bundleutils" ,java-geronimo-xbean-bundleutils)
9569 ("java-geronimo-xbean-asm-util" ,java-geronimo-xbean-asm-util)
9570 ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin)
9571 ("java-osgi-framework" ,java-osgi-framework)))
9573 `(("java-junit" ,java-junit)
9574 ("java-hamcrest-core" ,java-hamcrest-core)))))
9576 (define-public java-gson
9582 (uri (string-append "https://github.com/google/gson/archive/"
9583 "gson-parent-" version ".tar.gz"))
9586 "1j4qnp7v046q0k48c4kyf69sxaasx2h949d3cqwsm3kzxms3x0f9"))))
9587 (build-system ant-build-system)
9589 `(#:jar-name "gson.jar"
9590 #:source-dir "gson/src/main/java"
9591 #:test-dir "gson/src/test"))
9593 `(("java-junit" ,java-junit)
9594 ("java-hamcrest-core" ,java-hamcrest-core)))
9595 (home-page "https://github.com/google/gson")
9596 (synopsis "Java serialization/deserialization library from/to JSON")
9597 (description "Gson is a Java library that can be used to convert Java
9598 Objects into their JSON representation. It can also be used to convert a JSON
9599 string to an equivalent Java object. Gson can work with arbitrary Java objects
9600 including pre-existing objects that you do not have source-code of.")
9601 (license license:asl2.0)))
9603 (define-public java-hawtjni
9605 (name "java-hawtjni")
9609 (uri (string-append "https://github.com/fusesource/hawtjni/archive/"
9610 "hawtjni-project-" version ".tar.gz"))
9613 "1bqfd732rmh6svyx17fpw9175gc9gzkcbyps2yyrf50c3zzjas6g"))))
9614 (build-system ant-build-system)
9616 `(#:jar-name "hawtjni.jar"
9617 #:source-dir "hawtjni-generator/src/main/java:hawtjni-runtime/src/main/java"
9618 #:tests? #f; no tests
9620 (modify-phases %standard-phases
9621 (add-before 'build 'build-native
9622 (lambda* (#:key inputs #:allow-other-keys)
9623 (let ((include (string-append "-I" (assoc-ref inputs "jdk") "/include/linux")))
9624 (with-directory-excursion "hawtjni-generator/src/main/resources/"
9625 (invoke "gcc" "-c" "hawtjni.c" "-o" "hawtjni.o"
9626 "-fPIC" "-O2" include)
9627 (invoke "gcc" "-c" "hawtjni-callback.c" "-o" "hawtjni-callback.o"
9628 "-fPIC" "-O2" include)
9629 (invoke "gcc" "-o" "libhawtjni.so" "-shared"
9630 "hawtjni.o" "hawtjni-callback.o")))
9632 (add-after 'install 'install-native
9633 (lambda* (#:key outputs #:allow-other-keys)
9634 (let* ((out (assoc-ref outputs "out"))
9635 (lib (string-append out "/lib"))
9636 (inc (string-append out "/include")))
9637 (with-directory-excursion "hawtjni-generator/src/main/resources/"
9638 (install-file "libhawtjni.so" lib)
9639 (install-file "hawtjni.h" inc)))
9642 `(("java-commons-cli" ,java-commons-cli)
9643 ("java-asm" ,java-asm)
9644 ("java-geronimo-xbean-finder" ,java-geronimo-xbean-finder)))
9645 (home-page "https://fusesource.github.io/hawtjni/")
9646 (synopsis "JNI code generator")
9647 (description "HawtJNI is a code generator that produces the JNI code needed
9648 to implement Java native methods. It is based on the jnigen code generator
9649 that is part of the SWT Tools project.")
9650 (license license:asl2.0)))
9652 (define-public java-jansi-native
9654 (name "java-jansi-native")
9658 (uri (string-append "https://github.com/fusesource/jansi-native/"
9659 "archive/jansi-native-" version ".tar.gz"))
9662 "0j2ydlgxbzbgshqkwghbxxxnbnx1mmjgd6k5fw6xfvxw1z956yqf"))))
9663 (build-system ant-build-system)
9665 `(#:jar-name "jansi-native.jar"
9666 #:source-dir "src/main/java"
9667 #:tests? #f; no tests
9669 (modify-phases %standard-phases
9670 (add-before 'build 'build-native
9671 (lambda* (#:key inputs #:allow-other-keys)
9672 ;; there are more required files for windows in windows/
9673 (with-directory-excursion "src/main/native-package/src"
9674 (substitute* "jansi_ttyname.c"
9675 (("#include \"jansi_.*") ""))
9676 (invoke "gcc" "-c" "jansi_ttyname.c" "-o" "jansi_ttyname.o"
9677 (string-append "-I" (assoc-ref inputs "java-hawtjni")
9679 (string-append "-I" (assoc-ref inputs "jdk")
9682 (invoke "gcc" "-o" "libjansi.so" "-shared" "jansi_ttyname.o"))))
9683 (add-before 'build 'install-native
9685 (let ((dir (string-append "build/classes/META-INF/native/"
9686 ,(match (%current-system)
9687 ((or "i686-linux" "armhf-linux")
9689 ((or "x86_64-linux" "aarch64-linux"
9692 (install-file "src/main/native-package/src/libjansi.so" dir))
9694 (add-after 'install 'install-native
9695 (lambda* (#:key outputs #:allow-other-keys)
9696 (install-file "src/main/native-package/src/jansi.h"
9697 (string-append (assoc-ref outputs "out") "/include"))
9700 `(("java-hawtjni" ,java-hawtjni)))
9701 (home-page "https://fusesource.github.io/jansi/")
9702 (synopsis "Native library for jansi")
9703 (description "This package provides the native library for jansi, a small
9704 Java library that allows you to use ANSI escape sequences to format your
9706 (license license:asl2.0)))
9708 (define-public java-jansi
9714 (uri (string-append "https://github.com/fusesource/jansi/archive/"
9715 "jansi-project-" version ".tar.gz"))
9718 "11kh3144i3fzp21dpy8zg52mjmsr214k7km9p8ly0rqk2px0qq2z"))))
9719 (build-system ant-build-system)
9721 `(#:jar-name "jansi.jar"
9722 #:source-dir "jansi/src/main/java"
9723 #:test-dir "jansi/src/test"
9725 (modify-phases %standard-phases
9726 (add-after 'check 'clear-term
9728 (invoke "echo" "-e" "\\e[0m"))))))
9730 `(("java-jansi-native" ,java-jansi-native)))
9732 `(("java-junit" ,java-junit)
9733 ("java-hamcrest-core" ,java-hamcrest-core)))
9734 (home-page "https://fusesource.github.io/jansi/")
9735 (synopsis "Portable ANSI escape sequences")
9736 (description "Jansi is a Java library that allows you to use ANSI escape
9737 sequences to format your console output which works on every platform.")
9738 (license license:asl2.0)))
9740 (define-public java-jboss-el-api-spec
9742 (name "java-jboss-el-api-spec")
9746 (uri (string-append "https://github.com/jboss/jboss-el-api_spec/"
9747 "archive/jboss-el-api_" version
9748 "_spec-1.0.7.Final.tar.gz"))
9751 "1j45ljxalwlibxl7g7iv952sjxkw275m8vyxxij8l6wdd5pf0pdh"))))
9752 (build-system ant-build-system)
9754 `(#:jar-name "java-jboss-el-api_spec.jar"
9757 `(("java-junit" ,java-junit)))
9758 (home-page "https://github.com/jboss/jboss-el-api_spec")
9759 (synopsis "JSR-341 expression language 3.0 API")
9760 (description "This package contains an implementation of the JSR-341
9761 specification for the expression language 3.0. It implements an expression
9762 language inspired by ECMAScript and XPath. This language is used with
9763 JavaServer Pages (JSP).")
9764 ;; Either GPL2 only or CDDL.
9765 (license (list license:gpl2 license:cddl1.1))))
9767 (define-public java-jboss-interceptors-api-spec
9769 (name "java-jboss-interceptors-api-spec")
9773 (uri (string-append "https://github.com/jboss/jboss-interceptors-api_spec/"
9774 "archive/jboss-interceptors-api_" version
9775 "_spec-1.0.0.Final.tar.gz"))
9778 "0wv8x0jp9a5qxlrgkhb5jdk2gr6vi87b4j4kjb8ryxiy9gn8g51z"))))
9779 (build-system ant-build-system)
9781 `(#:jar-name "java-jboss-interceptors-api_spec.jar"
9784 #:tests? #f)); no tests
9785 (home-page "https://github.com/jboss/jboss-interceptors-api_spec")
9786 (synopsis "Interceptors 1.2 API classes from JSR 318")
9787 (description "Java-jboss-interceptors-api-spec implements the Interceptors
9788 API. Interceptors are used to interpose on business method invocations and
9790 ;; Either GPL2 only or CDDL.
9791 (license (list license:gpl2 license:cddl1.1))))
9793 (define-public java-cdi-api
9795 (name "java-cdi-api")
9799 (uri (string-append "https://github.com/cdi-spec/cdi/archive/"
9801 (file-name (string-append name "-" version ".tar.gz"))
9804 "1iv8b8bp07c5kmqic14jsr868vycjv4qv02lf3pkgp9z21mnfg5y"))))
9805 (build-system ant-build-system)
9807 `(#:source-dir "api/src/main/java"
9808 #:jar-name "java-cdi-api.jar"
9809 #:test-dir "api/src/test"
9811 #:tests? #f)); Tests fail because we don't have a CDI provider yet
9813 `(("java-javax-inject" ,java-javax-inject)
9814 ("java-jboss-el-api-spec" ,java-jboss-el-api-spec)
9815 ("java-jboss-interceptors-api-spec" ,java-jboss-interceptors-api-spec)))
9817 `(("java-testng" ,java-testng)
9818 ("java-hamcrest-core" ,java-hamcrest-core)))
9819 (home-page "http://cdi-spec.org/")
9820 (synopsis "Contexts and Dependency Injection APIs")
9821 (description "Java-cdi-api contains the required APIs for Contexts and
9822 Dependency Injection (CDI).")
9823 (license license:asl2.0)))
9825 (define-public java-joda-convert
9827 (name "java-joda-convert")
9831 (uri (string-append "https://github.com/JodaOrg/joda-convert/archive/v"
9833 (file-name (string-append name "-" version ".tar.gz"))
9836 "0vp346xz7dh9br4q7xazhc7hvzf76a6hf95fki9bg67q5jr0kjh7"))))
9837 (build-system ant-build-system)
9839 `(#:jar-name (string-append ,name "-" ,version ".jar")
9840 #:source-dir "src/main/java"
9841 #:test-include (list "**/Test*.java")
9842 ;; Contains only interfaces and base classes (no test)
9843 #:test-exclude (list "**/test*/**.java")))
9845 `(("java-guava" ,java-guava)))
9847 `(("java-junit" ,java-junit)
9848 ("java-hamcrest-core" ,java-hamcrest-core)))
9849 (home-page "http://www.joda.org/joda-convert/")
9850 (synopsis "Conversion between Objects and Strings")
9851 (description "Joda-Convert provides a small set of classes to aid
9852 conversion between Objects and Strings. It is not intended to tackle the
9853 wider problem of Object to Object transformation.")
9854 (license license:asl2.0)))
9856 (define-public java-joda-time
9858 (name "java-joda-time")
9862 (uri (string-append "https://github.com/JodaOrg/joda-time/archive/v"
9864 (file-name (string-append name "-" version ".tar.gz"))
9867 "1i9x91mi7yg2pasl0k3912f1pg46n37sps6rdb0v1gs8hj9ppwc1"))))
9868 (build-system ant-build-system)
9870 `(#:jar-name "java-joda-time.jar"
9871 #:source-dir "src/main/java"
9872 #:test-include (list "**/Test*.java")
9873 ;; There is no runnable test in these files
9874 #:test-exclude (list "**/Test*Chronology.java" "**/Test*Field.java")
9876 (modify-phases %standard-phases
9877 (add-after 'build 'build-resources
9879 (mkdir-p "build/classes/org/joda/time/tz/data")
9880 (mkdir-p "build/classes/org/joda/time/format")
9881 ;; This will produce the following exception:
9882 ;; java.io.IOException: Resource not found: "org/joda/time/tz/data/ZoneInfoMap"
9883 ;; which is normal, because it doesn't exist yet. It still generates
9884 ;; the same file as in the binary one can find on maven.
9885 (invoke "java" "-cp"
9886 (string-append "build/classes:" (getenv "CLASSPATH"))
9887 "org.joda.time.tz.ZoneInfoCompiler"
9888 "-src" "src/main/java/org/joda/time/tz/src"
9889 "-dst" "build/classes/org/joda/time/tz/data"
9890 "africa" "antarctica" "asia" "australasia"
9891 "europe" "northamerica" "southamerica"
9892 "pacificnew" "etcetera" "backward" "systemv")
9893 (for-each (lambda (f)
9894 (copy-file f (string-append
9895 "build/classes/org/joda/time/format/"
9897 (find-files "src/main/java/org/joda/time/format" ".*.properties"))
9899 (add-before 'install 'regenerate-jar
9901 ;; We need to regenerate the jar file to add generated data.
9902 (delete-file "build/jar/java-joda-time.jar")
9903 (invoke "ant" "jar")))
9904 (add-before 'check 'copy-test-resources
9906 (mkdir-p "build/test-classes/org/joda/time/tz/data")
9907 (copy-file "src/test/resources/tzdata/ZoneInfoMap"
9908 "build/test-classes/org/joda/time/tz/data/ZoneInfoMap")
9909 (copy-recursively "src/test/resources" "build/test-classes")
9912 `(("java-joda-convert" ,java-joda-convert)))
9914 `(("java-junit" ,java-junit)
9915 ("java-hamcrest-core" ,java-hamcrest-core)
9916 ("tzdata" ,tzdata)))
9917 (home-page "http://www.joda.org/joda-time/")
9918 (synopsis "Replacement for the Java date and time classes")
9919 (description "Joda-Time is a replacement for the Java date and time
9920 classes prior to Java SE 8.")
9921 (license license:asl2.0)))
9923 (define-public java-xerces
9925 (name "java-xerces")
9930 (uri (string-append "mirror://apache/xerces/j/source/"
9931 "Xerces-J-src." version ".tar.gz"))
9933 (base32 "1006igwy2lqrmjvdk64v8dg6qbk9c29pm8xxx7r87n0vnpvmx6pm"))
9934 (patches (search-patches
9935 "java-xerces-xjavac_taskdef.patch"
9936 "java-xerces-build_dont_unzip.patch"
9937 "java-xerces-bootclasspath.patch"))))
9938 (build-system ant-build-system)
9940 `(#:tests? #f;; Test files are not present
9941 #:test-target "test"
9944 (modify-phases %standard-phases
9945 (add-after 'unpack 'create-build.properties
9946 (lambda* (#:key inputs #:allow-other-keys)
9947 (let ((jaxp (assoc-ref inputs "java-jaxp"))
9948 (resolver (assoc-ref inputs "java-apache-xml-commons-resolver")))
9949 (with-output-to-file "build.properties"
9952 "jar.jaxp = ~a/share/java/jaxp.jar~@
9953 jar.apis-ext = ~a/share/java/jaxp.jar~@
9954 jar.resolver = ~a/share/java/xml-resolver.jar~%"
9955 jaxp jaxp resolver)))
9956 ;; Make xerces use our version of jaxp in tests
9957 (substitute* "build.xml"
9959 (string-append jaxp "/share/java/jaxp.jar"))
9960 (("\\$\\{tools.dir\\}/\\$\\{jar.apis\\}")
9963 (replace 'install (install-jars "build")))))
9965 `(("java-apache-xml-commons-resolver" ,java-apache-xml-commons-resolver)
9966 ("java-jaxp" ,java-jaxp)))
9967 (home-page "https://xerces.apache.org/xerces2-j/")
9968 (synopsis "Validating XML parser for Java with DOM level 3 support")
9969 (description "The Xerces2 Java parser is the reference implementation of
9970 XNI, the Xerces Native Interface, and also a fully conforming XML Schema
9973 Xerces2-J supports the following standards and APIs:
9976 @item eXtensible Markup Language (XML) 1.0 Second Edition Recommendation
9977 @item Namespaces in XML Recommendation
9978 @item Document Object Model (DOM) Level 2 Core, Events, and Traversal and
9979 Range Recommendations
9980 @item Simple API for XML (SAX) 2.0.1 Core and Extension
9981 @item Java APIs for XML Processing (JAXP) 1.2.01
9982 @item XML Schema 1.0 Structures and Datatypes Recommendations
9983 @item Experimental implementation of the Document Object Model (DOM) Level 3
9984 Core and Load/Save Working Drafts
9985 @item Provides a partial implementation of the XML Inclusions (XInclude) W3C
9986 Candidate Recommendation
9989 Xerces is now able to parse documents written according to the XML 1.1
9990 Candidate Recommendation, except that it does not yet provide an option to
9991 enable normalization checking as described in section 2.13 of this
9992 specification. It also handles namespaces according to the XML Namespaces 1.1
9993 Candidate Recommendation, and will correctly serialize XML 1.1 documents if
9994 the DOM level 3 load/save API's are in use.")
9995 (license license:asl2.0)))
9997 (define-public java-jakarta-regexp
9999 (name "java-jakarta-regexp")
10004 (uri (string-append
10005 "https://archive.apache.org/dist/jakarta/regexp/jakarta-regexp-"
10006 version ".tar.gz"))
10009 "0zg9rmyif48dck0cv6ynpxv23mmcsx265am1fnnxss7brgw0ms3r"))))
10010 (build-system ant-build-system)
10012 `(#:test-target "test"
10014 (modify-phases %standard-phases
10016 (lambda* (#:key outputs #:allow-other-keys)
10017 (let* ((out (assoc-ref outputs "out"))
10018 (out-share (string-append out "/share/java")))
10019 (mkdir-p out-share)
10020 (for-each (lambda (name)
10021 (install-file name out-share))
10022 (find-files "build" "^jakarta-regexp-.*\\.jar$"))
10024 (home-page "https://attic.apache.org/projects/jakarta-regexp.html")
10025 (synopsis "Regular expression parser generator for Java.")
10026 (description "@code{jakarta-regexp} is an old regular expression parser
10027 generator for Java.")
10028 (license license:asl2.0)))
10030 (define-public java-jline
10032 (name "java-jline")
10036 (uri (string-append "https://github.com/jline/jline1/archive/jline-"
10037 version ".tar.gz"))
10040 "0bi3p6vrh7a6v0fbpb6rx9plpmx5zk3lr352xzdbz2jcxg499wir"))))
10041 (build-system ant-build-system)
10043 `(#:jar-name "jline.jar"
10044 #:source-dir "src/main/java"
10045 #:test-dir "src/test"
10047 (modify-phases %standard-phases
10048 (add-before 'build 'copy-resources
10050 (copy-recursively "src/main/resources" "build/classes")
10053 `(("java-junit" ,java-junit)))
10054 (home-page "https://jline.github.io")
10055 (synopsis "Console input handling library")
10056 (description "JLine is a Java library for handling console input. It is
10057 similar in functionality to BSD editline and GNU readline but with additional
10058 features that bring it on par with the Z shell line editor.")
10059 (license license:bsd-3)))
10061 (define-public java-jline-2
10063 (inherit java-jline)
10067 (uri (string-append "https://github.com/jline/jline2/archive/jline-"
10068 version ".tar.gz"))
10071 "1c6qa26mf0viw8hg4jnv72s7i1qb1gh1l8rrzcdvqhqhx82rkdlf"))))
10074 ,@(package-arguments java-jline)))
10076 `(("java-jansi" ,java-jansi)
10077 ("java-jansi-native" ,java-jansi-native)))
10079 `(("java-powermock-modules-junit4" ,java-powermock-modules-junit4)
10080 ("java-powermock-modules-junit4-common" ,java-powermock-modules-junit4-common)
10081 ("java-powermock-api-easymock" ,java-powermock-api-easymock)
10082 ("java-powermock-api-support" ,java-powermock-api-support)
10083 ("java-powermock-core" ,java-powermock-core)
10084 ("java-powermock-reflect" ,java-powermock-reflect)
10085 ("java-easymock" ,java-easymock)
10086 ("java-jboss-javassist" ,java-jboss-javassist)
10087 ("java-objenesis" ,java-objenesis)
10088 ("java-asm" ,java-asm)
10089 ("java-hamcrest-core" ,java-hamcrest-core)
10090 ("java-cglib" ,java-cglib)
10091 ("java-junit" ,java-junit)
10092 ("java-hawtjni" ,java-hawtjni)))))
10094 (define-public java-xmlunit
10096 (name "java-xmlunit")
10100 (uri (string-append "https://github.com/xmlunit/xmlunit/archive/v"
10101 version ".tar.gz"))
10102 (file-name (string-append name "-" version ".tar.gz"))
10105 "035rivlnmwhfqj0fzviciv0bkh1h95ps1iwnh2kjcvdbk5nccm4z"))))
10106 (build-system ant-build-system)
10108 `(#:jar-name "java-xmlunit.jar"
10109 #:source-dir "xmlunit-core/src/main/java"
10110 #:test-dir "xmlunit-core/src/test"
10112 (modify-phases %standard-phases
10113 (add-before 'check 'copy-test-resources
10114 (lambda* (#:key inputs #:allow-other-keys)
10115 (copy-recursively (assoc-ref inputs "resources") "../test-resources")
10118 `(("java-junit" ,java-junit)
10119 ("java-mockito-1" ,java-mockito-1)
10120 ("java-hamcrest-all" ,java-hamcrest-all)
10121 ("java-objenesis" ,java-objenesis)
10122 ("java-asm" ,java-asm)
10123 ("java-cglib" ,java-cglib)
10127 (uri (git-reference
10128 (url "https://github.com/xmlunit/test-resources.git")
10129 (commit "a590d2ae865c3e0455691d76ba8eefccc2215aec")))
10130 (file-name "java-xmlunit-test-resources")
10133 "0r0glj37pg5l868yjz78gckr91cs8fysxxbp9p328dssssi91agr"))))))
10134 (home-page "http://www.xmlunit.org/")
10135 (synopsis "XML output testing")
10136 (description "XMLUnit provides you with the tools to verify the XML you
10137 emit is the one you want to create. It provides helpers to validate against
10138 an XML Schema, assert the values of XPath queries or compare XML documents
10139 against expected outcomes.")
10140 (license license:asl2.0)))
10142 (define-public java-xmlunit-legacy
10144 (inherit java-xmlunit)
10145 (name "java-xmlunit-legacy")
10147 `(#:jar-name "java-xmlunit-legacy.jar"
10148 #:source-dir "xmlunit-legacy/src/main/java"
10149 #:test-dir "xmlunit-legacy/src/test"))
10151 `(("java-xmlunit" ,java-xmlunit)
10152 ("java-junit" ,java-junit)))
10154 `(("java-mockito-1" ,java-mockito-1)))))
10156 (define-public java-xmlunit-matchers
10158 (inherit java-xmlunit)
10159 (name "java-xmlunit-matchers")
10161 `(#:jar-name "java-xmlunit-matchers.jar"
10162 #:source-dir "xmlunit-matchers/src/main/java"
10163 #:test-dir "xmlunit-matchers/src/test"
10165 ;; Cannot open xsd for http://www.xmlunit.org/test-support/Book.xsd
10166 (list "**/ValidationMatcherTest.java")
10168 (modify-phases %standard-phases
10169 (add-before 'build 'copy-test-class
10171 (copy-file "xmlunit-core/src/test/java/org/xmlunit/TestResources.java"
10172 "xmlunit-matchers/src/test/java/org/xmlunit/TestResources.java")
10174 (add-before 'build 'fix-test-resources-path
10176 (substitute* (find-files "xmlunit-matchers/src/test" ".*.java")
10177 (("../test-resources") "test-resources"))
10179 (add-before 'check 'copy-test-resources
10180 (lambda* (#:key inputs #:allow-other-keys)
10181 (copy-recursively (assoc-ref inputs "resources") "test-resources")
10184 `(("java-xmlunit" ,java-xmlunit)
10185 ("java-junit" ,java-junit)))))
10187 (define-public java-openchart2
10189 (name "java-openchart2")
10193 (uri (string-append "http://download.approximatrix.com/openchart2/"
10194 "openchart2-" version ".source.zip"))
10197 "1xq96zm5r02n1blja0072jmmsifmxc40lbyfbnmcnr6mw42frh4g"))))
10198 (build-system ant-build-system)
10200 `(#:test-target "test"
10202 (modify-phases %standard-phases
10203 (add-after 'unpack 'fix-junit-errors
10205 (with-directory-excursion "unittest/src/com/approximatrix/charting/"
10206 (substitute* '("coordsystem/ticklocator/NumericXTickLocatorTest.java"
10207 "coordsystem/ticklocator/NumericYTickLocatorTest.java"
10208 "coordsystem/ticklocator/ObjectXTickLocatorTest.java"
10209 "model/DefaultChartDataModelConstraintsTest.java"
10210 "model/MultiScatterDataModelConstraintsTest.java"
10211 "model/threedimensional/DotPlotDataModelConstraintsTest.java")
10212 (("(assertEquals[^;]+);" before _)
10213 (string-append (string-drop-right before 2) ", 1E-6);"))))
10215 (replace 'install (install-jars ".")))))
10218 ("java-junit" ,java-junit)
10219 ("java-hamcrest-core" ,java-hamcrest-core)))
10220 (home-page "http://approximatrix.com/products/openchart2/")
10221 (synopsis "Simple plotting for Java")
10222 (description "Openchart2 provides a simple, yet powerful, interface for
10223 Java programmers to create two-dimensional charts and plots. The library
10224 features an assortment of graph styles, including advanced scatter plots, bar
10225 graphs, and pie charts.")
10226 (license license:lgpl2.1+)))
10228 (define-public java-commons-httpclient
10230 (name "java-commons-httpclient")
10234 (uri (string-append "https://archive.apache.org/dist/httpcomponents/"
10235 "commons-httpclient/source/commons-httpclient-"
10236 version "-src.tar.gz"))
10239 "1wlpn3cfy3d4inxy6g7wxcsa8p7sshn6aldk9y4ia3lb879rd97r"))))
10240 (build-system ant-build-system)
10242 `(#:build-target "compile"
10243 #:test-target "test"
10244 #:tests? #f; requires junit-textui (junit 3)
10246 (modify-phases %standard-phases
10247 (add-before 'build 'fix-accent
10249 (for-each (lambda (file)
10250 (with-fluids ((%default-port-encoding "ISO-8859-1"))
10252 (("\\* @author Ortwin .*") "* @author Ortwin Glueck\n"))))
10253 '("src/java/org/apache/commons/httpclient/HttpContentTooLargeException.java"
10254 "src/examples/TrivialApp.java" "src/examples/ClientApp.java"
10255 "src/test/org/apache/commons/httpclient/TestHttps.java"
10256 "src/test/org/apache/commons/httpclient/TestURIUtil2.java"))
10259 (lambda* (#:key outputs #:allow-other-keys)
10260 (invoke "ant" "dist"
10261 (string-append "-Ddist.home=" (assoc-ref outputs "out")
10265 `(("java-commons-logging" ,java-commons-logging-minimal)
10266 ("java-commons-codec" ,java-commons-codec)))
10267 (home-page "https://hc.apache.org")
10268 (synopsis "HTTP/1.1 compliant HTTP agent implementation")
10269 (description "This package contains an HTTP/1.1 compliant HTTP agent
10270 implementation. It also provides reusable components for client-side
10271 authentication, HTTP state management, and HTTP connection management.")
10272 (license license:asl2.0)))
10274 (define-public java-commons-vfs
10276 (name "java-commons-vfs")
10280 (uri (string-append "mirror://apache/commons/vfs/source/"
10281 "commons-vfs2-distribution-" version "-src.tar.gz"))
10282 (file-name (string-append name "-" version ".tar.gz"))
10285 "1cnq1iaghbp4cslpnvwbp83i5v234x87irssqynhwpfgw7caf1s3"))
10286 (modules '((guix build utils)))
10289 (for-each delete-file
10290 (find-files "." "\\.jar$"))
10292 (build-system ant-build-system)
10294 `(#:jar-name "commons-vfs.jar"
10295 #:source-dir "commons-vfs2/src/main/java"
10296 #:test-dir "commons-vfs2/src/test"
10297 ; FIXME: tests depend on many things: apache sshd, hadoop, ftpserver, ...
10300 (modify-phases %standard-phases
10301 (add-before 'build 'remove-hadoop-and-webdav
10302 ; Remove these files as they are not required and depend on difficult
10305 (for-each delete-file-recursively
10306 '("commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/webdav"
10307 "commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/hdfs"))
10310 `(("java-commons-collections4" ,java-commons-collections4)
10311 ("java-commons-compress" ,java-commons-compress)
10312 ("java-commons-httpclient" ,java-commons-httpclient)
10313 ("java-commons-logging-minimal" ,java-commons-logging-minimal)
10314 ("java-commons-net" ,java-commons-net)
10315 ("java-jsch" ,java-jsch)))
10316 (home-page "http://commons.apache.org/proper/commons-vfs/")
10317 (synopsis "Java file system library")
10318 (description "Commons VFS provides a single API for accessing various
10319 different file systems. It presents a uniform view of the files from various
10320 different sources, such as the files on local disk, on an HTTP server, or
10321 inside a Zip archive.")
10322 (license license:asl2.0)))
10324 (define-public java-jakarta-oro
10326 (name "java-jakarta-oro")
10330 (uri (string-append "https://archive.apache.org/dist/jakarta/oro/"
10331 "jakarta-oro-" version ".tar.gz"))
10334 "0rpmnsskiwmsy8r0sckz5n5dbvh3vkxx8hpm177c754r8xy3qksc"))
10335 (modules '((guix build utils)))
10338 (delete-file (string-append "jakarta-oro-" ,version ".jar"))
10340 (build-system ant-build-system)
10342 `(#:build-target "package"
10343 #:tests? #f; tests are run as part of the build process
10345 (modify-phases %standard-phases
10347 (install-jars ,(string-append "jakarta-oro-" version))))))
10348 (home-page "https://jakarta.apache.org/oro/")
10349 (synopsis "Text-processing for Java")
10350 (description "The Jakarta-ORO Java classes are a set of text-processing
10351 Java classes that provide Perl5 compatible regular expressions, AWK-like
10352 regular expressions, glob expressions, and utility classes for performing
10353 substitutions, splits, filtering filenames, etc. This library is the successor
10354 of the OROMatcher, AwkTools, PerlTools, and TextTools libraries originally
10356 (license license:asl1.1)))
10358 (define-public java-native-access
10360 (name "java-native-access")
10364 (uri (string-append "https://github.com/java-native-access/jna/"
10365 "archive/" version ".tar.gz"))
10366 (file-name (string-append name "-" version ".tar.gz"))
10369 "0zrpzkib6b905i018a9pqlzkqinphywr6y4jwv6mwp63jjqvqkd9"))
10370 (modules '((guix build utils)))
10373 (for-each delete-file (find-files "." ".*.jar"))
10374 (delete-file-recursively "native/libffi")
10375 (delete-file-recursively "dist")
10377 (build-system ant-build-system)
10379 `(#:tests? #f; FIXME: tests require reflections.jar
10380 #:test-target "test"
10381 #:make-flags (list "-Ddynlink.native=true")
10383 (modify-phases %standard-phases
10384 (add-before 'build 'fix-build.xml
10385 (lambda* (#:key inputs #:allow-other-keys)
10386 (substitute* "build.xml"
10387 ;; Since we removed the bundled ant.jar, give the correct path
10388 (("lib/ant.jar") (string-append (assoc-ref inputs "ant") "/lib/ant.jar"))
10389 ;; We removed generated native libraries. We can only rebuild one
10390 ;; so don't fail if we can't find a native library for another architecture.
10391 (("zipfileset") "zipfileset erroronmissingarchive=\"false\""))
10392 ;; Copy test dependencies
10393 (copy-file (string-append (assoc-ref inputs "java-junit")
10394 "/share/java/junit.jar")
10396 (copy-file (string-append (assoc-ref inputs "java-hamcrest-core")
10397 "/share/java/hamcrest-core.jar")
10398 "lib/hamcrest-core.jar")
10399 ;; FIXME: once reflections.jar is built, copy it to lib/test.
10401 (add-before 'build 'build-native
10403 (invoke "ant" "-Ddynlink.native=true" "native")
10406 (install-jars "build")))))
10408 `(("libffi" ,libffi)
10412 `(("java-junit" ,java-junit)
10413 ("java-hamcrest-core" ,java-hamcrest-core)))
10414 (home-page "https://github.com/java-native-access/jna")
10415 (synopsis "Access to native shared libraries from Java")
10416 (description "JNA provides Java programs easy access to native shared
10417 libraries without writing anything but Java code - no JNI or native code is
10418 required. JNA allows you to call directly into native functions using natural
10419 Java method invocation.")
10420 ;; Java Native Access project (JNA) is dual-licensed under 2
10421 ;; alternative Free licenses: LGPL 2.1 or later and Apache License 2.0.
10424 license:lgpl2.1+))))
10426 (define-public java-native-access-platform
10428 (inherit java-native-access)
10429 (name "java-native-access-platform")
10431 `(#:test-target "test"
10432 #:tests? #f; require jna-test.jar
10434 (modify-phases %standard-phases
10435 (add-before 'build 'chdir
10437 (chdir "contrib/platform")
10439 (add-after 'chdir 'fix-ant
10440 (lambda* (#:key inputs #:allow-other-keys)
10441 (substitute* "nbproject/project.properties"
10442 (("../../build/jna.jar")
10443 (string-append (assoc-ref inputs "java-native-access")
10444 "/share/java/jna.jar"))
10445 (("../../lib/hamcrest-core-.*.jar")
10446 (string-append (assoc-ref inputs "java-hamcrest-core")
10447 "/share/java/hamcrest-core.jar"))
10448 (("../../lib/junit.jar")
10449 (string-append (assoc-ref inputs "java-junit")
10450 "/share/java/junit.jar")))
10453 (install-jars "dist")))))
10455 `(("java-native-access" ,java-native-access)))
10456 (synopsis "Cross-platform mappings for jna")
10457 (description "java-native-access-platfrom has cross-platform mappings
10458 and mappings for a number of commonly used platform functions, including a
10459 large number of Win32 mappings as well as a set of utility classes that
10460 simplify native access.")))
10462 (define-public java-jsch-agentproxy-core
10464 (name "java-jsch-agentproxy-core")
10468 (uri (string-append "https://github.com/ymnk/jsch-agent-proxy/archive/"
10469 version ".tar.gz"))
10470 (file-name (string-append name "-" version ".tar.gz"))
10473 "02iqg6jbc1kxvfzqcg6wy9ygqxfm82bw5rf6vnswqy4y572niz4q"))))
10474 (build-system ant-build-system)
10476 `(#:jar-name "jsch-agentproxy-core.jar"
10477 #:source-dir "jsch-agent-proxy-core/src/main/java"
10478 #:tests? #f)); no tests
10479 (home-page "https://github.com/ymnk/jsch-agent-proxy")
10480 (synopsis "Core component of the proxy to ssh-agent and Pageant in Java")
10481 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10482 and Pageant included Putty. It will be easily integrated into JSch, and users
10483 will be allowed to use these programs for authentication.")
10484 (license license:bsd-3)))
10486 (define-public java-jsch-agentproxy-sshagent
10488 (inherit java-jsch-agentproxy-core)
10489 (name "java-jsch-agentproxy-sshagent")
10491 `(#:jar-name "jsch-agentproxy-sshagent.jar"
10492 #:source-dir "jsch-agent-proxy-sshagent/src/main/java"
10493 #:tests? #f)); no tests
10495 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
10496 (synopsis "Proxy to ssh-agent")
10497 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10498 and Pageant included in Putty. This component contains the code for a proxy to
10501 (define-public java-jsch-agentproxy-usocket-jna
10503 (inherit java-jsch-agentproxy-core)
10504 (name "java-jsch-agentproxy-usocket-jna")
10506 `(#:jar-name "jsch-agentproxy-usocket-jna.jar"
10507 #:source-dir "jsch-agent-proxy-usocket-jna/src/main/java"
10508 #:tests? #f)); no tests
10510 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
10511 ("java-native-access" ,java-native-access)))
10512 (synopsis "USocketFactory implementation using JNA")
10513 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10514 and Pageant included in Putty. This component contains an implementation of
10515 USocketFactory using @dfn{JNA} (Java Native Access).")))
10517 (define-public java-jsch-agentproxy-pageant
10519 (inherit java-jsch-agentproxy-core)
10520 (name "java-jsch-agentproxy-pageant")
10522 `(#:jar-name "jsch-agentproxy-pageant.jar"
10523 #:source-dir "jsch-agent-proxy-pageant/src/main/java"
10524 #:tests? #f)); no tests
10526 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
10527 ("java-native-access" ,java-native-access)
10528 ("java-native-access-platform" ,java-native-access-platform)))
10529 (synopsis "Proxy to pageant")
10530 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10531 and Pageant included in Putty. This component contains the code for a proxy to
10534 (define-public java-jsch-agentproxy-usocket-nc
10536 (inherit java-jsch-agentproxy-core)
10537 (name "java-jsch-agentproxy-usocket-nc")
10539 `(#:jar-name "jsch-agentproxy-usocket-nc.jar"
10540 #:source-dir "jsch-agent-proxy-usocket-nc/src/main/java"
10541 #:tests? #f)); no tests
10543 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
10544 (synopsis "USocketFactory implementation using netcat")
10545 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10546 and Pageant included in Putty. This component contains an implementation of
10547 USocketFactory using netcat.")))
10549 (define-public java-jsch-agentproxy-connector-factory
10551 (inherit java-jsch-agentproxy-core)
10552 (name "java-jsch-agentproxy-connector-factory")
10554 `(#:jar-name "jsch-agentproxy-connector-factory.jar"
10555 #:source-dir "jsch-agent-proxy-connector-factory/src/main/java"
10556 #:tests? #f)); no tests
10558 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
10559 ("java-jsch-agentproxy-sshagent" ,java-jsch-agentproxy-sshagent)
10560 ("java-jsch-agentproxy-usocket-jna" ,java-jsch-agentproxy-usocket-jna)
10561 ("java-jsch-agentproxy-pageant" ,java-jsch-agentproxy-pageant)
10562 ("java-jsch-agentproxy-usocket-nc" ,java-jsch-agentproxy-usocket-nc)))
10563 (synopsis "Connector factory for jsch agent proxy")
10564 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10565 and Pageant included in Putty. This component contains a connector factory.")))
10567 (define-public java-jsch-agentproxy-jsch
10569 (inherit java-jsch-agentproxy-core)
10570 (name "java-jsch-agentproxy-jsch")
10572 `(#:jar-name "jsch-agentproxy-jsch.jar"
10573 #:source-dir "jsch-agent-proxy-jsch/src/main/java"
10574 #:tests? #f)); no tests
10576 `(("java-jsch" ,java-jsch)
10577 ("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
10578 (synopsis "JSch integration library for agentproxy")
10579 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10580 and Pageant included in Putty. This component contains a library to use
10581 jsch-agent-proxy with JSch.")))
10583 (define-public java-apache-ivy
10585 (name "java-apache-ivy")
10589 (uri (string-append "mirror://apache//ant/ivy/" version
10590 "/apache-ivy-" version "-src.tar.gz"))
10593 "1xkfn57g2m7l6y0xdq75x5rnrgk52m9jx2xah70g3ggl8750hbr0"))
10596 "java-apache-ivy-port-to-latest-bouncycastle.patch"))))
10597 (build-system ant-build-system)
10599 `(#:jar-name "ivy.jar"
10602 (modify-phases %standard-phases
10603 (add-before 'build 'remove-example
10605 (delete-file-recursively "src/example")
10607 (add-before 'build 'copy-resources
10609 (with-directory-excursion "src/java"
10610 (for-each (lambda (file)
10611 (install-file file (string-append "../../build/classes/" (dirname file))))
10613 (find-files "." ".*.css")
10614 (find-files "." ".*.ent")
10615 (find-files "." ".*.html")
10616 (find-files "." ".*.properties")
10617 (find-files "." ".*.xsd")
10618 (find-files "." ".*.xsl")
10619 (find-files "." ".*.xml"))))
10621 (add-before 'build 'fix-vfs
10624 '("src/java/org/apache/ivy/plugins/repository/vfs/VfsRepository.java"
10625 "src/java/org/apache/ivy/plugins/repository/vfs/VfsResource.java")
10626 (("import org.apache.commons.vfs") "import org.apache.commons.vfs2"))
10628 (add-before 'install 'copy-manifest
10630 (install-file "META-INF/MANIFEST.MF" "build/classes/META-INF")
10632 (add-before 'install 'repack
10634 (invoke "jar" "-cmf" "build/classes/META-INF/MANIFEST.MF" "build/jar/ivy.jar"
10635 "-C" "build/classes" ".")))
10636 (add-after 'install 'install-bin
10637 (lambda* (#:key outputs #:allow-other-keys)
10638 (let* ((bin (string-append (assoc-ref outputs "out") "/bin"))
10639 (ivy (string-append bin "/ivy"))
10640 (jar (string-append (assoc-ref outputs "out") "/share/java/ivy.jar")))
10642 (with-output-to-file ivy
10644 (display (string-append
10645 "#!" (which "sh") "\n"
10646 "if [[ -z $CLASSPATH ]]; then\n"
10647 " cp=\"" (getenv "CLASSPATH") ":" jar "\"\n"
10649 " cp=\"" (getenv "CLASSPATH") ":" jar ":$CLASSPATH\"\n"
10651 (which "java") " -cp $cp org.apache.ivy.Main $@\n"))))
10655 `(("java-bouncycastle" ,java-bouncycastle)
10656 ("java-commons-cli" ,java-commons-cli)
10657 ("java-commons-collections" ,java-commons-collections)
10658 ("java-commons-httpclient" ,java-commons-httpclient)
10659 ("java-commons-lang" ,java-commons-lang)
10660 ("java-commons-vfs" ,java-commons-vfs)
10661 ("java-jakarta-oro" ,java-jakarta-oro)
10662 ("java-jsch" ,java-jsch)
10663 ("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
10664 ("java-jsch-agentproxy-connector-factory" ,java-jsch-agentproxy-connector-factory)
10665 ("java-jsch-agentproxy-jsch" ,java-jsch-agentproxy-jsch)
10666 ("java-junit" ,java-junit)))
10667 (home-page "https://ant.apache.org/ivy")
10668 (synopsis "Dependency manager for the Java programming language")
10669 (description "Ivy is a tool for managing (recording, tracking, resolving
10670 and reporting) project dependencies. It is characterized by the following:
10673 @item flexibility and configurability - Ivy is essentially process agnostic
10674 and is not tied to any methodology or structure. Instead it provides the
10675 necessary flexibility and configurability to be adapted to a broad range
10676 of dependency management and build processes.
10677 @item tight integration with Apache Ant - while available as a standalone tool,
10678 Ivy works particularly well with Apache Ant providing a number of
10679 powerful Ant tasks ranging from dependency resolution to dependency
10680 reporting and publication.
10682 (license license:asl2.0)))
10684 (define-public java-eclipse-sisu-inject
10686 (name "java-eclipse-sisu-inject")
10690 (uri (git-reference
10691 (url "https://github.com/eclipse/sisu.inject/")
10692 (commit "releases/0.3.3")))
10693 (file-name (git-file-name name version))
10696 "0gibc9x0bw0f4ls086fx73610fcspz9g2as7kcpcfhvl5znysvg7"))))
10697 (build-system ant-build-system)
10699 `(#:jar-name "eclipse-sisu-inject.jar"
10700 #:source-dir "org.eclipse.sisu.inject/src"
10702 #:tests? #f)); no tests
10704 `(("java-guice" ,java-guice)
10705 ("java-guice-servlet" ,java-guice-servlet)
10706 ("java-javax-inject" ,java-javax-inject)
10707 ("java-javaee-servletapi" ,java-javaee-servletapi)
10708 ("java-junit" ,java-junit)
10709 ("java-slf4j-api" ,java-slf4j-api)
10710 ("java-jsr305" ,java-jsr305)
10711 ("java-jsr250" ,java-jsr250)
10712 ("java-cdi-api" ,java-cdi-api)
10713 ("java-osgi-framework" ,java-osgi-framework)
10714 ("java-osgi-util-tracker" ,java-osgi-util-tracker)
10715 ("java-testng" ,java-testng)))
10716 (home-page "https://www.eclipse.org/sisu/")
10717 (synopsis "Classpath scanning, auto-binding, and dynamic auto-wiring")
10718 (description "Sisu is a modular JSR330-based container that supports
10719 classpath scanning, auto-binding, and dynamic auto-wiring. Sisu uses
10720 Google-Guice to perform dependency injection and provide the core JSR330
10721 support, but removes the need to write explicit bindings in Guice modules.
10722 Integration with other containers via the Eclipse Extension Registry and the
10723 OSGi Service Registry is a goal of this project.")
10724 (license license:epl1.0)))
10726 (define-public java-eclipse-sisu-plexus
10728 (name "java-eclipse-sisu-plexus")
10732 (uri (string-append "https://github.com/eclipse/sisu.plexus/"
10733 "archive/releases/" version ".tar.gz"))
10736 "0lbj7nxy5j0z71k407zbb82icfqh7midrfk0fb3fa3jzdjz0d9d9"))
10737 (modules '((guix build utils)))
10740 (for-each delete-file (find-files "." ".*.jar"))
10741 (rename-file "org.eclipse.sisu.plexus.tests/src"
10742 "org.eclipse.sisu.plexus.tests/java")
10744 (build-system ant-build-system)
10746 `(#:jar-name "eclipse-sisu-plexus.jar"
10747 #:source-dir "org.eclipse.sisu.plexus/src"
10748 #:test-dir "org.eclipse.sisu.plexus.tests"
10751 ;; This test fails probably because we can't generate the necessary
10753 "**/PlexusLoggingTest.*"
10754 ;; FIXME: This test fails because of some injection error
10755 "**/PlexusRequirementTest.*")
10758 (modify-phases %standard-phases
10759 (add-before 'build 'copy-resources
10761 (install-file "org.eclipse.sisu.plexus/META-INF/plexus/components.xml"
10762 "build/classes/META-INF/plexus")
10764 (add-before 'check 'build-test-jar
10766 (with-directory-excursion "org.eclipse.sisu.plexus.tests/resources/component-jar/src/main/"
10768 (with-directory-excursion "java"
10769 (apply invoke "javac" "-cp"
10770 (string-append (getenv "CLASSPATH")
10771 ":../../../../../build/classes")
10772 (find-files "." ".*.java"))
10773 (for-each (lambda (file) (install-file file (string-append "../build/" file)))
10774 (find-files "." ".*.jar")))
10775 (mkdir-p "build/META-INF/plexus")
10776 (copy-file "resources/META-INF/plexus/components.xml"
10777 "build/META-INF/plexus/components.xml")
10778 (with-directory-excursion "build"
10779 (invoke "jar" "cf" "../../../component-jar-0.1.jar" ".")))
10780 (with-directory-excursion "org.eclipse.sisu.plexus.tests/"
10781 (copy-recursively "META-INF" "../build/test-classes/META-INF")
10782 (substitute* "java/org/eclipse/sisu/plexus/DefaultPlexusContainerTest.java"
10783 (("resources/component-jar")
10784 "org.eclipse.sisu.plexus.tests/resources/component-jar")))
10787 `(("java-plexus-classworlds" ,java-plexus-classworlds)
10788 ("java-plexus-util" ,java-plexus-utils)
10789 ("java-plexus-component-annotations" ,java-plexus-component-annotations)
10790 ("java-osgi-framework" ,java-osgi-framework)
10791 ("java-eclipse-sisu-inject" ,java-eclipse-sisu-inject)
10792 ("java-guice" ,java-guice)
10793 ("java-javax-inject" ,java-javax-inject)
10794 ("java-slf4j-api" ,java-slf4j-api)
10795 ("java-junit" ,java-junit)))
10797 `(("java-guava" ,java-guava)
10798 ("java-aopalliance" ,java-aopalliance)
10799 ("java-cglib" ,java-cglib)
10800 ("java-asm" ,java-asm)))
10801 (home-page "https://www.eclipse.org/sisu/")
10802 (synopsis "Plexus support for the sisu container")
10803 (description "Sisu is a modular JSR330-based container that supports
10804 classpath scanning, auto-binding, and dynamic auto-wiring. This package
10805 adds Plexus support to the Sisu-Inject container.")
10806 (license license:epl1.0)))
10808 (define-public java-commons-compiler
10810 (name "java-commons-compiler")
10814 (uri (git-reference
10815 (url "https://github.com/janino-compiler/janino")
10816 (commit "91aa95686d1e4ca3b16a984a03a38686572331b2")))
10817 (file-name (string-append name "-" version))
10820 "04hfdl59sgh20qkxzgnibvs8f9hy6n7znxwpk611y5d89977y62r"))
10821 (modules '((guix build utils)))
10824 (for-each delete-file
10825 (find-files "." "\\.jar$"))
10827 (build-system ant-build-system)
10829 `(#:jar-name "commons-compiler.jar"
10830 #:source-dir "commons-compiler/src/main"
10831 #:tests? #f)); no tests
10832 (home-page "https://github.com/janino-compiler/janino")
10833 (synopsis "Java compiler")
10834 (description "Commons-compiler contains an API for janino, including the
10835 @code{IExpressionEvaluator}, @code{IScriptEvaluator}, @code{IClassBodyEvaluator}
10836 and @code{ISimpleCompiler} interfaces.")
10837 (license license:bsd-3)))
10839 (define-public java-janino
10841 (inherit java-commons-compiler)
10842 (name "java-janino")
10844 `(#:jar-name "janino.jar"
10845 #:source-dir "src/main/java"
10847 (modify-phases %standard-phases
10848 (add-before 'configure 'chdir
10853 `(("java-commons-compiler" ,java-commons-compiler)))
10855 `(("java-junit" ,java-junit)
10856 ("java-hamcrest-core" ,java-hamcrest-core)))
10857 (description "Janino is a Java compiler. Janino can compile a set of
10858 source files to a set of class files like @code{javac}, but also compile a
10859 Java expression, block, class body or source file in memory, load the bytecode
10860 and execute it directly in the same JVM. @code{janino} can also be used for
10861 static code analysis or code manipulation.")))
10863 (define-public java-logback-core
10865 (name "java-logback-core")
10869 (uri (string-append "https://github.com/qos-ch/logback/archive/v_"
10870 version ".tar.gz"))
10871 (file-name (string-append name "-" version ".tar.gz"))
10874 "1x6ga74yfgm94cfx98gybakbrlilx8i2gn6dx13l40kasmys06mi"))
10875 (modules '((guix build utils)))
10878 (delete-file-recursively "logback-access/lib")
10880 (build-system ant-build-system)
10882 `(#:jar-name "logback.jar"
10883 #:source-dir "src/main/java"
10884 #:test-dir "src/test"
10886 ;; These tests fail with Unable to set MockitoNamingPolicy on cglib generator
10887 ;; which creates FastClasses
10888 (list "**/AllCoreTest.*"
10889 "**/AutoFlushingObjectWriterTest.*"
10891 "**/ResilientOutputStreamTest.*"
10892 ;; And we still don't want to run abstract classes
10895 (modify-phases %standard-phases
10896 (add-before 'configure 'chdir
10898 (chdir "logback-core")
10901 `(("java-javax-mail" ,java-javax-mail)
10902 ("servlet" ,java-javaee-servletapi)
10903 ("java-commons-compiler" ,java-commons-compiler)
10904 ("java-janino" ,java-janino)))
10906 `(("java-junit" ,java-junit)
10907 ("java-hamcrest-core" ,java-hamcrest-core)
10908 ("java-mockito-1" ,java-mockito-1)
10909 ("java-cglib" ,java-cglib)
10910 ("java-asm" ,java-asm)
10911 ("java-objenesis" ,java-objenesis)
10912 ("java-joda-time" ,java-joda-time)))
10913 (home-page "https://logback.qos.ch")
10914 (synopsis "Logging for java")
10915 (description "Logback is intended as a successor to the popular log4j project.
10916 This module lays the groundwork for the other two modules.")
10917 ;; Either epl1.0 or lgpl2.1
10918 (license (list license:epl1.0
10919 license:lgpl2.1))))
10921 (define-public java-logback-classic
10923 (inherit java-logback-core)
10924 (name "java-logback-classic")
10926 `(#:jar-name "logback-classic.jar"
10927 #:source-dir "src/main/java"
10928 #:test-dir "src/test"
10929 #:tests? #f; tests require more packages: h2, greenmail, hsql, subethamail, slf4j, log4j, felix
10932 (modify-phases %standard-phases
10933 (add-before 'configure 'chdir
10935 (chdir "logback-classic")
10938 (lambda* (#:key inputs #:allow-other-keys)
10939 (mkdir-p "build/classes")
10940 (setenv "CLASSPATH"
10942 (apply append (map (lambda (input)
10943 (find-files (assoc-ref inputs input)
10945 '("java-logback-core" "java-slf4j-api"
10946 "java-commons-compiler" "servlet"
10949 (apply invoke "groovyc" "-d" "build/classes" "-j"
10950 (find-files "src/main/" ".*\\.(groovy|java)$"))
10951 (invoke "ant" "jar")
10954 `(("java-logback-core" ,java-logback-core)
10955 ("java-slf4j-api" ,java-slf4j-api)
10956 ,@(package-inputs java-logback-core)))
10958 `(("groovy" ,groovy)))
10959 (description "Logback is intended as a successor to the popular log4j project.
10960 This module can be assimilated to a significantly improved version of log4j.
10961 Moreover, @code{logback-classic} natively implements the slf4j API so that you
10962 can readily switch back and forth between logback and other logging frameworks
10963 such as log4j or @code{java.util.logging} (JUL).")))
10965 (define-public java-qdox
10968 ; Newer version exists, but this version is required by java-plexus-component-metadata
10972 ;; 2.0-M4, -M5 at https://github.com/paul-hammant/qdox
10973 ;; Older releases at https://github.com/codehaus/qdox/
10974 ;; Note: The release at maven is pre-generated. The release at
10975 ;; github requires jflex.
10976 (uri (string-append "http://central.maven.org/maven2/"
10977 "com/thoughtworks/qdox/qdox/" version
10978 "/qdox-" version "-sources.jar"))
10981 "10xxrcaicq6axszcr2jpygisa4ch4sinyx5q7kqqxv4lknrmxp5x"))))
10982 (build-system ant-build-system)
10984 `(#:jar-name "qdox.jar"
10985 #:tests? #f)); no tests
10986 (home-page "http://qdox.codehaus.org/")
10987 (synopsis "Parse definitions from Java source files")
10988 (description "QDox is a high speed, small footprint parser for extracting
10989 class/interface/method definitions from source files complete with JavaDoc
10990 @code{@@tags}. It is designed to be used by active code generators or
10991 documentation tools.")
10992 (license license:asl2.0)))
10994 (define-public java-jgit
10997 (version "4.7.0.201704051617-r")
11000 (uri (string-append "https://repo1.maven.org/maven2/"
11001 "org/eclipse/jgit/org.eclipse.jgit/"
11002 version "/org.eclipse.jgit-"
11003 version "-sources.jar"))
11006 "13ii4jn02ynzq6i7gsyi21k2i94jpc85wf6bcm31q4cyvzv0mk4k"))))
11007 (build-system ant-build-system)
11009 `(#:tests? #f ; There are no tests to run.
11010 #:jar-name "jgit.jar"
11011 ;; JGit must be built with a JDK supporting Java 8.
11013 ;; Target our older default JDK.
11014 #:make-flags (list "-Dtarget=1.7")
11016 (modify-phases %standard-phases
11017 ;; The jar file generated by the default build.xml does not include
11018 ;; the text properties files, so we need to add them.
11019 (add-after 'build 'add-properties
11020 (lambda* (#:key jar-name #:allow-other-keys)
11021 (with-directory-excursion "src"
11022 (apply invoke "jar" "-uf"
11023 (string-append "../build/jar/" jar-name)
11024 (find-files "." "\\.properties$")))
11027 `(("java-classpathx-servletapi" ,java-classpathx-servletapi)
11028 ("java-javaewah" ,java-javaewah)
11029 ("java-jsch" ,java-jsch)
11030 ("java-slf4j-api" ,java-slf4j-api)))
11031 (home-page "https://eclipse.org/jgit/")
11032 (synopsis "Java library implementing the Git version control system")
11033 (description "JGit is a lightweight, pure Java library implementing the
11034 Git version control system, providing repository access routines, support for
11035 network protocols, and core version control algorithms.")
11036 (license license:edl1.0)))
11038 ;; For axoloti. This package can still be built with icedtea-7, which is
11039 ;; currently used as the default JDK.
11040 (define-public java-jgit-4.2
11041 (package (inherit java-jgit)
11042 (version "4.2.0.201601211800-r")
11045 (uri (string-append "https://repo1.maven.org/maven2/"
11046 "org/eclipse/jgit/org.eclipse.jgit/"
11047 version "/org.eclipse.jgit-"
11048 version "-sources.jar"))
11051 "15gm537iivhnzlkjym4x3wn5jqdjdragsw9pdpzqqg21nrc817mm"))))
11052 (build-system ant-build-system)
11054 (substitute-keyword-arguments (package-arguments java-jgit)
11055 ;; Build for default JDK.
11056 ((#:jdk _) icedtea-7)
11058 `(modify-phases ,phases
11059 (add-after 'unpack 'use-latest-javaewah-API
11061 (substitute* "src/org/eclipse/jgit/internal/storage/file/BitmapIndexImpl.java"
11062 (("wordinbits") "WORD_IN_BITS"))
11065 `(("java-javaewah" ,java-javaewah)
11066 ("java-jsch" ,java-jsch)
11067 ("java-slf4j-api" ,java-slf4j-api)))))