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 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 gtk)
57 #:use-module (gnu packages guile)
58 #:use-module (gnu packages icu4c)
59 #:use-module (gnu packages image)
60 #:use-module (gnu packages libffi)
61 #:use-module (gnu packages linux) ;alsa
62 #:use-module (gnu packages maths)
63 #:use-module (gnu packages web)
64 #:use-module (gnu packages wget)
65 #:use-module (gnu packages pkg-config)
66 #:use-module (gnu packages perl)
67 #:use-module (gnu packages popt)
68 #:use-module (gnu packages kerberos)
69 #:use-module (gnu packages xml)
70 #:use-module (gnu packages xorg)
71 #:use-module (gnu packages texinfo)
72 #:use-module ((srfi srfi-1) #:select (fold alist-delete))
73 #:use-module (srfi srfi-11)
74 #:use-module (ice-9 match))
78 ;;; Java bootstrap toolchain.
81 ;; The Java bootstrap begins with Jikes, a Java compiler written in C++. We
82 ;; use it to build the SableVM standard library and virtual machine, which are
83 ;; written in a simpler dialect of Java and C, respectively. This is
84 ;; sufficient to build an older version of Ant, which is needed to build an
85 ;; older version of ECJ, an incremental Java compiler, both of which are
88 ;; ECJ is needed to build the latest release of GNU Classpath (0.99).
89 ;; Classpath (> 0.98) is a requirement for JamVM, a more modern implementation
90 ;; of the Java virtual machine.
92 ;; With JamVM we can build the latest development version of GNU Classpath,
93 ;; which has much more support for Java 1.6 than the latest release. Since
94 ;; the previous build of JamVM is limited by the use of GNU Classpath 0.99 we
95 ;; rebuild it with the latest development version of GNU Classpath.
97 ;; Finally, we use the bootstrap toolchain to build the OpenJDK with the
98 ;; Icedtea 1.x build framework. We then build the more recent JDKs Icedtea
99 ;; 2.x and Icedtea 3.x.
107 (uri (string-append "mirror://sourceforge/jikes/Jikes/"
108 version "/jikes-" version ".tar.bz2"))
111 "1qqldrp74pzpy5ly421srqn30qppmm9cvjiqdngk8hf47dv2rc0c"))))
112 (build-system gnu-build-system)
113 (home-page "http://jikes.sourceforge.net/")
114 (synopsis "Compiler for the Java language")
115 (description "Jikes is a compiler that translates Java source files as
116 defined in The Java Language Specification into the bytecoded instruction set
117 and binary format defined in The Java Virtual Machine Specification.")
118 (license license:ibmpl1.0)))
120 (define sablevm-classpath
122 (name "sablevm-classpath")
126 (uri (string-append "mirror://sourceforge/sablevm/sablevm/"
127 version "/sablevm-classpath-" version ".tar.gz"))
130 "1qyhyfz8idghxdam16hdgpa24r2x4xbg9z8c8asa3chnd79h3zw2"))))
131 (build-system gnu-build-system)
148 ("pkg-config" ,pkg-config)))
149 (home-page "http://sablevm.org/")
150 (synopsis "Java Virtual Machine")
151 (description "SableVM is a clean-room, highly portable and efficient Java
152 virtual machine. Its goals are to be reasonably small, fast, and compliant
153 with the various specifications (JVM specification, JNI, invocation interface,
154 etc.). SableVM is no longer maintained.
156 This package provides the classpath library.")
157 (license license:lgpl2.1+)))
165 (uri (string-append "mirror://sourceforge/sablevm/sablevm/"
166 version "/sablevm-" version ".tar.gz"))
169 "1jyg4bsym6igz94wps5443c7wiwlzinqzkchcw972nz4kf1cql6g"))))
170 (build-system gnu-build-system)
173 (list "--with-threading=switch" ; slower but prevents segfault
174 "--with-internal-libffi=no"
175 "--with-internal-libpopt=no")
177 (modify-phases %standard-phases
178 (add-after 'unpack 'remove-timestamp-for-reproducibility
180 (substitute* "src/sablevm/Makefile.in"
181 (("\\$\\(SVMCOMPILETIME\\)") "(unknown)"))
183 (add-after 'unpack 'link-with-popt
185 (substitute* "src/sablevm/Makefile.in"
186 (("\\$\\(SVMADD\\)" match)
187 (string-append match " -lpopt")))
189 (add-after 'unpack 'patch-path-to-classpath
190 (lambda* (#:key inputs #:allow-other-keys)
191 (substitute* "Makefile.in"
192 (("@datadir@/sablevm-classpath")
193 (string-append (assoc-ref inputs "classpath")
194 "/share/sablevm-classpath")))
195 (substitute* "src/libsablevm/Makefile.in"
196 (("\\$\\(libdir\\)/sablevm-classpath")
197 (string-append (assoc-ref inputs "classpath")
198 "/lib/sablevm-classpath"))
199 (("\\$\\(datadir\\)/sablevm-classpath")
200 (string-append (assoc-ref inputs "classpath")
201 "/share/sablevm-classpath")))
204 `(("classpath" ,sablevm-classpath)
210 `(("libltdl" ,libltdl)))
211 (home-page "http://sablevm.org/")
212 (synopsis "Java Virtual Machine")
213 (description "SableVM is a clean-room, highly portable and efficient Java
214 virtual machine. Its goals are to be reasonably small, fast, and compliant
215 with the various specifications (JVM specification, JNI, invocation interface,
216 etc.). SableVM is no longer maintained.
218 This package provides the virtual machine.")
219 (license license:lgpl2.1+)))
221 (define ant-bootstrap
223 (name "ant-bootstrap")
224 ;; The 1.10.x series requires Java 8. 1.9.0 and later use generics, which
225 ;; are not supported. The 1.8.x series is the last to use only features
226 ;; supported by Jikes, but it cannot seem to be built with sablevm.
230 (uri (string-append "http://archive.apache.org/dist/"
231 "ant/source/apache-ant-"
232 version "-src.tar.bz2"))
235 "19pvqvgkxgpgsqm4lvbki5sm0z84kxmykdqicvfad47gc1r9mi2d"))))
236 (build-system gnu-build-system)
238 `(#:tests? #f ; no "check" target
240 (modify-phases %standard-phases
243 (lambda* (#:key inputs #:allow-other-keys)
245 (string-append (assoc-ref inputs "sablevm")
248 (string-append (assoc-ref inputs "sablevm")
249 "/bin/java-sablevm"))
251 (string-append (assoc-ref inputs "sablevm")
252 "/bin/javac-sablevm"))
254 ;; Use jikes instead of javac for <javac ...> tags in build.xml
255 (setenv "ANT_OPTS" "-Dbuild.compiler=jikes")
257 ;; jikes produces lots of warnings, but they are not very
258 ;; interesting, so we silence them.
259 (setenv "$BOOTJAVAC_OPTS" "-nowarn")
261 ;; Disable tests because we are bootstrapping and thus don't have
262 ;; any of the dependencies required to build and run the tests.
263 (substitute* "build.xml"
264 (("depends=\"jars,test-jar\"") "depends=\"jars\""))
265 (zero? (system* "bash" "bootstrap.sh"
266 (string-append "-Ddist.dir="
267 (assoc-ref %outputs "out"))))))
271 ("sablevm" ,sablevm)))
272 (home-page "http://ant.apache.org")
273 (synopsis "Build tool for Java")
275 "Ant is a platform-independent build tool for Java. It is similar to
276 make but is implemented using the Java language, requires the Java platform,
277 and is best suited to building Java projects. Ant uses XML to describe the
278 build process and its dependencies, whereas Make uses Makefile format.")
279 (license license:asl2.0)))
281 ;; Version 3.2.2 is the last version without a dependency on a full-fledged
282 ;; compiler for Java 1.5.
283 (define ecj-bootstrap
285 (name "ecj-bootstrap")
289 (uri (string-append "http://archive.eclipse.org/eclipse/"
290 "downloads/drops/R-" version
291 "-200702121330/ecjsrc.zip"))
294 "05hj82kxd23qaglsjkaqcj944riisjha7acf7h3ljhrjyljx8307"))))
295 ;; It would be so much easier if we could use the ant-build-system, but we
296 ;; cannot as we don't have ant at this point. We use ecj for
297 ;; bootstrapping the JDK.
298 (build-system gnu-build-system)
300 `(#:modules ((guix build gnu-build-system)
303 #:tests? #f ; there are no tests
305 (modify-phases %standard-phases
307 (lambda* (#:key inputs #:allow-other-keys)
310 (find-files (string-append (assoc-ref inputs "ant-bootstrap")
316 (lambda* (#:key inputs #:allow-other-keys)
317 ;; The unpack phase enters the "org" directory by mistake.
320 ;; Create a simple manifest to make ecj executable.
321 (with-output-to-file "manifest"
323 (display "Manifest-Version: 1.0
324 Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n")))
327 (and (zero? (apply system* "javac-sablevm"
328 (find-files "." "\\.java$")))
329 (zero? (system* "fastjar" "cvfm"
330 "ecj-bootstrap.jar" "manifest" ".")))))
332 (lambda* (#:key outputs #:allow-other-keys)
333 (let ((share (string-append (assoc-ref outputs "out")
336 (install-file "ecj-bootstrap.jar" share)
339 `(("ant-bootstrap" ,ant-bootstrap)
342 ("fastjar" ,fastjar)))
343 (home-page "https://eclipse.org")
344 (synopsis "Eclipse Java development tools core batch compiler")
345 (description "This package provides the Eclipse Java core batch compiler
346 for bootstrapping purposes. The @dfn{Eclipse compiler for Java} (ecj) is a
347 requirement for all GNU Classpath releases after version 0.93.")
348 (license license:epl1.0)))
350 (define ecj-javac-wrapper
351 (package (inherit ecj-bootstrap)
352 (name "ecj-javac-wrapper")
354 (build-system trivial-build-system)
356 `(#:modules ((guix build utils))
358 (let ((backend 'sablevm))
359 (use-modules (guix build utils))
360 (let* ((bin (string-append (assoc-ref %outputs "out") "/bin"))
361 (target (string-append bin "/javac"))
362 (guile (string-append (assoc-ref %build-inputs "guile")
364 (ecj (string-append (assoc-ref %build-inputs "ecj-bootstrap")
365 "/share/java/ecj-bootstrap.jar"))
368 (string-append (assoc-ref %build-inputs "sablevm")
369 "/lib/sablevm/bin/java"))
371 (string-append (assoc-ref %build-inputs "jamvm")
373 (bootcp (case backend
375 (let ((jvmlib (string-append
376 (assoc-ref %build-inputs "sablevm-classpath")
378 (string-append jvmlib "/jre/lib/rt.jar")))
380 (let ((jvmlib (string-append (assoc-ref %build-inputs "classpath")
381 "/share/classpath")))
382 (string-append jvmlib "/lib/glibj.zip:"
383 jvmlib "/lib/tools.zip"))))))
385 (with-output-to-file target
387 (format #t "#!~a --no-auto-compile\n!#\n" guile)
389 `(begin (use-modules (ice-9 match)
395 '(("-bootclasspath" ,bootcp)
400 (let ((classpath (getenv "CLASSPATH")))
404 (string-append ":" classpath)
406 (receive (vm-args other-args)
407 ;; Separate VM arguments from arguments to ECJ.
408 (partition (cut string-prefix? "-J" <>)
409 (fold (lambda (default acc)
410 (if (member (first default) acc)
411 acc (append default acc)))
415 ;; Remove "-J" prefix
416 (map (cut string-drop <> 2) vm-args)
417 '("org.eclipse.jdt.internal.compiler.batch.Main")
418 (cons "-nowarn" other-args)))))
420 (let ((args (cdr (command-line))))
422 (format (current-error-port) "javac: no arguments given!\n")
427 `(("guile" ,guile-2.2)
428 ("ecj-bootstrap" ,ecj-bootstrap)
430 ("sablevm-classpath" ,sablevm-classpath)))
431 (description "This package provides a wrapper around the @dfn{Eclipse
432 compiler for Java} (ecj) with a command line interface that is compatible with
433 the standard javac executable.")))
435 ;; Note: All the tool wrappers (e.g. for javah, javac, etc) fail with
436 ;; java.lang.UnsupportedClassVersionError. They simply won't run on the old
437 ;; sablevm. We use Classpath 0.99 to build JamVM, on which the Classpath
438 ;; tools do run. Using these Classpath tools on JamVM we can then build the
439 ;; development version of GNU Classpath.
440 (define classpath-on-sablevm
446 (uri (string-append "mirror://gnu/classpath/classpath-"
450 "1j7cby4k66f1nvckm48xcmh352b1d1b33qk7l6hi7dp9i9zjjagr"))))
451 (build-system gnu-build-system)
454 (list (string-append "--with-ecj-jar="
455 (assoc-ref %build-inputs "ecj-bootstrap")
456 "/share/java/ecj-bootstrap.jar")
457 (string-append "JAVAC="
458 (assoc-ref %build-inputs "ecj-javac-wrapper")
460 (string-append "JAVA="
461 (assoc-ref %build-inputs "sablevm")
464 "ac_cv_prog_java_works=yes" ; trust me
468 "--disable-gconf-peer"
474 (modify-phases %standard-phases
475 (add-after 'install 'install-data
476 (lambda _ (zero? (system* "make" "install-data")))))))
478 `(("ecj-bootstrap" ,ecj-bootstrap)
479 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
482 ("sablevm-classpath" ,sablevm-classpath)
484 ("pkg-config" ,pkg-config)))
485 (home-page "https://www.gnu.org/software/classpath/")
486 (synopsis "Essential libraries for Java")
487 (description "GNU Classpath is a project to create core class libraries
488 for use with runtimes, compilers and tools for the Java programming
490 ;; GPLv2 or later, with special linking exception.
491 (license license:gpl2+)))
493 (define jamvm-bootstrap
499 (uri (string-append "mirror://sourceforge/jamvm/jamvm/"
500 "JamVM%20" version "/jamvm-"
504 "1nl0zxz8y5x8gwsrm7n32bry4dx8x70p8z3s9jbdvs8avyb8whkn"))))
505 (build-system gnu-build-system)
508 (list (string-append "--with-classpath-install-dir="
509 (assoc-ref %build-inputs "classpath")))))
511 `(("classpath" ,classpath-on-sablevm)
512 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
514 (home-page "http://jamvm.sourceforge.net/")
515 (synopsis "Small Java Virtual Machine")
516 (description "JamVM is a Java Virtual Machine conforming to the JVM
517 specification edition 2 (blue book). It is extremely small. However, unlike
518 other small VMs it supports the full spec, including object finalisation and
520 (license license:gpl2+)))
522 ;; We need this because the tools provided by the latest release of GNU
523 ;; Classpath don't actually work with sablevm.
524 (define classpath-jamvm-wrappers
525 (package (inherit classpath-on-sablevm)
526 (name "classpath-jamvm-wrappers")
528 (build-system trivial-build-system)
530 `(#:modules ((guix build utils))
533 (use-modules (guix build utils))
534 (let* ((bash (assoc-ref %build-inputs "bash"))
535 (jamvm (assoc-ref %build-inputs "jamvm"))
536 (classpath (assoc-ref %build-inputs "classpath"))
537 (bin (string-append (assoc-ref %outputs "out")
540 (for-each (lambda (tool)
541 (with-output-to-file (string-append bin tool)
543 (format #t "#!~a/bin/sh
544 ~a/bin/jamvm -classpath ~a/share/classpath/tools.zip \
545 gnu.classpath.tools.~a.~a $@"
546 bash jamvm classpath tool
547 (if (string=? "native2ascii" tool)
548 "Native2ASCII" "Main"))))
549 (chmod (string-append bin tool) #o755))
559 ("jamvm" ,jamvm-bootstrap)
560 ("classpath" ,classpath-on-sablevm)))
562 (synopsis "Executables from GNU Classpath")
563 (description "This package provides wrappers around the tools provided by
564 the GNU Classpath library. They are executed by the JamVM virtual
567 (define ecj-javac-on-jamvm-wrapper
568 (package (inherit ecj-javac-wrapper)
569 (name "ecj-javac-on-jamvm-wrapper")
571 `(#:modules ((guix build utils))
573 ;; TODO: This builder is exactly the same as in ecj-javac-wrapper,
574 ;; except that the backend is 'jamvm here. Can we reuse the same
576 (let ((backend 'jamvm))
577 (use-modules (guix build utils))
578 (let* ((bin (string-append (assoc-ref %outputs "out") "/bin"))
579 (target (string-append bin "/javac"))
580 (guile (string-append (assoc-ref %build-inputs "guile")
582 (ecj (string-append (assoc-ref %build-inputs "ecj-bootstrap")
583 "/share/java/ecj-bootstrap.jar"))
586 (string-append (assoc-ref %build-inputs "sablevm")
587 "/lib/sablevm/bin/java"))
589 (string-append (assoc-ref %build-inputs "jamvm")
591 (bootcp (case backend
593 (let ((jvmlib (string-append
594 (assoc-ref %build-inputs "sablevm-classpath")
596 (string-append jvmlib "/jre/lib/rt.jar")))
598 (let ((jvmlib (string-append (assoc-ref %build-inputs "classpath")
599 "/share/classpath")))
600 (string-append jvmlib "/lib/glibj.zip:"
601 jvmlib "/lib/tools.zip"))))))
603 (with-output-to-file target
605 (format #t "#!~a --no-auto-compile\n!#\n" guile)
607 `(begin (use-modules (ice-9 match)
613 '(("-bootclasspath" ,bootcp)
618 (let ((classpath (getenv "CLASSPATH")))
622 (string-append ":" classpath)
624 (receive (vm-args other-args)
625 ;; Separate VM arguments from arguments to ECJ.
626 (partition (cut string-prefix? "-J" <>)
627 (fold (lambda (default acc)
628 (if (member (first default) acc)
629 acc (append default acc)))
633 ;; Remove "-J" prefix
634 (map (cut string-drop <> 2) vm-args)
635 '("org.eclipse.jdt.internal.compiler.batch.Main")
636 (cons "-nowarn" other-args)))))
638 (let ((args (cdr (command-line))))
640 (format (current-error-port) "javac: no arguments given!\n")
645 `(("guile" ,guile-2.2)
646 ("ecj-bootstrap" ,ecj-bootstrap)
647 ("jamvm" ,jamvm-bootstrap)
648 ("classpath" ,classpath-on-sablevm)))
649 (description "This package provides a wrapper around the @dfn{Eclipse
650 compiler for Java} (ecj) with a command line interface that is compatible with
651 the standard javac executable. The tool runs on JamVM instead of SableVM.")))
653 ;; The last release of GNU Classpath is 0.99 and it happened in 2012. Since
654 ;; then Classpath has gained much more support for Java 1.6.
655 (define-public classpath-devel
656 (let ((commit "e7c13ee0cf2005206fbec0eca677f8cf66d5a103")
658 (package (inherit classpath-on-sablevm)
659 (version (string-append "0.99-" revision "." (string-take commit 9)))
663 (url "https://git.savannah.gnu.org/git/classpath.git")
665 (file-name (string-append "classpath-" version "-checkout"))
668 "1v2rww76ww322mpg3s12a1kkc6gkp31bm9gcxs532h0wq285fiw4"))))
671 ;; Ensure that the initial heap size is smaller than the maximum
672 ;; size. By default only Xmx is set, which can lead to invalid
673 ;; memory settings on some machines with a lot of memory.
674 '("JAVAC_MEM_OPT=-J-Xms512M -J-Xmx768M")
676 (list (string-append "--with-ecj-jar="
677 (assoc-ref %build-inputs "ecj-bootstrap")
678 "/share/java/ecj-bootstrap.jar")
679 (string-append "--with-javac="
680 (assoc-ref %build-inputs "ecj-javac-wrapper")
682 (string-append "JAVA="
683 (assoc-ref %build-inputs "jamvm")
686 "ac_cv_prog_java_works=yes" ; trust me
690 "--disable-gconf-peer"
696 (modify-phases %standard-phases
697 ;; XXX The bootstrap phase executes autogen.sh, which fails after
698 ;; complaining about the lack of gettext.
700 (lambda _ (invoke "autoreconf" "-vif")))
701 (add-after 'unpack 'remove-unsupported-annotations
703 (substitute* (find-files "java" "\\.java$")
706 (add-after 'install 'install-data
707 (lambda _ (zero? (system* "make" "install-data")))))))
709 `(("autoconf" ,autoconf)
710 ("automake" ,automake)
712 ("gettext" ,gettext-minimal)
714 ("classpath-jamvm-wrappers" ,classpath-jamvm-wrappers) ; for javah
715 ("ecj-bootstrap" ,ecj-bootstrap)
716 ("ecj-javac-wrapper" ,ecj-javac-on-jamvm-wrapper)
718 ("jamvm" ,jamvm-bootstrap)
720 ("pkg-config" ,pkg-config))))))
723 (package (inherit jamvm-bootstrap)
725 `(("classpath" ,classpath-devel)
726 ("ecj-javac-wrapper" ,ecj-javac-on-jamvm-wrapper)
729 (define ecj-javac-on-jamvm-wrapper-final
730 (package (inherit ecj-javac-on-jamvm-wrapper)
732 `(("guile" ,guile-2.2)
733 ("ecj-bootstrap" ,ecj-bootstrap)
735 ("classpath" ,classpath-devel)))))
737 ;; The bootstrap JDK consisting of jamvm, classpath-devel,
738 ;; ecj-javac-on-jamvm-wrapper-final cannot build Icedtea 2.x directly, because
739 ;; it's written in Java 7. It can, however, build the unmaintained Icedtea
740 ;; 1.x, which uses Java 6 only.
741 (define-public icedtea-6
748 "http://icedtea.wildebeest.org/download/source/icedtea6-"
752 "0bg9sb4f7qbq77c0zf9m17p47ga0kf0r9622g9p12ysg26jd1ksg"))
753 (modules '((guix build utils)))
756 (substitute* "Makefile.in"
757 ;; do not leak information about the build host
758 (("DISTRIBUTION_ID=\"\\$\\(DIST_ID\\)\"")
759 "DISTRIBUTION_ID=\"\\\"guix\\\"\""))
761 (build-system gnu-build-system)
762 (outputs '("out" ; Java Runtime Environment
763 "jdk" ; Java Development Kit
764 "doc")) ; all documentation
766 `(;; There are many failing tests and many are known to fail upstream.
769 ;; The DSOs use $ORIGIN to refer to each other, but (guix build
770 ;; gremlin) doesn't support it yet, so skip this phase.
771 #:validate-runpath? #f
773 #:modules ((guix build utils)
774 (guix build gnu-build-system)
778 `("--enable-bootstrap"
781 "--with-parallel-jobs"
782 "--disable-downloading"
784 ,(string-append "--with-ecj="
785 (assoc-ref %build-inputs "ecj")
786 "/share/java/ecj-bootstrap.jar")
787 ,(string-append "--with-jar="
788 (assoc-ref %build-inputs "fastjar")
790 ,(string-append "--with-jdk-home="
791 (assoc-ref %build-inputs "classpath"))
792 ,(string-append "--with-java="
793 (assoc-ref %build-inputs "jamvm")
796 (modify-phases %standard-phases
798 (lambda* (#:key source inputs #:allow-other-keys)
799 (and (zero? (system* "tar" "xvf" source))
801 (chdir (string-append "icedtea6-" ,version))
803 (copy-recursively (assoc-ref inputs "openjdk-src") "openjdk")
804 ;; The convenient OpenJDK source bundle is no longer
805 ;; available for download, so we have to take the sources
806 ;; from the Mercurial repositories and change the Makefile
807 ;; to avoid tests for the OpenJDK zip archive.
808 (with-directory-excursion "openjdk"
809 (for-each (lambda (part)
813 (string-append part "-src"))
815 '("jdk" "hotspot" "corba"
816 "langtools" "jaxp" "jaxws")))
817 (substitute* "Makefile.in"
818 (("echo \"ERROR: No up-to-date OpenJDK zip available\"; exit -1;")
819 "echo \"trust me\";")
820 ;; The contents of the bootstrap directory must be
821 ;; writeable but when copying from the store they are
823 (("mkdir -p lib/rt" line)
824 (string-append line "; chmod -R u+w $(BOOT_DIR)")))
825 (zero? (system* "chmod" "-R" "u+w" "openjdk"))
827 (add-after 'unpack 'use-classpath
828 (lambda* (#:key inputs #:allow-other-keys)
829 (let ((jvmlib (assoc-ref inputs "classpath")))
830 ;; Classpath does not provide rt.jar.
831 (substitute* "Makefile.in"
832 (("\\$\\(SYSTEM_JDK_DIR\\)/jre/lib/rt.jar")
833 (string-append jvmlib "/share/classpath/glibj.zip")))
834 ;; Make sure we can find all classes.
836 (string-append jvmlib "/share/classpath/glibj.zip:"
837 jvmlib "/share/classpath/tools.zip"))
839 (string-append "-cp "
840 jvmlib "/share/classpath/glibj.zip:"
841 jvmlib "/share/classpath/tools.zip")))
843 (add-after 'unpack 'patch-patches
845 ;; shebang in patches so that they apply cleanly
846 (substitute* '("patches/jtreg-jrunscript.patch"
847 "patches/hotspot/hs23/drop_unlicensed_test.patch")
848 (("#!/bin/sh") (string-append "#!" (which "sh"))))
850 (add-after 'unpack 'patch-paths
851 (lambda* (#:key inputs #:allow-other-keys)
852 ;; buildtree.make generates shell scripts, so we need to replace
853 ;; the generated shebang
854 (substitute* '("openjdk/hotspot/make/linux/makefiles/buildtree.make")
855 (("/bin/sh") (which "bash")))
857 (let ((corebin (string-append
858 (assoc-ref inputs "coreutils") "/bin/"))
859 (binbin (string-append
860 (assoc-ref inputs "binutils") "/bin/"))
861 (grepbin (string-append
862 (assoc-ref inputs "grep") "/bin/")))
863 (substitute* '("openjdk/jdk/make/common/shared/Defs-linux.gmk"
864 "openjdk/corba/make/common/shared/Defs-linux.gmk")
865 (("UNIXCOMMAND_PATH = /bin/")
866 (string-append "UNIXCOMMAND_PATH = " corebin))
867 (("USRBIN_PATH = /usr/bin/")
868 (string-append "USRBIN_PATH = " corebin))
869 (("DEVTOOLS_PATH *= */usr/bin/")
870 (string-append "DEVTOOLS_PATH = " corebin))
871 (("COMPILER_PATH *= */usr/bin/")
872 (string-append "COMPILER_PATH = "
873 (assoc-ref inputs "gcc") "/bin/"))
874 (("DEF_OBJCOPY *=.*objcopy")
875 (string-append "DEF_OBJCOPY = " (which "objcopy"))))
877 ;; fix path to alsa header
878 (substitute* "openjdk/jdk/make/common/shared/Sanity.gmk"
879 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
880 (string-append "ALSA_INCLUDE="
881 (assoc-ref inputs "alsa-lib")
882 "/include/alsa/version.h")))
884 ;; fix hard-coded utility paths
885 (substitute* '("openjdk/jdk/make/common/shared/Defs-utils.gmk"
886 "openjdk/corba/make/common/shared/Defs-utils.gmk")
888 (string-append "ECHO = " (which "echo")))
890 (string-append "GREP = " (which "grep")))
892 (string-append "EGREP = " (which "egrep")))
894 (string-append "CPIO = " (which "cpio")))
895 (("READELF *=.*readelf")
896 (string-append "READELF = " (which "readelf")))
898 (string-append "AR = " (which "ar")))
900 (string-append "TAR = " (which "tar")))
902 (string-append "AS = " (which "as")))
904 (string-append "LD = " (which "ld")))
906 (string-append "STRIP = " (which "strip")))
908 (string-append "NM = " (which "nm")))
910 (string-append "SH = " (which "bash")))
912 (string-append "FIND = " (which "find")))
914 (string-append "LDD = " (which "ldd")))
915 (("NAWK *=.*(n|g)awk")
916 (string-append "NAWK = " (which "gawk")))
918 (string-append "XARGS = " (which "xargs")))
920 (string-append "UNZIP = " (which "unzip")))
922 (string-append "ZIPEXE = " (which "zip")))
924 (string-append "SED = " (which "sed"))))
926 ;; Some of these timestamps cause problems as they are more than
927 ;; 10 years ago, failing the build process.
929 "openjdk/jdk/src/share/classes/java/util/CurrencyData.properties"
930 (("AZ=AZM;2005-12-31-20-00-00;AZN") "AZ=AZN")
931 (("MZ=MZM;2006-06-30-22-00-00;MZN") "MZ=MZN")
932 (("RO=ROL;2005-06-30-21-00-00;RON") "RO=RON")
933 (("TR=TRL;2004-12-31-22-00-00;TRY") "TR=TRY"))
935 (add-before 'configure 'set-additional-paths
936 (lambda* (#:key inputs #:allow-other-keys)
938 (string-append (assoc-ref inputs "libxrender")
939 "/include/X11/extensions" ":"
940 (assoc-ref inputs "libxtst")
941 "/include/X11/extensions" ":"
942 (assoc-ref inputs "libxinerama")
943 "/include/X11/extensions" ":"
944 (or (getenv "CPATH") "")))
945 (setenv "ALT_CUPS_HEADERS_PATH"
946 (string-append (assoc-ref inputs "cups")
948 (setenv "ALT_FREETYPE_HEADERS_PATH"
949 (string-append (assoc-ref inputs "freetype")
951 (setenv "ALT_FREETYPE_LIB_PATH"
952 (string-append (assoc-ref inputs "freetype")
956 (lambda* (#:key outputs #:allow-other-keys)
957 (let ((doc (string-append (assoc-ref outputs "doc")
958 "/share/doc/icedtea"))
959 (jre (assoc-ref outputs "out"))
960 (jdk (assoc-ref outputs "jdk")))
961 (copy-recursively "openjdk.build/docs" doc)
962 (copy-recursively "openjdk.build/j2re-image" jre)
963 (copy-recursively "openjdk.build/j2sdk-image" jdk))
966 `(("ant" ,ant-bootstrap)
967 ("alsa-lib" ,alsa-lib)
969 ("classpath" ,classpath-devel)
970 ("coreutils" ,coreutils)
973 ("ecj" ,ecj-bootstrap)
974 ("ecj-javac" ,ecj-javac-on-jamvm-wrapper-final)
976 ("fontconfig" ,fontconfig)
977 ("freetype" ,freetype)
988 ("libxcomposite" ,libxcomposite)
990 ("libxinerama" ,libxinerama)
991 ("libxrender" ,libxrender)
992 ("libxslt" ,libxslt) ;for xsltproc
995 ("mit-krb5" ,mit-krb5)
997 ("nss-certs" ,nss-certs)
999 ("pkg-config" ,pkg-config)
1000 ("procps" ,procps) ;for "free", even though I'm not sure we should use it
1010 (url "http://hg.openjdk.java.net/jdk6/jdk6/")
1011 (changeset "jdk6-b41")))
1014 "14q47yfg586fs64w30g8mk92m5dkxsvr36zzh0ra99xk5x0x96mv"))))
1019 (url "http://hg.openjdk.java.net/jdk6/jdk6/jdk/")
1020 (changeset "jdk6-b41")))
1023 "165824nhg1k1dx6zs9dny0j49rmk35jw5b13dmz8c77jfajml4v9"))))
1028 (url "http://hg.openjdk.java.net/jdk6/jdk6/hotspot/")
1029 (changeset "jdk6-b41")))
1032 "07lc1z4k5dj9nrc1wvwmpvxr3xgxrdkdh53xb95skk5ij49yagfd"))))
1037 (url "http://hg.openjdk.java.net/jdk6/jdk6/corba/")
1038 (changeset "jdk6-b41")))
1041 "1p9g1r9dnax2iwp7yb59qx7m4nmshqhwmrb2b8jj8zgbd9dl2i3q"))))
1046 (url "http://hg.openjdk.java.net/jdk6/jdk6/langtools/")
1047 (changeset "jdk6-b41")))
1050 "1x52wd67fynbbd9ild6fb4wvba3f5hhwk03qdjfazd0a1qr37z3d"))))
1055 (url "http://hg.openjdk.java.net/jdk6/jdk6/jaxp/")
1056 (changeset "jdk6-b41")))
1059 "0shlqrvzpr4nrkmv215lbxnby63s3yvbdh1yxcayznsyqwa4nlxm"))))
1064 (url "http://hg.openjdk.java.net/jdk6/jdk6/jaxws/")
1065 (changeset "jdk6-b41")))
1068 "0835lkw8vib1xhp8lxnybhlvzdh699hbi4mclxanydjk63zbpxk0"))))))
1069 (home-page "http://icedtea.classpath.org")
1070 (synopsis "Java development kit")
1072 "This package provides the OpenJDK built with the IcedTea build harness.
1073 This version of the OpenJDK is no longer maintained and is only used for
1074 bootstrapping purposes.")
1075 ;; IcedTea is released under the GPL2 + Classpath exception, which is the
1076 ;; same license as both GNU Classpath and OpenJDK.
1077 (license license:gpl2+)))
1079 (define-public icedtea-7
1080 (let* ((version "2.6.13")
1081 (drop (lambda (name hash)
1085 "http://icedtea.classpath.org/download/drops"
1086 "/icedtea7/" version "/" name ".tar.bz2"))
1087 (sha256 (base32 hash))))))
1094 "http://icedtea.wildebeest.org/download/source/icedtea-"
1098 "1w331rdqx1dcx2xb0fmjmrkdc71xqn20fxsgw8by4xhiblh88khh"))
1099 (modules '((guix build utils)))
1102 (substitute* "Makefile.in"
1103 ;; do not leak information about the build host
1104 (("DISTRIBUTION_ID=\"\\$\\(DIST_ID\\)\"")
1105 "DISTRIBUTION_ID=\"\\\"guix\\\"\""))
1107 (build-system gnu-build-system)
1108 (outputs '("out" ; Java Runtime Environment
1109 "jdk" ; Java Development Kit
1110 "doc")) ; all documentation
1112 `(;; There are many test failures. Some are known to
1113 ;; fail upstream, others relate to not having an X
1114 ;; server running at test time, yet others are a
1115 ;; complete mystery to me.
1117 ;; hotspot: passed: 241; failed: 45; error: 2
1118 ;; langtools: passed: 1,934; failed: 26
1122 ;; The DSOs use $ORIGIN to refer to each other, but (guix build
1123 ;; gremlin) doesn't support it yet, so skip this phase.
1124 #:validate-runpath? #f
1126 ;; Apparently, the C locale is needed for some of the tests.
1129 #:modules ((guix build utils)
1130 (guix build gnu-build-system)
1137 ;; TODO: package pcsc and sctp, and add to inputs
1138 `("--disable-system-pcsc"
1139 "--disable-system-sctp"
1140 "--enable-bootstrap"
1143 "--disable-downloading"
1144 "--disable-tests" ;they are run in the check phase instead
1145 "--with-openjdk-src-dir=./openjdk.src"
1146 ,(string-append "--with-jdk-home="
1147 (assoc-ref %build-inputs "jdk")))
1150 (modify-phases %standard-phases
1152 (lambda* (#:key source inputs #:allow-other-keys)
1153 (let ((target (string-append "icedtea-" ,version))
1154 (unpack (lambda* (name #:optional dir)
1156 (string-drop-right name 5))))
1158 (zero? (system* "tar" "xvf"
1159 (assoc-ref inputs name)
1161 "--strip-components=1"))))))
1164 (zero? (system* "tar" "xvf" source
1165 "-C" target "--strip-components=1"))
1167 (unpack "openjdk-src" "openjdk.src")
1168 (with-directory-excursion "openjdk.src"
1170 (filter (cut string-suffix? "-drop" <>)
1175 (add-after 'unpack 'fix-x11-extension-include-path
1176 (lambda* (#:key inputs #:allow-other-keys)
1177 (substitute* "openjdk.src/jdk/make/sun/awt/mawt.gmk"
1178 (((string-append "\\$\\(firstword \\$\\(wildcard "
1179 "\\$\\(OPENWIN_HOME\\)"
1180 "/include/X11/extensions\\).*$"))
1181 (string-append (assoc-ref inputs "libxrender")
1182 "/include/X11/extensions"
1183 " -I" (assoc-ref inputs "libxtst")
1184 "/include/X11/extensions"
1185 " -I" (assoc-ref inputs "libxinerama")
1186 "/include/X11/extensions"))
1187 (("\\$\\(wildcard /usr/include/X11/extensions\\)\\)") ""))
1189 (add-after 'unpack 'patch-paths
1191 ;; buildtree.make generates shell scripts, so we need to replace
1192 ;; the generated shebang
1193 (substitute* '("openjdk.src/hotspot/make/linux/makefiles/buildtree.make")
1194 (("/bin/sh") (which "bash")))
1196 (let ((corebin (string-append
1197 (assoc-ref %build-inputs "coreutils") "/bin/"))
1198 (binbin (string-append
1199 (assoc-ref %build-inputs "binutils") "/bin/"))
1200 (grepbin (string-append
1201 (assoc-ref %build-inputs "grep") "/bin/")))
1202 (substitute* '("openjdk.src/jdk/make/common/shared/Defs-linux.gmk"
1203 "openjdk.src/corba/make/common/shared/Defs-linux.gmk")
1204 (("UNIXCOMMAND_PATH = /bin/")
1205 (string-append "UNIXCOMMAND_PATH = " corebin))
1206 (("USRBIN_PATH = /usr/bin/")
1207 (string-append "USRBIN_PATH = " corebin))
1208 (("DEVTOOLS_PATH *= */usr/bin/")
1209 (string-append "DEVTOOLS_PATH = " corebin))
1210 (("COMPILER_PATH *= */usr/bin/")
1211 (string-append "COMPILER_PATH = "
1212 (assoc-ref %build-inputs "gcc") "/bin/"))
1213 (("DEF_OBJCOPY *=.*objcopy")
1214 (string-append "DEF_OBJCOPY = " (which "objcopy"))))
1216 ;; fix path to alsa header
1217 (substitute* "openjdk.src/jdk/make/common/shared/Sanity.gmk"
1218 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
1219 (string-append "ALSA_INCLUDE="
1220 (assoc-ref %build-inputs "alsa-lib")
1221 "/include/alsa/version.h")))
1223 ;; fix hard-coded utility paths
1224 (substitute* '("openjdk.src/jdk/make/common/shared/Defs-utils.gmk"
1225 "openjdk.src/corba/make/common/shared/Defs-utils.gmk")
1227 (string-append "ECHO = " (which "echo")))
1229 (string-append "GREP = " (which "grep")))
1230 (("EGREP *=.*egrep")
1231 (string-append "EGREP = " (which "egrep")))
1233 (string-append "CPIO = " (which "cpio")))
1234 (("READELF *=.*readelf")
1235 (string-append "READELF = " (which "readelf")))
1237 (string-append "AR = " (which "ar")))
1239 (string-append "TAR = " (which "tar")))
1241 (string-append "AS = " (which "as")))
1243 (string-append "LD = " (which "ld")))
1244 (("STRIP *=.*strip")
1245 (string-append "STRIP = " (which "strip")))
1247 (string-append "NM = " (which "nm")))
1249 (string-append "SH = " (which "bash")))
1251 (string-append "FIND = " (which "find")))
1253 (string-append "LDD = " (which "ldd")))
1254 (("NAWK *=.*(n|g)awk")
1255 (string-append "NAWK = " (which "gawk")))
1256 (("XARGS *=.*xargs")
1257 (string-append "XARGS = " (which "xargs")))
1258 (("UNZIP *=.*unzip")
1259 (string-append "UNZIP = " (which "unzip")))
1261 (string-append "ZIPEXE = " (which "zip")))
1263 (string-append "SED = " (which "sed"))))
1265 ;; Some of these timestamps cause problems as they are more than
1266 ;; 10 years ago, failing the build process.
1268 "openjdk.src/jdk/src/share/classes/java/util/CurrencyData.properties"
1269 (("AZ=AZM;2005-12-31-20-00-00;AZN") "AZ=AZN")
1270 (("MZ=MZM;2006-06-30-22-00-00;MZN") "MZ=MZN")
1271 (("RO=ROL;2005-06-30-21-00-00;RON") "RO=RON")
1272 (("TR=TRL;2004-12-31-22-00-00;TRY") "TR=TRY")))
1274 (add-before 'configure 'set-additional-paths
1275 (lambda* (#:key inputs #:allow-other-keys)
1276 (substitute* "openjdk.src/jdk/make/common/shared/Sanity.gmk"
1277 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
1278 (string-append "ALSA_INCLUDE="
1279 (assoc-ref inputs "alsa-lib")
1280 "/include/alsa/version.h")))
1283 (string-append (assoc-ref inputs "libxcomposite")
1284 "/include/X11/extensions" ":"
1285 (assoc-ref inputs "libxrender")
1286 "/include/X11/extensions" ":"
1287 (assoc-ref inputs "libxtst")
1288 "/include/X11/extensions" ":"
1289 (assoc-ref inputs "libxinerama")
1290 "/include/X11/extensions" ":"
1291 (or (getenv "CPATH") "")))
1292 (setenv "ALT_OBJCOPY" (which "objcopy"))
1293 (setenv "ALT_CUPS_HEADERS_PATH"
1294 (string-append (assoc-ref inputs "cups")
1296 (setenv "ALT_FREETYPE_HEADERS_PATH"
1297 (string-append (assoc-ref inputs "freetype")
1299 (setenv "ALT_FREETYPE_LIB_PATH"
1300 (string-append (assoc-ref inputs "freetype")
1303 (add-before 'check 'fix-test-framework
1305 ;; Fix PATH in test environment
1306 (substitute* "test/jtreg/com/sun/javatest/regtest/Main.java"
1307 (("PATH=/bin:/usr/bin")
1308 (string-append "PATH=" (getenv "PATH"))))
1309 (substitute* "test/jtreg/com/sun/javatest/util/SysEnv.java"
1310 (("/usr/bin/env") (which "env")))
1311 (substitute* "openjdk.src/hotspot/test/test_env.sh"
1312 (("/bin/rm") (which "rm"))
1313 (("/bin/cp") (which "cp"))
1314 (("/bin/mv") (which "mv")))
1316 (add-before 'check 'fix-hotspot-tests
1318 (with-directory-excursion "openjdk.src/hotspot/test/"
1319 (substitute* "jprt.config"
1320 (("PATH=\"\\$\\{path4sdk\\}\"")
1321 (string-append "PATH=" (getenv "PATH")))
1322 (("make=/usr/bin/make")
1323 (string-append "make=" (which "make"))))
1324 (substitute* '("runtime/6626217/Test6626217.sh"
1325 "runtime/7110720/Test7110720.sh")
1326 (("/bin/rm") (which "rm"))
1327 (("/bin/cp") (which "cp"))
1328 (("/bin/mv") (which "mv"))))
1330 (add-before 'check 'fix-jdk-tests
1332 (with-directory-excursion "openjdk.src/jdk/test/"
1333 (substitute* "com/sun/jdi/JdbReadTwiceTest.sh"
1334 (("/bin/pwd") (which "pwd")))
1335 (substitute* "com/sun/jdi/ShellScaffold.sh"
1336 (("/bin/kill") (which "kill")))
1337 (substitute* "start-Xvfb.sh"
1338 ;;(("/usr/bin/X11/Xvfb") (which "Xvfb"))
1339 (("/usr/bin/nohup") (which "nohup")))
1340 (substitute* "javax/security/auth/Subject/doAs/Test.sh"
1341 (("/bin/rm") (which "rm")))
1342 (substitute* "tools/launcher/MultipleJRE.sh"
1343 (("echo \"#!/bin/sh\"")
1344 (string-append "echo \"#!" (which "rm") "\""))
1345 (("/usr/bin/zip") (which "zip")))
1346 (substitute* "com/sun/jdi/OnThrowTest.java"
1347 (("#!/bin/sh") (string-append "#!" (which "sh"))))
1348 (substitute* "java/lang/management/OperatingSystemMXBean/GetSystemLoadAverage.java"
1349 (("/usr/bin/uptime") (which "uptime")))
1350 (substitute* "java/lang/ProcessBuilder/Basic.java"
1351 (("/usr/bin/env") (which "env"))
1352 (("/bin/false") (which "false"))
1353 (("/bin/true") (which "true"))
1354 (("/bin/cp") (which "cp"))
1355 (("/bin/sh") (which "sh")))
1356 (substitute* "java/lang/ProcessBuilder/FeelingLucky.java"
1357 (("/bin/sh") (which "sh")))
1358 (substitute* "java/lang/ProcessBuilder/Zombies.java"
1359 (("/usr/bin/perl") (which "perl"))
1360 (("/bin/ps") (which "ps"))
1361 (("/bin/true") (which "true")))
1362 (substitute* "java/lang/Runtime/exec/ConcurrentRead.java"
1363 (("/usr/bin/tee") (which "tee")))
1364 (substitute* "java/lang/Runtime/exec/ExecWithDir.java"
1365 (("/bin/true") (which "true")))
1366 (substitute* "java/lang/Runtime/exec/ExecWithInput.java"
1367 (("/bin/cat") (which "cat")))
1368 (substitute* "java/lang/Runtime/exec/ExitValue.java"
1369 (("/bin/sh") (which "sh"))
1370 (("/bin/true") (which "true"))
1371 (("/bin/kill") (which "kill")))
1372 (substitute* "java/lang/Runtime/exec/LotsOfDestroys.java"
1373 (("/usr/bin/echo") (which "echo")))
1374 (substitute* "java/lang/Runtime/exec/LotsOfOutput.java"
1375 (("/usr/bin/cat") (which "cat")))
1376 (substitute* "java/lang/Runtime/exec/SleepyCat.java"
1377 (("/bin/cat") (which "cat"))
1378 (("/bin/sleep") (which "sleep"))
1379 (("/bin/sh") (which "sh")))
1380 (substitute* "java/lang/Runtime/exec/StreamsSurviveDestroy.java"
1381 (("/bin/cat") (which "cat")))
1382 (substitute* "java/rmi/activation/CommandEnvironment/SetChildEnv.java"
1383 (("/bin/chmod") (which "chmod")))
1384 (substitute* "java/util/zip/ZipFile/Assortment.java"
1385 (("/bin/sh") (which "sh"))))
1389 ;; The "make check-*" targets always return zero, so we need to
1390 ;; check for errors in the associated log files to determine
1391 ;; whether any tests have failed.
1392 (use-modules (ice-9 rdelim))
1393 (let* ((error-pattern (make-regexp "^(Error|FAILED):.*"))
1394 (checker (lambda (port)
1396 (let ((line (read-line port)))
1398 ((eof-object? line) #t)
1399 ((regexp-exec error-pattern line) #f)
1401 (run-test (lambda (test)
1402 (system* "make" test)
1403 (call-with-input-file
1404 (string-append "test/" test ".log")
1407 (and (run-test "check-hotspot")
1408 (run-test "check-langtools")
1409 (run-test "check-jdk"))))))
1411 (lambda* (#:key outputs #:allow-other-keys)
1412 (let ((doc (string-append (assoc-ref outputs "doc")
1413 "/share/doc/icedtea"))
1414 (jre (assoc-ref outputs "out"))
1415 (jdk (assoc-ref outputs "jdk")))
1416 (copy-recursively "openjdk.build/docs" doc)
1417 (copy-recursively "openjdk.build/j2re-image" jre)
1418 (copy-recursively "openjdk.build/j2sdk-image" jdk))
1420 ;; Some of the libraries in the lib/amd64 folder link to libjvm.so.
1421 ;; But that shared object is located in the server/ folder, so it
1422 ;; cannot be found. This phase creates a symbolic link in the
1423 ;; lib/amd64 folder so that the other libraries can find it.
1426 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
1428 ;; FIXME: Find the bug in the build system, so that this symlink is
1430 (add-after 'install 'install-libjvm
1431 (lambda* (#:key inputs outputs #:allow-other-keys)
1432 (let* ((lib-path (string-append (assoc-ref outputs "out")
1434 (symlink (string-append lib-path "/server/libjvm.so")
1435 (string-append lib-path "/libjvm.so")))
1437 ;; By default IcedTea only generates an empty keystore. In order to
1438 ;; be able to use certificates in Java programs we need to generate a
1439 ;; keystore from a set of certificates. For convenience we use the
1440 ;; certificates from the nss-certs package.
1441 (add-after 'install 'install-keystore
1442 (lambda* (#:key inputs outputs #:allow-other-keys)
1443 (let* ((keystore "cacerts")
1444 (certs-dir (string-append (assoc-ref inputs "nss-certs")
1446 (keytool (string-append (assoc-ref outputs "jdk")
1448 (define (extract-cert file target)
1449 (call-with-input-file file
1451 (call-with-output-file target
1453 (let loop ((line (read-line in 'concat))
1456 ((eof-object? line) #t)
1457 ((string-prefix? "-----BEGIN" line)
1459 (loop (read-line in 'concat) #t))
1460 ((string-prefix? "-----END" line)
1464 (when copying? (display line out))
1465 (loop (read-line in 'concat) copying?)))))))))
1466 (define (import-cert cert)
1467 (format #t "Importing certificate ~a\n" (basename cert))
1468 (let ((temp "tmpcert"))
1469 (extract-cert cert temp)
1470 (let ((port (open-pipe* OPEN_WRITE keytool
1472 "-alias" (basename cert)
1473 "-keystore" keystore
1474 "-storepass" "changeit"
1476 (display "yes\n" port)
1477 (when (not (zero? (status:exit-val (close-pipe port))))
1478 (format #t "failed to import ~a\n" cert)))
1479 (delete-file temp)))
1481 ;; This is necessary because the certificate directory contains
1482 ;; files with non-ASCII characters in their names.
1483 (setlocale LC_ALL "en_US.utf8")
1484 (setenv "LC_ALL" "en_US.utf8")
1486 (for-each import-cert (find-files certs-dir "\\.pem$"))
1487 (mkdir-p (string-append (assoc-ref outputs "out")
1489 (mkdir-p (string-append (assoc-ref outputs "jdk")
1490 "/jre/lib/security"))
1492 ;; The cacerts files we are going to overwrite are chmod'ed as
1493 ;; read-only (444) in icedtea-8 (which derives from this
1494 ;; package). We have to change this so we can overwrite them.
1495 (chmod (string-append (assoc-ref outputs "out")
1496 "/lib/security/" keystore) #o644)
1497 (chmod (string-append (assoc-ref outputs "jdk")
1498 "/jre/lib/security/" keystore) #o644)
1500 (install-file keystore
1501 (string-append (assoc-ref outputs "out")
1503 (install-file keystore
1504 (string-append (assoc-ref outputs "jdk")
1505 "/jre/lib/security"))
1510 "0l34ikyf62hbzlf9032alzkkqvf7bpmckz4gvirvph755w7gka8l"))
1513 "050gv2jbg1pi6qkn8w18bwpbklfa5b0kymjvan9pncddbj8m84fz"))
1516 "1k6yldwnxfzdg5926r1nlfv8d1r1j7rlp2nkz6gqh05vgyamnfhl"))
1519 "110j7jlz47x2gg6f7653x12mssan5kvj9l9h1m1c8c92drfxbqyk"))
1522 "0d1mca38ksxvdskp9im3pp7fdijhj1n3lwq9w13r9s4v3qyskgdd"))
1525 "0nq5236fzxn3p6x8cgncl56mzcmsj07q9gymysnws4c8byc6n0qj"))
1528 "17bdv39n4lh8l5737c96f3xgamx4y305m067p01cywgp7zaddqws"))
1529 ("ant" ,ant-bootstrap)
1531 ("coreutils" ,coreutils)
1532 ("diffutils" ,diffutils) ;for tests
1535 ("libtool" ,libtool)
1536 ("pkg-config" ,pkg-config)
1542 ("fastjar" ,fastjar)
1543 ("libxslt" ,libxslt) ;for xsltproc
1544 ("nss-certs" ,nss-certs)
1546 ("procps" ,procps) ;for "free", even though I'm not sure we should use it
1547 ("jdk" ,icedtea-6 "jdk")))
1549 `(("alsa-lib" ,alsa-lib)
1552 ("libxcomposite" ,libxcomposite)
1554 ("libxtst" ,libxtst)
1556 ("libxinerama" ,libxinerama)
1557 ("libxrender" ,libxrender)
1558 ("libjpeg" ,libjpeg)
1560 ("mit-krb5" ,mit-krb5)
1563 ("fontconfig" ,fontconfig)
1564 ("freetype" ,freetype)
1568 (home-page "http://icedtea.classpath.org")
1569 (synopsis "Java development kit")
1571 "This package provides the Java development kit OpenJDK built with the
1572 IcedTea build harness.")
1573 ;; IcedTea is released under the GPL2 + Classpath exception, which is the
1574 ;; same license as both GNU Classpath and OpenJDK.
1575 (license license:gpl2+))))
1577 (define-public icedtea-8
1578 (let* ((version "3.7.0")
1579 (drop (lambda (name hash)
1583 "http://icedtea.classpath.org/download/drops"
1584 "/icedtea8/" version "/" name ".tar.xz"))
1585 (sha256 (base32 hash))))))
1586 (package (inherit icedtea-7)
1591 "http://icedtea.wildebeest.org/download/source/icedtea-"
1595 "09yqzn8rpccs7cyv89hhy5zlznpgqw5x3jz0w1ccp0cz1vgs8l5w"))
1596 (modules '((guix build utils)))
1599 (substitute* '("configure"
1601 ;; Do not embed build time
1602 (("(DIST_ID=\"Custom build).*$" _ prefix)
1603 (string-append prefix "\"\n"))
1604 ;; Do not leak information about the build host
1605 (("DIST_NAME=\"\\$build_os\"")
1606 "DIST_NAME=\"guix\""))
1609 `(#:imported-modules
1610 ((guix build ant-build-system)
1611 (guix build syscalls)
1612 ,@%gnu-build-system-modules)
1613 ,@(substitute-keyword-arguments (package-arguments icedtea-7)
1614 ((#:modules modules)
1615 `((guix build utils)
1616 (guix build gnu-build-system)
1617 ((guix build ant-build-system) #:prefix ant:)
1622 ((#:configure-flags flags)
1623 `(let ((jdk (assoc-ref %build-inputs "jdk")))
1624 `( ;;"--disable-bootstrap"
1625 "--enable-bootstrap"
1627 "--disable-downloading"
1628 "--disable-system-pcsc"
1629 "--disable-system-sctp"
1630 "--disable-tests" ;they are run in the check phase instead
1631 "--with-openjdk-src-dir=./openjdk.src"
1632 ,(string-append "--with-jdk-home=" jdk))))
1634 `(modify-phases ,phases
1635 (delete 'fix-x11-extension-include-path)
1636 (delete 'patch-paths)
1637 (delete 'set-additional-paths)
1638 (delete 'patch-patches)
1639 ;; Prevent the keytool from recording the current time when
1640 ;; adding certificates at build time.
1641 (add-after 'unpack 'patch-keystore
1643 (substitute* "openjdk.src/jdk/src/share/classes/sun/security/provider/JavaKeyStore.java"
1644 (("date = new Date\\(\\);")
1646 date = (System.getenv(\"SOURCE_DATE_EPOCH\") != null) ?\
1647 new Date(Long.parseLong(System.getenv(\"SOURCE_DATE_EPOCH\"))) :\
1650 (add-after 'unpack 'patch-jni-libs
1651 ;; Hardcode dynamically loaded libraries.
1653 (let* ((library-path (search-path-as-string->list
1654 (getenv "LIBRARY_PATH")))
1655 (find-library (lambda (name)
1658 (string-append "lib" name ".so")))))
1661 (catch 'decoding-error
1664 (("VERSIONED_JNI_LIB_NAME\\(\"(.*)\", \"(.*)\"\\)"
1666 (format #f "\"~a\"" (find-library name)))
1667 (("JNI_LIB_NAME\\(\"(.*)\"\\)" _ name)
1668 (format #f "\"~a\"" (find-library name)))))
1670 ;; Those are safe to skip.
1671 (format (current-error-port)
1672 "warning: failed to substitute: ~a~%"
1674 (find-files "openjdk.src/jdk/src/solaris/native"
1678 (lambda* (#:key outputs #:allow-other-keys)
1679 (let ((doc (string-append (assoc-ref outputs "doc")
1680 "/share/doc/icedtea"))
1681 (jre (assoc-ref outputs "out"))
1682 (jdk (assoc-ref outputs "jdk")))
1683 (copy-recursively "openjdk.build/docs" doc)
1684 (copy-recursively "openjdk.build/images/j2re-image" jre)
1685 (copy-recursively "openjdk.build/images/j2sdk-image" jdk)
1686 ;; Install the nss.cfg file to JRE to enable SSL/TLS
1688 (copy-file (string-append jdk "/jre/lib/security/nss.cfg")
1689 (string-append jre "/lib/security/nss.cfg"))
1691 (add-after 'install 'strip-jar-timestamps
1692 (assoc-ref ant:%standard-phases 'strip-jar-timestamps)))))))
1694 `(("jdk" ,icedtea-7 "jdk")
1697 "1mj6xgmw31i6qd30qi9dmv7160fbcfq5ikz1jwjihdg2793il19p"))
1700 "1wb8k5zm40zld0986dvmlh5xh3gyixbg9h26sl662zy92amhmyyg"))
1703 "11ma4zz0599cy70xd219v7a8vin7p96xrhhz3wsaw6cjhkzpagah"))
1706 "14m1y0z0fbm5z5zjw3vnq85py8dma84bi3f9cw8rhdyc6skk8q4i"))
1709 "09andnm6xaasnp963hgx42yiflifiljp9z7z85jrfyc5z8a5whmf"))
1712 "0s6lcpc0zckz2fnq98aqf28nz9y3wbi41a3kyaqqa2abwbkm1zwl"))
1715 "15wizy123vhk40chl1b4p552jf2pw2hdww0myf11qab425axz4nw"))
1718 "1ciz1w9j0kz7s1dxdhyqq71nla9icyz6qvn0b9z2zgkklqa98qmm"))
1721 "19pzl3ppaw8j6r5cnyp8qiw3hxijh3hdc46l39g5yfhdl4pr4hpa"))
1724 "0k33anxdzw1icn072wynfmmdjhsv50hay0j1sfkfxny12rb3vgdy"))
1725 ,@(fold alist-delete (package-native-inputs icedtea-7)
1726 '("jdk" "openjdk-src" "corba-drop" "jaxp-drop" "jaxws-drop"
1727 "jdk-drop" "langtools-drop" "hotspot-drop")))))))
1729 (define-public icedtea icedtea-7)
1732 (define-public ant/java8
1733 (package (inherit ant-bootstrap)
1738 (uri (string-append "mirror://apache/ant/source/apache-ant-"
1739 version "-src.tar.gz"))
1742 "10p3dh77lkzzzcy32dk9azljixzadp46fggjfbvgkl8mmb8cxxv8"))
1743 (modules '((guix build utils)))
1746 (for-each delete-file
1747 (find-files "lib/optional" "\\.jar$"))
1750 (substitute-keyword-arguments (package-arguments ant-bootstrap)
1752 `(modify-phases ,phases
1753 (add-after 'unpack 'remove-scripts
1754 ;; Remove bat / cmd scripts for DOS as well as the antRun and runant
1757 (for-each delete-file
1758 (find-files "src/script"
1759 "(.*\\.(bat|cmd)|runant.*|antRun.*)"))
1762 (lambda* (#:key inputs outputs #:allow-other-keys)
1763 (setenv "JAVA_HOME" (assoc-ref inputs "jdk"))
1765 ;; Disable tests to avoid dependency on hamcrest-core, which needs
1766 ;; Ant to build. This is necessary in addition to disabling the
1767 ;; "check" phase, because the dependency on "test-jar" would always
1768 ;; result in the tests to be run.
1769 (substitute* "build.xml"
1770 (("depends=\"jars,test-jar\"") "depends=\"jars\""))
1771 (zero? (system* "bash" "bootstrap.sh"
1772 (string-append "-Ddist.dir="
1773 (assoc-ref outputs "out"))))))))))
1775 `(("jdk" ,icedtea-8 "jdk")))))
1777 ;; The 1.9.x series is the last that can be built with GCJ. The 1.10.x series
1780 (package (inherit ant/java8)
1784 (uri (string-append "mirror://apache/ant/source/apache-ant-"
1785 version "-src.tar.gz"))
1788 "1k28mka0m3isy9yr8gz84kz1f3f879rwaxrd44vdn9xbfwvwk86n"))))
1790 `(("jdk" ,icedtea-7 "jdk")))))
1792 (define-public ant-apache-bcel
1795 (name "ant-apache-bcel")
1797 (substitute-keyword-arguments (package-arguments ant/java8)
1799 `(modify-phases ,phases
1800 (add-after 'unpack 'link-bcel
1801 (lambda* (#:key inputs #:allow-other-keys)
1802 (for-each (lambda (file)
1804 (string-append "lib/optional/"
1806 (find-files (assoc-ref inputs "java-commons-bcel")
1809 (add-after 'build 'install
1810 (lambda* (#:key outputs #:allow-other-keys)
1811 (let* ((out (assoc-ref outputs "out"))
1812 (share (string-append out "/share/java"))
1813 (bin (string-append out "/bin"))
1814 (lib (string-append out "/lib")))
1816 (install-file (string-append lib "/ant-apache-bcel.jar") share)
1817 (delete-file-recursively bin)
1818 (delete-file-recursively lib)
1821 `(("java-commons-bcel" ,java-commons-bcel)
1822 ,@(package-inputs ant/java8)))))
1824 (define-public ant-junit
1829 (substitute-keyword-arguments (package-arguments ant/java8)
1831 `(modify-phases ,phases
1832 (add-after 'unpack 'link-junit
1833 (lambda* (#:key inputs #:allow-other-keys)
1834 (for-each (lambda (file)
1836 (string-append "lib/optional/"
1838 (find-files (assoc-ref inputs "java-junit")
1841 (add-after 'build 'install
1842 (lambda* (#:key outputs #:allow-other-keys)
1843 (let* ((out (assoc-ref outputs "out"))
1844 (share (string-append out "/share/java"))
1845 (bin (string-append out "/bin"))
1846 (lib (string-append out "/lib")))
1848 (install-file (string-append lib "/ant-junit.jar") share)
1849 (delete-file-recursively bin)
1850 (delete-file-recursively lib)
1853 `(("java-junit" ,java-junit)
1854 ,@(package-inputs ant/java8)))))
1856 (define-public clojure
1857 (let* ((remove-archives '(begin
1858 (for-each delete-file
1859 (find-files "." ".*\\.(jar|zip)"))
1861 (submodule (lambda (prefix version hash)
1864 (uri (string-append "https://github.com/clojure/"
1865 prefix version ".tar.gz"))
1866 (sha256 (base32 hash))
1867 (modules '((guix build utils)))
1868 (snippet remove-archives)))))
1876 (string-append "https://github.com/clojure/clojure/archive/clojure-"
1879 (base32 "0xjbzcw45z32vsn9pifp7ndysjzqswp5ig0jkjpivigh2ckkdzha"))
1880 (modules '((guix build utils)))
1881 (snippet remove-archives)))
1882 (build-system ant-build-system)
1884 `(#:modules ((guix build ant-build-system)
1890 #:test-target "test"
1892 (modify-phases %standard-phases
1893 (add-after 'unpack 'unpack-submodule-sources
1894 (lambda* (#:key inputs #:allow-other-keys)
1898 (with-directory-excursion name
1899 (or (zero? (system* "tar"
1900 ;; Use xz for repacked tarball.
1904 "--file" (assoc-ref inputs name)
1905 "--strip-components=1"))
1906 (error "failed to unpack tarball" name)))
1907 (copy-recursively (string-append name "/src/main/clojure/")
1909 '("core-specs-alpha-src"
1910 "data-generators-src"
1913 "test-generative-src"
1914 "tools-namespace-src"))
1916 ;; The javadoc target is not built by default.
1917 (add-after 'build 'build-doc
1919 (zero? (system* "ant" "javadoc"))))
1920 ;; Needed since no install target is provided.
1922 (lambda* (#:key outputs #:allow-other-keys)
1923 (let ((java-dir (string-append (assoc-ref outputs "out")
1925 ;; Install versioned to avoid collisions.
1926 (install-file (string-append "clojure-" ,version ".jar")
1929 ;; Needed since no install-doc target is provided.
1930 (add-after 'install 'install-doc
1931 (lambda* (#:key outputs #:allow-other-keys)
1932 (let ((doc-dir (string-append (assoc-ref outputs "out")
1933 "/share/doc/clojure-"
1935 (copy-recursively "doc/clojure" doc-dir)
1936 (copy-recursively "target/javadoc/"
1937 (string-append doc-dir "javadoc/"))
1938 (for-each (cut install-file <> doc-dir)
1939 (filter (cut string-match
1940 ".*\\.(html|markdown|md|txt)"
1944 ;; The native-inputs below are needed to run the tests.
1946 `(("core-specs-alpha-src"
1947 ,(submodule "core.specs.alpha/archive/core.specs.alpha-"
1949 "0v2a0svf1ar2y42ajxwsjr7zmm5j7pp2zwrd2jh3k7xzd1p9x1fv"))
1950 ("data-generators-src"
1951 ,(submodule "data.generators/archive/data.generators-"
1953 "0kki093jp4ckwxzfnw8ylflrfqs8b1i1wi9iapmwcsy328dmgzp1"))
1955 ,(submodule "spec.alpha/archive/spec.alpha-"
1957 "00alf0347licdn773w2jarpllyrbl52qz4d8mw61anjksacxylzz"))
1959 ,(submodule "test.check/archive/test.check-"
1961 "0p0mnyhr442bzkz0s4k5ra3i6l5lc7kp6ajaqkkyh4c2k5yck1md"))
1962 ("test-generative-src"
1963 ,(submodule "test.generative/archive/test.generative-"
1965 "1pjafy1i7yblc7ixmcpfq1lfbyf3jaljvkgrajn70sws9xs7a9f8"))
1966 ("tools-namespace-src"
1967 ,(submodule "tools.namespace/archive/tools.namespace-"
1969 "10baak8v0hnwz2hr33bavshm7y49mmn9zsyyms1dwjz45p5ymhy0"))))
1970 (home-page "https://clojure.org/")
1971 (synopsis "Lisp dialect running on the JVM")
1972 (description "Clojure is a dynamic, general-purpose programming language,
1973 combining the approachability and interactive development of a scripting
1974 language with an efficient and robust infrastructure for multithreaded
1975 programming. Clojure is a compiled language, yet remains completely dynamic
1976 – every feature supported by Clojure is supported at runtime. Clojure
1977 provides easy access to the Java frameworks, with optional type hints and type
1978 inference, to ensure that calls to Java can avoid reflection.
1980 Clojure is a dialect of Lisp, and shares with Lisp the code-as-data philosophy
1981 and a powerful macro system. Clojure is predominantly a functional programming
1982 language, and features a rich set of immutable, persistent data structures.
1983 When mutable state is needed, Clojure offers a software transactional memory
1984 system and reactive Agent system that ensure clean, correct, multithreaded
1986 ;; Clojure is licensed under EPL1.0
1987 ;; ASM bytecode manipulation library is licensed under BSD-3
1988 ;; Guava Murmur3 hash implementation is licensed under APL2.0
1989 ;; src/clj/repl.clj is licensed under CPL1.0
1991 ;; See readme.html or readme.txt for details.
1992 (license (list license:epl1.0
1997 (define-public javacc
2003 (uri (string-append "https://github.com/javacc/javacc/"
2004 "archive/" version ".tar.gz"))
2005 (file-name (string-append "javacc-" version ".tar.gz"))
2008 "111xc9mnmc5a6qz6x3xbhqc07y1lg2b996ggzw0hrblg42zya9xf"))))
2009 (build-system ant-build-system)
2011 `(#:test-target "test"
2013 (modify-phases %standard-phases
2014 (add-after 'unpack 'delete-bundled-libs
2016 (delete-file-recursively "lib") #t))
2017 (replace 'install (install-jars "target")))))
2018 (home-page "https://javacc.org/")
2019 (synopsis "Java parser generator")
2020 (description "Java Compiler Compiler (JavaCC) is the most popular parser
2021 generator for use with Java applications. A parser generator is a tool that
2022 reads a grammar specification and converts it to a Java program that can
2023 recognize matches to the grammar. In addition to the parser generator itself,
2024 JavaCC provides other standard capabilities related to parser generation such
2025 as tree building (via a tool called JJTree included with JavaCC), actions,
2027 (license license:bsd-3)))
2029 (define-public javacc-4
2030 (package (inherit javacc)
2035 (url "https://github.com/javacc/javacc.git")
2036 (commit "release_41")))
2037 (file-name (string-append "javacc-" version "-checkout"))
2040 "07ysav7j8r1c6h8qxrgqk6lwdp74ly0ad1935lragxml0qqc3ka0"))))
2042 ;; /tmp/guix-build-javacc-4.1.drv-0/source/test/javacodeLA/build.xml:60:
2047 (modify-phases %standard-phases
2048 (add-after 'unpack 'delete-bundled-libs
2050 (delete-file-recursively "lib") #t))
2051 (replace 'install (install-jars "bin/lib")))))))
2053 ;; This is the last 3.x release of ECJ
2054 (define-public java-ecj-3
2060 (uri (string-append "http://archive.eclipse.org/eclipse/"
2061 "downloads/drops/R-" version
2062 "-201301310800/ecjsrc-" version ".jar"))
2065 "01mdj14jw11g1jfnki4fi8229p0c6zzckd38zqy2w4m3cjcvsx04"))))
2066 (build-system ant-build-system)
2068 `(#:tests? #f ; none included
2069 #:jdk ,icedtea-7 ; doesn't build with JDK8+
2070 #:make-flags (list "-f" "src/build.xml")
2071 #:build-target "build"
2073 (modify-phases %standard-phases
2074 (add-after 'unpack 'fix-manifest
2076 ;; Record the main class to make ecj executable.
2077 (with-atomic-file-replacement "src/META-INF/MANIFEST.MF"
2079 (display "Manifest-Version: 1.0
2080 Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n"
2082 (replace 'install (install-jars ".")))))
2083 (home-page "https://eclipse.org")
2084 (synopsis "Eclipse Java development tools core batch compiler")
2085 (description "This package provides the Eclipse Java core batch compiler.")
2086 (license license:epl1.0)))
2088 ;; This is needed for java-cisd-args4j
2089 (define-public java-ecj-3.5
2090 (package (inherit java-ecj-3)
2093 (method url-fetch/zipbomb)
2094 (uri (string-append "http://archive.eclipse.org/eclipse/"
2095 "downloads/drops/R-" version
2096 "-200909170800/ecjsrc-" version ".zip"))
2099 "1vnl2mavisc567bip736xzsvvbjif5279wc4a7pbdik5wlir8qr7"))))
2100 (build-system ant-build-system)
2102 `(#:tests? #f ; none included
2103 #:jdk ,icedtea-7 ; doesn't build with JDK8+
2104 #:build-target "build"
2106 (modify-phases %standard-phases
2107 (add-after 'unpack 'fix-manifest
2109 ;; Record the main class to make ecj executable.
2110 (with-atomic-file-replacement "META-INF/MANIFEST.MF"
2113 (display "Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n"
2115 (replace 'install (install-jars ".")))))
2117 `(("unzip" ,unzip)))))
2119 (define-public java-cisd-base
2120 (let ((revision 38938)
2121 (base-version "14.12.0"))
2123 (name "java-cisd-base")
2124 (version (string-append base-version "-" (number->string revision)))
2128 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2129 "base/tags/release/"
2130 (version-major+minor base-version)
2131 ".x/" base-version "/base/"))
2132 (revision revision)))
2133 (file-name (string-append "java-cisd-base-" version "-checkout"))
2136 "1i5adyf7nzclb0wydgwa1az04qliid8035vpahaandmkmigbnxiy"))
2137 (modules '((guix build utils)))
2140 ;; Delete included gradle jar
2141 (delete-file-recursively "gradle/wrapper")
2142 ;; Delete pre-built native libraries
2143 (delete-file-recursively "libs")
2145 (build-system ant-build-system)
2147 `(#:make-flags '("-file" "build/build.xml")
2148 #:test-target "jar-test"
2151 (modify-phases %standard-phases
2152 (add-after 'unpack 'unpack-build-resources
2153 (lambda* (#:key inputs #:allow-other-keys)
2154 (copy-recursively (assoc-ref inputs "build-resources")
2155 "../build_resources")
2157 (add-after 'unpack-build-resources 'fix-dependencies
2158 (lambda* (#:key inputs #:allow-other-keys)
2159 (substitute* "build/build.xml"
2160 (("\\$\\{lib\\}/testng/testng-jdk15.jar")
2161 (string-append (assoc-ref inputs "java-testng")
2162 "/share/java/java-testng.jar"))
2163 (("\\$\\{lib\\}/commons-lang/commons-lang.jar")
2164 (string-append (assoc-ref inputs "java-commons-lang")
2165 "/share/java/commons-lang-"
2166 ,(package-version java-commons-lang) ".jar"))
2167 (("\\$\\{lib\\}/commons-io/commons-io.jar")
2168 (string-append (assoc-ref inputs "java-commons-io")
2169 "/share/java/commons-io-"
2170 ,(package-version java-commons-io)
2172 ;; Remove dependency on svn
2173 (("<build-info.*") "")
2174 (("\\$\\{revision.number\\}")
2175 ,(number->string revision))
2176 (("\\$\\{version.number\\}") ,base-version))
2177 ;; Remove dependency on classycle
2178 (substitute* "../build_resources/ant/build-common.xml"
2179 (("<taskdef name=\"dependency-checker.*") "")
2180 (("classname=\"classycle.*") "")
2181 (("classpath=\"\\$\\{lib\\}/classycle.*") ""))
2183 ;; A few tests fail because of the lack of a proper /etc/groups and
2184 ;; /etc/passwd file in the build container.
2185 (add-after 'unpack 'disable-broken-tests
2187 (substitute* "sourceTest/java/ch/systemsx/cisd/base/AllTests.java"
2188 (("Unix.isOperational\\(\\)") "false"))
2190 ;; These decorators are almost useless and pull in an unpackaged
2192 (add-after 'unpack 'remove-useless-decorators
2194 (substitute* "source/java/ch/systemsx/cisd/base/unix/Unix.java"
2196 (("import ch.rinn.restrictions.Private;") ""))
2197 (substitute* "sourceTest/java/ch/systemsx/cisd/base/unix/UnixTests.java"
2199 (("import ch.rinn.restrictions.Friend;") ""))
2201 (add-before 'configure 'build-native-code
2202 (lambda* (#:key inputs #:allow-other-keys)
2203 (let ((jdk (assoc-ref inputs "jdk"))
2204 (dir ,(match (%current-system)
2207 ((or "armhf-linux" "aarch64-linux")
2209 ((or "x86_64-linux")
2211 (_ "unknown-Linux"))))
2212 (with-directory-excursion "source/c"
2213 (invoke "gcc" "-shared" "-O3" "-fPIC" "unix.c"
2214 (string-append "-I" jdk "/include")
2215 (string-append "-I" jdk "/include/linux")
2217 (invoke "gcc" "-shared" "-O3" "-fPIC"
2218 "-DMACHINE_BYTE_ORDER=1"
2226 (string-append "-I" jdk "/include")
2227 (string-append "-I" jdk "/include/linux")
2228 "-o" "libnativedata.so"))
2229 (install-file "source/c/libunix.so"
2230 (string-append "libs/native/unix/" dir))
2231 (install-file "source/c/libnativedata.so"
2232 (string-append "libs/native/nativedata/" dir))
2234 ;; In the "check" phase we only build the test executable.
2235 (add-after 'check 'run-tests
2237 (invoke "java" "-jar" "targets/dist/sis-base-test.jar")
2238 (delete-file "targets/dist/sis-base-test.jar")
2240 (replace 'install (install-jars "targets/dist")))))
2242 `(("jdk" ,icedtea-8)
2243 ("java-commons-lang" ,java-commons-lang)
2244 ("java-commons-io" ,java-commons-io)
2245 ("java-testng" ,java-testng)
2250 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2251 "base/tags/release/"
2252 (version-major+minor base-version)
2254 "/build_resources/"))
2255 (revision revision)))
2258 "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk"))))))
2259 (home-page "http://svnsis.ethz.ch")
2260 (synopsis "Utility classes for libraries from ETH Zurich")
2261 (description "This library supplies some utility classes needed for
2262 libraries from the SIS division at ETH Zurich like jHDF5.")
2263 ;; The C sources are under a non-copyleft license, which looks like a
2264 ;; variant of the BSD licenses. The whole package is under the ASL2.0.
2265 (license (list license:asl2.0
2266 (license:non-copyleft "file://source/c/COPYING"))))))
2268 (define-public java-cisd-args4j
2269 (let ((revision 39162)
2270 (base-version "9.11.2"))
2272 (name "java-cisd-args4j")
2273 (version (string-append base-version "-" (number->string revision)))
2277 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2278 "args4j/tags/release/"
2279 (version-major+minor base-version)
2280 ".x/" base-version "/args4j/"))
2281 (revision revision)))
2282 (file-name (string-append "java-cisd-args4j-" version "-checkout"))
2285 "0hhqznjaivq7ips7mkwas78z42s6djsm20rrs7g1zd59rcsakxn2"))))
2286 (build-system ant-build-system)
2288 `(#:make-flags '("-file" "build/build.xml")
2289 #:tests? #f ; there are no tests
2290 ;; There are weird build failures with JDK8, such as: "The type
2291 ;; java.io.ObjectInputStream cannot be resolved. It is indirectly
2292 ;; referenced from required .class files"
2294 #:modules ((guix build ant-build-system)
2296 (guix build java-utils)
2301 (modify-phases %standard-phases
2302 (add-after 'unpack 'unpack-build-resources
2303 (lambda* (#:key inputs #:allow-other-keys)
2304 (mkdir-p "../build_resources")
2305 (invoke "tar" "xf" (assoc-ref inputs "build-resources")
2306 "-C" "../build_resources"
2307 "--strip-components=1")
2308 (mkdir-p "../build_resources/lib")
2310 (add-after 'unpack-build-resources 'fix-dependencies
2311 (lambda* (#:key inputs #:allow-other-keys)
2312 ;; FIXME: There should be a more convenient abstraction for
2313 ;; editing XML files.
2314 (with-directory-excursion "../build_resources/ant/"
2315 (chmod "build-common.xml" #o664)
2316 (call-with-output-file "build-common.xml.new"
2320 (with-input-from-file "build-common.xml"
2321 (lambda _ (xml->sxml #:trim-whitespace? #t)))
2322 `(;; Remove dependency on classycle and custom ant tasks
2323 (taskdef . ,(lambda (tag . kids)
2324 (let ((name ((sxpath '(name *text*)) kids)))
2325 (if (or (member "build-info" name)
2326 (member "dependency-checker" name)
2327 (member "build-java-subprojects" name)
2328 (member "project-classpath" name))
2331 (typedef . ,(lambda (tag . kids)
2332 (let ((name ((sxpath '(name *text*)) kids)))
2333 (if (member "recursive-jar" name)
2336 (build-java-subprojects . ,(lambda _ '()))
2337 ;; Ignore everything else
2338 (*default* . ,(lambda (tag . kids) `(,tag ,@kids)))
2339 (*text* . ,(lambda (_ txt) txt))))
2341 (rename-file "build-common.xml.new" "build-common.xml"))
2342 (substitute* "build/build.xml"
2343 (("\\$\\{lib\\}/cisd-base/cisd-base.jar")
2344 (string-append (assoc-ref inputs "java-cisd-base")
2345 "/share/java/sis-base.jar"))
2346 ;; Remove dependency on svn
2347 (("<build-info.*") "")
2348 (("\\$\\{revision.number\\}")
2349 ,(number->string revision))
2350 (("\\$\\{version.number\\}") ,base-version)
2351 ;; Don't use custom ant tasks.
2352 (("recursive-jar") "jar")
2353 (("<project-classpath.*") ""))
2355 (replace 'install (install-jars "targets/dist")))))
2357 `(("java-cisd-base" ,java-cisd-base)))
2359 `(("ecj" ,java-ecj-3.5)
2364 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2365 "args4j/tags/release/"
2366 (version-major+minor base-version)
2368 "/build_resources/"))
2369 (revision revision)))
2372 "056cam4k8pll7ass31sy6gwn8g8719njc41yf4l02b0342nilkyf"))
2373 (modules '((guix build utils)))
2374 ;; Delete bundled pre-built jars.
2376 '(begin (delete-file-recursively "lib/") #t))))))
2377 (home-page "http://svnsis.ethz.ch")
2378 (synopsis "Command line parser library")
2379 (description "This package provides a parser for command line arguments.")
2380 (license license:asl2.0))))
2382 (define-public java-cisd-jhdf5
2383 (let ((revision 39162)
2384 (base-version "14.12.6"))
2386 (name "java-cisd-jhdf5")
2387 (version (string-append base-version "-" (number->string revision)))
2391 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2392 "jhdf5/tags/release/"
2393 (version-major+minor base-version)
2394 ".x/" base-version "/jhdf5/"))
2395 (revision revision)))
2396 (file-name (string-append "java-cisd-jhdf5-" version "-checkout"))
2399 "13i17s2hn0q9drdqvp8csy7770p3hdbh9rp30ihln2ldkfawdmz0"))
2400 (modules '((guix build utils)))
2403 ;; Delete included gradle jar
2404 (delete-file-recursively "gradle/wrapper")
2405 ;; Delete pre-built native libraries
2406 (delete-file-recursively "libs")
2408 (build-system ant-build-system)
2410 `(#:make-flags '("-file" "build/build.xml")
2411 #:build-target "jar-all"
2412 #:test-target "jar-test"
2415 (modify-phases %standard-phases
2416 ;; Don't erase results from the build phase when building tests.
2417 (add-after 'unpack 'separate-test-target-from-clean
2419 (substitute* "build/build.xml"
2420 (("\"jar-test\" depends=\"clean, ")
2421 "\"jar-test\" depends=\""))
2423 (add-after 'unpack 'unpack-build-resources
2424 (lambda* (#:key inputs #:allow-other-keys)
2425 (copy-recursively (assoc-ref inputs "build-resources")
2426 "../build_resources")
2427 (delete-file-recursively "../build_resources/lib/")
2428 (mkdir-p "../build_resources/lib")
2429 ;; Remove dependency on classycle
2430 (substitute* "../build_resources/ant/build-common.xml"
2431 (("<taskdef name=\"dependency-checker.*") "")
2432 (("classname=\"classycle.*") "")
2433 (("classpath=\"\\$\\{lib\\}/classycle.*") ""))
2434 ;; Remove dependency on svn
2435 (substitute* "build/build.xml"
2436 (("<build-info.*") "")
2437 (("\\$\\{revision.number\\}")
2438 ,(number->string revision))
2439 (("\\$\\{version.number\\}") ,base-version))
2441 (add-after 'unpack-build-resources 'fix-dependencies
2442 (lambda* (#:key inputs #:allow-other-keys)
2443 (substitute* "../build_resources/ant/build-common.xml"
2444 (("../libraries/testng/testng-jdk15.jar")
2445 (string-append (assoc-ref inputs "java-testng")
2446 "/share/java/java-testng.jar")))
2447 (substitute* "build/build.xml"
2448 (("\\$\\{lib\\}/sis-base/sis-base.jar")
2449 (string-append (assoc-ref inputs "java-cisd-base")
2450 "/share/java/sis-base.jar"))
2451 (("\\$\\{lib\\}/cisd-args4j/cisd-args4j.jar")
2452 (string-append (assoc-ref inputs "java-cisd-args4j")
2453 "/share/java/cisd-args4j.jar"))
2454 (("\\$\\{lib\\}/commons-lang/commons-lang.jar")
2455 (string-append (assoc-ref inputs "java-commons-lang")
2456 "/share/java/commons-lang-"
2457 ,(package-version java-commons-lang) ".jar"))
2458 (("\\$\\{lib\\}/commons-io/commons-io.jar")
2459 (string-append (assoc-ref inputs "java-commons-io")
2460 "/share/java/commons-io-"
2461 ,(package-version java-commons-io)
2463 (("\\$\\{lib\\}/testng/testng-jdk15.jar")
2464 (string-append (assoc-ref inputs "java-testng")
2465 "/share/java/java-testng.jar"))
2466 (("\\$\\{lib\\}/junit4/junit.jar")
2467 (string-append (assoc-ref inputs "java-junit")
2468 "/share/java/junit.jar"))
2469 (("\\$\\{lib\\}/jmock/hamcrest/hamcrest-core.jar")
2470 (string-append (assoc-ref inputs "java-hamcrest-core")
2471 "/share/java/hamcrest-core.jar")))
2472 ;; Remove dependency on ch.rinn.restrictions
2473 (with-directory-excursion "source/java/ch/systemsx/cisd/hdf5/"
2474 (substitute* '("BitSetConversionUtils.java"
2476 (("import ch.rinn.restrictions.Private;") "")
2478 (with-directory-excursion "sourceTest/java/ch/systemsx/cisd/hdf5/"
2479 (substitute* '("BitSetConversionTest.java"
2480 "h5ar/HDF5ArchiverTest.java")
2481 (("import ch.rinn.restrictions.Friend;") "")
2483 ;; Remove leftovers from removing @Friend
2484 (substitute* "h5ar/HDF5ArchiverTest.java"
2485 (("\\{ HDF5Archiver.class, IdCache.class, LinkRecord.class \\}\\)")
2488 (add-before 'configure 'build-native-library
2489 (lambda* (#:key inputs #:allow-other-keys)
2490 (let ((jdk (assoc-ref inputs "jdk"))
2491 (hdf5 (assoc-ref inputs "hdf5"))
2492 (dir ,(match (%current-system)
2495 ((or "armhf-linux" "aarch64-linux")
2497 ((or "x86_64-linux")
2499 (_ "unknown-Linux"))))
2500 (with-directory-excursion "source/c"
2501 (apply invoke `("gcc" "-shared" "-O3"
2503 "-Wl,--exclude-libs,ALL"
2504 ,@(find-files "jhdf5" "\\.c$")
2505 ,@(find-files "hdf-java" "\\.c$")
2506 ,(string-append "-I" hdf5 "/include")
2507 ,(string-append "-I" jdk "/include")
2508 ,(string-append "-I" jdk "/include/linux")
2509 ,(string-append hdf5 "/lib/libhdf5.a")
2510 "-o" "libjhdf5.so" "-lz")))
2511 (install-file "source/c/libjhdf5.so"
2512 (string-append "libs/native/jhdf5/" dir))
2514 ;; In the "check" phase we only build the test executable.
2515 (add-after 'check 'run-tests
2517 (invoke "java" "-jar" "targets/dist/sis-jhdf5-test.jar")
2518 (delete-file "targets/dist/sis-jhdf5-test.jar")
2521 (install-jars "targets/dist")))))
2523 `(("java-cisd-base" ,java-cisd-base)
2524 ("java-cisd-args4j" ,java-cisd-args4j)
2525 ("java-commons-lang" ,java-commons-lang)
2526 ("java-commons-io" ,java-commons-io)
2530 `(("jdk" ,icedtea-8)
2531 ("java-testng" ,java-testng)
2532 ("java-junit" ,java-junit)
2533 ("java-jmock" ,java-jmock)
2534 ("java-hamcrest-core" ,java-hamcrest-core)
2539 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2540 "jhdf5/tags/release/"
2541 (version-major+minor base-version)
2543 "/build_resources/"))
2544 (revision revision)))
2547 "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk"))))))
2548 (home-page "https://wiki-bsse.ethz.ch/display/JHDF5/")
2549 (synopsis "Java binding for HDF5")
2550 (description "JHDF5 is a high-level API in Java for reading and writing
2551 HDF5 files, building on the libraries provided by the HDF Group.")
2552 ;; The C sources are under a non-copyleft license, which looks like a
2553 ;; variant of the BSD licenses. The whole package is under the ASL2.0.
2554 (license (list license:asl2.0
2555 (license:non-copyleft "file://source/c/COPYING"))))))
2557 (define-public java-classpathx-servletapi
2559 (name "java-classpathx-servletapi")
2563 (uri (string-append "mirror://gnu/classpathx/servletapi/"
2564 "servletapi-" version ".tar.gz"))
2567 "07d8h051siga2f33fra72hk12sbq1bxa4jifjg0qj0vfazjjff0x"))))
2568 (build-system ant-build-system)
2570 `(#:tests? #f ; there is no test target
2571 #:build-target "compile"
2573 (list "-Dbuild.compiler=javac1.8"
2574 (string-append "-Ddist=" (assoc-ref %outputs "out")))
2576 (modify-phases %standard-phases
2578 (lambda* (#:key make-flags #:allow-other-keys)
2579 (zero? (apply system* `("ant" "dist" ,@make-flags))))))))
2580 (home-page "https://www.gnu.org/software/classpathx/")
2581 (synopsis "Java servlet API implementation")
2582 (description "This is the GNU servlet API distribution, part of the
2583 ClasspathX project. It provides implementations of version 3.0 of the servlet
2584 API and version 2.1 of the Java ServerPages API.")
2585 (license license:gpl3+)))
2587 (define-public java-swt
2592 ;; The types of many variables and procedures differ in the sources
2593 ;; dependent on whether the target architecture is a 32-bit system or a
2594 ;; 64-bit system. Instead of patching the sources on demand in a build
2595 ;; phase we download either the 32-bit archive (which mostly uses "int"
2596 ;; types) or the 64-bit archive (which mostly uses "long" types).
2597 (let ((hash32 "09q0cbh90d90q3a7dx9430kc4m6bijrkr4lajrmzzvi0jjdpq4v9")
2598 (hash64 "17k5hs75a87ssmc5xhwdfdm2gn4zba0r837l2455za01krnkaa2q")
2601 (let-values (((hash file)
2602 (match (or (%current-target-system) (%current-system))
2603 ("x86_64-linux" (values hash64 file64))
2604 (_ (values hash32 file32)))))
2608 "http://download.eclipse.org/eclipse/downloads/drops4/"
2609 "R-" version "-201710090410/swt-" version
2610 "-gtk-linux-" file ".zip"))
2611 (sha256 (base32 hash))))))
2612 (build-system ant-build-system)
2614 `(#:jar-name "swt.jar"
2616 #:tests? #f ; no "check" target
2618 (modify-phases %standard-phases
2620 (lambda* (#:key source #:allow-other-keys)
2622 (zero? (system* "unzip" source "-d" "swt"))
2625 (zero? (system* "unzip" "src.zip" "-d" "src")))))
2626 ;; The classpath contains invalid icecat jars. Since we don't need
2627 ;; anything other than the JDK on the classpath, we can simply unset
2629 (add-after 'configure 'unset-classpath
2630 (lambda _ (unsetenv "CLASSPATH") #t))
2631 (add-before 'build 'build-native
2632 (lambda* (#:key inputs outputs #:allow-other-keys)
2633 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
2634 ;; Build shared libraries. Users of SWT have to set the system
2635 ;; property swt.library.path to the "lib" directory of this
2638 (setenv "OUTPUT_DIR" lib)
2639 (with-directory-excursion "src"
2640 (zero? (system* "bash" "build.sh"))))))
2641 (add-after 'install 'install-native
2642 (lambda* (#:key outputs #:allow-other-keys)
2643 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
2644 (for-each (lambda (file)
2645 (install-file file lib))
2646 (find-files "." "\\.so$"))
2650 ("libxtst" ,libxtst)
2655 `(("pkg-config" ,pkg-config)
2657 (home-page "https://www.eclipse.org/swt/")
2658 (synopsis "Widget toolkit for Java")
2660 "SWT is a widget toolkit for Java designed to provide efficient, portable
2661 access to the user-interface facilities of the operating systems on which it
2663 ;; SWT code is licensed under EPL1.0
2664 ;; Gnome and Gtk+ bindings contain code licensed under LGPLv2.1
2665 ;; Cairo bindings contain code under MPL1.1
2666 ;; XULRunner 1.9 bindings contain code under MPL2.0
2671 license:lgpl2.1+))))
2673 (define-public java-xz
2679 (uri (string-append "http://tukaani.org/xz/xz-java-" version ".zip"))
2682 "1z3p1ri1gvl07inxn0agx44ck8n7wrzfmvkz8nbq3njn8r9wba8x"))))
2683 (build-system ant-build-system)
2685 `(#:tests? #f ; There are no tests to run.
2686 #:jar-name ,(string-append "xz-" version ".jar")
2688 (modify-phases %standard-phases
2689 ;; The unpack phase enters the "maven" directory by accident.
2690 (add-after 'unpack 'chdir
2691 (lambda _ (chdir "..") #t)))))
2693 `(("unzip" ,unzip)))
2694 (home-page "https://tukaani.org/xz/java.html")
2695 (synopsis "Implementation of XZ data compression in pure Java")
2696 (description "This library aims to be a complete implementation of XZ data
2697 compression in pure Java. Single-threaded streamed compression and
2698 decompression and random access decompression have been fully implemented.")
2699 (license license:public-domain)))
2701 ;; java-hamcrest-core uses qdox version 1.12. We package this version instead
2702 ;; of the latest release.
2703 (define-public java-qdox-1.12
2709 (uri (string-append "http://central.maven.org/maven2/"
2710 "com/thoughtworks/qdox/qdox/" version
2711 "/qdox-" version "-sources.jar"))
2714 "0hlfbqq2avf5s26wxkksqmkdyk6zp9ggqn37c468m96mjv0n9xfl"))))
2715 (build-system ant-build-system)
2717 `(;; Tests require junit
2719 #:jar-name "qdox.jar"
2721 (modify-phases %standard-phases
2723 (lambda* (#:key source #:allow-other-keys)
2725 (with-directory-excursion "src"
2726 (zero? (system* "jar" "-xf" source)))))
2727 ;; At this point we don't have junit, so we must remove the API
2729 (add-after 'unpack 'delete-tests
2731 (delete-file-recursively "src/com/thoughtworks/qdox/junit")
2733 (home-page "http://qdox.codehaus.org/")
2734 (synopsis "Parse definitions from Java source files")
2736 "QDox is a high speed, small footprint parser for extracting
2737 class/interface/method definitions from source files complete with JavaDoc
2738 @code{@@tags}. It is designed to be used by active code generators or
2739 documentation tools.")
2740 (license license:asl2.0)))
2742 (define-public java-jarjar
2744 (name "java-jarjar")
2749 "https://storage.googleapis.com/google-code-archive-downloads/v2/"
2750 "code.google.com/jarjar/jarjar-src-" version ".zip"))
2753 "1v8irhni9cndcw1l1wxqgry013s2kpj0qqn57lj2ji28xjq8ndjl"))))
2754 (build-system ant-build-system)
2756 `(;; Tests require junit, which ultimately depends on this package.
2758 #:build-target "jar"
2760 (modify-phases %standard-phases
2762 (lambda* (#:key outputs #:allow-other-keys)
2763 (let ((target (string-append (assoc-ref outputs "out")
2765 (install-file (string-append "dist/jarjar-" ,version ".jar")
2769 `(("unzip" ,unzip)))
2770 (home-page "https://code.google.com/archive/p/jarjar/")
2771 (synopsis "Repackage Java libraries")
2773 "Jar Jar Links is a utility that makes it easy to repackage Java
2774 libraries and embed them into your own distribution. Jar Jar Links includes
2775 an Ant task that extends the built-in @code{jar} task.")
2776 (license license:asl2.0)))
2778 (define-public java-hamcrest-core
2780 (name "java-hamcrest-core")
2784 (uri (string-append "https://github.com/hamcrest/JavaHamcrest/"
2785 "archive/hamcrest-java-" version ".tar.gz"))
2788 "11g0s105fmwzijbv08lx8jlb521yravjmxnpgdx08fvg1kjivhva"))
2789 (modules '((guix build utils)))
2792 ;; Delete bundled thirds-party jar archives.
2793 (delete-file-recursively "lib")
2795 (build-system ant-build-system)
2797 `(#:tests? #f ; Tests require junit
2798 #:modules ((guix build ant-build-system)
2801 #:make-flags (list (string-append "-Dversion=" ,version))
2802 #:test-target "unit-test"
2803 #:build-target "core"
2805 (modify-phases %standard-phases
2806 ;; Disable unit tests, because they require junit, which requires
2807 ;; hamcrest-core. We also give a fixed value to the "Built-Date"
2808 ;; attribute from the manifest for reproducibility.
2809 (add-before 'configure 'patch-build.xml
2811 (substitute* "build.xml"
2812 (("unit-test, ") "")
2813 (("\\$\\{build.timestamp\\}") "guix"))
2815 ;; Java's "getMethods()" returns methods in an unpredictable order.
2816 ;; To make the output of the generated code deterministic we must
2817 ;; sort the array of methods.
2818 (add-after 'unpack 'make-method-order-deterministic
2820 (substitute* "hamcrest-generator/src/main/java/org/hamcrest/generator/ReflectiveFactoryReader.java"
2821 (("import java\\.util\\.Iterator;" line)
2822 (string-append line "\n"
2823 "import java.util.Arrays; import java.util.Comparator;"))
2824 (("allMethods = cls\\.getMethods\\(\\);" line)
2825 (string-append "_" line
2827 private Method[] getSortedMethods() {
2828 Arrays.sort(_allMethods, new Comparator<Method>() {
2830 public int compare(Method a, Method b) {
2831 return a.toString().compareTo(b.toString());
2837 private Method[] allMethods = getSortedMethods();")))))
2838 (add-before 'build 'do-not-use-bundled-qdox
2839 (lambda* (#:key inputs #:allow-other-keys)
2840 (substitute* "build.xml"
2841 (("lib/generator/qdox-1.12.jar")
2842 (string-append (assoc-ref inputs "java-qdox-1.12")
2843 "/share/java/qdox.jar")))
2845 ;; build.xml searches for .jar files in this directoy, which
2846 ;; we remove from the source archive.
2847 (add-before 'build 'create-dummy-directories
2849 (mkdir-p "lib/integration")
2852 (lambda* (#:key outputs #:allow-other-keys)
2853 (let* ((target (string-append (assoc-ref outputs "out")
2855 (version-suffix ,(string-append "-" version ".jar"))
2856 (install-without-version-suffix
2859 (string-append target
2860 (basename jar version-suffix)
2864 install-without-version-suffix
2867 (and (string-suffix? ".jar" name)
2868 (not (string-suffix? "-sources.jar" name)))))))
2871 `(("java-qdox-1.12" ,java-qdox-1.12)
2872 ("java-jarjar" ,java-jarjar)))
2873 (home-page "http://hamcrest.org/")
2874 (synopsis "Library of matchers for building test expressions")
2876 "This package provides a library of matcher objects (also known as
2877 constraints or predicates) allowing @code{match} rules to be defined
2878 declaratively, to be used in other frameworks. Typical scenarios include
2879 testing frameworks, mocking libraries and UI validation rules.")
2880 (license license:bsd-2)))
2882 (define-public java-junit
2888 (uri (string-append "https://github.com/junit-team/junit/"
2889 "archive/r" version ".tar.gz"))
2890 (file-name (string-append name "-" version ".tar.gz"))
2893 "090dn5v1vs0b3acyaqc0gjf6p8lmd2h24wfzsbq7sly6b214anws"))
2894 (modules '((guix build utils)))
2897 ;; Delete bundled jar archives.
2898 (delete-file-recursively "lib")
2900 (build-system ant-build-system)
2902 `(#:tests? #f ; no tests
2903 #:jar-name "junit.jar"))
2905 `(("java-hamcrest-core" ,java-hamcrest-core)))
2906 (home-page "http://junit.org/")
2907 (synopsis "Test framework for Java")
2909 "JUnit is a simple framework to write repeatable tests for Java projects.
2910 JUnit provides assertions for testing expected results, test fixtures for
2911 sharing common test data, and test runners for running tests.")
2912 (license license:epl1.0)))
2914 (define-public java-plexus-utils
2916 (name "java-plexus-utils")
2920 (uri (string-append "https://github.com/codehaus-plexus/"
2921 "plexus-utils/archive/plexus-utils-"
2925 "1mlwpc6fms24slygv5yvi6fi9hcha2fh0v73p5znpi78bg36i2js"))))
2926 (build-system ant-build-system)
2927 ;; FIXME: The default build.xml does not include a target to install
2930 `(#:jar-name "plexus-utils.jar"
2931 #:source-dir "src/main"
2933 (modify-phases %standard-phases
2934 (add-after 'unpack 'fix-reference-to-/bin-and-/usr
2936 (substitute* "src/main/java/org/codehaus/plexus/util/\
2937 cli/shell/BourneShell.java"
2938 (("/bin/sh") (which "sh"))
2939 (("/usr/") (getcwd)))
2941 (add-after 'unpack 'fix-or-disable-broken-tests
2943 (with-directory-excursion "src/test/java/org/codehaus/plexus/util"
2944 (substitute* '("cli/CommandlineTest.java"
2945 "cli/shell/BourneShellTest.java")
2946 (("/bin/sh") (which "sh"))
2947 (("/bin/echo") (which "echo")))
2949 ;; This test depends on MavenProjectStub, but we don't have
2950 ;; a package for Maven.
2951 (delete-file "introspection/ReflectionValueExtractorTest.java")
2953 ;; FIXME: The command line tests fail, maybe because they use
2955 (delete-file "cli/CommandlineTest.java"))
2958 `(("java-junit" ,java-junit)))
2959 (home-page "http://codehaus-plexus.github.io/plexus-utils/")
2960 (synopsis "Common utilities for the Plexus framework")
2961 (description "This package provides various Java utility classes for the
2962 Plexus framework to ease working with strings, files, command lines, XML and
2964 (license license:asl2.0)))
2966 (define-public java-plexus-interpolation
2968 (name "java-plexus-interpolation")
2972 (uri (string-append "https://github.com/codehaus-plexus/"
2973 "plexus-interpolation/archive/"
2974 "plexus-interpolation-" version ".tar.gz"))
2977 "03377yzlx5q440m6sxxgv6a5qb8fl30zzcgxgc0hxk5qgl2z1jjn"))))
2978 (build-system ant-build-system)
2980 `(#:jar-name "plexus-interpolation.jar"
2981 #:source-dir "src/main"))
2983 `(("java-junit" ,java-junit)
2984 ("java-hamcrest-core" ,java-hamcrest-core)))
2985 (home-page "http://codehaus-plexus.github.io/plexus-interpolation/")
2986 (synopsis "Java components for interpolating ${} strings and the like")
2987 (description "Plexus interpolator is a modular, flexible interpolation
2988 framework for the expression language style commonly seen in Maven, Plexus,
2989 and other related projects.
2991 It has its foundation in the @code{org.codehaus.plexus.utils.interpolation}
2992 package within @code{plexus-utils}, but has been separated in order to allow
2993 these two libraries to vary independently of one another.")
2994 (license license:asl2.0)))
2996 (define-public java-plexus-classworlds
2998 (name "java-plexus-classworlds")
3002 (uri (string-append "https://github.com/codehaus-plexus/"
3003 "plexus-classworlds/archive/plexus-classworlds-"
3007 "1qm4p0rl8d82lzhsiwnviw11jnq44s0gflg78zq152xyyr2xmh8g"))))
3008 (build-system ant-build-system)
3010 `(#:jar-name "plexus-classworlds.jar"
3011 #:source-dir "src/main"
3012 #:tests? #f));; FIXME: we need to generate some resources as in pom.xml
3014 `(("java-junit" ,java-junit)))
3015 (home-page "http://codehaus-plexus.github.io/plexus-classworlds/")
3016 (synopsis "Java class loader framework")
3017 (description "Plexus classworlds replaces the native @code{ClassLoader}
3018 mechanism of Java. It is especially useful for dynamic loading of application
3020 (license license:asl2.0)))
3022 (define java-plexus-container-default-bootstrap
3024 (name "java-plexus-container-default-bootstrap")
3028 (uri (string-append "https://github.com/codehaus-plexus/plexus-containers"
3029 "/archive/plexus-containers-" version ".tar.gz"))
3032 "0xw5g30qf4a83608rw9v2hv8pfsz7d69dkdhk6r0wia4q78hh1pc"))))
3033 (build-system ant-build-system)
3035 `(#:jar-name "container-default.jar"
3036 #:source-dir "plexus-container-default/src/main/java"
3037 #:test-dir "plexus-container-default/src/test"
3039 #:tests? #f; requires plexus-archiver, which depends on this package
3041 (modify-phases %standard-phases
3042 (add-before 'build 'copy-resources
3045 "plexus-container-default/src/main/resources/"
3049 `(("worldclass" ,java-plexus-classworlds)
3050 ("xbean" ,java-geronimo-xbean-reflect)
3051 ("utils" ,java-plexus-utils)
3052 ("junit" ,java-junit)
3053 ("guava" ,java-guava)))
3054 (home-page "https://github.com/codehaus-plexus/plexus-containers")
3055 (synopsis "Inversion-of-control container")
3056 (description "Plexus-default-container is Plexus' inversion-of-control
3057 (@dfn{IoC}) container. It is composed of its public API and its default
3059 (license license:asl2.0)))
3061 (define-public java-plexus-io
3063 (name "java-plexus-io")
3067 (uri (string-append "https://github.com/codehaus-plexus/plexus-io"
3068 "/archive/plexus-io-" version ".tar.gz"))
3071 "0f2j41kihaymxkpbm55smpxjja235vad8cgz94frfy3ppcp021dw"))))
3072 (build-system ant-build-system)
3074 `(#:jar-name "plexus-io.jar"
3075 #:source-dir "src/main/java"
3076 #:test-dir "src/test"
3079 (modify-phases %standard-phases
3080 (add-before 'build 'copy-resources
3082 (mkdir-p "build/classes/META-INF/plexus")
3083 (copy-file "src/main/resources/META-INF/plexus/components.xml"
3084 "build/classes/META-INF/plexus/components.xml")
3087 `(("utils" ,java-plexus-utils)
3088 ("commons-io" ,java-commons-io)
3089 ("java-jsr305" ,java-jsr305)))
3091 `(("junit" ,java-junit)
3092 ("hamcrest" ,java-hamcrest-core)
3093 ("guava" ,java-guava)
3094 ("classworlds" ,java-plexus-classworlds)
3095 ("xbean" ,java-geronimo-xbean-reflect)
3096 ("container-default" ,java-plexus-container-default-bootstrap)))
3097 (home-page "https://github.com/codehaus-plexus/plexus-io")
3098 (synopsis "I/O plexus components")
3099 (description "Plexus IO is a set of plexus components, which are designed
3100 for use in I/O operations. This implementation using plexus components allows
3101 reusing it in maven.")
3102 (license license:asl2.0)))
3104 (define-public java-plexus-archiver
3106 (name "java-plexus-archiver")
3110 (uri (string-append "https://github.com/codehaus-plexus/plexus-archiver"
3111 "/archive/plexus-archiver-" version ".tar.gz"))
3114 "0iv1j7khra6icqh3jndng3iipfmkc7l5jq2y802cm8r575v75pyv"))))
3115 (build-system ant-build-system)
3117 `(#:jar-name "plexus-archiver.jar"
3118 #:source-dir "src/main/java"
3120 #:test-dir "src/test"
3121 #:test-exclude (list "**/Abstract*.java" "**/Base*.java")
3123 (modify-phases %standard-phases
3124 (add-before 'check 'remove-failing
3126 ;; Requires an older version of plexus container
3128 "src/test/java/org/codehaus/plexus/archiver/DuplicateFilesTest.java")))
3129 (add-before 'build 'copy-resources
3131 (mkdir-p "build/classes/META-INF/plexus")
3132 (copy-file "src/main/resources/META-INF/plexus/components.xml"
3133 "build/classes/META-INF/plexus/components.xml")
3136 `(("utils" ,java-plexus-utils)
3137 ("commons-io" ,java-commons-io)
3138 ("snappy" ,java-iq80-snappy)
3139 ("io" ,java-plexus-io)
3140 ("compress" ,java-commons-compress)
3141 ("container-default" ,java-plexus-container-default-bootstrap)
3142 ("snappy" ,java-snappy)
3143 ("java-jsr305" ,java-jsr305)))
3145 `(("junit" ,java-junit)
3146 ("classworld" ,java-plexus-classworlds)
3147 ("xbean" ,java-geronimo-xbean-reflect)
3148 ("xz" ,java-tukaani-xz)
3149 ("guava" ,java-guava)))
3150 (home-page "https://github.com/codehaus-plexus/plexus-archiver")
3151 (synopsis "Archiver component of the Plexus project")
3152 (description "Plexus-archiver contains a component to deal with project
3154 (license license:asl2.0)))
3156 (define-public java-plexus-container-default
3158 (inherit java-plexus-container-default-bootstrap)
3159 (name "java-plexus-container-default")
3161 `(#:jar-name "container-default.jar"
3162 #:source-dir "plexus-container-default/src/main/java"
3163 #:test-dir "plexus-container-default/src/test"
3164 #:test-exclude (list ;"**/*Test.java"
3166 ;; Requires plexus-hierarchy
3167 "**/PlexusHierarchyTest.java"
3169 "**/ComponentRealmCompositionTest.java"
3170 "**/PlexusContainerTest.java")
3173 (modify-phases %standard-phases
3174 (add-before 'build 'copy-resources
3177 "plexus-container-default/src/main/resources/"
3180 (add-before 'check 'fix-paths
3182 (let ((dir "plexus-container-default/src/test/java/org/codehaus"))
3185 dir "/plexus/component/composition/"
3186 "ComponentRealmCompositionTest.java")
3187 (("src/test") "plexus-container-default/src/test"))
3190 `(("worldclass" ,java-plexus-classworlds)
3191 ("xbean" ,java-geronimo-xbean-reflect)
3192 ("utils" ,java-plexus-utils)
3193 ("junit" ,java-junit)
3194 ("guava" ,java-guava)))
3196 `(("archiver" ,java-plexus-archiver)
3197 ("hamcrest" ,java-hamcrest-core)))))
3199 (define-public java-plexus-component-annotations
3201 (inherit java-plexus-container-default)
3202 (name "java-plexus-component-annotations")
3204 `(#:jar-name "plexus-component-annotations.jar"
3205 #:source-dir "plexus-component-annotations/src/main/java"
3206 #:tests? #f)); no tests
3209 (synopsis "Plexus descriptors generator")
3210 (description "This package is a Maven plugin to generate Plexus descriptors
3211 from source tags and class annotations.")))
3213 (define-public java-plexus-cipher
3215 (name "java-plexus-cipher")
3219 (uri (string-append "https://github.com/codehaus-plexus/plexus-cipher"
3220 "/archive/plexus-cipher-" version ".tar.gz"))
3223 "1j3r8xzlxlk340snkjp6lk2ilkxlkn8qavsfiq01f43xmvv8ymk3"))))
3224 (build-system ant-build-system)
3226 `(#:jar-name "plexus-cipher.jar"
3227 #:source-dir "src/main/java"
3229 #:tests? #f; FIXME: requires sisu-inject-bean
3231 (modify-phases %standard-phases
3232 (add-before 'build 'copy-resources
3234 (copy-recursively "src/main/resources" "build/classes")
3235 (mkdir-p "build/classes/META-INF/sisu")
3236 (with-output-to-file "build/classes/META-INF/sisu/javax.inject.Named"
3238 (display "org.sonatype.plexus.components.cipher.DefaultPlexusCipher\n")))
3241 `(("java-cdi-api" ,java-cdi-api)
3242 ("java-javax-inject" ,java-javax-inject)))
3243 (home-page "https://github.com/sonatype/plexus-cipher")
3244 (synopsis "Encryption/decryption Component")
3245 (description "Plexus-cipher contains a component to deal with encryption
3247 (license license:asl2.0)))
3249 (define-public java-plexus-compiler-api
3251 (name "java-plexus-compiler-api")
3255 (uri (string-append "https://github.com/codehaus-plexus/plexus-compiler"
3256 "/archive/plexus-compiler-" version ".tar.gz"))
3259 "0g3x26pymcdnfnwv2a1i57pd5s26f5zqfi1rdy98z1bn01klx25k"))))
3260 (build-system ant-build-system)
3262 `(#:jar-name "plexus-compiler-api.jar"
3263 #:source-dir "plexus-compiler-api/src/main/java"
3265 #:test-dir "plexus-compiler-api/src/test"))
3267 `(("java-plexus-container-default" ,java-plexus-container-default)
3268 ("java-plexus-util" ,java-plexus-utils)))
3270 `(("java-junit" ,java-junit)))
3271 (home-page "https://github.com/codehaus-plexus/plexus-compiler")
3272 (synopsis "Plexus Compilers component's API to manipulate compilers")
3273 (description "This package contains the API used by components to manipulate
3275 (license (list license:asl2.0
3278 (define-public java-plexus-compiler-javac
3280 (inherit java-plexus-compiler-api)
3281 (name "java-plexus-compiler-javac")
3283 `(#:jar-name "plexus-compiler-javac.jar"
3284 #:source-dir "plexus-compilers/plexus-compiler-javac/src/main/java"
3286 #:tests? #f; depends on compiler-test -> maven-core -> ... -> this package.
3287 #:test-dir "plexus-compilers/plexus-compiler-javac/src/test"))
3289 `(("java-plexus-compiler-api" ,java-plexus-compiler-api)
3290 ("java-plexus-utils" ,java-plexus-utils)
3291 ("java-plexus-container-default" ,java-plexus-container-default)))
3293 `(("java-junit" ,java-junit)))
3294 (synopsis "Javac Compiler support for Plexus Compiler component")
3295 (description "This package contains the Javac Compiler support for Plexus
3296 Compiler component.")))
3298 (define-public java-plexus-sec-dispatcher
3300 (name "java-plexus-sec-dispatcher")
3301 (version "1.4") ;; Newest release listed at the Maven Central Repository.
3303 ;; This project doesn't tag releases or publish tarballs, so we take
3304 ;; the "prepare release plexus-sec-dispatcher-1.4" git commit.
3306 (uri (string-append "https://github.com/sonatype/plexus-sec-dispatcher/"
3307 "archive/7db8f88048.tar.gz"))
3310 "1smfrk4n7xbrsxpxcp2j4i0j8q86j73w0w6xg7qz83dp6dagdjgp"))
3311 (file-name (string-append name "-" version ".tar.gz"))))
3313 `(#:jar-name "plexus-sec-dispatcher.jar"
3314 #:source-dir "src/main/java"
3317 (modify-phases %standard-phases
3318 (add-before 'build 'generate-models
3319 (lambda* (#:key inputs #:allow-other-keys)
3320 (define (modello-single-mode file version mode)
3321 (zero? (system* "java"
3322 "org.codehaus.modello.ModelloCli"
3323 file mode "src/main/java" version
3325 (let ((file "src/main/mdo/settings-security.mdo"))
3327 (modello-single-mode file "1.0.0" "java")
3328 (modello-single-mode file "1.0.0" "xpp3-reader")
3329 (modello-single-mode file "1.0.0" "xpp3-writer")))))
3330 (add-before 'build 'generate-components.xml
3332 (mkdir-p "build/classes/META-INF/plexus")
3333 (with-output-to-file "build/classes/META-INF/plexus/components.xml"
3339 <role>org.sonatype.plexus.components.sec.dispatcher.SecDispatcher</role>\n
3340 <role-hint>default</role-hint>\n
3341 <implementation>org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher</implementation>\n
3342 <description></description>\n
3345 <role>org.sonatype.plexus.components.cipher.PlexusCipher</role>\n
3346 <field-name>_cipher</field-name>\n
3349 <role>org.sonatype.plexus.components.sec.dispatcher.PasswordDecryptor</role>\n
3350 <field-name>_decryptors</field-name>\n
3354 <_configuration-file>~/.settings-security.xml</_configuration-file>\n
3358 </component-set>\n")))))
3359 (add-before 'check 'fix-paths
3361 (copy-recursively "src/test/resources" "target"))))))
3363 `(("java-plexus-cipher" ,java-plexus-cipher)))
3365 `(("java-modello-core" ,java-modello-core)
3367 ("java-plexus-container-default" ,java-plexus-container-default)
3368 ("java-plexus-classworlds" ,java-plexus-classworlds)
3369 ("java-plexus-utils" ,java-plexus-utils)
3370 ("java-guava" ,java-guava)
3371 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
3372 ("java-sisu-build-api" ,java-sisu-build-api)
3374 ("java-modellop-plugins-java" ,java-modello-plugins-java)
3375 ("java-modellop-plugins-xml" ,java-modello-plugins-xml)
3376 ("java-modellop-plugins-xpp3" ,java-modello-plugins-xpp3)
3378 ("java-junit" ,java-junit)))
3379 (build-system ant-build-system)
3380 (home-page "https://github.com/sonatype/plexus-sec-dispatcher")
3381 (synopsis "Plexus Security Dispatcher Component")
3382 (description "This package is the Plexus Security Dispatcher Component.
3383 This component decrypts a string passed to it.")
3384 (license license:asl2.0)))
3386 (define-public java-sisu-build-api
3388 (name "java-sisu-build-api")
3392 (uri (string-append "https://github.com/sonatype/sisu-build-api/"
3393 "archive/plexus-build-api-" version ".tar.gz"))
3396 "1c3rrpma3x634xp2rm2p5iskfhzdyc7qfbhjzr70agrl1jwghgy2"))))
3397 (build-system ant-build-system)
3399 `(#:jar-name "sisu-build-api.jar"
3400 #:source-dir "src/main/java"
3402 #:tests? #f; FIXME: how to run the tests?
3404 (modify-phases %standard-phases
3405 (add-before 'build 'copy-resources
3407 (copy-recursively "src/main/resources" "build/classes")
3408 (substitute* (find-files "build/classes")
3409 (("\\$\\{project.version\\}") ,version))
3411 (add-before 'build 'generate-plexus-compontent
3413 (mkdir-p "build/classes/META-INF/plexus")
3414 ;; This file is required for plexus to inject this package.
3415 ;; FIXME: how is it generated?
3416 (with-output-to-file "build/classes/META-INF/plexus/components.xml"
3422 <role>org.sonatype.plexus.build.incremental.BuildContext</role>\n
3423 <role-hint>default</role-hint>\n
3424 <implementation>org.sonatype.plexus.build.incremental.DefaultBuildContext</implementation>\n
3425 <description>Filesystem based non-incremental build context implementation\n
3426 which behaves as if all files were just created.</description>\n
3429 </component-set>\n")))
3432 `(("java-plexus-utils" ,java-plexus-utils)
3433 ("java-plexus-container-default" ,java-plexus-container-default)))
3434 (home-page "https://github.com/sonatype/sisu-build-api/")
3435 (synopsis "Base build API for maven")
3436 (description "This package contains the base build API for maven and
3437 a default implementation of it. This API is about scanning files in a
3438 project and determining what files need to be rebuilt.")
3439 (license license:asl2.0)))
3441 (define-public java-modello-core
3443 (name "java-modello-core")
3447 (uri (string-append "https://github.com/codehaus-plexus/modello"
3448 "/archive/modello-" version ".tar.gz"))
3451 "0l2pvns8pmlrmjm3iknp7gpg3654y1m8qhy55b19sdwdchdcyxfh"))))
3452 (build-system ant-build-system)
3454 `(#:jar-name "modello-core.jar"
3455 #:source-dir "modello-core/src/main/java"
3456 #:test-dir "modello-core/src/test"
3457 #:main-class "org.codehaus.modello.ModelloCli"
3460 (modify-phases %standard-phases
3461 (add-before 'build 'copy-resources
3463 (mkdir-p "build/classes/META-INF/plexus")
3464 (copy-file "modello-core/src/main/resources/META-INF/plexus/components.xml"
3465 "build/classes/META-INF/plexus/components.xml")
3467 (add-before 'check 'fix-tests
3469 (with-directory-excursion "modello-core/src/test/java/org/codehaus"
3470 (substitute* '("modello/core/DefaultModelloCoreTest.java"
3471 "modello/core/io/ModelReaderTest.java")
3472 (("src/test") "modello-core/src/test")))
3475 `(("java-plexus-utils" ,java-plexus-utils)
3476 ("java-plexus-container-default" ,java-plexus-container-default)
3477 ("java-sisu-build-api" ,java-sisu-build-api)))
3479 `(("java-junit" ,java-junit)
3480 ("java-plexus-classworlds" ,java-plexus-classworlds)
3481 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
3482 ("java-guava" ,java-guava)))
3483 (home-page "http://codehaus-plexus.github.io/modello/")
3484 (synopsis "Framework for code generation from a simple model")
3485 (description "Modello is a framework for code generation from a simple model.
3487 Modello generates code from a simple model format: based on a plugin
3488 architecture, various types of code and descriptors can be generated from the
3489 single model, including Java POJOs, XML/JSON/YAML marshallers/unmarshallers,
3490 XSD and documentation.")
3493 ;; Although this package uses only files licensed under expat,
3494 ;; other parts of the source are licensed under different
3495 ;; licenses. We include them to be inherited by other packages.
3497 ;; Some files in modello-plugin-java are licensed under a
3498 ;; 5-clause BSD license.
3499 (license:non-copyleft
3500 (string-append "file:///modello-plugins/modello-plugin-java/"
3501 "src/main/java/org/codehaus/modello/plugin/"
3502 "java/javasource/JNaming.java"))))))
3504 (define-public java-modello-plugins-java
3506 (inherit java-modello-core)
3507 (name "java-modello-plugins-java")
3509 `(#:jar-name "modello-plugins-java.jar"
3510 #:source-dir "modello-plugins/modello-plugin-java/src/main/java"
3511 #:test-dir "modello-plugins/modello-plugin-java/src/test"
3513 #:tests? #f; requires maven-model, which depends on this package
3515 (modify-phases %standard-phases
3516 (add-before 'build 'copy-resources
3518 (mkdir-p "build/classes")
3519 (copy-recursively "modello-plugins/modello-plugin-java/src/main/resources"
3523 `(("java-modello-core" ,java-modello-core)
3524 ,@(package-inputs java-modello-core)))
3525 (synopsis "Modello Java Plugin")
3526 (description "Modello Java Plugin generates Java objects for the model.")))
3528 (define-public java-modello-plugins-xml
3530 (inherit java-modello-core)
3531 (name "java-modello-plugins-xml")
3533 `(#:jar-name "modello-plugins-xml.jar"
3534 #:source-dir "modello-plugins/modello-plugin-xml/src/main/java"
3535 #:test-dir "modello-plugins/modello-plugin-xml/src/test"
3538 (modify-phases %standard-phases
3539 (add-before 'build 'copy-resources
3541 (mkdir-p "build/classes")
3543 "modello-plugins/modello-plugin-xml/src/main/resources"
3546 (add-before 'check 'fix-paths
3548 (with-directory-excursion "modello-plugins/modello-plugin-xml/src/test"
3550 "java/org/codehaus/modello/plugins/xml/XmlModelloPluginTest.java"
3551 (("src/test") "modello-plugins/modello-plugin-xml/src/test"))))))))
3553 `(("java-modello-core" ,java-modello-core)
3554 ("java-modello-plugins-java" ,java-modello-plugins-java)
3555 ,@(package-inputs java-modello-core)))
3556 (synopsis "Modello XML Plugin")
3557 (description "Modello XML Plugin contains shared code for every plugins
3558 working on XML representation of the model.")))
3560 (define-public java-modello-test
3562 (inherit java-modello-core)
3563 (name "java-modello-test")
3565 `(#:jar-name "modello-test.jar"
3566 #:source-dir "modello-test/src/main/java"
3567 #:tests? #f; no tests
3570 `(("java-plexus-utils" ,java-plexus-utils)
3571 ("java-plexus-compiler-api" ,java-plexus-compiler-api)
3572 ("java-plexus-compiler-javac" ,java-plexus-compiler-javac)
3573 ("java-plexus-container-default" ,java-plexus-container-default)))
3574 (synopsis "Modello test package")
3575 (description "The modello test package contains the basis to create
3576 Modello generator unit-tests, including sample models and xml files to test
3577 every feature for every plugin.")))
3579 (define-public java-modello-plugins-xpp3
3581 (inherit java-modello-core)
3582 (name "java-modello-plugins-xpp3")
3584 `(#:jar-name "modello-plugins-xpp3.jar"
3585 #:source-dir "modello-plugins/modello-plugin-xpp3/src/main/java"
3586 #:test-dir "modello-plugins/modello-plugin-xpp3/src/test"
3587 ;; One of the test dependencies is maven-model which depends on this package.
3591 (modify-phases %standard-phases
3592 (add-before 'build 'copy-resources
3594 (mkdir-p "build/classes")
3595 (copy-recursively "modello-plugins/modello-plugin-xpp3/src/main/resources"
3599 `(("java-modello-core" ,java-modello-core)
3600 ("java-modello-plugins-java" ,java-modello-plugins-java)
3601 ("java-modello-plugins-xml" ,java-modello-plugins-xml)
3602 ,@(package-inputs java-modello-core)))
3604 `(("java-xmlunit" ,java-xmlunit)
3605 ("java-modello-test" ,java-modello-test)
3606 ,@(package-native-inputs java-modello-core)))
3607 (synopsis "Modello XPP3 Plugin")
3608 (description "The modello XPP3 plugin generates XML readers and writers based
3609 on the XPP3 API (XML Pull Parser).")))
3611 (define-public java-asm
3617 (uri (string-append "http://download.forge.ow2.org/asm/"
3618 "asm-" version ".tar.gz"))
3621 "115l5pqblirdkmzi32dxx7gbcm4jy0s14y5wircr6h8jdr9aix00"))))
3622 (build-system ant-build-system)
3624 `(("java-aqute-bndlib" ,java-aqute-bndlib)))
3626 `(#:build-target "compile"
3627 ;; The tests require an old version of Janino, which no longer compiles
3632 ;; We don't need these extra ant tasks, but the build system asks us to
3633 ;; provide a path anyway.
3634 "-Dobjectweb.ant.tasks.path=dummy-path"
3635 ;; The java-aqute.bndlib JAR file will be put onto the classpath and
3636 ;; used during the build automatically by ant-build-system, but
3637 ;; java-asm's build.xml fails unless we provide something here.
3638 "-Dbiz.aQute.bnd.path=dummy-path")
3640 (modify-phases %standard-phases
3641 (add-before 'install 'build-jars
3642 (lambda* (#:key make-flags #:allow-other-keys)
3643 ;; We cannot use the "jar" target because it depends on a couple
3644 ;; of unpackaged, complicated tools.
3646 (zero? (system* "jar"
3647 "-cf" (string-append "dist/asm-" ,version ".jar")
3648 "-C" "output/build/tmp" "."))))
3650 (install-jars "dist")))))
3652 `(("java-junit" ,java-junit)))
3653 (home-page "http://asm.ow2.org/")
3654 (synopsis "Very small and fast Java bytecode manipulation framework")
3655 (description "ASM is an all purpose Java bytecode manipulation and
3656 analysis framework. It can be used to modify existing classes or dynamically
3657 generate classes, directly in binary form. The provided common
3658 transformations and analysis algorithms allow to easily assemble custom
3659 complex transformations and code analysis tools.")
3660 (license license:bsd-3)))
3662 (define-public java-cglib
3669 "https://github.com/cglib/cglib/archive/RELEASE_"
3670 (string-map (lambda (c) (if (char=? c #\.) #\_ c)) version)
3672 (file-name (string-append "cglib-" version ".tar.gz"))
3675 "162dvd4fln76ai8prfharf66pn6r56p3sxx683j5vdyccrd5hi1q"))))
3676 (build-system ant-build-system)
3678 `(;; FIXME: tests fail because junit runs
3679 ;; "net.sf.cglib.transform.AbstractTransformTest", which does not seem
3680 ;; to describe a test at all.
3682 #:jar-name "cglib.jar"
3684 (modify-phases %standard-phases
3685 (add-after 'unpack 'chdir
3686 (lambda _ (chdir "cglib") #t)))))
3688 `(("java-asm" ,java-asm)
3689 ("java-junit" ,java-junit)))
3690 (home-page "https://github.com/cglib/cglib/")
3691 (synopsis "Java byte code generation library")
3692 (description "The byte code generation library CGLIB is a high level API
3693 to generate and transform Java byte code.")
3694 (license license:asl2.0)))
3696 (define-public java-objenesis
3698 (name "java-objenesis")
3702 (uri (string-append "https://github.com/easymock/objenesis/"
3703 "archive/" version ".tar.gz"))
3704 (file-name (string-append "objenesis-" version ".tar.gz"))
3707 "1va5qz1i2wawwavhnxfzxnfgrcaflz9p1pg03irrjh4nd3rz8wh6"))))
3708 (build-system ant-build-system)
3710 `(#:jar-name "objenesis.jar"
3711 #:source-dir "main/src/"
3712 #:test-dir "main/src/test/"))
3714 `(("java-junit" ,java-junit)
3715 ("java-hamcrest-core" ,java-hamcrest-core)))
3716 (home-page "http://objenesis.org/")
3717 (synopsis "Bypass the constructor when creating an object")
3718 (description "Objenesis is a small Java library that serves one purpose:
3719 to instantiate a new object of a particular class. It is common to see
3720 restrictions in libraries stating that classes must require a default
3721 constructor. Objenesis aims to overcome these restrictions by bypassing the
3722 constructor on object instantiation.")
3723 (license license:asl2.0)))
3725 (define-public java-easymock
3727 (name "java-easymock")
3731 (uri (string-append "https://github.com/easymock/easymock/"
3732 "archive/easymock-" version ".tar.gz"))
3735 "1yzg0kv256ndr57gpav46cyv4a1ns5sj722l50zpxk3j6sk9hnmi"))))
3736 (build-system ant-build-system)
3738 `(#:jar-name "easymock.jar"
3739 #:source-dir "core/src/main"
3740 #:test-dir "core/src/test"
3742 (modify-phases %standard-phases
3743 ;; FIXME: Android support requires the following packages to be
3744 ;; available: com.google.dexmaker.stock.ProxyBuilder
3745 (add-after 'unpack 'delete-android-support
3747 (with-directory-excursion "core/src/main/java/org/easymock/internal"
3748 (substitute* "MocksControl.java"
3749 (("AndroidSupport.isAndroid\\(\\)") "false")
3750 (("return classProxyFactory = new AndroidClassProxyFactory\\(\\);") ""))
3751 (delete-file "AndroidClassProxyFactory.java"))
3753 (add-after 'unpack 'delete-broken-tests
3755 (with-directory-excursion "core/src/test/java/org/easymock"
3756 ;; This test depends on dexmaker.
3757 (delete-file "tests2/ClassExtensionHelperTest.java")
3759 ;; This is not a test.
3760 (delete-file "tests/BaseEasyMockRunnerTest.java")
3762 ;; This test should be executed with a different runner...
3763 (delete-file "tests2/EasyMockAnnotationsTest.java")
3764 ;; ...but deleting it means that we also have to delete these
3766 (delete-file "tests2/EasyMockRunnerTest.java")
3767 (delete-file "tests2/EasyMockRuleTest.java")
3769 ;; This test fails because the file "easymock.properties" does
3771 (delete-file "tests2/EasyMockPropertiesTest.java"))
3774 `(("java-asm" ,java-asm)
3775 ("java-cglib" ,java-cglib)
3776 ("java-objenesis" ,java-objenesis)))
3778 `(("java-junit" ,java-junit)
3779 ("java-hamcrest-core" ,java-hamcrest-core)))
3780 (home-page "http://easymock.org")
3781 (synopsis "Java library providing mock objects for unit tests")
3782 (description "EasyMock is a Java library that provides an easy way to use
3783 mock objects in unit testing.")
3784 (license license:asl2.0)))
3786 (define-public java-jmock-1
3792 (uri (string-append "https://github.com/jmock-developers/"
3793 "jmock-library/archive/" version ".tar.gz"))
3794 (file-name (string-append "jmock-" version ".tar.gz"))
3797 "0xmrlhq0fszldkbv281k9463mv496143vvmqwpxp62yzjvdkx9w0"))))
3798 (build-system ant-build-system)
3800 `(#:build-target "jars"
3801 #:test-target "run.tests"
3803 (modify-phases %standard-phases
3804 (replace 'install (install-jars "build")))))
3805 (home-page "http://www.jmock.org")
3806 (synopsis "Mock object library for test-driven development")
3807 (description "JMock is a library that supports test-driven development of
3808 Java code with mock objects. Mock objects help you design and test the
3809 interactions between the objects in your programs.
3814 @item makes it quick and easy to define mock objects
3815 @item lets you precisely specify the interactions between
3816 your objects, reducing the brittleness of your tests
3817 @item plugs into your favourite test framework
3818 @item is easy to extend.
3820 (license license:bsd-3)))
3822 (define-public java-jmock
3824 (inherit java-jmock-1)
3829 (uri (string-append "https://github.com/jmock-developers/"
3830 "jmock-library/archive/" version ".tar.gz"))
3831 (file-name (string-append name "-" version ".tar.gz"))
3834 "18650a9g8xffcsdb6w91pbswa7f40fp2sh6s3nclkclz5dbzq8f0"))))
3836 `(("java-hamcrest-all" ,java-hamcrest-all)
3837 ("java-asm" ,java-asm)
3838 ("java-bsh" ,java-bsh)
3839 ("java-junit" ,java-junit)))
3841 `(("cglib" ,java-cglib)))
3843 `(#:jar-name "java-jmock.jar"
3844 #:source-dir "jmock/src/main/java"
3845 #:test-dir "jmock/src/test"))))
3847 (define-public java-jmock-junit4
3849 (inherit java-jmock)
3850 (name "java-jmock-junit4")
3852 `(#:jar-name "java-jmock-junit4.jar"
3853 #:source-dir "jmock-junit4/src/main/java"
3854 #:test-dir "jmock-junit4/src/test"))
3856 `(("java-hamcrest-all" ,java-hamcrest-all)
3857 ("java-asm" ,java-asm)
3858 ("java-bsh" ,java-bsh)
3859 ("java-jmock" ,java-jmock)
3860 ("java-jumit" ,java-junit)))))
3862 (define-public java-jmock-legacy
3864 (inherit java-jmock)
3865 (name "java-jmock-legacy")
3867 `(#:jar-name "java-jmock-legacy.jar"
3868 #:source-dir "jmock-legacy/src/main/java"
3869 #:test-dir "jmock-legacy/src/test"
3871 (modify-phases %standard-phases
3872 (add-before 'check 'copy-tests
3874 ;; This file is a dependancy of some tests
3875 (let ((file "org/jmock/test/acceptance/PackageProtectedType.java"))
3876 (copy-file (string-append "jmock/src/test/java/" file)
3877 (string-append "jmock-legacy/src/test/java/" file))
3880 `(("java-hamcrest-all" ,java-hamcrest-all)
3881 ("java-objenesis" ,java-objenesis)
3882 ("java-cglib" ,java-cglib)
3883 ("java-jmock" ,java-jmock)
3884 ("java-asm" ,java-asm)
3885 ("java-bsh" ,java-bsh)
3886 ("java-junit" ,java-junit)))
3888 `(("java-jmock-junit4" ,java-jmock-junit4)))))
3890 (define-public java-hamcrest-all
3891 (package (inherit java-hamcrest-core)
3892 (name "java-hamcrest-all")
3895 ,@(substitute-keyword-arguments (package-arguments java-hamcrest-core)
3896 ((#:build-target _) "bigjar")
3898 `(modify-phases ,phases
3899 ;; Some build targets override the classpath, so we need to patch
3900 ;; the build.xml to ensure that required dependencies are on the
3902 (add-after 'unpack 'patch-classpath-for-integration
3903 (lambda* (#:key inputs #:allow-other-keys)
3904 (substitute* "build.xml"
3905 ((" build/hamcrest-library-\\$\\{version\\}.jar" line)
3909 (find-files (assoc-ref inputs "java-junit") "\\.jar$")
3910 (find-files (assoc-ref inputs "java-jmock") "\\.jar$")
3911 (find-files (assoc-ref inputs "java-easymock") "\\.jar$")))
3915 `(("java-junit" ,java-junit)
3916 ("java-jmock" ,java-jmock-1)
3917 ("java-easymock" ,java-easymock)
3918 ,@(package-inputs java-hamcrest-core)))))
3920 (define-public java-jopt-simple
3922 (name "java-jopt-simple")
3926 (uri (string-append "http://repo1.maven.org/maven2/"
3927 "net/sf/jopt-simple/jopt-simple/"
3928 version "/jopt-simple-"
3929 version "-sources.jar"))
3932 "1v8bzmwmw6qq20gm42xyay6vrd567dra4vqwhgjnqqjz1gs9f8qa"))))
3933 (build-system ant-build-system)
3935 `(#:tests? #f ; there are no tests
3936 #:jar-name "jopt-simple.jar"))
3937 (home-page "https://pholser.github.io/jopt-simple/")
3938 (synopsis "Java library for parsing command line options")
3939 (description "JOpt Simple is a Java library for parsing command line
3940 options, such as those you might pass to an invocation of @code{javac}. In
3941 the interest of striving for simplicity, as closely as possible JOpt Simple
3942 attempts to honor the command line option syntaxes of POSIX @code{getopt} and
3943 GNU @code{getopt_long}. It also aims to make option parser configuration and
3944 retrieval of options and their arguments simple and expressive, without being
3946 (license license:expat)))
3948 (define-public java-commons-math3
3950 (name "java-commons-math3")
3954 (uri (string-append "mirror://apache/commons/math/source/"
3955 "commons-math3-" version "-src.tar.gz"))
3958 "19l6yp44qc5g7wg816nbn5z3zq3xxzwimvbm4a8pczgvpi4i85s6"))))
3959 (build-system ant-build-system)
3961 `(#:build-target "jar"
3962 #:test-target "test"
3964 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
3965 (junit (assoc-ref %build-inputs "java-junit")))
3966 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
3967 (string-append "-Dhamcrest.jar=" hamcrest
3968 "/share/java/hamcrest-core.jar")))
3970 (modify-phases %standard-phases
3971 ;; We want to build the jar in the build phase and run the tests
3972 ;; later in a separate phase.
3973 (add-after 'unpack 'untangle-targets
3975 (substitute* "build.xml"
3976 (("name=\"jar\" depends=\"test\"")
3977 "name=\"jar\" depends=\"compile\""))
3979 ;; There is no install target.
3981 (install-jars "target")))))
3983 `(("java-junit" ,java-junit)
3984 ("java-hamcrest-core" ,java-hamcrest-core)))
3985 (home-page "http://commons.apache.org/math/")
3986 (synopsis "Apache Commons mathematics library")
3987 (description "Commons Math is a library of lightweight, self-contained
3988 mathematics and statistics components addressing the most common problems not
3989 available in the Java programming language or Commons Lang.")
3990 (license license:asl2.0)))
3992 (define-public java-jmh
3999 (url "http://hg.openjdk.java.net/code-tools/jmh/")
4000 (changeset version)))
4001 (file-name (string-append name "-" version "-checkout"))
4004 "1fxyxhg9famwcg1prc4cgwb5wzyxqavn3cjm5vz8605xz7x5k084"))))
4005 (build-system ant-build-system)
4007 `(#:jar-name "jmh-core.jar"
4008 #:source-dir "jmh-core/src/main"
4009 #:test-dir "jmh-core/src/test"
4011 (modify-phases %standard-phases
4012 ;; This seems to be a bug in the JDK. It may not be necessary in
4013 ;; future versions of the JDK.
4014 (add-after 'unpack 'fix-bug
4016 (with-directory-excursion
4017 "jmh-core/src/main/java/org/openjdk/jmh/runner/options"
4018 (substitute* '("IntegerValueConverter.java"
4019 "ThreadsValueConverter.java")
4020 (("public Class<Integer> valueType")
4021 "public Class<? extends Integer> valueType")))
4024 `(("java-jopt-simple" ,java-jopt-simple)
4025 ("java-commons-math3" ,java-commons-math3)))
4027 `(("java-junit" ,java-junit)
4028 ("java-hamcrest-core" ,java-hamcrest-core)))
4029 (home-page "http://openjdk.java.net/projects/code-tools/jmh/")
4030 (synopsis "Benchmark harness for the JVM")
4031 (description "JMH is a Java harness for building, running, and analysing
4032 nano/micro/milli/macro benchmarks written in Java and other languages
4033 targeting the JVM.")
4035 (license license:gpl2)))
4037 (define-public java-commons-collections4
4039 (name "java-commons-collections4")
4043 (uri (string-append "mirror://apache/commons/collections/source/"
4044 "commons-collections4-" version "-src.tar.gz"))
4047 "1krfhvggympq4avk7gh6qafzf6b9ip6r1m4lmacikyx04039m0wl"))))
4048 (build-system ant-build-system)
4050 `(#:test-target "test"
4052 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
4053 (junit (assoc-ref %build-inputs "java-junit"))
4054 (easymock (assoc-ref %build-inputs "java-easymock")))
4055 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
4056 (string-append "-Dhamcrest.jar=" hamcrest
4057 "/share/java/hamcrest-core.jar")
4058 (string-append "-Deasymock.jar=" easymock
4059 "/share/java/easymock.jar")))
4061 (modify-phases %standard-phases
4063 (install-jars "target")))))
4065 `(("java-junit" ,java-junit)
4066 ("java-hamcrest-core" ,java-hamcrest-core)
4067 ("java-easymock" ,java-easymock)))
4068 (home-page "http://commons.apache.org/collections/")
4069 (synopsis "Collections framework")
4070 (description "The Java Collections Framework is the recognised standard
4071 for collection handling in Java. Commons-Collections seek to build upon the
4072 JDK classes by providing new interfaces, implementations and utilities. There
4073 are many features, including:
4076 @item @code{Bag} interface for collections that have a number of copies of
4078 @item @code{BidiMap} interface for maps that can be looked up from value to
4079 key as well and key to value
4080 @item @code{MapIterator} interface to provide simple and quick iteration over
4082 @item Transforming decorators that alter each object as it is added to the
4084 @item Composite collections that make multiple collections look like one
4085 @item Ordered maps and sets that retain the order elements are added in,
4086 including an LRU based map
4087 @item Reference map that allows keys and/or values to be garbage collected
4089 @item Many comparator implementations
4090 @item Many iterator implementations
4091 @item Adapter classes from array and enumerations to collections
4092 @item Utilities to test or create typical set-theory properties of collections
4093 such as union, intersection, and closure.
4095 (license license:asl2.0)))
4097 (define-public java-commons-collections
4099 (inherit java-commons-collections4)
4100 (name "java-commons-collections")
4104 (uri (string-append "mirror://apache/commons/collections/source/"
4105 "commons-collections-" version "-src.tar.gz"))
4108 "055r51a5lfc3z7rkxnxmnn1npvkvda7636hjpm4qk7cnfzz98387"))))
4110 (substitute-keyword-arguments (package-arguments java-commons-collections4)
4112 `(modify-phases ,phases
4113 ;; The manifest is required by the build procedure
4114 (add-before 'build 'add-manifest
4116 (mkdir-p "build/conf")
4117 (call-with-output-file "build/conf/MANIFEST.MF"
4119 (format file "Manifest-Version: 1.0\n")))))
4121 (install-jars "build"))))))))
4123 (define java-commons-collections-test-classes
4125 (inherit java-commons-collections)
4127 `(#:jar-name "commons-collections-test-classes.jar"
4128 #:source-dir "src/test"
4131 `(("collection" ,java-commons-collections)))))
4133 (define-public java-commons-beanutils
4135 (name "java-commons-beanutils")
4139 (uri (string-append "mirror://apache/commons/beanutils/source/"
4140 "commons-beanutils-" version "-src.tar.gz"))
4143 "03cs0bq3sl1sdc7py9g3qnf8n9h473nrkvd3d251kaqv6a2ab7qk"))))
4144 (build-system ant-build-system)
4146 `(#:test-target "test"
4149 (modify-phases %standard-phases
4151 (lambda* (#:key outputs #:allow-other-keys)
4152 (rename-file (string-append "dist/commons-beanutils-" ,version
4154 "commons-beanutils.jar")
4155 (install-file "commons-beanutils.jar"
4156 (string-append (assoc-ref outputs "out") "/share/java/"))
4159 `(("logging" ,java-commons-logging-minimal)
4160 ("collections" ,java-commons-collections)))
4162 `(("junit" ,java-junit)
4163 ("collections-test" ,java-commons-collections-test-classes)))
4164 (home-page "http://commons.apache.org/beanutils/")
4165 (synopsis "Dynamically set or get properties in Java")
4166 (description "BeanUtils provides a simplified interface to reflection and
4167 introspection to set or get dynamically determined properties through their
4168 setter and getter method.")
4169 (license license:asl2.0)))
4171 (define-public java-commons-io
4173 (name "java-commons-io")
4178 (uri (string-append "mirror://apache/commons/io/source/"
4179 "commons-io-" version "-src.tar.gz"))
4182 "0q5y41jrcjvx9hzs47x5kdhnasdy6rm4bzqd2jxl02w717m7a7v3"))))
4183 (build-system ant-build-system)
4184 (outputs '("out" "doc"))
4186 `(#:test-target "test"
4188 (list (string-append "-Djunit.jar="
4189 (assoc-ref %build-inputs "java-junit")
4190 "/share/java/junit.jar"))
4192 (modify-phases %standard-phases
4193 (add-after 'build 'build-javadoc ant-build-javadoc)
4194 (replace 'install (install-jars "target"))
4195 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
4197 `(("java-junit" ,java-junit)
4198 ("java-hamcrest-core" ,java-hamcrest-core)))
4199 (home-page "http://commons.apache.org/io/")
4200 (synopsis "Common useful IO related classes")
4201 (description "Commons-IO contains utility classes, stream implementations,
4202 file filters and endian classes.")
4203 (license license:asl2.0)))
4205 (define-public java-commons-lang
4207 (name "java-commons-lang")
4212 (uri (string-append "mirror://apache/commons/lang/source/"
4213 "commons-lang-" version "-src.tar.gz"))
4215 (base32 "1mxwagqadzx1b2al7i0z1v0r235aj2njdyijf02szq0vhmqrfiq5"))))
4216 (build-system ant-build-system)
4217 (outputs '("out" "doc"))
4219 `(#:test-target "test"
4220 #:test-exclude (list "**/Abstract*.java" "**/Random*.java")
4222 (modify-phases %standard-phases
4223 (add-after 'build 'build-javadoc ant-build-javadoc)
4224 (add-before 'check 'disable-failing-test
4226 ;; Disable a failing test
4227 (substitute* "src/test/java/org/apache/commons/lang/\
4228 time/FastDateFormatTest.java"
4229 (("public void testFormat\\(\\)")
4230 "public void disabled_testFormat()"))
4232 (replace 'install (install-jars "target"))
4233 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
4235 `(("java-junit" ,java-junit)))
4236 (home-page "http://commons.apache.org/lang/")
4237 (synopsis "Extension of the java.lang package")
4238 (description "The Commons Lang components contains a set of Java classes
4239 that provide helper methods for standard Java classes, especially those found
4240 in the @code{java.lang} package in the Sun JDK. The following classes are
4244 @item StringUtils - Helper for @code{java.lang.String}.
4245 @item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets
4246 of characters such as @code{[a-z]} and @code{[abcdez]}.
4247 @item RandomStringUtils - Helper for creating randomised strings.
4248 @item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
4249 @item NumberRange - A range of numbers with an upper and lower bound.
4250 @item ObjectUtils - Helper for @code{java.lang.Object}.
4251 @item SerializationUtils - Helper for serializing objects.
4252 @item SystemUtils - Utility class defining the Java system properties.
4253 @item NestedException package - A sub-package for the creation of nested
4255 @item Enum package - A sub-package for the creation of enumerated types.
4256 @item Builder package - A sub-package for the creation of @code{equals},
4257 @code{hashCode}, @code{compareTo} and @code{toString} methods.
4259 (license license:asl2.0)))
4261 (define-public java-commons-lang3
4263 (name "java-commons-lang3")
4268 (uri (string-append "mirror://apache/commons/lang/source/"
4269 "commons-lang3-" version "-src.tar.gz"))
4271 (base32 "0xpshb9spjhplq5a7mr0y1bgfw8190ik4xj8f569xidfcki1d6kg"))))
4272 (build-system ant-build-system)
4273 (outputs '("out" "doc"))
4275 `(#:test-target "test"
4277 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-all"))
4278 (junit (assoc-ref %build-inputs "java-junit"))
4279 (easymock (assoc-ref %build-inputs "java-easymock"))
4280 (io (assoc-ref %build-inputs "java-commons-io")))
4281 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
4282 (string-append "-Dhamcrest.jar=" hamcrest
4283 "/share/java/hamcrest-all.jar")
4284 (string-append "-Dcommons-io.jar=" io
4285 "/share/java/commons-io-"
4286 ,(package-version java-commons-io)
4288 (string-append "-Deasymock.jar=" easymock
4289 "/share/java/easymock.jar")))
4291 (modify-phases %standard-phases
4292 (add-after 'build 'build-javadoc ant-build-javadoc)
4293 (replace 'install (install-jars "target"))
4294 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
4296 `(("java-junit" ,java-junit)
4297 ("java-commons-io" ,java-commons-io)
4298 ("java-hamcrest-all" ,java-hamcrest-all)
4299 ("java-easymock" ,java-easymock)))
4300 (home-page "http://commons.apache.org/lang/")
4301 (synopsis "Extension of the java.lang package")
4302 (description "The Commons Lang components contains a set of Java classes
4303 that provide helper methods for standard Java classes, especially those found
4304 in the @code{java.lang} package. The following classes are included:
4307 @item StringUtils - Helper for @code{java.lang.String}.
4308 @item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets of
4309 characters such as @code{[a-z]} and @code{[abcdez]}.
4310 @item RandomStringUtils - Helper for creating randomised strings.
4311 @item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
4312 @item NumberRange - A range of numbers with an upper and lower bound.
4313 @item ObjectUtils - Helper for @code{java.lang.Object}.
4314 @item SerializationUtils - Helper for serializing objects.
4315 @item SystemUtils - Utility class defining the Java system properties.
4316 @item NestedException package - A sub-package for the creation of nested
4318 @item Enum package - A sub-package for the creation of enumerated types.
4319 @item Builder package - A sub-package for the creation of @code{equals},
4320 @code{hashCode}, @code{compareTo} and @code{toString} methods.
4322 (license license:asl2.0)))
4324 (define-public java-jsr305
4326 (name "java-jsr305")
4330 (uri (string-append "https://repo1.maven.org/maven2/"
4331 "com/google/code/findbugs/"
4332 "jsr305/" version "/jsr305-"
4333 version "-sources.jar"))
4336 "1rh6jin9v7jqpq3kf1swl868l8i94r636n03pzpsmgr8v0lh9j2n"))))
4337 (build-system ant-build-system)
4339 `(#:tests? #f ; no tests included
4340 #:jar-name "jsr305.jar"))
4341 (home-page "http://findbugs.sourceforge.net/")
4342 (synopsis "Annotations for the static analyzer called findbugs")
4343 (description "This package provides annotations for the findbugs package.
4344 It provides packages in the @code{javax.annotations} namespace.")
4345 (license license:asl2.0)))
4347 (define-public java-guava
4350 ;; This is the last release of Guava that can be built with Java 7.
4354 (uri (string-append "https://github.com/google/guava/"
4355 "releases/download/v" version
4356 "/guava-" version "-sources.jar"))
4359 "1gawrs5gi6j5hcfxdgpnfli75vb9pfi4sn09pnc8xacr669yajwr"))))
4360 (build-system ant-build-system)
4362 `(#:tests? #f ; no tests included
4363 #:jar-name "guava.jar"
4365 (modify-phases %standard-phases
4366 (add-after 'unpack 'trim-sources
4368 (with-directory-excursion "src/com/google/common"
4369 ;; Remove annotations to avoid extra dependencies:
4370 ;; * "j2objc" annotations are used when converting Java to
4372 ;; * "errorprone" annotations catch common Java mistakes at
4374 ;; * "IgnoreJRERequirement" is used for Android.
4375 (substitute* (find-files "." "\\.java$")
4376 (("import com.google.j2objc.*") "")
4377 (("import com.google.errorprone.annotation.*") "")
4378 (("import org.codehaus.mojo.animal_sniffer.*") "")
4379 (("@CanIgnoreReturnValue") "")
4382 (("@RetainedWith") "")
4384 (("@ForOverride") "")
4385 (("@J2ObjCIncompatible") "")
4386 (("@IgnoreJRERequirement") "")))
4389 `(("java-jsr305" ,java-jsr305)))
4390 (home-page "https://github.com/google/guava")
4391 (synopsis "Google core libraries for Java")
4392 (description "Guava is a set of core libraries that includes new
4393 collection types (such as multimap and multiset), immutable collections, a
4394 graph library, functional types, an in-memory cache, and APIs/utilities for
4395 concurrency, I/O, hashing, primitives, reflection, string processing, and much
4397 (license license:asl2.0)))
4399 ;; The java-commons-logging package provides adapters to many different
4400 ;; logging frameworks. To avoid an excessive dependency graph we try to build
4401 ;; it with only a minimal set of adapters.
4402 (define-public java-commons-logging-minimal
4404 (name "java-commons-logging-minimal")
4408 (uri (string-append "mirror://apache/commons/logging/source/"
4409 "commons-logging-" version "-src.tar.gz"))
4412 "10bwcy5w8d7y39n0krlwhnp8ds3kj5zhmzj0zxnkw0qdlsjmsrj9"))))
4413 (build-system ant-build-system)
4415 `(#:tests? #f ; avoid dependency on logging frameworks
4416 #:jar-name "commons-logging-minimal.jar"
4418 (modify-phases %standard-phases
4419 (add-after 'unpack 'delete-adapters-and-tests
4421 ;; Delete all adapters except for NoOpLog, SimpleLog, and
4422 ;; LogFactoryImpl. NoOpLog is required to build; LogFactoryImpl
4423 ;; is used by applications; SimpleLog is the only actually usable
4424 ;; implementation that does not depend on another logging
4428 (delete-file (string-append
4429 "src/main/java/org/apache/commons/logging/impl/" file)))
4430 (list "Jdk13LumberjackLogger.java"
4431 "WeakHashtable.java"
4433 "ServletContextCleaner.java"
4436 "LogKitLogger.java"))
4437 (delete-file-recursively "src/test")
4439 (home-page "http://commons.apache.org/logging/")
4440 (synopsis "Common API for logging implementations")
4441 (description "The Logging package is a thin bridge between different
4442 logging implementations. A library that uses the commons-logging API can be
4443 used with any logging implementation at runtime.")
4444 (license license:asl2.0)))
4446 ;; This is the last release of the 1.x series.
4447 (define-public java-mockito-1
4449 (name "java-mockito")
4453 (uri (string-append "http://repo1.maven.org/maven2/"
4454 "org/mockito/mockito-core/" version
4455 "/mockito-core-" version "-sources.jar"))
4458 "0vmiwnwpf83g2q7kj1rislmja8fpvqkixjhawh7nxnygx6pq11kc"))))
4459 (build-system ant-build-system)
4461 `(#:jar-name "mockito.jar"
4462 #:tests? #f ; no tests included
4463 ;; FIXME: patch-and-repack does not support jars, so we have to apply
4464 ;; patches in build phases.
4466 (modify-phases %standard-phases
4467 ;; Mockito was developed against a different version of hamcrest,
4468 ;; which does not require matcher implementations to provide an
4469 ;; implementation of the "describeMismatch" method. We add this
4470 ;; simple definition to pass the build with our version of hamcrest.
4471 (add-after 'unpack 'fix-hamcrest-build-error
4473 (substitute* "src/org/mockito/internal/matchers/LocalizedMatcher.java"
4474 (("public Matcher getActualMatcher\\(\\) .*" line)
4476 public void describeMismatch(Object item, Description description) {
4477 actualMatcher.describeMismatch(item, description);
4481 ;; Mockito bundles cglib. We have a cglib package, so let's use
4483 (add-after 'unpack 'use-system-libraries
4485 (with-directory-excursion "src/org/mockito/internal/creation/cglib"
4486 (substitute* '("CGLIBHacker.java"
4487 "CglibMockMaker.java"
4488 "ClassImposterizer.java"
4489 "DelegatingMockitoMethodProxy.java"
4490 "MethodInterceptorFilter.java"
4491 "MockitoNamingPolicy.java"
4492 "SerializableMockitoMethodProxy.java"
4493 "SerializableNoOp.java")
4494 (("import org.mockito.cglib") "import net.sf.cglib")))
4497 `(("java-junit" ,java-junit)
4498 ("java-objenesis" ,java-objenesis)
4499 ("java-cglib" ,java-cglib)
4500 ("java-hamcrest-core" ,java-hamcrest-core)))
4501 (home-page "http://mockito.org")
4502 (synopsis "Mockito is a mock library for Java")
4503 (description "Mockito is a mocking library for Java which lets you write
4504 tests with a clean and simple API. It generates mocks using reflection, and
4505 it records all mock invocations, including methods arguments.")
4506 (license license:asl2.0)))
4508 (define-public java-httpcomponents-httpcore
4510 (name "java-httpcomponents-httpcore")
4514 (uri (string-append "mirror://apache//httpcomponents/httpcore/"
4515 "source/httpcomponents-core-"
4516 version "-src.tar.gz"))
4519 "02bwcf38y4vgwq7kj2s6q7qrmma641r5lacivm16kgxvb2j6h1vy"))))
4520 (build-system ant-build-system)
4522 `(#:jar-name "httpcomponents-httpcore.jar"
4524 (modify-phases %standard-phases
4525 (add-after 'unpack 'chdir
4526 (lambda _ (chdir "httpcore") #t)))))
4528 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)
4529 ("java-commons-lang3" ,java-commons-lang3)))
4531 `(("java-junit" ,java-junit)
4532 ("java-mockito" ,java-mockito-1)))
4533 (home-page "https://hc.apache.org/httpcomponents-core-4.4.x/index.html")
4534 (synopsis "Low level HTTP transport components")
4535 (description "HttpCore is a set of low level HTTP transport components
4536 that can be used to build custom client and server side HTTP services with a
4537 minimal footprint. HttpCore supports two I/O models: blocking I/O model based
4538 on the classic Java I/O and non-blocking, event driven I/O model based on Java
4541 This package provides the blocking I/O model library.")
4542 (license license:asl2.0)))
4544 (define-public java-httpcomponents-httpcore-nio
4545 (package (inherit java-httpcomponents-httpcore)
4546 (name "java-httpcomponents-httpcore-nio")
4548 `(#:jar-name "httpcomponents-httpcore-nio.jar"
4550 (modify-phases %standard-phases
4551 (add-after 'unpack 'chdir
4552 (lambda _ (chdir "httpcore-nio") #t)))))
4554 `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
4555 ("java-hamcrest-core" ,java-hamcrest-core)
4556 ,@(package-inputs java-httpcomponents-httpcore)))
4557 (description "HttpCore is a set of low level HTTP transport components
4558 that can be used to build custom client and server side HTTP services with a
4559 minimal footprint. HttpCore supports two I/O models: blocking I/O model based
4560 on the classic Java I/O and non-blocking, event driven I/O model based on Java
4563 This package provides the non-blocking I/O model library based on Java
4566 (define-public java-httpcomponents-httpcore-ab
4567 (package (inherit java-httpcomponents-httpcore)
4568 (name "java-httpcomponents-httpcore-ab")
4570 `(#:jar-name "httpcomponents-httpcore-ab.jar"
4572 (modify-phases %standard-phases
4573 (add-after 'unpack 'chdir
4574 (lambda _ (chdir "httpcore-ab") #t)))))
4576 `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
4577 ("java-commons-cli" ,java-commons-cli)
4578 ("java-hamcrest-core" ,java-hamcrest-core)
4579 ,@(package-inputs java-httpcomponents-httpcore)))
4580 (synopsis "Apache HttpCore benchmarking tool")
4581 (description "This package provides the HttpCore benchmarking tool. It is
4582 an Apache AB clone based on HttpCore.")))
4584 (define-public java-httpcomponents-httpclient
4586 (name "java-httpcomponents-httpclient")
4590 (uri (string-append "mirror://apache/httpcomponents/httpclient/"
4591 "source/httpcomponents-client-"
4592 version "-src.tar.gz"))
4595 "1428399s7qy3cim5wc6f3ks4gl9nf9vkjpfmnlap3jflif7g2pj1"))))
4596 (build-system ant-build-system)
4598 `(#:jar-name "httpcomponents-httpclient.jar"
4600 (modify-phases %standard-phases
4601 (add-after 'unpack 'chdir
4602 (lambda _ (chdir "httpclient") #t)))))
4604 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)
4605 ("java-commons-codec" ,java-commons-codec)
4606 ("java-hamcrest-core" ,java-hamcrest-core)
4607 ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
4608 ("java-mockito" ,java-mockito-1)
4609 ("java-junit" ,java-junit)))
4610 (home-page "https://hc.apache.org/httpcomponents-client-ga/")
4611 (synopsis "HTTP client library for Java")
4612 (description "Although the @code{java.net} package provides basic
4613 functionality for accessing resources via HTTP, it doesn't provide the full
4614 flexibility or functionality needed by many applications. @code{HttpClient}
4615 seeks to fill this void by providing an efficient, up-to-date, and
4616 feature-rich package implementing the client side of the most recent HTTP
4617 standards and recommendations.")
4618 (license license:asl2.0)))
4620 (define-public java-httpcomponents-httpmime
4621 (package (inherit java-httpcomponents-httpclient)
4622 (name "java-httpcomponents-httpmime")
4624 `(#:jar-name "httpcomponents-httpmime.jar"
4626 (modify-phases %standard-phases
4627 (add-after 'unpack 'chdir
4628 (lambda _ (chdir "httpmime") #t)))))
4630 `(("java-httpcomponents-httpclient" ,java-httpcomponents-httpclient)
4631 ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
4632 ("java-junit" ,java-junit)
4633 ("java-hamcrest-core" ,java-hamcrest-core)))))
4635 (define-public java-commons-net
4637 (name "java-commons-net")
4641 (uri (string-append "mirror://apache/commons/net/source/"
4642 "commons-net-" version "-src.tar.gz"))
4645 "0n0cmnddk9qdqhjvka8pc6hd9mn2qi3166f1s6xk32h7rfy1adxr"))))
4646 (build-system ant-build-system)
4648 `(;; FIXME: MainTest.java tries to read "examples.properties" (which
4649 ;; should be "resources/examples/examples.properties"), but gets "null"
4652 #:jar-name "commons-net.jar"))
4654 `(("java-junit" ,java-junit)
4655 ("java-hamcrest-core" ,java-hamcrest-core)))
4656 (home-page "http://commons.apache.org/net/")
4657 (synopsis "Client library for many basic Internet protocols")
4658 (description "The Apache Commons Net library implements the client side of
4659 many basic Internet protocols. The purpose of the library is to provide
4660 fundamental protocol access, not higher-level abstractions.")
4661 (license license:asl2.0)))
4663 (define-public java-jsch
4669 (uri (string-append "mirror://sourceforge/jsch/jsch/"
4670 version "/jsch-" version ".zip"))
4673 "029rdddyq1mh3ghryh3ki99kba1xkf1d1swjv2vi6lk6zzjy2wdb"))))
4674 (build-system ant-build-system)
4676 `(#:build-target "dist"
4677 #:tests? #f ; no tests included
4679 (modify-phases %standard-phases
4680 (replace 'install (install-jars "dist")))))
4682 `(("unzip" ,unzip)))
4683 (home-page "http://www.jcraft.com/jsch/")
4684 (synopsis "Pure Java implementation of SSH2")
4685 (description "JSch is a pure Java implementation of SSH2. JSch allows you
4686 to connect to an SSH server and use port forwarding, X11 forwarding, file
4687 transfer, etc., and you can integrate its functionality into your own Java
4689 (license license:bsd-3)))
4691 (define-public java-commons-compress
4693 (name "java-commons-compress")
4697 (uri (string-append "mirror://apache/commons/compress/source/"
4698 "commons-compress-" version "-src.tar.gz"))
4701 "1vjqvavrn0babffn1kciz6v52ibwq2vwhzlb95hazis3lgllnxc8"))))
4702 (build-system ant-build-system)
4704 `(#:jar-name "commons-compress.jar"
4706 (modify-phases %standard-phases
4707 (add-after 'unpack 'delete-bad-tests
4709 (with-directory-excursion "src/test/java/org/apache/commons/compress/"
4710 ;; FIXME: These tests really should not fail. Maybe they are
4711 ;; indicative of problems with our Java packaging work.
4713 ;; This test fails with a null pointer exception.
4714 (delete-file "archivers/sevenz/SevenZOutputFileTest.java")
4715 ;; This test fails to open test resources.
4716 (delete-file "archivers/zip/ExplodeSupportTest.java")
4718 ;; FIXME: This test adds a dependency on powermock, which is hard to
4719 ;; package at this point.
4720 ;; https://github.com/powermock/powermock
4721 (delete-file "archivers/sevenz/SevenZNativeHeapTest.java"))
4724 `(("java-junit" ,java-junit)
4725 ("java-hamcrest-core" ,java-hamcrest-core)
4726 ("java-mockito" ,java-mockito-1)
4727 ("java-xz" ,java-xz)))
4728 (home-page "https://commons.apache.org/proper/commons-compress/")
4729 (synopsis "Java library for working with compressed files")
4730 (description "The Apache Commons Compress library defines an API for
4731 working with compressed files such as ar, cpio, Unix dump, tar, zip, gzip, XZ,
4732 Pack200, bzip2, 7z, arj, lzma, snappy, DEFLATE, lz4 and Z files.")
4733 (license license:asl2.0)))
4735 (define-public java-commons-csv
4737 (name "java-commons-csv")
4741 (uri (string-append "mirror://apache/commons/csv/source/"
4742 "commons-csv-" version "-src.tar.gz"))
4745 "1l89m0fm2s3xx3v3iynvangymfg2vlyngaj6fgsi457nmsw7m7ij"))))
4746 (build-system ant-build-system)
4748 `(#:jar-name "commons-csv.jar"
4749 #:source-dir "src/main/java"
4750 #:tests? #f)); FIXME: requires java-h2
4752 `(("java-hamcrest-core" ,java-hamcrest-core)
4753 ("java-commons-io" ,java-commons-io)
4754 ("java-commons-lang3" ,java-commons-lang3)
4755 ("junit" ,java-junit)))
4756 (home-page "https://commons.apache.org/proper/commons-csv/")
4757 (synopsis "Read and write CSV documents")
4758 (description "Commons CSV reads and writes files in variations of the Comma
4759 Separated Value (CSV) format. The most common CSV formats are predefined in the
4763 @item Microsoft Excel
4764 @item Informix UNLOAD
4765 @item Informix UNLOAD CSV
4771 Custom formats can be created using a fluent style API.")
4772 (license license:asl2.0)))
4774 (define-public java-osgi-annotation
4776 (name "java-osgi-annotation")
4780 (uri (string-append "https://repo1.maven.org/maven2/"
4781 "org/osgi/org.osgi.annotation/" version "/"
4782 "org.osgi.annotation-" version "-sources.jar"))
4785 "1q718mb7gqg726rh6pc2hcisn8v50nv35abbir0jypmffhiii85w"))))
4786 (build-system ant-build-system)
4788 `(#:tests? #f ; no tests
4789 #:jar-name "osgi-annotation.jar"))
4790 (home-page "https://www.osgi.org")
4791 (synopsis "Annotation module of OSGi framework")
4793 "OSGi, for Open Services Gateway initiative framework, is a module system
4794 and service platform for the Java programming language. This package contains
4795 the OSGi annotation module, providing additional services to help dynamic
4797 (license license:asl2.0)))
4799 (define-public java-osgi-core
4801 (name "java-osgi-core")
4805 (uri (string-append "https://repo1.maven.org/maven2/"
4806 "org/osgi/org.osgi.core/" version "/"
4807 "org.osgi.core-" version "-sources.jar"))
4810 "19bpf5jx32jq9789gyhin35q5v7flmw0p9mk7wbgqpxqfmxyiabv"))))
4811 (build-system ant-build-system)
4813 `(#:tests? #f ; no tests
4814 #:jar-name "osgi-core.jar"))
4816 `(("java-osgi-annotation" ,java-osgi-annotation)))
4817 (home-page "https://www.osgi.org")
4818 (synopsis "Core module of OSGi framework")
4820 "OSGi, for Open Services Gateway initiative framework, is a module system
4821 and service platform for the Java programming language. This package contains
4822 the OSGi Core module.")
4823 (license license:asl2.0)))
4825 (define-public java-osgi-service-event
4827 (name "java-osgi-service-event")
4831 (uri (string-append "https://repo1.maven.org/maven2/"
4832 "org/osgi/org.osgi.service.event/"
4833 version "/org.osgi.service.event-"
4834 version "-sources.jar"))
4837 "1nyhlgagwym75bycnjczwbnpymv2iw84zbhvvzk84g9q736i6qxm"))))
4838 (build-system ant-build-system)
4840 `(#:tests? #f ; no tests
4841 #:jar-name "osgi-service-event.jar"))
4843 `(("java-osgi-annotation" ,java-osgi-annotation)
4844 ("java-osgi-core" ,java-osgi-core)))
4845 (home-page "https://www.osgi.org")
4846 (synopsis "OSGi service event module")
4848 "OSGi, for Open Services Gateway initiative framework, is a module system
4849 and service platform for the Java programming language. This package contains
4850 the OSGi @code{org.osgi.service.event} module.")
4851 (license license:asl2.0)))
4853 (define-public java-eclipse-osgi
4855 (name "java-eclipse-osgi")
4859 (uri (string-append "https://repo1.maven.org/maven2/"
4860 "org/eclipse/platform/org.eclipse.osgi/"
4861 version "/org.eclipse.osgi-"
4862 version "-sources.jar"))
4865 "00cqc6lb29n0zv68b4l842vzkwawvbr7gshfdygsk8sicvcq2c7b"))))
4866 (build-system ant-build-system)
4868 `(#:tests? #f ; no tests included
4869 #:jar-name "eclipse-equinox-osgi.jar"))
4871 `(("java-osgi-annotation" ,java-osgi-annotation)))
4872 (home-page "http://www.eclipse.org/equinox/")
4873 (synopsis "Eclipse Equinox OSGi framework")
4874 (description "This package provides an implementation of the OSGi Core
4876 (license license:epl1.0)))
4878 (define-public java-eclipse-equinox-common
4880 (name "java-eclipse-equinox-common")
4884 (uri (string-append "https://repo1.maven.org/maven2/"
4885 "org/eclipse/platform/org.eclipse.equinox.common/"
4886 version "/org.eclipse.equinox.common-"
4887 version "-sources.jar"))
4890 "12aazpkgw46r1qj0pr421jzwhbmsizd97r37krd7njnbrdgfzksc"))))
4891 (build-system ant-build-system)
4893 `(#:tests? #f ; no tests included
4894 #:jar-name "eclipse-equinox-common.jar"))
4896 `(("java-eclipse-osgi" ,java-eclipse-osgi)))
4897 (home-page "http://www.eclipse.org/equinox/")
4898 (synopsis "Common Eclipse runtime")
4899 (description "This package provides the common Eclipse runtime.")
4900 (license license:epl1.0)))
4902 (define-public java-eclipse-core-jobs
4904 (name "java-eclipse-core-jobs")
4908 (uri (string-append "https://repo1.maven.org/maven2/"
4909 "org/eclipse/platform/org.eclipse.core.jobs/"
4910 version "/org.eclipse.core.jobs-"
4911 version "-sources.jar"))
4914 "0395b8lh0km8vhzjnchvs1rii1qz48hyvb2wqfaq4yhklbwihq4b"))))
4915 (build-system ant-build-system)
4917 `(#:tests? #f ; no tests included
4918 #:jar-name "eclipse-core-jobs.jar"))
4920 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
4921 ("java-eclipse-osgi" ,java-eclipse-osgi)))
4922 (home-page "http://www.eclipse.org/equinox/")
4923 (synopsis "Eclipse jobs mechanism")
4924 (description "This package provides the Eclipse jobs mechanism.")
4925 (license license:epl1.0)))
4927 (define-public java-eclipse-equinox-registry
4929 (name "java-eclipse-equinox-registry")
4933 (uri (string-append "https://repo1.maven.org/maven2/"
4934 "org/eclipse/platform/org.eclipse.equinox.registry/"
4935 version "/org.eclipse.equinox.registry-"
4936 version "-sources.jar"))
4939 "1i9sgymh2fy5vdgk5y7s3qvrlbgh4l93ddqi3v4zmca7hwrlhf9k"))))
4940 (build-system ant-build-system)
4942 `(#:tests? #f ; no tests included
4943 #:jar-name "eclipse-equinox-registry.jar"))
4945 `(("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
4946 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
4947 ("java-eclipse-osgi" ,java-eclipse-osgi)))
4948 (home-page "http://www.eclipse.org/equinox/")
4949 (synopsis "Eclipse extension registry support")
4950 (description "This package provides support for the Eclipse extension
4952 (license license:epl1.0)))
4954 (define-public java-eclipse-equinox-app
4956 (name "java-eclipse-equinox-app")
4960 (uri (string-append "https://repo1.maven.org/maven2/"
4961 "org/eclipse/platform/org.eclipse.equinox.app/"
4962 version "/org.eclipse.equinox.app-"
4963 version "-sources.jar"))
4966 "0nhvbp93y203ar7y59gb0mz3w2d3jlqhr0c9hii9bcfpmr7imdab"))))
4967 (build-system ant-build-system)
4969 `(#:tests? #f ; no tests included
4970 #:jar-name "eclipse-equinox-app.jar"))
4972 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
4973 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
4974 ("java-eclipse-osgi" ,java-eclipse-osgi)
4975 ("java-osgi-service-event" ,java-osgi-service-event)))
4976 (home-page "http://www.eclipse.org/equinox/")
4977 (synopsis "Equinox application container")
4978 (description "This package provides the Equinox application container for
4980 (license license:epl1.0)))
4982 (define-public java-eclipse-equinox-preferences
4984 (name "java-eclipse-equinox-preferences")
4988 (uri (string-append "https://repo1.maven.org/maven2/"
4989 "org/eclipse/platform/org.eclipse.equinox.preferences/"
4990 version "/org.eclipse.equinox.preferences-"
4991 version "-sources.jar"))
4994 "0k7w6c141sqym4fy3af0qkwpy4pdh2vsjpjba6rp5fxyqa24v0a2"))))
4995 (build-system ant-build-system)
4997 `(#:tests? #f ; no tests included
4998 #:jar-name "eclipse-equinox-preferences.jar"))
5000 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5001 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5002 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5003 (home-page "http://www.eclipse.org/equinox/")
5004 (synopsis "Eclipse preferences mechanism")
5005 (description "This package provides the Eclipse preferences mechanism with
5006 the module @code{org.eclipse.equinox.preferences}.")
5007 (license license:epl1.0)))
5009 (define-public java-eclipse-core-contenttype
5011 (name "java-eclipse-core-contenttype")
5015 (uri (string-append "https://repo1.maven.org/maven2/"
5016 "org/eclipse/platform/org.eclipse.core.contenttype/"
5017 version "/org.eclipse.core.contenttype-"
5018 version "-sources.jar"))
5021 "1wcqcv7ijwv5rh748vz3x9pkmjl9w1r0k0026k56n8yjl4rrmspi"))))
5022 (build-system ant-build-system)
5024 `(#:tests? #f ; no tests included
5025 #:jar-name "eclipse-core-contenttype.jar"))
5027 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5028 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5029 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5030 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5031 (home-page "http://www.eclipse.org/")
5032 (synopsis "Eclipse content mechanism")
5033 (description "This package provides the Eclipse content mechanism in the
5034 @code{org.eclipse.core.contenttype} module.")
5035 (license license:epl1.0)))
5037 (define-public java-eclipse-core-runtime
5039 (name "java-eclipse-core-runtime")
5043 (uri (string-append "https://repo1.maven.org/maven2/"
5044 "org/eclipse/platform/org.eclipse.core.runtime/"
5045 version "/org.eclipse.core.runtime-"
5046 version "-sources.jar"))
5049 "16mkf8jgj35pgzms7w1gyfq0gfm4ixw6c5xbbxzdj1la56c758ya"))))
5050 (build-system ant-build-system)
5052 `(#:tests? #f ; no tests included
5053 #:jar-name "eclipse-core-runtime.jar"))
5055 `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
5056 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
5057 ("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
5058 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5059 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5060 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5061 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5062 (home-page "https://www.eclipse.org/")
5063 (synopsis "Eclipse core runtime")
5064 (description "This package provides the Eclipse core runtime with the
5065 module @code{org.eclipse.core.runtime}.")
5066 (license license:epl1.0)))
5068 (define-public java-eclipse-core-filesystem
5070 (name "java-eclipse-core-filesystem")
5074 (uri (string-append "https://repo1.maven.org/maven2/"
5075 "org/eclipse/platform/org.eclipse.core.filesystem/"
5076 version "/org.eclipse.core.filesystem-"
5077 version "-sources.jar"))
5080 "0km1bhwjim4rfy3pkvjhvy31kgsyf2ncx0mlkmbf5n6g57pphdyj"))))
5081 (build-system ant-build-system)
5083 `(#:tests? #f ; no tests included
5084 #:jar-name "eclipse-core-filesystem.jar"))
5086 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5087 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5088 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5089 (home-page "https://www.eclipse.org/")
5090 (synopsis "Eclipse core file system")
5091 (description "This package provides the Eclipse core file system with the
5092 module @code{org.eclipse.core.filesystem}.")
5093 (license license:epl1.0)))
5095 (define-public java-eclipse-core-expressions
5097 (name "java-eclipse-core-expressions")
5101 (uri (string-append "https://repo1.maven.org/maven2/"
5102 "org/eclipse/platform/org.eclipse.core.expressions/"
5103 version "/org.eclipse.core.expressions-"
5104 version "-sources.jar"))
5107 "18bw2l875gmygvpagpgk9l24qzbdjia4ag12nw6fi8v8yaq4987f"))))
5108 (build-system ant-build-system)
5110 `(#:tests? #f ; no tests included
5111 #:jar-name "eclipse-core-expressions.jar"))
5113 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5114 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5115 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5116 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5117 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5118 (home-page "https://www.eclipse.org/")
5119 (synopsis "Eclipse core expression language")
5120 (description "This package provides the Eclipse core expression language
5121 with the @code{org.eclipse.core.expressions} module.")
5122 (license license:epl1.0)))
5124 (define-public java-eclipse-core-variables
5126 (name "java-eclipse-core-variables")
5130 (uri (string-append "https://repo1.maven.org/maven2/"
5131 "org/eclipse/platform/org.eclipse.core.variables/"
5132 version "/org.eclipse.core.variables-"
5133 version "-sources.jar"))
5136 "12dirh03zi4n5x5cj07vzrhkmnqy6h9q10h9j605pagmpmifyxmy"))))
5137 (build-system ant-build-system)
5139 `(#:tests? #f ; no tests included
5140 #:jar-name "eclipse-core-variables.jar"))
5142 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5143 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5144 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5145 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5146 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5147 (home-page "https://www.eclipse.org/platform")
5148 (synopsis "Eclipse core variables")
5149 (description "This package provides the Eclipse core variables module
5150 @code{org.eclipse.core.variables}.")
5151 (license license:epl1.0)))
5153 (define-public java-eclipse-ant-core
5155 (name "java-eclipse-ant-core")
5159 (uri (string-append "https://repo1.maven.org/maven2/"
5160 "org/eclipse/platform/org.eclipse.ant.core/"
5161 version "/org.eclipse.ant.core-"
5162 version "-sources.jar"))
5165 "11g3if794qjlk98mz9zch22rr56sd7z63vn4i7k2icr8cq5bfqg7"))))
5166 (build-system ant-build-system)
5168 `(#:tests? #f ; no tests included
5169 #:jar-name "eclipse-ant-core.jar"))
5171 `(("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
5172 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5173 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5174 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5175 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
5176 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5177 ("java-eclipse-core-variables" ,java-eclipse-core-variables)
5178 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5179 (home-page "https://www.eclipse.org/platform")
5180 (synopsis "Ant build tool core libraries")
5181 (description "This package provides the ant build tool core libraries with
5182 the module @code{org.eclipse.ant.core}.")
5183 (license license:epl1.0)))
5185 (define-public java-eclipse-core-resources
5187 (name "java-eclipse-core-resources")
5191 (uri (string-append "https://repo1.maven.org/maven2/"
5192 "org/eclipse/platform/org.eclipse.core.resources/"
5193 version "/org.eclipse.core.resources-"
5194 version "-sources.jar"))
5197 "1hrfxrll6cpcagfksk2na1ypvkcnsp0fk6n3vcsrn97qayf9mx9l"))))
5198 (build-system ant-build-system)
5200 `(#:tests? #f ; no tests included
5201 #:jar-name "eclipse-core-resources.jar"))
5203 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5204 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5205 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5206 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
5207 ("java-eclipse-core-expressions" ,java-eclipse-core-expressions)
5208 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
5209 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
5210 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5211 ("java-eclipse-ant-core" ,java-eclipse-ant-core)
5212 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5213 (home-page "https://www.eclipse.org/")
5214 (synopsis "Eclipse core resource management")
5215 (description "This package provides the Eclipse core resource management
5216 module @code{org.eclipse.core.resources}.")
5217 (license license:epl1.0)))
5219 (define-public java-eclipse-compare-core
5221 (name "java-eclipse-compare-core")
5225 (uri (string-append "https://repo1.maven.org/maven2/"
5226 "org/eclipse/platform/org.eclipse.compare.core/"
5227 version "/org.eclipse.compare.core-"
5228 version "-sources.jar"))
5231 "10g37r0pbiffyv2wk35c6g5lwzkdipkl0kkjp41v84dln46xm4dg"))))
5232 (build-system ant-build-system)
5234 `(#:tests? #f ; no tests included
5235 #:jar-name "eclipse-compare-core.jar"))
5237 `(("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5238 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5239 ("java-eclipse-osgi" ,java-eclipse-osgi)
5240 ("java-icu4j" ,java-icu4j)))
5241 (home-page "https://www.eclipse.org/")
5242 (synopsis "Eclipse core compare support")
5243 (description "This package provides the Eclipse core compare support
5244 module @code{org.eclipse.compare.core}.")
5245 (license license:epl1.0)))
5247 (define-public java-eclipse-team-core
5249 (name "java-eclipse-team-core")
5253 (uri (string-append "https://repo1.maven.org/maven2/"
5254 "org/eclipse/platform/org.eclipse.team.core/"
5255 version "/org.eclipse.team.core-"
5256 version "-sources.jar"))
5259 "02j2jzqgb26zx2d5ahxmvijw6j4r0la90zl5c3i65x6z19ciyam7"))))
5260 (build-system ant-build-system)
5262 `(#:tests? #f ; no tests included
5263 #:jar-name "eclipse-team-core.jar"))
5265 `(("java-eclipse-compare-core" ,java-eclipse-compare-core)
5266 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
5267 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
5268 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
5269 ("java-eclipse-core-resources" ,java-eclipse-core-resources)
5270 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5271 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5272 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5273 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5274 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5275 (home-page "https://www.eclipse.org/platform")
5276 (synopsis "Eclipse team support core")
5277 (description "This package provides the Eclipse team support core module
5278 @code{org.eclipse.team.core}.")
5279 (license license:epl1.0)))
5281 (define-public java-eclipse-core-commands
5283 (name "java-eclipse-core-commands")
5287 (uri (string-append "https://repo1.maven.org/maven2/"
5288 "org/eclipse/platform/org.eclipse.core.commands/"
5289 version "/org.eclipse.core.commands-"
5290 version "-sources.jar"))
5293 "0yjn482qndcfrsq3jd6vnhcylp16420f5aqkrwr8spsprjigjcr9"))))
5294 (build-system ant-build-system)
5296 `(#:tests? #f ; no tests included
5297 #:jar-name "eclipse-core-commands.jar"))
5299 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)))
5300 (home-page "https://www.eclipse.org/platform")
5301 (synopsis "Eclipse core commands")
5302 (description "This package provides Eclipse core commands in the module
5303 @code{org.eclipse.core.commands}.")
5304 (license license:epl1.0)))
5306 (define-public java-eclipse-text
5308 (name "java-eclipse-text")
5312 (uri (string-append "https://repo1.maven.org/maven2/"
5313 "org/eclipse/platform/org.eclipse.text/"
5314 version "/org.eclipse.text-"
5315 version "-sources.jar"))
5318 "0scz70vzz5qs5caji9f5q01vkqnvip7dpri1q07l8wbbdcxn4cq1"))))
5319 (build-system ant-build-system)
5321 `(#:tests? #f ; no tests included
5322 #:jar-name "eclipse-text.jar"
5324 (modify-phases %standard-phases
5325 ;; When creating a new category we must make sure that the new list
5326 ;; matches List<Position>. By default it seems to be too generic
5327 ;; (ArrayList<Object>), so we specialize it to ArrayList<Position>.
5328 ;; Without this we get this error:
5330 ;; [javac] .../src/org/eclipse/jface/text/AbstractDocument.java:376:
5331 ;; error: method put in interface Map<K,V> cannot be applied to given types;
5332 ;; [javac] fPositions.put(category, new ArrayList<>());
5334 ;; [javac] required: String,List<Position>
5335 ;; [javac] found: String,ArrayList<Object>
5336 ;; [javac] reason: actual argument ArrayList<Object> cannot be converted
5337 ;; to List<Position> by method invocation conversion
5338 ;; [javac] where K,V are type-variables:
5339 ;; [javac] K extends Object declared in interface Map
5340 ;; [javac] V extends Object declared in interface Map
5342 ;; I don't know if this is a good fix. I suspect it is not, but it
5344 (add-after 'unpack 'fix-compilation-error
5346 (substitute* "src/org/eclipse/jface/text/AbstractDocument.java"
5347 (("Positions.put\\(category, new ArrayList<>\\(\\)\\);")
5348 "Positions.put(category, new ArrayList<Position>());"))
5351 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5352 ("java-eclipse-core-commands" ,java-eclipse-core-commands)
5353 ("java-icu4j" ,java-icu4j)))
5354 (home-page "http://www.eclipse.org/platform")
5355 (synopsis "Eclipse text library")
5356 (description "Platform Text is part of the Platform UI project and
5357 provides the basic building blocks for text and text editors within Eclipse
5358 and contributes the Eclipse default text editor.")
5359 (license license:epl1.0)))
5361 (define-public java-eclipse-jdt-core
5363 (name "java-eclipse-jdt-core")
5367 (uri (string-append "https://repo1.maven.org/maven2/"
5368 "org/eclipse/jdt/org.eclipse.jdt.core/"
5369 version "/org.eclipse.jdt.core-"
5370 version "-sources.jar"))
5373 "191xw4lc7mjjkprh4ji5vnpjvr5r4zvbpwkriy4bvsjqrz35vh1j"))))
5374 (build-system ant-build-system)
5376 `(#:tests? #f ; no tests included
5377 #:jar-name "eclipse-jdt-core.jar"))
5379 `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
5380 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
5381 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
5382 ("java-eclipse-core-resources" ,java-eclipse-core-resources)
5383 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5384 ("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
5385 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5386 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5387 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5388 ("java-eclipse-osgi" ,java-eclipse-osgi)
5389 ("java-eclipse-text" ,java-eclipse-text)))
5390 (home-page "https://www.eclipse.org/jdt")
5391 (synopsis "Java development tools core libraries")
5392 (description "This package provides the core libraries of the Eclipse Java
5393 development tools.")
5394 (license license:epl1.0)))
5396 (define-public java-javax-mail
5398 (name "java-javax-mail")
5402 (uri (string-append "https://repo1.maven.org/maven2/"
5403 "com/sun/mail/javax.mail/"
5404 version "/javax.mail-"
5405 version "-sources.jar"))
5408 "0sdlfgsc2b5s89xv1261y8i0jijcja019k2x1c8ngfn582w4jly9"))))
5409 (build-system ant-build-system)
5411 `(#:tests? #f ; no tests
5412 #:jar-name "javax-mail.jar"))
5413 (home-page "https://javamail.java.net")
5414 (synopsis "Reference implementation of the JavaMail API")
5416 "This package provides versions of the JavaMail API implementation, IMAP,
5417 SMTP, and POP3 service providers, some examples, and documentation for the
5419 ;; GPLv2 only with "classpath exception".
5420 (license license:gpl2)))
5422 (define-public java-log4j-api
5424 (name "java-log4j-api")
5428 (uri (string-append "mirror://apache/logging/log4j/" version
5429 "/apache-log4j-" version "-src.tar.gz"))
5432 "0j5p9gik0jysh37nlrckqbky12isy95cpwg2gv5fas1rcdqbraxd"))))
5433 (build-system ant-build-system)
5435 `(#:tests? #f ; tests require unpackaged software
5436 #:jar-name "log4j-api.jar"
5438 (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out")
5441 (modify-phases %standard-phases
5442 (add-after 'unpack 'enter-dir
5443 (lambda _ (chdir "log4j-api") #t))
5444 ;; FIXME: The tests require additional software that has not been
5445 ;; packaged yet, such as
5446 ;; * org.apache.maven
5447 ;; * org.apache.felix
5448 (add-after 'enter-dir 'delete-tests
5449 (lambda _ (delete-file-recursively "src/test") #t)))))
5451 `(("java-osgi-core" ,java-osgi-core)
5452 ("java-hamcrest-core" ,java-hamcrest-core)
5453 ("java-junit" ,java-junit)))
5454 (home-page "http://logging.apache.org/log4j/2.x/")
5455 (synopsis "API module of the Log4j logging framework for Java")
5457 "This package provides the API module of the Log4j logging framework for
5459 (license license:asl2.0)))
5461 (define-public java-log4j-core
5463 (inherit java-log4j-api)
5464 (name "java-log4j-core")
5466 `(("java-osgi-core" ,java-osgi-core)
5467 ("java-hamcrest-core" ,java-hamcrest-core)
5468 ("java-log4j-api" ,java-log4j-api)
5469 ("java-mail" ,java-mail)
5470 ("java-jboss-jms-api-spec" ,java-jboss-jms-api-spec)
5471 ("java-lmax-disruptor" ,java-lmax-disruptor)
5472 ("java-kafka" ,java-kafka-clients)
5473 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
5474 ("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
5475 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
5476 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)
5477 ("java-fasterxml-jackson-dataformat-xml" ,java-fasterxml-jackson-dataformat-xml)
5478 ("java-fasterxml-jackson-dataformat-yaml" ,java-fasterxml-jackson-dataformat-yaml)
5479 ("java-commons-compress" ,java-commons-compress)
5480 ("java-commons-csv" ,java-commons-csv)
5481 ("java-jeromq" ,java-jeromq)
5482 ("java-junit" ,java-junit)))
5484 `(("hamcrest" ,java-hamcrest-all)
5485 ("java-commons-io" ,java-commons-io)
5486 ("java-commons-lang3" ,java-commons-lang3)
5487 ("slf4j" ,java-slf4j-api)))
5489 `(#:tests? #f ; tests require more dependencies
5490 #:test-dir "src/test"
5491 #:source-dir "src/main/java"
5492 #:jar-name "log4j-core.jar"
5495 (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out")
5498 (modify-phases %standard-phases
5499 (add-after 'unpack 'enter-dir
5500 (lambda _ (chdir "log4j-core") #t)))))
5501 (synopsis "Core component of the Log4j framework")
5502 (description "This package provides the core component of the Log4j
5503 logging framework for Java.")))
5505 (define-public java-log4j-1.2-api
5507 (inherit java-log4j-api)
5508 (name "java-log4j-1.2-api")
5510 `(#:jar-name "java-log4j-1.2-api.jar"
5511 #:source-dir "log4j-1.2-api/src/main/java"
5513 ;; Tests require maven-model (and other maven subprojects), which is a
5514 ;; cyclic dependency.
5517 `(("log4j-api" ,java-log4j-api)
5518 ("log4j-core" ,java-log4j-core)
5519 ("osgi-core" ,java-osgi-core)
5520 ("eclipse-osgi" ,java-eclipse-osgi)
5521 ("java-lmax-disruptor" ,java-lmax-disruptor)))))
5523 (define-public java-commons-cli
5525 (name "java-commons-cli")
5529 (uri (string-append "mirror://apache/commons/cli/source/"
5530 "commons-cli-" version "-src.tar.gz"))
5533 "1fkjn552i12vp3xxk21ws4p70fi0lyjm004vzxsdaz7gdpgyxxyl"))))
5534 (build-system ant-build-system)
5537 `(#:jar-name "commons-cli.jar"))
5539 `(("java-junit" ,java-junit)
5540 ("java-hamcrest-core" ,java-hamcrest-core)))
5541 (home-page "http://commons.apache.org/cli/")
5542 (synopsis "Command line arguments and options parsing library")
5543 (description "The Apache Commons CLI library provides an API for parsing
5544 command line options passed to programs. It is also able to print help
5545 messages detailing the options available for a command line tool.
5547 Commons CLI supports different types of options:
5550 @item POSIX like options (ie. tar -zxvf foo.tar.gz)
5551 @item GNU like long options (ie. du --human-readable --max-depth=1)
5552 @item Java like properties (ie. java -Djava.awt.headless=true Foo)
5553 @item Short options with value attached (ie. gcc -O2 foo.c)
5554 @item long options with single hyphen (ie. ant -projecthelp)
5557 This is a part of the Apache Commons Project.")
5558 (license license:asl2.0)))
5560 (define-public java-commons-codec
5562 (name "java-commons-codec")
5566 (uri (string-append "mirror://apache/commons/codec/source/"
5567 "commons-codec-" version "-src.tar.gz"))
5570 "1w9qg30y4s0x8gnmr2fgj4lyplfn788jqxbcz27lf5kbr6n8xr65"))))
5571 (build-system ant-build-system)
5572 (outputs '("out" "doc"))
5574 `(#:test-target "test"
5576 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
5577 (junit (assoc-ref %build-inputs "java-junit")))
5578 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
5579 (string-append "-Dhamcrest.jar=" hamcrest
5580 "/share/java/hamcrest-core.jar")
5581 ;; Do not append version to jar.
5582 "-Dfinal.name=commons-codec"))
5584 (modify-phases %standard-phases
5585 (add-after 'build 'build-javadoc ant-build-javadoc)
5586 (replace 'install (install-jars "dist"))
5587 (add-after 'install 'install-doc (install-javadoc "dist/docs/api")))))
5589 `(("java-junit" ,java-junit)
5590 ("java-hamcrest-core" ,java-hamcrest-core)))
5591 (home-page "http://commons.apache.org/codec/")
5592 (synopsis "Common encoders and decoders such as Base64, Hex, Phonetic and URLs")
5593 (description "The codec package contains simple encoder and decoders for
5594 various formats such as Base64 and Hexadecimal. In addition to these widely
5595 used encoders and decoders, the codec package also maintains a collection of
5596 phonetic encoding utilities.
5598 This is a part of the Apache Commons Project.")
5599 (license license:asl2.0)))
5601 (define-public java-commons-daemon
5603 (name "java-commons-daemon")
5607 (uri (string-append "mirror://apache/commons/daemon/source/"
5608 "commons-daemon-" version "-src.tar.gz"))
5611 "0ci46kq8jpz084ccwq0mmkahcgsmh20ziclp2jf5i0djqv95gvhi"))))
5612 (build-system ant-build-system)
5614 `(#:test-target "test"
5616 (modify-phases %standard-phases
5617 (add-after 'build 'build-javadoc ant-build-javadoc)
5618 (replace 'install (install-jars "dist"))
5619 (add-after 'install 'install-doc (install-javadoc "dist/docs/api")))))
5621 `(("java-junit" ,java-junit)))
5622 (home-page "http://commons.apache.org/daemon/")
5623 (synopsis "Library to launch Java applications as daemons")
5624 (description "The Daemon package from Apache Commons can be used to
5625 implement Java applications which can be launched as daemons. For example the
5626 program will be notified about a shutdown so that it can perform cleanup tasks
5627 before its process of execution is destroyed by the operation system.
5629 This package contains the Java library. You will also need the actual binary
5630 for your architecture which is provided by the jsvc package.
5632 This is a part of the Apache Commons Project.")
5633 (license license:asl2.0)))
5635 (define-public java-javaewah
5637 (name "java-javaewah")
5641 (uri (string-append "https://github.com/lemire/javaewah/"
5642 "archive/JavaEWAH-" version ".tar.gz"))
5645 "1n7j1r1h24wlhwv9zdcj6yqjrhma2ixwyzm15l5vrv6yqjs6753b"))))
5646 (build-system ant-build-system)
5647 (arguments `(#:jar-name "javaewah.jar"))
5649 `(("java-junit" ,java-junit)
5650 ("java-hamcrest-core" ,java-hamcrest-core)))
5651 (home-page "https://github.com/lemire/javaewah")
5652 (synopsis "Compressed alternative to the Java @code{BitSet} class")
5653 (description "This is a word-aligned compressed variant of the Java
5654 @code{Bitset} class. It provides both a 64-bit and a 32-bit RLE-like
5655 compression scheme. It can be used to implement bitmap indexes.
5657 The goal of word-aligned compression is not to achieve the best compression,
5658 but rather to improve query processing time. Hence, JavaEWAH tries to save CPU
5659 cycles, maybe at the expense of storage. However, the EWAH scheme is always
5660 more efficient storage-wise than an uncompressed bitmap (as implemented in the
5661 @code{BitSet} class by Sun).")
5662 ;; GPL2.0 derivates are explicitly allowed.
5663 (license license:asl2.0)))
5665 (define-public java-slf4j-api
5667 (name "java-slf4j-api")
5671 (uri (string-append "https://www.slf4j.org/dist/slf4j-"
5675 "13j51sgzmhhdrfa74gkal5zpip7r1440dh7zsi2c8bpb2zs1v8kb"))
5676 (modules '((guix build utils)))
5677 ;; Delete bundled jars.
5680 (for-each delete-file (find-files "." "\\.jar$"))
5682 (build-system ant-build-system)
5684 `(#:jar-name "slf4j-api.jar"
5685 #:source-dir "slf4j-api/src/main"
5686 #:test-dir "slf4j-api/src/test"
5688 (modify-phases %standard-phases
5689 (add-after 'build 'regenerate-jar
5691 ;; pom.xml ignores these files in the jar creation process. If we don't,
5692 ;; we get the error "This code should have never made it into slf4j-api.jar"
5693 (delete-file-recursively "build/classes/org/slf4j/impl")
5694 (zero? (system* "jar" "-cf" "build/jar/slf4j-api.jar" "-C"
5695 "build/classes" "."))))
5696 (add-before 'check 'dont-test-abstract-classes
5698 ;; abstract classes are not meant to be run with junit
5699 (substitute* "build.xml"
5700 (("<include name=\"\\*\\*/\\*Test.java\" />")
5701 (string-append "<include name=\"**/*Test.java\" />"
5702 "<exclude name=\"**/MultithreadedInitializationTest"
5703 ".java\" />"))))))))
5705 `(("java-junit" ,java-junit)
5706 ("java-hamcrest-core" ,java-hamcrest-core)))
5707 (home-page "https://www.slf4j.org/")
5708 (synopsis "Simple logging facade for Java")
5709 (description "The Simple Logging Facade for Java (SLF4J) serves as a
5710 simple facade or abstraction for various logging
5711 frameworks (e.g. @code{java.util.logging}, @code{logback}, @code{log4j})
5712 allowing the end user to plug in the desired logging framework at deployment
5714 (license license:expat)))
5716 (define-public java-slf4j-simple
5718 (name "java-slf4j-simple")
5720 (source (package-source java-slf4j-api))
5721 (build-system ant-build-system)
5723 `(#:jar-name "slf4j-simple.jar"
5724 #:source-dir "slf4j-simple/src/main"
5725 #:test-dir "slf4j-simple/src/test"
5727 (modify-phases %standard-phases
5728 ;; The tests need some test classes from slf4j-api
5729 (add-before 'check 'build-slf4j-api-test-helpers
5731 ;; Add current dir to CLASSPATH ...
5733 (string-append (getcwd) ":" (getenv "CLASSPATH")))
5734 ;; ... and build test helper classes here:
5738 ,@(find-files "slf4j-api/src/test" ".*\\.java")))))))))
5740 `(("java-junit" ,java-junit)
5741 ("java-hamcrest-core" ,java-hamcrest-core)
5742 ("java-slf4j-api" ,java-slf4j-api)))
5743 (home-page "https://www.slf4j.org/")
5744 (synopsis "Simple implementation of simple logging facade for Java")
5745 (description "SLF4J binding for the Simple implementation, which outputs
5746 all events to System.err. Only messages of level INFO and higher are
5748 (license license:expat)))
5750 (define-public antlr2
5756 (uri (string-append "http://www.antlr2.org/download/antlr-"
5760 "1ffvcwdw73id0dk6pj2mlxjvbg0662qacx4ylayqcxgg381fnfl5"))
5761 (modules '((guix build utils)))
5764 (delete-file "antlr.jar")
5765 (substitute* "lib/cpp/antlr/CharScanner.hpp"
5769 "#define EOF (-1)\n"
5770 "#include <strings.h>")))
5771 (substitute* "configure"
5774 (build-system gnu-build-system)
5776 `(#:tests? #f ; no test target
5777 #:imported-modules ((guix build ant-build-system)
5778 (guix build syscalls)
5779 ,@%gnu-build-system-modules)
5780 #:modules (((guix build ant-build-system) #:prefix ant:)
5781 (guix build gnu-build-system)
5784 (modify-phases %standard-phases
5785 (add-after 'install 'strip-jar-timestamps
5786 (assoc-ref ant:%standard-phases 'strip-jar-timestamps))
5787 (add-after 'configure 'fix-bin-ls
5789 (substitute* (find-files "." "Makefile")
5795 ("java" ,icedtea "jdk")))
5797 `(("java" ,icedtea)))
5798 (home-page "http://www.antlr2.org")
5799 (synopsis "Framework for constructing recognizers, compilers, and translators")
5800 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
5801 is a language tool that provides a framework for constructing recognizers,
5802 compilers, and translators from grammatical descriptions containing Java, C#,
5803 C++, or Python actions. ANTLR provides excellent support for tree construction,
5804 tree walking, and translation.")
5805 (license license:public-domain)))
5807 (define-public java-stringtemplate-3
5809 (name "java-stringtemplate")
5813 (uri (string-append "https://github.com/antlr/website-st4/raw/"
5814 "gh-pages/download/stringtemplate-"
5818 "086yj68np1vqhkj7483diz3km6s6y4gmwqswa7524a0ca6vxn2is"))))
5819 (build-system ant-build-system)
5821 `(#:jar-name (string-append ,name "-" ,version ".jar")
5823 #:modules ((guix build ant-build-system)
5827 (modify-phases %standard-phases
5828 (add-before 'check 'fix-tests
5830 (substitute* "build.xml"
5831 (("\\$\\{test.home\\}/java")
5832 "${test.home}/org"))
5834 (add-before 'build 'generate-grammar
5836 (with-directory-excursion "src/org/antlr/stringtemplate/language/"
5837 (every (lambda (file)
5838 (format #t "~a\n" file)
5839 (zero? (system* "antlr" file)))
5840 '("template.g" "angle.bracket.template.g" "action.g"
5841 "eval.g" "group.g" "interface.g"))))))))
5844 ("java-junit" ,java-junit)))
5845 (home-page "http://www.stringtemplate.org")
5846 (synopsis "Template engine to generate formatted text output")
5847 (description "StringTemplate is a java template engine (with ports for C#,
5848 Objective-C, JavaScript, Scala) for generating source code, web pages, emails,
5849 or any other formatted text output. StringTemplate is particularly good at
5850 code generators, multiple site skins, and internationalization / localization.
5851 StringTemplate also powers ANTLR.")
5852 (license license:bsd-3)))
5854 ;; antlr3 is partially written using antlr3 grammar files. It also depends on
5855 ;; ST4 (stringtemplate4), which is also partially written using antlr3 grammar
5856 ;; files and uses antlr3 at runtime. The latest version requires a recent version
5857 ;; of antlr3 at runtime.
5858 ;; Fortunately, ST4 4.0.6 can be built with an older antlr3, and we use antlr3.3.
5859 ;; This version of ST4 is sufficient for the latest antlr3.
5860 ;; We use ST4 4.0.6 to build a boostrap antlr3 (latest version), and build
5861 ;; the latest ST4 with it. Then we build our final antlr3 that will be linked
5862 ;; against the latest ST4.
5863 ;; antlr3.3 still depends on antlr3 to generate some files, so we use an
5864 ;; even older version, antlr3.1, to generate them. Fortunately antlr3.1 uses
5865 ;; only grammar files with the antlr2 syntax.
5866 ;; So we build antlr3.1 -> antlr3.3 -> ST4.0.6 -> antlr3-bootstrap -> ST4 -> antlr3.
5868 (define-public java-stringtemplate
5869 (package (inherit java-stringtemplate-3)
5870 (name "java-stringtemplate")
5874 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/"
5876 (file-name (string-append name "-" version ".tar.gz"))
5879 "1pri8hqa95rfdkjy55icl5q1m09zwp5k67ib14abas39s4v3w087"))))
5880 (build-system ant-build-system)
5882 `(#:jar-name (string-append ,name "-" ,version ".jar")
5883 #:tests? #f ; FIXME: tests fail for unknown reasons
5885 #:modules ((guix build ant-build-system)
5889 (modify-phases %standard-phases
5890 (add-before 'check 'fix-test-target
5892 (substitute* "build.xml"
5893 (("\\$\\{test.home\\}/java") "${test.home}/")
5894 (("\\*Test.java") "Test*.java"))
5896 (add-before 'build 'generate-grammar
5898 (with-directory-excursion "src/org/stringtemplate/v4/compiler/"
5899 (every (lambda (file)
5900 (format #t "~a\n" file)
5901 (zero? (system* "antlr3" file)))
5902 '("STParser.g" "Group.g" "CodeGenerator.g"))))))))
5904 `(("antlr3" ,antlr3-bootstrap)
5906 ("java-stringtemplate" ,java-stringtemplate-3)
5907 ("java-junit" ,java-junit)))))
5909 (define java-stringtemplate-4.0.6
5910 (package (inherit java-stringtemplate)
5911 (name "java-stringtemplate")
5915 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/ST-"
5917 (file-name (string-append name "-" version ".tar.gz"))
5920 "0hjmh1ahdsh3w825i67mli9l4nncc4l6hdbf9ma91jvlj590sljp"))))
5922 `(("antlr3" ,antlr3-3.3)
5924 ("java-stringtemplate" ,java-stringtemplate-3)))))
5926 (define-public antlr3
5932 (uri (string-append "https://github.com/antlr/antlr3/archive/"
5934 (file-name (string-append name "-" version ".tar.gz"))
5937 "0218v683081lg54z9hvjxinhxd4dqp870jx6n39gslm0bkyi4vd6"))))
5938 (build-system ant-build-system)
5940 `(#:jar-name (string-append ,name "-" ,version ".jar")
5941 #:source-dir "tool/src/main/java:runtime/Java/src/main/java:tool/src/main/antlr3"
5944 (modify-phases %standard-phases
5945 (add-after 'install 'bin-install
5946 (lambda* (#:key inputs outputs #:allow-other-keys)
5947 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
5948 (bin (string-append (assoc-ref outputs "out") "/bin")))
5950 (with-output-to-file (string-append bin "/antlr3")
5953 (string-append "#!" (which "sh") "\n"
5954 "java -cp " jar "/" ,name "-" ,version ".jar:"
5956 (find-files (assoc-ref inputs "stringtemplate")
5960 (find-files (assoc-ref inputs "stringtemplate4")
5964 (find-files (string-append
5965 (assoc-ref inputs "antlr")
5968 " org.antlr.Tool $*"))))
5969 (chmod (string-append bin "/antlr3") #o755))))
5970 (add-before 'build 'generate-grammar
5972 (chdir "tool/src/main/antlr3/org/antlr/grammar/v3/")
5973 (for-each (lambda (file)
5976 (system* "antlr3" file))
5977 '("ANTLR.g" "ANTLRTreePrinter.g" "ActionAnalysis.g"
5978 "AssignTokenTypesWalker.g"
5979 "ActionTranslator.g" "TreeToNFAConverter.g"
5980 "ANTLRv3.g" "ANTLRv3Tree.g" "LeftRecursiveRuleWalker.g"
5981 "CodeGenTreeWalker.g" "DefineGrammarItemsWalker.g"))
5982 (substitute* "ANTLRParser.java"
5983 (("public Object getTree") "public GrammarAST getTree"))
5984 (substitute* "ANTLRv3Parser.java"
5985 (("public Object getTree") "public CommonTree getTree"))
5986 (chdir "../../../../../java")
5987 (system* "antlr" "-o" "org/antlr/tool"
5988 "org/antlr/tool/serialize.g")
5989 (substitute* "org/antlr/tool/LeftRecursiveRuleAnalyzer.java"
5990 (("import org.antlr.grammar.v3.\\*;") "import org.antlr.grammar.v3.*;
5991 import org.antlr.grammar.v3.ANTLRTreePrinter;"))
5992 (substitute* "org/antlr/tool/ErrorManager.java"
5993 (("case NO_SUCH_ATTRIBUTE_PASS_THROUGH:") ""))
5994 (chdir "../../../..")))
5995 (add-before 'build 'fix-build-xml
5997 (substitute* "build.xml"
5998 (("<exec") "<copy todir=\"${classes.dir}\">
5999 <fileset dir=\"tool/src/main/resources\">
6000 <include name=\"**/*.stg\"/>
6001 <include name=\"**/*.st\"/>
6002 <include name=\"**/*.sti\"/>
6003 <include name=\"**/STLexer.tokens\"/>
6005 </copy><exec")))))))
6008 ("antlr3" ,antlr3-bootstrap)))
6010 `(("junit" ,java-junit)
6011 ("stringtemplate" ,java-stringtemplate-3)
6012 ("stringtemplate4" ,java-stringtemplate)))
6014 `(("stringtemplate" ,java-stringtemplate-3)
6016 ("stringtemplate4" ,java-stringtemplate-4.0.6)))
6017 (home-page "http://www.antlr3.org")
6018 (synopsis "Framework for constructing recognizers, compilers, and translators")
6019 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
6020 is a language tool that provides a framework for constructing recognizers,
6021 compilers, and translators from grammatical descriptions containing Java, C#,
6022 C++, or Python actions. ANTLR provides excellent support for tree construction,
6023 tree walking, and translation.")
6024 (license license:bsd-3)))
6026 (define antlr3-bootstrap
6029 (name "antlr3-bootstrap")
6032 ("antlr3" ,antlr3-3.3)))
6034 `(("junit" ,java-junit)))))
6043 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
6044 "gh-pages/download/antlr-"
6048 "0qgg5vgsm4l1d6dj9pfbaa25dpv2ry2gny8ajy4vvgvfklw97b3m"))
6050 (search-patches "antlr3-3_3-fix-java8-compilation.patch"))))
6052 `(#:jar-name (string-append ,name "-" ,version ".jar")
6053 #:source-dir (string-join '("tool/src/main/java"
6054 "runtime/Java/src/main/java"
6055 "tool/src/main/antlr2"
6056 "tool/src/main/antlr3")
6058 #:tests? #f ; FIXME: tests seem to require maven plugin
6059 #:modules ((guix build ant-build-system)
6063 (modify-phases %standard-phases
6064 (add-after 'install 'bin-install
6065 (lambda* (#:key inputs outputs #:allow-other-keys)
6066 (let* ((out (assoc-ref outputs "out"))
6067 (jar (string-append out "/share/java"))
6068 (bin (string-append out "/bin")))
6070 (with-output-to-file (string-append bin "/antlr3")
6074 "#!" (which "sh") "\n"
6075 "java -cp " jar "/antlr3-3.3.jar:"
6077 (append (find-files (assoc-ref inputs "java-stringtemplate")
6079 (find-files (string-append (assoc-ref inputs "antlr")
6083 " org.antlr.Tool $*"))))
6084 (chmod (string-append bin "/antlr3") #o755)
6086 (add-before 'build 'generate-grammar
6088 (substitute* "tool/src/main/java/org/antlr/tool/Grammar.java"
6089 (("import org.antlr.grammar.v2.\\*;")
6090 "import org.antlr.grammar.v2.*;\n
6091 import org.antlr.grammar.v2.TreeToNFAConverter;\n
6092 import org.antlr.grammar.v2.DefineGrammarItemsWalker;\n
6093 import org.antlr.grammar.v2.ANTLRTreePrinter;"))
6095 (with-directory-excursion "tool/src/main/antlr2/org/antlr/grammar/v2/"
6096 (every (lambda (file)
6097 (format #t "~a\n" file)
6098 (zero? (system* "antlr" file)))
6099 '("antlr.g" "antlr.print.g" "assign.types.g"
6100 "buildnfa.g" "codegen.g" "define.g")))
6101 (with-directory-excursion "tool/src/main/antlr3/org/antlr/grammar/v3/"
6102 (every (lambda (file)
6103 (format #t "~a\n" file)
6104 (zero? (system* "antlr3" file)))
6105 '("ActionAnalysis.g" "ActionTranslator.g" "ANTLRv3.g"
6106 "ANTLRv3Tree.g"))))))
6107 (add-before 'build 'fix-build-xml
6109 (substitute* "build.xml"
6110 (("<exec") "<copy todir=\"${classes.dir}\">
6111 <fileset dir=\"tool/src/main/resources\">
6112 <include name=\"**/*.stg\"/>
6113 <include name=\"**/*.st\"/>
6114 <include name=\"**/*.sti\"/>
6115 <include name=\"**/STLexer.tokens\"/>
6121 ("antlr3" ,antlr3-3.1)))
6123 `(("junit" ,java-junit)))
6125 `(("java-stringtemplate" ,java-stringtemplate-3)
6127 ("antlr3" ,antlr3-3.1)))))
6135 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
6136 "gh-pages/download/antlr-"
6140 "0sfimc9cpbgrihz4giyygc8afgpma2c93yqpwb951giriri6x66z"))
6142 (search-patches "antlr3-3_1-fix-java8-compilation.patch"))))
6144 `(#:jar-name (string-append "antlr3-" ,version ".jar")
6145 #:source-dir "src:runtime/Java/src"
6148 (modify-phases %standard-phases
6149 (add-after 'install 'bin-install
6150 (lambda* (#:key inputs outputs #:allow-other-keys)
6151 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
6152 (bin (string-append (assoc-ref outputs "out") "/bin")))
6154 (with-output-to-file (string-append bin "/antlr3")
6157 (string-append "#!" (which "sh") "\n"
6158 "java -cp " jar "/antlr3-3.1-3.1.jar:"
6160 (find-files (assoc-ref inputs "stringtemplate")
6164 (find-files (string-append
6165 (assoc-ref inputs "antlr")
6168 " org.antlr.Tool $*"))))
6169 (chmod (string-append bin "/antlr3") #o755))))
6170 (add-before 'build 'generate-grammar
6172 (let ((dir "src/org/antlr/tool/"))
6173 (for-each (lambda (file)
6176 (invoke "antlr" "-o" dir (string-append dir file)))
6177 '("antlr.g" "antlr.print.g" "assign.types.g"
6178 "buildnfa.g" "define.g")))
6179 (format #t "codegen.g\n")
6180 (invoke "antlr" "-o" "src/org/antlr/codegen"
6181 "src/org/antlr/codegen/codegen.g")
6183 (add-before 'build 'fix-build-xml
6185 (substitute* "build.xml"
6186 (("<exec") "<copy todir=\"${classes.dir}\">
6187 <fileset dir=\"src\">
6188 <include name=\"**/*.stg\"/>
6189 <include name=\"**/*.st\"/>
6190 <include name=\"**/*.sti\"/>
6191 <include name=\"**/STLexer.tokens\"/>
6193 </copy><exec")))))))
6195 `(("antlr" ,antlr2)))
6197 `(("junit" ,java-junit)))
6199 `(("stringtemplate" ,java-stringtemplate-3)))))
6201 (define-public java-commons-cli-1.2
6202 ;; This is a bootstrap dependency for Maven2.
6204 (inherit java-commons-cli)
6208 (uri (string-append "mirror://apache/commons/cli/source/"
6209 "commons-cli-" version "-src.tar.gz"))
6212 "0rvfgzgv2pc1m091dfj3ih9ddsjjppr1f1wf0qmc3bk6b1kwv2dm"))))
6214 `(#:jar-name "commons-cli.jar"
6216 (modify-phases %standard-phases
6217 (add-before 'check 'fix-build-xml
6218 (lambda* (#:key inputs #:allow-other-keys)
6219 (substitute* "build.xml"
6220 (("dir=\"\\$\\{test.home\\}/java\"")
6221 "dir=\"${test.home}\""))
6224 `(("java-junit" ,java-junit)))))
6226 (define-public java-microemulator-cldc
6228 (name "java-microemulator-cldc")
6232 (uri (string-append "https://github.com/barteo/microemu/archive/"
6234 (string-map (lambda (c) (if (char=? c #\.) #\_ c))
6237 (file-name (string-append name "-" version ".tar.gz"))
6240 "1x1apmz38gkppxnwnygwmi12j54v4p258v8ddzn6dldkk7vak1ll"))))
6241 (build-system ant-build-system)
6243 `(#:jar-name "microemulator-cldc.jar"
6244 #:source-dir "microemu-cldc/src/main/java"
6245 #:tests? #f)); Requires even older software
6246 (home-page "https://github.com/barteo/microemu")
6247 (synopsis "J2ME CLDC emulator")
6248 (description "Microemulator is a Java 2 Micro Edition (J2ME) CLDC/MIDP
6249 Emulator. It allows to demonstrate MIDlet based applications in web browser
6250 applet and can be run as a standalone java application.")
6251 (license (list license:asl2.0
6253 license:lgpl2.1+))))
6255 (define-public java-datanucleus-javax-persistence
6257 (name "java-datanucleus-javax-persistence")
6261 (uri (string-append "https://github.com/datanucleus/"
6262 "javax.persistence/archive/javax.persistence-"
6263 version "-release.tar.gz"))
6266 "11jx0fjwgc2hhbqqgdd6m1pf2fplf9vslppygax0y1z5csnqjhpx"))))
6267 (build-system ant-build-system)
6269 `(#:jar-name "java-datanucleus-javax-persistence.jar"
6271 #:source-dir "src/main/java"
6272 #:tests? #f)); no tests
6273 (home-page "https://github.com/datanucleus/javax.persistence")
6274 (synopsis "JPA API")
6275 (description "This package contains a clean definition of JPA API intended
6276 for use with DataNucleus JPA since the JCP haven't provided an official JPA API
6277 jar. See @url{http://java.net/projects/jpa-spec/downloads} for the specification
6278 used to generate this API.")
6279 (license (list license:edl1.0 license:epl1.0))))
6281 (define-public java-osgi-cmpn
6283 (name "java-osgi-cmpn")
6287 (uri (string-append "http://central.maven.org/maven2/"
6288 "org/osgi/osgi.cmpn/" version "/osgi.cmpn-"
6289 version "-sources.jar"))
6292 "1lmb6xyrmkqdhv1kayf0514rlwq6ypvs4m44ibrck3snp8241wys"))))
6293 (build-system ant-build-system)
6295 `(#:jar-name "osgi-cmpn.jar"
6296 #:tests? #f)); no tests
6298 `(("annotation" ,java-osgi-annotation)
6299 ("core" ,java-osgi-core)
6300 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
6301 ("microemulator" ,java-microemulator-cldc)
6302 ("servlet" ,java-classpathx-servletapi)))
6303 (home-page "https://www.osgi.org")
6304 (synopsis "Compendium specification module of OSGi framework")
6306 "OSGi, for Open Services Gateway initiative framework, is a module system
6307 and service platform for the Java programming language. This package contains
6308 the compendium specification module, providing interfaces and classes for use
6309 in compiling bundles.")
6310 (license license:asl2.0)))
6312 (define-public java-osgi-service-component-annotations
6314 (name "java-osgi-service-component-annotations")
6318 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6319 "org.osgi.service.component.annotations/"
6320 version "/org.osgi.service.component.annotations-"
6321 version "-sources.jar"))
6324 "15rq9cmp4fpn74q44m4j35qsqmjf5lx3hcrk6pzvbhc08igic2f0"))))
6325 (build-system ant-build-system)
6327 `(#:jar-name "osgi-service-component-annotations.jar"
6328 #:tests? #f)); no tests
6330 `(("annotation" ,java-osgi-annotation)))
6331 (home-page "https://www.osgi.org")
6332 (synopsis "Support annotations for osgi-service-component")
6334 "OSGi, for Open Services Gateway initiative framework, is a module system
6335 and service platform for the Java programming language. This package contains
6336 the support annotations for osgi-service-component.")
6337 (license license:asl2.0)))
6339 (define-public java-osgi-dto
6341 (name "java-osgi-dto")
6345 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6346 "org.osgi.dto/" version "/org.osgi.dto-"
6347 version "-sources.jar"))
6350 "0f4bqjzadn0hwk6sd3h5gvbyfp3yci1s6r0v770cc15p0pg627yr"))))
6351 (build-system ant-build-system)
6353 `(#:jar-name "osgi-dto.jar"
6354 #:tests? #f)); no tests
6356 `(("annotation" ,java-osgi-annotation)))
6357 (home-page "https://www.osgi.org")
6358 (synopsis "Data Transfer Objects")
6360 "OSGi, for Open Services Gateway initiative framework, is a module system
6361 and service platform for the Java programming language. This package contains
6362 the Data Transfer Objects. It is easily serializable having only public fields
6363 of primitive types and their wrapper classes, Strings, and DTOs. List, Set,
6364 Map and array aggregates may also be used. The aggregates must only hold
6365 objects of the listed types or aggregates.")
6366 (license license:asl2.0)))
6368 (define-public java-osgi-resource
6370 (name "java-osgi-resource")
6374 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6375 "org.osgi.resource/"
6376 version "/org.osgi.resource-"
6377 version "-sources.jar"))
6380 "0hi0fsc5v99q22bd7lrkvpz1y0ds4w9arjldpwsrcpqvz2js7q2d"))))
6381 (build-system ant-build-system)
6383 `(#:jar-name "osgi-resource.jar"
6384 #:tests? #f)); no tests
6386 `(("annotation" ,java-osgi-annotation)
6387 ("dto" ,java-osgi-dto)))
6388 (home-page "https://www.osgi.org")
6389 (synopsis "OSGI Resource")
6391 "OSGi, for Open Services Gateway initiative framework, is a module system
6392 and service platform for the Java programming language. This package contains
6393 the definition of common types in osgi packages.")
6394 (license license:asl2.0)))
6396 (define-public java-osgi-namespace-contract
6398 (name "java-osgi-namespace-contract")
6402 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6403 "org.osgi.namespace.contract/"
6404 version "/org.osgi.namespace.contract-"
6405 version "-sources.jar"))
6408 "1iz4f2i0fvqrlq90ki9nfzcfpvy2av434ri25bglywqssx8mmp36"))))
6409 (build-system ant-build-system)
6411 `(("resource" ,java-osgi-resource)
6412 ("annotation" ,java-osgi-annotation)))
6414 `(#:jar-name "osgi-namespace-contract.jar"
6415 #:tests? #f)); no tests
6416 (home-page "https://www.osgi.org")
6417 (synopsis "Contract Capability and Requirement Namespace")
6419 "OSGi, for Open Services Gateway initiative framework, is a module system
6420 and service platform for the Java programming language. This package contains
6421 the names for the attributes and directives for a namespace with contracts.")
6422 (license license:asl2.0)))
6424 (define-public java-osgi-namespace-extender
6426 (name "java-osgi-namespace-extender")
6430 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6431 "org.osgi.namespace.extender/"
6432 version "/org.osgi.namespace.extender-"
6433 version "-sources.jar"))
6436 "0jgqiak2i05qv6j3gd33xlaifzzc0ylxxk376v2x0apfg3vvixmz"))))
6437 (build-system ant-build-system)
6439 `(("resource" ,java-osgi-resource)
6440 ("annotation" ,java-osgi-annotation)))
6442 `(#:jar-name "osgi-namespace-extendent.jar"
6443 #:tests? #f)); no tests
6444 (home-page "https://www.osgi.org")
6445 (synopsis "Extender Capability and Requirement Namespace")
6447 "OSGi, for Open Services Gateway initiative framework, is a module system
6448 and service platform for the Java programming language. This package contains
6449 the names for the attributes and directives for an extender namespace.")
6450 (license license:asl2.0)))
6452 (define-public java-osgi-namespace-service
6454 (name "java-osgi-namespace-service")
6458 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6459 "org.osgi.namespace.service/"
6460 version "/org.osgi.namespace.service-"
6461 version "-sources.jar"))
6464 "0qmw8n2449nkmm56d1znz9zhazb6ya3vsimd5bf5jg23zzhgl8c8"))))
6465 (build-system ant-build-system)
6467 `(("resource" ,java-osgi-resource)
6468 ("annotation" ,java-osgi-annotation)))
6470 `(#:jar-name "osgi-namespace-service.jar"
6471 #:tests? #f)); no tests
6472 (home-page "https://www.osgi.org")
6473 (synopsis "Service Capability and Requirement Namespace")
6475 "OSGi, for Open Services Gateway initiative framework, is a module system
6476 and service platform for the Java programming language. This package contains
6477 the names for the attributes and directives for a service namespace.")
6478 (license license:asl2.0)))
6480 (define-public java-osgi-util-function
6482 (name "java-osgi-util-function")
6486 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6487 "org.osgi.util.function/"
6488 version "/org.osgi.util.function-"
6489 version "-sources.jar"))
6492 "04l7j3hwmmj28w23m7paca0afzncs42j2mdr3liqq8kvp548sc6x"))))
6493 (build-system ant-build-system)
6495 `(#:jar-name "osgi-util-function.jar"
6496 #:tests? #f)); no tests
6498 `(("annotation" ,java-osgi-annotation)))
6499 (home-page "https://www.osgi.org")
6500 (synopsis "OSGI Util Function")
6502 "OSGi, for Open Services Gateway initiative framework, is a module system
6503 and service platform for the Java programming language. This package contains
6504 an interface for a function that accepts a single argument and produces a result.")
6505 (license license:asl2.0)))
6507 (define-public java-osgi-util-promise
6509 (name "java-osgi-util-promise")
6513 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6514 "org.osgi.util.promise/"
6515 version "/org.osgi.util.promise-"
6516 version "-sources.jar"))
6519 "0y34dwiflg1c4ahvkswpf9z02xph2sr9fm04ia5493x3lshpw22c"))))
6520 (build-system ant-build-system)
6522 `(#:jar-name "osgi-util-promise.jar"
6523 #:tests? #f)); no tests
6525 `(("annotation" ,java-osgi-annotation)
6526 ("function" ,java-osgi-util-function)))
6527 (home-page "https://www.osgi.org")
6528 (synopsis "Promise of a value")
6530 "OSGi, for Open Services Gateway initiative framework, is a module system
6531 and service platform for the Java programming language. This package contains
6532 an interface and utilitary classes for promises. A Promise represents a future
6533 value. It handles the interactions for asynchronous processing.")
6534 (license license:asl2.0)))
6536 (define-public java-osgi-service-metatype-annotations
6538 (name "java-osgi-service-metatype-annotations")
6542 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6543 "org.osgi.service.metatype.annotations/"
6544 version "/org.osgi.service.metatype.annotations-"
6545 version "-sources.jar"))
6548 "12rwm3349wk80vm88rcdgs4435m4jxkpkj5mrx326skkz2c6hyw6"))))
6549 (build-system ant-build-system)
6551 `(#:jar-name "osgi-service-metatype-annotations.jar"
6552 #:tests? #f)); no tests
6554 `(("annotation" ,java-osgi-annotation)))
6555 (home-page "https://www.osgi.org")
6556 (synopsis "Support annotations for metatype")
6558 "OSGi, for Open Services Gateway initiative framework, is a module system
6559 and service platform for the Java programming language. This package contains
6560 the support annotations for metatype.")
6561 (license license:asl2.0)))
6563 (define-public java-osgi-service-repository
6565 (name "java-osgi-service-repository")
6569 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6570 "org.osgi.service.repository/"
6571 version "/org.osgi.service.repository-"
6572 version "-sources.jar"))
6575 "1k41mhg7b58pd8nsghr2qwcjrxdnf1p9spsw9v11k4257g6rl06n"))))
6576 (build-system ant-build-system)
6578 `(#:jar-name "osgi-service-repository.jar"
6579 #:tests? #f)); no tests
6581 `(("annotation" ,java-osgi-annotation)
6582 ("promise" ,java-osgi-util-promise)
6583 ("resource" ,java-osgi-resource)))
6584 (home-page "https://www.osgi.org")
6585 (synopsis "OSGI service repository")
6587 "OSGi, for Open Services Gateway initiative framework, is a module system
6588 and service platform for the Java programming language. This package contains
6589 a repository service that contains resources.")
6590 (license license:asl2.0)))
6592 (define-public java-osgi-framework
6594 (name "java-osgi-framework")
6598 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6599 "org.osgi.framework/" version "/org.osgi.framework-"
6600 version "-sources.jar"))
6603 "1lwp2zfad3rybcc6q9bwz8xsgkc92ypzy5p6x54387f1qj65m73s"))))
6604 (build-system ant-build-system)
6606 `(#:jar-name "osgi-framework.jar"
6607 #:tests? #f)); no tests
6609 `(("annotation" ,java-osgi-annotation)
6610 ("resource" ,java-osgi-resource)
6611 ("dto" ,java-osgi-dto)))
6612 (home-page "https://www.osgi.org")
6613 (synopsis "OSGi framework")
6615 "OSGi, for Open Services Gateway initiative framework, is a module system
6616 and service platform for the Java programming language.")
6617 (license license:asl2.0)))
6619 (define-public java-osgi-service-log
6621 (name "java-osgi-service-log")
6625 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6626 "org.osgi.service.log/"
6627 version "/org.osgi.service.log-"
6628 version "-sources.jar"))
6631 "1029j30dzcwializzca0j3fkhwwz08kmmsha5agw1iccscimj6r0"))))
6632 (build-system ant-build-system)
6634 `(#:jar-name "osgi-service-log.jar"
6635 #:tests? #f)); no tests
6637 `(("java-osgi-framework" ,java-osgi-framework)))
6638 (home-page "https://www.osgi.org")
6639 (synopsis "Provides methods for bundles to write messages to the log")
6641 "OSGi, for Open Services Gateway initiative framework, is a module system
6642 and service platform for the Java programming language. This package contains
6644 (license license:asl2.0)))
6646 (define-public java-osgi-service-jdbc
6648 (name "java-osgi-service-jdbc")
6652 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6653 "org.osgi.service.jdbc/"
6654 version "/org.osgi.service.jdbc-"
6655 version "-sources.jar"))
6658 "11iln5v7bk469cgb9ddkrz9sa95b3733gqgaqw9xf5g6wq652yjz"))))
6659 (build-system ant-build-system)
6661 `(#:jar-name "osgi-service-jdbc.jar"
6662 #:tests? #f)); no tests
6663 (home-page "https://www.osgi.org")
6664 (synopsis "Factory for JDBC connection factories")
6666 "OSGi, for Open Services Gateway initiative framework, is a module system
6667 and service platform for the Java programming language. This package contains
6668 a factory for JDBC connection factories. There are 3 preferred connection
6669 factories for getting JDBC connections:
6672 @item @code{javax.sql.DataSource};
6673 @item @code{javax.sql.ConnectionPoolDataSource};
6674 @item @code{javax.sql.XADataSource}.
6676 (license license:asl2.0)))
6678 (define-public java-osgi-service-resolver
6680 (name "java-osgi-service-resolver")
6684 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6685 "org.osgi.service.resolver/"
6686 version "/org.osgi.service.resolver-"
6687 version "-sources.jar"))
6690 "1dzqn1ryfi2rq4zwsgp44bmj2wlfydjg1qbxw2b0z4xdjjy55vxd"))))
6691 (build-system ant-build-system)
6693 `(#:jar-name "osgi-service-resolver.jar"
6694 #:tests? #f)); no tests
6696 `(("annotation" ,java-osgi-annotation)
6697 ("resource" ,java-osgi-resource)))
6698 (home-page "https://www.osgi.org")
6699 (synopsis "OSGI Resolver service")
6701 "OSGi, for Open Services Gateway initiative framework, is a module system
6702 and service platform for the Java programming language. This package contains
6703 a resolver service that resolves the specified resources in the context supplied
6705 (license license:asl2.0)))
6707 (define-public java-osgi-util-tracker
6709 (name "java-osgi-util-tracker")
6713 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6714 "org.osgi.util.tracker/"
6715 version "/org.osgi.util.tracker-"
6716 version "-sources.jar"))
6719 "0c4fh9vxwzsx59r8dygda0gq2gx3z5vfhc3jsphlqwf5w0h403lz"))))
6720 (build-system ant-build-system)
6722 `(#:jar-name "osgi-util-tracker.jar"
6723 #:tests? #f)); no tests
6725 `(("framework" ,java-osgi-framework)
6726 ("annotation" ,java-osgi-annotation)))
6727 (home-page "https://www.osgi.org")
6728 (synopsis "Bundle tracking")
6730 "OSGi, for Open Services Gateway initiative framework, is a module system
6731 and service platform for the Java programming language. This package contains
6732 bundle tracking utility classes.")
6733 (license license:asl2.0)))
6735 (define-public java-osgi-service-cm
6737 (name "java-osgi-service-cm")
6741 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6742 "org.osgi.service.cm/"
6743 version "/org.osgi.service.cm-"
6744 version "-sources.jar"))
6747 "1z8kap48y3xi0ggj8v6czglfnpnd94mmismgi2wbqhj1nl5fzbp6"))))
6748 (build-system ant-build-system)
6750 `(#:jar-name "osgi-service-cm.jar"
6751 #:tests? #f)); no tests
6753 `(("framework" ,java-osgi-framework)
6754 ("annotation" ,java-osgi-annotation)))
6755 (home-page "https://www.osgi.org")
6756 (synopsis "OSGI Configuration Management")
6758 "OSGi, for Open Services Gateway initiative framework, is a module system
6759 and service platform for the Java programming language. This package contains
6760 utility classes for the configuration of services.")
6761 (license license:asl2.0)))
6763 (define-public java-osgi-service-packageadmin
6765 (name "java-osgi-service-packageadmin")
6769 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6770 "org.osgi.service.packageadmin/"
6771 version "/org.osgi.service.packageadmin-"
6772 version "-sources.jar"))
6775 "041mpxzi7g36wmcily6y4ccn3jx15akpdy8gmhyb7m98x7qfvn52"))))
6776 (build-system ant-build-system)
6778 `(#:jar-name "osgi-service-packageadmin.jar"
6779 #:tests? #f)); no tests
6781 `(("framework" ,java-osgi-framework)))
6782 (home-page "https://www.osgi.org")
6783 (synopsis "OSGI Package Administration")
6785 "OSGi, for Open Services Gateway initiative framework, is a module system
6786 and service platform for the Java programming language. This package contains
6787 the packageadmin service.")
6788 (license license:asl2.0)))
6790 (define-public java-ops4j-base-lang
6792 (name "java-ops4j-base-lang")
6796 (uri (string-append "https://github.com/ops4j/org.ops4j.base/"
6797 "archive/base-" version ".tar.gz"))
6800 "18hl3lpchgpv8yh5rlk39l2gif5dlfgb8gxjmncf39pr2dprkniw"))))
6801 (build-system ant-build-system)
6803 `(#:jar-name "java-ops4j-base-lang.jar"
6804 #:source-dir "ops4j-base-lang/src/main/java"
6805 #:tests? #f; no tests
6807 (modify-phases %standard-phases
6808 (add-before 'build 'add-test-file
6810 ;; That file is required by a test in ops4j-pax-exam-core-spi
6811 (mkdir-p "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang")
6812 (with-output-to-file "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang/pom.properties"
6816 "version=" ,version "\n"
6817 "groupId=org.ops4j.base"
6818 "artifactId=ops4j-base-lang\n")))))))))
6819 (home-page "https://ops4j1.jira.com/wiki/spaces/base/overview")
6820 (synopsis "Utility classes and extensions to be used in OPS4J projects")
6821 (description "OPS4J stands for Open Participation Software for Java. This
6822 package contains utilities and extensions related to @code{java.lang}.")
6823 (license license:asl2.0)))
6825 (define-public java-ops4j-base-monitors
6827 (inherit java-ops4j-base-lang)
6828 (name "java-ops4j-base-monitors")
6830 `(#:jar-name "java-ops4j-base-monitors.jar"
6831 #:source-dir "ops4j-base-monitors/src/main/java"
6832 #:tests? #f)); no tests
6834 `(("lang" ,java-ops4j-base-lang)))
6835 (description "OPS4J stands for Open Participation Software for Java. This
6836 package contains utilities and extensions related to monitoring.")))
6838 (define-public java-ops4j-base-io
6840 (inherit java-ops4j-base-lang)
6841 (name "java-ops4j-base-io")
6843 `(#:jar-name "java-ops4j-base-io.jar"
6844 #:source-dir "ops4j-base-io/src/main/java"
6845 #:test-dir "ops4j-base-io/src/test"
6847 (list "**/ListerTest.java")))
6849 `(("lang" ,java-ops4j-base-monitors)
6850 ("lang" ,java-ops4j-base-lang)))
6852 `(("junit" ,java-junit)
6853 ("hamcrest" ,java-hamcrest-core)))
6854 (description "OPS4J stands for Open Participation Software for Java. This
6855 package contains utilities and extensions related to handling streams and files.")))
6857 (define-public java-ops4j-base-util
6859 (inherit java-ops4j-base-lang)
6860 (name "java-ops4j-base-util")
6862 `(#:jar-name "java-ops4j-base-util.jar"
6863 #:source-dir "ops4j-base-util/src/main/java"
6864 #:test-dir "ops4j-base-util/src/test"))
6866 `(("lang" ,java-ops4j-base-lang)))
6868 `(("junit" ,java-junit)))
6869 (description "OPS4J stands for Open Participation Software for Java. This
6870 package contains utilities and extensions related to environment, i18n and
6873 (define-public java-ops4j-base-util-property
6875 (inherit java-ops4j-base-lang)
6876 (name "java-ops4j-base-util-property")
6878 `(#:jar-name "java-ops4j-base-util-property.jar"
6879 #:source-dir "ops4j-base-util-property/src/main/java"
6880 #:tests? #f)); no tests
6882 `(("lang" ,java-ops4j-base-lang)
6883 ("util" ,java-ops4j-base-util)))
6884 (description "OPS4J stands for Open Participation Software for Java. This
6885 package contains utilities and extensions related to resolving properties from
6886 different sources.")))
6888 (define-public java-ops4j-base-store
6890 (inherit java-ops4j-base-lang)
6891 (name "java-ops4j-base-store")
6893 `(#:jar-name "java-ops4j-base-store.jar"
6894 #:source-dir "ops4j-base-store/src/main/java"
6895 #:tests? #f)); no tests
6897 `(("lang" ,java-ops4j-base-lang)
6898 ("slf4j" ,java-slf4j-api)
6899 ("io" ,java-ops4j-base-io)))
6900 (description "OPS4J stands for Open Participation Software for Java. This
6901 package contains utilities for storing and retrieving data from an
6902 @code{InputStream}.")))
6904 (define-public java-ops4j-base-spi
6906 (inherit java-ops4j-base-lang)
6907 (name "java-ops4j-base-spi")
6909 `(#:jar-name "java-ops4j-base-spi.jar"
6910 #:source-dir "ops4j-base-spi/src/main/java"
6911 #:test-dir "ops4j-base-spi/src/test"))
6913 `(("junit" ,java-junit)
6914 ("hamcrest" ,java-hamcrest-core)))
6915 (description "OPS4J stands for Open Participation Software for Java. This
6916 package contains utilities for obtaining services via the Java SE 6
6917 @code{ServiceLoader}.")))
6919 (define-public java-aqute-bnd-annotation
6921 (name "java-aqute-bnd-annotation")
6925 (uri (string-append "https://github.com/bndtools/bnd/archive/"
6926 version ".REL.tar.gz"))
6927 (file-name (string-append name "-" version ".tar.gz"))
6930 "09vgb6axikbz66zi9falijbnzh1qnp9ysfns123dmzdb01cbza9q"))))
6931 (build-system ant-build-system)
6933 `(#:jar-name "java-aqute-bnd-annotation.jar"
6934 #:source-dir "biz.aQute.bnd.annotation/src"
6935 #:tests? #f)); empty test dir
6936 (home-page "http://bnd.bndtools.org/")
6937 (synopsis "Tools for OSGi")
6938 (description "Bnd is a swiss army knife for OSGi, it creates manifest
6939 headers based on analyzing the class code, it verifies the project settings,
6940 it manages project dependencies, gives diffs jars, and much more.")
6941 (license license:asl2.0)))
6943 (define-public java-aqute-libg
6945 (inherit java-aqute-bnd-annotation)
6946 (name "java-aqute-libg")
6948 `(#:jar-name "java-aqute-libg.jar"
6949 #:source-dir "aQute.libg/src"
6950 #:tests? #f)); FIXME: tests are in "aQute.libg/test", not in a java directory
6952 `(("slf4j" ,java-slf4j-api)
6953 ("osgi-annot" ,java-osgi-annotation)
6954 ("java-osgi-cmpn" ,java-osgi-cmpn)
6955 ("osgi" ,java-osgi-core)))))
6957 (define-public java-aqute-bndlib
6959 (inherit java-aqute-bnd-annotation)
6960 (name "java-aqute-bndlib")
6962 `(#:jar-name "java-bndlib.jar"
6963 #:source-dir "biz.aQute.bndlib/src"
6964 #:tests? #f)); no tests
6966 `(("slf4j" ,java-slf4j-api)
6967 ("osgi-annot" ,java-osgi-annotation)
6968 ("java-aqute-libg" ,java-aqute-libg)
6969 ("java-aqute-bnd-annotation" ,java-aqute-bnd-annotation)
6970 ("java-osgi-service-component-annotations" ,java-osgi-service-component-annotations)
6971 ("java-osgi-service-repository" ,java-osgi-service-repository)
6972 ("java-osgi-service-log" ,java-osgi-service-log)
6973 ("java-osgi-service-metatype-annotations" ,java-osgi-service-metatype-annotations)
6974 ("java-osgi-namespace-contract" ,java-osgi-namespace-contract)
6975 ("java-osgi-namespace-extender" ,java-osgi-namespace-extender)
6976 ("java-osgi-namespace-service" ,java-osgi-namespace-service)
6977 ("promise" ,java-osgi-util-promise)
6978 ("osgi" ,java-osgi-core)))))
6980 (define-public java-ops4j-pax-tinybundles
6982 (name "java-ops4j-pax-tinybundles")
6986 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.tinybundles/"
6987 "archive/tinybundles-" version ".tar.gz"))
6990 "0y0gq3pvv0iir2b885lmlwnvr724vv7vklzhhr4fs27d7mdkj871"))))
6992 `(#:jar-name "java-ops4j-pax-tinybundles.jar"
6993 #:source-dir "src/main/java"
6995 ;; Abstract base classes for other tests
6996 (list "**/BndTest.java" "**/CoreTest.java")
6998 (modify-phases %standard-phases
6999 (add-before 'check 'fix-version
7001 ;; This test has a reference to an old version of bndlib we are not
7002 ;; packaging. It uses the version referenced in pom.xml. We replace
7003 ;; it with our own version.
7004 (substitute* "src/test/java/org/ops4j/pax/tinybundles/bnd/BndTest.java"
7005 (("[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*")
7006 ,(package-version java-aqute-bndlib))))))))
7008 `(("lang" ,java-ops4j-base-lang)
7009 ("io" ,java-ops4j-base-io)
7010 ("store" ,java-ops4j-base-store)
7011 ("slf4j" ,java-slf4j-api)
7012 ("libg" ,java-aqute-libg)
7013 ("bndlib" ,java-aqute-bndlib)))
7015 `(("junit" ,java-junit)
7016 ("hamcrest" ,java-hamcrest-core)
7017 ("log4j" ,java-log4j-api)
7018 ("bndannotation" ,java-aqute-bnd-annotation)
7019 ("framework" ,java-osgi-framework)))
7020 (build-system ant-build-system)
7021 (home-page "https://ops4j1.jira.com/wiki/spaces/ops4j/pages/12060312/Tinybundles")
7022 (synopsis "Java APIs to create OSGi related artifacts")
7023 (description "Tinybundles is all about creating OSGi related artifacts like
7024 Bundles, Fragments and Deployment Packages with Java Api. It is very convinient
7025 to create such artifacts on-the-fly inside Tests (like in Pax Exam). On the
7026 other hand, this library can be a foundation of real end user tools that need
7027 to create those artifacts.")
7028 (license license:asl2.0)))
7030 (define-public java-ops4j-pax-exam-core
7032 (name "java-ops4j-pax-exam-core")
7036 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.exam2/"
7037 "archive/exam-reactor-" version ".tar.gz"))
7040 "08mzw8nkah3rj3vznlplnawspxhp61zgvb44ifqa1rni1cvbms2g"))))
7042 `(#:jar-name "java-ops4j-pax-exam-core.jar"
7043 #:source-dir "core/pax-exam/src/main/java"
7044 #:test-dir "core/pax-exam/src/test"))
7046 `(("slf4j" ,java-slf4j-api)
7047 ("lang" ,java-ops4j-base-lang)
7048 ("io" ,java-ops4j-base-io)
7049 ("util-property" ,java-ops4j-base-util-property)
7050 ("util-store" ,java-ops4j-base-store)
7051 ("java-osgi-core" ,java-osgi-core)))
7053 `(("junit" ,java-junit)
7054 ("hamcrest" ,java-hamcrest-core)))
7055 (build-system ant-build-system)
7056 (home-page "https://ops4j1.jira.com/wiki/spaces/PAXEXAM4/overview")
7057 (synopsis "In-Container Testing for OSGi, Java EE and CDI")
7058 (description "Pax Exam creates OSGi bundles for testing purposes. It lets
7059 the user take control of the OSGi framework, the test framework (e.g. JUnit) and
7060 the system under test at the same time.")
7061 (license license:asl2.0)))
7063 (define-public java-ops4j-pax-exam-core-spi
7065 (inherit java-ops4j-pax-exam-core)
7066 (name "java-ops4j-pax-exam-core-spi")
7068 `(#:jar-name "java-ops4j-pax-exam-spi.jar"
7069 #:source-dir "src/main/java"
7072 ;; Abstract base class, not a test
7073 "**/BaseStagedReactorTest.java"
7074 ;; Depends on org.mortbay.jetty.testwars:test-war-dump
7075 "**/WarBuilderTest.java")
7077 (modify-phases %standard-phases
7078 (add-before 'configure 'chdir
7080 ;; Tests assume we are in this directory
7081 (chdir "core/pax-exam-spi")))
7082 (add-before 'check 'fix-tests
7084 ;; One test checks that this file is present.
7085 (mkdir-p "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi")
7086 (with-output-to-file
7087 "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi/pom.properties"
7090 (string-append "artifactId = pax-exam-spi\n"
7091 "version = " ,(package-version java-ops4j-pax-exam-core-spi)))))
7092 ;; Maven puts compilation results in the target directory, while we
7093 ;; put them in the build directory.
7094 (substitute* '("src/test/java/org/ops4j/pax/exam/spi/war/WarBuilderTest.java"
7095 "src/test/java/org/ops4j/pax/exam/spi/war/WarTestProbeBuilderTest.java"
7096 "src/test/java/org/ops4j/pax/exam/spi/war/ZipBuilderTest.java")
7097 (("target") "build"))
7098 ;; One test is expected to fail, but it doesn't throw the expected exception
7099 (substitute* "src/test/java/org/ops4j/pax/exam/spi/reactors/BaseStagedReactorTest.java"
7100 (("AssertionError") "IllegalArgumentException")))))))
7102 `(("java-ops4j-pax-exam-core" ,java-ops4j-pax-exam-core)
7103 ("lang" ,java-ops4j-base-lang)
7104 ("monitors" ,java-ops4j-base-monitors)
7105 ("store" ,java-ops4j-base-store)
7106 ("io" ,java-ops4j-base-io)
7107 ("spi" ,java-ops4j-base-spi)
7108 ("osgi" ,java-osgi-core)
7109 ("slf4j" ,java-slf4j-api)
7110 ("tinybundles" ,java-ops4j-pax-tinybundles)))
7112 `(("mockito" ,java-mockito-1)
7113 ("junit" ,java-junit)
7114 ("hamcrest" ,java-hamcrest-core)
7115 ("cglib" ,java-cglib)
7116 ("objenesis" ,java-objenesis)
7117 ("asm" ,java-asm)))))
7119 (define-public java-ops4j-pax-exam-core-junit
7121 (inherit java-ops4j-pax-exam-core)
7122 (name "java-ops4j-pax-exam-core-junit")
7124 `(#:jar-name "ops4j-pax-exam-core-junit.jar"
7125 #:source-dir "drivers/pax-exam-junit4/src/main/java"
7126 #:tests? #f)); no tests
7128 `(("junit" ,java-junit)
7129 ("slf4j" ,java-slf4j-api)
7130 ("core" ,java-ops4j-pax-exam-core)
7131 ("spi" ,java-ops4j-pax-exam-core-spi)))
7132 (native-inputs '())))
7134 (define-public java-fasterxml-jackson-annotations
7136 (name "java-fasterxml-jackson-annotations")
7140 (uri (string-append "https://github.com/FasterXML/"
7141 "jackson-annotations/archive/"
7142 "jackson-annotations-" version ".tar.gz"))
7145 "0mr95xd0da6a4g95zvrl1ryk5n5zv2rc696w3xnsr5hxk2gicfc4"))))
7146 (build-system ant-build-system)
7148 `(#:jar-name "jackson-annotations.jar"
7149 #:source-dir "src/main/java"
7150 #:test-dir "src/test"))
7152 `(("junit" ,java-junit)))
7153 (home-page "https://github.com/FasterXML/jackson-annotations")
7154 (synopsis "General purpose annotations for the Jackson Data Processor")
7155 (description "This package contains general purpose annotations for the
7156 Jackson Data Processor, used on value and handler types. The only annotations
7157 not included are ones that require dependency to the Databind package.")
7158 (license license:asl2.0)))
7160 (define-public java-fasterxml-jackson-core
7162 (name "java-fasterxml-jackson-core")
7166 (uri (string-append "https://github.com/FasterXML/"
7167 "jackson-core/archive/"
7168 "jackson-core-" version ".tar.gz"))
7171 "159hsnk17jr1gyzkf01cxvsn45srnk37g949r7364qlsr527gjgd"))))
7172 (build-system ant-build-system)
7174 `(#:jar-name "jackson-core.jar"
7175 #:source-dir "src/main/java"
7176 #:test-dir "src/test"
7179 ;; Expected failure. pom.xml excludes these
7181 ;; Base classes that have no constructor for junit
7183 "**/ConcurrencyReadTest.java"
7184 "**/ManualCharAccessTest.java"
7185 "**/ManualCharAccessTest.java"
7186 "**/TrailingCommasTest.java"
7187 "**/AsyncMissingValuesInObjectTest.java"
7188 "**/AsyncMissingValuesInArrayTest.java")
7190 (modify-phases %standard-phases
7191 (add-before 'configure 'generate-PackageVersion.java
7193 (let* ((out "src/main/java/com/fasterxml/jackson/core/json/PackageVersion.java")
7194 (in (string-append out ".in")))
7197 (("@package@") "com.fasterxml.jackson.core.json")
7198 (("@projectversion@") ,version)
7199 (("@projectgroupid@") "com.fasterxml.jackson.core")
7200 (("@projectartifactid@") "jackson-core")))))
7201 (add-before 'build 'copy-resources
7203 (copy-recursively "src/main/resources"
7205 (add-before 'check 'copy-test-resources
7207 (copy-recursively "src/test/resources"
7208 "build/test-classes"))))))
7210 `(("junit" ,java-junit)
7211 ("hamcrest" ,java-hamcrest-core)))
7212 (home-page "https://github.com/FasterXML/jackson-core")
7215 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
7217 (define-public java-fasterxml-jackson-databind
7219 (name "java-fasterxml-jackson-databind")
7223 (uri (string-append "https://github.com/FasterXML/"
7224 "jackson-databind/archive/"
7225 "jackson-databind-" version ".tar.gz"))
7228 "1zd2cw4z6kdkbx8za96xh9pyicv2a2l7y0rkcx2fqd8hv6d47s08"))))
7229 (build-system ant-build-system)
7231 `(#:jar-name "jackson-databind.jar"
7232 #:source-dir "src/main/java"
7233 #:tests? #f; requires javax.measures for which I can't find a free implementation
7235 (modify-phases %standard-phases
7236 (add-before 'configure 'generate-PackageVersion.java
7238 (let* ((out "src/main/java/com/fasterxml/jackson/databind/cfg/PackageVersion.java")
7239 (in (string-append out ".in")))
7242 (("@package@") "com.fasterxml.jackson.databind.cfg")
7243 (("@projectversion@") ,version)
7244 (("@projectgroupid@") "com.fasterxml.jackson.databind")
7245 (("@projectartifactid@") "jackson-databind")))))
7246 (add-before 'build 'copy-resources
7248 (copy-recursively "src/main/resources" "build/classes"))))))
7250 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
7251 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)))
7252 (home-page "https://github.com/FasterXML/jackson-databind")
7253 (synopsis "Data-binding functionality and tree-model for the Jackson Data Processor")
7254 (description "This package contains the general-purpose data-binding
7255 functionality and tree-model for Jackson Data Processor. It builds on core
7256 streaming parser/generator package, and uses Jackson Annotations for
7258 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
7260 (define-public java-fasterxml-jackson-modules-base-jaxb
7262 (name "java-fasterxml-jackson-modules-base-jaxb")
7266 (uri (string-append "https://github.com/FasterXML/"
7267 "jackson-modules-base/archive/"
7268 "jackson-modules-base-" version ".tar.gz"))
7271 "1wws95xi8sppp6b0k2vvjdjyynl20r1a4dwrhai08lzlria6blp5"))))
7272 (build-system ant-build-system)
7274 `(#:jar-name "jackson-modules-base-jaxb.jar"
7275 #:source-dir "jaxb/src/main/java"
7276 #:test-dir "jaxb/src/test"
7278 ;; Base class for tests
7279 (list "**/BaseJaxbTest.java")
7281 (modify-phases %standard-phases
7282 (add-before 'configure 'generate-PackageVersion.java
7284 (let* ((out (string-append "jaxb/src/main/java/com/fasterxml/"
7285 "jackson/module/jaxb/PackageVersion.java"))
7286 (in (string-append out ".in")))
7289 (("@package@") "com.fasterxml.jackson.module.jaxb")
7290 (("@projectversion@") ,version)
7291 (("@projectgroupid@") "com.fasterxml.jackson.module.jaxb")
7292 (("@projectartifactid@") "jackson-module-jaxb")))))
7293 (add-before 'build 'copy-resources
7295 (copy-recursively "jaxb/src/main/resources" "build/classes"))))))
7297 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
7298 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
7299 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)))
7301 `(("java-junit" ,java-junit)))
7302 (home-page "https://github.com/FasterXML/jackson-modules-base")
7303 (synopsis "Jaxb annotations jackson module")
7304 (description "This package is the jaxb annotations module for jackson.")
7305 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
7307 (define-public java-snakeyaml
7309 (name "java-snakeyaml")
7313 (uri (string-append "https://bitbucket.org/asomov/snakeyaml/get/v"
7315 (file-name (string-append name "-" version ".tar.gz"))
7318 "0rf5ha6w0waz50jz2479jsrbgmd0dnx0gs337m126j5z7zlmg7mg"))))
7319 (build-system ant-build-system)
7321 `(#:jar-name "java-snakeyaml.jar"
7322 #:source-dir "src/main/java"
7323 ;; Tests require velocity, a cyclic dependency, and
7324 ;; java-spring-framework-context which is not packaged.
7326 (home-page "https://bitbucket.org/asomov/snakeyaml")
7327 (synopsis "YAML processor")
7328 (description "SnakeYAML is a YAML processor for the Java Virtual Machine.")
7329 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
7331 (define-public java-fasterxml-jackson-dataformat-yaml
7333 (name "java-fasterxml-jackson-dataformat-yaml")
7337 (uri (string-append "https://github.com/FasterXML/"
7338 "jackson-dataformats-text/archive/"
7339 "jackson-dataformats-text-" version ".tar.gz"))
7342 "1hikl06khaxbg439avf442qifcadap8w0lx13f0nnhp2vh3dkbz7"))))
7343 (build-system ant-build-system)
7345 `(#:jar-name "jackson-dataformat-yaml.jar"
7346 #:source-dir "yaml/src/main/java"
7347 #:test-dir "yaml/src/test"
7348 #:test-exclude (list "**/failing/**.java")
7350 (modify-phases %standard-phases
7351 (add-before 'configure 'generate-PackageVersion.java
7353 (let* ((out "yaml/src/main/java/com/fasterxml/jackson/dataformat/yaml/PackageVersion.java")
7354 (in (string-append out ".in")))
7357 (("@package@") "com.fasterxml.jackson.dataformat.yaml")
7358 (("@projectversion@") ,version)
7359 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.yaml")
7360 (("@projectartifactid@") "jackson-dataformat-yaml"))))))))
7362 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
7363 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
7364 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)
7365 ("java-snakeyaml" ,java-snakeyaml)))
7367 `(("junit" ,java-junit)
7368 ("hamcrest" ,java-hamcrest-core)
7369 ("java-ops4j-pax-exam-core-spi" ,java-ops4j-pax-exam-core-spi)
7370 ("java-ops4j-pax-exam-core-junit" ,java-ops4j-pax-exam-core-junit)
7371 ("java-ops4j-pax-exam" ,java-ops4j-pax-exam-core)))
7372 (home-page "https://github.com/FasterXML/jackson-dataformats-text")
7373 (synopsis "Yaml backend for Jackson")
7374 (description "Dataformat backends are used to support format alternatives
7375 to JSON, supported by default. This is done by sub-classing Jackson core
7377 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
7379 (define-public java-stax2-api
7381 (name "java-stax2-api")
7385 (uri (string-append "https://github.com/FasterXML/stax2-api/archive/"
7386 "stax2-api-" version ".tar.gz"))
7389 "1amc1si0l0hyyw2sawmnzy4hkna3z6fp195y4nm5m9wb9ld5awkq"))))
7390 (build-system ant-build-system)
7392 `(#:jar-name "java-stax2-api.jar"
7393 #:source-dir "src/main/java"
7394 #:tests? #f)); no tests
7395 (home-page "https://github.com/FasterXML/stax2-api")
7396 (synopsis "Stax2 API")
7397 (description "Stax2 API is an extension to basic Stax 1.0 API that adds
7398 significant new functionalities, such as full-featured bi-direction validation
7399 interface and high-performance Typed Access API.")
7400 (license license:bsd-2)))
7402 (define-public java-woodstox-core
7404 (name "java-woodstox-core")
7408 (uri (string-append "https://github.com/FasterXML/woodstox/archive/"
7409 "woodstox-core-" version ".tar.gz"))
7412 "1i7pdgb8jbw6gdy5kmm0l6rz109n2ns92pqalpyp24vb8vlvdfd4"))))
7413 (build-system ant-build-system)
7415 `(#:jar-name "woodstox.jar"
7417 (list "**/Base*.java" "failing/**")
7419 (modify-phases %standard-phases
7420 (add-before 'build 'remove-msv-dep
7422 ;; we don't need osgi, and it depends on msv
7423 (delete-file-recursively "src/main/java/com/ctc/wstx/osgi")
7424 ;; msv's latest release is from 2011 and we don't need it
7425 (delete-file-recursively "src/main/java/com/ctc/wstx/msv")
7426 (delete-file-recursively "src/test/java/wstxtest/osgi")
7427 (delete-file-recursively "src/test/java/wstxtest/msv")))
7428 (add-before 'build 'copy-resources
7430 (copy-recursively "src/main/resources" "build/classes"))))))
7432 `(("stax2" ,java-stax2-api)))
7434 `(("junit" ,java-junit)))
7435 (home-page "https://github.com/FasterXML/woodstox")
7436 (synopsis "Stax XML API implementation")
7437 (description "Woodstox is a stax XML API implementation.")
7438 (license license:asl2.0)))
7440 (define-public java-fasterxml-jackson-dataformat-xml
7442 (name "java-fasterxml-jackson-dataformat-xml")
7446 (uri (string-append "https://github.com/FasterXML/"
7447 "jackson-dataformat-xml/archive/"
7448 "jackson-dataformat-xml-" version ".tar.gz"))
7451 "111fkkl90w31jbf30kgj82qdcxlw4sxppki7i198liw0ck1jcavq"))))
7452 (build-system ant-build-system)
7454 `(#:jar-name "jackson-dataformat-xml.jar"
7455 #:source-dir "src/main/java"
7457 (list "**/failing/**")
7459 (modify-phases %standard-phases
7460 (add-before 'configure 'generate-PackageVersion.java
7462 (let* ((out "src/main/java/com/fasterxml/jackson/dataformat/xml/PackageVersion.java")
7463 (in (string-append out ".in")))
7467 (("@package@") "com.fasterxml.jackson.dataformat.xml")
7468 (("@projectversion@") ,version)
7469 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.xml")
7470 (("@projectartifactid@") "jackson-dataformat-xml")))))
7471 (add-before 'build 'copy-resources
7473 (copy-recursively "src/main/resources" "build/classes"))))))
7475 `(("jackson-annotations" ,java-fasterxml-jackson-annotations)
7476 ("jackson-core" ,java-fasterxml-jackson-core)
7477 ("jackson-modules-base-jaxb" ,java-fasterxml-jackson-modules-base-jaxb)
7478 ("jackson-databind" ,java-fasterxml-jackson-databind)
7479 ("stax2-api" ,java-stax2-api)
7480 ("woodstox" ,java-woodstox-core)))
7482 `(("junit" ,java-junit)
7483 ("hamcrest" ,java-hamcrest-core)))
7484 (home-page "https://github.com/FasterXML/jackson-dataformat-xml")
7485 (synopsis "Read and write XML")
7486 (description "This package contains Jackson extension component for reading
7487 and writing XML encoded data.
7489 Further, the goal is to emulate how JAXB data-binding works with \"Code-first\"
7490 approach (that is, no support is added for \"Schema-first\" approach). Support
7491 for JAXB annotations is provided by JAXB annotation module; this module
7492 provides low-level abstractions (@code{JsonParser}, @code{JsonGenerator},
7493 @code{JsonFactory}) as well as small number of higher level overrides needed to
7494 make data-binding work.")
7495 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
7497 (define-public java-hdrhistogram
7499 (name "java-hdrhistogram")
7503 (uri (string-append "https://github.com/HdrHistogram/HdrHistogram/"
7504 "archive/HdrHistogram-" version ".tar.gz"))
7507 "1sicbmc3sr42nw93qbkb26q9rn33ag33k6k77phjc3j5h5gjffqv"))))
7508 (build-system ant-build-system)
7510 `(#:jar-name "java-hdrhistogram.jar"
7511 #:source-dir "src/main/java"
7513 (modify-phases %standard-phases
7514 (add-before 'configure 'set-version
7516 (let* ((version-java "src/main/java/org/HdrHistogram/Version.java")
7517 (template (string-append version-java ".template")))
7518 (copy-file template version-java)
7519 (substitute* version-java
7520 (("\\$VERSION\\$") ,version)
7521 (("\\$BUILD_TIME\\$") "0"))
7524 `(("junit" ,java-junit)
7525 ("hamcrest" ,java-hamcrest-core)))
7526 (home-page "https://hdrhistogram.github.io/HdrHistogram")
7527 (synopsis "High dynamic range histogram")
7528 (description "Hdrhistogram allows to create histograms that support
7529 recording and analyzing sampled data value counts across a configurable integer
7530 value range with configurable value precision within the range. Value precision
7531 is expressed as the number of significant digits in the value recording, and
7532 provides control over value quantization behavior across the value range and
7533 the subsequent value resolution at any given level.")
7534 (license license:public-domain)))
7536 (define-public java-cofoja
7538 (name "java-cofoja")
7543 (url "https://github.com/nhatminhle/cofoja.git")
7544 (commit (string-append "v" version))))
7545 (file-name (string-append "java-cofoja-" version "-checkout"))
7548 "0p7sz8y5xgpi5rx1qwn6587fkd52qr3ha3ybh14gqcyxhikl525w"))))
7549 (build-system ant-build-system)
7551 `(#:build-target "dist"
7552 #:test-target "test"
7555 (list "-Ddist.dir=dist")
7556 #:modules ((guix build ant-build-system)
7557 (guix build java-utils)
7562 (modify-phases %standard-phases
7563 ;; The bulid system ignores the class path the ant-build-system sets
7564 ;; up and instead expects to find all dependencies in the "lib"
7566 (add-after 'unpack 'create-libdir
7567 (lambda* (#:key inputs #:allow-other-keys)
7571 (let ((target (string-append "lib/" (basename file))))
7572 (unless (file-exists? target)
7573 (symlink file target))))
7574 (append-map (match-lambda
7576 (find-files dir "\\.jar$")))
7579 (replace 'install (install-jars "dist")))))
7581 `(("java-asm" ,java-asm)))
7583 `(("java-junit" ,java-junit)))
7584 (home-page "https://github.com/nhatminhle/cofoja")
7585 (synopsis "Contracts for Java")
7586 (description "Contracts for Java, or Cofoja for short, is a contract
7587 programming framework and test tool for Java, which uses annotation processing
7588 and bytecode instrumentation to provide run-time checking. (In particular,
7589 this is not a static analysis tool.)")
7590 (license license:lgpl3+)))
7592 (define-public java-aopalliance
7594 (name "java-aopalliance")
7598 ;; Note: this git repository is not official, but contains the
7599 ;; source code that is in the CVS repository. Downloading the
7600 ;; tarball from sourceforge is undeterministic, and the cvs download
7603 (url "https://github.com/hoverruan/aopalliance")
7604 (commit "0d7757ae204e5876f69431421fe9bc2a4f01e8a0")))
7605 (file-name (string-append name "-" version))
7608 "0rsg2b0v3hxlq2yk1i3m2gw3xwq689j3cwx9wbxvqfpdcjbca0qr"))))
7609 (build-system ant-build-system)
7611 `(#:jar-name "java-aopalliance.jar"
7613 #:tests? #f; no tests
7614 #:source-dir "aopalliance/src/main"))
7615 (home-page "http://aopalliance.sourceforge.net")
7616 (synopsis "Aspect-Oriented Programming")
7617 (description "The AOP Alliance project is a joint project between several
7618 software engineering people who are interested in Aspect-Oriented Programming
7620 (license license:public-domain)))
7622 (define-public java-javax-inject
7624 (name "java-javax-inject")
7628 (uri (string-append "https://github.com/javax-inject/javax-inject/"
7629 "archive/javax.inject-" version ".tar.gz"))
7632 "1ydrlvh2r7vr1g7lhjwy3w2dggpj9h6pix1lakkkgdywb365n6g0"))))
7633 (build-system ant-build-system)
7635 `(#:jar-name "java-javax-inject.jar"
7637 #:tests? #f)); no tests
7638 (home-page "http://github.com/javax-inject/javax-inject")
7639 (synopsis "JSR-330: Dependency Injection for Java")
7640 (description "This package specifies a means for obtaining objects in such
7641 a way as to maximize reusability, testability and maintainability compared to
7642 traditional approaches such as constructors, factories, and service locators
7643 (e.g., JNDI). This process, known as dependency injection, is beneficial to
7644 most nontrivial applications.
7646 Many types depend on other types. For example, a @var{Stopwatch} might depend
7647 on a @var{TimeSource}. The types on which a type depends are known as its
7648 dependencies. The process of finding an instance of a dependency to use at run
7649 time is known as resolving the dependency. If no such instance can be found,
7650 the dependency is said to be unsatisfied, and the application is broken.")
7651 (license license:asl2.0)))
7653 (define-public java-guice
7659 (uri (string-append "https://github.com/google/guice/archive/"
7661 (file-name (string-append name "-" version ".tar.gz"))
7664 "0dwmqjzlavb144ywqqglj3h68hqszkff8ai0a42hyb5il0qh4rbp"))))
7665 (build-system ant-build-system)
7667 `(#:jar-name "java-guice.jar"
7669 #:tests? #f; FIXME: tests are not in a java sub directory
7670 #:source-dir "core/src"))
7672 `(("guava" ,java-guava)
7673 ("java-cglib" ,java-cglib)
7674 ("java-aopalliance" ,java-aopalliance)
7675 ("java-javax-inject" ,java-javax-inject)
7676 ("java-asm" ,java-asm)))
7677 (home-page "https://github.com/google/guice")
7678 (synopsis "Lightweight dependency injection framework")
7679 (description "Guice is a lightweight dependency injection framework fo
7681 (license license:asl2.0)))
7683 (define-public java-guice-servlet
7685 (inherit java-guice)
7686 (name "java-guice-servlet")
7688 `(#:jar-name "guice-servlet.jar"
7689 #:source-dir "extensions/servlet/src/"
7691 #:tests? #f)); FIXME: not in a java subdir
7693 `(("guice" ,java-guice)
7694 ("servlet" ,java-tomcat)
7695 ,@(package-inputs java-guice)))))
7697 (define-public java-assertj
7699 (name "java-assertj")
7703 (uri (string-append "https://github.com/joel-costigliola/"
7704 "assertj-core/archive/"
7705 "assertj-core-" version ".tar.gz"))
7708 "1kf124fxskf548rklkg86294w2x6ajqrff94rrhyqns31danqkfz"))))
7709 (build-system ant-build-system)
7711 `(#:jar-name "java-assertj.jar"
7713 #:source-dir "src/main/java"
7714 #:tests? #f)); depends on tng-junit which depends on assertj
7716 `(("cglib" ,java-cglib)
7717 ("junit" ,java-junit)
7718 ("hamcrest" ,java-hamcrest-core)))
7720 `(("mockito" ,java-mockito-1)))
7721 (home-page "https://joel-costigliola.github.io/assertj/index.html")
7722 (synopsis "Fluent assertions for java")
7723 (description "AssertJ core is a Java library that provides a fluent
7724 interface for writing assertions. Its main goal is to improve test code
7725 readability and make maintenance of tests easier.")
7726 (license license:asl2.0)))
7728 (define-public java-jboss-javassist
7730 (name "java-jboss-javassist")
7734 (uri (string-append "https://github.com/jboss-javassist/javassist/"
7736 (string-map (lambda (x) (if (eq? x #\.) #\_ x)) version)
7740 "10lpcr3sbf7y6fq6fc2h2ik7rqrivwcy4747bg0kxhwszil3cfmf"))))
7741 (build-system ant-build-system)
7743 `(#:jar-name "java-jboss-javassist.jar"
7745 #:source-dir "src/main"
7746 #:tests? #f; FIXME: requires junit-awtui and junit-swingui from junit3
7748 (modify-phases %standard-phases
7749 (add-before 'configure 'remove-binary
7751 (delete-file "javassist.jar")
7754 `(("junit" ,java-junit)))
7755 (home-page "https://github.com/jboss-javassist/javassist")
7756 (synopsis "Java bytecode engineering toolkit")
7757 (description "Javassist (JAVA programming ASSISTant) makes Java bytecode
7758 manipulation simple. It is a class library for editing bytecodes in Java; it
7759 enables Java programs to define a new class at runtime and to modify a class
7760 file when the JVM loads it.")
7761 (license (list license:gpl2 license:cddl1.0)))); either gpl2 only or cddl.
7763 (define-public java-jcommander
7765 (name "java-jcommander")
7769 (uri (string-append "https://github.com/cbeust/jcommander/archive/"
7771 (file-name (string-append name "-" version ".tar.gz"))
7774 "1f5k2ckay6qjc3d3w3d7bc0p3cx3c7n6p6zxvw1kibqdr0q98wlx"))))
7775 (build-system ant-build-system)
7777 `(#:jar-name "java-jcommander.jar"
7779 #:tests? #f; requires testng which depends on jcommander
7780 #:source-dir "src/main/java"))
7781 (home-page "http://jcommander.org")
7782 (synopsis "Command line parameters parser")
7783 (description "JCommander is a very small Java framework that makes it
7784 trivial to parse command line parameters. Parameters are declared with
7786 (license license:asl2.0)))
7788 (define-public java-bsh
7794 (uri (string-append "https://github.com/beanshell/beanshell/archive/"
7796 (file-name (string-append name "-" version ".tar.gz"))
7799 "1bawkxk6jyc75hxvzkpz689h73cn3f222m0ar3nvb0dal2b85kfv"))))
7800 (build-system ant-build-system)
7802 `(#:build-target "jarall"
7803 #:test-target "junit-tests-all"
7805 (modify-phases %standard-phases
7807 (lambda* (#:key outputs #:allow-other-keys)
7808 (let ((share (string-append (assoc-ref outputs "out") "/share/java")))
7810 (copy-file "dist/bsh-2.0b6.jar" (string-append share "/bsh-2.0b6.jar"))
7812 (home-page "http://beanshell.org/")
7813 (synopsis "Lightweight Scripting for Java")
7814 (description "BeanShell is a small, free, embeddable Java source
7815 interpreter with object scripting language features, written in Java.
7816 BeanShell dynamically executes standard Java syntax and extends it with common
7817 scripting conveniences such as loose types, commands, and method closures like
7818 those in Perl and JavaScript.")
7819 (license license:asl2.0)))
7821 (define-public java-fest-util
7823 (name "java-fest-util")
7827 (uri (string-append "https://github.com/alexruiz/fest-util/"
7828 "archive/fest-util-" version ".tar.gz"))
7831 "05g6hljz5mdaakk8d7g32klbhz9bdwp3qlj6rdaggdidxs3x1sb8"))))
7832 (build-system ant-build-system)
7834 `(#:jar-name "java-fest-util.jar"
7835 #:source-dir "src/main/java"))
7837 `(("junit" ,java-junit)
7838 ("hamcrest" ,java-hamcrest-core)))
7839 (home-page "https://github.com/alexruiz/fest-util")
7840 (synopsis "FEST common utilities")
7841 (description "Common utilities used in all FEST module.")
7842 (license license:asl2.0)))
7844 (define-public java-fest-test
7846 (name "java-fest-test")
7850 (uri (string-append "https://github.com/alexruiz/fest-test/"
7851 "archive/fest-test-" version ".tar.gz"))
7854 "1rxfbw6l9vc65iy1x3fb617qc6y4w2k430pgf1mfbxfdlxbm0f7g"))))
7855 (build-system ant-build-system)
7857 `(#:jar-name "java-fest-test.jar"
7858 #:source-dir "src/main/java"
7859 #:tests? #f)); no tests
7861 `(("junit" ,java-junit)))
7862 (home-page "https://github.com/alexruiz/fest-test")
7863 (synopsis "Common FEST testing infrastructure")
7864 (description "Fest-test contains the common FEST testing infrastructure.")
7865 (license license:asl2.0)))
7867 (define-public java-fest-assert
7869 (name "java-fest-assert")
7873 (uri (string-append "https://github.com/alexruiz/fest-assert-2.x/"
7874 "archive/fest-assert-core-" version ".tar.gz"))
7877 "1bi0iqavikzww6rxvz5jyg7y6bflv95s6ibryxx0xfcxrrw6i5lw"))))
7878 (build-system ant-build-system)
7880 `(#:jar-name "java-fest-assert.jar"
7881 #:source-dir "src/main/java"
7886 ;; Unable to set MockitoNamingPolicy on cglib generator which creates FastClasses
7887 "**/MessageFormatter_format_Test.java"
7888 "**/internal/*/*_assert*_Test.java")))
7890 `(("java-fest-util" ,java-fest-util)))
7892 `(("java-junit" ,java-junit)
7893 ("java-fest-test" ,java-fest-test)
7894 ("java-hamcrest-core" ,java-hamcrest-core)
7895 ("java-mockito" ,java-mockito-1)
7896 ("java-cglib" ,java-cglib)
7897 ("java-objenesis" ,java-objenesis)
7898 ("java-asm" ,java-asm)))
7899 (home-page "https://github.com/alexruiz/fest-assert-2.x")
7900 (synopsis "FEST fluent assertions")
7901 (description "FEST-Assert provides a fluent interface for assertions.")
7902 (license license:asl2.0)))
7904 (define-public java-testng
7906 (name "java-testng")
7911 (url "https://github.com/cbeust/testng.git")
7913 (file-name (string-append name "-" version "-checkout"))
7916 "0y6vq30i5g276kw0v2bhbvci22ijg7ax49ap2611yqlhbs4d6dqv"))))
7917 (build-system ant-build-system)
7919 `(#:jdk ,icedtea-8; java.util.function
7920 #:jar-name "java-testng.jar"
7921 #:source-dir "src/main/java"
7923 (modify-phases %standard-phases
7924 ;; FIXME: I don't know why these tests fail
7925 (add-after 'unpack 'delete-failing-tests
7927 (substitute* "src/test/resources/testng.xml"
7928 (("<class name=\"test.configuration.github1625.TestRunnerIssue1625\"/>") "")
7929 (("<class name=\"test.serviceloader.ServiceLoaderTest\" />") ""))
7931 ;; We don't have groovy
7932 (add-after 'unpack 'delete-groovy-tests
7934 (delete-file-recursively "src/test/java/test/dependent/issue1648/")
7935 (substitute* "src/test/resources/testng.xml"
7936 (("<class name=\"test.dependent.issue1648.TestRunner\"/>") ""))
7938 (add-before 'build 'copy-resources
7940 (copy-recursively "src/main/resources" "build/classes")
7942 (add-before 'check 'copy-test-resources
7944 (copy-recursively "src/test/resources" "build/test-classes")
7948 (system* "ant" "compile-tests")
7949 ;; we don't have groovy
7950 (substitute* "src/test/resources/testng.xml"
7951 (("<class name=\"test.groovy.GroovyTest\" />") ""))
7952 (zero? (system* "java" "-cp" (string-append (getenv "CLASSPATH")
7954 ":build/test-classes")
7955 "-Dtest.resources.dir=src/test/resources"
7956 "org.testng.TestNG" "src/test/resources/testng.xml")))))))
7958 `(("junit" ,java-junit)
7959 ("java-jsr305" ,java-jsr305)
7960 ("java-bsh" ,java-bsh)
7961 ("java-jcommander" ,java-jcommander)
7962 ("java-guice" ,java-guice)
7963 ("snakeyaml" ,java-snakeyaml)))
7965 `(("guava" ,java-guava)
7966 ("java-javax-inject" ,java-javax-inject)
7967 ("java-hamcrest" ,java-hamcrest-all)
7968 ("java-assertj" ,java-assertj)
7969 ("java-mockito" ,java-mockito-1)
7970 ("cglib" ,java-cglib)
7972 ("aopalliance" ,java-aopalliance)))
7973 (home-page "http://testng.org")
7974 (synopsis "Testing framework")
7975 (description "TestNG is a testing framework inspired from JUnit and NUnit
7976 but introducing some new functionalities that make it more powerful and easier
7978 (license license:asl2.0)))
7980 (define-public java-jnacl
7981 (let ((commit "094e819afdd63ea81a499b3bcb42a271006bebd9")
7985 (version (string-append "0.1.0-" revision "." (string-take commit 7)))
7989 (url "https://github.com/neilalexander/jnacl.git")
7991 (file-name (git-file-name name version))
7994 "1d6g6xhn83byv5943n7935wwjsk0ibk0qdvqgr699qqgqqmwisbb"))))
7995 (build-system ant-build-system)
7997 `(#:jar-name "jnacl.jar"
7998 #:source-dir "src/main/java"
8001 (modify-phases %standard-phases
8002 (add-before 'build 'fix-tests
8004 (substitute* '("src/test/java/com/neilalexander/jnacl/NaClTest.java"
8005 "src/test/java/com/neilalexander/jnacl/NaclSecretBoxTest.java")
8006 (("assertions.Assertions") "assertions.api.Assertions"))
8010 (invoke "ant" "compile-tests")
8011 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
8013 ":build/test-classes")
8014 "org.testng.TestNG" "-testclass"
8015 "build/test-classes/com/neilalexander/jnacl/NaclSecretBoxTest.class")
8016 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
8018 ":build/test-classes")
8019 "org.testng.TestNG" "-testclass"
8020 "build/test-classes/com/neilalexander/jnacl/NaClTest.class")
8023 `(("java-testng" ,java-testng)
8024 ("java-fest-util" ,java-fest-util)
8025 ("java-fest-assert" ,java-fest-assert)))
8026 (home-page "https://github.com/neilalexander/jnacl")
8027 (synopsis "Java implementation of NaCl")
8028 (description "Pure Java implementation of the NaCl: Networking and
8029 Cryptography library.")
8030 (license license:bsd-2))))
8032 (define-public java-mvel2
8038 (uri (string-append "https://github.com/mvel/mvel/archive/mvel2-"
8039 version ".Final.tar.gz"))
8042 "01ph5s9gm16l2qz58lg21w6fna7xmmrj7f9bzqr1jim7h9557d3z"))))
8043 (build-system ant-build-system)
8045 `(#:jar-name "mvel2.jar"
8046 #:source-dir "src/main/java"
8048 (list "**/Abstract*.java"
8049 ;; Base class with no tests
8050 "**/MVELThreadTest.java")
8052 (modify-phases %standard-phases
8053 (add-after 'install 'install-bin
8054 (lambda* (#:key outputs #:allow-other-keys)
8055 (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
8057 (with-output-to-file (string-append bin "/mvel2")
8061 "#!" (which "bash") "\n"
8062 "if [ \"$#\" -ne \"2\" ]; then\n"
8063 "echo 'Usage: mvel2 <script> <out.dir>'\n"
8066 "java -Dout.dir=$2 -cp " (getenv "CLASSPATH")
8067 ":" (assoc-ref outputs "out") "/share/java/mvel2.jar"
8068 " org.mvel2.sh.Main $1"))))
8069 (chmod (string-append bin "/mvel2") #o755))
8072 `(("junit" ,java-junit)
8073 ("hamcrest" ,java-hamcrest-core)))
8074 (home-page "https://github.com/mvel/mvel")
8075 (synopsis "MVFLEX Expression Language")
8076 (description "MVEL has largely been inspired by Java syntax, but has some
8077 fundamental differences aimed at making it more efficient as an expression
8078 language, such as operators that directly support collection, array and string
8079 matching, as well as regular expressions. MVEL is used to evaluate expressions
8080 written using Java syntax.
8082 In addition to the expression language, MVEL serves as a templating language for
8083 configuration and string construction.")
8084 (license license:asl2.0)))
8086 (define-public java-commons-jexl-2
8088 (name "java-commons-jexl")
8092 (uri (string-append "mirror://apache/commons/jexl/source/"
8093 "commons-jexl-" version "-src.tar.gz"))
8096 "1ai7632bwwaxglb0nbpblpr2jw5g20afrsaq372ipkphi3ncy1jz"))))
8097 (build-system ant-build-system)
8099 `(#:jar-name "commons-jexl-2.jar"
8101 #:source-dir "src/main/java"
8103 (modify-phases %standard-phases
8104 (add-before 'check 'disable-broken-tests
8105 (lambda* (#:key inputs #:allow-other-keys)
8106 (with-directory-excursion "src/test/java/org/apache/commons/jexl2/"
8107 (substitute* "ArithmeticTest.java"
8108 (("asserter.assertExpression\\(\"3 / 0\"") "//")
8109 (("asserter.assertExpression\\(\"imanull") "//"))
8110 ;; This test fails with "ambiguous method invocation"
8111 (delete-file "CacheTest.java")
8112 ;; This test doesn't have access to the temp directory
8113 (substitute* "ClassCreatorTest.java"
8114 (("java.io.tmpdir") "user.dir"))
8115 ;; This test fails in trying to detect whether it can run.
8116 (substitute* "ClassCreator.java"
8117 (("boolean canRun =.*") "boolean canRun = false;\n"))
8118 ;; ...and these tests depend on it.
8119 (delete-file "scripting/JexlScriptEngineOptionalTest.java")
8120 (delete-file "scripting/JexlScriptEngineTest.java"))
8122 (add-before 'build 'run-javacc
8124 (with-directory-excursion "src/main/java/org/apache/commons/jexl2/parser/"
8125 (invoke "java" "jjtree" "Parser.jjt")
8126 (invoke "java" "javacc" "Parser.jj"))
8129 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)))
8131 `(("java-junit" ,java-junit)
8132 ("java-hamcrest-core" ,java-hamcrest-core)
8133 ("javacc" ,javacc-4)))
8134 (home-page "https://commons.apache.org/proper/commons-jexl/")
8135 (synopsis "Java Expression Language ")
8136 (description "JEXL is a library intended to facilitate the implementation
8137 of dynamic and scripting features in applications and frameworks written in
8138 Java. JEXL implements an Expression Language based on some extensions to the
8139 JSTL Expression Language supporting most of the constructs seen in
8140 shell-script or ECMAScript. Its goal is to expose scripting features usable
8141 by technical operatives or consultants working with enterprise platforms.")
8142 (license license:asl2.0)))
8144 (define-public java-lz4
8150 (uri (string-append "https://github.com/lz4/lz4-java/archive/"
8152 (file-name (string-append name "-" version ".tar.gz"))
8155 "096dm57p2lzqk28n0j2p52x2j3cvnsd2dfqn43n7vbwrkjsy7y54"))))
8156 (build-system ant-build-system)
8158 `(#:jar-name "lz4.jar"
8160 #:source-dir "src/java:src/java-unsafe"
8161 #:tests? #f; FIXME: requires more dependencies
8163 (modify-phases %standard-phases
8164 (add-before 'configure 'generate-source
8166 (with-directory-excursion "src/build/source_templates"
8167 (invoke "mvel2" "../gen_sources.mvel" "../../java"))
8170 `(("mvel" ,java-mvel2)))
8171 (home-page "https://jpountz.github.io/lz4-java")
8172 (synopsis "Compression algorithm")
8173 (description "LZ4 - Java is a Java port of the popular lz4 compression
8174 algorithms and xxHash hashing algorithm.")
8175 (license license:asl2.0)))
8177 (define-public java-bouncycastle-bcprov
8179 (name "java-bouncycastle-bcprov")
8183 (uri "https://bouncycastle.org/download/bcprov-jdk15on-158.tar.gz")
8186 "1hgkg96llbvgs8i0krwz2n0j7wlg6jfnq8w8kg0cc899j0wfmf3n"))))
8187 (build-system ant-build-system)
8189 `(#:jar-name "bouncycastle-bcprov.jar"
8190 #:tests? #f; no tests
8193 (modify-phases %standard-phases
8194 (add-before 'configure 'unzip-src
8197 (with-directory-excursion "src"
8198 (invoke "unzip" "../src.zip"))
8202 ("junit" ,java-junit)))
8203 (home-page "https://www.bouncycastle.org")
8204 (synopsis "Cryptographic library")
8205 (description "Bouncy Castle Provider (bcprov) is a cryptographic library
8206 for the Java programming language.")
8207 (license license:expat)))
8209 (define-public java-bouncycastle-bcpkix
8211 (name "java-bouncycastle-bcpkix")
8215 (uri "https://bouncycastle.org/download/bcpkix-jdk15on-158.tar.gz")
8218 "0is7qay02803s9f7lhnfcjlz61ni3hq5d7apg0iil7nbqkbfbcq2"))))
8219 (build-system ant-build-system)
8221 `(#:jar-name "bouncycastle-bcpkix.jar"
8222 #:tests? #f; no tests
8225 (modify-phases %standard-phases
8226 (add-before 'configure 'unzip-src
8229 (with-directory-excursion "src"
8230 (invoke "unzip" "../src.zip"))
8234 ("junit" ,java-junit)))
8236 `(("bcprov" ,java-bouncycastle-bcprov)))
8237 (home-page "https://www.bouncycastle.org")
8238 (synopsis "Cryptographic library")
8239 (description "Bouncy Castle Java API for PKIX, CMS, EAC, TSP, PKCS, OCSP,
8241 (license license:expat)))
8243 (define-public java-lmax-disruptor
8245 (name "java-lmax-disruptor")
8249 (uri (string-append "https://github.com/LMAX-Exchange/disruptor/"
8250 "archive/" version ".tar.gz"))
8251 (file-name (string-append name "-" version ".tar.gz"))
8254 "17da2gwj5abnlsfgn2xqjk5lgzbg4vkb0hdv2dvc8r2fx4bi7w3g"))))
8255 (build-system ant-build-system)
8257 `(#:jar-name "java-lmax-disruptor.jar"
8259 #:tests? #f)); tests hang
8261 `(("junit" ,java-junit)
8262 ("java-hdrhistogram" ,java-hdrhistogram)
8263 ("java-jmock" ,java-jmock)
8264 ("java-jmock-legacy" ,java-jmock-legacy)
8265 ("java-jmock-junit4" ,java-jmock-junit4)
8266 ("java-hamcrest-all" ,java-hamcrest-all)))
8268 `(("cglib" ,java-cglib)
8269 ("objenesis" ,java-objenesis)
8271 (home-page "https://www.lmax.com/disruptor")
8272 (synopsis "High performance inter-thread communication")
8273 (description "LMAX Disruptor is a software pattern and software component
8274 for high performance inter-thread communication that avoids the need for
8275 message queues or resource locking.")
8276 (license license:asl2.0)))
8278 (define-public java-commons-bcel
8280 (name "java-commons-bcel")
8284 (uri (string-append "mirror://apache/commons/bcel/source/bcel-"
8285 version "-src.tar.gz"))
8288 "0j3x1rxd673k07psclk8k13rqh0x0mf2yy5qiwkiw4z3afa568jy"))))
8289 (build-system ant-build-system)
8291 `(#:jar-name "bcel.jar"
8293 #:source-dir "src/main/java"
8294 #:test-dir "src/test/java"
8295 ;; FIXME: Tests require the unpackaged jna.
8297 (home-page "https://commons.apache.org/proper/commons-bcel/")
8298 (synopsis "Byte code engineering library")
8299 (description "The Byte Code Engineering Library (Apache Commons BCEL) is
8300 intended to give users a convenient way to analyze, create, and
8301 manipulate (binary) Java class files. Classes are represented by objects
8302 which contain all the symbolic information of the given class: methods, fields
8303 and byte code instructions, in particular.
8305 Such objects can be read from an existing file, be transformed by a
8306 program (e.g. a class loader at run-time) and written to a file again. An
8307 even more interesting application is the creation of classes from scratch at
8308 run-time. The @dfn{Byte Code Engineering Library} (BCEL) may be also useful
8309 if you want to learn about the @dfn{Java Virtual Machine} (JVM) and the format
8310 of Java @code{.class} files.")
8311 (license license:asl2.0)))
8313 (define-public java-xerial-core
8315 (name "java-xerial-core")
8319 (uri (string-append "https://github.com/xerial/xerial-java/archive/"
8321 (file-name (string-append name "-" version ".tar.gz"))
8324 "0d3g863i41bgalpa4xr3vm1h140l091n8iwgq5qvby5yivns9y8d"))))
8325 (build-system ant-build-system)
8327 `(#:jar-name "xerial-core.jar"
8328 #:source-dir "xerial-core/src/main/java"
8329 #:test-dir "xerial-core/src/test"
8331 (modify-phases %standard-phases
8332 (add-before 'build 'copy-resources
8334 (copy-recursively "xerial-core/src/main/resources"
8338 `(("junit" ,java-junit)
8339 ("hamcrest" ,java-hamcrest-core)))
8340 (home-page "https://github.com/xerial/xerial-java")
8341 (synopsis "Data management libraries for Java")
8342 (description "Xerial is a set of data management libraries for the Java
8343 programming language. The ultimate goal of the Xerial project is to manage
8344 everything as database, including class objects, text format data, data
8346 (license license:asl2.0)))
8348 (define-public java-powermock-reflect
8350 (name "java-powermock-reflect")
8354 (uri (string-append "https://github.com/powermock/powermock/"
8355 "archive/powermock-" version ".tar.gz"))
8356 (file-name (string-append name "-" version ".tar.gz"))
8359 "0sbgi5vqq7k72wzcdjb20s370vyd4hsbnx71pzb8ishml3gy7fwy"))
8361 (search-patches "java-powermock-fix-java-files.patch"))))
8362 (build-system ant-build-system)
8364 `(#:jar-name "java-powermock-reflect.jar"
8366 #:source-dir "powermock-reflect/src/main/java"
8367 #:test-dir "powermock-reflect/src/test"))
8369 `(("java-objenesis" ,java-objenesis)))
8371 `(("junit" ,java-junit)
8372 ("cglib" ,java-cglib)
8374 ("hamcrest" ,java-hamcrest-core)
8375 ("assertj" ,java-assertj)))
8376 (home-page "https://github.com/powermock/powermock")
8377 (synopsis "Mock library extension framework")
8378 (description "PowerMock is a framework that extends other mock libraries
8379 such as EasyMock with more powerful capabilities. PowerMock uses a custom
8380 classloader and bytecode manipulation to enable mocking of static methods,
8381 constructors, final classes and methods, private methods, removal of static
8382 initializers and more. By using a custom classloader no changes need to be
8383 done to the IDE or continuous integration servers which simplifies adoption.")
8384 (license license:asl2.0)))
8386 (define-public java-powermock-core
8388 (inherit java-powermock-reflect)
8389 (name "java-powermock-core")
8391 `(#:jar-name "java-powermock-core.jar"
8392 #:source-dir "powermock-core/src/main/java"
8393 #:test-dir "powermock-core/src/test"
8394 #:tests? #f; requires powermock-api
8397 (modify-phases %standard-phases
8398 (add-before 'build 'copy-resources
8400 (copy-recursively "powermock-core/src/main/resources"
8401 "build/classes"))))))
8403 `(("reflect" ,java-powermock-reflect)
8404 ("javassist" ,java-jboss-javassist)))
8406 `(("junit" ,java-junit)
8407 ("assertj" ,java-assertj)
8408 ("mockito" ,java-mockito-1)))))
8410 (define-public java-powermock-api-support
8412 (inherit java-powermock-reflect)
8413 (name "java-powermock-api-support")
8414 (build-system ant-build-system)
8416 `(#:jar-name "java-powermock-api-support.jar"
8418 #:source-dir "powermock-api/powermock-api-support/src/main/java"
8419 #:tests? #f)); no tests
8421 `(("core" ,java-powermock-core)
8422 ("reflect" ,java-powermock-reflect)))))
8424 (define-public java-powermock-modules-junit4-common
8426 (inherit java-powermock-reflect)
8427 (name "java-powermock-modules-junit4-common")
8428 (build-system ant-build-system)
8430 `(#:jar-name "java-powermock-modules-junit4-common.jar"
8432 #:source-dir "powermock-modules/powermock-module-junit4-common/src/main/java"
8433 #:test-dir "powermock-modules/powermock-module-junit4-common/src/test"))
8435 `(("core" ,java-powermock-core)
8436 ("easymock" ,java-easymock)
8437 ("reflect" ,java-powermock-reflect)
8438 ("hamcrest" ,java-hamcrest-core)
8439 ("cglib" ,java-cglib)))))
8441 (define-public java-powermock-modules-junit4
8443 (inherit java-powermock-reflect)
8444 (name "java-powermock-modules-junit4")
8445 (build-system ant-build-system)
8447 `(#:jar-name "java-powermock-modules-junit4.jar"
8449 #:source-dir "powermock-modules/powermock-module-junit4/src/main/java"
8450 #:test-dir "powermock-modules/powermock-module-junit4/src/test"
8452 (modify-phases %standard-phases
8453 (add-before 'build 'fix-junit-detection
8455 ;; Our junit version is 4.12-SNAPSHOT
8456 (substitute* (find-files "powermock-modules/powermock-module-junit4"
8457 "PowerMockJUnit4MethodValidator.java")
8458 (("4.12") "4.12-SNAPSHOT")))))))
8460 `(("core" ,java-powermock-core)
8461 ("reflect" ,java-powermock-reflect)
8462 ("common" ,java-powermock-modules-junit4-common)
8463 ("cglib" ,java-cglib)))
8465 `(("easymock" ,java-easymock)
8466 ("hamcrest" ,java-hamcrest-core)
8467 ("objenesis" ,java-objenesis)
8469 ("junit" ,java-junit)))))
8471 (define-public java-powermock-api-easymock
8473 (inherit java-powermock-reflect)
8474 (name "java-powermock-api-easymock")
8475 (build-system ant-build-system)
8477 `(#:jar-name "java-powermock-api-easymock.jar"
8479 #:source-dir "powermock-api/powermock-api-easymock/src/main/java"
8480 #:tests? #f; no tests
8482 (modify-phases %standard-phases
8483 (add-before 'build 'fix-file
8485 ;; FIXME: This looks wrong, but it fixes a build error.
8486 (with-directory-excursion "powermock-api/powermock-api-easymock"
8487 (substitute* "src/main/java/org/powermock/api/easymock/PowerMock.java"
8488 (("classLoader instanceof MockClassLoader") "false")
8489 (("\\(\\(MockClassLoader\\) classLoader\\).*;") ";")))
8492 `(("core" ,java-powermock-core)
8493 ("easymock" ,java-easymock)
8494 ("reflect" ,java-powermock-reflect)
8495 ("support" ,java-powermock-api-support)
8496 ("cglib" ,java-cglib)))))
8498 (define-public java-jboss-jms-api-spec
8500 (name "java-jboss-jms-api-spec")
8504 (uri (string-append "https://github.com/jboss/jboss-jms-api_spec/"
8505 "archive/jboss-jms-api_" version
8506 "_spec-1.0.1.Final.tar.gz"))
8509 "07bqblw9kq2i8q92bz70fvavq5xjfkaixl8xa0m0cypjgy82rb7m"))))
8510 (build-system ant-build-system)
8512 `(#:jar-name "java-jboss-jms-api_spec.jar"
8515 #:tests? #f)); no tests
8516 (home-page "https://github.com/jboss/jboss-jms-api_spec")
8517 (synopsis "Java Message Service API specification")
8518 (description "Java Message Service (JMS) API is used to send messages
8519 messages between two or more clients. It is a messaging standard that allows
8520 application components to create, send, receive, and read messages.")
8521 ; either gpl2 only with GPL Classpath Exception, or cddl.
8522 (license (list license:gpl2 license:cddl1.0))))
8524 (define-public java-mail
8530 (uri (string-append "https://github.com/javaee/javamail/archive/"
8531 "JAVAMAIL-1_6_0.tar.gz"))
8534 "1b4rg7fpj50ld90a71iz2m4gm3f5cnw18p3q3rbrrryjip46kx92"))))
8535 (build-system ant-build-system)
8537 `(#:jar-name "java-mail.jar"
8539 #:source-dir "mail/src/main/java"
8540 #:test-dir "mail/src/test"
8542 (list "**/CollectorFormatterTest.java"
8543 "**/CompactFormatterTest.java"
8544 "**/DurationFilterTest.java"
8545 "**/MailHandlerTest.java"
8546 "**/GetLocalAddressTest.java"
8547 ;; FIXME: both end with:
8548 ;; java.lang.ClassNotFoundException:
8549 ;; javax.mail.internet.MimeMultipartParseTest
8550 "**/MimeMultipartParseTest.java"
8551 "**/SearchTermSerializationTest.java")
8553 (modify-phases %standard-phases
8554 (add-before 'configure 'move-version.java
8556 (copy-file "mail/src/main/resources/javax/mail/Version.java"
8557 "mail/src/main/java/javax/mail/Version.java")
8559 (add-before 'build 'copy-resources
8561 (copy-recursively "mail/src/main/resources/META-INF"
8562 "build/classes/META-INF")
8565 `(("junit" ,java-junit)
8566 ("hamcrest" ,java-hamcrest-core)))
8567 (home-page "https://javaee.github.io/javamail/")
8568 (synopsis "Mail-related functionnalities in Java")
8569 (description "The JavaMail API provides a platform-independent and
8570 protocol-independent framework to build mail and messaging applications.")
8571 ;; General Public License Version 2 only ("GPL") or the Common Development
8572 ;; and Distribution License("CDDL")
8573 (license (list license:cddl1.1
8574 license:gpl2)))); with classpath exception
8576 (define-public java-jeromq
8578 (name "java-jeromq")
8583 (url "https://github.com/zeromq/jeromq.git")
8584 (commit (string-append "v" version))))
8585 (file-name (string-append name "-" version "-checkout"))
8588 "1gxkp7lv2ahymgrqdw94ncq54bmp4m4sw5m1x9gkp7l5bxn0xsyj"))
8589 (patches (search-patches "java-jeromq-fix-tests.patch"))))
8590 (build-system ant-build-system)
8592 `(#:jar-name "java-jeromq.jar"
8593 #:source-dir "src/main/java"
8599 "**/ZBeaconTest.java"
8601 "**/DealerSpecTest.java"
8602 "**/CustomDecoderTest.java"
8603 "**/CustomEncoderTest.java"
8604 "**/ConnectRidTest.java"
8605 "**/ReqSpecTest.java"
8606 "**/PushPullSpecTest.java"
8607 "**/PubSubHwmTest.java"
8608 "**/RouterSpecTest.java"
8609 "**/ProxyTest.java")))
8611 `(("java-jnacl" ,java-jnacl)))
8613 `(("java-hamcrest-core" ,java-hamcrest-core)
8614 ("junit" ,java-junit)))
8615 (home-page "http://zeromq.org/bindings:java")
8616 (synopsis "Java binding for 0MQ")
8617 (description "Jeromq provides the java bindings for 0MQ.")
8618 (license license:mpl2.0)))
8620 (define-public java-kafka-clients
8622 (name "java-kafka-clients")
8626 (uri (string-append "mirror://apache/kafka/" version "/kafka-"
8627 version "-src.tgz"))
8630 "1yxmnsmliwm7671q5yy9bl4jdqyyn00n26cggz9brwczx80w1vfq"))))
8631 (build-system ant-build-system)
8633 `(#:jar-name "java-kafka-clients.jar"
8635 #:source-dir "clients/src/main/java"
8636 #:test-dir "clients/src/test"
8639 ;; This file does not contain a class
8640 "**/IntegrationTest.java"
8642 "**/ClientUtilsTest.java"
8643 ;; End with errors that seem related to our powermock
8644 "**/KafkaProducerTest.java"
8645 "**/BufferPoolTest.java")))
8647 `(("java-slf4j-api" ,java-slf4j-api)
8648 ("java-lz4" ,java-lz4)))
8650 `(("junit" ,java-junit)
8651 ("hamcrest" ,java-hamcrest-all)
8652 ("objenesis" ,java-objenesis)
8654 ("cglib" ,java-cglib)
8655 ("javassist" ,java-jboss-javassist)
8656 ("snappy" ,java-snappy)
8657 ("easymock" ,java-easymock)
8658 ("powermock" ,java-powermock-core)
8659 ("powermock-easymock" ,java-powermock-api-easymock)
8660 ("powermock-junit4-common" ,java-powermock-modules-junit4-common)
8661 ("powermock-junit4" ,java-powermock-modules-junit4)
8662 ("powermock-support" ,java-powermock-api-support)
8663 ("bouncycastle" ,java-bouncycastle-bcprov)
8664 ("bouncycastle-bcpkix" ,java-bouncycastle-bcpkix)))
8665 (home-page "https://kafka.apache.org")
8666 (synopsis "Distributed streaming platform")
8667 (description "Kafka is a distributed streaming platform, which means:
8669 @item it can publish and subscribe to streams of records;
8670 @item it can store streams of records in a fault-tolerant way;
8671 @item it can process streams of records as they occur.
8673 ;; Either cddl or gpl2 only.
8674 (license (list license:cddl1.1; actually cddl1.1
8675 license:gpl2)))); with classpath exception
8677 (define-public java-jdom
8683 (uri (string-append "http://jdom.org/dist/binary/archive/jdom-"
8687 "07wdpm3jwwc9q38kmdw40fvbmv6jzjrkrf8m0zqs58f79a672wfl"))))
8688 (build-system ant-build-system)
8690 `(#:build-target "package"
8691 #:tests? #f; tests are run as part of the build process
8693 (modify-phases %standard-phases
8695 (install-jars "build")))))
8696 (home-page "http://jdom.org/")
8697 (synopsis "Access, manipulate, and output XML data")
8698 (description "Java-based solution for accessing, manipulating, and
8699 outputting XML data from Java code.")
8700 (license license:bsd-4)))
8702 (define-public java-geronimo-xbean-reflect
8704 (name "java-geronimo-xbean-reflect")
8709 (url "https://svn.apache.org/repos/asf/geronimo/xbean/tags/xbean-4.5/")
8710 (revision 1807396)))
8711 (file-name (string-append name "-" version))
8714 "18q3i6jgm6rkw8aysfgihgywrdc5nvijrwnslmi3ww497jvri6ja"))))
8715 (build-system ant-build-system)
8717 `(#:jar-name "geronimo-xbean-reflect.jar"
8718 #:source-dir "xbean-reflect/src/main/java"
8719 #:test-dir "xbean-reflect/src/test"
8722 (list "**/Abstract*.java" "**/AsmParameterNameLoaderTest.java"
8723 "**/ObjectRecipeTest.java" "**/ParameterNameLoaderTest.java"
8724 "**/RecipeHelperTest.java" "**/XbeanAsmParameterNameLoaderTest.java")
8726 (modify-phases %standard-phases
8727 (add-before 'build 'fix-source
8729 (let ((dir "xbean-reflect/src/main/java/org/apache/xbean/recipe/"))
8730 ;; org.apache.xbean.asm6 is actually repackaged java-asm
8731 (substitute* (string-append dir "XbeanAsmParameterNameLoader.java")
8732 (("org.apache.xbean.asm5") "org.objectweb.asm"))
8736 ("log4j" ,java-log4j-api)
8737 ("log4j-1.2" ,java-log4j-1.2-api)
8738 ("log4j-core" ,java-log4j-core)
8739 ("logging" ,java-commons-logging-minimal)))
8741 `(("junit" ,java-junit)))
8742 (home-page "https://geronimo.apache.org/maven/xbean/3.6/xbean-reflect/")
8743 (synopsis "Dependency injection helper")
8744 (description "Xbean-reflect provides very flexible ways to create objects
8745 and graphs of objects for dependency injection frameworks")
8746 (license license:asl2.0)))
8748 (define-public java-geronimo-xbean-bundleutils
8750 (inherit java-geronimo-xbean-reflect)
8751 (name "java-geronimo-xbean-bundleutils")
8753 `(#:jar-name "geronimo-xbean-bundleutils.jar"
8754 #:source-dir "xbean-bundleutils/src/main/java"
8755 #:test-dir "xbean-bundleutils/src/test"
8757 (modify-phases %standard-phases
8758 (add-before 'build 'fix-java
8760 ;; We use a more recent version of osgi, so this file requires
8761 ;; more interface method implementations.
8762 (substitute* "xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/DelegatingBundleContext.java"
8763 (("import org.osgi.framework.ServiceRegistration;")
8764 "import org.osgi.framework.ServiceRegistration;
8765 import org.osgi.framework.ServiceFactory;
8766 import java.util.Collection;
8767 import org.osgi.framework.ServiceObjects;")
8768 (("public Bundle getBundle\\(\\)")
8770 public <S> ServiceObjects<S> getServiceObjects(ServiceReference<S> reference) {
8771 throw new UnsupportedOperationException();
8774 public <S> ServiceRegistration<S> registerService(Class<S> clazz,
8775 ServiceFactory<S> factory, Dictionary<String, ?> properties) {
8776 throw new UnsupportedOperationException();
8778 public Bundle getBundle()"))
8781 `(("java-slf4j" ,java-slf4j-api)
8782 ("java-asm" ,java-asm)
8783 ("java-osgi-framework" ,java-osgi-framework)
8784 ("java-eclipse-osgi" ,java-eclipse-osgi)
8785 ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin)))))
8787 (define-public java-geronimo-xbean-asm-util
8789 (inherit java-geronimo-xbean-reflect)
8790 (name "java-geronimo-xbean-asm-util")
8792 `(#:jar-name "geronimo-xbean-asm-util.jar"
8793 #:source-dir "xbean-asm-util/src/main/java"
8794 #:tests? #f)); no tests
8796 `(("java-asm" ,java-asm)))
8797 (native-inputs '())))
8799 (define-public java-geronimo-xbean-finder
8801 (inherit java-geronimo-xbean-reflect)
8802 (name "java-geronimo-xbean-finder")
8804 `(#:jar-name "geronimo-xbean-finder.jar"
8805 #:source-dir "xbean-finder/src/main/java"
8806 #:test-dir "xbean-finder/src/test"))
8808 `(("java-slf4j-api" ,java-slf4j-api)
8809 ("java-asm" ,java-asm)
8810 ("java-geronimo-xbean-bundleutils" ,java-geronimo-xbean-bundleutils)
8811 ("java-geronimo-xbean-asm-util" ,java-geronimo-xbean-asm-util)
8812 ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin)
8813 ("java-osgi-framework" ,java-osgi-framework)))
8815 `(("java-junit" ,java-junit)
8816 ("java-hamcrest-core" ,java-hamcrest-core)))))
8818 (define-public java-gson
8824 (uri (string-append "https://github.com/google/gson/archive/"
8825 "gson-parent-" version ".tar.gz"))
8828 "1j4qnp7v046q0k48c4kyf69sxaasx2h949d3cqwsm3kzxms3x0f9"))))
8829 (build-system ant-build-system)
8831 `(#:jar-name "gson.jar"
8832 #:source-dir "gson/src/main/java"
8833 #:test-dir "gson/src/test"))
8835 `(("java-junit" ,java-junit)
8836 ("java-hamcrest-core" ,java-hamcrest-core)))
8837 (home-page "https://github.com/google/gson")
8838 (synopsis "Java serialization/deserialization library from/to JSON")
8839 (description "Gson is a Java library that can be used to convert Java
8840 Objects into their JSON representation. It can also be used to convert a JSON
8841 string to an equivalent Java object. Gson can work with arbitrary Java objects
8842 including pre-existing objects that you do not have source-code of.")
8843 (license license:asl2.0)))
8845 (define-public java-hawtjni
8847 (name "java-hawtjni")
8851 (uri (string-append "https://github.com/fusesource/hawtjni/archive/"
8852 "hawtjni-project-" version ".tar.gz"))
8855 "1bqfd732rmh6svyx17fpw9175gc9gzkcbyps2yyrf50c3zzjas6g"))))
8856 (build-system ant-build-system)
8858 `(#:jar-name "hawtjni.jar"
8859 #:source-dir "hawtjni-generator/src/main/java:hawtjni-runtime/src/main/java"
8860 #:tests? #f; no tests
8862 (modify-phases %standard-phases
8863 (add-before 'build 'build-native
8864 (lambda* (#:key inputs #:allow-other-keys)
8865 (let ((include (string-append "-I" (assoc-ref inputs "jdk") "/include/linux")))
8866 (with-directory-excursion "hawtjni-generator/src/main/resources/"
8867 (invoke "gcc" "-c" "hawtjni.c" "-o" "hawtjni.o"
8868 "-fPIC" "-O2" include)
8869 (invoke "gcc" "-c" "hawtjni-callback.c" "-o" "hawtjni-callback.o"
8870 "-fPIC" "-O2" include)
8871 (invoke "gcc" "-o" "libhawtjni.so" "-shared"
8872 "hawtjni.o" "hawtjni-callback.o")))
8874 (add-after 'install 'install-native
8875 (lambda* (#:key outputs #:allow-other-keys)
8876 (let* ((out (assoc-ref outputs "out"))
8877 (lib (string-append out "/lib"))
8878 (inc (string-append out "/include")))
8879 (with-directory-excursion "hawtjni-generator/src/main/resources/"
8880 (install-file "libhawtjni.so" lib)
8881 (install-file "hawtjni.h" inc)))
8884 `(("java-commons-cli" ,java-commons-cli)
8885 ("java-asm" ,java-asm)
8886 ("java-geronimo-xbean-finder" ,java-geronimo-xbean-finder)))
8887 (home-page "https://fusesource.github.io/hawtjni/")
8888 (synopsis "JNI code generator")
8889 (description "HawtJNI is a code generator that produces the JNI code needed
8890 to implement Java native methods. It is based on the jnigen code generator
8891 that is part of the SWT Tools project.")
8892 (license license:asl2.0)))
8894 (define-public java-jansi-native
8896 (name "java-jansi-native")
8900 (uri (string-append "https://github.com/fusesource/jansi-native/"
8901 "archive/jansi-native-" version ".tar.gz"))
8904 "0j2ydlgxbzbgshqkwghbxxxnbnx1mmjgd6k5fw6xfvxw1z956yqf"))))
8905 (build-system ant-build-system)
8907 `(#:jar-name "jansi-native.jar"
8908 #:source-dir "src/main/java"
8909 #:tests? #f; no tests
8911 (modify-phases %standard-phases
8912 (add-before 'build 'build-native
8913 (lambda* (#:key inputs #:allow-other-keys)
8914 ;; there are more required files for windows in windows/
8915 (with-directory-excursion "src/main/native-package/src"
8916 (substitute* "jansi_ttyname.c"
8917 (("#include \"jansi_.*") ""))
8918 (invoke "gcc" "-c" "jansi_ttyname.c" "-o" "jansi_ttyname.o"
8919 (string-append "-I" (assoc-ref inputs "java-hawtjni")
8921 (string-append "-I" (assoc-ref inputs "jdk")
8924 (invoke "gcc" "-o" "libjansi.so" "-shared" "jansi_ttyname.o")
8926 (add-before 'build 'install-native
8928 (let ((dir (string-append "build/classes/META-INF/native/"
8929 ,(match (%current-system)
8930 ((or "i686-linux" "armhf-linux")
8932 ((or "x86_64-linux" "aarch64-linux")
8934 (install-file "src/main/native-package/src/libjansi.so" dir))
8936 (add-after 'install 'install-native
8937 (lambda* (#:key outputs #:allow-other-keys)
8938 (install-file "src/main/native-package/src/jansi.h"
8939 (string-append (assoc-ref outputs "out") "/include"))
8942 `(("java-hawtjni" ,java-hawtjni)))
8943 (home-page "https://fusesource.github.io/jansi/")
8944 (synopsis "Native library for jansi")
8945 (description "This package provides the native library for jansi, a small
8946 Java library that allows you to use ANSI escape sequences to format your
8948 (license license:asl2.0)))
8950 (define-public java-jansi
8956 (uri (string-append "https://github.com/fusesource/jansi/archive/"
8957 "jansi-project-" version ".tar.gz"))
8960 "11kh3144i3fzp21dpy8zg52mjmsr214k7km9p8ly0rqk2px0qq2z"))))
8961 (build-system ant-build-system)
8963 `(#:jar-name "jansi.jar"
8964 #:source-dir "jansi/src/main/java"
8965 #:test-dir "jansi/src/test"
8967 (modify-phases %standard-phases
8968 (add-after 'check 'clear-term
8970 (zero? (system* "echo" "-e" "\\e[0m")))))))
8972 `(("java-jansi-native" ,java-jansi-native)))
8974 `(("java-junit" ,java-junit)
8975 ("java-hamcrest-core" ,java-hamcrest-core)))
8976 (home-page "https://fusesource.github.io/jansi/")
8977 (synopsis "Portable ANSI escape sequences")
8978 (description "Jansi is a Java library that allows you to use ANSI escape
8979 sequences to format your console output which works on every platform.")
8980 (license license:asl2.0)))
8982 (define-public java-jboss-el-api-spec
8984 (name "java-jboss-el-api-spec")
8988 (uri (string-append "https://github.com/jboss/jboss-el-api_spec/"
8989 "archive/jboss-el-api_" version
8990 "_spec-1.0.7.Final.tar.gz"))
8993 "1j45ljxalwlibxl7g7iv952sjxkw275m8vyxxij8l6wdd5pf0pdh"))))
8994 (build-system ant-build-system)
8996 `(#:jar-name "java-jboss-el-api_spec.jar"
8999 `(("java-junit" ,java-junit)))
9000 (home-page "https://github.com/jboss/jboss-el-api_spec")
9001 (synopsis "JSR-341 expression language 3.0 API")
9002 (description "This package contains an implementation of the JSR-341
9003 specification for the expression language 3.0. It implements an expression
9004 language inspired by ECMAScript and XPath. This language is used with
9005 JavaServer Pages (JSP).")
9006 ;; Either GPL2 only or CDDL.
9007 (license (list license:gpl2 license:cddl1.1))))
9009 (define-public java-jboss-interceptors-api-spec
9011 (name "java-jboss-interceptors-api-spec")
9015 (uri (string-append "https://github.com/jboss/jboss-interceptors-api_spec/"
9016 "archive/jboss-interceptors-api_" version
9017 "_spec-1.0.0.Final.tar.gz"))
9020 "0wv8x0jp9a5qxlrgkhb5jdk2gr6vi87b4j4kjb8ryxiy9gn8g51z"))))
9021 (build-system ant-build-system)
9023 `(#:jar-name "java-jboss-interceptors-api_spec.jar"
9026 #:tests? #f)); no tests
9027 (home-page "https://github.com/jboss/jboss-interceptors-api_spec")
9028 (synopsis "Interceptors 1.2 API classes from JSR 318")
9029 (description "Java-jboss-interceptors-api-spec implements the Interceptors
9030 API. Interceptors are used to interpose on business method invocations and
9032 ;; Either GPL2 only or CDDL.
9033 (license (list license:gpl2 license:cddl1.1))))
9035 (define-public java-cdi-api
9037 (name "java-cdi-api")
9041 (uri (string-append "https://github.com/cdi-spec/cdi/archive/"
9043 (file-name (string-append name "-" version ".tar.gz"))
9046 "1iv8b8bp07c5kmqic14jsr868vycjv4qv02lf3pkgp9z21mnfg5y"))))
9047 (build-system ant-build-system)
9049 `(#:source-dir "api/src/main/java"
9050 #:jar-name "java-cdi-api.jar"
9051 #:test-dir "api/src/test"
9053 #:tests? #f)); Tests fail because we don't have a CDI provider yet
9055 `(("java-javax-inject" ,java-javax-inject)
9056 ("java-jboss-el-api-spec" ,java-jboss-el-api-spec)
9057 ("java-jboss-interceptors-api-spec" ,java-jboss-interceptors-api-spec)))
9059 `(("java-testng" ,java-testng)
9060 ("java-hamcrest-core" ,java-hamcrest-core)))
9061 (home-page "http://cdi-spec.org/")
9062 (synopsis "Contexts and Dependency Injection APIs")
9063 (description "Java-cdi-api contains the required APIs for Contexts and
9064 Dependency Injection (CDI).")
9065 (license license:asl2.0)))
9067 (define-public java-joda-convert
9069 (name "java-joda-convert")
9073 (uri (string-append "https://github.com/JodaOrg/joda-convert/archive/v"
9075 (file-name (string-append name "-" version ".tar.gz"))
9078 "0vp346xz7dh9br4q7xazhc7hvzf76a6hf95fki9bg67q5jr0kjh7"))))
9079 (build-system ant-build-system)
9081 `(#:jar-name (string-append ,name "-" ,version ".jar")
9082 #:source-dir "src/main/java"
9083 #:test-include (list "**/Test*.java")
9084 ;; Contains only interfaces and base classes (no test)
9085 #:test-exclude (list "**/test*/**.java")))
9087 `(("java-guava" ,java-guava)))
9089 `(("java-junit" ,java-junit)
9090 ("java-hamcrest-core" ,java-hamcrest-core)))
9091 (home-page "http://www.joda.org/joda-convert/")
9092 (synopsis "Conversion between Objects and Strings")
9093 (description "Joda-Convert provides a small set of classes to aid
9094 conversion between Objects and Strings. It is not intended to tackle the
9095 wider problem of Object to Object transformation.")
9096 (license license:asl2.0)))
9098 (define-public java-joda-time
9100 (name "java-joda-time")
9104 (uri (string-append "https://github.com/JodaOrg/joda-time/archive/v"
9106 (file-name (string-append name "-" version ".tar.gz"))
9109 "1i9x91mi7yg2pasl0k3912f1pg46n37sps6rdb0v1gs8hj9ppwc1"))))
9110 (build-system ant-build-system)
9112 `(#:jar-name "java-joda-time.jar"
9113 #:source-dir "src/main/java"
9114 #:test-include (list "**/Test*.java")
9115 ;; There is no runnable test in these files
9116 #:test-exclude (list "**/Test*Chronology.java" "**/Test*Field.java")
9118 (modify-phases %standard-phases
9119 (add-after 'build 'build-resources
9121 (mkdir-p "build/classes/org/joda/time/tz/data")
9122 (mkdir-p "build/classes/org/joda/time/format")
9123 ;; This will produce the following exception:
9124 ;; java.io.IOException: Resource not found: "org/joda/time/tz/data/ZoneInfoMap"
9125 ;; which is normal, because it doesn't exist yet. It still generates
9126 ;; the same file as in the binary one can find on maven.
9127 (invoke "java" "-cp"
9128 (string-append "build/classes:" (getenv "CLASSPATH"))
9129 "org.joda.time.tz.ZoneInfoCompiler"
9130 "-src" "src/main/java/org/joda/time/tz/src"
9131 "-dst" "build/classes/org/joda/time/tz/data"
9132 "africa" "antarctica" "asia" "australasia"
9133 "europe" "northamerica" "southamerica"
9134 "pacificnew" "etcetera" "backward" "systemv")
9135 (for-each (lambda (f)
9136 (copy-file f (string-append
9137 "build/classes/org/joda/time/format/"
9139 (find-files "src/main/java/org/joda/time/format" ".*.properties"))
9141 (add-before 'install 'regenerate-jar
9143 ;; We need to regenerate the jar file to add generated data.
9144 (delete-file "build/jar/java-joda-time.jar")
9145 (invoke "ant" "jar")))
9146 (add-before 'check 'copy-test-resources
9148 (mkdir-p "build/test-classes/org/joda/time/tz/data")
9149 (copy-file "src/test/resources/tzdata/ZoneInfoMap"
9150 "build/test-classes/org/joda/time/tz/data/ZoneInfoMap")
9151 (copy-recursively "src/test/resources" "build/test-classes")
9154 `(("java-joda-convert" ,java-joda-convert)))
9156 `(("java-junit" ,java-junit)
9157 ("java-hamcrest-core" ,java-hamcrest-core)
9158 ("tzdata" ,tzdata)))
9159 (home-page "http://www.joda.org/joda-time/")
9160 (synopsis "Replacement for the Java date and time classes")
9161 (description "Joda-Time is a replacement for the Java date and time
9162 classes prior to Java SE 8.")
9163 (license license:asl2.0)))
9165 (define-public java-xerces
9167 (name "java-xerces")
9172 (uri (string-append "mirror://apache/xerces/j/source/"
9173 "Xerces-J-src." version ".tar.gz"))
9175 (base32 "1006igwy2lqrmjvdk64v8dg6qbk9c29pm8xxx7r87n0vnpvmx6pm"))
9176 (patches (search-patches
9177 "java-xerces-xjavac_taskdef.patch"
9178 "java-xerces-build_dont_unzip.patch"
9179 "java-xerces-bootclasspath.patch"))))
9180 (build-system ant-build-system)
9182 `(#:tests? #f;; Test files are not present
9183 #:test-target "test"
9186 (modify-phases %standard-phases
9187 (add-after 'unpack 'create-build.properties
9188 (lambda* (#:key inputs #:allow-other-keys)
9189 (let ((jaxp (assoc-ref inputs "java-jaxp"))
9190 (resolver (assoc-ref inputs "java-apache-xml-commons-resolver")))
9191 (with-output-to-file "build.properties"
9194 "jar.jaxp = ~a/share/java/jaxp.jar~@
9195 jar.apis-ext = ~a/share/java/jaxp.jar~@
9196 jar.resolver = ~a/share/java/xml-resolver.jar~%"
9197 jaxp jaxp resolver)))
9198 ;; Make xerces use our version of jaxp in tests
9199 (substitute* "build.xml"
9201 (string-append jaxp "/share/java/jaxp.jar"))
9202 (("\\$\\{tools.dir\\}/\\$\\{jar.apis\\}")
9205 (replace 'install (install-jars "build")))))
9207 `(("java-apache-xml-commons-resolver" ,java-apache-xml-commons-resolver)
9208 ("java-jaxp" ,java-jaxp)))
9209 (home-page "https://xerces.apache.org/xerces2-j/")
9210 (synopsis "Validating XML parser for Java with DOM level 3 support")
9211 (description "The Xerces2 Java parser is the reference implementation of
9212 XNI, the Xerces Native Interface, and also a fully conforming XML Schema
9215 Xerces2-J supports the following standards and APIs:
9218 @item eXtensible Markup Language (XML) 1.0 Second Edition Recommendation
9219 @item Namespaces in XML Recommendation
9220 @item Document Object Model (DOM) Level 2 Core, Events, and Traversal and
9221 Range Recommendations
9222 @item Simple API for XML (SAX) 2.0.1 Core and Extension
9223 @item Java APIs for XML Processing (JAXP) 1.2.01
9224 @item XML Schema 1.0 Structures and Datatypes Recommendations
9225 @item Experimental implementation of the Document Object Model (DOM) Level 3
9226 Core and Load/Save Working Drafts
9227 @item Provides a partial implementation of the XML Inclusions (XInclude) W3C
9228 Candidate Recommendation
9231 Xerces is now able to parse documents written according to the XML 1.1
9232 Candidate Recommendation, except that it does not yet provide an option to
9233 enable normalization checking as described in section 2.13 of this
9234 specification. It also handles namespaces according to the XML Namespaces 1.1
9235 Candidate Recommendation, and will correctly serialize XML 1.1 documents if
9236 the DOM level 3 load/save API's are in use.")
9237 (license license:asl2.0)))
9239 (define-public java-jline
9245 (uri (string-append "https://github.com/jline/jline1/archive/jline-"
9249 "0bi3p6vrh7a6v0fbpb6rx9plpmx5zk3lr352xzdbz2jcxg499wir"))))
9250 (build-system ant-build-system)
9252 `(#:jar-name "jline.jar"
9253 #:source-dir "src/main/java"
9254 #:test-dir "src/test"
9256 (modify-phases %standard-phases
9257 (add-before 'build 'copy-resources
9259 (copy-recursively "src/main/resources" "build/classes")
9262 `(("java-junit" ,java-junit)))
9263 (home-page "https://jline.github.io")
9264 (synopsis "Console input handling library")
9265 (description "JLine is a Java library for handling console input. It is
9266 similar in functionality to BSD editline and GNU readline but with additional
9267 features that bring it on par with the Z shell line editor.")
9268 (license license:bsd-3)))
9270 (define-public java-xmlunit
9272 (name "java-xmlunit")
9276 (uri (string-append "https://github.com/xmlunit/xmlunit/archive/v"
9278 (file-name (string-append name "-" version ".tar.gz"))
9281 "035rivlnmwhfqj0fzviciv0bkh1h95ps1iwnh2kjcvdbk5nccm4z"))))
9282 (build-system ant-build-system)
9284 `(#:jar-name "java-xmlunit.jar"
9285 #:source-dir "xmlunit-core/src/main/java"
9286 #:test-dir "xmlunit-core/src/test"
9288 (modify-phases %standard-phases
9289 (add-before 'check 'copy-test-resources
9290 (lambda* (#:key inputs #:allow-other-keys)
9291 (copy-recursively (assoc-ref inputs "resources") "../test-resources")
9294 `(("java-junit" ,java-junit)
9295 ("java-mockito-1" ,java-mockito-1)
9296 ("java-hamcrest-all" ,java-hamcrest-all)
9297 ("java-objenesis" ,java-objenesis)
9298 ("java-asm" ,java-asm)
9299 ("java-cglib" ,java-cglib)
9304 (url "https://github.com/xmlunit/test-resources.git")
9305 (commit "a590d2ae865c3e0455691d76ba8eefccc2215aec")))
9306 (file-name "java-xmlunit-test-resources")
9309 "0r0glj37pg5l868yjz78gckr91cs8fysxxbp9p328dssssi91agr"))))))
9310 (home-page "http://www.xmlunit.org/")
9311 (synopsis "XML output testing")
9312 (description "XMLUnit provides you with the tools to verify the XML you
9313 emit is the one you want to create. It provides helpers to validate against
9314 an XML Schema, assert the values of XPath queries or compare XML documents
9315 against expected outcomes.")
9316 (license license:asl2.0)))
9318 (define-public java-xmlunit-legacy
9320 (inherit java-xmlunit)
9321 (name "java-xmlunit-legacy")
9323 `(#:jar-name "java-xmlunit-legacy.jar"
9324 #:source-dir "xmlunit-legacy/src/main/java"
9325 #:test-dir "xmlunit-legacy/src/test"))
9327 `(("java-xmlunit" ,java-xmlunit)
9328 ("java-junit" ,java-junit)))
9330 `(("java-mockito-1" ,java-mockito-1)))))
9332 (define-public java-openchart2
9334 (name "java-openchart2")
9338 (uri (string-append "http://download.approximatrix.com/openchart2/"
9339 "openchart2-" version ".source.zip"))
9342 "1xq96zm5r02n1blja0072jmmsifmxc40lbyfbnmcnr6mw42frh4g"))))
9343 (build-system ant-build-system)
9345 `(#:test-target "test"
9347 (modify-phases %standard-phases
9348 (add-after 'unpack 'fix-junit-errors
9350 (with-directory-excursion "unittest/src/com/approximatrix/charting/"
9351 (substitute* '("coordsystem/ticklocator/NumericXTickLocatorTest.java"
9352 "coordsystem/ticklocator/NumericYTickLocatorTest.java"
9353 "coordsystem/ticklocator/ObjectXTickLocatorTest.java"
9354 "model/DefaultChartDataModelConstraintsTest.java"
9355 "model/MultiScatterDataModelConstraintsTest.java"
9356 "model/threedimensional/DotPlotDataModelConstraintsTest.java")
9357 (("(assertEquals[^;]+);" before _)
9358 (string-append (string-drop-right before 2) ", 1E-6);"))))
9360 (replace 'install (install-jars ".")))))
9363 ("java-junit" ,java-junit)
9364 ("java-hamcrest-core" ,java-hamcrest-core)))
9365 (home-page "http://approximatrix.com/products/openchart2/")
9366 (synopsis "Simple plotting for Java")
9367 (description "Openchart2 provides a simple, yet powerful, interface for
9368 Java programmers to create two-dimensional charts and plots. The library
9369 features an assortment of graph styles, including advanced scatter plots, bar
9370 graphs, and pie charts.")
9371 (license license:lgpl2.1+)))