1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2015, 2016, 2017, 2018 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 Tobias Geerinckx-Rice <me@tobias.gr>
10 ;;; Copyright © 2018 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 fontutils)
50 #:use-module (gnu packages gawk)
51 #:use-module (gnu packages gettext)
52 #:use-module (gnu packages gcc)
53 #:use-module (gnu packages gl)
54 #:use-module (gnu packages gnuzilla) ;nss
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 libffi)
63 #:use-module (gnu packages linux) ;alsa
64 #:use-module (gnu packages maths)
65 #:use-module (gnu packages onc-rpc)
66 #:use-module (gnu packages web)
67 #:use-module (gnu packages wget)
68 #:use-module (gnu packages pkg-config)
69 #:use-module (gnu packages perl)
70 #:use-module (gnu packages popt)
71 #:use-module (gnu packages kerberos)
72 #:use-module (gnu packages xml)
73 #:use-module (gnu packages xorg)
74 #:use-module (gnu packages texinfo)
75 #:use-module ((srfi srfi-1) #:select (fold alist-delete))
76 #:use-module (srfi srfi-11)
77 #:use-module (ice-9 match))
81 ;;; Java bootstrap toolchain.
84 ;; The Java bootstrap begins with Jikes, a Java compiler written in C++. We
85 ;; use it to build a simple version of GNU Classpath, the Java standard
86 ;; library. We chose version 0.93 because it is the last version that can be
87 ;; built with Jikes. With Jikes and this version of GNU Classpath we can
88 ;; build JamVM, a Java Virtual Machine. We build version 1.5.1 because it is
89 ;; the last version of JamVM that works with a version of GNU classpath that
90 ;; does not require ECJ. These three packages make up the bootstrap JDK.
92 ;; This is sufficient to build an older version of Ant, which is needed to
93 ;; build an older version of ECJ, an incremental Java compiler, both of which
94 ;; are written in Java.
96 ;; ECJ is needed to build the latest release (0.99) and the development
97 ;; version of GNU Classpath. The development version of GNU Classpath has
98 ;; much more support for Java 1.6 than the latest release, but we need to
99 ;; build 0.99 first to get a working version of javah. ECJ, the development
100 ;; version of GNU Classpath, and the latest version of JamVM make up the
101 ;; second stage JDK with which we can build the OpenJDK with the Icedtea 1.x
102 ;; build framework. We then build the more recent JDKs Icedtea 2.x and
111 (uri (string-append "mirror://sourceforge/jikes/Jikes/"
112 version "/jikes-" version ".tar.bz2"))
115 "1qqldrp74pzpy5ly421srqn30qppmm9cvjiqdngk8hf47dv2rc0c"))))
116 (build-system gnu-build-system)
117 (home-page "http://jikes.sourceforge.net/")
118 (synopsis "Compiler for the Java language")
119 (description "Jikes is a compiler that translates Java source files as
120 defined in The Java Language Specification into the bytecoded instruction set
121 and binary format defined in The Java Virtual Machine Specification.")
122 (license license:ibmpl1.0)))
124 ;; This is the last version of GNU Classpath that can be built without ECJ.
125 (define classpath-bootstrap
131 (uri (string-append "mirror://gnu/classpath/classpath-"
135 "0i99wf9xd3hw1sj2sazychb9prx8nadxh2clgvk3zlmb28v0jbfz"))
136 (patches (search-patches "classpath-aarch64-support.patch"))))
137 (build-system gnu-build-system)
140 (list (string-append "JAVAC="
141 (assoc-ref %build-inputs "jikes")
146 "--disable-gconf-peer"
152 (modify-phases %standard-phases
153 (add-after 'install 'install-data
154 (lambda _ (invoke "make" "install-data"))))))
159 ("pkg-config" ,pkg-config)))
160 (home-page "https://www.gnu.org/software/classpath/")
161 (synopsis "Essential libraries for Java")
162 (description "GNU Classpath is a project to create core class libraries
163 for use with runtimes, compilers and tools for the Java programming
165 ;; GPLv2 or later, with special linking exception.
166 (license license:gpl2+)))
168 ;; This is the last version of JamVM that works with a version of GNU
169 ;; classpath that does not require ECJ.
170 (define jamvm-1-bootstrap
176 (uri (string-append "mirror://sourceforge/jamvm/jamvm/"
177 "JamVM%20" version "/jamvm-"
179 (patches (search-patches "jamvm-arm.patch"))
182 "06lhi03l3b0h48pc7x58bk9my2nrcf1flpmglvys3wyad6yraf36"))))
183 (build-system gnu-build-system)
186 (list (string-append "--with-classpath-install-dir="
187 (assoc-ref %build-inputs "classpath")))))
189 `(("classpath" ,classpath-bootstrap)
192 (home-page "http://jamvm.sourceforge.net/")
193 (synopsis "Small Java Virtual Machine")
194 (description "JamVM is a Java Virtual Machine conforming to the JVM
195 specification edition 2 (blue book). It is extremely small. However, unlike
196 other small VMs it supports the full spec, including object finalisation and
198 (license license:gpl2+)))
200 (define ant-bootstrap
202 (name "ant-bootstrap")
203 ;; The 1.10.x series requires Java 8. 1.9.0 and later use generics, which
204 ;; are not supported. The 1.8.x series is the last to use only features
205 ;; supported by Jikes.
209 (uri (string-append "http://archive.apache.org/dist/"
210 "ant/source/apache-ant-"
211 version "-src.tar.bz2"))
214 "1cg0lga887qz5iizh6mlkxp01lciymrhmp7wzxpl6zpnldxmzrjx"))))
215 (build-system gnu-build-system)
217 `(#:imported-modules ((guix build syscalls)
218 ,@%gnu-build-system-modules)
219 #:modules ((srfi srfi-1)
220 (guix build gnu-build-system)
222 (guix build syscalls))
223 #:tests? #f ; no "check" target
225 (modify-phases %standard-phases
229 (lambda* (#:key inputs #:allow-other-keys)
230 (setenv "JAVA_HOME" (assoc-ref inputs "jamvm"))
232 (string-append (assoc-ref inputs "jamvm")
235 (string-append (assoc-ref inputs "jikes")
238 (string-append (assoc-ref inputs "jamvm")
241 ;; Ant complains if this file doesn't exist.
242 (setenv "HOME" "/tmp")
243 (with-output-to-file "/tmp/.ant.properties"
244 (lambda _ (display "")))
246 ;; Use jikes instead of javac for <javac ...> tags in build.xml
247 (setenv "ANT_OPTS" "-Dbuild.compiler=jikes")
249 ;; jikes produces lots of warnings, but they are not very
250 ;; interesting, so we silence them.
251 (setenv "$BOOTJAVAC_OPTS" "-nowarn")
253 ;; Without these JamVM options the build may freeze.
254 (substitute* "bootstrap.sh"
255 (("^\"\\$\\{JAVACMD\\}\" " m)
256 ,@(if (string-prefix? "armhf" (or (%current-system)
257 (%current-target-system)))
258 `((string-append m "-Xnocompact "))
259 `((string-append m "-Xnocompact -Xnoinlining ")))))
261 ;; Disable tests because we are bootstrapping and thus don't have
262 ;; any of the dependencies required to build and run the tests.
263 (substitute* "build.xml"
264 (("depends=\"jars,test-jar\"") "depends=\"jars\""))
265 (invoke "bash" "bootstrap.sh"
266 (string-append "-Ddist.dir="
267 (assoc-ref %outputs "out")))))
268 (add-after 'build 'strip-jar-timestamps ;based on ant-build-system
269 (lambda* (#:key outputs #:allow-other-keys)
270 (define (repack-archive jar)
271 (let* ((dir (mkdtemp! "jar-contents.XXXXXX"))
272 (manifest (string-append dir "/META-INF/MANIFESTS.MF")))
273 (with-directory-excursion dir
274 (invoke "unzip" jar))
276 ;; XXX: copied from (gnu build install)
277 (for-each (lambda (file)
278 (let ((s (lstat file)))
279 (unless (eq? (stat:type s) 'symlink)
280 (utime file 0 0 0 0))))
281 (find-files dir #:directories? #t))
282 ;; It is important that the manifest appears first.
283 (with-directory-excursion dir
284 (let* ((files (find-files "." ".*" #:directories? #t))
285 ;; To ensure that the reference scanner can
286 ;; detect all store references in the jars
287 ;; we disable compression with the "-0" option.
288 (command (if (file-exists? manifest)
289 `("zip" "-0" "-X" ,jar ,manifest
291 `("zip" "-0" "-X" ,jar ,@files))))
292 (apply invoke command)))))
293 (for-each repack-archive
295 (string-append (assoc-ref %outputs "out") "/lib")
301 ("jamvm" ,jamvm-1-bootstrap)
304 (home-page "http://ant.apache.org")
305 (synopsis "Build tool for Java")
307 "Ant is a platform-independent build tool for Java. It is similar to
308 make but is implemented using the Java language, requires the Java platform,
309 and is best suited to building Java projects. Ant uses XML to describe the
310 build process and its dependencies, whereas Make uses Makefile format.")
311 (license license:asl2.0)))
313 ;; Version 3.2.2 is the last version without a dependency on a full-fledged
314 ;; compiler for Java 1.5.
315 (define ecj-bootstrap
317 (name "ecj-bootstrap")
321 (uri (string-append "http://archive.eclipse.org/eclipse/"
322 "downloads/drops/R-" version
323 "-200702121330/ecjsrc.zip"))
326 "05hj82kxd23qaglsjkaqcj944riisjha7acf7h3ljhrjyljx8307"))))
327 ;; It would be so much easier if we could use the ant-build-system, but we
328 ;; cannot as we don't have ant at this point. We use ecj for
329 ;; bootstrapping the JDK.
330 (build-system gnu-build-system)
332 `(#:modules ((guix build gnu-build-system)
335 #:tests? #f ; there are no tests
337 (modify-phases %standard-phases
339 (lambda* (#:key inputs #:allow-other-keys)
342 (cons (string-append (assoc-ref inputs "jamvm")
344 (find-files (string-append
345 (assoc-ref inputs "ant-bootstrap")
351 (lambda* (#:key inputs #:allow-other-keys)
352 ;; The unpack phase enters the "org" directory by mistake.
355 ;; Create a simple manifest to make ecj executable.
356 (with-output-to-file "manifest"
358 (display "Manifest-Version: 1.0
359 Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n")))
362 (and (apply invoke "jikes"
363 (find-files "." "\\.java$"))
364 (invoke "fastjar" "cvfm"
365 "ecj-bootstrap.jar" "manifest" "."))))
367 (lambda* (#:key outputs #:allow-other-keys)
368 (let ((share (string-append (assoc-ref outputs "out")
371 (install-file "ecj-bootstrap.jar" share)
374 `(("ant-bootstrap" ,ant-bootstrap)
377 ("jamvm" ,jamvm-1-bootstrap)
378 ("fastjar" ,fastjar)))
379 (home-page "https://eclipse.org")
380 (synopsis "Eclipse Java development tools core batch compiler")
381 (description "This package provides the Eclipse Java core batch compiler
382 for bootstrapping purposes. The @dfn{Eclipse compiler for Java} (ecj) is a
383 requirement for all GNU Classpath releases after version 0.93.")
384 (license license:epl1.0)))
386 (define ecj-javac-wrapper
387 (package (inherit ecj-bootstrap)
388 (name "ecj-javac-wrapper")
390 (build-system trivial-build-system)
392 `(#:modules ((guix build utils))
395 (use-modules (guix build utils))
396 (let* ((bin (string-append (assoc-ref %outputs "out") "/bin"))
397 (target (string-append bin "/javac"))
398 (guile (string-append (assoc-ref %build-inputs "guile")
400 (ecj (string-append (assoc-ref %build-inputs "ecj-bootstrap")
401 "/share/java/ecj-bootstrap.jar"))
402 (java (string-append (assoc-ref %build-inputs "jamvm")
404 (bootcp (let ((jvmlib (string-append (assoc-ref %build-inputs "classpath")
405 "/share/classpath")))
406 (string-append jvmlib "/glibj.zip:"
407 jvmlib "/tools.zip"))))
409 (with-output-to-file target
411 (format #t "#!~a --no-auto-compile\n!#\n" guile)
413 `(begin (use-modules (ice-9 match)
419 '(("-bootclasspath" ,bootcp)
424 (let ((classpath (getenv "CLASSPATH")))
426 (string-join (list ,ecj
427 ,(string-append (assoc-ref %build-inputs "jamvm")
431 (receive (vm-args other-args)
432 ;; Separate VM arguments from arguments to ECJ.
433 (partition (cut string-prefix? "-J" <>)
434 (fold (lambda (default acc)
435 (if (member (first default) acc)
436 acc (append default acc)))
440 ;; Remove "-J" prefix
441 (map (cut string-drop <> 2) vm-args)
442 '("org.eclipse.jdt.internal.compiler.batch.Main")
443 (cons "-nowarn" other-args)))))
445 (let ((args (cdr (command-line))))
447 (format (current-error-port) "javac: no arguments given!\n")
452 `(("guile" ,guile-2.2)
453 ("ecj-bootstrap" ,ecj-bootstrap)
454 ("jamvm" ,jamvm-1-bootstrap)
455 ("classpath" ,classpath-bootstrap)))
456 (description "This package provides a wrapper around the @dfn{Eclipse
457 compiler for Java} (ecj) with a command line interface that is compatible with
458 the standard javac executable.")))
460 ;; The classpath-bootstrap was built without a virtual machine, so it does not
461 ;; provide a wrapper for javah. We cannot build the development version of
462 ;; Classpath without javah.
463 (define classpath-0.99
464 (package (inherit classpath-bootstrap)
468 (uri (string-append "mirror://gnu/classpath/classpath-"
472 "1j7cby4k66f1nvckm48xcmh352b1d1b33qk7l6hi7dp9i9zjjagr"))
473 (patches (search-patches "classpath-aarch64-support.patch"))))
476 (list (string-append "--with-ecj-jar="
477 (assoc-ref %build-inputs "ecj-bootstrap")
478 "/share/java/ecj-bootstrap.jar")
479 (string-append "JAVAC="
480 (assoc-ref %build-inputs "ecj-javac-wrapper")
482 (string-append "JAVA="
483 (assoc-ref %build-inputs "jamvm")
486 "ac_cv_prog_java_works=yes" ; trust me
490 "--disable-gconf-peer"
496 (modify-phases %standard-phases
497 (add-after 'install 'install-data
498 (lambda _ (invoke "make" "install-data"))))))
500 `(("ecj-bootstrap" ,ecj-bootstrap)
501 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
503 ("jamvm" ,jamvm-1-bootstrap)
504 ("classpath" ,classpath-bootstrap)
506 ("pkg-config" ,pkg-config)))))
508 ;; We need this because classpath-bootstrap does not provide all of the tools
509 ;; we need to build classpath-devel.
510 (define classpath-jamvm-wrappers
511 (package (inherit classpath-0.99)
512 (name "classpath-jamvm-wrappers")
514 (build-system trivial-build-system)
516 `(#:modules ((guix build utils))
519 (use-modules (guix build utils))
520 (let* ((bash (assoc-ref %build-inputs "bash"))
521 (jamvm (assoc-ref %build-inputs "jamvm"))
522 (classpath (assoc-ref %build-inputs "classpath"))
523 (bin (string-append (assoc-ref %outputs "out")
526 (for-each (lambda (tool)
527 (with-output-to-file (string-append bin tool)
529 ,@(if (string-prefix? "armhf" (or (%current-system)
530 (%current-target-system)))
531 `((format #t "#!~a/bin/sh
532 ~a/bin/jamvm -Xnocompact -classpath ~a/share/classpath/tools.zip \
533 gnu.classpath.tools.~a.~a $@"
534 bash jamvm classpath tool
535 (if (string=? "native2ascii" tool)
536 "Native2ASCII" "Main")))
537 `((format #t "#!~a/bin/sh
538 ~a/bin/jamvm -Xnocompact -Xnoinlining -classpath ~a/share/classpath/tools.zip \
539 gnu.classpath.tools.~a.~a $@"
540 bash jamvm classpath tool
541 (if (string=? "native2ascii" tool)
542 "Native2ASCII" "Main"))))))
543 (chmod (string-append bin tool) #o755))
553 ("jamvm" ,jamvm-1-bootstrap)
554 ("classpath" ,classpath-0.99)))
556 (synopsis "Executables from GNU Classpath")
557 (description "This package provides wrappers around the tools provided by
558 the GNU Classpath library. They are executed by the JamVM virtual
561 ;; The last release of GNU Classpath is 0.99 and it happened in 2012. Since
562 ;; then Classpath has gained much more support for Java 1.6.
563 (define-public classpath-devel
564 (let ((commit "e7c13ee0cf2005206fbec0eca677f8cf66d5a103")
566 (package (inherit classpath-bootstrap)
567 (version (string-append "0.99-" revision "." (string-take commit 9)))
571 (url "https://git.savannah.gnu.org/git/classpath.git")
573 (file-name (string-append "classpath-" version "-checkout"))
576 "1v2rww76ww322mpg3s12a1kkc6gkp31bm9gcxs532h0wq285fiw4"))))
579 ;; Ensure that the initial heap size is smaller than the maximum
580 ;; size. By default only Xmx is set, which can lead to invalid
581 ;; memory settings on some machines with a lot of memory.
582 '("JAVAC_MEM_OPT=-J-Xms512M -J-Xmx768M")
584 (list (string-append "--with-ecj-jar="
585 (assoc-ref %build-inputs "ecj-bootstrap")
586 "/share/java/ecj-bootstrap.jar")
587 (string-append "--with-javac="
588 (assoc-ref %build-inputs "ecj-javac-wrapper")
590 (string-append "JAVA="
591 (assoc-ref %build-inputs "jamvm")
594 "ac_cv_prog_java_works=yes" ; trust me
598 "--disable-gconf-peer"
604 (modify-phases %standard-phases
605 ;; XXX The bootstrap phase executes autogen.sh, which fails after
606 ;; complaining about the lack of gettext.
608 (lambda _ (invoke "autoreconf" "-vif")))
609 (add-after 'unpack 'remove-unsupported-annotations
611 (substitute* (find-files "java" "\\.java$")
614 (add-after 'install 'install-data
615 (lambda _ (invoke "make" "install-data"))))))
617 `(("autoconf" ,autoconf)
618 ("automake" ,automake)
620 ("gettext" ,gettext-minimal)
622 ("classpath-jamvm-wrappers" ,classpath-jamvm-wrappers) ; for javah
623 ("ecj-bootstrap" ,ecj-bootstrap)
624 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
626 ("jamvm" ,jamvm-1-bootstrap)
628 ("pkg-config" ,pkg-config))))))
631 (package (inherit jamvm-1-bootstrap)
635 (uri (string-append "mirror://sourceforge/jamvm/jamvm/"
636 "JamVM%20" version "/jamvm-"
640 "1nl0zxz8y5x8gwsrm7n32bry4dx8x70p8z3s9jbdvs8avyb8whkn"))))
641 (build-system gnu-build-system)
644 (list (string-append "--with-classpath-install-dir="
645 (assoc-ref %build-inputs "classpath")))))
647 `(("classpath" ,classpath-devel)
648 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
651 (define ecj-javac-wrapper-final
652 (package (inherit ecj-javac-wrapper)
654 `(("guile" ,guile-2.2)
655 ("ecj-bootstrap" ,ecj-bootstrap)
657 ("classpath" ,classpath-devel)))))
659 ;; The bootstrap JDK consisting of jamvm, classpath-devel,
660 ;; ecj-javac-wrapper-final cannot build Icedtea 2.x directly, because it's
661 ;; written in Java 7. It can, however, build the unmaintained Icedtea 1.x,
662 ;; which uses Java 6 only.
663 (define-public icedtea-6
670 "http://icedtea.wildebeest.org/download/source/icedtea6-"
674 "0bg9sb4f7qbq77c0zf9m17p47ga0kf0r9622g9p12ysg26jd1ksg"))
675 (modules '((guix build utils)))
678 (substitute* "Makefile.in"
679 ;; do not leak information about the build host
680 (("DISTRIBUTION_ID=\"\\$\\(DIST_ID\\)\"")
681 "DISTRIBUTION_ID=\"\\\"guix\\\"\""))
683 (build-system gnu-build-system)
684 (outputs '("out" ; Java Runtime Environment
685 "jdk" ; Java Development Kit
686 "doc")) ; all documentation
688 `(;; There are many failing tests and many are known to fail upstream.
691 ;; The DSOs use $ORIGIN to refer to each other, but (guix build
692 ;; gremlin) doesn't support it yet, so skip this phase.
693 #:validate-runpath? #f
695 #:modules ((guix build utils)
696 (guix build gnu-build-system)
700 `("--enable-bootstrap"
703 "--with-parallel-jobs"
704 "--disable-downloading"
706 ,(string-append "--with-ecj="
707 (assoc-ref %build-inputs "ecj")
708 "/share/java/ecj-bootstrap.jar")
709 ,(string-append "--with-jar="
710 (assoc-ref %build-inputs "fastjar")
712 ,(string-append "--with-jdk-home="
713 (assoc-ref %build-inputs "classpath"))
714 ,(string-append "--with-java="
715 (assoc-ref %build-inputs "jamvm")
718 (modify-phases %standard-phases
720 (lambda* (#:key source inputs #:allow-other-keys)
721 (invoke "tar" "xvf" source)
722 (chdir (string-append "icedtea6-" ,version))
724 (copy-recursively (assoc-ref inputs "openjdk-src") "openjdk")
725 ;; The convenient OpenJDK source bundle is no longer
726 ;; available for download, so we have to take the sources
727 ;; from the Mercurial repositories and change the Makefile
728 ;; to avoid tests for the OpenJDK zip archive.
729 (with-directory-excursion "openjdk"
730 (for-each (lambda (part)
734 (string-append part "-src"))
737 "langtools" "jaxp" "jaxws")))
738 (with-directory-excursion "openjdk"
739 (invoke "tar" "xvf" (assoc-ref inputs "hotspot-src"))
740 (rename-file "hg-checkout" "hotspot"))
741 (substitute* "Makefile.in"
742 (("echo \"ERROR: No up-to-date OpenJDK zip available\"; exit -1;")
743 "echo \"trust me\";")
744 ;; The contents of the bootstrap directory must be
745 ;; writeable but when copying from the store they are
747 (("mkdir -p lib/rt" line)
748 (string-append line "; chmod -R u+w $(BOOT_DIR)")))
749 (invoke "chmod" "-R" "u+w" "openjdk")))
750 (add-after 'unpack 'use-classpath
751 (lambda* (#:key inputs #:allow-other-keys)
752 (let ((jvmlib (assoc-ref inputs "classpath"))
753 (jamvm (assoc-ref inputs "jamvm")))
754 ;; Classpath does not provide rt.jar.
755 (substitute* "Makefile.in"
756 (("\\$\\(SYSTEM_JDK_DIR\\)/jre/lib/rt.jar")
757 (string-append jvmlib "/share/classpath/glibj.zip")))
758 ;; Make sure we can find all classes.
760 (string-append jvmlib "/share/classpath/glibj.zip:"
761 jvmlib "/share/classpath/tools.zip:"
762 jamvm "/lib/rt.jar"))
764 (string-append "-cp "
765 jvmlib "/share/classpath/glibj.zip:"
766 jvmlib "/share/classpath/tools.zip")))
768 (add-after 'unpack 'patch-patches
770 ;; shebang in patches so that they apply cleanly
771 (substitute* '("patches/jtreg-jrunscript.patch"
772 "patches/hotspot/hs23/drop_unlicensed_test.patch")
773 (("#!/bin/sh") (string-append "#!" (which "sh"))))
775 (add-after 'unpack 'patch-paths
776 (lambda* (#:key inputs #:allow-other-keys)
777 ;; buildtree.make generates shell scripts, so we need to replace
778 ;; the generated shebang
779 (substitute* '("openjdk/hotspot/make/linux/makefiles/buildtree.make")
780 (("/bin/sh") (which "bash")))
782 (let ((corebin (string-append
783 (assoc-ref inputs "coreutils") "/bin/"))
784 (binbin (string-append
785 (assoc-ref inputs "binutils") "/bin/"))
786 (grepbin (string-append
787 (assoc-ref inputs "grep") "/bin/")))
788 (substitute* '("openjdk/jdk/make/common/shared/Defs-linux.gmk"
789 "openjdk/corba/make/common/shared/Defs-linux.gmk")
790 (("UNIXCOMMAND_PATH = /bin/")
791 (string-append "UNIXCOMMAND_PATH = " corebin))
792 (("USRBIN_PATH = /usr/bin/")
793 (string-append "USRBIN_PATH = " corebin))
794 (("DEVTOOLS_PATH *= */usr/bin/")
795 (string-append "DEVTOOLS_PATH = " corebin))
796 (("COMPILER_PATH *= */usr/bin/")
797 (string-append "COMPILER_PATH = "
798 (assoc-ref inputs "gcc") "/bin/"))
799 (("DEF_OBJCOPY *=.*objcopy")
800 (string-append "DEF_OBJCOPY = " (which "objcopy"))))
802 ;; fix path to alsa header
803 (substitute* "openjdk/jdk/make/common/shared/Sanity.gmk"
804 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
805 (string-append "ALSA_INCLUDE="
806 (assoc-ref inputs "alsa-lib")
807 "/include/alsa/version.h")))
809 ;; fix hard-coded utility paths
810 (substitute* '("openjdk/jdk/make/common/shared/Defs-utils.gmk"
811 "openjdk/corba/make/common/shared/Defs-utils.gmk")
813 (string-append "ECHO = " (which "echo")))
815 (string-append "GREP = " (which "grep")))
817 (string-append "EGREP = " (which "egrep")))
819 (string-append "CPIO = " (which "cpio")))
820 (("READELF *=.*readelf")
821 (string-append "READELF = " (which "readelf")))
823 (string-append "AR = " (which "ar")))
825 (string-append "TAR = " (which "tar")))
827 (string-append "AS = " (which "as")))
829 (string-append "LD = " (which "ld")))
831 (string-append "STRIP = " (which "strip")))
833 (string-append "NM = " (which "nm")))
835 (string-append "SH = " (which "bash")))
837 (string-append "FIND = " (which "find")))
839 (string-append "LDD = " (which "ldd")))
840 (("NAWK *=.*(n|g)awk")
841 (string-append "NAWK = " (which "gawk")))
843 (string-append "XARGS = " (which "xargs")))
845 (string-append "UNZIP = " (which "unzip")))
847 (string-append "ZIPEXE = " (which "zip")))
849 (string-append "SED = " (which "sed"))))
851 ;; Some of these timestamps cause problems as they are more than
852 ;; 10 years ago, failing the build process.
854 "openjdk/jdk/src/share/classes/java/util/CurrencyData.properties"
855 (("AZ=AZM;2005-12-31-20-00-00;AZN") "AZ=AZN")
856 (("MZ=MZM;2006-06-30-22-00-00;MZN") "MZ=MZN")
857 (("RO=ROL;2005-06-30-21-00-00;RON") "RO=RON")
858 (("TR=TRL;2004-12-31-22-00-00;TRY") "TR=TRY"))
860 (add-before 'configure 'set-additional-paths
861 (lambda* (#:key inputs #:allow-other-keys)
863 (string-append (assoc-ref inputs "libxrender")
864 "/include/X11/extensions" ":"
865 (assoc-ref inputs "libxtst")
866 "/include/X11/extensions" ":"
867 (assoc-ref inputs "libxinerama")
868 "/include/X11/extensions" ":"
869 (or (getenv "CPATH") "")))
870 (setenv "ALT_CUPS_HEADERS_PATH"
871 (string-append (assoc-ref inputs "cups")
873 (setenv "ALT_FREETYPE_HEADERS_PATH"
874 (string-append (assoc-ref inputs "freetype")
876 (setenv "ALT_FREETYPE_LIB_PATH"
877 (string-append (assoc-ref inputs "freetype")
881 (lambda* (#:key outputs #:allow-other-keys)
882 (let ((doc (string-append (assoc-ref outputs "doc")
883 "/share/doc/icedtea"))
884 (jre (assoc-ref outputs "out"))
885 (jdk (assoc-ref outputs "jdk")))
886 (copy-recursively "openjdk.build/docs" doc)
887 (copy-recursively "openjdk.build/j2re-image" jre)
888 (copy-recursively "openjdk.build/j2sdk-image" jdk))
891 `(("ant" ,ant-bootstrap)
892 ("alsa-lib" ,alsa-lib)
894 ("classpath" ,classpath-devel)
895 ("coreutils" ,coreutils)
898 ("ecj" ,ecj-bootstrap)
899 ("ecj-javac" ,ecj-javac-wrapper-final)
901 ("fontconfig" ,fontconfig)
902 ("freetype" ,freetype)
903 ("gcc" ,gcc-4.9) ; there's a segmentation fault when compiling with gcc-5 or gcc-7
915 ("libxcomposite" ,libxcomposite)
917 ("libxinerama" ,libxinerama)
918 ("libxrender" ,libxrender)
919 ("libxslt" ,libxslt) ;for xsltproc
922 ("mit-krb5" ,mit-krb5)
924 ("nss-certs" ,nss-certs)
926 ("pkg-config" ,pkg-config)
927 ("procps" ,procps) ;for "free", even though I'm not sure we should use it
937 (url "http://hg.openjdk.java.net/jdk6/jdk6/")
938 (changeset "jdk6-b41")))
941 "14q47yfg586fs64w30g8mk92m5dkxsvr36zzh0ra99xk5x0x96mv"))))
946 (url "http://hg.openjdk.java.net/jdk6/jdk6/jdk/")
947 (changeset "jdk6-b41")))
950 "165824nhg1k1dx6zs9dny0j49rmk35jw5b13dmz8c77jfajml4v9"))))
955 (url "http://hg.openjdk.java.net/jdk6/jdk6/hotspot/")
956 (changeset "jdk6-b41")))
959 "07lc1z4k5dj9nrc1wvwmpvxr3xgxrdkdh53xb95skk5ij49yagfd"))
961 (search-patches "icedtea-6-hotspot-gcc-segfault-workaround.patch"))))
966 (url "http://hg.openjdk.java.net/jdk6/jdk6/corba/")
967 (changeset "jdk6-b41")))
970 "1p9g1r9dnax2iwp7yb59qx7m4nmshqhwmrb2b8jj8zgbd9dl2i3q"))))
975 (url "http://hg.openjdk.java.net/jdk6/jdk6/langtools/")
976 (changeset "jdk6-b41")))
979 "1x52wd67fynbbd9ild6fb4wvba3f5hhwk03qdjfazd0a1qr37z3d"))))
984 (url "http://hg.openjdk.java.net/jdk6/jdk6/jaxp/")
985 (changeset "jdk6-b41")))
988 "0shlqrvzpr4nrkmv215lbxnby63s3yvbdh1yxcayznsyqwa4nlxm"))))
993 (url "http://hg.openjdk.java.net/jdk6/jdk6/jaxws/")
994 (changeset "jdk6-b41")))
997 "0835lkw8vib1xhp8lxnybhlvzdh699hbi4mclxanydjk63zbpxk0"))))))
998 (home-page "http://icedtea.classpath.org")
999 (synopsis "Java development kit")
1001 "This package provides the OpenJDK built with the IcedTea build harness.
1002 This version of the OpenJDK is no longer maintained and is only used for
1003 bootstrapping purposes.")
1004 ;; IcedTea is released under the GPL2 + Classpath exception, which is the
1005 ;; same license as both GNU Classpath and OpenJDK.
1006 (license license:gpl2+)))
1008 (define-public icedtea-7
1009 (let* ((version "2.6.13")
1010 (drop (lambda (name hash)
1014 "http://icedtea.classpath.org/download/drops"
1015 "/icedtea7/" version "/" name ".tar.bz2"))
1016 (sha256 (base32 hash))))))
1023 "http://icedtea.wildebeest.org/download/source/icedtea-"
1027 "1w331rdqx1dcx2xb0fmjmrkdc71xqn20fxsgw8by4xhiblh88khh"))
1028 (modules '((guix build utils)))
1031 (substitute* "Makefile.in"
1032 ;; do not leak information about the build host
1033 (("DISTRIBUTION_ID=\"\\$\\(DIST_ID\\)\"")
1034 "DISTRIBUTION_ID=\"\\\"guix\\\"\""))
1036 (build-system gnu-build-system)
1037 (outputs '("out" ; Java Runtime Environment
1038 "jdk" ; Java Development Kit
1039 "doc")) ; all documentation
1041 `(;; There are many test failures. Some are known to
1042 ;; fail upstream, others relate to not having an X
1043 ;; server running at test time, yet others are a
1044 ;; complete mystery to me.
1046 ;; hotspot: passed: 241; failed: 45; error: 2
1047 ;; langtools: passed: 1,934; failed: 26
1051 ;; The DSOs use $ORIGIN to refer to each other, but (guix build
1052 ;; gremlin) doesn't support it yet, so skip this phase.
1053 #:validate-runpath? #f
1055 ;; Apparently, the C locale is needed for some of the tests.
1058 #:modules ((guix build utils)
1059 (guix build gnu-build-system)
1066 ;; TODO: package pcsc and sctp, and add to inputs
1067 `("--disable-system-pcsc"
1068 "--disable-system-sctp"
1069 "--enable-bootstrap"
1072 "--disable-downloading"
1073 "--disable-tests" ;they are run in the check phase instead
1074 "--with-openjdk-src-dir=./openjdk.src"
1075 ,(string-append "--with-jdk-home="
1076 (assoc-ref %build-inputs "jdk")))
1079 (modify-phases %standard-phases
1081 (lambda* (#:key source inputs #:allow-other-keys)
1082 (let ((target (string-append "icedtea-" ,version))
1083 (unpack (lambda* (name #:optional dir)
1085 (string-drop-right name 5))))
1088 (assoc-ref inputs name)
1090 "--strip-components=1")))))
1092 (invoke "tar" "xvf" source
1093 "-C" target "--strip-components=1")
1095 (unpack "openjdk-src" "openjdk.src")
1096 (with-directory-excursion "openjdk.src"
1098 (filter (cut string-suffix? "-drop" <>)
1103 (add-after 'unpack 'fix-x11-extension-include-path
1104 (lambda* (#:key inputs #:allow-other-keys)
1105 (substitute* "openjdk.src/jdk/make/sun/awt/mawt.gmk"
1106 (((string-append "\\$\\(firstword \\$\\(wildcard "
1107 "\\$\\(OPENWIN_HOME\\)"
1108 "/include/X11/extensions\\).*$"))
1109 (string-append (assoc-ref inputs "libxrender")
1110 "/include/X11/extensions"
1111 " -I" (assoc-ref inputs "libxtst")
1112 "/include/X11/extensions"
1113 " -I" (assoc-ref inputs "libxinerama")
1114 "/include/X11/extensions"))
1115 (("\\$\\(wildcard /usr/include/X11/extensions\\)\\)") ""))
1117 (add-after 'unpack 'patch-paths
1119 ;; buildtree.make generates shell scripts, so we need to replace
1120 ;; the generated shebang
1121 (substitute* '("openjdk.src/hotspot/make/linux/makefiles/buildtree.make")
1122 (("/bin/sh") (which "bash")))
1124 (let ((corebin (string-append
1125 (assoc-ref %build-inputs "coreutils") "/bin/"))
1126 (binbin (string-append
1127 (assoc-ref %build-inputs "binutils") "/bin/"))
1128 (grepbin (string-append
1129 (assoc-ref %build-inputs "grep") "/bin/")))
1130 (substitute* '("openjdk.src/jdk/make/common/shared/Defs-linux.gmk"
1131 "openjdk.src/corba/make/common/shared/Defs-linux.gmk")
1132 (("UNIXCOMMAND_PATH = /bin/")
1133 (string-append "UNIXCOMMAND_PATH = " corebin))
1134 (("USRBIN_PATH = /usr/bin/")
1135 (string-append "USRBIN_PATH = " corebin))
1136 (("DEVTOOLS_PATH *= */usr/bin/")
1137 (string-append "DEVTOOLS_PATH = " corebin))
1138 (("COMPILER_PATH *= */usr/bin/")
1139 (string-append "COMPILER_PATH = "
1140 (assoc-ref %build-inputs "gcc") "/bin/"))
1141 (("DEF_OBJCOPY *=.*objcopy")
1142 (string-append "DEF_OBJCOPY = " (which "objcopy"))))
1144 ;; fix path to alsa header
1145 (substitute* "openjdk.src/jdk/make/common/shared/Sanity.gmk"
1146 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
1147 (string-append "ALSA_INCLUDE="
1148 (assoc-ref %build-inputs "alsa-lib")
1149 "/include/alsa/version.h")))
1151 ;; fix hard-coded utility paths
1152 (substitute* '("openjdk.src/jdk/make/common/shared/Defs-utils.gmk"
1153 "openjdk.src/corba/make/common/shared/Defs-utils.gmk")
1155 (string-append "ECHO = " (which "echo")))
1157 (string-append "GREP = " (which "grep")))
1158 (("EGREP *=.*egrep")
1159 (string-append "EGREP = " (which "egrep")))
1161 (string-append "CPIO = " (which "cpio")))
1162 (("READELF *=.*readelf")
1163 (string-append "READELF = " (which "readelf")))
1165 (string-append "AR = " (which "ar")))
1167 (string-append "TAR = " (which "tar")))
1169 (string-append "AS = " (which "as")))
1171 (string-append "LD = " (which "ld")))
1172 (("STRIP *=.*strip")
1173 (string-append "STRIP = " (which "strip")))
1175 (string-append "NM = " (which "nm")))
1177 (string-append "SH = " (which "bash")))
1179 (string-append "FIND = " (which "find")))
1181 (string-append "LDD = " (which "ldd")))
1182 (("NAWK *=.*(n|g)awk")
1183 (string-append "NAWK = " (which "gawk")))
1184 (("XARGS *=.*xargs")
1185 (string-append "XARGS = " (which "xargs")))
1186 (("UNZIP *=.*unzip")
1187 (string-append "UNZIP = " (which "unzip")))
1189 (string-append "ZIPEXE = " (which "zip")))
1191 (string-append "SED = " (which "sed"))))
1193 ;; Some of these timestamps cause problems as they are more than
1194 ;; 10 years ago, failing the build process.
1196 "openjdk.src/jdk/src/share/classes/java/util/CurrencyData.properties"
1197 (("AZ=AZM;2005-12-31-20-00-00;AZN") "AZ=AZN")
1198 (("MZ=MZM;2006-06-30-22-00-00;MZN") "MZ=MZN")
1199 (("RO=ROL;2005-06-30-21-00-00;RON") "RO=RON")
1200 (("TR=TRL;2004-12-31-22-00-00;TRY") "TR=TRY")))
1202 (add-before 'configure 'set-additional-paths
1203 (lambda* (#:key inputs #:allow-other-keys)
1204 (substitute* "openjdk.src/jdk/make/common/shared/Sanity.gmk"
1205 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
1206 (string-append "ALSA_INCLUDE="
1207 (assoc-ref inputs "alsa-lib")
1208 "/include/alsa/version.h")))
1211 (string-append (assoc-ref inputs "libxcomposite")
1212 "/include/X11/extensions" ":"
1213 (assoc-ref inputs "libxrender")
1214 "/include/X11/extensions" ":"
1215 (assoc-ref inputs "libxtst")
1216 "/include/X11/extensions" ":"
1217 (assoc-ref inputs "libxinerama")
1218 "/include/X11/extensions" ":"
1219 (or (getenv "CPATH") "")))
1220 (setenv "ALT_OBJCOPY" (which "objcopy"))
1221 (setenv "ALT_CUPS_HEADERS_PATH"
1222 (string-append (assoc-ref inputs "cups")
1224 (setenv "ALT_FREETYPE_HEADERS_PATH"
1225 (string-append (assoc-ref inputs "freetype")
1227 (setenv "ALT_FREETYPE_LIB_PATH"
1228 (string-append (assoc-ref inputs "freetype")
1231 (add-before 'check 'fix-test-framework
1233 ;; Fix PATH in test environment
1234 (substitute* "test/jtreg/com/sun/javatest/regtest/Main.java"
1235 (("PATH=/bin:/usr/bin")
1236 (string-append "PATH=" (getenv "PATH"))))
1237 (substitute* "test/jtreg/com/sun/javatest/util/SysEnv.java"
1238 (("/usr/bin/env") (which "env")))
1239 (substitute* "openjdk.src/hotspot/test/test_env.sh"
1240 (("/bin/rm") (which "rm"))
1241 (("/bin/cp") (which "cp"))
1242 (("/bin/mv") (which "mv")))
1244 (add-before 'check 'fix-hotspot-tests
1246 (with-directory-excursion "openjdk.src/hotspot/test/"
1247 (substitute* "jprt.config"
1248 (("PATH=\"\\$\\{path4sdk\\}\"")
1249 (string-append "PATH=" (getenv "PATH")))
1250 (("make=/usr/bin/make")
1251 (string-append "make=" (which "make"))))
1252 (substitute* '("runtime/6626217/Test6626217.sh"
1253 "runtime/7110720/Test7110720.sh")
1254 (("/bin/rm") (which "rm"))
1255 (("/bin/cp") (which "cp"))
1256 (("/bin/mv") (which "mv"))))
1258 (add-before 'check 'fix-jdk-tests
1260 (with-directory-excursion "openjdk.src/jdk/test/"
1261 (substitute* "com/sun/jdi/JdbReadTwiceTest.sh"
1262 (("/bin/pwd") (which "pwd")))
1263 (substitute* "com/sun/jdi/ShellScaffold.sh"
1264 (("/bin/kill") (which "kill")))
1265 (substitute* "start-Xvfb.sh"
1266 ;;(("/usr/bin/X11/Xvfb") (which "Xvfb"))
1267 (("/usr/bin/nohup") (which "nohup")))
1268 (substitute* "javax/security/auth/Subject/doAs/Test.sh"
1269 (("/bin/rm") (which "rm")))
1270 (substitute* "tools/launcher/MultipleJRE.sh"
1271 (("echo \"#!/bin/sh\"")
1272 (string-append "echo \"#!" (which "rm") "\""))
1273 (("/usr/bin/zip") (which "zip")))
1274 (substitute* "com/sun/jdi/OnThrowTest.java"
1275 (("#!/bin/sh") (string-append "#!" (which "sh"))))
1276 (substitute* "java/lang/management/OperatingSystemMXBean/GetSystemLoadAverage.java"
1277 (("/usr/bin/uptime") (which "uptime")))
1278 (substitute* "java/lang/ProcessBuilder/Basic.java"
1279 (("/usr/bin/env") (which "env"))
1280 (("/bin/false") (which "false"))
1281 (("/bin/true") (which "true"))
1282 (("/bin/cp") (which "cp"))
1283 (("/bin/sh") (which "sh")))
1284 (substitute* "java/lang/ProcessBuilder/FeelingLucky.java"
1285 (("/bin/sh") (which "sh")))
1286 (substitute* "java/lang/ProcessBuilder/Zombies.java"
1287 (("/usr/bin/perl") (which "perl"))
1288 (("/bin/ps") (which "ps"))
1289 (("/bin/true") (which "true")))
1290 (substitute* "java/lang/Runtime/exec/ConcurrentRead.java"
1291 (("/usr/bin/tee") (which "tee")))
1292 (substitute* "java/lang/Runtime/exec/ExecWithDir.java"
1293 (("/bin/true") (which "true")))
1294 (substitute* "java/lang/Runtime/exec/ExecWithInput.java"
1295 (("/bin/cat") (which "cat")))
1296 (substitute* "java/lang/Runtime/exec/ExitValue.java"
1297 (("/bin/sh") (which "sh"))
1298 (("/bin/true") (which "true"))
1299 (("/bin/kill") (which "kill")))
1300 (substitute* "java/lang/Runtime/exec/LotsOfDestroys.java"
1301 (("/usr/bin/echo") (which "echo")))
1302 (substitute* "java/lang/Runtime/exec/LotsOfOutput.java"
1303 (("/usr/bin/cat") (which "cat")))
1304 (substitute* "java/lang/Runtime/exec/SleepyCat.java"
1305 (("/bin/cat") (which "cat"))
1306 (("/bin/sleep") (which "sleep"))
1307 (("/bin/sh") (which "sh")))
1308 (substitute* "java/lang/Runtime/exec/StreamsSurviveDestroy.java"
1309 (("/bin/cat") (which "cat")))
1310 (substitute* "java/rmi/activation/CommandEnvironment/SetChildEnv.java"
1311 (("/bin/chmod") (which "chmod")))
1312 (substitute* "java/util/zip/ZipFile/Assortment.java"
1313 (("/bin/sh") (which "sh"))))
1317 ;; The "make check-*" targets always return zero, so we need to
1318 ;; check for errors in the associated log files to determine
1319 ;; whether any tests have failed.
1320 (use-modules (ice-9 rdelim))
1321 (let* ((error-pattern (make-regexp "^(Error|FAILED):.*"))
1322 (checker (lambda (port)
1324 (let ((line (read-line port)))
1326 ((eof-object? line) #t)
1327 ((regexp-exec error-pattern line)
1328 (error "test failed"))
1330 (run-test (lambda (test)
1331 (invoke "make" test)
1332 (call-with-input-file
1333 (string-append "test/" test ".log")
1335 (when #f ; skip tests
1336 (run-test "check-hotspot")
1337 (run-test "check-langtools")
1338 (run-test "check-jdk"))
1341 (lambda* (#:key outputs #:allow-other-keys)
1342 (let ((doc (string-append (assoc-ref outputs "doc")
1343 "/share/doc/icedtea"))
1344 (jre (assoc-ref outputs "out"))
1345 (jdk (assoc-ref outputs "jdk")))
1346 (copy-recursively "openjdk.build/docs" doc)
1347 (copy-recursively "openjdk.build/j2re-image" jre)
1348 (copy-recursively "openjdk.build/j2sdk-image" jdk))
1350 ;; Some of the libraries in the lib/amd64 folder link to libjvm.so.
1351 ;; But that shared object is located in the server/ folder, so it
1352 ;; cannot be found. This phase creates a symbolic link in the
1353 ;; lib/amd64 folder so that the other libraries can find it.
1356 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
1358 ;; FIXME: Find the bug in the build system, so that this symlink is
1360 (add-after 'install 'install-libjvm
1361 (lambda* (#:key inputs outputs #:allow-other-keys)
1362 (let* ((lib-path (string-append (assoc-ref outputs "out")
1364 (symlink (string-append lib-path "/server/libjvm.so")
1365 (string-append lib-path "/libjvm.so")))
1367 ;; By default IcedTea only generates an empty keystore. In order to
1368 ;; be able to use certificates in Java programs we need to generate a
1369 ;; keystore from a set of certificates. For convenience we use the
1370 ;; certificates from the nss-certs package.
1371 (add-after 'install 'install-keystore
1372 (lambda* (#:key inputs outputs #:allow-other-keys)
1373 (let* ((keystore "cacerts")
1374 (certs-dir (string-append (assoc-ref inputs "nss-certs")
1376 (keytool (string-append (assoc-ref outputs "jdk")
1378 (define (extract-cert file target)
1379 (call-with-input-file file
1381 (call-with-output-file target
1383 (let loop ((line (read-line in 'concat))
1386 ((eof-object? line) #t)
1387 ((string-prefix? "-----BEGIN" line)
1389 (loop (read-line in 'concat) #t))
1390 ((string-prefix? "-----END" line)
1394 (when copying? (display line out))
1395 (loop (read-line in 'concat) copying?)))))))))
1396 (define (import-cert cert)
1397 (format #t "Importing certificate ~a\n" (basename cert))
1398 (let ((temp "tmpcert"))
1399 (extract-cert cert temp)
1400 (let ((port (open-pipe* OPEN_WRITE keytool
1402 "-alias" (basename cert)
1403 "-keystore" keystore
1404 "-storepass" "changeit"
1406 (display "yes\n" port)
1407 (when (not (zero? (status:exit-val (close-pipe port))))
1408 (format #t "failed to import ~a\n" cert)))
1409 (delete-file temp)))
1411 ;; This is necessary because the certificate directory contains
1412 ;; files with non-ASCII characters in their names.
1413 (setlocale LC_ALL "en_US.utf8")
1414 (setenv "LC_ALL" "en_US.utf8")
1416 (for-each import-cert (find-files certs-dir "\\.pem$"))
1417 (mkdir-p (string-append (assoc-ref outputs "out")
1419 (mkdir-p (string-append (assoc-ref outputs "jdk")
1420 "/jre/lib/security"))
1422 ;; The cacerts files we are going to overwrite are chmod'ed as
1423 ;; read-only (444) in icedtea-8 (which derives from this
1424 ;; package). We have to change this so we can overwrite them.
1425 (chmod (string-append (assoc-ref outputs "out")
1426 "/lib/security/" keystore) #o644)
1427 (chmod (string-append (assoc-ref outputs "jdk")
1428 "/jre/lib/security/" keystore) #o644)
1430 (install-file keystore
1431 (string-append (assoc-ref outputs "out")
1433 (install-file keystore
1434 (string-append (assoc-ref outputs "jdk")
1435 "/jre/lib/security"))
1440 "0l34ikyf62hbzlf9032alzkkqvf7bpmckz4gvirvph755w7gka8l"))
1443 "050gv2jbg1pi6qkn8w18bwpbklfa5b0kymjvan9pncddbj8m84fz"))
1446 "1k6yldwnxfzdg5926r1nlfv8d1r1j7rlp2nkz6gqh05vgyamnfhl"))
1449 "110j7jlz47x2gg6f7653x12mssan5kvj9l9h1m1c8c92drfxbqyk"))
1452 "0d1mca38ksxvdskp9im3pp7fdijhj1n3lwq9w13r9s4v3qyskgdd"))
1455 "0nq5236fzxn3p6x8cgncl56mzcmsj07q9gymysnws4c8byc6n0qj"))
1460 "http://icedtea.classpath.org/downloads/drops"
1461 "/icedtea7/" version "/hotspot.tar.bz2"))
1464 "17bdv39n4lh8l5737c96f3xgamx4y305m067p01cywgp7zaddqws"))
1465 (patches (search-patches
1466 "icedtea-7-hotspot-gcc-segfault-workaround.patch"))))
1467 ("ant" ,ant-bootstrap)
1469 ("coreutils" ,coreutils)
1470 ("diffutils" ,diffutils) ;for tests
1473 ("libtool" ,libtool)
1474 ("pkg-config" ,pkg-config)
1480 ("fastjar" ,fastjar)
1481 ("libxslt" ,libxslt) ;for xsltproc
1482 ("nss-certs" ,nss-certs)
1484 ("procps" ,procps) ;for "free", even though I'm not sure we should use it
1485 ("jdk" ,icedtea-6 "jdk")))
1487 `(("alsa-lib" ,alsa-lib)
1490 ("libxcomposite" ,libxcomposite)
1492 ("libxtst" ,libxtst)
1494 ("libxinerama" ,libxinerama)
1495 ("libxrender" ,libxrender)
1496 ("libjpeg" ,libjpeg)
1498 ("mit-krb5" ,mit-krb5)
1501 ("fontconfig" ,fontconfig)
1502 ("freetype" ,freetype)
1506 (home-page "http://icedtea.classpath.org")
1507 (synopsis "Java development kit")
1509 "This package provides the Java development kit OpenJDK built with the
1510 IcedTea build harness.")
1511 ;; IcedTea is released under the GPL2 + Classpath exception, which is the
1512 ;; same license as both GNU Classpath and OpenJDK.
1513 (license license:gpl2+))))
1515 (define-public icedtea-8
1516 (let* ((version "3.7.0")
1517 (drop (lambda (name hash)
1521 "http://icedtea.classpath.org/download/drops"
1522 "/icedtea8/" version "/" name ".tar.xz"))
1523 (sha256 (base32 hash))))))
1524 (package (inherit icedtea-7)
1529 "http://icedtea.wildebeest.org/download/source/icedtea-"
1533 "09yqzn8rpccs7cyv89hhy5zlznpgqw5x3jz0w1ccp0cz1vgs8l5w"))
1534 (modules '((guix build utils)))
1537 (substitute* '("configure"
1539 ;; Do not embed build time
1540 (("(DIST_ID=\"Custom build).*$" _ prefix)
1541 (string-append prefix "\"\n"))
1542 ;; Do not leak information about the build host
1543 (("DIST_NAME=\"\\$build_os\"")
1544 "DIST_NAME=\"guix\""))
1547 `(#:imported-modules
1548 ((guix build ant-build-system)
1549 (guix build syscalls)
1550 ,@%gnu-build-system-modules)
1551 ,@(substitute-keyword-arguments (package-arguments icedtea-7)
1552 ((#:modules modules)
1553 `((guix build utils)
1554 (guix build gnu-build-system)
1555 ((guix build ant-build-system) #:prefix ant:)
1560 ((#:configure-flags flags)
1561 `(let ((jdk (assoc-ref %build-inputs "jdk")))
1562 `( ;;"--disable-bootstrap"
1563 "--enable-bootstrap"
1565 "--disable-downloading"
1566 "--disable-system-pcsc"
1567 "--disable-system-sctp"
1568 "--disable-tests" ;they are run in the check phase instead
1569 "--with-openjdk-src-dir=./openjdk.src"
1570 ,(string-append "--with-jdk-home=" jdk))))
1572 `(modify-phases ,phases
1573 (delete 'fix-x11-extension-include-path)
1574 (delete 'patch-paths)
1575 (delete 'set-additional-paths)
1576 (delete 'patch-patches)
1577 ;; Prevent the keytool from recording the current time when
1578 ;; adding certificates at build time.
1579 (add-after 'unpack 'patch-keystore
1581 (substitute* "openjdk.src/jdk/src/share/classes/sun/security/provider/JavaKeyStore.java"
1582 (("date = new Date\\(\\);")
1584 date = (System.getenv(\"SOURCE_DATE_EPOCH\") != null) ?\
1585 new Date(Long.parseLong(System.getenv(\"SOURCE_DATE_EPOCH\"))) :\
1588 (add-after 'unpack 'patch-jni-libs
1589 ;; Hardcode dynamically loaded libraries.
1591 (let* ((library-path (search-path-as-string->list
1592 (getenv "LIBRARY_PATH")))
1593 (find-library (lambda (name)
1596 (string-append "lib" name ".so")))))
1599 (catch 'decoding-error
1602 (("VERSIONED_JNI_LIB_NAME\\(\"(.*)\", \"(.*)\"\\)"
1604 (format #f "\"~a\"" (find-library name)))
1605 (("JNI_LIB_NAME\\(\"(.*)\"\\)" _ name)
1606 (format #f "\"~a\"" (find-library name)))))
1608 ;; Those are safe to skip.
1609 (format (current-error-port)
1610 "warning: failed to substitute: ~a~%"
1612 (find-files "openjdk.src/jdk/src/solaris/native"
1616 (lambda* (#:key outputs #:allow-other-keys)
1617 (let ((doc (string-append (assoc-ref outputs "doc")
1618 "/share/doc/icedtea"))
1619 (jre (assoc-ref outputs "out"))
1620 (jdk (assoc-ref outputs "jdk")))
1621 (copy-recursively "openjdk.build/docs" doc)
1622 (copy-recursively "openjdk.build/images/j2re-image" jre)
1623 (copy-recursively "openjdk.build/images/j2sdk-image" jdk)
1624 ;; Install the nss.cfg file to JRE to enable SSL/TLS
1626 (copy-file (string-append jdk "/jre/lib/security/nss.cfg")
1627 (string-append jre "/lib/security/nss.cfg"))
1629 (add-after 'install 'strip-jar-timestamps
1630 (assoc-ref ant:%standard-phases 'strip-jar-timestamps)))))))
1632 `(("jdk" ,icedtea-7 "jdk")
1635 "1mj6xgmw31i6qd30qi9dmv7160fbcfq5ikz1jwjihdg2793il19p"))
1638 "1wb8k5zm40zld0986dvmlh5xh3gyixbg9h26sl662zy92amhmyyg"))
1641 "11ma4zz0599cy70xd219v7a8vin7p96xrhhz3wsaw6cjhkzpagah"))
1644 "14m1y0z0fbm5z5zjw3vnq85py8dma84bi3f9cw8rhdyc6skk8q4i"))
1647 "09andnm6xaasnp963hgx42yiflifiljp9z7z85jrfyc5z8a5whmf"))
1650 "0s6lcpc0zckz2fnq98aqf28nz9y3wbi41a3kyaqqa2abwbkm1zwl"))
1653 "15wizy123vhk40chl1b4p552jf2pw2hdww0myf11qab425axz4nw"))
1658 "http://icedtea.classpath.org/download/drops"
1659 "/icedtea8/" version "/hotspot.tar.xz"))
1662 "1ciz1w9j0kz7s1dxdhyqq71nla9icyz6qvn0b9z2zgkklqa98qmm"))
1663 (patches (search-patches
1664 "icedtea-7-hotspot-gcc-segfault-workaround.patch"))))
1667 "19pzl3ppaw8j6r5cnyp8qiw3hxijh3hdc46l39g5yfhdl4pr4hpa"))
1670 "0k33anxdzw1icn072wynfmmdjhsv50hay0j1sfkfxny12rb3vgdy"))
1671 ,@(fold alist-delete (package-native-inputs icedtea-7)
1672 '("jdk" "openjdk-src" "corba-drop" "jaxp-drop" "jaxws-drop"
1673 "jdk-drop" "langtools-drop" "hotspot-drop")))))))
1675 (define-public icedtea icedtea-7)
1678 (define-public ant/java8
1679 (package (inherit ant-bootstrap)
1684 (uri (string-append "mirror://apache/ant/source/apache-ant-"
1685 version "-src.tar.gz"))
1688 "10p3dh77lkzzzcy32dk9azljixzadp46fggjfbvgkl8mmb8cxxv8"))
1689 (modules '((guix build utils)))
1692 (for-each delete-file
1693 (find-files "lib/optional" "\\.jar$"))
1696 (substitute-keyword-arguments (package-arguments ant-bootstrap)
1698 `(modify-phases ,phases
1699 (add-after 'unpack 'remove-scripts
1700 ;; Remove bat / cmd scripts for DOS as well as the antRun and runant
1703 (for-each delete-file
1704 (find-files "src/script"
1705 "(.*\\.(bat|cmd)|runant.*|antRun.*)"))
1708 (lambda* (#:key inputs outputs #:allow-other-keys)
1709 (setenv "JAVA_HOME" (assoc-ref inputs "jdk"))
1711 ;; Disable tests to avoid dependency on hamcrest-core, which needs
1712 ;; Ant to build. This is necessary in addition to disabling the
1713 ;; "check" phase, because the dependency on "test-jar" would always
1714 ;; result in the tests to be run.
1715 (substitute* "build.xml"
1716 (("depends=\"jars,test-jar\"") "depends=\"jars\""))
1717 (invoke "bash" "bootstrap.sh"
1718 (string-append "-Ddist.dir="
1719 (assoc-ref outputs "out")))))))))
1721 `(("jdk" ,icedtea-8 "jdk")
1723 ("unzip" ,unzip)))))
1725 ;; The 1.9.x series is the last that can be built with GCJ. The 1.10.x series
1728 (package (inherit ant/java8)
1732 (uri (string-append "mirror://apache/ant/source/apache-ant-"
1733 version "-src.tar.gz"))
1736 "1k28mka0m3isy9yr8gz84kz1f3f879rwaxrd44vdn9xbfwvwk86n"))))
1738 `(("jdk" ,icedtea-7 "jdk")
1740 ("unzip" ,unzip)))))
1742 (define-public ant-apache-bcel
1745 (name "ant-apache-bcel")
1747 (substitute-keyword-arguments (package-arguments ant/java8)
1749 `(modify-phases ,phases
1750 (add-after 'unpack 'link-bcel
1751 (lambda* (#:key inputs #:allow-other-keys)
1752 (for-each (lambda (file)
1754 (string-append "lib/optional/"
1756 (find-files (assoc-ref inputs "java-commons-bcel")
1759 (add-after 'build 'install
1760 (lambda* (#:key outputs #:allow-other-keys)
1761 (let* ((out (assoc-ref outputs "out"))
1762 (share (string-append out "/share/java"))
1763 (bin (string-append out "/bin"))
1764 (lib (string-append out "/lib")))
1766 (install-file (string-append lib "/ant-apache-bcel.jar") share)
1767 (delete-file-recursively bin)
1768 (delete-file-recursively lib)
1771 `(("java-commons-bcel" ,java-commons-bcel)
1772 ,@(package-inputs ant/java8)))))
1774 (define-public ant-junit
1779 (substitute-keyword-arguments (package-arguments ant/java8)
1781 `(modify-phases ,phases
1782 (add-after 'unpack 'link-junit
1783 (lambda* (#:key inputs #:allow-other-keys)
1784 (for-each (lambda (file)
1786 (string-append "lib/optional/"
1788 (find-files (assoc-ref inputs "java-junit")
1791 (add-after 'build 'install
1792 (lambda* (#:key outputs #:allow-other-keys)
1793 (let* ((out (assoc-ref outputs "out"))
1794 (share (string-append out "/share/java"))
1795 (bin (string-append out "/bin"))
1796 (lib (string-append out "/lib")))
1798 (install-file (string-append lib "/ant-junit.jar") share)
1799 (delete-file-recursively bin)
1800 (delete-file-recursively lib)
1803 `(("java-junit" ,java-junit)
1804 ,@(package-inputs ant/java8)))))
1806 (define-public clojure
1807 (let* ((remove-archives '(begin
1808 (for-each delete-file
1809 (find-files "." ".*\\.(jar|zip)"))
1811 (submodule (lambda (prefix version hash)
1814 (uri (string-append "https://github.com/clojure/"
1815 prefix version ".tar.gz"))
1816 (sha256 (base32 hash))
1817 (modules '((guix build utils)))
1818 (snippet remove-archives)))))
1826 (string-append "https://github.com/clojure/clojure/archive/clojure-"
1829 (base32 "0xjbzcw45z32vsn9pifp7ndysjzqswp5ig0jkjpivigh2ckkdzha"))
1830 (modules '((guix build utils)))
1831 (snippet remove-archives)))
1832 (build-system ant-build-system)
1834 `(#:modules ((guix build ant-build-system)
1840 #:test-target "test"
1842 (modify-phases %standard-phases
1843 (add-after 'unpack 'unpack-submodule-sources
1844 (lambda* (#:key inputs #:allow-other-keys)
1848 (with-directory-excursion name
1850 ;; Use xz for repacked tarball.
1854 "--file" (assoc-ref inputs name)
1855 "--strip-components=1"))
1856 (copy-recursively (string-append name "/src/main/clojure/")
1858 '("core-specs-alpha-src"
1859 "data-generators-src"
1862 "test-generative-src"
1863 "tools-namespace-src"))
1865 ;; The javadoc target is not built by default.
1866 (add-after 'build 'build-doc
1868 (invoke "ant" "javadoc")))
1869 ;; Needed since no install target is provided.
1871 (lambda* (#:key outputs #:allow-other-keys)
1872 (let ((java-dir (string-append (assoc-ref outputs "out")
1874 ;; Install versioned to avoid collisions.
1875 (install-file (string-append "clojure-" ,version ".jar")
1878 ;; Needed since no install-doc target is provided.
1879 (add-after 'install 'install-doc
1880 (lambda* (#:key outputs #:allow-other-keys)
1881 (let ((doc-dir (string-append (assoc-ref outputs "out")
1882 "/share/doc/clojure-"
1884 (copy-recursively "doc/clojure" doc-dir)
1885 (copy-recursively "target/javadoc/"
1886 (string-append doc-dir "javadoc/"))
1887 (for-each (cut install-file <> doc-dir)
1888 (filter (cut string-match
1889 ".*\\.(html|markdown|md|txt)"
1893 ;; The native-inputs below are needed to run the tests.
1895 `(("core-specs-alpha-src"
1896 ,(submodule "core.specs.alpha/archive/core.specs.alpha-"
1898 "0v2a0svf1ar2y42ajxwsjr7zmm5j7pp2zwrd2jh3k7xzd1p9x1fv"))
1899 ("data-generators-src"
1900 ,(submodule "data.generators/archive/data.generators-"
1902 "0kki093jp4ckwxzfnw8ylflrfqs8b1i1wi9iapmwcsy328dmgzp1"))
1904 ,(submodule "spec.alpha/archive/spec.alpha-"
1906 "00alf0347licdn773w2jarpllyrbl52qz4d8mw61anjksacxylzz"))
1908 ,(submodule "test.check/archive/test.check-"
1910 "0p0mnyhr442bzkz0s4k5ra3i6l5lc7kp6ajaqkkyh4c2k5yck1md"))
1911 ("test-generative-src"
1912 ,(submodule "test.generative/archive/test.generative-"
1914 "1pjafy1i7yblc7ixmcpfq1lfbyf3jaljvkgrajn70sws9xs7a9f8"))
1915 ("tools-namespace-src"
1916 ,(submodule "tools.namespace/archive/tools.namespace-"
1918 "10baak8v0hnwz2hr33bavshm7y49mmn9zsyyms1dwjz45p5ymhy0"))))
1919 (home-page "https://clojure.org/")
1920 (synopsis "Lisp dialect running on the JVM")
1921 (description "Clojure is a dynamic, general-purpose programming language,
1922 combining the approachability and interactive development of a scripting
1923 language with an efficient and robust infrastructure for multithreaded
1924 programming. Clojure is a compiled language, yet remains completely dynamic
1925 – every feature supported by Clojure is supported at runtime. Clojure
1926 provides easy access to the Java frameworks, with optional type hints and type
1927 inference, to ensure that calls to Java can avoid reflection.
1929 Clojure is a dialect of Lisp, and shares with Lisp the code-as-data philosophy
1930 and a powerful macro system. Clojure is predominantly a functional programming
1931 language, and features a rich set of immutable, persistent data structures.
1932 When mutable state is needed, Clojure offers a software transactional memory
1933 system and reactive Agent system that ensure clean, correct, multithreaded
1935 ;; Clojure is licensed under EPL1.0
1936 ;; ASM bytecode manipulation library is licensed under BSD-3
1937 ;; Guava Murmur3 hash implementation is licensed under APL2.0
1938 ;; src/clj/repl.clj is licensed under CPL1.0
1940 ;; See readme.html or readme.txt for details.
1941 (license (list license:epl1.0
1946 (define-public javacc
1952 (uri (string-append "https://github.com/javacc/javacc/"
1953 "archive/" version ".tar.gz"))
1954 (file-name (string-append "javacc-" version ".tar.gz"))
1957 "111xc9mnmc5a6qz6x3xbhqc07y1lg2b996ggzw0hrblg42zya9xf"))))
1958 (build-system ant-build-system)
1960 `(#:test-target "test"
1962 (modify-phases %standard-phases
1963 (add-after 'unpack 'delete-bundled-libs
1965 (delete-file-recursively "lib") #t))
1966 (replace 'install (install-jars "target")))))
1967 (home-page "https://javacc.org/")
1968 (synopsis "Java parser generator")
1969 (description "Java Compiler Compiler (JavaCC) is the most popular parser
1970 generator for use with Java applications. A parser generator is a tool that
1971 reads a grammar specification and converts it to a Java program that can
1972 recognize matches to the grammar. In addition to the parser generator itself,
1973 JavaCC provides other standard capabilities related to parser generation such
1974 as tree building (via a tool called JJTree included with JavaCC), actions,
1976 (license license:bsd-3)))
1978 (define-public javacc-4
1979 (package (inherit javacc)
1984 (url "https://github.com/javacc/javacc.git")
1985 (commit "release_41")))
1986 (file-name (string-append "javacc-" version "-checkout"))
1989 "07ysav7j8r1c6h8qxrgqk6lwdp74ly0ad1935lragxml0qqc3ka0"))))
1991 ;; /tmp/guix-build-javacc-4.1.drv-0/source/test/javacodeLA/build.xml:60:
1996 (modify-phases %standard-phases
1997 (add-after 'unpack 'delete-bundled-libs
1999 (delete-file-recursively "lib") #t))
2000 (replace 'install (install-jars "bin/lib")))))))
2002 ;; This is the last 3.x release of ECJ
2003 (define-public java-ecj-3
2009 (uri (string-append "http://archive.eclipse.org/eclipse/"
2010 "downloads/drops/R-" version
2011 "-201301310800/ecjsrc-" version ".jar"))
2014 "01mdj14jw11g1jfnki4fi8229p0c6zzckd38zqy2w4m3cjcvsx04"))))
2015 (build-system ant-build-system)
2017 `(#:tests? #f ; none included
2018 #:jdk ,icedtea-7 ; doesn't build with JDK8+
2019 #:make-flags (list "-f" "src/build.xml")
2020 #:build-target "build"
2022 (modify-phases %standard-phases
2023 (add-after 'unpack 'fix-manifest
2025 ;; Record the main class to make ecj executable.
2026 (with-atomic-file-replacement "src/META-INF/MANIFEST.MF"
2028 (display "Manifest-Version: 1.0
2029 Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n"
2032 (replace 'install (install-jars ".")))))
2033 (home-page "https://eclipse.org")
2034 (synopsis "Eclipse Java development tools core batch compiler")
2035 (description "This package provides the Eclipse Java core batch compiler.")
2036 (license license:epl1.0)))
2038 ;; This is needed for java-cisd-args4j
2039 (define-public java-ecj-3.5
2040 (package (inherit java-ecj-3)
2043 (method url-fetch/zipbomb)
2044 (uri (string-append "http://archive.eclipse.org/eclipse/"
2045 "downloads/drops/R-" version
2046 "-200909170800/ecjsrc-" version ".zip"))
2049 "1vnl2mavisc567bip736xzsvvbjif5279wc4a7pbdik5wlir8qr7"))))
2050 (build-system ant-build-system)
2052 `(#:tests? #f ; none included
2053 #:jdk ,icedtea-7 ; doesn't build with JDK8+
2054 #:build-target "build"
2056 (modify-phases %standard-phases
2057 (add-after 'unpack 'fix-manifest
2059 ;; Record the main class to make ecj executable.
2060 (with-atomic-file-replacement "META-INF/MANIFEST.MF"
2063 (display "Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n"
2066 (replace 'install (install-jars ".")))))
2068 `(("unzip" ,unzip)))))
2070 (define-public java-cisd-base
2071 (let ((revision 38938)
2072 (base-version "14.12.0"))
2074 (name "java-cisd-base")
2075 (version (string-append base-version "-" (number->string revision)))
2079 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2080 "base/tags/release/"
2081 (version-major+minor base-version)
2082 ".x/" base-version "/base/"))
2083 (revision revision)))
2084 (file-name (string-append "java-cisd-base-" version "-checkout"))
2087 "1i5adyf7nzclb0wydgwa1az04qliid8035vpahaandmkmigbnxiy"))
2088 (modules '((guix build utils)))
2091 ;; Delete included gradle jar
2092 (delete-file-recursively "gradle/wrapper")
2093 ;; Delete pre-built native libraries
2094 (delete-file-recursively "libs")
2096 (build-system ant-build-system)
2098 `(#:make-flags '("-file" "build/build.xml")
2099 #:test-target "jar-test"
2102 (modify-phases %standard-phases
2103 (add-after 'unpack 'unpack-build-resources
2104 (lambda* (#:key inputs #:allow-other-keys)
2105 (copy-recursively (assoc-ref inputs "build-resources")
2106 "../build_resources")
2108 (add-after 'unpack-build-resources 'fix-dependencies
2109 (lambda* (#:key inputs #:allow-other-keys)
2110 (substitute* "build/build.xml"
2111 (("\\$\\{lib\\}/testng/testng-jdk15.jar")
2112 (string-append (assoc-ref inputs "java-testng")
2113 "/share/java/java-testng.jar"))
2114 (("\\$\\{lib\\}/commons-lang/commons-lang.jar")
2115 (string-append (assoc-ref inputs "java-commons-lang")
2116 "/share/java/commons-lang-"
2117 ,(package-version java-commons-lang) ".jar"))
2118 (("\\$\\{lib\\}/commons-io/commons-io.jar")
2119 (string-append (assoc-ref inputs "java-commons-io")
2120 "/share/java/commons-io-"
2121 ,(package-version java-commons-io)
2123 ;; Remove dependency on svn
2124 (("<build-info.*") "")
2125 (("\\$\\{revision.number\\}")
2126 ,(number->string revision))
2127 (("\\$\\{version.number\\}") ,base-version))
2128 ;; Remove dependency on classycle
2129 (substitute* "../build_resources/ant/build-common.xml"
2130 (("<taskdef name=\"dependency-checker.*") "")
2131 (("classname=\"classycle.*") "")
2132 (("classpath=\"\\$\\{lib\\}/classycle.*") ""))
2134 ;; A few tests fail because of the lack of a proper /etc/groups and
2135 ;; /etc/passwd file in the build container.
2136 (add-after 'unpack 'disable-broken-tests
2138 (substitute* "sourceTest/java/ch/systemsx/cisd/base/AllTests.java"
2139 (("Unix.isOperational\\(\\)") "false"))
2141 ;; These decorators are almost useless and pull in an unpackaged
2143 (add-after 'unpack 'remove-useless-decorators
2145 (substitute* "source/java/ch/systemsx/cisd/base/unix/Unix.java"
2147 (("import ch.rinn.restrictions.Private;") ""))
2148 (substitute* "sourceTest/java/ch/systemsx/cisd/base/unix/UnixTests.java"
2150 (("import ch.rinn.restrictions.Friend;") ""))
2152 (add-before 'configure 'build-native-code
2153 (lambda* (#:key inputs #:allow-other-keys)
2154 (let ((jdk (assoc-ref inputs "jdk"))
2155 (dir ,(match (%current-system)
2158 ((or "armhf-linux" "aarch64-linux")
2160 ((or "x86_64-linux")
2162 (_ "unknown-Linux"))))
2163 (with-directory-excursion "source/c"
2164 (invoke "gcc" "-shared" "-O3" "-fPIC" "unix.c"
2165 (string-append "-I" jdk "/include")
2166 (string-append "-I" jdk "/include/linux")
2168 (invoke "gcc" "-shared" "-O3" "-fPIC"
2169 "-DMACHINE_BYTE_ORDER=1"
2177 (string-append "-I" jdk "/include")
2178 (string-append "-I" jdk "/include/linux")
2179 "-o" "libnativedata.so"))
2180 (install-file "source/c/libunix.so"
2181 (string-append "libs/native/unix/" dir))
2182 (install-file "source/c/libnativedata.so"
2183 (string-append "libs/native/nativedata/" dir))
2185 ;; In the "check" phase we only build the test executable.
2186 (add-after 'check 'run-tests
2188 (invoke "java" "-jar" "targets/dist/sis-base-test.jar")
2189 (delete-file "targets/dist/sis-base-test.jar")
2191 (replace 'install (install-jars "targets/dist")))))
2193 `(("jdk" ,icedtea-8)
2194 ("java-commons-lang" ,java-commons-lang)
2195 ("java-commons-io" ,java-commons-io)
2196 ("java-testng" ,java-testng)
2201 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2202 "base/tags/release/"
2203 (version-major+minor base-version)
2205 "/build_resources/"))
2206 (revision revision)))
2209 "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk"))))))
2210 (home-page "http://svnsis.ethz.ch")
2211 (synopsis "Utility classes for libraries from ETH Zurich")
2212 (description "This library supplies some utility classes needed for
2213 libraries from the SIS division at ETH Zurich like jHDF5.")
2214 ;; The C sources are under a non-copyleft license, which looks like a
2215 ;; variant of the BSD licenses. The whole package is under the ASL2.0.
2216 (license (list license:asl2.0
2217 (license:non-copyleft "file://source/c/COPYING"))))))
2219 (define-public java-cisd-args4j
2220 (let ((revision 39162)
2221 (base-version "9.11.2"))
2223 (name "java-cisd-args4j")
2224 (version (string-append base-version "-" (number->string revision)))
2228 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2229 "args4j/tags/release/"
2230 (version-major+minor base-version)
2231 ".x/" base-version "/args4j/"))
2232 (revision revision)))
2233 (file-name (string-append "java-cisd-args4j-" version "-checkout"))
2236 "0hhqznjaivq7ips7mkwas78z42s6djsm20rrs7g1zd59rcsakxn2"))))
2237 (build-system ant-build-system)
2239 `(#:make-flags '("-file" "build/build.xml")
2240 #:tests? #f ; there are no tests
2241 ;; There are weird build failures with JDK8, such as: "The type
2242 ;; java.io.ObjectInputStream cannot be resolved. It is indirectly
2243 ;; referenced from required .class files"
2245 #:modules ((guix build ant-build-system)
2247 (guix build java-utils)
2252 (modify-phases %standard-phases
2253 (add-after 'unpack 'unpack-build-resources
2254 (lambda* (#:key inputs #:allow-other-keys)
2255 (mkdir-p "../build_resources")
2256 (invoke "tar" "xf" (assoc-ref inputs "build-resources")
2257 "-C" "../build_resources"
2258 "--strip-components=1")
2259 (mkdir-p "../build_resources/lib")
2261 (add-after 'unpack-build-resources 'fix-dependencies
2262 (lambda* (#:key inputs #:allow-other-keys)
2263 ;; FIXME: There should be a more convenient abstraction for
2264 ;; editing XML files.
2265 (with-directory-excursion "../build_resources/ant/"
2266 (chmod "build-common.xml" #o664)
2267 (call-with-output-file "build-common.xml.new"
2271 (with-input-from-file "build-common.xml"
2272 (lambda _ (xml->sxml #:trim-whitespace? #t)))
2273 `(;; Remove dependency on classycle and custom ant tasks
2274 (taskdef . ,(lambda (tag . kids)
2275 (let ((name ((sxpath '(name *text*)) kids)))
2276 (if (or (member "build-info" name)
2277 (member "dependency-checker" name)
2278 (member "build-java-subprojects" name)
2279 (member "project-classpath" name))
2282 (typedef . ,(lambda (tag . kids)
2283 (let ((name ((sxpath '(name *text*)) kids)))
2284 (if (member "recursive-jar" name)
2287 (build-java-subprojects . ,(lambda _ '()))
2288 ;; Ignore everything else
2289 (*default* . ,(lambda (tag . kids) `(,tag ,@kids)))
2290 (*text* . ,(lambda (_ txt) txt))))
2292 (rename-file "build-common.xml.new" "build-common.xml"))
2293 (substitute* "build/build.xml"
2294 (("\\$\\{lib\\}/cisd-base/cisd-base.jar")
2295 (string-append (assoc-ref inputs "java-cisd-base")
2296 "/share/java/sis-base.jar"))
2297 ;; Remove dependency on svn
2298 (("<build-info.*") "")
2299 (("\\$\\{revision.number\\}")
2300 ,(number->string revision))
2301 (("\\$\\{version.number\\}") ,base-version)
2302 ;; Don't use custom ant tasks.
2303 (("recursive-jar") "jar")
2304 (("<project-classpath.*") ""))
2306 (replace 'install (install-jars "targets/dist")))))
2308 `(("java-cisd-base" ,java-cisd-base)))
2310 `(("ecj" ,java-ecj-3.5)
2315 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2316 "args4j/tags/release/"
2317 (version-major+minor base-version)
2319 "/build_resources/"))
2320 (revision revision)))
2323 "056cam4k8pll7ass31sy6gwn8g8719njc41yf4l02b0342nilkyf"))
2324 (modules '((guix build utils)))
2325 ;; Delete bundled pre-built jars.
2327 '(begin (delete-file-recursively "lib/") #t))))))
2328 (home-page "http://svnsis.ethz.ch")
2329 (synopsis "Command line parser library")
2330 (description "This package provides a parser for command line arguments.")
2331 (license license:asl2.0))))
2333 (define-public java-cisd-jhdf5
2334 (let ((revision 39162)
2335 (base-version "14.12.6"))
2337 (name "java-cisd-jhdf5")
2338 (version (string-append base-version "-" (number->string revision)))
2342 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2343 "jhdf5/tags/release/"
2344 (version-major+minor base-version)
2345 ".x/" base-version "/jhdf5/"))
2346 (revision revision)))
2347 (file-name (string-append "java-cisd-jhdf5-" version "-checkout"))
2350 "13i17s2hn0q9drdqvp8csy7770p3hdbh9rp30ihln2ldkfawdmz0"))
2351 (modules '((guix build utils)))
2354 ;; Delete included gradle jar
2355 (delete-file-recursively "gradle/wrapper")
2356 ;; Delete pre-built native libraries
2357 (delete-file-recursively "libs")
2359 (build-system ant-build-system)
2361 `(#:make-flags '("-file" "build/build.xml")
2362 #:build-target "jar-all"
2363 #:test-target "jar-test"
2366 (modify-phases %standard-phases
2367 ;; FIXME: this build phase fails.
2368 (delete 'generate-jar-indices)
2369 ;; Don't erase results from the build phase when building tests.
2370 (add-after 'unpack 'separate-test-target-from-clean
2372 (substitute* "build/build.xml"
2373 (("\"jar-test\" depends=\"clean, ")
2374 "\"jar-test\" depends=\""))
2376 (add-after 'unpack 'unpack-build-resources
2377 (lambda* (#:key inputs #:allow-other-keys)
2378 (copy-recursively (assoc-ref inputs "build-resources")
2379 "../build_resources")
2380 (delete-file-recursively "../build_resources/lib/")
2381 (mkdir-p "../build_resources/lib")
2382 ;; Remove dependency on classycle
2383 (substitute* "../build_resources/ant/build-common.xml"
2384 (("<taskdef name=\"dependency-checker.*") "")
2385 (("classname=\"classycle.*") "")
2386 (("classpath=\"\\$\\{lib\\}/classycle.*") ""))
2387 ;; Remove dependency on svn
2388 (substitute* "build/build.xml"
2389 (("<build-info.*") "")
2390 (("\\$\\{revision.number\\}")
2391 ,(number->string revision))
2392 (("\\$\\{version.number\\}") ,base-version))
2394 (add-after 'unpack-build-resources 'fix-dependencies
2395 (lambda* (#:key inputs #:allow-other-keys)
2396 (substitute* "../build_resources/ant/build-common.xml"
2397 (("../libraries/testng/testng-jdk15.jar")
2398 (string-append (assoc-ref inputs "java-testng")
2399 "/share/java/java-testng.jar")))
2400 (substitute* "build/build.xml"
2401 (("\\$\\{lib\\}/sis-base/sis-base.jar")
2402 (string-append (assoc-ref inputs "java-cisd-base")
2403 "/share/java/sis-base.jar"))
2404 (("\\$\\{lib\\}/cisd-args4j/cisd-args4j.jar")
2405 (string-append (assoc-ref inputs "java-cisd-args4j")
2406 "/share/java/cisd-args4j.jar"))
2407 (("\\$\\{lib\\}/commons-lang/commons-lang.jar")
2408 (string-append (assoc-ref inputs "java-commons-lang")
2409 "/share/java/commons-lang-"
2410 ,(package-version java-commons-lang) ".jar"))
2411 (("\\$\\{lib\\}/commons-io/commons-io.jar")
2412 (string-append (assoc-ref inputs "java-commons-io")
2413 "/share/java/commons-io-"
2414 ,(package-version java-commons-io)
2416 (("\\$\\{lib\\}/testng/testng-jdk15.jar")
2417 (string-append (assoc-ref inputs "java-testng")
2418 "/share/java/java-testng.jar"))
2419 (("\\$\\{lib\\}/junit4/junit.jar")
2420 (string-append (assoc-ref inputs "java-junit")
2421 "/share/java/junit.jar"))
2422 (("\\$\\{lib\\}/jmock/hamcrest/hamcrest-core.jar")
2423 (string-append (assoc-ref inputs "java-hamcrest-core")
2424 "/share/java/hamcrest-core.jar")))
2425 ;; Remove dependency on ch.rinn.restrictions
2426 (with-directory-excursion "source/java/ch/systemsx/cisd/hdf5/"
2427 (substitute* '("BitSetConversionUtils.java"
2429 (("import ch.rinn.restrictions.Private;") "")
2431 (with-directory-excursion "sourceTest/java/ch/systemsx/cisd/hdf5/"
2432 (substitute* '("BitSetConversionTest.java"
2433 "h5ar/HDF5ArchiverTest.java")
2434 (("import ch.rinn.restrictions.Friend;") "")
2436 ;; Remove leftovers from removing @Friend
2437 (substitute* "h5ar/HDF5ArchiverTest.java"
2438 (("\\{ HDF5Archiver.class, IdCache.class, LinkRecord.class \\}\\)")
2441 (add-before 'configure 'build-native-library
2442 (lambda* (#:key inputs #:allow-other-keys)
2443 (let ((jdk (assoc-ref inputs "jdk"))
2444 (hdf5 (assoc-ref inputs "hdf5"))
2445 (dir ,(match (%current-system)
2448 ((or "armhf-linux" "aarch64-linux")
2450 ((or "x86_64-linux")
2452 (_ "unknown-Linux"))))
2453 (with-directory-excursion "source/c"
2454 (apply invoke `("gcc" "-shared" "-O3"
2456 "-Wl,--exclude-libs,ALL"
2457 ,@(find-files "jhdf5" "\\.c$")
2458 ,@(find-files "hdf-java" "\\.c$")
2459 ,(string-append "-I" hdf5 "/include")
2460 ,(string-append "-I" jdk "/include")
2461 ,(string-append "-I" jdk "/include/linux")
2462 ,(string-append hdf5 "/lib/libhdf5.a")
2463 "-o" "libjhdf5.so" "-lz")))
2464 (install-file "source/c/libjhdf5.so"
2465 (string-append "libs/native/jhdf5/" dir))
2467 ;; In the "check" phase we only build the test executable.
2468 (add-after 'check 'run-tests
2470 (invoke "java" "-jar" "targets/dist/sis-jhdf5-test.jar")
2471 (delete-file "targets/dist/sis-jhdf5-test.jar")
2474 (install-jars "targets/dist")))))
2476 `(("java-cisd-base" ,java-cisd-base)
2477 ("java-cisd-args4j" ,java-cisd-args4j)
2478 ("java-commons-lang" ,java-commons-lang)
2479 ("java-commons-io" ,java-commons-io)
2483 `(("jdk" ,icedtea-8)
2484 ("java-testng" ,java-testng)
2485 ("java-junit" ,java-junit)
2486 ("java-jmock" ,java-jmock)
2487 ("java-hamcrest-core" ,java-hamcrest-core)
2492 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2493 "jhdf5/tags/release/"
2494 (version-major+minor base-version)
2496 "/build_resources/"))
2497 (revision revision)))
2500 "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk"))))))
2501 (home-page "https://wiki-bsse.ethz.ch/display/JHDF5/")
2502 (synopsis "Java binding for HDF5")
2503 (description "JHDF5 is a high-level API in Java for reading and writing
2504 HDF5 files, building on the libraries provided by the HDF Group.")
2505 ;; The C sources are under a non-copyleft license, which looks like a
2506 ;; variant of the BSD licenses. The whole package is under the ASL2.0.
2507 (license (list license:asl2.0
2508 (license:non-copyleft "file://source/c/COPYING"))))))
2510 (define-public java-classpathx-servletapi
2512 (name "java-classpathx-servletapi")
2516 (uri (string-append "mirror://gnu/classpathx/servletapi/"
2517 "servletapi-" version ".tar.gz"))
2520 "07d8h051siga2f33fra72hk12sbq1bxa4jifjg0qj0vfazjjff0x"))))
2521 (build-system ant-build-system)
2523 `(#:tests? #f ; there is no test target
2524 #:build-target "compile"
2526 (list "-Dbuild.compiler=javac1.8"
2527 (string-append "-Ddist=" (assoc-ref %outputs "out")))
2529 (modify-phases %standard-phases
2531 (lambda* (#:key make-flags #:allow-other-keys)
2532 (apply invoke `("ant" "dist" ,@make-flags)))))))
2533 (home-page "https://www.gnu.org/software/classpathx/")
2534 (synopsis "Java servlet API implementation")
2535 (description "This is the GNU servlet API distribution, part of the
2536 ClasspathX project. It provides implementations of version 3.0 of the servlet
2537 API and version 2.1 of the Java ServerPages API.")
2538 (license license:gpl3+)))
2540 (define-public java-javaee-servletapi
2542 (name "java-javaee-servletapi")
2546 (uri (string-append "https://github.com/javaee/servlet-spec/"
2547 "archive/" version ".zip"))
2548 (file-name (string-append name "-" version ".zip"))
2551 "0m6p13vgfb1ihich1jp5j6fqlhkjsrkn32c86bsbkryp38ipwg8w"))))
2552 (build-system ant-build-system)
2554 `(#:jar-name "javax-servletapi.jar"
2557 #:source-dir "src/main/java"))
2559 `(("unzip" ,unzip)))
2560 (home-page "https://javaee.github.io/servlet-spec/")
2561 (synopsis "Java servlet API")
2562 (description "Java Servlet is the foundation web specification in the
2563 Java Enterprise Platform. Developers can build web applications using the
2564 Servlet API to interact with the request/response workflow. This project
2565 provides information on the continued development of the Java Servlet
2567 ;; Main code is dual-licensed by Oracle under either GLP2 or CDDL 1.1.
2568 ;; Some files are licensed under ASL 2.0.
2569 (license (list license:asl2.0 license:gpl2 license:cddl1.1))))
2571 (define-public java-swt
2576 ;; The types of many variables and procedures differ in the sources
2577 ;; dependent on whether the target architecture is a 32-bit system or a
2578 ;; 64-bit system. Instead of patching the sources on demand in a build
2579 ;; phase we download either the 32-bit archive (which mostly uses "int"
2580 ;; types) or the 64-bit archive (which mostly uses "long" types).
2581 (let ((hash32 "09q0cbh90d90q3a7dx9430kc4m6bijrkr4lajrmzzvi0jjdpq4v9")
2582 (hash64 "17k5hs75a87ssmc5xhwdfdm2gn4zba0r837l2455za01krnkaa2q")
2585 (let-values (((hash file)
2586 (match (or (%current-target-system) (%current-system))
2587 ("x86_64-linux" (values hash64 file64))
2588 (_ (values hash32 file32)))))
2592 "http://download.eclipse.org/eclipse/downloads/drops4/"
2593 "R-" version "-201710090410/swt-" version
2594 "-gtk-linux-" file ".zip"))
2595 (sha256 (base32 hash))))))
2596 (build-system ant-build-system)
2598 `(#:jar-name "swt.jar"
2600 #:tests? #f ; no "check" target
2602 (modify-phases %standard-phases
2604 (lambda* (#:key source #:allow-other-keys)
2606 (invoke "unzip" source "-d" "swt")
2609 (invoke "unzip" "src.zip" "-d" "src")))
2610 ;; The classpath contains invalid icecat jars. Since we don't need
2611 ;; anything other than the JDK on the classpath, we can simply unset
2613 (add-after 'configure 'unset-classpath
2614 (lambda _ (unsetenv "CLASSPATH") #t))
2615 (add-before 'build 'build-native
2616 (lambda* (#:key inputs outputs #:allow-other-keys)
2617 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
2618 ;; Build shared libraries. Users of SWT have to set the system
2619 ;; property swt.library.path to the "lib" directory of this
2622 (setenv "OUTPUT_DIR" lib)
2623 (with-directory-excursion "src"
2624 (invoke "bash" "build.sh")))))
2625 (add-after 'install 'install-native
2626 (lambda* (#:key outputs #:allow-other-keys)
2627 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
2628 (for-each (lambda (file)
2629 (install-file file lib))
2630 (find-files "." "\\.so$"))
2634 ("libxtst" ,libxtst)
2639 `(("pkg-config" ,pkg-config)
2641 (home-page "https://www.eclipse.org/swt/")
2642 (synopsis "Widget toolkit for Java")
2644 "SWT is a widget toolkit for Java designed to provide efficient, portable
2645 access to the user-interface facilities of the operating systems on which it
2647 ;; SWT code is licensed under EPL1.0
2648 ;; Gnome and Gtk+ bindings contain code licensed under LGPLv2.1
2649 ;; Cairo bindings contain code under MPL1.1
2650 ;; XULRunner 1.9 bindings contain code under MPL2.0
2655 license:lgpl2.1+))))
2657 (define-public java-xz
2663 (uri (string-append "http://tukaani.org/xz/xz-java-" version ".zip"))
2666 "1z3p1ri1gvl07inxn0agx44ck8n7wrzfmvkz8nbq3njn8r9wba8x"))))
2667 (build-system ant-build-system)
2669 `(#:tests? #f ; There are no tests to run.
2670 #:jar-name ,(string-append "xz-" version ".jar")
2672 (modify-phases %standard-phases
2673 ;; The unpack phase enters the "maven" directory by accident.
2674 (add-after 'unpack 'chdir
2675 (lambda _ (chdir "..") #t)))))
2677 `(("unzip" ,unzip)))
2678 (home-page "https://tukaani.org/xz/java.html")
2679 (synopsis "Implementation of XZ data compression in pure Java")
2680 (description "This library aims to be a complete implementation of XZ data
2681 compression in pure Java. Single-threaded streamed compression and
2682 decompression and random access decompression have been fully implemented.")
2683 (license license:public-domain)))
2685 ;; java-hamcrest-core uses qdox version 1.12. We package this version instead
2686 ;; of the latest release.
2687 (define-public java-qdox-1.12
2693 (uri (string-append "http://central.maven.org/maven2/"
2694 "com/thoughtworks/qdox/qdox/" version
2695 "/qdox-" version "-sources.jar"))
2698 "0hlfbqq2avf5s26wxkksqmkdyk6zp9ggqn37c468m96mjv0n9xfl"))))
2699 (build-system ant-build-system)
2701 `(;; Tests require junit
2703 #:jar-name "qdox.jar"
2705 (modify-phases %standard-phases
2707 (lambda* (#:key source #:allow-other-keys)
2709 (with-directory-excursion "src"
2710 (invoke "jar" "-xf" source))))
2711 ;; At this point we don't have junit, so we must remove the API
2713 (add-after 'unpack 'delete-tests
2715 (delete-file-recursively "src/com/thoughtworks/qdox/junit")
2717 (home-page "http://qdox.codehaus.org/")
2718 (synopsis "Parse definitions from Java source files")
2720 "QDox is a high speed, small footprint parser for extracting
2721 class/interface/method definitions from source files complete with JavaDoc
2722 @code{@@tags}. It is designed to be used by active code generators or
2723 documentation tools.")
2724 (license license:asl2.0)))
2726 (define-public java-jarjar
2728 (name "java-jarjar")
2733 "https://storage.googleapis.com/google-code-archive-downloads/v2/"
2734 "code.google.com/jarjar/jarjar-src-" version ".zip"))
2737 "1v8irhni9cndcw1l1wxqgry013s2kpj0qqn57lj2ji28xjq8ndjl"))
2738 (modules '((guix build utils)))
2741 ;; Delete bundled thirds-party jar archives.
2742 ;; TODO: unbundle maven-plugin-api.
2743 (delete-file "lib/asm-4.0.jar")
2744 (delete-file "lib/asm-commons-4.0.jar")
2745 (delete-file "lib/junit-4.8.1.jar")
2747 (build-system ant-build-system)
2749 `(;; Tests require junit, which ultimately depends on this package.
2751 #:build-target "jar"
2753 (modify-phases %standard-phases
2754 (add-before 'build 'do-not-use-bundled-asm
2755 (lambda* (#:key inputs #:allow-other-keys)
2756 (substitute* "build.xml"
2757 (("<path id=\"path.build\">")
2758 (string-append "<path id=\"path.build\"><fileset dir=\""
2759 (assoc-ref inputs "java-asm-bootstrap")
2760 "/share/java\" includes=\"**/*.jar\"/>"))
2761 (("<zipfileset src=\"lib/asm-4.0.jar\"/>") "")
2762 (("lib/asm-commons-4.0.jar")
2763 (string-append (assoc-ref inputs "java-asm-bootstrap")
2764 "/share/java/asm-6.0.jar"))
2765 (("<include name=\"org/objectweb/asm/commons/Remap\\*\\.class\"/>")
2766 (string-append "<include name=\"org/objectweb/asm/"
2767 "commons/Remap*.class\"/>"
2768 "<include name=\"org/objectweb/asm/*.class\"/>"
2769 "<include name=\"org/objectweb/asm/"
2770 "signature/*.class\"/>"
2771 "<include name=\"org/objectweb/asm/"
2772 "commons/SignatureRemapper.class\"/>")))
2775 (lambda* (#:key outputs #:allow-other-keys)
2776 (let ((target (string-append (assoc-ref outputs "out")
2778 (install-file (string-append "dist/jarjar-" ,version ".jar")
2782 `(("java-asm-bootstrap" ,java-asm-bootstrap)))
2784 `(("unzip" ,unzip)))
2785 (home-page "https://code.google.com/archive/p/jarjar/")
2786 (synopsis "Repackage Java libraries")
2788 "Jar Jar Links is a utility that makes it easy to repackage Java
2789 libraries and embed them into your own distribution. Jar Jar Links includes
2790 an Ant task that extends the built-in @code{jar} task.")
2791 (license license:asl2.0)))
2793 (define-public java-hamcrest-core
2795 (name "java-hamcrest-core")
2799 (uri (string-append "https://github.com/hamcrest/JavaHamcrest/"
2800 "archive/hamcrest-java-" version ".tar.gz"))
2803 "11g0s105fmwzijbv08lx8jlb521yravjmxnpgdx08fvg1kjivhva"))
2804 (modules '((guix build utils)))
2807 ;; Delete bundled thirds-party jar archives.
2808 (delete-file-recursively "lib")
2810 (build-system ant-build-system)
2812 `(#:tests? #f ; Tests require junit
2813 #:modules ((guix build ant-build-system)
2816 #:make-flags (list (string-append "-Dversion=" ,version))
2817 #:test-target "unit-test"
2818 #:build-target "core"
2820 (modify-phases %standard-phases
2821 ;; Disable unit tests, because they require junit, which requires
2822 ;; hamcrest-core. We also give a fixed value to the "Built-Date"
2823 ;; attribute from the manifest for reproducibility.
2824 (add-before 'configure 'patch-build.xml
2826 (substitute* "build.xml"
2827 (("unit-test, ") "")
2828 (("\\$\\{build.timestamp\\}") "guix"))
2830 ;; Java's "getMethods()" returns methods in an unpredictable order.
2831 ;; To make the output of the generated code deterministic we must
2832 ;; sort the array of methods.
2833 (add-after 'unpack 'make-method-order-deterministic
2835 (substitute* "hamcrest-generator/src/main/java/org/hamcrest/generator/ReflectiveFactoryReader.java"
2836 (("import java\\.util\\.Iterator;" line)
2837 (string-append line "\n"
2838 "import java.util.Arrays; import java.util.Comparator;"))
2839 (("allMethods = cls\\.getMethods\\(\\);" line)
2840 (string-append "_" line
2842 private Method[] getSortedMethods() {
2843 Arrays.sort(_allMethods, new Comparator<Method>() {
2845 public int compare(Method a, Method b) {
2846 return a.toString().compareTo(b.toString());
2852 private Method[] allMethods = getSortedMethods();")))
2854 (add-before 'build 'do-not-use-bundled-qdox
2855 (lambda* (#:key inputs #:allow-other-keys)
2856 (substitute* "build.xml"
2857 (("lib/generator/qdox-1.12.jar")
2858 (string-append (assoc-ref inputs "java-qdox-1.12")
2859 "/share/java/qdox.jar")))
2861 ;; build.xml searches for .jar files in this directoy, which
2862 ;; we remove from the source archive.
2863 (add-before 'build 'create-dummy-directories
2865 (mkdir-p "lib/integration")
2868 (lambda* (#:key outputs #:allow-other-keys)
2869 (let* ((target (string-append (assoc-ref outputs "out")
2871 (version-suffix ,(string-append "-" version ".jar"))
2872 (install-without-version-suffix
2875 (string-append target
2876 (basename jar version-suffix)
2880 install-without-version-suffix
2883 (and (string-suffix? ".jar" name)
2884 (not (string-suffix? "-sources.jar" name)))))))
2887 `(("java-qdox-1.12" ,java-qdox-1.12)
2888 ("java-jarjar" ,java-jarjar)))
2889 (home-page "http://hamcrest.org/")
2890 (synopsis "Library of matchers for building test expressions")
2892 "This package provides a library of matcher objects (also known as
2893 constraints or predicates) allowing @code{match} rules to be defined
2894 declaratively, to be used in other frameworks. Typical scenarios include
2895 testing frameworks, mocking libraries and UI validation rules.")
2896 (license license:bsd-2)))
2898 (define-public java-junit
2904 (uri (string-append "https://github.com/junit-team/junit/"
2905 "archive/r" version ".tar.gz"))
2906 (file-name (string-append name "-" version ".tar.gz"))
2909 "090dn5v1vs0b3acyaqc0gjf6p8lmd2h24wfzsbq7sly6b214anws"))
2910 (modules '((guix build utils)))
2913 ;; Delete bundled jar archives.
2914 (delete-file-recursively "lib")
2916 (build-system ant-build-system)
2918 `(#:tests? #f ; no tests
2919 #:jar-name "junit.jar"))
2921 `(("java-hamcrest-core" ,java-hamcrest-core)))
2922 (home-page "http://junit.org/")
2923 (synopsis "Test framework for Java")
2925 "JUnit is a simple framework to write repeatable tests for Java projects.
2926 JUnit provides assertions for testing expected results, test fixtures for
2927 sharing common test data, and test runners for running tests.")
2928 (license license:epl1.0)))
2930 (define-public java-plexus-utils
2932 (name "java-plexus-utils")
2936 (uri (string-append "https://github.com/codehaus-plexus/"
2937 "plexus-utils/archive/plexus-utils-"
2941 "1mlwpc6fms24slygv5yvi6fi9hcha2fh0v73p5znpi78bg36i2js"))))
2942 (build-system ant-build-system)
2943 ;; FIXME: The default build.xml does not include a target to install
2946 `(#:jar-name "plexus-utils.jar"
2947 #:source-dir "src/main"
2949 (modify-phases %standard-phases
2950 (add-after 'unpack 'fix-reference-to-/bin-and-/usr
2952 (substitute* "src/main/java/org/codehaus/plexus/util/\
2953 cli/shell/BourneShell.java"
2954 (("/bin/sh") (which "sh"))
2955 (("/usr/") (getcwd)))
2957 (add-after 'unpack 'fix-or-disable-broken-tests
2959 (with-directory-excursion "src/test/java/org/codehaus/plexus/util"
2960 (substitute* '("cli/CommandlineTest.java"
2961 "cli/shell/BourneShellTest.java")
2962 (("/bin/sh") (which "sh"))
2963 (("/bin/echo") (which "echo")))
2965 ;; This test depends on MavenProjectStub, but we don't have
2966 ;; a package for Maven.
2967 (delete-file "introspection/ReflectionValueExtractorTest.java")
2969 ;; FIXME: The command line tests fail, maybe because they use
2971 (delete-file "cli/CommandlineTest.java"))
2974 `(("java-junit" ,java-junit)))
2975 (home-page "http://codehaus-plexus.github.io/plexus-utils/")
2976 (synopsis "Common utilities for the Plexus framework")
2977 (description "This package provides various Java utility classes for the
2978 Plexus framework to ease working with strings, files, command lines, XML and
2980 (license license:asl2.0)))
2982 (define-public java-plexus-interpolation
2984 (name "java-plexus-interpolation")
2988 (uri (string-append "https://github.com/codehaus-plexus/"
2989 "plexus-interpolation/archive/"
2990 "plexus-interpolation-" version ".tar.gz"))
2993 "03377yzlx5q440m6sxxgv6a5qb8fl30zzcgxgc0hxk5qgl2z1jjn"))))
2994 (build-system ant-build-system)
2996 `(#:jar-name "plexus-interpolation.jar"
2997 #:source-dir "src/main"))
2999 `(("java-junit" ,java-junit)
3000 ("java-hamcrest-core" ,java-hamcrest-core)))
3001 (home-page "http://codehaus-plexus.github.io/plexus-interpolation/")
3002 (synopsis "Java components for interpolating ${} strings and the like")
3003 (description "Plexus interpolator is a modular, flexible interpolation
3004 framework for the expression language style commonly seen in Maven, Plexus,
3005 and other related projects.
3007 It has its foundation in the @code{org.codehaus.plexus.utils.interpolation}
3008 package within @code{plexus-utils}, but has been separated in order to allow
3009 these two libraries to vary independently of one another.")
3010 (license license:asl2.0)))
3012 (define-public java-plexus-classworlds
3014 (name "java-plexus-classworlds")
3018 (uri (string-append "https://github.com/codehaus-plexus/"
3019 "plexus-classworlds/archive/plexus-classworlds-"
3023 "1qm4p0rl8d82lzhsiwnviw11jnq44s0gflg78zq152xyyr2xmh8g"))))
3024 (build-system ant-build-system)
3026 `(#:jar-name "plexus-classworlds.jar"
3027 #:source-dir "src/main"
3028 #:tests? #f));; FIXME: we need to generate some resources as in pom.xml
3030 `(("java-junit" ,java-junit)))
3031 (home-page "http://codehaus-plexus.github.io/plexus-classworlds/")
3032 (synopsis "Java class loader framework")
3033 (description "Plexus classworlds replaces the native @code{ClassLoader}
3034 mechanism of Java. It is especially useful for dynamic loading of application
3036 (license license:asl2.0)))
3038 (define java-plexus-container-default-bootstrap
3040 (name "java-plexus-container-default-bootstrap")
3044 (uri (string-append "https://github.com/codehaus-plexus/plexus-containers"
3045 "/archive/plexus-containers-" version ".tar.gz"))
3048 "0xw5g30qf4a83608rw9v2hv8pfsz7d69dkdhk6r0wia4q78hh1pc"))))
3049 (build-system ant-build-system)
3051 `(#:jar-name "container-default.jar"
3052 #:source-dir "plexus-container-default/src/main/java"
3053 #:test-dir "plexus-container-default/src/test"
3055 #:tests? #f; requires plexus-archiver, which depends on this package
3057 (modify-phases %standard-phases
3058 (add-before 'build 'copy-resources
3061 "plexus-container-default/src/main/resources/"
3065 `(("worldclass" ,java-plexus-classworlds)
3066 ("xbean" ,java-geronimo-xbean-reflect)
3067 ("utils" ,java-plexus-utils)
3068 ("junit" ,java-junit)
3069 ("guava" ,java-guava)))
3070 (home-page "https://github.com/codehaus-plexus/plexus-containers")
3071 (synopsis "Inversion-of-control container")
3072 (description "Plexus-default-container is Plexus' inversion-of-control
3073 (@dfn{IoC}) container. It is composed of its public API and its default
3075 (license license:asl2.0)))
3077 (define-public java-plexus-io
3079 (name "java-plexus-io")
3083 (uri (string-append "https://github.com/codehaus-plexus/plexus-io"
3084 "/archive/plexus-io-" version ".tar.gz"))
3087 "0f2j41kihaymxkpbm55smpxjja235vad8cgz94frfy3ppcp021dw"))))
3088 (build-system ant-build-system)
3090 `(#:jar-name "plexus-io.jar"
3091 #:source-dir "src/main/java"
3092 #:test-dir "src/test"
3095 (modify-phases %standard-phases
3096 (add-before 'build 'copy-resources
3098 (mkdir-p "build/classes/META-INF/plexus")
3099 (copy-file "src/main/resources/META-INF/plexus/components.xml"
3100 "build/classes/META-INF/plexus/components.xml")
3103 `(("utils" ,java-plexus-utils)
3104 ("commons-io" ,java-commons-io)
3105 ("java-jsr305" ,java-jsr305)))
3107 `(("junit" ,java-junit)
3108 ("hamcrest" ,java-hamcrest-core)
3109 ("guava" ,java-guava)
3110 ("classworlds" ,java-plexus-classworlds)
3111 ("xbean" ,java-geronimo-xbean-reflect)
3112 ("container-default" ,java-plexus-container-default-bootstrap)))
3113 (home-page "https://github.com/codehaus-plexus/plexus-io")
3114 (synopsis "I/O plexus components")
3115 (description "Plexus IO is a set of plexus components, which are designed
3116 for use in I/O operations. This implementation using plexus components allows
3117 reusing it in maven.")
3118 (license license:asl2.0)))
3120 (define-public java-plexus-archiver
3122 (name "java-plexus-archiver")
3126 (uri (string-append "https://github.com/codehaus-plexus/plexus-archiver"
3127 "/archive/plexus-archiver-" version ".tar.gz"))
3130 "0iv1j7khra6icqh3jndng3iipfmkc7l5jq2y802cm8r575v75pyv"))))
3131 (build-system ant-build-system)
3133 `(#:jar-name "plexus-archiver.jar"
3134 #:source-dir "src/main/java"
3136 #:test-dir "src/test"
3137 #:test-exclude (list "**/Abstract*.java" "**/Base*.java")
3139 (modify-phases %standard-phases
3140 (add-before 'check 'remove-failing
3142 ;; Requires an older version of plexus container
3144 "src/test/java/org/codehaus/plexus/archiver/DuplicateFilesTest.java")
3146 (add-before 'build 'copy-resources
3148 (mkdir-p "build/classes/META-INF/plexus")
3149 (copy-file "src/main/resources/META-INF/plexus/components.xml"
3150 "build/classes/META-INF/plexus/components.xml")
3153 `(("utils" ,java-plexus-utils)
3154 ("commons-io" ,java-commons-io)
3155 ("snappy" ,java-iq80-snappy)
3156 ("io" ,java-plexus-io)
3157 ("compress" ,java-commons-compress)
3158 ("container-default" ,java-plexus-container-default-bootstrap)
3159 ("snappy" ,java-snappy)
3160 ("java-jsr305" ,java-jsr305)))
3162 `(("junit" ,java-junit)
3163 ("classworld" ,java-plexus-classworlds)
3164 ("xbean" ,java-geronimo-xbean-reflect)
3165 ("xz" ,java-tukaani-xz)
3166 ("guava" ,java-guava)))
3167 (home-page "https://github.com/codehaus-plexus/plexus-archiver")
3168 (synopsis "Archiver component of the Plexus project")
3169 (description "Plexus-archiver contains a component to deal with project
3171 (license license:asl2.0)))
3173 (define-public java-plexus-container-default
3175 (inherit java-plexus-container-default-bootstrap)
3176 (name "java-plexus-container-default")
3178 `(#:jar-name "container-default.jar"
3179 #:source-dir "plexus-container-default/src/main/java"
3180 #:test-dir "plexus-container-default/src/test"
3181 #:test-exclude (list ;"**/*Test.java"
3183 ;; Requires plexus-hierarchy
3184 "**/PlexusHierarchyTest.java"
3186 "**/ComponentRealmCompositionTest.java"
3187 "**/PlexusContainerTest.java")
3190 (modify-phases %standard-phases
3191 (add-before 'build 'copy-resources
3194 "plexus-container-default/src/main/resources/"
3197 (add-before 'check 'fix-paths
3199 (let ((dir "plexus-container-default/src/test/java/org/codehaus"))
3202 dir "/plexus/component/composition/"
3203 "ComponentRealmCompositionTest.java")
3204 (("src/test") "plexus-container-default/src/test"))
3207 `(("worldclass" ,java-plexus-classworlds)
3208 ("xbean" ,java-geronimo-xbean-reflect)
3209 ("utils" ,java-plexus-utils)
3210 ("junit" ,java-junit)
3211 ("guava" ,java-guava)))
3213 `(("archiver" ,java-plexus-archiver)
3214 ("hamcrest" ,java-hamcrest-core)))))
3216 (define-public java-plexus-component-annotations
3218 (inherit java-plexus-container-default)
3219 (name "java-plexus-component-annotations")
3221 `(#:jar-name "plexus-component-annotations.jar"
3222 #:source-dir "plexus-component-annotations/src/main/java"
3223 #:tests? #f)); no tests
3226 (synopsis "Plexus descriptors generator")
3227 (description "This package is a Maven plugin to generate Plexus descriptors
3228 from source tags and class annotations.")))
3230 (define-public java-plexus-cipher
3232 (name "java-plexus-cipher")
3236 (uri (string-append "https://github.com/codehaus-plexus/plexus-cipher"
3237 "/archive/plexus-cipher-" version ".tar.gz"))
3240 "1j3r8xzlxlk340snkjp6lk2ilkxlkn8qavsfiq01f43xmvv8ymk3"))))
3241 (build-system ant-build-system)
3243 `(#:jar-name "plexus-cipher.jar"
3244 #:source-dir "src/main/java"
3246 #:tests? #f; FIXME: requires sisu-inject-bean
3248 (modify-phases %standard-phases
3249 (add-before 'build 'copy-resources
3251 (copy-recursively "src/main/resources" "build/classes")
3252 (mkdir-p "build/classes/META-INF/sisu")
3253 (with-output-to-file "build/classes/META-INF/sisu/javax.inject.Named"
3255 (display "org.sonatype.plexus.components.cipher.DefaultPlexusCipher\n")))
3258 `(("java-cdi-api" ,java-cdi-api)
3259 ("java-javax-inject" ,java-javax-inject)))
3260 (home-page "https://github.com/sonatype/plexus-cipher")
3261 (synopsis "Encryption/decryption Component")
3262 (description "Plexus-cipher contains a component to deal with encryption
3264 (license license:asl2.0)))
3266 (define-public java-plexus-compiler-api
3268 (name "java-plexus-compiler-api")
3272 (uri (string-append "https://github.com/codehaus-plexus/plexus-compiler"
3273 "/archive/plexus-compiler-" version ".tar.gz"))
3276 "09vmxs0807wsd26nbrwwj5l8ycmzazqycj52l7w6wjvkryywi69h"))))
3277 (build-system ant-build-system)
3279 `(#:jar-name "plexus-compiler-api.jar"
3280 #:source-dir "plexus-compiler-api/src/main/java"
3282 #:test-dir "plexus-compiler-api/src/test"))
3284 `(("java-plexus-container-default" ,java-plexus-container-default)
3285 ("java-plexus-util" ,java-plexus-utils)))
3287 `(("java-junit" ,java-junit)))
3288 (home-page "https://github.com/codehaus-plexus/plexus-compiler")
3289 (synopsis "Plexus Compilers component's API to manipulate compilers")
3290 (description "This package contains the API used by components to manipulate
3292 (license (list license:asl2.0
3295 (define-public java-plexus-compiler-javac
3297 (inherit java-plexus-compiler-api)
3298 (name "java-plexus-compiler-javac")
3300 `(#:jar-name "plexus-compiler-javac.jar"
3301 #:source-dir "plexus-compilers/plexus-compiler-javac/src/main/java"
3303 #:tests? #f; depends on compiler-test -> maven-core -> ... -> this package.
3304 #:test-dir "plexus-compilers/plexus-compiler-javac/src/test"))
3306 `(("java-plexus-compiler-api" ,java-plexus-compiler-api)
3307 ("java-plexus-utils" ,java-plexus-utils)
3308 ("java-plexus-container-default" ,java-plexus-container-default)))
3310 `(("java-junit" ,java-junit)))
3311 (synopsis "Javac Compiler support for Plexus Compiler component")
3312 (description "This package contains the Javac Compiler support for Plexus
3313 Compiler component.")))
3315 (define-public java-plexus-sec-dispatcher
3317 (name "java-plexus-sec-dispatcher")
3318 (version "1.4") ;; Newest release listed at the Maven Central Repository.
3320 ;; This project doesn't tag releases or publish tarballs, so we take
3321 ;; the "prepare release plexus-sec-dispatcher-1.4" git commit.
3323 (uri (string-append "https://github.com/sonatype/plexus-sec-dispatcher/"
3324 "archive/7db8f88048.tar.gz"))
3327 "1smfrk4n7xbrsxpxcp2j4i0j8q86j73w0w6xg7qz83dp6dagdjgp"))
3328 (file-name (string-append name "-" version ".tar.gz"))))
3330 `(#:jar-name "plexus-sec-dispatcher.jar"
3331 #:source-dir "src/main/java"
3334 (modify-phases %standard-phases
3335 (add-before 'build 'generate-models
3336 (lambda* (#:key inputs #:allow-other-keys)
3337 (define (modello-single-mode file version mode)
3339 "org.codehaus.modello.ModelloCli"
3340 file mode "src/main/java" version
3342 (let ((file "src/main/mdo/settings-security.mdo"))
3343 (modello-single-mode file "1.0.0" "java")
3344 (modello-single-mode file "1.0.0" "xpp3-reader")
3345 (modello-single-mode file "1.0.0" "xpp3-writer"))
3347 (add-before 'build 'generate-components.xml
3349 (mkdir-p "build/classes/META-INF/plexus")
3350 (with-output-to-file "build/classes/META-INF/plexus/components.xml"
3356 <role>org.sonatype.plexus.components.sec.dispatcher.SecDispatcher</role>\n
3357 <role-hint>default</role-hint>\n
3358 <implementation>org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher</implementation>\n
3359 <description></description>\n
3362 <role>org.sonatype.plexus.components.cipher.PlexusCipher</role>\n
3363 <field-name>_cipher</field-name>\n
3366 <role>org.sonatype.plexus.components.sec.dispatcher.PasswordDecryptor</role>\n
3367 <field-name>_decryptors</field-name>\n
3371 <_configuration-file>~/.settings-security.xml</_configuration-file>\n
3375 </component-set>\n")))
3377 (add-before 'check 'fix-paths
3379 (copy-recursively "src/test/resources" "target")
3382 `(("java-plexus-cipher" ,java-plexus-cipher)))
3384 `(("java-modello-core" ,java-modello-core)
3386 ("java-plexus-container-default" ,java-plexus-container-default)
3387 ("java-plexus-classworlds" ,java-plexus-classworlds)
3388 ("java-plexus-utils" ,java-plexus-utils)
3389 ("java-guava" ,java-guava)
3390 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
3391 ("java-sisu-build-api" ,java-sisu-build-api)
3393 ("java-modellop-plugins-java" ,java-modello-plugins-java)
3394 ("java-modellop-plugins-xml" ,java-modello-plugins-xml)
3395 ("java-modellop-plugins-xpp3" ,java-modello-plugins-xpp3)
3397 ("java-junit" ,java-junit)))
3398 (build-system ant-build-system)
3399 (home-page "https://github.com/sonatype/plexus-sec-dispatcher")
3400 (synopsis "Plexus Security Dispatcher Component")
3401 (description "This package is the Plexus Security Dispatcher Component.
3402 This component decrypts a string passed to it.")
3403 (license license:asl2.0)))
3405 (define-public java-plexus-cli
3407 (name "java-plexus-cli")
3412 (url "https://github.com/sonatype/plexus-cli")
3413 (commit "a776afa6bca84e5107bedb69440329cdb24ed645")))
3414 (file-name (string-append name "-" version))
3417 "0xjrlay605rypv3zd7y24vlwf0039bil3n2cqw54r1ddpysq46vx"))))
3418 (build-system ant-build-system)
3420 `(#:jar-name "plexus-cli.jar"
3421 #:source-dir "src/main/java"
3423 #:test-dir "src/test"))
3425 `(("java-commons-cli" ,java-commons-cli)
3426 ("java-plexus-container-default" ,java-plexus-container-default)
3427 ("java-plexus-classworlds" ,java-plexus-classworlds)))
3429 `(("java-plexus-utils" ,java-plexus-utils)
3430 ("java-junit" ,java-junit)
3431 ("java-guava" ,java-guava)))
3432 (home-page "https://codehaus-plexus.github.io/plexus-cli")
3433 (synopsis "CLI building library for plexus")
3434 (description "This package is a library to help creating CLI around
3435 Plexus components.")
3436 (license license:asl2.0)))
3438 (define-public java-sisu-build-api
3440 (name "java-sisu-build-api")
3444 (uri (string-append "https://github.com/sonatype/sisu-build-api/"
3445 "archive/plexus-build-api-" version ".tar.gz"))
3448 "1c3rrpma3x634xp2rm2p5iskfhzdyc7qfbhjzr70agrl1jwghgy2"))))
3449 (build-system ant-build-system)
3451 `(#:jar-name "sisu-build-api.jar"
3452 #:source-dir "src/main/java"
3454 #:tests? #f; FIXME: how to run the tests?
3456 (modify-phases %standard-phases
3457 (add-before 'build 'copy-resources
3459 (copy-recursively "src/main/resources" "build/classes")
3460 (substitute* (find-files "build/classes")
3461 (("\\$\\{project.version\\}") ,version))
3463 (add-before 'build 'generate-plexus-compontent
3465 (mkdir-p "build/classes/META-INF/plexus")
3466 ;; This file is required for plexus to inject this package.
3467 ;; FIXME: how is it generated?
3468 (with-output-to-file "build/classes/META-INF/plexus/components.xml"
3474 <role>org.sonatype.plexus.build.incremental.BuildContext</role>\n
3475 <role-hint>default</role-hint>\n
3476 <implementation>org.sonatype.plexus.build.incremental.DefaultBuildContext</implementation>\n
3477 <description>Filesystem based non-incremental build context implementation\n
3478 which behaves as if all files were just created.</description>\n
3481 </component-set>\n")))
3484 `(("java-plexus-utils" ,java-plexus-utils)
3485 ("java-plexus-container-default" ,java-plexus-container-default)))
3486 (home-page "https://github.com/sonatype/sisu-build-api/")
3487 (synopsis "Base build API for maven")
3488 (description "This package contains the base build API for maven and
3489 a default implementation of it. This API is about scanning files in a
3490 project and determining what files need to be rebuilt.")
3491 (license license:asl2.0)))
3493 (define-public java-modello-core
3495 (name "java-modello-core")
3499 (uri (string-append "https://github.com/codehaus-plexus/modello"
3500 "/archive/modello-" version ".tar.gz"))
3503 "0l2pvns8pmlrmjm3iknp7gpg3654y1m8qhy55b19sdwdchdcyxfh"))))
3504 (build-system ant-build-system)
3506 `(#:jar-name "modello-core.jar"
3507 #:source-dir "modello-core/src/main/java"
3508 #:test-dir "modello-core/src/test"
3509 #:main-class "org.codehaus.modello.ModelloCli"
3512 (modify-phases %standard-phases
3513 (add-before 'build 'copy-resources
3515 (mkdir-p "build/classes/META-INF/plexus")
3516 (copy-file "modello-core/src/main/resources/META-INF/plexus/components.xml"
3517 "build/classes/META-INF/plexus/components.xml")
3519 (add-before 'check 'fix-tests
3521 (with-directory-excursion "modello-core/src/test/java/org/codehaus"
3522 (substitute* '("modello/core/DefaultModelloCoreTest.java"
3523 "modello/core/io/ModelReaderTest.java")
3524 (("src/test") "modello-core/src/test")))
3527 `(("java-plexus-utils" ,java-plexus-utils)
3528 ("java-plexus-container-default" ,java-plexus-container-default)
3529 ("java-sisu-build-api" ,java-sisu-build-api)))
3531 `(("java-junit" ,java-junit)
3532 ("java-plexus-classworlds" ,java-plexus-classworlds)
3533 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
3534 ("java-guava" ,java-guava)))
3535 (home-page "http://codehaus-plexus.github.io/modello/")
3536 (synopsis "Framework for code generation from a simple model")
3537 (description "Modello is a framework for code generation from a simple model.
3539 Modello generates code from a simple model format: based on a plugin
3540 architecture, various types of code and descriptors can be generated from the
3541 single model, including Java POJOs, XML/JSON/YAML marshallers/unmarshallers,
3542 XSD and documentation.")
3545 ;; Although this package uses only files licensed under expat,
3546 ;; other parts of the source are licensed under different
3547 ;; licenses. We include them to be inherited by other packages.
3549 ;; Some files in modello-plugin-java are licensed under a
3550 ;; 5-clause BSD license.
3551 (license:non-copyleft
3552 (string-append "file:///modello-plugins/modello-plugin-java/"
3553 "src/main/java/org/codehaus/modello/plugin/"
3554 "java/javasource/JNaming.java"))))))
3556 (define-public java-modello-plugins-java
3558 (inherit java-modello-core)
3559 (name "java-modello-plugins-java")
3561 `(#:jar-name "modello-plugins-java.jar"
3562 #:source-dir "modello-plugins/modello-plugin-java/src/main/java"
3563 #:test-dir "modello-plugins/modello-plugin-java/src/test"
3565 #:tests? #f; requires maven-model, which depends on this package
3567 (modify-phases %standard-phases
3568 (add-before 'build 'copy-resources
3570 (mkdir-p "build/classes")
3571 (copy-recursively "modello-plugins/modello-plugin-java/src/main/resources"
3575 `(("java-modello-core" ,java-modello-core)
3576 ,@(package-inputs java-modello-core)))
3577 (synopsis "Modello Java Plugin")
3578 (description "Modello Java Plugin generates Java objects for the model.")))
3580 (define-public java-modello-plugins-xml
3582 (inherit java-modello-core)
3583 (name "java-modello-plugins-xml")
3585 `(#:jar-name "modello-plugins-xml.jar"
3586 #:source-dir "modello-plugins/modello-plugin-xml/src/main/java"
3587 #:test-dir "modello-plugins/modello-plugin-xml/src/test"
3590 (modify-phases %standard-phases
3591 (add-before 'build 'copy-resources
3593 (mkdir-p "build/classes")
3595 "modello-plugins/modello-plugin-xml/src/main/resources"
3598 (add-before 'check 'fix-paths
3600 (with-directory-excursion "modello-plugins/modello-plugin-xml/src/test"
3602 "java/org/codehaus/modello/plugins/xml/XmlModelloPluginTest.java"
3603 (("src/test") "modello-plugins/modello-plugin-xml/src/test")))
3606 `(("java-modello-core" ,java-modello-core)
3607 ("java-modello-plugins-java" ,java-modello-plugins-java)
3608 ,@(package-inputs java-modello-core)))
3609 (synopsis "Modello XML Plugin")
3610 (description "Modello XML Plugin contains shared code for every plugins
3611 working on XML representation of the model.")))
3613 (define-public java-modello-test
3615 (inherit java-modello-core)
3616 (name "java-modello-test")
3618 `(#:jar-name "modello-test.jar"
3619 #:source-dir "modello-test/src/main/java"
3620 #:tests? #f; no tests
3623 `(("java-plexus-utils" ,java-plexus-utils)
3624 ("java-plexus-compiler-api" ,java-plexus-compiler-api)
3625 ("java-plexus-compiler-javac" ,java-plexus-compiler-javac)
3626 ("java-plexus-container-default" ,java-plexus-container-default)))
3627 (synopsis "Modello test package")
3628 (description "The modello test package contains the basis to create
3629 Modello generator unit-tests, including sample models and xml files to test
3630 every feature for every plugin.")))
3632 (define-public java-modello-plugins-xpp3
3634 (inherit java-modello-core)
3635 (name "java-modello-plugins-xpp3")
3637 `(#:jar-name "modello-plugins-xpp3.jar"
3638 #:source-dir "modello-plugins/modello-plugin-xpp3/src/main/java"
3639 #:test-dir "modello-plugins/modello-plugin-xpp3/src/test"
3640 ;; One of the test dependencies is maven-model which depends on this package.
3644 (modify-phases %standard-phases
3645 (add-before 'build 'copy-resources
3647 (mkdir-p "build/classes")
3648 (copy-recursively "modello-plugins/modello-plugin-xpp3/src/main/resources"
3652 `(("java-modello-core" ,java-modello-core)
3653 ("java-modello-plugins-java" ,java-modello-plugins-java)
3654 ("java-modello-plugins-xml" ,java-modello-plugins-xml)
3655 ,@(package-inputs java-modello-core)))
3657 `(("java-xmlunit" ,java-xmlunit)
3658 ("java-modello-test" ,java-modello-test)
3659 ,@(package-native-inputs java-modello-core)))
3660 (synopsis "Modello XPP3 Plugin")
3661 (description "The modello XPP3 plugin generates XML readers and writers based
3662 on the XPP3 API (XML Pull Parser).")))
3664 (define-public java-asm
3670 (uri (string-append "http://download.forge.ow2.org/asm/"
3671 "asm-" version ".tar.gz"))
3674 "115l5pqblirdkmzi32dxx7gbcm4jy0s14y5wircr6h8jdr9aix00"))))
3675 (build-system ant-build-system)
3677 `(("java-aqute-bndlib" ,java-aqute-bndlib)))
3679 `(#:build-target "compile"
3680 ;; The tests require an old version of Janino, which no longer compiles
3685 ;; We don't need these extra ant tasks, but the build system asks us to
3686 ;; provide a path anyway.
3687 "-Dobjectweb.ant.tasks.path=dummy-path"
3688 ;; The java-aqute.bndlib JAR file will be put onto the classpath and
3689 ;; used during the build automatically by ant-build-system, but
3690 ;; java-asm's build.xml fails unless we provide something here.
3691 "-Dbiz.aQute.bnd.path=dummy-path")
3693 (modify-phases %standard-phases
3694 (add-before 'install 'build-jars
3695 (lambda* (#:key make-flags #:allow-other-keys)
3696 ;; We cannot use the "jar" target because it depends on a couple
3697 ;; of unpackaged, complicated tools.
3700 "-cf" (string-append "dist/asm-" ,version ".jar")
3701 "-C" "output/build/tmp" ".")))
3703 (install-jars "dist")))))
3705 `(("java-junit" ,java-junit)))
3706 (home-page "http://asm.ow2.org/")
3707 (synopsis "Very small and fast Java bytecode manipulation framework")
3708 (description "ASM is an all purpose Java bytecode manipulation and
3709 analysis framework. It can be used to modify existing classes or dynamically
3710 generate classes, directly in binary form. The provided common
3711 transformations and analysis algorithms allow to easily assemble custom
3712 complex transformations and code analysis tools.")
3713 (license license:bsd-3)))
3715 (define java-asm-bootstrap
3718 (name "java-asm-bootstrap")
3720 (substitute-keyword-arguments (package-arguments java-asm)
3724 `(("java-aqute-bndlib" ,java-aqute-bndlib-bootstrap)
3725 ("java-aqute-libg" ,java-aqute-libg-bootstrap)
3726 ,@(delete `("java-aqute-bndlib" ,java-aqute-bndlib)
3727 (delete `("java-aqute-libg" ,java-aqute-libg)
3728 (package-inputs java-asm)))))))
3730 (define-public java-cglib
3737 "https://github.com/cglib/cglib/archive/RELEASE_"
3738 (string-map (lambda (c) (if (char=? c #\.) #\_ c)) version)
3740 (file-name (string-append "cglib-" version ".tar.gz"))
3743 "162dvd4fln76ai8prfharf66pn6r56p3sxx683j5vdyccrd5hi1q"))))
3744 (build-system ant-build-system)
3746 `(;; FIXME: tests fail because junit runs
3747 ;; "net.sf.cglib.transform.AbstractTransformTest", which does not seem
3748 ;; to describe a test at all.
3750 #:jar-name "cglib.jar"
3752 (modify-phases %standard-phases
3753 (add-after 'unpack 'chdir
3754 (lambda _ (chdir "cglib") #t)))))
3756 `(("java-asm" ,java-asm)
3757 ("java-junit" ,java-junit)))
3758 (home-page "https://github.com/cglib/cglib/")
3759 (synopsis "Java byte code generation library")
3760 (description "The byte code generation library CGLIB is a high level API
3761 to generate and transform Java byte code.")
3762 (license license:asl2.0)))
3764 (define-public java-objenesis
3766 (name "java-objenesis")
3770 (uri (string-append "https://github.com/easymock/objenesis/"
3771 "archive/" version ".tar.gz"))
3772 (file-name (string-append "objenesis-" version ".tar.gz"))
3775 "1va5qz1i2wawwavhnxfzxnfgrcaflz9p1pg03irrjh4nd3rz8wh6"))))
3776 (build-system ant-build-system)
3778 `(#:jar-name "objenesis.jar"
3779 #:source-dir "main/src/"
3780 #:test-dir "main/src/test/"))
3782 `(("java-junit" ,java-junit)
3783 ("java-hamcrest-core" ,java-hamcrest-core)))
3784 (home-page "http://objenesis.org/")
3785 (synopsis "Bypass the constructor when creating an object")
3786 (description "Objenesis is a small Java library that serves one purpose:
3787 to instantiate a new object of a particular class. It is common to see
3788 restrictions in libraries stating that classes must require a default
3789 constructor. Objenesis aims to overcome these restrictions by bypassing the
3790 constructor on object instantiation.")
3791 (license license:asl2.0)))
3793 (define-public java-easymock
3795 (name "java-easymock")
3799 (uri (string-append "https://github.com/easymock/easymock/"
3800 "archive/easymock-" version ".tar.gz"))
3803 "1yzg0kv256ndr57gpav46cyv4a1ns5sj722l50zpxk3j6sk9hnmi"))))
3804 (build-system ant-build-system)
3806 `(#:jar-name "easymock.jar"
3807 #:source-dir "core/src/main"
3808 #:test-dir "core/src/test"
3810 (modify-phases %standard-phases
3811 ;; FIXME: Android support requires the following packages to be
3812 ;; available: com.google.dexmaker.stock.ProxyBuilder
3813 (add-after 'unpack 'delete-android-support
3815 (with-directory-excursion "core/src/main/java/org/easymock/internal"
3816 (substitute* "MocksControl.java"
3817 (("AndroidSupport.isAndroid\\(\\)") "false")
3818 (("return classProxyFactory = new AndroidClassProxyFactory\\(\\);") ""))
3819 (delete-file "AndroidClassProxyFactory.java"))
3821 (add-after 'unpack 'delete-broken-tests
3823 (with-directory-excursion "core/src/test/java/org/easymock"
3824 ;; This test depends on dexmaker.
3825 (delete-file "tests2/ClassExtensionHelperTest.java")
3827 ;; This is not a test.
3828 (delete-file "tests/BaseEasyMockRunnerTest.java")
3830 ;; This test should be executed with a different runner...
3831 (delete-file "tests2/EasyMockAnnotationsTest.java")
3832 ;; ...but deleting it means that we also have to delete these
3834 (delete-file "tests2/EasyMockRunnerTest.java")
3835 (delete-file "tests2/EasyMockRuleTest.java")
3837 ;; This test fails because the file "easymock.properties" does
3839 (delete-file "tests2/EasyMockPropertiesTest.java"))
3842 `(("java-asm" ,java-asm)
3843 ("java-cglib" ,java-cglib)
3844 ("java-objenesis" ,java-objenesis)))
3846 `(("java-junit" ,java-junit)
3847 ("java-hamcrest-core" ,java-hamcrest-core)))
3848 (home-page "http://easymock.org")
3849 (synopsis "Java library providing mock objects for unit tests")
3850 (description "EasyMock is a Java library that provides an easy way to use
3851 mock objects in unit testing.")
3852 (license license:asl2.0)))
3854 (define-public java-jmock-1
3860 (uri (string-append "https://github.com/jmock-developers/"
3861 "jmock-library/archive/" version ".tar.gz"))
3862 (file-name (string-append "jmock-" version ".tar.gz"))
3865 "0xmrlhq0fszldkbv281k9463mv496143vvmqwpxp62yzjvdkx9w0"))))
3866 (build-system ant-build-system)
3868 `(#:build-target "jars"
3869 #:test-target "run.tests"
3871 (modify-phases %standard-phases
3872 (replace 'install (install-jars "build")))))
3873 (home-page "http://www.jmock.org")
3874 (synopsis "Mock object library for test-driven development")
3875 (description "JMock is a library that supports test-driven development of
3876 Java code with mock objects. Mock objects help you design and test the
3877 interactions between the objects in your programs.
3882 @item makes it quick and easy to define mock objects
3883 @item lets you precisely specify the interactions between
3884 your objects, reducing the brittleness of your tests
3885 @item plugs into your favourite test framework
3886 @item is easy to extend.
3888 (license license:bsd-3)))
3890 (define-public java-jmock
3892 (inherit java-jmock-1)
3897 (uri (string-append "https://github.com/jmock-developers/"
3898 "jmock-library/archive/" version ".tar.gz"))
3899 (file-name (string-append name "-" version ".tar.gz"))
3902 "18650a9g8xffcsdb6w91pbswa7f40fp2sh6s3nclkclz5dbzq8f0"))))
3904 `(("java-hamcrest-all" ,java-hamcrest-all)
3905 ("java-asm" ,java-asm)
3906 ("java-bsh" ,java-bsh)
3907 ("java-junit" ,java-junit)))
3909 `(("cglib" ,java-cglib)))
3911 `(#:jar-name "java-jmock.jar"
3912 #:source-dir "jmock/src/main/java"
3913 #:test-dir "jmock/src/test"))))
3915 (define-public java-jmock-junit4
3917 (inherit java-jmock)
3918 (name "java-jmock-junit4")
3920 `(#:jar-name "java-jmock-junit4.jar"
3921 #:source-dir "jmock-junit4/src/main/java"
3922 #:test-dir "jmock-junit4/src/test"))
3924 `(("java-hamcrest-all" ,java-hamcrest-all)
3925 ("java-asm" ,java-asm)
3926 ("java-bsh" ,java-bsh)
3927 ("java-jmock" ,java-jmock)
3928 ("java-jumit" ,java-junit)))))
3930 (define-public java-jmock-legacy
3932 (inherit java-jmock)
3933 (name "java-jmock-legacy")
3935 `(#:jar-name "java-jmock-legacy.jar"
3936 #:source-dir "jmock-legacy/src/main/java"
3937 #:test-dir "jmock-legacy/src/test"
3939 (modify-phases %standard-phases
3940 (add-before 'check 'copy-tests
3942 ;; This file is a dependancy of some tests
3943 (let ((file "org/jmock/test/acceptance/PackageProtectedType.java"))
3944 (copy-file (string-append "jmock/src/test/java/" file)
3945 (string-append "jmock-legacy/src/test/java/" file))
3948 `(("java-hamcrest-all" ,java-hamcrest-all)
3949 ("java-objenesis" ,java-objenesis)
3950 ("java-cglib" ,java-cglib)
3951 ("java-jmock" ,java-jmock)
3952 ("java-asm" ,java-asm)
3953 ("java-bsh" ,java-bsh)
3954 ("java-junit" ,java-junit)))
3956 `(("java-jmock-junit4" ,java-jmock-junit4)))))
3958 (define-public java-hamcrest-all
3959 (package (inherit java-hamcrest-core)
3960 (name "java-hamcrest-all")
3963 ,@(substitute-keyword-arguments (package-arguments java-hamcrest-core)
3964 ((#:build-target _) "bigjar")
3966 `(modify-phases ,phases
3967 ;; Some build targets override the classpath, so we need to patch
3968 ;; the build.xml to ensure that required dependencies are on the
3970 (add-after 'unpack 'patch-classpath-for-integration
3971 (lambda* (#:key inputs #:allow-other-keys)
3972 (substitute* "build.xml"
3973 ((" build/hamcrest-library-\\$\\{version\\}.jar" line)
3977 (find-files (assoc-ref inputs "java-junit") "\\.jar$")
3978 (find-files (assoc-ref inputs "java-jmock") "\\.jar$")
3979 (find-files (assoc-ref inputs "java-easymock") "\\.jar$")))
3981 (("build/hamcrest-core-\\$\\{version\\}\\.jar")
3982 (string-append (assoc-ref inputs "java-hamcrest-core")
3983 "/share/java/hamcrest-core.jar")))
3986 `(("java-junit" ,java-junit)
3987 ("java-jmock" ,java-jmock-1)
3988 ;; This is necessary because of what seems to be a race condition.
3989 ;; This package would sometimes fail to build because hamcrest-core.jar
3990 ;; could not be found, even though it is built as part of this package.
3991 ;; Adding java-hamcrest-core appears to fix this problem. See
3992 ;; https://debbugs.gnu.org/31390 for more information.
3993 ("java-hamcrest-core" ,java-hamcrest-core)
3994 ("java-easymock" ,java-easymock)
3995 ,@(package-inputs java-hamcrest-core)))))
3997 (define-public java-jopt-simple
3999 (name "java-jopt-simple")
4003 (uri (string-append "http://repo1.maven.org/maven2/"
4004 "net/sf/jopt-simple/jopt-simple/"
4005 version "/jopt-simple-"
4006 version "-sources.jar"))
4009 "1v8bzmwmw6qq20gm42xyay6vrd567dra4vqwhgjnqqjz1gs9f8qa"))))
4010 (build-system ant-build-system)
4012 `(#:tests? #f ; there are no tests
4013 #:jar-name "jopt-simple.jar"))
4014 (home-page "https://pholser.github.io/jopt-simple/")
4015 (synopsis "Java library for parsing command line options")
4016 (description "JOpt Simple is a Java library for parsing command line
4017 options, such as those you might pass to an invocation of @code{javac}. In
4018 the interest of striving for simplicity, as closely as possible JOpt Simple
4019 attempts to honor the command line option syntaxes of POSIX @code{getopt} and
4020 GNU @code{getopt_long}. It also aims to make option parser configuration and
4021 retrieval of options and their arguments simple and expressive, without being
4023 (license license:expat)))
4025 (define-public java-commons-math3
4027 (name "java-commons-math3")
4031 (uri (string-append "mirror://apache/commons/math/source/"
4032 "commons-math3-" version "-src.tar.gz"))
4035 "19l6yp44qc5g7wg816nbn5z3zq3xxzwimvbm4a8pczgvpi4i85s6"))))
4036 (build-system ant-build-system)
4038 `(#:build-target "jar"
4039 #:test-target "test"
4041 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
4042 (junit (assoc-ref %build-inputs "java-junit")))
4043 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
4044 (string-append "-Dhamcrest.jar=" hamcrest
4045 "/share/java/hamcrest-core.jar")))
4047 (modify-phases %standard-phases
4048 ;; We want to build the jar in the build phase and run the tests
4049 ;; later in a separate phase.
4050 (add-after 'unpack 'untangle-targets
4052 (substitute* "build.xml"
4053 (("name=\"jar\" depends=\"test\"")
4054 "name=\"jar\" depends=\"compile\""))
4056 ;; There is no install target.
4058 (install-jars "target")))))
4060 `(("java-junit" ,java-junit)
4061 ("java-hamcrest-core" ,java-hamcrest-core)))
4062 (home-page "http://commons.apache.org/math/")
4063 (synopsis "Apache Commons mathematics library")
4064 (description "Commons Math is a library of lightweight, self-contained
4065 mathematics and statistics components addressing the most common problems not
4066 available in the Java programming language or Commons Lang.")
4067 (license license:asl2.0)))
4069 (define-public java-jmh
4076 (url "http://hg.openjdk.java.net/code-tools/jmh/")
4077 (changeset version)))
4078 (file-name (string-append name "-" version "-checkout"))
4081 "1fxyxhg9famwcg1prc4cgwb5wzyxqavn3cjm5vz8605xz7x5k084"))))
4082 (build-system ant-build-system)
4084 `(#:jar-name "jmh-core.jar"
4085 #:source-dir "jmh-core/src/main"
4086 #:test-dir "jmh-core/src/test"
4088 (modify-phases %standard-phases
4089 ;; This seems to be a bug in the JDK. It may not be necessary in
4090 ;; future versions of the JDK.
4091 (add-after 'unpack 'fix-bug
4093 (with-directory-excursion
4094 "jmh-core/src/main/java/org/openjdk/jmh/runner/options"
4095 (substitute* '("IntegerValueConverter.java"
4096 "ThreadsValueConverter.java")
4097 (("public Class<Integer> valueType")
4098 "public Class<? extends Integer> valueType")))
4101 `(("java-jopt-simple" ,java-jopt-simple)
4102 ("java-commons-math3" ,java-commons-math3)))
4104 `(("java-junit" ,java-junit)
4105 ("java-hamcrest-core" ,java-hamcrest-core)))
4106 (home-page "http://openjdk.java.net/projects/code-tools/jmh/")
4107 (synopsis "Benchmark harness for the JVM")
4108 (description "JMH is a Java harness for building, running, and analysing
4109 nano/micro/milli/macro benchmarks written in Java and other languages
4110 targeting the JVM.")
4112 (license license:gpl2)))
4114 (define-public java-commons-collections4
4116 (name "java-commons-collections4")
4120 (uri (string-append "mirror://apache/commons/collections/source/"
4121 "commons-collections4-" version "-src.tar.gz"))
4124 "1krfhvggympq4avk7gh6qafzf6b9ip6r1m4lmacikyx04039m0wl"))))
4125 (build-system ant-build-system)
4127 `(#:test-target "test"
4129 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
4130 (junit (assoc-ref %build-inputs "java-junit"))
4131 (easymock (assoc-ref %build-inputs "java-easymock")))
4132 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
4133 (string-append "-Dhamcrest.jar=" hamcrest
4134 "/share/java/hamcrest-core.jar")
4135 (string-append "-Deasymock.jar=" easymock
4136 "/share/java/easymock.jar")))
4138 (modify-phases %standard-phases
4140 (install-jars "target")))))
4142 `(("java-junit" ,java-junit)
4143 ("java-hamcrest-core" ,java-hamcrest-core)
4144 ("java-easymock" ,java-easymock)))
4145 (home-page "http://commons.apache.org/collections/")
4146 (synopsis "Collections framework")
4147 (description "The Java Collections Framework is the recognised standard
4148 for collection handling in Java. Commons-Collections seek to build upon the
4149 JDK classes by providing new interfaces, implementations and utilities. There
4150 are many features, including:
4153 @item @code{Bag} interface for collections that have a number of copies of
4155 @item @code{BidiMap} interface for maps that can be looked up from value to
4156 key as well and key to value
4157 @item @code{MapIterator} interface to provide simple and quick iteration over
4159 @item Transforming decorators that alter each object as it is added to the
4161 @item Composite collections that make multiple collections look like one
4162 @item Ordered maps and sets that retain the order elements are added in,
4163 including an LRU based map
4164 @item Reference map that allows keys and/or values to be garbage collected
4166 @item Many comparator implementations
4167 @item Many iterator implementations
4168 @item Adapter classes from array and enumerations to collections
4169 @item Utilities to test or create typical set-theory properties of collections
4170 such as union, intersection, and closure.
4172 (license license:asl2.0)))
4174 (define-public java-commons-collections
4176 (inherit java-commons-collections4)
4177 (name "java-commons-collections")
4181 (uri (string-append "mirror://apache/commons/collections/source/"
4182 "commons-collections-" version "-src.tar.gz"))
4185 "055r51a5lfc3z7rkxnxmnn1npvkvda7636hjpm4qk7cnfzz98387"))
4187 (search-patches "java-commons-collections-fix-java8.patch"))))
4189 (substitute-keyword-arguments (package-arguments java-commons-collections4)
4191 `(modify-phases ,phases
4192 ;; The manifest is required by the build procedure
4193 (add-before 'build 'add-manifest
4195 (mkdir-p "build/conf")
4196 (call-with-output-file "build/conf/MANIFEST.MF"
4198 (format file "Manifest-Version: 1.0\n")))
4201 (install-jars "build"))))))))
4203 (define java-commons-collections-test-classes
4205 (inherit java-commons-collections)
4207 `(#:jar-name "commons-collections-test-classes.jar"
4208 #:source-dir "src/test"
4211 `(("collection" ,java-commons-collections)))))
4213 (define-public java-commons-beanutils
4215 (name "java-commons-beanutils")
4219 (uri (string-append "mirror://apache/commons/beanutils/source/"
4220 "commons-beanutils-" version "-src.tar.gz"))
4223 "03cs0bq3sl1sdc7py9g3qnf8n9h473nrkvd3d251kaqv6a2ab7qk"))))
4224 (build-system ant-build-system)
4226 `(#:test-target "test"
4229 (modify-phases %standard-phases
4231 (lambda* (#:key outputs #:allow-other-keys)
4232 (rename-file (string-append "dist/commons-beanutils-" ,version
4234 "commons-beanutils.jar")
4235 (install-file "commons-beanutils.jar"
4236 (string-append (assoc-ref outputs "out") "/share/java/"))
4239 `(("logging" ,java-commons-logging-minimal)
4240 ("collections" ,java-commons-collections)))
4242 `(("junit" ,java-junit)
4243 ("collections-test" ,java-commons-collections-test-classes)))
4244 (home-page "http://commons.apache.org/beanutils/")
4245 (synopsis "Dynamically set or get properties in Java")
4246 (description "BeanUtils provides a simplified interface to reflection and
4247 introspection to set or get dynamically determined properties through their
4248 setter and getter method.")
4249 (license license:asl2.0)))
4251 (define-public java-commons-io
4253 (name "java-commons-io")
4258 (uri (string-append "mirror://apache/commons/io/source/"
4259 "commons-io-" version "-src.tar.gz"))
4262 "0q5y41jrcjvx9hzs47x5kdhnasdy6rm4bzqd2jxl02w717m7a7v3"))))
4263 (build-system ant-build-system)
4264 (outputs '("out" "doc"))
4266 `(#:test-target "test"
4268 (list (string-append "-Djunit.jar="
4269 (assoc-ref %build-inputs "java-junit")
4270 "/share/java/junit.jar"))
4272 (modify-phases %standard-phases
4273 (add-after 'build 'build-javadoc ant-build-javadoc)
4274 (replace 'install (install-jars "target"))
4275 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
4277 `(("java-junit" ,java-junit)
4278 ("java-hamcrest-core" ,java-hamcrest-core)))
4279 (home-page "http://commons.apache.org/io/")
4280 (synopsis "Common useful IO related classes")
4281 (description "Commons-IO contains utility classes, stream implementations,
4282 file filters and endian classes.")
4283 (license license:asl2.0)))
4285 (define-public java-commons-lang
4287 (name "java-commons-lang")
4292 (uri (string-append "mirror://apache/commons/lang/source/"
4293 "commons-lang-" version "-src.tar.gz"))
4295 (base32 "1mxwagqadzx1b2al7i0z1v0r235aj2njdyijf02szq0vhmqrfiq5"))))
4296 (build-system ant-build-system)
4297 (outputs '("out" "doc"))
4299 `(#:test-target "test"
4300 #:test-exclude (list "**/Abstract*.java" "**/Random*.java")
4302 (modify-phases %standard-phases
4303 (add-after 'build 'build-javadoc ant-build-javadoc)
4304 (add-before 'check 'disable-failing-test
4306 ;; Disable a failing test
4307 (substitute* "src/test/java/org/apache/commons/lang/\
4308 time/FastDateFormatTest.java"
4309 (("public void testFormat\\(\\)")
4310 "public void disabled_testFormat()"))
4312 (replace 'install (install-jars "target"))
4313 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
4315 `(("java-junit" ,java-junit)))
4316 (home-page "http://commons.apache.org/lang/")
4317 (synopsis "Extension of the java.lang package")
4318 (description "The Commons Lang components contains a set of Java classes
4319 that provide helper methods for standard Java classes, especially those found
4320 in the @code{java.lang} package in the Sun JDK. The following classes are
4324 @item StringUtils - Helper for @code{java.lang.String}.
4325 @item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets
4326 of characters such as @code{[a-z]} and @code{[abcdez]}.
4327 @item RandomStringUtils - Helper for creating randomised strings.
4328 @item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
4329 @item NumberRange - A range of numbers with an upper and lower bound.
4330 @item ObjectUtils - Helper for @code{java.lang.Object}.
4331 @item SerializationUtils - Helper for serializing objects.
4332 @item SystemUtils - Utility class defining the Java system properties.
4333 @item NestedException package - A sub-package for the creation of nested
4335 @item Enum package - A sub-package for the creation of enumerated types.
4336 @item Builder package - A sub-package for the creation of @code{equals},
4337 @code{hashCode}, @code{compareTo} and @code{toString} methods.
4339 (license license:asl2.0)))
4341 (define-public java-commons-lang3
4343 (name "java-commons-lang3")
4348 (uri (string-append "mirror://apache/commons/lang/source/"
4349 "commons-lang3-" version "-src.tar.gz"))
4351 (base32 "0xpshb9spjhplq5a7mr0y1bgfw8190ik4xj8f569xidfcki1d6kg"))))
4352 (build-system ant-build-system)
4353 (outputs '("out" "doc"))
4355 `(#:test-target "test"
4357 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-all"))
4358 (junit (assoc-ref %build-inputs "java-junit"))
4359 (easymock (assoc-ref %build-inputs "java-easymock"))
4360 (io (assoc-ref %build-inputs "java-commons-io")))
4361 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
4362 (string-append "-Dhamcrest.jar=" hamcrest
4363 "/share/java/hamcrest-all.jar")
4364 (string-append "-Dcommons-io.jar=" io
4365 "/share/java/commons-io-"
4366 ,(package-version java-commons-io)
4368 (string-append "-Deasymock.jar=" easymock
4369 "/share/java/easymock.jar")))
4371 (modify-phases %standard-phases
4372 (add-after 'build 'build-javadoc ant-build-javadoc)
4373 (replace 'install (install-jars "target"))
4374 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
4376 `(("java-junit" ,java-junit)
4377 ("java-commons-io" ,java-commons-io)
4378 ("java-hamcrest-all" ,java-hamcrest-all)
4379 ("java-easymock" ,java-easymock)))
4380 (home-page "http://commons.apache.org/lang/")
4381 (synopsis "Extension of the java.lang package")
4382 (description "The Commons Lang components contains a set of Java classes
4383 that provide helper methods for standard Java classes, especially those found
4384 in the @code{java.lang} package. The following classes are included:
4387 @item StringUtils - Helper for @code{java.lang.String}.
4388 @item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets of
4389 characters such as @code{[a-z]} and @code{[abcdez]}.
4390 @item RandomStringUtils - Helper for creating randomised strings.
4391 @item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
4392 @item NumberRange - A range of numbers with an upper and lower bound.
4393 @item ObjectUtils - Helper for @code{java.lang.Object}.
4394 @item SerializationUtils - Helper for serializing objects.
4395 @item SystemUtils - Utility class defining the Java system properties.
4396 @item NestedException package - A sub-package for the creation of nested
4398 @item Enum package - A sub-package for the creation of enumerated types.
4399 @item Builder package - A sub-package for the creation of @code{equals},
4400 @code{hashCode}, @code{compareTo} and @code{toString} methods.
4402 (license license:asl2.0)))
4404 (define-public java-commons-bsf
4406 (name "java-commons-bsf")
4410 (uri (string-append "mirror://apache/commons/bsf/source/bsf-src-"
4414 "1sbamr8jl32p1jgf59nw0b2w9qivyg145954hm6ly54cfgsqrdas"))
4415 (modules '((guix build utils)))
4418 (for-each delete-file
4419 (find-files "." "\\.jar$"))
4421 (build-system ant-build-system)
4423 `(#:build-target "jar"
4424 #:tests? #f; No test file
4425 #:modules ((guix build ant-build-system)
4427 (guix build java-utils)
4430 (modify-phases %standard-phases
4431 (add-before 'build 'create-properties
4433 ;; This file is missing from the distribution
4434 (call-with-output-file "build-properties.xml"
4437 `(project (@ (basedir ".") (name "build-properties") (default ""))
4438 (property (@ (name "project.name") (value "bsf")))
4439 (property (@ (name "source.level") (value "1.5")))
4440 (property (@ (name "build.lib") (value "build/jar")))
4441 (property (@ (name "src.dir") (value "src")))
4442 (property (@ (name "tests.dir") (value "src/org/apache/bsf/test")))
4443 (property (@ (name "build.tests") (value "build/test-classes")))
4444 (property (@ (name "build.dest") (value "build/classes"))))
4447 (replace 'install (install-jars "build")))))
4449 `(("java-junit" ,java-junit)))
4451 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)))
4452 (home-page "https://commons.apache.org/proper/commons-bsf")
4453 (synopsis "Bean Scripting Framework")
4454 (description "The Bean Scripting Framework (BSF) is a set of Java classes
4455 which provides scripting language support within Java applications, and access
4456 to Java objects and methods from scripting languages. BSF allows one to write
4457 JSPs in languages other than Java while providing access to the Java class
4458 library. In addition, BSF permits any Java application to be implemented in
4459 part (or dynamically extended) by a language that is embedded within it. This
4460 is achieved by providing an API that permits calling scripting language engines
4461 from within Java, as well as an object registry that exposes Java objects to
4462 these scripting language engines.")
4463 (license license:asl2.0)))
4465 (define-public java-commons-jxpath
4467 (name "java-commons-jxpath")
4471 (uri (string-append "mirror://apache/commons/jxpath/source/"
4472 "commons-jxpath-" version "-src.tar.gz"))
4475 "1rpgg31ayn9fwr4bfi2i1ij0npcg79ad2fv0w9hacvawsyc42cfs"))))
4476 (build-system ant-build-system)
4478 `(#:jar-name "commons-jxpath.jar"
4479 ;; tests require more dependencies, including mockrunner which depends on old software
4481 #:source-dir "src/java"))
4483 `(("servlet" ,java-classpathx-servletapi)
4484 ("java-jdom" ,java-jdom)
4485 ("java-commons-beanutils" ,java-commons-beanutils)))
4487 `(("java-junit" ,java-junit)))
4488 (home-page "http://commons.apache.org/jxpath/")
4489 (synopsis "Simple interpreter of an expression language called XPath.")
4490 (description "The org.apache.commons.jxpath package defines a simple
4491 interpreter of an expression language called XPath. JXPath applies XPath
4492 expressions to graphs of objects of all kinds: JavaBeans, Maps, Servlet
4493 contexts, DOM etc, including mixtures thereof.")
4494 (license license:asl2.0)))
4496 (define-public java-jsr250
4498 (name "java-jsr250")
4502 (uri (string-append "https://repo1.maven.org/maven2/"
4503 "javax/annotation/javax.annotation-api/"
4504 version "/javax.annotation-api-"
4505 version "-sources.jar"))
4508 "08clh8n4n9wfglf75qsqfjs6yf79f7x6hqx38cn856pksszv50kz"))))
4509 (build-system ant-build-system)
4511 `(#:tests? #f ; no tests included
4513 #:jar-name "jsr250.jar"))
4514 (home-page "https://jcp.org/en/jsr/detail?id=250")
4515 (synopsis "Security-related annotations")
4516 (description "This package provides annotations for security. It provides
4517 packages in the @code{javax.annotation} and @code{javax.annotation.security}
4519 ;; either cddl or gpl2 only, with classpath exception
4520 (license (list license:cddl1.0
4523 (define-public java-jsr305
4525 (name "java-jsr305")
4529 (uri (string-append "https://repo1.maven.org/maven2/"
4530 "com/google/code/findbugs/"
4531 "jsr305/" version "/jsr305-"
4532 version "-sources.jar"))
4535 "1rh6jin9v7jqpq3kf1swl868l8i94r636n03pzpsmgr8v0lh9j2n"))))
4536 (build-system ant-build-system)
4538 `(#:tests? #f ; no tests included
4539 #:jar-name "jsr305.jar"))
4540 (home-page "http://findbugs.sourceforge.net/")
4541 (synopsis "Annotations for the static analyzer called findbugs")
4542 (description "This package provides annotations for the findbugs package.
4543 It provides packages in the @code{javax.annotations} namespace.")
4544 (license license:asl2.0)))
4546 (define-public java-guava
4549 ;; This is the last release of Guava that can be built with Java 7.
4553 (uri (string-append "https://github.com/google/guava/"
4554 "releases/download/v" version
4555 "/guava-" version "-sources.jar"))
4558 "1gawrs5gi6j5hcfxdgpnfli75vb9pfi4sn09pnc8xacr669yajwr"))))
4559 (build-system ant-build-system)
4561 `(#:tests? #f ; no tests included
4562 #:jar-name "guava.jar"
4564 (modify-phases %standard-phases
4565 (add-after 'unpack 'trim-sources
4567 (with-directory-excursion "src/com/google/common"
4568 ;; Remove annotations to avoid extra dependencies:
4569 ;; * "j2objc" annotations are used when converting Java to
4571 ;; * "errorprone" annotations catch common Java mistakes at
4573 ;; * "IgnoreJRERequirement" is used for Android.
4574 (substitute* (find-files "." "\\.java$")
4575 (("import com.google.j2objc.*") "")
4576 (("import com.google.errorprone.annotation.*") "")
4577 (("import org.codehaus.mojo.animal_sniffer.*") "")
4578 (("@CanIgnoreReturnValue") "")
4581 (("@RetainedWith") "")
4583 (("@ForOverride") "")
4584 (("@J2ObjCIncompatible") "")
4585 (("@IgnoreJRERequirement") "")))
4588 `(("java-jsr305" ,java-jsr305)))
4589 (home-page "https://github.com/google/guava")
4590 (synopsis "Google core libraries for Java")
4591 (description "Guava is a set of core libraries that includes new
4592 collection types (such as multimap and multiset), immutable collections, a
4593 graph library, functional types, an in-memory cache, and APIs/utilities for
4594 concurrency, I/O, hashing, primitives, reflection, string processing, and much
4596 (license license:asl2.0)))
4598 ;; The java-commons-logging package provides adapters to many different
4599 ;; logging frameworks. To avoid an excessive dependency graph we try to build
4600 ;; it with only a minimal set of adapters.
4601 (define-public java-commons-logging-minimal
4603 (name "java-commons-logging-minimal")
4607 (uri (string-append "mirror://apache/commons/logging/source/"
4608 "commons-logging-" version "-src.tar.gz"))
4611 "10bwcy5w8d7y39n0krlwhnp8ds3kj5zhmzj0zxnkw0qdlsjmsrj9"))))
4612 (build-system ant-build-system)
4614 `(#:tests? #f ; avoid dependency on logging frameworks
4615 #:jar-name "commons-logging-minimal.jar"
4617 (modify-phases %standard-phases
4618 (add-after 'unpack 'delete-adapters-and-tests
4620 ;; Delete all adapters except for NoOpLog, SimpleLog, and
4621 ;; LogFactoryImpl. NoOpLog is required to build; LogFactoryImpl
4622 ;; is used by applications; SimpleLog is the only actually usable
4623 ;; implementation that does not depend on another logging
4627 (delete-file (string-append
4628 "src/main/java/org/apache/commons/logging/impl/" file)))
4629 (list "Jdk13LumberjackLogger.java"
4630 "WeakHashtable.java"
4632 "ServletContextCleaner.java"
4635 "LogKitLogger.java"))
4636 (delete-file-recursively "src/test")
4638 (home-page "http://commons.apache.org/logging/")
4639 (synopsis "Common API for logging implementations")
4640 (description "The Logging package is a thin bridge between different
4641 logging implementations. A library that uses the commons-logging API can be
4642 used with any logging implementation at runtime.")
4643 (license license:asl2.0)))
4645 ;; This is the last release of the 1.x series.
4646 (define-public java-mockito-1
4648 (name "java-mockito")
4652 (uri (string-append "http://repo1.maven.org/maven2/"
4653 "org/mockito/mockito-core/" version
4654 "/mockito-core-" version "-sources.jar"))
4657 "0vmiwnwpf83g2q7kj1rislmja8fpvqkixjhawh7nxnygx6pq11kc"))))
4658 (build-system ant-build-system)
4660 `(#:jar-name "mockito.jar"
4661 #:tests? #f ; no tests included
4662 ;; FIXME: patch-and-repack does not support jars, so we have to apply
4663 ;; patches in build phases.
4665 (modify-phases %standard-phases
4666 ;; Mockito was developed against a different version of hamcrest,
4667 ;; which does not require matcher implementations to provide an
4668 ;; implementation of the "describeMismatch" method. We add this
4669 ;; simple definition to pass the build with our version of hamcrest.
4670 (add-after 'unpack 'fix-hamcrest-build-error
4672 (substitute* "src/org/mockito/internal/matchers/LocalizedMatcher.java"
4673 (("public Matcher getActualMatcher\\(\\) .*" line)
4675 public void describeMismatch(Object item, Description description) {
4676 actualMatcher.describeMismatch(item, description);
4680 ;; Mockito bundles cglib. We have a cglib package, so let's use
4682 (add-after 'unpack 'use-system-libraries
4684 (with-directory-excursion "src/org/mockito/internal/creation/cglib"
4685 (substitute* '("CGLIBHacker.java"
4686 "CglibMockMaker.java"
4687 "ClassImposterizer.java"
4688 "DelegatingMockitoMethodProxy.java"
4689 "MethodInterceptorFilter.java"
4690 "MockitoNamingPolicy.java"
4691 "SerializableMockitoMethodProxy.java"
4692 "SerializableNoOp.java")
4693 (("import org.mockito.cglib") "import net.sf.cglib")))
4696 `(("java-junit" ,java-junit)
4697 ("java-objenesis" ,java-objenesis)
4698 ("java-cglib" ,java-cglib)
4699 ("java-hamcrest-core" ,java-hamcrest-core)))
4700 (home-page "http://mockito.org")
4701 (synopsis "Mockito is a mock library for Java")
4702 (description "Mockito is a mocking library for Java which lets you write
4703 tests with a clean and simple API. It generates mocks using reflection, and
4704 it records all mock invocations, including methods arguments.")
4705 (license license:asl2.0)))
4707 (define-public java-httpcomponents-httpcore
4709 (name "java-httpcomponents-httpcore")
4713 (uri (string-append "mirror://apache//httpcomponents/httpcore/"
4714 "source/httpcomponents-core-"
4715 version "-src.tar.gz"))
4718 "02bwcf38y4vgwq7kj2s6q7qrmma641r5lacivm16kgxvb2j6h1vy"))))
4719 (build-system ant-build-system)
4721 `(#:jar-name "httpcomponents-httpcore.jar"
4723 (modify-phases %standard-phases
4724 (add-after 'unpack 'chdir
4725 (lambda _ (chdir "httpcore") #t)))))
4727 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)
4728 ("java-commons-lang3" ,java-commons-lang3)))
4730 `(("java-junit" ,java-junit)
4731 ("java-mockito" ,java-mockito-1)))
4732 (home-page "https://hc.apache.org/httpcomponents-core-4.4.x/index.html")
4733 (synopsis "Low level HTTP transport components")
4734 (description "HttpCore is a set of low level HTTP transport components
4735 that can be used to build custom client and server side HTTP services with a
4736 minimal footprint. HttpCore supports two I/O models: blocking I/O model based
4737 on the classic Java I/O and non-blocking, event driven I/O model based on Java
4740 This package provides the blocking I/O model library.")
4741 (license license:asl2.0)))
4743 (define-public java-httpcomponents-httpcore-nio
4744 (package (inherit java-httpcomponents-httpcore)
4745 (name "java-httpcomponents-httpcore-nio")
4747 `(#:jar-name "httpcomponents-httpcore-nio.jar"
4749 (modify-phases %standard-phases
4750 (add-after 'unpack 'chdir
4751 (lambda _ (chdir "httpcore-nio") #t)))))
4753 `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
4754 ("java-hamcrest-core" ,java-hamcrest-core)
4755 ,@(package-inputs java-httpcomponents-httpcore)))
4756 (description "HttpCore is a set of low level HTTP transport components
4757 that can be used to build custom client and server side HTTP services with a
4758 minimal footprint. HttpCore supports two I/O models: blocking I/O model based
4759 on the classic Java I/O and non-blocking, event driven I/O model based on Java
4762 This package provides the non-blocking I/O model library based on Java
4765 (define-public java-httpcomponents-httpcore-ab
4766 (package (inherit java-httpcomponents-httpcore)
4767 (name "java-httpcomponents-httpcore-ab")
4769 `(#:jar-name "httpcomponents-httpcore-ab.jar"
4771 (modify-phases %standard-phases
4772 (add-after 'unpack 'chdir
4773 (lambda _ (chdir "httpcore-ab") #t)))))
4775 `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
4776 ("java-commons-cli" ,java-commons-cli)
4777 ("java-hamcrest-core" ,java-hamcrest-core)
4778 ,@(package-inputs java-httpcomponents-httpcore)))
4779 (synopsis "Apache HttpCore benchmarking tool")
4780 (description "This package provides the HttpCore benchmarking tool. It is
4781 an Apache AB clone based on HttpCore.")))
4783 (define-public java-httpcomponents-httpclient
4785 (name "java-httpcomponents-httpclient")
4789 (uri (string-append "mirror://apache/httpcomponents/httpclient/"
4790 "source/httpcomponents-client-"
4791 version "-src.tar.gz"))
4794 "1428399s7qy3cim5wc6f3ks4gl9nf9vkjpfmnlap3jflif7g2pj1"))))
4795 (build-system ant-build-system)
4797 `(#:jar-name "httpcomponents-httpclient.jar"
4799 (modify-phases %standard-phases
4800 (add-after 'unpack 'chdir
4801 (lambda _ (chdir "httpclient") #t)))))
4803 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)
4804 ("java-commons-codec" ,java-commons-codec)
4805 ("java-hamcrest-core" ,java-hamcrest-core)
4806 ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
4807 ("java-mockito" ,java-mockito-1)
4808 ("java-junit" ,java-junit)))
4809 (home-page "https://hc.apache.org/httpcomponents-client-ga/")
4810 (synopsis "HTTP client library for Java")
4811 (description "Although the @code{java.net} package provides basic
4812 functionality for accessing resources via HTTP, it doesn't provide the full
4813 flexibility or functionality needed by many applications. @code{HttpClient}
4814 seeks to fill this void by providing an efficient, up-to-date, and
4815 feature-rich package implementing the client side of the most recent HTTP
4816 standards and recommendations.")
4817 (license license:asl2.0)))
4819 (define-public java-httpcomponents-httpmime
4820 (package (inherit java-httpcomponents-httpclient)
4821 (name "java-httpcomponents-httpmime")
4823 `(#:jar-name "httpcomponents-httpmime.jar"
4825 (modify-phases %standard-phases
4826 (add-after 'unpack 'chdir
4827 (lambda _ (chdir "httpmime") #t)))))
4829 `(("java-httpcomponents-httpclient" ,java-httpcomponents-httpclient)
4830 ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
4831 ("java-junit" ,java-junit)
4832 ("java-hamcrest-core" ,java-hamcrest-core)))))
4834 (define-public java-commons-net
4836 (name "java-commons-net")
4840 (uri (string-append "mirror://apache/commons/net/source/"
4841 "commons-net-" version "-src.tar.gz"))
4844 "0n0cmnddk9qdqhjvka8pc6hd9mn2qi3166f1s6xk32h7rfy1adxr"))))
4845 (build-system ant-build-system)
4847 `(;; FIXME: MainTest.java tries to read "examples.properties" (which
4848 ;; should be "resources/examples/examples.properties"), but gets "null"
4851 #:jar-name "commons-net.jar"))
4853 `(("java-junit" ,java-junit)
4854 ("java-hamcrest-core" ,java-hamcrest-core)))
4855 (home-page "http://commons.apache.org/net/")
4856 (synopsis "Client library for many basic Internet protocols")
4857 (description "The Apache Commons Net library implements the client side of
4858 many basic Internet protocols. The purpose of the library is to provide
4859 fundamental protocol access, not higher-level abstractions.")
4860 (license license:asl2.0)))
4862 (define-public java-jsch
4868 (uri (string-append "mirror://sourceforge/jsch/jsch/"
4869 version "/jsch-" version ".zip"))
4872 "029rdddyq1mh3ghryh3ki99kba1xkf1d1swjv2vi6lk6zzjy2wdb"))))
4873 (build-system ant-build-system)
4875 `(#:build-target "dist"
4876 #:tests? #f ; no tests included
4878 (modify-phases %standard-phases
4879 (replace 'install (install-jars "dist")))))
4881 `(("unzip" ,unzip)))
4882 (home-page "http://www.jcraft.com/jsch/")
4883 (synopsis "Pure Java implementation of SSH2")
4884 (description "JSch is a pure Java implementation of SSH2. JSch allows you
4885 to connect to an SSH server and use port forwarding, X11 forwarding, file
4886 transfer, etc., and you can integrate its functionality into your own Java
4888 (license license:bsd-3)))
4890 (define-public java-commons-compress
4892 (name "java-commons-compress")
4896 (uri (string-append "mirror://apache/commons/compress/source/"
4897 "commons-compress-" version "-src.tar.gz"))
4900 "1vjqvavrn0babffn1kciz6v52ibwq2vwhzlb95hazis3lgllnxc8"))))
4901 (build-system ant-build-system)
4903 `(#:jar-name "commons-compress.jar"
4905 (modify-phases %standard-phases
4906 (add-after 'unpack 'delete-bad-tests
4908 (with-directory-excursion "src/test/java/org/apache/commons/compress/"
4909 ;; FIXME: These tests really should not fail. Maybe they are
4910 ;; indicative of problems with our Java packaging work.
4912 ;; This test fails with a null pointer exception.
4913 (delete-file "archivers/sevenz/SevenZOutputFileTest.java")
4914 ;; This test fails to open test resources.
4915 (delete-file "archivers/zip/ExplodeSupportTest.java")
4917 ;; FIXME: This test adds a dependency on powermock, which is hard to
4918 ;; package at this point.
4919 ;; https://github.com/powermock/powermock
4920 (delete-file "archivers/sevenz/SevenZNativeHeapTest.java"))
4923 `(("java-junit" ,java-junit)
4924 ("java-hamcrest-core" ,java-hamcrest-core)
4925 ("java-mockito" ,java-mockito-1)
4926 ("java-xz" ,java-xz)))
4927 (home-page "https://commons.apache.org/proper/commons-compress/")
4928 (synopsis "Java library for working with compressed files")
4929 (description "The Apache Commons Compress library defines an API for
4930 working with compressed files such as ar, cpio, Unix dump, tar, zip, gzip, XZ,
4931 Pack200, bzip2, 7z, arj, lzma, snappy, DEFLATE, lz4 and Z files.")
4932 (license license:asl2.0)))
4934 (define-public java-commons-csv
4936 (name "java-commons-csv")
4940 (uri (string-append "mirror://apache/commons/csv/source/"
4941 "commons-csv-" version "-src.tar.gz"))
4944 "1l89m0fm2s3xx3v3iynvangymfg2vlyngaj6fgsi457nmsw7m7ij"))))
4945 (build-system ant-build-system)
4947 `(#:jar-name "commons-csv.jar"
4948 #:source-dir "src/main/java"
4949 #:tests? #f)); FIXME: requires java-h2
4951 `(("java-hamcrest-core" ,java-hamcrest-core)
4952 ("java-commons-io" ,java-commons-io)
4953 ("java-commons-lang3" ,java-commons-lang3)
4954 ("junit" ,java-junit)))
4955 (home-page "https://commons.apache.org/proper/commons-csv/")
4956 (synopsis "Read and write CSV documents")
4957 (description "Commons CSV reads and writes files in variations of the Comma
4958 Separated Value (CSV) format. The most common CSV formats are predefined in the
4962 @item Microsoft Excel
4963 @item Informix UNLOAD
4964 @item Informix UNLOAD CSV
4970 Custom formats can be created using a fluent style API.")
4971 (license license:asl2.0)))
4973 (define-public java-osgi-annotation
4975 (name "java-osgi-annotation")
4979 (uri (string-append "https://repo1.maven.org/maven2/"
4980 "org/osgi/org.osgi.annotation/" version "/"
4981 "org.osgi.annotation-" version "-sources.jar"))
4984 "1q718mb7gqg726rh6pc2hcisn8v50nv35abbir0jypmffhiii85w"))))
4985 (build-system ant-build-system)
4987 `(#:tests? #f ; no tests
4988 #:jar-name "osgi-annotation.jar"))
4989 (home-page "https://www.osgi.org")
4990 (synopsis "Annotation module of OSGi framework")
4992 "OSGi, for Open Services Gateway initiative framework, is a module system
4993 and service platform for the Java programming language. This package contains
4994 the OSGi annotation module, providing additional services to help dynamic
4996 (license license:asl2.0)))
4998 (define-public java-osgi-core
5000 (name "java-osgi-core")
5004 (uri (string-append "https://repo1.maven.org/maven2/"
5005 "org/osgi/org.osgi.core/" version "/"
5006 "org.osgi.core-" version "-sources.jar"))
5009 "19bpf5jx32jq9789gyhin35q5v7flmw0p9mk7wbgqpxqfmxyiabv"))))
5010 (build-system ant-build-system)
5012 `(#:tests? #f ; no tests
5013 #:jar-name "osgi-core.jar"))
5015 `(("java-osgi-annotation" ,java-osgi-annotation)))
5016 (home-page "https://www.osgi.org")
5017 (synopsis "Core module of OSGi framework")
5019 "OSGi, for Open Services Gateway initiative framework, is a module system
5020 and service platform for the Java programming language. This package contains
5021 the OSGi Core module.")
5022 (license license:asl2.0)))
5024 (define-public java-osgi-service-event
5026 (name "java-osgi-service-event")
5030 (uri (string-append "https://repo1.maven.org/maven2/"
5031 "org/osgi/org.osgi.service.event/"
5032 version "/org.osgi.service.event-"
5033 version "-sources.jar"))
5036 "1nyhlgagwym75bycnjczwbnpymv2iw84zbhvvzk84g9q736i6qxm"))))
5037 (build-system ant-build-system)
5039 `(#:tests? #f ; no tests
5040 #:jar-name "osgi-service-event.jar"))
5042 `(("java-osgi-annotation" ,java-osgi-annotation)
5043 ("java-osgi-core" ,java-osgi-core)))
5044 (home-page "https://www.osgi.org")
5045 (synopsis "OSGi service event module")
5047 "OSGi, for Open Services Gateway initiative framework, is a module system
5048 and service platform for the Java programming language. This package contains
5049 the OSGi @code{org.osgi.service.event} module.")
5050 (license license:asl2.0)))
5052 (define-public java-eclipse-osgi
5054 (name "java-eclipse-osgi")
5058 (uri (string-append "https://repo1.maven.org/maven2/"
5059 "org/eclipse/platform/org.eclipse.osgi/"
5060 version "/org.eclipse.osgi-"
5061 version "-sources.jar"))
5064 "00cqc6lb29n0zv68b4l842vzkwawvbr7gshfdygsk8sicvcq2c7b"))))
5065 (build-system ant-build-system)
5067 `(#:tests? #f ; no tests included
5068 #:jar-name "eclipse-equinox-osgi.jar"))
5070 `(("java-osgi-annotation" ,java-osgi-annotation)))
5071 (home-page "http://www.eclipse.org/equinox/")
5072 (synopsis "Eclipse Equinox OSGi framework")
5073 (description "This package provides an implementation of the OSGi Core
5075 (license license:epl1.0)))
5077 (define-public java-eclipse-equinox-common
5079 (name "java-eclipse-equinox-common")
5083 (uri (string-append "https://repo1.maven.org/maven2/"
5084 "org/eclipse/platform/org.eclipse.equinox.common/"
5085 version "/org.eclipse.equinox.common-"
5086 version "-sources.jar"))
5089 "12aazpkgw46r1qj0pr421jzwhbmsizd97r37krd7njnbrdgfzksc"))))
5090 (build-system ant-build-system)
5092 `(#:tests? #f ; no tests included
5093 #:jar-name "eclipse-equinox-common.jar"))
5095 `(("java-eclipse-osgi" ,java-eclipse-osgi)))
5096 (home-page "http://www.eclipse.org/equinox/")
5097 (synopsis "Common Eclipse runtime")
5098 (description "This package provides the common Eclipse runtime.")
5099 (license license:epl1.0)))
5101 (define-public java-eclipse-core-jobs
5103 (name "java-eclipse-core-jobs")
5107 (uri (string-append "https://repo1.maven.org/maven2/"
5108 "org/eclipse/platform/org.eclipse.core.jobs/"
5109 version "/org.eclipse.core.jobs-"
5110 version "-sources.jar"))
5113 "0395b8lh0km8vhzjnchvs1rii1qz48hyvb2wqfaq4yhklbwihq4b"))))
5114 (build-system ant-build-system)
5116 `(#:tests? #f ; no tests included
5117 #:jar-name "eclipse-core-jobs.jar"))
5119 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5120 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5121 (home-page "http://www.eclipse.org/equinox/")
5122 (synopsis "Eclipse jobs mechanism")
5123 (description "This package provides the Eclipse jobs mechanism.")
5124 (license license:epl1.0)))
5126 (define-public java-eclipse-equinox-registry
5128 (name "java-eclipse-equinox-registry")
5132 (uri (string-append "https://repo1.maven.org/maven2/"
5133 "org/eclipse/platform/org.eclipse.equinox.registry/"
5134 version "/org.eclipse.equinox.registry-"
5135 version "-sources.jar"))
5138 "1i9sgymh2fy5vdgk5y7s3qvrlbgh4l93ddqi3v4zmca7hwrlhf9k"))))
5139 (build-system ant-build-system)
5141 `(#:tests? #f ; no tests included
5142 #:jar-name "eclipse-equinox-registry.jar"))
5144 `(("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
5145 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5146 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5147 (home-page "http://www.eclipse.org/equinox/")
5148 (synopsis "Eclipse extension registry support")
5149 (description "This package provides support for the Eclipse extension
5151 (license license:epl1.0)))
5153 (define-public java-eclipse-equinox-app
5155 (name "java-eclipse-equinox-app")
5159 (uri (string-append "https://repo1.maven.org/maven2/"
5160 "org/eclipse/platform/org.eclipse.equinox.app/"
5161 version "/org.eclipse.equinox.app-"
5162 version "-sources.jar"))
5165 "0nhvbp93y203ar7y59gb0mz3w2d3jlqhr0c9hii9bcfpmr7imdab"))))
5166 (build-system ant-build-system)
5168 `(#:tests? #f ; no tests included
5169 #:jar-name "eclipse-equinox-app.jar"))
5171 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5172 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5173 ("java-eclipse-osgi" ,java-eclipse-osgi)
5174 ("java-osgi-service-event" ,java-osgi-service-event)))
5175 (home-page "http://www.eclipse.org/equinox/")
5176 (synopsis "Equinox application container")
5177 (description "This package provides the Equinox application container for
5179 (license license:epl1.0)))
5181 (define-public java-eclipse-equinox-preferences
5183 (name "java-eclipse-equinox-preferences")
5187 (uri (string-append "https://repo1.maven.org/maven2/"
5188 "org/eclipse/platform/org.eclipse.equinox.preferences/"
5189 version "/org.eclipse.equinox.preferences-"
5190 version "-sources.jar"))
5193 "0k7w6c141sqym4fy3af0qkwpy4pdh2vsjpjba6rp5fxyqa24v0a2"))))
5194 (build-system ant-build-system)
5196 `(#:tests? #f ; no tests included
5197 #:jar-name "eclipse-equinox-preferences.jar"))
5199 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5200 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5201 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5202 (home-page "http://www.eclipse.org/equinox/")
5203 (synopsis "Eclipse preferences mechanism")
5204 (description "This package provides the Eclipse preferences mechanism with
5205 the module @code{org.eclipse.equinox.preferences}.")
5206 (license license:epl1.0)))
5208 (define-public java-eclipse-core-contenttype
5210 (name "java-eclipse-core-contenttype")
5214 (uri (string-append "https://repo1.maven.org/maven2/"
5215 "org/eclipse/platform/org.eclipse.core.contenttype/"
5216 version "/org.eclipse.core.contenttype-"
5217 version "-sources.jar"))
5220 "1wcqcv7ijwv5rh748vz3x9pkmjl9w1r0k0026k56n8yjl4rrmspi"))))
5221 (build-system ant-build-system)
5223 `(#:tests? #f ; no tests included
5224 #:jar-name "eclipse-core-contenttype.jar"))
5226 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5227 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5228 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5229 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5230 (home-page "http://www.eclipse.org/")
5231 (synopsis "Eclipse content mechanism")
5232 (description "This package provides the Eclipse content mechanism in the
5233 @code{org.eclipse.core.contenttype} module.")
5234 (license license:epl1.0)))
5236 (define-public java-eclipse-core-runtime
5238 (name "java-eclipse-core-runtime")
5242 (uri (string-append "https://repo1.maven.org/maven2/"
5243 "org/eclipse/platform/org.eclipse.core.runtime/"
5244 version "/org.eclipse.core.runtime-"
5245 version "-sources.jar"))
5248 "16mkf8jgj35pgzms7w1gyfq0gfm4ixw6c5xbbxzdj1la56c758ya"))))
5249 (build-system ant-build-system)
5251 `(#:tests? #f ; no tests included
5252 #:jar-name "eclipse-core-runtime.jar"))
5254 `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
5255 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
5256 ("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
5257 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5258 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5259 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5260 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5261 (home-page "https://www.eclipse.org/")
5262 (synopsis "Eclipse core runtime")
5263 (description "This package provides the Eclipse core runtime with the
5264 module @code{org.eclipse.core.runtime}.")
5265 (license license:epl1.0)))
5267 (define-public java-eclipse-core-filesystem
5269 (name "java-eclipse-core-filesystem")
5273 (uri (string-append "https://repo1.maven.org/maven2/"
5274 "org/eclipse/platform/org.eclipse.core.filesystem/"
5275 version "/org.eclipse.core.filesystem-"
5276 version "-sources.jar"))
5279 "0km1bhwjim4rfy3pkvjhvy31kgsyf2ncx0mlkmbf5n6g57pphdyj"))))
5280 (build-system ant-build-system)
5282 `(#:tests? #f ; no tests included
5283 #:jar-name "eclipse-core-filesystem.jar"))
5285 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5286 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5287 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5288 (home-page "https://www.eclipse.org/")
5289 (synopsis "Eclipse core file system")
5290 (description "This package provides the Eclipse core file system with the
5291 module @code{org.eclipse.core.filesystem}.")
5292 (license license:epl1.0)))
5294 (define-public java-eclipse-core-expressions
5296 (name "java-eclipse-core-expressions")
5300 (uri (string-append "https://repo1.maven.org/maven2/"
5301 "org/eclipse/platform/org.eclipse.core.expressions/"
5302 version "/org.eclipse.core.expressions-"
5303 version "-sources.jar"))
5306 "18bw2l875gmygvpagpgk9l24qzbdjia4ag12nw6fi8v8yaq4987f"))))
5307 (build-system ant-build-system)
5309 `(#:tests? #f ; no tests included
5310 #:jar-name "eclipse-core-expressions.jar"))
5312 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5313 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5314 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5315 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5316 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5317 (home-page "https://www.eclipse.org/")
5318 (synopsis "Eclipse core expression language")
5319 (description "This package provides the Eclipse core expression language
5320 with the @code{org.eclipse.core.expressions} module.")
5321 (license license:epl1.0)))
5323 (define-public java-eclipse-core-variables
5325 (name "java-eclipse-core-variables")
5329 (uri (string-append "https://repo1.maven.org/maven2/"
5330 "org/eclipse/platform/org.eclipse.core.variables/"
5331 version "/org.eclipse.core.variables-"
5332 version "-sources.jar"))
5335 "12dirh03zi4n5x5cj07vzrhkmnqy6h9q10h9j605pagmpmifyxmy"))))
5336 (build-system ant-build-system)
5338 `(#:tests? #f ; no tests included
5339 #:jar-name "eclipse-core-variables.jar"))
5341 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5342 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5343 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5344 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5345 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5346 (home-page "https://www.eclipse.org/platform")
5347 (synopsis "Eclipse core variables")
5348 (description "This package provides the Eclipse core variables module
5349 @code{org.eclipse.core.variables}.")
5350 (license license:epl1.0)))
5352 (define-public java-eclipse-ant-core
5354 (name "java-eclipse-ant-core")
5358 (uri (string-append "https://repo1.maven.org/maven2/"
5359 "org/eclipse/platform/org.eclipse.ant.core/"
5360 version "/org.eclipse.ant.core-"
5361 version "-sources.jar"))
5364 "11g3if794qjlk98mz9zch22rr56sd7z63vn4i7k2icr8cq5bfqg7"))))
5365 (build-system ant-build-system)
5367 `(#:tests? #f ; no tests included
5368 #:jar-name "eclipse-ant-core.jar"))
5370 `(("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
5371 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5372 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5373 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5374 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
5375 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5376 ("java-eclipse-core-variables" ,java-eclipse-core-variables)
5377 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5378 (home-page "https://www.eclipse.org/platform")
5379 (synopsis "Ant build tool core libraries")
5380 (description "This package provides the ant build tool core libraries with
5381 the module @code{org.eclipse.ant.core}.")
5382 (license license:epl1.0)))
5384 (define-public java-eclipse-core-resources
5386 (name "java-eclipse-core-resources")
5390 (uri (string-append "https://repo1.maven.org/maven2/"
5391 "org/eclipse/platform/org.eclipse.core.resources/"
5392 version "/org.eclipse.core.resources-"
5393 version "-sources.jar"))
5396 "1hrfxrll6cpcagfksk2na1ypvkcnsp0fk6n3vcsrn97qayf9mx9l"))))
5397 (build-system ant-build-system)
5399 `(#:tests? #f ; no tests included
5400 #:jar-name "eclipse-core-resources.jar"))
5402 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5403 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5404 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5405 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
5406 ("java-eclipse-core-expressions" ,java-eclipse-core-expressions)
5407 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
5408 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
5409 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5410 ("java-eclipse-ant-core" ,java-eclipse-ant-core)
5411 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5412 (home-page "https://www.eclipse.org/")
5413 (synopsis "Eclipse core resource management")
5414 (description "This package provides the Eclipse core resource management
5415 module @code{org.eclipse.core.resources}.")
5416 (license license:epl1.0)))
5418 (define-public java-eclipse-compare-core
5420 (name "java-eclipse-compare-core")
5424 (uri (string-append "https://repo1.maven.org/maven2/"
5425 "org/eclipse/platform/org.eclipse.compare.core/"
5426 version "/org.eclipse.compare.core-"
5427 version "-sources.jar"))
5430 "10g37r0pbiffyv2wk35c6g5lwzkdipkl0kkjp41v84dln46xm4dg"))))
5431 (build-system ant-build-system)
5433 `(#:tests? #f ; no tests included
5434 #:jar-name "eclipse-compare-core.jar"))
5436 `(("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5437 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5438 ("java-eclipse-osgi" ,java-eclipse-osgi)
5439 ("java-icu4j" ,java-icu4j)))
5440 (home-page "https://www.eclipse.org/")
5441 (synopsis "Eclipse core compare support")
5442 (description "This package provides the Eclipse core compare support
5443 module @code{org.eclipse.compare.core}.")
5444 (license license:epl1.0)))
5446 (define-public java-eclipse-team-core
5448 (name "java-eclipse-team-core")
5452 (uri (string-append "https://repo1.maven.org/maven2/"
5453 "org/eclipse/platform/org.eclipse.team.core/"
5454 version "/org.eclipse.team.core-"
5455 version "-sources.jar"))
5458 "02j2jzqgb26zx2d5ahxmvijw6j4r0la90zl5c3i65x6z19ciyam7"))))
5459 (build-system ant-build-system)
5461 `(#:tests? #f ; no tests included
5462 #:jar-name "eclipse-team-core.jar"))
5464 `(("java-eclipse-compare-core" ,java-eclipse-compare-core)
5465 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
5466 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
5467 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
5468 ("java-eclipse-core-resources" ,java-eclipse-core-resources)
5469 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5470 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5471 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5472 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5473 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5474 (home-page "https://www.eclipse.org/platform")
5475 (synopsis "Eclipse team support core")
5476 (description "This package provides the Eclipse team support core module
5477 @code{org.eclipse.team.core}.")
5478 (license license:epl1.0)))
5480 (define-public java-eclipse-core-commands
5482 (name "java-eclipse-core-commands")
5486 (uri (string-append "https://repo1.maven.org/maven2/"
5487 "org/eclipse/platform/org.eclipse.core.commands/"
5488 version "/org.eclipse.core.commands-"
5489 version "-sources.jar"))
5492 "0yjn482qndcfrsq3jd6vnhcylp16420f5aqkrwr8spsprjigjcr9"))))
5493 (build-system ant-build-system)
5495 `(#:tests? #f ; no tests included
5496 #:jar-name "eclipse-core-commands.jar"))
5498 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)))
5499 (home-page "https://www.eclipse.org/platform")
5500 (synopsis "Eclipse core commands")
5501 (description "This package provides Eclipse core commands in the module
5502 @code{org.eclipse.core.commands}.")
5503 (license license:epl1.0)))
5505 (define-public java-eclipse-text
5507 (name "java-eclipse-text")
5511 (uri (string-append "https://repo1.maven.org/maven2/"
5512 "org/eclipse/platform/org.eclipse.text/"
5513 version "/org.eclipse.text-"
5514 version "-sources.jar"))
5517 "0scz70vzz5qs5caji9f5q01vkqnvip7dpri1q07l8wbbdcxn4cq1"))))
5518 (build-system ant-build-system)
5520 `(#:tests? #f ; no tests included
5521 #:jar-name "eclipse-text.jar"
5523 (modify-phases %standard-phases
5524 ;; When creating a new category we must make sure that the new list
5525 ;; matches List<Position>. By default it seems to be too generic
5526 ;; (ArrayList<Object>), so we specialize it to ArrayList<Position>.
5527 ;; Without this we get this error:
5529 ;; [javac] .../src/org/eclipse/jface/text/AbstractDocument.java:376:
5530 ;; error: method put in interface Map<K,V> cannot be applied to given types;
5531 ;; [javac] fPositions.put(category, new ArrayList<>());
5533 ;; [javac] required: String,List<Position>
5534 ;; [javac] found: String,ArrayList<Object>
5535 ;; [javac] reason: actual argument ArrayList<Object> cannot be converted
5536 ;; to List<Position> by method invocation conversion
5537 ;; [javac] where K,V are type-variables:
5538 ;; [javac] K extends Object declared in interface Map
5539 ;; [javac] V extends Object declared in interface Map
5541 ;; I don't know if this is a good fix. I suspect it is not, but it
5543 (add-after 'unpack 'fix-compilation-error
5545 (substitute* "src/org/eclipse/jface/text/AbstractDocument.java"
5546 (("Positions.put\\(category, new ArrayList<>\\(\\)\\);")
5547 "Positions.put(category, new ArrayList<Position>());"))
5550 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5551 ("java-eclipse-core-commands" ,java-eclipse-core-commands)
5552 ("java-icu4j" ,java-icu4j)))
5553 (home-page "http://www.eclipse.org/platform")
5554 (synopsis "Eclipse text library")
5555 (description "Platform Text is part of the Platform UI project and
5556 provides the basic building blocks for text and text editors within Eclipse
5557 and contributes the Eclipse default text editor.")
5558 (license license:epl1.0)))
5560 (define-public java-eclipse-jdt-core
5562 (name "java-eclipse-jdt-core")
5566 (uri (string-append "https://repo1.maven.org/maven2/"
5567 "org/eclipse/jdt/org.eclipse.jdt.core/"
5568 version "/org.eclipse.jdt.core-"
5569 version "-sources.jar"))
5572 "191xw4lc7mjjkprh4ji5vnpjvr5r4zvbpwkriy4bvsjqrz35vh1j"))))
5573 (build-system ant-build-system)
5575 `(#:tests? #f ; no tests included
5576 #:jar-name "eclipse-jdt-core.jar"))
5578 `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
5579 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
5580 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
5581 ("java-eclipse-core-resources" ,java-eclipse-core-resources)
5582 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5583 ("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
5584 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5585 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5586 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5587 ("java-eclipse-osgi" ,java-eclipse-osgi)
5588 ("java-eclipse-text" ,java-eclipse-text)))
5589 (home-page "https://www.eclipse.org/jdt")
5590 (synopsis "Java development tools core libraries")
5591 (description "This package provides the core libraries of the Eclipse Java
5592 development tools.")
5593 (license license:epl1.0)))
5595 (define-public java-javax-mail
5597 (name "java-javax-mail")
5601 (uri (string-append "https://repo1.maven.org/maven2/"
5602 "com/sun/mail/javax.mail/"
5603 version "/javax.mail-"
5604 version "-sources.jar"))
5607 "0sdlfgsc2b5s89xv1261y8i0jijcja019k2x1c8ngfn582w4jly9"))))
5608 (build-system ant-build-system)
5610 `(#:tests? #f ; no tests
5611 #:jar-name "javax-mail.jar"))
5612 (home-page "https://javamail.java.net")
5613 (synopsis "Reference implementation of the JavaMail API")
5615 "This package provides versions of the JavaMail API implementation, IMAP,
5616 SMTP, and POP3 service providers, some examples, and documentation for the
5618 ;; GPLv2 only with "classpath exception".
5619 (license license:gpl2)))
5621 (define-public java-log4j-api
5623 (name "java-log4j-api")
5627 (uri (string-append "mirror://apache/logging/log4j/" version
5628 "/apache-log4j-" version "-src.tar.gz"))
5631 "0j5p9gik0jysh37nlrckqbky12isy95cpwg2gv5fas1rcdqbraxd"))))
5632 (build-system ant-build-system)
5634 `(#:tests? #f ; tests require unpackaged software
5635 #:jar-name "log4j-api.jar"
5637 (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out")
5640 (modify-phases %standard-phases
5641 (add-after 'unpack 'enter-dir
5642 (lambda _ (chdir "log4j-api") #t))
5643 ;; FIXME: The tests require additional software that has not been
5644 ;; packaged yet, such as
5645 ;; * org.apache.maven
5646 ;; * org.apache.felix
5647 (add-after 'enter-dir 'delete-tests
5648 (lambda _ (delete-file-recursively "src/test") #t)))))
5650 `(("java-osgi-core" ,java-osgi-core)
5651 ("java-hamcrest-core" ,java-hamcrest-core)
5652 ("java-junit" ,java-junit)))
5653 (home-page "http://logging.apache.org/log4j/2.x/")
5654 (synopsis "API module of the Log4j logging framework for Java")
5656 "This package provides the API module of the Log4j logging framework for
5658 (license license:asl2.0)))
5660 (define-public java-log4j-core
5662 (inherit java-log4j-api)
5663 (name "java-log4j-core")
5665 `(("java-osgi-core" ,java-osgi-core)
5666 ("java-hamcrest-core" ,java-hamcrest-core)
5667 ("java-log4j-api" ,java-log4j-api)
5668 ("java-mail" ,java-mail)
5669 ("java-jboss-jms-api-spec" ,java-jboss-jms-api-spec)
5670 ("java-lmax-disruptor" ,java-lmax-disruptor)
5671 ("java-kafka" ,java-kafka-clients)
5672 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
5673 ("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
5674 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
5675 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)
5676 ("java-fasterxml-jackson-dataformat-xml" ,java-fasterxml-jackson-dataformat-xml)
5677 ("java-fasterxml-jackson-dataformat-yaml" ,java-fasterxml-jackson-dataformat-yaml)
5678 ("java-commons-compress" ,java-commons-compress)
5679 ("java-commons-csv" ,java-commons-csv)
5680 ("java-jeromq" ,java-jeromq)
5681 ("java-junit" ,java-junit)))
5683 `(("hamcrest" ,java-hamcrest-all)
5684 ("java-commons-io" ,java-commons-io)
5685 ("java-commons-lang3" ,java-commons-lang3)
5686 ("slf4j" ,java-slf4j-api)))
5688 `(#:tests? #f ; tests require more dependencies
5689 #:test-dir "src/test"
5690 #:source-dir "src/main/java"
5691 #:jar-name "log4j-core.jar"
5694 (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out")
5697 (modify-phases %standard-phases
5698 (add-after 'unpack 'enter-dir
5699 (lambda _ (chdir "log4j-core") #t)))))
5700 (synopsis "Core component of the Log4j framework")
5701 (description "This package provides the core component of the Log4j
5702 logging framework for Java.")))
5704 (define-public java-log4j-1.2-api
5706 (inherit java-log4j-api)
5707 (name "java-log4j-1.2-api")
5709 `(#:jar-name "java-log4j-1.2-api.jar"
5710 #:source-dir "log4j-1.2-api/src/main/java"
5712 ;; Tests require maven-model (and other maven subprojects), which is a
5713 ;; cyclic dependency.
5716 `(("log4j-api" ,java-log4j-api)
5717 ("log4j-core" ,java-log4j-core)
5718 ("osgi-core" ,java-osgi-core)
5719 ("eclipse-osgi" ,java-eclipse-osgi)
5720 ("java-lmax-disruptor" ,java-lmax-disruptor)))))
5722 (define-public java-commons-cli
5724 (name "java-commons-cli")
5728 (uri (string-append "mirror://apache/commons/cli/source/"
5729 "commons-cli-" version "-src.tar.gz"))
5732 "05hgi2z01fqz374y719gl1dxzqvzci5af071zm7vxrjg9vczipm1"))))
5733 (build-system ant-build-system)
5736 `(#:jar-name "commons-cli.jar"))
5738 `(("java-junit" ,java-junit)
5739 ("java-hamcrest-core" ,java-hamcrest-core)))
5740 (home-page "http://commons.apache.org/cli/")
5741 (synopsis "Command line arguments and options parsing library")
5742 (description "The Apache Commons CLI library provides an API for parsing
5743 command line options passed to programs. It is also able to print help
5744 messages detailing the options available for a command line tool.
5746 Commons CLI supports different types of options:
5749 @item POSIX like options (ie. tar -zxvf foo.tar.gz)
5750 @item GNU like long options (ie. du --human-readable --max-depth=1)
5751 @item Java like properties (ie. java -Djava.awt.headless=true Foo)
5752 @item Short options with value attached (ie. gcc -O2 foo.c)
5753 @item long options with single hyphen (ie. ant -projecthelp)
5756 This is a part of the Apache Commons Project.")
5757 (license license:asl2.0)))
5759 (define-public java-commons-codec
5761 (name "java-commons-codec")
5765 (uri (string-append "mirror://apache/commons/codec/source/"
5766 "commons-codec-" version "-src.tar.gz"))
5769 "1w9qg30y4s0x8gnmr2fgj4lyplfn788jqxbcz27lf5kbr6n8xr65"))))
5770 (build-system ant-build-system)
5771 (outputs '("out" "doc"))
5773 `(#:test-target "test"
5775 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
5776 (junit (assoc-ref %build-inputs "java-junit")))
5777 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
5778 (string-append "-Dhamcrest.jar=" hamcrest
5779 "/share/java/hamcrest-core.jar")
5780 ;; Do not append version to jar.
5781 "-Dfinal.name=commons-codec"))
5783 (modify-phases %standard-phases
5784 (add-after 'build 'build-javadoc ant-build-javadoc)
5785 (replace 'install (install-jars "dist"))
5786 (add-after 'install 'install-doc (install-javadoc "dist/docs/api")))))
5788 `(("java-junit" ,java-junit)
5789 ("java-hamcrest-core" ,java-hamcrest-core)))
5790 (home-page "http://commons.apache.org/codec/")
5791 (synopsis "Common encoders and decoders such as Base64, Hex, Phonetic and URLs")
5792 (description "The codec package contains simple encoder and decoders for
5793 various formats such as Base64 and Hexadecimal. In addition to these widely
5794 used encoders and decoders, the codec package also maintains a collection of
5795 phonetic encoding utilities.
5797 This is a part of the Apache Commons Project.")
5798 (license license:asl2.0)))
5800 (define-public java-commons-daemon
5802 (name "java-commons-daemon")
5806 (uri (string-append "mirror://apache/commons/daemon/source/"
5807 "commons-daemon-" version "-src.tar.gz"))
5810 "0ci46kq8jpz084ccwq0mmkahcgsmh20ziclp2jf5i0djqv95gvhi"))))
5811 (build-system ant-build-system)
5813 `(#:test-target "test"
5815 (modify-phases %standard-phases
5816 (add-after 'build 'build-javadoc ant-build-javadoc)
5817 (replace 'install (install-jars "dist"))
5818 (add-after 'install 'install-doc (install-javadoc "dist/docs/api")))))
5820 `(("java-junit" ,java-junit)))
5821 (home-page "http://commons.apache.org/daemon/")
5822 (synopsis "Library to launch Java applications as daemons")
5823 (description "The Daemon package from Apache Commons can be used to
5824 implement Java applications which can be launched as daemons. For example the
5825 program will be notified about a shutdown so that it can perform cleanup tasks
5826 before its process of execution is destroyed by the operation system.
5828 This package contains the Java library. You will also need the actual binary
5829 for your architecture which is provided by the jsvc package.
5831 This is a part of the Apache Commons Project.")
5832 (license license:asl2.0)))
5834 (define-public java-javaewah
5836 (name "java-javaewah")
5840 (uri (string-append "https://github.com/lemire/javaewah/"
5841 "archive/JavaEWAH-" version ".tar.gz"))
5844 "1n7j1r1h24wlhwv9zdcj6yqjrhma2ixwyzm15l5vrv6yqjs6753b"))))
5845 (build-system ant-build-system)
5846 (arguments `(#:jar-name "javaewah.jar"))
5848 `(("java-junit" ,java-junit)
5849 ("java-hamcrest-core" ,java-hamcrest-core)))
5850 (home-page "https://github.com/lemire/javaewah")
5851 (synopsis "Compressed alternative to the Java @code{BitSet} class")
5852 (description "This is a word-aligned compressed variant of the Java
5853 @code{Bitset} class. It provides both a 64-bit and a 32-bit RLE-like
5854 compression scheme. It can be used to implement bitmap indexes.
5856 The goal of word-aligned compression is not to achieve the best compression,
5857 but rather to improve query processing time. Hence, JavaEWAH tries to save CPU
5858 cycles, maybe at the expense of storage. However, the EWAH scheme is always
5859 more efficient storage-wise than an uncompressed bitmap (as implemented in the
5860 @code{BitSet} class by Sun).")
5861 ;; GPL2.0 derivates are explicitly allowed.
5862 (license license:asl2.0)))
5864 (define-public java-slf4j-api
5866 (name "java-slf4j-api")
5870 (uri (string-append "https://www.slf4j.org/dist/slf4j-"
5874 "13j51sgzmhhdrfa74gkal5zpip7r1440dh7zsi2c8bpb2zs1v8kb"))
5875 (modules '((guix build utils)))
5876 ;; Delete bundled jars.
5879 (for-each delete-file (find-files "." "\\.jar$"))
5881 (build-system ant-build-system)
5883 `(#:jar-name "slf4j-api.jar"
5884 #:source-dir "slf4j-api/src/main"
5885 #:test-dir "slf4j-api/src/test"
5887 (modify-phases %standard-phases
5888 (add-after 'build 'regenerate-jar
5890 ;; pom.xml ignores these files in the jar creation process. If we don't,
5891 ;; we get the error "This code should have never made it into slf4j-api.jar"
5892 (delete-file-recursively "build/classes/org/slf4j/impl")
5893 (invoke "jar" "-cf" "build/jar/slf4j-api.jar" "-C"
5894 "build/classes" ".")))
5895 (add-before 'check 'dont-test-abstract-classes
5897 ;; abstract classes are not meant to be run with junit
5898 (substitute* "build.xml"
5899 (("<include name=\"\\*\\*/\\*Test.java\" />")
5900 (string-append "<include name=\"**/*Test.java\" />"
5901 "<exclude name=\"**/MultithreadedInitializationTest"
5905 `(("java-junit" ,java-junit)
5906 ("java-hamcrest-core" ,java-hamcrest-core)))
5907 (home-page "https://www.slf4j.org/")
5908 (synopsis "Simple logging facade for Java")
5909 (description "The Simple Logging Facade for Java (SLF4J) serves as a
5910 simple facade or abstraction for various logging
5911 frameworks (e.g. @code{java.util.logging}, @code{logback}, @code{log4j})
5912 allowing the end user to plug in the desired logging framework at deployment
5914 (license license:expat)))
5916 (define java-slf4j-api-bootstrap
5918 (inherit java-slf4j-api)
5919 (name "java-slf4j-api-bootstrap")
5922 (substitute-keyword-arguments (package-arguments java-slf4j-api)
5923 ((#:tests? _ #f) #f)))))
5925 (define-public java-slf4j-simple
5927 (name "java-slf4j-simple")
5929 (source (package-source java-slf4j-api))
5930 (build-system ant-build-system)
5932 `(#:jar-name "slf4j-simple.jar"
5933 #:source-dir "slf4j-simple/src/main"
5934 #:test-dir "slf4j-simple/src/test"
5936 (modify-phases %standard-phases
5937 ;; The tests need some test classes from slf4j-api
5938 (add-before 'check 'build-slf4j-api-test-helpers
5940 ;; Add current dir to CLASSPATH ...
5942 (string-append (getcwd) ":" (getenv "CLASSPATH")))
5943 ;; ... and build test helper classes here:
5946 ,@(find-files "slf4j-api/src/test" ".*\\.java"))))))))
5948 `(("java-junit" ,java-junit)
5949 ("java-hamcrest-core" ,java-hamcrest-core)
5950 ("java-slf4j-api" ,java-slf4j-api)))
5951 (home-page "https://www.slf4j.org/")
5952 (synopsis "Simple implementation of simple logging facade for Java")
5953 (description "SLF4J binding for the Simple implementation, which outputs
5954 all events to System.err. Only messages of level INFO and higher are
5956 (license license:expat)))
5958 (define-public antlr2
5964 (uri (string-append "http://www.antlr2.org/download/antlr-"
5968 "1ffvcwdw73id0dk6pj2mlxjvbg0662qacx4ylayqcxgg381fnfl5"))
5969 (modules '((guix build utils)))
5972 (delete-file "antlr.jar")
5973 (substitute* "lib/cpp/antlr/CharScanner.hpp"
5977 "#define EOF (-1)\n"
5978 "#include <strings.h>")))
5979 (substitute* "configure"
5982 (build-system gnu-build-system)
5984 `(#:tests? #f ; no test target
5985 #:imported-modules ((guix build ant-build-system)
5986 (guix build syscalls)
5987 ,@%gnu-build-system-modules)
5988 #:modules (((guix build ant-build-system) #:prefix ant:)
5989 (guix build gnu-build-system)
5992 (modify-phases %standard-phases
5993 (add-after 'install 'strip-jar-timestamps
5994 (assoc-ref ant:%standard-phases 'strip-jar-timestamps))
5995 (add-after 'configure 'fix-bin-ls
5997 (substitute* (find-files "." "Makefile")
6003 ("java" ,icedtea "jdk")))
6005 `(("java" ,icedtea)))
6006 (home-page "http://www.antlr2.org")
6007 (synopsis "Framework for constructing recognizers, compilers, and translators")
6008 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
6009 is a language tool that provides a framework for constructing recognizers,
6010 compilers, and translators from grammatical descriptions containing Java, C#,
6011 C++, or Python actions. ANTLR provides excellent support for tree construction,
6012 tree walking, and translation.")
6013 (license license:public-domain)))
6015 (define-public java-stringtemplate-3
6017 (name "java-stringtemplate")
6021 (uri (string-append "https://github.com/antlr/website-st4/raw/"
6022 "gh-pages/download/stringtemplate-"
6026 "086yj68np1vqhkj7483diz3km6s6y4gmwqswa7524a0ca6vxn2is"))))
6027 (build-system ant-build-system)
6029 `(#:jar-name (string-append ,name "-" ,version ".jar")
6031 #:modules ((guix build ant-build-system)
6035 (modify-phases %standard-phases
6036 (add-before 'check 'fix-tests
6038 (substitute* "build.xml"
6039 (("\\$\\{test.home\\}/java")
6040 "${test.home}/org"))
6042 (add-before 'build 'generate-grammar
6044 (with-directory-excursion "src/org/antlr/stringtemplate/language/"
6045 (for-each (lambda (file)
6046 (format #t "~a\n" file)
6047 (invoke "antlr" file))
6048 '("template.g" "angle.bracket.template.g" "action.g"
6049 "eval.g" "group.g" "interface.g")))
6053 ("java-junit" ,java-junit)))
6054 (home-page "http://www.stringtemplate.org")
6055 (synopsis "Template engine to generate formatted text output")
6056 (description "StringTemplate is a java template engine (with ports for C#,
6057 Objective-C, JavaScript, Scala) for generating source code, web pages, emails,
6058 or any other formatted text output. StringTemplate is particularly good at
6059 code generators, multiple site skins, and internationalization / localization.
6060 StringTemplate also powers ANTLR.")
6061 (license license:bsd-3)))
6063 ;; antlr3 is partially written using antlr3 grammar files. It also depends on
6064 ;; ST4 (stringtemplate4), which is also partially written using antlr3 grammar
6065 ;; files and uses antlr3 at runtime. The latest version requires a recent version
6066 ;; of antlr3 at runtime.
6067 ;; Fortunately, ST4 4.0.6 can be built with an older antlr3, and we use antlr3.3.
6068 ;; This version of ST4 is sufficient for the latest antlr3.
6069 ;; We use ST4 4.0.6 to build a boostrap antlr3 (latest version), and build
6070 ;; the latest ST4 with it. Then we build our final antlr3 that will be linked
6071 ;; against the latest ST4.
6072 ;; antlr3.3 still depends on antlr3 to generate some files, so we use an
6073 ;; even older version, antlr3.1, to generate them. Fortunately antlr3.1 uses
6074 ;; only grammar files with the antlr2 syntax.
6075 ;; So we build antlr3.1 -> antlr3.3 -> ST4.0.6 -> antlr3-bootstrap -> ST4 -> antlr3.
6077 (define-public java-stringtemplate
6078 (package (inherit java-stringtemplate-3)
6079 (name "java-stringtemplate")
6083 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/"
6085 (file-name (string-append name "-" version ".tar.gz"))
6088 "1pri8hqa95rfdkjy55icl5q1m09zwp5k67ib14abas39s4v3w087"))))
6089 (build-system ant-build-system)
6091 `(#:jar-name (string-append ,name "-" ,version ".jar")
6092 #:tests? #f ; FIXME: tests fail for unknown reasons
6094 #:modules ((guix build ant-build-system)
6098 (modify-phases %standard-phases
6099 (add-before 'check 'fix-test-target
6101 (substitute* "build.xml"
6102 (("\\$\\{test.home\\}/java") "${test.home}/")
6103 (("\\*Test.java") "Test*.java"))
6105 (add-before 'build 'generate-grammar
6107 (with-directory-excursion "src/org/stringtemplate/v4/compiler/"
6108 (for-each (lambda (file)
6109 (format #t "~a\n" file)
6110 (invoke "antlr3" file))
6111 '("STParser.g" "Group.g" "CodeGenerator.g")))
6114 `(("antlr3" ,antlr3-bootstrap)
6116 ("java-stringtemplate" ,java-stringtemplate-3)
6117 ("java-junit" ,java-junit)))))
6119 (define java-stringtemplate-4.0.6
6120 (package (inherit java-stringtemplate)
6121 (name "java-stringtemplate")
6125 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/ST-"
6127 (file-name (string-append name "-" version ".tar.gz"))
6130 "0hjmh1ahdsh3w825i67mli9l4nncc4l6hdbf9ma91jvlj590sljp"))))
6132 `(("antlr3" ,antlr3-3.3)
6134 ("java-stringtemplate" ,java-stringtemplate-3)))))
6136 (define-public antlr3
6142 (uri (string-append "https://github.com/antlr/antlr3/archive/"
6144 (file-name (string-append name "-" version ".tar.gz"))
6147 "0218v683081lg54z9hvjxinhxd4dqp870jx6n39gslm0bkyi4vd6"))))
6148 (build-system ant-build-system)
6150 `(#:jar-name (string-append ,name "-" ,version ".jar")
6151 #:source-dir "tool/src/main/java:runtime/Java/src/main/java:tool/src/main/antlr3"
6154 (modify-phases %standard-phases
6155 (add-after 'install 'bin-install
6156 (lambda* (#:key inputs outputs #:allow-other-keys)
6157 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
6158 (bin (string-append (assoc-ref outputs "out") "/bin")))
6160 (with-output-to-file (string-append bin "/antlr3")
6163 (string-append "#!" (which "sh") "\n"
6164 "java -cp " jar "/" ,name "-" ,version ".jar:"
6166 (find-files (assoc-ref inputs "stringtemplate")
6170 (find-files (assoc-ref inputs "stringtemplate4")
6174 (find-files (string-append
6175 (assoc-ref inputs "antlr")
6178 " org.antlr.Tool $*"))))
6179 (chmod (string-append bin "/antlr3") #o755))
6181 (add-before 'build 'generate-grammar
6183 (chdir "tool/src/main/antlr3/org/antlr/grammar/v3/")
6184 (for-each (lambda (file)
6187 (invoke "antlr3" file))
6188 '("ANTLR.g" "ANTLRTreePrinter.g" "ActionAnalysis.g"
6189 "AssignTokenTypesWalker.g"
6190 "ActionTranslator.g" "TreeToNFAConverter.g"
6191 "ANTLRv3.g" "ANTLRv3Tree.g" "LeftRecursiveRuleWalker.g"
6192 "CodeGenTreeWalker.g" "DefineGrammarItemsWalker.g"))
6193 (substitute* "ANTLRParser.java"
6194 (("public Object getTree") "public GrammarAST getTree"))
6195 (substitute* "ANTLRv3Parser.java"
6196 (("public Object getTree") "public CommonTree getTree"))
6197 (chdir "../../../../../java")
6198 (substitute* "org/antlr/tool/LeftRecursiveRuleAnalyzer.java"
6199 (("import org.antlr.grammar.v3.\\*;") "import org.antlr.grammar.v3.*;
6200 import org.antlr.grammar.v3.ANTLRTreePrinter;"))
6201 (substitute* "org/antlr/tool/ErrorManager.java"
6202 (("case NO_SUCH_ATTRIBUTE_PASS_THROUGH:") ""))
6203 (chdir "../../../..")
6205 (add-before 'build 'fix-build-xml
6207 (substitute* "build.xml"
6208 (("<exec") "<copy todir=\"${classes.dir}\">
6209 <fileset dir=\"tool/src/main/resources\">
6210 <include name=\"**/*.stg\"/>
6211 <include name=\"**/*.st\"/>
6212 <include name=\"**/*.sti\"/>
6213 <include name=\"**/STLexer.tokens\"/>
6219 ("antlr3" ,antlr3-bootstrap)))
6221 `(("junit" ,java-junit)
6222 ("stringtemplate" ,java-stringtemplate-3)
6223 ("stringtemplate4" ,java-stringtemplate)))
6225 `(("stringtemplate" ,java-stringtemplate-3)
6227 ("stringtemplate4" ,java-stringtemplate-4.0.6)))
6228 (home-page "http://www.antlr3.org")
6229 (synopsis "Framework for constructing recognizers, compilers, and translators")
6230 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
6231 is a language tool that provides a framework for constructing recognizers,
6232 compilers, and translators from grammatical descriptions containing Java, C#,
6233 C++, or Python actions. ANTLR provides excellent support for tree construction,
6234 tree walking, and translation.")
6235 (license license:bsd-3)))
6237 (define antlr3-bootstrap
6240 (name "antlr3-bootstrap")
6243 ("antlr3" ,antlr3-3.3)))
6245 `(("junit" ,java-junit)))))
6254 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
6255 "gh-pages/download/antlr-"
6259 "0qgg5vgsm4l1d6dj9pfbaa25dpv2ry2gny8ajy4vvgvfklw97b3m"))
6261 (search-patches "antlr3-3_3-fix-java8-compilation.patch"))))
6263 `(#:jar-name (string-append ,name "-" ,version ".jar")
6264 #:source-dir (string-join '("tool/src/main/java"
6265 "runtime/Java/src/main/java"
6266 "tool/src/main/antlr2"
6267 "tool/src/main/antlr3")
6269 #:tests? #f ; FIXME: tests seem to require maven plugin
6270 #:modules ((guix build ant-build-system)
6274 (modify-phases %standard-phases
6275 (add-after 'install 'bin-install
6276 (lambda* (#:key inputs outputs #:allow-other-keys)
6277 (let* ((out (assoc-ref outputs "out"))
6278 (jar (string-append out "/share/java"))
6279 (bin (string-append out "/bin")))
6281 (with-output-to-file (string-append bin "/antlr3")
6285 "#!" (which "sh") "\n"
6286 "java -cp " jar "/antlr3-3.3.jar:"
6288 (append (find-files (assoc-ref inputs "java-stringtemplate")
6290 (find-files (string-append (assoc-ref inputs "antlr")
6294 " org.antlr.Tool $*"))))
6295 (chmod (string-append bin "/antlr3") #o755)
6297 (add-before 'build 'generate-grammar
6299 (substitute* "tool/src/main/java/org/antlr/tool/Grammar.java"
6300 (("import org.antlr.grammar.v2.\\*;")
6301 "import org.antlr.grammar.v2.*;\n
6302 import org.antlr.grammar.v2.TreeToNFAConverter;\n
6303 import org.antlr.grammar.v2.DefineGrammarItemsWalker;\n
6304 import org.antlr.grammar.v2.ANTLRTreePrinter;"))
6305 (with-directory-excursion "tool/src/main/antlr2/org/antlr/grammar/v2/"
6306 (for-each (lambda (file)
6307 (format #t "~a\n" file)
6308 (invoke "antlr" file))
6309 '("antlr.g" "antlr.print.g" "assign.types.g"
6310 "buildnfa.g" "codegen.g" "define.g")))
6311 (with-directory-excursion "tool/src/main/antlr3/org/antlr/grammar/v3/"
6312 (for-each (lambda (file)
6313 (format #t "~a\n" file)
6314 (invoke "antlr3" file))
6315 '("ActionAnalysis.g" "ActionTranslator.g" "ANTLRv3.g"
6318 (add-before 'build 'fix-build-xml
6320 (substitute* "build.xml"
6321 (("<exec") "<copy todir=\"${classes.dir}\">
6322 <fileset dir=\"tool/src/main/resources\">
6323 <include name=\"**/*.stg\"/>
6324 <include name=\"**/*.st\"/>
6325 <include name=\"**/*.sti\"/>
6326 <include name=\"**/STLexer.tokens\"/>
6332 ("antlr3" ,antlr3-3.1)))
6334 `(("junit" ,java-junit)))
6336 `(("java-stringtemplate" ,java-stringtemplate-3)
6338 ("antlr3" ,antlr3-3.1)))))
6346 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
6347 "gh-pages/download/antlr-"
6351 "0sfimc9cpbgrihz4giyygc8afgpma2c93yqpwb951giriri6x66z"))
6353 (search-patches "antlr3-3_1-fix-java8-compilation.patch"))))
6355 `(#:jar-name (string-append "antlr3-" ,version ".jar")
6356 #:source-dir "src:runtime/Java/src"
6359 (modify-phases %standard-phases
6360 (add-after 'install 'bin-install
6361 (lambda* (#:key inputs outputs #:allow-other-keys)
6362 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
6363 (bin (string-append (assoc-ref outputs "out") "/bin")))
6365 (with-output-to-file (string-append bin "/antlr3")
6368 (string-append "#!" (which "sh") "\n"
6369 "java -cp " jar "/antlr3-3.1.jar:"
6371 (find-files (assoc-ref inputs "stringtemplate")
6375 (find-files (string-append
6376 (assoc-ref inputs "antlr")
6379 " org.antlr.Tool $*"))))
6380 (chmod (string-append bin "/antlr3") #o755))
6382 (add-before 'build 'generate-grammar
6384 (let ((dir "src/org/antlr/tool/"))
6385 (for-each (lambda (file)
6388 (invoke "antlr" "-o" dir (string-append dir file)))
6389 '("antlr.g" "antlr.print.g" "assign.types.g"
6390 "buildnfa.g" "define.g")))
6391 (format #t "codegen.g\n")
6392 (invoke "antlr" "-o" "src/org/antlr/codegen"
6393 "src/org/antlr/codegen/codegen.g")
6395 (add-before 'build 'fix-build-xml
6397 (substitute* "build.xml"
6398 (("<exec") "<copy todir=\"${classes.dir}\">
6399 <fileset dir=\"src\">
6400 <include name=\"**/*.stg\"/>
6401 <include name=\"**/*.st\"/>
6402 <include name=\"**/*.sti\"/>
6403 <include name=\"**/STLexer.tokens\"/>
6408 `(("antlr" ,antlr2)))
6410 `(("junit" ,java-junit)))
6412 `(("stringtemplate" ,java-stringtemplate-3)))))
6414 (define-public java-commons-cli-1.2
6415 ;; This is a bootstrap dependency for Maven2.
6417 (inherit java-commons-cli)
6421 (uri (string-append "mirror://apache/commons/cli/source/"
6422 "commons-cli-" version "-src.tar.gz"))
6425 "0rvfgzgv2pc1m091dfj3ih9ddsjjppr1f1wf0qmc3bk6b1kwv2dm"))))
6427 `(#:jar-name "commons-cli.jar"
6429 (modify-phases %standard-phases
6430 (add-before 'check 'fix-build-xml
6431 (lambda* (#:key inputs #:allow-other-keys)
6432 (substitute* "build.xml"
6433 (("dir=\"\\$\\{test.home\\}/java\"")
6434 "dir=\"${test.home}\""))
6437 `(("java-junit" ,java-junit)))))
6439 (define-public java-microemulator-cldc
6441 (name "java-microemulator-cldc")
6445 (uri (string-append "https://github.com/barteo/microemu/archive/"
6447 (string-map (lambda (c) (if (char=? c #\.) #\_ c))
6450 (file-name (string-append name "-" version ".tar.gz"))
6453 "1x1apmz38gkppxnwnygwmi12j54v4p258v8ddzn6dldkk7vak1ll"))))
6454 (build-system ant-build-system)
6456 `(#:jar-name "microemulator-cldc.jar"
6457 #:source-dir "microemu-cldc/src/main/java"
6458 #:tests? #f)); Requires even older software
6459 (home-page "https://github.com/barteo/microemu")
6460 (synopsis "J2ME CLDC emulator")
6461 (description "Microemulator is a Java 2 Micro Edition (J2ME) CLDC/MIDP
6462 Emulator. It allows to demonstrate MIDlet based applications in web browser
6463 applet and can be run as a standalone java application.")
6464 (license (list license:asl2.0
6466 license:lgpl2.1+))))
6468 (define-public java-datanucleus-javax-persistence
6470 (name "java-datanucleus-javax-persistence")
6474 (uri (string-append "https://github.com/datanucleus/"
6475 "javax.persistence/archive/javax.persistence-"
6476 version "-release.tar.gz"))
6479 "11jx0fjwgc2hhbqqgdd6m1pf2fplf9vslppygax0y1z5csnqjhpx"))))
6480 (build-system ant-build-system)
6482 `(#:jar-name "java-datanucleus-javax-persistence.jar"
6484 #:source-dir "src/main/java"
6485 #:tests? #f)); no tests
6486 (home-page "https://github.com/datanucleus/javax.persistence")
6487 (synopsis "JPA API")
6488 (description "This package contains a clean definition of JPA API intended
6489 for use with DataNucleus JPA since the JCP haven't provided an official JPA API
6490 jar. See @url{http://java.net/projects/jpa-spec/downloads} for the specification
6491 used to generate this API.")
6492 (license (list license:edl1.0 license:epl1.0))))
6494 (define-public java-osgi-cmpn
6496 (name "java-osgi-cmpn")
6500 (uri (string-append "http://central.maven.org/maven2/"
6501 "org/osgi/osgi.cmpn/" version "/osgi.cmpn-"
6502 version "-sources.jar"))
6505 "1lmb6xyrmkqdhv1kayf0514rlwq6ypvs4m44ibrck3snp8241wys"))))
6506 (build-system ant-build-system)
6508 `(#:jar-name "osgi-cmpn.jar"
6509 #:tests? #f)); no tests
6511 `(("annotation" ,java-osgi-annotation)
6512 ("core" ,java-osgi-core)
6513 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
6514 ("microemulator" ,java-microemulator-cldc)
6515 ("servlet" ,java-classpathx-servletapi)))
6516 (home-page "https://www.osgi.org")
6517 (synopsis "Compendium specification module of OSGi framework")
6519 "OSGi, for Open Services Gateway initiative framework, is a module system
6520 and service platform for the Java programming language. This package contains
6521 the compendium specification module, providing interfaces and classes for use
6522 in compiling bundles.")
6523 (license license:asl2.0)))
6525 (define-public java-osgi-service-component-annotations
6527 (name "java-osgi-service-component-annotations")
6531 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6532 "org.osgi.service.component.annotations/"
6533 version "/org.osgi.service.component.annotations-"
6534 version "-sources.jar"))
6537 "15rq9cmp4fpn74q44m4j35qsqmjf5lx3hcrk6pzvbhc08igic2f0"))))
6538 (build-system ant-build-system)
6540 `(#:jar-name "osgi-service-component-annotations.jar"
6541 #:tests? #f)); no tests
6543 `(("annotation" ,java-osgi-annotation)))
6544 (home-page "https://www.osgi.org")
6545 (synopsis "Support annotations for osgi-service-component")
6547 "OSGi, for Open Services Gateway initiative framework, is a module system
6548 and service platform for the Java programming language. This package contains
6549 the support annotations for osgi-service-component.")
6550 (license license:asl2.0)))
6552 (define-public java-osgi-dto
6554 (name "java-osgi-dto")
6558 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6559 "org.osgi.dto/" version "/org.osgi.dto-"
6560 version "-sources.jar"))
6563 "0f4bqjzadn0hwk6sd3h5gvbyfp3yci1s6r0v770cc15p0pg627yr"))))
6564 (build-system ant-build-system)
6566 `(#:jar-name "osgi-dto.jar"
6567 #:tests? #f)); no tests
6569 `(("annotation" ,java-osgi-annotation)))
6570 (home-page "https://www.osgi.org")
6571 (synopsis "Data Transfer Objects")
6573 "OSGi, for Open Services Gateway initiative framework, is a module system
6574 and service platform for the Java programming language. This package contains
6575 the Data Transfer Objects. It is easily serializable having only public fields
6576 of primitive types and their wrapper classes, Strings, and DTOs. List, Set,
6577 Map and array aggregates may also be used. The aggregates must only hold
6578 objects of the listed types or aggregates.")
6579 (license license:asl2.0)))
6581 (define-public java-osgi-resource
6583 (name "java-osgi-resource")
6587 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6588 "org.osgi.resource/"
6589 version "/org.osgi.resource-"
6590 version "-sources.jar"))
6593 "0hi0fsc5v99q22bd7lrkvpz1y0ds4w9arjldpwsrcpqvz2js7q2d"))))
6594 (build-system ant-build-system)
6596 `(#:jar-name "osgi-resource.jar"
6597 #:tests? #f)); no tests
6599 `(("annotation" ,java-osgi-annotation)
6600 ("dto" ,java-osgi-dto)))
6601 (home-page "https://www.osgi.org")
6602 (synopsis "OSGI Resource")
6604 "OSGi, for Open Services Gateway initiative framework, is a module system
6605 and service platform for the Java programming language. This package contains
6606 the definition of common types in osgi packages.")
6607 (license license:asl2.0)))
6609 (define-public java-osgi-namespace-contract
6611 (name "java-osgi-namespace-contract")
6615 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6616 "org.osgi.namespace.contract/"
6617 version "/org.osgi.namespace.contract-"
6618 version "-sources.jar"))
6621 "1iz4f2i0fvqrlq90ki9nfzcfpvy2av434ri25bglywqssx8mmp36"))))
6622 (build-system ant-build-system)
6624 `(("resource" ,java-osgi-resource)
6625 ("annotation" ,java-osgi-annotation)))
6627 `(#:jar-name "osgi-namespace-contract.jar"
6628 #:tests? #f)); no tests
6629 (home-page "https://www.osgi.org")
6630 (synopsis "Contract Capability and Requirement Namespace")
6632 "OSGi, for Open Services Gateway initiative framework, is a module system
6633 and service platform for the Java programming language. This package contains
6634 the names for the attributes and directives for a namespace with contracts.")
6635 (license license:asl2.0)))
6637 (define-public java-osgi-namespace-extender
6639 (name "java-osgi-namespace-extender")
6643 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6644 "org.osgi.namespace.extender/"
6645 version "/org.osgi.namespace.extender-"
6646 version "-sources.jar"))
6649 "0jgqiak2i05qv6j3gd33xlaifzzc0ylxxk376v2x0apfg3vvixmz"))))
6650 (build-system ant-build-system)
6652 `(("resource" ,java-osgi-resource)
6653 ("annotation" ,java-osgi-annotation)))
6655 `(#:jar-name "osgi-namespace-extendent.jar"
6656 #:tests? #f)); no tests
6657 (home-page "https://www.osgi.org")
6658 (synopsis "Extender Capability and Requirement Namespace")
6660 "OSGi, for Open Services Gateway initiative framework, is a module system
6661 and service platform for the Java programming language. This package contains
6662 the names for the attributes and directives for an extender namespace.")
6663 (license license:asl2.0)))
6665 (define-public java-osgi-namespace-service
6667 (name "java-osgi-namespace-service")
6671 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6672 "org.osgi.namespace.service/"
6673 version "/org.osgi.namespace.service-"
6674 version "-sources.jar"))
6677 "0qmw8n2449nkmm56d1znz9zhazb6ya3vsimd5bf5jg23zzhgl8c8"))))
6678 (build-system ant-build-system)
6680 `(("resource" ,java-osgi-resource)
6681 ("annotation" ,java-osgi-annotation)))
6683 `(#:jar-name "osgi-namespace-service.jar"
6684 #:tests? #f)); no tests
6685 (home-page "https://www.osgi.org")
6686 (synopsis "Service Capability and Requirement Namespace")
6688 "OSGi, for Open Services Gateway initiative framework, is a module system
6689 and service platform for the Java programming language. This package contains
6690 the names for the attributes and directives for a service namespace.")
6691 (license license:asl2.0)))
6693 (define-public java-osgi-util-function
6695 (name "java-osgi-util-function")
6699 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6700 "org.osgi.util.function/"
6701 version "/org.osgi.util.function-"
6702 version "-sources.jar"))
6705 "04l7j3hwmmj28w23m7paca0afzncs42j2mdr3liqq8kvp548sc6x"))))
6706 (build-system ant-build-system)
6708 `(#:jar-name "osgi-util-function.jar"
6709 #:tests? #f)); no tests
6711 `(("annotation" ,java-osgi-annotation)))
6712 (home-page "https://www.osgi.org")
6713 (synopsis "OSGI Util Function")
6715 "OSGi, for Open Services Gateway initiative framework, is a module system
6716 and service platform for the Java programming language. This package contains
6717 an interface for a function that accepts a single argument and produces a result.")
6718 (license license:asl2.0)))
6720 (define-public java-osgi-util-promise
6722 (name "java-osgi-util-promise")
6726 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6727 "org.osgi.util.promise/"
6728 version "/org.osgi.util.promise-"
6729 version "-sources.jar"))
6732 "0y34dwiflg1c4ahvkswpf9z02xph2sr9fm04ia5493x3lshpw22c"))))
6733 (build-system ant-build-system)
6735 `(#:jar-name "osgi-util-promise.jar"
6736 #:tests? #f)); no tests
6738 `(("annotation" ,java-osgi-annotation)
6739 ("function" ,java-osgi-util-function)))
6740 (home-page "https://www.osgi.org")
6741 (synopsis "Promise of a value")
6743 "OSGi, for Open Services Gateway initiative framework, is a module system
6744 and service platform for the Java programming language. This package contains
6745 an interface and utilitary classes for promises. A Promise represents a future
6746 value. It handles the interactions for asynchronous processing.")
6747 (license license:asl2.0)))
6749 (define-public java-osgi-service-metatype-annotations
6751 (name "java-osgi-service-metatype-annotations")
6755 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6756 "org.osgi.service.metatype.annotations/"
6757 version "/org.osgi.service.metatype.annotations-"
6758 version "-sources.jar"))
6761 "12rwm3349wk80vm88rcdgs4435m4jxkpkj5mrx326skkz2c6hyw6"))))
6762 (build-system ant-build-system)
6764 `(#:jar-name "osgi-service-metatype-annotations.jar"
6765 #:tests? #f)); no tests
6767 `(("annotation" ,java-osgi-annotation)))
6768 (home-page "https://www.osgi.org")
6769 (synopsis "Support annotations for metatype")
6771 "OSGi, for Open Services Gateway initiative framework, is a module system
6772 and service platform for the Java programming language. This package contains
6773 the support annotations for metatype.")
6774 (license license:asl2.0)))
6776 (define-public java-osgi-service-repository
6778 (name "java-osgi-service-repository")
6782 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6783 "org.osgi.service.repository/"
6784 version "/org.osgi.service.repository-"
6785 version "-sources.jar"))
6788 "1k41mhg7b58pd8nsghr2qwcjrxdnf1p9spsw9v11k4257g6rl06n"))))
6789 (build-system ant-build-system)
6791 `(#:jar-name "osgi-service-repository.jar"
6792 #:tests? #f)); no tests
6794 `(("annotation" ,java-osgi-annotation)
6795 ("promise" ,java-osgi-util-promise)
6796 ("resource" ,java-osgi-resource)))
6797 (home-page "https://www.osgi.org")
6798 (synopsis "OSGI service repository")
6800 "OSGi, for Open Services Gateway initiative framework, is a module system
6801 and service platform for the Java programming language. This package contains
6802 a repository service that contains resources.")
6803 (license license:asl2.0)))
6805 (define-public java-osgi-framework
6807 (name "java-osgi-framework")
6811 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6812 "org.osgi.framework/" version "/org.osgi.framework-"
6813 version "-sources.jar"))
6816 "1lwp2zfad3rybcc6q9bwz8xsgkc92ypzy5p6x54387f1qj65m73s"))))
6817 (build-system ant-build-system)
6819 `(#:jar-name "osgi-framework.jar"
6820 #:tests? #f)); no tests
6822 `(("annotation" ,java-osgi-annotation)
6823 ("resource" ,java-osgi-resource)
6824 ("dto" ,java-osgi-dto)))
6825 (home-page "https://www.osgi.org")
6826 (synopsis "OSGi framework")
6828 "OSGi, for Open Services Gateway initiative framework, is a module system
6829 and service platform for the Java programming language.")
6830 (license license:asl2.0)))
6832 (define-public java-osgi-service-log
6834 (name "java-osgi-service-log")
6838 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6839 "org.osgi.service.log/"
6840 version "/org.osgi.service.log-"
6841 version "-sources.jar"))
6844 "1029j30dzcwializzca0j3fkhwwz08kmmsha5agw1iccscimj6r0"))))
6845 (build-system ant-build-system)
6847 `(#:jar-name "osgi-service-log.jar"
6848 #:tests? #f)); no tests
6850 `(("java-osgi-framework" ,java-osgi-framework)))
6851 (home-page "https://www.osgi.org")
6852 (synopsis "Provides methods for bundles to write messages to the log")
6854 "OSGi, for Open Services Gateway initiative framework, is a module system
6855 and service platform for the Java programming language. This package contains
6857 (license license:asl2.0)))
6859 (define-public java-osgi-service-jdbc
6861 (name "java-osgi-service-jdbc")
6865 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6866 "org.osgi.service.jdbc/"
6867 version "/org.osgi.service.jdbc-"
6868 version "-sources.jar"))
6871 "11iln5v7bk469cgb9ddkrz9sa95b3733gqgaqw9xf5g6wq652yjz"))))
6872 (build-system ant-build-system)
6874 `(#:jar-name "osgi-service-jdbc.jar"
6875 #:tests? #f)); no tests
6876 (home-page "https://www.osgi.org")
6877 (synopsis "Factory for JDBC connection factories")
6879 "OSGi, for Open Services Gateway initiative framework, is a module system
6880 and service platform for the Java programming language. This package contains
6881 a factory for JDBC connection factories. There are 3 preferred connection
6882 factories for getting JDBC connections:
6885 @item @code{javax.sql.DataSource};
6886 @item @code{javax.sql.ConnectionPoolDataSource};
6887 @item @code{javax.sql.XADataSource}.
6889 (license license:asl2.0)))
6891 (define-public java-osgi-service-resolver
6893 (name "java-osgi-service-resolver")
6897 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6898 "org.osgi.service.resolver/"
6899 version "/org.osgi.service.resolver-"
6900 version "-sources.jar"))
6903 "1dzqn1ryfi2rq4zwsgp44bmj2wlfydjg1qbxw2b0z4xdjjy55vxd"))))
6904 (build-system ant-build-system)
6906 `(#:jar-name "osgi-service-resolver.jar"
6907 #:tests? #f)); no tests
6909 `(("annotation" ,java-osgi-annotation)
6910 ("resource" ,java-osgi-resource)))
6911 (home-page "https://www.osgi.org")
6912 (synopsis "OSGI Resolver service")
6914 "OSGi, for Open Services Gateway initiative framework, is a module system
6915 and service platform for the Java programming language. This package contains
6916 a resolver service that resolves the specified resources in the context supplied
6918 (license license:asl2.0)))
6920 (define-public java-osgi-util-tracker
6922 (name "java-osgi-util-tracker")
6926 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6927 "org.osgi.util.tracker/"
6928 version "/org.osgi.util.tracker-"
6929 version "-sources.jar"))
6932 "0c4fh9vxwzsx59r8dygda0gq2gx3z5vfhc3jsphlqwf5w0h403lz"))))
6933 (build-system ant-build-system)
6935 `(#:jar-name "osgi-util-tracker.jar"
6936 #:tests? #f)); no tests
6938 `(("framework" ,java-osgi-framework)
6939 ("annotation" ,java-osgi-annotation)))
6940 (home-page "https://www.osgi.org")
6941 (synopsis "Bundle tracking")
6943 "OSGi, for Open Services Gateway initiative framework, is a module system
6944 and service platform for the Java programming language. This package contains
6945 bundle tracking utility classes.")
6946 (license license:asl2.0)))
6948 (define-public java-osgi-service-cm
6950 (name "java-osgi-service-cm")
6954 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6955 "org.osgi.service.cm/"
6956 version "/org.osgi.service.cm-"
6957 version "-sources.jar"))
6960 "1z8kap48y3xi0ggj8v6czglfnpnd94mmismgi2wbqhj1nl5fzbp6"))))
6961 (build-system ant-build-system)
6963 `(#:jar-name "osgi-service-cm.jar"
6964 #:tests? #f)); no tests
6966 `(("framework" ,java-osgi-framework)
6967 ("annotation" ,java-osgi-annotation)))
6968 (home-page "https://www.osgi.org")
6969 (synopsis "OSGI Configuration Management")
6971 "OSGi, for Open Services Gateway initiative framework, is a module system
6972 and service platform for the Java programming language. This package contains
6973 utility classes for the configuration of services.")
6974 (license license:asl2.0)))
6976 (define-public java-osgi-service-packageadmin
6978 (name "java-osgi-service-packageadmin")
6982 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6983 "org.osgi.service.packageadmin/"
6984 version "/org.osgi.service.packageadmin-"
6985 version "-sources.jar"))
6988 "041mpxzi7g36wmcily6y4ccn3jx15akpdy8gmhyb7m98x7qfvn52"))))
6989 (build-system ant-build-system)
6991 `(#:jar-name "osgi-service-packageadmin.jar"
6992 #:tests? #f)); no tests
6994 `(("framework" ,java-osgi-framework)))
6995 (home-page "https://www.osgi.org")
6996 (synopsis "OSGI Package Administration")
6998 "OSGi, for Open Services Gateway initiative framework, is a module system
6999 and service platform for the Java programming language. This package contains
7000 the packageadmin service.")
7001 (license license:asl2.0)))
7003 (define-public java-ops4j-base-lang
7005 (name "java-ops4j-base-lang")
7009 (uri (string-append "https://github.com/ops4j/org.ops4j.base/"
7010 "archive/base-" version ".tar.gz"))
7013 "18hl3lpchgpv8yh5rlk39l2gif5dlfgb8gxjmncf39pr2dprkniw"))))
7014 (build-system ant-build-system)
7016 `(#:jar-name "java-ops4j-base-lang.jar"
7017 #:source-dir "ops4j-base-lang/src/main/java"
7018 #:tests? #f; no tests
7020 (modify-phases %standard-phases
7021 (add-before 'build 'add-test-file
7023 ;; That file is required by a test in ops4j-pax-exam-core-spi
7024 (mkdir-p "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang")
7025 (with-output-to-file "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang/pom.properties"
7029 "version=" ,version "\n"
7030 "groupId=org.ops4j.base"
7031 "artifactId=ops4j-base-lang\n"))))
7033 (home-page "https://ops4j1.jira.com/wiki/spaces/base/overview")
7034 (synopsis "Utility classes and extensions to be used in OPS4J projects")
7035 (description "OPS4J stands for Open Participation Software for Java. This
7036 package contains utilities and extensions related to @code{java.lang}.")
7037 (license license:asl2.0)))
7039 (define-public java-ops4j-base-monitors
7041 (inherit java-ops4j-base-lang)
7042 (name "java-ops4j-base-monitors")
7044 `(#:jar-name "java-ops4j-base-monitors.jar"
7045 #:source-dir "ops4j-base-monitors/src/main/java"
7046 #:tests? #f)); no tests
7048 `(("lang" ,java-ops4j-base-lang)))
7049 (description "OPS4J stands for Open Participation Software for Java. This
7050 package contains utilities and extensions related to monitoring.")))
7052 (define-public java-ops4j-base-io
7054 (inherit java-ops4j-base-lang)
7055 (name "java-ops4j-base-io")
7057 `(#:jar-name "java-ops4j-base-io.jar"
7058 #:source-dir "ops4j-base-io/src/main/java"
7059 #:test-dir "ops4j-base-io/src/test"
7061 (list "**/ListerTest.java")))
7063 `(("lang" ,java-ops4j-base-monitors)
7064 ("lang" ,java-ops4j-base-lang)))
7066 `(("junit" ,java-junit)
7067 ("hamcrest" ,java-hamcrest-core)))
7068 (description "OPS4J stands for Open Participation Software for Java. This
7069 package contains utilities and extensions related to handling streams and files.")))
7071 (define-public java-ops4j-base-util
7073 (inherit java-ops4j-base-lang)
7074 (name "java-ops4j-base-util")
7076 `(#:jar-name "java-ops4j-base-util.jar"
7077 #:source-dir "ops4j-base-util/src/main/java"
7078 #:test-dir "ops4j-base-util/src/test"))
7080 `(("lang" ,java-ops4j-base-lang)))
7082 `(("junit" ,java-junit)))
7083 (description "OPS4J stands for Open Participation Software for Java. This
7084 package contains utilities and extensions related to environment, i18n and
7087 (define-public java-ops4j-base-util-property
7089 (inherit java-ops4j-base-lang)
7090 (name "java-ops4j-base-util-property")
7092 `(#:jar-name "java-ops4j-base-util-property.jar"
7093 #:source-dir "ops4j-base-util-property/src/main/java"
7094 #:tests? #f)); no tests
7096 `(("lang" ,java-ops4j-base-lang)
7097 ("util" ,java-ops4j-base-util)))
7098 (description "OPS4J stands for Open Participation Software for Java. This
7099 package contains utilities and extensions related to resolving properties from
7100 different sources.")))
7102 (define-public java-ops4j-base-store
7104 (inherit java-ops4j-base-lang)
7105 (name "java-ops4j-base-store")
7107 `(#:jar-name "java-ops4j-base-store.jar"
7108 #:source-dir "ops4j-base-store/src/main/java"
7109 #:tests? #f)); no tests
7111 `(("lang" ,java-ops4j-base-lang)
7112 ("slf4j" ,java-slf4j-api)
7113 ("io" ,java-ops4j-base-io)))
7114 (description "OPS4J stands for Open Participation Software for Java. This
7115 package contains utilities for storing and retrieving data from an
7116 @code{InputStream}.")))
7118 (define-public java-ops4j-base-spi
7120 (inherit java-ops4j-base-lang)
7121 (name "java-ops4j-base-spi")
7123 `(#:jar-name "java-ops4j-base-spi.jar"
7124 #:source-dir "ops4j-base-spi/src/main/java"
7125 #:test-dir "ops4j-base-spi/src/test"))
7127 `(("junit" ,java-junit)
7128 ("hamcrest" ,java-hamcrest-core)))
7129 (description "OPS4J stands for Open Participation Software for Java. This
7130 package contains utilities for obtaining services via the Java SE 6
7131 @code{ServiceLoader}.")))
7133 (define-public java-aqute-bnd-annotation
7135 (name "java-aqute-bnd-annotation")
7139 (uri (string-append "https://github.com/bndtools/bnd/archive/"
7140 version ".REL.tar.gz"))
7141 (file-name (string-append name "-" version ".tar.gz"))
7144 "1ggyiq0as0f6cz333a0dh98j72kmvv5pf2s47v9554yh905lfqdl"))))
7145 (build-system ant-build-system)
7147 `(#:jar-name "java-aqute-bnd-annotation.jar"
7148 #:source-dir "biz.aQute.bnd.annotation/src"
7149 #:tests? #f)); empty test dir
7150 (home-page "http://bnd.bndtools.org/")
7151 (synopsis "Tools for OSGi")
7152 (description "Bnd is a swiss army knife for OSGi, it creates manifest
7153 headers based on analyzing the class code, it verifies the project settings,
7154 it manages project dependencies, gives diffs jars, and much more.")
7155 (license license:asl2.0)))
7157 (define-public java-aqute-libg
7159 (inherit java-aqute-bnd-annotation)
7160 (name "java-aqute-libg")
7162 `(#:jar-name "java-aqute-libg.jar"
7163 ;; The build fails when source/target more recent than 1.7. This
7164 ;; is a known issue. See: https://github.com/bndtools/bnd/issues/1327
7166 ;; It is closed as won't fix. There is no way to change the source
7167 ;; so that it works on 1.8, and still works on 1.6, the upstream
7168 ;; target. It work fine on 1.7, so we use 1.7.
7169 #:make-flags (list "-Dant.build.javac.source=1.7"
7170 "-Dant.build.javac.target=1.7")
7172 (modify-phases %standard-phases
7173 (add-before 'configure 'chdir
7174 ;; Change to aQute.libg directory, so that the relative
7175 ;; paths in the tests aren't broken.
7177 (chdir "aQute.libg")
7179 (add-before 'check 'create-test-directory
7180 ;; Copy the test directory to test/java, since that's where
7181 ;; ant-build-system's default project in build.xml expects to find
7182 ;; the test classes. Leave a copy in the original place to not
7183 ;; break paths in tests.
7186 (copy-recursively "test" "src/test/java")
7189 `(("slf4j" ,java-slf4j-api)
7190 ("osgi-annot" ,java-osgi-annotation)
7191 ("java-osgi-cmpn" ,java-osgi-cmpn)
7192 ("osgi" ,java-osgi-core)))
7194 `(("hamcrest" ,java-hamcrest-core)
7195 ("java-junit" ,java-junit)))))
7197 (define java-aqute-libg-bootstrap
7199 (inherit java-aqute-libg)
7200 (name "java-aqute-libg-bootstrap")
7202 ;; Disable tests, at this stage of bootstrap we have no test frameworks.
7203 (substitute-keyword-arguments (package-arguments java-aqute-libg)
7204 ((#:tests? _ #f) #f)))
7206 `(("slf4j-bootstrap" ,java-slf4j-api-bootstrap)
7207 ,@(delete `("slf4j" ,java-slf4j-api)
7208 (package-inputs java-aqute-libg))))
7209 (native-inputs '())))
7211 (define-public java-aqute-bndlib
7213 (inherit java-aqute-bnd-annotation)
7214 (name "java-aqute-bndlib")
7216 `(#:jar-name "java-bndlib.jar"
7217 #:source-dir "biz.aQute.bndlib/src"
7218 #:tests? #f)); no tests
7220 `(("slf4j" ,java-slf4j-api)
7221 ("osgi-annot" ,java-osgi-annotation)
7222 ("java-aqute-libg" ,java-aqute-libg)
7223 ("java-aqute-bnd-annotation" ,java-aqute-bnd-annotation)
7224 ("java-osgi-service-component-annotations" ,java-osgi-service-component-annotations)
7225 ("java-osgi-service-repository" ,java-osgi-service-repository)
7226 ("java-osgi-service-log" ,java-osgi-service-log)
7227 ("java-osgi-service-metatype-annotations" ,java-osgi-service-metatype-annotations)
7228 ("java-osgi-namespace-contract" ,java-osgi-namespace-contract)
7229 ("java-osgi-namespace-extender" ,java-osgi-namespace-extender)
7230 ("java-osgi-namespace-service" ,java-osgi-namespace-service)
7231 ("promise" ,java-osgi-util-promise)
7232 ("osgi" ,java-osgi-core)))))
7234 (define java-aqute-bndlib-bootstrap
7236 (inherit java-aqute-bndlib)
7237 (name "java-aqute-bndlib-bootstrap")
7239 `(("slf4j-bootstrap" ,java-slf4j-api-bootstrap)
7240 ("java-aqute-libg-bootstrap" ,java-aqute-libg-bootstrap)
7241 ,@(delete `("slf4j" ,java-slf4j-api)
7242 (delete `("java-aqute-libg" ,java-aqute-libg)
7243 (package-inputs java-aqute-bndlib)))))))
7245 (define-public java-ops4j-pax-tinybundles
7247 (name "java-ops4j-pax-tinybundles")
7251 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.tinybundles/"
7252 "archive/tinybundles-" version ".tar.gz"))
7255 "0y0gq3pvv0iir2b885lmlwnvr724vv7vklzhhr4fs27d7mdkj871"))))
7257 `(#:jar-name "java-ops4j-pax-tinybundles.jar"
7258 #:source-dir "src/main/java"
7260 ;; Abstract base classes for other tests
7261 (list "**/BndTest.java" "**/CoreTest.java")
7263 (modify-phases %standard-phases
7264 (add-before 'check 'fix-version
7266 ;; This test has a reference to an old version of bndlib we are not
7267 ;; packaging. It uses the version referenced in pom.xml. We replace
7268 ;; it with our own version.
7269 (substitute* "src/test/java/org/ops4j/pax/tinybundles/bnd/BndTest.java"
7270 (("[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*")
7271 ,(package-version java-aqute-bndlib)))
7274 `(("lang" ,java-ops4j-base-lang)
7275 ("io" ,java-ops4j-base-io)
7276 ("store" ,java-ops4j-base-store)
7277 ("slf4j" ,java-slf4j-api)
7278 ("libg" ,java-aqute-libg)
7279 ("bndlib" ,java-aqute-bndlib)))
7281 `(("junit" ,java-junit)
7282 ("hamcrest" ,java-hamcrest-core)
7283 ("log4j" ,java-log4j-api)
7284 ("bndannotation" ,java-aqute-bnd-annotation)
7285 ("framework" ,java-osgi-framework)))
7286 (build-system ant-build-system)
7287 (home-page "https://ops4j1.jira.com/wiki/spaces/ops4j/pages/12060312/Tinybundles")
7288 (synopsis "Java APIs to create OSGi related artifacts")
7289 (description "Tinybundles is all about creating OSGi related artifacts like
7290 Bundles, Fragments and Deployment Packages with Java Api. It is very convinient
7291 to create such artifacts on-the-fly inside Tests (like in Pax Exam). On the
7292 other hand, this library can be a foundation of real end user tools that need
7293 to create those artifacts.")
7294 (license license:asl2.0)))
7296 (define-public java-ops4j-pax-exam-core
7298 (name "java-ops4j-pax-exam-core")
7302 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.exam2/"
7303 "archive/exam-reactor-" version ".tar.gz"))
7306 "08mzw8nkah3rj3vznlplnawspxhp61zgvb44ifqa1rni1cvbms2g"))))
7308 `(#:jar-name "java-ops4j-pax-exam-core.jar"
7309 #:source-dir "core/pax-exam/src/main/java"
7310 #:test-dir "core/pax-exam/src/test"))
7312 `(("slf4j" ,java-slf4j-api)
7313 ("lang" ,java-ops4j-base-lang)
7314 ("io" ,java-ops4j-base-io)
7315 ("util-property" ,java-ops4j-base-util-property)
7316 ("util-store" ,java-ops4j-base-store)
7317 ("java-osgi-core" ,java-osgi-core)))
7319 `(("junit" ,java-junit)
7320 ("hamcrest" ,java-hamcrest-core)))
7321 (build-system ant-build-system)
7322 (home-page "https://ops4j1.jira.com/wiki/spaces/PAXEXAM4/overview")
7323 (synopsis "In-Container Testing for OSGi, Java EE and CDI")
7324 (description "Pax Exam creates OSGi bundles for testing purposes. It lets
7325 the user take control of the OSGi framework, the test framework (e.g. JUnit) and
7326 the system under test at the same time.")
7327 (license license:asl2.0)))
7329 (define-public java-ops4j-pax-exam-core-spi
7331 (inherit java-ops4j-pax-exam-core)
7332 (name "java-ops4j-pax-exam-core-spi")
7334 `(#:jar-name "java-ops4j-pax-exam-spi.jar"
7335 #:source-dir "src/main/java"
7338 ;; Abstract base class, not a test
7339 "**/BaseStagedReactorTest.java"
7340 ;; Depends on org.mortbay.jetty.testwars:test-war-dump
7341 "**/WarBuilderTest.java")
7343 (modify-phases %standard-phases
7344 (add-before 'configure 'chdir
7346 ;; Tests assume we are in this directory
7347 (chdir "core/pax-exam-spi")
7349 (add-before 'check 'fix-tests
7351 ;; One test checks that this file is present.
7352 (mkdir-p "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi")
7353 (with-output-to-file
7354 "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi/pom.properties"
7357 (string-append "artifactId = pax-exam-spi\n"
7358 "version = " ,(package-version java-ops4j-pax-exam-core-spi)))))
7359 ;; Maven puts compilation results in the target directory, while we
7360 ;; put them in the build directory.
7361 (substitute* '("src/test/java/org/ops4j/pax/exam/spi/war/WarBuilderTest.java"
7362 "src/test/java/org/ops4j/pax/exam/spi/war/WarTestProbeBuilderTest.java"
7363 "src/test/java/org/ops4j/pax/exam/spi/war/ZipBuilderTest.java")
7364 (("target") "build"))
7365 ;; One test is expected to fail, but it doesn't throw the expected exception
7366 (substitute* "src/test/java/org/ops4j/pax/exam/spi/reactors/BaseStagedReactorTest.java"
7367 (("AssertionError") "IllegalArgumentException"))
7370 `(("java-ops4j-pax-exam-core" ,java-ops4j-pax-exam-core)
7371 ("lang" ,java-ops4j-base-lang)
7372 ("monitors" ,java-ops4j-base-monitors)
7373 ("store" ,java-ops4j-base-store)
7374 ("io" ,java-ops4j-base-io)
7375 ("spi" ,java-ops4j-base-spi)
7376 ("osgi" ,java-osgi-core)
7377 ("slf4j" ,java-slf4j-api)
7378 ("tinybundles" ,java-ops4j-pax-tinybundles)))
7380 `(("mockito" ,java-mockito-1)
7381 ("junit" ,java-junit)
7382 ("hamcrest" ,java-hamcrest-core)
7383 ("cglib" ,java-cglib)
7384 ("objenesis" ,java-objenesis)
7385 ("asm" ,java-asm)))))
7387 (define-public java-ops4j-pax-exam-core-junit
7389 (inherit java-ops4j-pax-exam-core)
7390 (name "java-ops4j-pax-exam-core-junit")
7392 `(#:jar-name "ops4j-pax-exam-core-junit.jar"
7393 #:source-dir "drivers/pax-exam-junit4/src/main/java"
7394 #:tests? #f)); no tests
7396 `(("junit" ,java-junit)
7397 ("slf4j" ,java-slf4j-api)
7398 ("core" ,java-ops4j-pax-exam-core)
7399 ("spi" ,java-ops4j-pax-exam-core-spi)))
7400 (native-inputs '())))
7402 (define-public java-fasterxml-jackson-annotations
7404 (name "java-fasterxml-jackson-annotations")
7408 (uri (string-append "https://github.com/FasterXML/"
7409 "jackson-annotations/archive/"
7410 "jackson-annotations-" version ".tar.gz"))
7413 "0mr95xd0da6a4g95zvrl1ryk5n5zv2rc696w3xnsr5hxk2gicfc4"))))
7414 (build-system ant-build-system)
7416 `(#:jar-name "jackson-annotations.jar"
7417 #:source-dir "src/main/java"
7418 #:test-dir "src/test"))
7420 `(("junit" ,java-junit)))
7421 (home-page "https://github.com/FasterXML/jackson-annotations")
7422 (synopsis "General purpose annotations for the Jackson Data Processor")
7423 (description "This package contains general purpose annotations for the
7424 Jackson Data Processor, used on value and handler types. The only annotations
7425 not included are ones that require dependency to the Databind package.")
7426 (license license:asl2.0)))
7428 (define-public java-fasterxml-jackson-core
7430 (name "java-fasterxml-jackson-core")
7434 (uri (string-append "https://github.com/FasterXML/"
7435 "jackson-core/archive/"
7436 "jackson-core-" version ".tar.gz"))
7439 "159hsnk17jr1gyzkf01cxvsn45srnk37g949r7364qlsr527gjgd"))))
7440 (build-system ant-build-system)
7442 `(#:jar-name "jackson-core.jar"
7443 #:source-dir "src/main/java"
7444 #:test-dir "src/test"
7447 ;; Expected failure. pom.xml excludes these
7449 ;; Base classes that have no constructor for junit
7451 "**/ConcurrencyReadTest.java"
7452 "**/ManualCharAccessTest.java"
7453 "**/ManualCharAccessTest.java"
7454 "**/TrailingCommasTest.java"
7455 "**/AsyncMissingValuesInObjectTest.java"
7456 "**/AsyncMissingValuesInArrayTest.java")
7458 (modify-phases %standard-phases
7459 (add-before 'configure 'generate-PackageVersion.java
7461 (let* ((out "src/main/java/com/fasterxml/jackson/core/json/PackageVersion.java")
7462 (in (string-append out ".in")))
7465 (("@package@") "com.fasterxml.jackson.core.json")
7466 (("@projectversion@") ,version)
7467 (("@projectgroupid@") "com.fasterxml.jackson.core")
7468 (("@projectartifactid@") "jackson-core")))
7470 (add-before 'build 'copy-resources
7472 (copy-recursively "src/main/resources"
7475 (add-before 'check 'copy-test-resources
7477 (copy-recursively "src/test/resources"
7478 "build/test-classes")
7481 `(("junit" ,java-junit)
7482 ("hamcrest" ,java-hamcrest-core)))
7483 (home-page "https://github.com/FasterXML/jackson-core")
7486 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
7488 (define-public java-fasterxml-jackson-databind
7490 (name "java-fasterxml-jackson-databind")
7494 (uri (string-append "https://github.com/FasterXML/"
7495 "jackson-databind/archive/"
7496 "jackson-databind-" version ".tar.gz"))
7499 "1zd2cw4z6kdkbx8za96xh9pyicv2a2l7y0rkcx2fqd8hv6d47s08"))))
7500 (build-system ant-build-system)
7502 `(#:jar-name "jackson-databind.jar"
7503 #:source-dir "src/main/java"
7504 #:tests? #f; requires javax.measures for which I can't find a free implementation
7506 (modify-phases %standard-phases
7507 (add-before 'configure 'generate-PackageVersion.java
7509 (let* ((out "src/main/java/com/fasterxml/jackson/databind/cfg/PackageVersion.java")
7510 (in (string-append out ".in")))
7513 (("@package@") "com.fasterxml.jackson.databind.cfg")
7514 (("@projectversion@") ,version)
7515 (("@projectgroupid@") "com.fasterxml.jackson.databind")
7516 (("@projectartifactid@") "jackson-databind")))
7518 (add-before 'build 'copy-resources
7520 (copy-recursively "src/main/resources" "build/classes")
7523 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
7524 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)))
7525 (home-page "https://github.com/FasterXML/jackson-databind")
7526 (synopsis "Data-binding functionality and tree-model for the Jackson Data Processor")
7527 (description "This package contains the general-purpose data-binding
7528 functionality and tree-model for Jackson Data Processor. It builds on core
7529 streaming parser/generator package, and uses Jackson Annotations for
7531 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
7533 (define-public java-fasterxml-jackson-modules-base-jaxb
7535 (name "java-fasterxml-jackson-modules-base-jaxb")
7539 (uri (string-append "https://github.com/FasterXML/"
7540 "jackson-modules-base/archive/"
7541 "jackson-modules-base-" version ".tar.gz"))
7544 "1wws95xi8sppp6b0k2vvjdjyynl20r1a4dwrhai08lzlria6blp5"))))
7545 (build-system ant-build-system)
7547 `(#:jar-name "jackson-modules-base-jaxb.jar"
7548 #:source-dir "jaxb/src/main/java"
7549 #:test-dir "jaxb/src/test"
7551 ;; Base class for tests
7552 (list "**/BaseJaxbTest.java")
7554 (modify-phases %standard-phases
7555 (add-before 'configure 'generate-PackageVersion.java
7557 (let* ((out (string-append "jaxb/src/main/java/com/fasterxml/"
7558 "jackson/module/jaxb/PackageVersion.java"))
7559 (in (string-append out ".in")))
7562 (("@package@") "com.fasterxml.jackson.module.jaxb")
7563 (("@projectversion@") ,version)
7564 (("@projectgroupid@") "com.fasterxml.jackson.module.jaxb")
7565 (("@projectartifactid@") "jackson-module-jaxb")))
7567 (add-before 'build 'copy-resources
7569 (copy-recursively "jaxb/src/main/resources" "build/classes")
7572 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
7573 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
7574 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)))
7576 `(("java-junit" ,java-junit)))
7577 (home-page "https://github.com/FasterXML/jackson-modules-base")
7578 (synopsis "Jaxb annotations jackson module")
7579 (description "This package is the jaxb annotations module for jackson.")
7580 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
7582 (define-public java-snakeyaml
7584 (name "java-snakeyaml")
7588 (uri (string-append "https://bitbucket.org/asomov/snakeyaml/get/v"
7590 (file-name (string-append name "-" version ".tar.gz"))
7593 "0rf5ha6w0waz50jz2479jsrbgmd0dnx0gs337m126j5z7zlmg7mg"))))
7594 (build-system ant-build-system)
7596 `(#:jar-name "java-snakeyaml.jar"
7597 #:source-dir "src/main/java"
7598 ;; Tests require velocity, a cyclic dependency, and
7599 ;; java-spring-framework-context which is not packaged.
7601 (home-page "https://bitbucket.org/asomov/snakeyaml")
7602 (synopsis "YAML processor")
7603 (description "SnakeYAML is a YAML processor for the Java Virtual Machine.")
7604 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
7606 (define-public java-fasterxml-jackson-dataformat-yaml
7608 (name "java-fasterxml-jackson-dataformat-yaml")
7612 (uri (string-append "https://github.com/FasterXML/"
7613 "jackson-dataformats-text/archive/"
7614 "jackson-dataformats-text-" version ".tar.gz"))
7617 "1hikl06khaxbg439avf442qifcadap8w0lx13f0nnhp2vh3dkbz7"))))
7618 (build-system ant-build-system)
7620 `(#:jar-name "jackson-dataformat-yaml.jar"
7621 #:source-dir "yaml/src/main/java"
7622 #:test-dir "yaml/src/test"
7623 #:test-exclude (list "**/failing/**.java")
7625 (modify-phases %standard-phases
7626 (add-before 'configure 'generate-PackageVersion.java
7628 (let* ((out "yaml/src/main/java/com/fasterxml/jackson/dataformat/yaml/PackageVersion.java")
7629 (in (string-append out ".in")))
7632 (("@package@") "com.fasterxml.jackson.dataformat.yaml")
7633 (("@projectversion@") ,version)
7634 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.yaml")
7635 (("@projectartifactid@") "jackson-dataformat-yaml")))
7638 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
7639 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
7640 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)
7641 ("java-snakeyaml" ,java-snakeyaml)))
7643 `(("junit" ,java-junit)
7644 ("hamcrest" ,java-hamcrest-core)
7645 ("java-ops4j-pax-exam-core-spi" ,java-ops4j-pax-exam-core-spi)
7646 ("java-ops4j-pax-exam-core-junit" ,java-ops4j-pax-exam-core-junit)
7647 ("java-ops4j-pax-exam" ,java-ops4j-pax-exam-core)))
7648 (home-page "https://github.com/FasterXML/jackson-dataformats-text")
7649 (synopsis "Yaml backend for Jackson")
7650 (description "Dataformat backends are used to support format alternatives
7651 to JSON, supported by default. This is done by sub-classing Jackson core
7653 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
7655 (define-public java-stax2-api
7657 (name "java-stax2-api")
7661 (uri (string-append "https://github.com/FasterXML/stax2-api/archive/"
7662 "stax2-api-" version ".tar.gz"))
7665 "1amc1si0l0hyyw2sawmnzy4hkna3z6fp195y4nm5m9wb9ld5awkq"))))
7666 (build-system ant-build-system)
7668 `(#:jar-name "java-stax2-api.jar"
7669 #:source-dir "src/main/java"
7670 #:tests? #f)); no tests
7671 (home-page "https://github.com/FasterXML/stax2-api")
7672 (synopsis "Stax2 API")
7673 (description "Stax2 API is an extension to basic Stax 1.0 API that adds
7674 significant new functionalities, such as full-featured bi-direction validation
7675 interface and high-performance Typed Access API.")
7676 (license license:bsd-2)))
7678 (define-public java-woodstox-core
7680 (name "java-woodstox-core")
7684 (uri (string-append "https://github.com/FasterXML/woodstox/archive/"
7685 "woodstox-core-" version ".tar.gz"))
7688 "1i7pdgb8jbw6gdy5kmm0l6rz109n2ns92pqalpyp24vb8vlvdfd4"))))
7689 (build-system ant-build-system)
7691 `(#:jar-name "woodstox.jar"
7693 (list "**/Base*.java" "failing/**")
7695 (modify-phases %standard-phases
7696 (add-before 'build 'remove-msv-dep
7698 ;; we don't need osgi, and it depends on msv
7699 (delete-file-recursively "src/main/java/com/ctc/wstx/osgi")
7700 ;; msv's latest release is from 2011 and we don't need it
7701 (delete-file-recursively "src/main/java/com/ctc/wstx/msv")
7702 (delete-file-recursively "src/test/java/wstxtest/osgi")
7703 (delete-file-recursively "src/test/java/wstxtest/msv")
7705 (add-before 'build 'copy-resources
7707 (copy-recursively "src/main/resources" "build/classes")
7710 `(("stax2" ,java-stax2-api)))
7712 `(("junit" ,java-junit)))
7713 (home-page "https://github.com/FasterXML/woodstox")
7714 (synopsis "Stax XML API implementation")
7715 (description "Woodstox is a stax XML API implementation.")
7716 (license license:asl2.0)))
7718 (define-public java-fasterxml-jackson-dataformat-xml
7720 (name "java-fasterxml-jackson-dataformat-xml")
7724 (uri (string-append "https://github.com/FasterXML/"
7725 "jackson-dataformat-xml/archive/"
7726 "jackson-dataformat-xml-" version ".tar.gz"))
7729 "111fkkl90w31jbf30kgj82qdcxlw4sxppki7i198liw0ck1jcavq"))))
7730 (build-system ant-build-system)
7732 `(#:jar-name "jackson-dataformat-xml.jar"
7733 #:source-dir "src/main/java"
7735 (list "**/failing/**")
7737 (modify-phases %standard-phases
7738 (add-before 'configure 'generate-PackageVersion.java
7740 (let* ((out "src/main/java/com/fasterxml/jackson/dataformat/xml/PackageVersion.java")
7741 (in (string-append out ".in")))
7745 (("@package@") "com.fasterxml.jackson.dataformat.xml")
7746 (("@projectversion@") ,version)
7747 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.xml")
7748 (("@projectartifactid@") "jackson-dataformat-xml")))
7750 (add-before 'build 'copy-resources
7752 (copy-recursively "src/main/resources" "build/classes")
7755 `(("jackson-annotations" ,java-fasterxml-jackson-annotations)
7756 ("jackson-core" ,java-fasterxml-jackson-core)
7757 ("jackson-modules-base-jaxb" ,java-fasterxml-jackson-modules-base-jaxb)
7758 ("jackson-databind" ,java-fasterxml-jackson-databind)
7759 ("stax2-api" ,java-stax2-api)
7760 ("woodstox" ,java-woodstox-core)))
7762 `(("junit" ,java-junit)
7763 ("hamcrest" ,java-hamcrest-core)))
7764 (home-page "https://github.com/FasterXML/jackson-dataformat-xml")
7765 (synopsis "Read and write XML")
7766 (description "This package contains Jackson extension component for reading
7767 and writing XML encoded data.
7769 Further, the goal is to emulate how JAXB data-binding works with \"Code-first\"
7770 approach (that is, no support is added for \"Schema-first\" approach). Support
7771 for JAXB annotations is provided by JAXB annotation module; this module
7772 provides low-level abstractions (@code{JsonParser}, @code{JsonGenerator},
7773 @code{JsonFactory}) as well as small number of higher level overrides needed to
7774 make data-binding work.")
7775 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
7777 (define-public java-hdrhistogram
7779 (name "java-hdrhistogram")
7783 (uri (string-append "https://github.com/HdrHistogram/HdrHistogram/"
7784 "archive/HdrHistogram-" version ".tar.gz"))
7787 "1sicbmc3sr42nw93qbkb26q9rn33ag33k6k77phjc3j5h5gjffqv"))))
7788 (build-system ant-build-system)
7790 `(#:jar-name "java-hdrhistogram.jar"
7791 #:source-dir "src/main/java"
7793 (modify-phases %standard-phases
7794 (add-before 'configure 'set-version
7796 (let* ((version-java "src/main/java/org/HdrHistogram/Version.java")
7797 (template (string-append version-java ".template")))
7798 (copy-file template version-java)
7799 (substitute* version-java
7800 (("\\$VERSION\\$") ,version)
7801 (("\\$BUILD_TIME\\$") "0"))
7804 `(("junit" ,java-junit)
7805 ("hamcrest" ,java-hamcrest-core)))
7806 (home-page "https://hdrhistogram.github.io/HdrHistogram")
7807 (synopsis "High dynamic range histogram")
7808 (description "Hdrhistogram allows to create histograms that support
7809 recording and analyzing sampled data value counts across a configurable integer
7810 value range with configurable value precision within the range. Value precision
7811 is expressed as the number of significant digits in the value recording, and
7812 provides control over value quantization behavior across the value range and
7813 the subsequent value resolution at any given level.")
7814 (license license:public-domain)))
7816 (define-public java-cofoja
7818 (name "java-cofoja")
7823 (url "https://github.com/nhatminhle/cofoja.git")
7824 (commit (string-append "v" version))))
7825 (file-name (string-append "java-cofoja-" version "-checkout"))
7828 "0p7sz8y5xgpi5rx1qwn6587fkd52qr3ha3ybh14gqcyxhikl525w"))))
7829 (build-system ant-build-system)
7831 `(#:build-target "dist"
7832 #:test-target "test"
7835 (list "-Ddist.dir=dist")
7836 #:modules ((guix build ant-build-system)
7837 (guix build java-utils)
7842 (modify-phases %standard-phases
7843 ;; The bulid system ignores the class path the ant-build-system sets
7844 ;; up and instead expects to find all dependencies in the "lib"
7846 (add-after 'unpack 'create-libdir
7847 (lambda* (#:key inputs #:allow-other-keys)
7851 (let ((target (string-append "lib/" (basename file))))
7852 (unless (file-exists? target)
7853 (symlink file target))))
7854 (append-map (match-lambda
7856 (find-files dir "\\.jar$")))
7859 (replace 'install (install-jars "dist")))))
7861 `(("java-asm" ,java-asm)))
7863 `(("java-junit" ,java-junit)))
7864 (home-page "https://github.com/nhatminhle/cofoja")
7865 (synopsis "Contracts for Java")
7866 (description "Contracts for Java, or Cofoja for short, is a contract
7867 programming framework and test tool for Java, which uses annotation processing
7868 and bytecode instrumentation to provide run-time checking. (In particular,
7869 this is not a static analysis tool.)")
7870 (license license:lgpl3+)))
7872 (define-public java-aopalliance
7874 (name "java-aopalliance")
7878 ;; Note: this git repository is not official, but contains the
7879 ;; source code that is in the CVS repository. Downloading the
7880 ;; tarball from sourceforge is undeterministic, and the cvs download
7883 (url "https://github.com/hoverruan/aopalliance")
7884 (commit "0d7757ae204e5876f69431421fe9bc2a4f01e8a0")))
7885 (file-name (string-append name "-" version))
7888 "0rsg2b0v3hxlq2yk1i3m2gw3xwq689j3cwx9wbxvqfpdcjbca0qr"))))
7889 (build-system ant-build-system)
7891 `(#:jar-name "java-aopalliance.jar"
7893 #:tests? #f; no tests
7894 #:source-dir "aopalliance/src/main"))
7895 (home-page "http://aopalliance.sourceforge.net")
7896 (synopsis "Aspect-Oriented Programming")
7897 (description "The AOP Alliance project is a joint project between several
7898 software engineering people who are interested in Aspect-Oriented Programming
7900 (license license:public-domain)))
7902 (define-public java-javax-inject
7904 (name "java-javax-inject")
7908 (uri (string-append "https://github.com/javax-inject/javax-inject/"
7909 "archive/javax.inject-" version ".tar.gz"))
7912 "1ydrlvh2r7vr1g7lhjwy3w2dggpj9h6pix1lakkkgdywb365n6g0"))))
7913 (build-system ant-build-system)
7915 `(#:jar-name "java-javax-inject.jar"
7917 #:tests? #f)); no tests
7918 (home-page "http://github.com/javax-inject/javax-inject")
7919 (synopsis "JSR-330: Dependency Injection for Java")
7920 (description "This package specifies a means for obtaining objects in such
7921 a way as to maximize reusability, testability and maintainability compared to
7922 traditional approaches such as constructors, factories, and service locators
7923 (e.g., JNDI). This process, known as dependency injection, is beneficial to
7924 most nontrivial applications.
7926 Many types depend on other types. For example, a @var{Stopwatch} might depend
7927 on a @var{TimeSource}. The types on which a type depends are known as its
7928 dependencies. The process of finding an instance of a dependency to use at run
7929 time is known as resolving the dependency. If no such instance can be found,
7930 the dependency is said to be unsatisfied, and the application is broken.")
7931 (license license:asl2.0)))
7933 (define-public java-guice
7939 (uri (string-append "https://github.com/google/guice/archive/"
7941 (file-name (string-append name "-" version ".tar.gz"))
7942 (modules '((guix build utils)))
7945 (for-each delete-file (find-files "." ".*.jar"))))
7948 "0dwmqjzlavb144ywqqglj3h68hqszkff8ai0a42hyb5il0qh4rbp"))))
7949 (build-system ant-build-system)
7951 `(#:jar-name "java-guice.jar"
7953 #:tests? #f; FIXME: tests are not in a java sub directory
7954 #:source-dir "core/src"))
7956 `(("guava" ,java-guava)
7957 ("java-cglib" ,java-cglib)
7958 ("java-aopalliance" ,java-aopalliance)
7959 ("java-javax-inject" ,java-javax-inject)
7960 ("java-asm" ,java-asm)))
7961 (home-page "https://github.com/google/guice")
7962 (synopsis "Lightweight dependency injection framework")
7963 (description "Guice is a lightweight dependency injection framework fo
7965 (license license:asl2.0)))
7967 (define-public java-guice-servlet
7969 (inherit java-guice)
7970 (name "java-guice-servlet")
7972 `(#:jar-name "guice-servlet.jar"
7973 #:source-dir "extensions/servlet/src/"
7975 #:tests? #f)); FIXME: not in a java subdir
7977 `(("guice" ,java-guice)
7978 ("servlet" ,java-classpathx-servletapi)
7979 ,@(package-inputs java-guice)))))
7981 (define-public java-assertj
7983 (name "java-assertj")
7987 (uri (string-append "https://github.com/joel-costigliola/"
7988 "assertj-core/archive/"
7989 "assertj-core-" version ".tar.gz"))
7992 "1kf124fxskf548rklkg86294w2x6ajqrff94rrhyqns31danqkfz"))))
7993 (build-system ant-build-system)
7995 `(#:jar-name "java-assertj.jar"
7997 #:source-dir "src/main/java"
7998 #:tests? #f)); depends on tng-junit which depends on assertj
8000 `(("cglib" ,java-cglib)
8001 ("junit" ,java-junit)
8002 ("hamcrest" ,java-hamcrest-core)))
8004 `(("mockito" ,java-mockito-1)))
8005 (home-page "https://joel-costigliola.github.io/assertj/index.html")
8006 (synopsis "Fluent assertions for java")
8007 (description "AssertJ core is a Java library that provides a fluent
8008 interface for writing assertions. Its main goal is to improve test code
8009 readability and make maintenance of tests easier.")
8010 (license license:asl2.0)))
8012 (define-public java-jboss-javassist
8014 (name "java-jboss-javassist")
8018 (uri (string-append "https://github.com/jboss-javassist/javassist/"
8020 (string-map (lambda (x) (if (eq? x #\.) #\_ x)) version)
8024 "10lpcr3sbf7y6fq6fc2h2ik7rqrivwcy4747bg0kxhwszil3cfmf"))))
8025 (build-system ant-build-system)
8027 `(#:jar-name "java-jboss-javassist.jar"
8029 #:source-dir "src/main"
8030 #:tests? #f; FIXME: requires junit-awtui and junit-swingui from junit3
8032 (modify-phases %standard-phases
8033 (add-before 'configure 'remove-binary
8035 (delete-file "javassist.jar")
8038 `(("junit" ,java-junit)))
8039 (home-page "https://github.com/jboss-javassist/javassist")
8040 (synopsis "Java bytecode engineering toolkit")
8041 (description "Javassist (JAVA programming ASSISTant) makes Java bytecode
8042 manipulation simple. It is a class library for editing bytecodes in Java; it
8043 enables Java programs to define a new class at runtime and to modify a class
8044 file when the JVM loads it.")
8045 (license (list license:gpl2 license:cddl1.0)))); either gpl2 only or cddl.
8047 (define-public java-jcommander
8049 (name "java-jcommander")
8053 (uri (string-append "https://github.com/cbeust/jcommander/archive/"
8055 (file-name (string-append name "-" version ".tar.gz"))
8058 "1f5k2ckay6qjc3d3w3d7bc0p3cx3c7n6p6zxvw1kibqdr0q98wlx"))))
8059 (build-system ant-build-system)
8061 `(#:jar-name "java-jcommander.jar"
8063 #:tests? #f; requires testng which depends on jcommander
8064 #:source-dir "src/main/java"))
8065 (home-page "http://jcommander.org")
8066 (synopsis "Command line parameters parser")
8067 (description "JCommander is a very small Java framework that makes it
8068 trivial to parse command line parameters. Parameters are declared with
8070 (license license:asl2.0)))
8072 (define-public java-bsh
8078 (uri (string-append "https://github.com/beanshell/beanshell/archive/"
8080 (file-name (string-append name "-" version ".tar.gz"))
8083 "1bawkxk6jyc75hxvzkpz689h73cn3f222m0ar3nvb0dal2b85kfv"))))
8084 (build-system ant-build-system)
8086 `(#:build-target "jarall"
8087 #:test-target "junit-tests-all"
8089 (modify-phases %standard-phases
8091 (lambda* (#:key outputs #:allow-other-keys)
8092 (let ((share (string-append (assoc-ref outputs "out") "/share/java")))
8094 (copy-file "dist/bsh-2.0b6.jar" (string-append share "/bsh-2.0b6.jar"))
8096 (home-page "http://beanshell.org/")
8097 (synopsis "Lightweight Scripting for Java")
8098 (description "BeanShell is a small, free, embeddable Java source
8099 interpreter with object scripting language features, written in Java.
8100 BeanShell dynamically executes standard Java syntax and extends it with common
8101 scripting conveniences such as loose types, commands, and method closures like
8102 those in Perl and JavaScript.")
8103 (license license:asl2.0)))
8105 (define-public java-fest-util
8107 (name "java-fest-util")
8111 (uri (string-append "https://github.com/alexruiz/fest-util/"
8112 "archive/fest-util-" version ".tar.gz"))
8115 "05g6hljz5mdaakk8d7g32klbhz9bdwp3qlj6rdaggdidxs3x1sb8"))))
8116 (build-system ant-build-system)
8118 `(#:jar-name "java-fest-util.jar"
8119 #:source-dir "src/main/java"))
8121 `(("junit" ,java-junit)
8122 ("hamcrest" ,java-hamcrest-core)))
8123 (home-page "https://github.com/alexruiz/fest-util")
8124 (synopsis "FEST common utilities")
8125 (description "Common utilities used in all FEST module.")
8126 (license license:asl2.0)))
8128 (define-public java-fest-test
8130 (name "java-fest-test")
8134 (uri (string-append "https://github.com/alexruiz/fest-test/"
8135 "archive/fest-test-" version ".tar.gz"))
8138 "1rxfbw6l9vc65iy1x3fb617qc6y4w2k430pgf1mfbxfdlxbm0f7g"))))
8139 (build-system ant-build-system)
8141 `(#:jar-name "java-fest-test.jar"
8142 #:source-dir "src/main/java"
8143 #:tests? #f)); no tests
8145 `(("junit" ,java-junit)))
8146 (home-page "https://github.com/alexruiz/fest-test")
8147 (synopsis "Common FEST testing infrastructure")
8148 (description "Fest-test contains the common FEST testing infrastructure.")
8149 (license license:asl2.0)))
8151 (define-public java-fest-assert
8153 (name "java-fest-assert")
8157 (uri (string-append "https://github.com/alexruiz/fest-assert-2.x/"
8158 "archive/fest-assert-core-" version ".tar.gz"))
8161 "1bi0iqavikzww6rxvz5jyg7y6bflv95s6ibryxx0xfcxrrw6i5lw"))))
8162 (build-system ant-build-system)
8164 `(#:jar-name "java-fest-assert.jar"
8165 #:source-dir "src/main/java"
8170 ;; Unable to set MockitoNamingPolicy on cglib generator which creates FastClasses
8171 "**/MessageFormatter_format_Test.java"
8172 "**/internal/*/*_assert*_Test.java")))
8174 `(("java-fest-util" ,java-fest-util)))
8176 `(("java-junit" ,java-junit)
8177 ("java-fest-test" ,java-fest-test)
8178 ("java-hamcrest-core" ,java-hamcrest-core)
8179 ("java-mockito" ,java-mockito-1)
8180 ("java-cglib" ,java-cglib)
8181 ("java-objenesis" ,java-objenesis)
8182 ("java-asm" ,java-asm)))
8183 (home-page "https://github.com/alexruiz/fest-assert-2.x")
8184 (synopsis "FEST fluent assertions")
8185 (description "FEST-Assert provides a fluent interface for assertions.")
8186 (license license:asl2.0)))
8188 (define-public java-testng
8190 (name "java-testng")
8195 (url "https://github.com/cbeust/testng.git")
8197 (file-name (string-append name "-" version "-checkout"))
8200 "0y6vq30i5g276kw0v2bhbvci22ijg7ax49ap2611yqlhbs4d6dqv"))))
8201 (build-system ant-build-system)
8203 `(#:jdk ,icedtea-8; java.util.function
8204 #:jar-name "java-testng.jar"
8205 #:source-dir "src/main/java"
8207 (modify-phases %standard-phases
8208 ;; FIXME: I don't know why these tests fail
8209 (add-after 'unpack 'delete-failing-tests
8211 (substitute* "src/test/resources/testng.xml"
8212 (("<class name=\"test.configuration.github1625.TestRunnerIssue1625\"/>") "")
8213 (("<class name=\"test.serviceloader.ServiceLoaderTest\" />") ""))
8215 ;; We don't have groovy
8216 (add-after 'unpack 'delete-groovy-tests
8218 (delete-file-recursively "src/test/java/test/dependent/issue1648/")
8219 (substitute* "src/test/resources/testng.xml"
8220 (("<class name=\"test.dependent.issue1648.TestRunner\"/>") ""))
8222 (add-before 'build 'copy-resources
8224 (copy-recursively "src/main/resources" "build/classes")
8226 (add-before 'check 'copy-test-resources
8228 (copy-recursively "src/test/resources" "build/test-classes")
8232 (invoke "ant" "compile-tests")
8233 ;; we don't have groovy
8234 (substitute* "src/test/resources/testng.xml"
8235 (("<class name=\"test.groovy.GroovyTest\" />") ""))
8236 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
8238 ":build/test-classes")
8239 "-Dtest.resources.dir=src/test/resources"
8240 "org.testng.TestNG" "src/test/resources/testng.xml"))))))
8242 `(("junit" ,java-junit)
8243 ("java-jsr305" ,java-jsr305)
8244 ("java-bsh" ,java-bsh)
8245 ("java-jcommander" ,java-jcommander)
8246 ("java-guice" ,java-guice)
8247 ("snakeyaml" ,java-snakeyaml)))
8249 `(("guava" ,java-guava)
8250 ("java-javax-inject" ,java-javax-inject)
8251 ("java-hamcrest" ,java-hamcrest-all)
8252 ("java-assertj" ,java-assertj)
8253 ("java-mockito" ,java-mockito-1)
8254 ("cglib" ,java-cglib)
8256 ("aopalliance" ,java-aopalliance)))
8257 (home-page "http://testng.org")
8258 (synopsis "Testing framework")
8259 (description "TestNG is a testing framework inspired from JUnit and NUnit
8260 but introducing some new functionalities that make it more powerful and easier
8262 (license license:asl2.0)))
8264 (define-public java-jnacl
8265 (let ((commit "094e819afdd63ea81a499b3bcb42a271006bebd9")
8269 (version (string-append "0.1.0-" revision "." (string-take commit 7)))
8273 (url "https://github.com/neilalexander/jnacl.git")
8275 (file-name (git-file-name name version))
8278 "1d6g6xhn83byv5943n7935wwjsk0ibk0qdvqgr699qqgqqmwisbb"))))
8279 (build-system ant-build-system)
8281 `(#:jar-name "jnacl.jar"
8282 #:source-dir "src/main/java"
8285 (modify-phases %standard-phases
8286 (add-before 'build 'fix-tests
8288 (substitute* '("src/test/java/com/neilalexander/jnacl/NaClTest.java"
8289 "src/test/java/com/neilalexander/jnacl/NaclSecretBoxTest.java")
8290 (("assertions.Assertions") "assertions.api.Assertions"))
8294 (invoke "ant" "compile-tests")
8295 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
8297 ":build/test-classes")
8298 "org.testng.TestNG" "-testclass"
8299 "build/test-classes/com/neilalexander/jnacl/NaclSecretBoxTest.class")
8300 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
8302 ":build/test-classes")
8303 "org.testng.TestNG" "-testclass"
8304 "build/test-classes/com/neilalexander/jnacl/NaClTest.class"))))))
8306 `(("java-testng" ,java-testng)
8307 ("java-fest-util" ,java-fest-util)
8308 ("java-fest-assert" ,java-fest-assert)))
8309 (home-page "https://github.com/neilalexander/jnacl")
8310 (synopsis "Java implementation of NaCl")
8311 (description "Pure Java implementation of the NaCl: Networking and
8312 Cryptography library.")
8313 (license license:bsd-2))))
8315 (define-public java-mvel2
8321 (uri (string-append "https://github.com/mvel/mvel/archive/mvel2-"
8322 version ".Final.tar.gz"))
8325 "01ph5s9gm16l2qz58lg21w6fna7xmmrj7f9bzqr1jim7h9557d3z"))))
8326 (build-system ant-build-system)
8328 `(#:jar-name "mvel2.jar"
8329 #:source-dir "src/main/java"
8331 (list "**/Abstract*.java"
8332 ;; Base class with no tests
8333 "**/MVELThreadTest.java")
8335 (modify-phases %standard-phases
8336 (add-after 'install 'install-bin
8337 (lambda* (#:key outputs #:allow-other-keys)
8338 (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
8340 (with-output-to-file (string-append bin "/mvel2")
8344 "#!" (which "bash") "\n"
8345 "if [ \"$#\" -ne \"2\" ]; then\n"
8346 "echo 'Usage: mvel2 <script> <out.dir>'\n"
8349 "java -Dout.dir=$2 -cp " (getenv "CLASSPATH")
8350 ":" (assoc-ref outputs "out") "/share/java/mvel2.jar"
8351 " org.mvel2.sh.Main $1"))))
8352 (chmod (string-append bin "/mvel2") #o755))
8355 `(("junit" ,java-junit)
8356 ("hamcrest" ,java-hamcrest-core)))
8357 (home-page "https://github.com/mvel/mvel")
8358 (synopsis "MVFLEX Expression Language")
8359 (description "MVEL has largely been inspired by Java syntax, but has some
8360 fundamental differences aimed at making it more efficient as an expression
8361 language, such as operators that directly support collection, array and string
8362 matching, as well as regular expressions. MVEL is used to evaluate expressions
8363 written using Java syntax.
8365 In addition to the expression language, MVEL serves as a templating language for
8366 configuration and string construction.")
8367 (license license:asl2.0)))
8369 (define-public java-commons-jexl-2
8371 (name "java-commons-jexl")
8375 (uri (string-append "mirror://apache/commons/jexl/source/"
8376 "commons-jexl-" version "-src.tar.gz"))
8379 "1ai7632bwwaxglb0nbpblpr2jw5g20afrsaq372ipkphi3ncy1jz"))))
8380 (build-system ant-build-system)
8382 `(#:jar-name "commons-jexl-2.jar"
8384 #:source-dir "src/main/java"
8386 (modify-phases %standard-phases
8387 (add-before 'check 'disable-broken-tests
8388 (lambda* (#:key inputs #:allow-other-keys)
8389 (with-directory-excursion "src/test/java/org/apache/commons/jexl2/"
8390 (substitute* "ArithmeticTest.java"
8391 (("asserter.assertExpression\\(\"3 / 0\"") "//")
8392 (("asserter.assertExpression\\(\"imanull") "//"))
8393 ;; This test fails with "ambiguous method invocation"
8394 (delete-file "CacheTest.java")
8395 ;; This test doesn't have access to the temp directory
8396 (substitute* "ClassCreatorTest.java"
8397 (("java.io.tmpdir") "user.dir"))
8398 ;; This test fails in trying to detect whether it can run.
8399 (substitute* "ClassCreator.java"
8400 (("boolean canRun =.*") "boolean canRun = false;\n"))
8401 ;; ...and these tests depend on it.
8402 (delete-file "scripting/JexlScriptEngineOptionalTest.java")
8403 (delete-file "scripting/JexlScriptEngineTest.java"))
8405 (add-before 'build 'run-javacc
8407 (with-directory-excursion "src/main/java/org/apache/commons/jexl2/parser/"
8408 (invoke "java" "jjtree" "Parser.jjt")
8409 (invoke "java" "javacc" "Parser.jj"))
8412 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)))
8414 `(("java-junit" ,java-junit)
8415 ("java-hamcrest-core" ,java-hamcrest-core)
8416 ("javacc" ,javacc-4)))
8417 (home-page "https://commons.apache.org/proper/commons-jexl/")
8418 (synopsis "Java Expression Language ")
8419 (description "JEXL is a library intended to facilitate the implementation
8420 of dynamic and scripting features in applications and frameworks written in
8421 Java. JEXL implements an Expression Language based on some extensions to the
8422 JSTL Expression Language supporting most of the constructs seen in
8423 shell-script or ECMAScript. Its goal is to expose scripting features usable
8424 by technical operatives or consultants working with enterprise platforms.")
8425 (license license:asl2.0)))
8427 (define-public java-lz4
8433 (uri (string-append "https://github.com/lz4/lz4-java/archive/"
8435 (file-name (string-append name "-" version ".tar.gz"))
8438 "096dm57p2lzqk28n0j2p52x2j3cvnsd2dfqn43n7vbwrkjsy7y54"))))
8439 (build-system ant-build-system)
8441 `(#:jar-name "lz4.jar"
8443 #:source-dir "src/java:src/java-unsafe"
8444 #:tests? #f; FIXME: requires more dependencies
8446 (modify-phases %standard-phases
8447 (add-before 'configure 'generate-source
8449 (with-directory-excursion "src/build/source_templates"
8450 (invoke "mvel2" "../gen_sources.mvel" "../../java"))
8453 `(("mvel" ,java-mvel2)))
8454 (home-page "https://jpountz.github.io/lz4-java")
8455 (synopsis "Compression algorithm")
8456 (description "LZ4 - Java is a Java port of the popular lz4 compression
8457 algorithms and xxHash hashing algorithm.")
8458 (license license:asl2.0)))
8460 (define-public java-bouncycastle
8462 (name "java-bouncycastle")
8466 (uri (string-append "https://github.com/bcgit/bc-java/archive/r"
8467 (substring version 0 1) "v"
8468 (substring version 2 4) ".tar.gz"))
8471 "0v434513y708qc87k4xz13p2kzydc736lk3ks67df9mg11s7hchv"))
8472 (modules '((guix build utils)))
8475 (for-each delete-file
8476 (find-files "." "\\.jar$"))
8478 (build-system ant-build-system)
8483 (modify-phases %standard-phases
8486 (invoke "ant" "-f" "ant/jdk15+.xml" "build-provider")
8487 (invoke "ant" "-f" "ant/jdk15+.xml" "build")))
8488 ;; FIXME: the tests freeze.
8491 ;; (invoke "ant" "-f" "ant/jdk15+.xml" "test")))
8493 (install-jars "build/artifacts/jdk1.5/jars")))))
8495 `(("java-javax-mail" ,java-javax-mail)))
8498 ("junit" ,java-junit)
8499 ("java-native-access" ,java-native-access)
8500 ("java-native-access-platform" ,java-native-access-platform)))
8501 (home-page "https://www.bouncycastle.org")
8502 (synopsis "Cryptographic library")
8503 (description "Bouncy Castle is a cryptographic library for the Java
8504 programming language.")
8505 (license license:expat)))
8507 (define-public java-lmax-disruptor
8509 (name "java-lmax-disruptor")
8513 (uri (string-append "https://github.com/LMAX-Exchange/disruptor/"
8514 "archive/" version ".tar.gz"))
8515 (file-name (string-append name "-" version ".tar.gz"))
8518 "17da2gwj5abnlsfgn2xqjk5lgzbg4vkb0hdv2dvc8r2fx4bi7w3g"))))
8519 (build-system ant-build-system)
8521 `(#:jar-name "java-lmax-disruptor.jar"
8523 #:tests? #f)); tests hang
8525 `(("junit" ,java-junit)
8526 ("java-hdrhistogram" ,java-hdrhistogram)
8527 ("java-jmock" ,java-jmock)
8528 ("java-jmock-legacy" ,java-jmock-legacy)
8529 ("java-jmock-junit4" ,java-jmock-junit4)
8530 ("java-hamcrest-all" ,java-hamcrest-all)))
8532 `(("cglib" ,java-cglib)
8533 ("objenesis" ,java-objenesis)
8535 (home-page "https://www.lmax.com/disruptor")
8536 (synopsis "High performance inter-thread communication")
8537 (description "LMAX Disruptor is a software pattern and software component
8538 for high performance inter-thread communication that avoids the need for
8539 message queues or resource locking.")
8540 (license license:asl2.0)))
8542 (define-public java-commons-bcel
8544 (name "java-commons-bcel")
8548 (uri (string-append "mirror://apache/commons/bcel/source/bcel-"
8549 version "-src.tar.gz"))
8552 "0j3x1rxd673k07psclk8k13rqh0x0mf2yy5qiwkiw4z3afa568jy"))))
8553 (build-system ant-build-system)
8555 `(#:jar-name "bcel.jar"
8557 #:source-dir "src/main/java"
8558 #:test-dir "src/test/java"
8559 ;; FIXME: Tests require the unpackaged jna.
8561 (home-page "https://commons.apache.org/proper/commons-bcel/")
8562 (synopsis "Byte code engineering library")
8563 (description "The Byte Code Engineering Library (Apache Commons BCEL) is
8564 intended to give users a convenient way to analyze, create, and
8565 manipulate (binary) Java class files. Classes are represented by objects
8566 which contain all the symbolic information of the given class: methods, fields
8567 and byte code instructions, in particular.
8569 Such objects can be read from an existing file, be transformed by a
8570 program (e.g. a class loader at run-time) and written to a file again. An
8571 even more interesting application is the creation of classes from scratch at
8572 run-time. The @dfn{Byte Code Engineering Library} (BCEL) may be also useful
8573 if you want to learn about the @dfn{Java Virtual Machine} (JVM) and the format
8574 of Java @code{.class} files.")
8575 (license license:asl2.0)))
8577 (define-public java-xerial-core
8579 (name "java-xerial-core")
8583 (uri (string-append "https://github.com/xerial/xerial-java/archive/"
8585 (file-name (string-append name "-" version ".tar.gz"))
8588 "0d3g863i41bgalpa4xr3vm1h140l091n8iwgq5qvby5yivns9y8d"))))
8589 (build-system ant-build-system)
8591 `(#:jar-name "xerial-core.jar"
8592 #:source-dir "xerial-core/src/main/java"
8593 #:test-dir "xerial-core/src/test"
8595 (modify-phases %standard-phases
8596 (add-before 'build 'copy-resources
8598 (copy-recursively "xerial-core/src/main/resources"
8602 `(("junit" ,java-junit)
8603 ("hamcrest" ,java-hamcrest-core)))
8604 (home-page "https://github.com/xerial/xerial-java")
8605 (synopsis "Data management libraries for Java")
8606 (description "Xerial is a set of data management libraries for the Java
8607 programming language. The ultimate goal of the Xerial project is to manage
8608 everything as database, including class objects, text format data, data
8610 (license license:asl2.0)))
8612 (define-public java-powermock-reflect
8614 (name "java-powermock-reflect")
8618 (uri (string-append "https://github.com/powermock/powermock/"
8619 "archive/powermock-" version ".tar.gz"))
8620 (file-name (string-append name "-" version ".tar.gz"))
8623 "0sbgi5vqq7k72wzcdjb20s370vyd4hsbnx71pzb8ishml3gy7fwy"))
8625 (search-patches "java-powermock-fix-java-files.patch"))))
8626 (build-system ant-build-system)
8628 `(#:jar-name "java-powermock-reflect.jar"
8630 #:source-dir "powermock-reflect/src/main/java"
8631 #:test-dir "powermock-reflect/src/test"))
8633 `(("java-objenesis" ,java-objenesis)))
8635 `(("junit" ,java-junit)
8636 ("cglib" ,java-cglib)
8638 ("hamcrest" ,java-hamcrest-core)
8639 ("assertj" ,java-assertj)))
8640 (home-page "https://github.com/powermock/powermock")
8641 (synopsis "Mock library extension framework")
8642 (description "PowerMock is a framework that extends other mock libraries
8643 such as EasyMock with more powerful capabilities. PowerMock uses a custom
8644 classloader and bytecode manipulation to enable mocking of static methods,
8645 constructors, final classes and methods, private methods, removal of static
8646 initializers and more. By using a custom classloader no changes need to be
8647 done to the IDE or continuous integration servers which simplifies adoption.")
8648 (license license:asl2.0)))
8650 (define-public java-powermock-core
8652 (inherit java-powermock-reflect)
8653 (name "java-powermock-core")
8655 `(#:jar-name "java-powermock-core.jar"
8656 #:source-dir "powermock-core/src/main/java"
8657 #:test-dir "powermock-core/src/test"
8658 #:tests? #f; requires powermock-api
8661 (modify-phases %standard-phases
8662 (add-before 'build 'copy-resources
8664 (copy-recursively "powermock-core/src/main/resources"
8668 `(("reflect" ,java-powermock-reflect)
8669 ("javassist" ,java-jboss-javassist)))
8671 `(("junit" ,java-junit)
8672 ("assertj" ,java-assertj)
8673 ("mockito" ,java-mockito-1)))))
8675 (define-public java-powermock-api-support
8677 (inherit java-powermock-reflect)
8678 (name "java-powermock-api-support")
8679 (build-system ant-build-system)
8681 `(#:jar-name "java-powermock-api-support.jar"
8683 #:source-dir "powermock-api/powermock-api-support/src/main/java"
8684 #:tests? #f)); no tests
8686 `(("core" ,java-powermock-core)
8687 ("reflect" ,java-powermock-reflect)))))
8689 (define-public java-powermock-modules-junit4-common
8691 (inherit java-powermock-reflect)
8692 (name "java-powermock-modules-junit4-common")
8693 (build-system ant-build-system)
8695 `(#:jar-name "java-powermock-modules-junit4-common.jar"
8697 #:source-dir "powermock-modules/powermock-module-junit4-common/src/main/java"
8698 #:test-dir "powermock-modules/powermock-module-junit4-common/src/test"))
8700 `(("core" ,java-powermock-core)
8701 ("easymock" ,java-easymock)
8702 ("reflect" ,java-powermock-reflect)
8703 ("hamcrest" ,java-hamcrest-core)
8704 ("cglib" ,java-cglib)))))
8706 (define-public java-powermock-modules-junit4
8708 (inherit java-powermock-reflect)
8709 (name "java-powermock-modules-junit4")
8710 (build-system ant-build-system)
8712 `(#:jar-name "java-powermock-modules-junit4.jar"
8714 #:source-dir "powermock-modules/powermock-module-junit4/src/main/java"
8715 #:test-dir "powermock-modules/powermock-module-junit4/src/test"
8717 (modify-phases %standard-phases
8718 (add-before 'build 'fix-junit-detection
8720 ;; Our junit version is 4.12-SNAPSHOT
8721 (substitute* (find-files "powermock-modules/powermock-module-junit4"
8722 "PowerMockJUnit4MethodValidator.java")
8723 (("4.12") "4.12-SNAPSHOT"))
8726 `(("core" ,java-powermock-core)
8727 ("reflect" ,java-powermock-reflect)
8728 ("common" ,java-powermock-modules-junit4-common)
8729 ("cglib" ,java-cglib)))
8731 `(("easymock" ,java-easymock)
8732 ("hamcrest" ,java-hamcrest-core)
8733 ("objenesis" ,java-objenesis)
8735 ("junit" ,java-junit)))))
8737 (define-public java-powermock-api-easymock
8739 (inherit java-powermock-reflect)
8740 (name "java-powermock-api-easymock")
8741 (build-system ant-build-system)
8743 `(#:jar-name "java-powermock-api-easymock.jar"
8745 #:source-dir "powermock-api/powermock-api-easymock/src/main/java"
8746 #:tests? #f; no tests
8748 (modify-phases %standard-phases
8749 (add-before 'build 'fix-file
8751 ;; FIXME: This looks wrong, but it fixes a build error.
8752 (with-directory-excursion "powermock-api/powermock-api-easymock"
8753 (substitute* "src/main/java/org/powermock/api/easymock/PowerMock.java"
8754 (("classLoader instanceof MockClassLoader") "false")
8755 (("\\(\\(MockClassLoader\\) classLoader\\).*;") ";")))
8758 `(("core" ,java-powermock-core)
8759 ("easymock" ,java-easymock)
8760 ("reflect" ,java-powermock-reflect)
8761 ("support" ,java-powermock-api-support)
8762 ("cglib" ,java-cglib)))))
8764 (define-public java-jboss-jms-api-spec
8766 (name "java-jboss-jms-api-spec")
8770 (uri (string-append "https://github.com/jboss/jboss-jms-api_spec/"
8771 "archive/jboss-jms-api_" version
8772 "_spec-1.0.1.Final.tar.gz"))
8775 "07bqblw9kq2i8q92bz70fvavq5xjfkaixl8xa0m0cypjgy82rb7m"))))
8776 (build-system ant-build-system)
8778 `(#:jar-name "java-jboss-jms-api_spec.jar"
8781 #:tests? #f)); no tests
8782 (home-page "https://github.com/jboss/jboss-jms-api_spec")
8783 (synopsis "Java Message Service API specification")
8784 (description "Java Message Service (JMS) API is used to send messages
8785 messages between two or more clients. It is a messaging standard that allows
8786 application components to create, send, receive, and read messages.")
8787 ; either gpl2 only with GPL Classpath Exception, or cddl.
8788 (license (list license:gpl2 license:cddl1.0))))
8790 (define-public java-mail
8796 (uri (string-append "https://github.com/javaee/javamail/archive/"
8797 "JAVAMAIL-1_6_0.tar.gz"))
8800 "1b4rg7fpj50ld90a71iz2m4gm3f5cnw18p3q3rbrrryjip46kx92"))))
8801 (build-system ant-build-system)
8803 `(#:jar-name "java-mail.jar"
8805 #:source-dir "mail/src/main/java"
8806 #:test-dir "mail/src/test"
8808 (list "**/CollectorFormatterTest.java"
8809 "**/CompactFormatterTest.java"
8810 "**/DurationFilterTest.java"
8811 "**/MailHandlerTest.java"
8812 "**/GetLocalAddressTest.java"
8813 ;; FIXME: both end with:
8814 ;; java.lang.ClassNotFoundException:
8815 ;; javax.mail.internet.MimeMultipartParseTest
8816 "**/MimeMultipartParseTest.java"
8817 "**/SearchTermSerializationTest.java")
8819 (modify-phases %standard-phases
8820 (add-before 'configure 'move-version.java
8822 (copy-file "mail/src/main/resources/javax/mail/Version.java"
8823 "mail/src/main/java/javax/mail/Version.java")
8825 (add-before 'build 'copy-resources
8827 (copy-recursively "mail/src/main/resources/META-INF"
8828 "build/classes/META-INF")
8831 `(("junit" ,java-junit)
8832 ("hamcrest" ,java-hamcrest-core)))
8833 (home-page "https://javaee.github.io/javamail/")
8834 (synopsis "Mail-related functionnalities in Java")
8835 (description "The JavaMail API provides a platform-independent and
8836 protocol-independent framework to build mail and messaging applications.")
8837 ;; General Public License Version 2 only ("GPL") or the Common Development
8838 ;; and Distribution License("CDDL")
8839 (license (list license:cddl1.1
8840 license:gpl2)))); with classpath exception
8842 (define-public java-jeromq
8844 (name "java-jeromq")
8849 (url "https://github.com/zeromq/jeromq.git")
8850 (commit (string-append "v" version))))
8851 (file-name (string-append name "-" version "-checkout"))
8854 "1gxkp7lv2ahymgrqdw94ncq54bmp4m4sw5m1x9gkp7l5bxn0xsyj"))
8855 (patches (search-patches "java-jeromq-fix-tests.patch"))))
8856 (build-system ant-build-system)
8858 `(#:jar-name "java-jeromq.jar"
8859 #:source-dir "src/main/java"
8865 "**/ZBeaconTest.java"
8867 "**/DealerSpecTest.java"
8868 "**/CustomDecoderTest.java"
8869 "**/CustomEncoderTest.java"
8870 "**/ConnectRidTest.java"
8871 "**/ReqSpecTest.java"
8872 "**/PushPullSpecTest.java"
8873 "**/PubSubHwmTest.java"
8874 "**/RouterSpecTest.java"
8875 "**/ProxyTest.java")))
8877 `(("java-jnacl" ,java-jnacl)))
8879 `(("java-hamcrest-core" ,java-hamcrest-core)
8880 ("junit" ,java-junit)))
8881 (home-page "http://zeromq.org/bindings:java")
8882 (synopsis "Java binding for 0MQ")
8883 (description "Jeromq provides the java bindings for 0MQ.")
8884 (license license:mpl2.0)))
8886 (define-public java-kafka-clients
8888 (name "java-kafka-clients")
8892 (uri (string-append "mirror://apache/kafka/" version "/kafka-"
8893 version "-src.tgz"))
8896 "1yxmnsmliwm7671q5yy9bl4jdqyyn00n26cggz9brwczx80w1vfq"))))
8897 (build-system ant-build-system)
8899 `(#:jar-name "java-kafka-clients.jar"
8901 #:source-dir "clients/src/main/java"
8902 #:test-dir "clients/src/test"
8905 ;; This file does not contain a class
8906 "**/IntegrationTest.java"
8908 "**/ClientUtilsTest.java"
8909 ;; End with errors that seem related to our powermock
8910 "**/KafkaProducerTest.java"
8911 "**/BufferPoolTest.java")))
8913 `(("java-slf4j-api" ,java-slf4j-api)
8914 ("java-lz4" ,java-lz4)))
8916 `(("junit" ,java-junit)
8917 ("hamcrest" ,java-hamcrest-all)
8918 ("objenesis" ,java-objenesis)
8920 ("cglib" ,java-cglib)
8921 ("javassist" ,java-jboss-javassist)
8922 ("snappy" ,java-snappy)
8923 ("easymock" ,java-easymock)
8924 ("powermock" ,java-powermock-core)
8925 ("powermock-easymock" ,java-powermock-api-easymock)
8926 ("powermock-junit4-common" ,java-powermock-modules-junit4-common)
8927 ("powermock-junit4" ,java-powermock-modules-junit4)
8928 ("powermock-support" ,java-powermock-api-support)
8929 ("java-bouncycastle" ,java-bouncycastle)))
8930 (home-page "https://kafka.apache.org")
8931 (synopsis "Distributed streaming platform")
8932 (description "Kafka is a distributed streaming platform, which means:
8934 @item it can publish and subscribe to streams of records;
8935 @item it can store streams of records in a fault-tolerant way;
8936 @item it can process streams of records as they occur.
8938 ;; Either cddl or gpl2 only.
8939 (license (list license:cddl1.1; actually cddl1.1
8940 license:gpl2)))); with classpath exception
8942 (define-public java-jdom
8948 (uri (string-append "http://jdom.org/dist/binary/archive/jdom-"
8952 "07wdpm3jwwc9q38kmdw40fvbmv6jzjrkrf8m0zqs58f79a672wfl"))))
8953 (build-system ant-build-system)
8955 `(#:build-target "package"
8956 #:tests? #f; tests are run as part of the build process
8958 (modify-phases %standard-phases
8960 (install-jars "build")))))
8961 (home-page "http://jdom.org/")
8962 (synopsis "Access, manipulate, and output XML data")
8963 (description "Java-based solution for accessing, manipulating, and
8964 outputting XML data from Java code.")
8965 (license license:bsd-4)))
8967 (define-public java-geronimo-xbean-reflect
8969 (name "java-geronimo-xbean-reflect")
8974 (url "https://svn.apache.org/repos/asf/geronimo/xbean/tags/xbean-4.5/")
8975 (revision 1807396)))
8976 (file-name (string-append name "-" version))
8979 "18q3i6jgm6rkw8aysfgihgywrdc5nvijrwnslmi3ww497jvri6ja"))))
8980 (build-system ant-build-system)
8982 `(#:jar-name "geronimo-xbean-reflect.jar"
8983 #:source-dir "xbean-reflect/src/main/java"
8984 #:test-dir "xbean-reflect/src/test"
8987 (list "**/Abstract*.java" "**/AsmParameterNameLoaderTest.java"
8988 "**/ObjectRecipeTest.java" "**/ParameterNameLoaderTest.java"
8989 "**/RecipeHelperTest.java" "**/XbeanAsmParameterNameLoaderTest.java")
8991 (modify-phases %standard-phases
8992 (add-before 'build 'fix-source
8994 (let ((dir "xbean-reflect/src/main/java/org/apache/xbean/recipe/"))
8995 ;; org.apache.xbean.asm6 is actually repackaged java-asm
8996 (substitute* (string-append dir "XbeanAsmParameterNameLoader.java")
8997 (("org.apache.xbean.asm5") "org.objectweb.asm"))
9001 ("log4j" ,java-log4j-api)
9002 ("log4j-1.2" ,java-log4j-1.2-api)
9003 ("log4j-core" ,java-log4j-core)
9004 ("logging" ,java-commons-logging-minimal)))
9006 `(("junit" ,java-junit)))
9007 (home-page "https://geronimo.apache.org/maven/xbean/3.6/xbean-reflect/")
9008 (synopsis "Dependency injection helper")
9009 (description "Xbean-reflect provides very flexible ways to create objects
9010 and graphs of objects for dependency injection frameworks")
9011 (license license:asl2.0)))
9013 (define-public java-geronimo-xbean-bundleutils
9015 (inherit java-geronimo-xbean-reflect)
9016 (name "java-geronimo-xbean-bundleutils")
9018 `(#:jar-name "geronimo-xbean-bundleutils.jar"
9019 #:source-dir "xbean-bundleutils/src/main/java"
9020 #:test-dir "xbean-bundleutils/src/test"
9022 (modify-phases %standard-phases
9023 (add-before 'build 'fix-java
9025 ;; We use a more recent version of osgi, so this file requires
9026 ;; more interface method implementations.
9027 (substitute* "xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/DelegatingBundleContext.java"
9028 (("import org.osgi.framework.ServiceRegistration;")
9029 "import org.osgi.framework.ServiceRegistration;
9030 import org.osgi.framework.ServiceFactory;
9031 import java.util.Collection;
9032 import org.osgi.framework.ServiceObjects;")
9033 (("public Bundle getBundle\\(\\)")
9035 public <S> ServiceObjects<S> getServiceObjects(ServiceReference<S> reference) {
9036 throw new UnsupportedOperationException();
9039 public <S> ServiceRegistration<S> registerService(Class<S> clazz,
9040 ServiceFactory<S> factory, Dictionary<String, ?> properties) {
9041 throw new UnsupportedOperationException();
9043 public Bundle getBundle()"))
9046 `(("java-slf4j" ,java-slf4j-api)
9047 ("java-asm" ,java-asm)
9048 ("java-osgi-framework" ,java-osgi-framework)
9049 ("java-eclipse-osgi" ,java-eclipse-osgi)
9050 ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin)))))
9052 (define-public java-geronimo-xbean-asm-util
9054 (inherit java-geronimo-xbean-reflect)
9055 (name "java-geronimo-xbean-asm-util")
9057 `(#:jar-name "geronimo-xbean-asm-util.jar"
9058 #:source-dir "xbean-asm-util/src/main/java"
9059 #:tests? #f)); no tests
9061 `(("java-asm" ,java-asm)))
9062 (native-inputs '())))
9064 (define-public java-geronimo-xbean-finder
9066 (inherit java-geronimo-xbean-reflect)
9067 (name "java-geronimo-xbean-finder")
9069 `(#:jar-name "geronimo-xbean-finder.jar"
9070 #:source-dir "xbean-finder/src/main/java"
9071 #:test-dir "xbean-finder/src/test"))
9073 `(("java-slf4j-api" ,java-slf4j-api)
9074 ("java-asm" ,java-asm)
9075 ("java-geronimo-xbean-bundleutils" ,java-geronimo-xbean-bundleutils)
9076 ("java-geronimo-xbean-asm-util" ,java-geronimo-xbean-asm-util)
9077 ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin)
9078 ("java-osgi-framework" ,java-osgi-framework)))
9080 `(("java-junit" ,java-junit)
9081 ("java-hamcrest-core" ,java-hamcrest-core)))))
9083 (define-public java-gson
9089 (uri (string-append "https://github.com/google/gson/archive/"
9090 "gson-parent-" version ".tar.gz"))
9093 "1j4qnp7v046q0k48c4kyf69sxaasx2h949d3cqwsm3kzxms3x0f9"))))
9094 (build-system ant-build-system)
9096 `(#:jar-name "gson.jar"
9097 #:source-dir "gson/src/main/java"
9098 #:test-dir "gson/src/test"))
9100 `(("java-junit" ,java-junit)
9101 ("java-hamcrest-core" ,java-hamcrest-core)))
9102 (home-page "https://github.com/google/gson")
9103 (synopsis "Java serialization/deserialization library from/to JSON")
9104 (description "Gson is a Java library that can be used to convert Java
9105 Objects into their JSON representation. It can also be used to convert a JSON
9106 string to an equivalent Java object. Gson can work with arbitrary Java objects
9107 including pre-existing objects that you do not have source-code of.")
9108 (license license:asl2.0)))
9110 (define-public java-hawtjni
9112 (name "java-hawtjni")
9116 (uri (string-append "https://github.com/fusesource/hawtjni/archive/"
9117 "hawtjni-project-" version ".tar.gz"))
9120 "1bqfd732rmh6svyx17fpw9175gc9gzkcbyps2yyrf50c3zzjas6g"))))
9121 (build-system ant-build-system)
9123 `(#:jar-name "hawtjni.jar"
9124 #:source-dir "hawtjni-generator/src/main/java:hawtjni-runtime/src/main/java"
9125 #:tests? #f; no tests
9127 (modify-phases %standard-phases
9128 (add-before 'build 'build-native
9129 (lambda* (#:key inputs #:allow-other-keys)
9130 (let ((include (string-append "-I" (assoc-ref inputs "jdk") "/include/linux")))
9131 (with-directory-excursion "hawtjni-generator/src/main/resources/"
9132 (invoke "gcc" "-c" "hawtjni.c" "-o" "hawtjni.o"
9133 "-fPIC" "-O2" include)
9134 (invoke "gcc" "-c" "hawtjni-callback.c" "-o" "hawtjni-callback.o"
9135 "-fPIC" "-O2" include)
9136 (invoke "gcc" "-o" "libhawtjni.so" "-shared"
9137 "hawtjni.o" "hawtjni-callback.o")))
9139 (add-after 'install 'install-native
9140 (lambda* (#:key outputs #:allow-other-keys)
9141 (let* ((out (assoc-ref outputs "out"))
9142 (lib (string-append out "/lib"))
9143 (inc (string-append out "/include")))
9144 (with-directory-excursion "hawtjni-generator/src/main/resources/"
9145 (install-file "libhawtjni.so" lib)
9146 (install-file "hawtjni.h" inc)))
9149 `(("java-commons-cli" ,java-commons-cli)
9150 ("java-asm" ,java-asm)
9151 ("java-geronimo-xbean-finder" ,java-geronimo-xbean-finder)))
9152 (home-page "https://fusesource.github.io/hawtjni/")
9153 (synopsis "JNI code generator")
9154 (description "HawtJNI is a code generator that produces the JNI code needed
9155 to implement Java native methods. It is based on the jnigen code generator
9156 that is part of the SWT Tools project.")
9157 (license license:asl2.0)))
9159 (define-public java-jansi-native
9161 (name "java-jansi-native")
9165 (uri (string-append "https://github.com/fusesource/jansi-native/"
9166 "archive/jansi-native-" version ".tar.gz"))
9169 "0j2ydlgxbzbgshqkwghbxxxnbnx1mmjgd6k5fw6xfvxw1z956yqf"))))
9170 (build-system ant-build-system)
9172 `(#:jar-name "jansi-native.jar"
9173 #:source-dir "src/main/java"
9174 #:tests? #f; no tests
9176 (modify-phases %standard-phases
9177 (add-before 'build 'build-native
9178 (lambda* (#:key inputs #:allow-other-keys)
9179 ;; there are more required files for windows in windows/
9180 (with-directory-excursion "src/main/native-package/src"
9181 (substitute* "jansi_ttyname.c"
9182 (("#include \"jansi_.*") ""))
9183 (invoke "gcc" "-c" "jansi_ttyname.c" "-o" "jansi_ttyname.o"
9184 (string-append "-I" (assoc-ref inputs "java-hawtjni")
9186 (string-append "-I" (assoc-ref inputs "jdk")
9189 (invoke "gcc" "-o" "libjansi.so" "-shared" "jansi_ttyname.o"))))
9190 (add-before 'build 'install-native
9192 (let ((dir (string-append "build/classes/META-INF/native/"
9193 ,(match (%current-system)
9194 ((or "i686-linux" "armhf-linux")
9196 ((or "x86_64-linux" "aarch64-linux")
9198 (install-file "src/main/native-package/src/libjansi.so" dir))
9200 (add-after 'install 'install-native
9201 (lambda* (#:key outputs #:allow-other-keys)
9202 (install-file "src/main/native-package/src/jansi.h"
9203 (string-append (assoc-ref outputs "out") "/include"))
9206 `(("java-hawtjni" ,java-hawtjni)))
9207 (home-page "https://fusesource.github.io/jansi/")
9208 (synopsis "Native library for jansi")
9209 (description "This package provides the native library for jansi, a small
9210 Java library that allows you to use ANSI escape sequences to format your
9212 (license license:asl2.0)))
9214 (define-public java-jansi
9220 (uri (string-append "https://github.com/fusesource/jansi/archive/"
9221 "jansi-project-" version ".tar.gz"))
9224 "11kh3144i3fzp21dpy8zg52mjmsr214k7km9p8ly0rqk2px0qq2z"))))
9225 (build-system ant-build-system)
9227 `(#:jar-name "jansi.jar"
9228 #:source-dir "jansi/src/main/java"
9229 #:test-dir "jansi/src/test"
9231 (modify-phases %standard-phases
9232 (add-after 'check 'clear-term
9234 (invoke "echo" "-e" "\\e[0m"))))))
9236 `(("java-jansi-native" ,java-jansi-native)))
9238 `(("java-junit" ,java-junit)
9239 ("java-hamcrest-core" ,java-hamcrest-core)))
9240 (home-page "https://fusesource.github.io/jansi/")
9241 (synopsis "Portable ANSI escape sequences")
9242 (description "Jansi is a Java library that allows you to use ANSI escape
9243 sequences to format your console output which works on every platform.")
9244 (license license:asl2.0)))
9246 (define-public java-jboss-el-api-spec
9248 (name "java-jboss-el-api-spec")
9252 (uri (string-append "https://github.com/jboss/jboss-el-api_spec/"
9253 "archive/jboss-el-api_" version
9254 "_spec-1.0.7.Final.tar.gz"))
9257 "1j45ljxalwlibxl7g7iv952sjxkw275m8vyxxij8l6wdd5pf0pdh"))))
9258 (build-system ant-build-system)
9260 `(#:jar-name "java-jboss-el-api_spec.jar"
9263 `(("java-junit" ,java-junit)))
9264 (home-page "https://github.com/jboss/jboss-el-api_spec")
9265 (synopsis "JSR-341 expression language 3.0 API")
9266 (description "This package contains an implementation of the JSR-341
9267 specification for the expression language 3.0. It implements an expression
9268 language inspired by ECMAScript and XPath. This language is used with
9269 JavaServer Pages (JSP).")
9270 ;; Either GPL2 only or CDDL.
9271 (license (list license:gpl2 license:cddl1.1))))
9273 (define-public java-jboss-interceptors-api-spec
9275 (name "java-jboss-interceptors-api-spec")
9279 (uri (string-append "https://github.com/jboss/jboss-interceptors-api_spec/"
9280 "archive/jboss-interceptors-api_" version
9281 "_spec-1.0.0.Final.tar.gz"))
9284 "0wv8x0jp9a5qxlrgkhb5jdk2gr6vi87b4j4kjb8ryxiy9gn8g51z"))))
9285 (build-system ant-build-system)
9287 `(#:jar-name "java-jboss-interceptors-api_spec.jar"
9290 #:tests? #f)); no tests
9291 (home-page "https://github.com/jboss/jboss-interceptors-api_spec")
9292 (synopsis "Interceptors 1.2 API classes from JSR 318")
9293 (description "Java-jboss-interceptors-api-spec implements the Interceptors
9294 API. Interceptors are used to interpose on business method invocations and
9296 ;; Either GPL2 only or CDDL.
9297 (license (list license:gpl2 license:cddl1.1))))
9299 (define-public java-cdi-api
9301 (name "java-cdi-api")
9305 (uri (string-append "https://github.com/cdi-spec/cdi/archive/"
9307 (file-name (string-append name "-" version ".tar.gz"))
9310 "1iv8b8bp07c5kmqic14jsr868vycjv4qv02lf3pkgp9z21mnfg5y"))))
9311 (build-system ant-build-system)
9313 `(#:source-dir "api/src/main/java"
9314 #:jar-name "java-cdi-api.jar"
9315 #:test-dir "api/src/test"
9317 #:tests? #f)); Tests fail because we don't have a CDI provider yet
9319 `(("java-javax-inject" ,java-javax-inject)
9320 ("java-jboss-el-api-spec" ,java-jboss-el-api-spec)
9321 ("java-jboss-interceptors-api-spec" ,java-jboss-interceptors-api-spec)))
9323 `(("java-testng" ,java-testng)
9324 ("java-hamcrest-core" ,java-hamcrest-core)))
9325 (home-page "http://cdi-spec.org/")
9326 (synopsis "Contexts and Dependency Injection APIs")
9327 (description "Java-cdi-api contains the required APIs for Contexts and
9328 Dependency Injection (CDI).")
9329 (license license:asl2.0)))
9331 (define-public java-joda-convert
9333 (name "java-joda-convert")
9337 (uri (string-append "https://github.com/JodaOrg/joda-convert/archive/v"
9339 (file-name (string-append name "-" version ".tar.gz"))
9342 "0vp346xz7dh9br4q7xazhc7hvzf76a6hf95fki9bg67q5jr0kjh7"))))
9343 (build-system ant-build-system)
9345 `(#:jar-name (string-append ,name "-" ,version ".jar")
9346 #:source-dir "src/main/java"
9347 #:test-include (list "**/Test*.java")
9348 ;; Contains only interfaces and base classes (no test)
9349 #:test-exclude (list "**/test*/**.java")))
9351 `(("java-guava" ,java-guava)))
9353 `(("java-junit" ,java-junit)
9354 ("java-hamcrest-core" ,java-hamcrest-core)))
9355 (home-page "http://www.joda.org/joda-convert/")
9356 (synopsis "Conversion between Objects and Strings")
9357 (description "Joda-Convert provides a small set of classes to aid
9358 conversion between Objects and Strings. It is not intended to tackle the
9359 wider problem of Object to Object transformation.")
9360 (license license:asl2.0)))
9362 (define-public java-joda-time
9364 (name "java-joda-time")
9368 (uri (string-append "https://github.com/JodaOrg/joda-time/archive/v"
9370 (file-name (string-append name "-" version ".tar.gz"))
9373 "1i9x91mi7yg2pasl0k3912f1pg46n37sps6rdb0v1gs8hj9ppwc1"))))
9374 (build-system ant-build-system)
9376 `(#:jar-name "java-joda-time.jar"
9377 #:source-dir "src/main/java"
9378 #:test-include (list "**/Test*.java")
9379 ;; There is no runnable test in these files
9380 #:test-exclude (list "**/Test*Chronology.java" "**/Test*Field.java")
9382 (modify-phases %standard-phases
9383 (add-after 'build 'build-resources
9385 (mkdir-p "build/classes/org/joda/time/tz/data")
9386 (mkdir-p "build/classes/org/joda/time/format")
9387 ;; This will produce the following exception:
9388 ;; java.io.IOException: Resource not found: "org/joda/time/tz/data/ZoneInfoMap"
9389 ;; which is normal, because it doesn't exist yet. It still generates
9390 ;; the same file as in the binary one can find on maven.
9391 (invoke "java" "-cp"
9392 (string-append "build/classes:" (getenv "CLASSPATH"))
9393 "org.joda.time.tz.ZoneInfoCompiler"
9394 "-src" "src/main/java/org/joda/time/tz/src"
9395 "-dst" "build/classes/org/joda/time/tz/data"
9396 "africa" "antarctica" "asia" "australasia"
9397 "europe" "northamerica" "southamerica"
9398 "pacificnew" "etcetera" "backward" "systemv")
9399 (for-each (lambda (f)
9400 (copy-file f (string-append
9401 "build/classes/org/joda/time/format/"
9403 (find-files "src/main/java/org/joda/time/format" ".*.properties"))
9405 (add-before 'install 'regenerate-jar
9407 ;; We need to regenerate the jar file to add generated data.
9408 (delete-file "build/jar/java-joda-time.jar")
9409 (invoke "ant" "jar")))
9410 (add-before 'check 'copy-test-resources
9412 (mkdir-p "build/test-classes/org/joda/time/tz/data")
9413 (copy-file "src/test/resources/tzdata/ZoneInfoMap"
9414 "build/test-classes/org/joda/time/tz/data/ZoneInfoMap")
9415 (copy-recursively "src/test/resources" "build/test-classes")
9418 `(("java-joda-convert" ,java-joda-convert)))
9420 `(("java-junit" ,java-junit)
9421 ("java-hamcrest-core" ,java-hamcrest-core)
9422 ("tzdata" ,tzdata)))
9423 (home-page "http://www.joda.org/joda-time/")
9424 (synopsis "Replacement for the Java date and time classes")
9425 (description "Joda-Time is a replacement for the Java date and time
9426 classes prior to Java SE 8.")
9427 (license license:asl2.0)))
9429 (define-public java-xerces
9431 (name "java-xerces")
9436 (uri (string-append "mirror://apache/xerces/j/source/"
9437 "Xerces-J-src." version ".tar.gz"))
9439 (base32 "1006igwy2lqrmjvdk64v8dg6qbk9c29pm8xxx7r87n0vnpvmx6pm"))
9440 (patches (search-patches
9441 "java-xerces-xjavac_taskdef.patch"
9442 "java-xerces-build_dont_unzip.patch"
9443 "java-xerces-bootclasspath.patch"))))
9444 (build-system ant-build-system)
9446 `(#:tests? #f;; Test files are not present
9447 #:test-target "test"
9450 (modify-phases %standard-phases
9451 (add-after 'unpack 'create-build.properties
9452 (lambda* (#:key inputs #:allow-other-keys)
9453 (let ((jaxp (assoc-ref inputs "java-jaxp"))
9454 (resolver (assoc-ref inputs "java-apache-xml-commons-resolver")))
9455 (with-output-to-file "build.properties"
9458 "jar.jaxp = ~a/share/java/jaxp.jar~@
9459 jar.apis-ext = ~a/share/java/jaxp.jar~@
9460 jar.resolver = ~a/share/java/xml-resolver.jar~%"
9461 jaxp jaxp resolver)))
9462 ;; Make xerces use our version of jaxp in tests
9463 (substitute* "build.xml"
9465 (string-append jaxp "/share/java/jaxp.jar"))
9466 (("\\$\\{tools.dir\\}/\\$\\{jar.apis\\}")
9469 (replace 'install (install-jars "build")))))
9471 `(("java-apache-xml-commons-resolver" ,java-apache-xml-commons-resolver)
9472 ("java-jaxp" ,java-jaxp)))
9473 (home-page "https://xerces.apache.org/xerces2-j/")
9474 (synopsis "Validating XML parser for Java with DOM level 3 support")
9475 (description "The Xerces2 Java parser is the reference implementation of
9476 XNI, the Xerces Native Interface, and also a fully conforming XML Schema
9479 Xerces2-J supports the following standards and APIs:
9482 @item eXtensible Markup Language (XML) 1.0 Second Edition Recommendation
9483 @item Namespaces in XML Recommendation
9484 @item Document Object Model (DOM) Level 2 Core, Events, and Traversal and
9485 Range Recommendations
9486 @item Simple API for XML (SAX) 2.0.1 Core and Extension
9487 @item Java APIs for XML Processing (JAXP) 1.2.01
9488 @item XML Schema 1.0 Structures and Datatypes Recommendations
9489 @item Experimental implementation of the Document Object Model (DOM) Level 3
9490 Core and Load/Save Working Drafts
9491 @item Provides a partial implementation of the XML Inclusions (XInclude) W3C
9492 Candidate Recommendation
9495 Xerces is now able to parse documents written according to the XML 1.1
9496 Candidate Recommendation, except that it does not yet provide an option to
9497 enable normalization checking as described in section 2.13 of this
9498 specification. It also handles namespaces according to the XML Namespaces 1.1
9499 Candidate Recommendation, and will correctly serialize XML 1.1 documents if
9500 the DOM level 3 load/save API's are in use.")
9501 (license license:asl2.0)))
9503 (define-public java-jline
9509 (uri (string-append "https://github.com/jline/jline1/archive/jline-"
9513 "0bi3p6vrh7a6v0fbpb6rx9plpmx5zk3lr352xzdbz2jcxg499wir"))))
9514 (build-system ant-build-system)
9516 `(#:jar-name "jline.jar"
9517 #:source-dir "src/main/java"
9518 #:test-dir "src/test"
9520 (modify-phases %standard-phases
9521 (add-before 'build 'copy-resources
9523 (copy-recursively "src/main/resources" "build/classes")
9526 `(("java-junit" ,java-junit)))
9527 (home-page "https://jline.github.io")
9528 (synopsis "Console input handling library")
9529 (description "JLine is a Java library for handling console input. It is
9530 similar in functionality to BSD editline and GNU readline but with additional
9531 features that bring it on par with the Z shell line editor.")
9532 (license license:bsd-3)))
9534 (define-public java-jline-2
9536 (inherit java-jline)
9540 (uri (string-append "https://github.com/jline/jline2/archive/jline-"
9544 "1c6qa26mf0viw8hg4jnv72s7i1qb1gh1l8rrzcdvqhqhx82rkdlf"))))
9547 ,@(package-arguments java-jline)))
9549 `(("java-jansi" ,java-jansi)
9550 ("java-jansi-native" ,java-jansi-native)))
9552 `(("java-powermock-modules-junit4" ,java-powermock-modules-junit4)
9553 ("java-powermock-modules-junit4-common" ,java-powermock-modules-junit4-common)
9554 ("java-powermock-api-easymock" ,java-powermock-api-easymock)
9555 ("java-powermock-api-support" ,java-powermock-api-support)
9556 ("java-powermock-core" ,java-powermock-core)
9557 ("java-powermock-reflect" ,java-powermock-reflect)
9558 ("java-easymock" ,java-easymock)
9559 ("java-jboss-javassist" ,java-jboss-javassist)
9560 ("java-objenesis" ,java-objenesis)
9561 ("java-asm" ,java-asm)
9562 ("java-hamcrest-core" ,java-hamcrest-core)
9563 ("java-cglib" ,java-cglib)
9564 ("java-junit" ,java-junit)
9565 ("java-hawtjni" ,java-hawtjni)))))
9567 (define-public java-xmlunit
9569 (name "java-xmlunit")
9573 (uri (string-append "https://github.com/xmlunit/xmlunit/archive/v"
9575 (file-name (string-append name "-" version ".tar.gz"))
9578 "035rivlnmwhfqj0fzviciv0bkh1h95ps1iwnh2kjcvdbk5nccm4z"))))
9579 (build-system ant-build-system)
9581 `(#:jar-name "java-xmlunit.jar"
9582 #:source-dir "xmlunit-core/src/main/java"
9583 #:test-dir "xmlunit-core/src/test"
9585 (modify-phases %standard-phases
9586 (add-before 'check 'copy-test-resources
9587 (lambda* (#:key inputs #:allow-other-keys)
9588 (copy-recursively (assoc-ref inputs "resources") "../test-resources")
9591 `(("java-junit" ,java-junit)
9592 ("java-mockito-1" ,java-mockito-1)
9593 ("java-hamcrest-all" ,java-hamcrest-all)
9594 ("java-objenesis" ,java-objenesis)
9595 ("java-asm" ,java-asm)
9596 ("java-cglib" ,java-cglib)
9601 (url "https://github.com/xmlunit/test-resources.git")
9602 (commit "a590d2ae865c3e0455691d76ba8eefccc2215aec")))
9603 (file-name "java-xmlunit-test-resources")
9606 "0r0glj37pg5l868yjz78gckr91cs8fysxxbp9p328dssssi91agr"))))))
9607 (home-page "http://www.xmlunit.org/")
9608 (synopsis "XML output testing")
9609 (description "XMLUnit provides you with the tools to verify the XML you
9610 emit is the one you want to create. It provides helpers to validate against
9611 an XML Schema, assert the values of XPath queries or compare XML documents
9612 against expected outcomes.")
9613 (license license:asl2.0)))
9615 (define-public java-xmlunit-legacy
9617 (inherit java-xmlunit)
9618 (name "java-xmlunit-legacy")
9620 `(#:jar-name "java-xmlunit-legacy.jar"
9621 #:source-dir "xmlunit-legacy/src/main/java"
9622 #:test-dir "xmlunit-legacy/src/test"))
9624 `(("java-xmlunit" ,java-xmlunit)
9625 ("java-junit" ,java-junit)))
9627 `(("java-mockito-1" ,java-mockito-1)))))
9629 (define-public java-openchart2
9631 (name "java-openchart2")
9635 (uri (string-append "http://download.approximatrix.com/openchart2/"
9636 "openchart2-" version ".source.zip"))
9639 "1xq96zm5r02n1blja0072jmmsifmxc40lbyfbnmcnr6mw42frh4g"))))
9640 (build-system ant-build-system)
9642 `(#:test-target "test"
9644 (modify-phases %standard-phases
9645 (add-after 'unpack 'fix-junit-errors
9647 (with-directory-excursion "unittest/src/com/approximatrix/charting/"
9648 (substitute* '("coordsystem/ticklocator/NumericXTickLocatorTest.java"
9649 "coordsystem/ticklocator/NumericYTickLocatorTest.java"
9650 "coordsystem/ticklocator/ObjectXTickLocatorTest.java"
9651 "model/DefaultChartDataModelConstraintsTest.java"
9652 "model/MultiScatterDataModelConstraintsTest.java"
9653 "model/threedimensional/DotPlotDataModelConstraintsTest.java")
9654 (("(assertEquals[^;]+);" before _)
9655 (string-append (string-drop-right before 2) ", 1E-6);"))))
9657 (replace 'install (install-jars ".")))))
9660 ("java-junit" ,java-junit)
9661 ("java-hamcrest-core" ,java-hamcrest-core)))
9662 (home-page "http://approximatrix.com/products/openchart2/")
9663 (synopsis "Simple plotting for Java")
9664 (description "Openchart2 provides a simple, yet powerful, interface for
9665 Java programmers to create two-dimensional charts and plots. The library
9666 features an assortment of graph styles, including advanced scatter plots, bar
9667 graphs, and pie charts.")
9668 (license license:lgpl2.1+)))
9670 (define-public java-commons-httpclient
9672 (name "java-commons-httpclient")
9676 (uri (string-append "https://archive.apache.org/dist/httpcomponents/"
9677 "commons-httpclient/source/commons-httpclient-"
9678 version "-src.tar.gz"))
9681 "1wlpn3cfy3d4inxy6g7wxcsa8p7sshn6aldk9y4ia3lb879rd97r"))))
9682 (build-system ant-build-system)
9684 `(#:build-target "compile"
9685 #:test-target "test"
9686 #:tests? #f; requires junit-textui (junit 3)
9688 (modify-phases %standard-phases
9689 (add-before 'build 'fix-accent
9691 (for-each (lambda (file)
9692 (with-fluids ((%default-port-encoding "ISO-8859-1"))
9694 (("\\* @author Ortwin .*") "* @author Ortwin Glueck\n"))))
9695 '("src/java/org/apache/commons/httpclient/HttpContentTooLargeException.java"
9696 "src/examples/TrivialApp.java" "src/examples/ClientApp.java"
9697 "src/test/org/apache/commons/httpclient/TestHttps.java"
9698 "src/test/org/apache/commons/httpclient/TestURIUtil2.java"))
9701 (lambda* (#:key outputs #:allow-other-keys)
9702 (invoke "ant" "dist"
9703 (string-append "-Ddist.home=" (assoc-ref outputs "out")
9707 `(("java-commons-logging" ,java-commons-logging-minimal)
9708 ("java-commons-codec" ,java-commons-codec)))
9709 (home-page "https://hc.apache.org")
9710 (synopsis "HTTP/1.1 compliant HTTP agent implementation")
9711 (description "This package contains an HTTP/1.1 compliant HTTP agent
9712 implementation. It also provides reusable components for client-side
9713 authentication, HTTP state management, and HTTP connection management.")
9714 (license license:asl2.0)))
9716 (define-public java-commons-vfs
9718 (name "java-commons-vfs")
9722 (uri (string-append "mirror://apache/commons/vfs/source/"
9723 "commons-vfs2-distribution-" version "-src.tar.gz"))
9724 (file-name (string-append name "-" version ".tar.gz"))
9727 "1cnq1iaghbp4cslpnvwbp83i5v234x87irssqynhwpfgw7caf1s3"))
9728 (modules '((guix build utils)))
9731 (for-each delete-file
9732 (find-files "." "\\.jar$"))
9734 (build-system ant-build-system)
9736 `(#:jar-name "commons-vfs.jar"
9737 #:source-dir "commons-vfs2/src/main/java"
9738 #:test-dir "commons-vfs2/src/test"
9739 ; FIXME: tests depend on many things: apache sshd, hadoop, ftpserver, ...
9742 (modify-phases %standard-phases
9743 (add-before 'build 'remove-hadoop-and-webdav
9744 ; Remove these files as they are not required and depend on difficult
9747 (for-each delete-file-recursively
9748 '("commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/webdav"
9749 "commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/hdfs"))
9752 `(("java-commons-collections4" ,java-commons-collections4)
9753 ("java-commons-compress" ,java-commons-compress)
9754 ("java-commons-httpclient" ,java-commons-httpclient)
9755 ("java-commons-logging-minimal" ,java-commons-logging-minimal)
9756 ("java-commons-net" ,java-commons-net)
9757 ("java-jsch" ,java-jsch)))
9758 (home-page "http://commons.apache.org/proper/commons-vfs/")
9759 (synopsis "Java filesystem library")
9760 (description "Commons VFS provides a single API for accessing various
9761 different file systems. It presents a uniform view of the files from various
9762 different sources, such as the files on local disk, on an HTTP server, or
9763 inside a Zip archive.")
9764 (license license:asl2.0)))
9766 (define-public java-jakarta-oro
9768 (name "java-jakarta-oro")
9772 (uri (string-append "https://archive.apache.org/dist/jakarta/oro/"
9773 "jakarta-oro-" version ".tar.gz"))
9776 "0rpmnsskiwmsy8r0sckz5n5dbvh3vkxx8hpm177c754r8xy3qksc"))
9777 (modules '((guix build utils)))
9780 (delete-file (string-append "jakarta-oro-" ,version ".jar"))
9782 (build-system ant-build-system)
9784 `(#:build-target "package"
9785 #:tests? #f; tests are run as part of the build process
9787 (modify-phases %standard-phases
9789 (install-jars ,(string-append "jakarta-oro-" version))))))
9790 (home-page "https://jakarta.apache.org/oro/")
9791 (synopsis "Text-processing for Java")
9792 (description "The Jakarta-ORO Java classes are a set of text-processing
9793 Java classes that provide Perl5 compatible regular expressions, AWK-like
9794 regular expressions, glob expressions, and utility classes for performing
9795 substitutions, splits, filtering filenames, etc. This library is the successor
9796 of the OROMatcher, AwkTools, PerlTools, and TextTools libraries originally
9798 (license license:asl1.1)))
9800 (define-public java-native-access
9802 (name "java-native-access")
9806 (uri (string-append "https://github.com/java-native-access/jna/"
9807 "archive/" version ".tar.gz"))
9808 (file-name (string-append name "-" version ".tar.gz"))
9811 "0zrpzkib6b905i018a9pqlzkqinphywr6y4jwv6mwp63jjqvqkd9"))
9812 (modules '((guix build utils)))
9815 (for-each delete-file (find-files "." ".*.jar"))
9816 (delete-file-recursively "native/libffi")
9817 (delete-file-recursively "dist")
9819 (build-system ant-build-system)
9821 `(#:tests? #f; FIXME: tests require reflections.jar
9822 #:test-target "test"
9823 #:make-flags (list "-Ddynlink.native=true")
9825 (modify-phases %standard-phases
9826 (add-before 'build 'fix-build.xml
9827 (lambda* (#:key inputs #:allow-other-keys)
9828 (substitute* "build.xml"
9829 ;; Since we removed the bundled ant.jar, give the correct path
9830 (("lib/ant.jar") (string-append (assoc-ref inputs "ant") "/lib/ant.jar"))
9831 ;; We removed generated native libraries. We can only rebuild one
9832 ;; so don't fail if we can't find a native library for another architecture.
9833 (("zipfileset") "zipfileset erroronmissingarchive=\"false\""))
9834 ;; Copy test dependencies
9835 (copy-file (string-append (assoc-ref inputs "java-junit")
9836 "/share/java/junit.jar")
9838 (copy-file (string-append (assoc-ref inputs "java-hamcrest-core")
9839 "/share/java/hamcrest-core.jar")
9840 "lib/hamcrest-core.jar")
9841 ;; FIXME: once reflections.jar is built, copy it to lib/test.
9843 (add-before 'build 'build-native
9845 (invoke "ant" "-Ddynlink.native=true" "native")
9848 (install-jars "build")))))
9850 `(("libffi" ,libffi)
9854 `(("java-junit" ,java-junit)
9855 ("java-hamcrest-core" ,java-hamcrest-core)))
9856 (home-page "https://github.com/java-native-access/jna")
9857 (synopsis "Access to native shared libraries from Java")
9858 (description "JNA provides Java programs easy access to native shared
9859 libraries without writing anything but Java code - no JNI or native code is
9860 required. JNA allows you to call directly into native functions using natural
9861 Java method invocation.")
9862 ;; Java Native Access project (JNA) is dual-licensed under 2
9863 ;; alternative Free licenses: LGPL 2.1 or later and Apache License 2.0.
9866 license:lgpl2.1+))))
9868 (define-public java-native-access-platform
9870 (inherit java-native-access)
9871 (name "java-native-access-platform")
9873 `(#:test-target "test"
9874 #:tests? #f; require jna-test.jar
9876 (modify-phases %standard-phases
9877 (add-before 'build 'chdir
9879 (chdir "contrib/platform")
9881 (add-after 'chdir 'fix-ant
9882 (lambda* (#:key inputs #:allow-other-keys)
9883 (substitute* "nbproject/project.properties"
9884 (("../../build/jna.jar")
9885 (string-append (assoc-ref inputs "java-native-access")
9886 "/share/java/jna.jar"))
9887 (("../../lib/hamcrest-core-.*.jar")
9888 (string-append (assoc-ref inputs "java-hamcrest-core")
9889 "/share/java/hamcrest-core.jar"))
9890 (("../../lib/junit.jar")
9891 (string-append (assoc-ref inputs "java-junit")
9892 "/share/java/junit.jar")))
9895 (install-jars "dist")))))
9897 `(("java-native-access" ,java-native-access)))
9898 (synopsis "Cross-platform mappings for jna")
9899 (description "java-native-access-platfrom has cross-platform mappings
9900 and mappings for a number of commonly used platform functions, including a
9901 large number of Win32 mappings as well as a set of utility classes that
9902 simplify native access.")))
9904 (define-public java-jsch-agentproxy-core
9906 (name "java-jsch-agentproxy-core")
9910 (uri (string-append "https://github.com/ymnk/jsch-agent-proxy/archive/"
9912 (file-name (string-append name "-" version ".tar.gz"))
9915 "02iqg6jbc1kxvfzqcg6wy9ygqxfm82bw5rf6vnswqy4y572niz4q"))))
9916 (build-system ant-build-system)
9918 `(#:jar-name "jsch-agentproxy-core.jar"
9919 #:source-dir "jsch-agent-proxy-core/src/main/java"
9920 #:tests? #f)); no tests
9921 (home-page "https://github.com/ymnk/jsch-agent-proxy")
9922 (synopsis "Core component of the proxy to ssh-agent and Pageant in Java")
9923 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
9924 and Pageant included Putty. It will be easily integrated into JSch, and users
9925 will be allowed to use these programs for authentication.")
9926 (license license:bsd-3)))
9928 (define-public java-jsch-agentproxy-sshagent
9930 (inherit java-jsch-agentproxy-core)
9931 (name "java-jsch-agentproxy-sshagent")
9933 `(#:jar-name "jsch-agentproxy-sshagent.jar"
9934 #:source-dir "jsch-agent-proxy-sshagent/src/main/java"
9935 #:tests? #f)); no tests
9937 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
9938 (synopsis "Proxy to ssh-agent")
9939 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
9940 and Pageant included in Putty. This component contains the code for a proxy to
9943 (define-public java-jsch-agentproxy-usocket-jna
9945 (inherit java-jsch-agentproxy-core)
9946 (name "java-jsch-agentproxy-usocket-jna")
9948 `(#:jar-name "jsch-agentproxy-usocket-jna.jar"
9949 #:source-dir "jsch-agent-proxy-usocket-jna/src/main/java"
9950 #:tests? #f)); no tests
9952 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
9953 ("java-native-access" ,java-native-access)))
9954 (synopsis "USocketFactory implementation using JNA")
9955 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
9956 and Pageant included in Putty. This component contains an implementation of
9957 USocketFactory using @dfn{JNA} (Java Native Access).")))
9959 (define-public java-jsch-agentproxy-pageant
9961 (inherit java-jsch-agentproxy-core)
9962 (name "java-jsch-agentproxy-pageant")
9964 `(#:jar-name "jsch-agentproxy-pageant.jar"
9965 #:source-dir "jsch-agent-proxy-pageant/src/main/java"
9966 #:tests? #f)); no tests
9968 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
9969 ("java-native-access" ,java-native-access)
9970 ("java-native-access-platform" ,java-native-access-platform)))
9971 (synopsis "Proxy to pageant")
9972 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
9973 and Pageant included in Putty. This component contains the code for a proxy to
9976 (define-public java-jsch-agentproxy-usocket-nc
9978 (inherit java-jsch-agentproxy-core)
9979 (name "java-jsch-agentproxy-usocket-nc")
9981 `(#:jar-name "jsch-agentproxy-usocket-nc.jar"
9982 #:source-dir "jsch-agent-proxy-usocket-nc/src/main/java"
9983 #:tests? #f)); no tests
9985 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
9986 (synopsis "USocketFactory implementation using netcat")
9987 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
9988 and Pageant included in Putty. This component contains an implementation of
9989 USocketFactory using netcat.")))
9991 (define-public java-jsch-agentproxy-connector-factory
9993 (inherit java-jsch-agentproxy-core)
9994 (name "java-jsch-agentproxy-connector-factory")
9996 `(#:jar-name "jsch-agentproxy-connector-factory.jar"
9997 #:source-dir "jsch-agent-proxy-connector-factory/src/main/java"
9998 #:tests? #f)); no tests
10000 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
10001 ("java-jsch-agentproxy-sshagent" ,java-jsch-agentproxy-sshagent)
10002 ("java-jsch-agentproxy-usocket-jna" ,java-jsch-agentproxy-usocket-jna)
10003 ("java-jsch-agentproxy-pageant" ,java-jsch-agentproxy-pageant)
10004 ("java-jsch-agentproxy-usocket-nc" ,java-jsch-agentproxy-usocket-nc)))
10005 (synopsis "Connector factory for jsch agent proxy")
10006 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10007 and Pageant included in Putty. This component contains a connector factory.")))
10009 (define-public java-jsch-agentproxy-jsch
10011 (inherit java-jsch-agentproxy-core)
10012 (name "java-jsch-agentproxy-jsch")
10014 `(#:jar-name "jsch-agentproxy-jsch.jar"
10015 #:source-dir "jsch-agent-proxy-jsch/src/main/java"
10016 #:tests? #f)); no tests
10018 `(("java-jsch" ,java-jsch)
10019 ("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
10020 (synopsis "JSch integration library for agentproxy")
10021 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10022 and Pageant included in Putty. This component contains a library to use
10023 jsch-agent-proxy with JSch.")))
10025 (define-public java-apache-ivy
10027 (name "java-apache-ivy")
10031 (uri (string-append "mirror://apache//ant/ivy/" version
10032 "/apache-ivy-" version "-src.tar.gz"))
10035 "1xkfn57g2m7l6y0xdq75x5rnrgk52m9jx2xah70g3ggl8750hbr0"))
10038 "java-apache-ivy-port-to-latest-bouncycastle.patch"))))
10039 (build-system ant-build-system)
10041 `(#:jar-name "ivy.jar"
10044 (modify-phases %standard-phases
10045 (add-before 'build 'remove-example
10047 (delete-file-recursively "src/example")
10049 (add-before 'build 'copy-resources
10051 (with-directory-excursion "src/java"
10052 (for-each (lambda (file)
10053 (install-file file (string-append "../../build/classes/" (dirname file))))
10055 (find-files "." ".*.css")
10056 (find-files "." ".*.ent")
10057 (find-files "." ".*.html")
10058 (find-files "." ".*.properties")
10059 (find-files "." ".*.xsd")
10060 (find-files "." ".*.xsl")
10061 (find-files "." ".*.xml"))))
10063 (add-before 'build 'fix-vfs
10066 '("src/java/org/apache/ivy/plugins/repository/vfs/VfsRepository.java"
10067 "src/java/org/apache/ivy/plugins/repository/vfs/VfsResource.java")
10068 (("import org.apache.commons.vfs") "import org.apache.commons.vfs2"))
10070 (add-before 'install 'copy-manifest
10072 (install-file "META-INF/MANIFEST.MF" "build/classes/META-INF")
10074 (add-before 'install 'repack
10076 (invoke "jar" "-cmf" "build/classes/META-INF/MANIFEST.MF" "build/jar/ivy.jar"
10077 "-C" "build/classes" ".")))
10078 (add-after 'install 'install-bin
10079 (lambda* (#:key outputs #:allow-other-keys)
10080 (let* ((bin (string-append (assoc-ref outputs "out") "/bin"))
10081 (ivy (string-append bin "/ivy"))
10082 (jar (string-append (assoc-ref outputs "out") "/share/java/ivy.jar")))
10084 (with-output-to-file ivy
10086 (display (string-append
10087 "#!" (which "sh") "\n"
10088 "if [[ -z $CLASSPATH ]]; then\n"
10089 " cp=\"" (getenv "CLASSPATH") ":" jar "\"\n"
10091 " cp=\"" (getenv "CLASSPATH") ":" jar ":$CLASSPATH\"\n"
10093 (which "java") " -cp $cp org.apache.ivy.Main $@\n"))))
10097 `(("java-bouncycastle" ,java-bouncycastle)
10098 ("java-commons-cli" ,java-commons-cli)
10099 ("java-commons-collections" ,java-commons-collections)
10100 ("java-commons-httpclient" ,java-commons-httpclient)
10101 ("java-commons-lang" ,java-commons-lang)
10102 ("java-commons-vfs" ,java-commons-vfs)
10103 ("java-jakarta-oro" ,java-jakarta-oro)
10104 ("java-jsch" ,java-jsch)
10105 ("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
10106 ("java-jsch-agentproxy-connector-factory" ,java-jsch-agentproxy-connector-factory)
10107 ("java-jsch-agentproxy-jsch" ,java-jsch-agentproxy-jsch)
10108 ("java-junit" ,java-junit)))
10109 (home-page "https://ant.apache.org/ivy")
10110 (synopsis "Dependency manager for the Java programming language")
10111 (description "Ivy is a tool for managing (recording, tracking, resolving
10112 and reporting) project dependencies. It is characterized by the following:
10115 @item flexibility and configurability - Ivy is essentially process agnostic
10116 and is not tied to any methodology or structure. Instead it provides the
10117 necessary flexibility and configurability to be adapted to a broad range
10118 of dependency management and build processes.
10119 @item tight integration with Apache Ant - while available as a standalone tool,
10120 Ivy works particularly well with Apache Ant providing a number of
10121 powerful Ant tasks ranging from dependency resolution to dependency
10122 reporting and publication.
10124 (license license:asl2.0)))
10126 (define-public java-eclipse-sisu-inject
10128 (name "java-eclipse-sisu-inject")
10132 (uri (string-append "https://github.com/eclipse/sisu.inject/"
10133 "archive/releases/" version ".tar.gz"))
10136 "11rg6yw5nl13i65xsp4jxxgr341qcnnaan48p767h28kb07s0ajn"))))
10137 (build-system ant-build-system)
10139 `(#:jar-name "eclipse-sisu-inject.jar"
10140 #:source-dir "org.eclipse.sisu.inject/src"
10142 #:tests? #f)); no tests
10144 `(("java-guice" ,java-guice)
10145 ("java-guice-servlet" ,java-guice-servlet)
10146 ("java-javax-inject" ,java-javax-inject)
10147 ("java-javaee-servletapi" ,java-javaee-servletapi)
10148 ("java-junit" ,java-junit)
10149 ("java-slf4j-api" ,java-slf4j-api)
10150 ("java-jsr305" ,java-jsr305)
10151 ("java-jsr250" ,java-jsr250)
10152 ("java-cdi-api" ,java-cdi-api)
10153 ("java-osgi-framework" ,java-osgi-framework)
10154 ("java-osgi-util-tracker" ,java-osgi-util-tracker)
10155 ("java-testng" ,java-testng)))
10156 (home-page "https://www.eclipse.org/sisu/")
10157 (synopsis "Classpath scanning, auto-binding, and dynamic auto-wiring")
10158 (description "Sisu is a modular JSR330-based container that supports
10159 classpath scanning, auto-binding, and dynamic auto-wiring. Sisu uses
10160 Google-Guice to perform dependency injection and provide the core JSR330
10161 support, but removes the need to write explicit bindings in Guice modules.
10162 Integration with other containers via the Eclipse Extension Registry and the
10163 OSGi Service Registry is a goal of this project.")
10164 (license license:epl1.0)))
10166 (define-public java-eclipse-sisu-plexus
10168 (name "java-eclipse-sisu-plexus")
10172 (uri (string-append "https://github.com/eclipse/sisu.plexus/"
10173 "archive/releases/" version ".tar.gz"))
10176 "0lbj7nxy5j0z71k407zbb82icfqh7midrfk0fb3fa3jzdjz0d9d9"))
10177 (modules '((guix build utils)))
10180 (for-each delete-file (find-files "." ".*.jar"))
10181 (rename-file "org.eclipse.sisu.plexus.tests/src"
10182 "org.eclipse.sisu.plexus.tests/java")
10184 (build-system ant-build-system)
10186 `(#:jar-name "eclipse-sisu-plexus.jar"
10187 #:source-dir "org.eclipse.sisu.plexus/src"
10188 #:test-dir "org.eclipse.sisu.plexus.tests"
10191 ;; This test fails probably because we can't generate the necessary
10193 "**/PlexusLoggingTest.*"
10194 ;; FIXME: This test fails because of some injection error
10195 "**/PlexusRequirementTest.*")
10198 (modify-phases %standard-phases
10199 (add-before 'build 'copy-resources
10201 (install-file "org.eclipse.sisu.plexus/META-INF/plexus/components.xml"
10202 "build/classes/META-INF/plexus")
10204 (add-before 'check 'build-test-jar
10206 (with-directory-excursion "org.eclipse.sisu.plexus.tests/resources/component-jar/src/main/"
10208 (with-directory-excursion "java"
10209 (apply invoke "javac" "-cp"
10210 (string-append (getenv "CLASSPATH")
10211 ":../../../../../build/classes")
10212 (find-files "." ".*.java"))
10213 (for-each (lambda (file) (install-file file (string-append "../build/" file)))
10214 (find-files "." ".*.jar")))
10215 (mkdir-p "build/META-INF/plexus")
10216 (copy-file "resources/META-INF/plexus/components.xml"
10217 "build/META-INF/plexus/components.xml")
10218 (with-directory-excursion "build"
10219 (invoke "jar" "cf" "../../../component-jar-0.1.jar" ".")))
10220 (with-directory-excursion "org.eclipse.sisu.plexus.tests/"
10221 (copy-recursively "META-INF" "../build/test-classes/META-INF")
10222 (substitute* "java/org/eclipse/sisu/plexus/DefaultPlexusContainerTest.java"
10223 (("resources/component-jar")
10224 "org.eclipse.sisu.plexus.tests/resources/component-jar")))
10227 `(("java-plexus-classworlds" ,java-plexus-classworlds)
10228 ("java-plexus-util" ,java-plexus-utils)
10229 ("java-plexus-component-annotations" ,java-plexus-component-annotations)
10230 ("java-osgi-framework" ,java-osgi-framework)
10231 ("java-eclipse-sisu-inject" ,java-eclipse-sisu-inject)
10232 ("java-guice" ,java-guice)
10233 ("java-javax-inject" ,java-javax-inject)
10234 ("java-slf4j-api" ,java-slf4j-api)
10235 ("java-junit" ,java-junit)))
10237 `(("java-guava" ,java-guava)
10238 ("java-aopalliance" ,java-aopalliance)
10239 ("java-cglib" ,java-cglib)
10240 ("java-asm" ,java-asm)))
10241 (home-page "https://www.eclipse.org/sisu/")
10242 (synopsis "Plexus support for the sisu container")
10243 (description "Sisu is a modular JSR330-based container that supports
10244 classpath scanning, auto-binding, and dynamic auto-wiring. This package
10245 adds Plexus support to the Sisu-Inject container.")
10246 (license license:epl1.0)))
10248 (define-public java-commons-compiler
10250 (name "java-commons-compiler")
10254 (uri (git-reference
10255 (url "https://github.com/janino-compiler/janino")
10256 (commit "91aa95686d1e4ca3b16a984a03a38686572331b2")))
10257 (file-name (string-append name "-" version))
10260 "04hfdl59sgh20qkxzgnibvs8f9hy6n7znxwpk611y5d89977y62r"))
10261 (modules '((guix build utils)))
10264 (for-each delete-file
10265 (find-files "." "\\.jar$"))
10267 (build-system ant-build-system)
10269 `(#:jar-name "commons-compiler.jar"
10270 #:source-dir "commons-compiler/src/main"
10271 #:tests? #f)); no tests
10272 (home-page "https://github.com/janino-compiler/janino")
10273 (synopsis "Java compiler")
10274 (description "Commons-compiler contains an API for janino, including the
10275 @code{IExpressionEvaluator}, @code{IScriptEvaluator}, @code{IClassBodyEvaluator}
10276 and @code{ISimpleCompiler} interfaces.")
10277 (license license:bsd-3)))
10279 (define-public java-janino
10281 (inherit java-commons-compiler)
10282 (name "java-janino")
10284 `(#:jar-name "janino.jar"
10285 #:source-dir "src/main/java"
10287 (modify-phases %standard-phases
10288 (add-before 'configure 'chdir
10293 `(("java-commons-compiler" ,java-commons-compiler)))
10295 `(("java-junit" ,java-junit)
10296 ("java-hamcrest-core" ,java-hamcrest-core)))
10297 (description "Janino is a Java compiler. Janino can compile a set of
10298 source files to a set of class files like @code{javac}, but also compile a
10299 Java expression, block, class body or source file in memory, load the bytecode
10300 and execute it directly in the same JVM. @code{janino} can also be used for
10301 static code analysis or code manipulation.")))
10303 (define-public java-logback-core
10305 (name "java-logback-core")
10309 (uri (string-append "https://github.com/qos-ch/logback/archive/v_"
10310 version ".tar.gz"))
10311 (file-name (string-append name "-" version ".tar.gz"))
10314 "1x6ga74yfgm94cfx98gybakbrlilx8i2gn6dx13l40kasmys06mi"))
10315 (modules '((guix build utils)))
10318 (delete-file-recursively "logback-access/lib")
10320 (build-system ant-build-system)
10322 `(#:jar-name "logback.jar"
10323 #:source-dir "src/main/java"
10324 #:test-dir "src/test"
10326 ;; These tests fail with Unable to set MockitoNamingPolicy on cglib generator
10327 ;; which creates FastClasses
10328 (list "**/AllCoreTest.*"
10329 "**/AutoFlushingObjectWriterTest.*"
10331 "**/ResilientOutputStreamTest.*"
10332 ;; And we still don't want to run abstract classes
10335 (modify-phases %standard-phases
10336 (add-before 'configure 'chdir
10338 (chdir "logback-core")
10341 `(("java-javax-mail" ,java-javax-mail)
10342 ("servlet" ,java-javaee-servletapi)
10343 ("java-commons-compiler" ,java-commons-compiler)
10344 ("java-janino" ,java-janino)))
10346 `(("java-junit" ,java-junit)
10347 ("java-hamcrest-core" ,java-hamcrest-core)
10348 ("java-mockito-1" ,java-mockito-1)
10349 ("java-cglib" ,java-cglib)
10350 ("java-asm" ,java-asm)
10351 ("java-objenesis" ,java-objenesis)
10352 ("java-joda-time" ,java-joda-time)))
10353 (home-page "https://logback.qos.ch")
10354 (synopsis "Logging for java")
10355 (description "Logback is intended as a successor to the popular log4j project.
10356 This module lays the groundwork for the other two modules.")
10357 ;; Either epl1.0 or lgpl2.1
10358 (license (list license:epl1.0
10359 license:lgpl2.1))))
10361 (define-public java-logback-classic
10363 (inherit java-logback-core)
10364 (name "java-logback-classic")
10366 `(#:jar-name "logback-classic.jar"
10367 #:source-dir "src/main/java"
10368 #:test-dir "src/test"
10369 #:tests? #f; tests require more packages: h2, greenmail, hsql, subethamail, slf4j, log4j, felix
10372 (modify-phases %standard-phases
10373 (add-before 'configure 'chdir
10375 (chdir "logback-classic")
10378 (lambda* (#:key inputs #:allow-other-keys)
10379 (mkdir-p "build/classes")
10380 (setenv "CLASSPATH"
10382 (apply append (map (lambda (input)
10383 (find-files (assoc-ref inputs input)
10385 '("java-logback-core" "java-slf4j-api"
10386 "java-commons-compiler" "servlet"
10389 (apply invoke "groovyc" "-d" "build/classes" "-j"
10390 (find-files "src/main/" ".*\\.(groovy|java)$"))
10391 (invoke "ant" "jar")
10394 `(("java-logback-core" ,java-logback-core)
10395 ("java-slf4j-api" ,java-slf4j-api)
10396 ,@(package-inputs java-logback-core)))
10398 `(("groovy" ,groovy)))
10399 (description "Logback is intended as a successor to the popular log4j project.
10400 This module can be assimilated to a significantly improved version of log4j.
10401 Moreover, @code{logback-classic} natively implements the slf4j API so that you
10402 can readily switch back and forth between logback and other logging frameworks
10403 such as log4j or @code{java.util.logging} (JUL).")))
10405 (define-public java-qdox
10408 ; Newer version exists, but this version is required by java-plexus-component-metadata
10412 ;; 2.0-M4, -M5 at https://github.com/paul-hammant/qdox
10413 ;; Older releases at https://github.com/codehaus/qdox/
10414 ;; Note: The release at maven is pre-generated. The release at
10415 ;; github requires jflex.
10416 (uri (string-append "http://central.maven.org/maven2/"
10417 "com/thoughtworks/qdox/qdox/" version
10418 "/qdox-" version "-sources.jar"))
10421 "10xxrcaicq6axszcr2jpygisa4ch4sinyx5q7kqqxv4lknrmxp5x"))))
10422 (build-system ant-build-system)
10424 `(#:jar-name "qdox.jar"
10425 #:tests? #f)); no tests
10426 (home-page "http://qdox.codehaus.org/")
10427 (synopsis "Parse definitions from Java source files")
10428 (description "QDox is a high speed, small footprint parser for extracting
10429 class/interface/method definitions from source files complete with JavaDoc
10430 @code{@@tags}. It is designed to be used by active code generators or
10431 documentation tools.")
10432 (license license:asl2.0)))