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>
13 ;;; This file is part of GNU Guix.
15 ;;; GNU Guix is free software; you can redistribute it and/or modify it
16 ;;; under the terms of the GNU General Public License as published by
17 ;;; the Free Software Foundation; either version 3 of the License, or (at
18 ;;; your option) any later version.
20 ;;; GNU Guix is distributed in the hope that it will be useful, but
21 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
22 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 ;;; GNU General Public License for more details.
25 ;;; You should have received a copy of the GNU General Public License
26 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
28 (define-module (gnu packages java)
29 #:use-module ((guix licenses) #:prefix license:)
30 #:use-module (guix packages)
31 #:use-module (guix download)
32 #:use-module (guix hg-download)
33 #:use-module (guix git-download)
34 #:use-module (guix svn-download)
35 #:use-module (guix utils)
36 #:use-module (guix build-system ant)
37 #:use-module (guix build-system gnu)
38 #:use-module (guix build-system trivial)
39 #:use-module (gnu packages)
40 #:use-module (gnu packages attr)
41 #:use-module (gnu packages autotools)
42 #:use-module (gnu packages base)
43 #:use-module (gnu packages bash)
44 #:use-module (gnu packages certs)
45 #:use-module (gnu packages cpio)
46 #:use-module (gnu packages cups)
47 #:use-module (gnu packages compression)
48 #:use-module (gnu packages fontutils)
49 #:use-module (gnu packages gawk)
50 #:use-module (gnu packages gettext)
51 #:use-module (gnu packages gcc)
52 #:use-module (gnu packages gl)
53 #:use-module (gnu packages gnuzilla) ;nss
54 #:use-module (gnu packages ghostscript) ;lcms
55 #:use-module (gnu packages gnome)
56 #:use-module (gnu packages groovy)
57 #:use-module (gnu packages gtk)
58 #:use-module (gnu packages guile)
59 #:use-module (gnu packages icu4c)
60 #:use-module (gnu packages image)
61 #:use-module (gnu packages libffi)
62 #:use-module (gnu packages linux) ;alsa
63 #:use-module (gnu packages maths)
64 #:use-module (gnu packages onc-rpc)
65 #:use-module (gnu packages web)
66 #:use-module (gnu packages wget)
67 #:use-module (gnu packages pkg-config)
68 #:use-module (gnu packages perl)
69 #:use-module (gnu packages popt)
70 #:use-module (gnu packages kerberos)
71 #:use-module (gnu packages xml)
72 #:use-module (gnu packages xorg)
73 #:use-module (gnu packages texinfo)
74 #:use-module ((srfi srfi-1) #:select (fold alist-delete))
75 #:use-module (srfi srfi-11)
76 #:use-module (ice-9 match))
80 ;;; Java bootstrap toolchain.
83 ;; The Java bootstrap begins with Jikes, a Java compiler written in C++. We
84 ;; use it to build a simple version of GNU Classpath, the Java standard
85 ;; library. We chose version 0.93 because it is the last version that can be
86 ;; built with Jikes. With Jikes and this version of GNU Classpath we can
87 ;; build JamVM, a Java Virtual Machine. We build version 1.5.1 because it is
88 ;; the last version of JamVM that works with a version of GNU classpath that
89 ;; does not require ECJ. These three packages make up the bootstrap JDK.
91 ;; This is sufficient to build an older version of Ant, which is needed to
92 ;; build an older version of ECJ, an incremental Java compiler, both of which
93 ;; are written in Java.
95 ;; ECJ is needed to build the latest release (0.99) and the development
96 ;; version of GNU Classpath. The development version of GNU Classpath has
97 ;; much more support for Java 1.6 than the latest release, but we need to
98 ;; build 0.99 first to get a working version of javah. ECJ, the development
99 ;; version of GNU Classpath, and the latest version of JamVM make up the
100 ;; second stage JDK with which we can build the OpenJDK with the Icedtea 1.x
101 ;; build framework. We then build the more recent JDKs Icedtea 2.x and
110 (uri (string-append "mirror://sourceforge/jikes/Jikes/"
111 version "/jikes-" version ".tar.bz2"))
114 "1qqldrp74pzpy5ly421srqn30qppmm9cvjiqdngk8hf47dv2rc0c"))))
115 (build-system gnu-build-system)
116 (home-page "http://jikes.sourceforge.net/")
117 (synopsis "Compiler for the Java language")
118 (description "Jikes is a compiler that translates Java source files as
119 defined in The Java Language Specification into the bytecoded instruction set
120 and binary format defined in The Java Virtual Machine Specification.")
121 (license license:ibmpl1.0)))
123 ;; This is the last version of GNU Classpath that can be built without ECJ.
124 (define classpath-bootstrap
130 (uri (string-append "mirror://gnu/classpath/classpath-"
134 "0i99wf9xd3hw1sj2sazychb9prx8nadxh2clgvk3zlmb28v0jbfz"))
135 (patches (search-patches "classpath-aarch64-support.patch"))))
136 (build-system gnu-build-system)
139 (list (string-append "JAVAC="
140 (assoc-ref %build-inputs "jikes")
145 "--disable-gconf-peer"
151 (modify-phases %standard-phases
152 (add-after 'install 'install-data
153 (lambda _ (zero? (system* "make" "install-data")))))))
158 ("pkg-config" ,pkg-config)))
159 (home-page "https://www.gnu.org/software/classpath/")
160 (synopsis "Essential libraries for Java")
161 (description "GNU Classpath is a project to create core class libraries
162 for use with runtimes, compilers and tools for the Java programming
164 ;; GPLv2 or later, with special linking exception.
165 (license license:gpl2+)))
167 ;; This is the last version of JamVM that works with a version of GNU
168 ;; classpath that does not require ECJ.
169 (define jamvm-1-bootstrap
175 (uri (string-append "mirror://sourceforge/jamvm/jamvm/"
176 "JamVM%20" version "/jamvm-"
180 "06lhi03l3b0h48pc7x58bk9my2nrcf1flpmglvys3wyad6yraf36"))))
181 (build-system gnu-build-system)
184 (list (string-append "--with-classpath-install-dir="
185 (assoc-ref %build-inputs "classpath")))))
187 `(("classpath" ,classpath-bootstrap)
190 (home-page "http://jamvm.sourceforge.net/")
191 (synopsis "Small Java Virtual Machine")
192 (description "JamVM is a Java Virtual Machine conforming to the JVM
193 specification edition 2 (blue book). It is extremely small. However, unlike
194 other small VMs it supports the full spec, including object finalisation and
196 (license license:gpl2+)))
198 (define ant-bootstrap
200 (name "ant-bootstrap")
201 ;; The 1.10.x series requires Java 8. 1.9.0 and later use generics, which
202 ;; are not supported. The 1.8.x series is the last to use only features
203 ;; supported by Jikes.
207 (uri (string-append "http://archive.apache.org/dist/"
208 "ant/source/apache-ant-"
209 version "-src.tar.bz2"))
212 "1cg0lga887qz5iizh6mlkxp01lciymrhmp7wzxpl6zpnldxmzrjx"))))
213 (build-system gnu-build-system)
215 `(#:tests? #f ; no "check" target
217 (modify-phases %standard-phases
221 (lambda* (#:key inputs #:allow-other-keys)
222 (setenv "JAVA_HOME" (assoc-ref inputs "jamvm"))
224 (string-append (assoc-ref inputs "jamvm")
227 (string-append (assoc-ref inputs "jikes")
230 (string-append (assoc-ref inputs "jamvm")
233 ;; Ant complains if this file doesn't exist.
234 (setenv "HOME" "/tmp")
235 (with-output-to-file "/tmp/.ant.properties"
236 (lambda _ (display "")))
238 ;; Use jikes instead of javac for <javac ...> tags in build.xml
239 (setenv "ANT_OPTS" "-Dbuild.compiler=jikes")
241 ;; jikes produces lots of warnings, but they are not very
242 ;; interesting, so we silence them.
243 (setenv "$BOOTJAVAC_OPTS" "-nowarn")
245 ;; Without these JamVM options the build may freeze.
246 (substitute* "bootstrap.sh"
247 (("^\"\\$\\{JAVACMD\\}\" " m)
248 (string-append m "-Xnocompact -Xnoinlining ")))
250 ;; Disable tests because we are bootstrapping and thus don't have
251 ;; any of the dependencies required to build and run the tests.
252 (substitute* "build.xml"
253 (("depends=\"jars,test-jar\"") "depends=\"jars\""))
254 (zero? (system* "bash" "bootstrap.sh"
255 (string-append "-Ddist.dir="
256 (assoc-ref %outputs "out"))))))
260 ("jamvm" ,jamvm-1-bootstrap)))
261 (home-page "http://ant.apache.org")
262 (synopsis "Build tool for Java")
264 "Ant is a platform-independent build tool for Java. It is similar to
265 make but is implemented using the Java language, requires the Java platform,
266 and is best suited to building Java projects. Ant uses XML to describe the
267 build process and its dependencies, whereas Make uses Makefile format.")
268 (license license:asl2.0)))
270 ;; Version 3.2.2 is the last version without a dependency on a full-fledged
271 ;; compiler for Java 1.5.
272 (define ecj-bootstrap
274 (name "ecj-bootstrap")
278 (uri (string-append "http://archive.eclipse.org/eclipse/"
279 "downloads/drops/R-" version
280 "-200702121330/ecjsrc.zip"))
283 "05hj82kxd23qaglsjkaqcj944riisjha7acf7h3ljhrjyljx8307"))))
284 ;; It would be so much easier if we could use the ant-build-system, but we
285 ;; cannot as we don't have ant at this point. We use ecj for
286 ;; bootstrapping the JDK.
287 (build-system gnu-build-system)
289 `(#:modules ((guix build gnu-build-system)
292 #:tests? #f ; there are no tests
294 (modify-phases %standard-phases
296 (lambda* (#:key inputs #:allow-other-keys)
299 (cons (string-append (assoc-ref inputs "jamvm")
301 (find-files (string-append
302 (assoc-ref inputs "ant-bootstrap")
308 (lambda* (#:key inputs #:allow-other-keys)
309 ;; The unpack phase enters the "org" directory by mistake.
312 ;; Create a simple manifest to make ecj executable.
313 (with-output-to-file "manifest"
315 (display "Manifest-Version: 1.0
316 Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n")))
319 (and (zero? (apply system* "jikes"
320 (find-files "." "\\.java$")))
321 (zero? (system* "fastjar" "cvfm"
322 "ecj-bootstrap.jar" "manifest" ".")))))
324 (lambda* (#:key outputs #:allow-other-keys)
325 (let ((share (string-append (assoc-ref outputs "out")
328 (install-file "ecj-bootstrap.jar" share)
331 `(("ant-bootstrap" ,ant-bootstrap)
334 ("jamvm" ,jamvm-1-bootstrap)
335 ("fastjar" ,fastjar)))
336 (home-page "https://eclipse.org")
337 (synopsis "Eclipse Java development tools core batch compiler")
338 (description "This package provides the Eclipse Java core batch compiler
339 for bootstrapping purposes. The @dfn{Eclipse compiler for Java} (ecj) is a
340 requirement for all GNU Classpath releases after version 0.93.")
341 (license license:epl1.0)))
343 (define ecj-javac-wrapper
344 (package (inherit ecj-bootstrap)
345 (name "ecj-javac-wrapper")
347 (build-system trivial-build-system)
349 `(#:modules ((guix build utils))
352 (use-modules (guix build utils))
353 (let* ((bin (string-append (assoc-ref %outputs "out") "/bin"))
354 (target (string-append bin "/javac"))
355 (guile (string-append (assoc-ref %build-inputs "guile")
357 (ecj (string-append (assoc-ref %build-inputs "ecj-bootstrap")
358 "/share/java/ecj-bootstrap.jar"))
359 (java (string-append (assoc-ref %build-inputs "jamvm")
361 (bootcp (let ((jvmlib (string-append (assoc-ref %build-inputs "classpath")
362 "/share/classpath")))
363 (string-append jvmlib "/glibj.zip:"
364 jvmlib "/tools.zip"))))
366 (with-output-to-file target
368 (format #t "#!~a --no-auto-compile\n!#\n" guile)
370 `(begin (use-modules (ice-9 match)
376 '(("-bootclasspath" ,bootcp)
381 (let ((classpath (getenv "CLASSPATH")))
383 (string-join (list ,ecj
384 ,(string-append (assoc-ref %build-inputs "jamvm")
388 (receive (vm-args other-args)
389 ;; Separate VM arguments from arguments to ECJ.
390 (partition (cut string-prefix? "-J" <>)
391 (fold (lambda (default acc)
392 (if (member (first default) acc)
393 acc (append default acc)))
397 (list "-Xnocompact" "-Xnoinlining")
398 ;; Remove "-J" prefix
399 (map (cut string-drop <> 2) vm-args)
400 '("org.eclipse.jdt.internal.compiler.batch.Main")
401 (cons "-nowarn" other-args)))))
403 (let ((args (cdr (command-line))))
405 (format (current-error-port) "javac: no arguments given!\n")
410 `(("guile" ,guile-2.2)
411 ("ecj-bootstrap" ,ecj-bootstrap)
412 ("jamvm" ,jamvm-1-bootstrap)
413 ("classpath" ,classpath-bootstrap)))
414 (description "This package provides a wrapper around the @dfn{Eclipse
415 compiler for Java} (ecj) with a command line interface that is compatible with
416 the standard javac executable.")))
418 ;; The classpath-bootstrap was built without a virtual machine, so it does not
419 ;; provide a wrapper for javah. We cannot build the development version of
420 ;; Classpath without javah.
421 (define classpath-0.99
422 (package (inherit classpath-bootstrap)
426 (uri (string-append "mirror://gnu/classpath/classpath-"
430 "1j7cby4k66f1nvckm48xcmh352b1d1b33qk7l6hi7dp9i9zjjagr"))
431 (patches (search-patches "classpath-aarch64-support.patch"))))
434 (list (string-append "--with-ecj-jar="
435 (assoc-ref %build-inputs "ecj-bootstrap")
436 "/share/java/ecj-bootstrap.jar")
437 (string-append "JAVAC="
438 (assoc-ref %build-inputs "ecj-javac-wrapper")
440 (string-append "JAVA="
441 (assoc-ref %build-inputs "jamvm")
444 "ac_cv_prog_java_works=yes" ; trust me
448 "--disable-gconf-peer"
454 (modify-phases %standard-phases
455 (add-after 'install 'install-data
456 (lambda _ (zero? (system* "make" "install-data")))))))
458 `(("ecj-bootstrap" ,ecj-bootstrap)
459 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
461 ("jamvm" ,jamvm-1-bootstrap)
462 ("classpath" ,classpath-bootstrap)
464 ("pkg-config" ,pkg-config)))))
466 ;; We need this because classpath-bootstrap does not provide all of the tools
467 ;; we need to build classpath-devel.
468 (define classpath-jamvm-wrappers
469 (package (inherit classpath-0.99)
470 (name "classpath-jamvm-wrappers")
472 (build-system trivial-build-system)
474 `(#:modules ((guix build utils))
477 (use-modules (guix build utils))
478 (let* ((bash (assoc-ref %build-inputs "bash"))
479 (jamvm (assoc-ref %build-inputs "jamvm"))
480 (classpath (assoc-ref %build-inputs "classpath"))
481 (bin (string-append (assoc-ref %outputs "out")
484 (for-each (lambda (tool)
485 (with-output-to-file (string-append bin tool)
487 (format #t "#!~a/bin/sh
488 ~a/bin/jamvm -Xnocompact -Xnoinlining -classpath ~a/share/classpath/tools.zip \
489 gnu.classpath.tools.~a.~a $@"
490 bash jamvm classpath tool
491 (if (string=? "native2ascii" tool)
492 "Native2ASCII" "Main"))))
493 (chmod (string-append bin tool) #o755))
503 ("jamvm" ,jamvm-1-bootstrap)
504 ("classpath" ,classpath-0.99)))
506 (synopsis "Executables from GNU Classpath")
507 (description "This package provides wrappers around the tools provided by
508 the GNU Classpath library. They are executed by the JamVM virtual
511 ;; The last release of GNU Classpath is 0.99 and it happened in 2012. Since
512 ;; then Classpath has gained much more support for Java 1.6.
513 (define-public classpath-devel
514 (let ((commit "e7c13ee0cf2005206fbec0eca677f8cf66d5a103")
516 (package (inherit classpath-bootstrap)
517 (version (string-append "0.99-" revision "." (string-take commit 9)))
521 (url "https://git.savannah.gnu.org/git/classpath.git")
523 (file-name (string-append "classpath-" version "-checkout"))
526 "1v2rww76ww322mpg3s12a1kkc6gkp31bm9gcxs532h0wq285fiw4"))))
529 ;; Ensure that the initial heap size is smaller than the maximum
530 ;; size. By default only Xmx is set, which can lead to invalid
531 ;; memory settings on some machines with a lot of memory.
532 '("JAVAC_MEM_OPT=-J-Xms512M -J-Xmx768M")
534 (list (string-append "--with-ecj-jar="
535 (assoc-ref %build-inputs "ecj-bootstrap")
536 "/share/java/ecj-bootstrap.jar")
537 (string-append "--with-javac="
538 (assoc-ref %build-inputs "ecj-javac-wrapper")
540 (string-append "JAVA="
541 (assoc-ref %build-inputs "jamvm")
544 "ac_cv_prog_java_works=yes" ; trust me
548 "--disable-gconf-peer"
554 (modify-phases %standard-phases
555 ;; XXX The bootstrap phase executes autogen.sh, which fails after
556 ;; complaining about the lack of gettext.
558 (lambda _ (invoke "autoreconf" "-vif")))
559 (add-after 'unpack 'remove-unsupported-annotations
561 (substitute* (find-files "java" "\\.java$")
564 (add-after 'install 'install-data
565 (lambda _ (zero? (system* "make" "install-data")))))))
567 `(("autoconf" ,autoconf)
568 ("automake" ,automake)
570 ("gettext" ,gettext-minimal)
572 ("classpath-jamvm-wrappers" ,classpath-jamvm-wrappers) ; for javah
573 ("ecj-bootstrap" ,ecj-bootstrap)
574 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
576 ("jamvm" ,jamvm-1-bootstrap)
578 ("pkg-config" ,pkg-config))))))
581 (package (inherit jamvm-1-bootstrap)
585 (uri (string-append "mirror://sourceforge/jamvm/jamvm/"
586 "JamVM%20" version "/jamvm-"
590 "1nl0zxz8y5x8gwsrm7n32bry4dx8x70p8z3s9jbdvs8avyb8whkn"))))
591 (build-system gnu-build-system)
594 (list (string-append "--with-classpath-install-dir="
595 (assoc-ref %build-inputs "classpath")))))
597 `(("classpath" ,classpath-devel)
598 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
601 (define ecj-javac-wrapper-final
602 (package (inherit ecj-javac-wrapper)
604 `(("guile" ,guile-2.2)
605 ("ecj-bootstrap" ,ecj-bootstrap)
607 ("classpath" ,classpath-devel)))))
609 ;; The bootstrap JDK consisting of jamvm, classpath-devel,
610 ;; ecj-javac-wrapper-final cannot build Icedtea 2.x directly, because it's
611 ;; written in Java 7. It can, however, build the unmaintained Icedtea 1.x,
612 ;; which uses Java 6 only.
613 (define-public icedtea-6
620 "http://icedtea.wildebeest.org/download/source/icedtea6-"
624 "0bg9sb4f7qbq77c0zf9m17p47ga0kf0r9622g9p12ysg26jd1ksg"))
625 (modules '((guix build utils)))
628 (substitute* "Makefile.in"
629 ;; do not leak information about the build host
630 (("DISTRIBUTION_ID=\"\\$\\(DIST_ID\\)\"")
631 "DISTRIBUTION_ID=\"\\\"guix\\\"\""))
633 (build-system gnu-build-system)
634 (outputs '("out" ; Java Runtime Environment
635 "jdk" ; Java Development Kit
636 "doc")) ; all documentation
638 `(;; There are many failing tests and many are known to fail upstream.
641 ;; The DSOs use $ORIGIN to refer to each other, but (guix build
642 ;; gremlin) doesn't support it yet, so skip this phase.
643 #:validate-runpath? #f
645 #:modules ((guix build utils)
646 (guix build gnu-build-system)
650 `("--enable-bootstrap"
653 "--with-parallel-jobs"
654 "--disable-downloading"
656 ,(string-append "--with-ecj="
657 (assoc-ref %build-inputs "ecj")
658 "/share/java/ecj-bootstrap.jar")
659 ,(string-append "--with-jar="
660 (assoc-ref %build-inputs "fastjar")
662 ,(string-append "--with-jdk-home="
663 (assoc-ref %build-inputs "classpath"))
664 ,(string-append "--with-java="
665 (assoc-ref %build-inputs "jamvm")
668 (modify-phases %standard-phases
670 (lambda* (#:key source inputs #:allow-other-keys)
671 (and (zero? (system* "tar" "xvf" source))
673 (chdir (string-append "icedtea6-" ,version))
675 (copy-recursively (assoc-ref inputs "openjdk-src") "openjdk")
676 ;; The convenient OpenJDK source bundle is no longer
677 ;; available for download, so we have to take the sources
678 ;; from the Mercurial repositories and change the Makefile
679 ;; to avoid tests for the OpenJDK zip archive.
680 (with-directory-excursion "openjdk"
681 (for-each (lambda (part)
685 (string-append part "-src"))
687 '("jdk" "hotspot" "corba"
688 "langtools" "jaxp" "jaxws")))
689 (substitute* "Makefile.in"
690 (("echo \"ERROR: No up-to-date OpenJDK zip available\"; exit -1;")
691 "echo \"trust me\";")
692 ;; The contents of the bootstrap directory must be
693 ;; writeable but when copying from the store they are
695 (("mkdir -p lib/rt" line)
696 (string-append line "; chmod -R u+w $(BOOT_DIR)")))
697 (zero? (system* "chmod" "-R" "u+w" "openjdk"))
699 (add-after 'unpack 'use-classpath
700 (lambda* (#:key inputs #:allow-other-keys)
701 (let ((jvmlib (assoc-ref inputs "classpath"))
702 (jamvm (assoc-ref inputs "jamvm")))
703 ;; Classpath does not provide rt.jar.
704 (substitute* "Makefile.in"
705 (("\\$\\(SYSTEM_JDK_DIR\\)/jre/lib/rt.jar")
706 (string-append jvmlib "/share/classpath/glibj.zip")))
707 ;; Make sure we can find all classes.
709 (string-append jvmlib "/share/classpath/glibj.zip:"
710 jvmlib "/share/classpath/tools.zip:"
711 jamvm "/lib/rt.jar"))
713 (string-append "-cp "
714 jvmlib "/share/classpath/glibj.zip:"
715 jvmlib "/share/classpath/tools.zip")))
717 (add-after 'unpack 'patch-patches
719 ;; shebang in patches so that they apply cleanly
720 (substitute* '("patches/jtreg-jrunscript.patch"
721 "patches/hotspot/hs23/drop_unlicensed_test.patch")
722 (("#!/bin/sh") (string-append "#!" (which "sh"))))
724 (add-after 'unpack 'patch-paths
725 (lambda* (#:key inputs #:allow-other-keys)
726 ;; buildtree.make generates shell scripts, so we need to replace
727 ;; the generated shebang
728 (substitute* '("openjdk/hotspot/make/linux/makefiles/buildtree.make")
729 (("/bin/sh") (which "bash")))
731 (let ((corebin (string-append
732 (assoc-ref inputs "coreutils") "/bin/"))
733 (binbin (string-append
734 (assoc-ref inputs "binutils") "/bin/"))
735 (grepbin (string-append
736 (assoc-ref inputs "grep") "/bin/")))
737 (substitute* '("openjdk/jdk/make/common/shared/Defs-linux.gmk"
738 "openjdk/corba/make/common/shared/Defs-linux.gmk")
739 (("UNIXCOMMAND_PATH = /bin/")
740 (string-append "UNIXCOMMAND_PATH = " corebin))
741 (("USRBIN_PATH = /usr/bin/")
742 (string-append "USRBIN_PATH = " corebin))
743 (("DEVTOOLS_PATH *= */usr/bin/")
744 (string-append "DEVTOOLS_PATH = " corebin))
745 (("COMPILER_PATH *= */usr/bin/")
746 (string-append "COMPILER_PATH = "
747 (assoc-ref inputs "gcc") "/bin/"))
748 (("DEF_OBJCOPY *=.*objcopy")
749 (string-append "DEF_OBJCOPY = " (which "objcopy"))))
751 ;; fix path to alsa header
752 (substitute* "openjdk/jdk/make/common/shared/Sanity.gmk"
753 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
754 (string-append "ALSA_INCLUDE="
755 (assoc-ref inputs "alsa-lib")
756 "/include/alsa/version.h")))
758 ;; fix hard-coded utility paths
759 (substitute* '("openjdk/jdk/make/common/shared/Defs-utils.gmk"
760 "openjdk/corba/make/common/shared/Defs-utils.gmk")
762 (string-append "ECHO = " (which "echo")))
764 (string-append "GREP = " (which "grep")))
766 (string-append "EGREP = " (which "egrep")))
768 (string-append "CPIO = " (which "cpio")))
769 (("READELF *=.*readelf")
770 (string-append "READELF = " (which "readelf")))
772 (string-append "AR = " (which "ar")))
774 (string-append "TAR = " (which "tar")))
776 (string-append "AS = " (which "as")))
778 (string-append "LD = " (which "ld")))
780 (string-append "STRIP = " (which "strip")))
782 (string-append "NM = " (which "nm")))
784 (string-append "SH = " (which "bash")))
786 (string-append "FIND = " (which "find")))
788 (string-append "LDD = " (which "ldd")))
789 (("NAWK *=.*(n|g)awk")
790 (string-append "NAWK = " (which "gawk")))
792 (string-append "XARGS = " (which "xargs")))
794 (string-append "UNZIP = " (which "unzip")))
796 (string-append "ZIPEXE = " (which "zip")))
798 (string-append "SED = " (which "sed"))))
800 ;; Some of these timestamps cause problems as they are more than
801 ;; 10 years ago, failing the build process.
803 "openjdk/jdk/src/share/classes/java/util/CurrencyData.properties"
804 (("AZ=AZM;2005-12-31-20-00-00;AZN") "AZ=AZN")
805 (("MZ=MZM;2006-06-30-22-00-00;MZN") "MZ=MZN")
806 (("RO=ROL;2005-06-30-21-00-00;RON") "RO=RON")
807 (("TR=TRL;2004-12-31-22-00-00;TRY") "TR=TRY"))
809 (add-before 'configure 'set-additional-paths
810 (lambda* (#:key inputs #:allow-other-keys)
812 (string-append (assoc-ref inputs "libxrender")
813 "/include/X11/extensions" ":"
814 (assoc-ref inputs "libxtst")
815 "/include/X11/extensions" ":"
816 (assoc-ref inputs "libxinerama")
817 "/include/X11/extensions" ":"
818 (or (getenv "CPATH") "")))
819 (setenv "ALT_CUPS_HEADERS_PATH"
820 (string-append (assoc-ref inputs "cups")
822 (setenv "ALT_FREETYPE_HEADERS_PATH"
823 (string-append (assoc-ref inputs "freetype")
825 (setenv "ALT_FREETYPE_LIB_PATH"
826 (string-append (assoc-ref inputs "freetype")
830 (lambda* (#:key outputs #:allow-other-keys)
831 (let ((doc (string-append (assoc-ref outputs "doc")
832 "/share/doc/icedtea"))
833 (jre (assoc-ref outputs "out"))
834 (jdk (assoc-ref outputs "jdk")))
835 (copy-recursively "openjdk.build/docs" doc)
836 (copy-recursively "openjdk.build/j2re-image" jre)
837 (copy-recursively "openjdk.build/j2sdk-image" jdk))
840 `(("ant" ,ant-bootstrap)
841 ("alsa-lib" ,alsa-lib)
843 ("classpath" ,classpath-devel)
844 ("coreutils" ,coreutils)
847 ("ecj" ,ecj-bootstrap)
848 ("ecj-javac" ,ecj-javac-wrapper-final)
850 ("fontconfig" ,fontconfig)
851 ("freetype" ,freetype)
852 ("gcc" ,gcc-4.9) ; there's a segmentation fault when compiling with gcc-5 or gcc-7
864 ("libxcomposite" ,libxcomposite)
866 ("libxinerama" ,libxinerama)
867 ("libxrender" ,libxrender)
868 ("libxslt" ,libxslt) ;for xsltproc
871 ("mit-krb5" ,mit-krb5)
873 ("nss-certs" ,nss-certs)
875 ("pkg-config" ,pkg-config)
876 ("procps" ,procps) ;for "free", even though I'm not sure we should use it
886 (url "http://hg.openjdk.java.net/jdk6/jdk6/")
887 (changeset "jdk6-b41")))
890 "14q47yfg586fs64w30g8mk92m5dkxsvr36zzh0ra99xk5x0x96mv"))))
895 (url "http://hg.openjdk.java.net/jdk6/jdk6/jdk/")
896 (changeset "jdk6-b41")))
899 "165824nhg1k1dx6zs9dny0j49rmk35jw5b13dmz8c77jfajml4v9"))))
904 (url "http://hg.openjdk.java.net/jdk6/jdk6/hotspot/")
905 (changeset "jdk6-b41")))
908 "07lc1z4k5dj9nrc1wvwmpvxr3xgxrdkdh53xb95skk5ij49yagfd"))))
913 (url "http://hg.openjdk.java.net/jdk6/jdk6/corba/")
914 (changeset "jdk6-b41")))
917 "1p9g1r9dnax2iwp7yb59qx7m4nmshqhwmrb2b8jj8zgbd9dl2i3q"))))
922 (url "http://hg.openjdk.java.net/jdk6/jdk6/langtools/")
923 (changeset "jdk6-b41")))
926 "1x52wd67fynbbd9ild6fb4wvba3f5hhwk03qdjfazd0a1qr37z3d"))))
931 (url "http://hg.openjdk.java.net/jdk6/jdk6/jaxp/")
932 (changeset "jdk6-b41")))
935 "0shlqrvzpr4nrkmv215lbxnby63s3yvbdh1yxcayznsyqwa4nlxm"))))
940 (url "http://hg.openjdk.java.net/jdk6/jdk6/jaxws/")
941 (changeset "jdk6-b41")))
944 "0835lkw8vib1xhp8lxnybhlvzdh699hbi4mclxanydjk63zbpxk0"))))))
945 (home-page "http://icedtea.classpath.org")
946 (synopsis "Java development kit")
948 "This package provides the OpenJDK built with the IcedTea build harness.
949 This version of the OpenJDK is no longer maintained and is only used for
950 bootstrapping purposes.")
951 ;; IcedTea is released under the GPL2 + Classpath exception, which is the
952 ;; same license as both GNU Classpath and OpenJDK.
953 (license license:gpl2+)))
955 (define-public icedtea-7
956 (let* ((version "2.6.13")
957 (drop (lambda (name hash)
961 "http://icedtea.classpath.org/download/drops"
962 "/icedtea7/" version "/" name ".tar.bz2"))
963 (sha256 (base32 hash))))))
970 "http://icedtea.wildebeest.org/download/source/icedtea-"
974 "1w331rdqx1dcx2xb0fmjmrkdc71xqn20fxsgw8by4xhiblh88khh"))
975 (modules '((guix build utils)))
978 (substitute* "Makefile.in"
979 ;; do not leak information about the build host
980 (("DISTRIBUTION_ID=\"\\$\\(DIST_ID\\)\"")
981 "DISTRIBUTION_ID=\"\\\"guix\\\"\""))
983 (build-system gnu-build-system)
984 (outputs '("out" ; Java Runtime Environment
985 "jdk" ; Java Development Kit
986 "doc")) ; all documentation
988 `(;; There are many test failures. Some are known to
989 ;; fail upstream, others relate to not having an X
990 ;; server running at test time, yet others are a
991 ;; complete mystery to me.
993 ;; hotspot: passed: 241; failed: 45; error: 2
994 ;; langtools: passed: 1,934; failed: 26
998 ;; The DSOs use $ORIGIN to refer to each other, but (guix build
999 ;; gremlin) doesn't support it yet, so skip this phase.
1000 #:validate-runpath? #f
1002 ;; Apparently, the C locale is needed for some of the tests.
1005 #:modules ((guix build utils)
1006 (guix build gnu-build-system)
1013 ;; TODO: package pcsc and sctp, and add to inputs
1014 `("--disable-system-pcsc"
1015 "--disable-system-sctp"
1016 "--enable-bootstrap"
1019 "--disable-downloading"
1020 "--disable-tests" ;they are run in the check phase instead
1021 "--with-openjdk-src-dir=./openjdk.src"
1022 ,(string-append "--with-jdk-home="
1023 (assoc-ref %build-inputs "jdk")))
1026 (modify-phases %standard-phases
1028 (lambda* (#:key source inputs #:allow-other-keys)
1029 (let ((target (string-append "icedtea-" ,version))
1030 (unpack (lambda* (name #:optional dir)
1032 (string-drop-right name 5))))
1034 (zero? (system* "tar" "xvf"
1035 (assoc-ref inputs name)
1037 "--strip-components=1"))))))
1040 (zero? (system* "tar" "xvf" source
1041 "-C" target "--strip-components=1"))
1043 (unpack "openjdk-src" "openjdk.src")
1044 (with-directory-excursion "openjdk.src"
1046 (filter (cut string-suffix? "-drop" <>)
1051 (add-after 'unpack 'fix-x11-extension-include-path
1052 (lambda* (#:key inputs #:allow-other-keys)
1053 (substitute* "openjdk.src/jdk/make/sun/awt/mawt.gmk"
1054 (((string-append "\\$\\(firstword \\$\\(wildcard "
1055 "\\$\\(OPENWIN_HOME\\)"
1056 "/include/X11/extensions\\).*$"))
1057 (string-append (assoc-ref inputs "libxrender")
1058 "/include/X11/extensions"
1059 " -I" (assoc-ref inputs "libxtst")
1060 "/include/X11/extensions"
1061 " -I" (assoc-ref inputs "libxinerama")
1062 "/include/X11/extensions"))
1063 (("\\$\\(wildcard /usr/include/X11/extensions\\)\\)") ""))
1065 (add-after 'unpack 'patch-paths
1067 ;; buildtree.make generates shell scripts, so we need to replace
1068 ;; the generated shebang
1069 (substitute* '("openjdk.src/hotspot/make/linux/makefiles/buildtree.make")
1070 (("/bin/sh") (which "bash")))
1072 (let ((corebin (string-append
1073 (assoc-ref %build-inputs "coreutils") "/bin/"))
1074 (binbin (string-append
1075 (assoc-ref %build-inputs "binutils") "/bin/"))
1076 (grepbin (string-append
1077 (assoc-ref %build-inputs "grep") "/bin/")))
1078 (substitute* '("openjdk.src/jdk/make/common/shared/Defs-linux.gmk"
1079 "openjdk.src/corba/make/common/shared/Defs-linux.gmk")
1080 (("UNIXCOMMAND_PATH = /bin/")
1081 (string-append "UNIXCOMMAND_PATH = " corebin))
1082 (("USRBIN_PATH = /usr/bin/")
1083 (string-append "USRBIN_PATH = " corebin))
1084 (("DEVTOOLS_PATH *= */usr/bin/")
1085 (string-append "DEVTOOLS_PATH = " corebin))
1086 (("COMPILER_PATH *= */usr/bin/")
1087 (string-append "COMPILER_PATH = "
1088 (assoc-ref %build-inputs "gcc") "/bin/"))
1089 (("DEF_OBJCOPY *=.*objcopy")
1090 (string-append "DEF_OBJCOPY = " (which "objcopy"))))
1092 ;; fix path to alsa header
1093 (substitute* "openjdk.src/jdk/make/common/shared/Sanity.gmk"
1094 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
1095 (string-append "ALSA_INCLUDE="
1096 (assoc-ref %build-inputs "alsa-lib")
1097 "/include/alsa/version.h")))
1099 ;; fix hard-coded utility paths
1100 (substitute* '("openjdk.src/jdk/make/common/shared/Defs-utils.gmk"
1101 "openjdk.src/corba/make/common/shared/Defs-utils.gmk")
1103 (string-append "ECHO = " (which "echo")))
1105 (string-append "GREP = " (which "grep")))
1106 (("EGREP *=.*egrep")
1107 (string-append "EGREP = " (which "egrep")))
1109 (string-append "CPIO = " (which "cpio")))
1110 (("READELF *=.*readelf")
1111 (string-append "READELF = " (which "readelf")))
1113 (string-append "AR = " (which "ar")))
1115 (string-append "TAR = " (which "tar")))
1117 (string-append "AS = " (which "as")))
1119 (string-append "LD = " (which "ld")))
1120 (("STRIP *=.*strip")
1121 (string-append "STRIP = " (which "strip")))
1123 (string-append "NM = " (which "nm")))
1125 (string-append "SH = " (which "bash")))
1127 (string-append "FIND = " (which "find")))
1129 (string-append "LDD = " (which "ldd")))
1130 (("NAWK *=.*(n|g)awk")
1131 (string-append "NAWK = " (which "gawk")))
1132 (("XARGS *=.*xargs")
1133 (string-append "XARGS = " (which "xargs")))
1134 (("UNZIP *=.*unzip")
1135 (string-append "UNZIP = " (which "unzip")))
1137 (string-append "ZIPEXE = " (which "zip")))
1139 (string-append "SED = " (which "sed"))))
1141 ;; Some of these timestamps cause problems as they are more than
1142 ;; 10 years ago, failing the build process.
1144 "openjdk.src/jdk/src/share/classes/java/util/CurrencyData.properties"
1145 (("AZ=AZM;2005-12-31-20-00-00;AZN") "AZ=AZN")
1146 (("MZ=MZM;2006-06-30-22-00-00;MZN") "MZ=MZN")
1147 (("RO=ROL;2005-06-30-21-00-00;RON") "RO=RON")
1148 (("TR=TRL;2004-12-31-22-00-00;TRY") "TR=TRY")))
1150 (add-before 'configure 'set-additional-paths
1151 (lambda* (#:key inputs #:allow-other-keys)
1152 (substitute* "openjdk.src/jdk/make/common/shared/Sanity.gmk"
1153 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
1154 (string-append "ALSA_INCLUDE="
1155 (assoc-ref inputs "alsa-lib")
1156 "/include/alsa/version.h")))
1159 (string-append (assoc-ref inputs "libxcomposite")
1160 "/include/X11/extensions" ":"
1161 (assoc-ref inputs "libxrender")
1162 "/include/X11/extensions" ":"
1163 (assoc-ref inputs "libxtst")
1164 "/include/X11/extensions" ":"
1165 (assoc-ref inputs "libxinerama")
1166 "/include/X11/extensions" ":"
1167 (or (getenv "CPATH") "")))
1168 (setenv "ALT_OBJCOPY" (which "objcopy"))
1169 (setenv "ALT_CUPS_HEADERS_PATH"
1170 (string-append (assoc-ref inputs "cups")
1172 (setenv "ALT_FREETYPE_HEADERS_PATH"
1173 (string-append (assoc-ref inputs "freetype")
1175 (setenv "ALT_FREETYPE_LIB_PATH"
1176 (string-append (assoc-ref inputs "freetype")
1179 (add-before 'check 'fix-test-framework
1181 ;; Fix PATH in test environment
1182 (substitute* "test/jtreg/com/sun/javatest/regtest/Main.java"
1183 (("PATH=/bin:/usr/bin")
1184 (string-append "PATH=" (getenv "PATH"))))
1185 (substitute* "test/jtreg/com/sun/javatest/util/SysEnv.java"
1186 (("/usr/bin/env") (which "env")))
1187 (substitute* "openjdk.src/hotspot/test/test_env.sh"
1188 (("/bin/rm") (which "rm"))
1189 (("/bin/cp") (which "cp"))
1190 (("/bin/mv") (which "mv")))
1192 (add-before 'check 'fix-hotspot-tests
1194 (with-directory-excursion "openjdk.src/hotspot/test/"
1195 (substitute* "jprt.config"
1196 (("PATH=\"\\$\\{path4sdk\\}\"")
1197 (string-append "PATH=" (getenv "PATH")))
1198 (("make=/usr/bin/make")
1199 (string-append "make=" (which "make"))))
1200 (substitute* '("runtime/6626217/Test6626217.sh"
1201 "runtime/7110720/Test7110720.sh")
1202 (("/bin/rm") (which "rm"))
1203 (("/bin/cp") (which "cp"))
1204 (("/bin/mv") (which "mv"))))
1206 (add-before 'check 'fix-jdk-tests
1208 (with-directory-excursion "openjdk.src/jdk/test/"
1209 (substitute* "com/sun/jdi/JdbReadTwiceTest.sh"
1210 (("/bin/pwd") (which "pwd")))
1211 (substitute* "com/sun/jdi/ShellScaffold.sh"
1212 (("/bin/kill") (which "kill")))
1213 (substitute* "start-Xvfb.sh"
1214 ;;(("/usr/bin/X11/Xvfb") (which "Xvfb"))
1215 (("/usr/bin/nohup") (which "nohup")))
1216 (substitute* "javax/security/auth/Subject/doAs/Test.sh"
1217 (("/bin/rm") (which "rm")))
1218 (substitute* "tools/launcher/MultipleJRE.sh"
1219 (("echo \"#!/bin/sh\"")
1220 (string-append "echo \"#!" (which "rm") "\""))
1221 (("/usr/bin/zip") (which "zip")))
1222 (substitute* "com/sun/jdi/OnThrowTest.java"
1223 (("#!/bin/sh") (string-append "#!" (which "sh"))))
1224 (substitute* "java/lang/management/OperatingSystemMXBean/GetSystemLoadAverage.java"
1225 (("/usr/bin/uptime") (which "uptime")))
1226 (substitute* "java/lang/ProcessBuilder/Basic.java"
1227 (("/usr/bin/env") (which "env"))
1228 (("/bin/false") (which "false"))
1229 (("/bin/true") (which "true"))
1230 (("/bin/cp") (which "cp"))
1231 (("/bin/sh") (which "sh")))
1232 (substitute* "java/lang/ProcessBuilder/FeelingLucky.java"
1233 (("/bin/sh") (which "sh")))
1234 (substitute* "java/lang/ProcessBuilder/Zombies.java"
1235 (("/usr/bin/perl") (which "perl"))
1236 (("/bin/ps") (which "ps"))
1237 (("/bin/true") (which "true")))
1238 (substitute* "java/lang/Runtime/exec/ConcurrentRead.java"
1239 (("/usr/bin/tee") (which "tee")))
1240 (substitute* "java/lang/Runtime/exec/ExecWithDir.java"
1241 (("/bin/true") (which "true")))
1242 (substitute* "java/lang/Runtime/exec/ExecWithInput.java"
1243 (("/bin/cat") (which "cat")))
1244 (substitute* "java/lang/Runtime/exec/ExitValue.java"
1245 (("/bin/sh") (which "sh"))
1246 (("/bin/true") (which "true"))
1247 (("/bin/kill") (which "kill")))
1248 (substitute* "java/lang/Runtime/exec/LotsOfDestroys.java"
1249 (("/usr/bin/echo") (which "echo")))
1250 (substitute* "java/lang/Runtime/exec/LotsOfOutput.java"
1251 (("/usr/bin/cat") (which "cat")))
1252 (substitute* "java/lang/Runtime/exec/SleepyCat.java"
1253 (("/bin/cat") (which "cat"))
1254 (("/bin/sleep") (which "sleep"))
1255 (("/bin/sh") (which "sh")))
1256 (substitute* "java/lang/Runtime/exec/StreamsSurviveDestroy.java"
1257 (("/bin/cat") (which "cat")))
1258 (substitute* "java/rmi/activation/CommandEnvironment/SetChildEnv.java"
1259 (("/bin/chmod") (which "chmod")))
1260 (substitute* "java/util/zip/ZipFile/Assortment.java"
1261 (("/bin/sh") (which "sh"))))
1265 ;; The "make check-*" targets always return zero, so we need to
1266 ;; check for errors in the associated log files to determine
1267 ;; whether any tests have failed.
1268 (use-modules (ice-9 rdelim))
1269 (let* ((error-pattern (make-regexp "^(Error|FAILED):.*"))
1270 (checker (lambda (port)
1272 (let ((line (read-line port)))
1274 ((eof-object? line) #t)
1275 ((regexp-exec error-pattern line) #f)
1277 (run-test (lambda (test)
1278 (system* "make" test)
1279 (call-with-input-file
1280 (string-append "test/" test ".log")
1283 (and (run-test "check-hotspot")
1284 (run-test "check-langtools")
1285 (run-test "check-jdk"))))))
1287 (lambda* (#:key outputs #:allow-other-keys)
1288 (let ((doc (string-append (assoc-ref outputs "doc")
1289 "/share/doc/icedtea"))
1290 (jre (assoc-ref outputs "out"))
1291 (jdk (assoc-ref outputs "jdk")))
1292 (copy-recursively "openjdk.build/docs" doc)
1293 (copy-recursively "openjdk.build/j2re-image" jre)
1294 (copy-recursively "openjdk.build/j2sdk-image" jdk))
1296 ;; Some of the libraries in the lib/amd64 folder link to libjvm.so.
1297 ;; But that shared object is located in the server/ folder, so it
1298 ;; cannot be found. This phase creates a symbolic link in the
1299 ;; lib/amd64 folder so that the other libraries can find it.
1302 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
1304 ;; FIXME: Find the bug in the build system, so that this symlink is
1306 (add-after 'install 'install-libjvm
1307 (lambda* (#:key inputs outputs #:allow-other-keys)
1308 (let* ((lib-path (string-append (assoc-ref outputs "out")
1310 (symlink (string-append lib-path "/server/libjvm.so")
1311 (string-append lib-path "/libjvm.so")))
1313 ;; By default IcedTea only generates an empty keystore. In order to
1314 ;; be able to use certificates in Java programs we need to generate a
1315 ;; keystore from a set of certificates. For convenience we use the
1316 ;; certificates from the nss-certs package.
1317 (add-after 'install 'install-keystore
1318 (lambda* (#:key inputs outputs #:allow-other-keys)
1319 (let* ((keystore "cacerts")
1320 (certs-dir (string-append (assoc-ref inputs "nss-certs")
1322 (keytool (string-append (assoc-ref outputs "jdk")
1324 (define (extract-cert file target)
1325 (call-with-input-file file
1327 (call-with-output-file target
1329 (let loop ((line (read-line in 'concat))
1332 ((eof-object? line) #t)
1333 ((string-prefix? "-----BEGIN" line)
1335 (loop (read-line in 'concat) #t))
1336 ((string-prefix? "-----END" line)
1340 (when copying? (display line out))
1341 (loop (read-line in 'concat) copying?)))))))))
1342 (define (import-cert cert)
1343 (format #t "Importing certificate ~a\n" (basename cert))
1344 (let ((temp "tmpcert"))
1345 (extract-cert cert temp)
1346 (let ((port (open-pipe* OPEN_WRITE keytool
1348 "-alias" (basename cert)
1349 "-keystore" keystore
1350 "-storepass" "changeit"
1352 (display "yes\n" port)
1353 (when (not (zero? (status:exit-val (close-pipe port))))
1354 (format #t "failed to import ~a\n" cert)))
1355 (delete-file temp)))
1357 ;; This is necessary because the certificate directory contains
1358 ;; files with non-ASCII characters in their names.
1359 (setlocale LC_ALL "en_US.utf8")
1360 (setenv "LC_ALL" "en_US.utf8")
1362 (for-each import-cert (find-files certs-dir "\\.pem$"))
1363 (mkdir-p (string-append (assoc-ref outputs "out")
1365 (mkdir-p (string-append (assoc-ref outputs "jdk")
1366 "/jre/lib/security"))
1368 ;; The cacerts files we are going to overwrite are chmod'ed as
1369 ;; read-only (444) in icedtea-8 (which derives from this
1370 ;; package). We have to change this so we can overwrite them.
1371 (chmod (string-append (assoc-ref outputs "out")
1372 "/lib/security/" keystore) #o644)
1373 (chmod (string-append (assoc-ref outputs "jdk")
1374 "/jre/lib/security/" keystore) #o644)
1376 (install-file keystore
1377 (string-append (assoc-ref outputs "out")
1379 (install-file keystore
1380 (string-append (assoc-ref outputs "jdk")
1381 "/jre/lib/security"))
1386 "0l34ikyf62hbzlf9032alzkkqvf7bpmckz4gvirvph755w7gka8l"))
1389 "050gv2jbg1pi6qkn8w18bwpbklfa5b0kymjvan9pncddbj8m84fz"))
1392 "1k6yldwnxfzdg5926r1nlfv8d1r1j7rlp2nkz6gqh05vgyamnfhl"))
1395 "110j7jlz47x2gg6f7653x12mssan5kvj9l9h1m1c8c92drfxbqyk"))
1398 "0d1mca38ksxvdskp9im3pp7fdijhj1n3lwq9w13r9s4v3qyskgdd"))
1401 "0nq5236fzxn3p6x8cgncl56mzcmsj07q9gymysnws4c8byc6n0qj"))
1404 "17bdv39n4lh8l5737c96f3xgamx4y305m067p01cywgp7zaddqws"))
1405 ("ant" ,ant-bootstrap)
1407 ("coreutils" ,coreutils)
1408 ("diffutils" ,diffutils) ;for tests
1411 ("libtool" ,libtool)
1412 ("pkg-config" ,pkg-config)
1418 ("fastjar" ,fastjar)
1419 ("libxslt" ,libxslt) ;for xsltproc
1420 ("nss-certs" ,nss-certs)
1422 ("procps" ,procps) ;for "free", even though I'm not sure we should use it
1423 ("jdk" ,icedtea-6 "jdk")))
1425 `(("alsa-lib" ,alsa-lib)
1428 ("libxcomposite" ,libxcomposite)
1430 ("libxtst" ,libxtst)
1432 ("libxinerama" ,libxinerama)
1433 ("libxrender" ,libxrender)
1434 ("libjpeg" ,libjpeg)
1436 ("mit-krb5" ,mit-krb5)
1439 ("fontconfig" ,fontconfig)
1440 ("freetype" ,freetype)
1444 (home-page "http://icedtea.classpath.org")
1445 (synopsis "Java development kit")
1447 "This package provides the Java development kit OpenJDK built with the
1448 IcedTea build harness.")
1449 ;; IcedTea is released under the GPL2 + Classpath exception, which is the
1450 ;; same license as both GNU Classpath and OpenJDK.
1451 (license license:gpl2+))))
1453 (define-public icedtea-8
1454 (let* ((version "3.7.0")
1455 (drop (lambda (name hash)
1459 "http://icedtea.classpath.org/download/drops"
1460 "/icedtea8/" version "/" name ".tar.xz"))
1461 (sha256 (base32 hash))))))
1462 (package (inherit icedtea-7)
1467 "http://icedtea.wildebeest.org/download/source/icedtea-"
1471 "09yqzn8rpccs7cyv89hhy5zlznpgqw5x3jz0w1ccp0cz1vgs8l5w"))
1472 (modules '((guix build utils)))
1475 (substitute* '("configure"
1477 ;; Do not embed build time
1478 (("(DIST_ID=\"Custom build).*$" _ prefix)
1479 (string-append prefix "\"\n"))
1480 ;; Do not leak information about the build host
1481 (("DIST_NAME=\"\\$build_os\"")
1482 "DIST_NAME=\"guix\""))
1485 `(#:imported-modules
1486 ((guix build ant-build-system)
1487 (guix build syscalls)
1488 ,@%gnu-build-system-modules)
1489 ,@(substitute-keyword-arguments (package-arguments icedtea-7)
1490 ((#:modules modules)
1491 `((guix build utils)
1492 (guix build gnu-build-system)
1493 ((guix build ant-build-system) #:prefix ant:)
1498 ((#:configure-flags flags)
1499 `(let ((jdk (assoc-ref %build-inputs "jdk")))
1500 `( ;;"--disable-bootstrap"
1501 "--enable-bootstrap"
1503 "--disable-downloading"
1504 "--disable-system-pcsc"
1505 "--disable-system-sctp"
1506 "--disable-tests" ;they are run in the check phase instead
1507 "--with-openjdk-src-dir=./openjdk.src"
1508 ,(string-append "--with-jdk-home=" jdk))))
1510 `(modify-phases ,phases
1511 (delete 'fix-x11-extension-include-path)
1512 (delete 'patch-paths)
1513 (delete 'set-additional-paths)
1514 (delete 'patch-patches)
1515 ;; Prevent the keytool from recording the current time when
1516 ;; adding certificates at build time.
1517 (add-after 'unpack 'patch-keystore
1519 (substitute* "openjdk.src/jdk/src/share/classes/sun/security/provider/JavaKeyStore.java"
1520 (("date = new Date\\(\\);")
1522 date = (System.getenv(\"SOURCE_DATE_EPOCH\") != null) ?\
1523 new Date(Long.parseLong(System.getenv(\"SOURCE_DATE_EPOCH\"))) :\
1526 (add-after 'unpack 'patch-jni-libs
1527 ;; Hardcode dynamically loaded libraries.
1529 (let* ((library-path (search-path-as-string->list
1530 (getenv "LIBRARY_PATH")))
1531 (find-library (lambda (name)
1534 (string-append "lib" name ".so")))))
1537 (catch 'decoding-error
1540 (("VERSIONED_JNI_LIB_NAME\\(\"(.*)\", \"(.*)\"\\)"
1542 (format #f "\"~a\"" (find-library name)))
1543 (("JNI_LIB_NAME\\(\"(.*)\"\\)" _ name)
1544 (format #f "\"~a\"" (find-library name)))))
1546 ;; Those are safe to skip.
1547 (format (current-error-port)
1548 "warning: failed to substitute: ~a~%"
1550 (find-files "openjdk.src/jdk/src/solaris/native"
1554 (lambda* (#:key outputs #:allow-other-keys)
1555 (let ((doc (string-append (assoc-ref outputs "doc")
1556 "/share/doc/icedtea"))
1557 (jre (assoc-ref outputs "out"))
1558 (jdk (assoc-ref outputs "jdk")))
1559 (copy-recursively "openjdk.build/docs" doc)
1560 (copy-recursively "openjdk.build/images/j2re-image" jre)
1561 (copy-recursively "openjdk.build/images/j2sdk-image" jdk)
1562 ;; Install the nss.cfg file to JRE to enable SSL/TLS
1564 (copy-file (string-append jdk "/jre/lib/security/nss.cfg")
1565 (string-append jre "/lib/security/nss.cfg"))
1567 (add-after 'install 'strip-jar-timestamps
1568 (assoc-ref ant:%standard-phases 'strip-jar-timestamps)))))))
1570 `(("jdk" ,icedtea-7 "jdk")
1573 "1mj6xgmw31i6qd30qi9dmv7160fbcfq5ikz1jwjihdg2793il19p"))
1576 "1wb8k5zm40zld0986dvmlh5xh3gyixbg9h26sl662zy92amhmyyg"))
1579 "11ma4zz0599cy70xd219v7a8vin7p96xrhhz3wsaw6cjhkzpagah"))
1582 "14m1y0z0fbm5z5zjw3vnq85py8dma84bi3f9cw8rhdyc6skk8q4i"))
1585 "09andnm6xaasnp963hgx42yiflifiljp9z7z85jrfyc5z8a5whmf"))
1588 "0s6lcpc0zckz2fnq98aqf28nz9y3wbi41a3kyaqqa2abwbkm1zwl"))
1591 "15wizy123vhk40chl1b4p552jf2pw2hdww0myf11qab425axz4nw"))
1594 "1ciz1w9j0kz7s1dxdhyqq71nla9icyz6qvn0b9z2zgkklqa98qmm"))
1597 "19pzl3ppaw8j6r5cnyp8qiw3hxijh3hdc46l39g5yfhdl4pr4hpa"))
1600 "0k33anxdzw1icn072wynfmmdjhsv50hay0j1sfkfxny12rb3vgdy"))
1601 ,@(fold alist-delete (package-native-inputs icedtea-7)
1602 '("jdk" "openjdk-src" "corba-drop" "jaxp-drop" "jaxws-drop"
1603 "jdk-drop" "langtools-drop" "hotspot-drop")))))))
1605 (define-public icedtea icedtea-7)
1608 (define-public ant/java8
1609 (package (inherit ant-bootstrap)
1614 (uri (string-append "mirror://apache/ant/source/apache-ant-"
1615 version "-src.tar.gz"))
1618 "10p3dh77lkzzzcy32dk9azljixzadp46fggjfbvgkl8mmb8cxxv8"))
1619 (modules '((guix build utils)))
1622 (for-each delete-file
1623 (find-files "lib/optional" "\\.jar$"))
1626 (substitute-keyword-arguments (package-arguments ant-bootstrap)
1628 `(modify-phases ,phases
1629 (add-after 'unpack 'remove-scripts
1630 ;; Remove bat / cmd scripts for DOS as well as the antRun and runant
1633 (for-each delete-file
1634 (find-files "src/script"
1635 "(.*\\.(bat|cmd)|runant.*|antRun.*)"))
1638 (lambda* (#:key inputs outputs #:allow-other-keys)
1639 (setenv "JAVA_HOME" (assoc-ref inputs "jdk"))
1641 ;; Disable tests to avoid dependency on hamcrest-core, which needs
1642 ;; Ant to build. This is necessary in addition to disabling the
1643 ;; "check" phase, because the dependency on "test-jar" would always
1644 ;; result in the tests to be run.
1645 (substitute* "build.xml"
1646 (("depends=\"jars,test-jar\"") "depends=\"jars\""))
1647 (zero? (system* "bash" "bootstrap.sh"
1648 (string-append "-Ddist.dir="
1649 (assoc-ref outputs "out"))))))))))
1651 `(("jdk" ,icedtea-8 "jdk")))))
1653 ;; The 1.9.x series is the last that can be built with GCJ. The 1.10.x series
1656 (package (inherit ant/java8)
1660 (uri (string-append "mirror://apache/ant/source/apache-ant-"
1661 version "-src.tar.gz"))
1664 "1k28mka0m3isy9yr8gz84kz1f3f879rwaxrd44vdn9xbfwvwk86n"))))
1666 `(("jdk" ,icedtea-7 "jdk")))))
1668 (define-public ant-apache-bcel
1671 (name "ant-apache-bcel")
1673 (substitute-keyword-arguments (package-arguments ant/java8)
1675 `(modify-phases ,phases
1676 (add-after 'unpack 'link-bcel
1677 (lambda* (#:key inputs #:allow-other-keys)
1678 (for-each (lambda (file)
1680 (string-append "lib/optional/"
1682 (find-files (assoc-ref inputs "java-commons-bcel")
1685 (add-after 'build 'install
1686 (lambda* (#:key outputs #:allow-other-keys)
1687 (let* ((out (assoc-ref outputs "out"))
1688 (share (string-append out "/share/java"))
1689 (bin (string-append out "/bin"))
1690 (lib (string-append out "/lib")))
1692 (install-file (string-append lib "/ant-apache-bcel.jar") share)
1693 (delete-file-recursively bin)
1694 (delete-file-recursively lib)
1697 `(("java-commons-bcel" ,java-commons-bcel)
1698 ,@(package-inputs ant/java8)))))
1700 (define-public ant-junit
1705 (substitute-keyword-arguments (package-arguments ant/java8)
1707 `(modify-phases ,phases
1708 (add-after 'unpack 'link-junit
1709 (lambda* (#:key inputs #:allow-other-keys)
1710 (for-each (lambda (file)
1712 (string-append "lib/optional/"
1714 (find-files (assoc-ref inputs "java-junit")
1717 (add-after 'build 'install
1718 (lambda* (#:key outputs #:allow-other-keys)
1719 (let* ((out (assoc-ref outputs "out"))
1720 (share (string-append out "/share/java"))
1721 (bin (string-append out "/bin"))
1722 (lib (string-append out "/lib")))
1724 (install-file (string-append lib "/ant-junit.jar") share)
1725 (delete-file-recursively bin)
1726 (delete-file-recursively lib)
1729 `(("java-junit" ,java-junit)
1730 ,@(package-inputs ant/java8)))))
1732 (define-public clojure
1733 (let* ((remove-archives '(begin
1734 (for-each delete-file
1735 (find-files "." ".*\\.(jar|zip)"))
1737 (submodule (lambda (prefix version hash)
1740 (uri (string-append "https://github.com/clojure/"
1741 prefix version ".tar.gz"))
1742 (sha256 (base32 hash))
1743 (modules '((guix build utils)))
1744 (snippet remove-archives)))))
1752 (string-append "https://github.com/clojure/clojure/archive/clojure-"
1755 (base32 "0xjbzcw45z32vsn9pifp7ndysjzqswp5ig0jkjpivigh2ckkdzha"))
1756 (modules '((guix build utils)))
1757 (snippet remove-archives)))
1758 (build-system ant-build-system)
1760 `(#:modules ((guix build ant-build-system)
1766 #:test-target "test"
1768 (modify-phases %standard-phases
1769 (add-after 'unpack 'unpack-submodule-sources
1770 (lambda* (#:key inputs #:allow-other-keys)
1774 (with-directory-excursion name
1775 (or (zero? (system* "tar"
1776 ;; Use xz for repacked tarball.
1780 "--file" (assoc-ref inputs name)
1781 "--strip-components=1"))
1782 (error "failed to unpack tarball" name)))
1783 (copy-recursively (string-append name "/src/main/clojure/")
1785 '("core-specs-alpha-src"
1786 "data-generators-src"
1789 "test-generative-src"
1790 "tools-namespace-src"))
1792 ;; The javadoc target is not built by default.
1793 (add-after 'build 'build-doc
1795 (zero? (system* "ant" "javadoc"))))
1796 ;; Needed since no install target is provided.
1798 (lambda* (#:key outputs #:allow-other-keys)
1799 (let ((java-dir (string-append (assoc-ref outputs "out")
1801 ;; Install versioned to avoid collisions.
1802 (install-file (string-append "clojure-" ,version ".jar")
1805 ;; Needed since no install-doc target is provided.
1806 (add-after 'install 'install-doc
1807 (lambda* (#:key outputs #:allow-other-keys)
1808 (let ((doc-dir (string-append (assoc-ref outputs "out")
1809 "/share/doc/clojure-"
1811 (copy-recursively "doc/clojure" doc-dir)
1812 (copy-recursively "target/javadoc/"
1813 (string-append doc-dir "javadoc/"))
1814 (for-each (cut install-file <> doc-dir)
1815 (filter (cut string-match
1816 ".*\\.(html|markdown|md|txt)"
1820 ;; The native-inputs below are needed to run the tests.
1822 `(("core-specs-alpha-src"
1823 ,(submodule "core.specs.alpha/archive/core.specs.alpha-"
1825 "0v2a0svf1ar2y42ajxwsjr7zmm5j7pp2zwrd2jh3k7xzd1p9x1fv"))
1826 ("data-generators-src"
1827 ,(submodule "data.generators/archive/data.generators-"
1829 "0kki093jp4ckwxzfnw8ylflrfqs8b1i1wi9iapmwcsy328dmgzp1"))
1831 ,(submodule "spec.alpha/archive/spec.alpha-"
1833 "00alf0347licdn773w2jarpllyrbl52qz4d8mw61anjksacxylzz"))
1835 ,(submodule "test.check/archive/test.check-"
1837 "0p0mnyhr442bzkz0s4k5ra3i6l5lc7kp6ajaqkkyh4c2k5yck1md"))
1838 ("test-generative-src"
1839 ,(submodule "test.generative/archive/test.generative-"
1841 "1pjafy1i7yblc7ixmcpfq1lfbyf3jaljvkgrajn70sws9xs7a9f8"))
1842 ("tools-namespace-src"
1843 ,(submodule "tools.namespace/archive/tools.namespace-"
1845 "10baak8v0hnwz2hr33bavshm7y49mmn9zsyyms1dwjz45p5ymhy0"))))
1846 (home-page "https://clojure.org/")
1847 (synopsis "Lisp dialect running on the JVM")
1848 (description "Clojure is a dynamic, general-purpose programming language,
1849 combining the approachability and interactive development of a scripting
1850 language with an efficient and robust infrastructure for multithreaded
1851 programming. Clojure is a compiled language, yet remains completely dynamic
1852 – every feature supported by Clojure is supported at runtime. Clojure
1853 provides easy access to the Java frameworks, with optional type hints and type
1854 inference, to ensure that calls to Java can avoid reflection.
1856 Clojure is a dialect of Lisp, and shares with Lisp the code-as-data philosophy
1857 and a powerful macro system. Clojure is predominantly a functional programming
1858 language, and features a rich set of immutable, persistent data structures.
1859 When mutable state is needed, Clojure offers a software transactional memory
1860 system and reactive Agent system that ensure clean, correct, multithreaded
1862 ;; Clojure is licensed under EPL1.0
1863 ;; ASM bytecode manipulation library is licensed under BSD-3
1864 ;; Guava Murmur3 hash implementation is licensed under APL2.0
1865 ;; src/clj/repl.clj is licensed under CPL1.0
1867 ;; See readme.html or readme.txt for details.
1868 (license (list license:epl1.0
1873 (define-public javacc
1879 (uri (string-append "https://github.com/javacc/javacc/"
1880 "archive/" version ".tar.gz"))
1881 (file-name (string-append "javacc-" version ".tar.gz"))
1884 "111xc9mnmc5a6qz6x3xbhqc07y1lg2b996ggzw0hrblg42zya9xf"))))
1885 (build-system ant-build-system)
1887 `(#:test-target "test"
1889 (modify-phases %standard-phases
1890 (add-after 'unpack 'delete-bundled-libs
1892 (delete-file-recursively "lib") #t))
1893 (replace 'install (install-jars "target")))))
1894 (home-page "https://javacc.org/")
1895 (synopsis "Java parser generator")
1896 (description "Java Compiler Compiler (JavaCC) is the most popular parser
1897 generator for use with Java applications. A parser generator is a tool that
1898 reads a grammar specification and converts it to a Java program that can
1899 recognize matches to the grammar. In addition to the parser generator itself,
1900 JavaCC provides other standard capabilities related to parser generation such
1901 as tree building (via a tool called JJTree included with JavaCC), actions,
1903 (license license:bsd-3)))
1905 (define-public javacc-4
1906 (package (inherit javacc)
1911 (url "https://github.com/javacc/javacc.git")
1912 (commit "release_41")))
1913 (file-name (string-append "javacc-" version "-checkout"))
1916 "07ysav7j8r1c6h8qxrgqk6lwdp74ly0ad1935lragxml0qqc3ka0"))))
1918 ;; /tmp/guix-build-javacc-4.1.drv-0/source/test/javacodeLA/build.xml:60:
1923 (modify-phases %standard-phases
1924 (add-after 'unpack 'delete-bundled-libs
1926 (delete-file-recursively "lib") #t))
1927 (replace 'install (install-jars "bin/lib")))))))
1929 ;; This is the last 3.x release of ECJ
1930 (define-public java-ecj-3
1936 (uri (string-append "http://archive.eclipse.org/eclipse/"
1937 "downloads/drops/R-" version
1938 "-201301310800/ecjsrc-" version ".jar"))
1941 "01mdj14jw11g1jfnki4fi8229p0c6zzckd38zqy2w4m3cjcvsx04"))))
1942 (build-system ant-build-system)
1944 `(#:tests? #f ; none included
1945 #:jdk ,icedtea-7 ; doesn't build with JDK8+
1946 #:make-flags (list "-f" "src/build.xml")
1947 #:build-target "build"
1949 (modify-phases %standard-phases
1950 (add-after 'unpack 'fix-manifest
1952 ;; Record the main class to make ecj executable.
1953 (with-atomic-file-replacement "src/META-INF/MANIFEST.MF"
1955 (display "Manifest-Version: 1.0
1956 Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n"
1958 (replace 'install (install-jars ".")))))
1959 (home-page "https://eclipse.org")
1960 (synopsis "Eclipse Java development tools core batch compiler")
1961 (description "This package provides the Eclipse Java core batch compiler.")
1962 (license license:epl1.0)))
1964 ;; This is needed for java-cisd-args4j
1965 (define-public java-ecj-3.5
1966 (package (inherit java-ecj-3)
1969 (method url-fetch/zipbomb)
1970 (uri (string-append "http://archive.eclipse.org/eclipse/"
1971 "downloads/drops/R-" version
1972 "-200909170800/ecjsrc-" version ".zip"))
1975 "1vnl2mavisc567bip736xzsvvbjif5279wc4a7pbdik5wlir8qr7"))))
1976 (build-system ant-build-system)
1978 `(#:tests? #f ; none included
1979 #:jdk ,icedtea-7 ; doesn't build with JDK8+
1980 #:build-target "build"
1982 (modify-phases %standard-phases
1983 (add-after 'unpack 'fix-manifest
1985 ;; Record the main class to make ecj executable.
1986 (with-atomic-file-replacement "META-INF/MANIFEST.MF"
1989 (display "Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n"
1991 (replace 'install (install-jars ".")))))
1993 `(("unzip" ,unzip)))))
1995 (define-public java-cisd-base
1996 (let ((revision 38938)
1997 (base-version "14.12.0"))
1999 (name "java-cisd-base")
2000 (version (string-append base-version "-" (number->string revision)))
2004 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2005 "base/tags/release/"
2006 (version-major+minor base-version)
2007 ".x/" base-version "/base/"))
2008 (revision revision)))
2009 (file-name (string-append "java-cisd-base-" version "-checkout"))
2012 "1i5adyf7nzclb0wydgwa1az04qliid8035vpahaandmkmigbnxiy"))
2013 (modules '((guix build utils)))
2016 ;; Delete included gradle jar
2017 (delete-file-recursively "gradle/wrapper")
2018 ;; Delete pre-built native libraries
2019 (delete-file-recursively "libs")
2021 (build-system ant-build-system)
2023 `(#:make-flags '("-file" "build/build.xml")
2024 #:test-target "jar-test"
2027 (modify-phases %standard-phases
2028 (add-after 'unpack 'unpack-build-resources
2029 (lambda* (#:key inputs #:allow-other-keys)
2030 (copy-recursively (assoc-ref inputs "build-resources")
2031 "../build_resources")
2033 (add-after 'unpack-build-resources 'fix-dependencies
2034 (lambda* (#:key inputs #:allow-other-keys)
2035 (substitute* "build/build.xml"
2036 (("\\$\\{lib\\}/testng/testng-jdk15.jar")
2037 (string-append (assoc-ref inputs "java-testng")
2038 "/share/java/java-testng.jar"))
2039 (("\\$\\{lib\\}/commons-lang/commons-lang.jar")
2040 (string-append (assoc-ref inputs "java-commons-lang")
2041 "/share/java/commons-lang-"
2042 ,(package-version java-commons-lang) ".jar"))
2043 (("\\$\\{lib\\}/commons-io/commons-io.jar")
2044 (string-append (assoc-ref inputs "java-commons-io")
2045 "/share/java/commons-io-"
2046 ,(package-version java-commons-io)
2048 ;; Remove dependency on svn
2049 (("<build-info.*") "")
2050 (("\\$\\{revision.number\\}")
2051 ,(number->string revision))
2052 (("\\$\\{version.number\\}") ,base-version))
2053 ;; Remove dependency on classycle
2054 (substitute* "../build_resources/ant/build-common.xml"
2055 (("<taskdef name=\"dependency-checker.*") "")
2056 (("classname=\"classycle.*") "")
2057 (("classpath=\"\\$\\{lib\\}/classycle.*") ""))
2059 ;; A few tests fail because of the lack of a proper /etc/groups and
2060 ;; /etc/passwd file in the build container.
2061 (add-after 'unpack 'disable-broken-tests
2063 (substitute* "sourceTest/java/ch/systemsx/cisd/base/AllTests.java"
2064 (("Unix.isOperational\\(\\)") "false"))
2066 ;; These decorators are almost useless and pull in an unpackaged
2068 (add-after 'unpack 'remove-useless-decorators
2070 (substitute* "source/java/ch/systemsx/cisd/base/unix/Unix.java"
2072 (("import ch.rinn.restrictions.Private;") ""))
2073 (substitute* "sourceTest/java/ch/systemsx/cisd/base/unix/UnixTests.java"
2075 (("import ch.rinn.restrictions.Friend;") ""))
2077 (add-before 'configure 'build-native-code
2078 (lambda* (#:key inputs #:allow-other-keys)
2079 (let ((jdk (assoc-ref inputs "jdk"))
2080 (dir ,(match (%current-system)
2083 ((or "armhf-linux" "aarch64-linux")
2085 ((or "x86_64-linux")
2087 (_ "unknown-Linux"))))
2088 (with-directory-excursion "source/c"
2089 (invoke "gcc" "-shared" "-O3" "-fPIC" "unix.c"
2090 (string-append "-I" jdk "/include")
2091 (string-append "-I" jdk "/include/linux")
2093 (invoke "gcc" "-shared" "-O3" "-fPIC"
2094 "-DMACHINE_BYTE_ORDER=1"
2102 (string-append "-I" jdk "/include")
2103 (string-append "-I" jdk "/include/linux")
2104 "-o" "libnativedata.so"))
2105 (install-file "source/c/libunix.so"
2106 (string-append "libs/native/unix/" dir))
2107 (install-file "source/c/libnativedata.so"
2108 (string-append "libs/native/nativedata/" dir))
2110 ;; In the "check" phase we only build the test executable.
2111 (add-after 'check 'run-tests
2113 (invoke "java" "-jar" "targets/dist/sis-base-test.jar")
2114 (delete-file "targets/dist/sis-base-test.jar")
2116 (replace 'install (install-jars "targets/dist")))))
2118 `(("jdk" ,icedtea-8)
2119 ("java-commons-lang" ,java-commons-lang)
2120 ("java-commons-io" ,java-commons-io)
2121 ("java-testng" ,java-testng)
2126 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2127 "base/tags/release/"
2128 (version-major+minor base-version)
2130 "/build_resources/"))
2131 (revision revision)))
2134 "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk"))))))
2135 (home-page "http://svnsis.ethz.ch")
2136 (synopsis "Utility classes for libraries from ETH Zurich")
2137 (description "This library supplies some utility classes needed for
2138 libraries from the SIS division at ETH Zurich like jHDF5.")
2139 ;; The C sources are under a non-copyleft license, which looks like a
2140 ;; variant of the BSD licenses. The whole package is under the ASL2.0.
2141 (license (list license:asl2.0
2142 (license:non-copyleft "file://source/c/COPYING"))))))
2144 (define-public java-cisd-args4j
2145 (let ((revision 39162)
2146 (base-version "9.11.2"))
2148 (name "java-cisd-args4j")
2149 (version (string-append base-version "-" (number->string revision)))
2153 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2154 "args4j/tags/release/"
2155 (version-major+minor base-version)
2156 ".x/" base-version "/args4j/"))
2157 (revision revision)))
2158 (file-name (string-append "java-cisd-args4j-" version "-checkout"))
2161 "0hhqznjaivq7ips7mkwas78z42s6djsm20rrs7g1zd59rcsakxn2"))))
2162 (build-system ant-build-system)
2164 `(#:make-flags '("-file" "build/build.xml")
2165 #:tests? #f ; there are no tests
2166 ;; There are weird build failures with JDK8, such as: "The type
2167 ;; java.io.ObjectInputStream cannot be resolved. It is indirectly
2168 ;; referenced from required .class files"
2170 #:modules ((guix build ant-build-system)
2172 (guix build java-utils)
2177 (modify-phases %standard-phases
2178 (add-after 'unpack 'unpack-build-resources
2179 (lambda* (#:key inputs #:allow-other-keys)
2180 (mkdir-p "../build_resources")
2181 (invoke "tar" "xf" (assoc-ref inputs "build-resources")
2182 "-C" "../build_resources"
2183 "--strip-components=1")
2184 (mkdir-p "../build_resources/lib")
2186 (add-after 'unpack-build-resources 'fix-dependencies
2187 (lambda* (#:key inputs #:allow-other-keys)
2188 ;; FIXME: There should be a more convenient abstraction for
2189 ;; editing XML files.
2190 (with-directory-excursion "../build_resources/ant/"
2191 (chmod "build-common.xml" #o664)
2192 (call-with-output-file "build-common.xml.new"
2196 (with-input-from-file "build-common.xml"
2197 (lambda _ (xml->sxml #:trim-whitespace? #t)))
2198 `(;; Remove dependency on classycle and custom ant tasks
2199 (taskdef . ,(lambda (tag . kids)
2200 (let ((name ((sxpath '(name *text*)) kids)))
2201 (if (or (member "build-info" name)
2202 (member "dependency-checker" name)
2203 (member "build-java-subprojects" name)
2204 (member "project-classpath" name))
2207 (typedef . ,(lambda (tag . kids)
2208 (let ((name ((sxpath '(name *text*)) kids)))
2209 (if (member "recursive-jar" name)
2212 (build-java-subprojects . ,(lambda _ '()))
2213 ;; Ignore everything else
2214 (*default* . ,(lambda (tag . kids) `(,tag ,@kids)))
2215 (*text* . ,(lambda (_ txt) txt))))
2217 (rename-file "build-common.xml.new" "build-common.xml"))
2218 (substitute* "build/build.xml"
2219 (("\\$\\{lib\\}/cisd-base/cisd-base.jar")
2220 (string-append (assoc-ref inputs "java-cisd-base")
2221 "/share/java/sis-base.jar"))
2222 ;; Remove dependency on svn
2223 (("<build-info.*") "")
2224 (("\\$\\{revision.number\\}")
2225 ,(number->string revision))
2226 (("\\$\\{version.number\\}") ,base-version)
2227 ;; Don't use custom ant tasks.
2228 (("recursive-jar") "jar")
2229 (("<project-classpath.*") ""))
2231 (replace 'install (install-jars "targets/dist")))))
2233 `(("java-cisd-base" ,java-cisd-base)))
2235 `(("ecj" ,java-ecj-3.5)
2240 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2241 "args4j/tags/release/"
2242 (version-major+minor base-version)
2244 "/build_resources/"))
2245 (revision revision)))
2248 "056cam4k8pll7ass31sy6gwn8g8719njc41yf4l02b0342nilkyf"))
2249 (modules '((guix build utils)))
2250 ;; Delete bundled pre-built jars.
2252 '(begin (delete-file-recursively "lib/") #t))))))
2253 (home-page "http://svnsis.ethz.ch")
2254 (synopsis "Command line parser library")
2255 (description "This package provides a parser for command line arguments.")
2256 (license license:asl2.0))))
2258 (define-public java-cisd-jhdf5
2259 (let ((revision 39162)
2260 (base-version "14.12.6"))
2262 (name "java-cisd-jhdf5")
2263 (version (string-append base-version "-" (number->string revision)))
2267 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2268 "jhdf5/tags/release/"
2269 (version-major+minor base-version)
2270 ".x/" base-version "/jhdf5/"))
2271 (revision revision)))
2272 (file-name (string-append "java-cisd-jhdf5-" version "-checkout"))
2275 "13i17s2hn0q9drdqvp8csy7770p3hdbh9rp30ihln2ldkfawdmz0"))
2276 (modules '((guix build utils)))
2279 ;; Delete included gradle jar
2280 (delete-file-recursively "gradle/wrapper")
2281 ;; Delete pre-built native libraries
2282 (delete-file-recursively "libs")
2284 (build-system ant-build-system)
2286 `(#:make-flags '("-file" "build/build.xml")
2287 #:build-target "jar-all"
2288 #:test-target "jar-test"
2291 (modify-phases %standard-phases
2292 ;; FIXME: this build phase fails.
2293 (delete 'generate-jar-indices)
2294 ;; Don't erase results from the build phase when building tests.
2295 (add-after 'unpack 'separate-test-target-from-clean
2297 (substitute* "build/build.xml"
2298 (("\"jar-test\" depends=\"clean, ")
2299 "\"jar-test\" depends=\""))
2301 (add-after 'unpack 'unpack-build-resources
2302 (lambda* (#:key inputs #:allow-other-keys)
2303 (copy-recursively (assoc-ref inputs "build-resources")
2304 "../build_resources")
2305 (delete-file-recursively "../build_resources/lib/")
2306 (mkdir-p "../build_resources/lib")
2307 ;; Remove dependency on classycle
2308 (substitute* "../build_resources/ant/build-common.xml"
2309 (("<taskdef name=\"dependency-checker.*") "")
2310 (("classname=\"classycle.*") "")
2311 (("classpath=\"\\$\\{lib\\}/classycle.*") ""))
2312 ;; Remove dependency on svn
2313 (substitute* "build/build.xml"
2314 (("<build-info.*") "")
2315 (("\\$\\{revision.number\\}")
2316 ,(number->string revision))
2317 (("\\$\\{version.number\\}") ,base-version))
2319 (add-after 'unpack-build-resources 'fix-dependencies
2320 (lambda* (#:key inputs #:allow-other-keys)
2321 (substitute* "../build_resources/ant/build-common.xml"
2322 (("../libraries/testng/testng-jdk15.jar")
2323 (string-append (assoc-ref inputs "java-testng")
2324 "/share/java/java-testng.jar")))
2325 (substitute* "build/build.xml"
2326 (("\\$\\{lib\\}/sis-base/sis-base.jar")
2327 (string-append (assoc-ref inputs "java-cisd-base")
2328 "/share/java/sis-base.jar"))
2329 (("\\$\\{lib\\}/cisd-args4j/cisd-args4j.jar")
2330 (string-append (assoc-ref inputs "java-cisd-args4j")
2331 "/share/java/cisd-args4j.jar"))
2332 (("\\$\\{lib\\}/commons-lang/commons-lang.jar")
2333 (string-append (assoc-ref inputs "java-commons-lang")
2334 "/share/java/commons-lang-"
2335 ,(package-version java-commons-lang) ".jar"))
2336 (("\\$\\{lib\\}/commons-io/commons-io.jar")
2337 (string-append (assoc-ref inputs "java-commons-io")
2338 "/share/java/commons-io-"
2339 ,(package-version java-commons-io)
2341 (("\\$\\{lib\\}/testng/testng-jdk15.jar")
2342 (string-append (assoc-ref inputs "java-testng")
2343 "/share/java/java-testng.jar"))
2344 (("\\$\\{lib\\}/junit4/junit.jar")
2345 (string-append (assoc-ref inputs "java-junit")
2346 "/share/java/junit.jar"))
2347 (("\\$\\{lib\\}/jmock/hamcrest/hamcrest-core.jar")
2348 (string-append (assoc-ref inputs "java-hamcrest-core")
2349 "/share/java/hamcrest-core.jar")))
2350 ;; Remove dependency on ch.rinn.restrictions
2351 (with-directory-excursion "source/java/ch/systemsx/cisd/hdf5/"
2352 (substitute* '("BitSetConversionUtils.java"
2354 (("import ch.rinn.restrictions.Private;") "")
2356 (with-directory-excursion "sourceTest/java/ch/systemsx/cisd/hdf5/"
2357 (substitute* '("BitSetConversionTest.java"
2358 "h5ar/HDF5ArchiverTest.java")
2359 (("import ch.rinn.restrictions.Friend;") "")
2361 ;; Remove leftovers from removing @Friend
2362 (substitute* "h5ar/HDF5ArchiverTest.java"
2363 (("\\{ HDF5Archiver.class, IdCache.class, LinkRecord.class \\}\\)")
2366 (add-before 'configure 'build-native-library
2367 (lambda* (#:key inputs #:allow-other-keys)
2368 (let ((jdk (assoc-ref inputs "jdk"))
2369 (hdf5 (assoc-ref inputs "hdf5"))
2370 (dir ,(match (%current-system)
2373 ((or "armhf-linux" "aarch64-linux")
2375 ((or "x86_64-linux")
2377 (_ "unknown-Linux"))))
2378 (with-directory-excursion "source/c"
2379 (apply invoke `("gcc" "-shared" "-O3"
2381 "-Wl,--exclude-libs,ALL"
2382 ,@(find-files "jhdf5" "\\.c$")
2383 ,@(find-files "hdf-java" "\\.c$")
2384 ,(string-append "-I" hdf5 "/include")
2385 ,(string-append "-I" jdk "/include")
2386 ,(string-append "-I" jdk "/include/linux")
2387 ,(string-append hdf5 "/lib/libhdf5.a")
2388 "-o" "libjhdf5.so" "-lz")))
2389 (install-file "source/c/libjhdf5.so"
2390 (string-append "libs/native/jhdf5/" dir))
2392 ;; In the "check" phase we only build the test executable.
2393 (add-after 'check 'run-tests
2395 (invoke "java" "-jar" "targets/dist/sis-jhdf5-test.jar")
2396 (delete-file "targets/dist/sis-jhdf5-test.jar")
2399 (install-jars "targets/dist")))))
2401 `(("java-cisd-base" ,java-cisd-base)
2402 ("java-cisd-args4j" ,java-cisd-args4j)
2403 ("java-commons-lang" ,java-commons-lang)
2404 ("java-commons-io" ,java-commons-io)
2408 `(("jdk" ,icedtea-8)
2409 ("java-testng" ,java-testng)
2410 ("java-junit" ,java-junit)
2411 ("java-jmock" ,java-jmock)
2412 ("java-hamcrest-core" ,java-hamcrest-core)
2417 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2418 "jhdf5/tags/release/"
2419 (version-major+minor base-version)
2421 "/build_resources/"))
2422 (revision revision)))
2425 "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk"))))))
2426 (home-page "https://wiki-bsse.ethz.ch/display/JHDF5/")
2427 (synopsis "Java binding for HDF5")
2428 (description "JHDF5 is a high-level API in Java for reading and writing
2429 HDF5 files, building on the libraries provided by the HDF Group.")
2430 ;; The C sources are under a non-copyleft license, which looks like a
2431 ;; variant of the BSD licenses. The whole package is under the ASL2.0.
2432 (license (list license:asl2.0
2433 (license:non-copyleft "file://source/c/COPYING"))))))
2435 (define-public java-classpathx-servletapi
2437 (name "java-classpathx-servletapi")
2441 (uri (string-append "mirror://gnu/classpathx/servletapi/"
2442 "servletapi-" version ".tar.gz"))
2445 "07d8h051siga2f33fra72hk12sbq1bxa4jifjg0qj0vfazjjff0x"))))
2446 (build-system ant-build-system)
2448 `(#:tests? #f ; there is no test target
2449 #:build-target "compile"
2451 (list "-Dbuild.compiler=javac1.8"
2452 (string-append "-Ddist=" (assoc-ref %outputs "out")))
2454 (modify-phases %standard-phases
2456 (lambda* (#:key make-flags #:allow-other-keys)
2457 (zero? (apply system* `("ant" "dist" ,@make-flags))))))))
2458 (home-page "https://www.gnu.org/software/classpathx/")
2459 (synopsis "Java servlet API implementation")
2460 (description "This is the GNU servlet API distribution, part of the
2461 ClasspathX project. It provides implementations of version 3.0 of the servlet
2462 API and version 2.1 of the Java ServerPages API.")
2463 (license license:gpl3+)))
2465 (define-public java-swt
2470 ;; The types of many variables and procedures differ in the sources
2471 ;; dependent on whether the target architecture is a 32-bit system or a
2472 ;; 64-bit system. Instead of patching the sources on demand in a build
2473 ;; phase we download either the 32-bit archive (which mostly uses "int"
2474 ;; types) or the 64-bit archive (which mostly uses "long" types).
2475 (let ((hash32 "09q0cbh90d90q3a7dx9430kc4m6bijrkr4lajrmzzvi0jjdpq4v9")
2476 (hash64 "17k5hs75a87ssmc5xhwdfdm2gn4zba0r837l2455za01krnkaa2q")
2479 (let-values (((hash file)
2480 (match (or (%current-target-system) (%current-system))
2481 ("x86_64-linux" (values hash64 file64))
2482 (_ (values hash32 file32)))))
2486 "http://download.eclipse.org/eclipse/downloads/drops4/"
2487 "R-" version "-201710090410/swt-" version
2488 "-gtk-linux-" file ".zip"))
2489 (sha256 (base32 hash))))))
2490 (build-system ant-build-system)
2492 `(#:jar-name "swt.jar"
2494 #:tests? #f ; no "check" target
2496 (modify-phases %standard-phases
2498 (lambda* (#:key source #:allow-other-keys)
2500 (zero? (system* "unzip" source "-d" "swt"))
2503 (zero? (system* "unzip" "src.zip" "-d" "src")))))
2504 ;; The classpath contains invalid icecat jars. Since we don't need
2505 ;; anything other than the JDK on the classpath, we can simply unset
2507 (add-after 'configure 'unset-classpath
2508 (lambda _ (unsetenv "CLASSPATH") #t))
2509 (add-before 'build 'build-native
2510 (lambda* (#:key inputs outputs #:allow-other-keys)
2511 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
2512 ;; Build shared libraries. Users of SWT have to set the system
2513 ;; property swt.library.path to the "lib" directory of this
2516 (setenv "OUTPUT_DIR" lib)
2517 (with-directory-excursion "src"
2518 (zero? (system* "bash" "build.sh"))))))
2519 (add-after 'install 'install-native
2520 (lambda* (#:key outputs #:allow-other-keys)
2521 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
2522 (for-each (lambda (file)
2523 (install-file file lib))
2524 (find-files "." "\\.so$"))
2528 ("libxtst" ,libxtst)
2533 `(("pkg-config" ,pkg-config)
2535 (home-page "https://www.eclipse.org/swt/")
2536 (synopsis "Widget toolkit for Java")
2538 "SWT is a widget toolkit for Java designed to provide efficient, portable
2539 access to the user-interface facilities of the operating systems on which it
2541 ;; SWT code is licensed under EPL1.0
2542 ;; Gnome and Gtk+ bindings contain code licensed under LGPLv2.1
2543 ;; Cairo bindings contain code under MPL1.1
2544 ;; XULRunner 1.9 bindings contain code under MPL2.0
2549 license:lgpl2.1+))))
2551 (define-public java-xz
2557 (uri (string-append "http://tukaani.org/xz/xz-java-" version ".zip"))
2560 "1z3p1ri1gvl07inxn0agx44ck8n7wrzfmvkz8nbq3njn8r9wba8x"))))
2561 (build-system ant-build-system)
2563 `(#:tests? #f ; There are no tests to run.
2564 #:jar-name ,(string-append "xz-" version ".jar")
2566 (modify-phases %standard-phases
2567 ;; The unpack phase enters the "maven" directory by accident.
2568 (add-after 'unpack 'chdir
2569 (lambda _ (chdir "..") #t)))))
2571 `(("unzip" ,unzip)))
2572 (home-page "https://tukaani.org/xz/java.html")
2573 (synopsis "Implementation of XZ data compression in pure Java")
2574 (description "This library aims to be a complete implementation of XZ data
2575 compression in pure Java. Single-threaded streamed compression and
2576 decompression and random access decompression have been fully implemented.")
2577 (license license:public-domain)))
2579 ;; java-hamcrest-core uses qdox version 1.12. We package this version instead
2580 ;; of the latest release.
2581 (define-public java-qdox-1.12
2587 (uri (string-append "http://central.maven.org/maven2/"
2588 "com/thoughtworks/qdox/qdox/" version
2589 "/qdox-" version "-sources.jar"))
2592 "0hlfbqq2avf5s26wxkksqmkdyk6zp9ggqn37c468m96mjv0n9xfl"))))
2593 (build-system ant-build-system)
2595 `(;; Tests require junit
2597 #:jar-name "qdox.jar"
2599 (modify-phases %standard-phases
2601 (lambda* (#:key source #:allow-other-keys)
2603 (with-directory-excursion "src"
2604 (zero? (system* "jar" "-xf" source)))))
2605 ;; At this point we don't have junit, so we must remove the API
2607 (add-after 'unpack 'delete-tests
2609 (delete-file-recursively "src/com/thoughtworks/qdox/junit")
2611 (home-page "http://qdox.codehaus.org/")
2612 (synopsis "Parse definitions from Java source files")
2614 "QDox is a high speed, small footprint parser for extracting
2615 class/interface/method definitions from source files complete with JavaDoc
2616 @code{@@tags}. It is designed to be used by active code generators or
2617 documentation tools.")
2618 (license license:asl2.0)))
2620 (define-public java-jarjar
2622 (name "java-jarjar")
2627 "https://storage.googleapis.com/google-code-archive-downloads/v2/"
2628 "code.google.com/jarjar/jarjar-src-" version ".zip"))
2631 "1v8irhni9cndcw1l1wxqgry013s2kpj0qqn57lj2ji28xjq8ndjl"))
2632 (modules '((guix build utils)))
2635 ;; Delete bundled thirds-party jar archives.
2636 ;; TODO: unbundle maven-plugin-api.
2637 (delete-file "lib/asm-4.0.jar")
2638 (delete-file "lib/asm-commons-4.0.jar")
2639 (delete-file "lib/junit-4.8.1.jar")
2641 (build-system ant-build-system)
2643 `(;; Tests require junit, which ultimately depends on this package.
2645 #:build-target "jar"
2647 (modify-phases %standard-phases
2648 (add-before 'build 'do-not-use-bundled-asm
2649 (lambda* (#:key inputs #:allow-other-keys)
2650 (substitute* "build.xml"
2651 (("<path id=\"path.build\">")
2652 (string-append "<path id=\"path.build\"><fileset dir=\""
2653 (assoc-ref inputs "java-asm-bootstrap")
2654 "/share/java\" includes=\"**/*.jar\"/>"))
2655 (("<zipfileset src=\"lib/asm-4.0.jar\"/>") "")
2656 (("lib/asm-commons-4.0.jar")
2657 (string-append (assoc-ref inputs "java-asm-bootstrap")
2658 "/share/java/asm-6.0.jar"))
2659 (("<include name=\"org/objectweb/asm/commons/Remap\\*\\.class\"/>")
2660 (string-append "<include name=\"org/objectweb/asm/"
2661 "commons/Remap*.class\"/>"
2662 "<include name=\"org/objectweb/asm/*.class\"/>"
2663 "<include name=\"org/objectweb/asm/"
2664 "signature/*.class\"/>"
2665 "<include name=\"org/objectweb/asm/"
2666 "commons/SignatureRemapper.class\"/>")))
2669 (lambda* (#:key outputs #:allow-other-keys)
2670 (let ((target (string-append (assoc-ref outputs "out")
2672 (install-file (string-append "dist/jarjar-" ,version ".jar")
2676 `(("java-asm-bootstrap" ,java-asm-bootstrap)))
2678 `(("unzip" ,unzip)))
2679 (home-page "https://code.google.com/archive/p/jarjar/")
2680 (synopsis "Repackage Java libraries")
2682 "Jar Jar Links is a utility that makes it easy to repackage Java
2683 libraries and embed them into your own distribution. Jar Jar Links includes
2684 an Ant task that extends the built-in @code{jar} task.")
2685 (license license:asl2.0)))
2687 (define-public java-hamcrest-core
2689 (name "java-hamcrest-core")
2693 (uri (string-append "https://github.com/hamcrest/JavaHamcrest/"
2694 "archive/hamcrest-java-" version ".tar.gz"))
2697 "11g0s105fmwzijbv08lx8jlb521yravjmxnpgdx08fvg1kjivhva"))
2698 (modules '((guix build utils)))
2701 ;; Delete bundled thirds-party jar archives.
2702 (delete-file-recursively "lib")
2704 (build-system ant-build-system)
2706 `(#:tests? #f ; Tests require junit
2707 #:modules ((guix build ant-build-system)
2710 #:make-flags (list (string-append "-Dversion=" ,version))
2711 #:test-target "unit-test"
2712 #:build-target "core"
2714 (modify-phases %standard-phases
2715 ;; Disable unit tests, because they require junit, which requires
2716 ;; hamcrest-core. We also give a fixed value to the "Built-Date"
2717 ;; attribute from the manifest for reproducibility.
2718 (add-before 'configure 'patch-build.xml
2720 (substitute* "build.xml"
2721 (("unit-test, ") "")
2722 (("\\$\\{build.timestamp\\}") "guix"))
2724 ;; Java's "getMethods()" returns methods in an unpredictable order.
2725 ;; To make the output of the generated code deterministic we must
2726 ;; sort the array of methods.
2727 (add-after 'unpack 'make-method-order-deterministic
2729 (substitute* "hamcrest-generator/src/main/java/org/hamcrest/generator/ReflectiveFactoryReader.java"
2730 (("import java\\.util\\.Iterator;" line)
2731 (string-append line "\n"
2732 "import java.util.Arrays; import java.util.Comparator;"))
2733 (("allMethods = cls\\.getMethods\\(\\);" line)
2734 (string-append "_" line
2736 private Method[] getSortedMethods() {
2737 Arrays.sort(_allMethods, new Comparator<Method>() {
2739 public int compare(Method a, Method b) {
2740 return a.toString().compareTo(b.toString());
2746 private Method[] allMethods = getSortedMethods();")))))
2747 (add-before 'build 'do-not-use-bundled-qdox
2748 (lambda* (#:key inputs #:allow-other-keys)
2749 (substitute* "build.xml"
2750 (("lib/generator/qdox-1.12.jar")
2751 (string-append (assoc-ref inputs "java-qdox-1.12")
2752 "/share/java/qdox.jar")))
2754 ;; build.xml searches for .jar files in this directoy, which
2755 ;; we remove from the source archive.
2756 (add-before 'build 'create-dummy-directories
2758 (mkdir-p "lib/integration")
2761 (lambda* (#:key outputs #:allow-other-keys)
2762 (let* ((target (string-append (assoc-ref outputs "out")
2764 (version-suffix ,(string-append "-" version ".jar"))
2765 (install-without-version-suffix
2768 (string-append target
2769 (basename jar version-suffix)
2773 install-without-version-suffix
2776 (and (string-suffix? ".jar" name)
2777 (not (string-suffix? "-sources.jar" name)))))))
2780 `(("java-qdox-1.12" ,java-qdox-1.12)
2781 ("java-jarjar" ,java-jarjar)))
2782 (home-page "http://hamcrest.org/")
2783 (synopsis "Library of matchers for building test expressions")
2785 "This package provides a library of matcher objects (also known as
2786 constraints or predicates) allowing @code{match} rules to be defined
2787 declaratively, to be used in other frameworks. Typical scenarios include
2788 testing frameworks, mocking libraries and UI validation rules.")
2789 (license license:bsd-2)))
2791 (define-public java-junit
2797 (uri (string-append "https://github.com/junit-team/junit/"
2798 "archive/r" version ".tar.gz"))
2799 (file-name (string-append name "-" version ".tar.gz"))
2802 "090dn5v1vs0b3acyaqc0gjf6p8lmd2h24wfzsbq7sly6b214anws"))
2803 (modules '((guix build utils)))
2806 ;; Delete bundled jar archives.
2807 (delete-file-recursively "lib")
2809 (build-system ant-build-system)
2811 `(#:tests? #f ; no tests
2812 #:jar-name "junit.jar"))
2814 `(("java-hamcrest-core" ,java-hamcrest-core)))
2815 (home-page "http://junit.org/")
2816 (synopsis "Test framework for Java")
2818 "JUnit is a simple framework to write repeatable tests for Java projects.
2819 JUnit provides assertions for testing expected results, test fixtures for
2820 sharing common test data, and test runners for running tests.")
2821 (license license:epl1.0)))
2823 (define-public java-plexus-utils
2825 (name "java-plexus-utils")
2829 (uri (string-append "https://github.com/codehaus-plexus/"
2830 "plexus-utils/archive/plexus-utils-"
2834 "1mlwpc6fms24slygv5yvi6fi9hcha2fh0v73p5znpi78bg36i2js"))))
2835 (build-system ant-build-system)
2836 ;; FIXME: The default build.xml does not include a target to install
2839 `(#:jar-name "plexus-utils.jar"
2840 #:source-dir "src/main"
2842 (modify-phases %standard-phases
2843 (add-after 'unpack 'fix-reference-to-/bin-and-/usr
2845 (substitute* "src/main/java/org/codehaus/plexus/util/\
2846 cli/shell/BourneShell.java"
2847 (("/bin/sh") (which "sh"))
2848 (("/usr/") (getcwd)))
2850 (add-after 'unpack 'fix-or-disable-broken-tests
2852 (with-directory-excursion "src/test/java/org/codehaus/plexus/util"
2853 (substitute* '("cli/CommandlineTest.java"
2854 "cli/shell/BourneShellTest.java")
2855 (("/bin/sh") (which "sh"))
2856 (("/bin/echo") (which "echo")))
2858 ;; This test depends on MavenProjectStub, but we don't have
2859 ;; a package for Maven.
2860 (delete-file "introspection/ReflectionValueExtractorTest.java")
2862 ;; FIXME: The command line tests fail, maybe because they use
2864 (delete-file "cli/CommandlineTest.java"))
2867 `(("java-junit" ,java-junit)))
2868 (home-page "http://codehaus-plexus.github.io/plexus-utils/")
2869 (synopsis "Common utilities for the Plexus framework")
2870 (description "This package provides various Java utility classes for the
2871 Plexus framework to ease working with strings, files, command lines, XML and
2873 (license license:asl2.0)))
2875 (define-public java-plexus-interpolation
2877 (name "java-plexus-interpolation")
2881 (uri (string-append "https://github.com/codehaus-plexus/"
2882 "plexus-interpolation/archive/"
2883 "plexus-interpolation-" version ".tar.gz"))
2886 "03377yzlx5q440m6sxxgv6a5qb8fl30zzcgxgc0hxk5qgl2z1jjn"))))
2887 (build-system ant-build-system)
2889 `(#:jar-name "plexus-interpolation.jar"
2890 #:source-dir "src/main"))
2892 `(("java-junit" ,java-junit)
2893 ("java-hamcrest-core" ,java-hamcrest-core)))
2894 (home-page "http://codehaus-plexus.github.io/plexus-interpolation/")
2895 (synopsis "Java components for interpolating ${} strings and the like")
2896 (description "Plexus interpolator is a modular, flexible interpolation
2897 framework for the expression language style commonly seen in Maven, Plexus,
2898 and other related projects.
2900 It has its foundation in the @code{org.codehaus.plexus.utils.interpolation}
2901 package within @code{plexus-utils}, but has been separated in order to allow
2902 these two libraries to vary independently of one another.")
2903 (license license:asl2.0)))
2905 (define-public java-plexus-classworlds
2907 (name "java-plexus-classworlds")
2911 (uri (string-append "https://github.com/codehaus-plexus/"
2912 "plexus-classworlds/archive/plexus-classworlds-"
2916 "1qm4p0rl8d82lzhsiwnviw11jnq44s0gflg78zq152xyyr2xmh8g"))))
2917 (build-system ant-build-system)
2919 `(#:jar-name "plexus-classworlds.jar"
2920 #:source-dir "src/main"
2921 #:tests? #f));; FIXME: we need to generate some resources as in pom.xml
2923 `(("java-junit" ,java-junit)))
2924 (home-page "http://codehaus-plexus.github.io/plexus-classworlds/")
2925 (synopsis "Java class loader framework")
2926 (description "Plexus classworlds replaces the native @code{ClassLoader}
2927 mechanism of Java. It is especially useful for dynamic loading of application
2929 (license license:asl2.0)))
2931 (define java-plexus-container-default-bootstrap
2933 (name "java-plexus-container-default-bootstrap")
2937 (uri (string-append "https://github.com/codehaus-plexus/plexus-containers"
2938 "/archive/plexus-containers-" version ".tar.gz"))
2941 "0xw5g30qf4a83608rw9v2hv8pfsz7d69dkdhk6r0wia4q78hh1pc"))))
2942 (build-system ant-build-system)
2944 `(#:jar-name "container-default.jar"
2945 #:source-dir "plexus-container-default/src/main/java"
2946 #:test-dir "plexus-container-default/src/test"
2948 #:tests? #f; requires plexus-archiver, which depends on this package
2950 (modify-phases %standard-phases
2951 (add-before 'build 'copy-resources
2954 "plexus-container-default/src/main/resources/"
2958 `(("worldclass" ,java-plexus-classworlds)
2959 ("xbean" ,java-geronimo-xbean-reflect)
2960 ("utils" ,java-plexus-utils)
2961 ("junit" ,java-junit)
2962 ("guava" ,java-guava)))
2963 (home-page "https://github.com/codehaus-plexus/plexus-containers")
2964 (synopsis "Inversion-of-control container")
2965 (description "Plexus-default-container is Plexus' inversion-of-control
2966 (@dfn{IoC}) container. It is composed of its public API and its default
2968 (license license:asl2.0)))
2970 (define-public java-plexus-io
2972 (name "java-plexus-io")
2976 (uri (string-append "https://github.com/codehaus-plexus/plexus-io"
2977 "/archive/plexus-io-" version ".tar.gz"))
2980 "0f2j41kihaymxkpbm55smpxjja235vad8cgz94frfy3ppcp021dw"))))
2981 (build-system ant-build-system)
2983 `(#:jar-name "plexus-io.jar"
2984 #:source-dir "src/main/java"
2985 #:test-dir "src/test"
2988 (modify-phases %standard-phases
2989 (add-before 'build 'copy-resources
2991 (mkdir-p "build/classes/META-INF/plexus")
2992 (copy-file "src/main/resources/META-INF/plexus/components.xml"
2993 "build/classes/META-INF/plexus/components.xml")
2996 `(("utils" ,java-plexus-utils)
2997 ("commons-io" ,java-commons-io)
2998 ("java-jsr305" ,java-jsr305)))
3000 `(("junit" ,java-junit)
3001 ("hamcrest" ,java-hamcrest-core)
3002 ("guava" ,java-guava)
3003 ("classworlds" ,java-plexus-classworlds)
3004 ("xbean" ,java-geronimo-xbean-reflect)
3005 ("container-default" ,java-plexus-container-default-bootstrap)))
3006 (home-page "https://github.com/codehaus-plexus/plexus-io")
3007 (synopsis "I/O plexus components")
3008 (description "Plexus IO is a set of plexus components, which are designed
3009 for use in I/O operations. This implementation using plexus components allows
3010 reusing it in maven.")
3011 (license license:asl2.0)))
3013 (define-public java-plexus-archiver
3015 (name "java-plexus-archiver")
3019 (uri (string-append "https://github.com/codehaus-plexus/plexus-archiver"
3020 "/archive/plexus-archiver-" version ".tar.gz"))
3023 "0iv1j7khra6icqh3jndng3iipfmkc7l5jq2y802cm8r575v75pyv"))))
3024 (build-system ant-build-system)
3026 `(#:jar-name "plexus-archiver.jar"
3027 #:source-dir "src/main/java"
3029 #:test-dir "src/test"
3030 #:test-exclude (list "**/Abstract*.java" "**/Base*.java")
3032 (modify-phases %standard-phases
3033 (add-before 'check 'remove-failing
3035 ;; Requires an older version of plexus container
3037 "src/test/java/org/codehaus/plexus/archiver/DuplicateFilesTest.java")))
3038 (add-before 'build 'copy-resources
3040 (mkdir-p "build/classes/META-INF/plexus")
3041 (copy-file "src/main/resources/META-INF/plexus/components.xml"
3042 "build/classes/META-INF/plexus/components.xml")
3045 `(("utils" ,java-plexus-utils)
3046 ("commons-io" ,java-commons-io)
3047 ("snappy" ,java-iq80-snappy)
3048 ("io" ,java-plexus-io)
3049 ("compress" ,java-commons-compress)
3050 ("container-default" ,java-plexus-container-default-bootstrap)
3051 ("snappy" ,java-snappy)
3052 ("java-jsr305" ,java-jsr305)))
3054 `(("junit" ,java-junit)
3055 ("classworld" ,java-plexus-classworlds)
3056 ("xbean" ,java-geronimo-xbean-reflect)
3057 ("xz" ,java-tukaani-xz)
3058 ("guava" ,java-guava)))
3059 (home-page "https://github.com/codehaus-plexus/plexus-archiver")
3060 (synopsis "Archiver component of the Plexus project")
3061 (description "Plexus-archiver contains a component to deal with project
3063 (license license:asl2.0)))
3065 (define-public java-plexus-container-default
3067 (inherit java-plexus-container-default-bootstrap)
3068 (name "java-plexus-container-default")
3070 `(#:jar-name "container-default.jar"
3071 #:source-dir "plexus-container-default/src/main/java"
3072 #:test-dir "plexus-container-default/src/test"
3073 #:test-exclude (list ;"**/*Test.java"
3075 ;; Requires plexus-hierarchy
3076 "**/PlexusHierarchyTest.java"
3078 "**/ComponentRealmCompositionTest.java"
3079 "**/PlexusContainerTest.java")
3082 (modify-phases %standard-phases
3083 (add-before 'build 'copy-resources
3086 "plexus-container-default/src/main/resources/"
3089 (add-before 'check 'fix-paths
3091 (let ((dir "plexus-container-default/src/test/java/org/codehaus"))
3094 dir "/plexus/component/composition/"
3095 "ComponentRealmCompositionTest.java")
3096 (("src/test") "plexus-container-default/src/test"))
3099 `(("worldclass" ,java-plexus-classworlds)
3100 ("xbean" ,java-geronimo-xbean-reflect)
3101 ("utils" ,java-plexus-utils)
3102 ("junit" ,java-junit)
3103 ("guava" ,java-guava)))
3105 `(("archiver" ,java-plexus-archiver)
3106 ("hamcrest" ,java-hamcrest-core)))))
3108 (define-public java-plexus-component-annotations
3110 (inherit java-plexus-container-default)
3111 (name "java-plexus-component-annotations")
3113 `(#:jar-name "plexus-component-annotations.jar"
3114 #:source-dir "plexus-component-annotations/src/main/java"
3115 #:tests? #f)); no tests
3118 (synopsis "Plexus descriptors generator")
3119 (description "This package is a Maven plugin to generate Plexus descriptors
3120 from source tags and class annotations.")))
3122 (define-public java-plexus-cipher
3124 (name "java-plexus-cipher")
3128 (uri (string-append "https://github.com/codehaus-plexus/plexus-cipher"
3129 "/archive/plexus-cipher-" version ".tar.gz"))
3132 "1j3r8xzlxlk340snkjp6lk2ilkxlkn8qavsfiq01f43xmvv8ymk3"))))
3133 (build-system ant-build-system)
3135 `(#:jar-name "plexus-cipher.jar"
3136 #:source-dir "src/main/java"
3138 #:tests? #f; FIXME: requires sisu-inject-bean
3140 (modify-phases %standard-phases
3141 (add-before 'build 'copy-resources
3143 (copy-recursively "src/main/resources" "build/classes")
3144 (mkdir-p "build/classes/META-INF/sisu")
3145 (with-output-to-file "build/classes/META-INF/sisu/javax.inject.Named"
3147 (display "org.sonatype.plexus.components.cipher.DefaultPlexusCipher\n")))
3150 `(("java-cdi-api" ,java-cdi-api)
3151 ("java-javax-inject" ,java-javax-inject)))
3152 (home-page "https://github.com/sonatype/plexus-cipher")
3153 (synopsis "Encryption/decryption Component")
3154 (description "Plexus-cipher contains a component to deal with encryption
3156 (license license:asl2.0)))
3158 (define-public java-plexus-compiler-api
3160 (name "java-plexus-compiler-api")
3164 (uri (string-append "https://github.com/codehaus-plexus/plexus-compiler"
3165 "/archive/plexus-compiler-" version ".tar.gz"))
3168 "0g3x26pymcdnfnwv2a1i57pd5s26f5zqfi1rdy98z1bn01klx25k"))))
3169 (build-system ant-build-system)
3171 `(#:jar-name "plexus-compiler-api.jar"
3172 #:source-dir "plexus-compiler-api/src/main/java"
3174 #:test-dir "plexus-compiler-api/src/test"))
3176 `(("java-plexus-container-default" ,java-plexus-container-default)
3177 ("java-plexus-util" ,java-plexus-utils)))
3179 `(("java-junit" ,java-junit)))
3180 (home-page "https://github.com/codehaus-plexus/plexus-compiler")
3181 (synopsis "Plexus Compilers component's API to manipulate compilers")
3182 (description "This package contains the API used by components to manipulate
3184 (license (list license:asl2.0
3187 (define-public java-plexus-compiler-javac
3189 (inherit java-plexus-compiler-api)
3190 (name "java-plexus-compiler-javac")
3192 `(#:jar-name "plexus-compiler-javac.jar"
3193 #:source-dir "plexus-compilers/plexus-compiler-javac/src/main/java"
3195 #:tests? #f; depends on compiler-test -> maven-core -> ... -> this package.
3196 #:test-dir "plexus-compilers/plexus-compiler-javac/src/test"))
3198 `(("java-plexus-compiler-api" ,java-plexus-compiler-api)
3199 ("java-plexus-utils" ,java-plexus-utils)
3200 ("java-plexus-container-default" ,java-plexus-container-default)))
3202 `(("java-junit" ,java-junit)))
3203 (synopsis "Javac Compiler support for Plexus Compiler component")
3204 (description "This package contains the Javac Compiler support for Plexus
3205 Compiler component.")))
3207 (define-public java-plexus-sec-dispatcher
3209 (name "java-plexus-sec-dispatcher")
3210 (version "1.4") ;; Newest release listed at the Maven Central Repository.
3212 ;; This project doesn't tag releases or publish tarballs, so we take
3213 ;; the "prepare release plexus-sec-dispatcher-1.4" git commit.
3215 (uri (string-append "https://github.com/sonatype/plexus-sec-dispatcher/"
3216 "archive/7db8f88048.tar.gz"))
3219 "1smfrk4n7xbrsxpxcp2j4i0j8q86j73w0w6xg7qz83dp6dagdjgp"))
3220 (file-name (string-append name "-" version ".tar.gz"))))
3222 `(#:jar-name "plexus-sec-dispatcher.jar"
3223 #:source-dir "src/main/java"
3226 (modify-phases %standard-phases
3227 (add-before 'build 'generate-models
3228 (lambda* (#:key inputs #:allow-other-keys)
3229 (define (modello-single-mode file version mode)
3230 (zero? (system* "java"
3231 "org.codehaus.modello.ModelloCli"
3232 file mode "src/main/java" version
3234 (let ((file "src/main/mdo/settings-security.mdo"))
3236 (modello-single-mode file "1.0.0" "java")
3237 (modello-single-mode file "1.0.0" "xpp3-reader")
3238 (modello-single-mode file "1.0.0" "xpp3-writer")))))
3239 (add-before 'build 'generate-components.xml
3241 (mkdir-p "build/classes/META-INF/plexus")
3242 (with-output-to-file "build/classes/META-INF/plexus/components.xml"
3248 <role>org.sonatype.plexus.components.sec.dispatcher.SecDispatcher</role>\n
3249 <role-hint>default</role-hint>\n
3250 <implementation>org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher</implementation>\n
3251 <description></description>\n
3254 <role>org.sonatype.plexus.components.cipher.PlexusCipher</role>\n
3255 <field-name>_cipher</field-name>\n
3258 <role>org.sonatype.plexus.components.sec.dispatcher.PasswordDecryptor</role>\n
3259 <field-name>_decryptors</field-name>\n
3263 <_configuration-file>~/.settings-security.xml</_configuration-file>\n
3267 </component-set>\n")))))
3268 (add-before 'check 'fix-paths
3270 (copy-recursively "src/test/resources" "target"))))))
3272 `(("java-plexus-cipher" ,java-plexus-cipher)))
3274 `(("java-modello-core" ,java-modello-core)
3276 ("java-plexus-container-default" ,java-plexus-container-default)
3277 ("java-plexus-classworlds" ,java-plexus-classworlds)
3278 ("java-plexus-utils" ,java-plexus-utils)
3279 ("java-guava" ,java-guava)
3280 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
3281 ("java-sisu-build-api" ,java-sisu-build-api)
3283 ("java-modellop-plugins-java" ,java-modello-plugins-java)
3284 ("java-modellop-plugins-xml" ,java-modello-plugins-xml)
3285 ("java-modellop-plugins-xpp3" ,java-modello-plugins-xpp3)
3287 ("java-junit" ,java-junit)))
3288 (build-system ant-build-system)
3289 (home-page "https://github.com/sonatype/plexus-sec-dispatcher")
3290 (synopsis "Plexus Security Dispatcher Component")
3291 (description "This package is the Plexus Security Dispatcher Component.
3292 This component decrypts a string passed to it.")
3293 (license license:asl2.0)))
3295 (define-public java-plexus-cli
3297 (name "java-plexus-cli")
3302 (url "https://github.com/sonatype/plexus-cli")
3303 (commit "a776afa6bca84e5107bedb69440329cdb24ed645")))
3304 (file-name (string-append name "-" version))
3307 "0xjrlay605rypv3zd7y24vlwf0039bil3n2cqw54r1ddpysq46vx"))))
3308 (build-system ant-build-system)
3310 `(#:jar-name "plexus-cli.jar"
3311 #:source-dir "src/main/java"
3313 #:test-dir "src/test"))
3315 `(("java-commons-cli" ,java-commons-cli)
3316 ("java-plexus-container-default" ,java-plexus-container-default)
3317 ("java-plexus-classworlds" ,java-plexus-classworlds)))
3319 `(("java-plexus-utils" ,java-plexus-utils)
3320 ("java-junit" ,java-junit)
3321 ("java-guava" ,java-guava)))
3322 (home-page "https://codehaus-plexus.github.io/plexus-cli")
3323 (synopsis "CLI building library for plexus")
3324 (description "This package is a library to help creating CLI around
3325 Plexus components.")
3326 (license license:asl2.0)))
3328 (define-public java-sisu-build-api
3330 (name "java-sisu-build-api")
3334 (uri (string-append "https://github.com/sonatype/sisu-build-api/"
3335 "archive/plexus-build-api-" version ".tar.gz"))
3338 "1c3rrpma3x634xp2rm2p5iskfhzdyc7qfbhjzr70agrl1jwghgy2"))))
3339 (build-system ant-build-system)
3341 `(#:jar-name "sisu-build-api.jar"
3342 #:source-dir "src/main/java"
3344 #:tests? #f; FIXME: how to run the tests?
3346 (modify-phases %standard-phases
3347 (add-before 'build 'copy-resources
3349 (copy-recursively "src/main/resources" "build/classes")
3350 (substitute* (find-files "build/classes")
3351 (("\\$\\{project.version\\}") ,version))
3353 (add-before 'build 'generate-plexus-compontent
3355 (mkdir-p "build/classes/META-INF/plexus")
3356 ;; This file is required for plexus to inject this package.
3357 ;; FIXME: how is it generated?
3358 (with-output-to-file "build/classes/META-INF/plexus/components.xml"
3364 <role>org.sonatype.plexus.build.incremental.BuildContext</role>\n
3365 <role-hint>default</role-hint>\n
3366 <implementation>org.sonatype.plexus.build.incremental.DefaultBuildContext</implementation>\n
3367 <description>Filesystem based non-incremental build context implementation\n
3368 which behaves as if all files were just created.</description>\n
3371 </component-set>\n")))
3374 `(("java-plexus-utils" ,java-plexus-utils)
3375 ("java-plexus-container-default" ,java-plexus-container-default)))
3376 (home-page "https://github.com/sonatype/sisu-build-api/")
3377 (synopsis "Base build API for maven")
3378 (description "This package contains the base build API for maven and
3379 a default implementation of it. This API is about scanning files in a
3380 project and determining what files need to be rebuilt.")
3381 (license license:asl2.0)))
3383 (define-public java-modello-core
3385 (name "java-modello-core")
3389 (uri (string-append "https://github.com/codehaus-plexus/modello"
3390 "/archive/modello-" version ".tar.gz"))
3393 "0l2pvns8pmlrmjm3iknp7gpg3654y1m8qhy55b19sdwdchdcyxfh"))))
3394 (build-system ant-build-system)
3396 `(#:jar-name "modello-core.jar"
3397 #:source-dir "modello-core/src/main/java"
3398 #:test-dir "modello-core/src/test"
3399 #:main-class "org.codehaus.modello.ModelloCli"
3402 (modify-phases %standard-phases
3403 (add-before 'build 'copy-resources
3405 (mkdir-p "build/classes/META-INF/plexus")
3406 (copy-file "modello-core/src/main/resources/META-INF/plexus/components.xml"
3407 "build/classes/META-INF/plexus/components.xml")
3409 (add-before 'check 'fix-tests
3411 (with-directory-excursion "modello-core/src/test/java/org/codehaus"
3412 (substitute* '("modello/core/DefaultModelloCoreTest.java"
3413 "modello/core/io/ModelReaderTest.java")
3414 (("src/test") "modello-core/src/test")))
3417 `(("java-plexus-utils" ,java-plexus-utils)
3418 ("java-plexus-container-default" ,java-plexus-container-default)
3419 ("java-sisu-build-api" ,java-sisu-build-api)))
3421 `(("java-junit" ,java-junit)
3422 ("java-plexus-classworlds" ,java-plexus-classworlds)
3423 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
3424 ("java-guava" ,java-guava)))
3425 (home-page "http://codehaus-plexus.github.io/modello/")
3426 (synopsis "Framework for code generation from a simple model")
3427 (description "Modello is a framework for code generation from a simple model.
3429 Modello generates code from a simple model format: based on a plugin
3430 architecture, various types of code and descriptors can be generated from the
3431 single model, including Java POJOs, XML/JSON/YAML marshallers/unmarshallers,
3432 XSD and documentation.")
3435 ;; Although this package uses only files licensed under expat,
3436 ;; other parts of the source are licensed under different
3437 ;; licenses. We include them to be inherited by other packages.
3439 ;; Some files in modello-plugin-java are licensed under a
3440 ;; 5-clause BSD license.
3441 (license:non-copyleft
3442 (string-append "file:///modello-plugins/modello-plugin-java/"
3443 "src/main/java/org/codehaus/modello/plugin/"
3444 "java/javasource/JNaming.java"))))))
3446 (define-public java-modello-plugins-java
3448 (inherit java-modello-core)
3449 (name "java-modello-plugins-java")
3451 `(#:jar-name "modello-plugins-java.jar"
3452 #:source-dir "modello-plugins/modello-plugin-java/src/main/java"
3453 #:test-dir "modello-plugins/modello-plugin-java/src/test"
3455 #:tests? #f; requires maven-model, which depends on this package
3457 (modify-phases %standard-phases
3458 (add-before 'build 'copy-resources
3460 (mkdir-p "build/classes")
3461 (copy-recursively "modello-plugins/modello-plugin-java/src/main/resources"
3465 `(("java-modello-core" ,java-modello-core)
3466 ,@(package-inputs java-modello-core)))
3467 (synopsis "Modello Java Plugin")
3468 (description "Modello Java Plugin generates Java objects for the model.")))
3470 (define-public java-modello-plugins-xml
3472 (inherit java-modello-core)
3473 (name "java-modello-plugins-xml")
3475 `(#:jar-name "modello-plugins-xml.jar"
3476 #:source-dir "modello-plugins/modello-plugin-xml/src/main/java"
3477 #:test-dir "modello-plugins/modello-plugin-xml/src/test"
3480 (modify-phases %standard-phases
3481 (add-before 'build 'copy-resources
3483 (mkdir-p "build/classes")
3485 "modello-plugins/modello-plugin-xml/src/main/resources"
3488 (add-before 'check 'fix-paths
3490 (with-directory-excursion "modello-plugins/modello-plugin-xml/src/test"
3492 "java/org/codehaus/modello/plugins/xml/XmlModelloPluginTest.java"
3493 (("src/test") "modello-plugins/modello-plugin-xml/src/test"))))))))
3495 `(("java-modello-core" ,java-modello-core)
3496 ("java-modello-plugins-java" ,java-modello-plugins-java)
3497 ,@(package-inputs java-modello-core)))
3498 (synopsis "Modello XML Plugin")
3499 (description "Modello XML Plugin contains shared code for every plugins
3500 working on XML representation of the model.")))
3502 (define-public java-modello-test
3504 (inherit java-modello-core)
3505 (name "java-modello-test")
3507 `(#:jar-name "modello-test.jar"
3508 #:source-dir "modello-test/src/main/java"
3509 #:tests? #f; no tests
3512 `(("java-plexus-utils" ,java-plexus-utils)
3513 ("java-plexus-compiler-api" ,java-plexus-compiler-api)
3514 ("java-plexus-compiler-javac" ,java-plexus-compiler-javac)
3515 ("java-plexus-container-default" ,java-plexus-container-default)))
3516 (synopsis "Modello test package")
3517 (description "The modello test package contains the basis to create
3518 Modello generator unit-tests, including sample models and xml files to test
3519 every feature for every plugin.")))
3521 (define-public java-modello-plugins-xpp3
3523 (inherit java-modello-core)
3524 (name "java-modello-plugins-xpp3")
3526 `(#:jar-name "modello-plugins-xpp3.jar"
3527 #:source-dir "modello-plugins/modello-plugin-xpp3/src/main/java"
3528 #:test-dir "modello-plugins/modello-plugin-xpp3/src/test"
3529 ;; One of the test dependencies is maven-model which depends on this package.
3533 (modify-phases %standard-phases
3534 (add-before 'build 'copy-resources
3536 (mkdir-p "build/classes")
3537 (copy-recursively "modello-plugins/modello-plugin-xpp3/src/main/resources"
3541 `(("java-modello-core" ,java-modello-core)
3542 ("java-modello-plugins-java" ,java-modello-plugins-java)
3543 ("java-modello-plugins-xml" ,java-modello-plugins-xml)
3544 ,@(package-inputs java-modello-core)))
3546 `(("java-xmlunit" ,java-xmlunit)
3547 ("java-modello-test" ,java-modello-test)
3548 ,@(package-native-inputs java-modello-core)))
3549 (synopsis "Modello XPP3 Plugin")
3550 (description "The modello XPP3 plugin generates XML readers and writers based
3551 on the XPP3 API (XML Pull Parser).")))
3553 (define-public java-asm
3559 (uri (string-append "http://download.forge.ow2.org/asm/"
3560 "asm-" version ".tar.gz"))
3563 "115l5pqblirdkmzi32dxx7gbcm4jy0s14y5wircr6h8jdr9aix00"))))
3564 (build-system ant-build-system)
3566 `(("java-aqute-bndlib" ,java-aqute-bndlib)))
3568 `(#:build-target "compile"
3569 ;; The tests require an old version of Janino, which no longer compiles
3574 ;; We don't need these extra ant tasks, but the build system asks us to
3575 ;; provide a path anyway.
3576 "-Dobjectweb.ant.tasks.path=dummy-path"
3577 ;; The java-aqute.bndlib JAR file will be put onto the classpath and
3578 ;; used during the build automatically by ant-build-system, but
3579 ;; java-asm's build.xml fails unless we provide something here.
3580 "-Dbiz.aQute.bnd.path=dummy-path")
3582 (modify-phases %standard-phases
3583 (add-before 'install 'build-jars
3584 (lambda* (#:key make-flags #:allow-other-keys)
3585 ;; We cannot use the "jar" target because it depends on a couple
3586 ;; of unpackaged, complicated tools.
3588 (zero? (system* "jar"
3589 "-cf" (string-append "dist/asm-" ,version ".jar")
3590 "-C" "output/build/tmp" "."))))
3592 (install-jars "dist")))))
3594 `(("java-junit" ,java-junit)))
3595 (home-page "http://asm.ow2.org/")
3596 (synopsis "Very small and fast Java bytecode manipulation framework")
3597 (description "ASM is an all purpose Java bytecode manipulation and
3598 analysis framework. It can be used to modify existing classes or dynamically
3599 generate classes, directly in binary form. The provided common
3600 transformations and analysis algorithms allow to easily assemble custom
3601 complex transformations and code analysis tools.")
3602 (license license:bsd-3)))
3604 (define java-asm-bootstrap
3607 (name "java-asm-bootstrap")
3609 (substitute-keyword-arguments (package-arguments java-asm)
3613 `(("java-aqute-bndlib" ,java-aqute-bndlib-bootstrap)
3614 ("java-aqute-libg" ,java-aqute-libg-bootstrap)
3615 ,@(delete `("java-aqute-bndlib" ,java-aqute-bndlib)
3616 (delete `("java-aqute-libg" ,java-aqute-libg)
3617 (package-inputs java-asm)))))))
3619 (define-public java-cglib
3626 "https://github.com/cglib/cglib/archive/RELEASE_"
3627 (string-map (lambda (c) (if (char=? c #\.) #\_ c)) version)
3629 (file-name (string-append "cglib-" version ".tar.gz"))
3632 "162dvd4fln76ai8prfharf66pn6r56p3sxx683j5vdyccrd5hi1q"))))
3633 (build-system ant-build-system)
3635 `(;; FIXME: tests fail because junit runs
3636 ;; "net.sf.cglib.transform.AbstractTransformTest", which does not seem
3637 ;; to describe a test at all.
3639 #:jar-name "cglib.jar"
3641 (modify-phases %standard-phases
3642 (add-after 'unpack 'chdir
3643 (lambda _ (chdir "cglib") #t)))))
3645 `(("java-asm" ,java-asm)
3646 ("java-junit" ,java-junit)))
3647 (home-page "https://github.com/cglib/cglib/")
3648 (synopsis "Java byte code generation library")
3649 (description "The byte code generation library CGLIB is a high level API
3650 to generate and transform Java byte code.")
3651 (license license:asl2.0)))
3653 (define-public java-objenesis
3655 (name "java-objenesis")
3659 (uri (string-append "https://github.com/easymock/objenesis/"
3660 "archive/" version ".tar.gz"))
3661 (file-name (string-append "objenesis-" version ".tar.gz"))
3664 "1va5qz1i2wawwavhnxfzxnfgrcaflz9p1pg03irrjh4nd3rz8wh6"))))
3665 (build-system ant-build-system)
3667 `(#:jar-name "objenesis.jar"
3668 #:source-dir "main/src/"
3669 #:test-dir "main/src/test/"))
3671 `(("java-junit" ,java-junit)
3672 ("java-hamcrest-core" ,java-hamcrest-core)))
3673 (home-page "http://objenesis.org/")
3674 (synopsis "Bypass the constructor when creating an object")
3675 (description "Objenesis is a small Java library that serves one purpose:
3676 to instantiate a new object of a particular class. It is common to see
3677 restrictions in libraries stating that classes must require a default
3678 constructor. Objenesis aims to overcome these restrictions by bypassing the
3679 constructor on object instantiation.")
3680 (license license:asl2.0)))
3682 (define-public java-easymock
3684 (name "java-easymock")
3688 (uri (string-append "https://github.com/easymock/easymock/"
3689 "archive/easymock-" version ".tar.gz"))
3692 "1yzg0kv256ndr57gpav46cyv4a1ns5sj722l50zpxk3j6sk9hnmi"))))
3693 (build-system ant-build-system)
3695 `(#:jar-name "easymock.jar"
3696 #:source-dir "core/src/main"
3697 #:test-dir "core/src/test"
3699 (modify-phases %standard-phases
3700 ;; FIXME: Android support requires the following packages to be
3701 ;; available: com.google.dexmaker.stock.ProxyBuilder
3702 (add-after 'unpack 'delete-android-support
3704 (with-directory-excursion "core/src/main/java/org/easymock/internal"
3705 (substitute* "MocksControl.java"
3706 (("AndroidSupport.isAndroid\\(\\)") "false")
3707 (("return classProxyFactory = new AndroidClassProxyFactory\\(\\);") ""))
3708 (delete-file "AndroidClassProxyFactory.java"))
3710 (add-after 'unpack 'delete-broken-tests
3712 (with-directory-excursion "core/src/test/java/org/easymock"
3713 ;; This test depends on dexmaker.
3714 (delete-file "tests2/ClassExtensionHelperTest.java")
3716 ;; This is not a test.
3717 (delete-file "tests/BaseEasyMockRunnerTest.java")
3719 ;; This test should be executed with a different runner...
3720 (delete-file "tests2/EasyMockAnnotationsTest.java")
3721 ;; ...but deleting it means that we also have to delete these
3723 (delete-file "tests2/EasyMockRunnerTest.java")
3724 (delete-file "tests2/EasyMockRuleTest.java")
3726 ;; This test fails because the file "easymock.properties" does
3728 (delete-file "tests2/EasyMockPropertiesTest.java"))
3731 `(("java-asm" ,java-asm)
3732 ("java-cglib" ,java-cglib)
3733 ("java-objenesis" ,java-objenesis)))
3735 `(("java-junit" ,java-junit)
3736 ("java-hamcrest-core" ,java-hamcrest-core)))
3737 (home-page "http://easymock.org")
3738 (synopsis "Java library providing mock objects for unit tests")
3739 (description "EasyMock is a Java library that provides an easy way to use
3740 mock objects in unit testing.")
3741 (license license:asl2.0)))
3743 (define-public java-jmock-1
3749 (uri (string-append "https://github.com/jmock-developers/"
3750 "jmock-library/archive/" version ".tar.gz"))
3751 (file-name (string-append "jmock-" version ".tar.gz"))
3754 "0xmrlhq0fszldkbv281k9463mv496143vvmqwpxp62yzjvdkx9w0"))))
3755 (build-system ant-build-system)
3757 `(#:build-target "jars"
3758 #:test-target "run.tests"
3760 (modify-phases %standard-phases
3761 (replace 'install (install-jars "build")))))
3762 (home-page "http://www.jmock.org")
3763 (synopsis "Mock object library for test-driven development")
3764 (description "JMock is a library that supports test-driven development of
3765 Java code with mock objects. Mock objects help you design and test the
3766 interactions between the objects in your programs.
3771 @item makes it quick and easy to define mock objects
3772 @item lets you precisely specify the interactions between
3773 your objects, reducing the brittleness of your tests
3774 @item plugs into your favourite test framework
3775 @item is easy to extend.
3777 (license license:bsd-3)))
3779 (define-public java-jmock
3781 (inherit java-jmock-1)
3786 (uri (string-append "https://github.com/jmock-developers/"
3787 "jmock-library/archive/" version ".tar.gz"))
3788 (file-name (string-append name "-" version ".tar.gz"))
3791 "18650a9g8xffcsdb6w91pbswa7f40fp2sh6s3nclkclz5dbzq8f0"))))
3793 `(("java-hamcrest-all" ,java-hamcrest-all)
3794 ("java-asm" ,java-asm)
3795 ("java-bsh" ,java-bsh)
3796 ("java-junit" ,java-junit)))
3798 `(("cglib" ,java-cglib)))
3800 `(#:jar-name "java-jmock.jar"
3801 #:source-dir "jmock/src/main/java"
3802 #:test-dir "jmock/src/test"))))
3804 (define-public java-jmock-junit4
3806 (inherit java-jmock)
3807 (name "java-jmock-junit4")
3809 `(#:jar-name "java-jmock-junit4.jar"
3810 #:source-dir "jmock-junit4/src/main/java"
3811 #:test-dir "jmock-junit4/src/test"))
3813 `(("java-hamcrest-all" ,java-hamcrest-all)
3814 ("java-asm" ,java-asm)
3815 ("java-bsh" ,java-bsh)
3816 ("java-jmock" ,java-jmock)
3817 ("java-jumit" ,java-junit)))))
3819 (define-public java-jmock-legacy
3821 (inherit java-jmock)
3822 (name "java-jmock-legacy")
3824 `(#:jar-name "java-jmock-legacy.jar"
3825 #:source-dir "jmock-legacy/src/main/java"
3826 #:test-dir "jmock-legacy/src/test"
3828 (modify-phases %standard-phases
3829 (add-before 'check 'copy-tests
3831 ;; This file is a dependancy of some tests
3832 (let ((file "org/jmock/test/acceptance/PackageProtectedType.java"))
3833 (copy-file (string-append "jmock/src/test/java/" file)
3834 (string-append "jmock-legacy/src/test/java/" file))
3837 `(("java-hamcrest-all" ,java-hamcrest-all)
3838 ("java-objenesis" ,java-objenesis)
3839 ("java-cglib" ,java-cglib)
3840 ("java-jmock" ,java-jmock)
3841 ("java-asm" ,java-asm)
3842 ("java-bsh" ,java-bsh)
3843 ("java-junit" ,java-junit)))
3845 `(("java-jmock-junit4" ,java-jmock-junit4)))))
3847 (define-public java-hamcrest-all
3848 (package (inherit java-hamcrest-core)
3849 (name "java-hamcrest-all")
3852 ,@(substitute-keyword-arguments (package-arguments java-hamcrest-core)
3853 ((#:build-target _) "bigjar")
3855 `(modify-phases ,phases
3856 ;; Some build targets override the classpath, so we need to patch
3857 ;; the build.xml to ensure that required dependencies are on the
3859 (add-after 'unpack 'patch-classpath-for-integration
3860 (lambda* (#:key inputs #:allow-other-keys)
3861 (substitute* "build.xml"
3862 ((" build/hamcrest-library-\\$\\{version\\}.jar" line)
3866 (find-files (assoc-ref inputs "java-junit") "\\.jar$")
3867 (find-files (assoc-ref inputs "java-jmock") "\\.jar$")
3868 (find-files (assoc-ref inputs "java-easymock") "\\.jar$")))
3872 `(("java-junit" ,java-junit)
3873 ("java-jmock" ,java-jmock-1)
3874 ("java-easymock" ,java-easymock)
3875 ,@(package-inputs java-hamcrest-core)))))
3877 (define-public java-jopt-simple
3879 (name "java-jopt-simple")
3883 (uri (string-append "http://repo1.maven.org/maven2/"
3884 "net/sf/jopt-simple/jopt-simple/"
3885 version "/jopt-simple-"
3886 version "-sources.jar"))
3889 "1v8bzmwmw6qq20gm42xyay6vrd567dra4vqwhgjnqqjz1gs9f8qa"))))
3890 (build-system ant-build-system)
3892 `(#:tests? #f ; there are no tests
3893 #:jar-name "jopt-simple.jar"))
3894 (home-page "https://pholser.github.io/jopt-simple/")
3895 (synopsis "Java library for parsing command line options")
3896 (description "JOpt Simple is a Java library for parsing command line
3897 options, such as those you might pass to an invocation of @code{javac}. In
3898 the interest of striving for simplicity, as closely as possible JOpt Simple
3899 attempts to honor the command line option syntaxes of POSIX @code{getopt} and
3900 GNU @code{getopt_long}. It also aims to make option parser configuration and
3901 retrieval of options and their arguments simple and expressive, without being
3903 (license license:expat)))
3905 (define-public java-commons-math3
3907 (name "java-commons-math3")
3911 (uri (string-append "mirror://apache/commons/math/source/"
3912 "commons-math3-" version "-src.tar.gz"))
3915 "19l6yp44qc5g7wg816nbn5z3zq3xxzwimvbm4a8pczgvpi4i85s6"))))
3916 (build-system ant-build-system)
3918 `(#:build-target "jar"
3919 #:test-target "test"
3921 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
3922 (junit (assoc-ref %build-inputs "java-junit")))
3923 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
3924 (string-append "-Dhamcrest.jar=" hamcrest
3925 "/share/java/hamcrest-core.jar")))
3927 (modify-phases %standard-phases
3928 ;; We want to build the jar in the build phase and run the tests
3929 ;; later in a separate phase.
3930 (add-after 'unpack 'untangle-targets
3932 (substitute* "build.xml"
3933 (("name=\"jar\" depends=\"test\"")
3934 "name=\"jar\" depends=\"compile\""))
3936 ;; There is no install target.
3938 (install-jars "target")))))
3940 `(("java-junit" ,java-junit)
3941 ("java-hamcrest-core" ,java-hamcrest-core)))
3942 (home-page "http://commons.apache.org/math/")
3943 (synopsis "Apache Commons mathematics library")
3944 (description "Commons Math is a library of lightweight, self-contained
3945 mathematics and statistics components addressing the most common problems not
3946 available in the Java programming language or Commons Lang.")
3947 (license license:asl2.0)))
3949 (define-public java-jmh
3956 (url "http://hg.openjdk.java.net/code-tools/jmh/")
3957 (changeset version)))
3958 (file-name (string-append name "-" version "-checkout"))
3961 "1fxyxhg9famwcg1prc4cgwb5wzyxqavn3cjm5vz8605xz7x5k084"))))
3962 (build-system ant-build-system)
3964 `(#:jar-name "jmh-core.jar"
3965 #:source-dir "jmh-core/src/main"
3966 #:test-dir "jmh-core/src/test"
3968 (modify-phases %standard-phases
3969 ;; This seems to be a bug in the JDK. It may not be necessary in
3970 ;; future versions of the JDK.
3971 (add-after 'unpack 'fix-bug
3973 (with-directory-excursion
3974 "jmh-core/src/main/java/org/openjdk/jmh/runner/options"
3975 (substitute* '("IntegerValueConverter.java"
3976 "ThreadsValueConverter.java")
3977 (("public Class<Integer> valueType")
3978 "public Class<? extends Integer> valueType")))
3981 `(("java-jopt-simple" ,java-jopt-simple)
3982 ("java-commons-math3" ,java-commons-math3)))
3984 `(("java-junit" ,java-junit)
3985 ("java-hamcrest-core" ,java-hamcrest-core)))
3986 (home-page "http://openjdk.java.net/projects/code-tools/jmh/")
3987 (synopsis "Benchmark harness for the JVM")
3988 (description "JMH is a Java harness for building, running, and analysing
3989 nano/micro/milli/macro benchmarks written in Java and other languages
3990 targeting the JVM.")
3992 (license license:gpl2)))
3994 (define-public java-commons-collections4
3996 (name "java-commons-collections4")
4000 (uri (string-append "mirror://apache/commons/collections/source/"
4001 "commons-collections4-" version "-src.tar.gz"))
4004 "1krfhvggympq4avk7gh6qafzf6b9ip6r1m4lmacikyx04039m0wl"))))
4005 (build-system ant-build-system)
4007 `(#:test-target "test"
4009 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
4010 (junit (assoc-ref %build-inputs "java-junit"))
4011 (easymock (assoc-ref %build-inputs "java-easymock")))
4012 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
4013 (string-append "-Dhamcrest.jar=" hamcrest
4014 "/share/java/hamcrest-core.jar")
4015 (string-append "-Deasymock.jar=" easymock
4016 "/share/java/easymock.jar")))
4018 (modify-phases %standard-phases
4020 (install-jars "target")))))
4022 `(("java-junit" ,java-junit)
4023 ("java-hamcrest-core" ,java-hamcrest-core)
4024 ("java-easymock" ,java-easymock)))
4025 (home-page "http://commons.apache.org/collections/")
4026 (synopsis "Collections framework")
4027 (description "The Java Collections Framework is the recognised standard
4028 for collection handling in Java. Commons-Collections seek to build upon the
4029 JDK classes by providing new interfaces, implementations and utilities. There
4030 are many features, including:
4033 @item @code{Bag} interface for collections that have a number of copies of
4035 @item @code{BidiMap} interface for maps that can be looked up from value to
4036 key as well and key to value
4037 @item @code{MapIterator} interface to provide simple and quick iteration over
4039 @item Transforming decorators that alter each object as it is added to the
4041 @item Composite collections that make multiple collections look like one
4042 @item Ordered maps and sets that retain the order elements are added in,
4043 including an LRU based map
4044 @item Reference map that allows keys and/or values to be garbage collected
4046 @item Many comparator implementations
4047 @item Many iterator implementations
4048 @item Adapter classes from array and enumerations to collections
4049 @item Utilities to test or create typical set-theory properties of collections
4050 such as union, intersection, and closure.
4052 (license license:asl2.0)))
4054 (define-public java-commons-collections
4056 (inherit java-commons-collections4)
4057 (name "java-commons-collections")
4061 (uri (string-append "mirror://apache/commons/collections/source/"
4062 "commons-collections-" version "-src.tar.gz"))
4065 "055r51a5lfc3z7rkxnxmnn1npvkvda7636hjpm4qk7cnfzz98387"))
4067 (search-patches "java-commons-collections-fix-java8.patch"))))
4069 (substitute-keyword-arguments (package-arguments java-commons-collections4)
4071 `(modify-phases ,phases
4072 ;; The manifest is required by the build procedure
4073 (add-before 'build 'add-manifest
4075 (mkdir-p "build/conf")
4076 (call-with-output-file "build/conf/MANIFEST.MF"
4078 (format file "Manifest-Version: 1.0\n")))))
4080 (install-jars "build"))))))))
4082 (define java-commons-collections-test-classes
4084 (inherit java-commons-collections)
4086 `(#:jar-name "commons-collections-test-classes.jar"
4087 #:source-dir "src/test"
4090 `(("collection" ,java-commons-collections)))))
4092 (define-public java-commons-beanutils
4094 (name "java-commons-beanutils")
4098 (uri (string-append "mirror://apache/commons/beanutils/source/"
4099 "commons-beanutils-" version "-src.tar.gz"))
4102 "03cs0bq3sl1sdc7py9g3qnf8n9h473nrkvd3d251kaqv6a2ab7qk"))))
4103 (build-system ant-build-system)
4105 `(#:test-target "test"
4108 (modify-phases %standard-phases
4110 (lambda* (#:key outputs #:allow-other-keys)
4111 (rename-file (string-append "dist/commons-beanutils-" ,version
4113 "commons-beanutils.jar")
4114 (install-file "commons-beanutils.jar"
4115 (string-append (assoc-ref outputs "out") "/share/java/"))
4118 `(("logging" ,java-commons-logging-minimal)
4119 ("collections" ,java-commons-collections)))
4121 `(("junit" ,java-junit)
4122 ("collections-test" ,java-commons-collections-test-classes)))
4123 (home-page "http://commons.apache.org/beanutils/")
4124 (synopsis "Dynamically set or get properties in Java")
4125 (description "BeanUtils provides a simplified interface to reflection and
4126 introspection to set or get dynamically determined properties through their
4127 setter and getter method.")
4128 (license license:asl2.0)))
4130 (define-public java-commons-io
4132 (name "java-commons-io")
4137 (uri (string-append "mirror://apache/commons/io/source/"
4138 "commons-io-" version "-src.tar.gz"))
4141 "0q5y41jrcjvx9hzs47x5kdhnasdy6rm4bzqd2jxl02w717m7a7v3"))))
4142 (build-system ant-build-system)
4143 (outputs '("out" "doc"))
4145 `(#:test-target "test"
4147 (list (string-append "-Djunit.jar="
4148 (assoc-ref %build-inputs "java-junit")
4149 "/share/java/junit.jar"))
4151 (modify-phases %standard-phases
4152 (add-after 'build 'build-javadoc ant-build-javadoc)
4153 (replace 'install (install-jars "target"))
4154 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
4156 `(("java-junit" ,java-junit)
4157 ("java-hamcrest-core" ,java-hamcrest-core)))
4158 (home-page "http://commons.apache.org/io/")
4159 (synopsis "Common useful IO related classes")
4160 (description "Commons-IO contains utility classes, stream implementations,
4161 file filters and endian classes.")
4162 (license license:asl2.0)))
4164 (define-public java-commons-lang
4166 (name "java-commons-lang")
4171 (uri (string-append "mirror://apache/commons/lang/source/"
4172 "commons-lang-" version "-src.tar.gz"))
4174 (base32 "1mxwagqadzx1b2al7i0z1v0r235aj2njdyijf02szq0vhmqrfiq5"))))
4175 (build-system ant-build-system)
4176 (outputs '("out" "doc"))
4178 `(#:test-target "test"
4179 #:test-exclude (list "**/Abstract*.java" "**/Random*.java")
4181 (modify-phases %standard-phases
4182 (add-after 'build 'build-javadoc ant-build-javadoc)
4183 (add-before 'check 'disable-failing-test
4185 ;; Disable a failing test
4186 (substitute* "src/test/java/org/apache/commons/lang/\
4187 time/FastDateFormatTest.java"
4188 (("public void testFormat\\(\\)")
4189 "public void disabled_testFormat()"))
4191 (replace 'install (install-jars "target"))
4192 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
4194 `(("java-junit" ,java-junit)))
4195 (home-page "http://commons.apache.org/lang/")
4196 (synopsis "Extension of the java.lang package")
4197 (description "The Commons Lang components contains a set of Java classes
4198 that provide helper methods for standard Java classes, especially those found
4199 in the @code{java.lang} package in the Sun JDK. The following classes are
4203 @item StringUtils - Helper for @code{java.lang.String}.
4204 @item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets
4205 of characters such as @code{[a-z]} and @code{[abcdez]}.
4206 @item RandomStringUtils - Helper for creating randomised strings.
4207 @item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
4208 @item NumberRange - A range of numbers with an upper and lower bound.
4209 @item ObjectUtils - Helper for @code{java.lang.Object}.
4210 @item SerializationUtils - Helper for serializing objects.
4211 @item SystemUtils - Utility class defining the Java system properties.
4212 @item NestedException package - A sub-package for the creation of nested
4214 @item Enum package - A sub-package for the creation of enumerated types.
4215 @item Builder package - A sub-package for the creation of @code{equals},
4216 @code{hashCode}, @code{compareTo} and @code{toString} methods.
4218 (license license:asl2.0)))
4220 (define-public java-commons-lang3
4222 (name "java-commons-lang3")
4227 (uri (string-append "mirror://apache/commons/lang/source/"
4228 "commons-lang3-" version "-src.tar.gz"))
4230 (base32 "0xpshb9spjhplq5a7mr0y1bgfw8190ik4xj8f569xidfcki1d6kg"))))
4231 (build-system ant-build-system)
4232 (outputs '("out" "doc"))
4234 `(#:test-target "test"
4236 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-all"))
4237 (junit (assoc-ref %build-inputs "java-junit"))
4238 (easymock (assoc-ref %build-inputs "java-easymock"))
4239 (io (assoc-ref %build-inputs "java-commons-io")))
4240 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
4241 (string-append "-Dhamcrest.jar=" hamcrest
4242 "/share/java/hamcrest-all.jar")
4243 (string-append "-Dcommons-io.jar=" io
4244 "/share/java/commons-io-"
4245 ,(package-version java-commons-io)
4247 (string-append "-Deasymock.jar=" easymock
4248 "/share/java/easymock.jar")))
4250 (modify-phases %standard-phases
4251 (add-after 'build 'build-javadoc ant-build-javadoc)
4252 (replace 'install (install-jars "target"))
4253 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
4255 `(("java-junit" ,java-junit)
4256 ("java-commons-io" ,java-commons-io)
4257 ("java-hamcrest-all" ,java-hamcrest-all)
4258 ("java-easymock" ,java-easymock)))
4259 (home-page "http://commons.apache.org/lang/")
4260 (synopsis "Extension of the java.lang package")
4261 (description "The Commons Lang components contains a set of Java classes
4262 that provide helper methods for standard Java classes, especially those found
4263 in the @code{java.lang} package. The following classes are included:
4266 @item StringUtils - Helper for @code{java.lang.String}.
4267 @item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets of
4268 characters such as @code{[a-z]} and @code{[abcdez]}.
4269 @item RandomStringUtils - Helper for creating randomised strings.
4270 @item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
4271 @item NumberRange - A range of numbers with an upper and lower bound.
4272 @item ObjectUtils - Helper for @code{java.lang.Object}.
4273 @item SerializationUtils - Helper for serializing objects.
4274 @item SystemUtils - Utility class defining the Java system properties.
4275 @item NestedException package - A sub-package for the creation of nested
4277 @item Enum package - A sub-package for the creation of enumerated types.
4278 @item Builder package - A sub-package for the creation of @code{equals},
4279 @code{hashCode}, @code{compareTo} and @code{toString} methods.
4281 (license license:asl2.0)))
4283 (define-public java-commons-bsf
4285 (name "java-commons-bsf")
4289 (uri (string-append "mirror://apache/commons/bsf/source/bsf-src-"
4293 "1sbamr8jl32p1jgf59nw0b2w9qivyg145954hm6ly54cfgsqrdas"))
4294 (modules '((guix build utils)))
4297 (for-each delete-file
4298 (find-files "." "\\.jar$"))
4300 (build-system ant-build-system)
4302 `(#:build-target "jar"
4303 #:tests? #f; No test file
4304 #:modules ((guix build ant-build-system)
4306 (guix build java-utils)
4309 (modify-phases %standard-phases
4310 (add-before 'build 'create-properties
4312 ;; This file is missing from the distribution
4313 (call-with-output-file "build-properties.xml"
4316 `(project (@ (basedir ".") (name "build-properties") (default ""))
4317 (property (@ (name "project.name") (value "bsf")))
4318 (property (@ (name "source.level") (value "1.5")))
4319 (property (@ (name "build.lib") (value "build/jar")))
4320 (property (@ (name "src.dir") (value "src")))
4321 (property (@ (name "tests.dir") (value "src/org/apache/bsf/test")))
4322 (property (@ (name "build.tests") (value "build/test-classes")))
4323 (property (@ (name "build.dest") (value "build/classes"))))
4325 (replace 'install (install-jars "build")))))
4327 `(("java-junit" ,java-junit)))
4329 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)))
4330 (home-page "https://commons.apache.org/proper/commons-bsf")
4331 (synopsis "Bean Scripting Framework")
4332 (description "The Bean Scripting Framework (BSF) is a set of Java classes
4333 which provides scripting language support within Java applications, and access
4334 to Java objects and methods from scripting languages. BSF allows one to write
4335 JSPs in languages other than Java while providing access to the Java class
4336 library. In addition, BSF permits any Java application to be implemented in
4337 part (or dynamically extended) by a language that is embedded within it. This
4338 is achieved by providing an API that permits calling scripting language engines
4339 from within Java, as well as an object registry that exposes Java objects to
4340 these scripting language engines.")
4341 (license license:asl2.0)))
4343 (define-public java-commons-jxpath
4345 (name "java-commons-jxpath")
4349 (uri (string-append "mirror://apache/commons/jxpath/source/"
4350 "commons-jxpath-" version "-src.tar.gz"))
4353 "1rpgg31ayn9fwr4bfi2i1ij0npcg79ad2fv0w9hacvawsyc42cfs"))))
4354 (build-system ant-build-system)
4356 `(#:jar-name "commons-jxpath.jar"
4357 ;; tests require more dependencies, including mockrunner which depends on old software
4359 #:source-dir "src/java"))
4361 `(("java-tomcat" ,java-tomcat)
4362 ("java-jdom" ,java-jdom)
4363 ("java-commons-beanutils" ,java-commons-beanutils)))
4365 `(("java-junit" ,java-junit)))
4366 (home-page "http://commons.apache.org/jxpath/")
4367 (synopsis "Simple interpreter of an expression language called XPath.")
4368 (description "The org.apache.commons.jxpath package defines a simple
4369 interpreter of an expression language called XPath. JXPath applies XPath
4370 expressions to graphs of objects of all kinds: JavaBeans, Maps, Servlet
4371 contexts, DOM etc, including mixtures thereof.")
4372 (license license:asl2.0)))
4374 (define-public java-jsr250
4376 (name "java-jsr250")
4380 (uri (string-append "https://repo1.maven.org/maven2/"
4381 "javax/annotation/javax.annotation-api/"
4382 version "/javax.annotation-api-"
4383 version "-sources.jar"))
4386 "08clh8n4n9wfglf75qsqfjs6yf79f7x6hqx38cn856pksszv50kz"))))
4387 (build-system ant-build-system)
4389 `(#:tests? #f ; no tests included
4391 #:jar-name "jsr250.jar"))
4392 (home-page "https://jcp.org/en/jsr/detail?id=250")
4393 (synopsis "Security-related annotations")
4394 (description "This package provides annotations for security. It provides
4395 packages in the @code{javax.annotation} and @code{javax.annotation.security}
4397 ;; either cddl or gpl2 only, with classpath exception
4398 (license (list license:cddl1.0
4401 (define-public java-jsr305
4403 (name "java-jsr305")
4407 (uri (string-append "https://repo1.maven.org/maven2/"
4408 "com/google/code/findbugs/"
4409 "jsr305/" version "/jsr305-"
4410 version "-sources.jar"))
4413 "1rh6jin9v7jqpq3kf1swl868l8i94r636n03pzpsmgr8v0lh9j2n"))))
4414 (build-system ant-build-system)
4416 `(#:tests? #f ; no tests included
4417 #:jar-name "jsr305.jar"))
4418 (home-page "http://findbugs.sourceforge.net/")
4419 (synopsis "Annotations for the static analyzer called findbugs")
4420 (description "This package provides annotations for the findbugs package.
4421 It provides packages in the @code{javax.annotations} namespace.")
4422 (license license:asl2.0)))
4424 (define-public java-guava
4427 ;; This is the last release of Guava that can be built with Java 7.
4431 (uri (string-append "https://github.com/google/guava/"
4432 "releases/download/v" version
4433 "/guava-" version "-sources.jar"))
4436 "1gawrs5gi6j5hcfxdgpnfli75vb9pfi4sn09pnc8xacr669yajwr"))))
4437 (build-system ant-build-system)
4439 `(#:tests? #f ; no tests included
4440 #:jar-name "guava.jar"
4442 (modify-phases %standard-phases
4443 (add-after 'unpack 'trim-sources
4445 (with-directory-excursion "src/com/google/common"
4446 ;; Remove annotations to avoid extra dependencies:
4447 ;; * "j2objc" annotations are used when converting Java to
4449 ;; * "errorprone" annotations catch common Java mistakes at
4451 ;; * "IgnoreJRERequirement" is used for Android.
4452 (substitute* (find-files "." "\\.java$")
4453 (("import com.google.j2objc.*") "")
4454 (("import com.google.errorprone.annotation.*") "")
4455 (("import org.codehaus.mojo.animal_sniffer.*") "")
4456 (("@CanIgnoreReturnValue") "")
4459 (("@RetainedWith") "")
4461 (("@ForOverride") "")
4462 (("@J2ObjCIncompatible") "")
4463 (("@IgnoreJRERequirement") "")))
4466 `(("java-jsr305" ,java-jsr305)))
4467 (home-page "https://github.com/google/guava")
4468 (synopsis "Google core libraries for Java")
4469 (description "Guava is a set of core libraries that includes new
4470 collection types (such as multimap and multiset), immutable collections, a
4471 graph library, functional types, an in-memory cache, and APIs/utilities for
4472 concurrency, I/O, hashing, primitives, reflection, string processing, and much
4474 (license license:asl2.0)))
4476 ;; The java-commons-logging package provides adapters to many different
4477 ;; logging frameworks. To avoid an excessive dependency graph we try to build
4478 ;; it with only a minimal set of adapters.
4479 (define-public java-commons-logging-minimal
4481 (name "java-commons-logging-minimal")
4485 (uri (string-append "mirror://apache/commons/logging/source/"
4486 "commons-logging-" version "-src.tar.gz"))
4489 "10bwcy5w8d7y39n0krlwhnp8ds3kj5zhmzj0zxnkw0qdlsjmsrj9"))))
4490 (build-system ant-build-system)
4492 `(#:tests? #f ; avoid dependency on logging frameworks
4493 #:jar-name "commons-logging-minimal.jar"
4495 (modify-phases %standard-phases
4496 (add-after 'unpack 'delete-adapters-and-tests
4498 ;; Delete all adapters except for NoOpLog, SimpleLog, and
4499 ;; LogFactoryImpl. NoOpLog is required to build; LogFactoryImpl
4500 ;; is used by applications; SimpleLog is the only actually usable
4501 ;; implementation that does not depend on another logging
4505 (delete-file (string-append
4506 "src/main/java/org/apache/commons/logging/impl/" file)))
4507 (list "Jdk13LumberjackLogger.java"
4508 "WeakHashtable.java"
4510 "ServletContextCleaner.java"
4513 "LogKitLogger.java"))
4514 (delete-file-recursively "src/test")
4516 (home-page "http://commons.apache.org/logging/")
4517 (synopsis "Common API for logging implementations")
4518 (description "The Logging package is a thin bridge between different
4519 logging implementations. A library that uses the commons-logging API can be
4520 used with any logging implementation at runtime.")
4521 (license license:asl2.0)))
4523 ;; This is the last release of the 1.x series.
4524 (define-public java-mockito-1
4526 (name "java-mockito")
4530 (uri (string-append "http://repo1.maven.org/maven2/"
4531 "org/mockito/mockito-core/" version
4532 "/mockito-core-" version "-sources.jar"))
4535 "0vmiwnwpf83g2q7kj1rislmja8fpvqkixjhawh7nxnygx6pq11kc"))))
4536 (build-system ant-build-system)
4538 `(#:jar-name "mockito.jar"
4539 #:tests? #f ; no tests included
4540 ;; FIXME: patch-and-repack does not support jars, so we have to apply
4541 ;; patches in build phases.
4543 (modify-phases %standard-phases
4544 ;; Mockito was developed against a different version of hamcrest,
4545 ;; which does not require matcher implementations to provide an
4546 ;; implementation of the "describeMismatch" method. We add this
4547 ;; simple definition to pass the build with our version of hamcrest.
4548 (add-after 'unpack 'fix-hamcrest-build-error
4550 (substitute* "src/org/mockito/internal/matchers/LocalizedMatcher.java"
4551 (("public Matcher getActualMatcher\\(\\) .*" line)
4553 public void describeMismatch(Object item, Description description) {
4554 actualMatcher.describeMismatch(item, description);
4558 ;; Mockito bundles cglib. We have a cglib package, so let's use
4560 (add-after 'unpack 'use-system-libraries
4562 (with-directory-excursion "src/org/mockito/internal/creation/cglib"
4563 (substitute* '("CGLIBHacker.java"
4564 "CglibMockMaker.java"
4565 "ClassImposterizer.java"
4566 "DelegatingMockitoMethodProxy.java"
4567 "MethodInterceptorFilter.java"
4568 "MockitoNamingPolicy.java"
4569 "SerializableMockitoMethodProxy.java"
4570 "SerializableNoOp.java")
4571 (("import org.mockito.cglib") "import net.sf.cglib")))
4574 `(("java-junit" ,java-junit)
4575 ("java-objenesis" ,java-objenesis)
4576 ("java-cglib" ,java-cglib)
4577 ("java-hamcrest-core" ,java-hamcrest-core)))
4578 (home-page "http://mockito.org")
4579 (synopsis "Mockito is a mock library for Java")
4580 (description "Mockito is a mocking library for Java which lets you write
4581 tests with a clean and simple API. It generates mocks using reflection, and
4582 it records all mock invocations, including methods arguments.")
4583 (license license:asl2.0)))
4585 (define-public java-httpcomponents-httpcore
4587 (name "java-httpcomponents-httpcore")
4591 (uri (string-append "mirror://apache//httpcomponents/httpcore/"
4592 "source/httpcomponents-core-"
4593 version "-src.tar.gz"))
4596 "02bwcf38y4vgwq7kj2s6q7qrmma641r5lacivm16kgxvb2j6h1vy"))))
4597 (build-system ant-build-system)
4599 `(#:jar-name "httpcomponents-httpcore.jar"
4601 (modify-phases %standard-phases
4602 (add-after 'unpack 'chdir
4603 (lambda _ (chdir "httpcore") #t)))))
4605 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)
4606 ("java-commons-lang3" ,java-commons-lang3)))
4608 `(("java-junit" ,java-junit)
4609 ("java-mockito" ,java-mockito-1)))
4610 (home-page "https://hc.apache.org/httpcomponents-core-4.4.x/index.html")
4611 (synopsis "Low level HTTP transport components")
4612 (description "HttpCore is a set of low level HTTP transport components
4613 that can be used to build custom client and server side HTTP services with a
4614 minimal footprint. HttpCore supports two I/O models: blocking I/O model based
4615 on the classic Java I/O and non-blocking, event driven I/O model based on Java
4618 This package provides the blocking I/O model library.")
4619 (license license:asl2.0)))
4621 (define-public java-httpcomponents-httpcore-nio
4622 (package (inherit java-httpcomponents-httpcore)
4623 (name "java-httpcomponents-httpcore-nio")
4625 `(#:jar-name "httpcomponents-httpcore-nio.jar"
4627 (modify-phases %standard-phases
4628 (add-after 'unpack 'chdir
4629 (lambda _ (chdir "httpcore-nio") #t)))))
4631 `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
4632 ("java-hamcrest-core" ,java-hamcrest-core)
4633 ,@(package-inputs java-httpcomponents-httpcore)))
4634 (description "HttpCore is a set of low level HTTP transport components
4635 that can be used to build custom client and server side HTTP services with a
4636 minimal footprint. HttpCore supports two I/O models: blocking I/O model based
4637 on the classic Java I/O and non-blocking, event driven I/O model based on Java
4640 This package provides the non-blocking I/O model library based on Java
4643 (define-public java-httpcomponents-httpcore-ab
4644 (package (inherit java-httpcomponents-httpcore)
4645 (name "java-httpcomponents-httpcore-ab")
4647 `(#:jar-name "httpcomponents-httpcore-ab.jar"
4649 (modify-phases %standard-phases
4650 (add-after 'unpack 'chdir
4651 (lambda _ (chdir "httpcore-ab") #t)))))
4653 `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
4654 ("java-commons-cli" ,java-commons-cli)
4655 ("java-hamcrest-core" ,java-hamcrest-core)
4656 ,@(package-inputs java-httpcomponents-httpcore)))
4657 (synopsis "Apache HttpCore benchmarking tool")
4658 (description "This package provides the HttpCore benchmarking tool. It is
4659 an Apache AB clone based on HttpCore.")))
4661 (define-public java-httpcomponents-httpclient
4663 (name "java-httpcomponents-httpclient")
4667 (uri (string-append "mirror://apache/httpcomponents/httpclient/"
4668 "source/httpcomponents-client-"
4669 version "-src.tar.gz"))
4672 "1428399s7qy3cim5wc6f3ks4gl9nf9vkjpfmnlap3jflif7g2pj1"))))
4673 (build-system ant-build-system)
4675 `(#:jar-name "httpcomponents-httpclient.jar"
4677 (modify-phases %standard-phases
4678 (add-after 'unpack 'chdir
4679 (lambda _ (chdir "httpclient") #t)))))
4681 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)
4682 ("java-commons-codec" ,java-commons-codec)
4683 ("java-hamcrest-core" ,java-hamcrest-core)
4684 ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
4685 ("java-mockito" ,java-mockito-1)
4686 ("java-junit" ,java-junit)))
4687 (home-page "https://hc.apache.org/httpcomponents-client-ga/")
4688 (synopsis "HTTP client library for Java")
4689 (description "Although the @code{java.net} package provides basic
4690 functionality for accessing resources via HTTP, it doesn't provide the full
4691 flexibility or functionality needed by many applications. @code{HttpClient}
4692 seeks to fill this void by providing an efficient, up-to-date, and
4693 feature-rich package implementing the client side of the most recent HTTP
4694 standards and recommendations.")
4695 (license license:asl2.0)))
4697 (define-public java-httpcomponents-httpmime
4698 (package (inherit java-httpcomponents-httpclient)
4699 (name "java-httpcomponents-httpmime")
4701 `(#:jar-name "httpcomponents-httpmime.jar"
4703 (modify-phases %standard-phases
4704 (add-after 'unpack 'chdir
4705 (lambda _ (chdir "httpmime") #t)))))
4707 `(("java-httpcomponents-httpclient" ,java-httpcomponents-httpclient)
4708 ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
4709 ("java-junit" ,java-junit)
4710 ("java-hamcrest-core" ,java-hamcrest-core)))))
4712 (define-public java-commons-net
4714 (name "java-commons-net")
4718 (uri (string-append "mirror://apache/commons/net/source/"
4719 "commons-net-" version "-src.tar.gz"))
4722 "0n0cmnddk9qdqhjvka8pc6hd9mn2qi3166f1s6xk32h7rfy1adxr"))))
4723 (build-system ant-build-system)
4725 `(;; FIXME: MainTest.java tries to read "examples.properties" (which
4726 ;; should be "resources/examples/examples.properties"), but gets "null"
4729 #:jar-name "commons-net.jar"))
4731 `(("java-junit" ,java-junit)
4732 ("java-hamcrest-core" ,java-hamcrest-core)))
4733 (home-page "http://commons.apache.org/net/")
4734 (synopsis "Client library for many basic Internet protocols")
4735 (description "The Apache Commons Net library implements the client side of
4736 many basic Internet protocols. The purpose of the library is to provide
4737 fundamental protocol access, not higher-level abstractions.")
4738 (license license:asl2.0)))
4740 (define-public java-jsch
4746 (uri (string-append "mirror://sourceforge/jsch/jsch/"
4747 version "/jsch-" version ".zip"))
4750 "029rdddyq1mh3ghryh3ki99kba1xkf1d1swjv2vi6lk6zzjy2wdb"))))
4751 (build-system ant-build-system)
4753 `(#:build-target "dist"
4754 #:tests? #f ; no tests included
4756 (modify-phases %standard-phases
4757 (replace 'install (install-jars "dist")))))
4759 `(("unzip" ,unzip)))
4760 (home-page "http://www.jcraft.com/jsch/")
4761 (synopsis "Pure Java implementation of SSH2")
4762 (description "JSch is a pure Java implementation of SSH2. JSch allows you
4763 to connect to an SSH server and use port forwarding, X11 forwarding, file
4764 transfer, etc., and you can integrate its functionality into your own Java
4766 (license license:bsd-3)))
4768 (define-public java-commons-compress
4770 (name "java-commons-compress")
4774 (uri (string-append "mirror://apache/commons/compress/source/"
4775 "commons-compress-" version "-src.tar.gz"))
4778 "1vjqvavrn0babffn1kciz6v52ibwq2vwhzlb95hazis3lgllnxc8"))))
4779 (build-system ant-build-system)
4781 `(#:jar-name "commons-compress.jar"
4783 (modify-phases %standard-phases
4784 (add-after 'unpack 'delete-bad-tests
4786 (with-directory-excursion "src/test/java/org/apache/commons/compress/"
4787 ;; FIXME: These tests really should not fail. Maybe they are
4788 ;; indicative of problems with our Java packaging work.
4790 ;; This test fails with a null pointer exception.
4791 (delete-file "archivers/sevenz/SevenZOutputFileTest.java")
4792 ;; This test fails to open test resources.
4793 (delete-file "archivers/zip/ExplodeSupportTest.java")
4795 ;; FIXME: This test adds a dependency on powermock, which is hard to
4796 ;; package at this point.
4797 ;; https://github.com/powermock/powermock
4798 (delete-file "archivers/sevenz/SevenZNativeHeapTest.java"))
4801 `(("java-junit" ,java-junit)
4802 ("java-hamcrest-core" ,java-hamcrest-core)
4803 ("java-mockito" ,java-mockito-1)
4804 ("java-xz" ,java-xz)))
4805 (home-page "https://commons.apache.org/proper/commons-compress/")
4806 (synopsis "Java library for working with compressed files")
4807 (description "The Apache Commons Compress library defines an API for
4808 working with compressed files such as ar, cpio, Unix dump, tar, zip, gzip, XZ,
4809 Pack200, bzip2, 7z, arj, lzma, snappy, DEFLATE, lz4 and Z files.")
4810 (license license:asl2.0)))
4812 (define-public java-commons-csv
4814 (name "java-commons-csv")
4818 (uri (string-append "mirror://apache/commons/csv/source/"
4819 "commons-csv-" version "-src.tar.gz"))
4822 "1l89m0fm2s3xx3v3iynvangymfg2vlyngaj6fgsi457nmsw7m7ij"))))
4823 (build-system ant-build-system)
4825 `(#:jar-name "commons-csv.jar"
4826 #:source-dir "src/main/java"
4827 #:tests? #f)); FIXME: requires java-h2
4829 `(("java-hamcrest-core" ,java-hamcrest-core)
4830 ("java-commons-io" ,java-commons-io)
4831 ("java-commons-lang3" ,java-commons-lang3)
4832 ("junit" ,java-junit)))
4833 (home-page "https://commons.apache.org/proper/commons-csv/")
4834 (synopsis "Read and write CSV documents")
4835 (description "Commons CSV reads and writes files in variations of the Comma
4836 Separated Value (CSV) format. The most common CSV formats are predefined in the
4840 @item Microsoft Excel
4841 @item Informix UNLOAD
4842 @item Informix UNLOAD CSV
4848 Custom formats can be created using a fluent style API.")
4849 (license license:asl2.0)))
4851 (define-public java-osgi-annotation
4853 (name "java-osgi-annotation")
4857 (uri (string-append "https://repo1.maven.org/maven2/"
4858 "org/osgi/org.osgi.annotation/" version "/"
4859 "org.osgi.annotation-" version "-sources.jar"))
4862 "1q718mb7gqg726rh6pc2hcisn8v50nv35abbir0jypmffhiii85w"))))
4863 (build-system ant-build-system)
4865 `(#:tests? #f ; no tests
4866 #:jar-name "osgi-annotation.jar"))
4867 (home-page "https://www.osgi.org")
4868 (synopsis "Annotation module of OSGi framework")
4870 "OSGi, for Open Services Gateway initiative framework, is a module system
4871 and service platform for the Java programming language. This package contains
4872 the OSGi annotation module, providing additional services to help dynamic
4874 (license license:asl2.0)))
4876 (define-public java-osgi-core
4878 (name "java-osgi-core")
4882 (uri (string-append "https://repo1.maven.org/maven2/"
4883 "org/osgi/org.osgi.core/" version "/"
4884 "org.osgi.core-" version "-sources.jar"))
4887 "19bpf5jx32jq9789gyhin35q5v7flmw0p9mk7wbgqpxqfmxyiabv"))))
4888 (build-system ant-build-system)
4890 `(#:tests? #f ; no tests
4891 #:jar-name "osgi-core.jar"))
4893 `(("java-osgi-annotation" ,java-osgi-annotation)))
4894 (home-page "https://www.osgi.org")
4895 (synopsis "Core module of OSGi framework")
4897 "OSGi, for Open Services Gateway initiative framework, is a module system
4898 and service platform for the Java programming language. This package contains
4899 the OSGi Core module.")
4900 (license license:asl2.0)))
4902 (define-public java-osgi-service-event
4904 (name "java-osgi-service-event")
4908 (uri (string-append "https://repo1.maven.org/maven2/"
4909 "org/osgi/org.osgi.service.event/"
4910 version "/org.osgi.service.event-"
4911 version "-sources.jar"))
4914 "1nyhlgagwym75bycnjczwbnpymv2iw84zbhvvzk84g9q736i6qxm"))))
4915 (build-system ant-build-system)
4917 `(#:tests? #f ; no tests
4918 #:jar-name "osgi-service-event.jar"))
4920 `(("java-osgi-annotation" ,java-osgi-annotation)
4921 ("java-osgi-core" ,java-osgi-core)))
4922 (home-page "https://www.osgi.org")
4923 (synopsis "OSGi service event module")
4925 "OSGi, for Open Services Gateway initiative framework, is a module system
4926 and service platform for the Java programming language. This package contains
4927 the OSGi @code{org.osgi.service.event} module.")
4928 (license license:asl2.0)))
4930 (define-public java-eclipse-osgi
4932 (name "java-eclipse-osgi")
4936 (uri (string-append "https://repo1.maven.org/maven2/"
4937 "org/eclipse/platform/org.eclipse.osgi/"
4938 version "/org.eclipse.osgi-"
4939 version "-sources.jar"))
4942 "00cqc6lb29n0zv68b4l842vzkwawvbr7gshfdygsk8sicvcq2c7b"))))
4943 (build-system ant-build-system)
4945 `(#:tests? #f ; no tests included
4946 #:jar-name "eclipse-equinox-osgi.jar"))
4948 `(("java-osgi-annotation" ,java-osgi-annotation)))
4949 (home-page "http://www.eclipse.org/equinox/")
4950 (synopsis "Eclipse Equinox OSGi framework")
4951 (description "This package provides an implementation of the OSGi Core
4953 (license license:epl1.0)))
4955 (define-public java-eclipse-equinox-common
4957 (name "java-eclipse-equinox-common")
4961 (uri (string-append "https://repo1.maven.org/maven2/"
4962 "org/eclipse/platform/org.eclipse.equinox.common/"
4963 version "/org.eclipse.equinox.common-"
4964 version "-sources.jar"))
4967 "12aazpkgw46r1qj0pr421jzwhbmsizd97r37krd7njnbrdgfzksc"))))
4968 (build-system ant-build-system)
4970 `(#:tests? #f ; no tests included
4971 #:jar-name "eclipse-equinox-common.jar"))
4973 `(("java-eclipse-osgi" ,java-eclipse-osgi)))
4974 (home-page "http://www.eclipse.org/equinox/")
4975 (synopsis "Common Eclipse runtime")
4976 (description "This package provides the common Eclipse runtime.")
4977 (license license:epl1.0)))
4979 (define-public java-eclipse-core-jobs
4981 (name "java-eclipse-core-jobs")
4985 (uri (string-append "https://repo1.maven.org/maven2/"
4986 "org/eclipse/platform/org.eclipse.core.jobs/"
4987 version "/org.eclipse.core.jobs-"
4988 version "-sources.jar"))
4991 "0395b8lh0km8vhzjnchvs1rii1qz48hyvb2wqfaq4yhklbwihq4b"))))
4992 (build-system ant-build-system)
4994 `(#:tests? #f ; no tests included
4995 #:jar-name "eclipse-core-jobs.jar"))
4997 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
4998 ("java-eclipse-osgi" ,java-eclipse-osgi)))
4999 (home-page "http://www.eclipse.org/equinox/")
5000 (synopsis "Eclipse jobs mechanism")
5001 (description "This package provides the Eclipse jobs mechanism.")
5002 (license license:epl1.0)))
5004 (define-public java-eclipse-equinox-registry
5006 (name "java-eclipse-equinox-registry")
5010 (uri (string-append "https://repo1.maven.org/maven2/"
5011 "org/eclipse/platform/org.eclipse.equinox.registry/"
5012 version "/org.eclipse.equinox.registry-"
5013 version "-sources.jar"))
5016 "1i9sgymh2fy5vdgk5y7s3qvrlbgh4l93ddqi3v4zmca7hwrlhf9k"))))
5017 (build-system ant-build-system)
5019 `(#:tests? #f ; no tests included
5020 #:jar-name "eclipse-equinox-registry.jar"))
5022 `(("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
5023 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5024 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5025 (home-page "http://www.eclipse.org/equinox/")
5026 (synopsis "Eclipse extension registry support")
5027 (description "This package provides support for the Eclipse extension
5029 (license license:epl1.0)))
5031 (define-public java-eclipse-equinox-app
5033 (name "java-eclipse-equinox-app")
5037 (uri (string-append "https://repo1.maven.org/maven2/"
5038 "org/eclipse/platform/org.eclipse.equinox.app/"
5039 version "/org.eclipse.equinox.app-"
5040 version "-sources.jar"))
5043 "0nhvbp93y203ar7y59gb0mz3w2d3jlqhr0c9hii9bcfpmr7imdab"))))
5044 (build-system ant-build-system)
5046 `(#:tests? #f ; no tests included
5047 #:jar-name "eclipse-equinox-app.jar"))
5049 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5050 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5051 ("java-eclipse-osgi" ,java-eclipse-osgi)
5052 ("java-osgi-service-event" ,java-osgi-service-event)))
5053 (home-page "http://www.eclipse.org/equinox/")
5054 (synopsis "Equinox application container")
5055 (description "This package provides the Equinox application container for
5057 (license license:epl1.0)))
5059 (define-public java-eclipse-equinox-preferences
5061 (name "java-eclipse-equinox-preferences")
5065 (uri (string-append "https://repo1.maven.org/maven2/"
5066 "org/eclipse/platform/org.eclipse.equinox.preferences/"
5067 version "/org.eclipse.equinox.preferences-"
5068 version "-sources.jar"))
5071 "0k7w6c141sqym4fy3af0qkwpy4pdh2vsjpjba6rp5fxyqa24v0a2"))))
5072 (build-system ant-build-system)
5074 `(#:tests? #f ; no tests included
5075 #:jar-name "eclipse-equinox-preferences.jar"))
5077 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5078 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5079 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5080 (home-page "http://www.eclipse.org/equinox/")
5081 (synopsis "Eclipse preferences mechanism")
5082 (description "This package provides the Eclipse preferences mechanism with
5083 the module @code{org.eclipse.equinox.preferences}.")
5084 (license license:epl1.0)))
5086 (define-public java-eclipse-core-contenttype
5088 (name "java-eclipse-core-contenttype")
5092 (uri (string-append "https://repo1.maven.org/maven2/"
5093 "org/eclipse/platform/org.eclipse.core.contenttype/"
5094 version "/org.eclipse.core.contenttype-"
5095 version "-sources.jar"))
5098 "1wcqcv7ijwv5rh748vz3x9pkmjl9w1r0k0026k56n8yjl4rrmspi"))))
5099 (build-system ant-build-system)
5101 `(#:tests? #f ; no tests included
5102 #:jar-name "eclipse-core-contenttype.jar"))
5104 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5105 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5106 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5107 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5108 (home-page "http://www.eclipse.org/")
5109 (synopsis "Eclipse content mechanism")
5110 (description "This package provides the Eclipse content mechanism in the
5111 @code{org.eclipse.core.contenttype} module.")
5112 (license license:epl1.0)))
5114 (define-public java-eclipse-core-runtime
5116 (name "java-eclipse-core-runtime")
5120 (uri (string-append "https://repo1.maven.org/maven2/"
5121 "org/eclipse/platform/org.eclipse.core.runtime/"
5122 version "/org.eclipse.core.runtime-"
5123 version "-sources.jar"))
5126 "16mkf8jgj35pgzms7w1gyfq0gfm4ixw6c5xbbxzdj1la56c758ya"))))
5127 (build-system ant-build-system)
5129 `(#:tests? #f ; no tests included
5130 #:jar-name "eclipse-core-runtime.jar"))
5132 `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
5133 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
5134 ("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
5135 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5136 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5137 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5138 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5139 (home-page "https://www.eclipse.org/")
5140 (synopsis "Eclipse core runtime")
5141 (description "This package provides the Eclipse core runtime with the
5142 module @code{org.eclipse.core.runtime}.")
5143 (license license:epl1.0)))
5145 (define-public java-eclipse-core-filesystem
5147 (name "java-eclipse-core-filesystem")
5151 (uri (string-append "https://repo1.maven.org/maven2/"
5152 "org/eclipse/platform/org.eclipse.core.filesystem/"
5153 version "/org.eclipse.core.filesystem-"
5154 version "-sources.jar"))
5157 "0km1bhwjim4rfy3pkvjhvy31kgsyf2ncx0mlkmbf5n6g57pphdyj"))))
5158 (build-system ant-build-system)
5160 `(#:tests? #f ; no tests included
5161 #:jar-name "eclipse-core-filesystem.jar"))
5163 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5164 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5165 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5166 (home-page "https://www.eclipse.org/")
5167 (synopsis "Eclipse core file system")
5168 (description "This package provides the Eclipse core file system with the
5169 module @code{org.eclipse.core.filesystem}.")
5170 (license license:epl1.0)))
5172 (define-public java-eclipse-core-expressions
5174 (name "java-eclipse-core-expressions")
5178 (uri (string-append "https://repo1.maven.org/maven2/"
5179 "org/eclipse/platform/org.eclipse.core.expressions/"
5180 version "/org.eclipse.core.expressions-"
5181 version "-sources.jar"))
5184 "18bw2l875gmygvpagpgk9l24qzbdjia4ag12nw6fi8v8yaq4987f"))))
5185 (build-system ant-build-system)
5187 `(#:tests? #f ; no tests included
5188 #:jar-name "eclipse-core-expressions.jar"))
5190 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5191 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5192 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5193 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5194 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5195 (home-page "https://www.eclipse.org/")
5196 (synopsis "Eclipse core expression language")
5197 (description "This package provides the Eclipse core expression language
5198 with the @code{org.eclipse.core.expressions} module.")
5199 (license license:epl1.0)))
5201 (define-public java-eclipse-core-variables
5203 (name "java-eclipse-core-variables")
5207 (uri (string-append "https://repo1.maven.org/maven2/"
5208 "org/eclipse/platform/org.eclipse.core.variables/"
5209 version "/org.eclipse.core.variables-"
5210 version "-sources.jar"))
5213 "12dirh03zi4n5x5cj07vzrhkmnqy6h9q10h9j605pagmpmifyxmy"))))
5214 (build-system ant-build-system)
5216 `(#:tests? #f ; no tests included
5217 #:jar-name "eclipse-core-variables.jar"))
5219 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5220 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5221 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5222 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5223 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5224 (home-page "https://www.eclipse.org/platform")
5225 (synopsis "Eclipse core variables")
5226 (description "This package provides the Eclipse core variables module
5227 @code{org.eclipse.core.variables}.")
5228 (license license:epl1.0)))
5230 (define-public java-eclipse-ant-core
5232 (name "java-eclipse-ant-core")
5236 (uri (string-append "https://repo1.maven.org/maven2/"
5237 "org/eclipse/platform/org.eclipse.ant.core/"
5238 version "/org.eclipse.ant.core-"
5239 version "-sources.jar"))
5242 "11g3if794qjlk98mz9zch22rr56sd7z63vn4i7k2icr8cq5bfqg7"))))
5243 (build-system ant-build-system)
5245 `(#:tests? #f ; no tests included
5246 #:jar-name "eclipse-ant-core.jar"))
5248 `(("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
5249 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5250 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5251 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5252 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
5253 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5254 ("java-eclipse-core-variables" ,java-eclipse-core-variables)
5255 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5256 (home-page "https://www.eclipse.org/platform")
5257 (synopsis "Ant build tool core libraries")
5258 (description "This package provides the ant build tool core libraries with
5259 the module @code{org.eclipse.ant.core}.")
5260 (license license:epl1.0)))
5262 (define-public java-eclipse-core-resources
5264 (name "java-eclipse-core-resources")
5268 (uri (string-append "https://repo1.maven.org/maven2/"
5269 "org/eclipse/platform/org.eclipse.core.resources/"
5270 version "/org.eclipse.core.resources-"
5271 version "-sources.jar"))
5274 "1hrfxrll6cpcagfksk2na1ypvkcnsp0fk6n3vcsrn97qayf9mx9l"))))
5275 (build-system ant-build-system)
5277 `(#:tests? #f ; no tests included
5278 #:jar-name "eclipse-core-resources.jar"))
5280 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5281 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5282 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5283 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
5284 ("java-eclipse-core-expressions" ,java-eclipse-core-expressions)
5285 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
5286 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
5287 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5288 ("java-eclipse-ant-core" ,java-eclipse-ant-core)
5289 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5290 (home-page "https://www.eclipse.org/")
5291 (synopsis "Eclipse core resource management")
5292 (description "This package provides the Eclipse core resource management
5293 module @code{org.eclipse.core.resources}.")
5294 (license license:epl1.0)))
5296 (define-public java-eclipse-compare-core
5298 (name "java-eclipse-compare-core")
5302 (uri (string-append "https://repo1.maven.org/maven2/"
5303 "org/eclipse/platform/org.eclipse.compare.core/"
5304 version "/org.eclipse.compare.core-"
5305 version "-sources.jar"))
5308 "10g37r0pbiffyv2wk35c6g5lwzkdipkl0kkjp41v84dln46xm4dg"))))
5309 (build-system ant-build-system)
5311 `(#:tests? #f ; no tests included
5312 #:jar-name "eclipse-compare-core.jar"))
5314 `(("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5315 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5316 ("java-eclipse-osgi" ,java-eclipse-osgi)
5317 ("java-icu4j" ,java-icu4j)))
5318 (home-page "https://www.eclipse.org/")
5319 (synopsis "Eclipse core compare support")
5320 (description "This package provides the Eclipse core compare support
5321 module @code{org.eclipse.compare.core}.")
5322 (license license:epl1.0)))
5324 (define-public java-eclipse-team-core
5326 (name "java-eclipse-team-core")
5330 (uri (string-append "https://repo1.maven.org/maven2/"
5331 "org/eclipse/platform/org.eclipse.team.core/"
5332 version "/org.eclipse.team.core-"
5333 version "-sources.jar"))
5336 "02j2jzqgb26zx2d5ahxmvijw6j4r0la90zl5c3i65x6z19ciyam7"))))
5337 (build-system ant-build-system)
5339 `(#:tests? #f ; no tests included
5340 #:jar-name "eclipse-team-core.jar"))
5342 `(("java-eclipse-compare-core" ,java-eclipse-compare-core)
5343 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
5344 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
5345 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
5346 ("java-eclipse-core-resources" ,java-eclipse-core-resources)
5347 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5348 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5349 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5350 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5351 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5352 (home-page "https://www.eclipse.org/platform")
5353 (synopsis "Eclipse team support core")
5354 (description "This package provides the Eclipse team support core module
5355 @code{org.eclipse.team.core}.")
5356 (license license:epl1.0)))
5358 (define-public java-eclipse-core-commands
5360 (name "java-eclipse-core-commands")
5364 (uri (string-append "https://repo1.maven.org/maven2/"
5365 "org/eclipse/platform/org.eclipse.core.commands/"
5366 version "/org.eclipse.core.commands-"
5367 version "-sources.jar"))
5370 "0yjn482qndcfrsq3jd6vnhcylp16420f5aqkrwr8spsprjigjcr9"))))
5371 (build-system ant-build-system)
5373 `(#:tests? #f ; no tests included
5374 #:jar-name "eclipse-core-commands.jar"))
5376 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)))
5377 (home-page "https://www.eclipse.org/platform")
5378 (synopsis "Eclipse core commands")
5379 (description "This package provides Eclipse core commands in the module
5380 @code{org.eclipse.core.commands}.")
5381 (license license:epl1.0)))
5383 (define-public java-eclipse-text
5385 (name "java-eclipse-text")
5389 (uri (string-append "https://repo1.maven.org/maven2/"
5390 "org/eclipse/platform/org.eclipse.text/"
5391 version "/org.eclipse.text-"
5392 version "-sources.jar"))
5395 "0scz70vzz5qs5caji9f5q01vkqnvip7dpri1q07l8wbbdcxn4cq1"))))
5396 (build-system ant-build-system)
5398 `(#:tests? #f ; no tests included
5399 #:jar-name "eclipse-text.jar"
5401 (modify-phases %standard-phases
5402 ;; When creating a new category we must make sure that the new list
5403 ;; matches List<Position>. By default it seems to be too generic
5404 ;; (ArrayList<Object>), so we specialize it to ArrayList<Position>.
5405 ;; Without this we get this error:
5407 ;; [javac] .../src/org/eclipse/jface/text/AbstractDocument.java:376:
5408 ;; error: method put in interface Map<K,V> cannot be applied to given types;
5409 ;; [javac] fPositions.put(category, new ArrayList<>());
5411 ;; [javac] required: String,List<Position>
5412 ;; [javac] found: String,ArrayList<Object>
5413 ;; [javac] reason: actual argument ArrayList<Object> cannot be converted
5414 ;; to List<Position> by method invocation conversion
5415 ;; [javac] where K,V are type-variables:
5416 ;; [javac] K extends Object declared in interface Map
5417 ;; [javac] V extends Object declared in interface Map
5419 ;; I don't know if this is a good fix. I suspect it is not, but it
5421 (add-after 'unpack 'fix-compilation-error
5423 (substitute* "src/org/eclipse/jface/text/AbstractDocument.java"
5424 (("Positions.put\\(category, new ArrayList<>\\(\\)\\);")
5425 "Positions.put(category, new ArrayList<Position>());"))
5428 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5429 ("java-eclipse-core-commands" ,java-eclipse-core-commands)
5430 ("java-icu4j" ,java-icu4j)))
5431 (home-page "http://www.eclipse.org/platform")
5432 (synopsis "Eclipse text library")
5433 (description "Platform Text is part of the Platform UI project and
5434 provides the basic building blocks for text and text editors within Eclipse
5435 and contributes the Eclipse default text editor.")
5436 (license license:epl1.0)))
5438 (define-public java-eclipse-jdt-core
5440 (name "java-eclipse-jdt-core")
5444 (uri (string-append "https://repo1.maven.org/maven2/"
5445 "org/eclipse/jdt/org.eclipse.jdt.core/"
5446 version "/org.eclipse.jdt.core-"
5447 version "-sources.jar"))
5450 "191xw4lc7mjjkprh4ji5vnpjvr5r4zvbpwkriy4bvsjqrz35vh1j"))))
5451 (build-system ant-build-system)
5453 `(#:tests? #f ; no tests included
5454 #:jar-name "eclipse-jdt-core.jar"))
5456 `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
5457 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
5458 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
5459 ("java-eclipse-core-resources" ,java-eclipse-core-resources)
5460 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5461 ("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
5462 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5463 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5464 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5465 ("java-eclipse-osgi" ,java-eclipse-osgi)
5466 ("java-eclipse-text" ,java-eclipse-text)))
5467 (home-page "https://www.eclipse.org/jdt")
5468 (synopsis "Java development tools core libraries")
5469 (description "This package provides the core libraries of the Eclipse Java
5470 development tools.")
5471 (license license:epl1.0)))
5473 (define-public java-javax-mail
5475 (name "java-javax-mail")
5479 (uri (string-append "https://repo1.maven.org/maven2/"
5480 "com/sun/mail/javax.mail/"
5481 version "/javax.mail-"
5482 version "-sources.jar"))
5485 "0sdlfgsc2b5s89xv1261y8i0jijcja019k2x1c8ngfn582w4jly9"))))
5486 (build-system ant-build-system)
5488 `(#:tests? #f ; no tests
5489 #:jar-name "javax-mail.jar"))
5490 (home-page "https://javamail.java.net")
5491 (synopsis "Reference implementation of the JavaMail API")
5493 "This package provides versions of the JavaMail API implementation, IMAP,
5494 SMTP, and POP3 service providers, some examples, and documentation for the
5496 ;; GPLv2 only with "classpath exception".
5497 (license license:gpl2)))
5499 (define-public java-log4j-api
5501 (name "java-log4j-api")
5505 (uri (string-append "mirror://apache/logging/log4j/" version
5506 "/apache-log4j-" version "-src.tar.gz"))
5509 "0j5p9gik0jysh37nlrckqbky12isy95cpwg2gv5fas1rcdqbraxd"))))
5510 (build-system ant-build-system)
5512 `(#:tests? #f ; tests require unpackaged software
5513 #:jar-name "log4j-api.jar"
5515 (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out")
5518 (modify-phases %standard-phases
5519 (add-after 'unpack 'enter-dir
5520 (lambda _ (chdir "log4j-api") #t))
5521 ;; FIXME: The tests require additional software that has not been
5522 ;; packaged yet, such as
5523 ;; * org.apache.maven
5524 ;; * org.apache.felix
5525 (add-after 'enter-dir 'delete-tests
5526 (lambda _ (delete-file-recursively "src/test") #t)))))
5528 `(("java-osgi-core" ,java-osgi-core)
5529 ("java-hamcrest-core" ,java-hamcrest-core)
5530 ("java-junit" ,java-junit)))
5531 (home-page "http://logging.apache.org/log4j/2.x/")
5532 (synopsis "API module of the Log4j logging framework for Java")
5534 "This package provides the API module of the Log4j logging framework for
5536 (license license:asl2.0)))
5538 (define-public java-log4j-core
5540 (inherit java-log4j-api)
5541 (name "java-log4j-core")
5543 `(("java-osgi-core" ,java-osgi-core)
5544 ("java-hamcrest-core" ,java-hamcrest-core)
5545 ("java-log4j-api" ,java-log4j-api)
5546 ("java-mail" ,java-mail)
5547 ("java-jboss-jms-api-spec" ,java-jboss-jms-api-spec)
5548 ("java-lmax-disruptor" ,java-lmax-disruptor)
5549 ("java-kafka" ,java-kafka-clients)
5550 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
5551 ("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
5552 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
5553 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)
5554 ("java-fasterxml-jackson-dataformat-xml" ,java-fasterxml-jackson-dataformat-xml)
5555 ("java-fasterxml-jackson-dataformat-yaml" ,java-fasterxml-jackson-dataformat-yaml)
5556 ("java-commons-compress" ,java-commons-compress)
5557 ("java-commons-csv" ,java-commons-csv)
5558 ("java-jeromq" ,java-jeromq)
5559 ("java-junit" ,java-junit)))
5561 `(("hamcrest" ,java-hamcrest-all)
5562 ("java-commons-io" ,java-commons-io)
5563 ("java-commons-lang3" ,java-commons-lang3)
5564 ("slf4j" ,java-slf4j-api)))
5566 `(#:tests? #f ; tests require more dependencies
5567 #:test-dir "src/test"
5568 #:source-dir "src/main/java"
5569 #:jar-name "log4j-core.jar"
5572 (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out")
5575 (modify-phases %standard-phases
5576 (add-after 'unpack 'enter-dir
5577 (lambda _ (chdir "log4j-core") #t)))))
5578 (synopsis "Core component of the Log4j framework")
5579 (description "This package provides the core component of the Log4j
5580 logging framework for Java.")))
5582 (define-public java-log4j-1.2-api
5584 (inherit java-log4j-api)
5585 (name "java-log4j-1.2-api")
5587 `(#:jar-name "java-log4j-1.2-api.jar"
5588 #:source-dir "log4j-1.2-api/src/main/java"
5590 ;; Tests require maven-model (and other maven subprojects), which is a
5591 ;; cyclic dependency.
5594 `(("log4j-api" ,java-log4j-api)
5595 ("log4j-core" ,java-log4j-core)
5596 ("osgi-core" ,java-osgi-core)
5597 ("eclipse-osgi" ,java-eclipse-osgi)
5598 ("java-lmax-disruptor" ,java-lmax-disruptor)))))
5600 (define-public java-commons-cli
5602 (name "java-commons-cli")
5606 (uri (string-append "mirror://apache/commons/cli/source/"
5607 "commons-cli-" version "-src.tar.gz"))
5610 "05hgi2z01fqz374y719gl1dxzqvzci5af071zm7vxrjg9vczipm1"))))
5611 (build-system ant-build-system)
5614 `(#:jar-name "commons-cli.jar"))
5616 `(("java-junit" ,java-junit)
5617 ("java-hamcrest-core" ,java-hamcrest-core)))
5618 (home-page "http://commons.apache.org/cli/")
5619 (synopsis "Command line arguments and options parsing library")
5620 (description "The Apache Commons CLI library provides an API for parsing
5621 command line options passed to programs. It is also able to print help
5622 messages detailing the options available for a command line tool.
5624 Commons CLI supports different types of options:
5627 @item POSIX like options (ie. tar -zxvf foo.tar.gz)
5628 @item GNU like long options (ie. du --human-readable --max-depth=1)
5629 @item Java like properties (ie. java -Djava.awt.headless=true Foo)
5630 @item Short options with value attached (ie. gcc -O2 foo.c)
5631 @item long options with single hyphen (ie. ant -projecthelp)
5634 This is a part of the Apache Commons Project.")
5635 (license license:asl2.0)))
5637 (define-public java-commons-codec
5639 (name "java-commons-codec")
5643 (uri (string-append "mirror://apache/commons/codec/source/"
5644 "commons-codec-" version "-src.tar.gz"))
5647 "1w9qg30y4s0x8gnmr2fgj4lyplfn788jqxbcz27lf5kbr6n8xr65"))))
5648 (build-system ant-build-system)
5649 (outputs '("out" "doc"))
5651 `(#:test-target "test"
5653 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
5654 (junit (assoc-ref %build-inputs "java-junit")))
5655 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
5656 (string-append "-Dhamcrest.jar=" hamcrest
5657 "/share/java/hamcrest-core.jar")
5658 ;; Do not append version to jar.
5659 "-Dfinal.name=commons-codec"))
5661 (modify-phases %standard-phases
5662 (add-after 'build 'build-javadoc ant-build-javadoc)
5663 (replace 'install (install-jars "dist"))
5664 (add-after 'install 'install-doc (install-javadoc "dist/docs/api")))))
5666 `(("java-junit" ,java-junit)
5667 ("java-hamcrest-core" ,java-hamcrest-core)))
5668 (home-page "http://commons.apache.org/codec/")
5669 (synopsis "Common encoders and decoders such as Base64, Hex, Phonetic and URLs")
5670 (description "The codec package contains simple encoder and decoders for
5671 various formats such as Base64 and Hexadecimal. In addition to these widely
5672 used encoders and decoders, the codec package also maintains a collection of
5673 phonetic encoding utilities.
5675 This is a part of the Apache Commons Project.")
5676 (license license:asl2.0)))
5678 (define-public java-commons-daemon
5680 (name "java-commons-daemon")
5684 (uri (string-append "mirror://apache/commons/daemon/source/"
5685 "commons-daemon-" version "-src.tar.gz"))
5688 "0ci46kq8jpz084ccwq0mmkahcgsmh20ziclp2jf5i0djqv95gvhi"))))
5689 (build-system ant-build-system)
5691 `(#:test-target "test"
5693 (modify-phases %standard-phases
5694 (add-after 'build 'build-javadoc ant-build-javadoc)
5695 (replace 'install (install-jars "dist"))
5696 (add-after 'install 'install-doc (install-javadoc "dist/docs/api")))))
5698 `(("java-junit" ,java-junit)))
5699 (home-page "http://commons.apache.org/daemon/")
5700 (synopsis "Library to launch Java applications as daemons")
5701 (description "The Daemon package from Apache Commons can be used to
5702 implement Java applications which can be launched as daemons. For example the
5703 program will be notified about a shutdown so that it can perform cleanup tasks
5704 before its process of execution is destroyed by the operation system.
5706 This package contains the Java library. You will also need the actual binary
5707 for your architecture which is provided by the jsvc package.
5709 This is a part of the Apache Commons Project.")
5710 (license license:asl2.0)))
5712 (define-public java-javaewah
5714 (name "java-javaewah")
5718 (uri (string-append "https://github.com/lemire/javaewah/"
5719 "archive/JavaEWAH-" version ".tar.gz"))
5722 "1n7j1r1h24wlhwv9zdcj6yqjrhma2ixwyzm15l5vrv6yqjs6753b"))))
5723 (build-system ant-build-system)
5724 (arguments `(#:jar-name "javaewah.jar"))
5726 `(("java-junit" ,java-junit)
5727 ("java-hamcrest-core" ,java-hamcrest-core)))
5728 (home-page "https://github.com/lemire/javaewah")
5729 (synopsis "Compressed alternative to the Java @code{BitSet} class")
5730 (description "This is a word-aligned compressed variant of the Java
5731 @code{Bitset} class. It provides both a 64-bit and a 32-bit RLE-like
5732 compression scheme. It can be used to implement bitmap indexes.
5734 The goal of word-aligned compression is not to achieve the best compression,
5735 but rather to improve query processing time. Hence, JavaEWAH tries to save CPU
5736 cycles, maybe at the expense of storage. However, the EWAH scheme is always
5737 more efficient storage-wise than an uncompressed bitmap (as implemented in the
5738 @code{BitSet} class by Sun).")
5739 ;; GPL2.0 derivates are explicitly allowed.
5740 (license license:asl2.0)))
5742 (define-public java-slf4j-api
5744 (name "java-slf4j-api")
5748 (uri (string-append "https://www.slf4j.org/dist/slf4j-"
5752 "13j51sgzmhhdrfa74gkal5zpip7r1440dh7zsi2c8bpb2zs1v8kb"))
5753 (modules '((guix build utils)))
5754 ;; Delete bundled jars.
5757 (for-each delete-file (find-files "." "\\.jar$"))
5759 (build-system ant-build-system)
5761 `(#:jar-name "slf4j-api.jar"
5762 #:source-dir "slf4j-api/src/main"
5763 #:test-dir "slf4j-api/src/test"
5765 (modify-phases %standard-phases
5766 (add-after 'build 'regenerate-jar
5768 ;; pom.xml ignores these files in the jar creation process. If we don't,
5769 ;; we get the error "This code should have never made it into slf4j-api.jar"
5770 (delete-file-recursively "build/classes/org/slf4j/impl")
5771 (zero? (system* "jar" "-cf" "build/jar/slf4j-api.jar" "-C"
5772 "build/classes" "."))))
5773 (add-before 'check 'dont-test-abstract-classes
5775 ;; abstract classes are not meant to be run with junit
5776 (substitute* "build.xml"
5777 (("<include name=\"\\*\\*/\\*Test.java\" />")
5778 (string-append "<include name=\"**/*Test.java\" />"
5779 "<exclude name=\"**/MultithreadedInitializationTest"
5780 ".java\" />"))))))))
5782 `(("java-junit" ,java-junit)
5783 ("java-hamcrest-core" ,java-hamcrest-core)))
5784 (home-page "https://www.slf4j.org/")
5785 (synopsis "Simple logging facade for Java")
5786 (description "The Simple Logging Facade for Java (SLF4J) serves as a
5787 simple facade or abstraction for various logging
5788 frameworks (e.g. @code{java.util.logging}, @code{logback}, @code{log4j})
5789 allowing the end user to plug in the desired logging framework at deployment
5791 (license license:expat)))
5793 (define java-slf4j-api-bootstrap
5795 (inherit java-slf4j-api)
5796 (name "java-slf4j-api-bootstrap")
5799 (substitute-keyword-arguments (package-arguments java-slf4j-api)
5800 ((#:tests? _ #f) #f)))))
5802 (define-public java-slf4j-simple
5804 (name "java-slf4j-simple")
5806 (source (package-source java-slf4j-api))
5807 (build-system ant-build-system)
5809 `(#:jar-name "slf4j-simple.jar"
5810 #:source-dir "slf4j-simple/src/main"
5811 #:test-dir "slf4j-simple/src/test"
5813 (modify-phases %standard-phases
5814 ;; The tests need some test classes from slf4j-api
5815 (add-before 'check 'build-slf4j-api-test-helpers
5817 ;; Add current dir to CLASSPATH ...
5819 (string-append (getcwd) ":" (getenv "CLASSPATH")))
5820 ;; ... and build test helper classes here:
5824 ,@(find-files "slf4j-api/src/test" ".*\\.java")))))))))
5826 `(("java-junit" ,java-junit)
5827 ("java-hamcrest-core" ,java-hamcrest-core)
5828 ("java-slf4j-api" ,java-slf4j-api)))
5829 (home-page "https://www.slf4j.org/")
5830 (synopsis "Simple implementation of simple logging facade for Java")
5831 (description "SLF4J binding for the Simple implementation, which outputs
5832 all events to System.err. Only messages of level INFO and higher are
5834 (license license:expat)))
5836 (define-public antlr2
5842 (uri (string-append "http://www.antlr2.org/download/antlr-"
5846 "1ffvcwdw73id0dk6pj2mlxjvbg0662qacx4ylayqcxgg381fnfl5"))
5847 (modules '((guix build utils)))
5850 (delete-file "antlr.jar")
5851 (substitute* "lib/cpp/antlr/CharScanner.hpp"
5855 "#define EOF (-1)\n"
5856 "#include <strings.h>")))
5857 (substitute* "configure"
5860 (build-system gnu-build-system)
5862 `(#:tests? #f ; no test target
5863 #:imported-modules ((guix build ant-build-system)
5864 (guix build syscalls)
5865 ,@%gnu-build-system-modules)
5866 #:modules (((guix build ant-build-system) #:prefix ant:)
5867 (guix build gnu-build-system)
5870 (modify-phases %standard-phases
5871 (add-after 'install 'strip-jar-timestamps
5872 (assoc-ref ant:%standard-phases 'strip-jar-timestamps))
5873 (add-after 'configure 'fix-bin-ls
5875 (substitute* (find-files "." "Makefile")
5881 ("java" ,icedtea "jdk")))
5883 `(("java" ,icedtea)))
5884 (home-page "http://www.antlr2.org")
5885 (synopsis "Framework for constructing recognizers, compilers, and translators")
5886 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
5887 is a language tool that provides a framework for constructing recognizers,
5888 compilers, and translators from grammatical descriptions containing Java, C#,
5889 C++, or Python actions. ANTLR provides excellent support for tree construction,
5890 tree walking, and translation.")
5891 (license license:public-domain)))
5893 (define-public java-stringtemplate-3
5895 (name "java-stringtemplate")
5899 (uri (string-append "https://github.com/antlr/website-st4/raw/"
5900 "gh-pages/download/stringtemplate-"
5904 "086yj68np1vqhkj7483diz3km6s6y4gmwqswa7524a0ca6vxn2is"))))
5905 (build-system ant-build-system)
5907 `(#:jar-name (string-append ,name "-" ,version ".jar")
5909 #:modules ((guix build ant-build-system)
5913 (modify-phases %standard-phases
5914 (add-before 'check 'fix-tests
5916 (substitute* "build.xml"
5917 (("\\$\\{test.home\\}/java")
5918 "${test.home}/org"))
5920 (add-before 'build 'generate-grammar
5922 (with-directory-excursion "src/org/antlr/stringtemplate/language/"
5923 (every (lambda (file)
5924 (format #t "~a\n" file)
5925 (zero? (system* "antlr" file)))
5926 '("template.g" "angle.bracket.template.g" "action.g"
5927 "eval.g" "group.g" "interface.g"))))))))
5930 ("java-junit" ,java-junit)))
5931 (home-page "http://www.stringtemplate.org")
5932 (synopsis "Template engine to generate formatted text output")
5933 (description "StringTemplate is a java template engine (with ports for C#,
5934 Objective-C, JavaScript, Scala) for generating source code, web pages, emails,
5935 or any other formatted text output. StringTemplate is particularly good at
5936 code generators, multiple site skins, and internationalization / localization.
5937 StringTemplate also powers ANTLR.")
5938 (license license:bsd-3)))
5940 ;; antlr3 is partially written using antlr3 grammar files. It also depends on
5941 ;; ST4 (stringtemplate4), which is also partially written using antlr3 grammar
5942 ;; files and uses antlr3 at runtime. The latest version requires a recent version
5943 ;; of antlr3 at runtime.
5944 ;; Fortunately, ST4 4.0.6 can be built with an older antlr3, and we use antlr3.3.
5945 ;; This version of ST4 is sufficient for the latest antlr3.
5946 ;; We use ST4 4.0.6 to build a boostrap antlr3 (latest version), and build
5947 ;; the latest ST4 with it. Then we build our final antlr3 that will be linked
5948 ;; against the latest ST4.
5949 ;; antlr3.3 still depends on antlr3 to generate some files, so we use an
5950 ;; even older version, antlr3.1, to generate them. Fortunately antlr3.1 uses
5951 ;; only grammar files with the antlr2 syntax.
5952 ;; So we build antlr3.1 -> antlr3.3 -> ST4.0.6 -> antlr3-bootstrap -> ST4 -> antlr3.
5954 (define-public java-stringtemplate
5955 (package (inherit java-stringtemplate-3)
5956 (name "java-stringtemplate")
5960 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/"
5962 (file-name (string-append name "-" version ".tar.gz"))
5965 "1pri8hqa95rfdkjy55icl5q1m09zwp5k67ib14abas39s4v3w087"))))
5966 (build-system ant-build-system)
5968 `(#:jar-name (string-append ,name "-" ,version ".jar")
5969 #:tests? #f ; FIXME: tests fail for unknown reasons
5971 #:modules ((guix build ant-build-system)
5975 (modify-phases %standard-phases
5976 (add-before 'check 'fix-test-target
5978 (substitute* "build.xml"
5979 (("\\$\\{test.home\\}/java") "${test.home}/")
5980 (("\\*Test.java") "Test*.java"))
5982 (add-before 'build 'generate-grammar
5984 (with-directory-excursion "src/org/stringtemplate/v4/compiler/"
5985 (every (lambda (file)
5986 (format #t "~a\n" file)
5987 (zero? (system* "antlr3" file)))
5988 '("STParser.g" "Group.g" "CodeGenerator.g"))))))))
5990 `(("antlr3" ,antlr3-bootstrap)
5992 ("java-stringtemplate" ,java-stringtemplate-3)
5993 ("java-junit" ,java-junit)))))
5995 (define java-stringtemplate-4.0.6
5996 (package (inherit java-stringtemplate)
5997 (name "java-stringtemplate")
6001 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/ST-"
6003 (file-name (string-append name "-" version ".tar.gz"))
6006 "0hjmh1ahdsh3w825i67mli9l4nncc4l6hdbf9ma91jvlj590sljp"))))
6008 `(("antlr3" ,antlr3-3.3)
6010 ("java-stringtemplate" ,java-stringtemplate-3)))))
6012 (define-public antlr3
6018 (uri (string-append "https://github.com/antlr/antlr3/archive/"
6020 (file-name (string-append name "-" version ".tar.gz"))
6023 "0218v683081lg54z9hvjxinhxd4dqp870jx6n39gslm0bkyi4vd6"))))
6024 (build-system ant-build-system)
6026 `(#:jar-name (string-append ,name "-" ,version ".jar")
6027 #:source-dir "tool/src/main/java:runtime/Java/src/main/java:tool/src/main/antlr3"
6030 (modify-phases %standard-phases
6031 (add-after 'install 'bin-install
6032 (lambda* (#:key inputs outputs #:allow-other-keys)
6033 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
6034 (bin (string-append (assoc-ref outputs "out") "/bin")))
6036 (with-output-to-file (string-append bin "/antlr3")
6039 (string-append "#!" (which "sh") "\n"
6040 "java -cp " jar "/" ,name "-" ,version ".jar:"
6042 (find-files (assoc-ref inputs "stringtemplate")
6046 (find-files (assoc-ref inputs "stringtemplate4")
6050 (find-files (string-append
6051 (assoc-ref inputs "antlr")
6054 " org.antlr.Tool $*"))))
6055 (chmod (string-append bin "/antlr3") #o755))))
6056 (add-before 'build 'generate-grammar
6058 (chdir "tool/src/main/antlr3/org/antlr/grammar/v3/")
6059 (for-each (lambda (file)
6062 (system* "antlr3" file))
6063 '("ANTLR.g" "ANTLRTreePrinter.g" "ActionAnalysis.g"
6064 "AssignTokenTypesWalker.g"
6065 "ActionTranslator.g" "TreeToNFAConverter.g"
6066 "ANTLRv3.g" "ANTLRv3Tree.g" "LeftRecursiveRuleWalker.g"
6067 "CodeGenTreeWalker.g" "DefineGrammarItemsWalker.g"))
6068 (substitute* "ANTLRParser.java"
6069 (("public Object getTree") "public GrammarAST getTree"))
6070 (substitute* "ANTLRv3Parser.java"
6071 (("public Object getTree") "public CommonTree getTree"))
6072 (chdir "../../../../../java")
6073 (system* "antlr" "-o" "org/antlr/tool"
6074 "org/antlr/tool/serialize.g")
6075 (substitute* "org/antlr/tool/LeftRecursiveRuleAnalyzer.java"
6076 (("import org.antlr.grammar.v3.\\*;") "import org.antlr.grammar.v3.*;
6077 import org.antlr.grammar.v3.ANTLRTreePrinter;"))
6078 (substitute* "org/antlr/tool/ErrorManager.java"
6079 (("case NO_SUCH_ATTRIBUTE_PASS_THROUGH:") ""))
6080 (chdir "../../../..")))
6081 (add-before 'build 'fix-build-xml
6083 (substitute* "build.xml"
6084 (("<exec") "<copy todir=\"${classes.dir}\">
6085 <fileset dir=\"tool/src/main/resources\">
6086 <include name=\"**/*.stg\"/>
6087 <include name=\"**/*.st\"/>
6088 <include name=\"**/*.sti\"/>
6089 <include name=\"**/STLexer.tokens\"/>
6091 </copy><exec")))))))
6094 ("antlr3" ,antlr3-bootstrap)))
6096 `(("junit" ,java-junit)
6097 ("stringtemplate" ,java-stringtemplate-3)
6098 ("stringtemplate4" ,java-stringtemplate)))
6100 `(("stringtemplate" ,java-stringtemplate-3)
6102 ("stringtemplate4" ,java-stringtemplate-4.0.6)))
6103 (home-page "http://www.antlr3.org")
6104 (synopsis "Framework for constructing recognizers, compilers, and translators")
6105 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
6106 is a language tool that provides a framework for constructing recognizers,
6107 compilers, and translators from grammatical descriptions containing Java, C#,
6108 C++, or Python actions. ANTLR provides excellent support for tree construction,
6109 tree walking, and translation.")
6110 (license license:bsd-3)))
6112 (define antlr3-bootstrap
6115 (name "antlr3-bootstrap")
6118 ("antlr3" ,antlr3-3.3)))
6120 `(("junit" ,java-junit)))))
6129 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
6130 "gh-pages/download/antlr-"
6134 "0qgg5vgsm4l1d6dj9pfbaa25dpv2ry2gny8ajy4vvgvfklw97b3m"))
6136 (search-patches "antlr3-3_3-fix-java8-compilation.patch"))))
6138 `(#:jar-name (string-append ,name "-" ,version ".jar")
6139 #:source-dir (string-join '("tool/src/main/java"
6140 "runtime/Java/src/main/java"
6141 "tool/src/main/antlr2"
6142 "tool/src/main/antlr3")
6144 #:tests? #f ; FIXME: tests seem to require maven plugin
6145 #:modules ((guix build ant-build-system)
6149 (modify-phases %standard-phases
6150 (add-after 'install 'bin-install
6151 (lambda* (#:key inputs outputs #:allow-other-keys)
6152 (let* ((out (assoc-ref outputs "out"))
6153 (jar (string-append out "/share/java"))
6154 (bin (string-append out "/bin")))
6156 (with-output-to-file (string-append bin "/antlr3")
6160 "#!" (which "sh") "\n"
6161 "java -cp " jar "/antlr3-3.3.jar:"
6163 (append (find-files (assoc-ref inputs "java-stringtemplate")
6165 (find-files (string-append (assoc-ref inputs "antlr")
6169 " org.antlr.Tool $*"))))
6170 (chmod (string-append bin "/antlr3") #o755)
6172 (add-before 'build 'generate-grammar
6174 (substitute* "tool/src/main/java/org/antlr/tool/Grammar.java"
6175 (("import org.antlr.grammar.v2.\\*;")
6176 "import org.antlr.grammar.v2.*;\n
6177 import org.antlr.grammar.v2.TreeToNFAConverter;\n
6178 import org.antlr.grammar.v2.DefineGrammarItemsWalker;\n
6179 import org.antlr.grammar.v2.ANTLRTreePrinter;"))
6181 (with-directory-excursion "tool/src/main/antlr2/org/antlr/grammar/v2/"
6182 (every (lambda (file)
6183 (format #t "~a\n" file)
6184 (zero? (system* "antlr" file)))
6185 '("antlr.g" "antlr.print.g" "assign.types.g"
6186 "buildnfa.g" "codegen.g" "define.g")))
6187 (with-directory-excursion "tool/src/main/antlr3/org/antlr/grammar/v3/"
6188 (every (lambda (file)
6189 (format #t "~a\n" file)
6190 (zero? (system* "antlr3" file)))
6191 '("ActionAnalysis.g" "ActionTranslator.g" "ANTLRv3.g"
6192 "ANTLRv3Tree.g"))))))
6193 (add-before 'build 'fix-build-xml
6195 (substitute* "build.xml"
6196 (("<exec") "<copy todir=\"${classes.dir}\">
6197 <fileset dir=\"tool/src/main/resources\">
6198 <include name=\"**/*.stg\"/>
6199 <include name=\"**/*.st\"/>
6200 <include name=\"**/*.sti\"/>
6201 <include name=\"**/STLexer.tokens\"/>
6207 ("antlr3" ,antlr3-3.1)))
6209 `(("junit" ,java-junit)))
6211 `(("java-stringtemplate" ,java-stringtemplate-3)
6213 ("antlr3" ,antlr3-3.1)))))
6221 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
6222 "gh-pages/download/antlr-"
6226 "0sfimc9cpbgrihz4giyygc8afgpma2c93yqpwb951giriri6x66z"))
6228 (search-patches "antlr3-3_1-fix-java8-compilation.patch"))))
6230 `(#:jar-name (string-append "antlr3-" ,version ".jar")
6231 #:source-dir "src:runtime/Java/src"
6234 (modify-phases %standard-phases
6235 (add-after 'install 'bin-install
6236 (lambda* (#:key inputs outputs #:allow-other-keys)
6237 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
6238 (bin (string-append (assoc-ref outputs "out") "/bin")))
6240 (with-output-to-file (string-append bin "/antlr3")
6243 (string-append "#!" (which "sh") "\n"
6244 "java -cp " jar "/antlr3-3.1.jar:"
6246 (find-files (assoc-ref inputs "stringtemplate")
6250 (find-files (string-append
6251 (assoc-ref inputs "antlr")
6254 " org.antlr.Tool $*"))))
6255 (chmod (string-append bin "/antlr3") #o755))))
6256 (add-before 'build 'generate-grammar
6258 (let ((dir "src/org/antlr/tool/"))
6259 (for-each (lambda (file)
6262 (invoke "antlr" "-o" dir (string-append dir file)))
6263 '("antlr.g" "antlr.print.g" "assign.types.g"
6264 "buildnfa.g" "define.g")))
6265 (format #t "codegen.g\n")
6266 (invoke "antlr" "-o" "src/org/antlr/codegen"
6267 "src/org/antlr/codegen/codegen.g")
6269 (add-before 'build 'fix-build-xml
6271 (substitute* "build.xml"
6272 (("<exec") "<copy todir=\"${classes.dir}\">
6273 <fileset dir=\"src\">
6274 <include name=\"**/*.stg\"/>
6275 <include name=\"**/*.st\"/>
6276 <include name=\"**/*.sti\"/>
6277 <include name=\"**/STLexer.tokens\"/>
6279 </copy><exec")))))))
6281 `(("antlr" ,antlr2)))
6283 `(("junit" ,java-junit)))
6285 `(("stringtemplate" ,java-stringtemplate-3)))))
6287 (define-public java-commons-cli-1.2
6288 ;; This is a bootstrap dependency for Maven2.
6290 (inherit java-commons-cli)
6294 (uri (string-append "mirror://apache/commons/cli/source/"
6295 "commons-cli-" version "-src.tar.gz"))
6298 "0rvfgzgv2pc1m091dfj3ih9ddsjjppr1f1wf0qmc3bk6b1kwv2dm"))))
6300 `(#:jar-name "commons-cli.jar"
6302 (modify-phases %standard-phases
6303 (add-before 'check 'fix-build-xml
6304 (lambda* (#:key inputs #:allow-other-keys)
6305 (substitute* "build.xml"
6306 (("dir=\"\\$\\{test.home\\}/java\"")
6307 "dir=\"${test.home}\""))
6310 `(("java-junit" ,java-junit)))))
6312 (define-public java-microemulator-cldc
6314 (name "java-microemulator-cldc")
6318 (uri (string-append "https://github.com/barteo/microemu/archive/"
6320 (string-map (lambda (c) (if (char=? c #\.) #\_ c))
6323 (file-name (string-append name "-" version ".tar.gz"))
6326 "1x1apmz38gkppxnwnygwmi12j54v4p258v8ddzn6dldkk7vak1ll"))))
6327 (build-system ant-build-system)
6329 `(#:jar-name "microemulator-cldc.jar"
6330 #:source-dir "microemu-cldc/src/main/java"
6331 #:tests? #f)); Requires even older software
6332 (home-page "https://github.com/barteo/microemu")
6333 (synopsis "J2ME CLDC emulator")
6334 (description "Microemulator is a Java 2 Micro Edition (J2ME) CLDC/MIDP
6335 Emulator. It allows to demonstrate MIDlet based applications in web browser
6336 applet and can be run as a standalone java application.")
6337 (license (list license:asl2.0
6339 license:lgpl2.1+))))
6341 (define-public java-datanucleus-javax-persistence
6343 (name "java-datanucleus-javax-persistence")
6347 (uri (string-append "https://github.com/datanucleus/"
6348 "javax.persistence/archive/javax.persistence-"
6349 version "-release.tar.gz"))
6352 "11jx0fjwgc2hhbqqgdd6m1pf2fplf9vslppygax0y1z5csnqjhpx"))))
6353 (build-system ant-build-system)
6355 `(#:jar-name "java-datanucleus-javax-persistence.jar"
6357 #:source-dir "src/main/java"
6358 #:tests? #f)); no tests
6359 (home-page "https://github.com/datanucleus/javax.persistence")
6360 (synopsis "JPA API")
6361 (description "This package contains a clean definition of JPA API intended
6362 for use with DataNucleus JPA since the JCP haven't provided an official JPA API
6363 jar. See @url{http://java.net/projects/jpa-spec/downloads} for the specification
6364 used to generate this API.")
6365 (license (list license:edl1.0 license:epl1.0))))
6367 (define-public java-osgi-cmpn
6369 (name "java-osgi-cmpn")
6373 (uri (string-append "http://central.maven.org/maven2/"
6374 "org/osgi/osgi.cmpn/" version "/osgi.cmpn-"
6375 version "-sources.jar"))
6378 "1lmb6xyrmkqdhv1kayf0514rlwq6ypvs4m44ibrck3snp8241wys"))))
6379 (build-system ant-build-system)
6381 `(#:jar-name "osgi-cmpn.jar"
6382 #:tests? #f)); no tests
6384 `(("annotation" ,java-osgi-annotation)
6385 ("core" ,java-osgi-core)
6386 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
6387 ("microemulator" ,java-microemulator-cldc)
6388 ("servlet" ,java-classpathx-servletapi)))
6389 (home-page "https://www.osgi.org")
6390 (synopsis "Compendium specification module of OSGi framework")
6392 "OSGi, for Open Services Gateway initiative framework, is a module system
6393 and service platform for the Java programming language. This package contains
6394 the compendium specification module, providing interfaces and classes for use
6395 in compiling bundles.")
6396 (license license:asl2.0)))
6398 (define-public java-osgi-service-component-annotations
6400 (name "java-osgi-service-component-annotations")
6404 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6405 "org.osgi.service.component.annotations/"
6406 version "/org.osgi.service.component.annotations-"
6407 version "-sources.jar"))
6410 "15rq9cmp4fpn74q44m4j35qsqmjf5lx3hcrk6pzvbhc08igic2f0"))))
6411 (build-system ant-build-system)
6413 `(#:jar-name "osgi-service-component-annotations.jar"
6414 #:tests? #f)); no tests
6416 `(("annotation" ,java-osgi-annotation)))
6417 (home-page "https://www.osgi.org")
6418 (synopsis "Support annotations for osgi-service-component")
6420 "OSGi, for Open Services Gateway initiative framework, is a module system
6421 and service platform for the Java programming language. This package contains
6422 the support annotations for osgi-service-component.")
6423 (license license:asl2.0)))
6425 (define-public java-osgi-dto
6427 (name "java-osgi-dto")
6431 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6432 "org.osgi.dto/" version "/org.osgi.dto-"
6433 version "-sources.jar"))
6436 "0f4bqjzadn0hwk6sd3h5gvbyfp3yci1s6r0v770cc15p0pg627yr"))))
6437 (build-system ant-build-system)
6439 `(#:jar-name "osgi-dto.jar"
6440 #:tests? #f)); no tests
6442 `(("annotation" ,java-osgi-annotation)))
6443 (home-page "https://www.osgi.org")
6444 (synopsis "Data Transfer Objects")
6446 "OSGi, for Open Services Gateway initiative framework, is a module system
6447 and service platform for the Java programming language. This package contains
6448 the Data Transfer Objects. It is easily serializable having only public fields
6449 of primitive types and their wrapper classes, Strings, and DTOs. List, Set,
6450 Map and array aggregates may also be used. The aggregates must only hold
6451 objects of the listed types or aggregates.")
6452 (license license:asl2.0)))
6454 (define-public java-osgi-resource
6456 (name "java-osgi-resource")
6460 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6461 "org.osgi.resource/"
6462 version "/org.osgi.resource-"
6463 version "-sources.jar"))
6466 "0hi0fsc5v99q22bd7lrkvpz1y0ds4w9arjldpwsrcpqvz2js7q2d"))))
6467 (build-system ant-build-system)
6469 `(#:jar-name "osgi-resource.jar"
6470 #:tests? #f)); no tests
6472 `(("annotation" ,java-osgi-annotation)
6473 ("dto" ,java-osgi-dto)))
6474 (home-page "https://www.osgi.org")
6475 (synopsis "OSGI Resource")
6477 "OSGi, for Open Services Gateway initiative framework, is a module system
6478 and service platform for the Java programming language. This package contains
6479 the definition of common types in osgi packages.")
6480 (license license:asl2.0)))
6482 (define-public java-osgi-namespace-contract
6484 (name "java-osgi-namespace-contract")
6488 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6489 "org.osgi.namespace.contract/"
6490 version "/org.osgi.namespace.contract-"
6491 version "-sources.jar"))
6494 "1iz4f2i0fvqrlq90ki9nfzcfpvy2av434ri25bglywqssx8mmp36"))))
6495 (build-system ant-build-system)
6497 `(("resource" ,java-osgi-resource)
6498 ("annotation" ,java-osgi-annotation)))
6500 `(#:jar-name "osgi-namespace-contract.jar"
6501 #:tests? #f)); no tests
6502 (home-page "https://www.osgi.org")
6503 (synopsis "Contract Capability and Requirement Namespace")
6505 "OSGi, for Open Services Gateway initiative framework, is a module system
6506 and service platform for the Java programming language. This package contains
6507 the names for the attributes and directives for a namespace with contracts.")
6508 (license license:asl2.0)))
6510 (define-public java-osgi-namespace-extender
6512 (name "java-osgi-namespace-extender")
6516 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6517 "org.osgi.namespace.extender/"
6518 version "/org.osgi.namespace.extender-"
6519 version "-sources.jar"))
6522 "0jgqiak2i05qv6j3gd33xlaifzzc0ylxxk376v2x0apfg3vvixmz"))))
6523 (build-system ant-build-system)
6525 `(("resource" ,java-osgi-resource)
6526 ("annotation" ,java-osgi-annotation)))
6528 `(#:jar-name "osgi-namespace-extendent.jar"
6529 #:tests? #f)); no tests
6530 (home-page "https://www.osgi.org")
6531 (synopsis "Extender Capability and Requirement Namespace")
6533 "OSGi, for Open Services Gateway initiative framework, is a module system
6534 and service platform for the Java programming language. This package contains
6535 the names for the attributes and directives for an extender namespace.")
6536 (license license:asl2.0)))
6538 (define-public java-osgi-namespace-service
6540 (name "java-osgi-namespace-service")
6544 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6545 "org.osgi.namespace.service/"
6546 version "/org.osgi.namespace.service-"
6547 version "-sources.jar"))
6550 "0qmw8n2449nkmm56d1znz9zhazb6ya3vsimd5bf5jg23zzhgl8c8"))))
6551 (build-system ant-build-system)
6553 `(("resource" ,java-osgi-resource)
6554 ("annotation" ,java-osgi-annotation)))
6556 `(#:jar-name "osgi-namespace-service.jar"
6557 #:tests? #f)); no tests
6558 (home-page "https://www.osgi.org")
6559 (synopsis "Service Capability and Requirement Namespace")
6561 "OSGi, for Open Services Gateway initiative framework, is a module system
6562 and service platform for the Java programming language. This package contains
6563 the names for the attributes and directives for a service namespace.")
6564 (license license:asl2.0)))
6566 (define-public java-osgi-util-function
6568 (name "java-osgi-util-function")
6572 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6573 "org.osgi.util.function/"
6574 version "/org.osgi.util.function-"
6575 version "-sources.jar"))
6578 "04l7j3hwmmj28w23m7paca0afzncs42j2mdr3liqq8kvp548sc6x"))))
6579 (build-system ant-build-system)
6581 `(#:jar-name "osgi-util-function.jar"
6582 #:tests? #f)); no tests
6584 `(("annotation" ,java-osgi-annotation)))
6585 (home-page "https://www.osgi.org")
6586 (synopsis "OSGI Util Function")
6588 "OSGi, for Open Services Gateway initiative framework, is a module system
6589 and service platform for the Java programming language. This package contains
6590 an interface for a function that accepts a single argument and produces a result.")
6591 (license license:asl2.0)))
6593 (define-public java-osgi-util-promise
6595 (name "java-osgi-util-promise")
6599 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6600 "org.osgi.util.promise/"
6601 version "/org.osgi.util.promise-"
6602 version "-sources.jar"))
6605 "0y34dwiflg1c4ahvkswpf9z02xph2sr9fm04ia5493x3lshpw22c"))))
6606 (build-system ant-build-system)
6608 `(#:jar-name "osgi-util-promise.jar"
6609 #:tests? #f)); no tests
6611 `(("annotation" ,java-osgi-annotation)
6612 ("function" ,java-osgi-util-function)))
6613 (home-page "https://www.osgi.org")
6614 (synopsis "Promise of a value")
6616 "OSGi, for Open Services Gateway initiative framework, is a module system
6617 and service platform for the Java programming language. This package contains
6618 an interface and utilitary classes for promises. A Promise represents a future
6619 value. It handles the interactions for asynchronous processing.")
6620 (license license:asl2.0)))
6622 (define-public java-osgi-service-metatype-annotations
6624 (name "java-osgi-service-metatype-annotations")
6628 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6629 "org.osgi.service.metatype.annotations/"
6630 version "/org.osgi.service.metatype.annotations-"
6631 version "-sources.jar"))
6634 "12rwm3349wk80vm88rcdgs4435m4jxkpkj5mrx326skkz2c6hyw6"))))
6635 (build-system ant-build-system)
6637 `(#:jar-name "osgi-service-metatype-annotations.jar"
6638 #:tests? #f)); no tests
6640 `(("annotation" ,java-osgi-annotation)))
6641 (home-page "https://www.osgi.org")
6642 (synopsis "Support annotations for metatype")
6644 "OSGi, for Open Services Gateway initiative framework, is a module system
6645 and service platform for the Java programming language. This package contains
6646 the support annotations for metatype.")
6647 (license license:asl2.0)))
6649 (define-public java-osgi-service-repository
6651 (name "java-osgi-service-repository")
6655 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6656 "org.osgi.service.repository/"
6657 version "/org.osgi.service.repository-"
6658 version "-sources.jar"))
6661 "1k41mhg7b58pd8nsghr2qwcjrxdnf1p9spsw9v11k4257g6rl06n"))))
6662 (build-system ant-build-system)
6664 `(#:jar-name "osgi-service-repository.jar"
6665 #:tests? #f)); no tests
6667 `(("annotation" ,java-osgi-annotation)
6668 ("promise" ,java-osgi-util-promise)
6669 ("resource" ,java-osgi-resource)))
6670 (home-page "https://www.osgi.org")
6671 (synopsis "OSGI service repository")
6673 "OSGi, for Open Services Gateway initiative framework, is a module system
6674 and service platform for the Java programming language. This package contains
6675 a repository service that contains resources.")
6676 (license license:asl2.0)))
6678 (define-public java-osgi-framework
6680 (name "java-osgi-framework")
6684 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6685 "org.osgi.framework/" version "/org.osgi.framework-"
6686 version "-sources.jar"))
6689 "1lwp2zfad3rybcc6q9bwz8xsgkc92ypzy5p6x54387f1qj65m73s"))))
6690 (build-system ant-build-system)
6692 `(#:jar-name "osgi-framework.jar"
6693 #:tests? #f)); no tests
6695 `(("annotation" ,java-osgi-annotation)
6696 ("resource" ,java-osgi-resource)
6697 ("dto" ,java-osgi-dto)))
6698 (home-page "https://www.osgi.org")
6699 (synopsis "OSGi framework")
6701 "OSGi, for Open Services Gateway initiative framework, is a module system
6702 and service platform for the Java programming language.")
6703 (license license:asl2.0)))
6705 (define-public java-osgi-service-log
6707 (name "java-osgi-service-log")
6711 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6712 "org.osgi.service.log/"
6713 version "/org.osgi.service.log-"
6714 version "-sources.jar"))
6717 "1029j30dzcwializzca0j3fkhwwz08kmmsha5agw1iccscimj6r0"))))
6718 (build-system ant-build-system)
6720 `(#:jar-name "osgi-service-log.jar"
6721 #:tests? #f)); no tests
6723 `(("java-osgi-framework" ,java-osgi-framework)))
6724 (home-page "https://www.osgi.org")
6725 (synopsis "Provides methods for bundles to write messages to the log")
6727 "OSGi, for Open Services Gateway initiative framework, is a module system
6728 and service platform for the Java programming language. This package contains
6730 (license license:asl2.0)))
6732 (define-public java-osgi-service-jdbc
6734 (name "java-osgi-service-jdbc")
6738 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6739 "org.osgi.service.jdbc/"
6740 version "/org.osgi.service.jdbc-"
6741 version "-sources.jar"))
6744 "11iln5v7bk469cgb9ddkrz9sa95b3733gqgaqw9xf5g6wq652yjz"))))
6745 (build-system ant-build-system)
6747 `(#:jar-name "osgi-service-jdbc.jar"
6748 #:tests? #f)); no tests
6749 (home-page "https://www.osgi.org")
6750 (synopsis "Factory for JDBC connection factories")
6752 "OSGi, for Open Services Gateway initiative framework, is a module system
6753 and service platform for the Java programming language. This package contains
6754 a factory for JDBC connection factories. There are 3 preferred connection
6755 factories for getting JDBC connections:
6758 @item @code{javax.sql.DataSource};
6759 @item @code{javax.sql.ConnectionPoolDataSource};
6760 @item @code{javax.sql.XADataSource}.
6762 (license license:asl2.0)))
6764 (define-public java-osgi-service-resolver
6766 (name "java-osgi-service-resolver")
6770 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6771 "org.osgi.service.resolver/"
6772 version "/org.osgi.service.resolver-"
6773 version "-sources.jar"))
6776 "1dzqn1ryfi2rq4zwsgp44bmj2wlfydjg1qbxw2b0z4xdjjy55vxd"))))
6777 (build-system ant-build-system)
6779 `(#:jar-name "osgi-service-resolver.jar"
6780 #:tests? #f)); no tests
6782 `(("annotation" ,java-osgi-annotation)
6783 ("resource" ,java-osgi-resource)))
6784 (home-page "https://www.osgi.org")
6785 (synopsis "OSGI Resolver service")
6787 "OSGi, for Open Services Gateway initiative framework, is a module system
6788 and service platform for the Java programming language. This package contains
6789 a resolver service that resolves the specified resources in the context supplied
6791 (license license:asl2.0)))
6793 (define-public java-osgi-util-tracker
6795 (name "java-osgi-util-tracker")
6799 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6800 "org.osgi.util.tracker/"
6801 version "/org.osgi.util.tracker-"
6802 version "-sources.jar"))
6805 "0c4fh9vxwzsx59r8dygda0gq2gx3z5vfhc3jsphlqwf5w0h403lz"))))
6806 (build-system ant-build-system)
6808 `(#:jar-name "osgi-util-tracker.jar"
6809 #:tests? #f)); no tests
6811 `(("framework" ,java-osgi-framework)
6812 ("annotation" ,java-osgi-annotation)))
6813 (home-page "https://www.osgi.org")
6814 (synopsis "Bundle tracking")
6816 "OSGi, for Open Services Gateway initiative framework, is a module system
6817 and service platform for the Java programming language. This package contains
6818 bundle tracking utility classes.")
6819 (license license:asl2.0)))
6821 (define-public java-osgi-service-cm
6823 (name "java-osgi-service-cm")
6827 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6828 "org.osgi.service.cm/"
6829 version "/org.osgi.service.cm-"
6830 version "-sources.jar"))
6833 "1z8kap48y3xi0ggj8v6czglfnpnd94mmismgi2wbqhj1nl5fzbp6"))))
6834 (build-system ant-build-system)
6836 `(#:jar-name "osgi-service-cm.jar"
6837 #:tests? #f)); no tests
6839 `(("framework" ,java-osgi-framework)
6840 ("annotation" ,java-osgi-annotation)))
6841 (home-page "https://www.osgi.org")
6842 (synopsis "OSGI Configuration Management")
6844 "OSGi, for Open Services Gateway initiative framework, is a module system
6845 and service platform for the Java programming language. This package contains
6846 utility classes for the configuration of services.")
6847 (license license:asl2.0)))
6849 (define-public java-osgi-service-packageadmin
6851 (name "java-osgi-service-packageadmin")
6855 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6856 "org.osgi.service.packageadmin/"
6857 version "/org.osgi.service.packageadmin-"
6858 version "-sources.jar"))
6861 "041mpxzi7g36wmcily6y4ccn3jx15akpdy8gmhyb7m98x7qfvn52"))))
6862 (build-system ant-build-system)
6864 `(#:jar-name "osgi-service-packageadmin.jar"
6865 #:tests? #f)); no tests
6867 `(("framework" ,java-osgi-framework)))
6868 (home-page "https://www.osgi.org")
6869 (synopsis "OSGI Package Administration")
6871 "OSGi, for Open Services Gateway initiative framework, is a module system
6872 and service platform for the Java programming language. This package contains
6873 the packageadmin service.")
6874 (license license:asl2.0)))
6876 (define-public java-ops4j-base-lang
6878 (name "java-ops4j-base-lang")
6882 (uri (string-append "https://github.com/ops4j/org.ops4j.base/"
6883 "archive/base-" version ".tar.gz"))
6886 "18hl3lpchgpv8yh5rlk39l2gif5dlfgb8gxjmncf39pr2dprkniw"))))
6887 (build-system ant-build-system)
6889 `(#:jar-name "java-ops4j-base-lang.jar"
6890 #:source-dir "ops4j-base-lang/src/main/java"
6891 #:tests? #f; no tests
6893 (modify-phases %standard-phases
6894 (add-before 'build 'add-test-file
6896 ;; That file is required by a test in ops4j-pax-exam-core-spi
6897 (mkdir-p "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang")
6898 (with-output-to-file "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang/pom.properties"
6902 "version=" ,version "\n"
6903 "groupId=org.ops4j.base"
6904 "artifactId=ops4j-base-lang\n")))))))))
6905 (home-page "https://ops4j1.jira.com/wiki/spaces/base/overview")
6906 (synopsis "Utility classes and extensions to be used in OPS4J projects")
6907 (description "OPS4J stands for Open Participation Software for Java. This
6908 package contains utilities and extensions related to @code{java.lang}.")
6909 (license license:asl2.0)))
6911 (define-public java-ops4j-base-monitors
6913 (inherit java-ops4j-base-lang)
6914 (name "java-ops4j-base-monitors")
6916 `(#:jar-name "java-ops4j-base-monitors.jar"
6917 #:source-dir "ops4j-base-monitors/src/main/java"
6918 #:tests? #f)); no tests
6920 `(("lang" ,java-ops4j-base-lang)))
6921 (description "OPS4J stands for Open Participation Software for Java. This
6922 package contains utilities and extensions related to monitoring.")))
6924 (define-public java-ops4j-base-io
6926 (inherit java-ops4j-base-lang)
6927 (name "java-ops4j-base-io")
6929 `(#:jar-name "java-ops4j-base-io.jar"
6930 #:source-dir "ops4j-base-io/src/main/java"
6931 #:test-dir "ops4j-base-io/src/test"
6933 (list "**/ListerTest.java")))
6935 `(("lang" ,java-ops4j-base-monitors)
6936 ("lang" ,java-ops4j-base-lang)))
6938 `(("junit" ,java-junit)
6939 ("hamcrest" ,java-hamcrest-core)))
6940 (description "OPS4J stands for Open Participation Software for Java. This
6941 package contains utilities and extensions related to handling streams and files.")))
6943 (define-public java-ops4j-base-util
6945 (inherit java-ops4j-base-lang)
6946 (name "java-ops4j-base-util")
6948 `(#:jar-name "java-ops4j-base-util.jar"
6949 #:source-dir "ops4j-base-util/src/main/java"
6950 #:test-dir "ops4j-base-util/src/test"))
6952 `(("lang" ,java-ops4j-base-lang)))
6954 `(("junit" ,java-junit)))
6955 (description "OPS4J stands for Open Participation Software for Java. This
6956 package contains utilities and extensions related to environment, i18n and
6959 (define-public java-ops4j-base-util-property
6961 (inherit java-ops4j-base-lang)
6962 (name "java-ops4j-base-util-property")
6964 `(#:jar-name "java-ops4j-base-util-property.jar"
6965 #:source-dir "ops4j-base-util-property/src/main/java"
6966 #:tests? #f)); no tests
6968 `(("lang" ,java-ops4j-base-lang)
6969 ("util" ,java-ops4j-base-util)))
6970 (description "OPS4J stands for Open Participation Software for Java. This
6971 package contains utilities and extensions related to resolving properties from
6972 different sources.")))
6974 (define-public java-ops4j-base-store
6976 (inherit java-ops4j-base-lang)
6977 (name "java-ops4j-base-store")
6979 `(#:jar-name "java-ops4j-base-store.jar"
6980 #:source-dir "ops4j-base-store/src/main/java"
6981 #:tests? #f)); no tests
6983 `(("lang" ,java-ops4j-base-lang)
6984 ("slf4j" ,java-slf4j-api)
6985 ("io" ,java-ops4j-base-io)))
6986 (description "OPS4J stands for Open Participation Software for Java. This
6987 package contains utilities for storing and retrieving data from an
6988 @code{InputStream}.")))
6990 (define-public java-ops4j-base-spi
6992 (inherit java-ops4j-base-lang)
6993 (name "java-ops4j-base-spi")
6995 `(#:jar-name "java-ops4j-base-spi.jar"
6996 #:source-dir "ops4j-base-spi/src/main/java"
6997 #:test-dir "ops4j-base-spi/src/test"))
6999 `(("junit" ,java-junit)
7000 ("hamcrest" ,java-hamcrest-core)))
7001 (description "OPS4J stands for Open Participation Software for Java. This
7002 package contains utilities for obtaining services via the Java SE 6
7003 @code{ServiceLoader}.")))
7005 (define-public java-aqute-bnd-annotation
7007 (name "java-aqute-bnd-annotation")
7011 (uri (string-append "https://github.com/bndtools/bnd/archive/"
7012 version ".REL.tar.gz"))
7013 (file-name (string-append name "-" version ".tar.gz"))
7016 "1ggyiq0as0f6cz333a0dh98j72kmvv5pf2s47v9554yh905lfqdl"))))
7017 (build-system ant-build-system)
7019 `(#:jar-name "java-aqute-bnd-annotation.jar"
7020 #:source-dir "biz.aQute.bnd.annotation/src"
7021 #:tests? #f)); empty test dir
7022 (home-page "http://bnd.bndtools.org/")
7023 (synopsis "Tools for OSGi")
7024 (description "Bnd is a swiss army knife for OSGi, it creates manifest
7025 headers based on analyzing the class code, it verifies the project settings,
7026 it manages project dependencies, gives diffs jars, and much more.")
7027 (license license:asl2.0)))
7029 (define-public java-aqute-libg
7031 (inherit java-aqute-bnd-annotation)
7032 (name "java-aqute-libg")
7034 `(#:jar-name "java-aqute-libg.jar"
7035 ;; The build fails when source/target more recent than 1.7. This
7036 ;; is a known issue. See: https://github.com/bndtools/bnd/issues/1327
7038 ;; It is closed as won't fix. There is no way to change the source
7039 ;; so that it works on 1.8, and still works on 1.6, the upstream
7040 ;; target. It work fine on 1.7, so we use 1.7.
7041 #:make-flags (list "-Dant.build.javac.source=1.7"
7042 "-Dant.build.javac.target=1.7")
7044 (modify-phases %standard-phases
7045 (add-before 'configure 'chdir
7046 ;; Change to aQute.libg directory, so that the relative
7047 ;; paths in the tests aren't broken.
7049 (chdir "aQute.libg")
7051 (add-before 'check 'create-test-directory
7052 ;; Copy the test directory to test/java, since that's where
7053 ;; ant-build-system's default project in build.xml expects to find
7054 ;; the test classes. Leave a copy in the original place to not
7055 ;; break paths in tests.
7058 (copy-recursively "test" "src/test/java")
7061 `(("slf4j" ,java-slf4j-api)
7062 ("osgi-annot" ,java-osgi-annotation)
7063 ("java-osgi-cmpn" ,java-osgi-cmpn)
7064 ("osgi" ,java-osgi-core)))
7066 `(("hamcrest" ,java-hamcrest-core)
7067 ("java-junit" ,java-junit)))))
7069 (define java-aqute-libg-bootstrap
7071 (inherit java-aqute-libg)
7072 (name "java-aqute-libg-bootstrap")
7074 ;; Disable tests, at this stage of bootstrap we have no test frameworks.
7075 (substitute-keyword-arguments (package-arguments java-aqute-libg)
7076 ((#:tests? _ #f) #f)))
7078 `(("slf4j-bootstrap" ,java-slf4j-api-bootstrap)
7079 ,@(delete `("slf4j" ,java-slf4j-api)
7080 (package-inputs java-aqute-libg))))
7081 (native-inputs '())))
7083 (define-public java-aqute-bndlib
7085 (inherit java-aqute-bnd-annotation)
7086 (name "java-aqute-bndlib")
7088 `(#:jar-name "java-bndlib.jar"
7089 #:source-dir "biz.aQute.bndlib/src"
7090 #:tests? #f)); no tests
7092 `(("slf4j" ,java-slf4j-api)
7093 ("osgi-annot" ,java-osgi-annotation)
7094 ("java-aqute-libg" ,java-aqute-libg)
7095 ("java-aqute-bnd-annotation" ,java-aqute-bnd-annotation)
7096 ("java-osgi-service-component-annotations" ,java-osgi-service-component-annotations)
7097 ("java-osgi-service-repository" ,java-osgi-service-repository)
7098 ("java-osgi-service-log" ,java-osgi-service-log)
7099 ("java-osgi-service-metatype-annotations" ,java-osgi-service-metatype-annotations)
7100 ("java-osgi-namespace-contract" ,java-osgi-namespace-contract)
7101 ("java-osgi-namespace-extender" ,java-osgi-namespace-extender)
7102 ("java-osgi-namespace-service" ,java-osgi-namespace-service)
7103 ("promise" ,java-osgi-util-promise)
7104 ("osgi" ,java-osgi-core)))))
7106 (define java-aqute-bndlib-bootstrap
7108 (inherit java-aqute-bndlib)
7109 (name "java-aqute-bndlib-bootstrap")
7111 `(("slf4j-bootstrap" ,java-slf4j-api-bootstrap)
7112 ("java-aqute-libg-bootstrap" ,java-aqute-libg-bootstrap)
7113 ,@(delete `("slf4j" ,java-slf4j-api)
7114 (delete `("java-aqute-libg" ,java-aqute-libg)
7115 (package-inputs java-aqute-bndlib)))))))
7117 (define-public java-ops4j-pax-tinybundles
7119 (name "java-ops4j-pax-tinybundles")
7123 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.tinybundles/"
7124 "archive/tinybundles-" version ".tar.gz"))
7127 "0y0gq3pvv0iir2b885lmlwnvr724vv7vklzhhr4fs27d7mdkj871"))))
7129 `(#:jar-name "java-ops4j-pax-tinybundles.jar"
7130 #:source-dir "src/main/java"
7132 ;; Abstract base classes for other tests
7133 (list "**/BndTest.java" "**/CoreTest.java")
7135 (modify-phases %standard-phases
7136 (add-before 'check 'fix-version
7138 ;; This test has a reference to an old version of bndlib we are not
7139 ;; packaging. It uses the version referenced in pom.xml. We replace
7140 ;; it with our own version.
7141 (substitute* "src/test/java/org/ops4j/pax/tinybundles/bnd/BndTest.java"
7142 (("[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*")
7143 ,(package-version java-aqute-bndlib))))))))
7145 `(("lang" ,java-ops4j-base-lang)
7146 ("io" ,java-ops4j-base-io)
7147 ("store" ,java-ops4j-base-store)
7148 ("slf4j" ,java-slf4j-api)
7149 ("libg" ,java-aqute-libg)
7150 ("bndlib" ,java-aqute-bndlib)))
7152 `(("junit" ,java-junit)
7153 ("hamcrest" ,java-hamcrest-core)
7154 ("log4j" ,java-log4j-api)
7155 ("bndannotation" ,java-aqute-bnd-annotation)
7156 ("framework" ,java-osgi-framework)))
7157 (build-system ant-build-system)
7158 (home-page "https://ops4j1.jira.com/wiki/spaces/ops4j/pages/12060312/Tinybundles")
7159 (synopsis "Java APIs to create OSGi related artifacts")
7160 (description "Tinybundles is all about creating OSGi related artifacts like
7161 Bundles, Fragments and Deployment Packages with Java Api. It is very convinient
7162 to create such artifacts on-the-fly inside Tests (like in Pax Exam). On the
7163 other hand, this library can be a foundation of real end user tools that need
7164 to create those artifacts.")
7165 (license license:asl2.0)))
7167 (define-public java-ops4j-pax-exam-core
7169 (name "java-ops4j-pax-exam-core")
7173 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.exam2/"
7174 "archive/exam-reactor-" version ".tar.gz"))
7177 "08mzw8nkah3rj3vznlplnawspxhp61zgvb44ifqa1rni1cvbms2g"))))
7179 `(#:jar-name "java-ops4j-pax-exam-core.jar"
7180 #:source-dir "core/pax-exam/src/main/java"
7181 #:test-dir "core/pax-exam/src/test"))
7183 `(("slf4j" ,java-slf4j-api)
7184 ("lang" ,java-ops4j-base-lang)
7185 ("io" ,java-ops4j-base-io)
7186 ("util-property" ,java-ops4j-base-util-property)
7187 ("util-store" ,java-ops4j-base-store)
7188 ("java-osgi-core" ,java-osgi-core)))
7190 `(("junit" ,java-junit)
7191 ("hamcrest" ,java-hamcrest-core)))
7192 (build-system ant-build-system)
7193 (home-page "https://ops4j1.jira.com/wiki/spaces/PAXEXAM4/overview")
7194 (synopsis "In-Container Testing for OSGi, Java EE and CDI")
7195 (description "Pax Exam creates OSGi bundles for testing purposes. It lets
7196 the user take control of the OSGi framework, the test framework (e.g. JUnit) and
7197 the system under test at the same time.")
7198 (license license:asl2.0)))
7200 (define-public java-ops4j-pax-exam-core-spi
7202 (inherit java-ops4j-pax-exam-core)
7203 (name "java-ops4j-pax-exam-core-spi")
7205 `(#:jar-name "java-ops4j-pax-exam-spi.jar"
7206 #:source-dir "src/main/java"
7209 ;; Abstract base class, not a test
7210 "**/BaseStagedReactorTest.java"
7211 ;; Depends on org.mortbay.jetty.testwars:test-war-dump
7212 "**/WarBuilderTest.java")
7214 (modify-phases %standard-phases
7215 (add-before 'configure 'chdir
7217 ;; Tests assume we are in this directory
7218 (chdir "core/pax-exam-spi")))
7219 (add-before 'check 'fix-tests
7221 ;; One test checks that this file is present.
7222 (mkdir-p "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi")
7223 (with-output-to-file
7224 "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi/pom.properties"
7227 (string-append "artifactId = pax-exam-spi\n"
7228 "version = " ,(package-version java-ops4j-pax-exam-core-spi)))))
7229 ;; Maven puts compilation results in the target directory, while we
7230 ;; put them in the build directory.
7231 (substitute* '("src/test/java/org/ops4j/pax/exam/spi/war/WarBuilderTest.java"
7232 "src/test/java/org/ops4j/pax/exam/spi/war/WarTestProbeBuilderTest.java"
7233 "src/test/java/org/ops4j/pax/exam/spi/war/ZipBuilderTest.java")
7234 (("target") "build"))
7235 ;; One test is expected to fail, but it doesn't throw the expected exception
7236 (substitute* "src/test/java/org/ops4j/pax/exam/spi/reactors/BaseStagedReactorTest.java"
7237 (("AssertionError") "IllegalArgumentException")))))))
7239 `(("java-ops4j-pax-exam-core" ,java-ops4j-pax-exam-core)
7240 ("lang" ,java-ops4j-base-lang)
7241 ("monitors" ,java-ops4j-base-monitors)
7242 ("store" ,java-ops4j-base-store)
7243 ("io" ,java-ops4j-base-io)
7244 ("spi" ,java-ops4j-base-spi)
7245 ("osgi" ,java-osgi-core)
7246 ("slf4j" ,java-slf4j-api)
7247 ("tinybundles" ,java-ops4j-pax-tinybundles)))
7249 `(("mockito" ,java-mockito-1)
7250 ("junit" ,java-junit)
7251 ("hamcrest" ,java-hamcrest-core)
7252 ("cglib" ,java-cglib)
7253 ("objenesis" ,java-objenesis)
7254 ("asm" ,java-asm)))))
7256 (define-public java-ops4j-pax-exam-core-junit
7258 (inherit java-ops4j-pax-exam-core)
7259 (name "java-ops4j-pax-exam-core-junit")
7261 `(#:jar-name "ops4j-pax-exam-core-junit.jar"
7262 #:source-dir "drivers/pax-exam-junit4/src/main/java"
7263 #:tests? #f)); no tests
7265 `(("junit" ,java-junit)
7266 ("slf4j" ,java-slf4j-api)
7267 ("core" ,java-ops4j-pax-exam-core)
7268 ("spi" ,java-ops4j-pax-exam-core-spi)))
7269 (native-inputs '())))
7271 (define-public java-fasterxml-jackson-annotations
7273 (name "java-fasterxml-jackson-annotations")
7277 (uri (string-append "https://github.com/FasterXML/"
7278 "jackson-annotations/archive/"
7279 "jackson-annotations-" version ".tar.gz"))
7282 "0mr95xd0da6a4g95zvrl1ryk5n5zv2rc696w3xnsr5hxk2gicfc4"))))
7283 (build-system ant-build-system)
7285 `(#:jar-name "jackson-annotations.jar"
7286 #:source-dir "src/main/java"
7287 #:test-dir "src/test"))
7289 `(("junit" ,java-junit)))
7290 (home-page "https://github.com/FasterXML/jackson-annotations")
7291 (synopsis "General purpose annotations for the Jackson Data Processor")
7292 (description "This package contains general purpose annotations for the
7293 Jackson Data Processor, used on value and handler types. The only annotations
7294 not included are ones that require dependency to the Databind package.")
7295 (license license:asl2.0)))
7297 (define-public java-fasterxml-jackson-core
7299 (name "java-fasterxml-jackson-core")
7303 (uri (string-append "https://github.com/FasterXML/"
7304 "jackson-core/archive/"
7305 "jackson-core-" version ".tar.gz"))
7308 "159hsnk17jr1gyzkf01cxvsn45srnk37g949r7364qlsr527gjgd"))))
7309 (build-system ant-build-system)
7311 `(#:jar-name "jackson-core.jar"
7312 #:source-dir "src/main/java"
7313 #:test-dir "src/test"
7316 ;; Expected failure. pom.xml excludes these
7318 ;; Base classes that have no constructor for junit
7320 "**/ConcurrencyReadTest.java"
7321 "**/ManualCharAccessTest.java"
7322 "**/ManualCharAccessTest.java"
7323 "**/TrailingCommasTest.java"
7324 "**/AsyncMissingValuesInObjectTest.java"
7325 "**/AsyncMissingValuesInArrayTest.java")
7327 (modify-phases %standard-phases
7328 (add-before 'configure 'generate-PackageVersion.java
7330 (let* ((out "src/main/java/com/fasterxml/jackson/core/json/PackageVersion.java")
7331 (in (string-append out ".in")))
7334 (("@package@") "com.fasterxml.jackson.core.json")
7335 (("@projectversion@") ,version)
7336 (("@projectgroupid@") "com.fasterxml.jackson.core")
7337 (("@projectartifactid@") "jackson-core")))))
7338 (add-before 'build 'copy-resources
7340 (copy-recursively "src/main/resources"
7342 (add-before 'check 'copy-test-resources
7344 (copy-recursively "src/test/resources"
7345 "build/test-classes"))))))
7347 `(("junit" ,java-junit)
7348 ("hamcrest" ,java-hamcrest-core)))
7349 (home-page "https://github.com/FasterXML/jackson-core")
7352 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
7354 (define-public java-fasterxml-jackson-databind
7356 (name "java-fasterxml-jackson-databind")
7360 (uri (string-append "https://github.com/FasterXML/"
7361 "jackson-databind/archive/"
7362 "jackson-databind-" version ".tar.gz"))
7365 "1zd2cw4z6kdkbx8za96xh9pyicv2a2l7y0rkcx2fqd8hv6d47s08"))))
7366 (build-system ant-build-system)
7368 `(#:jar-name "jackson-databind.jar"
7369 #:source-dir "src/main/java"
7370 #:tests? #f; requires javax.measures for which I can't find a free implementation
7372 (modify-phases %standard-phases
7373 (add-before 'configure 'generate-PackageVersion.java
7375 (let* ((out "src/main/java/com/fasterxml/jackson/databind/cfg/PackageVersion.java")
7376 (in (string-append out ".in")))
7379 (("@package@") "com.fasterxml.jackson.databind.cfg")
7380 (("@projectversion@") ,version)
7381 (("@projectgroupid@") "com.fasterxml.jackson.databind")
7382 (("@projectartifactid@") "jackson-databind")))))
7383 (add-before 'build 'copy-resources
7385 (copy-recursively "src/main/resources" "build/classes"))))))
7387 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
7388 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)))
7389 (home-page "https://github.com/FasterXML/jackson-databind")
7390 (synopsis "Data-binding functionality and tree-model for the Jackson Data Processor")
7391 (description "This package contains the general-purpose data-binding
7392 functionality and tree-model for Jackson Data Processor. It builds on core
7393 streaming parser/generator package, and uses Jackson Annotations for
7395 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
7397 (define-public java-fasterxml-jackson-modules-base-jaxb
7399 (name "java-fasterxml-jackson-modules-base-jaxb")
7403 (uri (string-append "https://github.com/FasterXML/"
7404 "jackson-modules-base/archive/"
7405 "jackson-modules-base-" version ".tar.gz"))
7408 "1wws95xi8sppp6b0k2vvjdjyynl20r1a4dwrhai08lzlria6blp5"))))
7409 (build-system ant-build-system)
7411 `(#:jar-name "jackson-modules-base-jaxb.jar"
7412 #:source-dir "jaxb/src/main/java"
7413 #:test-dir "jaxb/src/test"
7415 ;; Base class for tests
7416 (list "**/BaseJaxbTest.java")
7418 (modify-phases %standard-phases
7419 (add-before 'configure 'generate-PackageVersion.java
7421 (let* ((out (string-append "jaxb/src/main/java/com/fasterxml/"
7422 "jackson/module/jaxb/PackageVersion.java"))
7423 (in (string-append out ".in")))
7426 (("@package@") "com.fasterxml.jackson.module.jaxb")
7427 (("@projectversion@") ,version)
7428 (("@projectgroupid@") "com.fasterxml.jackson.module.jaxb")
7429 (("@projectartifactid@") "jackson-module-jaxb")))))
7430 (add-before 'build 'copy-resources
7432 (copy-recursively "jaxb/src/main/resources" "build/classes"))))))
7434 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
7435 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
7436 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)))
7438 `(("java-junit" ,java-junit)))
7439 (home-page "https://github.com/FasterXML/jackson-modules-base")
7440 (synopsis "Jaxb annotations jackson module")
7441 (description "This package is the jaxb annotations module for jackson.")
7442 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
7444 (define-public java-snakeyaml
7446 (name "java-snakeyaml")
7450 (uri (string-append "https://bitbucket.org/asomov/snakeyaml/get/v"
7452 (file-name (string-append name "-" version ".tar.gz"))
7455 "0rf5ha6w0waz50jz2479jsrbgmd0dnx0gs337m126j5z7zlmg7mg"))))
7456 (build-system ant-build-system)
7458 `(#:jar-name "java-snakeyaml.jar"
7459 #:source-dir "src/main/java"
7460 ;; Tests require velocity, a cyclic dependency, and
7461 ;; java-spring-framework-context which is not packaged.
7463 (home-page "https://bitbucket.org/asomov/snakeyaml")
7464 (synopsis "YAML processor")
7465 (description "SnakeYAML is a YAML processor for the Java Virtual Machine.")
7466 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
7468 (define-public java-fasterxml-jackson-dataformat-yaml
7470 (name "java-fasterxml-jackson-dataformat-yaml")
7474 (uri (string-append "https://github.com/FasterXML/"
7475 "jackson-dataformats-text/archive/"
7476 "jackson-dataformats-text-" version ".tar.gz"))
7479 "1hikl06khaxbg439avf442qifcadap8w0lx13f0nnhp2vh3dkbz7"))))
7480 (build-system ant-build-system)
7482 `(#:jar-name "jackson-dataformat-yaml.jar"
7483 #:source-dir "yaml/src/main/java"
7484 #:test-dir "yaml/src/test"
7485 #:test-exclude (list "**/failing/**.java")
7487 (modify-phases %standard-phases
7488 (add-before 'configure 'generate-PackageVersion.java
7490 (let* ((out "yaml/src/main/java/com/fasterxml/jackson/dataformat/yaml/PackageVersion.java")
7491 (in (string-append out ".in")))
7494 (("@package@") "com.fasterxml.jackson.dataformat.yaml")
7495 (("@projectversion@") ,version)
7496 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.yaml")
7497 (("@projectartifactid@") "jackson-dataformat-yaml"))))))))
7499 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
7500 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
7501 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)
7502 ("java-snakeyaml" ,java-snakeyaml)))
7504 `(("junit" ,java-junit)
7505 ("hamcrest" ,java-hamcrest-core)
7506 ("java-ops4j-pax-exam-core-spi" ,java-ops4j-pax-exam-core-spi)
7507 ("java-ops4j-pax-exam-core-junit" ,java-ops4j-pax-exam-core-junit)
7508 ("java-ops4j-pax-exam" ,java-ops4j-pax-exam-core)))
7509 (home-page "https://github.com/FasterXML/jackson-dataformats-text")
7510 (synopsis "Yaml backend for Jackson")
7511 (description "Dataformat backends are used to support format alternatives
7512 to JSON, supported by default. This is done by sub-classing Jackson core
7514 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
7516 (define-public java-stax2-api
7518 (name "java-stax2-api")
7522 (uri (string-append "https://github.com/FasterXML/stax2-api/archive/"
7523 "stax2-api-" version ".tar.gz"))
7526 "1amc1si0l0hyyw2sawmnzy4hkna3z6fp195y4nm5m9wb9ld5awkq"))))
7527 (build-system ant-build-system)
7529 `(#:jar-name "java-stax2-api.jar"
7530 #:source-dir "src/main/java"
7531 #:tests? #f)); no tests
7532 (home-page "https://github.com/FasterXML/stax2-api")
7533 (synopsis "Stax2 API")
7534 (description "Stax2 API is an extension to basic Stax 1.0 API that adds
7535 significant new functionalities, such as full-featured bi-direction validation
7536 interface and high-performance Typed Access API.")
7537 (license license:bsd-2)))
7539 (define-public java-woodstox-core
7541 (name "java-woodstox-core")
7545 (uri (string-append "https://github.com/FasterXML/woodstox/archive/"
7546 "woodstox-core-" version ".tar.gz"))
7549 "1i7pdgb8jbw6gdy5kmm0l6rz109n2ns92pqalpyp24vb8vlvdfd4"))))
7550 (build-system ant-build-system)
7552 `(#:jar-name "woodstox.jar"
7554 (list "**/Base*.java" "failing/**")
7556 (modify-phases %standard-phases
7557 (add-before 'build 'remove-msv-dep
7559 ;; we don't need osgi, and it depends on msv
7560 (delete-file-recursively "src/main/java/com/ctc/wstx/osgi")
7561 ;; msv's latest release is from 2011 and we don't need it
7562 (delete-file-recursively "src/main/java/com/ctc/wstx/msv")
7563 (delete-file-recursively "src/test/java/wstxtest/osgi")
7564 (delete-file-recursively "src/test/java/wstxtest/msv")))
7565 (add-before 'build 'copy-resources
7567 (copy-recursively "src/main/resources" "build/classes"))))))
7569 `(("stax2" ,java-stax2-api)))
7571 `(("junit" ,java-junit)))
7572 (home-page "https://github.com/FasterXML/woodstox")
7573 (synopsis "Stax XML API implementation")
7574 (description "Woodstox is a stax XML API implementation.")
7575 (license license:asl2.0)))
7577 (define-public java-fasterxml-jackson-dataformat-xml
7579 (name "java-fasterxml-jackson-dataformat-xml")
7583 (uri (string-append "https://github.com/FasterXML/"
7584 "jackson-dataformat-xml/archive/"
7585 "jackson-dataformat-xml-" version ".tar.gz"))
7588 "111fkkl90w31jbf30kgj82qdcxlw4sxppki7i198liw0ck1jcavq"))))
7589 (build-system ant-build-system)
7591 `(#:jar-name "jackson-dataformat-xml.jar"
7592 #:source-dir "src/main/java"
7594 (list "**/failing/**")
7596 (modify-phases %standard-phases
7597 (add-before 'configure 'generate-PackageVersion.java
7599 (let* ((out "src/main/java/com/fasterxml/jackson/dataformat/xml/PackageVersion.java")
7600 (in (string-append out ".in")))
7604 (("@package@") "com.fasterxml.jackson.dataformat.xml")
7605 (("@projectversion@") ,version)
7606 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.xml")
7607 (("@projectartifactid@") "jackson-dataformat-xml")))))
7608 (add-before 'build 'copy-resources
7610 (copy-recursively "src/main/resources" "build/classes"))))))
7612 `(("jackson-annotations" ,java-fasterxml-jackson-annotations)
7613 ("jackson-core" ,java-fasterxml-jackson-core)
7614 ("jackson-modules-base-jaxb" ,java-fasterxml-jackson-modules-base-jaxb)
7615 ("jackson-databind" ,java-fasterxml-jackson-databind)
7616 ("stax2-api" ,java-stax2-api)
7617 ("woodstox" ,java-woodstox-core)))
7619 `(("junit" ,java-junit)
7620 ("hamcrest" ,java-hamcrest-core)))
7621 (home-page "https://github.com/FasterXML/jackson-dataformat-xml")
7622 (synopsis "Read and write XML")
7623 (description "This package contains Jackson extension component for reading
7624 and writing XML encoded data.
7626 Further, the goal is to emulate how JAXB data-binding works with \"Code-first\"
7627 approach (that is, no support is added for \"Schema-first\" approach). Support
7628 for JAXB annotations is provided by JAXB annotation module; this module
7629 provides low-level abstractions (@code{JsonParser}, @code{JsonGenerator},
7630 @code{JsonFactory}) as well as small number of higher level overrides needed to
7631 make data-binding work.")
7632 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
7634 (define-public java-hdrhistogram
7636 (name "java-hdrhistogram")
7640 (uri (string-append "https://github.com/HdrHistogram/HdrHistogram/"
7641 "archive/HdrHistogram-" version ".tar.gz"))
7644 "1sicbmc3sr42nw93qbkb26q9rn33ag33k6k77phjc3j5h5gjffqv"))))
7645 (build-system ant-build-system)
7647 `(#:jar-name "java-hdrhistogram.jar"
7648 #:source-dir "src/main/java"
7650 (modify-phases %standard-phases
7651 (add-before 'configure 'set-version
7653 (let* ((version-java "src/main/java/org/HdrHistogram/Version.java")
7654 (template (string-append version-java ".template")))
7655 (copy-file template version-java)
7656 (substitute* version-java
7657 (("\\$VERSION\\$") ,version)
7658 (("\\$BUILD_TIME\\$") "0"))
7661 `(("junit" ,java-junit)
7662 ("hamcrest" ,java-hamcrest-core)))
7663 (home-page "https://hdrhistogram.github.io/HdrHistogram")
7664 (synopsis "High dynamic range histogram")
7665 (description "Hdrhistogram allows to create histograms that support
7666 recording and analyzing sampled data value counts across a configurable integer
7667 value range with configurable value precision within the range. Value precision
7668 is expressed as the number of significant digits in the value recording, and
7669 provides control over value quantization behavior across the value range and
7670 the subsequent value resolution at any given level.")
7671 (license license:public-domain)))
7673 (define-public java-cofoja
7675 (name "java-cofoja")
7680 (url "https://github.com/nhatminhle/cofoja.git")
7681 (commit (string-append "v" version))))
7682 (file-name (string-append "java-cofoja-" version "-checkout"))
7685 "0p7sz8y5xgpi5rx1qwn6587fkd52qr3ha3ybh14gqcyxhikl525w"))))
7686 (build-system ant-build-system)
7688 `(#:build-target "dist"
7689 #:test-target "test"
7692 (list "-Ddist.dir=dist")
7693 #:modules ((guix build ant-build-system)
7694 (guix build java-utils)
7699 (modify-phases %standard-phases
7700 ;; The bulid system ignores the class path the ant-build-system sets
7701 ;; up and instead expects to find all dependencies in the "lib"
7703 (add-after 'unpack 'create-libdir
7704 (lambda* (#:key inputs #:allow-other-keys)
7708 (let ((target (string-append "lib/" (basename file))))
7709 (unless (file-exists? target)
7710 (symlink file target))))
7711 (append-map (match-lambda
7713 (find-files dir "\\.jar$")))
7716 (replace 'install (install-jars "dist")))))
7718 `(("java-asm" ,java-asm)))
7720 `(("java-junit" ,java-junit)))
7721 (home-page "https://github.com/nhatminhle/cofoja")
7722 (synopsis "Contracts for Java")
7723 (description "Contracts for Java, or Cofoja for short, is a contract
7724 programming framework and test tool for Java, which uses annotation processing
7725 and bytecode instrumentation to provide run-time checking. (In particular,
7726 this is not a static analysis tool.)")
7727 (license license:lgpl3+)))
7729 (define-public java-aopalliance
7731 (name "java-aopalliance")
7735 ;; Note: this git repository is not official, but contains the
7736 ;; source code that is in the CVS repository. Downloading the
7737 ;; tarball from sourceforge is undeterministic, and the cvs download
7740 (url "https://github.com/hoverruan/aopalliance")
7741 (commit "0d7757ae204e5876f69431421fe9bc2a4f01e8a0")))
7742 (file-name (string-append name "-" version))
7745 "0rsg2b0v3hxlq2yk1i3m2gw3xwq689j3cwx9wbxvqfpdcjbca0qr"))))
7746 (build-system ant-build-system)
7748 `(#:jar-name "java-aopalliance.jar"
7750 #:tests? #f; no tests
7751 #:source-dir "aopalliance/src/main"))
7752 (home-page "http://aopalliance.sourceforge.net")
7753 (synopsis "Aspect-Oriented Programming")
7754 (description "The AOP Alliance project is a joint project between several
7755 software engineering people who are interested in Aspect-Oriented Programming
7757 (license license:public-domain)))
7759 (define-public java-javax-inject
7761 (name "java-javax-inject")
7765 (uri (string-append "https://github.com/javax-inject/javax-inject/"
7766 "archive/javax.inject-" version ".tar.gz"))
7769 "1ydrlvh2r7vr1g7lhjwy3w2dggpj9h6pix1lakkkgdywb365n6g0"))))
7770 (build-system ant-build-system)
7772 `(#:jar-name "java-javax-inject.jar"
7774 #:tests? #f)); no tests
7775 (home-page "http://github.com/javax-inject/javax-inject")
7776 (synopsis "JSR-330: Dependency Injection for Java")
7777 (description "This package specifies a means for obtaining objects in such
7778 a way as to maximize reusability, testability and maintainability compared to
7779 traditional approaches such as constructors, factories, and service locators
7780 (e.g., JNDI). This process, known as dependency injection, is beneficial to
7781 most nontrivial applications.
7783 Many types depend on other types. For example, a @var{Stopwatch} might depend
7784 on a @var{TimeSource}. The types on which a type depends are known as its
7785 dependencies. The process of finding an instance of a dependency to use at run
7786 time is known as resolving the dependency. If no such instance can be found,
7787 the dependency is said to be unsatisfied, and the application is broken.")
7788 (license license:asl2.0)))
7790 (define-public java-guice
7796 (uri (string-append "https://github.com/google/guice/archive/"
7798 (file-name (string-append name "-" version ".tar.gz"))
7801 "0dwmqjzlavb144ywqqglj3h68hqszkff8ai0a42hyb5il0qh4rbp"))))
7802 (build-system ant-build-system)
7804 `(#:jar-name "java-guice.jar"
7806 #:tests? #f; FIXME: tests are not in a java sub directory
7807 #:source-dir "core/src"))
7809 `(("guava" ,java-guava)
7810 ("java-cglib" ,java-cglib)
7811 ("java-aopalliance" ,java-aopalliance)
7812 ("java-javax-inject" ,java-javax-inject)
7813 ("java-asm" ,java-asm)))
7814 (home-page "https://github.com/google/guice")
7815 (synopsis "Lightweight dependency injection framework")
7816 (description "Guice is a lightweight dependency injection framework fo
7818 (license license:asl2.0)))
7820 (define-public java-guice-servlet
7822 (inherit java-guice)
7823 (name "java-guice-servlet")
7825 `(#:jar-name "guice-servlet.jar"
7826 #:source-dir "extensions/servlet/src/"
7828 #:tests? #f)); FIXME: not in a java subdir
7830 `(("guice" ,java-guice)
7831 ("servlet" ,java-tomcat)
7832 ,@(package-inputs java-guice)))))
7834 (define-public java-assertj
7836 (name "java-assertj")
7840 (uri (string-append "https://github.com/joel-costigliola/"
7841 "assertj-core/archive/"
7842 "assertj-core-" version ".tar.gz"))
7845 "1kf124fxskf548rklkg86294w2x6ajqrff94rrhyqns31danqkfz"))))
7846 (build-system ant-build-system)
7848 `(#:jar-name "java-assertj.jar"
7850 #:source-dir "src/main/java"
7851 #:tests? #f)); depends on tng-junit which depends on assertj
7853 `(("cglib" ,java-cglib)
7854 ("junit" ,java-junit)
7855 ("hamcrest" ,java-hamcrest-core)))
7857 `(("mockito" ,java-mockito-1)))
7858 (home-page "https://joel-costigliola.github.io/assertj/index.html")
7859 (synopsis "Fluent assertions for java")
7860 (description "AssertJ core is a Java library that provides a fluent
7861 interface for writing assertions. Its main goal is to improve test code
7862 readability and make maintenance of tests easier.")
7863 (license license:asl2.0)))
7865 (define-public java-jboss-javassist
7867 (name "java-jboss-javassist")
7871 (uri (string-append "https://github.com/jboss-javassist/javassist/"
7873 (string-map (lambda (x) (if (eq? x #\.) #\_ x)) version)
7877 "10lpcr3sbf7y6fq6fc2h2ik7rqrivwcy4747bg0kxhwszil3cfmf"))))
7878 (build-system ant-build-system)
7880 `(#:jar-name "java-jboss-javassist.jar"
7882 #:source-dir "src/main"
7883 #:tests? #f; FIXME: requires junit-awtui and junit-swingui from junit3
7885 (modify-phases %standard-phases
7886 (add-before 'configure 'remove-binary
7888 (delete-file "javassist.jar")
7891 `(("junit" ,java-junit)))
7892 (home-page "https://github.com/jboss-javassist/javassist")
7893 (synopsis "Java bytecode engineering toolkit")
7894 (description "Javassist (JAVA programming ASSISTant) makes Java bytecode
7895 manipulation simple. It is a class library for editing bytecodes in Java; it
7896 enables Java programs to define a new class at runtime and to modify a class
7897 file when the JVM loads it.")
7898 (license (list license:gpl2 license:cddl1.0)))); either gpl2 only or cddl.
7900 (define-public java-jcommander
7902 (name "java-jcommander")
7906 (uri (string-append "https://github.com/cbeust/jcommander/archive/"
7908 (file-name (string-append name "-" version ".tar.gz"))
7911 "1f5k2ckay6qjc3d3w3d7bc0p3cx3c7n6p6zxvw1kibqdr0q98wlx"))))
7912 (build-system ant-build-system)
7914 `(#:jar-name "java-jcommander.jar"
7916 #:tests? #f; requires testng which depends on jcommander
7917 #:source-dir "src/main/java"))
7918 (home-page "http://jcommander.org")
7919 (synopsis "Command line parameters parser")
7920 (description "JCommander is a very small Java framework that makes it
7921 trivial to parse command line parameters. Parameters are declared with
7923 (license license:asl2.0)))
7925 (define-public java-bsh
7931 (uri (string-append "https://github.com/beanshell/beanshell/archive/"
7933 (file-name (string-append name "-" version ".tar.gz"))
7936 "1bawkxk6jyc75hxvzkpz689h73cn3f222m0ar3nvb0dal2b85kfv"))))
7937 (build-system ant-build-system)
7939 `(#:build-target "jarall"
7940 #:test-target "junit-tests-all"
7942 (modify-phases %standard-phases
7944 (lambda* (#:key outputs #:allow-other-keys)
7945 (let ((share (string-append (assoc-ref outputs "out") "/share/java")))
7947 (copy-file "dist/bsh-2.0b6.jar" (string-append share "/bsh-2.0b6.jar"))
7949 (home-page "http://beanshell.org/")
7950 (synopsis "Lightweight Scripting for Java")
7951 (description "BeanShell is a small, free, embeddable Java source
7952 interpreter with object scripting language features, written in Java.
7953 BeanShell dynamically executes standard Java syntax and extends it with common
7954 scripting conveniences such as loose types, commands, and method closures like
7955 those in Perl and JavaScript.")
7956 (license license:asl2.0)))
7958 (define-public java-fest-util
7960 (name "java-fest-util")
7964 (uri (string-append "https://github.com/alexruiz/fest-util/"
7965 "archive/fest-util-" version ".tar.gz"))
7968 "05g6hljz5mdaakk8d7g32klbhz9bdwp3qlj6rdaggdidxs3x1sb8"))))
7969 (build-system ant-build-system)
7971 `(#:jar-name "java-fest-util.jar"
7972 #:source-dir "src/main/java"))
7974 `(("junit" ,java-junit)
7975 ("hamcrest" ,java-hamcrest-core)))
7976 (home-page "https://github.com/alexruiz/fest-util")
7977 (synopsis "FEST common utilities")
7978 (description "Common utilities used in all FEST module.")
7979 (license license:asl2.0)))
7981 (define-public java-fest-test
7983 (name "java-fest-test")
7987 (uri (string-append "https://github.com/alexruiz/fest-test/"
7988 "archive/fest-test-" version ".tar.gz"))
7991 "1rxfbw6l9vc65iy1x3fb617qc6y4w2k430pgf1mfbxfdlxbm0f7g"))))
7992 (build-system ant-build-system)
7994 `(#:jar-name "java-fest-test.jar"
7995 #:source-dir "src/main/java"
7996 #:tests? #f)); no tests
7998 `(("junit" ,java-junit)))
7999 (home-page "https://github.com/alexruiz/fest-test")
8000 (synopsis "Common FEST testing infrastructure")
8001 (description "Fest-test contains the common FEST testing infrastructure.")
8002 (license license:asl2.0)))
8004 (define-public java-fest-assert
8006 (name "java-fest-assert")
8010 (uri (string-append "https://github.com/alexruiz/fest-assert-2.x/"
8011 "archive/fest-assert-core-" version ".tar.gz"))
8014 "1bi0iqavikzww6rxvz5jyg7y6bflv95s6ibryxx0xfcxrrw6i5lw"))))
8015 (build-system ant-build-system)
8017 `(#:jar-name "java-fest-assert.jar"
8018 #:source-dir "src/main/java"
8023 ;; Unable to set MockitoNamingPolicy on cglib generator which creates FastClasses
8024 "**/MessageFormatter_format_Test.java"
8025 "**/internal/*/*_assert*_Test.java")))
8027 `(("java-fest-util" ,java-fest-util)))
8029 `(("java-junit" ,java-junit)
8030 ("java-fest-test" ,java-fest-test)
8031 ("java-hamcrest-core" ,java-hamcrest-core)
8032 ("java-mockito" ,java-mockito-1)
8033 ("java-cglib" ,java-cglib)
8034 ("java-objenesis" ,java-objenesis)
8035 ("java-asm" ,java-asm)))
8036 (home-page "https://github.com/alexruiz/fest-assert-2.x")
8037 (synopsis "FEST fluent assertions")
8038 (description "FEST-Assert provides a fluent interface for assertions.")
8039 (license license:asl2.0)))
8041 (define-public java-testng
8043 (name "java-testng")
8048 (url "https://github.com/cbeust/testng.git")
8050 (file-name (string-append name "-" version "-checkout"))
8053 "0y6vq30i5g276kw0v2bhbvci22ijg7ax49ap2611yqlhbs4d6dqv"))))
8054 (build-system ant-build-system)
8056 `(#:jdk ,icedtea-8; java.util.function
8057 #:jar-name "java-testng.jar"
8058 #:source-dir "src/main/java"
8060 (modify-phases %standard-phases
8061 ;; FIXME: I don't know why these tests fail
8062 (add-after 'unpack 'delete-failing-tests
8064 (substitute* "src/test/resources/testng.xml"
8065 (("<class name=\"test.configuration.github1625.TestRunnerIssue1625\"/>") "")
8066 (("<class name=\"test.serviceloader.ServiceLoaderTest\" />") ""))
8068 ;; We don't have groovy
8069 (add-after 'unpack 'delete-groovy-tests
8071 (delete-file-recursively "src/test/java/test/dependent/issue1648/")
8072 (substitute* "src/test/resources/testng.xml"
8073 (("<class name=\"test.dependent.issue1648.TestRunner\"/>") ""))
8075 (add-before 'build 'copy-resources
8077 (copy-recursively "src/main/resources" "build/classes")
8079 (add-before 'check 'copy-test-resources
8081 (copy-recursively "src/test/resources" "build/test-classes")
8085 (system* "ant" "compile-tests")
8086 ;; we don't have groovy
8087 (substitute* "src/test/resources/testng.xml"
8088 (("<class name=\"test.groovy.GroovyTest\" />") ""))
8089 (zero? (system* "java" "-cp" (string-append (getenv "CLASSPATH")
8091 ":build/test-classes")
8092 "-Dtest.resources.dir=src/test/resources"
8093 "org.testng.TestNG" "src/test/resources/testng.xml")))))))
8095 `(("junit" ,java-junit)
8096 ("java-jsr305" ,java-jsr305)
8097 ("java-bsh" ,java-bsh)
8098 ("java-jcommander" ,java-jcommander)
8099 ("java-guice" ,java-guice)
8100 ("snakeyaml" ,java-snakeyaml)))
8102 `(("guava" ,java-guava)
8103 ("java-javax-inject" ,java-javax-inject)
8104 ("java-hamcrest" ,java-hamcrest-all)
8105 ("java-assertj" ,java-assertj)
8106 ("java-mockito" ,java-mockito-1)
8107 ("cglib" ,java-cglib)
8109 ("aopalliance" ,java-aopalliance)))
8110 (home-page "http://testng.org")
8111 (synopsis "Testing framework")
8112 (description "TestNG is a testing framework inspired from JUnit and NUnit
8113 but introducing some new functionalities that make it more powerful and easier
8115 (license license:asl2.0)))
8117 (define-public java-jnacl
8118 (let ((commit "094e819afdd63ea81a499b3bcb42a271006bebd9")
8122 (version (string-append "0.1.0-" revision "." (string-take commit 7)))
8126 (url "https://github.com/neilalexander/jnacl.git")
8128 (file-name (git-file-name name version))
8131 "1d6g6xhn83byv5943n7935wwjsk0ibk0qdvqgr699qqgqqmwisbb"))))
8132 (build-system ant-build-system)
8134 `(#:jar-name "jnacl.jar"
8135 #:source-dir "src/main/java"
8138 (modify-phases %standard-phases
8139 (add-before 'build 'fix-tests
8141 (substitute* '("src/test/java/com/neilalexander/jnacl/NaClTest.java"
8142 "src/test/java/com/neilalexander/jnacl/NaclSecretBoxTest.java")
8143 (("assertions.Assertions") "assertions.api.Assertions"))
8147 (invoke "ant" "compile-tests")
8148 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
8150 ":build/test-classes")
8151 "org.testng.TestNG" "-testclass"
8152 "build/test-classes/com/neilalexander/jnacl/NaclSecretBoxTest.class")
8153 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
8155 ":build/test-classes")
8156 "org.testng.TestNG" "-testclass"
8157 "build/test-classes/com/neilalexander/jnacl/NaClTest.class")
8160 `(("java-testng" ,java-testng)
8161 ("java-fest-util" ,java-fest-util)
8162 ("java-fest-assert" ,java-fest-assert)))
8163 (home-page "https://github.com/neilalexander/jnacl")
8164 (synopsis "Java implementation of NaCl")
8165 (description "Pure Java implementation of the NaCl: Networking and
8166 Cryptography library.")
8167 (license license:bsd-2))))
8169 (define-public java-mvel2
8175 (uri (string-append "https://github.com/mvel/mvel/archive/mvel2-"
8176 version ".Final.tar.gz"))
8179 "01ph5s9gm16l2qz58lg21w6fna7xmmrj7f9bzqr1jim7h9557d3z"))))
8180 (build-system ant-build-system)
8182 `(#:jar-name "mvel2.jar"
8183 #:source-dir "src/main/java"
8185 (list "**/Abstract*.java"
8186 ;; Base class with no tests
8187 "**/MVELThreadTest.java")
8189 (modify-phases %standard-phases
8190 (add-after 'install 'install-bin
8191 (lambda* (#:key outputs #:allow-other-keys)
8192 (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
8194 (with-output-to-file (string-append bin "/mvel2")
8198 "#!" (which "bash") "\n"
8199 "if [ \"$#\" -ne \"2\" ]; then\n"
8200 "echo 'Usage: mvel2 <script> <out.dir>'\n"
8203 "java -Dout.dir=$2 -cp " (getenv "CLASSPATH")
8204 ":" (assoc-ref outputs "out") "/share/java/mvel2.jar"
8205 " org.mvel2.sh.Main $1"))))
8206 (chmod (string-append bin "/mvel2") #o755))
8209 `(("junit" ,java-junit)
8210 ("hamcrest" ,java-hamcrest-core)))
8211 (home-page "https://github.com/mvel/mvel")
8212 (synopsis "MVFLEX Expression Language")
8213 (description "MVEL has largely been inspired by Java syntax, but has some
8214 fundamental differences aimed at making it more efficient as an expression
8215 language, such as operators that directly support collection, array and string
8216 matching, as well as regular expressions. MVEL is used to evaluate expressions
8217 written using Java syntax.
8219 In addition to the expression language, MVEL serves as a templating language for
8220 configuration and string construction.")
8221 (license license:asl2.0)))
8223 (define-public java-commons-jexl-2
8225 (name "java-commons-jexl")
8229 (uri (string-append "mirror://apache/commons/jexl/source/"
8230 "commons-jexl-" version "-src.tar.gz"))
8233 "1ai7632bwwaxglb0nbpblpr2jw5g20afrsaq372ipkphi3ncy1jz"))))
8234 (build-system ant-build-system)
8236 `(#:jar-name "commons-jexl-2.jar"
8238 #:source-dir "src/main/java"
8240 (modify-phases %standard-phases
8241 (add-before 'check 'disable-broken-tests
8242 (lambda* (#:key inputs #:allow-other-keys)
8243 (with-directory-excursion "src/test/java/org/apache/commons/jexl2/"
8244 (substitute* "ArithmeticTest.java"
8245 (("asserter.assertExpression\\(\"3 / 0\"") "//")
8246 (("asserter.assertExpression\\(\"imanull") "//"))
8247 ;; This test fails with "ambiguous method invocation"
8248 (delete-file "CacheTest.java")
8249 ;; This test doesn't have access to the temp directory
8250 (substitute* "ClassCreatorTest.java"
8251 (("java.io.tmpdir") "user.dir"))
8252 ;; This test fails in trying to detect whether it can run.
8253 (substitute* "ClassCreator.java"
8254 (("boolean canRun =.*") "boolean canRun = false;\n"))
8255 ;; ...and these tests depend on it.
8256 (delete-file "scripting/JexlScriptEngineOptionalTest.java")
8257 (delete-file "scripting/JexlScriptEngineTest.java"))
8259 (add-before 'build 'run-javacc
8261 (with-directory-excursion "src/main/java/org/apache/commons/jexl2/parser/"
8262 (invoke "java" "jjtree" "Parser.jjt")
8263 (invoke "java" "javacc" "Parser.jj"))
8266 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)))
8268 `(("java-junit" ,java-junit)
8269 ("java-hamcrest-core" ,java-hamcrest-core)
8270 ("javacc" ,javacc-4)))
8271 (home-page "https://commons.apache.org/proper/commons-jexl/")
8272 (synopsis "Java Expression Language ")
8273 (description "JEXL is a library intended to facilitate the implementation
8274 of dynamic and scripting features in applications and frameworks written in
8275 Java. JEXL implements an Expression Language based on some extensions to the
8276 JSTL Expression Language supporting most of the constructs seen in
8277 shell-script or ECMAScript. Its goal is to expose scripting features usable
8278 by technical operatives or consultants working with enterprise platforms.")
8279 (license license:asl2.0)))
8281 (define-public java-lz4
8287 (uri (string-append "https://github.com/lz4/lz4-java/archive/"
8289 (file-name (string-append name "-" version ".tar.gz"))
8292 "096dm57p2lzqk28n0j2p52x2j3cvnsd2dfqn43n7vbwrkjsy7y54"))))
8293 (build-system ant-build-system)
8295 `(#:jar-name "lz4.jar"
8297 #:source-dir "src/java:src/java-unsafe"
8298 #:tests? #f; FIXME: requires more dependencies
8300 (modify-phases %standard-phases
8301 (add-before 'configure 'generate-source
8303 (with-directory-excursion "src/build/source_templates"
8304 (invoke "mvel2" "../gen_sources.mvel" "../../java"))
8307 `(("mvel" ,java-mvel2)))
8308 (home-page "https://jpountz.github.io/lz4-java")
8309 (synopsis "Compression algorithm")
8310 (description "LZ4 - Java is a Java port of the popular lz4 compression
8311 algorithms and xxHash hashing algorithm.")
8312 (license license:asl2.0)))
8314 (define-public java-bouncycastle
8316 (name "java-bouncycastle")
8320 (uri (string-append "https://github.com/bcgit/bc-java/archive/r"
8321 (substring version 0 1) "rv"
8322 (substring version 2 4) ".tar.gz"))
8325 "1bwl499whlbq896w18idqw2dkp8v0wp0npv9g71i5fgf8xjh0k3q"))
8326 (modules '((guix build utils)))
8329 (for-each delete-file
8330 (find-files "." "\\.jar$"))
8332 (build-system ant-build-system)
8337 (modify-phases %standard-phases
8340 (invoke "ant" "-f" "ant/jdk15+.xml" "build-provider")
8341 (invoke "ant" "-f" "ant/jdk15+.xml" "build")
8343 ;; FIXME: the tests freeze.
8346 ;; (invoke "ant" "-f" "ant/jdk15+.xml" "test")))
8348 (install-jars "build/artifacts/jdk1.5/jars")))))
8350 `(("java-javax-mail" ,java-javax-mail)))
8353 ("junit" ,java-junit)
8354 ("java-native-access" ,java-native-access)
8355 ("java-native-access-platform" ,java-native-access-platform)))
8356 (home-page "https://www.bouncycastle.org")
8357 (synopsis "Cryptographic library")
8358 (description "Bouncy Castle is a cryptographic library for the Java
8359 programming language.")
8360 (license license:expat)))
8362 (define-public java-lmax-disruptor
8364 (name "java-lmax-disruptor")
8368 (uri (string-append "https://github.com/LMAX-Exchange/disruptor/"
8369 "archive/" version ".tar.gz"))
8370 (file-name (string-append name "-" version ".tar.gz"))
8373 "17da2gwj5abnlsfgn2xqjk5lgzbg4vkb0hdv2dvc8r2fx4bi7w3g"))))
8374 (build-system ant-build-system)
8376 `(#:jar-name "java-lmax-disruptor.jar"
8378 #:tests? #f)); tests hang
8380 `(("junit" ,java-junit)
8381 ("java-hdrhistogram" ,java-hdrhistogram)
8382 ("java-jmock" ,java-jmock)
8383 ("java-jmock-legacy" ,java-jmock-legacy)
8384 ("java-jmock-junit4" ,java-jmock-junit4)
8385 ("java-hamcrest-all" ,java-hamcrest-all)))
8387 `(("cglib" ,java-cglib)
8388 ("objenesis" ,java-objenesis)
8390 (home-page "https://www.lmax.com/disruptor")
8391 (synopsis "High performance inter-thread communication")
8392 (description "LMAX Disruptor is a software pattern and software component
8393 for high performance inter-thread communication that avoids the need for
8394 message queues or resource locking.")
8395 (license license:asl2.0)))
8397 (define-public java-commons-bcel
8399 (name "java-commons-bcel")
8403 (uri (string-append "mirror://apache/commons/bcel/source/bcel-"
8404 version "-src.tar.gz"))
8407 "0j3x1rxd673k07psclk8k13rqh0x0mf2yy5qiwkiw4z3afa568jy"))))
8408 (build-system ant-build-system)
8410 `(#:jar-name "bcel.jar"
8412 #:source-dir "src/main/java"
8413 #:test-dir "src/test/java"
8414 ;; FIXME: Tests require the unpackaged jna.
8416 (home-page "https://commons.apache.org/proper/commons-bcel/")
8417 (synopsis "Byte code engineering library")
8418 (description "The Byte Code Engineering Library (Apache Commons BCEL) is
8419 intended to give users a convenient way to analyze, create, and
8420 manipulate (binary) Java class files. Classes are represented by objects
8421 which contain all the symbolic information of the given class: methods, fields
8422 and byte code instructions, in particular.
8424 Such objects can be read from an existing file, be transformed by a
8425 program (e.g. a class loader at run-time) and written to a file again. An
8426 even more interesting application is the creation of classes from scratch at
8427 run-time. The @dfn{Byte Code Engineering Library} (BCEL) may be also useful
8428 if you want to learn about the @dfn{Java Virtual Machine} (JVM) and the format
8429 of Java @code{.class} files.")
8430 (license license:asl2.0)))
8432 (define-public java-xerial-core
8434 (name "java-xerial-core")
8438 (uri (string-append "https://github.com/xerial/xerial-java/archive/"
8440 (file-name (string-append name "-" version ".tar.gz"))
8443 "0d3g863i41bgalpa4xr3vm1h140l091n8iwgq5qvby5yivns9y8d"))))
8444 (build-system ant-build-system)
8446 `(#:jar-name "xerial-core.jar"
8447 #:source-dir "xerial-core/src/main/java"
8448 #:test-dir "xerial-core/src/test"
8450 (modify-phases %standard-phases
8451 (add-before 'build 'copy-resources
8453 (copy-recursively "xerial-core/src/main/resources"
8457 `(("junit" ,java-junit)
8458 ("hamcrest" ,java-hamcrest-core)))
8459 (home-page "https://github.com/xerial/xerial-java")
8460 (synopsis "Data management libraries for Java")
8461 (description "Xerial is a set of data management libraries for the Java
8462 programming language. The ultimate goal of the Xerial project is to manage
8463 everything as database, including class objects, text format data, data
8465 (license license:asl2.0)))
8467 (define-public java-powermock-reflect
8469 (name "java-powermock-reflect")
8473 (uri (string-append "https://github.com/powermock/powermock/"
8474 "archive/powermock-" version ".tar.gz"))
8475 (file-name (string-append name "-" version ".tar.gz"))
8478 "0sbgi5vqq7k72wzcdjb20s370vyd4hsbnx71pzb8ishml3gy7fwy"))
8480 (search-patches "java-powermock-fix-java-files.patch"))))
8481 (build-system ant-build-system)
8483 `(#:jar-name "java-powermock-reflect.jar"
8485 #:source-dir "powermock-reflect/src/main/java"
8486 #:test-dir "powermock-reflect/src/test"))
8488 `(("java-objenesis" ,java-objenesis)))
8490 `(("junit" ,java-junit)
8491 ("cglib" ,java-cglib)
8493 ("hamcrest" ,java-hamcrest-core)
8494 ("assertj" ,java-assertj)))
8495 (home-page "https://github.com/powermock/powermock")
8496 (synopsis "Mock library extension framework")
8497 (description "PowerMock is a framework that extends other mock libraries
8498 such as EasyMock with more powerful capabilities. PowerMock uses a custom
8499 classloader and bytecode manipulation to enable mocking of static methods,
8500 constructors, final classes and methods, private methods, removal of static
8501 initializers and more. By using a custom classloader no changes need to be
8502 done to the IDE or continuous integration servers which simplifies adoption.")
8503 (license license:asl2.0)))
8505 (define-public java-powermock-core
8507 (inherit java-powermock-reflect)
8508 (name "java-powermock-core")
8510 `(#:jar-name "java-powermock-core.jar"
8511 #:source-dir "powermock-core/src/main/java"
8512 #:test-dir "powermock-core/src/test"
8513 #:tests? #f; requires powermock-api
8516 (modify-phases %standard-phases
8517 (add-before 'build 'copy-resources
8519 (copy-recursively "powermock-core/src/main/resources"
8520 "build/classes"))))))
8522 `(("reflect" ,java-powermock-reflect)
8523 ("javassist" ,java-jboss-javassist)))
8525 `(("junit" ,java-junit)
8526 ("assertj" ,java-assertj)
8527 ("mockito" ,java-mockito-1)))))
8529 (define-public java-powermock-api-support
8531 (inherit java-powermock-reflect)
8532 (name "java-powermock-api-support")
8533 (build-system ant-build-system)
8535 `(#:jar-name "java-powermock-api-support.jar"
8537 #:source-dir "powermock-api/powermock-api-support/src/main/java"
8538 #:tests? #f)); no tests
8540 `(("core" ,java-powermock-core)
8541 ("reflect" ,java-powermock-reflect)))))
8543 (define-public java-powermock-modules-junit4-common
8545 (inherit java-powermock-reflect)
8546 (name "java-powermock-modules-junit4-common")
8547 (build-system ant-build-system)
8549 `(#:jar-name "java-powermock-modules-junit4-common.jar"
8551 #:source-dir "powermock-modules/powermock-module-junit4-common/src/main/java"
8552 #:test-dir "powermock-modules/powermock-module-junit4-common/src/test"))
8554 `(("core" ,java-powermock-core)
8555 ("easymock" ,java-easymock)
8556 ("reflect" ,java-powermock-reflect)
8557 ("hamcrest" ,java-hamcrest-core)
8558 ("cglib" ,java-cglib)))))
8560 (define-public java-powermock-modules-junit4
8562 (inherit java-powermock-reflect)
8563 (name "java-powermock-modules-junit4")
8564 (build-system ant-build-system)
8566 `(#:jar-name "java-powermock-modules-junit4.jar"
8568 #:source-dir "powermock-modules/powermock-module-junit4/src/main/java"
8569 #:test-dir "powermock-modules/powermock-module-junit4/src/test"
8571 (modify-phases %standard-phases
8572 (add-before 'build 'fix-junit-detection
8574 ;; Our junit version is 4.12-SNAPSHOT
8575 (substitute* (find-files "powermock-modules/powermock-module-junit4"
8576 "PowerMockJUnit4MethodValidator.java")
8577 (("4.12") "4.12-SNAPSHOT")))))))
8579 `(("core" ,java-powermock-core)
8580 ("reflect" ,java-powermock-reflect)
8581 ("common" ,java-powermock-modules-junit4-common)
8582 ("cglib" ,java-cglib)))
8584 `(("easymock" ,java-easymock)
8585 ("hamcrest" ,java-hamcrest-core)
8586 ("objenesis" ,java-objenesis)
8588 ("junit" ,java-junit)))))
8590 (define-public java-powermock-api-easymock
8592 (inherit java-powermock-reflect)
8593 (name "java-powermock-api-easymock")
8594 (build-system ant-build-system)
8596 `(#:jar-name "java-powermock-api-easymock.jar"
8598 #:source-dir "powermock-api/powermock-api-easymock/src/main/java"
8599 #:tests? #f; no tests
8601 (modify-phases %standard-phases
8602 (add-before 'build 'fix-file
8604 ;; FIXME: This looks wrong, but it fixes a build error.
8605 (with-directory-excursion "powermock-api/powermock-api-easymock"
8606 (substitute* "src/main/java/org/powermock/api/easymock/PowerMock.java"
8607 (("classLoader instanceof MockClassLoader") "false")
8608 (("\\(\\(MockClassLoader\\) classLoader\\).*;") ";")))
8611 `(("core" ,java-powermock-core)
8612 ("easymock" ,java-easymock)
8613 ("reflect" ,java-powermock-reflect)
8614 ("support" ,java-powermock-api-support)
8615 ("cglib" ,java-cglib)))))
8617 (define-public java-jboss-jms-api-spec
8619 (name "java-jboss-jms-api-spec")
8623 (uri (string-append "https://github.com/jboss/jboss-jms-api_spec/"
8624 "archive/jboss-jms-api_" version
8625 "_spec-1.0.1.Final.tar.gz"))
8628 "07bqblw9kq2i8q92bz70fvavq5xjfkaixl8xa0m0cypjgy82rb7m"))))
8629 (build-system ant-build-system)
8631 `(#:jar-name "java-jboss-jms-api_spec.jar"
8634 #:tests? #f)); no tests
8635 (home-page "https://github.com/jboss/jboss-jms-api_spec")
8636 (synopsis "Java Message Service API specification")
8637 (description "Java Message Service (JMS) API is used to send messages
8638 messages between two or more clients. It is a messaging standard that allows
8639 application components to create, send, receive, and read messages.")
8640 ; either gpl2 only with GPL Classpath Exception, or cddl.
8641 (license (list license:gpl2 license:cddl1.0))))
8643 (define-public java-mail
8649 (uri (string-append "https://github.com/javaee/javamail/archive/"
8650 "JAVAMAIL-1_6_0.tar.gz"))
8653 "1b4rg7fpj50ld90a71iz2m4gm3f5cnw18p3q3rbrrryjip46kx92"))))
8654 (build-system ant-build-system)
8656 `(#:jar-name "java-mail.jar"
8658 #:source-dir "mail/src/main/java"
8659 #:test-dir "mail/src/test"
8661 (list "**/CollectorFormatterTest.java"
8662 "**/CompactFormatterTest.java"
8663 "**/DurationFilterTest.java"
8664 "**/MailHandlerTest.java"
8665 "**/GetLocalAddressTest.java"
8666 ;; FIXME: both end with:
8667 ;; java.lang.ClassNotFoundException:
8668 ;; javax.mail.internet.MimeMultipartParseTest
8669 "**/MimeMultipartParseTest.java"
8670 "**/SearchTermSerializationTest.java")
8672 (modify-phases %standard-phases
8673 (add-before 'configure 'move-version.java
8675 (copy-file "mail/src/main/resources/javax/mail/Version.java"
8676 "mail/src/main/java/javax/mail/Version.java")
8678 (add-before 'build 'copy-resources
8680 (copy-recursively "mail/src/main/resources/META-INF"
8681 "build/classes/META-INF")
8684 `(("junit" ,java-junit)
8685 ("hamcrest" ,java-hamcrest-core)))
8686 (home-page "https://javaee.github.io/javamail/")
8687 (synopsis "Mail-related functionnalities in Java")
8688 (description "The JavaMail API provides a platform-independent and
8689 protocol-independent framework to build mail and messaging applications.")
8690 ;; General Public License Version 2 only ("GPL") or the Common Development
8691 ;; and Distribution License("CDDL")
8692 (license (list license:cddl1.1
8693 license:gpl2)))); with classpath exception
8695 (define-public java-jeromq
8697 (name "java-jeromq")
8702 (url "https://github.com/zeromq/jeromq.git")
8703 (commit (string-append "v" version))))
8704 (file-name (string-append name "-" version "-checkout"))
8707 "1gxkp7lv2ahymgrqdw94ncq54bmp4m4sw5m1x9gkp7l5bxn0xsyj"))
8708 (patches (search-patches "java-jeromq-fix-tests.patch"))))
8709 (build-system ant-build-system)
8711 `(#:jar-name "java-jeromq.jar"
8712 #:source-dir "src/main/java"
8718 "**/ZBeaconTest.java"
8720 "**/DealerSpecTest.java"
8721 "**/CustomDecoderTest.java"
8722 "**/CustomEncoderTest.java"
8723 "**/ConnectRidTest.java"
8724 "**/ReqSpecTest.java"
8725 "**/PushPullSpecTest.java"
8726 "**/PubSubHwmTest.java"
8727 "**/RouterSpecTest.java"
8728 "**/ProxyTest.java")))
8730 `(("java-jnacl" ,java-jnacl)))
8732 `(("java-hamcrest-core" ,java-hamcrest-core)
8733 ("junit" ,java-junit)))
8734 (home-page "http://zeromq.org/bindings:java")
8735 (synopsis "Java binding for 0MQ")
8736 (description "Jeromq provides the java bindings for 0MQ.")
8737 (license license:mpl2.0)))
8739 (define-public java-kafka-clients
8741 (name "java-kafka-clients")
8745 (uri (string-append "mirror://apache/kafka/" version "/kafka-"
8746 version "-src.tgz"))
8749 "1yxmnsmliwm7671q5yy9bl4jdqyyn00n26cggz9brwczx80w1vfq"))))
8750 (build-system ant-build-system)
8752 `(#:jar-name "java-kafka-clients.jar"
8754 #:source-dir "clients/src/main/java"
8755 #:test-dir "clients/src/test"
8758 ;; This file does not contain a class
8759 "**/IntegrationTest.java"
8761 "**/ClientUtilsTest.java"
8762 ;; End with errors that seem related to our powermock
8763 "**/KafkaProducerTest.java"
8764 "**/BufferPoolTest.java")))
8766 `(("java-slf4j-api" ,java-slf4j-api)
8767 ("java-lz4" ,java-lz4)))
8769 `(("junit" ,java-junit)
8770 ("hamcrest" ,java-hamcrest-all)
8771 ("objenesis" ,java-objenesis)
8773 ("cglib" ,java-cglib)
8774 ("javassist" ,java-jboss-javassist)
8775 ("snappy" ,java-snappy)
8776 ("easymock" ,java-easymock)
8777 ("powermock" ,java-powermock-core)
8778 ("powermock-easymock" ,java-powermock-api-easymock)
8779 ("powermock-junit4-common" ,java-powermock-modules-junit4-common)
8780 ("powermock-junit4" ,java-powermock-modules-junit4)
8781 ("powermock-support" ,java-powermock-api-support)
8782 ("java-bouncycastle" ,java-bouncycastle)))
8783 (home-page "https://kafka.apache.org")
8784 (synopsis "Distributed streaming platform")
8785 (description "Kafka is a distributed streaming platform, which means:
8787 @item it can publish and subscribe to streams of records;
8788 @item it can store streams of records in a fault-tolerant way;
8789 @item it can process streams of records as they occur.
8791 ;; Either cddl or gpl2 only.
8792 (license (list license:cddl1.1; actually cddl1.1
8793 license:gpl2)))); with classpath exception
8795 (define-public java-jdom
8801 (uri (string-append "http://jdom.org/dist/binary/archive/jdom-"
8805 "07wdpm3jwwc9q38kmdw40fvbmv6jzjrkrf8m0zqs58f79a672wfl"))))
8806 (build-system ant-build-system)
8808 `(#:build-target "package"
8809 #:tests? #f; tests are run as part of the build process
8811 (modify-phases %standard-phases
8813 (install-jars "build")))))
8814 (home-page "http://jdom.org/")
8815 (synopsis "Access, manipulate, and output XML data")
8816 (description "Java-based solution for accessing, manipulating, and
8817 outputting XML data from Java code.")
8818 (license license:bsd-4)))
8820 (define-public java-geronimo-xbean-reflect
8822 (name "java-geronimo-xbean-reflect")
8827 (url "https://svn.apache.org/repos/asf/geronimo/xbean/tags/xbean-4.5/")
8828 (revision 1807396)))
8829 (file-name (string-append name "-" version))
8832 "18q3i6jgm6rkw8aysfgihgywrdc5nvijrwnslmi3ww497jvri6ja"))))
8833 (build-system ant-build-system)
8835 `(#:jar-name "geronimo-xbean-reflect.jar"
8836 #:source-dir "xbean-reflect/src/main/java"
8837 #:test-dir "xbean-reflect/src/test"
8840 (list "**/Abstract*.java" "**/AsmParameterNameLoaderTest.java"
8841 "**/ObjectRecipeTest.java" "**/ParameterNameLoaderTest.java"
8842 "**/RecipeHelperTest.java" "**/XbeanAsmParameterNameLoaderTest.java")
8844 (modify-phases %standard-phases
8845 (add-before 'build 'fix-source
8847 (let ((dir "xbean-reflect/src/main/java/org/apache/xbean/recipe/"))
8848 ;; org.apache.xbean.asm6 is actually repackaged java-asm
8849 (substitute* (string-append dir "XbeanAsmParameterNameLoader.java")
8850 (("org.apache.xbean.asm5") "org.objectweb.asm"))
8854 ("log4j" ,java-log4j-api)
8855 ("log4j-1.2" ,java-log4j-1.2-api)
8856 ("log4j-core" ,java-log4j-core)
8857 ("logging" ,java-commons-logging-minimal)))
8859 `(("junit" ,java-junit)))
8860 (home-page "https://geronimo.apache.org/maven/xbean/3.6/xbean-reflect/")
8861 (synopsis "Dependency injection helper")
8862 (description "Xbean-reflect provides very flexible ways to create objects
8863 and graphs of objects for dependency injection frameworks")
8864 (license license:asl2.0)))
8866 (define-public java-geronimo-xbean-bundleutils
8868 (inherit java-geronimo-xbean-reflect)
8869 (name "java-geronimo-xbean-bundleutils")
8871 `(#:jar-name "geronimo-xbean-bundleutils.jar"
8872 #:source-dir "xbean-bundleutils/src/main/java"
8873 #:test-dir "xbean-bundleutils/src/test"
8875 (modify-phases %standard-phases
8876 (add-before 'build 'fix-java
8878 ;; We use a more recent version of osgi, so this file requires
8879 ;; more interface method implementations.
8880 (substitute* "xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/DelegatingBundleContext.java"
8881 (("import org.osgi.framework.ServiceRegistration;")
8882 "import org.osgi.framework.ServiceRegistration;
8883 import org.osgi.framework.ServiceFactory;
8884 import java.util.Collection;
8885 import org.osgi.framework.ServiceObjects;")
8886 (("public Bundle getBundle\\(\\)")
8888 public <S> ServiceObjects<S> getServiceObjects(ServiceReference<S> reference) {
8889 throw new UnsupportedOperationException();
8892 public <S> ServiceRegistration<S> registerService(Class<S> clazz,
8893 ServiceFactory<S> factory, Dictionary<String, ?> properties) {
8894 throw new UnsupportedOperationException();
8896 public Bundle getBundle()"))
8899 `(("java-slf4j" ,java-slf4j-api)
8900 ("java-asm" ,java-asm)
8901 ("java-osgi-framework" ,java-osgi-framework)
8902 ("java-eclipse-osgi" ,java-eclipse-osgi)
8903 ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin)))))
8905 (define-public java-geronimo-xbean-asm-util
8907 (inherit java-geronimo-xbean-reflect)
8908 (name "java-geronimo-xbean-asm-util")
8910 `(#:jar-name "geronimo-xbean-asm-util.jar"
8911 #:source-dir "xbean-asm-util/src/main/java"
8912 #:tests? #f)); no tests
8914 `(("java-asm" ,java-asm)))
8915 (native-inputs '())))
8917 (define-public java-geronimo-xbean-finder
8919 (inherit java-geronimo-xbean-reflect)
8920 (name "java-geronimo-xbean-finder")
8922 `(#:jar-name "geronimo-xbean-finder.jar"
8923 #:source-dir "xbean-finder/src/main/java"
8924 #:test-dir "xbean-finder/src/test"))
8926 `(("java-slf4j-api" ,java-slf4j-api)
8927 ("java-asm" ,java-asm)
8928 ("java-geronimo-xbean-bundleutils" ,java-geronimo-xbean-bundleutils)
8929 ("java-geronimo-xbean-asm-util" ,java-geronimo-xbean-asm-util)
8930 ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin)
8931 ("java-osgi-framework" ,java-osgi-framework)))
8933 `(("java-junit" ,java-junit)
8934 ("java-hamcrest-core" ,java-hamcrest-core)))))
8936 (define-public java-gson
8942 (uri (string-append "https://github.com/google/gson/archive/"
8943 "gson-parent-" version ".tar.gz"))
8946 "1j4qnp7v046q0k48c4kyf69sxaasx2h949d3cqwsm3kzxms3x0f9"))))
8947 (build-system ant-build-system)
8949 `(#:jar-name "gson.jar"
8950 #:source-dir "gson/src/main/java"
8951 #:test-dir "gson/src/test"))
8953 `(("java-junit" ,java-junit)
8954 ("java-hamcrest-core" ,java-hamcrest-core)))
8955 (home-page "https://github.com/google/gson")
8956 (synopsis "Java serialization/deserialization library from/to JSON")
8957 (description "Gson is a Java library that can be used to convert Java
8958 Objects into their JSON representation. It can also be used to convert a JSON
8959 string to an equivalent Java object. Gson can work with arbitrary Java objects
8960 including pre-existing objects that you do not have source-code of.")
8961 (license license:asl2.0)))
8963 (define-public java-hawtjni
8965 (name "java-hawtjni")
8969 (uri (string-append "https://github.com/fusesource/hawtjni/archive/"
8970 "hawtjni-project-" version ".tar.gz"))
8973 "1bqfd732rmh6svyx17fpw9175gc9gzkcbyps2yyrf50c3zzjas6g"))))
8974 (build-system ant-build-system)
8976 `(#:jar-name "hawtjni.jar"
8977 #:source-dir "hawtjni-generator/src/main/java:hawtjni-runtime/src/main/java"
8978 #:tests? #f; no tests
8980 (modify-phases %standard-phases
8981 (add-before 'build 'build-native
8982 (lambda* (#:key inputs #:allow-other-keys)
8983 (let ((include (string-append "-I" (assoc-ref inputs "jdk") "/include/linux")))
8984 (with-directory-excursion "hawtjni-generator/src/main/resources/"
8985 (invoke "gcc" "-c" "hawtjni.c" "-o" "hawtjni.o"
8986 "-fPIC" "-O2" include)
8987 (invoke "gcc" "-c" "hawtjni-callback.c" "-o" "hawtjni-callback.o"
8988 "-fPIC" "-O2" include)
8989 (invoke "gcc" "-o" "libhawtjni.so" "-shared"
8990 "hawtjni.o" "hawtjni-callback.o")))
8992 (add-after 'install 'install-native
8993 (lambda* (#:key outputs #:allow-other-keys)
8994 (let* ((out (assoc-ref outputs "out"))
8995 (lib (string-append out "/lib"))
8996 (inc (string-append out "/include")))
8997 (with-directory-excursion "hawtjni-generator/src/main/resources/"
8998 (install-file "libhawtjni.so" lib)
8999 (install-file "hawtjni.h" inc)))
9002 `(("java-commons-cli" ,java-commons-cli)
9003 ("java-asm" ,java-asm)
9004 ("java-geronimo-xbean-finder" ,java-geronimo-xbean-finder)))
9005 (home-page "https://fusesource.github.io/hawtjni/")
9006 (synopsis "JNI code generator")
9007 (description "HawtJNI is a code generator that produces the JNI code needed
9008 to implement Java native methods. It is based on the jnigen code generator
9009 that is part of the SWT Tools project.")
9010 (license license:asl2.0)))
9012 (define-public java-jansi-native
9014 (name "java-jansi-native")
9018 (uri (string-append "https://github.com/fusesource/jansi-native/"
9019 "archive/jansi-native-" version ".tar.gz"))
9022 "0j2ydlgxbzbgshqkwghbxxxnbnx1mmjgd6k5fw6xfvxw1z956yqf"))))
9023 (build-system ant-build-system)
9025 `(#:jar-name "jansi-native.jar"
9026 #:source-dir "src/main/java"
9027 #:tests? #f; no tests
9029 (modify-phases %standard-phases
9030 (add-before 'build 'build-native
9031 (lambda* (#:key inputs #:allow-other-keys)
9032 ;; there are more required files for windows in windows/
9033 (with-directory-excursion "src/main/native-package/src"
9034 (substitute* "jansi_ttyname.c"
9035 (("#include \"jansi_.*") ""))
9036 (invoke "gcc" "-c" "jansi_ttyname.c" "-o" "jansi_ttyname.o"
9037 (string-append "-I" (assoc-ref inputs "java-hawtjni")
9039 (string-append "-I" (assoc-ref inputs "jdk")
9042 (invoke "gcc" "-o" "libjansi.so" "-shared" "jansi_ttyname.o")
9044 (add-before 'build 'install-native
9046 (let ((dir (string-append "build/classes/META-INF/native/"
9047 ,(match (%current-system)
9048 ((or "i686-linux" "armhf-linux")
9050 ((or "x86_64-linux" "aarch64-linux")
9052 (install-file "src/main/native-package/src/libjansi.so" dir))
9054 (add-after 'install 'install-native
9055 (lambda* (#:key outputs #:allow-other-keys)
9056 (install-file "src/main/native-package/src/jansi.h"
9057 (string-append (assoc-ref outputs "out") "/include"))
9060 `(("java-hawtjni" ,java-hawtjni)))
9061 (home-page "https://fusesource.github.io/jansi/")
9062 (synopsis "Native library for jansi")
9063 (description "This package provides the native library for jansi, a small
9064 Java library that allows you to use ANSI escape sequences to format your
9066 (license license:asl2.0)))
9068 (define-public java-jansi
9074 (uri (string-append "https://github.com/fusesource/jansi/archive/"
9075 "jansi-project-" version ".tar.gz"))
9078 "11kh3144i3fzp21dpy8zg52mjmsr214k7km9p8ly0rqk2px0qq2z"))))
9079 (build-system ant-build-system)
9081 `(#:jar-name "jansi.jar"
9082 #:source-dir "jansi/src/main/java"
9083 #:test-dir "jansi/src/test"
9085 (modify-phases %standard-phases
9086 (add-after 'check 'clear-term
9088 (zero? (system* "echo" "-e" "\\e[0m")))))))
9090 `(("java-jansi-native" ,java-jansi-native)))
9092 `(("java-junit" ,java-junit)
9093 ("java-hamcrest-core" ,java-hamcrest-core)))
9094 (home-page "https://fusesource.github.io/jansi/")
9095 (synopsis "Portable ANSI escape sequences")
9096 (description "Jansi is a Java library that allows you to use ANSI escape
9097 sequences to format your console output which works on every platform.")
9098 (license license:asl2.0)))
9100 (define-public java-jboss-el-api-spec
9102 (name "java-jboss-el-api-spec")
9106 (uri (string-append "https://github.com/jboss/jboss-el-api_spec/"
9107 "archive/jboss-el-api_" version
9108 "_spec-1.0.7.Final.tar.gz"))
9111 "1j45ljxalwlibxl7g7iv952sjxkw275m8vyxxij8l6wdd5pf0pdh"))))
9112 (build-system ant-build-system)
9114 `(#:jar-name "java-jboss-el-api_spec.jar"
9117 `(("java-junit" ,java-junit)))
9118 (home-page "https://github.com/jboss/jboss-el-api_spec")
9119 (synopsis "JSR-341 expression language 3.0 API")
9120 (description "This package contains an implementation of the JSR-341
9121 specification for the expression language 3.0. It implements an expression
9122 language inspired by ECMAScript and XPath. This language is used with
9123 JavaServer Pages (JSP).")
9124 ;; Either GPL2 only or CDDL.
9125 (license (list license:gpl2 license:cddl1.1))))
9127 (define-public java-jboss-interceptors-api-spec
9129 (name "java-jboss-interceptors-api-spec")
9133 (uri (string-append "https://github.com/jboss/jboss-interceptors-api_spec/"
9134 "archive/jboss-interceptors-api_" version
9135 "_spec-1.0.0.Final.tar.gz"))
9138 "0wv8x0jp9a5qxlrgkhb5jdk2gr6vi87b4j4kjb8ryxiy9gn8g51z"))))
9139 (build-system ant-build-system)
9141 `(#:jar-name "java-jboss-interceptors-api_spec.jar"
9144 #:tests? #f)); no tests
9145 (home-page "https://github.com/jboss/jboss-interceptors-api_spec")
9146 (synopsis "Interceptors 1.2 API classes from JSR 318")
9147 (description "Java-jboss-interceptors-api-spec implements the Interceptors
9148 API. Interceptors are used to interpose on business method invocations and
9150 ;; Either GPL2 only or CDDL.
9151 (license (list license:gpl2 license:cddl1.1))))
9153 (define-public java-cdi-api
9155 (name "java-cdi-api")
9159 (uri (string-append "https://github.com/cdi-spec/cdi/archive/"
9161 (file-name (string-append name "-" version ".tar.gz"))
9164 "1iv8b8bp07c5kmqic14jsr868vycjv4qv02lf3pkgp9z21mnfg5y"))))
9165 (build-system ant-build-system)
9167 `(#:source-dir "api/src/main/java"
9168 #:jar-name "java-cdi-api.jar"
9169 #:test-dir "api/src/test"
9171 #:tests? #f)); Tests fail because we don't have a CDI provider yet
9173 `(("java-javax-inject" ,java-javax-inject)
9174 ("java-jboss-el-api-spec" ,java-jboss-el-api-spec)
9175 ("java-jboss-interceptors-api-spec" ,java-jboss-interceptors-api-spec)))
9177 `(("java-testng" ,java-testng)
9178 ("java-hamcrest-core" ,java-hamcrest-core)))
9179 (home-page "http://cdi-spec.org/")
9180 (synopsis "Contexts and Dependency Injection APIs")
9181 (description "Java-cdi-api contains the required APIs for Contexts and
9182 Dependency Injection (CDI).")
9183 (license license:asl2.0)))
9185 (define-public java-joda-convert
9187 (name "java-joda-convert")
9191 (uri (string-append "https://github.com/JodaOrg/joda-convert/archive/v"
9193 (file-name (string-append name "-" version ".tar.gz"))
9196 "0vp346xz7dh9br4q7xazhc7hvzf76a6hf95fki9bg67q5jr0kjh7"))))
9197 (build-system ant-build-system)
9199 `(#:jar-name (string-append ,name "-" ,version ".jar")
9200 #:source-dir "src/main/java"
9201 #:test-include (list "**/Test*.java")
9202 ;; Contains only interfaces and base classes (no test)
9203 #:test-exclude (list "**/test*/**.java")))
9205 `(("java-guava" ,java-guava)))
9207 `(("java-junit" ,java-junit)
9208 ("java-hamcrest-core" ,java-hamcrest-core)))
9209 (home-page "http://www.joda.org/joda-convert/")
9210 (synopsis "Conversion between Objects and Strings")
9211 (description "Joda-Convert provides a small set of classes to aid
9212 conversion between Objects and Strings. It is not intended to tackle the
9213 wider problem of Object to Object transformation.")
9214 (license license:asl2.0)))
9216 (define-public java-joda-time
9218 (name "java-joda-time")
9222 (uri (string-append "https://github.com/JodaOrg/joda-time/archive/v"
9224 (file-name (string-append name "-" version ".tar.gz"))
9227 "1i9x91mi7yg2pasl0k3912f1pg46n37sps6rdb0v1gs8hj9ppwc1"))))
9228 (build-system ant-build-system)
9230 `(#:jar-name "java-joda-time.jar"
9231 #:source-dir "src/main/java"
9232 #:test-include (list "**/Test*.java")
9233 ;; There is no runnable test in these files
9234 #:test-exclude (list "**/Test*Chronology.java" "**/Test*Field.java")
9236 (modify-phases %standard-phases
9237 (add-after 'build 'build-resources
9239 (mkdir-p "build/classes/org/joda/time/tz/data")
9240 (mkdir-p "build/classes/org/joda/time/format")
9241 ;; This will produce the following exception:
9242 ;; java.io.IOException: Resource not found: "org/joda/time/tz/data/ZoneInfoMap"
9243 ;; which is normal, because it doesn't exist yet. It still generates
9244 ;; the same file as in the binary one can find on maven.
9245 (invoke "java" "-cp"
9246 (string-append "build/classes:" (getenv "CLASSPATH"))
9247 "org.joda.time.tz.ZoneInfoCompiler"
9248 "-src" "src/main/java/org/joda/time/tz/src"
9249 "-dst" "build/classes/org/joda/time/tz/data"
9250 "africa" "antarctica" "asia" "australasia"
9251 "europe" "northamerica" "southamerica"
9252 "pacificnew" "etcetera" "backward" "systemv")
9253 (for-each (lambda (f)
9254 (copy-file f (string-append
9255 "build/classes/org/joda/time/format/"
9257 (find-files "src/main/java/org/joda/time/format" ".*.properties"))
9259 (add-before 'install 'regenerate-jar
9261 ;; We need to regenerate the jar file to add generated data.
9262 (delete-file "build/jar/java-joda-time.jar")
9263 (invoke "ant" "jar")))
9264 (add-before 'check 'copy-test-resources
9266 (mkdir-p "build/test-classes/org/joda/time/tz/data")
9267 (copy-file "src/test/resources/tzdata/ZoneInfoMap"
9268 "build/test-classes/org/joda/time/tz/data/ZoneInfoMap")
9269 (copy-recursively "src/test/resources" "build/test-classes")
9272 `(("java-joda-convert" ,java-joda-convert)))
9274 `(("java-junit" ,java-junit)
9275 ("java-hamcrest-core" ,java-hamcrest-core)
9276 ("tzdata" ,tzdata)))
9277 (home-page "http://www.joda.org/joda-time/")
9278 (synopsis "Replacement for the Java date and time classes")
9279 (description "Joda-Time is a replacement for the Java date and time
9280 classes prior to Java SE 8.")
9281 (license license:asl2.0)))
9283 (define-public java-xerces
9285 (name "java-xerces")
9290 (uri (string-append "mirror://apache/xerces/j/source/"
9291 "Xerces-J-src." version ".tar.gz"))
9293 (base32 "1006igwy2lqrmjvdk64v8dg6qbk9c29pm8xxx7r87n0vnpvmx6pm"))
9294 (patches (search-patches
9295 "java-xerces-xjavac_taskdef.patch"
9296 "java-xerces-build_dont_unzip.patch"
9297 "java-xerces-bootclasspath.patch"))))
9298 (build-system ant-build-system)
9300 `(#:tests? #f;; Test files are not present
9301 #:test-target "test"
9304 (modify-phases %standard-phases
9305 (add-after 'unpack 'create-build.properties
9306 (lambda* (#:key inputs #:allow-other-keys)
9307 (let ((jaxp (assoc-ref inputs "java-jaxp"))
9308 (resolver (assoc-ref inputs "java-apache-xml-commons-resolver")))
9309 (with-output-to-file "build.properties"
9312 "jar.jaxp = ~a/share/java/jaxp.jar~@
9313 jar.apis-ext = ~a/share/java/jaxp.jar~@
9314 jar.resolver = ~a/share/java/xml-resolver.jar~%"
9315 jaxp jaxp resolver)))
9316 ;; Make xerces use our version of jaxp in tests
9317 (substitute* "build.xml"
9319 (string-append jaxp "/share/java/jaxp.jar"))
9320 (("\\$\\{tools.dir\\}/\\$\\{jar.apis\\}")
9323 (replace 'install (install-jars "build")))))
9325 `(("java-apache-xml-commons-resolver" ,java-apache-xml-commons-resolver)
9326 ("java-jaxp" ,java-jaxp)))
9327 (home-page "https://xerces.apache.org/xerces2-j/")
9328 (synopsis "Validating XML parser for Java with DOM level 3 support")
9329 (description "The Xerces2 Java parser is the reference implementation of
9330 XNI, the Xerces Native Interface, and also a fully conforming XML Schema
9333 Xerces2-J supports the following standards and APIs:
9336 @item eXtensible Markup Language (XML) 1.0 Second Edition Recommendation
9337 @item Namespaces in XML Recommendation
9338 @item Document Object Model (DOM) Level 2 Core, Events, and Traversal and
9339 Range Recommendations
9340 @item Simple API for XML (SAX) 2.0.1 Core and Extension
9341 @item Java APIs for XML Processing (JAXP) 1.2.01
9342 @item XML Schema 1.0 Structures and Datatypes Recommendations
9343 @item Experimental implementation of the Document Object Model (DOM) Level 3
9344 Core and Load/Save Working Drafts
9345 @item Provides a partial implementation of the XML Inclusions (XInclude) W3C
9346 Candidate Recommendation
9349 Xerces is now able to parse documents written according to the XML 1.1
9350 Candidate Recommendation, except that it does not yet provide an option to
9351 enable normalization checking as described in section 2.13 of this
9352 specification. It also handles namespaces according to the XML Namespaces 1.1
9353 Candidate Recommendation, and will correctly serialize XML 1.1 documents if
9354 the DOM level 3 load/save API's are in use.")
9355 (license license:asl2.0)))
9357 (define-public java-jline
9363 (uri (string-append "https://github.com/jline/jline1/archive/jline-"
9367 "0bi3p6vrh7a6v0fbpb6rx9plpmx5zk3lr352xzdbz2jcxg499wir"))))
9368 (build-system ant-build-system)
9370 `(#:jar-name "jline.jar"
9371 #:source-dir "src/main/java"
9372 #:test-dir "src/test"
9374 (modify-phases %standard-phases
9375 (add-before 'build 'copy-resources
9377 (copy-recursively "src/main/resources" "build/classes")
9380 `(("java-junit" ,java-junit)))
9381 (home-page "https://jline.github.io")
9382 (synopsis "Console input handling library")
9383 (description "JLine is a Java library for handling console input. It is
9384 similar in functionality to BSD editline and GNU readline but with additional
9385 features that bring it on par with the Z shell line editor.")
9386 (license license:bsd-3)))
9388 (define-public java-jline-2
9390 (inherit java-jline)
9394 (uri (string-append "https://github.com/jline/jline2/archive/jline-"
9398 "1c6qa26mf0viw8hg4jnv72s7i1qb1gh1l8rrzcdvqhqhx82rkdlf"))))
9401 ,@(package-arguments java-jline)))
9403 `(("java-jansi" ,java-jansi)
9404 ("java-jansi-native" ,java-jansi-native)))
9406 `(("java-powermock-modules-junit4" ,java-powermock-modules-junit4)
9407 ("java-powermock-modules-junit4-common" ,java-powermock-modules-junit4-common)
9408 ("java-powermock-api-easymock" ,java-powermock-api-easymock)
9409 ("java-powermock-api-support" ,java-powermock-api-support)
9410 ("java-powermock-core" ,java-powermock-core)
9411 ("java-powermock-reflect" ,java-powermock-reflect)
9412 ("java-easymock" ,java-easymock)
9413 ("java-jboss-javassist" ,java-jboss-javassist)
9414 ("java-objenesis" ,java-objenesis)
9415 ("java-asm" ,java-asm)
9416 ("java-hamcrest-core" ,java-hamcrest-core)
9417 ("java-cglib" ,java-cglib)
9418 ("java-junit" ,java-junit)
9419 ("java-hawtjni" ,java-hawtjni)))))
9421 (define-public java-xmlunit
9423 (name "java-xmlunit")
9427 (uri (string-append "https://github.com/xmlunit/xmlunit/archive/v"
9429 (file-name (string-append name "-" version ".tar.gz"))
9432 "035rivlnmwhfqj0fzviciv0bkh1h95ps1iwnh2kjcvdbk5nccm4z"))))
9433 (build-system ant-build-system)
9435 `(#:jar-name "java-xmlunit.jar"
9436 #:source-dir "xmlunit-core/src/main/java"
9437 #:test-dir "xmlunit-core/src/test"
9439 (modify-phases %standard-phases
9440 (add-before 'check 'copy-test-resources
9441 (lambda* (#:key inputs #:allow-other-keys)
9442 (copy-recursively (assoc-ref inputs "resources") "../test-resources")
9445 `(("java-junit" ,java-junit)
9446 ("java-mockito-1" ,java-mockito-1)
9447 ("java-hamcrest-all" ,java-hamcrest-all)
9448 ("java-objenesis" ,java-objenesis)
9449 ("java-asm" ,java-asm)
9450 ("java-cglib" ,java-cglib)
9455 (url "https://github.com/xmlunit/test-resources.git")
9456 (commit "a590d2ae865c3e0455691d76ba8eefccc2215aec")))
9457 (file-name "java-xmlunit-test-resources")
9460 "0r0glj37pg5l868yjz78gckr91cs8fysxxbp9p328dssssi91agr"))))))
9461 (home-page "http://www.xmlunit.org/")
9462 (synopsis "XML output testing")
9463 (description "XMLUnit provides you with the tools to verify the XML you
9464 emit is the one you want to create. It provides helpers to validate against
9465 an XML Schema, assert the values of XPath queries or compare XML documents
9466 against expected outcomes.")
9467 (license license:asl2.0)))
9469 (define-public java-xmlunit-legacy
9471 (inherit java-xmlunit)
9472 (name "java-xmlunit-legacy")
9474 `(#:jar-name "java-xmlunit-legacy.jar"
9475 #:source-dir "xmlunit-legacy/src/main/java"
9476 #:test-dir "xmlunit-legacy/src/test"))
9478 `(("java-xmlunit" ,java-xmlunit)
9479 ("java-junit" ,java-junit)))
9481 `(("java-mockito-1" ,java-mockito-1)))))
9483 (define-public java-openchart2
9485 (name "java-openchart2")
9489 (uri (string-append "http://download.approximatrix.com/openchart2/"
9490 "openchart2-" version ".source.zip"))
9493 "1xq96zm5r02n1blja0072jmmsifmxc40lbyfbnmcnr6mw42frh4g"))))
9494 (build-system ant-build-system)
9496 `(#:test-target "test"
9498 (modify-phases %standard-phases
9499 (add-after 'unpack 'fix-junit-errors
9501 (with-directory-excursion "unittest/src/com/approximatrix/charting/"
9502 (substitute* '("coordsystem/ticklocator/NumericXTickLocatorTest.java"
9503 "coordsystem/ticklocator/NumericYTickLocatorTest.java"
9504 "coordsystem/ticklocator/ObjectXTickLocatorTest.java"
9505 "model/DefaultChartDataModelConstraintsTest.java"
9506 "model/MultiScatterDataModelConstraintsTest.java"
9507 "model/threedimensional/DotPlotDataModelConstraintsTest.java")
9508 (("(assertEquals[^;]+);" before _)
9509 (string-append (string-drop-right before 2) ", 1E-6);"))))
9511 (replace 'install (install-jars ".")))))
9514 ("java-junit" ,java-junit)
9515 ("java-hamcrest-core" ,java-hamcrest-core)))
9516 (home-page "http://approximatrix.com/products/openchart2/")
9517 (synopsis "Simple plotting for Java")
9518 (description "Openchart2 provides a simple, yet powerful, interface for
9519 Java programmers to create two-dimensional charts and plots. The library
9520 features an assortment of graph styles, including advanced scatter plots, bar
9521 graphs, and pie charts.")
9522 (license license:lgpl2.1+)))
9524 (define-public java-commons-httpclient
9526 (name "java-commons-httpclient")
9530 (uri (string-append "https://archive.apache.org/dist/httpcomponents/"
9531 "commons-httpclient/source/commons-httpclient-"
9532 version "-src.tar.gz"))
9535 "1wlpn3cfy3d4inxy6g7wxcsa8p7sshn6aldk9y4ia3lb879rd97r"))))
9536 (build-system ant-build-system)
9538 `(#:build-target "compile"
9539 #:test-target "test"
9540 #:tests? #f; requires junit-textui (junit 3)
9542 (modify-phases %standard-phases
9543 (add-before 'build 'fix-accent
9545 (for-each (lambda (file)
9546 (with-fluids ((%default-port-encoding "ISO-8859-1"))
9548 (("\\* @author Ortwin .*") "* @author Ortwin Glueck\n"))))
9549 '("src/java/org/apache/commons/httpclient/HttpContentTooLargeException.java"
9550 "src/examples/TrivialApp.java" "src/examples/ClientApp.java"
9551 "src/test/org/apache/commons/httpclient/TestHttps.java"
9552 "src/test/org/apache/commons/httpclient/TestURIUtil2.java"))))
9554 (lambda* (#:key outputs #:allow-other-keys)
9555 (invoke "ant" "dist"
9556 (string-append "-Ddist.home=" (assoc-ref outputs "out")
9560 `(("java-commons-logging" ,java-commons-logging-minimal)
9561 ("java-commons-codec" ,java-commons-codec)))
9562 (home-page "https://hc.apache.org")
9563 (synopsis "HTTP/1.1 compliant HTTP agent implementation")
9564 (description "This package contains an HTTP/1.1 compliant HTTP agent
9565 implementation. It also provides reusable components for client-side
9566 authentication, HTTP state management, and HTTP connection management.")
9567 (license license:asl2.0)))
9569 (define-public java-commons-vfs
9571 (name "java-commons-vfs")
9575 (uri (string-append "mirror://apache/commons/vfs/source/"
9576 "commons-vfs2-distribution-" version "-src.tar.gz"))
9577 (file-name (string-append name "-" version ".tar.gz"))
9580 "1cnq1iaghbp4cslpnvwbp83i5v234x87irssqynhwpfgw7caf1s3"))
9581 (modules '((guix build utils)))
9584 (for-each delete-file
9585 (find-files "." "\\.jar$"))
9587 (build-system ant-build-system)
9589 `(#:jar-name "commons-vfs.jar"
9590 #:source-dir "commons-vfs2/src/main/java"
9591 #:test-dir "commons-vfs2/src/test"
9592 ; FIXME: tests depend on many things: apache sshd, hadoop, ftpserver, ...
9595 (modify-phases %standard-phases
9596 (add-before 'build 'remove-hadoop-and-webdav
9597 ; Remove these files as they are not required and depend on difficult
9600 (for-each delete-file-recursively
9601 '("commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/webdav"
9602 "commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/hdfs")))))))
9604 `(("java-commons-collections4" ,java-commons-collections4)
9605 ("java-commons-compress" ,java-commons-compress)
9606 ("java-commons-httpclient" ,java-commons-httpclient)
9607 ("java-commons-logging-minimal" ,java-commons-logging-minimal)
9608 ("java-commons-net" ,java-commons-net)
9609 ("java-jsch" ,java-jsch)))
9610 (home-page "http://commons.apache.org/proper/commons-vfs/")
9611 (synopsis "Java filesystem library")
9612 (description "Commons VFS provides a single API for accessing various
9613 different file systems. It presents a uniform view of the files from various
9614 different sources, such as the files on local disk, on an HTTP server, or
9615 inside a Zip archive.")
9616 (license license:asl2.0)))
9618 (define-public java-jakarta-oro
9620 (name "java-jakarta-oro")
9624 (uri (string-append "https://archive.apache.org/dist/jakarta/oro/"
9625 "jakarta-oro-" version ".tar.gz"))
9628 "0rpmnsskiwmsy8r0sckz5n5dbvh3vkxx8hpm177c754r8xy3qksc"))
9629 (modules '((guix build utils)))
9632 (delete-file (string-append "jakarta-oro-" ,version ".jar"))
9634 (build-system ant-build-system)
9636 `(#:build-target "package"
9637 #:tests? #f; tests are run as part of the build process
9639 (modify-phases %standard-phases
9641 (install-jars ,(string-append "jakarta-oro-" version))))))
9642 (home-page "https://jakarta.apache.org/oro/")
9643 (synopsis "Text-processing for Java")
9644 (description "The Jakarta-ORO Java classes are a set of text-processing
9645 Java classes that provide Perl5 compatible regular expressions, AWK-like
9646 regular expressions, glob expressions, and utility classes for performing
9647 substitutions, splits, filtering filenames, etc. This library is the successor
9648 of the OROMatcher, AwkTools, PerlTools, and TextTools libraries originally
9650 (license license:asl1.1)))
9652 (define-public java-native-access
9654 (name "java-native-access")
9658 (uri (string-append "https://github.com/java-native-access/jna/"
9659 "archive/" version ".tar.gz"))
9660 (file-name (string-append name "-" version ".tar.gz"))
9663 "0zrpzkib6b905i018a9pqlzkqinphywr6y4jwv6mwp63jjqvqkd9"))
9664 (modules '((guix build utils)))
9667 (for-each delete-file (find-files "." ".*.jar"))
9668 (delete-file-recursively "native/libffi")
9669 (delete-file-recursively "dist")
9671 (build-system ant-build-system)
9673 `(#:tests? #f; FIXME: tests require reflections.jar
9674 #:test-target "test"
9675 #:make-flags (list "-Ddynlink.native=true")
9677 (modify-phases %standard-phases
9678 (add-before 'build 'fix-build.xml
9679 (lambda* (#:key inputs #:allow-other-keys)
9680 (substitute* "build.xml"
9681 ;; Since we removed the bundled ant.jar, give the correct path
9682 (("lib/ant.jar") (string-append (assoc-ref inputs "ant") "/lib/ant.jar"))
9683 ;; We removed generated native libraries. We can only rebuild one
9684 ;; so don't fail if we can't find a native library for another architecture.
9685 (("zipfileset") "zipfileset erroronmissingarchive=\"false\""))
9686 ;; Copy test dependencies
9687 (copy-file (string-append (assoc-ref inputs "java-junit")
9688 "/share/java/junit.jar")
9690 (copy-file (string-append (assoc-ref inputs "java-hamcrest-core")
9691 "/share/java/hamcrest-core.jar")
9692 "lib/hamcrest-core.jar")
9693 ;; FIXME: once reflections.jar is built, copy it to lib/test.
9695 (add-before 'build 'build-native
9697 (invoke "ant" "-Ddynlink.native=true" "native")
9700 (install-jars "build")))))
9702 `(("libffi" ,libffi)
9706 `(("java-junit" ,java-junit)
9707 ("java-hamcrest-core" ,java-hamcrest-core)))
9708 (home-page "https://github.com/java-native-access/jna")
9709 (synopsis "Access to native shared libraries from Java")
9710 (description "JNA provides Java programs easy access to native shared
9711 libraries without writing anything but Java code - no JNI or native code is
9712 required. JNA allows you to call directly into native functions using natural
9713 Java method invocation.")
9714 ;; Java Native Access project (JNA) is dual-licensed under 2
9715 ;; alternative Free licenses: LGPL 2.1 or later and Apache License 2.0.
9718 license:lgpl2.1+))))
9720 (define-public java-native-access-platform
9722 (inherit java-native-access)
9723 (name "java-native-access-platform")
9725 `(#:test-target "test"
9726 #:tests? #f; require jna-test.jar
9728 (modify-phases %standard-phases
9729 (add-before 'build 'chdir
9731 (chdir "contrib/platform")
9733 (add-after 'chdir 'fix-ant
9734 (lambda* (#:key inputs #:allow-other-keys)
9735 (substitute* "nbproject/project.properties"
9736 (("../../build/jna.jar")
9737 (string-append (assoc-ref inputs "java-native-access")
9738 "/share/java/jna.jar"))
9739 (("../../lib/hamcrest-core-.*.jar")
9740 (string-append (assoc-ref inputs "java-hamcrest-core")
9741 "/share/java/hamcrest-core.jar"))
9742 (("../../lib/junit.jar")
9743 (string-append (assoc-ref inputs "java-junit")
9744 "/share/java/junit.jar")))
9747 (install-jars "dist")))))
9749 `(("java-native-access" ,java-native-access)))
9750 (synopsis "Cross-platform mappings for jna")
9751 (description "java-native-access-platfrom has cross-platform mappings
9752 and mappings for a number of commonly used platform functions, including a
9753 large number of Win32 mappings as well as a set of utility classes that
9754 simplify native access.")))
9756 (define-public java-jsch-agentproxy-core
9758 (name "java-jsch-agentproxy-core")
9762 (uri (string-append "https://github.com/ymnk/jsch-agent-proxy/archive/"
9764 (file-name (string-append name "-" version ".tar.gz"))
9767 "02iqg6jbc1kxvfzqcg6wy9ygqxfm82bw5rf6vnswqy4y572niz4q"))))
9768 (build-system ant-build-system)
9770 `(#:jar-name "jsch-agentproxy-core.jar"
9771 #:source-dir "jsch-agent-proxy-core/src/main/java"
9772 #:tests? #f)); no tests
9773 (home-page "https://github.com/ymnk/jsch-agent-proxy")
9774 (synopsis "Core component of the proxy to ssh-agent and Pageant in Java")
9775 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
9776 and Pageant included Putty. It will be easily integrated into JSch, and users
9777 will be allowed to use these programs for authentication.")
9778 (license license:bsd-3)))
9780 (define-public java-jsch-agentproxy-sshagent
9782 (inherit java-jsch-agentproxy-core)
9783 (name "java-jsch-agentproxy-sshagent")
9785 `(#:jar-name "jsch-agentproxy-sshagent.jar"
9786 #:source-dir "jsch-agent-proxy-sshagent/src/main/java"
9787 #:tests? #f)); no tests
9789 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
9790 (synopsis "Proxy to ssh-agent")
9791 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
9792 and Pageant included in Putty. This component contains the code for a proxy to
9795 (define-public java-jsch-agentproxy-usocket-jna
9797 (inherit java-jsch-agentproxy-core)
9798 (name "java-jsch-agentproxy-usocket-jna")
9800 `(#:jar-name "jsch-agentproxy-usocket-jna.jar"
9801 #:source-dir "jsch-agent-proxy-usocket-jna/src/main/java"
9802 #:tests? #f)); no tests
9804 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
9805 ("java-native-access" ,java-native-access)))
9806 (synopsis "USocketFactory implementation using JNA")
9807 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
9808 and Pageant included in Putty. This component contains an implementation of
9809 USocketFactory using @dfn{JNA} (Java Native Access).")))
9811 (define-public java-jsch-agentproxy-pageant
9813 (inherit java-jsch-agentproxy-core)
9814 (name "java-jsch-agentproxy-pageant")
9816 `(#:jar-name "jsch-agentproxy-pageant.jar"
9817 #:source-dir "jsch-agent-proxy-pageant/src/main/java"
9818 #:tests? #f)); no tests
9820 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
9821 ("java-native-access" ,java-native-access)
9822 ("java-native-access-platform" ,java-native-access-platform)))
9823 (synopsis "Proxy to pageant")
9824 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
9825 and Pageant included in Putty. This component contains the code for a proxy to
9828 (define-public java-jsch-agentproxy-usocket-nc
9830 (inherit java-jsch-agentproxy-core)
9831 (name "java-jsch-agentproxy-usocket-nc")
9833 `(#:jar-name "jsch-agentproxy-usocket-nc.jar"
9834 #:source-dir "jsch-agent-proxy-usocket-nc/src/main/java"
9835 #:tests? #f)); no tests
9837 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
9838 (synopsis "USocketFactory implementation using netcat")
9839 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
9840 and Pageant included in Putty. This component contains an implementation of
9841 USocketFactory using netcat.")))
9843 (define-public java-jsch-agentproxy-connector-factory
9845 (inherit java-jsch-agentproxy-core)
9846 (name "java-jsch-agentproxy-connector-factory")
9848 `(#:jar-name "jsch-agentproxy-connector-factory.jar"
9849 #:source-dir "jsch-agent-proxy-connector-factory/src/main/java"
9850 #:tests? #f)); no tests
9852 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
9853 ("java-jsch-agentproxy-sshagent" ,java-jsch-agentproxy-sshagent)
9854 ("java-jsch-agentproxy-usocket-jna" ,java-jsch-agentproxy-usocket-jna)
9855 ("java-jsch-agentproxy-pageant" ,java-jsch-agentproxy-pageant)
9856 ("java-jsch-agentproxy-usocket-nc" ,java-jsch-agentproxy-usocket-nc)))
9857 (synopsis "Connector factory for jsch agent proxy")
9858 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
9859 and Pageant included in Putty. This component contains a connector factory.")))
9861 (define-public java-jsch-agentproxy-jsch
9863 (inherit java-jsch-agentproxy-core)
9864 (name "java-jsch-agentproxy-jsch")
9866 `(#:jar-name "jsch-agentproxy-jsch.jar"
9867 #:source-dir "jsch-agent-proxy-jsch/src/main/java"
9868 #:tests? #f)); no tests
9870 `(("java-jsch" ,java-jsch)
9871 ("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
9872 (synopsis "JSch integration library for agentproxy")
9873 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
9874 and Pageant included in Putty. This component contains a library to use
9875 jsch-agent-proxy with JSch.")))
9877 (define-public java-apache-ivy
9879 (name "java-apache-ivy")
9883 (uri (string-append "mirror://apache//ant/ivy/" version
9884 "/apache-ivy-" version "-src.tar.gz"))
9887 "1xkfn57g2m7l6y0xdq75x5rnrgk52m9jx2xah70g3ggl8750hbr0"))
9890 "java-apache-ivy-port-to-latest-bouncycastle.patch"))))
9891 (build-system ant-build-system)
9893 `(#:jar-name "ivy.jar"
9896 (modify-phases %standard-phases
9897 (add-before 'build 'remove-example
9899 (delete-file-recursively "src/example")
9901 (add-before 'build 'copy-resources
9903 (with-directory-excursion "src/java"
9904 (for-each (lambda (file)
9905 (install-file file (string-append "../../build/classes/" (dirname file))))
9907 (find-files "." ".*.css")
9908 (find-files "." ".*.ent")
9909 (find-files "." ".*.html")
9910 (find-files "." ".*.properties")
9911 (find-files "." ".*.xsd")
9912 (find-files "." ".*.xsl")
9913 (find-files "." ".*.xml"))))))
9914 (add-before 'build 'fix-vfs
9917 '("src/java/org/apache/ivy/plugins/repository/vfs/VfsRepository.java"
9918 "src/java/org/apache/ivy/plugins/repository/vfs/VfsResource.java")
9919 (("import org.apache.commons.vfs") "import org.apache.commons.vfs2"))
9921 (add-before 'install 'copy-manifest
9923 (install-file "META-INF/MANIFEST.MF" "build/classes/META-INF")
9925 (add-before 'install 'repack
9927 (invoke "jar" "-cmf" "build/classes/META-INF/MANIFEST.MF" "build/jar/ivy.jar"
9928 "-C" "build/classes" ".")
9930 (add-after 'install 'install-bin
9931 (lambda* (#:key outputs #:allow-other-keys)
9932 (let* ((bin (string-append (assoc-ref outputs "out") "/bin"))
9933 (ivy (string-append bin "/ivy"))
9934 (jar (string-append (assoc-ref outputs "out") "/share/java/ivy.jar")))
9936 (with-output-to-file ivy
9938 (display (string-append
9939 "#!" (which "sh") "\n"
9940 "if [[ -z $CLASSPATH ]]; then\n"
9941 " cp=\"" (getenv "CLASSPATH") ":" jar "\"\n"
9943 " cp=\"" (getenv "CLASSPATH") ":" jar ":$CLASSPATH\"\n"
9945 (which "java") " -cp $cp org.apache.ivy.Main $@\n"))))
9949 `(("java-bouncycastle" ,java-bouncycastle)
9950 ("java-commons-cli" ,java-commons-cli)
9951 ("java-commons-collections" ,java-commons-collections)
9952 ("java-commons-httpclient" ,java-commons-httpclient)
9953 ("java-commons-lang" ,java-commons-lang)
9954 ("java-commons-vfs" ,java-commons-vfs)
9955 ("java-jakarta-oro" ,java-jakarta-oro)
9956 ("java-jsch" ,java-jsch)
9957 ("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
9958 ("java-jsch-agentproxy-connector-factory" ,java-jsch-agentproxy-connector-factory)
9959 ("java-jsch-agentproxy-jsch" ,java-jsch-agentproxy-jsch)
9960 ("java-junit" ,java-junit)))
9961 (home-page "https://ant.apache.org/ivy")
9962 (synopsis "Dependency manager for the Java programming language")
9963 (description "Ivy is a tool for managing (recording, tracking, resolving
9964 and reporting) project dependencies. It is characterized by the following:
9967 @item flexibility and configurability - Ivy is essentially process agnostic
9968 and is not tied to any methodology or structure. Instead it provides the
9969 necessary flexibility and configurability to be adapted to a broad range
9970 of dependency management and build processes.
9971 @item tight integration with Apache Ant - while available as a standalone tool,
9972 Ivy works particularly well with Apache Ant providing a number of
9973 powerful Ant tasks ranging from dependency resolution to dependency
9974 reporting and publication.
9976 (license license:asl2.0)))
9978 (define-public java-eclipse-sisu-inject
9980 (name "java-eclipse-sisu-inject")
9984 (uri (string-append "https://github.com/eclipse/sisu.inject/"
9985 "archive/releases/" version ".tar.gz"))
9988 "11rg6yw5nl13i65xsp4jxxgr341qcnnaan48p767h28kb07s0ajn"))))
9989 (build-system ant-build-system)
9991 `(#:jar-name "eclipse-sisu-inject.jar"
9992 #:source-dir "org.eclipse.sisu.inject/src"
9994 #:tests? #f)); no tests
9996 `(("java-guice" ,java-guice)
9997 ("java-guice-servlet" ,java-guice-servlet)
9998 ("java-javax-inject" ,java-javax-inject)
9999 ("java-tomcat" ,java-tomcat)
10000 ("java-junit" ,java-junit)
10001 ("java-slf4j-api" ,java-slf4j-api)
10002 ("java-jsr305" ,java-jsr305)
10003 ("java-jsr250" ,java-jsr250)
10004 ("java-cdi-api" ,java-cdi-api)
10005 ("java-osgi-framework" ,java-osgi-framework)
10006 ("java-osgi-util-tracker" ,java-osgi-util-tracker)
10007 ("java-testng" ,java-testng)))
10008 (home-page "https://www.eclipse.org/sisu/")
10009 (synopsis "Classpath scanning, auto-binding, and dynamic auto-wiring")
10010 (description "Sisu is a modular JSR330-based container that supports
10011 classpath scanning, auto-binding, and dynamic auto-wiring. Sisu uses
10012 Google-Guice to perform dependency injection and provide the core JSR330
10013 support, but removes the need to write explicit bindings in Guice modules.
10014 Integration with other containers via the Eclipse Extension Registry and the
10015 OSGi Service Registry is a goal of this project.")
10016 (license license:epl1.0)))
10018 (define-public java-eclipse-sisu-plexus
10020 (name "java-eclipse-sisu-plexus")
10024 (uri (string-append "https://github.com/eclipse/sisu.plexus/"
10025 "archive/releases/" version ".tar.gz"))
10028 "0lbj7nxy5j0z71k407zbb82icfqh7midrfk0fb3fa3jzdjz0d9d9"))
10029 (modules '((guix build utils)))
10032 (for-each delete-file (find-files "." ".*.jar"))
10033 (rename-file "org.eclipse.sisu.plexus.tests/src"
10034 "org.eclipse.sisu.plexus.tests/java")
10036 (build-system ant-build-system)
10038 `(#:jar-name "eclipse-sisu-plexus.jar"
10039 #:source-dir "org.eclipse.sisu.plexus/src"
10040 #:test-dir "org.eclipse.sisu.plexus.tests"
10043 ;; This test fails probably because we can't generate the necessary
10045 "**/PlexusLoggingTest.*"
10046 ;; FIXME: This test fails because of some injection error
10047 "**/PlexusRequirementTest.*")
10050 (modify-phases %standard-phases
10051 (add-before 'build 'copy-resources
10053 (install-file "org.eclipse.sisu.plexus/META-INF/plexus/components.xml"
10054 "build/classes/META-INF/plexus")
10056 (add-before 'check 'build-test-jar
10058 (with-directory-excursion "org.eclipse.sisu.plexus.tests/resources/component-jar/src/main/"
10060 (with-directory-excursion "java"
10061 (apply invoke "javac" "-cp"
10062 (string-append (getenv "CLASSPATH")
10063 ":../../../../../build/classes")
10064 (find-files "." ".*.java"))
10065 (for-each (lambda (file) (install-file file (string-append "../build/" file)))
10066 (find-files "." ".*.jar")))
10067 (mkdir-p "build/META-INF/plexus")
10068 (copy-file "resources/META-INF/plexus/components.xml"
10069 "build/META-INF/plexus/components.xml")
10070 (with-directory-excursion "build"
10071 (invoke "jar" "cf" "../../../component-jar-0.1.jar" ".")))
10072 (with-directory-excursion "org.eclipse.sisu.plexus.tests/"
10073 (copy-recursively "META-INF" "../build/test-classes/META-INF")
10074 (substitute* "java/org/eclipse/sisu/plexus/DefaultPlexusContainerTest.java"
10075 (("resources/component-jar")
10076 "org.eclipse.sisu.plexus.tests/resources/component-jar")))
10079 `(("java-plexus-classworlds" ,java-plexus-classworlds)
10080 ("java-plexus-util" ,java-plexus-utils)
10081 ("java-plexus-component-annotations" ,java-plexus-component-annotations)
10082 ("java-osgi-framework" ,java-osgi-framework)
10083 ("java-eclipse-sisu-inject" ,java-eclipse-sisu-inject)
10084 ("java-guice" ,java-guice)
10085 ("java-javax-inject" ,java-javax-inject)
10086 ("java-slf4j-api" ,java-slf4j-api)
10087 ("java-junit" ,java-junit)))
10089 `(("java-guava" ,java-guava)
10090 ("java-aopalliance" ,java-aopalliance)
10091 ("java-cglib" ,java-cglib)
10092 ("java-asm" ,java-asm)))
10093 (home-page "https://www.eclipse.org/sisu/")
10094 (synopsis "Plexus support for the sisu container")
10095 (description "Sisu is a modular JSR330-based container that supports
10096 classpath scanning, auto-binding, and dynamic auto-wiring. This package
10097 adds Plexus support to the Sisu-Inject container.")
10098 (license license:epl1.0)))
10100 (define-public java-commons-compiler
10102 (name "java-commons-compiler")
10106 (uri (git-reference
10107 (url "https://github.com/janino-compiler/janino")
10108 (commit "91aa95686d1e4ca3b16a984a03a38686572331b2")))
10109 (file-name (string-append name "-" version))
10112 "04hfdl59sgh20qkxzgnibvs8f9hy6n7znxwpk611y5d89977y62r"))
10113 (modules '((guix build utils)))
10116 (for-each delete-file
10117 (find-files "." "\\.jar$"))
10119 (build-system ant-build-system)
10121 `(#:jar-name "commons-compiler.jar"
10122 #:source-dir "commons-compiler/src/main"
10123 #:tests? #f)); no tests
10124 (home-page "https://github.com/janino-compiler/janino")
10125 (synopsis "Java compiler")
10126 (description "Commons-compiler contains an API for janino, including the
10127 @code{IExpressionEvaluator}, @code{IScriptEvaluator}, @code{IClassBodyEvaluator}
10128 and @code{ISimpleCompiler} interfaces.")
10129 (license license:bsd-3)))
10131 (define-public java-janino
10133 (inherit java-commons-compiler)
10134 (name "java-janino")
10136 `(#:jar-name "janino.jar"
10137 #:source-dir "src/main/java"
10139 (modify-phases %standard-phases
10140 (add-before 'configure 'chdir
10142 (chdir "janino"))))))
10144 `(("java-commons-compiler" ,java-commons-compiler)))
10146 `(("java-junit" ,java-junit)
10147 ("java-hamcrest-core" ,java-hamcrest-core)))
10148 (description "Janino is a Java compiler. Janino can compile a set of
10149 source files to a set of class files like @code{javac}, but also compile a
10150 Java expression, block, class body or source file in memory, load the bytecode
10151 and execute it directly in the same JVM. @code{janino} can also be used for
10152 static code analysis or code manipulation.")))
10154 (define-public java-logback-core
10156 (name "java-logback-core")
10160 (uri (string-append "https://github.com/qos-ch/logback/archive/v_"
10161 version ".tar.gz"))
10164 "1x6ga74yfgm94cfx98gybakbrlilx8i2gn6dx13l40kasmys06mi"))
10165 (modules '((guix build utils)))
10167 '(delete-file-recursively "logback-access/lib"))))
10168 (build-system ant-build-system)
10170 `(#:jar-name "logback.jar"
10171 #:source-dir "src/main/java"
10172 #:test-dir "src/test"
10174 ;; These tests fail with Unable to set MockitoNamingPolicy on cglib generator
10175 ;; which creates FastClasses
10176 (list "**/AllCoreTest.*"
10177 "**/AutoFlushingObjectWriterTest.*"
10179 "**/ResilientOutputStreamTest.*"
10180 ;; And we still don't want to run abstract classes
10183 (modify-phases %standard-phases
10184 (add-before 'configure 'chdir
10186 (chdir "logback-core")
10189 `(("java-javax-mail" ,java-javax-mail)
10190 ("java-tomcat" ,java-tomcat)
10191 ("java-commons-compiler" ,java-commons-compiler)
10192 ("java-janino" ,java-janino)))
10194 `(("java-junit" ,java-junit)
10195 ("java-hamcrest-core" ,java-hamcrest-core)
10196 ("java-mockito-1" ,java-mockito-1)
10197 ("java-cglib" ,java-cglib)
10198 ("java-asm" ,java-asm)
10199 ("java-objenesis" ,java-objenesis)
10200 ("java-joda-time" ,java-joda-time)))
10201 (home-page "https://logback.qos.ch")
10202 (synopsis "Logging for java")
10203 (description "Logback is intended as a successor to the popular log4j project.
10204 This module lays the groundwork for the other two modules.")
10205 ;; Either epl1.0 or lgpl2.1
10206 (license (list license:epl1.0
10207 license:lgpl2.1))))
10209 (define-public java-logback-classic
10211 (inherit java-logback-core)
10212 (name "java-logback-classic")
10214 `(#:jar-name "logback-classic.jar"
10215 #:source-dir "src/main/java"
10216 #:test-dir "src/test"
10217 #:tests? #f; tests require more packages: h2, greenmail, hsql, subethamail, slf4j, log4j, felix
10220 (modify-phases %standard-phases
10221 (add-before 'configure 'chdir
10223 (chdir "logback-classic")
10226 (lambda* (#:key inputs #:allow-other-keys)
10227 (mkdir-p "build/classes")
10228 (setenv "CLASSPATH"
10230 (apply append (map (lambda (input)
10231 (find-files (assoc-ref inputs input)
10233 '("java-logback-core" "java-slf4j-api"
10234 "java-commons-compiler" "java-tomcat"
10237 (apply invoke "groovyc" "-d" "build/classes" "-j"
10238 (find-files "src/main/" ".*\\.(groovy|java)$"))
10239 (invoke "ant" "jar")
10242 `(("java-logback-core" ,java-logback-core)
10243 ("java-slf4j-api" ,java-slf4j-api)
10244 ,@(package-inputs java-logback-core)))
10246 `(("groovy" ,groovy)))
10247 (description "Logback is intended as a successor to the popular log4j project.
10248 This module can be assimilated to a significantly improved version of log4j.
10249 Moreover, @code{logback-classic} natively implements the slf4j API so that you
10250 can readily switch back and forth between logback and other logging frameworks
10251 such as log4j or @code{java.util.logging} (JUL).")))
10253 (define-public java-qdox
10256 ; Newer version exists, but this version is required by java-plexus-component-metadata
10260 ;; 2.0-M4, -M5 at https://github.com/paul-hammant/qdox
10261 ;; Older releases at https://github.com/codehaus/qdox/
10262 ;; Note: The release at maven is pre-generated. The release at
10263 ;; github requires jflex.
10264 (uri (string-append "http://central.maven.org/maven2/"
10265 "com/thoughtworks/qdox/qdox/" version
10266 "/qdox-" version "-sources.jar"))
10269 "10xxrcaicq6axszcr2jpygisa4ch4sinyx5q7kqqxv4lknrmxp5x"))))
10270 (build-system ant-build-system)
10272 `(#:jar-name "qdox.jar"
10273 #:tests? #f)); no tests
10274 (home-page "http://qdox.codehaus.org/")
10275 (synopsis "Parse definitions from Java source files")
10276 (description "QDox is a high speed, small footprint parser for extracting
10277 class/interface/method definitions from source files complete with JavaDoc
10278 @code{@@tags}. It is designed to be used by active code generators or
10279 documentation tools.")
10280 (license license:asl2.0)))